@girs/gly-2 2.0.0-4.0.0-beta.39 → 2.0.0-4.0.0-beta.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gly-2)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Gly-2, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.39.
8
+ GJS TypeScript type definitions for Gly-2, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.41.
9
9
 
10
10
  ## Install
11
11
 
package/gly-2.d.ts CHANGED
@@ -22,20 +22,28 @@ export namespace Gly {
22
22
 
23
23
  /**
24
24
  * Errors that can appear while loading images.
25
+ * @gir-type Struct
25
26
  */
26
27
  class LoaderError extends GLib.Error {
27
- static $gtype: GObject.GType<LoaderError>;
28
+ static $gtype: GObject.GType<GLib.Error>;
28
29
 
29
30
  // Static fields
30
31
 
31
32
  /**
32
33
  * Generic type for all other errors.
34
+ * @since 2.0
33
35
  */
34
36
  static FAILED: number;
35
37
  /**
36
38
  * Unknown image format.
39
+ * @since 2.0
37
40
  */
38
41
  static UNKNOWN_IMAGE_FORMAT: number;
42
+ /**
43
+ * Reached last frame in an animation with {@link FrameRequest.set_loop_animation} to `FALSE`.
44
+ * @since 2.0.1
45
+ */
46
+ static NO_MORE_FRAMES: number;
39
47
 
40
48
  // Constructors
41
49
 
@@ -44,22 +52,23 @@ export namespace Gly {
44
52
  // Static methods
45
53
 
46
54
  /**
47
- * Error quark for [error`GlyLoaderError]`
55
+ * Error quark for {@link GlyLoaderError}
48
56
  */
49
57
  static quark(): GLib.Quark;
50
58
  }
51
59
 
52
60
  /**
53
- * Memory format
54
- */
55
-
56
- /**
57
- * Memory format
61
+ * @gir-type Enum
58
62
  */
59
63
  export namespace MemoryFormat {
60
64
  export const $gtype: GObject.GType<MemoryFormat>;
61
65
  }
62
66
 
67
+ /**
68
+ * Memory format
69
+ * @gir-type Enum
70
+ * @since 2.0
71
+ */
63
72
  enum MemoryFormat {
64
73
  /**
65
74
  * 8-bit RGRA premultiplied
@@ -154,23 +163,22 @@ export namespace Gly {
154
163
  */
155
164
  G16,
156
165
  }
166
+
157
167
  /**
158
- * Sandbox mechanisms
159
- *
160
- * ::: warning
161
- * Using `GLY_SANDBOX_SELECTOR_NOT_SANDBOXED` will disable an important security layer that sandboxes loaders. It is only intended for testing and development purposes.
168
+ * @gir-type Enum
162
169
  */
170
+ export namespace SandboxSelector {
171
+ export const $gtype: GObject.GType<SandboxSelector>;
172
+ }
163
173
 
164
174
  /**
165
175
  * Sandbox mechanisms
166
176
  *
167
177
  * ::: warning
168
178
  * Using `GLY_SANDBOX_SELECTOR_NOT_SANDBOXED` will disable an important security layer that sandboxes loaders. It is only intended for testing and development purposes.
179
+ * @gir-type Enum
180
+ * @since 2.0
169
181
  */
170
- export namespace SandboxSelector {
171
- export const $gtype: GObject.GType<SandboxSelector>;
172
- }
173
-
174
182
  enum SandboxSelector {
175
183
  /**
176
184
  * This mode selects `bwrap` outside of Flatpaks and usually
@@ -197,8 +205,9 @@ export namespace Gly {
197
205
  */
198
206
  NOT_SANDBOXED,
199
207
  }
208
+
200
209
  /**
201
- * Error quark for [error`GlyLoaderError]`
210
+ * Error quark for {@link GlyLoaderError}
202
211
  * @returns The error domain
203
212
  */
204
213
  function loader_error_quark(): GLib.Quark;
@@ -206,6 +215,7 @@ export namespace Gly {
206
215
  * Whether a memory format has an alpha channel
207
216
  * @param memory_format
208
217
  * @returns Returns `TRUE` if the memory format has an alpha channel
218
+ * @since 2.0
209
219
  */
210
220
  function memory_format_has_alpha(memory_format: MemoryFormat | null): boolean;
211
221
  /**
@@ -213,25 +223,30 @@ export namespace Gly {
213
223
  * premultiplied with the alpha value
214
224
  * @param memory_format
215
225
  * @returns Returns `TRUE` if color channels are premultiplied
226
+ * @since 2.0
216
227
  */
217
228
  function memory_format_is_premultiplied(memory_format: MemoryFormat | null): boolean;
229
+ /**
230
+ * @gir-type Callback
231
+ */
218
232
  interface LoaderGetMimeTypesDoneFunc {
219
233
  (mime_types: string[], data?: any | null): void;
220
234
  }
221
235
  /**
222
- * Memory format selection
223
- */
224
-
225
- /**
226
- * Memory format selection
236
+ * @gir-type Flags
227
237
  */
228
238
  export namespace MemoryFormatSelection {
229
239
  export const $gtype: GObject.GType<MemoryFormatSelection>;
230
240
  }
231
241
 
242
+ /**
243
+ * Memory format selection
244
+ * @gir-type Flags
245
+ * @since 2.0
246
+ */
232
247
  enum MemoryFormatSelection {
233
248
  /**
234
- * 8-bit RGRA premultiplied
249
+ * 8-bit BGRA premultiplied
235
250
  */
236
251
  B8G8R8A8_PREMULTIPLIED,
237
252
  /**
@@ -243,11 +258,11 @@ export namespace Gly {
243
258
  */
244
259
  R8G8B8A8_PREMULTIPLIED,
245
260
  /**
246
- * 8-bit RGBA
261
+ * 8-bit BGRA
247
262
  */
248
263
  B8G8R8A8,
249
264
  /**
250
- * 8-bit AGBR
265
+ * 8-bit ARGB
251
266
  */
252
267
  A8R8G8B8,
253
268
  /**
@@ -323,6 +338,7 @@ export namespace Gly {
323
338
  */
324
339
  G16,
325
340
  }
341
+
326
342
  namespace Creator {
327
343
  // Signal signatures
328
344
  interface SignalSignatures extends GObject.Object.SignalSignatures {
@@ -380,13 +396,21 @@ export namespace Gly {
380
396
  * }
381
397
  * }
382
398
  * ```
399
+ * @gir-type Class
400
+ * @since 2.0
383
401
  */
384
402
  class Creator extends GObject.Object {
385
403
  static $gtype: GObject.GType<Creator>;
386
404
 
387
405
  // Properties
388
406
 
407
+ /**
408
+ * @construct-only
409
+ */
389
410
  get mime_type(): string;
411
+ /**
412
+ * @construct-only
413
+ */
390
414
  get mimeType(): string;
391
415
  get sandbox_selector(): SandboxSelector;
392
416
  set sandbox_selector(val: SandboxSelector);
@@ -412,16 +436,19 @@ export namespace Gly {
412
436
 
413
437
  // Signals
414
438
 
439
+ /** @signal */
415
440
  connect<K extends keyof Creator.SignalSignatures>(
416
441
  signal: K,
417
442
  callback: GObject.SignalCallback<this, Creator.SignalSignatures[K]>,
418
443
  ): number;
419
444
  connect(signal: string, callback: (...args: any[]) => any): number;
445
+ /** @signal */
420
446
  connect_after<K extends keyof Creator.SignalSignatures>(
421
447
  signal: K,
422
448
  callback: GObject.SignalCallback<this, Creator.SignalSignatures[K]>,
423
449
  ): number;
424
450
  connect_after(signal: string, callback: (...args: any[]) => any): number;
451
+ /** @signal */
425
452
  emit<K extends keyof Creator.SignalSignatures>(
426
453
  signal: K,
427
454
  ...args: GObject.GjsParameters<Creator.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -430,12 +457,27 @@ export namespace Gly {
430
457
 
431
458
  // Methods
432
459
 
460
+ /**
461
+ * @param width
462
+ * @param height
463
+ * @param memory_format
464
+ * @param texture Texture data
465
+ * @returns a new {@link NewFrame}
466
+ */
433
467
  add_frame(
434
468
  width: number,
435
469
  height: number,
436
470
  memory_format: MemoryFormat | null,
437
471
  texture: GLib.Bytes | Uint8Array,
438
472
  ): NewFrame;
473
+ /**
474
+ * @param width
475
+ * @param height `stride`
476
+ * @param stride
477
+ * @param memory_format
478
+ * @param texture Texture data
479
+ * @returns a new {@link NewFrame}
480
+ */
439
481
  add_frame_with_stride(
440
482
  width: number,
441
483
  height: number,
@@ -453,21 +495,24 @@ export namespace Gly {
453
495
  * @returns `TRUE` if format supports key-value storage.
454
496
  */
455
497
  add_metadata_key_value(key: string, value: string): boolean;
498
+ /**
499
+ * @returns The encoded image.
500
+ */
456
501
  create(): EncodedImage | null;
457
502
  /**
458
- * Asynchronous version of [method`Creator`.create].
459
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
503
+ * Asynchronous version of {@link Creator.create}.
504
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
460
505
  */
461
506
  create_async(cancellable?: Gio.Cancellable | null): globalThis.Promise<EncodedImage>;
462
507
  /**
463
- * Asynchronous version of [method`Creator`.create].
464
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
508
+ * Asynchronous version of {@link Creator.create}.
509
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
465
510
  * @param callback A callback to call when the operation is complete
466
511
  */
467
512
  create_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
468
513
  /**
469
- * Asynchronous version of [method`Creator`.create].
470
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
514
+ * Asynchronous version of {@link Creator.create}.
515
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
471
516
  * @param callback A callback to call when the operation is complete
472
517
  */
473
518
  create_async(
@@ -475,15 +520,23 @@ export namespace Gly {
475
520
  callback?: Gio.AsyncReadyCallback<this> | null,
476
521
  ): globalThis.Promise<EncodedImage> | void;
477
522
  /**
478
- * Finishes the [method`Creator`.create_async] call.
479
- * @param result A `GAsyncResult`
523
+ * Finishes the {@link Creator.create_async} call.
524
+ * @param result A {@link Gio.AsyncResult}
480
525
  * @returns Encoded image.
481
526
  */
482
527
  create_finish(result: Gio.AsyncResult): EncodedImage;
528
+ /**
529
+ * @param compression Value between 0 and 100
530
+ * @returns `TRUE` if the format supports compression setting.
531
+ */
483
532
  set_encoding_compression(compression: number): boolean;
533
+ /**
534
+ * @param quality Value between 0 and 100
535
+ * @returns `TRUE` if format supports a quality setting.
536
+ */
484
537
  set_encoding_quality(quality: number): boolean;
485
538
  /**
486
- * Selects which sandbox mechanism should be used. The default without calling this function is [enum`SandboxSelector]``.AUTO`.
539
+ * Selects which sandbox mechanism should be used. The default without calling this function is {@link SandboxSelector}`.AUTO`.
487
540
  * @param sandbox_selector Method by which the sandbox mechanism is selected
488
541
  */
489
542
  set_sandbox_selector(sandbox_selector: SandboxSelector | null): boolean;
@@ -504,12 +557,17 @@ export namespace Gly {
504
557
 
505
558
  /**
506
559
  * Encoded image
560
+ * @gir-type Class
561
+ * @since 2.0
507
562
  */
508
563
  class EncodedImage extends GObject.Object {
509
564
  static $gtype: GObject.GType<EncodedImage>;
510
565
 
511
566
  // Properties
512
567
 
568
+ /**
569
+ * @read-only
570
+ */
513
571
  get data(): GLib.Bytes;
514
572
 
515
573
  /**
@@ -529,16 +587,19 @@ export namespace Gly {
529
587
 
530
588
  // Signals
531
589
 
590
+ /** @signal */
532
591
  connect<K extends keyof EncodedImage.SignalSignatures>(
533
592
  signal: K,
534
593
  callback: GObject.SignalCallback<this, EncodedImage.SignalSignatures[K]>,
535
594
  ): number;
536
595
  connect(signal: string, callback: (...args: any[]) => any): number;
596
+ /** @signal */
537
597
  connect_after<K extends keyof EncodedImage.SignalSignatures>(
538
598
  signal: K,
539
599
  callback: GObject.SignalCallback<this, EncodedImage.SignalSignatures[K]>,
540
600
  ): number;
541
601
  connect_after(signal: string, callback: (...args: any[]) => any): number;
602
+ /** @signal */
542
603
  emit<K extends keyof EncodedImage.SignalSignatures>(
543
604
  signal: K,
544
605
  ...args: GObject.GjsParameters<EncodedImage.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -547,7 +608,13 @@ export namespace Gly {
547
608
 
548
609
  // Methods
549
610
 
611
+ /**
612
+ * @returns The encoded image data
613
+ */
550
614
  get_data(): GLib.Bytes;
615
+ /**
616
+ * @param args
617
+ */
551
618
  // Conflicted with GObject.Object.get_data
552
619
  get_data(...args: never[]): any;
553
620
  }
@@ -563,6 +630,8 @@ export namespace Gly {
563
630
 
564
631
  /**
565
632
  * A frame of an image often being the complete image.
633
+ * @gir-type Class
634
+ * @since 2.0
566
635
  */
567
636
  class Frame extends GObject.Object {
568
637
  static $gtype: GObject.GType<Frame>;
@@ -584,16 +653,19 @@ export namespace Gly {
584
653
 
585
654
  // Signals
586
655
 
656
+ /** @signal */
587
657
  connect<K extends keyof Frame.SignalSignatures>(
588
658
  signal: K,
589
659
  callback: GObject.SignalCallback<this, Frame.SignalSignatures[K]>,
590
660
  ): number;
591
661
  connect(signal: string, callback: (...args: any[]) => any): number;
662
+ /** @signal */
592
663
  connect_after<K extends keyof Frame.SignalSignatures>(
593
664
  signal: K,
594
665
  callback: GObject.SignalCallback<this, Frame.SignalSignatures[K]>,
595
666
  ): number;
596
667
  connect_after(signal: string, callback: (...args: any[]) => any): number;
668
+ /** @signal */
597
669
  emit<K extends keyof Frame.SignalSignatures>(
598
670
  signal: K,
599
671
  ...args: GObject.GjsParameters<Frame.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -603,7 +675,7 @@ export namespace Gly {
603
675
  // Methods
604
676
 
605
677
  /**
606
- * Image data arranged according to [method`Frame`.get_memory_format]
678
+ * Image data arranged according to {@link Frame.get_memory_format}
607
679
  * @returns Image data
608
680
  */
609
681
  get_buf_bytes(): GLib.Bytes;
@@ -626,7 +698,7 @@ export namespace Gly {
626
698
  */
627
699
  get_height(): number;
628
700
  /**
629
- * Format of the image data in [method`Gly`.Frame.get_buf_bytes]
701
+ * Format of the image data in {@link Gly.Frame.get_buf_bytes}
630
702
  * @returns Format of image data
631
703
  */
632
704
  get_memory_format(): MemoryFormat;
@@ -645,6 +717,7 @@ export namespace Gly {
645
717
  namespace FrameRequest {
646
718
  // Signal signatures
647
719
  interface SignalSignatures extends GObject.Object.SignalSignatures {
720
+ 'notify::loop-animation': (pspec: GObject.ParamSpec) => void;
648
721
  'notify::scale-height': (pspec: GObject.ParamSpec) => void;
649
722
  'notify::scale-width': (pspec: GObject.ParamSpec) => void;
650
723
  }
@@ -652,6 +725,8 @@ export namespace Gly {
652
725
  // Constructor properties interface
653
726
 
654
727
  interface ConstructorProps extends GObject.Object.ConstructorProps {
728
+ loop_animation: boolean;
729
+ loopAnimation: boolean;
655
730
  scale_height: number;
656
731
  scaleHeight: number;
657
732
  scale_width: number;
@@ -664,17 +739,35 @@ export namespace Gly {
664
739
  *
665
740
  * ::: warning
666
741
  * Loaders can and frequently will ignore instructions set in
667
- * `GlyFrameRequest`. The reason is that for most loaders
742
+ * {@link Gly.FrameRequest}. The reason is that for most loaders
668
743
  * many instructions don't have a meaningful interpretation.
744
+ * @gir-type Class
745
+ * @since 2.0
669
746
  */
670
747
  class FrameRequest extends GObject.Object {
671
748
  static $gtype: GObject.GType<FrameRequest>;
672
749
 
673
750
  // Properties
674
751
 
752
+ get loop_animation(): boolean;
753
+ set loop_animation(val: boolean);
754
+ get loopAnimation(): boolean;
755
+ set loopAnimation(val: boolean);
756
+ /**
757
+ * @read-only
758
+ */
675
759
  get scale_height(): number;
760
+ /**
761
+ * @read-only
762
+ */
676
763
  get scaleHeight(): number;
764
+ /**
765
+ * @read-only
766
+ */
677
767
  get scale_width(): number;
768
+ /**
769
+ * @read-only
770
+ */
678
771
  get scaleWidth(): number;
679
772
 
680
773
  /**
@@ -696,16 +789,19 @@ export namespace Gly {
696
789
 
697
790
  // Signals
698
791
 
792
+ /** @signal */
699
793
  connect<K extends keyof FrameRequest.SignalSignatures>(
700
794
  signal: K,
701
795
  callback: GObject.SignalCallback<this, FrameRequest.SignalSignatures[K]>,
702
796
  ): number;
703
797
  connect(signal: string, callback: (...args: any[]) => any): number;
798
+ /** @signal */
704
799
  connect_after<K extends keyof FrameRequest.SignalSignatures>(
705
800
  signal: K,
706
801
  callback: GObject.SignalCallback<this, FrameRequest.SignalSignatures[K]>,
707
802
  ): number;
708
803
  connect_after(signal: string, callback: (...args: any[]) => any): number;
804
+ /** @signal */
709
805
  emit<K extends keyof FrameRequest.SignalSignatures>(
710
806
  signal: K,
711
807
  ...args: GObject.GjsParameters<FrameRequest.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -714,6 +810,14 @@ export namespace Gly {
714
810
 
715
811
  // Methods
716
812
 
813
+ /**
814
+ * Controls if first frame is returned after last frame
815
+ *
816
+ * By default, this option is set to `TRUE`, returning the first frame, if
817
+ * the previously requested frame was the last frame.
818
+ * @param loop_animation
819
+ */
820
+ set_loop_animation(loop_animation: boolean): void;
717
821
  /**
718
822
  * Set maximum dimensions for the frame. The texture will be scaled
719
823
  * to be within the maximum dimensions while keeping its aspect ratio.
@@ -740,6 +844,8 @@ export namespace Gly {
740
844
 
741
845
  /**
742
846
  * Image handle containing metadata and allowing frame requests.
847
+ * @gir-type Class
848
+ * @since 2.0
743
849
  */
744
850
  class Image extends GObject.Object {
745
851
  static $gtype: GObject.GType<Image>;
@@ -761,16 +867,19 @@ export namespace Gly {
761
867
 
762
868
  // Signals
763
869
 
870
+ /** @signal */
764
871
  connect<K extends keyof Image.SignalSignatures>(
765
872
  signal: K,
766
873
  callback: GObject.SignalCallback<this, Image.SignalSignatures[K]>,
767
874
  ): number;
768
875
  connect(signal: string, callback: (...args: any[]) => any): number;
876
+ /** @signal */
769
877
  connect_after<K extends keyof Image.SignalSignatures>(
770
878
  signal: K,
771
879
  callback: GObject.SignalCallback<this, Image.SignalSignatures[K]>,
772
880
  ): number;
773
881
  connect_after(signal: string, callback: (...args: any[]) => any): number;
882
+ /** @signal */
774
883
  emit<K extends keyof Image.SignalSignatures>(
775
884
  signal: K,
776
885
  ...args: GObject.GjsParameters<Image.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -780,7 +889,7 @@ export namespace Gly {
780
889
  // Methods
781
890
 
782
891
  /**
783
- * See [method`Image`.get_width]
892
+ * See {@link Image.get_width}
784
893
  * @returns height
785
894
  */
786
895
  get_height(): number;
@@ -796,7 +905,7 @@ export namespace Gly {
796
905
  */
797
906
  get_metadata_key_value(key: string): string | null;
798
907
  /**
799
- * Get the list of available keys for [method`Image`.get_metadata_key_value].
908
+ * Get the list of available keys for {@link Image.get_metadata_key_value}.
800
909
  * @returns List of existing keys.
801
910
  */
802
911
  get_metadata_keys(): string[];
@@ -805,20 +914,24 @@ export namespace Gly {
805
914
  * @returns MIME type
806
915
  */
807
916
  get_mime_type(): string;
917
+ /**
918
+ * @param frame_request
919
+ * @returns Loaded frame.
920
+ */
808
921
  get_specific_frame(frame_request: FrameRequest): Frame;
809
922
  /**
810
- * Asynchronous version of [method`Image`.get_specific_frame].
923
+ * Asynchronous version of {@link Image.get_specific_frame}.
811
924
  * @param frame_request
812
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
925
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
813
926
  */
814
927
  get_specific_frame_async(
815
928
  frame_request: FrameRequest,
816
929
  cancellable?: Gio.Cancellable | null,
817
930
  ): globalThis.Promise<Frame>;
818
931
  /**
819
- * Asynchronous version of [method`Image`.get_specific_frame].
932
+ * Asynchronous version of {@link Image.get_specific_frame}.
820
933
  * @param frame_request
821
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
934
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
822
935
  * @param callback A callback to call when the operation is complete
823
936
  */
824
937
  get_specific_frame_async(
@@ -827,9 +940,9 @@ export namespace Gly {
827
940
  callback: Gio.AsyncReadyCallback<this> | null,
828
941
  ): void;
829
942
  /**
830
- * Asynchronous version of [method`Image`.get_specific_frame].
943
+ * Asynchronous version of {@link Image.get_specific_frame}.
831
944
  * @param frame_request
832
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
945
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
833
946
  * @param callback A callback to call when the operation is complete
834
947
  */
835
948
  get_specific_frame_async(
@@ -838,8 +951,8 @@ export namespace Gly {
838
951
  callback?: Gio.AsyncReadyCallback<this> | null,
839
952
  ): globalThis.Promise<Frame> | void;
840
953
  /**
841
- * Finishes the [method`Image`.get_specific_frame_async] call.
842
- * @param result a `GAsyncResult`
954
+ * Finishes the {@link Image.get_specific_frame_async} call.
955
+ * @param result a {@link Gio.AsyncResult}
843
956
  * @returns Loaded frame.
844
957
  */
845
958
  get_specific_frame_finish(result: Gio.AsyncResult): Frame;
@@ -849,7 +962,7 @@ export namespace Gly {
849
962
  * The image orientation is given in Exif format. The function is
850
963
  * guaranteed to only return values from 1 to 8.
851
964
  *
852
- * If [method`Loader`.set_apply_transformations] is set to `FALSE`,
965
+ * If {@link Loader.set_apply_transformations} is set to `FALSE`,
853
966
  * the orientation has to be corrected manually to dispaly the image
854
967
  * correctly.
855
968
  */
@@ -859,7 +972,7 @@ export namespace Gly {
859
972
  *
860
973
  * This information is often correct. However, it should only be used for
861
974
  * an early rendering estimates. For everything else, the specific frame
862
- * information should be used. See [method`Frame`.get_width].
975
+ * information should be used. See {@link Frame.get_width}.
863
976
  * @returns Width
864
977
  */
865
978
  get_width(): number;
@@ -868,23 +981,23 @@ export namespace Gly {
868
981
  *
869
982
  * For single still images, this can only be called once.
870
983
  * For animated images, this function will loop to the first frame, when the last frame is reached.
871
- * @returns a new [class@Frame] on success, or `NULL` with @error filled in
984
+ * @returns a new {@link Frame} on success, or `NULL` with `error` filled in
872
985
  */
873
986
  next_frame(): Frame;
874
987
  /**
875
- * Asynchronous version of [method`Image`.next_frame].
876
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
988
+ * Asynchronous version of {@link Image.next_frame}.
989
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
877
990
  */
878
991
  next_frame_async(cancellable?: Gio.Cancellable | null): globalThis.Promise<Frame>;
879
992
  /**
880
- * Asynchronous version of [method`Image`.next_frame].
881
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
993
+ * Asynchronous version of {@link Image.next_frame}.
994
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
882
995
  * @param callback A callback to call when the operation is complete
883
996
  */
884
997
  next_frame_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
885
998
  /**
886
- * Asynchronous version of [method`Image`.next_frame].
887
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
999
+ * Asynchronous version of {@link Image.next_frame}.
1000
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
888
1001
  * @param callback A callback to call when the operation is complete
889
1002
  */
890
1003
  next_frame_async(
@@ -892,8 +1005,8 @@ export namespace Gly {
892
1005
  callback?: Gio.AsyncReadyCallback<this> | null,
893
1006
  ): globalThis.Promise<Frame> | void;
894
1007
  /**
895
- * Finishes the [method`Image`.next_frame_async] call.
896
- * @param result a `GAsyncResult`
1008
+ * Finishes the {@link Image.next_frame_async} call.
1009
+ * @param result a {@link Gio.AsyncResult}
897
1010
  * @returns Loaded frame.
898
1011
  */
899
1012
  next_frame_finish(result: Gio.AsyncResult): Frame;
@@ -928,7 +1041,7 @@ export namespace Gly {
928
1041
  }
929
1042
 
930
1043
  /**
931
- * [class`Loader]` prepares loading an image.
1044
+ * {@link Loader} prepares loading an image.
932
1045
  *
933
1046
  * The following example shows how to obtain a `Gdk.Texture`. It uses
934
1047
  * [GlyGtk4](https://gnome.pages.gitlab.gnome.org/glycin/libglycin-gtk4)
@@ -941,15 +1054,18 @@ export namespace Gly {
941
1054
  * loader = gly_loader_new (file);
942
1055
  * image = gly_loader_load (loader, NULL);
943
1056
  * if (image)
944
- * {
945
- * frame = gly_image_next_frame (image, NULL);
946
- * if (frame) {
947
- * texture = gly_gtk_frame_get_texture (frame);
948
- * printf ("Image height: %d\n", gdk_texture_get_height (texture));
949
- * image_widget = gtk_image_new_from_paintable (GDK_PAINTABLE (texture));
1057
+ * {
1058
+ * frame = gly_image_next_frame (image, NULL);
1059
+ * if (frame)
1060
+ * {
1061
+ * texture = gly_gtk_frame_get_texture (frame);
1062
+ * g_print ("Image height: %d\n", gdk_texture_get_height (texture));
1063
+ * image_widget = gtk_image_new_from_paintable (GDK_PAINTABLE (texture));
1064
+ * }
950
1065
  * }
951
- * }
952
1066
  * ```
1067
+ * @gir-type Class
1068
+ * @since 2.0
953
1069
  */
954
1070
  class Loader extends GObject.Object {
955
1071
  static $gtype: GObject.GType<Loader>;
@@ -960,9 +1076,15 @@ export namespace Gly {
960
1076
  set apply_transformation(val: boolean);
961
1077
  get applyTransformation(): boolean;
962
1078
  set applyTransformation(val: boolean);
1079
+ /**
1080
+ * @construct-only
1081
+ */
963
1082
  get bytes(): GLib.Bytes;
964
1083
  get cancellable(): Gio.Cancellable;
965
1084
  set cancellable(val: Gio.Cancellable);
1085
+ /**
1086
+ * @construct-only
1087
+ */
966
1088
  get file(): Gio.File;
967
1089
  get memory_format_selection(): MemoryFormatSelection;
968
1090
  set memory_format_selection(val: MemoryFormatSelection);
@@ -972,6 +1094,9 @@ export namespace Gly {
972
1094
  set sandbox_selector(val: SandboxSelector);
973
1095
  get sandboxSelector(): SandboxSelector;
974
1096
  set sandboxSelector(val: SandboxSelector);
1097
+ /**
1098
+ * @construct-only
1099
+ */
975
1100
  get stream(): Gio.InputStream;
976
1101
 
977
1102
  /**
@@ -997,16 +1122,19 @@ export namespace Gly {
997
1122
 
998
1123
  // Signals
999
1124
 
1125
+ /** @signal */
1000
1126
  connect<K extends keyof Loader.SignalSignatures>(
1001
1127
  signal: K,
1002
1128
  callback: GObject.SignalCallback<this, Loader.SignalSignatures[K]>,
1003
1129
  ): number;
1004
1130
  connect(signal: string, callback: (...args: any[]) => any): number;
1131
+ /** @signal */
1005
1132
  connect_after<K extends keyof Loader.SignalSignatures>(
1006
1133
  signal: K,
1007
1134
  callback: GObject.SignalCallback<this, Loader.SignalSignatures[K]>,
1008
1135
  ): number;
1009
1136
  connect_after(signal: string, callback: (...args: any[]) => any): number;
1137
+ /** @signal */
1010
1138
  emit<K extends keyof Loader.SignalSignatures>(
1011
1139
  signal: K,
1012
1140
  ...args: GObject.GjsParameters<Loader.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -1024,7 +1152,7 @@ export namespace Gly {
1024
1152
  */
1025
1153
  static get_mime_types(): string[];
1026
1154
  /**
1027
- * Async variant of [func`Loader`.get_mime_types]
1155
+ * Async variant of {@link Loader.get_mime_types}
1028
1156
  * @param cancellable
1029
1157
  * @param callback
1030
1158
  */
@@ -1033,32 +1161,32 @@ export namespace Gly {
1033
1161
  callback?: Gio.AsyncReadyCallback<Loader> | null,
1034
1162
  ): void;
1035
1163
  /**
1036
- * Finishes the [func`Loader`.get_mime_types_async] call.
1037
- * @param result A `GAsyncResult`
1164
+ * Finishes the {@link Loader.get_mime_types_async} call.
1165
+ * @param result A {@link Gio.AsyncResult}
1038
1166
  */
1039
1167
  static get_mime_types_finish(result: Gio.AsyncResult): string[];
1040
1168
 
1041
1169
  // Methods
1042
1170
 
1043
1171
  /**
1044
- * Synchronously loads an image and returns an [class`Image]` when successful.
1045
- * @returns a new [class@Image] on success, or `NULL` with @error filled in
1172
+ * Synchronously loads an image and returns an {@link Image} when successful.
1173
+ * @returns a new {@link Image} on success, or `NULL` with `error` filled in
1046
1174
  */
1047
1175
  load(): Image;
1048
1176
  /**
1049
- * Asynchronous version of [method`Loader`.load].
1050
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
1177
+ * Asynchronous version of {@link Loader.load}.
1178
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
1051
1179
  */
1052
1180
  load_async(cancellable?: Gio.Cancellable | null): globalThis.Promise<Image>;
1053
1181
  /**
1054
- * Asynchronous version of [method`Loader`.load].
1055
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
1182
+ * Asynchronous version of {@link Loader.load}.
1183
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
1056
1184
  * @param callback A callback to call when the operation is complete
1057
1185
  */
1058
1186
  load_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
1059
1187
  /**
1060
- * Asynchronous version of [method`Loader`.load].
1061
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
1188
+ * Asynchronous version of {@link Loader.load}.
1189
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
1062
1190
  * @param callback A callback to call when the operation is complete
1063
1191
  */
1064
1192
  load_async(
@@ -1066,8 +1194,8 @@ export namespace Gly {
1066
1194
  callback?: Gio.AsyncReadyCallback<this> | null,
1067
1195
  ): globalThis.Promise<Image> | void;
1068
1196
  /**
1069
- * Finishes the [method`Loader`.load_async] call.
1070
- * @param result A `GAsyncResult`
1197
+ * Finishes the {@link Loader.load_async} call.
1198
+ * @param result A {@link Gio.AsyncResult}
1071
1199
  * @returns Loaded image.
1072
1200
  */
1073
1201
  load_finish(result: Gio.AsyncResult): Image;
@@ -1090,7 +1218,7 @@ export namespace Gly {
1090
1218
  */
1091
1219
  set_apply_transformations(apply_transformations: boolean): void;
1092
1220
  /**
1093
- * Selects which sandbox mechanism should be used. The default without calling this function is [enum`SandboxSelector]``.AUTO`.
1221
+ * Selects which sandbox mechanism should be used. The default without calling this function is {@link SandboxSelector}`.AUTO`.
1094
1222
  * @param sandbox_selector Method by which the sandbox mechanism is selected
1095
1223
  */
1096
1224
  set_sandbox_selector(sandbox_selector: SandboxSelector | null): void;
@@ -1107,6 +1235,8 @@ export namespace Gly {
1107
1235
 
1108
1236
  /**
1109
1237
  * New frame
1238
+ * @gir-type Class
1239
+ * @since 2.0
1110
1240
  */
1111
1241
  class NewFrame extends GObject.Object {
1112
1242
  static $gtype: GObject.GType<NewFrame>;
@@ -1128,16 +1258,19 @@ export namespace Gly {
1128
1258
 
1129
1259
  // Signals
1130
1260
 
1261
+ /** @signal */
1131
1262
  connect<K extends keyof NewFrame.SignalSignatures>(
1132
1263
  signal: K,
1133
1264
  callback: GObject.SignalCallback<this, NewFrame.SignalSignatures[K]>,
1134
1265
  ): number;
1135
1266
  connect(signal: string, callback: (...args: any[]) => any): number;
1267
+ /** @signal */
1136
1268
  connect_after<K extends keyof NewFrame.SignalSignatures>(
1137
1269
  signal: K,
1138
1270
  callback: GObject.SignalCallback<this, NewFrame.SignalSignatures[K]>,
1139
1271
  ): number;
1140
1272
  connect_after(signal: string, callback: (...args: any[]) => any): number;
1273
+ /** @signal */
1141
1274
  emit<K extends keyof NewFrame.SignalSignatures>(
1142
1275
  signal: K,
1143
1276
  ...args: GObject.GjsParameters<NewFrame.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -1146,11 +1279,17 @@ export namespace Gly {
1146
1279
 
1147
1280
  // Methods
1148
1281
 
1282
+ /**
1283
+ * @param icc_profile ICC profile
1284
+ * @returns `TRUE` if format supports ICC color profiles.
1285
+ */
1149
1286
  set_color_icc_profile(icc_profile: GLib.Bytes | Uint8Array): boolean;
1150
1287
  }
1151
1288
 
1152
1289
  /**
1153
1290
  * See ITU-T H.273
1291
+ * @gir-type Struct
1292
+ * @since 2.0
1154
1293
  */
1155
1294
  class Cicp {
1156
1295
  static $gtype: GObject.GType<Cicp>;
@@ -1179,12 +1318,33 @@ export namespace Gly {
1179
1318
  free(): void;
1180
1319
  }
1181
1320
 
1321
+ /**
1322
+ * @gir-type Alias
1323
+ */
1182
1324
  type CreatorClass = typeof Creator;
1325
+ /**
1326
+ * @gir-type Alias
1327
+ */
1183
1328
  type EncodedImageClass = typeof EncodedImage;
1329
+ /**
1330
+ * @gir-type Alias
1331
+ */
1184
1332
  type FrameClass = typeof Frame;
1333
+ /**
1334
+ * @gir-type Alias
1335
+ */
1185
1336
  type FrameRequestClass = typeof FrameRequest;
1337
+ /**
1338
+ * @gir-type Alias
1339
+ */
1186
1340
  type ImageClass = typeof Image;
1341
+ /**
1342
+ * @gir-type Alias
1343
+ */
1187
1344
  type LoaderClass = typeof Loader;
1345
+ /**
1346
+ * @gir-type Alias
1347
+ */
1188
1348
  type NewFrameClass = typeof NewFrame;
1189
1349
  /**
1190
1350
  * Name of the imported GIR library
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gly-2",
3
- "version": "2.0.0-4.0.0-beta.39",
3
+ "version": "2.0.0-4.0.0-beta.41",
4
4
  "description": "GJS TypeScript type definitions for Gly-2, generated from library version 2.0.0",
5
5
  "type": "module",
6
6
  "module": "gly-2.js",
@@ -31,11 +31,11 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/gjs": "4.0.0-beta.39",
35
- "@girs/gio-2.0": "2.86.4-4.0.0-beta.39",
36
- "@girs/gobject-2.0": "2.86.4-4.0.0-beta.39",
37
- "@girs/glib-2.0": "2.86.4-4.0.0-beta.39",
38
- "@girs/gmodule-2.0": "2.0.0-4.0.0-beta.39" },
34
+ "@girs/gjs": "4.0.0-beta.41",
35
+ "@girs/gio-2.0": "2.88.0-4.0.0-beta.41",
36
+ "@girs/gobject-2.0": "2.88.0-4.0.0-beta.41",
37
+ "@girs/glib-2.0": "2.88.0-4.0.0-beta.41",
38
+ "@girs/gmodule-2.0": "2.0.0-4.0.0-beta.41" },
39
39
  "devDependencies": {
40
40
  "typescript": "*"
41
41
  },
package/tsconfig.json CHANGED
@@ -17,7 +17,24 @@
17
17
  "inlineSources": false,
18
18
  "newLine": "LF",
19
19
  // Show diagnostics
20
- "diagnostics": true
20
+ "diagnostics": true,
21
+ "paths": {
22
+ "@girs/gio-2.0": [
23
+ "../gio-2.0/index.d.ts"
24
+ ],
25
+ "@girs/gobject-2.0": [
26
+ "../gobject-2.0/index.d.ts"
27
+ ],
28
+ "@girs/glib-2.0": [
29
+ "../glib-2.0/index.d.ts"
30
+ ],
31
+ "@girs/gmodule-2.0": [
32
+ "../gmodule-2.0/index.d.ts"
33
+ ],
34
+ "@girs/gjs": [
35
+ "../gjs/index.d.ts"
36
+ ]
37
+ }
21
38
  },
22
39
  "include": ["./gly-2.d.ts"]
23
40
  }
package/typedoc.json CHANGED
@@ -2,6 +2,8 @@
2
2
  "entryPoints": ["./gly-2.d.ts"],
3
3
  "readme": "./README.md",
4
4
  "name": "Gly-2",
5
- "tsconfig": "./tsconfig.json"
5
+ "tsconfig": "./tsconfig.json",
6
+ "skipErrorChecking": true,
7
+ "highlightLanguages": ["typescript", "javascript", "c", "cpp", "xml", "bash", "json", "css"]
6
8
  }
7
9