diff options
author | Felipe Heidrich <fheidric> | 2006-07-05 16:31:12 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2006-07-05 16:31:12 +0000 |
commit | 7f9fed93a58407b1534210fdee982a8ba5e1eacf (patch) | |
tree | fb5b2d2dbd070ca43fe4c01c59968f2741fc2fa6 /bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c | |
parent | 0054e44bae79888fe8fb634f4b01c2321d00ad18 (diff) | |
download | eclipse.platform.swt-7f9fed93a58407b1534210fdee982a8ba5e1eacf.tar.gz eclipse.platform.swt-7f9fed93a58407b1534210fdee982a8ba5e1eacf.tar.xz eclipse.platform.swt-7f9fed93a58407b1534210fdee982a8ba5e1eacf.zip |
fixing structures
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c index af8750bc7c..b3287aab9d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo.c @@ -1586,23 +1586,7 @@ JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1surface_1set_1fallback_1resolution) (JNIEnv *env, jclass that, jint arg0, jdouble arg1, jdouble arg2) { Cairo_NATIVE_ENTER(env, that, cairo_1surface_1set_1fallback_1resolution_FUNC); -/* cairo_surface_set_fallback_resolution(arg0, arg1, arg2); -*/ - { - static int initialized = 0; - static void *handle = NULL; - typedef void (*FPTR)(jint, jdouble, jdouble); - static FPTR fptr; - if (!initialized) { - if (!handle) handle = dlopen(cairo_surface_set_fallback_resolution_LIB, RTLD_LAZY); - if (handle) fptr = (FPTR)dlsym(handle, "cairo_surface_set_fallback_resolution"); - initialized = 1; - } - if (fptr) { - (*fptr)(arg0, arg1, arg2); - } - } Cairo_NATIVE_EXIT(env, that, cairo_1surface_1set_1fallback_1resolution_FUNC); } #endif @@ -1621,18 +1605,33 @@ JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1surface_1set_1user_1data) #ifndef NO_cairo_1text_1extents JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1text_1extents) - (JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jint arg2) + (JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jobject arg2) { jbyte *lparg1=NULL; + cairo_text_extents_t _arg2, *lparg2=NULL; Cairo_NATIVE_ENTER(env, that, cairo_1text_1extents_FUNC); if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; - cairo_text_extents((cairo_t *)arg0, (const char *)lparg1, (cairo_text_extents_t *)arg2); + if (arg2) if ((lparg2 = getcairo_text_extents_tFields(env, arg2, &_arg2)) == NULL) goto fail; + cairo_text_extents((cairo_t *)arg0, (const char *)lparg1, (cairo_text_extents_t *)lparg2); fail: + if (arg2 && lparg2) setcairo_text_extents_tFields(env, arg2, lparg2); if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); Cairo_NATIVE_EXIT(env, that, cairo_1text_1extents_FUNC); } #endif +#ifndef NO_cairo_1text_1extents_1t_1sizeof +JNIEXPORT jint JNICALL Cairo_NATIVE(cairo_1text_1extents_1t_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + Cairo_NATIVE_ENTER(env, that, cairo_1text_1extents_1t_1sizeof_FUNC); + rc = (jint)cairo_text_extents_t_sizeof(); + Cairo_NATIVE_EXIT(env, that, cairo_1text_1extents_1t_1sizeof_FUNC); + return rc; +} +#endif + #ifndef NO_cairo_1text_1path JNIEXPORT void JNICALL Cairo_NATIVE(cairo_1text_1path) (JNIEnv *env, jclass that, jint arg0, jbyteArray arg1) |