#include <windows.h>
#include <mmsystem.h>
#undef STRICT
+#undef MAX_PRIORITY
+#undef MIN_PRIORITY
+#undef NORM_PRIORITY
#include <gcj/cni.h>
return (LRESULT)surface->WndProc((jint)hwnd, (jint)iMsg, (jint)wParam, (jint)lParam);
} else {
- java::lang::System::out->print(JvNewStringLatin1("miss on hwnd "));
- java::lang::System::out->println((jint)hwnd);
// this is really lame -- Win32 insists on being able to call your WndProc BEFORE CreateWindow returns...
return DefWindowProc(hwnd, iMsg, wParam, lParam);
}
0xFF, 0xFF, 0xFF, 0xFF
};
+
void org::xwt::plat::Win32::natInit() {
// grab desktop dc/handle
// Platform Methods ///////////////////////////////////////////////////////////////////
+void org::xwt::plat::Win32::__detectProxy(JArray<jstring>* container) {
+
+ HKEY hkey;
+ char buf[1024];
+ DWORD buflen = 1024;
+ DWORD type;
+ LONG result = RegOpenKey(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", &hkey);
+ if (result != ERROR_SUCCESS) return;
+
+ buf[0] = '\0';
+ type = REG_SZ;
+ buflen = 1024;
+ result = RegQueryValueEx(hkey, "AutoConfigURL", NULL, &type, (LPBYTE)buf, &buflen);
+ buf[buflen] = '\0';
+ if (result == ERROR_SUCCESS) elements(container)[2] = JvNewStringLatin1(buf);
+
+ buf[0] = '\0';
+ type = REG_BINARY;
+ RegQueryValueEx(hkey, "ProxyEnable", NULL, &type, (LPBYTE)buf, &buflen);
+ if (buf[0] != 1) return;
+
+ buf[0] = '\0';
+ type = REG_SZ;
+ buflen = 1024;
+ RegQueryValueEx(hkey, "ProxyServer", NULL, &type, (LPBYTE)buf, &buflen);
+ buf[buflen] = '\0';
+ elements(container)[0] = JvNewStringLatin1(buf);
+
+ buf[0] = '\0';
+ buflen = 1024;
+ RegQueryValueEx(hkey, "ProxyOverride", NULL, &type, (LPBYTE)buf, &buflen);
+ buf[buflen] = '\0';
+ elements(container)[1] = JvNewStringLatin1(buf);
+}
+
jstring org::xwt::plat::Win32::_getClipBoard() {
OpenClipboard((HWND)desktop_handle);
HGLOBAL hmem = GetClipboardData(CF_TEXT);
UINT iMsg = (UINT)_iMsg;
WPARAM wParam = (WPARAM)_wParam;
LPARAM lParam = (LPARAM)_lParam;
+
int oldmousex, oldmousey;
MINMAXINFO* mmi;
POINT point;
PAINTSTRUCT ps;
BeginPaint((HWND)org::xwt::plat::Win32$Win32Surface::hwnd, &ps);
Dirty(ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top);
- Refresh();
EndPaint((HWND)org::xwt::plat::Win32$Win32Surface::hwnd, &ps);
return 0;