great! your solution is much more consistent
On 24 July 2013 14:54, Emmanuele Bassi <eba...@gmail.com> wrote: > hi; > > On 24 July 2013 11:40, vividsnow <vivids...@gmail.com> wrote: > > hi > > should it be in form of POD documentation for Clutter module or code in > it? > > > > something like: > > > > Glib::Object::Introspection->setup ( > > basename => $_CLUTTER_BASENAME.'X11', > > version => $_CLUTTER_VERSION, > > package => $_CLUTTER_PACKAGE.'X11' > > ) if ref(Clutter->get_default_backend) =~ /X11$/; > > thanks for the code, though I would probably not add it as it is. > > first of all, the ClutterX11 module should be available separately. > the proper API to check if Clutter supports the X11 backend is: > > Clutter::check_windowing_backend() > > so I guess the code above ought to be: > > Glib::Object::Introspection->setup( ... ) if > Clutter->check_windowing_backend('x11'); > > also, Clutter can be compiled with multiple backends which are > selectable at run time, so you probably want to just import > ClutterX11, ClutterWayland, or ClutterGdk introspection data > regardless of which backend is actually running, and then do a check > on the currenly running windowing system. > > we could have a lib/Clutter/X11.pm module that checks if the > GOI->setup() call fails because of a missing ClutterX11 introspection > data, and propagates the failure upwards. same would apply for the > other Clutter windowing system backends that are currently supported. > > ciao, > Emmanuele. > > > On 24 July 2013 13:37, Emmanuele Bassi <eba...@gmail.com> wrote: > >> > >> great! > >> > >> care to prepare a patch? ;-) > >> > >> ciao, > >> Emmanuele. > >> > >> > >> On 24 July 2013 09:26, vividsnow <vivids...@gmail.com> wrote: > >> > thanks - it works! > >> > > >> > > >> > On 23 July 2013 20:54, Emmanuele Bassi <eba...@gmail.com> wrote: > >> >> > >> >> hi; > >> >> > >> >> On 23 July 2013 17:41, vividsnow <vivids...@gmail.com> wrote: > >> >> > hi! unfortunately, there is no such package > >> >> > - i'm using latest Clutter from CPAN: > >> >> > http://search.cpan.org/~ebassi/Clutter/ > >> >> > >> >> yup, those are the old, static bindings. they are not maintained any > >> >> more. > >> >> > >> >> you should be able to access Clutter through > >> >> GLib::Object::Introspection, though. you can start from this: > >> >> > >> >> https://git.gnome.org/browse/perl-Clutter > >> >> > >> >> you'll have to add a ClutterX11 module that loads the equivalent > >> >> introspection data. > >> >> > >> >> ciao, > >> >> Emmanuele. > >> >> > >> >> -- > >> >> W: http://www.emmanuelebassi.name > >> >> B: http://blogs.gnome.org/ebassi/ > >> > > >> > > >> > >> > >> > >> -- > >> W: http://www.emmanuelebassi.name > >> B: http://blogs.gnome.org/ebassi/ > > > > > > > > -- > W: http://www.emmanuelebassi.name > B: http://blogs.gnome.org/ebassi/ >
_______________________________________________ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list