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