]>
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("MGL display DC not created yet.") );
46 if (width
) *width
= g_displayDC
->sizex();
47 if (height
) *height
= g_displayDC
->sizey();
50 void wxDisplaySizeMM(int *width
, int *height
)
52 wxASSERT_MSG( g_displayDC
, wxT("MGL display DC not created yet.") );
54 *width
= g_displayDC
->sizex() * 25/72;
56 *height
= g_displayDC
->sizey() * 25/72;
57 // FIXME_MGL -- what about returning *real* monitor dimensions?
60 void wxClientDisplayRect(int *x
, int *y
, int *width
, int *height
)
62 // This is supposed to return desktop dimensions minus any window
63 // manager panels, menus, taskbars, etc. If there is a way to do that
64 // for this platform please fix this function, otherwise it defaults
65 // to the entire desktop.
68 wxDisplaySize(width
, height
);
69 // FIXME_MGL -- make it use wxDesktop class when there's one
72 bool wxColourDisplay()
74 wxASSERT_MSG( g_displayDC
, wxT("MGL display DC not created yet.") );
76 return (wxDisplayDepth() > 1);
81 wxASSERT_MSG( g_displayDC
, wxT("MGL display DC not created yet.") );
83 return g_displayDC
->getBitsPerPixel();
86 int wxGetOsVersion(int *majorVsn
, int *minorVsn
)
89 *majorVsn
= MGL_RELEASE_MAJOR
;
91 *minorVsn
= MGL_RELEASE_MINOR
;
95 #elif defined(__OS2__)
97 #elif defined(__WIN32__)
103 void wxGetMousePosition(int* x
, int* y
)
108 wxPoint
wxGetMousePosition()
111 wxGetMousePosition(&pt
.x
, &pt
.y
);
119 int wxAddProcessCallback(wxEndProcessData
*proc_data
, int fd
)
121 wxFAIL_MSG(wxT("wxAddProcessCallback not implemented in wxMGL!"));
123 #if 0 // FIXME_MGL -do we need it at all?
124 int tag
= gdk_input_add(fd
,
126 GTK_EndProcessDetector
,
127 (gpointer
)proc_data
);