@gtkx/react 0.18.9 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/generated/internal.d.ts +6 -0
  2. package/dist/generated/internal.d.ts.map +1 -1
  3. package/dist/generated/internal.js +331 -44
  4. package/dist/generated/internal.js.map +1 -1
  5. package/dist/generated/jsx.d.ts +178 -2
  6. package/dist/generated/jsx.d.ts.map +1 -1
  7. package/dist/generated/jsx.js.map +1 -1
  8. package/dist/host-config.d.ts.map +1 -1
  9. package/dist/host-config.js +46 -10
  10. package/dist/host-config.js.map +1 -1
  11. package/dist/jsx.d.ts +133 -13
  12. package/dist/jsx.d.ts.map +1 -1
  13. package/dist/jsx.js +41 -2
  14. package/dist/jsx.js.map +1 -1
  15. package/dist/metadata.d.ts +1 -0
  16. package/dist/metadata.d.ts.map +1 -1
  17. package/dist/metadata.js +3 -1
  18. package/dist/metadata.js.map +1 -1
  19. package/dist/node.d.ts +2 -0
  20. package/dist/node.d.ts.map +1 -1
  21. package/dist/node.js +22 -6
  22. package/dist/node.js.map +1 -1
  23. package/dist/nodes/column-view-column.d.ts +4 -1
  24. package/dist/nodes/column-view-column.d.ts.map +1 -1
  25. package/dist/nodes/column-view-column.js +29 -8
  26. package/dist/nodes/column-view-column.js.map +1 -1
  27. package/dist/nodes/column-view.d.ts +4 -3
  28. package/dist/nodes/column-view.d.ts.map +1 -1
  29. package/dist/nodes/column-view.js +44 -14
  30. package/dist/nodes/column-view.js.map +1 -1
  31. package/dist/nodes/drop-down.d.ts +12 -2
  32. package/dist/nodes/drop-down.d.ts.map +1 -1
  33. package/dist/nodes/drop-down.js +151 -5
  34. package/dist/nodes/drop-down.js.map +1 -1
  35. package/dist/nodes/event-controller.d.ts +1 -0
  36. package/dist/nodes/event-controller.d.ts.map +1 -1
  37. package/dist/nodes/event-controller.js +11 -3
  38. package/dist/nodes/event-controller.js.map +1 -1
  39. package/dist/nodes/fixed-child.d.ts +1 -2
  40. package/dist/nodes/fixed-child.d.ts.map +1 -1
  41. package/dist/nodes/fixed-child.js +21 -21
  42. package/dist/nodes/fixed-child.js.map +1 -1
  43. package/dist/nodes/font-dialog-button.d.ts +1 -1
  44. package/dist/nodes/font-dialog-button.d.ts.map +1 -1
  45. package/dist/nodes/font-dialog-button.js +8 -0
  46. package/dist/nodes/font-dialog-button.js.map +1 -1
  47. package/dist/nodes/grid-view.d.ts +6 -5
  48. package/dist/nodes/grid-view.d.ts.map +1 -1
  49. package/dist/nodes/grid-view.js +23 -18
  50. package/dist/nodes/grid-view.js.map +1 -1
  51. package/dist/nodes/internal/accessible.d.ts +5 -0
  52. package/dist/nodes/internal/accessible.d.ts.map +1 -0
  53. package/dist/nodes/internal/accessible.js +119 -0
  54. package/dist/nodes/internal/accessible.js.map +1 -0
  55. package/dist/nodes/internal/base-item-renderer.d.ts.map +1 -1
  56. package/dist/nodes/internal/base-item-renderer.js +0 -1
  57. package/dist/nodes/internal/base-item-renderer.js.map +1 -1
  58. package/dist/nodes/internal/construct.d.ts +10 -0
  59. package/dist/nodes/internal/construct.d.ts.map +1 -0
  60. package/dist/nodes/internal/construct.js +68 -0
  61. package/dist/nodes/internal/construct.js.map +1 -0
  62. package/dist/nodes/internal/header-item-renderer.d.ts +23 -0
  63. package/dist/nodes/internal/header-item-renderer.d.ts.map +1 -0
  64. package/dist/nodes/internal/header-item-renderer.js +87 -0
  65. package/dist/nodes/internal/header-item-renderer.js.map +1 -0
  66. package/dist/nodes/internal/header-renderer-manager.d.ts +13 -0
  67. package/dist/nodes/internal/header-renderer-manager.d.ts.map +1 -0
  68. package/dist/nodes/internal/header-renderer-manager.js +20 -0
  69. package/dist/nodes/internal/header-renderer-manager.js.map +1 -0
  70. package/dist/nodes/internal/list-store.d.ts +10 -11
  71. package/dist/nodes/internal/list-store.d.ts.map +1 -1
  72. package/dist/nodes/internal/list-store.js +28 -29
  73. package/dist/nodes/internal/list-store.js.map +1 -1
  74. package/dist/nodes/internal/sectioned-list-store.d.ts +50 -0
  75. package/dist/nodes/internal/sectioned-list-store.d.ts.map +1 -0
  76. package/dist/nodes/internal/sectioned-list-store.js +250 -0
  77. package/dist/nodes/internal/sectioned-list-store.js.map +1 -0
  78. package/dist/nodes/internal/selection-helpers.d.ts +12 -0
  79. package/dist/nodes/internal/selection-helpers.d.ts.map +1 -0
  80. package/dist/nodes/internal/selection-helpers.js +25 -0
  81. package/dist/nodes/internal/selection-helpers.js.map +1 -0
  82. package/dist/nodes/internal/selection-model-controller.d.ts.map +1 -1
  83. package/dist/nodes/internal/selection-model-controller.js +3 -0
  84. package/dist/nodes/internal/selection-model-controller.js.map +1 -1
  85. package/dist/nodes/internal/simple-list-store.d.ts +7 -12
  86. package/dist/nodes/internal/simple-list-store.d.ts.map +1 -1
  87. package/dist/nodes/internal/simple-list-store.js +58 -35
  88. package/dist/nodes/internal/simple-list-store.js.map +1 -1
  89. package/dist/nodes/internal/text-buffer-controller.d.ts +4 -0
  90. package/dist/nodes/internal/text-buffer-controller.d.ts.map +1 -1
  91. package/dist/nodes/internal/text-buffer-controller.js +49 -9
  92. package/dist/nodes/internal/text-buffer-controller.js.map +1 -1
  93. package/dist/nodes/internal/tree-store.d.ts +3 -0
  94. package/dist/nodes/internal/tree-store.d.ts.map +1 -1
  95. package/dist/nodes/internal/tree-store.js +55 -10
  96. package/dist/nodes/internal/tree-store.js.map +1 -1
  97. package/dist/nodes/list-section.d.ts +27 -0
  98. package/dist/nodes/list-section.d.ts.map +1 -0
  99. package/dist/nodes/list-section.js +43 -0
  100. package/dist/nodes/list-section.js.map +1 -0
  101. package/dist/nodes/list-view.d.ts +6 -3
  102. package/dist/nodes/list-view.d.ts.map +1 -1
  103. package/dist/nodes/list-view.js +54 -14
  104. package/dist/nodes/list-view.js.map +1 -1
  105. package/dist/nodes/models/list.d.ts +13 -5
  106. package/dist/nodes/models/list.d.ts.map +1 -1
  107. package/dist/nodes/models/list.js +135 -21
  108. package/dist/nodes/models/list.js.map +1 -1
  109. package/dist/nodes/shortcut.d.ts +3 -2
  110. package/dist/nodes/shortcut.d.ts.map +1 -1
  111. package/dist/nodes/shortcut.js +19 -4
  112. package/dist/nodes/shortcut.js.map +1 -1
  113. package/dist/nodes/text-anchor.d.ts.map +1 -1
  114. package/dist/nodes/text-anchor.js +7 -1
  115. package/dist/nodes/text-anchor.js.map +1 -1
  116. package/dist/nodes/text-tag.d.ts.map +1 -1
  117. package/dist/nodes/text-tag.js +5 -1
  118. package/dist/nodes/text-tag.js.map +1 -1
  119. package/dist/nodes/text-view.d.ts +1 -0
  120. package/dist/nodes/text-view.d.ts.map +1 -1
  121. package/dist/nodes/text-view.js +4 -0
  122. package/dist/nodes/text-view.js.map +1 -1
  123. package/dist/nodes/widget.d.ts +0 -2
  124. package/dist/nodes/widget.d.ts.map +1 -1
  125. package/dist/nodes/widget.js +44 -61
  126. package/dist/nodes/widget.js.map +1 -1
  127. package/dist/registry.d.ts.map +1 -1
  128. package/dist/registry.js +2 -2
  129. package/dist/registry.js.map +1 -1
  130. package/package.json +3 -3
  131. package/src/generated/internal.ts +333 -44
  132. package/src/generated/jsx.ts +178 -2
  133. package/src/host-config.ts +41 -10
  134. package/src/jsx.ts +166 -15
  135. package/src/metadata.ts +5 -1
  136. package/src/node.ts +20 -6
  137. package/src/nodes/column-view-column.ts +32 -8
  138. package/src/nodes/column-view.ts +59 -14
  139. package/src/nodes/drop-down.ts +182 -6
  140. package/src/nodes/event-controller.ts +11 -3
  141. package/src/nodes/fixed-child.ts +24 -23
  142. package/src/nodes/font-dialog-button.ts +10 -0
  143. package/src/nodes/grid-view.ts +29 -19
  144. package/src/nodes/internal/accessible.ts +156 -0
  145. package/src/nodes/internal/base-item-renderer.ts +0 -1
  146. package/src/nodes/internal/construct.ts +90 -0
  147. package/src/nodes/internal/header-item-renderer.ts +105 -0
  148. package/src/nodes/internal/header-renderer-manager.ts +33 -0
  149. package/src/nodes/internal/list-store.ts +32 -30
  150. package/src/nodes/internal/sectioned-list-store.ts +287 -0
  151. package/src/nodes/internal/selection-helpers.ts +35 -0
  152. package/src/nodes/internal/selection-model-controller.ts +4 -0
  153. package/src/nodes/internal/simple-list-store.ts +60 -43
  154. package/src/nodes/internal/text-buffer-controller.ts +51 -8
  155. package/src/nodes/internal/tree-store.ts +61 -9
  156. package/src/nodes/list-section.ts +64 -0
  157. package/src/nodes/list-view.ts +65 -14
  158. package/src/nodes/models/list.ts +147 -37
  159. package/src/nodes/shortcut.ts +22 -5
  160. package/src/nodes/text-anchor.ts +6 -1
  161. package/src/nodes/text-tag.ts +7 -1
  162. package/src/nodes/text-view.ts +5 -0
  163. package/src/nodes/widget.ts +45 -62
  164. package/src/registry.ts +4 -2
  165. package/dist/nodes/models/grid.d.ts +0 -28
  166. package/dist/nodes/models/grid.d.ts.map +0 -1
  167. package/dist/nodes/models/grid.js +0 -69
  168. package/dist/nodes/models/grid.js.map +0 -1
  169. package/dist/nodes/shortcut-controller.d.ts +0 -10
  170. package/dist/nodes/shortcut-controller.d.ts.map +0 -1
  171. package/dist/nodes/shortcut-controller.js +0 -23
  172. package/dist/nodes/shortcut-controller.js.map +0 -1
  173. package/src/nodes/models/grid.ts +0 -105
  174. package/src/nodes/shortcut-controller.ts +0 -27
@@ -26,6 +26,13 @@ export interface WidgetProps {
26
26
  canTarget?: boolean;
27
27
  /** A list of css classes applied to this widget. */
28
28
  cssClasses?: string[];
29
+ /**
30
+ * The name of this widget in the CSS tree.
31
+ *
32
+ * This property is meant to be set by widget implementations,
33
+ * typically in their instance init function.
34
+ */
35
+ cssName?: string;
29
36
  /** The cursor used by `widget`. */
30
37
  cursor?: Gdk.Cursor | null;
31
38
  /**
@@ -303,8 +310,6 @@ export interface WidgetProps {
303
310
  * detail strings for the notify signal.
304
311
  */
305
312
  onNotify?: ((pspec: GObject.ParamSpec, self: Gtk.Widget) => void) | null;
306
- /** When set to true, the widget will grab focus. Useful for focusing a widget when a condition becomes true. */
307
- grabFocus?: boolean;
308
313
  /** Children elements (child widgets or event controllers). */
309
314
  children?: ReactNode;
310
315
  }
@@ -1320,6 +1325,12 @@ export interface GtkAppChooserButtonProps extends WidgetProps {
1320
1325
  * a `GtkAppChooserDialog`.
1321
1326
  */
1322
1327
  showDialogItem?: boolean;
1328
+ /**
1329
+ * The content type of the `GtkAppChooser` object.
1330
+ *
1331
+ * See `GContentType` for more information about content types.
1332
+ */
1333
+ contentType?: string;
1323
1334
  /**
1324
1335
  * Emitted to when the button is activated.
1325
1336
  *
@@ -1341,12 +1352,25 @@ export interface GtkAppChooserButtonProps extends WidgetProps {
1341
1352
 
1342
1353
  /** Props for the {@link GtkAppChooserDialog} widget. */
1343
1354
  export interface GtkAppChooserDialogProps extends GtkDialogProps {
1355
+ /**
1356
+ * The GFile used by the `GtkAppChooserDialog`.
1357
+ *
1358
+ * The dialog's `GtkAppChooserWidget` content type will
1359
+ * be guessed from the file, if present.
1360
+ */
1361
+ gfile?: Gio.File;
1344
1362
  /**
1345
1363
  * The text to show at the top of the dialog.
1346
1364
  *
1347
1365
  * The string may contain Pango markup.
1348
1366
  */
1349
1367
  heading?: string;
1368
+ /**
1369
+ * The content type of the `GtkAppChooser` object.
1370
+ *
1371
+ * See `GContentType` for more information about content types.
1372
+ */
1373
+ contentType?: string;
1350
1374
  ref?: Ref<Gtk.AppChooserDialog>;
1351
1375
  }
1352
1376
 
@@ -1392,6 +1416,12 @@ export interface GtkAppChooserWidgetProps extends WidgetProps {
1392
1416
  * among the other applications.
1393
1417
  */
1394
1418
  showRecommended?: boolean;
1419
+ /**
1420
+ * The content type of the `GtkAppChooser` object.
1421
+ *
1422
+ * See `GContentType` for more information about content types.
1423
+ */
1424
+ contentType?: string;
1395
1425
  /**
1396
1426
  * Emitted when an application item is activated from the widget's list.
1397
1427
  *
@@ -1483,6 +1513,14 @@ export interface GtkAspectFrameProps extends WidgetProps {
1483
1513
 
1484
1514
  /** Props for the {@link GtkAssistant} widget. */
1485
1515
  export interface GtkAssistantProps extends GtkWindowProps {
1516
+ /**
1517
+ * %TRUE if the assistant uses a `GtkHeaderBar` for action buttons
1518
+ * instead of the action-area.
1519
+ *
1520
+ * For technical reasons, this property is declared as an integer
1521
+ * property, but you should only set it to %TRUE or %FALSE.
1522
+ */
1523
+ useHeaderBar?: number;
1486
1524
  /**
1487
1525
  * Emitted when the apply button is clicked.
1488
1526
  *
@@ -1928,6 +1966,30 @@ export interface AdwCarouselIndicatorLinesProps extends WidgetProps {
1928
1966
 
1929
1967
  /** Props for the {@link GtkCellView} widget. */
1930
1968
  export interface GtkCellViewProps extends WidgetProps {
1969
+ /**
1970
+ * The `GtkCellArea` rendering cells
1971
+ *
1972
+ * If no area is specified when creating the cell view with gtk_cell_view_new_with_context()
1973
+ * a horizontally oriented `GtkCellArea`Box will be used.
1974
+ *
1975
+ * since 3.0
1976
+ */
1977
+ cellArea?: Gtk.CellArea;
1978
+ /**
1979
+ * The `GtkCellAreaContext` used to compute the geometry of the cell view.
1980
+ *
1981
+ * A group of cell views can be assigned the same context in order to
1982
+ * ensure the sizes and cell alignments match across all the views with
1983
+ * the same context.
1984
+ *
1985
+ * `GtkComboBox` menus uses this to assign the same context to all cell views
1986
+ * in the menu items for a single menu (each submenu creates its own
1987
+ * context since the size of each submenu does not depend on parent
1988
+ * or sibling menus).
1989
+ *
1990
+ * since 3.0
1991
+ */
1992
+ cellAreaContext?: Gtk.CellAreaContext;
1931
1993
  /**
1932
1994
  * Whether all cells should be draw as sensitive for this view regardless
1933
1995
  * of the actual cell properties (used to make menus with submenus appear
@@ -2377,6 +2439,8 @@ export interface GtkComboBoxProps extends WidgetProps {
2377
2439
  * {@link ComboBox.has-entry} is %TRUE.
2378
2440
  */
2379
2441
  entryTextColumn?: number;
2442
+ /** Whether the combo box has an entry. */
2443
+ hasEntry?: boolean;
2380
2444
  /** The `has-frame` property controls whether a frame is drawn around the entry. */
2381
2445
  hasFrame?: boolean;
2382
2446
  /**
@@ -2533,6 +2597,7 @@ export interface AdwComboRowProps extends AdwActionRowProps {
2533
2597
 
2534
2598
  /** Props for the {@link GtkSourceCompletionCell} widget. */
2535
2599
  export interface GtkSourceCompletionCellProps extends WidgetProps {
2600
+ column?: GtkSource.CompletionColumn;
2536
2601
  markup?: string;
2537
2602
  paintable?: Gdk.Paintable;
2538
2603
  text?: string | null;
@@ -2616,6 +2681,27 @@ export interface AdwDialogProps extends WidgetProps {
2616
2681
 
2617
2682
  /** Props for the {@link GtkDialog} widget. */
2618
2683
  export interface GtkDialogProps extends GtkWindowProps {
2684
+ /**
2685
+ * %TRUE if the dialog uses a headerbar for action buttons
2686
+ * instead of the action-area.
2687
+ *
2688
+ * For technical reasons, this property is declared as an integer
2689
+ * property, but you should only set it to %TRUE or %FALSE.
2690
+ *
2691
+ * ## Creating a dialog with headerbar
2692
+ *
2693
+ * Builtin `GtkDialog` subclasses such as {@link ColorChooserDialog}
2694
+ * set this property according to platform conventions (using the
2695
+ * {@link Settings.gtk-dialogs-use-header} setting).
2696
+ *
2697
+ * Here is how you can achieve the same:
2698
+ *
2699
+ * ```c
2700
+ * g_object_get (settings, "gtk-dialogs-use-header", &header, NULL);
2701
+ * dialog = g_object_new (GTK_TYPE_DIALOG, header, TRUE, NULL);
2702
+ * ```
2703
+ */
2704
+ useHeaderBar?: number;
2619
2705
  /**
2620
2706
  * Emitted when an action widget is clicked.
2621
2707
  *
@@ -3892,6 +3978,10 @@ export interface GtkGridViewProps extends GtkListBaseProps {
3892
3978
 
3893
3979
  /** Props for the {@link GtkSourceGutter} widget. */
3894
3980
  export interface GtkSourceGutterProps extends WidgetProps {
3981
+ /** The #GtkSourceView of the gutter. */
3982
+ view?: GtkSource.View;
3983
+ /** The text window type on which the window is placed. */
3984
+ windowType?: Gtk.TextWindowType;
3895
3985
  ref?: Ref<GtkSource.Gutter>;
3896
3986
  }
3897
3987
 
@@ -4073,6 +4163,13 @@ export interface GtkIconViewProps extends WidgetProps {
4073
4163
  * will be emitted after a single click.
4074
4164
  */
4075
4165
  activateOnSingleClick?: boolean;
4166
+ /**
4167
+ * The `GtkCellArea` used to layout cell renderers for this view.
4168
+ *
4169
+ * If no area is specified when creating the icon view with gtk_icon_view_new_with_area()
4170
+ * a `GtkCellAreaBox` will be used.
4171
+ */
4172
+ cellArea?: Gtk.CellArea;
4076
4173
  /**
4077
4174
  * The column-spacing property specifies the space which is inserted between
4078
4175
  * the columns of the icon view.
@@ -4653,6 +4750,12 @@ export interface GtkLabelProps extends WidgetProps {
4653
4750
 
4654
4751
  /** Props for the {@link AdwLayoutSlot} widget. */
4655
4752
  export interface AdwLayoutSlotProps extends WidgetProps {
4753
+ /**
4754
+ * The slot ID.
4755
+ *
4756
+ * See {@link MultiLayoutViewset_child}.
4757
+ */
4758
+ id?: string;
4656
4759
  ref?: Ref<Adw.LayoutSlot>;
4657
4760
  }
4658
4761
 
@@ -5119,6 +5222,8 @@ export interface AdwMessageDialogProps extends GtkWindowProps {
5119
5222
 
5120
5223
  /** Props for the {@link GtkMessageDialog} widget. */
5121
5224
  export interface GtkMessageDialogProps extends GtkDialogProps {
5225
+ /** Set of buttons to display on the dialog. */
5226
+ buttons?: Gtk.ButtonsType;
5122
5227
  /** The type of the message. */
5123
5228
  messageType?: Gtk.MessageType;
5124
5229
  /** The secondary text of the message dialog. */
@@ -7167,6 +7272,7 @@ export interface GtkSourceStyleSchemeChooserWidgetProps extends WidgetProps {
7167
7272
 
7168
7273
  /** Props for the {@link GtkSourceStyleSchemePreview} widget. */
7169
7274
  export interface GtkSourceStyleSchemePreviewProps extends WidgetProps {
7275
+ scheme: GtkSource.StyleScheme;
7170
7276
  selected?: boolean;
7171
7277
  /** The name of the action with which this widget should be associated. */
7172
7278
  actionName?: string;
@@ -8935,6 +9041,13 @@ export interface GtkVolumeButtonProps extends GtkScaleButtonProps {
8935
9041
 
8936
9042
  /** Props for the {@link WebKitWebView} widget. */
8937
9043
  export interface WebKitWebViewProps extends WebKitWebViewBaseProps {
9044
+ /**
9045
+ * The #WebKitAutomationBrowsingContextPresentation of #WebKitWebView. This should only be used when
9046
+ * creating a new #WebKitWebView as a response to #WebKitAutomationSession::create-web-view
9047
+ * signal request. If the new WebView was added to a new tab of current browsing context window
9048
+ * %WEBKIT_AUTOMATION_BROWSING_CONTEXT_PRESENTATION_TAB should be used.
9049
+ */
9050
+ automationPresentationType?: WebKit.AutomationBrowsingContextPresentation;
8938
9051
  /**
8939
9052
  * Capture state of the camera device. Whenever the user grants a media-request sent by the web
8940
9053
  * page, requesting video capture capabilities (`navigator.mediaDevices.getUserMedia({video:
@@ -8949,6 +9062,19 @@ export interface WebKitWebViewProps extends WebKitWebViewBaseProps {
8949
9062
  * application.
8950
9063
  */
8951
9064
  cameraCaptureState?: WebKit.MediaCaptureState;
9065
+ /**
9066
+ * The default Content-Security-Policy used by the webview as if it were set
9067
+ * by an HTTP header.
9068
+ *
9069
+ * This applies to all content loaded including through navigation or via the various
9070
+ * webkit_web_view_load_\* APIs. However do note that many WebKit APIs bypass
9071
+ * Content-Security-Policy in general such as #WebKitUserContentManager and
9072
+ * webkit_web_view_run_javascript().
9073
+ *
9074
+ * Policies are additive so if a website sets its own policy it still applies
9075
+ * on top of the policy set here.
9076
+ */
9077
+ defaultContentSecurityPolicy?: string;
8952
9078
  /**
8953
9079
  * Capture state of the display device. Whenever the user grants a media-request sent by the web
8954
9080
  * page, requesting screencasting capabilities (`navigator.mediaDevices.getDisplayMedia() this
@@ -8968,6 +9094,19 @@ export interface WebKitWebViewProps extends WebKitWebViewBaseProps {
8968
9094
  * information see webkit_web_view_set_editable().
8969
9095
  */
8970
9096
  editable?: boolean;
9097
+ /**
9098
+ * Whether the #WebKitWebView is controlled by automation tools (e.g. WebDriver, Selenium). This is
9099
+ * required for views returned as a response to #WebKitAutomationSession::create-web-view signal,
9100
+ * alongside any view you want to control during an automation session.
9101
+ *
9102
+ * As a %G_PARAM_CONSTRUCT_ONLY, you need to set it during construction and it can't be modified.
9103
+ *
9104
+ * If #WebKitWebView:related-view is also passed during construction, #WebKitWebView:is-controlled-by-automation
9105
+ * ignores its own parameter and inherits directly from the related view #WebKitWebView:is-controlled-by-automation
9106
+ * property. This is the recommended way when creating new views as a response to the #WebKitWebView::create
9107
+ * signal. For example, as response to JavaScript `window.open()` calls during an automation session.
9108
+ */
9109
+ isControlledByAutomation?: boolean;
8971
9110
  /**
8972
9111
  * Whether the #WebKitWebView audio is muted. When %TRUE, audio is silenced.
8973
9112
  * It may still be playing, i.e. #WebKitWebView:is-playing-audio may be %TRUE.
@@ -8987,8 +9126,32 @@ export interface WebKitWebViewProps extends WebKitWebViewBaseProps {
8987
9126
  * application.
8988
9127
  */
8989
9128
  microphoneCaptureState?: WebKit.MediaCaptureState;
9129
+ /** The #WebKitNetworkSession of the view */
9130
+ networkSession?: WebKit.NetworkSession;
9131
+ /**
9132
+ * The related #WebKitWebView used when creating the view to share the
9133
+ * same web process and network session. This property is not readable
9134
+ * because the related web view is only valid during the object construction.
9135
+ */
9136
+ relatedView?: WebKit.WebView;
8990
9137
  /** The #WebKitSettings of the view. */
8991
9138
  settings?: WebKit.Settings;
9139
+ /** The #WebKitUserContentManager of the view. */
9140
+ userContentManager?: WebKit.UserContentManager;
9141
+ /** The #WebKitWebContext of the view. */
9142
+ webContext?: WebKit.WebContext;
9143
+ /**
9144
+ * This configures `web_view` to treat the content as a WebExtension.
9145
+ *
9146
+ * Note that this refers to the web standard [WebExtensions](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions)
9147
+ * and not WebKitWebExtensions.
9148
+ *
9149
+ * In practice this limits the Content-Security-Policies that are allowed to be set. Some details can be found in
9150
+ * [Chrome's documentation](https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/#content-security-policy).
9151
+ */
9152
+ webExtensionMode?: WebKit.WebExtensionMode;
9153
+ /** The #WebKitWebsitePolicies for the view. */
9154
+ websitePolicies?: WebKit.WebsitePolicies;
8992
9155
  /**
8993
9156
  * The zoom level of the #WebKitWebView content.
8994
9157
  * See webkit_web_view_set_zoom_level() for more details.
@@ -9740,6 +9903,8 @@ export interface GtkDropControllerMotionProps extends EventControllerBaseProps {
9740
9903
  export interface GtkDropTargetProps extends EventControllerBaseProps {
9741
9904
  /** The `GdkDragActions` that this drop target supports. */
9742
9905
  actions?: Gdk.DragAction;
9906
+ /** The `GdkContentFormats` that determine the supported data formats. */
9907
+ formats?: Gdk.ContentFormats;
9743
9908
  /**
9744
9909
  * Whether the drop data should be preloaded when the pointer is only
9745
9910
  * hovering over the widget but has not been released.
@@ -9984,6 +10149,11 @@ export interface GtkEventControllerScrollProps extends EventControllerBaseProps
9984
10149
 
9985
10150
  /** Props for the {@link GtkGesture} controller element. */
9986
10151
  export interface GtkGestureProps extends EventControllerBaseProps {
10152
+ /**
10153
+ * The number of touch points that trigger
10154
+ * recognition on this gesture.
10155
+ */
10156
+ nPoints?: number;
9987
10157
  /**
9988
10158
  * Emitted when the gesture is recognized.
9989
10159
  *
@@ -10168,6 +10338,10 @@ export interface GtkGestureZoomProps extends GtkGestureProps {
10168
10338
 
10169
10339
  /** Props for the {@link GtkPadController} controller element. */
10170
10340
  export interface GtkPadControllerProps extends EventControllerBaseProps {
10341
+ /** The action group of the controller. */
10342
+ actionGroup?: Gio.ActionGroup;
10343
+ /** The pad of the controller. */
10344
+ pad?: Gdk.Device;
10171
10345
  ref?: Ref<Gtk.PadController>;
10172
10346
  }
10173
10347
 
@@ -10175,6 +10349,8 @@ export interface GtkPadControllerProps extends EventControllerBaseProps {
10175
10349
  export interface GtkShortcutControllerProps extends EventControllerBaseProps {
10176
10350
  /** The modifiers that need to be pressed to allow mnemonics activation. */
10177
10351
  mnemonicModifiers?: Gdk.ModifierType;
10352
+ /** A list model to take shortcuts from. */
10353
+ model?: Gio.ListModel;
10178
10354
  /** What scope the shortcuts will be handled in. */
10179
10355
  scope?: Gtk.ShortcutScope;
10180
10356
  /**
@@ -1,3 +1,4 @@
1
+ import { freeze, unfreeze } from "@gtkx/ffi";
1
2
  import type * as Gtk from "@gtkx/ffi/gtk";
2
3
  import React from "react";
3
4
  import type ReactReconciler from "react-reconciler";
@@ -93,22 +94,42 @@ export function createHostConfig(): HostConfig {
93
94
  if (hostContext.insideTextBuffer) {
94
95
  const props = { text };
95
96
  const node = createNode("TextSegment", props, undefined, rootContainer);
96
- node.commitUpdate(null, props);
97
+ node.signalStore.blockAll();
98
+ try {
99
+ node.commitUpdate(null, props);
100
+ } finally {
101
+ node.signalStore.unblockAll();
102
+ }
97
103
  return node;
98
104
  }
99
105
  const props = { label: text };
100
106
  const node = createNode("GtkLabel", props, undefined, rootContainer);
101
- node.commitUpdate(null, props);
107
+ node.signalStore.blockAll();
108
+ try {
109
+ node.commitUpdate(null, props);
110
+ } finally {
111
+ node.signalStore.unblockAll();
112
+ }
102
113
  return node;
103
114
  },
104
115
  appendInitialChild: (parent, child) => {
105
116
  parent.appendInitialChild(child);
106
117
  },
107
118
  finalizeInitialChildren: (instance, _type, props) => {
108
- return instance.finalizeInitialChildren(props);
119
+ instance.signalStore.blockAll();
120
+ try {
121
+ return instance.finalizeInitialChildren(props);
122
+ } finally {
123
+ instance.signalStore.unblockAll();
124
+ }
109
125
  },
110
126
  commitUpdate: (instance, _type, oldProps, newProps) => {
111
- instance.commitUpdate(oldProps, newProps);
127
+ instance.signalStore.blockAll();
128
+ try {
129
+ instance.commitUpdate(oldProps, newProps);
130
+ } finally {
131
+ instance.signalStore.unblockAll();
132
+ }
112
133
  },
113
134
  commitMount: (instance) => {
114
135
  instance.commitMount();
@@ -135,14 +156,22 @@ export function createHostConfig(): HostConfig {
135
156
  parent.insertBefore(child, beforeChild);
136
157
  },
137
158
  prepareForCommit: () => {
159
+ freeze();
138
160
  return null;
139
161
  },
140
- resetAfterCommit: () => {},
162
+ resetAfterCommit: () => {
163
+ unfreeze();
164
+ },
141
165
  commitTextUpdate: (textInstance, oldText, newText) => {
142
- if (textInstance.typeName === "TextSegment") {
143
- textInstance.commitUpdate({ text: oldText }, { text: newText });
144
- } else {
145
- textInstance.commitUpdate({ label: oldText }, { label: newText });
166
+ textInstance.signalStore.blockAll();
167
+ try {
168
+ if (textInstance.typeName === "TextSegment") {
169
+ textInstance.commitUpdate({ text: oldText }, { text: newText });
170
+ } else {
171
+ textInstance.commitUpdate({ label: oldText }, { label: newText });
172
+ }
173
+ } finally {
174
+ textInstance.signalStore.unblockAll();
146
175
  }
147
176
  },
148
177
  clearContainer: () => {},
@@ -165,7 +194,9 @@ export function createHostConfig(): HostConfig {
165
194
  afterActiveInstanceBlur: () => {},
166
195
  prepareScopeUpdate: () => {},
167
196
  getInstanceFromScope: () => null,
168
- detachDeletedInstance: (instance) => instance.detachDeletedInstance(),
197
+ detachDeletedInstance: (instance) => {
198
+ instance.detachDeletedInstance();
199
+ },
169
200
  resetFormInstance: () => {},
170
201
  requestPostPaintCallback: () => {},
171
202
  shouldAttemptEagerTransition: () => false,