diff options
author | Steve Northover <steve> | 2006-09-26 20:23:36 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2006-09-26 20:23:36 +0000 |
commit | 84d9c8db308ce8b0152054b3c8d780091fba95be (patch) | |
tree | 4146ee0dd4b8e268b9583ea997595d19191405d5 | |
parent | 395873c8a964ae8da602edd5693a2de590372222 (diff) | |
download | eclipse.platform.swt-84d9c8db308ce8b0152054b3c8d780091fba95be.tar.gz eclipse.platform.swt-84d9c8db308ce8b0152054b3c8d780091fba95be.tar.xz eclipse.platform.swt-84d9c8db308ce8b0152054b3c8d780091fba95be.zip |
158797 - FileDialog limit on multi-select
8 files changed, 144 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties index b375ae7d73..6ced937e48 100644 --- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties +++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties @@ -648,6 +648,10 @@ NOTIFYICONDATAW_szTip=cast=(TCHAR) NOTIFYICONDATAW_szInfo=cast=(TCHAR),flags=no_wince NOTIFYICONDATAW_szInfoTitle=cast=(TCHAR),flags=no_wince +org_eclipse_swt_internal_win32_OFNOTIFY= +OFNOTIFY_lpOFN=cast=LPOPENFILENAME +OFNOTIFY_pszFile=cast=LPTSTR + org_eclipse_swt_internal_win32_OPENFILENAME= OPENFILENAME_lStructSize= OPENFILENAME_hwndOwner=cast=(HWND) @@ -2603,6 +2607,11 @@ OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I_0=cast=PVOID OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I_1=cast=(CONST VOID *,flags=no_out OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I_2= +OS_MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I= +OS_MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I_0=cast=PVOID +OS_MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I_1=cast=CONST VOID * +OS_MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I_2= + OS_MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I= OS_MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I_0=cast=(PVOID) OS_MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I_1=cast=(CONST VOID *),flags=no_out @@ -2803,6 +2812,16 @@ OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II_0=cast=(PVOID),flags OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II_1=cast=(CONST VOID *) OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II_2= +OS_MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II= +OS_MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II_0=cast=PVOID +OS_MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II_1=cast=CONST VOID * +OS_MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II_2= + +OS_MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II= +OS_MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II_0=cast=PVOID +OS_MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II_1=cast=CONST VOID * +OS_MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II_2= + OS_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II= OS_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II_0=cast=PVOID,flags=no_in OS_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II_1=cast=CONST VOID * diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c index 020de81313..0f5ad1fe1e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c @@ -6690,6 +6690,20 @@ fail: } #endif +#ifndef NO_MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I +JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I) + (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2) +{ + OPENFILENAME _arg1, *lparg1=NULL; + OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I_FUNC); + if (arg1) if ((lparg1 = getOPENFILENAMEFields(env, arg1, &_arg1)) == NULL) goto fail; + MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2); +fail: + if (arg1 && lparg1) setOPENFILENAMEFields(env, arg1, lparg1); + OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I_FUNC); +} +#endif + #ifndef NO_MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I) (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2) @@ -7361,6 +7375,34 @@ fail: } #endif +#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II +JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II) + (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2) +{ + OFNOTIFY _arg0, *lparg0=NULL; + OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II_FUNC); + if (arg0) if ((lparg0 = getOFNOTIFYFields(env, arg0, &_arg0)) == NULL) goto fail; + MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2); +fail: + if (arg0 && lparg0) setOFNOTIFYFields(env, arg0, lparg0); + OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II_FUNC); +} +#endif + +#ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II +JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II) + (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2) +{ + OPENFILENAME _arg0, *lparg0=NULL; + OS_NATIVE_ENTER(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II_FUNC); + if (arg0) if ((lparg0 = getOPENFILENAMEFields(env, arg0, &_arg0)) == NULL) goto fail; + MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2); +fail: + if (arg0 && lparg0) setOPENFILENAMEFields(env, arg0, lparg0); + OS_NATIVE_EXIT(env, that, MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II_FUNC); +} +#endif + #ifndef NO_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II) (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c index 5ed1653991..6b4cce6295 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c @@ -14,8 +14,8 @@ #ifdef NATIVE_STATS -int OS_nativeFunctionCount = 708; -int OS_nativeFunctionCallCount[708]; +int OS_nativeFunctionCount = 711; +int OS_nativeFunctionCallCount[711]; char * OS_nativeFunctionNames[] = { "AbortDoc", "ActivateActCtx", @@ -424,6 +424,7 @@ char * OS_nativeFunctionNames[] = { "MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFOW_2I", "MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I", "MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I", + "MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I", "MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I", "MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I", "MoveMemory__ILorg_eclipse_swt_internal_win32_UDACCEL_2I", @@ -464,6 +465,8 @@ char * OS_nativeFunctionNames[] = { "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2II", "MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2II", "MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II", + "MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II", + "MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II", "MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II", "MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II", "MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h index 0b105c9dff..55bd869513 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h @@ -428,6 +428,7 @@ typedef enum { MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFOW_2I_FUNC, MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I_FUNC, MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVDISPINFO_2I_FUNC, + MoveMemory__ILorg_eclipse_swt_internal_win32_OPENFILENAME_2I_FUNC, MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I_FUNC, MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I_FUNC, MoveMemory__ILorg_eclipse_swt_internal_win32_UDACCEL_2I_FUNC, @@ -468,6 +469,8 @@ typedef enum { MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVDISPINFO_2II_FUNC, MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVITEMCHANGE_2II_FUNC, MoveMemory__Lorg_eclipse_swt_internal_win32_NMUPDOWN_2II_FUNC, + MoveMemory__Lorg_eclipse_swt_internal_win32_OFNOTIFY_2II_FUNC, + MoveMemory__Lorg_eclipse_swt_internal_win32_OPENFILENAME_2II_FUNC, MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II_FUNC, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II_FUNC, MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c index f87d3ad2e6..5187c3ab1f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c @@ -4025,6 +4025,43 @@ void setNOTIFYICONDATAWFields(JNIEnv *env, jobject lpObject, NOTIFYICONDATAW *lp } #endif +#ifndef NO_OFNOTIFY +typedef struct OFNOTIFY_FID_CACHE { + int cached; + jclass clazz; + jfieldID lpOFN, pszFile; +} OFNOTIFY_FID_CACHE; + +OFNOTIFY_FID_CACHE OFNOTIFYFc; + +void cacheOFNOTIFYFields(JNIEnv *env, jobject lpObject) +{ + if (OFNOTIFYFc.cached) return; + cacheNMHDRFields(env, lpObject); + OFNOTIFYFc.clazz = (*env)->GetObjectClass(env, lpObject); + OFNOTIFYFc.lpOFN = (*env)->GetFieldID(env, OFNOTIFYFc.clazz, "lpOFN", "I"); + OFNOTIFYFc.pszFile = (*env)->GetFieldID(env, OFNOTIFYFc.clazz, "pszFile", "I"); + OFNOTIFYFc.cached = 1; +} + +OFNOTIFY *getOFNOTIFYFields(JNIEnv *env, jobject lpObject, OFNOTIFY *lpStruct) +{ + if (!OFNOTIFYFc.cached) cacheOFNOTIFYFields(env, lpObject); + getNMHDRFields(env, lpObject, (NMHDR *)lpStruct); + lpStruct->lpOFN = (LPOPENFILENAME)(*env)->GetIntField(env, lpObject, OFNOTIFYFc.lpOFN); + lpStruct->pszFile = (LPTSTR)(*env)->GetIntField(env, lpObject, OFNOTIFYFc.pszFile); + return lpStruct; +} + +void setOFNOTIFYFields(JNIEnv *env, jobject lpObject, OFNOTIFY *lpStruct) +{ + if (!OFNOTIFYFc.cached) cacheOFNOTIFYFields(env, lpObject); + setNMHDRFields(env, lpObject, (NMHDR *)lpStruct); + (*env)->SetIntField(env, lpObject, OFNOTIFYFc.lpOFN, (jint)lpStruct->lpOFN); + (*env)->SetIntField(env, lpObject, OFNOTIFYFc.pszFile, (jint)lpStruct->pszFile); +} +#endif + #ifndef NO_OPENFILENAME typedef struct OPENFILENAME_FID_CACHE { int cached; diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h index be02a51dc5..49b4d92d31 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h @@ -911,6 +911,18 @@ void setNOTIFYICONDATAWFields(JNIEnv *env, jobject lpObject, NOTIFYICONDATAW *lp #define NOTIFYICONDATAW_sizeof() 0 #endif +#ifndef NO_OFNOTIFY +void cacheOFNOTIFYFields(JNIEnv *env, jobject lpObject); +OFNOTIFY *getOFNOTIFYFields(JNIEnv *env, jobject lpObject, OFNOTIFY *lpStruct); +void setOFNOTIFYFields(JNIEnv *env, jobject lpObject, OFNOTIFY *lpStruct); +#define OFNOTIFY_sizeof() sizeof(OFNOTIFY) +#else +#define cacheOFNOTIFYFields(a,b) +#define getOFNOTIFYFields(a,b,c) NULL +#define setOFNOTIFYFields(a,b,c) +#define OFNOTIFY_sizeof() 0 +#endif + #ifndef NO_OPENFILENAME void cacheOPENFILENAMEFields(JNIEnv *env, jobject lpObject); OPENFILENAME *getOPENFILENAMEFields(JNIEnv *env, jobject lpObject, OPENFILENAME *lpStruct); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OFNOTIFY.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OFNOTIFY.java new file mode 100644 index 0000000000..ac210ce9b1 --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OFNOTIFY.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright (c) 2000, 2006 IBM Corporation and others. + * 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.win32; + +public class OFNOTIFY extends NMHDR { + public int lpOFN; + public int pszFile; + public static int sizeof = 20; +} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java index 424f7c3e89..12f2da7086 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java @@ -373,6 +373,10 @@ public class OS extends Platform { public static final int CDIS_HOT = 0x0040; public static final int CDIS_MARKED = 0x0080; public static final int CDIS_INDETERMINATE = 0x0100; + public static final int CDM_FIRST = 0x0400 + 100; + public static final int CDM_GETSPEC = CDM_FIRST; + public static final int CDN_FIRST = -601; + public static final int CDN_SELCHANGE = CDN_FIRST - 1; public static final int CDRF_DODEFAULT = 0x00000000; public static final int CDRF_NEWFONT = 0x00000002; public static final int CDRF_NOTIFYITEMDRAW = 0x00000020; @@ -1064,6 +1068,7 @@ public class OS extends Platform { public static final int ODT_MENU = 0x1; public static final int OFN_ALLOWMULTISELECT = 0x200; public static final int OFN_EXPLORER = 0x80000; + public static final int OFN_ENABLEHOOK = 0x20; public static final int OFN_HIDEREADONLY = 0x4; public static final int OFN_NOCHANGEDIR = 0x8; public static final int OIC_BANG = 0x7F03; @@ -1078,7 +1083,7 @@ public class OS extends Platform { public static final int PBM_GETRANGE = 0x407; public static final int PBM_SETBARCOLOR = 0x409; public static final int PBM_SETBKCOLOR = 0x2001; - public static final int PBM_SETMARQUEE = OS.WM_USER + 10; + public static final int PBM_SETMARQUEE = 0x400 + 10; public static final int PBM_SETPOS = 0x402; public static final int PBM_SETRANGE32 = 0x406; public static final int PBM_STEPIT = 0x405; @@ -3199,6 +3204,7 @@ public static final native void MoveMemory (int Destination, MSG Source, int Len public static final native void MoveMemory (int Destination, UDACCEL Source, int Length); public static final native void MoveMemory (int Destination, NMTTDISPINFOW Source, int Length); public static final native void MoveMemory (int Destination, NMTTDISPINFOA Source, int Length); +public static final native void MoveMemory (int Destination, OPENFILENAME Source, int Length); public static final native void MoveMemory (int Destination, RECT Source, int Length); public static final native void MoveMemory (int Destination, TRIVERTEX Source, int Length); public static final native void MoveMemory (int Destination, WINDOWPOS Source, int Length); @@ -3211,6 +3217,8 @@ public static final native void MoveMemory (LOGFONTW Destination, int Source, in public static final native void MoveMemory (LOGFONTA Destination, int Source, int Length); public static final native void MoveMemory (MEASUREITEMSTRUCT Destination, int Source, int Length); public static final native void MoveMemory (MINMAXINFO Destination, int Source, int Length); +public static final native void MoveMemory (OFNOTIFY Destination, int Source, int Length); +public static final native void MoveMemory (OPENFILENAME Destination, int Source, int Length); public static final native void MoveMemory (POINT Destination, int Source, int Length); public static final native void MoveMemory (NMHDR Destination, int Source, int Length); public static final native void MoveMemory (NMRGINFO Destination, int Source, int Length); |