@girs/cmenu-3.0 3.0.0-4.0.0-beta.20 → 3.0.0-4.0.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/cmenu-3.0.d.ts +162 -120
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for CMenu-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.
|
|
8
|
+
GJS TypeScript type definitions for CMenu-3.0, generated from library version 3.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.23.
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
## Install
|
package/cmenu-3.0.d.ts
CHANGED
|
@@ -7,10 +7,13 @@
|
|
|
7
7
|
* The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
import '@girs/gjs';
|
|
11
|
+
|
|
10
12
|
// Module dependencies
|
|
11
13
|
import type Gio from '@girs/gio-2.0';
|
|
12
14
|
import type GObject from '@girs/gobject-2.0';
|
|
13
15
|
import type GLib from '@girs/glib-2.0';
|
|
16
|
+
import type GModule from '@girs/gmodule-2.0';
|
|
14
17
|
|
|
15
18
|
export namespace CMenu {
|
|
16
19
|
/**
|
|
@@ -238,53 +241,53 @@ export namespace CMenu {
|
|
|
238
241
|
* Adds a content type to the application information to indicate the
|
|
239
242
|
* application is capable of opening files with the given content type.
|
|
240
243
|
* @param content_type a string.
|
|
241
|
-
* @returns
|
|
244
|
+
* @returns `TRUE` on success, `FALSE` on error.
|
|
242
245
|
*/
|
|
243
246
|
add_supports_type(content_type: string): boolean;
|
|
244
247
|
/**
|
|
245
|
-
* Obtains the information whether the
|
|
246
|
-
* See
|
|
247
|
-
* @returns
|
|
248
|
+
* Obtains the information whether the [iface`Gio`.AppInfo] can be deleted.
|
|
249
|
+
* See [method`Gio`.AppInfo.delete].
|
|
250
|
+
* @returns `TRUE` if @appinfo can be deleted
|
|
248
251
|
*/
|
|
249
252
|
can_delete(): boolean;
|
|
250
253
|
/**
|
|
251
254
|
* Checks if a supported content type can be removed from an application.
|
|
252
|
-
* @returns
|
|
255
|
+
* @returns `TRUE` if it is possible to remove supported content types from a given @appinfo, `FALSE` if not.
|
|
253
256
|
*/
|
|
254
257
|
can_remove_supports_type(): boolean;
|
|
255
258
|
/**
|
|
256
|
-
* Tries to delete a
|
|
259
|
+
* Tries to delete a [iface`Gio`.AppInfo].
|
|
257
260
|
*
|
|
258
261
|
* On some platforms, there may be a difference between user-defined
|
|
259
|
-
*
|
|
260
|
-
* See
|
|
261
|
-
* @returns
|
|
262
|
+
* [iface`Gio`.AppInfo]s which can be deleted, and system-wide ones which cannot.
|
|
263
|
+
* See [method`Gio`.AppInfo.can_delete].
|
|
264
|
+
* @returns `TRUE` if @appinfo has been deleted
|
|
262
265
|
*/
|
|
263
266
|
['delete'](): boolean;
|
|
264
267
|
/**
|
|
265
|
-
* Creates a duplicate of a
|
|
268
|
+
* Creates a duplicate of a [iface`Gio`.AppInfo].
|
|
266
269
|
* @returns a duplicate of @appinfo.
|
|
267
270
|
*/
|
|
268
271
|
dup(): Gio.AppInfo;
|
|
269
272
|
/**
|
|
270
|
-
* Checks if two
|
|
273
|
+
* Checks if two [iface`Gio`.AppInfo]s are equal.
|
|
271
274
|
*
|
|
272
|
-
* Note that the check *may not* compare each individual
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* @param appinfo2 the second
|
|
276
|
-
* @returns
|
|
275
|
+
* Note that the check *may not* compare each individual field, and only does
|
|
276
|
+
* an identity check. In case detecting changes in the contents is needed,
|
|
277
|
+
* program code must additionally compare relevant fields.
|
|
278
|
+
* @param appinfo2 the second [iface@Gio.AppInfo].
|
|
279
|
+
* @returns `TRUE` if @appinfo1 is equal to @appinfo2. `FALSE` otherwise.
|
|
277
280
|
*/
|
|
278
281
|
equal(appinfo2: Gio.AppInfo): boolean;
|
|
279
282
|
/**
|
|
280
283
|
* Gets the commandline with which the application will be
|
|
281
284
|
* started.
|
|
282
|
-
* @returns a string containing the @appinfo
|
|
285
|
+
* @returns a string containing the @appinfo’s commandline, or `NULL` if this information is not available
|
|
283
286
|
*/
|
|
284
287
|
get_commandline(): string | null;
|
|
285
288
|
/**
|
|
286
289
|
* Gets a human-readable description of an installed application.
|
|
287
|
-
* @returns a string containing a description of the application @appinfo, or
|
|
290
|
+
* @returns a string containing a description of the application @appinfo, or `NULL` if none.
|
|
288
291
|
*/
|
|
289
292
|
get_description(): string | null;
|
|
290
293
|
/**
|
|
@@ -294,28 +297,27 @@ export namespace CMenu {
|
|
|
294
297
|
*/
|
|
295
298
|
get_display_name(): string;
|
|
296
299
|
/**
|
|
297
|
-
* Gets the executable
|
|
300
|
+
* Gets the executable’s name for the installed application.
|
|
298
301
|
*
|
|
299
302
|
* This is intended to be used for debugging or labelling what program is going
|
|
300
|
-
* to be run. To launch the executable, use
|
|
303
|
+
* to be run. To launch the executable, use [method`Gio`.AppInfo.launch] and related
|
|
301
304
|
* functions, rather than spawning the return value from this function.
|
|
302
|
-
* @returns a string containing the @appinfo
|
|
305
|
+
* @returns a string containing the @appinfo’s application binaries name
|
|
303
306
|
*/
|
|
304
307
|
get_executable(): string;
|
|
305
308
|
/**
|
|
306
309
|
* Gets the icon for the application.
|
|
307
|
-
* @returns the default
|
|
310
|
+
* @returns the default [iface@Gio.Icon] for @appinfo or `NULL` if there is no default icon.
|
|
308
311
|
*/
|
|
309
312
|
get_icon(): Gio.Icon | null;
|
|
310
313
|
/**
|
|
311
|
-
* Gets the ID of an application. An id is a string that
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
* desktop file id from the xdg menu specification.
|
|
314
|
+
* Gets the ID of an application. An id is a string that identifies the
|
|
315
|
+
* application. The exact format of the id is platform dependent. For instance,
|
|
316
|
+
* on Unix this is the desktop file id from the xdg menu specification.
|
|
315
317
|
*
|
|
316
|
-
* Note that the returned ID may be
|
|
317
|
-
*
|
|
318
|
-
* @returns a string containing the application
|
|
318
|
+
* Note that the returned ID may be `NULL`, depending on how the `appinfo` has
|
|
319
|
+
* been constructed.
|
|
320
|
+
* @returns a string containing the application’s ID.
|
|
319
321
|
*/
|
|
320
322
|
get_id(): string | null;
|
|
321
323
|
/**
|
|
@@ -326,9 +328,10 @@ export namespace CMenu {
|
|
|
326
328
|
/**
|
|
327
329
|
* Retrieves the list of content types that `app_info` claims to support.
|
|
328
330
|
* If this information is not provided by the environment, this function
|
|
329
|
-
* will return
|
|
331
|
+
* will return `NULL`.
|
|
332
|
+
*
|
|
330
333
|
* This function does not take in consideration associations added with
|
|
331
|
-
*
|
|
334
|
+
* [method`Gio`.AppInfo.add_supports_type], but only those exported directly by
|
|
332
335
|
* the application.
|
|
333
336
|
* @returns a list of content types.
|
|
334
337
|
*/
|
|
@@ -339,7 +342,7 @@ export namespace CMenu {
|
|
|
339
342
|
* about the details of the launcher (like what screen it is on).
|
|
340
343
|
* On error, `error` will be set accordingly.
|
|
341
344
|
*
|
|
342
|
-
* To launch the application without arguments pass a
|
|
345
|
+
* To launch the application without arguments pass a `NULL` `files` list.
|
|
343
346
|
*
|
|
344
347
|
* Note that even if the launch is successful the application launched
|
|
345
348
|
* can fail to start if it runs into problems during startup. There is
|
|
@@ -348,11 +351,11 @@ export namespace CMenu {
|
|
|
348
351
|
* Some URIs can be changed when passed through a GFile (for instance
|
|
349
352
|
* unsupported URIs with strange formats like mailto:), so if you have
|
|
350
353
|
* a textual URI you want to pass in as argument, consider using
|
|
351
|
-
*
|
|
354
|
+
* [method`Gio`.AppInfo.launch_uris] instead.
|
|
352
355
|
*
|
|
353
356
|
* The launched application inherits the environment of the launching
|
|
354
|
-
* process, but it can be modified with
|
|
355
|
-
* and
|
|
357
|
+
* process, but it can be modified with [method`Gio`.AppLaunchContext.setenv]
|
|
358
|
+
* and [method`Gio`.AppLaunchContext.unsetenv].
|
|
356
359
|
*
|
|
357
360
|
* On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE`
|
|
358
361
|
* environment variable with the path of the launched desktop file and
|
|
@@ -361,9 +364,9 @@ export namespace CMenu {
|
|
|
361
364
|
* should it be inherited by further processes. The `DISPLAY`,
|
|
362
365
|
* `XDG_ACTIVATION_TOKEN` and `DESKTOP_STARTUP_ID` environment
|
|
363
366
|
* variables are also set, based on information provided in `context`.
|
|
364
|
-
* @param files a
|
|
365
|
-
* @param context
|
|
366
|
-
* @returns
|
|
367
|
+
* @param files a list of [iface@Gio.File] objects
|
|
368
|
+
* @param context the launch context
|
|
369
|
+
* @returns `TRUE` on successful launch, `FALSE` otherwise.
|
|
367
370
|
*/
|
|
368
371
|
launch(files?: Gio.File[] | null, context?: Gio.AppLaunchContext | null): boolean;
|
|
369
372
|
/**
|
|
@@ -374,26 +377,26 @@ export namespace CMenu {
|
|
|
374
377
|
* one URI per invocation as part of their command-line, multiple instances
|
|
375
378
|
* of the application will be spawned.
|
|
376
379
|
*
|
|
377
|
-
* To launch the application without arguments pass a
|
|
380
|
+
* To launch the application without arguments pass a `NULL` `uris` list.
|
|
378
381
|
*
|
|
379
382
|
* Note that even if the launch is successful the application launched
|
|
380
383
|
* can fail to start if it runs into problems during startup. There is
|
|
381
384
|
* no way to detect this.
|
|
382
|
-
* @param uris a
|
|
383
|
-
* @param context
|
|
384
|
-
* @returns
|
|
385
|
+
* @param uris a list of URIs to launch.
|
|
386
|
+
* @param context the launch context
|
|
387
|
+
* @returns `TRUE` on successful launch, `FALSE` otherwise.
|
|
385
388
|
*/
|
|
386
389
|
launch_uris(uris?: string[] | null, context?: Gio.AppLaunchContext | null): boolean;
|
|
387
390
|
/**
|
|
388
|
-
* Async version of
|
|
391
|
+
* Async version of [method`Gio`.AppInfo.launch_uris].
|
|
389
392
|
*
|
|
390
393
|
* The `callback` is invoked immediately after the application launch, but it
|
|
391
394
|
* waits for activation in case of D-Bus–activated applications and also provides
|
|
392
395
|
* extended error information for sandboxed applications, see notes for
|
|
393
|
-
*
|
|
394
|
-
* @param uris a
|
|
395
|
-
* @param context
|
|
396
|
-
* @param cancellable a
|
|
396
|
+
* [func`Gio`.AppInfo.launch_default_for_uri_async].
|
|
397
|
+
* @param uris a list of URIs to launch.
|
|
398
|
+
* @param context the launch context
|
|
399
|
+
* @param cancellable a [class@Gio.Cancellable]
|
|
397
400
|
*/
|
|
398
401
|
launch_uris_async(
|
|
399
402
|
uris?: string[] | null,
|
|
@@ -401,16 +404,16 @@ export namespace CMenu {
|
|
|
401
404
|
cancellable?: Gio.Cancellable | null,
|
|
402
405
|
): Promise<boolean>;
|
|
403
406
|
/**
|
|
404
|
-
* Async version of
|
|
407
|
+
* Async version of [method`Gio`.AppInfo.launch_uris].
|
|
405
408
|
*
|
|
406
409
|
* The `callback` is invoked immediately after the application launch, but it
|
|
407
410
|
* waits for activation in case of D-Bus–activated applications and also provides
|
|
408
411
|
* extended error information for sandboxed applications, see notes for
|
|
409
|
-
*
|
|
410
|
-
* @param uris a
|
|
411
|
-
* @param context
|
|
412
|
-
* @param cancellable a
|
|
413
|
-
* @param callback a
|
|
412
|
+
* [func`Gio`.AppInfo.launch_default_for_uri_async].
|
|
413
|
+
* @param uris a list of URIs to launch.
|
|
414
|
+
* @param context the launch context
|
|
415
|
+
* @param cancellable a [class@Gio.Cancellable]
|
|
416
|
+
* @param callback a [type@Gio.AsyncReadyCallback] to call when the request is done
|
|
414
417
|
*/
|
|
415
418
|
launch_uris_async(
|
|
416
419
|
uris: string[] | null,
|
|
@@ -419,16 +422,16 @@ export namespace CMenu {
|
|
|
419
422
|
callback: Gio.AsyncReadyCallback<this> | null,
|
|
420
423
|
): void;
|
|
421
424
|
/**
|
|
422
|
-
* Async version of
|
|
425
|
+
* Async version of [method`Gio`.AppInfo.launch_uris].
|
|
423
426
|
*
|
|
424
427
|
* The `callback` is invoked immediately after the application launch, but it
|
|
425
428
|
* waits for activation in case of D-Bus–activated applications and also provides
|
|
426
429
|
* extended error information for sandboxed applications, see notes for
|
|
427
|
-
*
|
|
428
|
-
* @param uris a
|
|
429
|
-
* @param context
|
|
430
|
-
* @param cancellable a
|
|
431
|
-
* @param callback a
|
|
430
|
+
* [func`Gio`.AppInfo.launch_default_for_uri_async].
|
|
431
|
+
* @param uris a list of URIs to launch.
|
|
432
|
+
* @param context the launch context
|
|
433
|
+
* @param cancellable a [class@Gio.Cancellable]
|
|
434
|
+
* @param callback a [type@Gio.AsyncReadyCallback] to call when the request is done
|
|
432
435
|
*/
|
|
433
436
|
launch_uris_async(
|
|
434
437
|
uris?: string[] | null,
|
|
@@ -437,52 +440,52 @@ export namespace CMenu {
|
|
|
437
440
|
callback?: Gio.AsyncReadyCallback<this> | null,
|
|
438
441
|
): Promise<boolean> | void;
|
|
439
442
|
/**
|
|
440
|
-
* Finishes a
|
|
441
|
-
* @param result
|
|
442
|
-
* @returns
|
|
443
|
+
* Finishes a [method`Gio`.AppInfo.launch_uris_async] operation.
|
|
444
|
+
* @param result the async result
|
|
445
|
+
* @returns `TRUE` on successful launch, `FALSE` otherwise.
|
|
443
446
|
*/
|
|
444
447
|
launch_uris_finish(result: Gio.AsyncResult): boolean;
|
|
445
448
|
/**
|
|
446
449
|
* Removes a supported type from an application, if possible.
|
|
447
450
|
* @param content_type a string.
|
|
448
|
-
* @returns
|
|
451
|
+
* @returns `TRUE` on success, `FALSE` on error.
|
|
449
452
|
*/
|
|
450
453
|
remove_supports_type(content_type: string): boolean;
|
|
451
454
|
/**
|
|
452
455
|
* Sets the application as the default handler for the given file extension.
|
|
453
|
-
* @param extension a string containing the file extension
|
|
454
|
-
* @returns
|
|
456
|
+
* @param extension a string containing the file extension (without the dot).
|
|
457
|
+
* @returns `TRUE` on success, `FALSE` on error.
|
|
455
458
|
*/
|
|
456
459
|
set_as_default_for_extension(extension: string): boolean;
|
|
457
460
|
/**
|
|
458
461
|
* Sets the application as the default handler for a given type.
|
|
459
462
|
* @param content_type the content type.
|
|
460
|
-
* @returns
|
|
463
|
+
* @returns `TRUE` on success, `FALSE` on error.
|
|
461
464
|
*/
|
|
462
465
|
set_as_default_for_type(content_type: string): boolean;
|
|
463
466
|
/**
|
|
464
|
-
* Sets the application as the last used application for a given type.
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
+
* Sets the application as the last used application for a given type. This
|
|
468
|
+
* will make the application appear as first in the list returned by
|
|
469
|
+
* [func`Gio`.AppInfo.get_recommended_for_type], regardless of the default
|
|
467
470
|
* application for that content type.
|
|
468
471
|
* @param content_type the content type.
|
|
469
|
-
* @returns
|
|
472
|
+
* @returns `TRUE` on success, `FALSE` on error.
|
|
470
473
|
*/
|
|
471
474
|
set_as_last_used_for_type(content_type: string): boolean;
|
|
472
475
|
/**
|
|
473
476
|
* Checks if the application info should be shown in menus that
|
|
474
477
|
* list available applications.
|
|
475
|
-
* @returns
|
|
478
|
+
* @returns `TRUE` if the @appinfo should be shown, `FALSE` otherwise.
|
|
476
479
|
*/
|
|
477
480
|
should_show(): boolean;
|
|
478
481
|
/**
|
|
479
482
|
* Checks if the application accepts files as arguments.
|
|
480
|
-
* @returns
|
|
483
|
+
* @returns `TRUE` if the @appinfo supports files.
|
|
481
484
|
*/
|
|
482
485
|
supports_files(): boolean;
|
|
483
486
|
/**
|
|
484
487
|
* Checks if the application supports reading files and directories from URIs.
|
|
485
|
-
* @returns
|
|
488
|
+
* @returns `TRUE` if the @appinfo supports URIs.
|
|
486
489
|
*/
|
|
487
490
|
supports_uris(): boolean;
|
|
488
491
|
/**
|
|
@@ -492,8 +495,8 @@ export namespace CMenu {
|
|
|
492
495
|
*/
|
|
493
496
|
vfunc_add_supports_type(content_type: string): boolean;
|
|
494
497
|
/**
|
|
495
|
-
* Obtains the information whether the
|
|
496
|
-
* See
|
|
498
|
+
* Obtains the information whether the [iface`Gio`.AppInfo] can be deleted.
|
|
499
|
+
* See [method`Gio`.AppInfo.delete].
|
|
497
500
|
*/
|
|
498
501
|
vfunc_can_delete(): boolean;
|
|
499
502
|
/**
|
|
@@ -501,24 +504,24 @@ export namespace CMenu {
|
|
|
501
504
|
*/
|
|
502
505
|
vfunc_can_remove_supports_type(): boolean;
|
|
503
506
|
/**
|
|
504
|
-
* Tries to delete a
|
|
507
|
+
* Tries to delete a [iface`Gio`.AppInfo].
|
|
505
508
|
*
|
|
506
509
|
* On some platforms, there may be a difference between user-defined
|
|
507
|
-
*
|
|
508
|
-
* See
|
|
510
|
+
* [iface`Gio`.AppInfo]s which can be deleted, and system-wide ones which cannot.
|
|
511
|
+
* See [method`Gio`.AppInfo.can_delete].
|
|
509
512
|
*/
|
|
510
513
|
vfunc_do_delete(): boolean;
|
|
511
514
|
/**
|
|
512
|
-
* Creates a duplicate of a
|
|
515
|
+
* Creates a duplicate of a [iface`Gio`.AppInfo].
|
|
513
516
|
*/
|
|
514
517
|
vfunc_dup(): Gio.AppInfo;
|
|
515
518
|
/**
|
|
516
|
-
* Checks if two
|
|
519
|
+
* Checks if two [iface`Gio`.AppInfo]s are equal.
|
|
517
520
|
*
|
|
518
|
-
* Note that the check *may not* compare each individual
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
* @param appinfo2 the second
|
|
521
|
+
* Note that the check *may not* compare each individual field, and only does
|
|
522
|
+
* an identity check. In case detecting changes in the contents is needed,
|
|
523
|
+
* program code must additionally compare relevant fields.
|
|
524
|
+
* @param appinfo2 the second [iface@Gio.AppInfo].
|
|
522
525
|
*/
|
|
523
526
|
vfunc_equal(appinfo2: Gio.AppInfo): boolean;
|
|
524
527
|
/**
|
|
@@ -536,10 +539,10 @@ export namespace CMenu {
|
|
|
536
539
|
*/
|
|
537
540
|
vfunc_get_display_name(): string;
|
|
538
541
|
/**
|
|
539
|
-
* Gets the executable
|
|
542
|
+
* Gets the executable’s name for the installed application.
|
|
540
543
|
*
|
|
541
544
|
* This is intended to be used for debugging or labelling what program is going
|
|
542
|
-
* to be run. To launch the executable, use
|
|
545
|
+
* to be run. To launch the executable, use [method`Gio`.AppInfo.launch] and related
|
|
543
546
|
* functions, rather than spawning the return value from this function.
|
|
544
547
|
*/
|
|
545
548
|
vfunc_get_executable(): string;
|
|
@@ -548,13 +551,12 @@ export namespace CMenu {
|
|
|
548
551
|
*/
|
|
549
552
|
vfunc_get_icon(): Gio.Icon | null;
|
|
550
553
|
/**
|
|
551
|
-
* Gets the ID of an application. An id is a string that
|
|
552
|
-
*
|
|
553
|
-
*
|
|
554
|
-
* desktop file id from the xdg menu specification.
|
|
554
|
+
* Gets the ID of an application. An id is a string that identifies the
|
|
555
|
+
* application. The exact format of the id is platform dependent. For instance,
|
|
556
|
+
* on Unix this is the desktop file id from the xdg menu specification.
|
|
555
557
|
*
|
|
556
|
-
* Note that the returned ID may be
|
|
557
|
-
*
|
|
558
|
+
* Note that the returned ID may be `NULL`, depending on how the `appinfo` has
|
|
559
|
+
* been constructed.
|
|
558
560
|
*/
|
|
559
561
|
vfunc_get_id(): string | null;
|
|
560
562
|
/**
|
|
@@ -564,9 +566,10 @@ export namespace CMenu {
|
|
|
564
566
|
/**
|
|
565
567
|
* Retrieves the list of content types that `app_info` claims to support.
|
|
566
568
|
* If this information is not provided by the environment, this function
|
|
567
|
-
* will return
|
|
569
|
+
* will return `NULL`.
|
|
570
|
+
*
|
|
568
571
|
* This function does not take in consideration associations added with
|
|
569
|
-
*
|
|
572
|
+
* [method`Gio`.AppInfo.add_supports_type], but only those exported directly by
|
|
570
573
|
* the application.
|
|
571
574
|
*/
|
|
572
575
|
vfunc_get_supported_types(): string[];
|
|
@@ -576,7 +579,7 @@ export namespace CMenu {
|
|
|
576
579
|
* about the details of the launcher (like what screen it is on).
|
|
577
580
|
* On error, `error` will be set accordingly.
|
|
578
581
|
*
|
|
579
|
-
* To launch the application without arguments pass a
|
|
582
|
+
* To launch the application without arguments pass a `NULL` `files` list.
|
|
580
583
|
*
|
|
581
584
|
* Note that even if the launch is successful the application launched
|
|
582
585
|
* can fail to start if it runs into problems during startup. There is
|
|
@@ -585,11 +588,11 @@ export namespace CMenu {
|
|
|
585
588
|
* Some URIs can be changed when passed through a GFile (for instance
|
|
586
589
|
* unsupported URIs with strange formats like mailto:), so if you have
|
|
587
590
|
* a textual URI you want to pass in as argument, consider using
|
|
588
|
-
*
|
|
591
|
+
* [method`Gio`.AppInfo.launch_uris] instead.
|
|
589
592
|
*
|
|
590
593
|
* The launched application inherits the environment of the launching
|
|
591
|
-
* process, but it can be modified with
|
|
592
|
-
* and
|
|
594
|
+
* process, but it can be modified with [method`Gio`.AppLaunchContext.setenv]
|
|
595
|
+
* and [method`Gio`.AppLaunchContext.unsetenv].
|
|
593
596
|
*
|
|
594
597
|
* On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE`
|
|
595
598
|
* environment variable with the path of the launched desktop file and
|
|
@@ -598,8 +601,8 @@ export namespace CMenu {
|
|
|
598
601
|
* should it be inherited by further processes. The `DISPLAY`,
|
|
599
602
|
* `XDG_ACTIVATION_TOKEN` and `DESKTOP_STARTUP_ID` environment
|
|
600
603
|
* variables are also set, based on information provided in `context`.
|
|
601
|
-
* @param files a
|
|
602
|
-
* @param context
|
|
604
|
+
* @param files a list of [iface@Gio.File] objects
|
|
605
|
+
* @param context the launch context
|
|
603
606
|
*/
|
|
604
607
|
vfunc_launch(files?: Gio.File[] | null, context?: Gio.AppLaunchContext | null): boolean;
|
|
605
608
|
/**
|
|
@@ -610,26 +613,26 @@ export namespace CMenu {
|
|
|
610
613
|
* one URI per invocation as part of their command-line, multiple instances
|
|
611
614
|
* of the application will be spawned.
|
|
612
615
|
*
|
|
613
|
-
* To launch the application without arguments pass a
|
|
616
|
+
* To launch the application without arguments pass a `NULL` `uris` list.
|
|
614
617
|
*
|
|
615
618
|
* Note that even if the launch is successful the application launched
|
|
616
619
|
* can fail to start if it runs into problems during startup. There is
|
|
617
620
|
* no way to detect this.
|
|
618
|
-
* @param uris a
|
|
619
|
-
* @param context
|
|
621
|
+
* @param uris a list of URIs to launch.
|
|
622
|
+
* @param context the launch context
|
|
620
623
|
*/
|
|
621
624
|
vfunc_launch_uris(uris?: string[] | null, context?: Gio.AppLaunchContext | null): boolean;
|
|
622
625
|
/**
|
|
623
|
-
* Async version of
|
|
626
|
+
* Async version of [method`Gio`.AppInfo.launch_uris].
|
|
624
627
|
*
|
|
625
628
|
* The `callback` is invoked immediately after the application launch, but it
|
|
626
629
|
* waits for activation in case of D-Bus–activated applications and also provides
|
|
627
630
|
* extended error information for sandboxed applications, see notes for
|
|
628
|
-
*
|
|
629
|
-
* @param uris a
|
|
630
|
-
* @param context
|
|
631
|
-
* @param cancellable a
|
|
632
|
-
* @param callback a
|
|
631
|
+
* [func`Gio`.AppInfo.launch_default_for_uri_async].
|
|
632
|
+
* @param uris a list of URIs to launch.
|
|
633
|
+
* @param context the launch context
|
|
634
|
+
* @param cancellable a [class@Gio.Cancellable]
|
|
635
|
+
* @param callback a [type@Gio.AsyncReadyCallback] to call when the request is done
|
|
633
636
|
*/
|
|
634
637
|
vfunc_launch_uris_async(
|
|
635
638
|
uris?: string[] | null,
|
|
@@ -638,8 +641,8 @@ export namespace CMenu {
|
|
|
638
641
|
callback?: Gio.AsyncReadyCallback<this> | null,
|
|
639
642
|
): void;
|
|
640
643
|
/**
|
|
641
|
-
* Finishes a
|
|
642
|
-
* @param result
|
|
644
|
+
* Finishes a [method`Gio`.AppInfo.launch_uris_async] operation.
|
|
645
|
+
* @param result the async result
|
|
643
646
|
*/
|
|
644
647
|
vfunc_launch_uris_finish(result: Gio.AsyncResult): boolean;
|
|
645
648
|
/**
|
|
@@ -649,7 +652,7 @@ export namespace CMenu {
|
|
|
649
652
|
vfunc_remove_supports_type(content_type: string): boolean;
|
|
650
653
|
/**
|
|
651
654
|
* Sets the application as the default handler for the given file extension.
|
|
652
|
-
* @param extension a string containing the file extension
|
|
655
|
+
* @param extension a string containing the file extension (without the dot).
|
|
653
656
|
*/
|
|
654
657
|
vfunc_set_as_default_for_extension(extension: string): boolean;
|
|
655
658
|
/**
|
|
@@ -658,9 +661,9 @@ export namespace CMenu {
|
|
|
658
661
|
*/
|
|
659
662
|
vfunc_set_as_default_for_type(content_type: string): boolean;
|
|
660
663
|
/**
|
|
661
|
-
* Sets the application as the last used application for a given type.
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
+
* Sets the application as the last used application for a given type. This
|
|
665
|
+
* will make the application appear as first in the list returned by
|
|
666
|
+
* [func`Gio`.AppInfo.get_recommended_for_type], regardless of the default
|
|
664
667
|
* application for that content type.
|
|
665
668
|
* @param content_type the content type.
|
|
666
669
|
*/
|
|
@@ -795,7 +798,21 @@ export namespace CMenu {
|
|
|
795
798
|
* @returns the data if found, or %NULL if no such data exists.
|
|
796
799
|
*/
|
|
797
800
|
get_data(key: string): any | null;
|
|
798
|
-
|
|
801
|
+
/**
|
|
802
|
+
* Gets a property of an object.
|
|
803
|
+
*
|
|
804
|
+
* The value can be:
|
|
805
|
+
* - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
|
|
806
|
+
* - a GObject.Value initialized with the expected type of the property
|
|
807
|
+
* - a GObject.Value initialized with a type to which the expected type of the property can be transformed
|
|
808
|
+
*
|
|
809
|
+
* In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
|
|
810
|
+
*
|
|
811
|
+
* Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
|
|
812
|
+
* @param property_name The name of the property to get
|
|
813
|
+
* @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
|
|
814
|
+
*/
|
|
815
|
+
get_property(property_name: string, value: GObject.Value | any): any;
|
|
799
816
|
/**
|
|
800
817
|
* This function gets back user data pointers stored via
|
|
801
818
|
* g_object_set_qdata().
|
|
@@ -923,7 +940,12 @@ export namespace CMenu {
|
|
|
923
940
|
* @param data data to associate with that key
|
|
924
941
|
*/
|
|
925
942
|
set_data(key: string, data?: any | null): void;
|
|
926
|
-
|
|
943
|
+
/**
|
|
944
|
+
* Sets a property on an object.
|
|
945
|
+
* @param property_name The name of the property to set
|
|
946
|
+
* @param value The value to set the property to
|
|
947
|
+
*/
|
|
948
|
+
set_property(property_name: string, value: GObject.Value | any): void;
|
|
927
949
|
/**
|
|
928
950
|
* Remove a specified datum from the object's data associations,
|
|
929
951
|
* without invoking the association's destroy handler.
|
|
@@ -1073,11 +1095,31 @@ export namespace CMenu {
|
|
|
1073
1095
|
* @param pspec
|
|
1074
1096
|
*/
|
|
1075
1097
|
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
|
1098
|
+
/**
|
|
1099
|
+
* Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
|
|
1100
|
+
* @param id Handler ID of the handler to be disconnected
|
|
1101
|
+
*/
|
|
1076
1102
|
disconnect(id: number): void;
|
|
1103
|
+
/**
|
|
1104
|
+
* Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
|
|
1105
|
+
* @param properties Object containing the properties to set
|
|
1106
|
+
*/
|
|
1077
1107
|
set(properties: { [key: string]: any }): void;
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1108
|
+
/**
|
|
1109
|
+
* Blocks a handler of an instance so it will not be called during any signal emissions
|
|
1110
|
+
* @param id Handler ID of the handler to be blocked
|
|
1111
|
+
*/
|
|
1112
|
+
block_signal_handler(id: number): void;
|
|
1113
|
+
/**
|
|
1114
|
+
* Unblocks a handler so it will be called again during any signal emissions
|
|
1115
|
+
* @param id Handler ID of the handler to be unblocked
|
|
1116
|
+
*/
|
|
1117
|
+
unblock_signal_handler(id: number): void;
|
|
1118
|
+
/**
|
|
1119
|
+
* Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
|
|
1120
|
+
* @param detailedName Name of the signal to stop emission of
|
|
1121
|
+
*/
|
|
1122
|
+
stop_emission_by_name(detailedName: string): void;
|
|
1081
1123
|
}
|
|
1082
1124
|
|
|
1083
1125
|
namespace Tree {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/cmenu-3.0",
|
|
3
|
-
"version": "3.0.0-4.0.0-beta.
|
|
3
|
+
"version": "3.0.0-4.0.0-beta.23",
|
|
4
4
|
"description": "GJS TypeScript type definitions for CMenu-3.0, generated from library version 3.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "cmenu-3.0.js",
|
|
@@ -31,10 +31,11 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gio-2.0": "^2.
|
|
35
|
-
"@girs/gjs": "^4.0.0-beta.
|
|
36
|
-
"@girs/glib-2.0": "^2.
|
|
37
|
-
"@girs/
|
|
34
|
+
"@girs/gio-2.0": "^2.84.0-4.0.0-beta.23",
|
|
35
|
+
"@girs/gjs": "^4.0.0-beta.23",
|
|
36
|
+
"@girs/glib-2.0": "^2.84.0-4.0.0-beta.23",
|
|
37
|
+
"@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.23",
|
|
38
|
+
"@girs/gobject-2.0": "^2.84.0-4.0.0-beta.23"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"typescript": "*"
|