[cairo-commit] cairo-ocaml/src Makefile,1.3,1.4 cairo.ml,1.4,1.5 cairo.mli,1.4,1.5 ml_cairo.c,1.6,1.7 ml_cairo.h,1.2,1.3 ml_cairo_lablgtk.c,1.6,1.7
Olivier Andrieu
commit at pdx.freedesktop.org
Mon Aug 15 11:12:59 PDT 2005
Committed by: oandrieu
Update of /cvs/cairo/cairo-ocaml/src
In directory pdx:/tmp/cvs-serv5006/src
Modified Files:
Makefile cairo.ml cairo.mli ml_cairo.c ml_cairo.h
ml_cairo_lablgtk.c
Log Message:
wrap cairo_current_path and cairo_current_path_flat
Index: Makefile
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** a/Makefile 22 Feb 2004 19:21:08 -0000 1.3
--- b/Makefile 22 Feb 2004 22:41:26 -0000 1.4
***************
*** 26,30 ****
ocairo.mli ocairo.ml \
ml_cairo_status.c ml_cairo_channel.c \
! ml_cairo.c ml_cairo_bigarr.c
cairo.cma : $(call mlobjs,$(cairo_SRC))
--- 26,30 ----
ocairo.mli ocairo.ml \
ml_cairo_status.c ml_cairo_channel.c \
! ml_cairo.c ml_cairo_bigarr.c ml_cairo_path.c
cairo.cma : $(call mlobjs,$(cairo_SRC))
Index: cairo.ml
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/cairo.ml,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** a/cairo.ml 22 Feb 2004 19:21:08 -0000 1.4
--- b/cairo.ml 22 Feb 2004 22:41:26 -0000 1.5
***************
*** 244,245 ****
--- 244,255 ----
external finalise_target : cr:t -> unit = "ml_cairo_finalise_target"
external surface_finalise : surface -> unit = "ml_cairo_surface_finalise"
+
+ type flat_path = [
+ | `MOVE_TO of point
+ | `LINE_TO of point
+ | `CLOSE ]
+ type basic_path = [
+ | flat_path
+ | `CURVE_TO of point * point * point ]
+ external fold_current_path : t -> ('a -> [> basic_path] -> 'a) -> 'a -> 'a = "ml_cairo_current_path"
+ external fold_current_path_flat : t -> ('a -> [> flat_path] -> 'a) -> 'a -> 'a = "ml_cairo_current_path_flat"
Index: cairo.mli
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/cairo.mli,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** a/cairo.mli 22 Feb 2004 19:21:08 -0000 1.4
--- b/cairo.mli 22 Feb 2004 22:41:26 -0000 1.5
***************
*** 147,150 ****
--- 147,160 ----
external in_fill : cr:t -> x:float -> y:float -> bool = "ml_cairo_in_fill"
+ type flat_path = [
+ | `MOVE_TO of point
+ | `LINE_TO of point
+ | `CLOSE ]
+ type basic_path = [
+ | flat_path
+ | `CURVE_TO of point * point * point ]
+ external fold_current_path : t -> ('a -> [> basic_path] -> 'a) -> 'a -> 'a = "ml_cairo_current_path"
+ external fold_current_path_flat : t -> ('a -> [> flat_path] -> 'a) -> 'a -> 'a = "ml_cairo_current_path_flat"
+
(** {3 Misc stuff I don't know how to categorize} *)
Index: ml_cairo.c
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/ml_cairo.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** a/ml_cairo.c 22 Feb 2004 19:21:08 -0000 1.6
--- b/ml_cairo.c 22 Feb 2004 22:41:26 -0000 1.7
***************
*** 13,17 ****
Make_Val_final_pointer(cairo_t, Ignore, cairo_destroy, 20)
! #define cairo_t_val(v) ((cairo_t *)Pointer_val(v))
Make_Val_final_pointer(cairo_surface_t, Ignore, cairo_surface_destroy, 20)
#define cairo_surface_t_val(v) ((cairo_surface_t *)Pointer_val(v))
--- 13,17 ----
Make_Val_final_pointer(cairo_t, Ignore, cairo_destroy, 20)
!
Make_Val_final_pointer(cairo_surface_t, Ignore, cairo_surface_destroy, 20)
#define cairo_surface_t_val(v) ((cairo_surface_t *)Pointer_val(v))
Index: ml_cairo.h
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/ml_cairo.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** a/ml_cairo.h 22 Nov 2003 15:24:38 -0000 1.2
--- b/ml_cairo.h 22 Feb 2004 22:41:26 -0000 1.3
***************
*** 1,2 ****
--- 1,4 ----
+ #define cairo_t_val(v) ((cairo_t *)Pointer_val(v))
+
static inline cairo_format_t
cairo_format_t_val(value _v)
Index: ml_cairo_lablgtk.c
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/ml_cairo_lablgtk.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** a/ml_cairo_lablgtk.c 5 Dec 2003 22:34:22 -0000 1.6
--- b/ml_cairo_lablgtk.c 22 Feb 2004 22:41:26 -0000 1.7
***************
*** 15,20 ****
#include "ml_cairo_status.h"
- #define cairo_t_val(v) ((cairo_t *) Field((v), 1))
-
CAMLprim value
cairo_lablgtk_of_pixbuf(value pb)
--- 15,18 ----
More information about the cairo-commit
mailing list