]>
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"
16 #include "wx/process.h"
21 #include <sys/types.h>
26 #include "wx/unix/execute.h"
29 //----------------------------------------------------------------------------
31 //----------------------------------------------------------------------------
38 // ----------------------------------------------------------------------------
39 // display characterstics
40 // ----------------------------------------------------------------------------
42 extern MGLDevCtx
*g_displayDC
;
44 void wxDisplaySize( int *width
, int *height
)
46 wxASSERT_MSG( g_displayDC
, wxT("MGL display DC not created yet.") );
47 if (width
) *width
= g_displayDC
->sizex();
48 if (height
) *height
= g_displayDC
->sizey();
51 void wxGetMousePosition( int* x
, int* y
)
54 gdk_window_get_pointer( (GdkWindow
*) NULL
, x
, y
, (GdkModifierType
*) NULL
);
58 bool wxColourDisplay()
60 wxASSERT_MSG( g_displayDC
, wxT("MGL display DC not created yet.") );
62 return (wxDisplayDepth() > 1);
67 wxASSERT_MSG( g_displayDC
, wxT("MGL display DC not created yet.") );
69 return g_displayDC
->getBitsPerPixel();
72 int wxGetOsVersion(int *majorVsn
, int *minorVsn
)
75 // FIXME_MGL : wxGetOsVersion, too
76 if (majorVsn
) *majorVsn
= GTK_MAJOR_VERSION
;
77 if (minorVsn
) *minorVsn
= GTK_MINOR_VERSION
;
86 int wxAddProcessCallback(wxEndProcessData
*proc_data
, int fd
)
88 #if 0 // FIXME_MGL -do we need it at all?
89 int tag
= gdk_input_add(fd
,
91 GTK_EndProcessDetector
,