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