@girs/msg-1 1.0.0-4.0.0-beta.37

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/msg-1.d.ts ADDED
@@ -0,0 +1,2693 @@
1
+ /**
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ *
7
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ import '@girs/gjs';
11
+
12
+ // Module dependencies
13
+ import type GLib from '@girs/glib-2.0';
14
+ import type GObject from '@girs/gobject-2.0';
15
+ import type Gio from '@girs/gio-2.0';
16
+ import type GModule from '@girs/gmodule-2.0';
17
+ import type Goa from '@girs/goa-1.0';
18
+ import type Json from '@girs/json-1.0';
19
+ import type Soup from '@girs/soup-3.0';
20
+
21
+ export namespace Msg {
22
+ /**
23
+ * Msg-1
24
+ */
25
+
26
+ export namespace DriveType {
27
+ export const $gtype: GObject.GType<DriveType>;
28
+ }
29
+
30
+ enum DriveType {
31
+ PERSONAL,
32
+ BUSINESS,
33
+ DOCUMENT_LIBRARY,
34
+ }
35
+ class Error extends GLib.Error {
36
+ static $gtype: GObject.GType<Error>;
37
+
38
+ // Static fields
39
+
40
+ static FAILED: number;
41
+ static PROTOCOL_ERROR: number;
42
+
43
+ // Constructors
44
+
45
+ constructor(options: { message: string; code: number });
46
+ _init(...args: any[]): void;
47
+ }
48
+
49
+ class MailFolderType {
50
+ static $gtype: GObject.GType<MailFolderType>;
51
+
52
+ // Static fields
53
+
54
+ static '0': number;
55
+ static INBOX: number;
56
+ static DRAFTS: number;
57
+ static SENT_ITEMS: number;
58
+ static JUNK_EMAIL: number;
59
+ static DELETED_ITEMS: number;
60
+ static OUTBOX: number;
61
+ static ARCHIVE: number;
62
+ static OTHER: number;
63
+ static MAX: number;
64
+
65
+ // Constructors
66
+
67
+ _init(...args: any[]): void;
68
+ }
69
+
70
+ const API_ENDPOINT: string;
71
+ const BETA_API_ENDPOINT: string;
72
+ function error_quark(): number;
73
+ function json_object_get_boolean(object: Json.Object, name: string): boolean;
74
+ function json_object_get_string(object: Json.Object, name: string): string;
75
+ namespace Drive {
76
+ // Signal signatures
77
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
78
+
79
+ // Constructor properties interface
80
+
81
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
82
+ }
83
+
84
+ class Drive extends GObject.Object {
85
+ static $gtype: GObject.GType<Drive>;
86
+
87
+ /**
88
+ * Compile-time signal type information.
89
+ *
90
+ * This instance property is generated only for TypeScript type checking.
91
+ * It is not defined at runtime and should not be accessed in JS code.
92
+ * @internal
93
+ */
94
+ $signals: Drive.SignalSignatures;
95
+
96
+ // Constructors
97
+
98
+ constructor(properties?: Partial<Drive.ConstructorProps>, ...args: any[]);
99
+
100
+ _init(...args: any[]): void;
101
+
102
+ static ['new'](): Drive;
103
+
104
+ static new_from_json(object: Json.Object): Drive;
105
+
106
+ // Signals
107
+
108
+ connect<K extends keyof Drive.SignalSignatures>(
109
+ signal: K,
110
+ callback: GObject.SignalCallback<this, Drive.SignalSignatures[K]>,
111
+ ): number;
112
+ connect(signal: string, callback: (...args: any[]) => any): number;
113
+ connect_after<K extends keyof Drive.SignalSignatures>(
114
+ signal: K,
115
+ callback: GObject.SignalCallback<this, Drive.SignalSignatures[K]>,
116
+ ): number;
117
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
118
+ emit<K extends keyof Drive.SignalSignatures>(
119
+ signal: K,
120
+ ...args: GObject.GjsParameters<Drive.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
121
+ ): void;
122
+ emit(signal: string, ...args: any[]): void;
123
+
124
+ // Methods
125
+
126
+ get_created(): GLib.DateTime;
127
+ get_drive_type(): DriveType;
128
+ get_id(): string;
129
+ get_modified(): GLib.DateTime;
130
+ get_name(): string;
131
+ get_remaining(): number;
132
+ get_total(): number;
133
+ get_used(): number;
134
+ }
135
+
136
+ namespace DriveItem {
137
+ // Signal signatures
138
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
139
+
140
+ // Constructor properties interface
141
+
142
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
143
+ }
144
+
145
+ class DriveItem extends GObject.Object {
146
+ static $gtype: GObject.GType<DriveItem>;
147
+
148
+ /**
149
+ * Compile-time signal type information.
150
+ *
151
+ * This instance property is generated only for TypeScript type checking.
152
+ * It is not defined at runtime and should not be accessed in JS code.
153
+ * @internal
154
+ */
155
+ $signals: DriveItem.SignalSignatures;
156
+
157
+ // Constructors
158
+
159
+ constructor(properties?: Partial<DriveItem.ConstructorProps>, ...args: any[]);
160
+
161
+ _init(...args: any[]): void;
162
+
163
+ static new_from_json(object: Json.Object): DriveItem;
164
+
165
+ // Signals
166
+
167
+ connect<K extends keyof DriveItem.SignalSignatures>(
168
+ signal: K,
169
+ callback: GObject.SignalCallback<this, DriveItem.SignalSignatures[K]>,
170
+ ): number;
171
+ connect(signal: string, callback: (...args: any[]) => any): number;
172
+ connect_after<K extends keyof DriveItem.SignalSignatures>(
173
+ signal: K,
174
+ callback: GObject.SignalCallback<this, DriveItem.SignalSignatures[K]>,
175
+ ): number;
176
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
177
+ emit<K extends keyof DriveItem.SignalSignatures>(
178
+ signal: K,
179
+ ...args: GObject.GjsParameters<DriveItem.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
180
+ ): void;
181
+ emit(signal: string, ...args: any[]): void;
182
+
183
+ // Methods
184
+
185
+ get_created(): number;
186
+ get_drive_id(): string;
187
+ get_etag(): string;
188
+ get_id(): string;
189
+ get_modified(): number;
190
+ get_name(): string;
191
+ get_parent_id(): string;
192
+ get_remote_drive_id(): string;
193
+ get_remote_id(): string;
194
+ get_size(): number;
195
+ get_user(): string;
196
+ is_shared(): boolean;
197
+ set_id(id: string): void;
198
+ set_name(name: string): void;
199
+ set_parent_id(parent_id: string): void;
200
+ }
201
+
202
+ namespace DriveItemFile {
203
+ // Signal signatures
204
+ interface SignalSignatures extends DriveItem.SignalSignatures {}
205
+
206
+ // Constructor properties interface
207
+
208
+ interface ConstructorProps extends DriveItem.ConstructorProps {}
209
+ }
210
+
211
+ class DriveItemFile extends DriveItem {
212
+ static $gtype: GObject.GType<DriveItemFile>;
213
+
214
+ /**
215
+ * Compile-time signal type information.
216
+ *
217
+ * This instance property is generated only for TypeScript type checking.
218
+ * It is not defined at runtime and should not be accessed in JS code.
219
+ * @internal
220
+ */
221
+ $signals: DriveItemFile.SignalSignatures;
222
+
223
+ // Constructors
224
+
225
+ constructor(properties?: Partial<DriveItemFile.ConstructorProps>, ...args: any[]);
226
+
227
+ _init(...args: any[]): void;
228
+
229
+ static ['new'](): DriveItemFile;
230
+
231
+ static new_from_json(object: Json.Object): DriveItemFile;
232
+
233
+ // Signals
234
+
235
+ connect<K extends keyof DriveItemFile.SignalSignatures>(
236
+ signal: K,
237
+ callback: GObject.SignalCallback<this, DriveItemFile.SignalSignatures[K]>,
238
+ ): number;
239
+ connect(signal: string, callback: (...args: any[]) => any): number;
240
+ connect_after<K extends keyof DriveItemFile.SignalSignatures>(
241
+ signal: K,
242
+ callback: GObject.SignalCallback<this, DriveItemFile.SignalSignatures[K]>,
243
+ ): number;
244
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
245
+ emit<K extends keyof DriveItemFile.SignalSignatures>(
246
+ signal: K,
247
+ ...args: GObject.GjsParameters<DriveItemFile.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
248
+ ): void;
249
+ emit(signal: string, ...args: any[]): void;
250
+
251
+ // Methods
252
+
253
+ get_mime_type(): string;
254
+ get_thumbnail_uri(): string;
255
+ }
256
+
257
+ namespace DriveItemFolder {
258
+ // Signal signatures
259
+ interface SignalSignatures extends DriveItem.SignalSignatures {}
260
+
261
+ // Constructor properties interface
262
+
263
+ interface ConstructorProps extends DriveItem.ConstructorProps {}
264
+ }
265
+
266
+ class DriveItemFolder extends DriveItem {
267
+ static $gtype: GObject.GType<DriveItemFolder>;
268
+
269
+ /**
270
+ * Compile-time signal type information.
271
+ *
272
+ * This instance property is generated only for TypeScript type checking.
273
+ * It is not defined at runtime and should not be accessed in JS code.
274
+ * @internal
275
+ */
276
+ $signals: DriveItemFolder.SignalSignatures;
277
+
278
+ // Constructors
279
+
280
+ constructor(properties?: Partial<DriveItemFolder.ConstructorProps>, ...args: any[]);
281
+
282
+ _init(...args: any[]): void;
283
+
284
+ static ['new'](): DriveItemFolder;
285
+
286
+ static new_from_json(object: Json.Object): DriveItemFolder;
287
+
288
+ // Signals
289
+
290
+ connect<K extends keyof DriveItemFolder.SignalSignatures>(
291
+ signal: K,
292
+ callback: GObject.SignalCallback<this, DriveItemFolder.SignalSignatures[K]>,
293
+ ): number;
294
+ connect(signal: string, callback: (...args: any[]) => any): number;
295
+ connect_after<K extends keyof DriveItemFolder.SignalSignatures>(
296
+ signal: K,
297
+ callback: GObject.SignalCallback<this, DriveItemFolder.SignalSignatures[K]>,
298
+ ): number;
299
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
300
+ emit<K extends keyof DriveItemFolder.SignalSignatures>(
301
+ signal: K,
302
+ ...args: GObject.GjsParameters<DriveItemFolder.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
303
+ ): void;
304
+ emit(signal: string, ...args: any[]): void;
305
+ }
306
+
307
+ namespace DriveService {
308
+ // Signal signatures
309
+ interface SignalSignatures extends Service.SignalSignatures {
310
+ 'notify::authorizer': (pspec: GObject.ParamSpec) => void;
311
+ }
312
+
313
+ // Constructor properties interface
314
+
315
+ interface ConstructorProps extends Service.ConstructorProps {}
316
+ }
317
+
318
+ class DriveService extends Service {
319
+ static $gtype: GObject.GType<DriveService>;
320
+
321
+ /**
322
+ * Compile-time signal type information.
323
+ *
324
+ * This instance property is generated only for TypeScript type checking.
325
+ * It is not defined at runtime and should not be accessed in JS code.
326
+ * @internal
327
+ */
328
+ $signals: DriveService.SignalSignatures;
329
+
330
+ // Constructors
331
+
332
+ constructor(properties?: Partial<DriveService.ConstructorProps>, ...args: any[]);
333
+
334
+ _init(...args: any[]): void;
335
+
336
+ static ['new'](authorizer: Authorizer): DriveService;
337
+
338
+ // Signals
339
+
340
+ connect<K extends keyof DriveService.SignalSignatures>(
341
+ signal: K,
342
+ callback: GObject.SignalCallback<this, DriveService.SignalSignatures[K]>,
343
+ ): number;
344
+ connect(signal: string, callback: (...args: any[]) => any): number;
345
+ connect_after<K extends keyof DriveService.SignalSignatures>(
346
+ signal: K,
347
+ callback: GObject.SignalCallback<this, DriveService.SignalSignatures[K]>,
348
+ ): number;
349
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
350
+ emit<K extends keyof DriveService.SignalSignatures>(
351
+ signal: K,
352
+ ...args: GObject.GjsParameters<DriveService.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
353
+ ): void;
354
+ emit(signal: string, ...args: any[]): void;
355
+
356
+ // Methods
357
+
358
+ add_item_to_folder(parent: DriveItem, item: DriveItem, cancellable: Gio.Cancellable): DriveItem;
359
+ copy_file(file: DriveItem, destination: DriveItem, cancellable: Gio.Cancellable): boolean;
360
+ create_folder(parent: DriveItem, name: string, cancellable: Gio.Cancellable): DriveItem;
361
+ ['delete'](item: DriveItem, cancellable: Gio.Cancellable): boolean;
362
+ download_item(item: DriveItem, cancellable: Gio.Cancellable): Gio.InputStream;
363
+ download_url(url: string, cancellable: Gio.Cancellable): Gio.InputStream;
364
+ get_drives(cancellable: Gio.Cancellable): Drive[];
365
+ get_root(drive: Drive, cancellable: Gio.Cancellable): DriveItem;
366
+ get_shared_with_me(cancellable: Gio.Cancellable): DriveItem[];
367
+ list_children(item: DriveItem, cancellable: Gio.Cancellable): DriveItem[];
368
+ move_file(file: DriveItem, destination: DriveItem, cancellable: Gio.Cancellable): DriveItem;
369
+ rename(item: DriveItem, new_name: string, cancellable: Gio.Cancellable): DriveItem;
370
+ update(item: DriveItem, cancellable: Gio.Cancellable): Gio.OutputStream;
371
+ update_finish(item: DriveItem, stream: Gio.OutputStream, cancellable: Gio.Cancellable): DriveItem;
372
+ }
373
+
374
+ namespace GoaAuthorizer {
375
+ // Signal signatures
376
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
377
+ 'notify::goa-object': (pspec: GObject.ParamSpec) => void;
378
+ }
379
+
380
+ // Constructor properties interface
381
+
382
+ interface ConstructorProps extends GObject.Object.ConstructorProps, Authorizer.ConstructorProps {
383
+ goa_object: Goa.Object;
384
+ goaObject: Goa.Object;
385
+ }
386
+ }
387
+
388
+ class GoaAuthorizer extends GObject.Object implements Authorizer {
389
+ static $gtype: GObject.GType<GoaAuthorizer>;
390
+
391
+ // Properties
392
+
393
+ get goa_object(): Goa.Object;
394
+ get goaObject(): Goa.Object;
395
+
396
+ /**
397
+ * Compile-time signal type information.
398
+ *
399
+ * This instance property is generated only for TypeScript type checking.
400
+ * It is not defined at runtime and should not be accessed in JS code.
401
+ * @internal
402
+ */
403
+ $signals: GoaAuthorizer.SignalSignatures;
404
+
405
+ // Constructors
406
+
407
+ constructor(properties?: Partial<GoaAuthorizer.ConstructorProps>, ...args: any[]);
408
+
409
+ _init(...args: any[]): void;
410
+
411
+ static ['new'](goa_object: Goa.Object): GoaAuthorizer;
412
+
413
+ // Signals
414
+
415
+ connect<K extends keyof GoaAuthorizer.SignalSignatures>(
416
+ signal: K,
417
+ callback: GObject.SignalCallback<this, GoaAuthorizer.SignalSignatures[K]>,
418
+ ): number;
419
+ connect(signal: string, callback: (...args: any[]) => any): number;
420
+ connect_after<K extends keyof GoaAuthorizer.SignalSignatures>(
421
+ signal: K,
422
+ callback: GObject.SignalCallback<this, GoaAuthorizer.SignalSignatures[K]>,
423
+ ): number;
424
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
425
+ emit<K extends keyof GoaAuthorizer.SignalSignatures>(
426
+ signal: K,
427
+ ...args: GObject.GjsParameters<GoaAuthorizer.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
428
+ ): void;
429
+ emit(signal: string, ...args: any[]): void;
430
+
431
+ // Methods
432
+
433
+ get_goa_object(): Goa.Object;
434
+
435
+ // Inherited methods
436
+ process_request(message: Soup.Message): void;
437
+ refresh_authorization(cancellable: Gio.Cancellable): boolean;
438
+ vfunc_process_request(message: Soup.Message): void;
439
+ vfunc_refresh_authorization(cancellable: Gio.Cancellable): boolean;
440
+ /**
441
+ * Creates a binding between `source_property` on `source` and `target_property`
442
+ * on `target`.
443
+ *
444
+ * Whenever the `source_property` is changed the `target_property` is
445
+ * updated using the same value. For instance:
446
+ *
447
+ *
448
+ * ```c
449
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
450
+ * ```
451
+ *
452
+ *
453
+ * Will result in the "sensitive" property of the widget #GObject instance to be
454
+ * updated with the same value of the "active" property of the action #GObject
455
+ * instance.
456
+ *
457
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
458
+ * if `target_property` on `target` changes then the `source_property` on `source`
459
+ * will be updated as well.
460
+ *
461
+ * The binding will automatically be removed when either the `source` or the
462
+ * `target` instances are finalized. To remove the binding without affecting the
463
+ * `source` and the `target` you can just call g_object_unref() on the returned
464
+ * #GBinding instance.
465
+ *
466
+ * Removing the binding by calling g_object_unref() on it must only be done if
467
+ * the binding, `source` and `target` are only used from a single thread and it
468
+ * is clear that both `source` and `target` outlive the binding. Especially it
469
+ * is not safe to rely on this if the binding, `source` or `target` can be
470
+ * finalized from different threads. Keep another reference to the binding and
471
+ * use g_binding_unbind() instead to be on the safe side.
472
+ *
473
+ * A #GObject can have multiple bindings.
474
+ * @param source_property the property on @source to bind
475
+ * @param target the target #GObject
476
+ * @param target_property the property on @target to bind
477
+ * @param flags flags to pass to #GBinding
478
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
479
+ */
480
+ bind_property(
481
+ source_property: string,
482
+ target: GObject.Object,
483
+ target_property: string,
484
+ flags: GObject.BindingFlags | null,
485
+ ): GObject.Binding;
486
+ /**
487
+ * Complete version of g_object_bind_property().
488
+ *
489
+ * Creates a binding between `source_property` on `source` and `target_property`
490
+ * on `target,` allowing you to set the transformation functions to be used by
491
+ * the binding.
492
+ *
493
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
494
+ * if `target_property` on `target` changes then the `source_property` on `source`
495
+ * will be updated as well. The `transform_from` function is only used in case
496
+ * of bidirectional bindings, otherwise it will be ignored
497
+ *
498
+ * The binding will automatically be removed when either the `source` or the
499
+ * `target` instances are finalized. This will release the reference that is
500
+ * being held on the #GBinding instance; if you want to hold on to the
501
+ * #GBinding instance, you will need to hold a reference to it.
502
+ *
503
+ * To remove the binding, call g_binding_unbind().
504
+ *
505
+ * A #GObject can have multiple bindings.
506
+ *
507
+ * The same `user_data` parameter will be used for both `transform_to`
508
+ * and `transform_from` transformation functions; the `notify` function will
509
+ * be called once, when the binding is removed. If you need different data
510
+ * for each transformation function, please use
511
+ * g_object_bind_property_with_closures() instead.
512
+ * @param source_property the property on @source to bind
513
+ * @param target the target #GObject
514
+ * @param target_property the property on @target to bind
515
+ * @param flags flags to pass to #GBinding
516
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
517
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
518
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
519
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
520
+ */
521
+ bind_property_full(
522
+ source_property: string,
523
+ target: GObject.Object,
524
+ target_property: string,
525
+ flags: GObject.BindingFlags | null,
526
+ transform_to?: GObject.BindingTransformFunc | null,
527
+ transform_from?: GObject.BindingTransformFunc | null,
528
+ notify?: GLib.DestroyNotify | null,
529
+ ): GObject.Binding;
530
+ // Conflicted with GObject.Object.bind_property_full
531
+ bind_property_full(...args: never[]): any;
532
+ /**
533
+ * This function is intended for #GObject implementations to re-enforce
534
+ * a [floating][floating-ref] object reference. Doing this is seldom
535
+ * required: all #GInitiallyUnowneds are created with a floating reference
536
+ * which usually just needs to be sunken by calling g_object_ref_sink().
537
+ */
538
+ force_floating(): void;
539
+ /**
540
+ * Increases the freeze count on `object`. If the freeze count is
541
+ * non-zero, the emission of "notify" signals on `object` is
542
+ * stopped. The signals are queued until the freeze count is decreased
543
+ * to zero. Duplicate notifications are squashed so that at most one
544
+ * #GObject::notify signal is emitted for each property modified while the
545
+ * object is frozen.
546
+ *
547
+ * This is necessary for accessors that modify multiple properties to prevent
548
+ * premature notification while the object is still being modified.
549
+ */
550
+ freeze_notify(): void;
551
+ /**
552
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
553
+ * @param key name of the key for that association
554
+ * @returns the data if found, or %NULL if no such data exists.
555
+ */
556
+ get_data(key: string): any | null;
557
+ /**
558
+ * Gets a property of an object.
559
+ *
560
+ * The value can be:
561
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
562
+ * - a GObject.Value initialized with the expected type of the property
563
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
564
+ *
565
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
566
+ *
567
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
568
+ * @param property_name The name of the property to get
569
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
570
+ */
571
+ get_property(property_name: string, value: GObject.Value | any): any;
572
+ /**
573
+ * This function gets back user data pointers stored via
574
+ * g_object_set_qdata().
575
+ * @param quark A #GQuark, naming the user data pointer
576
+ * @returns The user data pointer set, or %NULL
577
+ */
578
+ get_qdata(quark: GLib.Quark): any | null;
579
+ /**
580
+ * Gets `n_properties` properties for an `object`.
581
+ * Obtained properties will be set to `values`. All properties must be valid.
582
+ * Warnings will be emitted and undefined behaviour may result if invalid
583
+ * properties are passed in.
584
+ * @param names the names of each property to get
585
+ * @param values the values of each property to get
586
+ */
587
+ getv(names: string[], values: (GObject.Value | any)[]): void;
588
+ /**
589
+ * Checks whether `object` has a [floating][floating-ref] reference.
590
+ * @returns %TRUE if @object has a floating reference
591
+ */
592
+ is_floating(): boolean;
593
+ /**
594
+ * Emits a "notify" signal for the property `property_name` on `object`.
595
+ *
596
+ * When possible, eg. when signaling a property change from within the class
597
+ * that registered the property, you should use g_object_notify_by_pspec()
598
+ * instead.
599
+ *
600
+ * Note that emission of the notify signal may be blocked with
601
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
602
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
603
+ * called.
604
+ * @param property_name the name of a property installed on the class of @object.
605
+ */
606
+ notify(property_name: string): void;
607
+ /**
608
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
609
+ *
610
+ * This function omits the property name lookup, hence it is faster than
611
+ * g_object_notify().
612
+ *
613
+ * One way to avoid using g_object_notify() from within the
614
+ * class that registered the properties, and using g_object_notify_by_pspec()
615
+ * instead, is to store the GParamSpec used with
616
+ * g_object_class_install_property() inside a static array, e.g.:
617
+ *
618
+ *
619
+ * ```c
620
+ * typedef enum
621
+ * {
622
+ * PROP_FOO = 1,
623
+ * PROP_LAST
624
+ * } MyObjectProperty;
625
+ *
626
+ * static GParamSpec *properties[PROP_LAST];
627
+ *
628
+ * static void
629
+ * my_object_class_init (MyObjectClass *klass)
630
+ * {
631
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
632
+ * 0, 100,
633
+ * 50,
634
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
635
+ * g_object_class_install_property (gobject_class,
636
+ * PROP_FOO,
637
+ * properties[PROP_FOO]);
638
+ * }
639
+ * ```
640
+ *
641
+ *
642
+ * and then notify a change on the "foo" property with:
643
+ *
644
+ *
645
+ * ```c
646
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
647
+ * ```
648
+ *
649
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
650
+ */
651
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
652
+ /**
653
+ * Increases the reference count of `object`.
654
+ *
655
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
656
+ * of `object` will be propagated to the return type (using the GCC typeof()
657
+ * extension), so any casting the caller needs to do on the return type must be
658
+ * explicit.
659
+ * @returns the same @object
660
+ */
661
+ ref(): GObject.Object;
662
+ /**
663
+ * Increase the reference count of `object,` and possibly remove the
664
+ * [floating][floating-ref] reference, if `object` has a floating reference.
665
+ *
666
+ * In other words, if the object is floating, then this call "assumes
667
+ * ownership" of the floating reference, converting it to a normal
668
+ * reference by clearing the floating flag while leaving the reference
669
+ * count unchanged. If the object is not floating, then this call
670
+ * adds a new normal reference increasing the reference count by one.
671
+ *
672
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
673
+ * under the same conditions as for g_object_ref().
674
+ * @returns @object
675
+ */
676
+ ref_sink(): GObject.Object;
677
+ /**
678
+ * Releases all references to other objects. This can be used to break
679
+ * reference cycles.
680
+ *
681
+ * This function should only be called from object system implementations.
682
+ */
683
+ run_dispose(): void;
684
+ /**
685
+ * Each object carries around a table of associations from
686
+ * strings to pointers. This function lets you set an association.
687
+ *
688
+ * If the object already had an association with that name,
689
+ * the old association will be destroyed.
690
+ *
691
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
692
+ * This means a copy of `key` is kept permanently (even after `object` has been
693
+ * finalized) — so it is recommended to only use a small, bounded set of values
694
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
695
+ * @param key name of the key
696
+ * @param data data to associate with that key
697
+ */
698
+ set_data(key: string, data?: any | null): void;
699
+ /**
700
+ * Sets a property on an object.
701
+ * @param property_name The name of the property to set
702
+ * @param value The value to set the property to
703
+ */
704
+ set_property(property_name: string, value: GObject.Value | any): void;
705
+ /**
706
+ * Remove a specified datum from the object's data associations,
707
+ * without invoking the association's destroy handler.
708
+ * @param key name of the key
709
+ * @returns the data if found, or %NULL if no such data exists.
710
+ */
711
+ steal_data(key: string): any | null;
712
+ /**
713
+ * This function gets back user data pointers stored via
714
+ * g_object_set_qdata() and removes the `data` from object
715
+ * without invoking its destroy() function (if any was
716
+ * set).
717
+ * Usually, calling this function is only required to update
718
+ * user data pointers with a destroy notifier, for example:
719
+ *
720
+ * ```c
721
+ * void
722
+ * object_add_to_user_list (GObject *object,
723
+ * const gchar *new_string)
724
+ * {
725
+ * // the quark, naming the object data
726
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
727
+ * // retrieve the old string list
728
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
729
+ *
730
+ * // prepend new string
731
+ * list = g_list_prepend (list, g_strdup (new_string));
732
+ * // this changed 'list', so we need to set it again
733
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
734
+ * }
735
+ * static void
736
+ * free_string_list (gpointer data)
737
+ * {
738
+ * GList *node, *list = data;
739
+ *
740
+ * for (node = list; node; node = node->next)
741
+ * g_free (node->data);
742
+ * g_list_free (list);
743
+ * }
744
+ * ```
745
+ *
746
+ * Using g_object_get_qdata() in the above example, instead of
747
+ * g_object_steal_qdata() would have left the destroy function set,
748
+ * and thus the partial string list would have been freed upon
749
+ * g_object_set_qdata_full().
750
+ * @param quark A #GQuark, naming the user data pointer
751
+ * @returns The user data pointer set, or %NULL
752
+ */
753
+ steal_qdata(quark: GLib.Quark): any | null;
754
+ /**
755
+ * Reverts the effect of a previous call to
756
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
757
+ * and when it reaches zero, queued "notify" signals are emitted.
758
+ *
759
+ * Duplicate notifications for each property are squashed so that at most one
760
+ * #GObject::notify signal is emitted for each property, in the reverse order
761
+ * in which they have been queued.
762
+ *
763
+ * It is an error to call this function when the freeze count is zero.
764
+ */
765
+ thaw_notify(): void;
766
+ /**
767
+ * Decreases the reference count of `object`. When its reference count
768
+ * drops to 0, the object is finalized (i.e. its memory is freed).
769
+ *
770
+ * If the pointer to the #GObject may be reused in future (for example, if it is
771
+ * an instance variable of another object), it is recommended to clear the
772
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
773
+ * invalid #GObject instance. Use g_clear_object() for this.
774
+ */
775
+ unref(): void;
776
+ /**
777
+ * This function essentially limits the life time of the `closure` to
778
+ * the life time of the object. That is, when the object is finalized,
779
+ * the `closure` is invalidated by calling g_closure_invalidate() on
780
+ * it, in order to prevent invocations of the closure with a finalized
781
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
782
+ * added as marshal guards to the `closure,` to ensure that an extra
783
+ * reference count is held on `object` during invocation of the
784
+ * `closure`. Usually, this function will be called on closures that
785
+ * use this `object` as closure data.
786
+ * @param closure #GClosure to watch
787
+ */
788
+ watch_closure(closure: GObject.Closure): void;
789
+ /**
790
+ * the `constructed` function is called by g_object_new() as the
791
+ * final step of the object creation process. At the point of the call, all
792
+ * construction properties have been set on the object. The purpose of this
793
+ * call is to allow for object initialisation steps that can only be performed
794
+ * after construction properties have been set. `constructed` implementors
795
+ * should chain up to the `constructed` call of their parent class to allow it
796
+ * to complete its initialisation.
797
+ */
798
+ vfunc_constructed(): void;
799
+ /**
800
+ * emits property change notification for a bunch
801
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
802
+ * needed.
803
+ * @param n_pspecs
804
+ * @param pspecs
805
+ */
806
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
807
+ /**
808
+ * the `dispose` function is supposed to drop all references to other
809
+ * objects, but keep the instance otherwise intact, so that client method
810
+ * invocations still work. It may be run multiple times (due to reference
811
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
812
+ * of the parent class.
813
+ */
814
+ vfunc_dispose(): void;
815
+ /**
816
+ * instance finalization function, should finish the finalization of
817
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
818
+ * parent class.
819
+ */
820
+ vfunc_finalize(): void;
821
+ /**
822
+ * the generic getter for all properties of this type. Should be
823
+ * overridden for every type with properties.
824
+ * @param property_id
825
+ * @param value
826
+ * @param pspec
827
+ */
828
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
829
+ /**
830
+ * Emits a "notify" signal for the property `property_name` on `object`.
831
+ *
832
+ * When possible, eg. when signaling a property change from within the class
833
+ * that registered the property, you should use g_object_notify_by_pspec()
834
+ * instead.
835
+ *
836
+ * Note that emission of the notify signal may be blocked with
837
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
838
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
839
+ * called.
840
+ * @param pspec
841
+ */
842
+ vfunc_notify(pspec: GObject.ParamSpec): void;
843
+ /**
844
+ * the generic setter for all properties of this type. Should be
845
+ * overridden for every type with properties. If implementations of
846
+ * `set_property` don't emit property change notification explicitly, this will
847
+ * be done implicitly by the type system. However, if the notify signal is
848
+ * emitted explicitly, the type system will not emit it a second time.
849
+ * @param property_id
850
+ * @param value
851
+ * @param pspec
852
+ */
853
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
854
+ /**
855
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
856
+ * @param id Handler ID of the handler to be disconnected
857
+ */
858
+ disconnect(id: number): void;
859
+ /**
860
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
861
+ * @param properties Object containing the properties to set
862
+ */
863
+ set(properties: { [key: string]: any }): void;
864
+ /**
865
+ * Blocks a handler of an instance so it will not be called during any signal emissions
866
+ * @param id Handler ID of the handler to be blocked
867
+ */
868
+ block_signal_handler(id: number): void;
869
+ /**
870
+ * Unblocks a handler so it will be called again during any signal emissions
871
+ * @param id Handler ID of the handler to be unblocked
872
+ */
873
+ unblock_signal_handler(id: number): void;
874
+ /**
875
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
876
+ * @param detailedName Name of the signal to stop emission of
877
+ */
878
+ stop_emission_by_name(detailedName: string): void;
879
+ }
880
+
881
+ namespace InputStream {
882
+ // Signal signatures
883
+ interface SignalSignatures extends Gio.InputStream.SignalSignatures {}
884
+
885
+ // Constructor properties interface
886
+
887
+ interface ConstructorProps extends Gio.InputStream.ConstructorProps, Gio.Seekable.ConstructorProps {}
888
+ }
889
+
890
+ class InputStream extends Gio.InputStream implements Gio.Seekable {
891
+ static $gtype: GObject.GType<InputStream>;
892
+
893
+ /**
894
+ * Compile-time signal type information.
895
+ *
896
+ * This instance property is generated only for TypeScript type checking.
897
+ * It is not defined at runtime and should not be accessed in JS code.
898
+ * @internal
899
+ */
900
+ $signals: InputStream.SignalSignatures;
901
+
902
+ // Constructors
903
+
904
+ constructor(properties?: Partial<InputStream.ConstructorProps>, ...args: any[]);
905
+
906
+ _init(...args: any[]): void;
907
+
908
+ static ['new'](service: Service, uri: string): InputStream;
909
+
910
+ // Signals
911
+
912
+ connect<K extends keyof InputStream.SignalSignatures>(
913
+ signal: K,
914
+ callback: GObject.SignalCallback<this, InputStream.SignalSignatures[K]>,
915
+ ): number;
916
+ connect(signal: string, callback: (...args: any[]) => any): number;
917
+ connect_after<K extends keyof InputStream.SignalSignatures>(
918
+ signal: K,
919
+ callback: GObject.SignalCallback<this, InputStream.SignalSignatures[K]>,
920
+ ): number;
921
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
922
+ emit<K extends keyof InputStream.SignalSignatures>(
923
+ signal: K,
924
+ ...args: GObject.GjsParameters<InputStream.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
925
+ ): void;
926
+ emit(signal: string, ...args: any[]): void;
927
+
928
+ // Static methods
929
+
930
+ static get_message(stream: Gio.InputStream): Soup.Message;
931
+ static send_async(
932
+ stream: Gio.InputStream,
933
+ io_priority: number,
934
+ cancellable: Gio.Cancellable,
935
+ callback: Gio.AsyncReadyCallback<InputStream>,
936
+ ): void;
937
+ static send_finish(stream: Gio.InputStream, result: Gio.AsyncResult): boolean;
938
+
939
+ // Inherited methods
940
+ /**
941
+ * Tests if the stream supports the #GSeekableIface.
942
+ * @returns %TRUE if @seekable can be seeked. %FALSE otherwise.
943
+ */
944
+ can_seek(): boolean;
945
+ /**
946
+ * Tests if the length of the stream can be adjusted with
947
+ * g_seekable_truncate().
948
+ * @returns %TRUE if the stream can be truncated, %FALSE otherwise.
949
+ */
950
+ can_truncate(): boolean;
951
+ /**
952
+ * Seeks in the stream by the given `offset,` modified by `type`.
953
+ *
954
+ * Attempting to seek past the end of the stream will have different
955
+ * results depending on if the stream is fixed-sized or resizable. If
956
+ * the stream is resizable then seeking past the end and then writing
957
+ * will result in zeros filling the empty space. Seeking past the end
958
+ * of a resizable stream and reading will result in EOF. Seeking past
959
+ * the end of a fixed-sized stream will fail.
960
+ *
961
+ * Any operation that would result in a negative offset will fail.
962
+ *
963
+ * If `cancellable` is not %NULL, then the operation can be cancelled by
964
+ * triggering the cancellable object from another thread. If the operation
965
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
966
+ * @param offset a #goffset.
967
+ * @param type a #GSeekType.
968
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
969
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
970
+ */
971
+ seek(offset: number, type: GLib.SeekType | null, cancellable?: Gio.Cancellable | null): boolean;
972
+ /**
973
+ * Tells the current position within the stream.
974
+ * @returns the (positive or zero) offset from the beginning of the buffer, zero if the target is not seekable.
975
+ */
976
+ tell(): number;
977
+ /**
978
+ * Sets the length of the stream to `offset`. If the stream was previously
979
+ * larger than `offset,` the extra data is discarded. If the stream was
980
+ * previously shorter than `offset,` it is extended with NUL ('\0') bytes.
981
+ *
982
+ * If `cancellable` is not %NULL, then the operation can be cancelled by
983
+ * triggering the cancellable object from another thread. If the operation
984
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
985
+ * operation was partially finished when the operation was cancelled the
986
+ * partial result will be returned, without an error.
987
+ * @param offset new length for @seekable, in bytes.
988
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
989
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
990
+ */
991
+ truncate(offset: number, cancellable?: Gio.Cancellable | null): boolean;
992
+ /**
993
+ * Tests if the stream supports the #GSeekableIface.
994
+ */
995
+ vfunc_can_seek(): boolean;
996
+ /**
997
+ * Tests if the length of the stream can be adjusted with
998
+ * g_seekable_truncate().
999
+ */
1000
+ vfunc_can_truncate(): boolean;
1001
+ /**
1002
+ * Seeks in the stream by the given `offset,` modified by `type`.
1003
+ *
1004
+ * Attempting to seek past the end of the stream will have different
1005
+ * results depending on if the stream is fixed-sized or resizable. If
1006
+ * the stream is resizable then seeking past the end and then writing
1007
+ * will result in zeros filling the empty space. Seeking past the end
1008
+ * of a resizable stream and reading will result in EOF. Seeking past
1009
+ * the end of a fixed-sized stream will fail.
1010
+ *
1011
+ * Any operation that would result in a negative offset will fail.
1012
+ *
1013
+ * If `cancellable` is not %NULL, then the operation can be cancelled by
1014
+ * triggering the cancellable object from another thread. If the operation
1015
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1016
+ * @param offset a #goffset.
1017
+ * @param type a #GSeekType.
1018
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1019
+ */
1020
+ vfunc_seek(offset: number, type: GLib.SeekType, cancellable?: Gio.Cancellable | null): boolean;
1021
+ /**
1022
+ * Tells the current position within the stream.
1023
+ */
1024
+ vfunc_tell(): number;
1025
+ /**
1026
+ * Sets the length of the stream to `offset`. If the stream was previously
1027
+ * larger than `offset,` the extra data is discarded. If the stream was
1028
+ * previously shorter than `offset,` it is extended with NUL ('\0') bytes.
1029
+ *
1030
+ * If `cancellable` is not %NULL, then the operation can be cancelled by
1031
+ * triggering the cancellable object from another thread. If the operation
1032
+ * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
1033
+ * operation was partially finished when the operation was cancelled the
1034
+ * partial result will be returned, without an error.
1035
+ * @param offset new length for @seekable, in bytes.
1036
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1037
+ */
1038
+ vfunc_truncate_fn(offset: number, cancellable?: Gio.Cancellable | null): boolean;
1039
+ /**
1040
+ * Creates a binding between `source_property` on `source` and `target_property`
1041
+ * on `target`.
1042
+ *
1043
+ * Whenever the `source_property` is changed the `target_property` is
1044
+ * updated using the same value. For instance:
1045
+ *
1046
+ *
1047
+ * ```c
1048
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
1049
+ * ```
1050
+ *
1051
+ *
1052
+ * Will result in the "sensitive" property of the widget #GObject instance to be
1053
+ * updated with the same value of the "active" property of the action #GObject
1054
+ * instance.
1055
+ *
1056
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1057
+ * if `target_property` on `target` changes then the `source_property` on `source`
1058
+ * will be updated as well.
1059
+ *
1060
+ * The binding will automatically be removed when either the `source` or the
1061
+ * `target` instances are finalized. To remove the binding without affecting the
1062
+ * `source` and the `target` you can just call g_object_unref() on the returned
1063
+ * #GBinding instance.
1064
+ *
1065
+ * Removing the binding by calling g_object_unref() on it must only be done if
1066
+ * the binding, `source` and `target` are only used from a single thread and it
1067
+ * is clear that both `source` and `target` outlive the binding. Especially it
1068
+ * is not safe to rely on this if the binding, `source` or `target` can be
1069
+ * finalized from different threads. Keep another reference to the binding and
1070
+ * use g_binding_unbind() instead to be on the safe side.
1071
+ *
1072
+ * A #GObject can have multiple bindings.
1073
+ * @param source_property the property on @source to bind
1074
+ * @param target the target #GObject
1075
+ * @param target_property the property on @target to bind
1076
+ * @param flags flags to pass to #GBinding
1077
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1078
+ */
1079
+ bind_property(
1080
+ source_property: string,
1081
+ target: GObject.Object,
1082
+ target_property: string,
1083
+ flags: GObject.BindingFlags | null,
1084
+ ): GObject.Binding;
1085
+ /**
1086
+ * Complete version of g_object_bind_property().
1087
+ *
1088
+ * Creates a binding between `source_property` on `source` and `target_property`
1089
+ * on `target,` allowing you to set the transformation functions to be used by
1090
+ * the binding.
1091
+ *
1092
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1093
+ * if `target_property` on `target` changes then the `source_property` on `source`
1094
+ * will be updated as well. The `transform_from` function is only used in case
1095
+ * of bidirectional bindings, otherwise it will be ignored
1096
+ *
1097
+ * The binding will automatically be removed when either the `source` or the
1098
+ * `target` instances are finalized. This will release the reference that is
1099
+ * being held on the #GBinding instance; if you want to hold on to the
1100
+ * #GBinding instance, you will need to hold a reference to it.
1101
+ *
1102
+ * To remove the binding, call g_binding_unbind().
1103
+ *
1104
+ * A #GObject can have multiple bindings.
1105
+ *
1106
+ * The same `user_data` parameter will be used for both `transform_to`
1107
+ * and `transform_from` transformation functions; the `notify` function will
1108
+ * be called once, when the binding is removed. If you need different data
1109
+ * for each transformation function, please use
1110
+ * g_object_bind_property_with_closures() instead.
1111
+ * @param source_property the property on @source to bind
1112
+ * @param target the target #GObject
1113
+ * @param target_property the property on @target to bind
1114
+ * @param flags flags to pass to #GBinding
1115
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
1116
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
1117
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
1118
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1119
+ */
1120
+ bind_property_full(
1121
+ source_property: string,
1122
+ target: GObject.Object,
1123
+ target_property: string,
1124
+ flags: GObject.BindingFlags | null,
1125
+ transform_to?: GObject.BindingTransformFunc | null,
1126
+ transform_from?: GObject.BindingTransformFunc | null,
1127
+ notify?: GLib.DestroyNotify | null,
1128
+ ): GObject.Binding;
1129
+ // Conflicted with GObject.Object.bind_property_full
1130
+ bind_property_full(...args: never[]): any;
1131
+ /**
1132
+ * This function is intended for #GObject implementations to re-enforce
1133
+ * a [floating][floating-ref] object reference. Doing this is seldom
1134
+ * required: all #GInitiallyUnowneds are created with a floating reference
1135
+ * which usually just needs to be sunken by calling g_object_ref_sink().
1136
+ */
1137
+ force_floating(): void;
1138
+ /**
1139
+ * Increases the freeze count on `object`. If the freeze count is
1140
+ * non-zero, the emission of "notify" signals on `object` is
1141
+ * stopped. The signals are queued until the freeze count is decreased
1142
+ * to zero. Duplicate notifications are squashed so that at most one
1143
+ * #GObject::notify signal is emitted for each property modified while the
1144
+ * object is frozen.
1145
+ *
1146
+ * This is necessary for accessors that modify multiple properties to prevent
1147
+ * premature notification while the object is still being modified.
1148
+ */
1149
+ freeze_notify(): void;
1150
+ /**
1151
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
1152
+ * @param key name of the key for that association
1153
+ * @returns the data if found, or %NULL if no such data exists.
1154
+ */
1155
+ get_data(key: string): any | null;
1156
+ /**
1157
+ * Gets a property of an object.
1158
+ *
1159
+ * The value can be:
1160
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
1161
+ * - a GObject.Value initialized with the expected type of the property
1162
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
1163
+ *
1164
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
1165
+ *
1166
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
1167
+ * @param property_name The name of the property to get
1168
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
1169
+ */
1170
+ get_property(property_name: string, value: GObject.Value | any): any;
1171
+ /**
1172
+ * This function gets back user data pointers stored via
1173
+ * g_object_set_qdata().
1174
+ * @param quark A #GQuark, naming the user data pointer
1175
+ * @returns The user data pointer set, or %NULL
1176
+ */
1177
+ get_qdata(quark: GLib.Quark): any | null;
1178
+ /**
1179
+ * Gets `n_properties` properties for an `object`.
1180
+ * Obtained properties will be set to `values`. All properties must be valid.
1181
+ * Warnings will be emitted and undefined behaviour may result if invalid
1182
+ * properties are passed in.
1183
+ * @param names the names of each property to get
1184
+ * @param values the values of each property to get
1185
+ */
1186
+ getv(names: string[], values: (GObject.Value | any)[]): void;
1187
+ /**
1188
+ * Checks whether `object` has a [floating][floating-ref] reference.
1189
+ * @returns %TRUE if @object has a floating reference
1190
+ */
1191
+ is_floating(): boolean;
1192
+ /**
1193
+ * Emits a "notify" signal for the property `property_name` on `object`.
1194
+ *
1195
+ * When possible, eg. when signaling a property change from within the class
1196
+ * that registered the property, you should use g_object_notify_by_pspec()
1197
+ * instead.
1198
+ *
1199
+ * Note that emission of the notify signal may be blocked with
1200
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1201
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1202
+ * called.
1203
+ * @param property_name the name of a property installed on the class of @object.
1204
+ */
1205
+ notify(property_name: string): void;
1206
+ /**
1207
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
1208
+ *
1209
+ * This function omits the property name lookup, hence it is faster than
1210
+ * g_object_notify().
1211
+ *
1212
+ * One way to avoid using g_object_notify() from within the
1213
+ * class that registered the properties, and using g_object_notify_by_pspec()
1214
+ * instead, is to store the GParamSpec used with
1215
+ * g_object_class_install_property() inside a static array, e.g.:
1216
+ *
1217
+ *
1218
+ * ```c
1219
+ * typedef enum
1220
+ * {
1221
+ * PROP_FOO = 1,
1222
+ * PROP_LAST
1223
+ * } MyObjectProperty;
1224
+ *
1225
+ * static GParamSpec *properties[PROP_LAST];
1226
+ *
1227
+ * static void
1228
+ * my_object_class_init (MyObjectClass *klass)
1229
+ * {
1230
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
1231
+ * 0, 100,
1232
+ * 50,
1233
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
1234
+ * g_object_class_install_property (gobject_class,
1235
+ * PROP_FOO,
1236
+ * properties[PROP_FOO]);
1237
+ * }
1238
+ * ```
1239
+ *
1240
+ *
1241
+ * and then notify a change on the "foo" property with:
1242
+ *
1243
+ *
1244
+ * ```c
1245
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
1246
+ * ```
1247
+ *
1248
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
1249
+ */
1250
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
1251
+ /**
1252
+ * Increases the reference count of `object`.
1253
+ *
1254
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
1255
+ * of `object` will be propagated to the return type (using the GCC typeof()
1256
+ * extension), so any casting the caller needs to do on the return type must be
1257
+ * explicit.
1258
+ * @returns the same @object
1259
+ */
1260
+ ref(): GObject.Object;
1261
+ /**
1262
+ * Increase the reference count of `object,` and possibly remove the
1263
+ * [floating][floating-ref] reference, if `object` has a floating reference.
1264
+ *
1265
+ * In other words, if the object is floating, then this call "assumes
1266
+ * ownership" of the floating reference, converting it to a normal
1267
+ * reference by clearing the floating flag while leaving the reference
1268
+ * count unchanged. If the object is not floating, then this call
1269
+ * adds a new normal reference increasing the reference count by one.
1270
+ *
1271
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
1272
+ * under the same conditions as for g_object_ref().
1273
+ * @returns @object
1274
+ */
1275
+ ref_sink(): GObject.Object;
1276
+ /**
1277
+ * Releases all references to other objects. This can be used to break
1278
+ * reference cycles.
1279
+ *
1280
+ * This function should only be called from object system implementations.
1281
+ */
1282
+ run_dispose(): void;
1283
+ /**
1284
+ * Each object carries around a table of associations from
1285
+ * strings to pointers. This function lets you set an association.
1286
+ *
1287
+ * If the object already had an association with that name,
1288
+ * the old association will be destroyed.
1289
+ *
1290
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
1291
+ * This means a copy of `key` is kept permanently (even after `object` has been
1292
+ * finalized) — so it is recommended to only use a small, bounded set of values
1293
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
1294
+ * @param key name of the key
1295
+ * @param data data to associate with that key
1296
+ */
1297
+ set_data(key: string, data?: any | null): void;
1298
+ /**
1299
+ * Sets a property on an object.
1300
+ * @param property_name The name of the property to set
1301
+ * @param value The value to set the property to
1302
+ */
1303
+ set_property(property_name: string, value: GObject.Value | any): void;
1304
+ /**
1305
+ * Remove a specified datum from the object's data associations,
1306
+ * without invoking the association's destroy handler.
1307
+ * @param key name of the key
1308
+ * @returns the data if found, or %NULL if no such data exists.
1309
+ */
1310
+ steal_data(key: string): any | null;
1311
+ /**
1312
+ * This function gets back user data pointers stored via
1313
+ * g_object_set_qdata() and removes the `data` from object
1314
+ * without invoking its destroy() function (if any was
1315
+ * set).
1316
+ * Usually, calling this function is only required to update
1317
+ * user data pointers with a destroy notifier, for example:
1318
+ *
1319
+ * ```c
1320
+ * void
1321
+ * object_add_to_user_list (GObject *object,
1322
+ * const gchar *new_string)
1323
+ * {
1324
+ * // the quark, naming the object data
1325
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
1326
+ * // retrieve the old string list
1327
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
1328
+ *
1329
+ * // prepend new string
1330
+ * list = g_list_prepend (list, g_strdup (new_string));
1331
+ * // this changed 'list', so we need to set it again
1332
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
1333
+ * }
1334
+ * static void
1335
+ * free_string_list (gpointer data)
1336
+ * {
1337
+ * GList *node, *list = data;
1338
+ *
1339
+ * for (node = list; node; node = node->next)
1340
+ * g_free (node->data);
1341
+ * g_list_free (list);
1342
+ * }
1343
+ * ```
1344
+ *
1345
+ * Using g_object_get_qdata() in the above example, instead of
1346
+ * g_object_steal_qdata() would have left the destroy function set,
1347
+ * and thus the partial string list would have been freed upon
1348
+ * g_object_set_qdata_full().
1349
+ * @param quark A #GQuark, naming the user data pointer
1350
+ * @returns The user data pointer set, or %NULL
1351
+ */
1352
+ steal_qdata(quark: GLib.Quark): any | null;
1353
+ /**
1354
+ * Reverts the effect of a previous call to
1355
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
1356
+ * and when it reaches zero, queued "notify" signals are emitted.
1357
+ *
1358
+ * Duplicate notifications for each property are squashed so that at most one
1359
+ * #GObject::notify signal is emitted for each property, in the reverse order
1360
+ * in which they have been queued.
1361
+ *
1362
+ * It is an error to call this function when the freeze count is zero.
1363
+ */
1364
+ thaw_notify(): void;
1365
+ /**
1366
+ * Decreases the reference count of `object`. When its reference count
1367
+ * drops to 0, the object is finalized (i.e. its memory is freed).
1368
+ *
1369
+ * If the pointer to the #GObject may be reused in future (for example, if it is
1370
+ * an instance variable of another object), it is recommended to clear the
1371
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
1372
+ * invalid #GObject instance. Use g_clear_object() for this.
1373
+ */
1374
+ unref(): void;
1375
+ /**
1376
+ * This function essentially limits the life time of the `closure` to
1377
+ * the life time of the object. That is, when the object is finalized,
1378
+ * the `closure` is invalidated by calling g_closure_invalidate() on
1379
+ * it, in order to prevent invocations of the closure with a finalized
1380
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
1381
+ * added as marshal guards to the `closure,` to ensure that an extra
1382
+ * reference count is held on `object` during invocation of the
1383
+ * `closure`. Usually, this function will be called on closures that
1384
+ * use this `object` as closure data.
1385
+ * @param closure #GClosure to watch
1386
+ */
1387
+ watch_closure(closure: GObject.Closure): void;
1388
+ /**
1389
+ * the `constructed` function is called by g_object_new() as the
1390
+ * final step of the object creation process. At the point of the call, all
1391
+ * construction properties have been set on the object. The purpose of this
1392
+ * call is to allow for object initialisation steps that can only be performed
1393
+ * after construction properties have been set. `constructed` implementors
1394
+ * should chain up to the `constructed` call of their parent class to allow it
1395
+ * to complete its initialisation.
1396
+ */
1397
+ vfunc_constructed(): void;
1398
+ /**
1399
+ * emits property change notification for a bunch
1400
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
1401
+ * needed.
1402
+ * @param n_pspecs
1403
+ * @param pspecs
1404
+ */
1405
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
1406
+ /**
1407
+ * the `dispose` function is supposed to drop all references to other
1408
+ * objects, but keep the instance otherwise intact, so that client method
1409
+ * invocations still work. It may be run multiple times (due to reference
1410
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
1411
+ * of the parent class.
1412
+ */
1413
+ vfunc_dispose(): void;
1414
+ /**
1415
+ * instance finalization function, should finish the finalization of
1416
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
1417
+ * parent class.
1418
+ */
1419
+ vfunc_finalize(): void;
1420
+ /**
1421
+ * the generic getter for all properties of this type. Should be
1422
+ * overridden for every type with properties.
1423
+ * @param property_id
1424
+ * @param value
1425
+ * @param pspec
1426
+ */
1427
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1428
+ /**
1429
+ * Emits a "notify" signal for the property `property_name` on `object`.
1430
+ *
1431
+ * When possible, eg. when signaling a property change from within the class
1432
+ * that registered the property, you should use g_object_notify_by_pspec()
1433
+ * instead.
1434
+ *
1435
+ * Note that emission of the notify signal may be blocked with
1436
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1437
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1438
+ * called.
1439
+ * @param pspec
1440
+ */
1441
+ vfunc_notify(pspec: GObject.ParamSpec): void;
1442
+ /**
1443
+ * the generic setter for all properties of this type. Should be
1444
+ * overridden for every type with properties. If implementations of
1445
+ * `set_property` don't emit property change notification explicitly, this will
1446
+ * be done implicitly by the type system. However, if the notify signal is
1447
+ * emitted explicitly, the type system will not emit it a second time.
1448
+ * @param property_id
1449
+ * @param value
1450
+ * @param pspec
1451
+ */
1452
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1453
+ /**
1454
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
1455
+ * @param id Handler ID of the handler to be disconnected
1456
+ */
1457
+ disconnect(id: number): void;
1458
+ /**
1459
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
1460
+ * @param properties Object containing the properties to set
1461
+ */
1462
+ set(properties: { [key: string]: any }): void;
1463
+ /**
1464
+ * Blocks a handler of an instance so it will not be called during any signal emissions
1465
+ * @param id Handler ID of the handler to be blocked
1466
+ */
1467
+ block_signal_handler(id: number): void;
1468
+ /**
1469
+ * Unblocks a handler so it will be called again during any signal emissions
1470
+ * @param id Handler ID of the handler to be unblocked
1471
+ */
1472
+ unblock_signal_handler(id: number): void;
1473
+ /**
1474
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
1475
+ * @param detailedName Name of the signal to stop emission of
1476
+ */
1477
+ stop_emission_by_name(detailedName: string): void;
1478
+ }
1479
+
1480
+ namespace MailFolder {
1481
+ // Signal signatures
1482
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
1483
+
1484
+ // Constructor properties interface
1485
+
1486
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1487
+ }
1488
+
1489
+ class MailFolder extends GObject.Object {
1490
+ static $gtype: GObject.GType<MailFolder>;
1491
+
1492
+ /**
1493
+ * Compile-time signal type information.
1494
+ *
1495
+ * This instance property is generated only for TypeScript type checking.
1496
+ * It is not defined at runtime and should not be accessed in JS code.
1497
+ * @internal
1498
+ */
1499
+ $signals: MailFolder.SignalSignatures;
1500
+
1501
+ // Constructors
1502
+
1503
+ constructor(properties?: Partial<MailFolder.ConstructorProps>, ...args: any[]);
1504
+
1505
+ _init(...args: any[]): void;
1506
+
1507
+ static ['new'](): MailFolder;
1508
+
1509
+ static new_from_json(json_object: Json.Object): MailFolder;
1510
+
1511
+ // Signals
1512
+
1513
+ connect<K extends keyof MailFolder.SignalSignatures>(
1514
+ signal: K,
1515
+ callback: GObject.SignalCallback<this, MailFolder.SignalSignatures[K]>,
1516
+ ): number;
1517
+ connect(signal: string, callback: (...args: any[]) => any): number;
1518
+ connect_after<K extends keyof MailFolder.SignalSignatures>(
1519
+ signal: K,
1520
+ callback: GObject.SignalCallback<this, MailFolder.SignalSignatures[K]>,
1521
+ ): number;
1522
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1523
+ emit<K extends keyof MailFolder.SignalSignatures>(
1524
+ signal: K,
1525
+ ...args: GObject.GjsParameters<MailFolder.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1526
+ ): void;
1527
+ emit(signal: string, ...args: any[]): void;
1528
+
1529
+ // Methods
1530
+
1531
+ get_child_folder_count(): number;
1532
+ get_delta_link(): string;
1533
+ get_display_name(): string;
1534
+ get_folder_type(): MailFolderType;
1535
+ get_id(): string;
1536
+ get_parent_id(): string;
1537
+ get_total_item_count(): number;
1538
+ get_unread_item_count(): number;
1539
+ set_child_folder_count(count: number): void;
1540
+ set_delta_link(delta_link: string): void;
1541
+ set_display_name(display_name: string): void;
1542
+ set_folder_type(type: MailFolderType | null): void;
1543
+ set_id(id: string): void;
1544
+ set_parent_id(id: string): void;
1545
+ set_total_item_count(count: number): void;
1546
+ set_unread_item_count(count: number): void;
1547
+ }
1548
+
1549
+ namespace MailMessage {
1550
+ // Signal signatures
1551
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
1552
+
1553
+ // Constructor properties interface
1554
+
1555
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1556
+ }
1557
+
1558
+ class MailMessage extends GObject.Object {
1559
+ static $gtype: GObject.GType<MailMessage>;
1560
+
1561
+ /**
1562
+ * Compile-time signal type information.
1563
+ *
1564
+ * This instance property is generated only for TypeScript type checking.
1565
+ * It is not defined at runtime and should not be accessed in JS code.
1566
+ * @internal
1567
+ */
1568
+ $signals: MailMessage.SignalSignatures;
1569
+
1570
+ // Constructors
1571
+
1572
+ constructor(properties?: Partial<MailMessage.ConstructorProps>, ...args: any[]);
1573
+
1574
+ _init(...args: any[]): void;
1575
+
1576
+ static ['new'](): MailMessage;
1577
+
1578
+ static new_from_json(json_object: Json.Object): MailMessage;
1579
+
1580
+ // Signals
1581
+
1582
+ connect<K extends keyof MailMessage.SignalSignatures>(
1583
+ signal: K,
1584
+ callback: GObject.SignalCallback<this, MailMessage.SignalSignatures[K]>,
1585
+ ): number;
1586
+ connect(signal: string, callback: (...args: any[]) => any): number;
1587
+ connect_after<K extends keyof MailMessage.SignalSignatures>(
1588
+ signal: K,
1589
+ callback: GObject.SignalCallback<this, MailMessage.SignalSignatures[K]>,
1590
+ ): number;
1591
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1592
+ emit<K extends keyof MailMessage.SignalSignatures>(
1593
+ signal: K,
1594
+ ...args: GObject.GjsParameters<MailMessage.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1595
+ ): void;
1596
+ emit(signal: string, ...args: any[]): void;
1597
+
1598
+ // Methods
1599
+
1600
+ get_body(is_html: boolean): string;
1601
+ get_body_preview(): string;
1602
+ get_cc(): string;
1603
+ get_has_attachment(): boolean;
1604
+ get_id(): string;
1605
+ get_received_date(): GLib.DateTime;
1606
+ get_receiver(): string;
1607
+ get_sender(): string;
1608
+ get_subject(): string;
1609
+ get_unread(): number;
1610
+ set_body(body: string): void;
1611
+ set_body_preview(preview: string): void;
1612
+ set_cc(cc: string): void;
1613
+ set_has_attachment(has_attachment: boolean): void;
1614
+ set_id(id: string): void;
1615
+ set_received_date(timestamp: number): void;
1616
+ set_receiver(receiver: string): void;
1617
+ set_sender(sender: string): void;
1618
+ set_subject(subject: string): void;
1619
+ set_unread(unread: number): void;
1620
+ }
1621
+
1622
+ namespace MailService {
1623
+ // Signal signatures
1624
+ interface SignalSignatures extends Service.SignalSignatures {
1625
+ 'notify::authorizer': (pspec: GObject.ParamSpec) => void;
1626
+ }
1627
+
1628
+ // Constructor properties interface
1629
+
1630
+ interface ConstructorProps extends Service.ConstructorProps {}
1631
+ }
1632
+
1633
+ class MailService extends Service {
1634
+ static $gtype: GObject.GType<MailService>;
1635
+
1636
+ /**
1637
+ * Compile-time signal type information.
1638
+ *
1639
+ * This instance property is generated only for TypeScript type checking.
1640
+ * It is not defined at runtime and should not be accessed in JS code.
1641
+ * @internal
1642
+ */
1643
+ $signals: MailService.SignalSignatures;
1644
+
1645
+ // Constructors
1646
+
1647
+ constructor(properties?: Partial<MailService.ConstructorProps>, ...args: any[]);
1648
+
1649
+ _init(...args: any[]): void;
1650
+
1651
+ static ['new'](authorizer: Authorizer): MailService;
1652
+
1653
+ // Signals
1654
+
1655
+ connect<K extends keyof MailService.SignalSignatures>(
1656
+ signal: K,
1657
+ callback: GObject.SignalCallback<this, MailService.SignalSignatures[K]>,
1658
+ ): number;
1659
+ connect(signal: string, callback: (...args: any[]) => any): number;
1660
+ connect_after<K extends keyof MailService.SignalSignatures>(
1661
+ signal: K,
1662
+ callback: GObject.SignalCallback<this, MailService.SignalSignatures[K]>,
1663
+ ): number;
1664
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1665
+ emit<K extends keyof MailService.SignalSignatures>(
1666
+ signal: K,
1667
+ ...args: GObject.GjsParameters<MailService.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1668
+ ): void;
1669
+ emit(signal: string, ...args: any[]): void;
1670
+
1671
+ // Methods
1672
+
1673
+ create_draft_message(mail: MailMessage, cancellable: Gio.Cancellable): MailMessage;
1674
+ delete_message(mail: MailMessage, cancellable: Gio.Cancellable): boolean;
1675
+ get_folder_id(type: MailFolderType | null, cancellable: Gio.Cancellable): string;
1676
+ get_mail_folder(type: MailFolderType | null, cancellable: Gio.Cancellable): MailFolder;
1677
+ get_mail_folders(delta_url: string, delta_url_out: string, cancellable: Gio.Cancellable): MailFolder[];
1678
+ get_messages(
1679
+ folder: MailFolder,
1680
+ next_link: string,
1681
+ out_next_link: string,
1682
+ delta_link: string,
1683
+ out_delta_link: string,
1684
+ max_page_size: number,
1685
+ cancellable: Gio.Cancellable,
1686
+ ): MailMessage[];
1687
+ get_mime_message(mail: MailMessage, cancellable: Gio.Cancellable): GLib.Bytes;
1688
+ }
1689
+
1690
+ namespace OAuth2Authorizer {
1691
+ // Signal signatures
1692
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1693
+ 'notify::client-id': (pspec: GObject.ParamSpec) => void;
1694
+ 'notify::redirect-uri': (pspec: GObject.ParamSpec) => void;
1695
+ 'notify::refresh-token': (pspec: GObject.ParamSpec) => void;
1696
+ }
1697
+
1698
+ // Constructor properties interface
1699
+
1700
+ interface ConstructorProps extends GObject.Object.ConstructorProps, Authorizer.ConstructorProps {
1701
+ client_id: string;
1702
+ clientId: string;
1703
+ redirect_uri: string;
1704
+ redirectUri: string;
1705
+ refresh_token: string;
1706
+ refreshToken: string;
1707
+ }
1708
+ }
1709
+
1710
+ class OAuth2Authorizer extends GObject.Object implements Authorizer {
1711
+ static $gtype: GObject.GType<OAuth2Authorizer>;
1712
+
1713
+ // Properties
1714
+
1715
+ get client_id(): string;
1716
+ get clientId(): string;
1717
+ get redirect_uri(): string;
1718
+ get redirectUri(): string;
1719
+ get refresh_token(): string;
1720
+ set refresh_token(val: string);
1721
+ get refreshToken(): string;
1722
+ set refreshToken(val: string);
1723
+
1724
+ /**
1725
+ * Compile-time signal type information.
1726
+ *
1727
+ * This instance property is generated only for TypeScript type checking.
1728
+ * It is not defined at runtime and should not be accessed in JS code.
1729
+ * @internal
1730
+ */
1731
+ $signals: OAuth2Authorizer.SignalSignatures;
1732
+
1733
+ // Constructors
1734
+
1735
+ constructor(properties?: Partial<OAuth2Authorizer.ConstructorProps>, ...args: any[]);
1736
+
1737
+ _init(...args: any[]): void;
1738
+
1739
+ static ['new'](client_id: string, redirect_uri: string): OAuth2Authorizer;
1740
+
1741
+ // Signals
1742
+
1743
+ connect<K extends keyof OAuth2Authorizer.SignalSignatures>(
1744
+ signal: K,
1745
+ callback: GObject.SignalCallback<this, OAuth2Authorizer.SignalSignatures[K]>,
1746
+ ): number;
1747
+ connect(signal: string, callback: (...args: any[]) => any): number;
1748
+ connect_after<K extends keyof OAuth2Authorizer.SignalSignatures>(
1749
+ signal: K,
1750
+ callback: GObject.SignalCallback<this, OAuth2Authorizer.SignalSignatures[K]>,
1751
+ ): number;
1752
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1753
+ emit<K extends keyof OAuth2Authorizer.SignalSignatures>(
1754
+ signal: K,
1755
+ ...args: GObject.GjsParameters<OAuth2Authorizer.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1756
+ ): void;
1757
+ emit(signal: string, ...args: any[]): void;
1758
+
1759
+ // Static methods
1760
+
1761
+ static test_load_credentials(self: Authorizer): boolean;
1762
+ static test_save_credentials(self: Authorizer): void;
1763
+
1764
+ // Methods
1765
+
1766
+ build_authentication_uri(): string;
1767
+ request_authorization(authorization_code: string, cancellable: Gio.Cancellable): boolean;
1768
+
1769
+ // Inherited methods
1770
+ process_request(message: Soup.Message): void;
1771
+ refresh_authorization(cancellable: Gio.Cancellable): boolean;
1772
+ vfunc_process_request(message: Soup.Message): void;
1773
+ vfunc_refresh_authorization(cancellable: Gio.Cancellable): boolean;
1774
+ /**
1775
+ * Creates a binding between `source_property` on `source` and `target_property`
1776
+ * on `target`.
1777
+ *
1778
+ * Whenever the `source_property` is changed the `target_property` is
1779
+ * updated using the same value. For instance:
1780
+ *
1781
+ *
1782
+ * ```c
1783
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
1784
+ * ```
1785
+ *
1786
+ *
1787
+ * Will result in the "sensitive" property of the widget #GObject instance to be
1788
+ * updated with the same value of the "active" property of the action #GObject
1789
+ * instance.
1790
+ *
1791
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1792
+ * if `target_property` on `target` changes then the `source_property` on `source`
1793
+ * will be updated as well.
1794
+ *
1795
+ * The binding will automatically be removed when either the `source` or the
1796
+ * `target` instances are finalized. To remove the binding without affecting the
1797
+ * `source` and the `target` you can just call g_object_unref() on the returned
1798
+ * #GBinding instance.
1799
+ *
1800
+ * Removing the binding by calling g_object_unref() on it must only be done if
1801
+ * the binding, `source` and `target` are only used from a single thread and it
1802
+ * is clear that both `source` and `target` outlive the binding. Especially it
1803
+ * is not safe to rely on this if the binding, `source` or `target` can be
1804
+ * finalized from different threads. Keep another reference to the binding and
1805
+ * use g_binding_unbind() instead to be on the safe side.
1806
+ *
1807
+ * A #GObject can have multiple bindings.
1808
+ * @param source_property the property on @source to bind
1809
+ * @param target the target #GObject
1810
+ * @param target_property the property on @target to bind
1811
+ * @param flags flags to pass to #GBinding
1812
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1813
+ */
1814
+ bind_property(
1815
+ source_property: string,
1816
+ target: GObject.Object,
1817
+ target_property: string,
1818
+ flags: GObject.BindingFlags | null,
1819
+ ): GObject.Binding;
1820
+ /**
1821
+ * Complete version of g_object_bind_property().
1822
+ *
1823
+ * Creates a binding between `source_property` on `source` and `target_property`
1824
+ * on `target,` allowing you to set the transformation functions to be used by
1825
+ * the binding.
1826
+ *
1827
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1828
+ * if `target_property` on `target` changes then the `source_property` on `source`
1829
+ * will be updated as well. The `transform_from` function is only used in case
1830
+ * of bidirectional bindings, otherwise it will be ignored
1831
+ *
1832
+ * The binding will automatically be removed when either the `source` or the
1833
+ * `target` instances are finalized. This will release the reference that is
1834
+ * being held on the #GBinding instance; if you want to hold on to the
1835
+ * #GBinding instance, you will need to hold a reference to it.
1836
+ *
1837
+ * To remove the binding, call g_binding_unbind().
1838
+ *
1839
+ * A #GObject can have multiple bindings.
1840
+ *
1841
+ * The same `user_data` parameter will be used for both `transform_to`
1842
+ * and `transform_from` transformation functions; the `notify` function will
1843
+ * be called once, when the binding is removed. If you need different data
1844
+ * for each transformation function, please use
1845
+ * g_object_bind_property_with_closures() instead.
1846
+ * @param source_property the property on @source to bind
1847
+ * @param target the target #GObject
1848
+ * @param target_property the property on @target to bind
1849
+ * @param flags flags to pass to #GBinding
1850
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
1851
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
1852
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
1853
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1854
+ */
1855
+ bind_property_full(
1856
+ source_property: string,
1857
+ target: GObject.Object,
1858
+ target_property: string,
1859
+ flags: GObject.BindingFlags | null,
1860
+ transform_to?: GObject.BindingTransformFunc | null,
1861
+ transform_from?: GObject.BindingTransformFunc | null,
1862
+ notify?: GLib.DestroyNotify | null,
1863
+ ): GObject.Binding;
1864
+ // Conflicted with GObject.Object.bind_property_full
1865
+ bind_property_full(...args: never[]): any;
1866
+ /**
1867
+ * This function is intended for #GObject implementations to re-enforce
1868
+ * a [floating][floating-ref] object reference. Doing this is seldom
1869
+ * required: all #GInitiallyUnowneds are created with a floating reference
1870
+ * which usually just needs to be sunken by calling g_object_ref_sink().
1871
+ */
1872
+ force_floating(): void;
1873
+ /**
1874
+ * Increases the freeze count on `object`. If the freeze count is
1875
+ * non-zero, the emission of "notify" signals on `object` is
1876
+ * stopped. The signals are queued until the freeze count is decreased
1877
+ * to zero. Duplicate notifications are squashed so that at most one
1878
+ * #GObject::notify signal is emitted for each property modified while the
1879
+ * object is frozen.
1880
+ *
1881
+ * This is necessary for accessors that modify multiple properties to prevent
1882
+ * premature notification while the object is still being modified.
1883
+ */
1884
+ freeze_notify(): void;
1885
+ /**
1886
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
1887
+ * @param key name of the key for that association
1888
+ * @returns the data if found, or %NULL if no such data exists.
1889
+ */
1890
+ get_data(key: string): any | null;
1891
+ /**
1892
+ * Gets a property of an object.
1893
+ *
1894
+ * The value can be:
1895
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
1896
+ * - a GObject.Value initialized with the expected type of the property
1897
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
1898
+ *
1899
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
1900
+ *
1901
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
1902
+ * @param property_name The name of the property to get
1903
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
1904
+ */
1905
+ get_property(property_name: string, value: GObject.Value | any): any;
1906
+ /**
1907
+ * This function gets back user data pointers stored via
1908
+ * g_object_set_qdata().
1909
+ * @param quark A #GQuark, naming the user data pointer
1910
+ * @returns The user data pointer set, or %NULL
1911
+ */
1912
+ get_qdata(quark: GLib.Quark): any | null;
1913
+ /**
1914
+ * Gets `n_properties` properties for an `object`.
1915
+ * Obtained properties will be set to `values`. All properties must be valid.
1916
+ * Warnings will be emitted and undefined behaviour may result if invalid
1917
+ * properties are passed in.
1918
+ * @param names the names of each property to get
1919
+ * @param values the values of each property to get
1920
+ */
1921
+ getv(names: string[], values: (GObject.Value | any)[]): void;
1922
+ /**
1923
+ * Checks whether `object` has a [floating][floating-ref] reference.
1924
+ * @returns %TRUE if @object has a floating reference
1925
+ */
1926
+ is_floating(): boolean;
1927
+ /**
1928
+ * Emits a "notify" signal for the property `property_name` on `object`.
1929
+ *
1930
+ * When possible, eg. when signaling a property change from within the class
1931
+ * that registered the property, you should use g_object_notify_by_pspec()
1932
+ * instead.
1933
+ *
1934
+ * Note that emission of the notify signal may be blocked with
1935
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1936
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1937
+ * called.
1938
+ * @param property_name the name of a property installed on the class of @object.
1939
+ */
1940
+ notify(property_name: string): void;
1941
+ /**
1942
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
1943
+ *
1944
+ * This function omits the property name lookup, hence it is faster than
1945
+ * g_object_notify().
1946
+ *
1947
+ * One way to avoid using g_object_notify() from within the
1948
+ * class that registered the properties, and using g_object_notify_by_pspec()
1949
+ * instead, is to store the GParamSpec used with
1950
+ * g_object_class_install_property() inside a static array, e.g.:
1951
+ *
1952
+ *
1953
+ * ```c
1954
+ * typedef enum
1955
+ * {
1956
+ * PROP_FOO = 1,
1957
+ * PROP_LAST
1958
+ * } MyObjectProperty;
1959
+ *
1960
+ * static GParamSpec *properties[PROP_LAST];
1961
+ *
1962
+ * static void
1963
+ * my_object_class_init (MyObjectClass *klass)
1964
+ * {
1965
+ * properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
1966
+ * 0, 100,
1967
+ * 50,
1968
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
1969
+ * g_object_class_install_property (gobject_class,
1970
+ * PROP_FOO,
1971
+ * properties[PROP_FOO]);
1972
+ * }
1973
+ * ```
1974
+ *
1975
+ *
1976
+ * and then notify a change on the "foo" property with:
1977
+ *
1978
+ *
1979
+ * ```c
1980
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
1981
+ * ```
1982
+ *
1983
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
1984
+ */
1985
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
1986
+ /**
1987
+ * Increases the reference count of `object`.
1988
+ *
1989
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
1990
+ * of `object` will be propagated to the return type (using the GCC typeof()
1991
+ * extension), so any casting the caller needs to do on the return type must be
1992
+ * explicit.
1993
+ * @returns the same @object
1994
+ */
1995
+ ref(): GObject.Object;
1996
+ /**
1997
+ * Increase the reference count of `object,` and possibly remove the
1998
+ * [floating][floating-ref] reference, if `object` has a floating reference.
1999
+ *
2000
+ * In other words, if the object is floating, then this call "assumes
2001
+ * ownership" of the floating reference, converting it to a normal
2002
+ * reference by clearing the floating flag while leaving the reference
2003
+ * count unchanged. If the object is not floating, then this call
2004
+ * adds a new normal reference increasing the reference count by one.
2005
+ *
2006
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
2007
+ * under the same conditions as for g_object_ref().
2008
+ * @returns @object
2009
+ */
2010
+ ref_sink(): GObject.Object;
2011
+ /**
2012
+ * Releases all references to other objects. This can be used to break
2013
+ * reference cycles.
2014
+ *
2015
+ * This function should only be called from object system implementations.
2016
+ */
2017
+ run_dispose(): void;
2018
+ /**
2019
+ * Each object carries around a table of associations from
2020
+ * strings to pointers. This function lets you set an association.
2021
+ *
2022
+ * If the object already had an association with that name,
2023
+ * the old association will be destroyed.
2024
+ *
2025
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
2026
+ * This means a copy of `key` is kept permanently (even after `object` has been
2027
+ * finalized) — so it is recommended to only use a small, bounded set of values
2028
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
2029
+ * @param key name of the key
2030
+ * @param data data to associate with that key
2031
+ */
2032
+ set_data(key: string, data?: any | null): void;
2033
+ /**
2034
+ * Sets a property on an object.
2035
+ * @param property_name The name of the property to set
2036
+ * @param value The value to set the property to
2037
+ */
2038
+ set_property(property_name: string, value: GObject.Value | any): void;
2039
+ /**
2040
+ * Remove a specified datum from the object's data associations,
2041
+ * without invoking the association's destroy handler.
2042
+ * @param key name of the key
2043
+ * @returns the data if found, or %NULL if no such data exists.
2044
+ */
2045
+ steal_data(key: string): any | null;
2046
+ /**
2047
+ * This function gets back user data pointers stored via
2048
+ * g_object_set_qdata() and removes the `data` from object
2049
+ * without invoking its destroy() function (if any was
2050
+ * set).
2051
+ * Usually, calling this function is only required to update
2052
+ * user data pointers with a destroy notifier, for example:
2053
+ *
2054
+ * ```c
2055
+ * void
2056
+ * object_add_to_user_list (GObject *object,
2057
+ * const gchar *new_string)
2058
+ * {
2059
+ * // the quark, naming the object data
2060
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
2061
+ * // retrieve the old string list
2062
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
2063
+ *
2064
+ * // prepend new string
2065
+ * list = g_list_prepend (list, g_strdup (new_string));
2066
+ * // this changed 'list', so we need to set it again
2067
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
2068
+ * }
2069
+ * static void
2070
+ * free_string_list (gpointer data)
2071
+ * {
2072
+ * GList *node, *list = data;
2073
+ *
2074
+ * for (node = list; node; node = node->next)
2075
+ * g_free (node->data);
2076
+ * g_list_free (list);
2077
+ * }
2078
+ * ```
2079
+ *
2080
+ * Using g_object_get_qdata() in the above example, instead of
2081
+ * g_object_steal_qdata() would have left the destroy function set,
2082
+ * and thus the partial string list would have been freed upon
2083
+ * g_object_set_qdata_full().
2084
+ * @param quark A #GQuark, naming the user data pointer
2085
+ * @returns The user data pointer set, or %NULL
2086
+ */
2087
+ steal_qdata(quark: GLib.Quark): any | null;
2088
+ /**
2089
+ * Reverts the effect of a previous call to
2090
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
2091
+ * and when it reaches zero, queued "notify" signals are emitted.
2092
+ *
2093
+ * Duplicate notifications for each property are squashed so that at most one
2094
+ * #GObject::notify signal is emitted for each property, in the reverse order
2095
+ * in which they have been queued.
2096
+ *
2097
+ * It is an error to call this function when the freeze count is zero.
2098
+ */
2099
+ thaw_notify(): void;
2100
+ /**
2101
+ * Decreases the reference count of `object`. When its reference count
2102
+ * drops to 0, the object is finalized (i.e. its memory is freed).
2103
+ *
2104
+ * If the pointer to the #GObject may be reused in future (for example, if it is
2105
+ * an instance variable of another object), it is recommended to clear the
2106
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
2107
+ * invalid #GObject instance. Use g_clear_object() for this.
2108
+ */
2109
+ unref(): void;
2110
+ /**
2111
+ * This function essentially limits the life time of the `closure` to
2112
+ * the life time of the object. That is, when the object is finalized,
2113
+ * the `closure` is invalidated by calling g_closure_invalidate() on
2114
+ * it, in order to prevent invocations of the closure with a finalized
2115
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
2116
+ * added as marshal guards to the `closure,` to ensure that an extra
2117
+ * reference count is held on `object` during invocation of the
2118
+ * `closure`. Usually, this function will be called on closures that
2119
+ * use this `object` as closure data.
2120
+ * @param closure #GClosure to watch
2121
+ */
2122
+ watch_closure(closure: GObject.Closure): void;
2123
+ /**
2124
+ * the `constructed` function is called by g_object_new() as the
2125
+ * final step of the object creation process. At the point of the call, all
2126
+ * construction properties have been set on the object. The purpose of this
2127
+ * call is to allow for object initialisation steps that can only be performed
2128
+ * after construction properties have been set. `constructed` implementors
2129
+ * should chain up to the `constructed` call of their parent class to allow it
2130
+ * to complete its initialisation.
2131
+ */
2132
+ vfunc_constructed(): void;
2133
+ /**
2134
+ * emits property change notification for a bunch
2135
+ * of properties. Overriding `dispatch_properties_changed` should be rarely
2136
+ * needed.
2137
+ * @param n_pspecs
2138
+ * @param pspecs
2139
+ */
2140
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
2141
+ /**
2142
+ * the `dispose` function is supposed to drop all references to other
2143
+ * objects, but keep the instance otherwise intact, so that client method
2144
+ * invocations still work. It may be run multiple times (due to reference
2145
+ * loops). Before returning, `dispose` should chain up to the `dispose` method
2146
+ * of the parent class.
2147
+ */
2148
+ vfunc_dispose(): void;
2149
+ /**
2150
+ * instance finalization function, should finish the finalization of
2151
+ * the instance begun in `dispose` and chain up to the `finalize` method of the
2152
+ * parent class.
2153
+ */
2154
+ vfunc_finalize(): void;
2155
+ /**
2156
+ * the generic getter for all properties of this type. Should be
2157
+ * overridden for every type with properties.
2158
+ * @param property_id
2159
+ * @param value
2160
+ * @param pspec
2161
+ */
2162
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2163
+ /**
2164
+ * Emits a "notify" signal for the property `property_name` on `object`.
2165
+ *
2166
+ * When possible, eg. when signaling a property change from within the class
2167
+ * that registered the property, you should use g_object_notify_by_pspec()
2168
+ * instead.
2169
+ *
2170
+ * Note that emission of the notify signal may be blocked with
2171
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
2172
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
2173
+ * called.
2174
+ * @param pspec
2175
+ */
2176
+ vfunc_notify(pspec: GObject.ParamSpec): void;
2177
+ /**
2178
+ * the generic setter for all properties of this type. Should be
2179
+ * overridden for every type with properties. If implementations of
2180
+ * `set_property` don't emit property change notification explicitly, this will
2181
+ * be done implicitly by the type system. However, if the notify signal is
2182
+ * emitted explicitly, the type system will not emit it a second time.
2183
+ * @param property_id
2184
+ * @param value
2185
+ * @param pspec
2186
+ */
2187
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2188
+ /**
2189
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
2190
+ * @param id Handler ID of the handler to be disconnected
2191
+ */
2192
+ disconnect(id: number): void;
2193
+ /**
2194
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
2195
+ * @param properties Object containing the properties to set
2196
+ */
2197
+ set(properties: { [key: string]: any }): void;
2198
+ /**
2199
+ * Blocks a handler of an instance so it will not be called during any signal emissions
2200
+ * @param id Handler ID of the handler to be blocked
2201
+ */
2202
+ block_signal_handler(id: number): void;
2203
+ /**
2204
+ * Unblocks a handler so it will be called again during any signal emissions
2205
+ * @param id Handler ID of the handler to be unblocked
2206
+ */
2207
+ unblock_signal_handler(id: number): void;
2208
+ /**
2209
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
2210
+ * @param detailedName Name of the signal to stop emission of
2211
+ */
2212
+ stop_emission_by_name(detailedName: string): void;
2213
+ }
2214
+
2215
+ namespace Service {
2216
+ // Signal signatures
2217
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
2218
+ 'notify::authorizer': (pspec: GObject.ParamSpec) => void;
2219
+ }
2220
+
2221
+ // Constructor properties interface
2222
+
2223
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
2224
+ authorizer: Authorizer;
2225
+ }
2226
+ }
2227
+
2228
+ class Service extends GObject.Object {
2229
+ static $gtype: GObject.GType<Service>;
2230
+
2231
+ // Properties
2232
+
2233
+ set authorizer(val: Authorizer);
2234
+
2235
+ /**
2236
+ * Compile-time signal type information.
2237
+ *
2238
+ * This instance property is generated only for TypeScript type checking.
2239
+ * It is not defined at runtime and should not be accessed in JS code.
2240
+ * @internal
2241
+ */
2242
+ $signals: Service.SignalSignatures;
2243
+
2244
+ // Constructors
2245
+
2246
+ constructor(properties?: Partial<Service.ConstructorProps>, ...args: any[]);
2247
+
2248
+ _init(...args: any[]): void;
2249
+
2250
+ // Signals
2251
+
2252
+ connect<K extends keyof Service.SignalSignatures>(
2253
+ signal: K,
2254
+ callback: GObject.SignalCallback<this, Service.SignalSignatures[K]>,
2255
+ ): number;
2256
+ connect(signal: string, callback: (...args: any[]) => any): number;
2257
+ connect_after<K extends keyof Service.SignalSignatures>(
2258
+ signal: K,
2259
+ callback: GObject.SignalCallback<this, Service.SignalSignatures[K]>,
2260
+ ): number;
2261
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2262
+ emit<K extends keyof Service.SignalSignatures>(
2263
+ signal: K,
2264
+ ...args: GObject.GjsParameters<Service.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
2265
+ ): void;
2266
+ emit(signal: string, ...args: any[]): void;
2267
+
2268
+ // Static methods
2269
+
2270
+ static accept_certificate_cb(
2271
+ msg: Soup.Message,
2272
+ tls_cert: Gio.TlsCertificate,
2273
+ tls_errors: Gio.TlsCertificateFlags,
2274
+ session: any,
2275
+ ): boolean;
2276
+ static get_https_port(): number;
2277
+ static get_next_link(object: Json.Object): string;
2278
+ static handle_rate_limiting(msg: Soup.Message): boolean;
2279
+ static parse_response(bytes: GLib.Bytes | Uint8Array, object: Json.Object): Json.Parser;
2280
+
2281
+ // Methods
2282
+
2283
+ build_message(method: string, uri: string, etag: string, etag_if_match: boolean): Soup.Message;
2284
+ get_authorizer(): Authorizer;
2285
+ get_session(): Soup.Session;
2286
+ refresh_authorization(cancellable: Gio.Cancellable): boolean;
2287
+ send(message: Soup.Message, cancellable: Gio.Cancellable): Gio.InputStream;
2288
+ send_and_parse_response(message: Soup.Message, object: Json.Object, cancellable: Gio.Cancellable): Json.Parser;
2289
+ send_and_read(message: Soup.Message, cancellable: Gio.Cancellable): GLib.Bytes;
2290
+ }
2291
+
2292
+ namespace User {
2293
+ // Signal signatures
2294
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
2295
+
2296
+ // Constructor properties interface
2297
+
2298
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
2299
+ }
2300
+
2301
+ class User extends GObject.Object {
2302
+ static $gtype: GObject.GType<User>;
2303
+
2304
+ /**
2305
+ * Compile-time signal type information.
2306
+ *
2307
+ * This instance property is generated only for TypeScript type checking.
2308
+ * It is not defined at runtime and should not be accessed in JS code.
2309
+ * @internal
2310
+ */
2311
+ $signals: User.SignalSignatures;
2312
+
2313
+ // Constructors
2314
+
2315
+ constructor(properties?: Partial<User.ConstructorProps>, ...args: any[]);
2316
+
2317
+ _init(...args: any[]): void;
2318
+
2319
+ static ['new'](): User;
2320
+
2321
+ static new_from_json(json_object: Json.Object): User;
2322
+
2323
+ // Signals
2324
+
2325
+ connect<K extends keyof User.SignalSignatures>(
2326
+ signal: K,
2327
+ callback: GObject.SignalCallback<this, User.SignalSignatures[K]>,
2328
+ ): number;
2329
+ connect(signal: string, callback: (...args: any[]) => any): number;
2330
+ connect_after<K extends keyof User.SignalSignatures>(
2331
+ signal: K,
2332
+ callback: GObject.SignalCallback<this, User.SignalSignatures[K]>,
2333
+ ): number;
2334
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2335
+ emit<K extends keyof User.SignalSignatures>(
2336
+ signal: K,
2337
+ ...args: GObject.GjsParameters<User.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
2338
+ ): void;
2339
+ emit(signal: string, ...args: any[]): void;
2340
+
2341
+ // Methods
2342
+
2343
+ get_company_name(): string;
2344
+ get_department(): string;
2345
+ get_display_name(): string;
2346
+ get_given_name(): string;
2347
+ get_mail(): string;
2348
+ get_mail_name(): string;
2349
+ get_mobile_phone(): string;
2350
+ get_office_location(): string;
2351
+ get_surname(): string;
2352
+ }
2353
+
2354
+ namespace UserContactFolder {
2355
+ // Signal signatures
2356
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
2357
+
2358
+ // Constructor properties interface
2359
+
2360
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
2361
+ }
2362
+
2363
+ class UserContactFolder extends GObject.Object {
2364
+ static $gtype: GObject.GType<UserContactFolder>;
2365
+
2366
+ /**
2367
+ * Compile-time signal type information.
2368
+ *
2369
+ * This instance property is generated only for TypeScript type checking.
2370
+ * It is not defined at runtime and should not be accessed in JS code.
2371
+ * @internal
2372
+ */
2373
+ $signals: UserContactFolder.SignalSignatures;
2374
+
2375
+ // Constructors
2376
+
2377
+ constructor(properties?: Partial<UserContactFolder.ConstructorProps>, ...args: any[]);
2378
+
2379
+ _init(...args: any[]): void;
2380
+
2381
+ static ['new'](): UserContactFolder;
2382
+
2383
+ static new_from_json(json_object: Json.Object): UserContactFolder;
2384
+
2385
+ // Signals
2386
+
2387
+ connect<K extends keyof UserContactFolder.SignalSignatures>(
2388
+ signal: K,
2389
+ callback: GObject.SignalCallback<this, UserContactFolder.SignalSignatures[K]>,
2390
+ ): number;
2391
+ connect(signal: string, callback: (...args: any[]) => any): number;
2392
+ connect_after<K extends keyof UserContactFolder.SignalSignatures>(
2393
+ signal: K,
2394
+ callback: GObject.SignalCallback<this, UserContactFolder.SignalSignatures[K]>,
2395
+ ): number;
2396
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2397
+ emit<K extends keyof UserContactFolder.SignalSignatures>(
2398
+ signal: K,
2399
+ ...args: GObject.GjsParameters<UserContactFolder.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
2400
+ ): void;
2401
+ emit(signal: string, ...args: any[]): void;
2402
+
2403
+ // Methods
2404
+
2405
+ get_display_name(): string;
2406
+ get_id(): string;
2407
+ }
2408
+
2409
+ namespace UserService {
2410
+ // Signal signatures
2411
+ interface SignalSignatures extends Service.SignalSignatures {
2412
+ 'notify::authorizer': (pspec: GObject.ParamSpec) => void;
2413
+ }
2414
+
2415
+ // Constructor properties interface
2416
+
2417
+ interface ConstructorProps extends Service.ConstructorProps {}
2418
+ }
2419
+
2420
+ class UserService extends Service {
2421
+ static $gtype: GObject.GType<UserService>;
2422
+
2423
+ /**
2424
+ * Compile-time signal type information.
2425
+ *
2426
+ * This instance property is generated only for TypeScript type checking.
2427
+ * It is not defined at runtime and should not be accessed in JS code.
2428
+ * @internal
2429
+ */
2430
+ $signals: UserService.SignalSignatures;
2431
+
2432
+ // Constructors
2433
+
2434
+ constructor(properties?: Partial<UserService.ConstructorProps>, ...args: any[]);
2435
+
2436
+ _init(...args: any[]): void;
2437
+
2438
+ static ['new'](authorizer: Authorizer): UserService;
2439
+
2440
+ // Signals
2441
+
2442
+ connect<K extends keyof UserService.SignalSignatures>(
2443
+ signal: K,
2444
+ callback: GObject.SignalCallback<this, UserService.SignalSignatures[K]>,
2445
+ ): number;
2446
+ connect(signal: string, callback: (...args: any[]) => any): number;
2447
+ connect_after<K extends keyof UserService.SignalSignatures>(
2448
+ signal: K,
2449
+ callback: GObject.SignalCallback<this, UserService.SignalSignatures[K]>,
2450
+ ): number;
2451
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2452
+ emit<K extends keyof UserService.SignalSignatures>(
2453
+ signal: K,
2454
+ ...args: GObject.GjsParameters<UserService.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
2455
+ ): void;
2456
+ emit(signal: string, ...args: any[]): void;
2457
+
2458
+ // Methods
2459
+
2460
+ find_users(name: string, cancellable: Gio.Cancellable): User[];
2461
+ get_contact_folders(cancellable: Gio.Cancellable): UserContactFolder[];
2462
+ get_contacts(cancellable: Gio.Cancellable): UserContactFolder[];
2463
+ get_photo(mail: string, cancellable: Gio.Cancellable): GLib.Bytes;
2464
+ get_user(name: string, cancellable: Gio.Cancellable): User;
2465
+ }
2466
+
2467
+ class AuthorizerInterface {
2468
+ static $gtype: GObject.GType<AuthorizerInterface>;
2469
+
2470
+ // Constructors
2471
+
2472
+ _init(...args: any[]): void;
2473
+ }
2474
+
2475
+ class DriveClass {
2476
+ static $gtype: GObject.GType<DriveClass>;
2477
+
2478
+ // Constructors
2479
+
2480
+ _init(...args: any[]): void;
2481
+ }
2482
+
2483
+ class DriveItemClass {
2484
+ static $gtype: GObject.GType<DriveItemClass>;
2485
+
2486
+ // Fields
2487
+
2488
+ padding: any[];
2489
+
2490
+ // Constructors
2491
+
2492
+ _init(...args: any[]): void;
2493
+ }
2494
+
2495
+ class DriveItemFileClass {
2496
+ static $gtype: GObject.GType<DriveItemFileClass>;
2497
+
2498
+ // Constructors
2499
+
2500
+ _init(...args: any[]): void;
2501
+ }
2502
+
2503
+ class DriveItemFolderClass {
2504
+ static $gtype: GObject.GType<DriveItemFolderClass>;
2505
+
2506
+ // Constructors
2507
+
2508
+ _init(...args: any[]): void;
2509
+ }
2510
+
2511
+ class DriveServiceClass {
2512
+ static $gtype: GObject.GType<DriveServiceClass>;
2513
+
2514
+ // Constructors
2515
+
2516
+ _init(...args: any[]): void;
2517
+ }
2518
+
2519
+ class GoaAuthorizerClass {
2520
+ static $gtype: GObject.GType<GoaAuthorizerClass>;
2521
+
2522
+ // Constructors
2523
+
2524
+ _init(...args: any[]): void;
2525
+ }
2526
+
2527
+ class GoaAuthorizerPrivate {
2528
+ static $gtype: GObject.GType<GoaAuthorizerPrivate>;
2529
+
2530
+ // Constructors
2531
+
2532
+ _init(...args: any[]): void;
2533
+ }
2534
+
2535
+ class InputStreamClass {
2536
+ static $gtype: GObject.GType<InputStreamClass>;
2537
+
2538
+ // Constructors
2539
+
2540
+ _init(...args: any[]): void;
2541
+ }
2542
+
2543
+ class InputStreamPrivate {
2544
+ static $gtype: GObject.GType<InputStreamPrivate>;
2545
+
2546
+ // Constructors
2547
+
2548
+ _init(...args: any[]): void;
2549
+ }
2550
+
2551
+ class MailFolderClass {
2552
+ static $gtype: GObject.GType<MailFolderClass>;
2553
+
2554
+ // Constructors
2555
+
2556
+ _init(...args: any[]): void;
2557
+ }
2558
+
2559
+ class MailMessageClass {
2560
+ static $gtype: GObject.GType<MailMessageClass>;
2561
+
2562
+ // Constructors
2563
+
2564
+ _init(...args: any[]): void;
2565
+ }
2566
+
2567
+ class MailServiceClass {
2568
+ static $gtype: GObject.GType<MailServiceClass>;
2569
+
2570
+ // Constructors
2571
+
2572
+ _init(...args: any[]): void;
2573
+ }
2574
+
2575
+ class OAuth2AuthorizerClass {
2576
+ static $gtype: GObject.GType<OAuth2AuthorizerClass>;
2577
+
2578
+ // Constructors
2579
+
2580
+ _init(...args: any[]): void;
2581
+ }
2582
+
2583
+ class OAuth2AuthorizerPrivate {
2584
+ static $gtype: GObject.GType<OAuth2AuthorizerPrivate>;
2585
+
2586
+ // Constructors
2587
+
2588
+ _init(...args: any[]): void;
2589
+ }
2590
+
2591
+ class ServiceClass {
2592
+ static $gtype: GObject.GType<ServiceClass>;
2593
+
2594
+ // Constructors
2595
+
2596
+ _init(...args: any[]): void;
2597
+ }
2598
+
2599
+ class UserClass {
2600
+ static $gtype: GObject.GType<UserClass>;
2601
+
2602
+ // Constructors
2603
+
2604
+ _init(...args: any[]): void;
2605
+ }
2606
+
2607
+ class UserContactFolderClass {
2608
+ static $gtype: GObject.GType<UserContactFolderClass>;
2609
+
2610
+ // Constructors
2611
+
2612
+ _init(...args: any[]): void;
2613
+ }
2614
+
2615
+ class UserServiceClass {
2616
+ static $gtype: GObject.GType<UserServiceClass>;
2617
+
2618
+ // Constructors
2619
+
2620
+ _init(...args: any[]): void;
2621
+ }
2622
+
2623
+ abstract class _DriveItemFileClass {
2624
+ static $gtype: GObject.GType<_DriveItemFileClass>;
2625
+
2626
+ // Fields
2627
+
2628
+ padding: any[];
2629
+
2630
+ // Constructors
2631
+
2632
+ _init(...args: any[]): void;
2633
+ }
2634
+
2635
+ abstract class _DriveItemFolderClass {
2636
+ static $gtype: GObject.GType<_DriveItemFolderClass>;
2637
+
2638
+ // Fields
2639
+
2640
+ padding: any[];
2641
+
2642
+ // Constructors
2643
+
2644
+ _init(...args: any[]): void;
2645
+ }
2646
+
2647
+ namespace Authorizer {
2648
+ /**
2649
+ * Interface for implementing Authorizer.
2650
+ * Contains only the virtual methods that need to be implemented.
2651
+ */
2652
+ interface Interface {
2653
+ // Virtual methods
2654
+
2655
+ vfunc_process_request(message: Soup.Message): void;
2656
+ vfunc_refresh_authorization(cancellable: Gio.Cancellable): boolean;
2657
+ }
2658
+
2659
+ // Constructor properties interface
2660
+
2661
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
2662
+ }
2663
+
2664
+ export interface AuthorizerNamespace {
2665
+ $gtype: GObject.GType<Authorizer>;
2666
+ prototype: Authorizer;
2667
+ }
2668
+ interface Authorizer extends GObject.Object, Authorizer.Interface {
2669
+ // Methods
2670
+
2671
+ process_request(message: Soup.Message): void;
2672
+ refresh_authorization(cancellable: Gio.Cancellable): boolean;
2673
+ }
2674
+
2675
+ export const Authorizer: AuthorizerNamespace & {
2676
+ new (): Authorizer; // This allows `obj instanceof Authorizer`
2677
+ };
2678
+
2679
+ /**
2680
+ * Name of the imported GIR library
2681
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
2682
+ */
2683
+ const __name__: string;
2684
+ /**
2685
+ * Version of the imported GIR library
2686
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
2687
+ */
2688
+ const __version__: string;
2689
+ }
2690
+
2691
+ export default Msg;
2692
+
2693
+ // END