@girs/gnomedesktop-4.0 4.0.0-3.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,795 @@
1
+
2
+ /*
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
7
+ */
8
+ /**
9
+ * GnomeDesktop-4.0
10
+ */
11
+
12
+ import type Gio from '@girs/gio-2.0';
13
+ import type GObject from '@girs/gobject-2.0';
14
+ import type GLib from '@girs/glib-2.0';
15
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
16
+ import type GModule from '@girs/gmodule-2.0';
17
+ import type GDesktopEnums from '@girs/gdesktopenums-3.0';
18
+
19
+ export namespace GnomeDesktop {
20
+
21
+ enum DesktopThumbnailSize {
22
+ NORMAL,
23
+ LARGE,
24
+ XLARGE,
25
+ XXLARGE,
26
+ }
27
+ const DESKTOP_PLATFORM_VERSION: number
28
+ /**
29
+ * Returns whether the thumbnail has the correct uri and mtime embedded in the
30
+ * png options. This function is threadsafe and does no blocking I/O.
31
+ * @param pixbuf an loaded thumbnail #GdkPixbuf
32
+ * @param uri a uri
33
+ * @param mtime the mtime
34
+ * @returns TRUE if the thumbnail has the right @uri and @mtime
35
+ */
36
+ function desktop_thumbnail_is_valid(pixbuf: GdkPixbuf.Pixbuf, uri: string | null, mtime: number): boolean
37
+ /**
38
+ * Returns the filename that a thumbnail of size `size` for `uri` would have.
39
+ * This function is threadsafe and does no blocking I/O.
40
+ * @param uri an uri
41
+ * @param size a thumbnail size
42
+ * @returns an absolute filename
43
+ */
44
+ function desktop_thumbnail_path_for_uri(uri: string | null, size: DesktopThumbnailSize): string | null
45
+ /**
46
+ * Gets all locales.
47
+ * @returns a newly allocated %NULL-terminated string array containing the all locales. Free with g_strfreev().
48
+ */
49
+ function get_all_locales(): string[]
50
+ /**
51
+ * Gets the country name for `code`. If `translation` is provided the
52
+ * returned string is translated accordingly.
53
+ * @param code an ISO 3166 code string
54
+ * @param translation a locale string
55
+ * @returns the country name. Caller takes ownership.
56
+ */
57
+ function get_country_from_code(code: string | null, translation: string | null): string | null
58
+ /**
59
+ * Gets the country description for `locale`. If `translation` is
60
+ * provided the returned string is translated accordingly.
61
+ * @param locale a locale string
62
+ * @param translation a locale string
63
+ * @returns the country description. Caller takes ownership.
64
+ */
65
+ function get_country_from_locale(locale: string | null, translation: string | null): string | null
66
+ /**
67
+ * Gets the default input source's type and identifier for a given
68
+ * locale.
69
+ * @param locale a locale string
70
+ * @returns %TRUE if a input source exists or %FALSE otherwise.
71
+ */
72
+ function get_input_source_from_locale(locale: string | null): [ /* returnType */ boolean, /* type */ string | null, /* id */ string | null ]
73
+ /**
74
+ * Gets the language name for `code`. If `translation` is provided the
75
+ * returned string is translated accordingly.
76
+ * @param code an ISO 639 code string
77
+ * @param translation a locale string
78
+ * @returns the language name. Caller takes ownership.
79
+ */
80
+ function get_language_from_code(code: string | null, translation: string | null): string | null
81
+ /**
82
+ * Gets the language description for `locale`. If `translation` is
83
+ * provided the returned string is translated accordingly.
84
+ * @param locale a locale string
85
+ * @param translation a locale string
86
+ * @returns the language description. Caller takes ownership.
87
+ */
88
+ function get_language_from_locale(locale: string | null, translation: string | null): string | null
89
+ /**
90
+ * Returns an integer with the major version of GNOME. Useful for
91
+ * dynamic languages like Javascript or Python (static languages like
92
+ * C should use %GNOME_DESKTOP_PLATFORM_VERSION). If this
93
+ * function doesn't exist, it can be presumed that the GNOME platform
94
+ * version is 42 or previous.
95
+ * @returns an integer with the major version of GNOME.
96
+ */
97
+ function get_platform_version(): number
98
+ /**
99
+ * Gets a translation of the raw `modifier` string. If `translation`
100
+ * is provided the returned string is translated accordingly.
101
+ * @param modifier the modifier part of a locale name
102
+ * @param translation a locale string
103
+ * @returns the translated modifier string. Caller takes ownership.
104
+ */
105
+ function get_translated_modifier(modifier: string | null, translation: string | null): string | null
106
+ /**
107
+ * Returns %TRUE if there are translations for language `code`.
108
+ * @param code an ISO 639 code string
109
+ * @returns %TRUE if there are translations for language @code.
110
+ */
111
+ function language_has_translations(code: string | null): boolean
112
+ /**
113
+ * Gets the normalized locale string in the form
114
+ * [language[_country][.codeset][`modifier]`] for `name`.
115
+ * @param locale a locale string
116
+ * @returns normalized locale string. Caller takes ownership.
117
+ */
118
+ function normalize_locale(locale: string | null): string | null
119
+ /**
120
+ * Extracts the various components of a locale string in XPG format.
121
+ * ([language[_country][.codeset][`modifier]`]). See
122
+ * http://en.wikipedia.org/wiki/Locale.
123
+ * @param locale a locale string
124
+ * @returns %TRUE if parsing was successful.
125
+ */
126
+ function parse_locale(locale: string | null): [ /* returnType */ boolean, /* language_codep */ string | null, /* country_codep */ string | null, /* codesetp */ string | null, /* modifierp */ string | null ]
127
+ /**
128
+ * If the current process is running inside a user systemd instance, then move
129
+ * the launched PID into a transient scope. The given `name` will be used to
130
+ * create a unit name. It should be the application ID or the executable in all
131
+ * other cases. If a desktop-id is passed then the .desktop suffix will be
132
+ * stripped.
133
+ *
134
+ * It is advisable to use this function every time where the started application
135
+ * can be considered reasonably independent of the launching application. Placing
136
+ * it in a scope creates proper separation between the programs rather than being
137
+ * considered a single entity by systemd.
138
+ *
139
+ * It is always safe to call this function. Note that a successful return code
140
+ * does not imply that a unit has been created. It solely means that no error
141
+ * condition was hit sending the request.
142
+ *
143
+ * If `connection` is %NULL then g_dbus_get() will be called internally.
144
+ *
145
+ * Note that most callers will not need to handle errors. As such, it is normal
146
+ * to pass a %NULL `callback`.
147
+ * @param name Name for the application
148
+ * @param pid The PID of the application
149
+ * @param description A description to use for the unit, or %NULL
150
+ * @param connection An #GDBusConnection to the session bus, or %NULL
151
+ * @param cancellable #GCancellable to use
152
+ * @param callback Callback to call when the operation is done
153
+ */
154
+ function start_systemd_scope<Z = unknown>(name: string | null, pid: number, description: string | null, connection: Gio.DBusConnection | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<Z> | null): void
155
+ /**
156
+ * Finish an asynchronous operation to create a transient scope that was
157
+ * started with gnome_start_systemd_scope().
158
+ *
159
+ * Note that a successful return code does not imply that a unit has been
160
+ * created. It solely means that no error condition was hit sending the request.
161
+ * @param res A #GAsyncResult
162
+ * @returns %FALSE on error, %TRUE otherwise
163
+ */
164
+ function start_systemd_scope_finish(res: Gio.AsyncResult): boolean
165
+ interface IdleMonitorWatchFunc {
166
+ (monitor: IdleMonitor, id: number): void
167
+ }
168
+ module DesktopThumbnailFactory {
169
+
170
+ // Constructor properties interface
171
+
172
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
173
+ }
174
+
175
+ }
176
+
177
+ interface DesktopThumbnailFactory {
178
+
179
+ // Own fields of GnomeDesktop-4.0.GnomeDesktop.DesktopThumbnailFactory
180
+
181
+ parent: GObject.Object
182
+ priv: DesktopThumbnailFactoryPrivate
183
+
184
+ // Owm methods of GnomeDesktop-4.0.GnomeDesktop.DesktopThumbnailFactory
185
+
186
+ /**
187
+ * Returns TRUE if this GnomeDesktopThumbnailFactory can (at least try) to thumbnail
188
+ * this file. Thumbnails or files with failed thumbnails won't be thumbnailed.
189
+ *
190
+ * Usage of this function is threadsafe and does blocking I/O.
191
+ * @param uri the uri of a file
192
+ * @param mime_type the mime type of the file
193
+ * @param mtime the mtime of the file
194
+ * @returns TRUE if the file can be thumbnailed.
195
+ */
196
+ can_thumbnail(uri: string | null, mime_type: string | null, mtime: number): boolean
197
+ /**
198
+ * Creates a failed thumbnail for the file so that we don't try
199
+ * to re-thumbnail the file later.
200
+ *
201
+ * Usage of this function is threadsafe and does blocking I/O.
202
+ * @param uri the uri of a file
203
+ * @param mtime the modification time of the file
204
+ * @param cancellable a GCancellable object, or NULL
205
+ * @returns TRUE if everything went fine; FALSE if there was an error.
206
+ */
207
+ create_failed_thumbnail(uri: string | null, mtime: number, cancellable: Gio.Cancellable | null): boolean
208
+ /**
209
+ * Asynchronous version of gnome_desktop_thumbnail_factory_create_failed_thumbnail()
210
+ *
211
+ * Since 43.0
212
+ * @param uri the uri of a file
213
+ * @param original_mtime the modification time of the original file
214
+ * @param cancellable a Cancellable object
215
+ * @param callback a function that will be called when the task has ended
216
+ */
217
+ create_failed_thumbnail_async(uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
218
+ create_failed_thumbnail_finish(result: Gio.AsyncResult): boolean
219
+ /**
220
+ * Tries to generate a thumbnail for the specified file. If it succeeds
221
+ * it returns a pixbuf that can be used as a thumbnail.
222
+ *
223
+ * Usage of this function is threadsafe and does blocking I/O.
224
+ * @param uri the uri of a file
225
+ * @param mime_type the mime type of the file
226
+ * @param cancellable a #GCancellable object or NULL
227
+ * @returns thumbnail pixbuf if thumbnailing succeeded, %NULL otherwise and error will be set
228
+ */
229
+ generate_thumbnail(uri: string | null, mime_type: string | null, cancellable: Gio.Cancellable | null): GdkPixbuf.Pixbuf
230
+ /**
231
+ * Asynchronous version of gnome_desktop_thumbnail_factory_generate_thumbnail()
232
+ *
233
+ * Since 43.0
234
+ * @param uri the URI of a file
235
+ * @param mime_type the MIME type of the file
236
+ * @param cancellable a Cancellable object
237
+ * @param callback a function that will be called when the task has ended
238
+ */
239
+ generate_thumbnail_async(uri: string | null, mime_type: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
240
+ generate_thumbnail_finish(result: Gio.AsyncResult): GdkPixbuf.Pixbuf
241
+ /**
242
+ * Tries to locate an failed thumbnail for the file specified. Writing
243
+ * and looking for failed thumbnails is important to avoid to try to
244
+ * thumbnail e.g. broken images several times.
245
+ *
246
+ * Usage of this function is threadsafe and does blocking I/O.
247
+ * @param uri the uri of a file
248
+ * @param mtime the mtime of the file
249
+ * @returns TRUE if there is a failed thumbnail for the file.
250
+ */
251
+ has_valid_failed_thumbnail(uri: string | null, mtime: number): boolean
252
+ /**
253
+ * Tries to locate an existing thumbnail for the file specified.
254
+ *
255
+ * Usage of this function is threadsafe and does blocking I/O.
256
+ * @param uri the uri of a file
257
+ * @param mtime the mtime of the file
258
+ * @returns The absolute path of the thumbnail, or %NULL if none exist.
259
+ */
260
+ lookup(uri: string | null, mtime: number): string | null
261
+ /**
262
+ * Saves `thumbnail` at the right place. If the save fails a
263
+ * failed thumbnail is written.
264
+ *
265
+ * Usage of this function is threadsafe and does blocking I/O.
266
+ * @param thumbnail the thumbnail as a pixbuf
267
+ * @param uri the uri of a file
268
+ * @param original_mtime the modification time of the original file
269
+ * @param cancellable a GCancellable object, or NULL
270
+ * @returns TRUE if everything went fine; FALSE if there was an error.
271
+ */
272
+ save_thumbnail(thumbnail: GdkPixbuf.Pixbuf, uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null): boolean
273
+ /**
274
+ * Asynchronous version of gnome_desktop_thumbnail_factory_save_thumbnail()
275
+ *
276
+ * Since 43.0
277
+ * @param thumbnail the thumbnail as a pixbuf
278
+ * @param uri the uri of a file
279
+ * @param original_mtime the modification time of the original file
280
+ * @param cancellable a Cancellable object
281
+ * @param callback a function that will be called when the task has ended
282
+ */
283
+ save_thumbnail_async(thumbnail: GdkPixbuf.Pixbuf, uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
284
+ save_thumbnail_finish(result: Gio.AsyncResult): boolean
285
+
286
+ // Class property signals of GnomeDesktop-4.0.GnomeDesktop.DesktopThumbnailFactory
287
+
288
+ connect(sigName: string, callback: (...args: any[]) => void): number
289
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
290
+ emit(sigName: string, ...args: any[]): void
291
+ disconnect(id: number): void
292
+ }
293
+
294
+ class DesktopThumbnailFactory extends GObject.Object {
295
+
296
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.DesktopThumbnailFactory
297
+
298
+ static name: string
299
+ static $gtype: GObject.GType<DesktopThumbnailFactory>
300
+
301
+ // Constructors of GnomeDesktop-4.0.GnomeDesktop.DesktopThumbnailFactory
302
+
303
+ constructor(config?: DesktopThumbnailFactory.ConstructorProperties)
304
+ /**
305
+ * Creates a new #GnomeDesktopThumbnailFactory.
306
+ *
307
+ * This function must be called on the main thread and is non-blocking.
308
+ * @constructor
309
+ * @param size The thumbnail size to use
310
+ * @returns a new #GnomeDesktopThumbnailFactory
311
+ */
312
+ constructor(size: DesktopThumbnailSize)
313
+ /**
314
+ * Creates a new #GnomeDesktopThumbnailFactory.
315
+ *
316
+ * This function must be called on the main thread and is non-blocking.
317
+ * @constructor
318
+ * @param size The thumbnail size to use
319
+ * @returns a new #GnomeDesktopThumbnailFactory
320
+ */
321
+ static new(size: DesktopThumbnailSize): DesktopThumbnailFactory
322
+ _init(config?: DesktopThumbnailFactory.ConstructorProperties): void
323
+ }
324
+
325
+ module IdleMonitor {
326
+
327
+ // Constructor properties interface
328
+
329
+ interface ConstructorProperties extends Gio.Initable.ConstructorProperties, GObject.Object.ConstructorProperties {
330
+ }
331
+
332
+ }
333
+
334
+ interface IdleMonitor extends Gio.Initable {
335
+
336
+ // Own fields of GnomeDesktop-4.0.GnomeDesktop.IdleMonitor
337
+
338
+ parent: GObject.Object
339
+ priv: IdleMonitorPrivate
340
+
341
+ // Owm methods of GnomeDesktop-4.0.GnomeDesktop.IdleMonitor
342
+
343
+ add_idle_watch(interval_msec: number, callback: IdleMonitorWatchFunc | null): number
344
+ add_user_active_watch(callback: IdleMonitorWatchFunc | null): number
345
+ get_idletime(): number
346
+ /**
347
+ * Removes an idle time watcher, previously added by
348
+ * gnome_idle_monitor_add_idle_watch() or
349
+ * gnome_idle_monitor_add_user_active_watch().
350
+ * @param id A watch ID
351
+ */
352
+ remove_watch(id: number): void
353
+
354
+ // Class property signals of GnomeDesktop-4.0.GnomeDesktop.IdleMonitor
355
+
356
+ connect(sigName: string, callback: (...args: any[]) => void): number
357
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
358
+ emit(sigName: string, ...args: any[]): void
359
+ disconnect(id: number): void
360
+ }
361
+
362
+ class IdleMonitor extends GObject.Object {
363
+
364
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.IdleMonitor
365
+
366
+ static name: string
367
+ static $gtype: GObject.GType<IdleMonitor>
368
+
369
+ // Constructors of GnomeDesktop-4.0.GnomeDesktop.IdleMonitor
370
+
371
+ constructor(config?: IdleMonitor.ConstructorProperties)
372
+ constructor()
373
+ static new(): IdleMonitor
374
+ _init(config?: IdleMonitor.ConstructorProperties): void
375
+ }
376
+
377
+ module PnpIds {
378
+
379
+ // Constructor properties interface
380
+
381
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
382
+ }
383
+
384
+ }
385
+
386
+ interface PnpIds {
387
+
388
+ // Own fields of GnomeDesktop-4.0.GnomeDesktop.PnpIds
389
+
390
+ parent: GObject.Object
391
+ priv: PnpIdsPrivate
392
+
393
+ // Owm methods of GnomeDesktop-4.0.GnomeDesktop.PnpIds
394
+
395
+ /**
396
+ * Find the full manufacturer name for the given PNP ID.
397
+ * @param pnp_id the PNP ID to look for
398
+ * @returns a new string representing the manufacturer name, or %NULL when not found.
399
+ */
400
+ get_pnp_id(pnp_id: string | null): string | null
401
+
402
+ // Class property signals of GnomeDesktop-4.0.GnomeDesktop.PnpIds
403
+
404
+ connect(sigName: string, callback: (...args: any[]) => void): number
405
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
406
+ emit(sigName: string, ...args: any[]): void
407
+ disconnect(id: number): void
408
+ }
409
+
410
+ class PnpIds extends GObject.Object {
411
+
412
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.PnpIds
413
+
414
+ static name: string
415
+ static $gtype: GObject.GType<PnpIds>
416
+
417
+ // Constructors of GnomeDesktop-4.0.GnomeDesktop.PnpIds
418
+
419
+ constructor(config?: PnpIds.ConstructorProperties)
420
+ /**
421
+ * Returns a reference to a #GnomePnpIds object, or creates
422
+ * a new one if none have been created.
423
+ * @constructor
424
+ * @returns a #GnomePnpIds object.
425
+ */
426
+ constructor()
427
+ /**
428
+ * Returns a reference to a #GnomePnpIds object, or creates
429
+ * a new one if none have been created.
430
+ * @constructor
431
+ * @returns a #GnomePnpIds object.
432
+ */
433
+ static new(): PnpIds
434
+ _init(config?: PnpIds.ConstructorProperties): void
435
+ }
436
+
437
+ module WallClock {
438
+
439
+ // Constructor properties interface
440
+
441
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
442
+
443
+ // Own constructor properties of GnomeDesktop-4.0.GnomeDesktop.WallClock
444
+
445
+ /**
446
+ * If %TRUE, the formatted clock will always have seconds precision and the
447
+ * 'clock' property will always be updated every second, irrespective of
448
+ * system configuration.
449
+ */
450
+ force_seconds?: boolean | null
451
+ /**
452
+ * If %TRUE, the formatted clock will never include a date or the
453
+ * day of the week, irrespective of configuration.
454
+ */
455
+ time_only?: boolean | null
456
+ }
457
+
458
+ }
459
+
460
+ interface WallClock {
461
+
462
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.WallClock
463
+
464
+ /**
465
+ * A formatted string representing the current clock display.
466
+ */
467
+ readonly clock: string | null
468
+ /**
469
+ * If %TRUE, the formatted clock will always have seconds precision and the
470
+ * 'clock' property will always be updated every second, irrespective of
471
+ * system configuration.
472
+ */
473
+ force_seconds: boolean
474
+ /**
475
+ * If %TRUE, the formatted clock will never include a date or the
476
+ * day of the week, irrespective of configuration.
477
+ */
478
+ time_only: boolean
479
+ /**
480
+ * The timezone used for this clock
481
+ */
482
+ readonly timezone: GLib.TimeZone
483
+
484
+ // Own fields of GnomeDesktop-4.0.GnomeDesktop.WallClock
485
+
486
+ parent_object: GObject.Object
487
+ priv: WallClockPrivate
488
+
489
+ // Owm methods of GnomeDesktop-4.0.GnomeDesktop.WallClock
490
+
491
+ /**
492
+ * Returns the string representing the current time of this clock
493
+ * according to the user settings.
494
+ * @returns the time of the clock as a string. This string points to internally allocated storage and must not be freed, modified or stored.
495
+ */
496
+ get_clock(): string | null
497
+ /**
498
+ * Returns the current local time zone used by this clock.
499
+ * @returns the #GTimeZone of the clock.
500
+ */
501
+ get_timezone(): GLib.TimeZone
502
+ string_for_datetime(now: GLib.DateTime, clock_format: GDesktopEnums.ClockFormat, show_weekday: boolean, show_full_date: boolean, show_seconds: boolean): string | null
503
+
504
+ // Class property signals of GnomeDesktop-4.0.GnomeDesktop.WallClock
505
+
506
+ connect(sigName: "notify::clock", callback: (($obj: WallClock, pspec: GObject.ParamSpec) => void)): number
507
+ connect_after(sigName: "notify::clock", callback: (($obj: WallClock, pspec: GObject.ParamSpec) => void)): number
508
+ emit(sigName: "notify::clock", ...args: any[]): void
509
+ connect(sigName: "notify::force-seconds", callback: (($obj: WallClock, pspec: GObject.ParamSpec) => void)): number
510
+ connect_after(sigName: "notify::force-seconds", callback: (($obj: WallClock, pspec: GObject.ParamSpec) => void)): number
511
+ emit(sigName: "notify::force-seconds", ...args: any[]): void
512
+ connect(sigName: "notify::time-only", callback: (($obj: WallClock, pspec: GObject.ParamSpec) => void)): number
513
+ connect_after(sigName: "notify::time-only", callback: (($obj: WallClock, pspec: GObject.ParamSpec) => void)): number
514
+ emit(sigName: "notify::time-only", ...args: any[]): void
515
+ connect(sigName: "notify::timezone", callback: (($obj: WallClock, pspec: GObject.ParamSpec) => void)): number
516
+ connect_after(sigName: "notify::timezone", callback: (($obj: WallClock, pspec: GObject.ParamSpec) => void)): number
517
+ emit(sigName: "notify::timezone", ...args: any[]): void
518
+ connect(sigName: string, callback: (...args: any[]) => void): number
519
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
520
+ emit(sigName: string, ...args: any[]): void
521
+ disconnect(id: number): void
522
+ }
523
+
524
+ class WallClock extends GObject.Object {
525
+
526
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.WallClock
527
+
528
+ static name: string
529
+ static $gtype: GObject.GType<WallClock>
530
+
531
+ // Constructors of GnomeDesktop-4.0.GnomeDesktop.WallClock
532
+
533
+ constructor(config?: WallClock.ConstructorProperties)
534
+ /**
535
+ * Creates a new #GnomeWallClock
536
+ * @constructor
537
+ * @returns the new clock
538
+ */
539
+ constructor()
540
+ /**
541
+ * Creates a new #GnomeWallClock
542
+ * @constructor
543
+ * @returns the new clock
544
+ */
545
+ static new(): WallClock
546
+ _init(config?: WallClock.ConstructorProperties): void
547
+ }
548
+
549
+ module XkbInfo {
550
+
551
+ // Signal callback interfaces
552
+
553
+ /**
554
+ * Signal callback interface for `layouts-changed`
555
+ */
556
+ interface LayoutsChangedSignalCallback {
557
+ ($obj: XkbInfo): void
558
+ }
559
+
560
+
561
+ // Constructor properties interface
562
+
563
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
564
+ }
565
+
566
+ }
567
+
568
+ interface XkbInfo {
569
+
570
+ // Own fields of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
571
+
572
+ parent_object: GObject.Object
573
+ priv: XkbInfoPrivate
574
+
575
+ // Owm methods of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
576
+
577
+ description_for_group(group_id: string | null): string | null
578
+ description_for_option(group_id: string | null, id: string | null): string | null
579
+ /**
580
+ * Returns a list of all layout identifiers we know about.
581
+ * @returns the list of layout names. The caller takes ownership of the #GList but not of the strings themselves, those are internally allocated and must not be modified.
582
+ */
583
+ get_all_layouts(): string[]
584
+ /**
585
+ * Returns a list of all option group identifiers we know about.
586
+ * @returns the list of option group ids. The caller takes ownership of the #GList but not of the strings themselves, those are internally allocated and must not be modified.
587
+ */
588
+ get_all_option_groups(): string[]
589
+ /**
590
+ * Returns a list of all languages supported by a layout, given by
591
+ * `layout_id`.
592
+ * @param layout_id a layout identifier
593
+ * @returns the list of ISO 639 code strings. The caller takes ownership of the #GList but not of the strings themselves, those are internally allocated and must not be modified.
594
+ */
595
+ get_languages_for_layout(layout_id: string | null): string[]
596
+ /**
597
+ * Retrieves information about a layout. Both `display_name` and
598
+ * `short_name` are suitable to show in UIs and might be localized if
599
+ * translations are available.
600
+ *
601
+ * Some layouts don't provide a short name (2 or 3 letters) or don't
602
+ * specify a XKB variant, in those cases `short_name` or `xkb_variant`
603
+ * are empty strings, i.e. "".
604
+ *
605
+ * If the given layout doesn't exist the return value is %FALSE and
606
+ * all the (out) parameters are set to %NULL.
607
+ * @param id layout's identifier about which to retrieve the info
608
+ * @returns %TRUE if the layout exists or %FALSE otherwise.
609
+ */
610
+ get_layout_info(id: string | null): [ /* returnType */ boolean, /* display_name */ string | null, /* short_name */ string | null, /* xkb_layout */ string | null, /* xkb_variant */ string | null ]
611
+ /**
612
+ * Returns a list of all layout identifiers we know about for
613
+ * `country_code`.
614
+ * @param country_code an ISO 3166 code string
615
+ * @returns the list of layout ids. The caller takes ownership of the #GList but not of the strings themselves, those are internally allocated and must not be modified.
616
+ */
617
+ get_layouts_for_country(country_code: string | null): string[]
618
+ /**
619
+ * Returns a list of all layout identifiers we know about for
620
+ * `language_code`.
621
+ * @param language_code an ISO 639 code string
622
+ * @returns the list of layout ids. The caller takes ownership of the #GList but not of the strings themselves, those are internally allocated and must not be modified.
623
+ */
624
+ get_layouts_for_language(language_code: string | null): string[]
625
+ /**
626
+ * Returns a list of all option identifiers we know about for group
627
+ * `group_id`.
628
+ * @param group_id group's identifier about which to retrieve the options
629
+ * @returns the list of option ids. The caller takes ownership of the #GList but not of the strings themselves, those are internally allocated and must not be modified.
630
+ */
631
+ get_options_for_group(group_id: string | null): string[]
632
+
633
+ // Own signals of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
634
+
635
+ connect(sigName: "layouts-changed", callback: XkbInfo.LayoutsChangedSignalCallback): number
636
+ connect_after(sigName: "layouts-changed", callback: XkbInfo.LayoutsChangedSignalCallback): number
637
+ emit(sigName: "layouts-changed", ...args: any[]): void
638
+
639
+ // Class property signals of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
640
+
641
+ connect(sigName: string, callback: (...args: any[]) => void): number
642
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
643
+ emit(sigName: string, ...args: any[]): void
644
+ disconnect(id: number): void
645
+ }
646
+
647
+ class XkbInfo extends GObject.Object {
648
+
649
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
650
+
651
+ static name: string
652
+ static $gtype: GObject.GType<XkbInfo>
653
+
654
+ // Constructors of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
655
+
656
+ constructor(config?: XkbInfo.ConstructorProperties)
657
+ constructor()
658
+ static new(): XkbInfo
659
+ _init(config?: XkbInfo.ConstructorProperties): void
660
+ }
661
+
662
+ interface DesktopThumbnailFactoryClass {
663
+
664
+ // Own fields of GnomeDesktop-4.0.GnomeDesktop.DesktopThumbnailFactoryClass
665
+
666
+ parent: GObject.ObjectClass
667
+ }
668
+
669
+ abstract class DesktopThumbnailFactoryClass {
670
+
671
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.DesktopThumbnailFactoryClass
672
+
673
+ static name: string
674
+ }
675
+
676
+ interface DesktopThumbnailFactoryPrivate {
677
+ }
678
+
679
+ class DesktopThumbnailFactoryPrivate {
680
+
681
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.DesktopThumbnailFactoryPrivate
682
+
683
+ static name: string
684
+ }
685
+
686
+ interface IdleMonitorClass {
687
+
688
+ // Own fields of GnomeDesktop-4.0.GnomeDesktop.IdleMonitorClass
689
+
690
+ parent_class: GObject.ObjectClass
691
+ }
692
+
693
+ abstract class IdleMonitorClass {
694
+
695
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.IdleMonitorClass
696
+
697
+ static name: string
698
+ }
699
+
700
+ interface IdleMonitorPrivate {
701
+ }
702
+
703
+ class IdleMonitorPrivate {
704
+
705
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.IdleMonitorPrivate
706
+
707
+ static name: string
708
+ }
709
+
710
+ interface PnpIdsClass {
711
+
712
+ // Own fields of GnomeDesktop-4.0.GnomeDesktop.PnpIdsClass
713
+
714
+ parent_class: GObject.ObjectClass
715
+ }
716
+
717
+ abstract class PnpIdsClass {
718
+
719
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.PnpIdsClass
720
+
721
+ static name: string
722
+ }
723
+
724
+ interface PnpIdsPrivate {
725
+ }
726
+
727
+ class PnpIdsPrivate {
728
+
729
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.PnpIdsPrivate
730
+
731
+ static name: string
732
+ }
733
+
734
+ interface WallClockClass {
735
+
736
+ // Own fields of GnomeDesktop-4.0.GnomeDesktop.WallClockClass
737
+
738
+ parent_class: GObject.ObjectClass
739
+ }
740
+
741
+ abstract class WallClockClass {
742
+
743
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.WallClockClass
744
+
745
+ static name: string
746
+ }
747
+
748
+ interface WallClockPrivate {
749
+ }
750
+
751
+ class WallClockPrivate {
752
+
753
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.WallClockPrivate
754
+
755
+ static name: string
756
+ }
757
+
758
+ interface XkbInfoClass {
759
+
760
+ // Own fields of GnomeDesktop-4.0.GnomeDesktop.XkbInfoClass
761
+
762
+ parent_class: GObject.ObjectClass
763
+ }
764
+
765
+ abstract class XkbInfoClass {
766
+
767
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.XkbInfoClass
768
+
769
+ static name: string
770
+ }
771
+
772
+ interface XkbInfoPrivate {
773
+ }
774
+
775
+ class XkbInfoPrivate {
776
+
777
+ // Own properties of GnomeDesktop-4.0.GnomeDesktop.XkbInfoPrivate
778
+
779
+ static name: string
780
+ }
781
+
782
+ /**
783
+ * Name of the imported GIR library
784
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
785
+ */
786
+ const __name__: string
787
+ /**
788
+ * Version of the imported GIR library
789
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
790
+ */
791
+ const __version__: string
792
+ }
793
+
794
+ export default GnomeDesktop;
795
+ // END