@gtkx/react 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -28
- package/dist/codegen/jsx-generator.d.ts +15 -9
- package/dist/codegen/jsx-generator.js +215 -94
- package/dist/factory.js +5 -0
- package/dist/generated/internal.js +9291 -3379
- package/dist/generated/jsx.d.ts +12954 -4396
- package/dist/generated/jsx.js +3672 -171
- package/dist/node.js +25 -7
- package/dist/nodes/header-bar.d.ts +19 -0
- package/dist/nodes/header-bar.js +45 -0
- package/dist/nodes/toolbar-view.d.ts +19 -0
- package/dist/nodes/toolbar-view.js +81 -0
- package/dist/nodes/window.js +11 -2
- package/dist/portal.d.ts +1 -1
- package/dist/portal.js +1 -1
- package/dist/predicates.d.ts +7 -0
- package/dist/predicates.js +4 -0
- package/dist/reconciler.js +1 -1
- package/package.json +3 -3
package/dist/generated/jsx.js
CHANGED
|
@@ -169,28 +169,28 @@ import { createElement } from "react";
|
|
|
169
169
|
*
|
|
170
170
|
* ```xml
|
|
171
171
|
* <object class="GtkGrid" id="my_grid">
|
|
172
|
-
*
|
|
172
|
+
* `<child>`
|
|
173
173
|
* <object class="GtkLabel" id="label1">
|
|
174
|
-
* <property name="label">Description
|
|
174
|
+
* <property name="label">Description`</property>`
|
|
175
175
|
* <layout>
|
|
176
|
-
* <property name="column">0
|
|
177
|
-
* <property name="row">0
|
|
178
|
-
* <property name="row-span">1
|
|
179
|
-
* <property name="column-span">1
|
|
176
|
+
* <property name="column">0`</property>`
|
|
177
|
+
* <property name="row">0`</property>`
|
|
178
|
+
* <property name="row-span">1`</property>`
|
|
179
|
+
* <property name="column-span">1`</property>`
|
|
180
180
|
* </layout>
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
181
|
+
* `</object>`
|
|
182
|
+
* `</child>`
|
|
183
|
+
* `<child>`
|
|
184
184
|
* <object class="GtkEntry" id="description_entry">
|
|
185
185
|
* <layout>
|
|
186
|
-
* <property name="column">1
|
|
187
|
-
* <property name="row">0
|
|
188
|
-
* <property name="row-span">1
|
|
189
|
-
* <property name="column-span">1
|
|
186
|
+
* <property name="column">1`</property>`
|
|
187
|
+
* <property name="row">0`</property>`
|
|
188
|
+
* <property name="row-span">1`</property>`
|
|
189
|
+
* <property name="column-span">1`</property>`
|
|
190
190
|
* </layout>
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
191
|
+
* `</object>`
|
|
192
|
+
* `</child>`
|
|
193
|
+
* `</object>`
|
|
194
194
|
* ```
|
|
195
195
|
*
|
|
196
196
|
* `GtkWidget` allows style information such as style classes to
|
|
@@ -202,7 +202,7 @@ import { createElement } from "react";
|
|
|
202
202
|
* <class name="my-special-button-class"/>
|
|
203
203
|
* <class name="dark-button"/>
|
|
204
204
|
* </style>
|
|
205
|
-
*
|
|
205
|
+
* `</object>`
|
|
206
206
|
* ```
|
|
207
207
|
*
|
|
208
208
|
* `GtkWidget` allows defining accessibility information, such as properties,
|
|
@@ -211,10 +211,10 @@ import { createElement } from "react";
|
|
|
211
211
|
* ```xml
|
|
212
212
|
* <object class="GtkButton" id="button1">
|
|
213
213
|
* <accessibility>
|
|
214
|
-
* <property name="label">Download
|
|
214
|
+
* <property name="label">Download`</property>`
|
|
215
215
|
* <relation name="labelled-by">label1</relation>
|
|
216
216
|
* </accessibility>
|
|
217
|
-
*
|
|
217
|
+
* `</object>`
|
|
218
218
|
* ```
|
|
219
219
|
*
|
|
220
220
|
* ### Building composite widgets from template XML
|
|
@@ -230,50 +230,50 @@ import { createElement } from "react";
|
|
|
230
230
|
* is slightly different from regular [class@Gtk.Builder] XML.
|
|
231
231
|
*
|
|
232
232
|
* Unlike regular interface descriptions, [method@Gtk.WidgetClass.set_template]
|
|
233
|
-
* will expect a
|
|
234
|
-
* `<interface>` tag. The
|
|
233
|
+
* will expect a ``<template>`` tag as a direct child of the toplevel
|
|
234
|
+
* `<interface>` tag. The ``<template>`` tag must specify the “class” attribute
|
|
235
235
|
* which must be the type name of the widget. Optionally, the “parent”
|
|
236
236
|
* attribute may be specified to specify the direct parent type of the widget
|
|
237
237
|
* type; this is ignored by `GtkBuilder` but can be used by UI design tools to
|
|
238
238
|
* introspect what kind of properties and internal children exist for a given
|
|
239
239
|
* type when the actual type does not exist.
|
|
240
240
|
*
|
|
241
|
-
* The XML which is contained inside the
|
|
242
|
-
* added to the
|
|
243
|
-
* on a widget by inserting
|
|
244
|
-
* add
|
|
245
|
-
* would with
|
|
241
|
+
* The XML which is contained inside the ``<template>`` tag behaves as if it were
|
|
242
|
+
* added to the ``<object>`` tag defining the widget itself. You may set properties
|
|
243
|
+
* on a widget by inserting ``<property>`` tags into the ``<template>`` tag, and also
|
|
244
|
+
* add ``<child>`` tags to add children and extend a widget in the normal way you
|
|
245
|
+
* would with ``<object>`` tags.
|
|
246
246
|
*
|
|
247
|
-
* Additionally,
|
|
248
|
-
*
|
|
247
|
+
* Additionally, ``<object>`` tags can also be added before and after the initial
|
|
248
|
+
* ``<template>`` tag in the normal way, allowing one to define auxiliary objects
|
|
249
249
|
* which might be referenced by other widgets declared as children of the
|
|
250
|
-
*
|
|
250
|
+
* ``<template>`` tag.
|
|
251
251
|
*
|
|
252
|
-
* Since, unlike the
|
|
252
|
+
* Since, unlike the ``<object>`` tag, the ``<template>`` tag does not contain an
|
|
253
253
|
* “id” attribute, if you need to refer to the instance of the object itself that
|
|
254
254
|
* the template will create, simply refer to the template class name in an
|
|
255
255
|
* applicable element content.
|
|
256
256
|
*
|
|
257
257
|
* Here is an example of a template definition, which includes an example of
|
|
258
|
-
* this in the
|
|
258
|
+
* this in the ``<signal>`` tag:
|
|
259
259
|
*
|
|
260
260
|
* ```xml
|
|
261
261
|
* <interface>
|
|
262
262
|
* <template class="FooWidget" parent="GtkBox">
|
|
263
|
-
* <property name="orientation">horizontal
|
|
264
|
-
* <property name="spacing">4
|
|
265
|
-
*
|
|
263
|
+
* <property name="orientation">horizontal`</property>`
|
|
264
|
+
* <property name="spacing">4`</property>`
|
|
265
|
+
* `<child>`
|
|
266
266
|
* <object class="GtkButton" id="hello_button">
|
|
267
|
-
* <property name="label">Hello World
|
|
267
|
+
* <property name="label">Hello World`</property>`
|
|
268
268
|
* <signal name="clicked" handler="hello_button_clicked" object="FooWidget" swapped="yes"/>
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
269
|
+
* `</object>`
|
|
270
|
+
* `</child>`
|
|
271
|
+
* `<child>`
|
|
272
272
|
* <object class="GtkButton" id="goodbye_button">
|
|
273
|
-
* <property name="label">Goodbye World
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
273
|
+
* <property name="label">Goodbye World`</property>`
|
|
274
|
+
* `</object>`
|
|
275
|
+
* `</child>`
|
|
276
|
+
* `</template>`
|
|
277
277
|
* </interface>
|
|
278
278
|
* ```
|
|
279
279
|
*
|
|
@@ -408,7 +408,7 @@ export const Widget = "Widget";
|
|
|
408
408
|
*
|
|
409
409
|
* The `GtkWindow` implementation of the [iface@Gtk.Buildable] interface supports
|
|
410
410
|
* setting a child as the titlebar by specifying “titlebar” as the “type”
|
|
411
|
-
* attribute of a
|
|
411
|
+
* attribute of a ``<child>`` element.
|
|
412
412
|
*
|
|
413
413
|
* # Shortcuts and Gestures
|
|
414
414
|
*
|
|
@@ -436,7 +436,7 @@ export const Widget = "Widget";
|
|
|
436
436
|
*
|
|
437
437
|
* ```
|
|
438
438
|
* window.background [.csd / .solid-csd / .ssd] [.maximized / .fullscreen / .tiled]
|
|
439
|
-
* ├──
|
|
439
|
+
* ├── `<child>`
|
|
440
440
|
* ╰── <titlebar child>.titlebar [.default-decoration]
|
|
441
441
|
* ```
|
|
442
442
|
*
|
|
@@ -548,7 +548,7 @@ export const AboutDialog = "AboutDialog";
|
|
|
548
548
|
*
|
|
549
549
|
* The `GtkActionBar` implementation of the `GtkBuildable` interface supports
|
|
550
550
|
* adding children at the start or end sides by specifying “start” or “end” as
|
|
551
|
-
* the “type” attribute of a
|
|
551
|
+
* the “type” attribute of a ``<child>`` element, or setting the center widget
|
|
552
552
|
* by specifying “center” value.
|
|
553
553
|
*
|
|
554
554
|
* # CSS nodes
|
|
@@ -946,7 +946,7 @@ export const CellView = "CellView";
|
|
|
946
946
|
*
|
|
947
947
|
* The `GtkCenterBox` implementation of the `GtkBuildable` interface
|
|
948
948
|
* supports placing children in the 3 positions by specifying “start”, “center”
|
|
949
|
-
* or “end” as the “type” attribute of a
|
|
949
|
+
* or “end” as the “type” attribute of a ``<child>`` element.
|
|
950
950
|
*
|
|
951
951
|
* # CSS nodes
|
|
952
952
|
*
|
|
@@ -1323,7 +1323,7 @@ export const ComboBox = "ComboBox";
|
|
|
1323
1323
|
* <item translatable="yes" id="home">Home</item>
|
|
1324
1324
|
* <item translatable="yes" id="subway">Subway</item>
|
|
1325
1325
|
* </items>
|
|
1326
|
-
*
|
|
1326
|
+
* `</object>`
|
|
1327
1327
|
* ```
|
|
1328
1328
|
*
|
|
1329
1329
|
* ## CSS nodes
|
|
@@ -1437,7 +1437,7 @@ export const ComboBoxText = "ComboBoxText";
|
|
|
1437
1437
|
* to true.
|
|
1438
1438
|
*
|
|
1439
1439
|
* `GtkDialog` supports adding action widgets by specifying “action” as
|
|
1440
|
-
* the “type” attribute of a
|
|
1440
|
+
* the “type” attribute of a ``<child>`` element. The widget will be added
|
|
1441
1441
|
* either to the action area or the headerbar of the dialog, depending
|
|
1442
1442
|
* on the “use-header-bar” property. The response id has to be associated
|
|
1443
1443
|
* with the action widget using the `<action-widgets>` element.
|
|
@@ -1448,16 +1448,16 @@ export const ComboBoxText = "ComboBoxText";
|
|
|
1448
1448
|
* <object class="GtkDialog" id="dialog1">
|
|
1449
1449
|
* <child type="action">
|
|
1450
1450
|
* <object class="GtkButton" id="button_cancel"/>
|
|
1451
|
-
*
|
|
1451
|
+
* `</child>`
|
|
1452
1452
|
* <child type="action">
|
|
1453
1453
|
* <object class="GtkButton" id="button_ok">
|
|
1454
|
-
*
|
|
1455
|
-
*
|
|
1454
|
+
* `</object>`
|
|
1455
|
+
* `</child>`
|
|
1456
1456
|
* <action-widgets>
|
|
1457
1457
|
* <action-widget response="cancel">button_cancel</action-widget>
|
|
1458
1458
|
* <action-widget response="ok" default="true">button_ok</action-widget>
|
|
1459
1459
|
* </action-widgets>
|
|
1460
|
-
*
|
|
1460
|
+
* `</object>`
|
|
1461
1461
|
* ```
|
|
1462
1462
|
*
|
|
1463
1463
|
* # Accessibility
|
|
@@ -1602,9 +1602,9 @@ function DropDownItem(props) {
|
|
|
1602
1602
|
* <item translatable="yes">Home</item>
|
|
1603
1603
|
* <item translatable="yes">Subway</item>
|
|
1604
1604
|
* </items>
|
|
1605
|
-
*
|
|
1606
|
-
*
|
|
1607
|
-
*
|
|
1605
|
+
* `</object>`
|
|
1606
|
+
* `</property>`
|
|
1607
|
+
* `</object>`
|
|
1608
1608
|
* ```
|
|
1609
1609
|
*
|
|
1610
1610
|
* If a `GtkDropDown` is created in this manner, or with
|
|
@@ -1790,7 +1790,7 @@ export const EmojiChooser = "EmojiChooser";
|
|
|
1790
1790
|
* <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
|
|
1791
1791
|
* <attribute name="background" value="red" start="5" end="10"/>
|
|
1792
1792
|
* </attributes>
|
|
1793
|
-
*
|
|
1793
|
+
* `</object>`
|
|
1794
1794
|
* ```
|
|
1795
1795
|
*
|
|
1796
1796
|
* The start and end attributes specify the range of characters to which the
|
|
@@ -1865,11 +1865,11 @@ export const Entry = "Entry";
|
|
|
1865
1865
|
* <object class="GtkExpander">
|
|
1866
1866
|
* <property name="label-widget">
|
|
1867
1867
|
* <object class="GtkLabel" id="expander-label"/>
|
|
1868
|
-
*
|
|
1868
|
+
* `</property>`
|
|
1869
1869
|
* <property name="child">
|
|
1870
1870
|
* <object class="GtkEntry" id="expander-content"/>
|
|
1871
|
-
*
|
|
1872
|
-
*
|
|
1871
|
+
* `</property>`
|
|
1872
|
+
* `</object>`
|
|
1873
1873
|
* ```
|
|
1874
1874
|
*
|
|
1875
1875
|
* # CSS nodes
|
|
@@ -1880,7 +1880,7 @@ export const Entry = "Entry";
|
|
|
1880
1880
|
* ├── title
|
|
1881
1881
|
* │ ├── expander
|
|
1882
1882
|
* │ ╰── <label widget>
|
|
1883
|
-
* ╰──
|
|
1883
|
+
* ╰── `<child>`
|
|
1884
1884
|
* ```
|
|
1885
1885
|
*
|
|
1886
1886
|
* `GtkExpander` has a main node `expander-widget`, and subnode `box` containing
|
|
@@ -2188,9 +2188,9 @@ export const Fixed = "Fixed";
|
|
|
2188
2188
|
* ```
|
|
2189
2189
|
* flowbox
|
|
2190
2190
|
* ├── flowboxchild
|
|
2191
|
-
* │ ╰──
|
|
2191
|
+
* │ ╰── `<child>`
|
|
2192
2192
|
* ├── flowboxchild
|
|
2193
|
-
* │ ╰──
|
|
2193
|
+
* │ ╰── `<child>`
|
|
2194
2194
|
* ┊
|
|
2195
2195
|
* ╰── [rubberband]
|
|
2196
2196
|
* ```
|
|
@@ -2313,11 +2313,11 @@ export const FontDialogButton = "FontDialogButton";
|
|
|
2313
2313
|
* <object class="GtkFrame">
|
|
2314
2314
|
* <property name="label-widget">
|
|
2315
2315
|
* <object class="GtkLabel" id="frame_label"/>
|
|
2316
|
-
*
|
|
2316
|
+
* `</property>`
|
|
2317
2317
|
* <property name="child">
|
|
2318
2318
|
* <object class="GtkEntry" id="frame_content"/>
|
|
2319
|
-
*
|
|
2320
|
-
*
|
|
2319
|
+
* `</property>`
|
|
2320
|
+
* `</object>`
|
|
2321
2321
|
* ```
|
|
2322
2322
|
*
|
|
2323
2323
|
* # CSS nodes
|
|
@@ -2325,7 +2325,7 @@ export const FontDialogButton = "FontDialogButton";
|
|
|
2325
2325
|
* ```
|
|
2326
2326
|
* frame
|
|
2327
2327
|
* ├── <label widget>
|
|
2328
|
-
* ╰──
|
|
2328
|
+
* ╰── `<child>`
|
|
2329
2329
|
* ```
|
|
2330
2330
|
*
|
|
2331
2331
|
* `GtkFrame` has a main CSS node with name “frame”, which is used to draw the
|
|
@@ -2523,45 +2523,45 @@ export const GraphicsOffload = "GraphicsOffload";
|
|
|
2523
2523
|
*
|
|
2524
2524
|
* ```xml
|
|
2525
2525
|
* <object class="GtkGrid" id="my_grid">
|
|
2526
|
-
*
|
|
2526
|
+
* `<child>`
|
|
2527
2527
|
* <object class="GtkButton" id="button1">
|
|
2528
|
-
* <property name="label">Button 1
|
|
2528
|
+
* <property name="label">Button 1`</property>`
|
|
2529
2529
|
* <layout>
|
|
2530
|
-
* <property name="column">0
|
|
2531
|
-
* <property name="row">0
|
|
2530
|
+
* <property name="column">0`</property>`
|
|
2531
|
+
* <property name="row">0`</property>`
|
|
2532
2532
|
* </layout>
|
|
2533
|
-
*
|
|
2534
|
-
*
|
|
2535
|
-
*
|
|
2533
|
+
* `</object>`
|
|
2534
|
+
* `</child>`
|
|
2535
|
+
* `<child>`
|
|
2536
2536
|
* <object class="GtkButton" id="button2">
|
|
2537
|
-
* <property name="label">Button 2
|
|
2537
|
+
* <property name="label">Button 2`</property>`
|
|
2538
2538
|
* <layout>
|
|
2539
|
-
* <property name="column">1
|
|
2540
|
-
* <property name="row">0
|
|
2539
|
+
* <property name="column">1`</property>`
|
|
2540
|
+
* <property name="row">0`</property>`
|
|
2541
2541
|
* </layout>
|
|
2542
|
-
*
|
|
2543
|
-
*
|
|
2544
|
-
*
|
|
2542
|
+
* `</object>`
|
|
2543
|
+
* `</child>`
|
|
2544
|
+
* `<child>`
|
|
2545
2545
|
* <object class="GtkButton" id="button3">
|
|
2546
|
-
* <property name="label">Button 3
|
|
2546
|
+
* <property name="label">Button 3`</property>`
|
|
2547
2547
|
* <layout>
|
|
2548
|
-
* <property name="column">2
|
|
2549
|
-
* <property name="row">0
|
|
2550
|
-
* <property name="row-span">2
|
|
2548
|
+
* <property name="column">2`</property>`
|
|
2549
|
+
* <property name="row">0`</property>`
|
|
2550
|
+
* <property name="row-span">2`</property>`
|
|
2551
2551
|
* </layout>
|
|
2552
|
-
*
|
|
2553
|
-
*
|
|
2554
|
-
*
|
|
2552
|
+
* `</object>`
|
|
2553
|
+
* `</child>`
|
|
2554
|
+
* `<child>`
|
|
2555
2555
|
* <object class="GtkButton" id="button4">
|
|
2556
|
-
* <property name="label">Button 4
|
|
2556
|
+
* <property name="label">Button 4`</property>`
|
|
2557
2557
|
* <layout>
|
|
2558
|
-
* <property name="column">0
|
|
2559
|
-
* <property name="row">1
|
|
2560
|
-
* <property name="column-span">2
|
|
2558
|
+
* <property name="column">0`</property>`
|
|
2559
|
+
* <property name="row">1`</property>`
|
|
2560
|
+
* <property name="column-span">2`</property>`
|
|
2561
2561
|
* </layout>
|
|
2562
|
-
*
|
|
2563
|
-
*
|
|
2564
|
-
*
|
|
2562
|
+
* `</object>`
|
|
2563
|
+
* `</child>`
|
|
2564
|
+
* `</object>`
|
|
2565
2565
|
* ```
|
|
2566
2566
|
*
|
|
2567
2567
|
* It organizes the first two buttons side-by-side in one cell each.
|
|
@@ -2661,7 +2661,7 @@ export const GridView = {
|
|
|
2661
2661
|
*
|
|
2662
2662
|
* The `GtkHeaderBar` implementation of the `GtkBuildable` interface supports
|
|
2663
2663
|
* adding children at the start or end sides by specifying “start” or “end” as
|
|
2664
|
-
* the “type” attribute of a
|
|
2664
|
+
* the “type” attribute of a ``<child>`` element, or setting the title widget by
|
|
2665
2665
|
* specifying “title” value.
|
|
2666
2666
|
*
|
|
2667
2667
|
* By default the `GtkHeaderBar` uses a `GtkLabel` displaying the title of the
|
|
@@ -2672,16 +2672,16 @@ export const GridView = {
|
|
|
2672
2672
|
* <object class="GtkHeaderBar">
|
|
2673
2673
|
* <property name="title-widget">
|
|
2674
2674
|
* <object class="GtkLabel">
|
|
2675
|
-
* <property name="label" translatable="yes">Label
|
|
2676
|
-
* <property name="single-line-mode">True
|
|
2677
|
-
* <property name="ellipsize">end
|
|
2678
|
-
* <property name="width-chars">5
|
|
2675
|
+
* <property name="label" translatable="yes">Label`</property>`
|
|
2676
|
+
* <property name="single-line-mode">True`</property>`
|
|
2677
|
+
* <property name="ellipsize">end`</property>`
|
|
2678
|
+
* <property name="width-chars">5`</property>`
|
|
2679
2679
|
* <style>
|
|
2680
2680
|
* <class name="title"/>
|
|
2681
2681
|
* </style>
|
|
2682
|
-
*
|
|
2683
|
-
*
|
|
2684
|
-
*
|
|
2682
|
+
* `</object>`
|
|
2683
|
+
* `</property>`
|
|
2684
|
+
* `</object>`
|
|
2685
2685
|
* ```
|
|
2686
2686
|
*
|
|
2687
2687
|
* # CSS nodes
|
|
@@ -2848,7 +2848,7 @@ export const Image = "Image";
|
|
|
2848
2848
|
* (which should be a child of the dialogs @action_area).
|
|
2849
2849
|
*
|
|
2850
2850
|
* `GtkInfoBar` supports adding action widgets by specifying “action” as
|
|
2851
|
-
* the “type” attribute of a
|
|
2851
|
+
* the “type” attribute of a ``<child>`` element. The widget will be added
|
|
2852
2852
|
* either to the action area. The response id has to be associated
|
|
2853
2853
|
* with the action widget using the `<action-widgets>` element.
|
|
2854
2854
|
*
|
|
@@ -2958,7 +2958,7 @@ export const Inscription = "Inscription";
|
|
|
2958
2958
|
* <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
|
|
2959
2959
|
* <attribute name="background" value="red" start="5" end="10"/>
|
|
2960
2960
|
* </attributes>
|
|
2961
|
-
*
|
|
2961
|
+
* `</object>`
|
|
2962
2962
|
* ```
|
|
2963
2963
|
*
|
|
2964
2964
|
* The start and end attributes specify the range of characters to which the
|
|
@@ -3095,10 +3095,7 @@ export const Inscription = "Inscription";
|
|
|
3095
3095
|
* with the [signal@Gtk.Label::activate-link] signal and the
|
|
3096
3096
|
* [method@Gtk.Label.get_current_uri] function.
|
|
3097
3097
|
*/
|
|
3098
|
-
export const Label =
|
|
3099
|
-
Root: "Label.Root",
|
|
3100
|
-
MnemonicWidget: "Label.MnemonicWidget",
|
|
3101
|
-
};
|
|
3098
|
+
export const Label = "Label";
|
|
3102
3099
|
/**
|
|
3103
3100
|
* Shows a level indicator.
|
|
3104
3101
|
*
|
|
@@ -3318,7 +3315,7 @@ export const ListBase = "ListBase";
|
|
|
3318
3315
|
*
|
|
3319
3316
|
* The `GtkListBox` implementation of the `GtkBuildable` interface supports
|
|
3320
3317
|
* setting a child as the placeholder by specifying “placeholder” as the “type”
|
|
3321
|
-
* attribute of a
|
|
3318
|
+
* attribute of a ``<child>`` element. See [method@Gtk.ListBox.set_placeholder]
|
|
3322
3319
|
* for info.
|
|
3323
3320
|
*
|
|
3324
3321
|
* # Shortcuts and Gestures
|
|
@@ -3671,30 +3668,30 @@ export const MessageDialog = "MessageDialog";
|
|
|
3671
3668
|
*
|
|
3672
3669
|
* The `GtkNotebook` implementation of the `GtkBuildable` interface
|
|
3673
3670
|
* supports placing children into tabs by specifying “tab” as the
|
|
3674
|
-
* “type” attribute of a
|
|
3671
|
+
* “type” attribute of a ``<child>`` element. Note that the content
|
|
3675
3672
|
* of the tab must be created before the tab can be filled.
|
|
3676
|
-
* A tab child can be specified without specifying a
|
|
3673
|
+
* A tab child can be specified without specifying a ``<child>``
|
|
3677
3674
|
* type attribute.
|
|
3678
3675
|
*
|
|
3679
3676
|
* To add a child widget in the notebooks action area, specify
|
|
3680
3677
|
* "action-start" or “action-end” as the “type” attribute of the
|
|
3681
|
-
*
|
|
3678
|
+
* ``<child>`` element.
|
|
3682
3679
|
*
|
|
3683
3680
|
* An example of a UI definition fragment with `GtkNotebook`:
|
|
3684
3681
|
*
|
|
3685
3682
|
* ```xml
|
|
3686
3683
|
* <object class="GtkNotebook">
|
|
3687
|
-
*
|
|
3684
|
+
* `<child>`
|
|
3688
3685
|
* <object class="GtkLabel" id="notebook-content">
|
|
3689
|
-
* <property name="label">Content
|
|
3690
|
-
*
|
|
3691
|
-
*
|
|
3686
|
+
* <property name="label">Content`</property>`
|
|
3687
|
+
* `</object>`
|
|
3688
|
+
* `</child>`
|
|
3692
3689
|
* <child type="tab">
|
|
3693
3690
|
* <object class="GtkLabel" id="notebook-tab">
|
|
3694
|
-
* <property name="label">Tab
|
|
3695
|
-
*
|
|
3696
|
-
*
|
|
3697
|
-
*
|
|
3691
|
+
* <property name="label">Tab`</property>`
|
|
3692
|
+
* `</object>`
|
|
3693
|
+
* `</child>`
|
|
3694
|
+
* `</object>`
|
|
3698
3695
|
* ```
|
|
3699
3696
|
*
|
|
3700
3697
|
* # Shortcuts and Gestures
|
|
@@ -3739,9 +3736,9 @@ export const MessageDialog = "MessageDialog";
|
|
|
3739
3736
|
* │ ╰── [<action widget>]
|
|
3740
3737
|
* │
|
|
3741
3738
|
* ╰── stack
|
|
3742
|
-
* ├──
|
|
3739
|
+
* ├── `<child>`
|
|
3743
3740
|
* ┊
|
|
3744
|
-
* ╰──
|
|
3741
|
+
* ╰── `<child>`
|
|
3745
3742
|
* ```
|
|
3746
3743
|
*
|
|
3747
3744
|
* `GtkNotebook` has a main CSS node with name `notebook`, a subnode
|
|
@@ -3801,7 +3798,7 @@ export const Notebook = {
|
|
|
3801
3798
|
*
|
|
3802
3799
|
* The `GtkOverlay` implementation of the `GtkBuildable` interface
|
|
3803
3800
|
* supports placing a child as an overlay by specifying “overlay” as
|
|
3804
|
-
* the “type” attribute of a
|
|
3801
|
+
* the “type” attribute of a ``<child>`` element.
|
|
3805
3802
|
*
|
|
3806
3803
|
* # CSS nodes
|
|
3807
3804
|
*
|
|
@@ -3872,9 +3869,9 @@ export const PageSetupUnixDialog = "PageSetupUnixDialog";
|
|
|
3872
3869
|
*
|
|
3873
3870
|
* ```
|
|
3874
3871
|
* paned
|
|
3875
|
-
* ├──
|
|
3872
|
+
* ├── `<child>`
|
|
3876
3873
|
* ├── separator[.wide]
|
|
3877
|
-
* ╰──
|
|
3874
|
+
* ╰── `<child>`
|
|
3878
3875
|
* ```
|
|
3879
3876
|
*
|
|
3880
3877
|
* `GtkPaned` has a main CSS node with name paned, and a subnode for
|
|
@@ -4064,7 +4061,7 @@ export const Picture = "Picture";
|
|
|
4064
4061
|
* popover.background[.menu]
|
|
4065
4062
|
* ├── arrow
|
|
4066
4063
|
* ╰── contents
|
|
4067
|
-
* ╰──
|
|
4064
|
+
* ╰── `<child>`
|
|
4068
4065
|
* ```
|
|
4069
4066
|
*
|
|
4070
4067
|
* `GtkPopover` has a main node with name `popover`, an arrow with name `arrow`,
|
|
@@ -4294,25 +4291,25 @@ export const PopoverMenuBar = "PopoverMenuBar";
|
|
|
4294
4291
|
* <object class="GtkPrintUnixDialog" id="dialog1">
|
|
4295
4292
|
* <child internal-child="notebook">
|
|
4296
4293
|
* <object class="GtkNotebook" id="notebook">
|
|
4297
|
-
*
|
|
4294
|
+
* `<child>`
|
|
4298
4295
|
* <object type="GtkNotebookPage">
|
|
4299
|
-
* <property name="tab_expand">False
|
|
4300
|
-
* <property name="tab_fill">False
|
|
4296
|
+
* <property name="tab_expand">False`</property>`
|
|
4297
|
+
* <property name="tab_fill">False`</property>`
|
|
4301
4298
|
* <property name="tab">
|
|
4302
4299
|
* <object class="GtkLabel" id="tablabel">
|
|
4303
|
-
* <property name="label">Tab label
|
|
4304
|
-
*
|
|
4305
|
-
*
|
|
4300
|
+
* <property name="label">Tab label`</property>`
|
|
4301
|
+
* `</object>`
|
|
4302
|
+
* `</property>`
|
|
4306
4303
|
* <property name="child">
|
|
4307
4304
|
* <object class="GtkLabel" id="tabcontent">
|
|
4308
|
-
* <property name="label">Content on notebook tab
|
|
4309
|
-
*
|
|
4310
|
-
*
|
|
4311
|
-
*
|
|
4312
|
-
*
|
|
4313
|
-
*
|
|
4314
|
-
*
|
|
4315
|
-
*
|
|
4305
|
+
* <property name="label">Content on notebook tab`</property>`
|
|
4306
|
+
* `</object>`
|
|
4307
|
+
* `</property>`
|
|
4308
|
+
* `</object>`
|
|
4309
|
+
* `</child>`
|
|
4310
|
+
* `</object>`
|
|
4311
|
+
* `</child>`
|
|
4312
|
+
* `</object>`
|
|
4316
4313
|
* ```
|
|
4317
4314
|
*
|
|
4318
4315
|
* # CSS nodes
|
|
@@ -4802,7 +4799,7 @@ export const ShortcutLabel = "ShortcutLabel";
|
|
|
4802
4799
|
* This widget is only meant to be used with [class@Gtk.ShortcutsWindow].
|
|
4803
4800
|
*
|
|
4804
4801
|
* The recommended way to construct a `GtkShortcutsGroup` is with
|
|
4805
|
-
* [class@Gtk.Builder], by using the
|
|
4802
|
+
* [class@Gtk.Builder], by using the ``<child>`` tag to populate a
|
|
4806
4803
|
* `GtkShortcutsGroup` with one or more [class@Gtk.ShortcutsShortcut]
|
|
4807
4804
|
* instances.
|
|
4808
4805
|
*
|
|
@@ -4826,7 +4823,7 @@ export const ShortcutsGroup = "ShortcutsGroup";
|
|
|
4826
4823
|
* This widget is only meant to be used with [class@Gtk.ShortcutsWindow].
|
|
4827
4824
|
*
|
|
4828
4825
|
* The recommended way to construct a `GtkShortcutsSection` is with
|
|
4829
|
-
* [class@Gtk.Builder], by using the
|
|
4826
|
+
* [class@Gtk.Builder], by using the ``<child>`` tag to populate a
|
|
4830
4827
|
* `GtkShortcutsSection` with one or more [class@Gtk.ShortcutsGroup]
|
|
4831
4828
|
* instances, which in turn contain one or more [class@Gtk.ShortcutsShortcut]
|
|
4832
4829
|
* objects.
|
|
@@ -4861,7 +4858,7 @@ export const ShortcutsShortcut = "ShortcutsShortcut";
|
|
|
4861
4858
|
* showing information that is not relevant in the current application context.
|
|
4862
4859
|
*
|
|
4863
4860
|
* The recommended way to construct a `GtkShortcutsWindow` is with
|
|
4864
|
-
* [class@Gtk.Builder], by using the
|
|
4861
|
+
* [class@Gtk.Builder], by using the ``<child>`` tag to populate a
|
|
4865
4862
|
* `GtkShortcutsWindow` with one or more [class@Gtk.ShortcutsSection] objects,
|
|
4866
4863
|
* which contain one or more [class@Gtk.ShortcutsGroup] instances, which, in turn,
|
|
4867
4864
|
* contain [class@Gtk.ShortcutsShortcut] instances.
|
|
@@ -5090,17 +5087,17 @@ function StackVisibleChild(props) {
|
|
|
5090
5087
|
*
|
|
5091
5088
|
* ```xml
|
|
5092
5089
|
* <object class="GtkStack" id="stack">
|
|
5093
|
-
*
|
|
5090
|
+
* `<child>`
|
|
5094
5091
|
* <object class="GtkStackPage">
|
|
5095
|
-
* <property name="name">page1
|
|
5096
|
-
* <property name="title">In the beginning
|
|
5092
|
+
* <property name="name">page1`</property>`
|
|
5093
|
+
* <property name="title">In the beginning…`</property>`
|
|
5097
5094
|
* <property name="child">
|
|
5098
5095
|
* <object class="GtkLabel">
|
|
5099
|
-
* <property name="label">It was dark
|
|
5100
|
-
*
|
|
5101
|
-
*
|
|
5102
|
-
*
|
|
5103
|
-
*
|
|
5096
|
+
* <property name="label">It was dark`</property>`
|
|
5097
|
+
* `</object>`
|
|
5098
|
+
* `</property>`
|
|
5099
|
+
* `</object>`
|
|
5100
|
+
* `</child>`
|
|
5104
5101
|
* ```
|
|
5105
5102
|
*
|
|
5106
5103
|
* # CSS nodes
|
|
@@ -5586,7 +5583,7 @@ export const ToggleButton = {
|
|
|
5586
5583
|
* treeexpander
|
|
5587
5584
|
* ├── [indent]*
|
|
5588
5585
|
* ├── [expander]
|
|
5589
|
-
* ╰──
|
|
5586
|
+
* ╰── `<child>`
|
|
5590
5587
|
* ```
|
|
5591
5588
|
*
|
|
5592
5589
|
* `GtkTreeExpander` has zero or one CSS nodes with the name "expander" that
|
|
@@ -5639,31 +5636,31 @@ export const TreeExpander = "TreeExpander";
|
|
|
5639
5636
|
* ## `GtkTreeView` as `GtkBuildable`
|
|
5640
5637
|
*
|
|
5641
5638
|
* The `GtkTreeView` implementation of the `GtkBuildable` interface accepts
|
|
5642
|
-
* [class@Gtk.TreeViewColumn] objects as
|
|
5639
|
+
* [class@Gtk.TreeViewColumn] objects as ``<child>`` elements and exposes the
|
|
5643
5640
|
* internal [class@Gtk.TreeSelection] in UI definitions.
|
|
5644
5641
|
*
|
|
5645
5642
|
* An example of a UI definition fragment with `GtkTreeView`:
|
|
5646
5643
|
*
|
|
5647
5644
|
* ```xml
|
|
5648
5645
|
* <object class="GtkTreeView" id="treeview">
|
|
5649
|
-
* <property name="model">liststore1
|
|
5650
|
-
*
|
|
5646
|
+
* <property name="model">liststore1`</property>`
|
|
5647
|
+
* `<child>`
|
|
5651
5648
|
* <object class="GtkTreeViewColumn" id="test-column">
|
|
5652
|
-
* <property name="title">Test
|
|
5653
|
-
*
|
|
5649
|
+
* <property name="title">Test`</property>`
|
|
5650
|
+
* `<child>`
|
|
5654
5651
|
* <object class="GtkCellRendererText" id="test-renderer"/>
|
|
5655
5652
|
* <attributes>
|
|
5656
5653
|
* <attribute name="text">1</attribute>
|
|
5657
5654
|
* </attributes>
|
|
5658
|
-
*
|
|
5659
|
-
*
|
|
5660
|
-
*
|
|
5655
|
+
* `</child>`
|
|
5656
|
+
* `</object>`
|
|
5657
|
+
* `</child>`
|
|
5661
5658
|
* <child internal-child="selection">
|
|
5662
5659
|
* <object class="GtkTreeSelection" id="selection">
|
|
5663
5660
|
* <signal name="changed" handler="on_treeview_selection_changed"/>
|
|
5664
|
-
*
|
|
5665
|
-
*
|
|
5666
|
-
*
|
|
5661
|
+
* `</object>`
|
|
5662
|
+
* `</child>`
|
|
5663
|
+
* `</object>`
|
|
5667
5664
|
* ```
|
|
5668
5665
|
*
|
|
5669
5666
|
* ## CSS nodes
|
|
@@ -5752,20 +5749,20 @@ export const VolumeButton = "VolumeButton";
|
|
|
5752
5749
|
*
|
|
5753
5750
|
* ```xml
|
|
5754
5751
|
* <object class="GtkBox">
|
|
5755
|
-
*
|
|
5752
|
+
* `<child>`
|
|
5756
5753
|
* <object class="GtkWindowControls">
|
|
5757
|
-
* <property name="side">start
|
|
5758
|
-
*
|
|
5759
|
-
*
|
|
5754
|
+
* <property name="side">start`</property>`
|
|
5755
|
+
* `</object>`
|
|
5756
|
+
* `</child>`
|
|
5760
5757
|
*
|
|
5761
5758
|
* ...
|
|
5762
5759
|
*
|
|
5763
|
-
*
|
|
5760
|
+
* `<child>`
|
|
5764
5761
|
* <object class="GtkWindowControls">
|
|
5765
|
-
* <property name="side">end
|
|
5766
|
-
*
|
|
5767
|
-
*
|
|
5768
|
-
*
|
|
5762
|
+
* <property name="side">end`</property>`
|
|
5763
|
+
* `</object>`
|
|
5764
|
+
* `</child>`
|
|
5765
|
+
* `</object>`
|
|
5769
5766
|
* ```
|
|
5770
5767
|
*
|
|
5771
5768
|
* # CSS nodes
|
|
@@ -5810,6 +5807,3510 @@ export const WindowControls = "WindowControls";
|
|
|
5810
5807
|
* role.
|
|
5811
5808
|
*/
|
|
5812
5809
|
export const WindowHandle = "WindowHandle";
|
|
5810
|
+
/**
|
|
5811
|
+
* A freeform window.
|
|
5812
|
+
*
|
|
5813
|
+
*
|
|
5814
|
+
*
|
|
5815
|
+
* The `AdwWindow` widget is a subclass of [class@Gtk.Window] which has no
|
|
5816
|
+
* titlebar area. Instead, [class@ToolbarView] can be used together with
|
|
5817
|
+
* [class@HeaderBar] or [class@Gtk.HeaderBar] as follows:
|
|
5818
|
+
*
|
|
5819
|
+
* ```xml
|
|
5820
|
+
* <object class="AdwWindow">
|
|
5821
|
+
* <property name="content">
|
|
5822
|
+
* <object class="AdwToolbarView">
|
|
5823
|
+
* <child type="top">
|
|
5824
|
+
* <object class="AdwHeaderBar"/>
|
|
5825
|
+
* `</child>`
|
|
5826
|
+
* <property name="content">
|
|
5827
|
+
* <!-- ... -->
|
|
5828
|
+
* `</property>`
|
|
5829
|
+
* `</object>`
|
|
5830
|
+
* `</property>`
|
|
5831
|
+
* `</object>`
|
|
5832
|
+
* ```
|
|
5833
|
+
*
|
|
5834
|
+
* Using [property@Gtk.Window:titlebar] or [property@Gtk.Window:child]
|
|
5835
|
+
* is not supported and will result in a crash. Use [property@Window:content]
|
|
5836
|
+
* instead.
|
|
5837
|
+
*
|
|
5838
|
+
* ## Dialogs
|
|
5839
|
+
*
|
|
5840
|
+
* `AdwWindow` can contain [class@Dialog]. Use [method@Dialog.present] with the
|
|
5841
|
+
* window or a widget within a window to show a dialog.
|
|
5842
|
+
*
|
|
5843
|
+
* ## Breakpoints
|
|
5844
|
+
*
|
|
5845
|
+
* `AdwWindow` can be used with [class@Breakpoint] the same way as
|
|
5846
|
+
* [class@BreakpointBin]. Refer to that widget's documentation for details.
|
|
5847
|
+
*
|
|
5848
|
+
* Example:
|
|
5849
|
+
*
|
|
5850
|
+
* ```xml
|
|
5851
|
+
* <object class="AdwWindow">
|
|
5852
|
+
* <property name="content">
|
|
5853
|
+
* <object class="AdwToolbarView">
|
|
5854
|
+
* <child type="top">
|
|
5855
|
+
* <object class="AdwHeaderBar"/>
|
|
5856
|
+
* `</child>`
|
|
5857
|
+
* <property name="content">
|
|
5858
|
+
* <!-- ... -->
|
|
5859
|
+
* `</property>`
|
|
5860
|
+
* <child type="bottom">
|
|
5861
|
+
* <object class="GtkActionBar" id="bottom_bar">
|
|
5862
|
+
* <property name="revealed">True`</property>`
|
|
5863
|
+
* <property name="visible">False`</property>`
|
|
5864
|
+
* `</object>`
|
|
5865
|
+
* `</child>`
|
|
5866
|
+
* `</object>`
|
|
5867
|
+
* `</property>`
|
|
5868
|
+
* `<child>`
|
|
5869
|
+
* <object class="AdwBreakpoint">
|
|
5870
|
+
* <condition>max-width: 500px</condition>
|
|
5871
|
+
* <setter object="bottom_bar" property="visible">True</setter>
|
|
5872
|
+
* `</object>`
|
|
5873
|
+
* `</child>`
|
|
5874
|
+
* `</object>`
|
|
5875
|
+
* ```
|
|
5876
|
+
*
|
|
5877
|
+
* When breakpoints are used, the minimum size must be larger than the smallest
|
|
5878
|
+
* UI state. `AdwWindow` defaults to the minimum size of 360×200 px. If that's
|
|
5879
|
+
* too small, set the [property@Gtk.Widget:width-request] and
|
|
5880
|
+
* [property@Gtk.Widget:height-request] properties manually.
|
|
5881
|
+
*
|
|
5882
|
+
* ## Adaptive Preview
|
|
5883
|
+
*
|
|
5884
|
+
* `AdwWindow` has a debug tool called adaptive preview. It can be opened from
|
|
5885
|
+
* GTK Inspector or by pressing `Ctrl`+`Shift`+`M`,
|
|
5886
|
+
* and controlled via the [property@Window:adaptive-preview] property.
|
|
5887
|
+
*/
|
|
5888
|
+
export const AdwWindow = {
|
|
5889
|
+
Root: "AdwWindow.Root",
|
|
5890
|
+
Content: "AdwWindow.Content",
|
|
5891
|
+
};
|
|
5892
|
+
/**
|
|
5893
|
+
* A dialog showing information about the application.
|
|
5894
|
+
*
|
|
5895
|
+
*
|
|
5896
|
+
*
|
|
5897
|
+
* an about dialog is typically opened when the user activates the `About …`
|
|
5898
|
+
* item in the application's primary menu. All parts of the dialog are optional.
|
|
5899
|
+
*
|
|
5900
|
+
* ## Main page
|
|
5901
|
+
*
|
|
5902
|
+
* `AdwAboutDialog` prominently displays the application's icon, name, developer
|
|
5903
|
+
* name and version. They can be set with the [property@AboutDialog:application-icon],
|
|
5904
|
+
* [property@AboutDialog:application-name],
|
|
5905
|
+
* [property@AboutDialog:developer-name] and [property@AboutDialog:version]
|
|
5906
|
+
* respectively.
|
|
5907
|
+
*
|
|
5908
|
+
* ## What's New
|
|
5909
|
+
*
|
|
5910
|
+
* `AdwAboutDialog` provides a way for applications to display their release
|
|
5911
|
+
* notes, set with the [property@AboutDialog:release-notes] property.
|
|
5912
|
+
*
|
|
5913
|
+
* Release notes are formatted the same way as
|
|
5914
|
+
* AppStream descriptions.
|
|
5915
|
+
*
|
|
5916
|
+
* The supported formatting options are:
|
|
5917
|
+
*
|
|
5918
|
+
* * Paragraph (`<p>`)
|
|
5919
|
+
* * Ordered list (`<ol>`), with list items (`<li>`)
|
|
5920
|
+
* * Unordered list (`<ul>`), with list items (`<li>`)
|
|
5921
|
+
*
|
|
5922
|
+
* Within paragraphs and list items, emphasis (`<em>`) and inline code
|
|
5923
|
+
* (`<code>`) text styles are supported. The emphasis is rendered in italic,
|
|
5924
|
+
* while inline code is shown in a monospaced font.
|
|
5925
|
+
*
|
|
5926
|
+
* Any text outside paragraphs or list items is ignored.
|
|
5927
|
+
*
|
|
5928
|
+
* Nested lists are not supported.
|
|
5929
|
+
*
|
|
5930
|
+
* Only one version can be shown at a time. By default, the displayed version
|
|
5931
|
+
* number matches [property@AboutDialog:version]. Use
|
|
5932
|
+
* [property@AboutDialog:release-notes-version] to override it.
|
|
5933
|
+
*
|
|
5934
|
+
* ## Details
|
|
5935
|
+
*
|
|
5936
|
+
* The Details page displays the application comments and links.
|
|
5937
|
+
*
|
|
5938
|
+
* The comments can be set with the [property@AboutDialog:comments] property.
|
|
5939
|
+
* Unlike [property@Gtk.AboutDialog:comments], this string can be long and
|
|
5940
|
+
* detailed. It can also contain links and Pango markup.
|
|
5941
|
+
*
|
|
5942
|
+
* To set the application website, use [property@AboutDialog:website].
|
|
5943
|
+
* To add extra links below the website, use [method@AboutDialog.add_link].
|
|
5944
|
+
*
|
|
5945
|
+
* If the Details page doesn't have any other content besides website, the
|
|
5946
|
+
* website will be displayed on the main page instead.
|
|
5947
|
+
*
|
|
5948
|
+
* ## Troubleshooting
|
|
5949
|
+
*
|
|
5950
|
+
* `AdwAboutDialog` displays the following two links on the main page:
|
|
5951
|
+
*
|
|
5952
|
+
* * Support Questions, set with the [property@AboutDialog:support-url] property,
|
|
5953
|
+
* * Report an Issue, set with the [property@AboutDialog:issue-url] property.
|
|
5954
|
+
*
|
|
5955
|
+
* Additionally, applications can provide debugging information. It will be
|
|
5956
|
+
* shown separately on the Troubleshooting page. Use the
|
|
5957
|
+
* [property@AboutDialog:debug-info] property to specify it.
|
|
5958
|
+
*
|
|
5959
|
+
* It's intended to be attached to issue reports when reporting issues against
|
|
5960
|
+
* the application. As such, it cannot contain markup or links.
|
|
5961
|
+
*
|
|
5962
|
+
* `AdwAboutDialog` provides a quick way to save debug information to a file.
|
|
5963
|
+
* When saving, [property@AboutDialog:debug-info-filename] would be used as
|
|
5964
|
+
* the suggested filename.
|
|
5965
|
+
*
|
|
5966
|
+
* ## Credits and Acknowledgements
|
|
5967
|
+
*
|
|
5968
|
+
* The Credits page has the following default sections:
|
|
5969
|
+
*
|
|
5970
|
+
* * Developers, set with the [property@AboutDialog:developers] property,
|
|
5971
|
+
* * Designers, set with the [property@AboutDialog:designers] property,
|
|
5972
|
+
* * Artists, set with the [property@AboutDialog:artists] property,
|
|
5973
|
+
* * Documenters, set with the [property@AboutDialog:documenters] property,
|
|
5974
|
+
* * Translators, set with the [property@AboutDialog:translator-credits] property.
|
|
5975
|
+
*
|
|
5976
|
+
* When setting translator credits, use the strings `"translator-credits"` or
|
|
5977
|
+
* `"translator_credits"` and mark them as translatable.
|
|
5978
|
+
*
|
|
5979
|
+
* The default sections that don't contain any names won't be displayed.
|
|
5980
|
+
*
|
|
5981
|
+
* The Credits page can also contain an arbitrary number of extra sections below
|
|
5982
|
+
* the default ones. Use [method@AboutDialog.add_credit_section] to add them.
|
|
5983
|
+
*
|
|
5984
|
+
* The Acknowledgements page can be used to acknowledge additional people and
|
|
5985
|
+
* organizations for their non-development contributions. Use
|
|
5986
|
+
* [method@AboutDialog.add_acknowledgement_section] to add sections to it. For
|
|
5987
|
+
* example, it can be used to list backers in a crowdfunded project or to give
|
|
5988
|
+
* special thanks.
|
|
5989
|
+
*
|
|
5990
|
+
* Each of the people or organizations can have an email address or a website
|
|
5991
|
+
* specified. To add a email address, use a string like
|
|
5992
|
+
* `Edgar Allan Poe <edgar@poe.com>`. To specify a website with a title, use a
|
|
5993
|
+
* string like `The GNOME Project https://www.gnome.org`:
|
|
5994
|
+
*
|
|
5995
|
+
*
|
|
5996
|
+
*
|
|
5997
|
+
* ## Legal
|
|
5998
|
+
*
|
|
5999
|
+
* The Legal page displays the copyright and licensing information for the
|
|
6000
|
+
* application and other modules.
|
|
6001
|
+
*
|
|
6002
|
+
* The copyright string is set with the [property@AboutDialog:copyright]
|
|
6003
|
+
* property and should be a short string of one or two lines, for example:
|
|
6004
|
+
* `© 2022 Example`.
|
|
6005
|
+
*
|
|
6006
|
+
* Licensing information can be quickly set from a list of known licenses with
|
|
6007
|
+
* the [property@AboutDialog:license-type] property. If the application's
|
|
6008
|
+
* license is not in the list, [property@AboutDialog:license] can be used
|
|
6009
|
+
* instead.
|
|
6010
|
+
*
|
|
6011
|
+
* To add information about other modules, such as application dependencies or
|
|
6012
|
+
* data, use [method@AboutDialog.add_legal_section].
|
|
6013
|
+
*
|
|
6014
|
+
* ## Other applications
|
|
6015
|
+
*
|
|
6016
|
+
* `AdwAboutDialog` can show links to your other apps at the end of the main
|
|
6017
|
+
* page. To add them, use [method@AboutDialog.add_other_app].
|
|
6018
|
+
*
|
|
6019
|
+
* ## Constructing
|
|
6020
|
+
*
|
|
6021
|
+
* To make constructing an `AdwAboutDialog` as convenient as possible, you can
|
|
6022
|
+
* use the function [func@show_about_dialog] which constructs and shows a
|
|
6023
|
+
* dialog.
|
|
6024
|
+
*
|
|
6025
|
+
* ```c
|
|
6026
|
+
* static void
|
|
6027
|
+
* show_about (GtkApplication *app)
|
|
6028
|
+
* {
|
|
6029
|
+
* const char *developers[] = {
|
|
6030
|
+
* "Angela Avery",
|
|
6031
|
+
* NULL
|
|
6032
|
+
* };
|
|
6033
|
+
*
|
|
6034
|
+
* const char *designers[] = {
|
|
6035
|
+
* "GNOME Design Team",
|
|
6036
|
+
* NULL
|
|
6037
|
+
* };
|
|
6038
|
+
*
|
|
6039
|
+
* adw_show_about_dialog (GTK_WIDGET (gtk_application_get_active_window (app)),
|
|
6040
|
+
* "application-name", _("Example"),
|
|
6041
|
+
* "application-icon", "org.example.App",
|
|
6042
|
+
* "version", "1.2.3",
|
|
6043
|
+
* "copyright", "© 2022 Angela Avery",
|
|
6044
|
+
* "issue-url", "https://gitlab.gnome.org/example/example/-/issues/",
|
|
6045
|
+
* "license-type", GTK_LICENSE_GPL_3_0,
|
|
6046
|
+
* "developers", developers,
|
|
6047
|
+
* "designers", designers,
|
|
6048
|
+
* "translator-credits", _("translator-credits"),
|
|
6049
|
+
* NULL);
|
|
6050
|
+
* }
|
|
6051
|
+
* ```
|
|
6052
|
+
*
|
|
6053
|
+
* ## CSS nodes
|
|
6054
|
+
*
|
|
6055
|
+
* `AdwAboutDialog` has a main CSS node with the name `dialog` and the
|
|
6056
|
+
* style class `.about`.
|
|
6057
|
+
*/
|
|
6058
|
+
export const AdwAboutDialog = "AdwAboutDialog";
|
|
6059
|
+
/**
|
|
6060
|
+
* A window showing information about the application.
|
|
6061
|
+
*
|
|
6062
|
+
*
|
|
6063
|
+
*
|
|
6064
|
+
* An about window is typically opened when the user activates the `About …`
|
|
6065
|
+
* item in the application's primary menu. All parts of the window are optional.
|
|
6066
|
+
*
|
|
6067
|
+
* ## Main page
|
|
6068
|
+
*
|
|
6069
|
+
* `AdwAboutWindow` prominently displays the application's icon, name, developer
|
|
6070
|
+
* name and version. They can be set with the [property@AboutWindow:application-icon],
|
|
6071
|
+
* [property@AboutWindow:application-name],
|
|
6072
|
+
* [property@AboutWindow:developer-name] and [property@AboutWindow:version]
|
|
6073
|
+
* respectively.
|
|
6074
|
+
*
|
|
6075
|
+
* ## What's New
|
|
6076
|
+
*
|
|
6077
|
+
* `AdwAboutWindow` provides a way for applications to display their release
|
|
6078
|
+
* notes, set with the [property@AboutWindow:release-notes] property.
|
|
6079
|
+
*
|
|
6080
|
+
* Release notes are formatted the same way as
|
|
6081
|
+
* AppStream descriptions.
|
|
6082
|
+
*
|
|
6083
|
+
* The supported formatting options are:
|
|
6084
|
+
*
|
|
6085
|
+
* * Paragraph (`<p>`)
|
|
6086
|
+
* * Ordered list (`<ol>`), with list items (`<li>`)
|
|
6087
|
+
* * Unordered list (`<ul>`), with list items (`<li>`)
|
|
6088
|
+
*
|
|
6089
|
+
* Within paragraphs and list items, emphasis (`<em>`) and inline code
|
|
6090
|
+
* (`<code>`) text styles are supported. The emphasis is rendered in italic,
|
|
6091
|
+
* while inline code is shown in a monospaced font.
|
|
6092
|
+
*
|
|
6093
|
+
* Any text outside paragraphs or list items is ignored.
|
|
6094
|
+
*
|
|
6095
|
+
* Nested lists are not supported.
|
|
6096
|
+
*
|
|
6097
|
+
* Only one version can be shown at a time. By default, the displayed version
|
|
6098
|
+
* number matches [property@AboutWindow:version]. Use
|
|
6099
|
+
* [property@AboutWindow:release-notes-version] to override it.
|
|
6100
|
+
*
|
|
6101
|
+
* ## Details
|
|
6102
|
+
*
|
|
6103
|
+
* The Details page displays the application comments and links.
|
|
6104
|
+
*
|
|
6105
|
+
* The comments can be set with the [property@AboutWindow:comments] property.
|
|
6106
|
+
* Unlike [property@Gtk.AboutDialog:comments], this string can be long and
|
|
6107
|
+
* detailed. It can also contain links and Pango markup.
|
|
6108
|
+
*
|
|
6109
|
+
* To set the application website, use [property@AboutWindow:website].
|
|
6110
|
+
* To add extra links below the website, use [method@AboutWindow.add_link].
|
|
6111
|
+
*
|
|
6112
|
+
* If the Details page doesn't have any other content besides website, the
|
|
6113
|
+
* website will be displayed on the main page instead.
|
|
6114
|
+
*
|
|
6115
|
+
* ## Troubleshooting
|
|
6116
|
+
*
|
|
6117
|
+
* `AdwAboutWindow` displays the following two links on the main page:
|
|
6118
|
+
*
|
|
6119
|
+
* * Support Questions, set with the [property@AboutWindow:support-url] property,
|
|
6120
|
+
* * Report an Issue, set with the [property@AboutWindow:issue-url] property.
|
|
6121
|
+
*
|
|
6122
|
+
* Additionally, applications can provide debugging information. It will be
|
|
6123
|
+
* shown separately on the Troubleshooting page. Use the
|
|
6124
|
+
* [property@AboutWindow:debug-info] property to specify it.
|
|
6125
|
+
*
|
|
6126
|
+
* It's intended to be attached to issue reports when reporting issues against
|
|
6127
|
+
* the application. As such, it cannot contain markup or links.
|
|
6128
|
+
*
|
|
6129
|
+
* `AdwAboutWindow` provides a quick way to save debug information to a file.
|
|
6130
|
+
* When saving, [property@AboutWindow:debug-info-filename] would be used as
|
|
6131
|
+
* the suggested filename.
|
|
6132
|
+
*
|
|
6133
|
+
* ## Credits and Acknowledgements
|
|
6134
|
+
*
|
|
6135
|
+
* The Credits page has the following default sections:
|
|
6136
|
+
*
|
|
6137
|
+
* * Developers, set with the [property@AboutWindow:developers] property,
|
|
6138
|
+
* * Designers, set with the [property@AboutWindow:designers] property,
|
|
6139
|
+
* * Artists, set with the [property@AboutWindow:artists] property,
|
|
6140
|
+
* * Documenters, set with the [property@AboutWindow:documenters] property,
|
|
6141
|
+
* * Translators, set with the [property@AboutWindow:translator-credits] property.
|
|
6142
|
+
*
|
|
6143
|
+
* When setting translator credits, use the strings `"translator-credits"` or
|
|
6144
|
+
* `"translator_credits"` and mark them as translatable.
|
|
6145
|
+
*
|
|
6146
|
+
* The default sections that don't contain any names won't be displayed.
|
|
6147
|
+
*
|
|
6148
|
+
* The Credits page can also contain an arbitrary number of extra sections below
|
|
6149
|
+
* the default ones. Use [method@AboutWindow.add_credit_section] to add them.
|
|
6150
|
+
*
|
|
6151
|
+
* The Acknowledgements page can be used to acknowledge additional people and
|
|
6152
|
+
* organizations for their non-development contributions. Use
|
|
6153
|
+
* [method@AboutWindow.add_acknowledgement_section] to add sections to it. For
|
|
6154
|
+
* example, it can be used to list backers in a crowdfunded project or to give
|
|
6155
|
+
* special thanks.
|
|
6156
|
+
*
|
|
6157
|
+
* Each of the people or organizations can have an email address or a website
|
|
6158
|
+
* specified. To add a email address, use a string like
|
|
6159
|
+
* `Edgar Allan Poe <edgar@poe.com>`. To specify a website with a title, use a
|
|
6160
|
+
* string like `The GNOME Project https://www.gnome.org`:
|
|
6161
|
+
*
|
|
6162
|
+
*
|
|
6163
|
+
*
|
|
6164
|
+
* ## Legal
|
|
6165
|
+
*
|
|
6166
|
+
* The Legal page displays the copyright and licensing information for the
|
|
6167
|
+
* application and other modules.
|
|
6168
|
+
*
|
|
6169
|
+
* The copyright string is set with the [property@AboutWindow:copyright]
|
|
6170
|
+
* property and should be a short string of one or two lines, for example:
|
|
6171
|
+
* `© 2022 Example`.
|
|
6172
|
+
*
|
|
6173
|
+
* Licensing information can be quickly set from a list of known licenses with
|
|
6174
|
+
* the [property@AboutWindow:license-type] property. If the application's
|
|
6175
|
+
* license is not in the list, [property@AboutWindow:license] can be used
|
|
6176
|
+
* instead.
|
|
6177
|
+
*
|
|
6178
|
+
* To add information about other modules, such as application dependencies or
|
|
6179
|
+
* data, use [method@AboutWindow.add_legal_section].
|
|
6180
|
+
*
|
|
6181
|
+
* ## Constructing
|
|
6182
|
+
*
|
|
6183
|
+
* To make constructing an `AdwAboutWindow` as convenient as possible, you can
|
|
6184
|
+
* use the function [func@show_about_window] which constructs and shows a
|
|
6185
|
+
* window.
|
|
6186
|
+
*
|
|
6187
|
+
* ```c
|
|
6188
|
+
* static void
|
|
6189
|
+
* show_about (GtkApplication *app)
|
|
6190
|
+
* {
|
|
6191
|
+
* const char *developers[] = {
|
|
6192
|
+
* "Angela Avery",
|
|
6193
|
+
* NULL
|
|
6194
|
+
* };
|
|
6195
|
+
*
|
|
6196
|
+
* const char *designers[] = {
|
|
6197
|
+
* "GNOME Design Team",
|
|
6198
|
+
* NULL
|
|
6199
|
+
* };
|
|
6200
|
+
*
|
|
6201
|
+
* adw_show_about_window (gtk_application_get_active_window (app),
|
|
6202
|
+
* "application-name", _("Example"),
|
|
6203
|
+
* "application-icon", "org.example.App",
|
|
6204
|
+
* "version", "1.2.3",
|
|
6205
|
+
* "copyright", "© 2022 Angela Avery",
|
|
6206
|
+
* "issue-url", "https://gitlab.gnome.org/example/example/-/issues/",
|
|
6207
|
+
* "license-type", GTK_LICENSE_GPL_3_0,
|
|
6208
|
+
* "developers", developers,
|
|
6209
|
+
* "designers", designers,
|
|
6210
|
+
* "translator-credits", _("translator-credits"),
|
|
6211
|
+
* NULL);
|
|
6212
|
+
* }
|
|
6213
|
+
* ```
|
|
6214
|
+
*
|
|
6215
|
+
* ## CSS nodes
|
|
6216
|
+
*
|
|
6217
|
+
* `AdwAboutWindow` has a main CSS node with the name `window` and the
|
|
6218
|
+
* style class `.about`.
|
|
6219
|
+
*/
|
|
6220
|
+
export const AdwAboutWindow = "AdwAboutWindow";
|
|
6221
|
+
/**
|
|
6222
|
+
* A [class@Gtk.ListBoxRow] used to present actions.
|
|
6223
|
+
*
|
|
6224
|
+
*
|
|
6225
|
+
*
|
|
6226
|
+
* The `AdwActionRow` widget can have a title, a subtitle and an icon. The row
|
|
6227
|
+
* can receive additional widgets at its end, or prefix widgets at its start.
|
|
6228
|
+
*
|
|
6229
|
+
* It is convenient to present a preference and its related actions.
|
|
6230
|
+
*
|
|
6231
|
+
* `AdwActionRow` is unactivatable by default, giving it an activatable widget
|
|
6232
|
+
* will automatically make it activatable, but unsetting it won't change the
|
|
6233
|
+
* row's activatability.
|
|
6234
|
+
*
|
|
6235
|
+
* ## AdwActionRow as GtkBuildable
|
|
6236
|
+
*
|
|
6237
|
+
* The `AdwActionRow` implementation of the [iface@Gtk.Buildable] interface
|
|
6238
|
+
* supports adding a child at its end by specifying “suffix” or omitting the
|
|
6239
|
+
* “type” attribute of a `<child>` element.
|
|
6240
|
+
*
|
|
6241
|
+
* It also supports adding a child as a prefix widget by specifying “prefix” as
|
|
6242
|
+
* the “type” attribute of a `<child>` element.
|
|
6243
|
+
*
|
|
6244
|
+
* ## CSS nodes
|
|
6245
|
+
*
|
|
6246
|
+
* `AdwActionRow` has a main CSS node with name `row`.
|
|
6247
|
+
*
|
|
6248
|
+
* It contains the subnode `box.header` for its main horizontal box, and
|
|
6249
|
+
* `box.title` for the vertical box containing the title and subtitle labels.
|
|
6250
|
+
*
|
|
6251
|
+
* It contains subnodes `label.title` and `label.subtitle` representing
|
|
6252
|
+
* respectively the title label and subtitle label.
|
|
6253
|
+
*
|
|
6254
|
+
* ## Style classes
|
|
6255
|
+
*
|
|
6256
|
+
* `AdwActionRow` can use the `.property`
|
|
6257
|
+
* style class to emphasize the row subtitle instead of the row title, which is
|
|
6258
|
+
* useful for displaying read-only properties.
|
|
6259
|
+
*
|
|
6260
|
+
*
|
|
6261
|
+
*
|
|
6262
|
+
* When used together with the `.monospace` style class, only the subtitle
|
|
6263
|
+
* becomes monospace, not the title or any extra widgets.
|
|
6264
|
+
*/
|
|
6265
|
+
export const AdwActionRow = {
|
|
6266
|
+
Root: "AdwActionRow.Root",
|
|
6267
|
+
ActivatableWidget: "AdwActionRow.ActivatableWidget",
|
|
6268
|
+
};
|
|
6269
|
+
/**
|
|
6270
|
+
* A dialog presenting a message or a question.
|
|
6271
|
+
*
|
|
6272
|
+
*
|
|
6273
|
+
*
|
|
6274
|
+
* Alert dialogs have a heading, a body, an optional child widget, and one or
|
|
6275
|
+
* multiple responses, each presented as a button.
|
|
6276
|
+
*
|
|
6277
|
+
* Each response has a unique string ID, and a button label. Additionally, each
|
|
6278
|
+
* response can be enabled or disabled, and can have a suggested or destructive
|
|
6279
|
+
* appearance.
|
|
6280
|
+
*
|
|
6281
|
+
* When one of the responses is activated, or the dialog is closed, the
|
|
6282
|
+
* [signal@AlertDialog::response] signal will be emitted. This signal is
|
|
6283
|
+
* detailed, and the detail, as well as the `response` parameter will be set to
|
|
6284
|
+
* the ID of the activated response, or to the value of the
|
|
6285
|
+
* [property@AlertDialog:close-response] property if the dialog had been closed
|
|
6286
|
+
* without activating any of the responses.
|
|
6287
|
+
*
|
|
6288
|
+
* Response buttons can be presented horizontally or vertically depending on
|
|
6289
|
+
* available space.
|
|
6290
|
+
*
|
|
6291
|
+
* When a response is activated, `AdwAlertDialog` is closed automatically.
|
|
6292
|
+
*
|
|
6293
|
+
* An example of using an alert dialog:
|
|
6294
|
+
*
|
|
6295
|
+
* ```c
|
|
6296
|
+
* AdwDialog *dialog;
|
|
6297
|
+
*
|
|
6298
|
+
* dialog = adw_alert_dialog_new (_("Replace File?"), NULL);
|
|
6299
|
+
*
|
|
6300
|
+
* adw_alert_dialog_format_body (ADW_ALERT_DIALOG (dialog),
|
|
6301
|
+
* _("A file named “%s” already exists. Do you want to replace it?"),
|
|
6302
|
+
* filename);
|
|
6303
|
+
*
|
|
6304
|
+
* adw_alert_dialog_add_responses (ADW_ALERT_DIALOG (dialog),
|
|
6305
|
+
* "cancel", _("_Cancel"),
|
|
6306
|
+
* "replace", _("_Replace"),
|
|
6307
|
+
* NULL);
|
|
6308
|
+
*
|
|
6309
|
+
* adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dialog),
|
|
6310
|
+
* "replace",
|
|
6311
|
+
* ADW_RESPONSE_DESTRUCTIVE);
|
|
6312
|
+
*
|
|
6313
|
+
* adw_alert_dialog_set_default_response (ADW_ALERT_DIALOG (dialog), "cancel");
|
|
6314
|
+
* adw_alert_dialog_set_close_response (ADW_ALERT_DIALOG (dialog), "cancel");
|
|
6315
|
+
*
|
|
6316
|
+
* g_signal_connect (dialog, "response", G_CALLBACK (response_cb), self);
|
|
6317
|
+
*
|
|
6318
|
+
* adw_dialog_present (dialog, parent);
|
|
6319
|
+
* ```
|
|
6320
|
+
*
|
|
6321
|
+
* ## Async API
|
|
6322
|
+
*
|
|
6323
|
+
* `AdwAlertDialog` can also be used via the [method@AlertDialog.choose] method.
|
|
6324
|
+
* This API follows the GIO async pattern, for example:
|
|
6325
|
+
*
|
|
6326
|
+
* ```c
|
|
6327
|
+
* static void
|
|
6328
|
+
* dialog_cb (AdwAlertDialog *dialog,
|
|
6329
|
+
* GAsyncResult *result,
|
|
6330
|
+
* MyWindow *self)
|
|
6331
|
+
* {
|
|
6332
|
+
* const char *response = adw_alert_dialog_choose_finish (dialog, result);
|
|
6333
|
+
*
|
|
6334
|
+
* // ...
|
|
6335
|
+
* }
|
|
6336
|
+
*
|
|
6337
|
+
* static void
|
|
6338
|
+
* show_dialog (MyWindow *self)
|
|
6339
|
+
* {
|
|
6340
|
+
* AdwDialog *dialog;
|
|
6341
|
+
*
|
|
6342
|
+
* dialog = adw_alert_dialog_new (_("Replace File?"), NULL);
|
|
6343
|
+
*
|
|
6344
|
+
* adw_alert_dialog_format_body (ADW_ALERT_DIALOG (dialog),
|
|
6345
|
+
* _("A file named “%s” already exists. Do you want to replace it?"),
|
|
6346
|
+
* filename);
|
|
6347
|
+
*
|
|
6348
|
+
* adw_alert_dialog_add_responses (ADW_ALERT_DIALOG (dialog),
|
|
6349
|
+
* "cancel", _("_Cancel"),
|
|
6350
|
+
* "replace", _("_Replace"),
|
|
6351
|
+
* NULL);
|
|
6352
|
+
*
|
|
6353
|
+
* adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dialog),
|
|
6354
|
+
* "replace",
|
|
6355
|
+
* ADW_RESPONSE_DESTRUCTIVE);
|
|
6356
|
+
*
|
|
6357
|
+
* adw_alert_dialog_set_default_response (ADW_ALERT_DIALOG (dialog), "cancel");
|
|
6358
|
+
* adw_alert_dialog_set_close_response (ADW_ALERT_DIALOG (dialog), "cancel");
|
|
6359
|
+
*
|
|
6360
|
+
* adw_alert_dialog_choose (ADW_ALERT_DIALOG (dialog), GTK_WIDGET (self),
|
|
6361
|
+
* NULL, (GAsyncReadyCallback) dialog_cb, self);
|
|
6362
|
+
* }
|
|
6363
|
+
* ```
|
|
6364
|
+
*
|
|
6365
|
+
* ## AdwAlertDialog as GtkBuildable
|
|
6366
|
+
*
|
|
6367
|
+
* `AdwAlertDialog` supports adding responses in UI definitions by via the
|
|
6368
|
+
* `<responses>` element that may contain multiple `<response>` elements, each
|
|
6369
|
+
* representing a response.
|
|
6370
|
+
*
|
|
6371
|
+
* Each of the `<response>` elements must have the `id` attribute specifying the
|
|
6372
|
+
* response ID. The contents of the element are used as the response label.
|
|
6373
|
+
*
|
|
6374
|
+
* Response labels can be translated with the usual `translatable`, `context`
|
|
6375
|
+
* and `comments` attributes.
|
|
6376
|
+
*
|
|
6377
|
+
* The `<response>` elements can also have `enabled` and/or `appearance`
|
|
6378
|
+
* attributes. See [method@AlertDialog.set_response_enabled] and
|
|
6379
|
+
* [method@AlertDialog.set_response_appearance] for details.
|
|
6380
|
+
*
|
|
6381
|
+
* Example of an `AdwAlertDialog` UI definition:
|
|
6382
|
+
*
|
|
6383
|
+
* ```xml
|
|
6384
|
+
* <object class="AdwAlertDialog" id="dialog">
|
|
6385
|
+
* <property name="heading" translatable="yes">Save Changes?`</property>`
|
|
6386
|
+
* <property name="body" translatable="yes">Open documents contain unsaved changes. Changes which are not saved will be permanently lost.`</property>`
|
|
6387
|
+
* <property name="default-response">save`</property>`
|
|
6388
|
+
* <property name="close-response">cancel`</property>`
|
|
6389
|
+
* <signal name="response" handler="response_cb"/>
|
|
6390
|
+
* <responses>
|
|
6391
|
+
* <response id="cancel" translatable="yes">_Cancel</response>
|
|
6392
|
+
* <response id="discard" translatable="yes" appearance="destructive">_Discard</response>
|
|
6393
|
+
* <response id="save" translatable="yes" appearance="suggested" enabled="false">_Save</response>
|
|
6394
|
+
* </responses>
|
|
6395
|
+
* `</object>`
|
|
6396
|
+
* ```
|
|
6397
|
+
*/
|
|
6398
|
+
export const AdwAlertDialog = {
|
|
6399
|
+
Root: "AdwAlertDialog.Root",
|
|
6400
|
+
ExtraChild: "AdwAlertDialog.ExtraChild",
|
|
6401
|
+
};
|
|
6402
|
+
/**
|
|
6403
|
+
* A freeform application window.
|
|
6404
|
+
*
|
|
6405
|
+
*
|
|
6406
|
+
*
|
|
6407
|
+
* `AdwApplicationWindow` is a [class@Gtk.ApplicationWindow] subclass providing
|
|
6408
|
+
* the same features as [class@Window].
|
|
6409
|
+
*
|
|
6410
|
+
* See [class@Window] for details.
|
|
6411
|
+
*
|
|
6412
|
+
* Example of an `AdwApplicationWindow` UI definition:
|
|
6413
|
+
*
|
|
6414
|
+
* ```xml
|
|
6415
|
+
* <object class="AdwApplicationWindow">
|
|
6416
|
+
* <property name="content">
|
|
6417
|
+
* <object class="AdwToolbarView">
|
|
6418
|
+
* <child type="top">
|
|
6419
|
+
* <object class="AdwHeaderBar"/>
|
|
6420
|
+
* `</child>`
|
|
6421
|
+
* <property name="content">
|
|
6422
|
+
* <!-- ... -->
|
|
6423
|
+
* `</property>`
|
|
6424
|
+
* `</object>`
|
|
6425
|
+
* `</property>`
|
|
6426
|
+
* `</object>`
|
|
6427
|
+
* ```
|
|
6428
|
+
*
|
|
6429
|
+
* Using [property@Gtk.Application:menubar] is not supported and may result in
|
|
6430
|
+
* visual glitches.
|
|
6431
|
+
*/
|
|
6432
|
+
export const AdwApplicationWindow = {
|
|
6433
|
+
Root: "AdwApplicationWindow.Root",
|
|
6434
|
+
Content: "AdwApplicationWindow.Content",
|
|
6435
|
+
};
|
|
6436
|
+
/**
|
|
6437
|
+
* A widget displaying an image, with a generated fallback.
|
|
6438
|
+
*
|
|
6439
|
+
*
|
|
6440
|
+
*
|
|
6441
|
+
* `AdwAvatar` is a widget that shows a round avatar.
|
|
6442
|
+
*
|
|
6443
|
+
* `AdwAvatar` generates an avatar with the initials of the
|
|
6444
|
+
* [property@Avatar:text] on top of a colored background.
|
|
6445
|
+
*
|
|
6446
|
+
* The color is picked based on the hash of the [property@Avatar:text].
|
|
6447
|
+
*
|
|
6448
|
+
* If [property@Avatar:show-initials] is set to `FALSE`,
|
|
6449
|
+
* [property@Avatar:icon-name] or `avatar-default-symbolic` is shown instead of
|
|
6450
|
+
* the initials.
|
|
6451
|
+
*
|
|
6452
|
+
* Use [property@Avatar:custom-image] to set a custom image.
|
|
6453
|
+
*
|
|
6454
|
+
* ## CSS nodes
|
|
6455
|
+
*
|
|
6456
|
+
* `AdwAvatar` has a single CSS node with name `avatar`.
|
|
6457
|
+
*
|
|
6458
|
+
* ## Accessibility
|
|
6459
|
+
*
|
|
6460
|
+
* `AdwAvatar` uses the `GTK_ACCESSIBLE_ROLE_IMG` role.
|
|
6461
|
+
*/
|
|
6462
|
+
export const AdwAvatar = "AdwAvatar";
|
|
6463
|
+
/**
|
|
6464
|
+
* A bar with contextual information.
|
|
6465
|
+
*
|
|
6466
|
+
*
|
|
6467
|
+
*
|
|
6468
|
+
* Banners are hidden by default, use [property@Banner:revealed] to show them.
|
|
6469
|
+
*
|
|
6470
|
+
* Banners have a title, set with [property@Banner:title]. Titles can be marked
|
|
6471
|
+
* up with Pango markup, use [property@Banner:use-markup] to enable it.
|
|
6472
|
+
*
|
|
6473
|
+
* The title will be shown centered or left-aligned depending on available
|
|
6474
|
+
* space.
|
|
6475
|
+
*
|
|
6476
|
+
* Banners can optionally have a button with text on it, set through
|
|
6477
|
+
* [property@Banner:button-label]. The button can be used with a `GAction`,
|
|
6478
|
+
* or with the [signal@Banner::button-clicked] signal. The button can have
|
|
6479
|
+
* different styles, a gray style and a suggested style.
|
|
6480
|
+
*
|
|
6481
|
+
*
|
|
6482
|
+
*
|
|
6483
|
+
* ## CSS nodes
|
|
6484
|
+
*
|
|
6485
|
+
* `AdwBanner` has a main CSS node with the name `banner`.
|
|
6486
|
+
*/
|
|
6487
|
+
export const AdwBanner = "AdwBanner";
|
|
6488
|
+
/**
|
|
6489
|
+
* A widget with one child.
|
|
6490
|
+
*
|
|
6491
|
+
*
|
|
6492
|
+
*
|
|
6493
|
+
* The `AdwBin` widget has only one child, set with the [property@Bin:child]
|
|
6494
|
+
* property.
|
|
6495
|
+
*
|
|
6496
|
+
* It is useful for deriving subclasses, since it provides common code needed
|
|
6497
|
+
* for handling a single child widget.
|
|
6498
|
+
*/
|
|
6499
|
+
export const AdwBin = "AdwBin";
|
|
6500
|
+
/**
|
|
6501
|
+
* A bottom sheet with an optional bottom bar.
|
|
6502
|
+
*
|
|
6503
|
+
*
|
|
6504
|
+
*
|
|
6505
|
+
* `AdwBottomSheet` has three child widgets. [property@BottomSheet:content] is
|
|
6506
|
+
* shown persistently. [property@BottomSheet:sheet] is displayed above it when
|
|
6507
|
+
* it's open, and [property@BottomSheet:bottom-bar] is displayed when it's not.
|
|
6508
|
+
*
|
|
6509
|
+
* Bottom sheet and bottom bar are attached to the bottom edge of the widget.
|
|
6510
|
+
* They take the full width by default, but can only take a portion of it if
|
|
6511
|
+
* [property@BottomSheet:full-width] is set to `FALSE`. In this case,
|
|
6512
|
+
* [property@BottomSheet:align] determines where along the bottom edge they are
|
|
6513
|
+
* placed.
|
|
6514
|
+
*
|
|
6515
|
+
* Bottom bar can be hidden using the [property@BottomSheet:reveal-bottom-bar]
|
|
6516
|
+
* property.
|
|
6517
|
+
*
|
|
6518
|
+
* `AdwBottomSheet` can be useful for applications such as music players, that
|
|
6519
|
+
* want to have a persistent bottom bar that expands into a bottom sheet when
|
|
6520
|
+
* clicked. It's meant for cases where a bottom sheet is tightly integrated into
|
|
6521
|
+
* the UI. For more transient bottom sheets, see [class@Dialog].
|
|
6522
|
+
*
|
|
6523
|
+
* To open or close the bottom sheet, use the [property@BottomSheet:open]
|
|
6524
|
+
* property.
|
|
6525
|
+
*
|
|
6526
|
+
* By default, the bottom sheet has an overlaid drag handle. It can be disabled
|
|
6527
|
+
* by setting [property@BottomSheet:show-drag-handle] to `FALSE`. Note that the
|
|
6528
|
+
* handle also controls whether the sheet can be dragged using a pointer.
|
|
6529
|
+
*
|
|
6530
|
+
* Bottom sheets are modal by default, meaning that the content is dimmed and
|
|
6531
|
+
* cannot be accessed while the sheet is open. Set [property@BottomSheet:modal]
|
|
6532
|
+
* to `FALSE` if this behavior is unwanted.
|
|
6533
|
+
*
|
|
6534
|
+
* To disable user interactions for opening or closing the bottom sheet (such as
|
|
6535
|
+
* swipes or clicking the bottom bar or close button), set
|
|
6536
|
+
* [property@BottomSheet:can-open] or [property@BottomSheet:can-close] to
|
|
6537
|
+
* `FALSE`.
|
|
6538
|
+
*
|
|
6539
|
+
* In some cases, particularly when using a full-width bottom bar, it may be
|
|
6540
|
+
* necessary to shift [property@BottomSheet:content] upwards. Use the
|
|
6541
|
+
* [property@BottomSheet:bottom-bar-height] and
|
|
6542
|
+
* [property@BottomSheet:sheet-height] for that.
|
|
6543
|
+
*
|
|
6544
|
+
* `AdwBottomSheet` is not adaptive, and for larger window sizes applications
|
|
6545
|
+
* may want to replace it with another UI, such as a sidebar. This can be done
|
|
6546
|
+
* using [class@MultiLayoutView].
|
|
6547
|
+
*
|
|
6548
|
+
* ## Sizing
|
|
6549
|
+
*
|
|
6550
|
+
* Unlike [class@Dialog] presented as a bottom sheet, `AdwBottomSheet` just
|
|
6551
|
+
* follows the content's natural size, and it's up to the applications to make
|
|
6552
|
+
* sure their content provides one. For example, when using
|
|
6553
|
+
* [class@Gtk.ScrolledWindow], make sure to set
|
|
6554
|
+
* [property@Gtk.ScrolledWindow:propagate-natural-height] to `TRUE`.
|
|
6555
|
+
*
|
|
6556
|
+
* ## Header Bar Integration
|
|
6557
|
+
*
|
|
6558
|
+
* When placed inside an `AdwBottomSheet`, [class@HeaderBar] will not show the
|
|
6559
|
+
* title when [property@BottomSheet:show-drag-handle] is `TRUE`, regardless of
|
|
6560
|
+
* [property@HeaderBar:show-title]. This only applies to the default title,
|
|
6561
|
+
* titles set with [property@HeaderBar:title-widget] will still be shown.
|
|
6562
|
+
*
|
|
6563
|
+
* ## `AdwBottomSheet` as `GtkBuildable`:
|
|
6564
|
+
*
|
|
6565
|
+
* The `AdwBottomSheet` implementation of the [iface@Gtk.Buildable] interface
|
|
6566
|
+
* supports setting the sheet widget by specifying “sheet” as the “type”
|
|
6567
|
+
* attribute of a ``<child>`` element, and the bottom bar by specifying
|
|
6568
|
+
* “bottom-bar”. Specifying “content” or omitting the child type results in
|
|
6569
|
+
* setting the content child.
|
|
6570
|
+
*/
|
|
6571
|
+
export const AdwBottomSheet = {
|
|
6572
|
+
Root: "AdwBottomSheet.Root",
|
|
6573
|
+
BottomBar: "AdwBottomSheet.BottomBar",
|
|
6574
|
+
Content: "AdwBottomSheet.Content",
|
|
6575
|
+
Sheet: "AdwBottomSheet.Sheet",
|
|
6576
|
+
};
|
|
6577
|
+
/**
|
|
6578
|
+
* A widget that changes layout based on available size.
|
|
6579
|
+
*
|
|
6580
|
+
*
|
|
6581
|
+
*
|
|
6582
|
+
* `AdwBreakpointBin` provides a way to use breakpoints without [class@Window],
|
|
6583
|
+
* [class@ApplicationWindow] or [class@Dialog]. It can be useful for limiting
|
|
6584
|
+
* breakpoints to a single page and similar purposes. Most applications
|
|
6585
|
+
* shouldn't need it.
|
|
6586
|
+
*
|
|
6587
|
+
* `AdwBreakpointBin` is similar to [class@Bin]. It has one child, set via the
|
|
6588
|
+
* [property@BreakpointBin:child] property.
|
|
6589
|
+
*
|
|
6590
|
+
* When `AdwBreakpointBin` is resized, its child widget can rearrange its layout
|
|
6591
|
+
* at specific thresholds.
|
|
6592
|
+
*
|
|
6593
|
+
* The thresholds and layout changes are defined via [class@Breakpoint] objects.
|
|
6594
|
+
* They can be added using [method@BreakpointBin.add_breakpoint].
|
|
6595
|
+
*
|
|
6596
|
+
* Each breakpoint has a condition, specifying the bin's size and/or aspect
|
|
6597
|
+
* ratio, and setters that automatically set object properties when that
|
|
6598
|
+
* happens. The [signal@Breakpoint::apply] and [signal@Breakpoint::unapply] can
|
|
6599
|
+
* be used instead for more complex scenarios.
|
|
6600
|
+
*
|
|
6601
|
+
* Breakpoints are only allowed to modify widgets inside the `AdwBreakpointBin`,
|
|
6602
|
+
* but not on the `AdwBreakpointBin` itself or any other widgets.
|
|
6603
|
+
*
|
|
6604
|
+
* If multiple breakpoints can be used for the current size, the last one is
|
|
6605
|
+
* always picked. The current breakpoint can be tracked using the
|
|
6606
|
+
* [property@BreakpointBin:current-breakpoint] property.
|
|
6607
|
+
*
|
|
6608
|
+
* If none of the breakpoints can be used, that property will be set to `NULL`,
|
|
6609
|
+
* and the original property values will be used instead.
|
|
6610
|
+
*
|
|
6611
|
+
* ## Minimum Size
|
|
6612
|
+
*
|
|
6613
|
+
* Adding a breakpoint to `AdwBreakpointBin` will result in it having no minimum
|
|
6614
|
+
* size. The [property@Gtk.Widget:width-request] and
|
|
6615
|
+
* [property@Gtk.Widget:height-request] properties must always be set when using
|
|
6616
|
+
* breakpoints, indicating the smallest size you want to support.
|
|
6617
|
+
*
|
|
6618
|
+
* The minimum size and breakpoint conditions must be carefully selected so that
|
|
6619
|
+
* the child widget completely fits. If it doesn't, it will overflow and a
|
|
6620
|
+
* warning message will be printed.
|
|
6621
|
+
*
|
|
6622
|
+
* When choosing minimum size, consider translations and text scale factor
|
|
6623
|
+
* changes. Make sure to leave enough space for text labels, and enable
|
|
6624
|
+
* ellipsizing or wrapping if they might not fit.
|
|
6625
|
+
*
|
|
6626
|
+
* For [class@Gtk.Label] this can be done via [property@Gtk.Label:ellipsize], or
|
|
6627
|
+
* via [property@Gtk.Label:wrap] together with [property@Gtk.Label:wrap-mode].
|
|
6628
|
+
*
|
|
6629
|
+
* For buttons, use [property@Gtk.Button:can-shrink],
|
|
6630
|
+
* [property@Gtk.MenuButton:can-shrink], [property@Adw.SplitButton:can-shrink],
|
|
6631
|
+
* or [property@Adw.ButtonContent:can-shrink].
|
|
6632
|
+
*
|
|
6633
|
+
* ## Example
|
|
6634
|
+
*
|
|
6635
|
+
* ```c
|
|
6636
|
+
* GtkWidget *bin, *child;
|
|
6637
|
+
* AdwBreakpoint *breakpoint;
|
|
6638
|
+
*
|
|
6639
|
+
* bin = adw_breakpoint_bin_new ();
|
|
6640
|
+
* gtk_widget_set_size_request (bin, 150, 150);
|
|
6641
|
+
*
|
|
6642
|
+
* child = gtk_label_new ("Wide");
|
|
6643
|
+
* gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
|
|
6644
|
+
* gtk_widget_add_css_class (child, "title-1");
|
|
6645
|
+
* adw_breakpoint_bin_set_child (ADW_BREAKPOINT_BIN (bin), child);
|
|
6646
|
+
*
|
|
6647
|
+
* breakpoint = adw_breakpoint_new (adw_breakpoint_condition_parse ("max-width: 200px"));
|
|
6648
|
+
* adw_breakpoint_add_setters (breakpoint,
|
|
6649
|
+
* G_OBJECT (child), "label", "Narrow",
|
|
6650
|
+
* NULL);
|
|
6651
|
+
* adw_breakpoint_bin_add_breakpoint (ADW_BREAKPOINT_BIN (bin), breakpoint);
|
|
6652
|
+
* ```
|
|
6653
|
+
*
|
|
6654
|
+
* The bin has a single label inside it, displaying "Wide". When the bin's width
|
|
6655
|
+
* is smaller than or equal to 200px, it changes to "Narrow".
|
|
6656
|
+
*
|
|
6657
|
+
* ## `AdwBreakpointBin` as `GtkBuildable`
|
|
6658
|
+
*
|
|
6659
|
+
* `AdwBreakpointBin` allows adding `AdwBreakpoint` objects as children.
|
|
6660
|
+
*
|
|
6661
|
+
* Example of an `AdwBreakpointBin` UI definition:
|
|
6662
|
+
*
|
|
6663
|
+
* ```xml
|
|
6664
|
+
* <object class="AdwBreakpointBin">
|
|
6665
|
+
* <property name="width-request">150`</property>`
|
|
6666
|
+
* <property name="height-request">150`</property>`
|
|
6667
|
+
* <property name="child">
|
|
6668
|
+
* <object class="GtkLabel" id="child">
|
|
6669
|
+
* <property name="label">Wide`</property>`
|
|
6670
|
+
* <property name="ellipsize">end`</property>`
|
|
6671
|
+
* <style>
|
|
6672
|
+
* <class name="title-1"/>
|
|
6673
|
+
* </style>
|
|
6674
|
+
* `</object>`
|
|
6675
|
+
* `</property>`
|
|
6676
|
+
* `<child>`
|
|
6677
|
+
* <object class="AdwBreakpoint">
|
|
6678
|
+
* <condition>max-width: 200px</condition>
|
|
6679
|
+
* <setter object="child" property="label">Narrow</setter>
|
|
6680
|
+
* `</object>`
|
|
6681
|
+
* `</child>`
|
|
6682
|
+
* `</object>`
|
|
6683
|
+
* ```
|
|
6684
|
+
*
|
|
6685
|
+
* See [class@Breakpoint] documentation for details.
|
|
6686
|
+
*/
|
|
6687
|
+
export const AdwBreakpointBin = "AdwBreakpointBin";
|
|
6688
|
+
/**
|
|
6689
|
+
* A helper widget for creating buttons.
|
|
6690
|
+
*
|
|
6691
|
+
*
|
|
6692
|
+
*
|
|
6693
|
+
* `AdwButtonContent` is a box-like widget with an icon and a label.
|
|
6694
|
+
*
|
|
6695
|
+
* It's intended to be used as a direct child of [class@Gtk.Button],
|
|
6696
|
+
* [class@Gtk.MenuButton] or [class@SplitButton], when they need to have both an
|
|
6697
|
+
* icon and a label, as follows:
|
|
6698
|
+
*
|
|
6699
|
+
* ```xml
|
|
6700
|
+
* <object class="GtkButton">
|
|
6701
|
+
* <property name="child">
|
|
6702
|
+
* <object class="AdwButtonContent">
|
|
6703
|
+
* <property name="icon-name">document-open-symbolic`</property>`
|
|
6704
|
+
* <property name="label" translatable="yes">_Open`</property>`
|
|
6705
|
+
* <property name="use-underline">True`</property>`
|
|
6706
|
+
* `</object>`
|
|
6707
|
+
* `</property>`
|
|
6708
|
+
* `</object>`
|
|
6709
|
+
* ```
|
|
6710
|
+
*
|
|
6711
|
+
* `AdwButtonContent` handles style classes and connecting the mnemonic to the
|
|
6712
|
+
* button automatically.
|
|
6713
|
+
*
|
|
6714
|
+
* ## CSS nodes
|
|
6715
|
+
*
|
|
6716
|
+
* ```
|
|
6717
|
+
* buttoncontent
|
|
6718
|
+
* ╰── box
|
|
6719
|
+
* ├── image
|
|
6720
|
+
* ╰── label
|
|
6721
|
+
* ```
|
|
6722
|
+
*
|
|
6723
|
+
* `AdwButtonContent`'s CSS node is called `buttoncontent`. It contains a `box`
|
|
6724
|
+
* subnode that serves as a container for the `image` and `label` nodes.
|
|
6725
|
+
*
|
|
6726
|
+
* When inside a `GtkButton` or `AdwSplitButton`, the button will receive the
|
|
6727
|
+
* `.image-text-button` style class. When inside a `GtkMenuButton`, the
|
|
6728
|
+
* internal `GtkButton` will receive it instead.
|
|
6729
|
+
*
|
|
6730
|
+
* ## Accessibility
|
|
6731
|
+
*
|
|
6732
|
+
* `AdwButtonContent` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
6733
|
+
*/
|
|
6734
|
+
export const AdwButtonContent = "AdwButtonContent";
|
|
6735
|
+
/**
|
|
6736
|
+
* A [class@Gtk.ListBoxRow] that looks like a button.
|
|
6737
|
+
*
|
|
6738
|
+
*
|
|
6739
|
+
*
|
|
6740
|
+
* The `AdwButtonRow` widget has a title and two icons: before and after the
|
|
6741
|
+
* title.
|
|
6742
|
+
*
|
|
6743
|
+
* It is convenient for presenting actions like "Delete" at the end of a boxed
|
|
6744
|
+
* list.
|
|
6745
|
+
*
|
|
6746
|
+
* `AdwButtonRow` is always activatable.
|
|
6747
|
+
*
|
|
6748
|
+
* ## CSS nodes
|
|
6749
|
+
*
|
|
6750
|
+
* `AdwButtonRow` has a main CSS node with name `row` and the style class
|
|
6751
|
+
* `.button`.
|
|
6752
|
+
*
|
|
6753
|
+
* It contains the subnode `box` for its main horizontal box, which contains the
|
|
6754
|
+
* nodes: `image.icon.start` for the start icon, `label.title` for the title,
|
|
6755
|
+
* and `image.icon.end` for the end icon.
|
|
6756
|
+
*
|
|
6757
|
+
* ## Style classes
|
|
6758
|
+
*
|
|
6759
|
+
* The `.suggested-action` style class
|
|
6760
|
+
* makes `AdwButtonRow` use accent color for its background. It should be used
|
|
6761
|
+
* very sparingly to denote important buttons.
|
|
6762
|
+
*
|
|
6763
|
+
*
|
|
6764
|
+
*
|
|
6765
|
+
* The `.destructive-action` style
|
|
6766
|
+
* makes the row use destructive colors. It can be used to draw attention to the
|
|
6767
|
+
* potentially damaging consequences of using it. This style acts as a warning
|
|
6768
|
+
* to the user.
|
|
6769
|
+
*/
|
|
6770
|
+
export const AdwButtonRow = "AdwButtonRow";
|
|
6771
|
+
/**
|
|
6772
|
+
* A paginated scrolling widget.
|
|
6773
|
+
*
|
|
6774
|
+
*
|
|
6775
|
+
*
|
|
6776
|
+
* The `AdwCarousel` widget can be used to display a set of pages with
|
|
6777
|
+
* swipe-based navigation between them.
|
|
6778
|
+
*
|
|
6779
|
+
* [class@CarouselIndicatorDots] and [class@CarouselIndicatorLines] can be used
|
|
6780
|
+
* to provide page indicators for `AdwCarousel`.
|
|
6781
|
+
*
|
|
6782
|
+
* ## CSS nodes
|
|
6783
|
+
*
|
|
6784
|
+
* `AdwCarousel` has a single CSS node with name `carousel`.
|
|
6785
|
+
*/
|
|
6786
|
+
export const AdwCarousel = "AdwCarousel";
|
|
6787
|
+
/**
|
|
6788
|
+
* A dots indicator for [class@Carousel].
|
|
6789
|
+
*
|
|
6790
|
+
*
|
|
6791
|
+
*
|
|
6792
|
+
* The `AdwCarouselIndicatorDots` widget shows a set of dots for each page of a
|
|
6793
|
+
* given [class@Carousel]. The dot representing the carousel's active page is
|
|
6794
|
+
* larger and more opaque than the others, the transition to the active and
|
|
6795
|
+
* inactive state is gradual to match the carousel's position.
|
|
6796
|
+
*
|
|
6797
|
+
* See also [class@CarouselIndicatorLines].
|
|
6798
|
+
*
|
|
6799
|
+
* ## CSS nodes
|
|
6800
|
+
*
|
|
6801
|
+
* `AdwCarouselIndicatorDots` has a single CSS node with name
|
|
6802
|
+
* `carouselindicatordots`.
|
|
6803
|
+
*/
|
|
6804
|
+
export const AdwCarouselIndicatorDots = "AdwCarouselIndicatorDots";
|
|
6805
|
+
/**
|
|
6806
|
+
* A lines indicator for [class@Carousel].
|
|
6807
|
+
*
|
|
6808
|
+
*
|
|
6809
|
+
*
|
|
6810
|
+
* The `AdwCarouselIndicatorLines` widget shows a set of lines for each page of
|
|
6811
|
+
* a given [class@Carousel]. The carousel's active page is shown as another line
|
|
6812
|
+
* that moves between them to match the carousel's position.
|
|
6813
|
+
*
|
|
6814
|
+
* See also [class@CarouselIndicatorDots].
|
|
6815
|
+
*
|
|
6816
|
+
* ## CSS nodes
|
|
6817
|
+
*
|
|
6818
|
+
* `AdwCarouselIndicatorLines` has a single CSS node with name
|
|
6819
|
+
* `carouselindicatorlines`.
|
|
6820
|
+
*/
|
|
6821
|
+
export const AdwCarouselIndicatorLines = "AdwCarouselIndicatorLines";
|
|
6822
|
+
/**
|
|
6823
|
+
* A widget constraining its child to a given size.
|
|
6824
|
+
*
|
|
6825
|
+
*
|
|
6826
|
+
*
|
|
6827
|
+
*
|
|
6828
|
+
* The `AdwClamp` widget constrains the size of the widget it contains to a
|
|
6829
|
+
* given maximum size. It will constrain the width if it is horizontal, or the
|
|
6830
|
+
* height if it is vertical. The expansion of the child from its minimum to its
|
|
6831
|
+
* maximum size is eased out for a smooth transition.
|
|
6832
|
+
*
|
|
6833
|
+
* If the child requires more than the requested maximum size, it will be
|
|
6834
|
+
* allocated the minimum size it can fit in instead.
|
|
6835
|
+
*
|
|
6836
|
+
* `AdwClamp` can scale with the text scale factor, use the
|
|
6837
|
+
* [property@Clamp:unit] property to enable that behavior.
|
|
6838
|
+
*
|
|
6839
|
+
* See also: [class@ClampLayout], [class@ClampScrollable].
|
|
6840
|
+
*
|
|
6841
|
+
* ## CSS nodes
|
|
6842
|
+
*
|
|
6843
|
+
* `AdwClamp` has a single CSS node with name `clamp`.
|
|
6844
|
+
*/
|
|
6845
|
+
export const AdwClamp = "AdwClamp";
|
|
6846
|
+
/**
|
|
6847
|
+
* A scrollable [class@Clamp].
|
|
6848
|
+
*
|
|
6849
|
+
* `AdwClampScrollable` is a variant of [class@Clamp] that implements the
|
|
6850
|
+
* [iface@Gtk.Scrollable] interface.
|
|
6851
|
+
*
|
|
6852
|
+
* The primary use case for `AdwClampScrollable` is clamping
|
|
6853
|
+
* [class@Gtk.ListView].
|
|
6854
|
+
*
|
|
6855
|
+
* See also: [class@ClampLayout].
|
|
6856
|
+
*/
|
|
6857
|
+
export const AdwClampScrollable = "AdwClampScrollable";
|
|
6858
|
+
/**
|
|
6859
|
+
* A [class@Gtk.ListBoxRow] used to choose from a list of items.
|
|
6860
|
+
*
|
|
6861
|
+
*
|
|
6862
|
+
*
|
|
6863
|
+
* The `AdwComboRow` widget allows the user to choose from a list of valid
|
|
6864
|
+
* choices. The row displays the selected choice. When activated, the row
|
|
6865
|
+
* displays a popover which allows the user to make a new choice.
|
|
6866
|
+
*
|
|
6867
|
+
* Example of an `AdwComboRow` UI definition:
|
|
6868
|
+
* ```xml
|
|
6869
|
+
* <object class="AdwComboRow">
|
|
6870
|
+
* <property name="title" translatable="yes">Combo Row`</property>`
|
|
6871
|
+
* <property name="model">
|
|
6872
|
+
* <object class="GtkStringList">
|
|
6873
|
+
* <items>
|
|
6874
|
+
* <item translatable="yes">Foo</item>
|
|
6875
|
+
* <item translatable="yes">Bar</item>
|
|
6876
|
+
* <item translatable="yes">Baz</item>
|
|
6877
|
+
* </items>
|
|
6878
|
+
* `</object>`
|
|
6879
|
+
* `</property>`
|
|
6880
|
+
* `</object>`
|
|
6881
|
+
* ```
|
|
6882
|
+
*
|
|
6883
|
+
* The [property@ComboRow:selected] and [property@ComboRow:selected-item]
|
|
6884
|
+
* properties can be used to keep track of the selected item and react to their
|
|
6885
|
+
* changes.
|
|
6886
|
+
*
|
|
6887
|
+
* `AdwComboRow` mirrors [class@Gtk.DropDown], see that widget for details.
|
|
6888
|
+
*
|
|
6889
|
+
* `AdwComboRow` is [property@Gtk.ListBoxRow:activatable] if a model is set.
|
|
6890
|
+
*
|
|
6891
|
+
* ## CSS nodes
|
|
6892
|
+
*
|
|
6893
|
+
* `AdwComboRow` has a main CSS node with name `row` and the `.combo` style
|
|
6894
|
+
* class.
|
|
6895
|
+
*
|
|
6896
|
+
* Its popover has the node named `popover` with the `.menu` style class, it
|
|
6897
|
+
* contains a [class@Gtk.ScrolledWindow], which in turn contains a
|
|
6898
|
+
* [class@Gtk.ListView], both are accessible via their regular nodes.
|
|
6899
|
+
*
|
|
6900
|
+
* ## Accessibility
|
|
6901
|
+
*
|
|
6902
|
+
* `AdwComboRow` uses the `GTK_ACCESSIBLE_ROLE_COMBO_BOX` role.
|
|
6903
|
+
*/
|
|
6904
|
+
export const AdwComboRow = "AdwComboRow";
|
|
6905
|
+
/**
|
|
6906
|
+
* An adaptive dialog container.
|
|
6907
|
+
*
|
|
6908
|
+
*
|
|
6909
|
+
*
|
|
6910
|
+
*
|
|
6911
|
+
* `AdwDialog` is similar to a window, but is shown within another window. It
|
|
6912
|
+
* can be used with [class@Window] and [class@ApplicationWindow], use
|
|
6913
|
+
* [method@Dialog.present] to show it.
|
|
6914
|
+
*
|
|
6915
|
+
* `AdwDialog` is not resizable. Use the [property@Dialog:content-width] and
|
|
6916
|
+
* [property@Dialog:content-height] properties to set its size, or set
|
|
6917
|
+
* [property@Dialog:follows-content-size] to `TRUE` to make the dialog track the
|
|
6918
|
+
* content's size as it changes. `AdwDialog` can never be larger than its parent
|
|
6919
|
+
* window.
|
|
6920
|
+
*
|
|
6921
|
+
* `AdwDialog` can be presented as a centered floating window or a bottom sheet.
|
|
6922
|
+
* By default it's automatic depending on the available size.
|
|
6923
|
+
* [property@Dialog:presentation-mode] can be used to change that.
|
|
6924
|
+
*
|
|
6925
|
+
* `AdwDialog` can be closed via [method@Dialog.close].
|
|
6926
|
+
*
|
|
6927
|
+
* When presented as a bottom sheet, `AdwDialog` can also be closed via swiping
|
|
6928
|
+
* it down.
|
|
6929
|
+
*
|
|
6930
|
+
* The [property@Dialog:can-close] can be used to prevent closing. In that case,
|
|
6931
|
+
* [signal@Dialog::close-attempt] gets emitted instead.
|
|
6932
|
+
*
|
|
6933
|
+
* Use [method@Dialog.force_close] to close the dialog even when `can-close` is set to
|
|
6934
|
+
* `FALSE`.
|
|
6935
|
+
*
|
|
6936
|
+
* `AdwDialog` is transient and doesn't integrate with the window below it, for
|
|
6937
|
+
* example it's not possible to collapse it into a bottom bar. See
|
|
6938
|
+
* [class@BottomSheet] for persistent and more tightly integrated bottom sheets.
|
|
6939
|
+
*
|
|
6940
|
+
* ## Header Bar Integration
|
|
6941
|
+
*
|
|
6942
|
+
* When placed inside an `AdwDialog`, [class@HeaderBar] will display the dialog
|
|
6943
|
+
* title instead of window title. It will also adjust the decoration layout to
|
|
6944
|
+
* ensure it always has a close button and nothing else. Set
|
|
6945
|
+
* [property@HeaderBar:show-start-title-buttons] and
|
|
6946
|
+
* [property@HeaderBar:show-end-title-buttons] to `FALSE` to remove it if it's
|
|
6947
|
+
* unwanted.
|
|
6948
|
+
*
|
|
6949
|
+
* ## Breakpoints
|
|
6950
|
+
*
|
|
6951
|
+
* `AdwDialog` can be used with [class@Breakpoint] the same way as
|
|
6952
|
+
* [class@BreakpointBin]. Refer to that widget's documentation for details.
|
|
6953
|
+
*
|
|
6954
|
+
* Like `AdwBreakpointBin`, if breakpoints are used, `AdwDialog` doesn't have a
|
|
6955
|
+
* minimum size, and [property@Gtk.Widget:width-request] and
|
|
6956
|
+
* [property@Gtk.Widget:height-request] properties must be set manually.
|
|
6957
|
+
*/
|
|
6958
|
+
export const AdwDialog = {
|
|
6959
|
+
Root: "AdwDialog.Root",
|
|
6960
|
+
Child: "AdwDialog.Child",
|
|
6961
|
+
DefaultWidget: "AdwDialog.DefaultWidget",
|
|
6962
|
+
FocusWidget: "AdwDialog.FocusWidget",
|
|
6963
|
+
};
|
|
6964
|
+
/**
|
|
6965
|
+
* A [class@Gtk.ListBoxRow] with an embedded text entry.
|
|
6966
|
+
*
|
|
6967
|
+
*
|
|
6968
|
+
*
|
|
6969
|
+
* `AdwEntryRow` has a title that doubles as placeholder text. It shows an icon
|
|
6970
|
+
* indicating that it's editable and can receive additional widgets before or
|
|
6971
|
+
* after the editable part.
|
|
6972
|
+
*
|
|
6973
|
+
* If [property@EntryRow:show-apply-button] is set to `TRUE`, `AdwEntryRow` can
|
|
6974
|
+
* show an apply button when editing its contents. This can be useful if
|
|
6975
|
+
* changing its contents can result in an expensive operation, such as network
|
|
6976
|
+
* activity.
|
|
6977
|
+
*
|
|
6978
|
+
* `AdwEntryRow` provides only minimal API and should be used with the
|
|
6979
|
+
* [iface@Gtk.Editable] API.
|
|
6980
|
+
*
|
|
6981
|
+
* See also [class@PasswordEntryRow].
|
|
6982
|
+
*
|
|
6983
|
+
* ## AdwEntryRow as GtkBuildable
|
|
6984
|
+
*
|
|
6985
|
+
* The `AdwEntryRow` implementation of the [iface@Gtk.Buildable] interface
|
|
6986
|
+
* supports adding a child at its end by specifying “suffix” or omitting the
|
|
6987
|
+
* “type” attribute of a `<child>` element.
|
|
6988
|
+
*
|
|
6989
|
+
* It also supports adding a child as a prefix widget by specifying “prefix” as
|
|
6990
|
+
* the “type” attribute of a `<child>` element.
|
|
6991
|
+
*
|
|
6992
|
+
* ## CSS nodes
|
|
6993
|
+
*
|
|
6994
|
+
* `AdwEntryRow` has a single CSS node with name `row` and the `.entry` style
|
|
6995
|
+
* class.
|
|
6996
|
+
*/
|
|
6997
|
+
export const AdwEntryRow = "AdwEntryRow";
|
|
6998
|
+
/**
|
|
6999
|
+
* A [class@Gtk.ListBoxRow] used to reveal widgets.
|
|
7000
|
+
*
|
|
7001
|
+
*
|
|
7002
|
+
*
|
|
7003
|
+
* The `AdwExpanderRow` widget allows the user to reveal or hide widgets below
|
|
7004
|
+
* it. It also allows the user to enable the expansion of the row, allowing to
|
|
7005
|
+
* disable all that the row contains.
|
|
7006
|
+
*
|
|
7007
|
+
* ## AdwExpanderRow as GtkBuildable
|
|
7008
|
+
*
|
|
7009
|
+
* The `AdwExpanderRow` implementation of the [iface@Gtk.Buildable] interface
|
|
7010
|
+
* supports adding a child as an suffix widget by specifying “suffix” as the
|
|
7011
|
+
* “type” attribute of a `<child>` element.
|
|
7012
|
+
*
|
|
7013
|
+
* It also supports adding it as a prefix widget by specifying “prefix” as the
|
|
7014
|
+
* “type” attribute of a `<child>` element.
|
|
7015
|
+
*
|
|
7016
|
+
* ## CSS nodes
|
|
7017
|
+
*
|
|
7018
|
+
* `AdwExpanderRow` has a main CSS node with name `row` and the `.expander`
|
|
7019
|
+
* style class. It has the `.empty` style class when it contains no children.
|
|
7020
|
+
*
|
|
7021
|
+
* It contains the subnodes `row.header` for its main embedded row,
|
|
7022
|
+
* `list.nested` for the list it can expand, and `image.expander-row-arrow` for
|
|
7023
|
+
* its arrow.
|
|
7024
|
+
*
|
|
7025
|
+
* ## Style classes
|
|
7026
|
+
*
|
|
7027
|
+
* `AdwExpanderRow` can use the `.`
|
|
7028
|
+
* style class to emphasize the row subtitle instead of the row title, which is
|
|
7029
|
+
* useful for displaying read-only properties.
|
|
7030
|
+
*
|
|
7031
|
+
* When used together with the `.monospace` style class, only the subtitle
|
|
7032
|
+
* becomes monospace, not the title or any extra widgets.
|
|
7033
|
+
*/
|
|
7034
|
+
export const AdwExpanderRow = "AdwExpanderRow";
|
|
7035
|
+
/**
|
|
7036
|
+
* An adaptive container acting like a box or an overlay.
|
|
7037
|
+
*
|
|
7038
|
+
*
|
|
7039
|
+
*
|
|
7040
|
+
*
|
|
7041
|
+
* The `AdwFlap` widget can display its children like a [class@Gtk.Box] does or
|
|
7042
|
+
* like a [class@Gtk.Overlay] does, according to the
|
|
7043
|
+
* [property@Flap:fold-policy] value.
|
|
7044
|
+
*
|
|
7045
|
+
* `AdwFlap` has at most three children: [property@Flap:content],
|
|
7046
|
+
* [property@Flap:flap] and [property@Flap:separator]. Content is the primary
|
|
7047
|
+
* child, flap is displayed next to it when unfolded, or overlays it when
|
|
7048
|
+
* folded. Flap can be shown or hidden by changing the
|
|
7049
|
+
* [property@Flap:reveal-flap] value, as well as via swipe gestures if
|
|
7050
|
+
* [property@Flap:swipe-to-open] and/or [property@Flap:swipe-to-close] are set
|
|
7051
|
+
* to `TRUE`.
|
|
7052
|
+
*
|
|
7053
|
+
* Optionally, a separator can be provided, which would be displayed between
|
|
7054
|
+
* the content and the flap when there's no shadow to separate them, depending
|
|
7055
|
+
* on the transition type.
|
|
7056
|
+
*
|
|
7057
|
+
* [property@Flap:flap] is transparent by default; add the
|
|
7058
|
+
* `.background` style class to it if this is
|
|
7059
|
+
* unwanted.
|
|
7060
|
+
*
|
|
7061
|
+
* If [property@Flap:modal] is set to `TRUE`, content becomes completely
|
|
7062
|
+
* inaccessible when the flap is revealed while folded.
|
|
7063
|
+
*
|
|
7064
|
+
* The position of the flap and separator children relative to the content is
|
|
7065
|
+
* determined by orientation, as well as the [property@Flap:flap-position]
|
|
7066
|
+
* value.
|
|
7067
|
+
*
|
|
7068
|
+
* Folding the flap will automatically hide the flap widget, and unfolding it
|
|
7069
|
+
* will automatically reveal it. If this behavior is not desired, the
|
|
7070
|
+
* [property@Flap:locked] property can be used to override it.
|
|
7071
|
+
*
|
|
7072
|
+
* Common use cases include sidebars, header bars that need to be able to
|
|
7073
|
+
* overlap the window content (for example, in fullscreen mode) and bottom
|
|
7074
|
+
* sheets.
|
|
7075
|
+
*
|
|
7076
|
+
* ## AdwFlap as GtkBuildable
|
|
7077
|
+
*
|
|
7078
|
+
* The `AdwFlap` implementation of the [iface@Gtk.Buildable] interface supports
|
|
7079
|
+
* setting the flap child by specifying “flap” as the “type” attribute of a
|
|
7080
|
+
* ``<child>`` element, and separator by specifying “separator”. Specifying
|
|
7081
|
+
* “content” child type or omitting it results in setting the content child.
|
|
7082
|
+
*
|
|
7083
|
+
* ## CSS nodes
|
|
7084
|
+
*
|
|
7085
|
+
* `AdwFlap` has a single CSS node with name `flap`. The node will get the style
|
|
7086
|
+
* classes `.folded` when it is folded, and `.unfolded` when it's not.
|
|
7087
|
+
*/
|
|
7088
|
+
export const AdwFlap = {
|
|
7089
|
+
Root: "AdwFlap.Root",
|
|
7090
|
+
Content: "AdwFlap.Content",
|
|
7091
|
+
Flap: "AdwFlap.Flap",
|
|
7092
|
+
Separator: "AdwFlap.Separator",
|
|
7093
|
+
};
|
|
7094
|
+
/**
|
|
7095
|
+
* A title bar widget.
|
|
7096
|
+
*
|
|
7097
|
+
*
|
|
7098
|
+
*
|
|
7099
|
+
* `AdwHeaderBar` is similar to [class@Gtk.HeaderBar], but provides additional
|
|
7100
|
+
* features compared to it. Refer to `GtkHeaderBar` for details. It is typically
|
|
7101
|
+
* used as a top bar within [class@ToolbarView].
|
|
7102
|
+
*
|
|
7103
|
+
* ## Dialog Integration
|
|
7104
|
+
*
|
|
7105
|
+
* When placed inside an [class@Dialog], `AdwHeaderBar` will display the dialog
|
|
7106
|
+
* title instead of window title. It will also adjust the decoration layout to
|
|
7107
|
+
* ensure it always has a close button and nothing else. Set
|
|
7108
|
+
* [property@HeaderBar:show-start-title-buttons] and
|
|
7109
|
+
* [property@HeaderBar:show-end-title-buttons] to `FALSE` to remove it if it's
|
|
7110
|
+
* unwanted.
|
|
7111
|
+
*
|
|
7112
|
+
* ## Navigation View Integration
|
|
7113
|
+
*
|
|
7114
|
+
* When placed inside an [class@NavigationPage], `AdwHeaderBar` will display the
|
|
7115
|
+
* page title instead of window title.
|
|
7116
|
+
*
|
|
7117
|
+
* When used together with [class@NavigationView] or [class@NavigationSplitView],
|
|
7118
|
+
* it will also display a back button that can be used to go back to the previous
|
|
7119
|
+
* page. The button also has a context menu, allowing to pop multiple pages at
|
|
7120
|
+
* once, potentially across multiple navigation views.
|
|
7121
|
+
*
|
|
7122
|
+
* Set [property@HeaderBar:show-back-button] to `FALSE` to disable this behavior
|
|
7123
|
+
* in rare scenarios where it's unwanted.
|
|
7124
|
+
*
|
|
7125
|
+
* ## Split View Integration
|
|
7126
|
+
*
|
|
7127
|
+
* When placed inside [class@NavigationSplitView] or [class@OverlaySplitView],
|
|
7128
|
+
* `AdwHeaderBar` will automatically hide the title buttons other than at the
|
|
7129
|
+
* edges of the window.
|
|
7130
|
+
*
|
|
7131
|
+
* ## Bottom Sheet Integration
|
|
7132
|
+
*
|
|
7133
|
+
* When played inside [class@BottomSheet], `AdwHeaderBar` will not show the title
|
|
7134
|
+
* unless [property@BottomSheet:show-drag-handle] is set to `FALSE`, regardless
|
|
7135
|
+
* of [property@HeaderBar:show-title]. This only applies to the default title,
|
|
7136
|
+
* titles set with [property@HeaderBar:title-widget] will still be shown.
|
|
7137
|
+
*
|
|
7138
|
+
* ## Centering Policy
|
|
7139
|
+
*
|
|
7140
|
+
* [property@HeaderBar:centering-policy] allows to enforce strict centering of
|
|
7141
|
+
* the title widget. This can be useful for entries inside [class@Clamp].
|
|
7142
|
+
*
|
|
7143
|
+
* ## Title Buttons
|
|
7144
|
+
*
|
|
7145
|
+
* Unlike `GtkHeaderBar`, `AdwHeaderBar` allows to toggle title button
|
|
7146
|
+
* visibility for each side individually, using the
|
|
7147
|
+
* [property@HeaderBar:show-start-title-buttons] and
|
|
7148
|
+
* [property@HeaderBar:show-end-title-buttons] properties.
|
|
7149
|
+
*
|
|
7150
|
+
* ## CSS nodes
|
|
7151
|
+
*
|
|
7152
|
+
* ```
|
|
7153
|
+
* headerbar
|
|
7154
|
+
* ╰── windowhandle
|
|
7155
|
+
* ╰── box
|
|
7156
|
+
* ├── widget
|
|
7157
|
+
* │ ╰── box.start
|
|
7158
|
+
* │ ├── windowcontrols.start
|
|
7159
|
+
* │ ├── widget
|
|
7160
|
+
* │ │ ╰── [button.back]
|
|
7161
|
+
* │ ╰── [other children]
|
|
7162
|
+
* ├── widget
|
|
7163
|
+
* │ ╰── [Title Widget]
|
|
7164
|
+
* ╰── widget
|
|
7165
|
+
* ╰── box.end
|
|
7166
|
+
* ├── [other children]
|
|
7167
|
+
* ╰── windowcontrols.end
|
|
7168
|
+
* ```
|
|
7169
|
+
*
|
|
7170
|
+
* `AdwHeaderBar`'s CSS node is called `headerbar`. It contains a `windowhandle`
|
|
7171
|
+
* subnode, which contains a `box` subnode, which contains three `widget`
|
|
7172
|
+
* subnodes at the start, center and end of the header bar. The start and end
|
|
7173
|
+
* subnodes contain a `box` subnode with the `.start` and `.end` style classes
|
|
7174
|
+
* respectively, and the center node contains a node that represents the title.
|
|
7175
|
+
*
|
|
7176
|
+
* Each of the boxes contains a `windowcontrols` subnode, see
|
|
7177
|
+
* [class@Gtk.WindowControls] for details, as well as other children.
|
|
7178
|
+
*
|
|
7179
|
+
* When [property@HeaderBar:show-back-button] is `TRUE`, the start box also
|
|
7180
|
+
* contains a node with the name `widget` that contains a node with the name
|
|
7181
|
+
* `button` and `.back` style class.
|
|
7182
|
+
*
|
|
7183
|
+
* ## Accessibility
|
|
7184
|
+
*
|
|
7185
|
+
* `AdwHeaderBar` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
7186
|
+
*/
|
|
7187
|
+
export const AdwHeaderBar = {
|
|
7188
|
+
Root: "AdwHeaderBar.Root",
|
|
7189
|
+
TitleWidget: "AdwHeaderBar.TitleWidget",
|
|
7190
|
+
};
|
|
7191
|
+
/**
|
|
7192
|
+
* A view switcher that uses a toggle group.
|
|
7193
|
+
*
|
|
7194
|
+
*
|
|
7195
|
+
*
|
|
7196
|
+
* A view switcher showing pages of an [class@ViewStack] within an
|
|
7197
|
+
* [class@ToggleGroup], similar to [class@ViewSwitcher].
|
|
7198
|
+
*
|
|
7199
|
+
* The toggles can display either an icon, a label or both. Use the
|
|
7200
|
+
* [property@InlineViewSwitcher:display-mode] to control this.
|
|
7201
|
+
*
|
|
7202
|
+
*
|
|
7203
|
+
*
|
|
7204
|
+
* ## CSS nodes
|
|
7205
|
+
*
|
|
7206
|
+
* `AdwInlineViewSwitcher` has a single CSS node with the name
|
|
7207
|
+
* `inline-view-switcher`.
|
|
7208
|
+
*
|
|
7209
|
+
* ## Style classes
|
|
7210
|
+
*
|
|
7211
|
+
* Like `AdwToggleGroup`, it can accept the `.flat`
|
|
7212
|
+
* and `.round` style classes.
|
|
7213
|
+
*
|
|
7214
|
+
*
|
|
7215
|
+
*
|
|
7216
|
+
* ## Accessibility
|
|
7217
|
+
*
|
|
7218
|
+
* The internal toggle group uses the `GTK_ACCESSIBLE_ROLE_TAB_LIST` role. Its
|
|
7219
|
+
* toggles use the `GTK_ACCESSIBLE_ROLE_TAB` role.
|
|
7220
|
+
*/
|
|
7221
|
+
export const AdwInlineViewSwitcher = "AdwInlineViewSwitcher";
|
|
7222
|
+
/**
|
|
7223
|
+
* A child slot within [class@Layout].
|
|
7224
|
+
*
|
|
7225
|
+
* While it contains a layout child, the [property@Gtk.Widget:visible] property
|
|
7226
|
+
* of the slot is updated to match that of the layout child.
|
|
7227
|
+
*
|
|
7228
|
+
* See [class@MultiLayoutView].
|
|
7229
|
+
*/
|
|
7230
|
+
export const AdwLayoutSlot = "AdwLayoutSlot";
|
|
7231
|
+
/**
|
|
7232
|
+
* An adaptive container acting like a box or a stack.
|
|
7233
|
+
*
|
|
7234
|
+
*
|
|
7235
|
+
*
|
|
7236
|
+
*
|
|
7237
|
+
* The `AdwLeaflet` widget can display its children like a [class@Gtk.Box] does
|
|
7238
|
+
* or like a [class@Gtk.Stack] does, adapting to size changes by switching
|
|
7239
|
+
* between the two modes.
|
|
7240
|
+
*
|
|
7241
|
+
* When there is enough space the children are displayed side by side, otherwise
|
|
7242
|
+
* only one is displayed and the leaflet is said to be “folded”.
|
|
7243
|
+
* The threshold is dictated by the preferred minimum sizes of the children.
|
|
7244
|
+
* When a leaflet is folded, the children can be navigated using swipe gestures.
|
|
7245
|
+
*
|
|
7246
|
+
* The “over” and “under” transition types stack the children one on top of the
|
|
7247
|
+
* other, while the “slide” transition puts the children side by side. While
|
|
7248
|
+
* navigating to a child on the side or below can be performed by swiping the
|
|
7249
|
+
* current child away, navigating to an upper child requires dragging it from
|
|
7250
|
+
* the edge where it resides. This doesn't affect non-dragging swipes.
|
|
7251
|
+
*
|
|
7252
|
+
* ## CSS nodes
|
|
7253
|
+
*
|
|
7254
|
+
* `AdwLeaflet` has a single CSS node with name `leaflet`. The node will get the
|
|
7255
|
+
* style classes `.folded` when it is folded, `.unfolded` when it's not, or none
|
|
7256
|
+
* if it hasn't computed its fold yet.
|
|
7257
|
+
*/
|
|
7258
|
+
export const AdwLeaflet = {
|
|
7259
|
+
Root: "AdwLeaflet.Root",
|
|
7260
|
+
VisibleChild: "AdwLeaflet.VisibleChild",
|
|
7261
|
+
};
|
|
7262
|
+
/**
|
|
7263
|
+
* A dialog presenting a message or a question.
|
|
7264
|
+
*
|
|
7265
|
+
*
|
|
7266
|
+
*
|
|
7267
|
+
* Message dialogs have a heading, a body, an optional child widget, and one or
|
|
7268
|
+
* multiple responses, each presented as a button.
|
|
7269
|
+
*
|
|
7270
|
+
* Each response has a unique string ID, and a button label. Additionally, each
|
|
7271
|
+
* response can be enabled or disabled, and can have a suggested or destructive
|
|
7272
|
+
* appearance.
|
|
7273
|
+
*
|
|
7274
|
+
* When one of the responses is activated, or the dialog is closed, the
|
|
7275
|
+
* [signal@MessageDialog::response] signal will be emitted. This signal is
|
|
7276
|
+
* detailed, and the detail, as well as the `response` parameter will be set to
|
|
7277
|
+
* the ID of the activated response, or to the value of the
|
|
7278
|
+
* [property@MessageDialog:close-response] property if the dialog had been
|
|
7279
|
+
* closed without activating any of the responses.
|
|
7280
|
+
*
|
|
7281
|
+
* Response buttons can be presented horizontally or vertically depending on
|
|
7282
|
+
* available space.
|
|
7283
|
+
*
|
|
7284
|
+
* When a response is activated, `AdwMessageDialog` is closed automatically.
|
|
7285
|
+
*
|
|
7286
|
+
* An example of using a message dialog:
|
|
7287
|
+
*
|
|
7288
|
+
* ```c
|
|
7289
|
+
* GtkWidget *dialog;
|
|
7290
|
+
*
|
|
7291
|
+
* dialog = adw_message_dialog_new (parent, _("Replace File?"), NULL);
|
|
7292
|
+
*
|
|
7293
|
+
* adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
|
|
7294
|
+
* _("A file named “%s” already exists. Do you want to replace it?"),
|
|
7295
|
+
* filename);
|
|
7296
|
+
*
|
|
7297
|
+
* adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dialog),
|
|
7298
|
+
* "cancel", _("_Cancel"),
|
|
7299
|
+
* "replace", _("_Replace"),
|
|
7300
|
+
* NULL);
|
|
7301
|
+
*
|
|
7302
|
+
* adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE);
|
|
7303
|
+
*
|
|
7304
|
+
* adw_message_dialog_set_default_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
|
|
7305
|
+
* adw_message_dialog_set_close_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
|
|
7306
|
+
*
|
|
7307
|
+
* g_signal_connect (dialog, "response", G_CALLBACK (response_cb), self);
|
|
7308
|
+
*
|
|
7309
|
+
* gtk_window_present (GTK_WINDOW (dialog));
|
|
7310
|
+
* ```
|
|
7311
|
+
*
|
|
7312
|
+
* ## Async API
|
|
7313
|
+
*
|
|
7314
|
+
* `AdwMessageDialog` can also be used via the [method@MessageDialog.choose]
|
|
7315
|
+
* method. This API follows the GIO async pattern, for example:
|
|
7316
|
+
*
|
|
7317
|
+
* ```c
|
|
7318
|
+
* static void
|
|
7319
|
+
* dialog_cb (AdwMessageDialog *dialog,
|
|
7320
|
+
* GAsyncResult *result,
|
|
7321
|
+
* MyWindow *self)
|
|
7322
|
+
* {
|
|
7323
|
+
* const char *response = adw_message_dialog_choose_finish (dialog, result);
|
|
7324
|
+
*
|
|
7325
|
+
* // ...
|
|
7326
|
+
* }
|
|
7327
|
+
*
|
|
7328
|
+
* static void
|
|
7329
|
+
* show_dialog (MyWindow *self)
|
|
7330
|
+
* {
|
|
7331
|
+
* GtkWidget *dialog;
|
|
7332
|
+
*
|
|
7333
|
+
* dialog = adw_message_dialog_new (GTK_WINDOW (self), _("Replace File?"), NULL);
|
|
7334
|
+
*
|
|
7335
|
+
* adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
|
|
7336
|
+
* _("A file named “%s” already exists. Do you want to replace it?"),
|
|
7337
|
+
* filename);
|
|
7338
|
+
*
|
|
7339
|
+
* adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dialog),
|
|
7340
|
+
* "cancel", _("_Cancel"),
|
|
7341
|
+
* "replace", _("_Replace"),
|
|
7342
|
+
* NULL);
|
|
7343
|
+
*
|
|
7344
|
+
* adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE);
|
|
7345
|
+
*
|
|
7346
|
+
* adw_message_dialog_set_default_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
|
|
7347
|
+
* adw_message_dialog_set_close_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
|
|
7348
|
+
*
|
|
7349
|
+
* adw_message_dialog_choose (ADW_MESSAGE_DIALOG (dialog), NULL, (GAsyncReadyCallback) dialog_cb, self);
|
|
7350
|
+
* }
|
|
7351
|
+
* ```
|
|
7352
|
+
*
|
|
7353
|
+
* ## AdwMessageDialog as GtkBuildable
|
|
7354
|
+
*
|
|
7355
|
+
* `AdwMessageDialog` supports adding responses in UI definitions by via the
|
|
7356
|
+
* `<responses>` element that may contain multiple `<response>` elements, each
|
|
7357
|
+
* representing a response.
|
|
7358
|
+
*
|
|
7359
|
+
* Each of the `<response>` elements must have the `id` attribute specifying the
|
|
7360
|
+
* response ID. The contents of the element are used as the response label.
|
|
7361
|
+
*
|
|
7362
|
+
* Response labels can be translated with the usual `translatable`, `context`
|
|
7363
|
+
* and `comments` attributes.
|
|
7364
|
+
*
|
|
7365
|
+
* The `<response>` elements can also have `enabled` and/or `appearance`
|
|
7366
|
+
* attributes. See [method@MessageDialog.set_response_enabled] and
|
|
7367
|
+
* [method@MessageDialog.set_response_appearance] for details.
|
|
7368
|
+
*
|
|
7369
|
+
* Example of an `AdwMessageDialog` UI definition:
|
|
7370
|
+
*
|
|
7371
|
+
* ```xml
|
|
7372
|
+
* <object class="AdwMessageDialog" id="dialog">
|
|
7373
|
+
* <property name="heading" translatable="yes">Save Changes?`</property>`
|
|
7374
|
+
* <property name="body" translatable="yes">Open documents contain unsaved changes. Changes which are not saved will be permanently lost.`</property>`
|
|
7375
|
+
* <property name="default-response">save`</property>`
|
|
7376
|
+
* <property name="close-response">cancel`</property>`
|
|
7377
|
+
* <signal name="response" handler="response_cb"/>
|
|
7378
|
+
* <responses>
|
|
7379
|
+
* <response id="cancel" translatable="yes">_Cancel</response>
|
|
7380
|
+
* <response id="discard" translatable="yes" appearance="destructive">_Discard</response>
|
|
7381
|
+
* <response id="save" translatable="yes" appearance="suggested" enabled="false">_Save</response>
|
|
7382
|
+
* </responses>
|
|
7383
|
+
* `</object>`
|
|
7384
|
+
* ```
|
|
7385
|
+
*
|
|
7386
|
+
* ## Accessibility
|
|
7387
|
+
*
|
|
7388
|
+
* `AdwMessageDialog` uses the `GTK_ACCESSIBLE_ROLE_DIALOG` role.
|
|
7389
|
+
*/
|
|
7390
|
+
export const AdwMessageDialog = {
|
|
7391
|
+
Root: "AdwMessageDialog.Root",
|
|
7392
|
+
ExtraChild: "AdwMessageDialog.ExtraChild",
|
|
7393
|
+
};
|
|
7394
|
+
/**
|
|
7395
|
+
* A widget for switching between different layouts.
|
|
7396
|
+
*
|
|
7397
|
+
* `AdwMultiLayoutView` contains layouts and children. Each child has
|
|
7398
|
+
* an ID, each layout has slots inside it, each slot also has an ID. When
|
|
7399
|
+
* switching layouts, children are inserted into slots with matching IDs. The
|
|
7400
|
+
* [property@Gtk.Widget:visible] property of each slot is updated to match
|
|
7401
|
+
* that of the inserted child.
|
|
7402
|
+
*
|
|
7403
|
+
* This can be useful for rearranging children when it's difficult to do so
|
|
7404
|
+
* otherwise, for example to move a child from a sidebar to a bottom bar.
|
|
7405
|
+
*
|
|
7406
|
+
* The currently used layout can be switched using the
|
|
7407
|
+
* [property@MultiLayoutView:layout] or [property@MultiLayoutView:layout-name]
|
|
7408
|
+
* properties. For example, it can be done via a [class@Adw.Breakpoint] setter
|
|
7409
|
+
* to change layouts depending on the window size.
|
|
7410
|
+
*
|
|
7411
|
+
* ## AdwMultiLayoutView as GtkBuildable
|
|
7412
|
+
*
|
|
7413
|
+
* The `AdwMultiLayoutView` implementation of the [iface@Gtk.Buildable]
|
|
7414
|
+
* interface supports adding layouts via ``<child>`` element with the `type`
|
|
7415
|
+
* attribute omitted.
|
|
7416
|
+
*
|
|
7417
|
+
* It also supports setting children via `<child type="ID">`.
|
|
7418
|
+
*
|
|
7419
|
+
* Example of an `AdwMultiLayoutView` UI definition that can display a secondary
|
|
7420
|
+
* child as either a sidebar or a bottom sheet.
|
|
7421
|
+
*
|
|
7422
|
+
* ```xml
|
|
7423
|
+
* <object class="AdwMultiLayoutView">
|
|
7424
|
+
* `<child>`
|
|
7425
|
+
* <object class="AdwLayout">
|
|
7426
|
+
* <property name="name">sidebar`</property>`
|
|
7427
|
+
* <property name="content">
|
|
7428
|
+
* <object class="AdwOverlaySplitView">
|
|
7429
|
+
* <property name="sidebar">
|
|
7430
|
+
* <object class="AdwLayoutSlot">
|
|
7431
|
+
* <property name="id">secondary`</property>`
|
|
7432
|
+
* `</object>`
|
|
7433
|
+
* `</property>`
|
|
7434
|
+
* <property name="content">
|
|
7435
|
+
* <object class="AdwLayoutSlot">
|
|
7436
|
+
* <property name="id">primary`</property>`
|
|
7437
|
+
* `</object>`
|
|
7438
|
+
* `</property>`
|
|
7439
|
+
* `</object>`
|
|
7440
|
+
* `</property>`
|
|
7441
|
+
* `</object>`
|
|
7442
|
+
* `</child>`
|
|
7443
|
+
* `<child>`
|
|
7444
|
+
* <object class="AdwLayout">
|
|
7445
|
+
* <property name="name">bottom-sheet`</property>`
|
|
7446
|
+
* <property name="content">
|
|
7447
|
+
* <object class="AdwBottomSheet">
|
|
7448
|
+
* <property name="open">True`</property>`
|
|
7449
|
+
* <property name="content">
|
|
7450
|
+
* <object class="AdwLayoutSlot">
|
|
7451
|
+
* <property name="id">primary`</property>`
|
|
7452
|
+
* `</object>`
|
|
7453
|
+
* `</property>`
|
|
7454
|
+
* <property name="sheet">
|
|
7455
|
+
* <object class="AdwLayoutSlot">
|
|
7456
|
+
* <property name="id">secondary`</property>`
|
|
7457
|
+
* `</object>`
|
|
7458
|
+
* `</property>`
|
|
7459
|
+
* `</object>`
|
|
7460
|
+
* `</property>`
|
|
7461
|
+
* `</object>`
|
|
7462
|
+
* `</child>`
|
|
7463
|
+
* <child type="primary">
|
|
7464
|
+
* <!-- ... -->
|
|
7465
|
+
* `</child>`
|
|
7466
|
+
* <child type="secondary">
|
|
7467
|
+
* <!-- ... -->
|
|
7468
|
+
* `</child>`
|
|
7469
|
+
* `</object>`
|
|
7470
|
+
* ```
|
|
7471
|
+
*
|
|
7472
|
+
* ## CSS nodes
|
|
7473
|
+
*
|
|
7474
|
+
* `AdwMultiLayoutView` has a single CSS node with name `multi-layout-view`.
|
|
7475
|
+
*/
|
|
7476
|
+
export const AdwMultiLayoutView = "AdwMultiLayoutView";
|
|
7477
|
+
/**
|
|
7478
|
+
* A page within [class@NavigationView] or [class@NavigationSplitView].
|
|
7479
|
+
*
|
|
7480
|
+
* Each page has a child widget, a title and optionally a tag.
|
|
7481
|
+
*
|
|
7482
|
+
* The [signal@NavigationPage::showing], [signal@NavigationPage::shown],
|
|
7483
|
+
* [signal@NavigationPage::hiding] and [signal@NavigationPage::hidden] signals
|
|
7484
|
+
* can be used to track the page's visibility within its `AdwNavigationView`.
|
|
7485
|
+
*
|
|
7486
|
+
* ## Header Bar Integration
|
|
7487
|
+
*
|
|
7488
|
+
* When placed inside `AdwNavigationPage`, [class@HeaderBar] will display the
|
|
7489
|
+
* page title instead of window title.
|
|
7490
|
+
*
|
|
7491
|
+
* When used together with [class@NavigationView], it will also display a back
|
|
7492
|
+
* button that can be used to go back to the previous page. Set
|
|
7493
|
+
* [property@HeaderBar:show-back-button] to `FALSE` to disable that behavior if
|
|
7494
|
+
* it's unwanted.
|
|
7495
|
+
*
|
|
7496
|
+
* ## CSS Nodes
|
|
7497
|
+
*
|
|
7498
|
+
* `AdwNavigationPage` has a single CSS node with name
|
|
7499
|
+
* `navigation-view-page`.
|
|
7500
|
+
*
|
|
7501
|
+
* ## Accessibility
|
|
7502
|
+
*
|
|
7503
|
+
* `AdwNavigationPage` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
7504
|
+
*/
|
|
7505
|
+
export const AdwNavigationPage = "AdwNavigationPage";
|
|
7506
|
+
/**
|
|
7507
|
+
* A widget presenting sidebar and content side by side or as a navigation view.
|
|
7508
|
+
*
|
|
7509
|
+
*
|
|
7510
|
+
*
|
|
7511
|
+
*
|
|
7512
|
+
* `AdwNavigationSplitView` has two [class@NavigationPage] children: sidebar and
|
|
7513
|
+
* content, and displays them side by side.
|
|
7514
|
+
*
|
|
7515
|
+
* When [property@NavigationSplitView:collapsed] is set to `TRUE`, it instead
|
|
7516
|
+
* puts both children inside an [class@NavigationView]. The
|
|
7517
|
+
* [property@NavigationSplitView:show-content] controls which child is visible
|
|
7518
|
+
* while collapsed.
|
|
7519
|
+
*
|
|
7520
|
+
* See also [class@OverlaySplitView].
|
|
7521
|
+
*
|
|
7522
|
+
* `AdwNavigationSplitView` is typically used together with an [class@Breakpoint]
|
|
7523
|
+
* setting the `collapsed` property to `TRUE` on small widths, as follows:
|
|
7524
|
+
*
|
|
7525
|
+
* ```xml
|
|
7526
|
+
* <object class="AdwWindow">
|
|
7527
|
+
* <property name="width-request">280`</property>`
|
|
7528
|
+
* <property name="height-request">200`</property>`
|
|
7529
|
+
* <property name="default-width">800`</property>`
|
|
7530
|
+
* <property name="default-height">800`</property>`
|
|
7531
|
+
* `<child>`
|
|
7532
|
+
* <object class="AdwBreakpoint">
|
|
7533
|
+
* <condition>max-width: 400sp</condition>
|
|
7534
|
+
* <setter object="split_view" property="collapsed">True</setter>
|
|
7535
|
+
* `</object>`
|
|
7536
|
+
* `</child>`
|
|
7537
|
+
* <property name="content">
|
|
7538
|
+
* <object class="AdwNavigationSplitView" id="split_view">
|
|
7539
|
+
* <property name="sidebar">
|
|
7540
|
+
* <object class="AdwNavigationPage">
|
|
7541
|
+
* <property name="title" translatable="yes">Sidebar`</property>`
|
|
7542
|
+
* <property name="child">
|
|
7543
|
+
* <!-- ... -->
|
|
7544
|
+
* `</property>`
|
|
7545
|
+
* `</object>`
|
|
7546
|
+
* `</property>`
|
|
7547
|
+
* <property name="content">
|
|
7548
|
+
* <object class="AdwNavigationPage">
|
|
7549
|
+
* <property name="title" translatable="yes">Content`</property>`
|
|
7550
|
+
* <property name="child">
|
|
7551
|
+
* <!-- ... -->
|
|
7552
|
+
* `</property>`
|
|
7553
|
+
* `</object>`
|
|
7554
|
+
* `</property>`
|
|
7555
|
+
* `</object>`
|
|
7556
|
+
* `</property>`
|
|
7557
|
+
* `</object>`
|
|
7558
|
+
* ```
|
|
7559
|
+
*
|
|
7560
|
+
* ## Sizing
|
|
7561
|
+
*
|
|
7562
|
+
* When not collapsed, `AdwNavigationSplitView` changes the sidebar width
|
|
7563
|
+
* depending on its own width.
|
|
7564
|
+
*
|
|
7565
|
+
* If possible, it tries to allocate a fraction of the total width, controlled
|
|
7566
|
+
* with the [property@NavigationSplitView:sidebar-width-fraction] property.
|
|
7567
|
+
*
|
|
7568
|
+
* The sidebar also has minimum and maximum sizes, controlled with the
|
|
7569
|
+
* [property@NavigationSplitView:min-sidebar-width] and
|
|
7570
|
+
* [property@NavigationSplitView:max-sidebar-width] properties.
|
|
7571
|
+
*
|
|
7572
|
+
* The minimum and maximum sizes are using the length unit specified with the
|
|
7573
|
+
* [property@NavigationSplitView:sidebar-width-unit].
|
|
7574
|
+
*
|
|
7575
|
+
* By default, sidebar is using 25% of the total width, with 180sp as the
|
|
7576
|
+
* minimum size and 280sp as the maximum size.
|
|
7577
|
+
*
|
|
7578
|
+
* ## Header Bar Integration
|
|
7579
|
+
*
|
|
7580
|
+
* When used inside `AdwNavigationSplitView`, [class@HeaderBar] will
|
|
7581
|
+
* automatically hide the window buttons in the middle.
|
|
7582
|
+
*
|
|
7583
|
+
* When collapsed, it also displays a back button for the content widget, as
|
|
7584
|
+
* well as the page titles. See [class@NavigationView] documentation for details.
|
|
7585
|
+
*
|
|
7586
|
+
* ## Actions
|
|
7587
|
+
*
|
|
7588
|
+
* `AdwNavigationSplitView` defines the same actions as `AdwNavigationView`, but
|
|
7589
|
+
* they can be used even when the split view is not collapsed:
|
|
7590
|
+
*
|
|
7591
|
+
* - `navigation.push` takes a string parameter specifying the tag of the page
|
|
7592
|
+
* to push. If it matches the tag of the content widget, it sets
|
|
7593
|
+
* [property@NavigationSplitView:show-content] to `TRUE`.
|
|
7594
|
+
*
|
|
7595
|
+
* - `navigation.pop` doesn't take any parameters and sets
|
|
7596
|
+
* [property@NavigationSplitView:show-content] to `FALSE`.
|
|
7597
|
+
*
|
|
7598
|
+
* ## `AdwNavigationSplitView` as `GtkBuildable`
|
|
7599
|
+
*
|
|
7600
|
+
* The `AdwNavigationSplitView` implementation of the [iface@Gtk.Buildable]
|
|
7601
|
+
* interface supports setting the sidebar widget by specifying “sidebar” as the
|
|
7602
|
+
* “type” attribute of a ``<child>`` element, Specifying “content” child type or
|
|
7603
|
+
* omitting it results in setting the content widget.
|
|
7604
|
+
*
|
|
7605
|
+
* ## CSS nodes
|
|
7606
|
+
*
|
|
7607
|
+
* `AdwNavigationSplitView` has a single CSS node with the name
|
|
7608
|
+
* `navigation-split-view`.
|
|
7609
|
+
*
|
|
7610
|
+
* When collapsed, it contains a child node with the name `navigation-view`
|
|
7611
|
+
* containing both children.
|
|
7612
|
+
*
|
|
7613
|
+
* ```
|
|
7614
|
+
* navigation-split-view
|
|
7615
|
+
* ╰── navigation-view
|
|
7616
|
+
* ├── [sidebar child]
|
|
7617
|
+
* ╰── [content child]
|
|
7618
|
+
* ```
|
|
7619
|
+
*
|
|
7620
|
+
* When not collapsed, it contains two nodes with the name `widget`, one with
|
|
7621
|
+
* the `.sidebar-pane` style class, the other one with `.content-view` style
|
|
7622
|
+
* class, containing the sidebar and content children respectively.
|
|
7623
|
+
*
|
|
7624
|
+
* ```
|
|
7625
|
+
* navigation-split-view
|
|
7626
|
+
* ├── widget.sidebar-pane
|
|
7627
|
+
* │ ╰── [sidebar child]
|
|
7628
|
+
* ╰── widget.content-pane
|
|
7629
|
+
* ╰── [content child]
|
|
7630
|
+
* ```
|
|
7631
|
+
*
|
|
7632
|
+
* ## Accessibility
|
|
7633
|
+
*
|
|
7634
|
+
* `AdwNavigationSplitView` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
7635
|
+
*/
|
|
7636
|
+
export const AdwNavigationSplitView = "AdwNavigationSplitView";
|
|
7637
|
+
/**
|
|
7638
|
+
* A page-based navigation container.
|
|
7639
|
+
*
|
|
7640
|
+
*
|
|
7641
|
+
*
|
|
7642
|
+
* `AdwNavigationView` presents one child at a time, similar to
|
|
7643
|
+
* [class@Gtk.Stack].
|
|
7644
|
+
*
|
|
7645
|
+
* `AdwNavigationView` can only contain [class@NavigationPage] children.
|
|
7646
|
+
*
|
|
7647
|
+
* It maintains a navigation stack that can be controlled with
|
|
7648
|
+
* [method@NavigationView.push] and [method@NavigationView.pop]. The whole
|
|
7649
|
+
* navigation stack can also be replaced using [method@NavigationView.replace].
|
|
7650
|
+
*
|
|
7651
|
+
* `AdwNavigationView` allows to manage pages statically or dynamically.
|
|
7652
|
+
*
|
|
7653
|
+
* Static pages can be added using the [method@NavigationView.add] method. The
|
|
7654
|
+
* `AdwNavigationView` will keep a reference to these pages, but they aren't
|
|
7655
|
+
* accessible to the user until [method@NavigationView.push] is called (except
|
|
7656
|
+
* for the first page, which is pushed automatically). Use the
|
|
7657
|
+
* [method@NavigationView.remove] method to remove them. This is useful for
|
|
7658
|
+
* applications that have a small number of unique pages and just need
|
|
7659
|
+
* navigation between them.
|
|
7660
|
+
*
|
|
7661
|
+
* Dynamic pages are automatically destroyed once they are popped off the
|
|
7662
|
+
* navigation stack. To add a page like this, push it using the
|
|
7663
|
+
* [method@NavigationView.push] method without calling
|
|
7664
|
+
* [method@NavigationView.add] first.
|
|
7665
|
+
*
|
|
7666
|
+
* ## Tags
|
|
7667
|
+
*
|
|
7668
|
+
* Static pages, as well as any pages in the navigation stack, can be accessed
|
|
7669
|
+
* by their [property@NavigationPage:tag]. For example,
|
|
7670
|
+
* [method@NavigationView.push_by_tag] can be used to push a static page that's
|
|
7671
|
+
* not in the navigation stack without having to keep a reference to it manually.
|
|
7672
|
+
*
|
|
7673
|
+
* ## Header Bar Integration
|
|
7674
|
+
*
|
|
7675
|
+
* When used inside `AdwNavigationView`, [class@HeaderBar] will automatically
|
|
7676
|
+
* display a back button that can be used to go back to the previous page when
|
|
7677
|
+
* possible. The button also has a context menu, allowing to pop multiple pages
|
|
7678
|
+
* at once, potentially across multiple navigation views.
|
|
7679
|
+
*
|
|
7680
|
+
* Set [property@HeaderBar:show-back-button] to `FALSE` to disable this behavior
|
|
7681
|
+
* in rare scenarios where it's unwanted.
|
|
7682
|
+
*
|
|
7683
|
+
* `AdwHeaderBar` will also display the title of the `AdwNavigationPage` it's
|
|
7684
|
+
* placed into, so most applications shouldn't need to customize it at all.
|
|
7685
|
+
*
|
|
7686
|
+
* ## Shortcuts and Gestures
|
|
7687
|
+
*
|
|
7688
|
+
* `AdwNavigationView` supports the following shortcuts for going to the
|
|
7689
|
+
* previous page:
|
|
7690
|
+
*
|
|
7691
|
+
* - `Escape` (unless [property@NavigationView:pop-on-escape] is set to
|
|
7692
|
+
* `FALSE`)
|
|
7693
|
+
* - `Alt`+`←`
|
|
7694
|
+
* - Back mouse button
|
|
7695
|
+
*
|
|
7696
|
+
* Additionally, it supports interactive gestures:
|
|
7697
|
+
*
|
|
7698
|
+
* - One-finger swipe towards the right on touchscreens
|
|
7699
|
+
* - Scrolling towards the right on touchpads (usually two-finger swipe)
|
|
7700
|
+
*
|
|
7701
|
+
* These gestures have transitions enabled regardless of the
|
|
7702
|
+
* [property@NavigationView:animate-transitions] value.
|
|
7703
|
+
*
|
|
7704
|
+
* Applications can also enable shortcuts for pushing another page onto the
|
|
7705
|
+
* navigation stack via connecting to the [signal@NavigationView::get-next-page]
|
|
7706
|
+
* signal, in that case the following shortcuts are supported:
|
|
7707
|
+
*
|
|
7708
|
+
* - `Alt`+`→`
|
|
7709
|
+
* - Forward mouse button
|
|
7710
|
+
* - Swipe/scrolling towards the left
|
|
7711
|
+
*
|
|
7712
|
+
* For right-to-left locales, the gestures and shortcuts are reversed.
|
|
7713
|
+
*
|
|
7714
|
+
* [property@NavigationPage:can-pop] can be used to disable them, along with the
|
|
7715
|
+
* header bar back buttons.
|
|
7716
|
+
*
|
|
7717
|
+
* ## Actions
|
|
7718
|
+
*
|
|
7719
|
+
* `AdwNavigationView` defines actions for controlling the navigation stack.
|
|
7720
|
+
* actions for controlling the navigation stack:
|
|
7721
|
+
*
|
|
7722
|
+
* - `navigation.push` takes a string parameter specifying the tag of the page to
|
|
7723
|
+
* push, and is equivalent to calling [method@NavigationView.push_by_tag].
|
|
7724
|
+
*
|
|
7725
|
+
* - `navigation.pop` doesn't take any parameters and pops the current page from
|
|
7726
|
+
* the navigation stack, equivalent to calling [method@NavigationView.pop].
|
|
7727
|
+
*
|
|
7728
|
+
* ## `AdwNavigationView` as `GtkBuildable`
|
|
7729
|
+
*
|
|
7730
|
+
* `AdwNavigationView` allows to add pages as children, equivalent to using the
|
|
7731
|
+
* [method@NavigationView.add] method.
|
|
7732
|
+
*
|
|
7733
|
+
* Example of an `AdwNavigationView` UI definition:
|
|
7734
|
+
*
|
|
7735
|
+
* ```xml
|
|
7736
|
+
* <object class="AdwNavigationView">
|
|
7737
|
+
* `<child>`
|
|
7738
|
+
* <object class="AdwNavigationPage">
|
|
7739
|
+
* <property name="title" translatable="yes">Page 1`</property>`
|
|
7740
|
+
* <property name="child">
|
|
7741
|
+
* <object class="AdwToolbarView">
|
|
7742
|
+
* <child type="top">
|
|
7743
|
+
* <object class="AdwHeaderBar"/>
|
|
7744
|
+
* `</child>`
|
|
7745
|
+
* <property name="content">
|
|
7746
|
+
* <object class="GtkButton">
|
|
7747
|
+
* <property name="label" translatable="yes">Open Page 2`</property>`
|
|
7748
|
+
* <property name="halign">center`</property>`
|
|
7749
|
+
* <property name="valign">center`</property>`
|
|
7750
|
+
* <property name="action-name">navigation.push`</property>`
|
|
7751
|
+
* <property name="action-target">'page-2'`</property>`
|
|
7752
|
+
* <style>
|
|
7753
|
+
* <class name="pill"/>
|
|
7754
|
+
* </style>
|
|
7755
|
+
* `</object>`
|
|
7756
|
+
* `</property>`
|
|
7757
|
+
* `</object>`
|
|
7758
|
+
* `</property>`
|
|
7759
|
+
* `</object>`
|
|
7760
|
+
* `</child>`
|
|
7761
|
+
* `<child>`
|
|
7762
|
+
* <object class="AdwNavigationPage">
|
|
7763
|
+
* <property name="title" translatable="yes">Page 2`</property>`
|
|
7764
|
+
* <property name="tag">page-2`</property>`
|
|
7765
|
+
* <property name="child">
|
|
7766
|
+
* <object class="AdwToolbarView">
|
|
7767
|
+
* <child type="top">
|
|
7768
|
+
* <object class="AdwHeaderBar"/>
|
|
7769
|
+
* `</child>`
|
|
7770
|
+
* <property name="content">
|
|
7771
|
+
* <!-- ... -->
|
|
7772
|
+
* `</property>`
|
|
7773
|
+
* `</object>`
|
|
7774
|
+
* `</property>`
|
|
7775
|
+
* `</object>`
|
|
7776
|
+
* `</child>`
|
|
7777
|
+
* `</object>`
|
|
7778
|
+
* ```
|
|
7779
|
+
*
|
|
7780
|
+
*
|
|
7781
|
+
*
|
|
7782
|
+
* ## CSS nodes
|
|
7783
|
+
*
|
|
7784
|
+
* `AdwNavigationView` has a single CSS node with the name `navigation-view`.
|
|
7785
|
+
*
|
|
7786
|
+
* ## Accessibility
|
|
7787
|
+
*
|
|
7788
|
+
* `AdwNavigationView` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
7789
|
+
*/
|
|
7790
|
+
export const AdwNavigationView = "AdwNavigationView";
|
|
7791
|
+
/**
|
|
7792
|
+
* A widget presenting sidebar and content side by side or as an overlay.
|
|
7793
|
+
*
|
|
7794
|
+
*
|
|
7795
|
+
*
|
|
7796
|
+
*
|
|
7797
|
+
* `AdwOverlaySplitView` has two children: sidebar and content, and displays
|
|
7798
|
+
* them side by side.
|
|
7799
|
+
*
|
|
7800
|
+
* When [property@OverlaySplitView:collapsed] is set to `TRUE`, the sidebar is
|
|
7801
|
+
* instead shown as an overlay above the content widget.
|
|
7802
|
+
*
|
|
7803
|
+
* The sidebar can be hidden or shown using the
|
|
7804
|
+
* [property@OverlaySplitView:show-sidebar] property.
|
|
7805
|
+
*
|
|
7806
|
+
* Sidebar can be displayed before or after the content, this can be controlled
|
|
7807
|
+
* with the [property@OverlaySplitView:sidebar-position] property.
|
|
7808
|
+
*
|
|
7809
|
+
* Collapsing the split view automatically hides the sidebar widget, and
|
|
7810
|
+
* uncollapsing it shows the sidebar. If this behavior is not desired, the
|
|
7811
|
+
* [property@OverlaySplitView:pin-sidebar] property can be used to override it.
|
|
7812
|
+
*
|
|
7813
|
+
* `AdwOverlaySplitView` supports an edge swipe gesture for showing the sidebar,
|
|
7814
|
+
* and a swipe from the sidebar for hiding it. Gestures are only supported on
|
|
7815
|
+
* touchscreen, but not touchpad. Gestures can be controlled with the
|
|
7816
|
+
* [property@OverlaySplitView:enable-show-gesture] and
|
|
7817
|
+
* [property@OverlaySplitView:enable-hide-gesture] properties.
|
|
7818
|
+
*
|
|
7819
|
+
* See also [class@NavigationSplitView].
|
|
7820
|
+
*
|
|
7821
|
+
* `AdwOverlaySplitView` is typically used together with an [class@Breakpoint]
|
|
7822
|
+
* setting the `collapsed` property to `TRUE` on small widths, as follows:
|
|
7823
|
+
*
|
|
7824
|
+
* ```xml
|
|
7825
|
+
* <object class="AdwWindow">
|
|
7826
|
+
* <property name="default-width">800`</property>`
|
|
7827
|
+
* <property name="default-height">800`</property>`
|
|
7828
|
+
* `<child>`
|
|
7829
|
+
* <object class="AdwBreakpoint">
|
|
7830
|
+
* <condition>max-width: 400sp</condition>
|
|
7831
|
+
* <setter object="split_view" property="collapsed">True</setter>
|
|
7832
|
+
* `</object>`
|
|
7833
|
+
* `</child>`
|
|
7834
|
+
* <property name="content">
|
|
7835
|
+
* <object class="AdwOverlaySplitView" id="split_view">
|
|
7836
|
+
* <property name="sidebar">
|
|
7837
|
+
* <!-- ... -->
|
|
7838
|
+
* `</property>`
|
|
7839
|
+
* <property name="content">
|
|
7840
|
+
* <!-- ... -->
|
|
7841
|
+
* `</property>`
|
|
7842
|
+
* `</object>`
|
|
7843
|
+
* `</property>`
|
|
7844
|
+
* `</object>`
|
|
7845
|
+
* ```
|
|
7846
|
+
*
|
|
7847
|
+
* `AdwOverlaySplitView` is often used for implementing the
|
|
7848
|
+
* utility pane
|
|
7849
|
+
* pattern.
|
|
7850
|
+
*
|
|
7851
|
+
* ## Sizing
|
|
7852
|
+
*
|
|
7853
|
+
* When not collapsed, `AdwOverlaySplitView` changes the sidebar width
|
|
7854
|
+
* depending on its own width.
|
|
7855
|
+
*
|
|
7856
|
+
* If possible, it tries to allocate a fraction of the total width, controlled
|
|
7857
|
+
* with the [property@OverlaySplitView:sidebar-width-fraction] property.
|
|
7858
|
+
*
|
|
7859
|
+
* The sidebar also has minimum and maximum sizes, controlled with the
|
|
7860
|
+
* [property@OverlaySplitView:min-sidebar-width] and
|
|
7861
|
+
* [property@OverlaySplitView:max-sidebar-width] properties.
|
|
7862
|
+
*
|
|
7863
|
+
* The minimum and maximum sizes are using the length unit specified with the
|
|
7864
|
+
* [property@OverlaySplitView:sidebar-width-unit].
|
|
7865
|
+
*
|
|
7866
|
+
* By default, sidebar is using 25% of the total width, with 180sp as the
|
|
7867
|
+
* minimum size and 280sp as the maximum size.
|
|
7868
|
+
*
|
|
7869
|
+
* When collapsed, the preferred width fraction is ignored and the sidebar uses
|
|
7870
|
+
* [property@OverlaySplitView:max-sidebar-width] when possible.
|
|
7871
|
+
*
|
|
7872
|
+
* ## Header Bar Integration
|
|
7873
|
+
*
|
|
7874
|
+
* When used inside `AdwOverlaySplitView`, [class@HeaderBar] will automatically
|
|
7875
|
+
* hide the window buttons in the middle.
|
|
7876
|
+
*
|
|
7877
|
+
* ## `AdwOverlaySplitView` as `GtkBuildable`
|
|
7878
|
+
*
|
|
7879
|
+
* The `AdwOverlaySplitView` implementation of the [iface@Gtk.Buildable]
|
|
7880
|
+
* interface supports setting the sidebar widget by specifying “sidebar” as the
|
|
7881
|
+
* “type” attribute of a ``<child>`` element, Specifying “content” child type or
|
|
7882
|
+
* omitting it results in setting the content widget.
|
|
7883
|
+
*
|
|
7884
|
+
* ## CSS nodes
|
|
7885
|
+
*
|
|
7886
|
+
* `AdwOverlaySplitView` has a single CSS node with the name
|
|
7887
|
+
* `overlay-split-view`.
|
|
7888
|
+
*
|
|
7889
|
+
* It contains two nodes with the name `widget`, containing the sidebar and
|
|
7890
|
+
* content children.
|
|
7891
|
+
*
|
|
7892
|
+
* When not collapsed, they have the `.sidebar-view` and `.content-view` style
|
|
7893
|
+
* classes respectively.
|
|
7894
|
+
*
|
|
7895
|
+
* ```
|
|
7896
|
+
* overlay-split-view
|
|
7897
|
+
* ├── widget.sidebar-pane
|
|
7898
|
+
* │ ╰── [sidebar child]
|
|
7899
|
+
* ╰── widget.content-pane
|
|
7900
|
+
* ╰── [content child]
|
|
7901
|
+
* ```
|
|
7902
|
+
*
|
|
7903
|
+
* When collapsed, the one containing the sidebar child has the `.background`
|
|
7904
|
+
* style class and the other one has no style classes.
|
|
7905
|
+
*
|
|
7906
|
+
* ```
|
|
7907
|
+
* overlay-split-view
|
|
7908
|
+
* ├── widget.background
|
|
7909
|
+
* │ ╰── [sidebar child]
|
|
7910
|
+
* ╰── widget
|
|
7911
|
+
* ╰── [content child]
|
|
7912
|
+
* ```
|
|
7913
|
+
*
|
|
7914
|
+
* ## Accessibility
|
|
7915
|
+
*
|
|
7916
|
+
* `AdwOverlaySplitView` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
7917
|
+
*/
|
|
7918
|
+
export const AdwOverlaySplitView = {
|
|
7919
|
+
Root: "AdwOverlaySplitView.Root",
|
|
7920
|
+
Content: "AdwOverlaySplitView.Content",
|
|
7921
|
+
Sidebar: "AdwOverlaySplitView.Sidebar",
|
|
7922
|
+
};
|
|
7923
|
+
/**
|
|
7924
|
+
* A [class@EntryRow] tailored for entering secrets.
|
|
7925
|
+
*
|
|
7926
|
+
*
|
|
7927
|
+
*
|
|
7928
|
+
* It does not show its contents in clear text, does not allow to copy it to the
|
|
7929
|
+
* clipboard, and shows a warning when Caps Lock is engaged. If the underlying
|
|
7930
|
+
* platform allows it, `AdwPasswordEntryRow` will also place the text in a
|
|
7931
|
+
* non-pageable memory area, to avoid it being written out to disk by the
|
|
7932
|
+
* operating system.
|
|
7933
|
+
*
|
|
7934
|
+
* It offer a way to reveal the contents in clear text.
|
|
7935
|
+
*
|
|
7936
|
+
* ## CSS Nodes
|
|
7937
|
+
*
|
|
7938
|
+
* `AdwPasswordEntryRow` has a single CSS node with name `row` that carries
|
|
7939
|
+
* `.entry` and `.password` style classes.
|
|
7940
|
+
*/
|
|
7941
|
+
export const AdwPasswordEntryRow = "AdwPasswordEntryRow";
|
|
7942
|
+
/**
|
|
7943
|
+
* A dialog showing application's preferences.
|
|
7944
|
+
*
|
|
7945
|
+
*
|
|
7946
|
+
*
|
|
7947
|
+
* The `AdwPreferencesDialog` widget presents an application's preferences
|
|
7948
|
+
* gathered into pages and groups. The preferences are searchable by the user.
|
|
7949
|
+
*
|
|
7950
|
+
* ## Actions
|
|
7951
|
+
*
|
|
7952
|
+
* `AdwPrefencesDialog` defines the `navigation.pop` action, it doesn't take any
|
|
7953
|
+
* parameters and pops the current subpage from the navigation stack, equivalent
|
|
7954
|
+
* to calling [method@PreferencesDialog.pop_subpage].
|
|
7955
|
+
*
|
|
7956
|
+
* ## CSS nodes
|
|
7957
|
+
*
|
|
7958
|
+
* `AdwPreferencesDialog` has a main CSS node with the name `dialog` and the
|
|
7959
|
+
* style class `.preferences`.
|
|
7960
|
+
*/
|
|
7961
|
+
export const AdwPreferencesDialog = {
|
|
7962
|
+
Root: "AdwPreferencesDialog.Root",
|
|
7963
|
+
VisiblePage: "AdwPreferencesDialog.VisiblePage",
|
|
7964
|
+
};
|
|
7965
|
+
/**
|
|
7966
|
+
* A group of preference rows.
|
|
7967
|
+
*
|
|
7968
|
+
*
|
|
7969
|
+
*
|
|
7970
|
+
* An `AdwPreferencesGroup` represents a group or tightly related preferences,
|
|
7971
|
+
* which in turn are represented by [class@PreferencesRow].
|
|
7972
|
+
*
|
|
7973
|
+
* To summarize the role of the preferences it gathers, a group can have both a
|
|
7974
|
+
* title and a description. The title will be used by [class@PreferencesDialog]
|
|
7975
|
+
* to let the user look for a preference.
|
|
7976
|
+
*
|
|
7977
|
+
* The [property@PreferencesGroup:separate-rows] property can be used to
|
|
7978
|
+
* separate the rows within the group, same as when using the
|
|
7979
|
+
* `.boxed-list-separate` style class
|
|
7980
|
+
* instead of `.boxed-list`.
|
|
7981
|
+
*
|
|
7982
|
+
* ## AdwPreferencesGroup as GtkBuildable
|
|
7983
|
+
*
|
|
7984
|
+
* The `AdwPreferencesGroup` implementation of the [iface@Gtk.Buildable] interface
|
|
7985
|
+
* supports adding [class@PreferencesRow]s to the list by omitting "type". If "type"
|
|
7986
|
+
* is omitted and the widget isn't a [class@PreferencesRow] the child is added to
|
|
7987
|
+
* a box below the list.
|
|
7988
|
+
*
|
|
7989
|
+
* When the "type" attribute of a child is `header-suffix`, the child
|
|
7990
|
+
* is set as the suffix on the end of the title and description.
|
|
7991
|
+
*
|
|
7992
|
+
* ## CSS nodes
|
|
7993
|
+
*
|
|
7994
|
+
* `AdwPreferencesGroup` has a single CSS node with name `preferencesgroup`.
|
|
7995
|
+
*
|
|
7996
|
+
* ## Accessibility
|
|
7997
|
+
*
|
|
7998
|
+
* `AdwPreferencesGroup` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
7999
|
+
*/
|
|
8000
|
+
export const AdwPreferencesGroup = {
|
|
8001
|
+
Root: "AdwPreferencesGroup.Root",
|
|
8002
|
+
HeaderSuffix: "AdwPreferencesGroup.HeaderSuffix",
|
|
8003
|
+
};
|
|
8004
|
+
/**
|
|
8005
|
+
* A page from [class@PreferencesDialog].
|
|
8006
|
+
*
|
|
8007
|
+
*
|
|
8008
|
+
*
|
|
8009
|
+
* The `AdwPreferencesPage` widget gathers preferences groups into a single page
|
|
8010
|
+
* of a preferences window.
|
|
8011
|
+
*
|
|
8012
|
+
* ## CSS nodes
|
|
8013
|
+
*
|
|
8014
|
+
* `AdwPreferencesPage` has a single CSS node with name `preferencespage`.
|
|
8015
|
+
*
|
|
8016
|
+
* ## Accessibility
|
|
8017
|
+
*
|
|
8018
|
+
* `AdwPreferencesPage` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
8019
|
+
*/
|
|
8020
|
+
export const AdwPreferencesPage = "AdwPreferencesPage";
|
|
8021
|
+
/**
|
|
8022
|
+
* A [class@Gtk.ListBoxRow] used to present preferences.
|
|
8023
|
+
*
|
|
8024
|
+
* The `AdwPreferencesRow` widget has a title that [class@PreferencesDialog]
|
|
8025
|
+
* will use to let the user look for a preference. It doesn't present the title
|
|
8026
|
+
* in any way and lets you present the preference as you please.
|
|
8027
|
+
*
|
|
8028
|
+
* [class@ActionRow] and its derivatives are convenient to use as preference
|
|
8029
|
+
* rows as they take care of presenting the preference's title while letting you
|
|
8030
|
+
* compose the inputs of the preference around it.
|
|
8031
|
+
*/
|
|
8032
|
+
export const AdwPreferencesRow = "AdwPreferencesRow";
|
|
8033
|
+
/**
|
|
8034
|
+
* A window to present an application's preferences.
|
|
8035
|
+
*
|
|
8036
|
+
*
|
|
8037
|
+
*
|
|
8038
|
+
* The `AdwPreferencesWindow` widget presents an application's preferences
|
|
8039
|
+
* gathered into pages and groups. The preferences are searchable by the user.
|
|
8040
|
+
*
|
|
8041
|
+
* ## CSS nodes
|
|
8042
|
+
*
|
|
8043
|
+
* `AdwPreferencesWindow` has a main CSS node with the name `window` and the
|
|
8044
|
+
* style class `.preferences`.
|
|
8045
|
+
*/
|
|
8046
|
+
export const AdwPreferencesWindow = {
|
|
8047
|
+
Root: "AdwPreferencesWindow.Root",
|
|
8048
|
+
VisiblePage: "AdwPreferencesWindow.VisiblePage",
|
|
8049
|
+
};
|
|
8050
|
+
/**
|
|
8051
|
+
* A widget that displays a keyboard shortcut.
|
|
8052
|
+
*
|
|
8053
|
+
*
|
|
8054
|
+
*
|
|
8055
|
+
* The shown shortcut can be set using the [property@ShortcutLabel:accelerator]
|
|
8056
|
+
* property.
|
|
8057
|
+
*
|
|
8058
|
+
* Optionally, if no shortcut is set, `AdwShortcutLabel` will display a
|
|
8059
|
+
* placeholder set with the [property@ShortcutLabel:disabled-text] property.
|
|
8060
|
+
*
|
|
8061
|
+
* The following types of shortcuts can be displayed:
|
|
8062
|
+
*
|
|
8063
|
+
* - A single shortcut in [func@Gtk.accelerator_parse] format, e.g. `<Control>C`:
|
|
8064
|
+
*
|
|
8065
|
+
*
|
|
8066
|
+
*
|
|
8067
|
+
* - Multiple alternative shortcuts, separated with spaces, e.g. `<Shift>A Home`:
|
|
8068
|
+
*
|
|
8069
|
+
*
|
|
8070
|
+
*
|
|
8071
|
+
* - A range of shortcuts, separated with `...`, e.g. `<Alt>1...9`:
|
|
8072
|
+
*
|
|
8073
|
+
*
|
|
8074
|
+
*
|
|
8075
|
+
* - Multiple keys pressed at once, separated with `&`, e.g. `Control_L&Control_R`:
|
|
8076
|
+
*
|
|
8077
|
+
*
|
|
8078
|
+
*
|
|
8079
|
+
* - Multiple shortcuts or keys, pressed sequentially, separated with `+`, e.g. `<Control>C+<Control>X`:
|
|
8080
|
+
*
|
|
8081
|
+
*
|
|
8082
|
+
*
|
|
8083
|
+
* ::: note
|
|
8084
|
+
* `<`, `>` and `&` need to be escaped as `<`, `>` and `&` when used in UI files.
|
|
8085
|
+
*
|
|
8086
|
+
* ## CSS nodes
|
|
8087
|
+
*
|
|
8088
|
+
* `AdwShortcutLabel` has a single CSS node with name `shortcut-label`. The
|
|
8089
|
+
* individual keycap labels each have the `.keycap` style class, while the
|
|
8090
|
+
* labels separating them have the `.dimmed` style class.
|
|
8091
|
+
*
|
|
8092
|
+
* ## Accessibility
|
|
8093
|
+
*
|
|
8094
|
+
* `AdwShortcutLabel` uses the `GTK_ACCESSIBLE_ROLE_LABEL` role.
|
|
8095
|
+
*
|
|
8096
|
+
* See also: [class@ShortcutsDialog].
|
|
8097
|
+
*/
|
|
8098
|
+
export const AdwShortcutLabel = "AdwShortcutLabel";
|
|
8099
|
+
/**
|
|
8100
|
+
* A dialog that displays application's keyboard shortcuts.
|
|
8101
|
+
*
|
|
8102
|
+
*
|
|
8103
|
+
*
|
|
8104
|
+
* Shortcuts are grouped into sections, represented by [class@ShortcutsSection]
|
|
8105
|
+
* objects. Each section has one or more items, represented by
|
|
8106
|
+
* [class@ShortcutsItem] objects.
|
|
8107
|
+
*
|
|
8108
|
+
* To add a section to the dialog, use [method@ShortcutsDialog.add], or add it
|
|
8109
|
+
* as a child when using UI files.
|
|
8110
|
+
*
|
|
8111
|
+
* Sections without titles can be used to further subdivide each section into
|
|
8112
|
+
* groups.
|
|
8113
|
+
*
|
|
8114
|
+
* Example of an `AdwShortcutsDialog` UI definition:
|
|
8115
|
+
*
|
|
8116
|
+
* ```xml
|
|
8117
|
+
* <object class="AdwShortcutsDialog" id="shortcuts_dialog">
|
|
8118
|
+
* `<child>`
|
|
8119
|
+
* <object class="AdwShortcutsSection">
|
|
8120
|
+
* <property name="title" translatable="yes">General`</property>`
|
|
8121
|
+
* `<child>`
|
|
8122
|
+
* <object class="AdwShortcutsItem">
|
|
8123
|
+
* <property name="title" translatable="yes">Open Menu`</property>`
|
|
8124
|
+
* <property name="accelerator">F10`</property>`
|
|
8125
|
+
* `</object>`
|
|
8126
|
+
* `</child>`
|
|
8127
|
+
* `<child>`
|
|
8128
|
+
* <object class="AdwShortcutsItem">
|
|
8129
|
+
* <property name="title" translatable="yes">Quit`</property>`
|
|
8130
|
+
* <property name="action-name">app.quit`</property>`
|
|
8131
|
+
* `</object>`
|
|
8132
|
+
* `</child>`
|
|
8133
|
+
* `</object>`
|
|
8134
|
+
* `</child>`
|
|
8135
|
+
* `<child>`
|
|
8136
|
+
* <object class="AdwShortcutsSection">
|
|
8137
|
+
* `<child>`
|
|
8138
|
+
* <object class="AdwShortcutsItem">
|
|
8139
|
+
* <property name="title" translatable="yes">Move Tab Left`</property>`
|
|
8140
|
+
* <property name="accelerator"><Shift><Ctrl>Page_Up`</property>`
|
|
8141
|
+
* <property name="direction">ltr`</property>`
|
|
8142
|
+
* `</object>`
|
|
8143
|
+
* `</child>`
|
|
8144
|
+
* `<child>`
|
|
8145
|
+
* <object class="AdwShortcutsItem">
|
|
8146
|
+
* <property name="title" translatable="yes">Move Tab Right`</property>`
|
|
8147
|
+
* <property name="accelerator"><Shift><Ctrl>Page_Down`</property>`
|
|
8148
|
+
* <property name="direction">ltr`</property>`
|
|
8149
|
+
* `</object>`
|
|
8150
|
+
* `</child>`
|
|
8151
|
+
* `<child>`
|
|
8152
|
+
* <object class="AdwShortcutsItem">
|
|
8153
|
+
* <property name="title" translatable="yes">Move Tab Right`</property>`
|
|
8154
|
+
* <property name="accelerator"><Shift><Ctrl>Page_Up`</property>`
|
|
8155
|
+
* <property name="direction">rtl`</property>`
|
|
8156
|
+
* `</object>`
|
|
8157
|
+
* `</child>`
|
|
8158
|
+
* `<child>`
|
|
8159
|
+
* <object class="AdwShortcutsItem">
|
|
8160
|
+
* <property name="title" translatable="yes">Move Tab Left`</property>`
|
|
8161
|
+
* <property name="accelerator"><Shift><Ctrl>Page_Down`</property>`
|
|
8162
|
+
* <property name="direction">rtl`</property>`
|
|
8163
|
+
* `</object>`
|
|
8164
|
+
* `</child>`
|
|
8165
|
+
* `</object>`
|
|
8166
|
+
* `</child>`
|
|
8167
|
+
* `</object>`
|
|
8168
|
+
* ```
|
|
8169
|
+
*
|
|
8170
|
+
* If the `app.quit` action has the `Ctrl``Q` accelerator
|
|
8171
|
+
* associated with it, the result will look as follows:
|
|
8172
|
+
*
|
|
8173
|
+
*
|
|
8174
|
+
*
|
|
8175
|
+
* The recommended way to use `AdwShortcutsDialog` is via [class@Application]'s
|
|
8176
|
+
* automatic resource loading.
|
|
8177
|
+
*
|
|
8178
|
+
* See also: [class@ShortcutLabel].
|
|
8179
|
+
*/
|
|
8180
|
+
export const AdwShortcutsDialog = "AdwShortcutsDialog";
|
|
8181
|
+
/**
|
|
8182
|
+
* A widget showing a loading spinner.
|
|
8183
|
+
*
|
|
8184
|
+
*
|
|
8185
|
+
*
|
|
8186
|
+
* The size of the spinner depends on the available size, never smaller than
|
|
8187
|
+
* 16×16 pixels and never larger than 64×64 pixels.
|
|
8188
|
+
*
|
|
8189
|
+
* Use the [property@Gtk.Widget:halign] and [property@Gtk.Widget:valign]
|
|
8190
|
+
* properties in combination with [property@Gtk.Widget:width-request] and
|
|
8191
|
+
* [property@Gtk.Widget:height-request] for fine sizing control.
|
|
8192
|
+
*
|
|
8193
|
+
* For example, the following snippet shows the spinner at 48×48 pixels:
|
|
8194
|
+
*
|
|
8195
|
+
* ```xml
|
|
8196
|
+
* <object class="AdwSpinner">
|
|
8197
|
+
* <property name="halign">center`</property>`
|
|
8198
|
+
* <property name="valign">center`</property>`
|
|
8199
|
+
* <property name="width-request">48`</property>`
|
|
8200
|
+
* <property name="height-request">48`</property>`
|
|
8201
|
+
* `</object>`
|
|
8202
|
+
* ```
|
|
8203
|
+
*
|
|
8204
|
+
* See [class@SpinnerPaintable] for cases where using a widget is impractical or
|
|
8205
|
+
* impossible, such as [property@StatusPage:paintable].
|
|
8206
|
+
*
|
|
8207
|
+
* ## CSS nodes
|
|
8208
|
+
*
|
|
8209
|
+
* `AdwSpinner` has a single node with the name `image` and the style class
|
|
8210
|
+
* `.spinner`.
|
|
8211
|
+
*
|
|
8212
|
+
* ## Accessibility
|
|
8213
|
+
*
|
|
8214
|
+
* `AdwSpinner` uses the [enum@Gtk.AccessibleRole.progress-bar] role.
|
|
8215
|
+
*/
|
|
8216
|
+
export const AdwSpinner = "AdwSpinner";
|
|
8217
|
+
/**
|
|
8218
|
+
* An [class@ActionRow] with an embedded spin button.
|
|
8219
|
+
*
|
|
8220
|
+
*
|
|
8221
|
+
*
|
|
8222
|
+
* Example of an `AdwSpinRow` UI definition:
|
|
8223
|
+
*
|
|
8224
|
+
* ```xml
|
|
8225
|
+
* <object class="AdwSpinRow">
|
|
8226
|
+
* <property name="title" translatable="yes">Spin Row`</property>`
|
|
8227
|
+
* <property name="adjustment">
|
|
8228
|
+
* <object class="GtkAdjustment">
|
|
8229
|
+
* <property name="lower">0`</property>`
|
|
8230
|
+
* <property name="upper">100`</property>`
|
|
8231
|
+
* <property name="value">50`</property>`
|
|
8232
|
+
* <property name="page-increment">10`</property>`
|
|
8233
|
+
* <property name="step-increment">1`</property>`
|
|
8234
|
+
* `</object>`
|
|
8235
|
+
* `</property>`
|
|
8236
|
+
* `</object>`
|
|
8237
|
+
* ```
|
|
8238
|
+
*
|
|
8239
|
+
* See [class@Gtk.SpinButton] for details.
|
|
8240
|
+
*
|
|
8241
|
+
* ## CSS nodes
|
|
8242
|
+
*
|
|
8243
|
+
* `AdwSpinRow` has the same structure as [class@ActionRow], as well as the
|
|
8244
|
+
* `.spin` style class on the main node.
|
|
8245
|
+
*
|
|
8246
|
+
* ## Accessibility
|
|
8247
|
+
*
|
|
8248
|
+
* `AdwSpinRow` uses an internal `GtkSpinButton` with the
|
|
8249
|
+
* `GTK_ACCESSIBLE_ROLE_SPIN_BUTTON` role.
|
|
8250
|
+
*/
|
|
8251
|
+
export const AdwSpinRow = "AdwSpinRow";
|
|
8252
|
+
/**
|
|
8253
|
+
* A combined button and dropdown widget.
|
|
8254
|
+
*
|
|
8255
|
+
*
|
|
8256
|
+
*
|
|
8257
|
+
* `AdwSplitButton` is typically used to present a set of actions in a menu,
|
|
8258
|
+
* but allow access to one of them with a single click.
|
|
8259
|
+
*
|
|
8260
|
+
* The API is very similar to [class@Gtk.Button] and [class@Gtk.MenuButton], see
|
|
8261
|
+
* their documentation for details.
|
|
8262
|
+
*
|
|
8263
|
+
* ## CSS nodes
|
|
8264
|
+
*
|
|
8265
|
+
* ```
|
|
8266
|
+
* splitbutton[.image-button][.text-button]
|
|
8267
|
+
* ├── button
|
|
8268
|
+
* │ ╰── <content>
|
|
8269
|
+
* ├── separator
|
|
8270
|
+
* ╰── menubutton
|
|
8271
|
+
* ╰── button.toggle
|
|
8272
|
+
* ╰── arrow
|
|
8273
|
+
* ```
|
|
8274
|
+
*
|
|
8275
|
+
* `AdwSplitButton`'s CSS node is called `splitbutton`. It contains the css
|
|
8276
|
+
* nodes: `button`, `separator`, `menubutton`. See [class@Gtk.MenuButton]
|
|
8277
|
+
* documentation for the `menubutton` contents.
|
|
8278
|
+
*
|
|
8279
|
+
* The main CSS node will contain the `.image-button` or `.text-button` style
|
|
8280
|
+
* classes matching the button contents. The nested button nodes will never
|
|
8281
|
+
* contain them.
|
|
8282
|
+
*
|
|
8283
|
+
* ## Style classes
|
|
8284
|
+
*
|
|
8285
|
+
* `AdwSplitButton` can use some of the same style classes as [class@Gtk.Button]:
|
|
8286
|
+
*
|
|
8287
|
+
* - `.suggested-action`
|
|
8288
|
+
* - `.destructive-action`
|
|
8289
|
+
* - `.flat`
|
|
8290
|
+
* - `.raised`
|
|
8291
|
+
*
|
|
8292
|
+
* Other style classes, like `.pill`, cannot be used.
|
|
8293
|
+
*
|
|
8294
|
+
* ## Accessibility
|
|
8295
|
+
*
|
|
8296
|
+
* `AdwSplitButton` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
8297
|
+
*/
|
|
8298
|
+
export const AdwSplitButton = {
|
|
8299
|
+
Root: "AdwSplitButton.Root",
|
|
8300
|
+
Child: "AdwSplitButton.Child",
|
|
8301
|
+
Popover: "AdwSplitButton.Popover",
|
|
8302
|
+
};
|
|
8303
|
+
/**
|
|
8304
|
+
* A best fit container.
|
|
8305
|
+
*
|
|
8306
|
+
*
|
|
8307
|
+
*
|
|
8308
|
+
*
|
|
8309
|
+
* The `AdwSqueezer` widget is a container which only shows the first of its
|
|
8310
|
+
* children that fits in the available size. It is convenient to offer different
|
|
8311
|
+
* widgets to represent the same data with different levels of detail, making
|
|
8312
|
+
* the widget seem to squeeze itself to fit in the available space.
|
|
8313
|
+
*
|
|
8314
|
+
* Transitions between children can be animated as fades. This can be controlled
|
|
8315
|
+
* with [property@Squeezer:transition-type].
|
|
8316
|
+
*
|
|
8317
|
+
* ## CSS nodes
|
|
8318
|
+
*
|
|
8319
|
+
* `AdwSqueezer` has a single CSS node with name `squeezer`.
|
|
8320
|
+
*/
|
|
8321
|
+
export const AdwSqueezer = "AdwSqueezer";
|
|
8322
|
+
/**
|
|
8323
|
+
* A page used for empty/error states and similar use-cases.
|
|
8324
|
+
*
|
|
8325
|
+
*
|
|
8326
|
+
*
|
|
8327
|
+
* The `AdwStatusPage` widget can have an icon, a title, a description and a
|
|
8328
|
+
* custom widget which is displayed below them.
|
|
8329
|
+
*
|
|
8330
|
+
* ## CSS nodes
|
|
8331
|
+
*
|
|
8332
|
+
* `AdwStatusPage` has a main CSS node with name `statuspage`.
|
|
8333
|
+
*
|
|
8334
|
+
* When setting an [class@SpinnerPaintable] as [property@StatusPage:paintable],
|
|
8335
|
+
* the main nodes gains the `.spinner` style class for a more compact
|
|
8336
|
+
* appearance.
|
|
8337
|
+
*
|
|
8338
|
+
* ## Style classes
|
|
8339
|
+
*
|
|
8340
|
+
* `AdwStatusPage` can use the
|
|
8341
|
+
* `.compact` style class for when it
|
|
8342
|
+
* needs to fit into a small space such a sidebar or a popover, similar to when
|
|
8343
|
+
* using a spinner as the paintable.
|
|
8344
|
+
*/
|
|
8345
|
+
export const AdwStatusPage = "AdwStatusPage";
|
|
8346
|
+
/**
|
|
8347
|
+
* A [class@Gtk.ListBoxRow] used to represent two states.
|
|
8348
|
+
*
|
|
8349
|
+
*
|
|
8350
|
+
*
|
|
8351
|
+
* The `AdwSwitchRow` widget contains a [class@Gtk.Switch] that allows the user
|
|
8352
|
+
* to select between two states: "on" or "off". When activated, the row will
|
|
8353
|
+
* invert its active state.
|
|
8354
|
+
*
|
|
8355
|
+
* The user can control the switch by activating the row or by dragging on the
|
|
8356
|
+
* switch handle.
|
|
8357
|
+
*
|
|
8358
|
+
* See [class@Gtk.Switch] for details.
|
|
8359
|
+
*
|
|
8360
|
+
* Example of an `AdwSwitchRow` UI definition:
|
|
8361
|
+
* ```xml
|
|
8362
|
+
* <object class="AdwSwitchRow">
|
|
8363
|
+
* <property name="title" translatable="yes">Switch Row`</property>`
|
|
8364
|
+
* <signal name="notify::active" handler="switch_row_notify_active_cb"/>
|
|
8365
|
+
* `</object>`
|
|
8366
|
+
* ```
|
|
8367
|
+
*
|
|
8368
|
+
* The [property@SwitchRow:active] property should be connected to in order to
|
|
8369
|
+
* monitor changes to the active state.
|
|
8370
|
+
*
|
|
8371
|
+
* ## Accessibility
|
|
8372
|
+
*
|
|
8373
|
+
* `AdwSwitchRow` uses the `GTK_ACCESSIBLE_ROLE_SWITCH` role.
|
|
8374
|
+
*/
|
|
8375
|
+
export const AdwSwitchRow = "AdwSwitchRow";
|
|
8376
|
+
/**
|
|
8377
|
+
* A tab bar for [class@TabView].
|
|
8378
|
+
*
|
|
8379
|
+
*
|
|
8380
|
+
*
|
|
8381
|
+
* The `AdwTabBar` widget is a tab bar that can be used with conjunction with
|
|
8382
|
+
* `AdwTabView`. It is typically used as a top bar within [class@ToolbarView].
|
|
8383
|
+
*
|
|
8384
|
+
* `AdwTabBar` can autohide and can optionally contain action widgets on both
|
|
8385
|
+
* sides of the tabs.
|
|
8386
|
+
*
|
|
8387
|
+
* When there's not enough space to show all the tabs, `AdwTabBar` will scroll
|
|
8388
|
+
* them. Pinned tabs always stay visible and aren't a part of the scrollable
|
|
8389
|
+
* area.
|
|
8390
|
+
*
|
|
8391
|
+
* ## CSS nodes
|
|
8392
|
+
*
|
|
8393
|
+
* `AdwTabBar` has a single CSS node with name `tabbar`.
|
|
8394
|
+
*
|
|
8395
|
+
* ## Style classes
|
|
8396
|
+
*
|
|
8397
|
+
* By default `AdwTabBar` look like a part of an `AdwHeaderBar` and is intended
|
|
8398
|
+
* to be used directly attached to one or used as a [class@ToolbarView] toolbar.
|
|
8399
|
+
* The `.inline` style class removes its background,
|
|
8400
|
+
* so that it can be used in different contexts instead.
|
|
8401
|
+
*/
|
|
8402
|
+
export const AdwTabBar = {
|
|
8403
|
+
Root: "AdwTabBar.Root",
|
|
8404
|
+
EndActionWidget: "AdwTabBar.EndActionWidget",
|
|
8405
|
+
StartActionWidget: "AdwTabBar.StartActionWidget",
|
|
8406
|
+
};
|
|
8407
|
+
/**
|
|
8408
|
+
* A button that displays the number of [class@TabView] pages.
|
|
8409
|
+
*
|
|
8410
|
+
*
|
|
8411
|
+
*
|
|
8412
|
+
* `AdwTabButton` is a button that displays the number of pages in a given
|
|
8413
|
+
* `AdwTabView`, as well as whether one of the inactive pages needs attention.
|
|
8414
|
+
*
|
|
8415
|
+
* It's intended to be used as a visible indicator when there's no visible tab
|
|
8416
|
+
* bar, typically opening an [class@TabOverview] on click, e.g. via the
|
|
8417
|
+
* `overview.open` action name:
|
|
8418
|
+
*
|
|
8419
|
+
* ```xml
|
|
8420
|
+
* <object class="AdwTabButton">
|
|
8421
|
+
* <property name="view">view`</property>`
|
|
8422
|
+
* <property name="action-name">overview.open`</property>`
|
|
8423
|
+
* `</object>`
|
|
8424
|
+
* ```
|
|
8425
|
+
*
|
|
8426
|
+
* ## CSS nodes
|
|
8427
|
+
*
|
|
8428
|
+
* `AdwTabButton` has a main CSS node with name `tabbutton`.
|
|
8429
|
+
*
|
|
8430
|
+
* # Accessibility
|
|
8431
|
+
*
|
|
8432
|
+
* `AdwTabButton` uses the `GTK_ACCESSIBLE_ROLE_BUTTON` role.
|
|
8433
|
+
*/
|
|
8434
|
+
export const AdwTabButton = "AdwTabButton";
|
|
8435
|
+
/**
|
|
8436
|
+
* A tab overview for [class@TabView].
|
|
8437
|
+
*
|
|
8438
|
+
*
|
|
8439
|
+
*
|
|
8440
|
+
* `AdwTabOverview` is a widget that can display tabs from an `AdwTabView` in a
|
|
8441
|
+
* grid.
|
|
8442
|
+
*
|
|
8443
|
+
* `AdwTabOverview` shows a thumbnail for each tab. By default thumbnails are
|
|
8444
|
+
* static for all pages except the selected one. They can be made always live
|
|
8445
|
+
* by setting [property@TabPage:live-thumbnail] to `TRUE`, or refreshed with
|
|
8446
|
+
* [method@TabPage.invalidate_thumbnail] or
|
|
8447
|
+
* [method@TabView.invalidate_thumbnails] otherwise.
|
|
8448
|
+
*
|
|
8449
|
+
* If the pages are too tall or too wide, the thumbnails will be cropped; use
|
|
8450
|
+
* [property@TabPage:thumbnail-xalign] and [property@TabPage:thumbnail-yalign] to
|
|
8451
|
+
* control which part of the page should be visible in this case.
|
|
8452
|
+
*
|
|
8453
|
+
* Pinned tabs are shown as smaller cards without thumbnails above the other
|
|
8454
|
+
* tabs. Unlike in [class@TabBar], they still have titles, as well as an unpin
|
|
8455
|
+
* button.
|
|
8456
|
+
*
|
|
8457
|
+
* `AdwTabOverview` provides search in open tabs. It searches in tab titles and
|
|
8458
|
+
* tooltips, as well as [property@TabPage:keyword].
|
|
8459
|
+
*
|
|
8460
|
+
* If [property@TabOverview:enable-new-tab] is set to `TRUE`, a new tab button
|
|
8461
|
+
* will be shown. Connect to the [signal@TabOverview::create-tab] signal to use
|
|
8462
|
+
* it.
|
|
8463
|
+
*
|
|
8464
|
+
* [property@TabOverview:secondary-menu] can be used to provide a secondary menu
|
|
8465
|
+
* for the overview. Use it to add extra actions, e.g. to open a new window or
|
|
8466
|
+
* undo closed tab.
|
|
8467
|
+
*
|
|
8468
|
+
* `AdwTabOverview` is intended to be used as the direct child of the window,
|
|
8469
|
+
* with the rest of the window contents set as the [property@TabOverview:child].
|
|
8470
|
+
* The child is expected to contain an [class@TabView].
|
|
8471
|
+
*
|
|
8472
|
+
* `AdwTabOverview` shows window buttons by default. They can be disabled by
|
|
8473
|
+
* setting [property@TabOverview:show-start-title-buttons] and/or
|
|
8474
|
+
* [property@TabOverview:show-start-title-buttons] and/or
|
|
8475
|
+
* [property@TabOverview:show-end-title-buttons] to `FALSE`.
|
|
8476
|
+
*
|
|
8477
|
+
* If search and window buttons are disabled, and secondary menu is not set, the
|
|
8478
|
+
* header bar will be hidden.
|
|
8479
|
+
*
|
|
8480
|
+
* ## Actions
|
|
8481
|
+
*
|
|
8482
|
+
* `AdwTabOverview` defines the `overview.open` and `overview.close` actions for
|
|
8483
|
+
* opening and closing itself. They can be convenient when used together with
|
|
8484
|
+
* [class@TabButton].
|
|
8485
|
+
*
|
|
8486
|
+
* ## CSS nodes
|
|
8487
|
+
*
|
|
8488
|
+
* `AdwTabOverview` has a single CSS node with name `taboverview`.
|
|
8489
|
+
*/
|
|
8490
|
+
export const AdwTabOverview = "AdwTabOverview";
|
|
8491
|
+
/**
|
|
8492
|
+
* A dynamic tabbed container.
|
|
8493
|
+
*
|
|
8494
|
+
* `AdwTabView` is a container which shows one child at a time. While it
|
|
8495
|
+
* provides keyboard shortcuts for switching between pages, it does not provide
|
|
8496
|
+
* a visible tab switcher and relies on external widgets for that, such as
|
|
8497
|
+
* [class@TabBar], [class@TabOverview] and [class@TabButton].
|
|
8498
|
+
*
|
|
8499
|
+
* `AdwTabView` maintains a [class@TabPage] object for each page, which holds
|
|
8500
|
+
* additional per-page properties. You can obtain the `AdwTabPage` for a page
|
|
8501
|
+
* with [method@TabView.get_page], and as the return value for
|
|
8502
|
+
* [method@TabView.append] and other functions for adding children.
|
|
8503
|
+
*
|
|
8504
|
+
* `AdwTabView` only aims to be useful for dynamic tabs in multi-window
|
|
8505
|
+
* document-based applications, such as web browsers, file managers, text
|
|
8506
|
+
* editors or terminals. It does not aim to replace [class@Gtk.Notebook] for use
|
|
8507
|
+
* cases such as tabbed dialogs.
|
|
8508
|
+
*
|
|
8509
|
+
* As such, it does not support disabling page reordering or detaching.
|
|
8510
|
+
*
|
|
8511
|
+
* `AdwTabView` adds a number of global page switching and reordering shortcuts.
|
|
8512
|
+
* The [property@TabView:shortcuts] property can be used to manage them.
|
|
8513
|
+
*
|
|
8514
|
+
* See [flags@TabViewShortcuts] for the list of the available shortcuts. All of
|
|
8515
|
+
* the shortcuts are enabled by default.
|
|
8516
|
+
*
|
|
8517
|
+
* [method@TabView.add_shortcuts] and [method@TabView.remove_shortcuts] can be
|
|
8518
|
+
* used to manage shortcuts in a convenient way, for example:
|
|
8519
|
+
*
|
|
8520
|
+
* ```c
|
|
8521
|
+
* adw_tab_view_remove_shortcuts (view, ADW_TAB_VIEW_SHORTCUT_CONTROL_HOME |
|
|
8522
|
+
* ADW_TAB_VIEW_SHORTCUT_CONTROL_END);
|
|
8523
|
+
* ```
|
|
8524
|
+
*
|
|
8525
|
+
* ## CSS nodes
|
|
8526
|
+
*
|
|
8527
|
+
* `AdwTabView` has a main CSS node with the name `tabview`.
|
|
8528
|
+
*
|
|
8529
|
+
* ## Accessibility
|
|
8530
|
+
*
|
|
8531
|
+
* `AdwTabView` uses the `GTK_ACCESSIBLE_ROLE_TAB_PANEL` for the tab pages which
|
|
8532
|
+
* are the accessible parent objects of the child widgets.
|
|
8533
|
+
*/
|
|
8534
|
+
export const AdwTabView = "AdwTabView";
|
|
8535
|
+
/**
|
|
8536
|
+
* A widget showing toasts above its content.
|
|
8537
|
+
*
|
|
8538
|
+
*
|
|
8539
|
+
*
|
|
8540
|
+
* Much like [class@Gtk.Overlay], `AdwToastOverlay` is a container with a single
|
|
8541
|
+
* main child, on top of which it can display a [class@Toast], overlaid.
|
|
8542
|
+
* Toasts can be shown with [method@ToastOverlay.add_toast].
|
|
8543
|
+
*
|
|
8544
|
+
* Use [method@ToastOverlay.dismiss_all] to dismiss all toasts at once, or
|
|
8545
|
+
* [method@Toast.dismiss] to dismiss a single toast.
|
|
8546
|
+
*
|
|
8547
|
+
* See [class@Toast] for details.
|
|
8548
|
+
*
|
|
8549
|
+
* ## CSS nodes
|
|
8550
|
+
*
|
|
8551
|
+
* ```
|
|
8552
|
+
* toastoverlay
|
|
8553
|
+
* ├── [child]
|
|
8554
|
+
* ├── toast
|
|
8555
|
+
* ┊ ├── widget
|
|
8556
|
+
* ┊ │ ├── [label.heading]
|
|
8557
|
+
* │ ╰── [custom title]
|
|
8558
|
+
* ├── [button]
|
|
8559
|
+
* ╰── button.circular.flat
|
|
8560
|
+
* ```
|
|
8561
|
+
*
|
|
8562
|
+
* `AdwToastOverlay`'s CSS node is called `toastoverlay`. It contains the child,
|
|
8563
|
+
* as well as zero or more `toast` subnodes.
|
|
8564
|
+
*
|
|
8565
|
+
* Each of the `toast` nodes contains a `widget` subnode, optionally a `button`
|
|
8566
|
+
* subnode, and another `button` subnode with `.circular` and `.flat` style
|
|
8567
|
+
* classes.
|
|
8568
|
+
*
|
|
8569
|
+
* The `widget` subnode contains a `label` subnode with the `.heading` style
|
|
8570
|
+
* class, or a custom widget provided by the application.
|
|
8571
|
+
*
|
|
8572
|
+
* ## Accessibility
|
|
8573
|
+
*
|
|
8574
|
+
* `AdwToastOverlay` uses the [enum@Gtk.AccessibleRole.GROUP] role.
|
|
8575
|
+
*/
|
|
8576
|
+
export const AdwToastOverlay = "AdwToastOverlay";
|
|
8577
|
+
/**
|
|
8578
|
+
* A group of exclusive toggles.
|
|
8579
|
+
*
|
|
8580
|
+
*
|
|
8581
|
+
*
|
|
8582
|
+
* `AdwToggleGroup` presents a set of exclusive toggles, represented as
|
|
8583
|
+
* [class@Toggle] objects. Each toggle can display an icon, a label, an icon
|
|
8584
|
+
* and a label, or a custom child.
|
|
8585
|
+
*
|
|
8586
|
+
* Toggles are indexed by their position, with the first toggle being equivalent
|
|
8587
|
+
* to 0, and so on. Use the [property@ToggleGroup:active] to get that position.
|
|
8588
|
+
*
|
|
8589
|
+
* Toggles can also have optional names, set via the [property@Toggle:name]
|
|
8590
|
+
* property. The name of the active toggle can be accessed via the
|
|
8591
|
+
* [property@ToggleGroup:active-name] property.
|
|
8592
|
+
*
|
|
8593
|
+
* `AdwToggle` objects can be retrieved via their index or name, using
|
|
8594
|
+
* [method@ToggleGroup.get_toggle] or [method@ToggleGroup.get_toggle_by_name]
|
|
8595
|
+
* respectively. `AdwToggleGroup` also provides a [iface@Gtk.SelectionModel] of
|
|
8596
|
+
* its toggles via the [property@ToggleGroup:toggles] property.
|
|
8597
|
+
*
|
|
8598
|
+
* `AdwToggleGroup` is orientable, and the toggles can be displayed horizontally
|
|
8599
|
+
* or vertically. This is mostly useful for icon-only toggles.
|
|
8600
|
+
*
|
|
8601
|
+
* Use the [property@ToggleGroup:homogeneous] property to make the toggles take
|
|
8602
|
+
* the same size, and the [property@ToggleGroup:can-shrink] to control whether
|
|
8603
|
+
* the toggles can ellipsize.
|
|
8604
|
+
*
|
|
8605
|
+
* Example of an `AdwToggleGroup` UI definition:
|
|
8606
|
+
*
|
|
8607
|
+
* ```xml
|
|
8608
|
+
* <object class="AdwToggleGroup">
|
|
8609
|
+
* <property name="active-name">picture`</property>`
|
|
8610
|
+
* `<child>`
|
|
8611
|
+
* <object class="AdwToggle">
|
|
8612
|
+
* <property name="icon-name">camera-photo-symbolic`</property>`
|
|
8613
|
+
* <property name="tooltip" translatable="yes">Picture Mode`</property>`
|
|
8614
|
+
* <property name="name">picture`</property>`
|
|
8615
|
+
* `</object>`
|
|
8616
|
+
* `</child>`
|
|
8617
|
+
* `<child>`
|
|
8618
|
+
* <object class="AdwToggle">
|
|
8619
|
+
* <property name="icon-name">camera-video-symbolic`</property>`
|
|
8620
|
+
* <property name="tooltip" translatable="yes">Recording Mode`</property>`
|
|
8621
|
+
* <property name="name">recording`</property>`
|
|
8622
|
+
* `</object>`
|
|
8623
|
+
* `</child>`
|
|
8624
|
+
* `</object>`
|
|
8625
|
+
* ```
|
|
8626
|
+
*
|
|
8627
|
+
* See also: [class@InlineViewSwitcher].
|
|
8628
|
+
*
|
|
8629
|
+
* ## CSS nodes
|
|
8630
|
+
*
|
|
8631
|
+
* `AdwToggleGroup` has a main CSS node with the name `toggle-group`.
|
|
8632
|
+
*
|
|
8633
|
+
* Its toggles have CSS nodes with the name `toggle`, and its separators have nodes
|
|
8634
|
+
* with the name `separator`.
|
|
8635
|
+
*
|
|
8636
|
+
* Toggle nodes will have a different style classes depending on their content:
|
|
8637
|
+
* `.text-button` for labels, `.image-button` for icons, `.image-text-button`
|
|
8638
|
+
* for both or no style class for custom children.
|
|
8639
|
+
*
|
|
8640
|
+
* The hidden separators use the `.hidden` style class.
|
|
8641
|
+
*
|
|
8642
|
+
* ## Style classes
|
|
8643
|
+
*
|
|
8644
|
+
* `AdwToggleGroup` can use the `.flat` style class
|
|
8645
|
+
* to remove its background and make it look like a group of buttons.
|
|
8646
|
+
*
|
|
8647
|
+
*
|
|
8648
|
+
*
|
|
8649
|
+
* It can also use the `.round` style class to make
|
|
8650
|
+
* its toggles and the group itself rounded.
|
|
8651
|
+
*
|
|
8652
|
+
*
|
|
8653
|
+
*
|
|
8654
|
+
* They can also be combined with each other.
|
|
8655
|
+
*
|
|
8656
|
+
*
|
|
8657
|
+
*
|
|
8658
|
+
* ## Accessibility
|
|
8659
|
+
*
|
|
8660
|
+
* `AdwToggleGroup` uses the `GTK_ACCESSIBLE_ROLE_RADIO_GROUP` role. Its toggles
|
|
8661
|
+
* use the `GTK_ACCESSIBLE_ROLE_RADIO` role.
|
|
8662
|
+
*/
|
|
8663
|
+
export const AdwToggleGroup = "AdwToggleGroup";
|
|
8664
|
+
/**
|
|
8665
|
+
* A widget containing a page, as well as top and/or bottom bars.
|
|
8666
|
+
*
|
|
8667
|
+
*
|
|
8668
|
+
*
|
|
8669
|
+
* `AdwToolbarView` has a single content widget and one or multiple top and
|
|
8670
|
+
* bottom bars, shown at the top and bottom sides respectively.
|
|
8671
|
+
*
|
|
8672
|
+
* Example of an `AdwToolbarView` UI definition:
|
|
8673
|
+
* ```xml
|
|
8674
|
+
* <object class="AdwToolbarView">
|
|
8675
|
+
* <child type="top">
|
|
8676
|
+
* <object class="AdwHeaderBar"/>
|
|
8677
|
+
* `</child>`
|
|
8678
|
+
* <property name="content">
|
|
8679
|
+
* <object class="AdwPreferencesPage">
|
|
8680
|
+
* <!-- ... -->
|
|
8681
|
+
* `</object>`
|
|
8682
|
+
* `</property>`
|
|
8683
|
+
* `</object>`
|
|
8684
|
+
* ```
|
|
8685
|
+
*
|
|
8686
|
+
* The following kinds of top and bottom bars are supported:
|
|
8687
|
+
*
|
|
8688
|
+
* - [class@HeaderBar]
|
|
8689
|
+
* - [class@TabBar]
|
|
8690
|
+
* - [class@ViewSwitcherBar]
|
|
8691
|
+
* - [class@Gtk.ActionBar]
|
|
8692
|
+
* - [class@Gtk.HeaderBar]
|
|
8693
|
+
* - [class@Gtk.PopoverMenuBar]
|
|
8694
|
+
* - [class@Gtk.SearchBar]
|
|
8695
|
+
* - Any [class@Gtk.Box] or a similar widget with the
|
|
8696
|
+
* `.toolbar` style class
|
|
8697
|
+
*
|
|
8698
|
+
* By default, top and bottom bars are flat and scrolling content has a subtle
|
|
8699
|
+
* undershoot shadow, same as when using the
|
|
8700
|
+
* `.undershoot-top` and
|
|
8701
|
+
* `.undershoot-bottom` style
|
|
8702
|
+
* classes. This works well in most cases, e.g. with [class@StatusPage] or
|
|
8703
|
+
* [class@PreferencesPage], where the background at the top and bottom parts of
|
|
8704
|
+
* the page is uniform. Additionally, windows with sidebars should always use
|
|
8705
|
+
* this style.
|
|
8706
|
+
*
|
|
8707
|
+
* [property@ToolbarView:top-bar-style] and
|
|
8708
|
+
* [property@ToolbarView:bottom-bar-style] properties can be used add an opaque
|
|
8709
|
+
* background and a persistent shadow to top and bottom bars, this can be useful
|
|
8710
|
+
* for content such as utility panes,
|
|
8711
|
+
* where some elements are adjacent to the top/bottom bars, or [class@TabView],
|
|
8712
|
+
* where each page can have a different background.
|
|
8713
|
+
*
|
|
8714
|
+
*
|
|
8715
|
+
*
|
|
8716
|
+
*
|
|
8717
|
+
*
|
|
8718
|
+
* `AdwToolbarView` ensures the top and bottom bars have consistent backdrop
|
|
8719
|
+
* styles and vertical spacing. For comparison:
|
|
8720
|
+
*
|
|
8721
|
+
*
|
|
8722
|
+
*
|
|
8723
|
+
*
|
|
8724
|
+
* Any top and bottom bars can also be dragged to move the window, equivalent
|
|
8725
|
+
* to putting them into a [class@Gtk.WindowHandle].
|
|
8726
|
+
*
|
|
8727
|
+
* Content is typically place between top and bottom bars, but can also extend
|
|
8728
|
+
* behind them. This is controlled with the
|
|
8729
|
+
* [property@ToolbarView:extend-content-to-top-edge] and
|
|
8730
|
+
* [property@ToolbarView:extend-content-to-bottom-edge] properties.
|
|
8731
|
+
*
|
|
8732
|
+
* Top and bottom bars can be hidden and revealed with an animation using the
|
|
8733
|
+
* [property@ToolbarView:reveal-top-bars] and
|
|
8734
|
+
* [property@ToolbarView:reveal-bottom-bars] properties.
|
|
8735
|
+
*
|
|
8736
|
+
* ## `AdwToolbarView` as `GtkBuildable`
|
|
8737
|
+
*
|
|
8738
|
+
* The `AdwToolbarView` implementation of the [iface@Gtk.Buildable] interface
|
|
8739
|
+
* supports adding a top bar by specifying “top” as the “type” attribute of a
|
|
8740
|
+
* ``<child>`` element, or adding a bottom bar by specifying “bottom”.
|
|
8741
|
+
*
|
|
8742
|
+
* ## Accessibility
|
|
8743
|
+
*
|
|
8744
|
+
* `AdwToolbarView` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
8745
|
+
*/
|
|
8746
|
+
export const AdwToolbarView = {
|
|
8747
|
+
Root: "AdwToolbarView.Root",
|
|
8748
|
+
Content: "AdwToolbarView.Content",
|
|
8749
|
+
Top: "AdwToolbarView.Top",
|
|
8750
|
+
Bottom: "AdwToolbarView.Bottom",
|
|
8751
|
+
};
|
|
8752
|
+
/**
|
|
8753
|
+
* A view container for [class@ViewSwitcher].
|
|
8754
|
+
*
|
|
8755
|
+
* `AdwViewStack` is a container which only shows one page at a time.
|
|
8756
|
+
* It is typically used to hold an application's main views.
|
|
8757
|
+
*
|
|
8758
|
+
* It doesn't provide a way to transition between pages.
|
|
8759
|
+
* Instead, a separate widget such as [class@ViewSwitcher] can be used with
|
|
8760
|
+
* `AdwViewStack` to provide this functionality.
|
|
8761
|
+
*
|
|
8762
|
+
* `AdwViewStack` pages can have a title, an icon, an attention request, and a
|
|
8763
|
+
* numbered badge that [class@ViewSwitcher] will use to let users identify which
|
|
8764
|
+
* page is which. Set them using the [property@ViewStackPage:title],
|
|
8765
|
+
* [property@ViewStackPage:icon-name],
|
|
8766
|
+
* [property@ViewStackPage:needs-attention], and
|
|
8767
|
+
* [property@ViewStackPage:badge-number] properties.
|
|
8768
|
+
*
|
|
8769
|
+
* Unlike [class@Gtk.Stack], transitions between views can only be animated via
|
|
8770
|
+
* a crossfade and size changes are always interpolated. Animations are disabled
|
|
8771
|
+
* by default. Use [property@ViewStack:enable-transitions] to enable them.
|
|
8772
|
+
*
|
|
8773
|
+
* `AdwViewStack` maintains a [class@ViewStackPage] object for each added child,
|
|
8774
|
+
* which holds additional per-child properties. You obtain the
|
|
8775
|
+
* [class@ViewStackPage] for a child with [method@ViewStack.get_page] and you
|
|
8776
|
+
* can obtain a [iface@Gtk.SelectionModel] containing all the pages with
|
|
8777
|
+
* [method@ViewStack.get_pages].
|
|
8778
|
+
*
|
|
8779
|
+
* ## AdwViewStack as GtkBuildable
|
|
8780
|
+
*
|
|
8781
|
+
* To set child-specific properties in a .ui file, create
|
|
8782
|
+
* [class@ViewStackPage] objects explicitly, and set the child widget as a
|
|
8783
|
+
* property on it:
|
|
8784
|
+
*
|
|
8785
|
+
* ```xml
|
|
8786
|
+
* <object class="AdwViewStack" id="stack">
|
|
8787
|
+
* `<child>`
|
|
8788
|
+
* <object class="AdwViewStackPage">
|
|
8789
|
+
* <property name="name">overview`</property>`
|
|
8790
|
+
* <property name="title">Overview`</property>`
|
|
8791
|
+
* <property name="child">
|
|
8792
|
+
* <object class="AdwStatusPage">
|
|
8793
|
+
* <property name="title">Welcome!`</property>`
|
|
8794
|
+
* `</object>`
|
|
8795
|
+
* `</property>`
|
|
8796
|
+
* `</object>`
|
|
8797
|
+
* `</child>`
|
|
8798
|
+
* `</object>`
|
|
8799
|
+
* ```
|
|
8800
|
+
*
|
|
8801
|
+
* ## CSS nodes
|
|
8802
|
+
*
|
|
8803
|
+
* `AdwViewStack` has a single CSS node named `stack`.
|
|
8804
|
+
*
|
|
8805
|
+
* ## Accessibility
|
|
8806
|
+
*
|
|
8807
|
+
* `AdwViewStack` uses the `GTK_ACCESSIBLE_ROLE_TAB_PANEL` for the stack pages
|
|
8808
|
+
* which are the accessible parent objects of the child widgets.
|
|
8809
|
+
*/
|
|
8810
|
+
export const AdwViewStack = {
|
|
8811
|
+
Root: "AdwViewStack.Root",
|
|
8812
|
+
VisibleChild: "AdwViewStack.VisibleChild",
|
|
8813
|
+
};
|
|
8814
|
+
/**
|
|
8815
|
+
* An adaptive view switcher.
|
|
8816
|
+
*
|
|
8817
|
+
*
|
|
8818
|
+
*
|
|
8819
|
+
* An adaptive view switcher designed to switch between multiple views
|
|
8820
|
+
* contained in a [class@ViewStack] in a similar fashion to
|
|
8821
|
+
* [class@Gtk.StackSwitcher].
|
|
8822
|
+
*
|
|
8823
|
+
* `AdwViewSwitcher` buttons always have an icon and a label. They can be
|
|
8824
|
+
* displayed side by side, or icon on top of the label. This can be controlled
|
|
8825
|
+
* via the [property@ViewSwitcher:policy] property.
|
|
8826
|
+
*
|
|
8827
|
+
* `AdwViewSwitcher` is intended to be used in a header bar together with
|
|
8828
|
+
* [class@ViewSwitcherBar] at the bottom of the window, and a [class@Breakpoint]
|
|
8829
|
+
* showing the view switcher bar on narrow sizes, while removing the view
|
|
8830
|
+
* switcher from the header bar, as follows:
|
|
8831
|
+
*
|
|
8832
|
+
* ```xml
|
|
8833
|
+
* <object class="AdwWindow">
|
|
8834
|
+
* `<child>`
|
|
8835
|
+
* <object class="AdwBreakpoint">
|
|
8836
|
+
* <condition>max-width: 550sp</condition>
|
|
8837
|
+
* <setter object="switcher_bar" property="reveal">True</setter>
|
|
8838
|
+
* <setter object="header_bar" property="title-widget"/>
|
|
8839
|
+
* `</object>`
|
|
8840
|
+
* `</child>`
|
|
8841
|
+
* <property name="content">
|
|
8842
|
+
* <object class="AdwToolbarView">
|
|
8843
|
+
* <child type="top">
|
|
8844
|
+
* <object class="AdwHeaderBar" id="header_bar">
|
|
8845
|
+
* <property name="title-widget">
|
|
8846
|
+
* <object class="AdwViewSwitcher">
|
|
8847
|
+
* <property name="stack">stack`</property>`
|
|
8848
|
+
* <property name="policy">wide`</property>`
|
|
8849
|
+
* `</object>`
|
|
8850
|
+
* `</property>`
|
|
8851
|
+
* `</object>`
|
|
8852
|
+
* `</child>`
|
|
8853
|
+
* <property name="content">
|
|
8854
|
+
* <object class="AdwViewStack" id="stack"/>
|
|
8855
|
+
* `</property>`
|
|
8856
|
+
* <child type="bottom">
|
|
8857
|
+
* <object class="AdwViewSwitcherBar" id="switcher_bar">
|
|
8858
|
+
* <property name="stack">stack`</property>`
|
|
8859
|
+
* `</object>`
|
|
8860
|
+
* `</child>`
|
|
8861
|
+
* `</object>`
|
|
8862
|
+
* `</property>`
|
|
8863
|
+
* `</object>`
|
|
8864
|
+
* ```
|
|
8865
|
+
*
|
|
8866
|
+
* It's recommended to set [property@ViewSwitcher:policy] to
|
|
8867
|
+
* `ADW_VIEW_SWITCHER_POLICY_WIDE` in this case.
|
|
8868
|
+
*
|
|
8869
|
+
* You may have to adjust the breakpoint condition for your specific pages.
|
|
8870
|
+
*
|
|
8871
|
+
* ## CSS nodes
|
|
8872
|
+
*
|
|
8873
|
+
* `AdwViewSwitcher` has a single CSS node with name `viewswitcher`. It can have
|
|
8874
|
+
* the style classes `.wide` and `.narrow`, matching its policy.
|
|
8875
|
+
*
|
|
8876
|
+
* ## Accessibility
|
|
8877
|
+
*
|
|
8878
|
+
* `AdwViewSwitcher` uses the `GTK_ACCESSIBLE_ROLE_TAB_LIST` role and uses the
|
|
8879
|
+
* `GTK_ACCESSIBLE_ROLE_TAB` for its buttons.
|
|
8880
|
+
*/
|
|
8881
|
+
export const AdwViewSwitcher = "AdwViewSwitcher";
|
|
8882
|
+
/**
|
|
8883
|
+
* A view switcher action bar.
|
|
8884
|
+
*
|
|
8885
|
+
*
|
|
8886
|
+
*
|
|
8887
|
+
* An action bar letting you switch between multiple views contained in a
|
|
8888
|
+
* [class@ViewStack], via an [class@ViewSwitcher]. It is designed to be put at
|
|
8889
|
+
* the bottom of a window and to be revealed only on really narrow windows, e.g.
|
|
8890
|
+
* on mobile phones. It can't be revealed if there are less than two pages.
|
|
8891
|
+
*
|
|
8892
|
+
* `AdwViewSwitcherBar` is intended to be used together with
|
|
8893
|
+
* `AdwViewSwitcher` in a header bar, and a [class@Breakpoint] showing the view
|
|
8894
|
+
* switcher bar on narrow sizes, while removing the view switcher from the
|
|
8895
|
+
* header bar, as follows:
|
|
8896
|
+
*
|
|
8897
|
+
* ```xml
|
|
8898
|
+
* <object class="AdwWindow">
|
|
8899
|
+
* `<child>`
|
|
8900
|
+
* <object class="AdwBreakpoint">
|
|
8901
|
+
* <condition>max-width: 550sp</condition>
|
|
8902
|
+
* <setter object="switcher_bar" property="reveal">True</setter>
|
|
8903
|
+
* <setter object="header_bar" property="title-widget"/>
|
|
8904
|
+
* `</object>`
|
|
8905
|
+
* `</child>`
|
|
8906
|
+
* <property name="content">
|
|
8907
|
+
* <object class="AdwToolbarView">
|
|
8908
|
+
* <child type="top">
|
|
8909
|
+
* <object class="AdwHeaderBar" id="header_bar">
|
|
8910
|
+
* <property name="title-widget">
|
|
8911
|
+
* <object class="AdwViewSwitcher">
|
|
8912
|
+
* <property name="stack">stack`</property>`
|
|
8913
|
+
* <property name="policy">wide`</property>`
|
|
8914
|
+
* `</object>`
|
|
8915
|
+
* `</property>`
|
|
8916
|
+
* `</object>`
|
|
8917
|
+
* `</child>`
|
|
8918
|
+
* <property name="content">
|
|
8919
|
+
* <object class="AdwViewStack" id="stack"/>
|
|
8920
|
+
* `</property>`
|
|
8921
|
+
* <child type="bottom">
|
|
8922
|
+
* <object class="AdwViewSwitcherBar" id="switcher_bar">
|
|
8923
|
+
* <property name="stack">stack`</property>`
|
|
8924
|
+
* `</object>`
|
|
8925
|
+
* `</child>`
|
|
8926
|
+
* `</object>`
|
|
8927
|
+
* `</property>`
|
|
8928
|
+
* `</object>`
|
|
8929
|
+
* ```
|
|
8930
|
+
*
|
|
8931
|
+
* It's recommended to set [property@ViewSwitcher:policy] to
|
|
8932
|
+
* `ADW_VIEW_SWITCHER_POLICY_WIDE` in this case.
|
|
8933
|
+
*
|
|
8934
|
+
* You may have to adjust the breakpoint condition for your specific pages.
|
|
8935
|
+
*
|
|
8936
|
+
* ## CSS nodes
|
|
8937
|
+
*
|
|
8938
|
+
* `AdwViewSwitcherBar` has a single CSS node with name` viewswitcherbar`.
|
|
8939
|
+
*/
|
|
8940
|
+
export const AdwViewSwitcherBar = "AdwViewSwitcherBar";
|
|
8941
|
+
/**
|
|
8942
|
+
* A view switcher title.
|
|
8943
|
+
*
|
|
8944
|
+
*
|
|
8945
|
+
*
|
|
8946
|
+
* A widget letting you switch between multiple views contained by a
|
|
8947
|
+
* [class@ViewStack] via an [class@ViewSwitcher].
|
|
8948
|
+
*
|
|
8949
|
+
* It is designed to be used as the title widget of a [class@HeaderBar], and
|
|
8950
|
+
* will display the window's title when the window is too narrow to fit the view
|
|
8951
|
+
* switcher e.g. on mobile phones, or if there are less than two views.
|
|
8952
|
+
*
|
|
8953
|
+
* In order to center the title in narrow windows, the header bar should have
|
|
8954
|
+
* [property@HeaderBar:centering-policy] set to
|
|
8955
|
+
* `ADW_CENTERING_POLICY_STRICT`.
|
|
8956
|
+
*
|
|
8957
|
+
* `AdwViewSwitcherTitle` is intended to be used together with
|
|
8958
|
+
* [class@ViewSwitcherBar].
|
|
8959
|
+
*
|
|
8960
|
+
* A common use case is to bind the [property@ViewSwitcherBar:reveal] property
|
|
8961
|
+
* to [property@ViewSwitcherTitle:title-visible] to automatically reveal the
|
|
8962
|
+
* view switcher bar when the title label is displayed in place of the view
|
|
8963
|
+
* switcher, as follows:
|
|
8964
|
+
*
|
|
8965
|
+
* ```xml
|
|
8966
|
+
* <object class="AdwWindow">
|
|
8967
|
+
* <property name="content">
|
|
8968
|
+
* <object class="AdwToolbarView">
|
|
8969
|
+
* <child type="top">
|
|
8970
|
+
* <object class="AdwHeaderBar">
|
|
8971
|
+
* <property name="centering-policy">strict`</property>`
|
|
8972
|
+
* <property name="title-widget">
|
|
8973
|
+
* <object class="AdwViewSwitcherTitle" id="title">
|
|
8974
|
+
* <property name="stack">stack`</property>`
|
|
8975
|
+
* `</object>`
|
|
8976
|
+
* `</property>`
|
|
8977
|
+
* `</object>`
|
|
8978
|
+
* `</child>`
|
|
8979
|
+
* <property name="content">
|
|
8980
|
+
* <object class="AdwViewStack" id="stack"/>
|
|
8981
|
+
* `</property>`
|
|
8982
|
+
* <child type="bottom">
|
|
8983
|
+
* <object class="AdwViewSwitcherBar">
|
|
8984
|
+
* <property name="stack">stack`</property>`
|
|
8985
|
+
* <binding name="reveal">
|
|
8986
|
+
* <lookup name="title-visible">title</lookup>
|
|
8987
|
+
* </binding>
|
|
8988
|
+
* `</object>`
|
|
8989
|
+
* `</child>`
|
|
8990
|
+
* `</object>`
|
|
8991
|
+
* `</property>`
|
|
8992
|
+
* `</object>`
|
|
8993
|
+
* ```
|
|
8994
|
+
*
|
|
8995
|
+
* ## CSS nodes
|
|
8996
|
+
*
|
|
8997
|
+
* `AdwViewSwitcherTitle` has a single CSS node with name `viewswitchertitle`.
|
|
8998
|
+
*/
|
|
8999
|
+
export const AdwViewSwitcherTitle = "AdwViewSwitcherTitle";
|
|
9000
|
+
/**
|
|
9001
|
+
* A helper widget for setting a window's title and subtitle.
|
|
9002
|
+
*
|
|
9003
|
+
*
|
|
9004
|
+
*
|
|
9005
|
+
* `AdwWindowTitle` shows a title and subtitle. It's intended to be used as the
|
|
9006
|
+
* title child of [class@Gtk.HeaderBar] or [class@HeaderBar].
|
|
9007
|
+
*
|
|
9008
|
+
* ## CSS nodes
|
|
9009
|
+
*
|
|
9010
|
+
* `AdwWindowTitle` has a single CSS node with name `windowtitle`.
|
|
9011
|
+
*/
|
|
9012
|
+
export const AdwWindowTitle = "AdwWindowTitle";
|
|
9013
|
+
/**
|
|
9014
|
+
* A box-like widget that can wrap into multiple lines.
|
|
9015
|
+
*
|
|
9016
|
+
*
|
|
9017
|
+
*
|
|
9018
|
+
* `AdwWrapBox` is similar to [class@Gtk.Box], but can wrap lines when the
|
|
9019
|
+
* widgets cannot fit otherwise. Unlike [class@Gtk.FlowBox], the children aren't
|
|
9020
|
+
* arranged into a grid and behave more like words in a wrapping label.
|
|
9021
|
+
*
|
|
9022
|
+
* Like `GtkBox`, `AdwWrapBox` is orientable and has spacing:
|
|
9023
|
+
*
|
|
9024
|
+
* - [property@WrapBox:child-spacing] between children in the same line;
|
|
9025
|
+
* - [property@WrapBox:line-spacing] between lines.
|
|
9026
|
+
*
|
|
9027
|
+
* ::: note
|
|
9028
|
+
* Unlike `GtkBox`, `AdwWrapBox` cannot follow the CSS `border-spacing`
|
|
9029
|
+
* property.
|
|
9030
|
+
*
|
|
9031
|
+
* Use the [property@WrapBox:natural-line-length] property to determine the
|
|
9032
|
+
* layout's natural size, e.g. when using it in a [class@Gtk.Popover].
|
|
9033
|
+
*
|
|
9034
|
+
* Normally, a horizontal `AdwWrapBox` wraps left to right and top to bottom
|
|
9035
|
+
* for left-to-right languages. Both of these directions can be reversed, using
|
|
9036
|
+
* the [property@WrapBox:pack-direction] and [property@WrapBox:wrap-reverse]
|
|
9037
|
+
* properties. Additionally, the alignment of each line can be controlled with
|
|
9038
|
+
* the [property@WrapBox:align] property.
|
|
9039
|
+
*
|
|
9040
|
+
* Lines can be justified using the [property@WrapBox:justify] property, filling
|
|
9041
|
+
* the entire line by either increasing child size or spacing depending on the
|
|
9042
|
+
* value. Set [property@WrapBox:justify-last-line] to justify the last line as
|
|
9043
|
+
* well.
|
|
9044
|
+
*
|
|
9045
|
+
* By default, `AdwWrapBox` wraps as soon as the previous line cannot fit any
|
|
9046
|
+
* more children without shrinking them past their natural size. Set
|
|
9047
|
+
* [property@WrapBox:wrap-policy] to [enum@Adw.WrapPolicy.MINIMUM] to only wrap
|
|
9048
|
+
* once all the children in the previous line have been shrunk to their minimum
|
|
9049
|
+
* size.
|
|
9050
|
+
*
|
|
9051
|
+
* To make each line take the same amount of space, set
|
|
9052
|
+
* [property@WrapBox:line-homogeneous] to `TRUE`.
|
|
9053
|
+
*
|
|
9054
|
+
* Spacing and natural line length can scale with the text scale factor, use the
|
|
9055
|
+
* [property@WrapBox:child-spacing-unit], [property@WrapBox:line-spacing-unit]
|
|
9056
|
+
* and/or [property@WrapBox:natural-line-length-unit] properties to enable that
|
|
9057
|
+
* behavior.
|
|
9058
|
+
*
|
|
9059
|
+
* See [class@WrapLayout].
|
|
9060
|
+
*
|
|
9061
|
+
* ## CSS nodes
|
|
9062
|
+
*
|
|
9063
|
+
* `AdwWrapBox` uses a single CSS node with name `wrap-box`.
|
|
9064
|
+
*
|
|
9065
|
+
* ## Accessibility
|
|
9066
|
+
*
|
|
9067
|
+
* `AdwWrapBox` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
|
|
9068
|
+
*/
|
|
9069
|
+
export const AdwWrapBox = "AdwWrapBox";
|
|
9070
|
+
/**
|
|
9071
|
+
* Widget for single cell of completion proposal.
|
|
9072
|
+
*
|
|
9073
|
+
* The `GtkSourceCompletionCell` widget provides a container to display various
|
|
9074
|
+
* types of information with the completion display.
|
|
9075
|
+
*
|
|
9076
|
+
* Each proposal may consist of multiple cells depending on the complexity of
|
|
9077
|
+
* the proposal. For example, programming language proposals may contain a cell
|
|
9078
|
+
* for the "left-hand-side" of an operation along with the "typed-text" for a
|
|
9079
|
+
* function name and "parameters". They may also optionally set an icon to
|
|
9080
|
+
* signify the kind of result.
|
|
9081
|
+
*
|
|
9082
|
+
* A [iface@CompletionProvider] should implement the
|
|
9083
|
+
* [vfunc@CompletionProvider.display] virtual function to control
|
|
9084
|
+
* how to convert data from their [iface@CompletionProposal] to content for
|
|
9085
|
+
* the `GtkSourceCompletionCell`.
|
|
9086
|
+
*/
|
|
9087
|
+
export const GtkSourceCompletionCell = {
|
|
9088
|
+
Root: "GtkSourceCompletionCell.Root",
|
|
9089
|
+
Widget: "GtkSourceCompletionCell.Widget",
|
|
9090
|
+
};
|
|
9091
|
+
/**
|
|
9092
|
+
* Gutter object for [class@View].
|
|
9093
|
+
*
|
|
9094
|
+
* The `GtkSourceGutter` object represents the left or right gutter of the text
|
|
9095
|
+
* view. It is used by [class@View] to draw the line numbers and
|
|
9096
|
+
* [class@Mark]s that might be present on a line. By packing
|
|
9097
|
+
* additional [class@GutterRenderer] objects in the gutter, you can extend the
|
|
9098
|
+
* gutter with your own custom drawings.
|
|
9099
|
+
*
|
|
9100
|
+
* To get a `GtkSourceGutter`, use the [method@View.get_gutter] function.
|
|
9101
|
+
*
|
|
9102
|
+
* The gutter works very much the same way as cells rendered in a [class@Gtk.TreeView].
|
|
9103
|
+
* The concept is similar, with the exception that the gutter does not have an
|
|
9104
|
+
* underlying [iface@Gtk.TreeModel]. The builtin line number renderer is at position
|
|
9105
|
+
* %GTK_SOURCE_VIEW_GUTTER_POSITION_LINES (-30) and the marks renderer is at
|
|
9106
|
+
* %GTK_SOURCE_VIEW_GUTTER_POSITION_MARKS (-20). The gutter sorts the renderers
|
|
9107
|
+
* in ascending order, from left to right. So the marks are displayed on the
|
|
9108
|
+
* right of the line numbers.
|
|
9109
|
+
*/
|
|
9110
|
+
export const GtkSourceGutter = "GtkSourceGutter";
|
|
9111
|
+
/**
|
|
9112
|
+
* Gutter cell renderer.
|
|
9113
|
+
*
|
|
9114
|
+
* A `GtkSourceGutterRenderer` represents a column in a [class@Gutter]. The
|
|
9115
|
+
* column contains one cell for each visible line of the [class@Gtk.TextBuffer]. Due to
|
|
9116
|
+
* text wrapping, a cell can thus span multiple lines of the [class@Gtk.TextView]. In
|
|
9117
|
+
* this case, [enum@GutterRendererAlignmentMode] controls the alignment of
|
|
9118
|
+
* the cell.
|
|
9119
|
+
*
|
|
9120
|
+
* The gutter renderer is a [class@Gtk.Widget] and is measured using the normal widget
|
|
9121
|
+
* measurement facilities. The width of the gutter will be determined by the
|
|
9122
|
+
* measurements of the gutter renderers.
|
|
9123
|
+
*
|
|
9124
|
+
* The width of a gutter renderer generally takes into account the entire text
|
|
9125
|
+
* buffer. For instance, to display the line numbers, if the buffer contains 100
|
|
9126
|
+
* lines, the gutter renderer will always set its width such as three digits can
|
|
9127
|
+
* be printed, even if only the first 20 lines are shown. Another strategy is to
|
|
9128
|
+
* take into account only the visible lines. In this case, only two digits are
|
|
9129
|
+
* necessary to display the line numbers of the first 20 lines. To take another
|
|
9130
|
+
* example, the gutter renderer for [class@Mark]s doesn't need to take
|
|
9131
|
+
* into account the text buffer to announce its width. It only depends on the
|
|
9132
|
+
* icons size displayed in the gutter column.
|
|
9133
|
+
*
|
|
9134
|
+
* When the available size to render a cell is greater than the required size to
|
|
9135
|
+
* render the cell contents, the cell contents can be aligned horizontally and
|
|
9136
|
+
* vertically with [method@GutterRenderer.set_alignment_mode].
|
|
9137
|
+
*
|
|
9138
|
+
* The cells rendering occurs using [vfunc@Gtk.Widget.snapshot]. Implementations
|
|
9139
|
+
* should use `gtk_source_gutter_renderer_get_lines()` to retrieve information
|
|
9140
|
+
* about the lines to be rendered. To help with aligning content which takes
|
|
9141
|
+
* into account the padding and alignment of a cell, implementations may call
|
|
9142
|
+
* [method@GutterRenderer.align_cell] for a given line number with the
|
|
9143
|
+
* width and height measurement of the content they width to render.
|
|
9144
|
+
*/
|
|
9145
|
+
export const GtkSourceGutterRenderer = "GtkSourceGutterRenderer";
|
|
9146
|
+
/**
|
|
9147
|
+
* Renders a pixbuf in the gutter.
|
|
9148
|
+
*
|
|
9149
|
+
* A `GtkSourceGutterRendererPixbuf` can be used to render an image in a cell of
|
|
9150
|
+
* [class@Gutter].
|
|
9151
|
+
*/
|
|
9152
|
+
export const GtkSourceGutterRendererPixbuf = "GtkSourceGutterRendererPixbuf";
|
|
9153
|
+
/**
|
|
9154
|
+
* Renders text in the gutter.
|
|
9155
|
+
*
|
|
9156
|
+
* A `GtkSourceGutterRendererText` can be used to render text in a cell of
|
|
9157
|
+
* [class@Gutter].
|
|
9158
|
+
*/
|
|
9159
|
+
export const GtkSourceGutterRendererText = "GtkSourceGutterRendererText";
|
|
9160
|
+
/**
|
|
9161
|
+
* Display for interactive tooltips.
|
|
9162
|
+
*
|
|
9163
|
+
* `GtkSourceHoverDisplay` is a [class@Gtk.Widget] that may be populated with widgets
|
|
9164
|
+
* to be displayed to the user in interactive tooltips. The children widgets
|
|
9165
|
+
* are packed vertically using a [class@Gtk.Box].
|
|
9166
|
+
*
|
|
9167
|
+
* Implement the [iface@HoverProvider] interface to be notified of when
|
|
9168
|
+
* to populate a `GtkSourceHoverDisplay` on behalf of the user.
|
|
9169
|
+
*/
|
|
9170
|
+
export const GtkSourceHoverDisplay = "GtkSourceHoverDisplay";
|
|
9171
|
+
/**
|
|
9172
|
+
* Widget that displays a map for a specific [class@View].
|
|
9173
|
+
*
|
|
9174
|
+
* `GtkSourceMap` is a widget that maps the content of a [class@View] into
|
|
9175
|
+
* a smaller view so the user can have a quick overview of the whole document.
|
|
9176
|
+
*
|
|
9177
|
+
* This works by connecting a [class@View] to to the `GtkSourceMap` using
|
|
9178
|
+
* the [property@Map:view] property or [method@Map.set_view].
|
|
9179
|
+
*
|
|
9180
|
+
* `GtkSourceMap` is a [class@View] object. This means that you can add a
|
|
9181
|
+
* [class@GutterRenderer] to a gutter in the same way you would for a
|
|
9182
|
+
* [class@View]. One example might be a [class@GutterRenderer] that shows
|
|
9183
|
+
* which lines have changed in the document.
|
|
9184
|
+
*
|
|
9185
|
+
* Additionally, it is desirable to match the font of the `GtkSourceMap` and
|
|
9186
|
+
* the [class@View] used for editing. Therefore, [property@Map:font-desc]
|
|
9187
|
+
* should be used to set the target font. You will need to adjust this to the
|
|
9188
|
+
* desired font size for the map. A 1pt font generally seems to be an
|
|
9189
|
+
* appropriate font size. "Monospace 1" is the default. See
|
|
9190
|
+
* [method@Pango.FontDescription.set_size] for how to alter the size of an existing
|
|
9191
|
+
* [struct@Pango.FontDescription].
|
|
9192
|
+
*
|
|
9193
|
+
* When FontConfig is available, `GtkSourceMap` will try to use a bundled
|
|
9194
|
+
* "block" font to make the map more legible.
|
|
9195
|
+
*/
|
|
9196
|
+
export const GtkSourceMap = "GtkSourceMap";
|
|
9197
|
+
/**
|
|
9198
|
+
* A button to launch a style scheme selection dialog.
|
|
9199
|
+
*
|
|
9200
|
+
* The `GtkSourceStyleSchemeChooserButton` is a button which displays
|
|
9201
|
+
* the currently selected style scheme and allows to open a style scheme
|
|
9202
|
+
* selection dialog to change the style scheme.
|
|
9203
|
+
* It is suitable widget for selecting a style scheme in a preference dialog.
|
|
9204
|
+
*
|
|
9205
|
+
* In `GtkSourceStyleSchemeChooserButton`, a [class@StyleSchemeChooserWidget]
|
|
9206
|
+
* is used to provide a dialog for selecting style schemes.
|
|
9207
|
+
*/
|
|
9208
|
+
export const GtkSourceStyleSchemeChooserButton = "GtkSourceStyleSchemeChooserButton";
|
|
9209
|
+
/**
|
|
9210
|
+
* A widget for choosing style schemes.
|
|
9211
|
+
*
|
|
9212
|
+
* The `GtkSourceStyleSchemeChooserWidget` widget lets the user select a
|
|
9213
|
+
* style scheme. By default, the chooser presents a predefined list
|
|
9214
|
+
* of style schemes.
|
|
9215
|
+
*
|
|
9216
|
+
* To change the initially selected style scheme,
|
|
9217
|
+
* use [method@StyleSchemeChooser.set_style_scheme].
|
|
9218
|
+
* To get the selected style scheme
|
|
9219
|
+
* use [method@StyleSchemeChooser.get_style_scheme].
|
|
9220
|
+
*/
|
|
9221
|
+
export const GtkSourceStyleSchemeChooserWidget = "GtkSourceStyleSchemeChooserWidget";
|
|
9222
|
+
/**
|
|
9223
|
+
* A preview widget for [class@StyleScheme].
|
|
9224
|
+
*
|
|
9225
|
+
* This widget provides a convenient [class@Gtk.Widget] to preview a [class@StyleScheme].
|
|
9226
|
+
*
|
|
9227
|
+
* The [property@StyleSchemePreview:selected] property can be used to manage
|
|
9228
|
+
* the selection state of a single preview widget.
|
|
9229
|
+
*/
|
|
9230
|
+
export const GtkSourceStyleSchemePreview = "GtkSourceStyleSchemePreview";
|
|
9231
|
+
/**
|
|
9232
|
+
* Subclass of [class@Gtk.TextView].
|
|
9233
|
+
*
|
|
9234
|
+
* `GtkSourceView` is the main class of the GtkSourceView library.
|
|
9235
|
+
* Use a [class@Buffer] to display text with a `GtkSourceView`.
|
|
9236
|
+
*
|
|
9237
|
+
* This class provides:
|
|
9238
|
+
*
|
|
9239
|
+
* - Show the line numbers;
|
|
9240
|
+
* - Show a right margin;
|
|
9241
|
+
* - Highlight the current line;
|
|
9242
|
+
* - Indentation settings;
|
|
9243
|
+
* - Configuration for the Home and End keyboard keys;
|
|
9244
|
+
* - Configure and show line marks;
|
|
9245
|
+
* - And a few other things.
|
|
9246
|
+
*
|
|
9247
|
+
* An easy way to test all these features is to use the test-widget mini-program
|
|
9248
|
+
* provided in the GtkSourceView repository, in the tests/ directory.
|
|
9249
|
+
*
|
|
9250
|
+
* # GtkSourceView as GtkBuildable
|
|
9251
|
+
*
|
|
9252
|
+
* The GtkSourceView implementation of the [iface@Gtk.Buildable] interface exposes the
|
|
9253
|
+
* [property@View:completion] object with the internal-child "completion".
|
|
9254
|
+
*
|
|
9255
|
+
* An example of a UI definition fragment with GtkSourceView:
|
|
9256
|
+
* ```xml
|
|
9257
|
+
* <object class="GtkSourceView" id="source_view">
|
|
9258
|
+
* <property name="tab-width">4`</property>`
|
|
9259
|
+
* <property name="auto-indent">True`</property>`
|
|
9260
|
+
* <child internal-child="completion">
|
|
9261
|
+
* <object class="GtkSourceCompletion">
|
|
9262
|
+
* <property name="select-on-show">False`</property>`
|
|
9263
|
+
* `</object>`
|
|
9264
|
+
* `</child>`
|
|
9265
|
+
* `</object>`
|
|
9266
|
+
* ```
|
|
9267
|
+
*
|
|
9268
|
+
* # Changing the Font
|
|
9269
|
+
*
|
|
9270
|
+
* Gtk CSS provides the best way to change the font for a `GtkSourceView` in a
|
|
9271
|
+
* manner that allows for components like [class@Map] to scale the desired
|
|
9272
|
+
* font.
|
|
9273
|
+
*
|
|
9274
|
+
* ```c
|
|
9275
|
+
* GtkCssProvider *provider = gtk_css_provider_new ();
|
|
9276
|
+
* gtk_css_provider_load_from_string (provider,
|
|
9277
|
+
* "textview { font-family: Monospace; font-size: 8pt; }");
|
|
9278
|
+
* gtk_style_context_add_provider (gtk_widget_get_style_context (view),
|
|
9279
|
+
* GTK_STYLE_PROVIDER (provider),
|
|
9280
|
+
* GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
9281
|
+
* g_object_unref (provider);
|
|
9282
|
+
* ```
|
|
9283
|
+
* ```python
|
|
9284
|
+
* provider = Gtk.CssProvider()
|
|
9285
|
+
* provider.load_from_string("textview { font-family: Monospace; font-size: 8pt; }")
|
|
9286
|
+
* style_context = view.get_style_context()
|
|
9287
|
+
* style_context.add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
|
|
9288
|
+
* ```
|
|
9289
|
+
*
|
|
9290
|
+
* If you need to adjust the font or size of font within a portion of the
|
|
9291
|
+
* document only, you should use a [class@Gtk.TextTag] with the [property@Gtk.TextTag:family] or
|
|
9292
|
+
* [property@Gtk.TextTag:scale] set so that the font size may be scaled relative to
|
|
9293
|
+
* the default font set in CSS.
|
|
9294
|
+
*/
|
|
9295
|
+
export const GtkSourceView = "GtkSourceView";
|
|
9296
|
+
export const VteTerminal = {
|
|
9297
|
+
Root: "VteTerminal.Root",
|
|
9298
|
+
ContextMenu: "VteTerminal.ContextMenu",
|
|
9299
|
+
};
|
|
9300
|
+
/**
|
|
9301
|
+
* The central class of the WPE WebKit and WebKitGTK APIs.
|
|
9302
|
+
*
|
|
9303
|
+
* #WebKitWebView is the central class of the WPE WebKit and WebKitGTK
|
|
9304
|
+
* APIs. It is responsible for managing the drawing of the content and
|
|
9305
|
+
* forwarding of events. You can load any URI into the #WebKitWebView or
|
|
9306
|
+
* a data string. With #WebKitSettings you can control various aspects
|
|
9307
|
+
* of the rendering and loading of the content.
|
|
9308
|
+
*
|
|
9309
|
+
* Note that in WebKitGTK, #WebKitWebView is scrollable by itself, so
|
|
9310
|
+
* you don't need to embed it in a #GtkScrolledWindow.
|
|
9311
|
+
*/
|
|
9312
|
+
export const WebKitWebView = "WebKitWebView";
|
|
9313
|
+
export const WebKitWebViewBase = "WebKitWebViewBase";
|
|
5813
9314
|
/**
|
|
5814
9315
|
* Sets the application-wide menu bar.
|
|
5815
9316
|
* The menu will appear in the window's title bar on supported platforms.
|