]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: src/cocoa/utils.cpp | |
3 | // Purpose: Various utilities | |
4 | // Author: David Elliott | |
5 | // Created: 2003/??/?? | |
6 | // RCS-ID: $Id$ | |
7 | // Copyright: (c) wxWidgets dev team | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #include "wx/wxprec.h" | |
12 | ||
13 | #include "wx/utils.h" | |
14 | ||
15 | #ifndef WX_PRECOMP | |
16 | #include "wx/app.h" | |
17 | #endif // WX_PRECOMP | |
18 | ||
19 | #include "wx/apptrait.h" | |
20 | #include "wx/display.h" | |
21 | #include "wx/cocoa/private/timer.h" | |
22 | ||
23 | #include <ctype.h> | |
24 | ||
25 | #include <stdio.h> | |
26 | #include <stdlib.h> | |
27 | #include <string.h> | |
28 | #include <stdarg.h> | |
29 | ||
30 | void wxDisplaySize(int *width, int *height) | |
31 | { | |
32 | // TODO | |
33 | if(width) | |
34 | *width = 1024; | |
35 | if(height) | |
36 | *height = 768; | |
37 | } | |
38 | ||
39 | void wxDisplaySizeMM(int*,int*) | |
40 | { | |
41 | // TODO | |
42 | } | |
43 | ||
44 | void wxClientDisplayRect(int *x,int *y,int *width,int *height) | |
45 | { | |
46 | // TODO | |
47 | if(x) | |
48 | *x = 0; | |
49 | if(y) | |
50 | *y = 0; | |
51 | if(width) | |
52 | *width=1024; | |
53 | if(height) | |
54 | *height=768; | |
55 | } | |
56 | ||
57 | wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const | |
58 | { | |
59 | // We suppose that toolkit version is the same as OS version under Mac | |
60 | wxGetOsVersion(verMaj, verMin); | |
61 | ||
62 | return wxPORT_COCOA; | |
63 | } | |
64 | ||
65 | wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer* timer) | |
66 | { | |
67 | return new wxCocoaTimerImpl(timer); | |
68 | } | |
69 | ||
70 | wxWindow* wxFindWindowAtPoint(const wxPoint& pt) | |
71 | { | |
72 | return wxGenericFindWindowAtPoint(pt); | |
73 | } | |
74 | ||
75 | // Return true if we have a colour display | |
76 | bool wxColourDisplay() | |
77 | { | |
78 | // TODO | |
79 | return true; | |
80 | } | |
81 | ||
82 | void wxGetMousePosition( int* x, int* y ) | |
83 | { | |
84 | // TODO | |
85 | }; | |
86 | ||
87 | // Returns depth of screen | |
88 | int wxDisplayDepth() | |
89 | { | |
90 | // TODO | |
91 | return 0; | |
92 | } | |
93 | ||
94 | // Emit a beeeeeep | |
95 | void wxBell() | |
96 | { | |
97 | // TODO | |
98 | } | |
99 | ||
100 | #if 0 | |
101 | // DFE: These aren't even implemented by wxGTK, and no wxWidgets code calls | |
102 | // them. If someone needs them, then they'll get a link error | |
103 | ||
104 | // Consume all events until no more left | |
105 | void wxFlushEvents() | |
106 | { | |
107 | } | |
108 | ||
109 | // Check whether this window wants to process messages, e.g. Stop button | |
110 | // in long calculations. | |
111 | bool wxCheckForInterrupt(wxWindow *wnd) | |
112 | { | |
113 | // TODO | |
114 | return false; | |
115 | } | |
116 | ||
117 | #endif | |
118 |