@gtkx/react 0.9.3 → 0.9.4
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/dist/generated/jsx.d.ts +1411 -1411
- package/dist/generated/jsx.js +1216 -1216
- package/package.json +4 -4
package/dist/generated/jsx.js
CHANGED
|
@@ -85,37 +85,37 @@ import { createElement } from "react";
|
|
|
85
85
|
* ```c
|
|
86
86
|
* static void
|
|
87
87
|
* foo_widget_measure (GtkWidget *widget,
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
88
|
+
* GtkOrientation orientation,
|
|
89
|
+
* int for_size,
|
|
90
|
+
* int *minimum_size,
|
|
91
|
+
* int *natural_size,
|
|
92
|
+
* int *minimum_baseline,
|
|
93
|
+
* int *natural_baseline)
|
|
94
94
|
* {
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
95
|
+
* if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
|
96
|
+
* {
|
|
97
|
+
* // Calculate minimum and natural width
|
|
98
|
+
* }
|
|
99
|
+
* else // VERTICAL
|
|
100
|
+
* {
|
|
101
|
+
* if (i_am_in_height_for_width_mode)
|
|
102
|
+
* {
|
|
103
|
+
* int min_width, dummy;
|
|
104
|
+
*
|
|
105
|
+
* // First, get the minimum width of our widget
|
|
106
|
+
* GTK_WIDGET_GET_CLASS (widget)->measure (widget, GTK_ORIENTATION_HORIZONTAL, -1,
|
|
107
|
+
* &min_width, &dummy, &dummy, &dummy);
|
|
108
|
+
*
|
|
109
|
+
* // Now use the minimum width to retrieve the minimum and natural height to display
|
|
110
|
+
* // that width.
|
|
111
|
+
* GTK_WIDGET_GET_CLASS (widget)->measure (widget, GTK_ORIENTATION_VERTICAL, min_width,
|
|
112
|
+
* minimum_size, natural_size, &dummy, &dummy);
|
|
113
|
+
* }
|
|
114
|
+
* else
|
|
115
|
+
* {
|
|
116
|
+
* // ... some widgets do both.
|
|
117
|
+
* }
|
|
118
|
+
* }
|
|
119
119
|
* }
|
|
120
120
|
* ```
|
|
121
121
|
*
|
|
@@ -169,27 +169,27 @@ import { createElement } from "react";
|
|
|
169
169
|
*
|
|
170
170
|
* ```xml
|
|
171
171
|
* <object class="GtkGrid" id="my_grid">
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
172
|
+
* <child>
|
|
173
|
+
* <object class="GtkLabel" id="label1">
|
|
174
|
+
* <property name="label">Description</property>
|
|
175
|
+
* <layout>
|
|
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
|
+
* </layout>
|
|
181
|
+
* </object>
|
|
182
|
+
* </child>
|
|
183
|
+
* <child>
|
|
184
|
+
* <object class="GtkEntry" id="description_entry">
|
|
185
|
+
* <layout>
|
|
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
|
+
* </layout>
|
|
191
|
+
* </object>
|
|
192
|
+
* </child>
|
|
193
193
|
* </object>
|
|
194
194
|
* ```
|
|
195
195
|
*
|
|
@@ -198,10 +198,10 @@ import { createElement } from "react";
|
|
|
198
198
|
*
|
|
199
199
|
* ```xml
|
|
200
200
|
* <object class="GtkButton" id="button1">
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
201
|
+
* <style>
|
|
202
|
+
* <class name="my-special-button-class"/>
|
|
203
|
+
* <class name="dark-button"/>
|
|
204
|
+
* </style>
|
|
205
205
|
* </object>
|
|
206
206
|
* ```
|
|
207
207
|
*
|
|
@@ -210,10 +210,10 @@ import { createElement } from "react";
|
|
|
210
210
|
*
|
|
211
211
|
* ```xml
|
|
212
212
|
* <object class="GtkButton" id="button1">
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
213
|
+
* <accessibility>
|
|
214
|
+
* <property name="label">Download</property>
|
|
215
|
+
* <relation name="labelled-by">label1</relation>
|
|
216
|
+
* </accessibility>
|
|
217
217
|
* </object>
|
|
218
218
|
* ```
|
|
219
219
|
*
|
|
@@ -259,21 +259,21 @@ import { createElement } from "react";
|
|
|
259
259
|
*
|
|
260
260
|
* ```xml
|
|
261
261
|
* <interface>
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
262
|
+
* <template class="FooWidget" parent="GtkBox">
|
|
263
|
+
* <property name="orientation">horizontal</property>
|
|
264
|
+
* <property name="spacing">4</property>
|
|
265
|
+
* <child>
|
|
266
|
+
* <object class="GtkButton" id="hello_button">
|
|
267
|
+
* <property name="label">Hello World</property>
|
|
268
|
+
* <signal name="clicked" handler="hello_button_clicked" object="FooWidget" swapped="yes"/>
|
|
269
|
+
* </object>
|
|
270
|
+
* </child>
|
|
271
|
+
* <child>
|
|
272
|
+
* <object class="GtkButton" id="goodbye_button">
|
|
273
|
+
* <property name="label">Goodbye World</property>
|
|
274
|
+
* </object>
|
|
275
|
+
* </child>
|
|
276
|
+
* </template>
|
|
277
277
|
* </interface>
|
|
278
278
|
* ```
|
|
279
279
|
*
|
|
@@ -286,10 +286,10 @@ import { createElement } from "react";
|
|
|
286
286
|
* static void
|
|
287
287
|
* foo_widget_class_init (FooWidgetClass *klass)
|
|
288
288
|
* {
|
|
289
|
-
*
|
|
289
|
+
* // ...
|
|
290
290
|
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
291
|
+
* gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
|
|
292
|
+
* "/com/example/ui/foowidget.ui");
|
|
293
293
|
* }
|
|
294
294
|
* ```
|
|
295
295
|
*
|
|
@@ -300,9 +300,9 @@ import { createElement } from "react";
|
|
|
300
300
|
* static void
|
|
301
301
|
* foo_widget_init (FooWidget *self)
|
|
302
302
|
* {
|
|
303
|
-
*
|
|
303
|
+
* gtk_widget_init_template (GTK_WIDGET (self));
|
|
304
304
|
*
|
|
305
|
-
*
|
|
305
|
+
* // Initialize the rest of the widget...
|
|
306
306
|
* }
|
|
307
307
|
* ```
|
|
308
308
|
*
|
|
@@ -313,14 +313,14 @@ import { createElement } from "react";
|
|
|
313
313
|
* static void
|
|
314
314
|
* foo_widget_dispose (GObject *gobject)
|
|
315
315
|
* {
|
|
316
|
-
*
|
|
316
|
+
* FooWidget *self = FOO_WIDGET (gobject);
|
|
317
317
|
*
|
|
318
|
-
*
|
|
318
|
+
* // Dispose objects for which you have a reference...
|
|
319
319
|
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
320
|
+
* // Clear the template children for this widget type
|
|
321
|
+
* gtk_widget_dispose_template (GTK_WIDGET (self), FOO_TYPE_WIDGET);
|
|
322
322
|
*
|
|
323
|
-
*
|
|
323
|
+
* G_OBJECT_CLASS (foo_widget_parent_class)->dispose (gobject);
|
|
324
324
|
* }
|
|
325
325
|
* ```
|
|
326
326
|
*
|
|
@@ -334,8 +334,8 @@ import { createElement } from "react";
|
|
|
334
334
|
*
|
|
335
335
|
* ```c
|
|
336
336
|
* typedef struct {
|
|
337
|
-
*
|
|
338
|
-
*
|
|
337
|
+
* GtkWidget *hello_button;
|
|
338
|
+
* GtkWidget *goodbye_button;
|
|
339
339
|
* } FooWidgetPrivate;
|
|
340
340
|
*
|
|
341
341
|
* G_DEFINE_TYPE_WITH_PRIVATE (FooWidget, foo_widget, GTK_TYPE_BOX)
|
|
@@ -343,29 +343,29 @@ import { createElement } from "react";
|
|
|
343
343
|
* static void
|
|
344
344
|
* foo_widget_dispose (GObject *gobject)
|
|
345
345
|
* {
|
|
346
|
-
*
|
|
346
|
+
* gtk_widget_dispose_template (GTK_WIDGET (gobject), FOO_TYPE_WIDGET);
|
|
347
347
|
*
|
|
348
|
-
*
|
|
348
|
+
* G_OBJECT_CLASS (foo_widget_parent_class)->dispose (gobject);
|
|
349
349
|
* }
|
|
350
350
|
*
|
|
351
351
|
* static void
|
|
352
352
|
* foo_widget_class_init (FooWidgetClass *klass)
|
|
353
353
|
* {
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
*
|
|
354
|
+
* // ...
|
|
355
|
+
* G_OBJECT_CLASS (klass)->dispose = foo_widget_dispose;
|
|
356
|
+
*
|
|
357
|
+
* gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
|
|
358
|
+
* "/com/example/ui/foowidget.ui");
|
|
359
|
+
* gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass),
|
|
360
|
+
* FooWidget, hello_button);
|
|
361
|
+
* gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass),
|
|
362
|
+
* FooWidget, goodbye_button);
|
|
363
363
|
* }
|
|
364
364
|
*
|
|
365
365
|
* static void
|
|
366
366
|
* foo_widget_init (FooWidget *widget)
|
|
367
367
|
* {
|
|
368
|
-
*
|
|
368
|
+
* gtk_widget_init_template (GTK_WIDGET (widget));
|
|
369
369
|
* }
|
|
370
370
|
* ```
|
|
371
371
|
*
|
|
@@ -379,18 +379,18 @@ import { createElement } from "react";
|
|
|
379
379
|
* // because of the swapped="yes" attribute in the template XML
|
|
380
380
|
* static void
|
|
381
381
|
* hello_button_clicked (FooWidget *self,
|
|
382
|
-
*
|
|
382
|
+
* GtkButton *button)
|
|
383
383
|
* {
|
|
384
|
-
*
|
|
384
|
+
* g_print ("Hello, world!\n");
|
|
385
385
|
* }
|
|
386
386
|
*
|
|
387
387
|
* static void
|
|
388
388
|
* foo_widget_class_init (FooWidgetClass *klass)
|
|
389
389
|
* {
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
*
|
|
390
|
+
* // ...
|
|
391
|
+
* gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
|
|
392
|
+
* "/com/example/ui/foowidget.ui");
|
|
393
|
+
* gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), hello_button_clicked);
|
|
394
394
|
* }
|
|
395
395
|
* ```
|
|
396
396
|
*/
|
|
@@ -513,10 +513,10 @@ export const Window = {
|
|
|
513
513
|
* g_object_unref (logo_file);
|
|
514
514
|
*
|
|
515
515
|
* gtk_show_about_dialog (NULL,
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
516
|
+
* "program-name", "ExampleCode",
|
|
517
|
+
* "logo", example_logo,
|
|
518
|
+
* "title", _("About ExampleCode"),
|
|
519
|
+
* NULL);
|
|
520
520
|
* ```
|
|
521
521
|
*
|
|
522
522
|
* ## Shortcuts and Gestures
|
|
@@ -556,12 +556,12 @@ export const AboutDialog = "AboutDialog";
|
|
|
556
556
|
* ```
|
|
557
557
|
* actionbar
|
|
558
558
|
* ╰── revealer
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
*
|
|
563
|
-
*
|
|
564
|
-
*
|
|
559
|
+
* ╰── box
|
|
560
|
+
* ├── box.start
|
|
561
|
+
* │ ╰── [start children]
|
|
562
|
+
* ├── [center widget]
|
|
563
|
+
* ╰── box.end
|
|
564
|
+
* ╰── [end children]
|
|
565
565
|
* ```
|
|
566
566
|
*
|
|
567
567
|
* A `GtkActionBar`'s CSS node is called `actionbar`. It contains a `revealer`
|
|
@@ -693,22 +693,22 @@ export const AppChooserWidget = "AppChooserWidget";
|
|
|
693
693
|
* GtkApplication *app = gtk_application_new ("org.gtk.test", 0);
|
|
694
694
|
*
|
|
695
695
|
* GtkBuilder *builder = gtk_builder_new_from_string (
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
*
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
*
|
|
711
|
-
*
|
|
696
|
+
* "<interface>"
|
|
697
|
+
* " <menu id='menubar'>"
|
|
698
|
+
* " <submenu>"
|
|
699
|
+
* " <attribute name='label' translatable='yes'>_Edit</attribute>"
|
|
700
|
+
* " <item>"
|
|
701
|
+
* " <attribute name='label' translatable='yes'>_Copy</attribute>"
|
|
702
|
+
* " <attribute name='action'>win.copy</attribute>"
|
|
703
|
+
* " </item>"
|
|
704
|
+
* " <item>"
|
|
705
|
+
* " <attribute name='label' translatable='yes'>_Paste</attribute>"
|
|
706
|
+
* " <attribute name='action'>win.paste</attribute>"
|
|
707
|
+
* " </item>"
|
|
708
|
+
* " </submenu>"
|
|
709
|
+
* " </menu>"
|
|
710
|
+
* "</interface>",
|
|
711
|
+
* -1);
|
|
712
712
|
*
|
|
713
713
|
* GMenuModel *menubar = G_MENU_MODEL (gtk_builder_get_object (builder, "menubar"));
|
|
714
714
|
* gtk_application_set_menubar (GTK_APPLICATION (app), menubar);
|
|
@@ -891,7 +891,7 @@ export const Button = "Button";
|
|
|
891
891
|
* │ ├── label.year
|
|
892
892
|
* │ ╰── button
|
|
893
893
|
* ╰── grid
|
|
894
|
-
*
|
|
894
|
+
* ╰── label[.day-name][.week-number][.day-number][.other-month][.today]
|
|
895
895
|
* ```
|
|
896
896
|
*
|
|
897
897
|
* `GtkCalendar` has a main node with name calendar. It contains a subnode
|
|
@@ -1055,7 +1055,7 @@ export const CheckButton = {
|
|
|
1055
1055
|
* ```
|
|
1056
1056
|
* colorbutton
|
|
1057
1057
|
* ╰── button.color
|
|
1058
|
-
*
|
|
1058
|
+
* ╰── [content]
|
|
1059
1059
|
* ```
|
|
1060
1060
|
*
|
|
1061
1061
|
* `GtkColorButton` has a single CSS node with name colorbutton which
|
|
@@ -1132,7 +1132,7 @@ export const ColorChooserWidget = "ColorChooserWidget";
|
|
|
1132
1132
|
* ```
|
|
1133
1133
|
* colorbutton
|
|
1134
1134
|
* ╰── button.color
|
|
1135
|
-
*
|
|
1135
|
+
* ╰── [content]
|
|
1136
1136
|
* ```
|
|
1137
1137
|
*
|
|
1138
1138
|
* `GtkColorDialogButton` has a single CSS node with name colorbutton which
|
|
@@ -1318,11 +1318,11 @@ export const ComboBox = "ComboBox";
|
|
|
1318
1318
|
* Here is a UI definition fragment specifying `GtkComboBoxText` items:
|
|
1319
1319
|
* ```xml
|
|
1320
1320
|
* <object class="GtkComboBoxText">
|
|
1321
|
-
*
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1321
|
+
* <items>
|
|
1322
|
+
* <item translatable="yes" id="factory">Factory</item>
|
|
1323
|
+
* <item translatable="yes" id="home">Home</item>
|
|
1324
|
+
* <item translatable="yes" id="subway">Subway</item>
|
|
1325
|
+
* </items>
|
|
1326
1326
|
* </object>
|
|
1327
1327
|
* ```
|
|
1328
1328
|
*
|
|
@@ -1331,9 +1331,9 @@ export const ComboBox = "ComboBox";
|
|
|
1331
1331
|
* ```
|
|
1332
1332
|
* combobox
|
|
1333
1333
|
* ╰── box.linked
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1336
|
-
*
|
|
1334
|
+
* ├── entry.combo
|
|
1335
|
+
* ├── button.combo
|
|
1336
|
+
* ╰── window.popup
|
|
1337
1337
|
* ```
|
|
1338
1338
|
*
|
|
1339
1339
|
* `GtkComboBoxText` has a single CSS node with name combobox. It adds
|
|
@@ -1396,31 +1396,31 @@ export const ComboBoxText = "ComboBoxText";
|
|
|
1396
1396
|
* void
|
|
1397
1397
|
* quick_message (GtkWindow *parent, char *message)
|
|
1398
1398
|
* {
|
|
1399
|
-
*
|
|
1400
|
-
*
|
|
1401
|
-
*
|
|
1402
|
-
*
|
|
1403
|
-
*
|
|
1404
|
-
*
|
|
1405
|
-
*
|
|
1406
|
-
*
|
|
1407
|
-
*
|
|
1408
|
-
*
|
|
1409
|
-
*
|
|
1410
|
-
*
|
|
1411
|
-
*
|
|
1412
|
-
*
|
|
1413
|
-
*
|
|
1414
|
-
*
|
|
1415
|
-
*
|
|
1416
|
-
*
|
|
1417
|
-
*
|
|
1418
|
-
*
|
|
1419
|
-
*
|
|
1420
|
-
*
|
|
1421
|
-
*
|
|
1422
|
-
*
|
|
1423
|
-
*
|
|
1399
|
+
* GtkWidget *dialog, *label, *content_area;
|
|
1400
|
+
* GtkDialogFlags flags;
|
|
1401
|
+
*
|
|
1402
|
+
* // Create the widgets
|
|
1403
|
+
* flags = GTK_DIALOG_DESTROY_WITH_PARENT;
|
|
1404
|
+
* dialog = gtk_dialog_new_with_buttons ("Message",
|
|
1405
|
+
* parent,
|
|
1406
|
+
* flags,
|
|
1407
|
+
* _("_OK"),
|
|
1408
|
+
* GTK_RESPONSE_NONE,
|
|
1409
|
+
* NULL);
|
|
1410
|
+
* content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
|
1411
|
+
* label = gtk_label_new (message);
|
|
1412
|
+
*
|
|
1413
|
+
* // Ensure that the dialog box is destroyed when the user responds
|
|
1414
|
+
*
|
|
1415
|
+
* g_signal_connect_swapped (dialog,
|
|
1416
|
+
* "response",
|
|
1417
|
+
* G_CALLBACK (gtk_window_destroy),
|
|
1418
|
+
* dialog);
|
|
1419
|
+
*
|
|
1420
|
+
* // Add the label, and show everything we’ve added
|
|
1421
|
+
*
|
|
1422
|
+
* gtk_box_append (GTK_BOX (content_area), label);
|
|
1423
|
+
* gtk_widget_show (dialog);
|
|
1424
1424
|
* }
|
|
1425
1425
|
* ```
|
|
1426
1426
|
*
|
|
@@ -1446,17 +1446,17 @@ export const ComboBoxText = "ComboBoxText";
|
|
|
1446
1446
|
*
|
|
1447
1447
|
* ```xml
|
|
1448
1448
|
* <object class="GtkDialog" id="dialog1">
|
|
1449
|
-
*
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1453
|
-
*
|
|
1454
|
-
*
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1457
|
-
*
|
|
1458
|
-
*
|
|
1459
|
-
*
|
|
1449
|
+
* <child type="action">
|
|
1450
|
+
* <object class="GtkButton" id="button_cancel"/>
|
|
1451
|
+
* </child>
|
|
1452
|
+
* <child type="action">
|
|
1453
|
+
* <object class="GtkButton" id="button_ok">
|
|
1454
|
+
* </object>
|
|
1455
|
+
* </child>
|
|
1456
|
+
* <action-widgets>
|
|
1457
|
+
* <action-widget response="cancel">button_cancel</action-widget>
|
|
1458
|
+
* <action-widget response="ok" default="true">button_ok</action-widget>
|
|
1459
|
+
* </action-widgets>
|
|
1460
1460
|
* </object>
|
|
1461
1461
|
* ```
|
|
1462
1462
|
*
|
|
@@ -1506,37 +1506,37 @@ export const DragIcon = "DragIcon";
|
|
|
1506
1506
|
* ```c
|
|
1507
1507
|
* static void
|
|
1508
1508
|
* draw_function (GtkDrawingArea *area,
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1509
|
+
* cairo_t *cr,
|
|
1510
|
+
* int width,
|
|
1511
|
+
* int height,
|
|
1512
|
+
* gpointer data)
|
|
1513
1513
|
* {
|
|
1514
|
-
*
|
|
1514
|
+
* GdkRGBA color;
|
|
1515
1515
|
*
|
|
1516
|
-
*
|
|
1517
|
-
*
|
|
1518
|
-
*
|
|
1519
|
-
*
|
|
1516
|
+
* cairo_arc (cr,
|
|
1517
|
+
* width / 2.0, height / 2.0,
|
|
1518
|
+
* MIN (width, height) / 2.0,
|
|
1519
|
+
* 0, 2 * G_PI);
|
|
1520
1520
|
*
|
|
1521
|
-
*
|
|
1522
|
-
*
|
|
1523
|
-
*
|
|
1521
|
+
* gtk_widget_get_color (GTK_WIDGET (area),
|
|
1522
|
+
* &color);
|
|
1523
|
+
* gdk_cairo_set_source_rgba (cr, &color);
|
|
1524
1524
|
*
|
|
1525
|
-
*
|
|
1525
|
+
* cairo_fill (cr);
|
|
1526
1526
|
* }
|
|
1527
1527
|
*
|
|
1528
1528
|
* int
|
|
1529
1529
|
* main (int argc, char **argv)
|
|
1530
1530
|
* {
|
|
1531
|
-
*
|
|
1532
|
-
*
|
|
1533
|
-
*
|
|
1534
|
-
*
|
|
1535
|
-
*
|
|
1536
|
-
*
|
|
1537
|
-
*
|
|
1538
|
-
*
|
|
1539
|
-
*
|
|
1531
|
+
* gtk_init ();
|
|
1532
|
+
*
|
|
1533
|
+
* GtkWidget *area = gtk_drawing_area_new ();
|
|
1534
|
+
* gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (area), 100);
|
|
1535
|
+
* gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (area), 100);
|
|
1536
|
+
* gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (area),
|
|
1537
|
+
* draw_function,
|
|
1538
|
+
* NULL, NULL);
|
|
1539
|
+
* return 0;
|
|
1540
1540
|
* }
|
|
1541
1541
|
* ```
|
|
1542
1542
|
*
|
|
@@ -1595,15 +1595,15 @@ function DropDownItem(props) {
|
|
|
1595
1595
|
*
|
|
1596
1596
|
* ```xml
|
|
1597
1597
|
* <object class="GtkDropDown">
|
|
1598
|
-
*
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1601
|
-
*
|
|
1602
|
-
*
|
|
1603
|
-
*
|
|
1604
|
-
*
|
|
1605
|
-
*
|
|
1606
|
-
*
|
|
1598
|
+
* <property name="model">
|
|
1599
|
+
* <object class="GtkStringList">
|
|
1600
|
+
* <items>
|
|
1601
|
+
* <item translatable="yes">Factory</item>
|
|
1602
|
+
* <item translatable="yes">Home</item>
|
|
1603
|
+
* <item translatable="yes">Subway</item>
|
|
1604
|
+
* </items>
|
|
1605
|
+
* </object>
|
|
1606
|
+
* </property>
|
|
1607
1607
|
* </object>
|
|
1608
1608
|
* ```
|
|
1609
1609
|
*
|
|
@@ -1659,8 +1659,8 @@ export const DropDown = {
|
|
|
1659
1659
|
* ```
|
|
1660
1660
|
* editablelabel[.editing]
|
|
1661
1661
|
* ╰── stack
|
|
1662
|
-
*
|
|
1663
|
-
*
|
|
1662
|
+
* ├── label
|
|
1663
|
+
* ╰── text
|
|
1664
1664
|
* ```
|
|
1665
1665
|
*
|
|
1666
1666
|
* `GtkEditableLabel` has a main node with the name editablelabel.
|
|
@@ -1699,9 +1699,9 @@ export const EditableLabel = "EditableLabel";
|
|
|
1699
1699
|
* ├── box.emoji-searchbar
|
|
1700
1700
|
* │ ╰── entry.search
|
|
1701
1701
|
* ╰── box.emoji-toolbar
|
|
1702
|
-
*
|
|
1703
|
-
*
|
|
1704
|
-
*
|
|
1702
|
+
* ├── button.image-button.emoji-section
|
|
1703
|
+
* ├── ...
|
|
1704
|
+
* ╰── button.image-button.emoji-section
|
|
1705
1705
|
* ```
|
|
1706
1706
|
*
|
|
1707
1707
|
* Every `GtkEmojiChooser` consists of a main node called popover.
|
|
@@ -1786,10 +1786,10 @@ export const EmojiChooser = "EmojiChooser";
|
|
|
1786
1786
|
* An example of a UI definition fragment specifying Pango attributes:
|
|
1787
1787
|
* ```xml
|
|
1788
1788
|
* <object class="GtkEntry">
|
|
1789
|
-
*
|
|
1790
|
-
*
|
|
1791
|
-
*
|
|
1792
|
-
*
|
|
1789
|
+
* <attributes>
|
|
1790
|
+
* <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
|
|
1791
|
+
* <attribute name="background" value="red" start="5" end="10"/>
|
|
1792
|
+
* </attributes>
|
|
1793
1793
|
* </object>
|
|
1794
1794
|
* ```
|
|
1795
1795
|
*
|
|
@@ -1829,31 +1829,31 @@ export const Entry = "Entry";
|
|
|
1829
1829
|
* ```c
|
|
1830
1830
|
* static void
|
|
1831
1831
|
* expander_callback (GObject *object,
|
|
1832
|
-
*
|
|
1833
|
-
*
|
|
1832
|
+
* GParamSpec *param_spec,
|
|
1833
|
+
* gpointer user_data)
|
|
1834
1834
|
* {
|
|
1835
|
-
*
|
|
1836
|
-
*
|
|
1837
|
-
*
|
|
1838
|
-
*
|
|
1839
|
-
*
|
|
1840
|
-
*
|
|
1841
|
-
*
|
|
1842
|
-
*
|
|
1843
|
-
*
|
|
1844
|
-
*
|
|
1845
|
-
*
|
|
1846
|
-
*
|
|
1835
|
+
* GtkExpander *expander;
|
|
1836
|
+
*
|
|
1837
|
+
* expander = GTK_EXPANDER (object);
|
|
1838
|
+
*
|
|
1839
|
+
* if (gtk_expander_get_expanded (expander))
|
|
1840
|
+
* {
|
|
1841
|
+
* // Show or create widgets
|
|
1842
|
+
* }
|
|
1843
|
+
* else
|
|
1844
|
+
* {
|
|
1845
|
+
* // Hide or destroy widgets
|
|
1846
|
+
* }
|
|
1847
1847
|
* }
|
|
1848
1848
|
*
|
|
1849
1849
|
* static void
|
|
1850
1850
|
* create_expander (void)
|
|
1851
1851
|
* {
|
|
1852
|
-
*
|
|
1853
|
-
*
|
|
1854
|
-
*
|
|
1852
|
+
* GtkWidget *expander = gtk_expander_new_with_mnemonic ("_More Options");
|
|
1853
|
+
* g_signal_connect (expander, "notify::expanded",
|
|
1854
|
+
* G_CALLBACK (expander_callback), NULL);
|
|
1855
1855
|
*
|
|
1856
|
-
*
|
|
1856
|
+
* // ...
|
|
1857
1857
|
* }
|
|
1858
1858
|
* ```
|
|
1859
1859
|
*
|
|
@@ -1863,12 +1863,12 @@ export const Entry = "Entry";
|
|
|
1863
1863
|
*
|
|
1864
1864
|
* ```xml
|
|
1865
1865
|
* <object class="GtkExpander">
|
|
1866
|
-
*
|
|
1867
|
-
*
|
|
1868
|
-
*
|
|
1869
|
-
*
|
|
1870
|
-
*
|
|
1871
|
-
*
|
|
1866
|
+
* <property name="label-widget">
|
|
1867
|
+
* <object class="GtkLabel" id="expander-label"/>
|
|
1868
|
+
* </property>
|
|
1869
|
+
* <property name="child">
|
|
1870
|
+
* <object class="GtkEntry" id="expander-content"/>
|
|
1871
|
+
* </property>
|
|
1872
1872
|
* </object>
|
|
1873
1873
|
* ```
|
|
1874
1874
|
*
|
|
@@ -1877,10 +1877,10 @@ export const Entry = "Entry";
|
|
|
1877
1877
|
* ```
|
|
1878
1878
|
* expander-widget
|
|
1879
1879
|
* ╰── box
|
|
1880
|
-
*
|
|
1881
|
-
*
|
|
1882
|
-
*
|
|
1883
|
-
*
|
|
1880
|
+
* ├── title
|
|
1881
|
+
* │ ├── expander
|
|
1882
|
+
* │ ╰── <label widget>
|
|
1883
|
+
* ╰── <child>
|
|
1884
1884
|
* ```
|
|
1885
1885
|
*
|
|
1886
1886
|
* `GtkExpander` has a main node `expander-widget`, and subnode `box` containing
|
|
@@ -1925,38 +1925,38 @@ export const Expander = {
|
|
|
1925
1925
|
* ```c
|
|
1926
1926
|
* static void
|
|
1927
1927
|
* on_open_response (GtkDialog *dialog,
|
|
1928
|
-
*
|
|
1929
|
-
* {
|
|
1930
|
-
* if (response == GTK_RESPONSE_ACCEPT)
|
|
1928
|
+
* int response)
|
|
1931
1929
|
* {
|
|
1932
|
-
*
|
|
1930
|
+
* if (response == GTK_RESPONSE_ACCEPT)
|
|
1931
|
+
* {
|
|
1932
|
+
* GtkFileChooser *chooser = GTK_FILE_CHOOSER (dialog);
|
|
1933
1933
|
*
|
|
1934
|
-
*
|
|
1934
|
+
* g_autoptr(GFile) file = gtk_file_chooser_get_file (chooser);
|
|
1935
1935
|
*
|
|
1936
|
-
*
|
|
1937
|
-
*
|
|
1936
|
+
* open_file (file);
|
|
1937
|
+
* }
|
|
1938
1938
|
*
|
|
1939
|
-
*
|
|
1939
|
+
* gtk_window_destroy (GTK_WINDOW (dialog));
|
|
1940
1940
|
* }
|
|
1941
1941
|
*
|
|
1942
|
-
*
|
|
1943
|
-
*
|
|
1944
|
-
*
|
|
1942
|
+
* // ...
|
|
1943
|
+
* GtkWidget *dialog;
|
|
1944
|
+
* GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
|
|
1945
1945
|
*
|
|
1946
|
-
*
|
|
1947
|
-
*
|
|
1948
|
-
*
|
|
1949
|
-
*
|
|
1950
|
-
*
|
|
1951
|
-
*
|
|
1952
|
-
*
|
|
1953
|
-
*
|
|
1946
|
+
* dialog = gtk_file_chooser_dialog_new ("Open File",
|
|
1947
|
+
* parent_window,
|
|
1948
|
+
* action,
|
|
1949
|
+
* _("_Cancel"),
|
|
1950
|
+
* GTK_RESPONSE_CANCEL,
|
|
1951
|
+
* _("_Open"),
|
|
1952
|
+
* GTK_RESPONSE_ACCEPT,
|
|
1953
|
+
* NULL);
|
|
1954
1954
|
*
|
|
1955
|
-
*
|
|
1955
|
+
* gtk_window_present (GTK_WINDOW (dialog));
|
|
1956
1956
|
*
|
|
1957
|
-
*
|
|
1958
|
-
*
|
|
1959
|
-
*
|
|
1957
|
+
* g_signal_connect (dialog, "response",
|
|
1958
|
+
* G_CALLBACK (on_open_response),
|
|
1959
|
+
* NULL);
|
|
1960
1960
|
* ```
|
|
1961
1961
|
*
|
|
1962
1962
|
* To use a dialog for saving, you can use this:
|
|
@@ -1964,45 +1964,45 @@ export const Expander = {
|
|
|
1964
1964
|
* ```c
|
|
1965
1965
|
* static void
|
|
1966
1966
|
* on_save_response (GtkDialog *dialog,
|
|
1967
|
-
*
|
|
1968
|
-
* {
|
|
1969
|
-
* if (response == GTK_RESPONSE_ACCEPT)
|
|
1967
|
+
* int response)
|
|
1970
1968
|
* {
|
|
1971
|
-
*
|
|
1969
|
+
* if (response == GTK_RESPONSE_ACCEPT)
|
|
1970
|
+
* {
|
|
1971
|
+
* GtkFileChooser *chooser = GTK_FILE_CHOOSER (dialog);
|
|
1972
1972
|
*
|
|
1973
|
-
*
|
|
1973
|
+
* g_autoptr(GFile) file = gtk_file_chooser_get_file (chooser);
|
|
1974
1974
|
*
|
|
1975
|
-
*
|
|
1976
|
-
*
|
|
1975
|
+
* save_to_file (file);
|
|
1976
|
+
* }
|
|
1977
1977
|
*
|
|
1978
|
-
*
|
|
1978
|
+
* gtk_window_destroy (GTK_WINDOW (dialog));
|
|
1979
1979
|
* }
|
|
1980
1980
|
*
|
|
1981
|
-
*
|
|
1982
|
-
*
|
|
1983
|
-
*
|
|
1984
|
-
*
|
|
1985
|
-
*
|
|
1986
|
-
* dialog = gtk_file_chooser_dialog_new ("Save File",
|
|
1987
|
-
* parent_window,
|
|
1988
|
-
* action,
|
|
1989
|
-
* _("_Cancel"),
|
|
1990
|
-
* GTK_RESPONSE_CANCEL,
|
|
1991
|
-
* _("_Save"),
|
|
1992
|
-
* GTK_RESPONSE_ACCEPT,
|
|
1993
|
-
* NULL);
|
|
1994
|
-
* chooser = GTK_FILE_CHOOSER (dialog);
|
|
1995
|
-
*
|
|
1996
|
-
* if (user_edited_a_new_document)
|
|
1997
|
-
* gtk_file_chooser_set_current_name (chooser, _("Untitled document"));
|
|
1998
|
-
* else
|
|
1999
|
-
* gtk_file_chooser_set_file (chooser, existing_filename);
|
|
1981
|
+
* // ...
|
|
1982
|
+
* GtkWidget *dialog;
|
|
1983
|
+
* GtkFileChooser *chooser;
|
|
1984
|
+
* GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_SAVE;
|
|
2000
1985
|
*
|
|
2001
|
-
*
|
|
1986
|
+
* dialog = gtk_file_chooser_dialog_new ("Save File",
|
|
1987
|
+
* parent_window,
|
|
1988
|
+
* action,
|
|
1989
|
+
* _("_Cancel"),
|
|
1990
|
+
* GTK_RESPONSE_CANCEL,
|
|
1991
|
+
* _("_Save"),
|
|
1992
|
+
* GTK_RESPONSE_ACCEPT,
|
|
1993
|
+
* NULL);
|
|
1994
|
+
* chooser = GTK_FILE_CHOOSER (dialog);
|
|
2002
1995
|
*
|
|
2003
|
-
*
|
|
2004
|
-
*
|
|
2005
|
-
*
|
|
1996
|
+
* if (user_edited_a_new_document)
|
|
1997
|
+
* gtk_file_chooser_set_current_name (chooser, _("Untitled document"));
|
|
1998
|
+
* else
|
|
1999
|
+
* gtk_file_chooser_set_file (chooser, existing_filename);
|
|
2000
|
+
*
|
|
2001
|
+
* gtk_window_present (GTK_WINDOW (dialog));
|
|
2002
|
+
*
|
|
2003
|
+
* g_signal_connect (dialog, "response",
|
|
2004
|
+
* G_CALLBACK (on_save_response),
|
|
2005
|
+
* NULL);
|
|
2006
2006
|
* ```
|
|
2007
2007
|
*
|
|
2008
2008
|
* ## Setting up a file chooser dialog
|
|
@@ -2037,13 +2037,13 @@ export const Expander = {
|
|
|
2037
2037
|
* GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
|
|
2038
2038
|
*
|
|
2039
2039
|
* dialog = gtk_file_chooser_dialog_new ("Open File",
|
|
2040
|
-
*
|
|
2041
|
-
*
|
|
2042
|
-
*
|
|
2043
|
-
*
|
|
2044
|
-
*
|
|
2045
|
-
*
|
|
2046
|
-
*
|
|
2040
|
+
* parent_window,
|
|
2041
|
+
* action,
|
|
2042
|
+
* _("_Cancel"),
|
|
2043
|
+
* GTK_RESPONSE_CANCEL,
|
|
2044
|
+
* _("_Open"),
|
|
2045
|
+
* GTK_RESPONSE_ACCEPT,
|
|
2046
|
+
* NULL);
|
|
2047
2047
|
* ```
|
|
2048
2048
|
*
|
|
2049
2049
|
* This will create buttons for “Cancel” and “Open” that use predefined
|
|
@@ -2225,7 +2225,7 @@ export const FlowBoxChild = "FlowBoxChild";
|
|
|
2225
2225
|
* ```
|
|
2226
2226
|
* fontbutton
|
|
2227
2227
|
* ╰── button.font
|
|
2228
|
-
*
|
|
2228
|
+
* ╰── [content]
|
|
2229
2229
|
* ```
|
|
2230
2230
|
*
|
|
2231
2231
|
* `GtkFontButton` has a single CSS node with name fontbutton which
|
|
@@ -2286,7 +2286,7 @@ export const FontChooserWidget = "FontChooserWidget";
|
|
|
2286
2286
|
* ```
|
|
2287
2287
|
* fontbutton
|
|
2288
2288
|
* ╰── button.font
|
|
2289
|
-
*
|
|
2289
|
+
* ╰── [content]
|
|
2290
2290
|
* ```
|
|
2291
2291
|
*
|
|
2292
2292
|
* `GtkFontDialogButton` has a single CSS node with name fontbutton which
|
|
@@ -2311,12 +2311,12 @@ export const FontDialogButton = "FontDialogButton";
|
|
|
2311
2311
|
*
|
|
2312
2312
|
* ```xml
|
|
2313
2313
|
* <object class="GtkFrame">
|
|
2314
|
-
*
|
|
2315
|
-
*
|
|
2316
|
-
*
|
|
2317
|
-
*
|
|
2318
|
-
*
|
|
2319
|
-
*
|
|
2314
|
+
* <property name="label-widget">
|
|
2315
|
+
* <object class="GtkLabel" id="frame_label"/>
|
|
2316
|
+
* </property>
|
|
2317
|
+
* <property name="child">
|
|
2318
|
+
* <object class="GtkEntry" id="frame_content"/>
|
|
2319
|
+
* </property>
|
|
2320
2320
|
* </object>
|
|
2321
2321
|
* ```
|
|
2322
2322
|
*
|
|
@@ -2374,38 +2374,38 @@ export const Frame = {
|
|
|
2374
2374
|
* static gboolean
|
|
2375
2375
|
* render (GtkGLArea *area, GdkGLContext *context)
|
|
2376
2376
|
* {
|
|
2377
|
-
*
|
|
2378
|
-
*
|
|
2379
|
-
*
|
|
2380
|
-
*
|
|
2381
|
-
*
|
|
2382
|
-
*
|
|
2383
|
-
*
|
|
2384
|
-
*
|
|
2385
|
-
*
|
|
2386
|
-
*
|
|
2387
|
-
*
|
|
2388
|
-
*
|
|
2389
|
-
*
|
|
2390
|
-
*
|
|
2391
|
-
*
|
|
2392
|
-
*
|
|
2393
|
-
*
|
|
2394
|
-
*
|
|
2395
|
-
*
|
|
2396
|
-
*
|
|
2397
|
-
*
|
|
2398
|
-
*
|
|
2399
|
-
*
|
|
2377
|
+
* // inside this function it's safe to use GL; the given
|
|
2378
|
+
* // GdkGLContext has been made current to the drawable
|
|
2379
|
+
* // surface used by the `GtkGLArea` and the viewport has
|
|
2380
|
+
* // already been set to be the size of the allocation
|
|
2381
|
+
*
|
|
2382
|
+
* // we can start by clearing the buffer
|
|
2383
|
+
* glClearColor (0, 0, 0, 0);
|
|
2384
|
+
* glClear (GL_COLOR_BUFFER_BIT);
|
|
2385
|
+
*
|
|
2386
|
+
* // record the active framebuffer ID, so we can return to it
|
|
2387
|
+
* // with `glBindFramebuffer (GL_FRAMEBUFFER, screen_fb)` should
|
|
2388
|
+
* // we, for instance, intend on utilizing the results of an
|
|
2389
|
+
* // intermediate render texture pass
|
|
2390
|
+
* GLuint screen_fb = 0;
|
|
2391
|
+
* glGetIntegerv (GL_FRAMEBUFFER_BINDING, &screen_fb);
|
|
2392
|
+
*
|
|
2393
|
+
* // draw your object
|
|
2394
|
+
* // draw_an_object ();
|
|
2395
|
+
*
|
|
2396
|
+
* // we completed our drawing; the draw commands will be
|
|
2397
|
+
* // flushed at the end of the signal emission chain, and
|
|
2398
|
+
* // the buffers will be drawn on the window
|
|
2399
|
+
* return TRUE;
|
|
2400
2400
|
* }
|
|
2401
2401
|
*
|
|
2402
2402
|
* void setup_glarea (void)
|
|
2403
2403
|
* {
|
|
2404
|
-
*
|
|
2405
|
-
*
|
|
2404
|
+
* // create a GtkGLArea instance
|
|
2405
|
+
* GtkWidget *gl_area = gtk_gl_area_new ();
|
|
2406
2406
|
*
|
|
2407
|
-
*
|
|
2408
|
-
*
|
|
2407
|
+
* // connect to the "render" signal
|
|
2408
|
+
* g_signal_connect (gl_area, "render", G_CALLBACK (render), NULL);
|
|
2409
2409
|
* }
|
|
2410
2410
|
* ```
|
|
2411
2411
|
*
|
|
@@ -2421,35 +2421,35 @@ export const Frame = {
|
|
|
2421
2421
|
* static void
|
|
2422
2422
|
* on_realize (GtkGLArea *area)
|
|
2423
2423
|
* {
|
|
2424
|
-
*
|
|
2425
|
-
*
|
|
2426
|
-
*
|
|
2427
|
-
*
|
|
2428
|
-
*
|
|
2429
|
-
*
|
|
2430
|
-
*
|
|
2431
|
-
*
|
|
2432
|
-
*
|
|
2433
|
-
*
|
|
2434
|
-
*
|
|
2435
|
-
*
|
|
2436
|
-
*
|
|
2437
|
-
*
|
|
2438
|
-
*
|
|
2439
|
-
*
|
|
2440
|
-
*
|
|
2441
|
-
*
|
|
2442
|
-
*
|
|
2443
|
-
*
|
|
2444
|
-
*
|
|
2445
|
-
*
|
|
2446
|
-
*
|
|
2447
|
-
*
|
|
2448
|
-
*
|
|
2449
|
-
*
|
|
2450
|
-
*
|
|
2451
|
-
*
|
|
2452
|
-
*
|
|
2424
|
+
* // We need to make the context current if we want to
|
|
2425
|
+
* // call GL API
|
|
2426
|
+
* gtk_gl_area_make_current (area);
|
|
2427
|
+
*
|
|
2428
|
+
* // If there were errors during the initialization or
|
|
2429
|
+
* // when trying to make the context current, this
|
|
2430
|
+
* // function will return a GError for you to catch
|
|
2431
|
+
* if (gtk_gl_area_get_error (area) != NULL)
|
|
2432
|
+
* return;
|
|
2433
|
+
*
|
|
2434
|
+
* // You can also use gtk_gl_area_set_error() in order
|
|
2435
|
+
* // to show eventual initialization errors on the
|
|
2436
|
+
* // GtkGLArea widget itself
|
|
2437
|
+
* GError *internal_error = NULL;
|
|
2438
|
+
* init_buffer_objects (&error);
|
|
2439
|
+
* if (error != NULL)
|
|
2440
|
+
* {
|
|
2441
|
+
* gtk_gl_area_set_error (area, error);
|
|
2442
|
+
* g_error_free (error);
|
|
2443
|
+
* return;
|
|
2444
|
+
* }
|
|
2445
|
+
*
|
|
2446
|
+
* init_shaders (&error);
|
|
2447
|
+
* if (error != NULL)
|
|
2448
|
+
* {
|
|
2449
|
+
* gtk_gl_area_set_error (area, error);
|
|
2450
|
+
* g_error_free (error);
|
|
2451
|
+
* return;
|
|
2452
|
+
* }
|
|
2453
2453
|
* }
|
|
2454
2454
|
* ```
|
|
2455
2455
|
*
|
|
@@ -2523,44 +2523,44 @@ export const GraphicsOffload = "GraphicsOffload";
|
|
|
2523
2523
|
*
|
|
2524
2524
|
* ```xml
|
|
2525
2525
|
* <object class="GtkGrid" id="my_grid">
|
|
2526
|
-
*
|
|
2527
|
-
*
|
|
2528
|
-
*
|
|
2529
|
-
*
|
|
2530
|
-
*
|
|
2531
|
-
*
|
|
2532
|
-
*
|
|
2533
|
-
*
|
|
2534
|
-
*
|
|
2535
|
-
*
|
|
2536
|
-
*
|
|
2537
|
-
*
|
|
2538
|
-
*
|
|
2539
|
-
*
|
|
2540
|
-
*
|
|
2541
|
-
*
|
|
2542
|
-
*
|
|
2543
|
-
*
|
|
2544
|
-
*
|
|
2545
|
-
*
|
|
2546
|
-
*
|
|
2547
|
-
*
|
|
2548
|
-
*
|
|
2549
|
-
*
|
|
2550
|
-
*
|
|
2551
|
-
*
|
|
2552
|
-
*
|
|
2553
|
-
*
|
|
2554
|
-
*
|
|
2555
|
-
*
|
|
2556
|
-
*
|
|
2557
|
-
*
|
|
2558
|
-
*
|
|
2559
|
-
*
|
|
2560
|
-
*
|
|
2561
|
-
*
|
|
2562
|
-
*
|
|
2563
|
-
*
|
|
2526
|
+
* <child>
|
|
2527
|
+
* <object class="GtkButton" id="button1">
|
|
2528
|
+
* <property name="label">Button 1</property>
|
|
2529
|
+
* <layout>
|
|
2530
|
+
* <property name="column">0</property>
|
|
2531
|
+
* <property name="row">0</property>
|
|
2532
|
+
* </layout>
|
|
2533
|
+
* </object>
|
|
2534
|
+
* </child>
|
|
2535
|
+
* <child>
|
|
2536
|
+
* <object class="GtkButton" id="button2">
|
|
2537
|
+
* <property name="label">Button 2</property>
|
|
2538
|
+
* <layout>
|
|
2539
|
+
* <property name="column">1</property>
|
|
2540
|
+
* <property name="row">0</property>
|
|
2541
|
+
* </layout>
|
|
2542
|
+
* </object>
|
|
2543
|
+
* </child>
|
|
2544
|
+
* <child>
|
|
2545
|
+
* <object class="GtkButton" id="button3">
|
|
2546
|
+
* <property name="label">Button 3</property>
|
|
2547
|
+
* <layout>
|
|
2548
|
+
* <property name="column">2</property>
|
|
2549
|
+
* <property name="row">0</property>
|
|
2550
|
+
* <property name="row-span">2</property>
|
|
2551
|
+
* </layout>
|
|
2552
|
+
* </object>
|
|
2553
|
+
* </child>
|
|
2554
|
+
* <child>
|
|
2555
|
+
* <object class="GtkButton" id="button4">
|
|
2556
|
+
* <property name="label">Button 4</property>
|
|
2557
|
+
* <layout>
|
|
2558
|
+
* <property name="column">0</property>
|
|
2559
|
+
* <property name="row">1</property>
|
|
2560
|
+
* <property name="column-span">2</property>
|
|
2561
|
+
* </layout>
|
|
2562
|
+
* </object>
|
|
2563
|
+
* </child>
|
|
2564
2564
|
* </object>
|
|
2565
2565
|
* ```
|
|
2566
2566
|
*
|
|
@@ -2670,17 +2670,17 @@ export const GridView = {
|
|
|
2670
2670
|
*
|
|
2671
2671
|
* ```xml
|
|
2672
2672
|
* <object class="GtkHeaderBar">
|
|
2673
|
-
*
|
|
2674
|
-
*
|
|
2675
|
-
*
|
|
2676
|
-
*
|
|
2677
|
-
*
|
|
2678
|
-
*
|
|
2679
|
-
*
|
|
2680
|
-
*
|
|
2681
|
-
*
|
|
2682
|
-
*
|
|
2683
|
-
*
|
|
2673
|
+
* <property name="title-widget">
|
|
2674
|
+
* <object class="GtkLabel">
|
|
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
|
+
* <style>
|
|
2680
|
+
* <class name="title"/>
|
|
2681
|
+
* </style>
|
|
2682
|
+
* </object>
|
|
2683
|
+
* </property>
|
|
2684
2684
|
* </object>
|
|
2685
2685
|
* ```
|
|
2686
2686
|
*
|
|
@@ -2689,14 +2689,14 @@ export const GridView = {
|
|
|
2689
2689
|
* ```
|
|
2690
2690
|
* headerbar
|
|
2691
2691
|
* ╰── windowhandle
|
|
2692
|
-
*
|
|
2693
|
-
*
|
|
2694
|
-
*
|
|
2695
|
-
*
|
|
2696
|
-
*
|
|
2697
|
-
*
|
|
2698
|
-
*
|
|
2699
|
-
*
|
|
2692
|
+
* ╰── box
|
|
2693
|
+
* ├── box.start
|
|
2694
|
+
* │ ├── windowcontrols.start
|
|
2695
|
+
* │ ╰── [other children]
|
|
2696
|
+
* ├── [Title Widget]
|
|
2697
|
+
* ╰── box.end
|
|
2698
|
+
* ├── [other children]
|
|
2699
|
+
* ╰── windowcontrols.end
|
|
2700
2700
|
* ```
|
|
2701
2701
|
*
|
|
2702
2702
|
* A `GtkHeaderBar`'s CSS node is called `headerbar`. It contains a `windowhandle`
|
|
@@ -2822,15 +2822,15 @@ export const Image = "Image";
|
|
|
2822
2822
|
* message_label = gtk_label_new ("");
|
|
2823
2823
|
* gtk_info_bar_add_child (bar, message_label);
|
|
2824
2824
|
* gtk_info_bar_add_button (bar,
|
|
2825
|
-
*
|
|
2826
|
-
*
|
|
2825
|
+
* _("_OK"),
|
|
2826
|
+
* GTK_RESPONSE_OK);
|
|
2827
2827
|
* g_signal_connect (bar,
|
|
2828
|
-
*
|
|
2829
|
-
*
|
|
2830
|
-
*
|
|
2828
|
+
* "response",
|
|
2829
|
+
* G_CALLBACK (gtk_widget_hide),
|
|
2830
|
+
* NULL);
|
|
2831
2831
|
* gtk_grid_attach (GTK_GRID (grid),
|
|
2832
|
-
*
|
|
2833
|
-
*
|
|
2832
|
+
* widget,
|
|
2833
|
+
* 0, 2, 1, 1);
|
|
2834
2834
|
*
|
|
2835
2835
|
* // ...
|
|
2836
2836
|
*
|
|
@@ -2954,10 +2954,10 @@ export const Inscription = "Inscription";
|
|
|
2954
2954
|
*
|
|
2955
2955
|
* ```xml
|
|
2956
2956
|
* <object class="GtkLabel">
|
|
2957
|
-
*
|
|
2958
|
-
*
|
|
2959
|
-
*
|
|
2960
|
-
*
|
|
2957
|
+
* <attributes>
|
|
2958
|
+
* <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
|
|
2959
|
+
* <attribute name="background" value="red" start="5" end="10"/>
|
|
2960
|
+
* </attributes>
|
|
2961
2961
|
* </object>
|
|
2962
2962
|
* ```
|
|
2963
2963
|
*
|
|
@@ -3121,31 +3121,31 @@ export const Label = "Label";
|
|
|
3121
3121
|
* static GtkWidget *
|
|
3122
3122
|
* create_level_bar (void)
|
|
3123
3123
|
* {
|
|
3124
|
-
*
|
|
3125
|
-
*
|
|
3124
|
+
* GtkWidget *widget;
|
|
3125
|
+
* GtkLevelBar *bar;
|
|
3126
3126
|
*
|
|
3127
|
-
*
|
|
3128
|
-
*
|
|
3127
|
+
* widget = gtk_level_bar_new ();
|
|
3128
|
+
* bar = GTK_LEVEL_BAR (widget);
|
|
3129
3129
|
*
|
|
3130
|
-
*
|
|
3130
|
+
* // This changes the value of the default low offset
|
|
3131
3131
|
*
|
|
3132
|
-
*
|
|
3133
|
-
*
|
|
3134
|
-
*
|
|
3132
|
+
* gtk_level_bar_add_offset_value (bar,
|
|
3133
|
+
* GTK_LEVEL_BAR_OFFSET_LOW,
|
|
3134
|
+
* 0.10);
|
|
3135
3135
|
*
|
|
3136
|
-
*
|
|
3137
|
-
*
|
|
3138
|
-
*
|
|
3139
|
-
*
|
|
3140
|
-
*
|
|
3141
|
-
*
|
|
3142
|
-
*
|
|
3143
|
-
*
|
|
3144
|
-
*
|
|
3136
|
+
* // This adds a new offset to the bar; the application will
|
|
3137
|
+
* // be able to change its color CSS like this:
|
|
3138
|
+
* //
|
|
3139
|
+
* // levelbar block.my-offset {
|
|
3140
|
+
* // background-color: magenta;
|
|
3141
|
+
* // border-style: solid;
|
|
3142
|
+
* // border-color: black;
|
|
3143
|
+
* // border-width: 1px;
|
|
3144
|
+
* // }
|
|
3145
3145
|
*
|
|
3146
|
-
*
|
|
3146
|
+
* gtk_level_bar_add_offset_value (bar, "my-offset", 0.60);
|
|
3147
3147
|
*
|
|
3148
|
-
*
|
|
3148
|
+
* return widget;
|
|
3149
3149
|
* }
|
|
3150
3150
|
* ```
|
|
3151
3151
|
*
|
|
@@ -3174,10 +3174,10 @@ export const Label = "Label";
|
|
|
3174
3174
|
* ```
|
|
3175
3175
|
* levelbar[.discrete]
|
|
3176
3176
|
* ╰── trough
|
|
3177
|
-
*
|
|
3178
|
-
*
|
|
3179
|
-
*
|
|
3180
|
-
*
|
|
3177
|
+
* ├── block.filled.level-name
|
|
3178
|
+
* ┊
|
|
3179
|
+
* ├── block.empty
|
|
3180
|
+
* ┊
|
|
3181
3181
|
* ```
|
|
3182
3182
|
*
|
|
3183
3183
|
* `GtkLevelBar` has a main CSS node with name levelbar and one of the style
|
|
@@ -3388,52 +3388,52 @@ function ListViewItem(props) {
|
|
|
3388
3388
|
* ```c
|
|
3389
3389
|
* static void
|
|
3390
3390
|
* setup_listitem_cb (GtkListItemFactory *factory,
|
|
3391
|
-
*
|
|
3391
|
+
* GtkListItem *list_item)
|
|
3392
3392
|
* {
|
|
3393
|
-
*
|
|
3393
|
+
* GtkWidget *image;
|
|
3394
3394
|
*
|
|
3395
|
-
*
|
|
3396
|
-
*
|
|
3397
|
-
*
|
|
3395
|
+
* image = gtk_image_new ();
|
|
3396
|
+
* gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
|
3397
|
+
* gtk_list_item_set_child (list_item, image);
|
|
3398
3398
|
* }
|
|
3399
3399
|
*
|
|
3400
3400
|
* static void
|
|
3401
3401
|
* bind_listitem_cb (GtkListItemFactory *factory,
|
|
3402
|
-
*
|
|
3402
|
+
* GtkListItem *list_item)
|
|
3403
3403
|
* {
|
|
3404
|
-
*
|
|
3405
|
-
*
|
|
3404
|
+
* GtkWidget *image;
|
|
3405
|
+
* GAppInfo *app_info;
|
|
3406
3406
|
*
|
|
3407
|
-
*
|
|
3408
|
-
*
|
|
3409
|
-
*
|
|
3407
|
+
* image = gtk_list_item_get_child (list_item);
|
|
3408
|
+
* app_info = gtk_list_item_get_item (list_item);
|
|
3409
|
+
* gtk_image_set_from_gicon (GTK_IMAGE (image), g_app_info_get_icon (app_info));
|
|
3410
3410
|
* }
|
|
3411
3411
|
*
|
|
3412
3412
|
* static void
|
|
3413
3413
|
* activate_cb (GtkListView *list,
|
|
3414
|
-
*
|
|
3415
|
-
*
|
|
3414
|
+
* guint position,
|
|
3415
|
+
* gpointer unused)
|
|
3416
3416
|
* {
|
|
3417
|
-
*
|
|
3417
|
+
* GAppInfo *app_info;
|
|
3418
3418
|
*
|
|
3419
|
-
*
|
|
3420
|
-
*
|
|
3421
|
-
*
|
|
3419
|
+
* app_info = g_list_model_get_item (G_LIST_MODEL (gtk_list_view_get_model (list)), position);
|
|
3420
|
+
* g_app_info_launch (app_info, NULL, NULL, NULL);
|
|
3421
|
+
* g_object_unref (app_info);
|
|
3422
3422
|
* }
|
|
3423
3423
|
*
|
|
3424
3424
|
* ...
|
|
3425
3425
|
*
|
|
3426
|
-
*
|
|
3426
|
+
* model = create_application_list ();
|
|
3427
3427
|
*
|
|
3428
|
-
*
|
|
3429
|
-
*
|
|
3430
|
-
*
|
|
3428
|
+
* factory = gtk_signal_list_item_factory_new ();
|
|
3429
|
+
* g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
|
|
3430
|
+
* g_signal_connect (factory, "bind", G_CALLBACK (bind_listitem_cb), NULL);
|
|
3431
3431
|
*
|
|
3432
|
-
*
|
|
3432
|
+
* list = gtk_list_view_new (GTK_SELECTION_MODEL (gtk_single_selection_new (model)), factory);
|
|
3433
3433
|
*
|
|
3434
|
-
*
|
|
3434
|
+
* g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
|
|
3435
3435
|
*
|
|
3436
|
-
*
|
|
3436
|
+
* gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), list);
|
|
3437
3437
|
* ```
|
|
3438
3438
|
*
|
|
3439
3439
|
* # Actions
|
|
@@ -3562,8 +3562,8 @@ export const MediaControls = "MediaControls";
|
|
|
3562
3562
|
* ```
|
|
3563
3563
|
* menubutton
|
|
3564
3564
|
* ╰── button.toggle
|
|
3565
|
-
*
|
|
3566
|
-
*
|
|
3565
|
+
* ╰── <content>
|
|
3566
|
+
* ╰── [arrow]
|
|
3567
3567
|
* ```
|
|
3568
3568
|
*
|
|
3569
3569
|
* `GtkMenuButton` has a single CSS node with name `menubutton`
|
|
@@ -3611,18 +3611,18 @@ export const MenuButton = {
|
|
|
3611
3611
|
* ```c
|
|
3612
3612
|
* GtkDialogFlags flags = GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL;
|
|
3613
3613
|
* dialog = gtk_message_dialog_new (parent_window,
|
|
3614
|
-
*
|
|
3615
|
-
*
|
|
3616
|
-
*
|
|
3617
|
-
*
|
|
3618
|
-
*
|
|
3619
|
-
*
|
|
3614
|
+
* flags,
|
|
3615
|
+
* GTK_MESSAGE_ERROR,
|
|
3616
|
+
* GTK_BUTTONS_CLOSE,
|
|
3617
|
+
* "Error reading “%s”: %s",
|
|
3618
|
+
* filename,
|
|
3619
|
+
* g_strerror (errno));
|
|
3620
3620
|
* // Destroy the dialog when the user responds to it
|
|
3621
3621
|
* // (e.g. clicks a button)
|
|
3622
3622
|
*
|
|
3623
3623
|
* g_signal_connect (dialog, "response",
|
|
3624
|
-
*
|
|
3625
|
-
*
|
|
3624
|
+
* G_CALLBACK (gtk_window_destroy),
|
|
3625
|
+
* NULL);
|
|
3626
3626
|
* ```
|
|
3627
3627
|
*
|
|
3628
3628
|
* You might do a non-modal `GtkMessageDialog` simply by omitting the
|
|
@@ -3631,18 +3631,18 @@ export const MenuButton = {
|
|
|
3631
3631
|
* ```c
|
|
3632
3632
|
* GtkDialogFlags flags = GTK_DIALOG_DESTROY_WITH_PARENT;
|
|
3633
3633
|
* dialog = gtk_message_dialog_new (parent_window,
|
|
3634
|
-
*
|
|
3635
|
-
*
|
|
3636
|
-
*
|
|
3637
|
-
*
|
|
3638
|
-
*
|
|
3639
|
-
*
|
|
3634
|
+
* flags,
|
|
3635
|
+
* GTK_MESSAGE_ERROR,
|
|
3636
|
+
* GTK_BUTTONS_CLOSE,
|
|
3637
|
+
* "Error reading “%s”: %s",
|
|
3638
|
+
* filename,
|
|
3639
|
+
* g_strerror (errno));
|
|
3640
3640
|
*
|
|
3641
3641
|
* // Destroy the dialog when the user responds to it
|
|
3642
3642
|
* // (e.g. clicks a button)
|
|
3643
3643
|
* g_signal_connect (dialog, "response",
|
|
3644
|
-
*
|
|
3645
|
-
*
|
|
3644
|
+
* G_CALLBACK (gtk_window_destroy),
|
|
3645
|
+
* NULL);
|
|
3646
3646
|
* ```
|
|
3647
3647
|
*
|
|
3648
3648
|
* # GtkMessageDialog as GtkBuildable
|
|
@@ -3681,16 +3681,16 @@ export const MessageDialog = "MessageDialog";
|
|
|
3681
3681
|
*
|
|
3682
3682
|
* ```xml
|
|
3683
3683
|
* <object class="GtkNotebook">
|
|
3684
|
-
*
|
|
3685
|
-
*
|
|
3686
|
-
*
|
|
3687
|
-
*
|
|
3688
|
-
*
|
|
3689
|
-
*
|
|
3690
|
-
*
|
|
3691
|
-
*
|
|
3692
|
-
*
|
|
3693
|
-
*
|
|
3684
|
+
* <child>
|
|
3685
|
+
* <object class="GtkLabel" id="notebook-content">
|
|
3686
|
+
* <property name="label">Content</property>
|
|
3687
|
+
* </object>
|
|
3688
|
+
* </child>
|
|
3689
|
+
* <child type="tab">
|
|
3690
|
+
* <object class="GtkLabel" id="notebook-tab">
|
|
3691
|
+
* <property name="label">Tab</property>
|
|
3692
|
+
* </object>
|
|
3693
|
+
* </child>
|
|
3694
3694
|
* </object>
|
|
3695
3695
|
* ```
|
|
3696
3696
|
*
|
|
@@ -3736,9 +3736,9 @@ export const MessageDialog = "MessageDialog";
|
|
|
3736
3736
|
* │ ╰── [<action widget>]
|
|
3737
3737
|
* │
|
|
3738
3738
|
* ╰── stack
|
|
3739
|
-
*
|
|
3740
|
-
*
|
|
3741
|
-
*
|
|
3739
|
+
* ├── <child>
|
|
3740
|
+
* ┊
|
|
3741
|
+
* ╰── <child>
|
|
3742
3742
|
* ```
|
|
3743
3743
|
*
|
|
3744
3744
|
* `GtkNotebook` has a main CSS node with name `notebook`, a subnode
|
|
@@ -3929,8 +3929,8 @@ export const Paned = {
|
|
|
3929
3929
|
* ```
|
|
3930
3930
|
* entry.password
|
|
3931
3931
|
* ╰── text
|
|
3932
|
-
*
|
|
3933
|
-
*
|
|
3932
|
+
* ├── image.caps-lock-indicator
|
|
3933
|
+
* ┊
|
|
3934
3934
|
* ```
|
|
3935
3935
|
*
|
|
3936
3936
|
* `GtkPasswordEntry` has a single CSS node with name entry that carries
|
|
@@ -4025,22 +4025,22 @@ export const Picture = "Picture";
|
|
|
4025
4025
|
*
|
|
4026
4026
|
* ```xml
|
|
4027
4027
|
* <section>
|
|
4028
|
-
*
|
|
4029
|
-
*
|
|
4030
|
-
*
|
|
4031
|
-
*
|
|
4032
|
-
*
|
|
4033
|
-
*
|
|
4034
|
-
*
|
|
4035
|
-
*
|
|
4036
|
-
*
|
|
4037
|
-
*
|
|
4038
|
-
*
|
|
4039
|
-
*
|
|
4040
|
-
*
|
|
4041
|
-
*
|
|
4042
|
-
*
|
|
4043
|
-
*
|
|
4028
|
+
* <attribute name="display-hint">horizontal-buttons</attribute>
|
|
4029
|
+
* <item>
|
|
4030
|
+
* <attribute name="label">Cut</attribute>
|
|
4031
|
+
* <attribute name="action">app.cut</attribute>
|
|
4032
|
+
* <attribute name="verb-icon">edit-cut-symbolic</attribute>
|
|
4033
|
+
* </item>
|
|
4034
|
+
* <item>
|
|
4035
|
+
* <attribute name="label">Copy</attribute>
|
|
4036
|
+
* <attribute name="action">app.copy</attribute>
|
|
4037
|
+
* <attribute name="verb-icon">edit-copy-symbolic</attribute>
|
|
4038
|
+
* </item>
|
|
4039
|
+
* <item>
|
|
4040
|
+
* <attribute name="label">Paste</attribute>
|
|
4041
|
+
* <attribute name="action">app.paste</attribute>
|
|
4042
|
+
* <attribute name="verb-icon">edit-paste-symbolic</attribute>
|
|
4043
|
+
* </item>
|
|
4044
4044
|
* </section>
|
|
4045
4045
|
* ```
|
|
4046
4046
|
*
|
|
@@ -4061,7 +4061,7 @@ export const Picture = "Picture";
|
|
|
4061
4061
|
* popover.background[.menu]
|
|
4062
4062
|
* ├── arrow
|
|
4063
4063
|
* ╰── contents
|
|
4064
|
-
*
|
|
4064
|
+
* ╰── <child>
|
|
4065
4065
|
* ```
|
|
4066
4066
|
*
|
|
4067
4067
|
* `GtkPopover` has a main node with name `popover`, an arrow with name `arrow`,
|
|
@@ -4133,20 +4133,20 @@ function PopoverMenuSubmenu(props) {
|
|
|
4133
4133
|
*
|
|
4134
4134
|
* ```xml
|
|
4135
4135
|
* <menu id='app-menu'>
|
|
4136
|
-
*
|
|
4137
|
-
*
|
|
4138
|
-
*
|
|
4139
|
-
*
|
|
4140
|
-
*
|
|
4141
|
-
*
|
|
4142
|
-
*
|
|
4143
|
-
*
|
|
4144
|
-
*
|
|
4145
|
-
*
|
|
4146
|
-
*
|
|
4147
|
-
*
|
|
4148
|
-
*
|
|
4149
|
-
*
|
|
4136
|
+
* <section>
|
|
4137
|
+
* <item>
|
|
4138
|
+
* <attribute name='label' translatable='yes'>_New Window</attribute>
|
|
4139
|
+
* <attribute name='action'>app.new</attribute>
|
|
4140
|
+
* </item>
|
|
4141
|
+
* <item>
|
|
4142
|
+
* <attribute name='label' translatable='yes'>_About Sunny</attribute>
|
|
4143
|
+
* <attribute name='action'>app.about</attribute>
|
|
4144
|
+
* </item>
|
|
4145
|
+
* <item>
|
|
4146
|
+
* <attribute name='label' translatable='yes'>_Quit</attribute>
|
|
4147
|
+
* <attribute name='action'>app.quit</attribute>
|
|
4148
|
+
* </item>
|
|
4149
|
+
* </section>
|
|
4150
4150
|
* </menu>
|
|
4151
4151
|
* ```
|
|
4152
4152
|
*
|
|
@@ -4243,7 +4243,7 @@ export const PopoverMenu = {
|
|
|
4243
4243
|
* ├── item[.active]
|
|
4244
4244
|
* ┊ ╰── popover
|
|
4245
4245
|
* ╰── item
|
|
4246
|
-
*
|
|
4246
|
+
* ╰── popover
|
|
4247
4247
|
* ```
|
|
4248
4248
|
*
|
|
4249
4249
|
* `GtkPopoverMenuBar` has a single CSS node with name menubar, below which
|
|
@@ -4289,26 +4289,26 @@ export const PopoverMenuBar = "PopoverMenuBar";
|
|
|
4289
4289
|
*
|
|
4290
4290
|
* ```xml
|
|
4291
4291
|
* <object class="GtkPrintUnixDialog" id="dialog1">
|
|
4292
|
-
*
|
|
4293
|
-
*
|
|
4294
|
-
*
|
|
4295
|
-
*
|
|
4296
|
-
*
|
|
4297
|
-
*
|
|
4298
|
-
*
|
|
4299
|
-
*
|
|
4300
|
-
*
|
|
4301
|
-
*
|
|
4302
|
-
*
|
|
4303
|
-
*
|
|
4304
|
-
*
|
|
4305
|
-
*
|
|
4306
|
-
*
|
|
4307
|
-
*
|
|
4308
|
-
*
|
|
4309
|
-
*
|
|
4310
|
-
*
|
|
4311
|
-
*
|
|
4292
|
+
* <child internal-child="notebook">
|
|
4293
|
+
* <object class="GtkNotebook" id="notebook">
|
|
4294
|
+
* <child>
|
|
4295
|
+
* <object type="GtkNotebookPage">
|
|
4296
|
+
* <property name="tab_expand">False</property>
|
|
4297
|
+
* <property name="tab_fill">False</property>
|
|
4298
|
+
* <property name="tab">
|
|
4299
|
+
* <object class="GtkLabel" id="tablabel">
|
|
4300
|
+
* <property name="label">Tab label</property>
|
|
4301
|
+
* </object>
|
|
4302
|
+
* </property>
|
|
4303
|
+
* <property name="child">
|
|
4304
|
+
* <object class="GtkLabel" id="tabcontent">
|
|
4305
|
+
* <property name="label">Content on notebook tab</property>
|
|
4306
|
+
* </object>
|
|
4307
|
+
* </property>
|
|
4308
|
+
* </object>
|
|
4309
|
+
* </child>
|
|
4310
|
+
* </object>
|
|
4311
|
+
* </child>
|
|
4312
4312
|
* </object>
|
|
4313
4313
|
* ```
|
|
4314
4314
|
*
|
|
@@ -4350,7 +4350,7 @@ export const PrintUnixDialog = "PrintUnixDialog";
|
|
|
4350
4350
|
* progressbar[.osd]
|
|
4351
4351
|
* ├── [text]
|
|
4352
4352
|
* ╰── trough[.empty][.full]
|
|
4353
|
-
*
|
|
4353
|
+
* ╰── progress[.pulse]
|
|
4354
4354
|
* ```
|
|
4355
4355
|
*
|
|
4356
4356
|
* `GtkProgressBar` has a main CSS node with name progressbar and subnodes with
|
|
@@ -4461,9 +4461,9 @@ export const Revealer = "Revealer";
|
|
|
4461
4461
|
* ┊ ┊
|
|
4462
4462
|
* │ ╰── mark
|
|
4463
4463
|
* ╰── trough
|
|
4464
|
-
*
|
|
4465
|
-
*
|
|
4466
|
-
*
|
|
4464
|
+
* ├── [fill]
|
|
4465
|
+
* ├── [highlight]
|
|
4466
|
+
* ╰── slider
|
|
4467
4467
|
* ```
|
|
4468
4468
|
*
|
|
4469
4469
|
* `GtkScale` has a main CSS node with name scale and a subnode for its contents,
|
|
@@ -4519,7 +4519,7 @@ export const Scale = "Scale";
|
|
|
4519
4519
|
* ```
|
|
4520
4520
|
* scalebutton.scale
|
|
4521
4521
|
* ╰── button.toggle
|
|
4522
|
-
*
|
|
4522
|
+
* ╰── <icon>
|
|
4523
4523
|
* ```
|
|
4524
4524
|
*
|
|
4525
4525
|
* `GtkScaleButton` has a single CSS node with name scalebutton and `.scale`
|
|
@@ -4550,8 +4550,8 @@ export const ScaleButton = "ScaleButton";
|
|
|
4550
4550
|
* ```
|
|
4551
4551
|
* scrollbar
|
|
4552
4552
|
* ╰── range[.fine-tune]
|
|
4553
|
-
*
|
|
4554
|
-
*
|
|
4553
|
+
* ╰── trough
|
|
4554
|
+
* ╰── slider
|
|
4555
4555
|
* ```
|
|
4556
4556
|
*
|
|
4557
4557
|
* `GtkScrollbar` has a main CSS node with name scrollbar and a subnode for its
|
|
@@ -4689,9 +4689,9 @@ export const ScrolledWindow = "ScrolledWindow";
|
|
|
4689
4689
|
* ```
|
|
4690
4690
|
* searchbar
|
|
4691
4691
|
* ╰── revealer
|
|
4692
|
-
*
|
|
4693
|
-
*
|
|
4694
|
-
*
|
|
4692
|
+
* ╰── box
|
|
4693
|
+
* ├── [child]
|
|
4694
|
+
* ╰── [button.close]
|
|
4695
4695
|
* ```
|
|
4696
4696
|
*
|
|
4697
4697
|
* `GtkSearchBar` has a main CSS node with name searchbar. It has a child
|
|
@@ -4936,27 +4936,27 @@ export const ShortcutsWindow = "ShortcutsWindow";
|
|
|
4936
4936
|
*
|
|
4937
4937
|
* int
|
|
4938
4938
|
* grab_int_value (GtkSpinButton *button,
|
|
4939
|
-
*
|
|
4939
|
+
* gpointer user_data)
|
|
4940
4940
|
* {
|
|
4941
|
-
*
|
|
4941
|
+
* return gtk_spin_button_get_value_as_int (button);
|
|
4942
4942
|
* }
|
|
4943
4943
|
*
|
|
4944
4944
|
* void
|
|
4945
4945
|
* create_integer_spin_button (void)
|
|
4946
4946
|
* {
|
|
4947
4947
|
*
|
|
4948
|
-
*
|
|
4949
|
-
*
|
|
4948
|
+
* GtkWidget *window, *button;
|
|
4949
|
+
* GtkAdjustment *adjustment;
|
|
4950
4950
|
*
|
|
4951
|
-
*
|
|
4951
|
+
* adjustment = gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 0.0);
|
|
4952
4952
|
*
|
|
4953
|
-
*
|
|
4953
|
+
* window = gtk_window_new ();
|
|
4954
4954
|
*
|
|
4955
|
-
*
|
|
4956
|
-
*
|
|
4957
|
-
*
|
|
4955
|
+
* // creates the spinbutton, with no decimal places
|
|
4956
|
+
* button = gtk_spin_button_new (adjustment, 1.0, 0);
|
|
4957
|
+
* gtk_window_set_child (GTK_WINDOW (window), button);
|
|
4958
4958
|
*
|
|
4959
|
-
*
|
|
4959
|
+
* gtk_window_present (GTK_WINDOW (window));
|
|
4960
4960
|
* }
|
|
4961
4961
|
* ```
|
|
4962
4962
|
*
|
|
@@ -4968,26 +4968,26 @@ export const ShortcutsWindow = "ShortcutsWindow";
|
|
|
4968
4968
|
*
|
|
4969
4969
|
* float
|
|
4970
4970
|
* grab_float_value (GtkSpinButton *button,
|
|
4971
|
-
*
|
|
4971
|
+
* gpointer user_data)
|
|
4972
4972
|
* {
|
|
4973
|
-
*
|
|
4973
|
+
* return gtk_spin_button_get_value (button);
|
|
4974
4974
|
* }
|
|
4975
4975
|
*
|
|
4976
4976
|
* void
|
|
4977
4977
|
* create_floating_spin_button (void)
|
|
4978
4978
|
* {
|
|
4979
|
-
*
|
|
4980
|
-
*
|
|
4979
|
+
* GtkWidget *window, *button;
|
|
4980
|
+
* GtkAdjustment *adjustment;
|
|
4981
4981
|
*
|
|
4982
|
-
*
|
|
4982
|
+
* adjustment = gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.0);
|
|
4983
4983
|
*
|
|
4984
|
-
*
|
|
4984
|
+
* window = gtk_window_new ();
|
|
4985
4985
|
*
|
|
4986
|
-
*
|
|
4987
|
-
*
|
|
4988
|
-
*
|
|
4986
|
+
* // creates the spinbutton, with three decimal places
|
|
4987
|
+
* button = gtk_spin_button_new (adjustment, 0.001, 3);
|
|
4988
|
+
* gtk_window_set_child (GTK_WINDOW (window), button);
|
|
4989
4989
|
*
|
|
4990
|
-
*
|
|
4990
|
+
* gtk_window_present (GTK_WINDOW (window));
|
|
4991
4991
|
* }
|
|
4992
4992
|
* ```
|
|
4993
4993
|
*
|
|
@@ -5086,18 +5086,18 @@ function StackVisibleChild(props) {
|
|
|
5086
5086
|
* objects explicitly, and set the child widget as a property on it:
|
|
5087
5087
|
*
|
|
5088
5088
|
* ```xml
|
|
5089
|
-
*
|
|
5090
|
-
*
|
|
5091
|
-
*
|
|
5092
|
-
*
|
|
5093
|
-
*
|
|
5094
|
-
*
|
|
5095
|
-
*
|
|
5096
|
-
*
|
|
5097
|
-
*
|
|
5098
|
-
*
|
|
5099
|
-
*
|
|
5100
|
-
*
|
|
5089
|
+
* <object class="GtkStack" id="stack">
|
|
5090
|
+
* <child>
|
|
5091
|
+
* <object class="GtkStackPage">
|
|
5092
|
+
* <property name="name">page1</property>
|
|
5093
|
+
* <property name="title">In the beginning…</property>
|
|
5094
|
+
* <property name="child">
|
|
5095
|
+
* <object class="GtkLabel">
|
|
5096
|
+
* <property name="label">It was dark</property>
|
|
5097
|
+
* </object>
|
|
5098
|
+
* </property>
|
|
5099
|
+
* </object>
|
|
5100
|
+
* </child>
|
|
5101
5101
|
* ```
|
|
5102
5102
|
*
|
|
5103
5103
|
* # CSS nodes
|
|
@@ -5481,40 +5481,40 @@ export const TextView = "TextView";
|
|
|
5481
5481
|
* ```c
|
|
5482
5482
|
* static void
|
|
5483
5483
|
* output_state (GtkToggleButton *source,
|
|
5484
|
-
*
|
|
5484
|
+
* gpointer user_data)
|
|
5485
5485
|
* {
|
|
5486
|
-
*
|
|
5487
|
-
*
|
|
5488
|
-
*
|
|
5486
|
+
* g_print ("Toggle button "%s" is active: %s",
|
|
5487
|
+
* gtk_button_get_label (GTK_BUTTON (source)),
|
|
5488
|
+
* gtk_toggle_button_get_active (source) ? "Yes" : "No");
|
|
5489
5489
|
* }
|
|
5490
5490
|
*
|
|
5491
5491
|
* static void
|
|
5492
5492
|
* make_toggles (void)
|
|
5493
5493
|
* {
|
|
5494
|
-
*
|
|
5495
|
-
*
|
|
5496
|
-
*
|
|
5497
|
-
*
|
|
5498
|
-
*
|
|
5499
|
-
*
|
|
5500
|
-
*
|
|
5501
|
-
*
|
|
5502
|
-
*
|
|
5503
|
-
*
|
|
5504
|
-
*
|
|
5505
|
-
*
|
|
5506
|
-
*
|
|
5507
|
-
*
|
|
5508
|
-
*
|
|
5509
|
-
*
|
|
5510
|
-
*
|
|
5511
|
-
*
|
|
5512
|
-
*
|
|
5513
|
-
*
|
|
5514
|
-
*
|
|
5515
|
-
*
|
|
5516
|
-
*
|
|
5517
|
-
*
|
|
5494
|
+
* GtkWidget *window, *toggle1, *toggle2;
|
|
5495
|
+
* GtkWidget *box;
|
|
5496
|
+
* const char *text;
|
|
5497
|
+
*
|
|
5498
|
+
* window = gtk_window_new ();
|
|
5499
|
+
* box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
|
5500
|
+
*
|
|
5501
|
+
* text = "Hi, I’m toggle button one";
|
|
5502
|
+
* toggle1 = gtk_toggle_button_new_with_label (text);
|
|
5503
|
+
*
|
|
5504
|
+
* g_signal_connect (toggle1, "toggled",
|
|
5505
|
+
* G_CALLBACK (output_state),
|
|
5506
|
+
* NULL);
|
|
5507
|
+
* gtk_box_append (GTK_BOX (box), toggle1);
|
|
5508
|
+
*
|
|
5509
|
+
* text = "Hi, I’m toggle button two";
|
|
5510
|
+
* toggle2 = gtk_toggle_button_new_with_label (text);
|
|
5511
|
+
* g_signal_connect (toggle2, "toggled",
|
|
5512
|
+
* G_CALLBACK (output_state),
|
|
5513
|
+
* NULL);
|
|
5514
|
+
* gtk_box_append (GTK_BOX (box), toggle2);
|
|
5515
|
+
*
|
|
5516
|
+
* gtk_window_set_child (GTK_WINDOW (window), box);
|
|
5517
|
+
* gtk_window_present (GTK_WINDOW (window));
|
|
5518
5518
|
* }
|
|
5519
5519
|
* ```
|
|
5520
5520
|
*/
|
|
@@ -5643,23 +5643,23 @@ export const TreeExpander = "TreeExpander";
|
|
|
5643
5643
|
*
|
|
5644
5644
|
* ```xml
|
|
5645
5645
|
* <object class="GtkTreeView" id="treeview">
|
|
5646
|
-
*
|
|
5647
|
-
*
|
|
5648
|
-
*
|
|
5649
|
-
*
|
|
5650
|
-
*
|
|
5651
|
-
*
|
|
5652
|
-
*
|
|
5653
|
-
*
|
|
5654
|
-
*
|
|
5655
|
-
*
|
|
5656
|
-
*
|
|
5657
|
-
*
|
|
5658
|
-
*
|
|
5659
|
-
*
|
|
5660
|
-
*
|
|
5661
|
-
*
|
|
5662
|
-
*
|
|
5646
|
+
* <property name="model">liststore1</property>
|
|
5647
|
+
* <child>
|
|
5648
|
+
* <object class="GtkTreeViewColumn" id="test-column">
|
|
5649
|
+
* <property name="title">Test</property>
|
|
5650
|
+
* <child>
|
|
5651
|
+
* <object class="GtkCellRendererText" id="test-renderer"/>
|
|
5652
|
+
* <attributes>
|
|
5653
|
+
* <attribute name="text">1</attribute>
|
|
5654
|
+
* </attributes>
|
|
5655
|
+
* </child>
|
|
5656
|
+
* </object>
|
|
5657
|
+
* </child>
|
|
5658
|
+
* <child internal-child="selection">
|
|
5659
|
+
* <object class="GtkTreeSelection" id="selection">
|
|
5660
|
+
* <signal name="changed" handler="on_treeview_selection_changed"/>
|
|
5661
|
+
* </object>
|
|
5662
|
+
* </child>
|
|
5663
5663
|
* </object>
|
|
5664
5664
|
* ```
|
|
5665
5665
|
*
|
|
@@ -5751,19 +5751,19 @@ export const VolumeButton = "VolumeButton";
|
|
|
5751
5751
|
*
|
|
5752
5752
|
* ```xml
|
|
5753
5753
|
* <object class="GtkBox">
|
|
5754
|
-
*
|
|
5755
|
-
*
|
|
5756
|
-
*
|
|
5757
|
-
*
|
|
5758
|
-
*
|
|
5759
|
-
*
|
|
5760
|
-
*
|
|
5761
|
-
*
|
|
5762
|
-
*
|
|
5763
|
-
*
|
|
5764
|
-
*
|
|
5765
|
-
*
|
|
5766
|
-
*
|
|
5754
|
+
* <child>
|
|
5755
|
+
* <object class="GtkWindowControls">
|
|
5756
|
+
* <property name="side">start</property>
|
|
5757
|
+
* </object>
|
|
5758
|
+
* </child>
|
|
5759
|
+
*
|
|
5760
|
+
* ...
|
|
5761
|
+
*
|
|
5762
|
+
* <child>
|
|
5763
|
+
* <object class="GtkWindowControls">
|
|
5764
|
+
* <property name="side">end</property>
|
|
5765
|
+
* </object>
|
|
5766
|
+
* </child>
|
|
5767
5767
|
* </object>
|
|
5768
5768
|
* ```
|
|
5769
5769
|
*
|
|
@@ -5820,16 +5820,16 @@ export const WindowHandle = "WindowHandle";
|
|
|
5820
5820
|
*
|
|
5821
5821
|
* ```xml
|
|
5822
5822
|
* <object class="AdwWindow">
|
|
5823
|
-
*
|
|
5824
|
-
*
|
|
5825
|
-
*
|
|
5826
|
-
*
|
|
5827
|
-
*
|
|
5828
|
-
*
|
|
5829
|
-
*
|
|
5830
|
-
*
|
|
5831
|
-
*
|
|
5832
|
-
*
|
|
5823
|
+
* <property name="content">
|
|
5824
|
+
* <object class="AdwToolbarView">
|
|
5825
|
+
* <child type="top">
|
|
5826
|
+
* <object class="AdwHeaderBar"/>
|
|
5827
|
+
* </child>
|
|
5828
|
+
* <property name="content">
|
|
5829
|
+
* <!-- ... -->
|
|
5830
|
+
* </property>
|
|
5831
|
+
* </object>
|
|
5832
|
+
* </property>
|
|
5833
5833
|
* </object>
|
|
5834
5834
|
* ```
|
|
5835
5835
|
*
|
|
@@ -5851,28 +5851,28 @@ export const WindowHandle = "WindowHandle";
|
|
|
5851
5851
|
*
|
|
5852
5852
|
* ```xml
|
|
5853
5853
|
* <object class="AdwWindow">
|
|
5854
|
-
*
|
|
5855
|
-
*
|
|
5856
|
-
*
|
|
5857
|
-
*
|
|
5858
|
-
*
|
|
5859
|
-
*
|
|
5860
|
-
*
|
|
5861
|
-
*
|
|
5862
|
-
*
|
|
5863
|
-
*
|
|
5864
|
-
*
|
|
5865
|
-
*
|
|
5866
|
-
*
|
|
5867
|
-
*
|
|
5868
|
-
*
|
|
5869
|
-
*
|
|
5870
|
-
*
|
|
5871
|
-
*
|
|
5872
|
-
*
|
|
5873
|
-
*
|
|
5874
|
-
*
|
|
5875
|
-
*
|
|
5854
|
+
* <property name="content">
|
|
5855
|
+
* <object class="AdwToolbarView">
|
|
5856
|
+
* <child type="top">
|
|
5857
|
+
* <object class="AdwHeaderBar"/>
|
|
5858
|
+
* </child>
|
|
5859
|
+
* <property name="content">
|
|
5860
|
+
* <!-- ... -->
|
|
5861
|
+
* </property>
|
|
5862
|
+
* <child type="bottom">
|
|
5863
|
+
* <object class="GtkActionBar" id="bottom_bar">
|
|
5864
|
+
* <property name="revealed">True</property>
|
|
5865
|
+
* <property name="visible">False</property>
|
|
5866
|
+
* </object>
|
|
5867
|
+
* </child>
|
|
5868
|
+
* </object>
|
|
5869
|
+
* </property>
|
|
5870
|
+
* <child>
|
|
5871
|
+
* <object class="AdwBreakpoint">
|
|
5872
|
+
* <condition>max-width: 500px</condition>
|
|
5873
|
+
* <setter object="bottom_bar" property="visible">True</setter>
|
|
5874
|
+
* </object>
|
|
5875
|
+
* </child>
|
|
5876
5876
|
* </object>
|
|
5877
5877
|
* ```
|
|
5878
5878
|
*
|
|
@@ -6028,27 +6028,27 @@ export const AdwWindow = {
|
|
|
6028
6028
|
* static void
|
|
6029
6029
|
* show_about (GtkApplication *app)
|
|
6030
6030
|
* {
|
|
6031
|
-
*
|
|
6032
|
-
*
|
|
6033
|
-
*
|
|
6034
|
-
*
|
|
6035
|
-
*
|
|
6036
|
-
*
|
|
6037
|
-
*
|
|
6038
|
-
*
|
|
6039
|
-
*
|
|
6040
|
-
*
|
|
6041
|
-
*
|
|
6042
|
-
*
|
|
6043
|
-
*
|
|
6044
|
-
*
|
|
6045
|
-
*
|
|
6046
|
-
*
|
|
6047
|
-
*
|
|
6048
|
-
*
|
|
6049
|
-
*
|
|
6050
|
-
*
|
|
6051
|
-
*
|
|
6031
|
+
* const char *developers[] = {
|
|
6032
|
+
* "Angela Avery",
|
|
6033
|
+
* NULL
|
|
6034
|
+
* };
|
|
6035
|
+
*
|
|
6036
|
+
* const char *designers[] = {
|
|
6037
|
+
* "GNOME Design Team",
|
|
6038
|
+
* NULL
|
|
6039
|
+
* };
|
|
6040
|
+
*
|
|
6041
|
+
* adw_show_about_dialog (GTK_WIDGET (gtk_application_get_active_window (app)),
|
|
6042
|
+
* "application-name", _("Example"),
|
|
6043
|
+
* "application-icon", "org.example.App",
|
|
6044
|
+
* "version", "1.2.3",
|
|
6045
|
+
* "copyright", "© 2022 Angela Avery",
|
|
6046
|
+
* "issue-url", "https://gitlab.gnome.org/example/example/-/issues/",
|
|
6047
|
+
* "license-type", GTK_LICENSE_GPL_3_0,
|
|
6048
|
+
* "developers", developers,
|
|
6049
|
+
* "designers", designers,
|
|
6050
|
+
* "translator-credits", _("translator-credits"),
|
|
6051
|
+
* NULL);
|
|
6052
6052
|
* }
|
|
6053
6053
|
* ```
|
|
6054
6054
|
*
|
|
@@ -6190,27 +6190,27 @@ export const AdwAboutDialog = "AdwAboutDialog";
|
|
|
6190
6190
|
* static void
|
|
6191
6191
|
* show_about (GtkApplication *app)
|
|
6192
6192
|
* {
|
|
6193
|
-
*
|
|
6194
|
-
*
|
|
6195
|
-
*
|
|
6196
|
-
*
|
|
6197
|
-
*
|
|
6198
|
-
*
|
|
6199
|
-
*
|
|
6200
|
-
*
|
|
6201
|
-
*
|
|
6202
|
-
*
|
|
6203
|
-
*
|
|
6204
|
-
*
|
|
6205
|
-
*
|
|
6206
|
-
*
|
|
6207
|
-
*
|
|
6208
|
-
*
|
|
6209
|
-
*
|
|
6210
|
-
*
|
|
6211
|
-
*
|
|
6212
|
-
*
|
|
6213
|
-
*
|
|
6193
|
+
* const char *developers[] = {
|
|
6194
|
+
* "Angela Avery",
|
|
6195
|
+
* NULL
|
|
6196
|
+
* };
|
|
6197
|
+
*
|
|
6198
|
+
* const char *designers[] = {
|
|
6199
|
+
* "GNOME Design Team",
|
|
6200
|
+
* NULL
|
|
6201
|
+
* };
|
|
6202
|
+
*
|
|
6203
|
+
* adw_show_about_window (gtk_application_get_active_window (app),
|
|
6204
|
+
* "application-name", _("Example"),
|
|
6205
|
+
* "application-icon", "org.example.App",
|
|
6206
|
+
* "version", "1.2.3",
|
|
6207
|
+
* "copyright", "© 2022 Angela Avery",
|
|
6208
|
+
* "issue-url", "https://gitlab.gnome.org/example/example/-/issues/",
|
|
6209
|
+
* "license-type", GTK_LICENSE_GPL_3_0,
|
|
6210
|
+
* "developers", developers,
|
|
6211
|
+
* "designers", designers,
|
|
6212
|
+
* "translator-credits", _("translator-credits"),
|
|
6213
|
+
* NULL);
|
|
6214
6214
|
* }
|
|
6215
6215
|
* ```
|
|
6216
6216
|
*
|
|
@@ -6300,17 +6300,17 @@ export const AdwActionRow = {
|
|
|
6300
6300
|
* dialog = adw_alert_dialog_new (_("Replace File?"), NULL);
|
|
6301
6301
|
*
|
|
6302
6302
|
* adw_alert_dialog_format_body (ADW_ALERT_DIALOG (dialog),
|
|
6303
|
-
*
|
|
6304
|
-
*
|
|
6303
|
+
* _("A file named “%s” already exists. Do you want to replace it?"),
|
|
6304
|
+
* filename);
|
|
6305
6305
|
*
|
|
6306
6306
|
* adw_alert_dialog_add_responses (ADW_ALERT_DIALOG (dialog),
|
|
6307
|
-
*
|
|
6308
|
-
*
|
|
6309
|
-
*
|
|
6307
|
+
* "cancel", _("_Cancel"),
|
|
6308
|
+
* "replace", _("_Replace"),
|
|
6309
|
+
* NULL);
|
|
6310
6310
|
*
|
|
6311
6311
|
* adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dialog),
|
|
6312
|
-
*
|
|
6313
|
-
*
|
|
6312
|
+
* "replace",
|
|
6313
|
+
* ADW_RESPONSE_DESTRUCTIVE);
|
|
6314
6314
|
*
|
|
6315
6315
|
* adw_alert_dialog_set_default_response (ADW_ALERT_DIALOG (dialog), "cancel");
|
|
6316
6316
|
* adw_alert_dialog_set_close_response (ADW_ALERT_DIALOG (dialog), "cancel");
|
|
@@ -6328,39 +6328,39 @@ export const AdwActionRow = {
|
|
|
6328
6328
|
* ```c
|
|
6329
6329
|
* static void
|
|
6330
6330
|
* dialog_cb (AdwAlertDialog *dialog,
|
|
6331
|
-
*
|
|
6332
|
-
*
|
|
6331
|
+
* GAsyncResult *result,
|
|
6332
|
+
* MyWindow *self)
|
|
6333
6333
|
* {
|
|
6334
|
-
*
|
|
6334
|
+
* const char *response = adw_alert_dialog_choose_finish (dialog, result);
|
|
6335
6335
|
*
|
|
6336
|
-
*
|
|
6336
|
+
* // ...
|
|
6337
6337
|
* }
|
|
6338
6338
|
*
|
|
6339
6339
|
* static void
|
|
6340
6340
|
* show_dialog (MyWindow *self)
|
|
6341
6341
|
* {
|
|
6342
|
-
*
|
|
6342
|
+
* AdwDialog *dialog;
|
|
6343
6343
|
*
|
|
6344
|
-
*
|
|
6344
|
+
* dialog = adw_alert_dialog_new (_("Replace File?"), NULL);
|
|
6345
6345
|
*
|
|
6346
|
-
*
|
|
6347
|
-
*
|
|
6348
|
-
*
|
|
6346
|
+
* adw_alert_dialog_format_body (ADW_ALERT_DIALOG (dialog),
|
|
6347
|
+
* _("A file named “%s” already exists. Do you want to replace it?"),
|
|
6348
|
+
* filename);
|
|
6349
6349
|
*
|
|
6350
|
-
*
|
|
6351
|
-
*
|
|
6352
|
-
*
|
|
6353
|
-
*
|
|
6350
|
+
* adw_alert_dialog_add_responses (ADW_ALERT_DIALOG (dialog),
|
|
6351
|
+
* "cancel", _("_Cancel"),
|
|
6352
|
+
* "replace", _("_Replace"),
|
|
6353
|
+
* NULL);
|
|
6354
6354
|
*
|
|
6355
|
-
*
|
|
6356
|
-
*
|
|
6357
|
-
*
|
|
6355
|
+
* adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dialog),
|
|
6356
|
+
* "replace",
|
|
6357
|
+
* ADW_RESPONSE_DESTRUCTIVE);
|
|
6358
6358
|
*
|
|
6359
|
-
*
|
|
6360
|
-
*
|
|
6359
|
+
* adw_alert_dialog_set_default_response (ADW_ALERT_DIALOG (dialog), "cancel");
|
|
6360
|
+
* adw_alert_dialog_set_close_response (ADW_ALERT_DIALOG (dialog), "cancel");
|
|
6361
6361
|
*
|
|
6362
|
-
*
|
|
6363
|
-
*
|
|
6362
|
+
* adw_alert_dialog_choose (ADW_ALERT_DIALOG (dialog), GTK_WIDGET (self),
|
|
6363
|
+
* NULL, (GAsyncReadyCallback) dialog_cb, self);
|
|
6364
6364
|
* }
|
|
6365
6365
|
* ```
|
|
6366
6366
|
*
|
|
@@ -6384,16 +6384,16 @@ export const AdwActionRow = {
|
|
|
6384
6384
|
*
|
|
6385
6385
|
* ```xml
|
|
6386
6386
|
* <object class="AdwAlertDialog" id="dialog">
|
|
6387
|
-
*
|
|
6388
|
-
*
|
|
6389
|
-
*
|
|
6390
|
-
*
|
|
6391
|
-
*
|
|
6392
|
-
*
|
|
6393
|
-
*
|
|
6394
|
-
*
|
|
6395
|
-
*
|
|
6396
|
-
*
|
|
6387
|
+
* <property name="heading" translatable="yes">Save Changes?</property>
|
|
6388
|
+
* <property name="body" translatable="yes">Open documents contain unsaved changes. Changes which are not saved will be permanently lost.</property>
|
|
6389
|
+
* <property name="default-response">save</property>
|
|
6390
|
+
* <property name="close-response">cancel</property>
|
|
6391
|
+
* <signal name="response" handler="response_cb"/>
|
|
6392
|
+
* <responses>
|
|
6393
|
+
* <response id="cancel" translatable="yes">_Cancel</response>
|
|
6394
|
+
* <response id="discard" translatable="yes" appearance="destructive">_Discard</response>
|
|
6395
|
+
* <response id="save" translatable="yes" appearance="suggested" enabled="false">_Save</response>
|
|
6396
|
+
* </responses>
|
|
6397
6397
|
* </object>
|
|
6398
6398
|
* ```
|
|
6399
6399
|
*/
|
|
@@ -6415,16 +6415,16 @@ export const AdwAlertDialog = {
|
|
|
6415
6415
|
*
|
|
6416
6416
|
* ```xml
|
|
6417
6417
|
* <object class="AdwApplicationWindow">
|
|
6418
|
-
*
|
|
6419
|
-
*
|
|
6420
|
-
*
|
|
6421
|
-
*
|
|
6422
|
-
*
|
|
6423
|
-
*
|
|
6424
|
-
*
|
|
6425
|
-
*
|
|
6426
|
-
*
|
|
6427
|
-
*
|
|
6418
|
+
* <property name="content">
|
|
6419
|
+
* <object class="AdwToolbarView">
|
|
6420
|
+
* <child type="top">
|
|
6421
|
+
* <object class="AdwHeaderBar"/>
|
|
6422
|
+
* </child>
|
|
6423
|
+
* <property name="content">
|
|
6424
|
+
* <!-- ... -->
|
|
6425
|
+
* </property>
|
|
6426
|
+
* </object>
|
|
6427
|
+
* </property>
|
|
6428
6428
|
* </object>
|
|
6429
6429
|
* ```
|
|
6430
6430
|
*
|
|
@@ -6648,8 +6648,8 @@ export const AdwBottomSheet = {
|
|
|
6648
6648
|
*
|
|
6649
6649
|
* breakpoint = adw_breakpoint_new (adw_breakpoint_condition_parse ("max-width: 200px"));
|
|
6650
6650
|
* adw_breakpoint_add_setters (breakpoint,
|
|
6651
|
-
*
|
|
6652
|
-
*
|
|
6651
|
+
* G_OBJECT (child), "label", "Narrow",
|
|
6652
|
+
* NULL);
|
|
6653
6653
|
* adw_breakpoint_bin_add_breakpoint (ADW_BREAKPOINT_BIN (bin), breakpoint);
|
|
6654
6654
|
* ```
|
|
6655
6655
|
*
|
|
@@ -6664,23 +6664,23 @@ export const AdwBottomSheet = {
|
|
|
6664
6664
|
*
|
|
6665
6665
|
* ```xml
|
|
6666
6666
|
* <object class="AdwBreakpointBin">
|
|
6667
|
-
*
|
|
6668
|
-
*
|
|
6669
|
-
*
|
|
6670
|
-
*
|
|
6671
|
-
*
|
|
6672
|
-
*
|
|
6673
|
-
*
|
|
6674
|
-
*
|
|
6675
|
-
*
|
|
6676
|
-
*
|
|
6677
|
-
*
|
|
6678
|
-
*
|
|
6679
|
-
*
|
|
6680
|
-
*
|
|
6681
|
-
*
|
|
6682
|
-
*
|
|
6683
|
-
*
|
|
6667
|
+
* <property name="width-request">150</property>
|
|
6668
|
+
* <property name="height-request">150</property>
|
|
6669
|
+
* <property name="child">
|
|
6670
|
+
* <object class="GtkLabel" id="child">
|
|
6671
|
+
* <property name="label">Wide</property>
|
|
6672
|
+
* <property name="ellipsize">end</property>
|
|
6673
|
+
* <style>
|
|
6674
|
+
* <class name="title-1"/>
|
|
6675
|
+
* </style>
|
|
6676
|
+
* </object>
|
|
6677
|
+
* </property>
|
|
6678
|
+
* <child>
|
|
6679
|
+
* <object class="AdwBreakpoint">
|
|
6680
|
+
* <condition>max-width: 200px</condition>
|
|
6681
|
+
* <setter object="child" property="label">Narrow</setter>
|
|
6682
|
+
* </object>
|
|
6683
|
+
* </child>
|
|
6684
6684
|
* </object>
|
|
6685
6685
|
* ```
|
|
6686
6686
|
*
|
|
@@ -6700,13 +6700,13 @@ export const AdwBreakpointBin = "AdwBreakpointBin";
|
|
|
6700
6700
|
*
|
|
6701
6701
|
* ```xml
|
|
6702
6702
|
* <object class="GtkButton">
|
|
6703
|
-
*
|
|
6704
|
-
*
|
|
6705
|
-
*
|
|
6706
|
-
*
|
|
6707
|
-
*
|
|
6708
|
-
*
|
|
6709
|
-
*
|
|
6703
|
+
* <property name="child">
|
|
6704
|
+
* <object class="AdwButtonContent">
|
|
6705
|
+
* <property name="icon-name">document-open-symbolic</property>
|
|
6706
|
+
* <property name="label" translatable="yes">_Open</property>
|
|
6707
|
+
* <property name="use-underline">True</property>
|
|
6708
|
+
* </object>
|
|
6709
|
+
* </property>
|
|
6710
6710
|
* </object>
|
|
6711
6711
|
* ```
|
|
6712
6712
|
*
|
|
@@ -6718,8 +6718,8 @@ export const AdwBreakpointBin = "AdwBreakpointBin";
|
|
|
6718
6718
|
* ```
|
|
6719
6719
|
* buttoncontent
|
|
6720
6720
|
* ╰── box
|
|
6721
|
-
*
|
|
6722
|
-
*
|
|
6721
|
+
* ├── image
|
|
6722
|
+
* ╰── label
|
|
6723
6723
|
* ```
|
|
6724
6724
|
*
|
|
6725
6725
|
* `AdwButtonContent`'s CSS node is called `buttoncontent`. It contains a `box`
|
|
@@ -6871,16 +6871,16 @@ export const AdwClampScrollable = "AdwClampScrollable";
|
|
|
6871
6871
|
* Example of an `AdwComboRow` UI definition:
|
|
6872
6872
|
* ```xml
|
|
6873
6873
|
* <object class="AdwComboRow">
|
|
6874
|
-
*
|
|
6875
|
-
*
|
|
6876
|
-
*
|
|
6877
|
-
*
|
|
6878
|
-
*
|
|
6879
|
-
*
|
|
6880
|
-
*
|
|
6881
|
-
*
|
|
6882
|
-
*
|
|
6883
|
-
*
|
|
6874
|
+
* <property name="title" translatable="yes">Combo Row</property>
|
|
6875
|
+
* <property name="model">
|
|
6876
|
+
* <object class="GtkStringList">
|
|
6877
|
+
* <items>
|
|
6878
|
+
* <item translatable="yes">Foo</item>
|
|
6879
|
+
* <item translatable="yes">Bar</item>
|
|
6880
|
+
* <item translatable="yes">Baz</item>
|
|
6881
|
+
* </items>
|
|
6882
|
+
* </object>
|
|
6883
|
+
* </property>
|
|
6884
6884
|
* </object>
|
|
6885
6885
|
* ```
|
|
6886
6886
|
*
|
|
@@ -7156,19 +7156,19 @@ export const AdwFlap = {
|
|
|
7156
7156
|
* ```
|
|
7157
7157
|
* headerbar
|
|
7158
7158
|
* ╰── windowhandle
|
|
7159
|
-
*
|
|
7160
|
-
*
|
|
7161
|
-
*
|
|
7162
|
-
*
|
|
7163
|
-
*
|
|
7164
|
-
*
|
|
7165
|
-
*
|
|
7166
|
-
*
|
|
7167
|
-
*
|
|
7168
|
-
*
|
|
7169
|
-
*
|
|
7170
|
-
*
|
|
7171
|
-
*
|
|
7159
|
+
* ╰── box
|
|
7160
|
+
* ├── widget
|
|
7161
|
+
* │ ╰── box.start
|
|
7162
|
+
* │ ├── windowcontrols.start
|
|
7163
|
+
* │ ├── widget
|
|
7164
|
+
* │ │ ╰── [button.back]
|
|
7165
|
+
* │ ╰── [other children]
|
|
7166
|
+
* ├── widget
|
|
7167
|
+
* │ ╰── [Title Widget]
|
|
7168
|
+
* ╰── widget
|
|
7169
|
+
* ╰── box.end
|
|
7170
|
+
* ├── [other children]
|
|
7171
|
+
* ╰── windowcontrols.end
|
|
7172
7172
|
* ```
|
|
7173
7173
|
*
|
|
7174
7174
|
* `AdwHeaderBar`'s CSS node is called `headerbar`. It contains a `windowhandle`
|
|
@@ -7295,13 +7295,13 @@ export const AdwLeaflet = {
|
|
|
7295
7295
|
* dialog = adw_message_dialog_new (parent, _("Replace File?"), NULL);
|
|
7296
7296
|
*
|
|
7297
7297
|
* adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
|
|
7298
|
-
*
|
|
7299
|
-
*
|
|
7298
|
+
* _("A file named “%s” already exists. Do you want to replace it?"),
|
|
7299
|
+
* filename);
|
|
7300
7300
|
*
|
|
7301
7301
|
* adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dialog),
|
|
7302
|
-
*
|
|
7303
|
-
*
|
|
7304
|
-
*
|
|
7302
|
+
* "cancel", _("_Cancel"),
|
|
7303
|
+
* "replace", _("_Replace"),
|
|
7304
|
+
* NULL);
|
|
7305
7305
|
*
|
|
7306
7306
|
* adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE);
|
|
7307
7307
|
*
|
|
@@ -7321,36 +7321,36 @@ export const AdwLeaflet = {
|
|
|
7321
7321
|
* ```c
|
|
7322
7322
|
* static void
|
|
7323
7323
|
* dialog_cb (AdwMessageDialog *dialog,
|
|
7324
|
-
*
|
|
7325
|
-
*
|
|
7324
|
+
* GAsyncResult *result,
|
|
7325
|
+
* MyWindow *self)
|
|
7326
7326
|
* {
|
|
7327
|
-
*
|
|
7327
|
+
* const char *response = adw_message_dialog_choose_finish (dialog, result);
|
|
7328
7328
|
*
|
|
7329
|
-
*
|
|
7329
|
+
* // ...
|
|
7330
7330
|
* }
|
|
7331
7331
|
*
|
|
7332
7332
|
* static void
|
|
7333
7333
|
* show_dialog (MyWindow *self)
|
|
7334
7334
|
* {
|
|
7335
|
-
*
|
|
7335
|
+
* GtkWidget *dialog;
|
|
7336
7336
|
*
|
|
7337
|
-
*
|
|
7337
|
+
* dialog = adw_message_dialog_new (GTK_WINDOW (self), _("Replace File?"), NULL);
|
|
7338
7338
|
*
|
|
7339
|
-
*
|
|
7340
|
-
*
|
|
7341
|
-
*
|
|
7339
|
+
* adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
|
|
7340
|
+
* _("A file named “%s” already exists. Do you want to replace it?"),
|
|
7341
|
+
* filename);
|
|
7342
7342
|
*
|
|
7343
|
-
*
|
|
7344
|
-
*
|
|
7345
|
-
*
|
|
7346
|
-
*
|
|
7343
|
+
* adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dialog),
|
|
7344
|
+
* "cancel", _("_Cancel"),
|
|
7345
|
+
* "replace", _("_Replace"),
|
|
7346
|
+
* NULL);
|
|
7347
7347
|
*
|
|
7348
|
-
*
|
|
7348
|
+
* adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE);
|
|
7349
7349
|
*
|
|
7350
|
-
*
|
|
7351
|
-
*
|
|
7350
|
+
* adw_message_dialog_set_default_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
|
|
7351
|
+
* adw_message_dialog_set_close_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
|
|
7352
7352
|
*
|
|
7353
|
-
*
|
|
7353
|
+
* adw_message_dialog_choose (ADW_MESSAGE_DIALOG (dialog), NULL, (GAsyncReadyCallback) dialog_cb, self);
|
|
7354
7354
|
* }
|
|
7355
7355
|
* ```
|
|
7356
7356
|
*
|
|
@@ -7374,16 +7374,16 @@ export const AdwLeaflet = {
|
|
|
7374
7374
|
*
|
|
7375
7375
|
* ```xml
|
|
7376
7376
|
* <object class="AdwMessageDialog" id="dialog">
|
|
7377
|
-
*
|
|
7378
|
-
*
|
|
7379
|
-
*
|
|
7380
|
-
*
|
|
7381
|
-
*
|
|
7382
|
-
*
|
|
7383
|
-
*
|
|
7384
|
-
*
|
|
7385
|
-
*
|
|
7386
|
-
*
|
|
7377
|
+
* <property name="heading" translatable="yes">Save Changes?</property>
|
|
7378
|
+
* <property name="body" translatable="yes">Open documents contain unsaved changes. Changes which are not saved will be permanently lost.</property>
|
|
7379
|
+
* <property name="default-response">save</property>
|
|
7380
|
+
* <property name="close-response">cancel</property>
|
|
7381
|
+
* <signal name="response" handler="response_cb"/>
|
|
7382
|
+
* <responses>
|
|
7383
|
+
* <response id="cancel" translatable="yes">_Cancel</response>
|
|
7384
|
+
* <response id="discard" translatable="yes" appearance="destructive">_Discard</response>
|
|
7385
|
+
* <response id="save" translatable="yes" appearance="suggested" enabled="false">_Save</response>
|
|
7386
|
+
* </responses>
|
|
7387
7387
|
* </object>
|
|
7388
7388
|
* ```
|
|
7389
7389
|
*
|
|
@@ -7425,51 +7425,51 @@ export const AdwMessageDialog = {
|
|
|
7425
7425
|
*
|
|
7426
7426
|
* ```xml
|
|
7427
7427
|
* <object class="AdwMultiLayoutView">
|
|
7428
|
-
*
|
|
7429
|
-
*
|
|
7430
|
-
*
|
|
7431
|
-
*
|
|
7432
|
-
*
|
|
7433
|
-
*
|
|
7434
|
-
*
|
|
7435
|
-
*
|
|
7436
|
-
*
|
|
7437
|
-
*
|
|
7438
|
-
*
|
|
7439
|
-
*
|
|
7440
|
-
*
|
|
7441
|
-
*
|
|
7442
|
-
*
|
|
7443
|
-
*
|
|
7444
|
-
*
|
|
7445
|
-
*
|
|
7446
|
-
*
|
|
7447
|
-
*
|
|
7448
|
-
*
|
|
7449
|
-
*
|
|
7450
|
-
*
|
|
7451
|
-
*
|
|
7452
|
-
*
|
|
7453
|
-
*
|
|
7454
|
-
*
|
|
7455
|
-
*
|
|
7456
|
-
*
|
|
7457
|
-
*
|
|
7458
|
-
*
|
|
7459
|
-
*
|
|
7460
|
-
*
|
|
7461
|
-
*
|
|
7462
|
-
*
|
|
7463
|
-
*
|
|
7464
|
-
*
|
|
7465
|
-
*
|
|
7466
|
-
*
|
|
7467
|
-
*
|
|
7468
|
-
*
|
|
7469
|
-
*
|
|
7470
|
-
*
|
|
7471
|
-
*
|
|
7472
|
-
*
|
|
7428
|
+
* <child>
|
|
7429
|
+
* <object class="AdwLayout">
|
|
7430
|
+
* <property name="name">sidebar</property>
|
|
7431
|
+
* <property name="content">
|
|
7432
|
+
* <object class="AdwOverlaySplitView">
|
|
7433
|
+
* <property name="sidebar">
|
|
7434
|
+
* <object class="AdwLayoutSlot">
|
|
7435
|
+
* <property name="id">secondary</property>
|
|
7436
|
+
* </object>
|
|
7437
|
+
* </property>
|
|
7438
|
+
* <property name="content">
|
|
7439
|
+
* <object class="AdwLayoutSlot">
|
|
7440
|
+
* <property name="id">primary</property>
|
|
7441
|
+
* </object>
|
|
7442
|
+
* </property>
|
|
7443
|
+
* </object>
|
|
7444
|
+
* </property>
|
|
7445
|
+
* </object>
|
|
7446
|
+
* </child>
|
|
7447
|
+
* <child>
|
|
7448
|
+
* <object class="AdwLayout">
|
|
7449
|
+
* <property name="name">bottom-sheet</property>
|
|
7450
|
+
* <property name="content">
|
|
7451
|
+
* <object class="AdwBottomSheet">
|
|
7452
|
+
* <property name="open">True</property>
|
|
7453
|
+
* <property name="content">
|
|
7454
|
+
* <object class="AdwLayoutSlot">
|
|
7455
|
+
* <property name="id">primary</property>
|
|
7456
|
+
* </object>
|
|
7457
|
+
* </property>
|
|
7458
|
+
* <property name="sheet">
|
|
7459
|
+
* <object class="AdwLayoutSlot">
|
|
7460
|
+
* <property name="id">secondary</property>
|
|
7461
|
+
* </object>
|
|
7462
|
+
* </property>
|
|
7463
|
+
* </object>
|
|
7464
|
+
* </property>
|
|
7465
|
+
* </object>
|
|
7466
|
+
* </child>
|
|
7467
|
+
* <child type="primary">
|
|
7468
|
+
* <!-- ... -->
|
|
7469
|
+
* </child>
|
|
7470
|
+
* <child type="secondary">
|
|
7471
|
+
* <!-- ... -->
|
|
7472
|
+
* </child>
|
|
7473
7473
|
* </object>
|
|
7474
7474
|
* ```
|
|
7475
7475
|
*
|
|
@@ -7528,36 +7528,36 @@ export const AdwNavigationPage = "AdwNavigationPage";
|
|
|
7528
7528
|
*
|
|
7529
7529
|
* ```xml
|
|
7530
7530
|
* <object class="AdwWindow">
|
|
7531
|
-
*
|
|
7532
|
-
*
|
|
7533
|
-
*
|
|
7534
|
-
*
|
|
7535
|
-
*
|
|
7536
|
-
*
|
|
7537
|
-
*
|
|
7538
|
-
*
|
|
7539
|
-
*
|
|
7540
|
-
*
|
|
7541
|
-
*
|
|
7542
|
-
*
|
|
7543
|
-
*
|
|
7544
|
-
*
|
|
7545
|
-
*
|
|
7546
|
-
*
|
|
7547
|
-
*
|
|
7548
|
-
*
|
|
7549
|
-
*
|
|
7550
|
-
*
|
|
7551
|
-
*
|
|
7552
|
-
*
|
|
7553
|
-
*
|
|
7554
|
-
*
|
|
7555
|
-
*
|
|
7556
|
-
*
|
|
7557
|
-
*
|
|
7558
|
-
*
|
|
7559
|
-
*
|
|
7560
|
-
*
|
|
7531
|
+
* <property name="width-request">280</property>
|
|
7532
|
+
* <property name="height-request">200</property>
|
|
7533
|
+
* <property name="default-width">800</property>
|
|
7534
|
+
* <property name="default-height">800</property>
|
|
7535
|
+
* <child>
|
|
7536
|
+
* <object class="AdwBreakpoint">
|
|
7537
|
+
* <condition>max-width: 400sp</condition>
|
|
7538
|
+
* <setter object="split_view" property="collapsed">True</setter>
|
|
7539
|
+
* </object>
|
|
7540
|
+
* </child>
|
|
7541
|
+
* <property name="content">
|
|
7542
|
+
* <object class="AdwNavigationSplitView" id="split_view">
|
|
7543
|
+
* <property name="sidebar">
|
|
7544
|
+
* <object class="AdwNavigationPage">
|
|
7545
|
+
* <property name="title" translatable="yes">Sidebar</property>
|
|
7546
|
+
* <property name="child">
|
|
7547
|
+
* <!-- ... -->
|
|
7548
|
+
* </property>
|
|
7549
|
+
* </object>
|
|
7550
|
+
* </property>
|
|
7551
|
+
* <property name="content">
|
|
7552
|
+
* <object class="AdwNavigationPage">
|
|
7553
|
+
* <property name="title" translatable="yes">Content</property>
|
|
7554
|
+
* <property name="child">
|
|
7555
|
+
* <!-- ... -->
|
|
7556
|
+
* </property>
|
|
7557
|
+
* </object>
|
|
7558
|
+
* </property>
|
|
7559
|
+
* </object>
|
|
7560
|
+
* </property>
|
|
7561
7561
|
* </object>
|
|
7562
7562
|
* ```
|
|
7563
7563
|
*
|
|
@@ -7617,8 +7617,8 @@ export const AdwNavigationPage = "AdwNavigationPage";
|
|
|
7617
7617
|
* ```
|
|
7618
7618
|
* navigation-split-view
|
|
7619
7619
|
* ╰── navigation-view
|
|
7620
|
-
*
|
|
7621
|
-
*
|
|
7620
|
+
* ├── [sidebar child]
|
|
7621
|
+
* ╰── [content child]
|
|
7622
7622
|
* ```
|
|
7623
7623
|
*
|
|
7624
7624
|
* When not collapsed, it contains two nodes with the name `widget`, one with
|
|
@@ -7630,7 +7630,7 @@ export const AdwNavigationPage = "AdwNavigationPage";
|
|
|
7630
7630
|
* ├── widget.sidebar-pane
|
|
7631
7631
|
* │ ╰── [sidebar child]
|
|
7632
7632
|
* ╰── widget.content-pane
|
|
7633
|
-
*
|
|
7633
|
+
* ╰── [content child]
|
|
7634
7634
|
* ```
|
|
7635
7635
|
*
|
|
7636
7636
|
* ## Accessibility
|
|
@@ -7738,46 +7738,46 @@ export const AdwNavigationSplitView = "AdwNavigationSplitView";
|
|
|
7738
7738
|
*
|
|
7739
7739
|
* ```xml
|
|
7740
7740
|
* <object class="AdwNavigationView">
|
|
7741
|
-
*
|
|
7742
|
-
*
|
|
7743
|
-
*
|
|
7744
|
-
*
|
|
7745
|
-
*
|
|
7746
|
-
*
|
|
7747
|
-
*
|
|
7748
|
-
*
|
|
7749
|
-
*
|
|
7750
|
-
*
|
|
7751
|
-
*
|
|
7752
|
-
*
|
|
7753
|
-
*
|
|
7754
|
-
*
|
|
7755
|
-
*
|
|
7756
|
-
*
|
|
7757
|
-
*
|
|
7758
|
-
*
|
|
7759
|
-
*
|
|
7760
|
-
*
|
|
7761
|
-
*
|
|
7762
|
-
*
|
|
7763
|
-
*
|
|
7764
|
-
*
|
|
7765
|
-
*
|
|
7766
|
-
*
|
|
7767
|
-
*
|
|
7768
|
-
*
|
|
7769
|
-
*
|
|
7770
|
-
*
|
|
7771
|
-
*
|
|
7772
|
-
*
|
|
7773
|
-
*
|
|
7774
|
-
*
|
|
7775
|
-
*
|
|
7776
|
-
*
|
|
7777
|
-
*
|
|
7778
|
-
*
|
|
7779
|
-
*
|
|
7780
|
-
*
|
|
7741
|
+
* <child>
|
|
7742
|
+
* <object class="AdwNavigationPage">
|
|
7743
|
+
* <property name="title" translatable="yes">Page 1</property>
|
|
7744
|
+
* <property name="child">
|
|
7745
|
+
* <object class="AdwToolbarView">
|
|
7746
|
+
* <child type="top">
|
|
7747
|
+
* <object class="AdwHeaderBar"/>
|
|
7748
|
+
* </child>
|
|
7749
|
+
* <property name="content">
|
|
7750
|
+
* <object class="GtkButton">
|
|
7751
|
+
* <property name="label" translatable="yes">Open Page 2</property>
|
|
7752
|
+
* <property name="halign">center</property>
|
|
7753
|
+
* <property name="valign">center</property>
|
|
7754
|
+
* <property name="action-name">navigation.push</property>
|
|
7755
|
+
* <property name="action-target">'page-2'</property>
|
|
7756
|
+
* <style>
|
|
7757
|
+
* <class name="pill"/>
|
|
7758
|
+
* </style>
|
|
7759
|
+
* </object>
|
|
7760
|
+
* </property>
|
|
7761
|
+
* </object>
|
|
7762
|
+
* </property>
|
|
7763
|
+
* </object>
|
|
7764
|
+
* </child>
|
|
7765
|
+
* <child>
|
|
7766
|
+
* <object class="AdwNavigationPage">
|
|
7767
|
+
* <property name="title" translatable="yes">Page 2</property>
|
|
7768
|
+
* <property name="tag">page-2</property>
|
|
7769
|
+
* <property name="child">
|
|
7770
|
+
* <object class="AdwToolbarView">
|
|
7771
|
+
* <child type="top">
|
|
7772
|
+
* <object class="AdwHeaderBar"/>
|
|
7773
|
+
* </child>
|
|
7774
|
+
* <property name="content">
|
|
7775
|
+
* <!-- ... -->
|
|
7776
|
+
* </property>
|
|
7777
|
+
* </object>
|
|
7778
|
+
* </property>
|
|
7779
|
+
* </object>
|
|
7780
|
+
* </child>
|
|
7781
7781
|
* </object>
|
|
7782
7782
|
* ```
|
|
7783
7783
|
*
|
|
@@ -7827,24 +7827,24 @@ export const AdwNavigationView = "AdwNavigationView";
|
|
|
7827
7827
|
*
|
|
7828
7828
|
* ```xml
|
|
7829
7829
|
* <object class="AdwWindow">
|
|
7830
|
-
*
|
|
7831
|
-
*
|
|
7832
|
-
*
|
|
7833
|
-
*
|
|
7834
|
-
*
|
|
7835
|
-
*
|
|
7836
|
-
*
|
|
7837
|
-
*
|
|
7838
|
-
*
|
|
7839
|
-
*
|
|
7840
|
-
*
|
|
7841
|
-
*
|
|
7842
|
-
*
|
|
7843
|
-
*
|
|
7844
|
-
*
|
|
7845
|
-
*
|
|
7846
|
-
*
|
|
7847
|
-
*
|
|
7830
|
+
* <property name="default-width">800</property>
|
|
7831
|
+
* <property name="default-height">800</property>
|
|
7832
|
+
* <child>
|
|
7833
|
+
* <object class="AdwBreakpoint">
|
|
7834
|
+
* <condition>max-width: 400sp</condition>
|
|
7835
|
+
* <setter object="split_view" property="collapsed">True</setter>
|
|
7836
|
+
* </object>
|
|
7837
|
+
* </child>
|
|
7838
|
+
* <property name="content">
|
|
7839
|
+
* <object class="AdwOverlaySplitView" id="split_view">
|
|
7840
|
+
* <property name="sidebar">
|
|
7841
|
+
* <!-- ... -->
|
|
7842
|
+
* </property>
|
|
7843
|
+
* <property name="content">
|
|
7844
|
+
* <!-- ... -->
|
|
7845
|
+
* </property>
|
|
7846
|
+
* </object>
|
|
7847
|
+
* </property>
|
|
7848
7848
|
* </object>
|
|
7849
7849
|
* ```
|
|
7850
7850
|
*
|
|
@@ -7901,7 +7901,7 @@ export const AdwNavigationView = "AdwNavigationView";
|
|
|
7901
7901
|
* ├── widget.sidebar-pane
|
|
7902
7902
|
* │ ╰── [sidebar child]
|
|
7903
7903
|
* ╰── widget.content-pane
|
|
7904
|
-
*
|
|
7904
|
+
* ╰── [content child]
|
|
7905
7905
|
* ```
|
|
7906
7906
|
*
|
|
7907
7907
|
* When collapsed, the one containing the sidebar child has the `.background`
|
|
@@ -7912,7 +7912,7 @@ export const AdwNavigationView = "AdwNavigationView";
|
|
|
7912
7912
|
* ├── widget.background
|
|
7913
7913
|
* │ ╰── [sidebar child]
|
|
7914
7914
|
* ╰── widget
|
|
7915
|
-
*
|
|
7915
|
+
* ╰── [content child]
|
|
7916
7916
|
* ```
|
|
7917
7917
|
*
|
|
7918
7918
|
* ## Accessibility
|
|
@@ -8119,55 +8119,55 @@ export const AdwShortcutLabel = "AdwShortcutLabel";
|
|
|
8119
8119
|
*
|
|
8120
8120
|
* ```xml
|
|
8121
8121
|
* <object class="AdwShortcutsDialog" id="shortcuts_dialog">
|
|
8122
|
-
*
|
|
8123
|
-
*
|
|
8124
|
-
*
|
|
8125
|
-
*
|
|
8126
|
-
*
|
|
8127
|
-
*
|
|
8128
|
-
*
|
|
8129
|
-
*
|
|
8130
|
-
*
|
|
8131
|
-
*
|
|
8132
|
-
*
|
|
8133
|
-
*
|
|
8134
|
-
*
|
|
8135
|
-
*
|
|
8136
|
-
*
|
|
8137
|
-
*
|
|
8138
|
-
*
|
|
8139
|
-
*
|
|
8140
|
-
*
|
|
8141
|
-
*
|
|
8142
|
-
*
|
|
8143
|
-
*
|
|
8144
|
-
*
|
|
8145
|
-
*
|
|
8146
|
-
*
|
|
8147
|
-
*
|
|
8148
|
-
*
|
|
8149
|
-
*
|
|
8150
|
-
*
|
|
8151
|
-
*
|
|
8152
|
-
*
|
|
8153
|
-
*
|
|
8154
|
-
*
|
|
8155
|
-
*
|
|
8156
|
-
*
|
|
8157
|
-
*
|
|
8158
|
-
*
|
|
8159
|
-
*
|
|
8160
|
-
*
|
|
8161
|
-
*
|
|
8162
|
-
*
|
|
8163
|
-
*
|
|
8164
|
-
*
|
|
8165
|
-
*
|
|
8166
|
-
*
|
|
8167
|
-
*
|
|
8168
|
-
*
|
|
8169
|
-
*
|
|
8170
|
-
*
|
|
8122
|
+
* <child>
|
|
8123
|
+
* <object class="AdwShortcutsSection">
|
|
8124
|
+
* <property name="title" translatable="yes">General</property>
|
|
8125
|
+
* <child>
|
|
8126
|
+
* <object class="AdwShortcutsItem">
|
|
8127
|
+
* <property name="title" translatable="yes">Open Menu</property>
|
|
8128
|
+
* <property name="accelerator">F10</property>
|
|
8129
|
+
* </object>
|
|
8130
|
+
* </child>
|
|
8131
|
+
* <child>
|
|
8132
|
+
* <object class="AdwShortcutsItem">
|
|
8133
|
+
* <property name="title" translatable="yes">Quit</property>
|
|
8134
|
+
* <property name="action-name">app.quit</property>
|
|
8135
|
+
* </object>
|
|
8136
|
+
* </child>
|
|
8137
|
+
* </object>
|
|
8138
|
+
* </child>
|
|
8139
|
+
* <child>
|
|
8140
|
+
* <object class="AdwShortcutsSection">
|
|
8141
|
+
* <child>
|
|
8142
|
+
* <object class="AdwShortcutsItem">
|
|
8143
|
+
* <property name="title" translatable="yes">Move Tab Left</property>
|
|
8144
|
+
* <property name="accelerator"><Shift><Ctrl>Page_Up</property>
|
|
8145
|
+
* <property name="direction">ltr</property>
|
|
8146
|
+
* </object>
|
|
8147
|
+
* </child>
|
|
8148
|
+
* <child>
|
|
8149
|
+
* <object class="AdwShortcutsItem">
|
|
8150
|
+
* <property name="title" translatable="yes">Move Tab Right</property>
|
|
8151
|
+
* <property name="accelerator"><Shift><Ctrl>Page_Down</property>
|
|
8152
|
+
* <property name="direction">ltr</property>
|
|
8153
|
+
* </object>
|
|
8154
|
+
* </child>
|
|
8155
|
+
* <child>
|
|
8156
|
+
* <object class="AdwShortcutsItem">
|
|
8157
|
+
* <property name="title" translatable="yes">Move Tab Right</property>
|
|
8158
|
+
* <property name="accelerator"><Shift><Ctrl>Page_Up</property>
|
|
8159
|
+
* <property name="direction">rtl</property>
|
|
8160
|
+
* </object>
|
|
8161
|
+
* </child>
|
|
8162
|
+
* <child>
|
|
8163
|
+
* <object class="AdwShortcutsItem">
|
|
8164
|
+
* <property name="title" translatable="yes">Move Tab Left</property>
|
|
8165
|
+
* <property name="accelerator"><Shift><Ctrl>Page_Down</property>
|
|
8166
|
+
* <property name="direction">rtl</property>
|
|
8167
|
+
* </object>
|
|
8168
|
+
* </child>
|
|
8169
|
+
* </object>
|
|
8170
|
+
* </child>
|
|
8171
8171
|
* </object>
|
|
8172
8172
|
* ```
|
|
8173
8173
|
*
|
|
@@ -8198,10 +8198,10 @@ export const AdwShortcutsDialog = "AdwShortcutsDialog";
|
|
|
8198
8198
|
*
|
|
8199
8199
|
* ```xml
|
|
8200
8200
|
* <object class="AdwSpinner">
|
|
8201
|
-
*
|
|
8202
|
-
*
|
|
8203
|
-
*
|
|
8204
|
-
*
|
|
8201
|
+
* <property name="halign">center</property>
|
|
8202
|
+
* <property name="valign">center</property>
|
|
8203
|
+
* <property name="width-request">48</property>
|
|
8204
|
+
* <property name="height-request">48</property>
|
|
8205
8205
|
* </object>
|
|
8206
8206
|
* ```
|
|
8207
8207
|
*
|
|
@@ -8227,16 +8227,16 @@ export const AdwSpinner = "AdwSpinner";
|
|
|
8227
8227
|
*
|
|
8228
8228
|
* ```xml
|
|
8229
8229
|
* <object class="AdwSpinRow">
|
|
8230
|
-
*
|
|
8231
|
-
*
|
|
8232
|
-
*
|
|
8233
|
-
*
|
|
8234
|
-
*
|
|
8235
|
-
*
|
|
8236
|
-
*
|
|
8237
|
-
*
|
|
8238
|
-
*
|
|
8239
|
-
*
|
|
8230
|
+
* <property name="title" translatable="yes">Spin Row</property>
|
|
8231
|
+
* <property name="adjustment">
|
|
8232
|
+
* <object class="GtkAdjustment">
|
|
8233
|
+
* <property name="lower">0</property>
|
|
8234
|
+
* <property name="upper">100</property>
|
|
8235
|
+
* <property name="value">50</property>
|
|
8236
|
+
* <property name="page-increment">10</property>
|
|
8237
|
+
* <property name="step-increment">1</property>
|
|
8238
|
+
* </object>
|
|
8239
|
+
* </property>
|
|
8240
8240
|
* </object>
|
|
8241
8241
|
* ```
|
|
8242
8242
|
*
|
|
@@ -8272,8 +8272,8 @@ export const AdwSpinRow = "AdwSpinRow";
|
|
|
8272
8272
|
* │ ╰── <content>
|
|
8273
8273
|
* ├── separator
|
|
8274
8274
|
* ╰── menubutton
|
|
8275
|
-
*
|
|
8276
|
-
*
|
|
8275
|
+
* ╰── button.toggle
|
|
8276
|
+
* ╰── arrow
|
|
8277
8277
|
* ```
|
|
8278
8278
|
*
|
|
8279
8279
|
* `AdwSplitButton`'s CSS node is called `splitbutton`. It contains the css
|
|
@@ -8366,8 +8366,8 @@ export const AdwStatusPage = "AdwStatusPage";
|
|
|
8366
8366
|
* Example of an `AdwSwitchRow` UI definition:
|
|
8367
8367
|
* ```xml
|
|
8368
8368
|
* <object class="AdwSwitchRow">
|
|
8369
|
-
*
|
|
8370
|
-
*
|
|
8369
|
+
* <property name="title" translatable="yes">Switch Row</property>
|
|
8370
|
+
* <signal name="notify::active" handler="switch_row_notify_active_cb"/>
|
|
8371
8371
|
* </object>
|
|
8372
8372
|
* ```
|
|
8373
8373
|
*
|
|
@@ -8426,8 +8426,8 @@ export const AdwTabBar = {
|
|
|
8426
8426
|
*
|
|
8427
8427
|
* ```xml
|
|
8428
8428
|
* <object class="AdwTabButton">
|
|
8429
|
-
*
|
|
8430
|
-
*
|
|
8429
|
+
* <property name="view">view</property>
|
|
8430
|
+
* <property name="action-name">overview.open</property>
|
|
8431
8431
|
* </object>
|
|
8432
8432
|
* ```
|
|
8433
8433
|
*
|
|
@@ -8527,7 +8527,7 @@ export const AdwTabOverview = "AdwTabOverview";
|
|
|
8527
8527
|
*
|
|
8528
8528
|
* ```c
|
|
8529
8529
|
* adw_tab_view_remove_shortcuts (view, ADW_TAB_VIEW_SHORTCUT_CONTROL_HOME |
|
|
8530
|
-
*
|
|
8530
|
+
* ADW_TAB_VIEW_SHORTCUT_CONTROL_END);
|
|
8531
8531
|
* ```
|
|
8532
8532
|
*
|
|
8533
8533
|
* ## CSS nodes
|
|
@@ -8562,9 +8562,9 @@ export const AdwTabView = "AdwTabView";
|
|
|
8562
8562
|
* ├── toast
|
|
8563
8563
|
* ┊ ├── widget
|
|
8564
8564
|
* ┊ │ ├── [label.heading]
|
|
8565
|
-
*
|
|
8566
|
-
*
|
|
8567
|
-
*
|
|
8565
|
+
* │ ╰── [custom title]
|
|
8566
|
+
* ├── [button]
|
|
8567
|
+
* ╰── button.circular.flat
|
|
8568
8568
|
* ```
|
|
8569
8569
|
*
|
|
8570
8570
|
* `AdwToastOverlay`'s CSS node is called `toastoverlay`. It contains the child,
|
|
@@ -8613,23 +8613,23 @@ export const AdwToastOverlay = "AdwToastOverlay";
|
|
|
8613
8613
|
* Example of an `AdwToggleGroup` UI definition:
|
|
8614
8614
|
*
|
|
8615
8615
|
* ```xml
|
|
8616
|
-
*
|
|
8617
|
-
*
|
|
8618
|
-
*
|
|
8619
|
-
*
|
|
8620
|
-
*
|
|
8621
|
-
*
|
|
8622
|
-
*
|
|
8623
|
-
*
|
|
8624
|
-
*
|
|
8625
|
-
*
|
|
8626
|
-
*
|
|
8627
|
-
*
|
|
8628
|
-
*
|
|
8629
|
-
*
|
|
8630
|
-
*
|
|
8631
|
-
*
|
|
8632
|
-
*
|
|
8616
|
+
* <object class="AdwToggleGroup">
|
|
8617
|
+
* <property name="active-name">picture</property>
|
|
8618
|
+
* <child>
|
|
8619
|
+
* <object class="AdwToggle">
|
|
8620
|
+
* <property name="icon-name">camera-photo-symbolic</property>
|
|
8621
|
+
* <property name="tooltip" translatable="yes">Picture Mode</property>
|
|
8622
|
+
* <property name="name">picture</property>
|
|
8623
|
+
* </object>
|
|
8624
|
+
* </child>
|
|
8625
|
+
* <child>
|
|
8626
|
+
* <object class="AdwToggle">
|
|
8627
|
+
* <property name="icon-name">camera-video-symbolic</property>
|
|
8628
|
+
* <property name="tooltip" translatable="yes">Recording Mode</property>
|
|
8629
|
+
* <property name="name">recording</property>
|
|
8630
|
+
* </object>
|
|
8631
|
+
* </child>
|
|
8632
|
+
* </object>
|
|
8633
8633
|
* ```
|
|
8634
8634
|
*
|
|
8635
8635
|
* See also: {@link AdwInlineViewSwitcher}.
|
|
@@ -8680,14 +8680,14 @@ export const AdwToggleGroup = "AdwToggleGroup";
|
|
|
8680
8680
|
* Example of an `AdwToolbarView` UI definition:
|
|
8681
8681
|
* ```xml
|
|
8682
8682
|
* <object class="AdwToolbarView">
|
|
8683
|
-
*
|
|
8684
|
-
*
|
|
8685
|
-
*
|
|
8686
|
-
*
|
|
8687
|
-
*
|
|
8688
|
-
*
|
|
8689
|
-
*
|
|
8690
|
-
*
|
|
8683
|
+
* <child type="top">
|
|
8684
|
+
* <object class="AdwHeaderBar"/>
|
|
8685
|
+
* </child>
|
|
8686
|
+
* <property name="content">
|
|
8687
|
+
* <object class="AdwPreferencesPage">
|
|
8688
|
+
* <!-- ... -->
|
|
8689
|
+
* </object>
|
|
8690
|
+
* </property>
|
|
8691
8691
|
* </object>
|
|
8692
8692
|
* ```
|
|
8693
8693
|
*
|
|
@@ -8800,19 +8800,19 @@ function AdwViewStackVisibleChild(props) {
|
|
|
8800
8800
|
* property on it:
|
|
8801
8801
|
*
|
|
8802
8802
|
* ```xml
|
|
8803
|
-
*
|
|
8804
|
-
*
|
|
8805
|
-
*
|
|
8806
|
-
*
|
|
8807
|
-
*
|
|
8808
|
-
*
|
|
8809
|
-
*
|
|
8810
|
-
*
|
|
8811
|
-
*
|
|
8812
|
-
*
|
|
8813
|
-
*
|
|
8814
|
-
*
|
|
8815
|
-
*
|
|
8803
|
+
* <object class="AdwViewStack" id="stack">
|
|
8804
|
+
* <child>
|
|
8805
|
+
* <object class="AdwViewStackPage">
|
|
8806
|
+
* <property name="name">overview</property>
|
|
8807
|
+
* <property name="title">Overview</property>
|
|
8808
|
+
* <property name="child">
|
|
8809
|
+
* <object class="AdwStatusPage">
|
|
8810
|
+
* <property name="title">Welcome!</property>
|
|
8811
|
+
* </object>
|
|
8812
|
+
* </property>
|
|
8813
|
+
* </object>
|
|
8814
|
+
* </child>
|
|
8815
|
+
* </object>
|
|
8816
8816
|
* ```
|
|
8817
8817
|
*
|
|
8818
8818
|
* ## CSS nodes
|
|
@@ -8849,35 +8849,35 @@ export const AdwViewStack = {
|
|
|
8849
8849
|
*
|
|
8850
8850
|
* ```xml
|
|
8851
8851
|
* <object class="AdwWindow">
|
|
8852
|
-
*
|
|
8853
|
-
*
|
|
8854
|
-
*
|
|
8855
|
-
*
|
|
8856
|
-
*
|
|
8857
|
-
*
|
|
8858
|
-
*
|
|
8859
|
-
*
|
|
8860
|
-
*
|
|
8861
|
-
*
|
|
8862
|
-
*
|
|
8863
|
-
*
|
|
8864
|
-
*
|
|
8865
|
-
*
|
|
8866
|
-
*
|
|
8867
|
-
*
|
|
8868
|
-
*
|
|
8869
|
-
*
|
|
8870
|
-
*
|
|
8871
|
-
*
|
|
8872
|
-
*
|
|
8873
|
-
*
|
|
8874
|
-
*
|
|
8875
|
-
*
|
|
8876
|
-
*
|
|
8877
|
-
*
|
|
8878
|
-
*
|
|
8879
|
-
*
|
|
8880
|
-
*
|
|
8852
|
+
* <child>
|
|
8853
|
+
* <object class="AdwBreakpoint">
|
|
8854
|
+
* <condition>max-width: 550sp</condition>
|
|
8855
|
+
* <setter object="switcher_bar" property="reveal">True</setter>
|
|
8856
|
+
* <setter object="header_bar" property="title-widget"/>
|
|
8857
|
+
* </object>
|
|
8858
|
+
* </child>
|
|
8859
|
+
* <property name="content">
|
|
8860
|
+
* <object class="AdwToolbarView">
|
|
8861
|
+
* <child type="top">
|
|
8862
|
+
* <object class="AdwHeaderBar" id="header_bar">
|
|
8863
|
+
* <property name="title-widget">
|
|
8864
|
+
* <object class="AdwViewSwitcher">
|
|
8865
|
+
* <property name="stack">stack</property>
|
|
8866
|
+
* <property name="policy">wide</property>
|
|
8867
|
+
* </object>
|
|
8868
|
+
* </property>
|
|
8869
|
+
* </object>
|
|
8870
|
+
* </child>
|
|
8871
|
+
* <property name="content">
|
|
8872
|
+
* <object class="AdwViewStack" id="stack"/>
|
|
8873
|
+
* </property>
|
|
8874
|
+
* <child type="bottom">
|
|
8875
|
+
* <object class="AdwViewSwitcherBar" id="switcher_bar">
|
|
8876
|
+
* <property name="stack">stack</property>
|
|
8877
|
+
* </object>
|
|
8878
|
+
* </child>
|
|
8879
|
+
* </object>
|
|
8880
|
+
* </property>
|
|
8881
8881
|
* </object>
|
|
8882
8882
|
* ```
|
|
8883
8883
|
*
|
|
@@ -8914,35 +8914,35 @@ export const AdwViewSwitcher = "AdwViewSwitcher";
|
|
|
8914
8914
|
*
|
|
8915
8915
|
* ```xml
|
|
8916
8916
|
* <object class="AdwWindow">
|
|
8917
|
-
*
|
|
8918
|
-
*
|
|
8919
|
-
*
|
|
8920
|
-
*
|
|
8921
|
-
*
|
|
8922
|
-
*
|
|
8923
|
-
*
|
|
8924
|
-
*
|
|
8925
|
-
*
|
|
8926
|
-
*
|
|
8927
|
-
*
|
|
8928
|
-
*
|
|
8929
|
-
*
|
|
8930
|
-
*
|
|
8931
|
-
*
|
|
8932
|
-
*
|
|
8933
|
-
*
|
|
8934
|
-
*
|
|
8935
|
-
*
|
|
8936
|
-
*
|
|
8937
|
-
*
|
|
8938
|
-
*
|
|
8939
|
-
*
|
|
8940
|
-
*
|
|
8941
|
-
*
|
|
8942
|
-
*
|
|
8943
|
-
*
|
|
8944
|
-
*
|
|
8945
|
-
*
|
|
8917
|
+
* <child>
|
|
8918
|
+
* <object class="AdwBreakpoint">
|
|
8919
|
+
* <condition>max-width: 550sp</condition>
|
|
8920
|
+
* <setter object="switcher_bar" property="reveal">True</setter>
|
|
8921
|
+
* <setter object="header_bar" property="title-widget"/>
|
|
8922
|
+
* </object>
|
|
8923
|
+
* </child>
|
|
8924
|
+
* <property name="content">
|
|
8925
|
+
* <object class="AdwToolbarView">
|
|
8926
|
+
* <child type="top">
|
|
8927
|
+
* <object class="AdwHeaderBar" id="header_bar">
|
|
8928
|
+
* <property name="title-widget">
|
|
8929
|
+
* <object class="AdwViewSwitcher">
|
|
8930
|
+
* <property name="stack">stack</property>
|
|
8931
|
+
* <property name="policy">wide</property>
|
|
8932
|
+
* </object>
|
|
8933
|
+
* </property>
|
|
8934
|
+
* </object>
|
|
8935
|
+
* </child>
|
|
8936
|
+
* <property name="content">
|
|
8937
|
+
* <object class="AdwViewStack" id="stack"/>
|
|
8938
|
+
* </property>
|
|
8939
|
+
* <child type="bottom">
|
|
8940
|
+
* <object class="AdwViewSwitcherBar" id="switcher_bar">
|
|
8941
|
+
* <property name="stack">stack</property>
|
|
8942
|
+
* </object>
|
|
8943
|
+
* </child>
|
|
8944
|
+
* </object>
|
|
8945
|
+
* </property>
|
|
8946
8946
|
* </object>
|
|
8947
8947
|
* ```
|
|
8948
8948
|
*
|
|
@@ -8982,31 +8982,31 @@ export const AdwViewSwitcherBar = "AdwViewSwitcherBar";
|
|
|
8982
8982
|
*
|
|
8983
8983
|
* ```xml
|
|
8984
8984
|
* <object class="AdwWindow">
|
|
8985
|
-
*
|
|
8986
|
-
*
|
|
8987
|
-
*
|
|
8988
|
-
*
|
|
8989
|
-
*
|
|
8990
|
-
*
|
|
8991
|
-
*
|
|
8992
|
-
*
|
|
8993
|
-
*
|
|
8994
|
-
*
|
|
8995
|
-
*
|
|
8996
|
-
*
|
|
8997
|
-
*
|
|
8998
|
-
*
|
|
8999
|
-
*
|
|
9000
|
-
*
|
|
9001
|
-
*
|
|
9002
|
-
*
|
|
9003
|
-
*
|
|
9004
|
-
*
|
|
9005
|
-
*
|
|
9006
|
-
*
|
|
9007
|
-
*
|
|
9008
|
-
*
|
|
9009
|
-
*
|
|
8985
|
+
* <property name="content">
|
|
8986
|
+
* <object class="AdwToolbarView">
|
|
8987
|
+
* <child type="top">
|
|
8988
|
+
* <object class="AdwHeaderBar">
|
|
8989
|
+
* <property name="centering-policy">strict</property>
|
|
8990
|
+
* <property name="title-widget">
|
|
8991
|
+
* <object class="AdwViewSwitcherTitle" id="title">
|
|
8992
|
+
* <property name="stack">stack</property>
|
|
8993
|
+
* </object>
|
|
8994
|
+
* </property>
|
|
8995
|
+
* </object>
|
|
8996
|
+
* </child>
|
|
8997
|
+
* <property name="content">
|
|
8998
|
+
* <object class="AdwViewStack" id="stack"/>
|
|
8999
|
+
* </property>
|
|
9000
|
+
* <child type="bottom">
|
|
9001
|
+
* <object class="AdwViewSwitcherBar">
|
|
9002
|
+
* <property name="stack">stack</property>
|
|
9003
|
+
* <binding name="reveal">
|
|
9004
|
+
* <lookup name="title-visible">title</lookup>
|
|
9005
|
+
* </binding>
|
|
9006
|
+
* </object>
|
|
9007
|
+
* </child>
|
|
9008
|
+
* </object>
|
|
9009
|
+
* </property>
|
|
9010
9010
|
* </object>
|
|
9011
9011
|
* ```
|
|
9012
9012
|
*
|
|
@@ -9273,13 +9273,13 @@ export const GtkSourceStyleSchemePreview = "GtkSourceStyleSchemePreview";
|
|
|
9273
9273
|
* An example of a UI definition fragment with GtkSourceView:
|
|
9274
9274
|
* ```xml
|
|
9275
9275
|
* <object class="GtkSourceView" id="source_view">
|
|
9276
|
-
*
|
|
9277
|
-
*
|
|
9278
|
-
*
|
|
9279
|
-
*
|
|
9280
|
-
*
|
|
9281
|
-
*
|
|
9282
|
-
*
|
|
9276
|
+
* <property name="tab-width">4</property>
|
|
9277
|
+
* <property name="auto-indent">True</property>
|
|
9278
|
+
* <child internal-child="completion">
|
|
9279
|
+
* <object class="GtkSourceCompletion">
|
|
9280
|
+
* <property name="select-on-show">False</property>
|
|
9281
|
+
* </object>
|
|
9282
|
+
* </child>
|
|
9283
9283
|
* </object>
|
|
9284
9284
|
* ```
|
|
9285
9285
|
*
|
|
@@ -9292,10 +9292,10 @@ export const GtkSourceStyleSchemePreview = "GtkSourceStyleSchemePreview";
|
|
|
9292
9292
|
* ```c
|
|
9293
9293
|
* GtkCssProvider *provider = gtk_css_provider_new ();
|
|
9294
9294
|
* gtk_css_provider_load_from_string (provider,
|
|
9295
|
-
*
|
|
9295
|
+
* "textview { font-family: Monospace; font-size: 8pt; }");
|
|
9296
9296
|
* gtk_style_context_add_provider (gtk_widget_get_style_context (view),
|
|
9297
|
-
*
|
|
9298
|
-
*
|
|
9297
|
+
* GTK_STYLE_PROVIDER (provider),
|
|
9298
|
+
* GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
9299
9299
|
* g_object_unref (provider);
|
|
9300
9300
|
* ```
|
|
9301
9301
|
* ```python
|