Adding GdkX11 bindings to Gtk3.pm



Hi all;

this issue has come up various times on IRC, so I wanted to discuss it
on the mailing list.

In order to use the GdkX11 API with G::O::I we can, right now, do:

  package Gtk3::Gdk::X11;

  use Carp;
  use Glib::Object:Introspection;

  eval { Glib::Object::Introspection->setup( ... ); };
  if ($@) {
      croak "No GdkX11 support available.";
  }

But obviously we cannot have that snippet copied and pasted into every project.

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

Ideas?

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[ ] ebassi [ gmail com]


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