[cairo-commit] CairoJava/jni CairoGlitzSurface.cpp,1.3,1.4
Soorya Kuloor
commit at pdx.freedesktop.org
Thu May 13 09:45:40 PDT 2004
- Previous message: [cairo-commit] CairoJava/jni utils.cpp,1.1,1.2
- Next message: [cairo-commit] CairoJava/src/org/cairographics/cairo
CairoSurface.java, 1.7, 1.8 Cairo.java, 1.7,
1.8 CairoFont.java, 1.2, 1.3 CairoMatrix.java, 1.5,
1.6 CairoException.java, 1.3, 1.4 CairoImageBuffer.java, 1.1,
1.2 CairoPattern.java, 1.1, 1.2 CairoGlitzSurface.java, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: skuloor
Update of /cvs/cairo/CairoJava/jni
In directory pdx:/tmp/cvs-serv26060/jni
Modified Files:
CairoGlitzSurface.cpp
Log Message:
Use proper #ifdefs while including glitz header
Index: CairoGlitzSurface.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoGlitzSurface.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** a/CairoGlitzSurface.cpp 11 May 2004 19:49:59 -0000 1.3
--- b/CairoGlitzSurface.cpp 13 May 2004 16:45:38 -0000 1.4
***************
*** 26,30 ****
--- 26,34 ----
*/
#include <cairo.h>
+
+ #ifdef CAIRO_HAS_GL_SURFACE
#include <glitz-glx.h>
+ #endif
+
#include <gdk/gdkx.h>
#include <gtk/gtkwidget.h>
***************
*** 114,115 ****
--- 118,140 ----
}
+ /*
+ * Class: org_cairographics_cairo_Cairo
+ * Method: cairo_init
+ * Signature: (Ljava/lang/String;)V
+ */
+ JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoGlitzSurface_cairo_1glitz_1init
+ (JNIEnv *env, jclass me, jstring j_opengl_lib) {
+
+ #ifdef CAIRO_HAS_GL_SURFACE
+ const char* opengl_lib;
+ if ( j_opengl_lib ) {
+ opengl_lib = env->GetStringUTFChars(j_opengl_lib, NULL);
+ if ( opengl_lib == NULL ) {
+ return; // out of memory exception thrown
+ }
+ glitz_glx_init(opengl_lib);
+ env->ReleaseStringUTFChars(j_opengl_lib, opengl_lib);
+ }
+ #endif
+
+ }
- Previous message: [cairo-commit] CairoJava/jni utils.cpp,1.1,1.2
- Next message: [cairo-commit] CairoJava/src/org/cairographics/cairo
CairoSurface.java, 1.7, 1.8 Cairo.java, 1.7,
1.8 CairoFont.java, 1.2, 1.3 CairoMatrix.java, 1.5,
1.6 CairoException.java, 1.3, 1.4 CairoImageBuffer.java, 1.1,
1.2 CairoPattern.java, 1.1, 1.2 CairoGlitzSurface.java, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list