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