00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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 }
00122 }
00123
00124
#endif // _GDKMM_GL_PIXMAPEXT_H