1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-17 15:21:00 +00:00
serenity/Libraries
Andreas Kling 822dc56ef3 LibGUI: Introduce GML - a simple GUI Markup Language :^)
This patch replaces the UI-from-JSON mechanism with a more
human-friendly DSL.

The current implementation simply converts the GML into a JSON object
that can be consumed by GUI::Widget::load_from_json(). The parser is
not very helpful if you make a mistake.

The language offers a very simple way to instantiate any registered
Core::Object class by simply saying @ClassName

@GUI::Label {
    text: "Hello friends!"
    tooltip: ":^)"
}

Layouts are Core::Objects and can be assigned to the "layout" property:

@GUI::Widget {
    layout: @GUI::VerticalBoxLayout {
        spacing: 2
        margins: [8, 8, 8, 8]
    }
}

And finally, child objects are simply nested within their parent:

@GUI::Widget {
    layout: @GUI::HorizontalBoxLayout {
    }
    @GUI::Button {
        text: "OK"
    }
    @GUI::Button {
        text: "Cancel"
    }
}

This feels a *lot* more pleasant to write than the JSON we had. The fact
that no new code was being written with the JSON mechanism was pretty
telling, so let's approach this with developer convenience in mind. :^)
2020-12-20 11:59:40 +01:00
..
LibAudio LibAudio: Fix parsing of WAV files from memory 2020-12-03 21:52:10 +01:00
LibC LibC: stdlib: Add clearenv() function 2020-12-17 19:39:56 +01:00
LibChess Chess: Add LibCore as a dependency 2020-12-14 23:05:53 +01:00
LibCompress Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
LibCore LibCore: UDPServer::bind: Replace bind failure assert() with perror() 2020-12-18 19:20:30 +01:00
LibCoreDump LibCoreDump: Add library for parsing coredump files 2020-12-14 23:05:53 +01:00
LibCpp LibCpp: Add library for working with c++ code 2020-09-30 21:46:59 +02:00
LibCrypt Everywhere: Port to String::copy_characters_to_buffer() 2020-08-30 17:35:27 +02:00
LibCrypto LibTLS+LibCrypto: Remove all remaining uses of ByteBuffer::wrap() 2020-12-19 18:29:13 +01:00
LibDebug LibELF+LibDebug: Remove use of ByteBuffer::wrap() 2020-12-19 13:14:00 +01:00
LibDesktop Meta+LibC through LibHTTP: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
LibDiff LibDiff: Add library for working with diffs 2020-09-15 21:43:29 +02:00
LibELF LibELF+LibDebug: Remove use of ByteBuffer::wrap() 2020-12-19 13:14:00 +01:00
LibGemini LibTLS: Even more ByteBuffer -> Span conversion 2020-12-19 18:29:13 +01:00
LibGfx LibGfx: Remove use of ByteBuffer::wrap() in BMP decoder 2020-12-19 13:05:48 +01:00
LibGUI LibGUI: Introduce GML - a simple GUI Markup Language :^) 2020-12-20 11:59:40 +01:00
LibHTTP LibHTTP: Make HTTPRequest::from_raw_request() take a ReadonlyBytes 2020-12-19 18:29:13 +01:00
LibImageDecoderClient AK: Add trivial structure validation to SharedBuffer 2020-10-02 15:38:07 +02:00
LibIPC LibIPC: Remove use of ByteBuffer::wrap() 2020-12-19 11:30:02 +01:00
LibJS LibJS: Don't treat '?.' followed by decimal digit as QuestionMarkPeriod 2020-12-14 22:25:46 +01:00
LibKeyboard Everywhere: Add missing <AK/ByteBuffer.h> includes 2020-11-15 13:11:21 +01:00
LibLine LibLine: Treat leftover data in buffer as a read event 2020-12-18 19:20:37 +01:00
LibM Loader: Stabilize loader & Use shared libraries everywhere :^) 2020-12-14 23:05:53 +01:00
LibMarkdown LibMarkdown: Reduce debug spam from invalid characters in table headings 2020-11-30 11:35:45 +01:00
LibPCIDB LibPCIDB: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
LibProtocol LibProtocol: Remove use of ByteBuffer::wrap() in protocol API 2020-12-19 13:09:02 +01:00
LibPthread LibPthread: Return errors as positive return values 2020-12-12 21:28:12 +01:00
LibRegex LibRegex: Add a basic Regex<...>::replace() 2020-12-08 23:34:38 +01:00
LibTar Userland: tar: support extracting gzipped files 2020-10-04 00:16:40 +02:00
LibTextCodec LibTextCodec: Normalize incoming encodings in decoder_for() 2020-12-13 18:20:50 +01:00
LibThread LibThread: Add API to join a thread 2020-11-24 21:36:28 +01:00
LibTLS LibTLS+Userland: Remove all uses of ByteBuffer::slice_view() 2020-12-19 18:29:13 +01:00
LibUnwind Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
LibVT LibVT: Add "Copy name" action to terminal link context menu 2020-12-07 15:55:12 +01:00
LibWeb LibWeb: Don't leave "border" CSS property around after expansion 2020-12-20 11:59:40 +01:00
LibX86 LibX86: Pack the Instruction data structure 2020-11-17 17:09:49 +01:00
CMakeLists.txt LibCoreDump: Add library for parsing coredump files 2020-12-14 23:05:53 +01:00