[cairo-commit] cairo-ocaml/src ml_cairo.h,1.1.1.1,1.2 ml_cairo_lablgtk.c,1.1.1.1,1.2
Olivier Andrieu
commit at pdx.freedesktop.org
Sat Nov 22 07:24:40 PST 2003
Committed by: oandrieu
Update of /cvs/cairo/cairo-ocaml/src
In directory pdx:/tmp/cvs-serv16423/src
Modified Files:
ml_cairo.h ml_cairo_lablgtk.c
Log Message:
use a Val_cairo_format_t
Index: ml_cairo.h
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/ml_cairo.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** ml_cairo.h 18 Nov 2003 19:02:25 -0000 1.1.1.1
--- ml_cairo.h 22 Nov 2003 15:24:38 -0000 1.2
***************
*** 8,11 ****
--- 8,27 ----
}
+ static inline value
+ Val_cairo_format_t(cairo_format_t fmt)
+ {
+ switch (fmt) {
+ case CAIRO_FORMAT_ARGB32:
+ return Val_int(0);
+ case CAIRO_FORMAT_RGB24:
+ return Val_int(1);
+ case CAIRO_FORMAT_A8:
+ return Val_int(2);
+ case CAIRO_FORMAT_A1:
+ default:
+ return Val_int(3);
+ }
+ }
+
value Val_cairo_surface_t (cairo_surface_t *);
value Val_cairo_t (cairo_t *);
Index: ml_cairo_lablgtk.c
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/ml_cairo_lablgtk.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** ml_cairo_lablgtk.c 18 Nov 2003 19:02:25 -0000 1.1.1.1
--- ml_cairo_lablgtk.c 22 Nov 2003 15:24:38 -0000 1.2
***************
*** 35,39 ****
v = alloc_small(5, 0);
Field(v, 0) = Val_bp(gdk_pixbuf_get_pixels(pixbuf));
! Field(v, 1) = Val_int(format);
Field(v, 2) = Val_int(gdk_pixbuf_get_width(pixbuf));
Field(v, 3) = Val_int(gdk_pixbuf_get_height(pixbuf));
--- 35,39 ----
v = alloc_small(5, 0);
Field(v, 0) = Val_bp(gdk_pixbuf_get_pixels(pixbuf));
! Field(v, 1) = Val_cairo_format_t(format);
Field(v, 2) = Val_int(gdk_pixbuf_get_width(pixbuf));
Field(v, 3) = Val_int(gdk_pixbuf_get_height(pixbuf));
More information about the cairo-commit
mailing list