Re: Using Gtk+ with XvShmPutImage()...



Duncan Chang wrote:

>Hello all:
>	Now i am coding a application with Gtk+, but i need the low level
>x-lib API XvShmPutImage() to communicate to driver. I done with create
>another window(XCreateWindow()) to make XvShmPutImage() work, but in this
>way the dummy window that created from XCreateWindow(), is not the one that
>i want. I using the return values from XCreateWindow(), XOpenDisplay(), and
>XCreateGC() as the  XvShmPutImage()'s input parameters. I had tried get
>those values from Gtk+ widget handle, but it fail. How could i using Gtk+
>only with XvShmPutImage() to make it work, without creating a dummy window?
>I using :
>GDK_WINDOW_XDISPLAY() replaced the value returned from XOpenDisplay(),
>GDK_WINDOW_XWINDOW() replaced the value returned from XCreateWindow(),
>GDK_GC_XGC() replaced the value returned from XCreateGC(),
>
I only can point that you have to use these only after your
widget was realized. You can connect signal handler to
"realize" event to be sure. You can also use
GTK_WIDGET_REALIZED() macro to test whether your
widget is realized or no.

Olexiy




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]