On Fri, 2009-09-25 at 10:30 +0000, Sever P A wrote: > 2009/9/25 Sever P A <[email protected]>: > > 2009/9/20 Murray Cumming <[email protected]>: > >> On Sat, 2009-09-19 at 10:04 +0200, Sever P A wrote: > >>> * Are the same the value of xkl_engine_get_instance (Display * > >>> display) [of LibXklavier] than the value pointed of > >>> Gtk::Main::instance() ...? > >> > >> No, they are entirely unrelated. > >> > >> Googling suggests that you can use GDK_DISPLAY() to get the Display*. > >> Thats an X Windows thing. > >> http://developer.gimp.org/api/2.0/gdk/gdk-X-Window-System-Interaction.html#GDK-DISPLAY:CAPS > > > > Thanks to Murray Cumming's answer, and after a few reading of the API > > reference, I done, > > > > Gdk::Display dpy; > > XklEngine * engine; > > engine = xkl_engine_get_instance(dpy.get_default()); > > > > But the compiler tells me, > > > > error: cannot convert ‘Glib::RefPtr<Gdk::Display>’ to ‘Display*’ for > > argument ‘1’ to ‘XklEngine* xkl_engine_get_instance(Display*)’ > > > > What's wrong ?... Are the pointer "*" and "Glib::RefPtr" not the same > > ?... Could be solved anyway ?...
No, of course they are not. You are missing some basic C and C++ knowledge. gobj() can help in this kind of situation - see the Basics chapter of the gtkmm book. But you should just use GDK_DISPLAY, as I suggested. > Ups ! sorry, I just see that it's not also possible to do > > Gdk::Display dpy; > > What do you suggest ? I doubt that you'll be able to use the xkl API without learning more about C and C++. -- [email protected] www.murrayc.com www.openismus.com _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
