Skip to content

Add gdk4-win32 #1103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 2, 2022
Merged

Add gdk4-win32 #1103

merged 5 commits into from
Nov 2, 2022

Conversation

elmarco
Copy link
Contributor

@elmarco elmarco commented Aug 19, 2022

I could use some help, it currently fails with:

$ ../gir/target/release/gir -o . -m not_bound                                                                                                                        
[WARN  libgir::analysis::functions] `Win32MessageFilterFunc`: unknown type
[WARN  libgir::analysis::functions] `add_filter`: this is supposed to be a callback function but no callback was found...
[WARN  libgir::analysis::functions] `Win32MessageFilterFunc`: unknown type
[WARN  libgir::analysis::functions] `remove_filter`: this is supposed to be a callback function but no callback was found...
[NOT GENERATED METHOD] GdkWin32.Win32Display::add_filter because of GdkWin32.Win32MessageFilterFunc
[NOT GENERATED METHOD] GdkWin32.Win32Display::remove_filter because of GdkWin32.Win32MessageFilterFunc

and

error[E0433]: failed to resolve: use of undeclared crate or module `win32`
  --> gdk4-win32/src/auto/win32_hcursor.rs:25:48
   |
25 |     pub fn new(display: &Win32Display, handle: win32::HCURSOR, destroyable: bool) -> Win32HCursor {
   |                                                ^^^^^ use of undeclared crate or module `win32`

error[E0433]: failed to resolve: use of undeclared crate or module `win32`
  --> gdk4-win32/src/auto/win32_surface.rs:21:55
   |
21 |     pub fn handle(window: &impl IsA<gdk::Surface>) -> win32::HGDIOBJ {
   |                                                       ^^^^^ use of undeclared crate or module `win32`

error[E0433]: failed to resolve: use of undeclared crate or module `win32`
  --> gdk4-win32/src/auto/win32_surface.rs:28:58
   |
28 |     pub fn impl_hwnd(window: &impl IsA<gdk::Surface>) -> win32::HWND {
   |                                                          ^^^^^ use of undeclared crate or module `win32`

error[E0433]: failed to resolve: use of undeclared crate or module `win32`
  --> gdk4-win32/src/auto/win32_surface.rs:44:71
   |
44 |     pub fn lookup_for_display(display: &impl IsA<gdk::Display>, anid: win32::HWND) -> gdk::Surface {
   |                                                                       ^^^^^ use of undeclared crate or module `win32`

@elmarco
Copy link
Contributor Author

elmarco commented Aug 19, 2022

I test the build with the pending Fedora package:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2119295

export PKG_CONFIG_SYSROOT_DIR=/usr/x86_64-w64-mingw32/sys-root/mingw/
export PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig

cargo build --target x86_64-pc-windows-gnu

Copy link
Member

@bilelmoussaoui bilelmoussaoui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also look at updating the windows job to build gdk-win so we are sure it works. I will look into reserving the name on crates.io ;)

@elmarco elmarco force-pushed the win32 branch 2 times, most recently from a87455c to f971c46 Compare August 24, 2022 17:13
@elmarco elmarco changed the title WIP: add gdk4-win32 Add gdk4-win32 Oct 31, 2022
@bilelmoussaoui
Copy link
Member

Would you mind changing the windows CI to re-build everytime the gdk-win32 is changed, see https://github.com/gtk-rs/gtk4-rs/blob/master/.github/workflows/windows-msvc.yml#L6-L18, as well as adding a step here https://github.com/gtk-rs/gtk4-rs/blob/master/.github/workflows/windows-msvc.yml#L91-L95 for build, test & clippy gdk-win32

@bilelmoussaoui
Copy link
Member

Would you mind changing the windows CI to re-build everytime the gdk-win32 is changed, see https://github.com/gtk-rs/gtk4-rs/blob/master/.github/workflows/windows-msvc.yml#L6-L18, as well as adding a step here https://github.com/gtk-rs/gtk4-rs/blob/master/.github/workflows/windows-msvc.yml#L91-L95 for build, test & clippy gdk-win32

I forgot that we should do the same for the docs job, especially the part in https://github.com/gtk-rs/gtk4-rs/blob/master/.github/workflows/docs.yml#L70 otherwise we won't get any gdk-win32 docs.

@elmarco elmarco force-pushed the win32 branch 2 times, most recently from 1f225f2 to 24db6c1 Compare November 2, 2022 08:09
@bilelmoussaoui
Copy link
Member

@bilelmoussaoui
Copy link
Member

Sorry for always bringing yet another change to do, but the main readme at https://github.com/gtk-rs/gtk4-rs#gtk4-rs- mentions the various supported gdk backends, would it be possible to add a line for gdk win32? thanks

@elmarco elmarco force-pushed the win32 branch 2 times, most recently from f8ec350 to 12b92d9 Compare November 2, 2022 09:59
Signed-off-by: Marc-André Lureau <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
@bilelmoussaoui bilelmoussaoui merged commit 8e4f2d7 into gtk-rs:master Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants