@gtkx/react 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/errors.js +3 -0
- package/dist/factory.d.ts +3 -2
- package/dist/factory.js +1 -1
- package/dist/generated/internal.d.ts +28 -1
- package/dist/generated/internal.js +93 -18
- package/dist/generated/jsx.d.ts +1489 -1300
- package/dist/generated/jsx.js +475 -0
- package/dist/host-config.d.ts +3 -1
- package/dist/host-config.js +31 -11
- package/dist/jsx.d.ts +107 -166
- package/dist/jsx.js +58 -69
- package/dist/node.d.ts +3 -1
- package/dist/node.js +5 -3
- package/dist/nodes/abstract/positional-child.d.ts +9 -0
- package/dist/nodes/abstract/positional-child.js +29 -0
- package/dist/nodes/abstract/positional-parent.d.ts +18 -0
- package/dist/nodes/abstract/positional-parent.js +48 -0
- package/dist/nodes/abstract/virtual-container.d.ts +17 -0
- package/dist/nodes/abstract/virtual-container.js +59 -0
- package/dist/nodes/abstract/virtual-single-child.d.ts +18 -0
- package/dist/nodes/abstract/virtual-single-child.js +54 -0
- package/dist/nodes/action-row-child.d.ts +0 -13
- package/dist/nodes/action-row-child.js +14 -12
- package/dist/nodes/action-row.d.ts +6 -1
- package/dist/nodes/action-row.js +4 -37
- package/dist/nodes/adjustable.d.ts +23 -0
- package/dist/nodes/adjustable.js +62 -0
- package/dist/nodes/alert-dialog-response.d.ts +1 -0
- package/dist/nodes/alert-dialog-response.js +86 -0
- package/dist/nodes/animation/animation-controller.d.ts +17 -0
- package/dist/nodes/animation/animation-controller.js +107 -0
- package/dist/nodes/animation/animation-factory.d.ts +15 -0
- package/dist/nodes/animation/animation-factory.js +25 -0
- package/dist/nodes/animation/animation-node.d.ts +9 -0
- package/dist/nodes/animation/animation-node.js +126 -0
- package/dist/nodes/animation/animation-style-sheet.d.ts +16 -0
- package/dist/nodes/animation/animation-style-sheet.js +74 -0
- package/dist/nodes/animation/index.d.ts +4 -0
- package/dist/nodes/animation/index.js +1 -0
- package/dist/nodes/animation/property-mapper.d.ts +11 -0
- package/dist/nodes/animation/property-mapper.js +36 -0
- package/dist/nodes/animation/transform-state.d.ts +11 -0
- package/dist/nodes/animation/transform-state.js +57 -0
- package/dist/nodes/animation/widget-registry.d.ts +5 -0
- package/dist/nodes/animation/widget-registry.js +42 -0
- package/dist/nodes/application.js +17 -7
- package/dist/nodes/autowrapped.js +37 -43
- package/dist/nodes/calendar.js +17 -43
- package/dist/nodes/color-dialog-button.d.ts +1 -0
- package/dist/nodes/color-dialog-button.js +70 -0
- package/dist/nodes/column-view-column.d.ts +3 -3
- package/dist/nodes/column-view-column.js +1 -1
- package/dist/nodes/column-view.js +36 -39
- package/dist/nodes/dialog.d.ts +11 -0
- package/dist/nodes/dialog.js +20 -0
- package/dist/nodes/drawing-area.js +24 -7
- package/dist/nodes/event-controller.d.ts +1 -0
- package/dist/nodes/event-controller.js +96 -0
- package/dist/nodes/expander-row-child.d.ts +0 -14
- package/dist/nodes/expander-row-child.js +14 -12
- package/dist/nodes/expander-row.d.ts +6 -1
- package/dist/nodes/expander-row.js +11 -48
- package/dist/nodes/fixed-child.js +48 -36
- package/dist/nodes/font-dialog-button.d.ts +1 -0
- package/dist/nodes/font-dialog-button.js +90 -0
- package/dist/nodes/grid-child.js +39 -45
- package/dist/nodes/grid.d.ts +1 -0
- package/dist/nodes/grid.js +41 -0
- package/dist/nodes/index.d.ts +17 -9
- package/dist/nodes/index.js +17 -9
- package/dist/nodes/internal/base-item-renderer.d.ts +29 -0
- package/dist/nodes/internal/base-item-renderer.js +88 -0
- package/dist/nodes/internal/base-store.d.ts +9 -0
- package/dist/nodes/internal/base-store.js +20 -0
- package/dist/nodes/internal/child-attachment.d.ts +26 -0
- package/dist/nodes/internal/child-attachment.js +48 -0
- package/dist/nodes/internal/deferred-action.d.ts +8 -0
- package/dist/nodes/internal/deferred-action.js +19 -0
- package/dist/nodes/internal/list-item-renderer.d.ts +14 -15
- package/dist/nodes/internal/list-item-renderer.js +51 -77
- package/dist/nodes/internal/list-store.d.ts +7 -6
- package/dist/nodes/internal/list-store.js +20 -24
- package/dist/nodes/internal/predicates.d.ts +25 -2
- package/dist/nodes/internal/predicates.js +53 -41
- package/dist/nodes/internal/selection-model.d.ts +30 -0
- package/dist/nodes/internal/selection-model.js +91 -0
- package/dist/nodes/internal/signal-store.d.ts +5 -4
- package/dist/nodes/internal/signal-store.js +30 -28
- package/dist/nodes/internal/simple-list-store.js +6 -9
- package/dist/nodes/internal/text-buffer-controller.d.ts +43 -0
- package/dist/nodes/internal/text-buffer-controller.js +287 -0
- package/dist/nodes/internal/text-tag-styles.d.ts +43 -0
- package/dist/nodes/internal/text-tag-styles.js +52 -0
- package/dist/nodes/internal/tree-list-item-renderer.d.ts +15 -14
- package/dist/nodes/internal/tree-list-item-renderer.js +85 -96
- package/dist/nodes/internal/tree-store.d.ts +10 -9
- package/dist/nodes/internal/tree-store.js +31 -35
- package/dist/nodes/internal/utils.d.ts +7 -4
- package/dist/nodes/internal/utils.js +50 -5
- package/dist/nodes/level-bar.js +19 -54
- package/dist/nodes/list-item.d.ts +6 -3
- package/dist/nodes/list-item.js +7 -4
- package/dist/nodes/list-view.js +15 -11
- package/dist/nodes/menu.d.ts +3 -3
- package/dist/nodes/menu.js +3 -3
- package/dist/nodes/models/list.d.ts +11 -13
- package/dist/nodes/models/list.js +16 -73
- package/dist/nodes/models/menu.d.ts +8 -7
- package/dist/nodes/models/menu.js +43 -50
- package/dist/nodes/models/tree-list.d.ts +6 -12
- package/dist/nodes/models/tree-list.js +30 -93
- package/dist/nodes/navigation-page.d.ts +1 -0
- package/dist/nodes/navigation-page.js +27 -32
- package/dist/nodes/navigation-view.js +17 -28
- package/dist/nodes/notebook-page-tab.d.ts +3 -3
- package/dist/nodes/notebook-page-tab.js +11 -14
- package/dist/nodes/notebook-page.d.ts +7 -5
- package/dist/nodes/notebook-page.js +45 -25
- package/dist/nodes/notebook.js +2 -2
- package/dist/nodes/overlay-child.js +90 -30
- package/dist/nodes/pack-child.d.ts +0 -13
- package/dist/nodes/pack-child.js +14 -12
- package/dist/nodes/pack.d.ts +6 -1
- package/dist/nodes/pack.js +4 -37
- package/dist/nodes/popover-menu.js +2 -2
- package/dist/nodes/scale.js +15 -45
- package/dist/nodes/scrolled-window.js +7 -6
- package/dist/nodes/search-bar.d.ts +1 -0
- package/dist/nodes/search-bar.js +40 -0
- package/dist/nodes/shortcut-controller.d.ts +1 -37
- package/dist/nodes/shortcut-controller.js +24 -8
- package/dist/nodes/shortcut.d.ts +5 -4
- package/dist/nodes/shortcut.js +11 -5
- package/dist/nodes/simple-list-view.js +2 -3
- package/dist/nodes/slot.d.ts +6 -9
- package/dist/nodes/slot.js +27 -42
- package/dist/nodes/source-view.js +80 -29
- package/dist/nodes/stack-page.js +20 -22
- package/dist/nodes/stack.js +19 -5
- package/dist/nodes/text-anchor.d.ts +41 -0
- package/dist/nodes/text-anchor.js +59 -0
- package/dist/nodes/text-content.d.ts +10 -0
- package/dist/nodes/text-content.js +1 -0
- package/dist/nodes/text-paintable.d.ts +17 -0
- package/dist/nodes/text-paintable.js +34 -0
- package/dist/nodes/text-segment.d.ts +15 -0
- package/dist/nodes/text-segment.js +29 -0
- package/dist/nodes/text-tag.d.ts +136 -0
- package/dist/nodes/text-tag.js +202 -0
- package/dist/nodes/text-view.d.ts +30 -0
- package/dist/nodes/text-view.js +49 -21
- package/dist/nodes/toggle-group.js +24 -32
- package/dist/nodes/toggle.d.ts +1 -15
- package/dist/nodes/toggle.js +40 -32
- package/dist/nodes/toolbar-child.js +14 -16
- package/dist/nodes/tree-list-item.d.ts +7 -5
- package/dist/nodes/tree-list-item.js +24 -36
- package/dist/nodes/tree-list-view.js +7 -6
- package/dist/nodes/virtual.d.ts +1 -1
- package/dist/nodes/widget.d.ts +2 -16
- package/dist/nodes/widget.js +105 -294
- package/dist/nodes/window.d.ts +9 -3
- package/dist/nodes/window.js +29 -15
- package/dist/registry.d.ts +1 -1
- package/dist/render.js +8 -6
- package/dist/scheduler.d.ts +11 -1
- package/dist/scheduler.js +16 -4
- package/dist/types.d.ts +2 -136
- package/package.json +3 -3
- package/dist/nodes/adjustment.d.ts +0 -48
- package/dist/nodes/adjustment.js +0 -70
- package/dist/nodes/calendar-mark.d.ts +0 -15
- package/dist/nodes/calendar-mark.js +0 -29
- package/dist/nodes/internal/constants.d.ts +0 -1
- package/dist/nodes/internal/constants.js +0 -24
- package/dist/nodes/level-bar-offset.d.ts +0 -13
- package/dist/nodes/level-bar-offset.js +0 -35
- package/dist/nodes/scale-mark.d.ts +0 -17
- package/dist/nodes/scale-mark.js +0 -38
- package/dist/nodes/source-buffer.d.ts +0 -73
- package/dist/nodes/source-buffer.js +0 -149
- package/dist/nodes/text-buffer.d.ts +0 -43
- package/dist/nodes/text-buffer.js +0 -81
- package/dist/nodes/virtual-child.d.ts +0 -18
- package/dist/nodes/virtual-child.js +0 -62
package/README.md
CHANGED
|
@@ -71,6 +71,7 @@ render(<App />, "com.example.counter");
|
|
|
71
71
|
- **React 19** — Hooks, concurrent features, and the component model you know
|
|
72
72
|
- **Native GTK4 widgets** — Real native controls, not web components in a webview
|
|
73
73
|
- **Adwaita support** — Modern GNOME styling with Libadwaita components
|
|
74
|
+
- **Declarative animations** — Framer Motion-like API using native Adwaita animations
|
|
74
75
|
- **Hot Module Replacement** — Fast refresh during development
|
|
75
76
|
- **TypeScript first** — Full type safety with auto-generated bindings
|
|
76
77
|
- **CSS-in-JS styling** — Familiar styling patterns adapted for GTK
|
package/dist/errors.js
CHANGED
|
@@ -25,6 +25,9 @@ export function formatRenderError(error, widgetType) {
|
|
|
25
25
|
if (error instanceof GtkxError) {
|
|
26
26
|
return error;
|
|
27
27
|
}
|
|
28
|
+
if (error instanceof Error) {
|
|
29
|
+
console.error("[formatRenderError] Original error stack:", error.stack);
|
|
30
|
+
}
|
|
28
31
|
const message = error instanceof Error ? error.message : String(error);
|
|
29
32
|
const formattedMessage = widgetType ? `Failed to render ${widgetType}: ${message}` : `Render error: ${message}`;
|
|
30
33
|
return new GtkxError(formattedMessage, widgetType);
|
package/dist/factory.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Node } from "./node.js";
|
|
2
|
-
import type { Container, Props } from "./types.js";
|
|
2
|
+
import type { Container, ContainerClass, Props } from "./types.js";
|
|
3
3
|
import "./nodes/index.js";
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const resolveContainerClass: (type: string) => ContainerClass | null;
|
|
5
|
+
export declare const createNode: (typeName: string, props: Props, existingContainer: Container | undefined, rootContainer: Container) => Node;
|
package/dist/factory.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NAMESPACE_REGISTRY } from "./generated/registry.js";
|
|
2
2
|
import { NODE_CLASSES } from "./registry.js";
|
|
3
3
|
import "./nodes/index.js";
|
|
4
|
-
const resolveContainerClass = (type) => {
|
|
4
|
+
export const resolveContainerClass = (type) => {
|
|
5
5
|
for (const [prefix, namespace] of NAMESPACE_REGISTRY) {
|
|
6
6
|
if (type.startsWith(prefix)) {
|
|
7
7
|
const className = type.slice(prefix.length);
|
|
@@ -23,8 +23,35 @@ export declare const POPOVER_MENU_CLASSES: readonly [typeof Gtk.MenuButton, type
|
|
|
23
23
|
export declare const PACK_INTERFACE_METHODS: string[];
|
|
24
24
|
/** Methods that define the prefix/suffix interface (Adwaita action rows). */
|
|
25
25
|
export declare const PREFIX_SUFFIX_INTERFACE_METHODS: string[];
|
|
26
|
+
/** Methods that define the adjustable interface (widgets with GtkAdjustment). */
|
|
27
|
+
export declare const ADJUSTABLE_INTERFACE_METHODS: string[];
|
|
26
28
|
/** Constructor parameters for each widget type, derived from GIR analysis. */
|
|
27
29
|
export declare const CONSTRUCTOR_PROPS: Record<string, string[]>;
|
|
28
30
|
export declare const PROPS: Record<string, Record<string, [string | null, string]>>;
|
|
29
|
-
/** Signal names for
|
|
31
|
+
/** Signal names for widgets and controllers, derived from CodegenMeta. */
|
|
30
32
|
export declare const SIGNALS: Record<string, Set<string>>;
|
|
33
|
+
/** Map from JSX element name to controller class. */
|
|
34
|
+
export declare const CONTROLLER_CLASSES: {
|
|
35
|
+
GtkDragSource: typeof Gtk.DragSource;
|
|
36
|
+
GtkDropControllerMotion: typeof Gtk.DropControllerMotion;
|
|
37
|
+
GtkDropTarget: typeof Gtk.DropTarget;
|
|
38
|
+
GtkDropTargetAsync: typeof Gtk.DropTargetAsync;
|
|
39
|
+
GtkEventControllerFocus: typeof Gtk.EventControllerFocus;
|
|
40
|
+
GtkEventControllerKey: typeof Gtk.EventControllerKey;
|
|
41
|
+
GtkEventControllerLegacy: typeof Gtk.EventControllerLegacy;
|
|
42
|
+
GtkEventControllerMotion: typeof Gtk.EventControllerMotion;
|
|
43
|
+
GtkEventControllerScroll: typeof Gtk.EventControllerScroll;
|
|
44
|
+
GtkGestureClick: typeof Gtk.GestureClick;
|
|
45
|
+
GtkGestureDrag: typeof Gtk.GestureDrag;
|
|
46
|
+
GtkGestureLongPress: typeof Gtk.GestureLongPress;
|
|
47
|
+
GtkGesturePan: typeof Gtk.GesturePan;
|
|
48
|
+
GtkGestureRotate: typeof Gtk.GestureRotate;
|
|
49
|
+
GtkGestureSingle: typeof Gtk.GestureSingle;
|
|
50
|
+
GtkGestureStylus: typeof Gtk.GestureStylus;
|
|
51
|
+
GtkGestureSwipe: typeof Gtk.GestureSwipe;
|
|
52
|
+
GtkGestureZoom: typeof Gtk.GestureZoom;
|
|
53
|
+
GtkPadController: typeof Gtk.PadController;
|
|
54
|
+
GtkShortcutController: typeof Gtk.ShortcutController;
|
|
55
|
+
};
|
|
56
|
+
/** Constructor props for controllers that require them. */
|
|
57
|
+
export declare const CONTROLLER_CONSTRUCTOR_PROPS: Record<string, string[]>;
|
|
@@ -23,6 +23,8 @@ export const POPOVER_MENU_CLASSES = [Gtk.MenuButton, Gtk.PopoverMenu, Gtk.Popove
|
|
|
23
23
|
export const PACK_INTERFACE_METHODS = ["packStart", "packEnd", "remove"];
|
|
24
24
|
/** Methods that define the prefix/suffix interface (Adwaita action rows). */
|
|
25
25
|
export const PREFIX_SUFFIX_INTERFACE_METHODS = ["addPrefix", "addSuffix", "remove"];
|
|
26
|
+
/** Methods that define the adjustable interface (widgets with GtkAdjustment). */
|
|
27
|
+
export const ADJUSTABLE_INTERFACE_METHODS = ["getAdjustment", "setAdjustment", "getValue"];
|
|
26
28
|
/** Constructor parameters for each widget type, derived from GIR analysis. */
|
|
27
29
|
export const CONSTRUCTOR_PROPS = {
|
|
28
30
|
AdwAlertDialog: ["heading", "body"],
|
|
@@ -399,7 +401,6 @@ export const PROPS = {
|
|
|
399
401
|
GtkColumnView: {
|
|
400
402
|
enableRubberband: ["getEnableRubberband", "setEnableRubberband"],
|
|
401
403
|
headerFactory: ["getHeaderFactory", "setHeaderFactory"],
|
|
402
|
-
model: ["getModel", "setModel"],
|
|
403
404
|
reorderable: ["getReorderable", "setReorderable"],
|
|
404
405
|
rowFactory: ["getRowFactory", "setRowFactory"],
|
|
405
406
|
showColumnSeparators: ["getShowColumnSeparators", "setShowColumnSeparators"],
|
|
@@ -429,7 +430,6 @@ export const PROPS = {
|
|
|
429
430
|
factory: ["getFactory", "setFactory"],
|
|
430
431
|
headerFactory: ["getHeaderFactory", "setHeaderFactory"],
|
|
431
432
|
listFactory: ["getListFactory", "setListFactory"],
|
|
432
|
-
model: ["getModel", "setModel"],
|
|
433
433
|
searchMatchMode: ["getSearchMatchMode", "setSearchMatchMode"],
|
|
434
434
|
selected: ["getSelected", "setSelected"],
|
|
435
435
|
useSubtitle: ["getUseSubtitle", "setUseSubtitle"],
|
|
@@ -464,7 +464,6 @@ export const PROPS = {
|
|
|
464
464
|
factory: ["getFactory", "setFactory"],
|
|
465
465
|
headerFactory: ["getHeaderFactory", "setHeaderFactory"],
|
|
466
466
|
listFactory: ["getListFactory", "setListFactory"],
|
|
467
|
-
model: ["getModel", "setModel"],
|
|
468
467
|
searchMatchMode: ["getSearchMatchMode", "setSearchMatchMode"],
|
|
469
468
|
selected: ["getSelected", "setSelected"],
|
|
470
469
|
showArrow: ["getShowArrow", "setShowArrow"],
|
|
@@ -653,7 +652,6 @@ export const PROPS = {
|
|
|
653
652
|
},
|
|
654
653
|
GtkGraphicsOffload: {
|
|
655
654
|
blackBackground: ["getBlackBackground", "setBlackBackground"],
|
|
656
|
-
child: ["getChild", "setChild"],
|
|
657
655
|
enabled: ["getEnabled", "setEnabled"],
|
|
658
656
|
},
|
|
659
657
|
GtkGrid: {
|
|
@@ -666,10 +664,8 @@ export const PROPS = {
|
|
|
666
664
|
},
|
|
667
665
|
GtkGridView: {
|
|
668
666
|
enableRubberband: ["getEnableRubberband", "setEnableRubberband"],
|
|
669
|
-
factory: ["getFactory", "setFactory"],
|
|
670
667
|
maxColumns: ["getMaxColumns", "setMaxColumns"],
|
|
671
668
|
minColumns: ["getMinColumns", "setMinColumns"],
|
|
672
|
-
model: ["getModel", "setModel"],
|
|
673
669
|
singleClickActivate: ["getSingleClickActivate", "setSingleClickActivate"],
|
|
674
670
|
tabBehavior: ["getTabBehavior", "setTabBehavior"],
|
|
675
671
|
},
|
|
@@ -831,9 +827,7 @@ export const PROPS = {
|
|
|
831
827
|
},
|
|
832
828
|
GtkListView: {
|
|
833
829
|
enableRubberband: ["getEnableRubberband", "setEnableRubberband"],
|
|
834
|
-
factory: ["getFactory", "setFactory"],
|
|
835
830
|
headerFactory: ["getHeaderFactory", "setHeaderFactory"],
|
|
836
|
-
model: ["getModel", "setModel"],
|
|
837
831
|
showSeparators: ["getShowSeparators", "setShowSeparators"],
|
|
838
832
|
singleClickActivate: ["getSingleClickActivate", "setSingleClickActivate"],
|
|
839
833
|
tabBehavior: ["getTabBehavior", "setTabBehavior"],
|
|
@@ -888,7 +882,6 @@ export const PROPS = {
|
|
|
888
882
|
},
|
|
889
883
|
AdwNavigationPage: {
|
|
890
884
|
canPop: ["getCanPop", "setCanPop"],
|
|
891
|
-
child: ["getChild", "setChild"],
|
|
892
885
|
tag: ["getTag", "setTag"],
|
|
893
886
|
title: ["getTitle", "setTitle"],
|
|
894
887
|
},
|
|
@@ -1035,7 +1028,6 @@ export const PROPS = {
|
|
|
1035
1028
|
orientation: ["getOrientation", "setOrientation"],
|
|
1036
1029
|
},
|
|
1037
1030
|
GtkRange: {
|
|
1038
|
-
adjustment: ["getAdjustment", "setAdjustment"],
|
|
1039
1031
|
fillLevel: ["getFillLevel", "setFillLevel"],
|
|
1040
1032
|
inverted: ["getInverted", "setInverted"],
|
|
1041
1033
|
restrictToFillLevel: ["getRestrictToFillLevel", "setRestrictToFillLevel"],
|
|
@@ -1056,7 +1048,6 @@ export const PROPS = {
|
|
|
1056
1048
|
valuePos: ["getValuePos", "setValuePos"],
|
|
1057
1049
|
},
|
|
1058
1050
|
GtkScaleButton: {
|
|
1059
|
-
adjustment: ["getAdjustment", "setAdjustment"],
|
|
1060
1051
|
hasFrame: ["getHasFrame", "setHasFrame"],
|
|
1061
1052
|
icons: [null, "setIcons"],
|
|
1062
1053
|
value: ["getValue", "setValue"],
|
|
@@ -1144,7 +1135,6 @@ export const PROPS = {
|
|
|
1144
1135
|
},
|
|
1145
1136
|
GtkSpinButton: {
|
|
1146
1137
|
activatesDefault: ["getActivatesDefault", "setActivatesDefault"],
|
|
1147
|
-
adjustment: ["getAdjustment", "setAdjustment"],
|
|
1148
1138
|
climbRate: ["getClimbRate", "setClimbRate"],
|
|
1149
1139
|
digits: ["getDigits", "setDigits"],
|
|
1150
1140
|
numeric: ["getNumeric", "setNumeric"],
|
|
@@ -1210,8 +1200,6 @@ export const PROPS = {
|
|
|
1210
1200
|
transitionDuration: ["getTransitionDuration", "setTransitionDuration"],
|
|
1211
1201
|
transitionType: ["getTransitionType", "setTransitionType"],
|
|
1212
1202
|
vhomogeneous: ["getVhomogeneous", "setVhomogeneous"],
|
|
1213
|
-
visibleChild: ["getVisibleChild", "setVisibleChild"],
|
|
1214
|
-
visibleChildName: ["getVisibleChildName", "setVisibleChildName"],
|
|
1215
1203
|
},
|
|
1216
1204
|
GtkStackSidebar: {
|
|
1217
1205
|
stack: ["getStack", "setStack"],
|
|
@@ -1349,7 +1337,6 @@ export const PROPS = {
|
|
|
1349
1337
|
GtkTextView: {
|
|
1350
1338
|
acceptsTab: ["getAcceptsTab", "setAcceptsTab"],
|
|
1351
1339
|
bottomMargin: ["getBottomMargin", "setBottomMargin"],
|
|
1352
|
-
buffer: ["getBuffer", "setBuffer"],
|
|
1353
1340
|
cursorVisible: ["getCursorVisible", "setCursorVisible"],
|
|
1354
1341
|
editable: ["getEditable", "setEditable"],
|
|
1355
1342
|
extraMenu: ["getExtraMenu", "setExtraMenu"],
|
|
@@ -1463,8 +1450,6 @@ export const PROPS = {
|
|
|
1463
1450
|
hhomogeneous: ["getHhomogeneous", "setHhomogeneous"],
|
|
1464
1451
|
transitionDuration: ["getTransitionDuration", "setTransitionDuration"],
|
|
1465
1452
|
vhomogeneous: ["getVhomogeneous", "setVhomogeneous"],
|
|
1466
|
-
visibleChild: ["getVisibleChild", "setVisibleChild"],
|
|
1467
|
-
visibleChildName: ["getVisibleChildName", "setVisibleChildName"],
|
|
1468
1453
|
},
|
|
1469
1454
|
AdwViewSwitcher: {
|
|
1470
1455
|
policy: ["getPolicy", "setPolicy"],
|
|
@@ -1520,8 +1505,46 @@ export const PROPS = {
|
|
|
1520
1505
|
wrapReverse: ["getWrapReverse", "setWrapReverse"],
|
|
1521
1506
|
orientation: ["getOrientation", "setOrientation"],
|
|
1522
1507
|
},
|
|
1508
|
+
GtkDragSource: {
|
|
1509
|
+
actions: ["getActions", "setActions"],
|
|
1510
|
+
content: ["getContent", "setContent"],
|
|
1511
|
+
},
|
|
1512
|
+
GtkDropTarget: {
|
|
1513
|
+
actions: ["getActions", "setActions"],
|
|
1514
|
+
preload: ["getPreload", "setPreload"],
|
|
1515
|
+
},
|
|
1516
|
+
GtkDropTargetAsync: {
|
|
1517
|
+
actions: ["getActions", "setActions"],
|
|
1518
|
+
formats: ["getFormats", "setFormats"],
|
|
1519
|
+
},
|
|
1520
|
+
GtkEventController: {
|
|
1521
|
+
name: ["getName", "setName"],
|
|
1522
|
+
propagationLimit: ["getPropagationLimit", "setPropagationLimit"],
|
|
1523
|
+
propagationPhase: ["getPropagationPhase", "setPropagationPhase"],
|
|
1524
|
+
},
|
|
1525
|
+
GtkEventControllerScroll: {
|
|
1526
|
+
flags: ["getFlags", "setFlags"],
|
|
1527
|
+
},
|
|
1528
|
+
GtkGestureLongPress: {
|
|
1529
|
+
delayFactor: ["getDelayFactor", "setDelayFactor"],
|
|
1530
|
+
},
|
|
1531
|
+
GtkGesturePan: {
|
|
1532
|
+
orientation: ["getOrientation", "setOrientation"],
|
|
1533
|
+
},
|
|
1534
|
+
GtkGestureSingle: {
|
|
1535
|
+
button: ["getButton", "setButton"],
|
|
1536
|
+
exclusive: ["getExclusive", "setExclusive"],
|
|
1537
|
+
touchOnly: ["getTouchOnly", "setTouchOnly"],
|
|
1538
|
+
},
|
|
1539
|
+
GtkGestureStylus: {
|
|
1540
|
+
stylusOnly: ["getStylusOnly", "setStylusOnly"],
|
|
1541
|
+
},
|
|
1542
|
+
GtkShortcutController: {
|
|
1543
|
+
mnemonicModifiers: ["getMnemonicsModifiers", "setMnemonicsModifiers"],
|
|
1544
|
+
scope: ["getScope", "setScope"],
|
|
1545
|
+
},
|
|
1523
1546
|
};
|
|
1524
|
-
/** Signal names for
|
|
1547
|
+
/** Signal names for widgets and controllers, derived from CodegenMeta. */
|
|
1525
1548
|
export const SIGNALS = {
|
|
1526
1549
|
GtkWidget: new Set([
|
|
1527
1550
|
"destroy",
|
|
@@ -1537,6 +1560,7 @@ export const SIGNALS = {
|
|
|
1537
1560
|
"state-flags-changed",
|
|
1538
1561
|
"unmap",
|
|
1539
1562
|
"unrealize",
|
|
1563
|
+
"notify",
|
|
1540
1564
|
]),
|
|
1541
1565
|
GtkWindow: new Set(["activate-default", "activate-focus", "close-request", "enable-debugging", "keys-changed"]),
|
|
1542
1566
|
AdwAboutDialog: new Set(["activate-link"]),
|
|
@@ -1842,4 +1866,55 @@ export const SIGNALS = {
|
|
|
1842
1866
|
"user-message-received",
|
|
1843
1867
|
"web-process-terminated",
|
|
1844
1868
|
]),
|
|
1869
|
+
GtkDragSource: new Set(["drag-begin", "drag-cancel", "drag-end", "prepare"]),
|
|
1870
|
+
GtkDropControllerMotion: new Set(["enter", "leave", "motion"]),
|
|
1871
|
+
GtkDropTarget: new Set(["accept", "drop", "enter", "leave", "motion"]),
|
|
1872
|
+
GtkDropTargetAsync: new Set(["accept", "drag-enter", "drag-leave", "drag-motion", "drop"]),
|
|
1873
|
+
GtkEventController: new Set(["notify"]),
|
|
1874
|
+
GtkEventControllerFocus: new Set(["enter", "leave"]),
|
|
1875
|
+
GtkEventControllerKey: new Set(["im-update", "key-pressed", "key-released", "modifiers"]),
|
|
1876
|
+
GtkEventControllerLegacy: new Set(["event"]),
|
|
1877
|
+
GtkEventControllerMotion: new Set(["enter", "leave", "motion"]),
|
|
1878
|
+
GtkEventControllerScroll: new Set(["decelerate", "scroll", "scroll-begin", "scroll-end"]),
|
|
1879
|
+
GtkGesture: new Set(["begin", "cancel", "end", "sequence-state-changed", "update"]),
|
|
1880
|
+
GtkGestureClick: new Set(["pressed", "released", "stopped", "unpaired-release"]),
|
|
1881
|
+
GtkGestureDrag: new Set(["drag-begin", "drag-end", "drag-update"]),
|
|
1882
|
+
GtkGestureLongPress: new Set(["cancelled", "pressed"]),
|
|
1883
|
+
GtkGesturePan: new Set(["pan"]),
|
|
1884
|
+
GtkGestureRotate: new Set(["angle-changed"]),
|
|
1885
|
+
GtkGestureStylus: new Set(["down", "motion", "proximity", "up"]),
|
|
1886
|
+
GtkGestureSwipe: new Set(["swipe"]),
|
|
1887
|
+
GtkGestureZoom: new Set(["scale-changed"]),
|
|
1888
|
+
GtkShortcutController: new Set(["items-changed"]),
|
|
1889
|
+
};
|
|
1890
|
+
/** Map from JSX element name to controller class. */
|
|
1891
|
+
export const CONTROLLER_CLASSES = {
|
|
1892
|
+
GtkDragSource: Gtk.DragSource,
|
|
1893
|
+
GtkDropControllerMotion: Gtk.DropControllerMotion,
|
|
1894
|
+
GtkDropTarget: Gtk.DropTarget,
|
|
1895
|
+
GtkDropTargetAsync: Gtk.DropTargetAsync,
|
|
1896
|
+
GtkEventControllerFocus: Gtk.EventControllerFocus,
|
|
1897
|
+
GtkEventControllerKey: Gtk.EventControllerKey,
|
|
1898
|
+
GtkEventControllerLegacy: Gtk.EventControllerLegacy,
|
|
1899
|
+
GtkEventControllerMotion: Gtk.EventControllerMotion,
|
|
1900
|
+
GtkEventControllerScroll: Gtk.EventControllerScroll,
|
|
1901
|
+
GtkGestureClick: Gtk.GestureClick,
|
|
1902
|
+
GtkGestureDrag: Gtk.GestureDrag,
|
|
1903
|
+
GtkGestureLongPress: Gtk.GestureLongPress,
|
|
1904
|
+
GtkGesturePan: Gtk.GesturePan,
|
|
1905
|
+
GtkGestureRotate: Gtk.GestureRotate,
|
|
1906
|
+
GtkGestureSingle: Gtk.GestureSingle,
|
|
1907
|
+
GtkGestureStylus: Gtk.GestureStylus,
|
|
1908
|
+
GtkGestureSwipe: Gtk.GestureSwipe,
|
|
1909
|
+
GtkGestureZoom: Gtk.GestureZoom,
|
|
1910
|
+
GtkPadController: Gtk.PadController,
|
|
1911
|
+
GtkShortcutController: Gtk.ShortcutController,
|
|
1912
|
+
};
|
|
1913
|
+
/** Constructor props for controllers that require them. */
|
|
1914
|
+
export const CONTROLLER_CONSTRUCTOR_PROPS = {
|
|
1915
|
+
GtkDropTarget: ["actions"],
|
|
1916
|
+
GtkDropTargetAsync: ["actions", "formats"],
|
|
1917
|
+
GtkEventControllerScroll: ["flags"],
|
|
1918
|
+
GtkGesturePan: ["orientation"],
|
|
1919
|
+
GtkPadController: ["pad"],
|
|
1845
1920
|
};
|