summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/carbon
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2009-10-01 21:46:24 +0000
committerSilenio Quarti <silenio>2009-10-01 21:46:24 +0000
commit7796d3ee90efb3692b32bd7c53083adde87b6e72 (patch)
treed423326b16147824cf498a3e64540a8bb316fb9c /bundles/org.eclipse.swt/Eclipse SWT PI/carbon
parente69ccdf91eaf47c7d23ca34831636ebd90362b25 (diff)
downloadeclipse.platform.swt-7796d3ee90efb3692b32bd7c53083adde87b6e72.tar.gz
eclipse.platform.swt-7796d3ee90efb3692b32bd7c53083adde87b6e72.tar.xz
eclipse.platform.swt-7796d3ee90efb3692b32bd7c53083adde87b6e72.zip
204582 - Mac - manually added external editors fail to launch
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/carbon')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c94
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java38
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java1
5 files changed, 150 insertions, 3 deletions
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 1027b1524f..dc4f54078a 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
@@ -1243,6 +1243,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(CFArrayGetValueAtIndex)
}
#endif
+#ifndef NO_CFBundleCreateBundlesFromDirectory
+JNIEXPORT jint JNICALL OS_NATIVE(CFBundleCreateBundlesFromDirectory)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, CFBundleCreateBundlesFromDirectory_FUNC);
+ rc = (jint)CFBundleCreateBundlesFromDirectory((CFAllocatorRef)arg0, (CFURLRef)arg1, (CFStringRef)arg2);
+ OS_NATIVE_EXIT(env, that, CFBundleCreateBundlesFromDirectory_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_CFBundleGetIdentifier
JNIEXPORT jint JNICALL OS_NATIVE(CFBundleGetIdentifier)
(JNIEnv *env, jclass that, jint arg0)
@@ -1284,6 +1296,18 @@ fail:
}
#endif
+#ifndef NO_CFBundleGetValueForInfoDictionaryKey
+JNIEXPORT jint JNICALL OS_NATIVE(CFBundleGetValueForInfoDictionaryKey)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, CFBundleGetValueForInfoDictionaryKey_FUNC);
+ rc = (jint)CFBundleGetValueForInfoDictionaryKey((CFBundleRef)arg0, (CFStringRef)arg1);
+ OS_NATIVE_EXIT(env, that, CFBundleGetValueForInfoDictionaryKey_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_CFDataGetBytePtr
JNIEXPORT jint JNICALL OS_NATIVE(CFDataGetBytePtr)
(JNIEnv *env, jclass that, jint arg0)
@@ -1519,6 +1543,64 @@ JNIEXPORT void JNICALL OS_NATIVE(CFRunLoopWakeUp)
}
#endif
+#ifndef NO_CFSetAddValue
+JNIEXPORT void JNICALL OS_NATIVE(CFSetAddValue)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+ OS_NATIVE_ENTER(env, that, CFSetAddValue_FUNC);
+ CFSetAddValue((CFMutableSetRef)arg0, (const void *)arg1);
+ OS_NATIVE_EXIT(env, that, CFSetAddValue_FUNC);
+}
+#endif
+
+#ifndef NO_CFSetCreateMutable
+JNIEXPORT jint JNICALL OS_NATIVE(CFSetCreateMutable)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, CFSetCreateMutable_FUNC);
+ rc = (jint)CFSetCreateMutable((CFAllocatorRef)arg0, (CFIndex)arg1, (const CFSetCallBacks *)arg2);
+ OS_NATIVE_EXIT(env, that, CFSetCreateMutable_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CFSetGetCount
+JNIEXPORT jint JNICALL OS_NATIVE(CFSetGetCount)
+ (JNIEnv *env, jclass that, jint arg0)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, CFSetGetCount_FUNC);
+ rc = (jint)CFSetGetCount((CFMutableSetRef)arg0);
+ OS_NATIVE_EXIT(env, that, CFSetGetCount_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CFSetGetValues
+JNIEXPORT void JNICALL OS_NATIVE(CFSetGetValues)
+ (JNIEnv *env, jclass that, jint arg0, jintArray arg1)
+{
+ jint *lparg1=NULL;
+ OS_NATIVE_ENTER(env, that, CFSetGetValues_FUNC);
+ if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ CFSetGetValues((CFMutableSetRef)arg0, (const void **)lparg1);
+fail:
+ if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+ OS_NATIVE_EXIT(env, that, CFSetGetValues_FUNC);
+}
+#endif
+
+#ifndef NO_CFSetRemoveValue
+JNIEXPORT void JNICALL OS_NATIVE(CFSetRemoveValue)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+ OS_NATIVE_ENTER(env, that, CFSetRemoveValue_FUNC);
+ CFSetRemoveValue((CFMutableSetRef)arg0, (const void *)arg1);
+ OS_NATIVE_EXIT(env, that, CFSetRemoveValue_FUNC);
+}
+#endif
+
#ifndef NO_CFStringCreateWithBytes
JNIEXPORT jint JNICALL OS_NATIVE(CFStringCreateWithBytes)
(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jint arg2, jint arg3, jboolean arg4)
@@ -13600,6 +13682,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(kCFTypeArrayCallBacks)
}
#endif
+#ifndef NO_kCFTypeSetCallBacks
+JNIEXPORT jint JNICALL OS_NATIVE(kCFTypeSetCallBacks)
+ (JNIEnv *env, jclass that)
+{
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, kCFTypeSetCallBacks_FUNC);
+ rc = (jint)&kCFTypeSetCallBacks;
+ OS_NATIVE_EXIT(env, that, kCFTypeSetCallBacks_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_kFontPanelAttributeSizesKey
JNIEXPORT jint JNICALL OS_NATIVE(kFontPanelAttributeSizesKey)
(JNIEnv *env, jclass that)
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 0b9cd7fea3..7770573e55 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 = 990;
-int OS_nativeFunctionCallCount[990];
+int OS_nativeFunctionCount = 998;
+int OS_nativeFunctionCallCount[998];
char * OS_nativeFunctionNames[] = {
"AECoerceDesc",
"AECountItems",
@@ -94,9 +94,11 @@ char * OS_nativeFunctionNames[] = {
"CFArrayCreateMutable",
"CFArrayGetCount",
"CFArrayGetValueAtIndex",
+ "CFBundleCreateBundlesFromDirectory",
"CFBundleGetIdentifier",
"CFBundleGetMainBundle",
"CFBundleGetPackageInfo",
+ "CFBundleGetValueForInfoDictionaryKey",
"CFDataGetBytePtr",
"CFDataGetBytes",
"CFDataGetLength",
@@ -117,6 +119,11 @@ char * OS_nativeFunctionNames[] = {
"CFRunLoopSourceSignal",
"CFRunLoopStop",
"CFRunLoopWakeUp",
+ "CFSetAddValue",
+ "CFSetCreateMutable",
+ "CFSetGetCount",
+ "CFSetGetValues",
+ "CFSetRemoveValue",
"CFStringCreateWithBytes",
"CFStringCreateWithCharacters__III",
"CFStringCreateWithCharacters__I_3CI",
@@ -977,6 +984,7 @@ char * OS_nativeFunctionNames[] = {
"kCFRunLoopCommonModes",
"kCFRunLoopDefaultMode",
"kCFTypeArrayCallBacks",
+ "kCFTypeSetCallBacks",
"kFontPanelAttributeSizesKey",
"kFontPanelAttributeTagsKey",
"kFontPanelAttributeValuesKey",
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 a9301ce99c..73e4604163 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
@@ -102,9 +102,11 @@ typedef enum {
CFArrayCreateMutable_FUNC,
CFArrayGetCount_FUNC,
CFArrayGetValueAtIndex_FUNC,
+ CFBundleCreateBundlesFromDirectory_FUNC,
CFBundleGetIdentifier_FUNC,
CFBundleGetMainBundle_FUNC,
CFBundleGetPackageInfo_FUNC,
+ CFBundleGetValueForInfoDictionaryKey_FUNC,
CFDataGetBytePtr_FUNC,
CFDataGetBytes_FUNC,
CFDataGetLength_FUNC,
@@ -125,6 +127,11 @@ typedef enum {
CFRunLoopSourceSignal_FUNC,
CFRunLoopStop_FUNC,
CFRunLoopWakeUp_FUNC,
+ CFSetAddValue_FUNC,
+ CFSetCreateMutable_FUNC,
+ CFSetGetCount_FUNC,
+ CFSetGetValues_FUNC,
+ CFSetRemoveValue_FUNC,
CFStringCreateWithBytes_FUNC,
CFStringCreateWithCharacters__III_FUNC,
CFStringCreateWithCharacters__I_3CI_FUNC,
@@ -985,6 +992,7 @@ typedef enum {
kCFRunLoopCommonModes_FUNC,
kCFRunLoopDefaultMode_FUNC,
kCFTypeArrayCallBacks_FUNC,
+ kCFTypeSetCallBacks_FUNC,
kFontPanelAttributeSizesKey_FUNC,
kFontPanelAttributeTagsKey_FUNC,
kFontPanelAttributeValuesKey_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 74a58bbc17..5c31ba14de 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
@@ -1072,6 +1072,8 @@ public static final native int kCFRunLoopCommonModes();
public static final native int kCFRunLoopDefaultMode();
/** @method flags=const address */
public static final native int kCFTypeArrayCallBacks();
+/** @method flags=const address */
+public static final native int kCFTypeSetCallBacks();
/** @method flags=const */
public static final native int kFontPanelAttributesKey();
/** @method flags=const */
@@ -1506,7 +1508,41 @@ public static final native int CFArrayCreateMutable(int allocator, int capacity,
/** @param theArray cast=(CFArrayRef) */
public static final native int CFArrayGetCount(int theArray);
/** @param theArray cast=(CFArrayRef) */
-public static final native int CFArrayGetValueAtIndex(int theArray, int idx);
+public static final native int CFArrayGetValueAtIndex(int theArray, int idx);
+/**
+ * @param theSet cast=(CFMutableSetRef)
+ * @param value cast=(const void *)
+ */
+public static final native void CFSetAddValue(int theSet, int value);
+/**
+ * @param allocator cast=(CFAllocatorRef)
+ * @param capacity cast=(CFIndex)
+ * @param callBacks cast=(const CFSetCallBacks *)
+ */
+public static final native int CFSetCreateMutable(int allocator, int capacity, int callBacks);
+/** @param theSet cast=(CFMutableSetRef) */
+public static final native int CFSetGetCount(int theSet);
+/**
+ * @param theSet cast=(CFMutableSetRef)
+ * @param values cast=(const void **)
+ */
+public static final native void CFSetGetValues(int theSet, int[] values);
+/**
+ * @param theSet cast=(CFMutableSetRef)
+ * @param value cast=(const void *)
+ */
+public static final native void CFSetRemoveValue(int theSet, int value);
+/**
+ * @param allocater cast=(CFAllocatorRef)
+ * @param directoryURL cast=(CFURLRef)
+ * @param bundleType cast=(CFStringRef)
+ */
+public static final native int CFBundleCreateBundlesFromDirectory(int allocater, int directoryURL, int bundleType);
+/**
+ * @param bundle cast=(CFBundleRef)
+ * @param cFBundleDocumentTypes cast=(CFStringRef)
+ */
+public static final native int CFBundleGetValueForInfoDictionaryKey(int bundle, int cFBundleDocumentTypes);
public static final native int CFBundleGetMainBundle();
/** @param bundle cast=(CFBundleRef) */
public static final native int CFBundleGetIdentifier(int bundle);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java
index 78c3d07117..6db28d1634 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java
@@ -234,6 +234,7 @@ public static final int NSURLCredentialPersistenceForSession = 1;
public static final int NSURLRequestReloadIgnoringLocalCacheData = 1;
public static final int NSAllDomainsMask = 0xffff;
+public static final int NSAllApplicationsDirectory = 100;
public static final int NSDesktopDirectory = 12;
public static final int NSDocumentDirectory = 9;
public static final int NSDownloadsDirectory = 15;