diff options
author | Olivier Andrieu <oandrieu@gmail.com> | 2005-11-03 14:47:03 +0000 |
---|---|---|
committer | Hezekiah M. Carty <hcarty@atmos.umd.edu> | 2009-06-18 14:00:26 -0400 |
commit | 12d3168e43f7fa9f9554b2f01dd88b5b171f6187 (patch) | |
tree | 2e70038ca3748768385c926c06e7bca86b5f7c1c | |
parent | abb7ee90ee9bb0b41667e3d989de98529224219e (diff) |
Bump to Cairo 1.0
* configure.ac: require cairo 1.0, bump version number to 1.0
* src/cairo.ml, src/cairo.mli, src/ml_cairo.c: version information
APIs
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | src/cairo.ml | 9 | ||||
-rw-r--r-- | src/cairo.mli | 9 | ||||
-rw-r--r-- | src/ml_cairo.c | 21 |
5 files changed, 47 insertions, 10 deletions
@@ -1,5 +1,11 @@ 2005-11-03 Olivier Andrieu <oliv__a@users.sourceforge.net> + * configure.ac: require cairo 1.0, bump version number to 1.0 + * src/cairo.ml, src/cairo.mli, src/ml_cairo.c: version information + APIs + +2005-11-03 Olivier Andrieu <oliv__a@users.sourceforge.net> + * src/ml_cairo_pattern.c, src/ml_cairo_matrix.c, src/ml_cairo.c: fixes for archs with ARCH_ALIGN_DOUBLE (patch from Samuel Mimram). diff --git a/configure.ac b/configure.ac index b195571..f0b9d8b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(CAIRO_OCAML, 0.9.0.0) +AC_INIT(CAIRO_OCAML, 1.0.0) AC_CONFIG_SRCDIR(src/cairo.ml) AC_CONFIG_AUX_DIR(support) @@ -6,7 +6,7 @@ AC_CONFIG_AUX_DIR(support) AC_PROG_OCAML() # Check for cairo -PKG_CHECK_MODULES(CAIRO, cairo >= 0.6.0 freetype2) +PKG_CHECK_MODULES(CAIRO, cairo >= 1.0.0 freetype2) # Optional GTK support (for the X11 backend) AC_ARG_WITH(gtk, @@ -25,19 +25,11 @@ if test $use_gtk = yes ; then fi fi -dnl if test $use_gtk = yes ; then -dnl # Check for gtkcairo -dnl PKG_CHECK_MODULES(GTKCAIRO, gtkcairo, use_gtkcairo=yes, use_gtkcairo=no) -dnl else -dnl use_gtkcairo=no -dnl fi - # Optional libsvg-cairo support PKG_CHECK_MODULES(LIBSVG_CAIRO, libsvg-cairo, use_libsvg_cairo=yes, use_libsvg_cairo=no) echo echo " GTK+ support: $use_gtk" -dnl echo " GTKCairo support: $use_gtkcairo" echo " libsvg-cairo support: $use_libsvg_cairo" echo diff --git a/src/cairo.ml b/src/cairo.ml index 2b07d8e..6d7a3bc 100644 --- a/src/cairo.ml +++ b/src/cairo.ml @@ -26,9 +26,18 @@ type status = | INVALID_FORMAT | INVALID_VISUAL | FILE_NOT_FOUND + | INVALID_DASH exception Error of status let init = Callback.register_exception "cairo_status_exn" (Error NULL_POINTER) +external version_encode : int -> int -> int -> int = "ml_CAIRO_VERSION_ENCODE" +external run_time_version : unit -> int = "ml_cairo_version" +external run_time_version_string : unit -> string = "ml_cairo_version_string" +external _version : unit -> int = "ml_CAIRO_VERSION" +external _version_string : unit -> string = "ml_CAIRO_VERSION_STRING" +let compile_time_version = _version () +let compile_time_version_string = _version_string () + type t type -'a surface type -'a pattern diff --git a/src/cairo.mli b/src/cairo.mli index e7b1519..f097974 100644 --- a/src/cairo.mli +++ b/src/cairo.mli @@ -30,9 +30,18 @@ type status = | INVALID_FORMAT | INVALID_VISUAL | FILE_NOT_FOUND + | INVALID_DASH exception Error of status val init : unit +external version_encode : int -> int -> int -> int = "ml_CAIRO_VERSION_ENCODE" + +external run_time_version : unit -> int = "ml_cairo_version" +external run_time_version_string : unit -> string = "ml_cairo_version_string" + +val compile_time_version : int +val compile_time_version_string : string + (** {3 Types} *) type t diff --git a/src/ml_cairo.c b/src/ml_cairo.c index 57732d0..d6e77a1 100644 --- a/src/ml_cairo.c +++ b/src/ml_cairo.c @@ -8,6 +8,27 @@ #include "ml_cairo.h" +wML_0(cairo_version_string, caml_copy_string) +wML_0(cairo_version, Val_int) + +CAMLprim value +ml_CAIRO_VERSION_STRING (value unit) +{ + return caml_copy_string (CAIRO_VERSION_STRING); +} + +CAMLprim value +ml_CAIRO_VERSION (value unit) +{ + return Val_int (CAIRO_VERSION); +} + +CAMLprim value +ml_CAIRO_VERSION_ENCODE (value maj, value min, value mic) +{ + return Val_int (CAIRO_VERSION_ENCODE (Int_val(maj), Int_val(min), Int_val(mic))); +} + wMake_Val_final_pointer(cairo_t, cairo_destroy, 0) CAMLprim value |