@girs/unity-7.0 7.0.0-4.0.0-beta.2 → 7.0.0-4.0.0-beta.3
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 -19
- package/package.json +7 -8
- package/unity-7.0.d.ts +174 -120
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Unity-7.0, generated from library version 7.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.
|
|
8
|
+
GJS TypeScript type definitions for Unity-7.0, generated from library version 7.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
## Install
|
|
@@ -22,11 +22,6 @@ You can import this package into your project like this:
|
|
|
22
22
|
import Unity from '@girs/unity-7.0';
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Or if you prefer CommonJS, you can also use this:
|
|
26
|
-
```ts
|
|
27
|
-
const Unity = require('@girs/unity-7.0');
|
|
28
|
-
```
|
|
29
|
-
|
|
30
25
|
### Ambient Modules
|
|
31
26
|
|
|
32
27
|
You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
|
|
@@ -81,19 +76,6 @@ Now you have also type support for this, too:
|
|
|
81
76
|
const Unity = imports.gi.Unity;
|
|
82
77
|
```
|
|
83
78
|
|
|
84
|
-
|
|
85
|
-
### ESM vs. CommonJS
|
|
86
|
-
|
|
87
|
-
GJS supports two different import syntaxes. The new modern ESM syntax and the old global imports syntax.
|
|
88
|
-
|
|
89
|
-
In TypeScript projects for GJS and GNOME Shell extensions, you have the flexibility to use `ESM` syntax and then decide the import syntax for your bundled file. If your bundler is configured to use `CommonJS`, it will convert to the GJS-specific global imports syntax, like `const moduleName = imports.gi[moduleName]`. This is different from the traditional `require` syntax seen in Node.js. The global imports syntax is chosen because it aligns with the CommonJS format supported by NPM, which is used for the generated type definitions and this package.
|
|
90
|
-
|
|
91
|
-
On the other hand, if you configure your bundler to use ESM, it will retain the ESM import syntax. It's crucial to ensure that your bundler is set up to correctly translate and bundle these imports into either CommonJS or ESM format, depending on your project's requirements.
|
|
92
|
-
|
|
93
|
-
This approach is particularly important due to the `@girs` types, which include both `*.cjs `files, using the GJS global imports syntax, and `*.js` files, which utilize the ESM syntax. By appropriately setting up your bundler, you can control which syntax—CommonJS or ESM—is used in your project. The choice of CommonJS in this context is also due to the similarity between the GJS-specific global imports and CommonJS syntax, allowing for easier management and bundling in these specific types of projects.
|
|
94
|
-
|
|
95
|
-
Since GNOME Shell 45, you should only use ESM, even for GNOME Shell extensions. Before that, extensions had to use the global import syntax, unlike normal GJS applications, where ESM has been available for some time.
|
|
96
|
-
|
|
97
79
|
### Bundle
|
|
98
80
|
|
|
99
81
|
Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/unity-7.0",
|
|
3
|
-
"version": "7.0.0-4.0.0-beta.
|
|
3
|
+
"version": "7.0.0-4.0.0-beta.3",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Unity-7.0, generated from library version 7.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "unity-7.0.js",
|
|
@@ -26,13 +26,12 @@
|
|
|
26
26
|
"test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit unity-7.0.d.ts"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@girs/dbusmenu-0.4": "^0.4.0-4.0.0-beta.
|
|
30
|
-
"@girs/dee-1.0": "^1.0.0-4.0.0-beta.
|
|
31
|
-
"@girs/gio-2.0": "^2.80.0-4.0.0-beta.
|
|
32
|
-
"@girs/gjs": "^4.0.0-beta.
|
|
33
|
-
"@girs/glib-2.0": "^2.80.0-4.0.0-beta.
|
|
34
|
-
"@girs/
|
|
35
|
-
"@girs/gobject-2.0": "^2.80.0-4.0.0-beta.2"
|
|
29
|
+
"@girs/dbusmenu-0.4": "^0.4.0-4.0.0-beta.3",
|
|
30
|
+
"@girs/dee-1.0": "^1.0.0-4.0.0-beta.3",
|
|
31
|
+
"@girs/gio-2.0": "^2.80.0-4.0.0-beta.3",
|
|
32
|
+
"@girs/gjs": "^4.0.0-beta.3",
|
|
33
|
+
"@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
|
|
34
|
+
"@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
37
|
"typescript": "*"
|
package/unity-7.0.d.ts
CHANGED
|
@@ -11,12 +11,11 @@ import './unity-7.0-ambient.d.ts';
|
|
|
11
11
|
* Unity-7.0
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import type GLib from '@girs/glib-2.0';
|
|
15
14
|
import type Dbusmenu from '@girs/dbusmenu-0.4';
|
|
16
15
|
import type GObject from '@girs/gobject-2.0';
|
|
16
|
+
import type GLib from '@girs/glib-2.0';
|
|
17
17
|
import type Dee from '@girs/dee-1.0';
|
|
18
18
|
import type Gio from '@girs/gio-2.0';
|
|
19
|
-
import type GModule from '@girs/gmodule-2.0';
|
|
20
19
|
|
|
21
20
|
export namespace Unity {
|
|
22
21
|
enum CategoryType {
|
|
@@ -153,18 +152,18 @@ export namespace Unity {
|
|
|
153
152
|
function filter_renderer_from_string(renderer_name: string): FilterRenderer;
|
|
154
153
|
function scope_module_get_version(): number;
|
|
155
154
|
function scope_module_load_scopes(): AbstractScope[];
|
|
156
|
-
function object_unref(object
|
|
155
|
+
function object_unref(object?: any | null): void;
|
|
157
156
|
interface ScopeSearchBaseCallback {
|
|
158
157
|
(instance: ScopeSearchBase): void;
|
|
159
158
|
}
|
|
160
159
|
interface AbstractPreviewCallback {
|
|
161
|
-
(previewer: ResultPreviewer, preview
|
|
160
|
+
(previewer: ResultPreviewer, preview?: AbstractPreview | null): void;
|
|
162
161
|
}
|
|
163
162
|
module AppInfoManager {
|
|
164
163
|
// Signal callback interfaces
|
|
165
164
|
|
|
166
165
|
interface Changed {
|
|
167
|
-
(id: string, new_appinfo
|
|
166
|
+
(id: string, new_appinfo?: Gio.AppInfo | null): void;
|
|
168
167
|
}
|
|
169
168
|
|
|
170
169
|
// Constructor properties interface
|
|
@@ -186,12 +185,15 @@ export namespace Unity {
|
|
|
186
185
|
connect(id: string, callback: (...args: any[]) => any): number;
|
|
187
186
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
|
188
187
|
emit(id: string, ...args: any[]): void;
|
|
189
|
-
connect(
|
|
188
|
+
connect(
|
|
189
|
+
signal: 'changed',
|
|
190
|
+
callback: (_source: this, id: string, new_appinfo: Gio.AppInfo | null) => void,
|
|
191
|
+
): number;
|
|
190
192
|
connect_after(
|
|
191
193
|
signal: 'changed',
|
|
192
|
-
callback: (_source: this, id: string, new_appinfo: Gio.AppInfo) => void,
|
|
194
|
+
callback: (_source: this, id: string, new_appinfo: Gio.AppInfo | null) => void,
|
|
193
195
|
): number;
|
|
194
|
-
emit(signal: 'changed', id: string, new_appinfo
|
|
196
|
+
emit(signal: 'changed', id: string, new_appinfo?: Gio.AppInfo | null): void;
|
|
195
197
|
|
|
196
198
|
// Own static methods of Unity.AppInfoManager
|
|
197
199
|
|
|
@@ -200,12 +202,12 @@ export namespace Unity {
|
|
|
200
202
|
|
|
201
203
|
// Own methods of Unity.AppInfoManager
|
|
202
204
|
|
|
203
|
-
lookup(id: string): Gio.AppInfo;
|
|
204
|
-
get_categories(id: string): string[];
|
|
205
|
-
get_keywords(id: string): string[];
|
|
206
|
-
get_path(id: string): string;
|
|
207
|
-
lookup_async(id: string, _callback_
|
|
208
|
-
lookup_finish(_res_: Gio.AsyncResult): Gio.AppInfo;
|
|
205
|
+
lookup(id: string): Gio.AppInfo | null;
|
|
206
|
+
get_categories(id: string): string[] | null;
|
|
207
|
+
get_keywords(id: string): string[] | null;
|
|
208
|
+
get_path(id: string): string | null;
|
|
209
|
+
lookup_async(id: string, _callback_?: Gio.AsyncReadyCallback<this> | null): void;
|
|
210
|
+
lookup_finish(_res_: Gio.AsyncResult): Gio.AppInfo | null;
|
|
209
211
|
clear(): void;
|
|
210
212
|
}
|
|
211
213
|
|
|
@@ -293,7 +295,7 @@ export namespace Unity {
|
|
|
293
295
|
// Own methods of Unity.Inspector
|
|
294
296
|
|
|
295
297
|
get_unity_running(): boolean;
|
|
296
|
-
get_unity_bus_name(): string;
|
|
298
|
+
get_unity_bus_name(): string | null;
|
|
297
299
|
}
|
|
298
300
|
|
|
299
301
|
module LauncherEntry {
|
|
@@ -365,8 +367,8 @@ export namespace Unity {
|
|
|
365
367
|
set_progress_visible(value: boolean): void;
|
|
366
368
|
get_urgent(): boolean;
|
|
367
369
|
set_urgent(value: boolean): void;
|
|
368
|
-
get_quicklist(): Dbusmenu.Menuitem;
|
|
369
|
-
set_quicklist(value
|
|
370
|
+
get_quicklist(): Dbusmenu.Menuitem | null;
|
|
371
|
+
set_quicklist(value?: Dbusmenu.Menuitem | null): void;
|
|
370
372
|
|
|
371
373
|
// Inherited methods
|
|
372
374
|
/**
|
|
@@ -573,7 +575,7 @@ export namespace Unity {
|
|
|
573
575
|
* static void
|
|
574
576
|
* my_object_class_init (MyObjectClass *klass)
|
|
575
577
|
* {
|
|
576
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
578
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
577
579
|
* 0, 100,
|
|
578
580
|
* 50,
|
|
579
581
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -791,7 +793,7 @@ export namespace Unity {
|
|
|
791
793
|
|
|
792
794
|
has_app_info(appinfo: Gio.AppInfo): boolean;
|
|
793
795
|
has_app_id(app_id: string): boolean;
|
|
794
|
-
lookup(app_id: string): Gio.AppInfo;
|
|
796
|
+
lookup(app_id: string): Gio.AppInfo | null;
|
|
795
797
|
enumerate_ids(): string[];
|
|
796
798
|
enumerate_app_infos(): Gio.AppInfo[];
|
|
797
799
|
}
|
|
@@ -810,6 +812,14 @@ export namespace Unity {
|
|
|
810
812
|
constructor(properties?: Partial<MetadataProvider.ConstructorProps>, ...args: any[]);
|
|
811
813
|
|
|
812
814
|
_init(...args: any[]): void;
|
|
815
|
+
|
|
816
|
+
// Own virtual methods of Unity.MetadataProvider
|
|
817
|
+
|
|
818
|
+
vfunc_update_hints(hints: { [key: string]: any } | GLib.HashTable<string, GLib.Variant>): void;
|
|
819
|
+
|
|
820
|
+
// Own methods of Unity.MetadataProvider
|
|
821
|
+
|
|
822
|
+
update_hints(hints: { [key: string]: any } | GLib.HashTable<string, GLib.Variant>): void;
|
|
813
823
|
}
|
|
814
824
|
|
|
815
825
|
module ProgressSourceProvider {
|
|
@@ -899,7 +909,7 @@ export namespace Unity {
|
|
|
899
909
|
add_metadata_provider(provider: MetadataProvider): void;
|
|
900
910
|
get_id(): string;
|
|
901
911
|
get_name(): string;
|
|
902
|
-
get_icon_hint(): Gio.Icon;
|
|
912
|
+
get_icon_hint(): Gio.Icon | null;
|
|
903
913
|
get_default_renderer(): CategoryRenderer;
|
|
904
914
|
get_content_type(): CategoryContentType;
|
|
905
915
|
set_content_type(value: CategoryContentType): void;
|
|
@@ -965,11 +975,18 @@ export namespace Unity {
|
|
|
965
975
|
connect_after(signal: 'changed', callback: (_source: this) => void): number;
|
|
966
976
|
emit(signal: 'changed'): void;
|
|
967
977
|
|
|
978
|
+
// Own virtual methods of Unity.Filter
|
|
979
|
+
|
|
980
|
+
vfunc_get_hints(): GLib.HashTable<string, GLib.Variant>;
|
|
981
|
+
vfunc_update(properties: GLib.Variant): void;
|
|
982
|
+
|
|
968
983
|
// Own methods of Unity.Filter
|
|
969
984
|
|
|
985
|
+
get_hints(): GLib.HashTable<string, GLib.Variant>;
|
|
986
|
+
update(properties: GLib.Variant): void;
|
|
970
987
|
get_id(): string;
|
|
971
988
|
get_display_name(): string;
|
|
972
|
-
get_icon_hint(): Gio.Icon;
|
|
989
|
+
get_icon_hint(): Gio.Icon | null;
|
|
973
990
|
get_renderer(): FilterRenderer;
|
|
974
991
|
get_visible(): boolean;
|
|
975
992
|
set_visible(value: boolean): void;
|
|
@@ -1181,7 +1198,7 @@ export namespace Unity {
|
|
|
1181
1198
|
* static void
|
|
1182
1199
|
* my_object_class_init (MyObjectClass *klass)
|
|
1183
1200
|
* {
|
|
1184
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
1201
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
1185
1202
|
* 0, 100,
|
|
1186
1203
|
* 50,
|
|
1187
1204
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -1393,7 +1410,7 @@ export namespace Unity {
|
|
|
1393
1410
|
|
|
1394
1411
|
_init(...args: any[]): void;
|
|
1395
1412
|
|
|
1396
|
-
static ['new'](id: string, display_name: string, icon_hint: Gio.Icon, active: boolean): FilterOption;
|
|
1413
|
+
static ['new'](id: string, display_name: string, icon_hint: Gio.Icon | null, active: boolean): FilterOption;
|
|
1397
1414
|
|
|
1398
1415
|
// Own methods of Unity.FilterOption
|
|
1399
1416
|
|
|
@@ -1443,8 +1460,8 @@ export namespace Unity {
|
|
|
1443
1460
|
|
|
1444
1461
|
// Own methods of Unity.OptionsFilter
|
|
1445
1462
|
|
|
1446
|
-
add_option(id: string, display_name: string, icon_hint
|
|
1447
|
-
get_option(id: string): FilterOption;
|
|
1463
|
+
add_option(id: string, display_name: string, icon_hint?: Gio.Icon | null): FilterOption;
|
|
1464
|
+
get_option(id: string): FilterOption | null;
|
|
1448
1465
|
remove_option(id: string): boolean;
|
|
1449
1466
|
get_sort_type(): OptionsFilterSortType;
|
|
1450
1467
|
set_sort_type(value: OptionsFilterSortType): void;
|
|
@@ -1467,14 +1484,19 @@ export namespace Unity {
|
|
|
1467
1484
|
|
|
1468
1485
|
_init(...args: any[]): void;
|
|
1469
1486
|
|
|
1470
|
-
static ['new'](
|
|
1487
|
+
static ['new'](
|
|
1488
|
+
id: string,
|
|
1489
|
+
display_name: string,
|
|
1490
|
+
icon_hint: Gio.Icon | null,
|
|
1491
|
+
collapsed: boolean,
|
|
1492
|
+
): RadioOptionFilter;
|
|
1471
1493
|
// Conflicted with Unity.OptionsFilter.new
|
|
1472
1494
|
|
|
1473
1495
|
static ['new'](...args: never[]): any;
|
|
1474
1496
|
|
|
1475
1497
|
// Own methods of Unity.RadioOptionFilter
|
|
1476
1498
|
|
|
1477
|
-
get_active_option(): FilterOption;
|
|
1499
|
+
get_active_option(): FilterOption | null;
|
|
1478
1500
|
}
|
|
1479
1501
|
|
|
1480
1502
|
module CheckOptionFilter {
|
|
@@ -1492,7 +1514,12 @@ export namespace Unity {
|
|
|
1492
1514
|
|
|
1493
1515
|
_init(...args: any[]): void;
|
|
1494
1516
|
|
|
1495
|
-
static ['new'](
|
|
1517
|
+
static ['new'](
|
|
1518
|
+
id: string,
|
|
1519
|
+
display_name: string,
|
|
1520
|
+
icon_hint: Gio.Icon | null,
|
|
1521
|
+
collapsed: boolean,
|
|
1522
|
+
): CheckOptionFilter;
|
|
1496
1523
|
// Conflicted with Unity.OptionsFilter.new
|
|
1497
1524
|
|
|
1498
1525
|
static ['new'](...args: never[]): any;
|
|
@@ -1516,7 +1543,7 @@ export namespace Unity {
|
|
|
1516
1543
|
static ['new'](
|
|
1517
1544
|
id: string,
|
|
1518
1545
|
display_name: string,
|
|
1519
|
-
icon_hint: Gio.Icon,
|
|
1546
|
+
icon_hint: Gio.Icon | null,
|
|
1520
1547
|
collapsed: boolean,
|
|
1521
1548
|
): CheckOptionFilterCompact;
|
|
1522
1549
|
// Conflicted with Unity.OptionsFilter.new
|
|
@@ -1546,7 +1573,7 @@ export namespace Unity {
|
|
|
1546
1573
|
|
|
1547
1574
|
_init(...args: any[]): void;
|
|
1548
1575
|
|
|
1549
|
-
static ['new'](id: string, display_name: string, icon_hint: Gio.Icon, collapsed: boolean): RatingsFilter;
|
|
1576
|
+
static ['new'](id: string, display_name: string, icon_hint: Gio.Icon | null, collapsed: boolean): RatingsFilter;
|
|
1550
1577
|
|
|
1551
1578
|
// Own methods of Unity.RatingsFilter
|
|
1552
1579
|
|
|
@@ -1568,15 +1595,20 @@ export namespace Unity {
|
|
|
1568
1595
|
|
|
1569
1596
|
_init(...args: any[]): void;
|
|
1570
1597
|
|
|
1571
|
-
static ['new'](
|
|
1598
|
+
static ['new'](
|
|
1599
|
+
id: string,
|
|
1600
|
+
display_name: string,
|
|
1601
|
+
icon_hint: Gio.Icon | null,
|
|
1602
|
+
collapsed: boolean,
|
|
1603
|
+
): MultiRangeFilter;
|
|
1572
1604
|
// Conflicted with Unity.OptionsFilter.new
|
|
1573
1605
|
|
|
1574
1606
|
static ['new'](...args: never[]): any;
|
|
1575
1607
|
|
|
1576
1608
|
// Own methods of Unity.MultiRangeFilter
|
|
1577
1609
|
|
|
1578
|
-
get_first_active(): FilterOption;
|
|
1579
|
-
get_last_active(): FilterOption;
|
|
1610
|
+
get_first_active(): FilterOption | null;
|
|
1611
|
+
get_last_active(): FilterOption | null;
|
|
1580
1612
|
}
|
|
1581
1613
|
|
|
1582
1614
|
module PreferencesManager {
|
|
@@ -1703,7 +1735,7 @@ export namespace Unity {
|
|
|
1703
1735
|
// Own methods of Unity.DeprecatedScopeSearch
|
|
1704
1736
|
|
|
1705
1737
|
set_reply_hint(key: string, variant: GLib.Variant): void;
|
|
1706
|
-
get_filter(filter_id: string): Filter;
|
|
1738
|
+
get_filter(filter_id: string): Filter | null;
|
|
1707
1739
|
equals(other: DeprecatedScopeSearch): boolean;
|
|
1708
1740
|
get_channel_id(): string;
|
|
1709
1741
|
get_search_string(): string;
|
|
@@ -1772,15 +1804,15 @@ export namespace Unity {
|
|
|
1772
1804
|
scope_id: string,
|
|
1773
1805
|
search_string: string,
|
|
1774
1806
|
search_type: SearchType,
|
|
1775
|
-
hints
|
|
1776
|
-
_callback_
|
|
1807
|
+
hints?: GLib.HashTable<string, GLib.Variant> | null,
|
|
1808
|
+
_callback_?: Gio.AsyncReadyCallback<this> | null,
|
|
1777
1809
|
): void;
|
|
1778
1810
|
search_scope_finish(_res_: Gio.AsyncResult): GLib.HashTable<string, GLib.Variant>;
|
|
1779
1811
|
push_results(
|
|
1780
1812
|
scope_id: string,
|
|
1781
1813
|
results_model: Dee.SerializableModel,
|
|
1782
1814
|
category_ids: string[],
|
|
1783
|
-
_callback_
|
|
1815
|
+
_callback_?: Gio.AsyncReadyCallback<this> | null,
|
|
1784
1816
|
): void;
|
|
1785
1817
|
push_results_finish(_res_: Gio.AsyncResult): void;
|
|
1786
1818
|
push_filter_settings(filters: FilterSet): void;
|
|
@@ -1826,8 +1858,13 @@ export namespace Unity {
|
|
|
1826
1858
|
|
|
1827
1859
|
_init(...args: any[]): void;
|
|
1828
1860
|
|
|
1861
|
+
// Own virtual methods of Unity.Preview
|
|
1862
|
+
|
|
1863
|
+
vfunc_create_raw<T = GObject.Object>(): T;
|
|
1864
|
+
|
|
1829
1865
|
// Own methods of Unity.Preview
|
|
1830
1866
|
|
|
1867
|
+
create_raw<T = GObject.Object>(): T;
|
|
1831
1868
|
add_action(action: PreviewAction): void;
|
|
1832
1869
|
add_info(info_hint: InfoHint): void;
|
|
1833
1870
|
get_title(): string;
|
|
@@ -1838,8 +1875,8 @@ export namespace Unity {
|
|
|
1838
1875
|
set_description_markup(value: string): void;
|
|
1839
1876
|
get_image_source_uri(): string;
|
|
1840
1877
|
set_image_source_uri(value: string): void;
|
|
1841
|
-
get_image(): Gio.Icon;
|
|
1842
|
-
set_image(value
|
|
1878
|
+
get_image(): Gio.Icon | null;
|
|
1879
|
+
set_image(value?: Gio.Icon | null): void;
|
|
1843
1880
|
|
|
1844
1881
|
// Inherited methods
|
|
1845
1882
|
/**
|
|
@@ -2046,7 +2083,7 @@ export namespace Unity {
|
|
|
2046
2083
|
* static void
|
|
2047
2084
|
* my_object_class_init (MyObjectClass *klass)
|
|
2048
2085
|
* {
|
|
2049
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
2086
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
2050
2087
|
* 0, 100,
|
|
2051
2088
|
* 50,
|
|
2052
2089
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -2273,16 +2310,16 @@ export namespace Unity {
|
|
|
2273
2310
|
|
|
2274
2311
|
_init(...args: any[]): void;
|
|
2275
2312
|
|
|
2276
|
-
static ['new'](id: string, display_name: string, icon_hint
|
|
2313
|
+
static ['new'](id: string, display_name: string, icon_hint?: Gio.Icon | null): PreviewAction;
|
|
2277
2314
|
|
|
2278
2315
|
static with_layout_hint(
|
|
2279
2316
|
id: string,
|
|
2280
2317
|
display_name: string,
|
|
2281
|
-
icon_hint: Gio.Icon,
|
|
2318
|
+
icon_hint: Gio.Icon | null,
|
|
2282
2319
|
layout: LayoutHint,
|
|
2283
2320
|
): PreviewAction;
|
|
2284
2321
|
|
|
2285
|
-
static with_uri(uri: string, display_name: string, icon_hint
|
|
2322
|
+
static with_uri(uri: string, display_name: string, icon_hint?: Gio.Icon | null): PreviewAction;
|
|
2286
2323
|
|
|
2287
2324
|
// Own signals of Unity.PreviewAction
|
|
2288
2325
|
|
|
@@ -2299,9 +2336,9 @@ export namespace Unity {
|
|
|
2299
2336
|
get_display_name(): string;
|
|
2300
2337
|
get_extra_text(): string;
|
|
2301
2338
|
set_extra_text(value: string): void;
|
|
2302
|
-
get_icon_hint(): Gio.Icon;
|
|
2339
|
+
get_icon_hint(): Gio.Icon | null;
|
|
2303
2340
|
get_layout_hint(): LayoutHint;
|
|
2304
|
-
get_hints(): GLib.HashTable<string, GLib.Variant
|
|
2341
|
+
get_hints(): GLib.HashTable<string, GLib.Variant> | null;
|
|
2305
2342
|
|
|
2306
2343
|
// Inherited methods
|
|
2307
2344
|
/**
|
|
@@ -2508,7 +2545,7 @@ export namespace Unity {
|
|
|
2508
2545
|
* static void
|
|
2509
2546
|
* my_object_class_init (MyObjectClass *klass)
|
|
2510
2547
|
* {
|
|
2511
|
-
* properties[PROP_FOO] = g_param_spec_int ("foo",
|
|
2548
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
2512
2549
|
* 0, 100,
|
|
2513
2550
|
* 50,
|
|
2514
2551
|
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
@@ -2719,15 +2756,15 @@ export namespace Unity {
|
|
|
2719
2756
|
|
|
2720
2757
|
_init(...args: any[]): void;
|
|
2721
2758
|
|
|
2722
|
-
static ['new'](id: string, display_name: string, icon_hint: Gio.Icon, data: string): InfoHint;
|
|
2759
|
+
static ['new'](id: string, display_name: string, icon_hint: Gio.Icon | null, data: string): InfoHint;
|
|
2723
2760
|
|
|
2724
|
-
static with_variant(id: string, display_name: string, icon_hint: Gio.Icon, data: GLib.Variant): InfoHint;
|
|
2761
|
+
static with_variant(id: string, display_name: string, icon_hint: Gio.Icon | null, data: GLib.Variant): InfoHint;
|
|
2725
2762
|
|
|
2726
2763
|
// Own methods of Unity.InfoHint
|
|
2727
2764
|
|
|
2728
2765
|
get_id(): string;
|
|
2729
2766
|
get_display_name(): string;
|
|
2730
|
-
get_icon_hint(): Gio.Icon;
|
|
2767
|
+
get_icon_hint(): Gio.Icon | null;
|
|
2731
2768
|
get_data(): GLib.Variant;
|
|
2732
2769
|
// Conflicted with GObject.Object.get_data
|
|
2733
2770
|
get_data(...args: never[]): any;
|
|
@@ -2748,7 +2785,7 @@ export namespace Unity {
|
|
|
2748
2785
|
|
|
2749
2786
|
_init(...args: any[]): void;
|
|
2750
2787
|
|
|
2751
|
-
static ['new'](title: string, description: string, image
|
|
2788
|
+
static ['new'](title: string, description: string, image?: Gio.Icon | null): GenericPreview;
|
|
2752
2789
|
}
|
|
2753
2790
|
|
|
2754
2791
|
module ApplicationPreview {
|
|
@@ -2792,8 +2829,8 @@ export namespace Unity {
|
|
|
2792
2829
|
title: string,
|
|
2793
2830
|
subtitle: string,
|
|
2794
2831
|
description: string,
|
|
2795
|
-
icon
|
|
2796
|
-
screenshot
|
|
2832
|
+
icon?: Gio.Icon | null,
|
|
2833
|
+
screenshot?: Gio.Icon | null,
|
|
2797
2834
|
): ApplicationPreview;
|
|
2798
2835
|
|
|
2799
2836
|
// Own methods of Unity.ApplicationPreview
|
|
@@ -2824,7 +2861,7 @@ export namespace Unity {
|
|
|
2824
2861
|
|
|
2825
2862
|
_init(...args: any[]): void;
|
|
2826
2863
|
|
|
2827
|
-
static ['new'](title: string, subtitle: string, image
|
|
2864
|
+
static ['new'](title: string, subtitle: string, image?: Gio.Icon | null): MusicPreview;
|
|
2828
2865
|
|
|
2829
2866
|
// Own methods of Unity.MusicPreview
|
|
2830
2867
|
|
|
@@ -2880,15 +2917,20 @@ export namespace Unity {
|
|
|
2880
2917
|
|
|
2881
2918
|
_init(...args: any[]): void;
|
|
2882
2919
|
|
|
2883
|
-
static ['new'](title: string, subtitle: string, image
|
|
2920
|
+
static ['new'](title: string, subtitle: string, image?: Gio.Icon | null): PaymentPreview;
|
|
2884
2921
|
|
|
2885
|
-
static for_type(
|
|
2922
|
+
static for_type(
|
|
2923
|
+
title: string,
|
|
2924
|
+
subtitle: string,
|
|
2925
|
+
image: Gio.Icon | null,
|
|
2926
|
+
type: PaymentPreviewType,
|
|
2927
|
+
): PaymentPreview;
|
|
2886
2928
|
|
|
2887
|
-
static for_application(title: string, subtitle: string, image
|
|
2929
|
+
static for_application(title: string, subtitle: string, image?: Gio.Icon | null): PaymentPreview;
|
|
2888
2930
|
|
|
2889
|
-
static for_music(title: string, subtitle: string, image
|
|
2931
|
+
static for_music(title: string, subtitle: string, image?: Gio.Icon | null): PaymentPreview;
|
|
2890
2932
|
|
|
2891
|
-
static for_error(title: string, subtitle: string, image
|
|
2933
|
+
static for_error(title: string, subtitle: string, image?: Gio.Icon | null): PaymentPreview;
|
|
2892
2934
|
|
|
2893
2935
|
// Own methods of Unity.PaymentPreview
|
|
2894
2936
|
|
|
@@ -2928,7 +2970,7 @@ export namespace Unity {
|
|
|
2928
2970
|
|
|
2929
2971
|
_init(...args: any[]): void;
|
|
2930
2972
|
|
|
2931
|
-
static ['new'](title: string, subtitle: string, description: string, image
|
|
2973
|
+
static ['new'](title: string, subtitle: string, description: string, image?: Gio.Icon | null): MoviePreview;
|
|
2932
2974
|
|
|
2933
2975
|
// Own methods of Unity.MoviePreview
|
|
2934
2976
|
|
|
@@ -2965,7 +3007,7 @@ export namespace Unity {
|
|
|
2965
3007
|
|
|
2966
3008
|
_init(...args: any[]): void;
|
|
2967
3009
|
|
|
2968
|
-
static ['new'](sender: string, subtitle: string, content: string, avatar
|
|
3010
|
+
static ['new'](sender: string, subtitle: string, content: string, avatar?: Gio.Icon | null): SocialPreview;
|
|
2969
3011
|
|
|
2970
3012
|
// Own methods of Unity.SocialPreview
|
|
2971
3013
|
|
|
@@ -3046,8 +3088,8 @@ export namespace Unity {
|
|
|
3046
3088
|
|
|
3047
3089
|
static with_search(
|
|
3048
3090
|
search_string: string,
|
|
3049
|
-
filter_set
|
|
3050
|
-
search_metadata
|
|
3091
|
+
filter_set?: FilterSet | null,
|
|
3092
|
+
search_metadata?: SearchMetadata | null,
|
|
3051
3093
|
): ActivationResponse;
|
|
3052
3094
|
|
|
3053
3095
|
static with_preview(preview: Preview): ActivationResponse;
|
|
@@ -3109,7 +3151,7 @@ export namespace Unity {
|
|
|
3109
3151
|
channel_id: string,
|
|
3110
3152
|
scope_id: string,
|
|
3111
3153
|
action_type: number,
|
|
3112
|
-
|
|
3154
|
+
_result_?: ScopeResult | null,
|
|
3113
3155
|
): AggregatorActivation;
|
|
3114
3156
|
|
|
3115
3157
|
// Own methods of Unity.AggregatorActivation
|
|
@@ -3120,8 +3162,8 @@ export namespace Unity {
|
|
|
3120
3162
|
set_scope_id(value: string): void;
|
|
3121
3163
|
get_action_type(): number;
|
|
3122
3164
|
set_action_type(value: number): void;
|
|
3123
|
-
get_scope_result(): ScopeResult;
|
|
3124
|
-
set_scope_result(value
|
|
3165
|
+
get_scope_result(): ScopeResult | null;
|
|
3166
|
+
set_scope_result(value?: ScopeResult | null): void;
|
|
3125
3167
|
get_hints(): GLib.HashTable<string, GLib.Variant>;
|
|
3126
3168
|
}
|
|
3127
3169
|
|
|
@@ -3145,13 +3187,13 @@ export namespace Unity {
|
|
|
3145
3187
|
// Own virtual methods of Unity.FilterSet
|
|
3146
3188
|
|
|
3147
3189
|
vfunc_add(filter: Filter): void;
|
|
3148
|
-
vfunc_get_filter_by_id(filter_id: string): Filter;
|
|
3190
|
+
vfunc_get_filter_by_id(filter_id: string): Filter | null;
|
|
3149
3191
|
vfunc_get_filters(): Filter[];
|
|
3150
3192
|
|
|
3151
3193
|
// Own methods of Unity.FilterSet
|
|
3152
3194
|
|
|
3153
3195
|
add(filter: Filter): void;
|
|
3154
|
-
get_filter_by_id(filter_id: string): Filter;
|
|
3196
|
+
get_filter_by_id(filter_id: string): Filter | null;
|
|
3155
3197
|
get_filters(): Filter[];
|
|
3156
3198
|
}
|
|
3157
3199
|
|
|
@@ -3234,13 +3276,13 @@ export namespace Unity {
|
|
|
3234
3276
|
|
|
3235
3277
|
vfunc_cancel(): void;
|
|
3236
3278
|
vfunc_is_cancelled(): boolean;
|
|
3237
|
-
vfunc_get_gcancellable(): Gio.Cancellable;
|
|
3279
|
+
vfunc_get_gcancellable(): Gio.Cancellable | null;
|
|
3238
3280
|
|
|
3239
3281
|
// Own methods of Unity.Cancellable
|
|
3240
3282
|
|
|
3241
3283
|
cancel(): void;
|
|
3242
3284
|
is_cancelled(): boolean;
|
|
3243
|
-
get_gcancellable(): Gio.Cancellable;
|
|
3285
|
+
get_gcancellable(): Gio.Cancellable | null;
|
|
3244
3286
|
}
|
|
3245
3287
|
|
|
3246
3288
|
module ScopeSearchBase {
|
|
@@ -3292,13 +3334,13 @@ export namespace Unity {
|
|
|
3292
3334
|
|
|
3293
3335
|
// Own virtual methods of Unity.ResultSet
|
|
3294
3336
|
|
|
3295
|
-
vfunc_add_result(
|
|
3337
|
+
vfunc_add_result(_result_: ScopeResult): void;
|
|
3296
3338
|
vfunc_add_result_from_variant(variant: GLib.Variant): void;
|
|
3297
3339
|
vfunc_flush(): void;
|
|
3298
3340
|
|
|
3299
3341
|
// Own methods of Unity.ResultSet
|
|
3300
3342
|
|
|
3301
|
-
add_result(
|
|
3343
|
+
add_result(_result_: ScopeResult): void;
|
|
3302
3344
|
add_result_from_variant(variant: GLib.Variant): void;
|
|
3303
3345
|
flush(): void;
|
|
3304
3346
|
}
|
|
@@ -3349,12 +3391,12 @@ export namespace Unity {
|
|
|
3349
3391
|
|
|
3350
3392
|
// Own virtual methods of Unity.ResultPreviewer
|
|
3351
3393
|
|
|
3352
|
-
vfunc_run(): AbstractPreview;
|
|
3394
|
+
vfunc_run(): AbstractPreview | null;
|
|
3353
3395
|
vfunc_run_async(async_callback: AbstractPreviewCallback): void;
|
|
3354
3396
|
|
|
3355
3397
|
// Own methods of Unity.ResultPreviewer
|
|
3356
3398
|
|
|
3357
|
-
run(): AbstractPreview;
|
|
3399
|
+
run(): AbstractPreview | null;
|
|
3358
3400
|
run_async(async_callback: AbstractPreviewCallback): void;
|
|
3359
3401
|
set_scope_result(scope_result: ScopeResult): void;
|
|
3360
3402
|
set_search_metadata(search_metadata: SearchMetadata): void;
|
|
@@ -3391,14 +3433,14 @@ export namespace Unity {
|
|
|
3391
3433
|
|
|
3392
3434
|
// Own static methods of Unity.SearchMetadata
|
|
3393
3435
|
|
|
3394
|
-
static create(metadata
|
|
3436
|
+
static create(metadata?: GLib.HashTable<string, GLib.Variant> | null): SearchMetadata;
|
|
3395
3437
|
static create_from_variant(metadata: GLib.Variant): SearchMetadata;
|
|
3396
3438
|
|
|
3397
3439
|
// Own methods of Unity.SearchMetadata
|
|
3398
3440
|
|
|
3399
|
-
get_locale(): string;
|
|
3400
|
-
get_form_factor(): string;
|
|
3401
|
-
get_location(): GeoCoordinate;
|
|
3441
|
+
get_locale(): string | null;
|
|
3442
|
+
get_form_factor(): string | null;
|
|
3443
|
+
get_location(): GeoCoordinate | null;
|
|
3402
3444
|
}
|
|
3403
3445
|
|
|
3404
3446
|
module GeoCoordinate {
|
|
@@ -3470,27 +3512,31 @@ export namespace Unity {
|
|
|
3470
3512
|
// Own virtual methods of Unity.AbstractScope
|
|
3471
3513
|
|
|
3472
3514
|
vfunc_create_search_for_query(search_context: SearchContext): ScopeSearchBase;
|
|
3473
|
-
vfunc_create_previewer(
|
|
3515
|
+
vfunc_create_previewer(_result_: ScopeResult, metadata: SearchMetadata): ResultPreviewer;
|
|
3474
3516
|
vfunc_get_categories(): CategorySet;
|
|
3475
3517
|
vfunc_get_filters(): FilterSet;
|
|
3476
3518
|
vfunc_get_schema(): Schema;
|
|
3477
3519
|
vfunc_get_search_hint(): string;
|
|
3478
3520
|
vfunc_get_group_name(): string;
|
|
3479
3521
|
vfunc_get_unique_name(): string;
|
|
3480
|
-
vfunc_activate(
|
|
3522
|
+
vfunc_activate(
|
|
3523
|
+
_result_: ScopeResult,
|
|
3524
|
+
metadata: SearchMetadata,
|
|
3525
|
+
action_id?: string | null,
|
|
3526
|
+
): ActivationResponse | null;
|
|
3481
3527
|
vfunc_normalize_search_query(search_query: string): string;
|
|
3482
3528
|
|
|
3483
3529
|
// Own methods of Unity.AbstractScope
|
|
3484
3530
|
|
|
3485
3531
|
create_search_for_query(search_context: SearchContext): ScopeSearchBase;
|
|
3486
|
-
create_previewer(
|
|
3532
|
+
create_previewer(_result_: ScopeResult, metadata: SearchMetadata): ResultPreviewer;
|
|
3487
3533
|
get_categories(): CategorySet;
|
|
3488
3534
|
get_filters(): FilterSet;
|
|
3489
3535
|
get_schema(): Schema;
|
|
3490
3536
|
get_search_hint(): string;
|
|
3491
3537
|
get_group_name(): string;
|
|
3492
3538
|
get_unique_name(): string;
|
|
3493
|
-
activate(
|
|
3539
|
+
activate(_result_: ScopeResult, metadata: SearchMetadata, action_id?: string | null): ActivationResponse | null;
|
|
3494
3540
|
normalize_search_query(search_query: string): string;
|
|
3495
3541
|
results_invalidated(search_type: SearchType): void;
|
|
3496
3542
|
}
|
|
@@ -3604,8 +3650,13 @@ export namespace Unity {
|
|
|
3604
3650
|
): number;
|
|
3605
3651
|
emit(signal: 'active-sources-changed', active_ids: string[]): void;
|
|
3606
3652
|
|
|
3653
|
+
// Own virtual methods of Unity.DeprecatedScopeBase
|
|
3654
|
+
|
|
3655
|
+
vfunc_create_impl<T = GObject.Object>(): T;
|
|
3656
|
+
|
|
3607
3657
|
// Own methods of Unity.DeprecatedScopeBase
|
|
3608
3658
|
|
|
3659
|
+
create_impl<T = GObject.Object>(): T;
|
|
3609
3660
|
['export'](): void;
|
|
3610
3661
|
unexport(): void;
|
|
3611
3662
|
get_id(): string;
|
|
@@ -3630,11 +3681,11 @@ export namespace Unity {
|
|
|
3630
3681
|
// Signal callback interfaces
|
|
3631
3682
|
|
|
3632
3683
|
interface ActivateUri {
|
|
3633
|
-
(uri: string): ActivationResponse;
|
|
3684
|
+
(uri: string): ActivationResponse | null;
|
|
3634
3685
|
}
|
|
3635
3686
|
|
|
3636
3687
|
interface PreviewUri {
|
|
3637
|
-
(uri: string): Preview;
|
|
3688
|
+
(uri: string): Preview | null;
|
|
3638
3689
|
}
|
|
3639
3690
|
|
|
3640
3691
|
interface GenerateSearchKey {
|
|
@@ -3666,11 +3717,14 @@ export namespace Unity {
|
|
|
3666
3717
|
connect(id: string, callback: (...args: any[]) => any): number;
|
|
3667
3718
|
connect_after(id: string, callback: (...args: any[]) => any): number;
|
|
3668
3719
|
emit(id: string, ...args: any[]): void;
|
|
3669
|
-
connect(signal: 'activate-uri', callback: (_source: this, uri: string) => ActivationResponse): number;
|
|
3670
|
-
connect_after(
|
|
3720
|
+
connect(signal: 'activate-uri', callback: (_source: this, uri: string) => ActivationResponse | null): number;
|
|
3721
|
+
connect_after(
|
|
3722
|
+
signal: 'activate-uri',
|
|
3723
|
+
callback: (_source: this, uri: string) => ActivationResponse | null,
|
|
3724
|
+
): number;
|
|
3671
3725
|
emit(signal: 'activate-uri', uri: string): void;
|
|
3672
|
-
connect(signal: 'preview-uri', callback: (_source: this, uri: string) => Preview): number;
|
|
3673
|
-
connect_after(signal: 'preview-uri', callback: (_source: this, uri: string) => Preview): number;
|
|
3726
|
+
connect(signal: 'preview-uri', callback: (_source: this, uri: string) => Preview | null): number;
|
|
3727
|
+
connect_after(signal: 'preview-uri', callback: (_source: this, uri: string) => Preview | null): number;
|
|
3674
3728
|
emit(signal: 'preview-uri', uri: string): void;
|
|
3675
3729
|
connect(
|
|
3676
3730
|
signal: 'generate-search-key',
|
|
@@ -3708,17 +3762,17 @@ export namespace Unity {
|
|
|
3708
3762
|
|
|
3709
3763
|
// Own virtual methods of Unity.DeprecatedScope
|
|
3710
3764
|
|
|
3711
|
-
vfunc_preview_result(
|
|
3712
|
-
vfunc_preview_result_finish(_res_: Gio.AsyncResult): Preview;
|
|
3713
|
-
vfunc_activate_result(
|
|
3714
|
-
vfunc_activate_result_finish(_res_: Gio.AsyncResult): ActivationResponse;
|
|
3765
|
+
vfunc_preview_result(_result_: ScopeResult, _callback_?: Gio.AsyncReadyCallback<this> | null): void;
|
|
3766
|
+
vfunc_preview_result_finish(_res_: Gio.AsyncResult): Preview | null;
|
|
3767
|
+
vfunc_activate_result(_result_: ScopeResult, _callback_?: Gio.AsyncReadyCallback<this> | null): void;
|
|
3768
|
+
vfunc_activate_result_finish(_res_: Gio.AsyncResult): ActivationResponse | null;
|
|
3715
3769
|
|
|
3716
3770
|
// Own methods of Unity.DeprecatedScope
|
|
3717
3771
|
|
|
3718
|
-
preview_result(
|
|
3719
|
-
preview_result_finish(_res_: Gio.AsyncResult): Preview;
|
|
3720
|
-
activate_result(
|
|
3721
|
-
activate_result_finish(_res_: Gio.AsyncResult): ActivationResponse;
|
|
3772
|
+
preview_result(_result_: ScopeResult, _callback_?: Gio.AsyncReadyCallback<this> | null): void;
|
|
3773
|
+
preview_result_finish(_res_: Gio.AsyncResult): Preview | null;
|
|
3774
|
+
activate_result(_result_: ScopeResult, _callback_?: Gio.AsyncReadyCallback<this> | null): void;
|
|
3775
|
+
activate_result_finish(_res_: Gio.AsyncResult): ActivationResponse | null;
|
|
3722
3776
|
queue_search_changed(search_type: SearchType): void;
|
|
3723
3777
|
}
|
|
3724
3778
|
|
|
@@ -3762,20 +3816,20 @@ export namespace Unity {
|
|
|
3762
3816
|
// Own virtual methods of Unity.AggregatorScope
|
|
3763
3817
|
|
|
3764
3818
|
vfunc_category_index_for_scope_id(scope_id: string): number;
|
|
3765
|
-
vfunc_search(scope_search: AggregatedScopeSearch, _callback_
|
|
3819
|
+
vfunc_search(scope_search: AggregatedScopeSearch, _callback_?: Gio.AsyncReadyCallback<this> | null): void;
|
|
3766
3820
|
vfunc_search_finish(_res_: Gio.AsyncResult): void;
|
|
3767
|
-
vfunc_activate(activation: AggregatorActivation, _callback_
|
|
3768
|
-
vfunc_activate_finish(_res_: Gio.AsyncResult): ActivationResponse;
|
|
3821
|
+
vfunc_activate(activation: AggregatorActivation, _callback_?: Gio.AsyncReadyCallback<this> | null): void;
|
|
3822
|
+
vfunc_activate_finish(_res_: Gio.AsyncResult): ActivationResponse | null;
|
|
3769
3823
|
|
|
3770
3824
|
// Own methods of Unity.AggregatorScope
|
|
3771
3825
|
|
|
3772
3826
|
category_index_for_scope_id(scope_id: string): number;
|
|
3773
3827
|
add_sorter(category_index: number, field: string, flags: AggregatorScopeSortFlags): void;
|
|
3774
3828
|
add_constraint(category_index: number, field: string): void;
|
|
3775
|
-
search(scope_search: AggregatedScopeSearch, _callback_
|
|
3829
|
+
search(scope_search: AggregatedScopeSearch, _callback_?: Gio.AsyncReadyCallback<this> | null): void;
|
|
3776
3830
|
search_finish(_res_: Gio.AsyncResult): void;
|
|
3777
|
-
activate(activation: AggregatorActivation, _callback_
|
|
3778
|
-
activate_finish(_res_: Gio.AsyncResult): ActivationResponse;
|
|
3831
|
+
activate(activation: AggregatorActivation, _callback_?: Gio.AsyncReadyCallback<this> | null): void;
|
|
3832
|
+
activate_finish(_res_: Gio.AsyncResult): ActivationResponse | null;
|
|
3779
3833
|
get_merge_mode(): AggregatorScopeMergeMode;
|
|
3780
3834
|
set_merge_mode(value: AggregatorScopeMergeMode): void;
|
|
3781
3835
|
get_proxy_filter_hints(): boolean;
|
|
@@ -3825,13 +3879,13 @@ export namespace Unity {
|
|
|
3825
3879
|
(search: ScopeSearchBase, cb: ScopeSearchBaseCallback): void;
|
|
3826
3880
|
}
|
|
3827
3881
|
interface PreviewRunFunc {
|
|
3828
|
-
(previewer: ResultPreviewer): AbstractPreview;
|
|
3882
|
+
(previewer: ResultPreviewer): AbstractPreview | null;
|
|
3829
3883
|
}
|
|
3830
3884
|
interface PreviewRunAsyncFunc {
|
|
3831
3885
|
(previewer: ResultPreviewer, cb: AbstractPreviewCallback): void;
|
|
3832
3886
|
}
|
|
3833
3887
|
interface ActivateFunc {
|
|
3834
|
-
(
|
|
3888
|
+
(_result_: ScopeResult, metadata: SearchMetadata, action_id?: string | null): ActivationResponse | null;
|
|
3835
3889
|
}
|
|
3836
3890
|
|
|
3837
3891
|
// Constructor properties interface
|
|
@@ -3890,10 +3944,10 @@ export namespace Unity {
|
|
|
3890
3944
|
// Own methods of Unity.SimpleScope
|
|
3891
3945
|
|
|
3892
3946
|
set_search_func(func: SimpleScope.SearchRunFunc): void;
|
|
3893
|
-
set_search_async_func(func
|
|
3894
|
-
set_activate_func(func
|
|
3947
|
+
set_search_async_func(func?: SimpleScope.SearchRunAsyncFunc | null): void;
|
|
3948
|
+
set_activate_func(func?: SimpleScope.ActivateFunc | null): void;
|
|
3895
3949
|
set_preview_func(func: SimpleScope.PreviewRunFunc): void;
|
|
3896
|
-
set_preview_async_func(func
|
|
3950
|
+
set_preview_async_func(func?: SimpleScope.PreviewRunAsyncFunc | null): void;
|
|
3897
3951
|
get_filter_set(): FilterSet;
|
|
3898
3952
|
set_filter_set(value: FilterSet): void;
|
|
3899
3953
|
get_category_set(): CategorySet;
|
|
@@ -3927,16 +3981,16 @@ export namespace Unity {
|
|
|
3927
3981
|
|
|
3928
3982
|
// Own virtual methods of Unity.ScopeLoader
|
|
3929
3983
|
|
|
3930
|
-
vfunc_get_scopes(module_name: string, module_type
|
|
3984
|
+
vfunc_get_scopes(module_name: string, module_type?: string | null): AbstractScope[];
|
|
3931
3985
|
vfunc_export_scopes(scopes: AbstractScope[]): void;
|
|
3932
3986
|
|
|
3933
3987
|
// Own methods of Unity.ScopeLoader
|
|
3934
3988
|
|
|
3935
|
-
get_scopes(module_name: string, module_type
|
|
3989
|
+
get_scopes(module_name: string, module_type?: string | null): AbstractScope[];
|
|
3936
3990
|
export_scopes(scopes: AbstractScope[]): void;
|
|
3937
3991
|
load_group(group_name: string): void;
|
|
3938
3992
|
load_scope(scope_id: string): void;
|
|
3939
|
-
load_module(module: string, module_type
|
|
3993
|
+
load_module(module: string, module_type?: string | null): void;
|
|
3940
3994
|
}
|
|
3941
3995
|
|
|
3942
3996
|
module TrackMetadata {
|
|
@@ -4247,10 +4301,10 @@ export namespace Unity {
|
|
|
4247
4301
|
set_playback_state(value: PlaybackState): void;
|
|
4248
4302
|
get_current_playlist(): Playlist;
|
|
4249
4303
|
set_current_playlist(value: Playlist): void;
|
|
4250
|
-
get_track_menu(): Dbusmenu.Menuitem;
|
|
4251
|
-
set_track_menu(value
|
|
4252
|
-
get_player_menu(): Dbusmenu.Menuitem;
|
|
4253
|
-
set_player_menu(value
|
|
4304
|
+
get_track_menu(): Dbusmenu.Menuitem | null;
|
|
4305
|
+
set_track_menu(value?: Dbusmenu.Menuitem | null): void;
|
|
4306
|
+
get_player_menu(): Dbusmenu.Menuitem | null;
|
|
4307
|
+
set_player_menu(value?: Dbusmenu.Menuitem | null): void;
|
|
4254
4308
|
}
|
|
4255
4309
|
|
|
4256
4310
|
type AppInfoManagerClass = typeof AppInfoManager;
|
|
@@ -4757,7 +4811,7 @@ export namespace Unity {
|
|
|
4757
4811
|
|
|
4758
4812
|
static create(
|
|
4759
4813
|
uri: string,
|
|
4760
|
-
icon_hint: string,
|
|
4814
|
+
icon_hint: string | null,
|
|
4761
4815
|
category: number,
|
|
4762
4816
|
result_type: ResultType,
|
|
4763
4817
|
mimetype: string,
|
|
@@ -4765,8 +4819,8 @@ export namespace Unity {
|
|
|
4765
4819
|
comment: string,
|
|
4766
4820
|
dnd_uri: string,
|
|
4767
4821
|
metadata: { [key: string]: any } | GLib.HashTable<string, GLib.Variant>,
|
|
4768
|
-
): ScopeResult;
|
|
4769
|
-
static create_from_variant(variant: GLib.Variant): ScopeResult;
|
|
4822
|
+
): ScopeResult | null;
|
|
4823
|
+
static create_from_variant(variant: GLib.Variant): ScopeResult | null;
|
|
4770
4824
|
}
|
|
4771
4825
|
|
|
4772
4826
|
class SearchContext {
|
|
@@ -4790,11 +4844,11 @@ export namespace Unity {
|
|
|
4790
4844
|
static create(
|
|
4791
4845
|
search_query: string,
|
|
4792
4846
|
search_type: SearchType,
|
|
4793
|
-
filter_state: FilterSet,
|
|
4794
|
-
metadata:
|
|
4847
|
+
filter_state: FilterSet | null,
|
|
4848
|
+
metadata: GLib.HashTable<string, GLib.Variant> | null,
|
|
4795
4849
|
result_set: ResultSet,
|
|
4796
|
-
cancellable
|
|
4797
|
-
): SearchContext;
|
|
4850
|
+
cancellable?: Cancellable | null,
|
|
4851
|
+
): SearchContext | null;
|
|
4798
4852
|
|
|
4799
4853
|
// Own methods of Unity.SearchContext
|
|
4800
4854
|
|