@girs/fep-1.0 1.0.0-4.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/fep-1.0-ambient.d.ts +12 -0
- package/fep-1.0-ambient.js +2 -0
- package/fep-1.0-import.d.ts +12 -0
- package/fep-1.0-import.js +3 -0
- package/fep-1.0.d.ts +735 -0
- package/fep-1.0.js +6 -0
- package/package.json +55 -0
- package/tsconfig.json +23 -0
- package/typedoc.json +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
|
|
2
|
+
# Fep-1.0
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
GJS TypeScript type definitions for Fep-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.3.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
To use this type definitions, install them with NPM:
|
|
14
|
+
```bash
|
|
15
|
+
npm install @girs/fep-1.0
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
You can import this package into your project like this:
|
|
21
|
+
```ts
|
|
22
|
+
import Fep from '@girs/fep-1.0';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Ambient Modules
|
|
26
|
+
|
|
27
|
+
You can also use [ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) to import this module like you would do this in JavaScript.
|
|
28
|
+
For this you need to include `@girs/fep-1.0` or `@girs/fep-1.0/ambient` in your `tsconfig` or entry point Typescript file:
|
|
29
|
+
|
|
30
|
+
`index.ts`:
|
|
31
|
+
```ts
|
|
32
|
+
import '@girs/fep-1.0'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`tsconfig.json`:
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"compilerOptions": {
|
|
39
|
+
...
|
|
40
|
+
},
|
|
41
|
+
"include": ["@girs/fep-1.0"],
|
|
42
|
+
...
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Now you can import the ambient module with TypeScript support:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import Fep from 'gi://Fep?version=1.0';
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Global import
|
|
53
|
+
|
|
54
|
+
You can also import the module with Typescript support using the global `imports.gi` object of GJS.
|
|
55
|
+
For this you need to include `@girs/fep-1.0` or `@girs/fep-1.0/import` in your `tsconfig` or entry point Typescript file:
|
|
56
|
+
|
|
57
|
+
`index.ts`:
|
|
58
|
+
```ts
|
|
59
|
+
import '@girs/fep-1.0'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`tsconfig.json`:
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"compilerOptions": {
|
|
66
|
+
...
|
|
67
|
+
},
|
|
68
|
+
"include": ["@girs/fep-1.0"],
|
|
69
|
+
...
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Now you have also type support for this, too:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
const Fep = imports.gi.Fep;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Bundle
|
|
80
|
+
|
|
81
|
+
Depending on your project configuration, it is recommended to use a bundler like [esbuild](https://esbuild.github.io/). You can find examples using different bundlers [here](https://github.com/gjsify/ts-for-gir/tree/main/examples).
|
|
82
|
+
|
|
83
|
+
## Other packages
|
|
84
|
+
|
|
85
|
+
All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
|
|
86
|
+
|
package/fep-1.0.d.ts
ADDED
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Type Definitions for Gjs (https://gjs.guide/)
|
|
3
|
+
*
|
|
4
|
+
* These type definitions are automatically generated, do not edit them by hand.
|
|
5
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import './fep-1.0-ambient.d.ts';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Fep-1.0
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type Gio from '@girs/gio-2.0';
|
|
15
|
+
import type GObject from '@girs/gobject-2.0';
|
|
16
|
+
import type GLib from '@girs/glib-2.0';
|
|
17
|
+
|
|
18
|
+
export namespace Fep {
|
|
19
|
+
enum GAttrType {
|
|
20
|
+
/**
|
|
21
|
+
* Decorate with underline
|
|
22
|
+
*/
|
|
23
|
+
UNDERLINE,
|
|
24
|
+
/**
|
|
25
|
+
* Foreground color
|
|
26
|
+
*/
|
|
27
|
+
FOREGROUND,
|
|
28
|
+
/**
|
|
29
|
+
* Background color
|
|
30
|
+
*/
|
|
31
|
+
BACKGROUND,
|
|
32
|
+
/**
|
|
33
|
+
* No attribute
|
|
34
|
+
*/
|
|
35
|
+
NONE,
|
|
36
|
+
/**
|
|
37
|
+
* Reverse video
|
|
38
|
+
*/
|
|
39
|
+
STANDOUT,
|
|
40
|
+
/**
|
|
41
|
+
* Bold
|
|
42
|
+
*/
|
|
43
|
+
BOLD,
|
|
44
|
+
/**
|
|
45
|
+
* Blink
|
|
46
|
+
*/
|
|
47
|
+
BLINK,
|
|
48
|
+
}
|
|
49
|
+
enum GAttrUnderline {
|
|
50
|
+
/**
|
|
51
|
+
* No underline
|
|
52
|
+
*/
|
|
53
|
+
NONE,
|
|
54
|
+
/**
|
|
55
|
+
* Single underline
|
|
56
|
+
*/
|
|
57
|
+
SINGLE,
|
|
58
|
+
/**
|
|
59
|
+
* Double underline
|
|
60
|
+
*/
|
|
61
|
+
DOUBLE,
|
|
62
|
+
/**
|
|
63
|
+
* Low underline? FIXME
|
|
64
|
+
*/
|
|
65
|
+
LOW,
|
|
66
|
+
/**
|
|
67
|
+
* Error underline
|
|
68
|
+
*/
|
|
69
|
+
ERROR,
|
|
70
|
+
}
|
|
71
|
+
enum GEventType {
|
|
72
|
+
/**
|
|
73
|
+
* Nothing happend; used to indicate error
|
|
74
|
+
*/
|
|
75
|
+
NOTHING,
|
|
76
|
+
/**
|
|
77
|
+
* Key is pressed
|
|
78
|
+
*/
|
|
79
|
+
KEY_PRESS,
|
|
80
|
+
/**
|
|
81
|
+
* Window is resized
|
|
82
|
+
*/
|
|
83
|
+
RESIZED,
|
|
84
|
+
}
|
|
85
|
+
module GClient {
|
|
86
|
+
// Signal callback interfaces
|
|
87
|
+
|
|
88
|
+
interface FilterEvent {
|
|
89
|
+
(event?: any | null): boolean;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
interface FilterKeyEvent {
|
|
93
|
+
(keyval: number, modifiers: number): boolean;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
interface Resized {
|
|
97
|
+
(cols: number, rows: number): void;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Constructor properties interface
|
|
101
|
+
|
|
102
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps, Gio.Initable.ConstructorProps {
|
|
103
|
+
address: string;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
class GClient extends GObject.Object implements Gio.Initable {
|
|
108
|
+
static $gtype: GObject.GType<GClient>;
|
|
109
|
+
|
|
110
|
+
// Own properties of Fep.GClient
|
|
111
|
+
|
|
112
|
+
get address(): string;
|
|
113
|
+
|
|
114
|
+
// Constructors of Fep.GClient
|
|
115
|
+
|
|
116
|
+
constructor(properties?: Partial<GClient.ConstructorProps>, ...args: any[]);
|
|
117
|
+
|
|
118
|
+
_init(...args: any[]): void;
|
|
119
|
+
|
|
120
|
+
static ['new'](address?: string | null, cancellable?: Gio.Cancellable | null): GClient;
|
|
121
|
+
|
|
122
|
+
// Own signals of Fep.GClient
|
|
123
|
+
|
|
124
|
+
connect(id: string, callback: (...args: any[]) => any): number;
|
|
125
|
+
connect_after(id: string, callback: (...args: any[]) => any): number;
|
|
126
|
+
emit(id: string, ...args: any[]): void;
|
|
127
|
+
connect(signal: 'filter-event', callback: (_source: this, event: any | null) => boolean): number;
|
|
128
|
+
connect_after(signal: 'filter-event', callback: (_source: this, event: any | null) => boolean): number;
|
|
129
|
+
emit(signal: 'filter-event', event?: any | null): void;
|
|
130
|
+
connect(
|
|
131
|
+
signal: 'filter-key-event',
|
|
132
|
+
callback: (_source: this, keyval: number, modifiers: number) => boolean,
|
|
133
|
+
): number;
|
|
134
|
+
connect_after(
|
|
135
|
+
signal: 'filter-key-event',
|
|
136
|
+
callback: (_source: this, keyval: number, modifiers: number) => boolean,
|
|
137
|
+
): number;
|
|
138
|
+
emit(signal: 'filter-key-event', keyval: number, modifiers: number): void;
|
|
139
|
+
connect(signal: 'resized', callback: (_source: this, cols: number, rows: number) => void): number;
|
|
140
|
+
connect_after(signal: 'resized', callback: (_source: this, cols: number, rows: number) => void): number;
|
|
141
|
+
emit(signal: 'resized', cols: number, rows: number): void;
|
|
142
|
+
|
|
143
|
+
// Own virtual methods of Fep.GClient
|
|
144
|
+
|
|
145
|
+
vfunc_filter_event(event: GEvent): boolean;
|
|
146
|
+
vfunc_filter_key_event(keyval: number, modifiers: number): boolean;
|
|
147
|
+
vfunc_resized(cols: number, rows: number): void;
|
|
148
|
+
|
|
149
|
+
// Own methods of Fep.GClient
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Dispatch a key event.
|
|
153
|
+
* @returns %TRUE if success, %FALSE on error.
|
|
154
|
+
*/
|
|
155
|
+
dispatch(): boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Request to send a key event to the child process of the FEP server.
|
|
158
|
+
* @param keyval keysym value
|
|
159
|
+
* @param modifiers modifiers
|
|
160
|
+
*/
|
|
161
|
+
forward_key_event(keyval: number, modifiers: number): void;
|
|
162
|
+
/**
|
|
163
|
+
* Get the file descriptor of the control socket which can be used by poll().
|
|
164
|
+
* @returns a file descriptor
|
|
165
|
+
*/
|
|
166
|
+
get_poll_fd(): number;
|
|
167
|
+
/**
|
|
168
|
+
* Request to send `data` to the child process of the FEP server.
|
|
169
|
+
* @param data data to be sent
|
|
170
|
+
* @param length length of @data
|
|
171
|
+
*/
|
|
172
|
+
send_data(data: string, length: number): void;
|
|
173
|
+
/**
|
|
174
|
+
* Request to send `data` to the child process of the FEP server.
|
|
175
|
+
* `text` will be converted from UTF-8 to the local encoding in the
|
|
176
|
+
* server.
|
|
177
|
+
* @param text text to be sent
|
|
178
|
+
*/
|
|
179
|
+
send_text(text: string): void;
|
|
180
|
+
/**
|
|
181
|
+
* Request to display `text` at the cursor position on the terminal.
|
|
182
|
+
* @param text a cursor text
|
|
183
|
+
* @param attr a #FepGAttribute
|
|
184
|
+
*/
|
|
185
|
+
set_cursor_text(text: string, attr?: GAttribute | null): void;
|
|
186
|
+
/**
|
|
187
|
+
* Request to display `text` at the bottom of the terminal.
|
|
188
|
+
* @param text a status text
|
|
189
|
+
* @param attr a #FepGAttribute
|
|
190
|
+
*/
|
|
191
|
+
set_status_text(text: string, attr?: GAttribute | null): void;
|
|
192
|
+
|
|
193
|
+
// Inherited methods
|
|
194
|
+
/**
|
|
195
|
+
* Initializes the object implementing the interface.
|
|
196
|
+
*
|
|
197
|
+
* This method is intended for language bindings. If writing in C,
|
|
198
|
+
* g_initable_new() should typically be used instead.
|
|
199
|
+
*
|
|
200
|
+
* The object must be initialized before any real use after initial
|
|
201
|
+
* construction, either with this function or g_async_initable_init_async().
|
|
202
|
+
*
|
|
203
|
+
* Implementations may also support cancellation. If `cancellable` is not %NULL,
|
|
204
|
+
* then initialization can be cancelled by triggering the cancellable object
|
|
205
|
+
* from another thread. If the operation was cancelled, the error
|
|
206
|
+
* %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
|
|
207
|
+
* the object doesn't support cancellable initialization the error
|
|
208
|
+
* %G_IO_ERROR_NOT_SUPPORTED will be returned.
|
|
209
|
+
*
|
|
210
|
+
* If the object is not initialized, or initialization returns with an
|
|
211
|
+
* error, then all operations on the object except g_object_ref() and
|
|
212
|
+
* g_object_unref() are considered to be invalid, and have undefined
|
|
213
|
+
* behaviour. See the [introduction][ginitable] for more details.
|
|
214
|
+
*
|
|
215
|
+
* Callers should not assume that a class which implements #GInitable can be
|
|
216
|
+
* initialized multiple times, unless the class explicitly documents itself as
|
|
217
|
+
* supporting this. Generally, a class’ implementation of init() can assume
|
|
218
|
+
* (and assert) that it will only be called once. Previously, this documentation
|
|
219
|
+
* recommended all #GInitable implementations should be idempotent; that
|
|
220
|
+
* recommendation was relaxed in GLib 2.54.
|
|
221
|
+
*
|
|
222
|
+
* If a class explicitly supports being initialized multiple times, it is
|
|
223
|
+
* recommended that the method is idempotent: multiple calls with the same
|
|
224
|
+
* arguments should return the same results. Only the first call initializes
|
|
225
|
+
* the object; further calls return the result of the first call.
|
|
226
|
+
*
|
|
227
|
+
* One reason why a class might need to support idempotent initialization is if
|
|
228
|
+
* it is designed to be used via the singleton pattern, with a
|
|
229
|
+
* #GObjectClass.constructor that sometimes returns an existing instance.
|
|
230
|
+
* In this pattern, a caller would expect to be able to call g_initable_init()
|
|
231
|
+
* on the result of g_object_new(), regardless of whether it is in fact a new
|
|
232
|
+
* instance.
|
|
233
|
+
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
234
|
+
* @returns %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
|
|
235
|
+
*/
|
|
236
|
+
init(cancellable?: Gio.Cancellable | null): boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Initializes the object implementing the interface.
|
|
239
|
+
*
|
|
240
|
+
* This method is intended for language bindings. If writing in C,
|
|
241
|
+
* g_initable_new() should typically be used instead.
|
|
242
|
+
*
|
|
243
|
+
* The object must be initialized before any real use after initial
|
|
244
|
+
* construction, either with this function or g_async_initable_init_async().
|
|
245
|
+
*
|
|
246
|
+
* Implementations may also support cancellation. If `cancellable` is not %NULL,
|
|
247
|
+
* then initialization can be cancelled by triggering the cancellable object
|
|
248
|
+
* from another thread. If the operation was cancelled, the error
|
|
249
|
+
* %G_IO_ERROR_CANCELLED will be returned. If `cancellable` is not %NULL and
|
|
250
|
+
* the object doesn't support cancellable initialization the error
|
|
251
|
+
* %G_IO_ERROR_NOT_SUPPORTED will be returned.
|
|
252
|
+
*
|
|
253
|
+
* If the object is not initialized, or initialization returns with an
|
|
254
|
+
* error, then all operations on the object except g_object_ref() and
|
|
255
|
+
* g_object_unref() are considered to be invalid, and have undefined
|
|
256
|
+
* behaviour. See the [introduction][ginitable] for more details.
|
|
257
|
+
*
|
|
258
|
+
* Callers should not assume that a class which implements #GInitable can be
|
|
259
|
+
* initialized multiple times, unless the class explicitly documents itself as
|
|
260
|
+
* supporting this. Generally, a class’ implementation of init() can assume
|
|
261
|
+
* (and assert) that it will only be called once. Previously, this documentation
|
|
262
|
+
* recommended all #GInitable implementations should be idempotent; that
|
|
263
|
+
* recommendation was relaxed in GLib 2.54.
|
|
264
|
+
*
|
|
265
|
+
* If a class explicitly supports being initialized multiple times, it is
|
|
266
|
+
* recommended that the method is idempotent: multiple calls with the same
|
|
267
|
+
* arguments should return the same results. Only the first call initializes
|
|
268
|
+
* the object; further calls return the result of the first call.
|
|
269
|
+
*
|
|
270
|
+
* One reason why a class might need to support idempotent initialization is if
|
|
271
|
+
* it is designed to be used via the singleton pattern, with a
|
|
272
|
+
* #GObjectClass.constructor that sometimes returns an existing instance.
|
|
273
|
+
* In this pattern, a caller would expect to be able to call g_initable_init()
|
|
274
|
+
* on the result of g_object_new(), regardless of whether it is in fact a new
|
|
275
|
+
* instance.
|
|
276
|
+
* @param cancellable optional #GCancellable object, %NULL to ignore.
|
|
277
|
+
*/
|
|
278
|
+
vfunc_init(cancellable?: Gio.Cancellable | null): boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Creates a binding between `source_property` on `source` and `target_property`
|
|
281
|
+
* on `target`.
|
|
282
|
+
*
|
|
283
|
+
* Whenever the `source_property` is changed the `target_property` is
|
|
284
|
+
* updated using the same value. For instance:
|
|
285
|
+
*
|
|
286
|
+
*
|
|
287
|
+
* ```c
|
|
288
|
+
* g_object_bind_property (action, "active", widget, "sensitive", 0);
|
|
289
|
+
* ```
|
|
290
|
+
*
|
|
291
|
+
*
|
|
292
|
+
* Will result in the "sensitive" property of the widget #GObject instance to be
|
|
293
|
+
* updated with the same value of the "active" property of the action #GObject
|
|
294
|
+
* instance.
|
|
295
|
+
*
|
|
296
|
+
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
|
|
297
|
+
* if `target_property` on `target` changes then the `source_property` on `source`
|
|
298
|
+
* will be updated as well.
|
|
299
|
+
*
|
|
300
|
+
* The binding will automatically be removed when either the `source` or the
|
|
301
|
+
* `target` instances are finalized. To remove the binding without affecting the
|
|
302
|
+
* `source` and the `target` you can just call g_object_unref() on the returned
|
|
303
|
+
* #GBinding instance.
|
|
304
|
+
*
|
|
305
|
+
* Removing the binding by calling g_object_unref() on it must only be done if
|
|
306
|
+
* the binding, `source` and `target` are only used from a single thread and it
|
|
307
|
+
* is clear that both `source` and `target` outlive the binding. Especially it
|
|
308
|
+
* is not safe to rely on this if the binding, `source` or `target` can be
|
|
309
|
+
* finalized from different threads. Keep another reference to the binding and
|
|
310
|
+
* use g_binding_unbind() instead to be on the safe side.
|
|
311
|
+
*
|
|
312
|
+
* A #GObject can have multiple bindings.
|
|
313
|
+
* @param source_property the property on @source to bind
|
|
314
|
+
* @param target the target #GObject
|
|
315
|
+
* @param target_property the property on @target to bind
|
|
316
|
+
* @param flags flags to pass to #GBinding
|
|
317
|
+
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
|
318
|
+
*/
|
|
319
|
+
bind_property(
|
|
320
|
+
source_property: string,
|
|
321
|
+
target: GObject.Object,
|
|
322
|
+
target_property: string,
|
|
323
|
+
flags: GObject.BindingFlags,
|
|
324
|
+
): GObject.Binding;
|
|
325
|
+
/**
|
|
326
|
+
* Complete version of g_object_bind_property().
|
|
327
|
+
*
|
|
328
|
+
* Creates a binding between `source_property` on `source` and `target_property`
|
|
329
|
+
* on `target,` allowing you to set the transformation functions to be used by
|
|
330
|
+
* the binding.
|
|
331
|
+
*
|
|
332
|
+
* If `flags` contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
|
|
333
|
+
* if `target_property` on `target` changes then the `source_property` on `source`
|
|
334
|
+
* will be updated as well. The `transform_from` function is only used in case
|
|
335
|
+
* of bidirectional bindings, otherwise it will be ignored
|
|
336
|
+
*
|
|
337
|
+
* The binding will automatically be removed when either the `source` or the
|
|
338
|
+
* `target` instances are finalized. This will release the reference that is
|
|
339
|
+
* being held on the #GBinding instance; if you want to hold on to the
|
|
340
|
+
* #GBinding instance, you will need to hold a reference to it.
|
|
341
|
+
*
|
|
342
|
+
* To remove the binding, call g_binding_unbind().
|
|
343
|
+
*
|
|
344
|
+
* A #GObject can have multiple bindings.
|
|
345
|
+
*
|
|
346
|
+
* The same `user_data` parameter will be used for both `transform_to`
|
|
347
|
+
* and `transform_from` transformation functions; the `notify` function will
|
|
348
|
+
* be called once, when the binding is removed. If you need different data
|
|
349
|
+
* for each transformation function, please use
|
|
350
|
+
* g_object_bind_property_with_closures() instead.
|
|
351
|
+
* @param source_property the property on @source to bind
|
|
352
|
+
* @param target the target #GObject
|
|
353
|
+
* @param target_property the property on @target to bind
|
|
354
|
+
* @param flags flags to pass to #GBinding
|
|
355
|
+
* @param transform_to the transformation function from the @source to the @target, or %NULL to use the default
|
|
356
|
+
* @param transform_from the transformation function from the @target to the @source, or %NULL to use the default
|
|
357
|
+
* @param notify a function to call when disposing the binding, to free resources used by the transformation functions, or %NULL if not required
|
|
358
|
+
* @returns the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
|
|
359
|
+
*/
|
|
360
|
+
bind_property_full(
|
|
361
|
+
source_property: string,
|
|
362
|
+
target: GObject.Object,
|
|
363
|
+
target_property: string,
|
|
364
|
+
flags: GObject.BindingFlags,
|
|
365
|
+
transform_to?: GObject.BindingTransformFunc | null,
|
|
366
|
+
transform_from?: GObject.BindingTransformFunc | null,
|
|
367
|
+
notify?: GLib.DestroyNotify | null,
|
|
368
|
+
): GObject.Binding;
|
|
369
|
+
// Conflicted with GObject.Object.bind_property_full
|
|
370
|
+
bind_property_full(...args: never[]): any;
|
|
371
|
+
/**
|
|
372
|
+
* This function is intended for #GObject implementations to re-enforce
|
|
373
|
+
* a [floating][floating-ref] object reference. Doing this is seldom
|
|
374
|
+
* required: all #GInitiallyUnowneds are created with a floating reference
|
|
375
|
+
* which usually just needs to be sunken by calling g_object_ref_sink().
|
|
376
|
+
*/
|
|
377
|
+
force_floating(): void;
|
|
378
|
+
/**
|
|
379
|
+
* Increases the freeze count on `object`. If the freeze count is
|
|
380
|
+
* non-zero, the emission of "notify" signals on `object` is
|
|
381
|
+
* stopped. The signals are queued until the freeze count is decreased
|
|
382
|
+
* to zero. Duplicate notifications are squashed so that at most one
|
|
383
|
+
* #GObject::notify signal is emitted for each property modified while the
|
|
384
|
+
* object is frozen.
|
|
385
|
+
*
|
|
386
|
+
* This is necessary for accessors that modify multiple properties to prevent
|
|
387
|
+
* premature notification while the object is still being modified.
|
|
388
|
+
*/
|
|
389
|
+
freeze_notify(): void;
|
|
390
|
+
/**
|
|
391
|
+
* Gets a named field from the objects table of associations (see g_object_set_data()).
|
|
392
|
+
* @param key name of the key for that association
|
|
393
|
+
* @returns the data if found, or %NULL if no such data exists.
|
|
394
|
+
*/
|
|
395
|
+
get_data(key: string): any | null;
|
|
396
|
+
get_property(property_name: string): any;
|
|
397
|
+
/**
|
|
398
|
+
* This function gets back user data pointers stored via
|
|
399
|
+
* g_object_set_qdata().
|
|
400
|
+
* @param quark A #GQuark, naming the user data pointer
|
|
401
|
+
* @returns The user data pointer set, or %NULL
|
|
402
|
+
*/
|
|
403
|
+
get_qdata(quark: GLib.Quark): any | null;
|
|
404
|
+
/**
|
|
405
|
+
* Gets `n_properties` properties for an `object`.
|
|
406
|
+
* Obtained properties will be set to `values`. All properties must be valid.
|
|
407
|
+
* Warnings will be emitted and undefined behaviour may result if invalid
|
|
408
|
+
* properties are passed in.
|
|
409
|
+
* @param names the names of each property to get
|
|
410
|
+
* @param values the values of each property to get
|
|
411
|
+
*/
|
|
412
|
+
getv(names: string[], values: (GObject.Value | any)[]): void;
|
|
413
|
+
/**
|
|
414
|
+
* Checks whether `object` has a [floating][floating-ref] reference.
|
|
415
|
+
* @returns %TRUE if @object has a floating reference
|
|
416
|
+
*/
|
|
417
|
+
is_floating(): boolean;
|
|
418
|
+
/**
|
|
419
|
+
* Emits a "notify" signal for the property `property_name` on `object`.
|
|
420
|
+
*
|
|
421
|
+
* When possible, eg. when signaling a property change from within the class
|
|
422
|
+
* that registered the property, you should use g_object_notify_by_pspec()
|
|
423
|
+
* instead.
|
|
424
|
+
*
|
|
425
|
+
* Note that emission of the notify signal may be blocked with
|
|
426
|
+
* g_object_freeze_notify(). In this case, the signal emissions are queued
|
|
427
|
+
* and will be emitted (in reverse order) when g_object_thaw_notify() is
|
|
428
|
+
* called.
|
|
429
|
+
* @param property_name the name of a property installed on the class of @object.
|
|
430
|
+
*/
|
|
431
|
+
notify(property_name: string): void;
|
|
432
|
+
/**
|
|
433
|
+
* Emits a "notify" signal for the property specified by `pspec` on `object`.
|
|
434
|
+
*
|
|
435
|
+
* This function omits the property name lookup, hence it is faster than
|
|
436
|
+
* g_object_notify().
|
|
437
|
+
*
|
|
438
|
+
* One way to avoid using g_object_notify() from within the
|
|
439
|
+
* class that registered the properties, and using g_object_notify_by_pspec()
|
|
440
|
+
* instead, is to store the GParamSpec used with
|
|
441
|
+
* g_object_class_install_property() inside a static array, e.g.:
|
|
442
|
+
*
|
|
443
|
+
*
|
|
444
|
+
* ```c
|
|
445
|
+
* typedef enum
|
|
446
|
+
* {
|
|
447
|
+
* PROP_FOO = 1,
|
|
448
|
+
* PROP_LAST
|
|
449
|
+
* } MyObjectProperty;
|
|
450
|
+
*
|
|
451
|
+
* static GParamSpec *properties[PROP_LAST];
|
|
452
|
+
*
|
|
453
|
+
* static void
|
|
454
|
+
* my_object_class_init (MyObjectClass *klass)
|
|
455
|
+
* {
|
|
456
|
+
* properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
|
|
457
|
+
* 0, 100,
|
|
458
|
+
* 50,
|
|
459
|
+
* G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
|
460
|
+
* g_object_class_install_property (gobject_class,
|
|
461
|
+
* PROP_FOO,
|
|
462
|
+
* properties[PROP_FOO]);
|
|
463
|
+
* }
|
|
464
|
+
* ```
|
|
465
|
+
*
|
|
466
|
+
*
|
|
467
|
+
* and then notify a change on the "foo" property with:
|
|
468
|
+
*
|
|
469
|
+
*
|
|
470
|
+
* ```c
|
|
471
|
+
* g_object_notify_by_pspec (self, properties[PROP_FOO]);
|
|
472
|
+
* ```
|
|
473
|
+
*
|
|
474
|
+
* @param pspec the #GParamSpec of a property installed on the class of @object.
|
|
475
|
+
*/
|
|
476
|
+
notify_by_pspec(pspec: GObject.ParamSpec): void;
|
|
477
|
+
/**
|
|
478
|
+
* Increases the reference count of `object`.
|
|
479
|
+
*
|
|
480
|
+
* Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
|
|
481
|
+
* of `object` will be propagated to the return type (using the GCC typeof()
|
|
482
|
+
* extension), so any casting the caller needs to do on the return type must be
|
|
483
|
+
* explicit.
|
|
484
|
+
* @returns the same @object
|
|
485
|
+
*/
|
|
486
|
+
ref(): GObject.Object;
|
|
487
|
+
/**
|
|
488
|
+
* Increase the reference count of `object,` and possibly remove the
|
|
489
|
+
* [floating][floating-ref] reference, if `object` has a floating reference.
|
|
490
|
+
*
|
|
491
|
+
* In other words, if the object is floating, then this call "assumes
|
|
492
|
+
* ownership" of the floating reference, converting it to a normal
|
|
493
|
+
* reference by clearing the floating flag while leaving the reference
|
|
494
|
+
* count unchanged. If the object is not floating, then this call
|
|
495
|
+
* adds a new normal reference increasing the reference count by one.
|
|
496
|
+
*
|
|
497
|
+
* Since GLib 2.56, the type of `object` will be propagated to the return type
|
|
498
|
+
* under the same conditions as for g_object_ref().
|
|
499
|
+
* @returns @object
|
|
500
|
+
*/
|
|
501
|
+
ref_sink(): GObject.Object;
|
|
502
|
+
/**
|
|
503
|
+
* Releases all references to other objects. This can be used to break
|
|
504
|
+
* reference cycles.
|
|
505
|
+
*
|
|
506
|
+
* This function should only be called from object system implementations.
|
|
507
|
+
*/
|
|
508
|
+
run_dispose(): void;
|
|
509
|
+
/**
|
|
510
|
+
* Each object carries around a table of associations from
|
|
511
|
+
* strings to pointers. This function lets you set an association.
|
|
512
|
+
*
|
|
513
|
+
* If the object already had an association with that name,
|
|
514
|
+
* the old association will be destroyed.
|
|
515
|
+
*
|
|
516
|
+
* Internally, the `key` is converted to a #GQuark using g_quark_from_string().
|
|
517
|
+
* This means a copy of `key` is kept permanently (even after `object` has been
|
|
518
|
+
* finalized) — so it is recommended to only use a small, bounded set of values
|
|
519
|
+
* for `key` in your program, to avoid the #GQuark storage growing unbounded.
|
|
520
|
+
* @param key name of the key
|
|
521
|
+
* @param data data to associate with that key
|
|
522
|
+
*/
|
|
523
|
+
set_data(key: string, data?: any | null): void;
|
|
524
|
+
set_property(property_name: string, value: any): void;
|
|
525
|
+
/**
|
|
526
|
+
* Remove a specified datum from the object's data associations,
|
|
527
|
+
* without invoking the association's destroy handler.
|
|
528
|
+
* @param key name of the key
|
|
529
|
+
* @returns the data if found, or %NULL if no such data exists.
|
|
530
|
+
*/
|
|
531
|
+
steal_data(key: string): any | null;
|
|
532
|
+
/**
|
|
533
|
+
* This function gets back user data pointers stored via
|
|
534
|
+
* g_object_set_qdata() and removes the `data` from object
|
|
535
|
+
* without invoking its destroy() function (if any was
|
|
536
|
+
* set).
|
|
537
|
+
* Usually, calling this function is only required to update
|
|
538
|
+
* user data pointers with a destroy notifier, for example:
|
|
539
|
+
*
|
|
540
|
+
* ```c
|
|
541
|
+
* void
|
|
542
|
+
* object_add_to_user_list (GObject *object,
|
|
543
|
+
* const gchar *new_string)
|
|
544
|
+
* {
|
|
545
|
+
* // the quark, naming the object data
|
|
546
|
+
* GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
|
|
547
|
+
* // retrieve the old string list
|
|
548
|
+
* GList *list = g_object_steal_qdata (object, quark_string_list);
|
|
549
|
+
*
|
|
550
|
+
* // prepend new string
|
|
551
|
+
* list = g_list_prepend (list, g_strdup (new_string));
|
|
552
|
+
* // this changed 'list', so we need to set it again
|
|
553
|
+
* g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
|
|
554
|
+
* }
|
|
555
|
+
* static void
|
|
556
|
+
* free_string_list (gpointer data)
|
|
557
|
+
* {
|
|
558
|
+
* GList *node, *list = data;
|
|
559
|
+
*
|
|
560
|
+
* for (node = list; node; node = node->next)
|
|
561
|
+
* g_free (node->data);
|
|
562
|
+
* g_list_free (list);
|
|
563
|
+
* }
|
|
564
|
+
* ```
|
|
565
|
+
*
|
|
566
|
+
* Using g_object_get_qdata() in the above example, instead of
|
|
567
|
+
* g_object_steal_qdata() would have left the destroy function set,
|
|
568
|
+
* and thus the partial string list would have been freed upon
|
|
569
|
+
* g_object_set_qdata_full().
|
|
570
|
+
* @param quark A #GQuark, naming the user data pointer
|
|
571
|
+
* @returns The user data pointer set, or %NULL
|
|
572
|
+
*/
|
|
573
|
+
steal_qdata(quark: GLib.Quark): any | null;
|
|
574
|
+
/**
|
|
575
|
+
* Reverts the effect of a previous call to
|
|
576
|
+
* g_object_freeze_notify(). The freeze count is decreased on `object`
|
|
577
|
+
* and when it reaches zero, queued "notify" signals are emitted.
|
|
578
|
+
*
|
|
579
|
+
* Duplicate notifications for each property are squashed so that at most one
|
|
580
|
+
* #GObject::notify signal is emitted for each property, in the reverse order
|
|
581
|
+
* in which they have been queued.
|
|
582
|
+
*
|
|
583
|
+
* It is an error to call this function when the freeze count is zero.
|
|
584
|
+
*/
|
|
585
|
+
thaw_notify(): void;
|
|
586
|
+
/**
|
|
587
|
+
* Decreases the reference count of `object`. When its reference count
|
|
588
|
+
* drops to 0, the object is finalized (i.e. its memory is freed).
|
|
589
|
+
*
|
|
590
|
+
* If the pointer to the #GObject may be reused in future (for example, if it is
|
|
591
|
+
* an instance variable of another object), it is recommended to clear the
|
|
592
|
+
* pointer to %NULL rather than retain a dangling pointer to a potentially
|
|
593
|
+
* invalid #GObject instance. Use g_clear_object() for this.
|
|
594
|
+
*/
|
|
595
|
+
unref(): void;
|
|
596
|
+
/**
|
|
597
|
+
* This function essentially limits the life time of the `closure` to
|
|
598
|
+
* the life time of the object. That is, when the object is finalized,
|
|
599
|
+
* the `closure` is invalidated by calling g_closure_invalidate() on
|
|
600
|
+
* it, in order to prevent invocations of the closure with a finalized
|
|
601
|
+
* (nonexisting) object. Also, g_object_ref() and g_object_unref() are
|
|
602
|
+
* added as marshal guards to the `closure,` to ensure that an extra
|
|
603
|
+
* reference count is held on `object` during invocation of the
|
|
604
|
+
* `closure`. Usually, this function will be called on closures that
|
|
605
|
+
* use this `object` as closure data.
|
|
606
|
+
* @param closure #GClosure to watch
|
|
607
|
+
*/
|
|
608
|
+
watch_closure(closure: GObject.Closure): void;
|
|
609
|
+
vfunc_constructed(): void;
|
|
610
|
+
vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: GObject.ParamSpec): void;
|
|
611
|
+
vfunc_dispose(): void;
|
|
612
|
+
vfunc_finalize(): void;
|
|
613
|
+
vfunc_get_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
|
614
|
+
/**
|
|
615
|
+
* Emits a "notify" signal for the property `property_name` on `object`.
|
|
616
|
+
*
|
|
617
|
+
* When possible, eg. when signaling a property change from within the class
|
|
618
|
+
* that registered the property, you should use g_object_notify_by_pspec()
|
|
619
|
+
* instead.
|
|
620
|
+
*
|
|
621
|
+
* Note that emission of the notify signal may be blocked with
|
|
622
|
+
* g_object_freeze_notify(). In this case, the signal emissions are queued
|
|
623
|
+
* and will be emitted (in reverse order) when g_object_thaw_notify() is
|
|
624
|
+
* called.
|
|
625
|
+
* @param pspec
|
|
626
|
+
*/
|
|
627
|
+
vfunc_notify(pspec: GObject.ParamSpec): void;
|
|
628
|
+
vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
|
|
629
|
+
disconnect(id: number): void;
|
|
630
|
+
set(properties: { [key: string]: any }): void;
|
|
631
|
+
block_signal_handler(id: number): any;
|
|
632
|
+
unblock_signal_handler(id: number): any;
|
|
633
|
+
stop_emission_by_name(detailedName: string): any;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
class GAttribute {
|
|
637
|
+
static $gtype: GObject.GType<GAttribute>;
|
|
638
|
+
|
|
639
|
+
// Own fields of Fep.GAttribute
|
|
640
|
+
|
|
641
|
+
type: GAttrType;
|
|
642
|
+
value: number;
|
|
643
|
+
start_index: number;
|
|
644
|
+
end_index: number;
|
|
645
|
+
|
|
646
|
+
// Constructors of Fep.GAttribute
|
|
647
|
+
|
|
648
|
+
_init(...args: any[]): void;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
type GClientClass = typeof GClient;
|
|
652
|
+
abstract class GClientPrivate {
|
|
653
|
+
static $gtype: GObject.GType<GClientPrivate>;
|
|
654
|
+
|
|
655
|
+
// Constructors of Fep.GClientPrivate
|
|
656
|
+
|
|
657
|
+
_init(...args: any[]): void;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
class GEventAny {
|
|
661
|
+
static $gtype: GObject.GType<GEventAny>;
|
|
662
|
+
|
|
663
|
+
// Own fields of Fep.GEventAny
|
|
664
|
+
|
|
665
|
+
type: GEventType;
|
|
666
|
+
|
|
667
|
+
// Constructors of Fep.GEventAny
|
|
668
|
+
|
|
669
|
+
_init(...args: any[]): void;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
class GEventKey {
|
|
673
|
+
static $gtype: GObject.GType<GEventKey>;
|
|
674
|
+
|
|
675
|
+
// Own fields of Fep.GEventKey
|
|
676
|
+
|
|
677
|
+
type: GEventType;
|
|
678
|
+
keyval: number;
|
|
679
|
+
modifiers: number;
|
|
680
|
+
source: string;
|
|
681
|
+
source_length: number;
|
|
682
|
+
|
|
683
|
+
// Constructors of Fep.GEventKey
|
|
684
|
+
|
|
685
|
+
_init(...args: any[]): void;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
class GEventResize {
|
|
689
|
+
static $gtype: GObject.GType<GEventResize>;
|
|
690
|
+
|
|
691
|
+
// Own fields of Fep.GEventResize
|
|
692
|
+
|
|
693
|
+
type: GEventType;
|
|
694
|
+
cols: number;
|
|
695
|
+
rows: number;
|
|
696
|
+
|
|
697
|
+
// Constructors of Fep.GEventResize
|
|
698
|
+
|
|
699
|
+
_init(...args: any[]): void;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* The #FepGEvent struct contains a union of all of the event structs,
|
|
704
|
+
* and allows access to the data fields in a number of ways.
|
|
705
|
+
*/
|
|
706
|
+
class GEvent {
|
|
707
|
+
static $gtype: GObject.GType<GEvent>;
|
|
708
|
+
|
|
709
|
+
// Constructors of Fep.GEvent
|
|
710
|
+
|
|
711
|
+
constructor(type: GEventType);
|
|
712
|
+
_init(...args: any[]): void;
|
|
713
|
+
|
|
714
|
+
static ['new'](type: GEventType): GEvent;
|
|
715
|
+
|
|
716
|
+
// Own methods of Fep.GEvent
|
|
717
|
+
|
|
718
|
+
copy(): GEvent;
|
|
719
|
+
free(): void;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Name of the imported GIR library
|
|
724
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
725
|
+
*/
|
|
726
|
+
const __name__: string;
|
|
727
|
+
/**
|
|
728
|
+
* Version of the imported GIR library
|
|
729
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
730
|
+
*/
|
|
731
|
+
const __version__: string;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
export default Fep;
|
|
735
|
+
// END
|
package/fep-1.0.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@girs/fep-1.0",
|
|
3
|
+
"version": "1.0.0-4.0.0-beta.3",
|
|
4
|
+
"description": "GJS TypeScript type definitions for Fep-1.0, generated from library version 1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "fep-1.0.js",
|
|
7
|
+
"main": "fep-1.0.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
"./ambient": {
|
|
10
|
+
"types": "./fep-1.0-ambient.d.ts",
|
|
11
|
+
"import": "./fep-1.0-ambient.js",
|
|
12
|
+
"default": "./fep-1.0-ambient.js"
|
|
13
|
+
},
|
|
14
|
+
"./import": {
|
|
15
|
+
"types": "./fep-1.0-import.d.ts",
|
|
16
|
+
"import": "./fep-1.0-import.js",
|
|
17
|
+
"default": "./fep-1.0-import.js"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./fep-1.0.d.ts",
|
|
21
|
+
"import": "./fep-1.0.js",
|
|
22
|
+
"default": "./fep-1.0.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit fep-1.0.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@girs/gio-2.0": "^2.80.0-4.0.0-beta.3",
|
|
30
|
+
"@girs/gjs": "^4.0.0-beta.3",
|
|
31
|
+
"@girs/glib-2.0": "^2.80.0-4.0.0-beta.3",
|
|
32
|
+
"@girs/gobject-2.0": "^2.80.0-4.0.0-beta.3"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"typescript": "*"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"Gir",
|
|
39
|
+
"TypeScript",
|
|
40
|
+
"types",
|
|
41
|
+
"GObject-Introspection",
|
|
42
|
+
"GJS",
|
|
43
|
+
"Fep-1.0"
|
|
44
|
+
],
|
|
45
|
+
"author": "ts-for-gir",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "git+https://github.com/gjsify/ts-for-gir.git"
|
|
50
|
+
},
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/gjsify/ts-for-gir/issues"
|
|
53
|
+
},
|
|
54
|
+
"homepage": "https://github.com/gjsify/types/tree/main/fep-1.0#readme"
|
|
55
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// General settings for code interpretation
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ESNext"],
|
|
7
|
+
"types": [],
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"moduleResolution": "node",
|
|
10
|
+
"noEmit": true,
|
|
11
|
+
"noEmitOnError": false,
|
|
12
|
+
"baseUrl": "./",
|
|
13
|
+
"rootDir": ".",
|
|
14
|
+
// General settings for code generation
|
|
15
|
+
"removeComments": false,
|
|
16
|
+
"inlineSourceMap": false,
|
|
17
|
+
"inlineSources": false,
|
|
18
|
+
"newLine": "LF"
|
|
19
|
+
},
|
|
20
|
+
"include": ["./fep-1.0.d.ts"]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|