Recent

Author Topic: gdk_x11_window_get_xid and GDK_WINDOW_XID in GDK3 pascal bindings  (Read 4074 times)

El Salvador

  • Full Member
  • ***
  • Posts: 133
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

  • Hero Member
  • *****
  • Posts: 1591
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: gdk_x11_window_get_xid and GDK_WINDOW_XID in GDK3 pascal bindings
« Reply #1 on: April 25, 2021, 07:21:35 pm »
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

  • Full Member
  • ***
  • Posts: 133

zeljko

  • Hero Member
  • *****
  • Posts: 1591
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: gdk_x11_window_get_xid and GDK_WINDOW_XID in GDK3 pascal bindings
« Reply #3 on: April 27, 2021, 01:31:12 pm »
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

  • Full Member
  • ***
  • Posts: 133
Re: gdk_x11_window_get_xid and GDK_WINDOW_XID in GDK3 pascal bindings
« Reply #4 on: April 27, 2021, 05:11:24 pm »
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.

zeljko

  • Hero Member
  • *****
  • Posts: 1591
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: gdk_x11_window_get_xid and GDK_WINDOW_XID in GDK3 pascal bindings
« Reply #5 on: April 29, 2021, 02:56:09 pm »
In that case it LazGdk3X11 should be extracted from 3.8.6, not from 3.22

 

TinyPortal © 2005-2018