Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Examples

windowext.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /* gdkglextmm - C++ Wrapper for GdkGLExt
00003  * Copyright (C) 2002-2003  Naofumi Yasufuku
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.
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   } // namespace GL
00121 } // namespace Gdk
00122 
00123 #endif // _GDKMM_GL_WINDOWEXT_H

Generated on Mon Feb 27 18:46:53 2006 for gtkglextmm by  doxygen 1.4.4