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

pixmapext.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_PIXMAPEXT_H
00021 #define _GDKMM_GL_PIXMAPEXT_H
00022 
00023 #include <glibmm.h>
00024 
00025 #include <gdkmm/gl/defs.h>
00026 #include <gdkmm/gl/pixmap.h>
00027 
00028 namespace Gdk
00029 {
00030   namespace GL
00031   {
00032 
00033     class PixmapExtProxy
00034     {
00035     private:
00036       PixmapExtProxy(const Glib::RefPtr<Gdk::Pixmap>& pixmap)
00037         : pixmap_(pixmap)
00038       {}
00039 
00040     private:
00041       PixmapExtProxy(const PixmapExtProxy&);
00042       PixmapExtProxy& operator=(const PixmapExtProxy&);
00043 
00044     public:
00045 
00056       Glib::RefPtr<Pixmap> 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<Pixmap> get_gl_pixmap() const;
00076 
00081       Glib::RefPtr<Gdk::GL::Drawable> get_gl_drawable() const;
00082 
00083     private:
00084       const Glib::RefPtr<Gdk::Pixmap>& pixmap_;
00085 
00086       friend PixmapExtProxy ext(const Glib::RefPtr<Gdk::Pixmap>&);
00087       friend const PixmapExtProxy ext(const Glib::RefPtr<const Gdk::Pixmap>&);
00088     };
00089 
00107     inline
00108     PixmapExtProxy ext(const Glib::RefPtr<Gdk::Pixmap>& pixmap)
00109     { return PixmapExtProxy(pixmap); }
00110 
00117     inline
00118     const PixmapExtProxy ext(const Glib::RefPtr<const Gdk::Pixmap>& pixmap)
00119     { return PixmapExtProxy(reinterpret_cast<const Glib::RefPtr<Gdk::Pixmap>&>(pixmap)); }
00120 
00121   } // namespace GL
00122 } // namespace Gdk
00123 
00124 #endif // _GDKMM_GL_PIXMAPEXT_H

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