]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gdicmn.h
wxSafeShowMessage needs wxString regardles wxUSE_LOG.
[wxWidgets.git] / include / wx / gdicmn.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: gdicmn.h
3 // Purpose: Common GDI classes, types and declarations
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c)
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_GDICMNH__
13 #define _WX_GDICMNH__
14
15 // ---------------------------------------------------------------------------
16 // headers
17 // ---------------------------------------------------------------------------
18
19 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
20 #pragma interface "gdicmn.h"
21 #endif
22
23 #include "wx/setup.h"
24 #include "wx/list.h"
25 #include "wx/string.h"
26 #include "wx/fontenc.h"
27 #include "wx/hashmap.h"
28
29 // ---------------------------------------------------------------------------
30 // forward declarations
31 // ---------------------------------------------------------------------------
32
33 class WXDLLEXPORT wxBitmap;
34 class WXDLLEXPORT wxBrush;
35 class WXDLLEXPORT wxColour;
36 class WXDLLEXPORT wxCursor;
37 class WXDLLEXPORT wxFont;
38 class WXDLLEXPORT wxIcon;
39 class WXDLLEXPORT wxPalette;
40 class WXDLLEXPORT wxPen;
41 class WXDLLEXPORT wxRegion;
42 class WXDLLEXPORT wxString;
43
44 // ---------------------------------------------------------------------------
45 // constants
46 // ---------------------------------------------------------------------------
47
48 // Bitmap flags
49 enum wxBitmapType
50 {
51 wxBITMAP_TYPE_INVALID, // should be == 0 for compatibility!
52 wxBITMAP_TYPE_BMP,
53 wxBITMAP_TYPE_BMP_RESOURCE,
54 wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE,
55 wxBITMAP_TYPE_ICO,
56 wxBITMAP_TYPE_ICO_RESOURCE,
57 wxBITMAP_TYPE_CUR,
58 wxBITMAP_TYPE_CUR_RESOURCE,
59 wxBITMAP_TYPE_XBM,
60 wxBITMAP_TYPE_XBM_DATA,
61 wxBITMAP_TYPE_XPM,
62 wxBITMAP_TYPE_XPM_DATA,
63 wxBITMAP_TYPE_TIF,
64 wxBITMAP_TYPE_TIF_RESOURCE,
65 wxBITMAP_TYPE_GIF,
66 wxBITMAP_TYPE_GIF_RESOURCE,
67 wxBITMAP_TYPE_PNG,
68 wxBITMAP_TYPE_PNG_RESOURCE,
69 wxBITMAP_TYPE_JPEG,
70 wxBITMAP_TYPE_JPEG_RESOURCE,
71 wxBITMAP_TYPE_PNM,
72 wxBITMAP_TYPE_PNM_RESOURCE,
73 wxBITMAP_TYPE_PCX,
74 wxBITMAP_TYPE_PCX_RESOURCE,
75 wxBITMAP_TYPE_PICT,
76 wxBITMAP_TYPE_PICT_RESOURCE,
77 wxBITMAP_TYPE_ICON,
78 wxBITMAP_TYPE_ICON_RESOURCE,
79 wxBITMAP_TYPE_ANI,
80 wxBITMAP_TYPE_IFF,
81 wxBITMAP_TYPE_MACCURSOR,
82 wxBITMAP_TYPE_MACCURSOR_RESOURCE,
83 wxBITMAP_TYPE_ANY = 50
84 };
85
86 // Standard cursors
87 enum wxStockCursor
88 {
89 wxCURSOR_NONE, // should be 0
90 wxCURSOR_ARROW,
91 wxCURSOR_RIGHT_ARROW,
92 wxCURSOR_BULLSEYE,
93 wxCURSOR_CHAR,
94 wxCURSOR_CROSS,
95 wxCURSOR_HAND,
96 wxCURSOR_IBEAM,
97 wxCURSOR_LEFT_BUTTON,
98 wxCURSOR_MAGNIFIER,
99 wxCURSOR_MIDDLE_BUTTON,
100 wxCURSOR_NO_ENTRY,
101 wxCURSOR_PAINT_BRUSH,
102 wxCURSOR_PENCIL,
103 wxCURSOR_POINT_LEFT,
104 wxCURSOR_POINT_RIGHT,
105 wxCURSOR_QUESTION_ARROW,
106 wxCURSOR_RIGHT_BUTTON,
107 wxCURSOR_SIZENESW,
108 wxCURSOR_SIZENS,
109 wxCURSOR_SIZENWSE,
110 wxCURSOR_SIZEWE,
111 wxCURSOR_SIZING,
112 wxCURSOR_SPRAYCAN,
113 wxCURSOR_WAIT,
114 wxCURSOR_WATCH,
115 wxCURSOR_BLANK,
116 #ifdef __WXGTK__
117 wxCURSOR_DEFAULT, // standard X11 cursor
118 #endif
119 #ifdef __WXMAC__
120 wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
121 #endif
122 #ifdef __X__
123 // Not yet implemented for Windows
124 wxCURSOR_CROSS_REVERSE,
125 wxCURSOR_DOUBLE_ARROW,
126 wxCURSOR_BASED_ARROW_UP,
127 wxCURSOR_BASED_ARROW_DOWN,
128 #endif // X11
129
130 wxCURSOR_ARROWWAIT,
131
132 wxCURSOR_MAX
133 };
134
135 #ifndef __WXGTK__
136 #define wxCURSOR_DEFAULT wxCURSOR_ARROW
137 #endif
138
139 // ---------------------------------------------------------------------------
140 // macros
141 // ---------------------------------------------------------------------------
142
143 /* Useful macro for creating icons portably, for example:
144
145 wxIcon *icon = new wxICON(mondrian);
146
147 expands into:
148
149 wxIcon *icon = new wxIcon("mondrian"); // On wxMSW
150 wxIcon *icon = new wxIcon(mondrian_xpm); // On wxGTK
151 */
152
153 #ifdef __WXMSW__
154 // Load from a resource
155 #define wxICON(X) wxIcon(wxT(#X))
156 #elif defined(__WXPM__)
157 // Load from a resource
158 #define wxICON(X) wxIcon(wxT(#X))
159 #elif defined(__WXMGL__)
160 // Initialize from an included XPM
161 #define wxICON(X) wxIcon( (const char**) X##_xpm )
162 #elif defined(__WXGTK__)
163 // Initialize from an included XPM
164 #define wxICON(X) wxIcon( (const char**) X##_xpm )
165 #elif defined(__WXMAC__)
166 // Initialize from an included XPM
167 #define wxICON(X) wxIcon( (const char**) X##_xpm )
168 #elif defined(__WXMOTIF__)
169 // Initialize from an included XPM
170 #define wxICON(X) wxIcon( X##_xpm )
171 #elif defined(__WXX11__)
172 // Initialize from an included XPM
173 #define wxICON(X) wxIcon( X##_xpm )
174 #else
175 // This will usually mean something on any platform
176 #define wxICON(X) wxIcon(wxT(#X))
177 #endif // platform
178
179 /* Another macro: this one is for portable creation of bitmaps. We assume that
180 under Unix bitmaps live in XPMs and under Windows they're in ressources.
181 */
182
183 #if defined(__WXMSW__) || defined(__WXPM__)
184 #define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_RESOURCE)
185 #elif defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXCOCOA__)
186 // Initialize from an included XPM
187 #define wxBITMAP(name) wxBitmap( (const char**) name##_xpm )
188 #else // other platforms
189 #define wxBITMAP(name) wxBitmap(name##_xpm, wxBITMAP_TYPE_XPM)
190 #endif // platform
191
192 // ===========================================================================
193 // classes
194 // ===========================================================================
195
196 // ---------------------------------------------------------------------------
197 // wxSize
198 // ---------------------------------------------------------------------------
199
200 class WXDLLEXPORT wxSize
201 {
202 public:
203 // members are public for compatibility, don't use them directly.
204 int x, y;
205
206 // constructors
207 wxSize() : x(0), y(0) { }
208 wxSize(int xx, int yy) : x(xx), y(yy) { }
209
210 // no copy ctor or assignment operator - the defaults are ok
211
212 bool operator==(const wxSize& sz) const { return x == sz.x && y == sz.y; }
213 bool operator!=(const wxSize& sz) const { return x != sz.x || y != sz.y; }
214
215 // FIXME are these really useful? If they're, we should have += &c as well
216 wxSize operator+(const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); }
217 wxSize operator-(const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); }
218
219 void IncTo(const wxSize& sz)
220 { if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; }
221 void DecTo(const wxSize& sz)
222 { if ( sz.x < x ) x = sz.x; if ( sz.y < y ) y = sz.y; }
223
224 // accessors
225 void Set(int xx, int yy) { x = xx; y = yy; }
226 void SetWidth(int w) { x = w; }
227 void SetHeight(int h) { y = h; }
228
229 int GetWidth() const { return x; }
230 int GetHeight() const { return y; }
231
232 bool IsFullySpecified() const { return x != -1 && y != -1; }
233
234 // combine this size with the other one replacing the default (i.e. equal
235 // to -1) components of this object with those of the other
236 void SetDefaults(const wxSize& size)
237 {
238 if ( x == -1 )
239 x = size.x;
240 if ( y == -1 )
241 y = size.y;
242 }
243
244 // compatibility
245 int GetX() const { return x; }
246 int GetY() const { return y; }
247 };
248
249 // ---------------------------------------------------------------------------
250 // Point classes: with real or integer coordinates
251 // ---------------------------------------------------------------------------
252
253 class WXDLLEXPORT wxRealPoint
254 {
255 public:
256 double x;
257 double y;
258
259 wxRealPoint() : x(0.0), y(0.0) { }
260 wxRealPoint(double xx, double yy) : x(xx), y(yy) { }
261
262 wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); }
263 wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); }
264
265 bool operator==(const wxRealPoint& pt) const { return x == pt.x && y == pt.y; }
266 bool operator!=(const wxRealPoint& pt) const { return x != pt.x || y != pt.y; }
267 };
268
269 class WXDLLEXPORT wxPoint
270 {
271 public:
272 int x, y;
273
274 wxPoint() : x(0), y(0) { }
275 wxPoint(int xx, int yy) : x(xx), y(yy) { }
276
277 // no copy ctor or assignment operator - the defaults are ok
278
279 // comparison
280 bool operator==(const wxPoint& p) const { return x == p.x && y == p.y; }
281 bool operator!=(const wxPoint& p) const { return !(*this == p); }
282
283 // arithmetic operations (component wise)
284 wxPoint operator+(const wxPoint& p) const { return wxPoint(x + p.x, y + p.y); }
285 wxPoint operator-(const wxPoint& p) const { return wxPoint(x - p.x, y - p.y); }
286
287 wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; }
288 wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
289
290 wxPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; }
291 wxPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; }
292
293 wxPoint operator+(const wxSize& s) const { return wxPoint(x + s.GetWidth(), y + s.GetHeight()); }
294 wxPoint operator-(const wxSize& s) const { return wxPoint(x - s.GetWidth(), y - s.GetHeight()); }
295 };
296
297 // ---------------------------------------------------------------------------
298 // wxRect
299 // ---------------------------------------------------------------------------
300
301 class WXDLLEXPORT wxRect
302 {
303 public:
304 wxRect()
305 : x(0), y(0), width(0), height(0)
306 { }
307 wxRect(int xx, int yy, int ww, int hh)
308 : x(xx), y(yy), width(ww), height(hh)
309 { }
310 wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
311 wxRect(const wxPoint& pos, const wxSize& size);
312
313 // default copy ctor and assignment operators ok
314
315 int GetX() const { return x; }
316 void SetX(int xx) { x = xx; }
317
318 int GetY() const { return y; }
319 void SetY(int yy) { y = yy; }
320
321 int GetWidth() const { return width; }
322 void SetWidth(int w) { width = w; }
323
324 int GetHeight() const { return height; }
325 void SetHeight(int h) { height = h; }
326
327 wxPoint GetPosition() const { return wxPoint(x, y); }
328 void SetPosition( const wxPoint &p ) { x = p.x; y = p.y; }
329
330 wxSize GetSize() const { return wxSize(width, height); }
331 void SetSize( const wxSize &s ) { width = s.GetWidth(); height = s.GetHeight(); }
332
333 wxPoint GetTopLeft() const { return GetPosition(); }
334 wxPoint GetLeftTop() const { return GetTopLeft(); }
335 void SetTopLeft(const wxPoint &p) { SetPosition(p); }
336 void SetLeftTop(const wxPoint &p) { SetTopLeft(p); }
337
338 wxPoint GetBottomRight() const { return wxPoint(GetRight(), GetBottom()); }
339 wxPoint GetRightBottom() const { return GetBottomRight(); }
340 void SetBottomRight(const wxPoint &p) { SetRight(p.x); SetBottom(p.y); }
341 void SetRightBottom(const wxPoint &p) { SetBottomRight(p); }
342
343 int GetLeft() const { return x; }
344 int GetTop() const { return y; }
345 int GetBottom() const { return y + height - 1; }
346 int GetRight() const { return x + width - 1; }
347
348 void SetLeft(int left) { x = left; }
349 void SetRight(int right) { width = right - x + 1; }
350 void SetTop(int top) { y = top; }
351 void SetBottom(int bottom) { height = bottom - y + 1; }
352
353 // operations with rect
354 wxRect& Inflate(wxCoord dx, wxCoord dy);
355 wxRect& Inflate(wxCoord d) { return Inflate(d, d); }
356 wxRect Inflate(wxCoord dx, wxCoord dy) const
357 {
358 wxRect r = *this;
359 r.Inflate(dx, dy);
360 return r;
361 }
362
363 wxRect& Deflate(wxCoord dx, wxCoord dy) { return Inflate(-dx, -dy); }
364 wxRect& Deflate(wxCoord d) { return Inflate(-d); }
365 wxRect Deflate(wxCoord dx, wxCoord dy) const
366 {
367 wxRect r = *this;
368 r.Deflate(dx, dy);
369 return r;
370 }
371
372 void Offset(wxCoord dx, wxCoord dy) { x += dx; y += dy; }
373 void Offset(const wxPoint& pt) { Offset(pt.x, pt.y); }
374
375 wxRect& Intersect(const wxRect& rect);
376 wxRect Intersect(const wxRect& rect) const
377 {
378 wxRect r = *this;
379 r.Intersect(rect);
380 return r;
381 }
382
383 wxRect operator+(const wxRect& rect) const;
384 wxRect& operator+=(const wxRect& rect);
385
386 // compare rectangles
387 bool operator==(const wxRect& rect) const;
388 bool operator!=(const wxRect& rect) const { return !(*this == rect); }
389
390 // return TRUE if the point is (not strcitly) inside the rect
391 bool Inside(int x, int y) const;
392 bool Inside(const wxPoint& pt) const { return Inside(pt.x, pt.y); }
393
394 // return TRUE if the rectangles have a non empty intersection
395 bool Intersects(const wxRect& rect) const;
396
397 public:
398 int x, y, width, height;
399 };
400
401 // ---------------------------------------------------------------------------
402 // Management of pens, brushes and fonts
403 // ---------------------------------------------------------------------------
404
405 typedef wxInt8 wxDash;
406
407 class WXDLLEXPORT wxPenList : public wxList
408 {
409 public:
410 wxPenList() { }
411 ~wxPenList();
412
413 void AddPen(wxPen *pen);
414 void RemovePen(wxPen *pen);
415 wxPen *FindOrCreatePen(const wxColour& colour, int width, int style);
416 };
417
418 class WXDLLEXPORT wxBrushList : public wxList
419 {
420 public:
421 wxBrushList() { }
422 ~wxBrushList();
423
424 void AddBrush(wxBrush *brush);
425 void RemoveBrush(wxBrush *brush);
426 wxBrush *FindOrCreateBrush(const wxColour& colour, int style);
427 };
428
429 class WXDLLEXPORT wxFontList : public wxList
430 {
431 public:
432 wxFontList() { }
433 ~wxFontList();
434
435 void AddFont(wxFont *font);
436 void RemoveFont(wxFont *font);
437 wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight,
438 bool underline = FALSE,
439 const wxString& face = wxEmptyString,
440 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
441 };
442
443 WX_DECLARE_STRING_HASH_MAP( wxColour *, wxStringToColourHashMap );
444
445 class WXDLLEXPORT wxColourDatabase
446 {
447 public:
448 wxColourDatabase();
449 ~wxColourDatabase();
450
451 // find colour by name or name for the given colour
452 wxColour Find(const wxString& name) const;
453 wxString FindName(const wxColour& colour) const;
454
455 // add a new colour to the database
456 void AddColour(const wxString& name, const wxColour& colour);
457
458 // deprecated, use Find() instead
459 wxDEPRECATED( wxColour *FindColour(const wxString& name) );
460
461
462 #ifdef __WXPM__
463 // PM keeps its own type of colour table
464 long* m_palTable;
465 size_t m_nSize;
466 #endif
467
468 private:
469 // load the database with the built in colour values when called for the
470 // first time, do nothing after this
471 void Initialize();
472
473 wxStringToColourHashMap *m_map;
474 };
475
476 class WXDLLEXPORT wxBitmapList : public wxList
477 {
478 public:
479 wxBitmapList();
480 ~wxBitmapList();
481
482 void AddBitmap(wxBitmap *bitmap);
483 void RemoveBitmap(wxBitmap *bitmap);
484 };
485
486 class WXDLLEXPORT wxResourceCache: public wxList
487 {
488 public:
489 wxResourceCache() { }
490 #if !wxUSE_STL
491 wxResourceCache(const unsigned int keyType) : wxList(keyType) { }
492 #endif
493 ~wxResourceCache();
494 };
495
496 // ---------------------------------------------------------------------------
497 // global variables
498 // ---------------------------------------------------------------------------
499
500 // Lists of GDI objects
501 WXDLLEXPORT_DATA(extern wxPenList*) wxThePenList;
502 WXDLLEXPORT_DATA(extern wxBrushList*) wxTheBrushList;
503 WXDLLEXPORT_DATA(extern wxFontList*) wxTheFontList;
504 WXDLLEXPORT_DATA(extern wxBitmapList*) wxTheBitmapList;
505
506 // Stock objects
507 WXDLLEXPORT_DATA(extern wxFont*) wxNORMAL_FONT;
508 WXDLLEXPORT_DATA(extern wxFont*) wxSMALL_FONT;
509 WXDLLEXPORT_DATA(extern wxFont*) wxITALIC_FONT;
510 WXDLLEXPORT_DATA(extern wxFont*) wxSWISS_FONT;
511
512 WXDLLEXPORT_DATA(extern wxPen*) wxRED_PEN;
513 WXDLLEXPORT_DATA(extern wxPen*) wxCYAN_PEN;
514 WXDLLEXPORT_DATA(extern wxPen*) wxGREEN_PEN;
515 WXDLLEXPORT_DATA(extern wxPen*) wxBLACK_PEN;
516 WXDLLEXPORT_DATA(extern wxPen*) wxWHITE_PEN;
517 WXDLLEXPORT_DATA(extern wxPen*) wxTRANSPARENT_PEN;
518 WXDLLEXPORT_DATA(extern wxPen*) wxBLACK_DASHED_PEN;
519 WXDLLEXPORT_DATA(extern wxPen*) wxGREY_PEN;
520 WXDLLEXPORT_DATA(extern wxPen*) wxMEDIUM_GREY_PEN;
521 WXDLLEXPORT_DATA(extern wxPen*) wxLIGHT_GREY_PEN;
522
523 WXDLLEXPORT_DATA(extern wxBrush*) wxBLUE_BRUSH;
524 WXDLLEXPORT_DATA(extern wxBrush*) wxGREEN_BRUSH;
525 WXDLLEXPORT_DATA(extern wxBrush*) wxWHITE_BRUSH;
526 WXDLLEXPORT_DATA(extern wxBrush*) wxBLACK_BRUSH;
527 WXDLLEXPORT_DATA(extern wxBrush*) wxGREY_BRUSH;
528 WXDLLEXPORT_DATA(extern wxBrush*) wxMEDIUM_GREY_BRUSH;
529 WXDLLEXPORT_DATA(extern wxBrush*) wxLIGHT_GREY_BRUSH;
530 WXDLLEXPORT_DATA(extern wxBrush*) wxTRANSPARENT_BRUSH;
531 WXDLLEXPORT_DATA(extern wxBrush*) wxCYAN_BRUSH;
532 WXDLLEXPORT_DATA(extern wxBrush*) wxRED_BRUSH;
533
534 WXDLLEXPORT_DATA(extern wxColour*) wxBLACK;
535 WXDLLEXPORT_DATA(extern wxColour*) wxWHITE;
536 WXDLLEXPORT_DATA(extern wxColour*) wxRED;
537 WXDLLEXPORT_DATA(extern wxColour*) wxBLUE;
538 WXDLLEXPORT_DATA(extern wxColour*) wxGREEN;
539 WXDLLEXPORT_DATA(extern wxColour*) wxCYAN;
540 WXDLLEXPORT_DATA(extern wxColour*) wxLIGHT_GREY;
541
542 // 'Null' objects
543 WXDLLEXPORT_DATA(extern wxBitmap) wxNullBitmap;
544 WXDLLEXPORT_DATA(extern wxIcon) wxNullIcon;
545 WXDLLEXPORT_DATA(extern wxCursor) wxNullCursor;
546 WXDLLEXPORT_DATA(extern wxPen) wxNullPen;
547 WXDLLEXPORT_DATA(extern wxBrush) wxNullBrush;
548 WXDLLEXPORT_DATA(extern wxPalette) wxNullPalette;
549 WXDLLEXPORT_DATA(extern wxFont) wxNullFont;
550 WXDLLEXPORT_DATA(extern wxColour) wxNullColour;
551
552 // Stock cursors types
553 WXDLLEXPORT_DATA(extern wxCursor*) wxSTANDARD_CURSOR;
554 WXDLLEXPORT_DATA(extern wxCursor*) wxHOURGLASS_CURSOR;
555 WXDLLEXPORT_DATA(extern wxCursor*) wxCROSS_CURSOR;
556
557 WXDLLEXPORT_DATA(extern wxColourDatabase*) wxTheColourDatabase;
558
559 WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
560
561 WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
562 WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
563
564 // The list of objects which should be deleted
565 WXDLLEXPORT_DATA(extern wxList) wxPendingDelete;
566
567 // ---------------------------------------------------------------------------
568 // global functions
569 // ---------------------------------------------------------------------------
570
571 // resource management
572 extern void WXDLLEXPORT wxInitializeStockObjects();
573 extern void WXDLLEXPORT wxInitializeStockLists();
574 extern void WXDLLEXPORT wxDeleteStockObjects();
575 extern void WXDLLEXPORT wxDeleteStockLists();
576
577 // is the display colour (or monochrome)?
578 extern bool WXDLLEXPORT wxColourDisplay();
579
580 // Returns depth of screen
581 extern int WXDLLEXPORT wxDisplayDepth();
582 #define wxGetDisplayDepth wxDisplayDepth
583
584 // get the display size
585 extern void WXDLLEXPORT wxDisplaySize(int *width, int *height);
586 extern wxSize WXDLLEXPORT wxGetDisplaySize();
587 extern void WXDLLEXPORT wxDisplaySizeMM(int *width, int *height);
588 extern wxSize WXDLLEXPORT wxGetDisplaySizeMM();
589
590 // Get position and size of the display workarea
591 extern void WXDLLEXPORT wxClientDisplayRect(int *x, int *y, int *width, int *height);
592 extern wxRect WXDLLEXPORT wxGetClientDisplayRect();
593
594 // set global cursor
595 extern void WXDLLEXPORT wxSetCursor(const wxCursor& cursor);
596
597 #endif
598 // _WX_GDICMNH__