]>
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 wxGetMousePosition(int* x
, int* y
)
55 wxPoint
wxGetMousePosition()
58 wxGetMousePosition(&pt
.x
, &pt
.y
);
62 bool wxColourDisplay()
64 wxASSERT_MSG( g_displayDC
, wxT("MGL display DC not created yet.") );
66 return (wxDisplayDepth() > 1);
71 wxASSERT_MSG( g_displayDC
, wxT("MGL display DC not created yet.") );
73 return g_displayDC
->getBitsPerPixel();
76 int wxGetOsVersion(int *majorVsn
, int *minorVsn
)
79 // FIXME_MGL : fix wxGetOsVersion, too
80 if (majorVsn
) *majorVsn
= GTK_MAJOR_VERSION
;
81 if (minorVsn
) *minorVsn
= GTK_MINOR_VERSION
;
90 int wxAddProcessCallback(wxEndProcessData
*proc_data
, int fd
)
92 #if 0 // FIXME_MGL -do we need it at all?
93 int tag
= gdk_input_add(fd
,
95 GTK_EndProcessDetector
,