[cairo] surfaces and backends

Carl Worth cworth at redhat.com
Thu May 19 16:57:59 PDT 2005


On Wed, 16 Mar 2005 11:15:53 -0500, Owen Taylor wrote:
> How do we identify surface types? 
>  
>  1. Strings. cairo_surface_get_backend_name()
> 
>  2. Boolean predicate. cairo_surface_is_xlib()
> 
>  3. Opaque type object
>     cairo_type_t *cairo_surface_get_type()
>     cairo_type_t *cairo_xlib_surface_type()
> 
>  4. Global #defines
> 
>     #define CAIRO_TYPE_XLIB_SURFACE 1
> 
> Not clear to me what's right.

We've started running into the need for this internal to the cairo
implementation and so far we are using option #2. I see the following
in the code already:

	_cairo_surface_is_image
	_cairo_surface_is_win32
	_cairo_surface_is_xcb
	_cairo_surface_is_xlib

This seems perfectly workable to me. Anyone have an objection to
filling this set out more completely and making it public?

-Carl

	
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050519/5662ff69/attachment.pgp


More information about the cairo mailing list