Re: XShmPixmap for GdkPixmap



On Wed, 2007-05-23 at 15:12 -0400, Tristan Van Berkom wrote:

> Something like this ?
> 
> GdkPixmap *
> gdk_pixmap_new_shared (GdkDrawable *drawable,
> 			gint         width,
> 			gint         height,
> 			gint         depth,
> 			GdkImage   **image_ret)
> 
> This way one could be specific about when using an XShmPixmap
> suits thier need, which is good enough for me.

Multiple returns, ugh :-)

Maybe just:

 GdkPixmap *
 gdk_image_get_shared_pixmap(GdkImage *image);

Documenting that the depth and screen of the returned image
are determined by the GdkVisual.

Plus a gdk_display_supports_shared_pixmaps() or similar.
Note that gdk_image_new(.., GDK_IMAGE_SHARED) might still fail
if the display supports shared pixmaps, but once the image
is created, we can guarantee that gdk_image_get_shared_pixmap() 
will work.

					- Owen





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