[cairo] Re: Proposal: Splitting cairo.h for the backends (was: Mac OS X support added)

kangaroo grompf at sublimeintervention.com
Wed Jan 19 09:36:35 PST 2005


On 19-Jan-05, at 12:01 PM, Carl Worth wrote:

> On Tue, 18 Jan 2005 16:08:38 -0500, kangaroo wrote:
>> On this note; here's a patch to the build system to allow the quartz
>> surface to be built by auto* on mac;
>
> Thanks so much!

No problem

>
>> This patch should not be commited as is; as it does some uglyness to
>> get around some Carbon/X conflicting headers to allow both backends to
>> be compiled.
>
> Yes, that's pretty nasty.
>

As I said; ugly shouldn't be commited just there to get the ball 
rolling.

> The suggested fix is to split all of the backend-specific portions of
> cairo.h out into their own header files. Those that depend on external
> libraries with their own header files are easy candidates:
>
> 	cairo-glitz.h
> 	cairo-quartz.h
> 	cairo-xcb.h
> 	cairo-xlib.h
>

This sounds right to me

> 	
> Then there are also the font backends. I guess we won't need any
> separation for these within the namespace of header files:
>
> 	cairo-ft.h
>

The font backends should be split; I havn't (seriously) started digging 
into the atsui interface yet; so I can't comment if there are conflicts 
directly; however for consistencies sake they should probably be split.


> Then there are some backends that are more "built-in", (eg. their
> creation does not depend on object types created through external
> library interfaces). The image backend definitely belongs in this
> class, (and belongs in cairo.h I think).
>
> Then the ps, pdf, and png backends also meet this definition with the
> exception of the currently contested FILE*.
>
> Shall we leave these in cairo.h, or move them out as well for
> symmetry's sake?
>

I think thats your call ultimately; OSX is bsd-ish; so anything that 
works there should work on OSX as well.

-kangaroo




More information about the cairo mailing list