-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Binding to the GTK+ OpenGL Extension
--   
--   GtkGLExt provides the GDK objects to support OpenGL rendering in GTK+,
--   and GtkWidget API add-ons to make GTK+ widgets OpenGL-capable.
@package gtkglext
@version 0.12.1


-- | OpenGL window which is located on-screen
module Graphics.UI.Gtk.OpenGL.Window
data GLWindow
class DrawableClass o => GLWindowClass o
castToGLWindow :: GObjectClass obj => obj -> GLWindow

-- | Creates an on-screen rendering area.
glWindowNew :: GLConfig -> DrawWindow -> IO GLWindow

-- | Returns the <a>DrawWindow</a> associated with a <a>GLWindow</a>.
glWindowGetWindow :: GLWindow -> IO DrawWindow
instance GLDrawableClass GLWindow


-- | OpenGL pixmap which is maintained off-screen
module Graphics.UI.Gtk.OpenGL.Pixmap
data GLPixmap
class DrawableClass o => GLPixmapClass o
castToGLPixmap :: GObjectClass obj => obj -> GLPixmap

-- | Creates an off-screen rendering area.
glPixmapNew :: GLConfig -> Pixmap -> IO GLPixmap

-- | Returns the <a>Pixmap</a> associated with a <a>GLPixmap</a>.
glPixmapGetPixmap :: GLPixmap -> IO Pixmap
instance GLDrawableClass GLPixmap


-- | OpenGL rendering surface interface
module Graphics.UI.Gtk.OpenGL.Drawable
data GLDrawable
class GObjectClass o => GLDrawableClass o
castToGLDrawable :: GObjectClass obj => obj -> GLDrawable
toGLDrawable :: GLDrawableClass o => o -> GLDrawable

-- | Attach an OpenGL rendering context to a GL drawable.
glDrawableMakeCurrent :: GLDrawableClass self => self -> GLContext -> IO Bool

-- | Returns whether the GL drawable supports the double-buffered visual.
glDrawableIsDoubleBuffered :: GLDrawableClass self => self -> IO Bool

-- | Exchange front and back buffers.
glDrawableSwapBuffers :: GLDrawableClass self => self -> IO ()

-- | Complete OpenGL execution prior to subsequent Gdk drawing calls.
glDrawableWaitGL :: GLDrawableClass self => self -> IO ()

-- | Complete Gdk drawing execution prior to subsequent OpenGL calls.
glDrawableWaitGdk :: GLDrawableClass self => self -> IO ()

-- | Delimits the begining of the OpenGL execution.
glDrawableGLBegin :: GLDrawableClass self => self -> GLContext -> IO Bool

-- | Delimits the end of the OpenGL execution.
glDrawableGLEnd :: GLDrawableClass self => self -> IO ()

-- | Gets <a>GLConfig</a> with which the GL drawable is configured.
glDrawableGetGLConfig :: GLDrawableClass self => self -> IO GLConfig

-- | Returns the width and height of the GL drawable.
glDrawableGetSize :: GLDrawableClass self => self -> IO (Int, Int)

-- | Returns the current <a>GLDrawable</a>.
glDrawableGetCurrent :: IO (Maybe GLDrawable)


-- | OpenGL rendering context object
module Graphics.UI.Gtk.OpenGL.Context
data GLContext
class GObjectClass o => GLContextClass o
castToGLContext :: GObjectClass obj => obj -> GLContext
data GLRenderType
RGBAType :: GLRenderType
ColorIndexType :: GLRenderType

-- | Creates a new OpenGL rendering context.
glContextNew :: GLDrawableClass gldrawable => gldrawable -> Maybe GLContext -> Bool -> GLRenderType -> IO GLContext

-- | Gets <a>GLDrawable</a> to which the <a>GLContext</a> is bound.
glContextGetGLDrawable :: GLContext -> IO GLDrawable

-- | Gets the <a>GLConfig</a> with which the <a>GLContext</a> is
--   configured.
glContextGetGLConfig :: GLContext -> IO GLConfig

-- | Gets the other <a>GLContext</a> with which the <a>GLContext</a> shares
--   the display lists and texture objects.
glContextGetShareList :: GLContext -> IO GLContext

-- | Returns whether the <a>GLContext</a> is a direct rendering context.
glContextIsDirect :: GLContext -> IO Bool

-- | Gets the <a>GLRenderType</a> of the <a>GLContext</a>.
glContextGetRenderType :: GLContext -> IO GLRenderType

-- | Returns the current <a>GLContext</a>.
glContextGetCurrent :: IO (Maybe GLContext)
instance Eq GLRenderType
instance Enum GLRenderType


-- | OpenGL frame buffer configuration object
module Graphics.UI.Gtk.OpenGL.Config
data GLConfig
class GObjectClass o => GLConfigClass o
castToGLConfig :: GObjectClass obj => obj -> GLConfig
toGLConfig :: GLConfigClass o => o -> GLConfig
data GLConfigMode
GLModeRGB :: GLConfigMode
GLModeRGBA :: GLConfigMode
GLModeIndex :: GLConfigMode
GLModeSingle :: GLConfigMode
GLModeDouble :: GLConfigMode
GLModeStereo :: GLConfigMode
GLModeAlpha :: GLConfigMode
GLModeDepth :: GLConfigMode
GLModeStencil :: GLConfigMode
GLModeAccum :: GLConfigMode
GLModeMultiSample :: GLConfigMode

-- | Returns an OpenGL frame buffer configuration that match the specified
--   display mode.
glConfigNew :: [GLConfigMode] -> IO GLConfig

-- | Returns an OpenGL frame buffer configuration that matchs the specified
--   display mode.
glConfigNewForScreen :: Screen -> [GLConfigMode] -> IO GLConfig

-- | Gets the <a>Colormap</a> that is appropriate for the OpenGL frame
--   buffer configuration.
glConfigGetColormap :: GLConfig -> IO Colormap

-- | Gets the layer plane (level) of the frame buffer. Zero is the default
--   frame buffer. Positive layer planes correspond to frame buffers that
--   overlay the default buffer, and negative layer planes correspond to
--   frame buffers that underlie the default frame buffer.
glConfigGetLayerPlane :: GLConfig -> IO Int

-- | Gets the number of auxiliary color buffers.
glConfigGetNAuxBuffers :: GLConfig -> IO Int

-- | Gets the number of multisample buffers.
glConfigGetNSampleBuffers :: GLConfig -> IO Int

-- | Returns whether the configured frame buffer is RGBA mode.
glConfigIsRgba :: GLConfig -> IO Bool

-- | Returns whether the configuration supports the double-buffered visual.
glConfigIsDoubleBuffered :: GLConfig -> IO Bool

-- | Returns whether the configuration supports the stereo visual.
glConfigIsStereo :: GLConfig -> IO Bool

-- | Returns whether the configured color buffer has alpha bits.
glConfigHasAlpha :: GLConfig -> IO Bool

-- | Returns whether the configured frame buffer has depth buffer.
glConfigHasDepthBuffer :: GLConfig -> IO Bool

-- | Returns whether the configured frame buffer has stencil buffer.
glConfigHasStencilBuffer :: GLConfig -> IO Bool

-- | Returns whether the configured frame buffer has accumulation buffer.
glConfigHasAccumBuffer :: GLConfig -> IO Bool

-- | Gets the <a>Screen</a> associated with the <a>GLConfig</a>.
glConfigGetScreen :: GLConfig -> IO Screen

-- | Gets the color depth of the OpenGL-capable visual.
glConfigGetDepth :: GLConfig -> IO Int
instance Eq GLConfigMode
instance Bounded GLConfigMode
instance Flags GLConfigMode
instance Enum GLConfigMode


module Graphics.UI.Gtk.OpenGL.General
initGL :: IO [String]
glQueryExtension :: IO Bool
glQueryExtensionForDisplay :: Display -> IO Bool
glQueryGLExtension :: String -> IO Bool
glQueryVersion :: IO (Maybe (Int, Int))
glQueryVersionForDisplay :: Display -> IO (Maybe (Int, Int))


module Graphics.UI.Gtk.OpenGL.DrawingArea
data GLDrawingArea
glDrawingAreaNew :: GLConfig -> IO GLDrawingArea
withGLDrawingArea :: GLDrawingArea -> (GLWindow -> IO a) -> IO a
glDrawingAreaGetGLConfig :: GLDrawingArea -> IO GLConfig
glDrawingAreaGetGLContext :: GLDrawingArea -> IO GLContext
glDrawingAreaGetGLWindow :: GLDrawingArea -> IO GLWindow
instance GObjectClass GLDrawingArea
instance ObjectClass GLDrawingArea
instance WidgetClass GLDrawingArea
instance DrawingAreaClass GLDrawingArea


-- | OpenGL extension for Gtk+
module Graphics.UI.Gtk.OpenGL
