Re: Q: How to obtain a GdkDrawable* from a Gtk::DrawingArea?
- From: "Mirco \"MacSlow\"" Müller <macslow bangang de>
- To: gtkmm-list gnome org
- Subject: Re: Q: How to obtain a GdkDrawable* from a Gtk::DrawingArea?
- Date: Sun, 16 Oct 2005 22:07:44 +0200
Am Sonntag, den 16.10.2005, 12:16 +0200 schrieb Mirco "MacSlow" M�
> I need the XID returned by gdk_x11_drawable_get_xid() for a
> Gtk::DrawingArea. So do I this...
>
> Gtk::DrawingArea* pDrawingArea = NULL;
> // create drawing-area etc.
> gdk_x11_drawable_get_xid((GdkDrawable*)pDrawingArea->get_window()->gobj())
>
> but that causes a major failure of my program.
>
> From looking at gdktypes.h I assumed that a GdkWindow is nothing more
> than a GdkDrawable. Apparently this assumption seems to be wrong. So
> what is the correct (gtkmm) way of doing this?
Forget the above... it's only a part of my ongoing issues I have with
trying to add glitz-support to gtkmm-based "cairo in motion". What I
expected to be rather straight forward turned out to be a unresolvable
issue for me. Even looking at the sources of cairogears (xlib-based,
compiles, glitz-acceleration works) and gtkcairo (gtk+-based, compiles,
glitz-accelerations does not work, falls back to xlib-backend) I was not
able to get glitz working in "cairo in
motion" (http://macslow.mine.nu/?p=20). Since there are no hooks for
cairo/glitz in gtkmm-2.8.0 yet, I tried to do a mixture of gtkmm and
plain gtk+ coding. Since those inital efforts failed I tried to add
glitz-acceleration to a very simple and plain stand-alone gtk+-program
that only draws some simple shapes using cairo. But that failed at
runtime with:
"BadMatch"
Details: serial 150 error_code 8 request_code 144 minor_code 5
Since there is no stable documentation for glitz yet, explaining all the
calls and the needed requirements I'm quite lost now. My weekends
gone :( and I've really no motivation left to read the whole source of
glitz itself now. Searching with google for code that already does what
I'm looking for also didn't yield any results. Is there anybody who is
able to help me out or give me some pointers, which can help me explain
this X11-error so I might get a clue what glitz is missing there or why
this is caused?
Thanks in advance for your time and kind advice!
Best regards...
MacSlow
--
Mirco "MacSlow" M�<macslow bangang de>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]