Skip to content
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

Get window id? #133

Open
arjunmenon opened this issue Jul 19, 2024 · 4 comments
Open

Get window id? #133

arjunmenon opened this issue Jul 19, 2024 · 4 comments

Comments

@arjunmenon
Copy link

Hi I am trying out this example with fltk: https://github.com/adrg/libvlc-go-examples/blob/master/v3/gtk3_player/player_windows.go

Vlc needs the window id. Seems win32 xid is not exposed right? :

extern HWND fl_win32_xid(const Fl_Window *win);

@pwiecz
Copy link
Owner

pwiecz commented Jul 19, 2024

You're right that it's not exposed right now.
I think that it shouldn't be very hard to add.
You can try doing it yourself, or I can look into it sometime next week.
!
Cheers

@arjunmenon
Copy link
Author

Hey, yeah i have made a small change, but since I am not that familiar with FLTK, will raise a PR to get your comments. Restricted the change particular to the use case only, if needed will modify as per your comments.

@pwiecz
Copy link
Owner

pwiecz commented Jul 24, 2024

@arjunmenon I've added a RawHandle method to Window (only under Windows right now). You can check if it works for you. :)

@arjunmenon
Copy link
Author

Hey, thanks.
Probably we can make it generic to return for supported platforms by using fl_xid ?
unsigned long long go_fltk_Window_get_xid(Fl_Window* w) {
return (unsigned long long)fl_xid(w);
}

As of now this is how i was using.

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

No branches or pull requests

2 participants