]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/private.h
take const address objects in wxSocketClient::Connect() and wxSocketBase::SetLocal()
[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 // the scitech headers define true and false
21 #undef true
22 #undef false
23
24 class WXDLLIMPEXP_FWD_CORE wxBitmap;
25
26
27 // ---------------------------------------------------------------------------
28 // private variables
29 // ---------------------------------------------------------------------------
30
31 extern MGLDevCtx *g_displayDC;
32 extern winmng_t *g_winMng;
33
34 // ---------------------------------------------------------------------------
35 // helper functions
36 // ---------------------------------------------------------------------------
37
38
39 // This function converts wxBitmap into pixpattern24_t representation
40 // (used by wxBrush and wxPen)
41
42 extern void wxBitmapToPixPattern(const wxBitmap& bitmap,
43 pixpattern24_t *pix, pattern_t *mask);
44
45
46 // Sets current DC and restores previous one upon destruction:
47 class wxCurrentDCSwitcher
48 {
49 public:
50 wxCurrentDCSwitcher(MGLDevCtx *dc)
51 { m_old = dc->makeCurrent(); }
52 ~wxCurrentDCSwitcher()
53 { MGL_makeCurrentDC(m_old); }
54 MGLDC *m_old;
55 };
56
57
58 #endif // _WX_MGL_PRIVATE_H_