summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/carbon
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2007-01-29 20:05:53 +0000
committerSilenio Quarti <silenio>2007-01-29 20:05:53 +0000
commitd77fd0933ebe489c9b42022eb9c894092dd1d274 (patch)
treec28e3eb10396c8977da7715ae21b72fafa3c0fcb /bundles/org.eclipse.swt/Eclipse SWT PI/carbon
parentf6e875ed31f2c4aed555fb5710379995dc8e6529 (diff)
downloadeclipse.platform.swt-d77fd0933ebe489c9b42022eb9c894092dd1d274.tar.gz
eclipse.platform.swt-d77fd0933ebe489c9b42022eb9c894092dd1d274.tar.xz
eclipse.platform.swt-d77fd0933ebe489c9b42022eb9c894092dd1d274.zip
making MacOS X 10.3 the target platform
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/carbon')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/build.sh2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c98
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_structs.c40
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_structs.h12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/TXNLongRect.java22
8 files changed, 37 insertions, 161 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/build.sh b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/build.sh
index e9547c39c5..4c22a22e8d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/build.sh
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/build.sh
@@ -16,6 +16,6 @@ OUTPUT_DIR=../../../org.eclipse.swt.carbon.macosx
export OUTPUT_DIR
-export MACOSX_DEPLOYMENT_TARGET=10.2
+export MACOSX_DEPLOYMENT_TARGET=10.3
make -f make_macosx.mak $1 $2 $3 $4 $5 $6 $7 $8 $9
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 ddf6459c1f..e47cd30d7d 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
@@ -12003,28 +12003,6 @@ fail:
}
#endif
-#ifndef NO_TXNGetRectBounds
-JNIEXPORT jint JNICALL OS_NATIVE(TXNGetRectBounds)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1, jobject arg2, jobject arg3)
-{
- Rect _arg1, *lparg1=NULL;
- TXNLongRect _arg2, *lparg2=NULL;
- TXNLongRect _arg3, *lparg3=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, TXNGetRectBounds_FUNC);
- if (arg1) if ((lparg1 = getRectFields(env, arg1, &_arg1)) == NULL) goto fail;
- if (arg2) if ((lparg2 = getTXNLongRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg3) if ((lparg3 = getTXNLongRectFields(env, arg3, &_arg3)) == NULL) goto fail;
- rc = (jint)TXNGetRectBounds((TXNObject)arg0, (Rect *)lparg1, (TXNLongRect *)lparg2, (TXNLongRect *)lparg3);
-fail:
- if (arg3 && lparg3) setTXNLongRectFields(env, arg3, lparg3);
- if (arg2 && lparg2) setTXNLongRectFields(env, arg2, lparg2);
- if (arg1 && lparg1) setRectFields(env, arg1, lparg1);
- OS_NATIVE_EXIT(env, that, TXNGetRectBounds_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_TXNGetSelection
JNIEXPORT void JNICALL OS_NATIVE(TXNGetSelection)
(JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
@@ -12075,52 +12053,49 @@ fail:
}
#endif
-#ifndef NO_TXNInitTextension
-JNIEXPORT jint JNICALL OS_NATIVE(TXNInitTextension)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
+#ifndef NO_TXNHIPointToOffset
+JNIEXPORT jint JNICALL OS_NATIVE(TXNHIPointToOffset)
+ (JNIEnv *env, jclass that, jint arg0, jobject arg1, jintArray arg2)
{
+ CGPoint _arg1, *lparg1=NULL;
+ jint *lparg2=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, TXNInitTextension_FUNC);
- rc = (jint)TXNInitTextension((const TXNMacOSPreferredFontDescription *)arg0, (ItemCount)arg1, (TXNInitOptions)arg2);
- OS_NATIVE_EXIT(env, that, TXNInitTextension_FUNC);
+ OS_NATIVE_ENTER(env, that, TXNHIPointToOffset_FUNC);
+ if (arg1) if ((lparg1 = getCGPointFields(env, arg1, &_arg1)) == NULL) goto fail;
+ if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+ rc = (jint)TXNHIPointToOffset((TXNObject)arg0, (HIPoint *)lparg1, (TXNOffset *)lparg2);
+fail:
+ if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+ if (arg1 && lparg1) setCGPointFields(env, arg1, lparg1);
+ OS_NATIVE_EXIT(env, that, TXNHIPointToOffset_FUNC);
return rc;
}
#endif
-#ifndef NO_TXNNewObject
-JNIEXPORT jint JNICALL OS_NATIVE(TXNNewObject)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2, jint arg3, jint arg4, jint arg5, jint arg6, jintArray arg7, jintArray arg8, jint arg9)
+#ifndef NO_TXNInitTextension
+JNIEXPORT jint JNICALL OS_NATIVE(TXNInitTextension)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
- Rect _arg2, *lparg2=NULL;
- jint *lparg7=NULL;
- jint *lparg8=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, TXNNewObject_FUNC);
- if (arg2) if ((lparg2 = getRectFields(env, arg2, &_arg2)) == NULL) goto fail;
- if (arg7) if ((lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL)) == NULL) goto fail;
- if (arg8) if ((lparg8 = (*env)->GetIntArrayElements(env, arg8, NULL)) == NULL) goto fail;
- rc = (jint)TXNNewObject((const FSSpec *)arg0, (WindowRef)arg1, (const Rect *)lparg2, (TXNFrameOptions)arg3, (TXNFrameType)arg4, (TXNFileType)arg5, (TXNPermanentTextEncodingType)arg6, (TXNObject *)lparg7, (TXNFrameID *)lparg8, (TXNObjectRefcon)arg9);
-fail:
- if (arg8 && lparg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0);
- if (arg7 && lparg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0);
- if (arg2 && lparg2) setRectFields(env, arg2, lparg2);
- OS_NATIVE_EXIT(env, that, TXNNewObject_FUNC);
+ OS_NATIVE_ENTER(env, that, TXNInitTextension_FUNC);
+ rc = (jint)TXNInitTextension((const TXNMacOSPreferredFontDescription *)arg0, (ItemCount)arg1, (TXNInitOptions)arg2);
+ OS_NATIVE_EXIT(env, that, TXNInitTextension_FUNC);
return rc;
}
#endif
-#ifndef NO_TXNOffsetToPoint
-JNIEXPORT jint JNICALL OS_NATIVE(TXNOffsetToPoint)
+#ifndef NO_TXNOffsetToHIPoint
+JNIEXPORT jint JNICALL OS_NATIVE(TXNOffsetToHIPoint)
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
- Point _arg2, *lparg2=NULL;
+ CGPoint _arg2, *lparg2=NULL;
jint rc = 0;
- OS_NATIVE_ENTER(env, that, TXNOffsetToPoint_FUNC);
- if (arg2) if ((lparg2 = getPointFields(env, arg2, &_arg2)) == NULL) goto fail;
- rc = (jint)TXNOffsetToPoint((TXNObject)arg0, (TXNOffset)arg1, (Point *)lparg2);
+ OS_NATIVE_ENTER(env, that, TXNOffsetToHIPoint_FUNC);
+ if (arg2) if ((lparg2 = getCGPointFields(env, arg2, &_arg2)) == NULL) goto fail;
+ rc = (jint)TXNOffsetToHIPoint((TXNObject)arg0, (TXNOffset)arg1, (HIPoint *)lparg2);
fail:
- if (arg2 && lparg2) setPointFields(env, arg2, lparg2);
- OS_NATIVE_EXIT(env, that, TXNOffsetToPoint_FUNC);
+ if (arg2 && lparg2) setCGPointFields(env, arg2, lparg2);
+ OS_NATIVE_EXIT(env, that, TXNOffsetToHIPoint_FUNC);
return rc;
}
#endif
@@ -12137,25 +12112,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(TXNPaste)
}
#endif
-#ifndef NO_TXNPointToOffset
-JNIEXPORT jint JNICALL OS_NATIVE(TXNPointToOffset)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1, jintArray arg2)
-{
- Point _arg1, *lparg1=NULL;
- jint *lparg2=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, TXNPointToOffset_FUNC);
- if (arg1) if ((lparg1 = getPointFields(env, arg1, &_arg1)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jint)TXNPointToOffset((TXNObject)arg0, *lparg1, (TXNOffset *)lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) setPointFields(env, arg1, lparg1);
- OS_NATIVE_EXIT(env, that, TXNPointToOffset_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_TXNSelectAll
JNIEXPORT void JNICALL OS_NATIVE(TXNSelectAll)
(JNIEnv *env, jclass that, jint arg0)
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 e4f0dcb9aa..3e95c4ee02 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 = 912;
-int OS_nativeFunctionCallCount[912];
+int OS_nativeFunctionCount = 910;
+int OS_nativeFunctionCallCount[910];
char * OS_nativeFunctionNames[] = {
"AECountItems",
"AEGetNthPtr",
@@ -856,15 +856,13 @@ char * OS_nativeFunctionNames[] = {
"TXNGetHIRect",
"TXNGetLineCount",
"TXNGetLineMetrics",
- "TXNGetRectBounds",
"TXNGetSelection",
"TXNGetTXNObjectControls",
"TXNGetViewRect",
+ "TXNHIPointToOffset",
"TXNInitTextension",
- "TXNNewObject",
- "TXNOffsetToPoint",
+ "TXNOffsetToHIPoint",
"TXNPaste",
- "TXNPointToOffset",
"TXNSelectAll",
"TXNSetBackground",
"TXNSetData",
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 74fb2d4d6a..2c2a185938 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
@@ -864,15 +864,13 @@ typedef enum {
TXNGetHIRect_FUNC,
TXNGetLineCount_FUNC,
TXNGetLineMetrics_FUNC,
- TXNGetRectBounds_FUNC,
TXNGetSelection_FUNC,
TXNGetTXNObjectControls_FUNC,
TXNGetViewRect_FUNC,
+ TXNHIPointToOffset_FUNC,
TXNInitTextension_FUNC,
- TXNNewObject_FUNC,
- TXNOffsetToPoint_FUNC,
+ TXNOffsetToHIPoint_FUNC,
TXNPaste_FUNC,
- TXNPointToOffset_FUNC,
TXNSelectAll_FUNC,
TXNSetBackground_FUNC,
TXNSetData_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_structs.c
index 59c9802fec..cbf4f6e491 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_structs.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_structs.c
@@ -3263,46 +3263,6 @@ void setTXNBackgroundFields(JNIEnv *env, jobject lpObject, TXNBackground *lpStru
}
#endif
-#ifndef NO_TXNLongRect
-typedef struct TXNLongRect_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID top, left, bottom, right;
-} TXNLongRect_FID_CACHE;
-
-TXNLongRect_FID_CACHE TXNLongRectFc;
-
-void cacheTXNLongRectFields(JNIEnv *env, jobject lpObject)
-{
- if (TXNLongRectFc.cached) return;
- TXNLongRectFc.clazz = (*env)->GetObjectClass(env, lpObject);
- TXNLongRectFc.top = (*env)->GetFieldID(env, TXNLongRectFc.clazz, "top", "I");
- TXNLongRectFc.left = (*env)->GetFieldID(env, TXNLongRectFc.clazz, "left", "I");
- TXNLongRectFc.bottom = (*env)->GetFieldID(env, TXNLongRectFc.clazz, "bottom", "I");
- TXNLongRectFc.right = (*env)->GetFieldID(env, TXNLongRectFc.clazz, "right", "I");
- TXNLongRectFc.cached = 1;
-}
-
-TXNLongRect *getTXNLongRectFields(JNIEnv *env, jobject lpObject, TXNLongRect *lpStruct)
-{
- if (!TXNLongRectFc.cached) cacheTXNLongRectFields(env, lpObject);
- lpStruct->top = (*env)->GetIntField(env, lpObject, TXNLongRectFc.top);
- lpStruct->left = (*env)->GetIntField(env, lpObject, TXNLongRectFc.left);
- lpStruct->bottom = (*env)->GetIntField(env, lpObject, TXNLongRectFc.bottom);
- lpStruct->right = (*env)->GetIntField(env, lpObject, TXNLongRectFc.right);
- return lpStruct;
-}
-
-void setTXNLongRectFields(JNIEnv *env, jobject lpObject, TXNLongRect *lpStruct)
-{
- if (!TXNLongRectFc.cached) cacheTXNLongRectFields(env, lpObject);
- (*env)->SetIntField(env, lpObject, TXNLongRectFc.top, (jint)lpStruct->top);
- (*env)->SetIntField(env, lpObject, TXNLongRectFc.left, (jint)lpStruct->left);
- (*env)->SetIntField(env, lpObject, TXNLongRectFc.bottom, (jint)lpStruct->bottom);
- (*env)->SetIntField(env, lpObject, TXNLongRectFc.right, (jint)lpStruct->right);
-}
-#endif
-
#ifndef NO_TXNTab
typedef struct TXNTab_FID_CACHE {
int cached;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_structs.h
index 90165219e7..401660a607 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_structs.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_structs.h
@@ -815,18 +815,6 @@ void setTXNBackgroundFields(JNIEnv *env, jobject lpObject, TXNBackground *lpStru
#define TXNBackground_sizeof() 0
#endif
-#ifndef NO_TXNLongRect
-void cacheTXNLongRectFields(JNIEnv *env, jobject lpObject);
-TXNLongRect *getTXNLongRectFields(JNIEnv *env, jobject lpObject, TXNLongRect *lpStruct);
-void setTXNLongRectFields(JNIEnv *env, jobject lpObject, TXNLongRect *lpStruct);
-#define TXNLongRect_sizeof() sizeof(TXNLongRect)
-#else
-#define cacheTXNLongRectFields(a,b)
-#define getTXNLongRectFields(a,b,c) NULL
-#define setTXNLongRectFields(a,b,c)
-#define TXNLongRect_sizeof() 0
-#endif
-
#ifndef NO_TXNTab
void cacheTXNTabFields(JNIEnv *env, jobject lpObject);
TXNTab *getTXNTabFields(JNIEnv *env, jobject lpObject, TXNTab *lpStruct);
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 ac1ee739e3..5294abec04 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
@@ -24,7 +24,7 @@ public class OS extends C {
static {
int [] response = new int [1];
OS.Gestalt (OS.gestaltSystemVersion, response);
- VERSION = response [0] & 0xffff;
+ VERSION = response [0] & 0xffff;
}
/** Constants */
@@ -1790,14 +1790,12 @@ public static final native int TXNGetLineCount(int txHandle, int[] lineTotal);
public static final native int TXNGetLineMetrics(int iTXNObject, int iLineNumber, int [] oLineWidth, int [] oLineHeight);
public static final native int TXNGetTXNObjectControls(int iTXNObject, int iControlCount, int [] iControlTags, int [] oControlData);
public static final native int TXNGetHIRect(int iTXNObject, int iTXNRectKey, CGRect oRectangle);
-public static final native int TXNGetRectBounds(int iTXNObject, Rect oViewRect, TXNLongRect oDestinationRect, TXNLongRect oTextRect);
public static final native void TXNGetSelection(int txHandle, int[] startOffset, int[] endOffset);
public static final native void TXNGetViewRect (int iTXNObject, Rect oViewRect);
public static final native int TXNInitTextension(int iDefaultFonts, int iCountDefaultFonts, int iUsageFlags);
-public static final native int TXNNewObject(int iFileSpec, int iWindw, Rect iFrame, int iFrameOptions, int iFrameType, int iFileType, int iPermanentEncoding, int [] oTXNObject, int[] oTXNFrameID, int iRefCpm);
-public static final native int TXNOffsetToPoint(int txHandle, int offset, Point point);
+public static final native int TXNOffsetToHIPoint(int txHandle, int offset, CGPoint point);
public static final native int TXNPaste(int txHandle);
-public static final native int TXNPointToOffset (int iTXNObject, Point iPoint, int [] oOffset);
+public static final native int TXNHIPointToOffset (int iTXNObject, CGPoint iPoint, int [] oOffset);
public static final native void TXNSelectAll(int txHandle);
public static final native int TXNSetBackground(int iTXNObject, TXNBackground iBackgroundInfo);
public static final native int TXNSetData(int iTXNObject, int iDataType, char[] iDataPtr, int iDataSize, int iStartOffset, int iEndOffset);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/TXNLongRect.java b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/TXNLongRect.java
deleted file mode 100644
index ed9f164d66..0000000000
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/TXNLongRect.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2003-2004 IBM Corp.
- * Portions Copyright (c) 1983-2002, Apple Computer, Inc.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- **********************************************************************/
-package org.eclipse.swt.internal.carbon;
-
-
-public class TXNLongRect {
- public int top;
- public int left;
- public int bottom;
- public int right;
- public static final int sizeof = 16;
-}