@girs/amtk-4 4.0.0-3.0.0-beta.12

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/amtk-4.d.cts ADDED
@@ -0,0 +1,979 @@
1
+
2
+ /*
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
7
+ */
8
+ /**
9
+ * Amtk-4
10
+ */
11
+
12
+ import type Gtk from '@girs/gtk-3.0';
13
+ import type xlib from '@girs/xlib-2.0';
14
+ import type Gdk from '@girs/gdk-3.0';
15
+ import type cairo from '@girs/cairo-1.0';
16
+ import type Pango from '@girs/pango-1.0';
17
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
18
+ import type freetype2 from '@girs/freetype2-2.0';
19
+ import type GObject from '@girs/gobject-2.0';
20
+ import type GLib from '@girs/glib-2.0';
21
+ import type Gio from '@girs/gio-2.0';
22
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
23
+ import type GModule from '@girs/gmodule-2.0';
24
+ import type Atk from '@girs/atk-1.0';
25
+
26
+ /**
27
+ * #AmtkFactoryFlags permits to control how a factory function creates the
28
+ * object, to ignore some steps.
29
+ * @bitfield
30
+ */
31
+ export enum FactoryFlags {
32
+ /**
33
+ * No flags.
34
+ */
35
+ FLAGS_NONE,
36
+ /**
37
+ * Do not call gtk_actionable_set_action_name().
38
+ */
39
+ IGNORE_GACTION,
40
+ /**
41
+ * Do not set an icon.
42
+ */
43
+ IGNORE_ICON,
44
+ /**
45
+ * Do not set a label/short description.
46
+ */
47
+ IGNORE_LABEL,
48
+ /**
49
+ * Do not set a tooltip/long description.
50
+ */
51
+ IGNORE_TOOLTIP,
52
+ /**
53
+ * Ignore completely the accelerators.
54
+ */
55
+ IGNORE_ACCELS,
56
+ /**
57
+ * Ignore the accelerators for
58
+ * documentation purposes only. For example do not add/configure a
59
+ * #GtkAccelLabel.
60
+ */
61
+ IGNORE_ACCELS_FOR_DOC,
62
+ /**
63
+ * Do not call
64
+ * gtk_application_set_accels_for_action().
65
+ */
66
+ IGNORE_ACCELS_FOR_APP,
67
+ }
68
+ /**
69
+ * A wrapper function for g_action_map_add_action_entries() that checks
70
+ * duplicates.
71
+ *
72
+ * This function first checks - for each entry - that the `action_map` doesn't
73
+ * already contain a #GAction with the same name. A warning is printed if an old
74
+ * action will be dropped. In any case, it then calls
75
+ * g_action_map_add_action_entries() with the same arguments as passed to this
76
+ * function.
77
+ *
78
+ * This function also checks if there are duplicates in the `entries` array
79
+ * itself.
80
+ * @param action_map a #GActionMap.
81
+ * @param entries a pointer to the first item in an array of #GActionEntry structs.
82
+ * @param user_data the user data for signal connections.
83
+ */
84
+ export function action_map_add_action_entries_check_dups(action_map: Gio.ActionMap, entries: Gio.ActionEntry[], user_data: any | null): void
85
+ /**
86
+ * Free the resources allocated by Amtk. For example it unrefs the singleton
87
+ * objects.
88
+ *
89
+ * It is not mandatory to call this function, it's just to be friendlier to
90
+ * memory debugging tools. This function is meant to be called at the end of
91
+ * main(). It can be called several times.
92
+ */
93
+ export function finalize(): void
94
+ /**
95
+ * Initializes the Amtk library (e.g. for the internationalization).
96
+ *
97
+ * This function can be called several times, but is meant to be called at the
98
+ * beginning of main(), before any other Amtk function call.
99
+ */
100
+ export function init(): void
101
+ export function menu_item_get_long_description(menu_item: Gtk.MenuItem): string | null
102
+ /**
103
+ * Sets an icon to a #GtkMenuItem.
104
+ *
105
+ * If the child widget of `item` is already a #GtkBox, all #GtkImage widgets
106
+ * inside that box are first destroyed. A #GtkImage for `icon_name` is then
107
+ * inserted to the box.
108
+ *
109
+ * If the child widget of `item` is not a #GtkBox (it's usually the
110
+ * #GtkAccelLabel), it is replaced by a new #GtkBox and the initial child widget
111
+ * is inserted to the #GtkBox, alongside the icon.
112
+ *
113
+ * As a consequence, if you want to call functions on the #GtkAccelLabel, it's
114
+ * easier to do it before calling this function.
115
+ * @param item a #GtkMenuItem.
116
+ * @param icon_name an icon name.
117
+ */
118
+ export function menu_item_set_icon_name(item: Gtk.MenuItem, icon_name: string | null): void
119
+ /**
120
+ * Sets the long description of `menu_item`. A possible use-case is to display it
121
+ * in a #GtkStatusbar, or as a tooltip.
122
+ * @param menu_item a #GtkMenuItem.
123
+ * @param long_description the long description, or %NULL to unset it.
124
+ */
125
+ export function menu_item_set_long_description(menu_item: Gtk.MenuItem, long_description: string | null): void
126
+ /**
127
+ * Utility function to be able to port an application gradually to #GAction,
128
+ * when #GtkUIManager and #GtkAction are still used. Porting to #GAction should
129
+ * be the first step.
130
+ *
131
+ * For `detailed_g_action_name_without_prefix,` see the
132
+ * g_action_parse_detailed_name() function. The `"app."` or `"win."` prefix (or
133
+ * any other #GActionMap prefix) must not be included in
134
+ * `detailed_g_action_name_without_prefix`. For example a valid
135
+ * `detailed_g_action_name_without_prefix` is `"open"` or
136
+ * `"insert-command::foobar"`.
137
+ *
138
+ * The same #GAction can be bound to several #GtkAction's (with different
139
+ * parameter values for the #GAction), but the reverse is not true, one
140
+ * #GtkAction cannot be bound to several #GAction's.
141
+ *
142
+ * This function:
143
+ * - Calls g_action_activate() when the #GtkAction #GtkAction::activate signal
144
+ * is emitted.
145
+ * - Binds the #GAction #GAction:enabled property to the #GtkAction
146
+ * #GtkAction:sensitive property. The binding is done with the
147
+ * %G_BINDING_BIDIRECTIONAL and %G_BINDING_SYNC_CREATE flags, the source is
148
+ * the #GAction and the target is the #GtkAction.
149
+ *
150
+ * When using this function, you should set the callback to %NULL in the
151
+ * corresponding #GtkActionEntry.
152
+ * @param g_action_map a #GActionMap.
153
+ * @param detailed_g_action_name_without_prefix a detailed #GAction name without the #GActionMap prefix; the #GAction must be present in `g_action_map`.
154
+ * @param gtk_action_group a #GtkActionGroup.
155
+ * @param gtk_action_name a #GtkAction name present in `gtk_action_group`.
156
+ */
157
+ export function utils_bind_g_action_to_gtk_action(g_action_map: Gio.ActionMap, detailed_g_action_name_without_prefix: string | null, gtk_action_group: Gtk.ActionGroup, gtk_action_name: string | null): void
158
+ /**
159
+ * Utility function to be able to port an application gradually to #GAction and
160
+ * #AmtkActionInfo, when #GtkUIManager is still used. This function goes one
161
+ * step further compared to amtk_utils_bind_g_action_to_gtk_action(). With
162
+ * amtk_utils_bind_g_action_to_gtk_action(), only the #GAction must exist. With
163
+ * amtk_utils_create_gtk_action(), both the #GAction and #AmtkActionInfo must
164
+ * exist (so typically you need to convert the #GtkActionEntry's into
165
+ * #AmtkActionInfoEntry's).
166
+ *
167
+ * This function creates a #GtkAction from a #GAction plus its corresponding
168
+ * #AmtkActionInfo.
169
+ *
170
+ * The #GtkAction is created with the information provided by the
171
+ * #AmtkActionInfo (retrieved with amtk_action_info_central_store_lookup() with
172
+ * `detailed_g_action_name_with_prefix` as argument). Only the first accelerator
173
+ * is taken into account.
174
+ *
175
+ * Once the #GtkAction is created, it is added to the `gtk_action_group,` and
176
+ * amtk_utils_bind_g_action_to_gtk_action() is called.
177
+ * @param g_action_map a #GActionMap.
178
+ * @param detailed_g_action_name_with_prefix a detailed #GAction name with the #GActionMap prefix; the #GAction must be present in `g_action_map`.
179
+ * @param gtk_action_group a #GtkActionGroup.
180
+ * @param gtk_action_name the name of the #GtkAction to create and add to `gtk_action_group`.
181
+ */
182
+ export function utils_create_gtk_action(g_action_map: Gio.ActionMap, detailed_g_action_name_with_prefix: string | null, gtk_action_group: Gtk.ActionGroup, gtk_action_name: string | null): void
183
+ /**
184
+ * Gets the URI of `item`. `item` must be a child of `menu`. `menu` must be a
185
+ * #GtkRecentChooserMenu.
186
+ *
187
+ * This function has been written because the value returned by
188
+ * gtk_recent_chooser_get_current_uri() is not updated when #GtkMenuItem's of a
189
+ * #GtkRecentChooserMenu are selected/deselected.
190
+ * @param menu a #GtkRecentChooserMenu.
191
+ * @param item a #GtkMenuItem.
192
+ * @returns the URI of @item. Free with g_free() when no longer needed.
193
+ */
194
+ export function utils_recent_chooser_menu_get_item_uri(menu: Gtk.RecentChooserMenu, item: Gtk.MenuItem): string | null
195
+ export module ActionInfoCentralStore {
196
+
197
+ // Constructor properties interface
198
+
199
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
200
+ }
201
+
202
+ }
203
+
204
+ export interface ActionInfoCentralStore {
205
+
206
+ // Own fields of Amtk-4.Amtk.ActionInfoCentralStore
207
+
208
+ parent: GObject.Object
209
+ priv: ActionInfoCentralStorePrivate
210
+
211
+ // Owm methods of Amtk-4.Amtk.ActionInfoCentralStore
212
+
213
+ lookup(action_name: string | null): ActionInfo
214
+
215
+ // Class property signals of Amtk-4.Amtk.ActionInfoCentralStore
216
+
217
+ connect(sigName: string, callback: (...args: any[]) => void): number
218
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
219
+ emit(sigName: string, ...args: any[]): void
220
+ disconnect(id: number): void
221
+ }
222
+
223
+ export class ActionInfoCentralStore extends GObject.Object {
224
+
225
+ // Own properties of Amtk-4.Amtk.ActionInfoCentralStore
226
+
227
+ static name: string
228
+ static $gtype: GObject.GType<ActionInfoCentralStore>
229
+
230
+ // Constructors of Amtk-4.Amtk.ActionInfoCentralStore
231
+
232
+ constructor(config?: ActionInfoCentralStore.ConstructorProperties)
233
+ _init(config?: ActionInfoCentralStore.ConstructorProperties): void
234
+ static get_singleton(): ActionInfoCentralStore
235
+ }
236
+
237
+ export module ActionInfoStore {
238
+
239
+ // Constructor properties interface
240
+
241
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
242
+ }
243
+
244
+ }
245
+
246
+ export interface ActionInfoStore {
247
+
248
+ // Own fields of Amtk-4.Amtk.ActionInfoStore
249
+
250
+ parent: GObject.Object
251
+ priv: ActionInfoStorePrivate
252
+
253
+ // Owm methods of Amtk-4.Amtk.ActionInfoStore
254
+
255
+ /**
256
+ * Inserts `info` into `store` and into the #AmtkActionInfoCentralStore. Both the
257
+ * `store` and central store must <emphasis>not</emphasis> already contain an
258
+ * #AmtkActionInfo with the same action name. The stores take their own
259
+ * reference on `info`.
260
+ * @param info an #AmtkActionInfo.
261
+ */
262
+ add(info: ActionInfo): void
263
+ /**
264
+ * Calls amtk_action_info_store_add() for each entry.
265
+ *
266
+ * If `translation_domain` is not %NULL, g_dgettext() is used to translate the
267
+ * `label` and `tooltip` of each entry before setting them to the #AmtkActionInfo.
268
+ *
269
+ * An API similar to g_action_map_add_action_entries().
270
+ * @param entries a pointer to the first item in an array of #AmtkActionInfoEntry structs.
271
+ * @param translation_domain a gettext domain, or %NULL.
272
+ */
273
+ add_entries(entries: ActionInfoEntry[], translation_domain: string | null): void
274
+ /**
275
+ * Checks for each #AmtkActionInfo of `store` that it has been used (see
276
+ * amtk_action_info_has_been_used()). If an #AmtkActionInfo has not been used, a
277
+ * warning is printed and might indicate dead code.
278
+ *
279
+ * You probably want to call this function on the application store after
280
+ * creating the menu and toolbar. But it can also be useful for a store provided
281
+ * by a library, to easily see which actions are not used by the application.
282
+ */
283
+ check_all_used(): void
284
+ lookup(action_name: string | null): ActionInfo
285
+
286
+ // Class property signals of Amtk-4.Amtk.ActionInfoStore
287
+
288
+ connect(sigName: string, callback: (...args: any[]) => void): number
289
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
290
+ emit(sigName: string, ...args: any[]): void
291
+ disconnect(id: number): void
292
+ }
293
+
294
+ export class ActionInfoStore extends GObject.Object {
295
+
296
+ // Own properties of Amtk-4.Amtk.ActionInfoStore
297
+
298
+ static name: string
299
+ static $gtype: GObject.GType<ActionInfoStore>
300
+
301
+ // Constructors of Amtk-4.Amtk.ActionInfoStore
302
+
303
+ constructor(config?: ActionInfoStore.ConstructorProperties)
304
+ constructor()
305
+ static new(): ActionInfoStore
306
+ _init(config?: ActionInfoStore.ConstructorProperties): void
307
+ }
308
+
309
+ export module ApplicationWindow {
310
+
311
+ // Constructor properties interface
312
+
313
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
314
+
315
+ // Own constructor properties of Amtk-4.Amtk.ApplicationWindow
316
+
317
+ /**
318
+ * The #GtkApplicationWindow.
319
+ */
320
+ application_window?: Gtk.ApplicationWindow | null
321
+ /**
322
+ * The #GtkStatusbar. %NULL by default.
323
+ */
324
+ statusbar?: Gtk.Statusbar | null
325
+ }
326
+
327
+ }
328
+
329
+ export interface ApplicationWindow {
330
+
331
+ // Own properties of Amtk-4.Amtk.ApplicationWindow
332
+
333
+ /**
334
+ * The #GtkApplicationWindow.
335
+ */
336
+ readonly application_window: Gtk.ApplicationWindow
337
+ /**
338
+ * The #GtkStatusbar. %NULL by default.
339
+ */
340
+ statusbar: Gtk.Statusbar
341
+
342
+ // Own fields of Amtk-4.Amtk.ApplicationWindow
343
+
344
+ parent: GObject.Object
345
+ priv: ApplicationWindowPrivate
346
+
347
+ // Owm methods of Amtk-4.Amtk.ApplicationWindow
348
+
349
+ /**
350
+ * Connects to the #AmtkMenuShell::menu-item-selected and
351
+ * #AmtkMenuShell::menu-item-deselected signals of `menu_shell` to push/pop the
352
+ * long description of #GtkMenuItem's to the #AmtkApplicationWindow:statusbar.
353
+ *
354
+ * The long description is retrieved with amtk_menu_item_get_long_description().
355
+ * So amtk_menu_item_set_long_description() must have been called, which is the
356
+ * case if the #GtkMenuItem has been created with #AmtkFactory.
357
+ * @param menu_shell a #GtkMenuShell.
358
+ */
359
+ connect_menu_to_statusbar(menu_shell: Gtk.MenuShell): void
360
+ /**
361
+ * An alternative to gtk_recent_chooser_set_show_tips(). Shows the full path in
362
+ * the #AmtkApplicationWindow:statusbar when a #GtkMenuItem of `menu` is
363
+ * selected.
364
+ *
365
+ * The full path is retrieved with
366
+ * amtk_utils_recent_chooser_menu_get_item_uri().
367
+ * @param menu a #GtkRecentChooserMenu.
368
+ */
369
+ connect_recent_chooser_menu_to_statusbar(menu: Gtk.RecentChooserMenu): void
370
+ /**
371
+ * Creates a simple and generic #GtkRecentChooserMenu.
372
+ *
373
+ * The #GtkRecentChooser is configured to show files only recently used with the
374
+ * current application, as returned by g_get_application_name(). If recent files
375
+ * are added to the default #GtkRecentManager with
376
+ * gtk_recent_manager_add_item(), the files will normally show up in the
377
+ * #GtkRecentChooserMenu.
378
+ *
379
+ * The #GtkRecentChooserMenu is connected to the statusbar with
380
+ * amtk_application_window_connect_recent_chooser_menu_to_statusbar().
381
+ *
382
+ * When the #GtkRecentChooser::item-activated signal is emitted,
383
+ * g_application_open() is called (with an empty hint), so the #GApplication
384
+ * must have the %G_APPLICATION_HANDLES_OPEN flag set.
385
+ * @returns a new #GtkRecentChooserMenu.
386
+ */
387
+ create_open_recent_menu(): Gtk.Widget
388
+ /**
389
+ * Creates a #GtkMenuItem with a simple and generic #GtkRecentChooserMenu as
390
+ * submenu. The #GtkRecentChooserMenu is created with
391
+ * amtk_application_window_create_open_recent_menu().
392
+ * @returns a new #GtkMenuItem.
393
+ */
394
+ create_open_recent_menu_item(): Gtk.Widget
395
+ get_application_window(): Gtk.ApplicationWindow
396
+ get_statusbar(): Gtk.Statusbar | null
397
+ /**
398
+ * Sets the #AmtkApplicationWindow:statusbar property.
399
+ * @param statusbar a #GtkStatusbar, or %NULL.
400
+ */
401
+ set_statusbar(statusbar: Gtk.Statusbar | null): void
402
+
403
+ // Class property signals of Amtk-4.Amtk.ApplicationWindow
404
+
405
+ connect(sigName: "notify::application-window", callback: (($obj: ApplicationWindow, pspec: GObject.ParamSpec) => void)): number
406
+ connect_after(sigName: "notify::application-window", callback: (($obj: ApplicationWindow, pspec: GObject.ParamSpec) => void)): number
407
+ emit(sigName: "notify::application-window", ...args: any[]): void
408
+ connect(sigName: "notify::statusbar", callback: (($obj: ApplicationWindow, pspec: GObject.ParamSpec) => void)): number
409
+ connect_after(sigName: "notify::statusbar", callback: (($obj: ApplicationWindow, pspec: GObject.ParamSpec) => void)): number
410
+ emit(sigName: "notify::statusbar", ...args: any[]): void
411
+ connect(sigName: string, callback: (...args: any[]) => void): number
412
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
413
+ emit(sigName: string, ...args: any[]): void
414
+ disconnect(id: number): void
415
+ }
416
+
417
+ export class ApplicationWindow extends GObject.Object {
418
+
419
+ // Own properties of Amtk-4.Amtk.ApplicationWindow
420
+
421
+ static name: string
422
+ static $gtype: GObject.GType<ApplicationWindow>
423
+
424
+ // Constructors of Amtk-4.Amtk.ApplicationWindow
425
+
426
+ constructor(config?: ApplicationWindow.ConstructorProperties)
427
+ _init(config?: ApplicationWindow.ConstructorProperties): void
428
+ /**
429
+ * Returns the #AmtkApplicationWindow of `gtk_window`. The returned object is
430
+ * guaranteed to be the same for the lifetime of `gtk_window`.
431
+ * @param gtk_window a #GtkApplicationWindow.
432
+ * @returns the #AmtkApplicationWindow of @gtk_window.
433
+ */
434
+ static get_from_gtk_application_window(gtk_window: Gtk.ApplicationWindow): ApplicationWindow
435
+ }
436
+
437
+ export module Factory {
438
+
439
+ // Constructor properties interface
440
+
441
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
442
+
443
+ // Own constructor properties of Amtk-4.Amtk.Factory
444
+
445
+ /**
446
+ * The associated #GtkApplication (it is optional, it can be %NULL).
447
+ * #AmtkFactory has a weak reference to the #GtkApplication.
448
+ */
449
+ application?: Gtk.Application | null
450
+ /**
451
+ * The default #AmtkFactoryFlags.
452
+ */
453
+ default_flags?: FactoryFlags | null
454
+ }
455
+
456
+ }
457
+
458
+ export interface Factory {
459
+
460
+ // Own properties of Amtk-4.Amtk.Factory
461
+
462
+ /**
463
+ * The associated #GtkApplication (it is optional, it can be %NULL).
464
+ * #AmtkFactory has a weak reference to the #GtkApplication.
465
+ */
466
+ readonly application: Gtk.Application
467
+ /**
468
+ * The default #AmtkFactoryFlags.
469
+ */
470
+ default_flags: FactoryFlags
471
+
472
+ // Own fields of Amtk-4.Amtk.Factory
473
+
474
+ parent: GObject.Object
475
+ priv: FactoryPrivate
476
+
477
+ // Owm methods of Amtk-4.Amtk.Factory
478
+
479
+ /**
480
+ * Creates a new #GtkCheckMenuItem for `action_name` with the
481
+ * #AmtkFactory:default-flags.
482
+ *
483
+ * See the documentation of amtk_factory_create_check_menu_item_full() for more
484
+ * information.
485
+ * @param action_name an action name.
486
+ * @returns a new #GtkCheckMenuItem for @action_name.
487
+ */
488
+ create_check_menu_item(action_name: string | null): Gtk.Widget
489
+ /**
490
+ * This function ignores the #AmtkFactory:default-flags property and takes the
491
+ * `flags` argument instead.
492
+ *
493
+ * Note that since it is a #GtkCheckMenuItem the icon is not set, even if it
494
+ * would be possible with amtk_menu_item_set_icon_name().
495
+ *
496
+ * If the action controls a boolean property, think about using
497
+ * #GPropertyAction.
498
+ * @param action_name an action name.
499
+ * @param flags #AmtkFactoryFlags.
500
+ * @returns a new #GtkCheckMenuItem for @action_name.
501
+ */
502
+ create_check_menu_item_full(action_name: string | null, flags: FactoryFlags): Gtk.Widget
503
+ /**
504
+ * Creates a new #GtkMenuItem for `action_name` with the
505
+ * #AmtkFactory:default-flags.
506
+ * @param action_name an action name.
507
+ * @returns a new #GtkMenuItem for @action_name.
508
+ */
509
+ create_menu_item(action_name: string | null): Gtk.Widget
510
+ /**
511
+ * This function ignores the #AmtkFactory:default-flags property and takes the
512
+ * `flags` argument instead.
513
+ * @param action_name an action name.
514
+ * @param flags #AmtkFactoryFlags.
515
+ * @returns a new #GtkMenuItem for @action_name.
516
+ */
517
+ create_menu_item_full(action_name: string | null, flags: FactoryFlags): Gtk.Widget
518
+ /**
519
+ * Creates a new #GtkMenuToolButton for `action_name` with the
520
+ * #AmtkFactory:default-flags.
521
+ *
522
+ * See the documentation of amtk_factory_create_menu_tool_button_full() for more
523
+ * information.
524
+ * @param action_name an action name.
525
+ * @returns a new #GtkMenuToolButton for @action_name.
526
+ */
527
+ create_menu_tool_button(action_name: string | null): Gtk.MenuToolButton
528
+ /**
529
+ * This function ignores the #AmtkFactory:default-flags property and takes the
530
+ * `flags` argument instead.
531
+ *
532
+ * After calling this function, you need to use the #GtkMenuToolButton API to
533
+ * set the menu and also possibly set a tooltip to the arrow.
534
+ * @param action_name an action name.
535
+ * @param flags #AmtkFactoryFlags.
536
+ * @returns a new #GtkMenuToolButton for @action_name.
537
+ */
538
+ create_menu_tool_button_full(action_name: string | null, flags: FactoryFlags): Gtk.MenuToolButton
539
+ /**
540
+ * Creates a new #GtkToolButton for `action_name` with the
541
+ * #AmtkFactory:default-flags.
542
+ * @param action_name an action name.
543
+ * @returns a new #GtkToolButton for @action_name.
544
+ */
545
+ create_tool_button(action_name: string | null): Gtk.ToolItem
546
+ /**
547
+ * This function ignores the #AmtkFactory:default-flags property and takes the
548
+ * `flags` argument instead.
549
+ * @param action_name an action name.
550
+ * @param flags #AmtkFactoryFlags.
551
+ * @returns a new #GtkToolButton for @action_name.
552
+ */
553
+ create_tool_button_full(action_name: string | null, flags: FactoryFlags): Gtk.ToolItem
554
+ get_application(): Gtk.Application | null
555
+ get_default_flags(): FactoryFlags
556
+ /**
557
+ * Sets the #AmtkFactory:default-flags property.
558
+ * @param default_flags the new value.
559
+ */
560
+ set_default_flags(default_flags: FactoryFlags): void
561
+
562
+ // Class property signals of Amtk-4.Amtk.Factory
563
+
564
+ connect(sigName: "notify::application", callback: (($obj: Factory, pspec: GObject.ParamSpec) => void)): number
565
+ connect_after(sigName: "notify::application", callback: (($obj: Factory, pspec: GObject.ParamSpec) => void)): number
566
+ emit(sigName: "notify::application", ...args: any[]): void
567
+ connect(sigName: "notify::default-flags", callback: (($obj: Factory, pspec: GObject.ParamSpec) => void)): number
568
+ connect_after(sigName: "notify::default-flags", callback: (($obj: Factory, pspec: GObject.ParamSpec) => void)): number
569
+ emit(sigName: "notify::default-flags", ...args: any[]): void
570
+ connect(sigName: string, callback: (...args: any[]) => void): number
571
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
572
+ emit(sigName: string, ...args: any[]): void
573
+ disconnect(id: number): void
574
+ }
575
+
576
+ export class Factory extends GObject.Object {
577
+
578
+ // Own properties of Amtk-4.Amtk.Factory
579
+
580
+ static name: string
581
+ static $gtype: GObject.GType<Factory>
582
+
583
+ // Constructors of Amtk-4.Amtk.Factory
584
+
585
+ constructor(config?: Factory.ConstructorProperties)
586
+ /**
587
+ * Creates a new #AmtkFactory object. Associating a #GtkApplication is optional,
588
+ * if it is %NULL gtk_application_set_accels_for_action() won't be called.
589
+ * @constructor
590
+ * @param application a #GtkApplication, or %NULL.
591
+ * @returns a new #AmtkFactory.
592
+ */
593
+ constructor(application: Gtk.Application | null)
594
+ /**
595
+ * Creates a new #AmtkFactory object. Associating a #GtkApplication is optional,
596
+ * if it is %NULL gtk_application_set_accels_for_action() won't be called.
597
+ * @constructor
598
+ * @param application a #GtkApplication, or %NULL.
599
+ * @returns a new #AmtkFactory.
600
+ */
601
+ static new(application: Gtk.Application | null): Factory
602
+ /**
603
+ * Calls amtk_factory_new() with g_application_get_default() (it must be a
604
+ * #GtkApplication).
605
+ * @constructor
606
+ * @returns a new #AmtkFactory with the default #GtkApplication.
607
+ */
608
+ static new_with_default_application(): Factory
609
+ _init(config?: Factory.ConstructorProperties): void
610
+ }
611
+
612
+ export module MenuShell {
613
+
614
+ // Signal callback interfaces
615
+
616
+ /**
617
+ * Signal callback interface for `menu-item-deselected`
618
+ */
619
+ export interface MenuItemDeselectedSignalCallback {
620
+ ($obj: MenuShell, menu_item: Gtk.MenuItem): void
621
+ }
622
+
623
+ /**
624
+ * Signal callback interface for `menu-item-selected`
625
+ */
626
+ export interface MenuItemSelectedSignalCallback {
627
+ ($obj: MenuShell, menu_item: Gtk.MenuItem): void
628
+ }
629
+
630
+
631
+ // Constructor properties interface
632
+
633
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
634
+
635
+ // Own constructor properties of Amtk-4.Amtk.MenuShell
636
+
637
+ /**
638
+ * The #GtkMenuShell.
639
+ */
640
+ menu_shell?: Gtk.MenuShell | null
641
+ }
642
+
643
+ }
644
+
645
+ export interface MenuShell {
646
+
647
+ // Own properties of Amtk-4.Amtk.MenuShell
648
+
649
+ /**
650
+ * The #GtkMenuShell.
651
+ */
652
+ readonly menu_shell: Gtk.MenuShell
653
+
654
+ // Own fields of Amtk-4.Amtk.MenuShell
655
+
656
+ parent: GObject.Object
657
+ priv: MenuShellPrivate
658
+
659
+ // Owm methods of Amtk-4.Amtk.MenuShell
660
+
661
+ get_menu_shell(): Gtk.MenuShell
662
+
663
+ // Own virtual methods of Amtk-4.Amtk.MenuShell
664
+
665
+ vfunc_menu_item_deselected(menu_item: Gtk.MenuItem): void
666
+ vfunc_menu_item_selected(menu_item: Gtk.MenuItem): void
667
+
668
+ // Own signals of Amtk-4.Amtk.MenuShell
669
+
670
+ connect(sigName: "menu-item-deselected", callback: MenuShell.MenuItemDeselectedSignalCallback): number
671
+ connect_after(sigName: "menu-item-deselected", callback: MenuShell.MenuItemDeselectedSignalCallback): number
672
+ emit(sigName: "menu-item-deselected", menu_item: Gtk.MenuItem, ...args: any[]): void
673
+ connect(sigName: "menu-item-selected", callback: MenuShell.MenuItemSelectedSignalCallback): number
674
+ connect_after(sigName: "menu-item-selected", callback: MenuShell.MenuItemSelectedSignalCallback): number
675
+ emit(sigName: "menu-item-selected", menu_item: Gtk.MenuItem, ...args: any[]): void
676
+
677
+ // Class property signals of Amtk-4.Amtk.MenuShell
678
+
679
+ connect(sigName: "notify::menu-shell", callback: (($obj: MenuShell, pspec: GObject.ParamSpec) => void)): number
680
+ connect_after(sigName: "notify::menu-shell", callback: (($obj: MenuShell, pspec: GObject.ParamSpec) => void)): number
681
+ emit(sigName: "notify::menu-shell", ...args: any[]): void
682
+ connect(sigName: string, callback: (...args: any[]) => void): number
683
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
684
+ emit(sigName: string, ...args: any[]): void
685
+ disconnect(id: number): void
686
+ }
687
+
688
+ export class MenuShell extends GObject.Object {
689
+
690
+ // Own properties of Amtk-4.Amtk.MenuShell
691
+
692
+ static name: string
693
+ static $gtype: GObject.GType<MenuShell>
694
+
695
+ // Constructors of Amtk-4.Amtk.MenuShell
696
+
697
+ constructor(config?: MenuShell.ConstructorProperties)
698
+ _init(config?: MenuShell.ConstructorProperties): void
699
+ /**
700
+ * Returns the #AmtkMenuShell of `gtk_menu_shell`. The returned object is
701
+ * guaranteed to be the same for the lifetime of `gtk_menu_shell`.
702
+ * @param gtk_menu_shell a #GtkMenuShell.
703
+ * @returns the #AmtkMenuShell of @gtk_menu_shell.
704
+ */
705
+ static get_from_gtk_menu_shell(gtk_menu_shell: Gtk.MenuShell): MenuShell
706
+ }
707
+
708
+ export interface ActionInfo {
709
+
710
+ // Owm methods of Amtk-4.Amtk.ActionInfo
711
+
712
+ copy(): ActionInfo
713
+ /**
714
+ * Returns the accelerators. This function never returns %NULL, it always
715
+ * returns a %NULL-terminated array, to be suitable for
716
+ * gtk_application_set_accels_for_action().
717
+ * @returns a %NULL-terminated array of accelerators in the format understood by gtk_accelerator_parse().
718
+ */
719
+ get_accels(): string[]
720
+ get_action_name(): string | null
721
+ get_icon_name(): string | null
722
+ /**
723
+ * Gets the label. The label has normally a mnemonic.
724
+ * @returns the label (i.e. a short description), or %NULL.
725
+ */
726
+ get_label(): string | null
727
+ get_tooltip(): string | null
728
+ /**
729
+ * Returns whether `info` has been used (for example by an #AmtkFactory
730
+ * function). See also amtk_action_info_store_check_all_used().
731
+ * @returns whether @info has been used.
732
+ */
733
+ has_been_used(): boolean
734
+ /**
735
+ * Mark `info` as used. An #AmtkFactory function that uses an #AmtkActionInfo
736
+ * should call this function. See amtk_action_info_store_check_all_used().
737
+ */
738
+ mark_as_used(): void
739
+ /**
740
+ * Increments the reference count of `info` by one.
741
+ * @returns the passed in @info.
742
+ */
743
+ ref(): ActionInfo
744
+ /**
745
+ * A function similar to gtk_application_set_accels_for_action().
746
+ *
747
+ * `accels` must not be %NULL, it must be a %NULL-terminated array, to be
748
+ * consistent with gtk_application_set_accels_for_action().
749
+ * @param accels a %NULL-terminated array of accelerators in the format understood by gtk_accelerator_parse().
750
+ */
751
+ set_accels(accels: string[]): void
752
+ /**
753
+ * Sets the action name, for example `"win.save"`.
754
+ * @param action_name the action name.
755
+ */
756
+ set_action_name(action_name: string | null): void
757
+ set_icon_name(icon_name: string | null): void
758
+ /**
759
+ * Sets the label with a mnemonic.
760
+ * @param label the label (i.e. a short description), or %NULL.
761
+ */
762
+ set_label(label: string | null): void
763
+ set_tooltip(tooltip: string | null): void
764
+ /**
765
+ * Decrements the reference count of `info` by one. If the reference count drops
766
+ * to 0, `info` is freed.
767
+ */
768
+ unref(): void
769
+ }
770
+
771
+ export class ActionInfo {
772
+
773
+ // Own properties of Amtk-4.Amtk.ActionInfo
774
+
775
+ static name: string
776
+
777
+ // Constructors of Amtk-4.Amtk.ActionInfo
778
+
779
+ constructor()
780
+ static new(): ActionInfo
781
+ /**
782
+ * Creates a new #AmtkActionInfo from an #AmtkActionInfoEntry.
783
+ *
784
+ * If `translation_domain` is not %NULL, g_dgettext() is used to translate the
785
+ * `label` and `tooltip` before setting them to the #AmtkActionInfo.
786
+ * @constructor
787
+ * @param info_entry an #AmtkActionInfoEntry.
788
+ * @param translation_domain a gettext domain, or %NULL.
789
+ * @returns a new #AmtkActionInfo.
790
+ */
791
+ static new_from_entry(info_entry: ActionInfoEntry, translation_domain: string | null): ActionInfo
792
+ }
793
+
794
+ export interface ActionInfoCentralStoreClass {
795
+
796
+ // Own fields of Amtk-4.Amtk.ActionInfoCentralStoreClass
797
+
798
+ parent_class: GObject.ObjectClass
799
+ padding: any[]
800
+ }
801
+
802
+ export abstract class ActionInfoCentralStoreClass {
803
+
804
+ // Own properties of Amtk-4.Amtk.ActionInfoCentralStoreClass
805
+
806
+ static name: string
807
+ }
808
+
809
+ export interface ActionInfoCentralStorePrivate {
810
+ }
811
+
812
+ export class ActionInfoCentralStorePrivate {
813
+
814
+ // Own properties of Amtk-4.Amtk.ActionInfoCentralStorePrivate
815
+
816
+ static name: string
817
+ }
818
+
819
+ export interface ActionInfoEntry {
820
+
821
+ // Own fields of Amtk-4.Amtk.ActionInfoEntry
822
+
823
+ /**
824
+ * the action name.
825
+ * @field
826
+ */
827
+ action_name: string | null
828
+ /**
829
+ * the icon name, or %NULL.
830
+ * @field
831
+ */
832
+ icon_name: string | null
833
+ /**
834
+ * the label (i.e. a short description) with a mnemonic, or %NULL.
835
+ * @field
836
+ */
837
+ label: string | null
838
+ /**
839
+ * the accelerator, in the format understood by gtk_accelerator_parse().
840
+ * Or %NULL.
841
+ * @field
842
+ */
843
+ accel: string | null
844
+ /**
845
+ * the tooltip (i.e. a long description), or %NULL.
846
+ * @field
847
+ */
848
+ tooltip: string | null
849
+ }
850
+
851
+ /**
852
+ * This struct defines a set of information for a single action. It is for use
853
+ * with amtk_action_info_store_add_entries().
854
+ *
855
+ * Like #GActionEntry, it is permissible to use an incomplete initialiser in
856
+ * order to leave some of the later values as %NULL. Additional optional fields
857
+ * may be added in the future.
858
+ * @record
859
+ */
860
+ export class ActionInfoEntry {
861
+
862
+ // Own properties of Amtk-4.Amtk.ActionInfoEntry
863
+
864
+ static name: string
865
+ }
866
+
867
+ export interface ActionInfoStoreClass {
868
+
869
+ // Own fields of Amtk-4.Amtk.ActionInfoStoreClass
870
+
871
+ parent_class: GObject.ObjectClass
872
+ padding: any[]
873
+ }
874
+
875
+ export abstract class ActionInfoStoreClass {
876
+
877
+ // Own properties of Amtk-4.Amtk.ActionInfoStoreClass
878
+
879
+ static name: string
880
+ }
881
+
882
+ export interface ActionInfoStorePrivate {
883
+ }
884
+
885
+ export class ActionInfoStorePrivate {
886
+
887
+ // Own properties of Amtk-4.Amtk.ActionInfoStorePrivate
888
+
889
+ static name: string
890
+ }
891
+
892
+ export interface ApplicationWindowClass {
893
+
894
+ // Own fields of Amtk-4.Amtk.ApplicationWindowClass
895
+
896
+ parent_class: GObject.ObjectClass
897
+ padding: any[]
898
+ }
899
+
900
+ export abstract class ApplicationWindowClass {
901
+
902
+ // Own properties of Amtk-4.Amtk.ApplicationWindowClass
903
+
904
+ static name: string
905
+ }
906
+
907
+ export interface ApplicationWindowPrivate {
908
+ }
909
+
910
+ export class ApplicationWindowPrivate {
911
+
912
+ // Own properties of Amtk-4.Amtk.ApplicationWindowPrivate
913
+
914
+ static name: string
915
+ }
916
+
917
+ export interface FactoryClass {
918
+
919
+ // Own fields of Amtk-4.Amtk.FactoryClass
920
+
921
+ parent_class: GObject.ObjectClass
922
+ padding: any[]
923
+ }
924
+
925
+ export abstract class FactoryClass {
926
+
927
+ // Own properties of Amtk-4.Amtk.FactoryClass
928
+
929
+ static name: string
930
+ }
931
+
932
+ export interface FactoryPrivate {
933
+ }
934
+
935
+ export class FactoryPrivate {
936
+
937
+ // Own properties of Amtk-4.Amtk.FactoryPrivate
938
+
939
+ static name: string
940
+ }
941
+
942
+ export interface MenuShellClass {
943
+
944
+ // Own fields of Amtk-4.Amtk.MenuShellClass
945
+
946
+ parent_class: GObject.ObjectClass
947
+ menu_item_selected: (amtk_menu_shell: MenuShell, menu_item: Gtk.MenuItem) => void
948
+ menu_item_deselected: (amtk_menu_shell: MenuShell, menu_item: Gtk.MenuItem) => void
949
+ padding: any[]
950
+ }
951
+
952
+ export abstract class MenuShellClass {
953
+
954
+ // Own properties of Amtk-4.Amtk.MenuShellClass
955
+
956
+ static name: string
957
+ }
958
+
959
+ export interface MenuShellPrivate {
960
+ }
961
+
962
+ export class MenuShellPrivate {
963
+
964
+ // Own properties of Amtk-4.Amtk.MenuShellPrivate
965
+
966
+ static name: string
967
+ }
968
+
969
+ /**
970
+ * Name of the imported GIR library
971
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
972
+ */
973
+ export const __name__: string
974
+ /**
975
+ * Version of the imported GIR library
976
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
977
+ */
978
+ export const __version__: string
979
+ // END