{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.Gtk.Objects.GLArea
    ( 

-- * Exported types
    GLArea(..)                              ,
    GLAreaK                                 ,
    toGLArea                                ,
    noGLArea                                ,


 -- * Methods
-- ** gLAreaAttachBuffers
    gLAreaAttachBuffers                     ,


-- ** gLAreaGetAutoRender
    gLAreaGetAutoRender                     ,


-- ** gLAreaGetContext
    gLAreaGetContext                        ,


-- ** gLAreaGetError
    gLAreaGetError                          ,


-- ** gLAreaGetHasAlpha
    gLAreaGetHasAlpha                       ,


-- ** gLAreaGetHasDepthBuffer
    gLAreaGetHasDepthBuffer                 ,


-- ** gLAreaGetHasStencilBuffer
    gLAreaGetHasStencilBuffer               ,


-- ** gLAreaGetRequiredVersion
    gLAreaGetRequiredVersion                ,


-- ** gLAreaMakeCurrent
    gLAreaMakeCurrent                       ,


-- ** gLAreaNew
    gLAreaNew                               ,


-- ** gLAreaQueueRender
    gLAreaQueueRender                       ,


-- ** gLAreaSetAutoRender
    gLAreaSetAutoRender                     ,


-- ** gLAreaSetError
    gLAreaSetError                          ,


-- ** gLAreaSetHasAlpha
    gLAreaSetHasAlpha                       ,


-- ** gLAreaSetHasDepthBuffer
    gLAreaSetHasDepthBuffer                 ,


-- ** gLAreaSetHasStencilBuffer
    gLAreaSetHasStencilBuffer               ,


-- ** gLAreaSetRequiredVersion
    gLAreaSetRequiredVersion                ,




 -- * Properties
-- ** AutoRender
    GLAreaAutoRenderPropertyInfo            ,
    constructGLAreaAutoRender               ,
    getGLAreaAutoRender                     ,
    setGLAreaAutoRender                     ,


-- ** Context
    GLAreaContextPropertyInfo               ,
    getGLAreaContext                        ,


-- ** HasAlpha
    GLAreaHasAlphaPropertyInfo              ,
    constructGLAreaHasAlpha                 ,
    getGLAreaHasAlpha                       ,
    setGLAreaHasAlpha                       ,


-- ** HasDepthBuffer
    GLAreaHasDepthBufferPropertyInfo        ,
    constructGLAreaHasDepthBuffer           ,
    getGLAreaHasDepthBuffer                 ,
    setGLAreaHasDepthBuffer                 ,


-- ** HasStencilBuffer
    GLAreaHasStencilBufferPropertyInfo      ,
    constructGLAreaHasStencilBuffer         ,
    getGLAreaHasStencilBuffer               ,
    setGLAreaHasStencilBuffer               ,




 -- * Signals
-- ** CreateContext
    GLAreaCreateContextCallback             ,
    GLAreaCreateContextCallbackC            ,
    GLAreaCreateContextSignalInfo           ,
    afterGLAreaCreateContext                ,
    gLAreaCreateContextCallbackWrapper      ,
    gLAreaCreateContextClosure              ,
    mkGLAreaCreateContextCallback           ,
    noGLAreaCreateContextCallback           ,
    onGLAreaCreateContext                   ,


-- ** Render
    GLAreaRenderCallback                    ,
    GLAreaRenderCallbackC                   ,
    GLAreaRenderSignalInfo                  ,
    afterGLAreaRender                       ,
    gLAreaRenderCallbackWrapper             ,
    gLAreaRenderClosure                     ,
    mkGLAreaRenderCallback                  ,
    noGLAreaRenderCallback                  ,
    onGLAreaRender                          ,


-- ** Resize
    GLAreaResizeCallback                    ,
    GLAreaResizeCallbackC                   ,
    GLAreaResizeSignalInfo                  ,
    afterGLAreaResize                       ,
    gLAreaResizeCallbackWrapper             ,
    gLAreaResizeClosure                     ,
    mkGLAreaResizeCallback                  ,
    noGLAreaResizeCallback                  ,
    onGLAreaResize                          ,




    ) where

import Prelude ()
import Data.GI.Base.ShortPrelude

import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map

import GI.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.Atk as Atk
import qualified GI.GObject as GObject
import qualified GI.Gdk as Gdk

newtype GLArea = GLArea (ForeignPtr GLArea)
foreign import ccall "gtk_gl_area_get_type"
    c_gtk_gl_area_get_type :: IO GType

type instance ParentTypes GLArea = GLAreaParentTypes
type GLAreaParentTypes = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject GLArea where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_gl_area_get_type
    

class GObject o => GLAreaK o
instance (GObject o, IsDescendantOf GLArea o) => GLAreaK o

toGLArea :: GLAreaK o => o -> IO GLArea
toGLArea = unsafeCastTo GLArea

noGLArea :: Maybe GLArea
noGLArea = Nothing

-- signal GLArea::create-context
type GLAreaCreateContextCallback =
    IO Gdk.GLContext

noGLAreaCreateContextCallback :: Maybe GLAreaCreateContextCallback
noGLAreaCreateContextCallback = Nothing

type GLAreaCreateContextCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO (Ptr Gdk.GLContext)

foreign import ccall "wrapper"
    mkGLAreaCreateContextCallback :: GLAreaCreateContextCallbackC -> IO (FunPtr GLAreaCreateContextCallbackC)

gLAreaCreateContextClosure :: GLAreaCreateContextCallback -> IO Closure
gLAreaCreateContextClosure cb = newCClosure =<< mkGLAreaCreateContextCallback wrapped
    where wrapped = gLAreaCreateContextCallbackWrapper cb

gLAreaCreateContextCallbackWrapper ::
    GLAreaCreateContextCallback ->
    Ptr () ->
    Ptr () ->
    IO (Ptr Gdk.GLContext)
gLAreaCreateContextCallbackWrapper _cb _ _ = do
    result <- _cb 
    result' <- refObject result
    return result'

onGLAreaCreateContext :: (GObject a, MonadIO m) => a -> GLAreaCreateContextCallback -> m SignalHandlerId
onGLAreaCreateContext obj cb = liftIO $ connectGLAreaCreateContext obj cb SignalConnectBefore
afterGLAreaCreateContext :: (GObject a, MonadIO m) => a -> GLAreaCreateContextCallback -> m SignalHandlerId
afterGLAreaCreateContext obj cb = connectGLAreaCreateContext obj cb SignalConnectAfter

connectGLAreaCreateContext :: (GObject a, MonadIO m) =>
                              a -> GLAreaCreateContextCallback -> SignalConnectMode -> m SignalHandlerId
connectGLAreaCreateContext obj cb after = liftIO $ do
    cb' <- mkGLAreaCreateContextCallback (gLAreaCreateContextCallbackWrapper cb)
    connectSignalFunPtr obj "create-context" cb' after

-- signal GLArea::render
type GLAreaRenderCallback =
    Gdk.GLContext ->
    IO Bool

noGLAreaRenderCallback :: Maybe GLAreaRenderCallback
noGLAreaRenderCallback = Nothing

type GLAreaRenderCallbackC =
    Ptr () ->                               -- object
    Ptr Gdk.GLContext ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkGLAreaRenderCallback :: GLAreaRenderCallbackC -> IO (FunPtr GLAreaRenderCallbackC)

gLAreaRenderClosure :: GLAreaRenderCallback -> IO Closure
gLAreaRenderClosure cb = newCClosure =<< mkGLAreaRenderCallback wrapped
    where wrapped = gLAreaRenderCallbackWrapper cb

gLAreaRenderCallbackWrapper ::
    GLAreaRenderCallback ->
    Ptr () ->
    Ptr Gdk.GLContext ->
    Ptr () ->
    IO CInt
gLAreaRenderCallbackWrapper _cb _ context _ = do
    context' <- (newObject Gdk.GLContext) context
    result <- _cb  context'
    let result' = (fromIntegral . fromEnum) result
    return result'

onGLAreaRender :: (GObject a, MonadIO m) => a -> GLAreaRenderCallback -> m SignalHandlerId
onGLAreaRender obj cb = liftIO $ connectGLAreaRender obj cb SignalConnectBefore
afterGLAreaRender :: (GObject a, MonadIO m) => a -> GLAreaRenderCallback -> m SignalHandlerId
afterGLAreaRender obj cb = connectGLAreaRender obj cb SignalConnectAfter

connectGLAreaRender :: (GObject a, MonadIO m) =>
                       a -> GLAreaRenderCallback -> SignalConnectMode -> m SignalHandlerId
connectGLAreaRender obj cb after = liftIO $ do
    cb' <- mkGLAreaRenderCallback (gLAreaRenderCallbackWrapper cb)
    connectSignalFunPtr obj "render" cb' after

-- signal GLArea::resize
type GLAreaResizeCallback =
    Int32 ->
    Int32 ->
    IO ()

noGLAreaResizeCallback :: Maybe GLAreaResizeCallback
noGLAreaResizeCallback = Nothing

type GLAreaResizeCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkGLAreaResizeCallback :: GLAreaResizeCallbackC -> IO (FunPtr GLAreaResizeCallbackC)

gLAreaResizeClosure :: GLAreaResizeCallback -> IO Closure
gLAreaResizeClosure cb = newCClosure =<< mkGLAreaResizeCallback wrapped
    where wrapped = gLAreaResizeCallbackWrapper cb

gLAreaResizeCallbackWrapper ::
    GLAreaResizeCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO ()
gLAreaResizeCallbackWrapper _cb _ width height _ = do
    _cb  width height

onGLAreaResize :: (GObject a, MonadIO m) => a -> GLAreaResizeCallback -> m SignalHandlerId
onGLAreaResize obj cb = liftIO $ connectGLAreaResize obj cb SignalConnectBefore
afterGLAreaResize :: (GObject a, MonadIO m) => a -> GLAreaResizeCallback -> m SignalHandlerId
afterGLAreaResize obj cb = connectGLAreaResize obj cb SignalConnectAfter

connectGLAreaResize :: (GObject a, MonadIO m) =>
                       a -> GLAreaResizeCallback -> SignalConnectMode -> m SignalHandlerId
connectGLAreaResize obj cb after = liftIO $ do
    cb' <- mkGLAreaResizeCallback (gLAreaResizeCallbackWrapper cb)
    connectSignalFunPtr obj "resize" cb' after

-- VVV Prop "auto-render"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]

getGLAreaAutoRender :: (MonadIO m, GLAreaK o) => o -> m Bool
getGLAreaAutoRender obj = liftIO $ getObjectPropertyBool obj "auto-render"

setGLAreaAutoRender :: (MonadIO m, GLAreaK o) => o -> Bool -> m ()
setGLAreaAutoRender obj val = liftIO $ setObjectPropertyBool obj "auto-render" val

constructGLAreaAutoRender :: Bool -> IO ([Char], GValue)
constructGLAreaAutoRender val = constructObjectPropertyBool "auto-render" val

data GLAreaAutoRenderPropertyInfo
instance AttrInfo GLAreaAutoRenderPropertyInfo where
    type AttrAllowedOps GLAreaAutoRenderPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint GLAreaAutoRenderPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint GLAreaAutoRenderPropertyInfo = GLAreaK
    type AttrGetType GLAreaAutoRenderPropertyInfo = Bool
    type AttrLabel GLAreaAutoRenderPropertyInfo = "GLArea::auto-render"
    attrGet _ = getGLAreaAutoRender
    attrSet _ = setGLAreaAutoRender
    attrConstruct _ = constructGLAreaAutoRender

-- VVV Prop "context"
   -- Type: TInterface "Gdk" "GLContext"
   -- Flags: [PropertyReadable]

getGLAreaContext :: (MonadIO m, GLAreaK o) => o -> m Gdk.GLContext
getGLAreaContext obj = liftIO $ getObjectPropertyObject obj "context" Gdk.GLContext

data GLAreaContextPropertyInfo
instance AttrInfo GLAreaContextPropertyInfo where
    type AttrAllowedOps GLAreaContextPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint GLAreaContextPropertyInfo = (~) ()
    type AttrBaseTypeConstraint GLAreaContextPropertyInfo = GLAreaK
    type AttrGetType GLAreaContextPropertyInfo = Gdk.GLContext
    type AttrLabel GLAreaContextPropertyInfo = "GLArea::context"
    attrGet _ = getGLAreaContext
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "has-alpha"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]

getGLAreaHasAlpha :: (MonadIO m, GLAreaK o) => o -> m Bool
getGLAreaHasAlpha obj = liftIO $ getObjectPropertyBool obj "has-alpha"

setGLAreaHasAlpha :: (MonadIO m, GLAreaK o) => o -> Bool -> m ()
setGLAreaHasAlpha obj val = liftIO $ setObjectPropertyBool obj "has-alpha" val

constructGLAreaHasAlpha :: Bool -> IO ([Char], GValue)
constructGLAreaHasAlpha val = constructObjectPropertyBool "has-alpha" val

data GLAreaHasAlphaPropertyInfo
instance AttrInfo GLAreaHasAlphaPropertyInfo where
    type AttrAllowedOps GLAreaHasAlphaPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint GLAreaHasAlphaPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint GLAreaHasAlphaPropertyInfo = GLAreaK
    type AttrGetType GLAreaHasAlphaPropertyInfo = Bool
    type AttrLabel GLAreaHasAlphaPropertyInfo = "GLArea::has-alpha"
    attrGet _ = getGLAreaHasAlpha
    attrSet _ = setGLAreaHasAlpha
    attrConstruct _ = constructGLAreaHasAlpha

-- VVV Prop "has-depth-buffer"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]

getGLAreaHasDepthBuffer :: (MonadIO m, GLAreaK o) => o -> m Bool
getGLAreaHasDepthBuffer obj = liftIO $ getObjectPropertyBool obj "has-depth-buffer"

setGLAreaHasDepthBuffer :: (MonadIO m, GLAreaK o) => o -> Bool -> m ()
setGLAreaHasDepthBuffer obj val = liftIO $ setObjectPropertyBool obj "has-depth-buffer" val

constructGLAreaHasDepthBuffer :: Bool -> IO ([Char], GValue)
constructGLAreaHasDepthBuffer val = constructObjectPropertyBool "has-depth-buffer" val

data GLAreaHasDepthBufferPropertyInfo
instance AttrInfo GLAreaHasDepthBufferPropertyInfo where
    type AttrAllowedOps GLAreaHasDepthBufferPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint GLAreaHasDepthBufferPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint GLAreaHasDepthBufferPropertyInfo = GLAreaK
    type AttrGetType GLAreaHasDepthBufferPropertyInfo = Bool
    type AttrLabel GLAreaHasDepthBufferPropertyInfo = "GLArea::has-depth-buffer"
    attrGet _ = getGLAreaHasDepthBuffer
    attrSet _ = setGLAreaHasDepthBuffer
    attrConstruct _ = constructGLAreaHasDepthBuffer

-- VVV Prop "has-stencil-buffer"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]

getGLAreaHasStencilBuffer :: (MonadIO m, GLAreaK o) => o -> m Bool
getGLAreaHasStencilBuffer obj = liftIO $ getObjectPropertyBool obj "has-stencil-buffer"

setGLAreaHasStencilBuffer :: (MonadIO m, GLAreaK o) => o -> Bool -> m ()
setGLAreaHasStencilBuffer obj val = liftIO $ setObjectPropertyBool obj "has-stencil-buffer" val

constructGLAreaHasStencilBuffer :: Bool -> IO ([Char], GValue)
constructGLAreaHasStencilBuffer val = constructObjectPropertyBool "has-stencil-buffer" val

data GLAreaHasStencilBufferPropertyInfo
instance AttrInfo GLAreaHasStencilBufferPropertyInfo where
    type AttrAllowedOps GLAreaHasStencilBufferPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint GLAreaHasStencilBufferPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint GLAreaHasStencilBufferPropertyInfo = GLAreaK
    type AttrGetType GLAreaHasStencilBufferPropertyInfo = Bool
    type AttrLabel GLAreaHasStencilBufferPropertyInfo = "GLArea::has-stencil-buffer"
    attrGet _ = getGLAreaHasStencilBuffer
    attrSet _ = setGLAreaHasStencilBuffer
    attrConstruct _ = constructGLAreaHasStencilBuffer

type instance AttributeList GLArea = GLAreaAttributeList
type GLAreaAttributeList = ('[ '("app-paintable", WidgetAppPaintablePropertyInfo), '("auto-render", GLAreaAutoRenderPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("context", GLAreaContextPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-alpha", GLAreaHasAlphaPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-depth-buffer", GLAreaHasDepthBufferPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-stencil-buffer", GLAreaHasStencilBufferPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("style", WidgetStylePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo)] :: [(Symbol, *)])

data GLAreaCreateContextSignalInfo
instance SignalInfo GLAreaCreateContextSignalInfo where
    type HaskellCallbackType GLAreaCreateContextSignalInfo = GLAreaCreateContextCallback
    connectSignal _ = connectGLAreaCreateContext

data GLAreaRenderSignalInfo
instance SignalInfo GLAreaRenderSignalInfo where
    type HaskellCallbackType GLAreaRenderSignalInfo = GLAreaRenderCallback
    connectSignal _ = connectGLAreaRender

data GLAreaResizeSignalInfo
instance SignalInfo GLAreaResizeSignalInfo where
    type HaskellCallbackType GLAreaResizeSignalInfo = GLAreaResizeCallback
    connectSignal _ = connectGLAreaResize

type instance SignalList GLArea = GLAreaSignalList
type GLAreaSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("create-context", GLAreaCreateContextSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("render", GLAreaRenderSignalInfo), '("resize", GLAreaResizeSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method GLArea::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "GLArea"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_new" gtk_gl_area_new :: 
    IO (Ptr GLArea)


gLAreaNew ::
    (MonadIO m) =>
    m GLArea
gLAreaNew  = liftIO $ do
    result <- gtk_gl_area_new
    checkUnexpectedReturnNULL "gtk_gl_area_new" result
    result' <- (wrapObject GLArea) result
    return result'

-- method GLArea::attach_buffers
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_attach_buffers" gtk_gl_area_attach_buffers :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO ()


gLAreaAttachBuffers ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m ()
gLAreaAttachBuffers _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_gl_area_attach_buffers _obj'
    touchManagedPtr _obj
    return ()

-- method GLArea::get_auto_render
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_auto_render" gtk_gl_area_get_auto_render :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO CInt


gLAreaGetAutoRender ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m Bool
gLAreaGetAutoRender _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_auto_render _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "GLContext"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_context" gtk_gl_area_get_context :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO (Ptr Gdk.GLContext)


gLAreaGetContext ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m Gdk.GLContext
gLAreaGetContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_context _obj'
    checkUnexpectedReturnNULL "gtk_gl_area_get_context" result
    result' <- (newObject Gdk.GLContext) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_error
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TError
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_error" gtk_gl_area_get_error :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO (Ptr GError)


gLAreaGetError ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m GError
gLAreaGetError _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_error _obj'
    checkUnexpectedReturnNULL "gtk_gl_area_get_error" result
    result' <- (newBoxed GError) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_has_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_has_alpha" gtk_gl_area_get_has_alpha :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO CInt


gLAreaGetHasAlpha ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m Bool
gLAreaGetHasAlpha _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_has_alpha _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_has_depth_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_has_depth_buffer" gtk_gl_area_get_has_depth_buffer :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO CInt


gLAreaGetHasDepthBuffer ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m Bool
gLAreaGetHasDepthBuffer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_has_depth_buffer _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_has_stencil_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_has_stencil_buffer" gtk_gl_area_get_has_stencil_buffer :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO CInt


gLAreaGetHasStencilBuffer ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m Bool
gLAreaGetHasStencilBuffer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_gl_area_get_has_stencil_buffer _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method GLArea::get_required_version
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "major", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "minor", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_get_required_version" gtk_gl_area_get_required_version :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    Ptr Int32 ->                            -- major : TBasicType TInt32
    Ptr Int32 ->                            -- minor : TBasicType TInt32
    IO ()


gLAreaGetRequiredVersion ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m (Int32,Int32)
gLAreaGetRequiredVersion _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    major <- allocMem :: IO (Ptr Int32)
    minor <- allocMem :: IO (Ptr Int32)
    gtk_gl_area_get_required_version _obj' major minor
    major' <- peek major
    minor' <- peek minor
    touchManagedPtr _obj
    freeMem major
    freeMem minor
    return (major', minor')

-- method GLArea::make_current
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_make_current" gtk_gl_area_make_current :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO ()


gLAreaMakeCurrent ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m ()
gLAreaMakeCurrent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_gl_area_make_current _obj'
    touchManagedPtr _obj
    return ()

-- method GLArea::queue_render
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_queue_render" gtk_gl_area_queue_render :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    IO ()


gLAreaQueueRender ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    m ()
gLAreaQueueRender _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_gl_area_queue_render _obj'
    touchManagedPtr _obj
    return ()

-- method GLArea::set_auto_render
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "auto_render", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "auto_render", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_auto_render" gtk_gl_area_set_auto_render :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    CInt ->                                 -- auto_render : TBasicType TBoolean
    IO ()


gLAreaSetAutoRender ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- auto_render
    m ()
gLAreaSetAutoRender _obj auto_render = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let auto_render' = (fromIntegral . fromEnum) auto_render
    gtk_gl_area_set_auto_render _obj' auto_render'
    touchManagedPtr _obj
    return ()

-- method GLArea::set_error
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error", argType = TError, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_error" gtk_gl_area_set_error :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    Ptr GError ->                           -- error : TError
    IO ()


gLAreaSetError ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Maybe (GError) ->                       -- error
    m ()
gLAreaSetError _obj error_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeError_ <- case error_ of
        Nothing -> return nullPtr
        Just jError_ -> do
            let jError_' = unsafeManagedPtrGetPtr jError_
            return jError_'
    gtk_gl_area_set_error _obj' maybeError_
    touchManagedPtr _obj
    whenJust error_ touchManagedPtr
    return ()

-- method GLArea::set_has_alpha
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_alpha", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_alpha", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_has_alpha" gtk_gl_area_set_has_alpha :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    CInt ->                                 -- has_alpha : TBasicType TBoolean
    IO ()


gLAreaSetHasAlpha ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_alpha
    m ()
gLAreaSetHasAlpha _obj has_alpha = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_alpha' = (fromIntegral . fromEnum) has_alpha
    gtk_gl_area_set_has_alpha _obj' has_alpha'
    touchManagedPtr _obj
    return ()

-- method GLArea::set_has_depth_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_depth_buffer", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_depth_buffer", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_has_depth_buffer" gtk_gl_area_set_has_depth_buffer :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    CInt ->                                 -- has_depth_buffer : TBasicType TBoolean
    IO ()


gLAreaSetHasDepthBuffer ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_depth_buffer
    m ()
gLAreaSetHasDepthBuffer _obj has_depth_buffer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_depth_buffer' = (fromIntegral . fromEnum) has_depth_buffer
    gtk_gl_area_set_has_depth_buffer _obj' has_depth_buffer'
    touchManagedPtr _obj
    return ()

-- method GLArea::set_has_stencil_buffer
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_stencil_buffer", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "has_stencil_buffer", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_has_stencil_buffer" gtk_gl_area_set_has_stencil_buffer :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    CInt ->                                 -- has_stencil_buffer : TBasicType TBoolean
    IO ()


gLAreaSetHasStencilBuffer ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- has_stencil_buffer
    m ()
gLAreaSetHasStencilBuffer _obj has_stencil_buffer = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let has_stencil_buffer' = (fromIntegral . fromEnum) has_stencil_buffer
    gtk_gl_area_set_has_stencil_buffer _obj' has_stencil_buffer'
    touchManagedPtr _obj
    return ()

-- method GLArea::set_required_version
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "major", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minor", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "GLArea", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "major", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "minor", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_gl_area_set_required_version" gtk_gl_area_set_required_version :: 
    Ptr GLArea ->                           -- _obj : TInterface "Gtk" "GLArea"
    Int32 ->                                -- major : TBasicType TInt32
    Int32 ->                                -- minor : TBasicType TInt32
    IO ()


gLAreaSetRequiredVersion ::
    (MonadIO m, GLAreaK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- major
    Int32 ->                                -- minor
    m ()
gLAreaSetRequiredVersion _obj major minor = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_gl_area_set_required_version _obj' major minor
    touchManagedPtr _obj
    return ()