]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/glcanvas.h
Define WXBUILDING in Xcode projects.
[wxWidgets.git] / include / wx / gtk / glcanvas.h
CommitLineData
8b089c5e 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/gtk/glcanvas.h
77ffb593 3// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK
8b089c5e
JS
4// Author: Robert Roebling
5// Modified by:
6// Created: 17/8/98
7// RCS-ID: $Id$
8// Copyright: (c) Robert Roebling
65571936 9// Licence: wxWindows licence
8b089c5e
JS
10/////////////////////////////////////////////////////////////////////////////
11
db4c39a9
VZ
12#ifndef _WX_GLCANVAS_H_
13#define _WX_GLCANVAS_H_
14
498ace9e 15#include "wx/unix/glx11.h"
8b089c5e
JS
16
17//---------------------------------------------------------------------------
a6f5aa49 18// wxGLCanvas
8b089c5e
JS
19//---------------------------------------------------------------------------
20
5a83f42b 21class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasX11
8b089c5e
JS
22{
23public:
dc3065a5
VZ
24 wxGLCanvas(wxWindow *parent,
25 wxWindowID id = wxID_ANY,
26 const int *attribList = NULL,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = 0,
30 const wxString& name = wxGLCanvasName,
31 const wxPalette& palette = wxNullPalette);
32
33 bool Create(wxWindow *parent,
34 wxWindowID id = wxID_ANY,
2b5f62a0
VZ
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 long style = 0,
38 const wxString& name = wxGLCanvasName,
dc3065a5
VZ
39 const int *attribList = NULL,
40 const wxPalette& palette = wxNullPalette);
2b5f62a0 41
9dc44eff 42 virtual bool SetBackgroundStyle(wxBackgroundStyle style);
8b089c5e 43
498ace9e 44 // implement wxGLCanvasX11 methods
dc3065a5 45 // --------------------------------
2b5f62a0 46
498ace9e 47 virtual Window GetXWindow() const;
dc3065a5
VZ
48
49
50 // deprecated methods
51 // ------------------
52
53#if WXWIN_COMPATIBILITY_2_8
54 wxDEPRECATED(
55 wxGLCanvas(wxWindow *parent,
56 wxWindowID id = wxID_ANY,
57 const wxPoint& pos = wxDefaultPosition,
58 const wxSize& size = wxDefaultSize,
59 long style = 0,
60 const wxString& name = wxGLCanvasName,
61 const int *attribList = NULL,
62 const wxPalette& palette = wxNullPalette)
63 );
64
65 wxDEPRECATED(
66 wxGLCanvas(wxWindow *parent,
67 const wxGLContext *shared,
68 wxWindowID id = wxID_ANY,
69 const wxPoint& pos = wxDefaultPosition,
70 const wxSize& size = wxDefaultSize,
71 long style = 0,
72 const wxString& name = wxGLCanvasName,
73 const int *attribList = NULL,
74 const wxPalette& palette = wxNullPalette)
75 );
76
77 wxDEPRECATED(
78 wxGLCanvas(wxWindow *parent,
79 const wxGLCanvas *shared,
80 wxWindowID id = wxID_ANY,
81 const wxPoint& pos = wxDefaultPosition,
82 const wxSize& size = wxDefaultSize,
83 long style = 0,
84 const wxString& name = wxGLCanvasName,
85 const int *attribList = NULL,
86 const wxPalette& palette = wxNullPalette)
87 );
88
89 // called from "realized" callback to create the implicit context if needed
90 void GTKInitImplicitContext();
91#endif // WXWIN_COMPATIBILITY_2_8
92
93 // implementation from now on
94 void OnInternalIdle();
2b5f62a0 95
8b089c5e 96 bool m_exposed;
9dc44eff
PC
97#ifdef __WXGTK3__
98 cairo_t* m_cairoPaintContext;
99#endif
2b5f62a0 100
dc3065a5
VZ
101#if WXWIN_COMPATIBILITY_2_8
102 wxGLContext *m_sharedContext;
103 wxGLCanvas *m_sharedContextOf;
104 const bool m_createImplicitContext;
105#endif // WXWIN_COMPATIBILITY_2_8
106
8b089c5e 107private:
8b089c5e
JS
108 DECLARE_CLASS(wxGLCanvas)
109};
110
dc3065a5 111#endif // _WX_GLCANVAS_H_
8b089c5e 112