diff options
author | Silenio Quarti <silenio> | 2006-09-29 16:03:03 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2006-09-29 16:03:03 +0000 |
commit | b42bdf7ce8d834065ebc04bdf6d3e3b7dc019b71 (patch) | |
tree | 905fa1d202bc446c1c8527cad9bb73583b4bb12a | |
parent | ccd5279b598697ba04a808bfbcd4f86d42fb9070 (diff) | |
download | eclipse.platform.swt-b42bdf7ce8d834065ebc04bdf6d3e3b7dc019b71.tar.gz eclipse.platform.swt-b42bdf7ce8d834065ebc04bdf6d3e3b7dc019b71.tar.xz eclipse.platform.swt-b42bdf7ce8d834065ebc04bdf6d3e3b7dc019b71.zip |
*** empty log message ***
6 files changed, 43 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties index d72e36797a..60a74fc8d3 100644 --- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties +++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties @@ -978,6 +978,9 @@ OS_CGBitmapContextCreate_4=cast=(size_t) OS_CGBitmapContextCreate_5=cast=(CGColorSpaceRef) OS_CGBitmapContextCreate_6=cast=(CGImageAlphaInfo) +OS_CGBitmapContextCreateImage=flags=dynamic +OS_CGBitmapContextCreateImage_0= + OS_CGColorCreate= OS_CGColorCreate_0=cast=(CGColorSpaceRef) OS_CGColorCreate_1= diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c index ed29370404..d66094fa12 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c @@ -1286,6 +1286,35 @@ JNIEXPORT jint JNICALL OS_NATIVE(CGBitmapContextCreate) } #endif +#ifndef NO_CGBitmapContextCreateImage +JNIEXPORT jint JNICALL OS_NATIVE(CGBitmapContextCreateImage) + (JNIEnv *env, jclass that, jint arg0) +{ + jint rc = 0; + OS_NATIVE_ENTER(env, that, CGBitmapContextCreateImage_FUNC); +/* + rc = (jint)CGBitmapContextCreateImage(arg0); +*/ + { + static int initialized = 0; + static CFBundleRef bundle = NULL; + typedef jint (*FPTR)(jint); + static FPTR fptr; + rc = 0; + if (!initialized) { + if (!bundle) bundle = CFBundleGetBundleWithIdentifier(CFSTR(CGBitmapContextCreateImage_LIB)); + if (bundle) fptr = (FPTR)CFBundleGetFunctionPointerForName(bundle, CFSTR("CGBitmapContextCreateImage")); + initialized = 1; + } + if (fptr) { + rc = (jint)(*fptr)(arg0); + } + } + OS_NATIVE_EXIT(env, that, CGBitmapContextCreateImage_FUNC); + return rc; +} +#endif + #ifndef NO_CGColorCreate JNIEXPORT jint JNICALL OS_NATIVE(CGColorCreate) (JNIEnv *env, jclass that, jint arg0, jfloatArray arg1) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.h index 378af2f1e5..92fecd1281 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.h @@ -21,3 +21,4 @@ #define NavDialogSetFilterTypeIdentifiers_LIB "com.apple.Carbon"
#define LSCopyAllRoleHandlersForContentType_LIB "com.apple.Carbon"
#define LSOpenItemsWithRole_LIB "com.apple.Carbon"
+#define CGBitmapContextCreateImage_LIB "com.apple.Carbon"
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c index a364a4b3b7..d4f5eb7071 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c @@ -14,8 +14,8 @@ #ifdef NATIVE_STATS -int OS_nativeFunctionCount = 938; -int OS_nativeFunctionCallCount[938]; +int OS_nativeFunctionCount = 939; +int OS_nativeFunctionCallCount[939]; char * OS_nativeFunctionNames[] = { "AECountItems", "AEGetNthPtr", @@ -108,6 +108,7 @@ char * OS_nativeFunctionNames[] = { "CGAffineTransformScale", "CGAffineTransformTranslate", "CGBitmapContextCreate", + "CGBitmapContextCreateImage", "CGColorCreate", "CGColorRelease", "CGColorSpaceCreateDeviceRGB", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h index f8dca21c0f..c039281c2b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h @@ -112,6 +112,7 @@ typedef enum { CGAffineTransformScale_FUNC, CGAffineTransformTranslate_FUNC, CGBitmapContextCreate_FUNC, + CGBitmapContextCreateImage_FUNC, CGColorCreate_FUNC, CGColorRelease_FUNC, CGColorSpaceCreateDeviceRGB_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java index 4475faed9c..8ee11ce407 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java @@ -131,7 +131,12 @@ public class OS extends Platform { public static final int kCFStringEncodingUTF8 = 0x08000100; public static final int kCFStringEncodingUnicode = 0x0100; public static final int kCGEncodingMacRoman = 1; + public static final int kCGImageAlphaNone = 0; + public static final int kCGImageAlphaPremultipliedLast = 1; + public static final int kCGImageAlphaPremultipliedFirst = 2; + public static final int kCGImageAlphaLast = 3; public static final int kCGImageAlphaFirst = 4; + public static final int kCGImageAlphaNoneSkipLast = 5; public static final int kCGImageAlphaNoneSkipFirst = 6; public static final int kCGInterpolationDefault = 0; public static final int kCGInterpolationNone = 1; @@ -1009,6 +1014,7 @@ public static final native int CGColorCreate(int colorspace, float[] components) public static final native void CGColorRelease(int color); public static final native int CGColorSpaceCreatePattern(int baseSpace); public static final native int CGColorSpaceCreateDeviceRGB (); +public static final native int CGBitmapContextCreateImage(int context); public static final native void CGColorSpaceRelease (int cs); public static final native void CGContextAddArc (int ctx, float x, float y, float radius, float startAngle, float endAngle, boolean clockwise); public static final native void CGContextAddArcToPoint (int ctx, float x1, float y1, float x2, float y2, float radius); |