@girs/gplugingtk4-1.0 0.42.1-4.0.0-beta.3

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,4438 @@
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
+
8
+ import './gplugingtk4-1.0-ambient.d.ts';
9
+
10
+ /**
11
+ * GPluginGtk4-1.0
12
+ */
13
+
14
+ import type Gtk from '@girs/gtk-4.0';
15
+ import type Gsk from '@girs/gsk-4.0';
16
+ import type Graphene from '@girs/graphene-1.0';
17
+ import type GObject from '@girs/gobject-2.0';
18
+ import type GLib from '@girs/glib-2.0';
19
+ import type Gdk from '@girs/gdk-4.0';
20
+ import type cairo from '@girs/cairo-1.0';
21
+ import type PangoCairo from '@girs/pangocairo-1.0';
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 Gio from '@girs/gio-2.0';
26
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
27
+ import type GModule from '@girs/gmodule-2.0';
28
+ import type GPlugin from '@girs/gplugin-1.0';
29
+
30
+ export namespace GPluginGtk4 {
31
+ /**
32
+ * This is the extra version string of GPluginGtk that was compiled against.
33
+ */
34
+ const EXTRA_VERSION: string;
35
+ /**
36
+ * This is the major version number of GPluginGtk that was compiled against.
37
+ */
38
+ const MAJOR_VERSION: number;
39
+ /**
40
+ * This is the micro version number of GPluginGtk that was compiled against.
41
+ */
42
+ const MICRO_VERSION: number;
43
+ /**
44
+ * This is the minor version number of GPluginGtk that was compiled against.
45
+ */
46
+ const MINOR_VERSION: number;
47
+ /**
48
+ * This is the string version number of GPluginGtk that was compiled against.
49
+ */
50
+ const VERSION: string;
51
+ const VERSION_MIN_REQUIRED: number;
52
+ /**
53
+ * Checks that the GPluginGtk library in use is compatible with the given
54
+ * version.
55
+ *
56
+ * Generally you would pass in the constants [const`MAJOR_VERSION]`,
57
+ * [const`MINOR_VERSION]`, [const`MICRO_VERSION]` as the three arguments to this
58
+ * function; that produces a check that the library in use is compatible with
59
+ * the version of GPluginGtk the application or module was compiled against.
60
+ *
61
+ * Compatibility is defined by two things: first the version of the running
62
+ * library is newer than the version `major`.`minor`.`micro`. Second the running
63
+ * library must be binary compatible with the version `major`.`minor`.`micro`
64
+ * (same major version).
65
+ * @param major The required major version.
66
+ * @param minor The required minor version.
67
+ * @param micro The required micro version.
68
+ * @returns %NULL if the GPluginGtk library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by GPluginGtk and must not be modified or freed.
69
+ */
70
+ function version_check(major: number, minor: number, micro: number): string;
71
+ module PluginPage {
72
+ // Signal callback interfaces
73
+
74
+ interface PluginStateSet {
75
+ (enabled: boolean): void;
76
+ }
77
+
78
+ // Constructor properties interface
79
+
80
+ interface ConstructorProps
81
+ extends Gtk.Box.ConstructorProps,
82
+ Gtk.Accessible.ConstructorProps,
83
+ Gtk.Buildable.ConstructorProps,
84
+ Gtk.ConstraintTarget.ConstructorProps,
85
+ Gtk.Orientable.ConstructorProps {
86
+ plugin: GObject.Object;
87
+ settings_backend: Gio.SettingsBackend;
88
+ settingsBackend: Gio.SettingsBackend;
89
+ }
90
+ }
91
+
92
+ /**
93
+ * A widget that displays a single [iface`GPlugin`.Plugin] in a user friendly
94
+ * way, intended to be placed in a [class`GPluginGtk4`.View].
95
+ */
96
+ class PluginPage extends Gtk.Box implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable {
97
+ static $gtype: GObject.GType<PluginPage>;
98
+
99
+ // Own properties of GPluginGtk4.PluginPage
100
+
101
+ /**
102
+ * The [iface`GPlugin`.Plugin] whose info should be displayed.
103
+ */
104
+ get plugin(): GObject.Object;
105
+ set plugin(val: GObject.Object);
106
+ /**
107
+ * The [class`Gio`.SettingsBackend] to use when viewing plugin settings.
108
+ */
109
+ get settings_backend(): Gio.SettingsBackend;
110
+ set settings_backend(val: Gio.SettingsBackend);
111
+ /**
112
+ * The [class`Gio`.SettingsBackend] to use when viewing plugin settings.
113
+ */
114
+ get settingsBackend(): Gio.SettingsBackend;
115
+ set settingsBackend(val: Gio.SettingsBackend);
116
+
117
+ // Constructors of GPluginGtk4.PluginPage
118
+
119
+ constructor(properties?: Partial<PluginPage.ConstructorProps>, ...args: any[]);
120
+
121
+ _init(...args: any[]): void;
122
+
123
+ static ['new'](): PluginPage;
124
+
125
+ // Own signals of GPluginGtk4.PluginPage
126
+
127
+ connect(id: string, callback: (...args: any[]) => any): number;
128
+ connect_after(id: string, callback: (...args: any[]) => any): number;
129
+ emit(id: string, ...args: any[]): void;
130
+ connect(signal: 'plugin-state-set', callback: (_source: this, enabled: boolean) => void): number;
131
+ connect_after(signal: 'plugin-state-set', callback: (_source: this, enabled: boolean) => void): number;
132
+ emit(signal: 'plugin-state-set', enabled: boolean): void;
133
+
134
+ // Own methods of GPluginGtk4.PluginPage
135
+
136
+ /**
137
+ * Gets the [iface`GPlugin`.Plugin] that's being displayed.
138
+ * @returns The plugin that's being displayed, or %NULL if the page is empty.
139
+ */
140
+ get_plugin(): GPlugin.Plugin | null;
141
+ /**
142
+ * Gets the settings backend used when displaying plugin settings.
143
+ *
144
+ * Note, because we do not want to leak `G_SETTINGS_ENABLE_BACKEND` into
145
+ * GPlugin users, this function returns a `gpointer`, and you should cast to
146
+ * `GSettingsBackend *` after setting `G_SETTINGS_ENABLE_BACKEND` for the files
147
+ * where you need it.
148
+ * @returns The settings backend in use.
149
+ */
150
+ get_settings_backend(): any | null;
151
+ /**
152
+ * Sets the [iface`GPlugin`.Plugin] that should be displayed.
153
+ *
154
+ * A `plugin` value of %NULL will clear the widget.
155
+ * @param plugin The plugin instance.
156
+ */
157
+ set_plugin(plugin?: GPlugin.Plugin | null): void;
158
+ /**
159
+ * Sets the settings backend to use when displaying plugin settings.
160
+ *
161
+ * Note, because we do not want to leak `G_SETTINGS_ENABLE_BACKEND` into
162
+ * GPlugin users, this function takes a `gpointer` instead of a
163
+ * `GSettingsBackend *` but the type will be checked internally.
164
+ * @param backend The settings backend to use. If %NULL, the default GSettings backend will be used.
165
+ */
166
+ set_settings_backend(backend?: any | null): void;
167
+
168
+ // Inherited properties
169
+ /**
170
+ * The orientation of the orientable.
171
+ */
172
+ get orientation(): Gtk.Orientation;
173
+ set orientation(val: Gtk.Orientation);
174
+
175
+ // Inherited methods
176
+ /**
177
+ * Retrieves the orientation of the `orientable`.
178
+ * @returns the orientation of the @orientable
179
+ */
180
+ get_orientation(): Gtk.Orientation;
181
+ /**
182
+ * Sets the orientation of the `orientable`.
183
+ * @param orientation the orientable’s new orientation
184
+ */
185
+ set_orientation(orientation: Gtk.Orientation): void;
186
+ /**
187
+ * Creates a binding between `source_property` on `source` and `target_property`
188
+ * on `target`.
189
+ *
190
+ * Whenever the `source_property` is changed the `target_property` is
191
+ * updated using the same value. For instance:
192
+ *
193
+ *
194
+ * ```c
195
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
196
+ * ```
197
+ *
198
+ *
199
+ * Will result in the "sensitive" property of the widget #GObject instance to be
200
+ * updated with the same value of the "active" property of the action #GObject
201
+ * instance.
202
+ *
203
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
204
+ * if `target_property` on `target` changes then the `source_property` on `source`
205
+ * will be updated as well.
206
+ *
207
+ * The binding will automatically be removed when either the `source` or the
208
+ * `target` instances are finalized. To remove the binding without affecting the
209
+ * `source` and the `target` you can just call g_object_unref() on the returned
210
+ * #GBinding instance.
211
+ *
212
+ * Removing the binding by calling g_object_unref() on it must only be done if
213
+ * the binding, `source` and `target` are only used from a single thread and it
214
+ * is clear that both `source` and `target` outlive the binding. Especially it
215
+ * is not safe to rely on this if the binding, `source` or `target` can be
216
+ * finalized from different threads. Keep another reference to the binding and
217
+ * use g_binding_unbind() instead to be on the safe side.
218
+ *
219
+ * A #GObject can have multiple bindings.
220
+ * @param source_property the property on @source to bind
221
+ * @param target the target #GObject
222
+ * @param target_property the property on @target to bind
223
+ * @param flags flags to pass to #GBinding
224
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
225
+ */
226
+ bind_property(
227
+ source_property: string,
228
+ target: GObject.Object,
229
+ target_property: string,
230
+ flags: GObject.BindingFlags,
231
+ ): GObject.Binding;
232
+ /**
233
+ * Complete version of g_object_bind_property().
234
+ *
235
+ * Creates a binding between `source_property` on `source` and `target_property`
236
+ * on `target,` allowing you to set the transformation functions to be used by
237
+ * the binding.
238
+ *
239
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
240
+ * if `target_property` on `target` changes then the `source_property` on `source`
241
+ * will be updated as well. The `transform_from` function is only used in case
242
+ * of bidirectional bindings, otherwise it will be ignored
243
+ *
244
+ * The binding will automatically be removed when either the `source` or the
245
+ * `target` instances are finalized. This will release the reference that is
246
+ * being held on the #GBinding instance; if you want to hold on to the
247
+ * #GBinding instance, you will need to hold a reference to it.
248
+ *
249
+ * To remove the binding, call g_binding_unbind().
250
+ *
251
+ * A #GObject can have multiple bindings.
252
+ *
253
+ * The same `user_data` parameter will be used for both `transform_to`
254
+ * and `transform_from` transformation functions; the `notify` function will
255
+ * be called once, when the binding is removed. If you need different data
256
+ * for each transformation function, please use
257
+ * g_object_bind_property_with_closures() instead.
258
+ * @param source_property the property on @source to bind
259
+ * @param target the target #GObject
260
+ * @param target_property the property on @target to bind
261
+ * @param flags flags to pass to #GBinding
262
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
263
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
264
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
265
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
266
+ */
267
+ bind_property_full(
268
+ source_property: string,
269
+ target: GObject.Object,
270
+ target_property: string,
271
+ flags: GObject.BindingFlags,
272
+ transform_to?: GObject.BindingTransformFunc | null,
273
+ transform_from?: GObject.BindingTransformFunc | null,
274
+ notify?: GLib.DestroyNotify | null,
275
+ ): GObject.Binding;
276
+ // Conflicted with GObject.Object.bind_property_full
277
+ bind_property_full(...args: never[]): any;
278
+ /**
279
+ * This function is intended for #GObject implementations to re-enforce
280
+ * a [floating][floating-ref] object reference. Doing this is seldom
281
+ * required: all #GInitiallyUnowneds are created with a floating reference
282
+ * which usually just needs to be sunken by calling g_object_ref_sink().
283
+ */
284
+ force_floating(): void;
285
+ /**
286
+ * Increases the freeze count on `object`. If the freeze count is
287
+ * non-zero, the emission of "notify" signals on `object` is
288
+ * stopped. The signals are queued until the freeze count is decreased
289
+ * to zero. Duplicate notifications are squashed so that at most one
290
+ * #GObject::notify signal is emitted for each property modified while the
291
+ * object is frozen.
292
+ *
293
+ * This is necessary for accessors that modify multiple properties to prevent
294
+ * premature notification while the object is still being modified.
295
+ */
296
+ freeze_notify(): void;
297
+ /**
298
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
299
+ * @param key name of the key for that association
300
+ * @returns the data if found, or %NULL if no such data exists.
301
+ */
302
+ get_data(key: string): any | null;
303
+ get_property(property_name: string): any;
304
+ /**
305
+ * This function gets back user data pointers stored via
306
+ * g_object_set_qdata().
307
+ * @param quark A #GQuark, naming the user data pointer
308
+ * @returns The user data pointer set, or %NULL
309
+ */
310
+ get_qdata(quark: GLib.Quark): any | null;
311
+ /**
312
+ * Gets `n_properties` properties for an `object`.
313
+ * Obtained properties will be set to `values`. All properties must be valid.
314
+ * Warnings will be emitted and undefined behaviour may result if invalid
315
+ * properties are passed in.
316
+ * @param names the names of each property to get
317
+ * @param values the values of each property to get
318
+ */
319
+ getv(names: string[], values: (GObject.Value | any)[]): void;
320
+ /**
321
+ * Checks whether `object` has a [floating][floating-ref] reference.
322
+ * @returns %TRUE if @object has a floating reference
323
+ */
324
+ is_floating(): boolean;
325
+ /**
326
+ * Emits a "notify" signal for the property `property_name` on `object`.
327
+ *
328
+ * When possible, eg. when signaling a property change from within the class
329
+ * that registered the property, you should use g_object_notify_by_pspec()
330
+ * instead.
331
+ *
332
+ * Note that emission of the notify signal may be blocked with
333
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
334
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
335
+ * called.
336
+ * @param property_name the name of a property installed on the class of @object.
337
+ */
338
+ notify(property_name: string): void;
339
+ /**
340
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
341
+ *
342
+ * This function omits the property name lookup, hence it is faster than
343
+ * g_object_notify().
344
+ *
345
+ * One way to avoid using g_object_notify() from within the
346
+ * class that registered the properties, and using g_object_notify_by_pspec()
347
+ * instead, is to store the GParamSpec used with
348
+ * g_object_class_install_property() inside a static array, e.g.:
349
+ *
350
+ *
351
+ * ```c
352
+ * typedef enum
353
+ * {
354
+ * PROP_FOO = 1,
355
+ * PROP_LAST
356
+ * } MyObjectProperty;
357
+ *
358
+ * static GParamSpec *properties[PROP_LAST];
359
+ *
360
+ * static void
361
+ * my_object_class_init (MyObjectClass *klass)
362
+ * {
363
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
364
+ * 0, 100,
365
+ * 50,
366
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
367
+ * g_object_class_install_property (gobject_class,
368
+ * PROP_FOO,
369
+ * properties[PROP_FOO]);
370
+ * }
371
+ * ```
372
+ *
373
+ *
374
+ * and then notify a change on the "foo" property with:
375
+ *
376
+ *
377
+ * ```c
378
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
379
+ * ```
380
+ *
381
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
382
+ */
383
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
384
+ /**
385
+ * Increases the reference count of `object`.
386
+ *
387
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
388
+ * of `object` will be propagated to the return type (using the GCC typeof()
389
+ * extension), so any casting the caller needs to do on the return type must be
390
+ * explicit.
391
+ * @returns the same @object
392
+ */
393
+ ref(): GObject.Object;
394
+ /**
395
+ * Increase the reference count of `object,` and possibly remove the
396
+ * [floating][floating-ref] reference, if `object` has a floating reference.
397
+ *
398
+ * In other words, if the object is floating, then this call "assumes
399
+ * ownership" of the floating reference, converting it to a normal
400
+ * reference by clearing the floating flag while leaving the reference
401
+ * count unchanged. If the object is not floating, then this call
402
+ * adds a new normal reference increasing the reference count by one.
403
+ *
404
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
405
+ * under the same conditions as for g_object_ref().
406
+ * @returns @object
407
+ */
408
+ ref_sink(): GObject.Object;
409
+ /**
410
+ * Releases all references to other objects. This can be used to break
411
+ * reference cycles.
412
+ *
413
+ * This function should only be called from object system implementations.
414
+ */
415
+ run_dispose(): void;
416
+ /**
417
+ * Each object carries around a table of associations from
418
+ * strings to pointers. This function lets you set an association.
419
+ *
420
+ * If the object already had an association with that name,
421
+ * the old association will be destroyed.
422
+ *
423
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
424
+ * This means a copy of `key` is kept permanently (even after `object` has been
425
+ * finalized) — so it is recommended to only use a small, bounded set of values
426
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
427
+ * @param key name of the key
428
+ * @param data data to associate with that key
429
+ */
430
+ set_data(key: string, data?: any | null): void;
431
+ set_property(property_name: string, value: any): void;
432
+ /**
433
+ * Remove a specified datum from the object's data associations,
434
+ * without invoking the association's destroy handler.
435
+ * @param key name of the key
436
+ * @returns the data if found, or %NULL if no such data exists.
437
+ */
438
+ steal_data(key: string): any | null;
439
+ /**
440
+ * This function gets back user data pointers stored via
441
+ * g_object_set_qdata() and removes the `data` from object
442
+ * without invoking its destroy() function (if any was
443
+ * set).
444
+ * Usually, calling this function is only required to update
445
+ * user data pointers with a destroy notifier, for example:
446
+ *
447
+ * ```c
448
+ * void
449
+ * object_add_to_user_list (GObject *object,
450
+ * const gchar *new_string)
451
+ * {
452
+ * // the quark, naming the object data
453
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
454
+ * // retrieve the old string list
455
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
456
+ *
457
+ * // prepend new string
458
+ * list = g_list_prepend (list, g_strdup (new_string));
459
+ * // this changed 'list', so we need to set it again
460
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
461
+ * }
462
+ * static void
463
+ * free_string_list (gpointer data)
464
+ * {
465
+ * GList *node, *list = data;
466
+ *
467
+ * for (node = list; node; node = node->next)
468
+ * g_free (node->data);
469
+ * g_list_free (list);
470
+ * }
471
+ * ```
472
+ *
473
+ * Using g_object_get_qdata() in the above example, instead of
474
+ * g_object_steal_qdata() would have left the destroy function set,
475
+ * and thus the partial string list would have been freed upon
476
+ * g_object_set_qdata_full().
477
+ * @param quark A #GQuark, naming the user data pointer
478
+ * @returns The user data pointer set, or %NULL
479
+ */
480
+ steal_qdata(quark: GLib.Quark): any | null;
481
+ /**
482
+ * Reverts the effect of a previous call to
483
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
484
+ * and when it reaches zero, queued "notify" signals are emitted.
485
+ *
486
+ * Duplicate notifications for each property are squashed so that at most one
487
+ * #GObject::notify signal is emitted for each property, in the reverse order
488
+ * in which they have been queued.
489
+ *
490
+ * It is an error to call this function when the freeze count is zero.
491
+ */
492
+ thaw_notify(): void;
493
+ /**
494
+ * Decreases the reference count of `object`. When its reference count
495
+ * drops to 0, the object is finalized (i.e. its memory is freed).
496
+ *
497
+ * If the pointer to the #GObject may be reused in future (for example, if it is
498
+ * an instance variable of another object), it is recommended to clear the
499
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
500
+ * invalid #GObject instance. Use g_clear_object() for this.
501
+ */
502
+ unref(): void;
503
+ /**
504
+ * This function essentially limits the life time of the `closure` to
505
+ * the life time of the object. That is, when the object is finalized,
506
+ * the `closure` is invalidated by calling g_closure_invalidate() on
507
+ * it, in order to prevent invocations of the closure with a finalized
508
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
509
+ * added as marshal guards to the `closure,` to ensure that an extra
510
+ * reference count is held on `object` during invocation of the
511
+ * `closure`. Usually, this function will be called on closures that
512
+ * use this `object` as closure data.
513
+ * @param closure #GClosure to watch
514
+ */
515
+ watch_closure(closure: GObject.Closure): void;
516
+ vfunc_constructed(): void;
517
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
518
+ vfunc_dispose(): void;
519
+ vfunc_finalize(): void;
520
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
521
+ /**
522
+ * Emits a "notify" signal for the property `property_name` on `object`.
523
+ *
524
+ * When possible, eg. when signaling a property change from within the class
525
+ * that registered the property, you should use g_object_notify_by_pspec()
526
+ * instead.
527
+ *
528
+ * Note that emission of the notify signal may be blocked with
529
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
530
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
531
+ * called.
532
+ * @param pspec
533
+ */
534
+ vfunc_notify(pspec: GObject.ParamSpec): void;
535
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
536
+ disconnect(id: number): void;
537
+ set(properties: { [key: string]: any }): void;
538
+ block_signal_handler(id: number): any;
539
+ unblock_signal_handler(id: number): any;
540
+ stop_emission_by_name(detailedName: string): any;
541
+ }
542
+
543
+ module PluginRow {
544
+ // Signal callback interfaces
545
+
546
+ interface PluginStateSet {
547
+ (enabled: boolean): void;
548
+ }
549
+
550
+ // Constructor properties interface
551
+
552
+ interface ConstructorProps
553
+ extends Gtk.ListBoxRow.ConstructorProps,
554
+ Gtk.Accessible.ConstructorProps,
555
+ Gtk.Actionable.ConstructorProps,
556
+ Gtk.Buildable.ConstructorProps,
557
+ Gtk.ConstraintTarget.ConstructorProps {
558
+ plugin: GObject.Object;
559
+ }
560
+ }
561
+
562
+ /**
563
+ * A widget that displays a [iface`GPlugin`.Plugin] in a user friendly way,
564
+ * intended to be placed in a [class`Gtk`.ListBox].
565
+ */
566
+ class PluginRow
567
+ extends Gtk.ListBoxRow
568
+ implements Gtk.Accessible, Gtk.Actionable, Gtk.Buildable, Gtk.ConstraintTarget
569
+ {
570
+ static $gtype: GObject.GType<PluginRow>;
571
+
572
+ // Own properties of GPluginGtk4.PluginRow
573
+
574
+ /**
575
+ * The [iface`GPlugin`.Plugin] whose info should be displayed.
576
+ */
577
+ get plugin(): GObject.Object;
578
+ set plugin(val: GObject.Object);
579
+
580
+ // Constructors of GPluginGtk4.PluginRow
581
+
582
+ constructor(properties?: Partial<PluginRow.ConstructorProps>, ...args: any[]);
583
+
584
+ _init(...args: any[]): void;
585
+
586
+ static ['new'](): PluginRow;
587
+
588
+ // Own signals of GPluginGtk4.PluginRow
589
+
590
+ connect(id: string, callback: (...args: any[]) => any): number;
591
+ connect_after(id: string, callback: (...args: any[]) => any): number;
592
+ emit(id: string, ...args: any[]): void;
593
+ connect(signal: 'plugin-state-set', callback: (_source: this, enabled: boolean) => void): number;
594
+ connect_after(signal: 'plugin-state-set', callback: (_source: this, enabled: boolean) => void): number;
595
+ emit(signal: 'plugin-state-set', enabled: boolean): void;
596
+
597
+ // Own methods of GPluginGtk4.PluginRow
598
+
599
+ /**
600
+ * Returns the [iface`GPlugin`.Plugin] that's being displayed.
601
+ * @returns The plugin that's being displayed, or %NULL if the row is empty.
602
+ */
603
+ get_plugin(): GPlugin.Plugin | null;
604
+ /**
605
+ * Returns a key that can be used to sort this row.
606
+ * @returns The sort key.
607
+ */
608
+ get_sort_key(): string;
609
+ /**
610
+ * Matches this row instance against some text to be searched for.
611
+ * @param text The text to search for.
612
+ * @returns Whether the row matches the text or not.
613
+ */
614
+ matches_search(text: string): boolean;
615
+ /**
616
+ * Sets the [iface`GPlugin`.Plugin] that should be displayed.
617
+ *
618
+ * A `plugin` value of %NULL will clear the widget.
619
+ * @param plugin The plugin instance.
620
+ */
621
+ set_plugin(plugin?: GPlugin.Plugin | null): void;
622
+
623
+ // Inherited properties
624
+ get action_name(): string;
625
+ set action_name(val: string);
626
+ get actionName(): string;
627
+ set actionName(val: string);
628
+ get action_target(): GLib.Variant;
629
+ set action_target(val: GLib.Variant);
630
+ get actionTarget(): GLib.Variant;
631
+ set actionTarget(val: GLib.Variant);
632
+ /**
633
+ * Whether the widget or any of its descendents can accept
634
+ * the input focus.
635
+ *
636
+ * This property is meant to be set by widget implementations,
637
+ * typically in their instance init function.
638
+ */
639
+ get can_focus(): boolean;
640
+ set can_focus(val: boolean);
641
+ /**
642
+ * Whether the widget or any of its descendents can accept
643
+ * the input focus.
644
+ *
645
+ * This property is meant to be set by widget implementations,
646
+ * typically in their instance init function.
647
+ */
648
+ get canFocus(): boolean;
649
+ set canFocus(val: boolean);
650
+ /**
651
+ * Whether the widget can receive pointer events.
652
+ */
653
+ get can_target(): boolean;
654
+ set can_target(val: boolean);
655
+ /**
656
+ * Whether the widget can receive pointer events.
657
+ */
658
+ get canTarget(): boolean;
659
+ set canTarget(val: boolean);
660
+ /**
661
+ * A list of css classes applied to this widget.
662
+ */
663
+ get css_classes(): string[];
664
+ set css_classes(val: string[]);
665
+ /**
666
+ * A list of css classes applied to this widget.
667
+ */
668
+ get cssClasses(): string[];
669
+ set cssClasses(val: string[]);
670
+ /**
671
+ * The name of this widget in the CSS tree.
672
+ *
673
+ * This property is meant to be set by widget implementations,
674
+ * typically in their instance init function.
675
+ */
676
+ get css_name(): string;
677
+ /**
678
+ * The name of this widget in the CSS tree.
679
+ *
680
+ * This property is meant to be set by widget implementations,
681
+ * typically in their instance init function.
682
+ */
683
+ get cssName(): string;
684
+ /**
685
+ * The cursor used by `widget`.
686
+ */
687
+ get cursor(): Gdk.Cursor;
688
+ set cursor(val: Gdk.Cursor);
689
+ /**
690
+ * Whether the widget should grab focus when it is clicked with the mouse.
691
+ *
692
+ * This property is only relevant for widgets that can take focus.
693
+ */
694
+ get focus_on_click(): boolean;
695
+ set focus_on_click(val: boolean);
696
+ /**
697
+ * Whether the widget should grab focus when it is clicked with the mouse.
698
+ *
699
+ * This property is only relevant for widgets that can take focus.
700
+ */
701
+ get focusOnClick(): boolean;
702
+ set focusOnClick(val: boolean);
703
+ /**
704
+ * Whether this widget itself will accept the input focus.
705
+ */
706
+ get focusable(): boolean;
707
+ set focusable(val: boolean);
708
+ /**
709
+ * How to distribute horizontal space if widget gets extra space.
710
+ */
711
+ get halign(): Gtk.Align;
712
+ set halign(val: Gtk.Align);
713
+ /**
714
+ * Whether the widget is the default widget.
715
+ */
716
+ get has_default(): boolean;
717
+ /**
718
+ * Whether the widget is the default widget.
719
+ */
720
+ get hasDefault(): boolean;
721
+ /**
722
+ * Whether the widget has the input focus.
723
+ */
724
+ get has_focus(): boolean;
725
+ /**
726
+ * Whether the widget has the input focus.
727
+ */
728
+ get hasFocus(): boolean;
729
+ /**
730
+ * Enables or disables the emission of the ::query-tooltip signal on `widget`.
731
+ *
732
+ * A value of %TRUE indicates that `widget` can have a tooltip, in this case
733
+ * the widget will be queried using [signal`Gtk`.Widget::query-tooltip] to
734
+ * determine whether it will provide a tooltip or not.
735
+ */
736
+ get has_tooltip(): boolean;
737
+ set has_tooltip(val: boolean);
738
+ /**
739
+ * Enables or disables the emission of the ::query-tooltip signal on `widget`.
740
+ *
741
+ * A value of %TRUE indicates that `widget` can have a tooltip, in this case
742
+ * the widget will be queried using [signal`Gtk`.Widget::query-tooltip] to
743
+ * determine whether it will provide a tooltip or not.
744
+ */
745
+ get hasTooltip(): boolean;
746
+ set hasTooltip(val: boolean);
747
+ /**
748
+ * Override for height request of the widget.
749
+ *
750
+ * If this is -1, the natural request will be used.
751
+ */
752
+ get height_request(): number;
753
+ set height_request(val: number);
754
+ /**
755
+ * Override for height request of the widget.
756
+ *
757
+ * If this is -1, the natural request will be used.
758
+ */
759
+ get heightRequest(): number;
760
+ set heightRequest(val: number);
761
+ /**
762
+ * Whether to expand horizontally.
763
+ */
764
+ get hexpand(): boolean;
765
+ set hexpand(val: boolean);
766
+ /**
767
+ * Whether to use the `hexpand` property.
768
+ */
769
+ get hexpand_set(): boolean;
770
+ set hexpand_set(val: boolean);
771
+ /**
772
+ * Whether to use the `hexpand` property.
773
+ */
774
+ get hexpandSet(): boolean;
775
+ set hexpandSet(val: boolean);
776
+ /**
777
+ * The `GtkLayoutManager` instance to use to compute the preferred size
778
+ * of the widget, and allocate its children.
779
+ *
780
+ * This property is meant to be set by widget implementations,
781
+ * typically in their instance init function.
782
+ */
783
+ get layout_manager(): Gtk.LayoutManager;
784
+ set layout_manager(val: Gtk.LayoutManager);
785
+ /**
786
+ * The `GtkLayoutManager` instance to use to compute the preferred size
787
+ * of the widget, and allocate its children.
788
+ *
789
+ * This property is meant to be set by widget implementations,
790
+ * typically in their instance init function.
791
+ */
792
+ get layoutManager(): Gtk.LayoutManager;
793
+ set layoutManager(val: Gtk.LayoutManager);
794
+ /**
795
+ * Margin on bottom side of widget.
796
+ *
797
+ * This property adds margin outside of the widget's normal size
798
+ * request, the margin will be added in addition to the size from
799
+ * [method`Gtk`.Widget.set_size_request] for example.
800
+ */
801
+ get margin_bottom(): number;
802
+ set margin_bottom(val: number);
803
+ /**
804
+ * Margin on bottom side of widget.
805
+ *
806
+ * This property adds margin outside of the widget's normal size
807
+ * request, the margin will be added in addition to the size from
808
+ * [method`Gtk`.Widget.set_size_request] for example.
809
+ */
810
+ get marginBottom(): number;
811
+ set marginBottom(val: number);
812
+ /**
813
+ * Margin on end of widget, horizontally.
814
+ *
815
+ * This property supports left-to-right and right-to-left text
816
+ * directions.
817
+ *
818
+ * This property adds margin outside of the widget's normal size
819
+ * request, the margin will be added in addition to the size from
820
+ * [method`Gtk`.Widget.set_size_request] for example.
821
+ */
822
+ get margin_end(): number;
823
+ set margin_end(val: number);
824
+ /**
825
+ * Margin on end of widget, horizontally.
826
+ *
827
+ * This property supports left-to-right and right-to-left text
828
+ * directions.
829
+ *
830
+ * This property adds margin outside of the widget's normal size
831
+ * request, the margin will be added in addition to the size from
832
+ * [method`Gtk`.Widget.set_size_request] for example.
833
+ */
834
+ get marginEnd(): number;
835
+ set marginEnd(val: number);
836
+ /**
837
+ * Margin on start of widget, horizontally.
838
+ *
839
+ * This property supports left-to-right and right-to-left text
840
+ * directions.
841
+ *
842
+ * This property adds margin outside of the widget's normal size
843
+ * request, the margin will be added in addition to the size from
844
+ * [method`Gtk`.Widget.set_size_request] for example.
845
+ */
846
+ get margin_start(): number;
847
+ set margin_start(val: number);
848
+ /**
849
+ * Margin on start of widget, horizontally.
850
+ *
851
+ * This property supports left-to-right and right-to-left text
852
+ * directions.
853
+ *
854
+ * This property adds margin outside of the widget's normal size
855
+ * request, the margin will be added in addition to the size from
856
+ * [method`Gtk`.Widget.set_size_request] for example.
857
+ */
858
+ get marginStart(): number;
859
+ set marginStart(val: number);
860
+ /**
861
+ * Margin on top side of widget.
862
+ *
863
+ * This property adds margin outside of the widget's normal size
864
+ * request, the margin will be added in addition to the size from
865
+ * [method`Gtk`.Widget.set_size_request] for example.
866
+ */
867
+ get margin_top(): number;
868
+ set margin_top(val: number);
869
+ /**
870
+ * Margin on top side of widget.
871
+ *
872
+ * This property adds margin outside of the widget's normal size
873
+ * request, the margin will be added in addition to the size from
874
+ * [method`Gtk`.Widget.set_size_request] for example.
875
+ */
876
+ get marginTop(): number;
877
+ set marginTop(val: number);
878
+ /**
879
+ * The name of the widget.
880
+ */
881
+ get name(): string;
882
+ set name(val: string);
883
+ /**
884
+ * The requested opacity of the widget.
885
+ */
886
+ get opacity(): number;
887
+ set opacity(val: number);
888
+ /**
889
+ * How content outside the widget's content area is treated.
890
+ *
891
+ * This property is meant to be set by widget implementations,
892
+ * typically in their instance init function.
893
+ */
894
+ get overflow(): Gtk.Overflow;
895
+ set overflow(val: Gtk.Overflow);
896
+ /**
897
+ * The parent widget of this widget.
898
+ */
899
+ get parent(): Gtk.Widget;
900
+ /**
901
+ * Whether the widget will receive the default action when it is focused.
902
+ */
903
+ get receives_default(): boolean;
904
+ set receives_default(val: boolean);
905
+ /**
906
+ * Whether the widget will receive the default action when it is focused.
907
+ */
908
+ get receivesDefault(): boolean;
909
+ set receivesDefault(val: boolean);
910
+ /**
911
+ * The `GtkRoot` widget of the widget tree containing this widget.
912
+ *
913
+ * This will be %NULL if the widget is not contained in a root widget.
914
+ */
915
+ get root(): Gtk.Root;
916
+ /**
917
+ * The scale factor of the widget.
918
+ */
919
+ get scale_factor(): number;
920
+ /**
921
+ * The scale factor of the widget.
922
+ */
923
+ get scaleFactor(): number;
924
+ /**
925
+ * Whether the widget responds to input.
926
+ */
927
+ get sensitive(): boolean;
928
+ set sensitive(val: boolean);
929
+ /**
930
+ * Sets the text of tooltip to be the given string, which is marked up
931
+ * with Pango markup.
932
+ *
933
+ * Also see [method`Gtk`.Tooltip.set_markup].
934
+ *
935
+ * This is a convenience property which will take care of getting the
936
+ * tooltip shown if the given string is not %NULL:
937
+ * [property`Gtk`.Widget:has-tooltip] will automatically be set to %TRUE
938
+ * and there will be taken care of [signal`Gtk`.Widget::query-tooltip] in
939
+ * the default signal handler.
940
+ *
941
+ * Note that if both [property`Gtk`.Widget:tooltip-text] and
942
+ * [property`Gtk`.Widget:tooltip-markup] are set, the last one wins.
943
+ */
944
+ get tooltip_markup(): string;
945
+ set tooltip_markup(val: string);
946
+ /**
947
+ * Sets the text of tooltip to be the given string, which is marked up
948
+ * with Pango markup.
949
+ *
950
+ * Also see [method`Gtk`.Tooltip.set_markup].
951
+ *
952
+ * This is a convenience property which will take care of getting the
953
+ * tooltip shown if the given string is not %NULL:
954
+ * [property`Gtk`.Widget:has-tooltip] will automatically be set to %TRUE
955
+ * and there will be taken care of [signal`Gtk`.Widget::query-tooltip] in
956
+ * the default signal handler.
957
+ *
958
+ * Note that if both [property`Gtk`.Widget:tooltip-text] and
959
+ * [property`Gtk`.Widget:tooltip-markup] are set, the last one wins.
960
+ */
961
+ get tooltipMarkup(): string;
962
+ set tooltipMarkup(val: string);
963
+ /**
964
+ * Sets the text of tooltip to be the given string.
965
+ *
966
+ * Also see [method`Gtk`.Tooltip.set_text].
967
+ *
968
+ * This is a convenience property which will take care of getting the
969
+ * tooltip shown if the given string is not %NULL:
970
+ * [property`Gtk`.Widget:has-tooltip] will automatically be set to %TRUE
971
+ * and there will be taken care of [signal`Gtk`.Widget::query-tooltip] in
972
+ * the default signal handler.
973
+ *
974
+ * Note that if both [property`Gtk`.Widget:tooltip-text] and
975
+ * [property`Gtk`.Widget:tooltip-markup] are set, the last one wins.
976
+ */
977
+ get tooltip_text(): string;
978
+ set tooltip_text(val: string);
979
+ /**
980
+ * Sets the text of tooltip to be the given string.
981
+ *
982
+ * Also see [method`Gtk`.Tooltip.set_text].
983
+ *
984
+ * This is a convenience property which will take care of getting the
985
+ * tooltip shown if the given string is not %NULL:
986
+ * [property`Gtk`.Widget:has-tooltip] will automatically be set to %TRUE
987
+ * and there will be taken care of [signal`Gtk`.Widget::query-tooltip] in
988
+ * the default signal handler.
989
+ *
990
+ * Note that if both [property`Gtk`.Widget:tooltip-text] and
991
+ * [property`Gtk`.Widget:tooltip-markup] are set, the last one wins.
992
+ */
993
+ get tooltipText(): string;
994
+ set tooltipText(val: string);
995
+ /**
996
+ * How to distribute vertical space if widget gets extra space.
997
+ */
998
+ get valign(): Gtk.Align;
999
+ set valign(val: Gtk.Align);
1000
+ /**
1001
+ * Whether to expand vertically.
1002
+ */
1003
+ get vexpand(): boolean;
1004
+ set vexpand(val: boolean);
1005
+ /**
1006
+ * Whether to use the `vexpand` property.
1007
+ */
1008
+ get vexpand_set(): boolean;
1009
+ set vexpand_set(val: boolean);
1010
+ /**
1011
+ * Whether to use the `vexpand` property.
1012
+ */
1013
+ get vexpandSet(): boolean;
1014
+ set vexpandSet(val: boolean);
1015
+ /**
1016
+ * Whether the widget is visible.
1017
+ */
1018
+ get visible(): boolean;
1019
+ set visible(val: boolean);
1020
+ /**
1021
+ * Override for width request of the widget.
1022
+ *
1023
+ * If this is -1, the natural request will be used.
1024
+ */
1025
+ get width_request(): number;
1026
+ set width_request(val: number);
1027
+ /**
1028
+ * Override for width request of the widget.
1029
+ *
1030
+ * If this is -1, the natural request will be used.
1031
+ */
1032
+ get widthRequest(): number;
1033
+ set widthRequest(val: number);
1034
+
1035
+ // Inherited methods
1036
+ /**
1037
+ * Gets the action name for `actionable`.
1038
+ * @returns the action name
1039
+ */
1040
+ get_action_name(): string | null;
1041
+ /**
1042
+ * Gets the current target value of `actionable`.
1043
+ * @returns the current target value
1044
+ */
1045
+ get_action_target_value(): GLib.Variant | null;
1046
+ /**
1047
+ * Specifies the name of the action with which this widget should be
1048
+ * associated.
1049
+ *
1050
+ * If `action_name` is %NULL then the widget will be unassociated from
1051
+ * any previous action.
1052
+ *
1053
+ * Usually this function is used when the widget is located (or will be
1054
+ * located) within the hierarchy of a `GtkApplicationWindow`.
1055
+ *
1056
+ * Names are of the form “win.save” or “app.quit” for actions on the
1057
+ * containing [class`ApplicationWindow]` or its associated [class`Application]`,
1058
+ * respectively. This is the same form used for actions in the [class`Gio`.Menu]
1059
+ * associated with the window.
1060
+ * @param action_name an action name
1061
+ */
1062
+ set_action_name(action_name?: string | null): void;
1063
+ /**
1064
+ * Sets the target value of an actionable widget.
1065
+ *
1066
+ * If `target_value` is %NULL then the target value is unset.
1067
+ *
1068
+ * The target value has two purposes. First, it is used as the parameter
1069
+ * to activation of the action associated with the `GtkActionable` widget.
1070
+ * Second, it is used to determine if the widget should be rendered as
1071
+ * “active” — the widget is active if the state is equal to the given target.
1072
+ *
1073
+ * Consider the example of associating a set of buttons with a [iface`Gio`.Action]
1074
+ * with string state in a typical “radio button” situation. Each button
1075
+ * will be associated with the same action, but with a different target
1076
+ * value for that action. Clicking on a particular button will activate
1077
+ * the action with the target of that button, which will typically cause
1078
+ * the action’s state to change to that value. Since the action’s state
1079
+ * is now equal to the target value of the button, the button will now
1080
+ * be rendered as active (and the other buttons, with different targets,
1081
+ * rendered inactive).
1082
+ * @param target_value a [struct@GLib.Variant] to set as the target value
1083
+ */
1084
+ set_action_target_value(target_value?: GLib.Variant | null): void;
1085
+ /**
1086
+ * Sets the action-name and associated string target value of an
1087
+ * actionable widget.
1088
+ *
1089
+ * `detailed_action_name` is a string in the format accepted by
1090
+ * [func`Gio`.Action.parse_detailed_name].
1091
+ * @param detailed_action_name the detailed action name
1092
+ */
1093
+ set_detailed_action_name(detailed_action_name: string): void;
1094
+ /**
1095
+ * Gets the action name for `actionable`.
1096
+ */
1097
+ vfunc_get_action_name(): string | null;
1098
+ /**
1099
+ * Gets the current target value of `actionable`.
1100
+ */
1101
+ vfunc_get_action_target_value(): GLib.Variant | null;
1102
+ /**
1103
+ * Specifies the name of the action with which this widget should be
1104
+ * associated.
1105
+ *
1106
+ * If `action_name` is %NULL then the widget will be unassociated from
1107
+ * any previous action.
1108
+ *
1109
+ * Usually this function is used when the widget is located (or will be
1110
+ * located) within the hierarchy of a `GtkApplicationWindow`.
1111
+ *
1112
+ * Names are of the form “win.save” or “app.quit” for actions on the
1113
+ * containing [class`ApplicationWindow]` or its associated [class`Application]`,
1114
+ * respectively. This is the same form used for actions in the [class`Gio`.Menu]
1115
+ * associated with the window.
1116
+ * @param action_name an action name
1117
+ */
1118
+ vfunc_set_action_name(action_name?: string | null): void;
1119
+ /**
1120
+ * Sets the target value of an actionable widget.
1121
+ *
1122
+ * If `target_value` is %NULL then the target value is unset.
1123
+ *
1124
+ * The target value has two purposes. First, it is used as the parameter
1125
+ * to activation of the action associated with the `GtkActionable` widget.
1126
+ * Second, it is used to determine if the widget should be rendered as
1127
+ * “active” — the widget is active if the state is equal to the given target.
1128
+ *
1129
+ * Consider the example of associating a set of buttons with a [iface`Gio`.Action]
1130
+ * with string state in a typical “radio button” situation. Each button
1131
+ * will be associated with the same action, but with a different target
1132
+ * value for that action. Clicking on a particular button will activate
1133
+ * the action with the target of that button, which will typically cause
1134
+ * the action’s state to change to that value. Since the action’s state
1135
+ * is now equal to the target value of the button, the button will now
1136
+ * be rendered as active (and the other buttons, with different targets,
1137
+ * rendered inactive).
1138
+ * @param target_value a [struct@GLib.Variant] to set as the target value
1139
+ */
1140
+ vfunc_set_action_target_value(target_value?: GLib.Variant | null): void;
1141
+ /**
1142
+ * Creates a binding between `source_property` on `source` and `target_property`
1143
+ * on `target`.
1144
+ *
1145
+ * Whenever the `source_property` is changed the `target_property` is
1146
+ * updated using the same value. For instance:
1147
+ *
1148
+ *
1149
+ * ```c
1150
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
1151
+ * ```
1152
+ *
1153
+ *
1154
+ * Will result in the "sensitive" property of the widget #GObject instance to be
1155
+ * updated with the same value of the "active" property of the action #GObject
1156
+ * instance.
1157
+ *
1158
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1159
+ * if `target_property` on `target` changes then the `source_property` on `source`
1160
+ * will be updated as well.
1161
+ *
1162
+ * The binding will automatically be removed when either the `source` or the
1163
+ * `target` instances are finalized. To remove the binding without affecting the
1164
+ * `source` and the `target` you can just call g_object_unref() on the returned
1165
+ * #GBinding instance.
1166
+ *
1167
+ * Removing the binding by calling g_object_unref() on it must only be done if
1168
+ * the binding, `source` and `target` are only used from a single thread and it
1169
+ * is clear that both `source` and `target` outlive the binding. Especially it
1170
+ * is not safe to rely on this if the binding, `source` or `target` can be
1171
+ * finalized from different threads. Keep another reference to the binding and
1172
+ * use g_binding_unbind() instead to be on the safe side.
1173
+ *
1174
+ * A #GObject can have multiple bindings.
1175
+ * @param source_property the property on @source to bind
1176
+ * @param target the target #GObject
1177
+ * @param target_property the property on @target to bind
1178
+ * @param flags flags to pass to #GBinding
1179
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1180
+ */
1181
+ bind_property(
1182
+ source_property: string,
1183
+ target: GObject.Object,
1184
+ target_property: string,
1185
+ flags: GObject.BindingFlags,
1186
+ ): GObject.Binding;
1187
+ /**
1188
+ * Complete version of g_object_bind_property().
1189
+ *
1190
+ * Creates a binding between `source_property` on `source` and `target_property`
1191
+ * on `target,` allowing you to set the transformation functions to be used by
1192
+ * the binding.
1193
+ *
1194
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1195
+ * if `target_property` on `target` changes then the `source_property` on `source`
1196
+ * will be updated as well. The `transform_from` function is only used in case
1197
+ * of bidirectional bindings, otherwise it will be ignored
1198
+ *
1199
+ * The binding will automatically be removed when either the `source` or the
1200
+ * `target` instances are finalized. This will release the reference that is
1201
+ * being held on the #GBinding instance; if you want to hold on to the
1202
+ * #GBinding instance, you will need to hold a reference to it.
1203
+ *
1204
+ * To remove the binding, call g_binding_unbind().
1205
+ *
1206
+ * A #GObject can have multiple bindings.
1207
+ *
1208
+ * The same `user_data` parameter will be used for both `transform_to`
1209
+ * and `transform_from` transformation functions; the `notify` function will
1210
+ * be called once, when the binding is removed. If you need different data
1211
+ * for each transformation function, please use
1212
+ * g_object_bind_property_with_closures() instead.
1213
+ * @param source_property the property on @source to bind
1214
+ * @param target the target #GObject
1215
+ * @param target_property the property on @target to bind
1216
+ * @param flags flags to pass to #GBinding
1217
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
1218
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
1219
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
1220
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1221
+ */
1222
+ bind_property_full(
1223
+ source_property: string,
1224
+ target: GObject.Object,
1225
+ target_property: string,
1226
+ flags: GObject.BindingFlags,
1227
+ transform_to?: GObject.BindingTransformFunc | null,
1228
+ transform_from?: GObject.BindingTransformFunc | null,
1229
+ notify?: GLib.DestroyNotify | null,
1230
+ ): GObject.Binding;
1231
+ // Conflicted with GObject.Object.bind_property_full
1232
+ bind_property_full(...args: never[]): any;
1233
+ /**
1234
+ * This function is intended for #GObject implementations to re-enforce
1235
+ * a [floating][floating-ref] object reference. Doing this is seldom
1236
+ * required: all #GInitiallyUnowneds are created with a floating reference
1237
+ * which usually just needs to be sunken by calling g_object_ref_sink().
1238
+ */
1239
+ force_floating(): void;
1240
+ /**
1241
+ * Increases the freeze count on `object`. If the freeze count is
1242
+ * non-zero, the emission of "notify" signals on `object` is
1243
+ * stopped. The signals are queued until the freeze count is decreased
1244
+ * to zero. Duplicate notifications are squashed so that at most one
1245
+ * #GObject::notify signal is emitted for each property modified while the
1246
+ * object is frozen.
1247
+ *
1248
+ * This is necessary for accessors that modify multiple properties to prevent
1249
+ * premature notification while the object is still being modified.
1250
+ */
1251
+ freeze_notify(): void;
1252
+ /**
1253
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
1254
+ * @param key name of the key for that association
1255
+ * @returns the data if found, or %NULL if no such data exists.
1256
+ */
1257
+ get_data(key: string): any | null;
1258
+ get_property(property_name: string): any;
1259
+ /**
1260
+ * This function gets back user data pointers stored via
1261
+ * g_object_set_qdata().
1262
+ * @param quark A #GQuark, naming the user data pointer
1263
+ * @returns The user data pointer set, or %NULL
1264
+ */
1265
+ get_qdata(quark: GLib.Quark): any | null;
1266
+ /**
1267
+ * Gets `n_properties` properties for an `object`.
1268
+ * Obtained properties will be set to `values`. All properties must be valid.
1269
+ * Warnings will be emitted and undefined behaviour may result if invalid
1270
+ * properties are passed in.
1271
+ * @param names the names of each property to get
1272
+ * @param values the values of each property to get
1273
+ */
1274
+ getv(names: string[], values: (GObject.Value | any)[]): void;
1275
+ /**
1276
+ * Checks whether `object` has a [floating][floating-ref] reference.
1277
+ * @returns %TRUE if @object has a floating reference
1278
+ */
1279
+ is_floating(): boolean;
1280
+ /**
1281
+ * Emits a "notify" signal for the property `property_name` on `object`.
1282
+ *
1283
+ * When possible, eg. when signaling a property change from within the class
1284
+ * that registered the property, you should use g_object_notify_by_pspec()
1285
+ * instead.
1286
+ *
1287
+ * Note that emission of the notify signal may be blocked with
1288
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1289
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1290
+ * called.
1291
+ * @param property_name the name of a property installed on the class of @object.
1292
+ */
1293
+ notify(property_name: string): void;
1294
+ /**
1295
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
1296
+ *
1297
+ * This function omits the property name lookup, hence it is faster than
1298
+ * g_object_notify().
1299
+ *
1300
+ * One way to avoid using g_object_notify() from within the
1301
+ * class that registered the properties, and using g_object_notify_by_pspec()
1302
+ * instead, is to store the GParamSpec used with
1303
+ * g_object_class_install_property() inside a static array, e.g.:
1304
+ *
1305
+ *
1306
+ * ```c
1307
+ * typedef enum
1308
+ * {
1309
+ * PROP_FOO = 1,
1310
+ * PROP_LAST
1311
+ * } MyObjectProperty;
1312
+ *
1313
+ * static GParamSpec *properties[PROP_LAST];
1314
+ *
1315
+ * static void
1316
+ * my_object_class_init (MyObjectClass *klass)
1317
+ * {
1318
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
1319
+ * 0, 100,
1320
+ * 50,
1321
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
1322
+ * g_object_class_install_property (gobject_class,
1323
+ * PROP_FOO,
1324
+ * properties[PROP_FOO]);
1325
+ * }
1326
+ * ```
1327
+ *
1328
+ *
1329
+ * and then notify a change on the "foo" property with:
1330
+ *
1331
+ *
1332
+ * ```c
1333
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
1334
+ * ```
1335
+ *
1336
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
1337
+ */
1338
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
1339
+ /**
1340
+ * Increases the reference count of `object`.
1341
+ *
1342
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
1343
+ * of `object` will be propagated to the return type (using the GCC typeof()
1344
+ * extension), so any casting the caller needs to do on the return type must be
1345
+ * explicit.
1346
+ * @returns the same @object
1347
+ */
1348
+ ref(): GObject.Object;
1349
+ /**
1350
+ * Increase the reference count of `object,` and possibly remove the
1351
+ * [floating][floating-ref] reference, if `object` has a floating reference.
1352
+ *
1353
+ * In other words, if the object is floating, then this call "assumes
1354
+ * ownership" of the floating reference, converting it to a normal
1355
+ * reference by clearing the floating flag while leaving the reference
1356
+ * count unchanged. If the object is not floating, then this call
1357
+ * adds a new normal reference increasing the reference count by one.
1358
+ *
1359
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
1360
+ * under the same conditions as for g_object_ref().
1361
+ * @returns @object
1362
+ */
1363
+ ref_sink(): GObject.Object;
1364
+ /**
1365
+ * Releases all references to other objects. This can be used to break
1366
+ * reference cycles.
1367
+ *
1368
+ * This function should only be called from object system implementations.
1369
+ */
1370
+ run_dispose(): void;
1371
+ /**
1372
+ * Each object carries around a table of associations from
1373
+ * strings to pointers. This function lets you set an association.
1374
+ *
1375
+ * If the object already had an association with that name,
1376
+ * the old association will be destroyed.
1377
+ *
1378
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
1379
+ * This means a copy of `key` is kept permanently (even after `object` has been
1380
+ * finalized) — so it is recommended to only use a small, bounded set of values
1381
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
1382
+ * @param key name of the key
1383
+ * @param data data to associate with that key
1384
+ */
1385
+ set_data(key: string, data?: any | null): void;
1386
+ set_property(property_name: string, value: any): void;
1387
+ /**
1388
+ * Remove a specified datum from the object's data associations,
1389
+ * without invoking the association's destroy handler.
1390
+ * @param key name of the key
1391
+ * @returns the data if found, or %NULL if no such data exists.
1392
+ */
1393
+ steal_data(key: string): any | null;
1394
+ /**
1395
+ * This function gets back user data pointers stored via
1396
+ * g_object_set_qdata() and removes the `data` from object
1397
+ * without invoking its destroy() function (if any was
1398
+ * set).
1399
+ * Usually, calling this function is only required to update
1400
+ * user data pointers with a destroy notifier, for example:
1401
+ *
1402
+ * ```c
1403
+ * void
1404
+ * object_add_to_user_list (GObject *object,
1405
+ * const gchar *new_string)
1406
+ * {
1407
+ * // the quark, naming the object data
1408
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
1409
+ * // retrieve the old string list
1410
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
1411
+ *
1412
+ * // prepend new string
1413
+ * list = g_list_prepend (list, g_strdup (new_string));
1414
+ * // this changed 'list', so we need to set it again
1415
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
1416
+ * }
1417
+ * static void
1418
+ * free_string_list (gpointer data)
1419
+ * {
1420
+ * GList *node, *list = data;
1421
+ *
1422
+ * for (node = list; node; node = node->next)
1423
+ * g_free (node->data);
1424
+ * g_list_free (list);
1425
+ * }
1426
+ * ```
1427
+ *
1428
+ * Using g_object_get_qdata() in the above example, instead of
1429
+ * g_object_steal_qdata() would have left the destroy function set,
1430
+ * and thus the partial string list would have been freed upon
1431
+ * g_object_set_qdata_full().
1432
+ * @param quark A #GQuark, naming the user data pointer
1433
+ * @returns The user data pointer set, or %NULL
1434
+ */
1435
+ steal_qdata(quark: GLib.Quark): any | null;
1436
+ /**
1437
+ * Reverts the effect of a previous call to
1438
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
1439
+ * and when it reaches zero, queued "notify" signals are emitted.
1440
+ *
1441
+ * Duplicate notifications for each property are squashed so that at most one
1442
+ * #GObject::notify signal is emitted for each property, in the reverse order
1443
+ * in which they have been queued.
1444
+ *
1445
+ * It is an error to call this function when the freeze count is zero.
1446
+ */
1447
+ thaw_notify(): void;
1448
+ /**
1449
+ * Decreases the reference count of `object`. When its reference count
1450
+ * drops to 0, the object is finalized (i.e. its memory is freed).
1451
+ *
1452
+ * If the pointer to the #GObject may be reused in future (for example, if it is
1453
+ * an instance variable of another object), it is recommended to clear the
1454
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
1455
+ * invalid #GObject instance. Use g_clear_object() for this.
1456
+ */
1457
+ unref(): void;
1458
+ /**
1459
+ * This function essentially limits the life time of the `closure` to
1460
+ * the life time of the object. That is, when the object is finalized,
1461
+ * the `closure` is invalidated by calling g_closure_invalidate() on
1462
+ * it, in order to prevent invocations of the closure with a finalized
1463
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
1464
+ * added as marshal guards to the `closure,` to ensure that an extra
1465
+ * reference count is held on `object` during invocation of the
1466
+ * `closure`. Usually, this function will be called on closures that
1467
+ * use this `object` as closure data.
1468
+ * @param closure #GClosure to watch
1469
+ */
1470
+ watch_closure(closure: GObject.Closure): void;
1471
+ vfunc_constructed(): void;
1472
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
1473
+ vfunc_dispose(): void;
1474
+ vfunc_finalize(): void;
1475
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1476
+ /**
1477
+ * Emits a "notify" signal for the property `property_name` on `object`.
1478
+ *
1479
+ * When possible, eg. when signaling a property change from within the class
1480
+ * that registered the property, you should use g_object_notify_by_pspec()
1481
+ * instead.
1482
+ *
1483
+ * Note that emission of the notify signal may be blocked with
1484
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1485
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1486
+ * called.
1487
+ * @param pspec
1488
+ */
1489
+ vfunc_notify(pspec: GObject.ParamSpec): void;
1490
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1491
+ disconnect(id: number): void;
1492
+ set(properties: { [key: string]: any }): void;
1493
+ block_signal_handler(id: number): any;
1494
+ unblock_signal_handler(id: number): any;
1495
+ stop_emission_by_name(detailedName: string): any;
1496
+ /**
1497
+ * Enable or disable an action installed with
1498
+ * gtk_widget_class_install_action().
1499
+ * @param action_name action name, such as "clipboard.paste"
1500
+ * @param enabled whether the action is now enabled
1501
+ */
1502
+ action_set_enabled(action_name: string, enabled: boolean): void;
1503
+ /**
1504
+ * For widgets that can be “activated” (buttons, menu items, etc.),
1505
+ * this function activates them.
1506
+ *
1507
+ * The activation will emit the signal set using
1508
+ * [method`Gtk`.WidgetClass.set_activate_signal] during class initialization.
1509
+ *
1510
+ * Activation is what happens when you press <kbd>Enter</kbd>
1511
+ * on a widget during key navigation.
1512
+ *
1513
+ * If you wish to handle the activation keybinding yourself, it is
1514
+ * recommended to use [method`Gtk`.WidgetClass.add_shortcut] with an action
1515
+ * created with [ctor`Gtk`.SignalAction.new].
1516
+ *
1517
+ * If `widget` isn't activatable, the function returns %FALSE.
1518
+ * @returns %TRUE if the widget was activatable
1519
+ */
1520
+ activate(): boolean;
1521
+ /**
1522
+ * Looks up the action in the action groups associated with
1523
+ * `widget` and its ancestors, and activates it.
1524
+ *
1525
+ * If the action is in an action group added with
1526
+ * [method`Gtk`.Widget.insert_action_group], the `name` is expected
1527
+ * to be prefixed with the prefix that was used when the group was
1528
+ * inserted.
1529
+ *
1530
+ * The arguments must match the actions expected parameter type,
1531
+ * as returned by `g_action_get_parameter_type()`.
1532
+ * @param name the name of the action to activate
1533
+ * @param args parameters to use
1534
+ * @returns %TRUE if the action was activated, %FALSE if the action does not exist.
1535
+ */
1536
+ activate_action(name: string, args?: GLib.Variant | null): boolean;
1537
+ /**
1538
+ * Activates the `default.activate` action from `widget`.
1539
+ */
1540
+ activate_default(): void;
1541
+ /**
1542
+ * Adds `controller` to `widget` so that it will receive events.
1543
+ *
1544
+ * You will usually want to call this function right after
1545
+ * creating any kind of [class`Gtk`.EventController].
1546
+ * @param controller a `GtkEventController` that hasn't been added to a widget yet
1547
+ */
1548
+ add_controller(controller: Gtk.EventController): void;
1549
+ /**
1550
+ * Adds a style class to `widget`.
1551
+ *
1552
+ * After calling this function, the widget’s style will match
1553
+ * for `css_class,` according to CSS matching rules.
1554
+ *
1555
+ * Use [method`Gtk`.Widget.remove_css_class] to remove the
1556
+ * style again.
1557
+ * @param css_class The style class to add to @widget, without the leading '.' used for notation of style classes
1558
+ */
1559
+ add_css_class(css_class: string): void;
1560
+ /**
1561
+ * Adds a widget to the list of mnemonic labels for this widget.
1562
+ *
1563
+ * See [method`Gtk`.Widget.list_mnemonic_labels]. Note the
1564
+ * list of mnemonic labels for the widget is cleared when the
1565
+ * widget is destroyed, so the caller must make sure to update
1566
+ * its internal state at this point as well.
1567
+ * @param label a `GtkWidget` that acts as a mnemonic label for @widget
1568
+ */
1569
+ add_mnemonic_label(label: Gtk.Widget): void;
1570
+ /**
1571
+ * Queues an animation frame update and adds a callback to be called
1572
+ * before each frame.
1573
+ *
1574
+ * Until the tick callback is removed, it will be called frequently
1575
+ * (usually at the frame rate of the output device or as quickly as
1576
+ * the application can be repainted, whichever is slower). For this
1577
+ * reason, is most suitable for handling graphics that change every
1578
+ * frame or every few frames. The tick callback does not automatically
1579
+ * imply a relayout or repaint. If you want a repaint or relayout, and
1580
+ * aren’t changing widget properties that would trigger that (for example,
1581
+ * changing the text of a `GtkLabel`), then you will have to call
1582
+ * [method`Gtk`.Widget.queue_resize] or [method`Gtk`.Widget.queue_draw]
1583
+ * yourself.
1584
+ *
1585
+ * [method`Gdk`.FrameClock.get_frame_time] should generally be used
1586
+ * for timing continuous animations and
1587
+ * [method`Gdk`.FrameTimings.get_predicted_presentation_time] if you are
1588
+ * trying to display isolated frames at particular times.
1589
+ *
1590
+ * This is a more convenient alternative to connecting directly to the
1591
+ * [signal`Gdk`.FrameClock::update] signal of `GdkFrameClock`, since you
1592
+ * don't have to worry about when a `GdkFrameClock` is assigned to a widget.
1593
+ * @param callback function to call for updating animations
1594
+ * @returns an id for the connection of this callback. Remove the callback by passing the id returned from this function to [method@Gtk.Widget.remove_tick_callback]
1595
+ */
1596
+ add_tick_callback(callback: Gtk.TickCallback): number;
1597
+ /**
1598
+ * This function is only used by `GtkWidget` subclasses, to
1599
+ * assign a size, position and (optionally) baseline to their
1600
+ * child widgets.
1601
+ *
1602
+ * In this function, the allocation and baseline may be adjusted.
1603
+ * The given allocation will be forced to be bigger than the
1604
+ * widget's minimum size, as well as at least 0×0 in size.
1605
+ *
1606
+ * For a version that does not take a transform, see
1607
+ * [method`Gtk`.Widget.size_allocate].
1608
+ * @param width New width of @widget
1609
+ * @param height New height of @widget
1610
+ * @param baseline New baseline of @widget, or -1
1611
+ * @param transform Transformation to be applied to @widget
1612
+ */
1613
+ allocate(width: number, height: number, baseline: number, transform?: Gsk.Transform | null): void;
1614
+ /**
1615
+ * Called by widgets as the user moves around the window using
1616
+ * keyboard shortcuts.
1617
+ *
1618
+ * The `direction` argument indicates what kind of motion is taking place (up,
1619
+ * down, left, right, tab forward, tab backward).
1620
+ *
1621
+ * This function calls the [vfunc`Gtk`.Widget.focus] virtual function; widgets
1622
+ * can override the virtual function in order to implement appropriate focus
1623
+ * behavior.
1624
+ *
1625
+ * The default `focus()` virtual function for a widget should return `TRUE` if
1626
+ * moving in `direction` left the focus on a focusable location inside that
1627
+ * widget, and `FALSE` if moving in `direction` moved the focus outside the
1628
+ * widget. When returning `TRUE`, widgets normally call [method`Gtk`.Widget.grab_focus]
1629
+ * to place the focus accordingly; when returning `FALSE`, they don’t modify
1630
+ * the current focus location.
1631
+ *
1632
+ * This function is used by custom widget implementations; if you're
1633
+ * writing an app, you’d use [method`Gtk`.Widget.grab_focus] to move
1634
+ * the focus to a particular widget.
1635
+ * @param direction direction of focus movement
1636
+ * @returns %TRUE if focus ended up inside @widget
1637
+ */
1638
+ child_focus(direction: Gtk.DirectionType): boolean;
1639
+ /**
1640
+ * Computes the bounds for `widget` in the coordinate space of `target`.
1641
+ *
1642
+ * The bounds of widget are (the bounding box of) the region that it is
1643
+ * expected to draw in. See the [coordinate system](coordinates.html)
1644
+ * overview to learn more.
1645
+ *
1646
+ * If the operation is successful, %TRUE is returned. If `widget` has no
1647
+ * bounds or the bounds cannot be expressed in `target'`s coordinate space
1648
+ * (for example if both widgets are in different windows), %FALSE is
1649
+ * returned and `bounds` is set to the zero rectangle.
1650
+ *
1651
+ * It is valid for `widget` and `target` to be the same widget.
1652
+ * @param target the `GtkWidget`
1653
+ * @returns %TRUE if the bounds could be computed
1654
+ */
1655
+ compute_bounds(target: Gtk.Widget): [boolean, Graphene.Rect];
1656
+ /**
1657
+ * Computes whether a container should give this widget
1658
+ * extra space when possible.
1659
+ *
1660
+ * Containers should check this, rather than looking at
1661
+ * [method`Gtk`.Widget.get_hexpand] or [method`Gtk`.Widget.get_vexpand].
1662
+ *
1663
+ * This function already checks whether the widget is visible, so
1664
+ * visibility does not need to be checked separately. Non-visible
1665
+ * widgets are not expanded.
1666
+ *
1667
+ * The computed expand value uses either the expand setting explicitly
1668
+ * set on the widget itself, or, if none has been explicitly set,
1669
+ * the widget may expand if some of its children do.
1670
+ * @param orientation expand direction
1671
+ * @returns whether widget tree rooted here should be expanded
1672
+ */
1673
+ compute_expand(orientation: Gtk.Orientation): boolean;
1674
+ /**
1675
+ * Translates the given `point` in `widget'`s coordinates to coordinates
1676
+ * relative to `target’`s coordinate system.
1677
+ *
1678
+ * In order to perform this operation, both widgets must share a
1679
+ * common ancestor.
1680
+ * @param target the `GtkWidget` to transform into
1681
+ * @param point a point in @widget's coordinate system
1682
+ * @returns %TRUE if the point could be determined, %FALSE on failure. In this case, 0 is stored in @out_point.
1683
+ */
1684
+ compute_point(target: Gtk.Widget, point: Graphene.Point): [boolean, Graphene.Point];
1685
+ /**
1686
+ * Computes a matrix suitable to describe a transformation from
1687
+ * `widget'`s coordinate system into `target'`s coordinate system.
1688
+ *
1689
+ * The transform can not be computed in certain cases, for example
1690
+ * when `widget` and `target` do not share a common ancestor. In that
1691
+ * case `out_transform` gets set to the identity matrix.
1692
+ *
1693
+ * To learn more about widget coordinate systems, see the coordinate
1694
+ * system [overview](coordinates.html).
1695
+ * @param target the target widget that the matrix will transform to
1696
+ * @returns %TRUE if the transform could be computed, %FALSE otherwise
1697
+ */
1698
+ compute_transform(target: Gtk.Widget): [boolean, Graphene.Matrix];
1699
+ /**
1700
+ * Tests if the point at (`x,` `y)` is contained in `widget`.
1701
+ *
1702
+ * The coordinates for (`x,` `y)` must be in widget coordinates, so
1703
+ * (0, 0) is assumed to be the top left of `widget'`s content area.
1704
+ * @param x X coordinate to test, relative to @widget's origin
1705
+ * @param y Y coordinate to test, relative to @widget's origin
1706
+ * @returns %TRUE if @widget contains (@x, @y).
1707
+ */
1708
+ contains(x: number, y: number): boolean;
1709
+ /**
1710
+ * Creates a new `PangoContext` with the appropriate font map,
1711
+ * font options, font description, and base direction for drawing
1712
+ * text for this widget.
1713
+ *
1714
+ * See also [method`Gtk`.Widget.get_pango_context].
1715
+ * @returns the new `PangoContext`
1716
+ */
1717
+ create_pango_context(): Pango.Context;
1718
+ /**
1719
+ * Creates a new `PangoLayout` with the appropriate font map,
1720
+ * font description, and base direction for drawing text for
1721
+ * this widget.
1722
+ *
1723
+ * If you keep a `PangoLayout` created in this way around,
1724
+ * you need to re-create it when the widget `PangoContext`
1725
+ * is replaced. This can be tracked by listening to changes
1726
+ * of the [property`Gtk`.Widget:root] property on the widget.
1727
+ * @param text text to set on the layout
1728
+ * @returns the new `PangoLayout`
1729
+ */
1730
+ create_pango_layout(text?: string | null): Pango.Layout;
1731
+ /**
1732
+ * Clears the template children for the given widget.
1733
+ *
1734
+ * This function is the opposite of [method`Gtk`.Widget.init_template], and
1735
+ * it is used to clear all the template children from a widget instance.
1736
+ * If you bound a template child to a field in the instance structure, or
1737
+ * in the instance private data structure, the field will be set to `NULL`
1738
+ * after this function returns.
1739
+ *
1740
+ * You should call this function inside the `GObjectClass.dispose()`
1741
+ * implementation of any widget that called `gtk_widget_init_template()`.
1742
+ * Typically, you will want to call this function last, right before
1743
+ * chaining up to the parent type's dispose implementation, e.g.
1744
+ *
1745
+ * ```c
1746
+ * static void
1747
+ * some_widget_dispose (GObject *gobject)
1748
+ * {
1749
+ * SomeWidget *self = SOME_WIDGET (gobject);
1750
+ *
1751
+ * // Clear the template data for SomeWidget
1752
+ * gtk_widget_dispose_template (GTK_WIDGET (self), SOME_TYPE_WIDGET);
1753
+ *
1754
+ * G_OBJECT_CLASS (some_widget_parent_class)->dispose (gobject);
1755
+ * }
1756
+ * ```
1757
+ * @param widget_type the type of the widget to finalize the template for
1758
+ */
1759
+ dispose_template(widget_type: GObject.GType): void;
1760
+ /**
1761
+ * Checks to see if a drag movement has passed the GTK drag threshold.
1762
+ * @param start_x X coordinate of start of drag
1763
+ * @param start_y Y coordinate of start of drag
1764
+ * @param current_x current X coordinate
1765
+ * @param current_y current Y coordinate
1766
+ * @returns %TRUE if the drag threshold has been passed.
1767
+ */
1768
+ drag_check_threshold(start_x: number, start_y: number, current_x: number, current_y: number): boolean;
1769
+ /**
1770
+ * Notifies the user about an input-related error on this widget.
1771
+ *
1772
+ * If the [property`Gtk`.Settings:gtk-error-bell] setting is %TRUE,
1773
+ * it calls [method`Gdk`.Surface.beep], otherwise it does nothing.
1774
+ *
1775
+ * Note that the effect of [method`Gdk`.Surface.beep] can be configured
1776
+ * in many ways, depending on the windowing backend and the desktop
1777
+ * environment or window manager that is used.
1778
+ */
1779
+ error_bell(): void;
1780
+ /**
1781
+ * Returns the baseline that has currently been allocated to `widget`.
1782
+ *
1783
+ * This function is intended to be used when implementing handlers
1784
+ * for the `GtkWidget`Class.snapshot() function, and when allocating
1785
+ * child widgets in `GtkWidget`Class.size_allocate().
1786
+ * @returns the baseline of the @widget, or -1 if none
1787
+ */
1788
+ get_allocated_baseline(): number;
1789
+ /**
1790
+ * Returns the height that has currently been allocated to `widget`.
1791
+ *
1792
+ * To learn more about widget sizes, see the coordinate
1793
+ * system [overview](coordinates.html).
1794
+ * @returns the height of the @widget
1795
+ */
1796
+ get_allocated_height(): number;
1797
+ /**
1798
+ * Returns the width that has currently been allocated to `widget`.
1799
+ *
1800
+ * To learn more about widget sizes, see the coordinate
1801
+ * system [overview](coordinates.html).
1802
+ * @returns the width of the @widget
1803
+ */
1804
+ get_allocated_width(): number;
1805
+ /**
1806
+ * Retrieves the widget’s allocation.
1807
+ *
1808
+ * Note, when implementing a layout container: a widget’s allocation
1809
+ * will be its “adjusted” allocation, that is, the widget’s parent
1810
+ * typically calls [method`Gtk`.Widget.size_allocate] with an allocation,
1811
+ * and that allocation is then adjusted (to handle margin
1812
+ * and alignment for example) before assignment to the widget.
1813
+ * [method`Gtk`.Widget.get_allocation] returns the adjusted allocation that
1814
+ * was actually assigned to the widget. The adjusted allocation is
1815
+ * guaranteed to be completely contained within the
1816
+ * [method`Gtk`.Widget.size_allocate] allocation, however.
1817
+ *
1818
+ * So a layout container is guaranteed that its children stay inside
1819
+ * the assigned bounds, but not that they have exactly the bounds the
1820
+ * container assigned.
1821
+ */
1822
+ get_allocation(): Gtk.Allocation;
1823
+ /**
1824
+ * Gets the first ancestor of `widget` with type `widget_type`.
1825
+ *
1826
+ * For example, `gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)`
1827
+ * gets the first `GtkBox` that’s an ancestor of `widget`. No
1828
+ * reference will be added to the returned widget; it should
1829
+ * not be unreferenced.
1830
+ *
1831
+ * Note that unlike [method`Gtk`.Widget.is_ancestor], this function
1832
+ * considers `widget` to be an ancestor of itself.
1833
+ * @param widget_type ancestor type
1834
+ * @returns the ancestor widget
1835
+ */
1836
+ get_ancestor(widget_type: GObject.GType): Gtk.Widget | null;
1837
+ /**
1838
+ * Returns the baseline that has currently been allocated to `widget`.
1839
+ *
1840
+ * This function is intended to be used when implementing handlers
1841
+ * for the `GtkWidget`Class.snapshot() function, and when allocating
1842
+ * child widgets in `GtkWidget`Class.size_allocate().
1843
+ * @returns the baseline of the @widget, or -1 if none
1844
+ */
1845
+ get_baseline(): number;
1846
+ /**
1847
+ * Determines whether the input focus can enter `widget` or any
1848
+ * of its children.
1849
+ *
1850
+ * See [method`Gtk`.Widget.set_focusable].
1851
+ * @returns %TRUE if the input focus can enter @widget, %FALSE otherwise
1852
+ */
1853
+ get_can_focus(): boolean;
1854
+ /**
1855
+ * Queries whether `widget` can be the target of pointer events.
1856
+ * @returns %TRUE if @widget can receive pointer events
1857
+ */
1858
+ get_can_target(): boolean;
1859
+ /**
1860
+ * Gets the value set with gtk_widget_set_child_visible().
1861
+ *
1862
+ * If you feel a need to use this function, your code probably
1863
+ * needs reorganization.
1864
+ *
1865
+ * This function is only useful for container implementations
1866
+ * and should never be called by an application.
1867
+ * @returns %TRUE if the widget is mapped with the parent.
1868
+ */
1869
+ get_child_visible(): boolean;
1870
+ /**
1871
+ * Gets the clipboard object for `widget`.
1872
+ *
1873
+ * This is a utility function to get the clipboard object for the
1874
+ * `GdkDisplay` that `widget` is using.
1875
+ *
1876
+ * Note that this function always works, even when `widget` is not
1877
+ * realized yet.
1878
+ * @returns the appropriate clipboard object
1879
+ */
1880
+ get_clipboard(): Gdk.Clipboard;
1881
+ /**
1882
+ * Gets the current foreground color for the widget’s
1883
+ * CSS style.
1884
+ *
1885
+ * This function should only be used in snapshot
1886
+ * implementations that need to do custom
1887
+ * drawing with the foreground color.
1888
+ */
1889
+ get_color(): Gdk.RGBA;
1890
+ /**
1891
+ * Returns the list of style classes applied to `widget`.
1892
+ * @returns a %NULL-terminated list of css classes currently applied to @widget. The returned list must freed using g_strfreev().
1893
+ */
1894
+ get_css_classes(): string[];
1895
+ /**
1896
+ * Returns the CSS name that is used for `self`.
1897
+ * @returns the CSS name
1898
+ */
1899
+ get_css_name(): string;
1900
+ /**
1901
+ * Queries the cursor set on `widget`.
1902
+ *
1903
+ * See [method`Gtk`.Widget.set_cursor] for details.
1904
+ * @returns the cursor currently in use or %NULL if the cursor is inherited
1905
+ */
1906
+ get_cursor(): Gdk.Cursor | null;
1907
+ /**
1908
+ * Gets the reading direction for a particular widget.
1909
+ *
1910
+ * See [method`Gtk`.Widget.set_direction].
1911
+ * @returns the reading direction for the widget.
1912
+ */
1913
+ get_direction(): Gtk.TextDirection;
1914
+ /**
1915
+ * Get the `GdkDisplay` for the toplevel window associated with
1916
+ * this widget.
1917
+ *
1918
+ * This function can only be called after the widget has been
1919
+ * added to a widget hierarchy with a `GtkWindow` at the top.
1920
+ *
1921
+ * In general, you should only create display specific
1922
+ * resources when a widget has been realized, and you should
1923
+ * free those resources when the widget is unrealized.
1924
+ * @returns the `GdkDisplay` for the toplevel for this widget.
1925
+ */
1926
+ get_display(): Gdk.Display;
1927
+ /**
1928
+ * Returns the widget’s first child.
1929
+ *
1930
+ * This API is primarily meant for widget implementations.
1931
+ * @returns The widget's first child
1932
+ */
1933
+ get_first_child(): Gtk.Widget | null;
1934
+ /**
1935
+ * Returns the current focus child of `widget`.
1936
+ * @returns The current focus child of @widget
1937
+ */
1938
+ get_focus_child(): Gtk.Widget | null;
1939
+ /**
1940
+ * Returns whether the widget should grab focus when it is clicked
1941
+ * with the mouse.
1942
+ *
1943
+ * See [method`Gtk`.Widget.set_focus_on_click].
1944
+ * @returns %TRUE if the widget should grab focus when it is clicked with the mouse
1945
+ */
1946
+ get_focus_on_click(): boolean;
1947
+ /**
1948
+ * Determines whether `widget` can own the input focus.
1949
+ *
1950
+ * See [method`Gtk`.Widget.set_focusable].
1951
+ * @returns %TRUE if @widget can own the input focus, %FALSE otherwise
1952
+ */
1953
+ get_focusable(): boolean;
1954
+ /**
1955
+ * Gets the font map of `widget`.
1956
+ *
1957
+ * See [method`Gtk`.Widget.set_font_map].
1958
+ * @returns A `PangoFontMap`
1959
+ */
1960
+ get_font_map(): Pango.FontMap | null;
1961
+ /**
1962
+ * Returns the `cairo_font_options_t` of widget.
1963
+ *
1964
+ * Seee [method`Gtk`.Widget.set_font_options].
1965
+ * @returns the `cairo_font_options_t` of widget
1966
+ */
1967
+ get_font_options(): cairo.FontOptions | null;
1968
+ /**
1969
+ * Obtains the frame clock for a widget.
1970
+ *
1971
+ * The frame clock is a global “ticker” that can be used to drive
1972
+ * animations and repaints. The most common reason to get the frame
1973
+ * clock is to call [method`Gdk`.FrameClock.get_frame_time], in order
1974
+ * to get a time to use for animating. For example you might record
1975
+ * the start of the animation with an initial value from
1976
+ * [method`Gdk`.FrameClock.get_frame_time], and then update the animation
1977
+ * by calling [method`Gdk`.FrameClock.get_frame_time] again during each repaint.
1978
+ *
1979
+ * [method`Gdk`.FrameClock.request_phase] will result in a new frame on the
1980
+ * clock, but won’t necessarily repaint any widgets. To repaint a
1981
+ * widget, you have to use [method`Gtk`.Widget.queue_draw] which invalidates
1982
+ * the widget (thus scheduling it to receive a draw on the next
1983
+ * frame). gtk_widget_queue_draw() will also end up requesting a frame
1984
+ * on the appropriate frame clock.
1985
+ *
1986
+ * A widget’s frame clock will not change while the widget is
1987
+ * mapped. Reparenting a widget (which implies a temporary unmap) can
1988
+ * change the widget’s frame clock.
1989
+ *
1990
+ * Unrealized widgets do not have a frame clock.
1991
+ * @returns a `GdkFrameClock`
1992
+ */
1993
+ get_frame_clock(): Gdk.FrameClock | null;
1994
+ /**
1995
+ * Gets the horizontal alignment of `widget`.
1996
+ *
1997
+ * For backwards compatibility reasons this method will never return
1998
+ * one of the baseline alignments, but instead it will convert it to
1999
+ * `GTK_ALIGN_FILL` or `GTK_ALIGN_CENTER`.
2000
+ *
2001
+ * Baselines are not supported for horizontal alignment.
2002
+ * @returns the horizontal alignment of @widget
2003
+ */
2004
+ get_halign(): Gtk.Align;
2005
+ /**
2006
+ * Returns the current value of the `has-tooltip` property.
2007
+ * @returns current value of `has-tooltip` on @widget.
2008
+ */
2009
+ get_has_tooltip(): boolean;
2010
+ /**
2011
+ * Returns the content height of the widget.
2012
+ *
2013
+ * This function returns the height passed to its
2014
+ * size-allocate implementation, which is the height you
2015
+ * should be using in [vfunc`Gtk`.Widget.snapshot].
2016
+ *
2017
+ * For pointer events, see [method`Gtk`.Widget.contains].
2018
+ *
2019
+ * To learn more about widget sizes, see the coordinate
2020
+ * system [overview](coordinates.html).
2021
+ * @returns The height of @widget
2022
+ */
2023
+ get_height(): number;
2024
+ /**
2025
+ * Gets whether the widget would like any available extra horizontal
2026
+ * space.
2027
+ *
2028
+ * When a user resizes a `GtkWindow`, widgets with expand=TRUE
2029
+ * generally receive the extra space. For example, a list or
2030
+ * scrollable area or document in your window would often be set to
2031
+ * expand.
2032
+ *
2033
+ * Containers should use [method`Gtk`.Widget.compute_expand] rather
2034
+ * than this function, to see whether a widget, or any of its children,
2035
+ * has the expand flag set. If any child of a widget wants to
2036
+ * expand, the parent may ask to expand also.
2037
+ *
2038
+ * This function only looks at the widget’s own hexpand flag, rather
2039
+ * than computing whether the entire widget tree rooted at this widget
2040
+ * wants to expand.
2041
+ * @returns whether hexpand flag is set
2042
+ */
2043
+ get_hexpand(): boolean;
2044
+ /**
2045
+ * Gets whether gtk_widget_set_hexpand() has been used
2046
+ * to explicitly set the expand flag on this widget.
2047
+ *
2048
+ * If [property`Gtk`.Widget:hexpand] property is set, then it
2049
+ * overrides any computed expand value based on child widgets.
2050
+ * If `hexpand` is not set, then the expand value depends on
2051
+ * whether any children of the widget would like to expand.
2052
+ *
2053
+ * There are few reasons to use this function, but it’s here
2054
+ * for completeness and consistency.
2055
+ * @returns whether hexpand has been explicitly set
2056
+ */
2057
+ get_hexpand_set(): boolean;
2058
+ /**
2059
+ * Returns the widget’s last child.
2060
+ *
2061
+ * This API is primarily meant for widget implementations.
2062
+ * @returns The widget's last child
2063
+ */
2064
+ get_last_child(): Gtk.Widget | null;
2065
+ /**
2066
+ * Retrieves the layout manager used by `widget`.
2067
+ *
2068
+ * See [method`Gtk`.Widget.set_layout_manager].
2069
+ * @returns a `GtkLayoutManager`
2070
+ */
2071
+ get_layout_manager(): Gtk.LayoutManager | null;
2072
+ /**
2073
+ * Whether the widget is mapped.
2074
+ * @returns %TRUE if the widget is mapped, %FALSE otherwise.
2075
+ */
2076
+ get_mapped(): boolean;
2077
+ /**
2078
+ * Gets the bottom margin of `widget`.
2079
+ * @returns The bottom margin of @widget
2080
+ */
2081
+ get_margin_bottom(): number;
2082
+ /**
2083
+ * Gets the end margin of `widget`.
2084
+ * @returns The end margin of @widget
2085
+ */
2086
+ get_margin_end(): number;
2087
+ /**
2088
+ * Gets the start margin of `widget`.
2089
+ * @returns The start margin of @widget
2090
+ */
2091
+ get_margin_start(): number;
2092
+ /**
2093
+ * Gets the top margin of `widget`.
2094
+ * @returns The top margin of @widget
2095
+ */
2096
+ get_margin_top(): number;
2097
+ /**
2098
+ * Retrieves the name of a widget.
2099
+ *
2100
+ * See [method`Gtk`.Widget.set_name] for the significance of widget names.
2101
+ * @returns name of the widget. This string is owned by GTK and should not be modified or freed
2102
+ */
2103
+ get_name(): string;
2104
+ /**
2105
+ * Returns the nearest `GtkNative` ancestor of `widget`.
2106
+ *
2107
+ * This function will return %NULL if the widget is not
2108
+ * contained inside a widget tree with a native ancestor.
2109
+ *
2110
+ * `GtkNative` widgets will return themselves here.
2111
+ * @returns the `GtkNative` ancestor of @widget
2112
+ */
2113
+ get_native(): Gtk.Native | null;
2114
+ /**
2115
+ * Returns the widget’s next sibling.
2116
+ *
2117
+ * This API is primarily meant for widget implementations.
2118
+ * @returns The widget's next sibling
2119
+ */
2120
+ get_next_sibling(): Gtk.Widget | null;
2121
+ /**
2122
+ * #Fetches the requested opacity for this widget.
2123
+ *
2124
+ * See [method`Gtk`.Widget.set_opacity].
2125
+ * @returns the requested opacity for this widget.
2126
+ */
2127
+ get_opacity(): number;
2128
+ /**
2129
+ * Returns the widget’s overflow value.
2130
+ * @returns The widget's overflow.
2131
+ */
2132
+ get_overflow(): Gtk.Overflow;
2133
+ /**
2134
+ * Gets a `PangoContext` with the appropriate font map, font description,
2135
+ * and base direction for this widget.
2136
+ *
2137
+ * Unlike the context returned by [method`Gtk`.Widget.create_pango_context],
2138
+ * this context is owned by the widget (it can be used until the screen
2139
+ * for the widget changes or the widget is removed from its toplevel),
2140
+ * and will be updated to match any changes to the widget’s attributes.
2141
+ * This can be tracked by listening to changes of the
2142
+ * [property`Gtk`.Widget:root] property on the widget.
2143
+ * @returns the `PangoContext` for the widget.
2144
+ */
2145
+ get_pango_context(): Pango.Context;
2146
+ /**
2147
+ * Returns the parent widget of `widget`.
2148
+ * @returns the parent widget of @widget
2149
+ */
2150
+ get_parent(): Gtk.Widget | null;
2151
+ /**
2152
+ * Retrieves the minimum and natural size of a widget, taking
2153
+ * into account the widget’s preference for height-for-width management.
2154
+ *
2155
+ * This is used to retrieve a suitable size by container widgets which do
2156
+ * not impose any restrictions on the child placement. It can be used
2157
+ * to deduce toplevel window and menu sizes as well as child widgets in
2158
+ * free-form containers such as `GtkFixed`.
2159
+ *
2160
+ * Handle with care. Note that the natural height of a height-for-width
2161
+ * widget will generally be a smaller size than the minimum height, since
2162
+ * the required height for the natural width is generally smaller than the
2163
+ * required height for the minimum width.
2164
+ *
2165
+ * Use [method`Gtk`.Widget.measure] if you want to support baseline alignment.
2166
+ */
2167
+ get_preferred_size(): [Gtk.Requisition | null, Gtk.Requisition | null];
2168
+ /**
2169
+ * Returns the widget’s previous sibling.
2170
+ *
2171
+ * This API is primarily meant for widget implementations.
2172
+ * @returns The widget's previous sibling
2173
+ */
2174
+ get_prev_sibling(): Gtk.Widget | null;
2175
+ /**
2176
+ * Gets the primary clipboard of `widget`.
2177
+ *
2178
+ * This is a utility function to get the primary clipboard object
2179
+ * for the `GdkDisplay` that `widget` is using.
2180
+ *
2181
+ * Note that this function always works, even when `widget` is not
2182
+ * realized yet.
2183
+ * @returns the appropriate clipboard object
2184
+ */
2185
+ get_primary_clipboard(): Gdk.Clipboard;
2186
+ /**
2187
+ * Determines whether `widget` is realized.
2188
+ * @returns %TRUE if @widget is realized, %FALSE otherwise
2189
+ */
2190
+ get_realized(): boolean;
2191
+ /**
2192
+ * Determines whether `widget` is always treated as the default widget
2193
+ * within its toplevel when it has the focus, even if another widget
2194
+ * is the default.
2195
+ *
2196
+ * See [method`Gtk`.Widget.set_receives_default].
2197
+ * @returns %TRUE if @widget acts as the default widget when focused, %FALSE otherwise
2198
+ */
2199
+ get_receives_default(): boolean;
2200
+ /**
2201
+ * Gets whether the widget prefers a height-for-width layout
2202
+ * or a width-for-height layout.
2203
+ *
2204
+ * Single-child widgets generally propagate the preference of
2205
+ * their child, more complex widgets need to request something
2206
+ * either in context of their children or in context of their
2207
+ * allocation capabilities.
2208
+ * @returns The `GtkSizeRequestMode` preferred by @widget.
2209
+ */
2210
+ get_request_mode(): Gtk.SizeRequestMode;
2211
+ /**
2212
+ * Returns the `GtkRoot` widget of `widget`.
2213
+ *
2214
+ * This function will return %NULL if the widget is not contained
2215
+ * inside a widget tree with a root widget.
2216
+ *
2217
+ * `GtkRoot` widgets will return themselves here.
2218
+ * @returns the root widget of @widget
2219
+ */
2220
+ get_root(): Gtk.Root | null;
2221
+ /**
2222
+ * Retrieves the internal scale factor that maps from window
2223
+ * coordinates to the actual device pixels.
2224
+ *
2225
+ * On traditional systems this is 1, on high density outputs,
2226
+ * it can be a higher value (typically 2).
2227
+ *
2228
+ * See [method`Gdk`.Surface.get_scale_factor].
2229
+ * @returns the scale factor for @widget
2230
+ */
2231
+ get_scale_factor(): number;
2232
+ /**
2233
+ * Returns the widget’s sensitivity.
2234
+ *
2235
+ * This function returns the value that has been set using
2236
+ * [method`Gtk`.Widget.set_sensitive]).
2237
+ *
2238
+ * The effective sensitivity of a widget is however determined
2239
+ * by both its own and its parent widget’s sensitivity.
2240
+ * See [method`Gtk`.Widget.is_sensitive].
2241
+ * @returns %TRUE if the widget is sensitive
2242
+ */
2243
+ get_sensitive(): boolean;
2244
+ /**
2245
+ * Gets the settings object holding the settings used for this widget.
2246
+ *
2247
+ * Note that this function can only be called when the `GtkWidget`
2248
+ * is attached to a toplevel, since the settings object is specific
2249
+ * to a particular `GdkDisplay`. If you want to monitor the widget for
2250
+ * changes in its settings, connect to the `notify::display` signal.
2251
+ * @returns the relevant `GtkSettings` object
2252
+ */
2253
+ get_settings(): Gtk.Settings;
2254
+ /**
2255
+ * Returns the content width or height of the widget.
2256
+ *
2257
+ * Which dimension is returned depends on `orientation`.
2258
+ *
2259
+ * This is equivalent to calling [method`Gtk`.Widget.get_width]
2260
+ * for %GTK_ORIENTATION_HORIZONTAL or [method`Gtk`.Widget.get_height]
2261
+ * for %GTK_ORIENTATION_VERTICAL, but can be used when
2262
+ * writing orientation-independent code, such as when
2263
+ * implementing [iface`Gtk`.Orientable] widgets.
2264
+ *
2265
+ * To learn more about widget sizes, see the coordinate
2266
+ * system [overview](coordinates.html).
2267
+ * @param orientation the orientation to query
2268
+ * @returns The size of @widget in @orientation.
2269
+ */
2270
+ get_size(orientation: Gtk.Orientation): number;
2271
+ /**
2272
+ * Gets the size request that was explicitly set for the widget using
2273
+ * gtk_widget_set_size_request().
2274
+ *
2275
+ * A value of -1 stored in `width` or `height` indicates that that
2276
+ * dimension has not been set explicitly and the natural requisition
2277
+ * of the widget will be used instead. See
2278
+ * [method`Gtk`.Widget.set_size_request]. To get the size a widget will
2279
+ * actually request, call [method`Gtk`.Widget.measure] instead of
2280
+ * this function.
2281
+ */
2282
+ get_size_request(): [number, number];
2283
+ /**
2284
+ * Returns the widget state as a flag set.
2285
+ *
2286
+ * It is worth mentioning that the effective %GTK_STATE_FLAG_INSENSITIVE
2287
+ * state will be returned, that is, also based on parent insensitivity,
2288
+ * even if `widget` itself is sensitive.
2289
+ *
2290
+ * Also note that if you are looking for a way to obtain the
2291
+ * [flags`Gtk`.StateFlags] to pass to a [class`Gtk`.StyleContext]
2292
+ * method, you should look at [method`Gtk`.StyleContext.get_state].
2293
+ * @returns The state flags for widget
2294
+ */
2295
+ get_state_flags(): Gtk.StateFlags;
2296
+ /**
2297
+ * Returns the style context associated to `widget`.
2298
+ *
2299
+ * The returned object is guaranteed to be the same
2300
+ * for the lifetime of `widget`.
2301
+ * @returns the widget’s `GtkStyleContext`
2302
+ */
2303
+ get_style_context(): Gtk.StyleContext;
2304
+ /**
2305
+ * Fetch an object build from the template XML for `widget_type` in
2306
+ * this `widget` instance.
2307
+ *
2308
+ * This will only report children which were previously declared
2309
+ * with [method`Gtk`.WidgetClass.bind_template_child_full] or one of its
2310
+ * variants.
2311
+ *
2312
+ * This function is only meant to be called for code which is private
2313
+ * to the `widget_type` which declared the child and is meant for language
2314
+ * bindings which cannot easily make use of the GObject structure offsets.
2315
+ * @param widget_type The `GType` to get a template child for
2316
+ * @param name The “id” of the child defined in the template XML
2317
+ * @returns The object built in the template XML with the id @name
2318
+ */
2319
+ get_template_child<T = GObject.Object>(widget_type: GObject.GType, name: string): T;
2320
+ /**
2321
+ * Gets the contents of the tooltip for `widget`.
2322
+ *
2323
+ * If the tooltip has not been set using
2324
+ * [method`Gtk`.Widget.set_tooltip_markup], this
2325
+ * function returns %NULL.
2326
+ * @returns the tooltip text
2327
+ */
2328
+ get_tooltip_markup(): string | null;
2329
+ /**
2330
+ * Gets the contents of the tooltip for `widget`.
2331
+ *
2332
+ * If the `widget'`s tooltip was set using
2333
+ * [method`Gtk`.Widget.set_tooltip_markup],
2334
+ * this function will return the escaped text.
2335
+ * @returns the tooltip text
2336
+ */
2337
+ get_tooltip_text(): string | null;
2338
+ /**
2339
+ * Gets the vertical alignment of `widget`.
2340
+ * @returns the vertical alignment of @widget
2341
+ */
2342
+ get_valign(): Gtk.Align;
2343
+ /**
2344
+ * Gets whether the widget would like any available extra vertical
2345
+ * space.
2346
+ *
2347
+ * See [method`Gtk`.Widget.get_hexpand] for more detail.
2348
+ * @returns whether vexpand flag is set
2349
+ */
2350
+ get_vexpand(): boolean;
2351
+ /**
2352
+ * Gets whether gtk_widget_set_vexpand() has been used to
2353
+ * explicitly set the expand flag on this widget.
2354
+ *
2355
+ * See [method`Gtk`.Widget.get_hexpand_set] for more detail.
2356
+ * @returns whether vexpand has been explicitly set
2357
+ */
2358
+ get_vexpand_set(): boolean;
2359
+ /**
2360
+ * Determines whether the widget is visible.
2361
+ *
2362
+ * If you want to take into account whether the widget’s
2363
+ * parent is also marked as visible, use
2364
+ * [method`Gtk`.Widget.is_visible] instead.
2365
+ *
2366
+ * This function does not check if the widget is
2367
+ * obscured in any way.
2368
+ *
2369
+ * See [method`Gtk`.Widget.set_visible].
2370
+ * @returns %TRUE if the widget is visible
2371
+ */
2372
+ get_visible(): boolean;
2373
+ /**
2374
+ * Returns the content width of the widget.
2375
+ *
2376
+ * This function returns the width passed to its
2377
+ * size-allocate implementation, which is the width you
2378
+ * should be using in [vfunc`Gtk`.Widget.snapshot].
2379
+ *
2380
+ * For pointer events, see [method`Gtk`.Widget.contains].
2381
+ *
2382
+ * To learn more about widget sizes, see the coordinate
2383
+ * system [overview](coordinates.html).
2384
+ * @returns The width of @widget
2385
+ */
2386
+ get_width(): number;
2387
+ /**
2388
+ * Causes `widget` to have the keyboard focus for the `GtkWindow` it's inside.
2389
+ *
2390
+ * If `widget` is not focusable, or its [vfunc`Gtk`.Widget.grab_focus]
2391
+ * implementation cannot transfer the focus to a descendant of `widget`
2392
+ * that is focusable, it will not take focus and %FALSE will be returned.
2393
+ *
2394
+ * Calling [method`Gtk`.Widget.grab_focus] on an already focused widget
2395
+ * is allowed, should not have an effect, and return %TRUE.
2396
+ * @returns %TRUE if focus is now inside @widget.
2397
+ */
2398
+ grab_focus(): boolean;
2399
+ /**
2400
+ * Returns whether `css_class` is currently applied to `widget`.
2401
+ * @param css_class A style class, without the leading '.' used for notation of style classes
2402
+ * @returns %TRUE if @css_class is currently applied to @widget, %FALSE otherwise.
2403
+ */
2404
+ has_css_class(css_class: string): boolean;
2405
+ /**
2406
+ * Determines if the widget should show a visible indication that
2407
+ * it has the global input focus.
2408
+ *
2409
+ * This is a convenience function that takes into account whether
2410
+ * focus indication should currently be shown in the toplevel window
2411
+ * of `widget`. See [method`Gtk`.Window.get_focus_visible] for more
2412
+ * information about focus indication.
2413
+ *
2414
+ * To find out if the widget has the global input focus, use
2415
+ * [method`Gtk`.Widget.has_focus].
2416
+ * @returns %TRUE if the widget should display a “focus rectangle”
2417
+ */
2418
+ has_visible_focus(): boolean;
2419
+ /**
2420
+ * Reverses the effects of gtk_widget_show().
2421
+ *
2422
+ * This is causing the widget to be hidden (invisible to the user).
2423
+ */
2424
+ hide(): void;
2425
+ /**
2426
+ * Returns whether the widget is currently being destroyed.
2427
+ *
2428
+ * This information can sometimes be used to avoid doing
2429
+ * unnecessary work.
2430
+ * @returns %TRUE if @widget is being destroyed
2431
+ */
2432
+ in_destruction(): boolean;
2433
+ /**
2434
+ * Creates and initializes child widgets defined in templates.
2435
+ *
2436
+ * This function must be called in the instance initializer
2437
+ * for any class which assigned itself a template using
2438
+ * [method`Gtk`.WidgetClass.set_template].
2439
+ *
2440
+ * It is important to call this function in the instance initializer
2441
+ * of a `GtkWidget` subclass and not in `GObject.constructed()` or
2442
+ * `GObject.constructor()` for two reasons:
2443
+ *
2444
+ * - derived widgets will assume that the composite widgets
2445
+ * defined by its parent classes have been created in their
2446
+ * relative instance initializers
2447
+ * - when calling `g_object_new()` on a widget with composite templates,
2448
+ * it’s important to build the composite widgets before the construct
2449
+ * properties are set. Properties passed to `g_object_new()` should
2450
+ * take precedence over properties set in the private template XML
2451
+ *
2452
+ * A good rule of thumb is to call this function as the first thing in
2453
+ * an instance initialization function.
2454
+ */
2455
+ init_template(): void;
2456
+ /**
2457
+ * Inserts `group` into `widget`.
2458
+ *
2459
+ * Children of `widget` that implement [iface`Gtk`.Actionable] can
2460
+ * then be associated with actions in `group` by setting their
2461
+ * “action-name” to `prefix`.`action-name`.
2462
+ *
2463
+ * Note that inheritance is defined for individual actions. I.e.
2464
+ * even if you insert a group with prefix `prefix,` actions with
2465
+ * the same prefix will still be inherited from the parent, unless
2466
+ * the group contains an action with the same name.
2467
+ *
2468
+ * If `group` is %NULL, a previously inserted group for `name` is
2469
+ * removed from `widget`.
2470
+ * @param name the prefix for actions in @group
2471
+ * @param group a `GActionGroup`, or %NULL to remove the previously inserted group for @name
2472
+ */
2473
+ insert_action_group(name: string, group?: Gio.ActionGroup | null): void;
2474
+ /**
2475
+ * Inserts `widget` into the child widget list of `parent`.
2476
+ *
2477
+ * It will be placed after `previous_sibling,` or at the beginning if
2478
+ * `previous_sibling` is %NULL.
2479
+ *
2480
+ * After calling this function, `gtk_widget_get_prev_sibling(widget)`
2481
+ * will return `previous_sibling`.
2482
+ *
2483
+ * If `parent` is already set as the parent widget of `widget,` this
2484
+ * function can also be used to reorder `widget` in the child widget
2485
+ * list of `parent`.
2486
+ *
2487
+ * This API is primarily meant for widget implementations; if you are
2488
+ * just using a widget, you *must* use its own API for adding children.
2489
+ * @param parent the parent `GtkWidget` to insert @widget into
2490
+ * @param previous_sibling the new previous sibling of @widget
2491
+ */
2492
+ insert_after(parent: Gtk.Widget, previous_sibling?: Gtk.Widget | null): void;
2493
+ /**
2494
+ * Inserts `widget` into the child widget list of `parent`.
2495
+ *
2496
+ * It will be placed before `next_sibling,` or at the end if
2497
+ * `next_sibling` is %NULL.
2498
+ *
2499
+ * After calling this function, `gtk_widget_get_next_sibling(widget)`
2500
+ * will return `next_sibling`.
2501
+ *
2502
+ * If `parent` is already set as the parent widget of `widget,` this function
2503
+ * can also be used to reorder `widget` in the child widget list of `parent`.
2504
+ *
2505
+ * This API is primarily meant for widget implementations; if you are
2506
+ * just using a widget, you *must* use its own API for adding children.
2507
+ * @param parent the parent `GtkWidget` to insert @widget into
2508
+ * @param next_sibling the new next sibling of @widget
2509
+ */
2510
+ insert_before(parent: Gtk.Widget, next_sibling?: Gtk.Widget | null): void;
2511
+ /**
2512
+ * Determines whether `widget` is somewhere inside `ancestor,`
2513
+ * possibly with intermediate containers.
2514
+ * @param ancestor another `GtkWidget`
2515
+ * @returns %TRUE if @ancestor contains @widget as a child, grandchild, great grandchild, etc.
2516
+ */
2517
+ is_ancestor(ancestor: Gtk.Widget): boolean;
2518
+ /**
2519
+ * Determines whether `widget` can be drawn to.
2520
+ *
2521
+ * A widget can be drawn if it is mapped and visible.
2522
+ * @returns %TRUE if @widget is drawable, %FALSE otherwise
2523
+ */
2524
+ is_drawable(): boolean;
2525
+ /**
2526
+ * Determines if the widget is the focus widget within its
2527
+ * toplevel.
2528
+ *
2529
+ * This does not mean that the [property`Gtk`.Widget:has-focus]
2530
+ * property is necessarily set; [property`Gtk`.Widget:has-focus]
2531
+ * will only be set if the toplevel widget additionally has the
2532
+ * global input focus.
2533
+ * @returns %TRUE if the widget is the focus widget.
2534
+ */
2535
+ is_focus(): boolean;
2536
+ /**
2537
+ * Returns the widget’s effective sensitivity.
2538
+ *
2539
+ * This means it is sensitive itself and also its
2540
+ * parent widget is sensitive.
2541
+ * @returns %TRUE if the widget is effectively sensitive
2542
+ */
2543
+ is_sensitive(): boolean;
2544
+ /**
2545
+ * Determines whether the widget and all its parents are marked as
2546
+ * visible.
2547
+ *
2548
+ * This function does not check if the widget is obscured in any way.
2549
+ *
2550
+ * See also [method`Gtk`.Widget.get_visible] and
2551
+ * [method`Gtk`.Widget.set_visible].
2552
+ * @returns %TRUE if the widget and all its parents are visible
2553
+ */
2554
+ is_visible(): boolean;
2555
+ /**
2556
+ * Emits the `::keynav-failed` signal on the widget.
2557
+ *
2558
+ * This function should be called whenever keyboard navigation
2559
+ * within a single widget hits a boundary.
2560
+ *
2561
+ * The return value of this function should be interpreted
2562
+ * in a way similar to the return value of
2563
+ * [method`Gtk`.Widget.child_focus]. When %TRUE is returned,
2564
+ * stay in the widget, the failed keyboard navigation is OK
2565
+ * and/or there is nowhere we can/should move the focus to.
2566
+ * When %FALSE is returned, the caller should continue with
2567
+ * keyboard navigation outside the widget, e.g. by calling
2568
+ * [method`Gtk`.Widget.child_focus] on the widget’s toplevel.
2569
+ *
2570
+ * The default [signal`Gtk`.Widget::keynav-failed] handler returns
2571
+ * %FALSE for %GTK_DIR_TAB_FORWARD and %GTK_DIR_TAB_BACKWARD.
2572
+ * For the other values of `GtkDirectionType` it returns %TRUE.
2573
+ *
2574
+ * Whenever the default handler returns %TRUE, it also calls
2575
+ * [method`Gtk`.Widget.error_bell] to notify the user of the
2576
+ * failed keyboard navigation.
2577
+ *
2578
+ * A use case for providing an own implementation of ::keynav-failed
2579
+ * (either by connecting to it or by overriding it) would be a row of
2580
+ * [class`Gtk`.Entry] widgets where the user should be able to navigate
2581
+ * the entire row with the cursor keys, as e.g. known from user
2582
+ * interfaces that require entering license keys.
2583
+ * @param direction direction of focus movement
2584
+ * @returns %TRUE if stopping keyboard navigation is fine, %FALSE if the emitting widget should try to handle the keyboard navigation attempt in its parent container(s).
2585
+ */
2586
+ keynav_failed(direction: Gtk.DirectionType): boolean;
2587
+ /**
2588
+ * Returns the widgets for which this widget is the target of a
2589
+ * mnemonic.
2590
+ *
2591
+ * Typically, these widgets will be labels. See, for example,
2592
+ * [method`Gtk`.Label.set_mnemonic_widget].
2593
+ *
2594
+ * The widgets in the list are not individually referenced.
2595
+ * If you want to iterate through the list and perform actions
2596
+ * involving callbacks that might destroy the widgets, you
2597
+ * must call `g_list_foreach (result, (GFunc)g_object_ref, NULL)`
2598
+ * first, and then unref all the widgets afterwards.
2599
+ * @returns the list of mnemonic labels; free this list with g_list_free() when you are done with it.
2600
+ */
2601
+ list_mnemonic_labels(): Gtk.Widget[];
2602
+ /**
2603
+ * Causes a widget to be mapped if it isn’t already.
2604
+ *
2605
+ * This function is only for use in widget implementations.
2606
+ */
2607
+ map(): void;
2608
+ /**
2609
+ * Measures `widget` in the orientation `orientation` and for the given `for_size`.
2610
+ *
2611
+ * As an example, if `orientation` is %GTK_ORIENTATION_HORIZONTAL and `for_size`
2612
+ * is 300, this functions will compute the minimum and natural width of `widget`
2613
+ * if it is allocated at a height of 300 pixels.
2614
+ *
2615
+ * See [GtkWidget’s geometry management section](class.Widget.html#height-for-width-geometry-management) for
2616
+ * a more details on implementing `GtkWidgetClass.measure()`.
2617
+ * @param orientation the orientation to measure
2618
+ * @param for_size Size for the opposite of @orientation, i.e. if @orientation is %GTK_ORIENTATION_HORIZONTAL, this is the height the widget should be measured with. The %GTK_ORIENTATION_VERTICAL case is analogous. This way, both height-for-width and width-for-height requests can be implemented. If no size is known, -1 can be passed.
2619
+ */
2620
+ measure(orientation: Gtk.Orientation, for_size: number): [number, number, number, number];
2621
+ /**
2622
+ * Emits the ::mnemonic-activate signal.
2623
+ *
2624
+ * See [signal`Gtk`.Widget::mnemonic-activate].
2625
+ * @param group_cycling %TRUE if there are other widgets with the same mnemonic
2626
+ * @returns %TRUE if the signal has been handled
2627
+ */
2628
+ mnemonic_activate(group_cycling: boolean): boolean;
2629
+ /**
2630
+ * Returns a `GListModel` to track the children of `widget`.
2631
+ *
2632
+ * Calling this function will enable extra internal bookkeeping
2633
+ * to track children and emit signals on the returned listmodel.
2634
+ * It may slow down operations a lot.
2635
+ *
2636
+ * Applications should try hard to avoid calling this function
2637
+ * because of the slowdowns.
2638
+ * @returns a `GListModel` tracking @widget's children
2639
+ */
2640
+ observe_children(): Gio.ListModel;
2641
+ /**
2642
+ * Returns a `GListModel` to track the [class`Gtk`.EventController]s
2643
+ * of `widget`.
2644
+ *
2645
+ * Calling this function will enable extra internal bookkeeping
2646
+ * to track controllers and emit signals on the returned listmodel.
2647
+ * It may slow down operations a lot.
2648
+ *
2649
+ * Applications should try hard to avoid calling this function
2650
+ * because of the slowdowns.
2651
+ * @returns a `GListModel` tracking @widget's controllers
2652
+ */
2653
+ observe_controllers(): Gio.ListModel;
2654
+ /**
2655
+ * Finds the descendant of `widget` closest to the point (`x,` `y)`.
2656
+ *
2657
+ * The point must be given in widget coordinates, so (0, 0) is assumed
2658
+ * to be the top left of `widget'`s content area.
2659
+ *
2660
+ * Usually widgets will return %NULL if the given coordinate is not
2661
+ * contained in `widget` checked via [method`Gtk`.Widget.contains].
2662
+ * Otherwise they will recursively try to find a child that does
2663
+ * not return %NULL. Widgets are however free to customize their
2664
+ * picking algorithm.
2665
+ *
2666
+ * This function is used on the toplevel to determine the widget
2667
+ * below the mouse cursor for purposes of hover highlighting and
2668
+ * delivering events.
2669
+ * @param x X coordinate to test, relative to @widget's origin
2670
+ * @param y Y coordinate to test, relative to @widget's origin
2671
+ * @param flags Flags to influence what is picked
2672
+ * @returns The widget descendant at the given point
2673
+ */
2674
+ pick(x: number, y: number, flags: Gtk.PickFlags): Gtk.Widget | null;
2675
+ /**
2676
+ * Flags the widget for a rerun of the [vfunc`Gtk`.Widget.size_allocate]
2677
+ * function.
2678
+ *
2679
+ * Use this function instead of [method`Gtk`.Widget.queue_resize]
2680
+ * when the `widget'`s size request didn't change but it wants to
2681
+ * reposition its contents.
2682
+ *
2683
+ * An example user of this function is [method`Gtk`.Widget.set_halign].
2684
+ *
2685
+ * This function is only for use in widget implementations.
2686
+ */
2687
+ queue_allocate(): void;
2688
+ /**
2689
+ * Schedules this widget to be redrawn in the paint phase
2690
+ * of the current or the next frame.
2691
+ *
2692
+ * This means `widget'`s [vfunc`Gtk`.Widget.snapshot]
2693
+ * implementation will be called.
2694
+ */
2695
+ queue_draw(): void;
2696
+ /**
2697
+ * Flags a widget to have its size renegotiated.
2698
+ *
2699
+ * This should be called when a widget for some reason has a new
2700
+ * size request. For example, when you change the text in a
2701
+ * [class`Gtk`.Label], the label queues a resize to ensure there’s
2702
+ * enough space for the new text.
2703
+ *
2704
+ * Note that you cannot call gtk_widget_queue_resize() on a widget
2705
+ * from inside its implementation of the [vfunc`Gtk`.Widget.size_allocate]
2706
+ * virtual method. Calls to gtk_widget_queue_resize() from inside
2707
+ * [vfunc`Gtk`.Widget.size_allocate] will be silently ignored.
2708
+ *
2709
+ * This function is only for use in widget implementations.
2710
+ */
2711
+ queue_resize(): void;
2712
+ /**
2713
+ * Creates the GDK resources associated with a widget.
2714
+ *
2715
+ * Normally realization happens implicitly; if you show a widget
2716
+ * and all its parent containers, then the widget will be realized
2717
+ * and mapped automatically.
2718
+ *
2719
+ * Realizing a widget requires all the widget’s parent widgets to be
2720
+ * realized; calling this function realizes the widget’s parents
2721
+ * in addition to `widget` itself. If a widget is not yet inside a
2722
+ * toplevel window when you realize it, bad things will happen.
2723
+ *
2724
+ * This function is primarily used in widget implementations, and
2725
+ * isn’t very useful otherwise. Many times when you think you might
2726
+ * need it, a better approach is to connect to a signal that will be
2727
+ * called after the widget is realized automatically, such as
2728
+ * [signal`Gtk`.Widget::realize].
2729
+ */
2730
+ realize(): void;
2731
+ /**
2732
+ * Removes `controller` from `widget,` so that it doesn't process
2733
+ * events anymore.
2734
+ *
2735
+ * It should not be used again.
2736
+ *
2737
+ * Widgets will remove all event controllers automatically when they
2738
+ * are destroyed, there is normally no need to call this function.
2739
+ * @param controller a `GtkEventController`
2740
+ */
2741
+ remove_controller(controller: Gtk.EventController): void;
2742
+ /**
2743
+ * Removes a style from `widget`.
2744
+ *
2745
+ * After this, the style of `widget` will stop matching for `css_class`.
2746
+ * @param css_class The style class to remove from @widget, without the leading '.' used for notation of style classes
2747
+ */
2748
+ remove_css_class(css_class: string): void;
2749
+ /**
2750
+ * Removes a widget from the list of mnemonic labels for this widget.
2751
+ *
2752
+ * See [method`Gtk`.Widget.list_mnemonic_labels]. The widget must
2753
+ * have previously been added to the list with
2754
+ * [method`Gtk`.Widget.add_mnemonic_label].
2755
+ * @param label a `GtkWidget` that was previously set as a mnemonic label for @widget with [method@Gtk.Widget.add_mnemonic_label]
2756
+ */
2757
+ remove_mnemonic_label(label: Gtk.Widget): void;
2758
+ /**
2759
+ * Removes a tick callback previously registered with
2760
+ * gtk_widget_add_tick_callback().
2761
+ * @param id an id returned by [method@Gtk.Widget.add_tick_callback]
2762
+ */
2763
+ remove_tick_callback(id: number): void;
2764
+ /**
2765
+ * Specifies whether the input focus can enter the widget
2766
+ * or any of its children.
2767
+ *
2768
+ * Applications should set `can_focus` to %FALSE to mark a
2769
+ * widget as for pointer/touch use only.
2770
+ *
2771
+ * Note that having `can_focus` be %TRUE is only one of the
2772
+ * necessary conditions for being focusable. A widget must
2773
+ * also be sensitive and focusable and not have an ancestor
2774
+ * that is marked as not can-focus in order to receive input
2775
+ * focus.
2776
+ *
2777
+ * See [method`Gtk`.Widget.grab_focus] for actually setting
2778
+ * the input focus on a widget.
2779
+ * @param can_focus whether or not the input focus can enter the widget or any of its children
2780
+ */
2781
+ set_can_focus(can_focus: boolean): void;
2782
+ /**
2783
+ * Sets whether `widget` can be the target of pointer events.
2784
+ * @param can_target whether this widget should be able to receive pointer events
2785
+ */
2786
+ set_can_target(can_target: boolean): void;
2787
+ /**
2788
+ * Sets whether `widget` should be mapped along with its parent.
2789
+ *
2790
+ * The child visibility can be set for widget before it is added
2791
+ * to a container with [method`Gtk`.Widget.set_parent], to avoid
2792
+ * mapping children unnecessary before immediately unmapping them.
2793
+ * However it will be reset to its default state of %TRUE when the
2794
+ * widget is removed from a container.
2795
+ *
2796
+ * Note that changing the child visibility of a widget does not
2797
+ * queue a resize on the widget. Most of the time, the size of
2798
+ * a widget is computed from all visible children, whether or
2799
+ * not they are mapped. If this is not the case, the container
2800
+ * can queue a resize itself.
2801
+ *
2802
+ * This function is only useful for container implementations
2803
+ * and should never be called by an application.
2804
+ * @param child_visible if %TRUE, @widget should be mapped along with its parent.
2805
+ */
2806
+ set_child_visible(child_visible: boolean): void;
2807
+ /**
2808
+ * Clear all style classes applied to `widget`
2809
+ * and replace them with `classes`.
2810
+ * @param classes %NULL-terminated list of style classes to apply to @widget.
2811
+ */
2812
+ set_css_classes(classes: string[]): void;
2813
+ /**
2814
+ * Sets the cursor to be shown when pointer devices point
2815
+ * towards `widget`.
2816
+ *
2817
+ * If the `cursor` is NULL, `widget` will use the cursor
2818
+ * inherited from the parent widget.
2819
+ * @param cursor the new cursor
2820
+ */
2821
+ set_cursor(cursor?: Gdk.Cursor | null): void;
2822
+ /**
2823
+ * Sets a named cursor to be shown when pointer devices point
2824
+ * towards `widget`.
2825
+ *
2826
+ * This is a utility function that creates a cursor via
2827
+ * [ctor`Gdk`.Cursor.new_from_name] and then sets it on `widget`
2828
+ * with [method`Gtk`.Widget.set_cursor]. See those functions for
2829
+ * details.
2830
+ *
2831
+ * On top of that, this function allows `name` to be %NULL, which
2832
+ * will do the same as calling [method`Gtk`.Widget.set_cursor]
2833
+ * with a %NULL cursor.
2834
+ * @param name The name of the cursor
2835
+ */
2836
+ set_cursor_from_name(name?: string | null): void;
2837
+ /**
2838
+ * Sets the reading direction on a particular widget.
2839
+ *
2840
+ * This direction controls the primary direction for widgets
2841
+ * containing text, and also the direction in which the children
2842
+ * of a container are packed. The ability to set the direction is
2843
+ * present in order so that correct localization into languages with
2844
+ * right-to-left reading directions can be done. Generally, applications
2845
+ * will let the default reading direction present, except for containers
2846
+ * where the containers are arranged in an order that is explicitly
2847
+ * visual rather than logical (such as buttons for text justification).
2848
+ *
2849
+ * If the direction is set to %GTK_TEXT_DIR_NONE, then the value
2850
+ * set by [func`Gtk`.Widget.set_default_direction] will be used.
2851
+ * @param dir the new direction
2852
+ */
2853
+ set_direction(dir: Gtk.TextDirection): void;
2854
+ /**
2855
+ * Set `child` as the current focus child of `widget`.
2856
+ *
2857
+ * This function is only suitable for widget implementations.
2858
+ * If you want a certain widget to get the input focus, call
2859
+ * [method`Gtk`.Widget.grab_focus] on it.
2860
+ * @param child a direct child widget of @widget or %NULL to unset the focus child of @widget
2861
+ */
2862
+ set_focus_child(child?: Gtk.Widget | null): void;
2863
+ /**
2864
+ * Sets whether the widget should grab focus when it is clicked
2865
+ * with the mouse.
2866
+ *
2867
+ * Making mouse clicks not grab focus is useful in places like
2868
+ * toolbars where you don’t want the keyboard focus removed from
2869
+ * the main area of the application.
2870
+ * @param focus_on_click whether the widget should grab focus when clicked with the mouse
2871
+ */
2872
+ set_focus_on_click(focus_on_click: boolean): void;
2873
+ /**
2874
+ * Specifies whether `widget` can own the input focus.
2875
+ *
2876
+ * Widget implementations should set `focusable` to %TRUE in
2877
+ * their init() function if they want to receive keyboard input.
2878
+ *
2879
+ * Note that having `focusable` be %TRUE is only one of the
2880
+ * necessary conditions for being focusable. A widget must
2881
+ * also be sensitive and can-focus and not have an ancestor
2882
+ * that is marked as not can-focus in order to receive input
2883
+ * focus.
2884
+ *
2885
+ * See [method`Gtk`.Widget.grab_focus] for actually setting
2886
+ * the input focus on a widget.
2887
+ * @param focusable whether or not @widget can own the input focus
2888
+ */
2889
+ set_focusable(focusable: boolean): void;
2890
+ /**
2891
+ * Sets the font map to use for Pango rendering.
2892
+ *
2893
+ * The font map is the object that is used to look up fonts.
2894
+ * Setting a custom font map can be useful in special situations,
2895
+ * e.g. when you need to add application-specific fonts to the set
2896
+ * of available fonts.
2897
+ *
2898
+ * When not set, the widget will inherit the font map from its parent.
2899
+ * @param font_map a `PangoFontMap`, or %NULL to unset any previously set font map
2900
+ */
2901
+ set_font_map(font_map?: Pango.FontMap | null): void;
2902
+ /**
2903
+ * Sets the `cairo_font_options_t` used for Pango rendering
2904
+ * in this widget.
2905
+ *
2906
+ * When not set, the default font options for the `GdkDisplay`
2907
+ * will be used.
2908
+ * @param options a `cairo_font_options_t` to unset any previously set default font options
2909
+ */
2910
+ set_font_options(options?: cairo.FontOptions | null): void;
2911
+ /**
2912
+ * Sets the horizontal alignment of `widget`.
2913
+ * @param align the horizontal alignment
2914
+ */
2915
+ set_halign(align: Gtk.Align): void;
2916
+ /**
2917
+ * Sets the `has-tooltip` property on `widget` to `has_tooltip`.
2918
+ * @param has_tooltip whether or not @widget has a tooltip.
2919
+ */
2920
+ set_has_tooltip(has_tooltip: boolean): void;
2921
+ /**
2922
+ * Sets whether the widget would like any available extra horizontal
2923
+ * space.
2924
+ *
2925
+ * When a user resizes a `GtkWindow`, widgets with expand=TRUE
2926
+ * generally receive the extra space. For example, a list or
2927
+ * scrollable area or document in your window would often be set to
2928
+ * expand.
2929
+ *
2930
+ * Call this function to set the expand flag if you would like your
2931
+ * widget to become larger horizontally when the window has extra
2932
+ * room.
2933
+ *
2934
+ * By default, widgets automatically expand if any of their children
2935
+ * want to expand. (To see if a widget will automatically expand given
2936
+ * its current children and state, call [method`Gtk`.Widget.compute_expand].
2937
+ * A container can decide how the expandability of children affects the
2938
+ * expansion of the container by overriding the compute_expand virtual
2939
+ * method on `GtkWidget`.).
2940
+ *
2941
+ * Setting hexpand explicitly with this function will override the
2942
+ * automatic expand behavior.
2943
+ *
2944
+ * This function forces the widget to expand or not to expand,
2945
+ * regardless of children. The override occurs because
2946
+ * [method`Gtk`.Widget.set_hexpand] sets the hexpand-set property (see
2947
+ * [method`Gtk`.Widget.set_hexpand_set]) which causes the widget’s hexpand
2948
+ * value to be used, rather than looking at children and widget state.
2949
+ * @param expand whether to expand
2950
+ */
2951
+ set_hexpand(expand: boolean): void;
2952
+ /**
2953
+ * Sets whether the hexpand flag will be used.
2954
+ *
2955
+ * The [property`Gtk`.Widget:hexpand-set] property will be set
2956
+ * automatically when you call [method`Gtk`.Widget.set_hexpand]
2957
+ * to set hexpand, so the most likely reason to use this function
2958
+ * would be to unset an explicit expand flag.
2959
+ *
2960
+ * If hexpand is set, then it overrides any computed
2961
+ * expand value based on child widgets. If hexpand is not
2962
+ * set, then the expand value depends on whether any
2963
+ * children of the widget would like to expand.
2964
+ *
2965
+ * There are few reasons to use this function, but it’s here
2966
+ * for completeness and consistency.
2967
+ * @param set value for hexpand-set property
2968
+ */
2969
+ set_hexpand_set(set: boolean): void;
2970
+ /**
2971
+ * Sets the layout manager delegate instance that provides an
2972
+ * implementation for measuring and allocating the children of `widget`.
2973
+ * @param layout_manager a `GtkLayoutManager`
2974
+ */
2975
+ set_layout_manager(layout_manager?: Gtk.LayoutManager | null): void;
2976
+ /**
2977
+ * Sets the bottom margin of `widget`.
2978
+ * @param margin the bottom margin
2979
+ */
2980
+ set_margin_bottom(margin: number): void;
2981
+ /**
2982
+ * Sets the end margin of `widget`.
2983
+ * @param margin the end margin
2984
+ */
2985
+ set_margin_end(margin: number): void;
2986
+ /**
2987
+ * Sets the start margin of `widget`.
2988
+ * @param margin the start margin
2989
+ */
2990
+ set_margin_start(margin: number): void;
2991
+ /**
2992
+ * Sets the top margin of `widget`.
2993
+ * @param margin the top margin
2994
+ */
2995
+ set_margin_top(margin: number): void;
2996
+ /**
2997
+ * Sets a widgets name.
2998
+ *
2999
+ * Setting a name allows you to refer to the widget from a
3000
+ * CSS file. You can apply a style to widgets with a particular name
3001
+ * in the CSS file. See the documentation for the CSS syntax (on the
3002
+ * same page as the docs for [class`Gtk`.StyleContext].
3003
+ *
3004
+ * Note that the CSS syntax has certain special characters to delimit
3005
+ * and represent elements in a selector (period, #, >, *...), so using
3006
+ * these will make your widget impossible to match by name. Any combination
3007
+ * of alphanumeric symbols, dashes and underscores will suffice.
3008
+ * @param name name for the widget
3009
+ */
3010
+ set_name(name: string): void;
3011
+ /**
3012
+ * Request the `widget` to be rendered partially transparent.
3013
+ *
3014
+ * An opacity of 0 is fully transparent and an opacity of 1
3015
+ * is fully opaque.
3016
+ *
3017
+ * Opacity works on both toplevel widgets and child widgets, although
3018
+ * there are some limitations: For toplevel widgets, applying opacity
3019
+ * depends on the capabilities of the windowing system. On X11, this
3020
+ * has any effect only on X displays with a compositing manager,
3021
+ * see gdk_display_is_composited(). On Windows and Wayland it should
3022
+ * always work, although setting a window’s opacity after the window
3023
+ * has been shown may cause some flicker.
3024
+ *
3025
+ * Note that the opacity is inherited through inclusion — if you set
3026
+ * a toplevel to be partially translucent, all of its content will
3027
+ * appear translucent, since it is ultimatively rendered on that
3028
+ * toplevel. The opacity value itself is not inherited by child
3029
+ * widgets (since that would make widgets deeper in the hierarchy
3030
+ * progressively more translucent). As a consequence, [class`Gtk`.Popover]s
3031
+ * and other [iface`Gtk`.Native] widgets with their own surface will use their
3032
+ * own opacity value, and thus by default appear non-translucent,
3033
+ * even if they are attached to a toplevel that is translucent.
3034
+ * @param opacity desired opacity, between 0 and 1
3035
+ */
3036
+ set_opacity(opacity: number): void;
3037
+ /**
3038
+ * Sets how `widget` treats content that is drawn outside the
3039
+ * widget's content area.
3040
+ *
3041
+ * See the definition of [enum`Gtk`.Overflow] for details.
3042
+ *
3043
+ * This setting is provided for widget implementations and
3044
+ * should not be used by application code.
3045
+ *
3046
+ * The default value is %GTK_OVERFLOW_VISIBLE.
3047
+ * @param overflow desired overflow
3048
+ */
3049
+ set_overflow(overflow: Gtk.Overflow): void;
3050
+ /**
3051
+ * Sets `parent` as the parent widget of `widget`.
3052
+ *
3053
+ * This takes care of details such as updating the state and style
3054
+ * of the child to reflect its new location and resizing the parent.
3055
+ * The opposite function is [method`Gtk`.Widget.unparent].
3056
+ *
3057
+ * This function is useful only when implementing subclasses of
3058
+ * `GtkWidget`.
3059
+ * @param parent parent widget
3060
+ */
3061
+ set_parent(parent: Gtk.Widget): void;
3062
+ /**
3063
+ * Specifies whether `widget` will be treated as the default
3064
+ * widget within its toplevel when it has the focus, even if
3065
+ * another widget is the default.
3066
+ * @param receives_default whether or not @widget can be a default widget.
3067
+ */
3068
+ set_receives_default(receives_default: boolean): void;
3069
+ /**
3070
+ * Sets the sensitivity of a widget.
3071
+ *
3072
+ * A widget is sensitive if the user can interact with it.
3073
+ * Insensitive widgets are “grayed out” and the user can’t
3074
+ * interact with them. Insensitive widgets are known as
3075
+ * “inactive”, “disabled”, or “ghosted” in some other toolkits.
3076
+ * @param sensitive %TRUE to make the widget sensitive
3077
+ */
3078
+ set_sensitive(sensitive: boolean): void;
3079
+ /**
3080
+ * Sets the minimum size of a widget.
3081
+ *
3082
+ * That is, the widget’s size request will be at least `width`
3083
+ * by `height`. You can use this function to force a widget to
3084
+ * be larger than it normally would be.
3085
+ *
3086
+ * In most cases, [method`Gtk`.Window.set_default_size] is a better
3087
+ * choice for toplevel windows than this function; setting the default
3088
+ * size will still allow users to shrink the window. Setting the size
3089
+ * request will force them to leave the window at least as large as
3090
+ * the size request.
3091
+ *
3092
+ * Note the inherent danger of setting any fixed size - themes,
3093
+ * translations into other languages, different fonts, and user action
3094
+ * can all change the appropriate size for a given widget. So, it's
3095
+ * basically impossible to hardcode a size that will always be
3096
+ * correct.
3097
+ *
3098
+ * The size request of a widget is the smallest size a widget can
3099
+ * accept while still functioning well and drawing itself correctly.
3100
+ * However in some strange cases a widget may be allocated less than
3101
+ * its requested size, and in many cases a widget may be allocated more
3102
+ * space than it requested.
3103
+ *
3104
+ * If the size request in a given direction is -1 (unset), then
3105
+ * the “natural” size request of the widget will be used instead.
3106
+ *
3107
+ * The size request set here does not include any margin from the
3108
+ * properties
3109
+ * [property`Gtk`.Widget:margin-start],
3110
+ * [property`Gtk`.Widget:margin-end],
3111
+ * [property`Gtk`.Widget:margin-top], and
3112
+ * [property`Gtk`.Widget:margin-bottom], but it does include pretty
3113
+ * much all other padding or border properties set by any subclass
3114
+ * of `GtkWidget`.
3115
+ * @param width width @widget should request, or -1 to unset
3116
+ * @param height height @widget should request, or -1 to unset
3117
+ */
3118
+ set_size_request(width: number, height: number): void;
3119
+ /**
3120
+ * Turns on flag values in the current widget state.
3121
+ *
3122
+ * Typical widget states are insensitive, prelighted, etc.
3123
+ *
3124
+ * This function accepts the values %GTK_STATE_FLAG_DIR_LTR and
3125
+ * %GTK_STATE_FLAG_DIR_RTL but ignores them. If you want to set
3126
+ * the widget's direction, use [method`Gtk`.Widget.set_direction].
3127
+ *
3128
+ * This function is for use in widget implementations.
3129
+ * @param flags State flags to turn on
3130
+ * @param clear Whether to clear state before turning on @flags
3131
+ */
3132
+ set_state_flags(flags: Gtk.StateFlags, clear: boolean): void;
3133
+ /**
3134
+ * Sets `markup` as the contents of the tooltip, which is marked
3135
+ * up with Pango markup.
3136
+ *
3137
+ * This function will take care of setting the
3138
+ * [property`Gtk`.Widget:has-tooltip] as a side effect, and of the
3139
+ * default handler for the [signal`Gtk`.Widget::query-tooltip] signal.
3140
+ *
3141
+ * See also [method`Gtk`.Tooltip.set_markup].
3142
+ * @param markup the contents of the tooltip for @widget
3143
+ */
3144
+ set_tooltip_markup(markup?: string | null): void;
3145
+ /**
3146
+ * Sets `text` as the contents of the tooltip.
3147
+ *
3148
+ * If `text` contains any markup, it will be escaped.
3149
+ *
3150
+ * This function will take care of setting
3151
+ * [property`Gtk`.Widget:has-tooltip] as a side effect,
3152
+ * and of the default handler for the
3153
+ * [signal`Gtk`.Widget::query-tooltip] signal.
3154
+ *
3155
+ * See also [method`Gtk`.Tooltip.set_text].
3156
+ * @param text the contents of the tooltip for @widget
3157
+ */
3158
+ set_tooltip_text(text?: string | null): void;
3159
+ /**
3160
+ * Sets the vertical alignment of `widget`.
3161
+ * @param align the vertical alignment
3162
+ */
3163
+ set_valign(align: Gtk.Align): void;
3164
+ /**
3165
+ * Sets whether the widget would like any available extra vertical
3166
+ * space.
3167
+ *
3168
+ * See [method`Gtk`.Widget.set_hexpand] for more detail.
3169
+ * @param expand whether to expand
3170
+ */
3171
+ set_vexpand(expand: boolean): void;
3172
+ /**
3173
+ * Sets whether the vexpand flag will be used.
3174
+ *
3175
+ * See [method`Gtk`.Widget.set_hexpand_set] for more detail.
3176
+ * @param set value for vexpand-set property
3177
+ */
3178
+ set_vexpand_set(set: boolean): void;
3179
+ /**
3180
+ * Sets the visibility state of `widget`.
3181
+ *
3182
+ * Note that setting this to %TRUE doesn’t mean the widget is
3183
+ * actually viewable, see [method`Gtk`.Widget.get_visible].
3184
+ * @param visible whether the widget should be shown or not
3185
+ */
3186
+ set_visible(visible: boolean): void;
3187
+ /**
3188
+ * Returns whether `widget` should contribute to
3189
+ * the measuring and allocation of its parent.
3190
+ *
3191
+ * This is %FALSE for invisible children, but also
3192
+ * for children that have their own surface.
3193
+ * @returns %TRUE if child should be included in measuring and allocating
3194
+ */
3195
+ should_layout(): boolean;
3196
+ /**
3197
+ * Flags a widget to be displayed.
3198
+ *
3199
+ * Any widget that isn’t shown will not appear on the screen.
3200
+ *
3201
+ * Remember that you have to show the containers containing a widget,
3202
+ * in addition to the widget itself, before it will appear onscreen.
3203
+ *
3204
+ * When a toplevel container is shown, it is immediately realized and
3205
+ * mapped; other shown widgets are realized and mapped when their
3206
+ * toplevel container is realized and mapped.
3207
+ */
3208
+ show(): void;
3209
+ /**
3210
+ * Allocates widget with a transformation that translates
3211
+ * the origin to the position in `allocation`.
3212
+ *
3213
+ * This is a simple form of [method`Gtk`.Widget.allocate].
3214
+ * @param allocation position and size to be allocated to @widget
3215
+ * @param baseline The baseline of the child, or -1
3216
+ */
3217
+ size_allocate(allocation: Gtk.Allocation, baseline: number): void;
3218
+ /**
3219
+ * Snapshot the a child of `widget`.
3220
+ *
3221
+ * When a widget receives a call to the snapshot function,
3222
+ * it must send synthetic [vfunc`Gtk`.Widget.snapshot] calls
3223
+ * to all children. This function provides a convenient way
3224
+ * of doing this. A widget, when it receives a call to its
3225
+ * [vfunc`Gtk`.Widget.snapshot] function, calls
3226
+ * gtk_widget_snapshot_child() once for each child, passing in
3227
+ * the `snapshot` the widget received.
3228
+ *
3229
+ * gtk_widget_snapshot_child() takes care of translating the origin of
3230
+ * `snapshot,` and deciding whether the child needs to be snapshot.
3231
+ *
3232
+ * This function does nothing for children that implement `GtkNative`.
3233
+ * @param child a child of @widget
3234
+ * @param snapshot `GtkSnapshot` as passed to the widget. In particular, no calls to gtk_snapshot_translate() or other transform calls should have been made.
3235
+ */
3236
+ snapshot_child(child: Gtk.Widget, snapshot: Gtk.Snapshot): void;
3237
+ /**
3238
+ * Translate coordinates relative to `src_widget’`s allocation
3239
+ * to coordinates relative to `dest_widget’`s allocations.
3240
+ *
3241
+ * In order to perform this operation, both widget must share
3242
+ * a common ancestor.
3243
+ * @param dest_widget a `GtkWidget`
3244
+ * @param src_x X position relative to @src_widget
3245
+ * @param src_y Y position relative to @src_widget
3246
+ * @returns %FALSE if @src_widget and @dest_widget have no common ancestor. In this case, 0 is stored in *@dest_x and *@dest_y. Otherwise %TRUE.
3247
+ */
3248
+ translate_coordinates(dest_widget: Gtk.Widget, src_x: number, src_y: number): [boolean, number, number];
3249
+ /**
3250
+ * Triggers a tooltip query on the display where the toplevel
3251
+ * of `widget` is located.
3252
+ */
3253
+ trigger_tooltip_query(): void;
3254
+ /**
3255
+ * Causes a widget to be unmapped if it’s currently mapped.
3256
+ *
3257
+ * This function is only for use in widget implementations.
3258
+ */
3259
+ unmap(): void;
3260
+ /**
3261
+ * Dissociate `widget` from its parent.
3262
+ *
3263
+ * This function is only for use in widget implementations,
3264
+ * typically in dispose.
3265
+ */
3266
+ unparent(): void;
3267
+ /**
3268
+ * Causes a widget to be unrealized (frees all GDK resources
3269
+ * associated with the widget).
3270
+ *
3271
+ * This function is only useful in widget implementations.
3272
+ */
3273
+ unrealize(): void;
3274
+ /**
3275
+ * Turns off flag values for the current widget state.
3276
+ *
3277
+ * See [method`Gtk`.Widget.set_state_flags].
3278
+ *
3279
+ * This function is for use in widget implementations.
3280
+ * @param flags State flags to turn off
3281
+ */
3282
+ unset_state_flags(flags: Gtk.StateFlags): void;
3283
+ /**
3284
+ * Computes whether a container should give this
3285
+ * widget extra space when possible.
3286
+ * @param hexpand_p
3287
+ * @param vexpand_p
3288
+ */
3289
+ vfunc_compute_expand(hexpand_p: boolean, vexpand_p: boolean): void;
3290
+ /**
3291
+ * Tests if the point at (`x,` `y)` is contained in `widget`.
3292
+ *
3293
+ * The coordinates for (`x,` `y)` must be in widget coordinates, so
3294
+ * (0, 0) is assumed to be the top left of `widget'`s content area.
3295
+ * @param x X coordinate to test, relative to @widget's origin
3296
+ * @param y Y coordinate to test, relative to @widget's origin
3297
+ */
3298
+ vfunc_contains(x: number, y: number): boolean;
3299
+ /**
3300
+ * Vfunc called when the CSS used by widget was changed. Widgets
3301
+ * should then discard their caches that depend on CSS and queue resizes or
3302
+ * redraws accordingly. The default implementation will take care of this for
3303
+ * all the default CSS properties, so implementations must chain up.
3304
+ * @param change
3305
+ */
3306
+ vfunc_css_changed(change: Gtk.CssStyleChange): void;
3307
+ /**
3308
+ * Signal emitted when the text direction of a
3309
+ * widget changes.
3310
+ * @param previous_direction
3311
+ */
3312
+ vfunc_direction_changed(previous_direction: Gtk.TextDirection): void;
3313
+ /**
3314
+ * Vfunc for gtk_widget_child_focus()
3315
+ * @param direction
3316
+ */
3317
+ vfunc_focus(direction: Gtk.DirectionType): boolean;
3318
+ /**
3319
+ * Gets whether the widget prefers a height-for-width layout
3320
+ * or a width-for-height layout.
3321
+ *
3322
+ * Single-child widgets generally propagate the preference of
3323
+ * their child, more complex widgets need to request something
3324
+ * either in context of their children or in context of their
3325
+ * allocation capabilities.
3326
+ */
3327
+ vfunc_get_request_mode(): Gtk.SizeRequestMode;
3328
+ /**
3329
+ * Causes `widget` to have the keyboard focus for the `GtkWindow` it's inside.
3330
+ *
3331
+ * If `widget` is not focusable, or its [vfunc`Gtk`.Widget.grab_focus]
3332
+ * implementation cannot transfer the focus to a descendant of `widget`
3333
+ * that is focusable, it will not take focus and %FALSE will be returned.
3334
+ *
3335
+ * Calling [method`Gtk`.Widget.grab_focus] on an already focused widget
3336
+ * is allowed, should not have an effect, and return %TRUE.
3337
+ */
3338
+ vfunc_grab_focus(): boolean;
3339
+ /**
3340
+ * Reverses the effects of gtk_widget_show().
3341
+ *
3342
+ * This is causing the widget to be hidden (invisible to the user).
3343
+ */
3344
+ vfunc_hide(): void;
3345
+ /**
3346
+ * Emits the `::keynav-failed` signal on the widget.
3347
+ *
3348
+ * This function should be called whenever keyboard navigation
3349
+ * within a single widget hits a boundary.
3350
+ *
3351
+ * The return value of this function should be interpreted
3352
+ * in a way similar to the return value of
3353
+ * [method`Gtk`.Widget.child_focus]. When %TRUE is returned,
3354
+ * stay in the widget, the failed keyboard navigation is OK
3355
+ * and/or there is nowhere we can/should move the focus to.
3356
+ * When %FALSE is returned, the caller should continue with
3357
+ * keyboard navigation outside the widget, e.g. by calling
3358
+ * [method`Gtk`.Widget.child_focus] on the widget’s toplevel.
3359
+ *
3360
+ * The default [signal`Gtk`.Widget::keynav-failed] handler returns
3361
+ * %FALSE for %GTK_DIR_TAB_FORWARD and %GTK_DIR_TAB_BACKWARD.
3362
+ * For the other values of `GtkDirectionType` it returns %TRUE.
3363
+ *
3364
+ * Whenever the default handler returns %TRUE, it also calls
3365
+ * [method`Gtk`.Widget.error_bell] to notify the user of the
3366
+ * failed keyboard navigation.
3367
+ *
3368
+ * A use case for providing an own implementation of ::keynav-failed
3369
+ * (either by connecting to it or by overriding it) would be a row of
3370
+ * [class`Gtk`.Entry] widgets where the user should be able to navigate
3371
+ * the entire row with the cursor keys, as e.g. known from user
3372
+ * interfaces that require entering license keys.
3373
+ * @param direction direction of focus movement
3374
+ */
3375
+ vfunc_keynav_failed(direction: Gtk.DirectionType): boolean;
3376
+ /**
3377
+ * Causes a widget to be mapped if it isn’t already.
3378
+ *
3379
+ * This function is only for use in widget implementations.
3380
+ */
3381
+ vfunc_map(): void;
3382
+ /**
3383
+ * Measures `widget` in the orientation `orientation` and for the given `for_size`.
3384
+ *
3385
+ * As an example, if `orientation` is %GTK_ORIENTATION_HORIZONTAL and `for_size`
3386
+ * is 300, this functions will compute the minimum and natural width of `widget`
3387
+ * if it is allocated at a height of 300 pixels.
3388
+ *
3389
+ * See [GtkWidget’s geometry management section](class.Widget.html#height-for-width-geometry-management) for
3390
+ * a more details on implementing `GtkWidgetClass.measure()`.
3391
+ * @param orientation the orientation to measure
3392
+ * @param for_size Size for the opposite of @orientation, i.e. if @orientation is %GTK_ORIENTATION_HORIZONTAL, this is the height the widget should be measured with. The %GTK_ORIENTATION_VERTICAL case is analogous. This way, both height-for-width and width-for-height requests can be implemented. If no size is known, -1 can be passed.
3393
+ */
3394
+ vfunc_measure(orientation: Gtk.Orientation, for_size: number): [number, number, number, number];
3395
+ /**
3396
+ * Emits the ::mnemonic-activate signal.
3397
+ *
3398
+ * See [signal`Gtk`.Widget::mnemonic-activate].
3399
+ * @param group_cycling %TRUE if there are other widgets with the same mnemonic
3400
+ */
3401
+ vfunc_mnemonic_activate(group_cycling: boolean): boolean;
3402
+ /**
3403
+ * Signal emitted when a change of focus is requested
3404
+ * @param direction
3405
+ */
3406
+ vfunc_move_focus(direction: Gtk.DirectionType): void;
3407
+ /**
3408
+ * Signal emitted when “has-tooltip” is %TRUE and the
3409
+ * hover timeout has expired with the cursor hovering “above”
3410
+ * widget; or emitted when widget got focus in keyboard mode.
3411
+ * @param x
3412
+ * @param y
3413
+ * @param keyboard_tooltip
3414
+ * @param tooltip
3415
+ */
3416
+ vfunc_query_tooltip(x: number, y: number, keyboard_tooltip: boolean, tooltip: Gtk.Tooltip): boolean;
3417
+ /**
3418
+ * Creates the GDK resources associated with a widget.
3419
+ *
3420
+ * Normally realization happens implicitly; if you show a widget
3421
+ * and all its parent containers, then the widget will be realized
3422
+ * and mapped automatically.
3423
+ *
3424
+ * Realizing a widget requires all the widget’s parent widgets to be
3425
+ * realized; calling this function realizes the widget’s parents
3426
+ * in addition to `widget` itself. If a widget is not yet inside a
3427
+ * toplevel window when you realize it, bad things will happen.
3428
+ *
3429
+ * This function is primarily used in widget implementations, and
3430
+ * isn’t very useful otherwise. Many times when you think you might
3431
+ * need it, a better approach is to connect to a signal that will be
3432
+ * called after the widget is realized automatically, such as
3433
+ * [signal`Gtk`.Widget::realize].
3434
+ */
3435
+ vfunc_realize(): void;
3436
+ /**
3437
+ * Called when the widget gets added to a `GtkRoot` widget. Must
3438
+ * chain up
3439
+ */
3440
+ vfunc_root(): void;
3441
+ /**
3442
+ * Set `child` as the current focus child of `widget`.
3443
+ *
3444
+ * This function is only suitable for widget implementations.
3445
+ * If you want a certain widget to get the input focus, call
3446
+ * [method`Gtk`.Widget.grab_focus] on it.
3447
+ * @param child a direct child widget of @widget or %NULL to unset the focus child of @widget
3448
+ */
3449
+ vfunc_set_focus_child(child?: Gtk.Widget | null): void;
3450
+ /**
3451
+ * Flags a widget to be displayed.
3452
+ *
3453
+ * Any widget that isn’t shown will not appear on the screen.
3454
+ *
3455
+ * Remember that you have to show the containers containing a widget,
3456
+ * in addition to the widget itself, before it will appear onscreen.
3457
+ *
3458
+ * When a toplevel container is shown, it is immediately realized and
3459
+ * mapped; other shown widgets are realized and mapped when their
3460
+ * toplevel container is realized and mapped.
3461
+ */
3462
+ vfunc_show(): void;
3463
+ /**
3464
+ * Called to set the allocation, if the widget does
3465
+ * not have a layout manager.
3466
+ * @param width
3467
+ * @param height
3468
+ * @param baseline
3469
+ */
3470
+ vfunc_size_allocate(width: number, height: number, baseline: number): void;
3471
+ /**
3472
+ * Vfunc called when a new snapshot of the widget has to be taken.
3473
+ * @param snapshot
3474
+ */
3475
+ vfunc_snapshot(snapshot: Gtk.Snapshot): void;
3476
+ /**
3477
+ * Signal emitted when the widget state changes,
3478
+ * see gtk_widget_get_state_flags().
3479
+ * @param previous_state_flags
3480
+ */
3481
+ vfunc_state_flags_changed(previous_state_flags: Gtk.StateFlags): void;
3482
+ /**
3483
+ * Emitted when a system setting was changed. Must chain up.
3484
+ * @param settings
3485
+ */
3486
+ vfunc_system_setting_changed(settings: Gtk.SystemSetting): void;
3487
+ /**
3488
+ * Causes a widget to be unmapped if it’s currently mapped.
3489
+ *
3490
+ * This function is only for use in widget implementations.
3491
+ */
3492
+ vfunc_unmap(): void;
3493
+ /**
3494
+ * Causes a widget to be unrealized (frees all GDK resources
3495
+ * associated with the widget).
3496
+ *
3497
+ * This function is only useful in widget implementations.
3498
+ */
3499
+ vfunc_unrealize(): void;
3500
+ /**
3501
+ * Called when the widget is about to be removed from its
3502
+ * `GtkRoot` widget. Must chain up
3503
+ */
3504
+ vfunc_unroot(): void;
3505
+ }
3506
+
3507
+ module PluginSettingsList {
3508
+ // Constructor properties interface
3509
+
3510
+ interface ConstructorProps
3511
+ extends Gtk.Box.ConstructorProps,
3512
+ Gtk.Accessible.ConstructorProps,
3513
+ Gtk.Buildable.ConstructorProps,
3514
+ Gtk.ConstraintTarget.ConstructorProps,
3515
+ Gtk.Orientable.ConstructorProps {
3516
+ settings: Gio.Settings;
3517
+ }
3518
+ }
3519
+
3520
+ /**
3521
+ * A [class`Gtk`.ListBox] widget that displays all the settings from a plugin.
3522
+ */
3523
+ class PluginSettingsList
3524
+ extends Gtk.Box
3525
+ implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable
3526
+ {
3527
+ static $gtype: GObject.GType<PluginSettingsList>;
3528
+
3529
+ // Own properties of GPluginGtk4.PluginSettingsList
3530
+
3531
+ /**
3532
+ * The [class`Gio`.Settings] to display.
3533
+ */
3534
+ get settings(): Gio.Settings;
3535
+ set settings(val: Gio.Settings);
3536
+
3537
+ // Constructors of GPluginGtk4.PluginSettingsList
3538
+
3539
+ constructor(properties?: Partial<PluginSettingsList.ConstructorProps>, ...args: any[]);
3540
+
3541
+ _init(...args: any[]): void;
3542
+
3543
+ static ['new'](): PluginSettingsList;
3544
+
3545
+ // Own methods of GPluginGtk4.PluginSettingsList
3546
+
3547
+ /**
3548
+ * Returns the plugin settings that are being displayed.
3549
+ * @returns The settings being displayed.
3550
+ */
3551
+ get_settings(): Gio.Settings;
3552
+ // Conflicted with Gtk.Widget.get_settings
3553
+ get_settings(...args: never[]): any;
3554
+ /**
3555
+ * This function will set which plugin settings to display.
3556
+ * @param settings The plugin settings to display.
3557
+ */
3558
+ set_settings(settings?: Gio.Settings | null): void;
3559
+
3560
+ // Inherited properties
3561
+ /**
3562
+ * The orientation of the orientable.
3563
+ */
3564
+ get orientation(): Gtk.Orientation;
3565
+ set orientation(val: Gtk.Orientation);
3566
+
3567
+ // Inherited methods
3568
+ /**
3569
+ * Retrieves the orientation of the `orientable`.
3570
+ * @returns the orientation of the @orientable
3571
+ */
3572
+ get_orientation(): Gtk.Orientation;
3573
+ /**
3574
+ * Sets the orientation of the `orientable`.
3575
+ * @param orientation the orientable’s new orientation
3576
+ */
3577
+ set_orientation(orientation: Gtk.Orientation): void;
3578
+ /**
3579
+ * Creates a binding between `source_property` on `source` and `target_property`
3580
+ * on `target`.
3581
+ *
3582
+ * Whenever the `source_property` is changed the `target_property` is
3583
+ * updated using the same value. For instance:
3584
+ *
3585
+ *
3586
+ * ```c
3587
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
3588
+ * ```
3589
+ *
3590
+ *
3591
+ * Will result in the "sensitive" property of the widget #GObject instance to be
3592
+ * updated with the same value of the "active" property of the action #GObject
3593
+ * instance.
3594
+ *
3595
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
3596
+ * if `target_property` on `target` changes then the `source_property` on `source`
3597
+ * will be updated as well.
3598
+ *
3599
+ * The binding will automatically be removed when either the `source` or the
3600
+ * `target` instances are finalized. To remove the binding without affecting the
3601
+ * `source` and the `target` you can just call g_object_unref() on the returned
3602
+ * #GBinding instance.
3603
+ *
3604
+ * Removing the binding by calling g_object_unref() on it must only be done if
3605
+ * the binding, `source` and `target` are only used from a single thread and it
3606
+ * is clear that both `source` and `target` outlive the binding. Especially it
3607
+ * is not safe to rely on this if the binding, `source` or `target` can be
3608
+ * finalized from different threads. Keep another reference to the binding and
3609
+ * use g_binding_unbind() instead to be on the safe side.
3610
+ *
3611
+ * A #GObject can have multiple bindings.
3612
+ * @param source_property the property on @source to bind
3613
+ * @param target the target #GObject
3614
+ * @param target_property the property on @target to bind
3615
+ * @param flags flags to pass to #GBinding
3616
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
3617
+ */
3618
+ bind_property(
3619
+ source_property: string,
3620
+ target: GObject.Object,
3621
+ target_property: string,
3622
+ flags: GObject.BindingFlags,
3623
+ ): GObject.Binding;
3624
+ /**
3625
+ * Complete version of g_object_bind_property().
3626
+ *
3627
+ * Creates a binding between `source_property` on `source` and `target_property`
3628
+ * on `target,` allowing you to set the transformation functions to be used by
3629
+ * the binding.
3630
+ *
3631
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
3632
+ * if `target_property` on `target` changes then the `source_property` on `source`
3633
+ * will be updated as well. The `transform_from` function is only used in case
3634
+ * of bidirectional bindings, otherwise it will be ignored
3635
+ *
3636
+ * The binding will automatically be removed when either the `source` or the
3637
+ * `target` instances are finalized. This will release the reference that is
3638
+ * being held on the #GBinding instance; if you want to hold on to the
3639
+ * #GBinding instance, you will need to hold a reference to it.
3640
+ *
3641
+ * To remove the binding, call g_binding_unbind().
3642
+ *
3643
+ * A #GObject can have multiple bindings.
3644
+ *
3645
+ * The same `user_data` parameter will be used for both `transform_to`
3646
+ * and `transform_from` transformation functions; the `notify` function will
3647
+ * be called once, when the binding is removed. If you need different data
3648
+ * for each transformation function, please use
3649
+ * g_object_bind_property_with_closures() instead.
3650
+ * @param source_property the property on @source to bind
3651
+ * @param target the target #GObject
3652
+ * @param target_property the property on @target to bind
3653
+ * @param flags flags to pass to #GBinding
3654
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
3655
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
3656
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
3657
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
3658
+ */
3659
+ bind_property_full(
3660
+ source_property: string,
3661
+ target: GObject.Object,
3662
+ target_property: string,
3663
+ flags: GObject.BindingFlags,
3664
+ transform_to?: GObject.BindingTransformFunc | null,
3665
+ transform_from?: GObject.BindingTransformFunc | null,
3666
+ notify?: GLib.DestroyNotify | null,
3667
+ ): GObject.Binding;
3668
+ // Conflicted with GObject.Object.bind_property_full
3669
+ bind_property_full(...args: never[]): any;
3670
+ /**
3671
+ * This function is intended for #GObject implementations to re-enforce
3672
+ * a [floating][floating-ref] object reference. Doing this is seldom
3673
+ * required: all #GInitiallyUnowneds are created with a floating reference
3674
+ * which usually just needs to be sunken by calling g_object_ref_sink().
3675
+ */
3676
+ force_floating(): void;
3677
+ /**
3678
+ * Increases the freeze count on `object`. If the freeze count is
3679
+ * non-zero, the emission of "notify" signals on `object` is
3680
+ * stopped. The signals are queued until the freeze count is decreased
3681
+ * to zero. Duplicate notifications are squashed so that at most one
3682
+ * #GObject::notify signal is emitted for each property modified while the
3683
+ * object is frozen.
3684
+ *
3685
+ * This is necessary for accessors that modify multiple properties to prevent
3686
+ * premature notification while the object is still being modified.
3687
+ */
3688
+ freeze_notify(): void;
3689
+ /**
3690
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
3691
+ * @param key name of the key for that association
3692
+ * @returns the data if found, or %NULL if no such data exists.
3693
+ */
3694
+ get_data(key: string): any | null;
3695
+ get_property(property_name: string): any;
3696
+ /**
3697
+ * This function gets back user data pointers stored via
3698
+ * g_object_set_qdata().
3699
+ * @param quark A #GQuark, naming the user data pointer
3700
+ * @returns The user data pointer set, or %NULL
3701
+ */
3702
+ get_qdata(quark: GLib.Quark): any | null;
3703
+ /**
3704
+ * Gets `n_properties` properties for an `object`.
3705
+ * Obtained properties will be set to `values`. All properties must be valid.
3706
+ * Warnings will be emitted and undefined behaviour may result if invalid
3707
+ * properties are passed in.
3708
+ * @param names the names of each property to get
3709
+ * @param values the values of each property to get
3710
+ */
3711
+ getv(names: string[], values: (GObject.Value | any)[]): void;
3712
+ /**
3713
+ * Checks whether `object` has a [floating][floating-ref] reference.
3714
+ * @returns %TRUE if @object has a floating reference
3715
+ */
3716
+ is_floating(): boolean;
3717
+ /**
3718
+ * Emits a "notify" signal for the property `property_name` on `object`.
3719
+ *
3720
+ * When possible, eg. when signaling a property change from within the class
3721
+ * that registered the property, you should use g_object_notify_by_pspec()
3722
+ * instead.
3723
+ *
3724
+ * Note that emission of the notify signal may be blocked with
3725
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
3726
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
3727
+ * called.
3728
+ * @param property_name the name of a property installed on the class of @object.
3729
+ */
3730
+ notify(property_name: string): void;
3731
+ /**
3732
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
3733
+ *
3734
+ * This function omits the property name lookup, hence it is faster than
3735
+ * g_object_notify().
3736
+ *
3737
+ * One way to avoid using g_object_notify() from within the
3738
+ * class that registered the properties, and using g_object_notify_by_pspec()
3739
+ * instead, is to store the GParamSpec used with
3740
+ * g_object_class_install_property() inside a static array, e.g.:
3741
+ *
3742
+ *
3743
+ * ```c
3744
+ * typedef enum
3745
+ * {
3746
+ * PROP_FOO = 1,
3747
+ * PROP_LAST
3748
+ * } MyObjectProperty;
3749
+ *
3750
+ * static GParamSpec *properties[PROP_LAST];
3751
+ *
3752
+ * static void
3753
+ * my_object_class_init (MyObjectClass *klass)
3754
+ * {
3755
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
3756
+ * 0, 100,
3757
+ * 50,
3758
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
3759
+ * g_object_class_install_property (gobject_class,
3760
+ * PROP_FOO,
3761
+ * properties[PROP_FOO]);
3762
+ * }
3763
+ * ```
3764
+ *
3765
+ *
3766
+ * and then notify a change on the "foo" property with:
3767
+ *
3768
+ *
3769
+ * ```c
3770
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
3771
+ * ```
3772
+ *
3773
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
3774
+ */
3775
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
3776
+ /**
3777
+ * Increases the reference count of `object`.
3778
+ *
3779
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
3780
+ * of `object` will be propagated to the return type (using the GCC typeof()
3781
+ * extension), so any casting the caller needs to do on the return type must be
3782
+ * explicit.
3783
+ * @returns the same @object
3784
+ */
3785
+ ref(): GObject.Object;
3786
+ /**
3787
+ * Increase the reference count of `object,` and possibly remove the
3788
+ * [floating][floating-ref] reference, if `object` has a floating reference.
3789
+ *
3790
+ * In other words, if the object is floating, then this call "assumes
3791
+ * ownership" of the floating reference, converting it to a normal
3792
+ * reference by clearing the floating flag while leaving the reference
3793
+ * count unchanged. If the object is not floating, then this call
3794
+ * adds a new normal reference increasing the reference count by one.
3795
+ *
3796
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
3797
+ * under the same conditions as for g_object_ref().
3798
+ * @returns @object
3799
+ */
3800
+ ref_sink(): GObject.Object;
3801
+ /**
3802
+ * Releases all references to other objects. This can be used to break
3803
+ * reference cycles.
3804
+ *
3805
+ * This function should only be called from object system implementations.
3806
+ */
3807
+ run_dispose(): void;
3808
+ /**
3809
+ * Each object carries around a table of associations from
3810
+ * strings to pointers. This function lets you set an association.
3811
+ *
3812
+ * If the object already had an association with that name,
3813
+ * the old association will be destroyed.
3814
+ *
3815
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
3816
+ * This means a copy of `key` is kept permanently (even after `object` has been
3817
+ * finalized) — so it is recommended to only use a small, bounded set of values
3818
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
3819
+ * @param key name of the key
3820
+ * @param data data to associate with that key
3821
+ */
3822
+ set_data(key: string, data?: any | null): void;
3823
+ set_property(property_name: string, value: any): void;
3824
+ /**
3825
+ * Remove a specified datum from the object's data associations,
3826
+ * without invoking the association's destroy handler.
3827
+ * @param key name of the key
3828
+ * @returns the data if found, or %NULL if no such data exists.
3829
+ */
3830
+ steal_data(key: string): any | null;
3831
+ /**
3832
+ * This function gets back user data pointers stored via
3833
+ * g_object_set_qdata() and removes the `data` from object
3834
+ * without invoking its destroy() function (if any was
3835
+ * set).
3836
+ * Usually, calling this function is only required to update
3837
+ * user data pointers with a destroy notifier, for example:
3838
+ *
3839
+ * ```c
3840
+ * void
3841
+ * object_add_to_user_list (GObject *object,
3842
+ * const gchar *new_string)
3843
+ * {
3844
+ * // the quark, naming the object data
3845
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
3846
+ * // retrieve the old string list
3847
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
3848
+ *
3849
+ * // prepend new string
3850
+ * list = g_list_prepend (list, g_strdup (new_string));
3851
+ * // this changed 'list', so we need to set it again
3852
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
3853
+ * }
3854
+ * static void
3855
+ * free_string_list (gpointer data)
3856
+ * {
3857
+ * GList *node, *list = data;
3858
+ *
3859
+ * for (node = list; node; node = node->next)
3860
+ * g_free (node->data);
3861
+ * g_list_free (list);
3862
+ * }
3863
+ * ```
3864
+ *
3865
+ * Using g_object_get_qdata() in the above example, instead of
3866
+ * g_object_steal_qdata() would have left the destroy function set,
3867
+ * and thus the partial string list would have been freed upon
3868
+ * g_object_set_qdata_full().
3869
+ * @param quark A #GQuark, naming the user data pointer
3870
+ * @returns The user data pointer set, or %NULL
3871
+ */
3872
+ steal_qdata(quark: GLib.Quark): any | null;
3873
+ /**
3874
+ * Reverts the effect of a previous call to
3875
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
3876
+ * and when it reaches zero, queued "notify" signals are emitted.
3877
+ *
3878
+ * Duplicate notifications for each property are squashed so that at most one
3879
+ * #GObject::notify signal is emitted for each property, in the reverse order
3880
+ * in which they have been queued.
3881
+ *
3882
+ * It is an error to call this function when the freeze count is zero.
3883
+ */
3884
+ thaw_notify(): void;
3885
+ /**
3886
+ * Decreases the reference count of `object`. When its reference count
3887
+ * drops to 0, the object is finalized (i.e. its memory is freed).
3888
+ *
3889
+ * If the pointer to the #GObject may be reused in future (for example, if it is
3890
+ * an instance variable of another object), it is recommended to clear the
3891
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
3892
+ * invalid #GObject instance. Use g_clear_object() for this.
3893
+ */
3894
+ unref(): void;
3895
+ /**
3896
+ * This function essentially limits the life time of the `closure` to
3897
+ * the life time of the object. That is, when the object is finalized,
3898
+ * the `closure` is invalidated by calling g_closure_invalidate() on
3899
+ * it, in order to prevent invocations of the closure with a finalized
3900
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
3901
+ * added as marshal guards to the `closure,` to ensure that an extra
3902
+ * reference count is held on `object` during invocation of the
3903
+ * `closure`. Usually, this function will be called on closures that
3904
+ * use this `object` as closure data.
3905
+ * @param closure #GClosure to watch
3906
+ */
3907
+ watch_closure(closure: GObject.Closure): void;
3908
+ vfunc_constructed(): void;
3909
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
3910
+ vfunc_dispose(): void;
3911
+ vfunc_finalize(): void;
3912
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
3913
+ /**
3914
+ * Emits a "notify" signal for the property `property_name` on `object`.
3915
+ *
3916
+ * When possible, eg. when signaling a property change from within the class
3917
+ * that registered the property, you should use g_object_notify_by_pspec()
3918
+ * instead.
3919
+ *
3920
+ * Note that emission of the notify signal may be blocked with
3921
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
3922
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
3923
+ * called.
3924
+ * @param pspec
3925
+ */
3926
+ vfunc_notify(pspec: GObject.ParamSpec): void;
3927
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
3928
+ disconnect(id: number): void;
3929
+ set(properties: { [key: string]: any }): void;
3930
+ block_signal_handler(id: number): any;
3931
+ unblock_signal_handler(id: number): any;
3932
+ stop_emission_by_name(detailedName: string): any;
3933
+ }
3934
+
3935
+ module View {
3936
+ // Constructor properties interface
3937
+
3938
+ interface ConstructorProps
3939
+ extends Gtk.Box.ConstructorProps,
3940
+ Gtk.Accessible.ConstructorProps,
3941
+ Gtk.Buildable.ConstructorProps,
3942
+ Gtk.ConstraintTarget.ConstructorProps,
3943
+ Gtk.Orientable.ConstructorProps {
3944
+ manager: GPlugin.Manager;
3945
+ settings_backend: Gio.SettingsBackend;
3946
+ settingsBackend: Gio.SettingsBackend;
3947
+ show_internal: boolean;
3948
+ showInternal: boolean;
3949
+ }
3950
+ }
3951
+
3952
+ /**
3953
+ * A widget that displays all the plugins and some basic information about
3954
+ * them.
3955
+ */
3956
+ class View extends Gtk.Box implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable {
3957
+ static $gtype: GObject.GType<View>;
3958
+
3959
+ // Own properties of GPluginGtk4.View
3960
+
3961
+ /**
3962
+ * The plugin manager to display.
3963
+ */
3964
+ get manager(): GPlugin.Manager;
3965
+ set manager(val: GPlugin.Manager);
3966
+ /**
3967
+ * The [class`Gio`.SettingsBackend] to use when viewing plugin settings.
3968
+ */
3969
+ get settings_backend(): Gio.SettingsBackend;
3970
+ set settings_backend(val: Gio.SettingsBackend);
3971
+ /**
3972
+ * The [class`Gio`.SettingsBackend] to use when viewing plugin settings.
3973
+ */
3974
+ get settingsBackend(): Gio.SettingsBackend;
3975
+ set settingsBackend(val: Gio.SettingsBackend);
3976
+ /**
3977
+ * Whether or not to show internal plugins.
3978
+ */
3979
+ get show_internal(): boolean;
3980
+ set show_internal(val: boolean);
3981
+ /**
3982
+ * Whether or not to show internal plugins.
3983
+ */
3984
+ get showInternal(): boolean;
3985
+ set showInternal(val: boolean);
3986
+
3987
+ // Constructors of GPluginGtk4.View
3988
+
3989
+ constructor(properties?: Partial<View.ConstructorProps>, ...args: any[]);
3990
+
3991
+ _init(...args: any[]): void;
3992
+
3993
+ static ['new'](): View;
3994
+
3995
+ // Own methods of GPluginGtk4.View
3996
+
3997
+ /**
3998
+ * Returns the plugin manager that is being displayed.
3999
+ * @returns The plugin manager to display.
4000
+ */
4001
+ get_manager(): GPlugin.Manager;
4002
+ /**
4003
+ * Gets the settings backend used when displaying plugin settings.
4004
+ *
4005
+ * Note, because we do not want to leak `G_SETTINGS_ENABLE_BACKEND` into
4006
+ * GPlugin users, this function returns a `gpointer`, and you should cast to
4007
+ * `GSettingsBackend *` after setting `G_SETTINGS_ENABLE_BACKEND` for the files
4008
+ * where you need it.
4009
+ * @returns The settings backend.
4010
+ */
4011
+ get_settings_backend(): any | null;
4012
+ /**
4013
+ * Returns whether or not `view` is showing internal plugins.
4014
+ */
4015
+ get_show_internal(): boolean;
4016
+ /**
4017
+ * This function will set which plugin manager to display.
4018
+ * @param manager The plugin manager to display.
4019
+ */
4020
+ set_manager(manager: GPlugin.Manager): void;
4021
+ /**
4022
+ * Sets the settings backend to use when displaying plugin settings.
4023
+ *
4024
+ * Note, because we do not want to leak `G_SETTINGS_ENABLE_BACKEND` into
4025
+ * GPlugin users, this function takes a `gpointer` instead of a
4026
+ * `GSettingsBackend *` but the type will be checked internally.
4027
+ * @param backend The settings backend to use. If %NULL, the default GSettings backend will be used.
4028
+ */
4029
+ set_settings_backend(backend?: any | null): void;
4030
+ /**
4031
+ * This function will toggle whether or not the widget will show internal
4032
+ * plugins.
4033
+ * @param show_internal Whether or not to show internal plugins.
4034
+ */
4035
+ set_show_internal(show_internal: boolean): void;
4036
+ /**
4037
+ * Shows the plugin list overview.
4038
+ */
4039
+ show_overview(): void;
4040
+ /**
4041
+ * Shows a page for a single plugin.
4042
+ * @param plugin The plugin to show.
4043
+ */
4044
+ show_plugin(plugin: GPlugin.Plugin): void;
4045
+
4046
+ // Inherited properties
4047
+ /**
4048
+ * The orientation of the orientable.
4049
+ */
4050
+ get orientation(): Gtk.Orientation;
4051
+ set orientation(val: Gtk.Orientation);
4052
+
4053
+ // Inherited methods
4054
+ /**
4055
+ * Retrieves the orientation of the `orientable`.
4056
+ * @returns the orientation of the @orientable
4057
+ */
4058
+ get_orientation(): Gtk.Orientation;
4059
+ /**
4060
+ * Sets the orientation of the `orientable`.
4061
+ * @param orientation the orientable’s new orientation
4062
+ */
4063
+ set_orientation(orientation: Gtk.Orientation): void;
4064
+ /**
4065
+ * Creates a binding between `source_property` on `source` and `target_property`
4066
+ * on `target`.
4067
+ *
4068
+ * Whenever the `source_property` is changed the `target_property` is
4069
+ * updated using the same value. For instance:
4070
+ *
4071
+ *
4072
+ * ```c
4073
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
4074
+ * ```
4075
+ *
4076
+ *
4077
+ * Will result in the "sensitive" property of the widget #GObject instance to be
4078
+ * updated with the same value of the "active" property of the action #GObject
4079
+ * instance.
4080
+ *
4081
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
4082
+ * if `target_property` on `target` changes then the `source_property` on `source`
4083
+ * will be updated as well.
4084
+ *
4085
+ * The binding will automatically be removed when either the `source` or the
4086
+ * `target` instances are finalized. To remove the binding without affecting the
4087
+ * `source` and the `target` you can just call g_object_unref() on the returned
4088
+ * #GBinding instance.
4089
+ *
4090
+ * Removing the binding by calling g_object_unref() on it must only be done if
4091
+ * the binding, `source` and `target` are only used from a single thread and it
4092
+ * is clear that both `source` and `target` outlive the binding. Especially it
4093
+ * is not safe to rely on this if the binding, `source` or `target` can be
4094
+ * finalized from different threads. Keep another reference to the binding and
4095
+ * use g_binding_unbind() instead to be on the safe side.
4096
+ *
4097
+ * A #GObject can have multiple bindings.
4098
+ * @param source_property the property on @source to bind
4099
+ * @param target the target #GObject
4100
+ * @param target_property the property on @target to bind
4101
+ * @param flags flags to pass to #GBinding
4102
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
4103
+ */
4104
+ bind_property(
4105
+ source_property: string,
4106
+ target: GObject.Object,
4107
+ target_property: string,
4108
+ flags: GObject.BindingFlags,
4109
+ ): GObject.Binding;
4110
+ /**
4111
+ * Complete version of g_object_bind_property().
4112
+ *
4113
+ * Creates a binding between `source_property` on `source` and `target_property`
4114
+ * on `target,` allowing you to set the transformation functions to be used by
4115
+ * the binding.
4116
+ *
4117
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
4118
+ * if `target_property` on `target` changes then the `source_property` on `source`
4119
+ * will be updated as well. The `transform_from` function is only used in case
4120
+ * of bidirectional bindings, otherwise it will be ignored
4121
+ *
4122
+ * The binding will automatically be removed when either the `source` or the
4123
+ * `target` instances are finalized. This will release the reference that is
4124
+ * being held on the #GBinding instance; if you want to hold on to the
4125
+ * #GBinding instance, you will need to hold a reference to it.
4126
+ *
4127
+ * To remove the binding, call g_binding_unbind().
4128
+ *
4129
+ * A #GObject can have multiple bindings.
4130
+ *
4131
+ * The same `user_data` parameter will be used for both `transform_to`
4132
+ * and `transform_from` transformation functions; the `notify` function will
4133
+ * be called once, when the binding is removed. If you need different data
4134
+ * for each transformation function, please use
4135
+ * g_object_bind_property_with_closures() instead.
4136
+ * @param source_property the property on @source to bind
4137
+ * @param target the target #GObject
4138
+ * @param target_property the property on @target to bind
4139
+ * @param flags flags to pass to #GBinding
4140
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
4141
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
4142
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
4143
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
4144
+ */
4145
+ bind_property_full(
4146
+ source_property: string,
4147
+ target: GObject.Object,
4148
+ target_property: string,
4149
+ flags: GObject.BindingFlags,
4150
+ transform_to?: GObject.BindingTransformFunc | null,
4151
+ transform_from?: GObject.BindingTransformFunc | null,
4152
+ notify?: GLib.DestroyNotify | null,
4153
+ ): GObject.Binding;
4154
+ // Conflicted with GObject.Object.bind_property_full
4155
+ bind_property_full(...args: never[]): any;
4156
+ /**
4157
+ * This function is intended for #GObject implementations to re-enforce
4158
+ * a [floating][floating-ref] object reference. Doing this is seldom
4159
+ * required: all #GInitiallyUnowneds are created with a floating reference
4160
+ * which usually just needs to be sunken by calling g_object_ref_sink().
4161
+ */
4162
+ force_floating(): void;
4163
+ /**
4164
+ * Increases the freeze count on `object`. If the freeze count is
4165
+ * non-zero, the emission of "notify" signals on `object` is
4166
+ * stopped. The signals are queued until the freeze count is decreased
4167
+ * to zero. Duplicate notifications are squashed so that at most one
4168
+ * #GObject::notify signal is emitted for each property modified while the
4169
+ * object is frozen.
4170
+ *
4171
+ * This is necessary for accessors that modify multiple properties to prevent
4172
+ * premature notification while the object is still being modified.
4173
+ */
4174
+ freeze_notify(): void;
4175
+ /**
4176
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
4177
+ * @param key name of the key for that association
4178
+ * @returns the data if found, or %NULL if no such data exists.
4179
+ */
4180
+ get_data(key: string): any | null;
4181
+ get_property(property_name: string): any;
4182
+ /**
4183
+ * This function gets back user data pointers stored via
4184
+ * g_object_set_qdata().
4185
+ * @param quark A #GQuark, naming the user data pointer
4186
+ * @returns The user data pointer set, or %NULL
4187
+ */
4188
+ get_qdata(quark: GLib.Quark): any | null;
4189
+ /**
4190
+ * Gets `n_properties` properties for an `object`.
4191
+ * Obtained properties will be set to `values`. All properties must be valid.
4192
+ * Warnings will be emitted and undefined behaviour may result if invalid
4193
+ * properties are passed in.
4194
+ * @param names the names of each property to get
4195
+ * @param values the values of each property to get
4196
+ */
4197
+ getv(names: string[], values: (GObject.Value | any)[]): void;
4198
+ /**
4199
+ * Checks whether `object` has a [floating][floating-ref] reference.
4200
+ * @returns %TRUE if @object has a floating reference
4201
+ */
4202
+ is_floating(): boolean;
4203
+ /**
4204
+ * Emits a "notify" signal for the property `property_name` on `object`.
4205
+ *
4206
+ * When possible, eg. when signaling a property change from within the class
4207
+ * that registered the property, you should use g_object_notify_by_pspec()
4208
+ * instead.
4209
+ *
4210
+ * Note that emission of the notify signal may be blocked with
4211
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
4212
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
4213
+ * called.
4214
+ * @param property_name the name of a property installed on the class of @object.
4215
+ */
4216
+ notify(property_name: string): void;
4217
+ /**
4218
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
4219
+ *
4220
+ * This function omits the property name lookup, hence it is faster than
4221
+ * g_object_notify().
4222
+ *
4223
+ * One way to avoid using g_object_notify() from within the
4224
+ * class that registered the properties, and using g_object_notify_by_pspec()
4225
+ * instead, is to store the GParamSpec used with
4226
+ * g_object_class_install_property() inside a static array, e.g.:
4227
+ *
4228
+ *
4229
+ * ```c
4230
+ * typedef enum
4231
+ * {
4232
+ * PROP_FOO = 1,
4233
+ * PROP_LAST
4234
+ * } MyObjectProperty;
4235
+ *
4236
+ * static GParamSpec *properties[PROP_LAST];
4237
+ *
4238
+ * static void
4239
+ * my_object_class_init (MyObjectClass *klass)
4240
+ * {
4241
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
4242
+ * 0, 100,
4243
+ * 50,
4244
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
4245
+ * g_object_class_install_property (gobject_class,
4246
+ * PROP_FOO,
4247
+ * properties[PROP_FOO]);
4248
+ * }
4249
+ * ```
4250
+ *
4251
+ *
4252
+ * and then notify a change on the "foo" property with:
4253
+ *
4254
+ *
4255
+ * ```c
4256
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
4257
+ * ```
4258
+ *
4259
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
4260
+ */
4261
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
4262
+ /**
4263
+ * Increases the reference count of `object`.
4264
+ *
4265
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
4266
+ * of `object` will be propagated to the return type (using the GCC typeof()
4267
+ * extension), so any casting the caller needs to do on the return type must be
4268
+ * explicit.
4269
+ * @returns the same @object
4270
+ */
4271
+ ref(): GObject.Object;
4272
+ /**
4273
+ * Increase the reference count of `object,` and possibly remove the
4274
+ * [floating][floating-ref] reference, if `object` has a floating reference.
4275
+ *
4276
+ * In other words, if the object is floating, then this call "assumes
4277
+ * ownership" of the floating reference, converting it to a normal
4278
+ * reference by clearing the floating flag while leaving the reference
4279
+ * count unchanged. If the object is not floating, then this call
4280
+ * adds a new normal reference increasing the reference count by one.
4281
+ *
4282
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
4283
+ * under the same conditions as for g_object_ref().
4284
+ * @returns @object
4285
+ */
4286
+ ref_sink(): GObject.Object;
4287
+ /**
4288
+ * Releases all references to other objects. This can be used to break
4289
+ * reference cycles.
4290
+ *
4291
+ * This function should only be called from object system implementations.
4292
+ */
4293
+ run_dispose(): void;
4294
+ /**
4295
+ * Each object carries around a table of associations from
4296
+ * strings to pointers. This function lets you set an association.
4297
+ *
4298
+ * If the object already had an association with that name,
4299
+ * the old association will be destroyed.
4300
+ *
4301
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
4302
+ * This means a copy of `key` is kept permanently (even after `object` has been
4303
+ * finalized) — so it is recommended to only use a small, bounded set of values
4304
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
4305
+ * @param key name of the key
4306
+ * @param data data to associate with that key
4307
+ */
4308
+ set_data(key: string, data?: any | null): void;
4309
+ set_property(property_name: string, value: any): void;
4310
+ /**
4311
+ * Remove a specified datum from the object's data associations,
4312
+ * without invoking the association's destroy handler.
4313
+ * @param key name of the key
4314
+ * @returns the data if found, or %NULL if no such data exists.
4315
+ */
4316
+ steal_data(key: string): any | null;
4317
+ /**
4318
+ * This function gets back user data pointers stored via
4319
+ * g_object_set_qdata() and removes the `data` from object
4320
+ * without invoking its destroy() function (if any was
4321
+ * set).
4322
+ * Usually, calling this function is only required to update
4323
+ * user data pointers with a destroy notifier, for example:
4324
+ *
4325
+ * ```c
4326
+ * void
4327
+ * object_add_to_user_list (GObject *object,
4328
+ * const gchar *new_string)
4329
+ * {
4330
+ * // the quark, naming the object data
4331
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
4332
+ * // retrieve the old string list
4333
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
4334
+ *
4335
+ * // prepend new string
4336
+ * list = g_list_prepend (list, g_strdup (new_string));
4337
+ * // this changed 'list', so we need to set it again
4338
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
4339
+ * }
4340
+ * static void
4341
+ * free_string_list (gpointer data)
4342
+ * {
4343
+ * GList *node, *list = data;
4344
+ *
4345
+ * for (node = list; node; node = node->next)
4346
+ * g_free (node->data);
4347
+ * g_list_free (list);
4348
+ * }
4349
+ * ```
4350
+ *
4351
+ * Using g_object_get_qdata() in the above example, instead of
4352
+ * g_object_steal_qdata() would have left the destroy function set,
4353
+ * and thus the partial string list would have been freed upon
4354
+ * g_object_set_qdata_full().
4355
+ * @param quark A #GQuark, naming the user data pointer
4356
+ * @returns The user data pointer set, or %NULL
4357
+ */
4358
+ steal_qdata(quark: GLib.Quark): any | null;
4359
+ /**
4360
+ * Reverts the effect of a previous call to
4361
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
4362
+ * and when it reaches zero, queued "notify" signals are emitted.
4363
+ *
4364
+ * Duplicate notifications for each property are squashed so that at most one
4365
+ * #GObject::notify signal is emitted for each property, in the reverse order
4366
+ * in which they have been queued.
4367
+ *
4368
+ * It is an error to call this function when the freeze count is zero.
4369
+ */
4370
+ thaw_notify(): void;
4371
+ /**
4372
+ * Decreases the reference count of `object`. When its reference count
4373
+ * drops to 0, the object is finalized (i.e. its memory is freed).
4374
+ *
4375
+ * If the pointer to the #GObject may be reused in future (for example, if it is
4376
+ * an instance variable of another object), it is recommended to clear the
4377
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
4378
+ * invalid #GObject instance. Use g_clear_object() for this.
4379
+ */
4380
+ unref(): void;
4381
+ /**
4382
+ * This function essentially limits the life time of the `closure` to
4383
+ * the life time of the object. That is, when the object is finalized,
4384
+ * the `closure` is invalidated by calling g_closure_invalidate() on
4385
+ * it, in order to prevent invocations of the closure with a finalized
4386
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
4387
+ * added as marshal guards to the `closure,` to ensure that an extra
4388
+ * reference count is held on `object` during invocation of the
4389
+ * `closure`. Usually, this function will be called on closures that
4390
+ * use this `object` as closure data.
4391
+ * @param closure #GClosure to watch
4392
+ */
4393
+ watch_closure(closure: GObject.Closure): void;
4394
+ vfunc_constructed(): void;
4395
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
4396
+ vfunc_dispose(): void;
4397
+ vfunc_finalize(): void;
4398
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
4399
+ /**
4400
+ * Emits a "notify" signal for the property `property_name` on `object`.
4401
+ *
4402
+ * When possible, eg. when signaling a property change from within the class
4403
+ * that registered the property, you should use g_object_notify_by_pspec()
4404
+ * instead.
4405
+ *
4406
+ * Note that emission of the notify signal may be blocked with
4407
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
4408
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
4409
+ * called.
4410
+ * @param pspec
4411
+ */
4412
+ vfunc_notify(pspec: GObject.ParamSpec): void;
4413
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
4414
+ disconnect(id: number): void;
4415
+ set(properties: { [key: string]: any }): void;
4416
+ block_signal_handler(id: number): any;
4417
+ unblock_signal_handler(id: number): any;
4418
+ stop_emission_by_name(detailedName: string): any;
4419
+ }
4420
+
4421
+ type PluginPageClass = typeof PluginPage;
4422
+ type PluginRowClass = typeof PluginRow;
4423
+ type PluginSettingsListClass = typeof PluginSettingsList;
4424
+ type ViewClass = typeof View;
4425
+ /**
4426
+ * Name of the imported GIR library
4427
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
4428
+ */
4429
+ const __name__: string;
4430
+ /**
4431
+ * Version of the imported GIR library
4432
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
4433
+ */
4434
+ const __version__: string;
4435
+ }
4436
+
4437
+ export default GPluginGtk4;
4438
+ // END