@girs/lasem-0.6 0.6.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 +85 -0
- package/index.d.ts +15 -0
- package/index.js +5 -0
- package/lasem-0.6-ambient.d.ts +9 -0
- package/lasem-0.6-ambient.js +2 -0
- package/lasem-0.6-import.d.ts +9 -0
- package/lasem-0.6-import.js +3 -0
- package/lasem-0.6.d.ts +1530 -0
- package/lasem-0.6.js +5 -0
- package/package.json +57 -0
- package/tsconfig.json +48 -0
- package/typedoc.json +9 -0
package/lasem-0.6.d.ts
ADDED
|
@@ -0,0 +1,1530 @@
|
|
|
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 cairo from 'cairo';
|
|
14
|
+
import type GObject from '@girs/gobject-2.0';
|
|
15
|
+
import type GLib from '@girs/glib-2.0';
|
|
16
|
+
import type Gio from '@girs/gio-2.0';
|
|
17
|
+
import type GModule from '@girs/gmodule-2.0';
|
|
18
|
+
import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
|
|
19
|
+
|
|
20
|
+
export namespace Lasem {
|
|
21
|
+
/**
|
|
22
|
+
* Lasem-0.6
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @gir-type Enum
|
|
27
|
+
*/
|
|
28
|
+
export namespace DebugLevel {
|
|
29
|
+
export const $gtype: GObject.GType<DebugLevel>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @gir-type Enum
|
|
34
|
+
*/
|
|
35
|
+
enum DebugLevel {
|
|
36
|
+
NONE,
|
|
37
|
+
WARNING,
|
|
38
|
+
DEBUG,
|
|
39
|
+
LOG,
|
|
40
|
+
COUNT,
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @gir-type Enum
|
|
45
|
+
*/
|
|
46
|
+
export namespace DomNodeType {
|
|
47
|
+
export const $gtype: GObject.GType<DomNodeType>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @gir-type Enum
|
|
52
|
+
*/
|
|
53
|
+
enum DomNodeType {
|
|
54
|
+
ELEMENT_NODE,
|
|
55
|
+
ATTRIBUTE_NODE,
|
|
56
|
+
TEXT_NODE,
|
|
57
|
+
CDATA_SECTION_NODE,
|
|
58
|
+
ENTITY_REFERENCE_NODE,
|
|
59
|
+
ENTITY_NODE,
|
|
60
|
+
PROCESSING_INSTRUCTION_NODE,
|
|
61
|
+
COMMENT_NODE,
|
|
62
|
+
DOCUMENT_NODE,
|
|
63
|
+
DOCUMENT_TYPE_NODE,
|
|
64
|
+
DOCUMENT_FRAGMENT_NODE,
|
|
65
|
+
NOTATION_NODE,
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const DOM_VIEW_DEFAULT_RESOLUTION: number;
|
|
69
|
+
const DOM_VIEW_DEFAULT_VIEWBOX_HEIGHT: number;
|
|
70
|
+
const DOM_VIEW_DEFAULT_VIEWBOX_WIDTH: number;
|
|
71
|
+
/**
|
|
72
|
+
* @param cairo
|
|
73
|
+
* @param to
|
|
74
|
+
* @param from
|
|
75
|
+
*/
|
|
76
|
+
function cairo_box_device_to_user(cairo: cairo.Context, to: Box, from: Box): void;
|
|
77
|
+
/**
|
|
78
|
+
* @param cairo
|
|
79
|
+
* @param to
|
|
80
|
+
* @param from
|
|
81
|
+
*/
|
|
82
|
+
function cairo_box_user_to_device(cairo: cairo.Context, to: Box, from: Box): void;
|
|
83
|
+
/**
|
|
84
|
+
* @param cairo
|
|
85
|
+
* @param rx
|
|
86
|
+
* @param ry
|
|
87
|
+
* @param x_axis_rotation
|
|
88
|
+
* @param large_arc_flag
|
|
89
|
+
* @param sweep_flag
|
|
90
|
+
* @param x
|
|
91
|
+
* @param y
|
|
92
|
+
*/
|
|
93
|
+
function cairo_elliptical_arc(
|
|
94
|
+
cairo: cairo.Context,
|
|
95
|
+
rx: number,
|
|
96
|
+
ry: number,
|
|
97
|
+
x_axis_rotation: number,
|
|
98
|
+
large_arc_flag: boolean,
|
|
99
|
+
sweep_flag: boolean,
|
|
100
|
+
x: number,
|
|
101
|
+
y: number,
|
|
102
|
+
): void;
|
|
103
|
+
/**
|
|
104
|
+
* @param cr
|
|
105
|
+
* @param path
|
|
106
|
+
*/
|
|
107
|
+
function cairo_emit_svg_path(cr: cairo.Context, path: string): void;
|
|
108
|
+
/**
|
|
109
|
+
* @param cairo
|
|
110
|
+
* @param x
|
|
111
|
+
*/
|
|
112
|
+
function cairo_horizontal(cairo: cairo.Context, x: number): void;
|
|
113
|
+
/**
|
|
114
|
+
* @param cr
|
|
115
|
+
* @param x1
|
|
116
|
+
* @param y1
|
|
117
|
+
* @param x
|
|
118
|
+
* @param y
|
|
119
|
+
*/
|
|
120
|
+
function cairo_quadratic_curve_to(cr: cairo.Context, x1: number, y1: number, x: number, y: number): void;
|
|
121
|
+
/**
|
|
122
|
+
* @param cairo
|
|
123
|
+
* @param rx
|
|
124
|
+
* @param ry
|
|
125
|
+
* @param x_axis_rotation
|
|
126
|
+
* @param large_arc_flag
|
|
127
|
+
* @param sweep_flag
|
|
128
|
+
* @param dx
|
|
129
|
+
* @param dy
|
|
130
|
+
*/
|
|
131
|
+
function cairo_rel_elliptical_arc(
|
|
132
|
+
cairo: cairo.Context,
|
|
133
|
+
rx: number,
|
|
134
|
+
ry: number,
|
|
135
|
+
x_axis_rotation: number,
|
|
136
|
+
large_arc_flag: boolean,
|
|
137
|
+
sweep_flag: boolean,
|
|
138
|
+
dx: number,
|
|
139
|
+
dy: number,
|
|
140
|
+
): void;
|
|
141
|
+
/**
|
|
142
|
+
* @param cairo
|
|
143
|
+
* @param dx
|
|
144
|
+
*/
|
|
145
|
+
function cairo_rel_horizontal(cairo: cairo.Context, dx: number): void;
|
|
146
|
+
/**
|
|
147
|
+
* @param cr
|
|
148
|
+
* @param dx1
|
|
149
|
+
* @param dy1
|
|
150
|
+
* @param dx
|
|
151
|
+
* @param dy
|
|
152
|
+
*/
|
|
153
|
+
function cairo_rel_quadratic_curve_to(cr: cairo.Context, dx1: number, dy1: number, dx: number, dy: number): void;
|
|
154
|
+
/**
|
|
155
|
+
* @param cairo
|
|
156
|
+
* @param dy
|
|
157
|
+
*/
|
|
158
|
+
function cairo_rel_vertical(cairo: cairo.Context, dy: number): void;
|
|
159
|
+
/**
|
|
160
|
+
* Sets the given pixbuf as the source pattern for `cairo`.
|
|
161
|
+
*
|
|
162
|
+
* The pattern has an extend mode of {@link cairo.Extend.NONE} and is aligned
|
|
163
|
+
* so that the origin of `pixbuf` is `pixbuf_x`, `pixbuf_y`.
|
|
164
|
+
* @param cairo a cairo context
|
|
165
|
+
* @param pixbuf a {@link GdkPixbuf.Pixbuf}
|
|
166
|
+
* @param pixbuf_x X coordinate of location to place upper left corner of `pixbuf`
|
|
167
|
+
* @param pixbuf_y Y coordinate of location to place upper left corner of `pixbuf`
|
|
168
|
+
* @since 0.4
|
|
169
|
+
*/
|
|
170
|
+
function cairo_set_source_pixbuf(
|
|
171
|
+
cairo: cairo.Context,
|
|
172
|
+
pixbuf: GdkPixbuf.Pixbuf,
|
|
173
|
+
pixbuf_x: number,
|
|
174
|
+
pixbuf_y: number,
|
|
175
|
+
): void;
|
|
176
|
+
/**
|
|
177
|
+
* @param cairo
|
|
178
|
+
* @param y
|
|
179
|
+
*/
|
|
180
|
+
function cairo_vertical(cairo: cairo.Context, y: number): void;
|
|
181
|
+
/**
|
|
182
|
+
* @param category
|
|
183
|
+
* @param level
|
|
184
|
+
*/
|
|
185
|
+
function debug_check(category: DebugCategory, level: DebugLevel | null): boolean;
|
|
186
|
+
/**
|
|
187
|
+
* @param category_selection
|
|
188
|
+
*/
|
|
189
|
+
function debug_enable(category_selection: string): void;
|
|
190
|
+
/**
|
|
191
|
+
* @param name
|
|
192
|
+
*/
|
|
193
|
+
function dom_get_entity(name: string): string;
|
|
194
|
+
function dom_implementation_cleanup(): void;
|
|
195
|
+
/**
|
|
196
|
+
* @param namespace_uri namespace uri
|
|
197
|
+
* @param qualified_name qualified name
|
|
198
|
+
* @returns a new {@link Lasem.DomDocument}
|
|
199
|
+
*/
|
|
200
|
+
function dom_implementation_create_document(namespace_uri: string, qualified_name: string): DomDocument;
|
|
201
|
+
/**
|
|
202
|
+
* @param string
|
|
203
|
+
* @param strings
|
|
204
|
+
* @param n_strings
|
|
205
|
+
*/
|
|
206
|
+
function enum_value_from_string(string: string, strings: string, n_strings: number): number;
|
|
207
|
+
/**
|
|
208
|
+
* @param string
|
|
209
|
+
*/
|
|
210
|
+
function g_string_free_and_steal(string: GLib.String): string;
|
|
211
|
+
/**
|
|
212
|
+
* Free the buffer returned by `lsm_itex_to_mathml`.
|
|
213
|
+
* @param mathml a mathml buffer
|
|
214
|
+
*/
|
|
215
|
+
function itex_free_mathml_buffer(mathml?: string | null): void;
|
|
216
|
+
/**
|
|
217
|
+
* Converts an itex string to a Mathml representation.
|
|
218
|
+
* @param itex an itex string
|
|
219
|
+
* @param size itex string length, -1 if NULL terminated
|
|
220
|
+
* @returns a newly allocated string, NULL on parse error. The returned data must be freed using `lsm_itex_free_mathml_buffer`.
|
|
221
|
+
*/
|
|
222
|
+
function itex_to_mathml(itex: string | null, size: number): string;
|
|
223
|
+
function shutdown(): void;
|
|
224
|
+
/**
|
|
225
|
+
* @param str
|
|
226
|
+
*/
|
|
227
|
+
function str_is_uri(str: string): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* @param str
|
|
230
|
+
* @param x
|
|
231
|
+
*/
|
|
232
|
+
function str_parse_double(str: string, x: number): boolean;
|
|
233
|
+
/**
|
|
234
|
+
* @param str
|
|
235
|
+
* @param n_values
|
|
236
|
+
* @param values
|
|
237
|
+
*/
|
|
238
|
+
function str_parse_double_list(str: string, n_values: number, values: number): number;
|
|
239
|
+
/**
|
|
240
|
+
* @param point_list
|
|
241
|
+
* @param extents
|
|
242
|
+
*/
|
|
243
|
+
function str_point_list_exents(point_list: string, extents: Extents): void;
|
|
244
|
+
/**
|
|
245
|
+
* @param str
|
|
246
|
+
*/
|
|
247
|
+
function str_to_uri(str: string): string;
|
|
248
|
+
namespace DomCharacterData {
|
|
249
|
+
// Signal signatures
|
|
250
|
+
interface SignalSignatures extends DomNode.SignalSignatures {}
|
|
251
|
+
|
|
252
|
+
// Constructor properties interface
|
|
253
|
+
|
|
254
|
+
interface ConstructorProps extends DomNode.ConstructorProps {}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @gir-type Class
|
|
259
|
+
*/
|
|
260
|
+
abstract class DomCharacterData extends DomNode {
|
|
261
|
+
static $gtype: GObject.GType<DomCharacterData>;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Compile-time signal type information.
|
|
265
|
+
*
|
|
266
|
+
* This instance property is generated only for TypeScript type checking.
|
|
267
|
+
* It is not defined at runtime and should not be accessed in JS code.
|
|
268
|
+
* @internal
|
|
269
|
+
*/
|
|
270
|
+
$signals: DomCharacterData.SignalSignatures;
|
|
271
|
+
|
|
272
|
+
// Fields
|
|
273
|
+
|
|
274
|
+
node: DomNode;
|
|
275
|
+
data: string;
|
|
276
|
+
|
|
277
|
+
// Constructors
|
|
278
|
+
|
|
279
|
+
constructor(properties?: Partial<DomCharacterData.ConstructorProps>, ...args: any[]);
|
|
280
|
+
|
|
281
|
+
_init(...args: any[]): void;
|
|
282
|
+
|
|
283
|
+
// Signals
|
|
284
|
+
|
|
285
|
+
/** @signal */
|
|
286
|
+
connect<K extends keyof DomCharacterData.SignalSignatures>(
|
|
287
|
+
signal: K,
|
|
288
|
+
callback: GObject.SignalCallback<this, DomCharacterData.SignalSignatures[K]>,
|
|
289
|
+
): number;
|
|
290
|
+
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
291
|
+
/** @signal */
|
|
292
|
+
connect_after<K extends keyof DomCharacterData.SignalSignatures>(
|
|
293
|
+
signal: K,
|
|
294
|
+
callback: GObject.SignalCallback<this, DomCharacterData.SignalSignatures[K]>,
|
|
295
|
+
): number;
|
|
296
|
+
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
297
|
+
/** @signal */
|
|
298
|
+
emit<K extends keyof DomCharacterData.SignalSignatures>(
|
|
299
|
+
signal: K,
|
|
300
|
+
...args: GObject.GjsParameters<DomCharacterData.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
|
|
301
|
+
): void;
|
|
302
|
+
emit(signal: string, ...args: any[]): void;
|
|
303
|
+
|
|
304
|
+
// Methods
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Get the character node data.
|
|
308
|
+
* @returns character node data.
|
|
309
|
+
*/
|
|
310
|
+
get_data(): string;
|
|
311
|
+
/**
|
|
312
|
+
* @param args
|
|
313
|
+
*/
|
|
314
|
+
// Conflicted with GObject.Object.get_data
|
|
315
|
+
get_data(...args: never[]): any;
|
|
316
|
+
/**
|
|
317
|
+
* Set the character node data.
|
|
318
|
+
* @param value new node data
|
|
319
|
+
*/
|
|
320
|
+
set_data(value: string): void;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
namespace DomDocument {
|
|
324
|
+
// Signal signatures
|
|
325
|
+
interface SignalSignatures extends DomNode.SignalSignatures {}
|
|
326
|
+
|
|
327
|
+
// Constructor properties interface
|
|
328
|
+
|
|
329
|
+
interface ConstructorProps extends DomNode.ConstructorProps {}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* @gir-type Class
|
|
334
|
+
*/
|
|
335
|
+
abstract class DomDocument extends DomNode {
|
|
336
|
+
static $gtype: GObject.GType<DomDocument>;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Compile-time signal type information.
|
|
340
|
+
*
|
|
341
|
+
* This instance property is generated only for TypeScript type checking.
|
|
342
|
+
* It is not defined at runtime and should not be accessed in JS code.
|
|
343
|
+
* @internal
|
|
344
|
+
*/
|
|
345
|
+
$signals: DomDocument.SignalSignatures;
|
|
346
|
+
|
|
347
|
+
// Fields
|
|
348
|
+
|
|
349
|
+
node: DomNode;
|
|
350
|
+
url: string;
|
|
351
|
+
|
|
352
|
+
// Constructors
|
|
353
|
+
|
|
354
|
+
constructor(properties?: Partial<DomDocument.ConstructorProps>, ...args: any[]);
|
|
355
|
+
|
|
356
|
+
_init(...args: any[]): void;
|
|
357
|
+
|
|
358
|
+
static new_from_memory(buffer: string, size: number): DomDocument;
|
|
359
|
+
|
|
360
|
+
static new_from_path(path: string): DomDocument;
|
|
361
|
+
|
|
362
|
+
static new_from_url(url: string): DomDocument;
|
|
363
|
+
|
|
364
|
+
// Signals
|
|
365
|
+
|
|
366
|
+
/** @signal */
|
|
367
|
+
connect<K extends keyof DomDocument.SignalSignatures>(
|
|
368
|
+
signal: K,
|
|
369
|
+
callback: GObject.SignalCallback<this, DomDocument.SignalSignatures[K]>,
|
|
370
|
+
): number;
|
|
371
|
+
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
372
|
+
/** @signal */
|
|
373
|
+
connect_after<K extends keyof DomDocument.SignalSignatures>(
|
|
374
|
+
signal: K,
|
|
375
|
+
callback: GObject.SignalCallback<this, DomDocument.SignalSignatures[K]>,
|
|
376
|
+
): number;
|
|
377
|
+
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
378
|
+
/** @signal */
|
|
379
|
+
emit<K extends keyof DomDocument.SignalSignatures>(
|
|
380
|
+
signal: K,
|
|
381
|
+
...args: GObject.GjsParameters<DomDocument.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
|
|
382
|
+
): void;
|
|
383
|
+
emit(signal: string, ...args: any[]): void;
|
|
384
|
+
|
|
385
|
+
// Virtual methods
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Create a new element node with a type corresponding to `tag_name`.
|
|
389
|
+
* @param tag_name name of the element to create
|
|
390
|
+
* @virtual
|
|
391
|
+
*/
|
|
392
|
+
vfunc_create_element(tag_name: string): DomElement;
|
|
393
|
+
/**
|
|
394
|
+
* Create a text node with `data` as its initial content.
|
|
395
|
+
* @param data content of the text node
|
|
396
|
+
* @virtual
|
|
397
|
+
*/
|
|
398
|
+
vfunc_create_text_node(data: string): DomText;
|
|
399
|
+
/**
|
|
400
|
+
* Create a {@link Lasem.DomView} for document rendering.
|
|
401
|
+
* @virtual
|
|
402
|
+
*/
|
|
403
|
+
vfunc_create_view(): DomView;
|
|
404
|
+
/**
|
|
405
|
+
* Get the child node that is the root element of the document.
|
|
406
|
+
* @virtual
|
|
407
|
+
*/
|
|
408
|
+
vfunc_get_document_element(): DomElement;
|
|
409
|
+
|
|
410
|
+
// Methods
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Append a chunk of xml tree to an existing document. The resulting nodes will be appended to
|
|
414
|
+
* `node`, or to `document` if `node` == NULL.
|
|
415
|
+
*
|
|
416
|
+
* Size set to -1 indicates the buffer is NULL terminated.
|
|
417
|
+
* @param node a {@link Lasem.DomNode}
|
|
418
|
+
* @param buffer a memory buffer holding xml data
|
|
419
|
+
* @param size size of the xml data, in bytes, -1 if NULL terminated
|
|
420
|
+
*/
|
|
421
|
+
append_from_memory(node: DomNode, buffer: string, size: number): void;
|
|
422
|
+
/**
|
|
423
|
+
* Create a new element node with a type corresponding to `tag_name`.
|
|
424
|
+
* @param tag_name name of the element to create
|
|
425
|
+
* @returns a newly created {@link Lasem.DomElement}
|
|
426
|
+
*/
|
|
427
|
+
create_element(tag_name: string): DomElement;
|
|
428
|
+
/**
|
|
429
|
+
* Create a text node with `data` as its initial content.
|
|
430
|
+
* @param data content of the text node
|
|
431
|
+
* @returns a newly created {@link Lasem.DomText}
|
|
432
|
+
*/
|
|
433
|
+
create_text_node(data: string): DomText;
|
|
434
|
+
/**
|
|
435
|
+
* Create a {@link Lasem.DomView} for document rendering.
|
|
436
|
+
* @returns a new {@link Lasem.DomView}
|
|
437
|
+
*/
|
|
438
|
+
create_view(): DomView;
|
|
439
|
+
/**
|
|
440
|
+
* Get the child node that is the root element of the document.
|
|
441
|
+
* @returns document element
|
|
442
|
+
*/
|
|
443
|
+
get_document_element(): DomElement;
|
|
444
|
+
/**
|
|
445
|
+
* @param href href
|
|
446
|
+
* @param size placeholder for the size of the returned data
|
|
447
|
+
* @returns a newly allocated buffer containing the requested data.
|
|
448
|
+
*/
|
|
449
|
+
get_href_data(href: string, size: number): any | null;
|
|
450
|
+
/**
|
|
451
|
+
* Get document URL.
|
|
452
|
+
* @returns document URL.
|
|
453
|
+
*/
|
|
454
|
+
get_url(): string;
|
|
455
|
+
/**
|
|
456
|
+
* Save `document` as an xml representation into `buffer`.
|
|
457
|
+
*/
|
|
458
|
+
save_to_memory(): [string, number];
|
|
459
|
+
/**
|
|
460
|
+
* Save `document` as an xml representation to a file, replacing the already existing file if needed.
|
|
461
|
+
* @param path a file path
|
|
462
|
+
*/
|
|
463
|
+
save_to_path(path: string): void;
|
|
464
|
+
/**
|
|
465
|
+
* Save `document` as an xml representation into `stream`.
|
|
466
|
+
* @param stream stream to save to
|
|
467
|
+
*/
|
|
468
|
+
save_to_stream(stream: Gio.OutputStream): void;
|
|
469
|
+
/**
|
|
470
|
+
* Save `document` as an xml representation to `url`, replacing the already existing file if needed.
|
|
471
|
+
* @param url an url
|
|
472
|
+
*/
|
|
473
|
+
save_to_url(url: string): void;
|
|
474
|
+
/**
|
|
475
|
+
* @param path
|
|
476
|
+
*/
|
|
477
|
+
set_path(path: string): void;
|
|
478
|
+
/**
|
|
479
|
+
* @param url
|
|
480
|
+
*/
|
|
481
|
+
set_url(url: string): void;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
namespace DomDocumentFragment {
|
|
485
|
+
// Signal signatures
|
|
486
|
+
interface SignalSignatures extends DomNode.SignalSignatures {}
|
|
487
|
+
|
|
488
|
+
// Constructor properties interface
|
|
489
|
+
|
|
490
|
+
interface ConstructorProps extends DomNode.ConstructorProps {}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* @gir-type Class
|
|
495
|
+
*/
|
|
496
|
+
abstract class DomDocumentFragment extends DomNode {
|
|
497
|
+
static $gtype: GObject.GType<DomDocumentFragment>;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Compile-time signal type information.
|
|
501
|
+
*
|
|
502
|
+
* This instance property is generated only for TypeScript type checking.
|
|
503
|
+
* It is not defined at runtime and should not be accessed in JS code.
|
|
504
|
+
* @internal
|
|
505
|
+
*/
|
|
506
|
+
$signals: DomDocumentFragment.SignalSignatures;
|
|
507
|
+
|
|
508
|
+
// Fields
|
|
509
|
+
|
|
510
|
+
node: DomNode;
|
|
511
|
+
|
|
512
|
+
// Constructors
|
|
513
|
+
|
|
514
|
+
constructor(properties?: Partial<DomDocumentFragment.ConstructorProps>, ...args: any[]);
|
|
515
|
+
|
|
516
|
+
_init(...args: any[]): void;
|
|
517
|
+
|
|
518
|
+
static ['new'](): DomDocumentFragment;
|
|
519
|
+
|
|
520
|
+
// Signals
|
|
521
|
+
|
|
522
|
+
/** @signal */
|
|
523
|
+
connect<K extends keyof DomDocumentFragment.SignalSignatures>(
|
|
524
|
+
signal: K,
|
|
525
|
+
callback: GObject.SignalCallback<this, DomDocumentFragment.SignalSignatures[K]>,
|
|
526
|
+
): number;
|
|
527
|
+
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
528
|
+
/** @signal */
|
|
529
|
+
connect_after<K extends keyof DomDocumentFragment.SignalSignatures>(
|
|
530
|
+
signal: K,
|
|
531
|
+
callback: GObject.SignalCallback<this, DomDocumentFragment.SignalSignatures[K]>,
|
|
532
|
+
): number;
|
|
533
|
+
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
534
|
+
/** @signal */
|
|
535
|
+
emit<K extends keyof DomDocumentFragment.SignalSignatures>(
|
|
536
|
+
signal: K,
|
|
537
|
+
...args: GObject.GjsParameters<DomDocumentFragment.SignalSignatures[K]> extends [any, ...infer Q]
|
|
538
|
+
? Q
|
|
539
|
+
: never
|
|
540
|
+
): void;
|
|
541
|
+
emit(signal: string, ...args: any[]): void;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
namespace DomElement {
|
|
545
|
+
// Signal signatures
|
|
546
|
+
interface SignalSignatures extends DomNode.SignalSignatures {}
|
|
547
|
+
|
|
548
|
+
// Constructor properties interface
|
|
549
|
+
|
|
550
|
+
interface ConstructorProps extends DomNode.ConstructorProps {}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* @gir-type Class
|
|
555
|
+
*/
|
|
556
|
+
abstract class DomElement extends DomNode {
|
|
557
|
+
static $gtype: GObject.GType<DomElement>;
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Compile-time signal type information.
|
|
561
|
+
*
|
|
562
|
+
* This instance property is generated only for TypeScript type checking.
|
|
563
|
+
* It is not defined at runtime and should not be accessed in JS code.
|
|
564
|
+
* @internal
|
|
565
|
+
*/
|
|
566
|
+
$signals: DomElement.SignalSignatures;
|
|
567
|
+
|
|
568
|
+
// Fields
|
|
569
|
+
|
|
570
|
+
node: DomNode;
|
|
571
|
+
|
|
572
|
+
// Constructors
|
|
573
|
+
|
|
574
|
+
constructor(properties?: Partial<DomElement.ConstructorProps>, ...args: any[]);
|
|
575
|
+
|
|
576
|
+
_init(...args: any[]): void;
|
|
577
|
+
|
|
578
|
+
// Signals
|
|
579
|
+
|
|
580
|
+
/** @signal */
|
|
581
|
+
connect<K extends keyof DomElement.SignalSignatures>(
|
|
582
|
+
signal: K,
|
|
583
|
+
callback: GObject.SignalCallback<this, DomElement.SignalSignatures[K]>,
|
|
584
|
+
): number;
|
|
585
|
+
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
586
|
+
/** @signal */
|
|
587
|
+
connect_after<K extends keyof DomElement.SignalSignatures>(
|
|
588
|
+
signal: K,
|
|
589
|
+
callback: GObject.SignalCallback<this, DomElement.SignalSignatures[K]>,
|
|
590
|
+
): number;
|
|
591
|
+
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
592
|
+
/** @signal */
|
|
593
|
+
emit<K extends keyof DomElement.SignalSignatures>(
|
|
594
|
+
signal: K,
|
|
595
|
+
...args: GObject.GjsParameters<DomElement.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
|
|
596
|
+
): void;
|
|
597
|
+
emit(signal: string, ...args: any[]): void;
|
|
598
|
+
|
|
599
|
+
// Virtual methods
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* @param name attribute name
|
|
603
|
+
* @virtual
|
|
604
|
+
*/
|
|
605
|
+
vfunc_get_attribute(name: string): string;
|
|
606
|
+
/**
|
|
607
|
+
* @virtual
|
|
608
|
+
*/
|
|
609
|
+
vfunc_get_serialized_attributes(): string;
|
|
610
|
+
/**
|
|
611
|
+
* Set the atribute value.
|
|
612
|
+
* @param name attribute name
|
|
613
|
+
* @param attribute_value attribute value as string
|
|
614
|
+
* @virtual
|
|
615
|
+
*/
|
|
616
|
+
vfunc_set_attribute(name: string, attribute_value: string): void;
|
|
617
|
+
|
|
618
|
+
// Methods
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* @param name attribute name
|
|
622
|
+
* @returns attribute value, as string.
|
|
623
|
+
*/
|
|
624
|
+
get_attribute(name: string): string;
|
|
625
|
+
/**
|
|
626
|
+
* @returns element tag name.
|
|
627
|
+
*/
|
|
628
|
+
get_tag_name(): string;
|
|
629
|
+
/**
|
|
630
|
+
* Set the atribute value.
|
|
631
|
+
* @param name attribute name
|
|
632
|
+
* @param attribute_value attribute value as string
|
|
633
|
+
*/
|
|
634
|
+
set_attribute(name: string, attribute_value: string): void;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
namespace DomNamedNodeMap {
|
|
638
|
+
// Signal signatures
|
|
639
|
+
interface SignalSignatures extends GObject.Object.SignalSignatures {}
|
|
640
|
+
|
|
641
|
+
// Constructor properties interface
|
|
642
|
+
|
|
643
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* @gir-type Class
|
|
648
|
+
*/
|
|
649
|
+
abstract class DomNamedNodeMap extends GObject.Object {
|
|
650
|
+
static $gtype: GObject.GType<DomNamedNodeMap>;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Compile-time signal type information.
|
|
654
|
+
*
|
|
655
|
+
* This instance property is generated only for TypeScript type checking.
|
|
656
|
+
* It is not defined at runtime and should not be accessed in JS code.
|
|
657
|
+
* @internal
|
|
658
|
+
*/
|
|
659
|
+
$signals: DomNamedNodeMap.SignalSignatures;
|
|
660
|
+
|
|
661
|
+
// Fields
|
|
662
|
+
|
|
663
|
+
object: GObject.Object;
|
|
664
|
+
|
|
665
|
+
// Constructors
|
|
666
|
+
|
|
667
|
+
constructor(properties?: Partial<DomNamedNodeMap.ConstructorProps>, ...args: any[]);
|
|
668
|
+
|
|
669
|
+
_init(...args: any[]): void;
|
|
670
|
+
|
|
671
|
+
// Signals
|
|
672
|
+
|
|
673
|
+
/** @signal */
|
|
674
|
+
connect<K extends keyof DomNamedNodeMap.SignalSignatures>(
|
|
675
|
+
signal: K,
|
|
676
|
+
callback: GObject.SignalCallback<this, DomNamedNodeMap.SignalSignatures[K]>,
|
|
677
|
+
): number;
|
|
678
|
+
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
679
|
+
/** @signal */
|
|
680
|
+
connect_after<K extends keyof DomNamedNodeMap.SignalSignatures>(
|
|
681
|
+
signal: K,
|
|
682
|
+
callback: GObject.SignalCallback<this, DomNamedNodeMap.SignalSignatures[K]>,
|
|
683
|
+
): number;
|
|
684
|
+
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
685
|
+
/** @signal */
|
|
686
|
+
emit<K extends keyof DomNamedNodeMap.SignalSignatures>(
|
|
687
|
+
signal: K,
|
|
688
|
+
...args: GObject.GjsParameters<DomNamedNodeMap.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
|
|
689
|
+
): void;
|
|
690
|
+
emit(signal: string, ...args: any[]): void;
|
|
691
|
+
|
|
692
|
+
// Virtual methods
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* @param index item index
|
|
696
|
+
* @virtual
|
|
697
|
+
*/
|
|
698
|
+
vfunc_get_item(index: number): DomNode;
|
|
699
|
+
/**
|
|
700
|
+
* @virtual
|
|
701
|
+
*/
|
|
702
|
+
vfunc_get_length(): number;
|
|
703
|
+
|
|
704
|
+
// Methods
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* @param index item index
|
|
708
|
+
* @returns The node corresponding to `index`, NULL on error.
|
|
709
|
+
*/
|
|
710
|
+
get_item(index: number): DomNode;
|
|
711
|
+
get_length(): number;
|
|
712
|
+
/**
|
|
713
|
+
* @param name name of the requested item
|
|
714
|
+
* @returns The corresponding node, NULL if not found.
|
|
715
|
+
*/
|
|
716
|
+
get_named_item(name: string): DomNode;
|
|
717
|
+
/**
|
|
718
|
+
* @param name name of the item to remove
|
|
719
|
+
* @returns removed node, NULL on error.
|
|
720
|
+
*/
|
|
721
|
+
remove_named_item(name: string): DomNode;
|
|
722
|
+
/**
|
|
723
|
+
* @param node a {@link Lasem.DomNode}
|
|
724
|
+
* @returns same as `node`, NULL on error.
|
|
725
|
+
*/
|
|
726
|
+
set_named_item(node: DomNode): DomNode;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
namespace DomNode {
|
|
730
|
+
// Signal signatures
|
|
731
|
+
interface SignalSignatures extends GObject.Object.SignalSignatures {}
|
|
732
|
+
|
|
733
|
+
// Constructor properties interface
|
|
734
|
+
|
|
735
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* @gir-type Class
|
|
740
|
+
*/
|
|
741
|
+
abstract class DomNode extends GObject.Object {
|
|
742
|
+
static $gtype: GObject.GType<DomNode>;
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Compile-time signal type information.
|
|
746
|
+
*
|
|
747
|
+
* This instance property is generated only for TypeScript type checking.
|
|
748
|
+
* It is not defined at runtime and should not be accessed in JS code.
|
|
749
|
+
* @internal
|
|
750
|
+
*/
|
|
751
|
+
$signals: DomNode.SignalSignatures;
|
|
752
|
+
|
|
753
|
+
// Fields
|
|
754
|
+
|
|
755
|
+
object: GObject.Object;
|
|
756
|
+
owner_document: DomDocument;
|
|
757
|
+
next_sibling: DomNode;
|
|
758
|
+
previous_sibling: DomNode;
|
|
759
|
+
parent_node: DomNode;
|
|
760
|
+
first_child: DomNode;
|
|
761
|
+
last_child: DomNode;
|
|
762
|
+
|
|
763
|
+
// Constructors
|
|
764
|
+
|
|
765
|
+
constructor(properties?: Partial<DomNode.ConstructorProps>, ...args: any[]);
|
|
766
|
+
|
|
767
|
+
_init(...args: any[]): void;
|
|
768
|
+
|
|
769
|
+
// Signals
|
|
770
|
+
|
|
771
|
+
/** @signal */
|
|
772
|
+
connect<K extends keyof DomNode.SignalSignatures>(
|
|
773
|
+
signal: K,
|
|
774
|
+
callback: GObject.SignalCallback<this, DomNode.SignalSignatures[K]>,
|
|
775
|
+
): number;
|
|
776
|
+
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
777
|
+
/** @signal */
|
|
778
|
+
connect_after<K extends keyof DomNode.SignalSignatures>(
|
|
779
|
+
signal: K,
|
|
780
|
+
callback: GObject.SignalCallback<this, DomNode.SignalSignatures[K]>,
|
|
781
|
+
): number;
|
|
782
|
+
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
783
|
+
/** @signal */
|
|
784
|
+
emit<K extends keyof DomNode.SignalSignatures>(
|
|
785
|
+
signal: K,
|
|
786
|
+
...args: GObject.GjsParameters<DomNode.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
|
|
787
|
+
): void;
|
|
788
|
+
emit(signal: string, ...args: any[]): void;
|
|
789
|
+
|
|
790
|
+
// Virtual methods
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* @param new_child
|
|
794
|
+
* @virtual
|
|
795
|
+
*/
|
|
796
|
+
vfunc_can_append_child(new_child: DomNode): boolean;
|
|
797
|
+
/**
|
|
798
|
+
* @virtual
|
|
799
|
+
*/
|
|
800
|
+
vfunc_changed(): void;
|
|
801
|
+
/**
|
|
802
|
+
* @param child
|
|
803
|
+
* @virtual
|
|
804
|
+
*/
|
|
805
|
+
vfunc_child_changed(child: DomNode): boolean;
|
|
806
|
+
/**
|
|
807
|
+
* Gets the node name.
|
|
808
|
+
* @virtual
|
|
809
|
+
*/
|
|
810
|
+
vfunc_get_node_name(): string;
|
|
811
|
+
/**
|
|
812
|
+
* @virtual
|
|
813
|
+
*/
|
|
814
|
+
vfunc_get_node_type(): DomNodeType;
|
|
815
|
+
/**
|
|
816
|
+
* Gets the node value.
|
|
817
|
+
* @virtual
|
|
818
|
+
*/
|
|
819
|
+
vfunc_get_node_value(): string;
|
|
820
|
+
/**
|
|
821
|
+
* @param child
|
|
822
|
+
* @virtual
|
|
823
|
+
*/
|
|
824
|
+
vfunc_post_new_child(child: DomNode): void;
|
|
825
|
+
/**
|
|
826
|
+
* @param child
|
|
827
|
+
* @virtual
|
|
828
|
+
*/
|
|
829
|
+
vfunc_pre_remove_child(child: DomNode): void;
|
|
830
|
+
/**
|
|
831
|
+
* @param new_value
|
|
832
|
+
* @virtual
|
|
833
|
+
*/
|
|
834
|
+
vfunc_set_node_value(new_value: string): void;
|
|
835
|
+
/**
|
|
836
|
+
* @param stream
|
|
837
|
+
* @virtual
|
|
838
|
+
*/
|
|
839
|
+
vfunc_write_to_stream(stream: Gio.OutputStream): void;
|
|
840
|
+
|
|
841
|
+
// Methods
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* Adds the node `new_child` to the end of the list of children of this node.
|
|
845
|
+
* If the `new_child` is already in the tree, it is first removed.
|
|
846
|
+
* @param new_child node to append
|
|
847
|
+
* @returns the added node.
|
|
848
|
+
*/
|
|
849
|
+
append_child(new_child: DomNode): DomNode;
|
|
850
|
+
changed(): void;
|
|
851
|
+
/**
|
|
852
|
+
* @returns node child list
|
|
853
|
+
*/
|
|
854
|
+
get_child_nodes(): DomNodeList;
|
|
855
|
+
/**
|
|
856
|
+
* @returns node first child
|
|
857
|
+
*/
|
|
858
|
+
get_first_child(): DomNode;
|
|
859
|
+
/**
|
|
860
|
+
* @returns node last child
|
|
861
|
+
*/
|
|
862
|
+
get_last_child(): DomNode;
|
|
863
|
+
/**
|
|
864
|
+
* @returns node next sibling
|
|
865
|
+
*/
|
|
866
|
+
get_next_sibling(): DomNode;
|
|
867
|
+
/**
|
|
868
|
+
* Gets the node name.
|
|
869
|
+
* @returns the node name.
|
|
870
|
+
*/
|
|
871
|
+
get_node_name(): string;
|
|
872
|
+
get_node_type(): DomNodeType;
|
|
873
|
+
/**
|
|
874
|
+
* Gets the node value.
|
|
875
|
+
* @returns the node value.
|
|
876
|
+
*/
|
|
877
|
+
get_node_value(): string;
|
|
878
|
+
/**
|
|
879
|
+
* @returns node owner document
|
|
880
|
+
*/
|
|
881
|
+
get_owner_document(): DomDocument;
|
|
882
|
+
/**
|
|
883
|
+
* @returns node parent
|
|
884
|
+
*/
|
|
885
|
+
get_parent_node(): DomNode;
|
|
886
|
+
/**
|
|
887
|
+
* @returns node previous sibling
|
|
888
|
+
*/
|
|
889
|
+
get_previous_sibling(): DomNode;
|
|
890
|
+
has_child_nodes(): boolean;
|
|
891
|
+
/**
|
|
892
|
+
* Inserts the node `new_child` before the existing child node `ref_child`. If
|
|
893
|
+
* `ref_child` is null, insert `new_child` at the end of the list of children.
|
|
894
|
+
* If the `new_child` is already in the tree, it is first removed.
|
|
895
|
+
* @param new_child node to insert
|
|
896
|
+
* @param ref_child reference node, i.e., the node before which the new node must be inserted.
|
|
897
|
+
* @returns the inserted node.
|
|
898
|
+
*/
|
|
899
|
+
insert_before(new_child: DomNode, ref_child: DomNode): DomNode;
|
|
900
|
+
/**
|
|
901
|
+
* Removes the child node indicated by `old_child` from the list of children, and returns it.
|
|
902
|
+
* @param old_child node to remove.
|
|
903
|
+
* @returns the removed node.
|
|
904
|
+
*/
|
|
905
|
+
remove_child(old_child: DomNode): DomNode;
|
|
906
|
+
/**
|
|
907
|
+
* Replaces the child node `old_child` with `new_child` in the list of children,
|
|
908
|
+
* and returns the `old_child` node.
|
|
909
|
+
* If the `new_child` is already in the tree, it is first removed.
|
|
910
|
+
* @param new_child a replacement node
|
|
911
|
+
* @param old_child node to replace
|
|
912
|
+
* @returns the replaced node.
|
|
913
|
+
*/
|
|
914
|
+
replace_child(new_child: DomNode, old_child: DomNode): DomNode;
|
|
915
|
+
/**
|
|
916
|
+
* @param new_value
|
|
917
|
+
*/
|
|
918
|
+
set_node_value(new_value: string): void;
|
|
919
|
+
/**
|
|
920
|
+
* @param stream
|
|
921
|
+
*/
|
|
922
|
+
write_to_stream(stream: Gio.OutputStream): void;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
namespace DomNodeList {
|
|
926
|
+
// Signal signatures
|
|
927
|
+
interface SignalSignatures extends GObject.Object.SignalSignatures {}
|
|
928
|
+
|
|
929
|
+
// Constructor properties interface
|
|
930
|
+
|
|
931
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* @gir-type Class
|
|
936
|
+
*/
|
|
937
|
+
abstract class DomNodeList extends GObject.Object {
|
|
938
|
+
static $gtype: GObject.GType<DomNodeList>;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Compile-time signal type information.
|
|
942
|
+
*
|
|
943
|
+
* This instance property is generated only for TypeScript type checking.
|
|
944
|
+
* It is not defined at runtime and should not be accessed in JS code.
|
|
945
|
+
* @internal
|
|
946
|
+
*/
|
|
947
|
+
$signals: DomNodeList.SignalSignatures;
|
|
948
|
+
|
|
949
|
+
// Fields
|
|
950
|
+
|
|
951
|
+
object: GObject.Object;
|
|
952
|
+
|
|
953
|
+
// Constructors
|
|
954
|
+
|
|
955
|
+
constructor(properties?: Partial<DomNodeList.ConstructorProps>, ...args: any[]);
|
|
956
|
+
|
|
957
|
+
_init(...args: any[]): void;
|
|
958
|
+
|
|
959
|
+
// Signals
|
|
960
|
+
|
|
961
|
+
/** @signal */
|
|
962
|
+
connect<K extends keyof DomNodeList.SignalSignatures>(
|
|
963
|
+
signal: K,
|
|
964
|
+
callback: GObject.SignalCallback<this, DomNodeList.SignalSignatures[K]>,
|
|
965
|
+
): number;
|
|
966
|
+
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
967
|
+
/** @signal */
|
|
968
|
+
connect_after<K extends keyof DomNodeList.SignalSignatures>(
|
|
969
|
+
signal: K,
|
|
970
|
+
callback: GObject.SignalCallback<this, DomNodeList.SignalSignatures[K]>,
|
|
971
|
+
): number;
|
|
972
|
+
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
973
|
+
/** @signal */
|
|
974
|
+
emit<K extends keyof DomNodeList.SignalSignatures>(
|
|
975
|
+
signal: K,
|
|
976
|
+
...args: GObject.GjsParameters<DomNodeList.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
|
|
977
|
+
): void;
|
|
978
|
+
emit(signal: string, ...args: any[]): void;
|
|
979
|
+
|
|
980
|
+
// Virtual methods
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* @param index id of the item to retrieve
|
|
984
|
+
* @virtual
|
|
985
|
+
*/
|
|
986
|
+
vfunc_get_item(index: number): DomNode;
|
|
987
|
+
/**
|
|
988
|
+
* @virtual
|
|
989
|
+
*/
|
|
990
|
+
vfunc_get_length(): number;
|
|
991
|
+
|
|
992
|
+
// Methods
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* @param index id of the item to retrieve
|
|
996
|
+
* @returns the node corresponding to index, NULL on error.
|
|
997
|
+
*/
|
|
998
|
+
get_item(index: number): DomNode;
|
|
999
|
+
get_length(): number;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
namespace DomText {
|
|
1003
|
+
// Signal signatures
|
|
1004
|
+
interface SignalSignatures extends DomCharacterData.SignalSignatures {}
|
|
1005
|
+
|
|
1006
|
+
// Constructor properties interface
|
|
1007
|
+
|
|
1008
|
+
interface ConstructorProps extends DomCharacterData.ConstructorProps {}
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* @gir-type Class
|
|
1013
|
+
*/
|
|
1014
|
+
class DomText extends DomCharacterData {
|
|
1015
|
+
static $gtype: GObject.GType<DomText>;
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Compile-time signal type information.
|
|
1019
|
+
*
|
|
1020
|
+
* This instance property is generated only for TypeScript type checking.
|
|
1021
|
+
* It is not defined at runtime and should not be accessed in JS code.
|
|
1022
|
+
* @internal
|
|
1023
|
+
*/
|
|
1024
|
+
$signals: DomText.SignalSignatures;
|
|
1025
|
+
|
|
1026
|
+
// Fields
|
|
1027
|
+
|
|
1028
|
+
character_data: DomCharacterData;
|
|
1029
|
+
|
|
1030
|
+
// Constructors
|
|
1031
|
+
|
|
1032
|
+
constructor(properties?: Partial<DomText.ConstructorProps>, ...args: any[]);
|
|
1033
|
+
|
|
1034
|
+
_init(...args: any[]): void;
|
|
1035
|
+
|
|
1036
|
+
static ['new'](data: string): DomText;
|
|
1037
|
+
|
|
1038
|
+
// Signals
|
|
1039
|
+
|
|
1040
|
+
/** @signal */
|
|
1041
|
+
connect<K extends keyof DomText.SignalSignatures>(
|
|
1042
|
+
signal: K,
|
|
1043
|
+
callback: GObject.SignalCallback<this, DomText.SignalSignatures[K]>,
|
|
1044
|
+
): number;
|
|
1045
|
+
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
1046
|
+
/** @signal */
|
|
1047
|
+
connect_after<K extends keyof DomText.SignalSignatures>(
|
|
1048
|
+
signal: K,
|
|
1049
|
+
callback: GObject.SignalCallback<this, DomText.SignalSignatures[K]>,
|
|
1050
|
+
): number;
|
|
1051
|
+
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
1052
|
+
/** @signal */
|
|
1053
|
+
emit<K extends keyof DomText.SignalSignatures>(
|
|
1054
|
+
signal: K,
|
|
1055
|
+
...args: GObject.GjsParameters<DomText.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
|
|
1056
|
+
): void;
|
|
1057
|
+
emit(signal: string, ...args: any[]): void;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
namespace DomView {
|
|
1061
|
+
// Signal signatures
|
|
1062
|
+
interface SignalSignatures extends GObject.Object.SignalSignatures {}
|
|
1063
|
+
|
|
1064
|
+
// Constructor properties interface
|
|
1065
|
+
|
|
1066
|
+
interface ConstructorProps extends GObject.Object.ConstructorProps {}
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
/**
|
|
1070
|
+
* @gir-type Class
|
|
1071
|
+
*/
|
|
1072
|
+
abstract class DomView extends GObject.Object {
|
|
1073
|
+
static $gtype: GObject.GType<DomView>;
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* Compile-time signal type information.
|
|
1077
|
+
*
|
|
1078
|
+
* This instance property is generated only for TypeScript type checking.
|
|
1079
|
+
* It is not defined at runtime and should not be accessed in JS code.
|
|
1080
|
+
* @internal
|
|
1081
|
+
*/
|
|
1082
|
+
$signals: DomView.SignalSignatures;
|
|
1083
|
+
|
|
1084
|
+
// Fields
|
|
1085
|
+
|
|
1086
|
+
object: GObject.Object;
|
|
1087
|
+
document: DomDocument;
|
|
1088
|
+
is_vector: boolean;
|
|
1089
|
+
resolution_ppi: number;
|
|
1090
|
+
viewport_pt: Box;
|
|
1091
|
+
|
|
1092
|
+
// Constructors
|
|
1093
|
+
|
|
1094
|
+
constructor(properties?: Partial<DomView.ConstructorProps>, ...args: any[]);
|
|
1095
|
+
|
|
1096
|
+
_init(...args: any[]): void;
|
|
1097
|
+
|
|
1098
|
+
// Signals
|
|
1099
|
+
|
|
1100
|
+
/** @signal */
|
|
1101
|
+
connect<K extends keyof DomView.SignalSignatures>(
|
|
1102
|
+
signal: K,
|
|
1103
|
+
callback: GObject.SignalCallback<this, DomView.SignalSignatures[K]>,
|
|
1104
|
+
): number;
|
|
1105
|
+
connect(signal: string, callback: (...args: any[]) => any): number;
|
|
1106
|
+
/** @signal */
|
|
1107
|
+
connect_after<K extends keyof DomView.SignalSignatures>(
|
|
1108
|
+
signal: K,
|
|
1109
|
+
callback: GObject.SignalCallback<this, DomView.SignalSignatures[K]>,
|
|
1110
|
+
): number;
|
|
1111
|
+
connect_after(signal: string, callback: (...args: any[]) => any): number;
|
|
1112
|
+
/** @signal */
|
|
1113
|
+
emit<K extends keyof DomView.SignalSignatures>(
|
|
1114
|
+
signal: K,
|
|
1115
|
+
...args: GObject.GjsParameters<DomView.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
|
|
1116
|
+
): void;
|
|
1117
|
+
emit(signal: string, ...args: any[]): void;
|
|
1118
|
+
|
|
1119
|
+
// Virtual methods
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* @param width
|
|
1123
|
+
* @param height
|
|
1124
|
+
* @param baseline
|
|
1125
|
+
* @virtual
|
|
1126
|
+
*/
|
|
1127
|
+
vfunc_measure(width: number, height: number, baseline: number): void;
|
|
1128
|
+
/**
|
|
1129
|
+
* @virtual
|
|
1130
|
+
*/
|
|
1131
|
+
vfunc_render(): void;
|
|
1132
|
+
/**
|
|
1133
|
+
* Configure feature debug.
|
|
1134
|
+
* @param feature name of the feature to debug
|
|
1135
|
+
* @param enable wether to enable debugging
|
|
1136
|
+
* @virtual
|
|
1137
|
+
*/
|
|
1138
|
+
vfunc_set_debug(feature: string, enable: boolean): void;
|
|
1139
|
+
|
|
1140
|
+
// Methods
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* @returns view resolution, in pixel per inch.
|
|
1144
|
+
*/
|
|
1145
|
+
get_resolution(): number;
|
|
1146
|
+
/**
|
|
1147
|
+
* Get the view size and baseline. Baseline is for use of view inside bloc of text.
|
|
1148
|
+
*/
|
|
1149
|
+
get_size(): [number, number, number];
|
|
1150
|
+
/**
|
|
1151
|
+
* Get the view size and baseline. Baseline is for use of view inside bloc of text.
|
|
1152
|
+
*/
|
|
1153
|
+
get_size_pixels(): [number, number, number];
|
|
1154
|
+
/**
|
|
1155
|
+
* @returns viewport size, in points.
|
|
1156
|
+
*/
|
|
1157
|
+
get_viewport(): Box;
|
|
1158
|
+
/**
|
|
1159
|
+
* @returns viewport size, in pixels.
|
|
1160
|
+
*/
|
|
1161
|
+
get_viewport_pixels(): Box;
|
|
1162
|
+
/**
|
|
1163
|
+
* Render `view` in the `cairo` context.
|
|
1164
|
+
* @param cairo cairo context
|
|
1165
|
+
* @param x x posiiton for rendering
|
|
1166
|
+
* @param y y position for rendering
|
|
1167
|
+
*/
|
|
1168
|
+
render(cairo: cairo.Context, x: number, y: number): void;
|
|
1169
|
+
/**
|
|
1170
|
+
* Configure feature debug.
|
|
1171
|
+
* @param feature name of the feature to debug
|
|
1172
|
+
* @param enable wether to enable debugging
|
|
1173
|
+
*/
|
|
1174
|
+
set_debug(feature: string, enable: boolean): void;
|
|
1175
|
+
/**
|
|
1176
|
+
* Change the document attached to `view`. The previously attached document is unreferenced.
|
|
1177
|
+
* @param document a {@link Lasem.DomDocument}
|
|
1178
|
+
*/
|
|
1179
|
+
set_document(document: DomDocument): void;
|
|
1180
|
+
/**
|
|
1181
|
+
* Set the view resolution, in pixel per inch.
|
|
1182
|
+
* @param ppi resolution, in pixel per inch.
|
|
1183
|
+
*/
|
|
1184
|
+
set_resolution(ppi: number): void;
|
|
1185
|
+
/**
|
|
1186
|
+
* Set the viewport size.
|
|
1187
|
+
* @param viewport_pt viewport size, in points
|
|
1188
|
+
*/
|
|
1189
|
+
set_viewport(viewport_pt: Box): void;
|
|
1190
|
+
/**
|
|
1191
|
+
* Set the viewport size.
|
|
1192
|
+
* @param viewport viewport size, in pixels
|
|
1193
|
+
*/
|
|
1194
|
+
set_viewport_pixels(viewport: Box): void;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* @gir-type Struct
|
|
1199
|
+
*/
|
|
1200
|
+
class Attribute {
|
|
1201
|
+
static $gtype: GObject.GType<Attribute>;
|
|
1202
|
+
|
|
1203
|
+
// Fields
|
|
1204
|
+
|
|
1205
|
+
value: string;
|
|
1206
|
+
|
|
1207
|
+
// Constructors
|
|
1208
|
+
|
|
1209
|
+
constructor(
|
|
1210
|
+
properties?: Partial<{
|
|
1211
|
+
value: string;
|
|
1212
|
+
}>,
|
|
1213
|
+
);
|
|
1214
|
+
|
|
1215
|
+
// Methods
|
|
1216
|
+
|
|
1217
|
+
is_defined(): boolean;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* @gir-type Struct
|
|
1222
|
+
*/
|
|
1223
|
+
class AttributeInfos {
|
|
1224
|
+
static $gtype: GObject.GType<AttributeInfos>;
|
|
1225
|
+
|
|
1226
|
+
// Fields
|
|
1227
|
+
|
|
1228
|
+
name: string;
|
|
1229
|
+
attribute_offset: number;
|
|
1230
|
+
trait_class: TraitClass;
|
|
1231
|
+
trait_default: any;
|
|
1232
|
+
|
|
1233
|
+
// Constructors
|
|
1234
|
+
|
|
1235
|
+
constructor(
|
|
1236
|
+
properties?: Partial<{
|
|
1237
|
+
name: string;
|
|
1238
|
+
attribute_offset: number;
|
|
1239
|
+
trait_default: any;
|
|
1240
|
+
}>,
|
|
1241
|
+
);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* @gir-type Struct
|
|
1246
|
+
*/
|
|
1247
|
+
class AttributeManager {
|
|
1248
|
+
static $gtype: GObject.GType<AttributeManager>;
|
|
1249
|
+
|
|
1250
|
+
// Constructors
|
|
1251
|
+
|
|
1252
|
+
constructor(n_attributes: number, attribute_infos: AttributeInfos);
|
|
1253
|
+
|
|
1254
|
+
static ['new'](n_attributes: number, attribute_infos: AttributeInfos): AttributeManager;
|
|
1255
|
+
|
|
1256
|
+
// Methods
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* @param n_attributes
|
|
1260
|
+
* @param attribute_infos
|
|
1261
|
+
*/
|
|
1262
|
+
add_attributes(n_attributes: number, attribute_infos: AttributeInfos): void;
|
|
1263
|
+
/**
|
|
1264
|
+
* @param instance
|
|
1265
|
+
*/
|
|
1266
|
+
clean_attributes(instance?: any | null): void;
|
|
1267
|
+
duplicate(): AttributeManager;
|
|
1268
|
+
/**
|
|
1269
|
+
* @param instance
|
|
1270
|
+
* @param name
|
|
1271
|
+
*/
|
|
1272
|
+
get_attribute(instance: any | null, name: string): string;
|
|
1273
|
+
ref(): AttributeManager;
|
|
1274
|
+
/**
|
|
1275
|
+
* @param instance
|
|
1276
|
+
*/
|
|
1277
|
+
serialize(instance?: any | null): string;
|
|
1278
|
+
/**
|
|
1279
|
+
* @param instance
|
|
1280
|
+
* @param name
|
|
1281
|
+
* @param value
|
|
1282
|
+
*/
|
|
1283
|
+
set_attribute(instance: any | null, name: string, value: string): boolean;
|
|
1284
|
+
unref(): void;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* @gir-type Struct
|
|
1289
|
+
*/
|
|
1290
|
+
class Box {
|
|
1291
|
+
static $gtype: GObject.GType<Box>;
|
|
1292
|
+
|
|
1293
|
+
// Fields
|
|
1294
|
+
|
|
1295
|
+
x: number;
|
|
1296
|
+
y: number;
|
|
1297
|
+
width: number;
|
|
1298
|
+
height: number;
|
|
1299
|
+
|
|
1300
|
+
// Constructors
|
|
1301
|
+
|
|
1302
|
+
constructor(
|
|
1303
|
+
properties?: Partial<{
|
|
1304
|
+
x: number;
|
|
1305
|
+
y: number;
|
|
1306
|
+
width: number;
|
|
1307
|
+
height: number;
|
|
1308
|
+
}>,
|
|
1309
|
+
);
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* @gir-type Struct
|
|
1314
|
+
*/
|
|
1315
|
+
abstract class DebugCategory {
|
|
1316
|
+
static $gtype: GObject.GType<DebugCategory>;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* @gir-type Alias
|
|
1321
|
+
*/
|
|
1322
|
+
type DomCharacterDataClass = typeof DomCharacterData;
|
|
1323
|
+
/**
|
|
1324
|
+
* @gir-type Alias
|
|
1325
|
+
*/
|
|
1326
|
+
type DomDocumentClass = typeof DomDocument;
|
|
1327
|
+
/**
|
|
1328
|
+
* @gir-type Alias
|
|
1329
|
+
*/
|
|
1330
|
+
type DomDocumentFragmentClass = typeof DomDocumentFragment;
|
|
1331
|
+
/**
|
|
1332
|
+
* @gir-type Alias
|
|
1333
|
+
*/
|
|
1334
|
+
type DomElementClass = typeof DomElement;
|
|
1335
|
+
/**
|
|
1336
|
+
* @gir-type Alias
|
|
1337
|
+
*/
|
|
1338
|
+
type DomNamedNodeMapClass = typeof DomNamedNodeMap;
|
|
1339
|
+
/**
|
|
1340
|
+
* @gir-type Alias
|
|
1341
|
+
*/
|
|
1342
|
+
type DomNodeClass = typeof DomNode;
|
|
1343
|
+
/**
|
|
1344
|
+
* @gir-type Alias
|
|
1345
|
+
*/
|
|
1346
|
+
type DomNodeListClass = typeof DomNodeList;
|
|
1347
|
+
/**
|
|
1348
|
+
* @gir-type Alias
|
|
1349
|
+
*/
|
|
1350
|
+
type DomTextClass = typeof DomText;
|
|
1351
|
+
/**
|
|
1352
|
+
* @gir-type Alias
|
|
1353
|
+
*/
|
|
1354
|
+
type DomViewClass = typeof DomView;
|
|
1355
|
+
/**
|
|
1356
|
+
* @gir-type Struct
|
|
1357
|
+
*/
|
|
1358
|
+
class Extents {
|
|
1359
|
+
static $gtype: GObject.GType<Extents>;
|
|
1360
|
+
|
|
1361
|
+
// Fields
|
|
1362
|
+
|
|
1363
|
+
x1: number;
|
|
1364
|
+
y1: number;
|
|
1365
|
+
x2: number;
|
|
1366
|
+
y2: number;
|
|
1367
|
+
|
|
1368
|
+
// Constructors
|
|
1369
|
+
|
|
1370
|
+
constructor(
|
|
1371
|
+
properties?: Partial<{
|
|
1372
|
+
x1: number;
|
|
1373
|
+
y1: number;
|
|
1374
|
+
x2: number;
|
|
1375
|
+
y2: number;
|
|
1376
|
+
}>,
|
|
1377
|
+
);
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* @gir-type Struct
|
|
1382
|
+
*/
|
|
1383
|
+
class Property {
|
|
1384
|
+
static $gtype: GObject.GType<Property>;
|
|
1385
|
+
|
|
1386
|
+
// Fields
|
|
1387
|
+
|
|
1388
|
+
id: number;
|
|
1389
|
+
flags: number;
|
|
1390
|
+
value: string;
|
|
1391
|
+
|
|
1392
|
+
// Constructors
|
|
1393
|
+
|
|
1394
|
+
constructor(
|
|
1395
|
+
properties?: Partial<{
|
|
1396
|
+
id: number;
|
|
1397
|
+
flags: number;
|
|
1398
|
+
value: string;
|
|
1399
|
+
}>,
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
/**
|
|
1404
|
+
* @gir-type Struct
|
|
1405
|
+
*/
|
|
1406
|
+
class PropertyBag {
|
|
1407
|
+
static $gtype: GObject.GType<PropertyBag>;
|
|
1408
|
+
|
|
1409
|
+
// Fields
|
|
1410
|
+
|
|
1411
|
+
properties: any[];
|
|
1412
|
+
|
|
1413
|
+
// Constructors
|
|
1414
|
+
|
|
1415
|
+
constructor(properties?: Partial<{}>);
|
|
1416
|
+
|
|
1417
|
+
// Methods
|
|
1418
|
+
|
|
1419
|
+
init(): void;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
/**
|
|
1423
|
+
* @gir-type Struct
|
|
1424
|
+
*/
|
|
1425
|
+
class PropertyInfos {
|
|
1426
|
+
static $gtype: GObject.GType<PropertyInfos>;
|
|
1427
|
+
|
|
1428
|
+
// Fields
|
|
1429
|
+
|
|
1430
|
+
name: string;
|
|
1431
|
+
id: number;
|
|
1432
|
+
trait_class: TraitClass;
|
|
1433
|
+
trait_default: string;
|
|
1434
|
+
|
|
1435
|
+
// Constructors
|
|
1436
|
+
|
|
1437
|
+
constructor(
|
|
1438
|
+
properties?: Partial<{
|
|
1439
|
+
name: string;
|
|
1440
|
+
id: number;
|
|
1441
|
+
trait_default: string;
|
|
1442
|
+
}>,
|
|
1443
|
+
);
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
/**
|
|
1447
|
+
* @gir-type Struct
|
|
1448
|
+
*/
|
|
1449
|
+
class PropertyManager {
|
|
1450
|
+
static $gtype: GObject.GType<PropertyManager>;
|
|
1451
|
+
|
|
1452
|
+
// Constructors
|
|
1453
|
+
|
|
1454
|
+
constructor(n_properties: number, property_infos: PropertyInfos);
|
|
1455
|
+
|
|
1456
|
+
static ['new'](n_properties: number, property_infos: PropertyInfos): PropertyManager;
|
|
1457
|
+
|
|
1458
|
+
// Methods
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* @param property_bag
|
|
1462
|
+
* @param style
|
|
1463
|
+
* @param parent_style
|
|
1464
|
+
*/
|
|
1465
|
+
apply_property_bag(property_bag: PropertyBag, style?: any | null, parent_style?: any | null): void;
|
|
1466
|
+
/**
|
|
1467
|
+
* @param property_bag
|
|
1468
|
+
*/
|
|
1469
|
+
clean_properties(property_bag: PropertyBag): void;
|
|
1470
|
+
/**
|
|
1471
|
+
* @param property_bag
|
|
1472
|
+
* @param name
|
|
1473
|
+
*/
|
|
1474
|
+
get_property(property_bag: PropertyBag, name: string): string;
|
|
1475
|
+
/**
|
|
1476
|
+
* @param style
|
|
1477
|
+
*/
|
|
1478
|
+
init_default_style(style?: any | null): void;
|
|
1479
|
+
ref(): PropertyManager;
|
|
1480
|
+
/**
|
|
1481
|
+
* @param property_bag
|
|
1482
|
+
*/
|
|
1483
|
+
serialize(property_bag: PropertyBag): string;
|
|
1484
|
+
/**
|
|
1485
|
+
* @param property_bag
|
|
1486
|
+
* @param name
|
|
1487
|
+
* @param value
|
|
1488
|
+
*/
|
|
1489
|
+
set_property(property_bag: PropertyBag, name: string, value: string): boolean;
|
|
1490
|
+
unref(): void;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
/**
|
|
1494
|
+
* @gir-type Struct
|
|
1495
|
+
*/
|
|
1496
|
+
class TraitClass {
|
|
1497
|
+
static $gtype: GObject.GType<TraitClass>;
|
|
1498
|
+
|
|
1499
|
+
// Fields
|
|
1500
|
+
|
|
1501
|
+
size: number;
|
|
1502
|
+
|
|
1503
|
+
// Constructors
|
|
1504
|
+
|
|
1505
|
+
constructor(
|
|
1506
|
+
properties?: Partial<{
|
|
1507
|
+
size: number;
|
|
1508
|
+
}>,
|
|
1509
|
+
);
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
/**
|
|
1513
|
+
* @gir-type Alias
|
|
1514
|
+
*/
|
|
1515
|
+
type Trait = void;
|
|
1516
|
+
/**
|
|
1517
|
+
* Name of the imported GIR library
|
|
1518
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
1519
|
+
*/
|
|
1520
|
+
const __name__: string;
|
|
1521
|
+
/**
|
|
1522
|
+
* Version of the imported GIR library
|
|
1523
|
+
* `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
1524
|
+
*/
|
|
1525
|
+
const __version__: string;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
export default Lasem;
|
|
1529
|
+
|
|
1530
|
+
// END
|