Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

gdkmm/gl/window.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GDKMM_GL_WINDOW_H
00004 #define _GDKMM_GL_WINDOW_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 #include <gdkmm/drawable.h>
00030 #include <gdkmm/window.h>
00031 
00032 #include <gdkmm/gl/config.h>
00033 #include <gdkmm/gl/drawable.h>
00034 
00035 
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GdkGLWindow GdkGLWindow;
00038 typedef struct _GdkGLWindowClass GdkGLWindowClass;
00039 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00040 
00041 
00042 namespace Gdk
00043 {
00044 
00045 namespace GL
00046 { class Window_Class; } // namespace GL
00047 
00048 } // namespace Gdk
00049 namespace Gdk
00050 {
00051 namespace GL
00052 {
00053 
00054   /** OpenGL window which is located onscreen.
00055    *
00056    * @ingroup GLDrawables
00057    */
00058 
00059 
00060 class Window : public Gdk::Drawable,
00061                public Gdk::GL::Drawable
00062 {
00063   
00064 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00065 
00066 public:
00067   typedef Window CppObjectType;
00068   typedef Window_Class CppClassType;
00069   typedef GdkGLWindow BaseObjectType;
00070   typedef GdkGLWindowClass BaseClassType;
00071 
00072 private:
00073   friend class Window_Class;
00074   static CppClassType window_class_;
00075 
00076   // noncopyable
00077   Window(const Window&);
00078   Window& operator=(const Window&);
00079 
00080 protected:
00081   explicit Window(const Glib::ConstructParams& construct_params);
00082   explicit Window(GdkGLWindow* castitem);
00083 
00084 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00085 
00086 public:
00087   virtual ~Window();
00088 
00089 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00090   static GType get_type()      G_GNUC_CONST;
00091   static GType get_base_type() G_GNUC_CONST;
00092 #endif
00093 
00094   GdkGLWindow*       gobj()       { return reinterpret_cast<GdkGLWindow*>(gobject_); }
00095   const GdkGLWindow* gobj() const { return reinterpret_cast<GdkGLWindow*>(gobject_); }
00096 
00097   GdkGLWindow* gobj_copy();
00098 
00099 private:
00100 
00101 
00102 protected:
00103   Window(const Glib::RefPtr<const Config>& glconfig,
00104          const Glib::RefPtr<const Gdk::Window>& window,
00105          const int* attrib_list = 0);
00106 
00107 public:
00108   
00109   static Glib::RefPtr<Window> create(const Glib::RefPtr<const Config>& glconfig, const Glib::RefPtr<const Gdk::Window>& window, const int* attrib_list);
00110 
00111 
00112 public:
00113 
00114   
00115   /** Returns the Gdk::Window associated with @a glwindow .
00116    * 
00117    * Notice that Gdk::GLWindow is not Gdk::Window, but another
00118    * Gdk::Drawable which have an associated Gdk::Window.
00119    * @return The Gdk::Window associated with @a glwindow .
00120    */
00121   Glib::RefPtr<Gdk::Window> get_window();
00122 
00123   
00124   /** Returns the Gdk::Window associated with @a glwindow .
00125    * 
00126    * Notice that Gdk::GLWindow is not Gdk::Window, but another
00127    * Gdk::Drawable which have an associated Gdk::Window.
00128    * @return The Gdk::Window associated with @a glwindow .
00129    */
00130   Glib::RefPtr<const Gdk::Window> get_window() const;
00131 
00132 public:
00133 
00134   
00135   /** Set the OpenGL-capability to the @a window .
00136    * The call creates a new Gdk::GLWindow.
00137    * attrib_list is currently unused. This must be set to <tt>0</tt> or empty
00138    * (first attribute of None).
00139    * @param glconfig A Gdk::GLConfig.
00140    * @param attrib_list This must be set to <tt>0</tt> or empty (first attribute of None).
00141    * @return The Gdk::GLWindow used by the @a window  if it is successful,
00142    * <tt>0</tt> otherwise.
00143    */
00144   static Glib::RefPtr<Window> set_gl_capability(const Glib::RefPtr<Gdk::Window>& window, const Glib::RefPtr<const Config>& glconfig, const int* attrib_list = 0);
00145 
00146   
00147   /** Unset the OpenGL-capability of the @a window .
00148    * This function destroys the Gdk::GLWindow held by the @a window .
00149    */
00150   static void unset_gl_capability(const Glib::RefPtr<Gdk::Window>& window);
00151 
00152   
00153   /** Returns whether the @a window  is OpenGL-capable.
00154    * @return <tt>true</tt> if the @a window  is OpenGL-capable, <tt>false</tt> otherwise.
00155    */
00156   static bool is_gl_capable(const Glib::RefPtr<const Gdk::Window>& window);
00157 
00158   
00159   /** Returns the Gdk::GLWindow held by the @a window .
00160    * @return The Gdk::GLWindow.
00161    */
00162   static Glib::RefPtr<Window> get_gl_window(const Glib::RefPtr<const Gdk::Window>& window);
00163 
00164   
00165   static Glib::RefPtr<Gdk::GL::Drawable> get_gl_drawable(const Glib::RefPtr<const Gdk::Window>& window);
00166 
00167 
00168 public:
00169 
00170 public:
00171   //C++ methods used to invoke GTK+ virtual functions:
00172 
00173 protected:
00174   //GTK+ Virtual Functions (override these to change behaviour):
00175 
00176   //Default Signal Handlers::
00177 
00178 
00179 };
00180 
00181 } // namespace GL
00182 } // namespace Gdk
00183 
00184 
00185 namespace Glib
00186 {
00187   /** @relates Gdk::GL::Window */
00188   Glib::RefPtr<Gdk::GL::Window> wrap(GdkGLWindow* object, bool take_copy = false);
00189 }
00190 
00191 
00192 #endif /* _GDKMM_GL_WINDOW_H */
00193 

Generated on Sat May 17 02:09:50 2003 for gtkglextmm by doxygen1.3