@gjsify/adwaita-nativescript 0.53.0 → 0.55.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 (188) hide show
  1. package/lib/esm/builder/index.js +1 -1
  2. package/lib/esm/builder/template-classes.js +1 -0
  3. package/lib/esm/capabilities.js +1 -0
  4. package/lib/esm/index.js +1 -1
  5. package/lib/esm/namespace/adw.js +1 -1
  6. package/lib/esm/namespace/gtk.js +1 -1
  7. package/lib/esm/widgets/accent-theme.js +1 -1
  8. package/lib/esm/widgets/adw-about-dialog.js +1 -1
  9. package/lib/esm/widgets/adw-accent.js +1 -1
  10. package/lib/esm/widgets/adw-alert-dialog.js +1 -1
  11. package/lib/esm/widgets/adw-application-window.js +1 -0
  12. package/lib/esm/widgets/adw-avatar.js +1 -1
  13. package/lib/esm/widgets/adw-banner.js +1 -1
  14. package/lib/esm/widgets/adw-bin.js +1 -0
  15. package/lib/esm/widgets/adw-button-content.js +1 -1
  16. package/lib/esm/widgets/adw-button-row.js +1 -1
  17. package/lib/esm/widgets/adw-combo-row.js +1 -1
  18. package/lib/esm/widgets/adw-data-grid.js +1 -1
  19. package/lib/esm/widgets/adw-dialog.js +1 -0
  20. package/lib/esm/widgets/adw-entry-row.js +1 -1
  21. package/lib/esm/widgets/adw-expander-row.js +1 -1
  22. package/lib/esm/widgets/adw-navigation-view.js +1 -1
  23. package/lib/esm/widgets/adw-slider-row.js +1 -1
  24. package/lib/esm/widgets/adw-spin-row.js +1 -1
  25. package/lib/esm/widgets/adw-spinner.js +1 -1
  26. package/lib/esm/widgets/adw-split-button.js +1 -1
  27. package/lib/esm/widgets/adw-status-page.js +1 -1
  28. package/lib/esm/widgets/adw-switch-row.js +1 -1
  29. package/lib/esm/widgets/adw-tab-view.js +1 -1
  30. package/lib/esm/widgets/adw-toast-overlay.js +1 -1
  31. package/lib/esm/widgets/adw-toggle-group.js +1 -1
  32. package/lib/esm/widgets/adw-toolbar-view.js +1 -1
  33. package/lib/esm/widgets/adw-view-stack.js +1 -1
  34. package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
  35. package/lib/esm/widgets/adw-window.js +1 -0
  36. package/lib/esm/widgets/adw-wrap-box.js +1 -1
  37. package/lib/esm/widgets/box-layout.js +1 -1
  38. package/lib/esm/widgets/breakpoint.js +1 -1
  39. package/lib/esm/widgets/grid-state.js +1 -0
  40. package/lib/esm/widgets/gtk-box.js +1 -1
  41. package/lib/esm/widgets/gtk-button.js +1 -1
  42. package/lib/esm/widgets/gtk-check-button.js +1 -0
  43. package/lib/esm/widgets/gtk-drawing-area.js +1 -0
  44. package/lib/esm/widgets/gtk-drop-down.js +1 -1
  45. package/lib/esm/widgets/gtk-entry.js +1 -1
  46. package/lib/esm/widgets/gtk-frame.js +1 -0
  47. package/lib/esm/widgets/gtk-grid.js +1 -0
  48. package/lib/esm/widgets/gtk-label.js +1 -1
  49. package/lib/esm/widgets/gtk-list-box.js +1 -0
  50. package/lib/esm/widgets/gtk-menu-button.js +1 -1
  51. package/lib/esm/widgets/gtk-overlay.js +1 -0
  52. package/lib/esm/widgets/gtk-revealer.js +1 -0
  53. package/lib/esm/widgets/gtk-scrolled-window.js +1 -0
  54. package/lib/esm/widgets/gtk-separator.js +1 -0
  55. package/lib/esm/widgets/gtk-stack.js +1 -0
  56. package/lib/esm/widgets/gtk-text-view.js +1 -0
  57. package/lib/esm/widgets/gtk-toggle-button.js +1 -0
  58. package/lib/esm/widgets/host-insets.android.js +1 -1
  59. package/lib/esm/widgets/icon-path.js +1 -1
  60. package/lib/esm/widgets/icon-theme.js +1 -1
  61. package/lib/esm/widgets/index.js +1 -1
  62. package/lib/esm/widgets/list-box-state.js +1 -0
  63. package/lib/esm/widgets/ns-length.js +1 -0
  64. package/lib/esm/widgets/revealer-state.js +1 -0
  65. package/lib/esm/widgets/row-state.js +1 -1
  66. package/lib/esm/widgets/scrolled-window-policy.js +1 -0
  67. package/lib/esm/widgets/single-child-base.js +1 -0
  68. package/lib/esm/widgets/stack-page.js +1 -0
  69. package/lib/esm/widgets/style-classes.js +1 -1
  70. package/lib/esm/widgets/styled-layout-base.js +1 -0
  71. package/lib/esm/widgets/system-bars-source.android.js +1 -0
  72. package/lib/esm/widgets/system-bars-source.ios.js +1 -0
  73. package/lib/esm/widgets/system-bars-source.js +1 -0
  74. package/lib/esm/widgets/system-bars.js +1 -0
  75. package/lib/esm/widgets/transition-type.js +1 -0
  76. package/lib/esm/widgets/view-switcher-base.js +1 -1
  77. package/lib/esm/widgets/widget-layout.js +1 -1
  78. package/lib/esm/widgets/window-base.js +1 -0
  79. package/lib/esm/widgets/window-state.js +1 -0
  80. package/lib/types/builder/index.d.ts +20 -3
  81. package/lib/types/builder/template-classes.d.ts +13 -0
  82. package/lib/types/capabilities.d.ts +2 -0
  83. package/lib/types/construct-vectors.spec.d.ts +1 -0
  84. package/lib/types/containers.spec.d.ts +2 -0
  85. package/lib/types/grid-layout.spec.d.ts +1 -0
  86. package/lib/types/grid-state.spec.d.ts +2 -0
  87. package/lib/types/gtk-box.spec.d.ts +1 -0
  88. package/lib/types/gtk-controls.spec.d.ts +1 -0
  89. package/lib/types/gtk-grid.spec.d.ts +1 -0
  90. package/lib/types/gtk-list-box.spec.d.ts +1 -0
  91. package/lib/types/gtk-stack.spec.d.ts +2 -0
  92. package/lib/types/gtk-toggle-button.spec.d.ts +2 -0
  93. package/lib/types/index.d.ts +1 -1
  94. package/lib/types/list-box-state.spec.d.ts +2 -0
  95. package/lib/types/namespace/adw.d.ts +4 -0
  96. package/lib/types/namespace/gtk.d.ts +13 -0
  97. package/lib/types/ns-length.spec.d.ts +2 -0
  98. package/lib/types/revealer-state.spec.d.ts +2 -0
  99. package/lib/types/scrolled-window-policy.spec.d.ts +2 -0
  100. package/lib/types/system-bars.spec.d.ts +2 -0
  101. package/lib/types/testing/ns-core.d.mts +44 -0
  102. package/lib/types/transition-type.spec.d.ts +2 -0
  103. package/lib/types/widget-base.spec.d.ts +1 -0
  104. package/lib/types/widgets/adw-about-dialog.d.ts +10 -0
  105. package/lib/types/widgets/adw-action-row.d.ts +10 -0
  106. package/lib/types/widgets/adw-alert-dialog.d.ts +10 -0
  107. package/lib/types/widgets/adw-application-window.d.ts +5 -0
  108. package/lib/types/widgets/adw-avatar.d.ts +10 -0
  109. package/lib/types/widgets/adw-banner.d.ts +10 -0
  110. package/lib/types/widgets/adw-bin.d.ts +7 -0
  111. package/lib/types/widgets/adw-bottom-sheet.d.ts +10 -0
  112. package/lib/types/widgets/adw-button-content.d.ts +10 -0
  113. package/lib/types/widgets/adw-carousel.d.ts +10 -0
  114. package/lib/types/widgets/adw-clamp.d.ts +10 -0
  115. package/lib/types/widgets/adw-data-grid.d.ts +10 -0
  116. package/lib/types/widgets/adw-dialog.d.ts +62 -0
  117. package/lib/types/widgets/adw-header-bar.d.ts +10 -0
  118. package/lib/types/widgets/adw-image-button.d.ts +10 -0
  119. package/lib/types/widgets/adw-navigation-page.d.ts +10 -0
  120. package/lib/types/widgets/adw-navigation-view.d.ts +10 -0
  121. package/lib/types/widgets/adw-preferences-dialog.d.ts +10 -0
  122. package/lib/types/widgets/adw-preferences-group.d.ts +10 -0
  123. package/lib/types/widgets/adw-preferences-page.d.ts +10 -0
  124. package/lib/types/widgets/adw-shortcut-label.d.ts +10 -0
  125. package/lib/types/widgets/adw-sidebar.d.ts +10 -0
  126. package/lib/types/widgets/adw-slider-row.d.ts +10 -0
  127. package/lib/types/widgets/adw-spinner.d.ts +10 -0
  128. package/lib/types/widgets/adw-split-button.d.ts +10 -0
  129. package/lib/types/widgets/adw-status-page.d.ts +10 -0
  130. package/lib/types/widgets/adw-tab-view.d.ts +10 -0
  131. package/lib/types/widgets/adw-toast-overlay.d.ts +16 -2
  132. package/lib/types/widgets/adw-toggle-group.d.ts +10 -0
  133. package/lib/types/widgets/adw-toggle.d.ts +10 -0
  134. package/lib/types/widgets/adw-toolbar-view.d.ts +21 -0
  135. package/lib/types/widgets/adw-view-stack.d.ts +23 -0
  136. package/lib/types/widgets/adw-view-switcher-bar.d.ts +10 -0
  137. package/lib/types/widgets/adw-window-title.d.ts +10 -0
  138. package/lib/types/widgets/adw-window.d.ts +5 -0
  139. package/lib/types/widgets/adw-wrap-box.d.ts +10 -0
  140. package/lib/types/widgets/box-layout.d.ts +19 -5
  141. package/lib/types/widgets/breakpoint.d.ts +7 -1
  142. package/lib/types/widgets/carousel-indicator-base.d.ts +10 -0
  143. package/lib/types/widgets/grid-state.d.ts +34 -0
  144. package/lib/types/widgets/gtk-action-bar.d.ts +10 -0
  145. package/lib/types/widgets/gtk-box.d.ts +27 -52
  146. package/lib/types/widgets/gtk-button.d.ts +20 -0
  147. package/lib/types/widgets/gtk-check-button.d.ts +51 -0
  148. package/lib/types/widgets/gtk-drawing-area.d.ts +19 -0
  149. package/lib/types/widgets/gtk-drop-down.d.ts +10 -0
  150. package/lib/types/widgets/gtk-entry.d.ts +10 -0
  151. package/lib/types/widgets/gtk-frame.d.ts +25 -0
  152. package/lib/types/widgets/gtk-grid.d.ts +57 -0
  153. package/lib/types/widgets/gtk-image.d.ts +10 -0
  154. package/lib/types/widgets/gtk-label.d.ts +10 -0
  155. package/lib/types/widgets/gtk-list-box.d.ts +73 -0
  156. package/lib/types/widgets/gtk-overlay.d.ts +17 -0
  157. package/lib/types/widgets/gtk-revealer.d.ts +30 -0
  158. package/lib/types/widgets/gtk-scrolled-window.d.ts +25 -0
  159. package/lib/types/widgets/gtk-separator.d.ts +11 -0
  160. package/lib/types/widgets/gtk-stack.d.ts +124 -0
  161. package/lib/types/widgets/gtk-text-view.d.ts +63 -0
  162. package/lib/types/widgets/gtk-toggle-button.d.ts +33 -0
  163. package/lib/types/widgets/index.d.ts +40 -2
  164. package/lib/types/widgets/list-box-state.d.ts +19 -0
  165. package/lib/types/widgets/ns-length.d.ts +10 -0
  166. package/lib/types/widgets/revealer-state.d.ts +7 -0
  167. package/lib/types/widgets/row-state.d.ts +6 -0
  168. package/lib/types/widgets/scrolled-window-policy.d.ts +17 -0
  169. package/lib/types/widgets/signals.d.ts +10 -0
  170. package/lib/types/widgets/single-child-base.d.ts +22 -0
  171. package/lib/types/widgets/split-view-base.d.ts +10 -0
  172. package/lib/types/widgets/stack-page.d.ts +93 -0
  173. package/lib/types/widgets/style-classes.d.ts +28 -0
  174. package/lib/types/widgets/styled-layout-base.d.ts +63 -0
  175. package/lib/types/widgets/system-bars-source.android.d.ts +2 -0
  176. package/lib/types/widgets/system-bars-source.d.ts +2 -0
  177. package/lib/types/widgets/system-bars-source.ios.d.ts +2 -0
  178. package/lib/types/widgets/system-bars.d.ts +71 -0
  179. package/lib/types/widgets/transition-type.d.ts +13 -0
  180. package/lib/types/widgets/view-stack-page.d.ts +10 -0
  181. package/lib/types/widgets/view-switcher-base.d.ts +10 -0
  182. package/lib/types/widgets/widget-layout.d.ts +23 -0
  183. package/lib/types/widgets/window-base.d.ts +41 -0
  184. package/lib/types/widgets/window-state.d.ts +37 -0
  185. package/lib/types/window-roots.spec.d.ts +1 -0
  186. package/lib/types/window-state.spec.d.ts +2 -0
  187. package/package.json +13 -9
  188. package/src/theme/adwaita.css +273 -40
@@ -19,6 +19,16 @@ declare const GtkButton_base: (abstract new (...args: any[]) => {
19
19
  set marginStart(value: number | string);
20
20
  get marginEnd(): number;
21
21
  set marginEnd(value: number | string);
22
+ get visible(): boolean;
23
+ set visible(value: boolean | string);
24
+ get sensitive(): boolean;
25
+ set sensitive(value: boolean | string);
26
+ get name(): string;
27
+ set name(value: string | null);
28
+ get widthRequest(): number;
29
+ set widthRequest(value: number | string);
30
+ get heightRequest(): number;
31
+ set heightRequest(value: number | string);
22
32
  _emit(eventName: string): void;
23
33
  addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
24
34
  removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
@@ -28,6 +38,8 @@ declare const GtkButton_base: (abstract new (...args: any[]) => {
28
38
  get(name: string): unknown;
29
39
  }) & typeof GridLayout;
30
40
  export declare class GtkButton extends GtkButton_base {
41
+ /** The GTK signals this widget emits through `connect` — read by the shared-tree builder (ADR 0093). */
42
+ static readonly emittedSignals: readonly string[];
31
43
  /**
32
44
  * The names this widget's `_addChildFromBuilder` honours — see `./builder-slots.ts`.
33
45
  * `Gtk.Button:child` is the property a `.blp` writes as `child: Adw.ButtonContent { … }`,
@@ -127,6 +139,14 @@ export declare class GtkButton extends GtkButton_base {
127
139
  /** `gtk_widget_set_css_classes` — REPLACES the list, as in C. */
128
140
  set_css_classes(names: readonly string[]): void;
129
141
  private _setClasses;
142
+ /**
143
+ * Rewrite `className` from the base class, the caller's list and whatever state classes a
144
+ * subclass adds (`Gtk.ToggleButton`'s `checked`) — which are NOT in `styleClasses`, as
145
+ * GTK's `:checked` is a state and never a member of `css-classes`.
146
+ */
147
+ protected _restyle(): void;
148
+ /** The state classes a subclass wears beside the caller's list. A plain button has none. */
149
+ protected _stateClasses(): readonly string[];
130
150
  /**
131
151
  * Put `value` in the single cell under `wrote`'s slot, detaching whatever the previous
132
152
  * slot had parented.
@@ -0,0 +1,51 @@
1
+ import { type View } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
3
+ import { AdwStyledLayoutBase } from './styled-layout-base.js';
4
+ /** Event name emitted when `active` changes. Mirrors `Gtk.CheckButton::toggled`. */
5
+ export declare const GTK_CHECK_BUTTON_TOGGLED = "toggled";
6
+ /** Event name emitted when the button is activated. Mirrors `Gtk.CheckButton::activate`. */
7
+ export declare const GTK_CHECK_BUTTON_ACTIVATE = "activate";
8
+ /** Event name emitted when `active` changes. Mirrors GObject `notify::active`. */
9
+ export declare const NOTIFY_CHECK_ACTIVE = "notify::active";
10
+ /** The state classes the button wears, which the theme turns into the filled indicator. */
11
+ export declare const GTK_CHECK_BUTTON_CHECKED_CLASS = "checked";
12
+ export declare const GTK_CHECK_BUTTON_INCONSISTENT_CLASS = "inconsistent";
13
+ export declare class GtkCheckButton extends AdwStyledLayoutBase {
14
+ static readonly builderSlots: readonly string[];
15
+ private readonly _indicator;
16
+ private readonly _mark;
17
+ private readonly _text;
18
+ private _active;
19
+ private _inconsistent;
20
+ private _label;
21
+ private _useUnderline;
22
+ private _child;
23
+ constructor(props?: ConstructProps<GtkCheckButton>);
24
+ /** `Gtk.CheckButton:active` — whether the box is ticked. Defaults to `false`. */
25
+ get active(): boolean;
26
+ set active(raw: boolean | string);
27
+ /** `Gtk.CheckButton:inconsistent` — the "partly on" dash. Defaults to `false`. */
28
+ get inconsistent(): boolean;
29
+ set inconsistent(raw: boolean | string);
30
+ /** `Gtk.CheckButton:label` — the text beside the box, `null` for none. */
31
+ get label(): string | null;
32
+ set label(value: string | null);
33
+ /** `Gtk.CheckButton:use-underline` — an `_` in the label marks a mnemonic, which is not drawn. */
34
+ get useUnderline(): boolean;
35
+ set useUnderline(raw: boolean | string);
36
+ private _paintLabel;
37
+ /** `Gtk.CheckButton:child` — a widget in place of the text label. */
38
+ get child(): View | null;
39
+ set child(view: View | null);
40
+ set_child(view: View | null): void;
41
+ get_child(): View | null;
42
+ /** `gtk_check_button_get_active`. */
43
+ get_active(): boolean;
44
+ /** `gtk_check_button_set_active`. */
45
+ set_active(active: boolean): void;
46
+ _addChildFromBuilder(_name: string, view: View): void;
47
+ /** The text shows only while there is a label and no child widget replacing it. */
48
+ private _syncContent;
49
+ protected get _ownClass(): string;
50
+ protected _restyle(): void;
51
+ }
@@ -0,0 +1,19 @@
1
+ import { type ConstructProps } from './construct-props.js';
2
+ import { AdwStyledLayoutBase } from './styled-layout-base.js';
3
+ /** What `set_draw_func` says; exported so a caller (and a spec) can recognise it. */
4
+ export declare const DRAWING_AREA_REFUSAL: string;
5
+ export declare class GtkDrawingArea extends AdwStyledLayoutBase {
6
+ private _contentWidth;
7
+ private _contentHeight;
8
+ constructor(props?: ConstructProps<GtkDrawingArea>);
9
+ /** `Gtk.DrawingArea:content-width` — the requested width, `0` for none. */
10
+ get contentWidth(): number;
11
+ set contentWidth(raw: number | string);
12
+ /** `Gtk.DrawingArea:content-height` — the requested height, `0` for none. */
13
+ get contentHeight(): number;
14
+ set contentHeight(raw: number | string);
15
+ /** `gtk_drawing_area_set_draw_func` — refused, see the header. */
16
+ set_draw_func(_drawFunc: unknown): void;
17
+ /** `gtk_widget_queue_draw` — nothing is ever drawn, so there is nothing to redraw. */
18
+ queue_draw(): void;
19
+ }
@@ -28,6 +28,16 @@ declare const GtkDropDown_base: (abstract new (...args: any[]) => {
28
28
  set marginStart(value: number | string);
29
29
  get marginEnd(): number;
30
30
  set marginEnd(value: number | string);
31
+ get visible(): boolean;
32
+ set visible(value: boolean | string);
33
+ get sensitive(): boolean;
34
+ set sensitive(value: boolean | string);
35
+ get name(): string;
36
+ set name(value: string | null);
37
+ get widthRequest(): number;
38
+ set widthRequest(value: number | string);
39
+ get heightRequest(): number;
40
+ set heightRequest(value: number | string);
31
41
  _emit(eventName: string): void;
32
42
  addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
33
43
  removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
@@ -26,6 +26,16 @@ declare const GtkEntry_base: (abstract new (...args: any[]) => {
26
26
  set marginStart(value: number | string);
27
27
  get marginEnd(): number;
28
28
  set marginEnd(value: number | string);
29
+ get visible(): boolean;
30
+ set visible(value: boolean | string);
31
+ get sensitive(): boolean;
32
+ set sensitive(value: boolean | string);
33
+ get name(): string;
34
+ set name(value: string | null);
35
+ get widthRequest(): number;
36
+ set widthRequest(value: number | string);
37
+ get heightRequest(): number;
38
+ set heightRequest(value: number | string);
29
39
  _emit(eventName: string): void;
30
40
  addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
31
41
  removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
@@ -0,0 +1,25 @@
1
+ import { type View } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
3
+ import { AdwStyledLayoutBase } from './styled-layout-base.js';
4
+ export declare class GtkFrame extends AdwStyledLayoutBase {
5
+ static readonly builderSlots: readonly string[];
6
+ private readonly _labelCell;
7
+ private _labelWidget;
8
+ private _label;
9
+ private _child;
10
+ constructor(props?: ConstructProps<GtkFrame>);
11
+ /** `Gtk.Frame:label` — the text above the border, `null` for none. */
12
+ get label(): string | null;
13
+ set label(value: string | null);
14
+ /** `Gtk.Frame:label-widget` — a widget in place of the text label. */
15
+ get labelWidget(): View | null;
16
+ set labelWidget(view: View | null);
17
+ set_label_widget(view: View | null): void;
18
+ /** `Gtk.Frame:child`. */
19
+ get child(): View | null;
20
+ set child(view: View | null);
21
+ set_child(view: View | null): void;
22
+ get_child(): View | null;
23
+ _addChildFromBuilder(name: string, view: View): void;
24
+ protected get _ownClass(): string;
25
+ }
@@ -0,0 +1,57 @@
1
+ import { type View } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
3
+ import { AdwStyledLayoutBase } from './styled-layout-base.js';
4
+ export declare class GtkGrid extends AdwStyledLayoutBase {
5
+ private _rowSpacing;
6
+ private _columnSpacing;
7
+ private _rowHomogeneous;
8
+ private _columnHomogeneous;
9
+ private _columnKey;
10
+ private _rowKey;
11
+ private readonly _gaps;
12
+ private readonly _followers;
13
+ constructor(props?: ConstructProps<GtkGrid>);
14
+ /**
15
+ * Put `child` in the grid at `(column, row)`, spanning `width` columns and `height` rows
16
+ * — `gtk_grid_attach`.
17
+ */
18
+ attach(child: View, column: number, row: number, width?: number, height?: number): void;
19
+ /** `gtk_grid_remove`. */
20
+ remove(child: View): void;
21
+ /** `gtk_grid_get_child_at` — the child covering `(column, row)`, or `null`. */
22
+ get_child_at(column: number, row: number): View | null;
23
+ /**
24
+ * Every path a child can enter by — `attach()`, a direct `addChild()`, and XML
25
+ * inflation through `_addChildFromBuilder` — ends here, so the tracks and the gaps
26
+ * are derived here.
27
+ */
28
+ addChild(view: View): void;
29
+ insertChild(child: View, atIndex: number): void;
30
+ removeChild(view: View): void;
31
+ /** `Gtk.Grid:row-spacing` — the gap between rows, in DIPs. */
32
+ get rowSpacing(): number;
33
+ set rowSpacing(value: number | string);
34
+ /** `Gtk.Grid:column-spacing` — the gap between columns, in DIPs. */
35
+ get columnSpacing(): number;
36
+ set columnSpacing(value: number | string);
37
+ /** `Gtk.Grid:row-homogeneous` — every row the same height (`*` tracks). */
38
+ get rowHomogeneous(): boolean;
39
+ set rowHomogeneous(value: boolean | string);
40
+ /** `Gtk.Grid:column-homogeneous` — every column the same width (`*` tracks). */
41
+ get columnHomogeneous(): boolean;
42
+ set columnHomogeneous(value: boolean | string);
43
+ private _childViews;
44
+ private _placementOf;
45
+ private _placed;
46
+ /** Re-derive the tracks when a child moves after it was added. */
47
+ private _follow;
48
+ private _unfollow;
49
+ /** Make the margin carry `next` of this grid's gap, in place of whatever share it had. */
50
+ private _withGap;
51
+ private _relayout;
52
+ /**
53
+ * Rebuild a track list only when it differs: removing and re-adding every `ItemSpec`
54
+ * makes the platform re-measure, which is wasted on a grid that did not change shape.
55
+ */
56
+ private _syncTracks;
57
+ }
@@ -26,6 +26,16 @@ declare const GtkImage_base: (abstract new (...args: any[]) => {
26
26
  set marginStart(value: number | string);
27
27
  get marginEnd(): number;
28
28
  set marginEnd(value: number | string);
29
+ get visible(): boolean;
30
+ set visible(value: boolean | string);
31
+ get sensitive(): boolean;
32
+ set sensitive(value: boolean | string);
33
+ get name(): string;
34
+ set name(value: string | null);
35
+ get widthRequest(): number;
36
+ set widthRequest(value: number | string);
37
+ get heightRequest(): number;
38
+ set heightRequest(value: number | string);
29
39
  _emit(eventName: string): void;
30
40
  addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
31
41
  removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
@@ -16,6 +16,16 @@ declare const GtkLabel_base: (abstract new (...args: any[]) => {
16
16
  set marginStart(value: number | string);
17
17
  get marginEnd(): number;
18
18
  set marginEnd(value: number | string);
19
+ get visible(): boolean;
20
+ set visible(value: boolean | string);
21
+ get sensitive(): boolean;
22
+ set sensitive(value: boolean | string);
23
+ get name(): string;
24
+ set name(value: string | null);
25
+ get widthRequest(): number;
26
+ set widthRequest(value: number | string);
27
+ get heightRequest(): number;
28
+ set heightRequest(value: number | string);
19
29
  _emit(eventName: string): void;
20
30
  addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
21
31
  removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
@@ -0,0 +1,73 @@
1
+ import { type EventData, type View } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
3
+ import { type GtkSelectionModeNick } from './list-box-state.js';
4
+ import { AdwStyledLayoutBase } from './styled-layout-base.js';
5
+ /** `GtkListBox::row-activated`, payload `{ row }`. */
6
+ export declare const LIST_BOX_ROW_ACTIVATED = "row-activated";
7
+ /** `GtkListBox::row-selected`, payload `{ row }` — the first selected row, or `null`. */
8
+ export declare const LIST_BOX_ROW_SELECTED = "row-selected";
9
+ /** The class a selected row wears. */
10
+ export declare const LIST_ROW_SELECTED_CLASS = "adw-list-row-selected";
11
+ /** What `row-activated` / `row-selected` carry beside the usual event fields. */
12
+ export interface ListBoxRowEventData extends EventData {
13
+ row: View | null;
14
+ }
15
+ export declare class GtkListBox extends AdwStyledLayoutBase {
16
+ private _selectionMode;
17
+ private _activateOnSingleClick;
18
+ private _showSeparators;
19
+ private _acceptUnpairedRelease;
20
+ private _selected;
21
+ private readonly _listeners;
22
+ constructor(props?: ConstructProps<GtkListBox>);
23
+ /** Add a row at the end — `gtk_list_box_append`. */
24
+ append(row: View): void;
25
+ /** Add a row at the start — `gtk_list_box_prepend`. */
26
+ prepend(row: View): void;
27
+ /** Add a row at `position`; a negative or too-large one appends — `gtk_list_box_insert`. */
28
+ insert(row: View, position: number): void;
29
+ /** `gtk_list_box_remove`. */
30
+ remove(row: View): void;
31
+ /** `gtk_list_box_remove_all`. */
32
+ remove_all(): void;
33
+ /** `gtk_list_box_get_row_at_index`, or `null` past either end. */
34
+ get_row_at_index(index: number): View | null;
35
+ /** Every path a row can enter by ends here, so the rows are numbered here. */
36
+ addChild(view: View): void;
37
+ insertChild(child: View, atIndex: number): void;
38
+ removeChild(view: View): void;
39
+ /** XML inflation — every child is a row, whatever slot it names. */
40
+ _addChildFromBuilder(_name: string, view: View): void;
41
+ /** `gtk_list_box_get_selected_row` — the first selected row, or `null`. */
42
+ get_selected_row(): View | null;
43
+ /** `gtk_list_box_get_selected_rows`, in list order. */
44
+ get_selected_rows(): View[];
45
+ /** `gtk_list_box_select_row`; `null` unselects everything, as in C. */
46
+ select_row(row: View | null): void;
47
+ /** `gtk_list_box_unselect_row`. */
48
+ unselect_row(row: View): void;
49
+ /** `gtk_list_box_select_all` — only in `multiple`, as C warns otherwise. */
50
+ select_all(): void;
51
+ /** `gtk_list_box_unselect_all`. */
52
+ unselect_all(): void;
53
+ /** `Gtk.ListBox:selection-mode` — a `Gtk.SelectionMode` nick, default `single`. */
54
+ get selectionMode(): GtkSelectionModeNick;
55
+ set selectionMode(value: GtkSelectionModeNick);
56
+ /** `Gtk.ListBox:activate-on-single-click` — held; see the file header. */
57
+ get activateOnSingleClick(): boolean;
58
+ set activateOnSingleClick(value: boolean | string);
59
+ /** `Gtk.ListBox:show-separators` — held; the boxed list's rows draw their own. */
60
+ get showSeparators(): boolean;
61
+ set showSeparators(value: boolean | string);
62
+ /** `Gtk.ListBox:accept-unpaired-release` — held; a touch platform has no unpaired release. */
63
+ get acceptUnpairedRelease(): boolean;
64
+ set acceptUnpairedRelease(value: boolean | string);
65
+ private _rowViews;
66
+ /** Number the rows, one `auto` track each, and flag the first. */
67
+ private _renumber;
68
+ private _adopt;
69
+ private _release;
70
+ private _tapped;
71
+ private _activated;
72
+ private _setSelected;
73
+ }
@@ -0,0 +1,17 @@
1
+ import { type View } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
3
+ import { AdwSingleChildBase } from './single-child-base.js';
4
+ export declare class GtkOverlay extends AdwSingleChildBase {
5
+ /** `child` and the `[overlay]` internal-child type; a bare child is the main child. */
6
+ static readonly builderSlots: readonly string[];
7
+ private readonly _overlays;
8
+ constructor(props?: ConstructProps<GtkOverlay>);
9
+ /** Stack `view` above everything already in the overlay — `gtk_overlay_add_overlay`. */
10
+ add_overlay(view: View): void;
11
+ /** `gtk_overlay_remove_overlay`. A view that is not an overlay of this one is left alone. */
12
+ remove_overlay(view: View): void;
13
+ /** The overlays, bottom to top. */
14
+ get overlays(): readonly View[];
15
+ /** XML inflation — `overlay` stacks the view, anything else is the main child. */
16
+ _addChildFromBuilder(name: string, view: View): void;
17
+ }
@@ -0,0 +1,30 @@
1
+ import type { View } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
3
+ import { AdwSingleChildBase } from './single-child-base.js';
4
+ import { type GtkRevealerTransitionNick } from './transition-type.js';
5
+ /** Event name emitted when `reveal-child` changes. Mirrors GObject `notify::reveal-child`. */
6
+ export declare const NOTIFY_REVEAL_CHILD = "notify::reveal-child";
7
+ export declare class GtkRevealer extends AdwSingleChildBase {
8
+ /** `Gtk.Revealer:child` is the one destination, so it is also the fallback. */
9
+ static readonly builderSlots: readonly string[];
10
+ private _revealChild;
11
+ private _transitionType;
12
+ private _transitionDuration;
13
+ constructor(props?: ConstructProps<GtkRevealer>);
14
+ /** `Gtk.Revealer:reveal-child` — whether the child is shown. Defaults to `false`, as in C. */
15
+ get revealChild(): boolean;
16
+ set revealChild(raw: boolean | string);
17
+ /**
18
+ * `Gtk.Revealer:child-revealed` — whether the child is FULLY shown. With no animation
19
+ * there is no in-between, so it answers {@link revealChild} at once.
20
+ */
21
+ get childRevealed(): boolean;
22
+ /** `Gtk.Revealer:transition-type` — held and validated, never rendered (see the header). */
23
+ get transitionType(): GtkRevealerTransitionNick;
24
+ set transitionType(value: GtkRevealerTransitionNick);
25
+ /** `Gtk.Revealer:transition-duration`, in ms — held, never rendered. */
26
+ get transitionDuration(): number;
27
+ set transitionDuration(raw: number | string);
28
+ protected _adopt(view: View): void;
29
+ private _applyReveal;
30
+ }
@@ -0,0 +1,25 @@
1
+ import { type View } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
3
+ import { type GtkPolicyNick } from './scrolled-window-policy.js';
4
+ import { AdwSingleChildBase } from './single-child-base.js';
5
+ export declare class GtkScrolledWindow extends AdwSingleChildBase {
6
+ /** `Gtk.ScrolledWindow:child` is the one destination, so it is also the fallback. */
7
+ static readonly builderSlots: readonly string[];
8
+ private readonly _scroll;
9
+ private _hscrollbarPolicy;
10
+ private _vscrollbarPolicy;
11
+ private _hasFrame;
12
+ constructor(props?: ConstructProps<GtkScrolledWindow>);
13
+ /** `Gtk.ScrolledWindow:hscrollbar-policy` — a `Gtk.PolicyType`; defaults to `automatic`. */
14
+ get hscrollbarPolicy(): GtkPolicyNick;
15
+ set hscrollbarPolicy(value: GtkPolicyNick);
16
+ /** `Gtk.ScrolledWindow:vscrollbar-policy` — a `Gtk.PolicyType`; defaults to `automatic`. */
17
+ get vscrollbarPolicy(): GtkPolicyNick;
18
+ set vscrollbarPolicy(value: GtkPolicyNick);
19
+ /** `Gtk.ScrolledWindow:has-frame` — held and read back; no frame is drawn (see the header). */
20
+ get hasFrame(): boolean;
21
+ set hasFrame(raw: boolean | string);
22
+ protected _adopt(view: View): void;
23
+ protected _release(_view: View): void;
24
+ private _applyOrientation;
25
+ }
@@ -0,0 +1,11 @@
1
+ import { type ConstructProps } from './construct-props.js';
2
+ import type { BoxOrientation } from './box-layout.js';
3
+ import { AdwStyledLayoutBase } from './styled-layout-base.js';
4
+ export declare class GtkSeparator extends AdwStyledLayoutBase {
5
+ private _orientation;
6
+ constructor(props?: ConstructProps<GtkSeparator>);
7
+ /** `Gtk.Orientable:orientation` — `horizontal` (the default) or `vertical`. */
8
+ get orientation(): BoxOrientation;
9
+ set orientation(value: BoxOrientation);
10
+ protected get _ownClass(): string;
11
+ }
@@ -0,0 +1,124 @@
1
+ import { GridLayout, type EventData, type View } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
3
+ import { GtkStackPage } from './stack-page.js';
4
+ import { type AdwStyleClassesInput } from './style-classes.js';
5
+ import { type GtkStackTransitionNick } from './transition-type.js';
6
+ import { type AdwViewStackPageInfo, type ViewStackNotifyPayload } from './view-stack-state.js';
7
+ /** Event name emitted when the visible child changes. Mirrors GObject `notify::visible-child`. */
8
+ export declare const NOTIFY_STACK_VISIBLE_CHILD = "notify::visible-child";
9
+ /** Mirrors GObject `notify::visible-child-name`; fired together with the one above. */
10
+ export declare const NOTIFY_STACK_VISIBLE_CHILD_NAME = "notify::visible-child-name";
11
+ /** Payload of both events. `index` is `-1` and `name`/`title` are `''` when nothing is selected. */
12
+ export interface NotifyStackVisibleChildEventData extends EventData, ViewStackNotifyPayload {
13
+ }
14
+ declare const GtkStack_base: (abstract new (...args: any[]) => {
15
+ connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
16
+ disconnect(handlerId: number): void;
17
+ get halign(): string;
18
+ set halign(value: string | number);
19
+ get valign(): string;
20
+ set valign(value: string | number);
21
+ get hexpand(): boolean;
22
+ set hexpand(value: boolean | string);
23
+ get vexpand(): boolean;
24
+ set vexpand(value: boolean | string);
25
+ get marginStart(): number;
26
+ set marginStart(value: number | string);
27
+ get marginEnd(): number;
28
+ set marginEnd(value: number | string);
29
+ get visible(): boolean;
30
+ set visible(value: boolean | string);
31
+ get sensitive(): boolean;
32
+ set sensitive(value: boolean | string);
33
+ get name(): string;
34
+ set name(value: string | null);
35
+ get widthRequest(): number;
36
+ set widthRequest(value: number | string);
37
+ get heightRequest(): number;
38
+ set heightRequest(value: number | string);
39
+ _emit(eventName: string): void;
40
+ addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
41
+ removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
42
+ notify<T extends EventData>(data: T): void;
43
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
44
+ set(name: string, value: unknown): void;
45
+ get(name: string): unknown;
46
+ }) & typeof GridLayout;
47
+ export declare class GtkStack extends GtkStack_base {
48
+ /**
49
+ * No named placement: a stack's XML children are its pages, in order, as GtkBuildable's
50
+ * untyped `<child>` is. An empty list so the builder refuses an authored slot by name.
51
+ */
52
+ static readonly builderSlots: readonly string[];
53
+ private readonly _state;
54
+ private readonly _style;
55
+ private _transitionType;
56
+ private _transitionDuration;
57
+ private _hhomogeneous;
58
+ private _vhomogeneous;
59
+ private _interpolateSize;
60
+ constructor(props?: ConstructProps<GtkStack>);
61
+ /** `gtk_stack_add_named` — a page with a name. Returns the page handle. */
62
+ add_named(child: View, name: string | null): AdwViewStackPageInfo;
63
+ /** `gtk_stack_add_titled`. */
64
+ add_titled(child: View, name: string | null, title: string): AdwViewStackPageInfo;
65
+ /** `gtk_stack_add_child` — a page with no name. */
66
+ add_child(child: View): AdwViewStackPageInfo;
67
+ /**
68
+ * `gtk_stack_remove`. Returns whether anything was removed. A removed visible page leaves
69
+ * the stack showing nothing and emits no event (`gtk_stack_remove` clears the visible
70
+ * child without re-picking).
71
+ */
72
+ remove(child: View): boolean;
73
+ /** `gtk_stack_get_child_by_name` — the child of the page called `name`, or `null`. */
74
+ get_child_by_name(name: string): View | null;
75
+ /**
76
+ * Show or hide a page (`GtkStackPage:visible`). Returns whether the SELECTION moved:
77
+ * hiding the visible page falls back to the next visible one.
78
+ */
79
+ setPageVisible(name: string, visible: boolean): boolean;
80
+ /**
81
+ * An XML child — a {@link GtkStackPage} record adds its child under the record's name and
82
+ * title; any other view is a page with no name (`gtk_stack_buildable_add_child`).
83
+ */
84
+ _addChildFromBuilder(_name: string, view: View | GtkStackPage): void;
85
+ /** `Gtk.Stack:visible-child-name` — the visible page's name; `null` for none or an unnamed page. */
86
+ get visibleChildName(): string | null;
87
+ set visibleChildName(name: string | null | undefined);
88
+ /** `Gtk.Stack:visible-child` — the visible page's child, or `null`. */
89
+ get visibleChild(): View | null;
90
+ set visibleChild(child: View | null);
91
+ /** `Gtk.Stack:transition-type` — held and validated, never rendered. */
92
+ get transitionType(): GtkStackTransitionNick;
93
+ set transitionType(value: GtkStackTransitionNick);
94
+ /** `Gtk.Stack:transition-duration`, in ms — held, never rendered. */
95
+ get transitionDuration(): number;
96
+ set transitionDuration(raw: number | string);
97
+ /** `Gtk.Stack:hhomogeneous`. */
98
+ get hhomogeneous(): boolean;
99
+ set hhomogeneous(raw: boolean | string);
100
+ /** `Gtk.Stack:vhomogeneous`. */
101
+ get vhomogeneous(): boolean;
102
+ set vhomogeneous(raw: boolean | string);
103
+ /** `Gtk.Stack:interpolate-size`. */
104
+ get interpolateSize(): boolean;
105
+ set interpolateSize(raw: boolean | string);
106
+ /** `GtkWidget:css-classes`, spelled `styleClasses` (`style-classes.ts`). */
107
+ get styleClasses(): string[];
108
+ set styleClasses(value: AdwStyleClassesInput);
109
+ /** `gtk_widget_add_css_class`. */
110
+ add_css_class(name: string): void;
111
+ /** `gtk_widget_remove_css_class`. */
112
+ remove_css_class(name: string): void;
113
+ /** `gtk_widget_has_css_class`. */
114
+ has_css_class(name: string): boolean;
115
+ /** `gtk_widget_get_css_classes`. */
116
+ get_css_classes(): string[];
117
+ /** `gtk_widget_set_css_classes` — REPLACES the list. */
118
+ set_css_classes(names: readonly string[]): void;
119
+ private _restyle;
120
+ private _add;
121
+ /** Put a page's view into the one cell and let the selection decide what shows. */
122
+ private _place;
123
+ }
124
+ export {};
@@ -0,0 +1,63 @@
1
+ import { GridLayout, TextView, type EventData } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
3
+ /** Event name emitted when {@link GtkTextView.text} changes. Mirrors `notify::text`. */
4
+ export declare const NOTIFY_TEXT_VIEW_TEXT = "notify::text";
5
+ /** `Gtk.WrapMode`'s nicks, in the enum's order (NONE=0 … WORD_CHAR=3). */
6
+ export declare const GTK_WRAP_MODES: readonly ["none", "char", "word", "word-char"];
7
+ export type GtkWrapModeNick = (typeof GTK_WRAP_MODES)[number];
8
+ declare const GtkTextView_base: (abstract new (...args: any[]) => {
9
+ connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => void): number;
10
+ disconnect(handlerId: number): void;
11
+ get halign(): string;
12
+ set halign(value: string | number);
13
+ get valign(): string;
14
+ set valign(value: string | number);
15
+ get hexpand(): boolean;
16
+ set hexpand(value: boolean | string);
17
+ get vexpand(): boolean;
18
+ set vexpand(value: boolean | string);
19
+ get marginStart(): number;
20
+ set marginStart(value: number | string);
21
+ get marginEnd(): number;
22
+ set marginEnd(value: number | string);
23
+ get visible(): boolean;
24
+ set visible(value: boolean | string);
25
+ get sensitive(): boolean;
26
+ set sensitive(value: boolean | string);
27
+ get name(): string;
28
+ set name(value: string | null);
29
+ get widthRequest(): number;
30
+ set widthRequest(value: number | string);
31
+ get heightRequest(): number;
32
+ set heightRequest(value: number | string);
33
+ _emit(eventName: string): void;
34
+ addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
35
+ removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
36
+ notify<T extends EventData>(data: T): void;
37
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
38
+ set(name: string, value: unknown): void;
39
+ get(name: string): unknown;
40
+ }) & typeof GridLayout;
41
+ export declare class GtkTextView extends GtkTextView_base {
42
+ protected readonly _field: TextView;
43
+ private _text;
44
+ private _monospace;
45
+ private _wrapMode;
46
+ constructor(props?: ConstructProps<GtkTextView>);
47
+ private _applyText;
48
+ /** The whole text — the port's stand-in for the `Gtk.TextBuffer`. */
49
+ get text(): string;
50
+ set text(value: string);
51
+ /** `Gtk.TextView:editable`. */
52
+ get editable(): boolean;
53
+ set editable(raw: boolean | string);
54
+ /** `Gtk.TextView:monospace`. */
55
+ get monospace(): boolean;
56
+ set monospace(raw: boolean | string);
57
+ /** `Gtk.TextView:wrap-mode` — held and read back; the platform always wraps. */
58
+ get wrapMode(): GtkWrapModeNick;
59
+ set wrapMode(value: GtkWrapModeNick);
60
+ /** The inner `TextView` — for focus, selection and host-specific keyboard options. */
61
+ get field(): TextView;
62
+ }
63
+ export {};
@@ -0,0 +1,33 @@
1
+ import { type ConstructProps } from './construct-props.js';
2
+ import { GtkButton } from './gtk-button.js';
3
+ /** Event name emitted when `active` changes. Mirrors `Gtk.ToggleButton::toggled`. */
4
+ export declare const GTK_TOGGLE_BUTTON_TOGGLED = "toggled";
5
+ /** Event name emitted when `active` changes. Mirrors GObject `notify::active`. */
6
+ export declare const NOTIFY_TOGGLE_ACTIVE = "notify::active";
7
+ /** The class a pressed-in toggle button wears, which the theme gives the pressed shade. */
8
+ export declare const GTK_TOGGLE_BUTTON_CHECKED_CLASS = "checked";
9
+ /** Event name emitted when `group` changes. Mirrors GObject `notify::group`. */
10
+ export declare const NOTIFY_TOGGLE_GROUP = "notify::group";
11
+ export declare class GtkToggleButton extends GtkButton {
12
+ static readonly emittedSignals: readonly string[];
13
+ private _active;
14
+ private _groupNext;
15
+ private _groupPrev;
16
+ constructor(props?: ConstructProps<GtkToggleButton>);
17
+ /** `Gtk.ToggleButton:active` — whether the button is pressed in. Defaults to `false`. */
18
+ get active(): boolean;
19
+ set active(raw: boolean | string);
20
+ /**
21
+ * `Gtk.ToggleButton:group` — the button this one joins, or `null` to leave the group.
22
+ * Write-only, as `G_PARAM_WRITABLE` has it.
23
+ */
24
+ set group(value: GtkToggleButton | null);
25
+ private get _grouped();
26
+ /** `gtk_toggle_button_set_group` — insert this button directly BEFORE `group`, or unlink it. */
27
+ private _setGroup;
28
+ /** Release every OTHER member: walk back to the first, then forwards (:426-434). */
29
+ private _clearGroup;
30
+ /** Walk back to the first member of a toggle group, bounded like GTK. */
31
+ private static _groupHead;
32
+ protected _stateClasses(): readonly string[];
33
+ }