Forum > GTK

gdk_x11_window_get_xid and GDK_WINDOW_XID in GDK3 pascal bindings

(1/2) > >>

El Salvador:
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)?

zeljko:
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.

El Salvador:
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.

zeljko:
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.

El Salvador:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version