@girs/gpaste-2 4.4.0 → 4.5.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.
- package/README.md +36 -41
- package/gpaste-2.d.ts +371 -36
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -4,82 +4,77 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
GJS TypeScript type definitions for GPaste-2 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.5.0.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
This package contains type declarations only. It ships no runtime code, so it adds
|
|
10
|
+
nothing to your program and works with any bundler or none at all.
|
|
9
11
|
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
|
-
Install the type definitions with npm:
|
|
13
14
|
```bash
|
|
14
15
|
npm install @girs/gpaste-2
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Any package manager works. The package has no dependencies beyond other `@girs/*`
|
|
19
|
+
type packages.
|
|
20
|
+
|
|
21
|
+
## What it exports
|
|
22
|
+
|
|
23
|
+
| Import | What you get |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `@girs/gpaste-2` | the namespace as a default export, plus the ambient and global declarations |
|
|
26
|
+
| `@girs/gpaste-2/ambient` | only the `gi://` module declarations |
|
|
27
|
+
| `@girs/gpaste-2/import` | only the `imports.gi` declarations |
|
|
28
|
+
| `@girs/gpaste-2/gpaste-2` | the namespace, without the side-effecting declarations |
|
|
29
|
+
|
|
30
|
+
## Three ways to import
|
|
31
|
+
|
|
32
|
+
Which one you use depends on how you write imports elsewhere, not on your toolchain.
|
|
33
|
+
|
|
34
|
+
### As a module
|
|
18
35
|
|
|
19
|
-
Import it like any other module:
|
|
20
36
|
```ts
|
|
21
37
|
import GPaste from '@girs/gpaste-2';
|
|
22
38
|
```
|
|
23
39
|
|
|
24
|
-
###
|
|
40
|
+
### As `gi://`
|
|
25
41
|
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
GJS resolves `gi://` at runtime. To give it types, reference the package once, either
|
|
43
|
+
from your entry point or from `tsconfig.json`:
|
|
28
44
|
|
|
29
|
-
`index.ts`:
|
|
30
45
|
```ts
|
|
31
|
-
import '@girs/gpaste-2'
|
|
46
|
+
import '@girs/gpaste-2';
|
|
32
47
|
```
|
|
33
48
|
|
|
34
|
-
`tsconfig.json`:
|
|
35
49
|
```json
|
|
36
|
-
{
|
|
37
|
-
"compilerOptions": {
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
"include": ["@girs/gpaste-2"],
|
|
41
|
-
...
|
|
42
|
-
}
|
|
50
|
+
{ "include": ["@girs/gpaste-2"] }
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
Then the runtime spelling type-checks:
|
|
46
54
|
|
|
47
55
|
```ts
|
|
48
56
|
import GPaste from 'gi://GPaste?version=2';
|
|
49
57
|
```
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
GJS's global `imports.gi` works too, with types.
|
|
54
|
-
For this you need to include `@girs/gpaste-2` or `@girs/gpaste-2/import` in your `tsconfig` or entry point Typescript file:
|
|
59
|
+
Referencing `@girs/gpaste-2/ambient` instead pulls in these declarations
|
|
60
|
+
alone. See [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules).
|
|
55
61
|
|
|
56
|
-
`
|
|
57
|
-
```ts
|
|
58
|
-
import '@girs/gpaste-2'
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`tsconfig.json`:
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"compilerOptions": {
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
"include": ["@girs/gpaste-2"],
|
|
68
|
-
...
|
|
69
|
-
}
|
|
70
|
-
```
|
|
62
|
+
### As `imports.gi`
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
GJS's global object works the same way, via `@girs/gpaste-2/import`:
|
|
73
65
|
|
|
74
66
|
```ts
|
|
75
67
|
const GPaste = imports.gi.GPaste;
|
|
76
68
|
```
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
## Building
|
|
79
71
|
|
|
80
|
-
|
|
72
|
+
The declarations need no build step. If you bundle, every bundler works, since there is
|
|
73
|
+
no runtime code to resolve. The [examples](https://github.com/gjsify/ts-for-gir/tree/main/examples)
|
|
74
|
+
show working setups for several.
|
|
81
75
|
|
|
82
76
|
## Other packages
|
|
83
77
|
|
|
84
|
-
|
|
78
|
+
Every pre-generated package is at [gjsify/types](https://github.com/gjsify/types).
|
|
79
|
+
|
|
85
80
|
|
package/gpaste-2.d.ts
CHANGED
|
@@ -34,10 +34,10 @@ export namespace GPaste {
|
|
|
34
34
|
* @gir-type Enum
|
|
35
35
|
*/
|
|
36
36
|
enum ItemKind {
|
|
37
|
-
TEXT,
|
|
38
|
-
URIS,
|
|
39
|
-
IMAGE,
|
|
40
|
-
PASSWORD,
|
|
37
|
+
TEXT = 1,
|
|
38
|
+
URIS = 2,
|
|
39
|
+
IMAGE = 3,
|
|
40
|
+
PASSWORD = 4,
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
|
|
@@ -52,8 +52,8 @@ export namespace GPaste {
|
|
|
52
52
|
* @gir-type Enum
|
|
53
53
|
*/
|
|
54
54
|
enum UpdateAction {
|
|
55
|
-
REPLACE,
|
|
56
|
-
REMOVE,
|
|
55
|
+
REPLACE = 1,
|
|
56
|
+
REMOVE = 2,
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
|
|
@@ -68,179 +68,434 @@ export namespace GPaste {
|
|
|
68
68
|
* @gir-type Enum
|
|
69
69
|
*/
|
|
70
70
|
enum UpdateTarget {
|
|
71
|
-
ALL,
|
|
72
|
-
POSITION,
|
|
71
|
+
ALL = 1,
|
|
72
|
+
POSITION = 2,
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* @default org.gnome.GPaste
|
|
78
|
+
*/
|
|
76
79
|
const BUS_NAME: string;
|
|
77
80
|
|
|
81
|
+
/**
|
|
82
|
+
* @default close-on-select
|
|
83
|
+
*/
|
|
78
84
|
const CLOSE_ON_SELECT_SETTING: string;
|
|
79
85
|
|
|
86
|
+
/**
|
|
87
|
+
* @default About
|
|
88
|
+
*/
|
|
80
89
|
const DAEMON_ABOUT: string;
|
|
81
90
|
|
|
91
|
+
/**
|
|
92
|
+
* @default Add
|
|
93
|
+
*/
|
|
82
94
|
const DAEMON_ADD: string;
|
|
83
95
|
|
|
96
|
+
/**
|
|
97
|
+
* @default AddFile
|
|
98
|
+
*/
|
|
84
99
|
const DAEMON_ADD_FILE: string;
|
|
85
100
|
|
|
101
|
+
/**
|
|
102
|
+
* @default AddPassword
|
|
103
|
+
*/
|
|
86
104
|
const DAEMON_ADD_PASSWORD: string;
|
|
87
105
|
|
|
106
|
+
/**
|
|
107
|
+
* @default BackupHistory
|
|
108
|
+
*/
|
|
88
109
|
const DAEMON_BACKUP_HISTORY: string;
|
|
89
110
|
|
|
111
|
+
/**
|
|
112
|
+
* @default Delete
|
|
113
|
+
*/
|
|
90
114
|
const DAEMON_DELETE: string;
|
|
91
115
|
|
|
116
|
+
/**
|
|
117
|
+
* @default DeleteHistory
|
|
118
|
+
*/
|
|
92
119
|
const DAEMON_DELETE_HISTORY: string;
|
|
93
120
|
|
|
121
|
+
/**
|
|
122
|
+
* @default DeletePassword
|
|
123
|
+
*/
|
|
94
124
|
const DAEMON_DELETE_PASSWORD: string;
|
|
95
125
|
|
|
126
|
+
/**
|
|
127
|
+
* @default EmptyHistory
|
|
128
|
+
*/
|
|
96
129
|
const DAEMON_EMPTY_HISTORY: string;
|
|
97
130
|
|
|
131
|
+
/**
|
|
132
|
+
* @default GetElement
|
|
133
|
+
*/
|
|
98
134
|
const DAEMON_GET_ELEMENT: string;
|
|
99
135
|
|
|
136
|
+
/**
|
|
137
|
+
* @default GetElements
|
|
138
|
+
*/
|
|
100
139
|
const DAEMON_GET_ELEMENTS: string;
|
|
101
140
|
|
|
141
|
+
/**
|
|
142
|
+
* @default GetElementAtIndex
|
|
143
|
+
*/
|
|
102
144
|
const DAEMON_GET_ELEMENT_AT_INDEX: string;
|
|
103
145
|
|
|
146
|
+
/**
|
|
147
|
+
* @default GetElementKind
|
|
148
|
+
*/
|
|
104
149
|
const DAEMON_GET_ELEMENT_KIND: string;
|
|
105
150
|
|
|
151
|
+
/**
|
|
152
|
+
* @default GetHistory
|
|
153
|
+
*/
|
|
106
154
|
const DAEMON_GET_HISTORY: string;
|
|
107
155
|
|
|
156
|
+
/**
|
|
157
|
+
* @default GetHistoryName
|
|
158
|
+
*/
|
|
108
159
|
const DAEMON_GET_HISTORY_NAME: string;
|
|
109
160
|
|
|
161
|
+
/**
|
|
162
|
+
* @default GetHistorySize
|
|
163
|
+
*/
|
|
110
164
|
const DAEMON_GET_HISTORY_SIZE: string;
|
|
111
165
|
|
|
166
|
+
/**
|
|
167
|
+
* @default GetRawElement
|
|
168
|
+
*/
|
|
112
169
|
const DAEMON_GET_RAW_ELEMENT: string;
|
|
113
170
|
|
|
171
|
+
/**
|
|
172
|
+
* @default GetRawHistory
|
|
173
|
+
*/
|
|
114
174
|
const DAEMON_GET_RAW_HISTORY: string;
|
|
115
175
|
|
|
176
|
+
/**
|
|
177
|
+
* @default <node> <interface name='
|
|
178
|
+
*/
|
|
116
179
|
const DAEMON_INTERFACE: string;
|
|
117
180
|
|
|
181
|
+
/**
|
|
182
|
+
* @default org.gnome.GPaste2
|
|
183
|
+
*/
|
|
118
184
|
const DAEMON_INTERFACE_NAME: string;
|
|
119
185
|
|
|
186
|
+
/**
|
|
187
|
+
* @default ListHistories
|
|
188
|
+
*/
|
|
120
189
|
const DAEMON_LIST_HISTORIES: string;
|
|
121
190
|
|
|
191
|
+
/**
|
|
192
|
+
* @default Merge
|
|
193
|
+
*/
|
|
122
194
|
const DAEMON_MERGE: string;
|
|
123
195
|
|
|
196
|
+
/**
|
|
197
|
+
* @default /org/gnome/GPaste
|
|
198
|
+
*/
|
|
124
199
|
const DAEMON_OBJECT_PATH: string;
|
|
125
200
|
|
|
201
|
+
/**
|
|
202
|
+
* @default OnExtensionStateChanged
|
|
203
|
+
*/
|
|
126
204
|
const DAEMON_ON_EXTENSION_STATE_CHANGED: string;
|
|
127
205
|
|
|
206
|
+
/**
|
|
207
|
+
* @default Active
|
|
208
|
+
*/
|
|
128
209
|
const DAEMON_PROP_ACTIVE: string;
|
|
129
210
|
|
|
211
|
+
/**
|
|
212
|
+
* @default Version
|
|
213
|
+
*/
|
|
130
214
|
const DAEMON_PROP_VERSION: string;
|
|
131
215
|
|
|
216
|
+
/**
|
|
217
|
+
* @default Reexecute
|
|
218
|
+
*/
|
|
132
219
|
const DAEMON_REEXECUTE: string;
|
|
133
220
|
|
|
221
|
+
/**
|
|
222
|
+
* @default RenamePassword
|
|
223
|
+
*/
|
|
134
224
|
const DAEMON_RENAME_PASSWORD: string;
|
|
135
225
|
|
|
226
|
+
/**
|
|
227
|
+
* @default Replace
|
|
228
|
+
*/
|
|
136
229
|
const DAEMON_REPLACE: string;
|
|
137
230
|
|
|
231
|
+
/**
|
|
232
|
+
* @default Search
|
|
233
|
+
*/
|
|
138
234
|
const DAEMON_SEARCH: string;
|
|
139
235
|
|
|
236
|
+
/**
|
|
237
|
+
* @default Select
|
|
238
|
+
*/
|
|
140
239
|
const DAEMON_SELECT: string;
|
|
141
240
|
|
|
241
|
+
/**
|
|
242
|
+
* @default SetPassword
|
|
243
|
+
*/
|
|
142
244
|
const DAEMON_SET_PASSWORD: string;
|
|
143
245
|
|
|
246
|
+
/**
|
|
247
|
+
* @default ShowHistory
|
|
248
|
+
*/
|
|
144
249
|
const DAEMON_SHOW_HISTORY: string;
|
|
145
250
|
|
|
251
|
+
/**
|
|
252
|
+
* @default DeleteHistory
|
|
253
|
+
*/
|
|
146
254
|
const DAEMON_SIG_DELETE_HISTORY: string;
|
|
147
255
|
|
|
256
|
+
/**
|
|
257
|
+
* @default EmptyHistory
|
|
258
|
+
*/
|
|
148
259
|
const DAEMON_SIG_EMPTY_HISTORY: string;
|
|
149
260
|
|
|
261
|
+
/**
|
|
262
|
+
* @default ShowHistory
|
|
263
|
+
*/
|
|
150
264
|
const DAEMON_SIG_SHOW_HISTORY: string;
|
|
151
265
|
|
|
266
|
+
/**
|
|
267
|
+
* @default SwitchHistory
|
|
268
|
+
*/
|
|
152
269
|
const DAEMON_SIG_SWITCH_HISTORY: string;
|
|
153
270
|
|
|
271
|
+
/**
|
|
272
|
+
* @default Update
|
|
273
|
+
*/
|
|
154
274
|
const DAEMON_SIG_UPDATE: string;
|
|
155
275
|
|
|
276
|
+
/**
|
|
277
|
+
* @default SwitchHistory
|
|
278
|
+
*/
|
|
156
279
|
const DAEMON_SWITCH_HISTORY: string;
|
|
157
280
|
|
|
281
|
+
/**
|
|
282
|
+
* @default Track
|
|
283
|
+
*/
|
|
158
284
|
const DAEMON_TRACK: string;
|
|
159
285
|
|
|
286
|
+
/**
|
|
287
|
+
* @default Upload
|
|
288
|
+
*/
|
|
160
289
|
const DAEMON_UPLOAD: string;
|
|
161
290
|
|
|
291
|
+
/**
|
|
292
|
+
* @default element-size
|
|
293
|
+
*/
|
|
162
294
|
const ELEMENT_SIZE_SETTING: string;
|
|
163
295
|
|
|
296
|
+
/**
|
|
297
|
+
* @default empty-history-confirmation
|
|
298
|
+
*/
|
|
164
299
|
const EMPTY_HISTORY_CONFIRMATION_SETTING: string;
|
|
165
300
|
|
|
301
|
+
/**
|
|
302
|
+
* @default extension-enabled
|
|
303
|
+
*/
|
|
166
304
|
const EXTENSION_ENABLED_SETTING: string;
|
|
167
305
|
|
|
306
|
+
/**
|
|
307
|
+
* @default org.gnome.Shell
|
|
308
|
+
*/
|
|
168
309
|
const GNOME_SHELL_BUS_NAME: string;
|
|
169
310
|
|
|
311
|
+
/**
|
|
312
|
+
* @default growing-lines
|
|
313
|
+
*/
|
|
170
314
|
const GROWING_LINES_SETTING: string;
|
|
171
315
|
|
|
316
|
+
/**
|
|
317
|
+
* @default history-name
|
|
318
|
+
*/
|
|
172
319
|
const HISTORY_NAME_SETTING: string;
|
|
173
320
|
|
|
321
|
+
/**
|
|
322
|
+
* @default images-preview
|
|
323
|
+
*/
|
|
174
324
|
const IMAGES_PREVIEW_SETTING: string;
|
|
175
325
|
|
|
326
|
+
/**
|
|
327
|
+
* @default images-preview-size
|
|
328
|
+
*/
|
|
176
329
|
const IMAGES_PREVIEW_SIZE_SETTING: string;
|
|
177
330
|
|
|
331
|
+
/**
|
|
332
|
+
* @default images-support
|
|
333
|
+
*/
|
|
178
334
|
const IMAGES_SUPPORT_SETTING: string;
|
|
179
335
|
|
|
336
|
+
/**
|
|
337
|
+
* @default launch-ui
|
|
338
|
+
*/
|
|
180
339
|
const LAUNCH_UI_SETTING: string;
|
|
181
340
|
|
|
341
|
+
/**
|
|
342
|
+
* @default make-password
|
|
343
|
+
*/
|
|
182
344
|
const MAKE_PASSWORD_SETTING: string;
|
|
183
345
|
|
|
346
|
+
/**
|
|
347
|
+
* @default max-displayed-history-size
|
|
348
|
+
*/
|
|
184
349
|
const MAX_DISPLAYED_HISTORY_SIZE_SETTING: string;
|
|
185
350
|
|
|
351
|
+
/**
|
|
352
|
+
* @default max-history-size
|
|
353
|
+
*/
|
|
186
354
|
const MAX_HISTORY_SIZE_SETTING: string;
|
|
187
355
|
|
|
356
|
+
/**
|
|
357
|
+
* @default max-memory-usage
|
|
358
|
+
*/
|
|
188
359
|
const MAX_MEMORY_USAGE_SETTING: string;
|
|
189
360
|
|
|
361
|
+
/**
|
|
362
|
+
* @default max-text-item-size
|
|
363
|
+
*/
|
|
190
364
|
const MAX_TEXT_ITEM_SIZE_SETTING: string;
|
|
191
365
|
|
|
366
|
+
/**
|
|
367
|
+
* @default min-text-item-size
|
|
368
|
+
*/
|
|
192
369
|
const MIN_TEXT_ITEM_SIZE_SETTING: string;
|
|
193
370
|
|
|
371
|
+
/**
|
|
372
|
+
* @default open-centered
|
|
373
|
+
*/
|
|
194
374
|
const OPEN_CENTERED_SETTING: string;
|
|
195
375
|
|
|
376
|
+
/**
|
|
377
|
+
* @default pop
|
|
378
|
+
*/
|
|
196
379
|
const POP_SETTING: string;
|
|
197
380
|
|
|
381
|
+
/**
|
|
382
|
+
* @default primary-to-history
|
|
383
|
+
*/
|
|
198
384
|
const PRIMARY_TO_HISTORY_SETTING: string;
|
|
199
385
|
|
|
386
|
+
/**
|
|
387
|
+
* @default rich-text-support
|
|
388
|
+
*/
|
|
200
389
|
const RICH_TEXT_SUPPORT_SETTING: string;
|
|
201
390
|
|
|
391
|
+
/**
|
|
392
|
+
* @default save-history
|
|
393
|
+
*/
|
|
202
394
|
const SAVE_HISTORY_SETTING: string;
|
|
203
395
|
|
|
396
|
+
/**
|
|
397
|
+
* @default org.gnome.ScreenSaver
|
|
398
|
+
*/
|
|
204
399
|
const SCREENSAVER_BUS_NAME: string;
|
|
205
400
|
|
|
401
|
+
/**
|
|
402
|
+
* @default ActivateResult
|
|
403
|
+
*/
|
|
206
404
|
const SEARCH_PROVIDER_ACTIVATE_RESULT: string;
|
|
207
405
|
|
|
406
|
+
/**
|
|
407
|
+
* @default GetInitialResultSet
|
|
408
|
+
*/
|
|
208
409
|
const SEARCH_PROVIDER_GET_INITIAL_RESULT_SET: string;
|
|
209
410
|
|
|
411
|
+
/**
|
|
412
|
+
* @default GetResultMetas
|
|
413
|
+
*/
|
|
210
414
|
const SEARCH_PROVIDER_GET_RESULT_METAS: string;
|
|
211
415
|
|
|
416
|
+
/**
|
|
417
|
+
* @default GetSubsearchResultSet
|
|
418
|
+
*/
|
|
212
419
|
const SEARCH_PROVIDER_GET_SUBSEARCH_RESULT_SET: string;
|
|
213
420
|
|
|
421
|
+
/**
|
|
422
|
+
* @default <node> <interface name='
|
|
423
|
+
*/
|
|
214
424
|
const SEARCH_PROVIDER_INTERFACE: string;
|
|
215
425
|
|
|
426
|
+
/**
|
|
427
|
+
* @default org.gnome.Shell.SearchProvider2
|
|
428
|
+
*/
|
|
216
429
|
const SEARCH_PROVIDER_INTERFACE_NAME: string;
|
|
217
430
|
|
|
431
|
+
/**
|
|
432
|
+
* @default LaunchSearch
|
|
433
|
+
*/
|
|
218
434
|
const SEARCH_PROVIDER_LAUNCH_SEARCH: string;
|
|
219
435
|
|
|
436
|
+
/**
|
|
437
|
+
* @default /org/gnome/GPaste/SearchProvider
|
|
438
|
+
*/
|
|
220
439
|
const SEARCH_PROVIDER_OBJECT_PATH: string;
|
|
221
440
|
|
|
441
|
+
/**
|
|
442
|
+
* @default org.gnome.GPaste
|
|
443
|
+
*/
|
|
222
444
|
const SETTINGS_NAME: string;
|
|
223
445
|
|
|
446
|
+
/**
|
|
447
|
+
* @default /org/gnome/GPaste/
|
|
448
|
+
*/
|
|
224
449
|
const SETTINGS_PATH: string;
|
|
225
450
|
|
|
451
|
+
/**
|
|
452
|
+
* @default enabled-extensions
|
|
453
|
+
*/
|
|
226
454
|
const SHELL_ENABLED_EXTENSIONS_SETTING: string;
|
|
227
455
|
|
|
456
|
+
/**
|
|
457
|
+
* @default org.gnome.shell
|
|
458
|
+
*/
|
|
228
459
|
const SHELL_SETTINGS_NAME: string;
|
|
229
460
|
|
|
461
|
+
/**
|
|
462
|
+
* @default show-history
|
|
463
|
+
*/
|
|
230
464
|
const SHOW_HISTORY_SETTING: string;
|
|
231
465
|
|
|
466
|
+
/**
|
|
467
|
+
* @default synchronize-clipboards
|
|
468
|
+
*/
|
|
232
469
|
const SYNCHRONIZE_CLIPBOARDS_SETTING: string;
|
|
233
470
|
|
|
471
|
+
/**
|
|
472
|
+
* @default sync-clipboard-to-primary
|
|
473
|
+
*/
|
|
234
474
|
const SYNC_CLIPBOARD_TO_PRIMARY_SETTING: string;
|
|
235
475
|
|
|
476
|
+
/**
|
|
477
|
+
* @default sync-primary-to-clipboard
|
|
478
|
+
*/
|
|
236
479
|
const SYNC_PRIMARY_TO_CLIPBOARD_SETTING: string;
|
|
237
480
|
|
|
481
|
+
/**
|
|
482
|
+
* @default track-changes
|
|
483
|
+
*/
|
|
238
484
|
const TRACK_CHANGES_SETTING: string;
|
|
239
485
|
|
|
486
|
+
/**
|
|
487
|
+
* @default track-extension-state
|
|
488
|
+
*/
|
|
240
489
|
const TRACK_EXTENSION_STATE_SETTING: string;
|
|
241
490
|
|
|
491
|
+
/**
|
|
492
|
+
* @default trim-items
|
|
493
|
+
*/
|
|
242
494
|
const TRIM_ITEMS_SETTING: string;
|
|
243
495
|
|
|
496
|
+
/**
|
|
497
|
+
* @default upload
|
|
498
|
+
*/
|
|
244
499
|
const UPLOAD_SETTING: string;
|
|
245
500
|
|
|
246
501
|
/**
|
|
@@ -255,6 +510,7 @@ export namespace GPaste {
|
|
|
255
510
|
* @param action the action to activate
|
|
256
511
|
* @param arg the action argument
|
|
257
512
|
* @returns whether the action was successful
|
|
513
|
+
* @throws GLib.Error
|
|
258
514
|
*/
|
|
259
515
|
function util_activate_ui_sync(action: string, arg: GLib.Variant | null): boolean;
|
|
260
516
|
|
|
@@ -274,6 +530,7 @@ export namespace GPaste {
|
|
|
274
530
|
* @param settings a {@link GPaste.Settings} instance
|
|
275
531
|
* @param history the name of the history to empty
|
|
276
532
|
* @returns whether the action was successful
|
|
533
|
+
* @throws GLib.Error
|
|
277
534
|
*/
|
|
278
535
|
function util_empty_with_confirmation_sync(client: Client, settings: Settings, history: string): boolean;
|
|
279
536
|
|
|
@@ -362,6 +619,7 @@ export namespace GPaste {
|
|
|
362
619
|
* spawn a GPaste app
|
|
363
620
|
* @param app the GPaste app to spawn
|
|
364
621
|
* @returns whether the spawn was successful
|
|
622
|
+
* @throws GLib.Error
|
|
365
623
|
*/
|
|
366
624
|
function util_spawn_sync(app: string): boolean;
|
|
367
625
|
|
|
@@ -394,48 +652,48 @@ export namespace GPaste {
|
|
|
394
652
|
/**
|
|
395
653
|
* block action
|
|
396
654
|
*/
|
|
397
|
-
NONE,
|
|
655
|
+
NONE = 0,
|
|
398
656
|
/**
|
|
399
657
|
* allow action when in window mode,
|
|
400
658
|
* e.g. when the focus is in an application window
|
|
401
659
|
*/
|
|
402
|
-
NORMAL,
|
|
660
|
+
NORMAL = 1,
|
|
403
661
|
/**
|
|
404
662
|
* allow action while the overview
|
|
405
663
|
* is active
|
|
406
664
|
*/
|
|
407
|
-
OVERVIEW,
|
|
665
|
+
OVERVIEW = 2,
|
|
408
666
|
/**
|
|
409
667
|
* allow action when the screen
|
|
410
668
|
* is locked, e.g. when the screen shield is shown
|
|
411
669
|
*/
|
|
412
|
-
LOCK_SCREEN,
|
|
670
|
+
LOCK_SCREEN = 4,
|
|
413
671
|
/**
|
|
414
672
|
* allow action in the unlock
|
|
415
673
|
* dialog
|
|
416
674
|
*/
|
|
417
|
-
UNLOCK_SCREEN,
|
|
675
|
+
UNLOCK_SCREEN = 8,
|
|
418
676
|
/**
|
|
419
677
|
* allow action in the login screen
|
|
420
678
|
*/
|
|
421
|
-
LOGIN_SCREEN,
|
|
679
|
+
LOGIN_SCREEN = 16,
|
|
422
680
|
/**
|
|
423
681
|
* allow action when a system modal
|
|
424
682
|
* dialog (e.g. authentification or session dialogs) is open
|
|
425
683
|
*/
|
|
426
|
-
SYSTEM_MODAL,
|
|
684
|
+
SYSTEM_MODAL = 32,
|
|
427
685
|
/**
|
|
428
686
|
* allow action in looking glass
|
|
429
687
|
*/
|
|
430
|
-
LOOKING_GLASS,
|
|
688
|
+
LOOKING_GLASS = 64,
|
|
431
689
|
/**
|
|
432
690
|
* allow action while a shell menu is open
|
|
433
691
|
*/
|
|
434
|
-
POPUP,
|
|
692
|
+
POPUP = 128,
|
|
435
693
|
/**
|
|
436
694
|
* always allow action
|
|
437
695
|
*/
|
|
438
|
-
ALL,
|
|
696
|
+
ALL = -1,
|
|
439
697
|
}
|
|
440
698
|
|
|
441
699
|
|
|
@@ -446,24 +704,24 @@ export namespace GPaste {
|
|
|
446
704
|
/**
|
|
447
705
|
* none
|
|
448
706
|
*/
|
|
449
|
-
NONE,
|
|
707
|
+
NONE = 0,
|
|
450
708
|
/**
|
|
451
709
|
* per-window
|
|
452
710
|
*/
|
|
453
|
-
PER_WINDOW,
|
|
711
|
+
PER_WINDOW = 1,
|
|
454
712
|
/**
|
|
455
713
|
* built-in
|
|
456
714
|
*/
|
|
457
|
-
BUILTIN,
|
|
715
|
+
BUILTIN = 2,
|
|
458
716
|
/**
|
|
459
717
|
* is reversed
|
|
460
718
|
*/
|
|
461
|
-
IS_REVERSED,
|
|
719
|
+
IS_REVERSED = 4,
|
|
462
720
|
/**
|
|
463
721
|
* always active
|
|
464
722
|
*/
|
|
465
|
-
NON_MASKABLE,
|
|
466
|
-
IGNORE_AUTOREPEAT,
|
|
723
|
+
NON_MASKABLE = 8,
|
|
724
|
+
IGNORE_AUTOREPEAT = 16,
|
|
467
725
|
}
|
|
468
726
|
|
|
469
727
|
|
|
@@ -476,14 +734,14 @@ export namespace GPaste {
|
|
|
476
734
|
* @signal
|
|
477
735
|
* @run-last
|
|
478
736
|
*/
|
|
479
|
-
"delete-history": (
|
|
737
|
+
"delete-history": (history: string) => void;
|
|
480
738
|
/**
|
|
481
739
|
* The "empty-history" signal is emitted when we empty
|
|
482
740
|
* a history.
|
|
483
741
|
* @signal
|
|
484
742
|
* @run-last
|
|
485
743
|
*/
|
|
486
|
-
"empty-history": (
|
|
744
|
+
"empty-history": (history: string) => void;
|
|
487
745
|
/**
|
|
488
746
|
* The "show-history" signal is emitted when we switch
|
|
489
747
|
* from a history to another.
|
|
@@ -497,19 +755,19 @@ export namespace GPaste {
|
|
|
497
755
|
* @signal
|
|
498
756
|
* @run-last
|
|
499
757
|
*/
|
|
500
|
-
"switch-history": (
|
|
758
|
+
"switch-history": (history: string) => void;
|
|
501
759
|
/**
|
|
502
760
|
* @signal
|
|
503
761
|
* @run-last
|
|
504
762
|
*/
|
|
505
|
-
tracking: (
|
|
763
|
+
tracking: (object: boolean) => void;
|
|
506
764
|
/**
|
|
507
765
|
* The "update" signal is emitted whenever anything changed
|
|
508
766
|
* in the history (something was added, removed, selected, replaced...).
|
|
509
767
|
* @signal
|
|
510
768
|
* @run-last
|
|
511
769
|
*/
|
|
512
|
-
update: (
|
|
770
|
+
update: (action: UpdateAction, target: UpdateTarget, index: number) => void;
|
|
513
771
|
"notify::g-bus-type": (pspec: GObject.ParamSpec) => void;
|
|
514
772
|
"notify::g-connection": (pspec: GObject.ParamSpec) => void;
|
|
515
773
|
"notify::g-default-timeout": (pspec: GObject.ParamSpec) => void;
|
|
@@ -599,11 +857,13 @@ export namespace GPaste {
|
|
|
599
857
|
/**
|
|
600
858
|
* Display the about dialog
|
|
601
859
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
860
|
+
* @throws GLib.Error
|
|
602
861
|
*/
|
|
603
862
|
about_finish(result: Gio.AsyncResult): void;
|
|
604
863
|
|
|
605
864
|
/**
|
|
606
865
|
* Display the about dialog
|
|
866
|
+
* @throws GLib.Error
|
|
607
867
|
*/
|
|
608
868
|
about_sync(): void;
|
|
609
869
|
|
|
@@ -650,18 +910,21 @@ export namespace GPaste {
|
|
|
650
910
|
/**
|
|
651
911
|
* Add the file contents to the `GPasteDaemon`
|
|
652
912
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
913
|
+
* @throws GLib.Error
|
|
653
914
|
*/
|
|
654
915
|
add_file_finish(result: Gio.AsyncResult): void;
|
|
655
916
|
|
|
656
917
|
/**
|
|
657
918
|
* Add the file contents to the `GPasteDaemon`
|
|
658
919
|
* @param file the file to add
|
|
920
|
+
* @throws GLib.Error
|
|
659
921
|
*/
|
|
660
922
|
add_file_sync(file: string): void;
|
|
661
923
|
|
|
662
924
|
/**
|
|
663
925
|
* Add an item to the `GPasteDaemon`
|
|
664
926
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
927
|
+
* @throws GLib.Error
|
|
665
928
|
*/
|
|
666
929
|
add_finish(result: Gio.AsyncResult): void;
|
|
667
930
|
|
|
@@ -691,6 +954,7 @@ export namespace GPaste {
|
|
|
691
954
|
/**
|
|
692
955
|
* Add the password to the `GPasteDaemon`
|
|
693
956
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
957
|
+
* @throws GLib.Error
|
|
694
958
|
*/
|
|
695
959
|
add_password_finish(result: Gio.AsyncResult): void;
|
|
696
960
|
|
|
@@ -698,12 +962,14 @@ export namespace GPaste {
|
|
|
698
962
|
* Add the password to the `GPasteDaemon`
|
|
699
963
|
* @param name the name to identify the password to add
|
|
700
964
|
* @param password the password to add
|
|
965
|
+
* @throws GLib.Error
|
|
701
966
|
*/
|
|
702
967
|
add_password_sync(name: string, password: string): void;
|
|
703
968
|
|
|
704
969
|
/**
|
|
705
970
|
* Add an item to the `GPasteDaemon`
|
|
706
971
|
* @param text the text to add
|
|
972
|
+
* @throws GLib.Error
|
|
707
973
|
*/
|
|
708
974
|
add_sync(text: string): void;
|
|
709
975
|
|
|
@@ -733,6 +999,7 @@ export namespace GPaste {
|
|
|
733
999
|
/**
|
|
734
1000
|
* Backup the current history
|
|
735
1001
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1002
|
+
* @throws GLib.Error
|
|
736
1003
|
*/
|
|
737
1004
|
backup_history_finish(result: Gio.AsyncResult): void;
|
|
738
1005
|
|
|
@@ -740,6 +1007,7 @@ export namespace GPaste {
|
|
|
740
1007
|
* Backup the current history
|
|
741
1008
|
* @param history the name of the history
|
|
742
1009
|
* @param backup the name of the backup
|
|
1010
|
+
* @throws GLib.Error
|
|
743
1011
|
*/
|
|
744
1012
|
backup_history_sync(history: string, backup: string): void;
|
|
745
1013
|
|
|
@@ -766,6 +1034,7 @@ export namespace GPaste {
|
|
|
766
1034
|
/**
|
|
767
1035
|
* Delete an item from the `GPasteDaemon`
|
|
768
1036
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1037
|
+
* @throws GLib.Error
|
|
769
1038
|
*/
|
|
770
1039
|
delete_finish(result: Gio.AsyncResult): void;
|
|
771
1040
|
|
|
@@ -792,12 +1061,14 @@ export namespace GPaste {
|
|
|
792
1061
|
/**
|
|
793
1062
|
* Delete a history
|
|
794
1063
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1064
|
+
* @throws GLib.Error
|
|
795
1065
|
*/
|
|
796
1066
|
delete_history_finish(result: Gio.AsyncResult): void;
|
|
797
1067
|
|
|
798
1068
|
/**
|
|
799
1069
|
* Delete a history
|
|
800
1070
|
* @param name the name of the history to delete
|
|
1071
|
+
* @throws GLib.Error
|
|
801
1072
|
*/
|
|
802
1073
|
delete_history_sync(name: string): void;
|
|
803
1074
|
|
|
@@ -824,18 +1095,21 @@ export namespace GPaste {
|
|
|
824
1095
|
/**
|
|
825
1096
|
* Delete the password from the `GPasteDaemon`
|
|
826
1097
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1098
|
+
* @throws GLib.Error
|
|
827
1099
|
*/
|
|
828
1100
|
delete_password_finish(result: Gio.AsyncResult): void;
|
|
829
1101
|
|
|
830
1102
|
/**
|
|
831
1103
|
* Delete the password from the `GPasteDaemon`
|
|
832
1104
|
* @param name the name of the password to delete
|
|
1105
|
+
* @throws GLib.Error
|
|
833
1106
|
*/
|
|
834
1107
|
delete_password_sync(name: string): void;
|
|
835
1108
|
|
|
836
1109
|
/**
|
|
837
1110
|
* Delete an item from the `GPasteDaemon`
|
|
838
1111
|
* @param uuid the uuid of the element we want to delete
|
|
1112
|
+
* @throws GLib.Error
|
|
839
1113
|
*/
|
|
840
1114
|
delete_sync(uuid: string): void;
|
|
841
1115
|
|
|
@@ -862,12 +1136,14 @@ export namespace GPaste {
|
|
|
862
1136
|
/**
|
|
863
1137
|
* Empty the history from the `GPasteDaemon`
|
|
864
1138
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1139
|
+
* @throws GLib.Error
|
|
865
1140
|
*/
|
|
866
1141
|
empty_history_finish(result: Gio.AsyncResult): void;
|
|
867
1142
|
|
|
868
1143
|
/**
|
|
869
1144
|
* Empty the history from the `GPasteDaemon`
|
|
870
1145
|
* @param name the name of the history to empty
|
|
1146
|
+
* @throws GLib.Error
|
|
871
1147
|
*/
|
|
872
1148
|
empty_history_sync(name: string): void;
|
|
873
1149
|
|
|
@@ -915,6 +1191,7 @@ export namespace GPaste {
|
|
|
915
1191
|
* Get an item from the `GPasteDaemon`
|
|
916
1192
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
917
1193
|
* @returns a new {@link GPaste.ClientItem}
|
|
1194
|
+
* @throws GLib.Error
|
|
918
1195
|
*/
|
|
919
1196
|
get_element_at_index_finish(result: Gio.AsyncResult): ClientItem;
|
|
920
1197
|
|
|
@@ -922,6 +1199,7 @@ export namespace GPaste {
|
|
|
922
1199
|
* Get an item from the `GPasteDaemon`
|
|
923
1200
|
* @param index the index of the element we want to get
|
|
924
1201
|
* @returns a new {@link GPaste.ClientItem}
|
|
1202
|
+
* @throws GLib.Error
|
|
925
1203
|
*/
|
|
926
1204
|
get_element_at_index_sync(index: bigint | number): ClientItem;
|
|
927
1205
|
|
|
@@ -929,6 +1207,7 @@ export namespace GPaste {
|
|
|
929
1207
|
* Get an item from the `GPasteDaemon`
|
|
930
1208
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
931
1209
|
* @returns a newly allocated string
|
|
1210
|
+
* @throws GLib.Error
|
|
932
1211
|
*/
|
|
933
1212
|
get_element_finish(result: Gio.AsyncResult): string;
|
|
934
1213
|
|
|
@@ -956,6 +1235,7 @@ export namespace GPaste {
|
|
|
956
1235
|
* Get this kind of an item from the `GPasteDaemon`
|
|
957
1236
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
958
1237
|
* @returns The {@link GPaste.ItemKind}
|
|
1238
|
+
* @throws GLib.Error
|
|
959
1239
|
*/
|
|
960
1240
|
get_element_kind_finish(result: Gio.AsyncResult): ItemKind;
|
|
961
1241
|
|
|
@@ -963,6 +1243,7 @@ export namespace GPaste {
|
|
|
963
1243
|
* Get the kind of an item from the `GPasteDaemon`
|
|
964
1244
|
* @param uuid the uuid of the element we want to get
|
|
965
1245
|
* @returns The {@link GPaste.ItemKind}
|
|
1246
|
+
* @throws GLib.Error
|
|
966
1247
|
*/
|
|
967
1248
|
get_element_kind_sync(uuid: string): ItemKind;
|
|
968
1249
|
|
|
@@ -970,6 +1251,7 @@ export namespace GPaste {
|
|
|
970
1251
|
* Get an item from the `GPasteDaemon`
|
|
971
1252
|
* @param uuid the uuid of the element we want to get
|
|
972
1253
|
* @returns a newly allocated string
|
|
1254
|
+
* @throws GLib.Error
|
|
973
1255
|
*/
|
|
974
1256
|
get_element_sync(uuid: string): string;
|
|
975
1257
|
|
|
@@ -997,6 +1279,7 @@ export namespace GPaste {
|
|
|
997
1279
|
* Get some items from the `GPasteDaemon`
|
|
998
1280
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
999
1281
|
* @returns a newly allocated array of string
|
|
1282
|
+
* @throws GLib.Error
|
|
1000
1283
|
*/
|
|
1001
1284
|
get_elements_finish(result: Gio.AsyncResult): ClientItem[];
|
|
1002
1285
|
|
|
@@ -1004,6 +1287,7 @@ export namespace GPaste {
|
|
|
1004
1287
|
* Get some items from the `GPasteDaemon`
|
|
1005
1288
|
* @param uuids the uuids of the elements we want to get
|
|
1006
1289
|
* @returns a newly allocated array of string
|
|
1290
|
+
* @throws GLib.Error
|
|
1007
1291
|
*/
|
|
1008
1292
|
get_elements_sync(uuids: string[]): ClientItem[];
|
|
1009
1293
|
|
|
@@ -1028,6 +1312,7 @@ export namespace GPaste {
|
|
|
1028
1312
|
* Get the history from the `GPasteDaemon`
|
|
1029
1313
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1030
1314
|
* @returns a newly allocated array of string
|
|
1315
|
+
* @throws GLib.Error
|
|
1031
1316
|
*/
|
|
1032
1317
|
get_history_finish(result: Gio.AsyncResult): ClientItem[];
|
|
1033
1318
|
|
|
@@ -1052,12 +1337,14 @@ export namespace GPaste {
|
|
|
1052
1337
|
* Get the name of the history from the `GPasteDaemon`
|
|
1053
1338
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1054
1339
|
* @returns a newly allocated string
|
|
1340
|
+
* @throws GLib.Error
|
|
1055
1341
|
*/
|
|
1056
1342
|
get_history_name_finish(result: Gio.AsyncResult): string;
|
|
1057
1343
|
|
|
1058
1344
|
/**
|
|
1059
1345
|
* Get the name of the history from the `GPasteDaemon`
|
|
1060
1346
|
* @returns a newly allocated string
|
|
1347
|
+
* @throws GLib.Error
|
|
1061
1348
|
*/
|
|
1062
1349
|
get_history_name_sync(): string;
|
|
1063
1350
|
|
|
@@ -1085,6 +1372,7 @@ export namespace GPaste {
|
|
|
1085
1372
|
* Get the history size from the `GPasteDaemon`
|
|
1086
1373
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1087
1374
|
* @returns the size of the history
|
|
1375
|
+
* @throws GLib.Error
|
|
1088
1376
|
*/
|
|
1089
1377
|
get_history_size_finish(result: Gio.AsyncResult): number;
|
|
1090
1378
|
|
|
@@ -1092,12 +1380,14 @@ export namespace GPaste {
|
|
|
1092
1380
|
* Get the history size from the `GPasteDaemon`
|
|
1093
1381
|
* @param name the name of the history
|
|
1094
1382
|
* @returns the size of the history
|
|
1383
|
+
* @throws GLib.Error
|
|
1095
1384
|
*/
|
|
1096
1385
|
get_history_size_sync(name: string): number;
|
|
1097
1386
|
|
|
1098
1387
|
/**
|
|
1099
1388
|
* Get the history from the `GPasteDaemon`
|
|
1100
1389
|
* @returns a newly allocated array of string
|
|
1390
|
+
* @throws GLib.Error
|
|
1101
1391
|
*/
|
|
1102
1392
|
get_history_sync(): ClientItem[];
|
|
1103
1393
|
|
|
@@ -1125,6 +1415,7 @@ export namespace GPaste {
|
|
|
1125
1415
|
* Get an item from the `GPasteDaemon`
|
|
1126
1416
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1127
1417
|
* @returns a newly allocated string
|
|
1418
|
+
* @throws GLib.Error
|
|
1128
1419
|
*/
|
|
1129
1420
|
get_raw_element_finish(result: Gio.AsyncResult): string;
|
|
1130
1421
|
|
|
@@ -1132,6 +1423,7 @@ export namespace GPaste {
|
|
|
1132
1423
|
* Get an item from the `GPasteDaemon`
|
|
1133
1424
|
* @param uuid the uuid of the element we want to get
|
|
1134
1425
|
* @returns a newly allocated string
|
|
1426
|
+
* @throws GLib.Error
|
|
1135
1427
|
*/
|
|
1136
1428
|
get_raw_element_sync(uuid: string): string;
|
|
1137
1429
|
|
|
@@ -1156,12 +1448,14 @@ export namespace GPaste {
|
|
|
1156
1448
|
* Get the history from the `GPasteDaemon`
|
|
1157
1449
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1158
1450
|
* @returns a newly allocated array of string
|
|
1451
|
+
* @throws GLib.Error
|
|
1159
1452
|
*/
|
|
1160
1453
|
get_raw_history_finish(result: Gio.AsyncResult): ClientItem[];
|
|
1161
1454
|
|
|
1162
1455
|
/**
|
|
1163
1456
|
* Get the history from the `GPasteDaemon`
|
|
1164
1457
|
* @returns a newly allocated array of string
|
|
1458
|
+
* @throws GLib.Error
|
|
1165
1459
|
*/
|
|
1166
1460
|
get_raw_history_sync(): ClientItem[];
|
|
1167
1461
|
|
|
@@ -1198,12 +1492,14 @@ export namespace GPaste {
|
|
|
1198
1492
|
* List all available hisotries
|
|
1199
1493
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1200
1494
|
* @returns a newly allocated array of string
|
|
1495
|
+
* @throws GLib.Error
|
|
1201
1496
|
*/
|
|
1202
1497
|
list_histories_finish(result: Gio.AsyncResult): string[];
|
|
1203
1498
|
|
|
1204
1499
|
/**
|
|
1205
1500
|
* List all available hisotries
|
|
1206
1501
|
* @returns a newly allocated array of string
|
|
1502
|
+
* @throws GLib.Error
|
|
1207
1503
|
*/
|
|
1208
1504
|
list_histories_sync(): string[];
|
|
1209
1505
|
|
|
@@ -1245,6 +1541,7 @@ export namespace GPaste {
|
|
|
1245
1541
|
/**
|
|
1246
1542
|
* Merge some history entries
|
|
1247
1543
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1544
|
+
* @throws GLib.Error
|
|
1248
1545
|
*/
|
|
1249
1546
|
merge_finish(result: Gio.AsyncResult): void;
|
|
1250
1547
|
|
|
@@ -1256,6 +1553,7 @@ export namespace GPaste {
|
|
|
1256
1553
|
* @param decoration the decoration to apply to each entry
|
|
1257
1554
|
* @param separator the separator to add between each entry
|
|
1258
1555
|
* @param uuids the uuids of the elements we want to get
|
|
1556
|
+
* @throws GLib.Error
|
|
1259
1557
|
*/
|
|
1260
1558
|
merge_sync(decoration: string | null, separator: string | null, uuids: string[]): void;
|
|
1261
1559
|
|
|
@@ -1282,12 +1580,14 @@ export namespace GPaste {
|
|
|
1282
1580
|
/**
|
|
1283
1581
|
* Call this when the extension changes its state
|
|
1284
1582
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1583
|
+
* @throws GLib.Error
|
|
1285
1584
|
*/
|
|
1286
1585
|
on_extension_state_changed_finish(result: Gio.AsyncResult): void;
|
|
1287
1586
|
|
|
1288
1587
|
/**
|
|
1289
1588
|
* Call this when the extension changes its state
|
|
1290
1589
|
* @param state the new state of the extension
|
|
1590
|
+
* @throws GLib.Error
|
|
1291
1591
|
*/
|
|
1292
1592
|
on_extension_state_changed_sync(state: boolean): void;
|
|
1293
1593
|
|
|
@@ -1311,11 +1611,13 @@ export namespace GPaste {
|
|
|
1311
1611
|
/**
|
|
1312
1612
|
* Reexecute the `GPasteDaemon`
|
|
1313
1613
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1614
|
+
* @throws GLib.Error
|
|
1314
1615
|
*/
|
|
1315
1616
|
reexecute_finish(result: Gio.AsyncResult): void;
|
|
1316
1617
|
|
|
1317
1618
|
/**
|
|
1318
1619
|
* Reexecute the `GPasteDaemon`
|
|
1620
|
+
* @throws GLib.Error
|
|
1319
1621
|
*/
|
|
1320
1622
|
reexecute_sync(): void;
|
|
1321
1623
|
|
|
@@ -1345,6 +1647,7 @@ export namespace GPaste {
|
|
|
1345
1647
|
/**
|
|
1346
1648
|
* Rename the password in the `GPasteDaemon`
|
|
1347
1649
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1650
|
+
* @throws GLib.Error
|
|
1348
1651
|
*/
|
|
1349
1652
|
rename_password_finish(result: Gio.AsyncResult): void;
|
|
1350
1653
|
|
|
@@ -1352,6 +1655,7 @@ export namespace GPaste {
|
|
|
1352
1655
|
* Rename the password in the `GPasteDaemon`
|
|
1353
1656
|
* @param old_name the name of the password to rename
|
|
1354
1657
|
* @param new_name the new name to give it
|
|
1658
|
+
* @throws GLib.Error
|
|
1355
1659
|
*/
|
|
1356
1660
|
rename_password_sync(old_name: string, new_name: string): void;
|
|
1357
1661
|
|
|
@@ -1381,6 +1685,7 @@ export namespace GPaste {
|
|
|
1381
1685
|
/**
|
|
1382
1686
|
* Replace the contents of an item
|
|
1383
1687
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1688
|
+
* @throws GLib.Error
|
|
1384
1689
|
*/
|
|
1385
1690
|
replace_finish(result: Gio.AsyncResult): void;
|
|
1386
1691
|
|
|
@@ -1388,6 +1693,7 @@ export namespace GPaste {
|
|
|
1388
1693
|
* Replace the contents of an item
|
|
1389
1694
|
* @param uuid the uuid of the element we want to replace
|
|
1390
1695
|
* @param contents the replacement contents
|
|
1696
|
+
* @throws GLib.Error
|
|
1391
1697
|
*/
|
|
1392
1698
|
replace_sync(uuid: string, contents: string): void;
|
|
1393
1699
|
|
|
@@ -1415,6 +1721,7 @@ export namespace GPaste {
|
|
|
1415
1721
|
* Search for items matching `pattern` in history
|
|
1416
1722
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1417
1723
|
* @returns The indexes of the matching items
|
|
1724
|
+
* @throws GLib.Error
|
|
1418
1725
|
*/
|
|
1419
1726
|
search_finish(result: Gio.AsyncResult): string[];
|
|
1420
1727
|
|
|
@@ -1422,6 +1729,7 @@ export namespace GPaste {
|
|
|
1422
1729
|
* Search for items matching `pattern` in history
|
|
1423
1730
|
* @param pattern the pattern to look for in history
|
|
1424
1731
|
* @returns The uuids of the matching items
|
|
1732
|
+
* @throws GLib.Error
|
|
1425
1733
|
*/
|
|
1426
1734
|
search_sync(pattern: string): string[];
|
|
1427
1735
|
|
|
@@ -1448,12 +1756,14 @@ export namespace GPaste {
|
|
|
1448
1756
|
/**
|
|
1449
1757
|
* Select an item from the `GPasteDaemon`
|
|
1450
1758
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1759
|
+
* @throws GLib.Error
|
|
1451
1760
|
*/
|
|
1452
1761
|
select_finish(result: Gio.AsyncResult): void;
|
|
1453
1762
|
|
|
1454
1763
|
/**
|
|
1455
1764
|
* Select an item from the `GPasteDaemon`
|
|
1456
1765
|
* @param uuid the uuid of the element we want to select
|
|
1766
|
+
* @throws GLib.Error
|
|
1457
1767
|
*/
|
|
1458
1768
|
select_sync(uuid: string): void;
|
|
1459
1769
|
|
|
@@ -1483,6 +1793,7 @@ export namespace GPaste {
|
|
|
1483
1793
|
/**
|
|
1484
1794
|
* Set the item as password
|
|
1485
1795
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1796
|
+
* @throws GLib.Error
|
|
1486
1797
|
*/
|
|
1487
1798
|
set_password_finish(result: Gio.AsyncResult): void;
|
|
1488
1799
|
|
|
@@ -1490,6 +1801,7 @@ export namespace GPaste {
|
|
|
1490
1801
|
* Set the item as password
|
|
1491
1802
|
* @param uuid the uuid of the element we want to set as password
|
|
1492
1803
|
* @param name the name to identify the password
|
|
1804
|
+
* @throws GLib.Error
|
|
1493
1805
|
*/
|
|
1494
1806
|
set_password_sync(uuid: string, name: string): void;
|
|
1495
1807
|
|
|
@@ -1513,11 +1825,13 @@ export namespace GPaste {
|
|
|
1513
1825
|
/**
|
|
1514
1826
|
* Emit the ShowHistory signal
|
|
1515
1827
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1828
|
+
* @throws GLib.Error
|
|
1516
1829
|
*/
|
|
1517
1830
|
show_history_finish(result: Gio.AsyncResult): void;
|
|
1518
1831
|
|
|
1519
1832
|
/**
|
|
1520
1833
|
* Emit the ShowHistory signal
|
|
1834
|
+
* @throws GLib.Error
|
|
1521
1835
|
*/
|
|
1522
1836
|
show_history_sync(): void;
|
|
1523
1837
|
|
|
@@ -1544,12 +1858,14 @@ export namespace GPaste {
|
|
|
1544
1858
|
/**
|
|
1545
1859
|
* Switch to another history
|
|
1546
1860
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1861
|
+
* @throws GLib.Error
|
|
1547
1862
|
*/
|
|
1548
1863
|
switch_history_finish(result: Gio.AsyncResult): void;
|
|
1549
1864
|
|
|
1550
1865
|
/**
|
|
1551
1866
|
* Switch to another history
|
|
1552
1867
|
* @param name the name of the history to switch to
|
|
1868
|
+
* @throws GLib.Error
|
|
1553
1869
|
*/
|
|
1554
1870
|
switch_history_sync(name: string): void;
|
|
1555
1871
|
|
|
@@ -1576,12 +1892,14 @@ export namespace GPaste {
|
|
|
1576
1892
|
/**
|
|
1577
1893
|
* Change the tracking state of the `GPasteDaemon`
|
|
1578
1894
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1895
|
+
* @throws GLib.Error
|
|
1579
1896
|
*/
|
|
1580
1897
|
track_finish(result: Gio.AsyncResult): void;
|
|
1581
1898
|
|
|
1582
1899
|
/**
|
|
1583
1900
|
* Change the tracking state of the `GPasteDaemon`
|
|
1584
1901
|
* @param state the new tracking state of the `GPasteDaemon`
|
|
1902
|
+
* @throws GLib.Error
|
|
1585
1903
|
*/
|
|
1586
1904
|
track_sync(state: boolean): void;
|
|
1587
1905
|
|
|
@@ -1608,12 +1926,14 @@ export namespace GPaste {
|
|
|
1608
1926
|
/**
|
|
1609
1927
|
* Upload an item to a pastebin service
|
|
1610
1928
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
1929
|
+
* @throws GLib.Error
|
|
1611
1930
|
*/
|
|
1612
1931
|
upload_finish(result: Gio.AsyncResult): void;
|
|
1613
1932
|
|
|
1614
1933
|
/**
|
|
1615
1934
|
* Upload an item to a pastebin service
|
|
1616
1935
|
* @param uuid the uuid of the element we want to upload
|
|
1936
|
+
* @throws GLib.Error
|
|
1617
1937
|
*/
|
|
1618
1938
|
upload_sync(uuid: string): void;
|
|
1619
1939
|
|
|
@@ -1754,6 +2074,7 @@ export namespace GPaste {
|
|
|
1754
2074
|
* @param res a {@link Gio.AsyncResult}.
|
|
1755
2075
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
1756
2076
|
* @since 2.22
|
|
2077
|
+
* @throws GLib.Error
|
|
1757
2078
|
*/
|
|
1758
2079
|
init_finish(res: Gio.AsyncResult): boolean;
|
|
1759
2080
|
|
|
@@ -1763,6 +2084,7 @@ export namespace GPaste {
|
|
|
1763
2084
|
* @param res the {@link Gio.AsyncResult} from the callback
|
|
1764
2085
|
* @returns a newly created {@link GObject.Object}, or `null` on error. Free with `g_object_unref()`.
|
|
1765
2086
|
* @since 2.22
|
|
2087
|
+
* @throws GLib.Error
|
|
1766
2088
|
*/
|
|
1767
2089
|
new_finish(res: Gio.AsyncResult): Client;
|
|
1768
2090
|
|
|
@@ -1927,6 +2249,7 @@ export namespace GPaste {
|
|
|
1927
2249
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
1928
2250
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
1929
2251
|
* @since 2.22
|
|
2252
|
+
* @throws GLib.Error
|
|
1930
2253
|
*/
|
|
1931
2254
|
init(cancellable: Gio.Cancellable | null): boolean;
|
|
1932
2255
|
|
|
@@ -2042,7 +2365,7 @@ export namespace GPaste {
|
|
|
2042
2365
|
* @signal
|
|
2043
2366
|
* @run-last
|
|
2044
2367
|
*/
|
|
2045
|
-
"accelerator-activated": (
|
|
2368
|
+
"accelerator-activated": (id: number) => void;
|
|
2046
2369
|
"notify::g-bus-type": (pspec: GObject.ParamSpec) => void;
|
|
2047
2370
|
"notify::g-connection": (pspec: GObject.ParamSpec) => void;
|
|
2048
2371
|
"notify::g-default-timeout": (pspec: GObject.ParamSpec) => void;
|
|
@@ -2136,6 +2459,7 @@ export namespace GPaste {
|
|
|
2136
2459
|
* Grab a keybinding
|
|
2137
2460
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
2138
2461
|
* @returns the action id corresultponding
|
|
2462
|
+
* @throws GLib.Error
|
|
2139
2463
|
*/
|
|
2140
2464
|
grab_accelerator_finish(result: Gio.AsyncResult): number;
|
|
2141
2465
|
|
|
@@ -2143,6 +2467,7 @@ export namespace GPaste {
|
|
|
2143
2467
|
* Grab a keybinding
|
|
2144
2468
|
* @param accelerator a {@link GPaste.GnomeShellAccelerator} instance
|
|
2145
2469
|
* @returns the action id corresponding
|
|
2470
|
+
* @throws GLib.Error
|
|
2146
2471
|
*/
|
|
2147
2472
|
grab_accelerator_sync(accelerator: GnomeShellAccelerator): number;
|
|
2148
2473
|
|
|
@@ -2170,6 +2495,7 @@ export namespace GPaste {
|
|
|
2170
2495
|
* Grab some keybindings
|
|
2171
2496
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
2172
2497
|
* @returns the action ids corresultponding
|
|
2498
|
+
* @throws GLib.Error
|
|
2173
2499
|
*/
|
|
2174
2500
|
grab_accelerators_finish(result: Gio.AsyncResult): number;
|
|
2175
2501
|
|
|
@@ -2177,6 +2503,7 @@ export namespace GPaste {
|
|
|
2177
2503
|
* Grab some keybindings
|
|
2178
2504
|
* @param accelerators an array of {@link GPaste.GnomeShellAccelerator} instances
|
|
2179
2505
|
* @returns the action ids corresponding
|
|
2506
|
+
* @throws GLib.Error
|
|
2180
2507
|
*/
|
|
2181
2508
|
grab_accelerators_sync(accelerators: GnomeShellAccelerator[]): number;
|
|
2182
2509
|
|
|
@@ -2204,6 +2531,7 @@ export namespace GPaste {
|
|
|
2204
2531
|
* Ungrab a keybinding
|
|
2205
2532
|
* @param result A {@link Gio.AsyncResult} obtained from the {@link Gio.AsyncReadyCallback} passed to the async call.
|
|
2206
2533
|
* @returns whether the ungrab was succesful or not
|
|
2534
|
+
* @throws GLib.Error
|
|
2207
2535
|
*/
|
|
2208
2536
|
ungrab_accelerator_finish(result: Gio.AsyncResult): boolean;
|
|
2209
2537
|
|
|
@@ -2211,6 +2539,7 @@ export namespace GPaste {
|
|
|
2211
2539
|
* Ungrab a keybinding
|
|
2212
2540
|
* @param action the action id corresponding to the keybinding
|
|
2213
2541
|
* @returns whether the ungrab was succesful or not
|
|
2542
|
+
* @throws GLib.Error
|
|
2214
2543
|
*/
|
|
2215
2544
|
ungrab_accelerator_sync(action: number): boolean;
|
|
2216
2545
|
|
|
@@ -2381,6 +2710,7 @@ export namespace GPaste {
|
|
|
2381
2710
|
* @param res a {@link Gio.AsyncResult}.
|
|
2382
2711
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
2383
2712
|
* @since 2.22
|
|
2713
|
+
* @throws GLib.Error
|
|
2384
2714
|
*/
|
|
2385
2715
|
init_finish(res: Gio.AsyncResult): boolean;
|
|
2386
2716
|
|
|
@@ -2390,6 +2720,7 @@ export namespace GPaste {
|
|
|
2390
2720
|
* @param res the {@link Gio.AsyncResult} from the callback
|
|
2391
2721
|
* @returns a newly created {@link GObject.Object}, or `null` on error. Free with `g_object_unref()`.
|
|
2392
2722
|
* @since 2.22
|
|
2723
|
+
* @throws GLib.Error
|
|
2393
2724
|
*/
|
|
2394
2725
|
new_finish(res: Gio.AsyncResult): GnomeShellClient;
|
|
2395
2726
|
|
|
@@ -2554,6 +2885,7 @@ export namespace GPaste {
|
|
|
2554
2885
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
2555
2886
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
2556
2887
|
* @since 2.22
|
|
2888
|
+
* @throws GLib.Error
|
|
2557
2889
|
*/
|
|
2558
2890
|
init(cancellable: Gio.Cancellable | null): boolean;
|
|
2559
2891
|
|
|
@@ -2612,7 +2944,7 @@ export namespace GPaste {
|
|
|
2612
2944
|
* @signal
|
|
2613
2945
|
* @run-last
|
|
2614
2946
|
*/
|
|
2615
|
-
"active-changed": (
|
|
2947
|
+
"active-changed": (active: boolean) => void;
|
|
2616
2948
|
"notify::g-bus-type": (pspec: GObject.ParamSpec) => void;
|
|
2617
2949
|
"notify::g-connection": (pspec: GObject.ParamSpec) => void;
|
|
2618
2950
|
"notify::g-default-timeout": (pspec: GObject.ParamSpec) => void;
|
|
@@ -2818,6 +3150,7 @@ export namespace GPaste {
|
|
|
2818
3150
|
* @param res a {@link Gio.AsyncResult}.
|
|
2819
3151
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
2820
3152
|
* @since 2.22
|
|
3153
|
+
* @throws GLib.Error
|
|
2821
3154
|
*/
|
|
2822
3155
|
init_finish(res: Gio.AsyncResult): boolean;
|
|
2823
3156
|
|
|
@@ -2827,6 +3160,7 @@ export namespace GPaste {
|
|
|
2827
3160
|
* @param res the {@link Gio.AsyncResult} from the callback
|
|
2828
3161
|
* @returns a newly created {@link GObject.Object}, or `null` on error. Free with `g_object_unref()`.
|
|
2829
3162
|
* @since 2.22
|
|
3163
|
+
* @throws GLib.Error
|
|
2830
3164
|
*/
|
|
2831
3165
|
new_finish(res: Gio.AsyncResult): ScreensaverClient;
|
|
2832
3166
|
|
|
@@ -2991,6 +3325,7 @@ export namespace GPaste {
|
|
|
2991
3325
|
* @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
|
|
2992
3326
|
* @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present.
|
|
2993
3327
|
* @since 2.22
|
|
3328
|
+
* @throws GLib.Error
|
|
2994
3329
|
*/
|
|
2995
3330
|
init(cancellable: Gio.Cancellable | null): boolean;
|
|
2996
3331
|
|
|
@@ -3056,7 +3391,7 @@ export namespace GPaste {
|
|
|
3056
3391
|
* @detailed
|
|
3057
3392
|
* @run-last
|
|
3058
3393
|
*/
|
|
3059
|
-
changed: (
|
|
3394
|
+
changed: (key: string) => void;
|
|
3060
3395
|
/**
|
|
3061
3396
|
* The "rebind" signal is emitted when a key has potentially changed.
|
|
3062
3397
|
* You should call one of the `g_paste_settings_get()` calls to check the new
|
|
@@ -3069,16 +3404,16 @@ export namespace GPaste {
|
|
|
3069
3404
|
* @detailed
|
|
3070
3405
|
* @run-last
|
|
3071
3406
|
*/
|
|
3072
|
-
rebind: (
|
|
3407
|
+
rebind: (key: string) => void;
|
|
3073
3408
|
/**
|
|
3074
3409
|
* The "track" signal is emitted when the daemon starts or stops tracking
|
|
3075
3410
|
* clipboard changes
|
|
3076
3411
|
* @signal
|
|
3077
3412
|
* @run-last
|
|
3078
3413
|
*/
|
|
3079
|
-
track: (
|
|
3080
|
-
[key: `changed::${string}`]: (
|
|
3081
|
-
[key: `rebind::${string}`]: (
|
|
3414
|
+
track: (tracking_state: boolean) => void;
|
|
3415
|
+
[key: `changed::${string}`]: (key: string) => void;
|
|
3416
|
+
[key: `rebind::${string}`]: (key: string) => void;
|
|
3082
3417
|
}
|
|
3083
3418
|
|
|
3084
3419
|
// Constructor properties interface
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gpaste-2",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for GPaste-2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gpaste-2.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/gio-2.0": "^4.
|
|
36
|
-
"@girs/gobject-2.0": "^4.
|
|
37
|
-
"@girs/glib-2.0": "^4.
|
|
38
|
-
"@girs/gmodule-2.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.5.0",
|
|
35
|
+
"@girs/gio-2.0": "^4.5.0",
|
|
36
|
+
"@girs/gobject-2.0": "^4.5.0",
|
|
37
|
+
"@girs/glib-2.0": "^4.5.0",
|
|
38
|
+
"@girs/gmodule-2.0": "^4.5.0" },
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"typescript": "*"
|
|
41
41
|
},
|