]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/private.h
don't take wxID_NONE inside #if wxABI_VERSION check: it's (going to be) used inside...
[wxWidgets.git] / include / wx / mgl / private.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: private.h
3 // Purpose: Private declarations: as this header is only included by
4 // wxWidgets 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-2002 SciTech Software, Inc. (www.scitechsoft.com)
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_MGL_PRIVATE_H_
14 #define _WX_MGL_PRIVATE_H_
15
16 #include "wx/ioswrap.h"
17 #include <mgraph.hpp>
18 #include "pmapi.h"
19
20 class WXDLLEXPORT wxBitmap;
21
22
23 // ---------------------------------------------------------------------------
24 // private variables
25 // ---------------------------------------------------------------------------
26
27 extern MGLDevCtx *g_displayDC;
28 extern winmng_t *g_winMng;
29
30 // ---------------------------------------------------------------------------
31 // helper functions
32 // ---------------------------------------------------------------------------
33
34
35 // This function converts wxBitmap into pixpattern24_t representation
36 // (used by wxBrush and wxPen)
37
38 extern void wxBitmapToPixPattern(const wxBitmap& bitmap,
39 pixpattern24_t *pix, pattern_t *mask);
40
41
42 // Sets current DC and restores previous one upon destruction:
43 class wxCurrentDCSwitcher
44 {
45 public:
46 wxCurrentDCSwitcher(MGLDevCtx *dc)
47 { m_old = dc->makeCurrent(); }
48 ~wxCurrentDCSwitcher()
49 { MGL_makeCurrentDC(m_old); }
50 MGLDC *m_old;
51 };
52
53
54 #endif // _WX_MGL_PRIVATE_H_