@gjsify/adwaita-nativescript 0.54.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
@@ -22,8 +22,44 @@ export { GtkButton, GTK_BUTTON_CLICKED, GTK_BUTTON_LABEL_CLASS } from './gtk-but
22
22
  export { buttonSlotAfterWrite, buttonSlotDetaches } from './button-slot.js';
23
23
  export type { ButtonSlot, ButtonSlotWrite } from './button-slot.js';
24
24
  export { GtkBox, DEFAULT_BOX_SPACING } from './gtk-box.js';
25
+ export { GtkGrid } from './gtk-grid.js';
26
+ export { gridChildAt, gridGap, gridSpacing, gridTrackCounts } from './grid-state.js';
27
+ export type { GridPlacement } from './grid-state.js';
28
+ export { GtkListBox, LIST_BOX_ROW_ACTIVATED, LIST_BOX_ROW_SELECTED, LIST_ROW_SELECTED_CLASS } from './gtk-list-box.js';
29
+ export type { ListBoxRowEventData } from './gtk-list-box.js';
30
+ export { DEFAULT_LIST_SELECTION_MODE, GTK_SELECTION_MODES, selectionAfterModeChange, selectionAfterTap, selectionMode, } from './list-box-state.js';
31
+ export type { GtkSelectionModeNick } from './list-box-state.js';
32
+ export { AdwWindow } from './adw-window.js';
33
+ export { AdwApplicationWindow } from './adw-application-window.js';
34
+ export { AdwWindowBase, ADW_WINDOW_CLASS } from './window-base.js';
35
+ export { AdwDialog, ADW_DIALOG_CLASS, ADW_DIALOG_CLOSED, ADW_DIALOG_CLOSE_ATTEMPT } from './adw-dialog.js';
36
+ export { ADW_DIALOG_PRESENTATION_MODES, DEFAULT_DIALOG_PRESENTATION_MODE, dialogPresentationMode, findDialogHost, surfaceSize, } from './window-state.js';
37
+ export type { AdwDialogPresentationNick, DialogHost } from './window-state.js';
38
+ export { NOTIFY_HEXPAND, NOTIFY_VEXPAND } from './widget-layout.js';
39
+ export { lengthValue } from './ns-length.js';
40
+ export type { NsLength } from './ns-length.js';
25
41
  export { GtkActionBar } from './gtk-action-bar.js';
26
- export { boxChildMargin, boxSpacingChanges, normalizeBoxSpacing } from './box-layout.js';
42
+ export { AdwBin } from './adw-bin.js';
43
+ export { GtkOverlay } from './gtk-overlay.js';
44
+ export { GtkRevealer, NOTIFY_REVEAL_CHILD } from './gtk-revealer.js';
45
+ export { revealerChildVisibility } from './revealer-state.js';
46
+ export type { RevealerChildVisibility } from './revealer-state.js';
47
+ export { GtkScrolledWindow } from './gtk-scrolled-window.js';
48
+ export { DEFAULT_SCROLLBAR_POLICY, GTK_POLICY_TYPES, normalizePolicy, policyScrolls, scrollOrientationFor, } from './scrolled-window-policy.js';
49
+ export type { GtkPolicyNick } from './scrolled-window-policy.js';
50
+ export { GtkStack, NOTIFY_STACK_VISIBLE_CHILD, NOTIFY_STACK_VISIBLE_CHILD_NAME } from './gtk-stack.js';
51
+ export type { NotifyStackVisibleChildEventData } from './gtk-stack.js';
52
+ export { GtkStackPage } from './stack-page.js';
53
+ export { DEFAULT_REVEALER_TRANSITION_DURATION, DEFAULT_STACK_TRANSITION_DURATION, GTK_REVEALER_TRANSITIONS, GTK_STACK_TRANSITIONS, transitionNick, } from './transition-type.js';
54
+ export type { GtkRevealerTransitionNick, GtkStackTransitionNick } from './transition-type.js';
55
+ export { GtkToggleButton, GTK_TOGGLE_BUTTON_CHECKED_CLASS, GTK_TOGGLE_BUTTON_TOGGLED, NOTIFY_TOGGLE_ACTIVE, } from './gtk-toggle-button.js';
56
+ export { GtkCheckButton, GTK_CHECK_BUTTON_ACTIVATE, GTK_CHECK_BUTTON_CHECKED_CLASS, GTK_CHECK_BUTTON_INCONSISTENT_CLASS, GTK_CHECK_BUTTON_TOGGLED, NOTIFY_CHECK_ACTIVE, } from './gtk-check-button.js';
57
+ export { GtkDrawingArea, DRAWING_AREA_REFUSAL } from './gtk-drawing-area.js';
58
+ export { GtkFrame } from './gtk-frame.js';
59
+ export { GtkSeparator } from './gtk-separator.js';
60
+ export { GtkTextView, GTK_WRAP_MODES, NOTIFY_TEXT_VIEW_TEXT } from './gtk-text-view.js';
61
+ export type { GtkWrapModeNick } from './gtk-text-view.js';
62
+ export { boxChildTrack, boxSpacingChanges, boxTrackPlan, normalizeBoxSpacing } from './box-layout.js';
27
63
  export type { BoxOrientation } from './box-layout.js';
28
64
  export { GtkLabel } from './gtk-label.js';
29
65
  export { labelDisplayText, labelMarkupIsUnparseable } from '@gjsify/adwaita-core';
@@ -112,7 +148,7 @@ export { ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, extract
112
148
  export type { IconPath, SymbolicIconOptions } from './icons.js';
113
149
  export { adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, } from './color-scheme.js';
114
150
  export type { AdwColorScheme } from './color-scheme.js';
115
- export { AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition } from './breakpoint.js';
151
+ export { AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, observeViewSize, parseBreakpointCondition, } from './breakpoint.js';
116
152
  export type { AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './breakpoint.js';
117
153
  /**
118
154
  * Register all Adwaita widgets as UNPREFIXED NativeScript XML elements, where a
@@ -131,3 +167,5 @@ export type { AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup,
131
167
  * does before writing `<AdwSwitchRow>` in markup.
132
168
  */
133
169
  export declare function registerAdwaitaElements(): void;
170
+ export { configureSystemBars, systemBarsConfig, WINDOW_BACKGROUND } from './system-bars.js';
171
+ export type { BarIcons, SystemBarEdges, SystemBarsOptions, ResolvedSystemBars } from './system-bars.js';
@@ -0,0 +1,19 @@
1
+ export declare const GTK_SELECTION_MODES: readonly ["none", "single", "browse", "multiple"];
2
+ export type GtkSelectionModeNick = (typeof GTK_SELECTION_MODES)[number];
3
+ /** `GtkListBox:selection-mode` default. */
4
+ export declare const DEFAULT_LIST_SELECTION_MODE: GtkSelectionModeNick;
5
+ /** The selection mode a write means — a nick or the constant — or throw naming the members. */
6
+ export declare function selectionMode(value: unknown): GtkSelectionModeNick;
7
+ /**
8
+ * The rows selected after `row` was tapped.
9
+ *
10
+ * `none` selects nothing; `single` and `browse` select the tapped row and drop the rest
11
+ * (`browse` additionally never lets the last one go, which a tap cannot do anyway);
12
+ * `multiple` toggles it, which is what a click on an already-selected row does there.
13
+ */
14
+ export declare function selectionAfterTap<Row>(mode: GtkSelectionModeNick, selected: readonly Row[], row: Row): Row[];
15
+ /**
16
+ * The rows still selected after the mode changed — `gtk_list_box_set_selection_mode` drops
17
+ * every selection for `none`, and for a mode that holds one row when several were selected.
18
+ */
19
+ export declare function selectionAfterModeChange<Row>(mode: GtkSelectionModeNick, selected: readonly Row[]): Row[];
@@ -0,0 +1,10 @@
1
+ /** A length as NativeScript hands it back: a number, a CSS-ish string, or `{ value, unit }`. */
2
+ export type NsLength = number | string | {
3
+ value: number;
4
+ unit?: string;
5
+ } | null | undefined;
6
+ /**
7
+ * The number of DIPs `length` is, or `null` when it is not a plain length — `auto`, a
8
+ * percentage, an unparseable string, nothing.
9
+ */
10
+ export declare function lengthValue(length: NsLength): number | null;
@@ -0,0 +1,7 @@
1
+ /** The two `View.visibility` values a revealed child ever takes. */
2
+ export type RevealerChildVisibility = 'visible' | 'collapse';
3
+ /**
4
+ * The `visibility` a child takes for `reveal-child`. `collapse`, not `hidden`: GTK's
5
+ * unrevealed child contributes zero size, and `hidden` keeps the view's space.
6
+ */
7
+ export declare function revealerChildVisibility(revealChild: boolean): RevealerChildVisibility;
@@ -11,6 +11,12 @@ export type NsVisibility = 'visible' | 'collapse';
11
11
  * behind — the one thing the binding exists to prevent.
12
12
  */
13
13
  export declare function nsVisibility(shown: boolean): NsVisibility;
14
+ /**
15
+ * The `className` of a row's Switch for its state. NativeScript's `color` tints the
16
+ * thumb in BOTH states, so the theme needs the `.off` hook to give an unchecked
17
+ * thumb a neutral colour (`.adw-switch.off` in theme/adwaita.css).
18
+ */
19
+ export declare function switchClassName(checked: boolean): string;
14
20
  /** The NativeScript form of a title/subtitle label pair. */
15
21
  export interface NsRowLabelVisuals {
16
22
  title: string;
@@ -0,0 +1,17 @@
1
+ export declare const GTK_POLICY_TYPES: readonly ["always", "automatic", "never", "external"];
2
+ export type GtkPolicyNick = (typeof GTK_POLICY_TYPES)[number];
3
+ /** `gtk_scrolled_window_init`: both policies start `automatic`. */
4
+ export declare const DEFAULT_SCROLLBAR_POLICY: GtkPolicyNick;
5
+ /** The nick a policy write means — a nick or the constant — or throw, naming the members. */
6
+ export declare function normalizePolicy(value: unknown, property: 'hscrollbar-policy' | 'vscrollbar-policy'): GtkPolicyNick;
7
+ /** Whether an axis under `policy` scrolls at all. */
8
+ export declare function policyScrolls(policy: GtkPolicyNick): boolean;
9
+ /**
10
+ * The one axis the `ScrollView` scrolls on, for a pair of policies.
11
+ *
12
+ * Vertical wins a tie, because that is the axis a page of content grows on; a window that
13
+ * scrolls ONLY horizontally is the one case that flips it. Neither axis scrolling still
14
+ * answers `vertical` — a `ScrollView` cannot refuse to scroll, so the child is simply held
15
+ * at its natural size by the surrounding layout.
16
+ */
17
+ export declare function scrollOrientationFor(hscrollbarPolicy: GtkPolicyNick, vscrollbarPolicy: GtkPolicyNick): 'horizontal' | 'vertical';
@@ -43,6 +43,16 @@ export declare function withSignals<TBase extends ObservableConstructor>(Base: T
43
43
  set marginStart(value: number | string);
44
44
  get marginEnd(): number;
45
45
  set marginEnd(value: number | string);
46
+ get visible(): boolean;
47
+ set visible(value: boolean | string);
48
+ get sensitive(): boolean;
49
+ set sensitive(value: boolean | string);
50
+ get name(): string;
51
+ set name(value: string | null);
52
+ get widthRequest(): number;
53
+ set widthRequest(value: number | string);
54
+ get heightRequest(): number;
55
+ set heightRequest(value: number | string);
46
56
  _emit(eventName: string): void;
47
57
  addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
48
58
  removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
@@ -0,0 +1,22 @@
1
+ import { type View } from '@nativescript/core';
2
+ import { AdwStyledLayoutBase } from './styled-layout-base.js';
3
+ export declare abstract class AdwSingleChildBase extends AdwStyledLayoutBase {
4
+ private _child;
5
+ constructor();
6
+ /** The child, or `null`. */
7
+ get child(): View | null;
8
+ set child(view: View | null);
9
+ /** `gtk_*_set_child` — the method spelling of {@link child}. */
10
+ set_child(view: View | null): void;
11
+ /** `gtk_*_get_child`. */
12
+ get_child(): View | null;
13
+ /**
14
+ * XML inflation — a bare child and `child:` mean the same thing, so every child a
15
+ * template declares is THE child. A widget with a second destination overrides this.
16
+ */
17
+ _addChildFromBuilder(_name: string, view: View): void;
18
+ /** Put the child where this widget shows it. The default is the one cell, at the bottom. */
19
+ protected _adopt(view: View): void;
20
+ /** Take the child back out of wherever {@link _adopt} put it. */
21
+ protected _release(view: View): void;
22
+ }
@@ -25,6 +25,16 @@ declare const AdwSplitViewBase_base: (abstract new (...args: any[]) => {
25
25
  set marginStart(value: number | string);
26
26
  get marginEnd(): number;
27
27
  set marginEnd(value: number | string);
28
+ get visible(): boolean;
29
+ set visible(value: boolean | string);
30
+ get sensitive(): boolean;
31
+ set sensitive(value: boolean | string);
32
+ get name(): string;
33
+ set name(value: string | null);
34
+ get widthRequest(): number;
35
+ set widthRequest(value: number | string);
36
+ get heightRequest(): number;
37
+ set heightRequest(value: number | string);
28
38
  _emit(eventName: string): void;
29
39
  addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
30
40
  removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
@@ -0,0 +1,93 @@
1
+ import { Observable, type View } from '@nativescript/core';
2
+ import { type ConstructProps } from './construct-props.js';
3
+ /** The one stack call a record needs once adopted — `GtkStack.setPageVisible`. */
4
+ interface AdoptingStack {
5
+ setPageVisible(name: string, visible: boolean): boolean;
6
+ }
7
+ /** A stack this record was handed to before it had a child — see {@link GtkStackPage._awaitChild}. */
8
+ interface AwaitingStack {
9
+ _addChildFromBuilder(name: string, view: GtkStackPage): void;
10
+ }
11
+ declare const GtkStackPage_base: (abstract new (...args: any[]) => {
12
+ connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
13
+ disconnect(handlerId: number): void;
14
+ get halign(): string;
15
+ set halign(value: string | number);
16
+ get valign(): string;
17
+ set valign(value: string | number);
18
+ get hexpand(): boolean;
19
+ set hexpand(value: boolean | string);
20
+ get vexpand(): boolean;
21
+ set vexpand(value: boolean | string);
22
+ get marginStart(): number;
23
+ set marginStart(value: number | string);
24
+ get marginEnd(): number;
25
+ set marginEnd(value: number | string);
26
+ get visible(): boolean;
27
+ set visible(value: boolean | string);
28
+ get sensitive(): boolean;
29
+ set sensitive(value: boolean | string);
30
+ get name(): string;
31
+ set name(value: string | null);
32
+ get widthRequest(): number;
33
+ set widthRequest(value: number | string);
34
+ get heightRequest(): number;
35
+ set heightRequest(value: number | string);
36
+ _emit(eventName: string): void;
37
+ addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
38
+ removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
39
+ notify<T extends import("@nativescript/core").EventData>(data: T): void;
40
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
41
+ set(name: string, value: unknown): void;
42
+ get(name: string): unknown;
43
+ }) & typeof Observable;
44
+ export declare class GtkStackPage extends GtkStackPage_base {
45
+ /** `child:` in a `.blp` — the page itself. The fallback too: a bare child IS the page. */
46
+ static readonly builderSlots: readonly string[];
47
+ private _child;
48
+ private _name;
49
+ private _title;
50
+ private _iconName;
51
+ private _needsAttention;
52
+ private _visible;
53
+ private _useUnderline;
54
+ /** The stack that adopted this record, or `null` while it is still being authored. */
55
+ private _stack;
56
+ /** The stack waiting for this record's child, while it has none. */
57
+ private _awaiting;
58
+ constructor(props?: ConstructProps<GtkStackPage>);
59
+ /** `GtkStackPage:child` — the view the stack shows for this page. */
60
+ get child(): View | null;
61
+ set child(view: View | null);
62
+ /** `GtkStackPage:name` — what `visible-child-name` selects by. */
63
+ get name(): string;
64
+ set name(value: string | null);
65
+ /** `GtkStackPage:title`. */
66
+ get title(): string | null;
67
+ set title(value: string | null);
68
+ /** `GtkStackPage:icon-name`. */
69
+ get iconName(): string | null;
70
+ set iconName(value: string | null);
71
+ /** `GtkStackPage:needs-attention`. */
72
+ get needsAttention(): boolean;
73
+ set needsAttention(raw: boolean | string);
74
+ /** `GtkStackPage:use-underline`. */
75
+ get useUnderline(): boolean;
76
+ set useUnderline(raw: boolean | string);
77
+ /** `GtkStackPage:visible` — the one property that still reaches the stack after adoption. */
78
+ get visible(): boolean;
79
+ set visible(raw: boolean | string);
80
+ /** An XML child is the page's `child` — there is nothing else a record holds. */
81
+ _addChildFromBuilder(_name: string, view: View): void;
82
+ /** Called by the stack that takes this record; a record adopted twice is refused. */
83
+ _adoptBy(stack: AdoptingStack): void;
84
+ /**
85
+ * Called by a stack handed this record while it has no child yet. NativeScript's XML
86
+ * builder hands a child to its parent at the child's START tag, so a template's
87
+ * `<gtk:StackPage>` reaches the stack before its own `<gtk:StackPage.child>` has been
88
+ * read; the stack takes the record when the child arrives, which keeps document order.
89
+ */
90
+ _awaitChild(stack: AwaitingStack): void;
91
+ private _refuseAfterAdoption;
92
+ }
93
+ export {};
@@ -59,3 +59,31 @@ export declare function classNameWith(base: string, classes: readonly string[]):
59
59
  export declare function withCssClass(classes: readonly string[], name: string): string[];
60
60
  /** The list after `gtk_widget_remove_css_class(name)`. Absent is a no-op, as in C. */
61
61
  export declare function withoutCssClass(classes: readonly string[], name: string): string[];
62
+ /**
63
+ * The `styleClasses` list of ONE widget, with GTK's `css-classes` verbs over it.
64
+ *
65
+ * `GtkBox` and `GtkButton` each carry their own copy of this bookkeeping; a container that
66
+ * is only a pass-through (`Adw.Bin`, `Gtk.Overlay`, `Gtk.Stack` …) needs the same five verbs
67
+ * and nothing else, so the list lives here once and a widget keeps one of these. The widget
68
+ * still declares the accessors itself — a `Property` of the platform base must not be
69
+ * shadowed by a mixin, and the coverage gates read the members off the class body.
70
+ *
71
+ * `base` is the class the widget wears of its own accord, `''` for the transparent ones (see
72
+ * {@link classNameWith}); {@link className} is what to write onto the view after a change.
73
+ */
74
+ export declare class StyleClassList {
75
+ private readonly _base;
76
+ private _classes;
77
+ constructor(_base?: string);
78
+ /** The classes, without the widget's own base class. */
79
+ get classes(): string[];
80
+ /** The `className` the widget must carry for the current list. */
81
+ get className(): string;
82
+ /** `styleClasses = '…'` — the string door, REPLACES the list. */
83
+ replace(value: AdwStyleClassesInput): void;
84
+ /** `gtk_widget_set_css_classes` — REPLACES the list from names. */
85
+ replaceAll(names: readonly string[]): void;
86
+ add(name: string): void;
87
+ remove(name: string): void;
88
+ has(name: string): boolean;
89
+ }
@@ -0,0 +1,63 @@
1
+ import { GridLayout } from '@nativescript/core';
2
+ import { type AdwStyleClassesInput } from './style-classes.js';
3
+ declare const AdwStyledLayoutBase_base: (abstract new (...args: any[]) => {
4
+ connect(eventName: string, callback: (self: /*elided*/ any, data: import("@nativescript/core").EventData) => void): number;
5
+ disconnect(handlerId: number): void;
6
+ get halign(): string;
7
+ set halign(value: string | number);
8
+ get valign(): string;
9
+ set valign(value: string | number);
10
+ get hexpand(): boolean;
11
+ set hexpand(value: boolean | string);
12
+ get vexpand(): boolean;
13
+ set vexpand(value: boolean | string);
14
+ get marginStart(): number;
15
+ set marginStart(value: number | string);
16
+ get marginEnd(): number;
17
+ set marginEnd(value: number | string);
18
+ get visible(): boolean;
19
+ set visible(value: boolean | string);
20
+ get sensitive(): boolean;
21
+ set sensitive(value: boolean | string);
22
+ get name(): string;
23
+ set name(value: string | null);
24
+ get widthRequest(): number;
25
+ set widthRequest(value: number | string);
26
+ get heightRequest(): number;
27
+ set heightRequest(value: number | string);
28
+ _emit(eventName: string): void;
29
+ addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
30
+ removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
31
+ notify<T extends import("@nativescript/core").EventData>(data: T): void;
32
+ notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
33
+ set(name: string, value: unknown): void;
34
+ get(name: string): unknown;
35
+ }) & typeof GridLayout;
36
+ export declare abstract class AdwStyledLayoutBase extends AdwStyledLayoutBase_base {
37
+ private readonly _style;
38
+ constructor();
39
+ /**
40
+ * `GtkWidget:css-classes`, spelled `styleClasses` — `cssClasses` is the platform's own
41
+ * live `Set` (`style-classes.ts`). From XML it is a space-separated list.
42
+ */
43
+ get styleClasses(): string[];
44
+ set styleClasses(value: AdwStyleClassesInput);
45
+ /** `gtk_widget_add_css_class`. */
46
+ add_css_class(name: string): void;
47
+ /** `gtk_widget_remove_css_class`. */
48
+ remove_css_class(name: string): void;
49
+ /** `gtk_widget_has_css_class`. */
50
+ has_css_class(name: string): boolean;
51
+ /** `gtk_widget_get_css_classes`. */
52
+ get_css_classes(): string[];
53
+ /** `gtk_widget_set_css_classes` — REPLACES the list. */
54
+ set_css_classes(names: readonly string[]): void;
55
+ /**
56
+ * The class the widget wears for what it IS, before any `css-classes`. Empty for the
57
+ * transparent containers; a window or a dialog overrides it, because those have a
58
+ * background GTK's `.background` gives them.
59
+ */
60
+ protected get _ownClass(): string;
61
+ protected _restyle(): void;
62
+ }
63
+ export {};
@@ -0,0 +1,2 @@
1
+ /** Apply now and again on every change. Reference-counted: one subscription for many views. */
2
+ export declare function observeSystemBars(): () => void;
@@ -0,0 +1,2 @@
1
+ /** Keep the bars' icon colour and backdrop in step with the colour scheme. Returns the stop. */
2
+ export declare function observeSystemBars(): () => void;
@@ -0,0 +1,2 @@
1
+ /** Keep the bars' icon colour and backdrop in step with the colour scheme. Returns the stop. */
2
+ export declare function observeSystemBars(): () => void;
@@ -0,0 +1,71 @@
1
+ import type { AdwColorScheme } from '@gjsify/adwaita-core';
2
+ import type { WindowInsets } from './window-insets.js';
3
+ /** The colour of a bar's icons: follow the colour scheme, or force one. */
4
+ export type BarIcons = 'auto' | 'light' | 'dark';
5
+ /** Which edges get padding for their system bar. */
6
+ export interface SystemBarEdges {
7
+ readonly top: boolean;
8
+ readonly bottom: boolean;
9
+ }
10
+ /** What the caller may pass. Every field is optional; the rest keeps the default. */
11
+ export interface SystemBarsOptions {
12
+ /** `true` / `false` for both edges, or per edge. Default: both. */
13
+ readonly insets?: boolean | Partial<SystemBarEdges>;
14
+ /** Colour of the status bar's icons and clock. Default `'auto'`. */
15
+ readonly statusBarIcons?: BarIcons;
16
+ /** Colour of the navigation bar's icons / gesture pill. Default `'auto'`. */
17
+ readonly navigationBarIcons?: BarIcons;
18
+ /** What shows behind the bars: the Adwaita window colour, nothing, or a colour. */
19
+ readonly background?: 'window' | 'transparent' | string;
20
+ }
21
+ /** {@link SystemBarsOptions} with every default filled in. */
22
+ export interface ResolvedSystemBars {
23
+ readonly insets: SystemBarEdges;
24
+ readonly statusBarIcons: BarIcons;
25
+ readonly navigationBarIcons: BarIcons;
26
+ readonly background: string;
27
+ }
28
+ /** The Adwaita window background per scheme (`.adw-window` in the theme). */
29
+ export declare const WINDOW_BACKGROUND: Record<AdwColorScheme, string>;
30
+ export declare const DEFAULT_SYSTEM_BARS: ResolvedSystemBars;
31
+ /** Fold a boolean or per-edge `insets` option into both edges. */
32
+ export declare function resolveEdges(insets: boolean | Partial<SystemBarEdges> | null | undefined, base?: SystemBarEdges): SystemBarEdges;
33
+ /** Layer `options` over `base`; an absent field keeps the base value. */
34
+ export declare function resolveSystemBars(options: SystemBarsOptions | null | undefined, base?: ResolvedSystemBars): ResolvedSystemBars;
35
+ /** Zero the edges whose padding is switched off. */
36
+ export declare function insetsForEdges(insets: WindowInsets, edges: SystemBarEdges): WindowInsets;
37
+ /**
38
+ * The value for `setAppearanceLightStatusBars` / `setAppearanceLightNavigationBars`.
39
+ *
40
+ * The flag is named for the BAR, not the icons: "light bars" means a light background,
41
+ * which needs DARK icons. So the light scheme sets it and the dark scheme clears it —
42
+ * the inversion that is easy to get backwards, hence a tested function.
43
+ */
44
+ export declare function lightBarFlag(icons: BarIcons, scheme: AdwColorScheme): boolean;
45
+ /** The colour behind the bars, or `null` for fully transparent. */
46
+ export declare function barBackgroundColor(background: string, scheme: AdwColorScheme): string | null;
47
+ /** What the native side must apply for `bars` under `scheme`. */
48
+ export interface SystemBarsAppearance {
49
+ readonly lightStatusBars: boolean;
50
+ readonly lightNavigationBars: boolean;
51
+ readonly background: string | null;
52
+ }
53
+ export declare function systemBarsAppearance(bars: ResolvedSystemBars, scheme: AdwColorScheme): SystemBarsAppearance;
54
+ /** Notified when the global options change. */
55
+ export type SystemBarsListener = (bars: ResolvedSystemBars) => void;
56
+ /** The global options and who listens to them. Exported for tests; apps use `configureSystemBars`. */
57
+ export declare class SystemBarsConfig {
58
+ private _bars;
59
+ private readonly _listeners;
60
+ get bars(): ResolvedSystemBars;
61
+ /** Layer `options` over the CURRENT options (not over the defaults). */
62
+ configure(options: SystemBarsOptions): void;
63
+ /** Back to the defaults. */
64
+ reset(): void;
65
+ subscribe(listener: SystemBarsListener): () => void;
66
+ }
67
+ export declare const systemBarsConfig: SystemBarsConfig;
68
+ /** Change how the app treats the system bars. Options not given keep their current value. */
69
+ export declare function configureSystemBars(options: SystemBarsOptions): void;
70
+ /** `className` with the theme's window class added once, so the page paints the Adwaita window colour. */
71
+ export declare function withPageClass(className: string | null | undefined): string;
@@ -0,0 +1,13 @@
1
+ export declare const GTK_REVEALER_TRANSITIONS: readonly ["none", "crossfade", "slide-right", "slide-left", "slide-up", "slide-down", "swing-right", "swing-left", "swing-up", "swing-down", "fade-slide-right", "fade-slide-left", "fade-slide-up", "fade-slide-down"];
2
+ export declare const GTK_STACK_TRANSITIONS: readonly ["none", "crossfade", "slide-right", "slide-left", "slide-up", "slide-down", "slide-left-right", "slide-up-down", "over-up", "over-down", "over-left", "over-right", "under-up", "under-down", "under-left", "under-right", "over-up-down", "over-down-up", "over-left-right", "over-right-left", "rotate-left", "rotate-right", "rotate-left-right"];
3
+ export type GtkRevealerTransitionNick = (typeof GTK_REVEALER_TRANSITIONS)[number];
4
+ export type GtkStackTransitionNick = (typeof GTK_STACK_TRANSITIONS)[number];
5
+ /** `GtkStack:transition-duration` default, in ms. */
6
+ export declare const DEFAULT_STACK_TRANSITION_DURATION = 200;
7
+ /** `GtkRevealer:transition-duration` default, in ms. */
8
+ export declare const DEFAULT_REVEALER_TRANSITION_DURATION = 250;
9
+ /**
10
+ * The nick a transition write means: a nick, its Blueprint underscore spelling, or the
11
+ * constant — or throw, naming the members.
12
+ */
13
+ export declare function transitionNick<Nick extends string>(value: unknown, members: readonly Nick[], property: string): Nick;
@@ -23,6 +23,16 @@ declare const AdwViewStackPage_base: (abstract new (...args: any[]) => {
23
23
  set marginStart(value: number | string);
24
24
  get marginEnd(): number;
25
25
  set marginEnd(value: number | string);
26
+ get visible(): boolean;
27
+ set visible(value: boolean | string);
28
+ get sensitive(): boolean;
29
+ set sensitive(value: boolean | string);
30
+ get name(): string;
31
+ set name(value: string | null);
32
+ get widthRequest(): number;
33
+ set widthRequest(value: number | string);
34
+ get heightRequest(): number;
35
+ set heightRequest(value: number | string);
26
36
  _emit(eventName: string): void;
27
37
  addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
28
38
  removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
@@ -27,6 +27,16 @@ declare const AdwViewSwitcherBase_base: (abstract new (...args: any[]) => {
27
27
  set marginStart(value: number | string);
28
28
  get marginEnd(): number;
29
29
  set marginEnd(value: number | string);
30
+ get visible(): boolean;
31
+ set visible(value: boolean | string);
32
+ get sensitive(): boolean;
33
+ set sensitive(value: boolean | string);
34
+ get name(): string;
35
+ set name(value: string | null);
36
+ get widthRequest(): number;
37
+ set widthRequest(value: number | string);
38
+ get heightRequest(): number;
39
+ set heightRequest(value: number | string);
30
40
  _emit(eventName: string): void;
31
41
  addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: unknown, once?: boolean): void;
32
42
  removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: unknown): void;
@@ -4,6 +4,9 @@ import type { Observable } from '@nativescript/core';
4
4
  * this module does not import the one that applies it.
5
5
  */
6
6
  type ObservableConstructor = abstract new (...args: any[]) => Observable;
7
+ /** The events a `hexpand` / `vexpand` change emits, so a parent that allocates by them can re-allocate. */
8
+ export declare const NOTIFY_HEXPAND = "notify::hexpand";
9
+ export declare const NOTIFY_VEXPAND = "notify::vexpand";
7
10
  /** The six accessors the mixin adds. Named so a consumer can annotate with it. */
8
11
  export interface GtkWidgetLayout {
9
12
  /** `GtkWidget:halign` — a `Gtk.Align` nick, read back from `horizontalAlignment`. */
@@ -18,6 +21,16 @@ export interface GtkWidgetLayout {
18
21
  marginStart: number;
19
22
  /** `GtkWidget:margin-end` — the trailing edge, resolved against the text direction. */
20
23
  marginEnd: number;
24
+ /** `GtkWidget:visible` — `visibility`; `false` takes the widget out of layout. */
25
+ visible: boolean;
26
+ /** `GtkWidget:sensitive` — `isEnabled`. */
27
+ sensitive: boolean;
28
+ /** `GtkWidget:name` — the CSS `#name`, written through to `id` when the view has none. */
29
+ name: string;
30
+ /** `GtkWidget:width-request` — `minWidth`; `-1` is unset. */
31
+ widthRequest: number;
32
+ /** `GtkWidget:height-request` — `minHeight`; `-1` is unset. */
33
+ heightRequest: number;
21
34
  }
22
35
  /**
23
36
  * Give a `@nativescript/core` base GTK's widget layout properties.
@@ -39,6 +52,16 @@ export declare function withGtkWidgetLayout<TBase extends ObservableConstructor>
39
52
  set marginStart(value: number | string);
40
53
  get marginEnd(): number;
41
54
  set marginEnd(value: number | string);
55
+ get visible(): boolean;
56
+ set visible(value: boolean | string);
57
+ get sensitive(): boolean;
58
+ set sensitive(value: boolean | string);
59
+ get name(): string;
60
+ set name(value: string | null);
61
+ get widthRequest(): number;
62
+ set widthRequest(value: number | string);
63
+ get heightRequest(): number;
64
+ set heightRequest(value: number | string);
42
65
  _emit(eventName: string): void;
43
66
  addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
44
67
  removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
@@ -0,0 +1,41 @@
1
+ import { type View } from '@nativescript/core';
2
+ import { AdwSingleChildBase } from './single-child-base.js';
3
+ import { type DialogHost } from './window-state.js';
4
+ /**
5
+ * The class a window wears — the one the theme already gives a `Page`
6
+ * (`.adw-window`, Adwaita's `.background`: window fill and text colour), so a window built
7
+ * into a bare layout looks like the page it would have been.
8
+ */
9
+ export declare const ADW_WINDOW_CLASS = "adw-window";
10
+ export declare abstract class AdwWindowBase extends AdwSingleChildBase implements DialogHost {
11
+ /** `content` is the one destination, so it is also the fallback. */
12
+ static readonly builderSlots: readonly string[];
13
+ private _title;
14
+ private _defaultWidth;
15
+ private _defaultHeight;
16
+ private readonly _dialogs;
17
+ constructor();
18
+ protected get _ownClass(): string;
19
+ /** `Adw.Window:content` / `Adw.ApplicationWindow:content`. */
20
+ get content(): View | null;
21
+ set content(view: View | null);
22
+ /** `adw_window_set_content`. */
23
+ set_content(view: View | null): void;
24
+ /** `adw_window_get_content`. */
25
+ get_content(): View | null;
26
+ /** `GtkWindow:title`. Held: a `Page` has no title bar of this window's to put it in. */
27
+ get title(): string;
28
+ set title(value: string | null);
29
+ /** `GtkWindow:default-width` — held and read back; the screen is the width. */
30
+ get defaultWidth(): number;
31
+ set defaultWidth(value: number | string);
32
+ /** `GtkWindow:default-height` — held and read back; the screen is the height. */
33
+ get defaultHeight(): number;
34
+ set defaultHeight(value: number | string);
35
+ /** The dialogs presented over this window and not yet closed, bottom to top. */
36
+ get dialogs(): readonly View[];
37
+ /** `DialogHost` — `AdwDialog.present (parent)` calls this on the window it finds. */
38
+ _hostDialog(dialog: unknown): void;
39
+ /** `DialogHost` — the dialog closed. A view this window did not host is left alone. */
40
+ _unhostDialog(dialog: unknown): void;
41
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * `Adw.DialogPresentationMode`, in declaration order — a position IS the GIR constant,
3
+ * held against `generated/enum-values.mts` by arm 8 of `check-nativescript-xml-doors.mjs`.
4
+ */
5
+ export declare const ADW_DIALOG_PRESENTATION_MODES: readonly ["auto", "floating", "bottom-sheet"];
6
+ export type AdwDialogPresentationNick = (typeof ADW_DIALOG_PRESENTATION_MODES)[number];
7
+ /** `AdwDialog:presentation-mode` default. */
8
+ export declare const DEFAULT_DIALOG_PRESENTATION_MODE: AdwDialogPresentationNick;
9
+ /** The presentation mode a write means, or throw naming the members. */
10
+ export declare function dialogPresentationMode(value: unknown): AdwDialogPresentationNick;
11
+ /**
12
+ * A window's or dialog's size property — `default-width`, `default-height`, `content-width`,
13
+ * `content-height` — an integer from `-1` up.
14
+ *
15
+ * GTK's pspecs are `-1 … G_MAXINT` and both `-1` and the default `0` mean "no size asked":
16
+ * the surface takes its natural one. The setter parses with `xmlNumber` (an attribute is
17
+ * always a string) and hands the result here with what was written: a value that is not such
18
+ * an integer is refused rather than clamped, as the other integer properties of this port are,
19
+ * and a blank attribute keeps what was there.
20
+ */
21
+ export declare function surfaceSize(parsed: number, written: unknown, current: number, property: string): number;
22
+ /** What a dialog hands itself to when it is presented over a widget. */
23
+ export interface DialogHost {
24
+ /** Put `dialog` above everything the host shows. */
25
+ _hostDialog(dialog: unknown): void;
26
+ /** Take it back out once it closed. */
27
+ _unhostDialog(dialog: unknown): void;
28
+ }
29
+ /**
30
+ * The window `adw_dialog_present (dialog, parent)` shows a dialog in: `parent` itself, or the
31
+ * nearest ancestor of it, that hosts dialogs — or `null`.
32
+ *
33
+ * `adw_dialog_present` walks to the parent's `GtkRoot`; this port's equivalent of a root is a
34
+ * view that implements the two host methods, so the walk stops at the first one rather than
35
+ * at a class.
36
+ */
37
+ export declare function findDialogHost(start: unknown): DialogHost | null;