00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _GDKMM_GL_WINDOWEXT_H
00021 #define _GDKMM_GL_WINDOWEXT_H
00022
00023 #include <glibmm.h>
00024
00025 #include <gdkmm/gl/defs.h>
00026 #include <gdkmm/gl/window.h>
00027
00028 namespace Gdk
00029 {
00030 namespace GL
00031 {
00032
00033 class WindowExtProxy
00034 {
00035 private:
00036 WindowExtProxy(const Glib::RefPtr<Gdk::Window>& window)
00037 : window_(window)
00038 {}
00039
00040 private:
00041 WindowExtProxy(const WindowExtProxy&);
00042 WindowExtProxy& operator=(const WindowExtProxy&);
00043
00044 public:
00045
00056 Glib::RefPtr<Window> set_gl_capability(const Glib::RefPtr<const Config>& glconfig,
00057 const int* attrib_list = 0);
00058
00063 void unset_gl_capability();
00064
00069 bool is_gl_capable() const;
00070
00075 Glib::RefPtr<Window> get_gl_window() const;
00076
00081 Glib::RefPtr<Gdk::GL::Drawable> get_gl_drawable() const;
00082
00083 private:
00084 const Glib::RefPtr<Gdk::Window>& window_;
00085
00086 friend WindowExtProxy ext(const Glib::RefPtr<Gdk::Window>&);
00087 friend const WindowExtProxy ext(const Glib::RefPtr<const Gdk::Window>&);
00088 };
00089
00106 inline
00107 WindowExtProxy ext(const Glib::RefPtr<Gdk::Window>& window)
00108 { return WindowExtProxy(window); }
00109
00116 inline
00117 const WindowExtProxy ext(const Glib::RefPtr<const Gdk::Window>& window)
00118 { return WindowExtProxy(reinterpret_cast<const Glib::RefPtr<Gdk::Window>&>(window)); }
00119
00120 }
00121 }
00122
00123 #endif // _GDKMM_GL_WINDOWEXT_H