[cairo-commit] cairo/src cairo-config.h.in,NONE,1.1 .cvsignore,1.3,1.4 Makefile.am,1.13,1.14 cairo.h,1.30,1.31 cairoint.h,1.39,1.40 cairo-xlib.h,1.4,NONE

Carl Worth commit at pdx.freedesktop.org
Wed Dec 3 12:27:46 PST 2003


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv25878/src

Modified Files:
	.cvsignore Makefile.am cairo.h cairoint.h 
Added Files:
	cairo-config.h.in 
Removed Files:
	cairo-xlib.h 
Log Message:

        * configure.in: Bumped version to 0.1.14 to indicate dropped
        cairo-xlib.h and new cairo-config.h.

        * New support for "./configure --without-x" to compile without the
        xlib backend. Many thanks to Sasha V. <sasha at aftercode.net>.

        * configure.in: We do three things here: Make the pkg-config check
        for xrender conditional, set XLIB_BACKEND_DEFINE to either
        CAIRO_HAS_XLIB_BACKEND or CAIRO_HAS_NO_XLIB_BACKEND to be
        substituted into cairo-config.h, and set an AM_CONDITIONAL for
        HAVE_XLIB_BACKEND to enable conditional compilation of
        cairo_xlib_surface.c.  Perhaps that could be simplified a tad, but
        it's what we have working now.  Also split up various
        PKG_CHECK_MODULES into separate checks.

        * src/cairo_gstate.c: Remove errant reference to
        cairo_gstate_set_drawable.

        * src/cairo.h: Move xlib-specific calls in from old cairo-xlib.h,
        now guarded in #ifdef CAIRO_HAS_XLIB_BACKEND.

        * src/Makefile.am (libcairo_xlib_sources): Make compilation of
        cairo_xlib_surface.c conditional.
        (INCLUDES, libcairo_la_LIBADD): Add the new variables from
        splitting up the PKG_CHECK_MODULES calls.


--- NEW FILE: cairo-config.h.in ---
(This appears to be a binary file; contents omitted.)

Index: .cvsignore
===================================================================
RCS file: /cvs/cairo/cairo/src/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** .cvsignore	25 Jul 2003 20:29:08 -0000	1.3
--- .cvsignore	3 Dec 2003 20:27:44 -0000	1.4
***************
*** 6,7 ****
--- 6,8 ----
  *.lo
  *.loT
+ cairo-config.h

Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/src/Makefile.am,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** Makefile.am	1 Nov 2003 05:30:35 -0000	1.13
--- Makefile.am	3 Dec 2003 20:27:44 -0000	1.14
***************
*** 1,4 ****
  lib_LTLIBRARIES = libcairo.la
! include_HEADERS = cairo.h cairo-xlib.h
  
  libcairo_la_SOURCES = 		\
--- 1,10 ----
  lib_LTLIBRARIES = libcairo.la
! include_HEADERS = cairo.h cairo-config.h
! 
! if HAVE_XLIB_BACKEND
! libcairo_xlib_sources = cairo_xlib_surface.c
! else
! libcairo_xlib_sources = 
! endif
  
  libcairo_la_SOURCES = 		\
***************
*** 24,33 ****
  	cairo_surface.c		\
  	cairo_traps.c		\
! 	cairo_xlib_surface.c	\
  	cairoint.h
  
  libcairo_la_LDFLAGS = -version-info @VERSION_INFO@
  
! INCLUDES = $(CAIRO_CFLAGS) $(X_CFLAGS)
  
! libcairo_la_LIBADD = $(CAIRO_LIBS) -lm
--- 30,39 ----
  	cairo_surface.c		\
  	cairo_traps.c		\
! 	$(libcairo_xlib_sources)\
  	cairoint.h
  
  libcairo_la_LDFLAGS = -version-info @VERSION_INFO@
  
! INCLUDES = $(CAIRO_CFLAGS) $(FONTCONFIG_CFLAGS) $(XRENDER_CFLAGS) $(X_CFLAGS)
  
! libcairo_la_LIBADD = $(CAIRO_LIBS) $(FONTCONFIG_LIBS) $(XRENDER_LIBS) $(X_LIBS) -lm

Index: cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** cairo.h	18 Nov 2003 14:18:05 -0000	1.30
--- cairo.h	3 Dec 2003 20:27:44 -0000	1.31
***************
*** 100,103 ****
--- 100,115 ----
  		     double	y_pixels_per_inch);
  
+ #ifdef CAIRO_HAS_XLIB_BACKEND
+ 
+ #include <X11/extensions/Xrender.h>
+ 
+ /* XXX: This shold be renamed to cairo_set_target_xlib to match the
+  * other backends */
+ extern void __external_linkage
+ cairo_set_target_drawable (cairo_t	*cr,
+ 			   Display	*dpy,
+ 			   Drawable	drawable);
+ #endif /* CAIRO_HAS_X_BACKEND */
+ 
  typedef enum cairo_operator { 
      CAIRO_OPERATOR_CLEAR,
***************
*** 609,612 ****
--- 621,640 ----
  			 double	y_pixels_per_inch);
  
+ #ifdef CAIRO_HAS_XLIB_BACKEND
+ 
+ /* XXX: This is a mess from the user's POV. Should the Visual or the
+    cairo_format_t control what render format is used? Maybe I can have
+    cairo_surface_create_for_window with a visual, and
+    cairo_surface_create_for_pixmap with a cairo_format_t. Would that work?
+ */
+ extern cairo_surface_t * __external_linkage
+ cairo_xlib_surface_create (Display		*dpy,
+ 			   Drawable		drawable,
+ 			   Visual		*visual,
+ 			   cairo_format_t	format,
+ 			   Colormap		colormap);
+ 
+ #endif /* CAIRO_HAS_XLIB_BACKEND */
+ 
  /* Matrix functions */
  

Index: cairoint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairoint.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** cairoint.h	7 Nov 2003 02:33:28 -0000	1.39
--- cairoint.h	3 Dec 2003 20:27:44 -0000	1.40
***************
*** 37,42 ****
  #define _CAIROINT_H_
  
- #include <X11/extensions/Xrender.h>
- 
  #include <assert.h>
  #include <stdlib.h>
--- 37,40 ----
***************
*** 551,557 ****
  
  extern cairo_status_t __internal_linkage
- _cairo_gstate_set_drawable (cairo_gstate_t *gstate, Drawable drawable);
- 
- extern cairo_status_t __internal_linkage
  _cairo_gstate_set_target_surface (cairo_gstate_t *gstate, cairo_surface_t *surface);
  
--- 549,552 ----

--- cairo-xlib.h DELETED ---





More information about the cairo-commit mailing list