[cairo-commit] cairo-ocaml/src cairo.ml, 1.18, 1.19 cairo.mli, 1.20, 1.21 ml_cairo.c, 1.24, 1.25 ml_cairo.h, 1.12, 1.13 ml_cairo_surface.c, 1.4, 1.5

Olivier Andrieu commit at pdx.freedesktop.org
Wed Aug 10 17:33:06 PDT 2005


Committed by: oandrieu

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

Modified Files:
	cairo.ml cairo.mli ml_cairo.c ml_cairo.h ml_cairo_surface.c 
Log Message:
* src/* : adapt to cairo-0.9.0
* configure.ac: bump version number to 0.9.0.0


Index: cairo.ml
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/cairo.ml,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- cairo.ml	10 Aug 2005 23:45:15 -0000	1.18
+++ cairo.ml	11 Aug 2005 00:33:04 -0000	1.19
@@ -73,6 +73,13 @@
 
 external set_tolerance : t -> float -> unit = "ml_cairo_set_tolerance"
 
+type antialias =
+    ANTIALIAS_DEFAULT
+  | ANTIALIAS_NONE
+  | ANTIALIAS_GRAY
+  | ANTIALIAS_SUBPIXEL
+external set_antialias : t -> antialias -> unit = "ml_cairo_set_antialias"
+
 type fill_rule =
     FILL_RULE_WINDING
   | FILL_RULE_EVEN_ODD
@@ -160,11 +167,6 @@
 type font_weight =
     FONT_WEIGHT_NORMAL
   | FONT_WEIGHT_BOLD
-type antialias =
-    ANTIALIAS_DEFAULT
-  | ANTIALIAS_NONE
-  | ANTIALIAS_GRAY
-  | ANTIALIAS_SUBPIXEL
 type subpixel_order =
     SUBPIXEL_ORDER_DEFAULT
   | SUBPIXEL_ORDER_RGB
@@ -273,6 +275,7 @@
 external get_operator : t -> operator = "ml_cairo_get_operator"
 external get_source : t -> [`Any] pattern = "ml_cairo_get_source"
 external get_tolerance : t -> float = "ml_cairo_get_tolerance"
+external get_antialias : t -> antialias = "ml_cairo_get_antialias"
 external get_current_point : t -> point = "ml_cairo_get_current_point"
 external get_fill_rule : t -> fill_rule = "ml_cairo_get_fill_rule"
 external get_line_width : t -> float = "ml_cairo_get_line_width"
@@ -324,6 +327,10 @@
   _surface_get_font_options s o ;
   o
 
+external surface_flush : [> `Any] surface -> unit = "ml_cairo_surface_flush"
+external mark_dirty    : [> `Any] surface -> unit = "ml_cairo_surface_mark_dirty"
+external mark_dirty_rectangle : [> `Any] surface -> int -> int -> int -> int -> unit = "ml_cairo_surface_mark_dirty_rectangle"
+
 external surface_set_device_offset : [> `Any] surface -> float -> float -> unit = "ml_cairo_surface_set_device_offset"
 
 

Index: cairo.mli
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/cairo.mli,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- cairo.mli	10 Aug 2005 23:45:15 -0000	1.20
+++ cairo.mli	11 Aug 2005 00:33:04 -0000	1.21
@@ -89,6 +89,13 @@
 
 external set_tolerance : t -> float -> unit = "ml_cairo_set_tolerance"
 
+type antialias =
+    ANTIALIAS_DEFAULT
+  | ANTIALIAS_NONE
+  | ANTIALIAS_GRAY
+  | ANTIALIAS_SUBPIXEL
+external set_antialias : t -> antialias -> unit = "ml_cairo_set_antialias"
+
 type fill_rule =
     FILL_RULE_WINDING
   | FILL_RULE_EVEN_ODD
@@ -186,11 +193,6 @@
   | FONT_WEIGHT_NORMAL 
   | FONT_WEIGHT_BOLD
 
-type antialias =
-    ANTIALIAS_DEFAULT
-  | ANTIALIAS_NONE
-  | ANTIALIAS_GRAY
-  | ANTIALIAS_SUBPIXEL
 type subpixel_order =
     SUBPIXEL_ORDER_DEFAULT
   | SUBPIXEL_ORDER_RGB
@@ -278,6 +280,7 @@
 external get_operator : t -> operator = "ml_cairo_get_operator"
 external get_source : t -> [`Any] pattern = "ml_cairo_get_source"
 external get_tolerance : t -> float = "ml_cairo_get_tolerance"
+external get_antialias : t -> antialias = "ml_cairo_get_antialias"
 external get_current_point : t -> point = "ml_cairo_get_current_point"
 external get_fill_rule : t -> fill_rule = "ml_cairo_get_fill_rule"
 external get_line_width : t -> float = "ml_cairo_get_line_width"
@@ -310,6 +313,12 @@
 
 external surface_finish : [> `Any] surface -> unit = "ml_cairo_surface_finish"
 
+val surface_get_font_options : [> `Any] surface -> Font_Options.t
+
+external surface_flush : [> `Any] surface -> unit = "ml_cairo_surface_flush"
+external mark_dirty    : [> `Any] surface -> unit = "ml_cairo_surface_mark_dirty"
+external mark_dirty_rectangle : [> `Any] surface -> int -> int -> int -> int -> unit = "ml_cairo_surface_mark_dirty_rectangle"
+
 external surface_set_device_offset : [> `Any] surface -> float -> float -> unit = "ml_cairo_surface_set_device_offset"
 
 (** {4 Image surface} *)

Index: ml_cairo.c
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/ml_cairo.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- ml_cairo.c	10 Aug 2005 23:45:15 -0000	1.24
+++ ml_cairo.c	11 Aug 2005 00:33:04 -0000	1.25
@@ -40,6 +40,11 @@
 
 wML_1_cairo(set_tolerance, Double_val)
 
+#define cairo_antialias_t_val(v) ((cairo_antialias_t) Int_val(v))
+#define Val_cairo_antialias_t(v) Val_int(v)
+
+wML_1_cairo(set_antialias, cairo_antialias_t_val)
+
 #define cairo_fill_rule_t_val(v) ((cairo_fill_rule_t) Int_val(v))
 #define Val_cairo_fill_rule_t(v) Val_int(v)
 
@@ -429,6 +434,8 @@
 
 cairo_get(tolerance, caml_copy_double)
 
+cairo_get(antialias, Val_cairo_antialias_t)
+
 CAMLprim value
 ml_cairo_get_current_point (value cr)
 {

Index: ml_cairo.h
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/ml_cairo.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ml_cairo.h	10 Aug 2005 23:45:15 -0000	1.12
+++ ml_cairo.h	11 Aug 2005 00:33:04 -0000	1.13
@@ -27,18 +27,18 @@
 
 #define cairo_surface_t_val(v)	wPointer_val(cairo_surface_t, v)
 value Val_cairo_surface_t (cairo_surface_t *);
-#define Val_cairo_surface_ref(p)	Val_cairo_surface_t ((cairo_surface_reference(p), p))
+#define Val_cairo_surface_ref(p)	Val_cairo_surface_t (cairo_surface_reference(p))
 
 #define cairo_pattern_t_val(v)	wPointer_val(cairo_pattern_t, v)
 value Val_cairo_pattern_t (cairo_pattern_t *);
-#define Val_cairo_pattern_ref(p)	Val_cairo_pattern_t ((cairo_pattern_reference(p), p))
+#define Val_cairo_pattern_ref(p)	Val_cairo_pattern_t (cairo_pattern_reference(p))
 
 #define cairo_format_t_val(v) ((cairo_format_t) Int_val(v))
 #define Val_cairo_format_t(v) Val_int(v)
 
 #define cairo_font_face_t_val(v)	wPointer_val(cairo_font_face_t, v)
 value Val_cairo_font_face_t (cairo_font_face_t *);
-#define Val_cairo_font_face_ref(p)	Val_cairo_font_face_t ((cairo_font_face_reference(p), p))
+#define Val_cairo_font_face_ref(p)	Val_cairo_font_face_t (cairo_font_face_reference(p))
 
 #define cairo_scaled_font_t_val(v)	wPointer_val(cairo_scaled_font_t, v)
 value Val_cairo_scaled_font_t (cairo_scaled_font_t *);

Index: ml_cairo_surface.c
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/ml_cairo_surface.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ml_cairo_surface.c	10 Aug 2005 23:45:15 -0000	1.4
+++ ml_cairo_surface.c	11 Aug 2005 00:33:04 -0000	1.5
@@ -87,4 +87,10 @@
 
 wML_2(cairo_surface_get_font_options, cairo_surface_t_val, cairo_font_options_t_val, Unit)
 
+wML_1(cairo_surface_flush, cairo_surface_t_val, Unit)
+
+wML_1(cairo_surface_mark_dirty, cairo_surface_t_val, Unit)
+
+wML_5(cairo_surface_mark_dirty_rectangle, cairo_surface_t_val, Int_val, Int_val, Int_val, Int_val, Unit)
+
 wML_3(cairo_surface_set_device_offset, cairo_surface_t_val, Double_val, Double_val, Unit)




More information about the cairo-commit mailing list