@girs/giounix-2.0 2.0.0-3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1511 @@
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-gir
7
+ */
8
+
9
+ import './giounix-2.0-ambient.d.ts';
10
+ import './giounix-2.0-import.d.ts';
11
+ /**
12
+ * GioUnix-2.0
13
+ */
14
+
15
+ import type GObject from '@girs/gobject-2.0';
16
+
17
+ /**
18
+ * Extension point for default handler to URI association. See
19
+ * [Extending GIO][extending-gio].
20
+ */
21
+ export const DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME: string
22
+ /**
23
+ * Gets the default application for launching applications
24
+ * using this URI scheme for a particular #GDesktopAppInfoLookup
25
+ * implementation.
26
+ *
27
+ * The #GDesktopAppInfoLookup interface and this function is used
28
+ * to implement g_app_info_get_default_for_uri_scheme() backends
29
+ * in a GIO module. There is no reason for applications to use it
30
+ * directly. Applications should use g_app_info_get_default_for_uri_scheme().
31
+ * @param lookup a #GDesktopAppInfoLookup
32
+ * @param uri_scheme a string containing a URI scheme.
33
+ * @returns #GAppInfo for given @uri_scheme or %NULL on error.
34
+ */
35
+ export function desktop_app_info_lookup_get_default_for_uri_scheme(lookup: any, uri_scheme: string): any | null
36
+ /**
37
+ * Gets the underlying file descriptor.
38
+ * @param fd_based a #GFileDescriptorBased.
39
+ * @returns The file descriptor
40
+ */
41
+ export function file_descriptor_based_get_fd(fd_based: any): number
42
+ /**
43
+ * Determines if `mount_path` is considered an implementation of the
44
+ * OS. This is primarily used for hiding mountable and mounted volumes
45
+ * that only are used in the OS and has little to no relevance to the
46
+ * casual user.
47
+ * @param mount_path a mount path, e.g. `/media/disk` or `/usr`
48
+ * @returns %TRUE if @mount_path is considered an implementation detail of the OS.
49
+ */
50
+ export function is_mount_path_system_internal(mount_path: string): boolean
51
+ /**
52
+ * Determines if `device_path` is considered a block device path which is only
53
+ * used in implementation of the OS. This is primarily used for hiding
54
+ * mounted volumes that are intended as APIs for programs to read, and system
55
+ * administrators at a shell; rather than something that should, for example,
56
+ * appear in a GUI. For example, the Linux `/proc` filesystem.
57
+ *
58
+ * The list of device paths considered ‘system’ ones may change over time.
59
+ * @param device_path a device path, e.g. `/dev/loop0` or `nfsd`
60
+ * @returns %TRUE if @device_path is considered an implementation detail of the OS.
61
+ */
62
+ export function is_system_device_path(device_path: string): boolean
63
+ /**
64
+ * Determines if `fs_type` is considered a type of file system which is only
65
+ * used in implementation of the OS. This is primarily used for hiding
66
+ * mounted volumes that are intended as APIs for programs to read, and system
67
+ * administrators at a shell; rather than something that should, for example,
68
+ * appear in a GUI. For example, the Linux `/proc` filesystem.
69
+ *
70
+ * The list of file system types considered ‘system’ ones may change over time.
71
+ * @param fs_type a file system type, e.g. `procfs` or `tmpfs`
72
+ * @returns %TRUE if @fs_type is considered an implementation detail of the OS.
73
+ */
74
+ export function is_system_fs_type(fs_type: string): boolean
75
+ /**
76
+ * Gets a #GUnixMountEntry for a given mount path. If `time_read`
77
+ * is set, it will be filled with a unix timestamp for checking
78
+ * if the mounts have changed since with g_unix_mounts_changed_since().
79
+ *
80
+ * If more mounts have the same mount path, the last matching mount
81
+ * is returned.
82
+ *
83
+ * This will return %NULL if there is no mount point at `mount_path`.
84
+ * @param mount_path path for a possible unix mount.
85
+ * @returns a #GUnixMountEntry.
86
+ */
87
+ export function mount_at(mount_path: string): [ /* returnType */ any | null, /* time_read */ number ]
88
+ /**
89
+ * Compares two unix mounts.
90
+ * @param mount1 first #GUnixMountEntry to compare.
91
+ * @param mount2 second #GUnixMountEntry to compare.
92
+ * @returns 1, 0 or -1 if @mount1 is greater than, equal to, or less than @mount2, respectively.
93
+ */
94
+ export function mount_compare(mount1: any, mount2: any): number
95
+ /**
96
+ * Makes a copy of `mount_entry`.
97
+ * @param mount_entry a #GUnixMountEntry.
98
+ * @returns a new #GUnixMountEntry
99
+ */
100
+ export function mount_copy(mount_entry: any): any
101
+ /**
102
+ * Gets a #GUnixMountEntry for a given file path. If `time_read`
103
+ * is set, it will be filled with a unix timestamp for checking
104
+ * if the mounts have changed since with g_unix_mounts_changed_since().
105
+ *
106
+ * If more mounts have the same mount path, the last matching mount
107
+ * is returned.
108
+ *
109
+ * This will return %NULL if looking up the mount entry fails, if
110
+ * `file_path` doesn’t exist or there is an I/O error.
111
+ * @param file_path file path on some unix mount.
112
+ * @returns a #GUnixMountEntry.
113
+ */
114
+ export function mount_for(file_path: string): [ /* returnType */ any | null, /* time_read */ number ]
115
+ /**
116
+ * Frees a unix mount.
117
+ * @param mount_entry a #GUnixMountEntry.
118
+ */
119
+ export function mount_free(mount_entry: any): void
120
+ /**
121
+ * Gets the device path for a unix mount.
122
+ * @param mount_entry a #GUnixMount.
123
+ * @returns a string containing the device path.
124
+ */
125
+ export function mount_get_device_path(mount_entry: any): string
126
+ /**
127
+ * Gets the filesystem type for the unix mount.
128
+ * @param mount_entry a #GUnixMount.
129
+ * @returns a string containing the file system type.
130
+ */
131
+ export function mount_get_fs_type(mount_entry: any): string
132
+ /**
133
+ * Gets the mount path for a unix mount.
134
+ * @param mount_entry input #GUnixMountEntry to get the mount path for.
135
+ * @returns the mount path for @mount_entry.
136
+ */
137
+ export function mount_get_mount_path(mount_entry: any): string
138
+ /**
139
+ * Gets a comma-separated list of mount options for the unix mount. For example,
140
+ * `rw,relatime,seclabel,data=ordered`.
141
+ *
142
+ * This is similar to g_unix_mount_point_get_options(), but it takes
143
+ * a #GUnixMountEntry as an argument.
144
+ * @param mount_entry a #GUnixMountEntry.
145
+ * @returns a string containing the options, or %NULL if not available.
146
+ */
147
+ export function mount_get_options(mount_entry: any): string | null
148
+ /**
149
+ * Gets the root of the mount within the filesystem. This is useful e.g. for
150
+ * mounts created by bind operation, or btrfs subvolumes.
151
+ *
152
+ * For example, the root path is equal to "/" for mount created by
153
+ * "mount /dev/sda1 /mnt/foo" and "/bar" for
154
+ * "mount --bind /mnt/foo/bar /mnt/bar".
155
+ * @param mount_entry a #GUnixMountEntry.
156
+ * @returns a string containing the root, or %NULL if not supported.
157
+ */
158
+ export function mount_get_root_path(mount_entry: any): string | null
159
+ /**
160
+ * Guesses whether a Unix mount can be ejected.
161
+ * @param mount_entry a #GUnixMountEntry
162
+ * @returns %TRUE if @mount_entry is deemed to be ejectable.
163
+ */
164
+ export function mount_guess_can_eject(mount_entry: any): boolean
165
+ /**
166
+ * Guesses the icon of a Unix mount.
167
+ * @param mount_entry a #GUnixMountEntry
168
+ * @returns a #GIcon
169
+ */
170
+ export function mount_guess_icon(mount_entry: any): any
171
+ /**
172
+ * Guesses the name of a Unix mount.
173
+ * The result is a translated string.
174
+ * @param mount_entry a #GUnixMountEntry
175
+ * @returns A newly allocated string that must be freed with g_free()
176
+ */
177
+ export function mount_guess_name(mount_entry: any): string | null
178
+ /**
179
+ * Guesses whether a Unix mount should be displayed in the UI.
180
+ * @param mount_entry a #GUnixMountEntry
181
+ * @returns %TRUE if @mount_entry is deemed to be displayable.
182
+ */
183
+ export function mount_guess_should_display(mount_entry: any): boolean
184
+ /**
185
+ * Guesses the symbolic icon of a Unix mount.
186
+ * @param mount_entry a #GUnixMountEntry
187
+ * @returns a #GIcon
188
+ */
189
+ export function mount_guess_symbolic_icon(mount_entry: any): any
190
+ /**
191
+ * Checks if a unix mount is mounted read only.
192
+ * @param mount_entry a #GUnixMount.
193
+ * @returns %TRUE if @mount_entry is read only.
194
+ */
195
+ export function mount_is_readonly(mount_entry: any): boolean
196
+ /**
197
+ * Checks if a Unix mount is a system mount. This is the Boolean OR of
198
+ * g_unix_is_system_fs_type(), g_unix_is_system_device_path() and
199
+ * g_unix_is_mount_path_system_internal() on `mount_entry’`s properties.
200
+ *
201
+ * The definition of what a ‘system’ mount entry is may change over time as new
202
+ * file system types and device paths are ignored.
203
+ * @param mount_entry a #GUnixMount.
204
+ * @returns %TRUE if the unix mount is for a system path.
205
+ */
206
+ export function mount_is_system_internal(mount_entry: any): boolean
207
+ /**
208
+ * Gets a #GUnixMountPoint for a given mount path. If `time_read` is set, it
209
+ * will be filled with a unix timestamp for checking if the mount points have
210
+ * changed since with g_unix_mount_points_changed_since().
211
+ *
212
+ * If more mount points have the same mount path, the last matching mount point
213
+ * is returned.
214
+ * @param mount_path path for a possible unix mount point.
215
+ * @returns a #GUnixMountPoint, or %NULL if no match is found.
216
+ */
217
+ export function mount_point_at(mount_path: string): [ /* returnType */ any | null, /* time_read */ number ]
218
+ /**
219
+ * Compares two unix mount points.
220
+ * @param mount1 a #GUnixMount.
221
+ * @param mount2 a #GUnixMount.
222
+ * @returns 1, 0 or -1 if @mount1 is greater than, equal to, or less than @mount2, respectively.
223
+ */
224
+ export function mount_point_compare(mount1: any, mount2: any): number
225
+ /**
226
+ * Makes a copy of `mount_point`.
227
+ * @param mount_point a #GUnixMountPoint.
228
+ * @returns a new #GUnixMountPoint
229
+ */
230
+ export function mount_point_copy(mount_point: any): any
231
+ /**
232
+ * Frees a unix mount point.
233
+ * @param mount_point unix mount point to free.
234
+ */
235
+ export function mount_point_free(mount_point: any): void
236
+ /**
237
+ * Gets the device path for a unix mount point.
238
+ * @param mount_point a #GUnixMountPoint.
239
+ * @returns a string containing the device path.
240
+ */
241
+ export function mount_point_get_device_path(mount_point: any): string
242
+ /**
243
+ * Gets the file system type for the mount point.
244
+ * @param mount_point a #GUnixMountPoint.
245
+ * @returns a string containing the file system type.
246
+ */
247
+ export function mount_point_get_fs_type(mount_point: any): string
248
+ /**
249
+ * Gets the mount path for a unix mount point.
250
+ * @param mount_point a #GUnixMountPoint.
251
+ * @returns a string containing the mount path.
252
+ */
253
+ export function mount_point_get_mount_path(mount_point: any): string
254
+ /**
255
+ * Gets the options for the mount point.
256
+ * @param mount_point a #GUnixMountPoint.
257
+ * @returns a string containing the options.
258
+ */
259
+ export function mount_point_get_options(mount_point: any): string | null
260
+ /**
261
+ * Guesses whether a Unix mount point can be ejected.
262
+ * @param mount_point a #GUnixMountPoint
263
+ * @returns %TRUE if @mount_point is deemed to be ejectable.
264
+ */
265
+ export function mount_point_guess_can_eject(mount_point: any): boolean
266
+ /**
267
+ * Guesses the icon of a Unix mount point.
268
+ * @param mount_point a #GUnixMountPoint
269
+ * @returns a #GIcon
270
+ */
271
+ export function mount_point_guess_icon(mount_point: any): any
272
+ /**
273
+ * Guesses the name of a Unix mount point.
274
+ * The result is a translated string.
275
+ * @param mount_point a #GUnixMountPoint
276
+ * @returns A newly allocated string that must be freed with g_free()
277
+ */
278
+ export function mount_point_guess_name(mount_point: any): string | null
279
+ /**
280
+ * Guesses the symbolic icon of a Unix mount point.
281
+ * @param mount_point a #GUnixMountPoint
282
+ * @returns a #GIcon
283
+ */
284
+ export function mount_point_guess_symbolic_icon(mount_point: any): any
285
+ /**
286
+ * Checks if a unix mount point is a loopback device.
287
+ * @param mount_point a #GUnixMountPoint.
288
+ * @returns %TRUE if the mount point is a loopback. %FALSE otherwise.
289
+ */
290
+ export function mount_point_is_loopback(mount_point: any): boolean
291
+ /**
292
+ * Checks if a unix mount point is read only.
293
+ * @param mount_point a #GUnixMountPoint.
294
+ * @returns %TRUE if a mount point is read only.
295
+ */
296
+ export function mount_point_is_readonly(mount_point: any): boolean
297
+ /**
298
+ * Checks if a unix mount point is mountable by the user.
299
+ * @param mount_point a #GUnixMountPoint.
300
+ * @returns %TRUE if the mount point is user mountable.
301
+ */
302
+ export function mount_point_is_user_mountable(mount_point: any): boolean
303
+ /**
304
+ * Checks if the unix mount points have changed since a given unix time.
305
+ * @param time guint64 to contain a timestamp.
306
+ * @returns %TRUE if the mount points have changed since @time.
307
+ */
308
+ export function mount_points_changed_since(time: number): boolean
309
+ /**
310
+ * Gets a #GList of #GUnixMountPoint containing the unix mount points.
311
+ * If `time_read` is set, it will be filled with the mount timestamp,
312
+ * allowing for checking if the mounts have changed with
313
+ * g_unix_mount_points_changed_since().
314
+ * @returns a #GList of the UNIX mountpoints.
315
+ */
316
+ export function mount_points_get(): [ /* returnType */ any[], /* time_read */ number ]
317
+ /**
318
+ * Checks if the unix mounts have changed since a given unix time.
319
+ * @param time guint64 to contain a timestamp.
320
+ * @returns %TRUE if the mounts have changed since @time.
321
+ */
322
+ export function mounts_changed_since(time: number): boolean
323
+ /**
324
+ * Gets a #GList of #GUnixMountEntry containing the unix mounts.
325
+ * If `time_read` is set, it will be filled with the mount
326
+ * timestamp, allowing for checking if the mounts have changed
327
+ * with g_unix_mounts_changed_since().
328
+ * @returns a #GList of the UNIX mounts.
329
+ */
330
+ export function mounts_get(): [ /* returnType */ any[], /* time_read */ number ]
331
+ /**
332
+ * During invocation, g_desktop_app_info_launch_uris_as_manager() may
333
+ * create one or more child processes. This callback is invoked once
334
+ * for each, providing the process ID.
335
+ * @callback
336
+ * @param appinfo a #GDesktopAppInfo
337
+ * @param pid Process identifier
338
+ */
339
+ export interface DesktopAppLaunchCallback {
340
+ (appinfo: any, pid: any): void
341
+ }
342
+ export module DesktopAppInfoLookup {
343
+
344
+ // Constructor properties interface
345
+
346
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
347
+ }
348
+
349
+ }
350
+
351
+ export interface DesktopAppInfoLookup {
352
+
353
+ // Class property signals of GioUnix-2.0.GioUnix.DesktopAppInfoLookup
354
+
355
+ connect(sigName: string, callback: (...args: any[]) => void): number
356
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
357
+ emit(sigName: string, ...args: any[]): void
358
+ disconnect(id: number): void
359
+ }
360
+
361
+ /**
362
+ * #GDesktopAppInfoLookup is an opaque data structure and can only be accessed
363
+ * using the following functions.
364
+ * @interface
365
+ */
366
+ export class DesktopAppInfoLookup extends GObject.Object {
367
+
368
+ // Own properties of GioUnix-2.0.GioUnix.DesktopAppInfoLookup
369
+
370
+ static name: string
371
+ static $gtype: GObject.GType<DesktopAppInfoLookup>
372
+
373
+ // Constructors of GioUnix-2.0.GioUnix.DesktopAppInfoLookup
374
+
375
+ constructor(config?: DesktopAppInfoLookup.ConstructorProperties)
376
+ _init(config?: DesktopAppInfoLookup.ConstructorProperties): void
377
+ /**
378
+ * Gets the default application for launching applications
379
+ * using this URI scheme for a particular #GDesktopAppInfoLookup
380
+ * implementation.
381
+ *
382
+ * The #GDesktopAppInfoLookup interface and this function is used
383
+ * to implement g_app_info_get_default_for_uri_scheme() backends
384
+ * in a GIO module. There is no reason for applications to use it
385
+ * directly. Applications should use g_app_info_get_default_for_uri_scheme().
386
+ * @param lookup a #GDesktopAppInfoLookup
387
+ * @param uri_scheme a string containing a URI scheme.
388
+ * @returns #GAppInfo for given @uri_scheme or %NULL on error.
389
+ */
390
+ static get_default_for_uri_scheme(lookup: any, uri_scheme: string): any | null
391
+ }
392
+
393
+ export module FileDescriptorBased {
394
+
395
+ // Constructor properties interface
396
+
397
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
398
+ }
399
+
400
+ }
401
+
402
+ export interface FileDescriptorBased {
403
+
404
+ // Class property signals of GioUnix-2.0.GioUnix.FileDescriptorBased
405
+
406
+ connect(sigName: string, callback: (...args: any[]) => void): number
407
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
408
+ emit(sigName: string, ...args: any[]): void
409
+ disconnect(id: number): void
410
+ }
411
+
412
+ /**
413
+ * `GFileDescriptorBased` is an interface for file descriptor based IO.
414
+ *
415
+ * It is implemented by streams (implementations of [class`Gio`.InputStream] or
416
+ * [class`Gio`.OutputStream]) that are based on file descriptors.
417
+ *
418
+ * Note that `<gio/gfiledescriptorbased.h>` belongs to the UNIX-specific
419
+ * GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
420
+ * file or the `GioUnix-2.0` GIR namespace when using it.
421
+ * @interface
422
+ */
423
+ export class FileDescriptorBased extends GObject.Object {
424
+
425
+ // Own properties of GioUnix-2.0.GioUnix.FileDescriptorBased
426
+
427
+ static name: string
428
+ static $gtype: GObject.GType<FileDescriptorBased>
429
+
430
+ // Constructors of GioUnix-2.0.GioUnix.FileDescriptorBased
431
+
432
+ constructor(config?: FileDescriptorBased.ConstructorProperties)
433
+ _init(config?: FileDescriptorBased.ConstructorProperties): void
434
+ /**
435
+ * Gets the underlying file descriptor.
436
+ * @param fd_based a #GFileDescriptorBased.
437
+ * @returns The file descriptor
438
+ */
439
+ static get_fd(fd_based: any): number
440
+ }
441
+
442
+ export module DesktopAppInfo {
443
+
444
+ // Constructor properties interface
445
+
446
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
447
+
448
+ // Own constructor properties of GioUnix-2.0.GioUnix.DesktopAppInfo
449
+
450
+ /**
451
+ * The origin filename of this #GDesktopAppInfo
452
+ */
453
+ filename?: string | null
454
+ }
455
+
456
+ }
457
+
458
+ export interface DesktopAppInfo {
459
+
460
+ // Own properties of GioUnix-2.0.GioUnix.DesktopAppInfo
461
+
462
+ /**
463
+ * The origin filename of this #GDesktopAppInfo
464
+ */
465
+ readonly filename: string | null
466
+
467
+ // Class property signals of GioUnix-2.0.GioUnix.DesktopAppInfo
468
+
469
+ connect(sigName: "notify::filename", callback: (($obj: DesktopAppInfo, pspec: GObject.ParamSpec) => void)): number
470
+ connect_after(sigName: "notify::filename", callback: (($obj: DesktopAppInfo, pspec: GObject.ParamSpec) => void)): number
471
+ emit(sigName: "notify::filename", ...args: any[]): void
472
+ connect(sigName: string, callback: (...args: any[]) => void): number
473
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
474
+ emit(sigName: string, ...args: any[]): void
475
+ disconnect(id: number): void
476
+ }
477
+
478
+ /**
479
+ * `GDesktopAppInfo` is an implementation of [iface`Gio`.AppInfo] based on
480
+ * desktop files.
481
+ *
482
+ * Note that `<gio/gdesktopappinfo.h>` belongs to the UNIX-specific
483
+ * GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
484
+ * file or the `GioUnix-2.0` GIR namespace when using it.
485
+ * @class
486
+ */
487
+ export class DesktopAppInfo extends GObject.Object {
488
+
489
+ // Own properties of GioUnix-2.0.GioUnix.DesktopAppInfo
490
+
491
+ static name: string
492
+ static $gtype: GObject.GType<DesktopAppInfo>
493
+
494
+ // Constructors of GioUnix-2.0.GioUnix.DesktopAppInfo
495
+
496
+ constructor(config?: DesktopAppInfo.ConstructorProperties)
497
+ /**
498
+ * Creates a new #GDesktopAppInfo based on a desktop file id.
499
+ *
500
+ * A desktop file id is the basename of the desktop file, including the
501
+ * .desktop extension. GIO is looking for a desktop file with this name
502
+ * in the `applications` subdirectories of the XDG
503
+ * data directories (i.e. the directories specified in the `XDG_DATA_HOME`
504
+ * and `XDG_DATA_DIRS` environment variables). GIO also supports the
505
+ * prefix-to-subdirectory mapping that is described in the
506
+ * [Menu Spec](http://standards.freedesktop.org/menu-spec/latest/)
507
+ * (i.e. a desktop id of kde-foo.desktop will match
508
+ * `/usr/share/applications/kde/foo.desktop`).
509
+ * @constructor
510
+ * @param desktop_id the desktop file id
511
+ * @returns a new #GDesktopAppInfo, or %NULL if no desktop file with that id exists.
512
+ */
513
+ constructor(desktop_id: string)
514
+ /**
515
+ * Creates a new #GDesktopAppInfo based on a desktop file id.
516
+ *
517
+ * A desktop file id is the basename of the desktop file, including the
518
+ * .desktop extension. GIO is looking for a desktop file with this name
519
+ * in the `applications` subdirectories of the XDG
520
+ * data directories (i.e. the directories specified in the `XDG_DATA_HOME`
521
+ * and `XDG_DATA_DIRS` environment variables). GIO also supports the
522
+ * prefix-to-subdirectory mapping that is described in the
523
+ * [Menu Spec](http://standards.freedesktop.org/menu-spec/latest/)
524
+ * (i.e. a desktop id of kde-foo.desktop will match
525
+ * `/usr/share/applications/kde/foo.desktop`).
526
+ * @constructor
527
+ * @param desktop_id the desktop file id
528
+ * @returns a new #GDesktopAppInfo, or %NULL if no desktop file with that id exists.
529
+ */
530
+ static new(desktop_id: string): DesktopAppInfo
531
+ /**
532
+ * Creates a new #GDesktopAppInfo.
533
+ * @constructor
534
+ * @param filename the path of a desktop file, in the GLib filename encoding
535
+ * @returns a new #GDesktopAppInfo or %NULL on error.
536
+ */
537
+ static new_from_filename(filename: string): DesktopAppInfo
538
+ /**
539
+ * Creates a new #GDesktopAppInfo.
540
+ * @constructor
541
+ * @param key_file an opened #GKeyFile
542
+ * @returns a new #GDesktopAppInfo or %NULL on error.
543
+ */
544
+ static new_from_keyfile(key_file: any): DesktopAppInfo
545
+ _init(config?: DesktopAppInfo.ConstructorProperties): void
546
+ /**
547
+ * Gets the user-visible display name of the "additional application
548
+ * action" specified by `action_name`.
549
+ *
550
+ * This corresponds to the "Name" key within the keyfile group for the
551
+ * action.
552
+ * @param info a #GDesktopAppInfo
553
+ * @param action_name the name of the action as from g_desktop_app_info_list_actions()
554
+ * @returns the locale-specific action name
555
+ */
556
+ static get_action_name(info: any, action_name: string): string | null
557
+ /**
558
+ * Looks up a boolean value in the keyfile backing `info`.
559
+ *
560
+ * The `key` is looked up in the "Desktop Entry" group.
561
+ * @param info a #GDesktopAppInfo
562
+ * @param key the key to look up
563
+ * @returns the boolean value, or %FALSE if the key is not found
564
+ */
565
+ static get_boolean(info: any, key: string): boolean
566
+ /**
567
+ * Gets the categories from the desktop file.
568
+ * @param info a #GDesktopAppInfo
569
+ * @returns The unparsed Categories key from the desktop file; i.e. no attempt is made to split it by ';' or validate it.
570
+ */
571
+ static get_categories(info: any): string | null
572
+ /**
573
+ * When `info` was created from a known filename, return it. In some
574
+ * situations such as the #GDesktopAppInfo returned from
575
+ * g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
576
+ * @param info a #GDesktopAppInfo
577
+ * @returns The full path to the file for @info, or %NULL if not known.
578
+ */
579
+ static get_filename(info: any): string | null
580
+ /**
581
+ * Gets the generic name from the desktop file.
582
+ * @param info a #GDesktopAppInfo
583
+ * @returns The value of the GenericName key
584
+ */
585
+ static get_generic_name(info: any): string | null
586
+ /**
587
+ * Gets all applications that implement `interface`.
588
+ *
589
+ * An application implements an interface if that interface is listed in
590
+ * the Implements= line of the desktop file of the application.
591
+ * @param interface the name of the interface
592
+ * @returns a list of #GDesktopAppInfo objects.
593
+ */
594
+ static get_implementations(interface: string): any[]
595
+ /**
596
+ * A desktop file is hidden if the Hidden key in it is
597
+ * set to True.
598
+ * @param info a #GDesktopAppInfo.
599
+ * @returns %TRUE if hidden, %FALSE otherwise.
600
+ */
601
+ static get_is_hidden(info: any): boolean
602
+ /**
603
+ * Gets the keywords from the desktop file.
604
+ * @param info a #GDesktopAppInfo
605
+ * @returns The value of the Keywords key
606
+ */
607
+ static get_keywords(info: any): string[]
608
+ /**
609
+ * Looks up a localized string value in the keyfile backing `info`
610
+ * translated to the current locale.
611
+ *
612
+ * The `key` is looked up in the "Desktop Entry" group.
613
+ * @param info a #GDesktopAppInfo
614
+ * @param key the key to look up
615
+ * @returns a newly allocated string, or %NULL if the key is not found
616
+ */
617
+ static get_locale_string(info: any, key: string): string | null
618
+ /**
619
+ * Gets the value of the NoDisplay key, which helps determine if the
620
+ * application info should be shown in menus. See
621
+ * %G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show().
622
+ * @param info a #GDesktopAppInfo
623
+ * @returns The value of the NoDisplay key
624
+ */
625
+ static get_nodisplay(info: any): boolean
626
+ /**
627
+ * Checks if the application info should be shown in menus that list available
628
+ * applications for a specific name of the desktop, based on the
629
+ * `OnlyShowIn` and `NotShowIn` keys.
630
+ *
631
+ * `desktop_env` should typically be given as %NULL, in which case the
632
+ * `XDG_CURRENT_DESKTOP` environment variable is consulted. If you want
633
+ * to override the default mechanism then you may specify `desktop_env,`
634
+ * but this is not recommended.
635
+ *
636
+ * Note that g_app_info_should_show() for `info` will include this check (with
637
+ * %NULL for `desktop_env)` as well as additional checks.
638
+ * @param info a #GDesktopAppInfo
639
+ * @param desktop_env a string specifying a desktop name
640
+ * @returns %TRUE if the @info should be shown in @desktop_env according to the `OnlyShowIn` and `NotShowIn` keys, %FALSE otherwise.
641
+ */
642
+ static get_show_in(info: any, desktop_env: string | null): boolean
643
+ /**
644
+ * Retrieves the StartupWMClass field from `info`. This represents the
645
+ * WM_CLASS property of the main window of the application, if launched
646
+ * through `info`.
647
+ * @param info a #GDesktopAppInfo that supports startup notify
648
+ * @returns the startup WM class, or %NULL if none is set in the desktop file.
649
+ */
650
+ static get_startup_wm_class(info: any): string | null
651
+ /**
652
+ * Looks up a string value in the keyfile backing `info`.
653
+ *
654
+ * The `key` is looked up in the "Desktop Entry" group.
655
+ * @param info a #GDesktopAppInfo
656
+ * @param key the key to look up
657
+ * @returns a newly allocated string, or %NULL if the key is not found
658
+ */
659
+ static get_string(info: any, key: string): string | null
660
+ /**
661
+ * Looks up a string list value in the keyfile backing `info`.
662
+ *
663
+ * The `key` is looked up in the "Desktop Entry" group.
664
+ * @param info a #GDesktopAppInfo
665
+ * @param key the key to look up
666
+ * @returns a %NULL-terminated string array or %NULL if the specified key cannot be found. The array should be freed with g_strfreev().
667
+ */
668
+ static get_string_list(info: any, key: string): string[]
669
+ /**
670
+ * Returns whether `key` exists in the "Desktop Entry" group
671
+ * of the keyfile backing `info`.
672
+ * @param info a #GDesktopAppInfo
673
+ * @param key the key to look up
674
+ * @returns %TRUE if the @key exists
675
+ */
676
+ static has_key(info: any, key: string): boolean
677
+ /**
678
+ * Activates the named application action.
679
+ *
680
+ * You may only call this function on action names that were
681
+ * returned from g_desktop_app_info_list_actions().
682
+ *
683
+ * Note that if the main entry of the desktop file indicates that the
684
+ * application supports startup notification, and `launch_context` is
685
+ * non-%NULL, then startup notification will be used when activating the
686
+ * action (and as such, invocation of the action on the receiving side
687
+ * must signal the end of startup notification when it is completed).
688
+ * This is the expected behaviour of applications declaring additional
689
+ * actions, as per the desktop file specification.
690
+ *
691
+ * As with g_app_info_launch() there is no way to detect failures that
692
+ * occur while using this function.
693
+ * @param info a #GDesktopAppInfo
694
+ * @param action_name the name of the action as from g_desktop_app_info_list_actions()
695
+ * @param launch_context a #GAppLaunchContext
696
+ */
697
+ static launch_action(info: any, action_name: string, launch_context: any | null): void
698
+ /**
699
+ * This function performs the equivalent of g_app_info_launch_uris(),
700
+ * but is intended primarily for operating system components that
701
+ * launch applications. Ordinary applications should use
702
+ * g_app_info_launch_uris().
703
+ *
704
+ * If the application is launched via GSpawn, then `spawn_flags,` `user_setup`
705
+ * and `user_setup_data` are used for the call to g_spawn_async().
706
+ * Additionally, `pid_callback` (with `pid_callback_data)` will be called to
707
+ * inform about the PID of the created process. See g_spawn_async_with_pipes()
708
+ * for information on certain parameter conditions that can enable an
709
+ * optimized posix_spawn() codepath to be used.
710
+ *
711
+ * If application launching occurs via some other mechanism (eg: D-Bus
712
+ * activation) then `spawn_flags,` `user_setup,` `user_setup_data,`
713
+ * `pid_callback` and `pid_callback_data` are ignored.
714
+ * @param appinfo a #GDesktopAppInfo
715
+ * @param uris List of URIs
716
+ * @param launch_context a #GAppLaunchContext
717
+ * @param spawn_flags #GSpawnFlags, used for each process
718
+ * @returns %TRUE on successful launch, %FALSE otherwise.
719
+ */
720
+ static launch_uris_as_manager(appinfo: any, uris: string[], launch_context: any | null, spawn_flags: any): boolean
721
+ /**
722
+ * Equivalent to g_desktop_app_info_launch_uris_as_manager() but allows
723
+ * you to pass in file descriptors for the stdin, stdout and stderr streams
724
+ * of the launched process.
725
+ *
726
+ * If application launching occurs via some non-spawn mechanism (e.g. D-Bus
727
+ * activation) then `stdin_fd,` `stdout_fd` and `stderr_fd` are ignored.
728
+ * @param appinfo a #GDesktopAppInfo
729
+ * @param uris List of URIs
730
+ * @param launch_context a #GAppLaunchContext
731
+ * @param spawn_flags #GSpawnFlags, used for each process
732
+ * @param user_setup a #GSpawnChildSetupFunc, used once for each process.
733
+ * @param pid_callback Callback for child processes
734
+ * @param stdin_fd file descriptor to use for child's stdin, or -1
735
+ * @param stdout_fd file descriptor to use for child's stdout, or -1
736
+ * @param stderr_fd file descriptor to use for child's stderr, or -1
737
+ * @returns %TRUE on successful launch, %FALSE otherwise.
738
+ */
739
+ static launch_uris_as_manager_with_fds(appinfo: any, uris: string[], launch_context: any | null, spawn_flags: any, user_setup: any | null, pid_callback: any | null, stdin_fd: number, stdout_fd: number, stderr_fd: number): boolean
740
+ /**
741
+ * Returns the list of "additional application actions" supported on the
742
+ * desktop file, as per the desktop file specification.
743
+ *
744
+ * As per the specification, this is the list of actions that are
745
+ * explicitly listed in the "Actions" key of the [Desktop Entry] group.
746
+ * @param info a #GDesktopAppInfo
747
+ * @returns a list of strings, always non-%NULL
748
+ */
749
+ static list_actions(info: any): string[]
750
+ /**
751
+ * Searches desktop files for ones that match `search_string`.
752
+ *
753
+ * The return value is an array of strvs. Each strv contains a list of
754
+ * applications that matched `search_string` with an equal score. The
755
+ * outer list is sorted by score so that the first strv contains the
756
+ * best-matching applications, and so on.
757
+ * The algorithm for determining matches is undefined and may change at
758
+ * any time.
759
+ *
760
+ * None of the search results are subjected to the normal validation
761
+ * checks performed by g_desktop_app_info_new() (for example, checking that
762
+ * the executable referenced by a result exists), and so it is possible for
763
+ * g_desktop_app_info_new() to return %NULL when passed an app ID returned by
764
+ * this function. It is expected that calling code will do this when
765
+ * subsequently creating a #GDesktopAppInfo for each result.
766
+ * @param search_string the search string to use
767
+ * @returns a list of strvs. Free each item with g_strfreev() and free the outer list with g_free().
768
+ */
769
+ static search(search_string: string): string[]
770
+ /**
771
+ * Sets the name of the desktop that the application is running in.
772
+ * This is used by g_app_info_should_show() and
773
+ * g_desktop_app_info_get_show_in() to evaluate the
774
+ * `OnlyShowIn` and `NotShowIn`
775
+ * desktop entry fields.
776
+ *
777
+ * Should be called only once; subsequent calls are ignored.
778
+ * @param desktop_env a string specifying what desktop this is
779
+ */
780
+ static set_desktop_env(desktop_env: string): void
781
+ }
782
+
783
+ export interface FDMessage {
784
+
785
+ // Own properties of GioUnix-2.0.GioUnix.FDMessage
786
+
787
+ /**
788
+ * The [class`Gio`.UnixFDList] object to send with the message.
789
+ */
790
+ readonly fdList: any
791
+
792
+ // Own fields of GioUnix-2.0.GioUnix.FDMessage
793
+
794
+ parent_instance: any
795
+ priv: any
796
+ }
797
+
798
+ /**
799
+ * This [class`Gio`.SocketControlMessage] contains a [class`Gio`.UnixFDList].
800
+ * It may be sent using [method`Gio`.Socket.send_message] and received using
801
+ * [method`Gio`.Socket.receive_message] over UNIX sockets (ie: sockets in the
802
+ * `G_SOCKET_FAMILY_UNIX` family). The file descriptors are copied
803
+ * between processes by the kernel.
804
+ *
805
+ * For an easier way to send and receive file descriptors over
806
+ * stream-oriented UNIX sockets, see [method`Gio`.UnixConnection.send_fd] and
807
+ * [method`Gio`.UnixConnection.receive_fd].
808
+ *
809
+ * Note that `<gio/gunixfdmessage.h>` belongs to the UNIX-specific GIO
810
+ * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
811
+ * file or the `GioUnix-2.0` GIR namespace when using it.
812
+ * @class
813
+ */
814
+ export class FDMessage {
815
+
816
+ // Own properties of GioUnix-2.0.GioUnix.FDMessage
817
+
818
+ static name: string
819
+
820
+ // Constructors of GioUnix-2.0.GioUnix.FDMessage
821
+
822
+ /**
823
+ * Creates a new #GUnixFDMessage containing an empty file descriptor
824
+ * list.
825
+ * @constructor
826
+ * @returns a new #GUnixFDMessage
827
+ */
828
+ constructor()
829
+ /**
830
+ * Creates a new #GUnixFDMessage containing an empty file descriptor
831
+ * list.
832
+ * @constructor
833
+ * @returns a new #GUnixFDMessage
834
+ */
835
+ static new(): FDMessage
836
+ /**
837
+ * Creates a new #GUnixFDMessage containing `list`.
838
+ * @constructor
839
+ * @param fd_list a #GUnixFDList
840
+ * @returns a new #GUnixFDMessage
841
+ */
842
+ static new_with_fd_list(fd_list: any): FDMessage
843
+ /**
844
+ * Adds a file descriptor to `message`.
845
+ *
846
+ * The file descriptor is duplicated using dup(). You keep your copy
847
+ * of the descriptor and the copy contained in `message` will be closed
848
+ * when `message` is finalized.
849
+ *
850
+ * A possible cause of failure is exceeding the per-process or
851
+ * system-wide file descriptor limit.
852
+ * @param message a #GUnixFDMessage
853
+ * @param fd a valid open file descriptor
854
+ * @returns %TRUE in case of success, else %FALSE (and @error is set)
855
+ */
856
+ static append_fd(message: any, fd: number): boolean
857
+ /**
858
+ * Gets the #GUnixFDList contained in `message`. This function does not
859
+ * return a reference to the caller, but the returned list is valid for
860
+ * the lifetime of `message`.
861
+ * @param message a #GUnixFDMessage
862
+ * @returns the #GUnixFDList from @message
863
+ */
864
+ static get_fd_list(message: any): any
865
+ /**
866
+ * Returns the array of file descriptors that is contained in this
867
+ * object.
868
+ *
869
+ * After this call, the descriptors are no longer contained in
870
+ * `message`. Further calls will return an empty list (unless more
871
+ * descriptors have been added).
872
+ *
873
+ * The return result of this function must be freed with g_free().
874
+ * The caller is also responsible for closing all of the file
875
+ * descriptors.
876
+ *
877
+ * If `length` is non-%NULL then it is set to the number of file
878
+ * descriptors in the returned array. The returned array is also
879
+ * terminated with -1.
880
+ *
881
+ * This function never returns %NULL. In case there are no file
882
+ * descriptors contained in `message,` an empty array is returned.
883
+ * @param message a #GUnixFDMessage
884
+ * @returns an array of file descriptors
885
+ */
886
+ static steal_fds(message: any): number[]
887
+ }
888
+
889
+ export module InputStream {
890
+
891
+ // Constructor properties interface
892
+
893
+ export interface ConstructorProperties extends FileDescriptorBased.ConstructorProperties {
894
+
895
+ // Own constructor properties of GioUnix-2.0.GioUnix.InputStream
896
+
897
+ /**
898
+ * Whether to close the file descriptor when the stream is closed.
899
+ */
900
+ closeFd?: boolean | null
901
+ /**
902
+ * The file descriptor that the stream reads from.
903
+ */
904
+ fd?: number | null
905
+ }
906
+
907
+ }
908
+
909
+ export interface InputStream extends FileDescriptorBased {
910
+
911
+ // Own properties of GioUnix-2.0.GioUnix.InputStream
912
+
913
+ /**
914
+ * Whether to close the file descriptor when the stream is closed.
915
+ */
916
+ closeFd: boolean
917
+ /**
918
+ * The file descriptor that the stream reads from.
919
+ */
920
+ readonly fd: number
921
+
922
+ // Own fields of GioUnix-2.0.GioUnix.InputStream
923
+
924
+ parent_instance: any
925
+
926
+ // Class property signals of GioUnix-2.0.GioUnix.InputStream
927
+
928
+ connect(sigName: "notify::close-fd", callback: (($obj: InputStream, pspec: GObject.ParamSpec) => void)): number
929
+ connect_after(sigName: "notify::close-fd", callback: (($obj: InputStream, pspec: GObject.ParamSpec) => void)): number
930
+ emit(sigName: "notify::close-fd", ...args: any[]): void
931
+ connect(sigName: "notify::fd", callback: (($obj: InputStream, pspec: GObject.ParamSpec) => void)): number
932
+ connect_after(sigName: "notify::fd", callback: (($obj: InputStream, pspec: GObject.ParamSpec) => void)): number
933
+ emit(sigName: "notify::fd", ...args: any[]): void
934
+ connect(sigName: string, callback: (...args: any[]) => void): number
935
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
936
+ emit(sigName: string, ...args: any[]): void
937
+ disconnect(id: number): void
938
+ }
939
+
940
+ /**
941
+ * `GUnixInputStream` implements [class`Gio`.InputStream] for reading from a UNIX
942
+ * file descriptor, including asynchronous operations. (If the file
943
+ * descriptor refers to a socket or pipe, this will use `poll()` to do
944
+ * asynchronous I/O. If it refers to a regular file, it will fall back
945
+ * to doing asynchronous I/O in another thread.)
946
+ *
947
+ * Note that `<gio/gunixinputstream.h>` belongs to the UNIX-specific GIO
948
+ * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
949
+ * file or the `GioUnix-2.0` GIR namespace when using it.
950
+ * @class
951
+ */
952
+ export class InputStream {
953
+
954
+ // Own properties of GioUnix-2.0.GioUnix.InputStream
955
+
956
+ static name: string
957
+ static $gtype: GObject.GType<InputStream>
958
+
959
+ // Constructors of GioUnix-2.0.GioUnix.InputStream
960
+
961
+ constructor(config?: InputStream.ConstructorProperties)
962
+ /**
963
+ * Creates a new #GUnixInputStream for the given `fd`.
964
+ *
965
+ * If `close_fd` is %TRUE, the file descriptor will be closed
966
+ * when the stream is closed.
967
+ * @constructor
968
+ * @param fd a UNIX file descriptor
969
+ * @param close_fd %TRUE to close the file descriptor when done
970
+ * @returns a new #GUnixInputStream
971
+ */
972
+ constructor(fd: number, close_fd: boolean)
973
+ /**
974
+ * Creates a new #GUnixInputStream for the given `fd`.
975
+ *
976
+ * If `close_fd` is %TRUE, the file descriptor will be closed
977
+ * when the stream is closed.
978
+ * @constructor
979
+ * @param fd a UNIX file descriptor
980
+ * @param close_fd %TRUE to close the file descriptor when done
981
+ * @returns a new #GUnixInputStream
982
+ */
983
+ static new(fd: number, close_fd: boolean): InputStream
984
+ _init(config?: InputStream.ConstructorProperties): void
985
+ /**
986
+ * Returns whether the file descriptor of `stream` will be
987
+ * closed when the stream is closed.
988
+ * @param stream a #GUnixInputStream
989
+ * @returns %TRUE if the file descriptor is closed when done
990
+ */
991
+ static get_close_fd(stream: any): boolean
992
+ /**
993
+ * Return the UNIX file descriptor that the stream reads from.
994
+ * @param stream a #GUnixInputStream
995
+ * @returns The file descriptor of @stream
996
+ */
997
+ static get_fd(stream: any): number
998
+ /**
999
+ * Sets whether the file descriptor of `stream` shall be closed
1000
+ * when the stream is closed.
1001
+ * @param stream a #GUnixInputStream
1002
+ * @param close_fd %TRUE to close the file descriptor when done
1003
+ */
1004
+ static set_close_fd(stream: any, close_fd: boolean): void
1005
+ }
1006
+
1007
+ export module MountMonitor {
1008
+
1009
+ // Signal callback interfaces
1010
+
1011
+ /**
1012
+ * Signal callback interface for `mountpoints-changed`
1013
+ */
1014
+ export interface MountpointsChangedSignalCallback {
1015
+ ($obj: MountMonitor): void
1016
+ }
1017
+
1018
+ /**
1019
+ * Signal callback interface for `mounts-changed`
1020
+ */
1021
+ export interface MountsChangedSignalCallback {
1022
+ ($obj: MountMonitor): void
1023
+ }
1024
+
1025
+
1026
+ // Constructor properties interface
1027
+
1028
+ export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1029
+ }
1030
+
1031
+ }
1032
+
1033
+ export interface MountMonitor {
1034
+
1035
+ // Own signals of GioUnix-2.0.GioUnix.MountMonitor
1036
+
1037
+ connect(sigName: "mountpoints-changed", callback: MountMonitor.MountpointsChangedSignalCallback): number
1038
+ connect_after(sigName: "mountpoints-changed", callback: MountMonitor.MountpointsChangedSignalCallback): number
1039
+ emit(sigName: "mountpoints-changed", ...args: any[]): void
1040
+ connect(sigName: "mounts-changed", callback: MountMonitor.MountsChangedSignalCallback): number
1041
+ connect_after(sigName: "mounts-changed", callback: MountMonitor.MountsChangedSignalCallback): number
1042
+ emit(sigName: "mounts-changed", ...args: any[]): void
1043
+
1044
+ // Class property signals of GioUnix-2.0.GioUnix.MountMonitor
1045
+
1046
+ connect(sigName: string, callback: (...args: any[]) => void): number
1047
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1048
+ emit(sigName: string, ...args: any[]): void
1049
+ disconnect(id: number): void
1050
+ }
1051
+
1052
+ /**
1053
+ * Watches #GUnixMounts for changes.
1054
+ * @class
1055
+ */
1056
+ export class MountMonitor extends GObject.Object {
1057
+
1058
+ // Own properties of GioUnix-2.0.GioUnix.MountMonitor
1059
+
1060
+ static name: string
1061
+ static $gtype: GObject.GType<MountMonitor>
1062
+
1063
+ // Constructors of GioUnix-2.0.GioUnix.MountMonitor
1064
+
1065
+ constructor(config?: MountMonitor.ConstructorProperties)
1066
+ /**
1067
+ * Deprecated alias for g_unix_mount_monitor_get().
1068
+ *
1069
+ * This function was never a true constructor, which is why it was
1070
+ * renamed.
1071
+ * @constructor
1072
+ * @returns a #GUnixMountMonitor.
1073
+ */
1074
+ constructor()
1075
+ /**
1076
+ * Deprecated alias for g_unix_mount_monitor_get().
1077
+ *
1078
+ * This function was never a true constructor, which is why it was
1079
+ * renamed.
1080
+ * @constructor
1081
+ * @returns a #GUnixMountMonitor.
1082
+ */
1083
+ static new(): MountMonitor
1084
+ _init(config?: MountMonitor.ConstructorProperties): void
1085
+ /**
1086
+ * Gets the #GUnixMountMonitor for the current thread-default main
1087
+ * context.
1088
+ *
1089
+ * The mount monitor can be used to monitor for changes to the list of
1090
+ * mounted filesystems as well as the list of mount points (ie: fstab
1091
+ * entries).
1092
+ *
1093
+ * You must only call g_object_unref() on the return value from under
1094
+ * the same main context as you called this function.
1095
+ * @returns the #GUnixMountMonitor.
1096
+ */
1097
+ static get(): any
1098
+ /**
1099
+ * This function does nothing.
1100
+ *
1101
+ * Before 2.44, this was a partially-effective way of controlling the
1102
+ * rate at which events would be reported under some uncommon
1103
+ * circumstances. Since `mount_monitor` is a singleton, it also meant
1104
+ * that calling this function would have side effects for other users of
1105
+ * the monitor.
1106
+ * @param mount_monitor a #GUnixMountMonitor
1107
+ * @param limit_msec a integer with the limit in milliseconds to poll for changes.
1108
+ */
1109
+ static set_rate_limit(mount_monitor: any, limit_msec: number): void
1110
+ }
1111
+
1112
+ export module OutputStream {
1113
+
1114
+ // Constructor properties interface
1115
+
1116
+ export interface ConstructorProperties extends FileDescriptorBased.ConstructorProperties {
1117
+
1118
+ // Own constructor properties of GioUnix-2.0.GioUnix.OutputStream
1119
+
1120
+ /**
1121
+ * Whether to close the file descriptor when the stream is closed.
1122
+ */
1123
+ closeFd?: boolean | null
1124
+ /**
1125
+ * The file descriptor that the stream writes to.
1126
+ */
1127
+ fd?: number | null
1128
+ }
1129
+
1130
+ }
1131
+
1132
+ export interface OutputStream extends FileDescriptorBased {
1133
+
1134
+ // Own properties of GioUnix-2.0.GioUnix.OutputStream
1135
+
1136
+ /**
1137
+ * Whether to close the file descriptor when the stream is closed.
1138
+ */
1139
+ closeFd: boolean
1140
+ /**
1141
+ * The file descriptor that the stream writes to.
1142
+ */
1143
+ readonly fd: number
1144
+
1145
+ // Own fields of GioUnix-2.0.GioUnix.OutputStream
1146
+
1147
+ parent_instance: any
1148
+
1149
+ // Class property signals of GioUnix-2.0.GioUnix.OutputStream
1150
+
1151
+ connect(sigName: "notify::close-fd", callback: (($obj: OutputStream, pspec: GObject.ParamSpec) => void)): number
1152
+ connect_after(sigName: "notify::close-fd", callback: (($obj: OutputStream, pspec: GObject.ParamSpec) => void)): number
1153
+ emit(sigName: "notify::close-fd", ...args: any[]): void
1154
+ connect(sigName: "notify::fd", callback: (($obj: OutputStream, pspec: GObject.ParamSpec) => void)): number
1155
+ connect_after(sigName: "notify::fd", callback: (($obj: OutputStream, pspec: GObject.ParamSpec) => void)): number
1156
+ emit(sigName: "notify::fd", ...args: any[]): void
1157
+ connect(sigName: string, callback: (...args: any[]) => void): number
1158
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1159
+ emit(sigName: string, ...args: any[]): void
1160
+ disconnect(id: number): void
1161
+ }
1162
+
1163
+ /**
1164
+ * `GUnixOutputStream` implements [class`Gio`.OutputStream] for writing to a UNIX
1165
+ * file descriptor, including asynchronous operations. (If the file
1166
+ * descriptor refers to a socket or pipe, this will use `poll()` to do
1167
+ * asynchronous I/O. If it refers to a regular file, it will fall back
1168
+ * to doing asynchronous I/O in another thread.)
1169
+ *
1170
+ * Note that `<gio/gunixoutputstream.h>` belongs to the UNIX-specific GIO
1171
+ * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file
1172
+ * file or the `GioUnix-2.0` GIR namespace when using it.
1173
+ * @class
1174
+ */
1175
+ export class OutputStream {
1176
+
1177
+ // Own properties of GioUnix-2.0.GioUnix.OutputStream
1178
+
1179
+ static name: string
1180
+ static $gtype: GObject.GType<OutputStream>
1181
+
1182
+ // Constructors of GioUnix-2.0.GioUnix.OutputStream
1183
+
1184
+ constructor(config?: OutputStream.ConstructorProperties)
1185
+ /**
1186
+ * Creates a new #GUnixOutputStream for the given `fd`.
1187
+ *
1188
+ * If `close_fd,` is %TRUE, the file descriptor will be closed when
1189
+ * the output stream is destroyed.
1190
+ * @constructor
1191
+ * @param fd a UNIX file descriptor
1192
+ * @param close_fd %TRUE to close the file descriptor when done
1193
+ * @returns a new #GOutputStream
1194
+ */
1195
+ constructor(fd: number, close_fd: boolean)
1196
+ /**
1197
+ * Creates a new #GUnixOutputStream for the given `fd`.
1198
+ *
1199
+ * If `close_fd,` is %TRUE, the file descriptor will be closed when
1200
+ * the output stream is destroyed.
1201
+ * @constructor
1202
+ * @param fd a UNIX file descriptor
1203
+ * @param close_fd %TRUE to close the file descriptor when done
1204
+ * @returns a new #GOutputStream
1205
+ */
1206
+ static new(fd: number, close_fd: boolean): OutputStream
1207
+ _init(config?: OutputStream.ConstructorProperties): void
1208
+ /**
1209
+ * Returns whether the file descriptor of `stream` will be
1210
+ * closed when the stream is closed.
1211
+ * @param stream a #GUnixOutputStream
1212
+ * @returns %TRUE if the file descriptor is closed when done
1213
+ */
1214
+ static get_close_fd(stream: any): boolean
1215
+ /**
1216
+ * Return the UNIX file descriptor that the stream writes to.
1217
+ * @param stream a #GUnixOutputStream
1218
+ * @returns The file descriptor of @stream
1219
+ */
1220
+ static get_fd(stream: any): number
1221
+ /**
1222
+ * Sets whether the file descriptor of `stream` shall be closed
1223
+ * when the stream is closed.
1224
+ * @param stream a #GUnixOutputStream
1225
+ * @param close_fd %TRUE to close the file descriptor when done
1226
+ */
1227
+ static set_close_fd(stream: any, close_fd: boolean): void
1228
+ }
1229
+
1230
+ export interface DesktopAppInfoClass {
1231
+
1232
+ // Own fields of GioUnix-2.0.GioUnix.DesktopAppInfoClass
1233
+
1234
+ parent_class: GObject.ObjectClass
1235
+ }
1236
+
1237
+ export abstract class DesktopAppInfoClass {
1238
+
1239
+ // Own properties of GioUnix-2.0.GioUnix.DesktopAppInfoClass
1240
+
1241
+ static name: string
1242
+ }
1243
+
1244
+ export interface DesktopAppInfoLookupIface {
1245
+
1246
+ // Own fields of GioUnix-2.0.GioUnix.DesktopAppInfoLookupIface
1247
+
1248
+ g_iface: GObject.TypeInterface
1249
+ }
1250
+
1251
+ /**
1252
+ * Interface that is used by backends to associate default
1253
+ * handlers with URI schemes.
1254
+ * @record
1255
+ */
1256
+ export abstract class DesktopAppInfoLookupIface {
1257
+
1258
+ // Own properties of GioUnix-2.0.GioUnix.DesktopAppInfoLookupIface
1259
+
1260
+ static name: string
1261
+ }
1262
+
1263
+ export interface FDMessageClass {
1264
+
1265
+ // Own fields of GioUnix-2.0.GioUnix.FDMessageClass
1266
+
1267
+ parent_class: any
1268
+ }
1269
+
1270
+ export abstract class FDMessageClass {
1271
+
1272
+ // Own properties of GioUnix-2.0.GioUnix.FDMessageClass
1273
+
1274
+ static name: string
1275
+ }
1276
+
1277
+ export interface FDMessagePrivate {
1278
+ }
1279
+
1280
+ export class FDMessagePrivate {
1281
+
1282
+ // Own properties of GioUnix-2.0.GioUnix.FDMessagePrivate
1283
+
1284
+ static name: string
1285
+ }
1286
+
1287
+ export interface FileDescriptorBasedIface {
1288
+
1289
+ // Own fields of GioUnix-2.0.GioUnix.FileDescriptorBasedIface
1290
+
1291
+ /**
1292
+ * The parent interface.
1293
+ * @field
1294
+ */
1295
+ g_iface: GObject.TypeInterface
1296
+ /**
1297
+ * Gets the underlying file descriptor.
1298
+ * @field
1299
+ */
1300
+ get_fd: (fd_based: any) => number
1301
+ }
1302
+
1303
+ /**
1304
+ * An interface for file descriptor based io objects.
1305
+ * @record
1306
+ */
1307
+ export abstract class FileDescriptorBasedIface {
1308
+
1309
+ // Own properties of GioUnix-2.0.GioUnix.FileDescriptorBasedIface
1310
+
1311
+ static name: string
1312
+ }
1313
+
1314
+ export interface InputStreamClass {
1315
+
1316
+ // Own fields of GioUnix-2.0.GioUnix.InputStreamClass
1317
+
1318
+ parent_class: any
1319
+ }
1320
+
1321
+ export abstract class InputStreamClass {
1322
+
1323
+ // Own properties of GioUnix-2.0.GioUnix.InputStreamClass
1324
+
1325
+ static name: string
1326
+ }
1327
+
1328
+ export interface InputStreamPrivate {
1329
+ }
1330
+
1331
+ export class InputStreamPrivate {
1332
+
1333
+ // Own properties of GioUnix-2.0.GioUnix.InputStreamPrivate
1334
+
1335
+ static name: string
1336
+ }
1337
+
1338
+ export interface MountEntry {
1339
+ }
1340
+
1341
+ /**
1342
+ * Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>).
1343
+ * This corresponds roughly to a mtab entry.
1344
+ * @record
1345
+ */
1346
+ export class MountEntry {
1347
+
1348
+ // Own properties of GioUnix-2.0.GioUnix.MountEntry
1349
+
1350
+ static name: string
1351
+ }
1352
+
1353
+ export interface MountMonitorClass {
1354
+ }
1355
+
1356
+ export abstract class MountMonitorClass {
1357
+
1358
+ // Own properties of GioUnix-2.0.GioUnix.MountMonitorClass
1359
+
1360
+ static name: string
1361
+ }
1362
+
1363
+ export interface MountPoint {
1364
+ }
1365
+
1366
+ /**
1367
+ * Defines a Unix mount point (e.g. <filename>/dev</filename>).
1368
+ * This corresponds roughly to a fstab entry.
1369
+ * @record
1370
+ */
1371
+ export class MountPoint {
1372
+
1373
+ // Own properties of GioUnix-2.0.GioUnix.MountPoint
1374
+
1375
+ static name: string
1376
+
1377
+ // Constructors of GioUnix-2.0.GioUnix.MountPoint
1378
+
1379
+ /**
1380
+ * Gets a #GUnixMountPoint for a given mount path. If `time_read` is set, it
1381
+ * will be filled with a unix timestamp for checking if the mount points have
1382
+ * changed since with g_unix_mount_points_changed_since().
1383
+ *
1384
+ * If more mount points have the same mount path, the last matching mount point
1385
+ * is returned.
1386
+ * @param mount_path path for a possible unix mount point.
1387
+ * @returns a #GUnixMountPoint, or %NULL if no match is found.
1388
+ */
1389
+ static at(mount_path: string): [ /* returnType */ any | null, /* time_read */ number ]
1390
+ /**
1391
+ * Compares two unix mount points.
1392
+ * @param mount1 a #GUnixMount.
1393
+ * @param mount2 a #GUnixMount.
1394
+ * @returns 1, 0 or -1 if @mount1 is greater than, equal to, or less than @mount2, respectively.
1395
+ */
1396
+ static compare(mount1: any, mount2: any): number
1397
+ /**
1398
+ * Makes a copy of `mount_point`.
1399
+ * @param mount_point a #GUnixMountPoint.
1400
+ * @returns a new #GUnixMountPoint
1401
+ */
1402
+ static copy(mount_point: any): any
1403
+ /**
1404
+ * Frees a unix mount point.
1405
+ * @param mount_point unix mount point to free.
1406
+ */
1407
+ static free(mount_point: any): void
1408
+ /**
1409
+ * Gets the device path for a unix mount point.
1410
+ * @param mount_point a #GUnixMountPoint.
1411
+ * @returns a string containing the device path.
1412
+ */
1413
+ static get_device_path(mount_point: any): string
1414
+ /**
1415
+ * Gets the file system type for the mount point.
1416
+ * @param mount_point a #GUnixMountPoint.
1417
+ * @returns a string containing the file system type.
1418
+ */
1419
+ static get_fs_type(mount_point: any): string
1420
+ /**
1421
+ * Gets the mount path for a unix mount point.
1422
+ * @param mount_point a #GUnixMountPoint.
1423
+ * @returns a string containing the mount path.
1424
+ */
1425
+ static get_mount_path(mount_point: any): string
1426
+ /**
1427
+ * Gets the options for the mount point.
1428
+ * @param mount_point a #GUnixMountPoint.
1429
+ * @returns a string containing the options.
1430
+ */
1431
+ static get_options(mount_point: any): string | null
1432
+ /**
1433
+ * Guesses whether a Unix mount point can be ejected.
1434
+ * @param mount_point a #GUnixMountPoint
1435
+ * @returns %TRUE if @mount_point is deemed to be ejectable.
1436
+ */
1437
+ static guess_can_eject(mount_point: any): boolean
1438
+ /**
1439
+ * Guesses the icon of a Unix mount point.
1440
+ * @param mount_point a #GUnixMountPoint
1441
+ * @returns a #GIcon
1442
+ */
1443
+ static guess_icon(mount_point: any): any
1444
+ /**
1445
+ * Guesses the name of a Unix mount point.
1446
+ * The result is a translated string.
1447
+ * @param mount_point a #GUnixMountPoint
1448
+ * @returns A newly allocated string that must be freed with g_free()
1449
+ */
1450
+ static guess_name(mount_point: any): string | null
1451
+ /**
1452
+ * Guesses the symbolic icon of a Unix mount point.
1453
+ * @param mount_point a #GUnixMountPoint
1454
+ * @returns a #GIcon
1455
+ */
1456
+ static guess_symbolic_icon(mount_point: any): any
1457
+ /**
1458
+ * Checks if a unix mount point is a loopback device.
1459
+ * @param mount_point a #GUnixMountPoint.
1460
+ * @returns %TRUE if the mount point is a loopback. %FALSE otherwise.
1461
+ */
1462
+ static is_loopback(mount_point: any): boolean
1463
+ /**
1464
+ * Checks if a unix mount point is read only.
1465
+ * @param mount_point a #GUnixMountPoint.
1466
+ * @returns %TRUE if a mount point is read only.
1467
+ */
1468
+ static is_readonly(mount_point: any): boolean
1469
+ /**
1470
+ * Checks if a unix mount point is mountable by the user.
1471
+ * @param mount_point a #GUnixMountPoint.
1472
+ * @returns %TRUE if the mount point is user mountable.
1473
+ */
1474
+ static is_user_mountable(mount_point: any): boolean
1475
+ }
1476
+
1477
+ export interface OutputStreamClass {
1478
+
1479
+ // Own fields of GioUnix-2.0.GioUnix.OutputStreamClass
1480
+
1481
+ parent_class: any
1482
+ }
1483
+
1484
+ export abstract class OutputStreamClass {
1485
+
1486
+ // Own properties of GioUnix-2.0.GioUnix.OutputStreamClass
1487
+
1488
+ static name: string
1489
+ }
1490
+
1491
+ export interface OutputStreamPrivate {
1492
+ }
1493
+
1494
+ export class OutputStreamPrivate {
1495
+
1496
+ // Own properties of GioUnix-2.0.GioUnix.OutputStreamPrivate
1497
+
1498
+ static name: string
1499
+ }
1500
+
1501
+ /**
1502
+ * Name of the imported GIR library
1503
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
1504
+ */
1505
+ export const __name__: string
1506
+ /**
1507
+ * Version of the imported GIR library
1508
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
1509
+ */
1510
+ export const __version__: string
1511
+ // END