diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32')
12 files changed, 0 insertions, 1187 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32.c b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32.c deleted file mode 100644 index 54cfe03c00..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32.c +++ /dev/null @@ -1,413 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 - *******************************************************************************/ - -#include "swt.h" -#include "win32_structs.h" -#include "win32_stats.h" - -#define Win32_NATIVE(func) Java_org_eclipse_swt_internal_win32_Win32_##func - -#ifndef NO_CloseHandle -JNIEXPORT jboolean JNICALL Win32_NATIVE(CloseHandle) - (JNIEnv *env, jclass that, jint arg0) -{ - jboolean rc = 0; - Win32_NATIVE_ENTER(env, that, CloseHandle_FUNC); - rc = (jboolean)CloseHandle((HANDLE)arg0); - Win32_NATIVE_EXIT(env, that, CloseHandle_FUNC); - return rc; -} -#endif - -#ifndef NO_CreateCursor -JNIEXPORT jint JNICALL Win32_NATIVE(CreateCursor) - (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jbyteArray arg5, jbyteArray arg6) -{ - jbyte *lparg5=NULL; - jbyte *lparg6=NULL; - jint rc = 0; - Win32_NATIVE_ENTER(env, that, CreateCursor_FUNC); -#ifdef JNI_VERSION_1_2 - if (IS_JNI_1_2) { - if (arg5) if ((lparg5 = (*env)->GetPrimitiveArrayCritical(env, arg5, NULL)) == NULL) goto fail; - if (arg6) if ((lparg6 = (*env)->GetPrimitiveArrayCritical(env, arg6, NULL)) == NULL) goto fail; - } else -#endif - { - if (arg5) if ((lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL)) == NULL) goto fail; - if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail; - } - rc = (jint)CreateCursor((HINSTANCE)arg0, arg1, arg2, arg3, arg4, (CONST VOID *)lparg5, (CONST VOID *)lparg6); -fail: -#ifdef JNI_VERSION_1_2 - if (IS_JNI_1_2) { - if (arg6 && lparg6) (*env)->ReleasePrimitiveArrayCritical(env, arg6, lparg6, JNI_ABORT); - if (arg5 && lparg5) (*env)->ReleasePrimitiveArrayCritical(env, arg5, lparg5, JNI_ABORT); - } else -#endif - { - if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, JNI_ABORT); - if (arg5 && lparg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, JNI_ABORT); - } - Win32_NATIVE_EXIT(env, that, CreateCursor_FUNC); - return rc; -} -#endif - -#ifndef NO_CreateIconIndirect -JNIEXPORT jint JNICALL Win32_NATIVE(CreateIconIndirect) - (JNIEnv *env, jclass that, jobject arg0) -{ - ICONINFO _arg0, *lparg0=NULL; - jint rc = 0; - Win32_NATIVE_ENTER(env, that, CreateIconIndirect_FUNC); - if (arg0) if ((lparg0 = getICONINFOFields(env, arg0, &_arg0)) == NULL) goto fail; - rc = (jint)CreateIconIndirect(lparg0); -fail: - if (arg0 && lparg0) setICONINFOFields(env, arg0, lparg0); - Win32_NATIVE_EXIT(env, that, CreateIconIndirect_FUNC); - return rc; -} -#endif - -#ifndef NO_CreateProcessW -JNIEXPORT jboolean JNICALL Win32_NATIVE(CreateProcessW) - (JNIEnv *env, jclass that, jint arg0, jcharArray arg1, jint arg2, jint arg3, jboolean arg4, jint arg5, jint arg6, jint arg7, jobject arg8, jobject arg9) -{ - jchar *lparg1=NULL; - STARTUPINFOW _arg8, *lparg8=NULL; - PROCESS_INFORMATION _arg9, *lparg9=NULL; - jboolean rc = 0; - Win32_NATIVE_ENTER(env, that, CreateProcessW_FUNC); - if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg8) if ((lparg8 = getSTARTUPINFOWFields(env, arg8, &_arg8)) == NULL) goto fail; - if (arg9) if ((lparg9 = getPROCESS_INFORMATIONFields(env, arg9, &_arg9)) == NULL) goto fail; - rc = (jboolean)CreateProcessW((LPCWSTR)arg0, (LPWSTR)lparg1, (LPSECURITY_ATTRIBUTES)arg2, (LPSECURITY_ATTRIBUTES)arg3, arg4, (DWORD)arg5, (LPVOID)arg6, (LPCWSTR)arg7, (LPSTARTUPINFOW)lparg8, (LPPROCESS_INFORMATION)lparg9); -fail: - if (arg9 && lparg9) setPROCESS_INFORMATIONFields(env, arg9, lparg9); - if (arg8 && lparg8) setSTARTUPINFOWFields(env, arg8, lparg8); - if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0); - Win32_NATIVE_EXIT(env, that, CreateProcessW_FUNC); - return rc; -} -#endif - -#ifndef NO_DeleteObject -JNIEXPORT jboolean JNICALL Win32_NATIVE(DeleteObject) - (JNIEnv *env, jclass that, jint arg0) -{ - jboolean rc = 0; - Win32_NATIVE_ENTER(env, that, DeleteObject_FUNC); - rc = (jboolean)DeleteObject((HGDIOBJ)arg0); - Win32_NATIVE_EXIT(env, that, DeleteObject_FUNC); - return rc; -} -#endif - -#ifndef NO_DestroyIcon -JNIEXPORT jboolean JNICALL Win32_NATIVE(DestroyIcon) - (JNIEnv *env, jclass that, jint arg0) -{ - jboolean rc = 0; - Win32_NATIVE_ENTER(env, that, DestroyIcon_FUNC); - rc = (jboolean)DestroyIcon((HICON)arg0); - Win32_NATIVE_EXIT(env, that, DestroyIcon_FUNC); - return rc; -} -#endif - -#ifndef NO_EnableWindow -JNIEXPORT void JNICALL Win32_NATIVE(EnableWindow) - (JNIEnv *env, jclass that, jint arg0, jboolean arg1) -{ - Win32_NATIVE_ENTER(env, that, EnableWindow_FUNC); - EnableWindow((HWND)arg0, arg1); - Win32_NATIVE_EXIT(env, that, EnableWindow_FUNC); -} -#endif - -#ifndef NO_ExtractIconExW -JNIEXPORT jint JNICALL Win32_NATIVE(ExtractIconExW) - (JNIEnv *env, jclass that, jcharArray arg0, jint arg1, jintArray arg2, jintArray arg3, jint arg4) -{ - jchar *lparg0=NULL; - jint *lparg2=NULL; - jint *lparg3=NULL; - jint rc = 0; - Win32_NATIVE_ENTER(env, that, ExtractIconExW_FUNC); - if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; - if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; - rc = (jint)ExtractIconExW((LPCWSTR)lparg0, arg1, (HICON*)lparg2, (HICON*)lparg3, (UINT)arg4); -fail: - if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); - if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); - if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0); - Win32_NATIVE_EXIT(env, that, ExtractIconExW_FUNC); - return rc; -} -#endif - -#ifndef NO_GetCursorPos -JNIEXPORT void JNICALL Win32_NATIVE(GetCursorPos) - (JNIEnv *env, jclass that, jobject arg0) -{ - POINT _arg0, *lparg0=NULL; - Win32_NATIVE_ENTER(env, that, GetCursorPos_FUNC); - if (arg0) if ((lparg0 = getPOINTFields(env, arg0, &_arg0)) == NULL) goto fail; - GetCursorPos((LPPOINT)lparg0); -fail: - if (arg0 && lparg0) setPOINTFields(env, arg0, lparg0); - Win32_NATIVE_EXIT(env, that, GetCursorPos_FUNC); -} -#endif - -#ifndef NO_GetIconInfo -JNIEXPORT jboolean JNICALL Win32_NATIVE(GetIconInfo) - (JNIEnv *env, jclass that, jint arg0, jobject arg1) -{ - ICONINFO _arg1, *lparg1=NULL; - jboolean rc = 0; - Win32_NATIVE_ENTER(env, that, GetIconInfo_FUNC); - if (arg1) if ((lparg1 = getICONINFOFields(env, arg1, &_arg1)) == NULL) goto fail; - rc = (jboolean)GetIconInfo((HICON)arg0, lparg1); -fail: - if (arg1 && lparg1) setICONINFOFields(env, arg1, lparg1); - Win32_NATIVE_EXIT(env, that, GetIconInfo_FUNC); - return rc; -} -#endif - -#ifndef NO_GetKeyboardState -JNIEXPORT jboolean JNICALL Win32_NATIVE(GetKeyboardState) - (JNIEnv *env, jclass that, jbyteArray arg0) -{ - jbyte *lparg0=NULL; - jboolean rc = 0; - Win32_NATIVE_ENTER(env, that, GetKeyboardState_FUNC); - if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; - rc = (jboolean)GetKeyboardState((PBYTE)lparg0); -fail: - if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); - Win32_NATIVE_EXIT(env, that, GetKeyboardState_FUNC); - return rc; -} -#endif - -#ifndef NO_GetModuleHandleW -JNIEXPORT jint JNICALL Win32_NATIVE(GetModuleHandleW) - (JNIEnv *env, jclass that, jcharArray arg0) -{ - jchar *lparg0=NULL; - jint rc = 0; - Win32_NATIVE_ENTER(env, that, GetModuleHandleW_FUNC); - if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail; - rc = (jint)GetModuleHandleW((LPCWSTR)lparg0); -fail: - if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0); - Win32_NATIVE_EXIT(env, that, GetModuleHandleW_FUNC); - return rc; -} -#endif - -#ifndef NO_GetProcessHeap -JNIEXPORT jint JNICALL Win32_NATIVE(GetProcessHeap) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - Win32_NATIVE_ENTER(env, that, GetProcessHeap_FUNC); - rc = (jint)GetProcessHeap(); - Win32_NATIVE_EXIT(env, that, GetProcessHeap_FUNC); - return rc; -} -#endif - -#ifndef NO_HeapAlloc -JNIEXPORT jint JNICALL Win32_NATIVE(HeapAlloc) - (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2) -{ - jint rc = 0; - Win32_NATIVE_ENTER(env, that, HeapAlloc_FUNC); - rc = (jint)HeapAlloc((HANDLE)arg0, arg1, arg2); - Win32_NATIVE_EXIT(env, that, HeapAlloc_FUNC); - return rc; -} -#endif - -#ifndef NO_HeapFree -JNIEXPORT jboolean JNICALL Win32_NATIVE(HeapFree) - (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2) -{ - jboolean rc = 0; - Win32_NATIVE_ENTER(env, that, HeapFree_FUNC); - rc = (jboolean)HeapFree((HANDLE)arg0, arg1, (LPVOID)arg2); - Win32_NATIVE_EXIT(env, that, HeapFree_FUNC); - return rc; -} -#endif - -#ifndef NO_LoadImage -JNIEXPORT jint JNICALL Win32_NATIVE(LoadImage) - (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5) -{ - jint rc = 0; - Win32_NATIVE_ENTER(env, that, LoadImage_FUNC); - rc = (jint)LoadImage((HINSTANCE)arg0, (LPCTSTR)arg1, (UINT)arg2, arg3, arg4, (UINT)arg5); - Win32_NATIVE_EXIT(env, that, LoadImage_FUNC); - return rc; -} -#endif - -#ifndef NO_MapVirtualKeyW -JNIEXPORT jint JNICALL Win32_NATIVE(MapVirtualKeyW) - (JNIEnv *env, jclass that, jint arg0, jint arg1) -{ - jint rc = 0; - Win32_NATIVE_ENTER(env, that, MapVirtualKeyW_FUNC); - rc = (jint)MapVirtualKeyW(arg0, arg1); - Win32_NATIVE_EXIT(env, that, MapVirtualKeyW_FUNC); - return rc; -} -#endif - -#ifndef NO_MoveMemory -JNIEXPORT void JNICALL Win32_NATIVE(MoveMemory) - (JNIEnv *env, jclass that, jint arg0, jcharArray arg1, jint arg2) -{ - jchar *lparg1=NULL; - Win32_NATIVE_ENTER(env, that, MoveMemory_FUNC); -#ifdef JNI_VERSION_1_2 - if (IS_JNI_1_2) { - if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail; - } else -#endif - { - if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail; - } - MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2); -fail: -#ifdef JNI_VERSION_1_2 - if (IS_JNI_1_2) { - if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT); - } else -#endif - { - if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, JNI_ABORT); - } - Win32_NATIVE_EXIT(env, that, MoveMemory_FUNC); -} -#endif - -#ifndef NO_OleInitialize -JNIEXPORT jint JNICALL Win32_NATIVE(OleInitialize) - (JNIEnv *env, jclass that, jint arg0) -{ - jint rc = 0; - Win32_NATIVE_ENTER(env, that, OleInitialize_FUNC); - rc = (jint)OleInitialize((LPVOID)arg0); - Win32_NATIVE_EXIT(env, that, OleInitialize_FUNC); - return rc; -} -#endif - -#ifndef NO_OleUninitialize -JNIEXPORT void JNICALL Win32_NATIVE(OleUninitialize) - (JNIEnv *env, jclass that) -{ - Win32_NATIVE_ENTER(env, that, OleUninitialize_FUNC); - OleUninitialize(); - Win32_NATIVE_EXIT(env, that, OleUninitialize_FUNC); -} -#endif - -#ifndef NO_PROCESS_1INFORMATION_1sizeof -JNIEXPORT jint JNICALL Win32_NATIVE(PROCESS_1INFORMATION_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - Win32_NATIVE_ENTER(env, that, PROCESS_1INFORMATION_1sizeof_FUNC); - rc = (jint)PROCESS_INFORMATION_sizeof(); - Win32_NATIVE_EXIT(env, that, PROCESS_1INFORMATION_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_SHELLEXECUTEINFOW_1sizeof -JNIEXPORT jint JNICALL Win32_NATIVE(SHELLEXECUTEINFOW_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - Win32_NATIVE_ENTER(env, that, SHELLEXECUTEINFOW_1sizeof_FUNC); - rc = (jint)SHELLEXECUTEINFOW_sizeof(); - Win32_NATIVE_EXIT(env, that, SHELLEXECUTEINFOW_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_STARTUPINFOW_1sizeof -JNIEXPORT jint JNICALL Win32_NATIVE(STARTUPINFOW_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - Win32_NATIVE_ENTER(env, that, STARTUPINFOW_1sizeof_FUNC); - rc = (jint)STARTUPINFOW_sizeof(); - Win32_NATIVE_EXIT(env, that, STARTUPINFOW_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_SetCursorPos -JNIEXPORT jint JNICALL Win32_NATIVE(SetCursorPos) - (JNIEnv *env, jclass that, jint arg0, jint arg1) -{ - jint rc = 0; - Win32_NATIVE_ENTER(env, that, SetCursorPos_FUNC); - rc = (jint)SetCursorPos(arg0, arg1); - Win32_NATIVE_EXIT(env, that, SetCursorPos_FUNC); - return rc; -} -#endif - -#ifndef NO_ShellExecuteExW -JNIEXPORT jboolean JNICALL Win32_NATIVE(ShellExecuteExW) - (JNIEnv *env, jclass that, jobject arg0) -{ - SHELLEXECUTEINFOW _arg0, *lparg0=NULL; - jboolean rc = 0; - Win32_NATIVE_ENTER(env, that, ShellExecuteExW_FUNC); - if (arg0) if ((lparg0 = getSHELLEXECUTEINFOWFields(env, arg0, &_arg0)) == NULL) goto fail; - rc = (jboolean)ShellExecuteExW((LPSHELLEXECUTEINFOW)lparg0); -fail: - if (arg0 && lparg0) setSHELLEXECUTEINFOWFields(env, arg0, lparg0); - Win32_NATIVE_EXIT(env, that, ShellExecuteExW_FUNC); - return rc; -} -#endif - -#ifndef NO_ToUnicode -JNIEXPORT jint JNICALL Win32_NATIVE(ToUnicode) - (JNIEnv *env, jclass that, jint arg0, jint arg1, jbyteArray arg2, jcharArray arg3, jint arg4, jint arg5) -{ - jbyte *lparg2=NULL; - jchar *lparg3=NULL; - jint rc = 0; - Win32_NATIVE_ENTER(env, that, ToUnicode_FUNC); - if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail; - if (arg3) if ((lparg3 = (*env)->GetCharArrayElements(env, arg3, NULL)) == NULL) goto fail; - rc = (jint)ToUnicode(arg0, arg1, (PBYTE)lparg2, (LPWSTR)lparg3, arg4, arg5); -fail: - if (arg3 && lparg3) (*env)->ReleaseCharArrayElements(env, arg3, lparg3, 0); - if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0); - Win32_NATIVE_EXIT(env, that, ToUnicode_FUNC); - return rc; -} -#endif - diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32.h b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32.h deleted file mode 100644 index 1d6f24b935..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32.h +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2007 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 - *******************************************************************************/ - -#ifndef INC_win32_H -#define INC_win32_H - - -#include "swt.h" -#include <ole2.h> -#include <objbase.h> -#include <string.h> -#include <windows.h> - -#endif /* INC_win32_H */
\ No newline at end of file diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_stats.c deleted file mode 100644 index f7b83f2cff..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_stats.c +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 - *******************************************************************************/ - -#include "swt.h" -#include "win32_stats.h" - -#ifdef NATIVE_STATS - -int Win32_nativeFunctionCount = 26; -int Win32_nativeFunctionCallCount[26]; -char * Win32_nativeFunctionNames[] = { - "CloseHandle", - "CreateCursor", - "CreateIconIndirect", - "CreateProcessW", - "DeleteObject", - "DestroyIcon", - "EnableWindow", - "ExtractIconExW", - "GetCursorPos", - "GetIconInfo", - "GetKeyboardState", - "GetModuleHandleW", - "GetProcessHeap", - "HeapAlloc", - "HeapFree", - "LoadImage", - "MapVirtualKeyW", - "MoveMemory", - "OleInitialize", - "OleUninitialize", - "PROCESS_1INFORMATION_1sizeof", - "SHELLEXECUTEINFOW_1sizeof", - "STARTUPINFOW_1sizeof", - "SetCursorPos", - "ShellExecuteExW", - "ToUnicode", -}; - -#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func - -JNIEXPORT jint JNICALL STATS_NATIVE(Win32_1GetFunctionCount) - (JNIEnv *env, jclass that) -{ - return Win32_nativeFunctionCount; -} - -JNIEXPORT jstring JNICALL STATS_NATIVE(Win32_1GetFunctionName) - (JNIEnv *env, jclass that, jint index) -{ - return (*env)->NewStringUTF(env, Win32_nativeFunctionNames[index]); -} - -JNIEXPORT jint JNICALL STATS_NATIVE(Win32_1GetFunctionCallCount) - (JNIEnv *env, jclass that, jint index) -{ - return Win32_nativeFunctionCallCount[index]; -} - -#endif diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_stats.h deleted file mode 100644 index 39fe188be8..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_stats.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 - *******************************************************************************/ - -#ifdef NATIVE_STATS -extern int Win32_nativeFunctionCount; -extern int Win32_nativeFunctionCallCount[]; -extern char* Win32_nativeFunctionNames[]; -#define Win32_NATIVE_ENTER(env, that, func) Win32_nativeFunctionCallCount[func]++; -#define Win32_NATIVE_EXIT(env, that, func) -#else -#ifndef Win32_NATIVE_ENTER -#define Win32_NATIVE_ENTER(env, that, func) -#endif -#ifndef Win32_NATIVE_EXIT -#define Win32_NATIVE_EXIT(env, that, func) -#endif -#endif - -typedef enum { - CloseHandle_FUNC, - CreateCursor_FUNC, - CreateIconIndirect_FUNC, - CreateProcessW_FUNC, - DeleteObject_FUNC, - DestroyIcon_FUNC, - EnableWindow_FUNC, - ExtractIconExW_FUNC, - GetCursorPos_FUNC, - GetIconInfo_FUNC, - GetKeyboardState_FUNC, - GetModuleHandleW_FUNC, - GetProcessHeap_FUNC, - HeapAlloc_FUNC, - HeapFree_FUNC, - LoadImage_FUNC, - MapVirtualKeyW_FUNC, - MoveMemory_FUNC, - OleInitialize_FUNC, - OleUninitialize_FUNC, - PROCESS_1INFORMATION_1sizeof_FUNC, - SHELLEXECUTEINFOW_1sizeof_FUNC, - STARTUPINFOW_1sizeof_FUNC, - SetCursorPos_FUNC, - ShellExecuteExW_FUNC, - ToUnicode_FUNC, -} Win32_FUNCS; diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_structs.c b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_structs.c deleted file mode 100644 index 6dded9d5b5..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_structs.c +++ /dev/null @@ -1,286 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 - *******************************************************************************/ - -#include "swt.h" -#include "win32_structs.h" - -#ifndef NO_ICONINFO -typedef struct ICONINFO_FID_CACHE { - int cached; - jclass clazz; - jfieldID fIcon, xHotspot, yHotspot, hbmMask, hbmColor; -} ICONINFO_FID_CACHE; - -ICONINFO_FID_CACHE ICONINFOFc; - -void cacheICONINFOFields(JNIEnv *env, jobject lpObject) -{ - if (ICONINFOFc.cached) return; - ICONINFOFc.clazz = (*env)->GetObjectClass(env, lpObject); - ICONINFOFc.fIcon = (*env)->GetFieldID(env, ICONINFOFc.clazz, "fIcon", "Z"); - ICONINFOFc.xHotspot = (*env)->GetFieldID(env, ICONINFOFc.clazz, "xHotspot", "I"); - ICONINFOFc.yHotspot = (*env)->GetFieldID(env, ICONINFOFc.clazz, "yHotspot", "I"); - ICONINFOFc.hbmMask = (*env)->GetFieldID(env, ICONINFOFc.clazz, "hbmMask", "I"); - ICONINFOFc.hbmColor = (*env)->GetFieldID(env, ICONINFOFc.clazz, "hbmColor", "I"); - ICONINFOFc.cached = 1; -} - -ICONINFO *getICONINFOFields(JNIEnv *env, jobject lpObject, ICONINFO *lpStruct) -{ - if (!ICONINFOFc.cached) cacheICONINFOFields(env, lpObject); - lpStruct->fIcon = (*env)->GetBooleanField(env, lpObject, ICONINFOFc.fIcon); - lpStruct->xHotspot = (*env)->GetIntField(env, lpObject, ICONINFOFc.xHotspot); - lpStruct->yHotspot = (*env)->GetIntField(env, lpObject, ICONINFOFc.yHotspot); - lpStruct->hbmMask = (HBITMAP)(*env)->GetIntField(env, lpObject, ICONINFOFc.hbmMask); - lpStruct->hbmColor = (HBITMAP)(*env)->GetIntField(env, lpObject, ICONINFOFc.hbmColor); - return lpStruct; -} - -void setICONINFOFields(JNIEnv *env, jobject lpObject, ICONINFO *lpStruct) -{ - if (!ICONINFOFc.cached) cacheICONINFOFields(env, lpObject); - (*env)->SetBooleanField(env, lpObject, ICONINFOFc.fIcon, (jboolean)lpStruct->fIcon); - (*env)->SetIntField(env, lpObject, ICONINFOFc.xHotspot, (jint)lpStruct->xHotspot); - (*env)->SetIntField(env, lpObject, ICONINFOFc.yHotspot, (jint)lpStruct->yHotspot); - (*env)->SetIntField(env, lpObject, ICONINFOFc.hbmMask, (jint)lpStruct->hbmMask); - (*env)->SetIntField(env, lpObject, ICONINFOFc.hbmColor, (jint)lpStruct->hbmColor); -} -#endif - -#ifndef NO_POINT -typedef struct POINT_FID_CACHE { - int cached; - jclass clazz; - jfieldID x, y; -} POINT_FID_CACHE; - -POINT_FID_CACHE POINTFc; - -void cachePOINTFields(JNIEnv *env, jobject lpObject) -{ - if (POINTFc.cached) return; - POINTFc.clazz = (*env)->GetObjectClass(env, lpObject); - POINTFc.x = (*env)->GetFieldID(env, POINTFc.clazz, "x", "I"); - POINTFc.y = (*env)->GetFieldID(env, POINTFc.clazz, "y", "I"); - POINTFc.cached = 1; -} - -POINT *getPOINTFields(JNIEnv *env, jobject lpObject, POINT *lpStruct) -{ - if (!POINTFc.cached) cachePOINTFields(env, lpObject); - lpStruct->x = (*env)->GetIntField(env, lpObject, POINTFc.x); - lpStruct->y = (*env)->GetIntField(env, lpObject, POINTFc.y); - return lpStruct; -} - -void setPOINTFields(JNIEnv *env, jobject lpObject, POINT *lpStruct) -{ - if (!POINTFc.cached) cachePOINTFields(env, lpObject); - (*env)->SetIntField(env, lpObject, POINTFc.x, (jint)lpStruct->x); - (*env)->SetIntField(env, lpObject, POINTFc.y, (jint)lpStruct->y); -} -#endif - -#ifndef NO_PROCESS_INFORMATION -typedef struct PROCESS_INFORMATION_FID_CACHE { - int cached; - jclass clazz; - jfieldID hProcess, hThread, dwProcessId, dwThreadId; -} PROCESS_INFORMATION_FID_CACHE; - -PROCESS_INFORMATION_FID_CACHE PROCESS_INFORMATIONFc; - -void cachePROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject) -{ - if (PROCESS_INFORMATIONFc.cached) return; - PROCESS_INFORMATIONFc.clazz = (*env)->GetObjectClass(env, lpObject); - PROCESS_INFORMATIONFc.hProcess = (*env)->GetFieldID(env, PROCESS_INFORMATIONFc.clazz, "hProcess", I_J); - PROCESS_INFORMATIONFc.hThread = (*env)->GetFieldID(env, PROCESS_INFORMATIONFc.clazz, "hThread", I_J); - PROCESS_INFORMATIONFc.dwProcessId = (*env)->GetFieldID(env, PROCESS_INFORMATIONFc.clazz, "dwProcessId", "I"); - PROCESS_INFORMATIONFc.dwThreadId = (*env)->GetFieldID(env, PROCESS_INFORMATIONFc.clazz, "dwThreadId", "I"); - PROCESS_INFORMATIONFc.cached = 1; -} - -PROCESS_INFORMATION *getPROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject, PROCESS_INFORMATION *lpStruct) -{ - if (!PROCESS_INFORMATIONFc.cached) cachePROCESS_INFORMATIONFields(env, lpObject); - lpStruct->hProcess = (HANDLE)(*env)->GetIntLongField(env, lpObject, PROCESS_INFORMATIONFc.hProcess); - lpStruct->hThread = (HANDLE)(*env)->GetIntLongField(env, lpObject, PROCESS_INFORMATIONFc.hThread); - lpStruct->dwProcessId = (*env)->GetIntField(env, lpObject, PROCESS_INFORMATIONFc.dwProcessId); - lpStruct->dwThreadId = (*env)->GetIntField(env, lpObject, PROCESS_INFORMATIONFc.dwThreadId); - return lpStruct; -} - -void setPROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject, PROCESS_INFORMATION *lpStruct) -{ - if (!PROCESS_INFORMATIONFc.cached) cachePROCESS_INFORMATIONFields(env, lpObject); - (*env)->SetIntLongField(env, lpObject, PROCESS_INFORMATIONFc.hProcess, (jintLong)lpStruct->hProcess); - (*env)->SetIntLongField(env, lpObject, PROCESS_INFORMATIONFc.hThread, (jintLong)lpStruct->hThread); - (*env)->SetIntField(env, lpObject, PROCESS_INFORMATIONFc.dwProcessId, (jint)lpStruct->dwProcessId); - (*env)->SetIntField(env, lpObject, PROCESS_INFORMATIONFc.dwThreadId, (jint)lpStruct->dwThreadId); -} -#endif - -#ifndef NO_SHELLEXECUTEINFOW -typedef struct SHELLEXECUTEINFOW_FID_CACHE { - int cached; - jclass clazz; - jfieldID cbSize, fMask, hwnd, lpVerb, lpFile, lpParameters, lpDirectory, nShow, hInstApp, lpIDList, lpClass, hkeyClass, dwHotKey, hIcon, hProcess; -} SHELLEXECUTEINFOW_FID_CACHE; - -SHELLEXECUTEINFOW_FID_CACHE SHELLEXECUTEINFOWFc; - -void cacheSHELLEXECUTEINFOWFields(JNIEnv *env, jobject lpObject) -{ - if (SHELLEXECUTEINFOWFc.cached) return; - SHELLEXECUTEINFOWFc.clazz = (*env)->GetObjectClass(env, lpObject); - SHELLEXECUTEINFOWFc.cbSize = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "cbSize", "I"); - SHELLEXECUTEINFOWFc.fMask = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "fMask", "I"); - SHELLEXECUTEINFOWFc.hwnd = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "hwnd", I_J); - SHELLEXECUTEINFOWFc.lpVerb = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "lpVerb", I_J); - SHELLEXECUTEINFOWFc.lpFile = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "lpFile", "I"); - SHELLEXECUTEINFOWFc.lpParameters = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "lpParameters", I_J); - SHELLEXECUTEINFOWFc.lpDirectory = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "lpDirectory", I_J); - SHELLEXECUTEINFOWFc.nShow = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "nShow", "I"); - SHELLEXECUTEINFOWFc.hInstApp = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "hInstApp", I_J); - SHELLEXECUTEINFOWFc.lpIDList = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "lpIDList", I_J); - SHELLEXECUTEINFOWFc.lpClass = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "lpClass", I_J); - SHELLEXECUTEINFOWFc.hkeyClass = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "hkeyClass", I_J); - SHELLEXECUTEINFOWFc.dwHotKey = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "dwHotKey", "I"); - SHELLEXECUTEINFOWFc.hIcon = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "hIcon", I_J); - SHELLEXECUTEINFOWFc.hProcess = (*env)->GetFieldID(env, SHELLEXECUTEINFOWFc.clazz, "hProcess", I_J); - SHELLEXECUTEINFOWFc.cached = 1; -} - -SHELLEXECUTEINFOW *getSHELLEXECUTEINFOWFields(JNIEnv *env, jobject lpObject, SHELLEXECUTEINFOW *lpStruct) -{ - if (!SHELLEXECUTEINFOWFc.cached) cacheSHELLEXECUTEINFOWFields(env, lpObject); - lpStruct->cbSize = (*env)->GetIntField(env, lpObject, SHELLEXECUTEINFOWFc.cbSize); - lpStruct->fMask = (*env)->GetIntField(env, lpObject, SHELLEXECUTEINFOWFc.fMask); - lpStruct->hwnd = (HWND)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.hwnd); - lpStruct->lpVerb = (LPWSTR)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.lpVerb); - lpStruct->lpFile = (LPWSTR)(*env)->GetIntField(env, lpObject, SHELLEXECUTEINFOWFc.lpFile); - lpStruct->lpParameters = (LPWSTR)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.lpParameters); - lpStruct->lpDirectory = (LPWSTR)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.lpDirectory); - lpStruct->nShow = (*env)->GetIntField(env, lpObject, SHELLEXECUTEINFOWFc.nShow); - lpStruct->hInstApp = (HINSTANCE)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.hInstApp); - lpStruct->lpIDList = (LPVOID)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.lpIDList); - lpStruct->lpClass = (LPWSTR)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.lpClass); - lpStruct->hkeyClass = (HKEY)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.hkeyClass); - lpStruct->dwHotKey = (*env)->GetIntField(env, lpObject, SHELLEXECUTEINFOWFc.dwHotKey); - lpStruct->hIcon = (HANDLE)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.hIcon); - lpStruct->hProcess = (HANDLE)(*env)->GetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.hProcess); - return lpStruct; -} - -void setSHELLEXECUTEINFOWFields(JNIEnv *env, jobject lpObject, SHELLEXECUTEINFOW *lpStruct) -{ - if (!SHELLEXECUTEINFOWFc.cached) cacheSHELLEXECUTEINFOWFields(env, lpObject); - (*env)->SetIntField(env, lpObject, SHELLEXECUTEINFOWFc.cbSize, (jint)lpStruct->cbSize); - (*env)->SetIntField(env, lpObject, SHELLEXECUTEINFOWFc.fMask, (jint)lpStruct->fMask); - (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.hwnd, (jintLong)lpStruct->hwnd); - (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.lpVerb, (jintLong)lpStruct->lpVerb); - (*env)->SetIntField(env, lpObject, SHELLEXECUTEINFOWFc.lpFile, (jint)lpStruct->lpFile); - (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.lpParameters, (jintLong)lpStruct->lpParameters); - (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.lpDirectory, (jintLong)lpStruct->lpDirectory); - (*env)->SetIntField(env, lpObject, SHELLEXECUTEINFOWFc.nShow, (jint)lpStruct->nShow); - (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.hInstApp, (jintLong)lpStruct->hInstApp); - (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.lpIDList, (jintLong)lpStruct->lpIDList); - (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.lpClass, (jintLong)lpStruct->lpClass); - (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.hkeyClass, (jintLong)lpStruct->hkeyClass); - (*env)->SetIntField(env, lpObject, SHELLEXECUTEINFOWFc.dwHotKey, (jint)lpStruct->dwHotKey); - (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.hIcon, (jintLong)lpStruct->hIcon); - (*env)->SetIntLongField(env, lpObject, SHELLEXECUTEINFOWFc.hProcess, (jintLong)lpStruct->hProcess); -} -#endif - -#ifndef NO_STARTUPINFOW -typedef struct STARTUPINFOW_FID_CACHE { - int cached; - jclass clazz; - jfieldID cb, lpReserved, lpDesktop, lpTitle, dwX, dwY, dwXSize, dwYSize, dwXCountChars, dwYCountChars, dwFillAttribute, dwFlags, wShowWindow, cbReserved2, lpReserved2, hStdInput, hStdOutput, hStdError; -} STARTUPINFOW_FID_CACHE; - -STARTUPINFOW_FID_CACHE STARTUPINFOWFc; - -void cacheSTARTUPINFOWFields(JNIEnv *env, jobject lpObject) -{ - if (STARTUPINFOWFc.cached) return; - STARTUPINFOWFc.clazz = (*env)->GetObjectClass(env, lpObject); - STARTUPINFOWFc.cb = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "cb", "I"); - STARTUPINFOWFc.lpReserved = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "lpReserved", I_J); - STARTUPINFOWFc.lpDesktop = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "lpDesktop", I_J); - STARTUPINFOWFc.lpTitle = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "lpTitle", I_J); - STARTUPINFOWFc.dwX = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "dwX", "I"); - STARTUPINFOWFc.dwY = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "dwY", "I"); - STARTUPINFOWFc.dwXSize = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "dwXSize", "I"); - STARTUPINFOWFc.dwYSize = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "dwYSize", "I"); - STARTUPINFOWFc.dwXCountChars = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "dwXCountChars", "I"); - STARTUPINFOWFc.dwYCountChars = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "dwYCountChars", "I"); - STARTUPINFOWFc.dwFillAttribute = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "dwFillAttribute", "I"); - STARTUPINFOWFc.dwFlags = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "dwFlags", "I"); - STARTUPINFOWFc.wShowWindow = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "wShowWindow", "S"); - STARTUPINFOWFc.cbReserved2 = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "cbReserved2", "S"); - STARTUPINFOWFc.lpReserved2 = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "lpReserved2", I_J); - STARTUPINFOWFc.hStdInput = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "hStdInput", I_J); - STARTUPINFOWFc.hStdOutput = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "hStdOutput", I_J); - STARTUPINFOWFc.hStdError = (*env)->GetFieldID(env, STARTUPINFOWFc.clazz, "hStdError", I_J); - STARTUPINFOWFc.cached = 1; -} - -STARTUPINFOW *getSTARTUPINFOWFields(JNIEnv *env, jobject lpObject, STARTUPINFOW *lpStruct) -{ - if (!STARTUPINFOWFc.cached) cacheSTARTUPINFOWFields(env, lpObject); - lpStruct->cb = (*env)->GetIntField(env, lpObject, STARTUPINFOWFc.cb); - lpStruct->lpReserved = (LPWSTR)(*env)->GetIntLongField(env, lpObject, STARTUPINFOWFc.lpReserved); - lpStruct->lpDesktop = (LPWSTR)(*env)->GetIntLongField(env, lpObject, STARTUPINFOWFc.lpDesktop); - lpStruct->lpTitle = (LPWSTR)(*env)->GetIntLongField(env, lpObject, STARTUPINFOWFc.lpTitle); - lpStruct->dwX = (*env)->GetIntField(env, lpObject, STARTUPINFOWFc.dwX); - lpStruct->dwY = (*env)->GetIntField(env, lpObject, STARTUPINFOWFc.dwY); - lpStruct->dwXSize = (*env)->GetIntField(env, lpObject, STARTUPINFOWFc.dwXSize); - lpStruct->dwYSize = (*env)->GetIntField(env, lpObject, STARTUPINFOWFc.dwYSize); - lpStruct->dwXCountChars = (*env)->GetIntField(env, lpObject, STARTUPINFOWFc.dwXCountChars); - lpStruct->dwYCountChars = (*env)->GetIntField(env, lpObject, STARTUPINFOWFc.dwYCountChars); - lpStruct->dwFillAttribute = (*env)->GetIntField(env, lpObject, STARTUPINFOWFc.dwFillAttribute); - lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, STARTUPINFOWFc.dwFlags); - lpStruct->wShowWindow = (*env)->GetShortField(env, lpObject, STARTUPINFOWFc.wShowWindow); - lpStruct->cbReserved2 = (*env)->GetShortField(env, lpObject, STARTUPINFOWFc.cbReserved2); - lpStruct->lpReserved2 = (LPBYTE)(*env)->GetIntLongField(env, lpObject, STARTUPINFOWFc.lpReserved2); - lpStruct->hStdInput = (HANDLE)(*env)->GetIntLongField(env, lpObject, STARTUPINFOWFc.hStdInput); - lpStruct->hStdOutput = (HANDLE)(*env)->GetIntLongField(env, lpObject, STARTUPINFOWFc.hStdOutput); - lpStruct->hStdError = (HANDLE)(*env)->GetIntLongField(env, lpObject, STARTUPINFOWFc.hStdError); - return lpStruct; -} - -void setSTARTUPINFOWFields(JNIEnv *env, jobject lpObject, STARTUPINFOW *lpStruct) -{ - if (!STARTUPINFOWFc.cached) cacheSTARTUPINFOWFields(env, lpObject); - (*env)->SetIntField(env, lpObject, STARTUPINFOWFc.cb, (jint)lpStruct->cb); - (*env)->SetIntLongField(env, lpObject, STARTUPINFOWFc.lpReserved, (jintLong)lpStruct->lpReserved); - (*env)->SetIntLongField(env, lpObject, STARTUPINFOWFc.lpDesktop, (jintLong)lpStruct->lpDesktop); - (*env)->SetIntLongField(env, lpObject, STARTUPINFOWFc.lpTitle, (jintLong)lpStruct->lpTitle); - (*env)->SetIntField(env, lpObject, STARTUPINFOWFc.dwX, (jint)lpStruct->dwX); - (*env)->SetIntField(env, lpObject, STARTUPINFOWFc.dwY, (jint)lpStruct->dwY); - (*env)->SetIntField(env, lpObject, STARTUPINFOWFc.dwXSize, (jint)lpStruct->dwXSize); - (*env)->SetIntField(env, lpObject, STARTUPINFOWFc.dwYSize, (jint)lpStruct->dwYSize); - (*env)->SetIntField(env, lpObject, STARTUPINFOWFc.dwXCountChars, (jint)lpStruct->dwXCountChars); - (*env)->SetIntField(env, lpObject, STARTUPINFOWFc.dwYCountChars, (jint)lpStruct->dwYCountChars); - (*env)->SetIntField(env, lpObject, STARTUPINFOWFc.dwFillAttribute, (jint)lpStruct->dwFillAttribute); - (*env)->SetIntField(env, lpObject, STARTUPINFOWFc.dwFlags, (jint)lpStruct->dwFlags); - (*env)->SetShortField(env, lpObject, STARTUPINFOWFc.wShowWindow, (jshort)lpStruct->wShowWindow); - (*env)->SetShortField(env, lpObject, STARTUPINFOWFc.cbReserved2, (jshort)lpStruct->cbReserved2); - (*env)->SetIntLongField(env, lpObject, STARTUPINFOWFc.lpReserved2, (jintLong)lpStruct->lpReserved2); - (*env)->SetIntLongField(env, lpObject, STARTUPINFOWFc.hStdInput, (jintLong)lpStruct->hStdInput); - (*env)->SetIntLongField(env, lpObject, STARTUPINFOWFc.hStdOutput, (jintLong)lpStruct->hStdOutput); - (*env)->SetIntLongField(env, lpObject, STARTUPINFOWFc.hStdError, (jintLong)lpStruct->hStdError); -} -#endif - diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_structs.h b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_structs.h deleted file mode 100644 index 0eb00b3bb6..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/win32_structs.h +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 - *******************************************************************************/ - -#include "win32.h" - -#ifndef NO_ICONINFO -void cacheICONINFOFields(JNIEnv *env, jobject lpObject); -ICONINFO *getICONINFOFields(JNIEnv *env, jobject lpObject, ICONINFO *lpStruct); -void setICONINFOFields(JNIEnv *env, jobject lpObject, ICONINFO *lpStruct); -#define ICONINFO_sizeof() sizeof(ICONINFO) -#else -#define cacheICONINFOFields(a,b) -#define getICONINFOFields(a,b,c) NULL -#define setICONINFOFields(a,b,c) -#define ICONINFO_sizeof() 0 -#endif - -#ifndef NO_POINT -void cachePOINTFields(JNIEnv *env, jobject lpObject); -POINT *getPOINTFields(JNIEnv *env, jobject lpObject, POINT *lpStruct); -void setPOINTFields(JNIEnv *env, jobject lpObject, POINT *lpStruct); -#define POINT_sizeof() sizeof(POINT) -#else -#define cachePOINTFields(a,b) -#define getPOINTFields(a,b,c) NULL -#define setPOINTFields(a,b,c) -#define POINT_sizeof() 0 -#endif - -#ifndef NO_PROCESS_INFORMATION -void cachePROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject); -PROCESS_INFORMATION *getPROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject, PROCESS_INFORMATION *lpStruct); -void setPROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject, PROCESS_INFORMATION *lpStruct); -#define PROCESS_INFORMATION_sizeof() sizeof(PROCESS_INFORMATION) -#else -#define cachePROCESS_INFORMATIONFields(a,b) -#define getPROCESS_INFORMATIONFields(a,b,c) NULL -#define setPROCESS_INFORMATIONFields(a,b,c) -#define PROCESS_INFORMATION_sizeof() 0 -#endif - -#ifndef NO_SHELLEXECUTEINFOW -void cacheSHELLEXECUTEINFOWFields(JNIEnv *env, jobject lpObject); -SHELLEXECUTEINFOW *getSHELLEXECUTEINFOWFields(JNIEnv *env, jobject lpObject, SHELLEXECUTEINFOW *lpStruct); -void setSHELLEXECUTEINFOWFields(JNIEnv *env, jobject lpObject, SHELLEXECUTEINFOW *lpStruct); -#define SHELLEXECUTEINFOW_sizeof() sizeof(SHELLEXECUTEINFOW) -#else -#define cacheSHELLEXECUTEINFOWFields(a,b) -#define getSHELLEXECUTEINFOWFields(a,b,c) NULL -#define setSHELLEXECUTEINFOWFields(a,b,c) -#define SHELLEXECUTEINFOW_sizeof() 0 -#endif - -#ifndef NO_STARTUPINFOW -void cacheSTARTUPINFOWFields(JNIEnv *env, jobject lpObject); -STARTUPINFOW *getSTARTUPINFOWFields(JNIEnv *env, jobject lpObject, STARTUPINFOW *lpStruct); -void setSTARTUPINFOWFields(JNIEnv *env, jobject lpObject, STARTUPINFOW *lpStruct); -#define STARTUPINFOW_sizeof() sizeof(STARTUPINFOW) -#else -#define cacheSTARTUPINFOWFields(a,b) -#define getSTARTUPINFOWFields(a,b,c) NULL -#define setSTARTUPINFOWFields(a,b,c) -#define STARTUPINFOW_sizeof() 0 -#endif - diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/ICONINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/ICONINFO.java deleted file mode 100644 index 84e165dfc2..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/ICONINFO.java +++ /dev/null @@ -1,22 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 ICONINFO { - public boolean fIcon; - public int xHotspot; - public int yHotspot; - /** @field cast=(HBITMAP) */ - public int hbmMask; - /** @field cast=(HBITMAP) */ - public int hbmColor; - public static final int sizeof = 20; -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/POINT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/POINT.java deleted file mode 100644 index 3f07037586..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/POINT.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2007 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 POINT { - public int x; - public int y; - public static final int sizeof = 8; -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/PROCESS_INFORMATION.java b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/PROCESS_INFORMATION.java deleted file mode 100644 index efc7d20be0..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/PROCESS_INFORMATION.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 PROCESS_INFORMATION { - /** @field cast=(HANDLE) */ - public int /*long*/ hProcess; - /** @field cast=(HANDLE) */ - public int /*long*/ hThread; - public int dwProcessId; - public int dwThreadId; - public static int sizeof = Win32.PROCESS_INFORMATION_sizeof (); -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/SHELLEXECUTEINFOW.java b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/SHELLEXECUTEINFOW.java deleted file mode 100644 index a8214aafda..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/SHELLEXECUTEINFOW.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 SHELLEXECUTEINFOW { - public int cbSize; - public int fMask; - /** @field cast=(HWND) */ - public int /*long*/ hwnd; - /** @field cast=(LPWSTR) */ - public int /*long*/ lpVerb; - /** @field cast=(LPWSTR) */ - public int lpFile; - /** @field cast=(LPWSTR) */ - public int /*long*/ lpParameters; - /** @field cast=(LPWSTR) */ - public int /*long*/ lpDirectory; - public int nShow; - /** @field cast=(HINSTANCE) */ - public int /*long*/ hInstApp; - // Optional members - /** @field cast=(LPVOID) */ - public int /*long*/ lpIDList; - /** @field cast=(LPWSTR) */ - public int /*long*/ lpClass; - /** @field cast=(HKEY) */ - public int /*long*/ hkeyClass; - public int dwHotKey; -// union { -// HANDLE hIcon; -// HANDLE hMonitor; -// }; - /** @field cast=(HANDLE) */ - public int /*long*/ hIcon; - /** @field cast=(HANDLE) */ - public int /*long*/ hProcess; - public static final int sizeof = Win32.SHELLEXECUTEINFOW_sizeof (); -} - diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/STARTUPINFOW.java b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/STARTUPINFOW.java deleted file mode 100644 index 7448750e2d..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/STARTUPINFOW.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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 STARTUPINFOW { - public int cb; - /** @field cast=(LPWSTR) */ - public int /*long*/ lpReserved; - /** @field cast=(LPWSTR) */ - public int /*long*/ lpDesktop; - /** @field cast=(LPWSTR) */ - public int /*long*/ lpTitle; - public int dwX; - public int dwY; - public int dwXSize; - public int dwYSize; - public int dwXCountChars; - public int dwYCountChars; - public int dwFillAttribute; - public int dwFlags; - public short wShowWindow; - public short cbReserved2; - /** @field cast=(LPBYTE) */ - public int /*long*/ lpReserved2; - /** @field cast=(HANDLE) */ - public int /*long*/ hStdInput; - /** @field cast=(HANDLE) */ - public int /*long*/ hStdOutput; - /** @field cast=(HANDLE) */ - public int /*long*/ hStdError; - public static int sizeof = Win32.STARTUPINFOW_sizeof (); -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/Win32.java b/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/Win32.java deleted file mode 100644 index 20c98209e3..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/wpf_win32/org/eclipse/swt/internal/win32/Win32.java +++ /dev/null @@ -1,124 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 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; - - -import org.eclipse.swt.internal.*; - -public class Win32 extends C { - static { - Library.loadLibrary ("swt-win32"); //$NON-NLS-1$ - } - - /** GDI+ constants */ - public static final int PixelFormat_Format24bppRgb = 137224; - public static final int PixelFormat_Format32bppRgb = 139273; - public static final int PixelFormat_Format32bppArgb = 2498570; - public static final int PixelFormat_Format16bppRgb555 = 135173; - public static final int PixelFormat_Format16bppRgb565 = 135174; - public static final int PixelFormat_Format16bppArgb1555 = 397319; - - public static final int OIC_BANG = 0x7F03; - public static final int OIC_HAND = 0x7F01; - public static final int OIC_INFORMATION = 0x7F04; - public static final int OIC_QUES = 0x7F02; - public static final int OIC_WINLOGO = 0x7F05; - public static final int IMAGE_ICON = 0x1; - public static final int LR_SHARED = 0x8000; - - public static int HEAP_ZERO_MEMORY = 0x8; - public static int SW_SHOW = 0x5; - -/** OLE Natives */ - -/** @param reserved cast=(LPVOID) */ -public static final native int OleInitialize(int reserved); -public static final native void OleUninitialize(); - -/** Win32 Natives */ - -/** @param hObject cast=(HANDLE) */ -public static final native boolean CloseHandle(int hObject); -/** - * @param hInst cast=(HINSTANCE) - * @param pvANDPlane cast=(CONST VOID *),flags=no_out critical - * @param pvXORPlane cast=(CONST VOID *),flags=no_out critical - */ -public static final native int CreateCursor (int hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, byte [] pvANDPlane, byte [] pvXORPlane); -/** - * @param lpApplicationName cast=(LPCWSTR) - * @param lpCommandLine cast=(LPWSTR) - * @param lpProcessAttributes cast=(LPSECURITY_ATTRIBUTES) - * @param lpThreadAttributes cast=(LPSECURITY_ATTRIBUTES) - * @param dwCreationFlags cast=(DWORD) - * @param lpEnvironment cast=(LPVOID) - * @param lpCurrentDirectory cast=(LPCWSTR) - * @param lpStartupInfo cast=(LPSTARTUPINFOW) - * @param lpProcessInformation cast=(LPPROCESS_INFORMATION) - */ -public static final native boolean CreateProcessW(int lpApplicationName, char [] lpCommandLine, int lpProcessAttributes, int lpThreadAttributes, boolean bInheritHandles, int dwCreationFlags, int lpEnvironment, int lpCurrentDirectory, STARTUPINFOW lpStartupInfo, PROCESS_INFORMATION lpProcessInformation); -public static final native int CreateIconIndirect (ICONINFO lplf); -/** @param hGdiObj cast=(HGDIOBJ) */ -public static final native boolean DeleteObject (int hGdiObj); -/** @param hIcon cast=(HICON) */ -public static final native boolean DestroyIcon (int hIcon); -/** @param window cast=(HWND) */ -public static final native void EnableWindow(int window, boolean enabled); -/** - * @param lpszFile cast=(LPCWSTR) - * @param phiconLarge cast=(HICON*) - * @param phiconSmall cast=(HICON*) - * @param nIcons cast=(UINT) - */ -public static final native int ExtractIconExW(char[] lpszFile, int nIconIndex, int [] phiconLarge, int [] phiconSmall, int nIcons); -/** @param point cast=(LPPOINT) */ -public static final native void GetCursorPos (POINT point); -/** @param hIcon cast=(HICON) */ -public static final native boolean GetIconInfo (int hIcon, ICONINFO piconinfo); -/** @param lpKeyState cast=(PBYTE) */ -public static final native boolean GetKeyboardState (byte [] lpKeyState); -public static final native int GetProcessHeap(); -/** @param lpModuleName cast=(LPCWSTR) */ -public static final native int GetModuleHandleW (char [] lpModuleName); -/** @param hHeap cast=(HANDLE) */ -public static final native int HeapAlloc (int hHeap, int dwFlags, int dwBytes); -/** - * @param hHeap cast=(HANDLE) - * @param lpMem cast=(LPVOID) - */ -public static final native boolean HeapFree (int hHeap, int dwFlags, int lpMem); -/** - * @param hinst cast=(HINSTANCE) - * @param lpszName cast=(LPCTSTR) - * @param uType cast=(UINT) - * @param fuLoad cast=(UINT) - */ -public static final native int LoadImage (int hinst, int lpszName, int uType, int cxDesired, int cyDesired, int fuLoad); -public static final native int MapVirtualKeyW (int uCode, int uMapType); -/** - * @param Destination cast=(PVOID) - * @param Source cast=(CONST VOID *),flags=no_out critical - */ -public static final native void MoveMemory (int Destination, char [] Source, int Length); -public static final native int PROCESS_INFORMATION_sizeof(); -public static final native int SetCursorPos (int x, int y); -/** @param lpExecInfo cast=(LPSHELLEXECUTEINFOW) */ -public static final native boolean ShellExecuteExW(SHELLEXECUTEINFOW lpExecInfo); -public static final native int SHELLEXECUTEINFOW_sizeof(); -public static final native int STARTUPINFOW_sizeof(); -/** - * @param lpKeyState cast=(PBYTE) - * @param pwszBuff cast=(LPWSTR) - */ -public static final native int ToUnicode(int wVirtKey, int wScanCode, byte [] lpKeyState, char [] pwszBuff, int cchBuff, int wFlags); - - -} |