]>
Commit | Line | Data |
---|---|---|
32b8ec41 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: utils.cpp | |
3 | // Purpose: | |
4 | // Author: Vaclav Slavik | |
5 | // Id: $Id$ | |
8f7b34a8 | 6 | // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) |
32b8ec41 VZ |
7 | // Licence: wxWindows licence |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #include "wx/utils.h" | |
11 | #include "wx/string.h" | |
12 | ||
13 | #include "wx/intl.h" | |
14 | #include "wx/log.h" | |
32b8ec41 VZ |
15 | #include "wx/process.h" |
16 | ||
17 | #include <stdarg.h> | |
18 | #include <string.h> | |
19 | #include <sys/stat.h> | |
20 | #include <sys/types.h> | |
21 | #include <unistd.h> | |
22 | #include <mgraph.hpp> | |
23 | ||
24 | #ifdef __UNIX__ | |
25 | #include "wx/unix/execute.h" | |
26 | #endif | |
27 | ||
a4bbc9f7 VS |
28 | #include "wx/mgl/private.h" |
29 | ||
32b8ec41 VZ |
30 | //---------------------------------------------------------------------------- |
31 | // misc. | |
32 | //---------------------------------------------------------------------------- | |
33 | ||
34 | void wxBell() | |
35 | { | |
36 | // FIXME_MGL | |
37 | } | |
38 | ||
39 | // ---------------------------------------------------------------------------- | |
40 | // display characterstics | |
41 | // ---------------------------------------------------------------------------- | |
42 | ||
a4bbc9f7 | 43 | void wxDisplaySize(int *width, int *height) |
32b8ec41 VZ |
44 | { |
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(); | |
48 | } | |
49 | ||
a4bbc9f7 | 50 | void wxGetMousePosition(int* x, int* y) |
32b8ec41 | 51 | { |
a4bbc9f7 VS |
52 | MS_getPos(x, y); |
53 | } | |
54 | ||
55 | wxPoint wxGetMousePosition() | |
56 | { | |
57 | wxPoint pt; | |
58 | wxGetMousePosition(&pt.x, &pt.y); | |
59 | return pt; | |
32b8ec41 VZ |
60 | } |
61 | ||
62 | bool wxColourDisplay() | |
63 | { | |
64 | wxASSERT_MSG( g_displayDC, wxT("MGL display DC not created yet.") ); | |
65 | ||
66 | return (wxDisplayDepth() > 1); | |
67 | } | |
68 | ||
69 | int wxDisplayDepth() | |
70 | { | |
71 | wxASSERT_MSG( g_displayDC, wxT("MGL display DC not created yet.") ); | |
72 | ||
73 | return g_displayDC->getBitsPerPixel(); | |
74 | } | |
75 | ||
76 | int wxGetOsVersion(int *majorVsn, int *minorVsn) | |
77 | { | |
78 | #if 0 // FIXME_MGL | |
a4bbc9f7 | 79 | // FIXME_MGL : fix wxGetOsVersion, too |
32b8ec41 VZ |
80 | if (majorVsn) *majorVsn = GTK_MAJOR_VERSION; |
81 | if (minorVsn) *minorVsn = GTK_MINOR_VERSION; | |
82 | ||
83 | return wxGTK; | |
84 | #endif | |
85 | } | |
86 | ||
87 | ||
88 | #ifdef __UNIX__ | |
89 | ||
90 | int wxAddProcessCallback(wxEndProcessData *proc_data, int fd) | |
91 | { | |
92 | #if 0 // FIXME_MGL -do we need it at all? | |
93 | int tag = gdk_input_add(fd, | |
94 | GDK_INPUT_READ, | |
95 | GTK_EndProcessDetector, | |
96 | (gpointer)proc_data); | |
97 | ||
98 | return tag; | |
99 | #endif | |
100 | } | |
101 | ||
102 | #endif |