Re: Adding GdkX11 bindings to Gtk3.pm
- From: Thierry Vignaud <thierry vignaud gmail com>
- To: Emmanuele Bassi <ebassi gmail com>
- Cc: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Re: Adding GdkX11 bindings to Gtk3.pm
- Date: Fri, 3 Apr 2015 12:21:13 +0200
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/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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]