blob: 22f0e17224c1986082b9692973cc49efc6a1a5bc [file] [log] [blame]
/*
* (c) Copyright IBM Corp., 2000, 2001
* All Rights Reserved.
*/
/**
* SWT OS natives implementation.
*/
#include "swt.h"
#include "structs.h"
/* Export the dll version info call */
__declspec(dllexport) HRESULT DllGetVersion(DLLVERSIONINFO *dvi);
HRESULT DllGetVersion(DLLVERSIONINFO *dvi)
{
dvi->dwMajorVersion = SWT_VERSION / 1000;
dvi->dwMinorVersion = SWT_VERSION % 1000;
dvi->dwBuildNumber = SWT_BUILD_NUM;
dvi->dwPlatformID = DLLVER_PLATFORM_WINDOWS;
return 1;
}
/* Cache the handle to the library */
HINSTANCE g_hInstance = NULL;
BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD dwReason, LPVOID lpvReserved)
{
if (dwReason == DLL_PROCESS_ATTACH) {
if (g_hInstance == NULL) g_hInstance = hInstDLL;
}
return TRUE;
}
/* Natives */
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_AbortDoc
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("AbortDoc\n")
return (jint)AbortDoc((HDC)arg0);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_ActivateKeyboardLayout
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
DEBUG_CALL("ActivateKeyboardLayout\n")
return (jint)ActivateKeyboardLayout((HKL)arg0, arg1);
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_AdjustWindowRectEx
(JNIEnv *env, jclass that, jobject arg0, jint arg1, jboolean arg2, jint arg3)
{
DECL_GLOB(pGlob)
RECT _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("AdjustWindowRectEx\n")
if (arg0) lparg0 = getRECTFields(env, arg0, &_arg0, &PGLOB(RECTFc));
rc = (jboolean)AdjustWindowRectEx(lparg0, arg1, arg2, arg3);
if (arg0) setRECTFields(env, arg0, lparg0, &PGLOB(RECTFc));
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_Arc
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
{
DEBUG_CALL("Arc\n")
return (jboolean)Arc((HDC)arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_BeginDeferWindowPos
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("BeginDeferWindowPos\n")
return (jint)BeginDeferWindowPos(arg0);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_BeginPaint
(JNIEnv *env, jclass that, jint arg0, jobject arg1)
{
DECL_GLOB(pGlob)
PAINTSTRUCT _arg1, *lparg1=NULL;
jint rc;
DEBUG_CALL("BeginPaint\n")
if (arg1) lparg1 = &_arg1;
rc = (jint)BeginPaint((HWND)arg0, lparg1);
if (arg1) setPAINTSTRUCTFields(env, arg1, lparg1, &PGLOB(PAINTSTRUCTFc));
return rc;
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_BitBlt
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
{
DEBUG_CALL("BitBlt\n")
return (jboolean)BitBlt((HDC)arg0, arg1, arg2, arg3, arg4, (HDC)arg5, arg6, arg7, arg8);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_BringWindowToTop
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("BringWindowToTop\n")
return (jboolean)BringWindowToTop((HWND)arg0);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_Call
(JNIEnv *env, jclass that, jint address, jobject arg0)
{
DECL_GLOB(pGlob)
DLLVERSIONINFO _arg0, *lparg0=NULL;
jint rc;
DEBUG_CALL("Call\n")
if (arg0) lparg0 = getDLLVERSIONINFOFields(env, arg0, &_arg0, &PGLOB(DLLVERSIONINFOFc));
rc = (jint)((DLLGETVERSIONPROC)address)(lparg0);
if (arg0) setDLLVERSIONINFOFields(env, arg0, lparg0, &PGLOB(DLLVERSIONINFOFc));
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CallNextHookEx
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
{
DEBUG_CALL("CallNextHookEx\n")
return (jint)CallNextHookEx((HHOOK)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CallWindowProcA
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
DEBUG_CALL("CallWindowProcA\n")
return (jint)CallWindowProcA((WNDPROC)arg0, (HWND)arg1, arg2, arg3, arg4);
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CallWindowProcW
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
DEBUG_CALL("CallWindowProcW\n")
return (jint)CallWindowProcW((WNDPROC)arg0, (HWND)arg1, arg2, arg3, arg4);
}
#ifndef _WIN32_WCE
JNIEXPORT jshort JNICALL Java_org_eclipse_swt_internal_win32_OS_CharLowerA
(JNIEnv *env, jclass that, jshort arg0)
{
DEBUG_CALL("CharLowerA\n")
return (jshort)CharLowerA((LPSTR)arg0);
}
#endif // _WIN32_WCE
JNIEXPORT jshort JNICALL Java_org_eclipse_swt_internal_win32_OS_CharLowerW
(JNIEnv *env, jclass that, jshort arg0)
{
DEBUG_CALL("CharLowerW\n")
return (jshort)CharLowerW((LPWSTR)arg0);
}
#ifndef _WIN32_WCE
JNIEXPORT jshort JNICALL Java_org_eclipse_swt_internal_win32_OS_CharUpperA
(JNIEnv *env, jclass that, jshort arg0)
{
DEBUG_CALL("CharUpperA\n")
return (jshort)CharUpperA((LPSTR)arg0);
}
#endif // _WIN32_WCE
JNIEXPORT jshort JNICALL Java_org_eclipse_swt_internal_win32_OS_CharUpperW
(JNIEnv *env, jclass that, jshort arg0)
{
DEBUG_CALL("CharUpperW\n")
return (jshort)CharUpperW((LPWSTR)arg0);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_CheckMenuItem
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
DEBUG_CALL("CheckMenuItem\n")
return (jboolean)CheckMenuItem((HMENU)arg0, (UINT)arg1, (UINT)arg2);
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_ChooseColorA
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
CHOOSECOLOR _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("ChooseColorA\n")
if (arg0) lparg0 = getCHOOSECOLORFields(env, arg0, &_arg0, &PGLOB(CHOOSECOLORFc));
rc = (jboolean)ChooseColorA(lparg0);
if (arg0) setCHOOSECOLORFields(env, arg0, lparg0, &PGLOB(CHOOSECOLORFc));
return rc;
}
#endif // _WIN32_WCE
#ifdef _WIN32_WCE
#define ChooseColorW ChooseColor
#define CHOOSECOLORW CHOOSECOLOR
#define LPCHOOSECOLORW LPCHOOSECOLOR
#endif
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_ChooseColorW
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
CHOOSECOLOR _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("ChooseColorW\n")
if (arg0) lparg0 = getCHOOSECOLORFields(env, arg0, &_arg0, &PGLOB(CHOOSECOLORFc));
rc = (jboolean)ChooseColorW((LPCHOOSECOLORW)lparg0);
if (arg0) setCHOOSECOLORFields(env, arg0, lparg0, &PGLOB(CHOOSECOLORFc));
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_ChooseFontA
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
CHOOSEFONT _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("ChooseFontA\n")
if (arg0) lparg0 = getCHOOSEFONTFields(env, arg0, &_arg0, &PGLOB(CHOOSEFONTFc));
rc = (jboolean)ChooseFontA(lparg0);
if (arg0) setCHOOSEFONTFields(env, arg0, lparg0, &PGLOB(CHOOSEFONTFc));
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_ChooseFontW
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
CHOOSEFONT _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("ChooseFontW\n")
if (arg0) lparg0 = getCHOOSEFONTFields(env, arg0, &_arg0, &PGLOB(CHOOSEFONTFc));
rc = (jboolean)ChooseFontW((LPCHOOSEFONTW)lparg0);
if (arg0) setCHOOSEFONTFields(env, arg0, lparg0, &PGLOB(CHOOSEFONTFc));
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_ClientToScreen
(JNIEnv *env, jclass that, jint arg0, jobject arg1)
{
DECL_GLOB(pGlob)
POINT _arg1, *lparg1=NULL;
jboolean rc;
DEBUG_CALL("ClientToScreen\n")
if (arg1) lparg1 = getPOINTFields(env, arg1, &_arg1, &PGLOB(POINTFc));
rc = (jboolean)ClientToScreen((HWND)arg0, lparg1);
if (arg1) setPOINTFields(env, arg1, lparg1, &PGLOB(POINTFc));
return rc;
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_CloseClipboard
(JNIEnv *env, jclass that)
{
DEBUG_CALL("CloseClipboard\n")
return (jboolean)CloseClipboard();
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CombineRgn
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
{
DEBUG_CALL("CombineRgn\n")
return (jint)CombineRgn((HRGN)arg0, (HRGN)arg1, (HRGN)arg2, arg3);
}
#ifdef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_CommandBar_1Destroy
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("CommandBar_Destroy\n")
return (jboolean)CommandBar_Destroy((HWND)arg0);
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CommDlgExtendedError
(JNIEnv *env, jclass that)
{
DEBUG_CALL("CommDlgExtendedError\n")
return (jint)CommDlgExtendedError();
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CopyImage
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
DEBUG_CALL("CopyImage\n")
return (jint)CopyImage((HANDLE)arg0, arg1, arg2, arg3, arg4);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateAcceleratorTableA
(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
{
jbyte *lparg0=NULL;
jint rc;
DEBUG_CALL("CreateAcceleratorTableA\n")
if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
rc = (jint)CreateAcceleratorTableA((LPACCEL)lparg0, arg1);
if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateAcceleratorTableW
(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
{
jbyte *lparg0=NULL;
jint rc;
DEBUG_CALL("CreateAcceleratorTableW\n")
if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
rc = (jint)CreateAcceleratorTableW((LPACCEL)lparg0, arg1);
if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateBitmap
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jbyteArray arg4)
{
jbyte *lparg4=NULL;
jint rc;
DEBUG_CALL("CreateBitmap\n")
if (arg4) lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL);
rc = (jint)CreateBitmap(arg0, arg1, arg2, arg3, (CONST VOID *)lparg4);
if (arg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
return rc;
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateCaret
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
{
DEBUG_CALL("CreateCaret\n")
return (jboolean)CreateCaret((HWND)arg0, (HBITMAP)arg1, arg2, arg3);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateCompatibleBitmap
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
DEBUG_CALL("CreateCompatibleBitmap\n")
return (jint)CreateCompatibleBitmap((HDC)arg0, arg1, arg2);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateCompatibleDC
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("CreateCompatibleDC\n")
return (jint)CreateCompatibleDC((HDC)arg0);
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_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;
DEBUG_CALL("CreateCursor\n")
if (arg5) lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL);
if (arg6) lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL);
rc = (jint)CreateCursor((HINSTANCE)arg0, arg1, arg2, arg3, arg4, (CONST VOID *)lparg5, (CONST VOID *)lparg6);
if (arg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
if (arg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateDCA
(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1, jint arg2, jint arg3)
{
jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jint rc;
DEBUG_CALL("CreateDCA\n")
if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
rc = (jint)CreateDCA((LPSTR)lparg0, (LPSTR)lparg1, (LPSTR)arg2, (CONST DEVMODE *)arg3);
if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateDCW
(JNIEnv *env, jclass that, jcharArray arg0, jcharArray arg1, jint arg2, jint arg3)
{
jchar *lparg0=NULL;
jchar *lparg1=NULL;
jint rc;
DEBUG_CALL("CreateDCW\n")
if (arg0) lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL);
if (arg1) lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL);
rc = (jint)CreateDCW((LPWSTR)lparg0, (LPWSTR)lparg1, (LPWSTR)arg2, (CONST DEVMODEW *)arg3);
if (arg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateDIBSection
(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jint arg2, jintArray arg3, jint arg4, jint arg5)
{
jbyte *lparg1=NULL;
jint *lparg3=NULL;
jint rc;
DEBUG_CALL("CreateDIBSection\n")
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
rc = (jint)CreateDIBSection((HDC)arg0, (BITMAPINFO *)lparg1, arg2, (VOID **)lparg3, (HANDLE)arg4, arg5);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateFontIndirectA__Lorg_eclipse_swt_internal_win32_LOGFONT_2
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
LOGFONTA _arg0, *lparg0=NULL;
jint rc;
DEBUG_CALL("CreateFontIndirectA\n")
if (arg0) lparg0 = getLOGFONTAFields(env, arg0, &_arg0, &PGLOB(LOGFONTFc));
rc = (jint)CreateFontIndirectA(lparg0);
if (arg0) setLOGFONTAFields(env, arg0, lparg0, &PGLOB(LOGFONTFc));
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateFontIndirectA__I
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("CreateFontIndirectA\n")
return (jint)CreateFontIndirectA((LPLOGFONTA)arg0);
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateFontIndirectW__Lorg_eclipse_swt_internal_win32_LOGFONT_2
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
LOGFONTW _arg0, *lparg0=NULL;
jint rc;
DEBUG_CALL("CreateFontIndirectW\n")
if (arg0) lparg0 = getLOGFONTWFields(env, arg0, &_arg0, &PGLOB(LOGFONTFc));
rc = (jint)CreateFontIndirectW(lparg0);
if (arg0) setLOGFONTWFields(env, arg0, lparg0, &PGLOB(LOGFONTFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateFontIndirectW__I
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("CreateFontIndirectW\n")
return (jint)CreateFontIndirectW((LPLOGFONTW)arg0);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateIconIndirect
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
ICONINFO _arg0, *lparg0=NULL;
jint rc;
DEBUG_CALL("CreateIconIndirect\n")
if (arg0) lparg0 = getICONINFOFields(env, arg0, &_arg0, &PGLOB(ICONINFOFc));
rc = (jint)CreateIconIndirect(lparg0);
if (arg0) setICONINFOFields(env, arg0, lparg0, &PGLOB(ICONINFOFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateMenu
(JNIEnv *env, jclass that)
{
DEBUG_CALL("CreateMenu\n")
return (jint)CreateMenu();
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreatePalette
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jint rc;
DEBUG_CALL("CreatePalette\n")
if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
rc = (jint)CreatePalette((LOGPALETTE *)lparg0);
if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreatePatternBrush
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("CreatePatternBrush\n")
return (jint)CreatePatternBrush((HBITMAP)arg0);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreatePen
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
DEBUG_CALL("CreatePen\n")
return (jint)CreatePen(arg0, arg1, (COLORREF)arg2);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreatePopupMenu
(JNIEnv *env, jclass that)
{
DEBUG_CALL("CreatePopupMenu\n")
return (jint)CreatePopupMenu();
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateRectRgn
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
{
DEBUG_CALL("CreateRectRgn\n")
return (jint)CreateRectRgn(arg0, arg1, arg2, arg3);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateSolidBrush
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("CreateSolidBrush\n")
return (jint)CreateSolidBrush((COLORREF)arg0);
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateWindowExA
(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jbyteArray arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10, jobject arg11)
{
DECL_GLOB(pGlob)
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
CREATESTRUCT _arg11, *lparg11=NULL;
jint rc;
DEBUG_CALL("CreateWindowExA\n")
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
if (arg2) lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL);
if (arg11) lparg11 = getCREATESTRUCTFields(env, arg11, &_arg11, &PGLOB(CREATESTRUCTFc));
rc = (jint)CreateWindowExA(arg0, (LPSTR)lparg1, (LPSTR)lparg2, arg3, arg4, arg5, arg6, arg7, (HWND)arg8, (HMENU)arg9, (HINSTANCE)arg10, lparg11);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg11) setCREATESTRUCTFields(env, arg11, lparg11, &PGLOB(CREATESTRUCTFc));
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_CreateWindowExW
(JNIEnv *env, jclass that, jint arg0, jcharArray arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10, jobject arg11)
{
DECL_GLOB(pGlob)
jchar *lparg1=NULL;
jchar *lparg2=NULL;
CREATESTRUCT _arg11, *lparg11=NULL;
jint rc;
DEBUG_CALL("CreateWindowExW\n")
if (arg1) lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL);
if (arg2) lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL);
if (arg11) lparg11 = getCREATESTRUCTFields(env, arg11, &_arg11, &PGLOB(CREATESTRUCTFc));
rc = (jint)CreateWindowExW(arg0, (LPWSTR)lparg1, (LPWSTR)lparg2, arg3, arg4, arg5, arg6, arg7, (HWND)arg8, (HMENU)arg9, (HINSTANCE)arg10, lparg11);
if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
if (arg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
if (arg11) setCREATESTRUCTFields(env, arg11, lparg11, &PGLOB(CREATESTRUCTFc));
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_DefWindowProcA
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
{
DEBUG_CALL("DefWindowProcA\n")
return (jint)DefWindowProcA((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_DefWindowProcW
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
{
DEBUG_CALL("DefWindowProcW\n")
return (jint)DefWindowProcW((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)arg3);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_DeferWindowPos
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7)
{
DEBUG_CALL("DeferWindowPos\n")
return (jint)DeferWindowPos((HDWP)arg0, (HWND)arg1, (HWND)arg2, arg3, arg4, arg5, arg6, arg7);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DeleteDC
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("DeleteDC\n")
return (jboolean)DeleteDC((HDC)arg0);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DeleteMenu
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
DEBUG_CALL("DeleteMenu\n")
return (jboolean)DeleteMenu((HMENU)arg0, arg1, arg2);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DeleteObject
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("DeleteObject\n")
return (jboolean)DeleteObject((HGDIOBJ)arg0);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DestroyAcceleratorTable
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("DestroyAcceleratorTable\n")
return (jboolean)DestroyAcceleratorTable((HACCEL)arg0);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DestroyCaret
(JNIEnv *env, jclass that)
{
DEBUG_CALL("DestroyCaret\n")
return (jboolean)DestroyCaret();
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DestroyCursor
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("DestroyCursor\n")
return (jboolean)DestroyCursor((HCURSOR)arg0);
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DestroyIcon
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("DestroyIcon\n")
return (jboolean)DestroyIcon((HICON)arg0);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DestroyMenu
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("DestroyMenu\n")
return (jboolean)DestroyMenu((HMENU)arg0);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DestroyWindow
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("DestroyWindow\n")
return (jboolean)DestroyWindow((HWND)arg0);
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_DispatchMessageA
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
MSG _arg0, *lparg0=NULL;
DEBUG_CALL("DispatchMessageA\n")
if (arg0) lparg0 = getMSGFields(env, arg0, &_arg0, &PGLOB(MSGFc));
return (jint)DispatchMessageA(lparg0);
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_DispatchMessageW
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
MSG _arg0, *lparg0=NULL;
DEBUG_CALL("DispatchMessageW\n")
if (arg0) lparg0 = getMSGFields(env, arg0, &_arg0, &PGLOB(MSGFc));
return (jint)DispatchMessageW(lparg0);
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DragDetect
(JNIEnv *env, jclass that, jint arg0, jobject arg1)
{
DECL_GLOB(pGlob)
POINT _arg1, *lparg1=NULL;
DEBUG_CALL("DragDetect\n")
if (arg1) lparg1 = getPOINTFields(env, arg1, &_arg1, &PGLOB(POINTFc));
return (jboolean)DragDetect((HWND)arg0, *lparg1);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_win32_OS_DragFinish
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("DragFinish\n")
DragFinish((HDROP)arg0);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_DragQueryFileA
(JNIEnv *env, jclass that, jint arg0, jint arg1, jbyteArray arg2, jint arg3)
{
jbyte *lparg2=NULL;
jint rc;
DEBUG_CALL("DragQueryFileA\n")
if (arg2) lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL);
rc = (jint)DragQueryFileA((HDROP)arg0, arg1, (LPTSTR)lparg2, arg3);
if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_DragQueryFileW
(JNIEnv *env, jclass that, jint arg0, jint arg1, jcharArray arg2, jint arg3)
{
jchar *lparg2=NULL;
jint rc;
DEBUG_CALL("DragQueryFileW\n")
if (arg2) lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL);
rc = (jint)DragQueryFileW((HDROP)arg0, arg1, (LPWSTR)lparg2, arg3);
if (arg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DrawEdge
(JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2, jint arg3)
{
DECL_GLOB(pGlob)
RECT _arg1, *lparg1=NULL;
jboolean rc;
DEBUG_CALL("DrawEdge\n")
if (arg1) lparg1 = getRECTFields(env, arg1, &_arg1, &PGLOB(RECTFc));
rc = (jboolean)DrawEdge((HDC)arg0, lparg1, arg2, arg3);
if (arg1) setRECTFields(env, arg1, lparg1, &PGLOB(RECTFc));
return rc;
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DrawFocusRect
(JNIEnv *env, jclass that, jint arg0, jobject arg1)
{
DECL_GLOB(pGlob)
RECT _arg1, *lparg1=NULL;
jboolean rc;
DEBUG_CALL("DrawFocusRect\n")
if (arg1) lparg1 = getRECTFields(env, arg1, &_arg1, &PGLOB(RECTFc));
rc = (jboolean)DrawFocusRect((HDC)arg0, lparg1);
if (arg1) setRECTFields(env, arg1, lparg1, &PGLOB(RECTFc));
return rc;
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DrawFrameControl
(JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2, jint arg3)
{
DECL_GLOB(pGlob)
RECT _arg1, *lparg1=NULL;
jboolean rc;
DEBUG_CALL("DrawFrameControl\n")
if (arg1) lparg1 = getRECTFields(env, arg1, &_arg1, &PGLOB(RECTFc));
rc = (jboolean)DrawFrameControl((HDC)arg0, lparg1, arg2, arg3);
if (arg1) setRECTFields(env, arg1, lparg1, &PGLOB(RECTFc));
return rc;
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DrawIconEx
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
{
DEBUG_CALL("DrawIconEx\n")
return (jboolean)DrawIconEx((HDC)arg0, arg1, arg2, (HICON)arg3, arg4, arg5, arg6, (HBRUSH)arg7, arg8);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DrawMenuBar
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("DrawMenuBar\n")
return (jboolean)DrawMenuBar((HWND)arg0);
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DrawStateA
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9)
{
DEBUG_CALL("DrawStateA\n")
return (jboolean)DrawStateA((HDC)arg0, (HBRUSH)arg1, (DRAWSTATEPROC)arg2, (LPARAM)arg3, (WPARAM)arg4, arg5, arg6, arg7, arg8, arg9);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_DrawStateW
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9)
{
DEBUG_CALL("DrawStateW\n")
return (jboolean)DrawStateW((HDC)arg0, (HBRUSH)arg1, (DRAWSTATEPROC)arg2, (LPARAM)arg3, (WPARAM)arg4, arg5, arg6, arg7, arg8, arg9);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_DrawTextA
(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jint arg2, jobject arg3, jint arg4)
{
DECL_GLOB(pGlob)
jbyte *lparg1=NULL;
RECT _arg3, *lparg3=NULL;
jint rc;
DEBUG_CALL("DrawTextA\n")
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
if (arg3) lparg3 = getRECTFields(env, arg3, &_arg3, &PGLOB(RECTFc));
rc = (jint)DrawTextA((HDC)arg0, (LPSTR)lparg1, arg2, lparg3, arg4);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg3) setRECTFields(env, arg3, lparg3, &PGLOB(RECTFc));
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_DrawTextW
(JNIEnv *env, jclass that, jint arg0, jcharArray arg1, jint arg2, jobject arg3, jint arg4)
{
DECL_GLOB(pGlob)
jchar *lparg1=NULL;
RECT _arg3, *lparg3=NULL;
jint rc;
DEBUG_CALL("DrawTextW\n")
if (arg1) lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL);
if (arg3) lparg3 = getRECTFields(env, arg3, &_arg3, &PGLOB(RECTFc));
rc = (jint)DrawTextW((HDC)arg0, (LPWSTR)lparg1, arg2, lparg3, arg4);
if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
if (arg3) setRECTFields(env, arg3, lparg3, &PGLOB(RECTFc));
return rc;
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_Ellipse
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
{
DEBUG_CALL("Ellipse\n")
return (jboolean)Ellipse((HDC)arg0, arg1, arg2, arg3, arg4);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_EnableMenuItem
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
DEBUG_CALL("EnableMenuItem\n")
return (jboolean)EnableMenuItem((HMENU)arg0, arg1, arg2);
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_EnableScrollBar
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
DEBUG_CALL("EnableScrollBar\n")
return (jboolean)EnableScrollBar((HWND)arg0, arg1, arg2);
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_EnableWindow
(JNIEnv *env, jclass that, jint arg0, jboolean arg1)
{
DEBUG_CALL("EnableWindow\n")
return (jboolean)EnableWindow((HWND)arg0, arg1);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_EndDeferWindowPos
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("EndDeferWindowPos\n")
return (jboolean)EndDeferWindowPos((HDWP)arg0);
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_EndDoc
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("EndDoc\n")
return (jint)EndDoc((HDC)arg0);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_EndPage
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("EndPage\n")
return (jint)EndPage((HDC)arg0);
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_EndPaint
(JNIEnv *env, jclass that, jint arg0, jobject arg1)
{
DECL_GLOB(pGlob)
PAINTSTRUCT _arg1, *lparg1=NULL;
DEBUG_CALL("EndPaint\n")
if (arg1) lparg1 = getPAINTSTRUCTFields(env, arg1, &_arg1, &PGLOB(PAINTSTRUCTFc));
return (jint)EndPaint((HWND)arg0, lparg1);
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_EnumFontFamiliesA
(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jint arg2, jint arg3)
{
jbyte *lparg1=NULL;
jint rc;
DEBUG_CALL("EnumFontFamiliesA\n")
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
rc = (jint)EnumFontFamiliesA((HDC)arg0, (LPSTR)lparg1, (FONTENUMPROC)arg2, (LPARAM)arg3);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
return rc;
}
#endif // _WIN32_WCE
#ifdef _WIN32_WCE
#define FONTENUMPROCW FONTENUMPROC
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_EnumFontFamiliesW
(JNIEnv *env, jclass that, jint arg0, jcharArray arg1, jint arg2, jint arg3)
{
jchar *lparg1=NULL;
jint rc;
DEBUG_CALL("EnumFontFamiliesW\n")
if (arg1) lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL);
rc = (jint)EnumFontFamiliesW((HDC)arg0, (LPCWSTR)lparg1, (FONTENUMPROCW)arg2, (LPARAM)arg3);
if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_EnumSystemLocalesA
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
DEBUG_CALL("EnumSystemLocalesA\n")
return (jboolean)EnumSystemLocalesA((LOCALE_ENUMPROCA)arg0, arg1);
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_EnumSystemLocalesW
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
DEBUG_CALL("EnumSystemLocalesW\n")
return (jboolean)EnumSystemLocalesW((LOCALE_ENUMPROCW)arg0, arg1);
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_EqualRgn
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
DEBUG_CALL("EqualRgn\n")
return (jboolean)EqualRgn((HRGN)arg0, (HRGN)arg1);
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_ExtTextOutA
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jobject arg4, jbyteArray arg5, jint arg6, jintArray arg7)
{
DECL_GLOB(pGlob)
RECT _arg4, *lparg4=NULL;
jbyte *lparg5=NULL;
jint *lparg7=NULL;
jboolean rc;
DEBUG_CALL("ExtTextOutA\n")
if (arg4) lparg4 = getRECTFields(env, arg4, &_arg4, &PGLOB(RECTFc));
if (arg5) lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL);
if (arg7) lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL);
rc = (jboolean)ExtTextOutA((HDC)arg0, arg1, arg2, arg3, lparg4, (LPSTR)lparg5, arg6, (CONST INT*)lparg7);
if (arg4) setRECTFields(env, arg4, &_arg4, &PGLOB(RECTFc));
if (arg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
if (arg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_ExtTextOutW
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jobject arg4, jcharArray arg5, jint arg6, jintArray arg7)
{
DECL_GLOB(pGlob)
RECT _arg4, *lparg4=NULL;
jchar *lparg5=NULL;
jint *lparg7=NULL;
jboolean rc;
DEBUG_CALL("ExtTextOutW\n")
if (arg4) lparg4 = getRECTFields(env, arg4, &_arg4, &PGLOB(RECTFc));
if (arg5) lparg5 = (*env)->GetCharArrayElements(env, arg5, NULL);
if (arg7) lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL);
rc = (jboolean)ExtTextOutW((HDC)arg0, arg1, arg2, arg3, lparg4, (LPWSTR)lparg5, arg6, (CONST INT*)lparg7);
if (arg4) setRECTFields(env, arg4, &_arg4, &PGLOB(RECTFc));
if (arg5) (*env)->ReleaseCharArrayElements(env, arg5, lparg5, 0);
if (arg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0);
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_ExtractIconExA
(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1, jintArray arg2, jintArray arg3, jint arg4)
{
jbyte *lparg0=NULL;
jint *lparg2=NULL;
jint *lparg3=NULL;
jint rc;
DEBUG_CALL("ExtractIconExA\n")
if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
rc = (jint)ExtractIconExA((LPSTR)lparg0, arg1, (HICON FAR *)lparg2, (HICON FAR *)lparg3, arg4);
if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_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;
DEBUG_CALL("ExtractIconExW\n")
if (arg0) lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL);
if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
rc = (jint)ExtractIconExW((LPWSTR)lparg0, arg1, (HICON FAR *)lparg2, (HICON FAR *)lparg3, arg4);
if (arg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_FillRect
(JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2)
{
DECL_GLOB(pGlob)
RECT _arg1, *lparg1=NULL;
jint rc;
DEBUG_CALL("FillRect\n")
if (arg1) lparg1 = getRECTFields(env, arg1, &_arg1, &PGLOB(RECTFc));
rc = (jint)FillRect((HDC)arg0, lparg1, (HBRUSH)arg2);
if (arg1) setRECTFields(env, arg1, lparg1, &PGLOB(RECTFc));
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_FindWindowA
(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1)
{
jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jint rc;
DEBUG_CALL("FindWindowA\n")
if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
rc = (jint)FindWindowA((LPSTR)lparg0, (LPSTR)lparg1);
if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_FindWindowW
(JNIEnv *env, jclass that, jcharArray arg0, jcharArray arg1)
{
jchar *lparg0=NULL;
jchar *lparg1=NULL;
jint rc;
DEBUG_CALL("FindWindowW\n")
if (arg0) lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL);
if (arg1) lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL);
rc = (jint)FindWindowW((LPWSTR)lparg0, (LPWSTR)lparg1);
if (arg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
return rc;
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_FreeLibrary
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("FreeLibrary\n")
return (jboolean)FreeLibrary((HMODULE)arg0);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetACP
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetACP\n")
return (jint)GetACP();
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetActiveWindow
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetActiveWindow\n")
return (jint)GetActiveWindow();
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetBkColor
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("GetBkColor\n")
return (jint)GetBkColor((HDC)arg0);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCapture
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetCapture\n")
return (jint)GetCapture();
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCaretPos
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
POINT _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("GetCaretPos\n")
if (arg0) lparg0 = getPOINTFields(env, arg0, &_arg0, &PGLOB(POINTFc));
rc = (jboolean)GetCaretPos(lparg0);
if (arg0) setPOINTFields(env, arg0, lparg0, &PGLOB(POINTFc));
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCharABCWidthsA
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3)
{
jint *lparg3=NULL;
jboolean rc;
DEBUG_CALL("GetCharABCWidthsA\n")
if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
rc = (jboolean)GetCharABCWidthsA((HDC)arg0, arg1, arg2, (LPABC)lparg3);
if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCharABCWidthsW
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3)
{
jint *lparg3=NULL;
jboolean rc;
DEBUG_CALL("GetCharABCWidthsW\n")
if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
rc = (jboolean)GetCharABCWidthsW((HDC)arg0, arg1, arg2, (LPABC)lparg3);
if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCharWidthA
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3)
{
jint *lparg3=NULL;
jboolean rc;
DEBUG_CALL("GetCharWidthA\n")
if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
rc = (jboolean)GetCharWidthA((HDC)arg0, arg1, arg2, (LPINT)lparg3);
if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCharWidthW
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3)
{
jint *lparg3=NULL;
jboolean rc;
DEBUG_CALL("GetCharWidthW\n")
if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
rc = (jboolean)GetCharWidthW((HDC)arg0, arg1, arg2, (LPINT)lparg3);
if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCharacterPlacementA
(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jint arg2, jint arg3, jobject arg4, jint arg5)
{
DECL_GLOB(pGlob)
jbyte *lparg1=NULL;
GCP_RESULTS _arg4, *lparg4=NULL;
jint rc;
DEBUG_CALL("GetCharacterPlacementA\n")
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
if (arg4) lparg4 = getGCP_RESULTSFields(env, arg4, &_arg4, &PGLOB(GCP_RESULTSFc));
rc = (jint)GetCharacterPlacementA((HDC)arg0, (LPSTR)lparg1, arg2, arg3, lparg4, arg5);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg4) setGCP_RESULTSFields(env, arg4, lparg4, &PGLOB(GCP_RESULTSFc));
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCharacterPlacementW
(JNIEnv *env, jclass that, jint arg0, jcharArray arg1, jint arg2, jint arg3, jobject arg4, jint arg5)
{
DECL_GLOB(pGlob)
jchar *lparg1=NULL;
GCP_RESULTS _arg4, *lparg4=NULL;
jint rc;
DEBUG_CALL("GetCharacterPlacementW\n")
if (arg1) lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL);
if (arg4) lparg4 = getGCP_RESULTSFields(env, arg4, &_arg4, &PGLOB(GCP_RESULTSFc));
rc = (jint)GetCharacterPlacementW((HDC)arg0, (LPWSTR)lparg1, arg2, arg3, (LPGCP_RESULTSW)lparg4, arg5);
if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
if (arg4) setGCP_RESULTSFields(env, arg4, lparg4, &PGLOB(GCP_RESULTSFc));
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetClassInfoA
(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jobject arg2)
{
DECL_GLOB(pGlob)
jbyte *lparg1=NULL;
WNDCLASS _arg2, *lparg2=NULL;
jboolean rc;
DEBUG_CALL("GetClassInfoA\n")
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
if (arg2) lparg2 = getWNDCLASSFields(env, arg2, &_arg2, &PGLOB(WNDCLASSFc));
rc = (jboolean)GetClassInfoA((HINSTANCE)arg0, (LPSTR)lparg1, lparg2);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg2) setWNDCLASSFields(env, arg2, lparg2, &PGLOB(WNDCLASSFc));
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetClassInfoW
(JNIEnv *env, jclass that, jint arg0, jcharArray arg1, jobject arg2)
{
DECL_GLOB(pGlob)
jchar *lparg1=NULL;
WNDCLASS _arg2, *lparg2=NULL;
jboolean rc;
DEBUG_CALL("GetClassInfoW\n")
if (arg1) lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL);
if (arg2) lparg2 = getWNDCLASSFields(env, arg2, &_arg2, &PGLOB(WNDCLASSFc));
rc = (jboolean)GetClassInfoW((HINSTANCE)arg0, (LPWSTR)lparg1, (LPWNDCLASSW)lparg2);
if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
if (arg2) setWNDCLASSFields(env, arg2, lparg2, &PGLOB(WNDCLASSFc));
return rc;
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetClientRect
(JNIEnv *env, jclass that, jint arg0, jobject arg1)
{
DECL_GLOB(pGlob)
RECT _arg1, *lparg1=NULL;
jboolean rc;
DEBUG_CALL("GetClientRect\n")
if (arg1) lparg1 = getRECTFields(env, arg1, &_arg1, &PGLOB(RECTFc));
rc = (jboolean)GetClientRect((HWND)arg0, lparg1);
if (arg1) setRECTFields(env, arg1, lparg1, &PGLOB(RECTFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetClipBox
(JNIEnv *env, jclass that, jint arg0, jobject arg1)
{
DECL_GLOB(pGlob)
RECT _arg1, *lparg1=NULL;
jint rc;
DEBUG_CALL("GetClipBox\n")
if (arg1) lparg1 = getRECTFields(env, arg1, &_arg1, &PGLOB(RECTFc));
rc = (jint)GetClipBox((HDC)arg0, lparg1);
if (arg1) setRECTFields(env, arg1, lparg1, &PGLOB(RECTFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetClipRgn
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
DEBUG_CALL("GetClipRgn\n")
return (jint)GetClipRgn((HDC)arg0, (HRGN)arg1);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetClipboardData
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("GetClipboardData\n")
return (jint)GetClipboardData(arg0);
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetClipboardFormatNameA
(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jint arg2)
{
jbyte *lparg1=NULL;
jint rc;
DEBUG_CALL("GetClipboardFormatNameA\n")
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
rc = (jint)GetClipboardFormatNameA(arg0, (LPTSTR)lparg1, arg2);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetClipboardFormatNameW
(JNIEnv *env, jclass that, jint arg0, jcharArray arg1, jint arg2)
{
jchar *lparg1=NULL;
jint rc;
DEBUG_CALL("GetClipboardFormatNameW\n")
if (arg1) lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL);
rc = (jint)GetClipboardFormatNameW(arg0, (LPWSTR)lparg1, arg2);
if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCurrentObject
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
DEBUG_CALL("GetCurrentObject\n")
return (jint)GetCurrentObject((HDC)arg0, arg1);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCurrentProcessId
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetCurrentProcessId\n")
return (jint)GetCurrentProcessId();
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCurrentThreadId
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetCurrentThreadId\n")
return (jint)GetCurrentThreadId();
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCursor
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetCursor\n")
return (jint)GetCursor();
}
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetCursorPos
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
POINT _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("GetCursorPos\n")
if (arg0) lparg0 = getPOINTFields(env, arg0, &_arg0, &PGLOB(POINTFc));
rc = (jboolean)GetCursorPos(lparg0);
if (arg0) setPOINTFields(env, arg0, lparg0, &PGLOB(POINTFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetDC
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("GetDC\n")
return (jint)GetDC((HWND)arg0);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetDCEx
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
DEBUG_CALL("GetDCEx\n")
return (jint)GetDCEx((HWND)arg0, (HRGN)arg1, arg2);
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetDIBColorTable
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jbyteArray arg3)
{
jbyte *lparg3=NULL;
jint rc;
DEBUG_CALL("GetDIBColorTable\n")
if (arg3) lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL);
rc = (jint)GetDIBColorTable((HDC)arg0, arg1, arg2, (RGBQUAD *)lparg3);
if (arg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetDIBits
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jbyteArray arg5, jint arg6)
{
jbyte *lparg5=NULL;
jint rc;
DEBUG_CALL("GetDIBits\n")
if (arg5) lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL);
rc = (jint)GetDIBits((HDC)arg0, (HBITMAP)arg1, arg2, arg3, (LPVOID)arg4, (LPBITMAPINFO)lparg5, arg6);
if (arg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetDesktopWindow
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetDesktopWindow\n")
return (jint)GetDesktopWindow();
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetDeviceCaps
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
DEBUG_CALL("GetDeviceCaps\n")
return (jint)GetDeviceCaps((HDC)arg0, arg1);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetDialogBaseUnits
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetDialogBaseUnits\n")
return (jint)GetDialogBaseUnits();
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetDlgItem
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
DEBUG_CALL("GetDlgItem\n")
return (jint)GetDlgItem((HWND)arg0, arg1);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetDoubleClickTime
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetDoubleClickTime\n")
return (jint)GetDoubleClickTime();
}
#ifndef _WIN32_WCE
JNIEXPORT jshort JNICALL Java_org_eclipse_swt_internal_win32_OS_GetFileTitleA
(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1, jshort arg2)
{
jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jshort rc;
DEBUG_CALL("GetFileTitleA\n")
if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
rc = (jshort)GetFileTitleA((LPSTR)lparg0, (LPSTR)lparg1, arg2);
if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jshort JNICALL Java_org_eclipse_swt_internal_win32_OS_GetFileTitleW
(JNIEnv *env, jclass that, jcharArray arg0, jcharArray arg1, jshort arg2)
{
jchar *lparg0=NULL;
jchar *lparg1=NULL;
jshort rc;
DEBUG_CALL("GetFileTitleW\n")
if (arg0) lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL);
if (arg1) lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL);
rc = (jshort)GetFileTitleW((LPWSTR)lparg0, (LPWSTR)lparg1, arg2);
if (arg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
if (arg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetFocus
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetFocus\n")
return (jint)GetFocus();
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetFontLanguageInfo
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("GetFontLanguageInfo\n")
return (jint)GetFontLanguageInfo((HDC)arg0);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetIconInfo
(JNIEnv *env, jclass that, jint arg0, jobject arg1)
{
DECL_GLOB(pGlob)
ICONINFO _arg1, *lparg1=NULL;
jboolean rc;
DEBUG_CALL("GetIconInfo\n")
if (arg1) lparg1 = getICONINFOFields(env, arg1, &_arg1, &PGLOB(ICONINFOFc));
rc = (jboolean)GetIconInfo((HICON)arg0, lparg1);
if (arg1) setICONINFOFields(env, arg1, lparg1, &PGLOB(ICONINFOFc));
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jshort JNICALL Java_org_eclipse_swt_internal_win32_OS_GetKeyState
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("GetKeyState\n")
return (jshort)GetKeyState(arg0);
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetKeyboardLayout
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("GetKeyboardLayout\n")
return (jint)GetKeyboardLayout(arg0);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetKeyboardLayoutList
(JNIEnv *env, jclass that, jint arg0, jintArray arg1)
{
jint *lparg1=NULL;
jint rc;
DEBUG_CALL("GetKeyboardLayoutList\n")
if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
rc = (jint)GetKeyboardLayoutList(arg0, (HKL FAR *)lparg1);
if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetKeyboardState
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jboolean rc;
DEBUG_CALL("GetKeyboardState\n")
if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
rc = (jboolean)GetKeyboardState((PBYTE)lparg0);
if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetLastActivePopup
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("GetLastActivePopup\n")
return (jint)GetLastActivePopup((HWND)arg0);
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetLastError
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetLastError\n")
return (jint)GetLastError();
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetLibraryHandle
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetLibraryHandle\n")
return (jint)g_hInstance;
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetLocaleInfoA
(JNIEnv *env, jclass that, jint arg0, jint arg1, jbyteArray arg2, jint arg3)
{
jbyte *lparg2=NULL;
jint rc;
DEBUG_CALL("GetLocaleInfoA\n")
if (arg2) lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL);
rc = (jint)GetLocaleInfoA(arg0, arg1, (LPSTR)lparg2, arg3);
if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetLocaleInfoW
(JNIEnv *env, jclass that, jint arg0, jint arg1, jcharArray arg2, jint arg3)
{
jchar *lparg2=NULL;
jint rc;
DEBUG_CALL("GetLocaleInfoW\n")
if (arg2) lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL);
rc = (jint)GetLocaleInfoW(arg0, arg1, (LPWSTR)lparg2, arg3);
if (arg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetMenu
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("GetMenu\n")
return (jint)GetMenu((HWND)arg0);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetMenuDefaultItem
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
DEBUG_CALL("GetMenuDefaultItem\n")
return (jint)GetMenuDefaultItem((HMENU)arg0, arg1, arg2);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetMenuInfo
(JNIEnv *env, jclass that, jint arg0, jobject arg1)
{
DECL_GLOB(pGlob)
MENUINFO _arg1, *lparg1=NULL;
jboolean rc = (jboolean)FALSE;
HMODULE hm;
FARPROC fp;
DEBUG_CALL("GetMenuInfo\n")
/*
* GetMenuInfo is a Win2000 and Win98 specific call
* If you link it into swt.dll a system modal entry point not found dialog will
* appear as soon as swt.dll is loaded. Here we check for the entry point and
* only do the call if it exists.
*/
if ((hm=GetModuleHandle("user32.dll")) && (fp=GetProcAddress(hm, "GetMenuInfo"))) {
if (arg1) lparg1 = getMENUINFOFields(env, arg1, &_arg1, &PGLOB(MENUINFOFc));
rc = (jboolean) (fp)((HMENU)arg0, lparg1);
// rc = (jboolean)GetMenuInfo(arg0, lparg1);
if (arg1) setMENUINFOFields(env, arg1, lparg1, &PGLOB(MENUINFOFc));
}
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetMenuItemCount
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("GetMenuItemCount\n")
return (jint)GetMenuItemCount((HMENU)arg0);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetMenuItemInfoA
(JNIEnv *env, jclass that, jint arg0, jint arg1, jboolean arg2, jobject arg3)
{
DECL_GLOB(pGlob)
MENUITEMINFO _arg3, *lparg3=NULL;
jboolean rc;
DEBUG_CALL("GetMenuItemInfoA\n")
if (arg3) lparg3 = getMENUITEMINFOFields(env, arg3, &_arg3, &PGLOB(MENUITEMINFOFc));
rc = (jboolean)GetMenuItemInfoA((HMENU)arg0, arg1, arg2, lparg3);
if (arg3) setMENUITEMINFOFields(env, arg3, lparg3, &PGLOB(MENUITEMINFOFc));
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetMenuItemInfoW
(JNIEnv *env, jclass that, jint arg0, jint arg1, jboolean arg2, jobject arg3)
{
DECL_GLOB(pGlob)
MENUITEMINFO _arg3, *lparg3=NULL;
jboolean rc;
DEBUG_CALL("GetMenuItemInfoW\n")
if (arg3) lparg3 = getMENUITEMINFOFields(env, arg3, &_arg3, &PGLOB(MENUITEMINFOFc));
rc = (jboolean)GetMenuItemInfoW((HMENU)arg0, arg1, arg2, (LPMENUITEMINFOW)lparg3);
if (arg3) setMENUITEMINFOFields(env, arg3, lparg3, &PGLOB(MENUITEMINFOFc));
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetMessageA
(JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2, jint arg3)
{
DECL_GLOB(pGlob)
MSG _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("GetMessageA\n")
if (arg0) lparg0 = getMSGFields(env, arg0, &_arg0, &PGLOB(MSGFc));
rc = (jboolean)GetMessageA(lparg0, (HWND)arg1, arg2, arg3);
if (arg0) setMSGFields(env, arg0, lparg0, &PGLOB(MSGFc));
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetMessagePos
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetMessagePos\n")
return (jint)GetMessagePos();
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetMessageTime
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetMessageTime\n")
return (jint)GetMessageTime();
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetMessageW
(JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2, jint arg3)
{
DECL_GLOB(pGlob)
MSG _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("GetMessageW\n")
if (arg0) lparg0 = getMSGFields(env, arg0, &_arg0, &PGLOB(MSGFc));
rc = (jboolean)GetMessageW(lparg0, (HWND)arg1, arg2, arg3);
if (arg0) setMSGFields(env, arg0, lparg0, &PGLOB(MSGFc));
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetModuleHandleA
(JNIEnv *env, jclass that, jbyteArray arg0)
{
jbyte *lparg0=NULL;
jint rc;
DEBUG_CALL("GetModuleHandleA\n")
if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
rc = (jint)GetModuleHandleA((LPSTR)lparg0);
if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetModuleHandleW
(JNIEnv *env, jclass that, jcharArray arg0)
{
jchar *lparg0=NULL;
jint rc;
DEBUG_CALL("GetModuleHandleW\n")
if (arg0) lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL);
rc = (jint)GetModuleHandleW((LPWSTR)lparg0);
if (arg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetNearestPaletteIndex
(JNIEnv *env, jclass that, jint arg0, jint arg1)
{
DEBUG_CALL("GetNearestPaletteIndex\n")
return (jint)GetNearestPaletteIndex((HPALETTE)arg0, (COLORREF)arg1);
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGPEN_2
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
DECL_GLOB(pGlob)
LOGPEN _arg2, *lparg2=NULL;
jint rc;
DEBUG_CALL("GetObjectA\n")
if (arg2) lparg2 = getLOGPENFields(env, arg2, &_arg2, &PGLOB(LOGPENFc));
rc = (jint)GetObjectA((HGDIOBJ)arg0, arg1, lparg2);
if (arg2) setLOGPENFields(env, arg2, lparg2, &PGLOB(LOGPENFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGFONT_2
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
DECL_GLOB(pGlob)
LOGFONTA _arg2, *lparg2=NULL;
jint rc;
DEBUG_CALL("GetObjectA\n")
if (arg2) lparg2 = getLOGFONTAFields(env, arg2, &_arg2, &PGLOB(LOGFONTFc));
rc = (jint)GetObjectA((HGDIOBJ)arg0, arg1, lparg2);
if (arg2) setLOGFONTAFields(env, arg2, lparg2, &PGLOB(LOGFONTFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
DECL_GLOB(pGlob)
LOGBRUSH _arg2, *lparg2=NULL;
jint rc;
DEBUG_CALL("GetObjectA\n")
if (arg2) lparg2 = getLOGBRUSHFields(env, arg2, &_arg2, &PGLOB(LOGBRUSHFc));
rc = (jint)GetObjectA((HGDIOBJ)arg0, arg1, lparg2);
if (arg2) setLOGBRUSHFields(env, arg2, lparg2, &PGLOB(LOGBRUSHFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetObjectA__IILorg_eclipse_swt_internal_win32_DIBSECTION_2
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
DECL_GLOB(pGlob)
DIBSECTION _arg2, *lparg2=NULL;
jint rc;
DEBUG_CALL("GetObjectA\n")
if (arg2) lparg2 = getDIBSECTIONFields(env, arg2, &_arg2, &PGLOB(DIBSECTIONFc));
rc = (jint)GetObjectA((HGDIOBJ)arg0, arg1, lparg2);
if (arg2) setDIBSECTIONFields(env, arg2, lparg2, &PGLOB(DIBSECTIONFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetObjectA__IILorg_eclipse_swt_internal_win32_BITMAP_2
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
DECL_GLOB(pGlob)
BITMAP _arg2, *lparg2=NULL;
jint rc;
DEBUG_CALL("GetObjectA\n")
if (arg2) lparg2 = getBITMAPFields(env, arg2, &_arg2, &PGLOB(BITMAPFc));
rc = (jint)GetObjectA((HGDIOBJ)arg0, arg1, lparg2);
if (arg2) setBITMAPFields(env, arg2, lparg2, &PGLOB(BITMAPFc));
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGPEN_2
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
DECL_GLOB(pGlob)
LOGPEN _arg2, *lparg2=NULL;
jint rc;
DEBUG_CALL("GetObjectW\n")
if (arg2) lparg2 = getLOGPENFields(env, arg2, &_arg2, &PGLOB(LOGPENFc));
rc = (jint)GetObjectW((HGDIOBJ)arg0, arg1, lparg2);
if (arg2) setLOGPENFields(env, arg2, lparg2, &PGLOB(LOGPENFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGFONT_2
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
DECL_GLOB(pGlob)
LOGFONTW _arg2, *lparg2=NULL;
jint rc;
DEBUG_CALL("GetObjectW\n")
if (arg2) lparg2 = getLOGFONTWFields(env, arg2, &_arg2, &PGLOB(LOGFONTFc));
rc = (jint)GetObjectW((HGDIOBJ)arg0, arg1, lparg2);
if (arg2) setLOGFONTWFields(env, arg2, lparg2, &PGLOB(LOGFONTFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
DECL_GLOB(pGlob)
LOGBRUSH _arg2, *lparg2=NULL;
jint rc;
DEBUG_CALL("GetObjectW\n")
if (arg2) lparg2 = getLOGBRUSHFields(env, arg2, &_arg2, &PGLOB(LOGBRUSHFc));
rc = (jint)GetObjectW((HGDIOBJ)arg0, arg1, lparg2);
if (arg2) setLOGBRUSHFields(env, arg2, lparg2, &PGLOB(LOGBRUSHFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetObjectW__IILorg_eclipse_swt_internal_win32_DIBSECTION_2
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
DECL_GLOB(pGlob)
DIBSECTION _arg2, *lparg2=NULL;
jint rc;
DEBUG_CALL("GetObjectW\n")
if (arg2) lparg2 = getDIBSECTIONFields(env, arg2, &_arg2, &PGLOB(DIBSECTIONFc));
rc = (jint)GetObjectW((HGDIOBJ)arg0, arg1, lparg2);
if (arg2) setDIBSECTIONFields(env, arg2, lparg2, &PGLOB(DIBSECTIONFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetObjectW__IILorg_eclipse_swt_internal_win32_BITMAP_2
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
{
DECL_GLOB(pGlob)
BITMAP _arg2, *lparg2=NULL;
jint rc;
DEBUG_CALL("GetObjectW\n")
if (arg2) lparg2 = getBITMAPFields(env, arg2, &_arg2, &PGLOB(BITMAPFc));
rc = (jint)GetObjectW((HGDIOBJ)arg0, arg1, lparg2);
if (arg2) setBITMAPFields(env, arg2, lparg2, &PGLOB(BITMAPFc));
return rc;
}
#ifndef _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetOpenFileNameA
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
OPENFILENAME _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("GetOpenFileNameA\n")
if (arg0) lparg0 = getOPENFILENAMEFields(env, arg0, &_arg0, &PGLOB(OPENFILENAMEFc));
rc = (jboolean)GetOpenFileNameA(lparg0);
if (arg0) setOPENFILENAMEFields(env, arg0, lparg0, &PGLOB(OPENFILENAMEFc));
return rc;
}
#endif // _WIN32_WCE
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_GetOpenFileNameW
(JNIEnv *env, jclass that, jobject arg0)
{
DECL_GLOB(pGlob)
OPENFILENAME _arg0, *lparg0=NULL;
jboolean rc;
DEBUG_CALL("GetOpenFileNameW\n")
if (arg0) lparg0 = getOPENFILENAMEFields(env, arg0, &_arg0, &PGLOB(OPENFILENAMEFc));
rc = (jboolean)GetOpenFileNameW((LPOPENFILENAMEW)lparg0);
if (arg0) setOPENFILENAMEFields(env, arg0, lparg0, &PGLOB(OPENFILENAMEFc));
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetPaletteEntries
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jbyteArray arg3)
{
jbyte *lparg3=NULL;
jint rc;
DEBUG_CALL("GetPaletteEntries\n")
if (arg3) lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL);
rc = (jint)GetPaletteEntries((HPALETTE)arg0, arg1, arg2, (LPPALETTEENTRY)lparg3);
if (arg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetParent
(JNIEnv *env, jclass that, jint arg0)
{
DEBUG_CALL("GetParent\n")
return (jint)GetParent((HWND)arg0);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetPixel
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
DEBUG_CALL("GetPixel\n")
return (jint)GetPixel((HDC)arg0, arg1, arg2);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetProcAddress
(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1)
{
jbyte *lparg1=NULL;
jint rc;
DEBUG_CALL("GetProcAddress\n")
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
rc = (jint)GetProcAddress((HMODULE)arg0, (LPCTSTR)lparg1);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
return rc;
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetProcessHeap
(JNIEnv *env, jclass that)
{
DEBUG_CALL("GetProcessHeap\n")
return (jint)GetProcessHeap();
}
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetProfileStringA
(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1, jbyteArray arg2, jbyteArray arg3, jint arg4)
{
jbyte *lparg0=NULL;
jbyte *lparg1=NULL;
jbyte *lparg2=NULL;
jbyte *lparg3=NULL;
jint rc;
DEBUG_CALL("GetProfileStringA\n")
if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
if (arg1) lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL);
if (arg2) lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL);
if (arg3) lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL);
rc = (jint)GetProfileStringA((LPSTR)lparg0, (LPSTR)lparg1, (LPSTR)lparg2, (LPSTR)lparg3, arg4);
if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
if (arg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
if (arg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
return rc;
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_GetProfileStringW
(JNIEnv *env, jclass that, jcharArray arg0, jcharArray arg1, jcharArray arg2, jcharArray arg3, jint arg4)
{
jchar *lparg0=NULL;
jchar *lparg1=NULL;
jchar *lparg2=NULL;
jchar *lparg3=NULL;
jint rc;
DEBUG_CALL("GetProfileStringW\n")