Skip to content

Commit 639fc74

Browse files
gdk/win32: Generate new types
The texture builder is useless without the build method but that would require someone with a windows machine to fix it.
1 parent c9de2f2 commit 639fc74

File tree

12 files changed

+524
-18
lines changed

12 files changed

+524
-18
lines changed

.github/workflows/windows-msvc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,23 @@ jobs:
9595
uses: actions-rs/cargo@v1
9696
with:
9797
command: build
98-
args: --features v4_18,xml_validation
98+
args: --features v4_20,xml_validation
9999
- name: Clippy
100100
uses: actions-rs/cargo@v1
101101
with:
102102
command: clippy
103-
args: --features v4_18,xml_validation
103+
args: --features v4_20,xml_validation
104104
- name: Tests
105105
uses: actions-rs/cargo@v1
106106
with:
107107
command: test
108-
args: --features v4_18,xml_validation
108+
args: --features v4_20,xml_validation
109109

110110
- name: Build gdk-win32
111111
uses: actions-rs/cargo@v1
112112
with:
113113
command: build
114-
args: --features v4_18,egl,win32 --manifest-path ./gdk4-win32/Cargo.toml
114+
args: --features v4_20,egl,win32 --manifest-path ./gdk4-win32/Cargo.toml
115115
- name: Clippy gdk-win32
116116
uses: actions-rs/cargo@v1
117117
with:

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gdk4-win32/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ version = "4"
2020
[features]
2121
v4_4 = ["gdk4-win32-sys/v4_4", "gdk/v4_4"]
2222
v4_8 = ["v4_4", "gdk4-win32-sys/v4_8", "gdk/v4_8"]
23-
v4_18 = ["v4_8"]
23+
v4_20 = ["v4_8", "gdk4-win32-sys/v4_20", "gdk/v4_20"]
2424
egl = ["khronos-egl"]
2525
win32 = ["windows"]
2626

@@ -30,6 +30,7 @@ gdk.workspace = true
3030
gio.workspace = true
3131
glib.workspace = true
3232
libc.workspace = true
33+
cairo-rs.workspace = true
3334
khronos-egl = {version = "6.0", optional = true}
3435
windows = { version = ">= 0.61, <= 0.62", features = [
3536
"Win32_Foundation",

gdk4-win32/Gir.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ deprecate_by_min_version = true
1212
trust_return_value_nullability = true
1313

1414
generate = [
15+
"GdkWin32.D3D12Error",
16+
"GdkWin32.D3D12Texture",
1517
"GdkWin32.Win32DisplayManager",
1618
"GdkWin32.Win32Drag",
1719
"GdkWin32.Win32GLContext",
@@ -20,11 +22,19 @@ generate = [
2022
]
2123

2224
manual = [
25+
"cairo.Region",
26+
"Gdk.ColorState",
2327
"Gdk.Cursor",
2428
"Gdk.DisplayManager",
2529
"Gdk.DrawContext",
30+
"Gdk.Paintable",
2631
"Gdk.Rectangle",
32+
"Gdk.Texture",
2733
"GdkPixbuf.Pixbuf",
34+
"Gio.Icon",
35+
"Gio.LoadableIcon",
36+
"GLib.Error",
37+
"GLib.Quark",
2838
"win32.HCURSOR",
2939
"win32.HICON",
3040
"win32.HWND",
@@ -83,11 +93,25 @@ final_type = false
8393
[[object]]
8494
name = "GdkWin32.*"
8595
status = "generate"
96+
[[object.function]]
97+
name = "d3d12_error_quark"
98+
ignore = true # Implemented as ErrorDomain
8699

87100
[[object.function]]
88101
name = "win32_handle_table_lookup"
89102
ignore = true # to be deprecated upstream, and not clean to bind
90103

104+
[[object]]
105+
name = "GdkWin32.D3D12TextureBuilder"
106+
status = "generate"
107+
concurrency = "send+sync"
108+
generate_builder = false
109+
[[object.function]]
110+
name = "set_update_region"
111+
[[object.function.parameter]]
112+
name = "region"
113+
const = true
114+
91115
[[object]]
92116
name = "GdkWin32.Win32Display"
93117
status = "generate"

gdk4-win32/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ gdk-win32 = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-win
4343

4444
| Feature | Description |
4545
| --- | ----------- |
46-
| `v4_18` | Enable the new APIs part of GTK 4.18 |
46+
| `v4_20` | Enable the new APIs part of GTK 4.20 |
4747
| `v4_4` | Enable the new APIs part of GTK 4.4 |
4848
| `egl` | Integration with the [khronos-egl](https://crates.io/crates/khronos-egl) crate |
4949
| `win32` | Integration with the [windows](https://crates.io/crates/windows) crate |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This file was generated by gir (https://github.com/gtk-rs/gir)
2+
// from gir-files (https://github.com/gtk-rs/gir-files)
3+
// DO NOT EDIT
4+
5+
use crate::ffi;
6+
7+
glib::wrapper! {
8+
#[doc(alias = "GdkD3D12Texture")]
9+
pub struct D3D12Texture(Object<ffi::GdkD3D12Texture, ffi::GdkD3D12TextureClass>) @extends gdk::Texture, @implements gdk::Paintable, gio::Icon, gio::LoadableIcon;
10+
11+
match fn {
12+
type_ => || ffi::gdk_d3d12_texture_get_type(),
13+
}
14+
}
15+
16+
impl D3D12Texture {}

0 commit comments

Comments
 (0)