X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FWin32.cc;h=3bb342e75c5293618594756ad662221548ad9e0a;hb=36c7cba0672b0b0ac61f484a918a34969100ca92;hp=acc51bd8a576b11d5dacdcf95390f9a7c34fcb62;hpb=bcc8b1b4cf4e4801d218151e6a7f9961972d91c1;p=org.ibex.core.git diff --git a/src/org/xwt/plat/Win32.cc b/src/org/xwt/plat/Win32.cc index acc51bd..3bb342e 100644 --- a/src/org/xwt/plat/Win32.cc +++ b/src/org/xwt/plat/Win32.cc @@ -13,6 +13,9 @@ #include #include #undef STRICT +#undef MAX_PRIORITY +#undef MIN_PRIORITY +#undef NORM_PRIORITY #include @@ -161,6 +164,7 @@ static unsigned char hand_cursor_and[32 * 4] = { 0xFF, 0xFF, 0xFF, 0xFF }; + void org::xwt::plat::Win32::natInit() { // grab desktop dc/handle @@ -233,6 +237,41 @@ void org::xwt::plat::Win32::natInit() { // Platform Methods /////////////////////////////////////////////////////////////////// +void org::xwt::plat::Win32::__detectProxy(JArray* 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); @@ -618,6 +657,7 @@ jint org::xwt::plat::Win32$Win32Surface::WndProc(jint _hwnd, jint _iMsg, jint _w UINT iMsg = (UINT)_iMsg; WPARAM wParam = (WPARAM)_wParam; LPARAM lParam = (LPARAM)_lParam; + int oldmousex, oldmousey; MINMAXINFO* mmi; POINT point;