skia2/modules/skplaintexteditor
Ben Wagner f6cc85844f Reland "Fix sk_app macOS raster window build conditions."
The "raster" window on macOS and iOS is actually backed by GL. Fix the
build rules and code conditions to reflect this. This allows for some
sk_app applications to run on macOS and iOS with skia_use_gl=false.

> Revert:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

> Land:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: Ia8a421f4818856dd90cb4847095eee0d1836d1e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398056
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-04-19 18:25:44 +00:00
..
app Reland "Fix sk_app macOS raster window build conditions." 2021-04-19 18:25:44 +00:00
include Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
src Make TextBlob 'Text' allocators public. 2021-02-24 18:48:44 +00:00
BUILD.gn Separate general defaults from Skia defaults 2021-03-22 15:30:56 +00:00
README.md SkPlainTextEditor: from experimental to modules 2019-08-27 20:32:19 +00:00

Editor

This is an experimental Editor layer that abstracts out SkShaper text layeout for easy embedding into an application. The Editor layer is agnostic about the operating system.

+--------------------------------+
|Application                     |
+-+----+-------------------------+
  |    |
  |    |
  |  +-v-------------------------+
  |  |Editor                     |
  |  +-+----+--------------------+
  |    |    |
  |    |    |
  |    |  +-v--------------------+
  |    |  |SkShaper              |
  |    |  +-+--------+-----------+
  |    |    |        |
  |    |    |        |
+-v----v----v--+   +-v-----------+
|Skia          |   |HarfBuzz, ICU|
+--------------+   +-------------+

The Application layer must interact with the:

  • Windowing system
  • File system
  • Clipboard
  • Keyboard/mouse input.

Try it out:

tools/git-sync-deps
bin/gn gen out/default
ninja -C out/default editor

out/default/editor resources/text/english.txt

cat resources/text/*.txt > example.txt
out/default/editor example.txt