@girs/notify-0.7 0.8.1-3.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/notify-0.7.cjs +9 -0
- package/notify-0.7.d.cts +475 -0
- package/notify-0.7.d.ts +480 -0
- package/notify-0.7.js +8 -0
- package/package.json +56 -0
- package/tsconfig.doc.json +19 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# Notify-0.7
|
|
3
|
+
|
|
4
|
+
GJS TypeScript type definitions for Notify-0.7, generated from library version 0.8.1 using [ts-for-gir](https://github.com/gjsify/ts-for-gjs) v3.0.0-beta.12.
|
|
5
|
+
|
|
6
|
+
libnotify is a library that sends desktop notifications to a notification daemon, as defined in the Desktop Notifications spec. These notifications can be used to inform the user about an event or display some form of information without getting in the user's way.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
To use this type definitions, install them with NPM like this:
|
|
11
|
+
```bash
|
|
12
|
+
npm install @girs/notify-0.7
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
You can import this package into your project like this:
|
|
18
|
+
```ts
|
|
19
|
+
import Notify from '@girs/notify-0.7';
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or if you prefer CommonJS, you can also use this:
|
|
23
|
+
```ts
|
|
24
|
+
const Notify = require('@girs/notify-0.7');
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If you use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules), you can also import this module like you would do this in JavaScript:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import Notify from 'gi://Notify?version=0.7';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
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/notify-0.7.cjs
ADDED
package/notify-0.7.d.cts
ADDED
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Type Definitions for Gjs (https://gjs.guide/)
|
|
4
|
+
*
|
|
5
|
+
* These type definitions are automatically generated, do not edit them by hand.
|
|
6
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Notify-0.7
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
|
|
13
|
+
import type Gio from '@girs/gio-2.0';
|
|
14
|
+
import type GObject from '@girs/gobject-2.0';
|
|
15
|
+
import type GLib from '@girs/glib-2.0';
|
|
16
|
+
import type GModule from '@girs/gmodule-2.0';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The reason for which the notification has been closed.
|
|
20
|
+
*/
|
|
21
|
+
export enum ClosedReason {
|
|
22
|
+
/**
|
|
23
|
+
* Notification not closed.
|
|
24
|
+
*/
|
|
25
|
+
UNSET,
|
|
26
|
+
/**
|
|
27
|
+
* Timeout has expired.
|
|
28
|
+
*/
|
|
29
|
+
EXPIRED,
|
|
30
|
+
/**
|
|
31
|
+
* It has been dismissed by the user.
|
|
32
|
+
*/
|
|
33
|
+
DISMISSED,
|
|
34
|
+
/**
|
|
35
|
+
* It has been closed by a call to
|
|
36
|
+
* [method`Notify`.close].
|
|
37
|
+
*/
|
|
38
|
+
API_REQUEST,
|
|
39
|
+
/**
|
|
40
|
+
* Closed by undefined/reserved reasons.
|
|
41
|
+
*/
|
|
42
|
+
UNDEFIEND,
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The urgency level of the notification.
|
|
46
|
+
*/
|
|
47
|
+
export enum Urgency {
|
|
48
|
+
/**
|
|
49
|
+
* Low urgency. Used for unimportant notifications.
|
|
50
|
+
*/
|
|
51
|
+
LOW,
|
|
52
|
+
/**
|
|
53
|
+
* Normal urgency. Used for most standard notifications.
|
|
54
|
+
*/
|
|
55
|
+
NORMAL,
|
|
56
|
+
/**
|
|
57
|
+
* Critical urgency. Used for very important notifications.
|
|
58
|
+
*/
|
|
59
|
+
CRITICAL,
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The default expiration time on a notification.
|
|
63
|
+
*/
|
|
64
|
+
export const EXPIRES_DEFAULT: number
|
|
65
|
+
/**
|
|
66
|
+
* The notification never expires.
|
|
67
|
+
*
|
|
68
|
+
* It stays open until closed by the calling API or the user.
|
|
69
|
+
*/
|
|
70
|
+
export const EXPIRES_NEVER: number
|
|
71
|
+
/**
|
|
72
|
+
* Adwaita major version component (e.g. 1 if the version is 1.2.3).
|
|
73
|
+
*/
|
|
74
|
+
export const VERSION_MAJOR: number
|
|
75
|
+
/**
|
|
76
|
+
* Adwaita micro version component (e.g. 3 if the version is 1.2.3).
|
|
77
|
+
*/
|
|
78
|
+
export const VERSION_MICRO: number
|
|
79
|
+
/**
|
|
80
|
+
* Adwaita minor version component (e.g. 2 if the version is 1.2.3).
|
|
81
|
+
*/
|
|
82
|
+
export const VERSION_MINOR: number
|
|
83
|
+
/**
|
|
84
|
+
* Gets the application name registered.
|
|
85
|
+
* @returns The registered application name, passed to [func@init].
|
|
86
|
+
*/
|
|
87
|
+
export function get_app_name(): string | null
|
|
88
|
+
/**
|
|
89
|
+
* Queries the server capabilities.
|
|
90
|
+
*
|
|
91
|
+
* Synchronously queries the server for its capabilities and returns them in a
|
|
92
|
+
* list.
|
|
93
|
+
* @returns a list of server capability strings.
|
|
94
|
+
*/
|
|
95
|
+
export function get_server_caps(): string[]
|
|
96
|
+
/**
|
|
97
|
+
* Queries the server for information.
|
|
98
|
+
*
|
|
99
|
+
* Synchronously queries the server for its information, specifically, the name,
|
|
100
|
+
* vendor, server version, and the version of the notifications specification
|
|
101
|
+
* that it is compliant with.
|
|
102
|
+
* @returns %TRUE if successful, and the variables passed will be set, %FALSE on error. The returned strings must be freed with g_free
|
|
103
|
+
*/
|
|
104
|
+
export function get_server_info(): [ /* returnType */ boolean, /* ret_name */ string | null, /* ret_vendor */ string | null, /* ret_version */ string | null, /* ret_spec_version */ string | null ]
|
|
105
|
+
/**
|
|
106
|
+
* Initialized libnotify. This must be called before any other functions.
|
|
107
|
+
*
|
|
108
|
+
* Starting from 0.8, if the provided `app_name` is %NULL, libnotify will
|
|
109
|
+
* try to figure it out from the running application.
|
|
110
|
+
* Before it was not allowed, and was causing libnotify not to be initialized.
|
|
111
|
+
* @param app_name The name of the application initializing libnotify.
|
|
112
|
+
* @returns %TRUE if successful, or %FALSE on error.
|
|
113
|
+
*/
|
|
114
|
+
export function init(app_name: string | null): boolean
|
|
115
|
+
/**
|
|
116
|
+
* Gets whether or not libnotify is initialized.
|
|
117
|
+
* @returns %TRUE if libnotify is initialized, or %FALSE otherwise.
|
|
118
|
+
*/
|
|
119
|
+
export function is_initted(): boolean
|
|
120
|
+
/**
|
|
121
|
+
* Sets the application name.
|
|
122
|
+
* @param app_name The name of the application
|
|
123
|
+
*/
|
|
124
|
+
export function set_app_name(app_name: string | null): void
|
|
125
|
+
/**
|
|
126
|
+
* Uninitializes libnotify.
|
|
127
|
+
*
|
|
128
|
+
* This should be called when the program no longer needs libnotify for
|
|
129
|
+
* the rest of its lifecycle, typically just before exitting.
|
|
130
|
+
*/
|
|
131
|
+
export function uninit(): void
|
|
132
|
+
/**
|
|
133
|
+
* An action callback function.
|
|
134
|
+
* @callback
|
|
135
|
+
* @param notification a #NotifyActionCallback notification
|
|
136
|
+
* @param action The activated action name
|
|
137
|
+
*/
|
|
138
|
+
export interface ActionCallback {
|
|
139
|
+
(notification: Notification, action: string | null): void
|
|
140
|
+
}
|
|
141
|
+
export module Notification {
|
|
142
|
+
|
|
143
|
+
// Signal callback interfaces
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Signal callback interface for `closed`
|
|
147
|
+
*/
|
|
148
|
+
export interface ClosedSignalCallback {
|
|
149
|
+
($obj: Notification): void
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
// Constructor properties interface
|
|
154
|
+
|
|
155
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
156
|
+
|
|
157
|
+
// Own constructor properties of Notify-0.7.Notify.Notification
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The name of the application for the notification.
|
|
161
|
+
*/
|
|
162
|
+
app_name?: string | null
|
|
163
|
+
/**
|
|
164
|
+
* The body of the notification.
|
|
165
|
+
*/
|
|
166
|
+
body?: string | null
|
|
167
|
+
/**
|
|
168
|
+
* The icon-name of the icon to be displayed on the notification.
|
|
169
|
+
*/
|
|
170
|
+
icon_name?: string | null
|
|
171
|
+
/**
|
|
172
|
+
* The Id of the notification.
|
|
173
|
+
*/
|
|
174
|
+
id?: number | null
|
|
175
|
+
/**
|
|
176
|
+
* The summary of the notification.
|
|
177
|
+
*/
|
|
178
|
+
summary?: string | null
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface Notification {
|
|
184
|
+
|
|
185
|
+
// Own properties of Notify-0.7.Notify.Notification
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The name of the application for the notification.
|
|
189
|
+
*/
|
|
190
|
+
app_name: string | null
|
|
191
|
+
/**
|
|
192
|
+
* The body of the notification.
|
|
193
|
+
*/
|
|
194
|
+
body: string | null
|
|
195
|
+
/**
|
|
196
|
+
* The closed reason of the notification.
|
|
197
|
+
*
|
|
198
|
+
* See [signal`Notification:`:closed].
|
|
199
|
+
*/
|
|
200
|
+
readonly closed_reason: number
|
|
201
|
+
/**
|
|
202
|
+
* The icon-name of the icon to be displayed on the notification.
|
|
203
|
+
*/
|
|
204
|
+
icon_name: string | null
|
|
205
|
+
/**
|
|
206
|
+
* The Id of the notification.
|
|
207
|
+
*/
|
|
208
|
+
id: number
|
|
209
|
+
/**
|
|
210
|
+
* The summary of the notification.
|
|
211
|
+
*/
|
|
212
|
+
summary: string | null
|
|
213
|
+
|
|
214
|
+
// Owm methods of Notify-0.7.Notify.Notification
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Adds an action to a notification.
|
|
218
|
+
*
|
|
219
|
+
* When the action is invoked, the specified callback function will be called,
|
|
220
|
+
* along with the value passed to `user_data`.
|
|
221
|
+
* @param action The action ID.
|
|
222
|
+
* @param label The human-readable action label.
|
|
223
|
+
* @param callback The action's callback function.
|
|
224
|
+
*/
|
|
225
|
+
add_action(action: string | null, label: string | null, callback: ActionCallback): void
|
|
226
|
+
/**
|
|
227
|
+
* Clears all actions from the notification.
|
|
228
|
+
*/
|
|
229
|
+
clear_actions(): void
|
|
230
|
+
/**
|
|
231
|
+
* Clears all hints from the notification.
|
|
232
|
+
*/
|
|
233
|
+
clear_hints(): void
|
|
234
|
+
/**
|
|
235
|
+
* Synchronously tells the notification server to hide the notification on the screen.
|
|
236
|
+
* @returns %TRUE on success, or %FALSE on error with @error filled in
|
|
237
|
+
*/
|
|
238
|
+
close(): boolean
|
|
239
|
+
/**
|
|
240
|
+
* Gets the activation token of the notification.
|
|
241
|
+
*
|
|
242
|
+
* If an an action is currently being activated, return the activation token.
|
|
243
|
+
* This function is intended to be used in a [callback`ActionCallback]` to get
|
|
244
|
+
* the activation token for the activated action, if the notification daemon
|
|
245
|
+
* supports it.
|
|
246
|
+
* @returns The current activation token, or %NULL if none
|
|
247
|
+
*/
|
|
248
|
+
get_activation_token(): string | null
|
|
249
|
+
/**
|
|
250
|
+
* Returns the closed reason code for the notification.
|
|
251
|
+
*
|
|
252
|
+
* This is valid only after the [signal`Notification:`:closed] signal is emitted.
|
|
253
|
+
*
|
|
254
|
+
* Since version 0.8.0 the returned value is of type [enum`ClosedReason]`.
|
|
255
|
+
* @returns An integer representing the closed reason code (Since 0.8.0 it's also a [enum@ClosedReason]).
|
|
256
|
+
*/
|
|
257
|
+
get_closed_reason(): number
|
|
258
|
+
/**
|
|
259
|
+
* Sets the application name for the notification.
|
|
260
|
+
*
|
|
261
|
+
* If this function is not called or if `app_name` is %NULL, the application name
|
|
262
|
+
* will be set from the value used in [func`init]` or overridden with
|
|
263
|
+
* [func`set_app_name]`.
|
|
264
|
+
* @param app_name the localised application name
|
|
265
|
+
*/
|
|
266
|
+
set_app_name(app_name: string | null): void
|
|
267
|
+
/**
|
|
268
|
+
* Sets the category of this notification.
|
|
269
|
+
*
|
|
270
|
+
* This can be used by the notification server to filter or display the data in
|
|
271
|
+
* a certain way.
|
|
272
|
+
* @param category The category.
|
|
273
|
+
*/
|
|
274
|
+
set_category(category: string | null): void
|
|
275
|
+
/**
|
|
276
|
+
* Sets a hint for `key` with value `value`.
|
|
277
|
+
*
|
|
278
|
+
* If `value` is %NULL, a previously set hint for `key` is unset.
|
|
279
|
+
*
|
|
280
|
+
* If `value` is floating, it is consumed.
|
|
281
|
+
* @param key the hint key
|
|
282
|
+
* @param value the hint value
|
|
283
|
+
*/
|
|
284
|
+
set_hint(key: string | null, value: GLib.Variant | null): void
|
|
285
|
+
/**
|
|
286
|
+
* Sets a hint with a byte value.
|
|
287
|
+
* @param key The hint.
|
|
288
|
+
* @param value The hint's value.
|
|
289
|
+
*/
|
|
290
|
+
set_hint_byte(key: string | null, value: number): void
|
|
291
|
+
/**
|
|
292
|
+
* Sets a hint with a byte array value.
|
|
293
|
+
*
|
|
294
|
+
* The length of `value` must be passed as `len`.
|
|
295
|
+
* @param key The hint.
|
|
296
|
+
* @param value The hint's value.
|
|
297
|
+
*/
|
|
298
|
+
set_hint_byte_array(key: string | null, value: Uint8Array): void
|
|
299
|
+
/**
|
|
300
|
+
* Sets a hint with a double value.
|
|
301
|
+
* @param key The hint.
|
|
302
|
+
* @param value The hint's value.
|
|
303
|
+
*/
|
|
304
|
+
set_hint_double(key: string | null, value: number): void
|
|
305
|
+
/**
|
|
306
|
+
* Sets a hint with a 32-bit integer value.
|
|
307
|
+
* @param key The hint.
|
|
308
|
+
* @param value The hint's value.
|
|
309
|
+
*/
|
|
310
|
+
set_hint_int32(key: string | null, value: number): void
|
|
311
|
+
/**
|
|
312
|
+
* Sets a hint with a string value.
|
|
313
|
+
* @param key The hint.
|
|
314
|
+
* @param value The hint's value.
|
|
315
|
+
*/
|
|
316
|
+
set_hint_string(key: string | null, value: string | null): void
|
|
317
|
+
/**
|
|
318
|
+
* Sets a hint with an unsigned 32-bit integer value.
|
|
319
|
+
* @param key The hint.
|
|
320
|
+
* @param value The hint's value.
|
|
321
|
+
*/
|
|
322
|
+
set_hint_uint32(key: string | null, value: number): void
|
|
323
|
+
/**
|
|
324
|
+
* Sets the icon in the notification from a #GdkPixbuf.
|
|
325
|
+
* @param icon The icon.
|
|
326
|
+
*/
|
|
327
|
+
set_icon_from_pixbuf(icon: GdkPixbuf.Pixbuf): void
|
|
328
|
+
/**
|
|
329
|
+
* Sets the image in the notification from a [class`GdkPixbuf`.Pixbuf].
|
|
330
|
+
* @param pixbuf The image.
|
|
331
|
+
*/
|
|
332
|
+
set_image_from_pixbuf(pixbuf: GdkPixbuf.Pixbuf): void
|
|
333
|
+
/**
|
|
334
|
+
* Sets the timeout of the notification.
|
|
335
|
+
*
|
|
336
|
+
* To set the default time, pass %NOTIFY_EXPIRES_DEFAULT as `timeout`. To set the
|
|
337
|
+
* notification to never expire, pass %NOTIFY_EXPIRES_NEVER.
|
|
338
|
+
*
|
|
339
|
+
* Note that the timeout may be ignored by the server.
|
|
340
|
+
* @param timeout The timeout in milliseconds.
|
|
341
|
+
*/
|
|
342
|
+
set_timeout(timeout: number): void
|
|
343
|
+
/**
|
|
344
|
+
* Sets the urgency level of this notification.
|
|
345
|
+
* @param urgency The urgency level.
|
|
346
|
+
*/
|
|
347
|
+
set_urgency(urgency: Urgency): void
|
|
348
|
+
/**
|
|
349
|
+
* Tells the notification server to display the notification on the screen.
|
|
350
|
+
* @returns %TRUE if successful. On error, this will return %FALSE and set @error.
|
|
351
|
+
*/
|
|
352
|
+
show(): boolean
|
|
353
|
+
/**
|
|
354
|
+
* Updates the notification text and icon.
|
|
355
|
+
*
|
|
356
|
+
* This won't send the update out and display it on the screen. For that, you
|
|
357
|
+
* will need to call [method`Notification`.show].
|
|
358
|
+
* @param summary The new required summary text.
|
|
359
|
+
* @param body The optional body text.
|
|
360
|
+
* @param icon The optional icon theme icon name or filename.
|
|
361
|
+
* @returns %TRUE, unless an invalid parameter was passed.
|
|
362
|
+
*/
|
|
363
|
+
update(summary: string | null, body: string | null, icon: string | null): boolean
|
|
364
|
+
|
|
365
|
+
// Own virtual methods of Notify-0.7.Notify.Notification
|
|
366
|
+
|
|
367
|
+
vfunc_closed(): void
|
|
368
|
+
|
|
369
|
+
// Own signals of Notify-0.7.Notify.Notification
|
|
370
|
+
|
|
371
|
+
connect(sigName: "closed", callback: Notification.ClosedSignalCallback): number
|
|
372
|
+
connect_after(sigName: "closed", callback: Notification.ClosedSignalCallback): number
|
|
373
|
+
emit(sigName: "closed", ...args: any[]): void
|
|
374
|
+
|
|
375
|
+
// Class property signals of Notify-0.7.Notify.Notification
|
|
376
|
+
|
|
377
|
+
connect(sigName: "notify::app-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
378
|
+
connect_after(sigName: "notify::app-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
379
|
+
emit(sigName: "notify::app-name", ...args: any[]): void
|
|
380
|
+
connect(sigName: "notify::body", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
381
|
+
connect_after(sigName: "notify::body", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
382
|
+
emit(sigName: "notify::body", ...args: any[]): void
|
|
383
|
+
connect(sigName: "notify::closed-reason", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
384
|
+
connect_after(sigName: "notify::closed-reason", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
385
|
+
emit(sigName: "notify::closed-reason", ...args: any[]): void
|
|
386
|
+
connect(sigName: "notify::icon-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
387
|
+
connect_after(sigName: "notify::icon-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
388
|
+
emit(sigName: "notify::icon-name", ...args: any[]): void
|
|
389
|
+
connect(sigName: "notify::id", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
390
|
+
connect_after(sigName: "notify::id", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
391
|
+
emit(sigName: "notify::id", ...args: any[]): void
|
|
392
|
+
connect(sigName: "notify::summary", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
393
|
+
connect_after(sigName: "notify::summary", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
394
|
+
emit(sigName: "notify::summary", ...args: any[]): void
|
|
395
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
396
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
397
|
+
emit(sigName: string, ...args: any[]): void
|
|
398
|
+
disconnect(id: number): void
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* A passive pop-up notification.
|
|
403
|
+
* @class
|
|
404
|
+
*/
|
|
405
|
+
export class Notification extends GObject.Object {
|
|
406
|
+
|
|
407
|
+
// Own properties of Notify-0.7.Notify.Notification
|
|
408
|
+
|
|
409
|
+
static name: string
|
|
410
|
+
static $gtype: GObject.GType<Notification>
|
|
411
|
+
|
|
412
|
+
// Constructors of Notify-0.7.Notify.Notification
|
|
413
|
+
|
|
414
|
+
constructor(config?: Notification.ConstructorProperties)
|
|
415
|
+
/**
|
|
416
|
+
* Creates a new #NotifyNotification.
|
|
417
|
+
*
|
|
418
|
+
* The summary text is required, but all other parameters are optional.
|
|
419
|
+
* @constructor
|
|
420
|
+
* @param summary The required summary text.
|
|
421
|
+
* @param body The optional body text.
|
|
422
|
+
* @param icon The optional icon theme icon name or filename.
|
|
423
|
+
* @returns The new #NotifyNotification.
|
|
424
|
+
*/
|
|
425
|
+
constructor(summary: string | null, body: string | null, icon: string | null)
|
|
426
|
+
/**
|
|
427
|
+
* Creates a new #NotifyNotification.
|
|
428
|
+
*
|
|
429
|
+
* The summary text is required, but all other parameters are optional.
|
|
430
|
+
* @constructor
|
|
431
|
+
* @param summary The required summary text.
|
|
432
|
+
* @param body The optional body text.
|
|
433
|
+
* @param icon The optional icon theme icon name or filename.
|
|
434
|
+
* @returns The new #NotifyNotification.
|
|
435
|
+
*/
|
|
436
|
+
static new(summary: string | null, body: string | null, icon: string | null): Notification
|
|
437
|
+
_init(config?: Notification.ConstructorProperties): void
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export interface NotificationClass {
|
|
441
|
+
|
|
442
|
+
// Own fields of Notify-0.7.Notify.NotificationClass
|
|
443
|
+
|
|
444
|
+
parent_class: GObject.ObjectClass
|
|
445
|
+
closed: (notification: Notification) => void
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export abstract class NotificationClass {
|
|
449
|
+
|
|
450
|
+
// Own properties of Notify-0.7.Notify.NotificationClass
|
|
451
|
+
|
|
452
|
+
static name: string
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export interface NotificationPrivate {
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export class NotificationPrivate {
|
|
459
|
+
|
|
460
|
+
// Own properties of Notify-0.7.Notify.NotificationPrivate
|
|
461
|
+
|
|
462
|
+
static name: string
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Name of the imported GIR library
|
|
467
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
468
|
+
*/
|
|
469
|
+
export const __name__: string
|
|
470
|
+
/**
|
|
471
|
+
* Version of the imported GIR library
|
|
472
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
473
|
+
*/
|
|
474
|
+
export const __version__: string
|
|
475
|
+
// END
|
package/notify-0.7.d.ts
ADDED
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Type Definitions for Gjs (https://gjs.guide/)
|
|
4
|
+
*
|
|
5
|
+
* These type definitions are automatically generated, do not edit them by hand.
|
|
6
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Notify-0.7
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
|
|
13
|
+
import type Gio from '@girs/gio-2.0';
|
|
14
|
+
import type GObject from '@girs/gobject-2.0';
|
|
15
|
+
import type GLib from '@girs/glib-2.0';
|
|
16
|
+
import type GModule from '@girs/gmodule-2.0';
|
|
17
|
+
|
|
18
|
+
export namespace Notify {
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The reason for which the notification has been closed.
|
|
22
|
+
*/
|
|
23
|
+
enum ClosedReason {
|
|
24
|
+
/**
|
|
25
|
+
* Notification not closed.
|
|
26
|
+
*/
|
|
27
|
+
UNSET,
|
|
28
|
+
/**
|
|
29
|
+
* Timeout has expired.
|
|
30
|
+
*/
|
|
31
|
+
EXPIRED,
|
|
32
|
+
/**
|
|
33
|
+
* It has been dismissed by the user.
|
|
34
|
+
*/
|
|
35
|
+
DISMISSED,
|
|
36
|
+
/**
|
|
37
|
+
* It has been closed by a call to
|
|
38
|
+
* [method`Notify`.close].
|
|
39
|
+
*/
|
|
40
|
+
API_REQUEST,
|
|
41
|
+
/**
|
|
42
|
+
* Closed by undefined/reserved reasons.
|
|
43
|
+
*/
|
|
44
|
+
UNDEFIEND,
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The urgency level of the notification.
|
|
48
|
+
*/
|
|
49
|
+
enum Urgency {
|
|
50
|
+
/**
|
|
51
|
+
* Low urgency. Used for unimportant notifications.
|
|
52
|
+
*/
|
|
53
|
+
LOW,
|
|
54
|
+
/**
|
|
55
|
+
* Normal urgency. Used for most standard notifications.
|
|
56
|
+
*/
|
|
57
|
+
NORMAL,
|
|
58
|
+
/**
|
|
59
|
+
* Critical urgency. Used for very important notifications.
|
|
60
|
+
*/
|
|
61
|
+
CRITICAL,
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The default expiration time on a notification.
|
|
65
|
+
*/
|
|
66
|
+
const EXPIRES_DEFAULT: number
|
|
67
|
+
/**
|
|
68
|
+
* The notification never expires.
|
|
69
|
+
*
|
|
70
|
+
* It stays open until closed by the calling API or the user.
|
|
71
|
+
*/
|
|
72
|
+
const EXPIRES_NEVER: number
|
|
73
|
+
/**
|
|
74
|
+
* Adwaita major version component (e.g. 1 if the version is 1.2.3).
|
|
75
|
+
*/
|
|
76
|
+
const VERSION_MAJOR: number
|
|
77
|
+
/**
|
|
78
|
+
* Adwaita micro version component (e.g. 3 if the version is 1.2.3).
|
|
79
|
+
*/
|
|
80
|
+
const VERSION_MICRO: number
|
|
81
|
+
/**
|
|
82
|
+
* Adwaita minor version component (e.g. 2 if the version is 1.2.3).
|
|
83
|
+
*/
|
|
84
|
+
const VERSION_MINOR: number
|
|
85
|
+
/**
|
|
86
|
+
* Gets the application name registered.
|
|
87
|
+
* @returns The registered application name, passed to [func@init].
|
|
88
|
+
*/
|
|
89
|
+
function get_app_name(): string | null
|
|
90
|
+
/**
|
|
91
|
+
* Queries the server capabilities.
|
|
92
|
+
*
|
|
93
|
+
* Synchronously queries the server for its capabilities and returns them in a
|
|
94
|
+
* list.
|
|
95
|
+
* @returns a list of server capability strings.
|
|
96
|
+
*/
|
|
97
|
+
function get_server_caps(): string[]
|
|
98
|
+
/**
|
|
99
|
+
* Queries the server for information.
|
|
100
|
+
*
|
|
101
|
+
* Synchronously queries the server for its information, specifically, the name,
|
|
102
|
+
* vendor, server version, and the version of the notifications specification
|
|
103
|
+
* that it is compliant with.
|
|
104
|
+
* @returns %TRUE if successful, and the variables passed will be set, %FALSE on error. The returned strings must be freed with g_free
|
|
105
|
+
*/
|
|
106
|
+
function get_server_info(): [ /* returnType */ boolean, /* ret_name */ string | null, /* ret_vendor */ string | null, /* ret_version */ string | null, /* ret_spec_version */ string | null ]
|
|
107
|
+
/**
|
|
108
|
+
* Initialized libnotify. This must be called before any other functions.
|
|
109
|
+
*
|
|
110
|
+
* Starting from 0.8, if the provided `app_name` is %NULL, libnotify will
|
|
111
|
+
* try to figure it out from the running application.
|
|
112
|
+
* Before it was not allowed, and was causing libnotify not to be initialized.
|
|
113
|
+
* @param app_name The name of the application initializing libnotify.
|
|
114
|
+
* @returns %TRUE if successful, or %FALSE on error.
|
|
115
|
+
*/
|
|
116
|
+
function init(app_name: string | null): boolean
|
|
117
|
+
/**
|
|
118
|
+
* Gets whether or not libnotify is initialized.
|
|
119
|
+
* @returns %TRUE if libnotify is initialized, or %FALSE otherwise.
|
|
120
|
+
*/
|
|
121
|
+
function is_initted(): boolean
|
|
122
|
+
/**
|
|
123
|
+
* Sets the application name.
|
|
124
|
+
* @param app_name The name of the application
|
|
125
|
+
*/
|
|
126
|
+
function set_app_name(app_name: string | null): void
|
|
127
|
+
/**
|
|
128
|
+
* Uninitializes libnotify.
|
|
129
|
+
*
|
|
130
|
+
* This should be called when the program no longer needs libnotify for
|
|
131
|
+
* the rest of its lifecycle, typically just before exitting.
|
|
132
|
+
*/
|
|
133
|
+
function uninit(): void
|
|
134
|
+
/**
|
|
135
|
+
* An action callback function.
|
|
136
|
+
* @callback
|
|
137
|
+
* @param notification a #NotifyActionCallback notification
|
|
138
|
+
* @param action The activated action name
|
|
139
|
+
*/
|
|
140
|
+
interface ActionCallback {
|
|
141
|
+
(notification: Notification, action: string | null): void
|
|
142
|
+
}
|
|
143
|
+
module Notification {
|
|
144
|
+
|
|
145
|
+
// Signal callback interfaces
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Signal callback interface for `closed`
|
|
149
|
+
*/
|
|
150
|
+
interface ClosedSignalCallback {
|
|
151
|
+
($obj: Notification): void
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
// Constructor properties interface
|
|
156
|
+
|
|
157
|
+
interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
158
|
+
|
|
159
|
+
// Own constructor properties of Notify-0.7.Notify.Notification
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The name of the application for the notification.
|
|
163
|
+
*/
|
|
164
|
+
app_name?: string | null
|
|
165
|
+
/**
|
|
166
|
+
* The body of the notification.
|
|
167
|
+
*/
|
|
168
|
+
body?: string | null
|
|
169
|
+
/**
|
|
170
|
+
* The icon-name of the icon to be displayed on the notification.
|
|
171
|
+
*/
|
|
172
|
+
icon_name?: string | null
|
|
173
|
+
/**
|
|
174
|
+
* The Id of the notification.
|
|
175
|
+
*/
|
|
176
|
+
id?: number | null
|
|
177
|
+
/**
|
|
178
|
+
* The summary of the notification.
|
|
179
|
+
*/
|
|
180
|
+
summary?: string | null
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
interface Notification {
|
|
186
|
+
|
|
187
|
+
// Own properties of Notify-0.7.Notify.Notification
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The name of the application for the notification.
|
|
191
|
+
*/
|
|
192
|
+
app_name: string | null
|
|
193
|
+
/**
|
|
194
|
+
* The body of the notification.
|
|
195
|
+
*/
|
|
196
|
+
body: string | null
|
|
197
|
+
/**
|
|
198
|
+
* The closed reason of the notification.
|
|
199
|
+
*
|
|
200
|
+
* See [signal`Notification:`:closed].
|
|
201
|
+
*/
|
|
202
|
+
readonly closed_reason: number
|
|
203
|
+
/**
|
|
204
|
+
* The icon-name of the icon to be displayed on the notification.
|
|
205
|
+
*/
|
|
206
|
+
icon_name: string | null
|
|
207
|
+
/**
|
|
208
|
+
* The Id of the notification.
|
|
209
|
+
*/
|
|
210
|
+
id: number
|
|
211
|
+
/**
|
|
212
|
+
* The summary of the notification.
|
|
213
|
+
*/
|
|
214
|
+
summary: string | null
|
|
215
|
+
|
|
216
|
+
// Owm methods of Notify-0.7.Notify.Notification
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Adds an action to a notification.
|
|
220
|
+
*
|
|
221
|
+
* When the action is invoked, the specified callback function will be called,
|
|
222
|
+
* along with the value passed to `user_data`.
|
|
223
|
+
* @param action The action ID.
|
|
224
|
+
* @param label The human-readable action label.
|
|
225
|
+
* @param callback The action's callback function.
|
|
226
|
+
*/
|
|
227
|
+
add_action(action: string | null, label: string | null, callback: ActionCallback): void
|
|
228
|
+
/**
|
|
229
|
+
* Clears all actions from the notification.
|
|
230
|
+
*/
|
|
231
|
+
clear_actions(): void
|
|
232
|
+
/**
|
|
233
|
+
* Clears all hints from the notification.
|
|
234
|
+
*/
|
|
235
|
+
clear_hints(): void
|
|
236
|
+
/**
|
|
237
|
+
* Synchronously tells the notification server to hide the notification on the screen.
|
|
238
|
+
* @returns %TRUE on success, or %FALSE on error with @error filled in
|
|
239
|
+
*/
|
|
240
|
+
close(): boolean
|
|
241
|
+
/**
|
|
242
|
+
* Gets the activation token of the notification.
|
|
243
|
+
*
|
|
244
|
+
* If an an action is currently being activated, return the activation token.
|
|
245
|
+
* This function is intended to be used in a [callback`ActionCallback]` to get
|
|
246
|
+
* the activation token for the activated action, if the notification daemon
|
|
247
|
+
* supports it.
|
|
248
|
+
* @returns The current activation token, or %NULL if none
|
|
249
|
+
*/
|
|
250
|
+
get_activation_token(): string | null
|
|
251
|
+
/**
|
|
252
|
+
* Returns the closed reason code for the notification.
|
|
253
|
+
*
|
|
254
|
+
* This is valid only after the [signal`Notification:`:closed] signal is emitted.
|
|
255
|
+
*
|
|
256
|
+
* Since version 0.8.0 the returned value is of type [enum`ClosedReason]`.
|
|
257
|
+
* @returns An integer representing the closed reason code (Since 0.8.0 it's also a [enum@ClosedReason]).
|
|
258
|
+
*/
|
|
259
|
+
get_closed_reason(): number
|
|
260
|
+
/**
|
|
261
|
+
* Sets the application name for the notification.
|
|
262
|
+
*
|
|
263
|
+
* If this function is not called or if `app_name` is %NULL, the application name
|
|
264
|
+
* will be set from the value used in [func`init]` or overridden with
|
|
265
|
+
* [func`set_app_name]`.
|
|
266
|
+
* @param app_name the localised application name
|
|
267
|
+
*/
|
|
268
|
+
set_app_name(app_name: string | null): void
|
|
269
|
+
/**
|
|
270
|
+
* Sets the category of this notification.
|
|
271
|
+
*
|
|
272
|
+
* This can be used by the notification server to filter or display the data in
|
|
273
|
+
* a certain way.
|
|
274
|
+
* @param category The category.
|
|
275
|
+
*/
|
|
276
|
+
set_category(category: string | null): void
|
|
277
|
+
/**
|
|
278
|
+
* Sets a hint for `key` with value `value`.
|
|
279
|
+
*
|
|
280
|
+
* If `value` is %NULL, a previously set hint for `key` is unset.
|
|
281
|
+
*
|
|
282
|
+
* If `value` is floating, it is consumed.
|
|
283
|
+
* @param key the hint key
|
|
284
|
+
* @param value the hint value
|
|
285
|
+
*/
|
|
286
|
+
set_hint(key: string | null, value: GLib.Variant | null): void
|
|
287
|
+
/**
|
|
288
|
+
* Sets a hint with a byte value.
|
|
289
|
+
* @param key The hint.
|
|
290
|
+
* @param value The hint's value.
|
|
291
|
+
*/
|
|
292
|
+
set_hint_byte(key: string | null, value: number): void
|
|
293
|
+
/**
|
|
294
|
+
* Sets a hint with a byte array value.
|
|
295
|
+
*
|
|
296
|
+
* The length of `value` must be passed as `len`.
|
|
297
|
+
* @param key The hint.
|
|
298
|
+
* @param value The hint's value.
|
|
299
|
+
*/
|
|
300
|
+
set_hint_byte_array(key: string | null, value: Uint8Array): void
|
|
301
|
+
/**
|
|
302
|
+
* Sets a hint with a double value.
|
|
303
|
+
* @param key The hint.
|
|
304
|
+
* @param value The hint's value.
|
|
305
|
+
*/
|
|
306
|
+
set_hint_double(key: string | null, value: number): void
|
|
307
|
+
/**
|
|
308
|
+
* Sets a hint with a 32-bit integer value.
|
|
309
|
+
* @param key The hint.
|
|
310
|
+
* @param value The hint's value.
|
|
311
|
+
*/
|
|
312
|
+
set_hint_int32(key: string | null, value: number): void
|
|
313
|
+
/**
|
|
314
|
+
* Sets a hint with a string value.
|
|
315
|
+
* @param key The hint.
|
|
316
|
+
* @param value The hint's value.
|
|
317
|
+
*/
|
|
318
|
+
set_hint_string(key: string | null, value: string | null): void
|
|
319
|
+
/**
|
|
320
|
+
* Sets a hint with an unsigned 32-bit integer value.
|
|
321
|
+
* @param key The hint.
|
|
322
|
+
* @param value The hint's value.
|
|
323
|
+
*/
|
|
324
|
+
set_hint_uint32(key: string | null, value: number): void
|
|
325
|
+
/**
|
|
326
|
+
* Sets the icon in the notification from a #GdkPixbuf.
|
|
327
|
+
* @param icon The icon.
|
|
328
|
+
*/
|
|
329
|
+
set_icon_from_pixbuf(icon: GdkPixbuf.Pixbuf): void
|
|
330
|
+
/**
|
|
331
|
+
* Sets the image in the notification from a [class`GdkPixbuf`.Pixbuf].
|
|
332
|
+
* @param pixbuf The image.
|
|
333
|
+
*/
|
|
334
|
+
set_image_from_pixbuf(pixbuf: GdkPixbuf.Pixbuf): void
|
|
335
|
+
/**
|
|
336
|
+
* Sets the timeout of the notification.
|
|
337
|
+
*
|
|
338
|
+
* To set the default time, pass %NOTIFY_EXPIRES_DEFAULT as `timeout`. To set the
|
|
339
|
+
* notification to never expire, pass %NOTIFY_EXPIRES_NEVER.
|
|
340
|
+
*
|
|
341
|
+
* Note that the timeout may be ignored by the server.
|
|
342
|
+
* @param timeout The timeout in milliseconds.
|
|
343
|
+
*/
|
|
344
|
+
set_timeout(timeout: number): void
|
|
345
|
+
/**
|
|
346
|
+
* Sets the urgency level of this notification.
|
|
347
|
+
* @param urgency The urgency level.
|
|
348
|
+
*/
|
|
349
|
+
set_urgency(urgency: Urgency): void
|
|
350
|
+
/**
|
|
351
|
+
* Tells the notification server to display the notification on the screen.
|
|
352
|
+
* @returns %TRUE if successful. On error, this will return %FALSE and set @error.
|
|
353
|
+
*/
|
|
354
|
+
show(): boolean
|
|
355
|
+
/**
|
|
356
|
+
* Updates the notification text and icon.
|
|
357
|
+
*
|
|
358
|
+
* This won't send the update out and display it on the screen. For that, you
|
|
359
|
+
* will need to call [method`Notification`.show].
|
|
360
|
+
* @param summary The new required summary text.
|
|
361
|
+
* @param body The optional body text.
|
|
362
|
+
* @param icon The optional icon theme icon name or filename.
|
|
363
|
+
* @returns %TRUE, unless an invalid parameter was passed.
|
|
364
|
+
*/
|
|
365
|
+
update(summary: string | null, body: string | null, icon: string | null): boolean
|
|
366
|
+
|
|
367
|
+
// Own virtual methods of Notify-0.7.Notify.Notification
|
|
368
|
+
|
|
369
|
+
vfunc_closed(): void
|
|
370
|
+
|
|
371
|
+
// Own signals of Notify-0.7.Notify.Notification
|
|
372
|
+
|
|
373
|
+
connect(sigName: "closed", callback: Notification.ClosedSignalCallback): number
|
|
374
|
+
connect_after(sigName: "closed", callback: Notification.ClosedSignalCallback): number
|
|
375
|
+
emit(sigName: "closed", ...args: any[]): void
|
|
376
|
+
|
|
377
|
+
// Class property signals of Notify-0.7.Notify.Notification
|
|
378
|
+
|
|
379
|
+
connect(sigName: "notify::app-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
380
|
+
connect_after(sigName: "notify::app-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
381
|
+
emit(sigName: "notify::app-name", ...args: any[]): void
|
|
382
|
+
connect(sigName: "notify::body", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
383
|
+
connect_after(sigName: "notify::body", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
384
|
+
emit(sigName: "notify::body", ...args: any[]): void
|
|
385
|
+
connect(sigName: "notify::closed-reason", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
386
|
+
connect_after(sigName: "notify::closed-reason", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
387
|
+
emit(sigName: "notify::closed-reason", ...args: any[]): void
|
|
388
|
+
connect(sigName: "notify::icon-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
389
|
+
connect_after(sigName: "notify::icon-name", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
390
|
+
emit(sigName: "notify::icon-name", ...args: any[]): void
|
|
391
|
+
connect(sigName: "notify::id", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
392
|
+
connect_after(sigName: "notify::id", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
393
|
+
emit(sigName: "notify::id", ...args: any[]): void
|
|
394
|
+
connect(sigName: "notify::summary", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
395
|
+
connect_after(sigName: "notify::summary", callback: (($obj: Notification, pspec: GObject.ParamSpec) => void)): number
|
|
396
|
+
emit(sigName: "notify::summary", ...args: any[]): void
|
|
397
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
398
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
399
|
+
emit(sigName: string, ...args: any[]): void
|
|
400
|
+
disconnect(id: number): void
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* A passive pop-up notification.
|
|
405
|
+
* @class
|
|
406
|
+
*/
|
|
407
|
+
class Notification extends GObject.Object {
|
|
408
|
+
|
|
409
|
+
// Own properties of Notify-0.7.Notify.Notification
|
|
410
|
+
|
|
411
|
+
static name: string
|
|
412
|
+
static $gtype: GObject.GType<Notification>
|
|
413
|
+
|
|
414
|
+
// Constructors of Notify-0.7.Notify.Notification
|
|
415
|
+
|
|
416
|
+
constructor(config?: Notification.ConstructorProperties)
|
|
417
|
+
/**
|
|
418
|
+
* Creates a new #NotifyNotification.
|
|
419
|
+
*
|
|
420
|
+
* The summary text is required, but all other parameters are optional.
|
|
421
|
+
* @constructor
|
|
422
|
+
* @param summary The required summary text.
|
|
423
|
+
* @param body The optional body text.
|
|
424
|
+
* @param icon The optional icon theme icon name or filename.
|
|
425
|
+
* @returns The new #NotifyNotification.
|
|
426
|
+
*/
|
|
427
|
+
constructor(summary: string | null, body: string | null, icon: string | null)
|
|
428
|
+
/**
|
|
429
|
+
* Creates a new #NotifyNotification.
|
|
430
|
+
*
|
|
431
|
+
* The summary text is required, but all other parameters are optional.
|
|
432
|
+
* @constructor
|
|
433
|
+
* @param summary The required summary text.
|
|
434
|
+
* @param body The optional body text.
|
|
435
|
+
* @param icon The optional icon theme icon name or filename.
|
|
436
|
+
* @returns The new #NotifyNotification.
|
|
437
|
+
*/
|
|
438
|
+
static new(summary: string | null, body: string | null, icon: string | null): Notification
|
|
439
|
+
_init(config?: Notification.ConstructorProperties): void
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
interface NotificationClass {
|
|
443
|
+
|
|
444
|
+
// Own fields of Notify-0.7.Notify.NotificationClass
|
|
445
|
+
|
|
446
|
+
parent_class: GObject.ObjectClass
|
|
447
|
+
closed: (notification: Notification) => void
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
abstract class NotificationClass {
|
|
451
|
+
|
|
452
|
+
// Own properties of Notify-0.7.Notify.NotificationClass
|
|
453
|
+
|
|
454
|
+
static name: string
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
interface NotificationPrivate {
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
class NotificationPrivate {
|
|
461
|
+
|
|
462
|
+
// Own properties of Notify-0.7.Notify.NotificationPrivate
|
|
463
|
+
|
|
464
|
+
static name: string
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Name of the imported GIR library
|
|
469
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
470
|
+
*/
|
|
471
|
+
const __name__: string
|
|
472
|
+
/**
|
|
473
|
+
* Version of the imported GIR library
|
|
474
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
475
|
+
*/
|
|
476
|
+
const __version__: string
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
export default Notify;
|
|
480
|
+
// END
|
package/notify-0.7.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@girs/notify-0.7",
|
|
3
|
+
"version": "0.8.1-3.0.0-beta.12",
|
|
4
|
+
"description": "GJS TypeScript type definitions for Notify-0.7, generated from library version 0.8.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "notify-0.7.js",
|
|
7
|
+
"main": "notify-0.7.js",
|
|
8
|
+
"typedoc": {
|
|
9
|
+
"entryPoint": "./notify-0.7.d.ts",
|
|
10
|
+
"readmeFile": "./README.md",
|
|
11
|
+
"displayName": "Notify-0.7",
|
|
12
|
+
"tsconfig": "./tsconfig.doc.json"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": {
|
|
17
|
+
"types": "./notify-0.7.d.ts",
|
|
18
|
+
"default": "./notify-0.7.js"
|
|
19
|
+
},
|
|
20
|
+
"require": {
|
|
21
|
+
"types": "./notify-0.7.d.cts",
|
|
22
|
+
"default": "./notify-0.7.cjs"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"test": "yarn test:esm && yarn test:cjs",
|
|
28
|
+
"test:esm": "tsc --noEmit notify-0.7.d.ts",
|
|
29
|
+
"test:cjs": "tsc --noEmit notify-0.7.d.cts"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@girs/gdkpixbuf-2.0": "^2.0.0-3.0.0-beta.12",
|
|
33
|
+
"@girs/gio-2.0": "^2.75.1-3.0.0-beta.12",
|
|
34
|
+
"@girs/glib-2.0": "^2.75.1-3.0.0-beta.12",
|
|
35
|
+
"@girs/gmodule-2.0": "^2.0.0-3.0.0-beta.12",
|
|
36
|
+
"@girs/gobject-2.0": "^2.75.1-3.0.0-beta.12"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"typescript": "^*"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"Gir",
|
|
43
|
+
"TypeScript",
|
|
44
|
+
"Notify-0.7"
|
|
45
|
+
],
|
|
46
|
+
"author": "ts-for-gir",
|
|
47
|
+
"license": "Apache-2.0",
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/gjsify/ts-for-gir.git"
|
|
51
|
+
},
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/gjsify/ts-for-gir/issues"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/gjsify/ts-for-gir#readme"
|
|
56
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// General settings for code interpretation
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"experimentalDecorators": true,
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"noEmitOnError": false,
|
|
10
|
+
"baseUrl": "./",
|
|
11
|
+
"rootDir": ".",
|
|
12
|
+
// General settings for code generation
|
|
13
|
+
"removeComments": false,
|
|
14
|
+
"inlineSourceMap": false,
|
|
15
|
+
"inlineSources": false,
|
|
16
|
+
"newLine": "LF"
|
|
17
|
+
},
|
|
18
|
+
"include": ["./notify-0.7.d.ts"]
|
|
19
|
+
}
|