]>
git.saurik.com Git - wxWidgets.git/blob - src/mgl/utils.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Vaclav Slavik
6 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #include "wx/string.h"
15 #include "wx/process.h"
20 #include <sys/types.h>
25 #include "wx/unix/execute.h"
28 #include "wx/mgl/private.h"
30 //----------------------------------------------------------------------------
32 //----------------------------------------------------------------------------
39 // ----------------------------------------------------------------------------
40 // display characterstics
41 // ----------------------------------------------------------------------------
43 void wxDisplaySize(int *width
, int *height
)
45 wxASSERT_MSG( g_displayDC
, wxT("You must call wxApp::SetDisplayMode before using this function") );
46 if (width
) *width
= g_displayDC
->sizex()+1;
47 if (height
) *height
= g_displayDC
->sizey()+1;
50 void wxDisplaySizeMM(int *width
, int *height
)
52 wxASSERT_MSG( g_displayDC
, wxT("You must call wxApp::SetDisplayMode before using this function") );
54 *width
= (g_displayDC
->sizex()+1) * 25/72;
56 *height
= (g_displayDC
->sizey()+1) * 25/72;
57 // FIXME_MGL -- what about returning *real* monitor dimensions?
60 void wxClientDisplayRect(int *x
, int *y
, int *width
, int *height
)
64 wxDisplaySize(width
, height
);
65 // FIXME_MGL - windowed version needs different handling
68 bool wxColourDisplay()
70 wxASSERT_MSG( g_displayDC
, wxT("You must call wxApp::SetDisplayMode before using this function") );
72 return (wxDisplayDepth() > 1);
77 wxASSERT_MSG( g_displayDC
, wxT("You must call wxApp::SetDisplayMode before using this function") );
79 return g_displayDC
->getBitsPerPixel();
82 int wxGetOsVersion(int *majorVsn
, int *minorVsn
)
85 *majorVsn
= MGL_RELEASE_MAJOR
;
87 *minorVsn
= MGL_RELEASE_MINOR
;
91 #elif defined(__OS2__)
93 #elif defined(__WIN32__)
99 void wxGetMousePosition(int* x
, int* y
)
104 wxPoint
wxGetMousePosition()
107 wxGetMousePosition(&pt
.x
, &pt
.y
);
115 int wxAddProcessCallback(wxEndProcessData
*proc_data
, int fd
)
117 wxFAIL_MSG(wxT("wxAddProcessCallback not implemented in wxMGL!"));
119 #if 0 // FIXME_MGL -do we need it at all?
120 int tag
= gdk_input_add(fd
,
122 GTK_EndProcessDetector
,
123 (gpointer
)proc_data
);