]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/private.h
added more files (unchanged) from wxUniv branch
[wxWidgets.git] / include / wx / mgl / private.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: private.h
3 // Purpose: Private declarations: as this header is only included by
4 // wxWindows itself, it may contain identifiers which don't start
5 // with "wx".
6 // Author: Vaclav Slavik
7 // Created: 2001/04/07
8 // RCS-ID: $Id$
9 // Copyright: (c) 2001 Vaclav Slavik
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_PRIVATE_H_
14 #define _WX_PRIVATE_H_
15
16 #include <mgraph.hpp>
17
18 class WXDLLEXPORT wxBitmap;
19
20
21 // ---------------------------------------------------------------------------
22 // private variables
23 // ---------------------------------------------------------------------------
24
25 extern MGLDevCtx *g_displayDC;
26
27 // ---------------------------------------------------------------------------
28 // helper functions
29 // ---------------------------------------------------------------------------
30
31
32 // This function converts wxBitmap into pixpattern24_t representation
33 // (used by wxBrush and wxPen)
34
35 extern void wxBitmapToPixPattern(const wxBitmap& bitmap,
36 pixpattern24_t *pix, pattern_t *mask);
37
38
39 // Sets current DC and restores previous one upon destruction:
40 class wxCurrentDCSwitcher
41 {
42 public:
43 wxCurrentDCSwitcher(MGLDevCtx *dc)
44 { m_old = dc->makeCurrent(); }
45 ~wxCurrentDCSwitcher()
46 { MGL_makeCurrentDC(m_old); }
47 MGLDC *m_old;
48 };
49
50
51 #endif // _WX_PRIVATE_H_