]>
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.") );
53 if (width
) *width
= g_displayDC
->sizex() * 25/72;
54 if (height
) *height
= g_displayDC
->sizey() * 25/72;
55 // FIXME_MGL -- what about returning *real* monitor dimensions?
58 void wxClientDisplayRect(int *x
, int *y
, int *width
, int *height
)
60 // This is supposed to return desktop dimensions minus any window
61 // manager panels, menus, taskbars, etc. If there is a way to do that
62 // for this platform please fix this function, otherwise it defaults
63 // to the entire desktop.
66 wxDisplaySize(width
, height
);
69 bool wxColourDisplay()
71 wxASSERT_MSG( g_displayDC
, wxT("MGL display DC not created yet.") );
73 return (wxDisplayDepth() > 1);
78 wxASSERT_MSG( g_displayDC
, wxT("MGL display DC not created yet.") );
80 return g_displayDC
->getBitsPerPixel();
83 int wxGetOsVersion(int *majorVsn
, int *minorVsn
)
86 // FIXME_MGL : fix wxGetOsVersion, too
87 if (majorVsn
) *majorVsn
= GTK_MAJOR_VERSION
;
88 if (minorVsn
) *minorVsn
= GTK_MINOR_VERSION
;
95 void wxGetMousePosition(int* x
, int* y
)
100 wxPoint
wxGetMousePosition()
103 wxGetMousePosition(&pt
.x
, &pt
.y
);
111 int wxAddProcessCallback(wxEndProcessData
*proc_data
, int fd
)
113 #if 0 // FIXME_MGL -do we need it at all?
114 int tag
= gdk_input_add(fd
,
116 GTK_EndProcessDetector
,
117 (gpointer
)proc_data
);