@girs/gdkwin32-4.0 4.2.0 → 4.4.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.
- package/README.md +8 -8
- package/gdkwin32-4.0.d.ts +18 -0
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for GdkWin32-4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.
|
|
8
|
+
GJS TypeScript type definitions for GdkWin32-4.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.4.0.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Install the type definitions with npm:
|
|
13
13
|
```bash
|
|
14
14
|
npm install @girs/gdkwin32-4.0
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Import it like any other module:
|
|
20
20
|
```ts
|
|
21
21
|
import GdkWin32 from '@girs/gdkwin32-4.0';
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
### Ambient Modules
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
[Ambient modules](https://github.com/gjsify/ts-for-gir/tree/main/packages/cli#ambient-modules) let you write the same import you would in plain JavaScript.
|
|
27
27
|
For this you need to include `@girs/gdkwin32-4.0` or `@girs/gdkwin32-4.0/ambient` in your `tsconfig` or entry point Typescript file:
|
|
28
28
|
|
|
29
29
|
`index.ts`:
|
|
@@ -42,7 +42,7 @@ import '@girs/gdkwin32-4.0'
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The ambient module now resolves with types:
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
48
|
import GdkWin32 from 'gi://GdkWin32?version=4.0';
|
|
@@ -50,7 +50,7 @@ import GdkWin32 from 'gi://GdkWin32?version=4.0';
|
|
|
50
50
|
|
|
51
51
|
### Global import
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
GJS's global `imports.gi` works too, with types.
|
|
54
54
|
For this you need to include `@girs/gdkwin32-4.0` or `@girs/gdkwin32-4.0/import` in your `tsconfig` or entry point Typescript file:
|
|
55
55
|
|
|
56
56
|
`index.ts`:
|
|
@@ -69,7 +69,7 @@ import '@girs/gdkwin32-4.0'
|
|
|
69
69
|
}
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
That form carries types as well:
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
75
|
const GdkWin32 = imports.gi.GdkWin32;
|
|
@@ -77,7 +77,7 @@ const GdkWin32 = imports.gi.GdkWin32;
|
|
|
77
77
|
|
|
78
78
|
### Bundle
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Most projects want a bundler. [esbuild](https://esbuild.github.io/) is the smallest thing that works; the [examples directory](https://github.com/gjsify/ts-for-gir/tree/main/examples) has setups for several others.
|
|
81
81
|
|
|
82
82
|
## Other packages
|
|
83
83
|
|
package/gdkwin32-4.0.d.ts
CHANGED
|
@@ -378,6 +378,7 @@ export namespace GdkWin32 {
|
|
|
378
378
|
* makes sense to transfer the {@link GLib.Variant} between processes on the same machine,
|
|
379
379
|
* (as opposed to over the network), and within the same file system namespace.
|
|
380
380
|
* @returns a {@link GLib.Variant}, or `null` when serialization fails. The {@link GLib.Variant} will not be floating.
|
|
381
|
+
* @since 2.38
|
|
381
382
|
*/
|
|
382
383
|
serialize(): GLib.Variant | null;
|
|
383
384
|
|
|
@@ -399,6 +400,7 @@ export namespace GdkWin32 {
|
|
|
399
400
|
* - If `icon` is a {@link Gio.ThemedIcon} with exactly one name and no fallbacks,
|
|
400
401
|
* the encoding is simply the name (such as `network-server`).
|
|
401
402
|
* @returns An allocated NUL-terminated UTF8 string or `null` if `icon` can't be serialized. Use `g_free()` to free.
|
|
403
|
+
* @since 2.20
|
|
402
404
|
*/
|
|
403
405
|
to_string(): string | null;
|
|
404
406
|
|
|
@@ -421,6 +423,7 @@ export namespace GdkWin32 {
|
|
|
421
423
|
* As serialization will avoid using raw icon data when possible, it only
|
|
422
424
|
* makes sense to transfer the {@link GLib.Variant} between processes on the same machine,
|
|
423
425
|
* (as opposed to over the network), and within the same file system namespace.
|
|
426
|
+
* @since 2.38
|
|
424
427
|
* @virtual
|
|
425
428
|
*/
|
|
426
429
|
vfunc_serialize(): GLib.Variant | null;
|
|
@@ -428,6 +431,7 @@ export namespace GdkWin32 {
|
|
|
428
431
|
/**
|
|
429
432
|
* Serializes the `icon` into string tokens.
|
|
430
433
|
* This is can be invoked when `g_icon_new_for_string()` is called.
|
|
434
|
+
* @since 2.20
|
|
431
435
|
* @virtual
|
|
432
436
|
*/
|
|
433
437
|
vfunc_to_tokens(): [boolean, string[], number];
|
|
@@ -685,12 +689,14 @@ export namespace GdkWin32 {
|
|
|
685
689
|
* possibly with changing properties in between.
|
|
686
690
|
* @param data user data to pass to the destroy function
|
|
687
691
|
* @returns a newly built {@link Gdk.Texture} or `NULL` if the format is not supported
|
|
692
|
+
* @since 4.20
|
|
688
693
|
*/
|
|
689
694
|
build(data: null): Gdk.Texture | null;
|
|
690
695
|
|
|
691
696
|
/**
|
|
692
697
|
* Gets the color state previously set via `gdk_d3d12_texture_builder_set_color_state()`.
|
|
693
698
|
* @returns the color state
|
|
699
|
+
* @since 4.20
|
|
694
700
|
*/
|
|
695
701
|
get_color_state(): Gdk.ColorState | null;
|
|
696
702
|
|
|
@@ -698,12 +704,14 @@ export namespace GdkWin32 {
|
|
|
698
704
|
* Returns the value that GTK should wait for on the fence
|
|
699
705
|
* before using the resource.
|
|
700
706
|
* @returns the fence wait value
|
|
707
|
+
* @since 4.20
|
|
701
708
|
*/
|
|
702
709
|
get_fence_wait(): number;
|
|
703
710
|
|
|
704
711
|
/**
|
|
705
712
|
* Whether the data is premultiplied.
|
|
706
713
|
* @returns whether the data is premultiplied
|
|
714
|
+
* @since 4.20
|
|
707
715
|
*/
|
|
708
716
|
get_premultiplied(): boolean;
|
|
709
717
|
|
|
@@ -711,6 +719,7 @@ export namespace GdkWin32 {
|
|
|
711
719
|
* Gets the region previously set via `gdk_d3d12_texture_builder_set_update_region()` or
|
|
712
720
|
* `null` if none was set.
|
|
713
721
|
* @returns The region
|
|
722
|
+
* @since 4.20
|
|
714
723
|
*/
|
|
715
724
|
get_update_region(): cairo.Region | null;
|
|
716
725
|
|
|
@@ -718,6 +727,7 @@ export namespace GdkWin32 {
|
|
|
718
727
|
* Gets the texture previously set via `gdk_d3d12_texture_builder_set_update_texture()` or
|
|
719
728
|
* `null` if none was set.
|
|
720
729
|
* @returns The texture
|
|
730
|
+
* @since 4.20
|
|
721
731
|
*/
|
|
722
732
|
get_update_texture(): Gdk.Texture | null;
|
|
723
733
|
|
|
@@ -728,6 +738,7 @@ export namespace GdkWin32 {
|
|
|
728
738
|
* correct colorstate based on the format.
|
|
729
739
|
* If you don't know what colorstates are, this is probably the right thing.
|
|
730
740
|
* @param color_state a {@link Gdk.ColorState} or `NULL` to unset the colorstate.
|
|
741
|
+
* @since 4.20
|
|
731
742
|
*/
|
|
732
743
|
set_color_state(color_state: Gdk.ColorState | null): void;
|
|
733
744
|
|
|
@@ -737,6 +748,7 @@ export namespace GdkWin32 {
|
|
|
737
748
|
*
|
|
738
749
|
* When no fence is set, this value has no effect.
|
|
739
750
|
* @param fence_wait the value to wait on
|
|
751
|
+
* @since 4.20
|
|
740
752
|
*/
|
|
741
753
|
set_fence_wait(fence_wait: bigint | number): void;
|
|
742
754
|
|
|
@@ -746,6 +758,7 @@ export namespace GdkWin32 {
|
|
|
746
758
|
* Unless otherwise specified, all formats including alpha channels are assumed
|
|
747
759
|
* to be premultiplied.
|
|
748
760
|
* @param premultiplied whether the data is premultiplied
|
|
761
|
+
* @since 4.20
|
|
749
762
|
*/
|
|
750
763
|
set_premultiplied(premultiplied: boolean): void;
|
|
751
764
|
|
|
@@ -761,6 +774,7 @@ export namespace GdkWin32 {
|
|
|
761
774
|
*
|
|
762
775
|
* An example would be a screen recording where only the mouse pointer moves.
|
|
763
776
|
* @param region the region to update
|
|
777
|
+
* @since 4.20
|
|
764
778
|
*/
|
|
765
779
|
set_update_region(region: cairo.Region | null): void;
|
|
766
780
|
|
|
@@ -768,6 +782,7 @@ export namespace GdkWin32 {
|
|
|
768
782
|
* Sets the texture to be updated by this texture. See
|
|
769
783
|
* {@link Gdk.D3d12TextureBuilder.set_update_region} for an explanation.
|
|
770
784
|
* @param texture the texture to update
|
|
785
|
+
* @since 4.20
|
|
771
786
|
*/
|
|
772
787
|
set_update_texture(texture: Gdk.Texture | null): void;
|
|
773
788
|
}
|
|
@@ -840,6 +855,7 @@ export namespace GdkWin32 {
|
|
|
840
855
|
/**
|
|
841
856
|
* Retrieves the EGL display connection object for the given GDK display.
|
|
842
857
|
* @returns the EGL display
|
|
858
|
+
* @since 4.4
|
|
843
859
|
*/
|
|
844
860
|
get_egl_display(): null;
|
|
845
861
|
|
|
@@ -1202,11 +1218,13 @@ export namespace GdkWin32 {
|
|
|
1202
1218
|
// Static methods
|
|
1203
1219
|
/**
|
|
1204
1220
|
* @param surface a {@link Gdk.Surface}
|
|
1221
|
+
* @deprecated since 4.8: Use `gdk_win32_surface_get_handle()` instead.
|
|
1205
1222
|
*/
|
|
1206
1223
|
static get_impl_hwnd(surface: Gdk.Surface): win32.HWND;
|
|
1207
1224
|
|
|
1208
1225
|
/**
|
|
1209
1226
|
* @param surface a {@link Gdk.Surface}
|
|
1227
|
+
* @deprecated since 4.8: Use `GDK_IS_WIN32_SURFACE` instead.
|
|
1210
1228
|
*/
|
|
1211
1229
|
static is_win32(surface: Gdk.Surface): boolean;
|
|
1212
1230
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/gdkwin32-4.0",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "GJS TypeScript type definitions for GdkWin32-4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "gdkwin32-4.0.js",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.
|
|
35
|
-
"@girs/win32-1.0": "^4.
|
|
36
|
-
"@girs/gdk-4.0": "^4.
|
|
37
|
-
"@girs/cairo-1.0": "^4.
|
|
38
|
-
"@girs/gobject-2.0": "^4.
|
|
39
|
-
"@girs/glib-2.0": "^4.
|
|
40
|
-
"@girs/pangocairo-1.0": "^4.
|
|
41
|
-
"@girs/pango-1.0": "^4.
|
|
42
|
-
"@girs/harfbuzz-0.0": "^4.
|
|
43
|
-
"@girs/freetype2-2.0": "^4.
|
|
44
|
-
"@girs/gio-2.0": "^4.
|
|
45
|
-
"@girs/gmodule-2.0": "^4.
|
|
46
|
-
"@girs/gdkpixbuf-2.0": "^4.
|
|
34
|
+
"@girs/gjs": "^4.4.0",
|
|
35
|
+
"@girs/win32-1.0": "^4.4.0",
|
|
36
|
+
"@girs/gdk-4.0": "^4.4.0",
|
|
37
|
+
"@girs/cairo-1.0": "^4.4.0",
|
|
38
|
+
"@girs/gobject-2.0": "^4.4.0",
|
|
39
|
+
"@girs/glib-2.0": "^4.4.0",
|
|
40
|
+
"@girs/pangocairo-1.0": "^4.4.0",
|
|
41
|
+
"@girs/pango-1.0": "^4.4.0",
|
|
42
|
+
"@girs/harfbuzz-0.0": "^4.4.0",
|
|
43
|
+
"@girs/freetype2-2.0": "^4.4.0",
|
|
44
|
+
"@girs/gio-2.0": "^4.4.0",
|
|
45
|
+
"@girs/gmodule-2.0": "^4.4.0",
|
|
46
|
+
"@girs/gdkpixbuf-2.0": "^4.4.0" },
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"typescript": "*"
|
|
49
49
|
},
|