diff options
author | Silenio Quarti | 2011-10-20 17:08:33 +0000 |
---|---|---|
committer | Silenio Quarti | 2011-10-20 17:08:33 +0000 |
commit | a3c8e8904451b6db108629003e63438cb42170e1 (patch) | |
tree | 27eca76f5991f0130d72a37d4db67775be7e6eb7 /bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library | |
parent | 97620fe3667502da9f174b22a0db4534a8d8f70b (diff) | |
download | eclipse.platform.swt-a3c8e8904451b6db108629003e63438cb42170e1.tar.gz eclipse.platform.swt-a3c8e8904451b6db108629003e63438cb42170e1.tar.xz eclipse.platform.swt-a3c8e8904451b6db108629003e63438cb42170e1.zip |
create opaque image surfaces; target cairo 1.2 APIs; remove surfaceData field
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library')
4 files changed, 72 insertions, 3 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 3d475ab49f..1b775b5dda 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 @@ -559,6 +559,46 @@ JNIEXPORT jintLong JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1create_1for_1da } #endif +#ifndef NO__1cairo_1image_1surface_1get_1data +JNIEXPORT jintLong JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1data) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + Cairo_NATIVE_ENTER(env, that, _1cairo_1image_1surface_1get_1data_FUNC); +/* + rc = (jintLong)cairo_image_surface_get_data((cairo_surface_t *)arg0); +*/ + { + Cairo_LOAD_FUNCTION(fp, cairo_image_surface_get_data) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(cairo_surface_t *))fp)((cairo_surface_t *)arg0); + } + } + Cairo_NATIVE_EXIT(env, that, _1cairo_1image_1surface_1get_1data_FUNC); + return rc; +} +#endif + +#ifndef NO__1cairo_1image_1surface_1get_1format +JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1format) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + Cairo_NATIVE_ENTER(env, that, _1cairo_1image_1surface_1get_1format_FUNC); +/* + rc = (jint)cairo_image_surface_get_format((cairo_surface_t *)arg0); +*/ + { + Cairo_LOAD_FUNCTION(fp, cairo_image_surface_get_format) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(cairo_surface_t *))fp)((cairo_surface_t *)arg0); + } + } + Cairo_NATIVE_EXIT(env, that, _1cairo_1image_1surface_1get_1format_FUNC); + return rc; +} +#endif + #ifndef NO__1cairo_1image_1surface_1get_1height JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1height) (JNIEnv *env, jclass that, jintLong arg0) @@ -571,6 +611,26 @@ JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1height) } #endif +#ifndef NO__1cairo_1image_1surface_1get_1stride +JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1stride) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + Cairo_NATIVE_ENTER(env, that, _1cairo_1image_1surface_1get_1stride_FUNC); +/* + rc = (jint)cairo_image_surface_get_stride((cairo_surface_t *)arg0); +*/ + { + Cairo_LOAD_FUNCTION(fp, cairo_image_surface_get_stride) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(cairo_surface_t *))fp)((cairo_surface_t *)arg0); + } + } + Cairo_NATIVE_EXIT(env, that, _1cairo_1image_1surface_1get_1stride_FUNC); + return rc; +} +#endif + #ifndef NO__1cairo_1image_1surface_1get_1width JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1image_1surface_1get_1width) (JNIEnv *env, jclass that, jintLong arg0) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h index 9d08cda12d..b2cb701fd7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h @@ -32,4 +32,7 @@ #define cairo_pdf_surface_set_size_LIB LIB_CAIRO #define cairo_ps_surface_set_size_LIB LIB_CAIRO #define cairo_surface_set_fallback_resolution_LIB LIB_CAIRO -#define cairo_surface_get_type_LIB LIB_CAIRO
\ No newline at end of file +#define cairo_surface_get_type_LIB LIB_CAIRO +#define cairo_image_surface_get_data_LIB LIB_CAIRO +#define cairo_image_surface_get_format_LIB LIB_CAIRO +#define cairo_image_surface_get_stride_LIB LIB_CAIRO
\ No newline at end of file diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c index 4404269235..a15bcea6b4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.c @@ -24,8 +24,8 @@ #ifdef NATIVE_STATS -int Cairo_nativeFunctionCount = 146; -int Cairo_nativeFunctionCallCount[146]; +int Cairo_nativeFunctionCount = 149; +int Cairo_nativeFunctionCallCount[149]; char * Cairo_nativeFunctionNames[] = { "CAIRO_1VERSION_1ENCODE", "_1cairo_1append_1path", @@ -71,7 +71,10 @@ char * Cairo_nativeFunctionNames[] = { "_1cairo_1identity_1matrix", "_1cairo_1image_1surface_1create", "_1cairo_1image_1surface_1create_1for_1data", + "_1cairo_1image_1surface_1get_1data", + "_1cairo_1image_1surface_1get_1format", "_1cairo_1image_1surface_1get_1height", + "_1cairo_1image_1surface_1get_1stride", "_1cairo_1image_1surface_1get_1width", "_1cairo_1in_1fill", "_1cairo_1in_1stroke", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h index b3a532b299..78d398ea9d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_stats.h @@ -79,7 +79,10 @@ typedef enum { _1cairo_1identity_1matrix_FUNC, _1cairo_1image_1surface_1create_FUNC, _1cairo_1image_1surface_1create_1for_1data_FUNC, + _1cairo_1image_1surface_1get_1data_FUNC, + _1cairo_1image_1surface_1get_1format_FUNC, _1cairo_1image_1surface_1get_1height_FUNC, + _1cairo_1image_1surface_1get_1stride_FUNC, _1cairo_1image_1surface_1get_1width_FUNC, _1cairo_1in_1fill_FUNC, _1cairo_1in_1stroke_FUNC, |