blob: ff4f52aa6cfb90b79cebe8cf156a01fca70132e5 [file] [log] [blame]
/*
* (c) Copyright IBM Corp., 2000, 2001
* All Rights Reserved.
*/
/**
* JNI SWT object field getters and setters declarations for Windows structs
*/
#include "swt.h"
#include "structs.h"
/* Win32 globals */
ACCEL_FID_CACHE ACCELFc;
BITMAP_FID_CACHE BITMAPFc;
CHOOSECOLOR_FID_CACHE CHOOSECOLORFc;
COMPOSITIONFORM_FID_CACHE COMPOSITIONFORMFc;
CREATESTRUCT_FID_CACHE CREATESTRUCTFc;
DIBSECTION_FID_CACHE DIBSECTIONFc;
DLLVERSIONINFO_FID_CACHE DLLVERSIONINFOFc;
DRAWITEMSTRUCT_FID_CACHE DRAWITEMSTRUCTFc;
FILETIME_FID_CACHE FILETIMEFc;
HDITEM_FID_CACHE HDITEMFc;
ICONINFO_FID_CACHE ICONINFOFc;
INITCOMMONCONTROLSEX_FID_CACHE INITCOMMONCONTROLSEXFc;
LOGBRUSH_FID_CACHE LOGBRUSHFc;
LOGFONT_FID_CACHE LOGFONTFc;
LOGPEN_FID_CACHE LOGPENFc;
LVCOLUMN_FID_CACHE LVCOLUMNFc;
LVHITTESTINFO_FID_CACHE LVHITTESTINFOFc;
LVITEM_FID_CACHE LVITEMFc;
MEASUREITEMSTRUCT_FID_CACHE MEASUREITEMSTRUCTFc;
MENUITEMINFO_FID_CACHE MENUITEMINFOFc;
MSG_FID_CACHE MSGFc;
NMHDR_FID_CACHE NMHDRFc;
NMHEADER_FID_CACHE NMHEADERFc;
NMLISTVIEW_FID_CACHE NMLISTVIEWFc;
NMTOOLBAR_FID_CACHE NMTOOLBARFc;
OPENFILENAME_FID_CACHE OPENFILENAMEFc;
OSVERSIONINFO_FID_CACHE OSVERSIONINFOFc;
PAINTSTRUCT_FID_CACHE PAINTSTRUCTFc;
POINT_FID_CACHE POINTFc;
REBARBANDINFO_FID_CACHE REBARBANDINFOFc;
RECT_FID_CACHE RECTFc;
SCROLLINFO_FID_CACHE SCROLLINFOFc;
SHELLEXECUTEINFO_FID_CACHE SHELLEXECUTEINFOFc;
SIZE_FID_CACHE SIZEFc;
TBBUTTON_FID_CACHE TBBUTTONFc;
TBBUTTONINFO_FID_CACHE TBBUTTONINFOFc;
TCITEM_FID_CACHE TCITEMFc;
TEXTMETRIC_FID_CACHE TEXTMETRICFc;
TVHITTESTINFO_FID_CACHE TVHITTESTINFOFc;
TVINSERTSTRUCT_FID_CACHE TVINSERTSTRUCTFc;
TVITEM_FID_CACHE TVITEMFc;
WINDOWPOS_FID_CACHE WINDOWPOSFc;
WNDCLASS_FID_CACHE WNDCLASSFc;
#ifdef _WIN32_WCE
SHMENUBARINFO_FID_CACHE SHMENUBARINFOFc;
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
BROWSEINFO_FID_CACHE BROWSEINFOFc;
CHOOSEFONT_FID_CACHE CHOOSEFONTFc;
DOCINFO_FID_CACHE DOCINFOFc;
GCP_RESULTS_FID_CACHE GCP_RESULTSFc;
GRADIENT_RECT_FID_CACHE GRADIENT_RECTFc;
HELPINFO_FID_CACHE HELPINFOFc;
MENUINFO_FID_CACHE MENUINFOFc;
NMTTDISPINFO_FID_CACHE NMTTDISPINFOFc;
NONCLIENTMETRICS_FID_CACHE NONCLIENTMETRICSFc;
PRINTDLG_FID_CACHE PRINTDLGFc;
TOOLINFO_FID_CACHE TOOLINFOFc;
TRACKMOUSEEVENT_FID_CACHE TRACKMOUSEEVENTFc;
TRIVERTEX_FID_CACHE TRIVERTEXFc;
WINDOWPLACEMENT_FID_CACHE WINDOWPLACEMENTFc;
DROPFILES_FID_CACHE DROPFILESFc;
OLECMD_FID_CACHE OLECMDFc;
OLECMDTEXT_FID_CACHE OLECMDTEXTFc;
#endif
/* OLE globals */
CAUUID_FID_CACHE CAUUIDFc;
CONTROLINFO_FID_CACHE CONTROLINFOFc;
COSERVERINFO_FID_CACHE COSERVERINFOFc;
DISPPARAMS_FID_CACHE DISPPARAMSFc;
DVTARGETDEVICE_FID_CACHE DVTARGETDEVICEFc;
EXCEPINFO_FID_CACHE EXCEPINFOFc;
FORMATETC_FID_CACHE FORMATETCFc;
FUNCDESC1_FID_CACHE FUNCDESC1Fc;
FUNCDESC2_FID_CACHE FUNCDESC2Fc;
GUID_FID_CACHE GUIDFc;
LICINFO_FID_CACHE LICINFOFc;
OLEINPLACEFRAMEINFO_FID_CACHE OLEINPLACEFRAMEINFOFc;
STATSTG_FID_CACHE STATSTGFc;
STGMEDIUM_FID_CACHE STGMEDIUMFc;
TYPEATTR_FID_CACHE TYPEATTRFc;
VARDESC1_FID_CACHE VARDESC1Fc;
VARDESC2_FID_CACHE VARDESC2Fc;
void cacheACCELFids(JNIEnv *env, jobject lpObject, PACCEL_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->fVirt = (*env)->GetFieldID(env, lpCache->clazz, "fVirt", "B");
lpCache->key = (*env)->GetFieldID(env, lpCache->clazz, "key", "S");
lpCache->cmd = (*env)->GetFieldID(env, lpCache->clazz, "cmd", "S");
lpCache->cached = 1;
}
ACCEL* getACCELFields(JNIEnv *env, jobject lpObject, ACCEL *lpStruct, PACCEL_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheACCELFids(env, lpObject, lpCache);
lpStruct->fVirt = (*env)->GetByteField(env, lpObject, lpCache->fVirt);
lpStruct->key = (*env)->GetShortField(env, lpObject, lpCache->key);
lpStruct->cmd = (*env)->GetShortField(env, lpObject, lpCache->cmd);
return lpStruct;
}
void setACCELFields(JNIEnv *env, jobject lpObject, ACCEL *lpStruct, PACCEL_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheACCELFids(env, lpObject, lpCache);
(*env)->SetByteField(env, lpObject, lpCache->fVirt, lpStruct->fVirt);
(*env)->SetShortField(env, lpObject, lpCache->key, lpStruct->key);
(*env)->SetShortField(env, lpObject, lpCache->cmd, lpStruct->cmd);
}
void cacheBITMAPFids(JNIEnv *env, jobject lpObject, PBITMAP_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->bmType = (*env)->GetFieldID(env, lpCache->clazz, "bmType", "I");
lpCache->bmWidth = (*env)->GetFieldID(env, lpCache->clazz, "bmWidth", "I");
lpCache->bmHeight = (*env)->GetFieldID(env, lpCache->clazz, "bmHeight", "I");
lpCache->bmWidthBytes = (*env)->GetFieldID(env, lpCache->clazz, "bmWidthBytes", "I");
lpCache->bmPlanes = (*env)->GetFieldID(env, lpCache->clazz, "bmPlanes", "S");
lpCache->bmBitsPixel = (*env)->GetFieldID(env, lpCache->clazz, "bmBitsPixel", "S");
lpCache->bmBits = (*env)->GetFieldID(env, lpCache->clazz, "bmBits", "I");
lpCache->cached = 1;
}
BITMAP* getBITMAPFields(JNIEnv *env, jobject lpObject, BITMAP *lpStruct, PBITMAP_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheBITMAPFids(env, lpObject, lpCache);
lpStruct->bmType = (*env)->GetIntField(env, lpObject, lpCache->bmType);
lpStruct->bmWidth = (*env)->GetIntField(env, lpObject, lpCache->bmWidth);
lpStruct->bmHeight = (*env)->GetIntField(env, lpObject, lpCache->bmHeight);
lpStruct->bmWidthBytes = (*env)->GetIntField(env, lpObject, lpCache->bmWidthBytes);
lpStruct->bmPlanes = (*env)->GetShortField(env, lpObject, lpCache->bmPlanes);
lpStruct->bmBitsPixel = (*env)->GetShortField(env, lpObject, lpCache->bmBitsPixel);
lpStruct->bmBits = (LPVOID)(*env)->GetIntField(env, lpObject, lpCache->bmBits);
return lpStruct;
}
void setBITMAPFields(JNIEnv *env, jobject lpObject, BITMAP *lpStruct, PBITMAP_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheBITMAPFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->bmType, lpStruct->bmType);
(*env)->SetIntField(env, lpObject, lpCache->bmWidth, lpStruct->bmWidth);
(*env)->SetIntField(env, lpObject, lpCache->bmHeight, lpStruct->bmHeight);
(*env)->SetIntField(env, lpObject, lpCache->bmWidthBytes, lpStruct->bmWidthBytes);
(*env)->SetShortField(env, lpObject, lpCache->bmPlanes, lpStruct->bmPlanes);
(*env)->SetShortField(env, lpObject, lpCache->bmBitsPixel, lpStruct->bmBitsPixel);
(*env)->SetIntField(env, lpObject, lpCache->bmBits, (jint)lpStruct->bmBits);
}
#ifndef _WIN32_WCE
void cacheBROWSEINFOFids(JNIEnv *env, jobject lpObject, PBROWSEINFO_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->hwndOwner = (*env)->GetFieldID(env, lpCache->clazz, "hwndOwner", "I");
lpCache->pidlRoot = (*env)->GetFieldID(env, lpCache->clazz, "pidlRoot", "I");
lpCache->pszDisplayName = (*env)->GetFieldID(env, lpCache->clazz, "pszDisplayName", "I");
lpCache->lpszTitle = (*env)->GetFieldID(env, lpCache->clazz, "lpszTitle", "I");
lpCache->ulFlags = (*env)->GetFieldID(env, lpCache->clazz, "ulFlags", "I");
lpCache->lpfn = (*env)->GetFieldID(env, lpCache->clazz, "lpfn", "I");
lpCache->lParam = (*env)->GetFieldID(env, lpCache->clazz, "lParam", "I");
lpCache->iImage = (*env)->GetFieldID(env, lpCache->clazz, "iImage", "I");
lpCache->cached = 1;
}
BROWSEINFO* getBROWSEINFOFields(JNIEnv *env, jobject lpObject, BROWSEINFO *lpStruct, PBROWSEINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheBROWSEINFOFids(env, lpObject, lpCache);
lpStruct->hwndOwner = (HWND)(*env)->GetIntField(env, lpObject, lpCache->hwndOwner);
lpStruct->pidlRoot = (LPCITEMIDLIST)(*env)->GetIntField(env, lpObject, lpCache->pidlRoot);
lpStruct->pszDisplayName = (LPTSTR)(*env)->GetIntField(env, lpObject, lpCache->pszDisplayName);
lpStruct->lpszTitle = (LPCTSTR)(*env)->GetIntField(env, lpObject, lpCache->lpszTitle);
lpStruct->ulFlags = (*env)->GetIntField(env, lpObject, lpCache->ulFlags);
lpStruct->lpfn = (BFFCALLBACK)(*env)->GetIntField(env, lpObject, lpCache->lpfn);
lpStruct->lParam = (*env)->GetIntField(env, lpObject, lpCache->lParam);
lpStruct->iImage = (*env)->GetIntField(env, lpObject, lpCache->iImage);
return lpStruct;
}
void setBROWSEINFOFields(JNIEnv *env, jobject lpObject, BROWSEINFO *lpStruct, PBROWSEINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheBROWSEINFOFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->hwndOwner, (jint)lpStruct->hwndOwner);
(*env)->SetIntField(env, lpObject, lpCache->pidlRoot, (jint)lpStruct->pidlRoot);
(*env)->SetIntField(env, lpObject, lpCache->pszDisplayName, (jint)lpStruct->pszDisplayName);
(*env)->SetIntField(env, lpObject, lpCache->lpszTitle, (jint)lpStruct->lpszTitle);
(*env)->SetIntField(env, lpObject, lpCache->ulFlags, lpStruct->ulFlags);
(*env)->SetIntField(env, lpObject, lpCache->lpfn, (jint)lpStruct->lpfn);
(*env)->SetIntField(env, lpObject, lpCache->lParam, lpStruct->lParam);
(*env)->SetIntField(env, lpObject, lpCache->iImage, lpStruct->iImage);
}
#endif // _WIN32_WCE
void cacheCHOOSECOLORFids(JNIEnv *env, jobject lpObject, PCHOOSECOLOR_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->lStructSize = (*env)->GetFieldID(env, lpCache->clazz, "lStructSize", "I");
lpCache->hwndOwner = (*env)->GetFieldID(env, lpCache->clazz, "hwndOwner", "I");
lpCache->hInstance = (*env)->GetFieldID(env, lpCache->clazz, "hInstance", "I");
lpCache->rgbResult = (*env)->GetFieldID(env, lpCache->clazz, "rgbResult", "I");
lpCache->lpCustColors = (*env)->GetFieldID(env, lpCache->clazz, "lpCustColors", "I");
lpCache->Flags = (*env)->GetFieldID(env, lpCache->clazz, "Flags", "I");
lpCache->lCustData = (*env)->GetFieldID(env, lpCache->clazz, "lCustData", "I");
lpCache->lpfnHook = (*env)->GetFieldID(env, lpCache->clazz, "lpfnHook", "I");
lpCache->lpTemplateName = (*env)->GetFieldID(env, lpCache->clazz, "lpTemplateName", "I");
lpCache->cached = 1;
}
CHOOSECOLOR* getCHOOSECOLORFields(JNIEnv *env, jobject lpObject, CHOOSECOLOR *lpStruct, PCHOOSECOLOR_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheCHOOSECOLORFids(env, lpObject, lpCache);
lpStruct->lStructSize = (*env)->GetIntField(env, lpObject, lpCache->lStructSize);
lpStruct->hwndOwner = (HWND)(*env)->GetIntField(env, lpObject, lpCache->hwndOwner);
lpStruct->hInstance = (HANDLE)(*env)->GetIntField(env, lpObject, lpCache->hInstance);
lpStruct->rgbResult = (*env)->GetIntField(env, lpObject, lpCache->rgbResult);
lpStruct->lpCustColors = (COLORREF *)(*env)->GetIntField(env, lpObject, lpCache->lpCustColors);
lpStruct->Flags = (*env)->GetIntField(env, lpObject, lpCache->Flags);
lpStruct->lCustData = (*env)->GetIntField(env, lpObject, lpCache->lCustData);
lpStruct->lpfnHook = (LPCCHOOKPROC)(*env)->GetIntField(env, lpObject, lpCache->lpfnHook);
lpStruct->lpTemplateName = (LPCTSTR)(*env)->GetIntField(env, lpObject, lpCache->lpTemplateName);
return lpStruct;
}
void setCHOOSECOLORFields(JNIEnv *env, jobject lpObject, CHOOSECOLOR *lpStruct, PCHOOSECOLOR_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheCHOOSECOLORFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->lStructSize, lpStruct->lStructSize);
(*env)->SetIntField(env, lpObject, lpCache->hwndOwner, (jint)lpStruct->hwndOwner);
(*env)->SetIntField(env, lpObject, lpCache->hInstance, (jint)lpStruct->hInstance);
(*env)->SetIntField(env, lpObject, lpCache->rgbResult, lpStruct->rgbResult);
(*env)->SetIntField(env, lpObject, lpCache->lpCustColors, (jint)lpStruct->lpCustColors);
(*env)->SetIntField(env, lpObject, lpCache->Flags, lpStruct->Flags);
(*env)->SetIntField(env, lpObject, lpCache->lCustData, lpStruct->lCustData);
(*env)->SetIntField(env, lpObject, lpCache->lpfnHook, (jint)lpStruct->lpfnHook);
(*env)->SetIntField(env, lpObject, lpCache->lpTemplateName, (jint)lpStruct->lpTemplateName);
}
#ifndef _WIN32_WCE
void cacheCHOOSEFONTFids(JNIEnv *env, jobject lpObject, PCHOOSEFONT_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->lStructSize = (*env)->GetFieldID(env, lpCache->clazz, "lStructSize", "I");
lpCache->hwndOwner = (*env)->GetFieldID(env, lpCache->clazz, "hwndOwner", "I");
lpCache->hDC = (*env)->GetFieldID(env, lpCache->clazz, "hDC", "I");
lpCache->lpLogFont = (*env)->GetFieldID(env, lpCache->clazz, "lpLogFont", "I");
lpCache->iPointSize = (*env)->GetFieldID(env, lpCache->clazz, "iPointSize", "I");
lpCache->Flags = (*env)->GetFieldID(env, lpCache->clazz, "Flags", "I");
lpCache->rgbColors = (*env)->GetFieldID(env, lpCache->clazz, "rgbColors", "I");
lpCache->lCustData = (*env)->GetFieldID(env, lpCache->clazz, "lCustData", "I");
lpCache->lpfnHook = (*env)->GetFieldID(env, lpCache->clazz, "lpfnHook", "I");
lpCache->lpTemplateName = (*env)->GetFieldID(env, lpCache->clazz, "lpTemplateName", "I");
lpCache->hInstance = (*env)->GetFieldID(env, lpCache->clazz, "hInstance", "I");
lpCache->lpszStyle = (*env)->GetFieldID(env, lpCache->clazz, "lpszStyle", "I");
lpCache->nFontType = (*env)->GetFieldID(env, lpCache->clazz, "nFontType", "S");
lpCache->nSizeMin = (*env)->GetFieldID(env, lpCache->clazz, "nSizeMin", "I");
lpCache->nSizeMax = (*env)->GetFieldID(env, lpCache->clazz, "nSizeMax", "I");
lpCache->cached = 1;
}
CHOOSEFONT* getCHOOSEFONTFields(JNIEnv *env, jobject lpObject, CHOOSEFONT *lpStruct, PCHOOSEFONT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheCHOOSEFONTFids(env, lpObject, lpCache);
lpStruct->lStructSize = (*env)->GetIntField(env, lpObject, lpCache->lStructSize);
lpStruct->hwndOwner = (HWND)(*env)->GetIntField(env, lpObject, lpCache->hwndOwner);
lpStruct->hDC = (HDC)(*env)->GetIntField(env, lpObject, lpCache->hDC);
lpStruct->lpLogFont = (LPLOGFONT)(*env)->GetIntField(env, lpObject, lpCache->lpLogFont);
lpStruct->iPointSize = (*env)->GetIntField(env, lpObject, lpCache->iPointSize);
lpStruct->Flags = (*env)->GetIntField(env, lpObject, lpCache->Flags);
lpStruct->rgbColors = (*env)->GetIntField(env, lpObject, lpCache->rgbColors);
lpStruct->lCustData = (*env)->GetIntField(env, lpObject, lpCache->lCustData);
lpStruct->lpfnHook = (LPCFHOOKPROC)(*env)->GetIntField(env, lpObject, lpCache->lpfnHook);
lpStruct->lpTemplateName = (LPCTSTR)(*env)->GetIntField(env, lpObject, lpCache->lpTemplateName);
lpStruct->hInstance = (HINSTANCE)(*env)->GetIntField(env, lpObject, lpCache->hInstance);
lpStruct->lpszStyle = (LPTSTR)(*env)->GetIntField(env, lpObject, lpCache->lpszStyle);
lpStruct->nFontType = (*env)->GetShortField(env, lpObject, lpCache->nFontType);
lpStruct->nSizeMin = (*env)->GetIntField(env, lpObject, lpCache->nSizeMin);
lpStruct->nSizeMax = (*env)->GetIntField(env, lpObject, lpCache->nSizeMax);
return lpStruct;
}
void setCHOOSEFONTFields(JNIEnv *env, jobject lpObject, CHOOSEFONT *lpStruct, PCHOOSEFONT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheCHOOSEFONTFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->lStructSize, lpStruct->lStructSize);
(*env)->SetIntField(env, lpObject, lpCache->hwndOwner, (jint)lpStruct->hwndOwner);
(*env)->SetIntField(env, lpObject, lpCache->hDC, (jint)lpStruct->hDC);
(*env)->SetIntField(env, lpObject, lpCache->lpLogFont, (jint)lpStruct->lpLogFont);
(*env)->SetIntField(env, lpObject, lpCache->iPointSize, lpStruct->iPointSize);
(*env)->SetIntField(env, lpObject, lpCache->Flags, lpStruct->Flags);
(*env)->SetIntField(env, lpObject, lpCache->rgbColors, lpStruct->rgbColors);
(*env)->SetIntField(env, lpObject, lpCache->lCustData, lpStruct->lCustData);
(*env)->SetIntField(env, lpObject, lpCache->lpfnHook, (jint)lpStruct->lpfnHook);
(*env)->SetIntField(env, lpObject, lpCache->lpTemplateName, (jint)lpStruct->lpTemplateName);
(*env)->SetIntField(env, lpObject, lpCache->hInstance, (jint)lpStruct->hInstance);
(*env)->SetIntField(env, lpObject, lpCache->lpszStyle, (jint)lpStruct->lpszStyle);
(*env)->SetShortField(env, lpObject, lpCache->nFontType, lpStruct->nFontType);
(*env)->SetIntField(env, lpObject, lpCache->nSizeMin, lpStruct->nSizeMin);
(*env)->SetIntField(env, lpObject, lpCache->nSizeMax, lpStruct->nSizeMax);
}
#endif // _WIN32_WCE
void cacheCOMPOSITIONFORMFids(JNIEnv *env, jobject lpObject, PCOMPOSITIONFORM_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->dwStyle = (*env)->GetFieldID(env, lpCache->clazz, "dwStyle", "I");
lpCache->x = (*env)->GetFieldID(env, lpCache->clazz, "x", "I");
lpCache->y = (*env)->GetFieldID(env, lpCache->clazz, "y", "I");
lpCache->left = (*env)->GetFieldID(env, lpCache->clazz, "left", "I");
lpCache->top = (*env)->GetFieldID(env, lpCache->clazz, "top", "I");
lpCache->right = (*env)->GetFieldID(env, lpCache->clazz, "right", "I");
lpCache->bottom = (*env)->GetFieldID(env, lpCache->clazz, "bottom", "I");
lpCache->cached = 1;
}
COMPOSITIONFORM* getCOMPOSITIONFORMFields(JNIEnv *env, jobject lpObject, COMPOSITIONFORM *lpStruct, PCOMPOSITIONFORM_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheCOMPOSITIONFORMFids(env, lpObject, lpCache);
lpStruct->dwStyle = (*env)->GetIntField(env, lpObject, lpCache->dwStyle);
lpStruct->ptCurrentPos.x = (*env)->GetIntField(env, lpObject, lpCache->x);
lpStruct->ptCurrentPos.y = (*env)->GetIntField(env, lpObject, lpCache->y);
lpStruct->rcArea.left = (*env)->GetIntField(env, lpObject, lpCache->left);
lpStruct->rcArea.top = (*env)->GetIntField(env, lpObject, lpCache->top);
lpStruct->rcArea.right = (*env)->GetIntField(env, lpObject, lpCache->right);
lpStruct->rcArea.bottom = (*env)->GetIntField(env, lpObject, lpCache->bottom);
return lpStruct;
}
void setCOMPOSITIONFORMFields(JNIEnv *env, jobject lpObject, COMPOSITIONFORM *lpStruct, PCOMPOSITIONFORM_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheCOMPOSITIONFORMFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->dwStyle, lpStruct->dwStyle);
(*env)->SetIntField(env, lpObject, lpCache->x, lpStruct->ptCurrentPos.x);
(*env)->SetIntField(env, lpObject, lpCache->y, lpStruct->ptCurrentPos.y);
(*env)->SetIntField(env, lpObject, lpCache->left, lpStruct->rcArea.left);
(*env)->SetIntField(env, lpObject, lpCache->top, lpStruct->rcArea.top);
(*env)->SetIntField(env, lpObject, lpCache->right, lpStruct->rcArea.right);
(*env)->SetIntField(env, lpObject, lpCache->bottom, lpStruct->rcArea.bottom);
}
void cacheCREATESTRUCTFids(JNIEnv *env, jobject lpObject, PCREATESTRUCT_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->lpCreateParams = (*env)->GetFieldID(env, lpCache->clazz, "lpCreateParams", "I");
lpCache->hInstance = (*env)->GetFieldID(env, lpCache->clazz, "hInstance", "I");
lpCache->hMenu = (*env)->GetFieldID(env, lpCache->clazz, "hMenu", "I");
lpCache->hwndParent = (*env)->GetFieldID(env, lpCache->clazz, "hwndParent", "I");
lpCache->cy = (*env)->GetFieldID(env, lpCache->clazz, "cy", "I");
lpCache->cx = (*env)->GetFieldID(env, lpCache->clazz, "cx", "I");
lpCache->y = (*env)->GetFieldID(env, lpCache->clazz, "y", "I");
lpCache->x = (*env)->GetFieldID(env, lpCache->clazz, "x", "I");
lpCache->style = (*env)->GetFieldID(env, lpCache->clazz, "style", "I");
lpCache->lpszName = (*env)->GetFieldID(env, lpCache->clazz, "lpszName", "I");
lpCache->lpszClass = (*env)->GetFieldID(env, lpCache->clazz, "lpszClass", "I");
lpCache->dwExStyle = (*env)->GetFieldID(env, lpCache->clazz, "dwExStyle", "I");
lpCache->cached = 1;
}
CREATESTRUCT* getCREATESTRUCTFields(JNIEnv *env, jobject lpObject, CREATESTRUCT *lpStruct, PCREATESTRUCT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheCREATESTRUCTFids(env, lpObject, lpCache);
lpStruct->lpCreateParams = (LPVOID)(*env)->GetIntField(env, lpObject, lpCache->lpCreateParams);
lpStruct->hInstance = (HINSTANCE)(*env)->GetIntField(env, lpObject, lpCache->hInstance);
lpStruct->hMenu = (HMENU)(*env)->GetIntField(env, lpObject, lpCache->hMenu);
lpStruct->hwndParent = (HWND)(*env)->GetIntField(env, lpObject, lpCache->hwndParent);
lpStruct->cy = (*env)->GetIntField(env, lpObject, lpCache->cy);
lpStruct->cx = (*env)->GetIntField(env, lpObject, lpCache->cx);
lpStruct->y = (*env)->GetIntField(env, lpObject, lpCache->y);
lpStruct->x = (*env)->GetIntField(env, lpObject, lpCache->x);
lpStruct->style = (*env)->GetIntField(env, lpObject, lpCache->style);
lpStruct->lpszName = (LPCTSTR)(*env)->GetIntField(env, lpObject, lpCache->lpszName);
lpStruct->lpszClass = (LPCTSTR)(*env)->GetIntField(env, lpObject, lpCache->lpszClass);
lpStruct->dwExStyle = (*env)->GetIntField(env, lpObject, lpCache->dwExStyle);
return lpStruct;
}
void setCREATESTRUCTFields(JNIEnv *env, jobject lpObject, CREATESTRUCT *lpStruct, PCREATESTRUCT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheCREATESTRUCTFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->lpCreateParams, (jint)lpStruct->lpCreateParams);
(*env)->SetIntField(env, lpObject, lpCache->hInstance, (jint)lpStruct->hInstance);
(*env)->SetIntField(env, lpObject, lpCache->hMenu, (jint)lpStruct->hMenu);
(*env)->SetIntField(env, lpObject, lpCache->hwndParent, (jint)lpStruct->hwndParent);
(*env)->SetIntField(env, lpObject, lpCache->cy, lpStruct->cy);
(*env)->SetIntField(env, lpObject, lpCache->cx, lpStruct->cx);
(*env)->SetIntField(env, lpObject, lpCache->y, lpStruct->y);
(*env)->SetIntField(env, lpObject, lpCache->x, lpStruct->x);
(*env)->SetIntField(env, lpObject, lpCache->style, lpStruct->style);
(*env)->SetIntField(env, lpObject, lpCache->lpszName, (jint)lpStruct->lpszName);
(*env)->SetIntField(env, lpObject, lpCache->lpszClass, (jint)lpStruct->lpszClass);
(*env)->SetIntField(env, lpObject, lpCache->dwExStyle, lpStruct->dwExStyle);
}
void cacheDIBSECTIONFids(JNIEnv *env, jobject lpObject, PDIBSECTION_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->bmType = (*env)->GetFieldID(env, lpCache->clazz, "bmType", "I");
lpCache->bmWidth = (*env)->GetFieldID(env, lpCache->clazz, "bmWidth", "I");
lpCache->bmHeight = (*env)->GetFieldID(env, lpCache->clazz, "bmHeight", "I");
lpCache->bmWidthBytes = (*env)->GetFieldID(env, lpCache->clazz, "bmWidthBytes", "I");
lpCache->bmPlanes = (*env)->GetFieldID(env, lpCache->clazz, "bmPlanes", "S");
lpCache->bmBitsPixel = (*env)->GetFieldID(env, lpCache->clazz, "bmBitsPixel", "S");
lpCache->bmBits = (*env)->GetFieldID(env, lpCache->clazz, "bmBits", "I");
lpCache->biSize = (*env)->GetFieldID(env, lpCache->clazz, "biSize", "I");
lpCache->biWidth = (*env)->GetFieldID(env, lpCache->clazz, "biWidth", "I");
lpCache->biHeight = (*env)->GetFieldID(env, lpCache->clazz, "biHeight", "I");
lpCache->biPlanes = (*env)->GetFieldID(env, lpCache->clazz, "biPlanes", "S");
lpCache->biBitCount = (*env)->GetFieldID(env, lpCache->clazz, "biBitCount", "S");
lpCache->biCompression = (*env)->GetFieldID(env, lpCache->clazz, "biCompression", "I");
lpCache->biSizeImage = (*env)->GetFieldID(env, lpCache->clazz, "biSizeImage", "I");
lpCache->biXPelsPerMeter = (*env)->GetFieldID(env, lpCache->clazz, "biXPelsPerMeter", "I");
lpCache->biYPelsPerMeter = (*env)->GetFieldID(env, lpCache->clazz, "biYPelsPerMeter", "I");
lpCache->biClrUsed = (*env)->GetFieldID(env, lpCache->clazz, "biClrUsed", "I");
lpCache->biClrImportant = (*env)->GetFieldID(env, lpCache->clazz, "biClrImportant", "I");
lpCache->dsBitfields0 = (*env)->GetFieldID(env, lpCache->clazz, "dsBitfields0", "I");
lpCache->dsBitfields1 = (*env)->GetFieldID(env, lpCache->clazz, "dsBitfields1", "I");
lpCache->dsBitfields2 = (*env)->GetFieldID(env, lpCache->clazz, "dsBitfields2", "I");
lpCache->dshSection = (*env)->GetFieldID(env, lpCache->clazz, "dshSection", "I");
lpCache->dsOffset = (*env)->GetFieldID(env, lpCache->clazz, "dsOffset", "I");
lpCache->cached = 1;
}
DIBSECTION* getDIBSECTIONFields(JNIEnv *env, jobject lpObject, DIBSECTION *lpStruct, PDIBSECTION_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheDIBSECTIONFids(env, lpObject, lpCache);
lpStruct->dsBm.bmType = (*env)->GetIntField(env, lpObject, lpCache->bmType);
lpStruct->dsBm.bmWidth = (*env)->GetIntField(env, lpObject, lpCache->bmWidth);
lpStruct->dsBm.bmHeight = (*env)->GetIntField(env, lpObject, lpCache->bmHeight);
lpStruct->dsBm.bmWidthBytes = (*env)->GetIntField(env, lpObject, lpCache->bmWidthBytes);
lpStruct->dsBm.bmPlanes = (*env)->GetShortField(env, lpObject, lpCache->bmPlanes);
lpStruct->dsBm.bmBitsPixel = (*env)->GetShortField(env, lpObject, lpCache->bmBitsPixel);
lpStruct->dsBm.bmBits = (LPVOID)(*env)->GetIntField(env, lpObject, lpCache->bmBits);
lpStruct->dsBmih.biSize = (*env)->GetIntField(env, lpObject, lpCache->biSize);
lpStruct->dsBmih.biWidth = (*env)->GetIntField(env, lpObject, lpCache->biWidth);
lpStruct->dsBmih.biHeight = (*env)->GetIntField(env, lpObject, lpCache->biHeight);
lpStruct->dsBmih.biPlanes = (*env)->GetShortField(env, lpObject, lpCache->biPlanes);
lpStruct->dsBmih.biBitCount = (*env)->GetShortField(env, lpObject, lpCache->biBitCount);
lpStruct->dsBmih.biCompression = (*env)->GetIntField(env, lpObject, lpCache->biCompression);
lpStruct->dsBmih.biSizeImage = (*env)->GetIntField(env, lpObject, lpCache->biSizeImage);
lpStruct->dsBmih.biXPelsPerMeter = (*env)->GetIntField(env, lpObject, lpCache->biXPelsPerMeter);
lpStruct->dsBmih.biYPelsPerMeter = (*env)->GetIntField(env, lpObject, lpCache->biYPelsPerMeter);
lpStruct->dsBmih.biClrUsed = (*env)->GetIntField(env, lpObject, lpCache->biClrUsed);
lpStruct->dsBmih.biClrImportant = (*env)->GetIntField(env, lpObject, lpCache->biClrImportant);
lpStruct->dsBitfields[0] = (*env)->GetIntField(env, lpObject, lpCache->dsBitfields0);
lpStruct->dsBitfields[1] = (*env)->GetIntField(env, lpObject, lpCache->dsBitfields1);
lpStruct->dsBitfields[2] = (*env)->GetIntField(env, lpObject, lpCache->dsBitfields2);
lpStruct->dshSection = (HANDLE)(*env)->GetIntField(env, lpObject, lpCache->dshSection);
lpStruct->dsOffset = (*env)->GetIntField(env, lpObject, lpCache->dsOffset);
return lpStruct;
}
void setDIBSECTIONFields(JNIEnv *env, jobject lpObject, DIBSECTION *lpStruct, PDIBSECTION_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheDIBSECTIONFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->bmType, lpStruct->dsBm.bmType);
(*env)->SetIntField(env, lpObject, lpCache->bmWidth, lpStruct->dsBm.bmWidth);
(*env)->SetIntField(env, lpObject, lpCache->bmHeight, lpStruct->dsBm.bmHeight);
(*env)->SetIntField(env, lpObject, lpCache->bmWidthBytes, lpStruct->dsBm.bmWidthBytes);
(*env)->SetShortField(env, lpObject, lpCache->bmPlanes, lpStruct->dsBm.bmPlanes);
(*env)->SetShortField(env, lpObject, lpCache->bmBitsPixel, lpStruct->dsBm.bmBitsPixel);
(*env)->SetIntField(env, lpObject, lpCache->bmBits, (jint)lpStruct->dsBm.bmBits);
(*env)->SetIntField(env, lpObject, lpCache->biSize, lpStruct->dsBmih.biSize);
(*env)->SetIntField(env, lpObject, lpCache->biWidth, lpStruct->dsBmih.biWidth);
(*env)->SetIntField(env, lpObject, lpCache->biHeight, lpStruct->dsBmih.biHeight);
(*env)->SetShortField(env, lpObject, lpCache->biPlanes, lpStruct->dsBmih.biPlanes);
(*env)->SetShortField(env, lpObject, lpCache->biBitCount, lpStruct->dsBmih.biBitCount);
(*env)->SetIntField(env, lpObject, lpCache->biCompression, lpStruct->dsBmih.biCompression);
(*env)->SetIntField(env, lpObject, lpCache->biSizeImage, lpStruct->dsBmih.biSizeImage);
(*env)->SetIntField(env, lpObject, lpCache->biXPelsPerMeter, lpStruct->dsBmih.biXPelsPerMeter);
(*env)->SetIntField(env, lpObject, lpCache->biYPelsPerMeter, lpStruct->dsBmih.biYPelsPerMeter);
(*env)->SetIntField(env, lpObject, lpCache->biClrUsed, lpStruct->dsBmih.biClrUsed);
(*env)->SetIntField(env, lpObject, lpCache->biClrImportant, lpStruct->dsBmih.biClrImportant);
(*env)->SetIntField(env, lpObject, lpCache->dsBitfields0, lpStruct->dsBitfields[0]);
(*env)->SetIntField(env, lpObject, lpCache->dsBitfields1, lpStruct->dsBitfields[1]);
(*env)->SetIntField(env, lpObject, lpCache->dsBitfields2, lpStruct->dsBitfields[2]);
(*env)->SetIntField(env, lpObject, lpCache->dshSection, (jint)lpStruct->dshSection);
(*env)->SetIntField(env, lpObject, lpCache->dsOffset, lpStruct->dsOffset);
}
void cacheDLLVERSIONINFOFids(JNIEnv *env, jobject lpObject, PDLLVERSIONINFO_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->cbSize = (*env)->GetFieldID(env, lpCache->clazz, "cbSize", "I");
lpCache->dwMajorVersion = (*env)->GetFieldID(env, lpCache->clazz, "dwMajorVersion", "I");
lpCache->dwMinorVersion = (*env)->GetFieldID(env, lpCache->clazz, "dwMinorVersion", "I");
lpCache->dwBuildNumber = (*env)->GetFieldID(env, lpCache->clazz, "dwBuildNumber", "I");
lpCache->dwPlatformID = (*env)->GetFieldID(env, lpCache->clazz, "dwPlatformID", "I");
lpCache->cached = 1;
}
DLLVERSIONINFO* getDLLVERSIONINFOFields(JNIEnv *env, jobject lpObject, DLLVERSIONINFO *lpStruct, PDLLVERSIONINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheDLLVERSIONINFOFids(env, lpObject, lpCache);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, lpCache->cbSize);
lpStruct->dwMajorVersion = (*env)->GetIntField(env, lpObject, lpCache->dwMajorVersion);
lpStruct->dwMinorVersion = (*env)->GetIntField(env, lpObject, lpCache->dwMinorVersion);
lpStruct->dwBuildNumber = (*env)->GetIntField(env, lpObject, lpCache->dwBuildNumber);
lpStruct->dwPlatformID = (*env)->GetIntField(env, lpObject, lpCache->dwPlatformID);
return lpStruct;
}
void setDLLVERSIONINFOFields(JNIEnv *env, jobject lpObject, DLLVERSIONINFO *lpStruct, PDLLVERSIONINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheDLLVERSIONINFOFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->cbSize, lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, lpCache->dwMajorVersion, lpStruct->dwMajorVersion);
(*env)->SetIntField(env, lpObject, lpCache->dwMinorVersion, lpStruct->dwMinorVersion);
(*env)->SetIntField(env, lpObject, lpCache->dwBuildNumber, lpStruct->dwBuildNumber);
(*env)->SetIntField(env, lpObject, lpCache->dwPlatformID, lpStruct->dwPlatformID);
}
#ifndef _WIN32_WCE
void cacheDOCINFOFids(JNIEnv *env, jobject lpObject, PDOCINFO_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->cbSize = (*env)->GetFieldID(env, lpCache->clazz, "cbSize", "I");
lpCache->lpszDocName = (*env)->GetFieldID(env, lpCache->clazz, "lpszDocName", "I");
lpCache->lpszOutput = (*env)->GetFieldID(env, lpCache->clazz, "lpszOutput", "I");
lpCache->lpszDatatype = (*env)->GetFieldID(env, lpCache->clazz, "lpszDatatype", "I");
lpCache->fwType = (*env)->GetFieldID(env, lpCache->clazz, "fwType", "I");
lpCache->cached = 1;
}
DOCINFO* getDOCINFOFields(JNIEnv *env, jobject lpObject, DOCINFO *lpStruct, PDOCINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheDOCINFOFids(env, lpObject, lpCache);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, lpCache->cbSize);
lpStruct->lpszDocName = (LPCTSTR)(*env)->GetIntField(env, lpObject, lpCache->lpszDocName);
lpStruct->lpszOutput = (LPCTSTR)(*env)->GetIntField(env, lpObject, lpCache->lpszOutput);
lpStruct->lpszDatatype = (LPCTSTR)(*env)->GetIntField(env, lpObject, lpCache->lpszDatatype);
lpStruct->fwType = (*env)->GetIntField(env, lpObject, lpCache->fwType);
return lpStruct;
}
void setDOCINFOFields(JNIEnv *env, jobject lpObject, DOCINFO *lpStruct, PDOCINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheDOCINFOFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->cbSize, lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, lpCache->lpszDocName, (jint)lpStruct->lpszDocName);
(*env)->SetIntField(env, lpObject, lpCache->lpszOutput, (jint)lpStruct->lpszOutput);
(*env)->SetIntField(env, lpObject, lpCache->lpszDatatype, (jint)lpStruct->lpszDatatype);
(*env)->SetIntField(env, lpObject, lpCache->fwType, lpStruct->fwType);
}
#endif // _WIN32_WCE
void cacheDRAWITEMSTRUCTFids(JNIEnv *env, jobject lpObject, PDRAWITEMSTRUCT_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->CtlType = (*env)->GetFieldID(env, lpCache->clazz, "CtlType", "I");
lpCache->CtlID = (*env)->GetFieldID(env, lpCache->clazz, "CtlID", "I");
lpCache->itemID = (*env)->GetFieldID(env, lpCache->clazz, "itemID", "I");
lpCache->itemAction = (*env)->GetFieldID(env, lpCache->clazz, "itemAction", "I");
lpCache->itemState = (*env)->GetFieldID(env, lpCache->clazz, "itemState", "I");
lpCache->hwndItem = (*env)->GetFieldID(env, lpCache->clazz, "hwndItem", "I");
lpCache->hDC = (*env)->GetFieldID(env, lpCache->clazz, "hDC", "I");
lpCache->left = (*env)->GetFieldID(env, lpCache->clazz, "left", "I");
lpCache->top = (*env)->GetFieldID(env, lpCache->clazz, "top", "I");
lpCache->bottom = (*env)->GetFieldID(env, lpCache->clazz, "bottom", "I");
lpCache->right = (*env)->GetFieldID(env, lpCache->clazz, "right", "I");
lpCache->itemData = (*env)->GetFieldID(env, lpCache->clazz, "itemData", "I");
lpCache->cached = 1;
}
DRAWITEMSTRUCT* getDRAWITEMSTRUCTFields(JNIEnv *env, jobject lpObject, DRAWITEMSTRUCT *lpStruct, PDRAWITEMSTRUCT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheDRAWITEMSTRUCTFids(env, lpObject, lpCache);
lpStruct->CtlType = (*env)->GetIntField(env, lpObject, lpCache->CtlType);
lpStruct->CtlID = (*env)->GetIntField(env, lpObject, lpCache->CtlID);
lpStruct->itemID = (*env)->GetIntField(env, lpObject, lpCache->itemID);
lpStruct->itemAction = (*env)->GetIntField(env, lpObject, lpCache->itemAction);
lpStruct->itemState = (*env)->GetIntField(env, lpObject, lpCache->itemState);
lpStruct->hwndItem = (HWND)(*env)->GetIntField(env, lpObject, lpCache->hwndItem);
lpStruct->hDC = (HDC)(*env)->GetIntField(env, lpObject, lpCache->hDC);
lpStruct->rcItem.left = (*env)->GetIntField(env, lpObject, lpCache->left);
lpStruct->rcItem.top = (*env)->GetIntField(env, lpObject, lpCache->top);
lpStruct->rcItem.bottom = (*env)->GetIntField(env, lpObject, lpCache->bottom);
lpStruct->rcItem.right = (*env)->GetIntField(env, lpObject, lpCache->right);
lpStruct->itemData = (*env)->GetIntField(env, lpObject, lpCache->itemData);
return lpStruct;
}
void setDRAWITEMSTRUCTFields(JNIEnv *env, jobject lpObject, DRAWITEMSTRUCT *lpStruct, PDRAWITEMSTRUCT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheDRAWITEMSTRUCTFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->CtlType, lpStruct->CtlType);
(*env)->SetIntField(env, lpObject, lpCache->CtlID, lpStruct->CtlID);
(*env)->SetIntField(env, lpObject, lpCache->itemID, lpStruct->itemID);
(*env)->SetIntField(env, lpObject, lpCache->itemAction, lpStruct->itemAction);
(*env)->SetIntField(env, lpObject, lpCache->itemState, lpStruct->itemState);
(*env)->SetIntField(env, lpObject, lpCache->hwndItem, (jint)lpStruct->hwndItem);
(*env)->SetIntField(env, lpObject, lpCache->hDC, (jint)lpStruct->hDC);
(*env)->SetIntField(env, lpObject, lpCache->left, lpStruct->rcItem.left);
(*env)->SetIntField(env, lpObject, lpCache->top, lpStruct->rcItem.top);
(*env)->SetIntField(env, lpObject, lpCache->bottom, lpStruct->rcItem.bottom);
(*env)->SetIntField(env, lpObject, lpCache->right, lpStruct->rcItem.right);
(*env)->SetIntField(env, lpObject, lpCache->itemData, lpStruct->itemData);
}
void cacheFILETIMEFids(JNIEnv *env, jobject lpObject, PFILETIME_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->dwLowDateTime = (*env)->GetFieldID(env, lpCache->clazz, "dwLowDateTime", "I");
lpCache->dwHighDateTime = (*env)->GetFieldID(env, lpCache->clazz, "dwHighDateTime", "I");
lpCache->cached = 1;
}
FILETIME* getFILETIMEFields(JNIEnv *env, jobject lpObject, FILETIME *lpStruct, PFILETIME_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheFILETIMEFids(env, lpObject, lpCache);
lpStruct->dwLowDateTime = (*env)->GetIntField(env, lpObject, lpCache->dwLowDateTime);
lpStruct->dwHighDateTime = (*env)->GetIntField(env, lpObject, lpCache->dwHighDateTime);
return lpStruct;
}
void setFILETIMEFields(JNIEnv *env, jobject lpObject, FILETIME *lpStruct, PFILETIME_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheFILETIMEFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->dwLowDateTime, lpStruct->dwLowDateTime);
(*env)->SetIntField(env, lpObject, lpCache->dwHighDateTime, lpStruct->dwHighDateTime);
}
#ifndef _WIN32_WCE
void cacheGCP_RESULTSFids(JNIEnv *env, jobject lpObject, PGCP_RESULTS_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->lStructSize = (*env)->GetFieldID(env, lpCache->clazz, "lStructSize", "I");
lpCache->lpOutString = (*env)->GetFieldID(env, lpCache->clazz, "lpOutString", "I");
lpCache->lpOrder = (*env)->GetFieldID(env, lpCache->clazz, "lpOrder", "I");
lpCache->lpDx = (*env)->GetFieldID(env, lpCache->clazz, "lpDx", "I");
lpCache->lpCaretPos = (*env)->GetFieldID(env, lpCache->clazz, "lpCaretPos", "I");
lpCache->lpClass = (*env)->GetFieldID(env, lpCache->clazz, "lpClass", "I");
lpCache->lpGlyphs = (*env)->GetFieldID(env, lpCache->clazz, "lpGlyphs", "I");
lpCache->nGlyphs = (*env)->GetFieldID(env, lpCache->clazz, "nGlyphs", "I");
lpCache->nMaxFit = (*env)->GetFieldID(env, lpCache->clazz, "nMaxFit", "I");
lpCache->cached = 1;
}
GCP_RESULTS* getGCP_RESULTSFields(JNIEnv *env, jobject lpObject, GCP_RESULTS *lpStruct, PGCP_RESULTS_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheGCP_RESULTSFids(env, lpObject, lpCache);
lpStruct->lStructSize = (*env)->GetIntField(env, lpObject, lpCache->lStructSize);
lpStruct->lpOutString = (LPTSTR)(*env)->GetIntField(env, lpObject, lpCache->lpOutString);
lpStruct->lpOrder = (UINT *)(*env)->GetIntField(env, lpObject, lpCache->lpOrder);
lpStruct->lpDx = (int *)(*env)->GetIntField(env, lpObject, lpCache->lpDx);
lpStruct->lpCaretPos = (int *)(*env)->GetIntField(env, lpObject, lpCache->lpCaretPos);
lpStruct->lpClass = (LPSTR)(*env)->GetIntField(env, lpObject, lpCache->lpClass);
lpStruct->lpGlyphs = (LPWSTR)(*env)->GetIntField(env, lpObject, lpCache->lpGlyphs);
lpStruct->nGlyphs = (*env)->GetIntField(env, lpObject, lpCache->nGlyphs);
lpStruct->nMaxFit = (*env)->GetIntField(env, lpObject, lpCache->nMaxFit);
return lpStruct;
}
void setGCP_RESULTSFields(JNIEnv *env, jobject lpObject, GCP_RESULTS *lpStruct, PGCP_RESULTS_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheGCP_RESULTSFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->lStructSize, lpStruct->lStructSize);
(*env)->SetIntField(env, lpObject, lpCache->lpOutString, (jint)lpStruct->lpOutString);
(*env)->SetIntField(env, lpObject, lpCache->lpOrder, (jint)lpStruct->lpOrder);
(*env)->SetIntField(env, lpObject, lpCache->lpDx, (jint)lpStruct->lpDx);
(*env)->SetIntField(env, lpObject, lpCache->lpCaretPos, (jint)lpStruct->lpCaretPos);
(*env)->SetIntField(env, lpObject, lpCache->lpClass, (jint)lpStruct->lpClass);
(*env)->SetIntField(env, lpObject, lpCache->lpGlyphs, (jint)lpStruct->lpGlyphs);
(*env)->SetIntField(env, lpObject, lpCache->nGlyphs, lpStruct->nGlyphs);
(*env)->SetIntField(env, lpObject, lpCache->nMaxFit, lpStruct->nMaxFit);
}
#endif // _WIN32_WCE
#ifndef _WIN32_WCE
void cacheGRADIENT_RECTFids(JNIEnv *env, jobject lpObject, PGRADIENT_RECT_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->UpperLeft = (*env)->GetFieldID(env, lpCache->clazz, "UpperLeft", "I");
lpCache->LowerRight = (*env)->GetFieldID(env, lpCache->clazz, "LowerRight", "I");
lpCache->cached = 1;
}
GRADIENT_RECT* getGRADIENT_RECTFields(JNIEnv *env, jobject lpObject, GRADIENT_RECT *lpStruct, PGRADIENT_RECT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheGRADIENT_RECTFids(env, lpObject, lpCache);
lpStruct->UpperLeft = (*env)->GetIntField(env, lpObject, lpCache->UpperLeft);
lpStruct->LowerRight = (*env)->GetIntField(env, lpObject, lpCache->LowerRight);
return lpStruct;
}
void setGRADIENT_RECTFields(JNIEnv *env, jobject lpObject, GRADIENT_RECT *lpStruct, PGRADIENT_RECT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheGRADIENT_RECTFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->UpperLeft, lpStruct->UpperLeft);
(*env)->SetIntField(env, lpObject, lpCache->LowerRight, lpStruct->LowerRight);
}
#endif // _WIN32_WCE
void cacheHDITEMFids(JNIEnv *env, jobject lpObject, PHDITEM_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->mask = (*env)->GetFieldID(env, lpCache->clazz, "mask", "I");
lpCache->cxy = (*env)->GetFieldID(env, lpCache->clazz, "cxy", "I");
lpCache->pszText = (*env)->GetFieldID(env, lpCache->clazz, "pszText", "I");
lpCache->hbm = (*env)->GetFieldID(env, lpCache->clazz, "hbm", "I");
lpCache->cchTextMax = (*env)->GetFieldID(env, lpCache->clazz, "cchTextMax", "I");
lpCache->fmt = (*env)->GetFieldID(env, lpCache->clazz, "fmt", "I");
lpCache->lParam = (*env)->GetFieldID(env, lpCache->clazz, "lParam", "I");
lpCache->iImage = (*env)->GetFieldID(env, lpCache->clazz, "iImage", "I");
lpCache->iOrder = (*env)->GetFieldID(env, lpCache->clazz, "iOrder", "I");
lpCache->cached = 1;
}
HDITEM* getHDITEMFields(JNIEnv *env, jobject lpObject, HDITEM *lpStruct, PHDITEM_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheHDITEMFids(env, lpObject, lpCache);
lpStruct->mask = (*env)->GetIntField(env, lpObject, lpCache->mask);
lpStruct->cxy = (*env)->GetIntField(env, lpObject, lpCache->cxy);
lpStruct->pszText = (LPTSTR)(*env)->GetIntField(env, lpObject, lpCache->pszText);
lpStruct->hbm = (HBITMAP)(*env)->GetIntField(env, lpObject, lpCache->hbm);
lpStruct->cchTextMax = (*env)->GetIntField(env, lpObject, lpCache->cchTextMax);
lpStruct->fmt = (*env)->GetIntField(env, lpObject, lpCache->fmt);
lpStruct->lParam = (*env)->GetIntField(env, lpObject, lpCache->lParam);
lpStruct->iImage = (*env)->GetIntField(env, lpObject, lpCache->iImage);
lpStruct->iOrder = (*env)->GetIntField(env, lpObject, lpCache->iOrder);
return lpStruct;
}
void setHDITEMFields(JNIEnv *env, jobject lpObject, HDITEM *lpStruct, PHDITEM_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheHDITEMFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->mask, lpStruct->mask);
(*env)->SetIntField(env, lpObject, lpCache->cxy, lpStruct->cxy);
(*env)->SetIntField(env, lpObject, lpCache->pszText, (jint)lpStruct->pszText);
(*env)->SetIntField(env, lpObject, lpCache->hbm, (jint)lpStruct->hbm);
(*env)->SetIntField(env, lpObject, lpCache->cchTextMax, lpStruct->cchTextMax);
(*env)->SetIntField(env, lpObject, lpCache->fmt, lpStruct->fmt);
(*env)->SetIntField(env, lpObject, lpCache->lParam, lpStruct->lParam);
(*env)->SetIntField(env, lpObject, lpCache->iImage, lpStruct->iImage);
(*env)->SetIntField(env, lpObject, lpCache->iOrder, lpStruct->iOrder);
}
#ifndef _WIN32_WCE
void cacheHELPINFOFids(JNIEnv *env, jobject lpObject, PHELPINFO_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->cbSize = (*env)->GetFieldID(env, lpCache->clazz, "cbSize", "I");
lpCache->iContextType = (*env)->GetFieldID(env, lpCache->clazz, "iContextType", "I");
lpCache->iCtrlId = (*env)->GetFieldID(env, lpCache->clazz, "iCtrlId", "I");
lpCache->hItemHandle = (*env)->GetFieldID(env, lpCache->clazz, "hItemHandle", "I");
lpCache->dwContextId = (*env)->GetFieldID(env, lpCache->clazz, "dwContextId", "I");
lpCache->x = (*env)->GetFieldID(env, lpCache->clazz, "x", "I");
lpCache->y = (*env)->GetFieldID(env, lpCache->clazz, "y", "I");
lpCache->cached = 1;
}
HELPINFO* getHELPINFOFields(JNIEnv *env, jobject lpObject, HELPINFO *lpStruct, PHELPINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheHELPINFOFids(env, lpObject, lpCache);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, lpCache->cbSize);
lpStruct->iContextType = (*env)->GetIntField(env, lpObject, lpCache->iContextType);
lpStruct->iCtrlId = (*env)->GetIntField(env, lpObject, lpCache->iCtrlId);
lpStruct->hItemHandle = (HANDLE)(*env)->GetIntField(env, lpObject, lpCache->hItemHandle);
lpStruct->dwContextId = (*env)->GetIntField(env, lpObject, lpCache->dwContextId);
lpStruct->MousePos.x = (*env)->GetIntField(env, lpObject, lpCache->x);
lpStruct->MousePos.y = (*env)->GetIntField(env, lpObject, lpCache->y);
return lpStruct;
}
void setHELPINFOFields(JNIEnv *env, jobject lpObject, HELPINFO *lpStruct, PHELPINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheHELPINFOFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->cbSize, lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, lpCache->iContextType, lpStruct->iContextType);
(*env)->SetIntField(env, lpObject, lpCache->iCtrlId, lpStruct->iCtrlId);
(*env)->SetIntField(env, lpObject, lpCache->hItemHandle, (jint)lpStruct->hItemHandle);
(*env)->SetIntField(env, lpObject, lpCache->dwContextId, lpStruct->dwContextId);
(*env)->SetIntField(env, lpObject, lpCache->x, lpStruct->MousePos.x);
(*env)->SetIntField(env, lpObject, lpCache->y, lpStruct->MousePos.y);
}
#endif // _WIN32_WCE
void cacheICONINFOFids(JNIEnv *env, jobject lpObject, PICONINFO_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->fIcon = (*env)->GetFieldID(env, lpCache->clazz, "fIcon", "Z");
lpCache->xHotspot = (*env)->GetFieldID(env, lpCache->clazz, "xHotspot", "I");
lpCache->yHotspot = (*env)->GetFieldID(env, lpCache->clazz, "yHotspot", "I");
lpCache->hbmMask = (*env)->GetFieldID(env, lpCache->clazz, "hbmMask", "I");
lpCache->hbmColor = (*env)->GetFieldID(env, lpCache->clazz, "hbmColor", "I");
lpCache->cached = 1;
}
ICONINFO* getICONINFOFields(JNIEnv *env, jobject lpObject, ICONINFO *lpStruct, PICONINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheICONINFOFids(env, lpObject, lpCache);
lpStruct->fIcon = (*env)->GetBooleanField(env, lpObject, lpCache->fIcon);
lpStruct->xHotspot = (*env)->GetIntField(env, lpObject, lpCache->xHotspot);
lpStruct->yHotspot = (*env)->GetIntField(env, lpObject, lpCache->yHotspot);
lpStruct->hbmMask = (HBITMAP)(*env)->GetIntField(env, lpObject, lpCache->hbmMask);
lpStruct->hbmColor = (HBITMAP)(*env)->GetIntField(env, lpObject, lpCache->hbmColor);
return lpStruct;
}
void setICONINFOFields(JNIEnv *env, jobject lpObject, ICONINFO *lpStruct, PICONINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheICONINFOFids(env, lpObject, lpCache);
(*env)->SetBooleanField(env, lpObject, lpCache->fIcon, (jboolean)lpStruct->fIcon);
(*env)->SetIntField(env, lpObject, lpCache->xHotspot, lpStruct->xHotspot);
(*env)->SetIntField(env, lpObject, lpCache->yHotspot, lpStruct->yHotspot);
(*env)->SetIntField(env, lpObject, lpCache->hbmMask, (jint)lpStruct->hbmMask);
(*env)->SetIntField(env, lpObject, lpCache->hbmColor, (jint)lpStruct->hbmColor);
}
void cacheINITCOMMONCONTROLSEXFids(JNIEnv *env, jobject lpObject, PINITCOMMONCONTROLSEX_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->dwSize = (*env)->GetFieldID(env, lpCache->clazz, "dwSize", "I");
lpCache->dwICC = (*env)->GetFieldID(env, lpCache->clazz, "dwICC", "I");
lpCache->cached = 1;
}
INITCOMMONCONTROLSEX* getINITCOMMONCONTROLSEXFields(JNIEnv *env, jobject lpObject, INITCOMMONCONTROLSEX *lpStruct, PINITCOMMONCONTROLSEX_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheINITCOMMONCONTROLSEXFids(env, lpObject, lpCache);
lpStruct->dwSize = (*env)->GetIntField(env, lpObject, lpCache->dwSize);
lpStruct->dwICC = (*env)->GetIntField(env, lpObject, lpCache->dwICC);
return lpStruct;
}
void setINITCOMMONCONTROLSEXFields(JNIEnv *env, jobject lpObject, INITCOMMONCONTROLSEX *lpStruct, PINITCOMMONCONTROLSEX_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheINITCOMMONCONTROLSEXFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->dwSize, lpStruct->dwSize);
(*env)->SetIntField(env, lpObject, lpCache->dwICC, lpStruct->dwICC);
}
void cacheLOGBRUSHFids(JNIEnv *env, jobject lpObject, PLOGBRUSH_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->lbStyle = (*env)->GetFieldID(env, lpCache->clazz, "lbStyle", "I");
lpCache->lbColor = (*env)->GetFieldID(env, lpCache->clazz, "lbColor", "I");
lpCache->lbHatch = (*env)->GetFieldID(env, lpCache->clazz, "lbHatch", "I");
lpCache->cached = 1;
}
LOGBRUSH* getLOGBRUSHFields(JNIEnv *env, jobject lpObject, LOGBRUSH *lpStruct, PLOGBRUSH_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLOGBRUSHFids(env, lpObject, lpCache);
lpStruct->lbStyle = (*env)->GetIntField(env, lpObject, lpCache->lbStyle);
lpStruct->lbColor = (*env)->GetIntField(env, lpObject, lpCache->lbColor);
lpStruct->lbHatch = (*env)->GetIntField(env, lpObject, lpCache->lbHatch);
return lpStruct;
}
void setLOGBRUSHFields(JNIEnv *env, jobject lpObject, LOGBRUSH *lpStruct, PLOGBRUSH_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLOGBRUSHFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->lbStyle, lpStruct->lbStyle);
(*env)->SetIntField(env, lpObject, lpCache->lbColor, lpStruct->lbColor);
(*env)->SetIntField(env, lpObject, lpCache->lbHatch, lpStruct->lbHatch);
}
void cacheLOGFONTFids(JNIEnv *env, jobject lpObject, PLOGFONT_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->lfHeight = (*env)->GetFieldID(env, lpCache->clazz, "lfHeight", "I");
lpCache->lfWidth = (*env)->GetFieldID(env, lpCache->clazz, "lfWidth", "I");
lpCache->lfEscapement = (*env)->GetFieldID(env, lpCache->clazz, "lfEscapement", "I");
lpCache->lfOrientation = (*env)->GetFieldID(env, lpCache->clazz, "lfOrientation", "I");
lpCache->lfWeight = (*env)->GetFieldID(env, lpCache->clazz, "lfWeight", "I");
lpCache->lfItalic = (*env)->GetFieldID(env, lpCache->clazz, "lfItalic", "B");
lpCache->lfUnderline = (*env)->GetFieldID(env, lpCache->clazz, "lfUnderline", "B");
lpCache->lfStrikeOut = (*env)->GetFieldID(env, lpCache->clazz, "lfStrikeOut", "B");
lpCache->lfCharSet = (*env)->GetFieldID(env, lpCache->clazz, "lfCharSet", "B");
lpCache->lfOutPrecision = (*env)->GetFieldID(env, lpCache->clazz, "lfOutPrecision", "B");
lpCache->lfClipPrecision = (*env)->GetFieldID(env, lpCache->clazz, "lfClipPrecision", "B");
lpCache->lfQuality = (*env)->GetFieldID(env, lpCache->clazz, "lfQuality", "B");
lpCache->lfPitchAndFamily = (*env)->GetFieldID(env, lpCache->clazz, "lfPitchAndFamily", "B");
lpCache->lfFaceName0 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName0", "C");
lpCache->lfFaceName1 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName1", "C");
lpCache->lfFaceName2 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName2", "C");
lpCache->lfFaceName3 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName3", "C");
lpCache->lfFaceName4 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName4", "C");
lpCache->lfFaceName5 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName5", "C");
lpCache->lfFaceName6 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName6", "C");
lpCache->lfFaceName7 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName7", "C");
lpCache->lfFaceName8 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName8", "C");
lpCache->lfFaceName9 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName9", "C");
lpCache->lfFaceName10 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName10", "C");
lpCache->lfFaceName11 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName11", "C");
lpCache->lfFaceName12 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName12", "C");
lpCache->lfFaceName13 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName13", "C");
lpCache->lfFaceName14 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName14", "C");
lpCache->lfFaceName15 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName15", "C");
lpCache->lfFaceName16 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName16", "C");
lpCache->lfFaceName17 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName17", "C");
lpCache->lfFaceName18 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName18", "C");
lpCache->lfFaceName19 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName19", "C");
lpCache->lfFaceName20 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName20", "C");
lpCache->lfFaceName21 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName21", "C");
lpCache->lfFaceName22 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName22", "C");
lpCache->lfFaceName23 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName23", "C");
lpCache->lfFaceName24 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName24", "C");
lpCache->lfFaceName25 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName25", "C");
lpCache->lfFaceName26 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName26", "C");
lpCache->lfFaceName27 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName27", "C");
lpCache->lfFaceName28 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName28", "C");
lpCache->lfFaceName29 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName29", "C");
lpCache->lfFaceName30 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName30", "C");
lpCache->lfFaceName31 = (*env)->GetFieldID(env, lpCache->clazz, "lfFaceName31", "C");
lpCache->cached = 1;
}
#ifndef _WIN32_WCE
LOGFONTA* getLOGFONTAFields(JNIEnv *env, jobject lpObject, LOGFONTA *lpStruct, LOGFONT_FID_CACHE *lpCache)
{
if (!lpCache->cached) cacheLOGFONTFids(env, lpObject, lpCache);
lpStruct->lfHeight = (*env)->GetIntField(env,lpObject,lpCache->lfHeight);
lpStruct->lfWidth = (*env)->GetIntField(env,lpObject,lpCache->lfWidth);
lpStruct->lfEscapement = (*env)->GetIntField(env,lpObject,lpCache->lfEscapement);
lpStruct->lfOrientation = (*env)->GetIntField(env,lpObject,lpCache->lfOrientation);
lpStruct->lfWeight = (*env)->GetIntField(env,lpObject,lpCache->lfWeight);
lpStruct->lfItalic = (*env)->GetByteField(env,lpObject,lpCache->lfItalic);
lpStruct->lfUnderline = (*env)->GetByteField(env,lpObject,lpCache->lfUnderline);
lpStruct->lfStrikeOut = (*env)->GetByteField(env,lpObject,lpCache->lfStrikeOut);
lpStruct->lfCharSet = (*env)->GetByteField(env,lpObject,lpCache->lfCharSet);
lpStruct->lfOutPrecision = (*env)->GetByteField(env,lpObject,lpCache->lfOutPrecision);
lpStruct->lfClipPrecision = (*env)->GetByteField(env,lpObject,lpCache->lfClipPrecision);
lpStruct->lfQuality = (*env)->GetByteField(env,lpObject,lpCache->lfQuality);
lpStruct->lfPitchAndFamily = (*env)->GetByteField(env,lpObject,lpCache->lfPitchAndFamily);
{
WCHAR lfFaceName [32];
lfFaceName[0] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName0);
lfFaceName[1] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName1);
lfFaceName[2] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName2);
lfFaceName[3] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName3);
lfFaceName[4] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName4);
lfFaceName[5] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName5);
lfFaceName[6] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName6);
lfFaceName[7] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName7);
lfFaceName[8] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName8);
lfFaceName[9] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName9);
lfFaceName[10] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName10);
lfFaceName[11] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName11);
lfFaceName[12] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName12);
lfFaceName[13] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName13);
lfFaceName[14] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName14);
lfFaceName[15] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName15);
lfFaceName[16] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName16);
lfFaceName[17] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName17);
lfFaceName[18] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName18);
lfFaceName[19] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName19);
lfFaceName[20] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName20);
lfFaceName[21] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName21);
lfFaceName[22] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName22);
lfFaceName[23] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName23);
lfFaceName[24] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName24);
lfFaceName[25] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName25);
lfFaceName[26] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName26);
lfFaceName[27] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName27);
lfFaceName[28] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName28);
lfFaceName[29] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName29);
lfFaceName[30] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName30);
lfFaceName[31] = (*env)->GetCharField(env,lpObject,lpCache->lfFaceName31);
WideCharToMultiByte (CP_ACP, 0, lfFaceName, 32, lpStruct->lfFaceName, 32, NULL, NULL);
}
return lpStruct;
}
void setLOGFONTAFields(JNIEnv *env, jobject lpObject, LOGFONTA *lpStruct, LOGFONT_FID_CACHE *lpCache)
{
if (!lpCache->cached) cacheLOGFONTFids(env, lpObject, lpCache);
(*env)->SetIntField(env,lpObject,lpCache->lfHeight, lpStruct->lfHeight);
(*env)->SetIntField(env,lpObject,lpCache->lfWidth, lpStruct->lfWidth);
(*env)->SetIntField(env,lpObject,lpCache->lfEscapement, lpStruct->lfEscapement);
(*env)->SetIntField(env,lpObject,lpCache->lfOrientation, lpStruct->lfOrientation);
(*env)->SetIntField(env,lpObject,lpCache->lfWeight, lpStruct->lfWeight);
(*env)->SetByteField(env,lpObject,lpCache->lfItalic, lpStruct->lfItalic);
(*env)->SetByteField(env,lpObject,lpCache->lfUnderline, lpStruct->lfUnderline);
(*env)->SetByteField(env,lpObject,lpCache->lfStrikeOut, lpStruct->lfStrikeOut);
(*env)->SetByteField(env,lpObject,lpCache->lfCharSet, lpStruct->lfCharSet);
(*env)->SetByteField(env,lpObject,lpCache->lfOutPrecision, lpStruct->lfOutPrecision);
(*env)->SetByteField(env,lpObject,lpCache->lfClipPrecision, lpStruct->lfClipPrecision);
(*env)->SetByteField(env,lpObject,lpCache->lfQuality, lpStruct->lfQuality);
(*env)->SetByteField(env,lpObject,lpCache->lfPitchAndFamily, lpStruct->lfPitchAndFamily);
{
WCHAR lfFaceName [32] = {0};
MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, lpStruct->lfFaceName, -1, lfFaceName, 32);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName0, lfFaceName[0]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName1, lfFaceName[1]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName2, lfFaceName[2]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName3, lfFaceName[3]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName4, lfFaceName[4]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName5, lfFaceName[5]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName6, lfFaceName[6]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName7, lfFaceName[7]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName8, lfFaceName[8]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName9, lfFaceName[9]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName10, lfFaceName[10]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName11, lfFaceName[11]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName12, lfFaceName[12]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName13, lfFaceName[13]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName14, lfFaceName[14]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName15, lfFaceName[15]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName16, lfFaceName[16]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName17, lfFaceName[17]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName18, lfFaceName[18]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName19, lfFaceName[19]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName20, lfFaceName[20]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName21, lfFaceName[21]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName22, lfFaceName[22]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName23, lfFaceName[23]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName24, lfFaceName[24]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName25, lfFaceName[25]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName26, lfFaceName[26]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName27, lfFaceName[27]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName28, lfFaceName[28]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName29, lfFaceName[29]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName30, lfFaceName[30]);
(*env)->SetCharField(env,lpObject,lpCache->lfFaceName31, lfFaceName[31]);
}
}
#endif // _WIN32_WCE
LOGFONTW* getLOGFONTWFields(JNIEnv *env, jobject lpObject, LOGFONTW *lpStruct, PLOGFONT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLOGFONTFids(env, lpObject, lpCache);
lpStruct->lfHeight = (*env)->GetIntField(env, lpObject, lpCache->lfHeight);
lpStruct->lfWidth = (*env)->GetIntField(env, lpObject, lpCache->lfWidth);
lpStruct->lfEscapement = (*env)->GetIntField(env, lpObject, lpCache->lfEscapement);
lpStruct->lfOrientation = (*env)->GetIntField(env, lpObject, lpCache->lfOrientation);
lpStruct->lfWeight = (*env)->GetIntField(env, lpObject, lpCache->lfWeight);
lpStruct->lfItalic = (*env)->GetByteField(env, lpObject, lpCache->lfItalic);
lpStruct->lfUnderline = (*env)->GetByteField(env, lpObject, lpCache->lfUnderline);
lpStruct->lfStrikeOut = (*env)->GetByteField(env, lpObject, lpCache->lfStrikeOut);
lpStruct->lfCharSet = (*env)->GetByteField(env, lpObject, lpCache->lfCharSet);
lpStruct->lfOutPrecision = (*env)->GetByteField(env, lpObject, lpCache->lfOutPrecision);
lpStruct->lfClipPrecision = (*env)->GetByteField(env, lpObject, lpCache->lfClipPrecision);
lpStruct->lfQuality = (*env)->GetByteField(env, lpObject, lpCache->lfQuality);
lpStruct->lfPitchAndFamily = (*env)->GetByteField(env, lpObject, lpCache->lfPitchAndFamily);
lpStruct->lfFaceName[0] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName0);
lpStruct->lfFaceName[1] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName1);
lpStruct->lfFaceName[2] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName2);
lpStruct->lfFaceName[3] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName3);
lpStruct->lfFaceName[4] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName4);
lpStruct->lfFaceName[5] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName5);
lpStruct->lfFaceName[6] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName6);
lpStruct->lfFaceName[7] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName7);
lpStruct->lfFaceName[8] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName8);
lpStruct->lfFaceName[9] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName9);
lpStruct->lfFaceName[10] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName10);
lpStruct->lfFaceName[11] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName11);
lpStruct->lfFaceName[12] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName12);
lpStruct->lfFaceName[13] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName13);
lpStruct->lfFaceName[14] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName14);
lpStruct->lfFaceName[15] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName15);
lpStruct->lfFaceName[16] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName16);
lpStruct->lfFaceName[17] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName17);
lpStruct->lfFaceName[18] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName18);
lpStruct->lfFaceName[19] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName19);
lpStruct->lfFaceName[20] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName20);
lpStruct->lfFaceName[21] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName21);
lpStruct->lfFaceName[22] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName22);
lpStruct->lfFaceName[23] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName23);
lpStruct->lfFaceName[24] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName24);
lpStruct->lfFaceName[25] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName25);
lpStruct->lfFaceName[26] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName26);
lpStruct->lfFaceName[27] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName27);
lpStruct->lfFaceName[28] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName28);
lpStruct->lfFaceName[29] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName29);
lpStruct->lfFaceName[30] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName30);
lpStruct->lfFaceName[31] = (*env)->GetCharField(env, lpObject, lpCache->lfFaceName31);
return lpStruct;
}
void setLOGFONTWFields(JNIEnv *env, jobject lpObject, LOGFONTW *lpStruct, PLOGFONT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLOGFONTFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->lfHeight, lpStruct->lfHeight);
(*env)->SetIntField(env, lpObject, lpCache->lfWidth, lpStruct->lfWidth);
(*env)->SetIntField(env, lpObject, lpCache->lfEscapement, lpStruct->lfEscapement);
(*env)->SetIntField(env, lpObject, lpCache->lfOrientation, lpStruct->lfOrientation);
(*env)->SetIntField(env, lpObject, lpCache->lfWeight, lpStruct->lfWeight);
(*env)->SetByteField(env, lpObject, lpCache->lfItalic, lpStruct->lfItalic);
(*env)->SetByteField(env, lpObject, lpCache->lfUnderline, lpStruct->lfUnderline);
(*env)->SetByteField(env, lpObject, lpCache->lfStrikeOut, lpStruct->lfStrikeOut);
(*env)->SetByteField(env, lpObject, lpCache->lfCharSet, lpStruct->lfCharSet);
(*env)->SetByteField(env, lpObject, lpCache->lfOutPrecision, lpStruct->lfOutPrecision);
(*env)->SetByteField(env, lpObject, lpCache->lfClipPrecision, lpStruct->lfClipPrecision);
(*env)->SetByteField(env, lpObject, lpCache->lfQuality, lpStruct->lfQuality);
(*env)->SetByteField(env, lpObject, lpCache->lfPitchAndFamily, lpStruct->lfPitchAndFamily);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName0, lpStruct->lfFaceName[0]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName1, lpStruct->lfFaceName[1]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName2, lpStruct->lfFaceName[2]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName3, lpStruct->lfFaceName[3]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName4, lpStruct->lfFaceName[4]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName5, lpStruct->lfFaceName[5]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName6, lpStruct->lfFaceName[6]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName7, lpStruct->lfFaceName[7]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName8, lpStruct->lfFaceName[8]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName9, lpStruct->lfFaceName[9]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName10, lpStruct->lfFaceName[10]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName11, lpStruct->lfFaceName[11]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName12, lpStruct->lfFaceName[12]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName13, lpStruct->lfFaceName[13]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName14, lpStruct->lfFaceName[14]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName15, lpStruct->lfFaceName[15]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName16, lpStruct->lfFaceName[16]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName17, lpStruct->lfFaceName[17]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName18, lpStruct->lfFaceName[18]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName19, lpStruct->lfFaceName[19]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName20, lpStruct->lfFaceName[20]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName21, lpStruct->lfFaceName[21]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName22, lpStruct->lfFaceName[22]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName23, lpStruct->lfFaceName[23]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName24, lpStruct->lfFaceName[24]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName25, lpStruct->lfFaceName[25]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName26, lpStruct->lfFaceName[26]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName27, lpStruct->lfFaceName[27]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName28, lpStruct->lfFaceName[28]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName29, lpStruct->lfFaceName[29]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName30, lpStruct->lfFaceName[30]);
(*env)->SetCharField(env, lpObject, lpCache->lfFaceName31, lpStruct->lfFaceName[31]);
}
void cacheLOGPENFids(JNIEnv *env, jobject lpObject, PLOGPEN_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->lopnStyle = (*env)->GetFieldID(env, lpCache->clazz, "lopnStyle", "I");
lpCache->x = (*env)->GetFieldID(env, lpCache->clazz, "x", "I");
lpCache->y = (*env)->GetFieldID(env, lpCache->clazz, "y", "I");
lpCache->lopnColor = (*env)->GetFieldID(env, lpCache->clazz, "lopnColor", "I");
lpCache->cached = 1;
}
LOGPEN* getLOGPENFields(JNIEnv *env, jobject lpObject, LOGPEN *lpStruct, PLOGPEN_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLOGPENFids(env, lpObject, lpCache);
lpStruct->lopnStyle = (*env)->GetIntField(env, lpObject, lpCache->lopnStyle);
lpStruct->lopnWidth.x = (*env)->GetIntField(env, lpObject, lpCache->x);
lpStruct->lopnWidth.y = (*env)->GetIntField(env, lpObject, lpCache->y);
lpStruct->lopnColor = (*env)->GetIntField(env, lpObject, lpCache->lopnColor);
return lpStruct;
}
void setLOGPENFields(JNIEnv *env, jobject lpObject, LOGPEN *lpStruct, PLOGPEN_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLOGPENFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->lopnStyle, lpStruct->lopnStyle);
(*env)->SetIntField(env, lpObject, lpCache->x, lpStruct->lopnWidth.x);
(*env)->SetIntField(env, lpObject, lpCache->y, lpStruct->lopnWidth.y);
(*env)->SetIntField(env, lpObject, lpCache->lopnColor, lpStruct->lopnColor);
}
void cacheLVCOLUMNFids(JNIEnv *env, jobject lpObject, PLVCOLUMN_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->mask = (*env)->GetFieldID(env, lpCache->clazz, "mask", "I");
lpCache->fmt = (*env)->GetFieldID(env, lpCache->clazz, "fmt", "I");
lpCache->cx = (*env)->GetFieldID(env, lpCache->clazz, "cx", "I");
lpCache->pszText = (*env)->GetFieldID(env, lpCache->clazz, "pszText", "I");
lpCache->cchTextMax = (*env)->GetFieldID(env, lpCache->clazz, "cchTextMax", "I");
lpCache->iSubItem = (*env)->GetFieldID(env, lpCache->clazz, "iSubItem", "I");
lpCache->iImage = (*env)->GetFieldID(env, lpCache->clazz, "iImage", "I");
lpCache->iOrder = (*env)->GetFieldID(env, lpCache->clazz, "iOrder", "I");
lpCache->cached = 1;
}
LVCOLUMN* getLVCOLUMNFields(JNIEnv *env, jobject lpObject, LVCOLUMN *lpStruct, PLVCOLUMN_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLVCOLUMNFids(env, lpObject, lpCache);
lpStruct->mask = (*env)->GetIntField(env, lpObject, lpCache->mask);
lpStruct->fmt = (*env)->GetIntField(env, lpObject, lpCache->fmt);
lpStruct->cx = (*env)->GetIntField(env, lpObject, lpCache->cx);
lpStruct->pszText = (LPTSTR)(*env)->GetIntField(env, lpObject, lpCache->pszText);
lpStruct->cchTextMax = (*env)->GetIntField(env, lpObject, lpCache->cchTextMax);
lpStruct->iSubItem = (*env)->GetIntField(env, lpObject, lpCache->iSubItem);
lpStruct->iImage = (*env)->GetIntField(env, lpObject, lpCache->iImage);
lpStruct->iOrder = (*env)->GetIntField(env, lpObject, lpCache->iOrder);
return lpStruct;
}
void setLVCOLUMNFields(JNIEnv *env, jobject lpObject, LVCOLUMN *lpStruct, PLVCOLUMN_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLVCOLUMNFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->mask, lpStruct->mask);
(*env)->SetIntField(env, lpObject, lpCache->fmt, lpStruct->fmt);
(*env)->SetIntField(env, lpObject, lpCache->cx, lpStruct->cx);
(*env)->SetIntField(env, lpObject, lpCache->pszText, (jint)lpStruct->pszText);
(*env)->SetIntField(env, lpObject, lpCache->cchTextMax, lpStruct->cchTextMax);
(*env)->SetIntField(env, lpObject, lpCache->iSubItem, lpStruct->iSubItem);
(*env)->SetIntField(env, lpObject, lpCache->iImage, lpStruct->iImage);
(*env)->SetIntField(env, lpObject, lpCache->iOrder, lpStruct->iOrder);
}
void cacheLVHITTESTINFOFids(JNIEnv *env, jobject lpObject, PLVHITTESTINFO_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->x = (*env)->GetFieldID(env, lpCache->clazz, "x", "I");
lpCache->y = (*env)->GetFieldID(env, lpCache->clazz, "y", "I");
lpCache->flags = (*env)->GetFieldID(env, lpCache->clazz, "flags", "I");
lpCache->iItem = (*env)->GetFieldID(env, lpCache->clazz, "iItem", "I");
lpCache->iSubItem = (*env)->GetFieldID(env, lpCache->clazz, "iSubItem", "I");
lpCache->cached = 1;
}
LVHITTESTINFO* getLVHITTESTINFOFields(JNIEnv *env, jobject lpObject, LVHITTESTINFO *lpStruct, PLVHITTESTINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLVHITTESTINFOFids(env, lpObject, lpCache);
lpStruct->pt.x = (*env)->GetIntField(env, lpObject, lpCache->x);
lpStruct->pt.y = (*env)->GetIntField(env, lpObject, lpCache->y);
lpStruct->flags = (*env)->GetIntField(env, lpObject, lpCache->flags);
lpStruct->iItem = (*env)->GetIntField(env, lpObject, lpCache->iItem);
lpStruct->iSubItem = (*env)->GetIntField(env, lpObject, lpCache->iSubItem);
return lpStruct;
}
void setLVHITTESTINFOFields(JNIEnv *env, jobject lpObject, LVHITTESTINFO *lpStruct, PLVHITTESTINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLVHITTESTINFOFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->x, lpStruct->pt.x);
(*env)->SetIntField(env, lpObject, lpCache->y, lpStruct->pt.y);
(*env)->SetIntField(env, lpObject, lpCache->flags, lpStruct->flags);
(*env)->SetIntField(env, lpObject, lpCache->iItem, lpStruct->iItem);
(*env)->SetIntField(env, lpObject, lpCache->iSubItem, lpStruct->iSubItem);
}
void cacheLVITEMFids(JNIEnv *env, jobject lpObject, PLVITEM_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->mask = (*env)->GetFieldID(env, lpCache->clazz, "mask", "I");
lpCache->iItem = (*env)->GetFieldID(env, lpCache->clazz, "iItem", "I");
lpCache->iSubItem = (*env)->GetFieldID(env, lpCache->clazz, "iSubItem", "I");
lpCache->state = (*env)->GetFieldID(env, lpCache->clazz, "state", "I");
lpCache->stateMask = (*env)->GetFieldID(env, lpCache->clazz, "stateMask", "I");
lpCache->pszText = (*env)->GetFieldID(env, lpCache->clazz, "pszText", "I");
lpCache->cchTextMax = (*env)->GetFieldID(env, lpCache->clazz, "cchTextMax", "I");
lpCache->iImage = (*env)->GetFieldID(env, lpCache->clazz, "iImage", "I");
lpCache->lParam = (*env)->GetFieldID(env, lpCache->clazz, "lParam", "I");
lpCache->iIndent = (*env)->GetFieldID(env, lpCache->clazz, "iIndent", "I");
lpCache->cached = 1;
}
LVITEM* getLVITEMFields(JNIEnv *env, jobject lpObject, LVITEM *lpStruct, PLVITEM_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLVITEMFids(env, lpObject, lpCache);
lpStruct->mask = (*env)->GetIntField(env, lpObject, lpCache->mask);
lpStruct->iItem = (*env)->GetIntField(env, lpObject, lpCache->iItem);
lpStruct->iSubItem = (*env)->GetIntField(env, lpObject, lpCache->iSubItem);
lpStruct->state = (*env)->GetIntField(env, lpObject, lpCache->state);
lpStruct->stateMask = (*env)->GetIntField(env, lpObject, lpCache->stateMask);
lpStruct->pszText = (LPTSTR)(*env)->GetIntField(env, lpObject, lpCache->pszText);
lpStruct->cchTextMax = (*env)->GetIntField(env, lpObject, lpCache->cchTextMax);
lpStruct->iImage = (*env)->GetIntField(env, lpObject, lpCache->iImage);
lpStruct->lParam = (*env)->GetIntField(env, lpObject, lpCache->lParam);
lpStruct->iIndent = (*env)->GetIntField(env, lpObject, lpCache->iIndent);
return lpStruct;
}
void setLVITEMFields(JNIEnv *env, jobject lpObject, LVITEM *lpStruct, PLVITEM_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheLVITEMFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->mask, lpStruct->mask);
(*env)->SetIntField(env, lpObject, lpCache->iItem, lpStruct->iItem);
(*env)->SetIntField(env, lpObject, lpCache->iSubItem, lpStruct->iSubItem);
(*env)->SetIntField(env, lpObject, lpCache->state, lpStruct->state);
(*env)->SetIntField(env, lpObject, lpCache->stateMask, lpStruct->stateMask);
(*env)->SetIntField(env, lpObject, lpCache->pszText, (jint)lpStruct->pszText);
(*env)->SetIntField(env, lpObject, lpCache->cchTextMax, lpStruct->cchTextMax);
(*env)->SetIntField(env, lpObject, lpCache->iImage, lpStruct->iImage);
(*env)->SetIntField(env, lpObject, lpCache->lParam, lpStruct->lParam);
(*env)->SetIntField(env, lpObject, lpCache->iIndent, lpStruct->iIndent);
}
void cacheMEASUREITEMSTRUCTFids(JNIEnv *env, jobject lpObject, PMEASUREITEMSTRUCT_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->CtlType = (*env)->GetFieldID(env, lpCache->clazz, "CtlType", "I");
lpCache->CtlID = (*env)->GetFieldID(env, lpCache->clazz, "CtlID", "I");
lpCache->itemID = (*env)->GetFieldID(env, lpCache->clazz, "itemID", "I");
lpCache->itemWidth = (*env)->GetFieldID(env, lpCache->clazz, "itemWidth", "I");
lpCache->itemHeight = (*env)->GetFieldID(env, lpCache->clazz, "itemHeight", "I");
lpCache->itemData = (*env)->GetFieldID(env, lpCache->clazz, "itemData", "I");
lpCache->cached = 1;
}
MEASUREITEMSTRUCT* getMEASUREITEMSTRUCTFields(JNIEnv *env, jobject lpObject, MEASUREITEMSTRUCT *lpStruct, PMEASUREITEMSTRUCT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheMEASUREITEMSTRUCTFids(env, lpObject, lpCache);
lpStruct->CtlType = (*env)->GetIntField(env, lpObject, lpCache->CtlType);
lpStruct->CtlID = (*env)->GetIntField(env, lpObject, lpCache->CtlID);
lpStruct->itemID = (*env)->GetIntField(env, lpObject, lpCache->itemID);
lpStruct->itemWidth = (*env)->GetIntField(env, lpObject, lpCache->itemWidth);
lpStruct->itemHeight = (*env)->GetIntField(env, lpObject, lpCache->itemHeight);
lpStruct->itemData = (*env)->GetIntField(env, lpObject, lpCache->itemData);
return lpStruct;
}
void setMEASUREITEMSTRUCTFields(JNIEnv *env, jobject lpObject, MEASUREITEMSTRUCT *lpStruct, PMEASUREITEMSTRUCT_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheMEASUREITEMSTRUCTFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->CtlType, lpStruct->CtlType);
(*env)->SetIntField(env, lpObject, lpCache->CtlID, lpStruct->CtlID);
(*env)->SetIntField(env, lpObject, lpCache->itemID, lpStruct->itemID);
(*env)->SetIntField(env, lpObject, lpCache->itemWidth, lpStruct->itemWidth);
(*env)->SetIntField(env, lpObject, lpCache->itemHeight, lpStruct->itemHeight);
(*env)->SetIntField(env, lpObject, lpCache->itemData, lpStruct->itemData);
}
#ifndef _WIN32_WCE
void cacheMENUINFOFids(JNIEnv *env, jobject lpObject, PMENUINFO_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->cbSize = (*env)->GetFieldID(env, lpCache->clazz, "cbSize", "I");
lpCache->fMask = (*env)->GetFieldID(env, lpCache->clazz, "fMask", "I");
lpCache->dwStyle = (*env)->GetFieldID(env, lpCache->clazz, "dwStyle", "I");
lpCache->cyMax = (*env)->GetFieldID(env, lpCache->clazz, "cyMax", "I");
lpCache->hbrBack = (*env)->GetFieldID(env, lpCache->clazz, "hbrBack", "I");
lpCache->dwContextHelpID = (*env)->GetFieldID(env, lpCache->clazz, "dwContextHelpID", "I");
lpCache->dwMenuData = (*env)->GetFieldID(env, lpCache->clazz, "dwMenuData", "I");
lpCache->cached = 1;
}
MENUINFO* getMENUINFOFields(JNIEnv *env, jobject lpObject, MENUINFO *lpStruct, PMENUINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheMENUINFOFids(env, lpObject, lpCache);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, lpCache->cbSize);
lpStruct->fMask = (*env)->GetIntField(env, lpObject, lpCache->fMask);
lpStruct->dwStyle = (*env)->GetIntField(env, lpObject, lpCache->dwStyle);
lpStruct->cyMax = (*env)->GetIntField(env, lpObject, lpCache->cyMax);
lpStruct->hbrBack = (HBRUSH)(*env)->GetIntField(env, lpObject, lpCache->hbrBack);
lpStruct->dwContextHelpID = (*env)->GetIntField(env, lpObject, lpCache->dwContextHelpID);
lpStruct->dwMenuData = (*env)->GetIntField(env, lpObject, lpCache->dwMenuData);
return lpStruct;
}
void setMENUINFOFields(JNIEnv *env, jobject lpObject, MENUINFO *lpStruct, PMENUINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheMENUINFOFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->cbSize, lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, lpCache->fMask, lpStruct->fMask);
(*env)->SetIntField(env, lpObject, lpCache->dwStyle, lpStruct->dwStyle);
(*env)->SetIntField(env, lpObject, lpCache->cyMax, lpStruct->cyMax);
(*env)->SetIntField(env, lpObject, lpCache->hbrBack, (jint)lpStruct->hbrBack);
(*env)->SetIntField(env, lpObject, lpCache->dwContextHelpID, lpStruct->dwContextHelpID);
(*env)->SetIntField(env, lpObject, lpCache->dwMenuData, lpStruct->dwMenuData);
}
#endif // _WIN32_WCE
void cacheMENUITEMINFOFids(JNIEnv *env, jobject lpObject, PMENUITEMINFO_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->cbSize = (*env)->GetFieldID(env, lpCache->clazz, "cbSize", "I");
lpCache->fMask = (*env)->GetFieldID(env, lpCache->clazz, "fMask", "I");
lpCache->fType = (*env)->GetFieldID(env, lpCache->clazz, "fType", "I");
lpCache->fState = (*env)->GetFieldID(env, lpCache->clazz, "fState", "I");
lpCache->wID = (*env)->GetFieldID(env, lpCache->clazz, "wID", "I");
lpCache->hSubMenu = (*env)->GetFieldID(env, lpCache->clazz, "hSubMenu", "I");
lpCache->hbmpChecked = (*env)->GetFieldID(env, lpCache->clazz, "hbmpChecked", "I");
lpCache->hbmpUnchecked = (*env)->GetFieldID(env, lpCache->clazz, "hbmpUnchecked", "I");
lpCache->dwItemData = (*env)->GetFieldID(env, lpCache->clazz, "dwItemData", "I");
lpCache->dwTypeData = (*env)->GetFieldID(env, lpCache->clazz, "dwTypeData", "I");
lpCache->cch = (*env)->GetFieldID(env, lpCache->clazz, "cch", "I");
lpCache->hbmpItem = (*env)->GetFieldID(env, lpCache->clazz, "hbmpItem", "I");
lpCache->cached = 1;
}
MENUITEMINFO* getMENUITEMINFOFields(JNIEnv *env, jobject lpObject, MENUITEMINFO *lpStruct, PMENUITEMINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheMENUITEMINFOFids(env, lpObject, lpCache);
lpStruct->cbSize = (*env)->GetIntField(env, lpObject, lpCache->cbSize);
lpStruct->fMask = (*env)->GetIntField(env, lpObject, lpCache->fMask);
lpStruct->fType = (*env)->GetIntField(env, lpObject, lpCache->fType);
lpStruct->fState = (*env)->GetIntField(env, lpObject, lpCache->fState);
lpStruct->wID = (*env)->GetIntField(env, lpObject, lpCache->wID);
lpStruct->hSubMenu = (HMENU)(*env)->GetIntField(env, lpObject, lpCache->hSubMenu);
lpStruct->hbmpChecked = (HBITMAP)(*env)->GetIntField(env, lpObject, lpCache->hbmpChecked);
lpStruct->hbmpUnchecked = (HBITMAP)(*env)->GetIntField(env, lpObject, lpCache->hbmpUnchecked);
lpStruct->dwItemData = (*env)->GetIntField(env, lpObject, lpCache->dwItemData);
lpStruct->dwTypeData = (LPTSTR)(*env)->GetIntField(env, lpObject, lpCache->dwTypeData);
lpStruct->cch = (*env)->GetIntField(env, lpObject, lpCache->cch);
#ifndef _WIN32_WCE
lpStruct->hbmpItem = (HBITMAP)(*env)->GetIntField(env, lpObject, lpCache->hbmpItem);
#endif
return lpStruct;
}
void setMENUITEMINFOFields(JNIEnv *env, jobject lpObject, MENUITEMINFO *lpStruct, PMENUITEMINFO_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheMENUITEMINFOFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->cbSize, lpStruct->cbSize);
(*env)->SetIntField(env, lpObject, lpCache->fMask, lpStruct->fMask);
(*env)->SetIntField(env, lpObject, lpCache->fType, lpStruct->fType);
(*env)->SetIntField(env, lpObject, lpCache->fState, lpStruct->fState);
(*env)->SetIntField(env, lpObject, lpCache->wID, lpStruct->wID);
(*env)->SetIntField(env, lpObject, lpCache->hSubMenu, (jint)lpStruct->hSubMenu);
(*env)->SetIntField(env, lpObject, lpCache->hbmpChecked, (jint)lpStruct->hbmpChecked);
(*env)->SetIntField(env, lpObject, lpCache->hbmpUnchecked, (jint)lpStruct->hbmpUnchecked);
(*env)->SetIntField(env, lpObject, lpCache->dwItemData, lpStruct->dwItemData);
(*env)->SetIntField(env, lpObject, lpCache->dwTypeData, (jint)lpStruct->dwTypeData);
(*env)->SetIntField(env, lpObject, lpCache->cch, lpStruct->cch);
#ifndef _WIN32_WCE
(*env)->SetIntField(env, lpObject, lpCache->hbmpItem, (jint)lpStruct->hbmpItem);
#endif
}
void cacheMSGFids(JNIEnv *env, jobject lpObject, PMSG_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->hwnd = (*env)->GetFieldID(env, lpCache->clazz, "hwnd", "I");
lpCache->message = (*env)->GetFieldID(env, lpCache->clazz, "message", "I");
lpCache->wParam = (*env)->GetFieldID(env, lpCache->clazz, "wParam", "I");
lpCache->lParam = (*env)->GetFieldID(env, lpCache->clazz, "lParam", "I");
lpCache->time = (*env)->GetFieldID(env, lpCache->clazz, "time", "I");
lpCache->x = (*env)->GetFieldID(env, lpCache->clazz, "x", "I");
lpCache->y = (*env)->GetFieldID(env, lpCache->clazz, "y", "I");
lpCache->cached = 1;
}
MSG* getMSGFields(JNIEnv *env, jobject lpObject, MSG *lpStruct, PMSG_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheMSGFids(env, lpObject, lpCache);
lpStruct->hwnd = (HWND)(*env)->GetIntField(env, lpObject, lpCache->hwnd);
lpStruct->message = (*env)->GetIntField(env, lpObject, lpCache->message);
lpStruct->wParam = (*env)->GetIntField(env, lpObject, lpCache->wParam);
lpStruct->lParam = (*env)->GetIntField(env, lpObject, lpCache->lParam);
lpStruct->time = (*env)->GetIntField(env, lpObject, lpCache->time);
lpStruct->pt.x = (*env)->GetIntField(env, lpObject, lpCache->x);
lpStruct->pt.y = (*env)->GetIntField(env, lpObject, lpCache->y);
return lpStruct;
}
void setMSGFields(JNIEnv *env, jobject lpObject, MSG *lpStruct, PMSG_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheMSGFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->hwnd, (jint)lpStruct->hwnd);
(*env)->SetIntField(env, lpObject, lpCache->message, lpStruct->message);
(*env)->SetIntField(env, lpObject, lpCache->wParam, lpStruct->wParam);
(*env)->SetIntField(env, lpObject, lpCache->lParam, lpStruct->lParam);
(*env)->SetIntField(env, lpObject, lpCache->time, lpStruct->time);
(*env)->SetIntField(env, lpObject, lpCache->x, lpStruct->pt.x);
(*env)->SetIntField(env, lpObject, lpCache->y, lpStruct->pt.y);
}
void cacheNMHDRFids(JNIEnv *env, jobject lpObject, PNMHDR_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->hwndFrom = (*env)->GetFieldID(env, lpCache->clazz, "hwndFrom", "I");
lpCache->idFrom = (*env)->GetFieldID(env, lpCache->clazz, "idFrom", "I");
lpCache->code = (*env)->GetFieldID(env, lpCache->clazz, "code", "I");
lpCache->cached = 1;
}
NMHDR* getNMHDRFields(JNIEnv *env, jobject lpObject, NMHDR *lpStruct, PNMHDR_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheNMHDRFids(env, lpObject, lpCache);
lpStruct->hwndFrom = (HWND)(*env)->GetIntField(env, lpObject, lpCache->hwndFrom);
lpStruct->idFrom = (*env)->GetIntField(env, lpObject, lpCache->idFrom);
lpStruct->code = (*env)->GetIntField(env, lpObject, lpCache->code);
return lpStruct;
}
void setNMHDRFields(JNIEnv *env, jobject lpObject, NMHDR *lpStruct, PNMHDR_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheNMHDRFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->hwndFrom, (jint)lpStruct->hwndFrom);
(*env)->SetIntField(env, lpObject, lpCache->idFrom, lpStruct->idFrom);
(*env)->SetIntField(env, lpObject, lpCache->code, lpStruct->code);
}
void cacheNMHEADERFids(JNIEnv *env, jobject lpObject, PNMHEADER_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->hwndFrom = (*env)->GetFieldID(env, lpCache->clazz, "hwndFrom", "I");
lpCache->idFrom = (*env)->GetFieldID(env, lpCache->clazz, "idFrom", "I");
lpCache->code = (*env)->GetFieldID(env, lpCache->clazz, "code", "I");
lpCache->iItem = (*env)->GetFieldID(env, lpCache->clazz, "iItem", "I");
lpCache->iButton = (*env)->GetFieldID(env, lpCache->clazz, "iButton", "I");
lpCache->pitem = (*env)->GetFieldID(env, lpCache->clazz, "pitem", "I");
lpCache->cached = 1;
}
NMHEADER* getNMHEADERFields(JNIEnv *env, jobject lpObject, NMHEADER *lpStruct, PNMHEADER_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheNMHEADERFids(env, lpObject, lpCache);
lpStruct->hdr.hwndFrom = (HWND)(*env)->GetIntField(env, lpObject, lpCache->hwndFrom);
lpStruct->hdr.idFrom = (*env)->GetIntField(env, lpObject, lpCache->idFrom);
lpStruct->hdr.code = (*env)->GetIntField(env, lpObject, lpCache->code);
lpStruct->iItem = (*env)->GetIntField(env, lpObject, lpCache->iItem);
lpStruct->iButton = (*env)->GetIntField(env, lpObject, lpCache->iButton);
lpStruct->pitem = (HDITEM FAR *)(*env)->GetIntField(env, lpObject, lpCache->pitem);
return lpStruct;
}
void setNMHEADERFields(JNIEnv *env, jobject lpObject, NMHEADER *lpStruct, PNMHEADER_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheNMHEADERFids(env, lpObject, lpCache);
(*env)->SetIntField(env, lpObject, lpCache->hwndFrom, (jint)lpStruct->hdr.hwndFrom);
(*env)->SetIntField(env, lpObject, lpCache->idFrom, lpStruct->hdr.idFrom);
(*env)->SetIntField(env, lpObject, lpCache->code, lpStruct->hdr.code);
(*env)->SetIntField(env, lpObject, lpCache->iItem, lpStruct->iItem);
(*env)->SetIntField(env, lpObject, lpCache->iButton, lpStruct->iButton);
(*env)->SetIntField(env, lpObject, lpCache->pitem, (jint)lpStruct->pitem);
}
void cacheNMLISTVIEWFids(JNIEnv *env, jobject lpObject, PNMLISTVIEW_FID_CACHE lpCache)
{
if (lpCache->cached) return;
lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
lpCache->hwndFrom = (*env)->GetFieldID(env, lpCache->clazz, "hwndFrom", "I");
lpCache->idFrom = (*env)->GetFieldID(env, lpCache->clazz, "idFrom", "I");
lpCache->code = (*env)->GetFieldID(env, lpCache->clazz, "code", "I");
lpCache->iItem = (*env)->GetFieldID(env, lpCache->clazz, "iItem", "I");
lpCache->iSubItem = (*env)->GetFieldID(env, lpCache->clazz, "iSubItem", "I");
lpCache->uNewState = (*env)->GetFieldID(env, lpCache->clazz, "uNewState", "I");
lpCache->uOldState = (*env)->GetFieldID(env, lpCache->clazz, "uOldState", "I");
lpCache->uChanged = (*env)->GetFieldID(env, lpCache->clazz, "uChanged", "I");
lpCache->x = (*env)->GetFieldID(env, lpCache->clazz, "x", "I");
lpCache->y = (*env)->GetFieldID(env, lpCache->clazz, "y", "I");
lpCache->lParam = (*env)->GetFieldID(env, lpCache->clazz, "lParam", "I");
lpCache->cached = 1;
}
NMLISTVIEW* getNMLISTVIEWFields(JNIEnv *env, jobject lpObject, NMLISTVIEW *lpStruct, PNMLISTVIEW_FID_CACHE lpCache)
{
if (!lpCache->cached) cacheNMLISTVIEWFids(env, lpObject, lpCache);
lpStruct->hdr.hwndFrom = (HWND)(*env)->GetIntField(env, lpObject, lpCache->hwndFrom);
lpStruct->hdr.idFrom = (*env)->GetIntField(env, lpObject, lpCache->idFrom);
lpStruct->hdr.code = (*env)->GetIntField(env, lpObject, lpCache->code);