UNPKG

react-native-gtk4

Version:
1,676 lines (1,651 loc) 318 kB
"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { AboutDialog: () => AboutDialog_default, ActionBar: () => ActionBar_default, AppChooserButton: () => AppChooserButton2, AppChooserDialog: () => AppChooserDialog2, AppChooserWidget: () => AppChooserWidget2, ApplicationWindow: () => ApplicationWindow_default, AspectFrame: () => AspectFrame2, Assistant: () => Assistant2, Box: () => Box2, Button: () => Button2, Calendar: () => Calendar_default, CellView: () => CellView2, CenterBox: () => CenterBox_default, CheckButton: () => CheckButton_default, ColorButton: () => ColorButton2, ColorChooserDialog: () => ColorChooserDialog2, ColorChooserWidget: () => ColorChooserWidget2, ColorDialogButton: () => ColorDialogButton_default, ColumnView: () => ColumnView_default, ComboBox: () => ComboBox2, ComboBoxText: () => ComboBoxText2, Dialog: () => Dialog2, DragIcon: () => DragIcon2, DrawingArea: () => DrawingArea2, DropDown: () => DropDown_default, EditableLabel: () => EditableLabel2, EmojiChooser: () => EmojiChooser_default, Entry: () => Entry2, Expander: () => Expander_default, FileChooserDialog: () => FileChooserDialog2, FileChooserWidget: () => FileChooserWidget2, Fixed: () => Fixed2, FlowBox: () => FlowBox2, FlowBoxChild: () => FlowBoxChild2, FontButton: () => FontButton2, FontChooserDialog: () => FontChooserDialog2, FontChooserWidget: () => FontChooserWidget2, FontDialogButton: () => FontDialogButton_default, Frame: () => Frame_default, GLArea: () => GLArea2, GLib: () => node_glib_2_0_default, GObject: () => node_gobject_2_0_default, Gdk: () => node_gdk_4_0_default, Gio: () => node_gio_2_0_default, GraphicsOffload: () => GraphicsOffload2, Grid: () => Grid_default, GridView: () => GridView2, Gtk: () => node_gtk_4_0_default, HeaderBar: () => HeaderBar_default, IconView: () => IconView2, Image: () => Image2, InfoBar: () => InfoBar2, Inscription: () => Inscription2, Label: () => Label2, LevelBar: () => LevelBar_default, LinkButton: () => LinkButton2, ListBase: () => ListBase2, ListBox: () => ListBox2, ListBoxRow: () => ListBoxRow2, ListModelProvider: () => ListModelProvider, ListProvider: () => ListProvider_default, ListView: () => ListView_default, LockButton: () => LockButton2, MediaControls: () => MediaControls2, MenuButton: () => MenuButton_default, MessageDialog: () => MessageDialog2, MultipleFileDialog: () => MultipleFileDialog, Notebook: () => Notebook_default, Overlay: () => Overlay_default, PageSetupUnixDialog: () => PageSetupUnixDialog_default, Paned: () => Paned_default, Pango: () => node_pango_1_0_default, PasswordEntry: () => PasswordEntry2, Picture: () => Picture2, Popover: () => Popover_default, PopoverMenu: () => PopoverMenu_default, PopoverMenuBar: () => PopoverMenuBar_default, PrintUnixDialog: () => PrintUnixDialog_default, ProgressBar: () => ProgressBar2, REACT_PORTAL_TYPE: () => REACT_PORTAL_TYPE, Range: () => Range2, Revealer: () => Revealer2, Scale: () => Scale_default, ScaleButton: () => ScaleButton2, Scrollbar: () => Scrollbar2, ScrolledWindow: () => ScrolledWindow2, SearchBar: () => SearchBar2, SearchEntry: () => SearchEntry2, Separator: () => Separator2, ShortcutLabel: () => ShortcutLabel2, ShortcutsGroup: () => ShortcutsGroup2, ShortcutsSection: () => ShortcutsSection2, ShortcutsShortcut: () => ShortcutsShortcut2, ShortcutsWindow: () => ShortcutsWindow2, SingleFileDialog: () => SingleFileDialog, SpinButton: () => SpinButton_default, Spinner: () => Spinner2, Stack: () => Stack_default, StackSidebar: () => StackSidebar2, StackSwitcher: () => StackSwitcher2, Statusbar: () => Statusbar2, Switch: () => Switch2, Text: () => Text2, TextView: () => TextView_default, ToggleButton: () => ToggleButton2, TreeExpander: () => TreeExpander2, TreeProvider: () => TreeProvider_default, TreeView: () => TreeView2, Video: () => Video2, Viewport: () => Viewport2, VolumeButton: () => VolumeButton2, Widget: () => Widget2, Window: () => Window2, WindowControls: () => WindowControls2, WindowHandle: () => WindowHandle2, createPortal: () => createPortal, createReconciler: () => createReconciler, createRootNode: () => createRootNode, default: () => render, useActionGroup: () => useActionGroup, useApplication: () => useApplication, useInlineStylesheet: () => useInlineStylesheet, useListItemFactory: () => useListItemFactory, useListModel: () => useListModel, useMenu: () => useMenu, useSelection: () => useSelection, useStylesheet: () => useStylesheet }); module.exports = __toCommonJS(src_exports); // src/generated/girs/node-gtk-4.0.js var import_node_gtk = __toESM(require("node-gtk")); var { require: giRequire } = import_node_gtk.default; var Gtk = giRequire("Gtk", "4.0"); var node_gtk_4_0_default = Gtk; // src/generated/girs/node-gtk.js var gi2 = __toESM(require("node-gtk")); var node_gtk_default = gi2; // src/generated/girs/node-glib-2.0.js var import_node_gtk2 = __toESM(require("node-gtk")); var { require: giRequire2 } = import_node_gtk2.default; var GLib = giRequire2("GLib", "2.0"); var node_glib_2_0_default = GLib; // src/node.ts var Node = class { children = []; parent = null; node; constructor(node) { this.node = node; } appendChild(child) { this.children.push(child); child.parent = this; } removeChild(child) { const index = this.children.indexOf(child); if (index === -1) { throw new Error("Child to be removed not found in parent"); } this.children.splice(index, 1); if (child.node instanceof node_gtk_4_0_default.Window) { child.node.destroy(); } else if (child.node instanceof node_gtk_4_0_default.Widget) { child.node.unparent(); } child.parent = null; } insertBefore(child, beforeChild) { const beforeIndex = this.children.indexOf(beforeChild); const index = beforeIndex - 1; if (beforeIndex === -1) { throw new Error("Node before which to insert child not found in parent"); } if (index < 0) { this.children.unshift(child); return; } this.children.splice(index, 0, child); child.parent = this; } getClosestParentOfType(type) { let parent12 = this.parent; while (parent12) { if (parent12.node instanceof type) { return parent12.node; } parent12 = parent12.parent; } return null; } }; // src/widget.ts var AbstractWidget = class extends Node { handlers = {}; props = {}; constructor(props = {}, node) { super(node); this.props = props; for (const propName in props) { this.set(propName, props[propName]); } } setHandler(handlerName, handler) { const oldHandler = this.handlers[handlerName]; if (oldHandler) { this.node.off(handlerName, oldHandler); delete this.handlers[handlerName]; } if (handler) { const newHandler = (...args) => { return handler(this.node, ...args); }; this.node.on(handlerName, newHandler); this.handlers[handlerName] = newHandler; } } }; // src/generated/widgets/Widget.tsx var Widget = class extends AbstractWidget { static createNode() { return new node_gtk_4_0_default.Widget({}); } commitMount() { } set(propName, newValue) { switch (propName) { case "canFocus": this.node.setCanFocus(newValue); break; case "canTarget": this.node.setCanTarget(newValue); break; case "cssClasses": this.node.setCssClasses(newValue); break; case "cursor": this.node.setCursor(newValue); break; case "focusOnClick": this.node.setFocusOnClick(newValue); break; case "focusable": this.node.setFocusable(newValue); break; case "halign": this.node.setHalign(newValue); break; case "hasTooltip": this.node.setHasTooltip(newValue); break; case "heightRequest": this.node.heightRequest = newValue; break; case "hexpand": this.node.setHexpand(newValue); break; case "hexpandSet": this.node.setHexpandSet(newValue); break; case "layoutManager": this.node.setLayoutManager(newValue); break; case "marginBottom": this.node.setMarginBottom(newValue); break; case "marginEnd": this.node.setMarginEnd(newValue); break; case "marginStart": this.node.setMarginStart(newValue); break; case "marginTop": this.node.setMarginTop(newValue); break; case "name": this.node.setName(newValue); break; case "opacity": this.node.setOpacity(newValue); break; case "overflow": this.node.setOverflow(newValue); break; case "receivesDefault": this.node.setReceivesDefault(newValue); break; case "sensitive": this.node.setSensitive(newValue); break; case "tooltipMarkup": this.node.setTooltipMarkup(newValue); break; case "tooltipText": this.node.setTooltipText(newValue); break; case "valign": this.node.setValign(newValue); break; case "vexpand": this.node.setVexpand(newValue); break; case "vexpandSet": this.node.setVexpandSet(newValue); break; case "visible": this.node.setVisible(newValue); break; case "widthRequest": this.node.widthRequest = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onDestroy": this.setHandler("destroy", newValue); break; case "onDirectionChanged": this.setHandler("direction-changed", newValue); break; case "onHide": this.setHandler("hide", newValue); break; case "onKeynavFailed": this.setHandler("keynav-failed", newValue); break; case "onMap": this.setHandler("map", newValue); break; case "onMnemonicActivate": this.setHandler("mnemonic-activate", newValue); break; case "onMoveFocus": this.setHandler("move-focus", newValue); break; case "onQueryTooltip": this.setHandler("query-tooltip", newValue); break; case "onRealize": this.setHandler("realize", newValue); break; case "onShow": this.setHandler("show", newValue); break; case "onStateFlagsChanged": this.setHandler("state-flags-changed", newValue); break; case "onUnmap": this.setHandler("unmap", newValue); break; case "onUnrealize": this.setHandler("unrealize", newValue); break; case "onNotifyCanFocus": this.setHandler("notify::canFocus", newValue); break; case "onNotifyCanTarget": this.setHandler("notify::canTarget", newValue); break; case "onNotifyCssClasses": this.setHandler("notify::cssClasses", newValue); break; case "onNotifyCssName": this.setHandler("notify::cssName", newValue); break; case "onNotifyCursor": this.setHandler("notify::cursor", newValue); break; case "onNotifyFocusOnClick": this.setHandler("notify::focusOnClick", newValue); break; case "onNotifyFocusable": this.setHandler("notify::focusable", newValue); break; case "onNotifyHalign": this.setHandler("notify::halign", newValue); break; case "onNotifyHasDefault": this.setHandler("notify::hasDefault", newValue); break; case "onNotifyHasFocus": this.setHandler("notify::hasFocus", newValue); break; case "onNotifyHasTooltip": this.setHandler("notify::hasTooltip", newValue); break; case "onNotifyHeightRequest": this.setHandler("notify::heightRequest", newValue); break; case "onNotifyHexpand": this.setHandler("notify::hexpand", newValue); break; case "onNotifyHexpandSet": this.setHandler("notify::hexpandSet", newValue); break; case "onNotifyLayoutManager": this.setHandler("notify::layoutManager", newValue); break; case "onNotifyMarginBottom": this.setHandler("notify::marginBottom", newValue); break; case "onNotifyMarginEnd": this.setHandler("notify::marginEnd", newValue); break; case "onNotifyMarginStart": this.setHandler("notify::marginStart", newValue); break; case "onNotifyMarginTop": this.setHandler("notify::marginTop", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyOpacity": this.setHandler("notify::opacity", newValue); break; case "onNotifyOverflow": this.setHandler("notify::overflow", newValue); break; case "onNotifyParent": this.setHandler("notify::parent", newValue); break; case "onNotifyReceivesDefault": this.setHandler("notify::receivesDefault", newValue); break; case "onNotifyRoot": this.setHandler("notify::root", newValue); break; case "onNotifyScaleFactor": this.setHandler("notify::scaleFactor", newValue); break; case "onNotifySensitive": this.setHandler("notify::sensitive", newValue); break; case "onNotifyTooltipMarkup": this.setHandler("notify::tooltipMarkup", newValue); break; case "onNotifyTooltipText": this.setHandler("notify::tooltipText", newValue); break; case "onNotifyValign": this.setHandler("notify::valign", newValue); break; case "onNotifyVexpand": this.setHandler("notify::vexpand", newValue); break; case "onNotifyVexpandSet": this.setHandler("notify::vexpandSet", newValue); break; case "onNotifyVisible": this.setHandler("notify::visible", newValue); break; case "onNotifyWidthRequest": this.setHandler("notify::widthRequest", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; default: break; } } }; // src/generated/widgets/Window.tsx var Window = class extends Widget { static createNode() { return new node_gtk_4_0_default.Window({}); } appendChild(child) { super.appendChild(child); this.node.setChild(child.node); } removeChild(child) { super.removeChild(child); this.node.setChild(null); } insertBefore(child, beforeChild) { super.insertBefore(child, beforeChild); this.node.setChild(child.node); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "application": this.node.setApplication(newValue); break; case "decorated": this.node.setDecorated(newValue); break; case "defaultHeight": this.node.defaultHeight = newValue; break; case "defaultWidget": this.node.setDefaultWidget(newValue); break; case "defaultWidth": this.node.defaultWidth = newValue; break; case "deletable": this.node.setDeletable(newValue); break; case "destroyWithParent": this.node.setDestroyWithParent(newValue); break; case "display": this.node.setDisplay(newValue); break; case "focusVisible": this.node.setFocusVisible(newValue); break; case "focusWidget": this.node.focusWidget = newValue; break; case "fullscreened": this.node.fullscreened = newValue; break; case "handleMenubarAccel": this.node.setHandleMenubarAccel(newValue); break; case "hideOnClose": this.node.setHideOnClose(newValue); break; case "iconName": this.node.setIconName(newValue); break; case "maximized": this.node.maximized = newValue; break; case "mnemonicsVisible": this.node.setMnemonicsVisible(newValue); break; case "modal": this.node.setModal(newValue); break; case "resizable": this.node.setResizable(newValue); break; case "startupId": this.node.setStartupId(newValue); break; case "title": this.node.setTitle(newValue); break; case "titlebar": this.node.setTitlebar(newValue); break; case "transientFor": this.node.setTransientFor(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onActivateDefault": this.setHandler("activate-default", newValue); break; case "onActivateFocus": this.setHandler("activate-focus", newValue); break; case "onCloseRequest": this.setHandler("close-request", newValue); break; case "onEnableDebugging": this.setHandler("enable-debugging", newValue); break; case "onKeysChanged": this.setHandler("keys-changed", newValue); break; case "onNotifyApplication": this.setHandler("notify::application", newValue); break; case "onNotifyChild": this.setHandler("notify::child", newValue); break; case "onNotifyDecorated": this.setHandler("notify::decorated", newValue); break; case "onNotifyDefaultHeight": this.setHandler("notify::defaultHeight", newValue); break; case "onNotifyDefaultWidget": this.setHandler("notify::defaultWidget", newValue); break; case "onNotifyDefaultWidth": this.setHandler("notify::defaultWidth", newValue); break; case "onNotifyDeletable": this.setHandler("notify::deletable", newValue); break; case "onNotifyDestroyWithParent": this.setHandler("notify::destroyWithParent", newValue); break; case "onNotifyDisplay": this.setHandler("notify::display", newValue); break; case "onNotifyFocusVisible": this.setHandler("notify::focusVisible", newValue); break; case "onNotifyFocusWidget": this.setHandler("notify::focusWidget", newValue); break; case "onNotifyFullscreened": this.setHandler("notify::fullscreened", newValue); break; case "onNotifyHandleMenubarAccel": this.setHandler("notify::handleMenubarAccel", newValue); break; case "onNotifyHideOnClose": this.setHandler("notify::hideOnClose", newValue); break; case "onNotifyIconName": this.setHandler("notify::iconName", newValue); break; case "onNotifyIsActive": this.setHandler("notify::isActive", newValue); break; case "onNotifyMaximized": this.setHandler("notify::maximized", newValue); break; case "onNotifyMnemonicsVisible": this.setHandler("notify::mnemonicsVisible", newValue); break; case "onNotifyModal": this.setHandler("notify::modal", newValue); break; case "onNotifyResizable": this.setHandler("notify::resizable", newValue); break; case "onNotifyStartupId": this.setHandler("notify::startupId", newValue); break; case "onNotifySuspended": this.setHandler("notify::suspended", newValue); break; case "onNotifyTitle": this.setHandler("notify::title", newValue); break; case "onNotifyTitlebar": this.setHandler("notify::titlebar", newValue); break; case "onNotifyTransientFor": this.setHandler("notify::transientFor", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; default: break; } } }; // src/generated/widgets/ApplicationWindow.tsx var ApplicationWindow = class extends Window { static createNode() { return new node_gtk_4_0_default.ApplicationWindow({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "showMenubar": this.node.setShowMenubar(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onActionAdded": this.setHandler("action-added", newValue); break; case "onActionEnabledChanged": this.setHandler("action-enabled-changed", newValue); break; case "onActionRemoved": this.setHandler("action-removed", newValue); break; case "onActionStateChanged": this.setHandler("action-state-changed", newValue); break; case "onNotifyShowMenubar": this.setHandler("notify::showMenubar", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; default: break; } } }; // src/application.ts var MAX_TIMEOUT = 2147483647; var Application = class extends Node { context; loop; timeout; constructor(node) { super(node); this.loop = node_glib_2_0_default.MainLoop.new(null, false); this.context = { quit: () => { this.node.quit(); this.loop.quit(); clearTimeout(this.timeout); return false; }, application: node }; } run(callback) { this.node.on("activate", () => { callback(); const loop = () => { this.timeout = setTimeout(loop, MAX_TIMEOUT); }; loop(); node_gtk_default.startLoop(); this.loop.run(); }); this.node.run([]); } appendChild(child) { super.appendChild(child); this.afterInsert(child); } insertBefore(child, beforeChild) { super.insertBefore(child, beforeChild); this.afterInsert(child); } afterInsert(child) { if (child instanceof ApplicationWindow) { child.node.setApplication(this.node); } } }; // src/reconciler.ts var import_react_reconciler = __toESM(require("react-reconciler")); // src/generated/widgets.ts var widgets_exports = {}; __export(widgets_exports, { AboutDialog: () => AboutDialog, ActionBar: () => ActionBar, AppChooserButton: () => AppChooserButton, AppChooserDialog: () => AppChooserDialog, AppChooserWidget: () => AppChooserWidget, ApplicationWindow: () => ApplicationWindow, AspectFrame: () => AspectFrame, Assistant: () => Assistant, Box: () => Box, Button: () => Button, Calendar: () => Calendar, CellView: () => CellView, CenterBox: () => CenterBox, CheckButton: () => CheckButton, ColorButton: () => ColorButton, ColorChooserDialog: () => ColorChooserDialog, ColorChooserWidget: () => ColorChooserWidget, ColorDialogButton: () => ColorDialogButton, ColumnView: () => ColumnView, ComboBox: () => ComboBox, ComboBoxText: () => ComboBoxText, Dialog: () => Dialog, DragIcon: () => DragIcon, DrawingArea: () => DrawingArea, DropDown: () => DropDown, EditableLabel: () => EditableLabel, EmojiChooser: () => EmojiChooser, Entry: () => Entry, Expander: () => Expander, FileChooserDialog: () => FileChooserDialog, FileChooserWidget: () => FileChooserWidget, Fixed: () => Fixed, FlowBox: () => FlowBox, FlowBoxChild: () => FlowBoxChild, FontButton: () => FontButton, FontChooserDialog: () => FontChooserDialog, FontChooserWidget: () => FontChooserWidget, FontDialogButton: () => FontDialogButton, Frame: () => Frame, GLArea: () => GLArea, GraphicsOffload: () => GraphicsOffload, Grid: () => Grid, GridView: () => GridView, HeaderBar: () => HeaderBar, IconView: () => IconView, Image: () => Image, InfoBar: () => InfoBar, Inscription: () => Inscription, Label: () => Label, LevelBar: () => LevelBar, LinkButton: () => LinkButton, ListBase: () => ListBase, ListBox: () => ListBox, ListBoxRow: () => ListBoxRow, ListView: () => ListView, LockButton: () => LockButton, MediaControls: () => MediaControls, MenuButton: () => MenuButton, MessageDialog: () => MessageDialog, Notebook: () => Notebook, Overlay: () => Overlay, PageSetupUnixDialog: () => PageSetupUnixDialog, Paned: () => Paned, PasswordEntry: () => PasswordEntry, Picture: () => Picture, Popover: () => Popover, PopoverMenu: () => PopoverMenu, PopoverMenuBar: () => PopoverMenuBar, PrintUnixDialog: () => PrintUnixDialog, ProgressBar: () => ProgressBar, Range: () => Range, Revealer: () => Revealer, Scale: () => Scale, ScaleButton: () => ScaleButton, Scrollbar: () => Scrollbar, ScrolledWindow: () => ScrolledWindow, SearchBar: () => SearchBar, SearchEntry: () => SearchEntry, Separator: () => Separator, ShortcutLabel: () => ShortcutLabel, ShortcutsGroup: () => ShortcutsGroup, ShortcutsSection: () => ShortcutsSection, ShortcutsShortcut: () => ShortcutsShortcut, ShortcutsWindow: () => ShortcutsWindow, SpinButton: () => SpinButton, Spinner: () => Spinner, Stack: () => Stack, StackSidebar: () => StackSidebar, StackSwitcher: () => StackSwitcher, Statusbar: () => Statusbar, Switch: () => Switch, Text: () => Text, TextView: () => TextView, ToggleButton: () => ToggleButton, TreeExpander: () => TreeExpander, TreeView: () => TreeView, Video: () => Video, Viewport: () => Viewport, VolumeButton: () => VolumeButton, Widget: () => Widget, Window: () => Window, WindowControls: () => WindowControls, WindowHandle: () => WindowHandle }); // src/generated/widgets/AboutDialog.tsx var AboutDialog = class extends Window { static createNode() { return new node_gtk_4_0_default.AboutDialog({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "artists": this.node.setArtists(newValue); break; case "authors": this.node.setAuthors(newValue); break; case "comments": this.node.setComments(newValue); break; case "copyright": this.node.setCopyright(newValue); break; case "documenters": this.node.setDocumenters(newValue); break; case "license": this.node.setLicense(newValue); break; case "licenseType": this.node.setLicenseType(newValue); break; case "logo": this.node.setLogo(newValue); break; case "logoIconName": this.node.setLogoIconName(newValue); break; case "programName": this.node.setProgramName(newValue); break; case "systemInformation": this.node.setSystemInformation(newValue); break; case "translatorCredits": this.node.setTranslatorCredits(newValue); break; case "version": this.node.setVersion(newValue); break; case "website": this.node.setWebsite(newValue); break; case "websiteLabel": this.node.setWebsiteLabel(newValue); break; case "wrapLicense": this.node.setWrapLicense(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onActivateLink": this.setHandler("activate-link", newValue); break; case "onNotifyArtists": this.setHandler("notify::artists", newValue); break; case "onNotifyAuthors": this.setHandler("notify::authors", newValue); break; case "onNotifyComments": this.setHandler("notify::comments", newValue); break; case "onNotifyCopyright": this.setHandler("notify::copyright", newValue); break; case "onNotifyDocumenters": this.setHandler("notify::documenters", newValue); break; case "onNotifyLicense": this.setHandler("notify::license", newValue); break; case "onNotifyLicenseType": this.setHandler("notify::licenseType", newValue); break; case "onNotifyLogo": this.setHandler("notify::logo", newValue); break; case "onNotifyLogoIconName": this.setHandler("notify::logoIconName", newValue); break; case "onNotifyProgramName": this.setHandler("notify::programName", newValue); break; case "onNotifySystemInformation": this.setHandler("notify::systemInformation", newValue); break; case "onNotifyTranslatorCredits": this.setHandler("notify::translatorCredits", newValue); break; case "onNotifyVersion": this.setHandler("notify::version", newValue); break; case "onNotifyWebsite": this.setHandler("notify::website", newValue); break; case "onNotifyWebsiteLabel": this.setHandler("notify::websiteLabel", newValue); break; case "onNotifyWrapLicense": this.setHandler("notify::wrapLicense", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; default: break; } } }; // src/generated/widgets/ActionBar.tsx var ActionBar = class extends Widget { static createNode() { return new node_gtk_4_0_default.ActionBar({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "revealed": this.node.setRevealed(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onNotifyRevealed": this.setHandler("notify::revealed", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; default: break; } } }; // src/generated/widgets/AppChooserButton.tsx var AppChooserButton = class extends Widget { static createNode() { return new node_gtk_4_0_default.AppChooserButton({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "heading": this.node.setHeading(newValue); break; case "modal": this.node.setModal(newValue); break; case "showDefaultItem": this.node.setShowDefaultItem(newValue); break; case "showDialogItem": this.node.setShowDialogItem(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onActivate": this.setHandler("activate", newValue); break; case "onChanged": this.setHandler("changed", newValue); break; case "onCustomItemActivated": this.setHandler("custom-item-activated", newValue); break; case "onNotifyHeading": this.setHandler("notify::heading", newValue); break; case "onNotifyModal": this.setHandler("notify::modal", newValue); break; case "onNotifyShowDefaultItem": this.setHandler("notify::showDefaultItem", newValue); break; case "onNotifyShowDialogItem": this.setHandler("notify::showDialogItem", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; case "onNotifyContentType": this.setHandler("notify::contentType", newValue); break; default: break; } } }; // src/generated/widgets/Dialog.tsx var Dialog = class extends Window { static createNode() { return new node_gtk_4_0_default.Dialog({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onClose": this.setHandler("close", newValue); break; case "onResponse": this.setHandler("response", newValue); break; case "onNotifyUseHeaderBar": this.setHandler("notify::useHeaderBar", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; default: break; } } }; // src/generated/widgets/AppChooserDialog.tsx var AppChooserDialog = class extends Dialog { static createNode() { return new node_gtk_4_0_default.AppChooserDialog({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "heading": this.node.setHeading(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onNotifyGfile": this.setHandler("notify::gfile", newValue); break; case "onNotifyHeading": this.setHandler("notify::heading", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; case "onNotifyContentType": this.setHandler("notify::contentType", newValue); break; default: break; } } }; // src/generated/widgets/AppChooserWidget.tsx var AppChooserWidget = class extends Widget { static createNode() { return new node_gtk_4_0_default.AppChooserWidget({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "defaultText": this.node.setDefaultText(newValue); break; case "showAll": this.node.setShowAll(newValue); break; case "showDefault": this.node.setShowDefault(newValue); break; case "showFallback": this.node.setShowFallback(newValue); break; case "showOther": this.node.setShowOther(newValue); break; case "showRecommended": this.node.setShowRecommended(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onApplicationActivated": this.setHandler("application-activated", newValue); break; case "onApplicationSelected": this.setHandler("application-selected", newValue); break; case "onNotifyDefaultText": this.setHandler("notify::defaultText", newValue); break; case "onNotifyShowAll": this.setHandler("notify::showAll", newValue); break; case "onNotifyShowDefault": this.setHandler("notify::showDefault", newValue); break; case "onNotifyShowFallback": this.setHandler("notify::showFallback", newValue); break; case "onNotifyShowOther": this.setHandler("notify::showOther", newValue); break; case "onNotifyShowRecommended": this.setHandler("notify::showRecommended", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; case "onNotifyContentType": this.setHandler("notify::contentType", newValue); break; default: break; } } }; // src/generated/widgets/AspectFrame.tsx var AspectFrame = class extends Widget { static createNode() { return new node_gtk_4_0_default.AspectFrame({}); } appendChild(child) { super.appendChild(child); this.node.setChild(child.node); } removeChild(child) { super.removeChild(child); this.node.setChild(null); } insertBefore(child, beforeChild) { super.insertBefore(child, beforeChild); this.node.setChild(child.node); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "obeyChild": this.node.setObeyChild(newValue); break; case "ratio": this.node.setRatio(newValue); break; case "xalign": this.node.setXalign(newValue); break; case "yalign": this.node.setYalign(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onNotifyChild": this.setHandler("notify::child", newValue); break; case "onNotifyObeyChild": this.setHandler("notify::obeyChild", newValue); break; case "onNotifyRatio": this.setHandler("notify::ratio", newValue); break; case "onNotifyXalign": this.setHandler("notify::xalign", newValue); break; case "onNotifyYalign": this.setHandler("notify::yalign", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; default: break; } } }; // src/generated/widgets/Assistant.tsx var Assistant = class extends Window { static createNode() { return new node_gtk_4_0_default.Assistant({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onApply": this.setHandler("apply", newValue); break; case "onCancel": this.setHandler("cancel", newValue); break; case "onClose": this.setHandler("close", newValue); break; case "onEscape": this.setHandler("escape", newValue); break; case "onPrepare": this.setHandler("prepare", newValue); break; case "onNotifyPages": this.setHandler("notify::pages", newValue); break; case "onNotifyUseHeaderBar": this.setHandler("notify::useHeaderBar", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; default: break; } } }; // src/generated/widgets/Box.tsx var Box = class extends Widget { static createNode() { return new node_gtk_4_0_default.Box({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "baselineChild": this.node.setBaselineChild(newValue); break; case "baselinePosition": this.node.setBaselinePosition(newValue); break; case "homogeneous": this.node.setHomogeneous(newValue); break; case "spacing": this.node.setSpacing(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "orientation": this.node.setOrientation(newValue); break; case "onNotifyBaselineChild": this.setHandler("notify::baselineChild", newValue); break; case "onNotifyBaselinePosition": this.setHandler("notify::baselinePosition", newValue); break; case "onNotifyHomogeneous": this.setHandler("notify::homogeneous", newValue); break; case "onNotifySpacing": this.setHandler("notify::spacing", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; case "onNotifyOrientation": this.setHandler("notify::orientation", newValue); break; default: break; } } }; // src/generated/widgets/Button.tsx var Button = class extends Widget { static createNode() { return new node_gtk_4_0_default.Button({}); } appendChild(child) { super.appendChild(child); this.node.setChild(child.node); } removeChild(child) { super.removeChild(child); this.node.setChild(null); } insertBefore(child, beforeChild) { super.insertBefore(child, beforeChild); this.node.setChild(child.node); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "canShrink": this.node.setCanShrink(newValue); break; case "hasFrame": this.node.setHasFrame(newValue); break; case "iconName": this.node.setIconName(newValue); break; case "label": this.node.setLabel(newValue); break; case "useUnderline": this.node.setUseUnderline(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "actionName": this.node.setActionName(newValue); break; case "actionTarget": this.node.setActionTargetValue(newValue); break; case "onActivate": this.setHandler("activate", newValue); break; case "onClicked": this.setHandler("clicked", newValue); break; case "onNotifyCanShrink": this.setHandler("notify::canShrink", newValue); break; case "onNotifyChild": this.setHandler("notify::child", newValue); break; case "onNotifyHasFrame": this.setHandler("notify::hasFrame", newValue); break; case "onNotifyIconName": this.setHandler("notify::iconName", newValue); break; case "onNotifyLabel": this.setHandler("notify::label", newValue); break; case "onNotifyUseUnderline": this.setHandler("notify::useUnderline", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; case "onNotifyActionName": this.setHandler("notify::actionName", newValue); break; case "onNotifyActionTarget": this.setHandler("notify::actionTarget", newValue); break; default: break; } } }; // src/generated/widgets/Calendar.tsx var Calendar = class extends Widget { static createNode() { return new node_gtk_4_0_default.Calendar({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "day": this.node.setDay(newValue); break; case "month": this.node.setMonth(newValue); break; case "showDayNames": this.node.setShowDayNames(newValue); break; case "showHeading": this.node.setShowHeading(newValue); break; case "showWeekNumbers": this.node.setShowWeekNumbers(newValue); break; case "year": this.node.setYear(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "onDaySelected": this.setHandler("day-selected", newValue); break; case "onNextMonth": this.setHandler("next-month", newValue); break; case "onNextYear": this.setHandler("next-year", newValue); break; case "onPrevMonth": this.setHandler("prev-month", newValue); break; case "onPrevYear": this.setHandler("prev-year", newValue); break; case "onNotifyDay": this.setHandler("notify::day", newValue); break; case "onNotifyMonth": this.setHandler("notify::month", newValue); break; case "onNotifyShowDayNames": this.setHandler("notify::showDayNames", newValue); break; case "onNotifyShowHeading": this.setHandler("notify::showHeading", newValue); break; case "onNotifyShowWeekNumbers": this.setHandler("notify::showWeekNumbers", newValue); break; case "onNotifyYear": this.setHandler("notify::year", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; default: break; } } }; // src/generated/widgets/CellView.tsx var CellView = class extends Widget { static createNode() { return new node_gtk_4_0_default.CellView({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "drawSensitive": this.node.setDrawSensitive(newValue); break; case "fitModel": this.node.setFitModel(newValue); break; case "model": this.node.setModel(newValue); break; case "name": this.node.name = newValue; break; case "accessibleRole": this.node.accessibleRole = newValue; break; case "orientation": this.node.setOrientation(newValue); break; case "onNotifyCellArea": this.setHandler("notify::cellArea", newValue); break; case "onNotifyCellAreaContext": this.setHandler("notify::cellAreaContext", newValue); break; case "onNotifyDrawSensitive": this.setHandler("notify::drawSensitive", newValue); break; case "onNotifyFitModel": this.setHandler("notify::fitModel", newValue); break; case "onNotifyModel": this.setHandler("notify::model", newValue); break; case "onNotifyName": this.setHandler("notify::name", newValue); break; case "onNotifyAccessibleRole": this.setHandler("notify::accessibleRole", newValue); break; case "onNotifyOrientation": this.setHandler("notify::orientation", newValue); break; default: break; } } }; // src/generated/widgets/CenterBox.tsx var CenterBox = class extends Widget { static createNode() { return new node_gtk_4_0_default.CenterBox({}); } set(propName, newValue) { super.set(propName, newValue); switch (propName) { case "baselinePosition": this.node.setBaselinePosition(newValue); break; case "centerWidget": this.node.setCenterWidget(newValue); break; case "endWidget": this.node.setEndWidget(newValue); break; case "shrinkCenterLast": this.node.setShrinkCenterLast(newValue); break; case "startWidget": this.node.setStartWidget(newValue); break; case "name": this.node.name = newValue; break; case