@girs/gnomedesktop-4.0 4.0.0-3.2.5 → 4.0.0-3.2.7
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 +1 -1
- package/gnomedesktop-4.0.d.cts +55 -33
- package/gnomedesktop-4.0.d.ts +55 -33
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
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.
|
|
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.7.
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
## Install
|
package/gnomedesktop-4.0.d.cts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
447
|
+
get_pnp_id(pnp_id: string): string | null
|
|
448
448
|
|
|
449
449
|
// Class property signals of GnomeDesktop-4.0.GnomeDesktop.PnpIds
|
|
450
450
|
|
|
@@ -500,6 +500,17 @@ export module WallClock {
|
|
|
500
500
|
* day of the week, irrespective of configuration.
|
|
501
501
|
*/
|
|
502
502
|
time_only?: boolean | null
|
|
503
|
+
/**
|
|
504
|
+
* If %TRUE, the formatted clock will always have seconds precision and the
|
|
505
|
+
* 'clock' property will always be updated every second, irrespective of
|
|
506
|
+
* system configuration.
|
|
507
|
+
*/
|
|
508
|
+
forceSeconds?: boolean | null
|
|
509
|
+
/**
|
|
510
|
+
* If %TRUE, the formatted clock will never include a date or the
|
|
511
|
+
* day of the week, irrespective of configuration.
|
|
512
|
+
*/
|
|
513
|
+
timeOnly?: boolean | null
|
|
503
514
|
}
|
|
504
515
|
|
|
505
516
|
}
|
|
@@ -518,11 +529,22 @@ export interface WallClock {
|
|
|
518
529
|
* system configuration.
|
|
519
530
|
*/
|
|
520
531
|
force_seconds: boolean
|
|
532
|
+
/**
|
|
533
|
+
* If %TRUE, the formatted clock will always have seconds precision and the
|
|
534
|
+
* 'clock' property will always be updated every second, irrespective of
|
|
535
|
+
* system configuration.
|
|
536
|
+
*/
|
|
537
|
+
forceSeconds: boolean
|
|
521
538
|
/**
|
|
522
539
|
* If %TRUE, the formatted clock will never include a date or the
|
|
523
540
|
* day of the week, irrespective of configuration.
|
|
524
541
|
*/
|
|
525
542
|
time_only: boolean
|
|
543
|
+
/**
|
|
544
|
+
* If %TRUE, the formatted clock will never include a date or the
|
|
545
|
+
* day of the week, irrespective of configuration.
|
|
546
|
+
*/
|
|
547
|
+
timeOnly: boolean
|
|
526
548
|
/**
|
|
527
549
|
* The timezone used for this clock
|
|
528
550
|
*/
|
|
@@ -540,7 +562,7 @@ export interface WallClock {
|
|
|
540
562
|
* according to the user settings.
|
|
541
563
|
* @returns the time of the clock as a string. This string points to internally allocated storage and must not be freed, modified or stored.
|
|
542
564
|
*/
|
|
543
|
-
get_clock(): string
|
|
565
|
+
get_clock(): string
|
|
544
566
|
/**
|
|
545
567
|
* Returns the current local time zone used by this clock.
|
|
546
568
|
* @returns the #GTimeZone of the clock.
|
|
@@ -621,8 +643,8 @@ export interface XkbInfo {
|
|
|
621
643
|
|
|
622
644
|
// Owm methods of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
|
|
623
645
|
|
|
624
|
-
description_for_group(group_id: string
|
|
625
|
-
description_for_option(group_id: string
|
|
646
|
+
description_for_group(group_id: string): string
|
|
647
|
+
description_for_option(group_id: string, id: string): string
|
|
626
648
|
/**
|
|
627
649
|
* Returns a list of all layout identifiers we know about.
|
|
628
650
|
* @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.
|
|
@@ -639,7 +661,7 @@ export interface XkbInfo {
|
|
|
639
661
|
* @param layout_id a layout identifier
|
|
640
662
|
* @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.
|
|
641
663
|
*/
|
|
642
|
-
get_languages_for_layout(layout_id: string
|
|
664
|
+
get_languages_for_layout(layout_id: string): string[]
|
|
643
665
|
/**
|
|
644
666
|
* Retrieves information about a layout. Both `display_name` and
|
|
645
667
|
* `short_name` are suitable to show in UIs and might be localized if
|
|
@@ -654,28 +676,28 @@ export interface XkbInfo {
|
|
|
654
676
|
* @param id layout's identifier about which to retrieve the info
|
|
655
677
|
* @returns %TRUE if the layout exists or %FALSE otherwise.
|
|
656
678
|
*/
|
|
657
|
-
get_layout_info(id: string
|
|
679
|
+
get_layout_info(id: string): [ /* returnType */ boolean, /* display_name */ string | null, /* short_name */ string | null, /* xkb_layout */ string | null, /* xkb_variant */ string | null ]
|
|
658
680
|
/**
|
|
659
681
|
* Returns a list of all layout identifiers we know about for
|
|
660
682
|
* `country_code`.
|
|
661
683
|
* @param country_code an ISO 3166 code string
|
|
662
684
|
* @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.
|
|
663
685
|
*/
|
|
664
|
-
get_layouts_for_country(country_code: string
|
|
686
|
+
get_layouts_for_country(country_code: string): string[]
|
|
665
687
|
/**
|
|
666
688
|
* Returns a list of all layout identifiers we know about for
|
|
667
689
|
* `language_code`.
|
|
668
690
|
* @param language_code an ISO 639 code string
|
|
669
691
|
* @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.
|
|
670
692
|
*/
|
|
671
|
-
get_layouts_for_language(language_code: string
|
|
693
|
+
get_layouts_for_language(language_code: string): string[]
|
|
672
694
|
/**
|
|
673
695
|
* Returns a list of all option identifiers we know about for group
|
|
674
696
|
* `group_id`.
|
|
675
697
|
* @param group_id group's identifier about which to retrieve the options
|
|
676
698
|
* @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.
|
|
677
699
|
*/
|
|
678
|
-
get_options_for_group(group_id: string
|
|
700
|
+
get_options_for_group(group_id: string): string[]
|
|
679
701
|
|
|
680
702
|
// Own signals of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
|
|
681
703
|
|
package/gnomedesktop-4.0.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
449
|
+
get_pnp_id(pnp_id: string): string | null
|
|
450
450
|
|
|
451
451
|
// Class property signals of GnomeDesktop-4.0.GnomeDesktop.PnpIds
|
|
452
452
|
|
|
@@ -502,6 +502,17 @@ module WallClock {
|
|
|
502
502
|
* day of the week, irrespective of configuration.
|
|
503
503
|
*/
|
|
504
504
|
time_only?: boolean | null
|
|
505
|
+
/**
|
|
506
|
+
* If %TRUE, the formatted clock will always have seconds precision and the
|
|
507
|
+
* 'clock' property will always be updated every second, irrespective of
|
|
508
|
+
* system configuration.
|
|
509
|
+
*/
|
|
510
|
+
forceSeconds?: boolean | null
|
|
511
|
+
/**
|
|
512
|
+
* If %TRUE, the formatted clock will never include a date or the
|
|
513
|
+
* day of the week, irrespective of configuration.
|
|
514
|
+
*/
|
|
515
|
+
timeOnly?: boolean | null
|
|
505
516
|
}
|
|
506
517
|
|
|
507
518
|
}
|
|
@@ -520,11 +531,22 @@ interface WallClock {
|
|
|
520
531
|
* system configuration.
|
|
521
532
|
*/
|
|
522
533
|
force_seconds: boolean
|
|
534
|
+
/**
|
|
535
|
+
* If %TRUE, the formatted clock will always have seconds precision and the
|
|
536
|
+
* 'clock' property will always be updated every second, irrespective of
|
|
537
|
+
* system configuration.
|
|
538
|
+
*/
|
|
539
|
+
forceSeconds: boolean
|
|
523
540
|
/**
|
|
524
541
|
* If %TRUE, the formatted clock will never include a date or the
|
|
525
542
|
* day of the week, irrespective of configuration.
|
|
526
543
|
*/
|
|
527
544
|
time_only: boolean
|
|
545
|
+
/**
|
|
546
|
+
* If %TRUE, the formatted clock will never include a date or the
|
|
547
|
+
* day of the week, irrespective of configuration.
|
|
548
|
+
*/
|
|
549
|
+
timeOnly: boolean
|
|
528
550
|
/**
|
|
529
551
|
* The timezone used for this clock
|
|
530
552
|
*/
|
|
@@ -542,7 +564,7 @@ interface WallClock {
|
|
|
542
564
|
* according to the user settings.
|
|
543
565
|
* @returns the time of the clock as a string. This string points to internally allocated storage and must not be freed, modified or stored.
|
|
544
566
|
*/
|
|
545
|
-
get_clock(): string
|
|
567
|
+
get_clock(): string
|
|
546
568
|
/**
|
|
547
569
|
* Returns the current local time zone used by this clock.
|
|
548
570
|
* @returns the #GTimeZone of the clock.
|
|
@@ -623,8 +645,8 @@ interface XkbInfo {
|
|
|
623
645
|
|
|
624
646
|
// Owm methods of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
|
|
625
647
|
|
|
626
|
-
description_for_group(group_id: string
|
|
627
|
-
description_for_option(group_id: string
|
|
648
|
+
description_for_group(group_id: string): string
|
|
649
|
+
description_for_option(group_id: string, id: string): string
|
|
628
650
|
/**
|
|
629
651
|
* Returns a list of all layout identifiers we know about.
|
|
630
652
|
* @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.
|
|
@@ -641,7 +663,7 @@ interface XkbInfo {
|
|
|
641
663
|
* @param layout_id a layout identifier
|
|
642
664
|
* @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.
|
|
643
665
|
*/
|
|
644
|
-
get_languages_for_layout(layout_id: string
|
|
666
|
+
get_languages_for_layout(layout_id: string): string[]
|
|
645
667
|
/**
|
|
646
668
|
* Retrieves information about a layout. Both `display_name` and
|
|
647
669
|
* `short_name` are suitable to show in UIs and might be localized if
|
|
@@ -656,28 +678,28 @@ interface XkbInfo {
|
|
|
656
678
|
* @param id layout's identifier about which to retrieve the info
|
|
657
679
|
* @returns %TRUE if the layout exists or %FALSE otherwise.
|
|
658
680
|
*/
|
|
659
|
-
get_layout_info(id: string
|
|
681
|
+
get_layout_info(id: string): [ /* returnType */ boolean, /* display_name */ string | null, /* short_name */ string | null, /* xkb_layout */ string | null, /* xkb_variant */ string | null ]
|
|
660
682
|
/**
|
|
661
683
|
* Returns a list of all layout identifiers we know about for
|
|
662
684
|
* `country_code`.
|
|
663
685
|
* @param country_code an ISO 3166 code string
|
|
664
686
|
* @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.
|
|
665
687
|
*/
|
|
666
|
-
get_layouts_for_country(country_code: string
|
|
688
|
+
get_layouts_for_country(country_code: string): string[]
|
|
667
689
|
/**
|
|
668
690
|
* Returns a list of all layout identifiers we know about for
|
|
669
691
|
* `language_code`.
|
|
670
692
|
* @param language_code an ISO 639 code string
|
|
671
693
|
* @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.
|
|
672
694
|
*/
|
|
673
|
-
get_layouts_for_language(language_code: string
|
|
695
|
+
get_layouts_for_language(language_code: string): string[]
|
|
674
696
|
/**
|
|
675
697
|
* Returns a list of all option identifiers we know about for group
|
|
676
698
|
* `group_id`.
|
|
677
699
|
* @param group_id group's identifier about which to retrieve the options
|
|
678
700
|
* @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.
|
|
679
701
|
*/
|
|
680
|
-
get_options_for_group(group_id: string
|
|
702
|
+
get_options_for_group(group_id: string): string[]
|
|
681
703
|
|
|
682
704
|
// Own signals of GnomeDesktop-4.0.GnomeDesktop.XkbInfo
|
|
683
705
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gnomedesktop-4.0",
|
|
3
|
-
"version": "4.0.0-3.2.
|
|
3
|
+
"version": "4.0.0-3.2.7",
|
|
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",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit gnomedesktop-4.0.d.cts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@girs/gdesktopenums-3.0": "^3.0.0-3.2.
|
|
29
|
-
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.
|
|
30
|
-
"@girs/gio-2.0": "^2.78.0-3.2.
|
|
31
|
-
"@girs/gjs": "^3.2.
|
|
32
|
-
"@girs/glib-2.0": "^2.78.0-3.2.
|
|
33
|
-
"@girs/gmodule-2.0": "^2.0.0-3.2.
|
|
34
|
-
"@girs/gobject-2.0": "^2.78.0-3.2.
|
|
28
|
+
"@girs/gdesktopenums-3.0": "^3.0.0-3.2.7",
|
|
29
|
+
"@girs/gdkpixbuf-2.0": "^2.0.0-3.2.7",
|
|
30
|
+
"@girs/gio-2.0": "^2.78.0-3.2.7",
|
|
31
|
+
"@girs/gjs": "^3.2.7",
|
|
32
|
+
"@girs/glib-2.0": "^2.78.0-3.2.7",
|
|
33
|
+
"@girs/gmodule-2.0": "^2.0.0-3.2.7",
|
|
34
|
+
"@girs/gobject-2.0": "^2.78.0-3.2.7"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "*"
|