Re: Adding GdkX11 bindings to

On 3 April 2015 at 02:15, Emmanuele Bassi <ebassi gmail com> wrote:
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/ or do we add a lib/Gtk3/Gdk/ that requires explicit

When i suggested binding it in in 2013, Torsten complained
about how to reliably detect platforms that have the X11 backend
So adding a subpackage for those who really need it would be the best
solution IMHO
Then it would be the callers job to check if it loads successfully or
not and to fallback if possible

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