On 3 April 2015 at 02:15, Emmanuele Bassi <eba...@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/Gtk3.pm or do we add a lib/Gtk3/Gdk/X11.pm that requires explicit
> import?

When i suggested binding it in Gtk3.pm in 2013, Torsten complained
about how to reliably detect platforms that have the X11 backend
installed
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
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to