@girs/gnomedesktop-4.0 4.0.0-3.2.6 → 4.0.0-3.2.8

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gnomedesktop-4.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for GnomeDesktop-4.0, generated from library version 4.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.6.
8
+ GJS TypeScript type definitions for GnomeDesktop-4.0, generated from library version 4.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.8.
9
9
 
10
10
 
11
11
  ## Install
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
@@ -34,7 +34,7 @@ export const DESKTOP_PLATFORM_VERSION: number
34
34
  * @param mtime the mtime
35
35
  * @returns TRUE if the thumbnail has the right @uri and @mtime
36
36
  */
37
- export function desktop_thumbnail_is_valid(pixbuf: GdkPixbuf.Pixbuf, uri: string | null, mtime: number): boolean
37
+ export function desktop_thumbnail_is_valid(pixbuf: GdkPixbuf.Pixbuf, uri: string, mtime: number): boolean
38
38
  /**
39
39
  * Returns the filename that a thumbnail of size `size` for `uri` would have.
40
40
  * This function is threadsafe and does no blocking I/O.
@@ -42,7 +42,7 @@ export function desktop_thumbnail_is_valid(pixbuf: GdkPixbuf.Pixbuf, uri: string
42
42
  * @param size a thumbnail size
43
43
  * @returns an absolute filename
44
44
  */
45
- export function desktop_thumbnail_path_for_uri(uri: string | null, size: DesktopThumbnailSize): string | null
45
+ export function desktop_thumbnail_path_for_uri(uri: string, size: DesktopThumbnailSize): string | null
46
46
  /**
47
47
  * Gets all locales.
48
48
  * @returns a newly allocated %NULL-terminated string array containing the all locales. Free with g_strfreev().
@@ -55,7 +55,7 @@ export function get_all_locales(): string[]
55
55
  * @param translation a locale string
56
56
  * @returns the country name. Caller takes ownership.
57
57
  */
58
- export function get_country_from_code(code: string | null, translation: string | null): string | null
58
+ export function get_country_from_code(code: string, translation: string | null): string | null
59
59
  /**
60
60
  * Gets the country description for `locale`. If `translation` is
61
61
  * provided the returned string is translated accordingly.
@@ -63,14 +63,14 @@ export function get_country_from_code(code: string | null, translation: string |
63
63
  * @param translation a locale string
64
64
  * @returns the country description. Caller takes ownership.
65
65
  */
66
- export function get_country_from_locale(locale: string | null, translation: string | null): string | null
66
+ export function get_country_from_locale(locale: string, translation: string | null): string | null
67
67
  /**
68
68
  * Gets the default input source's type and identifier for a given
69
69
  * locale.
70
70
  * @param locale a locale string
71
71
  * @returns %TRUE if a input source exists or %FALSE otherwise.
72
72
  */
73
- export function get_input_source_from_locale(locale: string | null): [ /* returnType */ boolean, /* type */ string | null, /* id */ string | null ]
73
+ export function get_input_source_from_locale(locale: string): [ /* returnType */ boolean, /* type */ string, /* id */ string ]
74
74
  /**
75
75
  * Gets the language name for `code`. If `translation` is provided the
76
76
  * returned string is translated accordingly.
@@ -78,7 +78,7 @@ export function get_input_source_from_locale(locale: string | null): [ /* return
78
78
  * @param translation a locale string
79
79
  * @returns the language name. Caller takes ownership.
80
80
  */
81
- export function get_language_from_code(code: string | null, translation: string | null): string | null
81
+ export function get_language_from_code(code: string, translation: string | null): string | null
82
82
  /**
83
83
  * Gets the language description for `locale`. If `translation` is
84
84
  * provided the returned string is translated accordingly.
@@ -86,7 +86,7 @@ export function get_language_from_code(code: string | null, translation: string
86
86
  * @param translation a locale string
87
87
  * @returns the language description. Caller takes ownership.
88
88
  */
89
- export function get_language_from_locale(locale: string | null, translation: string | null): string | null
89
+ export function get_language_from_locale(locale: string, translation: string | null): string | null
90
90
  /**
91
91
  * Returns an integer with the major version of GNOME. Useful for
92
92
  * dynamic languages like Javascript or Python (static languages like
@@ -103,20 +103,20 @@ export function get_platform_version(): number
103
103
  * @param translation a locale string
104
104
  * @returns the translated modifier string. Caller takes ownership.
105
105
  */
106
- export function get_translated_modifier(modifier: string | null, translation: string | null): string | null
106
+ export function get_translated_modifier(modifier: string, translation: string | null): string | null
107
107
  /**
108
108
  * Returns %TRUE if there are translations for language `code`.
109
109
  * @param code an ISO 639 code string
110
110
  * @returns %TRUE if there are translations for language @code.
111
111
  */
112
- export function language_has_translations(code: string | null): boolean
112
+ export function language_has_translations(code: string): boolean
113
113
  /**
114
114
  * Gets the normalized locale string in the form
115
115
  * [language[_country][.codeset][`modifier]`] for `name`.
116
116
  * @param locale a locale string
117
117
  * @returns normalized locale string. Caller takes ownership.
118
118
  */
119
- export function normalize_locale(locale: string | null): string | null
119
+ export function normalize_locale(locale: string): string | null
120
120
  /**
121
121
  * Extracts the various components of a locale string in XPG format.
122
122
  * ([language[_country][.codeset][`modifier]`]). See
@@ -124,7 +124,7 @@ export function normalize_locale(locale: string | null): string | null
124
124
  * @param locale a locale string
125
125
  * @returns %TRUE if parsing was successful.
126
126
  */
127
- export function parse_locale(locale: string | null): [ /* returnType */ boolean, /* language_codep */ string | null, /* country_codep */ string | null, /* codesetp */ string | null, /* modifierp */ string | null ]
127
+ export function parse_locale(locale: string): [ /* returnType */ boolean, /* language_codep */ string, /* country_codep */ string | null, /* codesetp */ string | null, /* modifierp */ string | null ]
128
128
  /**
129
129
  * If the current process is running inside a user systemd instance, then move
130
130
  * the launched PID into a transient scope. The given `name` will be used to
@@ -152,7 +152,7 @@ export function parse_locale(locale: string | null): [ /* returnType */ boolean,
152
152
  * @param cancellable #GCancellable to use
153
153
  * @param callback Callback to call when the operation is done
154
154
  */
155
- export 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
+ export function start_systemd_scope<Z = unknown>(name: string, pid: number, description: string | null, connection: Gio.DBusConnection | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<Z> | null): void
156
156
  /**
157
157
  * Finish an asynchronous operation to create a transient scope that was
158
158
  * started with gnome_start_systemd_scope().
@@ -194,7 +194,7 @@ export interface DesktopThumbnailFactory {
194
194
  * @param mtime the mtime of the file
195
195
  * @returns TRUE if the file can be thumbnailed.
196
196
  */
197
- can_thumbnail(uri: string | null, mime_type: string | null, mtime: number): boolean
197
+ can_thumbnail(uri: string, mime_type: string, mtime: number): boolean
198
198
  /**
199
199
  * Creates a failed thumbnail for the file so that we don't try
200
200
  * to re-thumbnail the file later.
@@ -205,7 +205,7 @@ export interface DesktopThumbnailFactory {
205
205
  * @param cancellable a GCancellable object, or NULL
206
206
  * @returns TRUE if everything went fine; FALSE if there was an error.
207
207
  */
208
- create_failed_thumbnail(uri: string | null, mtime: number, cancellable: Gio.Cancellable | null): boolean
208
+ create_failed_thumbnail(uri: string, mtime: number, cancellable: Gio.Cancellable | null): boolean
209
209
  /**
210
210
  * Asynchronous version of gnome_desktop_thumbnail_factory_create_failed_thumbnail()
211
211
  *
@@ -215,7 +215,7 @@ export interface DesktopThumbnailFactory {
215
215
  * @param cancellable a Cancellable object
216
216
  * @param callback a function that will be called when the task has ended
217
217
  */
218
- create_failed_thumbnail_async(uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
218
+ create_failed_thumbnail_async(uri: string, original_mtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
219
219
 
220
220
  // Overloads of create_failed_thumbnail_async
221
221
 
@@ -230,7 +230,7 @@ export interface DesktopThumbnailFactory {
230
230
  * @param cancellable a Cancellable object
231
231
  * @returns A Promise of: TRUE if the operation was correct; FALSE if there was an error Since 43.0
232
232
  */
233
- create_failed_thumbnail_async(uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
233
+ create_failed_thumbnail_async(uri: string, original_mtime: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
234
234
  create_failed_thumbnail_finish(result: Gio.AsyncResult): boolean
235
235
  /**
236
236
  * Tries to generate a thumbnail for the specified file. If it succeeds
@@ -242,7 +242,7 @@ export interface DesktopThumbnailFactory {
242
242
  * @param cancellable a #GCancellable object or NULL
243
243
  * @returns thumbnail pixbuf if thumbnailing succeeded, %NULL otherwise and error will be set
244
244
  */
245
- generate_thumbnail(uri: string | null, mime_type: string | null, cancellable: Gio.Cancellable | null): GdkPixbuf.Pixbuf
245
+ generate_thumbnail(uri: string, mime_type: string, cancellable: Gio.Cancellable | null): GdkPixbuf.Pixbuf
246
246
  /**
247
247
  * Asynchronous version of gnome_desktop_thumbnail_factory_generate_thumbnail()
248
248
  *
@@ -252,7 +252,7 @@ export interface DesktopThumbnailFactory {
252
252
  * @param cancellable a Cancellable object
253
253
  * @param callback a function that will be called when the task has ended
254
254
  */
255
- generate_thumbnail_async(uri: string | null, mime_type: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
255
+ generate_thumbnail_async(uri: string, mime_type: string, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
256
256
 
257
257
  // Overloads of generate_thumbnail_async
258
258
 
@@ -267,7 +267,7 @@ export interface DesktopThumbnailFactory {
267
267
  * @param cancellable a Cancellable object
268
268
  * @returns A Promise of: thumbnail pixbuf if thumbnailing succeeded, %NULL otherwise. Since 43.0
269
269
  */
270
- generate_thumbnail_async(uri: string | null, mime_type: string | null, cancellable: Gio.Cancellable | null): globalThis.Promise<GdkPixbuf.Pixbuf>
270
+ generate_thumbnail_async(uri: string, mime_type: string, cancellable: Gio.Cancellable | null): globalThis.Promise<GdkPixbuf.Pixbuf>
271
271
  generate_thumbnail_finish(result: Gio.AsyncResult): GdkPixbuf.Pixbuf
272
272
  /**
273
273
  * Tries to locate an failed thumbnail for the file specified. Writing
@@ -279,7 +279,7 @@ export interface DesktopThumbnailFactory {
279
279
  * @param mtime the mtime of the file
280
280
  * @returns TRUE if there is a failed thumbnail for the file.
281
281
  */
282
- has_valid_failed_thumbnail(uri: string | null, mtime: number): boolean
282
+ has_valid_failed_thumbnail(uri: string, mtime: number): boolean
283
283
  /**
284
284
  * Tries to locate an existing thumbnail for the file specified.
285
285
  *
@@ -288,7 +288,7 @@ export interface DesktopThumbnailFactory {
288
288
  * @param mtime the mtime of the file
289
289
  * @returns The absolute path of the thumbnail, or %NULL if none exist.
290
290
  */
291
- lookup(uri: string | null, mtime: number): string | null
291
+ lookup(uri: string, mtime: number): string | null
292
292
  /**
293
293
  * Saves `thumbnail` at the right place. If the save fails a
294
294
  * failed thumbnail is written.
@@ -300,7 +300,7 @@ export interface DesktopThumbnailFactory {
300
300
  * @param cancellable a GCancellable object, or NULL
301
301
  * @returns TRUE if everything went fine; FALSE if there was an error.
302
302
  */
303
- save_thumbnail(thumbnail: GdkPixbuf.Pixbuf, uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null): boolean
303
+ save_thumbnail(thumbnail: GdkPixbuf.Pixbuf, uri: string, original_mtime: number, cancellable: Gio.Cancellable | null): boolean
304
304
  /**
305
305
  * Asynchronous version of gnome_desktop_thumbnail_factory_save_thumbnail()
306
306
  *
@@ -311,7 +311,7 @@ export interface DesktopThumbnailFactory {
311
311
  * @param cancellable a Cancellable object
312
312
  * @param callback a function that will be called when the task has ended
313
313
  */
314
- save_thumbnail_async(thumbnail: GdkPixbuf.Pixbuf, uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
314
+ save_thumbnail_async(thumbnail: GdkPixbuf.Pixbuf, uri: string, original_mtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
315
315
 
316
316
  // Overloads of save_thumbnail_async
317
317
 
@@ -327,7 +327,7 @@ export interface DesktopThumbnailFactory {
327
327
  * @param cancellable a Cancellable object
328
328
  * @returns A Promise of: TRUE if the operation was correct; FALSE if there was an error Since 43.0
329
329
  */
330
- save_thumbnail_async(thumbnail: GdkPixbuf.Pixbuf, uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
330
+ save_thumbnail_async(thumbnail: GdkPixbuf.Pixbuf, uri: string, original_mtime: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
331
331
  save_thumbnail_finish(result: Gio.AsyncResult): boolean
332
332
 
333
333
  // Class property signals of GnomeDesktop-4.0.GnomeDesktop.DesktopThumbnailFactory
@@ -444,7 +444,7 @@ export interface PnpIds {
444
444
  * @param pnp_id the PNP ID to look for
445
445
  * @returns a new string representing the manufacturer name, or %NULL when not found.
446
446
  */
447
- get_pnp_id(pnp_id: string | null): string | null
447
+ get_pnp_id(pnp_id: string): string | null
448
448
 
449
449
  // Class property signals of GnomeDesktop-4.0.GnomeDesktop.PnpIds
450
450
 
@@ -489,17 +489,6 @@ export module WallClock {
489
489
 
490
490
  // Own constructor properties of GnomeDesktop-4.0.GnomeDesktop.WallClock
491
491
 
492
- /**
493
- * If %TRUE, the formatted clock will always have seconds precision and the
494
- * 'clock' property will always be updated every second, irrespective of
495
- * system configuration.
496
- */
497
- force_seconds?: boolean | null
498
- /**
499
- * If %TRUE, the formatted clock will never include a date or the
500
- * day of the week, irrespective of configuration.
501
- */
502
- time_only?: boolean | null
503
492
  /**
504
493
  * If %TRUE, the formatted clock will always have seconds precision and the
505
494
  * 'clock' property will always be updated every second, irrespective of
@@ -523,23 +512,12 @@ export interface WallClock {
523
512
  * A formatted string representing the current clock display.
524
513
  */
525
514
  readonly clock: string | null
526
- /**
527
- * If %TRUE, the formatted clock will always have seconds precision and the
528
- * 'clock' property will always be updated every second, irrespective of
529
- * system configuration.
530
- */
531
- force_seconds: boolean
532
515
  /**
533
516
  * If %TRUE, the formatted clock will always have seconds precision and the
534
517
  * 'clock' property will always be updated every second, irrespective of
535
518
  * system configuration.
536
519
  */
537
520
  forceSeconds: boolean
538
- /**
539
- * If %TRUE, the formatted clock will never include a date or the
540
- * day of the week, irrespective of configuration.
541
- */
542
- time_only: boolean
543
521
  /**
544
522
  * If %TRUE, the formatted clock will never include a date or the
545
523
  * day of the week, irrespective of configuration.
@@ -562,7 +540,7 @@ export interface WallClock {
562
540
  * according to the user settings.
563
541
  * @returns the time of the clock as a string. This string points to internally allocated storage and must not be freed, modified or stored.
564
542
  */
565
- get_clock(): string | null
543
+ get_clock(): string
566
544
  /**
567
545
  * Returns the current local time zone used by this clock.
568
546
  * @returns the #GTimeZone of the clock.
@@ -643,8 +621,8 @@ export interface XkbInfo {
643
621
 
644
622
  // Owm methods of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
645
623
 
646
- description_for_group(group_id: string | null): string | null
647
- description_for_option(group_id: string | null, id: string | null): string | null
624
+ description_for_group(group_id: string): string
625
+ description_for_option(group_id: string, id: string): string
648
626
  /**
649
627
  * Returns a list of all layout identifiers we know about.
650
628
  * @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.
@@ -661,7 +639,7 @@ export interface XkbInfo {
661
639
  * @param layout_id a layout identifier
662
640
  * @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.
663
641
  */
664
- get_languages_for_layout(layout_id: string | null): string[]
642
+ get_languages_for_layout(layout_id: string): string[]
665
643
  /**
666
644
  * Retrieves information about a layout. Both `display_name` and
667
645
  * `short_name` are suitable to show in UIs and might be localized if
@@ -676,28 +654,28 @@ export interface XkbInfo {
676
654
  * @param id layout's identifier about which to retrieve the info
677
655
  * @returns %TRUE if the layout exists or %FALSE otherwise.
678
656
  */
679
- get_layout_info(id: string | null): [ /* returnType */ boolean, /* display_name */ string | null, /* short_name */ string | null, /* xkb_layout */ string | null, /* xkb_variant */ string | null ]
657
+ get_layout_info(id: string): [ /* returnType */ boolean, /* display_name */ string | null, /* short_name */ string | null, /* xkb_layout */ string | null, /* xkb_variant */ string | null ]
680
658
  /**
681
659
  * Returns a list of all layout identifiers we know about for
682
660
  * `country_code`.
683
661
  * @param country_code an ISO 3166 code string
684
662
  * @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.
685
663
  */
686
- get_layouts_for_country(country_code: string | null): string[]
664
+ get_layouts_for_country(country_code: string): string[]
687
665
  /**
688
666
  * Returns a list of all layout identifiers we know about for
689
667
  * `language_code`.
690
668
  * @param language_code an ISO 639 code string
691
669
  * @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.
692
670
  */
693
- get_layouts_for_language(language_code: string | null): string[]
671
+ get_layouts_for_language(language_code: string): string[]
694
672
  /**
695
673
  * Returns a list of all option identifiers we know about for group
696
674
  * `group_id`.
697
675
  * @param group_id group's identifier about which to retrieve the options
698
676
  * @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.
699
677
  */
700
- get_options_for_group(group_id: string | null): string[]
678
+ get_options_for_group(group_id: string): string[]
701
679
 
702
680
  // Own signals of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
703
681
 
@@ -36,7 +36,7 @@ const DESKTOP_PLATFORM_VERSION: number
36
36
  * @param mtime the mtime
37
37
  * @returns TRUE if the thumbnail has the right @uri and @mtime
38
38
  */
39
- function desktop_thumbnail_is_valid(pixbuf: GdkPixbuf.Pixbuf, uri: string | null, mtime: number): boolean
39
+ function desktop_thumbnail_is_valid(pixbuf: GdkPixbuf.Pixbuf, uri: string, mtime: number): boolean
40
40
  /**
41
41
  * Returns the filename that a thumbnail of size `size` for `uri` would have.
42
42
  * This function is threadsafe and does no blocking I/O.
@@ -44,7 +44,7 @@ function desktop_thumbnail_is_valid(pixbuf: GdkPixbuf.Pixbuf, uri: string | null
44
44
  * @param size a thumbnail size
45
45
  * @returns an absolute filename
46
46
  */
47
- function desktop_thumbnail_path_for_uri(uri: string | null, size: DesktopThumbnailSize): string | null
47
+ function desktop_thumbnail_path_for_uri(uri: string, size: DesktopThumbnailSize): string | null
48
48
  /**
49
49
  * Gets all locales.
50
50
  * @returns a newly allocated %NULL-terminated string array containing the all locales. Free with g_strfreev().
@@ -57,7 +57,7 @@ function get_all_locales(): string[]
57
57
  * @param translation a locale string
58
58
  * @returns the country name. Caller takes ownership.
59
59
  */
60
- function get_country_from_code(code: string | null, translation: string | null): string | null
60
+ function get_country_from_code(code: string, translation: string | null): string | null
61
61
  /**
62
62
  * Gets the country description for `locale`. If `translation` is
63
63
  * provided the returned string is translated accordingly.
@@ -65,14 +65,14 @@ function get_country_from_code(code: string | null, translation: string | null):
65
65
  * @param translation a locale string
66
66
  * @returns the country description. Caller takes ownership.
67
67
  */
68
- function get_country_from_locale(locale: string | null, translation: string | null): string | null
68
+ function get_country_from_locale(locale: string, translation: string | null): string | null
69
69
  /**
70
70
  * Gets the default input source's type and identifier for a given
71
71
  * locale.
72
72
  * @param locale a locale string
73
73
  * @returns %TRUE if a input source exists or %FALSE otherwise.
74
74
  */
75
- function get_input_source_from_locale(locale: string | null): [ /* returnType */ boolean, /* type */ string | null, /* id */ string | null ]
75
+ function get_input_source_from_locale(locale: string): [ /* returnType */ boolean, /* type */ string, /* id */ string ]
76
76
  /**
77
77
  * Gets the language name for `code`. If `translation` is provided the
78
78
  * returned string is translated accordingly.
@@ -80,7 +80,7 @@ function get_input_source_from_locale(locale: string | null): [ /* returnType */
80
80
  * @param translation a locale string
81
81
  * @returns the language name. Caller takes ownership.
82
82
  */
83
- function get_language_from_code(code: string | null, translation: string | null): string | null
83
+ function get_language_from_code(code: string, translation: string | null): string | null
84
84
  /**
85
85
  * Gets the language description for `locale`. If `translation` is
86
86
  * provided the returned string is translated accordingly.
@@ -88,7 +88,7 @@ function get_language_from_code(code: string | null, translation: string | null)
88
88
  * @param translation a locale string
89
89
  * @returns the language description. Caller takes ownership.
90
90
  */
91
- function get_language_from_locale(locale: string | null, translation: string | null): string | null
91
+ function get_language_from_locale(locale: string, translation: string | null): string | null
92
92
  /**
93
93
  * Returns an integer with the major version of GNOME. Useful for
94
94
  * dynamic languages like Javascript or Python (static languages like
@@ -105,20 +105,20 @@ function get_platform_version(): number
105
105
  * @param translation a locale string
106
106
  * @returns the translated modifier string. Caller takes ownership.
107
107
  */
108
- function get_translated_modifier(modifier: string | null, translation: string | null): string | null
108
+ function get_translated_modifier(modifier: string, translation: string | null): string | null
109
109
  /**
110
110
  * Returns %TRUE if there are translations for language `code`.
111
111
  * @param code an ISO 639 code string
112
112
  * @returns %TRUE if there are translations for language @code.
113
113
  */
114
- function language_has_translations(code: string | null): boolean
114
+ function language_has_translations(code: string): boolean
115
115
  /**
116
116
  * Gets the normalized locale string in the form
117
117
  * [language[_country][.codeset][`modifier]`] for `name`.
118
118
  * @param locale a locale string
119
119
  * @returns normalized locale string. Caller takes ownership.
120
120
  */
121
- function normalize_locale(locale: string | null): string | null
121
+ function normalize_locale(locale: string): string | null
122
122
  /**
123
123
  * Extracts the various components of a locale string in XPG format.
124
124
  * ([language[_country][.codeset][`modifier]`]). See
@@ -126,7 +126,7 @@ function normalize_locale(locale: string | null): string | null
126
126
  * @param locale a locale string
127
127
  * @returns %TRUE if parsing was successful.
128
128
  */
129
- function parse_locale(locale: string | null): [ /* returnType */ boolean, /* language_codep */ string | null, /* country_codep */ string | null, /* codesetp */ string | null, /* modifierp */ string | null ]
129
+ function parse_locale(locale: string): [ /* returnType */ boolean, /* language_codep */ string, /* country_codep */ string | null, /* codesetp */ string | null, /* modifierp */ string | null ]
130
130
  /**
131
131
  * If the current process is running inside a user systemd instance, then move
132
132
  * the launched PID into a transient scope. The given `name` will be used to
@@ -154,7 +154,7 @@ function parse_locale(locale: string | null): [ /* returnType */ boolean, /* lan
154
154
  * @param cancellable #GCancellable to use
155
155
  * @param callback Callback to call when the operation is done
156
156
  */
157
- 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
157
+ function start_systemd_scope<Z = unknown>(name: string, pid: number, description: string | null, connection: Gio.DBusConnection | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<Z> | null): void
158
158
  /**
159
159
  * Finish an asynchronous operation to create a transient scope that was
160
160
  * started with gnome_start_systemd_scope().
@@ -196,7 +196,7 @@ interface DesktopThumbnailFactory {
196
196
  * @param mtime the mtime of the file
197
197
  * @returns TRUE if the file can be thumbnailed.
198
198
  */
199
- can_thumbnail(uri: string | null, mime_type: string | null, mtime: number): boolean
199
+ can_thumbnail(uri: string, mime_type: string, mtime: number): boolean
200
200
  /**
201
201
  * Creates a failed thumbnail for the file so that we don't try
202
202
  * to re-thumbnail the file later.
@@ -207,7 +207,7 @@ interface DesktopThumbnailFactory {
207
207
  * @param cancellable a GCancellable object, or NULL
208
208
  * @returns TRUE if everything went fine; FALSE if there was an error.
209
209
  */
210
- create_failed_thumbnail(uri: string | null, mtime: number, cancellable: Gio.Cancellable | null): boolean
210
+ create_failed_thumbnail(uri: string, mtime: number, cancellable: Gio.Cancellable | null): boolean
211
211
  /**
212
212
  * Asynchronous version of gnome_desktop_thumbnail_factory_create_failed_thumbnail()
213
213
  *
@@ -217,7 +217,7 @@ interface DesktopThumbnailFactory {
217
217
  * @param cancellable a Cancellable object
218
218
  * @param callback a function that will be called when the task has ended
219
219
  */
220
- create_failed_thumbnail_async(uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
220
+ create_failed_thumbnail_async(uri: string, original_mtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
221
221
 
222
222
  // Overloads of create_failed_thumbnail_async
223
223
 
@@ -232,7 +232,7 @@ interface DesktopThumbnailFactory {
232
232
  * @param cancellable a Cancellable object
233
233
  * @returns A Promise of: TRUE if the operation was correct; FALSE if there was an error Since 43.0
234
234
  */
235
- create_failed_thumbnail_async(uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
235
+ create_failed_thumbnail_async(uri: string, original_mtime: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
236
236
  create_failed_thumbnail_finish(result: Gio.AsyncResult): boolean
237
237
  /**
238
238
  * Tries to generate a thumbnail for the specified file. If it succeeds
@@ -244,7 +244,7 @@ interface DesktopThumbnailFactory {
244
244
  * @param cancellable a #GCancellable object or NULL
245
245
  * @returns thumbnail pixbuf if thumbnailing succeeded, %NULL otherwise and error will be set
246
246
  */
247
- generate_thumbnail(uri: string | null, mime_type: string | null, cancellable: Gio.Cancellable | null): GdkPixbuf.Pixbuf
247
+ generate_thumbnail(uri: string, mime_type: string, cancellable: Gio.Cancellable | null): GdkPixbuf.Pixbuf
248
248
  /**
249
249
  * Asynchronous version of gnome_desktop_thumbnail_factory_generate_thumbnail()
250
250
  *
@@ -254,7 +254,7 @@ interface DesktopThumbnailFactory {
254
254
  * @param cancellable a Cancellable object
255
255
  * @param callback a function that will be called when the task has ended
256
256
  */
257
- generate_thumbnail_async(uri: string | null, mime_type: string | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
257
+ generate_thumbnail_async(uri: string, mime_type: string, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
258
258
 
259
259
  // Overloads of generate_thumbnail_async
260
260
 
@@ -269,7 +269,7 @@ interface DesktopThumbnailFactory {
269
269
  * @param cancellable a Cancellable object
270
270
  * @returns A Promise of: thumbnail pixbuf if thumbnailing succeeded, %NULL otherwise. Since 43.0
271
271
  */
272
- generate_thumbnail_async(uri: string | null, mime_type: string | null, cancellable: Gio.Cancellable | null): globalThis.Promise<GdkPixbuf.Pixbuf>
272
+ generate_thumbnail_async(uri: string, mime_type: string, cancellable: Gio.Cancellable | null): globalThis.Promise<GdkPixbuf.Pixbuf>
273
273
  generate_thumbnail_finish(result: Gio.AsyncResult): GdkPixbuf.Pixbuf
274
274
  /**
275
275
  * Tries to locate an failed thumbnail for the file specified. Writing
@@ -281,7 +281,7 @@ interface DesktopThumbnailFactory {
281
281
  * @param mtime the mtime of the file
282
282
  * @returns TRUE if there is a failed thumbnail for the file.
283
283
  */
284
- has_valid_failed_thumbnail(uri: string | null, mtime: number): boolean
284
+ has_valid_failed_thumbnail(uri: string, mtime: number): boolean
285
285
  /**
286
286
  * Tries to locate an existing thumbnail for the file specified.
287
287
  *
@@ -290,7 +290,7 @@ interface DesktopThumbnailFactory {
290
290
  * @param mtime the mtime of the file
291
291
  * @returns The absolute path of the thumbnail, or %NULL if none exist.
292
292
  */
293
- lookup(uri: string | null, mtime: number): string | null
293
+ lookup(uri: string, mtime: number): string | null
294
294
  /**
295
295
  * Saves `thumbnail` at the right place. If the save fails a
296
296
  * failed thumbnail is written.
@@ -302,7 +302,7 @@ interface DesktopThumbnailFactory {
302
302
  * @param cancellable a GCancellable object, or NULL
303
303
  * @returns TRUE if everything went fine; FALSE if there was an error.
304
304
  */
305
- save_thumbnail(thumbnail: GdkPixbuf.Pixbuf, uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null): boolean
305
+ save_thumbnail(thumbnail: GdkPixbuf.Pixbuf, uri: string, original_mtime: number, cancellable: Gio.Cancellable | null): boolean
306
306
  /**
307
307
  * Asynchronous version of gnome_desktop_thumbnail_factory_save_thumbnail()
308
308
  *
@@ -313,7 +313,7 @@ interface DesktopThumbnailFactory {
313
313
  * @param cancellable a Cancellable object
314
314
  * @param callback a function that will be called when the task has ended
315
315
  */
316
- save_thumbnail_async(thumbnail: GdkPixbuf.Pixbuf, uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
316
+ save_thumbnail_async(thumbnail: GdkPixbuf.Pixbuf, uri: string, original_mtime: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
317
317
 
318
318
  // Overloads of save_thumbnail_async
319
319
 
@@ -329,7 +329,7 @@ interface DesktopThumbnailFactory {
329
329
  * @param cancellable a Cancellable object
330
330
  * @returns A Promise of: TRUE if the operation was correct; FALSE if there was an error Since 43.0
331
331
  */
332
- save_thumbnail_async(thumbnail: GdkPixbuf.Pixbuf, uri: string | null, original_mtime: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
332
+ save_thumbnail_async(thumbnail: GdkPixbuf.Pixbuf, uri: string, original_mtime: number, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
333
333
  save_thumbnail_finish(result: Gio.AsyncResult): boolean
334
334
 
335
335
  // Class property signals of GnomeDesktop-4.0.GnomeDesktop.DesktopThumbnailFactory
@@ -446,7 +446,7 @@ interface PnpIds {
446
446
  * @param pnp_id the PNP ID to look for
447
447
  * @returns a new string representing the manufacturer name, or %NULL when not found.
448
448
  */
449
- get_pnp_id(pnp_id: string | null): string | null
449
+ get_pnp_id(pnp_id: string): string | null
450
450
 
451
451
  // Class property signals of GnomeDesktop-4.0.GnomeDesktop.PnpIds
452
452
 
@@ -491,17 +491,6 @@ module WallClock {
491
491
 
492
492
  // Own constructor properties of GnomeDesktop-4.0.GnomeDesktop.WallClock
493
493
 
494
- /**
495
- * If %TRUE, the formatted clock will always have seconds precision and the
496
- * 'clock' property will always be updated every second, irrespective of
497
- * system configuration.
498
- */
499
- force_seconds?: boolean | null
500
- /**
501
- * If %TRUE, the formatted clock will never include a date or the
502
- * day of the week, irrespective of configuration.
503
- */
504
- time_only?: boolean | null
505
494
  /**
506
495
  * If %TRUE, the formatted clock will always have seconds precision and the
507
496
  * 'clock' property will always be updated every second, irrespective of
@@ -525,23 +514,12 @@ interface WallClock {
525
514
  * A formatted string representing the current clock display.
526
515
  */
527
516
  readonly clock: string | null
528
- /**
529
- * If %TRUE, the formatted clock will always have seconds precision and the
530
- * 'clock' property will always be updated every second, irrespective of
531
- * system configuration.
532
- */
533
- force_seconds: boolean
534
517
  /**
535
518
  * If %TRUE, the formatted clock will always have seconds precision and the
536
519
  * 'clock' property will always be updated every second, irrespective of
537
520
  * system configuration.
538
521
  */
539
522
  forceSeconds: boolean
540
- /**
541
- * If %TRUE, the formatted clock will never include a date or the
542
- * day of the week, irrespective of configuration.
543
- */
544
- time_only: boolean
545
523
  /**
546
524
  * If %TRUE, the formatted clock will never include a date or the
547
525
  * day of the week, irrespective of configuration.
@@ -564,7 +542,7 @@ interface WallClock {
564
542
  * according to the user settings.
565
543
  * @returns the time of the clock as a string. This string points to internally allocated storage and must not be freed, modified or stored.
566
544
  */
567
- get_clock(): string | null
545
+ get_clock(): string
568
546
  /**
569
547
  * Returns the current local time zone used by this clock.
570
548
  * @returns the #GTimeZone of the clock.
@@ -645,8 +623,8 @@ interface XkbInfo {
645
623
 
646
624
  // Owm methods of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
647
625
 
648
- description_for_group(group_id: string | null): string | null
649
- description_for_option(group_id: string | null, id: string | null): string | null
626
+ description_for_group(group_id: string): string
627
+ description_for_option(group_id: string, id: string): string
650
628
  /**
651
629
  * Returns a list of all layout identifiers we know about.
652
630
  * @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.
@@ -663,7 +641,7 @@ interface XkbInfo {
663
641
  * @param layout_id a layout identifier
664
642
  * @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.
665
643
  */
666
- get_languages_for_layout(layout_id: string | null): string[]
644
+ get_languages_for_layout(layout_id: string): string[]
667
645
  /**
668
646
  * Retrieves information about a layout. Both `display_name` and
669
647
  * `short_name` are suitable to show in UIs and might be localized if
@@ -678,28 +656,28 @@ interface XkbInfo {
678
656
  * @param id layout's identifier about which to retrieve the info
679
657
  * @returns %TRUE if the layout exists or %FALSE otherwise.
680
658
  */
681
- get_layout_info(id: string | null): [ /* returnType */ boolean, /* display_name */ string | null, /* short_name */ string | null, /* xkb_layout */ string | null, /* xkb_variant */ string | null ]
659
+ get_layout_info(id: string): [ /* returnType */ boolean, /* display_name */ string | null, /* short_name */ string | null, /* xkb_layout */ string | null, /* xkb_variant */ string | null ]
682
660
  /**
683
661
  * Returns a list of all layout identifiers we know about for
684
662
  * `country_code`.
685
663
  * @param country_code an ISO 3166 code string
686
664
  * @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.
687
665
  */
688
- get_layouts_for_country(country_code: string | null): string[]
666
+ get_layouts_for_country(country_code: string): string[]
689
667
  /**
690
668
  * Returns a list of all layout identifiers we know about for
691
669
  * `language_code`.
692
670
  * @param language_code an ISO 639 code string
693
671
  * @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.
694
672
  */
695
- get_layouts_for_language(language_code: string | null): string[]
673
+ get_layouts_for_language(language_code: string): string[]
696
674
  /**
697
675
  * Returns a list of all option identifiers we know about for group
698
676
  * `group_id`.
699
677
  * @param group_id group's identifier about which to retrieve the options
700
678
  * @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.
701
679
  */
702
- get_options_for_group(group_id: string | null): string[]
680
+ get_options_for_group(group_id: string): string[]
703
681
 
704
682
  // Own signals of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
705
683
 
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "@girs/gnomedesktop-4.0",
3
- "version": "4.0.0-3.2.6",
3
+ "version": "4.0.0-3.2.8",
4
4
  "description": "GJS TypeScript type definitions for GnomeDesktop-4.0, generated from library version 4.0.0",
5
5
  "type": "module",
6
6
  "module": "gnomedesktop-4.0.js",
7
7
  "main": "gnomedesktop-4.0.js",
8
8
  "exports": {
9
- "./ambient": "./gnomedesktop-4.0-ambient.d.ts",
10
- "./import": "./gnomedesktop-4.0-import.d.ts",
9
+ "./ambient": {
10
+ "types": "./gnomedesktop-4.0-ambient.d.ts",
11
+ "default": "./gnomedesktop-4.0-ambient.js"
12
+ },
13
+ "./import": {
14
+ "types": "./gnomedesktop-4.0-import.d.ts",
15
+ "default": "./gnomedesktop-4.0-import.js"
16
+ },
11
17
  ".": {
12
18
  "import": {
13
19
  "types": "./gnomedesktop-4.0.d.ts",
@@ -25,13 +31,13 @@
25
31
  "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gnomedesktop-4.0.d.cts"
26
32
  },
27
33
  "dependencies": {
28
- "@girs/gdesktopenums-3.0": "^3.0.0-3.2.6",
29
- "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.6",
30
- "@girs/gio-2.0": "^2.78.0-3.2.6",
31
- "@girs/gjs": "^3.2.6",
32
- "@girs/glib-2.0": "^2.78.0-3.2.6",
33
- "@girs/gmodule-2.0": "^2.0.0-3.2.6",
34
- "@girs/gobject-2.0": "^2.78.0-3.2.6"
34
+ "@girs/gdesktopenums-3.0": "^3.0.0-3.2.8",
35
+ "@girs/gdkpixbuf-2.0": "^2.0.0-3.2.8",
36
+ "@girs/gio-2.0": "^2.77.0-3.2.8",
37
+ "@girs/gjs": "^3.2.8",
38
+ "@girs/glib-2.0": "^2.77.0-3.2.8",
39
+ "@girs/gmodule-2.0": "^2.0.0-3.2.8",
40
+ "@girs/gobject-2.0": "^2.77.0-3.2.8"
35
41
  },
36
42
  "devDependencies": {
37
43
  "typescript": "*"
@@ -48,7 +54,7 @@
48
54
  "license": "MIT",
49
55
  "repository": {
50
56
  "type": "git",
51
- "url": "git+https://github.com/gjsify/types.git"
57
+ "url": "git+https://github.com/gjsify/ts-for-gir.git"
52
58
  },
53
59
  "bugs": {
54
60
  "url": "https://github.com/gjsify/ts-for-gir/issues"