@girs/nma-1.0 1.10.6-4.0.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/nma-1.0.d.ts ADDED
@@ -0,0 +1,3121 @@
1
+ /**
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ *
7
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ // Module dependencies
11
+ import type NM from '@girs/nm-1.0';
12
+ import type Gio from '@girs/gio-2.0';
13
+ import type GObject from '@girs/gobject-2.0';
14
+ import type GLib from '@girs/glib-2.0';
15
+ import type GModule from '@girs/gmodule-2.0';
16
+ import type Gtk from '@girs/gtk-3.0';
17
+ import type xlib from '@girs/xlib-2.0';
18
+ import type Gdk from '@girs/gdk-3.0';
19
+ import type cairo from '@girs/cairo-1.0';
20
+ import type Pango from '@girs/pango-1.0';
21
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
22
+ import type freetype2 from '@girs/freetype2-2.0';
23
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
24
+ import type Atk from '@girs/atk-1.0';
25
+
26
+ export namespace NMA {
27
+ /**
28
+ * NMA-1.0
29
+ */
30
+
31
+ /**
32
+ * Flags that controls what is the certificate chooser button able to pick.
33
+ * Currently only local files are supported, but might be extended to use URIs,
34
+ * such as PKCS\#11 certificate URIs in future as well.
35
+ */
36
+
37
+ /**
38
+ * Flags that controls what is the certificate chooser button able to pick.
39
+ * Currently only local files are supported, but might be extended to use URIs,
40
+ * such as PKCS\#11 certificate URIs in future as well.
41
+ */
42
+ export namespace CertChooserFlags {
43
+ export const $gtype: GObject.GType<CertChooserFlags>;
44
+ }
45
+
46
+ enum CertChooserFlags {
47
+ /**
48
+ * No flags
49
+ */
50
+ NONE,
51
+ /**
52
+ * Only pick a certificate, not a key
53
+ */
54
+ CERT,
55
+ /**
56
+ * Hide all controls but the secrets entries
57
+ */
58
+ PASSWORDS,
59
+ /**
60
+ * Ensure the chooser only selects regular PEM files
61
+ */
62
+ PEM,
63
+ /**
64
+ * Do not show password entries (Since: 1.8.34)
65
+ */
66
+ NO_PASSWORDS,
67
+ }
68
+
69
+ export namespace MobileFamily {
70
+ export const $gtype: GObject.GType<MobileFamily>;
71
+ }
72
+
73
+ enum MobileFamily {
74
+ /**
75
+ * Unknown or invalid network access method
76
+ */
77
+ UNKNOWN,
78
+ /**
79
+ * 3rd Generation Partnership Project (3GPP) network
80
+ */
81
+ '3GPP',
82
+ /**
83
+ * A CDMA network
84
+ */
85
+ CDMA,
86
+ }
87
+ const BAR_CODE_SIZE: string;
88
+ const BAR_CODE_TEXT: string;
89
+ const BAR_CODE_WIDGET_CONNECTION: string;
90
+ /**
91
+ * Evaluates to the major version number of NetworkManager which this source
92
+ * is compiled against.
93
+ */
94
+ const MAJOR_VERSION: number;
95
+ /**
96
+ * Evaluates to the micro version number of NetworkManager which this source
97
+ * compiled against.
98
+ */
99
+ const MICRO_VERSION: number;
100
+ /**
101
+ * Evaluates to the minor version number of NetworkManager which this source
102
+ * is compiled against.
103
+ */
104
+ const MINOR_VERSION: number;
105
+ /**
106
+ * Splits the input MCCMNC string into separate MCC and MNC strings.
107
+ * @param mccmnc input MCCMNC string.
108
+ * @returns %TRUE if correctly split and @mcc and @mnc are set; %FALSE otherwise.
109
+ */
110
+ function mobile_providers_split_3gpp_mcc_mnc(mccmnc: string): [boolean, string, string];
111
+ /**
112
+ * Returns secret flags corresponding to the selected password storage menu
113
+ * in the attached icon
114
+ * @param passwd_entry password #GtkEntry which the password icon/menu is attached to
115
+ * @returns secret flags corresponding to the active item in password menu
116
+ */
117
+ function utils_menu_to_secret_flags(passwd_entry: Gtk.Widget): NM.SettingSecretFlags;
118
+ /**
119
+ * Adds a secondary icon and creates a popup menu for password entry.
120
+ * The active menu item is set up according to initial_flags, or
121
+ * from `setting/``password_flags_name` (if they are not NULL).
122
+ * If the `setting/``password_flags_name` are not NULL, secret flags will
123
+ * be automatically updated in the setting when menu is changed.
124
+ * @param passwd_entry password #GtkEntry which the icon is attached to
125
+ * @param initial_flags initial secret flags to setup password menu from
126
+ * @param setting #NMSetting containing the password, or NULL
127
+ * @param password_flags_name name of the secret flags (like psk-flags), or NULL
128
+ * @param with_not_required whether to include "Not required" menu item
129
+ * @param ask_mode %TRUE if the entry is shown in ASK mode. That means, while prompting for a password, contrary to being inside the editor mode. If %TRUE, the entry should be sensivive on selected "always-ask" icon (this is e.f. for nm-applet asking for password), otherwise not. If %FALSE, it shall not be possible to select a different storage, because we only prompt for a password, we cannot change the password location.
130
+ */
131
+ function utils_setup_password_storage(
132
+ passwd_entry: Gtk.Widget,
133
+ initial_flags: NM.SettingSecretFlags,
134
+ setting: NM.Setting,
135
+ password_flags_name: string,
136
+ with_not_required: boolean,
137
+ ask_mode: boolean,
138
+ ): void;
139
+ /**
140
+ * Updates secret flags in the password storage popup menu and also
141
+ * in the `setting` (if `setting` and `password_flags_name` are not NULL).
142
+ * @param passwd_entry #GtkEntry with the password
143
+ * @param secret_flags secret flags to set
144
+ * @param setting #NMSetting containing the password, or NULL
145
+ * @param password_flags_name name of the secret flags (like psk-flags), or NULL
146
+ */
147
+ function utils_update_password_storage(
148
+ passwd_entry: Gtk.Widget,
149
+ secret_flags: NM.SettingSecretFlags,
150
+ setting: NM.Setting,
151
+ password_flags_name: string,
152
+ ): void;
153
+ interface MobileWizardCallback {
154
+ (self: MobileWizard, canceled: boolean, method: MobileWizardAccessMethod): void;
155
+ }
156
+ module BarCode {
157
+ // Constructor properties interface
158
+
159
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
160
+ size: number;
161
+ text: string;
162
+ }
163
+ }
164
+
165
+ class BarCode extends GObject.Object {
166
+ static $gtype: GObject.GType<BarCode>;
167
+
168
+ // Properties
169
+
170
+ get size(): number;
171
+ set text(val: string);
172
+
173
+ // Constructors
174
+
175
+ constructor(properties?: Partial<BarCode.ConstructorProps>, ...args: any[]);
176
+
177
+ _init(...args: any[]): void;
178
+
179
+ static ['new'](text: string): BarCode;
180
+
181
+ // Methods
182
+
183
+ /**
184
+ * Draws the QR code onto the given context.
185
+ * @param cr cairo context
186
+ */
187
+ draw(cr: cairo.Context): void;
188
+ get_size(): number;
189
+ /**
190
+ * Regenerates the QR code for a different text.
191
+ * @param text new bar code text
192
+ */
193
+ set_text(text: string): void;
194
+ }
195
+
196
+ module BarCodeWidget {
197
+ // Constructor properties interface
198
+
199
+ interface ConstructorProps
200
+ extends Gtk.Box.ConstructorProps,
201
+ Atk.ImplementorIface.ConstructorProps,
202
+ Gtk.Buildable.ConstructorProps,
203
+ Gtk.Orientable.ConstructorProps {
204
+ connection: NM.Connection;
205
+ }
206
+ }
207
+
208
+ class BarCodeWidget extends Gtk.Box implements Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable {
209
+ static $gtype: GObject.GType<BarCodeWidget>;
210
+
211
+ // Properties
212
+
213
+ get connection(): NM.Connection;
214
+ set connection(val: NM.Connection);
215
+
216
+ // Constructors
217
+
218
+ constructor(properties?: Partial<BarCodeWidget.ConstructorProps>, ...args: any[]);
219
+
220
+ _init(...args: any[]): void;
221
+
222
+ // Inherited properties
223
+ /**
224
+ * The orientation of the orientable.
225
+ */
226
+ get orientation(): Gtk.Orientation;
227
+ set orientation(val: Gtk.Orientation);
228
+
229
+ // Inherited methods
230
+ /**
231
+ * Retrieves the orientation of the `orientable`.
232
+ * @returns the orientation of the @orientable.
233
+ */
234
+ get_orientation(): Gtk.Orientation;
235
+ /**
236
+ * Sets the orientation of the `orientable`.
237
+ * @param orientation the orientable’s new orientation.
238
+ */
239
+ set_orientation(orientation: Gtk.Orientation): void;
240
+ /**
241
+ * Creates a binding between `source_property` on `source` and `target_property`
242
+ * on `target`.
243
+ *
244
+ * Whenever the `source_property` is changed the `target_property` is
245
+ * updated using the same value. For instance:
246
+ *
247
+ *
248
+ * ```c
249
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
250
+ * ```
251
+ *
252
+ *
253
+ * Will result in the "sensitive" property of the widget #GObject instance to be
254
+ * updated with the same value of the "active" property of the action #GObject
255
+ * instance.
256
+ *
257
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
258
+ * if `target_property` on `target` changes then the `source_property` on `source`
259
+ * will be updated as well.
260
+ *
261
+ * The binding will automatically be removed when either the `source` or the
262
+ * `target` instances are finalized. To remove the binding without affecting the
263
+ * `source` and the `target` you can just call g_object_unref() on the returned
264
+ * #GBinding instance.
265
+ *
266
+ * Removing the binding by calling g_object_unref() on it must only be done if
267
+ * the binding, `source` and `target` are only used from a single thread and it
268
+ * is clear that both `source` and `target` outlive the binding. Especially it
269
+ * is not safe to rely on this if the binding, `source` or `target` can be
270
+ * finalized from different threads. Keep another reference to the binding and
271
+ * use g_binding_unbind() instead to be on the safe side.
272
+ *
273
+ * A #GObject can have multiple bindings.
274
+ * @param source_property the property on @source to bind
275
+ * @param target the target #GObject
276
+ * @param target_property the property on @target to bind
277
+ * @param flags flags to pass to #GBinding
278
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
279
+ */
280
+ bind_property(
281
+ source_property: string,
282
+ target: GObject.Object,
283
+ target_property: string,
284
+ flags: GObject.BindingFlags,
285
+ ): GObject.Binding;
286
+ /**
287
+ * Complete version of g_object_bind_property().
288
+ *
289
+ * Creates a binding between `source_property` on `source` and `target_property`
290
+ * on `target,` allowing you to set the transformation functions to be used by
291
+ * the binding.
292
+ *
293
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
294
+ * if `target_property` on `target` changes then the `source_property` on `source`
295
+ * will be updated as well. The `transform_from` function is only used in case
296
+ * of bidirectional bindings, otherwise it will be ignored
297
+ *
298
+ * The binding will automatically be removed when either the `source` or the
299
+ * `target` instances are finalized. This will release the reference that is
300
+ * being held on the #GBinding instance; if you want to hold on to the
301
+ * #GBinding instance, you will need to hold a reference to it.
302
+ *
303
+ * To remove the binding, call g_binding_unbind().
304
+ *
305
+ * A #GObject can have multiple bindings.
306
+ *
307
+ * The same `user_data` parameter will be used for both `transform_to`
308
+ * and `transform_from` transformation functions; the `notify` function will
309
+ * be called once, when the binding is removed. If you need different data
310
+ * for each transformation function, please use
311
+ * g_object_bind_property_with_closures() instead.
312
+ * @param source_property the property on @source to bind
313
+ * @param target the target #GObject
314
+ * @param target_property the property on @target to bind
315
+ * @param flags flags to pass to #GBinding
316
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
317
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
318
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
319
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
320
+ */
321
+ bind_property_full(
322
+ source_property: string,
323
+ target: GObject.Object,
324
+ target_property: string,
325
+ flags: GObject.BindingFlags,
326
+ transform_to?: GObject.BindingTransformFunc | null,
327
+ transform_from?: GObject.BindingTransformFunc | null,
328
+ notify?: GLib.DestroyNotify | null,
329
+ ): GObject.Binding;
330
+ // Conflicted with GObject.Object.bind_property_full
331
+ bind_property_full(...args: never[]): any;
332
+ /**
333
+ * This function is intended for #GObject implementations to re-enforce
334
+ * a [floating][floating-ref] object reference. Doing this is seldom
335
+ * required: all #GInitiallyUnowneds are created with a floating reference
336
+ * which usually just needs to be sunken by calling g_object_ref_sink().
337
+ */
338
+ force_floating(): void;
339
+ /**
340
+ * Increases the freeze count on `object`. If the freeze count is
341
+ * non-zero, the emission of "notify" signals on `object` is
342
+ * stopped. The signals are queued until the freeze count is decreased
343
+ * to zero. Duplicate notifications are squashed so that at most one
344
+ * #GObject::notify signal is emitted for each property modified while the
345
+ * object is frozen.
346
+ *
347
+ * This is necessary for accessors that modify multiple properties to prevent
348
+ * premature notification while the object is still being modified.
349
+ */
350
+ freeze_notify(): void;
351
+ /**
352
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
353
+ * @param key name of the key for that association
354
+ * @returns the data if found, or %NULL if no such data exists.
355
+ */
356
+ get_data(key: string): any | null;
357
+ get_property(property_name: string): any;
358
+ /**
359
+ * This function gets back user data pointers stored via
360
+ * g_object_set_qdata().
361
+ * @param quark A #GQuark, naming the user data pointer
362
+ * @returns The user data pointer set, or %NULL
363
+ */
364
+ get_qdata(quark: GLib.Quark): any | null;
365
+ /**
366
+ * Gets `n_properties` properties for an `object`.
367
+ * Obtained properties will be set to `values`. All properties must be valid.
368
+ * Warnings will be emitted and undefined behaviour may result if invalid
369
+ * properties are passed in.
370
+ * @param names the names of each property to get
371
+ * @param values the values of each property to get
372
+ */
373
+ getv(names: string[], values: (GObject.Value | any)[]): void;
374
+ /**
375
+ * Checks whether `object` has a [floating][floating-ref] reference.
376
+ * @returns %TRUE if @object has a floating reference
377
+ */
378
+ is_floating(): boolean;
379
+ /**
380
+ * Emits a "notify" signal for the property `property_name` on `object`.
381
+ *
382
+ * When possible, eg. when signaling a property change from within the class
383
+ * that registered the property, you should use g_object_notify_by_pspec()
384
+ * instead.
385
+ *
386
+ * Note that emission of the notify signal may be blocked with
387
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
388
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
389
+ * called.
390
+ * @param property_name the name of a property installed on the class of @object.
391
+ */
392
+ notify(property_name: string): void;
393
+ /**
394
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
395
+ *
396
+ * This function omits the property name lookup, hence it is faster than
397
+ * g_object_notify().
398
+ *
399
+ * One way to avoid using g_object_notify() from within the
400
+ * class that registered the properties, and using g_object_notify_by_pspec()
401
+ * instead, is to store the GParamSpec used with
402
+ * g_object_class_install_property() inside a static array, e.g.:
403
+ *
404
+ *
405
+ * ```c
406
+ * typedef enum
407
+ * {
408
+ * PROP_FOO = 1,
409
+ * PROP_LAST
410
+ * } MyObjectProperty;
411
+ *
412
+ * static GParamSpec *properties[PROP_LAST];
413
+ *
414
+ * static void
415
+ * my_object_class_init (MyObjectClass *klass)
416
+ * {
417
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
418
+ * 0, 100,
419
+ * 50,
420
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
421
+ * g_object_class_install_property (gobject_class,
422
+ * PROP_FOO,
423
+ * properties[PROP_FOO]);
424
+ * }
425
+ * ```
426
+ *
427
+ *
428
+ * and then notify a change on the "foo" property with:
429
+ *
430
+ *
431
+ * ```c
432
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
433
+ * ```
434
+ *
435
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
436
+ */
437
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
438
+ /**
439
+ * Increases the reference count of `object`.
440
+ *
441
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
442
+ * of `object` will be propagated to the return type (using the GCC typeof()
443
+ * extension), so any casting the caller needs to do on the return type must be
444
+ * explicit.
445
+ * @returns the same @object
446
+ */
447
+ ref(): GObject.Object;
448
+ /**
449
+ * Increase the reference count of `object,` and possibly remove the
450
+ * [floating][floating-ref] reference, if `object` has a floating reference.
451
+ *
452
+ * In other words, if the object is floating, then this call "assumes
453
+ * ownership" of the floating reference, converting it to a normal
454
+ * reference by clearing the floating flag while leaving the reference
455
+ * count unchanged. If the object is not floating, then this call
456
+ * adds a new normal reference increasing the reference count by one.
457
+ *
458
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
459
+ * under the same conditions as for g_object_ref().
460
+ * @returns @object
461
+ */
462
+ ref_sink(): GObject.Object;
463
+ /**
464
+ * Releases all references to other objects. This can be used to break
465
+ * reference cycles.
466
+ *
467
+ * This function should only be called from object system implementations.
468
+ */
469
+ run_dispose(): void;
470
+ /**
471
+ * Each object carries around a table of associations from
472
+ * strings to pointers. This function lets you set an association.
473
+ *
474
+ * If the object already had an association with that name,
475
+ * the old association will be destroyed.
476
+ *
477
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
478
+ * This means a copy of `key` is kept permanently (even after `object` has been
479
+ * finalized) — so it is recommended to only use a small, bounded set of values
480
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
481
+ * @param key name of the key
482
+ * @param data data to associate with that key
483
+ */
484
+ set_data(key: string, data?: any | null): void;
485
+ set_property(property_name: string, value: any): void;
486
+ /**
487
+ * Remove a specified datum from the object's data associations,
488
+ * without invoking the association's destroy handler.
489
+ * @param key name of the key
490
+ * @returns the data if found, or %NULL if no such data exists.
491
+ */
492
+ steal_data(key: string): any | null;
493
+ /**
494
+ * This function gets back user data pointers stored via
495
+ * g_object_set_qdata() and removes the `data` from object
496
+ * without invoking its destroy() function (if any was
497
+ * set).
498
+ * Usually, calling this function is only required to update
499
+ * user data pointers with a destroy notifier, for example:
500
+ *
501
+ * ```c
502
+ * void
503
+ * object_add_to_user_list (GObject *object,
504
+ * const gchar *new_string)
505
+ * {
506
+ * // the quark, naming the object data
507
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
508
+ * // retrieve the old string list
509
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
510
+ *
511
+ * // prepend new string
512
+ * list = g_list_prepend (list, g_strdup (new_string));
513
+ * // this changed 'list', so we need to set it again
514
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
515
+ * }
516
+ * static void
517
+ * free_string_list (gpointer data)
518
+ * {
519
+ * GList *node, *list = data;
520
+ *
521
+ * for (node = list; node; node = node->next)
522
+ * g_free (node->data);
523
+ * g_list_free (list);
524
+ * }
525
+ * ```
526
+ *
527
+ * Using g_object_get_qdata() in the above example, instead of
528
+ * g_object_steal_qdata() would have left the destroy function set,
529
+ * and thus the partial string list would have been freed upon
530
+ * g_object_set_qdata_full().
531
+ * @param quark A #GQuark, naming the user data pointer
532
+ * @returns The user data pointer set, or %NULL
533
+ */
534
+ steal_qdata(quark: GLib.Quark): any | null;
535
+ /**
536
+ * Reverts the effect of a previous call to
537
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
538
+ * and when it reaches zero, queued "notify" signals are emitted.
539
+ *
540
+ * Duplicate notifications for each property are squashed so that at most one
541
+ * #GObject::notify signal is emitted for each property, in the reverse order
542
+ * in which they have been queued.
543
+ *
544
+ * It is an error to call this function when the freeze count is zero.
545
+ */
546
+ thaw_notify(): void;
547
+ /**
548
+ * Decreases the reference count of `object`. When its reference count
549
+ * drops to 0, the object is finalized (i.e. its memory is freed).
550
+ *
551
+ * If the pointer to the #GObject may be reused in future (for example, if it is
552
+ * an instance variable of another object), it is recommended to clear the
553
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
554
+ * invalid #GObject instance. Use g_clear_object() for this.
555
+ */
556
+ unref(): void;
557
+ /**
558
+ * This function essentially limits the life time of the `closure` to
559
+ * the life time of the object. That is, when the object is finalized,
560
+ * the `closure` is invalidated by calling g_closure_invalidate() on
561
+ * it, in order to prevent invocations of the closure with a finalized
562
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
563
+ * added as marshal guards to the `closure,` to ensure that an extra
564
+ * reference count is held on `object` during invocation of the
565
+ * `closure`. Usually, this function will be called on closures that
566
+ * use this `object` as closure data.
567
+ * @param closure #GClosure to watch
568
+ */
569
+ watch_closure(closure: GObject.Closure): void;
570
+ /**
571
+ * the `constructed` function is called by g_object_new() as the
572
+ * final step of the object creation process. At the point of the call, all
573
+ * construction properties have been set on the object. The purpose of this
574
+ * call is to allow for object initialisation steps that can only be performed
575
+ * after construction properties have been set. `constructed` implementors
576
+ * should chain up to the `constructed` call of their parent class to allow it
577
+ * to complete its initialisation.
578
+ */
579
+ vfunc_constructed(): void;
580
+ /**
581
+ * emits property change notification for a bunch
582
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
583
+ * needed.
584
+ * @param n_pspecs
585
+ * @param pspecs
586
+ */
587
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
588
+ /**
589
+ * the `dispose` function is supposed to drop all references to other
590
+ * objects, but keep the instance otherwise intact, so that client method
591
+ * invocations still work. It may be run multiple times (due to reference
592
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
593
+ * of the parent class.
594
+ */
595
+ vfunc_dispose(): void;
596
+ /**
597
+ * instance finalization function, should finish the finalization of
598
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
599
+ * parent class.
600
+ */
601
+ vfunc_finalize(): void;
602
+ /**
603
+ * the generic getter for all properties of this type. Should be
604
+ * overridden for every type with properties.
605
+ * @param property_id
606
+ * @param value
607
+ * @param pspec
608
+ */
609
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
610
+ /**
611
+ * Emits a "notify" signal for the property `property_name` on `object`.
612
+ *
613
+ * When possible, eg. when signaling a property change from within the class
614
+ * that registered the property, you should use g_object_notify_by_pspec()
615
+ * instead.
616
+ *
617
+ * Note that emission of the notify signal may be blocked with
618
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
619
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
620
+ * called.
621
+ * @param pspec
622
+ */
623
+ vfunc_notify(pspec: GObject.ParamSpec): void;
624
+ /**
625
+ * the generic setter for all properties of this type. Should be
626
+ * overridden for every type with properties. If implementations of
627
+ * `set_property` don't emit property change notification explicitly, this will
628
+ * be done implicitly by the type system. However, if the notify signal is
629
+ * emitted explicitly, the type system will not emit it a second time.
630
+ * @param property_id
631
+ * @param value
632
+ * @param pspec
633
+ */
634
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
635
+ disconnect(id: number): void;
636
+ set(properties: { [key: string]: any }): void;
637
+ block_signal_handler(id: number): any;
638
+ unblock_signal_handler(id: number): any;
639
+ stop_emission_by_name(detailedName: string): any;
640
+ }
641
+
642
+ module CertChooser {
643
+ // Signal callback interfaces
644
+
645
+ interface CertPasswordValidate {
646
+ (): GLib.Error;
647
+ }
648
+
649
+ interface CertValidate {
650
+ (): GLib.Error;
651
+ }
652
+
653
+ interface Changed {
654
+ (): void;
655
+ }
656
+
657
+ interface KeyPasswordValidate {
658
+ (): GLib.Error;
659
+ }
660
+
661
+ interface KeyValidate {
662
+ (): GLib.Error;
663
+ }
664
+
665
+ // Constructor properties interface
666
+
667
+ interface ConstructorProps
668
+ extends Gtk.Grid.ConstructorProps,
669
+ Atk.ImplementorIface.ConstructorProps,
670
+ Gtk.Buildable.ConstructorProps,
671
+ Gtk.Orientable.ConstructorProps {
672
+ flags: number;
673
+ title: string;
674
+ }
675
+ }
676
+
677
+ class CertChooser extends Gtk.Grid implements Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable {
678
+ static $gtype: GObject.GType<CertChooser>;
679
+
680
+ // Properties
681
+
682
+ set flags(val: number);
683
+ set title(val: string);
684
+
685
+ // Constructors
686
+
687
+ constructor(properties?: Partial<CertChooser.ConstructorProps>, ...args: any[]);
688
+
689
+ _init(...args: any[]): void;
690
+
691
+ static ['new'](title: string, flags: CertChooserFlags): CertChooser;
692
+ // Conflicted with Gtk.Grid.new
693
+
694
+ static ['new'](...args: never[]): any;
695
+
696
+ // Signals
697
+
698
+ connect(id: string, callback: (...args: any[]) => any): number;
699
+ connect_after(id: string, callback: (...args: any[]) => any): number;
700
+ emit(id: string, ...args: any[]): void;
701
+ connect(signal: 'cert-password-validate', callback: (_source: this) => GLib.Error): number;
702
+ connect_after(signal: 'cert-password-validate', callback: (_source: this) => GLib.Error): number;
703
+ emit(signal: 'cert-password-validate'): void;
704
+ connect(signal: 'cert-validate', callback: (_source: this) => GLib.Error): number;
705
+ connect_after(signal: 'cert-validate', callback: (_source: this) => GLib.Error): number;
706
+ emit(signal: 'cert-validate'): void;
707
+ connect(signal: 'changed', callback: (_source: this) => void): number;
708
+ connect_after(signal: 'changed', callback: (_source: this) => void): number;
709
+ emit(signal: 'changed'): void;
710
+ connect(signal: 'key-password-validate', callback: (_source: this) => GLib.Error): number;
711
+ connect_after(signal: 'key-password-validate', callback: (_source: this) => GLib.Error): number;
712
+ emit(signal: 'key-password-validate'): void;
713
+ connect(signal: 'key-validate', callback: (_source: this) => GLib.Error): number;
714
+ connect_after(signal: 'key-validate', callback: (_source: this) => GLib.Error): number;
715
+ emit(signal: 'key-validate'): void;
716
+
717
+ // Methods
718
+
719
+ /**
720
+ * Adds the labels to the specified size group so that they are aligned
721
+ * nicely with other entries in a form.
722
+ *
723
+ * It is expected that the NMACertChooser is a GtkGrid with two columns
724
+ * with the labels in the first one.
725
+ * @param group a size group
726
+ */
727
+ add_to_size_group(group: Gtk.SizeGroup): void;
728
+ /**
729
+ * Gets the real certificate location from the chooser button along with the scheme.
730
+ * @returns the certificate path
731
+ */
732
+ get_cert(): [string | null, NM.Setting8021xCKScheme];
733
+ /**
734
+ * Obtains the password or a PIN that was be required to access the certificate.
735
+ * @returns the certificate PIN or password
736
+ */
737
+ get_cert_password(): string;
738
+ /**
739
+ * Returns secret flags corresponding to the certificate password
740
+ * if one is present. The chooser would typically call into
741
+ * nma_utils_menu_to_secret_flags() for the certificate password
742
+ * entry.
743
+ * @returns secret flags corresponding to the certificate password
744
+ */
745
+ get_cert_password_flags(): NM.SettingSecretFlags;
746
+ /**
747
+ * Gets the real certificate URI from the chooser button along with the scheme.
748
+ * @returns the certificate URI
749
+ */
750
+ get_cert_uri(): string | null;
751
+ /**
752
+ * Gets the real key location from the chooser button along with the scheme.
753
+ * @returns the key path
754
+ */
755
+ get_key(): [string | null, NM.Setting8021xCKScheme];
756
+ /**
757
+ * Obtains the password or a PIN that was be required to access the key.
758
+ * @returns the key PIN or password
759
+ */
760
+ get_key_password(): string;
761
+ /**
762
+ * Returns secret flags corresponding to the key password
763
+ * if one is present. The chooser would typically call into
764
+ * nma_utils_menu_to_secret_flags() for the key password
765
+ * entry.
766
+ * @returns secret flags corresponding to the key password
767
+ */
768
+ get_key_password_flags(): NM.SettingSecretFlags;
769
+ /**
770
+ * Gets the real key URI from the chooser button along with the scheme.
771
+ * @returns the key URI
772
+ */
773
+ get_key_uri(): string | null;
774
+ /**
775
+ * Sets the certificate location for the chooser button.
776
+ * @param value the path or URI of a certificate
777
+ * @param scheme the scheme of the certificate path
778
+ */
779
+ set_cert(value: string, scheme: NM.Setting8021xCKScheme): void;
780
+ /**
781
+ * Sets the password or a PIN that might be required to access the certificate.
782
+ * @param password the certificate PIN or password
783
+ */
784
+ set_cert_password(password: string): void;
785
+ /**
786
+ * Sets the certificate URI for the chooser button.
787
+ * @param uri the path or URI of a certificate
788
+ */
789
+ set_cert_uri(uri: string): void;
790
+ /**
791
+ * Sets the key location for the chooser button.
792
+ * @param value the path or URI of a key
793
+ * @param scheme the scheme of the key path
794
+ */
795
+ set_key(value: string, scheme: NM.Setting8021xCKScheme): void;
796
+ /**
797
+ * Sets the password or a PIN that might be required to access the key.
798
+ * @param password the key PIN or password
799
+ */
800
+ set_key_password(password: string): void;
801
+ /**
802
+ * Sets the key URI for the chooser button.
803
+ * @param uri the URI of a key
804
+ */
805
+ set_key_uri(uri: string): void;
806
+ /**
807
+ * This method basically calls nma_utils_setup_password_storage()
808
+ * on the certificate password entry, in case one is present.
809
+ * @param initial_flags initial secret flags to setup password menu from
810
+ * @param setting #NMSetting containing the password, or NULL
811
+ * @param password_flags_name name of the secret flags (like psk-flags), or NULL
812
+ * @param with_not_required whether to include "Not required" menu item
813
+ * @param ask_mode %TRUE if the entry is shown in ASK mode
814
+ */
815
+ setup_cert_password_storage(
816
+ initial_flags: NM.SettingSecretFlags,
817
+ setting: NM.Setting,
818
+ password_flags_name: string,
819
+ with_not_required: boolean,
820
+ ask_mode: boolean,
821
+ ): void;
822
+ /**
823
+ * This method basically calls nma_utils_setup_password_storage()
824
+ * on the key password entry, in case one is present.
825
+ * @param initial_flags initial secret flags to setup password menu from
826
+ * @param setting #NMSetting containing the password, or NULL
827
+ * @param password_flags_name name of the secret flags (like psk-flags), or NULL
828
+ * @param with_not_required whether to include "Not required" menu item
829
+ * @param ask_mode %TRUE if the entry is shown in ASK mode
830
+ */
831
+ setup_key_password_storage(
832
+ initial_flags: NM.SettingSecretFlags,
833
+ setting: NM.Setting,
834
+ password_flags_name: string,
835
+ with_not_required: boolean,
836
+ ask_mode: boolean,
837
+ ): void;
838
+ /**
839
+ * This method basically calls nma_utils_update_password_storage()
840
+ * on the certificate password entry, in case one is present.
841
+ * @param secret_flags secret flags to set
842
+ * @param setting #NMSetting containing the password, or NULL
843
+ * @param password_flags_name name of the secret flags (like psk-flags), or NULL
844
+ */
845
+ update_cert_password_storage(
846
+ secret_flags: NM.SettingSecretFlags,
847
+ setting: NM.Setting,
848
+ password_flags_name: string,
849
+ ): void;
850
+ /**
851
+ * This method basically calls nma_utils_update_password_storage()
852
+ * on the key password entry, in case one is present.
853
+ * @param secret_flags secret flags to set
854
+ * @param setting #NMSetting containing the password, or NULL
855
+ * @param password_flags_name name of the secret flags (like psk-flags), or NULL
856
+ */
857
+ update_key_password_storage(
858
+ secret_flags: NM.SettingSecretFlags,
859
+ setting: NM.Setting,
860
+ password_flags_name: string,
861
+ ): void;
862
+ /**
863
+ * Validates whether the chosen values make sense. The users can do further
864
+ * validation by subscribing to the "*-changed" signals and returning an
865
+ * error themselves.
866
+ * @returns %TRUE if validation passes, %FALSE otherwise
867
+ */
868
+ validate(): boolean;
869
+
870
+ // Inherited properties
871
+ /**
872
+ * The orientation of the orientable.
873
+ */
874
+ get orientation(): Gtk.Orientation;
875
+ set orientation(val: Gtk.Orientation);
876
+
877
+ // Inherited methods
878
+ /**
879
+ * Retrieves the orientation of the `orientable`.
880
+ * @returns the orientation of the @orientable.
881
+ */
882
+ get_orientation(): Gtk.Orientation;
883
+ /**
884
+ * Sets the orientation of the `orientable`.
885
+ * @param orientation the orientable’s new orientation.
886
+ */
887
+ set_orientation(orientation: Gtk.Orientation): void;
888
+ /**
889
+ * Creates a binding between `source_property` on `source` and `target_property`
890
+ * on `target`.
891
+ *
892
+ * Whenever the `source_property` is changed the `target_property` is
893
+ * updated using the same value. For instance:
894
+ *
895
+ *
896
+ * ```c
897
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
898
+ * ```
899
+ *
900
+ *
901
+ * Will result in the "sensitive" property of the widget #GObject instance to be
902
+ * updated with the same value of the "active" property of the action #GObject
903
+ * instance.
904
+ *
905
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
906
+ * if `target_property` on `target` changes then the `source_property` on `source`
907
+ * will be updated as well.
908
+ *
909
+ * The binding will automatically be removed when either the `source` or the
910
+ * `target` instances are finalized. To remove the binding without affecting the
911
+ * `source` and the `target` you can just call g_object_unref() on the returned
912
+ * #GBinding instance.
913
+ *
914
+ * Removing the binding by calling g_object_unref() on it must only be done if
915
+ * the binding, `source` and `target` are only used from a single thread and it
916
+ * is clear that both `source` and `target` outlive the binding. Especially it
917
+ * is not safe to rely on this if the binding, `source` or `target` can be
918
+ * finalized from different threads. Keep another reference to the binding and
919
+ * use g_binding_unbind() instead to be on the safe side.
920
+ *
921
+ * A #GObject can have multiple bindings.
922
+ * @param source_property the property on @source to bind
923
+ * @param target the target #GObject
924
+ * @param target_property the property on @target to bind
925
+ * @param flags flags to pass to #GBinding
926
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
927
+ */
928
+ bind_property(
929
+ source_property: string,
930
+ target: GObject.Object,
931
+ target_property: string,
932
+ flags: GObject.BindingFlags,
933
+ ): GObject.Binding;
934
+ /**
935
+ * Complete version of g_object_bind_property().
936
+ *
937
+ * Creates a binding between `source_property` on `source` and `target_property`
938
+ * on `target,` allowing you to set the transformation functions to be used by
939
+ * the binding.
940
+ *
941
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
942
+ * if `target_property` on `target` changes then the `source_property` on `source`
943
+ * will be updated as well. The `transform_from` function is only used in case
944
+ * of bidirectional bindings, otherwise it will be ignored
945
+ *
946
+ * The binding will automatically be removed when either the `source` or the
947
+ * `target` instances are finalized. This will release the reference that is
948
+ * being held on the #GBinding instance; if you want to hold on to the
949
+ * #GBinding instance, you will need to hold a reference to it.
950
+ *
951
+ * To remove the binding, call g_binding_unbind().
952
+ *
953
+ * A #GObject can have multiple bindings.
954
+ *
955
+ * The same `user_data` parameter will be used for both `transform_to`
956
+ * and `transform_from` transformation functions; the `notify` function will
957
+ * be called once, when the binding is removed. If you need different data
958
+ * for each transformation function, please use
959
+ * g_object_bind_property_with_closures() instead.
960
+ * @param source_property the property on @source to bind
961
+ * @param target the target #GObject
962
+ * @param target_property the property on @target to bind
963
+ * @param flags flags to pass to #GBinding
964
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
965
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
966
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
967
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
968
+ */
969
+ bind_property_full(
970
+ source_property: string,
971
+ target: GObject.Object,
972
+ target_property: string,
973
+ flags: GObject.BindingFlags,
974
+ transform_to?: GObject.BindingTransformFunc | null,
975
+ transform_from?: GObject.BindingTransformFunc | null,
976
+ notify?: GLib.DestroyNotify | null,
977
+ ): GObject.Binding;
978
+ // Conflicted with GObject.Object.bind_property_full
979
+ bind_property_full(...args: never[]): any;
980
+ /**
981
+ * This function is intended for #GObject implementations to re-enforce
982
+ * a [floating][floating-ref] object reference. Doing this is seldom
983
+ * required: all #GInitiallyUnowneds are created with a floating reference
984
+ * which usually just needs to be sunken by calling g_object_ref_sink().
985
+ */
986
+ force_floating(): void;
987
+ /**
988
+ * Increases the freeze count on `object`. If the freeze count is
989
+ * non-zero, the emission of "notify" signals on `object` is
990
+ * stopped. The signals are queued until the freeze count is decreased
991
+ * to zero. Duplicate notifications are squashed so that at most one
992
+ * #GObject::notify signal is emitted for each property modified while the
993
+ * object is frozen.
994
+ *
995
+ * This is necessary for accessors that modify multiple properties to prevent
996
+ * premature notification while the object is still being modified.
997
+ */
998
+ freeze_notify(): void;
999
+ /**
1000
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
1001
+ * @param key name of the key for that association
1002
+ * @returns the data if found, or %NULL if no such data exists.
1003
+ */
1004
+ get_data(key: string): any | null;
1005
+ get_property(property_name: string): any;
1006
+ /**
1007
+ * This function gets back user data pointers stored via
1008
+ * g_object_set_qdata().
1009
+ * @param quark A #GQuark, naming the user data pointer
1010
+ * @returns The user data pointer set, or %NULL
1011
+ */
1012
+ get_qdata(quark: GLib.Quark): any | null;
1013
+ /**
1014
+ * Gets `n_properties` properties for an `object`.
1015
+ * Obtained properties will be set to `values`. All properties must be valid.
1016
+ * Warnings will be emitted and undefined behaviour may result if invalid
1017
+ * properties are passed in.
1018
+ * @param names the names of each property to get
1019
+ * @param values the values of each property to get
1020
+ */
1021
+ getv(names: string[], values: (GObject.Value | any)[]): void;
1022
+ /**
1023
+ * Checks whether `object` has a [floating][floating-ref] reference.
1024
+ * @returns %TRUE if @object has a floating reference
1025
+ */
1026
+ is_floating(): boolean;
1027
+ /**
1028
+ * Emits a "notify" signal for the property `property_name` on `object`.
1029
+ *
1030
+ * When possible, eg. when signaling a property change from within the class
1031
+ * that registered the property, you should use g_object_notify_by_pspec()
1032
+ * instead.
1033
+ *
1034
+ * Note that emission of the notify signal may be blocked with
1035
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1036
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1037
+ * called.
1038
+ * @param property_name the name of a property installed on the class of @object.
1039
+ */
1040
+ notify(property_name: string): void;
1041
+ /**
1042
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
1043
+ *
1044
+ * This function omits the property name lookup, hence it is faster than
1045
+ * g_object_notify().
1046
+ *
1047
+ * One way to avoid using g_object_notify() from within the
1048
+ * class that registered the properties, and using g_object_notify_by_pspec()
1049
+ * instead, is to store the GParamSpec used with
1050
+ * g_object_class_install_property() inside a static array, e.g.:
1051
+ *
1052
+ *
1053
+ * ```c
1054
+ * typedef enum
1055
+ * {
1056
+ * PROP_FOO = 1,
1057
+ * PROP_LAST
1058
+ * } MyObjectProperty;
1059
+ *
1060
+ * static GParamSpec *properties[PROP_LAST];
1061
+ *
1062
+ * static void
1063
+ * my_object_class_init (MyObjectClass *klass)
1064
+ * {
1065
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
1066
+ * 0, 100,
1067
+ * 50,
1068
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
1069
+ * g_object_class_install_property (gobject_class,
1070
+ * PROP_FOO,
1071
+ * properties[PROP_FOO]);
1072
+ * }
1073
+ * ```
1074
+ *
1075
+ *
1076
+ * and then notify a change on the "foo" property with:
1077
+ *
1078
+ *
1079
+ * ```c
1080
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
1081
+ * ```
1082
+ *
1083
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
1084
+ */
1085
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
1086
+ /**
1087
+ * Increases the reference count of `object`.
1088
+ *
1089
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
1090
+ * of `object` will be propagated to the return type (using the GCC typeof()
1091
+ * extension), so any casting the caller needs to do on the return type must be
1092
+ * explicit.
1093
+ * @returns the same @object
1094
+ */
1095
+ ref(): GObject.Object;
1096
+ /**
1097
+ * Increase the reference count of `object,` and possibly remove the
1098
+ * [floating][floating-ref] reference, if `object` has a floating reference.
1099
+ *
1100
+ * In other words, if the object is floating, then this call "assumes
1101
+ * ownership" of the floating reference, converting it to a normal
1102
+ * reference by clearing the floating flag while leaving the reference
1103
+ * count unchanged. If the object is not floating, then this call
1104
+ * adds a new normal reference increasing the reference count by one.
1105
+ *
1106
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
1107
+ * under the same conditions as for g_object_ref().
1108
+ * @returns @object
1109
+ */
1110
+ ref_sink(): GObject.Object;
1111
+ /**
1112
+ * Releases all references to other objects. This can be used to break
1113
+ * reference cycles.
1114
+ *
1115
+ * This function should only be called from object system implementations.
1116
+ */
1117
+ run_dispose(): void;
1118
+ /**
1119
+ * Each object carries around a table of associations from
1120
+ * strings to pointers. This function lets you set an association.
1121
+ *
1122
+ * If the object already had an association with that name,
1123
+ * the old association will be destroyed.
1124
+ *
1125
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
1126
+ * This means a copy of `key` is kept permanently (even after `object` has been
1127
+ * finalized) — so it is recommended to only use a small, bounded set of values
1128
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
1129
+ * @param key name of the key
1130
+ * @param data data to associate with that key
1131
+ */
1132
+ set_data(key: string, data?: any | null): void;
1133
+ set_property(property_name: string, value: any): void;
1134
+ /**
1135
+ * Remove a specified datum from the object's data associations,
1136
+ * without invoking the association's destroy handler.
1137
+ * @param key name of the key
1138
+ * @returns the data if found, or %NULL if no such data exists.
1139
+ */
1140
+ steal_data(key: string): any | null;
1141
+ /**
1142
+ * This function gets back user data pointers stored via
1143
+ * g_object_set_qdata() and removes the `data` from object
1144
+ * without invoking its destroy() function (if any was
1145
+ * set).
1146
+ * Usually, calling this function is only required to update
1147
+ * user data pointers with a destroy notifier, for example:
1148
+ *
1149
+ * ```c
1150
+ * void
1151
+ * object_add_to_user_list (GObject *object,
1152
+ * const gchar *new_string)
1153
+ * {
1154
+ * // the quark, naming the object data
1155
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
1156
+ * // retrieve the old string list
1157
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
1158
+ *
1159
+ * // prepend new string
1160
+ * list = g_list_prepend (list, g_strdup (new_string));
1161
+ * // this changed 'list', so we need to set it again
1162
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
1163
+ * }
1164
+ * static void
1165
+ * free_string_list (gpointer data)
1166
+ * {
1167
+ * GList *node, *list = data;
1168
+ *
1169
+ * for (node = list; node; node = node->next)
1170
+ * g_free (node->data);
1171
+ * g_list_free (list);
1172
+ * }
1173
+ * ```
1174
+ *
1175
+ * Using g_object_get_qdata() in the above example, instead of
1176
+ * g_object_steal_qdata() would have left the destroy function set,
1177
+ * and thus the partial string list would have been freed upon
1178
+ * g_object_set_qdata_full().
1179
+ * @param quark A #GQuark, naming the user data pointer
1180
+ * @returns The user data pointer set, or %NULL
1181
+ */
1182
+ steal_qdata(quark: GLib.Quark): any | null;
1183
+ /**
1184
+ * Reverts the effect of a previous call to
1185
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
1186
+ * and when it reaches zero, queued "notify" signals are emitted.
1187
+ *
1188
+ * Duplicate notifications for each property are squashed so that at most one
1189
+ * #GObject::notify signal is emitted for each property, in the reverse order
1190
+ * in which they have been queued.
1191
+ *
1192
+ * It is an error to call this function when the freeze count is zero.
1193
+ */
1194
+ thaw_notify(): void;
1195
+ /**
1196
+ * Decreases the reference count of `object`. When its reference count
1197
+ * drops to 0, the object is finalized (i.e. its memory is freed).
1198
+ *
1199
+ * If the pointer to the #GObject may be reused in future (for example, if it is
1200
+ * an instance variable of another object), it is recommended to clear the
1201
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
1202
+ * invalid #GObject instance. Use g_clear_object() for this.
1203
+ */
1204
+ unref(): void;
1205
+ /**
1206
+ * This function essentially limits the life time of the `closure` to
1207
+ * the life time of the object. That is, when the object is finalized,
1208
+ * the `closure` is invalidated by calling g_closure_invalidate() on
1209
+ * it, in order to prevent invocations of the closure with a finalized
1210
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
1211
+ * added as marshal guards to the `closure,` to ensure that an extra
1212
+ * reference count is held on `object` during invocation of the
1213
+ * `closure`. Usually, this function will be called on closures that
1214
+ * use this `object` as closure data.
1215
+ * @param closure #GClosure to watch
1216
+ */
1217
+ watch_closure(closure: GObject.Closure): void;
1218
+ /**
1219
+ * the `constructed` function is called by g_object_new() as the
1220
+ * final step of the object creation process. At the point of the call, all
1221
+ * construction properties have been set on the object. The purpose of this
1222
+ * call is to allow for object initialisation steps that can only be performed
1223
+ * after construction properties have been set. `constructed` implementors
1224
+ * should chain up to the `constructed` call of their parent class to allow it
1225
+ * to complete its initialisation.
1226
+ */
1227
+ vfunc_constructed(): void;
1228
+ /**
1229
+ * emits property change notification for a bunch
1230
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
1231
+ * needed.
1232
+ * @param n_pspecs
1233
+ * @param pspecs
1234
+ */
1235
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
1236
+ /**
1237
+ * the `dispose` function is supposed to drop all references to other
1238
+ * objects, but keep the instance otherwise intact, so that client method
1239
+ * invocations still work. It may be run multiple times (due to reference
1240
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
1241
+ * of the parent class.
1242
+ */
1243
+ vfunc_dispose(): void;
1244
+ /**
1245
+ * instance finalization function, should finish the finalization of
1246
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
1247
+ * parent class.
1248
+ */
1249
+ vfunc_finalize(): void;
1250
+ /**
1251
+ * the generic getter for all properties of this type. Should be
1252
+ * overridden for every type with properties.
1253
+ * @param property_id
1254
+ * @param value
1255
+ * @param pspec
1256
+ */
1257
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1258
+ /**
1259
+ * Emits a "notify" signal for the property `property_name` on `object`.
1260
+ *
1261
+ * When possible, eg. when signaling a property change from within the class
1262
+ * that registered the property, you should use g_object_notify_by_pspec()
1263
+ * instead.
1264
+ *
1265
+ * Note that emission of the notify signal may be blocked with
1266
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1267
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1268
+ * called.
1269
+ * @param pspec
1270
+ */
1271
+ vfunc_notify(pspec: GObject.ParamSpec): void;
1272
+ /**
1273
+ * the generic setter for all properties of this type. Should be
1274
+ * overridden for every type with properties. If implementations of
1275
+ * `set_property` don't emit property change notification explicitly, this will
1276
+ * be done implicitly by the type system. However, if the notify signal is
1277
+ * emitted explicitly, the type system will not emit it a second time.
1278
+ * @param property_id
1279
+ * @param value
1280
+ * @param pspec
1281
+ */
1282
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1283
+ disconnect(id: number): void;
1284
+ set(properties: { [key: string]: any }): void;
1285
+ block_signal_handler(id: number): any;
1286
+ unblock_signal_handler(id: number): any;
1287
+ stop_emission_by_name(detailedName: string): any;
1288
+ }
1289
+
1290
+ module MobileProvidersDatabase {
1291
+ // Constructor properties interface
1292
+
1293
+ interface ConstructorProps
1294
+ extends GObject.Object.ConstructorProps,
1295
+ Gio.AsyncInitable.ConstructorProps,
1296
+ Gio.Initable.ConstructorProps {
1297
+ country_codes: string;
1298
+ countryCodes: string;
1299
+ service_providers: string;
1300
+ serviceProviders: string;
1301
+ }
1302
+ }
1303
+
1304
+ class MobileProvidersDatabase
1305
+ extends GObject.Object
1306
+ implements Gio.AsyncInitable<MobileProvidersDatabase>, Gio.Initable
1307
+ {
1308
+ static $gtype: GObject.GType<MobileProvidersDatabase>;
1309
+
1310
+ // Properties
1311
+
1312
+ get country_codes(): string;
1313
+ get countryCodes(): string;
1314
+ get service_providers(): string;
1315
+ get serviceProviders(): string;
1316
+
1317
+ // Constructors
1318
+
1319
+ constructor(properties?: Partial<MobileProvidersDatabase.ConstructorProps>, ...args: any[]);
1320
+
1321
+ _init(...args: any[]): void;
1322
+
1323
+ static new_finish(res: Gio.AsyncResult): MobileProvidersDatabase;
1324
+ // Conflicted with Gio.AsyncInitable.new_finish
1325
+
1326
+ static new_finish(...args: never[]): any;
1327
+
1328
+ static new_sync(
1329
+ country_codes?: string | null,
1330
+ service_providers?: string | null,
1331
+ cancellable?: Gio.Cancellable | null,
1332
+ ): MobileProvidersDatabase;
1333
+
1334
+ // Static methods
1335
+
1336
+ static ['new'](
1337
+ country_codes?: string | null,
1338
+ service_providers?: string | null,
1339
+ cancellable?: Gio.Cancellable | null,
1340
+ callback?: Gio.AsyncReadyCallback<MobileProvidersDatabase> | null,
1341
+ ): void;
1342
+
1343
+ // Methods
1344
+
1345
+ dump(): void;
1346
+ get_countries(): GLib.HashTable<string, CountryInfo>;
1347
+ lookup_3gpp_mcc_mnc(mccmnc: string): MobileProvider;
1348
+ lookup_cdma_sid(sid: number): MobileProvider;
1349
+ lookup_country(country_code: string): CountryInfo;
1350
+
1351
+ // Inherited methods
1352
+ /**
1353
+ * Starts asynchronous initialization of the object implementing the
1354
+ * interface. This must be done before any real use of the object after
1355
+ * initial construction. If the object also implements #GInitable you can
1356
+ * optionally call g_initable_init() instead.
1357
+ *
1358
+ * This method is intended for language bindings. If writing in C,
1359
+ * g_async_initable_new_async() should typically be used instead.
1360
+ *
1361
+ * When the initialization is finished, `callback` will be called. You can
1362
+ * then call g_async_initable_init_finish() to get the result of the
1363
+ * initialization.
1364
+ *
1365
+ * Implementations may also support cancellation. If `cancellable` is not
1366
+ * %NULL, then initialization can be cancelled by triggering the cancellable
1367
+ * object from another thread. If the operation was cancelled, the error
1368
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and
1369
+ * the object doesn't support cancellable initialization, the error
1370
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1371
+ *
1372
+ * As with #GInitable, if the object is not initialized, or initialization
1373
+ * returns with an error, then all operations on the object except
1374
+ * g_object_ref() and g_object_unref() are considered to be invalid, and
1375
+ * have undefined behaviour. They will often fail with g_critical() or
1376
+ * g_warning(), but this must not be relied on.
1377
+ *
1378
+ * Callers should not assume that a class which implements #GAsyncInitable can
1379
+ * be initialized multiple times; for more information, see g_initable_init().
1380
+ * If a class explicitly supports being initialized multiple times,
1381
+ * implementation requires yielding all subsequent calls to init_async() on the
1382
+ * results of the first call.
1383
+ *
1384
+ * For classes that also support the #GInitable interface, the default
1385
+ * implementation of this method will run the g_initable_init() function
1386
+ * in a thread, so if you want to support asynchronous initialization via
1387
+ * threads, just implement the #GAsyncInitable interface without overriding
1388
+ * any interface methods.
1389
+ * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation
1390
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1391
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
1392
+ */
1393
+ init_async(
1394
+ io_priority: number,
1395
+ cancellable?: Gio.Cancellable | null,
1396
+ callback?: Gio.AsyncReadyCallback<this> | null,
1397
+ ): void;
1398
+ /**
1399
+ * Finishes asynchronous initialization and returns the result.
1400
+ * See g_async_initable_init_async().
1401
+ * @param res a #GAsyncResult.
1402
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
1403
+ */
1404
+ init_finish(res: Gio.AsyncResult): boolean;
1405
+ /**
1406
+ * Finishes the async construction for the various g_async_initable_new
1407
+ * calls, returning the created object or %NULL on error.
1408
+ * @param res the #GAsyncResult from the callback
1409
+ * @returns a newly created #GObject, or %NULL on error. Free with g_object_unref().
1410
+ */
1411
+ new_finish(res: Gio.AsyncResult): MobileProvidersDatabase;
1412
+ /**
1413
+ * Starts asynchronous initialization of the object implementing the
1414
+ * interface. This must be done before any real use of the object after
1415
+ * initial construction. If the object also implements #GInitable you can
1416
+ * optionally call g_initable_init() instead.
1417
+ *
1418
+ * This method is intended for language bindings. If writing in C,
1419
+ * g_async_initable_new_async() should typically be used instead.
1420
+ *
1421
+ * When the initialization is finished, `callback` will be called. You can
1422
+ * then call g_async_initable_init_finish() to get the result of the
1423
+ * initialization.
1424
+ *
1425
+ * Implementations may also support cancellation. If `cancellable` is not
1426
+ * %NULL, then initialization can be cancelled by triggering the cancellable
1427
+ * object from another thread. If the operation was cancelled, the error
1428
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and
1429
+ * the object doesn't support cancellable initialization, the error
1430
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1431
+ *
1432
+ * As with #GInitable, if the object is not initialized, or initialization
1433
+ * returns with an error, then all operations on the object except
1434
+ * g_object_ref() and g_object_unref() are considered to be invalid, and
1435
+ * have undefined behaviour. They will often fail with g_critical() or
1436
+ * g_warning(), but this must not be relied on.
1437
+ *
1438
+ * Callers should not assume that a class which implements #GAsyncInitable can
1439
+ * be initialized multiple times; for more information, see g_initable_init().
1440
+ * If a class explicitly supports being initialized multiple times,
1441
+ * implementation requires yielding all subsequent calls to init_async() on the
1442
+ * results of the first call.
1443
+ *
1444
+ * For classes that also support the #GInitable interface, the default
1445
+ * implementation of this method will run the g_initable_init() function
1446
+ * in a thread, so if you want to support asynchronous initialization via
1447
+ * threads, just implement the #GAsyncInitable interface without overriding
1448
+ * any interface methods.
1449
+ * @param io_priority the [I/O priority](iface.AsyncResult.html#io-priority) of the operation
1450
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1451
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
1452
+ */
1453
+ vfunc_init_async(
1454
+ io_priority: number,
1455
+ cancellable?: Gio.Cancellable | null,
1456
+ callback?: Gio.AsyncReadyCallback<this> | null,
1457
+ ): void;
1458
+ /**
1459
+ * Finishes asynchronous initialization and returns the result.
1460
+ * See g_async_initable_init_async().
1461
+ * @param res a #GAsyncResult.
1462
+ */
1463
+ vfunc_init_finish(res: Gio.AsyncResult): boolean;
1464
+ /**
1465
+ * Initializes the object implementing the interface.
1466
+ *
1467
+ * This method is intended for language bindings. If writing in C,
1468
+ * g_initable_new() should typically be used instead.
1469
+ *
1470
+ * The object must be initialized before any real use after initial
1471
+ * construction, either with this function or g_async_initable_init_async().
1472
+ *
1473
+ * Implementations may also support cancellation. If `cancellable` is not %NULL,
1474
+ * then initialization can be cancelled by triggering the cancellable object
1475
+ * from another thread. If the operation was cancelled, the error
1476
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
1477
+ * the object doesn't support cancellable initialization the error
1478
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1479
+ *
1480
+ * If the object is not initialized, or initialization returns with an
1481
+ * error, then all operations on the object except g_object_ref() and
1482
+ * g_object_unref() are considered to be invalid, and have undefined
1483
+ * behaviour. See the [introduction][ginitable] for more details.
1484
+ *
1485
+ * Callers should not assume that a class which implements #GInitable can be
1486
+ * initialized multiple times, unless the class explicitly documents itself as
1487
+ * supporting this. Generally, a class’ implementation of init() can assume
1488
+ * (and assert) that it will only be called once. Previously, this documentation
1489
+ * recommended all #GInitable implementations should be idempotent; that
1490
+ * recommendation was relaxed in GLib 2.54.
1491
+ *
1492
+ * If a class explicitly supports being initialized multiple times, it is
1493
+ * recommended that the method is idempotent: multiple calls with the same
1494
+ * arguments should return the same results. Only the first call initializes
1495
+ * the object; further calls return the result of the first call.
1496
+ *
1497
+ * One reason why a class might need to support idempotent initialization is if
1498
+ * it is designed to be used via the singleton pattern, with a
1499
+ * #GObjectClass.constructor that sometimes returns an existing instance.
1500
+ * In this pattern, a caller would expect to be able to call g_initable_init()
1501
+ * on the result of g_object_new(), regardless of whether it is in fact a new
1502
+ * instance.
1503
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1504
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
1505
+ */
1506
+ init(cancellable?: Gio.Cancellable | null): boolean;
1507
+ /**
1508
+ * Initializes the object implementing the interface.
1509
+ *
1510
+ * This method is intended for language bindings. If writing in C,
1511
+ * g_initable_new() should typically be used instead.
1512
+ *
1513
+ * The object must be initialized before any real use after initial
1514
+ * construction, either with this function or g_async_initable_init_async().
1515
+ *
1516
+ * Implementations may also support cancellation. If `cancellable` is not %NULL,
1517
+ * then initialization can be cancelled by triggering the cancellable object
1518
+ * from another thread. If the operation was cancelled, the error
1519
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
1520
+ * the object doesn't support cancellable initialization the error
1521
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1522
+ *
1523
+ * If the object is not initialized, or initialization returns with an
1524
+ * error, then all operations on the object except g_object_ref() and
1525
+ * g_object_unref() are considered to be invalid, and have undefined
1526
+ * behaviour. See the [introduction][ginitable] for more details.
1527
+ *
1528
+ * Callers should not assume that a class which implements #GInitable can be
1529
+ * initialized multiple times, unless the class explicitly documents itself as
1530
+ * supporting this. Generally, a class’ implementation of init() can assume
1531
+ * (and assert) that it will only be called once. Previously, this documentation
1532
+ * recommended all #GInitable implementations should be idempotent; that
1533
+ * recommendation was relaxed in GLib 2.54.
1534
+ *
1535
+ * If a class explicitly supports being initialized multiple times, it is
1536
+ * recommended that the method is idempotent: multiple calls with the same
1537
+ * arguments should return the same results. Only the first call initializes
1538
+ * the object; further calls return the result of the first call.
1539
+ *
1540
+ * One reason why a class might need to support idempotent initialization is if
1541
+ * it is designed to be used via the singleton pattern, with a
1542
+ * #GObjectClass.constructor that sometimes returns an existing instance.
1543
+ * In this pattern, a caller would expect to be able to call g_initable_init()
1544
+ * on the result of g_object_new(), regardless of whether it is in fact a new
1545
+ * instance.
1546
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1547
+ */
1548
+ vfunc_init(cancellable?: Gio.Cancellable | null): boolean;
1549
+ /**
1550
+ * Creates a binding between `source_property` on `source` and `target_property`
1551
+ * on `target`.
1552
+ *
1553
+ * Whenever the `source_property` is changed the `target_property` is
1554
+ * updated using the same value. For instance:
1555
+ *
1556
+ *
1557
+ * ```c
1558
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
1559
+ * ```
1560
+ *
1561
+ *
1562
+ * Will result in the "sensitive" property of the widget #GObject instance to be
1563
+ * updated with the same value of the "active" property of the action #GObject
1564
+ * instance.
1565
+ *
1566
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1567
+ * if `target_property` on `target` changes then the `source_property` on `source`
1568
+ * will be updated as well.
1569
+ *
1570
+ * The binding will automatically be removed when either the `source` or the
1571
+ * `target` instances are finalized. To remove the binding without affecting the
1572
+ * `source` and the `target` you can just call g_object_unref() on the returned
1573
+ * #GBinding instance.
1574
+ *
1575
+ * Removing the binding by calling g_object_unref() on it must only be done if
1576
+ * the binding, `source` and `target` are only used from a single thread and it
1577
+ * is clear that both `source` and `target` outlive the binding. Especially it
1578
+ * is not safe to rely on this if the binding, `source` or `target` can be
1579
+ * finalized from different threads. Keep another reference to the binding and
1580
+ * use g_binding_unbind() instead to be on the safe side.
1581
+ *
1582
+ * A #GObject can have multiple bindings.
1583
+ * @param source_property the property on @source to bind
1584
+ * @param target the target #GObject
1585
+ * @param target_property the property on @target to bind
1586
+ * @param flags flags to pass to #GBinding
1587
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1588
+ */
1589
+ bind_property(
1590
+ source_property: string,
1591
+ target: GObject.Object,
1592
+ target_property: string,
1593
+ flags: GObject.BindingFlags,
1594
+ ): GObject.Binding;
1595
+ /**
1596
+ * Complete version of g_object_bind_property().
1597
+ *
1598
+ * Creates a binding between `source_property` on `source` and `target_property`
1599
+ * on `target,` allowing you to set the transformation functions to be used by
1600
+ * the binding.
1601
+ *
1602
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1603
+ * if `target_property` on `target` changes then the `source_property` on `source`
1604
+ * will be updated as well. The `transform_from` function is only used in case
1605
+ * of bidirectional bindings, otherwise it will be ignored
1606
+ *
1607
+ * The binding will automatically be removed when either the `source` or the
1608
+ * `target` instances are finalized. This will release the reference that is
1609
+ * being held on the #GBinding instance; if you want to hold on to the
1610
+ * #GBinding instance, you will need to hold a reference to it.
1611
+ *
1612
+ * To remove the binding, call g_binding_unbind().
1613
+ *
1614
+ * A #GObject can have multiple bindings.
1615
+ *
1616
+ * The same `user_data` parameter will be used for both `transform_to`
1617
+ * and `transform_from` transformation functions; the `notify` function will
1618
+ * be called once, when the binding is removed. If you need different data
1619
+ * for each transformation function, please use
1620
+ * g_object_bind_property_with_closures() instead.
1621
+ * @param source_property the property on @source to bind
1622
+ * @param target the target #GObject
1623
+ * @param target_property the property on @target to bind
1624
+ * @param flags flags to pass to #GBinding
1625
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
1626
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
1627
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
1628
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1629
+ */
1630
+ bind_property_full(
1631
+ source_property: string,
1632
+ target: GObject.Object,
1633
+ target_property: string,
1634
+ flags: GObject.BindingFlags,
1635
+ transform_to?: GObject.BindingTransformFunc | null,
1636
+ transform_from?: GObject.BindingTransformFunc | null,
1637
+ notify?: GLib.DestroyNotify | null,
1638
+ ): GObject.Binding;
1639
+ // Conflicted with GObject.Object.bind_property_full
1640
+ bind_property_full(...args: never[]): any;
1641
+ /**
1642
+ * This function is intended for #GObject implementations to re-enforce
1643
+ * a [floating][floating-ref] object reference. Doing this is seldom
1644
+ * required: all #GInitiallyUnowneds are created with a floating reference
1645
+ * which usually just needs to be sunken by calling g_object_ref_sink().
1646
+ */
1647
+ force_floating(): void;
1648
+ /**
1649
+ * Increases the freeze count on `object`. If the freeze count is
1650
+ * non-zero, the emission of "notify" signals on `object` is
1651
+ * stopped. The signals are queued until the freeze count is decreased
1652
+ * to zero. Duplicate notifications are squashed so that at most one
1653
+ * #GObject::notify signal is emitted for each property modified while the
1654
+ * object is frozen.
1655
+ *
1656
+ * This is necessary for accessors that modify multiple properties to prevent
1657
+ * premature notification while the object is still being modified.
1658
+ */
1659
+ freeze_notify(): void;
1660
+ /**
1661
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
1662
+ * @param key name of the key for that association
1663
+ * @returns the data if found, or %NULL if no such data exists.
1664
+ */
1665
+ get_data(key: string): any | null;
1666
+ get_property(property_name: string): any;
1667
+ /**
1668
+ * This function gets back user data pointers stored via
1669
+ * g_object_set_qdata().
1670
+ * @param quark A #GQuark, naming the user data pointer
1671
+ * @returns The user data pointer set, or %NULL
1672
+ */
1673
+ get_qdata(quark: GLib.Quark): any | null;
1674
+ /**
1675
+ * Gets `n_properties` properties for an `object`.
1676
+ * Obtained properties will be set to `values`. All properties must be valid.
1677
+ * Warnings will be emitted and undefined behaviour may result if invalid
1678
+ * properties are passed in.
1679
+ * @param names the names of each property to get
1680
+ * @param values the values of each property to get
1681
+ */
1682
+ getv(names: string[], values: (GObject.Value | any)[]): void;
1683
+ /**
1684
+ * Checks whether `object` has a [floating][floating-ref] reference.
1685
+ * @returns %TRUE if @object has a floating reference
1686
+ */
1687
+ is_floating(): boolean;
1688
+ /**
1689
+ * Emits a "notify" signal for the property `property_name` on `object`.
1690
+ *
1691
+ * When possible, eg. when signaling a property change from within the class
1692
+ * that registered the property, you should use g_object_notify_by_pspec()
1693
+ * instead.
1694
+ *
1695
+ * Note that emission of the notify signal may be blocked with
1696
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1697
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1698
+ * called.
1699
+ * @param property_name the name of a property installed on the class of @object.
1700
+ */
1701
+ notify(property_name: string): void;
1702
+ /**
1703
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
1704
+ *
1705
+ * This function omits the property name lookup, hence it is faster than
1706
+ * g_object_notify().
1707
+ *
1708
+ * One way to avoid using g_object_notify() from within the
1709
+ * class that registered the properties, and using g_object_notify_by_pspec()
1710
+ * instead, is to store the GParamSpec used with
1711
+ * g_object_class_install_property() inside a static array, e.g.:
1712
+ *
1713
+ *
1714
+ * ```c
1715
+ * typedef enum
1716
+ * {
1717
+ * PROP_FOO = 1,
1718
+ * PROP_LAST
1719
+ * } MyObjectProperty;
1720
+ *
1721
+ * static GParamSpec *properties[PROP_LAST];
1722
+ *
1723
+ * static void
1724
+ * my_object_class_init (MyObjectClass *klass)
1725
+ * {
1726
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
1727
+ * 0, 100,
1728
+ * 50,
1729
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
1730
+ * g_object_class_install_property (gobject_class,
1731
+ * PROP_FOO,
1732
+ * properties[PROP_FOO]);
1733
+ * }
1734
+ * ```
1735
+ *
1736
+ *
1737
+ * and then notify a change on the "foo" property with:
1738
+ *
1739
+ *
1740
+ * ```c
1741
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
1742
+ * ```
1743
+ *
1744
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
1745
+ */
1746
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
1747
+ /**
1748
+ * Increases the reference count of `object`.
1749
+ *
1750
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
1751
+ * of `object` will be propagated to the return type (using the GCC typeof()
1752
+ * extension), so any casting the caller needs to do on the return type must be
1753
+ * explicit.
1754
+ * @returns the same @object
1755
+ */
1756
+ ref(): GObject.Object;
1757
+ /**
1758
+ * Increase the reference count of `object,` and possibly remove the
1759
+ * [floating][floating-ref] reference, if `object` has a floating reference.
1760
+ *
1761
+ * In other words, if the object is floating, then this call "assumes
1762
+ * ownership" of the floating reference, converting it to a normal
1763
+ * reference by clearing the floating flag while leaving the reference
1764
+ * count unchanged. If the object is not floating, then this call
1765
+ * adds a new normal reference increasing the reference count by one.
1766
+ *
1767
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
1768
+ * under the same conditions as for g_object_ref().
1769
+ * @returns @object
1770
+ */
1771
+ ref_sink(): GObject.Object;
1772
+ /**
1773
+ * Releases all references to other objects. This can be used to break
1774
+ * reference cycles.
1775
+ *
1776
+ * This function should only be called from object system implementations.
1777
+ */
1778
+ run_dispose(): void;
1779
+ /**
1780
+ * Each object carries around a table of associations from
1781
+ * strings to pointers. This function lets you set an association.
1782
+ *
1783
+ * If the object already had an association with that name,
1784
+ * the old association will be destroyed.
1785
+ *
1786
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
1787
+ * This means a copy of `key` is kept permanently (even after `object` has been
1788
+ * finalized) — so it is recommended to only use a small, bounded set of values
1789
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
1790
+ * @param key name of the key
1791
+ * @param data data to associate with that key
1792
+ */
1793
+ set_data(key: string, data?: any | null): void;
1794
+ set_property(property_name: string, value: any): void;
1795
+ /**
1796
+ * Remove a specified datum from the object's data associations,
1797
+ * without invoking the association's destroy handler.
1798
+ * @param key name of the key
1799
+ * @returns the data if found, or %NULL if no such data exists.
1800
+ */
1801
+ steal_data(key: string): any | null;
1802
+ /**
1803
+ * This function gets back user data pointers stored via
1804
+ * g_object_set_qdata() and removes the `data` from object
1805
+ * without invoking its destroy() function (if any was
1806
+ * set).
1807
+ * Usually, calling this function is only required to update
1808
+ * user data pointers with a destroy notifier, for example:
1809
+ *
1810
+ * ```c
1811
+ * void
1812
+ * object_add_to_user_list (GObject *object,
1813
+ * const gchar *new_string)
1814
+ * {
1815
+ * // the quark, naming the object data
1816
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
1817
+ * // retrieve the old string list
1818
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
1819
+ *
1820
+ * // prepend new string
1821
+ * list = g_list_prepend (list, g_strdup (new_string));
1822
+ * // this changed 'list', so we need to set it again
1823
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
1824
+ * }
1825
+ * static void
1826
+ * free_string_list (gpointer data)
1827
+ * {
1828
+ * GList *node, *list = data;
1829
+ *
1830
+ * for (node = list; node; node = node->next)
1831
+ * g_free (node->data);
1832
+ * g_list_free (list);
1833
+ * }
1834
+ * ```
1835
+ *
1836
+ * Using g_object_get_qdata() in the above example, instead of
1837
+ * g_object_steal_qdata() would have left the destroy function set,
1838
+ * and thus the partial string list would have been freed upon
1839
+ * g_object_set_qdata_full().
1840
+ * @param quark A #GQuark, naming the user data pointer
1841
+ * @returns The user data pointer set, or %NULL
1842
+ */
1843
+ steal_qdata(quark: GLib.Quark): any | null;
1844
+ /**
1845
+ * Reverts the effect of a previous call to
1846
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
1847
+ * and when it reaches zero, queued "notify" signals are emitted.
1848
+ *
1849
+ * Duplicate notifications for each property are squashed so that at most one
1850
+ * #GObject::notify signal is emitted for each property, in the reverse order
1851
+ * in which they have been queued.
1852
+ *
1853
+ * It is an error to call this function when the freeze count is zero.
1854
+ */
1855
+ thaw_notify(): void;
1856
+ /**
1857
+ * Decreases the reference count of `object`. When its reference count
1858
+ * drops to 0, the object is finalized (i.e. its memory is freed).
1859
+ *
1860
+ * If the pointer to the #GObject may be reused in future (for example, if it is
1861
+ * an instance variable of another object), it is recommended to clear the
1862
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
1863
+ * invalid #GObject instance. Use g_clear_object() for this.
1864
+ */
1865
+ unref(): void;
1866
+ /**
1867
+ * This function essentially limits the life time of the `closure` to
1868
+ * the life time of the object. That is, when the object is finalized,
1869
+ * the `closure` is invalidated by calling g_closure_invalidate() on
1870
+ * it, in order to prevent invocations of the closure with a finalized
1871
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
1872
+ * added as marshal guards to the `closure,` to ensure that an extra
1873
+ * reference count is held on `object` during invocation of the
1874
+ * `closure`. Usually, this function will be called on closures that
1875
+ * use this `object` as closure data.
1876
+ * @param closure #GClosure to watch
1877
+ */
1878
+ watch_closure(closure: GObject.Closure): void;
1879
+ /**
1880
+ * the `constructed` function is called by g_object_new() as the
1881
+ * final step of the object creation process. At the point of the call, all
1882
+ * construction properties have been set on the object. The purpose of this
1883
+ * call is to allow for object initialisation steps that can only be performed
1884
+ * after construction properties have been set. `constructed` implementors
1885
+ * should chain up to the `constructed` call of their parent class to allow it
1886
+ * to complete its initialisation.
1887
+ */
1888
+ vfunc_constructed(): void;
1889
+ /**
1890
+ * emits property change notification for a bunch
1891
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
1892
+ * needed.
1893
+ * @param n_pspecs
1894
+ * @param pspecs
1895
+ */
1896
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
1897
+ /**
1898
+ * the `dispose` function is supposed to drop all references to other
1899
+ * objects, but keep the instance otherwise intact, so that client method
1900
+ * invocations still work. It may be run multiple times (due to reference
1901
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
1902
+ * of the parent class.
1903
+ */
1904
+ vfunc_dispose(): void;
1905
+ /**
1906
+ * instance finalization function, should finish the finalization of
1907
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
1908
+ * parent class.
1909
+ */
1910
+ vfunc_finalize(): void;
1911
+ /**
1912
+ * the generic getter for all properties of this type. Should be
1913
+ * overridden for every type with properties.
1914
+ * @param property_id
1915
+ * @param value
1916
+ * @param pspec
1917
+ */
1918
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1919
+ /**
1920
+ * Emits a "notify" signal for the property `property_name` on `object`.
1921
+ *
1922
+ * When possible, eg. when signaling a property change from within the class
1923
+ * that registered the property, you should use g_object_notify_by_pspec()
1924
+ * instead.
1925
+ *
1926
+ * Note that emission of the notify signal may be blocked with
1927
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1928
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1929
+ * called.
1930
+ * @param pspec
1931
+ */
1932
+ vfunc_notify(pspec: GObject.ParamSpec): void;
1933
+ /**
1934
+ * the generic setter for all properties of this type. Should be
1935
+ * overridden for every type with properties. If implementations of
1936
+ * `set_property` don't emit property change notification explicitly, this will
1937
+ * be done implicitly by the type system. However, if the notify signal is
1938
+ * emitted explicitly, the type system will not emit it a second time.
1939
+ * @param property_id
1940
+ * @param value
1941
+ * @param pspec
1942
+ */
1943
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1944
+ disconnect(id: number): void;
1945
+ set(properties: { [key: string]: any }): void;
1946
+ block_signal_handler(id: number): any;
1947
+ unblock_signal_handler(id: number): any;
1948
+ stop_emission_by_name(detailedName: string): any;
1949
+ }
1950
+
1951
+ module MobileWizard {
1952
+ // Constructor properties interface
1953
+
1954
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1955
+ }
1956
+
1957
+ class MobileWizard extends GObject.Object {
1958
+ static $gtype: GObject.GType<MobileWizard>;
1959
+
1960
+ // Constructors
1961
+
1962
+ constructor(properties?: Partial<MobileWizard.ConstructorProps>, ...args: any[]);
1963
+
1964
+ _init(...args: any[]): void;
1965
+
1966
+ // Methods
1967
+
1968
+ destroy(): void;
1969
+ present(): void;
1970
+ }
1971
+
1972
+ module VpnPasswordDialog {
1973
+ // Constructor properties interface
1974
+
1975
+ interface ConstructorProps
1976
+ extends Gtk.Dialog.ConstructorProps,
1977
+ Atk.ImplementorIface.ConstructorProps,
1978
+ Gtk.Buildable.ConstructorProps {}
1979
+ }
1980
+
1981
+ class VpnPasswordDialog extends Gtk.Dialog implements Atk.ImplementorIface, Gtk.Buildable {
1982
+ static $gtype: GObject.GType<VpnPasswordDialog>;
1983
+
1984
+ // Constructors
1985
+
1986
+ constructor(properties?: Partial<VpnPasswordDialog.ConstructorProps>, ...args: any[]);
1987
+
1988
+ _init(...args: any[]): void;
1989
+
1990
+ static ['new'](title: string, message: string, password: string): VpnPasswordDialog;
1991
+ // Conflicted with Gtk.Dialog.new
1992
+
1993
+ static ['new'](...args: never[]): any;
1994
+
1995
+ // Methods
1996
+
1997
+ focus_password(): void;
1998
+ focus_password_secondary(): void;
1999
+ focus_password_ternary(): void;
2000
+ get_password(): string;
2001
+ get_password_secondary(): string;
2002
+ get_password_ternary(): string;
2003
+ run_and_block(): boolean;
2004
+ set_password(password: string): void;
2005
+ set_password_label(label: string): void;
2006
+ set_password_secondary(password_secondary: string): void;
2007
+ set_password_secondary_label(label: string): void;
2008
+ set_password_ternary(password_ternary: string): void;
2009
+ set_password_ternary_label(label: string): void;
2010
+ set_show_password(show: boolean): void;
2011
+ set_show_password_secondary(show: boolean): void;
2012
+ set_show_password_ternary(show: boolean): void;
2013
+
2014
+ // Inherited methods
2015
+ /**
2016
+ * Creates a binding between `source_property` on `source` and `target_property`
2017
+ * on `target`.
2018
+ *
2019
+ * Whenever the `source_property` is changed the `target_property` is
2020
+ * updated using the same value. For instance:
2021
+ *
2022
+ *
2023
+ * ```c
2024
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
2025
+ * ```
2026
+ *
2027
+ *
2028
+ * Will result in the "sensitive" property of the widget #GObject instance to be
2029
+ * updated with the same value of the "active" property of the action #GObject
2030
+ * instance.
2031
+ *
2032
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
2033
+ * if `target_property` on `target` changes then the `source_property` on `source`
2034
+ * will be updated as well.
2035
+ *
2036
+ * The binding will automatically be removed when either the `source` or the
2037
+ * `target` instances are finalized. To remove the binding without affecting the
2038
+ * `source` and the `target` you can just call g_object_unref() on the returned
2039
+ * #GBinding instance.
2040
+ *
2041
+ * Removing the binding by calling g_object_unref() on it must only be done if
2042
+ * the binding, `source` and `target` are only used from a single thread and it
2043
+ * is clear that both `source` and `target` outlive the binding. Especially it
2044
+ * is not safe to rely on this if the binding, `source` or `target` can be
2045
+ * finalized from different threads. Keep another reference to the binding and
2046
+ * use g_binding_unbind() instead to be on the safe side.
2047
+ *
2048
+ * A #GObject can have multiple bindings.
2049
+ * @param source_property the property on @source to bind
2050
+ * @param target the target #GObject
2051
+ * @param target_property the property on @target to bind
2052
+ * @param flags flags to pass to #GBinding
2053
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
2054
+ */
2055
+ bind_property(
2056
+ source_property: string,
2057
+ target: GObject.Object,
2058
+ target_property: string,
2059
+ flags: GObject.BindingFlags,
2060
+ ): GObject.Binding;
2061
+ /**
2062
+ * Complete version of g_object_bind_property().
2063
+ *
2064
+ * Creates a binding between `source_property` on `source` and `target_property`
2065
+ * on `target,` allowing you to set the transformation functions to be used by
2066
+ * the binding.
2067
+ *
2068
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
2069
+ * if `target_property` on `target` changes then the `source_property` on `source`
2070
+ * will be updated as well. The `transform_from` function is only used in case
2071
+ * of bidirectional bindings, otherwise it will be ignored
2072
+ *
2073
+ * The binding will automatically be removed when either the `source` or the
2074
+ * `target` instances are finalized. This will release the reference that is
2075
+ * being held on the #GBinding instance; if you want to hold on to the
2076
+ * #GBinding instance, you will need to hold a reference to it.
2077
+ *
2078
+ * To remove the binding, call g_binding_unbind().
2079
+ *
2080
+ * A #GObject can have multiple bindings.
2081
+ *
2082
+ * The same `user_data` parameter will be used for both `transform_to`
2083
+ * and `transform_from` transformation functions; the `notify` function will
2084
+ * be called once, when the binding is removed. If you need different data
2085
+ * for each transformation function, please use
2086
+ * g_object_bind_property_with_closures() instead.
2087
+ * @param source_property the property on @source to bind
2088
+ * @param target the target #GObject
2089
+ * @param target_property the property on @target to bind
2090
+ * @param flags flags to pass to #GBinding
2091
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
2092
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
2093
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
2094
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
2095
+ */
2096
+ bind_property_full(
2097
+ source_property: string,
2098
+ target: GObject.Object,
2099
+ target_property: string,
2100
+ flags: GObject.BindingFlags,
2101
+ transform_to?: GObject.BindingTransformFunc | null,
2102
+ transform_from?: GObject.BindingTransformFunc | null,
2103
+ notify?: GLib.DestroyNotify | null,
2104
+ ): GObject.Binding;
2105
+ // Conflicted with GObject.Object.bind_property_full
2106
+ bind_property_full(...args: never[]): any;
2107
+ /**
2108
+ * This function is intended for #GObject implementations to re-enforce
2109
+ * a [floating][floating-ref] object reference. Doing this is seldom
2110
+ * required: all #GInitiallyUnowneds are created with a floating reference
2111
+ * which usually just needs to be sunken by calling g_object_ref_sink().
2112
+ */
2113
+ force_floating(): void;
2114
+ /**
2115
+ * Increases the freeze count on `object`. If the freeze count is
2116
+ * non-zero, the emission of "notify" signals on `object` is
2117
+ * stopped. The signals are queued until the freeze count is decreased
2118
+ * to zero. Duplicate notifications are squashed so that at most one
2119
+ * #GObject::notify signal is emitted for each property modified while the
2120
+ * object is frozen.
2121
+ *
2122
+ * This is necessary for accessors that modify multiple properties to prevent
2123
+ * premature notification while the object is still being modified.
2124
+ */
2125
+ freeze_notify(): void;
2126
+ /**
2127
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
2128
+ * @param key name of the key for that association
2129
+ * @returns the data if found, or %NULL if no such data exists.
2130
+ */
2131
+ get_data(key: string): any | null;
2132
+ get_property(property_name: string): any;
2133
+ /**
2134
+ * This function gets back user data pointers stored via
2135
+ * g_object_set_qdata().
2136
+ * @param quark A #GQuark, naming the user data pointer
2137
+ * @returns The user data pointer set, or %NULL
2138
+ */
2139
+ get_qdata(quark: GLib.Quark): any | null;
2140
+ /**
2141
+ * Gets `n_properties` properties for an `object`.
2142
+ * Obtained properties will be set to `values`. All properties must be valid.
2143
+ * Warnings will be emitted and undefined behaviour may result if invalid
2144
+ * properties are passed in.
2145
+ * @param names the names of each property to get
2146
+ * @param values the values of each property to get
2147
+ */
2148
+ getv(names: string[], values: (GObject.Value | any)[]): void;
2149
+ /**
2150
+ * Checks whether `object` has a [floating][floating-ref] reference.
2151
+ * @returns %TRUE if @object has a floating reference
2152
+ */
2153
+ is_floating(): boolean;
2154
+ /**
2155
+ * Emits a "notify" signal for the property `property_name` on `object`.
2156
+ *
2157
+ * When possible, eg. when signaling a property change from within the class
2158
+ * that registered the property, you should use g_object_notify_by_pspec()
2159
+ * instead.
2160
+ *
2161
+ * Note that emission of the notify signal may be blocked with
2162
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
2163
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
2164
+ * called.
2165
+ * @param property_name the name of a property installed on the class of @object.
2166
+ */
2167
+ notify(property_name: string): void;
2168
+ /**
2169
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
2170
+ *
2171
+ * This function omits the property name lookup, hence it is faster than
2172
+ * g_object_notify().
2173
+ *
2174
+ * One way to avoid using g_object_notify() from within the
2175
+ * class that registered the properties, and using g_object_notify_by_pspec()
2176
+ * instead, is to store the GParamSpec used with
2177
+ * g_object_class_install_property() inside a static array, e.g.:
2178
+ *
2179
+ *
2180
+ * ```c
2181
+ * typedef enum
2182
+ * {
2183
+ * PROP_FOO = 1,
2184
+ * PROP_LAST
2185
+ * } MyObjectProperty;
2186
+ *
2187
+ * static GParamSpec *properties[PROP_LAST];
2188
+ *
2189
+ * static void
2190
+ * my_object_class_init (MyObjectClass *klass)
2191
+ * {
2192
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
2193
+ * 0, 100,
2194
+ * 50,
2195
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
2196
+ * g_object_class_install_property (gobject_class,
2197
+ * PROP_FOO,
2198
+ * properties[PROP_FOO]);
2199
+ * }
2200
+ * ```
2201
+ *
2202
+ *
2203
+ * and then notify a change on the "foo" property with:
2204
+ *
2205
+ *
2206
+ * ```c
2207
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
2208
+ * ```
2209
+ *
2210
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
2211
+ */
2212
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
2213
+ /**
2214
+ * Increases the reference count of `object`.
2215
+ *
2216
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
2217
+ * of `object` will be propagated to the return type (using the GCC typeof()
2218
+ * extension), so any casting the caller needs to do on the return type must be
2219
+ * explicit.
2220
+ * @returns the same @object
2221
+ */
2222
+ ref(): GObject.Object;
2223
+ /**
2224
+ * Increase the reference count of `object,` and possibly remove the
2225
+ * [floating][floating-ref] reference, if `object` has a floating reference.
2226
+ *
2227
+ * In other words, if the object is floating, then this call "assumes
2228
+ * ownership" of the floating reference, converting it to a normal
2229
+ * reference by clearing the floating flag while leaving the reference
2230
+ * count unchanged. If the object is not floating, then this call
2231
+ * adds a new normal reference increasing the reference count by one.
2232
+ *
2233
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
2234
+ * under the same conditions as for g_object_ref().
2235
+ * @returns @object
2236
+ */
2237
+ ref_sink(): GObject.Object;
2238
+ /**
2239
+ * Releases all references to other objects. This can be used to break
2240
+ * reference cycles.
2241
+ *
2242
+ * This function should only be called from object system implementations.
2243
+ */
2244
+ run_dispose(): void;
2245
+ /**
2246
+ * Each object carries around a table of associations from
2247
+ * strings to pointers. This function lets you set an association.
2248
+ *
2249
+ * If the object already had an association with that name,
2250
+ * the old association will be destroyed.
2251
+ *
2252
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
2253
+ * This means a copy of `key` is kept permanently (even after `object` has been
2254
+ * finalized) — so it is recommended to only use a small, bounded set of values
2255
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
2256
+ * @param key name of the key
2257
+ * @param data data to associate with that key
2258
+ */
2259
+ set_data(key: string, data?: any | null): void;
2260
+ set_property(property_name: string, value: any): void;
2261
+ /**
2262
+ * Remove a specified datum from the object's data associations,
2263
+ * without invoking the association's destroy handler.
2264
+ * @param key name of the key
2265
+ * @returns the data if found, or %NULL if no such data exists.
2266
+ */
2267
+ steal_data(key: string): any | null;
2268
+ /**
2269
+ * This function gets back user data pointers stored via
2270
+ * g_object_set_qdata() and removes the `data` from object
2271
+ * without invoking its destroy() function (if any was
2272
+ * set).
2273
+ * Usually, calling this function is only required to update
2274
+ * user data pointers with a destroy notifier, for example:
2275
+ *
2276
+ * ```c
2277
+ * void
2278
+ * object_add_to_user_list (GObject *object,
2279
+ * const gchar *new_string)
2280
+ * {
2281
+ * // the quark, naming the object data
2282
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
2283
+ * // retrieve the old string list
2284
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
2285
+ *
2286
+ * // prepend new string
2287
+ * list = g_list_prepend (list, g_strdup (new_string));
2288
+ * // this changed 'list', so we need to set it again
2289
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
2290
+ * }
2291
+ * static void
2292
+ * free_string_list (gpointer data)
2293
+ * {
2294
+ * GList *node, *list = data;
2295
+ *
2296
+ * for (node = list; node; node = node->next)
2297
+ * g_free (node->data);
2298
+ * g_list_free (list);
2299
+ * }
2300
+ * ```
2301
+ *
2302
+ * Using g_object_get_qdata() in the above example, instead of
2303
+ * g_object_steal_qdata() would have left the destroy function set,
2304
+ * and thus the partial string list would have been freed upon
2305
+ * g_object_set_qdata_full().
2306
+ * @param quark A #GQuark, naming the user data pointer
2307
+ * @returns The user data pointer set, or %NULL
2308
+ */
2309
+ steal_qdata(quark: GLib.Quark): any | null;
2310
+ /**
2311
+ * Reverts the effect of a previous call to
2312
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
2313
+ * and when it reaches zero, queued "notify" signals are emitted.
2314
+ *
2315
+ * Duplicate notifications for each property are squashed so that at most one
2316
+ * #GObject::notify signal is emitted for each property, in the reverse order
2317
+ * in which they have been queued.
2318
+ *
2319
+ * It is an error to call this function when the freeze count is zero.
2320
+ */
2321
+ thaw_notify(): void;
2322
+ /**
2323
+ * Decreases the reference count of `object`. When its reference count
2324
+ * drops to 0, the object is finalized (i.e. its memory is freed).
2325
+ *
2326
+ * If the pointer to the #GObject may be reused in future (for example, if it is
2327
+ * an instance variable of another object), it is recommended to clear the
2328
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
2329
+ * invalid #GObject instance. Use g_clear_object() for this.
2330
+ */
2331
+ unref(): void;
2332
+ /**
2333
+ * This function essentially limits the life time of the `closure` to
2334
+ * the life time of the object. That is, when the object is finalized,
2335
+ * the `closure` is invalidated by calling g_closure_invalidate() on
2336
+ * it, in order to prevent invocations of the closure with a finalized
2337
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
2338
+ * added as marshal guards to the `closure,` to ensure that an extra
2339
+ * reference count is held on `object` during invocation of the
2340
+ * `closure`. Usually, this function will be called on closures that
2341
+ * use this `object` as closure data.
2342
+ * @param closure #GClosure to watch
2343
+ */
2344
+ watch_closure(closure: GObject.Closure): void;
2345
+ /**
2346
+ * the `constructed` function is called by g_object_new() as the
2347
+ * final step of the object creation process. At the point of the call, all
2348
+ * construction properties have been set on the object. The purpose of this
2349
+ * call is to allow for object initialisation steps that can only be performed
2350
+ * after construction properties have been set. `constructed` implementors
2351
+ * should chain up to the `constructed` call of their parent class to allow it
2352
+ * to complete its initialisation.
2353
+ */
2354
+ vfunc_constructed(): void;
2355
+ /**
2356
+ * emits property change notification for a bunch
2357
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
2358
+ * needed.
2359
+ * @param n_pspecs
2360
+ * @param pspecs
2361
+ */
2362
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
2363
+ /**
2364
+ * the `dispose` function is supposed to drop all references to other
2365
+ * objects, but keep the instance otherwise intact, so that client method
2366
+ * invocations still work. It may be run multiple times (due to reference
2367
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
2368
+ * of the parent class.
2369
+ */
2370
+ vfunc_dispose(): void;
2371
+ /**
2372
+ * instance finalization function, should finish the finalization of
2373
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
2374
+ * parent class.
2375
+ */
2376
+ vfunc_finalize(): void;
2377
+ /**
2378
+ * the generic getter for all properties of this type. Should be
2379
+ * overridden for every type with properties.
2380
+ * @param property_id
2381
+ * @param value
2382
+ * @param pspec
2383
+ */
2384
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2385
+ /**
2386
+ * Emits a "notify" signal for the property `property_name` on `object`.
2387
+ *
2388
+ * When possible, eg. when signaling a property change from within the class
2389
+ * that registered the property, you should use g_object_notify_by_pspec()
2390
+ * instead.
2391
+ *
2392
+ * Note that emission of the notify signal may be blocked with
2393
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
2394
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
2395
+ * called.
2396
+ * @param pspec
2397
+ */
2398
+ vfunc_notify(pspec: GObject.ParamSpec): void;
2399
+ /**
2400
+ * the generic setter for all properties of this type. Should be
2401
+ * overridden for every type with properties. If implementations of
2402
+ * `set_property` don't emit property change notification explicitly, this will
2403
+ * be done implicitly by the type system. However, if the notify signal is
2404
+ * emitted explicitly, the type system will not emit it a second time.
2405
+ * @param property_id
2406
+ * @param value
2407
+ * @param pspec
2408
+ */
2409
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2410
+ disconnect(id: number): void;
2411
+ set(properties: { [key: string]: any }): void;
2412
+ block_signal_handler(id: number): any;
2413
+ unblock_signal_handler(id: number): any;
2414
+ stop_emission_by_name(detailedName: string): any;
2415
+ }
2416
+
2417
+ module WifiDialog {
2418
+ // Constructor properties interface
2419
+
2420
+ interface ConstructorProps
2421
+ extends Gtk.Dialog.ConstructorProps,
2422
+ Atk.ImplementorIface.ConstructorProps,
2423
+ Gtk.Buildable.ConstructorProps {}
2424
+ }
2425
+
2426
+ class WifiDialog extends Gtk.Dialog implements Atk.ImplementorIface, Gtk.Buildable {
2427
+ static $gtype: GObject.GType<WifiDialog>;
2428
+
2429
+ // Constructors
2430
+
2431
+ constructor(properties?: Partial<WifiDialog.ConstructorProps>, ...args: any[]);
2432
+
2433
+ _init(...args: any[]): void;
2434
+
2435
+ static ['new'](
2436
+ client: NM.Client,
2437
+ connection: NM.Connection,
2438
+ device: NM.Device,
2439
+ ap: NM.AccessPoint,
2440
+ secrets_only: boolean,
2441
+ ): WifiDialog;
2442
+ // Conflicted with Gtk.Dialog.new
2443
+
2444
+ static ['new'](...args: never[]): any;
2445
+
2446
+ static new_for_create(client: NM.Client): WifiDialog;
2447
+
2448
+ static new_for_hidden(client: NM.Client): WifiDialog;
2449
+
2450
+ static new_for_other(client: NM.Client): WifiDialog;
2451
+
2452
+ static new_for_secrets(
2453
+ client: NM.Client,
2454
+ connection: NM.Connection,
2455
+ secrets_setting_name: string,
2456
+ secrets_hints: string,
2457
+ ): WifiDialog;
2458
+
2459
+ // Methods
2460
+
2461
+ get_connection(): [NM.Connection, NM.Device, NM.AccessPoint];
2462
+ get_nag_ignored(): boolean;
2463
+ nag_user(): Gtk.Widget;
2464
+ set_nag_ignored(ignored: boolean): void;
2465
+
2466
+ // Inherited methods
2467
+ /**
2468
+ * Creates a binding between `source_property` on `source` and `target_property`
2469
+ * on `target`.
2470
+ *
2471
+ * Whenever the `source_property` is changed the `target_property` is
2472
+ * updated using the same value. For instance:
2473
+ *
2474
+ *
2475
+ * ```c
2476
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
2477
+ * ```
2478
+ *
2479
+ *
2480
+ * Will result in the "sensitive" property of the widget #GObject instance to be
2481
+ * updated with the same value of the "active" property of the action #GObject
2482
+ * instance.
2483
+ *
2484
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
2485
+ * if `target_property` on `target` changes then the `source_property` on `source`
2486
+ * will be updated as well.
2487
+ *
2488
+ * The binding will automatically be removed when either the `source` or the
2489
+ * `target` instances are finalized. To remove the binding without affecting the
2490
+ * `source` and the `target` you can just call g_object_unref() on the returned
2491
+ * #GBinding instance.
2492
+ *
2493
+ * Removing the binding by calling g_object_unref() on it must only be done if
2494
+ * the binding, `source` and `target` are only used from a single thread and it
2495
+ * is clear that both `source` and `target` outlive the binding. Especially it
2496
+ * is not safe to rely on this if the binding, `source` or `target` can be
2497
+ * finalized from different threads. Keep another reference to the binding and
2498
+ * use g_binding_unbind() instead to be on the safe side.
2499
+ *
2500
+ * A #GObject can have multiple bindings.
2501
+ * @param source_property the property on @source to bind
2502
+ * @param target the target #GObject
2503
+ * @param target_property the property on @target to bind
2504
+ * @param flags flags to pass to #GBinding
2505
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
2506
+ */
2507
+ bind_property(
2508
+ source_property: string,
2509
+ target: GObject.Object,
2510
+ target_property: string,
2511
+ flags: GObject.BindingFlags,
2512
+ ): GObject.Binding;
2513
+ /**
2514
+ * Complete version of g_object_bind_property().
2515
+ *
2516
+ * Creates a binding between `source_property` on `source` and `target_property`
2517
+ * on `target,` allowing you to set the transformation functions to be used by
2518
+ * the binding.
2519
+ *
2520
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
2521
+ * if `target_property` on `target` changes then the `source_property` on `source`
2522
+ * will be updated as well. The `transform_from` function is only used in case
2523
+ * of bidirectional bindings, otherwise it will be ignored
2524
+ *
2525
+ * The binding will automatically be removed when either the `source` or the
2526
+ * `target` instances are finalized. This will release the reference that is
2527
+ * being held on the #GBinding instance; if you want to hold on to the
2528
+ * #GBinding instance, you will need to hold a reference to it.
2529
+ *
2530
+ * To remove the binding, call g_binding_unbind().
2531
+ *
2532
+ * A #GObject can have multiple bindings.
2533
+ *
2534
+ * The same `user_data` parameter will be used for both `transform_to`
2535
+ * and `transform_from` transformation functions; the `notify` function will
2536
+ * be called once, when the binding is removed. If you need different data
2537
+ * for each transformation function, please use
2538
+ * g_object_bind_property_with_closures() instead.
2539
+ * @param source_property the property on @source to bind
2540
+ * @param target the target #GObject
2541
+ * @param target_property the property on @target to bind
2542
+ * @param flags flags to pass to #GBinding
2543
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
2544
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
2545
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
2546
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
2547
+ */
2548
+ bind_property_full(
2549
+ source_property: string,
2550
+ target: GObject.Object,
2551
+ target_property: string,
2552
+ flags: GObject.BindingFlags,
2553
+ transform_to?: GObject.BindingTransformFunc | null,
2554
+ transform_from?: GObject.BindingTransformFunc | null,
2555
+ notify?: GLib.DestroyNotify | null,
2556
+ ): GObject.Binding;
2557
+ // Conflicted with GObject.Object.bind_property_full
2558
+ bind_property_full(...args: never[]): any;
2559
+ /**
2560
+ * This function is intended for #GObject implementations to re-enforce
2561
+ * a [floating][floating-ref] object reference. Doing this is seldom
2562
+ * required: all #GInitiallyUnowneds are created with a floating reference
2563
+ * which usually just needs to be sunken by calling g_object_ref_sink().
2564
+ */
2565
+ force_floating(): void;
2566
+ /**
2567
+ * Increases the freeze count on `object`. If the freeze count is
2568
+ * non-zero, the emission of "notify" signals on `object` is
2569
+ * stopped. The signals are queued until the freeze count is decreased
2570
+ * to zero. Duplicate notifications are squashed so that at most one
2571
+ * #GObject::notify signal is emitted for each property modified while the
2572
+ * object is frozen.
2573
+ *
2574
+ * This is necessary for accessors that modify multiple properties to prevent
2575
+ * premature notification while the object is still being modified.
2576
+ */
2577
+ freeze_notify(): void;
2578
+ /**
2579
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
2580
+ * @param key name of the key for that association
2581
+ * @returns the data if found, or %NULL if no such data exists.
2582
+ */
2583
+ get_data(key: string): any | null;
2584
+ get_property(property_name: string): any;
2585
+ /**
2586
+ * This function gets back user data pointers stored via
2587
+ * g_object_set_qdata().
2588
+ * @param quark A #GQuark, naming the user data pointer
2589
+ * @returns The user data pointer set, or %NULL
2590
+ */
2591
+ get_qdata(quark: GLib.Quark): any | null;
2592
+ /**
2593
+ * Gets `n_properties` properties for an `object`.
2594
+ * Obtained properties will be set to `values`. All properties must be valid.
2595
+ * Warnings will be emitted and undefined behaviour may result if invalid
2596
+ * properties are passed in.
2597
+ * @param names the names of each property to get
2598
+ * @param values the values of each property to get
2599
+ */
2600
+ getv(names: string[], values: (GObject.Value | any)[]): void;
2601
+ /**
2602
+ * Checks whether `object` has a [floating][floating-ref] reference.
2603
+ * @returns %TRUE if @object has a floating reference
2604
+ */
2605
+ is_floating(): boolean;
2606
+ /**
2607
+ * Emits a "notify" signal for the property `property_name` on `object`.
2608
+ *
2609
+ * When possible, eg. when signaling a property change from within the class
2610
+ * that registered the property, you should use g_object_notify_by_pspec()
2611
+ * instead.
2612
+ *
2613
+ * Note that emission of the notify signal may be blocked with
2614
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
2615
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
2616
+ * called.
2617
+ * @param property_name the name of a property installed on the class of @object.
2618
+ */
2619
+ notify(property_name: string): void;
2620
+ /**
2621
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
2622
+ *
2623
+ * This function omits the property name lookup, hence it is faster than
2624
+ * g_object_notify().
2625
+ *
2626
+ * One way to avoid using g_object_notify() from within the
2627
+ * class that registered the properties, and using g_object_notify_by_pspec()
2628
+ * instead, is to store the GParamSpec used with
2629
+ * g_object_class_install_property() inside a static array, e.g.:
2630
+ *
2631
+ *
2632
+ * ```c
2633
+ * typedef enum
2634
+ * {
2635
+ * PROP_FOO = 1,
2636
+ * PROP_LAST
2637
+ * } MyObjectProperty;
2638
+ *
2639
+ * static GParamSpec *properties[PROP_LAST];
2640
+ *
2641
+ * static void
2642
+ * my_object_class_init (MyObjectClass *klass)
2643
+ * {
2644
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
2645
+ * 0, 100,
2646
+ * 50,
2647
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
2648
+ * g_object_class_install_property (gobject_class,
2649
+ * PROP_FOO,
2650
+ * properties[PROP_FOO]);
2651
+ * }
2652
+ * ```
2653
+ *
2654
+ *
2655
+ * and then notify a change on the "foo" property with:
2656
+ *
2657
+ *
2658
+ * ```c
2659
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
2660
+ * ```
2661
+ *
2662
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
2663
+ */
2664
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
2665
+ /**
2666
+ * Increases the reference count of `object`.
2667
+ *
2668
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
2669
+ * of `object` will be propagated to the return type (using the GCC typeof()
2670
+ * extension), so any casting the caller needs to do on the return type must be
2671
+ * explicit.
2672
+ * @returns the same @object
2673
+ */
2674
+ ref(): GObject.Object;
2675
+ /**
2676
+ * Increase the reference count of `object,` and possibly remove the
2677
+ * [floating][floating-ref] reference, if `object` has a floating reference.
2678
+ *
2679
+ * In other words, if the object is floating, then this call "assumes
2680
+ * ownership" of the floating reference, converting it to a normal
2681
+ * reference by clearing the floating flag while leaving the reference
2682
+ * count unchanged. If the object is not floating, then this call
2683
+ * adds a new normal reference increasing the reference count by one.
2684
+ *
2685
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
2686
+ * under the same conditions as for g_object_ref().
2687
+ * @returns @object
2688
+ */
2689
+ ref_sink(): GObject.Object;
2690
+ /**
2691
+ * Releases all references to other objects. This can be used to break
2692
+ * reference cycles.
2693
+ *
2694
+ * This function should only be called from object system implementations.
2695
+ */
2696
+ run_dispose(): void;
2697
+ /**
2698
+ * Each object carries around a table of associations from
2699
+ * strings to pointers. This function lets you set an association.
2700
+ *
2701
+ * If the object already had an association with that name,
2702
+ * the old association will be destroyed.
2703
+ *
2704
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
2705
+ * This means a copy of `key` is kept permanently (even after `object` has been
2706
+ * finalized) — so it is recommended to only use a small, bounded set of values
2707
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
2708
+ * @param key name of the key
2709
+ * @param data data to associate with that key
2710
+ */
2711
+ set_data(key: string, data?: any | null): void;
2712
+ set_property(property_name: string, value: any): void;
2713
+ /**
2714
+ * Remove a specified datum from the object's data associations,
2715
+ * without invoking the association's destroy handler.
2716
+ * @param key name of the key
2717
+ * @returns the data if found, or %NULL if no such data exists.
2718
+ */
2719
+ steal_data(key: string): any | null;
2720
+ /**
2721
+ * This function gets back user data pointers stored via
2722
+ * g_object_set_qdata() and removes the `data` from object
2723
+ * without invoking its destroy() function (if any was
2724
+ * set).
2725
+ * Usually, calling this function is only required to update
2726
+ * user data pointers with a destroy notifier, for example:
2727
+ *
2728
+ * ```c
2729
+ * void
2730
+ * object_add_to_user_list (GObject *object,
2731
+ * const gchar *new_string)
2732
+ * {
2733
+ * // the quark, naming the object data
2734
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
2735
+ * // retrieve the old string list
2736
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
2737
+ *
2738
+ * // prepend new string
2739
+ * list = g_list_prepend (list, g_strdup (new_string));
2740
+ * // this changed 'list', so we need to set it again
2741
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
2742
+ * }
2743
+ * static void
2744
+ * free_string_list (gpointer data)
2745
+ * {
2746
+ * GList *node, *list = data;
2747
+ *
2748
+ * for (node = list; node; node = node->next)
2749
+ * g_free (node->data);
2750
+ * g_list_free (list);
2751
+ * }
2752
+ * ```
2753
+ *
2754
+ * Using g_object_get_qdata() in the above example, instead of
2755
+ * g_object_steal_qdata() would have left the destroy function set,
2756
+ * and thus the partial string list would have been freed upon
2757
+ * g_object_set_qdata_full().
2758
+ * @param quark A #GQuark, naming the user data pointer
2759
+ * @returns The user data pointer set, or %NULL
2760
+ */
2761
+ steal_qdata(quark: GLib.Quark): any | null;
2762
+ /**
2763
+ * Reverts the effect of a previous call to
2764
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
2765
+ * and when it reaches zero, queued "notify" signals are emitted.
2766
+ *
2767
+ * Duplicate notifications for each property are squashed so that at most one
2768
+ * #GObject::notify signal is emitted for each property, in the reverse order
2769
+ * in which they have been queued.
2770
+ *
2771
+ * It is an error to call this function when the freeze count is zero.
2772
+ */
2773
+ thaw_notify(): void;
2774
+ /**
2775
+ * Decreases the reference count of `object`. When its reference count
2776
+ * drops to 0, the object is finalized (i.e. its memory is freed).
2777
+ *
2778
+ * If the pointer to the #GObject may be reused in future (for example, if it is
2779
+ * an instance variable of another object), it is recommended to clear the
2780
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
2781
+ * invalid #GObject instance. Use g_clear_object() for this.
2782
+ */
2783
+ unref(): void;
2784
+ /**
2785
+ * This function essentially limits the life time of the `closure` to
2786
+ * the life time of the object. That is, when the object is finalized,
2787
+ * the `closure` is invalidated by calling g_closure_invalidate() on
2788
+ * it, in order to prevent invocations of the closure with a finalized
2789
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
2790
+ * added as marshal guards to the `closure,` to ensure that an extra
2791
+ * reference count is held on `object` during invocation of the
2792
+ * `closure`. Usually, this function will be called on closures that
2793
+ * use this `object` as closure data.
2794
+ * @param closure #GClosure to watch
2795
+ */
2796
+ watch_closure(closure: GObject.Closure): void;
2797
+ /**
2798
+ * the `constructed` function is called by g_object_new() as the
2799
+ * final step of the object creation process. At the point of the call, all
2800
+ * construction properties have been set on the object. The purpose of this
2801
+ * call is to allow for object initialisation steps that can only be performed
2802
+ * after construction properties have been set. `constructed` implementors
2803
+ * should chain up to the `constructed` call of their parent class to allow it
2804
+ * to complete its initialisation.
2805
+ */
2806
+ vfunc_constructed(): void;
2807
+ /**
2808
+ * emits property change notification for a bunch
2809
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
2810
+ * needed.
2811
+ * @param n_pspecs
2812
+ * @param pspecs
2813
+ */
2814
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
2815
+ /**
2816
+ * the `dispose` function is supposed to drop all references to other
2817
+ * objects, but keep the instance otherwise intact, so that client method
2818
+ * invocations still work. It may be run multiple times (due to reference
2819
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
2820
+ * of the parent class.
2821
+ */
2822
+ vfunc_dispose(): void;
2823
+ /**
2824
+ * instance finalization function, should finish the finalization of
2825
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
2826
+ * parent class.
2827
+ */
2828
+ vfunc_finalize(): void;
2829
+ /**
2830
+ * the generic getter for all properties of this type. Should be
2831
+ * overridden for every type with properties.
2832
+ * @param property_id
2833
+ * @param value
2834
+ * @param pspec
2835
+ */
2836
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2837
+ /**
2838
+ * Emits a "notify" signal for the property `property_name` on `object`.
2839
+ *
2840
+ * When possible, eg. when signaling a property change from within the class
2841
+ * that registered the property, you should use g_object_notify_by_pspec()
2842
+ * instead.
2843
+ *
2844
+ * Note that emission of the notify signal may be blocked with
2845
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
2846
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
2847
+ * called.
2848
+ * @param pspec
2849
+ */
2850
+ vfunc_notify(pspec: GObject.ParamSpec): void;
2851
+ /**
2852
+ * the generic setter for all properties of this type. Should be
2853
+ * overridden for every type with properties. If implementations of
2854
+ * `set_property` don't emit property change notification explicitly, this will
2855
+ * be done implicitly by the type system. However, if the notify signal is
2856
+ * emitted explicitly, the type system will not emit it a second time.
2857
+ * @param property_id
2858
+ * @param value
2859
+ * @param pspec
2860
+ */
2861
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2862
+ disconnect(id: number): void;
2863
+ set(properties: { [key: string]: any }): void;
2864
+ block_signal_handler(id: number): any;
2865
+ unblock_signal_handler(id: number): any;
2866
+ stop_emission_by_name(detailedName: string): any;
2867
+ }
2868
+
2869
+ type BarCodeClass = typeof BarCode;
2870
+ type BarCodeWidgetClass = typeof BarCodeWidget;
2871
+ type CertChooserClass = typeof CertChooser;
2872
+ abstract class CountryInfo {
2873
+ static $gtype: GObject.GType<CountryInfo>;
2874
+
2875
+ // Constructors
2876
+
2877
+ _init(...args: any[]): void;
2878
+
2879
+ // Methods
2880
+
2881
+ get_country_code(): string;
2882
+ get_country_name(): string;
2883
+ get_providers(): MobileProvider[];
2884
+ ref(): CountryInfo;
2885
+ unref(): void;
2886
+ }
2887
+
2888
+ abstract class MobileAccessMethod {
2889
+ static $gtype: GObject.GType<MobileAccessMethod>;
2890
+
2891
+ // Constructors
2892
+
2893
+ _init(...args: any[]): void;
2894
+
2895
+ // Methods
2896
+
2897
+ get_3gpp_apn(): string;
2898
+ get_dns(): string[];
2899
+ get_family(): MobileFamily;
2900
+ get_gateway(): string;
2901
+ get_name(): string;
2902
+ get_password(): string;
2903
+ get_username(): string;
2904
+ ref(): MobileAccessMethod;
2905
+ unref(): void;
2906
+ }
2907
+
2908
+ abstract class MobileProvider {
2909
+ static $gtype: GObject.GType<MobileProvider>;
2910
+
2911
+ // Constructors
2912
+
2913
+ _init(...args: any[]): void;
2914
+
2915
+ // Methods
2916
+
2917
+ get_3gpp_mcc_mnc(): string[];
2918
+ get_cdma_sid(): number[];
2919
+ get_methods(): MobileAccessMethod[];
2920
+ get_name(): string;
2921
+ ref(): MobileProvider;
2922
+ unref(): void;
2923
+ }
2924
+
2925
+ type MobileProvidersDatabaseClass = typeof MobileProvidersDatabase;
2926
+ abstract class MobileProvidersDatabasePrivate {
2927
+ static $gtype: GObject.GType<MobileProvidersDatabasePrivate>;
2928
+
2929
+ // Constructors
2930
+
2931
+ _init(...args: any[]): void;
2932
+ }
2933
+
2934
+ /**
2935
+ * Network access method details.
2936
+ */
2937
+ class MobileWizardAccessMethod {
2938
+ static $gtype: GObject.GType<MobileWizardAccessMethod>;
2939
+
2940
+ // Fields
2941
+
2942
+ provider_name: string;
2943
+ plan_name: string;
2944
+ devtype: NM.DeviceModemCapabilities;
2945
+ username: string;
2946
+ password: string;
2947
+ gsm_apn: string;
2948
+
2949
+ // Constructors
2950
+
2951
+ _init(...args: any[]): void;
2952
+ }
2953
+
2954
+ type MobileWizardClass = typeof MobileWizard;
2955
+ type VpnPasswordDialogClass = typeof VpnPasswordDialog;
2956
+ type WifiDialogClass = typeof WifiDialog;
2957
+ abstract class Ws {
2958
+ static $gtype: GObject.GType<Ws>;
2959
+
2960
+ // Constructors
2961
+
2962
+ _init(...args: any[]): void;
2963
+
2964
+ // Methods
2965
+
2966
+ adhoc_compatible(): boolean;
2967
+ hotspot_compatible(): boolean;
2968
+ validate(): boolean;
2969
+ }
2970
+
2971
+ abstract class Ws8021x {
2972
+ static $gtype: GObject.GType<Ws8021x>;
2973
+
2974
+ // Constructors
2975
+
2976
+ _init(...args: any[]): void;
2977
+ }
2978
+
2979
+ abstract class Ws8021xClass {
2980
+ static $gtype: GObject.GType<Ws8021xClass>;
2981
+
2982
+ // Constructors
2983
+
2984
+ _init(...args: any[]): void;
2985
+ }
2986
+
2987
+ abstract class WsDynamicWep {
2988
+ static $gtype: GObject.GType<WsDynamicWep>;
2989
+
2990
+ // Constructors
2991
+
2992
+ _init(...args: any[]): void;
2993
+ }
2994
+
2995
+ abstract class WsDynamicWepClass {
2996
+ static $gtype: GObject.GType<WsDynamicWepClass>;
2997
+
2998
+ // Constructors
2999
+
3000
+ _init(...args: any[]): void;
3001
+ }
3002
+
3003
+ abstract class WsInterface {
3004
+ static $gtype: GObject.GType<WsInterface>;
3005
+
3006
+ // Constructors
3007
+
3008
+ _init(...args: any[]): void;
3009
+ }
3010
+
3011
+ abstract class WsLeap {
3012
+ static $gtype: GObject.GType<WsLeap>;
3013
+
3014
+ // Constructors
3015
+
3016
+ _init(...args: any[]): void;
3017
+ }
3018
+
3019
+ abstract class WsLeapClass {
3020
+ static $gtype: GObject.GType<WsLeapClass>;
3021
+
3022
+ // Constructors
3023
+
3024
+ _init(...args: any[]): void;
3025
+ }
3026
+
3027
+ abstract class WsOwe {
3028
+ static $gtype: GObject.GType<WsOwe>;
3029
+
3030
+ // Constructors
3031
+
3032
+ _init(...args: any[]): void;
3033
+ }
3034
+
3035
+ abstract class WsOweClass {
3036
+ static $gtype: GObject.GType<WsOweClass>;
3037
+
3038
+ // Constructors
3039
+
3040
+ _init(...args: any[]): void;
3041
+ }
3042
+
3043
+ abstract class WsSae {
3044
+ static $gtype: GObject.GType<WsSae>;
3045
+
3046
+ // Constructors
3047
+
3048
+ _init(...args: any[]): void;
3049
+ }
3050
+
3051
+ abstract class WsSaeClass {
3052
+ static $gtype: GObject.GType<WsSaeClass>;
3053
+
3054
+ // Constructors
3055
+
3056
+ _init(...args: any[]): void;
3057
+ }
3058
+
3059
+ abstract class WsWepKey {
3060
+ static $gtype: GObject.GType<WsWepKey>;
3061
+
3062
+ // Constructors
3063
+
3064
+ _init(...args: any[]): void;
3065
+ }
3066
+
3067
+ abstract class WsWepKeyClass {
3068
+ static $gtype: GObject.GType<WsWepKeyClass>;
3069
+
3070
+ // Constructors
3071
+
3072
+ _init(...args: any[]): void;
3073
+ }
3074
+
3075
+ abstract class WsWpaEap {
3076
+ static $gtype: GObject.GType<WsWpaEap>;
3077
+
3078
+ // Constructors
3079
+
3080
+ _init(...args: any[]): void;
3081
+ }
3082
+
3083
+ abstract class WsWpaEapClass {
3084
+ static $gtype: GObject.GType<WsWpaEapClass>;
3085
+
3086
+ // Constructors
3087
+
3088
+ _init(...args: any[]): void;
3089
+ }
3090
+
3091
+ abstract class WsWpaPsk {
3092
+ static $gtype: GObject.GType<WsWpaPsk>;
3093
+
3094
+ // Constructors
3095
+
3096
+ _init(...args: any[]): void;
3097
+ }
3098
+
3099
+ abstract class WsWpaPskClass {
3100
+ static $gtype: GObject.GType<WsWpaPskClass>;
3101
+
3102
+ // Constructors
3103
+
3104
+ _init(...args: any[]): void;
3105
+ }
3106
+
3107
+ /**
3108
+ * Name of the imported GIR library
3109
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
3110
+ */
3111
+ const __name__: string;
3112
+ /**
3113
+ * Version of the imported GIR library
3114
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
3115
+ */
3116
+ const __version__: string;
3117
+ }
3118
+
3119
+ export default NMA;
3120
+
3121
+ // END