@girs/gpaste-2 2.0.0-4.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gpaste-2.d.ts ADDED
@@ -0,0 +1,3360 @@
1
+ /*
2
+ * Type Definitions for Gjs (https://gjs.guide/)
3
+ *
4
+ * These type definitions are automatically generated, do not edit them by hand.
5
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
6
+ */
7
+
8
+ import './gpaste-2-ambient.d.ts';
9
+
10
+ /**
11
+ * GPaste-2
12
+ */
13
+
14
+ import type Gio from '@girs/gio-2.0';
15
+ import type GObject from '@girs/gobject-2.0';
16
+ import type GLib from '@girs/glib-2.0';
17
+
18
+ export namespace GPaste {
19
+ enum ItemKind {
20
+ TEXT,
21
+ URIS,
22
+ IMAGE,
23
+ PASSWORD,
24
+ }
25
+ enum UpdateAction {
26
+ REPLACE,
27
+ REMOVE,
28
+ }
29
+ enum UpdateTarget {
30
+ ALL,
31
+ POSITION,
32
+ }
33
+ const BUS_NAME: string;
34
+ const CLOSE_ON_SELECT_SETTING: string;
35
+ const DAEMON_ABOUT: string;
36
+ const DAEMON_ADD: string;
37
+ const DAEMON_ADD_FILE: string;
38
+ const DAEMON_ADD_PASSWORD: string;
39
+ const DAEMON_BACKUP_HISTORY: string;
40
+ const DAEMON_DELETE: string;
41
+ const DAEMON_DELETE_HISTORY: string;
42
+ const DAEMON_DELETE_PASSWORD: string;
43
+ const DAEMON_EMPTY_HISTORY: string;
44
+ const DAEMON_GET_ELEMENT: string;
45
+ const DAEMON_GET_ELEMENTS: string;
46
+ const DAEMON_GET_ELEMENT_AT_INDEX: string;
47
+ const DAEMON_GET_ELEMENT_KIND: string;
48
+ const DAEMON_GET_HISTORY: string;
49
+ const DAEMON_GET_HISTORY_NAME: string;
50
+ const DAEMON_GET_HISTORY_SIZE: string;
51
+ const DAEMON_GET_RAW_ELEMENT: string;
52
+ const DAEMON_GET_RAW_HISTORY: string;
53
+ const DAEMON_INTERFACE: string;
54
+ const DAEMON_INTERFACE_NAME: string;
55
+ const DAEMON_LIST_HISTORIES: string;
56
+ const DAEMON_MERGE: string;
57
+ const DAEMON_OBJECT_PATH: string;
58
+ const DAEMON_ON_EXTENSION_STATE_CHANGED: string;
59
+ const DAEMON_PROP_ACTIVE: string;
60
+ const DAEMON_PROP_VERSION: string;
61
+ const DAEMON_REEXECUTE: string;
62
+ const DAEMON_RENAME_PASSWORD: string;
63
+ const DAEMON_REPLACE: string;
64
+ const DAEMON_SEARCH: string;
65
+ const DAEMON_SELECT: string;
66
+ const DAEMON_SET_PASSWORD: string;
67
+ const DAEMON_SHOW_HISTORY: string;
68
+ const DAEMON_SIG_DELETE_HISTORY: string;
69
+ const DAEMON_SIG_EMPTY_HISTORY: string;
70
+ const DAEMON_SIG_SHOW_HISTORY: string;
71
+ const DAEMON_SIG_SWITCH_HISTORY: string;
72
+ const DAEMON_SIG_UPDATE: string;
73
+ const DAEMON_SWITCH_HISTORY: string;
74
+ const DAEMON_TRACK: string;
75
+ const DAEMON_UPLOAD: string;
76
+ const ELEMENT_SIZE_SETTING: string;
77
+ const EMPTY_HISTORY_CONFIRMATION_SETTING: string;
78
+ const EXTENSION_ENABLED_SETTING: string;
79
+ const GNOME_SHELL_BUS_NAME: string;
80
+ const GROWING_LINES_SETTING: string;
81
+ const HISTORY_NAME_SETTING: string;
82
+ const IMAGES_SUPPORT_SETTING: string;
83
+ const LAUNCH_UI_SETTING: string;
84
+ const MAKE_PASSWORD_SETTING: string;
85
+ const MAX_DISPLAYED_HISTORY_SIZE_SETTING: string;
86
+ const MAX_HISTORY_SIZE_SETTING: string;
87
+ const MAX_MEMORY_USAGE_SETTING: string;
88
+ const MAX_TEXT_ITEM_SIZE_SETTING: string;
89
+ const MIN_TEXT_ITEM_SIZE_SETTING: string;
90
+ const OPEN_CENTERED_SETTING: string;
91
+ const POP_SETTING: string;
92
+ const PRIMARY_TO_HISTORY_SETTING: string;
93
+ const RICH_TEXT_SUPPORT_SETTING: string;
94
+ const SAVE_HISTORY_SETTING: string;
95
+ const SCREENSAVER_BUS_NAME: string;
96
+ const SEARCH_PROVIDER_ACTIVATE_RESULT: string;
97
+ const SEARCH_PROVIDER_GET_INITIAL_RESULT_SET: string;
98
+ const SEARCH_PROVIDER_GET_RESULT_METAS: string;
99
+ const SEARCH_PROVIDER_GET_SUBSEARCH_RESULT_SET: string;
100
+ const SEARCH_PROVIDER_INTERFACE: string;
101
+ const SEARCH_PROVIDER_INTERFACE_NAME: string;
102
+ const SEARCH_PROVIDER_LAUNCH_SEARCH: string;
103
+ const SEARCH_PROVIDER_OBJECT_PATH: string;
104
+ const SETTINGS_NAME: string;
105
+ const SETTINGS_PATH: string;
106
+ const SHELL_ENABLED_EXTENSIONS_SETTING: string;
107
+ const SHELL_SETTINGS_NAME: string;
108
+ const SHOW_HISTORY_SETTING: string;
109
+ const SYNCHRONIZE_CLIPBOARDS_SETTING: string;
110
+ const SYNC_CLIPBOARD_TO_PRIMARY_SETTING: string;
111
+ const SYNC_PRIMARY_TO_CLIPBOARD_SETTING: string;
112
+ const TRACK_CHANGES_SETTING: string;
113
+ const TRACK_EXTENSION_STATE_SETTING: string;
114
+ const TRIM_ITEMS_SETTING: string;
115
+ const UPLOAD_SETTING: string;
116
+ /**
117
+ * Activate an action on a GPaste app
118
+ * @param action the action to activate
119
+ * @param arg the action argument
120
+ */
121
+ function util_activate_ui(action: string, arg?: GLib.Variant | null): void;
122
+ /**
123
+ * activate an action from GPaste Ui
124
+ * @param action the action to activate
125
+ * @param arg the action argument
126
+ * @returns whether the action was successful
127
+ */
128
+ function util_activate_ui_sync(action: string, arg?: GLib.Variant | null): boolean;
129
+ /**
130
+ * Empty a history after confirmation.
131
+ * Confirmation is skipped if GPaste is configured to do so.
132
+ * @param client a #GPasteClient instance
133
+ * @param settings a #GPasteSettings instance
134
+ * @param history the name of the history to empty
135
+ */
136
+ function util_empty_with_confirmation(client: Client, settings: Settings, history: string): void;
137
+ /**
138
+ * Empty a history after confirmation.
139
+ * Confirmation is skipped if GPaste is configured to do so.
140
+ * @param client a #GPasteClient instance
141
+ * @param settings a #GPasteSettings instance
142
+ * @param history the name of the history to empty
143
+ * @returns whether the action was successful
144
+ */
145
+ function util_empty_with_confirmation_sync(client: Client, settings: Settings, history: string): boolean;
146
+ /**
147
+ * Ensure the history dir exists
148
+ * @param settings a #GPasteSettings instance
149
+ * @returns where it exists or if there was an error creating it
150
+ */
151
+ function util_ensure_history_dir_exists(settings: Settings): boolean;
152
+ function util_get_dbus_au_result(variant: GLib.Variant, len: number): number;
153
+ /**
154
+ * Get the "(ss)" GVariant as an item
155
+ * @param variant a #GVariant
156
+ * @returns The item
157
+ */
158
+ function util_get_dbus_item_result(variant: GLib.Variant): ClientItem;
159
+ /**
160
+ * Get the "a(ss)" GVariant as a list of items
161
+ * @param variant a #GVariant
162
+ * @returns The items
163
+ */
164
+ function util_get_dbus_items_result(variant: GLib.Variant): ClientItem[];
165
+ /**
166
+ * Get the directory where we store the history
167
+ * @returns the directory
168
+ */
169
+ function util_get_history_dir(): Gio.File;
170
+ /**
171
+ * Get the path to the directory where we store the history
172
+ * @returns the directory path
173
+ */
174
+ function util_get_history_dir_path(): string;
175
+ /**
176
+ * Get the file in which we store the history
177
+ * @param name the name of the history
178
+ * @param extension the file extension
179
+ * @returns the file
180
+ */
181
+ function util_get_history_file(name: string, extension: string): Gio.File;
182
+ /**
183
+ * Get the path to the file in which we store the history
184
+ * @param name the name of the history
185
+ * @param extension the file extension
186
+ * @returns the file path
187
+ */
188
+ function util_get_history_file_path(name: string, extension: string): string;
189
+ /**
190
+ * Check whether gnome-shell is installed or not
191
+ * @returns %TRUE if gnome-shell is installed
192
+ */
193
+ function util_has_gnome_shell(): boolean;
194
+ /**
195
+ * Read the pid file
196
+ * @param component The component we're handling
197
+ * @returns the pid
198
+ */
199
+ function util_read_pid_file(component: string): GLib.Pid;
200
+ function util_replace(text: string, pattern: string, substitution: string): string;
201
+ /**
202
+ * spawn a GPaste app
203
+ * @param app the GPaste app to spawn
204
+ */
205
+ function util_spawn(app: string): void;
206
+ /**
207
+ * spawn a GPaste app
208
+ * @param app the GPaste app to spawn
209
+ * @returns whether the spawn was successful
210
+ */
211
+ function util_spawn_sync(app: string): boolean;
212
+ /**
213
+ * Write the pid file
214
+ * @param component The component we're handling
215
+ */
216
+ function util_write_pid_file(component: string): void;
217
+ /**
218
+ * Decode the text to its original pre-xml form
219
+ * @param text The text to decode
220
+ * @returns the decoded text
221
+ */
222
+ function util_xml_decode(text: string): string;
223
+ /**
224
+ * Encode the text into its xml form
225
+ * @param text The text to encode
226
+ * @returns the encoded text
227
+ */
228
+ function util_xml_encode(text: string): string;
229
+ /**
230
+ * Controls in which GNOME Shell states an action (like keybindings and gestures)
231
+ * should be handled.
232
+ */
233
+ enum GnomeShellActionMode {
234
+ /**
235
+ * block action
236
+ */
237
+ NONE,
238
+ /**
239
+ * allow action when in window mode,
240
+ * e.g. when the focus is in an application window
241
+ */
242
+ NORMAL,
243
+ /**
244
+ * allow action while the overview
245
+ * is active
246
+ */
247
+ OVERVIEW,
248
+ /**
249
+ * allow action when the screen
250
+ * is locked, e.g. when the screen shield is shown
251
+ */
252
+ LOCK_SCREEN,
253
+ /**
254
+ * allow action in the unlock
255
+ * dialog
256
+ */
257
+ UNLOCK_SCREEN,
258
+ /**
259
+ * allow action in the login screen
260
+ */
261
+ LOGIN_SCREEN,
262
+ /**
263
+ * allow action when a system modal
264
+ * dialog (e.g. authentification or session dialogs) is open
265
+ */
266
+ SYSTEM_MODAL,
267
+ /**
268
+ * allow action in looking glass
269
+ */
270
+ LOOKING_GLASS,
271
+ /**
272
+ * allow action while a shell menu is open
273
+ */
274
+ POPUP,
275
+ /**
276
+ * always allow action
277
+ */
278
+ ALL,
279
+ }
280
+ enum MetaKeyBindingFlags {
281
+ /**
282
+ * none
283
+ */
284
+ NONE,
285
+ /**
286
+ * per-window
287
+ */
288
+ PER_WINDOW,
289
+ /**
290
+ * built-in
291
+ */
292
+ BUILTIN,
293
+ /**
294
+ * is reversed
295
+ */
296
+ IS_REVERSED,
297
+ /**
298
+ * always active
299
+ */
300
+ NON_MASKABLE,
301
+ IGNORE_AUTOREPEAT,
302
+ }
303
+ module Client {
304
+ // Signal callback interfaces
305
+
306
+ interface DeleteHistory {
307
+ (history: string): void;
308
+ }
309
+
310
+ interface EmptyHistory {
311
+ (history: string): void;
312
+ }
313
+
314
+ interface ShowHistory {
315
+ (): void;
316
+ }
317
+
318
+ interface SwitchHistory {
319
+ (history: string): void;
320
+ }
321
+
322
+ interface Tracking {
323
+ (object: boolean): void;
324
+ }
325
+
326
+ interface Update {
327
+ (action: UpdateAction, target: UpdateTarget, index: number): void;
328
+ }
329
+
330
+ // Constructor properties interface
331
+
332
+ interface ConstructorProps
333
+ extends Gio.DBusProxy.ConstructorProps,
334
+ Gio.AsyncInitable.ConstructorProps,
335
+ Gio.DBusInterface.ConstructorProps,
336
+ Gio.Initable.ConstructorProps {}
337
+ }
338
+
339
+ class Client extends Gio.DBusProxy implements Gio.AsyncInitable<Client>, Gio.DBusInterface, Gio.Initable {
340
+ static $gtype: GObject.GType<Client>;
341
+
342
+ // Constructors of GPaste.Client
343
+
344
+ constructor(properties?: Partial<Client.ConstructorProps>, ...args: any[]);
345
+
346
+ _init(...args: any[]): void;
347
+
348
+ static new_finish(result: Gio.AsyncResult): Client;
349
+ // Conflicted with Gio.AsyncInitable.new_finish
350
+
351
+ static new_finish(...args: never[]): any;
352
+
353
+ static new_sync(): Client;
354
+
355
+ // Own signals of GPaste.Client
356
+
357
+ connect(id: string, callback: (...args: any[]) => any): number;
358
+ connect_after(id: string, callback: (...args: any[]) => any): number;
359
+ emit(id: string, ...args: any[]): void;
360
+ connect(signal: 'delete-history', callback: (_source: this, history: string) => void): number;
361
+ connect_after(signal: 'delete-history', callback: (_source: this, history: string) => void): number;
362
+ emit(signal: 'delete-history', history: string): void;
363
+ connect(signal: 'empty-history', callback: (_source: this, history: string) => void): number;
364
+ connect_after(signal: 'empty-history', callback: (_source: this, history: string) => void): number;
365
+ emit(signal: 'empty-history', history: string): void;
366
+ connect(signal: 'show-history', callback: (_source: this) => void): number;
367
+ connect_after(signal: 'show-history', callback: (_source: this) => void): number;
368
+ emit(signal: 'show-history'): void;
369
+ connect(signal: 'switch-history', callback: (_source: this, history: string) => void): number;
370
+ connect_after(signal: 'switch-history', callback: (_source: this, history: string) => void): number;
371
+ emit(signal: 'switch-history', history: string): void;
372
+ connect(signal: 'tracking', callback: (_source: this, object: boolean) => void): number;
373
+ connect_after(signal: 'tracking', callback: (_source: this, object: boolean) => void): number;
374
+ emit(signal: 'tracking', object: boolean): void;
375
+ connect(
376
+ signal: 'update',
377
+ callback: (_source: this, action: UpdateAction, target: UpdateTarget, index: number) => void,
378
+ ): number;
379
+ connect_after(
380
+ signal: 'update',
381
+ callback: (_source: this, action: UpdateAction, target: UpdateTarget, index: number) => void,
382
+ ): number;
383
+ emit(signal: 'update', action: UpdateAction, target: UpdateTarget, index: number): void;
384
+
385
+ // Own static methods of GPaste.Client
386
+
387
+ /**
388
+ * Create a new instance of #GPasteClient
389
+ * @param callback Callback function to invoke when the proxy is ready.
390
+ */
391
+ static ['new'](callback?: Gio.AsyncReadyCallback<Client> | null): void;
392
+ // Conflicted with Gio.DBusProxy.new
393
+ static ['new'](...args: never[]): any;
394
+
395
+ // Own methods of GPaste.Client
396
+
397
+ /**
398
+ * Display the about dialog
399
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
400
+ */
401
+ about(callback?: Gio.AsyncReadyCallback<this> | null): void;
402
+ /**
403
+ * Display the about dialog
404
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
405
+ */
406
+ about_finish(result: Gio.AsyncResult): void;
407
+ /**
408
+ * Display the about dialog
409
+ */
410
+ about_sync(): void;
411
+ /**
412
+ * Add an item to the #GPasteDaemon
413
+ * @param text the text to add
414
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
415
+ */
416
+ add(text: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
417
+ /**
418
+ * Add the file contents to the #GPasteDaemon
419
+ * @param file the file to add
420
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
421
+ */
422
+ add_file(file: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
423
+ /**
424
+ * Add the file contents to the #GPasteDaemon
425
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
426
+ */
427
+ add_file_finish(result: Gio.AsyncResult): void;
428
+ /**
429
+ * Add the file contents to the #GPasteDaemon
430
+ * @param file the file to add
431
+ */
432
+ add_file_sync(file: string): void;
433
+ /**
434
+ * Add an item to the #GPasteDaemon
435
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
436
+ */
437
+ add_finish(result: Gio.AsyncResult): void;
438
+ /**
439
+ * Add the password to the #GPasteDaemon
440
+ * @param name the name to identify the password to add
441
+ * @param password the password to add
442
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
443
+ */
444
+ add_password(name: string, password: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
445
+ /**
446
+ * Add the password to the #GPasteDaemon
447
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
448
+ */
449
+ add_password_finish(result: Gio.AsyncResult): void;
450
+ /**
451
+ * Add the password to the #GPasteDaemon
452
+ * @param name the name to identify the password to add
453
+ * @param password the password to add
454
+ */
455
+ add_password_sync(name: string, password: string): void;
456
+ /**
457
+ * Add an item to the #GPasteDaemon
458
+ * @param text the text to add
459
+ */
460
+ add_sync(text: string): void;
461
+ /**
462
+ * Backup the current history
463
+ * @param history the name of the history
464
+ * @param backup the name of the backup
465
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
466
+ */
467
+ backup_history(history: string, backup: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
468
+ /**
469
+ * Backup the current history
470
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
471
+ */
472
+ backup_history_finish(result: Gio.AsyncResult): void;
473
+ /**
474
+ * Backup the current history
475
+ * @param history the name of the history
476
+ * @param backup the name of the backup
477
+ */
478
+ backup_history_sync(history: string, backup: string): void;
479
+ /**
480
+ * Delete an item from the #GPasteDaemon
481
+ * @param uuid the uuid of the element we want to delete
482
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
483
+ */
484
+ ['delete'](uuid: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
485
+ /**
486
+ * Delete an item from the #GPasteDaemon
487
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
488
+ */
489
+ delete_finish(result: Gio.AsyncResult): void;
490
+ /**
491
+ * Delete a history
492
+ * @param name the name of the history to delete
493
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
494
+ */
495
+ delete_history(name: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
496
+ /**
497
+ * Delete a history
498
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
499
+ */
500
+ delete_history_finish(result: Gio.AsyncResult): void;
501
+ /**
502
+ * Delete a history
503
+ * @param name the name of the history to delete
504
+ */
505
+ delete_history_sync(name: string): void;
506
+ /**
507
+ * Delete the password from the #GPasteDaemon
508
+ * @param name the name of the password to delete
509
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
510
+ */
511
+ delete_password(name: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
512
+ /**
513
+ * Delete the password from the #GPasteDaemon
514
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
515
+ */
516
+ delete_password_finish(result: Gio.AsyncResult): void;
517
+ /**
518
+ * Delete the password from the #GPasteDaemon
519
+ * @param name the name of the password to delete
520
+ */
521
+ delete_password_sync(name: string): void;
522
+ /**
523
+ * Delete an item from the #GPasteDaemon
524
+ * @param uuid the uuid of the element we want to delete
525
+ */
526
+ delete_sync(uuid: string): void;
527
+ /**
528
+ * Empty the history from the #GPasteDaemon
529
+ * @param name the name of the history to empty
530
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
531
+ */
532
+ empty_history(name: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
533
+ /**
534
+ * Empty the history from the #GPasteDaemon
535
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
536
+ */
537
+ empty_history_finish(result: Gio.AsyncResult): void;
538
+ /**
539
+ * Empty the history from the #GPasteDaemon
540
+ * @param name the name of the history to empty
541
+ */
542
+ empty_history_sync(name: string): void;
543
+ /**
544
+ * Get an item from the #GPasteDaemon
545
+ * @param uuid the uuid of the element we want to get
546
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
547
+ */
548
+ get_element(uuid: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
549
+ /**
550
+ * Get an item from the #GPasteDaemon
551
+ * @param index the index of the element we want to get
552
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
553
+ */
554
+ get_element_at_index(index: number, callback?: Gio.AsyncReadyCallback<this> | null): void;
555
+ /**
556
+ * Get an item from the #GPasteDaemon
557
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
558
+ * @returns a new #GPasteClientItem
559
+ */
560
+ get_element_at_index_finish(result: Gio.AsyncResult): ClientItem;
561
+ /**
562
+ * Get an item from the #GPasteDaemon
563
+ * @param index the index of the element we want to get
564
+ * @returns a new #GPasteClientItem
565
+ */
566
+ get_element_at_index_sync(index: number): ClientItem;
567
+ /**
568
+ * Get an item from the #GPasteDaemon
569
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
570
+ * @returns a newly allocated string
571
+ */
572
+ get_element_finish(result: Gio.AsyncResult): string;
573
+ /**
574
+ * Get the kind of an item from the #GPasteDaemon
575
+ * @param uuid the uuid of the element we want to get
576
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
577
+ */
578
+ get_element_kind(uuid: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
579
+ /**
580
+ * Get this kind of an item from the #GPasteDaemon
581
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
582
+ * @returns The #GPasteItemKind
583
+ */
584
+ get_element_kind_finish(result: Gio.AsyncResult): ItemKind;
585
+ /**
586
+ * Get the kind of an item from the #GPasteDaemon
587
+ * @param uuid the uuid of the element we want to get
588
+ * @returns The #GPasteItemKind
589
+ */
590
+ get_element_kind_sync(uuid: string): ItemKind;
591
+ /**
592
+ * Get an item from the #GPasteDaemon
593
+ * @param uuid the uuid of the element we want to get
594
+ * @returns a newly allocated string
595
+ */
596
+ get_element_sync(uuid: string): string;
597
+ /**
598
+ * Get some items from the #GPasteDaemon
599
+ * @param uuids the uuids of the elements we want to get
600
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
601
+ */
602
+ get_elements(uuids: string[], callback?: Gio.AsyncReadyCallback<this> | null): void;
603
+ /**
604
+ * Get some items from the #GPasteDaemon
605
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
606
+ * @returns a newly allocated array of string
607
+ */
608
+ get_elements_finish(result: Gio.AsyncResult): ClientItem[];
609
+ /**
610
+ * Get some items from the #GPasteDaemon
611
+ * @param uuids the uuids of the elements we want to get
612
+ * @returns a newly allocated array of string
613
+ */
614
+ get_elements_sync(uuids: string[]): ClientItem[];
615
+ /**
616
+ * Get the history from the #GPasteDaemon
617
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
618
+ */
619
+ get_history(callback?: Gio.AsyncReadyCallback<this> | null): void;
620
+ /**
621
+ * Get the history from the #GPasteDaemon
622
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
623
+ * @returns a newly allocated array of string
624
+ */
625
+ get_history_finish(result: Gio.AsyncResult): ClientItem[];
626
+ /**
627
+ * Get the name of the history from the #GPasteDaemon
628
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
629
+ */
630
+ get_history_name(callback?: Gio.AsyncReadyCallback<this> | null): void;
631
+ /**
632
+ * Get the name of the history from the #GPasteDaemon
633
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
634
+ * @returns a newly allocated string
635
+ */
636
+ get_history_name_finish(result: Gio.AsyncResult): string;
637
+ /**
638
+ * Get the name of the history from the #GPasteDaemon
639
+ * @returns a newly allocated string
640
+ */
641
+ get_history_name_sync(): string;
642
+ /**
643
+ * Get the history isize from the #GPasteDaemon
644
+ * @param name the name of the history
645
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
646
+ */
647
+ get_history_size(name: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
648
+ /**
649
+ * Get the history size from the #GPasteDaemon
650
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
651
+ * @returns the size of the history
652
+ */
653
+ get_history_size_finish(result: Gio.AsyncResult): number;
654
+ /**
655
+ * Get the history size from the #GPasteDaemon
656
+ * @param name the name of the history
657
+ * @returns the size of the history
658
+ */
659
+ get_history_size_sync(name: string): number;
660
+ /**
661
+ * Get the history from the #GPasteDaemon
662
+ * @returns a newly allocated array of string
663
+ */
664
+ get_history_sync(): ClientItem[];
665
+ /**
666
+ * Get an item from the #GPasteDaemon
667
+ * @param uuid the uuid of the element we want to get
668
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
669
+ */
670
+ get_raw_element(uuid: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
671
+ /**
672
+ * Get an item from the #GPasteDaemon
673
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
674
+ * @returns a newly allocated string
675
+ */
676
+ get_raw_element_finish(result: Gio.AsyncResult): string;
677
+ /**
678
+ * Get an item from the #GPasteDaemon
679
+ * @param uuid the uuid of the element we want to get
680
+ * @returns a newly allocated string
681
+ */
682
+ get_raw_element_sync(uuid: string): string;
683
+ /**
684
+ * Get the history from the #GPasteDaemon
685
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
686
+ */
687
+ get_raw_history(callback?: Gio.AsyncReadyCallback<this> | null): void;
688
+ /**
689
+ * Get the history from the #GPasteDaemon
690
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
691
+ * @returns a newly allocated array of string
692
+ */
693
+ get_raw_history_finish(result: Gio.AsyncResult): ClientItem[];
694
+ /**
695
+ * Get the history from the #GPasteDaemon
696
+ * @returns a newly allocated array of string
697
+ */
698
+ get_raw_history_sync(): ClientItem[];
699
+ /**
700
+ * Get the version of the running gpaste daemon
701
+ * @returns the version of the daemon
702
+ */
703
+ get_version(): string;
704
+ /**
705
+ * Check if the daemon is active
706
+ * @returns whether the daemon is active or not
707
+ */
708
+ is_active(): boolean;
709
+ /**
710
+ * List all available hisotries
711
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
712
+ */
713
+ list_histories(callback?: Gio.AsyncReadyCallback<this> | null): void;
714
+ /**
715
+ * List all available hisotries
716
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
717
+ * @returns a newly allocated array of string
718
+ */
719
+ list_histories_finish(result: Gio.AsyncResult): string[];
720
+ /**
721
+ * List all available hisotries
722
+ * @returns a newly allocated array of string
723
+ */
724
+ list_histories_sync(): string[];
725
+ /**
726
+ * Merge some history entries
727
+ *
728
+ * If decoration is " and separator is , and entries are foo bar baz
729
+ * result will be "foo","bar","baz"
730
+ * @param decoration the decoration to apply to each entry
731
+ * @param separator the separator to add between each entry
732
+ * @param uuids the uuids of the elements we want to get
733
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
734
+ */
735
+ merge(
736
+ decoration: string | null,
737
+ separator: string | null,
738
+ uuids: string[],
739
+ callback?: Gio.AsyncReadyCallback<this> | null,
740
+ ): void;
741
+ /**
742
+ * Merge some history entries
743
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
744
+ */
745
+ merge_finish(result: Gio.AsyncResult): void;
746
+ /**
747
+ * Merge some history entries
748
+ *
749
+ * If decoration is " and separator is , and entries are foo bar baz
750
+ * result will be "foo","bar","baz"
751
+ * @param decoration the decoration to apply to each entry
752
+ * @param separator the separator to add between each entry
753
+ * @param uuids the uuids of the elements we want to get
754
+ */
755
+ merge_sync(decoration: string | null, separator: string | null, uuids: string[]): void;
756
+ /**
757
+ * Call this when the extension changes its state
758
+ * @param state the new state of the extension
759
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
760
+ */
761
+ on_extension_state_changed(state: boolean, callback?: Gio.AsyncReadyCallback<this> | null): void;
762
+ /**
763
+ * Call this when the extension changes its state
764
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
765
+ */
766
+ on_extension_state_changed_finish(result: Gio.AsyncResult): void;
767
+ /**
768
+ * Call this when the extension changes its state
769
+ * @param state the new state of the extension
770
+ */
771
+ on_extension_state_changed_sync(state: boolean): void;
772
+ /**
773
+ * Reexecute the #GPasteDaemon
774
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
775
+ */
776
+ reexecute(callback?: Gio.AsyncReadyCallback<this> | null): void;
777
+ /**
778
+ * Reexecute the #GPasteDaemon
779
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
780
+ */
781
+ reexecute_finish(result: Gio.AsyncResult): void;
782
+ /**
783
+ * Reexecute the #GPasteDaemon
784
+ */
785
+ reexecute_sync(): void;
786
+ /**
787
+ * Rename the password in the #GPasteDaemon
788
+ * @param old_name the old name of the password to rename
789
+ * @param new_name the new name to give it
790
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
791
+ */
792
+ rename_password(old_name: string, new_name: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
793
+ /**
794
+ * Rename the password in the #GPasteDaemon
795
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
796
+ */
797
+ rename_password_finish(result: Gio.AsyncResult): void;
798
+ /**
799
+ * Rename the password in the #GPasteDaemon
800
+ * @param old_name the name of the password to rename
801
+ * @param new_name the new name to give it
802
+ */
803
+ rename_password_sync(old_name: string, new_name: string): void;
804
+ /**
805
+ * Replace the contents of an item
806
+ * @param uuid the uuid of the element we want to replace
807
+ * @param contents the replacement contents
808
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
809
+ */
810
+ replace(uuid: string, contents: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
811
+ /**
812
+ * Replace the contents of an item
813
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
814
+ */
815
+ replace_finish(result: Gio.AsyncResult): void;
816
+ /**
817
+ * Replace the contents of an item
818
+ * @param uuid the uuid of the element we want to replace
819
+ * @param contents the replacement contents
820
+ */
821
+ replace_sync(uuid: string, contents: string): void;
822
+ /**
823
+ * Search for items matching `pattern` in history
824
+ * @param pattern the pattern to look for in history
825
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
826
+ */
827
+ search(pattern: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
828
+ /**
829
+ * Search for items matching `pattern` in history
830
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
831
+ * @returns The indexes of the matching items
832
+ */
833
+ search_finish(result: Gio.AsyncResult): string[];
834
+ /**
835
+ * Search for items matching `pattern` in history
836
+ * @param pattern the pattern to look for in history
837
+ * @returns The uuids of the matching items
838
+ */
839
+ search_sync(pattern: string): string[];
840
+ /**
841
+ * Select an item from the #GPasteDaemon
842
+ * @param uuid the uuid of the element we want to select
843
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
844
+ */
845
+ select(uuid: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
846
+ /**
847
+ * Select an item from the #GPasteDaemon
848
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
849
+ */
850
+ select_finish(result: Gio.AsyncResult): void;
851
+ /**
852
+ * Select an item from the #GPasteDaemon
853
+ * @param uuid the uuid of the element we want to select
854
+ */
855
+ select_sync(uuid: string): void;
856
+ /**
857
+ * Set the item as password
858
+ * @param uuid the uuid of the element we want to set as password
859
+ * @param name the name to identify the password
860
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
861
+ */
862
+ set_password(uuid: string, name: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
863
+ /**
864
+ * Set the item as password
865
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
866
+ */
867
+ set_password_finish(result: Gio.AsyncResult): void;
868
+ /**
869
+ * Set the item as password
870
+ * @param uuid the uuid of the element we want to set as password
871
+ * @param name the name to identify the password
872
+ */
873
+ set_password_sync(uuid: string, name: string): void;
874
+ /**
875
+ * Emit the ShowHistory signal
876
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
877
+ */
878
+ show_history(callback?: Gio.AsyncReadyCallback<this> | null): void;
879
+ /**
880
+ * Emit the ShowHistory signal
881
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
882
+ */
883
+ show_history_finish(result: Gio.AsyncResult): void;
884
+ /**
885
+ * Emit the ShowHistory signal
886
+ */
887
+ show_history_sync(): void;
888
+ /**
889
+ * Switch to another history
890
+ * @param name the name of the history to switch to
891
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
892
+ */
893
+ switch_history(name: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
894
+ /**
895
+ * Switch to another history
896
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
897
+ */
898
+ switch_history_finish(result: Gio.AsyncResult): void;
899
+ /**
900
+ * Switch to another history
901
+ * @param name the name of the history to switch to
902
+ */
903
+ switch_history_sync(name: string): void;
904
+ /**
905
+ * Change the tracking state of the #GPasteDaemon
906
+ * @param state the new tracking state of the #GPasteDaemon
907
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
908
+ */
909
+ track(state: boolean, callback?: Gio.AsyncReadyCallback<this> | null): void;
910
+ /**
911
+ * Change the tracking state of the #GPasteDaemon
912
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
913
+ */
914
+ track_finish(result: Gio.AsyncResult): void;
915
+ /**
916
+ * Change the tracking state of the #GPasteDaemon
917
+ * @param state the new tracking state of the #GPasteDaemon
918
+ */
919
+ track_sync(state: boolean): void;
920
+ /**
921
+ * Upload an item to a pastebin service
922
+ * @param uuid the uuid of the element we want to upload
923
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
924
+ */
925
+ upload(uuid: string, callback?: Gio.AsyncReadyCallback<this> | null): void;
926
+ /**
927
+ * Upload an item to a pastebin service
928
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
929
+ */
930
+ upload_finish(result: Gio.AsyncResult): void;
931
+ /**
932
+ * Upload an item to a pastebin service
933
+ * @param uuid the uuid of the element we want to upload
934
+ */
935
+ upload_sync(uuid: string): void;
936
+
937
+ // Inherited methods
938
+ /**
939
+ * Starts asynchronous initialization of the object implementing the
940
+ * interface. This must be done before any real use of the object after
941
+ * initial construction. If the object also implements #GInitable you can
942
+ * optionally call g_initable_init() instead.
943
+ *
944
+ * This method is intended for language bindings. If writing in C,
945
+ * g_async_initable_new_async() should typically be used instead.
946
+ *
947
+ * When the initialization is finished, `callback` will be called. You can
948
+ * then call g_async_initable_init_finish() to get the result of the
949
+ * initialization.
950
+ *
951
+ * Implementations may also support cancellation. If `cancellable` is not
952
+ * %NULL, then initialization can be cancelled by triggering the cancellable
953
+ * object from another thread. If the operation was cancelled, the error
954
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and
955
+ * the object doesn't support cancellable initialization, the error
956
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
957
+ *
958
+ * As with #GInitable, if the object is not initialized, or initialization
959
+ * returns with an error, then all operations on the object except
960
+ * g_object_ref() and g_object_unref() are considered to be invalid, and
961
+ * have undefined behaviour. They will often fail with g_critical() or
962
+ * g_warning(), but this must not be relied on.
963
+ *
964
+ * Callers should not assume that a class which implements #GAsyncInitable can
965
+ * be initialized multiple times; for more information, see g_initable_init().
966
+ * If a class explicitly supports being initialized multiple times,
967
+ * implementation requires yielding all subsequent calls to init_async() on the
968
+ * results of the first call.
969
+ *
970
+ * For classes that also support the #GInitable interface, the default
971
+ * implementation of this method will run the g_initable_init() function
972
+ * in a thread, so if you want to support asynchronous initialization via
973
+ * threads, just implement the #GAsyncInitable interface without overriding
974
+ * any interface methods.
975
+ * @param io_priority the [I/O priority][io-priority] of the operation
976
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
977
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
978
+ */
979
+ init_async(
980
+ io_priority: number,
981
+ cancellable?: Gio.Cancellable | null,
982
+ callback?: Gio.AsyncReadyCallback<this> | null,
983
+ ): void;
984
+ /**
985
+ * Finishes asynchronous initialization and returns the result.
986
+ * See g_async_initable_init_async().
987
+ * @param res a #GAsyncResult.
988
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
989
+ */
990
+ init_finish(res: Gio.AsyncResult): boolean;
991
+ /**
992
+ * Finishes the async construction for the various g_async_initable_new
993
+ * calls, returning the created object or %NULL on error.
994
+ * @param res the #GAsyncResult from the callback
995
+ * @returns a newly created #GObject, or %NULL on error. Free with g_object_unref().
996
+ */
997
+ new_finish(res: Gio.AsyncResult): Client;
998
+ // Conflicted with Gio.DBusProxy.new_finish
999
+ new_finish(...args: never[]): any;
1000
+ /**
1001
+ * Starts asynchronous initialization of the object implementing the
1002
+ * interface. This must be done before any real use of the object after
1003
+ * initial construction. If the object also implements #GInitable you can
1004
+ * optionally call g_initable_init() instead.
1005
+ *
1006
+ * This method is intended for language bindings. If writing in C,
1007
+ * g_async_initable_new_async() should typically be used instead.
1008
+ *
1009
+ * When the initialization is finished, `callback` will be called. You can
1010
+ * then call g_async_initable_init_finish() to get the result of the
1011
+ * initialization.
1012
+ *
1013
+ * Implementations may also support cancellation. If `cancellable` is not
1014
+ * %NULL, then initialization can be cancelled by triggering the cancellable
1015
+ * object from another thread. If the operation was cancelled, the error
1016
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and
1017
+ * the object doesn't support cancellable initialization, the error
1018
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1019
+ *
1020
+ * As with #GInitable, if the object is not initialized, or initialization
1021
+ * returns with an error, then all operations on the object except
1022
+ * g_object_ref() and g_object_unref() are considered to be invalid, and
1023
+ * have undefined behaviour. They will often fail with g_critical() or
1024
+ * g_warning(), but this must not be relied on.
1025
+ *
1026
+ * Callers should not assume that a class which implements #GAsyncInitable can
1027
+ * be initialized multiple times; for more information, see g_initable_init().
1028
+ * If a class explicitly supports being initialized multiple times,
1029
+ * implementation requires yielding all subsequent calls to init_async() on the
1030
+ * results of the first call.
1031
+ *
1032
+ * For classes that also support the #GInitable interface, the default
1033
+ * implementation of this method will run the g_initable_init() function
1034
+ * in a thread, so if you want to support asynchronous initialization via
1035
+ * threads, just implement the #GAsyncInitable interface without overriding
1036
+ * any interface methods.
1037
+ * @param io_priority the [I/O priority][io-priority] of the operation
1038
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1039
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
1040
+ */
1041
+ vfunc_init_async(
1042
+ io_priority: number,
1043
+ cancellable?: Gio.Cancellable | null,
1044
+ callback?: Gio.AsyncReadyCallback<this> | null,
1045
+ ): void;
1046
+ /**
1047
+ * Finishes asynchronous initialization and returns the result.
1048
+ * See g_async_initable_init_async().
1049
+ * @param res a #GAsyncResult.
1050
+ */
1051
+ vfunc_init_finish(res: Gio.AsyncResult): boolean;
1052
+ /**
1053
+ * Gets the #GDBusObject that `interface_` belongs to, if any.
1054
+ * @returns A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref().
1055
+ */
1056
+ get_object(): Gio.DBusObject | null;
1057
+ /**
1058
+ * Gets D-Bus introspection information for the D-Bus interface
1059
+ * implemented by `interface_`.
1060
+ * @returns A #GDBusInterfaceInfo. Do not free.
1061
+ */
1062
+ get_info(): Gio.DBusInterfaceInfo;
1063
+ /**
1064
+ * Sets the #GDBusObject for `interface_` to `object`.
1065
+ *
1066
+ * Note that `interface_` will hold a weak reference to `object`.
1067
+ * @param object A #GDBusObject or %NULL.
1068
+ */
1069
+ set_object(object?: Gio.DBusObject | null): void;
1070
+ /**
1071
+ * Gets the #GDBusObject that `interface_` belongs to, if any.
1072
+ */
1073
+ vfunc_dup_object(): Gio.DBusObject | null;
1074
+ /**
1075
+ * Gets D-Bus introspection information for the D-Bus interface
1076
+ * implemented by `interface_`.
1077
+ */
1078
+ vfunc_get_info(): Gio.DBusInterfaceInfo;
1079
+ /**
1080
+ * Sets the #GDBusObject for `interface_` to `object`.
1081
+ *
1082
+ * Note that `interface_` will hold a weak reference to `object`.
1083
+ * @param object A #GDBusObject or %NULL.
1084
+ */
1085
+ vfunc_set_object(object?: Gio.DBusObject | null): void;
1086
+ /**
1087
+ * Initializes the object implementing the interface.
1088
+ *
1089
+ * This method is intended for language bindings. If writing in C,
1090
+ * g_initable_new() should typically be used instead.
1091
+ *
1092
+ * The object must be initialized before any real use after initial
1093
+ * construction, either with this function or g_async_initable_init_async().
1094
+ *
1095
+ * Implementations may also support cancellation. If `cancellable` is not %NULL,
1096
+ * then initialization can be cancelled by triggering the cancellable object
1097
+ * from another thread. If the operation was cancelled, the error
1098
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
1099
+ * the object doesn't support cancellable initialization the error
1100
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1101
+ *
1102
+ * If the object is not initialized, or initialization returns with an
1103
+ * error, then all operations on the object except g_object_ref() and
1104
+ * g_object_unref() are considered to be invalid, and have undefined
1105
+ * behaviour. See the [introduction][ginitable] for more details.
1106
+ *
1107
+ * Callers should not assume that a class which implements #GInitable can be
1108
+ * initialized multiple times, unless the class explicitly documents itself as
1109
+ * supporting this. Generally, a class’ implementation of init() can assume
1110
+ * (and assert) that it will only be called once. Previously, this documentation
1111
+ * recommended all #GInitable implementations should be idempotent; that
1112
+ * recommendation was relaxed in GLib 2.54.
1113
+ *
1114
+ * If a class explicitly supports being initialized multiple times, it is
1115
+ * recommended that the method is idempotent: multiple calls with the same
1116
+ * arguments should return the same results. Only the first call initializes
1117
+ * the object; further calls return the result of the first call.
1118
+ *
1119
+ * One reason why a class might need to support idempotent initialization is if
1120
+ * it is designed to be used via the singleton pattern, with a
1121
+ * #GObjectClass.constructor that sometimes returns an existing instance.
1122
+ * In this pattern, a caller would expect to be able to call g_initable_init()
1123
+ * on the result of g_object_new(), regardless of whether it is in fact a new
1124
+ * instance.
1125
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1126
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
1127
+ */
1128
+ init(cancellable?: Gio.Cancellable | null): boolean;
1129
+ /**
1130
+ * Initializes the object implementing the interface.
1131
+ *
1132
+ * This method is intended for language bindings. If writing in C,
1133
+ * g_initable_new() should typically be used instead.
1134
+ *
1135
+ * The object must be initialized before any real use after initial
1136
+ * construction, either with this function or g_async_initable_init_async().
1137
+ *
1138
+ * Implementations may also support cancellation. If `cancellable` is not %NULL,
1139
+ * then initialization can be cancelled by triggering the cancellable object
1140
+ * from another thread. If the operation was cancelled, the error
1141
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
1142
+ * the object doesn't support cancellable initialization the error
1143
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1144
+ *
1145
+ * If the object is not initialized, or initialization returns with an
1146
+ * error, then all operations on the object except g_object_ref() and
1147
+ * g_object_unref() are considered to be invalid, and have undefined
1148
+ * behaviour. See the [introduction][ginitable] for more details.
1149
+ *
1150
+ * Callers should not assume that a class which implements #GInitable can be
1151
+ * initialized multiple times, unless the class explicitly documents itself as
1152
+ * supporting this. Generally, a class’ implementation of init() can assume
1153
+ * (and assert) that it will only be called once. Previously, this documentation
1154
+ * recommended all #GInitable implementations should be idempotent; that
1155
+ * recommendation was relaxed in GLib 2.54.
1156
+ *
1157
+ * If a class explicitly supports being initialized multiple times, it is
1158
+ * recommended that the method is idempotent: multiple calls with the same
1159
+ * arguments should return the same results. Only the first call initializes
1160
+ * the object; further calls return the result of the first call.
1161
+ *
1162
+ * One reason why a class might need to support idempotent initialization is if
1163
+ * it is designed to be used via the singleton pattern, with a
1164
+ * #GObjectClass.constructor that sometimes returns an existing instance.
1165
+ * In this pattern, a caller would expect to be able to call g_initable_init()
1166
+ * on the result of g_object_new(), regardless of whether it is in fact a new
1167
+ * instance.
1168
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1169
+ */
1170
+ vfunc_init(cancellable?: Gio.Cancellable | null): boolean;
1171
+ /**
1172
+ * Creates a binding between `source_property` on `source` and `target_property`
1173
+ * on `target`.
1174
+ *
1175
+ * Whenever the `source_property` is changed the `target_property` is
1176
+ * updated using the same value. For instance:
1177
+ *
1178
+ *
1179
+ * ```c
1180
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
1181
+ * ```
1182
+ *
1183
+ *
1184
+ * Will result in the "sensitive" property of the widget #GObject instance to be
1185
+ * updated with the same value of the "active" property of the action #GObject
1186
+ * instance.
1187
+ *
1188
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1189
+ * if `target_property` on `target` changes then the `source_property` on `source`
1190
+ * will be updated as well.
1191
+ *
1192
+ * The binding will automatically be removed when either the `source` or the
1193
+ * `target` instances are finalized. To remove the binding without affecting the
1194
+ * `source` and the `target` you can just call g_object_unref() on the returned
1195
+ * #GBinding instance.
1196
+ *
1197
+ * Removing the binding by calling g_object_unref() on it must only be done if
1198
+ * the binding, `source` and `target` are only used from a single thread and it
1199
+ * is clear that both `source` and `target` outlive the binding. Especially it
1200
+ * is not safe to rely on this if the binding, `source` or `target` can be
1201
+ * finalized from different threads. Keep another reference to the binding and
1202
+ * use g_binding_unbind() instead to be on the safe side.
1203
+ *
1204
+ * A #GObject can have multiple bindings.
1205
+ * @param source_property the property on @source to bind
1206
+ * @param target the target #GObject
1207
+ * @param target_property the property on @target to bind
1208
+ * @param flags flags to pass to #GBinding
1209
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1210
+ */
1211
+ bind_property(
1212
+ source_property: string,
1213
+ target: GObject.Object,
1214
+ target_property: string,
1215
+ flags: GObject.BindingFlags,
1216
+ ): GObject.Binding;
1217
+ /**
1218
+ * Complete version of g_object_bind_property().
1219
+ *
1220
+ * Creates a binding between `source_property` on `source` and `target_property`
1221
+ * on `target,` allowing you to set the transformation functions to be used by
1222
+ * the binding.
1223
+ *
1224
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1225
+ * if `target_property` on `target` changes then the `source_property` on `source`
1226
+ * will be updated as well. The `transform_from` function is only used in case
1227
+ * of bidirectional bindings, otherwise it will be ignored
1228
+ *
1229
+ * The binding will automatically be removed when either the `source` or the
1230
+ * `target` instances are finalized. This will release the reference that is
1231
+ * being held on the #GBinding instance; if you want to hold on to the
1232
+ * #GBinding instance, you will need to hold a reference to it.
1233
+ *
1234
+ * To remove the binding, call g_binding_unbind().
1235
+ *
1236
+ * A #GObject can have multiple bindings.
1237
+ *
1238
+ * The same `user_data` parameter will be used for both `transform_to`
1239
+ * and `transform_from` transformation functions; the `notify` function will
1240
+ * be called once, when the binding is removed. If you need different data
1241
+ * for each transformation function, please use
1242
+ * g_object_bind_property_with_closures() instead.
1243
+ * @param source_property the property on @source to bind
1244
+ * @param target the target #GObject
1245
+ * @param target_property the property on @target to bind
1246
+ * @param flags flags to pass to #GBinding
1247
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
1248
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
1249
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
1250
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1251
+ */
1252
+ bind_property_full(
1253
+ source_property: string,
1254
+ target: GObject.Object,
1255
+ target_property: string,
1256
+ flags: GObject.BindingFlags,
1257
+ transform_to?: GObject.BindingTransformFunc | null,
1258
+ transform_from?: GObject.BindingTransformFunc | null,
1259
+ notify?: GLib.DestroyNotify | null,
1260
+ ): GObject.Binding;
1261
+ // Conflicted with GObject.Object.bind_property_full
1262
+ bind_property_full(...args: never[]): any;
1263
+ /**
1264
+ * This function is intended for #GObject implementations to re-enforce
1265
+ * a [floating][floating-ref] object reference. Doing this is seldom
1266
+ * required: all #GInitiallyUnowneds are created with a floating reference
1267
+ * which usually just needs to be sunken by calling g_object_ref_sink().
1268
+ */
1269
+ force_floating(): void;
1270
+ /**
1271
+ * Increases the freeze count on `object`. If the freeze count is
1272
+ * non-zero, the emission of "notify" signals on `object` is
1273
+ * stopped. The signals are queued until the freeze count is decreased
1274
+ * to zero. Duplicate notifications are squashed so that at most one
1275
+ * #GObject::notify signal is emitted for each property modified while the
1276
+ * object is frozen.
1277
+ *
1278
+ * This is necessary for accessors that modify multiple properties to prevent
1279
+ * premature notification while the object is still being modified.
1280
+ */
1281
+ freeze_notify(): void;
1282
+ /**
1283
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
1284
+ * @param key name of the key for that association
1285
+ * @returns the data if found, or %NULL if no such data exists.
1286
+ */
1287
+ get_data(key: string): any | null;
1288
+ get_property(property_name: string): any;
1289
+ /**
1290
+ * This function gets back user data pointers stored via
1291
+ * g_object_set_qdata().
1292
+ * @param quark A #GQuark, naming the user data pointer
1293
+ * @returns The user data pointer set, or %NULL
1294
+ */
1295
+ get_qdata(quark: GLib.Quark): any | null;
1296
+ /**
1297
+ * Gets `n_properties` properties for an `object`.
1298
+ * Obtained properties will be set to `values`. All properties must be valid.
1299
+ * Warnings will be emitted and undefined behaviour may result if invalid
1300
+ * properties are passed in.
1301
+ * @param names the names of each property to get
1302
+ * @param values the values of each property to get
1303
+ */
1304
+ getv(names: string[], values: (GObject.Value | any)[]): void;
1305
+ /**
1306
+ * Checks whether `object` has a [floating][floating-ref] reference.
1307
+ * @returns %TRUE if @object has a floating reference
1308
+ */
1309
+ is_floating(): boolean;
1310
+ /**
1311
+ * Emits a "notify" signal for the property `property_name` on `object`.
1312
+ *
1313
+ * When possible, eg. when signaling a property change from within the class
1314
+ * that registered the property, you should use g_object_notify_by_pspec()
1315
+ * instead.
1316
+ *
1317
+ * Note that emission of the notify signal may be blocked with
1318
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1319
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1320
+ * called.
1321
+ * @param property_name the name of a property installed on the class of @object.
1322
+ */
1323
+ notify(property_name: string): void;
1324
+ /**
1325
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
1326
+ *
1327
+ * This function omits the property name lookup, hence it is faster than
1328
+ * g_object_notify().
1329
+ *
1330
+ * One way to avoid using g_object_notify() from within the
1331
+ * class that registered the properties, and using g_object_notify_by_pspec()
1332
+ * instead, is to store the GParamSpec used with
1333
+ * g_object_class_install_property() inside a static array, e.g.:
1334
+ *
1335
+ *
1336
+ * ```c
1337
+ * typedef enum
1338
+ * {
1339
+ * PROP_FOO = 1,
1340
+ * PROP_LAST
1341
+ * } MyObjectProperty;
1342
+ *
1343
+ * static GParamSpec *properties[PROP_LAST];
1344
+ *
1345
+ * static void
1346
+ * my_object_class_init (MyObjectClass *klass)
1347
+ * {
1348
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
1349
+ * 0, 100,
1350
+ * 50,
1351
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
1352
+ * g_object_class_install_property (gobject_class,
1353
+ * PROP_FOO,
1354
+ * properties[PROP_FOO]);
1355
+ * }
1356
+ * ```
1357
+ *
1358
+ *
1359
+ * and then notify a change on the "foo" property with:
1360
+ *
1361
+ *
1362
+ * ```c
1363
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
1364
+ * ```
1365
+ *
1366
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
1367
+ */
1368
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
1369
+ /**
1370
+ * Increases the reference count of `object`.
1371
+ *
1372
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
1373
+ * of `object` will be propagated to the return type (using the GCC typeof()
1374
+ * extension), so any casting the caller needs to do on the return type must be
1375
+ * explicit.
1376
+ * @returns the same @object
1377
+ */
1378
+ ref(): GObject.Object;
1379
+ /**
1380
+ * Increase the reference count of `object,` and possibly remove the
1381
+ * [floating][floating-ref] reference, if `object` has a floating reference.
1382
+ *
1383
+ * In other words, if the object is floating, then this call "assumes
1384
+ * ownership" of the floating reference, converting it to a normal
1385
+ * reference by clearing the floating flag while leaving the reference
1386
+ * count unchanged. If the object is not floating, then this call
1387
+ * adds a new normal reference increasing the reference count by one.
1388
+ *
1389
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
1390
+ * under the same conditions as for g_object_ref().
1391
+ * @returns @object
1392
+ */
1393
+ ref_sink(): GObject.Object;
1394
+ /**
1395
+ * Releases all references to other objects. This can be used to break
1396
+ * reference cycles.
1397
+ *
1398
+ * This function should only be called from object system implementations.
1399
+ */
1400
+ run_dispose(): void;
1401
+ /**
1402
+ * Each object carries around a table of associations from
1403
+ * strings to pointers. This function lets you set an association.
1404
+ *
1405
+ * If the object already had an association with that name,
1406
+ * the old association will be destroyed.
1407
+ *
1408
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
1409
+ * This means a copy of `key` is kept permanently (even after `object` has been
1410
+ * finalized) — so it is recommended to only use a small, bounded set of values
1411
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
1412
+ * @param key name of the key
1413
+ * @param data data to associate with that key
1414
+ */
1415
+ set_data(key: string, data?: any | null): void;
1416
+ set_property(property_name: string, value: any): void;
1417
+ /**
1418
+ * Remove a specified datum from the object's data associations,
1419
+ * without invoking the association's destroy handler.
1420
+ * @param key name of the key
1421
+ * @returns the data if found, or %NULL if no such data exists.
1422
+ */
1423
+ steal_data(key: string): any | null;
1424
+ /**
1425
+ * This function gets back user data pointers stored via
1426
+ * g_object_set_qdata() and removes the `data` from object
1427
+ * without invoking its destroy() function (if any was
1428
+ * set).
1429
+ * Usually, calling this function is only required to update
1430
+ * user data pointers with a destroy notifier, for example:
1431
+ *
1432
+ * ```c
1433
+ * void
1434
+ * object_add_to_user_list (GObject *object,
1435
+ * const gchar *new_string)
1436
+ * {
1437
+ * // the quark, naming the object data
1438
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
1439
+ * // retrieve the old string list
1440
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
1441
+ *
1442
+ * // prepend new string
1443
+ * list = g_list_prepend (list, g_strdup (new_string));
1444
+ * // this changed 'list', so we need to set it again
1445
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
1446
+ * }
1447
+ * static void
1448
+ * free_string_list (gpointer data)
1449
+ * {
1450
+ * GList *node, *list = data;
1451
+ *
1452
+ * for (node = list; node; node = node->next)
1453
+ * g_free (node->data);
1454
+ * g_list_free (list);
1455
+ * }
1456
+ * ```
1457
+ *
1458
+ * Using g_object_get_qdata() in the above example, instead of
1459
+ * g_object_steal_qdata() would have left the destroy function set,
1460
+ * and thus the partial string list would have been freed upon
1461
+ * g_object_set_qdata_full().
1462
+ * @param quark A #GQuark, naming the user data pointer
1463
+ * @returns The user data pointer set, or %NULL
1464
+ */
1465
+ steal_qdata(quark: GLib.Quark): any | null;
1466
+ /**
1467
+ * Reverts the effect of a previous call to
1468
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
1469
+ * and when it reaches zero, queued "notify" signals are emitted.
1470
+ *
1471
+ * Duplicate notifications for each property are squashed so that at most one
1472
+ * #GObject::notify signal is emitted for each property, in the reverse order
1473
+ * in which they have been queued.
1474
+ *
1475
+ * It is an error to call this function when the freeze count is zero.
1476
+ */
1477
+ thaw_notify(): void;
1478
+ /**
1479
+ * Decreases the reference count of `object`. When its reference count
1480
+ * drops to 0, the object is finalized (i.e. its memory is freed).
1481
+ *
1482
+ * If the pointer to the #GObject may be reused in future (for example, if it is
1483
+ * an instance variable of another object), it is recommended to clear the
1484
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
1485
+ * invalid #GObject instance. Use g_clear_object() for this.
1486
+ */
1487
+ unref(): void;
1488
+ /**
1489
+ * This function essentially limits the life time of the `closure` to
1490
+ * the life time of the object. That is, when the object is finalized,
1491
+ * the `closure` is invalidated by calling g_closure_invalidate() on
1492
+ * it, in order to prevent invocations of the closure with a finalized
1493
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
1494
+ * added as marshal guards to the `closure,` to ensure that an extra
1495
+ * reference count is held on `object` during invocation of the
1496
+ * `closure`. Usually, this function will be called on closures that
1497
+ * use this `object` as closure data.
1498
+ * @param closure #GClosure to watch
1499
+ */
1500
+ watch_closure(closure: GObject.Closure): void;
1501
+ vfunc_constructed(): void;
1502
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
1503
+ vfunc_dispose(): void;
1504
+ vfunc_finalize(): void;
1505
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1506
+ /**
1507
+ * Emits a "notify" signal for the property `property_name` on `object`.
1508
+ *
1509
+ * When possible, eg. when signaling a property change from within the class
1510
+ * that registered the property, you should use g_object_notify_by_pspec()
1511
+ * instead.
1512
+ *
1513
+ * Note that emission of the notify signal may be blocked with
1514
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
1515
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
1516
+ * called.
1517
+ * @param pspec
1518
+ */
1519
+ vfunc_notify(pspec: GObject.ParamSpec): void;
1520
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1521
+ disconnect(id: number): void;
1522
+ set(properties: { [key: string]: any }): void;
1523
+ block_signal_handler(id: number): any;
1524
+ unblock_signal_handler(id: number): any;
1525
+ stop_emission_by_name(detailedName: string): any;
1526
+ }
1527
+
1528
+ module ClientItem {
1529
+ // Constructor properties interface
1530
+
1531
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
1532
+ }
1533
+
1534
+ class ClientItem extends GObject.Object {
1535
+ static $gtype: GObject.GType<ClientItem>;
1536
+
1537
+ // Constructors of GPaste.ClientItem
1538
+
1539
+ constructor(properties?: Partial<ClientItem.ConstructorProps>, ...args: any[]);
1540
+
1541
+ _init(...args: any[]): void;
1542
+
1543
+ static ['new'](uuid: string, value: string): ClientItem;
1544
+
1545
+ // Own methods of GPaste.ClientItem
1546
+
1547
+ /**
1548
+ * Returns the uuid of the item
1549
+ */
1550
+ get_uuid(): string;
1551
+ /**
1552
+ * Returns the value of the item
1553
+ */
1554
+ get_value(): string;
1555
+ }
1556
+
1557
+ module GnomeShellClient {
1558
+ // Signal callback interfaces
1559
+
1560
+ interface AcceleratorActivated {
1561
+ (id: number): void;
1562
+ }
1563
+
1564
+ // Constructor properties interface
1565
+
1566
+ interface ConstructorProps
1567
+ extends Gio.DBusProxy.ConstructorProps,
1568
+ Gio.AsyncInitable.ConstructorProps,
1569
+ Gio.DBusInterface.ConstructorProps,
1570
+ Gio.Initable.ConstructorProps {}
1571
+ }
1572
+
1573
+ class GnomeShellClient
1574
+ extends Gio.DBusProxy
1575
+ implements Gio.AsyncInitable<GnomeShellClient>, Gio.DBusInterface, Gio.Initable
1576
+ {
1577
+ static $gtype: GObject.GType<GnomeShellClient>;
1578
+
1579
+ // Constructors of GPaste.GnomeShellClient
1580
+
1581
+ constructor(properties?: Partial<GnomeShellClient.ConstructorProps>, ...args: any[]);
1582
+
1583
+ _init(...args: any[]): void;
1584
+
1585
+ static new_finish(result: Gio.AsyncResult): GnomeShellClient;
1586
+ // Conflicted with Gio.AsyncInitable.new_finish
1587
+
1588
+ static new_finish(...args: never[]): any;
1589
+
1590
+ static new_sync(): GnomeShellClient;
1591
+
1592
+ // Own signals of GPaste.GnomeShellClient
1593
+
1594
+ connect(id: string, callback: (...args: any[]) => any): number;
1595
+ connect_after(id: string, callback: (...args: any[]) => any): number;
1596
+ emit(id: string, ...args: any[]): void;
1597
+ connect(signal: 'accelerator-activated', callback: (_source: this, id: number) => void): number;
1598
+ connect_after(signal: 'accelerator-activated', callback: (_source: this, id: number) => void): number;
1599
+ emit(signal: 'accelerator-activated', id: number): void;
1600
+
1601
+ // Own static methods of GPaste.GnomeShellClient
1602
+
1603
+ /**
1604
+ * Create a new instance of #GPasteGnomeShellClient
1605
+ * @param callback Callback function to invoke when the proxy is ready.
1606
+ */
1607
+ static ['new'](callback?: Gio.AsyncReadyCallback<GnomeShellClient> | null): void;
1608
+ // Conflicted with Gio.DBusProxy.new
1609
+ static ['new'](...args: never[]): any;
1610
+
1611
+ // Own methods of GPaste.GnomeShellClient
1612
+
1613
+ /**
1614
+ * Grab a keybinding
1615
+ * @param accelerator a #GPasteGnomeShellAccelerator instance
1616
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
1617
+ */
1618
+ grab_accelerator(accelerator: GnomeShellAccelerator, callback?: Gio.AsyncReadyCallback<this> | null): void;
1619
+ /**
1620
+ * Grab a keybinding
1621
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
1622
+ * @returns the action id corresultponding
1623
+ */
1624
+ grab_accelerator_finish(result: Gio.AsyncResult): number;
1625
+ /**
1626
+ * Grab a keybinding
1627
+ * @param accelerator a #GPasteGnomeShellAccelerator instance
1628
+ * @returns the action id corresponding
1629
+ */
1630
+ grab_accelerator_sync(accelerator: GnomeShellAccelerator): number;
1631
+ /**
1632
+ * Grab some keybindings
1633
+ * @param accelerators an array of #GPasteGnomeShellAccelerator instances
1634
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
1635
+ */
1636
+ grab_accelerators(accelerators: GnomeShellAccelerator[], callback?: Gio.AsyncReadyCallback<this> | null): void;
1637
+ /**
1638
+ * Grab some keybindings
1639
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
1640
+ * @returns the action ids corresultponding
1641
+ */
1642
+ grab_accelerators_finish(result: Gio.AsyncResult): number;
1643
+ /**
1644
+ * Grab some keybindings
1645
+ * @param accelerators an array of #GPasteGnomeShellAccelerator instances
1646
+ * @returns the action ids corresponding
1647
+ */
1648
+ grab_accelerators_sync(accelerators: GnomeShellAccelerator[]): number;
1649
+ /**
1650
+ * Ungrab a keybinding
1651
+ * @param action the action id corresponding to the keybinding
1652
+ * @param callback A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't care about the result of the method invocation.
1653
+ */
1654
+ ungrab_accelerator(action: number, callback?: Gio.AsyncReadyCallback<this> | null): void;
1655
+ /**
1656
+ * Ungrab a keybinding
1657
+ * @param result A #GAsyncResult obtained from the #GAsyncReadyCallback passed to the async call.
1658
+ * @returns whether the ungrab was succesful or not
1659
+ */
1660
+ ungrab_accelerator_finish(result: Gio.AsyncResult): boolean;
1661
+ /**
1662
+ * Ungrab a keybinding
1663
+ * @param action the action id corresponding to the keybinding
1664
+ * @returns whether the ungrab was succesful or not
1665
+ */
1666
+ ungrab_accelerator_sync(action: number): boolean;
1667
+
1668
+ // Inherited methods
1669
+ /**
1670
+ * Starts asynchronous initialization of the object implementing the
1671
+ * interface. This must be done before any real use of the object after
1672
+ * initial construction. If the object also implements #GInitable you can
1673
+ * optionally call g_initable_init() instead.
1674
+ *
1675
+ * This method is intended for language bindings. If writing in C,
1676
+ * g_async_initable_new_async() should typically be used instead.
1677
+ *
1678
+ * When the initialization is finished, `callback` will be called. You can
1679
+ * then call g_async_initable_init_finish() to get the result of the
1680
+ * initialization.
1681
+ *
1682
+ * Implementations may also support cancellation. If `cancellable` is not
1683
+ * %NULL, then initialization can be cancelled by triggering the cancellable
1684
+ * object from another thread. If the operation was cancelled, the error
1685
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and
1686
+ * the object doesn't support cancellable initialization, the error
1687
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1688
+ *
1689
+ * As with #GInitable, if the object is not initialized, or initialization
1690
+ * returns with an error, then all operations on the object except
1691
+ * g_object_ref() and g_object_unref() are considered to be invalid, and
1692
+ * have undefined behaviour. They will often fail with g_critical() or
1693
+ * g_warning(), but this must not be relied on.
1694
+ *
1695
+ * Callers should not assume that a class which implements #GAsyncInitable can
1696
+ * be initialized multiple times; for more information, see g_initable_init().
1697
+ * If a class explicitly supports being initialized multiple times,
1698
+ * implementation requires yielding all subsequent calls to init_async() on the
1699
+ * results of the first call.
1700
+ *
1701
+ * For classes that also support the #GInitable interface, the default
1702
+ * implementation of this method will run the g_initable_init() function
1703
+ * in a thread, so if you want to support asynchronous initialization via
1704
+ * threads, just implement the #GAsyncInitable interface without overriding
1705
+ * any interface methods.
1706
+ * @param io_priority the [I/O priority][io-priority] of the operation
1707
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1708
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
1709
+ */
1710
+ init_async(
1711
+ io_priority: number,
1712
+ cancellable?: Gio.Cancellable | null,
1713
+ callback?: Gio.AsyncReadyCallback<this> | null,
1714
+ ): void;
1715
+ /**
1716
+ * Finishes asynchronous initialization and returns the result.
1717
+ * See g_async_initable_init_async().
1718
+ * @param res a #GAsyncResult.
1719
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
1720
+ */
1721
+ init_finish(res: Gio.AsyncResult): boolean;
1722
+ /**
1723
+ * Finishes the async construction for the various g_async_initable_new
1724
+ * calls, returning the created object or %NULL on error.
1725
+ * @param res the #GAsyncResult from the callback
1726
+ * @returns a newly created #GObject, or %NULL on error. Free with g_object_unref().
1727
+ */
1728
+ new_finish(res: Gio.AsyncResult): GnomeShellClient;
1729
+ // Conflicted with Gio.DBusProxy.new_finish
1730
+ new_finish(...args: never[]): any;
1731
+ /**
1732
+ * Starts asynchronous initialization of the object implementing the
1733
+ * interface. This must be done before any real use of the object after
1734
+ * initial construction. If the object also implements #GInitable you can
1735
+ * optionally call g_initable_init() instead.
1736
+ *
1737
+ * This method is intended for language bindings. If writing in C,
1738
+ * g_async_initable_new_async() should typically be used instead.
1739
+ *
1740
+ * When the initialization is finished, `callback` will be called. You can
1741
+ * then call g_async_initable_init_finish() to get the result of the
1742
+ * initialization.
1743
+ *
1744
+ * Implementations may also support cancellation. If `cancellable` is not
1745
+ * %NULL, then initialization can be cancelled by triggering the cancellable
1746
+ * object from another thread. If the operation was cancelled, the error
1747
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and
1748
+ * the object doesn't support cancellable initialization, the error
1749
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1750
+ *
1751
+ * As with #GInitable, if the object is not initialized, or initialization
1752
+ * returns with an error, then all operations on the object except
1753
+ * g_object_ref() and g_object_unref() are considered to be invalid, and
1754
+ * have undefined behaviour. They will often fail with g_critical() or
1755
+ * g_warning(), but this must not be relied on.
1756
+ *
1757
+ * Callers should not assume that a class which implements #GAsyncInitable can
1758
+ * be initialized multiple times; for more information, see g_initable_init().
1759
+ * If a class explicitly supports being initialized multiple times,
1760
+ * implementation requires yielding all subsequent calls to init_async() on the
1761
+ * results of the first call.
1762
+ *
1763
+ * For classes that also support the #GInitable interface, the default
1764
+ * implementation of this method will run the g_initable_init() function
1765
+ * in a thread, so if you want to support asynchronous initialization via
1766
+ * threads, just implement the #GAsyncInitable interface without overriding
1767
+ * any interface methods.
1768
+ * @param io_priority the [I/O priority][io-priority] of the operation
1769
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1770
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
1771
+ */
1772
+ vfunc_init_async(
1773
+ io_priority: number,
1774
+ cancellable?: Gio.Cancellable | null,
1775
+ callback?: Gio.AsyncReadyCallback<this> | null,
1776
+ ): void;
1777
+ /**
1778
+ * Finishes asynchronous initialization and returns the result.
1779
+ * See g_async_initable_init_async().
1780
+ * @param res a #GAsyncResult.
1781
+ */
1782
+ vfunc_init_finish(res: Gio.AsyncResult): boolean;
1783
+ /**
1784
+ * Gets the #GDBusObject that `interface_` belongs to, if any.
1785
+ * @returns A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref().
1786
+ */
1787
+ get_object(): Gio.DBusObject | null;
1788
+ /**
1789
+ * Gets D-Bus introspection information for the D-Bus interface
1790
+ * implemented by `interface_`.
1791
+ * @returns A #GDBusInterfaceInfo. Do not free.
1792
+ */
1793
+ get_info(): Gio.DBusInterfaceInfo;
1794
+ /**
1795
+ * Sets the #GDBusObject for `interface_` to `object`.
1796
+ *
1797
+ * Note that `interface_` will hold a weak reference to `object`.
1798
+ * @param object A #GDBusObject or %NULL.
1799
+ */
1800
+ set_object(object?: Gio.DBusObject | null): void;
1801
+ /**
1802
+ * Gets the #GDBusObject that `interface_` belongs to, if any.
1803
+ */
1804
+ vfunc_dup_object(): Gio.DBusObject | null;
1805
+ /**
1806
+ * Gets D-Bus introspection information for the D-Bus interface
1807
+ * implemented by `interface_`.
1808
+ */
1809
+ vfunc_get_info(): Gio.DBusInterfaceInfo;
1810
+ /**
1811
+ * Sets the #GDBusObject for `interface_` to `object`.
1812
+ *
1813
+ * Note that `interface_` will hold a weak reference to `object`.
1814
+ * @param object A #GDBusObject or %NULL.
1815
+ */
1816
+ vfunc_set_object(object?: Gio.DBusObject | null): void;
1817
+ /**
1818
+ * Initializes the object implementing the interface.
1819
+ *
1820
+ * This method is intended for language bindings. If writing in C,
1821
+ * g_initable_new() should typically be used instead.
1822
+ *
1823
+ * The object must be initialized before any real use after initial
1824
+ * construction, either with this function or g_async_initable_init_async().
1825
+ *
1826
+ * Implementations may also support cancellation. If `cancellable` is not %NULL,
1827
+ * then initialization can be cancelled by triggering the cancellable object
1828
+ * from another thread. If the operation was cancelled, the error
1829
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
1830
+ * the object doesn't support cancellable initialization the error
1831
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1832
+ *
1833
+ * If the object is not initialized, or initialization returns with an
1834
+ * error, then all operations on the object except g_object_ref() and
1835
+ * g_object_unref() are considered to be invalid, and have undefined
1836
+ * behaviour. See the [introduction][ginitable] for more details.
1837
+ *
1838
+ * Callers should not assume that a class which implements #GInitable can be
1839
+ * initialized multiple times, unless the class explicitly documents itself as
1840
+ * supporting this. Generally, a class’ implementation of init() can assume
1841
+ * (and assert) that it will only be called once. Previously, this documentation
1842
+ * recommended all #GInitable implementations should be idempotent; that
1843
+ * recommendation was relaxed in GLib 2.54.
1844
+ *
1845
+ * If a class explicitly supports being initialized multiple times, it is
1846
+ * recommended that the method is idempotent: multiple calls with the same
1847
+ * arguments should return the same results. Only the first call initializes
1848
+ * the object; further calls return the result of the first call.
1849
+ *
1850
+ * One reason why a class might need to support idempotent initialization is if
1851
+ * it is designed to be used via the singleton pattern, with a
1852
+ * #GObjectClass.constructor that sometimes returns an existing instance.
1853
+ * In this pattern, a caller would expect to be able to call g_initable_init()
1854
+ * on the result of g_object_new(), regardless of whether it is in fact a new
1855
+ * instance.
1856
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1857
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
1858
+ */
1859
+ init(cancellable?: Gio.Cancellable | null): boolean;
1860
+ /**
1861
+ * Initializes the object implementing the interface.
1862
+ *
1863
+ * This method is intended for language bindings. If writing in C,
1864
+ * g_initable_new() should typically be used instead.
1865
+ *
1866
+ * The object must be initialized before any real use after initial
1867
+ * construction, either with this function or g_async_initable_init_async().
1868
+ *
1869
+ * Implementations may also support cancellation. If `cancellable` is not %NULL,
1870
+ * then initialization can be cancelled by triggering the cancellable object
1871
+ * from another thread. If the operation was cancelled, the error
1872
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
1873
+ * the object doesn't support cancellable initialization the error
1874
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
1875
+ *
1876
+ * If the object is not initialized, or initialization returns with an
1877
+ * error, then all operations on the object except g_object_ref() and
1878
+ * g_object_unref() are considered to be invalid, and have undefined
1879
+ * behaviour. See the [introduction][ginitable] for more details.
1880
+ *
1881
+ * Callers should not assume that a class which implements #GInitable can be
1882
+ * initialized multiple times, unless the class explicitly documents itself as
1883
+ * supporting this. Generally, a class’ implementation of init() can assume
1884
+ * (and assert) that it will only be called once. Previously, this documentation
1885
+ * recommended all #GInitable implementations should be idempotent; that
1886
+ * recommendation was relaxed in GLib 2.54.
1887
+ *
1888
+ * If a class explicitly supports being initialized multiple times, it is
1889
+ * recommended that the method is idempotent: multiple calls with the same
1890
+ * arguments should return the same results. Only the first call initializes
1891
+ * the object; further calls return the result of the first call.
1892
+ *
1893
+ * One reason why a class might need to support idempotent initialization is if
1894
+ * it is designed to be used via the singleton pattern, with a
1895
+ * #GObjectClass.constructor that sometimes returns an existing instance.
1896
+ * In this pattern, a caller would expect to be able to call g_initable_init()
1897
+ * on the result of g_object_new(), regardless of whether it is in fact a new
1898
+ * instance.
1899
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
1900
+ */
1901
+ vfunc_init(cancellable?: Gio.Cancellable | null): boolean;
1902
+ /**
1903
+ * Creates a binding between `source_property` on `source` and `target_property`
1904
+ * on `target`.
1905
+ *
1906
+ * Whenever the `source_property` is changed the `target_property` is
1907
+ * updated using the same value. For instance:
1908
+ *
1909
+ *
1910
+ * ```c
1911
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
1912
+ * ```
1913
+ *
1914
+ *
1915
+ * Will result in the "sensitive" property of the widget #GObject instance to be
1916
+ * updated with the same value of the "active" property of the action #GObject
1917
+ * instance.
1918
+ *
1919
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1920
+ * if `target_property` on `target` changes then the `source_property` on `source`
1921
+ * will be updated as well.
1922
+ *
1923
+ * The binding will automatically be removed when either the `source` or the
1924
+ * `target` instances are finalized. To remove the binding without affecting the
1925
+ * `source` and the `target` you can just call g_object_unref() on the returned
1926
+ * #GBinding instance.
1927
+ *
1928
+ * Removing the binding by calling g_object_unref() on it must only be done if
1929
+ * the binding, `source` and `target` are only used from a single thread and it
1930
+ * is clear that both `source` and `target` outlive the binding. Especially it
1931
+ * is not safe to rely on this if the binding, `source` or `target` can be
1932
+ * finalized from different threads. Keep another reference to the binding and
1933
+ * use g_binding_unbind() instead to be on the safe side.
1934
+ *
1935
+ * A #GObject can have multiple bindings.
1936
+ * @param source_property the property on @source to bind
1937
+ * @param target the target #GObject
1938
+ * @param target_property the property on @target to bind
1939
+ * @param flags flags to pass to #GBinding
1940
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1941
+ */
1942
+ bind_property(
1943
+ source_property: string,
1944
+ target: GObject.Object,
1945
+ target_property: string,
1946
+ flags: GObject.BindingFlags,
1947
+ ): GObject.Binding;
1948
+ /**
1949
+ * Complete version of g_object_bind_property().
1950
+ *
1951
+ * Creates a binding between `source_property` on `source` and `target_property`
1952
+ * on `target,` allowing you to set the transformation functions to be used by
1953
+ * the binding.
1954
+ *
1955
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
1956
+ * if `target_property` on `target` changes then the `source_property` on `source`
1957
+ * will be updated as well. The `transform_from` function is only used in case
1958
+ * of bidirectional bindings, otherwise it will be ignored
1959
+ *
1960
+ * The binding will automatically be removed when either the `source` or the
1961
+ * `target` instances are finalized. This will release the reference that is
1962
+ * being held on the #GBinding instance; if you want to hold on to the
1963
+ * #GBinding instance, you will need to hold a reference to it.
1964
+ *
1965
+ * To remove the binding, call g_binding_unbind().
1966
+ *
1967
+ * A #GObject can have multiple bindings.
1968
+ *
1969
+ * The same `user_data` parameter will be used for both `transform_to`
1970
+ * and `transform_from` transformation functions; the `notify` function will
1971
+ * be called once, when the binding is removed. If you need different data
1972
+ * for each transformation function, please use
1973
+ * g_object_bind_property_with_closures() instead.
1974
+ * @param source_property the property on @source to bind
1975
+ * @param target the target #GObject
1976
+ * @param target_property the property on @target to bind
1977
+ * @param flags flags to pass to #GBinding
1978
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
1979
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
1980
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
1981
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
1982
+ */
1983
+ bind_property_full(
1984
+ source_property: string,
1985
+ target: GObject.Object,
1986
+ target_property: string,
1987
+ flags: GObject.BindingFlags,
1988
+ transform_to?: GObject.BindingTransformFunc | null,
1989
+ transform_from?: GObject.BindingTransformFunc | null,
1990
+ notify?: GLib.DestroyNotify | null,
1991
+ ): GObject.Binding;
1992
+ // Conflicted with GObject.Object.bind_property_full
1993
+ bind_property_full(...args: never[]): any;
1994
+ /**
1995
+ * This function is intended for #GObject implementations to re-enforce
1996
+ * a [floating][floating-ref] object reference. Doing this is seldom
1997
+ * required: all #GInitiallyUnowneds are created with a floating reference
1998
+ * which usually just needs to be sunken by calling g_object_ref_sink().
1999
+ */
2000
+ force_floating(): void;
2001
+ /**
2002
+ * Increases the freeze count on `object`. If the freeze count is
2003
+ * non-zero, the emission of "notify" signals on `object` is
2004
+ * stopped. The signals are queued until the freeze count is decreased
2005
+ * to zero. Duplicate notifications are squashed so that at most one
2006
+ * #GObject::notify signal is emitted for each property modified while the
2007
+ * object is frozen.
2008
+ *
2009
+ * This is necessary for accessors that modify multiple properties to prevent
2010
+ * premature notification while the object is still being modified.
2011
+ */
2012
+ freeze_notify(): void;
2013
+ /**
2014
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
2015
+ * @param key name of the key for that association
2016
+ * @returns the data if found, or %NULL if no such data exists.
2017
+ */
2018
+ get_data(key: string): any | null;
2019
+ get_property(property_name: string): any;
2020
+ /**
2021
+ * This function gets back user data pointers stored via
2022
+ * g_object_set_qdata().
2023
+ * @param quark A #GQuark, naming the user data pointer
2024
+ * @returns The user data pointer set, or %NULL
2025
+ */
2026
+ get_qdata(quark: GLib.Quark): any | null;
2027
+ /**
2028
+ * Gets `n_properties` properties for an `object`.
2029
+ * Obtained properties will be set to `values`. All properties must be valid.
2030
+ * Warnings will be emitted and undefined behaviour may result if invalid
2031
+ * properties are passed in.
2032
+ * @param names the names of each property to get
2033
+ * @param values the values of each property to get
2034
+ */
2035
+ getv(names: string[], values: (GObject.Value | any)[]): void;
2036
+ /**
2037
+ * Checks whether `object` has a [floating][floating-ref] reference.
2038
+ * @returns %TRUE if @object has a floating reference
2039
+ */
2040
+ is_floating(): boolean;
2041
+ /**
2042
+ * Emits a "notify" signal for the property `property_name` on `object`.
2043
+ *
2044
+ * When possible, eg. when signaling a property change from within the class
2045
+ * that registered the property, you should use g_object_notify_by_pspec()
2046
+ * instead.
2047
+ *
2048
+ * Note that emission of the notify signal may be blocked with
2049
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
2050
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
2051
+ * called.
2052
+ * @param property_name the name of a property installed on the class of @object.
2053
+ */
2054
+ notify(property_name: string): void;
2055
+ /**
2056
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
2057
+ *
2058
+ * This function omits the property name lookup, hence it is faster than
2059
+ * g_object_notify().
2060
+ *
2061
+ * One way to avoid using g_object_notify() from within the
2062
+ * class that registered the properties, and using g_object_notify_by_pspec()
2063
+ * instead, is to store the GParamSpec used with
2064
+ * g_object_class_install_property() inside a static array, e.g.:
2065
+ *
2066
+ *
2067
+ * ```c
2068
+ * typedef enum
2069
+ * {
2070
+ * PROP_FOO = 1,
2071
+ * PROP_LAST
2072
+ * } MyObjectProperty;
2073
+ *
2074
+ * static GParamSpec *properties[PROP_LAST];
2075
+ *
2076
+ * static void
2077
+ * my_object_class_init (MyObjectClass *klass)
2078
+ * {
2079
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2080
+ * 0, 100,
2081
+ * 50,
2082
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
2083
+ * g_object_class_install_property (gobject_class,
2084
+ * PROP_FOO,
2085
+ * properties[PROP_FOO]);
2086
+ * }
2087
+ * ```
2088
+ *
2089
+ *
2090
+ * and then notify a change on the "foo" property with:
2091
+ *
2092
+ *
2093
+ * ```c
2094
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
2095
+ * ```
2096
+ *
2097
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
2098
+ */
2099
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
2100
+ /**
2101
+ * Increases the reference count of `object`.
2102
+ *
2103
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
2104
+ * of `object` will be propagated to the return type (using the GCC typeof()
2105
+ * extension), so any casting the caller needs to do on the return type must be
2106
+ * explicit.
2107
+ * @returns the same @object
2108
+ */
2109
+ ref(): GObject.Object;
2110
+ /**
2111
+ * Increase the reference count of `object,` and possibly remove the
2112
+ * [floating][floating-ref] reference, if `object` has a floating reference.
2113
+ *
2114
+ * In other words, if the object is floating, then this call "assumes
2115
+ * ownership" of the floating reference, converting it to a normal
2116
+ * reference by clearing the floating flag while leaving the reference
2117
+ * count unchanged. If the object is not floating, then this call
2118
+ * adds a new normal reference increasing the reference count by one.
2119
+ *
2120
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
2121
+ * under the same conditions as for g_object_ref().
2122
+ * @returns @object
2123
+ */
2124
+ ref_sink(): GObject.Object;
2125
+ /**
2126
+ * Releases all references to other objects. This can be used to break
2127
+ * reference cycles.
2128
+ *
2129
+ * This function should only be called from object system implementations.
2130
+ */
2131
+ run_dispose(): void;
2132
+ /**
2133
+ * Each object carries around a table of associations from
2134
+ * strings to pointers. This function lets you set an association.
2135
+ *
2136
+ * If the object already had an association with that name,
2137
+ * the old association will be destroyed.
2138
+ *
2139
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
2140
+ * This means a copy of `key` is kept permanently (even after `object` has been
2141
+ * finalized) — so it is recommended to only use a small, bounded set of values
2142
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
2143
+ * @param key name of the key
2144
+ * @param data data to associate with that key
2145
+ */
2146
+ set_data(key: string, data?: any | null): void;
2147
+ set_property(property_name: string, value: any): void;
2148
+ /**
2149
+ * Remove a specified datum from the object's data associations,
2150
+ * without invoking the association's destroy handler.
2151
+ * @param key name of the key
2152
+ * @returns the data if found, or %NULL if no such data exists.
2153
+ */
2154
+ steal_data(key: string): any | null;
2155
+ /**
2156
+ * This function gets back user data pointers stored via
2157
+ * g_object_set_qdata() and removes the `data` from object
2158
+ * without invoking its destroy() function (if any was
2159
+ * set).
2160
+ * Usually, calling this function is only required to update
2161
+ * user data pointers with a destroy notifier, for example:
2162
+ *
2163
+ * ```c
2164
+ * void
2165
+ * object_add_to_user_list (GObject *object,
2166
+ * const gchar *new_string)
2167
+ * {
2168
+ * // the quark, naming the object data
2169
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
2170
+ * // retrieve the old string list
2171
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
2172
+ *
2173
+ * // prepend new string
2174
+ * list = g_list_prepend (list, g_strdup (new_string));
2175
+ * // this changed 'list', so we need to set it again
2176
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
2177
+ * }
2178
+ * static void
2179
+ * free_string_list (gpointer data)
2180
+ * {
2181
+ * GList *node, *list = data;
2182
+ *
2183
+ * for (node = list; node; node = node->next)
2184
+ * g_free (node->data);
2185
+ * g_list_free (list);
2186
+ * }
2187
+ * ```
2188
+ *
2189
+ * Using g_object_get_qdata() in the above example, instead of
2190
+ * g_object_steal_qdata() would have left the destroy function set,
2191
+ * and thus the partial string list would have been freed upon
2192
+ * g_object_set_qdata_full().
2193
+ * @param quark A #GQuark, naming the user data pointer
2194
+ * @returns The user data pointer set, or %NULL
2195
+ */
2196
+ steal_qdata(quark: GLib.Quark): any | null;
2197
+ /**
2198
+ * Reverts the effect of a previous call to
2199
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
2200
+ * and when it reaches zero, queued "notify" signals are emitted.
2201
+ *
2202
+ * Duplicate notifications for each property are squashed so that at most one
2203
+ * #GObject::notify signal is emitted for each property, in the reverse order
2204
+ * in which they have been queued.
2205
+ *
2206
+ * It is an error to call this function when the freeze count is zero.
2207
+ */
2208
+ thaw_notify(): void;
2209
+ /**
2210
+ * Decreases the reference count of `object`. When its reference count
2211
+ * drops to 0, the object is finalized (i.e. its memory is freed).
2212
+ *
2213
+ * If the pointer to the #GObject may be reused in future (for example, if it is
2214
+ * an instance variable of another object), it is recommended to clear the
2215
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
2216
+ * invalid #GObject instance. Use g_clear_object() for this.
2217
+ */
2218
+ unref(): void;
2219
+ /**
2220
+ * This function essentially limits the life time of the `closure` to
2221
+ * the life time of the object. That is, when the object is finalized,
2222
+ * the `closure` is invalidated by calling g_closure_invalidate() on
2223
+ * it, in order to prevent invocations of the closure with a finalized
2224
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
2225
+ * added as marshal guards to the `closure,` to ensure that an extra
2226
+ * reference count is held on `object` during invocation of the
2227
+ * `closure`. Usually, this function will be called on closures that
2228
+ * use this `object` as closure data.
2229
+ * @param closure #GClosure to watch
2230
+ */
2231
+ watch_closure(closure: GObject.Closure): void;
2232
+ vfunc_constructed(): void;
2233
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
2234
+ vfunc_dispose(): void;
2235
+ vfunc_finalize(): void;
2236
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2237
+ /**
2238
+ * Emits a "notify" signal for the property `property_name` on `object`.
2239
+ *
2240
+ * When possible, eg. when signaling a property change from within the class
2241
+ * that registered the property, you should use g_object_notify_by_pspec()
2242
+ * instead.
2243
+ *
2244
+ * Note that emission of the notify signal may be blocked with
2245
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
2246
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
2247
+ * called.
2248
+ * @param pspec
2249
+ */
2250
+ vfunc_notify(pspec: GObject.ParamSpec): void;
2251
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2252
+ disconnect(id: number): void;
2253
+ set(properties: { [key: string]: any }): void;
2254
+ block_signal_handler(id: number): any;
2255
+ unblock_signal_handler(id: number): any;
2256
+ stop_emission_by_name(detailedName: string): any;
2257
+ }
2258
+
2259
+ module ScreensaverClient {
2260
+ // Signal callback interfaces
2261
+
2262
+ interface ActiveChanged {
2263
+ (active: boolean): void;
2264
+ }
2265
+
2266
+ // Constructor properties interface
2267
+
2268
+ interface ConstructorProps
2269
+ extends Gio.DBusProxy.ConstructorProps,
2270
+ Gio.AsyncInitable.ConstructorProps,
2271
+ Gio.DBusInterface.ConstructorProps,
2272
+ Gio.Initable.ConstructorProps {}
2273
+ }
2274
+
2275
+ class ScreensaverClient
2276
+ extends Gio.DBusProxy
2277
+ implements Gio.AsyncInitable<ScreensaverClient>, Gio.DBusInterface, Gio.Initable
2278
+ {
2279
+ static $gtype: GObject.GType<ScreensaverClient>;
2280
+
2281
+ // Constructors of GPaste.ScreensaverClient
2282
+
2283
+ constructor(properties?: Partial<ScreensaverClient.ConstructorProps>, ...args: any[]);
2284
+
2285
+ _init(...args: any[]): void;
2286
+
2287
+ static new_finish(result: Gio.AsyncResult): ScreensaverClient;
2288
+ // Conflicted with Gio.AsyncInitable.new_finish
2289
+
2290
+ static new_finish(...args: never[]): any;
2291
+
2292
+ static new_sync(): ScreensaverClient;
2293
+
2294
+ // Own signals of GPaste.ScreensaverClient
2295
+
2296
+ connect(id: string, callback: (...args: any[]) => any): number;
2297
+ connect_after(id: string, callback: (...args: any[]) => any): number;
2298
+ emit(id: string, ...args: any[]): void;
2299
+ connect(signal: 'active-changed', callback: (_source: this, active: boolean) => void): number;
2300
+ connect_after(signal: 'active-changed', callback: (_source: this, active: boolean) => void): number;
2301
+ emit(signal: 'active-changed', active: boolean): void;
2302
+
2303
+ // Own static methods of GPaste.ScreensaverClient
2304
+
2305
+ /**
2306
+ * Create a new instance of #GPasteScreensaverClient
2307
+ * @param callback Callback function to invoke when the proxy is ready.
2308
+ */
2309
+ static ['new'](callback?: Gio.AsyncReadyCallback<ScreensaverClient> | null): void;
2310
+ // Conflicted with Gio.DBusProxy.new
2311
+ static ['new'](...args: never[]): any;
2312
+
2313
+ // Inherited methods
2314
+ /**
2315
+ * Starts asynchronous initialization of the object implementing the
2316
+ * interface. This must be done before any real use of the object after
2317
+ * initial construction. If the object also implements #GInitable you can
2318
+ * optionally call g_initable_init() instead.
2319
+ *
2320
+ * This method is intended for language bindings. If writing in C,
2321
+ * g_async_initable_new_async() should typically be used instead.
2322
+ *
2323
+ * When the initialization is finished, `callback` will be called. You can
2324
+ * then call g_async_initable_init_finish() to get the result of the
2325
+ * initialization.
2326
+ *
2327
+ * Implementations may also support cancellation. If `cancellable` is not
2328
+ * %NULL, then initialization can be cancelled by triggering the cancellable
2329
+ * object from another thread. If the operation was cancelled, the error
2330
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and
2331
+ * the object doesn't support cancellable initialization, the error
2332
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
2333
+ *
2334
+ * As with #GInitable, if the object is not initialized, or initialization
2335
+ * returns with an error, then all operations on the object except
2336
+ * g_object_ref() and g_object_unref() are considered to be invalid, and
2337
+ * have undefined behaviour. They will often fail with g_critical() or
2338
+ * g_warning(), but this must not be relied on.
2339
+ *
2340
+ * Callers should not assume that a class which implements #GAsyncInitable can
2341
+ * be initialized multiple times; for more information, see g_initable_init().
2342
+ * If a class explicitly supports being initialized multiple times,
2343
+ * implementation requires yielding all subsequent calls to init_async() on the
2344
+ * results of the first call.
2345
+ *
2346
+ * For classes that also support the #GInitable interface, the default
2347
+ * implementation of this method will run the g_initable_init() function
2348
+ * in a thread, so if you want to support asynchronous initialization via
2349
+ * threads, just implement the #GAsyncInitable interface without overriding
2350
+ * any interface methods.
2351
+ * @param io_priority the [I/O priority][io-priority] of the operation
2352
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
2353
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
2354
+ */
2355
+ init_async(
2356
+ io_priority: number,
2357
+ cancellable?: Gio.Cancellable | null,
2358
+ callback?: Gio.AsyncReadyCallback<this> | null,
2359
+ ): void;
2360
+ /**
2361
+ * Finishes asynchronous initialization and returns the result.
2362
+ * See g_async_initable_init_async().
2363
+ * @param res a #GAsyncResult.
2364
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
2365
+ */
2366
+ init_finish(res: Gio.AsyncResult): boolean;
2367
+ /**
2368
+ * Finishes the async construction for the various g_async_initable_new
2369
+ * calls, returning the created object or %NULL on error.
2370
+ * @param res the #GAsyncResult from the callback
2371
+ * @returns a newly created #GObject, or %NULL on error. Free with g_object_unref().
2372
+ */
2373
+ new_finish(res: Gio.AsyncResult): ScreensaverClient;
2374
+ // Conflicted with Gio.DBusProxy.new_finish
2375
+ new_finish(...args: never[]): any;
2376
+ /**
2377
+ * Starts asynchronous initialization of the object implementing the
2378
+ * interface. This must be done before any real use of the object after
2379
+ * initial construction. If the object also implements #GInitable you can
2380
+ * optionally call g_initable_init() instead.
2381
+ *
2382
+ * This method is intended for language bindings. If writing in C,
2383
+ * g_async_initable_new_async() should typically be used instead.
2384
+ *
2385
+ * When the initialization is finished, `callback` will be called. You can
2386
+ * then call g_async_initable_init_finish() to get the result of the
2387
+ * initialization.
2388
+ *
2389
+ * Implementations may also support cancellation. If `cancellable` is not
2390
+ * %NULL, then initialization can be cancelled by triggering the cancellable
2391
+ * object from another thread. If the operation was cancelled, the error
2392
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL, and
2393
+ * the object doesn't support cancellable initialization, the error
2394
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
2395
+ *
2396
+ * As with #GInitable, if the object is not initialized, or initialization
2397
+ * returns with an error, then all operations on the object except
2398
+ * g_object_ref() and g_object_unref() are considered to be invalid, and
2399
+ * have undefined behaviour. They will often fail with g_critical() or
2400
+ * g_warning(), but this must not be relied on.
2401
+ *
2402
+ * Callers should not assume that a class which implements #GAsyncInitable can
2403
+ * be initialized multiple times; for more information, see g_initable_init().
2404
+ * If a class explicitly supports being initialized multiple times,
2405
+ * implementation requires yielding all subsequent calls to init_async() on the
2406
+ * results of the first call.
2407
+ *
2408
+ * For classes that also support the #GInitable interface, the default
2409
+ * implementation of this method will run the g_initable_init() function
2410
+ * in a thread, so if you want to support asynchronous initialization via
2411
+ * threads, just implement the #GAsyncInitable interface without overriding
2412
+ * any interface methods.
2413
+ * @param io_priority the [I/O priority][io-priority] of the operation
2414
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
2415
+ * @param callback a #GAsyncReadyCallback to call when the request is satisfied
2416
+ */
2417
+ vfunc_init_async(
2418
+ io_priority: number,
2419
+ cancellable?: Gio.Cancellable | null,
2420
+ callback?: Gio.AsyncReadyCallback<this> | null,
2421
+ ): void;
2422
+ /**
2423
+ * Finishes asynchronous initialization and returns the result.
2424
+ * See g_async_initable_init_async().
2425
+ * @param res a #GAsyncResult.
2426
+ */
2427
+ vfunc_init_finish(res: Gio.AsyncResult): boolean;
2428
+ /**
2429
+ * Gets the #GDBusObject that `interface_` belongs to, if any.
2430
+ * @returns A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref().
2431
+ */
2432
+ get_object(): Gio.DBusObject | null;
2433
+ /**
2434
+ * Gets D-Bus introspection information for the D-Bus interface
2435
+ * implemented by `interface_`.
2436
+ * @returns A #GDBusInterfaceInfo. Do not free.
2437
+ */
2438
+ get_info(): Gio.DBusInterfaceInfo;
2439
+ /**
2440
+ * Sets the #GDBusObject for `interface_` to `object`.
2441
+ *
2442
+ * Note that `interface_` will hold a weak reference to `object`.
2443
+ * @param object A #GDBusObject or %NULL.
2444
+ */
2445
+ set_object(object?: Gio.DBusObject | null): void;
2446
+ /**
2447
+ * Gets the #GDBusObject that `interface_` belongs to, if any.
2448
+ */
2449
+ vfunc_dup_object(): Gio.DBusObject | null;
2450
+ /**
2451
+ * Gets D-Bus introspection information for the D-Bus interface
2452
+ * implemented by `interface_`.
2453
+ */
2454
+ vfunc_get_info(): Gio.DBusInterfaceInfo;
2455
+ /**
2456
+ * Sets the #GDBusObject for `interface_` to `object`.
2457
+ *
2458
+ * Note that `interface_` will hold a weak reference to `object`.
2459
+ * @param object A #GDBusObject or %NULL.
2460
+ */
2461
+ vfunc_set_object(object?: Gio.DBusObject | null): void;
2462
+ /**
2463
+ * Initializes the object implementing the interface.
2464
+ *
2465
+ * This method is intended for language bindings. If writing in C,
2466
+ * g_initable_new() should typically be used instead.
2467
+ *
2468
+ * The object must be initialized before any real use after initial
2469
+ * construction, either with this function or g_async_initable_init_async().
2470
+ *
2471
+ * Implementations may also support cancellation. If `cancellable` is not %NULL,
2472
+ * then initialization can be cancelled by triggering the cancellable object
2473
+ * from another thread. If the operation was cancelled, the error
2474
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
2475
+ * the object doesn't support cancellable initialization the error
2476
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
2477
+ *
2478
+ * If the object is not initialized, or initialization returns with an
2479
+ * error, then all operations on the object except g_object_ref() and
2480
+ * g_object_unref() are considered to be invalid, and have undefined
2481
+ * behaviour. See the [introduction][ginitable] for more details.
2482
+ *
2483
+ * Callers should not assume that a class which implements #GInitable can be
2484
+ * initialized multiple times, unless the class explicitly documents itself as
2485
+ * supporting this. Generally, a class’ implementation of init() can assume
2486
+ * (and assert) that it will only be called once. Previously, this documentation
2487
+ * recommended all #GInitable implementations should be idempotent; that
2488
+ * recommendation was relaxed in GLib 2.54.
2489
+ *
2490
+ * If a class explicitly supports being initialized multiple times, it is
2491
+ * recommended that the method is idempotent: multiple calls with the same
2492
+ * arguments should return the same results. Only the first call initializes
2493
+ * the object; further calls return the result of the first call.
2494
+ *
2495
+ * One reason why a class might need to support idempotent initialization is if
2496
+ * it is designed to be used via the singleton pattern, with a
2497
+ * #GObjectClass.constructor that sometimes returns an existing instance.
2498
+ * In this pattern, a caller would expect to be able to call g_initable_init()
2499
+ * on the result of g_object_new(), regardless of whether it is in fact a new
2500
+ * instance.
2501
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
2502
+ * @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
2503
+ */
2504
+ init(cancellable?: Gio.Cancellable | null): boolean;
2505
+ /**
2506
+ * Initializes the object implementing the interface.
2507
+ *
2508
+ * This method is intended for language bindings. If writing in C,
2509
+ * g_initable_new() should typically be used instead.
2510
+ *
2511
+ * The object must be initialized before any real use after initial
2512
+ * construction, either with this function or g_async_initable_init_async().
2513
+ *
2514
+ * Implementations may also support cancellation. If `cancellable` is not %NULL,
2515
+ * then initialization can be cancelled by triggering the cancellable object
2516
+ * from another thread. If the operation was cancelled, the error
2517
+ * %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
2518
+ * the object doesn't support cancellable initialization the error
2519
+ * %G_IO_ERROR_NOT_SUPPORTED will be returned.
2520
+ *
2521
+ * If the object is not initialized, or initialization returns with an
2522
+ * error, then all operations on the object except g_object_ref() and
2523
+ * g_object_unref() are considered to be invalid, and have undefined
2524
+ * behaviour. See the [introduction][ginitable] for more details.
2525
+ *
2526
+ * Callers should not assume that a class which implements #GInitable can be
2527
+ * initialized multiple times, unless the class explicitly documents itself as
2528
+ * supporting this. Generally, a class’ implementation of init() can assume
2529
+ * (and assert) that it will only be called once. Previously, this documentation
2530
+ * recommended all #GInitable implementations should be idempotent; that
2531
+ * recommendation was relaxed in GLib 2.54.
2532
+ *
2533
+ * If a class explicitly supports being initialized multiple times, it is
2534
+ * recommended that the method is idempotent: multiple calls with the same
2535
+ * arguments should return the same results. Only the first call initializes
2536
+ * the object; further calls return the result of the first call.
2537
+ *
2538
+ * One reason why a class might need to support idempotent initialization is if
2539
+ * it is designed to be used via the singleton pattern, with a
2540
+ * #GObjectClass.constructor that sometimes returns an existing instance.
2541
+ * In this pattern, a caller would expect to be able to call g_initable_init()
2542
+ * on the result of g_object_new(), regardless of whether it is in fact a new
2543
+ * instance.
2544
+ * @param cancellable optional #GCancellable object, %NULL to ignore.
2545
+ */
2546
+ vfunc_init(cancellable?: Gio.Cancellable | null): boolean;
2547
+ /**
2548
+ * Creates a binding between `source_property` on `source` and `target_property`
2549
+ * on `target`.
2550
+ *
2551
+ * Whenever the `source_property` is changed the `target_property` is
2552
+ * updated using the same value. For instance:
2553
+ *
2554
+ *
2555
+ * ```c
2556
+ * g_object_bind_property (action, "active", widget, "sensitive", 0);
2557
+ * ```
2558
+ *
2559
+ *
2560
+ * Will result in the "sensitive" property of the widget #GObject instance to be
2561
+ * updated with the same value of the "active" property of the action #GObject
2562
+ * instance.
2563
+ *
2564
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
2565
+ * if `target_property` on `target` changes then the `source_property` on `source`
2566
+ * will be updated as well.
2567
+ *
2568
+ * The binding will automatically be removed when either the `source` or the
2569
+ * `target` instances are finalized. To remove the binding without affecting the
2570
+ * `source` and the `target` you can just call g_object_unref() on the returned
2571
+ * #GBinding instance.
2572
+ *
2573
+ * Removing the binding by calling g_object_unref() on it must only be done if
2574
+ * the binding, `source` and `target` are only used from a single thread and it
2575
+ * is clear that both `source` and `target` outlive the binding. Especially it
2576
+ * is not safe to rely on this if the binding, `source` or `target` can be
2577
+ * finalized from different threads. Keep another reference to the binding and
2578
+ * use g_binding_unbind() instead to be on the safe side.
2579
+ *
2580
+ * A #GObject can have multiple bindings.
2581
+ * @param source_property the property on @source to bind
2582
+ * @param target the target #GObject
2583
+ * @param target_property the property on @target to bind
2584
+ * @param flags flags to pass to #GBinding
2585
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
2586
+ */
2587
+ bind_property(
2588
+ source_property: string,
2589
+ target: GObject.Object,
2590
+ target_property: string,
2591
+ flags: GObject.BindingFlags,
2592
+ ): GObject.Binding;
2593
+ /**
2594
+ * Complete version of g_object_bind_property().
2595
+ *
2596
+ * Creates a binding between `source_property` on `source` and `target_property`
2597
+ * on `target,` allowing you to set the transformation functions to be used by
2598
+ * the binding.
2599
+ *
2600
+ * If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
2601
+ * if `target_property` on `target` changes then the `source_property` on `source`
2602
+ * will be updated as well. The `transform_from` function is only used in case
2603
+ * of bidirectional bindings, otherwise it will be ignored
2604
+ *
2605
+ * The binding will automatically be removed when either the `source` or the
2606
+ * `target` instances are finalized. This will release the reference that is
2607
+ * being held on the #GBinding instance; if you want to hold on to the
2608
+ * #GBinding instance, you will need to hold a reference to it.
2609
+ *
2610
+ * To remove the binding, call g_binding_unbind().
2611
+ *
2612
+ * A #GObject can have multiple bindings.
2613
+ *
2614
+ * The same `user_data` parameter will be used for both `transform_to`
2615
+ * and `transform_from` transformation functions; the `notify` function will
2616
+ * be called once, when the binding is removed. If you need different data
2617
+ * for each transformation function, please use
2618
+ * g_object_bind_property_with_closures() instead.
2619
+ * @param source_property the property on @source to bind
2620
+ * @param target the target #GObject
2621
+ * @param target_property the property on @target to bind
2622
+ * @param flags flags to pass to #GBinding
2623
+ * @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
2624
+ * @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
2625
+ * @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
2626
+ * @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
2627
+ */
2628
+ bind_property_full(
2629
+ source_property: string,
2630
+ target: GObject.Object,
2631
+ target_property: string,
2632
+ flags: GObject.BindingFlags,
2633
+ transform_to?: GObject.BindingTransformFunc | null,
2634
+ transform_from?: GObject.BindingTransformFunc | null,
2635
+ notify?: GLib.DestroyNotify | null,
2636
+ ): GObject.Binding;
2637
+ // Conflicted with GObject.Object.bind_property_full
2638
+ bind_property_full(...args: never[]): any;
2639
+ /**
2640
+ * This function is intended for #GObject implementations to re-enforce
2641
+ * a [floating][floating-ref] object reference. Doing this is seldom
2642
+ * required: all #GInitiallyUnowneds are created with a floating reference
2643
+ * which usually just needs to be sunken by calling g_object_ref_sink().
2644
+ */
2645
+ force_floating(): void;
2646
+ /**
2647
+ * Increases the freeze count on `object`. If the freeze count is
2648
+ * non-zero, the emission of "notify" signals on `object` is
2649
+ * stopped. The signals are queued until the freeze count is decreased
2650
+ * to zero. Duplicate notifications are squashed so that at most one
2651
+ * #GObject::notify signal is emitted for each property modified while the
2652
+ * object is frozen.
2653
+ *
2654
+ * This is necessary for accessors that modify multiple properties to prevent
2655
+ * premature notification while the object is still being modified.
2656
+ */
2657
+ freeze_notify(): void;
2658
+ /**
2659
+ * Gets a named field from the objects table of associations (see g_object_set_data()).
2660
+ * @param key name of the key for that association
2661
+ * @returns the data if found, or %NULL if no such data exists.
2662
+ */
2663
+ get_data(key: string): any | null;
2664
+ get_property(property_name: string): any;
2665
+ /**
2666
+ * This function gets back user data pointers stored via
2667
+ * g_object_set_qdata().
2668
+ * @param quark A #GQuark, naming the user data pointer
2669
+ * @returns The user data pointer set, or %NULL
2670
+ */
2671
+ get_qdata(quark: GLib.Quark): any | null;
2672
+ /**
2673
+ * Gets `n_properties` properties for an `object`.
2674
+ * Obtained properties will be set to `values`. All properties must be valid.
2675
+ * Warnings will be emitted and undefined behaviour may result if invalid
2676
+ * properties are passed in.
2677
+ * @param names the names of each property to get
2678
+ * @param values the values of each property to get
2679
+ */
2680
+ getv(names: string[], values: (GObject.Value | any)[]): void;
2681
+ /**
2682
+ * Checks whether `object` has a [floating][floating-ref] reference.
2683
+ * @returns %TRUE if @object has a floating reference
2684
+ */
2685
+ is_floating(): boolean;
2686
+ /**
2687
+ * Emits a "notify" signal for the property `property_name` on `object`.
2688
+ *
2689
+ * When possible, eg. when signaling a property change from within the class
2690
+ * that registered the property, you should use g_object_notify_by_pspec()
2691
+ * instead.
2692
+ *
2693
+ * Note that emission of the notify signal may be blocked with
2694
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
2695
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
2696
+ * called.
2697
+ * @param property_name the name of a property installed on the class of @object.
2698
+ */
2699
+ notify(property_name: string): void;
2700
+ /**
2701
+ * Emits a "notify" signal for the property specified by `pspec` on `object`.
2702
+ *
2703
+ * This function omits the property name lookup, hence it is faster than
2704
+ * g_object_notify().
2705
+ *
2706
+ * One way to avoid using g_object_notify() from within the
2707
+ * class that registered the properties, and using g_object_notify_by_pspec()
2708
+ * instead, is to store the GParamSpec used with
2709
+ * g_object_class_install_property() inside a static array, e.g.:
2710
+ *
2711
+ *
2712
+ * ```c
2713
+ * typedef enum
2714
+ * {
2715
+ * PROP_FOO = 1,
2716
+ * PROP_LAST
2717
+ * } MyObjectProperty;
2718
+ *
2719
+ * static GParamSpec *properties[PROP_LAST];
2720
+ *
2721
+ * static void
2722
+ * my_object_class_init (MyObjectClass *klass)
2723
+ * {
2724
+ * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
2725
+ * 0, 100,
2726
+ * 50,
2727
+ * G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
2728
+ * g_object_class_install_property (gobject_class,
2729
+ * PROP_FOO,
2730
+ * properties[PROP_FOO]);
2731
+ * }
2732
+ * ```
2733
+ *
2734
+ *
2735
+ * and then notify a change on the "foo" property with:
2736
+ *
2737
+ *
2738
+ * ```c
2739
+ * g_object_notify_by_pspec (self, properties[PROP_FOO]);
2740
+ * ```
2741
+ *
2742
+ * @param pspec the #GParamSpec of a property installed on the class of @object.
2743
+ */
2744
+ notify_by_pspec(pspec: GObject.ParamSpec): void;
2745
+ /**
2746
+ * Increases the reference count of `object`.
2747
+ *
2748
+ * Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
2749
+ * of `object` will be propagated to the return type (using the GCC typeof()
2750
+ * extension), so any casting the caller needs to do on the return type must be
2751
+ * explicit.
2752
+ * @returns the same @object
2753
+ */
2754
+ ref(): GObject.Object;
2755
+ /**
2756
+ * Increase the reference count of `object,` and possibly remove the
2757
+ * [floating][floating-ref] reference, if `object` has a floating reference.
2758
+ *
2759
+ * In other words, if the object is floating, then this call "assumes
2760
+ * ownership" of the floating reference, converting it to a normal
2761
+ * reference by clearing the floating flag while leaving the reference
2762
+ * count unchanged. If the object is not floating, then this call
2763
+ * adds a new normal reference increasing the reference count by one.
2764
+ *
2765
+ * Since GLib 2.56, the type of `object` will be propagated to the return type
2766
+ * under the same conditions as for g_object_ref().
2767
+ * @returns @object
2768
+ */
2769
+ ref_sink(): GObject.Object;
2770
+ /**
2771
+ * Releases all references to other objects. This can be used to break
2772
+ * reference cycles.
2773
+ *
2774
+ * This function should only be called from object system implementations.
2775
+ */
2776
+ run_dispose(): void;
2777
+ /**
2778
+ * Each object carries around a table of associations from
2779
+ * strings to pointers. This function lets you set an association.
2780
+ *
2781
+ * If the object already had an association with that name,
2782
+ * the old association will be destroyed.
2783
+ *
2784
+ * Internally, the `key` is converted to a #GQuark using g_quark_from_string().
2785
+ * This means a copy of `key` is kept permanently (even after `object` has been
2786
+ * finalized) — so it is recommended to only use a small, bounded set of values
2787
+ * for `key` in your program, to avoid the #GQuark storage growing unbounded.
2788
+ * @param key name of the key
2789
+ * @param data data to associate with that key
2790
+ */
2791
+ set_data(key: string, data?: any | null): void;
2792
+ set_property(property_name: string, value: any): void;
2793
+ /**
2794
+ * Remove a specified datum from the object's data associations,
2795
+ * without invoking the association's destroy handler.
2796
+ * @param key name of the key
2797
+ * @returns the data if found, or %NULL if no such data exists.
2798
+ */
2799
+ steal_data(key: string): any | null;
2800
+ /**
2801
+ * This function gets back user data pointers stored via
2802
+ * g_object_set_qdata() and removes the `data` from object
2803
+ * without invoking its destroy() function (if any was
2804
+ * set).
2805
+ * Usually, calling this function is only required to update
2806
+ * user data pointers with a destroy notifier, for example:
2807
+ *
2808
+ * ```c
2809
+ * void
2810
+ * object_add_to_user_list (GObject *object,
2811
+ * const gchar *new_string)
2812
+ * {
2813
+ * // the quark, naming the object data
2814
+ * GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
2815
+ * // retrieve the old string list
2816
+ * GList *list = g_object_steal_qdata (object, quark_string_list);
2817
+ *
2818
+ * // prepend new string
2819
+ * list = g_list_prepend (list, g_strdup (new_string));
2820
+ * // this changed 'list', so we need to set it again
2821
+ * g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
2822
+ * }
2823
+ * static void
2824
+ * free_string_list (gpointer data)
2825
+ * {
2826
+ * GList *node, *list = data;
2827
+ *
2828
+ * for (node = list; node; node = node->next)
2829
+ * g_free (node->data);
2830
+ * g_list_free (list);
2831
+ * }
2832
+ * ```
2833
+ *
2834
+ * Using g_object_get_qdata() in the above example, instead of
2835
+ * g_object_steal_qdata() would have left the destroy function set,
2836
+ * and thus the partial string list would have been freed upon
2837
+ * g_object_set_qdata_full().
2838
+ * @param quark A #GQuark, naming the user data pointer
2839
+ * @returns The user data pointer set, or %NULL
2840
+ */
2841
+ steal_qdata(quark: GLib.Quark): any | null;
2842
+ /**
2843
+ * Reverts the effect of a previous call to
2844
+ * g_object_freeze_notify(). The freeze count is decreased on `object`
2845
+ * and when it reaches zero, queued "notify" signals are emitted.
2846
+ *
2847
+ * Duplicate notifications for each property are squashed so that at most one
2848
+ * #GObject::notify signal is emitted for each property, in the reverse order
2849
+ * in which they have been queued.
2850
+ *
2851
+ * It is an error to call this function when the freeze count is zero.
2852
+ */
2853
+ thaw_notify(): void;
2854
+ /**
2855
+ * Decreases the reference count of `object`. When its reference count
2856
+ * drops to 0, the object is finalized (i.e. its memory is freed).
2857
+ *
2858
+ * If the pointer to the #GObject may be reused in future (for example, if it is
2859
+ * an instance variable of another object), it is recommended to clear the
2860
+ * pointer to %NULL rather than retain a dangling pointer to a potentially
2861
+ * invalid #GObject instance. Use g_clear_object() for this.
2862
+ */
2863
+ unref(): void;
2864
+ /**
2865
+ * This function essentially limits the life time of the `closure` to
2866
+ * the life time of the object. That is, when the object is finalized,
2867
+ * the `closure` is invalidated by calling g_closure_invalidate() on
2868
+ * it, in order to prevent invocations of the closure with a finalized
2869
+ * (nonexisting) object. Also, g_object_ref() and g_object_unref() are
2870
+ * added as marshal guards to the `closure,` to ensure that an extra
2871
+ * reference count is held on `object` during invocation of the
2872
+ * `closure`. Usually, this function will be called on closures that
2873
+ * use this `object` as closure data.
2874
+ * @param closure #GClosure to watch
2875
+ */
2876
+ watch_closure(closure: GObject.Closure): void;
2877
+ vfunc_constructed(): void;
2878
+ vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
2879
+ vfunc_dispose(): void;
2880
+ vfunc_finalize(): void;
2881
+ vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2882
+ /**
2883
+ * Emits a "notify" signal for the property `property_name` on `object`.
2884
+ *
2885
+ * When possible, eg. when signaling a property change from within the class
2886
+ * that registered the property, you should use g_object_notify_by_pspec()
2887
+ * instead.
2888
+ *
2889
+ * Note that emission of the notify signal may be blocked with
2890
+ * g_object_freeze_notify(). In this case, the signal emissions are queued
2891
+ * and will be emitted (in reverse order) when g_object_thaw_notify() is
2892
+ * called.
2893
+ * @param pspec
2894
+ */
2895
+ vfunc_notify(pspec: GObject.ParamSpec): void;
2896
+ vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
2897
+ disconnect(id: number): void;
2898
+ set(properties: { [key: string]: any }): void;
2899
+ block_signal_handler(id: number): any;
2900
+ unblock_signal_handler(id: number): any;
2901
+ stop_emission_by_name(detailedName: string): any;
2902
+ }
2903
+
2904
+ module Settings {
2905
+ // Signal callback interfaces
2906
+
2907
+ interface Changed {
2908
+ (key: string): void;
2909
+ }
2910
+
2911
+ interface Rebind {
2912
+ (key: string): void;
2913
+ }
2914
+
2915
+ interface Track {
2916
+ (tracking_state: boolean): void;
2917
+ }
2918
+
2919
+ // Constructor properties interface
2920
+
2921
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
2922
+ }
2923
+
2924
+ class Settings extends GObject.Object {
2925
+ static $gtype: GObject.GType<Settings>;
2926
+
2927
+ // Constructors of GPaste.Settings
2928
+
2929
+ constructor(properties?: Partial<Settings.ConstructorProps>, ...args: any[]);
2930
+
2931
+ _init(...args: any[]): void;
2932
+
2933
+ static ['new'](): Settings;
2934
+
2935
+ // Own signals of GPaste.Settings
2936
+
2937
+ connect(id: string, callback: (...args: any[]) => any): number;
2938
+ connect_after(id: string, callback: (...args: any[]) => any): number;
2939
+ emit(id: string, ...args: any[]): void;
2940
+ connect(signal: 'changed', callback: (_source: this, key: string) => void): number;
2941
+ connect_after(signal: 'changed', callback: (_source: this, key: string) => void): number;
2942
+ emit(signal: 'changed', key: string): void;
2943
+ connect(signal: 'rebind', callback: (_source: this, key: string) => void): number;
2944
+ connect_after(signal: 'rebind', callback: (_source: this, key: string) => void): number;
2945
+ emit(signal: 'rebind', key: string): void;
2946
+ connect(signal: 'track', callback: (_source: this, tracking_state: boolean) => void): number;
2947
+ connect_after(signal: 'track', callback: (_source: this, tracking_state: boolean) => void): number;
2948
+ emit(signal: 'track', tracking_state: boolean): void;
2949
+
2950
+ // Own methods of GPaste.Settings
2951
+
2952
+ /**
2953
+ * Get the "close-on-select" setting
2954
+ * @returns the value of the "close-on-select" setting
2955
+ */
2956
+ get_close_on_select(): boolean;
2957
+ /**
2958
+ * Get the "element-size" setting
2959
+ * @returns the value of the "element-size" setting
2960
+ */
2961
+ get_element_size(): number;
2962
+ /**
2963
+ * Get the "empty-history-confirmation" setting
2964
+ * @returns the value of the "empty-history-confirmation" setting
2965
+ */
2966
+ get_empty_history_confirmation(): boolean;
2967
+ /**
2968
+ * Get the "extension-enabled" special setting
2969
+ * @returns Whether the gnome-shell extension is enabled or not
2970
+ */
2971
+ get_extension_enabled(): boolean;
2972
+ /**
2973
+ * Get the "growing-lines" setting
2974
+ * @returns the value of the "growing-lines" setting
2975
+ */
2976
+ get_growing_lines(): boolean;
2977
+ /**
2978
+ * Get the "history-name" setting
2979
+ * @returns the value of the "history-name" setting
2980
+ */
2981
+ get_history_name(): string;
2982
+ /**
2983
+ * Get the "images-support" setting
2984
+ * @returns the value of the "images-support" setting
2985
+ */
2986
+ get_images_support(): boolean;
2987
+ /**
2988
+ * Get the "launch-ui" setting
2989
+ * @returns the value of the "launch-ui" setting
2990
+ */
2991
+ get_launch_ui(): string;
2992
+ /**
2993
+ * Get the "make-password" setting
2994
+ * @returns the value of the "make-password" setting
2995
+ */
2996
+ get_make_password(): string;
2997
+ /**
2998
+ * Get the "max-displayed-history-size" setting
2999
+ * @returns the value of the "max-displayed-history-size" setting
3000
+ */
3001
+ get_max_displayed_history_size(): number;
3002
+ /**
3003
+ * Get the "max-history-size" setting
3004
+ * @returns the value of the "max-history-size" setting
3005
+ */
3006
+ get_max_history_size(): number;
3007
+ /**
3008
+ * Get the "max-memory-usage" setting
3009
+ * @returns the value of the "max-memory-usage" setting
3010
+ */
3011
+ get_max_memory_usage(): number;
3012
+ /**
3013
+ * Get the "max-text-item-size" setting
3014
+ * @returns the value of the "max-text-item-size" setting
3015
+ */
3016
+ get_max_text_item_size(): number;
3017
+ /**
3018
+ * Get the "min-text-item-size" setting
3019
+ * @returns the value of the "min-text-item-size" setting
3020
+ */
3021
+ get_min_text_item_size(): number;
3022
+ /**
3023
+ * Get the "open-centered" setting
3024
+ * @returns the value of the "open-centered" setting
3025
+ */
3026
+ get_open_centered(): boolean;
3027
+ /**
3028
+ * Get the "pop" setting
3029
+ * @returns the value of the "pop" setting
3030
+ */
3031
+ get_pop(): string;
3032
+ /**
3033
+ * Get the "primary-to-history" setting
3034
+ * @returns the value of the "primary-to-history" setting
3035
+ */
3036
+ get_primary_to_history(): boolean;
3037
+ /**
3038
+ * Get the "rich-text-support" setting
3039
+ * @returns the value of the "rich-text-support" setting
3040
+ */
3041
+ get_rich_text_support(): boolean;
3042
+ /**
3043
+ * Get the "save-history" setting
3044
+ * @returns the value of the "save-history" setting
3045
+ */
3046
+ get_save_history(): boolean;
3047
+ /**
3048
+ * Get the "show-history" setting
3049
+ * @returns the value of the "show-history" setting
3050
+ */
3051
+ get_show_history(): string;
3052
+ /**
3053
+ * Get the "sync-clipboard-to-primary" setting
3054
+ * @returns the value of the "sync-clipboard-to-primary" setting
3055
+ */
3056
+ get_sync_clipboard_to_primary(): string;
3057
+ /**
3058
+ * Get the "sync-primary-to-clipboard" setting
3059
+ * @returns the value of the "sync-primary-to-clipboard" setting
3060
+ */
3061
+ get_sync_primary_to_clipboard(): string;
3062
+ /**
3063
+ * Get the "synchronize-clipboards" setting
3064
+ * @returns the value of the "synchronize-clipboards" setting
3065
+ */
3066
+ get_synchronize_clipboards(): boolean;
3067
+ /**
3068
+ * Get the "track-changes" setting
3069
+ * @returns the value of the "track-changes" setting
3070
+ */
3071
+ get_track_changes(): boolean;
3072
+ /**
3073
+ * Get the "track-extension-state" setting
3074
+ * @returns the value of the "track-extension-state" setting
3075
+ */
3076
+ get_track_extension_state(): boolean;
3077
+ /**
3078
+ * Get the "trim-items" setting
3079
+ * @returns the value of the "trim-items" setting
3080
+ */
3081
+ get_trim_items(): boolean;
3082
+ /**
3083
+ * Get the "upload" setting
3084
+ * @returns the value of the "upload" setting
3085
+ */
3086
+ get_upload(): string;
3087
+ /**
3088
+ * Reset the "close-on-select" setting
3089
+ */
3090
+ reset_close_on_select(): void;
3091
+ /**
3092
+ * Reset the "element-size" setting
3093
+ */
3094
+ reset_element_size(): void;
3095
+ /**
3096
+ * Reset the "empty-history-confirmation" setting
3097
+ */
3098
+ reset_empty_history_confirmation(): void;
3099
+ /**
3100
+ * Reset the "growing-lines" setting
3101
+ */
3102
+ reset_growing_lines(): void;
3103
+ /**
3104
+ * Reset the "history-name" setting
3105
+ */
3106
+ reset_history_name(): void;
3107
+ /**
3108
+ * Reset the "images-support" setting
3109
+ */
3110
+ reset_images_support(): void;
3111
+ /**
3112
+ * Reset the "launch-ui" setting
3113
+ */
3114
+ reset_launch_ui(): void;
3115
+ /**
3116
+ * Reset the "make-password" setting
3117
+ */
3118
+ reset_make_password(): void;
3119
+ /**
3120
+ * Reset the "max-displayed-history-size" setting
3121
+ */
3122
+ reset_max_displayed_history_size(): void;
3123
+ /**
3124
+ * Reset the "max-history-size" setting
3125
+ */
3126
+ reset_max_history_size(): void;
3127
+ /**
3128
+ * Reset the "max-memory-usage" setting
3129
+ */
3130
+ reset_max_memory_usage(): void;
3131
+ /**
3132
+ * Reset the "max-text-item-size" setting
3133
+ */
3134
+ reset_max_text_item_size(): void;
3135
+ /**
3136
+ * Reset the "min-text-item-size" setting
3137
+ */
3138
+ reset_min_text_item_size(): void;
3139
+ /**
3140
+ * Reset the "open-centered" setting
3141
+ */
3142
+ reset_open_centered(): void;
3143
+ /**
3144
+ * Reset the "pop" setting
3145
+ */
3146
+ reset_pop(): void;
3147
+ /**
3148
+ * Reset the "primary-to-history" setting
3149
+ */
3150
+ reset_primary_to_history(): void;
3151
+ /**
3152
+ * Reset the "rich-text-support" setting
3153
+ */
3154
+ reset_rich_text_support(): void;
3155
+ /**
3156
+ * Reset the "save-history" setting
3157
+ */
3158
+ reset_save_history(): void;
3159
+ /**
3160
+ * Reset the "show-history" setting
3161
+ */
3162
+ reset_show_history(): void;
3163
+ /**
3164
+ * Reset the "sync-clipboard-to-primary" setting
3165
+ */
3166
+ reset_sync_clipboard_to_primary(): void;
3167
+ /**
3168
+ * Reset the "sync-primary-to-clipboard" setting
3169
+ */
3170
+ reset_sync_primary_to_clipboard(): void;
3171
+ /**
3172
+ * Reset the "synchronize-clipboards" setting
3173
+ */
3174
+ reset_synchronize_clipboards(): void;
3175
+ /**
3176
+ * Reset the "track-changes" setting
3177
+ */
3178
+ reset_track_changes(): void;
3179
+ /**
3180
+ * Reset the "track-extension-state" setting
3181
+ */
3182
+ reset_track_extension_state(): void;
3183
+ /**
3184
+ * Reset the "trim-items" setting
3185
+ */
3186
+ reset_trim_items(): void;
3187
+ /**
3188
+ * Reset the "upload" setting
3189
+ */
3190
+ reset_upload(): void;
3191
+ /**
3192
+ * Change the "close-on-select" setting
3193
+ * @param value the new history name
3194
+ */
3195
+ set_close_on_select(value: boolean): void;
3196
+ /**
3197
+ * Change the "element-size" setting
3198
+ * @param value the maximum displayed size of an item
3199
+ */
3200
+ set_element_size(value: number): void;
3201
+ /**
3202
+ * Change the "empty-history-confirmation" setting
3203
+ * @param value whether to prompt for confirmation when emptying a history
3204
+ */
3205
+ set_empty_history_confirmation(value: boolean): void;
3206
+ /**
3207
+ * Change the "extension-enabled" special setting
3208
+ * @param value whether to enable or not the gnome-shell extension
3209
+ */
3210
+ set_extension_enabled(value: boolean): void;
3211
+ /**
3212
+ * Change the "growing-lines" setting
3213
+ * @param value whether to detect or not growing lines
3214
+ */
3215
+ set_growing_lines(value: boolean): void;
3216
+ /**
3217
+ * Change the "history-name" setting
3218
+ * @param value the new history name
3219
+ */
3220
+ set_history_name(value: string): void;
3221
+ /**
3222
+ * Change the "images-support" setting
3223
+ * @param value the new history name
3224
+ */
3225
+ set_images_support(value: boolean): void;
3226
+ /**
3227
+ * Change the "launch-ui" setting
3228
+ * @param value the new keyboard shortcut
3229
+ */
3230
+ set_launch_ui(value: string): void;
3231
+ /**
3232
+ * Change the "make-password" setting
3233
+ * @param value the new keyboard shortcut
3234
+ */
3235
+ set_make_password(value: string): void;
3236
+ /**
3237
+ * Change the "max-displayed-history-size" setting
3238
+ * @param value the maximum number of items to display
3239
+ */
3240
+ set_max_displayed_history_size(value: number): void;
3241
+ /**
3242
+ * Change the "max-history-size" setting
3243
+ * @param value the maximum number of items the history can contain
3244
+ */
3245
+ set_max_history_size(value: number): void;
3246
+ /**
3247
+ * Change the "max-memory-usage" setting
3248
+ * @param value the maximum amount of memory we can use
3249
+ */
3250
+ set_max_memory_usage(value: number): void;
3251
+ /**
3252
+ * Change the "max-text-item-size" setting
3253
+ * @param value the maximum size for a textual item to be handled
3254
+ */
3255
+ set_max_text_item_size(value: number): void;
3256
+ /**
3257
+ * Change the "min-text-item-size" setting
3258
+ * @param value the minimum size for a textual item to be handled
3259
+ */
3260
+ set_min_text_item_size(value: number): void;
3261
+ /**
3262
+ * Change the "open-centered" setting
3263
+ * @param value the new history name
3264
+ */
3265
+ set_open_centered(value: boolean): void;
3266
+ /**
3267
+ * Change the "pop" setting
3268
+ * @param value the new keyboard shortcut
3269
+ */
3270
+ set_pop(value: string): void;
3271
+ /**
3272
+ * Change the "primary-to-history" setting
3273
+ * @param value whether to track or not the primary selection changes as clipboard ones
3274
+ */
3275
+ set_primary_to_history(value: boolean): void;
3276
+ /**
3277
+ * Change the "rich-text-support" setting
3278
+ * @param value the new history name
3279
+ */
3280
+ set_rich_text_support(value: boolean): void;
3281
+ /**
3282
+ * Change the "save-history" setting
3283
+ * @param value whether to save or not the history
3284
+ */
3285
+ set_save_history(value: boolean): void;
3286
+ /**
3287
+ * Change the "show-history" setting
3288
+ * @param value the new keyboard shortcut
3289
+ */
3290
+ set_show_history(value: string): void;
3291
+ /**
3292
+ * Change the "sync-clipboard-to-primary" setting
3293
+ * @param value the new keyboard shortcut
3294
+ */
3295
+ set_sync_clipboard_to_primary(value: string): void;
3296
+ /**
3297
+ * Change the "sync-primary-to-clipboard" setting
3298
+ * @param value the new keyboard shortcut
3299
+ */
3300
+ set_sync_primary_to_clipboard(value: string): void;
3301
+ /**
3302
+ * Change the "synchronize-clipboards" setting
3303
+ * @param value whether to synchronize the clipboard and the primary selection or not
3304
+ */
3305
+ set_synchronize_clipboards(value: boolean): void;
3306
+ /**
3307
+ * Change the "track-changes" setting
3308
+ * @param value whether to track or not the clipboard changes
3309
+ */
3310
+ set_track_changes(value: boolean): void;
3311
+ /**
3312
+ * Change the "track-extension-state" setting
3313
+ * @param value whether to stop tracking or not the clipboard changes when an applet exits
3314
+ */
3315
+ set_track_extension_state(value: boolean): void;
3316
+ /**
3317
+ * Change the "trim-items" setting
3318
+ * @param value whether to trim or not textual items
3319
+ */
3320
+ set_trim_items(value: boolean): void;
3321
+ /**
3322
+ * Change the "upload" setting
3323
+ * @param value the new keyboard shortcut
3324
+ */
3325
+ set_upload(value: string): void;
3326
+ }
3327
+
3328
+ type ClientClass = typeof Client;
3329
+ type ClientItemClass = typeof ClientItem;
3330
+ class GnomeShellAccelerator {
3331
+ static $gtype: GObject.GType<GnomeShellAccelerator>;
3332
+
3333
+ // Own fields of GPaste.GnomeShellAccelerator
3334
+
3335
+ accelerator: string;
3336
+ mode_flags: MetaKeyBindingFlags;
3337
+ grab_flags: GnomeShellActionMode;
3338
+
3339
+ // Constructors of GPaste.GnomeShellAccelerator
3340
+
3341
+ _init(...args: any[]): void;
3342
+ }
3343
+
3344
+ type GnomeShellClientClass = typeof GnomeShellClient;
3345
+ type ScreensaverClientClass = typeof ScreensaverClient;
3346
+ type SettingsClass = typeof Settings;
3347
+ /**
3348
+ * Name of the imported GIR library
3349
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
3350
+ */
3351
+ const __name__: string;
3352
+ /**
3353
+ * Version of the imported GIR library
3354
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
3355
+ */
3356
+ const __version__: string;
3357
+ }
3358
+
3359
+ export default GPaste;
3360
+ // END