]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mgl/utils.cpp
wxMGL fixes.
[wxWidgets.git] / src / mgl / utils.cpp
index 981be518716546dd3e4ac80437b326c48f068825..c20c5db3ef2be391b705c7add7321189ac525bc3 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        utils.cpp
+// Name:        src/mgl/utils.cpp
 // Purpose:
 // Author:      Vaclav Slavik
 // Id:          $Id$
 #endif
 
 #include "wx/utils.h"
-#include "wx/string.h"
 
-#include "wx/intl.h"
+#ifndef WX_PRECOMP
+    #include "wx/string.h"
+    #include "wx/intl.h"
+    #include "wx/log.h"
+#endif
+
 #include "wx/apptrait.h"
-#include "wx/log.h"
 #include "wx/process.h"
 
 #include <stdarg.h>
@@ -44,6 +47,16 @@ void wxBell()
     // FIXME_MGL
 }
 
+bool wxGetKeyState(wxKeyCode key)
+{
+    wxASSERT_MSG(key != WXK_LBUTTON && key != WXK_RBUTTON && key !=
+        WXK_MBUTTON, wxT("can't use wxGetKeyState() for mouse buttons"));
+
+    // TODO
+
+    return false;
+}
+
 // ----------------------------------------------------------------------------
 // display characterstics
 // ----------------------------------------------------------------------------
@@ -60,11 +73,11 @@ void wxDisplaySizeMM(int *width, int *height)
     wxASSERT_MSG( g_displayDC, wxT("You must call wxApp::SetDisplayMode before using this function") );
 
     int xDPI, yDPI;
-    MGL_getDotsPerInch(&xDPI, &yDPI);    
-    
-    if ( width ) 
+    MGL_getDotsPerInch(&xDPI, &yDPI);
+
+    if ( width )
         *width = (int)((g_displayDC->sizex()+1) * 25.4 / xDPI);
-    if ( height ) 
+    if ( height )
         *height = (int)((g_displayDC->sizey()+1) * 25.4 / yDPI);
 }
 
@@ -79,7 +92,7 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height)
 bool wxColourDisplay()
 {
     wxASSERT_MSG( g_displayDC, wxT("You must call wxApp::SetDisplayMode before using this function") );
-    
+
     return (wxDisplayDepth() > 1);
 }