[cairo-commit] cairo/src cairo.h, 1.63, 1.64 cairo_font.c, 1.29, 1.30 cairo_ft_font.c, 1.29, 1.30 cairo_glitz_surface.c, 1.12, 1.13 cairo_xlib_surface.c, 1.34, 1.35 cairoint.h, 1.80, 1.81

Carl Worth commit at pdx.freedesktop.org
Thu Jan 13 06:50:25 PST 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv16338/src

Modified Files:
	cairo.h cairo_font.c cairo_ft_font.c cairo_glitz_surface.c 
	cairo_xlib_surface.c cairoint.h 
Log Message:

        * src/cairo_xlib_surface.c:
        * src/cairo_glitz_surface.c:
        * src/cairo_ft_font.c:
        * src/cairo_font.c:
        * src/cairoint.h:
        * src/cairo.h: Replace all structure tags to have _ prefix.
        struct cairo_foo -> struct _cairo_foo
        Also, prefer cairo_foo_t over struct _cairo_foo in .c files.


Index: cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- cairo.h	5 Jan 2005 22:29:31 -0000	1.63
+++ cairo.h	13 Jan 2005 14:50:23 -0000	1.64
@@ -42,10 +42,10 @@
 #include <pixman.h>
 #include <stdio.h>
 
-typedef struct cairo cairo_t;
-typedef struct cairo_surface cairo_surface_t;
-typedef struct cairo_matrix cairo_matrix_t;
-typedef struct cairo_pattern cairo_pattern_t;
+typedef struct _cairo cairo_t;
+typedef struct _cairo_surface cairo_surface_t;
+typedef struct _cairo_matrix cairo_matrix_t;
+typedef struct _cairo_pattern cairo_pattern_t;
 
 #ifdef __cplusplus
 extern "C" {
@@ -407,7 +407,7 @@
 
 /* Font/Text functions */
 
-typedef struct cairo_font cairo_font_t;
+typedef struct _cairo_font cairo_font_t;
 
 typedef struct {
   unsigned long        index;

Index: cairo_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_font.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- cairo_font.c	21 Dec 2004 21:14:46 -0000	1.29
+++ cairo_font.c	13 Jan 2005 14:50:23 -0000	1.30
@@ -36,7 +36,6 @@
 
 #include "cairoint.h"
 
-
 /* First we implement a global font cache for named fonts. */
 
 typedef struct {
@@ -86,7 +85,7 @@
 			  void *key,
 			  void **return_value)
 {
-    const struct cairo_font_backend *backend = CAIRO_FONT_BACKEND_DEFAULT;
+    const cairo_font_backend_t *backend = CAIRO_FONT_BACKEND_DEFAULT;
     cairo_font_cache_key_t *k;
     cairo_font_cache_entry_t *entry;
     k = (cairo_font_cache_key_t *) key;
@@ -144,7 +143,7 @@
     free (cache);
 }
 
-static const struct cairo_cache_backend cairo_font_cache_backend = {
+static const cairo_cache_backend_t cairo_font_cache_backend = {
     _font_cache_hash,
     _font_cache_keys_equal,
     _font_cache_create_entry,
@@ -237,8 +236,8 @@
 }
 
 cairo_status_t
-_cairo_unscaled_font_init (cairo_unscaled_font_t 		*font, 
-			   const struct cairo_font_backend	*backend)
+_cairo_unscaled_font_init (cairo_unscaled_font_t 	*font, 
+			   const cairo_font_backend_t	*backend)
 {
     font->refcount = 1;
     font->backend = backend;

Index: cairo_ft_font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_ft_font.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- cairo_ft_font.c	11 Jan 2005 18:03:01 -0000	1.29
+++ cairo_ft_font.c	13 Jan 2005 14:50:23 -0000	1.30
@@ -256,7 +256,7 @@
     free (fc);
 }
 
-static const struct cairo_cache_backend _ft_font_cache_backend = {
+static const cairo_cache_backend_t _ft_font_cache_backend = {
     _ft_font_cache_hash,
     _ft_font_cache_keys_equal,
     _ft_font_cache_create_entry,
@@ -306,7 +306,7 @@
 
 /* implement the backend interface */
 
-const struct cairo_font_backend cairo_ft_font_backend;
+const cairo_font_backend_t cairo_ft_font_backend;
 
 static cairo_unscaled_font_t *
 _cairo_ft_font_create (const char           *family, 
@@ -1085,7 +1085,7 @@
     return CAIRO_STATUS_SUCCESS;
 }
 
-const struct cairo_font_backend cairo_ft_font_backend = {
+const cairo_font_backend_t cairo_ft_font_backend = {
     _cairo_ft_font_create,
     _cairo_ft_font_destroy,
     _cairo_ft_font_font_extents,

Index: cairo_glitz_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_glitz_surface.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cairo_glitz_surface.c	11 Jan 2005 18:03:01 -0000	1.12
+++ cairo_glitz_surface.c	13 Jan 2005 14:50:23 -0000	1.13
@@ -63,7 +63,7 @@
     cairo_surface_destroy (crsurface);
 }
 
-typedef struct cairo_glitz_surface {
+typedef struct _cairo_glitz_surface {
     cairo_surface_t base;
 
     glitz_surface_t *surface;
@@ -969,7 +969,7 @@
     return CAIRO_INT_STATUS_UNSUPPORTED;
 }
 
-static const struct cairo_surface_backend cairo_glitz_surface_backend = {
+static const cairo_surface_backend_t cairo_glitz_surface_backend = {
     _cairo_glitz_surface_create_similar,
     _cairo_glitz_surface_destroy,
     _cairo_glitz_surface_pixels_per_inch,

Index: cairo_xlib_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_xlib_surface.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- cairo_xlib_surface.c	11 Jan 2005 21:36:41 -0000	1.34
+++ cairo_xlib_surface.c	13 Jan 2005 14:50:23 -0000	1.35
@@ -61,7 +61,7 @@
     cairo_surface_destroy (surface);
 }
 
-typedef struct cairo_xlib_surface {
+typedef struct _cairo_xlib_surface {
     cairo_surface_t base;
 
     Display *dpy;
@@ -703,7 +703,7 @@
 				 const cairo_glyph_t    *glyphs,
 				 int                    num_glyphs);
 
-static const struct cairo_surface_backend cairo_xlib_surface_backend = {
+static const cairo_surface_backend_t cairo_xlib_surface_backend = {
     _cairo_xlib_surface_create_similar,
     _cairo_xlib_surface_destroy,
     _cairo_xlib_surface_pixels_per_inch,

Index: cairoint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairoint.h,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- cairoint.h	11 Jan 2005 18:03:01 -0000	1.80
+++ cairoint.h	13 Jan 2005 14:50:23 -0000	1.81
@@ -122,38 +122,38 @@
 #define CAIRO_MAXSHORT SHRT_MAX
 #define CAIRO_MINSHORT SHRT_MIN
 
-typedef struct cairo_point {
+typedef struct _cairo_point {
     cairo_fixed_t x;
     cairo_fixed_t y;
 } cairo_point_t;
 
-typedef struct cairo_slope
+typedef struct _cairo_slope
 {
     cairo_fixed_t dx;
     cairo_fixed_t dy;
 } cairo_slope_t, cairo_distance_t;
 
-typedef struct cairo_point_double {
+typedef struct _cairo_point_double {
     double x;
     double y;
 } cairo_point_double_t;
 
-typedef struct cairo_distance_double {
+typedef struct _cairo_distance_double {
     double dx;
     double dy;
 } cairo_distance_double_t;
 
-typedef struct cairo_line {
+typedef struct _cairo_line {
     cairo_point_t p1;
     cairo_point_t p2;
 } cairo_line_t, cairo_box_t;
 
-typedef struct cairo_trapezoid {
+typedef struct _cairo_trapezoid {
     cairo_fixed_t top, bottom;
     cairo_line_t left, right;
 } cairo_trapezoid_t;
 
-typedef struct cairo_rectangle_int {
+typedef struct _cairo_rectangle_int {
     short x, y;
     unsigned short width, height;
 } cairo_rectangle_t, cairo_glyph_size_t;
@@ -180,21 +180,21 @@
 
 #define CAIRO_PATH_BUF_SZ 64
 
-typedef struct cairo_path_op_buf {
+typedef struct _cairo_path_op_buf {
     int num_ops;
     cairo_path_op_t op[CAIRO_PATH_BUF_SZ];
 
-    struct cairo_path_op_buf *next, *prev;
+    struct _cairo_path_op_buf *next, *prev;
 } cairo_path_op_buf_t;
 
-typedef struct cairo_path_arg_buf {
+typedef struct _cairo_path_arg_buf {
     int num_points;
     cairo_point_t points[CAIRO_PATH_BUF_SZ];
 
-    struct cairo_path_arg_buf *next, *prev;
+    struct _cairo_path_arg_buf *next, *prev;
 } cairo_path_arg_buf_t;
 
-typedef struct cairo_path {
+typedef struct _cairo_path {
     cairo_path_op_buf_t *op_head;
     cairo_path_op_buf_t *op_tail;
 
@@ -206,14 +206,14 @@
     int has_current_point;
 } cairo_path_t;
 
-typedef struct cairo_edge {
+typedef struct _cairo_edge {
     cairo_line_t edge;
     int clockWise;
 
     cairo_fixed_16_16_t current_x;
 } cairo_edge_t;
 
-typedef struct cairo_polygon {
+typedef struct _cairo_polygon {
     int num_edges;
     int edges_size;
     cairo_edge_t *edges;
@@ -225,7 +225,7 @@
     int closed;
 } cairo_polygon_t;
 
-typedef struct cairo_spline {
+typedef struct _cairo_spline {
     cairo_point_t a, b, c, d;
 
     cairo_slope_t initial_slope;
@@ -243,7 +243,7 @@
     cairo_slope_t slope_cw;
 } cairo_pen_vertex_t;
 
-typedef struct cairo_pen {
+typedef struct _cairo_pen {
     double radius;
     double tolerance;
 
@@ -251,13 +251,13 @@
     int num_vertices;
 } cairo_pen_t;
 
-typedef struct cairo_color cairo_color_t;
-typedef struct cairo_image_surface cairo_image_surface_t;
+typedef struct _cairo_color cairo_color_t;
+typedef struct _cairo_image_surface cairo_image_surface_t;
 
 /* cairo_array.c structures and functions */ 
 
-typedef struct cairo_array cairo_array_t;
-struct cairo_array {
+typedef struct _cairo_array cairo_array_t;
+struct _cairo_array {
     int size;
     int num_elements;
     int element_size;
@@ -290,7 +290,7 @@
 
 /* cairo_cache.c structures and functions */ 
 
-typedef struct cairo_cache_backend {
+typedef struct _cairo_cache_backend {
 
     unsigned long	(*hash)			(void *cache,
 						 void *key);
@@ -387,11 +387,11 @@
     double matrix[2][2];
 } cairo_font_scale_t;
 
-struct cairo_font_backend;
+struct _cairo_font_backend;
 
 typedef struct {
     int refcount;
-    const struct cairo_font_backend *backend;
+    const struct _cairo_font_backend *backend;
 } cairo_unscaled_font_t;
 
 /* 
@@ -399,7 +399,7 @@
  * matrix. These are the things the user holds references to.
  */
 
-struct cairo_font {
+struct _cairo_font {
     int refcount;
     cairo_font_scale_t scale;
     cairo_unscaled_font_t *unscaled;
@@ -450,7 +450,7 @@
 
 /* the font backend interface */
 
-typedef struct cairo_font_backend {
+typedef struct _cairo_font_backend {
     cairo_unscaled_font_t *(*create) (const char		*family,
 				      cairo_font_slant_t	slant,
 				      cairo_font_weight_t	weight);
@@ -500,9 +500,9 @@
 } cairo_font_backend_t;
 
 /* concrete font backends */
-extern const cairo_private struct cairo_font_backend cairo_ft_font_backend;
+extern const cairo_private struct _cairo_font_backend cairo_ft_font_backend;
 
-typedef struct cairo_surface_backend {
+typedef struct _cairo_surface_backend {
     cairo_surface_t *
     (*create_similar)		(void			*surface,
 				 cairo_format_t		format,
@@ -604,11 +604,11 @@
 
 } cairo_surface_backend_t;
 
-struct cairo_matrix {
+struct _cairo_matrix {
     double m[3][2];
 };
 
-typedef struct cairo_format_masks {
+typedef struct _cairo_format_masks {
     int bpp;
     unsigned long alpha_mask;
     unsigned long red_mask;
@@ -616,7 +616,7 @@
     unsigned long blue_mask;
 } cairo_format_masks_t;
 
-struct cairo_surface {
+struct _cairo_surface {
     const cairo_surface_backend_t *backend;
 
     unsigned int ref_count;
@@ -626,7 +626,7 @@
     int repeat;
 };
 
-struct cairo_image_surface {
+struct _cairo_image_surface {
     cairo_surface_t base;
 
     /* libic-specific fields */
@@ -647,7 +647,7 @@
    madness). I'm still working on a cleaner API, but in the meantime,
    at least this does prevent precision loss in color when changing
    alpha. */
-struct cairo_color {
+struct _cairo_color {
     double red;
     double green;
     double blue;
@@ -669,7 +669,7 @@
     CAIRO_PATTERN_RADIAL
 } cairo_pattern_type_t;
 
-typedef struct cairo_color_stop {
+typedef struct _cairo_color_stop {
     cairo_fixed_t offset;
     cairo_fixed_48_16_t scale;
     int id;
@@ -681,7 +681,7 @@
 					 cairo_fixed_t factor,
 					 int *pixel);
 
-typedef struct cairo_shader_op {
+typedef struct _cairo_shader_op {
     cairo_color_stop_t *stops;
     int n_stops;
     cairo_fixed_t min_offset;
@@ -690,7 +690,7 @@
     cairo_shader_function_t shader_function;
 } cairo_shader_op_t;
 
-struct cairo_pattern {
+struct _cairo_pattern {
     unsigned int ref_count;
   
     cairo_extend_t extend;
@@ -726,7 +726,7 @@
     } u;
 };
 
-typedef struct cairo_traps {
+typedef struct _cairo_traps {
     cairo_trapezoid_t *traps;
     int num_traps;
     int traps_size;
@@ -751,7 +751,7 @@
 #define CAIRO_GSTATE_PIXELS_PER_INCH_DEFAULT	96.0
 
 /* Need a name distinct from the cairo_clip function */
-typedef struct cairo_clip_rec {
+typedef struct _cairo_clip_rec {
     int x;
     int y;
     int width;
@@ -760,7 +760,7 @@
     cairo_surface_t *surface;
 } cairo_clip_rec_t;
 
-typedef struct cairo_gstate {
+typedef struct _cairo_gstate {
     cairo_operator_t operator;
     
     double tolerance;
@@ -797,16 +797,16 @@
 
     cairo_pen_t pen_regular;
 
-    struct cairo_gstate *next;
+    struct _cairo_gstate *next;
 } cairo_gstate_t;
 
-struct cairo {
+struct _cairo {
     unsigned int ref_count;
     cairo_gstate_t *gstate;
     cairo_status_t status;
 };
 
-typedef struct cairo_stroke_face {
+typedef struct _cairo_stroke_face {
     cairo_point_t ccw;
     cairo_point_t point;
     cairo_point_t cw;
@@ -1176,7 +1176,7 @@
 
 cairo_private cairo_status_t
 _cairo_unscaled_font_init (cairo_unscaled_font_t		*font, 
-			   const struct cairo_font_backend 	*backend);
+			   const struct _cairo_font_backend 	*backend);
 
 cairo_private void
 _cairo_unscaled_font_reference (cairo_unscaled_font_t *font);




More information about the cairo-commit mailing list