| | | |
Offset 1, 71 lines modified | Offset 1, 27 lines modified |
1 | { | 1 | { |
2 | ····"Syntax·Menu":·{ | 2 | ····"Syntax·Object":·{ |
3 | ········"content":·"\n##·Menus\n\n```text\nMenu·=·'menu'·<id:IDENT>?·'{'·MenuChild*·'}'\nMenuChild·=·(·MenuSection·|·MenuSubmenu·|·MenuItemShorthand·|·MenuItem·)\nMenuSection·=·'section'·<id:IDENT>?·'{'·(·MenuChild·|·MenuAttribute·)*·'}'\nMenuSubmenu·=·'submenu'·<id:IDENT>?·'{'·(·[·...·truncated·by·diffoscope;·len:·595,·SHA:·ee5259d1ca68be2297cd8a4ab8e95d9353b6b1cfcfed36269ecee66a67b1f455·...·];\n}\n```\n\n", | 3 | ········"content":·"\n##·Objects\n\n```text\nObject·=·TypeName·<id:IDENT>?·ObjectContent\nObjectContent·=·'{'·(Signal·|·Property·|·Extension·|·Child)*·'}'\n```\n\nObjects·are·the·basic·building·blocks·of·a·GTK·user·interface.·Your·widgets·are·all·objects,·as·are·some·other·feature[·...·truncated·by·diffoscope;·len:·531,·SHA:·2e69b6122f8e019184cf7452f6f7baed761c565c41877536d57d1f30deb18214·...·];\n}\n```\n\n", |
4 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/menus.html#syntax-menu" | 4 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/objects.html#syntax-object" |
5 | ····}, | |
6 | ····"Syntax·MenuItemShorthand":·{ | |
7 | ········"content":·"\n##·Item·Shorthand\n\n```text\nMenuItemShorthand·=·'item'·'('·StringValue·(·','·(·StringValue·(·','·StringValue?·)?·)?·)?·')'\n```\n\nThe·most·common·menu·attributes·are·`label`,·`action`,·and·`icon`.·Because·they're·so·common,·Blueprint·provides·a·shorter·syntax·for·menu·items·with·just·these·properties.\n\n###·Example\n\n```blueprint\nmenu·{\n··item·(\"label\")\n··item·(\"label\",·\"action\")\n··item·(\"label\",·\"action\",·\"icon\")\n}\n```\n\n", | |
8 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/menus.html#syntax-menuitemshorthand" | |
9 | ····}, | |
10 | ····"Syntax·Root":·{ | |
11 | ········"content":·"\n##·Document·Root\n\n```text\nRoot·=·GtkDecl·(Using)*·(TranslationDomain)?·(·Template·|·Menu·|·Object·)*·EOF\n```\n\nA·blueprint·document·consists·of·a·[GTK·declaration](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/document_root.html#syntax-gtkdecl),·one·or·more·[imports](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/document_root.html#syntax-using),·and·a·list·of·[objects](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/objects.html#syntax-object)·and/or·a·[template](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/templates.html#syntax-template).\n\n###·Example\n\n```blueprint\n//·Gtk·Declaration\nusing·Gtk·4.0;\n\n//·Import·Statement\nusing·Adw·1;\n\n//·Object\nWindow·my_window·{}\n```\n\n", | |
12 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/document_root.html#syntax-root" | |
13 | ····}, | |
14 | ····"Syntax·GtkDecl":·{ | |
15 | ········"content":·"\n##·GTK·Declaration\n\n```text\nGtkDecl·=·'using'·'Gtk'·'4.0'·';'\n```\n\nEvery·blueprint·file·begins·with·the·line·`using·Gtk·4.0;`,·which·declares·the·target·GTK·version·for·the·file.·Tools·that·read·blueprint·files·should·verify·that·they·support·the·declared·version.\n\n###·Example\n\n```blueprint\nusing·Gtk·4.0;\n```\n\n", | |
16 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/document_root.html#syntax-gtkdecl" | |
17 | ····}, | |
18 | ····"Syntax·Using":·{ | |
19 | ········"content":·"\n##·GObject·Introspection·Imports\n\n```text\nUsing·=·'using'·<namespace:IDENT>·<version:NUMBER>·';'\n```\n\nTo·use·classes·and·types·from·namespaces·other·than·GTK·itself,·those·namespaces·must·be·imported·at·the·top·of·the·file.·This·tells·the·compiler·what·version·of·the·namespace·to·import.\n\nYou'll·need·the·GIR·name·and·version,·not·the·package·name·and·not·the·exact·version·number.·These·are·listed·at·the·top·of·each·library's·documentation·homepage:\n\n![gir-namespace.png](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/_images/gir-namespace.png)\n\nThe·compiler·requires·typelib·files·for·these·libraries·to·be·installed.·They·are·usually·installed·with·the·library,·but·on·some·distros,·you·may·need·to·install·the·package·that·provides·`{namespace}-{version}.typelib`·(e.g.·`Adw-1.typelib`).\n\n###·Example\n\n```blueprint\n//·Import·libadwaita\nusing·Adw·1;\n```\n\n", | |
20 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/document_root.html#syntax-using" | |
21 | ····}, | |
22 | ····"Syntax·TranslationDomain":·{ | |
23 | ········"content":·"\n##·Translation·Domain\n\n```text\nTranslationDomain·=·'translation-domain'·<domain:QUOTED>·';'\n```\n\nThe·translation·domain·is·used·to·look·up·translations·for·translatable·strings·in·the·blueprint·file.·If·no·translation·domain·is·specified,·strings·will·be·looked·up·in·the·program's·global·domain.\n\nSee·[Gtk.Builder:translation-domain](https://docs.gtk.org/gtk4/property.Builder.translation-domain.html)·for·more·information.\n", | |
24 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/document_root.html#syntax-translationdomain" | |
25 | ····}, | |
26 | ····"Syntax·Value":·{ | |
27 | ········"content":·"\n##·Values\n\n```text\nValue·=·Translated·|·Flags·|·Literal\n```\n\n", | |
28 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/values.html#syntax-value" | |
29 | ····}, | |
30 | ····"Syntax·Literal":·{ | |
31 | ········"content":·"\n##·Literals\n\n```text\nLiteral·=·TypeLiteral·|·QuotedLiteral·|·NumberLiteral·|·IdentLiteral\nQuotedLiteral·=·<value:QUOTED>\nNumberLiteral·=·(·'-'·|·'+'·)?·<value:NUMBER>\nIdentLiteral·=·<ident:IDENT>\n```\n\nLiterals·are·used·to·specify·values·for·properties.·They·can·be·strings,·numbers,·references·to·objects,·`null`,·types,·boolean·values,·or·enum·members.\n\n", | |
32 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/values.html#syntax-literal" | |
33 | ····}, | |
34 | ····"Syntax·TypeLiteral":·{ | |
35 | ········"content":·"\n##·Type·Literals\n\n```text\nTypeLiteral·=·'typeof'·'<'·TypeName·'>'\n```\n\nSometimes,·you·need·to·specify·a·type·as·a·value.·For·example,·when·creating·a·list·store,·you·may·need·to·specify·the·type·of·the·items·in·the·list·store.·This·is·done·using·a·`typeof<>`·literal.\n\nThe·type·of·a·`typeof<>`·literal·is·[GType](https://docs.gtk.org/gobject/alias.Type.html),·GObject's·\"meta-type\"·for·type·information.\n\n\n###·Example\n\n```blueprint\nGio.ListStore·{\n··item-type:·typeof<GObject.Object>;\n}\n```\n\n", | |
36 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/values.html#syntax-typeliteral" | |
37 | ····}, | |
38 | ····"Syntax·Flags":·{ | |
39 | ········"content":·"\n##·Flags\n\n```text\nFlags·=·<first:IDENT>·'|'·(·<rest:IDENT>·)|+\n```\n\nFlags·are·used·to·specify·a·set·of·options.·One·or·more·of·the·available·flag·values·may·be·specified,·and·they·are·combined·using·`|`.\n\n###·Example\n\n```blueprint\nAdw.TabView·{\n··shortcuts:·control_tab·|·control_shift_tab;\n}\n```\n\n", | |
40 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/values.html#syntax-flags" | |
41 | ····}, | |
42 | ····"Syntax·Translated":·{ | |
43 | ········"content":·"\n##·Translated·Strings\n\n```text\nTranslated·=·(·'_'·'('·<string:QUOTED>·')'·)·|·(·'\\C_'·'('·<context:QUOTED>·','·<string:QUOTED>·')'·)\n```\n\nUse·`_(\"...\")`·to·mark·strings·as·translatable.·You·can·put·a·comment·for·translators·on·the·line·above·if·needed.\n\n```blueprint\nGtk.Label·label·{\n··/*·Translators:·This·is·the·main·text·of·the·welcome·screen·*/\n··label:·_(\"Hello,·world!\");\n}\n```\n\nUse·`C_(\"context\",·\"...\")`·to·add·a·*message·context*·to·a·string·to·disambiguate·it,·in·case·the·same·string·appears·in·different·places.·Remember,·two·strings·might·be·the·same·in·one·language·but·different·in·another·depending·on·context.\n\n```blueprint\nGtk.Label·label·{\n··/*·Translators:·This·is·a·section·in·the·preferences·window·*/\n··label:·C_(\"preferences·window\",·\"Hello,·world!\");\n}\n```\n\n", | |
44 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/values.html#syntax-translated" | |
45 | ····}, | |
46 | ····"Syntax·Binding":·{ | |
47 | ········"content":·"\n##·Bindings\n\n```text\nBinding·=·'bind'·Expression·(BindingFlag)*\nBindingFlag·=·'inverted'·|·'bidirectional'·|·'no-sync-create'\n```\n\nBindings·keep·a·property·updated·as·other·properties·change.·They·can·be·used·to·keep·the·UI·in·sync·with·application·data,·or·to·connect·two·parts·of·the·UI.\n\nThe·simplest·bindings·connect·to·a·property·of·another·object·in·the·blueprint.·When·that·other·property·changes,·the·bound·property·updates·as·well.·More·advanced·bindings·can·do·multi-step·property·lookups·and·can·even·call·application·code·to·compute·values.·See·[the·expressions·page](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/expressions.html#syntax-expression).\n\n###·Simple·Bindings\n\nA·binding·that·consists·of·a·source·object·and·a·single·lookup·is·called·a·\"simple·binding\".·These·are·implemented·using·[GObject·property·bindings](https://docs.gtk.org/gobject/method.Object.bind_property.html)·and·support·a·few·flags:\n\n-·`inverted`:·For·boolean·properties,·the·target·is·set·to·the·inverse·of·the·source·property.\n-·`bidirectional`:·The·binding·is·two-way,·so·changes·to·the·target·property·will·also·update·the·source·property.\n-·`no-sync-create`:·Normally,·when·a·binding·is·created,·the·target·property·is·immediately·updated·with·the·current·value·of·the·source·property.·This·flag·disables·that·behavior,·and·the·bound·property·will·be·updated·the·next·time·the·source·property·changes.\n\n###·Complex·Bindings\n\nBindings·with·more·complex·expressions·are·implemented·with·[Gtk.Expression](https://docs.gtk.org/gtk4/class.Expression.html).·These·bindings·do·not·support·flags.\n\n###·Example\n\n```blueprint\n/*·Use·bindings·to·show·a·label·when·a·switch\n·*·is·active,·without·any·application·code·*/\n\nSwitch·show_label·{}\n\nLabel·{\n··visible:·bind·show_label.active;\n··label:·_(\"I'm·a·label·that's·only·visible·when·the·switch·is·enabled!\");\n}\n```\n\n", | |
48 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/values.html#syntax-binding" | |
49 | ····}, | 5 | ····}, |
50 | ····"Syntax·ObjectValue":·{ | |
51 | ········"content":·"\n##·Object·Values\n\n```text\nObjectValue·=·Object\n```\n\nThe·value·of·a·property·can·be·an·object,·specified·inline.·This·is·particularly·useful·for·widgets·that·use·a·`child`·property·rather·than·a·list·of·child·widgets.·Objects·constru[·...·truncated·by·diffoscope;·len:·223,·SHA:·b7949de7e525b9d6c153da219959d518c6db15fe7c4d78b1fff9770e155f2e4f·...·] | 6 | ····"Syntax·TypeName":·{ |
| 7 | ········"content":·"\n##·Type·Names\n\n```text\nTypeName·=·TypeNameFull·|·TypeNameExternal·|·TypeNameShort\nTypeNameFull·=·<namespace:IDENT>·'.'·<name:IDENT>\nTypeNameExternal·=·'$'·<name:IDENT>\nTypeNameShort·=·<name:IDENT>\n```\n\nThere·are·three·forms·of·type·names:·full,·short,·and·external.·Full·type·names·take·the·form·`{namespace}.{name}`,·e.g.·`Gtk.ApplicationWindow`·or·`Adw.Leaflet`.·Because·GTK·types·are·so·common,·the·Gtk·namespace·may·be·omitted,·shortening·`Gtk.ApplicationWindow`·to·just·`ApplicationWindow`.\n\nExternal·type·names·refer·to·types·defined·in·your·application.·They·are·prefixed·with·`$`·and·do·not·have·a·dot·between·the·namespace·and·class·name.·In·fact,·anywhere·a·`$`·is·used·in·a·blueprint,·it·refers·to·something·that·must·be·defined·in·your·application·code.\n\n\n", |
52 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/values.html#syntax-objectvalue" | 8 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/objects.html#syntax-typename" |
53 | ····}, | 9 | ····}, |
54 | ····"Syntax·StringValue":·{ | |
55 | ········"content":·"\n##·String·Values\n\n```text\nStringValue·=·Translated·|·QuotedLiteral\n```\n\nMenus,·as·well·as·some·[extensions](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extension),·have·properties·that[·...·truncated·by·diffoscope;·len:·57,·SHA:·2f482fca2dcb3161d1c3c0b1c4e702c930ab166f4cf992ea6793b2986568306a·...·] | 10 | ····"Syntax·Property":·{ |
| 11 | ········"content":·"\n##·Properties\n\n```text\nProperty·=·<name:IDENT>·':'·(·Binding·|·ExprValue·|·ObjectValue·|·Value·)·';'\n```\n\nProperties·specify·the·details·of·each·object,·like·a·label's·text,·an·image's·icon·name,·or·the·margins·on·a·container.\n\nMost·properties·are·static·and·directly·specified·in·the·blueprint,·but·properties·can·also·be·bound·to·a·data·model·using·the·`bind`·or·`bind-property`·keywords.\n\nA·property's·value·can·be·another·object,·either·inline·or·referenced·by·ID.\n\n###·Example\n\n```blueprint\nLabel·{\n··label:·\"text\";\n}\n\nButton·{\n··/*·Inline·object·value.·Notice·the·semicolon·after·the·object.·*/\n··child:·Image·{\n····/*·...·*/\n··};\n}\n```\n\n", |
56 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/values.html#syntax-stringvalue" | 12 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/objects.html#syntax-property" |
57 | ····}, | 13 | ····}, |
58 | ····"Syntax·ArrayValue":·{ | 14 | ····"Syntax·Signal":·{ |
59 | ········"content":·"\n##·Array·Values\n\n```text\nArrayValue·=·'['·(StringValue),*·']'\n```\n\nFor·now,·it·only·supports·[Strings](https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/values.html#syntax-stringvalue).·This·is·because·Gtk.Builder·only·supports·string[·...·truncated·by·diffoscope;·len:·8,·SHA:·f99e6e4dcd393007c514561219b3f9e7d37aeb5ce8d7f533bf83133c0d33d3b3·...·]\n", | 15 | ········"content":·"\n##·Signal·Handlers\n\n```text\nSignal·=·<name:IDENT>·('::'·<detail:IDENT>)?·'=>'·'$'·<handler:IDENT>·'('·<object:IDENT>?·')'·(SignalFlag)*·';'\nSignalFlag·=·'after'·|·'swapped'·|·'not-swapped'\n```\n\nSignals·are·one·way·to·respond·to·user·input·(another·is·[[·...·truncated·by·diffoscope;·len:·802,·SHA:·33e5723fffbec3a3e7456c3624e7a437f350a6e8a77937017952a3c29d3cf746·...·]\n", |
60 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/values.html#syntax-arrayvalue" | 16 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/objects.html#syntax-signal" |
61 | ····}, | 17 | ····}, |
62 | ····"Syntax·Template":·{ | 18 | ····"Syntax·Child":·{ |
63 | ········"content":·"\n##·Composite·Templates\n\n```text\nTemplate·=·'template'·TypeName·(·':'·TypeName·)?·ObjectContent\n```\n\nWidget·subclassing·is·one·of·the·primary·techniques·for·structuring·an·application.·For·example,·a·maps·app·might·have·a·[Gtk.ApplicationWindow](https://d[·...·truncated·by·diffoscope;·len:·3589,·SHA:·86b36a9907c840df48ef0ac9fcb6602229c211f738c2cb501ac12a46d76650a4·...·]\n", | 19 | ········"content":·"\n##·Children\n\n```text\nChild·=·ChildAnnotation?·Object\nChildAnnotation·=·'['·(·ChildInternal·|·ChildExtension·|·ChildType·)·']'\nChildInternal·=·'internal-child'·<internal-child:IDENT>\nChildType·=·<child_type:IDENT>\n```\n\nSome·objects·can·have·children.·T[·...·truncated·by·diffoscope;·len:·2030,·SHA:·8ddc624473bd260d5da20b222735c258c27425afa1862d9d05d07c041933e5ba·...·]\n", |
64 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/templates.html#syntax-template" | 20 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/objects.html#syntax-child" |
65 | ····}, | 21 | ····}, |
66 | ····"Syntax·Expression":·{ | 22 | ····"Syntax·Expression":·{ |
67 | ········"content":·"\n##·Expressions\n\n```text\nExpression·=·(·ClosureExpression·|·Literal·|·(·'('·Expression·')'·)·)·(·LookupExpression·|·CastExpression·)*\n```\n\n####·Note\n\nThe·grammar·above·is·designed·to·eliminate·[left·recursion](https://en.wikipedia.org/wiki/Left_recursion),·which·can·make·parsing·more·complex.·In·this·format,·an·expression·consists·of·a·prefix·(such·as·a·literal·value·or·closure·invocation)·followed·by·zero·or·more·infix·or·suffix·operators.\n\nExpressions·are·composed·of·property·lookups·and/or·closures.·Property·lookups·are·the·inputs·to·the·expression,·and·closures·provided·in·application·code·can·perform·additional·calculations·on·those·inputs.\n\n\n", | 23 | ········"content":·"\n##·Expressions\n\n```text\nExpression·=·(·ClosureExpression·|·Literal·|·(·'('·Expression·')'·)·)·(·LookupExpression·|·CastExpression·)*\n```\n\n####·Note\n\nThe·grammar·above·is·designed·to·eliminate·[left·recursion](https://en.wikipedia.org/wiki/Left_recursion),·which·can·make·parsing·more·complex.·In·this·format,·an·expression·consists·of·a·prefix·(such·as·a·literal·value·or·closure·invocation)·followed·by·zero·or·more·infix·or·suffix·operators.\n\nExpressions·are·composed·of·property·lookups·and/or·closures.·Property·lookups·are·the·inputs·to·the·expression,·and·closures·provided·in·application·code·can·perform·additional·calculations·on·those·inputs.\n\n\n", |
68 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/expressions.html#syntax-expression" | 24 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/expressions.html#syntax-expression" |
69 | ····}, | 25 | ····}, |
70 | ····"Syntax·LookupExpression":·{ | 26 | ····"Syntax·LookupExpression":·{ |
71 | ········"content":·"\n##·Lookups\n\n```text\nLookupExpression·=·'.'·<property:IDENT>\n```\n\nLookup·expressions·perform·a·GObject·property·lookup·on·the·preceding·expression.·They·are·recalculated·whenever·the·property·changes,·using·the·[notify·signal](https://docs.gtk.org/gobject/signal.Object.notify.html).\n\nThe·type·of·a·property·expression·is·the·type·of·the·property·it·refers·to.\n\n\n", | 27 | ········"content":·"\n##·Lookups\n\n```text\nLookupExpression·=·'.'·<property:IDENT>\n```\n\nLookup·expressions·perform·a·GObject·property·lookup·on·the·preceding·expression.·They·are·recalculated·whenever·the·property·changes,·using·the·[notify·signal](https://docs.gtk.org/gobject/signal.Object.notify.html).\n\nThe·type·of·a·property·expression·is·the·type·of·the·property·it·refers·to.\n\n\n", |
Offset 79, 14 lines modified | Offset 35, 90 lines modified |
79 | ········"content":·"\n##·Casts\n\n```text\nCastExpression·=·'as'·'<'·TypeName·'>'\n```\n\nCast·expressions·allow·Blueprint·to·know·the·type·of·an·expression·when·it·can't·otherwise·determine·it.·This·is·necessary·for·closures·and·for·properties·of·application-defined·types.\n\n###·Example\n\n```blueprint\n//·Cast·the·result·of·the·closure·so·blueprint·knows·it's·a·string\nlabel:·bind·$format_bytes(template.file-size)·as·<string>\n```\n\n", | 35 | ········"content":·"\n##·Casts\n\n```text\nCastExpression·=·'as'·'<'·TypeName·'>'\n```\n\nCast·expressions·allow·Blueprint·to·know·the·type·of·an·expression·when·it·can't·otherwise·determine·it.·This·is·necessary·for·closures·and·for·properties·of·application-defined·types.\n\n###·Example\n\n```blueprint\n//·Cast·the·result·of·the·closure·so·blueprint·knows·it's·a·string\nlabel:·bind·$format_bytes(template.file-size)·as·<string>\n```\n\n", |
80 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/expressions.html#syntax-castexpression" | 36 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/expressions.html#syntax-castexpression" |
81 | ····}, | 37 | ····}, |
82 | ····"Syntax·ExprValue":·{ | 38 | ····"Syntax·ExprValue":·{ |
83 | ········"content":·"\n##·Expression·Values\n\n```text\nExprValue·=·'expr'·Expression\n```\n\nSome·APIs·take·*an·expression·itself*--not·its·result--as·a·property·value.·For·example,·[Gtk.BoolFilter](https://docs.gtk.org/gtk4/class.BoolFilter.html)·has·an·`expression`·property·of·type·[Gtk.Expression](https://docs.gtk.org/gtk4/class.Expression.html).·This·expression·is·evaluated·for·every·item·in·a·list·model·to·determine·whether·the·item·should·be·filtered.\n\nTo·define·an·expression·for·such·a·property,·use·`expr`·instead·of·`bind`.·Inside·the·expression,·you·can·use·the·`item`·keyword·to·refer·to·the·item·being·evaluated.·You·must·cast·the·item·to·the·correct·type·using·the·`as`·keyword,·and·you·can·only·use·`item`·in·a·property·lookup--you·may·not·pass·it·to·a·closure.\n\n###·Example\n\n```blueprint\nBoolFilter·{\n··expression:·expr·item·as·<$UserAccount>.active;\n}\n```\n\n", | 39 | ········"content":·"\n##·Expression·Values\n\n```text\nExprValue·=·'expr'·Expression\n```\n\nSome·APIs·take·*an·expression·itself*--not·its·result--as·a·property·value.·For·example,·[Gtk.BoolFilter](https://docs.gtk.org/gtk4/class.BoolFilter.html)·has·an·`expression`·property·of·type·[Gtk.Expression](https://docs.gtk.org/gtk4/class.Expression.html).·This·expression·is·evaluated·for·every·item·in·a·list·model·to·determine·whether·the·item·should·be·filtered.\n\nTo·define·an·expression·for·such·a·property,·use·`expr`·instead·of·`bind`.·Inside·the·expression,·you·can·use·the·`item`·keyword·to·refer·to·the·item·being·evaluated.·You·must·cast·the·item·to·the·correct·type·using·the·`as`·keyword,·and·you·can·only·use·`item`·in·a·property·lookup--you·may·not·pass·it·to·a·closure.\n\n###·Example\n\n```blueprint\nBoolFilter·{\n··expression:·expr·item·as·<$UserAccount>.active;\n}\n```\n\n", |
84 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/expressions.html#syntax-exprvalue" | 40 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/expressions.html#syntax-exprvalue" |
85 | ····}, | 41 | ····}, |
| 42 | ····"Syntax·Extension":·{ |
| 43 | ········"content":·"\nProperties·are·the·main·way·to·set·values·on·objects,·but·they·are·limited·by·the·GObject·type·system·in·what·values·they·can·accept.·Some·classes,·therefore,·have·specialized·syntax·for·certain·features.\n\n####·Note\n\nExtensions·are·a·feature·of·`Gtk.Buildable`--see·[Gtk.Buildable.custom_tag_start()](https://docs.gtk.org/gtk4/vfunc.Buildable.custom_tag_start.html)·for·internal·details.\n\nBecause·they·aren't·part·of·the·type·system,·they·aren't·present·in·typelib·files·like·properties·and·signals·are.·Therefore,·if·a·library·adds·a·new·extension,·syntax·for·it·must·be·added·to·Blueprint·manually.·If·there's·a·commonly·used·extension·that·isn't·supported·by·Blueprint,·please·[file·an·issue](https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues).\n\n```text\nExtension·=·ExtAccessibility\n|·ExtAdwAlertDialog\n|·ExtAdwMessageDialog\n|·ExtAdwBreakpoint\n|·ExtComboBoxItems\n|·ExtFileFilterMimeTypes\n|·ExtFileFilterPatterns\n|·ExtFileFilterSuffixes\n|·ExtLayout\n|·ExtListItemFactory\n|·ExtSizeGroupWidgets\n|·ExtStringListStrings\n|·ExtStyles\n```\n\n", |
| 44 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extension" |
| 45 | ····}, |
| 46 | ····"Syntax·ExtAccessibility":·{ |
| 47 | ········"content":·"\n##·Accessibility·Properties\n\n```text\nExtAccessibility·=·'accessibility'·'{'·ExtAccessibilityProp*·'}'\nExtAccessibilityProp·=·<name:IDENT>·':'·(Value··|·('['·(:ref:·Value·<Syntax·Value>),*·']')·)·';'\n```\n\nValid·in·any·[Gtk.Widget](https://docs.gtk.org/gtk4/class.Widget.html).\n\nThe·`accessibility`·block·defines·values·relevant·to·accessibility·software.·The·property·names·and·acceptable·values·are·described·in·the·[Gtk.AccessibleRelation](https://docs.gtk.org/gtk4/enum.AccessibleRelation.html),·[Gtk.AccessibleState](https://docs.gtk.org/gtk4/enum.AccessibleState.html),·and·[Gtk.AccessibleProperty](https://docs.gtk.org/gtk4/enum.AccessibleProperty.html)·enums.\n\n####·Note\n\nRelations·which·allow·for·a·list·of·values,·for·example·`labelled-by`,·must·be·given·as·a·single·relation·with·a·list·of·values·instead·of·duplicating·the·relation·like·done·in·Gtk.Builder.\n\n", |
| 48 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extaccessibility" |
| 49 | ····}, |
| 50 | ····"Syntax·ExtAdwBreakpoint":·{ |
| 51 | ········"content":·"\n##·Adw.Breakpoint\n\n```text\nExtAdwBreakpointCondition·=·'condition'·'('·<condition:QUOTED>·')'\nExtAdwBreakpoint·=·'setters'·'{'·ExtAdwBreakpointSetter*·'}'\nExtAdwBreakpointSetter·=·<object:IDENT>·'.'·<property:IDENT>·':'·Value··';'\n```\n\nValid·in·[Adw.Breakpoint](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Breakpoint.html).\n\nDefines·the·condition·for·a·breakpoint·and·the·properties·that·will·be·set·at·that·breakpoint.·See·the·documentation·for·[Adw.Breakpoint](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Breakpoint.html).\n\n####·Note\n\nThe·[Adw.Breakpoint:condition](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/property.Breakpoint.condition.html)·property·has·type·[Adw.BreakpointCondition](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/struct.BreakpointCondition.html),·which·GtkBuilder·doesn't·know·how·to·parse·from·a·string.·Therefore,·the·`condition`·syntax·is·used·instead.\n\n\n", |
| 52 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extadwbreakpoint" |
| 53 | ····}, |
| 54 | ····"Syntax·ExtAdwAlertDialog":·{ |
| 55 | ········"content":·"\n##·Adw.AlertDialog·Responses\n\n```text\nExtAdwAlertDialog·=·'responses'·'['·(ExtAdwAlertDialogResponse),*·']'\nExtAdwAlertDialogResponse·=·<id:IDENT>·':'·StringValue·ExtAdwAlertDialogFlag*\nExtAdwAlertDialogFlag·=·'destructive'·|·'suggested'·|·'disabled'\n```\n\nValid·in·[Adw.AlertDialog](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/class.AlertDialog.html).\n\nThe·`responses`·block·defines·the·buttons·that·will·be·added·to·the·dialog.·The·`destructive`·or·`suggested`·flag·sets·the·appearance·of·the·button,·and·the·`disabled`·flag·can·be·used·to·disable·the·button.\n\n```blueprint\nusing·Adw·1;\n\nAdw.AlertDialog·{\n··responses·[\n····cancel:·_(\"Cancel\"),\n····delete:·_(\"Delete\")·destructive,\n····save:·\"Save\"·suggested,\n····wipeHardDrive:·\"Wipe·Hard·Drive\"·destructive·disabled,\n··]\n}\n```\n\n", |
| 56 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extadwalertdialog" |
| 57 | ····}, |
| 58 | ····"Syntax·ExtAdwMessageDialog":·{ |
| 59 | ········"content":·"\n##·Adw.MessageDialog·Responses\n\n```text\nExtAdwMessageDialog·=·'responses'·'['·(ExtAdwMessageDialogResponse),*·']'\nExtAdwMessageDialogResponse·=·<id:IDENT>·':'·StringValue·ExtAdwMessageDialogFlag*\nExtAdwMessageDialogFlag·=·'destructive'·|·'suggested'·|·'disabled'\n```\n\nValid·in·[Adw.MessageDialog](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/class.MessageDialog.html).\n\nThe·`responses`·block·defines·the·buttons·that·will·be·added·to·the·dialog.·The·`destructive`·or·`suggested`·flag·sets·the·appearance·of·the·button,·and·the·`disabled`·flag·can·be·used·to·disable·the·button.\n\n```blueprint\nusing·Adw·1;\n\nAdw.MessageDialog·{\n··responses·[\n····cancel:·_(\"Cancel\"),\n····delete:·_(\"Delete\")·destructive,\n····save:·\"Save\"·suggested,\n····wipeHardDrive:·\"Wipe·Hard·Drive\"·destructive·disabled,\n··]\n}\n```\n\n", |
| 60 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extadwmessagedialog" |
| 61 | ····}, |
| 62 | ····"Syntax·ExtComboBoxItems":·{ |
| 63 | ········"content":·"\n##·Gtk.ComboBoxText·Items\n\n```text\nExtComboBoxItems·=·'items'·'['·(ExtComboBoxItem),*·']'\nExtComboBoxItem·=·(·<id:IDENT>·':'·)?·StringValue\n```\n\nValid·in·[Gtk.ComboBoxText](https://docs.gtk.org/gtk4/class.ComboBoxText.html),·which·is·deprecated·as·of·Gtk·4.10.\n\nThe·`items`·block·defines·the·items·that·will·be·added·to·the·combo·box.·The·optional·ID·can·be·used·to·refer·to·the·item·rather·than·its·label.\n\n```blueprint\nComboBoxText·{\n··items·[\n····item1:·\"Item·1\",\n····item2:·\"Item·2\",\n····item3:·\"Item·3\",\n··]\n}\n```\n\n", |
| 64 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extcomboboxitems" |
| 65 | ····}, |
| 66 | ····"Syntax·ExtFileFilter":·{ |
| 67 | ········"content":·"\n##·Gtk.FileFilter·Filters\n\n```text\nExtFileFilterMimeTypes·=·'mime-types'·'['·(ExtFileFilterItem),*·']'\nExtFileFilterPatterns·=·'patterns'·'['·(ExtFileFilterItem),*·']'\nExtFileFilterSuffixes·=·'suffixes'·'['·(ExtFileFilterItem),*·']'\nExtFileFilterItem·=·<item:QUOTED>\n```\n\nValid·in·[Gtk.FileFilter](https://docs.gtk.org/gtk4/class.FileFilter.html).\n\nThe·`mime-types`,·`patterns`,·and·`suffixes`·blocks·define·the·items·that·will·be·added·to·the·file·filter.·The·`mime-types`·block·accepts·mime·types·(including·wildcards·for·subtypes,·such·as·`image/*`).·The·`patterns`·block·accepts·glob·patterns,·and·the·`suffixes`·block·accepts·file·extensions.\n\n```blueprint\nFileFilter·{\n··mime-types·[·\"text/plain\",·\"image/*\"·]\n··patterns·[·\"*.txt\"·]\n··suffixes·[·\"png\",·\"jpg\"·]\n}\n```\n\n", |
| 68 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extfilefilter" |
| 69 | ····}, |
| 70 | ····"Syntax·ExtLayout":·{ |
| 71 | ········"content":·"\n##·Widget·Layouts\n\n```text\nExtLayout·=·'layout'·'{'·ExtLayoutProp*·'}'\nExtLayoutProp·=·<name:IDENT>·':'·Value·';'\n```\n\nValid·in·[Gtk.Widget](https://docs.gtk.org/gtk4/class.Widget.html).\n\nThe·`layout`·block·describes·how·the·widget·should·be·positioned·within·its·parent.·The·available·properties·depend·on·the·parent·widget's·layout·manager.\n\n```blueprint\nGrid·{\n··Button·{\n····layout·{\n······column:·0;\n······row:·0;\n····}\n··}\n··Button·{\n····layout·{\n······column:·1;\n······row:·0;\n····}\n··}\n··Button·{\n····layout·{\n······column:·0;\n······row:·1;\n······row-span:·2;\n····}\n··}\n}\n```\n\n", |
| 72 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extlayout" |
| 73 | ····}, |
| 74 | ····"Syntax·ExtListItemFactory":·{ |
| 75 | ········"content":·"\n##·Gtk.BuilderListItemFactory·Templates\n\n```text\nExtListItemFactory·=·'template'·TypeName·ObjectContent\n```\n\nValid·in·[Gtk.BuilderListItemFactory](https://docs.gtk.org/gtk4/class.BuilderListItemFactory.html).\n\nThe·`template`·block·defines·the·template·that·will·be·used·to·create·list·items.·This·block·is·unique·within·Blueprint·because·it·defines·a·completely·separate·sub-blueprint·which·is·used·to·create·each·list·item.·The·sub-blueprint·may·not·reference·objects·in·the·main·blueprint·or·vice·versa.\n\nThe·template·type·must·be·[Gtk.ListItem](https://docs.gtk.org/gtk4/class.ListItem.html),·[Gtk.ColumnViewRow](https://docs.gtk.org/gtk4/class.ColumnViewRow.html),·or·[Gtk.ColumnViewCell](https://docs.gtk.org/gtk4/class.ColumnViewCell.html).·The·template·object·can·be·referenced·with·the·`template`·keyword.\n\n```blueprint\nListView·{\n··factory:·BuilderListItemFactory·{\n····template·ListItem·{\n······child:·Label·{\n········label:·bind·template.item·as·<StringObject>.string;\n······};\n····}\n··};\n\n··model:·NoSelection·{\n····model:·StringList·{\n······strings·[·\"Item·1\",·\"Item·2\",·\"Item·3\"·]\n····};\n··};\n}\n```\n\n", |
| 76 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extlistitemfactory" |
| 77 | ····}, |
| 78 | ····"Syntax·ExtScaleMarks":·{ |
| 79 | ········"content":·"\n##·Gtk.Scale·Marks\n\n```text\nExtScaleMarks·=·'marks'·'['·(ExtScaleMark),*·']'\nExtScaleMark·=·'mark'·'('·(·'-'·|·'+'·)?·<value:NUMBER>·(·','·<position:IDENT>·(·','·StringValue·)?·)?·')'\n```\n\nValid·in·[Gtk.Scale](https://docs.gtk.org/gtk4/class.Scale.html).\n\nThe·`marks`·block·defines·the·marks·on·a·scale.·A·single·`mark`·has·up·to·three·arguments:·a·value,·an·optional·position,·and·an·optional·label.·The·position·can·be·`left`,·`right`,·`top`,·or·`bottom`.·The·label·may·be·translated.\n\n\n", |
| 80 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extscalemarks" |
| 81 | ····}, |
| 82 | ····"Syntax·ExtSizeGroupWidgets":·{ |
| 83 | ········"content":·"\n##·Gtk.SizeGroup·Widgets\n\n```text\nExtSizeGroupWidgets·=·'widgets'·'['·(ExtSizeGroupWidget),*·']'\nExtSizeGroupWidget·=·<id:IDENT>\n```\n\nValid·in·[Gtk.SizeGroup](https://docs.gtk.org/gtk4/class.SizeGroup.html).\n\nThe·`widgets`·block·defines·the·widgets·that·will·be·added·to·the·size·group.\n\n```blueprint\nBox·{\n··Button·button1·{}\n··Button·button2·{}\n}\n\nSizeGroup·{\n··widgets·[button1,·button2]\n}\n```\n\n", |
| 84 | ········"link":·"https://jwestman.pages.gitlab.gnome.org/blueprint-compiler/reference/extensions.html#syntax-extsizegroupwidgets" |
| 85 | ····}, |
| 86 | ····"Syntax·ExtStringListStrings":·{ |
| 87 | ········"content":·"\n##·Gtk.StringList·Strings\n\n```text\nExtStringListStrings·=·'strings'·'['·(ExtStringListItem),*·']'\nExtStringListItem·=·StringValue\n```\n\nValid·in·[Gtk.StringList](https://docs.gtk.org/gtk4/class.StringList.html).\n\nThe·`strings`·block·defines·the·strings·in·the·string·list.\n\n```blueprint\nStringList·{\n··strings·[\"violin\",·\"guitar\",·_(\"harp\")]\n}\n```\n\n", |
Max diff block lines reached; 35693/77483 bytes (46.07%) of diff not shown.
|