@girs/gepub-0.5 0.5.0-4.0.0-beta.21 → 0.5.0-4.0.0-beta.24

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/gepub-0.5.d.ts +225 -13
  3. package/package.json +19 -19
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/gepub-0.5)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for Gepub-0.5, generated from library version 0.5.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.21.
8
+ GJS TypeScript type definitions for Gepub-0.5, generated from library version 0.5.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.24.
9
9
 
10
10
 
11
11
  ## Install
package/gepub-0.5.d.ts CHANGED
@@ -7,6 +7,8 @@
7
7
  * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
8
8
  */
9
9
 
10
+ import '@girs/gjs';
11
+
10
12
  // Module dependencies
11
13
  import type libxml2 from '@girs/libxml2-2.0';
12
14
  import type WebKit2 from '@girs/webkit2-4.0';
@@ -19,7 +21,7 @@ import type JavaScriptCore from '@girs/javascriptcore-4.0';
19
21
  import type Gtk from '@girs/gtk-3.0';
20
22
  import type xlib from '@girs/xlib-2.0';
21
23
  import type Gdk from '@girs/gdk-3.0';
22
- import type cairo from '@girs/cairo-1.0';
24
+ import type cairo from 'cairo';
23
25
  import type Pango from '@girs/pango-1.0';
24
26
  import type HarfBuzz from '@girs/harfbuzz-0.0';
25
27
  import type freetype2 from '@girs/freetype2-2.0';
@@ -52,6 +54,13 @@ export namespace Gepub {
52
54
  */
53
55
  const META_TITLE: string;
54
56
  namespace Doc {
57
+ // Signal signatures
58
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
59
+ 'notify::file': (pspec: GObject.ParamSpec) => void;
60
+ 'notify::page': (pspec: GObject.ParamSpec) => void;
61
+ 'notify::path': (pspec: GObject.ParamSpec) => void;
62
+ }
63
+
55
64
  // Constructor properties interface
56
65
 
57
66
  interface ConstructorProps extends GObject.Object.ConstructorProps, Gio.Initable.ConstructorProps {
@@ -71,6 +80,15 @@ export namespace Gepub {
71
80
  set page(val: number);
72
81
  get path(): string;
73
82
 
83
+ /**
84
+ * Compile-time signal type information.
85
+ *
86
+ * This instance property is generated only for TypeScript type checking.
87
+ * It is not defined at runtime and should not be accessed in JS code.
88
+ * @internal
89
+ */
90
+ $signals: Doc.SignalSignatures;
91
+
74
92
  // Constructors
75
93
 
76
94
  constructor(properties?: Partial<Doc.ConstructorProps>, ...args: any[]);
@@ -79,6 +97,24 @@ export namespace Gepub {
79
97
 
80
98
  static ['new'](path: string): Doc;
81
99
 
100
+ // Signals
101
+
102
+ connect<K extends keyof Doc.SignalSignatures>(
103
+ signal: K,
104
+ callback: GObject.SignalCallback<this, Doc.SignalSignatures[K]>,
105
+ ): number;
106
+ connect(signal: string, callback: (...args: any[]) => any): number;
107
+ connect_after<K extends keyof Doc.SignalSignatures>(
108
+ signal: K,
109
+ callback: GObject.SignalCallback<this, Doc.SignalSignatures[K]>,
110
+ ): number;
111
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
112
+ emit<K extends keyof Doc.SignalSignatures>(
113
+ signal: K,
114
+ ...args: GObject.GjsParameters<Doc.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
115
+ ): void;
116
+ emit(signal: string, ...args: any[]): void;
117
+
82
118
  // Methods
83
119
 
84
120
  get_cover(): string;
@@ -123,7 +159,7 @@ export namespace Gepub {
123
159
  * If the object is not initialized, or initialization returns with an
124
160
  * error, then all operations on the object except g_object_ref() and
125
161
  * g_object_unref() are considered to be invalid, and have undefined
126
- * behaviour. See the [introduction][ginitable] for more details.
162
+ * behaviour. See the [description][iface`Gio`.Initable#description] for more details.
127
163
  *
128
164
  * Callers should not assume that a class which implements #GInitable can be
129
165
  * initialized multiple times, unless the class explicitly documents itself as
@@ -166,7 +202,7 @@ export namespace Gepub {
166
202
  * If the object is not initialized, or initialization returns with an
167
203
  * error, then all operations on the object except g_object_ref() and
168
204
  * g_object_unref() are considered to be invalid, and have undefined
169
- * behaviour. See the [introduction][ginitable] for more details.
205
+ * behaviour. See the [description][iface`Gio`.Initable#description] for more details.
170
206
  *
171
207
  * Callers should not assume that a class which implements #GInitable can be
172
208
  * initialized multiple times, unless the class explicitly documents itself as
@@ -306,7 +342,21 @@ export namespace Gepub {
306
342
  * @returns the data if found, or %NULL if no such data exists.
307
343
  */
308
344
  get_data(key: string): any | null;
309
- get_property(property_name: string): any;
345
+ /**
346
+ * Gets a property of an object.
347
+ *
348
+ * The value can be:
349
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
350
+ * - a GObject.Value initialized with the expected type of the property
351
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
352
+ *
353
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
354
+ *
355
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
356
+ * @param property_name The name of the property to get
357
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
358
+ */
359
+ get_property(property_name: string, value: GObject.Value | any): any;
310
360
  /**
311
361
  * This function gets back user data pointers stored via
312
362
  * g_object_set_qdata().
@@ -434,7 +484,12 @@ export namespace Gepub {
434
484
  * @param data data to associate with that key
435
485
  */
436
486
  set_data(key: string, data?: any | null): void;
437
- set_property(property_name: string, value: any): void;
487
+ /**
488
+ * Sets a property on an object.
489
+ * @param property_name The name of the property to set
490
+ * @param value The value to set the property to
491
+ */
492
+ set_property(property_name: string, value: GObject.Value | any): void;
438
493
  /**
439
494
  * Remove a specified datum from the object's data associations,
440
495
  * without invoking the association's destroy handler.
@@ -584,14 +639,105 @@ export namespace Gepub {
584
639
  * @param pspec
585
640
  */
586
641
  vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
642
+ /**
643
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
644
+ * @param id Handler ID of the handler to be disconnected
645
+ */
587
646
  disconnect(id: number): void;
647
+ /**
648
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
649
+ * @param properties Object containing the properties to set
650
+ */
588
651
  set(properties: { [key: string]: any }): void;
589
- block_signal_handler(id: number): any;
590
- unblock_signal_handler(id: number): any;
591
- stop_emission_by_name(detailedName: string): any;
652
+ /**
653
+ * Blocks a handler of an instance so it will not be called during any signal emissions
654
+ * @param id Handler ID of the handler to be blocked
655
+ */
656
+ block_signal_handler(id: number): void;
657
+ /**
658
+ * Unblocks a handler so it will be called again during any signal emissions
659
+ * @param id Handler ID of the handler to be unblocked
660
+ */
661
+ unblock_signal_handler(id: number): void;
662
+ /**
663
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
664
+ * @param detailedName Name of the signal to stop emission of
665
+ */
666
+ stop_emission_by_name(detailedName: string): void;
592
667
  }
593
668
 
594
669
  namespace Widget {
670
+ // Signal signatures
671
+ interface SignalSignatures extends WebKit2.WebView.SignalSignatures {
672
+ 'notify::doc': (pspec: GObject.ParamSpec) => void;
673
+ 'notify::automation-presentation-type': (pspec: GObject.ParamSpec) => void;
674
+ 'notify::camera-capture-state': (pspec: GObject.ParamSpec) => void;
675
+ 'notify::default-content-security-policy': (pspec: GObject.ParamSpec) => void;
676
+ 'notify::display-capture-state': (pspec: GObject.ParamSpec) => void;
677
+ 'notify::editable': (pspec: GObject.ParamSpec) => void;
678
+ 'notify::estimated-load-progress': (pspec: GObject.ParamSpec) => void;
679
+ 'notify::favicon': (pspec: GObject.ParamSpec) => void;
680
+ 'notify::is-controlled-by-automation': (pspec: GObject.ParamSpec) => void;
681
+ 'notify::is-ephemeral': (pspec: GObject.ParamSpec) => void;
682
+ 'notify::is-loading': (pspec: GObject.ParamSpec) => void;
683
+ 'notify::is-muted': (pspec: GObject.ParamSpec) => void;
684
+ 'notify::is-playing-audio': (pspec: GObject.ParamSpec) => void;
685
+ 'notify::is-web-process-responsive': (pspec: GObject.ParamSpec) => void;
686
+ 'notify::microphone-capture-state': (pspec: GObject.ParamSpec) => void;
687
+ 'notify::page-id': (pspec: GObject.ParamSpec) => void;
688
+ 'notify::related-view': (pspec: GObject.ParamSpec) => void;
689
+ 'notify::settings': (pspec: GObject.ParamSpec) => void;
690
+ 'notify::title': (pspec: GObject.ParamSpec) => void;
691
+ 'notify::uri': (pspec: GObject.ParamSpec) => void;
692
+ 'notify::user-content-manager': (pspec: GObject.ParamSpec) => void;
693
+ 'notify::web-context': (pspec: GObject.ParamSpec) => void;
694
+ 'notify::web-extension-mode': (pspec: GObject.ParamSpec) => void;
695
+ 'notify::website-policies': (pspec: GObject.ParamSpec) => void;
696
+ 'notify::zoom-level': (pspec: GObject.ParamSpec) => void;
697
+ 'notify::border-width': (pspec: GObject.ParamSpec) => void;
698
+ 'notify::child': (pspec: GObject.ParamSpec) => void;
699
+ 'notify::resize-mode': (pspec: GObject.ParamSpec) => void;
700
+ 'notify::app-paintable': (pspec: GObject.ParamSpec) => void;
701
+ 'notify::can-default': (pspec: GObject.ParamSpec) => void;
702
+ 'notify::can-focus': (pspec: GObject.ParamSpec) => void;
703
+ 'notify::composite-child': (pspec: GObject.ParamSpec) => void;
704
+ 'notify::double-buffered': (pspec: GObject.ParamSpec) => void;
705
+ 'notify::events': (pspec: GObject.ParamSpec) => void;
706
+ 'notify::expand': (pspec: GObject.ParamSpec) => void;
707
+ 'notify::focus-on-click': (pspec: GObject.ParamSpec) => void;
708
+ 'notify::halign': (pspec: GObject.ParamSpec) => void;
709
+ 'notify::has-default': (pspec: GObject.ParamSpec) => void;
710
+ 'notify::has-focus': (pspec: GObject.ParamSpec) => void;
711
+ 'notify::has-tooltip': (pspec: GObject.ParamSpec) => void;
712
+ 'notify::height-request': (pspec: GObject.ParamSpec) => void;
713
+ 'notify::hexpand': (pspec: GObject.ParamSpec) => void;
714
+ 'notify::hexpand-set': (pspec: GObject.ParamSpec) => void;
715
+ 'notify::is-focus': (pspec: GObject.ParamSpec) => void;
716
+ 'notify::margin': (pspec: GObject.ParamSpec) => void;
717
+ 'notify::margin-bottom': (pspec: GObject.ParamSpec) => void;
718
+ 'notify::margin-end': (pspec: GObject.ParamSpec) => void;
719
+ 'notify::margin-left': (pspec: GObject.ParamSpec) => void;
720
+ 'notify::margin-right': (pspec: GObject.ParamSpec) => void;
721
+ 'notify::margin-start': (pspec: GObject.ParamSpec) => void;
722
+ 'notify::margin-top': (pspec: GObject.ParamSpec) => void;
723
+ 'notify::name': (pspec: GObject.ParamSpec) => void;
724
+ 'notify::no-show-all': (pspec: GObject.ParamSpec) => void;
725
+ 'notify::opacity': (pspec: GObject.ParamSpec) => void;
726
+ 'notify::parent': (pspec: GObject.ParamSpec) => void;
727
+ 'notify::receives-default': (pspec: GObject.ParamSpec) => void;
728
+ 'notify::scale-factor': (pspec: GObject.ParamSpec) => void;
729
+ 'notify::sensitive': (pspec: GObject.ParamSpec) => void;
730
+ 'notify::style': (pspec: GObject.ParamSpec) => void;
731
+ 'notify::tooltip-markup': (pspec: GObject.ParamSpec) => void;
732
+ 'notify::tooltip-text': (pspec: GObject.ParamSpec) => void;
733
+ 'notify::valign': (pspec: GObject.ParamSpec) => void;
734
+ 'notify::vexpand': (pspec: GObject.ParamSpec) => void;
735
+ 'notify::vexpand-set': (pspec: GObject.ParamSpec) => void;
736
+ 'notify::visible': (pspec: GObject.ParamSpec) => void;
737
+ 'notify::width-request': (pspec: GObject.ParamSpec) => void;
738
+ 'notify::window': (pspec: GObject.ParamSpec) => void;
739
+ }
740
+
595
741
  // Constructor properties interface
596
742
 
597
743
  interface ConstructorProps
@@ -610,6 +756,15 @@ export namespace Gepub {
610
756
  get doc(): Doc;
611
757
  set doc(val: Doc);
612
758
 
759
+ /**
760
+ * Compile-time signal type information.
761
+ *
762
+ * This instance property is generated only for TypeScript type checking.
763
+ * It is not defined at runtime and should not be accessed in JS code.
764
+ * @internal
765
+ */
766
+ $signals: Widget.SignalSignatures;
767
+
613
768
  // Constructors
614
769
 
615
770
  constructor(properties?: Partial<Widget.ConstructorProps>, ...args: any[]);
@@ -618,6 +773,24 @@ export namespace Gepub {
618
773
 
619
774
  static ['new'](): Widget;
620
775
 
776
+ // Signals
777
+
778
+ connect<K extends keyof Widget.SignalSignatures>(
779
+ signal: K,
780
+ callback: GObject.SignalCallback<this, Widget.SignalSignatures[K]>,
781
+ ): number;
782
+ connect(signal: string, callback: (...args: any[]) => any): number;
783
+ connect_after<K extends keyof Widget.SignalSignatures>(
784
+ signal: K,
785
+ callback: GObject.SignalCallback<this, Widget.SignalSignatures[K]>,
786
+ ): number;
787
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
788
+ emit<K extends keyof Widget.SignalSignatures>(
789
+ signal: K,
790
+ ...args: GObject.GjsParameters<Widget.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
791
+ ): void;
792
+ emit(signal: string, ...args: any[]): void;
793
+
621
794
  // Methods
622
795
 
623
796
  get_doc(): Doc;
@@ -745,7 +918,21 @@ export namespace Gepub {
745
918
  * @returns the data if found, or %NULL if no such data exists.
746
919
  */
747
920
  get_data(key: string): any | null;
748
- get_property(property_name: string): any;
921
+ /**
922
+ * Gets a property of an object.
923
+ *
924
+ * The value can be:
925
+ * - an empty GObject.Value initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
926
+ * - a GObject.Value initialized with the expected type of the property
927
+ * - a GObject.Value initialized with a type to which the expected type of the property can be transformed
928
+ *
929
+ * In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling GObject.Value.unset.
930
+ *
931
+ * Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
932
+ * @param property_name The name of the property to get
933
+ * @param value Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
934
+ */
935
+ get_property(property_name: string, value: GObject.Value | any): any;
749
936
  /**
750
937
  * This function gets back user data pointers stored via
751
938
  * g_object_set_qdata().
@@ -873,7 +1060,12 @@ export namespace Gepub {
873
1060
  * @param data data to associate with that key
874
1061
  */
875
1062
  set_data(key: string, data?: any | null): void;
876
- set_property(property_name: string, value: any): void;
1063
+ /**
1064
+ * Sets a property on an object.
1065
+ * @param property_name The name of the property to set
1066
+ * @param value The value to set the property to
1067
+ */
1068
+ set_property(property_name: string, value: GObject.Value | any): void;
877
1069
  /**
878
1070
  * Remove a specified datum from the object's data associations,
879
1071
  * without invoking the association's destroy handler.
@@ -1023,11 +1215,31 @@ export namespace Gepub {
1023
1215
  * @param pspec
1024
1216
  */
1025
1217
  vfunc_set_property(property_id: number, value: GObject.Value | any, pspec: GObject.ParamSpec): void;
1218
+ /**
1219
+ * Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
1220
+ * @param id Handler ID of the handler to be disconnected
1221
+ */
1026
1222
  disconnect(id: number): void;
1223
+ /**
1224
+ * Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
1225
+ * @param properties Object containing the properties to set
1226
+ */
1027
1227
  set(properties: { [key: string]: any }): void;
1028
- block_signal_handler(id: number): any;
1029
- unblock_signal_handler(id: number): any;
1030
- stop_emission_by_name(detailedName: string): any;
1228
+ /**
1229
+ * Blocks a handler of an instance so it will not be called during any signal emissions
1230
+ * @param id Handler ID of the handler to be blocked
1231
+ */
1232
+ block_signal_handler(id: number): void;
1233
+ /**
1234
+ * Unblocks a handler so it will be called again during any signal emissions
1235
+ * @param id Handler ID of the handler to be unblocked
1236
+ */
1237
+ unblock_signal_handler(id: number): void;
1238
+ /**
1239
+ * Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
1240
+ * @param detailedName Name of the signal to stop emission of
1241
+ */
1242
+ stop_emission_by_name(detailedName: string): void;
1031
1243
  }
1032
1244
 
1033
1245
  type DocClass = typeof Doc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@girs/gepub-0.5",
3
- "version": "0.5.0-4.0.0-beta.21",
3
+ "version": "0.5.0-4.0.0-beta.24",
4
4
  "description": "GJS TypeScript type definitions for Gepub-0.5, generated from library version 0.5.0",
5
5
  "type": "module",
6
6
  "module": "gepub-0.5.js",
@@ -31,24 +31,24 @@
31
31
  "test": "tsc --project tsconfig.json"
32
32
  },
33
33
  "dependencies": {
34
- "@girs/atk-1.0": "^2.55.2-4.0.0-beta.21",
35
- "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.21",
36
- "@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.21",
37
- "@girs/gdk-3.0": "^3.24.48-4.0.0-beta.21",
38
- "@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.21",
39
- "@girs/gio-2.0": "^2.83.3-4.0.0-beta.21",
40
- "@girs/gjs": "^4.0.0-beta.21",
41
- "@girs/glib-2.0": "^2.83.3-4.0.0-beta.21",
42
- "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.21",
43
- "@girs/gobject-2.0": "^2.83.3-4.0.0-beta.21",
44
- "@girs/gtk-3.0": "^3.24.48-4.0.0-beta.21",
45
- "@girs/harfbuzz-0.0": "^9.0.0-4.0.0-beta.21",
46
- "@girs/javascriptcore-4.0": "^2.46.5-4.0.0-beta.21",
47
- "@girs/libxml2-2.0": "^2.0.0-4.0.0-beta.21",
48
- "@girs/pango-1.0": "^1.56.0-4.0.0-beta.21",
49
- "@girs/soup-2.4": "^2.74.3-4.0.0-beta.21",
50
- "@girs/webkit2-4.0": "^2.46.5-4.0.0-beta.21",
51
- "@girs/xlib-2.0": "^2.0.0-4.0.0-beta.21"
34
+ "@girs/atk-1.0": "^2.56.2-4.0.0-beta.24",
35
+ "@girs/cairo-1.0": "^1.0.0-4.0.0-beta.24",
36
+ "@girs/freetype2-2.0": "^2.0.0-4.0.0-beta.24",
37
+ "@girs/gdk-3.0": "^3.24.50-4.0.0-beta.24",
38
+ "@girs/gdkpixbuf-2.0": "^2.0.0-4.0.0-beta.24",
39
+ "@girs/gio-2.0": "^2.84.2-4.0.0-beta.24",
40
+ "@girs/gjs": "^4.0.0-beta.24",
41
+ "@girs/glib-2.0": "^2.84.2-4.0.0-beta.24",
42
+ "@girs/gmodule-2.0": "^2.0.0-4.0.0-beta.24",
43
+ "@girs/gobject-2.0": "^2.84.2-4.0.0-beta.24",
44
+ "@girs/gtk-3.0": "^3.24.50-4.0.0-beta.24",
45
+ "@girs/harfbuzz-0.0": "^10.4.0-4.0.0-beta.24",
46
+ "@girs/javascriptcore-4.0": "^2.47.2-4.0.0-beta.24",
47
+ "@girs/libxml2-2.0": "^2.0.0-4.0.0-beta.24",
48
+ "@girs/pango-1.0": "^1.56.4-4.0.0-beta.24",
49
+ "@girs/soup-2.4": "^2.74.3-4.0.0-beta.24",
50
+ "@girs/webkit2-4.0": "^2.47.2-4.0.0-beta.24",
51
+ "@girs/xlib-2.0": "^2.0.0-4.0.0-beta.24"
52
52
  },
53
53
  "devDependencies": {
54
54
  "typescript": "*"