@girs/handy-1 4.1.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/handy-1-surface.d.ts +1180 -0
- package/handy-1-surface.js +274 -0
- package/package.json +21 -17
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,1180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GIR-derived widget VOCABULARY for Handy-1.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED — do not edit. Provenance: Handy-1 — dropped empty base(s): GObject.InitiallyUnowned GObject.Object Atk.ImplementorIface Gio.ActionGroup Gio.ActionMap
|
|
5
|
+
*
|
|
6
|
+
* 29 concrete widgets, 30 declarations, 11 enum nick unions, 24 slot candidates.
|
|
7
|
+
*
|
|
8
|
+
* Module-scoped exports only. There is no `JSX` namespace here, no tag spelling and
|
|
9
|
+
* no `on<Signal>` prop name: those are DIALECT, and every framework answers them
|
|
10
|
+
* differently. The shape to avoid is the GLOBAL AUGMENT — a `declare global` on
|
|
11
|
+
* `React.JSX` collides with every other library on a shared tag — while a
|
|
12
|
+
* module-scoped `JSX` behind a `jsxImportSource` does not. This package is used by
|
|
13
|
+
* projects that want nothing to do with JSX, so it emits neither; a consumer declaring
|
|
14
|
+
* a module-scoped namespace over these names is doing it right.
|
|
15
|
+
*
|
|
16
|
+
* Three things this is and `ConstructorProps` is not: WRITABLE-only (measured on
|
|
17
|
+
* Gtk-4.0, `ConstructorProps` offers 150 read-only properties across 68 classes as
|
|
18
|
+
* settable, and GTK's failure mode for writing one is exit 0), OPTIONAL, and keyed
|
|
19
|
+
* by the name GObject actually REGISTERED — the dashed spelling `g_object_set`,
|
|
20
|
+
* GtkBuilder XML and Blueprint all use.
|
|
21
|
+
*
|
|
22
|
+
* Signal handler types are not re-derived: `X.SignalSignatures`, which this package
|
|
23
|
+
* already emits for every class with the parent chain, every implemented interface
|
|
24
|
+
* and the `notify::` keys folded in, is what `Widgets[G]['signals']` points at.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import type Gio from '@girs/gio-2.0';
|
|
28
|
+
import type Gtk from '@girs/gtk-3.0';
|
|
29
|
+
import type Handy from './handy-1.js';
|
|
30
|
+
import type Pango from '@girs/pango-1.0';
|
|
31
|
+
import type { GtkActionableConstructOnly, GtkActionableProps, GtkApplicationWindowConstructOnly, GtkApplicationWindowProps, GtkBinConstructOnly, GtkBinProps, GtkBuildableConstructOnly, GtkBuildableProps, GtkContainerConstructOnly, GtkContainerProps, GtkDrawingAreaConstructOnly, GtkDrawingAreaProps, GtkEventBoxConstructOnly, GtkEventBoxProps, GtkListBoxRowConstructOnly, GtkListBoxRowProps, GtkOrientableConstructOnly, GtkOrientableProps, GtkPackTypeNick, GtkWidgetConstructOnly, GtkWidgetProps, GtkWindowConstructOnly, GtkWindowProps } from '@girs/gtk-3.0/surface';
|
|
32
|
+
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
// Enum nicks — the string vocabulary GObject registered, from GIR's `glib:nick`.
|
|
35
|
+
//
|
|
36
|
+
// Not derived from the member name. Substituting underscores for dashes is not a law:
|
|
37
|
+
// some nicks keep an underscore the substitution would have replaced, and only the
|
|
38
|
+
// attribute knows which. Gtk-4.0 and Adw-1 contradict no derivation at all, which is
|
|
39
|
+
// how a derived nick passes review and breaks elsewhere.
|
|
40
|
+
// Re-measure with `scripts/check-nick-derivation.mjs` in ts-for-gir.
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
export type HdyCenteringPolicyNick = 'loose' | 'strict';
|
|
44
|
+
export type HdyColorSchemeNick = 'default' | 'force-light' | 'prefer-light' | 'prefer-dark' | 'force-dark';
|
|
45
|
+
export type HdyDeckTransitionTypeNick = 'over' | 'under' | 'slide';
|
|
46
|
+
export type HdyFlapFoldPolicyNick = 'never' | 'always' | 'auto';
|
|
47
|
+
export type HdyFlapTransitionTypeNick = 'over' | 'under' | 'slide';
|
|
48
|
+
export type HdyHeaderGroupChildTypeNick = 'header-bar' | 'gtk-header-bar' | 'header-group';
|
|
49
|
+
export type HdyLeafletTransitionTypeNick = 'over' | 'under' | 'slide';
|
|
50
|
+
export type HdyNavigationDirectionNick = 'back' | 'forward';
|
|
51
|
+
export type HdySqueezerTransitionTypeNick = 'none' | 'crossfade';
|
|
52
|
+
export type HdyViewSwitcherPolicyNick = 'auto' | 'narrow' | 'wide';
|
|
53
|
+
export type PangoEllipsizeModeNick = 'none' | 'start' | 'middle' | 'end';
|
|
54
|
+
|
|
55
|
+
// ---------------------------------------------------------------------------
|
|
56
|
+
// Property surfaces — one interface per GIR DECLARATION, mirroring GIR's own
|
|
57
|
+
// inheritance rather than flattening per widget.
|
|
58
|
+
//
|
|
59
|
+
// The interfaces are load-bearing, not tidiness: `GtkBox` declares four properties
|
|
60
|
+
// of its own and `orientation` is not among them — it lives on `Gtk.Orientable`,
|
|
61
|
+
// because GObject installs interface properties on the implementor at runtime while
|
|
62
|
+
// GIR keeps them once, on the interface.
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
/** A [class@Gtk.ListBoxRow] used to present actions. */
|
|
66
|
+
export interface HdyActionRowProps extends HdyPreferencesRowProps, GtkActionableProps, GtkBuildableProps {
|
|
67
|
+
/**
|
|
68
|
+
* The activatable widget for this row.
|
|
69
|
+
* @since 1.0
|
|
70
|
+
*/
|
|
71
|
+
'activatable-widget'?: Gtk.Widget | null;
|
|
72
|
+
/**
|
|
73
|
+
* The icon name for this row.
|
|
74
|
+
* @since 1.0
|
|
75
|
+
*/
|
|
76
|
+
'icon-name'?: string;
|
|
77
|
+
/**
|
|
78
|
+
* The subtitle for this row.
|
|
79
|
+
* @since 1.0
|
|
80
|
+
*/
|
|
81
|
+
subtitle?: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* The number of lines at the end of which the subtitle label will be ellipsized.
|
|
84
|
+
* @since 1.2
|
|
85
|
+
*/
|
|
86
|
+
'subtitle-lines'?: number;
|
|
87
|
+
/**
|
|
88
|
+
* The number of lines at the end of which the title label will be ellipsized.
|
|
89
|
+
* @since 1.2
|
|
90
|
+
*/
|
|
91
|
+
'title-lines'?: number;
|
|
92
|
+
/**
|
|
93
|
+
* Whether embedded underlines in the title or subtitle indicates a mnemonic.
|
|
94
|
+
* @since 1.0
|
|
95
|
+
*/
|
|
96
|
+
'use-underline'?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
99
|
+
export type HdyActionRowConstructOnly = HdyPreferencesRowConstructOnly | GtkActionableConstructOnly | GtkBuildableConstructOnly;
|
|
100
|
+
|
|
101
|
+
/** A freeform application window. */
|
|
102
|
+
export interface HdyApplicationWindowProps extends GtkApplicationWindowProps, GtkBuildableProps {
|
|
103
|
+
}
|
|
104
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
105
|
+
export type HdyApplicationWindowConstructOnly = GtkApplicationWindowConstructOnly | GtkBuildableConstructOnly;
|
|
106
|
+
|
|
107
|
+
/** A widget displaying an image, with a generated fallback. */
|
|
108
|
+
export interface HdyAvatarProps extends GtkDrawingAreaProps, GtkBuildableProps {
|
|
109
|
+
/**
|
|
110
|
+
* The name of an icon to use as a fallback.
|
|
111
|
+
* @since 1.0
|
|
112
|
+
*/
|
|
113
|
+
'icon-name'?: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* A [iface@Gio.LoadableIcon] used to load the avatar.
|
|
116
|
+
* @since 1.2
|
|
117
|
+
*/
|
|
118
|
+
'loadable-icon'?: Gio.LoadableIcon | null;
|
|
119
|
+
/**
|
|
120
|
+
* Whether to show the initials or the fallback icon on the generated avatar.
|
|
121
|
+
* @since 1.0
|
|
122
|
+
*/
|
|
123
|
+
'show-initials'?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* The avatar size of the avatar.
|
|
126
|
+
* @since 1.0
|
|
127
|
+
*/
|
|
128
|
+
size?: number;
|
|
129
|
+
/**
|
|
130
|
+
* Sets the text used to generate the fallback initials and color.
|
|
131
|
+
* @since 1.0
|
|
132
|
+
*/
|
|
133
|
+
text?: string | null;
|
|
134
|
+
}
|
|
135
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
136
|
+
export type HdyAvatarConstructOnly = GtkDrawingAreaConstructOnly | GtkBuildableConstructOnly;
|
|
137
|
+
|
|
138
|
+
/** A paginated scrolling widget. */
|
|
139
|
+
export interface HdyCarouselProps extends GtkEventBoxProps, GtkBuildableProps, GtkOrientableProps, HdySwipeableProps {
|
|
140
|
+
/**
|
|
141
|
+
* Whether to allow swiping for more than one page at a time.
|
|
142
|
+
* @since 1.2
|
|
143
|
+
*/
|
|
144
|
+
'allow-long-swipes'?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Sets whether the [class@Carousel] can be dragged with mouse pointer.
|
|
147
|
+
* @since 1.0
|
|
148
|
+
*/
|
|
149
|
+
'allow-mouse-drag'?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Whether the widget will respond to scroll wheel events.
|
|
152
|
+
* @since 1.4
|
|
153
|
+
*/
|
|
154
|
+
'allow-scroll-wheel'?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Animation duration used by [method@Carousel.scroll_to], in milliseconds.
|
|
157
|
+
* @since 1.0
|
|
158
|
+
*/
|
|
159
|
+
'animation-duration'?: number;
|
|
160
|
+
/**
|
|
161
|
+
* Whether the carousel can be navigated.
|
|
162
|
+
* @since 1.0
|
|
163
|
+
*/
|
|
164
|
+
interactive?: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Page reveal duration, in milliseconds.
|
|
167
|
+
* @since 1.0
|
|
168
|
+
*/
|
|
169
|
+
'reveal-duration'?: number;
|
|
170
|
+
/**
|
|
171
|
+
* Spacing between pages in pixels.
|
|
172
|
+
* @since 1.0
|
|
173
|
+
*/
|
|
174
|
+
spacing?: number;
|
|
175
|
+
}
|
|
176
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
177
|
+
export type HdyCarouselConstructOnly = GtkEventBoxConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly | HdySwipeableConstructOnly;
|
|
178
|
+
|
|
179
|
+
/** A dots indicator for [class@Carousel]. */
|
|
180
|
+
export interface HdyCarouselIndicatorDotsProps extends GtkDrawingAreaProps, GtkBuildableProps, GtkOrientableProps {
|
|
181
|
+
/**
|
|
182
|
+
* The [class@Carousel] the indicator uses.
|
|
183
|
+
* @since 1.0
|
|
184
|
+
*/
|
|
185
|
+
carousel?: Handy.Carousel | null;
|
|
186
|
+
}
|
|
187
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
188
|
+
export type HdyCarouselIndicatorDotsConstructOnly = GtkDrawingAreaConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly;
|
|
189
|
+
|
|
190
|
+
/** A lines indicator for [class@Carousel]. */
|
|
191
|
+
export interface HdyCarouselIndicatorLinesProps extends GtkDrawingAreaProps, GtkBuildableProps, GtkOrientableProps {
|
|
192
|
+
/**
|
|
193
|
+
* The displayed carousel.
|
|
194
|
+
* @since 1.0
|
|
195
|
+
*/
|
|
196
|
+
carousel?: Handy.Carousel | null;
|
|
197
|
+
}
|
|
198
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
199
|
+
export type HdyCarouselIndicatorLinesConstructOnly = GtkDrawingAreaConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly;
|
|
200
|
+
|
|
201
|
+
/** A widget constraining its child to a given size. */
|
|
202
|
+
export interface HdyClampProps extends GtkBinProps, GtkBuildableProps, GtkOrientableProps {
|
|
203
|
+
/**
|
|
204
|
+
* The maximum size to allocate the children.
|
|
205
|
+
* @since 1.0
|
|
206
|
+
*/
|
|
207
|
+
'maximum-size'?: number;
|
|
208
|
+
/**
|
|
209
|
+
* The size above which the child is clamped.
|
|
210
|
+
* @since 1.0
|
|
211
|
+
*/
|
|
212
|
+
'tightening-threshold'?: number;
|
|
213
|
+
}
|
|
214
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
215
|
+
export type HdyClampConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly;
|
|
216
|
+
|
|
217
|
+
/** A [class@Gtk.ListBoxRow] used to choose from a list of items. */
|
|
218
|
+
export interface HdyComboRowProps extends HdyActionRowProps, GtkActionableProps, GtkBuildableProps {
|
|
219
|
+
/**
|
|
220
|
+
* The index of the selected item in its [iface@Gio.ListModel].
|
|
221
|
+
* @since 1.0
|
|
222
|
+
*/
|
|
223
|
+
'selected-index'?: number;
|
|
224
|
+
/**
|
|
225
|
+
* Whether to use the current value as the subtitle.
|
|
226
|
+
* @since 1.0
|
|
227
|
+
*/
|
|
228
|
+
'use-subtitle'?: boolean;
|
|
229
|
+
}
|
|
230
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
231
|
+
export type HdyComboRowConstructOnly = HdyActionRowConstructOnly | GtkActionableConstructOnly | GtkBuildableConstructOnly;
|
|
232
|
+
|
|
233
|
+
/** A swipeable widget showing one of the visible children at a time. */
|
|
234
|
+
export interface HdyDeckProps extends GtkContainerProps, GtkBuildableProps, GtkOrientableProps, HdySwipeableProps {
|
|
235
|
+
/**
|
|
236
|
+
* Whether swipe gestures allow switching to the previous child.
|
|
237
|
+
* @since 1.0
|
|
238
|
+
*/
|
|
239
|
+
'can-swipe-back'?: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Whether swipe gestures allow switching to the next child.
|
|
242
|
+
* @since 1.0
|
|
243
|
+
*/
|
|
244
|
+
'can-swipe-forward'?: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Horizontally homogeneous sizing.
|
|
247
|
+
* @since 1.0
|
|
248
|
+
*/
|
|
249
|
+
hhomogeneous?: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* Whether or not the size should smoothly change when changing between differently sized children.
|
|
252
|
+
* @since 1.0
|
|
253
|
+
*/
|
|
254
|
+
'interpolate-size'?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* The transition animation duration, in milliseconds.
|
|
257
|
+
* @since 1.0
|
|
258
|
+
*/
|
|
259
|
+
'transition-duration'?: number;
|
|
260
|
+
/**
|
|
261
|
+
* The type of animation that will be used for transitions between children.
|
|
262
|
+
* @since 1.0
|
|
263
|
+
*/
|
|
264
|
+
'transition-type'?: HdyDeckTransitionTypeNick | Handy.DeckTransitionType;
|
|
265
|
+
/**
|
|
266
|
+
* Vertically homogeneous sizing.
|
|
267
|
+
* @since 1.0
|
|
268
|
+
*/
|
|
269
|
+
vhomogeneous?: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* The widget currently visible.
|
|
272
|
+
* @since 1.0
|
|
273
|
+
*/
|
|
274
|
+
'visible-child'?: Gtk.Widget;
|
|
275
|
+
/**
|
|
276
|
+
* The name of the widget currently visible.
|
|
277
|
+
* @since 1.0
|
|
278
|
+
*/
|
|
279
|
+
'visible-child-name'?: string;
|
|
280
|
+
}
|
|
281
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
282
|
+
export type HdyDeckConstructOnly = GtkContainerConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly | HdySwipeableConstructOnly;
|
|
283
|
+
|
|
284
|
+
/** A [class@Gtk.ListBoxRow] used to reveal widgets. */
|
|
285
|
+
export interface HdyExpanderRowProps extends HdyPreferencesRowProps, GtkActionableProps, GtkBuildableProps {
|
|
286
|
+
/**
|
|
287
|
+
* Whether expansion is enabled.
|
|
288
|
+
* @since 1.0
|
|
289
|
+
*/
|
|
290
|
+
'enable-expansion'?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Whether the row is expanded.
|
|
293
|
+
* @since 1.0
|
|
294
|
+
*/
|
|
295
|
+
expanded?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* The icon name for this row.
|
|
298
|
+
* @since 1.0
|
|
299
|
+
*/
|
|
300
|
+
'icon-name'?: string;
|
|
301
|
+
/**
|
|
302
|
+
* Whether the switch enabling the expansion is visible.
|
|
303
|
+
* @since 1.0
|
|
304
|
+
*/
|
|
305
|
+
'show-enable-switch'?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* The subtitle for this row.
|
|
308
|
+
* @since 1.0
|
|
309
|
+
*/
|
|
310
|
+
subtitle?: string | null;
|
|
311
|
+
/**
|
|
312
|
+
* Whether an embedded underline in the title or subtitle labels indicates a mnemonic.
|
|
313
|
+
* @since 1.0
|
|
314
|
+
*/
|
|
315
|
+
'use-underline'?: boolean;
|
|
316
|
+
}
|
|
317
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
318
|
+
export type HdyExpanderRowConstructOnly = HdyPreferencesRowConstructOnly | GtkActionableConstructOnly | GtkBuildableConstructOnly;
|
|
319
|
+
|
|
320
|
+
/** An adaptive container acting like a box or an overlay. */
|
|
321
|
+
export interface HdyFlapProps extends GtkContainerProps, GtkBuildableProps, GtkOrientableProps, HdySwipeableProps {
|
|
322
|
+
/**
|
|
323
|
+
* The content widget.
|
|
324
|
+
* @since 1.2
|
|
325
|
+
*/
|
|
326
|
+
content?: Gtk.Widget | null;
|
|
327
|
+
/**
|
|
328
|
+
* The flap widget.
|
|
329
|
+
* @since 1.2
|
|
330
|
+
*/
|
|
331
|
+
flap?: Gtk.Widget | null;
|
|
332
|
+
/**
|
|
333
|
+
* The flap position.
|
|
334
|
+
* @since 1.2
|
|
335
|
+
*/
|
|
336
|
+
'flap-position'?: GtkPackTypeNick | Gtk.PackType;
|
|
337
|
+
/**
|
|
338
|
+
* The fold transition animation duration, in milliseconds.
|
|
339
|
+
* @since 1.2
|
|
340
|
+
*/
|
|
341
|
+
'fold-duration'?: number;
|
|
342
|
+
/**
|
|
343
|
+
* The current fold policy.
|
|
344
|
+
* @since 1.2
|
|
345
|
+
*/
|
|
346
|
+
'fold-policy'?: HdyFlapFoldPolicyNick | Handy.FlapFoldPolicy;
|
|
347
|
+
/**
|
|
348
|
+
* Whether the flap is locked.
|
|
349
|
+
* @since 1.2
|
|
350
|
+
*/
|
|
351
|
+
locked?: boolean;
|
|
352
|
+
/**
|
|
353
|
+
* Whether the flap is modal.
|
|
354
|
+
* @since 1.2
|
|
355
|
+
*/
|
|
356
|
+
modal?: boolean;
|
|
357
|
+
/**
|
|
358
|
+
* The reveal transition animation duration, in milliseconds.
|
|
359
|
+
* @since 1.2
|
|
360
|
+
*/
|
|
361
|
+
'reveal-duration'?: number;
|
|
362
|
+
/**
|
|
363
|
+
* Whether the flap widget is revealed.
|
|
364
|
+
* @since 1.2
|
|
365
|
+
*/
|
|
366
|
+
'reveal-flap'?: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* The separator widget.
|
|
369
|
+
* @since 1.2
|
|
370
|
+
*/
|
|
371
|
+
separator?: Gtk.Widget | null;
|
|
372
|
+
/**
|
|
373
|
+
* Whether the flap can be closed with a swipe gesture.
|
|
374
|
+
* @since 1.2
|
|
375
|
+
*/
|
|
376
|
+
'swipe-to-close'?: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* Whether the flap can be opened with a swipe gesture.
|
|
379
|
+
* @since 1.2
|
|
380
|
+
*/
|
|
381
|
+
'swipe-to-open'?: boolean;
|
|
382
|
+
/**
|
|
383
|
+
* the type of animation used for reveal and fold transitions.
|
|
384
|
+
* @since 1.2
|
|
385
|
+
*/
|
|
386
|
+
'transition-type'?: HdyFlapTransitionTypeNick | Handy.FlapTransitionType;
|
|
387
|
+
}
|
|
388
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
389
|
+
export type HdyFlapConstructOnly = GtkContainerConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly | HdySwipeableConstructOnly;
|
|
390
|
+
|
|
391
|
+
/** A title bar widget. */
|
|
392
|
+
export interface HdyHeaderBarProps extends GtkContainerProps, GtkBuildableProps {
|
|
393
|
+
/**
|
|
394
|
+
* The policy for aligning the center widget.
|
|
395
|
+
* @since 1.0
|
|
396
|
+
*/
|
|
397
|
+
'centering-policy'?: HdyCenteringPolicyNick | Handy.CenteringPolicy;
|
|
398
|
+
/**
|
|
399
|
+
* Custom title widget to display.
|
|
400
|
+
* @since 1.0
|
|
401
|
+
*/
|
|
402
|
+
'custom-title'?: Gtk.Widget | null;
|
|
403
|
+
/**
|
|
404
|
+
* The decoration layout for buttons.
|
|
405
|
+
* @since 1.0
|
|
406
|
+
*/
|
|
407
|
+
'decoration-layout'?: string;
|
|
408
|
+
/**
|
|
409
|
+
* Whether [property@HeaderBar:decoration-layout] is set.
|
|
410
|
+
* @since 1.0
|
|
411
|
+
*/
|
|
412
|
+
'decoration-layout-set'?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* Whether to reserve space for a subtitle, even if none is currently set.
|
|
415
|
+
* @since 1.0
|
|
416
|
+
*/
|
|
417
|
+
'has-subtitle'?: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* Whether the size should smoothly change when changing between children.
|
|
420
|
+
* @since 1.0
|
|
421
|
+
*/
|
|
422
|
+
'interpolate-size'?: boolean;
|
|
423
|
+
/**
|
|
424
|
+
* Whether to show window decorations.
|
|
425
|
+
* @since 1.0
|
|
426
|
+
*/
|
|
427
|
+
'show-close-button'?: boolean;
|
|
428
|
+
/**
|
|
429
|
+
* The amount of space between children.
|
|
430
|
+
* @since 1.0
|
|
431
|
+
*/
|
|
432
|
+
spacing?: number;
|
|
433
|
+
/**
|
|
434
|
+
* The subtitle to display.
|
|
435
|
+
* @since 1.0
|
|
436
|
+
*/
|
|
437
|
+
subtitle?: string | null;
|
|
438
|
+
/**
|
|
439
|
+
* The title to display.
|
|
440
|
+
* @since 1.0
|
|
441
|
+
*/
|
|
442
|
+
title?: string | null;
|
|
443
|
+
/**
|
|
444
|
+
* The transition duration, in milliseconds.
|
|
445
|
+
* @since 1.0
|
|
446
|
+
*/
|
|
447
|
+
'transition-duration'?: number;
|
|
448
|
+
}
|
|
449
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
450
|
+
export type HdyHeaderBarConstructOnly = GtkContainerConstructOnly | GtkBuildableConstructOnly;
|
|
451
|
+
|
|
452
|
+
/** A keypad for dialing numbers The `HdyKeypad` widget is a keypad for entering numbers such as phone numbers or PIN codes. */
|
|
453
|
+
export interface HdyKeypadProps extends GtkBinProps, GtkBuildableProps {
|
|
454
|
+
/**
|
|
455
|
+
* The amount of space between two consecutive columns.
|
|
456
|
+
* @since 1.0
|
|
457
|
+
*/
|
|
458
|
+
'column-spacing'?: number;
|
|
459
|
+
/**
|
|
460
|
+
* The widget for the lower end corner of @self.
|
|
461
|
+
* @since 1.0
|
|
462
|
+
*/
|
|
463
|
+
'end-action'?: Gtk.Widget | null;
|
|
464
|
+
/**
|
|
465
|
+
* The entry widget connected to the keypad.
|
|
466
|
+
* @since 1.0
|
|
467
|
+
*/
|
|
468
|
+
entry?: Gtk.Entry;
|
|
469
|
+
/**
|
|
470
|
+
* Whether standard letters should be displayed below the digits on the buttons.
|
|
471
|
+
* @since 1.0
|
|
472
|
+
*/
|
|
473
|
+
'letters-visible'?: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* The amount of space between two consecutive rows.
|
|
476
|
+
* @since 1.0
|
|
477
|
+
*/
|
|
478
|
+
'row-spacing'?: number;
|
|
479
|
+
/**
|
|
480
|
+
* The widget for the lower start corner of @self.
|
|
481
|
+
* @since 1.0
|
|
482
|
+
*/
|
|
483
|
+
'start-action'?: Gtk.Widget | null;
|
|
484
|
+
/**
|
|
485
|
+
* Whether to display symbols.
|
|
486
|
+
* @since 1.0
|
|
487
|
+
*/
|
|
488
|
+
'symbols-visible'?: boolean;
|
|
489
|
+
}
|
|
490
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
491
|
+
export type HdyKeypadConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
492
|
+
|
|
493
|
+
/** An adaptive container acting like a box or a stack. */
|
|
494
|
+
export interface HdyLeafletProps extends GtkContainerProps, GtkBuildableProps, GtkOrientableProps, HdySwipeableProps {
|
|
495
|
+
/**
|
|
496
|
+
* Whether swipe gestures allow switching to the previous navigatable child.
|
|
497
|
+
* @since 1.0
|
|
498
|
+
*/
|
|
499
|
+
'can-swipe-back'?: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Whether swipe gestures allow switching to the next navigatable child.
|
|
502
|
+
* @since 1.0
|
|
503
|
+
*/
|
|
504
|
+
'can-swipe-forward'?: boolean;
|
|
505
|
+
/**
|
|
506
|
+
* The child transition animation duration, in milliseconds.
|
|
507
|
+
* @since 1.0
|
|
508
|
+
*/
|
|
509
|
+
'child-transition-duration'?: number;
|
|
510
|
+
/**
|
|
511
|
+
* Whether to allocate the same width for all children when folded.
|
|
512
|
+
* @since 1.0
|
|
513
|
+
*/
|
|
514
|
+
'hhomogeneous-folded'?: boolean;
|
|
515
|
+
/**
|
|
516
|
+
* Whether to allocate the same width for all children when unfolded.
|
|
517
|
+
* @since 1.0
|
|
518
|
+
*/
|
|
519
|
+
'hhomogeneous-unfolded'?: boolean;
|
|
520
|
+
/**
|
|
521
|
+
* Whether the size should smoothly change when changing between children.
|
|
522
|
+
* @since 1.0
|
|
523
|
+
*/
|
|
524
|
+
'interpolate-size'?: boolean;
|
|
525
|
+
/**
|
|
526
|
+
* The mode transition animation duration, in milliseconds.
|
|
527
|
+
* @since 1.0
|
|
528
|
+
*/
|
|
529
|
+
'mode-transition-duration'?: number;
|
|
530
|
+
/**
|
|
531
|
+
* The animation type used for transitions between modes and children.
|
|
532
|
+
* @since 1.0
|
|
533
|
+
*/
|
|
534
|
+
'transition-type'?: HdyLeafletTransitionTypeNick | Handy.LeafletTransitionType;
|
|
535
|
+
/**
|
|
536
|
+
* Whether to allocates the same height for all children when folded.
|
|
537
|
+
* @since 1.0
|
|
538
|
+
*/
|
|
539
|
+
'vhomogeneous-folded'?: boolean;
|
|
540
|
+
/**
|
|
541
|
+
* Whether to allocate the same height for all children when unfolded.
|
|
542
|
+
* @since 1.0
|
|
543
|
+
*/
|
|
544
|
+
'vhomogeneous-unfolded'?: boolean;
|
|
545
|
+
/**
|
|
546
|
+
* The widget currently visible when the leaflet is folded.
|
|
547
|
+
* @since 1.0
|
|
548
|
+
*/
|
|
549
|
+
'visible-child'?: Gtk.Widget;
|
|
550
|
+
/**
|
|
551
|
+
* The name of the widget currently visible when the leaflet is folded.
|
|
552
|
+
* @since 1.0
|
|
553
|
+
*/
|
|
554
|
+
'visible-child-name'?: string;
|
|
555
|
+
}
|
|
556
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
557
|
+
export type HdyLeafletConstructOnly = GtkContainerConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly | HdySwipeableConstructOnly;
|
|
558
|
+
|
|
559
|
+
/** A group of preference rows. */
|
|
560
|
+
export interface HdyPreferencesGroupProps extends GtkBinProps, GtkBuildableProps {
|
|
561
|
+
/**
|
|
562
|
+
* The description for this group of preferences.
|
|
563
|
+
* @since 1.0
|
|
564
|
+
*/
|
|
565
|
+
description?: string;
|
|
566
|
+
/**
|
|
567
|
+
* The title for this group of preferences.
|
|
568
|
+
* @since 1.0
|
|
569
|
+
*/
|
|
570
|
+
title?: string;
|
|
571
|
+
/**
|
|
572
|
+
* Whether to use markup for the title and description.
|
|
573
|
+
* @since 1.4
|
|
574
|
+
*/
|
|
575
|
+
'use-markup'?: boolean;
|
|
576
|
+
}
|
|
577
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
578
|
+
export type HdyPreferencesGroupConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
579
|
+
|
|
580
|
+
/** A page from [class@PreferencesWindow]. */
|
|
581
|
+
export interface HdyPreferencesPageProps extends GtkBinProps, GtkBuildableProps {
|
|
582
|
+
/**
|
|
583
|
+
* The icon name for this page of preferences.
|
|
584
|
+
* @since 1.0
|
|
585
|
+
*/
|
|
586
|
+
'icon-name'?: string | null;
|
|
587
|
+
/**
|
|
588
|
+
* The title for this page of preferences.
|
|
589
|
+
* @since 1.0
|
|
590
|
+
*/
|
|
591
|
+
title?: string | null;
|
|
592
|
+
}
|
|
593
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
594
|
+
export type HdyPreferencesPageConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
595
|
+
|
|
596
|
+
/** A [class@Gtk.ListBoxRow] used to present preferences. */
|
|
597
|
+
export interface HdyPreferencesRowProps extends GtkListBoxRowProps, GtkActionableProps, GtkBuildableProps {
|
|
598
|
+
/**
|
|
599
|
+
* The title of the preference represented by this row.
|
|
600
|
+
* @since 1.0
|
|
601
|
+
*/
|
|
602
|
+
title?: string | null;
|
|
603
|
+
/**
|
|
604
|
+
* Whether an embedded underline in the title indicates a mnemonic.
|
|
605
|
+
* @since 1.0
|
|
606
|
+
*/
|
|
607
|
+
'use-underline'?: boolean;
|
|
608
|
+
}
|
|
609
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
610
|
+
export type HdyPreferencesRowConstructOnly = GtkListBoxRowConstructOnly | GtkActionableConstructOnly | GtkBuildableConstructOnly;
|
|
611
|
+
|
|
612
|
+
/** A window to present an application's preferences. */
|
|
613
|
+
export interface HdyPreferencesWindowProps extends HdyWindowProps, GtkBuildableProps {
|
|
614
|
+
/**
|
|
615
|
+
* Whether the window allows closing the subpage via a swipe gesture.
|
|
616
|
+
* @since 1.0
|
|
617
|
+
*/
|
|
618
|
+
'can-swipe-back'?: boolean;
|
|
619
|
+
/**
|
|
620
|
+
* Whether search is enabled.
|
|
621
|
+
* @since 1.0
|
|
622
|
+
*/
|
|
623
|
+
'search-enabled'?: boolean;
|
|
624
|
+
}
|
|
625
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
626
|
+
export type HdyPreferencesWindowConstructOnly = HdyWindowConstructOnly | GtkBuildableConstructOnly;
|
|
627
|
+
|
|
628
|
+
/** A toolbar to integrate a search entry with. */
|
|
629
|
+
export interface HdySearchBarProps extends GtkBinProps, GtkBuildableProps {
|
|
630
|
+
/**
|
|
631
|
+
* Whether the search mode is on and the search bar shown.
|
|
632
|
+
* @since 1.0
|
|
633
|
+
*/
|
|
634
|
+
'search-mode-enabled'?: boolean;
|
|
635
|
+
/**
|
|
636
|
+
* Whether to show the close button in the toolbar.
|
|
637
|
+
* @since 1.0
|
|
638
|
+
*/
|
|
639
|
+
'show-close-button'?: boolean;
|
|
640
|
+
}
|
|
641
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
642
|
+
export type HdySearchBarConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
643
|
+
|
|
644
|
+
/** A best fit container. */
|
|
645
|
+
export interface HdySqueezerProps extends GtkContainerProps, GtkBuildableProps, GtkOrientableProps {
|
|
646
|
+
/**
|
|
647
|
+
* Whether all children have the same size for the opposite orientation.
|
|
648
|
+
* @since 1.0
|
|
649
|
+
*/
|
|
650
|
+
homogeneous?: boolean;
|
|
651
|
+
/**
|
|
652
|
+
* Whether the squeezer interpolates its size when changing the visible child.
|
|
653
|
+
* @since 1.0
|
|
654
|
+
*/
|
|
655
|
+
'interpolate-size'?: boolean;
|
|
656
|
+
/**
|
|
657
|
+
* The animation duration, in milliseconds.
|
|
658
|
+
* @since 1.0
|
|
659
|
+
*/
|
|
660
|
+
'transition-duration'?: number;
|
|
661
|
+
/**
|
|
662
|
+
* The type of animation used for transitions between children.
|
|
663
|
+
* @since 1.0
|
|
664
|
+
*/
|
|
665
|
+
'transition-type'?: HdySqueezerTransitionTypeNick | Handy.SqueezerTransitionType;
|
|
666
|
+
/**
|
|
667
|
+
* The horizontal alignment, from 0 (start) to 1 (end).
|
|
668
|
+
* @since 1.0
|
|
669
|
+
*/
|
|
670
|
+
xalign?: number;
|
|
671
|
+
/**
|
|
672
|
+
* The vertical alignment, from 0 (start) to 1 (end).
|
|
673
|
+
* @since 1.0
|
|
674
|
+
*/
|
|
675
|
+
yalign?: number;
|
|
676
|
+
}
|
|
677
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
678
|
+
export type HdySqueezerConstructOnly = GtkContainerConstructOnly | GtkBuildableConstructOnly | GtkOrientableConstructOnly;
|
|
679
|
+
|
|
680
|
+
/** A page used for empty/error states and similar use-cases. */
|
|
681
|
+
export interface HdyStatusPageProps extends GtkBinProps, GtkBuildableProps {
|
|
682
|
+
/**
|
|
683
|
+
* The description to be displayed below the title.
|
|
684
|
+
* @since 1.2
|
|
685
|
+
*/
|
|
686
|
+
description?: string | null;
|
|
687
|
+
/**
|
|
688
|
+
* The name of the icon to be used.
|
|
689
|
+
* @since 1.2
|
|
690
|
+
*/
|
|
691
|
+
'icon-name'?: string | null;
|
|
692
|
+
/**
|
|
693
|
+
* The title to be displayed below the icon.
|
|
694
|
+
* @since 1.2
|
|
695
|
+
*/
|
|
696
|
+
title?: string | null;
|
|
697
|
+
}
|
|
698
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
699
|
+
export type HdyStatusPageConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
700
|
+
|
|
701
|
+
/** An interface for swipeable widgets. */
|
|
702
|
+
export interface HdySwipeableProps extends GtkWidgetProps {
|
|
703
|
+
}
|
|
704
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
705
|
+
export type HdySwipeableConstructOnly = GtkWidgetConstructOnly;
|
|
706
|
+
|
|
707
|
+
/** A tab bar for [class@TabView]. */
|
|
708
|
+
export interface HdyTabBarProps extends GtkBinProps, GtkBuildableProps {
|
|
709
|
+
/**
|
|
710
|
+
* Whether tabs automatically hide.
|
|
711
|
+
* @since 1.2
|
|
712
|
+
*/
|
|
713
|
+
autohide?: boolean;
|
|
714
|
+
/**
|
|
715
|
+
* The widget shown after the tabs.
|
|
716
|
+
* @since 1.2
|
|
717
|
+
*/
|
|
718
|
+
'end-action-widget'?: Gtk.Widget | null;
|
|
719
|
+
/**
|
|
720
|
+
* Whether tabs should expand.
|
|
721
|
+
* @since 1.2
|
|
722
|
+
*/
|
|
723
|
+
'expand-tabs'?: boolean;
|
|
724
|
+
/**
|
|
725
|
+
* Extra drag destination targets.
|
|
726
|
+
* @since 1.2
|
|
727
|
+
*/
|
|
728
|
+
'extra-drag-dest-targets'?: Gtk.TargetList | null;
|
|
729
|
+
/**
|
|
730
|
+
* Whether tabs use inverted layout.
|
|
731
|
+
* @since 1.2
|
|
732
|
+
*/
|
|
733
|
+
inverted?: boolean;
|
|
734
|
+
/**
|
|
735
|
+
* The widget shown before the tabs.
|
|
736
|
+
* @since 1.2
|
|
737
|
+
*/
|
|
738
|
+
'start-action-widget'?: Gtk.Widget | null;
|
|
739
|
+
/**
|
|
740
|
+
* The [class@TabView] the tab bar controls.
|
|
741
|
+
* @since 1.2
|
|
742
|
+
*/
|
|
743
|
+
view?: Handy.TabView | null;
|
|
744
|
+
}
|
|
745
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
746
|
+
export type HdyTabBarConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
747
|
+
|
|
748
|
+
/** A dynamic tabbed container. */
|
|
749
|
+
export interface HdyTabViewProps extends GtkBinProps, GtkBuildableProps {
|
|
750
|
+
/**
|
|
751
|
+
* Default page icon.
|
|
752
|
+
* @since 1.2
|
|
753
|
+
*/
|
|
754
|
+
'default-icon'?: Gio.Icon;
|
|
755
|
+
/**
|
|
756
|
+
* Tab context menu model.
|
|
757
|
+
* @since 1.2
|
|
758
|
+
*/
|
|
759
|
+
'menu-model'?: Gio.MenuModel | null;
|
|
760
|
+
/**
|
|
761
|
+
* The currently selected page.
|
|
762
|
+
* @since 1.2
|
|
763
|
+
*/
|
|
764
|
+
'selected-page'?: Handy.TabPage | null;
|
|
765
|
+
/**
|
|
766
|
+
* Tab shortcut widget.
|
|
767
|
+
* @since 1.2
|
|
768
|
+
*/
|
|
769
|
+
'shortcut-widget'?: Gtk.Widget | null;
|
|
770
|
+
}
|
|
771
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
772
|
+
export type HdyTabViewConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
773
|
+
|
|
774
|
+
/** A simple title bar container. */
|
|
775
|
+
export interface HdyTitleBarProps extends GtkBinProps, GtkBuildableProps {
|
|
776
|
+
/**
|
|
777
|
+
* Whether or not the title bar is in selection mode.
|
|
778
|
+
* @since 1.0
|
|
779
|
+
*/
|
|
780
|
+
'selection-mode'?: boolean;
|
|
781
|
+
}
|
|
782
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
783
|
+
export type HdyTitleBarConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
784
|
+
|
|
785
|
+
/** An adaptive view switcher. */
|
|
786
|
+
export interface HdyViewSwitcherProps extends GtkBinProps, GtkBuildableProps {
|
|
787
|
+
/**
|
|
788
|
+
* The preferred place to ellipsize the string.
|
|
789
|
+
* @since 1.0
|
|
790
|
+
*/
|
|
791
|
+
'narrow-ellipsize'?: PangoEllipsizeModeNick | Pango.EllipsizeMode;
|
|
792
|
+
/**
|
|
793
|
+
* The policy to determine which mode to use.
|
|
794
|
+
* @since 1.0
|
|
795
|
+
*/
|
|
796
|
+
policy?: HdyViewSwitcherPolicyNick | Handy.ViewSwitcherPolicy;
|
|
797
|
+
/**
|
|
798
|
+
* The [class@Gtk.Stack] the view switcher controls.
|
|
799
|
+
* @since 1.0
|
|
800
|
+
*/
|
|
801
|
+
stack?: Gtk.Stack | null;
|
|
802
|
+
}
|
|
803
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
804
|
+
export type HdyViewSwitcherConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
805
|
+
|
|
806
|
+
/** A view switcher action bar. */
|
|
807
|
+
export interface HdyViewSwitcherBarProps extends GtkBinProps, GtkBuildableProps {
|
|
808
|
+
/**
|
|
809
|
+
* The policy used to determine which mode to use.
|
|
810
|
+
* @since 1.0
|
|
811
|
+
*/
|
|
812
|
+
policy?: HdyViewSwitcherPolicyNick | Handy.ViewSwitcherPolicy;
|
|
813
|
+
/**
|
|
814
|
+
* Whether the bar should be revealed or hidden.
|
|
815
|
+
* @since 1.0
|
|
816
|
+
*/
|
|
817
|
+
reveal?: boolean;
|
|
818
|
+
/**
|
|
819
|
+
* The [class@Gtk.Stack] the [class@ViewSwitcher] controls.
|
|
820
|
+
* @since 1.0
|
|
821
|
+
*/
|
|
822
|
+
stack?: Gtk.Stack | null;
|
|
823
|
+
}
|
|
824
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
825
|
+
export type HdyViewSwitcherBarConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
826
|
+
|
|
827
|
+
/** A view switcher title. */
|
|
828
|
+
export interface HdyViewSwitcherTitleProps extends GtkBinProps, GtkBuildableProps {
|
|
829
|
+
/**
|
|
830
|
+
* The policy used to determine which mode to use.
|
|
831
|
+
* @since 1.0
|
|
832
|
+
*/
|
|
833
|
+
policy?: HdyViewSwitcherPolicyNick | Handy.ViewSwitcherPolicy;
|
|
834
|
+
/**
|
|
835
|
+
* The [class@Gtk.Stack] the [class@ViewSwitcher] controls.
|
|
836
|
+
* @since 1.0
|
|
837
|
+
*/
|
|
838
|
+
stack?: Gtk.Stack | null;
|
|
839
|
+
/**
|
|
840
|
+
* The subtitle of the [class@ViewSwitcher].
|
|
841
|
+
* @since 1.0
|
|
842
|
+
*/
|
|
843
|
+
subtitle?: string | null;
|
|
844
|
+
/**
|
|
845
|
+
* The title of the [class@ViewSwitcher].
|
|
846
|
+
* @since 1.0
|
|
847
|
+
*/
|
|
848
|
+
title?: string | null;
|
|
849
|
+
/**
|
|
850
|
+
* Whether the bar should be revealed or hidden.
|
|
851
|
+
* @since 1.0
|
|
852
|
+
*/
|
|
853
|
+
'view-switcher-enabled'?: boolean;
|
|
854
|
+
}
|
|
855
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
856
|
+
export type HdyViewSwitcherTitleConstructOnly = GtkBinConstructOnly | GtkBuildableConstructOnly;
|
|
857
|
+
|
|
858
|
+
/** A freeform window. */
|
|
859
|
+
export interface HdyWindowProps extends GtkWindowProps, GtkBuildableProps {
|
|
860
|
+
}
|
|
861
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
862
|
+
export type HdyWindowConstructOnly = GtkWindowConstructOnly | GtkBuildableConstructOnly;
|
|
863
|
+
|
|
864
|
+
/** A bin that acts like a titlebar. */
|
|
865
|
+
export interface HdyWindowHandleProps extends GtkEventBoxProps, GtkBuildableProps {
|
|
866
|
+
}
|
|
867
|
+
/** Settable only at construction — a renderer must REBUILD, not patch. */
|
|
868
|
+
export type HdyWindowHandleConstructOnly = GtkEventBoxConstructOnly | GtkBuildableConstructOnly;
|
|
869
|
+
|
|
870
|
+
// ---------------------------------------------------------------------------
|
|
871
|
+
// The GType-keyed widget map.
|
|
872
|
+
//
|
|
873
|
+
// Keyed by GType because that is also the GtkBuilder XML key and the typelib key. A
|
|
874
|
+
// consumer maps GTypes to tags in ITS convention — kebab for JSX intrinsics, Pascal
|
|
875
|
+
// for a Vue `GlobalComponents`, the class itself for a renderer whose element type
|
|
876
|
+
// is the class. None of those is baked in here.
|
|
877
|
+
//
|
|
878
|
+
// `slotCandidates` is a candidate list and never an answer: derived from methods
|
|
879
|
+
// taking exactly one widget argument. The GIR cannot tell adoption from reference —
|
|
880
|
+
// `set_title_widget` parents its argument and `set_activatable_widget` does not, and
|
|
881
|
+
// both are `void f(GtkWidget*)` at `transfer-ownership="none"`. Curation decides;
|
|
882
|
+
// this is what notices when a release adds a candidate.
|
|
883
|
+
// ---------------------------------------------------------------------------
|
|
884
|
+
|
|
885
|
+
export interface Widgets {
|
|
886
|
+
HdyActionRow: {
|
|
887
|
+
class: Handy.ActionRow;
|
|
888
|
+
props: HdyActionRowProps;
|
|
889
|
+
signals: Handy.ActionRow.SignalSignatures;
|
|
890
|
+
constructOnly: HdyActionRowConstructOnly;
|
|
891
|
+
slotCandidates: {
|
|
892
|
+
'activatable': 'set_activatable_widget';
|
|
893
|
+
'prefix': 'add_prefix';
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
HdyApplicationWindow: {
|
|
897
|
+
class: Handy.ApplicationWindow;
|
|
898
|
+
props: HdyApplicationWindowProps;
|
|
899
|
+
signals: Handy.ApplicationWindow.SignalSignatures;
|
|
900
|
+
constructOnly: HdyApplicationWindowConstructOnly;
|
|
901
|
+
slotCandidates: {};
|
|
902
|
+
};
|
|
903
|
+
HdyAvatar: {
|
|
904
|
+
class: Handy.Avatar;
|
|
905
|
+
props: HdyAvatarProps;
|
|
906
|
+
signals: Handy.Avatar.SignalSignatures;
|
|
907
|
+
constructOnly: HdyAvatarConstructOnly;
|
|
908
|
+
slotCandidates: {};
|
|
909
|
+
};
|
|
910
|
+
HdyCarousel: {
|
|
911
|
+
class: Handy.Carousel;
|
|
912
|
+
props: HdyCarouselProps;
|
|
913
|
+
signals: Handy.Carousel.SignalSignatures;
|
|
914
|
+
constructOnly: HdyCarouselConstructOnly;
|
|
915
|
+
slotCandidates: {};
|
|
916
|
+
};
|
|
917
|
+
HdyCarouselIndicatorDots: {
|
|
918
|
+
class: Handy.CarouselIndicatorDots;
|
|
919
|
+
props: HdyCarouselIndicatorDotsProps;
|
|
920
|
+
signals: Handy.CarouselIndicatorDots.SignalSignatures;
|
|
921
|
+
constructOnly: HdyCarouselIndicatorDotsConstructOnly;
|
|
922
|
+
slotCandidates: {
|
|
923
|
+
'carousel': 'set_carousel';
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
HdyCarouselIndicatorLines: {
|
|
927
|
+
class: Handy.CarouselIndicatorLines;
|
|
928
|
+
props: HdyCarouselIndicatorLinesProps;
|
|
929
|
+
signals: Handy.CarouselIndicatorLines.SignalSignatures;
|
|
930
|
+
constructOnly: HdyCarouselIndicatorLinesConstructOnly;
|
|
931
|
+
slotCandidates: {
|
|
932
|
+
'carousel': 'set_carousel';
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
HdyClamp: {
|
|
936
|
+
class: Handy.Clamp;
|
|
937
|
+
props: HdyClampProps;
|
|
938
|
+
signals: Handy.Clamp.SignalSignatures;
|
|
939
|
+
constructOnly: HdyClampConstructOnly;
|
|
940
|
+
slotCandidates: {};
|
|
941
|
+
};
|
|
942
|
+
HdyComboRow: {
|
|
943
|
+
class: Handy.ComboRow;
|
|
944
|
+
props: HdyComboRowProps;
|
|
945
|
+
signals: Handy.ComboRow.SignalSignatures;
|
|
946
|
+
constructOnly: HdyComboRowConstructOnly;
|
|
947
|
+
slotCandidates: {};
|
|
948
|
+
};
|
|
949
|
+
HdyDeck: {
|
|
950
|
+
class: Handy.Deck;
|
|
951
|
+
props: HdyDeckProps;
|
|
952
|
+
signals: Handy.Deck.SignalSignatures;
|
|
953
|
+
constructOnly: HdyDeckConstructOnly;
|
|
954
|
+
slotCandidates: {
|
|
955
|
+
'visible-child': 'set_visible_child';
|
|
956
|
+
};
|
|
957
|
+
};
|
|
958
|
+
HdyExpanderRow: {
|
|
959
|
+
class: Handy.ExpanderRow;
|
|
960
|
+
props: HdyExpanderRowProps;
|
|
961
|
+
signals: Handy.ExpanderRow.SignalSignatures;
|
|
962
|
+
constructOnly: HdyExpanderRowConstructOnly;
|
|
963
|
+
slotCandidates: {
|
|
964
|
+
'action': 'add_action';
|
|
965
|
+
'prefix': 'add_prefix';
|
|
966
|
+
};
|
|
967
|
+
};
|
|
968
|
+
HdyFlap: {
|
|
969
|
+
class: Handy.Flap;
|
|
970
|
+
props: HdyFlapProps;
|
|
971
|
+
signals: Handy.Flap.SignalSignatures;
|
|
972
|
+
constructOnly: HdyFlapConstructOnly;
|
|
973
|
+
slotCandidates: {
|
|
974
|
+
'content': 'set_content';
|
|
975
|
+
'flap': 'set_flap';
|
|
976
|
+
'separator': 'set_separator';
|
|
977
|
+
};
|
|
978
|
+
};
|
|
979
|
+
HdyHeaderBar: {
|
|
980
|
+
class: Handy.HeaderBar;
|
|
981
|
+
props: HdyHeaderBarProps;
|
|
982
|
+
signals: Handy.HeaderBar.SignalSignatures;
|
|
983
|
+
constructOnly: HdyHeaderBarConstructOnly;
|
|
984
|
+
slotCandidates: {
|
|
985
|
+
'custom-title': 'set_custom_title';
|
|
986
|
+
'end': 'pack_end';
|
|
987
|
+
'start': 'pack_start';
|
|
988
|
+
};
|
|
989
|
+
};
|
|
990
|
+
HdyKeypad: {
|
|
991
|
+
class: Handy.Keypad;
|
|
992
|
+
props: HdyKeypadProps;
|
|
993
|
+
signals: Handy.Keypad.SignalSignatures;
|
|
994
|
+
constructOnly: HdyKeypadConstructOnly;
|
|
995
|
+
slotCandidates: {
|
|
996
|
+
'end-action': 'set_end_action';
|
|
997
|
+
'entry': 'set_entry';
|
|
998
|
+
'start-action': 'set_start_action';
|
|
999
|
+
};
|
|
1000
|
+
};
|
|
1001
|
+
HdyLeaflet: {
|
|
1002
|
+
class: Handy.Leaflet;
|
|
1003
|
+
props: HdyLeafletProps;
|
|
1004
|
+
signals: Handy.Leaflet.SignalSignatures;
|
|
1005
|
+
constructOnly: HdyLeafletConstructOnly;
|
|
1006
|
+
slotCandidates: {
|
|
1007
|
+
'visible-child': 'set_visible_child';
|
|
1008
|
+
};
|
|
1009
|
+
};
|
|
1010
|
+
HdyPreferencesGroup: {
|
|
1011
|
+
class: Handy.PreferencesGroup;
|
|
1012
|
+
props: HdyPreferencesGroupProps;
|
|
1013
|
+
signals: Handy.PreferencesGroup.SignalSignatures;
|
|
1014
|
+
constructOnly: HdyPreferencesGroupConstructOnly;
|
|
1015
|
+
slotCandidates: {};
|
|
1016
|
+
};
|
|
1017
|
+
HdyPreferencesPage: {
|
|
1018
|
+
class: Handy.PreferencesPage;
|
|
1019
|
+
props: HdyPreferencesPageProps;
|
|
1020
|
+
signals: Handy.PreferencesPage.SignalSignatures;
|
|
1021
|
+
constructOnly: HdyPreferencesPageConstructOnly;
|
|
1022
|
+
slotCandidates: {};
|
|
1023
|
+
};
|
|
1024
|
+
HdyPreferencesRow: {
|
|
1025
|
+
class: Handy.PreferencesRow;
|
|
1026
|
+
props: HdyPreferencesRowProps;
|
|
1027
|
+
signals: Handy.PreferencesRow.SignalSignatures;
|
|
1028
|
+
constructOnly: HdyPreferencesRowConstructOnly;
|
|
1029
|
+
slotCandidates: {};
|
|
1030
|
+
};
|
|
1031
|
+
HdyPreferencesWindow: {
|
|
1032
|
+
class: Handy.PreferencesWindow;
|
|
1033
|
+
props: HdyPreferencesWindowProps;
|
|
1034
|
+
signals: Handy.PreferencesWindow.SignalSignatures;
|
|
1035
|
+
constructOnly: HdyPreferencesWindowConstructOnly;
|
|
1036
|
+
slotCandidates: {};
|
|
1037
|
+
};
|
|
1038
|
+
HdySearchBar: {
|
|
1039
|
+
class: Handy.SearchBar;
|
|
1040
|
+
props: HdySearchBarProps;
|
|
1041
|
+
signals: Handy.SearchBar.SignalSignatures;
|
|
1042
|
+
constructOnly: HdySearchBarConstructOnly;
|
|
1043
|
+
slotCandidates: {};
|
|
1044
|
+
};
|
|
1045
|
+
HdySqueezer: {
|
|
1046
|
+
class: Handy.Squeezer;
|
|
1047
|
+
props: HdySqueezerProps;
|
|
1048
|
+
signals: Handy.Squeezer.SignalSignatures;
|
|
1049
|
+
constructOnly: HdySqueezerConstructOnly;
|
|
1050
|
+
slotCandidates: {};
|
|
1051
|
+
};
|
|
1052
|
+
HdyStatusPage: {
|
|
1053
|
+
class: Handy.StatusPage;
|
|
1054
|
+
props: HdyStatusPageProps;
|
|
1055
|
+
signals: Handy.StatusPage.SignalSignatures;
|
|
1056
|
+
constructOnly: HdyStatusPageConstructOnly;
|
|
1057
|
+
slotCandidates: {};
|
|
1058
|
+
};
|
|
1059
|
+
HdyTabBar: {
|
|
1060
|
+
class: Handy.TabBar;
|
|
1061
|
+
props: HdyTabBarProps;
|
|
1062
|
+
signals: Handy.TabBar.SignalSignatures;
|
|
1063
|
+
constructOnly: HdyTabBarConstructOnly;
|
|
1064
|
+
slotCandidates: {
|
|
1065
|
+
'end-action': 'set_end_action_widget';
|
|
1066
|
+
'start-action': 'set_start_action_widget';
|
|
1067
|
+
'view': 'set_view';
|
|
1068
|
+
};
|
|
1069
|
+
};
|
|
1070
|
+
HdyTabView: {
|
|
1071
|
+
class: Handy.TabView;
|
|
1072
|
+
props: HdyTabViewProps;
|
|
1073
|
+
signals: Handy.TabView.SignalSignatures;
|
|
1074
|
+
constructOnly: HdyTabViewConstructOnly;
|
|
1075
|
+
slotCandidates: {
|
|
1076
|
+
'shortcut': 'set_shortcut_widget';
|
|
1077
|
+
};
|
|
1078
|
+
};
|
|
1079
|
+
HdyTitleBar: {
|
|
1080
|
+
class: Handy.TitleBar;
|
|
1081
|
+
props: HdyTitleBarProps;
|
|
1082
|
+
signals: Handy.TitleBar.SignalSignatures;
|
|
1083
|
+
constructOnly: HdyTitleBarConstructOnly;
|
|
1084
|
+
slotCandidates: {};
|
|
1085
|
+
};
|
|
1086
|
+
HdyViewSwitcher: {
|
|
1087
|
+
class: Handy.ViewSwitcher;
|
|
1088
|
+
props: HdyViewSwitcherProps;
|
|
1089
|
+
signals: Handy.ViewSwitcher.SignalSignatures;
|
|
1090
|
+
constructOnly: HdyViewSwitcherConstructOnly;
|
|
1091
|
+
slotCandidates: {
|
|
1092
|
+
'stack': 'set_stack';
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
HdyViewSwitcherBar: {
|
|
1096
|
+
class: Handy.ViewSwitcherBar;
|
|
1097
|
+
props: HdyViewSwitcherBarProps;
|
|
1098
|
+
signals: Handy.ViewSwitcherBar.SignalSignatures;
|
|
1099
|
+
constructOnly: HdyViewSwitcherBarConstructOnly;
|
|
1100
|
+
slotCandidates: {
|
|
1101
|
+
'stack': 'set_stack';
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
HdyViewSwitcherTitle: {
|
|
1105
|
+
class: Handy.ViewSwitcherTitle;
|
|
1106
|
+
props: HdyViewSwitcherTitleProps;
|
|
1107
|
+
signals: Handy.ViewSwitcherTitle.SignalSignatures;
|
|
1108
|
+
constructOnly: HdyViewSwitcherTitleConstructOnly;
|
|
1109
|
+
slotCandidates: {
|
|
1110
|
+
'stack': 'set_stack';
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1113
|
+
HdyWindow: {
|
|
1114
|
+
class: Handy.Window;
|
|
1115
|
+
props: HdyWindowProps;
|
|
1116
|
+
signals: Handy.Window.SignalSignatures;
|
|
1117
|
+
constructOnly: HdyWindowConstructOnly;
|
|
1118
|
+
slotCandidates: {};
|
|
1119
|
+
};
|
|
1120
|
+
HdyWindowHandle: {
|
|
1121
|
+
class: Handy.WindowHandle;
|
|
1122
|
+
props: HdyWindowHandleProps;
|
|
1123
|
+
signals: Handy.WindowHandle.SignalSignatures;
|
|
1124
|
+
constructOnly: HdyWindowHandleConstructOnly;
|
|
1125
|
+
slotCandidates: {};
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
/** Every GType this namespace can create. A consumer derives its own tag map. */
|
|
1130
|
+
export type WidgetGType = keyof Widgets;
|
|
1131
|
+
|
|
1132
|
+
/** The writable, optional, GObject-keyed property surface of one GType. */
|
|
1133
|
+
export type PropsOf<G extends WidgetGType> = Widgets[G]['props'];
|
|
1134
|
+
|
|
1135
|
+
/** The signal table this package already emits, reached by GType. */
|
|
1136
|
+
export type SignalsOf<G extends WidgetGType> = Widgets[G]['signals'];
|
|
1137
|
+
|
|
1138
|
+
/** The instance type — what a `ref`-shaped prop should infer. */
|
|
1139
|
+
export type InstanceOf<G extends WidgetGType> = Widgets[G]['class'];
|
|
1140
|
+
|
|
1141
|
+
/** Property names that can only be set at construction. */
|
|
1142
|
+
export type ConstructOnlyOf<G extends WidgetGType> = Widgets[G]['constructOnly'];
|
|
1143
|
+
|
|
1144
|
+
/** Candidate child slots — see the note above; curation decides. */
|
|
1145
|
+
export type SlotCandidatesOf<G extends WidgetGType> = keyof Widgets[G]['slotCandidates'];
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* The same facts as runtime data, for a consumer that CHECKS them.
|
|
1149
|
+
*
|
|
1150
|
+
* Types are erased, so a spec that asks the installed GTK whether every property
|
|
1151
|
+
* here is a writable ParamSpec, every signal resolvable by `GObject.signal_lookup`
|
|
1152
|
+
* and every nick resolvable through an enum lookup cannot read the interfaces
|
|
1153
|
+
* above. Emitted headlessly with no GTK present, which is exactly why the checking
|
|
1154
|
+
* belongs to the consumer and the DATA belongs here.
|
|
1155
|
+
*/
|
|
1156
|
+
export const SURFACE_PROVENANCE: string;
|
|
1157
|
+
|
|
1158
|
+
/** Declaration GType -> its own settable properties, as GObject registered them. */
|
|
1159
|
+
export const OWN_PROPS: Readonly<Record<string, readonly string[]>>;
|
|
1160
|
+
|
|
1161
|
+
/** Widget GType -> its own signals. */
|
|
1162
|
+
export const OWN_SIGNALS: Readonly<Record<string, readonly string[]>>;
|
|
1163
|
+
|
|
1164
|
+
/** Widget GType -> every declaration its members come from, self first. */
|
|
1165
|
+
export const DECLS: Readonly<Record<string, readonly string[]>>;
|
|
1166
|
+
|
|
1167
|
+
/** Enum GType -> the nicks this surface offers. */
|
|
1168
|
+
export const ENUM_NICKS: Readonly<Record<string, readonly string[]>>;
|
|
1169
|
+
|
|
1170
|
+
/** Widget GType -> slot name -> the method that may adopt a child there. */
|
|
1171
|
+
export const SLOT_CANDIDATES: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* `Type.property` -> the release that introduced it.
|
|
1175
|
+
*
|
|
1176
|
+
* What keeps a runtime cross-check honest across a version gap without an
|
|
1177
|
+
* allowlist: a member the installed library lacks is a defect UNLESS the version
|
|
1178
|
+
* here is newer than the one running.
|
|
1179
|
+
*/
|
|
1180
|
+
export const SINCE: Readonly<Record<string, string>>;
|