@girs/papersview-4.0 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4344 @@
1
+
2
+ /**
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
7
+ *
8
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
9
+ */
10
+
11
+ import '@girs/gjs';
12
+
13
+ // Module dependencies
14
+ import type PapersDocument from '@girs/papersdocument-4.0';
15
+ import type Pango from '@girs/pango-1.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 HarfBuzz from '@girs/harfbuzz-0.0';
20
+ import type freetype2 from '@girs/freetype2-2.0';
21
+ import type Gio from '@girs/gio-2.0';
22
+ import type GModule from '@girs/gmodule-2.0';
23
+ import type Gtk from '@girs/gtk-4.0';
24
+ import type Gsk from '@girs/gsk-4.0';
25
+ import type Graphene from '@girs/graphene-1.0';
26
+ import type Gdk from '@girs/gdk-4.0';
27
+ import type PangoCairo from '@girs/pangocairo-1.0';
28
+ import type GdkPixbuf from '@girs/gdkpixbuf-2.0';
29
+
30
+ export namespace PapersView {
31
+
32
+ /**
33
+ * PapersView-4.0
34
+ */
35
+
36
+
37
+ /**
38
+ * @gir-type Enum
39
+ */
40
+ export namespace AnnotationTool {
41
+ export const $gtype: GObject.GType<AnnotationTool>;
42
+ }
43
+
44
+ /**
45
+ * @gir-type Enum
46
+ */
47
+ enum AnnotationTool {
48
+ PENCIL,
49
+ HIGHLIGHT,
50
+ ERASER,
51
+ TEXT,
52
+ MAX,
53
+ }
54
+
55
+
56
+ /**
57
+ * @gir-type Struct
58
+ */
59
+ class AttachmentContextError extends GLib.Error {
60
+ static $gtype: GObject.GType<GLib.Error>;
61
+
62
+ // Static fields
63
+ static NOT_IMPLEMENTED: number;
64
+
65
+ static EMPTY_INPUT: number;
66
+
67
+ // Constructors
68
+ constructor(options: { message: string; code: number });
69
+
70
+ // Static methods
71
+ static quark(): GLib.Quark;
72
+ }
73
+
74
+
75
+ /**
76
+ * @gir-type Enum
77
+ */
78
+ export namespace JobPriority {
79
+ export const $gtype: GObject.GType<JobPriority>;
80
+ }
81
+
82
+ /**
83
+ * @gir-type Enum
84
+ */
85
+ enum JobPriority {
86
+ PRIORITY_URGENT,
87
+ PRIORITY_HIGH,
88
+ PRIORITY_LOW,
89
+ PRIORITY_NONE,
90
+ N_PRIORITIES,
91
+ }
92
+
93
+
94
+ /**
95
+ * @gir-type Enum
96
+ */
97
+ export namespace PageLayout {
98
+ export const $gtype: GObject.GType<PageLayout>;
99
+ }
100
+
101
+ /**
102
+ * @gir-type Enum
103
+ */
104
+ enum PageLayout {
105
+ SINGLE,
106
+ DUAL,
107
+ AUTOMATIC,
108
+ }
109
+
110
+
111
+ /**
112
+ * @gir-type Enum
113
+ */
114
+ export namespace SizingMode {
115
+ export const $gtype: GObject.GType<SizingMode>;
116
+ }
117
+
118
+ /**
119
+ * @gir-type Enum
120
+ */
121
+ enum SizingMode {
122
+ FIT_PAGE,
123
+ FIT_WIDTH,
124
+ FREE,
125
+ AUTOMATIC,
126
+ }
127
+
128
+
129
+ function attachment_context_error_quark(): GLib.Quark;
130
+
131
+ /**
132
+ * Returns `str` as a new string removing any character which
133
+ * is not allowed in a css class name.
134
+ *
135
+ * Css class names should only contain following characters:
136
+ * - a–z A–Z 0–9 - _
137
+ * - any Unicode character ≥ U+00A0
138
+ * @param str input string
139
+ * @returns newly allocated string
140
+ */
141
+ function css_utils_filter_class_chars(str: string): string;
142
+
143
+ /**
144
+ * @gir-type Callback
145
+ */
146
+ interface InkTransformation {
147
+ (ink_annotation: PapersDocument.Annotation): void;
148
+ }
149
+
150
+ /**
151
+ * @gir-type Flags
152
+ */
153
+ export namespace AnnotationEditingState {
154
+ export const $gtype: GObject.GType<AnnotationEditingState>;
155
+ }
156
+
157
+ /**
158
+ * @gir-type Flags
159
+ */
160
+ enum AnnotationEditingState {
161
+ NONE,
162
+ INK,
163
+ TEXT,
164
+ STAMP,
165
+ INSERT_TEXT,
166
+ }
167
+
168
+
169
+ /**
170
+ * @gir-type Flags
171
+ */
172
+ export namespace JobPageDataFlags {
173
+ export const $gtype: GObject.GType<JobPageDataFlags>;
174
+ }
175
+
176
+ /**
177
+ * @gir-type Flags
178
+ */
179
+ enum JobPageDataFlags {
180
+ NONE,
181
+ LINKS,
182
+ TEXT,
183
+ TEXT_MAPPING,
184
+ TEXT_LAYOUT,
185
+ TEXT_ATTRS,
186
+ TEXT_LOG_ATTRS,
187
+ IMAGES,
188
+ FORMS,
189
+ MEDIA,
190
+ ALL,
191
+ }
192
+
193
+
194
+ namespace AnnotationModel {
195
+ // Signal signatures
196
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
197
+ "notify::active-tool-str": (pspec: GObject.ParamSpec) => void;
198
+ "notify::eraser-objects": (pspec: GObject.ParamSpec) => void;
199
+ "notify::eraser-radius": (pspec: GObject.ParamSpec) => void;
200
+ "notify::highlight-color": (pspec: GObject.ParamSpec) => void;
201
+ "notify::highlight-radius": (pspec: GObject.ParamSpec) => void;
202
+ "notify::pen-color": (pspec: GObject.ParamSpec) => void;
203
+ "notify::pen-radius": (pspec: GObject.ParamSpec) => void;
204
+ "notify::text-color": (pspec: GObject.ParamSpec) => void;
205
+ "notify::text-font": (pspec: GObject.ParamSpec) => void;
206
+ "notify::text-font-size": (pspec: GObject.ParamSpec) => void;
207
+ "notify::tool": (pspec: GObject.ParamSpec) => void;
208
+ }
209
+
210
+ // Constructor properties interface
211
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
212
+ active_tool_str: string;
213
+ activeToolStr: string;
214
+ eraser_objects: boolean;
215
+ eraserObjects: boolean;
216
+ eraser_radius: number;
217
+ eraserRadius: number;
218
+ highlight_color: Gdk.RGBA;
219
+ highlightColor: Gdk.RGBA;
220
+ highlight_radius: number;
221
+ highlightRadius: number;
222
+ pen_color: Gdk.RGBA;
223
+ penColor: Gdk.RGBA;
224
+ pen_radius: number;
225
+ penRadius: number;
226
+ text_color: Gdk.RGBA;
227
+ textColor: Gdk.RGBA;
228
+ text_font: Pango.FontDescription;
229
+ textFont: Pango.FontDescription;
230
+ text_font_size: number;
231
+ textFontSize: number;
232
+ tool: number;
233
+ }
234
+ }
235
+
236
+ /**
237
+ * @gir-type Class
238
+ */
239
+ class AnnotationModel extends GObject.Object {
240
+ static $gtype: GObject.GType<AnnotationModel>;
241
+
242
+ // Properties
243
+ /**
244
+ * @default pencil
245
+ */
246
+ get active_tool_str(): string;
247
+ set active_tool_str(val: string);
248
+
249
+ /**
250
+ * @default pencil
251
+ */
252
+ get activeToolStr(): string;
253
+ set activeToolStr(val: string);
254
+
255
+ /**
256
+ * @default true
257
+ */
258
+ get eraser_objects(): boolean;
259
+ set eraser_objects(val: boolean);
260
+
261
+ /**
262
+ * @default true
263
+ */
264
+ get eraserObjects(): boolean;
265
+ set eraserObjects(val: boolean);
266
+
267
+ /**
268
+ * @default 5
269
+ */
270
+ get eraser_radius(): number;
271
+ set eraser_radius(val: number);
272
+
273
+ /**
274
+ * @default 5
275
+ */
276
+ get eraserRadius(): number;
277
+ set eraserRadius(val: number);
278
+
279
+ get highlight_color(): Gdk.RGBA;
280
+ set highlight_color(val: Gdk.RGBA);
281
+
282
+ get highlightColor(): Gdk.RGBA;
283
+ set highlightColor(val: Gdk.RGBA);
284
+
285
+ /**
286
+ * @default 5
287
+ */
288
+ get highlight_radius(): number;
289
+ set highlight_radius(val: number);
290
+
291
+ /**
292
+ * @default 5
293
+ */
294
+ get highlightRadius(): number;
295
+ set highlightRadius(val: number);
296
+
297
+ get pen_color(): Gdk.RGBA;
298
+ set pen_color(val: Gdk.RGBA);
299
+
300
+ get penColor(): Gdk.RGBA;
301
+ set penColor(val: Gdk.RGBA);
302
+
303
+ /**
304
+ * @default 1
305
+ */
306
+ get pen_radius(): number;
307
+ set pen_radius(val: number);
308
+
309
+ /**
310
+ * @default 1
311
+ */
312
+ get penRadius(): number;
313
+ set penRadius(val: number);
314
+
315
+ get text_color(): Gdk.RGBA;
316
+ set text_color(val: Gdk.RGBA);
317
+
318
+ get textColor(): Gdk.RGBA;
319
+ set textColor(val: Gdk.RGBA);
320
+
321
+ get text_font(): Pango.FontDescription;
322
+ set text_font(val: Pango.FontDescription);
323
+
324
+ get textFont(): Pango.FontDescription;
325
+ set textFont(val: Pango.FontDescription);
326
+
327
+ /**
328
+ * @default 8
329
+ */
330
+ get text_font_size(): number;
331
+ set text_font_size(val: number);
332
+
333
+ /**
334
+ * @default 8
335
+ */
336
+ get textFontSize(): number;
337
+ set textFontSize(val: number);
338
+
339
+ /**
340
+ * @default 0
341
+ */
342
+ get tool(): number;
343
+ set tool(val: number);
344
+
345
+ /**
346
+ * Compile-time signal type information.
347
+ *
348
+ * This instance property is generated only for TypeScript type checking.
349
+ * It is not defined at runtime and should not be accessed in JS code.
350
+ * @internal
351
+ */
352
+ $signals: AnnotationModel.SignalSignatures;
353
+
354
+ // Constructors
355
+ constructor(properties?: Partial<AnnotationModel.ConstructorProps>, ...args: any[]);
356
+
357
+ _init(...args: any[]): void;
358
+
359
+ static ["new"](): AnnotationModel;
360
+
361
+ // Signals
362
+ /** @signal */
363
+ connect<K extends keyof AnnotationModel.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, AnnotationModel.SignalSignatures[K]>): number;
364
+ connect(signal: string, callback: (...args: any[]) => any): number;
365
+
366
+ /** @signal */
367
+ connect_after<K extends keyof AnnotationModel.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, AnnotationModel.SignalSignatures[K]>): number;
368
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
369
+
370
+ /** @signal */
371
+ emit<K extends keyof AnnotationModel.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<AnnotationModel.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
372
+ emit(signal: string, ...args: any[]): void;
373
+
374
+ // Methods
375
+ get_eraser_objects(): boolean;
376
+
377
+ get_eraser_radius(): number;
378
+
379
+ get_font_desc(): Pango.FontDescription;
380
+
381
+ get_highlight_color(): Gdk.RGBA;
382
+
383
+ get_highlight_radius(): number;
384
+
385
+ get_pen_color(): Gdk.RGBA;
386
+
387
+ get_pen_radius(): number;
388
+
389
+ get_text_color(): Gdk.RGBA;
390
+
391
+ /**
392
+ * Gets the current tool of the annotation model.
393
+ * @returns the current {@link PapersView.AnnotationTool}
394
+ */
395
+ get_tool(): AnnotationTool;
396
+
397
+ /**
398
+ * @param radius
399
+ */
400
+ set_eraser_radius(radius: number): void;
401
+
402
+ /**
403
+ * @param font_desc
404
+ */
405
+ set_font_desc(font_desc: Pango.FontDescription): void;
406
+
407
+ /**
408
+ * @param font_size
409
+ */
410
+ set_font_size(font_size: number): void;
411
+
412
+ /**
413
+ * @param pen_color
414
+ */
415
+ set_highlight_color(pen_color: Gdk.RGBA): void;
416
+
417
+ /**
418
+ * @param radius
419
+ */
420
+ set_highlight_radius(radius: number): void;
421
+
422
+ /**
423
+ * @param pen_color
424
+ */
425
+ set_pen_color(pen_color: Gdk.RGBA): void;
426
+
427
+ /**
428
+ * @param radius
429
+ */
430
+ set_pen_radius(radius: number): void;
431
+
432
+ /**
433
+ * @param color
434
+ */
435
+ set_text_color(color: Gdk.RGBA): void;
436
+
437
+ /**
438
+ * Sets the current tool of the annotation model.
439
+ * @param tool the {@link PapersView.AnnotationTool} to set
440
+ */
441
+ set_tool(tool: AnnotationTool): void;
442
+ }
443
+
444
+
445
+ namespace AnnotationsContext {
446
+ // Signal signatures
447
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
448
+ /**
449
+ * @signal
450
+ * @run-last
451
+ */
452
+ "annot-added": (arg0: PapersDocument.Annotation) => void;
453
+ /**
454
+ * @signal
455
+ * @run-last
456
+ */
457
+ "annot-removed": (arg0: PapersDocument.Annotation) => void;
458
+ /**
459
+ * @signal
460
+ * @run-last
461
+ */
462
+ "annots-loaded": () => void;
463
+ "notify::document-model": (pspec: GObject.ParamSpec) => void;
464
+ "notify::undo-context": (pspec: GObject.ParamSpec) => void;
465
+ }
466
+
467
+ // Constructor properties interface
468
+ interface ConstructorProps extends GObject.Object.ConstructorProps, UndoHandler.ConstructorProps {
469
+ document_model: DocumentModel;
470
+ documentModel: DocumentModel;
471
+ undo_context: UndoContext;
472
+ undoContext: UndoContext;
473
+ }
474
+ }
475
+
476
+ /**
477
+ * @gir-type Class
478
+ */
479
+ class AnnotationsContext extends GObject.Object implements UndoHandler {
480
+ static $gtype: GObject.GType<AnnotationsContext>;
481
+
482
+ // Properties
483
+ /**
484
+ * @construct-only
485
+ */
486
+ set document_model(val: DocumentModel);
487
+
488
+ /**
489
+ * @construct-only
490
+ */
491
+ set documentModel(val: DocumentModel);
492
+
493
+ /**
494
+ * @construct-only
495
+ */
496
+ set undo_context(val: UndoContext);
497
+
498
+ /**
499
+ * @construct-only
500
+ */
501
+ set undoContext(val: UndoContext);
502
+
503
+ /**
504
+ * Compile-time signal type information.
505
+ *
506
+ * This instance property is generated only for TypeScript type checking.
507
+ * It is not defined at runtime and should not be accessed in JS code.
508
+ * @internal
509
+ */
510
+ $signals: AnnotationsContext.SignalSignatures;
511
+
512
+ // Constructors
513
+ constructor(properties?: Partial<AnnotationsContext.ConstructorProps>, ...args: any[]);
514
+
515
+ _init(...args: any[]): void;
516
+
517
+ static ["new"](model: DocumentModel, undo_context: UndoContext): AnnotationsContext;
518
+
519
+ // Signals
520
+ /** @signal */
521
+ connect<K extends keyof AnnotationsContext.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, AnnotationsContext.SignalSignatures[K]>): number;
522
+ connect(signal: string, callback: (...args: any[]) => any): number;
523
+
524
+ /** @signal */
525
+ connect_after<K extends keyof AnnotationsContext.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, AnnotationsContext.SignalSignatures[K]>): number;
526
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
527
+
528
+ /** @signal */
529
+ emit<K extends keyof AnnotationsContext.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<AnnotationsContext.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
530
+ emit(signal: string, ...args: any[]): void;
531
+
532
+ // Static methods
533
+ /**
534
+ * This is a hack to be able to call rust code from C.
535
+ * @param transformation a {@link GObject.Callback} to call everytime a new ink annotation is created
536
+ */
537
+ static register_ink_transformation(transformation: InkTransformation): void;
538
+
539
+ // Methods
540
+ /**
541
+ * Add an annotation based on the provided information.
542
+ * @param page_index the index of the page where the annotation will be added
543
+ * @param type the type of annotation to add
544
+ * @param start point where to start creating an annotation (ignored for ink annotations)
545
+ * @param end point where to end creating the annotation. It is ignored for TEXT annotations and ink annotations.
546
+ * @param color the color to give to the annotation
547
+ * @param user_data a pointer with auxiliary data that is annotation-dependent. For text markup, this points to a {@link PapersDocument.AnnotationTextMarkupType}. For stamps, this points to a {@link cairo.Surface}. For free text, this points to a {@link Pango.FontDescription}. For ink, this points to a {@link PapersView.AnnotationInkAddData}.
548
+ * @returns the newly created annotation
549
+ */
550
+ add_annotation_sync(page_index: number, type: PapersDocument.AnnotationType, start: PapersDocument.Point, end: PapersDocument.Point, color: Gdk.RGBA, user_data: null): PapersDocument.Annotation;
551
+
552
+ /**
553
+ * Finds the first index of an annotation for the specified page with a dichotomic
554
+ * search.
555
+ * @param page The page number to search for.
556
+ * @returns The index of the first annotation for the specified page in the model, or the number of items if there is none.
557
+ */
558
+ first_index_for_page(page: number): number;
559
+
560
+ /**
561
+ * @param doc_point the document point where to search for annotations
562
+ * @returns the {@link PapersDocument.Annotation}, if to be found
563
+ */
564
+ get_annot_at_doc_point(doc_point: PapersDocument.DocumentPoint): PapersDocument.Annotation | null;
565
+
566
+ /**
567
+ * @returns the returned {@link Gio.ListModel}. The model is owned but the {@link PapersView.AnnotationsContext} and shall not be modified outside of it.
568
+ */
569
+ get_annots_model(): Gio.ListModel;
570
+
571
+ /**
572
+ * @param annot
573
+ */
574
+ remove_annotation(annot: PapersDocument.Annotation): void;
575
+
576
+ /**
577
+ * @param color
578
+ */
579
+ set_color(color: Gdk.RGBA): void;
580
+
581
+ /**
582
+ * @param data
583
+ */
584
+ free_action(data: null): void;
585
+
586
+ /**
587
+ * @param data
588
+ */
589
+ undo(data: null): void;
590
+
591
+ /**
592
+ * @param data
593
+ * @virtual
594
+ */
595
+ vfunc_undo(data: null): void;
596
+ }
597
+
598
+
599
+ namespace AttachmentContext {
600
+ // Signal signatures
601
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
602
+ "notify::document-model": (pspec: GObject.ParamSpec) => void;
603
+ }
604
+
605
+ // Constructor properties interface
606
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
607
+ document_model: DocumentModel;
608
+ documentModel: DocumentModel;
609
+ }
610
+ }
611
+
612
+ /**
613
+ * @gir-type Class
614
+ */
615
+ class AttachmentContext extends GObject.Object {
616
+ static $gtype: GObject.GType<AttachmentContext>;
617
+
618
+ // Properties
619
+ /**
620
+ * @construct-only
621
+ */
622
+ set document_model(val: DocumentModel);
623
+
624
+ /**
625
+ * @construct-only
626
+ */
627
+ set documentModel(val: DocumentModel);
628
+
629
+ /**
630
+ * Compile-time signal type information.
631
+ *
632
+ * This instance property is generated only for TypeScript type checking.
633
+ * It is not defined at runtime and should not be accessed in JS code.
634
+ * @internal
635
+ */
636
+ $signals: AttachmentContext.SignalSignatures;
637
+
638
+ // Constructors
639
+ constructor(properties?: Partial<AttachmentContext.ConstructorProps>, ...args: any[]);
640
+
641
+ _init(...args: any[]): void;
642
+
643
+ static ["new"](model: DocumentModel): AttachmentContext;
644
+
645
+ // Signals
646
+ /** @signal */
647
+ connect<K extends keyof AttachmentContext.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, AttachmentContext.SignalSignatures[K]>): number;
648
+ connect(signal: string, callback: (...args: any[]) => any): number;
649
+
650
+ /** @signal */
651
+ connect_after<K extends keyof AttachmentContext.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, AttachmentContext.SignalSignatures[K]>): number;
652
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
653
+
654
+ /** @signal */
655
+ emit<K extends keyof AttachmentContext.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<AttachmentContext.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
656
+ emit(signal: string, ...args: any[]): void;
657
+
658
+ // Methods
659
+ /**
660
+ * @returns the returned {@link Gio.ListModel} of {@link PapersDocument.Attachment} s
661
+ */
662
+ get_model(): Gio.ListModel;
663
+
664
+ /**
665
+ * This function initiates a file save operation.
666
+ *
667
+ * The `callback` will be called when the dialog is dismissed.
668
+ * @param attachments The attachments to save
669
+ * @param parent the parent {@link Gtk.Window}
670
+ * @param cancellable a {@link Gio.Cancellable} to cancel the operation
671
+ */
672
+ save_attachments_async(attachments: Gio.ListModel, parent: Gtk.Window | null, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>;
673
+
674
+ /**
675
+ * This function initiates a file save operation.
676
+ *
677
+ * The `callback` will be called when the dialog is dismissed.
678
+ * @param attachments The attachments to save
679
+ * @param parent the parent {@link Gtk.Window}
680
+ * @param cancellable a {@link Gio.Cancellable} to cancel the operation
681
+ * @param callback a callback to call when the operation is complete
682
+ */
683
+ save_attachments_async(attachments: Gio.ListModel, parent: Gtk.Window | null, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
684
+
685
+ /**
686
+ * This function initiates a file save operation.
687
+ *
688
+ * The `callback` will be called when the dialog is dismissed.
689
+ * @param attachments The attachments to save
690
+ * @param parent the parent {@link Gtk.Window}
691
+ * @param cancellable a {@link Gio.Cancellable} to cancel the operation
692
+ * @param callback a callback to call when the operation is complete
693
+ */
694
+ save_attachments_async(attachments: Gio.ListModel, parent: Gtk.Window | null, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback<this> | null): globalThis.Promise<boolean> | void;
695
+
696
+ /**
697
+ * Finishes the {@link Pps.AttachmentContext.save_attachments_async} call
698
+ * @param result a {@link Gio.AsyncResult}
699
+ * @returns whether a files were stored
700
+ */
701
+ save_attachments_finish(result: Gio.AsyncResult): boolean;
702
+ }
703
+
704
+
705
+ namespace DocumentModel {
706
+ // Signal signatures
707
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
708
+ /**
709
+ * @signal
710
+ * @run-last
711
+ */
712
+ "page-changed": (arg0: number, arg1: number) => void;
713
+ "notify::annotation-editing-state": (pspec: GObject.ParamSpec) => void;
714
+ "notify::annotation-model": (pspec: GObject.ParamSpec) => void;
715
+ "notify::continuous": (pspec: GObject.ParamSpec) => void;
716
+ "notify::document": (pspec: GObject.ParamSpec) => void;
717
+ "notify::dual-odd-left": (pspec: GObject.ParamSpec) => void;
718
+ "notify::inverted-colors": (pspec: GObject.ParamSpec) => void;
719
+ "notify::max-scale": (pspec: GObject.ParamSpec) => void;
720
+ "notify::min-scale": (pspec: GObject.ParamSpec) => void;
721
+ "notify::page": (pspec: GObject.ParamSpec) => void;
722
+ "notify::page-layout": (pspec: GObject.ParamSpec) => void;
723
+ "notify::rotation": (pspec: GObject.ParamSpec) => void;
724
+ "notify::rtl": (pspec: GObject.ParamSpec) => void;
725
+ "notify::scale": (pspec: GObject.ParamSpec) => void;
726
+ "notify::sizing-mode": (pspec: GObject.ParamSpec) => void;
727
+ }
728
+
729
+ // Constructor properties interface
730
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
731
+ annotation_editing_state: AnnotationEditingState;
732
+ annotationEditingState: AnnotationEditingState;
733
+ annotation_model: AnnotationModel;
734
+ annotationModel: AnnotationModel;
735
+ continuous: boolean;
736
+ document: PapersDocument.Document;
737
+ dual_odd_left: boolean;
738
+ dualOddLeft: boolean;
739
+ inverted_colors: boolean;
740
+ invertedColors: boolean;
741
+ max_scale: number;
742
+ maxScale: number;
743
+ min_scale: number;
744
+ minScale: number;
745
+ page: number;
746
+ page_layout: PageLayout;
747
+ pageLayout: PageLayout;
748
+ rotation: number;
749
+ rtl: boolean;
750
+ scale: number;
751
+ sizing_mode: SizingMode;
752
+ sizingMode: SizingMode;
753
+ }
754
+ }
755
+
756
+ /**
757
+ * @gir-type Class
758
+ */
759
+ class DocumentModel extends GObject.Object {
760
+ static $gtype: GObject.GType<DocumentModel>;
761
+
762
+ // Properties
763
+ /**
764
+ * @default PapersView.AnnotationEditingState.NONE
765
+ */
766
+ get annotation_editing_state(): AnnotationEditingState;
767
+ set annotation_editing_state(val: AnnotationEditingState);
768
+
769
+ /**
770
+ * @default PapersView.AnnotationEditingState.NONE
771
+ */
772
+ get annotationEditingState(): AnnotationEditingState;
773
+ set annotationEditingState(val: AnnotationEditingState);
774
+
775
+ /**
776
+ * @construct-only
777
+ */
778
+ get annotation_model(): AnnotationModel;
779
+
780
+ /**
781
+ * @construct-only
782
+ */
783
+ get annotationModel(): AnnotationModel;
784
+
785
+ /**
786
+ * @default true
787
+ */
788
+ get continuous(): boolean;
789
+ set continuous(val: boolean);
790
+
791
+ get document(): PapersDocument.Document;
792
+ set document(val: PapersDocument.Document);
793
+
794
+ /**
795
+ * @default false
796
+ */
797
+ get dual_odd_left(): boolean;
798
+ set dual_odd_left(val: boolean);
799
+
800
+ /**
801
+ * @default false
802
+ */
803
+ get dualOddLeft(): boolean;
804
+ set dualOddLeft(val: boolean);
805
+
806
+ /**
807
+ * @default false
808
+ */
809
+ get inverted_colors(): boolean;
810
+ set inverted_colors(val: boolean);
811
+
812
+ /**
813
+ * @default false
814
+ */
815
+ get invertedColors(): boolean;
816
+ set invertedColors(val: boolean);
817
+
818
+ /**
819
+ * @default 5
820
+ */
821
+ get max_scale(): number;
822
+ set max_scale(val: number);
823
+
824
+ /**
825
+ * @default 5
826
+ */
827
+ get maxScale(): number;
828
+ set maxScale(val: number);
829
+
830
+ /**
831
+ * @default 0.25
832
+ */
833
+ get min_scale(): number;
834
+ set min_scale(val: number);
835
+
836
+ /**
837
+ * @default 0.25
838
+ */
839
+ get minScale(): number;
840
+ set minScale(val: number);
841
+
842
+ /**
843
+ * @default -1
844
+ */
845
+ get page(): number;
846
+ set page(val: number);
847
+
848
+ /**
849
+ * @default PapersView.PageLayout.SINGLE
850
+ */
851
+ get page_layout(): PageLayout;
852
+ set page_layout(val: PageLayout);
853
+
854
+ /**
855
+ * @default PapersView.PageLayout.SINGLE
856
+ */
857
+ get pageLayout(): PageLayout;
858
+ set pageLayout(val: PageLayout);
859
+
860
+ /**
861
+ * @default 0
862
+ */
863
+ get rotation(): number;
864
+ set rotation(val: number);
865
+
866
+ /**
867
+ * @default false
868
+ */
869
+ get rtl(): boolean;
870
+ set rtl(val: boolean);
871
+
872
+ /**
873
+ * @default 1
874
+ */
875
+ get scale(): number;
876
+ set scale(val: number);
877
+
878
+ /**
879
+ * @default PapersView.SizingMode.FIT_WIDTH
880
+ */
881
+ get sizing_mode(): SizingMode;
882
+ set sizing_mode(val: SizingMode);
883
+
884
+ /**
885
+ * @default PapersView.SizingMode.FIT_WIDTH
886
+ */
887
+ get sizingMode(): SizingMode;
888
+ set sizingMode(val: SizingMode);
889
+
890
+ /**
891
+ * Compile-time signal type information.
892
+ *
893
+ * This instance property is generated only for TypeScript type checking.
894
+ * It is not defined at runtime and should not be accessed in JS code.
895
+ * @internal
896
+ */
897
+ $signals: DocumentModel.SignalSignatures;
898
+
899
+ // Constructors
900
+ constructor(properties?: Partial<DocumentModel.ConstructorProps>, ...args: any[]);
901
+
902
+ _init(...args: any[]): void;
903
+
904
+ static ["new"](): DocumentModel;
905
+
906
+ static new_with_document(document: PapersDocument.Document): DocumentModel;
907
+
908
+ // Signals
909
+ /** @signal */
910
+ connect<K extends keyof DocumentModel.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, DocumentModel.SignalSignatures[K]>): number;
911
+ connect(signal: string, callback: (...args: any[]) => any): number;
912
+
913
+ /** @signal */
914
+ connect_after<K extends keyof DocumentModel.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, DocumentModel.SignalSignatures[K]>): number;
915
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
916
+
917
+ /** @signal */
918
+ emit<K extends keyof DocumentModel.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<DocumentModel.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
919
+ emit(signal: string, ...args: any[]): void;
920
+
921
+ // Methods
922
+ /**
923
+ * Returns the current editing state.
924
+ */
925
+ get_annotation_editing_state(): AnnotationEditingState;
926
+
927
+ /**
928
+ * Gets the annotation model from the document model.
929
+ * @returns a reference to the {@link PapersView.AnnotationModel}
930
+ */
931
+ get_annotation_model(): AnnotationModel;
932
+
933
+ get_continuous(): boolean;
934
+
935
+ /**
936
+ * Returns the {@link PapersDocument.Document} referenced by the model.
937
+ * @returns a {@link PapersDocument.Document}
938
+ */
939
+ get_document(): PapersDocument.Document;
940
+
941
+ get_dual_page_odd_pages_left(): boolean;
942
+
943
+ get_inverted_colors(): boolean;
944
+
945
+ get_max_scale(): number;
946
+
947
+ get_min_scale(): number;
948
+
949
+ get_page(): number;
950
+
951
+ /**
952
+ * @returns the document model's page layout
953
+ */
954
+ get_page_layout(): PageLayout;
955
+
956
+ get_rotation(): number;
957
+
958
+ get_rtl(): boolean;
959
+
960
+ get_scale(): number;
961
+
962
+ get_sizing_mode(): SizingMode;
963
+
964
+ /**
965
+ * Sets the current editing state. In a {@link View}, This implies that editing
966
+ * widgets for annotations may be shown and annotations not rendered by the
967
+ * backend.
968
+ * @param state The editing state of annotation
969
+ */
970
+ set_annotation_editing_state(state: AnnotationEditingState): void;
971
+
972
+ /**
973
+ * @param continuous
974
+ */
975
+ set_continuous(continuous: boolean): void;
976
+
977
+ /**
978
+ * Set the document.
979
+ * @param document a {@link PapersView.DocumentModel}
980
+ */
981
+ set_document(document: PapersDocument.Document | null): void;
982
+
983
+ /**
984
+ * @param odd_left
985
+ */
986
+ set_dual_page_odd_pages_left(odd_left: boolean): void;
987
+
988
+ /**
989
+ * @param inverted_colors
990
+ */
991
+ set_inverted_colors(inverted_colors: boolean): void;
992
+
993
+ /**
994
+ * @param max_scale
995
+ */
996
+ set_max_scale(max_scale: number): void;
997
+
998
+ /**
999
+ * @param min_scale
1000
+ */
1001
+ set_min_scale(min_scale: number): void;
1002
+
1003
+ /**
1004
+ * @param page
1005
+ */
1006
+ set_page(page: number): void;
1007
+
1008
+ /**
1009
+ * @param page_label
1010
+ */
1011
+ set_page_by_label(page_label: string): void;
1012
+
1013
+ /**
1014
+ * Sets the document model's page layout to `layout`.
1015
+ * @param layout a {@link PapersView.PageLayout}
1016
+ */
1017
+ set_page_layout(layout: PageLayout): void;
1018
+
1019
+ /**
1020
+ * @param rotation
1021
+ */
1022
+ set_rotation(rotation: number): void;
1023
+
1024
+ /**
1025
+ * @param rtl
1026
+ */
1027
+ set_rtl(rtl: boolean): void;
1028
+
1029
+ /**
1030
+ * @param scale
1031
+ */
1032
+ set_scale(scale: number): void;
1033
+
1034
+ /**
1035
+ * @param mode
1036
+ */
1037
+ set_sizing_mode(mode: SizingMode): void;
1038
+ }
1039
+
1040
+
1041
+ namespace History {
1042
+ // Signal signatures
1043
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1044
+ /**
1045
+ * @signal
1046
+ * @action
1047
+ * @run-last
1048
+ */
1049
+ "activate-link": (arg0: GObject.Object) => void;
1050
+ /**
1051
+ * @signal
1052
+ * @action
1053
+ * @run-last
1054
+ */
1055
+ changed: () => void;
1056
+ "notify::document-model": (pspec: GObject.ParamSpec) => void;
1057
+ }
1058
+
1059
+ // Constructor properties interface
1060
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
1061
+ document_model: DocumentModel;
1062
+ documentModel: DocumentModel;
1063
+ }
1064
+ }
1065
+
1066
+ /**
1067
+ * @gir-type Class
1068
+ */
1069
+ class History extends GObject.Object {
1070
+ static $gtype: GObject.GType<History>;
1071
+
1072
+ // Properties
1073
+ /**
1074
+ * @construct-only
1075
+ */
1076
+ set document_model(val: DocumentModel);
1077
+
1078
+ /**
1079
+ * @construct-only
1080
+ */
1081
+ set documentModel(val: DocumentModel);
1082
+
1083
+ /**
1084
+ * Compile-time signal type information.
1085
+ *
1086
+ * This instance property is generated only for TypeScript type checking.
1087
+ * It is not defined at runtime and should not be accessed in JS code.
1088
+ * @internal
1089
+ */
1090
+ $signals: History.SignalSignatures;
1091
+
1092
+ // Constructors
1093
+ constructor(properties?: Partial<History.ConstructorProps>, ...args: any[]);
1094
+
1095
+ _init(...args: any[]): void;
1096
+
1097
+ static ["new"](model: DocumentModel): History;
1098
+
1099
+ // Signals
1100
+ /** @signal */
1101
+ connect<K extends keyof History.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, History.SignalSignatures[K]>): number;
1102
+ connect(signal: string, callback: (...args: any[]) => any): number;
1103
+
1104
+ /** @signal */
1105
+ connect_after<K extends keyof History.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, History.SignalSignatures[K]>): number;
1106
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1107
+
1108
+ /** @signal */
1109
+ emit<K extends keyof History.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<History.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1110
+ emit(signal: string, ...args: any[]): void;
1111
+
1112
+ // Virtual methods
1113
+ /**
1114
+ * @param link
1115
+ * @virtual
1116
+ */
1117
+ vfunc_activate_link(link: PapersDocument.Link): void;
1118
+
1119
+ /**
1120
+ * @virtual
1121
+ */
1122
+ vfunc_changed(): void;
1123
+
1124
+ // Methods
1125
+ /**
1126
+ * @param link
1127
+ */
1128
+ add_link(link: PapersDocument.Link): void;
1129
+
1130
+ /**
1131
+ * @param page
1132
+ */
1133
+ add_page(page: number): void;
1134
+
1135
+ can_go_back(): boolean;
1136
+
1137
+ can_go_forward(): boolean;
1138
+
1139
+ freeze(): void;
1140
+
1141
+ /**
1142
+ * @returns the back history
1143
+ */
1144
+ get_back_list(): PapersDocument.Link[];
1145
+
1146
+ /**
1147
+ * @returns the forward history
1148
+ */
1149
+ get_forward_list(): PapersDocument.Link[];
1150
+
1151
+ go_back(): void;
1152
+
1153
+ go_forward(): void;
1154
+
1155
+ /**
1156
+ * @param link
1157
+ */
1158
+ go_to_link(link: PapersDocument.Link): boolean;
1159
+
1160
+ is_frozen(): boolean;
1161
+
1162
+ thaw(): void;
1163
+ }
1164
+
1165
+
1166
+ namespace Job {
1167
+ // Signal signatures
1168
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
1169
+ /**
1170
+ * @signal
1171
+ * @run-last
1172
+ */
1173
+ cancelled: () => void;
1174
+ /**
1175
+ * @signal
1176
+ * @run-first
1177
+ */
1178
+ finished: () => void;
1179
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1180
+ }
1181
+
1182
+ // Constructor properties interface
1183
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
1184
+ document: PapersDocument.Document;
1185
+ }
1186
+ }
1187
+
1188
+ /**
1189
+ * @gir-type Class
1190
+ */
1191
+ abstract class Job extends GObject.Object {
1192
+ static $gtype: GObject.GType<Job>;
1193
+
1194
+ // Properties
1195
+ /**
1196
+ * @construct-only
1197
+ */
1198
+ set document(val: PapersDocument.Document);
1199
+
1200
+ /**
1201
+ * Compile-time signal type information.
1202
+ *
1203
+ * This instance property is generated only for TypeScript type checking.
1204
+ * It is not defined at runtime and should not be accessed in JS code.
1205
+ * @internal
1206
+ */
1207
+ $signals: Job.SignalSignatures;
1208
+
1209
+ // Constructors
1210
+ constructor(properties?: Partial<Job.ConstructorProps>, ...args: any[]);
1211
+
1212
+ _init(...args: any[]): void;
1213
+
1214
+ // Signals
1215
+ /** @signal */
1216
+ connect<K extends keyof Job.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Job.SignalSignatures[K]>): number;
1217
+ connect(signal: string, callback: (...args: any[]) => any): number;
1218
+
1219
+ /** @signal */
1220
+ connect_after<K extends keyof Job.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Job.SignalSignatures[K]>): number;
1221
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1222
+
1223
+ /** @signal */
1224
+ emit<K extends keyof Job.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Job.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1225
+ emit(signal: string, ...args: any[]): void;
1226
+
1227
+ // Static methods
1228
+ /**
1229
+ * Synchronously waits until all jobs are done.
1230
+ * Remember that main loop is not running already probably.
1231
+ */
1232
+ static scheduler_wait(): void;
1233
+
1234
+ // Virtual methods
1235
+ /**
1236
+ * @virtual
1237
+ */
1238
+ vfunc_cancelled(): void;
1239
+
1240
+ /**
1241
+ * @virtual
1242
+ */
1243
+ vfunc_finished(): void;
1244
+
1245
+ /**
1246
+ * Starts or executes the specified job.
1247
+ * @virtual
1248
+ */
1249
+ vfunc_run(): void;
1250
+
1251
+ // Methods
1252
+ /**
1253
+ * Cancels the specified job if it has not already been cancelled.
1254
+ *
1255
+ * This function updates the job's state to indicate it has been cancelled,
1256
+ * cancels any associated cancellable object, and emits a CANCELLED signal.
1257
+ * It does nothing if the job is already cancelled or finished.
1258
+ *
1259
+ * This function should not be called from a thread.
1260
+ */
1261
+ cancel(): void;
1262
+
1263
+ /**
1264
+ * Marks the specified job as failed and sets the error associated with the failure.
1265
+ *
1266
+ * This function updates the job's state to indicate it has failed, stores the error,
1267
+ * and emits a finished signal. It does nothing if the job is already finished or marked as failed.
1268
+ * @param error A {@link GLib.Error} containing details about the failure.
1269
+ */
1270
+ failed(error: GLib.Error): void;
1271
+
1272
+ /**
1273
+ * Retrieves the {@link Gio.Cancellable} object associated with the specified job.
1274
+ * @returns The {@link Gio.Cancellable} object of the job, or NULL if the job is invalid or does not have an associated cancellable.
1275
+ */
1276
+ get_cancellable(): Gio.Cancellable;
1277
+
1278
+ /**
1279
+ * Retrieves the {@link PapersDocument.Document} associated with the specified job.
1280
+ * @returns The {@link PapersDocument.Document} object associated with the job, or NULL if the job is invalid or does not have an associated document.
1281
+ */
1282
+ get_document(): PapersDocument.Document;
1283
+
1284
+ /**
1285
+ * Checks if the specified job has finished execution.
1286
+ * @returns TRUE if the job is finished, FALSE otherwise.
1287
+ */
1288
+ is_finished(): boolean;
1289
+
1290
+ /**
1291
+ * Determines the finish status of the specified job.
1292
+ * @returns TRUE if the job succeeded, FALSE otherwise.
1293
+ */
1294
+ is_succeeded(): boolean;
1295
+
1296
+ /**
1297
+ * Resets the state of the specified job to its initial state.
1298
+ *
1299
+ * This function clears any error, marks the job as not finished, and sets
1300
+ * the job's failure status to FALSE, effectively resetting its progress.
1301
+ */
1302
+ reset(): void;
1303
+
1304
+ /**
1305
+ * Starts or executes the specified job.
1306
+ */
1307
+ run(): void;
1308
+
1309
+ /**
1310
+ * @param priority
1311
+ */
1312
+ scheduler_push_job(priority: JobPriority): void;
1313
+
1314
+ /**
1315
+ * @param priority
1316
+ */
1317
+ scheduler_update_job(priority: JobPriority): void;
1318
+
1319
+ /**
1320
+ * Marks the specified job as succeeded.
1321
+ *
1322
+ * This function should be called when the job finishes successfully.
1323
+ */
1324
+ succeeded(): void;
1325
+ }
1326
+
1327
+
1328
+ namespace JobAnnots {
1329
+ // Signal signatures
1330
+ interface SignalSignatures extends Job.SignalSignatures {
1331
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1332
+ }
1333
+
1334
+ // Constructor properties interface
1335
+ interface ConstructorProps extends Job.ConstructorProps {}
1336
+ }
1337
+
1338
+ /**
1339
+ * @gir-type Class
1340
+ */
1341
+ class JobAnnots extends Job {
1342
+ static $gtype: GObject.GType<JobAnnots>;
1343
+
1344
+ /**
1345
+ * Compile-time signal type information.
1346
+ *
1347
+ * This instance property is generated only for TypeScript type checking.
1348
+ * It is not defined at runtime and should not be accessed in JS code.
1349
+ * @internal
1350
+ */
1351
+ $signals: JobAnnots.SignalSignatures;
1352
+
1353
+ // Constructors
1354
+ constructor(properties?: Partial<JobAnnots.ConstructorProps>, ...args: any[]);
1355
+
1356
+ _init(...args: any[]): void;
1357
+
1358
+ static ["new"](document: PapersDocument.Document): JobAnnots;
1359
+
1360
+ // Signals
1361
+ /** @signal */
1362
+ connect<K extends keyof JobAnnots.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobAnnots.SignalSignatures[K]>): number;
1363
+ connect(signal: string, callback: (...args: any[]) => any): number;
1364
+
1365
+ /** @signal */
1366
+ connect_after<K extends keyof JobAnnots.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobAnnots.SignalSignatures[K]>): number;
1367
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1368
+
1369
+ /** @signal */
1370
+ emit<K extends keyof JobAnnots.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobAnnots.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1371
+ emit(signal: string, ...args: any[]): void;
1372
+
1373
+ // Methods
1374
+ get_annots(): PapersDocument.Annotation[] | null;
1375
+ }
1376
+
1377
+
1378
+ namespace JobAttachments {
1379
+ // Signal signatures
1380
+ interface SignalSignatures extends Job.SignalSignatures {
1381
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1382
+ }
1383
+
1384
+ // Constructor properties interface
1385
+ interface ConstructorProps extends Job.ConstructorProps {}
1386
+ }
1387
+
1388
+ /**
1389
+ * @gir-type Class
1390
+ */
1391
+ class JobAttachments extends Job {
1392
+ static $gtype: GObject.GType<JobAttachments>;
1393
+
1394
+ /**
1395
+ * Compile-time signal type information.
1396
+ *
1397
+ * This instance property is generated only for TypeScript type checking.
1398
+ * It is not defined at runtime and should not be accessed in JS code.
1399
+ * @internal
1400
+ */
1401
+ $signals: JobAttachments.SignalSignatures;
1402
+
1403
+ // Constructors
1404
+ constructor(properties?: Partial<JobAttachments.ConstructorProps>, ...args: any[]);
1405
+
1406
+ _init(...args: any[]): void;
1407
+
1408
+ static ["new"](document: PapersDocument.Document): JobAttachments;
1409
+
1410
+ // Signals
1411
+ /** @signal */
1412
+ connect<K extends keyof JobAttachments.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobAttachments.SignalSignatures[K]>): number;
1413
+ connect(signal: string, callback: (...args: any[]) => any): number;
1414
+
1415
+ /** @signal */
1416
+ connect_after<K extends keyof JobAttachments.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobAttachments.SignalSignatures[K]>): number;
1417
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1418
+
1419
+ /** @signal */
1420
+ emit<K extends keyof JobAttachments.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobAttachments.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1421
+ emit(signal: string, ...args: any[]): void;
1422
+
1423
+ // Methods
1424
+ /**
1425
+ * @returns a list of {@link PapersDocument.Attachment} objects
1426
+ */
1427
+ get_attachments(): PapersDocument.Attachment[] | null;
1428
+ }
1429
+
1430
+
1431
+ namespace JobExport {
1432
+ // Signal signatures
1433
+ interface SignalSignatures extends Job.SignalSignatures {
1434
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1435
+ }
1436
+
1437
+ // Constructor properties interface
1438
+ interface ConstructorProps extends Job.ConstructorProps {}
1439
+ }
1440
+
1441
+ /**
1442
+ * @gir-type Class
1443
+ */
1444
+ class JobExport extends Job {
1445
+ static $gtype: GObject.GType<JobExport>;
1446
+
1447
+ /**
1448
+ * Compile-time signal type information.
1449
+ *
1450
+ * This instance property is generated only for TypeScript type checking.
1451
+ * It is not defined at runtime and should not be accessed in JS code.
1452
+ * @internal
1453
+ */
1454
+ $signals: JobExport.SignalSignatures;
1455
+
1456
+ // Constructors
1457
+ constructor(properties?: Partial<JobExport.ConstructorProps>, ...args: any[]);
1458
+
1459
+ _init(...args: any[]): void;
1460
+
1461
+ static ["new"](document: PapersDocument.Document): JobExport;
1462
+
1463
+ // Signals
1464
+ /** @signal */
1465
+ connect<K extends keyof JobExport.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobExport.SignalSignatures[K]>): number;
1466
+ connect(signal: string, callback: (...args: any[]) => any): number;
1467
+
1468
+ /** @signal */
1469
+ connect_after<K extends keyof JobExport.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobExport.SignalSignatures[K]>): number;
1470
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1471
+
1472
+ /** @signal */
1473
+ emit<K extends keyof JobExport.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobExport.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1474
+ emit(signal: string, ...args: any[]): void;
1475
+
1476
+ // Methods
1477
+ /**
1478
+ * @param page
1479
+ */
1480
+ set_page(page: number): void;
1481
+ }
1482
+
1483
+
1484
+ namespace JobFind {
1485
+ // Signal signatures
1486
+ interface SignalSignatures extends Job.SignalSignatures {
1487
+ /**
1488
+ * @signal
1489
+ * @run-last
1490
+ */
1491
+ updated: (arg0: number) => void;
1492
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1493
+ }
1494
+
1495
+ // Constructor properties interface
1496
+ interface ConstructorProps extends Job.ConstructorProps {}
1497
+ }
1498
+
1499
+ /**
1500
+ * @gir-type Class
1501
+ */
1502
+ class JobFind extends Job {
1503
+ static $gtype: GObject.GType<JobFind>;
1504
+
1505
+ /**
1506
+ * Compile-time signal type information.
1507
+ *
1508
+ * This instance property is generated only for TypeScript type checking.
1509
+ * It is not defined at runtime and should not be accessed in JS code.
1510
+ * @internal
1511
+ */
1512
+ $signals: JobFind.SignalSignatures;
1513
+
1514
+ // Fields
1515
+ start_page: number;
1516
+
1517
+ n_pages: number;
1518
+
1519
+ pages: null[];
1520
+
1521
+ text: string;
1522
+
1523
+ options: PapersDocument.FindOptions;
1524
+
1525
+ // Constructors
1526
+ constructor(properties?: Partial<JobFind.ConstructorProps>, ...args: any[]);
1527
+
1528
+ _init(...args: any[]): void;
1529
+
1530
+ static ["new"](document: PapersDocument.Document, start_page: number, n_pages: number, text: string, options: PapersDocument.FindOptions): JobFind;
1531
+
1532
+ // Signals
1533
+ /** @signal */
1534
+ connect<K extends keyof JobFind.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobFind.SignalSignatures[K]>): number;
1535
+ connect(signal: string, callback: (...args: any[]) => any): number;
1536
+
1537
+ /** @signal */
1538
+ connect_after<K extends keyof JobFind.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobFind.SignalSignatures[K]>): number;
1539
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1540
+
1541
+ /** @signal */
1542
+ emit<K extends keyof JobFind.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobFind.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1543
+ emit(signal: string, ...args: any[]): void;
1544
+
1545
+ // Virtual methods
1546
+ /**
1547
+ * @param page
1548
+ * @virtual
1549
+ */
1550
+ vfunc_updated(page: number): void;
1551
+
1552
+ // Methods
1553
+ /**
1554
+ * This is similar to `pps_job_find_get_n_results()` but it takes
1555
+ * care to treat any multi-line matches as being only one result.
1556
+ * @param page number of the page we want to count its match results.
1557
+ * @returns total number of match results in `page`
1558
+ */
1559
+ get_n_main_results(page: number): number;
1560
+
1561
+ /**
1562
+ * @returns the job's find options
1563
+ */
1564
+ get_options(): PapersDocument.FindOptions;
1565
+
1566
+ has_results(): boolean;
1567
+ }
1568
+
1569
+
1570
+ namespace JobFonts {
1571
+ // Signal signatures
1572
+ interface SignalSignatures extends Job.SignalSignatures {
1573
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1574
+ }
1575
+
1576
+ // Constructor properties interface
1577
+ interface ConstructorProps extends Job.ConstructorProps {}
1578
+ }
1579
+
1580
+ /**
1581
+ * @gir-type Class
1582
+ */
1583
+ class JobFonts extends Job {
1584
+ static $gtype: GObject.GType<JobFonts>;
1585
+
1586
+ /**
1587
+ * Compile-time signal type information.
1588
+ *
1589
+ * This instance property is generated only for TypeScript type checking.
1590
+ * It is not defined at runtime and should not be accessed in JS code.
1591
+ * @internal
1592
+ */
1593
+ $signals: JobFonts.SignalSignatures;
1594
+
1595
+ // Constructors
1596
+ constructor(properties?: Partial<JobFonts.ConstructorProps>, ...args: any[]);
1597
+
1598
+ _init(...args: any[]): void;
1599
+
1600
+ static ["new"](document: PapersDocument.Document): JobFonts;
1601
+
1602
+ // Signals
1603
+ /** @signal */
1604
+ connect<K extends keyof JobFonts.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobFonts.SignalSignatures[K]>): number;
1605
+ connect(signal: string, callback: (...args: any[]) => any): number;
1606
+
1607
+ /** @signal */
1608
+ connect_after<K extends keyof JobFonts.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobFonts.SignalSignatures[K]>): number;
1609
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1610
+
1611
+ /** @signal */
1612
+ emit<K extends keyof JobFonts.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobFonts.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1613
+ emit(signal: string, ...args: any[]): void;
1614
+ }
1615
+
1616
+
1617
+ namespace JobLayers {
1618
+ // Signal signatures
1619
+ interface SignalSignatures extends Job.SignalSignatures {
1620
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1621
+ }
1622
+
1623
+ // Constructor properties interface
1624
+ interface ConstructorProps extends Job.ConstructorProps {}
1625
+ }
1626
+
1627
+ /**
1628
+ * @gir-type Class
1629
+ */
1630
+ class JobLayers extends Job {
1631
+ static $gtype: GObject.GType<JobLayers>;
1632
+
1633
+ /**
1634
+ * Compile-time signal type information.
1635
+ *
1636
+ * This instance property is generated only for TypeScript type checking.
1637
+ * It is not defined at runtime and should not be accessed in JS code.
1638
+ * @internal
1639
+ */
1640
+ $signals: JobLayers.SignalSignatures;
1641
+
1642
+ // Constructors
1643
+ constructor(properties?: Partial<JobLayers.ConstructorProps>, ...args: any[]);
1644
+
1645
+ _init(...args: any[]): void;
1646
+
1647
+ static ["new"](document: PapersDocument.Document): JobLayers;
1648
+
1649
+ // Signals
1650
+ /** @signal */
1651
+ connect<K extends keyof JobLayers.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobLayers.SignalSignatures[K]>): number;
1652
+ connect(signal: string, callback: (...args: any[]) => any): number;
1653
+
1654
+ /** @signal */
1655
+ connect_after<K extends keyof JobLayers.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobLayers.SignalSignatures[K]>): number;
1656
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1657
+
1658
+ /** @signal */
1659
+ emit<K extends keyof JobLayers.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobLayers.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1660
+ emit(signal: string, ...args: any[]): void;
1661
+
1662
+ // Methods
1663
+ /**
1664
+ * @returns A {@link Gio.ListModel} contains the result
1665
+ */
1666
+ get_model(): Gio.ListModel;
1667
+ }
1668
+
1669
+
1670
+ namespace JobLinks {
1671
+ // Signal signatures
1672
+ interface SignalSignatures extends Job.SignalSignatures {
1673
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1674
+ }
1675
+
1676
+ // Constructor properties interface
1677
+ interface ConstructorProps extends Job.ConstructorProps {}
1678
+ }
1679
+
1680
+ /**
1681
+ * @gir-type Class
1682
+ */
1683
+ class JobLinks extends Job {
1684
+ static $gtype: GObject.GType<JobLinks>;
1685
+
1686
+ /**
1687
+ * Compile-time signal type information.
1688
+ *
1689
+ * This instance property is generated only for TypeScript type checking.
1690
+ * It is not defined at runtime and should not be accessed in JS code.
1691
+ * @internal
1692
+ */
1693
+ $signals: JobLinks.SignalSignatures;
1694
+
1695
+ // Constructors
1696
+ constructor(properties?: Partial<JobLinks.ConstructorProps>, ...args: any[]);
1697
+
1698
+ _init(...args: any[]): void;
1699
+
1700
+ static ["new"](document: PapersDocument.Document): JobLinks;
1701
+
1702
+ // Signals
1703
+ /** @signal */
1704
+ connect<K extends keyof JobLinks.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobLinks.SignalSignatures[K]>): number;
1705
+ connect(signal: string, callback: (...args: any[]) => any): number;
1706
+
1707
+ /** @signal */
1708
+ connect_after<K extends keyof JobLinks.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobLinks.SignalSignatures[K]>): number;
1709
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1710
+
1711
+ /** @signal */
1712
+ emit<K extends keyof JobLinks.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobLinks.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1713
+ emit(signal: string, ...args: any[]): void;
1714
+
1715
+ // Methods
1716
+ /**
1717
+ * Get a {@link Gio.ListModel} loaded with the links
1718
+ * @returns a {@link Gio.ListModel} of {@link PapersDocument.Outlines} objects
1719
+ */
1720
+ get_model(): Gio.ListModel | null;
1721
+ }
1722
+
1723
+
1724
+ namespace JobLoad {
1725
+ // Signal signatures
1726
+ interface SignalSignatures extends Job.SignalSignatures {
1727
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1728
+ }
1729
+
1730
+ // Constructor properties interface
1731
+ interface ConstructorProps extends Job.ConstructorProps {}
1732
+ }
1733
+
1734
+ /**
1735
+ * A job class to load an {@link PapersDocument.Document}
1736
+ *
1737
+ * Supports loading in different forms depending on the options
1738
+ * being set.
1739
+ * @gir-type Class
1740
+ */
1741
+ class JobLoad extends Job {
1742
+ static $gtype: GObject.GType<JobLoad>;
1743
+
1744
+ /**
1745
+ * Compile-time signal type information.
1746
+ *
1747
+ * This instance property is generated only for TypeScript type checking.
1748
+ * It is not defined at runtime and should not be accessed in JS code.
1749
+ * @internal
1750
+ */
1751
+ $signals: JobLoad.SignalSignatures;
1752
+
1753
+ // Constructors
1754
+ constructor(properties?: Partial<JobLoad.ConstructorProps>, ...args: any[]);
1755
+
1756
+ _init(...args: any[]): void;
1757
+
1758
+ static ["new"](): JobLoad;
1759
+
1760
+ // Signals
1761
+ /** @signal */
1762
+ connect<K extends keyof JobLoad.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobLoad.SignalSignatures[K]>): number;
1763
+ connect(signal: string, callback: (...args: any[]) => any): number;
1764
+
1765
+ /** @signal */
1766
+ connect_after<K extends keyof JobLoad.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobLoad.SignalSignatures[K]>): number;
1767
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1768
+
1769
+ /** @signal */
1770
+ emit<K extends keyof JobLoad.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobLoad.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1771
+ emit(signal: string, ...args: any[]): void;
1772
+
1773
+ // Methods
1774
+ /**
1775
+ * @returns The loaded document, if available
1776
+ */
1777
+ get_loaded_document(): PapersDocument.Document | null;
1778
+
1779
+ get_password(): string;
1780
+
1781
+ get_password_save(): Gio.PasswordSave;
1782
+
1783
+ /**
1784
+ * Sets `fd` as the file descriptor in `job`. If duplicating `fd` fails,
1785
+ * returns `false` with `error` filled in.
1786
+ *
1787
+ * It is an error to call this function if uri is set for the job
1788
+ * @param fd a file descriptor
1789
+ * @param mime_type the mime type of the file descriptor
1790
+ * @returns `true` if the file descriptor could be set
1791
+ */
1792
+ set_fd(fd: number, mime_type: string): boolean;
1793
+
1794
+ /**
1795
+ * @param password the password
1796
+ */
1797
+ set_password(password: string | null): void;
1798
+
1799
+ /**
1800
+ * @param save
1801
+ */
1802
+ set_password_save(save: Gio.PasswordSave): void;
1803
+
1804
+ /**
1805
+ * It is an error to call this function if the file descriptor
1806
+ * is set for the job.
1807
+ * @param uri an uri representing a file
1808
+ */
1809
+ set_uri(uri: string): void;
1810
+
1811
+ /**
1812
+ * Sets `fd` as the file descriptor in `job`.
1813
+ * Note that `job` takes ownership of `fd`; you must not do anything
1814
+ * with it afterwards.
1815
+ *
1816
+ * It is an error to call this function if uri is set for the job
1817
+ * @param fd a file descriptor
1818
+ * @param mime_type the mime type of the file descriptor
1819
+ */
1820
+ take_fd(fd: number, mime_type: string): void;
1821
+ }
1822
+
1823
+
1824
+ namespace JobPageData {
1825
+ // Signal signatures
1826
+ interface SignalSignatures extends Job.SignalSignatures {
1827
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1828
+ }
1829
+
1830
+ // Constructor properties interface
1831
+ interface ConstructorProps extends Job.ConstructorProps {}
1832
+ }
1833
+
1834
+ /**
1835
+ * @gir-type Class
1836
+ */
1837
+ class JobPageData extends Job {
1838
+ static $gtype: GObject.GType<JobPageData>;
1839
+
1840
+ /**
1841
+ * Compile-time signal type information.
1842
+ *
1843
+ * This instance property is generated only for TypeScript type checking.
1844
+ * It is not defined at runtime and should not be accessed in JS code.
1845
+ * @internal
1846
+ */
1847
+ $signals: JobPageData.SignalSignatures;
1848
+
1849
+ // Fields
1850
+ page: number;
1851
+
1852
+ flags: JobPageDataFlags;
1853
+
1854
+ text: string;
1855
+
1856
+ text_layout: PapersDocument.Rectangle;
1857
+
1858
+ text_layout_length: number;
1859
+
1860
+ text_log_attrs: Pango.LogAttr;
1861
+
1862
+ text_log_attrs_length: number;
1863
+
1864
+ // Constructors
1865
+ constructor(properties?: Partial<JobPageData.ConstructorProps>, ...args: any[]);
1866
+
1867
+ _init(...args: any[]): void;
1868
+
1869
+ static ["new"](document: PapersDocument.Document, page: number, flags: JobPageDataFlags): JobPageData;
1870
+
1871
+ // Signals
1872
+ /** @signal */
1873
+ connect<K extends keyof JobPageData.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobPageData.SignalSignatures[K]>): number;
1874
+ connect(signal: string, callback: (...args: any[]) => any): number;
1875
+
1876
+ /** @signal */
1877
+ connect_after<K extends keyof JobPageData.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobPageData.SignalSignatures[K]>): number;
1878
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1879
+
1880
+ /** @signal */
1881
+ emit<K extends keyof JobPageData.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobPageData.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1882
+ emit(signal: string, ...args: any[]): void;
1883
+ }
1884
+
1885
+
1886
+ namespace JobPrint {
1887
+ // Signal signatures
1888
+ interface SignalSignatures extends Job.SignalSignatures {
1889
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1890
+ }
1891
+
1892
+ // Constructor properties interface
1893
+ interface ConstructorProps extends Job.ConstructorProps {}
1894
+ }
1895
+
1896
+ /**
1897
+ * @gir-type Class
1898
+ */
1899
+ class JobPrint extends Job {
1900
+ static $gtype: GObject.GType<JobPrint>;
1901
+
1902
+ /**
1903
+ * Compile-time signal type information.
1904
+ *
1905
+ * This instance property is generated only for TypeScript type checking.
1906
+ * It is not defined at runtime and should not be accessed in JS code.
1907
+ * @internal
1908
+ */
1909
+ $signals: JobPrint.SignalSignatures;
1910
+
1911
+ // Constructors
1912
+ constructor(properties?: Partial<JobPrint.ConstructorProps>, ...args: any[]);
1913
+
1914
+ _init(...args: any[]): void;
1915
+
1916
+ static ["new"](document: PapersDocument.Document): JobPrint;
1917
+
1918
+ // Signals
1919
+ /** @signal */
1920
+ connect<K extends keyof JobPrint.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobPrint.SignalSignatures[K]>): number;
1921
+ connect(signal: string, callback: (...args: any[]) => any): number;
1922
+
1923
+ /** @signal */
1924
+ connect_after<K extends keyof JobPrint.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobPrint.SignalSignatures[K]>): number;
1925
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1926
+
1927
+ /** @signal */
1928
+ emit<K extends keyof JobPrint.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobPrint.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
1929
+ emit(signal: string, ...args: any[]): void;
1930
+
1931
+ // Methods
1932
+ /**
1933
+ * @param cr
1934
+ */
1935
+ set_cairo(cr: cairo.Context): void;
1936
+
1937
+ /**
1938
+ * @param page
1939
+ */
1940
+ set_page(page: number): void;
1941
+ }
1942
+
1943
+
1944
+ namespace JobRenderTexture {
1945
+ // Signal signatures
1946
+ interface SignalSignatures extends Job.SignalSignatures {
1947
+ "notify::document": (pspec: GObject.ParamSpec) => void;
1948
+ }
1949
+
1950
+ // Constructor properties interface
1951
+ interface ConstructorProps extends Job.ConstructorProps {}
1952
+ }
1953
+
1954
+ /**
1955
+ * @gir-type Class
1956
+ */
1957
+ class JobRenderTexture extends Job {
1958
+ static $gtype: GObject.GType<JobRenderTexture>;
1959
+
1960
+ /**
1961
+ * Compile-time signal type information.
1962
+ *
1963
+ * This instance property is generated only for TypeScript type checking.
1964
+ * It is not defined at runtime and should not be accessed in JS code.
1965
+ * @internal
1966
+ */
1967
+ $signals: JobRenderTexture.SignalSignatures;
1968
+
1969
+ // Fields
1970
+ page: number;
1971
+
1972
+ rotation: number;
1973
+
1974
+ scale: number;
1975
+
1976
+ page_ready: boolean;
1977
+
1978
+ target_width: number;
1979
+
1980
+ target_height: number;
1981
+
1982
+ texture: Gdk.Texture;
1983
+
1984
+ include_selection: boolean;
1985
+
1986
+ selection: Gdk.Texture;
1987
+
1988
+ selection_points: PapersDocument.Rectangle;
1989
+
1990
+ selection_style: PapersDocument.SelectionStyle;
1991
+
1992
+ base: Gdk.RGBA;
1993
+
1994
+ text: Gdk.RGBA;
1995
+
1996
+ annot_flags: PapersDocument.RenderAnnotsFlags;
1997
+
1998
+ // Constructors
1999
+ constructor(properties?: Partial<JobRenderTexture.ConstructorProps>, ...args: any[]);
2000
+
2001
+ _init(...args: any[]): void;
2002
+
2003
+ static ["new"](document: PapersDocument.Document, page: number, rotation: number, scale: number, width: number, height: number, annot_flags: PapersDocument.RenderAnnotsFlags): JobRenderTexture;
2004
+
2005
+ // Signals
2006
+ /** @signal */
2007
+ connect<K extends keyof JobRenderTexture.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobRenderTexture.SignalSignatures[K]>): number;
2008
+ connect(signal: string, callback: (...args: any[]) => any): number;
2009
+
2010
+ /** @signal */
2011
+ connect_after<K extends keyof JobRenderTexture.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobRenderTexture.SignalSignatures[K]>): number;
2012
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2013
+
2014
+ /** @signal */
2015
+ emit<K extends keyof JobRenderTexture.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobRenderTexture.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2016
+ emit(signal: string, ...args: any[]): void;
2017
+
2018
+ // Methods
2019
+ /**
2020
+ * @param selection_points
2021
+ * @param selection_style
2022
+ * @param text
2023
+ * @param base
2024
+ */
2025
+ set_selection_info(selection_points: PapersDocument.Rectangle, selection_style: PapersDocument.SelectionStyle, text: Gdk.RGBA, base: Gdk.RGBA): void;
2026
+ }
2027
+
2028
+
2029
+ namespace JobSave {
2030
+ // Signal signatures
2031
+ interface SignalSignatures extends Job.SignalSignatures {
2032
+ "notify::document": (pspec: GObject.ParamSpec) => void;
2033
+ }
2034
+
2035
+ // Constructor properties interface
2036
+ interface ConstructorProps extends Job.ConstructorProps {}
2037
+ }
2038
+
2039
+ /**
2040
+ * @gir-type Class
2041
+ */
2042
+ class JobSave extends Job {
2043
+ static $gtype: GObject.GType<JobSave>;
2044
+
2045
+ /**
2046
+ * Compile-time signal type information.
2047
+ *
2048
+ * This instance property is generated only for TypeScript type checking.
2049
+ * It is not defined at runtime and should not be accessed in JS code.
2050
+ * @internal
2051
+ */
2052
+ $signals: JobSave.SignalSignatures;
2053
+
2054
+ // Constructors
2055
+ constructor(properties?: Partial<JobSave.ConstructorProps>, ...args: any[]);
2056
+
2057
+ _init(...args: any[]): void;
2058
+
2059
+ static ["new"](document: PapersDocument.Document, uri: string, document_uri: string): JobSave;
2060
+
2061
+ // Signals
2062
+ /** @signal */
2063
+ connect<K extends keyof JobSave.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobSave.SignalSignatures[K]>): number;
2064
+ connect(signal: string, callback: (...args: any[]) => any): number;
2065
+
2066
+ /** @signal */
2067
+ connect_after<K extends keyof JobSave.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobSave.SignalSignatures[K]>): number;
2068
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2069
+
2070
+ /** @signal */
2071
+ emit<K extends keyof JobSave.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobSave.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2072
+ emit(signal: string, ...args: any[]): void;
2073
+
2074
+ // Methods
2075
+ get_uri(): string;
2076
+ }
2077
+
2078
+
2079
+ namespace JobSignatures {
2080
+ // Signal signatures
2081
+ interface SignalSignatures extends Job.SignalSignatures {
2082
+ "notify::document": (pspec: GObject.ParamSpec) => void;
2083
+ }
2084
+
2085
+ // Constructor properties interface
2086
+ interface ConstructorProps extends Job.ConstructorProps {}
2087
+ }
2088
+
2089
+ /**
2090
+ * @gir-type Class
2091
+ */
2092
+ class JobSignatures extends Job {
2093
+ static $gtype: GObject.GType<JobSignatures>;
2094
+
2095
+ /**
2096
+ * Compile-time signal type information.
2097
+ *
2098
+ * This instance property is generated only for TypeScript type checking.
2099
+ * It is not defined at runtime and should not be accessed in JS code.
2100
+ * @internal
2101
+ */
2102
+ $signals: JobSignatures.SignalSignatures;
2103
+
2104
+ // Constructors
2105
+ constructor(properties?: Partial<JobSignatures.ConstructorProps>, ...args: any[]);
2106
+
2107
+ _init(...args: any[]): void;
2108
+
2109
+ static ["new"](document: PapersDocument.Document): JobSignatures;
2110
+
2111
+ // Signals
2112
+ /** @signal */
2113
+ connect<K extends keyof JobSignatures.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobSignatures.SignalSignatures[K]>): number;
2114
+ connect(signal: string, callback: (...args: any[]) => any): number;
2115
+
2116
+ /** @signal */
2117
+ connect_after<K extends keyof JobSignatures.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobSignatures.SignalSignatures[K]>): number;
2118
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2119
+
2120
+ /** @signal */
2121
+ emit<K extends keyof JobSignatures.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobSignatures.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2122
+ emit(signal: string, ...args: any[]): void;
2123
+
2124
+ // Methods
2125
+ /**
2126
+ * Get all available signatures
2127
+ * @returns all available signatures
2128
+ */
2129
+ get_signatures(): PapersDocument.Signature[];
2130
+ }
2131
+
2132
+
2133
+ namespace JobThumbnailTexture {
2134
+ // Signal signatures
2135
+ interface SignalSignatures extends Job.SignalSignatures {
2136
+ "notify::document": (pspec: GObject.ParamSpec) => void;
2137
+ }
2138
+
2139
+ // Constructor properties interface
2140
+ interface ConstructorProps extends Job.ConstructorProps {}
2141
+ }
2142
+
2143
+ /**
2144
+ * @gir-type Class
2145
+ */
2146
+ class JobThumbnailTexture extends Job {
2147
+ static $gtype: GObject.GType<JobThumbnailTexture>;
2148
+
2149
+ /**
2150
+ * Compile-time signal type information.
2151
+ *
2152
+ * This instance property is generated only for TypeScript type checking.
2153
+ * It is not defined at runtime and should not be accessed in JS code.
2154
+ * @internal
2155
+ */
2156
+ $signals: JobThumbnailTexture.SignalSignatures;
2157
+
2158
+ // Constructors
2159
+ constructor(properties?: Partial<JobThumbnailTexture.ConstructorProps>, ...args: any[]);
2160
+
2161
+ _init(...args: any[]): void;
2162
+
2163
+ static ["new"](document: PapersDocument.Document, page: number, rotation: number, scale: number): JobThumbnailTexture;
2164
+
2165
+ static new_with_target_size(document: PapersDocument.Document, page: number, rotation: number, target_width: number, target_height: number): JobThumbnailTexture;
2166
+
2167
+ // Signals
2168
+ /** @signal */
2169
+ connect<K extends keyof JobThumbnailTexture.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobThumbnailTexture.SignalSignatures[K]>): number;
2170
+ connect(signal: string, callback: (...args: any[]) => any): number;
2171
+
2172
+ /** @signal */
2173
+ connect_after<K extends keyof JobThumbnailTexture.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, JobThumbnailTexture.SignalSignatures[K]>): number;
2174
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2175
+
2176
+ /** @signal */
2177
+ emit<K extends keyof JobThumbnailTexture.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<JobThumbnailTexture.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2178
+ emit(signal: string, ...args: any[]): void;
2179
+
2180
+ // Methods
2181
+ /**
2182
+ * This is similar to `pps_job_find_get_n_results()` but it takes
2183
+ * care to treat any multi-line matches as being only one result.
2184
+ * @returns total number of match results in `page`
2185
+ */
2186
+ get_texture(): Gdk.Texture | null;
2187
+ }
2188
+
2189
+
2190
+ namespace Metadata {
2191
+ // Signal signatures
2192
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
2193
+
2194
+ // Constructor properties interface
2195
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
2196
+ }
2197
+
2198
+ /**
2199
+ * @gir-type Class
2200
+ */
2201
+ class Metadata extends GObject.Object {
2202
+ static $gtype: GObject.GType<Metadata>;
2203
+
2204
+ /**
2205
+ * Compile-time signal type information.
2206
+ *
2207
+ * This instance property is generated only for TypeScript type checking.
2208
+ * It is not defined at runtime and should not be accessed in JS code.
2209
+ * @internal
2210
+ */
2211
+ $signals: Metadata.SignalSignatures;
2212
+
2213
+ // Constructors
2214
+ constructor(properties?: Partial<Metadata.ConstructorProps>, ...args: any[]);
2215
+
2216
+ _init(...args: any[]): void;
2217
+
2218
+ static ["new"](file: Gio.File): Metadata;
2219
+
2220
+ // Signals
2221
+ /** @signal */
2222
+ connect<K extends keyof Metadata.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Metadata.SignalSignatures[K]>): number;
2223
+ connect(signal: string, callback: (...args: any[]) => any): number;
2224
+
2225
+ /** @signal */
2226
+ connect_after<K extends keyof Metadata.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, Metadata.SignalSignatures[K]>): number;
2227
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2228
+
2229
+ /** @signal */
2230
+ emit<K extends keyof Metadata.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<Metadata.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2231
+ emit(signal: string, ...args: any[]): void;
2232
+
2233
+ // Static methods
2234
+ /**
2235
+ * @param file
2236
+ */
2237
+ static is_file_supported(file: Gio.File): boolean;
2238
+
2239
+ // Methods
2240
+ /**
2241
+ * @param key The keyword of the metadata
2242
+ * @returns `true` on success, or `false` on failure.
2243
+ */
2244
+ get_boolean(key: string): [boolean, boolean];
2245
+
2246
+ /**
2247
+ * @param key The keyword of the metadata
2248
+ * @returns `true` on success, or `false` on failure.
2249
+ */
2250
+ get_double(key: string): [boolean, number];
2251
+
2252
+ /**
2253
+ * @param key The keyword of the metadata
2254
+ * @returns `true` on success, or `false` on failure.
2255
+ */
2256
+ get_int(key: string): [boolean, number];
2257
+
2258
+ /**
2259
+ * @param key The keyword of the metadata
2260
+ * @returns `true` on success, or `false` on failure.
2261
+ */
2262
+ get_string(key: string): [boolean, string];
2263
+
2264
+ /**
2265
+ * @param key
2266
+ */
2267
+ has_key(key: string): boolean;
2268
+
2269
+ is_empty(): boolean;
2270
+
2271
+ /**
2272
+ * @param key
2273
+ * @param value
2274
+ */
2275
+ set_boolean(key: string, value: boolean): boolean;
2276
+
2277
+ /**
2278
+ * @param key
2279
+ * @param value
2280
+ */
2281
+ set_double(key: string, value: number): boolean;
2282
+
2283
+ /**
2284
+ * @param key
2285
+ * @param value
2286
+ */
2287
+ set_int(key: string, value: number): boolean;
2288
+
2289
+ /**
2290
+ * @param key
2291
+ * @param value
2292
+ */
2293
+ set_string(key: string, value: string): boolean;
2294
+ }
2295
+
2296
+
2297
+ namespace PrintOperation {
2298
+ // Signal signatures
2299
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
2300
+ /**
2301
+ * @signal
2302
+ * @run-last
2303
+ */
2304
+ "begin-print": () => void;
2305
+ /**
2306
+ * @signal
2307
+ * @run-last
2308
+ */
2309
+ done: (arg0: Gtk.PrintOperationResult) => void;
2310
+ /**
2311
+ * @signal
2312
+ * @run-last
2313
+ */
2314
+ "status-changed": () => void;
2315
+ "notify::document": (pspec: GObject.ParamSpec) => void;
2316
+ }
2317
+
2318
+ // Constructor properties interface
2319
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
2320
+ document: PapersDocument.Document;
2321
+ }
2322
+ }
2323
+
2324
+ /**
2325
+ * @gir-type Class
2326
+ */
2327
+ abstract class PrintOperation extends GObject.Object {
2328
+ static $gtype: GObject.GType<PrintOperation>;
2329
+
2330
+ // Properties
2331
+ /**
2332
+ * @construct-only
2333
+ */
2334
+ set document(val: PapersDocument.Document);
2335
+
2336
+ /**
2337
+ * Compile-time signal type information.
2338
+ *
2339
+ * This instance property is generated only for TypeScript type checking.
2340
+ * It is not defined at runtime and should not be accessed in JS code.
2341
+ * @internal
2342
+ */
2343
+ $signals: PrintOperation.SignalSignatures;
2344
+
2345
+ // Constructors
2346
+ constructor(properties?: Partial<PrintOperation.ConstructorProps>, ...args: any[]);
2347
+
2348
+ _init(...args: any[]): void;
2349
+
2350
+ static ["new"](document: PapersDocument.Document): PrintOperation;
2351
+
2352
+ // Signals
2353
+ /** @signal */
2354
+ connect<K extends keyof PrintOperation.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, PrintOperation.SignalSignatures[K]>): number;
2355
+ connect(signal: string, callback: (...args: any[]) => any): number;
2356
+
2357
+ /** @signal */
2358
+ connect_after<K extends keyof PrintOperation.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, PrintOperation.SignalSignatures[K]>): number;
2359
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2360
+
2361
+ /** @signal */
2362
+ emit<K extends keyof PrintOperation.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<PrintOperation.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2363
+ emit(signal: string, ...args: any[]): void;
2364
+
2365
+ // Static methods
2366
+ /**
2367
+ * @param document
2368
+ */
2369
+ static exists_for_document(document: PapersDocument.Document): boolean;
2370
+
2371
+ // Methods
2372
+ cancel(): void;
2373
+
2374
+ /**
2375
+ * @returns a {@link Gtk.PageSetup}
2376
+ */
2377
+ get_default_page_setup(): Gtk.PageSetup;
2378
+
2379
+ get_embed_page_setup(): boolean;
2380
+
2381
+ get_error(): void;
2382
+
2383
+ get_job_name(): string;
2384
+
2385
+ /**
2386
+ * @returns a {@link Gtk.PrintSettings}
2387
+ */
2388
+ get_print_settings(): Gtk.PrintSettings;
2389
+
2390
+ get_progress(): number;
2391
+
2392
+ get_status(): string;
2393
+
2394
+ /**
2395
+ * @param parent
2396
+ */
2397
+ run(parent: Gtk.Window): void;
2398
+
2399
+ /**
2400
+ * @param current_page
2401
+ */
2402
+ set_current_page(current_page: number): void;
2403
+
2404
+ /**
2405
+ * @param page_setup
2406
+ */
2407
+ set_default_page_setup(page_setup: Gtk.PageSetup): void;
2408
+
2409
+ /**
2410
+ * @param embed
2411
+ */
2412
+ set_embed_page_setup(embed: boolean): void;
2413
+
2414
+ /**
2415
+ * @param job_name
2416
+ */
2417
+ set_job_name(job_name: string): void;
2418
+
2419
+ /**
2420
+ * @param print_settings
2421
+ */
2422
+ set_print_settings(print_settings: Gtk.PrintSettings): void;
2423
+ }
2424
+
2425
+
2426
+ namespace SearchContext {
2427
+ // Signal signatures
2428
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
2429
+ /**
2430
+ * @signal
2431
+ * @run-last
2432
+ */
2433
+ cleared: () => void;
2434
+ /**
2435
+ * @signal
2436
+ * @run-last
2437
+ */
2438
+ finished: (arg0: number) => void;
2439
+ /**
2440
+ * @signal
2441
+ * @run-last
2442
+ */
2443
+ "result-activated": (arg0: SearchResult) => void;
2444
+ /**
2445
+ * @signal
2446
+ * @run-last
2447
+ */
2448
+ started: () => void;
2449
+ "notify::active": (pspec: GObject.ParamSpec) => void;
2450
+ "notify::document-model": (pspec: GObject.ParamSpec) => void;
2451
+ "notify::search-term": (pspec: GObject.ParamSpec) => void;
2452
+ }
2453
+
2454
+ // Constructor properties interface
2455
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
2456
+ active: boolean;
2457
+ document_model: DocumentModel;
2458
+ documentModel: DocumentModel;
2459
+ search_term: string;
2460
+ searchTerm: string;
2461
+ }
2462
+ }
2463
+
2464
+ /**
2465
+ * @gir-type Class
2466
+ */
2467
+ class SearchContext extends GObject.Object {
2468
+ static $gtype: GObject.GType<SearchContext>;
2469
+
2470
+ // Properties
2471
+ /**
2472
+ * @read-only
2473
+ * @default false
2474
+ */
2475
+ get active(): boolean;
2476
+
2477
+ /**
2478
+ * @construct-only
2479
+ */
2480
+ set document_model(val: DocumentModel);
2481
+
2482
+ /**
2483
+ * @construct-only
2484
+ */
2485
+ set documentModel(val: DocumentModel);
2486
+
2487
+ get search_term(): string;
2488
+ set search_term(val: string);
2489
+
2490
+ get searchTerm(): string;
2491
+ set searchTerm(val: string);
2492
+
2493
+ /**
2494
+ * Compile-time signal type information.
2495
+ *
2496
+ * This instance property is generated only for TypeScript type checking.
2497
+ * It is not defined at runtime and should not be accessed in JS code.
2498
+ * @internal
2499
+ */
2500
+ $signals: SearchContext.SignalSignatures;
2501
+
2502
+ // Constructors
2503
+ constructor(properties?: Partial<SearchContext.ConstructorProps>, ...args: any[]);
2504
+
2505
+ _init(...args: any[]): void;
2506
+
2507
+ static ["new"](model: DocumentModel): SearchContext;
2508
+
2509
+ // Signals
2510
+ /** @signal */
2511
+ connect<K extends keyof SearchContext.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, SearchContext.SignalSignatures[K]>): number;
2512
+ connect(signal: string, callback: (...args: any[]) => any): number;
2513
+
2514
+ /** @signal */
2515
+ connect_after<K extends keyof SearchContext.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, SearchContext.SignalSignatures[K]>): number;
2516
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2517
+
2518
+ /** @signal */
2519
+ emit<K extends keyof SearchContext.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<SearchContext.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2520
+ emit(signal: string, ...args: any[]): void;
2521
+
2522
+ // Methods
2523
+ activate(): void;
2524
+
2525
+ /**
2526
+ * @param result a {@link PapersView.SearchResult} to be the auto-selected one
2527
+ */
2528
+ autoselect_result(result: SearchResult): void;
2529
+
2530
+ /**
2531
+ * @returns whether search is actively ongoing
2532
+ */
2533
+ get_active(): boolean;
2534
+
2535
+ get_options(): PapersDocument.FindOptions;
2536
+
2537
+ /**
2538
+ * @returns the returned {@link Gtk.SingleSelection}
2539
+ */
2540
+ get_result_model(): Gtk.SingleSelection;
2541
+
2542
+ /**
2543
+ * @param page
2544
+ * @returns {@link GLib.PtrArray} of {@link PapersView.SearchResult} on the current page
2545
+ */
2546
+ get_results_on_page(page: number): SearchResult[];
2547
+
2548
+ get_search_term(): string;
2549
+
2550
+ /**
2551
+ * @param page
2552
+ */
2553
+ has_results_on_page(page: number): boolean;
2554
+
2555
+ release(): void;
2556
+
2557
+ restart(): void;
2558
+
2559
+ /**
2560
+ * @param options
2561
+ */
2562
+ set_options(options: PapersDocument.FindOptions): void;
2563
+
2564
+ /**
2565
+ * @param search_term
2566
+ */
2567
+ set_search_term(search_term: string): void;
2568
+ }
2569
+
2570
+
2571
+ namespace SearchResult {
2572
+ // Signal signatures
2573
+ interface SignalSignatures extends GObject.Object.SignalSignatures {}
2574
+
2575
+ // Constructor properties interface
2576
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
2577
+ }
2578
+
2579
+ /**
2580
+ * @gir-type Class
2581
+ */
2582
+ class SearchResult extends GObject.Object {
2583
+ static $gtype: GObject.GType<SearchResult>;
2584
+
2585
+ /**
2586
+ * Compile-time signal type information.
2587
+ *
2588
+ * This instance property is generated only for TypeScript type checking.
2589
+ * It is not defined at runtime and should not be accessed in JS code.
2590
+ * @internal
2591
+ */
2592
+ $signals: SearchResult.SignalSignatures;
2593
+
2594
+ // Constructors
2595
+ constructor(properties?: Partial<SearchResult.ConstructorProps>, ...args: any[]);
2596
+
2597
+ _init(...args: any[]): void;
2598
+
2599
+ static ["new"](markup: string, label: string, page: number, index: number, global_index: number, rect: PapersDocument.FindRectangle): SearchResult;
2600
+
2601
+ // Signals
2602
+ /** @signal */
2603
+ connect<K extends keyof SearchResult.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, SearchResult.SignalSignatures[K]>): number;
2604
+ connect(signal: string, callback: (...args: any[]) => any): number;
2605
+
2606
+ /** @signal */
2607
+ connect_after<K extends keyof SearchResult.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, SearchResult.SignalSignatures[K]>): number;
2608
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2609
+
2610
+ /** @signal */
2611
+ emit<K extends keyof SearchResult.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<SearchResult.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2612
+ emit(signal: string, ...args: any[]): void;
2613
+
2614
+ // Methods
2615
+ /**
2616
+ * Appends a rectangle to the search result. This should not be used outside the
2617
+ * creation of the search result.
2618
+ * @param rect the {@link PapersDocument.FindRectangle} to append
2619
+ */
2620
+ append_rectangle(rect: PapersDocument.FindRectangle): void;
2621
+
2622
+ /**
2623
+ * @returns the index of this result relative the complete result model.
2624
+ */
2625
+ get_global_index(): number;
2626
+
2627
+ get_index(): number;
2628
+
2629
+ get_label(): string;
2630
+
2631
+ get_markup(): string;
2632
+
2633
+ get_page(): number;
2634
+
2635
+ /**
2636
+ * @returns the list of rectangles for this result.
2637
+ */
2638
+ get_rectangle_list(): PapersDocument.FindRectangle[] | null;
2639
+ }
2640
+
2641
+
2642
+ namespace UndoContext {
2643
+ // Signal signatures
2644
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
2645
+ /**
2646
+ * Emitted whenever the undo or redo stacks are modified.
2647
+ * @signal
2648
+ * @run-last
2649
+ */
2650
+ "stacks-changed": (arg0: UndoHandler) => void;
2651
+ "notify::document-model": (pspec: GObject.ParamSpec) => void;
2652
+ }
2653
+
2654
+ // Constructor properties interface
2655
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
2656
+ document_model: DocumentModel;
2657
+ documentModel: DocumentModel;
2658
+ }
2659
+ }
2660
+
2661
+ /**
2662
+ * This context singleton manages two stacks of `PpsUndoAction`
2663
+ * that contain actions that may be undone or redone.
2664
+ *
2665
+ * These actions may be added by a number of objects that implement
2666
+ * PpsUndoHandler (e.g. the annotations context). Each handler provides a pointer
2667
+ * to an opaque structure that contains data to undo the action.
2668
+ *
2669
+ * The switch between the undo/redo stacks is done transparently: actions are added
2670
+ * to the redo stack if and only if another action is being undone (i.e.
2671
+ * `pps_undo_context_undo` is being called).
2672
+ * @gir-type Class
2673
+ */
2674
+ class UndoContext extends GObject.Object {
2675
+ static $gtype: GObject.GType<UndoContext>;
2676
+
2677
+ // Properties
2678
+ /**
2679
+ * @construct-only
2680
+ */
2681
+ get document_model(): DocumentModel;
2682
+
2683
+ /**
2684
+ * @construct-only
2685
+ */
2686
+ get documentModel(): DocumentModel;
2687
+
2688
+ /**
2689
+ * Compile-time signal type information.
2690
+ *
2691
+ * This instance property is generated only for TypeScript type checking.
2692
+ * It is not defined at runtime and should not be accessed in JS code.
2693
+ * @internal
2694
+ */
2695
+ $signals: UndoContext.SignalSignatures;
2696
+
2697
+ // Constructors
2698
+ constructor(properties?: Partial<UndoContext.ConstructorProps>, ...args: any[]);
2699
+
2700
+ _init(...args: any[]): void;
2701
+
2702
+ static ["new"](document_model: DocumentModel): UndoContext;
2703
+
2704
+ // Signals
2705
+ /** @signal */
2706
+ connect<K extends keyof UndoContext.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, UndoContext.SignalSignatures[K]>): number;
2707
+ connect(signal: string, callback: (...args: any[]) => any): number;
2708
+
2709
+ /** @signal */
2710
+ connect_after<K extends keyof UndoContext.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, UndoContext.SignalSignatures[K]>): number;
2711
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2712
+
2713
+ /** @signal */
2714
+ emit<K extends keyof UndoContext.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<UndoContext.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2715
+ emit(signal: string, ...args: any[]): void;
2716
+
2717
+ // Methods
2718
+ /**
2719
+ * This method adds a new action to the undo (or redo if it is used while
2720
+ * undoing) stack. If it is undone in the future, `pps_undo_handler_undo`
2721
+ * will be called on `handler` with `data`.
2722
+ * @param handler an object implementing {@link PapersView.UndoHandler}
2723
+ * @param data a pointer to a struct that `handler` will use to undo an action
2724
+ */
2725
+ add_action(handler: UndoHandler, data: null): void;
2726
+
2727
+ get_last_action(): null;
2728
+
2729
+ /**
2730
+ * @returns The last handler
2731
+ */
2732
+ get_last_handler(): UndoHandler;
2733
+
2734
+ /**
2735
+ * Similar to the undo method, but taking an action from the redo stack.
2736
+ */
2737
+ redo(): void;
2738
+
2739
+ /**
2740
+ * This pops the last action on the undo stack and undoes it by calling the
2741
+ * undo interface method of the {@link PapersView.UndoHandler} associated to the action.
2742
+ * While undoing, the {@link PapersView.UndoHandler} should add a new action with
2743
+ * `pps_undo_context_add_action` to redo what has just been undone, it will be
2744
+ * added to the redo stack by the undo context.
2745
+ */
2746
+ undo(): void;
2747
+ }
2748
+
2749
+
2750
+ namespace View {
2751
+ // Signal signatures
2752
+ interface SignalSignatures extends Gtk.Widget.SignalSignatures {
2753
+ /**
2754
+ * @signal
2755
+ * @action
2756
+ * @run-first
2757
+ */
2758
+ activate: () => void;
2759
+ /**
2760
+ * @signal
2761
+ * @run-last
2762
+ */
2763
+ "cursor-moved": (arg0: number, arg1: number) => void;
2764
+ /**
2765
+ * @signal
2766
+ * @action
2767
+ * @run-last
2768
+ */
2769
+ "external-link": (arg0: PapersDocument.LinkAction) => void;
2770
+ /**
2771
+ * @signal
2772
+ * @action
2773
+ * @run-last
2774
+ */
2775
+ "handle-link": (arg0: GObject.Object, arg1: GObject.Object) => void;
2776
+ /**
2777
+ * @signal
2778
+ * @action
2779
+ * @run-last
2780
+ */
2781
+ "layers-changed": () => void;
2782
+ /**
2783
+ * @signal
2784
+ * @action
2785
+ * @run-last
2786
+ */
2787
+ "move-cursor": (arg0: Gtk.MovementStep, arg1: number, arg2: boolean) => boolean | void;
2788
+ /**
2789
+ * @signal
2790
+ * @action
2791
+ * @run-last
2792
+ */
2793
+ popup: (arg0: null, arg1: number, arg2: number) => void;
2794
+ /**
2795
+ * @signal
2796
+ * @action
2797
+ * @run-last
2798
+ */
2799
+ scroll: (arg0: Gtk.ScrollType, arg1: Gtk.Orientation) => boolean | void;
2800
+ /**
2801
+ * @signal
2802
+ * @action
2803
+ * @run-last
2804
+ */
2805
+ "selection-changed": () => void;
2806
+ /**
2807
+ * @signal
2808
+ * @action
2809
+ * @run-first
2810
+ */
2811
+ "signature-rect": (arg0: number, arg1: PapersDocument.Rectangle) => void;
2812
+ "notify::annotations-context": (pspec: GObject.ParamSpec) => void;
2813
+ "notify::can-zoom-in": (pspec: GObject.ParamSpec) => void;
2814
+ "notify::can-zoom-out": (pspec: GObject.ParamSpec) => void;
2815
+ "notify::model": (pspec: GObject.ParamSpec) => void;
2816
+ "notify::search-context": (pspec: GObject.ParamSpec) => void;
2817
+ "notify::can-focus": (pspec: GObject.ParamSpec) => void;
2818
+ "notify::can-target": (pspec: GObject.ParamSpec) => void;
2819
+ "notify::css-classes": (pspec: GObject.ParamSpec) => void;
2820
+ "notify::css-name": (pspec: GObject.ParamSpec) => void;
2821
+ "notify::cursor": (pspec: GObject.ParamSpec) => void;
2822
+ "notify::focus-on-click": (pspec: GObject.ParamSpec) => void;
2823
+ "notify::focusable": (pspec: GObject.ParamSpec) => void;
2824
+ "notify::halign": (pspec: GObject.ParamSpec) => void;
2825
+ "notify::has-default": (pspec: GObject.ParamSpec) => void;
2826
+ "notify::has-focus": (pspec: GObject.ParamSpec) => void;
2827
+ "notify::has-tooltip": (pspec: GObject.ParamSpec) => void;
2828
+ "notify::height-request": (pspec: GObject.ParamSpec) => void;
2829
+ "notify::hexpand": (pspec: GObject.ParamSpec) => void;
2830
+ "notify::hexpand-set": (pspec: GObject.ParamSpec) => void;
2831
+ "notify::layout-manager": (pspec: GObject.ParamSpec) => void;
2832
+ "notify::limit-events": (pspec: GObject.ParamSpec) => void;
2833
+ "notify::margin-bottom": (pspec: GObject.ParamSpec) => void;
2834
+ "notify::margin-end": (pspec: GObject.ParamSpec) => void;
2835
+ "notify::margin-start": (pspec: GObject.ParamSpec) => void;
2836
+ "notify::margin-top": (pspec: GObject.ParamSpec) => void;
2837
+ "notify::name": (pspec: GObject.ParamSpec) => void;
2838
+ "notify::opacity": (pspec: GObject.ParamSpec) => void;
2839
+ "notify::overflow": (pspec: GObject.ParamSpec) => void;
2840
+ "notify::parent": (pspec: GObject.ParamSpec) => void;
2841
+ "notify::receives-default": (pspec: GObject.ParamSpec) => void;
2842
+ "notify::root": (pspec: GObject.ParamSpec) => void;
2843
+ "notify::scale-factor": (pspec: GObject.ParamSpec) => void;
2844
+ "notify::sensitive": (pspec: GObject.ParamSpec) => void;
2845
+ "notify::tooltip-markup": (pspec: GObject.ParamSpec) => void;
2846
+ "notify::tooltip-text": (pspec: GObject.ParamSpec) => void;
2847
+ "notify::valign": (pspec: GObject.ParamSpec) => void;
2848
+ "notify::vexpand": (pspec: GObject.ParamSpec) => void;
2849
+ "notify::vexpand-set": (pspec: GObject.ParamSpec) => void;
2850
+ "notify::visible": (pspec: GObject.ParamSpec) => void;
2851
+ "notify::width-request": (pspec: GObject.ParamSpec) => void;
2852
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
2853
+ "notify::hadjustment": (pspec: GObject.ParamSpec) => void;
2854
+ "notify::hscroll-policy": (pspec: GObject.ParamSpec) => void;
2855
+ "notify::vadjustment": (pspec: GObject.ParamSpec) => void;
2856
+ "notify::vscroll-policy": (pspec: GObject.ParamSpec) => void;
2857
+ }
2858
+
2859
+ // Constructor properties interface
2860
+ interface ConstructorProps extends Gtk.Widget.ConstructorProps, Gtk.Accessible.ConstructorProps, Gtk.Buildable.ConstructorProps, Gtk.ConstraintTarget.ConstructorProps, Gtk.Scrollable.ConstructorProps {
2861
+ annotations_context: AnnotationsContext;
2862
+ annotationsContext: AnnotationsContext;
2863
+ can_zoom_in: boolean;
2864
+ canZoomIn: boolean;
2865
+ can_zoom_out: boolean;
2866
+ canZoomOut: boolean;
2867
+ model: DocumentModel;
2868
+ search_context: SearchContext;
2869
+ searchContext: SearchContext;
2870
+ }
2871
+ }
2872
+
2873
+ /**
2874
+ * @gir-type Class
2875
+ */
2876
+ class View extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Scrollable {
2877
+ static $gtype: GObject.GType<View>;
2878
+
2879
+ // Properties
2880
+ get annotations_context(): AnnotationsContext;
2881
+ set annotations_context(val: AnnotationsContext);
2882
+
2883
+ get annotationsContext(): AnnotationsContext;
2884
+ set annotationsContext(val: AnnotationsContext);
2885
+
2886
+ /**
2887
+ * @read-only
2888
+ * @default true
2889
+ */
2890
+ get can_zoom_in(): boolean;
2891
+
2892
+ /**
2893
+ * @read-only
2894
+ * @default true
2895
+ */
2896
+ get canZoomIn(): boolean;
2897
+
2898
+ /**
2899
+ * @read-only
2900
+ * @default true
2901
+ */
2902
+ get can_zoom_out(): boolean;
2903
+
2904
+ /**
2905
+ * @read-only
2906
+ * @default true
2907
+ */
2908
+ get canZoomOut(): boolean;
2909
+
2910
+ get model(): DocumentModel;
2911
+ set model(val: DocumentModel);
2912
+
2913
+ get search_context(): SearchContext;
2914
+ set search_context(val: SearchContext);
2915
+
2916
+ get searchContext(): SearchContext;
2917
+ set searchContext(val: SearchContext);
2918
+
2919
+ /**
2920
+ * Compile-time signal type information.
2921
+ *
2922
+ * This instance property is generated only for TypeScript type checking.
2923
+ * It is not defined at runtime and should not be accessed in JS code.
2924
+ * @internal
2925
+ */
2926
+ $signals: View.SignalSignatures;
2927
+
2928
+ // Constructors
2929
+ constructor(properties?: Partial<View.ConstructorProps>, ...args: any[]);
2930
+
2931
+ _init(...args: any[]): void;
2932
+
2933
+ static ["new"](): View;
2934
+
2935
+ // Signals
2936
+ /** @signal */
2937
+ connect<K extends keyof View.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, View.SignalSignatures[K]>): number;
2938
+ connect(signal: string, callback: (...args: any[]) => any): number;
2939
+
2940
+ /** @signal */
2941
+ connect_after<K extends keyof View.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, View.SignalSignatures[K]>): number;
2942
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
2943
+
2944
+ /** @signal */
2945
+ emit<K extends keyof View.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<View.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
2946
+ emit(signal: string, ...args: any[]): void;
2947
+
2948
+ // Static methods
2949
+ static get_resource(): Gio.Resource;
2950
+
2951
+ // Methods
2952
+ cancel_signature_rect(): void;
2953
+
2954
+ copy(): void;
2955
+
2956
+ /**
2957
+ * @param action
2958
+ */
2959
+ copy_link_address(action: PapersDocument.LinkAction): void;
2960
+
2961
+ /**
2962
+ * @param type
2963
+ */
2964
+ current_event_is_type(type: Gdk.EventType): boolean;
2965
+
2966
+ /**
2967
+ * @param annot
2968
+ */
2969
+ focus_annotation(annot: PapersDocument.Annotation): void;
2970
+
2971
+ get_allow_links_change_zoom(): boolean;
2972
+
2973
+ /**
2974
+ * @param view_point_x the x coordinate over the view
2975
+ * @param view_point_y the y coordinate over the view
2976
+ * @returns a pointer to a {@link PapersDocument.DocumentPoint} that represents the location in the document for `view_point_x` and `view_point_y`. If the location is not in a page in the document, it returns NULL.
2977
+ */
2978
+ get_document_point_for_view_point(view_point_x: number, view_point_y: number): PapersDocument.DocumentPoint | null;
2979
+
2980
+ get_enable_spellchecking(): boolean;
2981
+
2982
+ /**
2983
+ * Returns a pointer to a constant string containing the selected
2984
+ * text in the view.
2985
+ *
2986
+ * The value returned may be NULL if there is no selected text.
2987
+ * @returns The string representing selected text.
2988
+ */
2989
+ get_selected_text(): string;
2990
+
2991
+ /**
2992
+ * @returns a list with the current selections.
2993
+ */
2994
+ get_selections(): ViewSelection[];
2995
+
2996
+ /**
2997
+ * @param link
2998
+ */
2999
+ handle_link(link: PapersDocument.Link): void;
3000
+
3001
+ has_selection(): boolean;
3002
+
3003
+ is_caret_navigation_enabled(): boolean;
3004
+
3005
+ next_page(): boolean;
3006
+
3007
+ /**
3008
+ * @param annot
3009
+ */
3010
+ open_annotation_editor(annot: PapersDocument.Annotation): void;
3011
+
3012
+ previous_page(): boolean;
3013
+
3014
+ reload(): void;
3015
+
3016
+ select_all(): void;
3017
+
3018
+ /**
3019
+ * @param allowed
3020
+ */
3021
+ set_allow_links_change_zoom(allowed: boolean): void;
3022
+
3023
+ /**
3024
+ * @param context the {@link PapersView.AnnotationsContext} to set
3025
+ */
3026
+ set_annotations_context(context: AnnotationsContext): void;
3027
+
3028
+ /**
3029
+ * @param page
3030
+ * @param offset
3031
+ */
3032
+ set_caret_cursor_position(page: number, offset: number): void;
3033
+
3034
+ /**
3035
+ * Enables or disables caret navigation mode for the document.
3036
+ * @param enabled whether to enable caret navigation mode
3037
+ */
3038
+ set_caret_navigation_enabled(enabled: boolean): void;
3039
+
3040
+ /**
3041
+ * @param spellcheck
3042
+ */
3043
+ set_enable_spellchecking(spellcheck: boolean): void;
3044
+
3045
+ /**
3046
+ * @param model
3047
+ */
3048
+ set_model(model: DocumentModel): void;
3049
+
3050
+ /**
3051
+ * Sets the maximum size in bytes that will be used to cache
3052
+ * rendered pages. Use 0 to disable caching rendered pages.
3053
+ *
3054
+ * Note that this limit doesn't affect the current visible page range,
3055
+ * which will always be rendered. In order to limit the total memory used
3056
+ * you have to use `pps_document_model_set_max_scale()` too.
3057
+ * @param cache_size size in bytes
3058
+ */
3059
+ set_page_cache_size(cache_size: bigint | number): void;
3060
+
3061
+ /**
3062
+ * @param context
3063
+ */
3064
+ set_search_context(context: SearchContext): void;
3065
+
3066
+ start_signature_rect(): void;
3067
+
3068
+ /**
3069
+ * @returns whether the document supports caret navigation
3070
+ */
3071
+ supports_caret_navigation(): boolean;
3072
+
3073
+ zoom_in(): void;
3074
+
3075
+ zoom_out(): void;
3076
+
3077
+ /**
3078
+ * The accessible role of the given {@link Gtk.Accessible} implementation.
3079
+ *
3080
+ * The accessible role cannot be changed once set.
3081
+ * @default Gtk.AccessibleRole.NONE
3082
+ * @category Inherited from Gtk.Accessible
3083
+ */
3084
+ get accessible_role(): Gtk.AccessibleRole;
3085
+ set accessible_role(val: Gtk.AccessibleRole);
3086
+
3087
+ /**
3088
+ * The accessible role of the given {@link Gtk.Accessible} implementation.
3089
+ *
3090
+ * The accessible role cannot be changed once set.
3091
+ * @default Gtk.AccessibleRole.NONE
3092
+ * @category Inherited from Gtk.Accessible
3093
+ */
3094
+ get accessibleRole(): Gtk.AccessibleRole;
3095
+ set accessibleRole(val: Gtk.AccessibleRole);
3096
+
3097
+ /**
3098
+ * Horizontal {@link Gtk.Adjustment} of the scrollable widget.
3099
+ *
3100
+ * This adjustment is shared between the scrollable widget and its parent.
3101
+ * @category Inherited from Gtk.Scrollable
3102
+ */
3103
+ get hadjustment(): Gtk.Adjustment | null;
3104
+ set hadjustment(val: Gtk.Adjustment | null);
3105
+
3106
+ /**
3107
+ * Determines when horizontal scrolling should start.
3108
+ * @default Gtk.ScrollablePolicy.MINIMUM
3109
+ * @category Inherited from Gtk.Scrollable
3110
+ */
3111
+ get hscroll_policy(): Gtk.ScrollablePolicy;
3112
+ set hscroll_policy(val: Gtk.ScrollablePolicy);
3113
+
3114
+ /**
3115
+ * Determines when horizontal scrolling should start.
3116
+ * @default Gtk.ScrollablePolicy.MINIMUM
3117
+ * @category Inherited from Gtk.Scrollable
3118
+ */
3119
+ get hscrollPolicy(): Gtk.ScrollablePolicy;
3120
+ set hscrollPolicy(val: Gtk.ScrollablePolicy);
3121
+
3122
+ /**
3123
+ * Vertical {@link Gtk.Adjustment} of the scrollable widget.
3124
+ *
3125
+ * This adjustment is shared between the scrollable widget and its parent.
3126
+ * @category Inherited from Gtk.Scrollable
3127
+ */
3128
+ get vadjustment(): Gtk.Adjustment | null;
3129
+ set vadjustment(val: Gtk.Adjustment | null);
3130
+
3131
+ /**
3132
+ * Determines when vertical scrolling should start.
3133
+ * @default Gtk.ScrollablePolicy.MINIMUM
3134
+ * @category Inherited from Gtk.Scrollable
3135
+ */
3136
+ get vscroll_policy(): Gtk.ScrollablePolicy;
3137
+ set vscroll_policy(val: Gtk.ScrollablePolicy);
3138
+
3139
+ /**
3140
+ * Determines when vertical scrolling should start.
3141
+ * @default Gtk.ScrollablePolicy.MINIMUM
3142
+ * @category Inherited from Gtk.Scrollable
3143
+ */
3144
+ get vscrollPolicy(): Gtk.ScrollablePolicy;
3145
+ set vscrollPolicy(val: Gtk.ScrollablePolicy);
3146
+
3147
+ /**
3148
+ * Requests the user's screen reader to announce the given message.
3149
+ *
3150
+ * This kind of notification is useful for messages that
3151
+ * either have only a visual representation or that are not
3152
+ * exposed visually at all, e.g. a notification about a
3153
+ * successful operation.
3154
+ *
3155
+ * Also, by using this API, you can ensure that the message
3156
+ * does not interrupts the user's current screen reader output.
3157
+ * @param message the string to announce
3158
+ * @param priority the priority of the announcement
3159
+ */
3160
+ announce(message: string, priority: Gtk.AccessibleAnnouncementPriority): void;
3161
+
3162
+ /**
3163
+ * Retrieves the accessible identifier for the accessible object.
3164
+ *
3165
+ * This functionality can be overridden by {@link Gtk.Accessible}
3166
+ * implementations.
3167
+ *
3168
+ * It is left to the accessible implementation to define the scope
3169
+ * and uniqueness of the identifier.
3170
+ * @returns the accessible identifier
3171
+ */
3172
+ get_accessible_id(): string | null;
3173
+
3174
+ /**
3175
+ * Retrieves the accessible parent for an accessible object.
3176
+ *
3177
+ * This function returns `NULL` for top level widgets.
3178
+ * @returns the accessible parent
3179
+ */
3180
+ get_accessible_parent(): Gtk.Accessible | null;
3181
+
3182
+ /**
3183
+ * Retrieves the accessible role of an accessible object.
3184
+ * @returns the accessible role
3185
+ */
3186
+ get_accessible_role(): Gtk.AccessibleRole;
3187
+
3188
+ /**
3189
+ * Retrieves the implementation for the given accessible object.
3190
+ * @returns the accessible implementation object
3191
+ */
3192
+ get_at_context(): Gtk.ATContext;
3193
+
3194
+ /**
3195
+ * Queries the coordinates and dimensions of this accessible
3196
+ *
3197
+ * This functionality can be overridden by {@link Gtk.Accessible}
3198
+ * implementations, e.g. to get the bounds from an ignored
3199
+ * child widget.
3200
+ * @returns true if the bounds are valid, and false otherwise
3201
+ */
3202
+ get_bounds(): [boolean, number, number, number, number];
3203
+
3204
+ /**
3205
+ * Retrieves the first accessible child of an accessible object.
3206
+ * @returns the first accessible child
3207
+ */
3208
+ get_first_accessible_child(): Gtk.Accessible | null;
3209
+
3210
+ /**
3211
+ * Retrieves the next accessible sibling of an accessible object
3212
+ * @returns the next accessible sibling
3213
+ */
3214
+ get_next_accessible_sibling(): Gtk.Accessible | null;
3215
+
3216
+ /**
3217
+ * Queries a platform state, such as focus.
3218
+ *
3219
+ * This functionality can be overridden by {@link Gtk.Accessible}
3220
+ * implementations, e.g. to get platform state from an ignored
3221
+ * child widget, as is the case for {@link Gtk.Text} wrappers.
3222
+ * @param state platform state to query
3223
+ * @returns the value of state for the accessible
3224
+ */
3225
+ get_platform_state(state: Gtk.AccessiblePlatformState): boolean;
3226
+
3227
+ /**
3228
+ * Resets the accessible property to its default value.
3229
+ * @param property the accessible property
3230
+ */
3231
+ reset_property(property: Gtk.AccessibleProperty): void;
3232
+
3233
+ /**
3234
+ * Resets the accessible relation to its default value.
3235
+ * @param relation the accessible relation
3236
+ */
3237
+ reset_relation(relation: Gtk.AccessibleRelation): void;
3238
+
3239
+ /**
3240
+ * Resets the accessible state to its default value.
3241
+ * @param state the accessible state
3242
+ */
3243
+ reset_state(state: Gtk.AccessibleState): void;
3244
+
3245
+ /**
3246
+ * Sets the parent and sibling of an accessible object.
3247
+ *
3248
+ * This function is meant to be used by accessible implementations that are
3249
+ * not part of the widget hierarchy, and but act as a logical bridge between
3250
+ * widgets. For instance, if a widget creates an object that holds metadata
3251
+ * for each child, and you want that object to implement the {@link Gtk.Accessible}
3252
+ * interface, you will use this function to ensure that the parent of each
3253
+ * child widget is the metadata object, and the parent of each metadata
3254
+ * object is the container widget.
3255
+ * @param parent the parent accessible object
3256
+ * @param next_sibling the sibling accessible object
3257
+ */
3258
+ set_accessible_parent(parent: Gtk.Accessible | null, next_sibling: Gtk.Accessible | null): void;
3259
+
3260
+ /**
3261
+ * Updates the next accessible sibling.
3262
+ *
3263
+ * That might be useful when a new child of a custom accessible
3264
+ * is created, and it needs to be linked to a previous child.
3265
+ * @param new_sibling the new next accessible sibling to set
3266
+ */
3267
+ update_next_accessible_sibling(new_sibling: Gtk.Accessible | null): void;
3268
+
3269
+ /**
3270
+ * Informs ATs that the platform state has changed.
3271
+ *
3272
+ * This function should be used by {@link Gtk.Accessible} implementations that
3273
+ * have a platform state but are not widgets. Widgets handle platform
3274
+ * states automatically.
3275
+ * @param state the platform state to update
3276
+ */
3277
+ update_platform_state(state: Gtk.AccessiblePlatformState): void;
3278
+
3279
+ /**
3280
+ * Updates an array of accessible properties.
3281
+ *
3282
+ * This function should be called by {@link Gtk.Widget} types whenever an accessible
3283
+ * property change must be communicated to assistive technologies.
3284
+ *
3285
+ * This function is meant to be used by language bindings.
3286
+ * @param properties an array of accessible properties
3287
+ * @param values an array of `GValues`, one for each property
3288
+ */
3289
+ update_property(properties: Gtk.AccessibleProperty[], values: (GObject.Value | any)[]): void;
3290
+
3291
+ /**
3292
+ * Updates an array of accessible relations.
3293
+ *
3294
+ * This function should be called by {@link Gtk.Widget} types whenever an accessible
3295
+ * relation change must be communicated to assistive technologies.
3296
+ *
3297
+ * This function is meant to be used by language bindings.
3298
+ * @param relations an array of accessible relations
3299
+ * @param values an array of `GValues`, one for each relation
3300
+ */
3301
+ update_relation(relations: Gtk.AccessibleRelation[], values: (GObject.Value | any)[]): void;
3302
+
3303
+ /**
3304
+ * Updates an array of accessible states.
3305
+ *
3306
+ * This function should be called by {@link Gtk.Widget} types whenever an accessible
3307
+ * state change must be communicated to assistive technologies.
3308
+ *
3309
+ * This function is meant to be used by language bindings.
3310
+ * @param states an array of accessible states
3311
+ * @param values an array of `GValues`, one for each state
3312
+ */
3313
+ update_state(states: Gtk.AccessibleState[], values: (GObject.Value | any)[]): void;
3314
+
3315
+ /**
3316
+ * Retrieves the accessible identifier for the accessible object.
3317
+ *
3318
+ * This functionality can be overridden by {@link Gtk.Accessible}
3319
+ * implementations.
3320
+ *
3321
+ * It is left to the accessible implementation to define the scope
3322
+ * and uniqueness of the identifier.
3323
+ * @virtual
3324
+ */
3325
+ vfunc_get_accessible_id(): string | null;
3326
+
3327
+ /**
3328
+ * Retrieves the accessible parent for an accessible object.
3329
+ *
3330
+ * This function returns `NULL` for top level widgets.
3331
+ * @virtual
3332
+ */
3333
+ vfunc_get_accessible_parent(): Gtk.Accessible | null;
3334
+
3335
+ /**
3336
+ * Retrieves the implementation for the given accessible object.
3337
+ * @virtual
3338
+ */
3339
+ vfunc_get_at_context(): Gtk.ATContext | null;
3340
+
3341
+ /**
3342
+ * Queries the coordinates and dimensions of this accessible
3343
+ *
3344
+ * This functionality can be overridden by {@link Gtk.Accessible}
3345
+ * implementations, e.g. to get the bounds from an ignored
3346
+ * child widget.
3347
+ * @virtual
3348
+ */
3349
+ vfunc_get_bounds(): [boolean, number, number, number, number];
3350
+
3351
+ /**
3352
+ * Retrieves the first accessible child of an accessible object.
3353
+ * @virtual
3354
+ */
3355
+ vfunc_get_first_accessible_child(): Gtk.Accessible | null;
3356
+
3357
+ /**
3358
+ * Retrieves the next accessible sibling of an accessible object
3359
+ * @virtual
3360
+ */
3361
+ vfunc_get_next_accessible_sibling(): Gtk.Accessible | null;
3362
+
3363
+ /**
3364
+ * Queries a platform state, such as focus.
3365
+ *
3366
+ * This functionality can be overridden by {@link Gtk.Accessible}
3367
+ * implementations, e.g. to get platform state from an ignored
3368
+ * child widget, as is the case for {@link Gtk.Text} wrappers.
3369
+ * @param state platform state to query
3370
+ * @virtual
3371
+ */
3372
+ vfunc_get_platform_state(state: Gtk.AccessiblePlatformState): boolean;
3373
+
3374
+ /**
3375
+ * Gets the ID of the `buildable` object.
3376
+ *
3377
+ * {@link Gtk.Builder} sets the name based on the ID attribute
3378
+ * of the `<object>` tag used to construct the `buildable`.
3379
+ * @returns the ID of the buildable object
3380
+ */
3381
+ get_buildable_id(): string | null;
3382
+
3383
+ /**
3384
+ * Adds a child to `buildable`. `type` is an optional string
3385
+ * describing how the child should be added.
3386
+ * @param builder a {@link Gtk.Builder}
3387
+ * @param child child to add
3388
+ * @param type kind of child or `null`
3389
+ * @virtual
3390
+ */
3391
+ vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type: string | null): void;
3392
+
3393
+ /**
3394
+ * Similar to `gtk_buildable_parser_finished()` but is
3395
+ * called once for each custom tag handled by the `buildable`.
3396
+ * @param builder a {@link Gtk.Builder}
3397
+ * @param child child object or `null` for non-child tags
3398
+ * @param tagname the name of the tag
3399
+ * @param data user data created in custom_tag_start
3400
+ * @virtual
3401
+ */
3402
+ vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data: null): void;
3403
+
3404
+ /**
3405
+ * Called at the end of each custom element handled by
3406
+ * the buildable.
3407
+ * @param builder {@link Gtk.Builder} used to construct this object
3408
+ * @param child child object or `null` for non-child tags
3409
+ * @param tagname name of tag
3410
+ * @param data user data that will be passed in to parser functions
3411
+ * @virtual
3412
+ */
3413
+ vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data: null): void;
3414
+
3415
+ /**
3416
+ * Called for each unknown element under `<child>`.
3417
+ * @param builder a {@link Gtk.Builder} used to construct this object
3418
+ * @param child child object or `null` for non-child tags
3419
+ * @param tagname name of tag
3420
+ * @virtual
3421
+ */
3422
+ vfunc_custom_tag_start(builder: Gtk.Builder, child: GObject.Object | null, tagname: string): [boolean, Gtk.BuildableParser, never];
3423
+
3424
+ /**
3425
+ * The getter corresponding to `set_id`. Implement this
3426
+ * if you implement `set_id`.
3427
+ * @virtual
3428
+ */
3429
+ vfunc_get_id(): string;
3430
+
3431
+ /**
3432
+ * Retrieves the internal child called `childname` of the `buildable` object.
3433
+ * @param builder a {@link Gtk.Builder}
3434
+ * @param childname name of child
3435
+ * @virtual
3436
+ */
3437
+ vfunc_get_internal_child<T = GObject.Object>(builder: Gtk.Builder, childname: string): T;
3438
+
3439
+ /**
3440
+ * Called when a builder finishes the parsing
3441
+ * of a UI definition. It is normally not necessary to implement this,
3442
+ * unless you need to perform special cleanup actions. {@link Gtk.Window} sets
3443
+ * the {@link Gtk.Widget.visible} property here.
3444
+ * @param builder
3445
+ * @virtual
3446
+ */
3447
+ vfunc_parser_finished(builder: Gtk.Builder): void;
3448
+
3449
+ /**
3450
+ * Sets a property of a buildable object.
3451
+ * It is normally not necessary to implement this, `g_object_set_property()`
3452
+ * is used by default. {@link Gtk.Window} implements this to delay showing itself
3453
+ * (i.e. setting the {@link Gtk.Widget.visible} property) until the whole
3454
+ * interface is created.
3455
+ * @param builder
3456
+ * @param name
3457
+ * @param value
3458
+ * @virtual
3459
+ */
3460
+ vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: unknown): void;
3461
+
3462
+ /**
3463
+ * Stores the id attribute given in the {@link Gtk.Builder} UI definition.
3464
+ * {@link Gtk.Widget} stores the name as object data. Implement this method if your
3465
+ * object has some notion of “ID” and it makes sense to map the XML id
3466
+ * attribute to it.
3467
+ * @param id
3468
+ * @virtual
3469
+ */
3470
+ vfunc_set_id(id: string): void;
3471
+
3472
+ /**
3473
+ * Returns the size of a non-scrolling border around the
3474
+ * outside of the scrollable.
3475
+ *
3476
+ * An example for this would be treeview headers. GTK can use
3477
+ * this information to display overlaid graphics, like the
3478
+ * overshoot indication, at the right position.
3479
+ * @returns `true` if `border` has been set
3480
+ */
3481
+ get_border(): [boolean, Gtk.Border];
3482
+
3483
+ /**
3484
+ * Retrieves the {@link Gtk.Adjustment} used for horizontal scrolling.
3485
+ * @returns horizontal {@link Gtk.Adjustment}.
3486
+ */
3487
+ get_hadjustment(): Gtk.Adjustment | null;
3488
+
3489
+ /**
3490
+ * Gets the horizontal {@link Gtk.ScrollablePolicy}.
3491
+ * @returns The horizontal {@link Gtk.ScrollablePolicy}.
3492
+ */
3493
+ get_hscroll_policy(): Gtk.ScrollablePolicy;
3494
+
3495
+ /**
3496
+ * Retrieves the {@link Gtk.Adjustment} used for vertical scrolling.
3497
+ * @returns vertical {@link Gtk.Adjustment}.
3498
+ */
3499
+ get_vadjustment(): Gtk.Adjustment | null;
3500
+
3501
+ /**
3502
+ * Gets the vertical {@link Gtk.ScrollablePolicy}.
3503
+ * @returns The vertical {@link Gtk.ScrollablePolicy}.
3504
+ */
3505
+ get_vscroll_policy(): Gtk.ScrollablePolicy;
3506
+
3507
+ /**
3508
+ * Sets the horizontal adjustment of the {@link Gtk.Scrollable}.
3509
+ * @param hadjustment a {@link Gtk.Adjustment}
3510
+ */
3511
+ set_hadjustment(hadjustment: Gtk.Adjustment | null): void;
3512
+
3513
+ /**
3514
+ * Sets the {@link Gtk.ScrollablePolicy}.
3515
+ *
3516
+ * The policy determines whether horizontal scrolling should start
3517
+ * below the minimum width or below the natural width.
3518
+ * @param policy the horizontal {@link Gtk.ScrollablePolicy}
3519
+ */
3520
+ set_hscroll_policy(policy: Gtk.ScrollablePolicy): void;
3521
+
3522
+ /**
3523
+ * Sets the vertical adjustment of the {@link Gtk.Scrollable}.
3524
+ * @param vadjustment a {@link Gtk.Adjustment}
3525
+ */
3526
+ set_vadjustment(vadjustment: Gtk.Adjustment | null): void;
3527
+
3528
+ /**
3529
+ * Sets the {@link Gtk.ScrollablePolicy}.
3530
+ *
3531
+ * The policy determines whether vertical scrolling should start
3532
+ * below the minimum height or below the natural height.
3533
+ * @param policy the vertical {@link Gtk.ScrollablePolicy}
3534
+ */
3535
+ set_vscroll_policy(policy: Gtk.ScrollablePolicy): void;
3536
+
3537
+ /**
3538
+ * Returns the size of a non-scrolling border around the
3539
+ * outside of the scrollable.
3540
+ *
3541
+ * An example for this would be treeview headers. GTK can use
3542
+ * this information to display overlaid graphics, like the
3543
+ * overshoot indication, at the right position.
3544
+ * @virtual
3545
+ */
3546
+ vfunc_get_border(): [boolean, Gtk.Border];
3547
+ }
3548
+
3549
+
3550
+ namespace ViewPresentation {
3551
+ // Signal signatures
3552
+ interface SignalSignatures extends Gtk.Widget.SignalSignatures {
3553
+ /**
3554
+ * @signal
3555
+ * @action
3556
+ * @run-last
3557
+ */
3558
+ "change-page": (arg0: Gtk.ScrollType) => void;
3559
+ /**
3560
+ * @signal
3561
+ * @action
3562
+ * @run-last
3563
+ */
3564
+ "external-link": (arg0: PapersDocument.LinkAction) => void;
3565
+ /**
3566
+ * @signal
3567
+ * @action
3568
+ * @run-last
3569
+ */
3570
+ finished: () => void;
3571
+ "notify::current-page": (pspec: GObject.ParamSpec) => void;
3572
+ "notify::document": (pspec: GObject.ParamSpec) => void;
3573
+ "notify::inverted-colors": (pspec: GObject.ParamSpec) => void;
3574
+ "notify::rotation": (pspec: GObject.ParamSpec) => void;
3575
+ "notify::can-focus": (pspec: GObject.ParamSpec) => void;
3576
+ "notify::can-target": (pspec: GObject.ParamSpec) => void;
3577
+ "notify::css-classes": (pspec: GObject.ParamSpec) => void;
3578
+ "notify::css-name": (pspec: GObject.ParamSpec) => void;
3579
+ "notify::cursor": (pspec: GObject.ParamSpec) => void;
3580
+ "notify::focus-on-click": (pspec: GObject.ParamSpec) => void;
3581
+ "notify::focusable": (pspec: GObject.ParamSpec) => void;
3582
+ "notify::halign": (pspec: GObject.ParamSpec) => void;
3583
+ "notify::has-default": (pspec: GObject.ParamSpec) => void;
3584
+ "notify::has-focus": (pspec: GObject.ParamSpec) => void;
3585
+ "notify::has-tooltip": (pspec: GObject.ParamSpec) => void;
3586
+ "notify::height-request": (pspec: GObject.ParamSpec) => void;
3587
+ "notify::hexpand": (pspec: GObject.ParamSpec) => void;
3588
+ "notify::hexpand-set": (pspec: GObject.ParamSpec) => void;
3589
+ "notify::layout-manager": (pspec: GObject.ParamSpec) => void;
3590
+ "notify::limit-events": (pspec: GObject.ParamSpec) => void;
3591
+ "notify::margin-bottom": (pspec: GObject.ParamSpec) => void;
3592
+ "notify::margin-end": (pspec: GObject.ParamSpec) => void;
3593
+ "notify::margin-start": (pspec: GObject.ParamSpec) => void;
3594
+ "notify::margin-top": (pspec: GObject.ParamSpec) => void;
3595
+ "notify::name": (pspec: GObject.ParamSpec) => void;
3596
+ "notify::opacity": (pspec: GObject.ParamSpec) => void;
3597
+ "notify::overflow": (pspec: GObject.ParamSpec) => void;
3598
+ "notify::parent": (pspec: GObject.ParamSpec) => void;
3599
+ "notify::receives-default": (pspec: GObject.ParamSpec) => void;
3600
+ "notify::root": (pspec: GObject.ParamSpec) => void;
3601
+ "notify::scale-factor": (pspec: GObject.ParamSpec) => void;
3602
+ "notify::sensitive": (pspec: GObject.ParamSpec) => void;
3603
+ "notify::tooltip-markup": (pspec: GObject.ParamSpec) => void;
3604
+ "notify::tooltip-text": (pspec: GObject.ParamSpec) => void;
3605
+ "notify::valign": (pspec: GObject.ParamSpec) => void;
3606
+ "notify::vexpand": (pspec: GObject.ParamSpec) => void;
3607
+ "notify::vexpand-set": (pspec: GObject.ParamSpec) => void;
3608
+ "notify::visible": (pspec: GObject.ParamSpec) => void;
3609
+ "notify::width-request": (pspec: GObject.ParamSpec) => void;
3610
+ "notify::accessible-role": (pspec: GObject.ParamSpec) => void;
3611
+ }
3612
+
3613
+ // Constructor properties interface
3614
+ interface ConstructorProps extends Gtk.Widget.ConstructorProps, Gtk.Accessible.ConstructorProps, Gtk.Buildable.ConstructorProps, Gtk.ConstraintTarget.ConstructorProps {
3615
+ current_page: number;
3616
+ currentPage: number;
3617
+ document: PapersDocument.Document;
3618
+ inverted_colors: boolean;
3619
+ invertedColors: boolean;
3620
+ rotation: number;
3621
+ }
3622
+ }
3623
+
3624
+ /**
3625
+ * @gir-type Class
3626
+ */
3627
+ class ViewPresentation extends Gtk.Widget implements Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget {
3628
+ static $gtype: GObject.GType<ViewPresentation>;
3629
+
3630
+ // Properties
3631
+ /**
3632
+ * @default 0
3633
+ */
3634
+ get current_page(): number;
3635
+ set current_page(val: number);
3636
+
3637
+ /**
3638
+ * @default 0
3639
+ */
3640
+ get currentPage(): number;
3641
+ set currentPage(val: number);
3642
+
3643
+ /**
3644
+ * @write-only
3645
+ */
3646
+ set document(val: PapersDocument.Document);
3647
+
3648
+ /**
3649
+ * @write-only
3650
+ * @default false
3651
+ */
3652
+ set inverted_colors(val: boolean);
3653
+
3654
+ /**
3655
+ * @write-only
3656
+ * @default false
3657
+ */
3658
+ set invertedColors(val: boolean);
3659
+
3660
+ /**
3661
+ * @default 0
3662
+ */
3663
+ get rotation(): number;
3664
+ set rotation(val: number);
3665
+
3666
+ /**
3667
+ * Compile-time signal type information.
3668
+ *
3669
+ * This instance property is generated only for TypeScript type checking.
3670
+ * It is not defined at runtime and should not be accessed in JS code.
3671
+ * @internal
3672
+ */
3673
+ $signals: ViewPresentation.SignalSignatures;
3674
+
3675
+ // Constructors
3676
+ constructor(properties?: Partial<ViewPresentation.ConstructorProps>, ...args: any[]);
3677
+
3678
+ _init(...args: any[]): void;
3679
+
3680
+ static ["new"](document: PapersDocument.Document, current_page: number, rotation: number, inverted_colors: boolean): ViewPresentation;
3681
+
3682
+ // Signals
3683
+ /** @signal */
3684
+ connect<K extends keyof ViewPresentation.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, ViewPresentation.SignalSignatures[K]>): number;
3685
+ connect(signal: string, callback: (...args: any[]) => any): number;
3686
+
3687
+ /** @signal */
3688
+ connect_after<K extends keyof ViewPresentation.SignalSignatures>(signal: K, callback: GObject.SignalCallback<this, ViewPresentation.SignalSignatures[K]>): number;
3689
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
3690
+
3691
+ /** @signal */
3692
+ emit<K extends keyof ViewPresentation.SignalSignatures>(signal: K, ...args: GObject.GjsParameters<ViewPresentation.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never): void;
3693
+ emit(signal: string, ...args: any[]): void;
3694
+
3695
+ // Methods
3696
+ get_current_page(): number;
3697
+
3698
+ get_rotation(): number;
3699
+
3700
+ next_page(): void;
3701
+
3702
+ previous_page(): void;
3703
+
3704
+ /**
3705
+ * @param rotation
3706
+ */
3707
+ set_rotation(rotation: number): void;
3708
+
3709
+ /**
3710
+ * The accessible role of the given {@link Gtk.Accessible} implementation.
3711
+ *
3712
+ * The accessible role cannot be changed once set.
3713
+ * @default Gtk.AccessibleRole.NONE
3714
+ * @category Inherited from Gtk.Accessible
3715
+ */
3716
+ get accessible_role(): Gtk.AccessibleRole;
3717
+ set accessible_role(val: Gtk.AccessibleRole);
3718
+
3719
+ /**
3720
+ * The accessible role of the given {@link Gtk.Accessible} implementation.
3721
+ *
3722
+ * The accessible role cannot be changed once set.
3723
+ * @default Gtk.AccessibleRole.NONE
3724
+ * @category Inherited from Gtk.Accessible
3725
+ */
3726
+ get accessibleRole(): Gtk.AccessibleRole;
3727
+ set accessibleRole(val: Gtk.AccessibleRole);
3728
+
3729
+ /**
3730
+ * Requests the user's screen reader to announce the given message.
3731
+ *
3732
+ * This kind of notification is useful for messages that
3733
+ * either have only a visual representation or that are not
3734
+ * exposed visually at all, e.g. a notification about a
3735
+ * successful operation.
3736
+ *
3737
+ * Also, by using this API, you can ensure that the message
3738
+ * does not interrupts the user's current screen reader output.
3739
+ * @param message the string to announce
3740
+ * @param priority the priority of the announcement
3741
+ */
3742
+ announce(message: string, priority: Gtk.AccessibleAnnouncementPriority): void;
3743
+
3744
+ /**
3745
+ * Retrieves the accessible identifier for the accessible object.
3746
+ *
3747
+ * This functionality can be overridden by {@link Gtk.Accessible}
3748
+ * implementations.
3749
+ *
3750
+ * It is left to the accessible implementation to define the scope
3751
+ * and uniqueness of the identifier.
3752
+ * @returns the accessible identifier
3753
+ */
3754
+ get_accessible_id(): string | null;
3755
+
3756
+ /**
3757
+ * Retrieves the accessible parent for an accessible object.
3758
+ *
3759
+ * This function returns `NULL` for top level widgets.
3760
+ * @returns the accessible parent
3761
+ */
3762
+ get_accessible_parent(): Gtk.Accessible | null;
3763
+
3764
+ /**
3765
+ * Retrieves the accessible role of an accessible object.
3766
+ * @returns the accessible role
3767
+ */
3768
+ get_accessible_role(): Gtk.AccessibleRole;
3769
+
3770
+ /**
3771
+ * Retrieves the implementation for the given accessible object.
3772
+ * @returns the accessible implementation object
3773
+ */
3774
+ get_at_context(): Gtk.ATContext;
3775
+
3776
+ /**
3777
+ * Queries the coordinates and dimensions of this accessible
3778
+ *
3779
+ * This functionality can be overridden by {@link Gtk.Accessible}
3780
+ * implementations, e.g. to get the bounds from an ignored
3781
+ * child widget.
3782
+ * @returns true if the bounds are valid, and false otherwise
3783
+ */
3784
+ get_bounds(): [boolean, number, number, number, number];
3785
+
3786
+ /**
3787
+ * Retrieves the first accessible child of an accessible object.
3788
+ * @returns the first accessible child
3789
+ */
3790
+ get_first_accessible_child(): Gtk.Accessible | null;
3791
+
3792
+ /**
3793
+ * Retrieves the next accessible sibling of an accessible object
3794
+ * @returns the next accessible sibling
3795
+ */
3796
+ get_next_accessible_sibling(): Gtk.Accessible | null;
3797
+
3798
+ /**
3799
+ * Queries a platform state, such as focus.
3800
+ *
3801
+ * This functionality can be overridden by {@link Gtk.Accessible}
3802
+ * implementations, e.g. to get platform state from an ignored
3803
+ * child widget, as is the case for {@link Gtk.Text} wrappers.
3804
+ * @param state platform state to query
3805
+ * @returns the value of state for the accessible
3806
+ */
3807
+ get_platform_state(state: Gtk.AccessiblePlatformState): boolean;
3808
+
3809
+ /**
3810
+ * Resets the accessible property to its default value.
3811
+ * @param property the accessible property
3812
+ */
3813
+ reset_property(property: Gtk.AccessibleProperty): void;
3814
+
3815
+ /**
3816
+ * Resets the accessible relation to its default value.
3817
+ * @param relation the accessible relation
3818
+ */
3819
+ reset_relation(relation: Gtk.AccessibleRelation): void;
3820
+
3821
+ /**
3822
+ * Resets the accessible state to its default value.
3823
+ * @param state the accessible state
3824
+ */
3825
+ reset_state(state: Gtk.AccessibleState): void;
3826
+
3827
+ /**
3828
+ * Sets the parent and sibling of an accessible object.
3829
+ *
3830
+ * This function is meant to be used by accessible implementations that are
3831
+ * not part of the widget hierarchy, and but act as a logical bridge between
3832
+ * widgets. For instance, if a widget creates an object that holds metadata
3833
+ * for each child, and you want that object to implement the {@link Gtk.Accessible}
3834
+ * interface, you will use this function to ensure that the parent of each
3835
+ * child widget is the metadata object, and the parent of each metadata
3836
+ * object is the container widget.
3837
+ * @param parent the parent accessible object
3838
+ * @param next_sibling the sibling accessible object
3839
+ */
3840
+ set_accessible_parent(parent: Gtk.Accessible | null, next_sibling: Gtk.Accessible | null): void;
3841
+
3842
+ /**
3843
+ * Updates the next accessible sibling.
3844
+ *
3845
+ * That might be useful when a new child of a custom accessible
3846
+ * is created, and it needs to be linked to a previous child.
3847
+ * @param new_sibling the new next accessible sibling to set
3848
+ */
3849
+ update_next_accessible_sibling(new_sibling: Gtk.Accessible | null): void;
3850
+
3851
+ /**
3852
+ * Informs ATs that the platform state has changed.
3853
+ *
3854
+ * This function should be used by {@link Gtk.Accessible} implementations that
3855
+ * have a platform state but are not widgets. Widgets handle platform
3856
+ * states automatically.
3857
+ * @param state the platform state to update
3858
+ */
3859
+ update_platform_state(state: Gtk.AccessiblePlatformState): void;
3860
+
3861
+ /**
3862
+ * Updates an array of accessible properties.
3863
+ *
3864
+ * This function should be called by {@link Gtk.Widget} types whenever an accessible
3865
+ * property change must be communicated to assistive technologies.
3866
+ *
3867
+ * This function is meant to be used by language bindings.
3868
+ * @param properties an array of accessible properties
3869
+ * @param values an array of `GValues`, one for each property
3870
+ */
3871
+ update_property(properties: Gtk.AccessibleProperty[], values: (GObject.Value | any)[]): void;
3872
+
3873
+ /**
3874
+ * Updates an array of accessible relations.
3875
+ *
3876
+ * This function should be called by {@link Gtk.Widget} types whenever an accessible
3877
+ * relation change must be communicated to assistive technologies.
3878
+ *
3879
+ * This function is meant to be used by language bindings.
3880
+ * @param relations an array of accessible relations
3881
+ * @param values an array of `GValues`, one for each relation
3882
+ */
3883
+ update_relation(relations: Gtk.AccessibleRelation[], values: (GObject.Value | any)[]): void;
3884
+
3885
+ /**
3886
+ * Updates an array of accessible states.
3887
+ *
3888
+ * This function should be called by {@link Gtk.Widget} types whenever an accessible
3889
+ * state change must be communicated to assistive technologies.
3890
+ *
3891
+ * This function is meant to be used by language bindings.
3892
+ * @param states an array of accessible states
3893
+ * @param values an array of `GValues`, one for each state
3894
+ */
3895
+ update_state(states: Gtk.AccessibleState[], values: (GObject.Value | any)[]): void;
3896
+
3897
+ /**
3898
+ * Retrieves the accessible identifier for the accessible object.
3899
+ *
3900
+ * This functionality can be overridden by {@link Gtk.Accessible}
3901
+ * implementations.
3902
+ *
3903
+ * It is left to the accessible implementation to define the scope
3904
+ * and uniqueness of the identifier.
3905
+ * @virtual
3906
+ */
3907
+ vfunc_get_accessible_id(): string | null;
3908
+
3909
+ /**
3910
+ * Retrieves the accessible parent for an accessible object.
3911
+ *
3912
+ * This function returns `NULL` for top level widgets.
3913
+ * @virtual
3914
+ */
3915
+ vfunc_get_accessible_parent(): Gtk.Accessible | null;
3916
+
3917
+ /**
3918
+ * Retrieves the implementation for the given accessible object.
3919
+ * @virtual
3920
+ */
3921
+ vfunc_get_at_context(): Gtk.ATContext | null;
3922
+
3923
+ /**
3924
+ * Queries the coordinates and dimensions of this accessible
3925
+ *
3926
+ * This functionality can be overridden by {@link Gtk.Accessible}
3927
+ * implementations, e.g. to get the bounds from an ignored
3928
+ * child widget.
3929
+ * @virtual
3930
+ */
3931
+ vfunc_get_bounds(): [boolean, number, number, number, number];
3932
+
3933
+ /**
3934
+ * Retrieves the first accessible child of an accessible object.
3935
+ * @virtual
3936
+ */
3937
+ vfunc_get_first_accessible_child(): Gtk.Accessible | null;
3938
+
3939
+ /**
3940
+ * Retrieves the next accessible sibling of an accessible object
3941
+ * @virtual
3942
+ */
3943
+ vfunc_get_next_accessible_sibling(): Gtk.Accessible | null;
3944
+
3945
+ /**
3946
+ * Queries a platform state, such as focus.
3947
+ *
3948
+ * This functionality can be overridden by {@link Gtk.Accessible}
3949
+ * implementations, e.g. to get platform state from an ignored
3950
+ * child widget, as is the case for {@link Gtk.Text} wrappers.
3951
+ * @param state platform state to query
3952
+ * @virtual
3953
+ */
3954
+ vfunc_get_platform_state(state: Gtk.AccessiblePlatformState): boolean;
3955
+
3956
+ /**
3957
+ * Gets the ID of the `buildable` object.
3958
+ *
3959
+ * {@link Gtk.Builder} sets the name based on the ID attribute
3960
+ * of the `<object>` tag used to construct the `buildable`.
3961
+ * @returns the ID of the buildable object
3962
+ */
3963
+ get_buildable_id(): string | null;
3964
+
3965
+ /**
3966
+ * Adds a child to `buildable`. `type` is an optional string
3967
+ * describing how the child should be added.
3968
+ * @param builder a {@link Gtk.Builder}
3969
+ * @param child child to add
3970
+ * @param type kind of child or `null`
3971
+ * @virtual
3972
+ */
3973
+ vfunc_add_child(builder: Gtk.Builder, child: GObject.Object, type: string | null): void;
3974
+
3975
+ /**
3976
+ * Similar to `gtk_buildable_parser_finished()` but is
3977
+ * called once for each custom tag handled by the `buildable`.
3978
+ * @param builder a {@link Gtk.Builder}
3979
+ * @param child child object or `null` for non-child tags
3980
+ * @param tagname the name of the tag
3981
+ * @param data user data created in custom_tag_start
3982
+ * @virtual
3983
+ */
3984
+ vfunc_custom_finished(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data: null): void;
3985
+
3986
+ /**
3987
+ * Called at the end of each custom element handled by
3988
+ * the buildable.
3989
+ * @param builder {@link Gtk.Builder} used to construct this object
3990
+ * @param child child object or `null` for non-child tags
3991
+ * @param tagname name of tag
3992
+ * @param data user data that will be passed in to parser functions
3993
+ * @virtual
3994
+ */
3995
+ vfunc_custom_tag_end(builder: Gtk.Builder, child: GObject.Object | null, tagname: string, data: null): void;
3996
+
3997
+ /**
3998
+ * Called for each unknown element under `<child>`.
3999
+ * @param builder a {@link Gtk.Builder} used to construct this object
4000
+ * @param child child object or `null` for non-child tags
4001
+ * @param tagname name of tag
4002
+ * @virtual
4003
+ */
4004
+ vfunc_custom_tag_start(builder: Gtk.Builder, child: GObject.Object | null, tagname: string): [boolean, Gtk.BuildableParser, never];
4005
+
4006
+ /**
4007
+ * The getter corresponding to `set_id`. Implement this
4008
+ * if you implement `set_id`.
4009
+ * @virtual
4010
+ */
4011
+ vfunc_get_id(): string;
4012
+
4013
+ /**
4014
+ * Retrieves the internal child called `childname` of the `buildable` object.
4015
+ * @param builder a {@link Gtk.Builder}
4016
+ * @param childname name of child
4017
+ * @virtual
4018
+ */
4019
+ vfunc_get_internal_child<T = GObject.Object>(builder: Gtk.Builder, childname: string): T;
4020
+
4021
+ /**
4022
+ * Called when a builder finishes the parsing
4023
+ * of a UI definition. It is normally not necessary to implement this,
4024
+ * unless you need to perform special cleanup actions. {@link Gtk.Window} sets
4025
+ * the {@link Gtk.Widget.visible} property here.
4026
+ * @param builder
4027
+ * @virtual
4028
+ */
4029
+ vfunc_parser_finished(builder: Gtk.Builder): void;
4030
+
4031
+ /**
4032
+ * Sets a property of a buildable object.
4033
+ * It is normally not necessary to implement this, `g_object_set_property()`
4034
+ * is used by default. {@link Gtk.Window} implements this to delay showing itself
4035
+ * (i.e. setting the {@link Gtk.Widget.visible} property) until the whole
4036
+ * interface is created.
4037
+ * @param builder
4038
+ * @param name
4039
+ * @param value
4040
+ * @virtual
4041
+ */
4042
+ vfunc_set_buildable_property(builder: Gtk.Builder, name: string, value: unknown): void;
4043
+
4044
+ /**
4045
+ * Stores the id attribute given in the {@link Gtk.Builder} UI definition.
4046
+ * {@link Gtk.Widget} stores the name as object data. Implement this method if your
4047
+ * object has some notion of “ID” and it makes sense to map the XML id
4048
+ * attribute to it.
4049
+ * @param id
4050
+ * @virtual
4051
+ */
4052
+ vfunc_set_id(id: string): void;
4053
+ }
4054
+
4055
+
4056
+ /**
4057
+ * @gir-type Struct
4058
+ */
4059
+ class AnnotationInkAddData {
4060
+ static $gtype: GObject.GType<AnnotationInkAddData>;
4061
+
4062
+ // Fields
4063
+ times: null[];
4064
+
4065
+ highlight: boolean;
4066
+
4067
+ line_width: number;
4068
+ }
4069
+
4070
+
4071
+ /**
4072
+ * @gir-type Alias
4073
+ */
4074
+ type AnnotationModelClass = typeof AnnotationModel;
4075
+
4076
+ /**
4077
+ * @gir-type Alias
4078
+ */
4079
+ type AnnotationsContextClass = typeof AnnotationsContext;
4080
+
4081
+ /**
4082
+ * @gir-type Alias
4083
+ */
4084
+ type AttachmentContextClass = typeof AttachmentContext;
4085
+
4086
+ /**
4087
+ * @gir-type Alias
4088
+ */
4089
+ type DocumentModelClass = typeof DocumentModel;
4090
+
4091
+ /**
4092
+ * @gir-type Alias
4093
+ */
4094
+ type HistoryClass = typeof History;
4095
+
4096
+ /**
4097
+ * @gir-type Alias
4098
+ */
4099
+ type JobAnnotsClass = typeof JobAnnots;
4100
+
4101
+ /**
4102
+ * @gir-type Alias
4103
+ */
4104
+ type JobAttachmentsClass = typeof JobAttachments;
4105
+
4106
+ /**
4107
+ * @gir-type Alias
4108
+ */
4109
+ type JobClass = typeof Job;
4110
+
4111
+ /**
4112
+ * @gir-type Alias
4113
+ */
4114
+ type JobExportClass = typeof JobExport;
4115
+
4116
+ /**
4117
+ * @gir-type Alias
4118
+ */
4119
+ type JobFindClass = typeof JobFind;
4120
+
4121
+ /**
4122
+ * @gir-type Alias
4123
+ */
4124
+ type JobFontsClass = typeof JobFonts;
4125
+
4126
+ /**
4127
+ * @gir-type Alias
4128
+ */
4129
+ type JobLayersClass = typeof JobLayers;
4130
+
4131
+ /**
4132
+ * @gir-type Alias
4133
+ */
4134
+ type JobLinksClass = typeof JobLinks;
4135
+
4136
+ /**
4137
+ * @gir-type Alias
4138
+ */
4139
+ type JobLoadClass = typeof JobLoad;
4140
+
4141
+ /**
4142
+ * @gir-type Alias
4143
+ */
4144
+ type JobPageDataClass = typeof JobPageData;
4145
+
4146
+ /**
4147
+ * @gir-type Alias
4148
+ */
4149
+ type JobPrintClass = typeof JobPrint;
4150
+
4151
+ /**
4152
+ * @gir-type Alias
4153
+ */
4154
+ type JobRenderTextureClass = typeof JobRenderTexture;
4155
+
4156
+ /**
4157
+ * @gir-type Alias
4158
+ */
4159
+ type JobSaveClass = typeof JobSave;
4160
+
4161
+ /**
4162
+ * @gir-type Alias
4163
+ */
4164
+ type JobSignaturesClass = typeof JobSignatures;
4165
+
4166
+ /**
4167
+ * @gir-type Alias
4168
+ */
4169
+ type JobThumbnailTextureClass = typeof JobThumbnailTexture;
4170
+
4171
+ /**
4172
+ * @gir-type Alias
4173
+ */
4174
+ type MetadataClass = typeof Metadata;
4175
+
4176
+ /**
4177
+ * @gir-type Alias
4178
+ */
4179
+ type PrintOperationClass = typeof PrintOperation;
4180
+
4181
+ /**
4182
+ * @gir-type Alias
4183
+ */
4184
+ type SearchContextClass = typeof SearchContext;
4185
+
4186
+ /**
4187
+ * @gir-type Alias
4188
+ */
4189
+ type SearchResultClass = typeof SearchResult;
4190
+
4191
+ /**
4192
+ * @gir-type Alias
4193
+ */
4194
+ type UndoContextClass = typeof UndoContext;
4195
+
4196
+ /**
4197
+ * @gir-type Alias
4198
+ */
4199
+ type UndoHandlerInterface = typeof UndoHandler;
4200
+
4201
+ /**
4202
+ * @gir-type Alias
4203
+ */
4204
+ type ViewClass = typeof View;
4205
+
4206
+ /**
4207
+ * @gir-type Alias
4208
+ */
4209
+ type ViewPresentationClass = typeof ViewPresentation;
4210
+
4211
+ /**
4212
+ * @gir-type Struct
4213
+ */
4214
+ class ViewSelection {
4215
+ static $gtype: GObject.GType<ViewSelection>;
4216
+
4217
+ // Fields
4218
+ page: number;
4219
+
4220
+ rect: PapersDocument.Rectangle;
4221
+
4222
+ style: PapersDocument.SelectionStyle;
4223
+
4224
+ // Methods
4225
+ copy(): ViewSelection;
4226
+
4227
+ free(): void;
4228
+ }
4229
+
4230
+
4231
+ /**
4232
+ * @gir-type Struct
4233
+ */
4234
+ abstract class _AnnotationsContextClass {
4235
+ static $gtype: GObject.GType<_AnnotationsContextClass>;
4236
+ }
4237
+
4238
+
4239
+ /**
4240
+ * @gir-type Struct
4241
+ */
4242
+ abstract class _AttachmentContextClass {
4243
+ static $gtype: GObject.GType<_AttachmentContextClass>;
4244
+ }
4245
+
4246
+
4247
+ /**
4248
+ * @gir-type Struct
4249
+ */
4250
+ abstract class _SearchContextClass {
4251
+ static $gtype: GObject.GType<_SearchContextClass>;
4252
+ }
4253
+
4254
+
4255
+ /**
4256
+ * @gir-type Struct
4257
+ */
4258
+ abstract class _SearchResultClass {
4259
+ static $gtype: GObject.GType<_SearchResultClass>;
4260
+ }
4261
+
4262
+
4263
+ namespace UndoHandler {
4264
+ /**
4265
+ * Interface for implementing UndoHandler.
4266
+ * Contains only the virtual methods that need to be implemented.
4267
+ */
4268
+ interface Interface {
4269
+
4270
+ // Virtual methods
4271
+ /**
4272
+ * @param data
4273
+ * @virtual
4274
+ */
4275
+ vfunc_undo(data: null): void;
4276
+ }
4277
+
4278
+
4279
+ // Constructor properties interface
4280
+ interface ConstructorProps extends GObject.Object.ConstructorProps {}
4281
+ }
4282
+
4283
+ export interface UndoHandlerNamespace {
4284
+ $gtype: GObject.GType<UndoHandler>;
4285
+ prototype: UndoHandler;
4286
+ }
4287
+ /**
4288
+ * This interface is implemented by objects (e.g. the annotation context) that
4289
+ * aim to register actions that may be undone. Such actions must be registered
4290
+ * into the undo context so as they are added to the undo stack with
4291
+ * `pps_undo_context_add_action`.
4292
+ * Then, when an action must be undone (e.g. the user pressed Ctrl+Z), the
4293
+ * `pps_undo_handler_undo` interface method is called on the object.
4294
+ * An action is represented by an arbitrary pointer. The object must free
4295
+ * such pointers when the `pps_undo_handler_free_action` interface method is called.
4296
+ *
4297
+ * For instance, the annotation context implements {@link PapersView.UndoHandler}. When an
4298
+ * annotation is added, the annotation context creates a custom struct that represents
4299
+ * this action, it contains (among other things) a pointer to the added {@link PapersDocument.Annotation}.
4300
+ * This action is added to the undo stack of the undo context. Then, if the user uses
4301
+ * Ctrl+Z, the `pps_undo_context_undo` method is called, the addition action is taken
4302
+ * from the undo stack and `pps_undo_handler_undo` is called on the annotation context
4303
+ * and the addition action. Then, the implementation of this interface in the
4304
+ * annotation context removes the annotation from the document. This removal entails that the annotation
4305
+ * context adds a new action to the undo context (a struct that represents the removal
4306
+ * of the annotation), and the undo context adds this action to the redo stack since this
4307
+ * happens while undoing.
4308
+ * @gir-type Interface
4309
+ */
4310
+ interface UndoHandler extends GObject.Object, UndoHandler.Interface {
4311
+
4312
+ // Methods
4313
+ /**
4314
+ * @param data
4315
+ */
4316
+ free_action(data: null): void;
4317
+
4318
+ /**
4319
+ * @param data
4320
+ */
4321
+ undo(data: null): void;
4322
+ }
4323
+
4324
+
4325
+ export const UndoHandler: UndoHandlerNamespace & {
4326
+ new (): UndoHandler; // This allows `obj instanceof UndoHandler`
4327
+ };
4328
+
4329
+ /**
4330
+ * Name of the imported GIR library
4331
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
4332
+ */
4333
+ const __name__: string;
4334
+
4335
+ /**
4336
+ * Version of the imported GIR library
4337
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
4338
+ */
4339
+ const __version__: string;
4340
+ }
4341
+
4342
+ export default PapersView;
4343
+
4344
+ // END