2003/09/10 05:15:01
[org.ibex.core.git] / src / org / xwt / plat / Win32.cc
index 240b39a..208c2c3 100644 (file)
@@ -1,4 +1,8 @@
 // Copyright 2002 Adam Megacz, see the COPYING file for licensing [LGPL]
+#include "GCJ.cc"
+
+// we have to do this because the jpeg libraries use the symbol 'INT32'
+#define INT32 WIN32_INT32
 
 // this has to precede the others so we don't get collisions on min/max
 #include <org/xwt/Box.h>
@@ -37,8 +41,6 @@
 #include <java/lang/System.h>
 #include <java/io/PrintStream.h>
 
-#include "GCJ.cc"
-
 #define WM_USER_SETCURSOR WM_USER
 #define WM_USER_DISPOSE (WM_USER + 1)
 #define WM_USER_CREATEWINDOW (WM_USER + 2)
@@ -816,10 +818,10 @@ jint org::xwt::plat::Win32$Win32Surface::WndProc(jint _hwnd, jint _iMsg, jint _w
         addwidth = (window_rect.right - window_rect.left) - (client_rect.right - client_rect.left);
         addheight = (window_rect.bottom - window_rect.top) - (client_rect.bottom - client_rect.top);
         mmi = (MINMAXINFO*)lParam;
-        mmi->ptMinTrackSize.x = ((uint32_t)root->dmin(0)) + addwidth;
-        mmi->ptMinTrackSize.y = ((uint32_t)root->dmin(1)) + addheight;
-        mmi->ptMaxTrackSize.x = min(org::xwt::plat::Win32::getScreenWidth(), ((uint32_t)root->dmax(0)) + addwidth);
-        mmi->ptMaxTrackSize.y = min(org::xwt::plat::Win32::getScreenHeight(), ((uint32_t)root->dmax(1)) + addheight);
+        mmi->ptMinTrackSize.x = ((uint32_t)root->minwidth) + addwidth;
+        mmi->ptMinTrackSize.y = ((uint32_t)root->minheight) + addheight;
+        mmi->ptMaxTrackSize.x = min(org::xwt::plat::Win32::getScreenWidth(), ((uint32_t)root->maxwidth) + addwidth);
+        mmi->ptMaxTrackSize.y = min(org::xwt::plat::Win32::getScreenHeight(), ((uint32_t)root->maxheight) + addheight);
         return 0;
         
     case WM_PAINT: