@girs/budgie-3.0 3.0.0-4.0.0-beta.41

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.
@@ -0,0 +1,1793 @@
1
+ /**
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ *
7
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ import '@girs/gjs';
11
+
12
+ // Module dependencies
13
+ import type Peas from '@girs/peas-2';
14
+ import type Gio from '@girs/gio-2.0';
15
+ import type GObject from '@girs/gobject-2.0';
16
+ import type GLib from '@girs/glib-2.0';
17
+ import type GModule from '@girs/gmodule-2.0';
18
+ import type Gtk from '@girs/gtk-3.0';
19
+ import type xlib from '@girs/xlib-2.0';
20
+ import type Gdk from '@girs/gdk-3.0';
21
+ import type cairo from 'cairo';
22
+ import type Pango from '@girs/pango-1.0';
23
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
24
+ import type freetype2 from '@girs/freetype2-2.0';
25
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
26
+ import type Atk from '@girs/atk-1.0';
27
+
28
+ export namespace Budgie {
29
+ /**
30
+ * Budgie-3.0
31
+ */
32
+
33
+ const APPLET_KEY_ALIGN: string;
34
+ const APPLET_KEY_NAME: string;
35
+ const APPLET_KEY_POS: string;
36
+ /**
37
+ * @gir-type Flags
38
+ */
39
+ export namespace PanelAction {
40
+ export const $gtype: GObject.GType<PanelAction>;
41
+ }
42
+
43
+ /**
44
+ * BudgiePanelAction's are bitwise OR'd so that a {@link Budgie.Applet} may expose
45
+ * the actions that it supports, when the panel is interacted with in
46
+ * a global fashion (such as via the D-BUS API)
47
+ * @gir-type Flags
48
+ */
49
+ enum PanelAction {
50
+ NONE,
51
+ /**
52
+ * Invoke the menu action
53
+ */
54
+ MENU,
55
+ MAX,
56
+ }
57
+
58
+ /**
59
+ * @gir-type Flags
60
+ */
61
+ export namespace PanelPosition {
62
+ export const $gtype: GObject.GType<PanelPosition>;
63
+ }
64
+
65
+ /**
66
+ * Each applet lives on a unique panel which can live on any one of
67
+ * the 4 screen edges. Internally this is represented with a bitmask
68
+ * to enable efficient screen management.
69
+ * @gir-type Flags
70
+ */
71
+ enum PanelPosition {
72
+ /**
73
+ * No position is yet assigned
74
+ */
75
+ NONE,
76
+ /**
77
+ * The bottom edge has been assigned
78
+ */
79
+ BOTTOM,
80
+ /**
81
+ * The top edge has been assigned
82
+ */
83
+ TOP,
84
+ /**
85
+ * The left edge has been assigned
86
+ */
87
+ LEFT,
88
+ /**
89
+ * The right edge has been assigned
90
+ */
91
+ RIGHT,
92
+ }
93
+
94
+ namespace Applet {
95
+ // Signal signatures
96
+ interface SignalSignatures extends Gtk.EventBox.SignalSignatures {
97
+ /**
98
+ * Used to notify this applet of a change in the panel's placement
99
+ * on screen, so that it may adjust its own layout to better suit
100
+ * the geometry.
101
+ * @signal
102
+ * @action
103
+ * @run-last
104
+ */
105
+ 'panel-position-changed': (arg0: PanelPosition) => void;
106
+ /**
107
+ * Used to notify this applet of a change in the panel size
108
+ * @signal
109
+ * @action
110
+ * @run-last
111
+ */
112
+ 'panel-size-changed': (arg0: number, arg1: number, arg2: number) => void;
113
+ 'notify::settings-prefix': (pspec: GObject.ParamSpec) => void;
114
+ 'notify::settings-schema': (pspec: GObject.ParamSpec) => void;
115
+ 'notify::supported-actions': (pspec: GObject.ParamSpec) => void;
116
+ 'notify::above-child': (pspec: GObject.ParamSpec) => void;
117
+ 'notify::visible-window': (pspec: GObject.ParamSpec) => void;
118
+ 'notify::border-width': (pspec: GObject.ParamSpec) => void;
119
+ 'notify::child': (pspec: GObject.ParamSpec) => void;
120
+ 'notify::resize-mode': (pspec: GObject.ParamSpec) => void;
121
+ 'notify::app-paintable': (pspec: GObject.ParamSpec) => void;
122
+ 'notify::can-default': (pspec: GObject.ParamSpec) => void;
123
+ 'notify::can-focus': (pspec: GObject.ParamSpec) => void;
124
+ 'notify::composite-child': (pspec: GObject.ParamSpec) => void;
125
+ 'notify::double-buffered': (pspec: GObject.ParamSpec) => void;
126
+ 'notify::events': (pspec: GObject.ParamSpec) => void;
127
+ 'notify::expand': (pspec: GObject.ParamSpec) => void;
128
+ 'notify::focus-on-click': (pspec: GObject.ParamSpec) => void;
129
+ 'notify::halign': (pspec: GObject.ParamSpec) => void;
130
+ 'notify::has-default': (pspec: GObject.ParamSpec) => void;
131
+ 'notify::has-focus': (pspec: GObject.ParamSpec) => void;
132
+ 'notify::has-tooltip': (pspec: GObject.ParamSpec) => void;
133
+ 'notify::height-request': (pspec: GObject.ParamSpec) => void;
134
+ 'notify::hexpand': (pspec: GObject.ParamSpec) => void;
135
+ 'notify::hexpand-set': (pspec: GObject.ParamSpec) => void;
136
+ 'notify::is-focus': (pspec: GObject.ParamSpec) => void;
137
+ 'notify::margin': (pspec: GObject.ParamSpec) => void;
138
+ 'notify::margin-bottom': (pspec: GObject.ParamSpec) => void;
139
+ 'notify::margin-end': (pspec: GObject.ParamSpec) => void;
140
+ 'notify::margin-left': (pspec: GObject.ParamSpec) => void;
141
+ 'notify::margin-right': (pspec: GObject.ParamSpec) => void;
142
+ 'notify::margin-start': (pspec: GObject.ParamSpec) => void;
143
+ 'notify::margin-top': (pspec: GObject.ParamSpec) => void;
144
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
145
+ 'notify::no-show-all': (pspec: GObject.ParamSpec) => void;
146
+ 'notify::opacity': (pspec: GObject.ParamSpec) => void;
147
+ 'notify::parent': (pspec: GObject.ParamSpec) => void;
148
+ 'notify::receives-default': (pspec: GObject.ParamSpec) => void;
149
+ 'notify::scale-factor': (pspec: GObject.ParamSpec) => void;
150
+ 'notify::sensitive': (pspec: GObject.ParamSpec) => void;
151
+ 'notify::style': (pspec: GObject.ParamSpec) => void;
152
+ 'notify::tooltip-markup': (pspec: GObject.ParamSpec) => void;
153
+ 'notify::tooltip-text': (pspec: GObject.ParamSpec) => void;
154
+ 'notify::valign': (pspec: GObject.ParamSpec) => void;
155
+ 'notify::vexpand': (pspec: GObject.ParamSpec) => void;
156
+ 'notify::vexpand-set': (pspec: GObject.ParamSpec) => void;
157
+ 'notify::visible': (pspec: GObject.ParamSpec) => void;
158
+ 'notify::width-request': (pspec: GObject.ParamSpec) => void;
159
+ 'notify::window': (pspec: GObject.ParamSpec) => void;
160
+ }
161
+
162
+ // Constructor properties interface
163
+
164
+ interface ConstructorProps
165
+ extends
166
+ Gtk.EventBox.ConstructorProps,
167
+ Atk.ImplementorIface.ConstructorProps,
168
+ Gtk.Buildable.ConstructorProps {
169
+ settings_prefix: string;
170
+ settingsPrefix: string;
171
+ settings_schema: string;
172
+ settingsSchema: string;
173
+ supported_actions: PanelAction;
174
+ supportedActions: PanelAction;
175
+ }
176
+ }
177
+
178
+ /**
179
+ * @gir-type Class
180
+ */
181
+ class Applet extends Gtk.EventBox implements Atk.ImplementorIface, Gtk.Buildable {
182
+ static $gtype: GObject.GType<Applet>;
183
+
184
+ // Properties
185
+
186
+ /**
187
+ * The GSettings schema path prefix for this applet
188
+ *
189
+ * For applets that require unique instance configuration, the
190
+ * panel management must know where to initialise the settings
191
+ * within the tree. The path takes the form:
192
+ *
193
+ * `$SETTINGS_PREFIX/{$UUID}`
194
+ *
195
+ * As an example, the Budgie Menu Applet set's the `settings-prefix`
196
+ * to:
197
+ * `/com/solus-project/budgie-panel/instance/budgie-menu`.
198
+ *
199
+ * This results in relocatable schemas being created at:
200
+ *
201
+ * `/com/solus-project/budgie-panel/instance/budgie-menu/{$UUID}`
202
+ */
203
+ get settings_prefix(): string;
204
+ set settings_prefix(val: string);
205
+ /**
206
+ * The GSettings schema path prefix for this applet
207
+ *
208
+ * For applets that require unique instance configuration, the
209
+ * panel management must know where to initialise the settings
210
+ * within the tree. The path takes the form:
211
+ *
212
+ * `$SETTINGS_PREFIX/{$UUID}`
213
+ *
214
+ * As an example, the Budgie Menu Applet set's the `settings-prefix`
215
+ * to:
216
+ * `/com/solus-project/budgie-panel/instance/budgie-menu`.
217
+ *
218
+ * This results in relocatable schemas being created at:
219
+ *
220
+ * `/com/solus-project/budgie-panel/instance/budgie-menu/{$UUID}`
221
+ */
222
+ get settingsPrefix(): string;
223
+ set settingsPrefix(val: string);
224
+ /**
225
+ * The ID of the GSettings schema used by this applet
226
+ *
227
+ * This only takes effect when you've also set {@link Budgie.Applet.settings_prefix},
228
+ * and is used by the panel managemen to both initialise and delete your per-instance
229
+ * settings, respectively.
230
+ *
231
+ * As an example, the Budgie Menu Applet uses the schema:
232
+ *
233
+ * `com.solus-project.budgie-menu`
234
+ *
235
+ * as defined by the accompanying gschema XML file. Providing an incorrect
236
+ * schema ID is considered programmer error.
237
+ */
238
+ get settings_schema(): string;
239
+ set settings_schema(val: string);
240
+ /**
241
+ * The ID of the GSettings schema used by this applet
242
+ *
243
+ * This only takes effect when you've also set {@link Budgie.Applet.settings_prefix},
244
+ * and is used by the panel managemen to both initialise and delete your per-instance
245
+ * settings, respectively.
246
+ *
247
+ * As an example, the Budgie Menu Applet uses the schema:
248
+ *
249
+ * `com.solus-project.budgie-menu`
250
+ *
251
+ * as defined by the accompanying gschema XML file. Providing an incorrect
252
+ * schema ID is considered programmer error.
253
+ */
254
+ get settingsSchema(): string;
255
+ set settingsSchema(val: string);
256
+ /**
257
+ * The actions supported by this applet instance
258
+ */
259
+ get supported_actions(): PanelAction;
260
+ set supported_actions(val: PanelAction);
261
+ /**
262
+ * The actions supported by this applet instance
263
+ */
264
+ get supportedActions(): PanelAction;
265
+ set supportedActions(val: PanelAction);
266
+
267
+ /**
268
+ * Compile-time signal type information.
269
+ *
270
+ * This instance property is generated only for TypeScript type checking.
271
+ * It is not defined at runtime and should not be accessed in JS code.
272
+ * @internal
273
+ */
274
+ $signals: Applet.SignalSignatures;
275
+
276
+ // Constructors
277
+
278
+ constructor(properties?: Partial<Applet.ConstructorProps>, ...args: any[]);
279
+
280
+ _init(...args: any[]): void;
281
+
282
+ static ['new'](): Applet;
283
+
284
+ // Signals
285
+
286
+ /** @signal */
287
+ connect<K extends keyof Applet.SignalSignatures>(
288
+ signal: K,
289
+ callback: GObject.SignalCallback<this, Applet.SignalSignatures[K]>,
290
+ ): number;
291
+ connect(signal: string, callback: (...args: any[]) => any): number;
292
+ /** @signal */
293
+ connect_after<K extends keyof Applet.SignalSignatures>(
294
+ signal: K,
295
+ callback: GObject.SignalCallback<this, Applet.SignalSignatures[K]>,
296
+ ): number;
297
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
298
+ /** @signal */
299
+ emit<K extends keyof Applet.SignalSignatures>(
300
+ signal: K,
301
+ ...args: GObject.GjsParameters<Applet.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
302
+ ): void;
303
+ emit(signal: string, ...args: any[]): void;
304
+
305
+ // Virtual methods
306
+
307
+ /**
308
+ * For applets that need to expose settings, they should both override the
309
+ * {@link Budgie.Applet.SignalSignatures.supports_settings | Budgie.Applet::supports_settings} method and return a new widget instance
310
+ * whenever this function is invoked.
311
+ *
312
+ * This UI will live in the Raven sidebar within the Budgie Desktop, and
313
+ * will be destroyed as soon as it's not being used. It's advisable to keep
314
+ * this widget implementation light, and to prefer vertical space.
315
+ * @virtual
316
+ */
317
+ vfunc_get_settings_ui(): Gtk.Widget | null;
318
+ /**
319
+ * Invoke the given action on this applet. This action will only be one
320
+ * that has been declared in supported actions bitmask.
321
+ *
322
+ * To allow better integration between the Budgie Desktop, and the applets
323
+ * that live within it, the panel will relay actions to applets that have
324
+ * set their {@link Budgie.Applet.supported_actions} to a matching bitmask.
325
+ *
326
+ * For example, if we wish to listen for Menu Key events, we can simply do
327
+ * the following in C:
328
+ *
329
+ *
330
+ * ```c
331
+ *
332
+ * static void my_applet_invoke_action(BudgieApplet *applet, BudgiePanelAction action)
333
+ * {
334
+ * if (action == BUDGIE_PANEL_ACTION_MENU) {
335
+ * my_applet_do_predict_the_lottery(MY_APPLET(applet));
336
+ * }
337
+ * }
338
+ *
339
+ * static void my_class_init(GObjectClass *class)
340
+ * {
341
+ * MyClass *mc = MY_CLASS(klass);
342
+ * ..
343
+ * mc->invoke_action = my_applet_invoke_action;
344
+ * }
345
+ * ```
346
+ *
347
+ *
348
+ * Likewise, a Vala implementation might look like the following:
349
+ *
350
+ * ```vala
351
+ *
352
+ * public override void invoke_action(Budgie.PanelAction action)
353
+ * {
354
+ * if (action == Budgie.PanelAction.MENU) {
355
+ * this.predict_the_lottery();
356
+ * }
357
+ * }
358
+ * ```
359
+ *
360
+ * @param action Action to invoke
361
+ * @virtual
362
+ */
363
+ vfunc_invoke_action(action: PanelAction): void;
364
+ /**
365
+ * @param position
366
+ * @virtual
367
+ */
368
+ vfunc_panel_position_changed(position: PanelPosition): void;
369
+ /**
370
+ * Virtual panel_size_changed function
371
+ * @param panel_size
372
+ * @param icon_size
373
+ * @param small_icon_size
374
+ * @virtual
375
+ */
376
+ vfunc_panel_size_changed(panel_size: number, icon_size: number, small_icon_size: number): void;
377
+ /**
378
+ * Implementations should override this to return TRUE if they support
379
+ * a settings UI
380
+ * @virtual
381
+ */
382
+ vfunc_supports_settings(): boolean;
383
+ /**
384
+ * This virtual method should be implemented by panel applets that wish
385
+ * to support {@link Gtk.Popover}'s natively. As each Budgie Panel may house multiple
386
+ * GtkPopover widgets, each one must be registered with the `manager`.
387
+ *
388
+ * During this call, it is safe to store a reference to the `manager`. In
389
+ * this call you should invoke {@link Budgie.PopoverManager.SignalSignatures.register_popover | Budgie.PopoverManager::register_popover} to
390
+ * register your popover with the panel manager.
391
+ *
392
+ * Each registered popover joins the global menu system of popovers in the
393
+ * panel. It is a requirement to register, otherwise the panel will not
394
+ * know when to expand and collapse the main panel harness to accommodate
395
+ * the GtkPopover.
396
+ * @param manager
397
+ * @virtual
398
+ */
399
+ vfunc_update_popovers(manager?: PopoverManager | null): void;
400
+
401
+ // Methods
402
+
403
+ /**
404
+ * If your {@link Budgie.Plugin} implementation passes the UUID to your BudgieApplet
405
+ * implementation on construction, you can take advantage of per-instance
406
+ * settings.
407
+ *
408
+ * For most applets, global GSettings keys are more than suffice. However,
409
+ * in some situations, it may be beneficial to enable multiple unique instances
410
+ * of your applet, each with their own configuration.
411
+ *
412
+ * To facilitate this, use this function to create a new relocatable settings
413
+ * instance using your UUID. Make sure you set the {@link Budgie.Applet.settings_schema}
414
+ * and {@link Budgie.Applet.settings_prefix} properties first.
415
+ * @param uuid UUID for this instance
416
+ * @returns A newly created {@link Gio.Settings} for this applet instance
417
+ */
418
+ get_applet_settings(uuid: string): Gio.Settings;
419
+ /**
420
+ * Utility function for Python usage. See: {@link Budgie.Applet.settings_prefix}
421
+ */
422
+ get_settings_prefix(): string;
423
+ /**
424
+ * Utility function for Python usage. See {@link Budgie.Applet.settings_schema}
425
+ */
426
+ get_settings_schema(): string;
427
+ /**
428
+ * For applets that need to expose settings, they should both override the
429
+ * {@link Budgie.Applet.SignalSignatures.supports_settings | Budgie.Applet::supports_settings} method and return a new widget instance
430
+ * whenever this function is invoked.
431
+ *
432
+ * This UI will live in the Raven sidebar within the Budgie Desktop, and
433
+ * will be destroyed as soon as it's not being used. It's advisable to keep
434
+ * this widget implementation light, and to prefer vertical space.
435
+ * @returns A GTK Settings UI
436
+ */
437
+ get_settings_ui(): Gtk.Widget | null;
438
+ /**
439
+ * Utility function for Python bindings. See {@link Budgie.Applet.supported_actions}
440
+ */
441
+ get_supported_actions(): PanelAction;
442
+ /**
443
+ * Invoke the given action on this applet. This action will only be one
444
+ * that has been declared in supported actions bitmask.
445
+ *
446
+ * To allow better integration between the Budgie Desktop, and the applets
447
+ * that live within it, the panel will relay actions to applets that have
448
+ * set their {@link Budgie.Applet.supported_actions} to a matching bitmask.
449
+ *
450
+ * For example, if we wish to listen for Menu Key events, we can simply do
451
+ * the following in C:
452
+ *
453
+ *
454
+ * ```c
455
+ *
456
+ * static void my_applet_invoke_action(BudgieApplet *applet, BudgiePanelAction action)
457
+ * {
458
+ * if (action == BUDGIE_PANEL_ACTION_MENU) {
459
+ * my_applet_do_predict_the_lottery(MY_APPLET(applet));
460
+ * }
461
+ * }
462
+ *
463
+ * static void my_class_init(GObjectClass *class)
464
+ * {
465
+ * MyClass *mc = MY_CLASS(klass);
466
+ * ..
467
+ * mc->invoke_action = my_applet_invoke_action;
468
+ * }
469
+ * ```
470
+ *
471
+ *
472
+ * Likewise, a Vala implementation might look like the following:
473
+ *
474
+ * ```vala
475
+ *
476
+ * public override void invoke_action(Budgie.PanelAction action)
477
+ * {
478
+ * if (action == Budgie.PanelAction.MENU) {
479
+ * this.predict_the_lottery();
480
+ * }
481
+ * }
482
+ * ```
483
+ *
484
+ * @param action Action to invoke
485
+ */
486
+ invoke_action(action: PanelAction | null): void;
487
+ /**
488
+ * Utility function for Python usage. See: {@link Budgie.Applet.settings_prefix}
489
+ * @param prefix
490
+ */
491
+ set_settings_prefix(prefix: string): void;
492
+ /**
493
+ * Utility function for Python usage. See {@link Budgie.Applet.settings_schema}
494
+ * @param schema
495
+ */
496
+ set_settings_schema(schema: string): void;
497
+ /**
498
+ * Implementations should override this to return TRUE if they support
499
+ * a settings UI
500
+ * @returns true if this implementation supports a Settings UI
501
+ */
502
+ supports_settings(): boolean;
503
+ /**
504
+ * This virtual method should be implemented by panel applets that wish
505
+ * to support {@link Gtk.Popover}'s natively. As each Budgie Panel may house multiple
506
+ * GtkPopover widgets, each one must be registered with the `manager`.
507
+ *
508
+ * During this call, it is safe to store a reference to the `manager`. In
509
+ * this call you should invoke {@link Budgie.PopoverManager.SignalSignatures.register_popover | Budgie.PopoverManager::register_popover} to
510
+ * register your popover with the panel manager.
511
+ *
512
+ * Each registered popover joins the global menu system of popovers in the
513
+ * panel. It is a requirement to register, otherwise the panel will not
514
+ * know when to expand and collapse the main panel harness to accommodate
515
+ * the GtkPopover.
516
+ * @param manager
517
+ */
518
+ update_popovers(manager?: PopoverManager | null): void;
519
+ /**
520
+ * Creates a binding between `source_property` on `source` and `target_property`
521
+ * on `target`.
522
+ *
523
+ * Whenever the `source_property` is changed the `target_property` is
524
+ * updated using the same value. For instance:
525
+ *
526
+ *
527
+ * ```c
528
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
529
+ * ```
530
+ *
531
+ *
532
+ * Will result in the "sensitive" property of the widget {@link GObject.Object} instance to be
533
+ * updated with the same value of the "active" property of the action {@link GObject.Object}
534
+ * instance.
535
+ *
536
+ * If `flags` contains {@link GObject.BindingFlags.BIDIRECTIONAL} then the binding will be mutual:
537
+ * if `target_property` on `target` changes then the `source_property` on `source`
538
+ * will be updated as well.
539
+ *
540
+ * The binding will automatically be removed when either the `source` or the
541
+ * `target` instances are finalized. To remove the binding without affecting the
542
+ * `source` and the `target` you can just call `g_object_unref()` on the returned
543
+ * {@link GObject.Binding} instance.
544
+ *
545
+ * Removing the binding by calling `g_object_unref()` on it must only be done if
546
+ * the binding, `source` and `target` are only used from a single thread and it
547
+ * is clear that both `source` and `target` outlive the binding. Especially it
548
+ * is not safe to rely on this if the binding, `source` or `target` can be
549
+ * finalized from different threads. Keep another reference to the binding and
550
+ * use `g_binding_unbind()` instead to be on the safe side.
551
+ *
552
+ * A {@link GObject.Object} can have multiple bindings.
553
+ * @param source_property the property on `source` to bind
554
+ * @param target the target {@link GObject.Object}
555
+ * @param target_property the property on `target` to bind
556
+ * @param flags flags to pass to {@link GObject.Binding}
557
+ * @returns the {@link GObject.Binding} instance representing the binding between the two {@link GObject.Object} instances. The binding is released whenever the {@link GObject.Binding} reference count reaches zero.
558
+ */
559
+ bind_property(
560
+ source_property: string,
561
+ target: GObject.Object,
562
+ target_property: string,
563
+ flags: GObject.BindingFlags | null,
564
+ ): GObject.Binding;
565
+ /**
566
+ * Complete version of `g_object_bind_property()`.
567
+ *
568
+ * Creates a binding between `source_property` on `source` and `target_property`
569
+ * on `target`, allowing you to set the transformation functions to be used by
570
+ * the binding.
571
+ *
572
+ * If `flags` contains {@link GObject.BindingFlags.BIDIRECTIONAL} then the binding will be mutual:
573
+ * if `target_property` on `target` changes then the `source_property` on `source`
574
+ * will be updated as well. The `transform_from` function is only used in case
575
+ * of bidirectional bindings, otherwise it will be ignored
576
+ *
577
+ * The binding will automatically be removed when either the `source` or the
578
+ * `target` instances are finalized. This will release the reference that is
579
+ * being held on the {@link GObject.Binding} instance; if you want to hold on to the
580
+ * {@link GObject.Binding} instance, you will need to hold a reference to it.
581
+ *
582
+ * To remove the binding, call `g_binding_unbind()`.
583
+ *
584
+ * A {@link GObject.Object} can have multiple bindings.
585
+ *
586
+ * The same `user_data` parameter will be used for both `transform_to`
587
+ * and `transform_from` transformation functions; the `notify` function will
588
+ * be called once, when the binding is removed. If you need different data
589
+ * for each transformation function, please use
590
+ * `g_object_bind_property_with_closures()` instead.
591
+ * @param source_property the property on `source` to bind
592
+ * @param target the target {@link GObject.Object}
593
+ * @param target_property the property on `target` to bind
594
+ * @param flags flags to pass to {@link GObject.Binding}
595
+ * @param transform_to the transformation function from the `source` to the `target`, or `null` to use the default
596
+ * @param transform_from the transformation function from the `target` to the `source`, or `null` to use the default
597
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or `null` if not required
598
+ * @returns the {@link GObject.Binding} instance representing the binding between the two {@link GObject.Object} instances. The binding is released whenever the {@link GObject.Binding} reference count reaches zero.
599
+ */
600
+ bind_property_full(
601
+ source_property: string,
602
+ target: GObject.Object,
603
+ target_property: string,
604
+ flags: GObject.BindingFlags | null,
605
+ transform_to?: GObject.BindingTransformFunc | null,
606
+ transform_from?: GObject.BindingTransformFunc | null,
607
+ notify?: GLib.DestroyNotify | null,
608
+ ): GObject.Binding;
609
+ /**
610
+ * @param args
611
+ */
612
+ // Conflicted with GObject.Object.bind_property_full
613
+ bind_property_full(...args: never[]): any;
614
+ /**
615
+ * This function is intended for {@link GObject.Object} implementations to re-enforce
616
+ * a [floating](floating-refs.html) object reference. Doing this is seldom
617
+ * required: all `GInitiallyUnowneds` are created with a floating reference
618
+ * which usually just needs to be sunken by calling `g_object_ref_sink()`.
619
+ */
620
+ force_floating(): void;
621
+ /**
622
+ * Increases the freeze count on `object`. If the freeze count is
623
+ * non-zero, the emission of "notify" signals on `object` is
624
+ * stopped. The signals are queued until the freeze count is decreased
625
+ * to zero. Duplicate notifications are squashed so that at most one
626
+ * {@link GObject.Object.SignalSignatures.notify | GObject.Object::notify} signal is emitted for each property modified while the
627
+ * object is frozen.
628
+ *
629
+ * This is necessary for accessors that modify multiple properties to prevent
630
+ * premature notification while the object is still being modified.
631
+ */
632
+ freeze_notify(): void;
633
+ /**
634
+ * Gets a named field from the objects table of associations (see `g_object_set_data()`).
635
+ * @param key name of the key for that association
636
+ * @returns the data if found, or `null` if no such data exists.
637
+ */
638
+ get_data(key: string): any | null;
639
+ /**
640
+ * Gets a property of an object.
641
+ *
642
+ * The value can be:
643
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
644
+ * - a GObject.Value initialized with the expected type of the property
645
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
646
+ *
647
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
648
+ *
649
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
650
+ * @param property_name The name of the property to get
651
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
652
+ */
653
+ get_property(property_name: string, value: GObject.Value | any): any;
654
+ /**
655
+ * This function gets back user data pointers stored via
656
+ * `g_object_set_qdata()`.
657
+ * @param quark A {@link GLib.Quark}, naming the user data pointer
658
+ * @returns The user data pointer set, or `null`
659
+ */
660
+ get_qdata(quark: GLib.Quark): any | null;
661
+ /**
662
+ * Gets `n_properties` properties for an `object`.
663
+ * Obtained properties will be set to `values`. All properties must be valid.
664
+ * Warnings will be emitted and undefined behaviour may result if invalid
665
+ * properties are passed in.
666
+ * @param names the names of each property to get
667
+ * @param values the values of each property to get
668
+ */
669
+ getv(names: string[], values: (GObject.Value | any)[]): void;
670
+ /**
671
+ * Checks whether `object` has a [floating](floating-refs.html) reference.
672
+ * @returns `true` if `object` has a floating reference
673
+ */
674
+ is_floating(): boolean;
675
+ /**
676
+ * Emits a "notify" signal for the property `property_name` on `object`.
677
+ *
678
+ * When possible, eg. when signaling a property change from within the class
679
+ * that registered the property, you should use `g_object_notify_by_pspec()`
680
+ * instead.
681
+ *
682
+ * Note that emission of the notify signal may be blocked with
683
+ * `g_object_freeze_notify()`. In this case, the signal emissions are queued
684
+ * and will be emitted (in reverse order) when `g_object_thaw_notify()` is
685
+ * called.
686
+ * @param property_name the name of a property installed on the class of `object`.
687
+ */
688
+ notify(property_name: string): void;
689
+ /**
690
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
691
+ *
692
+ * This function omits the property name lookup, hence it is faster than
693
+ * `g_object_notify()`.
694
+ *
695
+ * One way to avoid using `g_object_notify()` from within the
696
+ * class that registered the properties, and using `g_object_notify_by_pspec()`
697
+ * instead, is to store the GParamSpec used with
698
+ * `g_object_class_install_property()` inside a static array, e.g.:
699
+ *
700
+ *
701
+ * ```c
702
+ * typedef enum
703
+ * {
704
+ * PROP_FOO = 1,
705
+ * PROP_LAST
706
+ * } MyObjectProperty;
707
+ *
708
+ * static GParamSpec *properties[PROP_LAST];
709
+ *
710
+ * static void
711
+ * my_object_class_init (MyObjectClass *klass)
712
+ * {
713
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
714
+ * 0, 100,
715
+ * 50,
716
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
717
+ * g_object_class_install_property (gobject_class,
718
+ * PROP_FOO,
719
+ * properties[PROP_FOO]);
720
+ * }
721
+ * ```
722
+ *
723
+ *
724
+ * and then notify a change on the "foo" property with:
725
+ *
726
+ *
727
+ * ```c
728
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
729
+ * ```
730
+ *
731
+ * @param pspec the {@link GObject.ParamSpec} of a property installed on the class of `object`.
732
+ */
733
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
734
+ /**
735
+ * Increases the reference count of `object`.
736
+ *
737
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
738
+ * of `object` will be propagated to the return type (using the GCC `typeof()`
739
+ * extension), so any casting the caller needs to do on the return type must be
740
+ * explicit.
741
+ * @returns the same `object`
742
+ */
743
+ ref(): GObject.Object;
744
+ /**
745
+ * Increase the reference count of `object`, and possibly remove the
746
+ * [floating](floating-refs.html) reference, if `object` has a floating reference.
747
+ *
748
+ * In other words, if the object is floating, then this call "assumes
749
+ * ownership" of the floating reference, converting it to a normal
750
+ * reference by clearing the floating flag while leaving the reference
751
+ * count unchanged. If the object is not floating, then this call
752
+ * adds a new normal reference increasing the reference count by one.
753
+ *
754
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
755
+ * under the same conditions as for `g_object_ref()`.
756
+ * @returns `object`
757
+ */
758
+ ref_sink(): GObject.Object;
759
+ /**
760
+ * Releases all references to other objects. This can be used to break
761
+ * reference cycles.
762
+ *
763
+ * This function should only be called from object system implementations.
764
+ */
765
+ run_dispose(): void;
766
+ /**
767
+ * Each object carries around a table of associations from
768
+ * strings to pointers. This function lets you set an association.
769
+ *
770
+ * If the object already had an association with that name,
771
+ * the old association will be destroyed.
772
+ *
773
+ * Internally, the `key` is converted to a {@link GLib.Quark} using `g_quark_from_string()`.
774
+ * This means a copy of `key` is kept permanently (even after `object` has been
775
+ * finalized) — so it is recommended to only use a small, bounded set of values
776
+ * for `key` in your program, to avoid the {@link GLib.Quark} storage growing unbounded.
777
+ * @param key name of the key
778
+ * @param data data to associate with that key
779
+ */
780
+ set_data(key: string, data?: any | null): void;
781
+ /**
782
+ * Sets a property on an object.
783
+ * @param property_name The name of the property to set
784
+ * @param value The value to set the property to
785
+ */
786
+ set_property(property_name: string, value: GObject.Value | any): void;
787
+ /**
788
+ * Remove a specified datum from the object's data associations,
789
+ * without invoking the association's destroy handler.
790
+ * @param key name of the key
791
+ * @returns the data if found, or `null` if no such data exists.
792
+ */
793
+ steal_data(key: string): any | null;
794
+ /**
795
+ * This function gets back user data pointers stored via
796
+ * `g_object_set_qdata()` and removes the `data` from object
797
+ * without invoking its `destroy()` function (if any was
798
+ * set).
799
+ * Usually, calling this function is only required to update
800
+ * user data pointers with a destroy notifier, for example:
801
+ *
802
+ * ```c
803
+ * void
804
+ * object_add_to_user_list (GObject *object,
805
+ * const gchar *new_string)
806
+ * {
807
+ * // the quark, naming the object data
808
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
809
+ * // retrieve the old string list
810
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
811
+ *
812
+ * // prepend new string
813
+ * list = g_list_prepend (list, g_strdup (new_string));
814
+ * // this changed 'list', so we need to set it again
815
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
816
+ * }
817
+ * static void
818
+ * free_string_list (gpointer data)
819
+ * {
820
+ * GList *node, *list = data;
821
+ *
822
+ * for (node = list; node; node = node->next)
823
+ * g_free (node->data);
824
+ * g_list_free (list);
825
+ * }
826
+ * ```
827
+ *
828
+ * Using `g_object_get_qdata()` in the above example, instead of
829
+ * `g_object_steal_qdata()` would have left the destroy function set,
830
+ * and thus the partial string list would have been freed upon
831
+ * `g_object_set_qdata_full()`.
832
+ * @param quark A {@link GLib.Quark}, naming the user data pointer
833
+ * @returns The user data pointer set, or `null`
834
+ */
835
+ steal_qdata(quark: GLib.Quark): any | null;
836
+ /**
837
+ * Reverts the effect of a previous call to
838
+ * `g_object_freeze_notify()`. The freeze count is decreased on `object`
839
+ * and when it reaches zero, queued "notify" signals are emitted.
840
+ *
841
+ * Duplicate notifications for each property are squashed so that at most one
842
+ * {@link GObject.Object.SignalSignatures.notify | GObject.Object::notify} signal is emitted for each property, in the reverse order
843
+ * in which they have been queued.
844
+ *
845
+ * It is an error to call this function when the freeze count is zero.
846
+ */
847
+ thaw_notify(): void;
848
+ /**
849
+ * Decreases the reference count of `object`. When its reference count
850
+ * drops to 0, the object is finalized (i.e. its memory is freed).
851
+ *
852
+ * If the pointer to the {@link GObject.Object} may be reused in future (for example, if it is
853
+ * an instance variable of another object), it is recommended to clear the
854
+ * pointer to `null` rather than retain a dangling pointer to a potentially
855
+ * invalid {@link GObject.Object} instance. Use `g_clear_object()` for this.
856
+ */
857
+ unref(): void;
858
+ /**
859
+ * This function essentially limits the life time of the `closure` to
860
+ * the life time of the object. That is, when the object is finalized,
861
+ * the `closure` is invalidated by calling `g_closure_invalidate()` on
862
+ * it, in order to prevent invocations of the closure with a finalized
863
+ * (nonexisting) object. Also, `g_object_ref()` and `g_object_unref()` are
864
+ * added as marshal guards to the `closure`, to ensure that an extra
865
+ * reference count is held on `object` during invocation of the
866
+ * `closure`. Usually, this function will be called on closures that
867
+ * use this `object` as closure data.
868
+ * @param closure {@link GObject.Closure} to watch
869
+ */
870
+ watch_closure(closure: GObject.Closure): void;
871
+ /**
872
+ * the `constructed` function is called by `g_object_new()` as the
873
+ * final step of the object creation process. At the point of the call, all
874
+ * construction properties have been set on the object. The purpose of this
875
+ * call is to allow for object initialisation steps that can only be performed
876
+ * after construction properties have been set. `constructed` implementors
877
+ * should chain up to the `constructed` call of their parent class to allow it
878
+ * to complete its initialisation.
879
+ * @virtual
880
+ */
881
+ vfunc_constructed(): void;
882
+ /**
883
+ * emits property change notification for a bunch
884
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
885
+ * needed.
886
+ * @param n_pspecs
887
+ * @param pspecs
888
+ * @virtual
889
+ */
890
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
891
+ /**
892
+ * the `dispose` function is supposed to drop all references to other
893
+ * objects, but keep the instance otherwise intact, so that client method
894
+ * invocations still work. It may be run multiple times (due to reference
895
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
896
+ * of the parent class.
897
+ * @virtual
898
+ */
899
+ vfunc_dispose(): void;
900
+ /**
901
+ * instance finalization function, should finish the finalization of
902
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
903
+ * parent class.
904
+ * @virtual
905
+ */
906
+ vfunc_finalize(): void;
907
+ /**
908
+ * the generic getter for all properties of this type. Should be
909
+ * overridden for every type with properties.
910
+ * @param property_id
911
+ * @param value
912
+ * @param pspec
913
+ * @virtual
914
+ */
915
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
916
+ /**
917
+ * Emits a "notify" signal for the property `property_name` on `object`.
918
+ *
919
+ * When possible, eg. when signaling a property change from within the class
920
+ * that registered the property, you should use `g_object_notify_by_pspec()`
921
+ * instead.
922
+ *
923
+ * Note that emission of the notify signal may be blocked with
924
+ * `g_object_freeze_notify()`. In this case, the signal emissions are queued
925
+ * and will be emitted (in reverse order) when `g_object_thaw_notify()` is
926
+ * called.
927
+ * @param pspec
928
+ * @virtual
929
+ */
930
+ vfunc_notify(pspec: GObject.ParamSpec): void;
931
+ /**
932
+ * the generic setter for all properties of this type. Should be
933
+ * overridden for every type with properties. If implementations of
934
+ * `set_property` don't emit property change notification explicitly, this will
935
+ * be done implicitly by the type system. However, if the notify signal is
936
+ * emitted explicitly, the type system will not emit it a second time.
937
+ * @param property_id
938
+ * @param value
939
+ * @param pspec
940
+ * @virtual
941
+ */
942
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
943
+ /**
944
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
945
+ * @param id Handler ID of the handler to be disconnected
946
+ */
947
+ disconnect(id: number): void;
948
+ /**
949
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
950
+ * @param properties Object containing the properties to set
951
+ */
952
+ set(properties: { [key: string]: any }): void;
953
+ /**
954
+ * Blocks a handler of an instance so it will not be called during any signal emissions
955
+ * @param id Handler ID of the handler to be blocked
956
+ */
957
+ block_signal_handler(id: number): void;
958
+ /**
959
+ * Unblocks a handler so it will be called again during any signal emissions
960
+ * @param id Handler ID of the handler to be unblocked
961
+ */
962
+ unblock_signal_handler(id: number): void;
963
+ /**
964
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
965
+ * @param detailedName Name of the signal to stop emission of
966
+ */
967
+ stop_emission_by_name(detailedName: string): void;
968
+ }
969
+
970
+ namespace AppletInfo {
971
+ // Signal signatures
972
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
973
+ 'notify::alignment': (pspec: GObject.ParamSpec) => void;
974
+ 'notify::applet': (pspec: GObject.ParamSpec) => void;
975
+ 'notify::description': (pspec: GObject.ParamSpec) => void;
976
+ 'notify::icon': (pspec: GObject.ParamSpec) => void;
977
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
978
+ 'notify::position': (pspec: GObject.ParamSpec) => void;
979
+ 'notify::settings': (pspec: GObject.ParamSpec) => void;
980
+ 'notify::uuid': (pspec: GObject.ParamSpec) => void;
981
+ }
982
+
983
+ // Constructor properties interface
984
+
985
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
986
+ alignment: string;
987
+ applet: Applet;
988
+ description: string;
989
+ icon: string;
990
+ name: string;
991
+ position: number;
992
+ settings: Gio.Settings;
993
+ uuid: string;
994
+ }
995
+ }
996
+
997
+ /**
998
+ * This type is private to the panel implementation, and is used to monitor, track,
999
+ * and control each applet instance.
1000
+ * @gir-type Class
1001
+ */
1002
+ class AppletInfo extends GObject.Object {
1003
+ static $gtype: GObject.GType<AppletInfo>;
1004
+
1005
+ // Properties
1006
+
1007
+ get alignment(): string;
1008
+ set alignment(val: string);
1009
+ get applet(): Applet;
1010
+ set applet(val: Applet);
1011
+ get description(): string;
1012
+ set description(val: string);
1013
+ get icon(): string;
1014
+ set icon(val: string);
1015
+ get name(): string;
1016
+ set name(val: string);
1017
+ get position(): number;
1018
+ set position(val: number);
1019
+ get settings(): Gio.Settings;
1020
+ set settings(val: Gio.Settings);
1021
+ get uuid(): string;
1022
+ set uuid(val: string);
1023
+
1024
+ /**
1025
+ * Compile-time signal type information.
1026
+ *
1027
+ * This instance property is generated only for TypeScript type checking.
1028
+ * It is not defined at runtime and should not be accessed in JS code.
1029
+ * @internal
1030
+ */
1031
+ $signals: AppletInfo.SignalSignatures;
1032
+
1033
+ // Constructors
1034
+
1035
+ constructor(properties?: Partial<AppletInfo.ConstructorProps>, ...args: any[]);
1036
+
1037
+ _init(...args: any[]): void;
1038
+
1039
+ static ['new'](plugin_info: Peas.PluginInfo, uuid: string, applet: Applet, settings: Gio.Settings): AppletInfo;
1040
+
1041
+ static new_from_uuid(uuid: string): AppletInfo;
1042
+
1043
+ // Signals
1044
+
1045
+ /** @signal */
1046
+ connect<K extends keyof AppletInfo.SignalSignatures>(
1047
+ signal: K,
1048
+ callback: GObject.SignalCallback<this, AppletInfo.SignalSignatures[K]>,
1049
+ ): number;
1050
+ connect(signal: string, callback: (...args: any[]) => any): number;
1051
+ /** @signal */
1052
+ connect_after<K extends keyof AppletInfo.SignalSignatures>(
1053
+ signal: K,
1054
+ callback: GObject.SignalCallback<this, AppletInfo.SignalSignatures[K]>,
1055
+ ): number;
1056
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1057
+ /** @signal */
1058
+ emit<K extends keyof AppletInfo.SignalSignatures>(
1059
+ signal: K,
1060
+ ...args: GObject.GjsParameters<AppletInfo.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1061
+ ): void;
1062
+ emit(signal: string, ...args: any[]): void;
1063
+ }
1064
+
1065
+ namespace Popover {
1066
+ // Signal signatures
1067
+ interface SignalSignatures extends Gtk.Popover.SignalSignatures {
1068
+ 'notify::constrain-to': (pspec: GObject.ParamSpec) => void;
1069
+ 'notify::modal': (pspec: GObject.ParamSpec) => void;
1070
+ 'notify::pointing-to': (pspec: GObject.ParamSpec) => void;
1071
+ 'notify::position': (pspec: GObject.ParamSpec) => void;
1072
+ 'notify::relative-to': (pspec: GObject.ParamSpec) => void;
1073
+ 'notify::transitions-enabled': (pspec: GObject.ParamSpec) => void;
1074
+ 'notify::border-width': (pspec: GObject.ParamSpec) => void;
1075
+ 'notify::child': (pspec: GObject.ParamSpec) => void;
1076
+ 'notify::resize-mode': (pspec: GObject.ParamSpec) => void;
1077
+ 'notify::app-paintable': (pspec: GObject.ParamSpec) => void;
1078
+ 'notify::can-default': (pspec: GObject.ParamSpec) => void;
1079
+ 'notify::can-focus': (pspec: GObject.ParamSpec) => void;
1080
+ 'notify::composite-child': (pspec: GObject.ParamSpec) => void;
1081
+ 'notify::double-buffered': (pspec: GObject.ParamSpec) => void;
1082
+ 'notify::events': (pspec: GObject.ParamSpec) => void;
1083
+ 'notify::expand': (pspec: GObject.ParamSpec) => void;
1084
+ 'notify::focus-on-click': (pspec: GObject.ParamSpec) => void;
1085
+ 'notify::halign': (pspec: GObject.ParamSpec) => void;
1086
+ 'notify::has-default': (pspec: GObject.ParamSpec) => void;
1087
+ 'notify::has-focus': (pspec: GObject.ParamSpec) => void;
1088
+ 'notify::has-tooltip': (pspec: GObject.ParamSpec) => void;
1089
+ 'notify::height-request': (pspec: GObject.ParamSpec) => void;
1090
+ 'notify::hexpand': (pspec: GObject.ParamSpec) => void;
1091
+ 'notify::hexpand-set': (pspec: GObject.ParamSpec) => void;
1092
+ 'notify::is-focus': (pspec: GObject.ParamSpec) => void;
1093
+ 'notify::margin': (pspec: GObject.ParamSpec) => void;
1094
+ 'notify::margin-bottom': (pspec: GObject.ParamSpec) => void;
1095
+ 'notify::margin-end': (pspec: GObject.ParamSpec) => void;
1096
+ 'notify::margin-left': (pspec: GObject.ParamSpec) => void;
1097
+ 'notify::margin-right': (pspec: GObject.ParamSpec) => void;
1098
+ 'notify::margin-start': (pspec: GObject.ParamSpec) => void;
1099
+ 'notify::margin-top': (pspec: GObject.ParamSpec) => void;
1100
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
1101
+ 'notify::no-show-all': (pspec: GObject.ParamSpec) => void;
1102
+ 'notify::opacity': (pspec: GObject.ParamSpec) => void;
1103
+ 'notify::parent': (pspec: GObject.ParamSpec) => void;
1104
+ 'notify::receives-default': (pspec: GObject.ParamSpec) => void;
1105
+ 'notify::scale-factor': (pspec: GObject.ParamSpec) => void;
1106
+ 'notify::sensitive': (pspec: GObject.ParamSpec) => void;
1107
+ 'notify::style': (pspec: GObject.ParamSpec) => void;
1108
+ 'notify::tooltip-markup': (pspec: GObject.ParamSpec) => void;
1109
+ 'notify::tooltip-text': (pspec: GObject.ParamSpec) => void;
1110
+ 'notify::valign': (pspec: GObject.ParamSpec) => void;
1111
+ 'notify::vexpand': (pspec: GObject.ParamSpec) => void;
1112
+ 'notify::vexpand-set': (pspec: GObject.ParamSpec) => void;
1113
+ 'notify::visible': (pspec: GObject.ParamSpec) => void;
1114
+ 'notify::width-request': (pspec: GObject.ParamSpec) => void;
1115
+ 'notify::window': (pspec: GObject.ParamSpec) => void;
1116
+ }
1117
+
1118
+ // Constructor properties interface
1119
+
1120
+ interface ConstructorProps
1121
+ extends
1122
+ Gtk.Popover.ConstructorProps,
1123
+ Atk.ImplementorIface.ConstructorProps,
1124
+ Gtk.Buildable.ConstructorProps {}
1125
+ }
1126
+
1127
+ /**
1128
+ * @gir-type Class
1129
+ */
1130
+ class Popover extends Gtk.Popover implements Atk.ImplementorIface, Gtk.Buildable {
1131
+ static $gtype: GObject.GType<Popover>;
1132
+
1133
+ /**
1134
+ * Compile-time signal type information.
1135
+ *
1136
+ * This instance property is generated only for TypeScript type checking.
1137
+ * It is not defined at runtime and should not be accessed in JS code.
1138
+ * @internal
1139
+ */
1140
+ $signals: Popover.SignalSignatures;
1141
+
1142
+ // Constructors
1143
+
1144
+ constructor(properties?: Partial<Popover.ConstructorProps>, ...args: any[]);
1145
+
1146
+ _init(...args: any[]): void;
1147
+
1148
+ static ['new'](relative_to: Gtk.Widget): Popover;
1149
+ // Conflicted with Gtk.Popover.new
1150
+
1151
+ static ['new'](...args: never[]): any;
1152
+
1153
+ // Signals
1154
+
1155
+ /** @signal */
1156
+ connect<K extends keyof Popover.SignalSignatures>(
1157
+ signal: K,
1158
+ callback: GObject.SignalCallback<this, Popover.SignalSignatures[K]>,
1159
+ ): number;
1160
+ connect(signal: string, callback: (...args: any[]) => any): number;
1161
+ /** @signal */
1162
+ connect_after<K extends keyof Popover.SignalSignatures>(
1163
+ signal: K,
1164
+ callback: GObject.SignalCallback<this, Popover.SignalSignatures[K]>,
1165
+ ): number;
1166
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1167
+ /** @signal */
1168
+ emit<K extends keyof Popover.SignalSignatures>(
1169
+ signal: K,
1170
+ ...args: GObject.GjsParameters<Popover.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1171
+ ): void;
1172
+ emit(signal: string, ...args: any[]): void;
1173
+ /**
1174
+ * Creates a binding between `source_property` on `source` and `target_property`
1175
+ * on `target`.
1176
+ *
1177
+ * Whenever the `source_property` is changed the `target_property` is
1178
+ * updated using the same value. For instance:
1179
+ *
1180
+ *
1181
+ * ```c
1182
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
1183
+ * ```
1184
+ *
1185
+ *
1186
+ * Will result in the "sensitive" property of the widget {@link GObject.Object} instance to be
1187
+ * updated with the same value of the "active" property of the action {@link GObject.Object}
1188
+ * instance.
1189
+ *
1190
+ * If `flags` contains {@link GObject.BindingFlags.BIDIRECTIONAL} then the binding will be mutual:
1191
+ * if `target_property` on `target` changes then the `source_property` on `source`
1192
+ * will be updated as well.
1193
+ *
1194
+ * The binding will automatically be removed when either the `source` or the
1195
+ * `target` instances are finalized. To remove the binding without affecting the
1196
+ * `source` and the `target` you can just call `g_object_unref()` on the returned
1197
+ * {@link GObject.Binding} instance.
1198
+ *
1199
+ * Removing the binding by calling `g_object_unref()` on it must only be done if
1200
+ * the binding, `source` and `target` are only used from a single thread and it
1201
+ * is clear that both `source` and `target` outlive the binding. Especially it
1202
+ * is not safe to rely on this if the binding, `source` or `target` can be
1203
+ * finalized from different threads. Keep another reference to the binding and
1204
+ * use `g_binding_unbind()` instead to be on the safe side.
1205
+ *
1206
+ * A {@link GObject.Object} can have multiple bindings.
1207
+ * @param source_property the property on `source` to bind
1208
+ * @param target the target {@link GObject.Object}
1209
+ * @param target_property the property on `target` to bind
1210
+ * @param flags flags to pass to {@link GObject.Binding}
1211
+ * @returns the {@link GObject.Binding} instance representing the binding between the two {@link GObject.Object} instances. The binding is released whenever the {@link GObject.Binding} reference count reaches zero.
1212
+ */
1213
+ bind_property(
1214
+ source_property: string,
1215
+ target: GObject.Object,
1216
+ target_property: string,
1217
+ flags: GObject.BindingFlags | null,
1218
+ ): GObject.Binding;
1219
+ /**
1220
+ * Complete version of `g_object_bind_property()`.
1221
+ *
1222
+ * Creates a binding between `source_property` on `source` and `target_property`
1223
+ * on `target`, allowing you to set the transformation functions to be used by
1224
+ * the binding.
1225
+ *
1226
+ * If `flags` contains {@link GObject.BindingFlags.BIDIRECTIONAL} then the binding will be mutual:
1227
+ * if `target_property` on `target` changes then the `source_property` on `source`
1228
+ * will be updated as well. The `transform_from` function is only used in case
1229
+ * of bidirectional bindings, otherwise it will be ignored
1230
+ *
1231
+ * The binding will automatically be removed when either the `source` or the
1232
+ * `target` instances are finalized. This will release the reference that is
1233
+ * being held on the {@link GObject.Binding} instance; if you want to hold on to the
1234
+ * {@link GObject.Binding} instance, you will need to hold a reference to it.
1235
+ *
1236
+ * To remove the binding, call `g_binding_unbind()`.
1237
+ *
1238
+ * A {@link GObject.Object} can have multiple bindings.
1239
+ *
1240
+ * The same `user_data` parameter will be used for both `transform_to`
1241
+ * and `transform_from` transformation functions; the `notify` function will
1242
+ * be called once, when the binding is removed. If you need different data
1243
+ * for each transformation function, please use
1244
+ * `g_object_bind_property_with_closures()` instead.
1245
+ * @param source_property the property on `source` to bind
1246
+ * @param target the target {@link GObject.Object}
1247
+ * @param target_property the property on `target` to bind
1248
+ * @param flags flags to pass to {@link GObject.Binding}
1249
+ * @param transform_to the transformation function from the `source` to the `target`, or `null` to use the default
1250
+ * @param transform_from the transformation function from the `target` to the `source`, or `null` to use the default
1251
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or `null` if not required
1252
+ * @returns the {@link GObject.Binding} instance representing the binding between the two {@link GObject.Object} instances. The binding is released whenever the {@link GObject.Binding} reference count reaches zero.
1253
+ */
1254
+ bind_property_full(
1255
+ source_property: string,
1256
+ target: GObject.Object,
1257
+ target_property: string,
1258
+ flags: GObject.BindingFlags | null,
1259
+ transform_to?: GObject.BindingTransformFunc | null,
1260
+ transform_from?: GObject.BindingTransformFunc | null,
1261
+ notify?: GLib.DestroyNotify | null,
1262
+ ): GObject.Binding;
1263
+ /**
1264
+ * @param args
1265
+ */
1266
+ // Conflicted with GObject.Object.bind_property_full
1267
+ bind_property_full(...args: never[]): any;
1268
+ /**
1269
+ * This function is intended for {@link GObject.Object} implementations to re-enforce
1270
+ * a [floating](floating-refs.html) object reference. Doing this is seldom
1271
+ * required: all `GInitiallyUnowneds` are created with a floating reference
1272
+ * which usually just needs to be sunken by calling `g_object_ref_sink()`.
1273
+ */
1274
+ force_floating(): void;
1275
+ /**
1276
+ * Increases the freeze count on `object`. If the freeze count is
1277
+ * non-zero, the emission of "notify" signals on `object` is
1278
+ * stopped. The signals are queued until the freeze count is decreased
1279
+ * to zero. Duplicate notifications are squashed so that at most one
1280
+ * {@link GObject.Object.SignalSignatures.notify | GObject.Object::notify} signal is emitted for each property modified while the
1281
+ * object is frozen.
1282
+ *
1283
+ * This is necessary for accessors that modify multiple properties to prevent
1284
+ * premature notification while the object is still being modified.
1285
+ */
1286
+ freeze_notify(): void;
1287
+ /**
1288
+ * Gets a named field from the objects table of associations (see `g_object_set_data()`).
1289
+ * @param key name of the key for that association
1290
+ * @returns the data if found, or `null` if no such data exists.
1291
+ */
1292
+ get_data(key: string): any | null;
1293
+ /**
1294
+ * Gets a property of an object.
1295
+ *
1296
+ * The value can be:
1297
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
1298
+ * - a GObject.Value initialized with the expected type of the property
1299
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
1300
+ *
1301
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
1302
+ *
1303
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
1304
+ * @param property_name The name of the property to get
1305
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
1306
+ */
1307
+ get_property(property_name: string, value: GObject.Value | any): any;
1308
+ /**
1309
+ * This function gets back user data pointers stored via
1310
+ * `g_object_set_qdata()`.
1311
+ * @param quark A {@link GLib.Quark}, naming the user data pointer
1312
+ * @returns The user data pointer set, or `null`
1313
+ */
1314
+ get_qdata(quark: GLib.Quark): any | null;
1315
+ /**
1316
+ * Gets `n_properties` properties for an `object`.
1317
+ * Obtained properties will be set to `values`. All properties must be valid.
1318
+ * Warnings will be emitted and undefined behaviour may result if invalid
1319
+ * properties are passed in.
1320
+ * @param names the names of each property to get
1321
+ * @param values the values of each property to get
1322
+ */
1323
+ getv(names: string[], values: (GObject.Value | any)[]): void;
1324
+ /**
1325
+ * Checks whether `object` has a [floating](floating-refs.html) reference.
1326
+ * @returns `true` if `object` has a floating reference
1327
+ */
1328
+ is_floating(): boolean;
1329
+ /**
1330
+ * Emits a "notify" signal for the property `property_name` on `object`.
1331
+ *
1332
+ * When possible, eg. when signaling a property change from within the class
1333
+ * that registered the property, you should use `g_object_notify_by_pspec()`
1334
+ * instead.
1335
+ *
1336
+ * Note that emission of the notify signal may be blocked with
1337
+ * `g_object_freeze_notify()`. In this case, the signal emissions are queued
1338
+ * and will be emitted (in reverse order) when `g_object_thaw_notify()` is
1339
+ * called.
1340
+ * @param property_name the name of a property installed on the class of `object`.
1341
+ */
1342
+ notify(property_name: string): void;
1343
+ /**
1344
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
1345
+ *
1346
+ * This function omits the property name lookup, hence it is faster than
1347
+ * `g_object_notify()`.
1348
+ *
1349
+ * One way to avoid using `g_object_notify()` from within the
1350
+ * class that registered the properties, and using `g_object_notify_by_pspec()`
1351
+ * instead, is to store the GParamSpec used with
1352
+ * `g_object_class_install_property()` inside a static array, e.g.:
1353
+ *
1354
+ *
1355
+ * ```c
1356
+ * typedef enum
1357
+ * {
1358
+ * PROP_FOO = 1,
1359
+ * PROP_LAST
1360
+ * } MyObjectProperty;
1361
+ *
1362
+ * static GParamSpec *properties[PROP_LAST];
1363
+ *
1364
+ * static void
1365
+ * my_object_class_init (MyObjectClass *klass)
1366
+ * {
1367
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
1368
+ * 0, 100,
1369
+ * 50,
1370
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
1371
+ * g_object_class_install_property (gobject_class,
1372
+ * PROP_FOO,
1373
+ * properties[PROP_FOO]);
1374
+ * }
1375
+ * ```
1376
+ *
1377
+ *
1378
+ * and then notify a change on the "foo" property with:
1379
+ *
1380
+ *
1381
+ * ```c
1382
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
1383
+ * ```
1384
+ *
1385
+ * @param pspec the {@link GObject.ParamSpec} of a property installed on the class of `object`.
1386
+ */
1387
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
1388
+ /**
1389
+ * Increases the reference count of `object`.
1390
+ *
1391
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
1392
+ * of `object` will be propagated to the return type (using the GCC `typeof()`
1393
+ * extension), so any casting the caller needs to do on the return type must be
1394
+ * explicit.
1395
+ * @returns the same `object`
1396
+ */
1397
+ ref(): GObject.Object;
1398
+ /**
1399
+ * Increase the reference count of `object`, and possibly remove the
1400
+ * [floating](floating-refs.html) reference, if `object` has a floating reference.
1401
+ *
1402
+ * In other words, if the object is floating, then this call "assumes
1403
+ * ownership" of the floating reference, converting it to a normal
1404
+ * reference by clearing the floating flag while leaving the reference
1405
+ * count unchanged. If the object is not floating, then this call
1406
+ * adds a new normal reference increasing the reference count by one.
1407
+ *
1408
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
1409
+ * under the same conditions as for `g_object_ref()`.
1410
+ * @returns `object`
1411
+ */
1412
+ ref_sink(): GObject.Object;
1413
+ /**
1414
+ * Releases all references to other objects. This can be used to break
1415
+ * reference cycles.
1416
+ *
1417
+ * This function should only be called from object system implementations.
1418
+ */
1419
+ run_dispose(): void;
1420
+ /**
1421
+ * Each object carries around a table of associations from
1422
+ * strings to pointers. This function lets you set an association.
1423
+ *
1424
+ * If the object already had an association with that name,
1425
+ * the old association will be destroyed.
1426
+ *
1427
+ * Internally, the `key` is converted to a {@link GLib.Quark} using `g_quark_from_string()`.
1428
+ * This means a copy of `key` is kept permanently (even after `object` has been
1429
+ * finalized) — so it is recommended to only use a small, bounded set of values
1430
+ * for `key` in your program, to avoid the {@link GLib.Quark} storage growing unbounded.
1431
+ * @param key name of the key
1432
+ * @param data data to associate with that key
1433
+ */
1434
+ set_data(key: string, data?: any | null): void;
1435
+ /**
1436
+ * Sets a property on an object.
1437
+ * @param property_name The name of the property to set
1438
+ * @param value The value to set the property to
1439
+ */
1440
+ set_property(property_name: string, value: GObject.Value | any): void;
1441
+ /**
1442
+ * Remove a specified datum from the object's data associations,
1443
+ * without invoking the association's destroy handler.
1444
+ * @param key name of the key
1445
+ * @returns the data if found, or `null` if no such data exists.
1446
+ */
1447
+ steal_data(key: string): any | null;
1448
+ /**
1449
+ * This function gets back user data pointers stored via
1450
+ * `g_object_set_qdata()` and removes the `data` from object
1451
+ * without invoking its `destroy()` function (if any was
1452
+ * set).
1453
+ * Usually, calling this function is only required to update
1454
+ * user data pointers with a destroy notifier, for example:
1455
+ *
1456
+ * ```c
1457
+ * void
1458
+ * object_add_to_user_list (GObject *object,
1459
+ * const gchar *new_string)
1460
+ * {
1461
+ * // the quark, naming the object data
1462
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
1463
+ * // retrieve the old string list
1464
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
1465
+ *
1466
+ * // prepend new string
1467
+ * list = g_list_prepend (list, g_strdup (new_string));
1468
+ * // this changed 'list', so we need to set it again
1469
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
1470
+ * }
1471
+ * static void
1472
+ * free_string_list (gpointer data)
1473
+ * {
1474
+ * GList *node, *list = data;
1475
+ *
1476
+ * for (node = list; node; node = node->next)
1477
+ * g_free (node->data);
1478
+ * g_list_free (list);
1479
+ * }
1480
+ * ```
1481
+ *
1482
+ * Using `g_object_get_qdata()` in the above example, instead of
1483
+ * `g_object_steal_qdata()` would have left the destroy function set,
1484
+ * and thus the partial string list would have been freed upon
1485
+ * `g_object_set_qdata_full()`.
1486
+ * @param quark A {@link GLib.Quark}, naming the user data pointer
1487
+ * @returns The user data pointer set, or `null`
1488
+ */
1489
+ steal_qdata(quark: GLib.Quark): any | null;
1490
+ /**
1491
+ * Reverts the effect of a previous call to
1492
+ * `g_object_freeze_notify()`. The freeze count is decreased on `object`
1493
+ * and when it reaches zero, queued "notify" signals are emitted.
1494
+ *
1495
+ * Duplicate notifications for each property are squashed so that at most one
1496
+ * {@link GObject.Object.SignalSignatures.notify | GObject.Object::notify} signal is emitted for each property, in the reverse order
1497
+ * in which they have been queued.
1498
+ *
1499
+ * It is an error to call this function when the freeze count is zero.
1500
+ */
1501
+ thaw_notify(): void;
1502
+ /**
1503
+ * Decreases the reference count of `object`. When its reference count
1504
+ * drops to 0, the object is finalized (i.e. its memory is freed).
1505
+ *
1506
+ * If the pointer to the {@link GObject.Object} may be reused in future (for example, if it is
1507
+ * an instance variable of another object), it is recommended to clear the
1508
+ * pointer to `null` rather than retain a dangling pointer to a potentially
1509
+ * invalid {@link GObject.Object} instance. Use `g_clear_object()` for this.
1510
+ */
1511
+ unref(): void;
1512
+ /**
1513
+ * This function essentially limits the life time of the `closure` to
1514
+ * the life time of the object. That is, when the object is finalized,
1515
+ * the `closure` is invalidated by calling `g_closure_invalidate()` on
1516
+ * it, in order to prevent invocations of the closure with a finalized
1517
+ * (nonexisting) object. Also, `g_object_ref()` and `g_object_unref()` are
1518
+ * added as marshal guards to the `closure`, to ensure that an extra
1519
+ * reference count is held on `object` during invocation of the
1520
+ * `closure`. Usually, this function will be called on closures that
1521
+ * use this `object` as closure data.
1522
+ * @param closure {@link GObject.Closure} to watch
1523
+ */
1524
+ watch_closure(closure: GObject.Closure): void;
1525
+ /**
1526
+ * the `constructed` function is called by `g_object_new()` as the
1527
+ * final step of the object creation process. At the point of the call, all
1528
+ * construction properties have been set on the object. The purpose of this
1529
+ * call is to allow for object initialisation steps that can only be performed
1530
+ * after construction properties have been set. `constructed` implementors
1531
+ * should chain up to the `constructed` call of their parent class to allow it
1532
+ * to complete its initialisation.
1533
+ * @virtual
1534
+ */
1535
+ vfunc_constructed(): void;
1536
+ /**
1537
+ * emits property change notification for a bunch
1538
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
1539
+ * needed.
1540
+ * @param n_pspecs
1541
+ * @param pspecs
1542
+ * @virtual
1543
+ */
1544
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
1545
+ /**
1546
+ * the `dispose` function is supposed to drop all references to other
1547
+ * objects, but keep the instance otherwise intact, so that client method
1548
+ * invocations still work. It may be run multiple times (due to reference
1549
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
1550
+ * of the parent class.
1551
+ * @virtual
1552
+ */
1553
+ vfunc_dispose(): void;
1554
+ /**
1555
+ * instance finalization function, should finish the finalization of
1556
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
1557
+ * parent class.
1558
+ * @virtual
1559
+ */
1560
+ vfunc_finalize(): void;
1561
+ /**
1562
+ * the generic getter for all properties of this type. Should be
1563
+ * overridden for every type with properties.
1564
+ * @param property_id
1565
+ * @param value
1566
+ * @param pspec
1567
+ * @virtual
1568
+ */
1569
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1570
+ /**
1571
+ * Emits a "notify" signal for the property `property_name` on `object`.
1572
+ *
1573
+ * When possible, eg. when signaling a property change from within the class
1574
+ * that registered the property, you should use `g_object_notify_by_pspec()`
1575
+ * instead.
1576
+ *
1577
+ * Note that emission of the notify signal may be blocked with
1578
+ * `g_object_freeze_notify()`. In this case, the signal emissions are queued
1579
+ * and will be emitted (in reverse order) when `g_object_thaw_notify()` is
1580
+ * called.
1581
+ * @param pspec
1582
+ * @virtual
1583
+ */
1584
+ vfunc_notify(pspec: GObject.ParamSpec): void;
1585
+ /**
1586
+ * the generic setter for all properties of this type. Should be
1587
+ * overridden for every type with properties. If implementations of
1588
+ * `set_property` don't emit property change notification explicitly, this will
1589
+ * be done implicitly by the type system. However, if the notify signal is
1590
+ * emitted explicitly, the type system will not emit it a second time.
1591
+ * @param property_id
1592
+ * @param value
1593
+ * @param pspec
1594
+ * @virtual
1595
+ */
1596
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1597
+ /**
1598
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
1599
+ * @param id Handler ID of the handler to be disconnected
1600
+ */
1601
+ disconnect(id: number): void;
1602
+ /**
1603
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
1604
+ * @param properties Object containing the properties to set
1605
+ */
1606
+ set(properties: { [key: string]: any }): void;
1607
+ /**
1608
+ * Blocks a handler of an instance so it will not be called during any signal emissions
1609
+ * @param id Handler ID of the handler to be blocked
1610
+ */
1611
+ block_signal_handler(id: number): void;
1612
+ /**
1613
+ * Unblocks a handler so it will be called again during any signal emissions
1614
+ * @param id Handler ID of the handler to be unblocked
1615
+ */
1616
+ unblock_signal_handler(id: number): void;
1617
+ /**
1618
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
1619
+ * @param detailedName Name of the signal to stop emission of
1620
+ */
1621
+ stop_emission_by_name(detailedName: string): void;
1622
+ }
1623
+
1624
+ namespace PopoverManager {
1625
+ // Signal signatures
1626
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
1627
+
1628
+ // Constructor properties interface
1629
+
1630
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1631
+ }
1632
+
1633
+ /**
1634
+ * @gir-type Class
1635
+ */
1636
+ class PopoverManager extends GObject.Object {
1637
+ static $gtype: GObject.GType<PopoverManager>;
1638
+
1639
+ /**
1640
+ * Compile-time signal type information.
1641
+ *
1642
+ * This instance property is generated only for TypeScript type checking.
1643
+ * It is not defined at runtime and should not be accessed in JS code.
1644
+ * @internal
1645
+ */
1646
+ $signals: PopoverManager.SignalSignatures;
1647
+
1648
+ // Constructors
1649
+
1650
+ constructor(properties?: Partial<PopoverManager.ConstructorProps>, ...args: any[]);
1651
+
1652
+ _init(...args: any[]): void;
1653
+
1654
+ static ['new'](): PopoverManager;
1655
+
1656
+ // Signals
1657
+
1658
+ /** @signal */
1659
+ connect<K extends keyof PopoverManager.SignalSignatures>(
1660
+ signal: K,
1661
+ callback: GObject.SignalCallback<this, PopoverManager.SignalSignatures[K]>,
1662
+ ): number;
1663
+ connect(signal: string, callback: (...args: any[]) => any): number;
1664
+ /** @signal */
1665
+ connect_after<K extends keyof PopoverManager.SignalSignatures>(
1666
+ signal: K,
1667
+ callback: GObject.SignalCallback<this, PopoverManager.SignalSignatures[K]>,
1668
+ ): number;
1669
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1670
+ /** @signal */
1671
+ emit<K extends keyof PopoverManager.SignalSignatures>(
1672
+ signal: K,
1673
+ ...args: GObject.GjsParameters<PopoverManager.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1674
+ ): void;
1675
+ emit(signal: string, ...args: any[]): void;
1676
+
1677
+ // Methods
1678
+
1679
+ /**
1680
+ * @param parent_widget
1681
+ * @param popover
1682
+ */
1683
+ register_popover(parent_widget: Gtk.Widget, popover: Gtk.Popover): void;
1684
+ /**
1685
+ * Show a {@link Budgie.Popover} on screen belonging to the specified `parent_widget`
1686
+ * @param parent_widget The widget owning the popover to be shown
1687
+ */
1688
+ show_popover(parent_widget: Gtk.Widget): void;
1689
+ /**
1690
+ * Unregister a popover so that it is no longer managed by this implementation,
1691
+ * and is free to manage itself.
1692
+ * @param parent_widget The associated widget (key) for the registered popover
1693
+ */
1694
+ unregister_popover(parent_widget: Gtk.Widget): void;
1695
+ }
1696
+
1697
+ /**
1698
+ * @gir-type Alias
1699
+ */
1700
+ type AppletClass = typeof Applet;
1701
+ /**
1702
+ * @gir-type Alias
1703
+ */
1704
+ type AppletInfoClass = typeof AppletInfo;
1705
+ /**
1706
+ * @gir-type Struct
1707
+ */
1708
+ abstract class AppletInfoPrivate {
1709
+ static $gtype: GObject.GType<AppletInfoPrivate>;
1710
+ }
1711
+
1712
+ /**
1713
+ * @gir-type Struct
1714
+ */
1715
+ abstract class AppletPrivate {
1716
+ static $gtype: GObject.GType<AppletPrivate>;
1717
+ }
1718
+
1719
+ /**
1720
+ * @gir-type Alias
1721
+ */
1722
+ type PluginIface = typeof Plugin;
1723
+ /**
1724
+ * @gir-type Alias
1725
+ */
1726
+ type PopoverClass = typeof Popover;
1727
+ /**
1728
+ * @gir-type Alias
1729
+ */
1730
+ type PopoverManagerClass = typeof PopoverManager;
1731
+ /**
1732
+ * @gir-type Struct
1733
+ */
1734
+ abstract class PopoverManagerPrivate {
1735
+ static $gtype: GObject.GType<PopoverManagerPrivate>;
1736
+ }
1737
+
1738
+ namespace Plugin {
1739
+ /**
1740
+ * Interface for implementing Plugin.
1741
+ * Contains only the virtual methods that need to be implemented.
1742
+ */
1743
+ interface Interface {
1744
+ // Virtual methods
1745
+
1746
+ /**
1747
+ * @param uuid UUID for this new instance
1748
+ * @virtual
1749
+ */
1750
+ vfunc_get_panel_widget(uuid: string): Applet;
1751
+ }
1752
+
1753
+ // Constructor properties interface
1754
+
1755
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1756
+ }
1757
+
1758
+ export interface PluginNamespace {
1759
+ $gtype: GObject.GType<Plugin>;
1760
+ prototype: Plugin;
1761
+ }
1762
+ /**
1763
+ * @gir-type Interface
1764
+ */
1765
+ interface Plugin extends GObject.Object, Plugin.Interface {
1766
+ // Methods
1767
+
1768
+ /**
1769
+ * @param uuid UUID for this new instance
1770
+ * @returns A newly initialised panel widget
1771
+ */
1772
+ get_panel_widget(uuid: string): Applet;
1773
+ }
1774
+
1775
+ export const Plugin: PluginNamespace & {
1776
+ new (): Plugin; // This allows `obj instanceof Plugin`
1777
+ };
1778
+
1779
+ /**
1780
+ * Name of the imported GIR library
1781
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
1782
+ */
1783
+ const __name__: string;
1784
+ /**
1785
+ * Version of the imported GIR library
1786
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
1787
+ */
1788
+ const __version__: string;
1789
+ }
1790
+
1791
+ export default Budgie;
1792
+
1793
+ // END