1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GDKMM_GL_PIXMAP_H
4 #define _GDKMM_GL_PIXMAP_H
5 
6 #include <glibmm.h>
7 
8 // -*- C++ -*-
9 /* gdkglextmm - C++ Wrapper for GdkGLExt
10  * Copyright (C) 2002-2003  Naofumi Yasufuku
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.
25  */
26 
27 #include <gdkmm/gl/defs.h>
28 
29 #include <gdkmm/drawable.h>
30 #include <gdkmm/pixmap.h>
31 
32 #include <gdkmm/gl/config.h>
33 #include <gdkmm/gl/drawable.h>
34 
35 
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 typedef struct _GdkGLPixmap GdkGLPixmap;
38 typedef struct _GdkGLPixmapClass GdkGLPixmapClass;
39 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 
41 
42 namespace Gdk
43 {
44 
45 namespace GL
46 { class Pixmap_Class; } // namespace GL
47 
48 } // namespace Gdk
49 namespace Gdk
50 {
51 namespace GL
52 {
53 
54   /** OpenGL pixmap which is maintained offscreen.
55    *
56    * @ingroup GLDrawables
57    */
58 
59 
60 class Pixmap : public Gdk::Drawable,
61                public Gdk::GL::Drawable
62 {
63 
64 #ifndef DOXYGEN_SHOULD_SKIP_THIS
65 
66 public:
67   typedef Pixmap CppObjectType;
68   typedef Pixmap_Class CppClassType;
69   typedef GdkGLPixmap BaseObjectType;
70   typedef GdkGLPixmapClass BaseClassType;
71 
72 private:  friend class Pixmap_Class;
73   static CppClassType pixmap_class_;
74 
75 private:
76   // noncopyable
77   Pixmap(const Pixmap&);
78   Pixmap& operator=(const Pixmap&);
79 
80 protected:
81   explicit Pixmap(const Glib::ConstructParams& construct_params);
82   explicit Pixmap(GdkGLPixmap* castitem);
83 
84 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
85 
86 public:
87   virtual ~Pixmap();
88 
89 #ifndef DOXYGEN_SHOULD_SKIP_THIS
90   static GType get_type()      G_GNUC_CONST;
91   static GType get_base_type() G_GNUC_CONST;
92 #endif
93 
94   ///Provides access to the underlying C GObject.
gobj()95   GdkGLPixmap*       gobj()       { return reinterpret_cast<GdkGLPixmap*>(gobject_); }
96 
97   ///Provides access to the underlying C GObject.
gobj()98   const GdkGLPixmap* gobj() const { return reinterpret_cast<GdkGLPixmap*>(gobject_); }
99 
100   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
101   GdkGLPixmap* gobj_copy();
102 
103 private:
104 
105 
106 protected:
107   Pixmap(const Glib::RefPtr<const Config>& glconfig,
108          const Glib::RefPtr<const Gdk::Pixmap>& pixmap,
109          const int* attrib_list = 0);
110 
111 public:
112 
113   static Glib::RefPtr<Pixmap> create(const Glib::RefPtr<const Config>& glconfig, const Glib::RefPtr<const Gdk::Pixmap>& pixmap, const int* attrib_list =  0);
114 
115 
116 public:
117 
118 
119   /** Returns the Gdk::Pixmap associated with @a glpixmap .
120    *
121    * Notice that Gdk::GLPixmap is not Gdk::Pixmap, but another
122    * Gdk::Drawable which have an associated Gdk::Pixmap.
123    * @return The Gdk::Pixmap associated with @a glpixmap .
124    */
125   Glib::RefPtr<Gdk::Pixmap> get_pixmap();
126 
127 
128   /** Returns the Gdk::Pixmap associated with @a glpixmap .
129    *
130    * Notice that Gdk::GLPixmap is not Gdk::Pixmap, but another
131    * Gdk::Drawable which have an associated Gdk::Pixmap.
132    * @return The Gdk::Pixmap associated with @a glpixmap .
133    */
134   Glib::RefPtr<const Gdk::Pixmap> get_pixmap() const;
135 
136 
137 public:
138 
139 public:
140   //C++ methods used to invoke GTK+ virtual functions:
141 
142 protected:
143   //GTK+ Virtual Functions (override these to change behaviour):
144 
145   //Default Signal Handlers::
146 
147 
148 };
149 
150   /** @example pixmap.cc
151    *
152    * Simple offscreen OpenGL rendering example.
153    *
154    */
155 
156   /** @example pixmap-mixed.cc
157    *
158    * Simple offscreen rendering example for mixing OpenGL and
159    * GDK rendering.
160    *
161    */
162 
163 } // namespace GL
164 } // namespace Gdk
165 
166 
167 namespace Glib
168 {
169   /** @relates Gdk::GL::Pixmap
170    * @param object The C instance
171    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
172    * @result A C++ instance that wraps this C instance.
173    */
174   Glib::RefPtr<Gdk::GL::Pixmap> wrap(GdkGLPixmap* object, bool take_copy = false);
175 }
176 
177 
178 #endif /* _GDKMM_GL_PIXMAP_H */
179 
180