@girs/gfls-1 1.0.0-4.0.0-beta.41

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 ADDED
@@ -0,0 +1,85 @@
1
+
2
+ # Gfls-1
3
+
4
+ ![version](https://img.shields.io/npm/v/@girs/gfls-1)
5
+ ![downloads/week](https://img.shields.io/npm/dw/@girs/gfls-1)
6
+
7
+
8
+ GJS TypeScript type definitions for Gfls-1, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.41.
9
+
10
+ ## Install
11
+
12
+ To use this type definitions, install them with NPM:
13
+ ```bash
14
+ npm install @girs/gfls-1
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ You can import this package into your project like this:
20
+ ```ts
21
+ import Gfls from '@girs/gfls-1';
22
+ ```
23
+
24
+ ### Ambient Modules
25
+
26
+ 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.
27
+ For this you need to include `@girs/gfls-1` or `@girs/gfls-1/ambient` in your `tsconfig` or entry point Typescript file:
28
+
29
+ `index.ts`:
30
+ ```ts
31
+ import '@girs/gfls-1'
32
+ ```
33
+
34
+ `tsconfig.json`:
35
+ ```json
36
+ {
37
+ "compilerOptions": {
38
+ ...
39
+ },
40
+ "include": ["@girs/gfls-1"],
41
+ ...
42
+ }
43
+ ```
44
+
45
+ Now you can import the ambient module with TypeScript support:
46
+
47
+ ```ts
48
+ import Gfls from 'gi://Gfls?version=1';
49
+ ```
50
+
51
+ ### Global import
52
+
53
+ You can also import the module with Typescript support using the global `imports.gi` object of GJS.
54
+ For this you need to include `@girs/gfls-1` or `@girs/gfls-1/import` in your `tsconfig` or entry point Typescript file:
55
+
56
+ `index.ts`:
57
+ ```ts
58
+ import '@girs/gfls-1'
59
+ ```
60
+
61
+ `tsconfig.json`:
62
+ ```json
63
+ {
64
+ "compilerOptions": {
65
+ ...
66
+ },
67
+ "include": ["@girs/gfls-1"],
68
+ ...
69
+ }
70
+ ```
71
+
72
+ Now you have also type support for this, too:
73
+
74
+ ```ts
75
+ const Gfls = imports.gi.Gfls;
76
+ ```
77
+
78
+ ### Bundle
79
+
80
+ 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).
81
+
82
+ ## Other packages
83
+
84
+ All existing pre-generated packages can be found on [gjsify/types](https://github.com/gjsify/types).
85
+
@@ -0,0 +1,9 @@
1
+ declare module 'gi://Gfls?version=1' {
2
+ import Gfls1 from '@girs/gfls-1';
3
+ export default Gfls1;
4
+ }
5
+
6
+ declare module 'gi://Gfls' {
7
+ import Gfls1 from 'gi://Gfls?version=1';
8
+ export default Gfls1;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {}
2
+
@@ -0,0 +1,9 @@
1
+ import type Gfls1 from '@girs/gfls-1';
2
+
3
+ declare global {
4
+ export interface GjsGiImports {
5
+ Gfls: typeof Gfls1;
6
+ }
7
+ }
8
+
9
+ export default GjsGiImports;
@@ -0,0 +1,3 @@
1
+ const gi = globalThis.imports?.gi || {};
2
+ export default gi;
3
+
package/gfls-1.d.ts ADDED
@@ -0,0 +1,584 @@
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
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ import '@girs/gjs';
11
+
12
+ // Module dependencies
13
+ import type Gtk from '@girs/gtk-3.0';
14
+ import type xlib from '@girs/xlib-2.0';
15
+ import type Gdk from '@girs/gdk-3.0';
16
+ import type cairo from 'cairo';
17
+ import type GObject from '@girs/gobject-2.0';
18
+ import type GLib from '@girs/glib-2.0';
19
+ import type Pango from '@girs/pango-1.0';
20
+ import type HarfBuzz from '@girs/harfbuzz-0.0';
21
+ import type freetype2 from '@girs/freetype2-2.0';
22
+ import type Gio from '@girs/gio-2.0';
23
+ import type GModule from '@girs/gmodule-2.0';
24
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
25
+ import type Atk from '@girs/atk-1.0';
26
+
27
+ export namespace Gfls {
28
+ /**
29
+ * Gfls-1
30
+ */
31
+
32
+ /**
33
+ * An error code used with the `GFLS_LOADER_ERROR` domain.
34
+ * @gir-type Struct
35
+ */
36
+ class LoaderError extends GLib.Error {
37
+ static $gtype: GObject.GType<GLib.Error>;
38
+
39
+ // Static fields
40
+
41
+ /**
42
+ * The content is too big.
43
+ */
44
+ static TOO_BIG: number;
45
+ /**
46
+ * The content is not a valid UTF-8 string. Used by
47
+ * basic loaders that don't support charset conversion.
48
+ */
49
+ static NOT_UTF8: number;
50
+ /**
51
+ * The content contains a very long line.
52
+ */
53
+ static HAS_VERY_LONG_LINE: number;
54
+
55
+ // Constructors
56
+
57
+ constructor(options: { message: string; code: number });
58
+
59
+ // Static methods
60
+
61
+ static quark(): GLib.Quark;
62
+ }
63
+
64
+ /**
65
+ * Free the resources allocated by Gfls. For example it unrefs the singleton
66
+ * objects.
67
+ *
68
+ * It is not mandatory to call this function, it's just to be friendlier to
69
+ * memory debugging tools. This function is meant to be called at the end of
70
+ * `main()`. It can be called several times.
71
+ * @since 0.1
72
+ */
73
+ function finalize(): void;
74
+ /**
75
+ * Initializes the Gfls library (e.g. for the internationalization).
76
+ *
77
+ * This function can be called several times, but is meant to be called at the
78
+ * beginning of `main()`, before any other Gfls function call.
79
+ * @since 0.1
80
+ */
81
+ function init(): void;
82
+ /**
83
+ * This function starts a read operation on `input_stream`. It is meant to be
84
+ * used as the only read operation on `input_stream`, to get a {@link GLib.Bytes} as a
85
+ * result, with `max_size` as the provided maximum number of bytes to read.
86
+ *
87
+ * `expected_size` is typically a {@link Gio.File} size as returned by
88
+ * `g_file_info_get_size()`. But note that in that case, the returned {@link GLib.Bytes} may
89
+ * contain a different number of bytes than what was expected (the
90
+ * TOC/TOU problem: time of check to time of use). `expected_size` is used as an
91
+ * indication to how much memory to allocate initially.
92
+ *
93
+ * See the {@link Gio.AsyncResult} documentation to know how to use this function.
94
+ * @param input_stream a {@link Gio.InputStream}.
95
+ * @param expected_size the expected number of bytes contained in `input_stream`.
96
+ * @param max_size the maximum number of bytes to read.
97
+ * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
98
+ * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
99
+ * @since 0.1
100
+ */
101
+ function input_stream_read_async(
102
+ input_stream: Gio.InputStream,
103
+ expected_size: number,
104
+ max_size: number,
105
+ io_priority: number,
106
+ cancellable?: Gio.Cancellable | null,
107
+ ): globalThis.Promise<GLib.Bytes>;
108
+ /**
109
+ * This function starts a read operation on `input_stream`. It is meant to be
110
+ * used as the only read operation on `input_stream`, to get a {@link GLib.Bytes} as a
111
+ * result, with `max_size` as the provided maximum number of bytes to read.
112
+ *
113
+ * `expected_size` is typically a {@link Gio.File} size as returned by
114
+ * `g_file_info_get_size()`. But note that in that case, the returned {@link GLib.Bytes} may
115
+ * contain a different number of bytes than what was expected (the
116
+ * TOC/TOU problem: time of check to time of use). `expected_size` is used as an
117
+ * indication to how much memory to allocate initially.
118
+ *
119
+ * See the {@link Gio.AsyncResult} documentation to know how to use this function.
120
+ * @param input_stream a {@link Gio.InputStream}.
121
+ * @param expected_size the expected number of bytes contained in `input_stream`.
122
+ * @param max_size the maximum number of bytes to read.
123
+ * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
124
+ * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
125
+ * @param callback a {@link Gio.AsyncReadyCallback} to call when the operation is finished.
126
+ * @since 0.1
127
+ */
128
+ function input_stream_read_async(
129
+ input_stream: Gio.InputStream,
130
+ expected_size: number,
131
+ max_size: number,
132
+ io_priority: number,
133
+ cancellable: Gio.Cancellable | null,
134
+ callback: Gio.AsyncReadyCallback<Gio.InputStream> | null,
135
+ ): void;
136
+ /**
137
+ * This function starts a read operation on `input_stream`. It is meant to be
138
+ * used as the only read operation on `input_stream`, to get a {@link GLib.Bytes} as a
139
+ * result, with `max_size` as the provided maximum number of bytes to read.
140
+ *
141
+ * `expected_size` is typically a {@link Gio.File} size as returned by
142
+ * `g_file_info_get_size()`. But note that in that case, the returned {@link GLib.Bytes} may
143
+ * contain a different number of bytes than what was expected (the
144
+ * TOC/TOU problem: time of check to time of use). `expected_size` is used as an
145
+ * indication to how much memory to allocate initially.
146
+ *
147
+ * See the {@link Gio.AsyncResult} documentation to know how to use this function.
148
+ * @param input_stream a {@link Gio.InputStream}.
149
+ * @param expected_size the expected number of bytes contained in `input_stream`.
150
+ * @param max_size the maximum number of bytes to read.
151
+ * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
152
+ * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
153
+ * @param callback a {@link Gio.AsyncReadyCallback} to call when the operation is finished.
154
+ * @since 0.1
155
+ */
156
+ function input_stream_read_async(
157
+ input_stream: Gio.InputStream,
158
+ expected_size: number,
159
+ max_size: number,
160
+ io_priority: number,
161
+ cancellable?: Gio.Cancellable | null,
162
+ callback?: Gio.AsyncReadyCallback<Gio.InputStream> | null,
163
+ ): globalThis.Promise<GLib.Bytes> | void;
164
+ /**
165
+ * Finishes an operation started with `gfls_input_stream_read_async()`.
166
+ *
167
+ * If `is_truncated` is set to `true`, it is not an error (`error` is not set), and
168
+ * a {@link GLib.Bytes} is returned. However, since `gfls_input_stream_read_async()` is meant
169
+ * to be used as the only read operation on `input_stream`, it is an undefined
170
+ * behavior if you try to read more content from `input_stream`.
171
+ *
172
+ * The data contained in the resulting {@link GLib.Bytes} is always zero-terminated, but
173
+ * this is not included in the {@link GLib.Bytes} length. The resulting {@link GLib.Bytes} should be
174
+ * freed with `g_bytes_unref()` when no longer in use.
175
+ * @param input_stream a {@link Gio.InputStream}.
176
+ * @param result a {@link Gio.AsyncResult}.
177
+ * @param is_truncated will be set to `true` if the `input_stream` contains more data to be read, but the maximum number of bytes to read has been reached.
178
+ * @returns a {@link GLib.Bytes}, or `null` on error.
179
+ * @since 0.1
180
+ */
181
+ function input_stream_read_finish(
182
+ input_stream: Gio.InputStream,
183
+ result: Gio.AsyncResult,
184
+ is_truncated: boolean,
185
+ ): GLib.Bytes;
186
+ /**
187
+ * Starts a basic file loading operation.
188
+ *
189
+ * If the `file` content is not a valid UTF-8 string, or if the `max_size` or
190
+ * `max_n_bytes_per_line` conditions are not satisfied, an error will be returned
191
+ * without the file content.
192
+ *
193
+ * See the {@link Gio.AsyncResult} documentation to know how to use this function.
194
+ * @param file a {@link Gio.File}.
195
+ * @param max_size the maximum allowed number of bytes in total.
196
+ * @param max_n_bytes_per_line the maximum allowed number of bytes per line, as per `gfls_utf8_find_very_long_line()`.
197
+ * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
198
+ * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
199
+ * @since 0.1
200
+ */
201
+ function loader_basic_load_async(
202
+ file: Gio.File,
203
+ max_size: number,
204
+ max_n_bytes_per_line: number,
205
+ io_priority: number,
206
+ cancellable?: Gio.Cancellable | null,
207
+ ): globalThis.Promise<GLib.Bytes>;
208
+ /**
209
+ * Starts a basic file loading operation.
210
+ *
211
+ * If the `file` content is not a valid UTF-8 string, or if the `max_size` or
212
+ * `max_n_bytes_per_line` conditions are not satisfied, an error will be returned
213
+ * without the file content.
214
+ *
215
+ * See the {@link Gio.AsyncResult} documentation to know how to use this function.
216
+ * @param file a {@link Gio.File}.
217
+ * @param max_size the maximum allowed number of bytes in total.
218
+ * @param max_n_bytes_per_line the maximum allowed number of bytes per line, as per `gfls_utf8_find_very_long_line()`.
219
+ * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
220
+ * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
221
+ * @param callback a {@link Gio.AsyncReadyCallback} to call when the operation is finished.
222
+ * @since 0.1
223
+ */
224
+ function loader_basic_load_async(
225
+ file: Gio.File,
226
+ max_size: number,
227
+ max_n_bytes_per_line: number,
228
+ io_priority: number,
229
+ cancellable: Gio.Cancellable | null,
230
+ callback: Gio.AsyncReadyCallback<Gio.File> | null,
231
+ ): void;
232
+ /**
233
+ * Starts a basic file loading operation.
234
+ *
235
+ * If the `file` content is not a valid UTF-8 string, or if the `max_size` or
236
+ * `max_n_bytes_per_line` conditions are not satisfied, an error will be returned
237
+ * without the file content.
238
+ *
239
+ * See the {@link Gio.AsyncResult} documentation to know how to use this function.
240
+ * @param file a {@link Gio.File}.
241
+ * @param max_size the maximum allowed number of bytes in total.
242
+ * @param max_n_bytes_per_line the maximum allowed number of bytes per line, as per `gfls_utf8_find_very_long_line()`.
243
+ * @param io_priority the I/O priority of the request. E.g. `G_PRIORITY_LOW`, `G_PRIORITY_DEFAULT` or `G_PRIORITY_HIGH`.
244
+ * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore.
245
+ * @param callback a {@link Gio.AsyncReadyCallback} to call when the operation is finished.
246
+ * @since 0.1
247
+ */
248
+ function loader_basic_load_async(
249
+ file: Gio.File,
250
+ max_size: number,
251
+ max_n_bytes_per_line: number,
252
+ io_priority: number,
253
+ cancellable?: Gio.Cancellable | null,
254
+ callback?: Gio.AsyncReadyCallback<Gio.File> | null,
255
+ ): globalThis.Promise<GLib.Bytes> | void;
256
+ /**
257
+ * Finishes an operation started with `gfls_loader_basic_load_async()`.
258
+ *
259
+ * If everything went well, a {@link GLib.Bytes} with the {@link Gio.File} content (unmodified) is
260
+ * returned. It is guaranteed to be a valid UTF-8 string.
261
+ *
262
+ * Otherwise an error is returned. The `GFLS_LOADER_ERROR` domain is used, among
263
+ * others.
264
+ *
265
+ * The data contained in the resulting {@link GLib.Bytes} is always zero-terminated, but
266
+ * this is not included in the {@link GLib.Bytes} length. The resulting {@link GLib.Bytes} should be
267
+ * freed with `g_bytes_unref()` when no longer in use.
268
+ * @param file a {@link Gio.File}.
269
+ * @param result a {@link Gio.AsyncResult}.
270
+ * @returns a {@link GLib.Bytes}, or `null` on error.
271
+ * @since 0.1
272
+ */
273
+ function loader_basic_load_finish(file: Gio.File, result: Gio.AsyncResult): GLib.Bytes;
274
+ function loader_error_quark(): GLib.Quark;
275
+ /**
276
+ * Finds if a line in `str` exceeds `max_n_bytes_per_line`.
277
+ *
278
+ * For performance reasons, `str` is not checked whether it is a valid UTF-8
279
+ * string. So you must call for example `g_utf8_validate()` beforehand.
280
+ * @param str a UTF-8 nul-terminated string.
281
+ * @param max_n_bytes_per_line the maximum number of bytes per line, without counting the newline character(s).
282
+ * @returns a pointer to the beginning of the first very long line found, or `null` if not found.
283
+ * @since 0.3
284
+ */
285
+ function utf8_find_very_long_line(str: string, max_n_bytes_per_line: number): string;
286
+ /**
287
+ * @gir-type Callback
288
+ */
289
+ interface UnsavedDocumentTitleCallback {
290
+ (num: number): string;
291
+ }
292
+ namespace AttributeKeys {
293
+ // Signal signatures
294
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
295
+
296
+ // Constructor properties interface
297
+
298
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
299
+ }
300
+
301
+ /**
302
+ * @gir-type Class
303
+ */
304
+ class AttributeKeys extends GObject.Object {
305
+ static $gtype: GObject.GType<AttributeKeys>;
306
+
307
+ /**
308
+ * Compile-time signal type information.
309
+ *
310
+ * This instance property is generated only for TypeScript type checking.
311
+ * It is not defined at runtime and should not be accessed in JS code.
312
+ * @internal
313
+ */
314
+ $signals: AttributeKeys.SignalSignatures;
315
+
316
+ // Constructors
317
+
318
+ constructor(properties?: Partial<AttributeKeys.ConstructorProps>, ...args: any[]);
319
+
320
+ _init(...args: any[]): void;
321
+
322
+ static ['new'](): AttributeKeys;
323
+
324
+ // Signals
325
+
326
+ /** @signal */
327
+ connect<K extends keyof AttributeKeys.SignalSignatures>(
328
+ signal: K,
329
+ callback: GObject.SignalCallback<this, AttributeKeys.SignalSignatures[K]>,
330
+ ): number;
331
+ connect(signal: string, callback: (...args: any[]) => any): number;
332
+ /** @signal */
333
+ connect_after<K extends keyof AttributeKeys.SignalSignatures>(
334
+ signal: K,
335
+ callback: GObject.SignalCallback<this, AttributeKeys.SignalSignatures[K]>,
336
+ ): number;
337
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
338
+ /** @signal */
339
+ emit<K extends keyof AttributeKeys.SignalSignatures>(
340
+ signal: K,
341
+ ...args: GObject.GjsParameters<AttributeKeys.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
342
+ ): void;
343
+ emit(signal: string, ...args: any[]): void;
344
+
345
+ // Methods
346
+
347
+ /**
348
+ * Adds `str` to `keys`.
349
+ *
350
+ * `str` has the same semantics as the corresponding parameter of
351
+ * `g_file_query_info()`.
352
+ * @param str the value to add.
353
+ */
354
+ add(str: string): void;
355
+ /**
356
+ * @returns the complete string to pass to `g_file_query_info()` (for example), or `null` if the list is empty.
357
+ */
358
+ to_string(): string | null;
359
+ }
360
+
361
+ namespace LoaderConfigSimple {
362
+ // Signal signatures
363
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
364
+
365
+ // Constructor properties interface
366
+
367
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
368
+ }
369
+
370
+ /**
371
+ * @gir-type Class
372
+ */
373
+ class LoaderConfigSimple extends GObject.Object {
374
+ static $gtype: GObject.GType<LoaderConfigSimple>;
375
+
376
+ /**
377
+ * Compile-time signal type information.
378
+ *
379
+ * This instance property is generated only for TypeScript type checking.
380
+ * It is not defined at runtime and should not be accessed in JS code.
381
+ * @internal
382
+ */
383
+ $signals: LoaderConfigSimple.SignalSignatures;
384
+
385
+ // Constructors
386
+
387
+ constructor(properties?: Partial<LoaderConfigSimple.ConstructorProps>, ...args: any[]);
388
+
389
+ _init(...args: any[]): void;
390
+
391
+ static new_from_file(file: Gio.File): LoaderConfigSimple;
392
+
393
+ static new_from_stream(input_stream: Gio.InputStream): LoaderConfigSimple;
394
+
395
+ // Signals
396
+
397
+ /** @signal */
398
+ connect<K extends keyof LoaderConfigSimple.SignalSignatures>(
399
+ signal: K,
400
+ callback: GObject.SignalCallback<this, LoaderConfigSimple.SignalSignatures[K]>,
401
+ ): number;
402
+ connect(signal: string, callback: (...args: any[]) => any): number;
403
+ /** @signal */
404
+ connect_after<K extends keyof LoaderConfigSimple.SignalSignatures>(
405
+ signal: K,
406
+ callback: GObject.SignalCallback<this, LoaderConfigSimple.SignalSignatures[K]>,
407
+ ): number;
408
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
409
+ /** @signal */
410
+ emit<K extends keyof LoaderConfigSimple.SignalSignatures>(
411
+ signal: K,
412
+ ...args: GObject.GjsParameters<LoaderConfigSimple.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
413
+ ): void;
414
+ emit(signal: string, ...args: any[]): void;
415
+
416
+ // Methods
417
+
418
+ /**
419
+ * @returns the {@link Gio.File} of `config`, or `null`.
420
+ */
421
+ get_file(): Gio.File | null;
422
+ /**
423
+ * @returns the {@link Gio.InputStream} of `config`, or `null`.
424
+ */
425
+ get_stream(): Gio.InputStream | null;
426
+ }
427
+
428
+ namespace UnsavedDocumentTitles {
429
+ // Signal signatures
430
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
431
+
432
+ // Constructor properties interface
433
+
434
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
435
+ }
436
+
437
+ /**
438
+ * @gir-type Class
439
+ */
440
+ class UnsavedDocumentTitles extends GObject.Object {
441
+ static $gtype: GObject.GType<UnsavedDocumentTitles>;
442
+
443
+ /**
444
+ * Compile-time signal type information.
445
+ *
446
+ * This instance property is generated only for TypeScript type checking.
447
+ * It is not defined at runtime and should not be accessed in JS code.
448
+ * @internal
449
+ */
450
+ $signals: UnsavedDocumentTitles.SignalSignatures;
451
+
452
+ // Constructors
453
+
454
+ constructor(properties?: Partial<UnsavedDocumentTitles.ConstructorProps>, ...args: any[]);
455
+
456
+ _init(...args: any[]): void;
457
+
458
+ static ['new'](): UnsavedDocumentTitles;
459
+
460
+ // Signals
461
+
462
+ /** @signal */
463
+ connect<K extends keyof UnsavedDocumentTitles.SignalSignatures>(
464
+ signal: K,
465
+ callback: GObject.SignalCallback<this, UnsavedDocumentTitles.SignalSignatures[K]>,
466
+ ): number;
467
+ connect(signal: string, callback: (...args: any[]) => any): number;
468
+ /** @signal */
469
+ connect_after<K extends keyof UnsavedDocumentTitles.SignalSignatures>(
470
+ signal: K,
471
+ callback: GObject.SignalCallback<this, UnsavedDocumentTitles.SignalSignatures[K]>,
472
+ ): number;
473
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
474
+ /** @signal */
475
+ emit<K extends keyof UnsavedDocumentTitles.SignalSignatures>(
476
+ signal: K,
477
+ ...args: GObject.GjsParameters<UnsavedDocumentTitles.SignalSignatures[K]> extends [any, ...infer Q]
478
+ ? Q
479
+ : never
480
+ ): void;
481
+ emit(signal: string, ...args: any[]): void;
482
+
483
+ // Static methods
484
+
485
+ static get_default(): UnsavedDocumentTitles;
486
+
487
+ // Methods
488
+
489
+ /**
490
+ * Allocates a number for an unsaved document. When the document is saved on
491
+ * disk, you need to give back the number with
492
+ * `gfls_unsaved_document_titles_release_number()`.
493
+ *
494
+ * The returned number is the lowest available value, starting at 1.
495
+ * @returns the allocated number.
496
+ */
497
+ allocate_number(): number;
498
+ /**
499
+ * Generates the title of an unsaved document. To customize the returned string,
500
+ * you can use `gfls_unsaved_document_titles_set_title_callback()`.
501
+ * @param number a number.
502
+ * @returns a suitable title for the unsaved document with the given `number`.
503
+ */
504
+ get_title(number: number): string;
505
+ /**
506
+ * Call this function to give back `number` to `titles`, so that it becomes
507
+ * available for a next unsaved document. This is usually done when the document
508
+ * is saved on disk.
509
+ * @param number the number to release.
510
+ */
511
+ release_number(number: number): void;
512
+ }
513
+
514
+ /**
515
+ * @gir-type Alias
516
+ */
517
+ type AttributeKeysClass = typeof AttributeKeys;
518
+ /**
519
+ * @gir-type Struct
520
+ */
521
+ abstract class AttributeKeysPrivate {
522
+ static $gtype: GObject.GType<AttributeKeysPrivate>;
523
+ }
524
+
525
+ /**
526
+ * @gir-type Alias
527
+ */
528
+ type LoaderConfigInterface = typeof LoaderConfig;
529
+ /**
530
+ * @gir-type Alias
531
+ */
532
+ type LoaderConfigSimpleClass = typeof LoaderConfigSimple;
533
+ /**
534
+ * @gir-type Struct
535
+ */
536
+ abstract class LoaderConfigSimplePrivate {
537
+ static $gtype: GObject.GType<LoaderConfigSimplePrivate>;
538
+ }
539
+
540
+ /**
541
+ * @gir-type Alias
542
+ */
543
+ type UnsavedDocumentTitlesClass = typeof UnsavedDocumentTitles;
544
+ /**
545
+ * @gir-type Struct
546
+ */
547
+ abstract class UnsavedDocumentTitlesPrivate {
548
+ static $gtype: GObject.GType<UnsavedDocumentTitlesPrivate>;
549
+ }
550
+
551
+ namespace LoaderConfig {
552
+ // Constructor properties interface
553
+
554
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
555
+ }
556
+
557
+ export interface LoaderConfigNamespace {
558
+ $gtype: GObject.GType<LoaderConfig>;
559
+ prototype: LoaderConfig;
560
+ }
561
+ /**
562
+ * @gir-type Interface
563
+ */
564
+ interface LoaderConfig extends GObject.Object {}
565
+
566
+ export const LoaderConfig: LoaderConfigNamespace & {
567
+ new (): LoaderConfig; // This allows `obj instanceof LoaderConfig`
568
+ };
569
+
570
+ /**
571
+ * Name of the imported GIR library
572
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
573
+ */
574
+ const __name__: string;
575
+ /**
576
+ * Version of the imported GIR library
577
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
578
+ */
579
+ const __version__: string;
580
+ }
581
+
582
+ export default Gfls;
583
+
584
+ // END
package/gfls-1.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import Gfls from 'gi://Gfls?version=1';
4
+ export default Gfls;
5
+
package/index.d.ts ADDED
@@ -0,0 +1,15 @@
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
+ * This template is used to generate the index.d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
+ */
9
+
10
+ import './gfls-1-ambient.d.ts';
11
+
12
+ import './gfls-1-import.d.ts';
13
+
14
+ import Gfls from './gfls-1.js';
15
+ export default Gfls;
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+
2
+ // @ts-expect-error
3
+ import Gfls from './gfls-1.js';
4
+ export default Gfls;
5
+
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@girs/gfls-1",
3
+ "version": "1.0.0-4.0.0-beta.41",
4
+ "description": "GJS TypeScript type definitions for Gfls-1, generated from library version 1.0.0",
5
+ "type": "module",
6
+ "module": "gfls-1.js",
7
+ "main": "gfls-1.js",
8
+ "exports": {
9
+ "./ambient": {
10
+ "types": "./gfls-1-ambient.d.ts",
11
+ "import": "./gfls-1-ambient.js",
12
+ "default": "./gfls-1-ambient.js"
13
+ },
14
+ "./import": {
15
+ "types": "./gfls-1-import.d.ts",
16
+ "import": "./gfls-1-import.js",
17
+ "default": "./gfls-1-import.js"
18
+ },
19
+ "./gfls-1": {
20
+ "types": "./gfls-1.d.ts",
21
+ "import": "./gfls-1.js",
22
+ "default": "./gfls-1.js"
23
+ },
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "import": "./index.js",
27
+ "default": "./index.js"
28
+ }
29
+ },
30
+ "scripts": {
31
+ "test": "tsc --project tsconfig.json"
32
+ },
33
+ "dependencies": {
34
+ "@girs/gjs": "4.0.0-beta.41",
35
+ "@girs/gtk-3.0": "3.24.51-4.0.0-beta.41",
36
+ "@girs/xlib-2.0": "2.0.0-4.0.0-beta.41",
37
+ "@girs/gdk-3.0": "3.24.51-4.0.0-beta.41",
38
+ "@girs/cairo-1.0": "1.0.0-4.0.0-beta.41",
39
+ "@girs/gobject-2.0": "2.88.0-4.0.0-beta.41",
40
+ "@girs/glib-2.0": "2.88.0-4.0.0-beta.41",
41
+ "@girs/pango-1.0": "1.57.0-4.0.0-beta.41",
42
+ "@girs/harfbuzz-0.0": "12.3.2-4.0.0-beta.41",
43
+ "@girs/freetype2-2.0": "2.0.0-4.0.0-beta.41",
44
+ "@girs/gio-2.0": "2.88.0-4.0.0-beta.41",
45
+ "@girs/gmodule-2.0": "2.0.0-4.0.0-beta.41",
46
+ "@girs/gdkpixbuf-2.0": "2.0.0-4.0.0-beta.41",
47
+ "@girs/atk-1.0": "2.60.0-4.0.0-beta.41" },
48
+ "devDependencies": {
49
+ "typescript": "*"
50
+ },
51
+ "keywords": ["Gir", "TypeScript", "types", "GObject-Introspection", "GJS", "Gfls-1"],
52
+ "author": "ts-for-gir",
53
+ "license": "MIT",
54
+ "repository": {
55
+ "type": "git",
56
+ "url": "git+https://github.com/gjsify/types.git"
57
+ },
58
+ "bugs": {
59
+ "url": "https://github.com/gjsify/ts-for-gir/issues"
60
+ },
61
+ "homepage": "https://github.com/gjsify/types/tree/main/gfls-1#readme"
62
+ }
63
+
64
+
package/tsconfig.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "compilerOptions": {
3
+ // General settings for code interpretation
4
+ "target": "ESNext",
5
+ "module": "NodeNext",
6
+ "lib": ["ESNext"],
7
+ "types": [],
8
+ "experimentalDecorators": true,
9
+ "moduleResolution": "NodeNext",
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
+ // Show diagnostics
20
+ "diagnostics": true,
21
+ "paths": {
22
+ "@girs/gtk-3.0": [
23
+ "../gtk-3.0/index.d.ts"
24
+ ],
25
+ "@girs/xlib-2.0": [
26
+ "../xlib-2.0/index.d.ts"
27
+ ],
28
+ "@girs/gdk-3.0": [
29
+ "../gdk-3.0/index.d.ts"
30
+ ],
31
+ "@girs/cairo-1.0": [
32
+ "../cairo-1.0/index.d.ts"
33
+ ],
34
+ "@girs/gobject-2.0": [
35
+ "../gobject-2.0/index.d.ts"
36
+ ],
37
+ "@girs/glib-2.0": [
38
+ "../glib-2.0/index.d.ts"
39
+ ],
40
+ "@girs/pango-1.0": [
41
+ "../pango-1.0/index.d.ts"
42
+ ],
43
+ "@girs/harfbuzz-0.0": [
44
+ "../harfbuzz-0.0/index.d.ts"
45
+ ],
46
+ "@girs/freetype2-2.0": [
47
+ "../freetype2-2.0/index.d.ts"
48
+ ],
49
+ "@girs/gio-2.0": [
50
+ "../gio-2.0/index.d.ts"
51
+ ],
52
+ "@girs/gmodule-2.0": [
53
+ "../gmodule-2.0/index.d.ts"
54
+ ],
55
+ "@girs/gdkpixbuf-2.0": [
56
+ "../gdkpixbuf-2.0/index.d.ts"
57
+ ],
58
+ "@girs/atk-1.0": [
59
+ "../atk-1.0/index.d.ts"
60
+ ],
61
+ "@girs/gjs": [
62
+ "../gjs/index.d.ts"
63
+ ]
64
+ }
65
+ },
66
+ "include": ["./gfls-1.d.ts"]
67
+ }
68
+
69
+
package/typedoc.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "entryPoints": ["./gfls-1.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "Gfls-1",
5
+ "tsconfig": "./tsconfig.json",
6
+ "skipErrorChecking": true,
7
+ "highlightLanguages": ["typescript", "javascript", "c", "cpp", "xml", "bash", "json", "css"]
8
+ }
9
+