[cairo-commit] cairo-java/src/jni org_freedesktop_cairo_FontExtents.c, 1.1, 1.2 org_freedesktop_cairo_PDFSurface.c, 1.2, 1.3 org_freedesktop_cairo_Context.c, 1.5, 1.6 org_freedesktop_cairo_FontFace.c, 1.3, 1.4

Jeffrey Morgan commit at pdx.freedesktop.org
Mon May 9 18:02:01 PDT 2005


Committed by: kuzman

Update of /cvs/cairo/cairo-java/src/jni
In directory gabe:/tmp/cvs-serv28178/src/jni

Modified Files:
	org_freedesktop_cairo_FontExtents.c 
	org_freedesktop_cairo_PDFSurface.c 
	org_freedesktop_cairo_Context.c 
	org_freedesktop_cairo_FontFace.c 
Log Message:
Removed CurrentPath and added a few native methods

Index: org_freedesktop_cairo_FontExtents.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_FontExtents.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- org_freedesktop_cairo_FontExtents.c	23 Feb 2005 18:17:52 -0000	1.1
+++ org_freedesktop_cairo_FontExtents.c	10 May 2005 01:01:59 -0000	1.2
@@ -17,6 +17,21 @@
 extern "C" {
 #endif
 
+
+/*
+ * Class:     org_freedesktop_cairo_FontExtents
+ * Method:    free
+ * Signature: (Lorg/gnu/javagnome/Handle;)V
+ */
+JNIEXPORT void JNICALL Java_org_freedesktop_cairo_FontExtents_free
+  (JNIEnv *env, jclass cls, jobject obj)
+{
+	cairo_font_extents_t *fe;
+	
+	fe = (cairo_font_extents_t*)getPointerFromHandle(env, obj);
+	free(fe);
+}
+
 /*
  * Class:     org_freedesktop_cairo_FontExtents
  * Method:    get_ascent

Index: org_freedesktop_cairo_PDFSurface.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_PDFSurface.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- org_freedesktop_cairo_PDFSurface.c	7 May 2005 00:27:02 -0000	1.2
+++ org_freedesktop_cairo_PDFSurface.c	10 May 2005 01:01:59 -0000	1.3
@@ -7,7 +7,6 @@
  * the terms of the GNU Library General Public License version 2.
  */
 
-#include <stdio.h>
 #include <stdlib.h>
 #include <jni.h>
 #include <cairo.h>

Index: org_freedesktop_cairo_Context.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_Context.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- org_freedesktop_cairo_Context.c	9 May 2005 14:47:03 -0000	1.5
+++ org_freedesktop_cairo_Context.c	10 May 2005 01:01:59 -0000	1.6
@@ -1043,6 +1043,22 @@
 
 /*
  * Class:     org_freedesktop_cairo_Context
+ * Method:    cairo_get_target
+ * Signature: (Lorg/gnu/javagnome/Handle;)Lorg/gnu/javagnome/Handle;
+ */
+JNIEXPORT jobject JNICALL Java_org_freedesktop_cairo_Context_cairo_1get_1target
+  (JNIEnv *env, jclass cls, jobject obj)
+{
+	cairo_t *cr;
+	cairo_surface_t *target;
+	
+	cr = (cairo_t*)getPointerFromHandle(env, obj);
+	target = cairo_get_target(cr);
+	return getHandleFromPointer(env, target);
+}
+
+/*
+ * Class:     org_freedesktop_cairo_Context
  * Method:    cairo_status
  * Signature: (Lorg/gnu/glib/Handle;)I
  */

Index: org_freedesktop_cairo_FontFace.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_FontFace.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- org_freedesktop_cairo_FontFace.c	9 May 2005 14:47:03 -0000	1.3
+++ org_freedesktop_cairo_FontFace.c	10 May 2005 01:01:59 -0000	1.4
@@ -7,6 +7,7 @@
  * the terms of the GNU Library General Public License version 2.
  */
 
+#include <stdlib.h>
 #include <jni.h>
 #include <cairo.h>
 #include <jg_jnu.h>
@@ -20,6 +21,25 @@
 
 /*
  * Class:     org_freedesktop_cairo_FontFace
+ * Method:    alloc
+ * Signature: ()Lorg/gnu/javagnome/Handle;
+ */
+JNIEXPORT jobject JNICALL Java_org_freedesktop_cairo_FontFace_alloc
+  (JNIEnv *env, jclass cls)
+{
+	cairo_font_face_t *font;
+	
+	// No way to malloc cairo_font_face_t
+//	font = malloc(sizeof(cairo_font_face_t));
+//	if (font)
+//		cairo_font_face_reference(font);
+//	return getHandleFromPointer(env, font);
+	return NULL;
+}
+
+
+/*
+ * Class:     org_freedesktop_cairo_FontFace
  * Method:    cairo_font_face_destroy
  * Signature: (Lorg/gnu/glib/Handle;)V
  */




More information about the cairo-commit mailing list