Lazarus
Programming => Widgetset => GTK => Topic started by: El Salvador on April 25, 2021, 07:20:12 pm
-
Hello everyone,
I wanted to implement global hotkeys in GTK3, but I noticed that the required GDK_WINDOW_XID and gdk_x11_window_get_xid methods are not available in GDK3 pascal bindings in Lazarus. Why? Is there any valid reason (other than lack of time or resources)?
-
Is it in official gdk3 ? gtk3 is started from some version of gtk3, it is possible that it wasn't there when I created LCLGtk3.
-
I didn't look. gdk_x11_window_get_xid (https://developer.gnome.org/gdk3/stable/gdk3-X-Window-System-Interaction.html#gdk-x11-window-get-xid) should be present from version 3.4. While GDK_WINDOW_XID (https://developer.gnome.org/gdk3/stable/gdk3-X-Window-System-Interaction.html#GDK-WINDOW-XID:CAPS) I don't know.
-
Gtk3 bindings are autocreated by gir2pascal, and it looks like there's no platform specific translations like gdk_x11_window_get_xid() or similar.
They can be added manually into new eg LazGdk3X11 unit.
-
I looked at it yesterday and make a LazGdk3X11 unit with gir2pascal, using GTK3.22 gir files (from https://github.com/gtk-rs/gir-files) and extracted the methods I needed for my project.
But I'd rather create a new unit to put it in Lazarus. But I would like to do it by keeping the same version of the other units (3.8.6) and not mixing.
-
In that case it LazGdk3X11 should be extracted from 3.8.6, not from 3.22