@girs/gly-2 2.0.0-4.0.0-beta.40 → 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.40.
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,6 +22,7 @@ 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
28
  static $gtype: GObject.GType<GLib.Error>;
@@ -30,12 +31,19 @@ export namespace Gly {
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,17 +52,22 @@ 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
 
60
+ /**
61
+ * @gir-type Enum
62
+ */
52
63
  export namespace MemoryFormat {
53
64
  export const $gtype: GObject.GType<MemoryFormat>;
54
65
  }
55
66
 
56
67
  /**
57
68
  * Memory format
69
+ * @gir-type Enum
70
+ * @since 2.0
58
71
  */
59
72
  enum MemoryFormat {
60
73
  /**
@@ -151,6 +164,9 @@ export namespace Gly {
151
164
  G16,
152
165
  }
153
166
 
167
+ /**
168
+ * @gir-type Enum
169
+ */
154
170
  export namespace SandboxSelector {
155
171
  export const $gtype: GObject.GType<SandboxSelector>;
156
172
  }
@@ -160,6 +176,8 @@ export namespace Gly {
160
176
  *
161
177
  * ::: warning
162
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
163
181
  */
164
182
  enum SandboxSelector {
165
183
  /**
@@ -189,7 +207,7 @@ export namespace Gly {
189
207
  }
190
208
 
191
209
  /**
192
- * Error quark for [error`GlyLoaderError]`
210
+ * Error quark for {@link GlyLoaderError}
193
211
  * @returns The error domain
194
212
  */
195
213
  function loader_error_quark(): GLib.Quark;
@@ -197,6 +215,7 @@ export namespace Gly {
197
215
  * Whether a memory format has an alpha channel
198
216
  * @param memory_format
199
217
  * @returns Returns `TRUE` if the memory format has an alpha channel
218
+ * @since 2.0
200
219
  */
201
220
  function memory_format_has_alpha(memory_format: MemoryFormat | null): boolean;
202
221
  /**
@@ -204,21 +223,30 @@ export namespace Gly {
204
223
  * premultiplied with the alpha value
205
224
  * @param memory_format
206
225
  * @returns Returns `TRUE` if color channels are premultiplied
226
+ * @since 2.0
207
227
  */
208
228
  function memory_format_is_premultiplied(memory_format: MemoryFormat | null): boolean;
229
+ /**
230
+ * @gir-type Callback
231
+ */
209
232
  interface LoaderGetMimeTypesDoneFunc {
210
233
  (mime_types: string[], data?: any | null): void;
211
234
  }
235
+ /**
236
+ * @gir-type Flags
237
+ */
212
238
  export namespace MemoryFormatSelection {
213
239
  export const $gtype: GObject.GType<MemoryFormatSelection>;
214
240
  }
215
241
 
216
242
  /**
217
243
  * Memory format selection
244
+ * @gir-type Flags
245
+ * @since 2.0
218
246
  */
219
247
  enum MemoryFormatSelection {
220
248
  /**
221
- * 8-bit RGRA premultiplied
249
+ * 8-bit BGRA premultiplied
222
250
  */
223
251
  B8G8R8A8_PREMULTIPLIED,
224
252
  /**
@@ -230,11 +258,11 @@ export namespace Gly {
230
258
  */
231
259
  R8G8B8A8_PREMULTIPLIED,
232
260
  /**
233
- * 8-bit RGBA
261
+ * 8-bit BGRA
234
262
  */
235
263
  B8G8R8A8,
236
264
  /**
237
- * 8-bit AGBR
265
+ * 8-bit ARGB
238
266
  */
239
267
  A8R8G8B8,
240
268
  /**
@@ -368,13 +396,21 @@ export namespace Gly {
368
396
  * }
369
397
  * }
370
398
  * ```
399
+ * @gir-type Class
400
+ * @since 2.0
371
401
  */
372
402
  class Creator extends GObject.Object {
373
403
  static $gtype: GObject.GType<Creator>;
374
404
 
375
405
  // Properties
376
406
 
407
+ /**
408
+ * @construct-only
409
+ */
377
410
  get mime_type(): string;
411
+ /**
412
+ * @construct-only
413
+ */
378
414
  get mimeType(): string;
379
415
  get sandbox_selector(): SandboxSelector;
380
416
  set sandbox_selector(val: SandboxSelector);
@@ -400,16 +436,19 @@ export namespace Gly {
400
436
 
401
437
  // Signals
402
438
 
439
+ /** @signal */
403
440
  connect<K extends keyof Creator.SignalSignatures>(
404
441
  signal: K,
405
442
  callback: GObject.SignalCallback<this, Creator.SignalSignatures[K]>,
406
443
  ): number;
407
444
  connect(signal: string, callback: (...args: any[]) => any): number;
445
+ /** @signal */
408
446
  connect_after<K extends keyof Creator.SignalSignatures>(
409
447
  signal: K,
410
448
  callback: GObject.SignalCallback<this, Creator.SignalSignatures[K]>,
411
449
  ): number;
412
450
  connect_after(signal: string, callback: (...args: any[]) => any): number;
451
+ /** @signal */
413
452
  emit<K extends keyof Creator.SignalSignatures>(
414
453
  signal: K,
415
454
  ...args: GObject.GjsParameters<Creator.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -418,12 +457,27 @@ export namespace Gly {
418
457
 
419
458
  // Methods
420
459
 
460
+ /**
461
+ * @param width
462
+ * @param height
463
+ * @param memory_format
464
+ * @param texture Texture data
465
+ * @returns a new {@link NewFrame}
466
+ */
421
467
  add_frame(
422
468
  width: number,
423
469
  height: number,
424
470
  memory_format: MemoryFormat | null,
425
471
  texture: GLib.Bytes | Uint8Array,
426
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
+ */
427
481
  add_frame_with_stride(
428
482
  width: number,
429
483
  height: number,
@@ -441,21 +495,24 @@ export namespace Gly {
441
495
  * @returns `TRUE` if format supports key-value storage.
442
496
  */
443
497
  add_metadata_key_value(key: string, value: string): boolean;
498
+ /**
499
+ * @returns The encoded image.
500
+ */
444
501
  create(): EncodedImage | null;
445
502
  /**
446
- * Asynchronous version of [method`Creator`.create].
447
- * @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
448
505
  */
449
506
  create_async(cancellable?: Gio.Cancellable | null): globalThis.Promise<EncodedImage>;
450
507
  /**
451
- * Asynchronous version of [method`Creator`.create].
452
- * @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
453
510
  * @param callback A callback to call when the operation is complete
454
511
  */
455
512
  create_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
456
513
  /**
457
- * Asynchronous version of [method`Creator`.create].
458
- * @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
459
516
  * @param callback A callback to call when the operation is complete
460
517
  */
461
518
  create_async(
@@ -463,15 +520,23 @@ export namespace Gly {
463
520
  callback?: Gio.AsyncReadyCallback<this> | null,
464
521
  ): globalThis.Promise<EncodedImage> | void;
465
522
  /**
466
- * Finishes the [method`Creator`.create_async] call.
467
- * @param result A `GAsyncResult`
523
+ * Finishes the {@link Creator.create_async} call.
524
+ * @param result A {@link Gio.AsyncResult}
468
525
  * @returns Encoded image.
469
526
  */
470
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
+ */
471
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
+ */
472
537
  set_encoding_quality(quality: number): boolean;
473
538
  /**
474
- * 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`.
475
540
  * @param sandbox_selector Method by which the sandbox mechanism is selected
476
541
  */
477
542
  set_sandbox_selector(sandbox_selector: SandboxSelector | null): boolean;
@@ -492,12 +557,17 @@ export namespace Gly {
492
557
 
493
558
  /**
494
559
  * Encoded image
560
+ * @gir-type Class
561
+ * @since 2.0
495
562
  */
496
563
  class EncodedImage extends GObject.Object {
497
564
  static $gtype: GObject.GType<EncodedImage>;
498
565
 
499
566
  // Properties
500
567
 
568
+ /**
569
+ * @read-only
570
+ */
501
571
  get data(): GLib.Bytes;
502
572
 
503
573
  /**
@@ -517,16 +587,19 @@ export namespace Gly {
517
587
 
518
588
  // Signals
519
589
 
590
+ /** @signal */
520
591
  connect<K extends keyof EncodedImage.SignalSignatures>(
521
592
  signal: K,
522
593
  callback: GObject.SignalCallback<this, EncodedImage.SignalSignatures[K]>,
523
594
  ): number;
524
595
  connect(signal: string, callback: (...args: any[]) => any): number;
596
+ /** @signal */
525
597
  connect_after<K extends keyof EncodedImage.SignalSignatures>(
526
598
  signal: K,
527
599
  callback: GObject.SignalCallback<this, EncodedImage.SignalSignatures[K]>,
528
600
  ): number;
529
601
  connect_after(signal: string, callback: (...args: any[]) => any): number;
602
+ /** @signal */
530
603
  emit<K extends keyof EncodedImage.SignalSignatures>(
531
604
  signal: K,
532
605
  ...args: GObject.GjsParameters<EncodedImage.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -535,7 +608,13 @@ export namespace Gly {
535
608
 
536
609
  // Methods
537
610
 
611
+ /**
612
+ * @returns The encoded image data
613
+ */
538
614
  get_data(): GLib.Bytes;
615
+ /**
616
+ * @param args
617
+ */
539
618
  // Conflicted with GObject.Object.get_data
540
619
  get_data(...args: never[]): any;
541
620
  }
@@ -551,6 +630,8 @@ export namespace Gly {
551
630
 
552
631
  /**
553
632
  * A frame of an image often being the complete image.
633
+ * @gir-type Class
634
+ * @since 2.0
554
635
  */
555
636
  class Frame extends GObject.Object {
556
637
  static $gtype: GObject.GType<Frame>;
@@ -572,16 +653,19 @@ export namespace Gly {
572
653
 
573
654
  // Signals
574
655
 
656
+ /** @signal */
575
657
  connect<K extends keyof Frame.SignalSignatures>(
576
658
  signal: K,
577
659
  callback: GObject.SignalCallback<this, Frame.SignalSignatures[K]>,
578
660
  ): number;
579
661
  connect(signal: string, callback: (...args: any[]) => any): number;
662
+ /** @signal */
580
663
  connect_after<K extends keyof Frame.SignalSignatures>(
581
664
  signal: K,
582
665
  callback: GObject.SignalCallback<this, Frame.SignalSignatures[K]>,
583
666
  ): number;
584
667
  connect_after(signal: string, callback: (...args: any[]) => any): number;
668
+ /** @signal */
585
669
  emit<K extends keyof Frame.SignalSignatures>(
586
670
  signal: K,
587
671
  ...args: GObject.GjsParameters<Frame.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -591,7 +675,7 @@ export namespace Gly {
591
675
  // Methods
592
676
 
593
677
  /**
594
- * Image data arranged according to [method`Frame`.get_memory_format]
678
+ * Image data arranged according to {@link Frame.get_memory_format}
595
679
  * @returns Image data
596
680
  */
597
681
  get_buf_bytes(): GLib.Bytes;
@@ -614,7 +698,7 @@ export namespace Gly {
614
698
  */
615
699
  get_height(): number;
616
700
  /**
617
- * 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}
618
702
  * @returns Format of image data
619
703
  */
620
704
  get_memory_format(): MemoryFormat;
@@ -633,6 +717,7 @@ export namespace Gly {
633
717
  namespace FrameRequest {
634
718
  // Signal signatures
635
719
  interface SignalSignatures extends GObject.Object.SignalSignatures {
720
+ 'notify::loop-animation': (pspec: GObject.ParamSpec) => void;
636
721
  'notify::scale-height': (pspec: GObject.ParamSpec) => void;
637
722
  'notify::scale-width': (pspec: GObject.ParamSpec) => void;
638
723
  }
@@ -640,6 +725,8 @@ export namespace Gly {
640
725
  // Constructor properties interface
641
726
 
642
727
  interface ConstructorProps extends GObject.Object.ConstructorProps {
728
+ loop_animation: boolean;
729
+ loopAnimation: boolean;
643
730
  scale_height: number;
644
731
  scaleHeight: number;
645
732
  scale_width: number;
@@ -652,17 +739,35 @@ export namespace Gly {
652
739
  *
653
740
  * ::: warning
654
741
  * Loaders can and frequently will ignore instructions set in
655
- * `GlyFrameRequest`. The reason is that for most loaders
742
+ * {@link Gly.FrameRequest}. The reason is that for most loaders
656
743
  * many instructions don't have a meaningful interpretation.
744
+ * @gir-type Class
745
+ * @since 2.0
657
746
  */
658
747
  class FrameRequest extends GObject.Object {
659
748
  static $gtype: GObject.GType<FrameRequest>;
660
749
 
661
750
  // Properties
662
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
+ */
663
759
  get scale_height(): number;
760
+ /**
761
+ * @read-only
762
+ */
664
763
  get scaleHeight(): number;
764
+ /**
765
+ * @read-only
766
+ */
665
767
  get scale_width(): number;
768
+ /**
769
+ * @read-only
770
+ */
666
771
  get scaleWidth(): number;
667
772
 
668
773
  /**
@@ -684,16 +789,19 @@ export namespace Gly {
684
789
 
685
790
  // Signals
686
791
 
792
+ /** @signal */
687
793
  connect<K extends keyof FrameRequest.SignalSignatures>(
688
794
  signal: K,
689
795
  callback: GObject.SignalCallback<this, FrameRequest.SignalSignatures[K]>,
690
796
  ): number;
691
797
  connect(signal: string, callback: (...args: any[]) => any): number;
798
+ /** @signal */
692
799
  connect_after<K extends keyof FrameRequest.SignalSignatures>(
693
800
  signal: K,
694
801
  callback: GObject.SignalCallback<this, FrameRequest.SignalSignatures[K]>,
695
802
  ): number;
696
803
  connect_after(signal: string, callback: (...args: any[]) => any): number;
804
+ /** @signal */
697
805
  emit<K extends keyof FrameRequest.SignalSignatures>(
698
806
  signal: K,
699
807
  ...args: GObject.GjsParameters<FrameRequest.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -702,6 +810,14 @@ export namespace Gly {
702
810
 
703
811
  // Methods
704
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;
705
821
  /**
706
822
  * Set maximum dimensions for the frame. The texture will be scaled
707
823
  * to be within the maximum dimensions while keeping its aspect ratio.
@@ -728,6 +844,8 @@ export namespace Gly {
728
844
 
729
845
  /**
730
846
  * Image handle containing metadata and allowing frame requests.
847
+ * @gir-type Class
848
+ * @since 2.0
731
849
  */
732
850
  class Image extends GObject.Object {
733
851
  static $gtype: GObject.GType<Image>;
@@ -749,16 +867,19 @@ export namespace Gly {
749
867
 
750
868
  // Signals
751
869
 
870
+ /** @signal */
752
871
  connect<K extends keyof Image.SignalSignatures>(
753
872
  signal: K,
754
873
  callback: GObject.SignalCallback<this, Image.SignalSignatures[K]>,
755
874
  ): number;
756
875
  connect(signal: string, callback: (...args: any[]) => any): number;
876
+ /** @signal */
757
877
  connect_after<K extends keyof Image.SignalSignatures>(
758
878
  signal: K,
759
879
  callback: GObject.SignalCallback<this, Image.SignalSignatures[K]>,
760
880
  ): number;
761
881
  connect_after(signal: string, callback: (...args: any[]) => any): number;
882
+ /** @signal */
762
883
  emit<K extends keyof Image.SignalSignatures>(
763
884
  signal: K,
764
885
  ...args: GObject.GjsParameters<Image.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -768,7 +889,7 @@ export namespace Gly {
768
889
  // Methods
769
890
 
770
891
  /**
771
- * See [method`Image`.get_width]
892
+ * See {@link Image.get_width}
772
893
  * @returns height
773
894
  */
774
895
  get_height(): number;
@@ -784,7 +905,7 @@ export namespace Gly {
784
905
  */
785
906
  get_metadata_key_value(key: string): string | null;
786
907
  /**
787
- * 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}.
788
909
  * @returns List of existing keys.
789
910
  */
790
911
  get_metadata_keys(): string[];
@@ -793,20 +914,24 @@ export namespace Gly {
793
914
  * @returns MIME type
794
915
  */
795
916
  get_mime_type(): string;
917
+ /**
918
+ * @param frame_request
919
+ * @returns Loaded frame.
920
+ */
796
921
  get_specific_frame(frame_request: FrameRequest): Frame;
797
922
  /**
798
- * Asynchronous version of [method`Image`.get_specific_frame].
923
+ * Asynchronous version of {@link Image.get_specific_frame}.
799
924
  * @param frame_request
800
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
925
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
801
926
  */
802
927
  get_specific_frame_async(
803
928
  frame_request: FrameRequest,
804
929
  cancellable?: Gio.Cancellable | null,
805
930
  ): globalThis.Promise<Frame>;
806
931
  /**
807
- * Asynchronous version of [method`Image`.get_specific_frame].
932
+ * Asynchronous version of {@link Image.get_specific_frame}.
808
933
  * @param frame_request
809
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
934
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
810
935
  * @param callback A callback to call when the operation is complete
811
936
  */
812
937
  get_specific_frame_async(
@@ -815,9 +940,9 @@ export namespace Gly {
815
940
  callback: Gio.AsyncReadyCallback<this> | null,
816
941
  ): void;
817
942
  /**
818
- * Asynchronous version of [method`Image`.get_specific_frame].
943
+ * Asynchronous version of {@link Image.get_specific_frame}.
819
944
  * @param frame_request
820
- * @param cancellable A [class@Gio.Cancellable] to cancel the operation
945
+ * @param cancellable A {@link Gio.Cancellable} to cancel the operation
821
946
  * @param callback A callback to call when the operation is complete
822
947
  */
823
948
  get_specific_frame_async(
@@ -826,8 +951,8 @@ export namespace Gly {
826
951
  callback?: Gio.AsyncReadyCallback<this> | null,
827
952
  ): globalThis.Promise<Frame> | void;
828
953
  /**
829
- * Finishes the [method`Image`.get_specific_frame_async] call.
830
- * @param result a `GAsyncResult`
954
+ * Finishes the {@link Image.get_specific_frame_async} call.
955
+ * @param result a {@link Gio.AsyncResult}
831
956
  * @returns Loaded frame.
832
957
  */
833
958
  get_specific_frame_finish(result: Gio.AsyncResult): Frame;
@@ -837,7 +962,7 @@ export namespace Gly {
837
962
  * The image orientation is given in Exif format. The function is
838
963
  * guaranteed to only return values from 1 to 8.
839
964
  *
840
- * If [method`Loader`.set_apply_transformations] is set to `FALSE`,
965
+ * If {@link Loader.set_apply_transformations} is set to `FALSE`,
841
966
  * the orientation has to be corrected manually to dispaly the image
842
967
  * correctly.
843
968
  */
@@ -847,7 +972,7 @@ export namespace Gly {
847
972
  *
848
973
  * This information is often correct. However, it should only be used for
849
974
  * an early rendering estimates. For everything else, the specific frame
850
- * information should be used. See [method`Frame`.get_width].
975
+ * information should be used. See {@link Frame.get_width}.
851
976
  * @returns Width
852
977
  */
853
978
  get_width(): number;
@@ -856,23 +981,23 @@ export namespace Gly {
856
981
  *
857
982
  * For single still images, this can only be called once.
858
983
  * For animated images, this function will loop to the first frame, when the last frame is reached.
859
- * @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
860
985
  */
861
986
  next_frame(): Frame;
862
987
  /**
863
- * Asynchronous version of [method`Image`.next_frame].
864
- * @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
865
990
  */
866
991
  next_frame_async(cancellable?: Gio.Cancellable | null): globalThis.Promise<Frame>;
867
992
  /**
868
- * Asynchronous version of [method`Image`.next_frame].
869
- * @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
870
995
  * @param callback A callback to call when the operation is complete
871
996
  */
872
997
  next_frame_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
873
998
  /**
874
- * Asynchronous version of [method`Image`.next_frame].
875
- * @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
876
1001
  * @param callback A callback to call when the operation is complete
877
1002
  */
878
1003
  next_frame_async(
@@ -880,8 +1005,8 @@ export namespace Gly {
880
1005
  callback?: Gio.AsyncReadyCallback<this> | null,
881
1006
  ): globalThis.Promise<Frame> | void;
882
1007
  /**
883
- * Finishes the [method`Image`.next_frame_async] call.
884
- * @param result a `GAsyncResult`
1008
+ * Finishes the {@link Image.next_frame_async} call.
1009
+ * @param result a {@link Gio.AsyncResult}
885
1010
  * @returns Loaded frame.
886
1011
  */
887
1012
  next_frame_finish(result: Gio.AsyncResult): Frame;
@@ -916,7 +1041,7 @@ export namespace Gly {
916
1041
  }
917
1042
 
918
1043
  /**
919
- * [class`Loader]` prepares loading an image.
1044
+ * {@link Loader} prepares loading an image.
920
1045
  *
921
1046
  * The following example shows how to obtain a `Gdk.Texture`. It uses
922
1047
  * [GlyGtk4](https://gnome.pages.gitlab.gnome.org/glycin/libglycin-gtk4)
@@ -929,15 +1054,18 @@ export namespace Gly {
929
1054
  * loader = gly_loader_new (file);
930
1055
  * image = gly_loader_load (loader, NULL);
931
1056
  * if (image)
932
- * {
933
- * frame = gly_image_next_frame (image, NULL);
934
- * if (frame) {
935
- * texture = gly_gtk_frame_get_texture (frame);
936
- * printf ("Image height: %d\n", gdk_texture_get_height (texture));
937
- * 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
+ * }
938
1065
  * }
939
- * }
940
1066
  * ```
1067
+ * @gir-type Class
1068
+ * @since 2.0
941
1069
  */
942
1070
  class Loader extends GObject.Object {
943
1071
  static $gtype: GObject.GType<Loader>;
@@ -948,9 +1076,15 @@ export namespace Gly {
948
1076
  set apply_transformation(val: boolean);
949
1077
  get applyTransformation(): boolean;
950
1078
  set applyTransformation(val: boolean);
1079
+ /**
1080
+ * @construct-only
1081
+ */
951
1082
  get bytes(): GLib.Bytes;
952
1083
  get cancellable(): Gio.Cancellable;
953
1084
  set cancellable(val: Gio.Cancellable);
1085
+ /**
1086
+ * @construct-only
1087
+ */
954
1088
  get file(): Gio.File;
955
1089
  get memory_format_selection(): MemoryFormatSelection;
956
1090
  set memory_format_selection(val: MemoryFormatSelection);
@@ -960,6 +1094,9 @@ export namespace Gly {
960
1094
  set sandbox_selector(val: SandboxSelector);
961
1095
  get sandboxSelector(): SandboxSelector;
962
1096
  set sandboxSelector(val: SandboxSelector);
1097
+ /**
1098
+ * @construct-only
1099
+ */
963
1100
  get stream(): Gio.InputStream;
964
1101
 
965
1102
  /**
@@ -985,16 +1122,19 @@ export namespace Gly {
985
1122
 
986
1123
  // Signals
987
1124
 
1125
+ /** @signal */
988
1126
  connect<K extends keyof Loader.SignalSignatures>(
989
1127
  signal: K,
990
1128
  callback: GObject.SignalCallback<this, Loader.SignalSignatures[K]>,
991
1129
  ): number;
992
1130
  connect(signal: string, callback: (...args: any[]) => any): number;
1131
+ /** @signal */
993
1132
  connect_after<K extends keyof Loader.SignalSignatures>(
994
1133
  signal: K,
995
1134
  callback: GObject.SignalCallback<this, Loader.SignalSignatures[K]>,
996
1135
  ): number;
997
1136
  connect_after(signal: string, callback: (...args: any[]) => any): number;
1137
+ /** @signal */
998
1138
  emit<K extends keyof Loader.SignalSignatures>(
999
1139
  signal: K,
1000
1140
  ...args: GObject.GjsParameters<Loader.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -1012,7 +1152,7 @@ export namespace Gly {
1012
1152
  */
1013
1153
  static get_mime_types(): string[];
1014
1154
  /**
1015
- * Async variant of [func`Loader`.get_mime_types]
1155
+ * Async variant of {@link Loader.get_mime_types}
1016
1156
  * @param cancellable
1017
1157
  * @param callback
1018
1158
  */
@@ -1021,32 +1161,32 @@ export namespace Gly {
1021
1161
  callback?: Gio.AsyncReadyCallback<Loader> | null,
1022
1162
  ): void;
1023
1163
  /**
1024
- * Finishes the [func`Loader`.get_mime_types_async] call.
1025
- * @param result A `GAsyncResult`
1164
+ * Finishes the {@link Loader.get_mime_types_async} call.
1165
+ * @param result A {@link Gio.AsyncResult}
1026
1166
  */
1027
1167
  static get_mime_types_finish(result: Gio.AsyncResult): string[];
1028
1168
 
1029
1169
  // Methods
1030
1170
 
1031
1171
  /**
1032
- * Synchronously loads an image and returns an [class`Image]` when successful.
1033
- * @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
1034
1174
  */
1035
1175
  load(): Image;
1036
1176
  /**
1037
- * Asynchronous version of [method`Loader`.load].
1038
- * @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
1039
1179
  */
1040
1180
  load_async(cancellable?: Gio.Cancellable | null): globalThis.Promise<Image>;
1041
1181
  /**
1042
- * Asynchronous version of [method`Loader`.load].
1043
- * @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
1044
1184
  * @param callback A callback to call when the operation is complete
1045
1185
  */
1046
1186
  load_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void;
1047
1187
  /**
1048
- * Asynchronous version of [method`Loader`.load].
1049
- * @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
1050
1190
  * @param callback A callback to call when the operation is complete
1051
1191
  */
1052
1192
  load_async(
@@ -1054,8 +1194,8 @@ export namespace Gly {
1054
1194
  callback?: Gio.AsyncReadyCallback<this> | null,
1055
1195
  ): globalThis.Promise<Image> | void;
1056
1196
  /**
1057
- * Finishes the [method`Loader`.load_async] call.
1058
- * @param result A `GAsyncResult`
1197
+ * Finishes the {@link Loader.load_async} call.
1198
+ * @param result A {@link Gio.AsyncResult}
1059
1199
  * @returns Loaded image.
1060
1200
  */
1061
1201
  load_finish(result: Gio.AsyncResult): Image;
@@ -1078,7 +1218,7 @@ export namespace Gly {
1078
1218
  */
1079
1219
  set_apply_transformations(apply_transformations: boolean): void;
1080
1220
  /**
1081
- * 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`.
1082
1222
  * @param sandbox_selector Method by which the sandbox mechanism is selected
1083
1223
  */
1084
1224
  set_sandbox_selector(sandbox_selector: SandboxSelector | null): void;
@@ -1095,6 +1235,8 @@ export namespace Gly {
1095
1235
 
1096
1236
  /**
1097
1237
  * New frame
1238
+ * @gir-type Class
1239
+ * @since 2.0
1098
1240
  */
1099
1241
  class NewFrame extends GObject.Object {
1100
1242
  static $gtype: GObject.GType<NewFrame>;
@@ -1116,16 +1258,19 @@ export namespace Gly {
1116
1258
 
1117
1259
  // Signals
1118
1260
 
1261
+ /** @signal */
1119
1262
  connect<K extends keyof NewFrame.SignalSignatures>(
1120
1263
  signal: K,
1121
1264
  callback: GObject.SignalCallback<this, NewFrame.SignalSignatures[K]>,
1122
1265
  ): number;
1123
1266
  connect(signal: string, callback: (...args: any[]) => any): number;
1267
+ /** @signal */
1124
1268
  connect_after<K extends keyof NewFrame.SignalSignatures>(
1125
1269
  signal: K,
1126
1270
  callback: GObject.SignalCallback<this, NewFrame.SignalSignatures[K]>,
1127
1271
  ): number;
1128
1272
  connect_after(signal: string, callback: (...args: any[]) => any): number;
1273
+ /** @signal */
1129
1274
  emit<K extends keyof NewFrame.SignalSignatures>(
1130
1275
  signal: K,
1131
1276
  ...args: GObject.GjsParameters<NewFrame.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
@@ -1134,11 +1279,17 @@ export namespace Gly {
1134
1279
 
1135
1280
  // Methods
1136
1281
 
1282
+ /**
1283
+ * @param icc_profile ICC profile
1284
+ * @returns `TRUE` if format supports ICC color profiles.
1285
+ */
1137
1286
  set_color_icc_profile(icc_profile: GLib.Bytes | Uint8Array): boolean;
1138
1287
  }
1139
1288
 
1140
1289
  /**
1141
1290
  * See ITU-T H.273
1291
+ * @gir-type Struct
1292
+ * @since 2.0
1142
1293
  */
1143
1294
  class Cicp {
1144
1295
  static $gtype: GObject.GType<Cicp>;
@@ -1167,12 +1318,33 @@ export namespace Gly {
1167
1318
  free(): void;
1168
1319
  }
1169
1320
 
1321
+ /**
1322
+ * @gir-type Alias
1323
+ */
1170
1324
  type CreatorClass = typeof Creator;
1325
+ /**
1326
+ * @gir-type Alias
1327
+ */
1171
1328
  type EncodedImageClass = typeof EncodedImage;
1329
+ /**
1330
+ * @gir-type Alias
1331
+ */
1172
1332
  type FrameClass = typeof Frame;
1333
+ /**
1334
+ * @gir-type Alias
1335
+ */
1173
1336
  type FrameRequestClass = typeof FrameRequest;
1337
+ /**
1338
+ * @gir-type Alias
1339
+ */
1174
1340
  type ImageClass = typeof Image;
1341
+ /**
1342
+ * @gir-type Alias
1343
+ */
1175
1344
  type LoaderClass = typeof Loader;
1345
+ /**
1346
+ * @gir-type Alias
1347
+ */
1176
1348
  type NewFrameClass = typeof NewFrame;
1177
1349
  /**
1178
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.40",
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.40",
35
- "@girs/gio-2.0": "2.86.4-4.0.0-beta.40",
36
- "@girs/gobject-2.0": "2.86.4-4.0.0-beta.40",
37
- "@girs/glib-2.0": "2.86.4-4.0.0-beta.40",
38
- "@girs/gmodule-2.0": "2.0.0-4.0.0-beta.40" },
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