Re: Adding GdkX11 bindings to

On 03.04.2015 02:15, Emmanuele Bassi wrote:

I wonder what's the best option. Do we add that that sub-module to
lib/ or do we add a lib/Gtk3/Gdk/ that requires explicit

Why not simply put something like this directly into Gtk3::import?

  eval {
    Glib::Object::Introspection->setup (
      basename => "GdkX11",
      version => "3.0",
      package => "Gtk3::Gdk");

GdkX11-3.0.gir is relatively tiny, so this shouldn't impact the load
time too much.  If users then want to check whether they're on X11, they
can use something like the following.

  $widget->get_display->isa ("Gtk3::Gdk::X11Display")

(Unfortunately, macros like GDK_WINDOWING_X11 and GDK_IS_X11_DISPLAY do
not seem to be available via introspection.)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]