gtkglextmm: gdkmm/gl/config.h Source File

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

# config.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GDKMM_GL_CONFIG_H
    00004 #define _GDKMM_GL_CONFIG_H
    00005
    00006 #include <glibmm.h>
    00007
    00008 // -*- C++ -*-
    00009 /* gdkglextmm - C++ Wrapper for GdkGLExt
    00010  * Copyright (C) 2002-2003  Naofumi Yasufuku
    00011  *
    00012  * This library is free software; you can redistribute it and/or
    00013  * modify it under the terms of the GNU Lesser General Public
    00014  * License as published by the Free Software Foundation; either
    00015  * version 2.1 of the License, or (at your option) any later version.
    00016  *
    00017  * This library is distributed in the hope that it will be useful,
    00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00020  * Lesser General Public License for more details.
    00021  *
    00022  * You should have received a copy of the GNU Lesser General Public
    00023  * License along with this library; if not, write to the Free Software
    00024  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.
    00025  */
    00026
    00027 #include <gdkmm/gl/defs.h>
    00028
    00029 #ifdef GDKGLEXTMM_MULTIHEAD_SUPPORT
    00030 #include <gdkmm/screen.h>
    00031 #endif // GDKGLEXTMM_MULTIHEAD_SUPPORT
    00032 #include <gdkmm/visual.h>
    00033 #include <gdkmm/colormap.h>
    00034
    00035
    00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00037 typedef struct _GdkGLConfig GdkGLConfig;
    00038 typedef struct _GdkGLConfigClass GdkGLConfigClass;
    00039 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00040
    00041
    00042 namespace Gdk
    00043 {
    00044
    00045 namespace GL
    00046 { class Config_Class; } // namespace GL
    00047
    00048 } // namespace Gdk
    00049 namespace Gdk
    00050 {
    00051 namespace GL
    00052 {
    00053
    00067 enum ConfigMode
    00068 {
    00069   MODE_RGB = 0,
    00070   MODE_RGBA = 0,
    00071   MODE_INDEX = 1 << 0,
    00072   MODE_SINGLE = 0,
    00073   MODE_DOUBLE = 1 << 1,
    00074   MODE_STEREO = 1 << 2,
    00075   MODE_ALPHA = 1 << 3,
    00076   MODE_DEPTH = 1 << 4,
    00077   MODE_STENCIL = 1 << 5,
    00078   MODE_ACCUM = 1 << 6,
    00079   MODE_MULTISAMPLE = 1 << 7
    00080 };
    00081
    00083 inline ConfigMode operator|(ConfigMode lhs, ConfigMode rhs)
    00084   { return static_cast<ConfigMode>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
    00085
    00087 inline ConfigMode operator&(ConfigMode lhs, ConfigMode rhs)
    00088   { return static_cast<ConfigMode>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
    00089
    00091 inline ConfigMode operator^(ConfigMode lhs, ConfigMode rhs)
    00092   { return static_cast<ConfigMode>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
    00093
    00095 inline ConfigMode operator~(ConfigMode flags)
    00096   { return static_cast<ConfigMode>(~static_cast<unsigned>(flags)); }
    00097
    00099 inline ConfigMode& operator|=(ConfigMode& lhs, ConfigMode rhs)
    00100   { return (lhs = static_cast<ConfigMode>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
    00101
    00103 inline ConfigMode& operator&=(ConfigMode& lhs, ConfigMode rhs)
    00104   { return (lhs = static_cast<ConfigMode>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
    00105
    00107 inline ConfigMode& operator^=(ConfigMode& lhs, ConfigMode rhs)
    00108   { return (lhs = static_cast<ConfigMode>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
    00109
    00110 } // namespace GL
    00111
    00112 } // namespace Gdk
    00113
    00114
    00115 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00116 namespace Glib
    00117 {
    00118
    00119 template <>
    00120 class Value<Gdk::GL::ConfigMode> : public Glib::Value_Flags<Gdk::GL::ConfigMode>
    00121 {
    00122 public:
    00123   static GType value_type() G_GNUC_CONST;
    00124 };
    00125
    00126 } // namespace Glib
    00127 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00128
    00129
    00130 namespace Gdk
    00131 {
    00132
    00133 namespace GL
    00134 {
    00135
    00136
    00143 class Config : public Glib::Object
    00144 {
    00145
    00146 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00147
    00148 public:
    00149   typedef Config CppObjectType;
    00150   typedef Config_Class CppClassType;
    00151   typedef GdkGLConfig BaseObjectType;
    00152   typedef GdkGLConfigClass BaseClassType;
    00153
    00154 private:  friend class Config_Class;
    00155   static CppClassType config_class_;
    00156
    00157 private:
    00158   // noncopyable
    00159   Config(const Config&);
    00160   Config& operator=(const Config&);
    00161
    00162 protected:
    00163   explicit Config(const Glib::ConstructParams& construct_params);
    00164   explicit Config(GdkGLConfig* castitem);
    00165
    00166 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00167
    00168 public:
    00169   virtual ~Config();
    00170
    00171 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00172   static GType get_type()      G_GNUC_CONST;
    00173   static GType get_base_type() G_GNUC_CONST;
    00174 #endif
    00175
    00177   GdkGLConfig*       gobj()       { return reinterpret_cast<GdkGLConfig*>(gobject_); }
    00178
    00180   const GdkGLConfig* gobj() const { return reinterpret_cast<GdkGLConfig*>(gobject_); }
    00181
    00183   GdkGLConfig* gobj_copy();
    00184
    00185 private:
    00186
    00187
    00188 protected:
    00189
    00190   explicit Config(const int* attrib_list);
    00191 #ifdef GDKGLEXTMM_MULTIHEAD_SUPPORT
    00192   Config(const Glib::RefPtr<const Gdk::Screen>& screen,
    00193          const int* attrib_list);
    00194 #endif // GDKGLEXTMM_MULTIHEAD_SUPPORT
    00195   explicit Config(ConfigMode mode);
    00196 #ifdef GDKGLEXTMM_MULTIHEAD_SUPPORT
    00197   Config(const Glib::RefPtr<const Gdk::Screen>& screen,
    00198          ConfigMode mode);
    00199 #endif // GDKGLEXTMM_MULTIHEAD_SUPPORT
    00200
    00201 public:
    00202
    00211   static Glib::RefPtr<Config> create(const int* attrib_list);
    00212
    00213 #ifdef GDKGLEXTMM_MULTIHEAD_SUPPORT
    00214   static Glib::RefPtr<Config> create(const Glib::RefPtr<const Gdk::Screen>& screen,
    00215                                      const int* attrib_list);
    00216 #endif // GDKGLEXTMM_MULTIHEAD_SUPPORT
    00217
    00225   static Glib::RefPtr<Config> create(ConfigMode mode);
    00226
    00227 #ifdef GDKGLEXTMM_MULTIHEAD_SUPPORT
    00228   static Glib::RefPtr<Config> create(const Glib::RefPtr<const Gdk::Screen>& screen,
    00229                                      ConfigMode mode);
    00230 #endif // GDKGLEXTMM_MULTIHEAD_SUPPORT
    00231
    00232 public:
    00233
    00234 #ifdef GDKGLEXTMM_MULTIHEAD_SUPPORT
    00235
    00239   Glib::RefPtr<Gdk::Screen> get_screen();
    00240
    00244   Glib::RefPtr<const Gdk::Screen> get_screen() const;
    00245
    00246 #endif // GDKGLEXTMM_MULTIHEAD_SUPPORT
    00247
    00248
    00254   bool get_attrib(int attribute, int& value) const;
    00255
    00256
    00261   Glib::RefPtr<Gdk::Colormap> get_colormap();
    00262
    00267   Glib::RefPtr<const Gdk::Colormap> get_colormap() const;
    00268
    00269
    00274   Glib::RefPtr<Gdk::Visual> get_visual();
    00275
    00280   Glib::RefPtr<const Gdk::Visual> get_visual() const;
    00281
    00282
    00286   int get_depth() const;
    00287
    00288
    00296   int get_layer_plane() const;
    00297
    00298
    00302   int get_n_aux_buffers() const;
    00303
    00304
    00308   int get_n_sample_buffers() const;
    00309
    00310
    00315   bool is_rgba() const;
    00316
    00317
    00322   bool is_double_buffered() const;
    00323
    00324
    00328   bool is_stereo() const;
    00329
    00330
    00334   bool has_alpha() const;
    00335
    00336
    00340   bool has_depth_buffer() const;
    00341
    00342
    00346   bool has_stencil_buffer() const;
    00347
    00348
    00353   bool has_accum_buffer() const;
    00354
    00355
    00356 public:
    00357
    00358 public:
    00359   //C++ methods used to invoke GTK+ virtual functions:
    00360
    00361 protected:
    00362   //GTK+ Virtual Functions (override these to change behaviour):
    00363
    00364   //Default Signal Handlers::
    00365
    00366
    00367 };
    00368
    00369 } // namespace GL
    00370 } // namespace Gdk
    00371
    00372
    00373 namespace Glib
    00374 {
    00380   Glib::RefPtr<Gdk::GL::Config> wrap(GdkGLConfig* object, bool take_copy = false);
    00381 }
    00382
    00383
    00384 #endif /* _GDKMM_GL_CONFIG_H */
    00385