[cairo-commit] CairoJava/jni CairoGlitzSurface.cpp, 1.2,
1.3 CairoSWTSurface.cpp, 1.1, 1.2
Soorya Kuloor
commit at pdx.freedesktop.org
Tue May 11 12:50:02 PDT 2004
- Previous message: [cairo-commit]
cairo/src cairo_gstate.c, 1.49, 1.50 cairo_pattern.c,
1.7, 1.8 cairo_surface.c, 1.29, 1.30 cairoint.h, 1.60, 1.61
- Next message: [cairo-commit] CairoJava/jni CairoException.cpp,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-serv406/jni
Modified Files:
CairoGlitzSurface.cpp CairoSWTSurface.cpp
Log Message:
Added exception handling code
Index: CairoGlitzSurface.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoGlitzSurface.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** a/CairoGlitzSurface.cpp 5 May 2004 23:00:34 -0000 1.2
--- b/CairoGlitzSurface.cpp 11 May 2004 19:49:59 -0000 1.3
***************
*** 40,44 ****
--- 40,49 ----
(JNIEnv * env, jclass me, jlong crp, jlong sfp)
{
+ #ifdef CAIRO_HAS_GL_SURFACE
cairo_set_target_gl(TO_PTR(cairo_t, crp), TO_PTR(glitz_surface_t, sfp));
+ #else
+ throw_surface_not_supported_exception(env, "glitz");
+ #endif
+
}
***************
*** 51,54 ****
--- 56,60 ----
(JNIEnv *env, jclass me, jlong widgetp)
{
+ #ifdef CAIRO_HAS_GL_SURFACE
GtkWidget *widget = TO_PTR(GtkWidget, widgetp);
gtk_widget_set_double_buffered (widget, FALSE);
***************
*** 87,90 ****
--- 93,100 ----
return TO_LONG(glitz_surface);
+ #else
+ throw_surface_not_supported_exception(env, "glitz");
+ return 0;
+ #endif
}
***************
*** 97,100 ****
--- 107,115 ----
(JNIEnv *env, jclass me, jlong glitz_surfacep, jint x, jint y, jint width, jint height)
{
+ #ifdef CAIRO_HAS_GL_SURFACE
glitz_surface_flush(TO_PTR(glitz_surface_t, glitz_surfacep), x, y, width, height);
+ #else
+ throw_surface_not_supported_exception(env, "glitz");
+ #endif
}
+
Index: CairoSWTSurface.cpp
===================================================================
RCS file: /cvs/cairo/CairoJava/jni/CairoSWTSurface.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** a/CairoSWTSurface.cpp 30 Apr 2004 17:47:39 -0000 1.1
--- b/CairoSWTSurface.cpp 11 May 2004 19:49:59 -0000 1.2
***************
*** 39,42 ****
--- 39,44 ----
(JNIEnv *env, jclass me, jlong image)
{
+ #ifdef CAIRO_HAS_XLIB_SURFACE
+
GdkPixmap *drawable = (GdkPixmap *) (long) image;
***************
*** 50,53 ****
--- 52,60 ----
return TO_LONG(surface);
+
+ #else
+ throw_surface_not_supported_exception(env, "xlib");
+ return 0;
+ #endif
}
***************
*** 58,63 ****
*/
JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_CairoSWTSurface_cairo_1swt_1widget_1surface_1create
! (JNIEnv *env, jclass me, jlong widget)
{
GdkDrawable *drawable;
gint x_offset, y_offset;
--- 65,72 ----
*/
JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_CairoSWTSurface_cairo_1swt_1widget_1surface_1create
! (JNIEnv *env, jclass me, jlong widget)
{
+ #ifdef CAIRO_HAS_XLIB_SURFACE
+
GdkDrawable *drawable;
gint x_offset, y_offset;
***************
*** 75,77 ****
--- 84,90 ----
return TO_LONG(surface);
+ #else
+ throw_surface_not_supported_exception(env, "xlib");
+ return 0;
+ #endif
}
- Previous message: [cairo-commit]
cairo/src cairo_gstate.c, 1.49, 1.50 cairo_pattern.c,
1.7, 1.8 cairo_surface.c, 1.29, 1.30 cairoint.h, 1.60, 1.61
- Next message: [cairo-commit] CairoJava/jni CairoException.cpp,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list