packages feed

gi-atk-0.2.16.8: GI/Atk.hs

-- Generated code.

{-# OPTIONS_GHC -fno-warn-unused-imports #-}

{-# LANGUAGE ForeignFunctionInterface, ConstraintKinds,
    TypeFamilies, MultiParamTypeClasses, KindSignatures,
    FlexibleInstances, UndecidableInstances, DataKinds,
    OverloadedStrings, NegativeLiterals, FlexibleContexts #-}

module GI.Atk where

import Prelude ()
import Data.GI.Base.ShortPrelude
import Data.Char
import Data.Int
import Data.Word
import qualified Data.ByteString.Char8 as B
import Data.ByteString.Char8 (ByteString)
import qualified Data.Map as Map
import Foreign.C
import Foreign.Ptr
import Foreign.ForeignPtr
import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
import Foreign.Storable (peek, poke, sizeOf)
import Control.Applicative ((<$>))
import Control.Exception (onException)
import Control.Monad.IO.Class
import qualified Data.Text as T

import Data.GI.Base.Attributes hiding (get, set)
import Data.GI.Base.BasicTypes
import Data.GI.Base.BasicConversions
import Data.GI.Base.Closure
import Data.GI.Base.GError
import Data.GI.Base.GHashTable
import Data.GI.Base.GParamSpec
import Data.GI.Base.GVariant
import Data.GI.Base.GValue
import Data.GI.Base.ManagedPtr
import Data.GI.Base.Overloading
import Data.GI.Base.Properties hiding (new)
import Data.GI.Base.Signals (SignalConnectMode(..), connectSignalFunPtr, SignalHandlerId)
import Data.GI.Base.Utils

import qualified GI.GLib as GLib
import qualified GI.GLibAttributes as GLibA
import qualified GI.GObject as GObject
import qualified GI.GObjectAttributes as GObjectA

-- interface Action 

newtype Action = Action (ForeignPtr Action)
noAction :: Maybe Action
noAction = Nothing

class ForeignPtrNewtype a => ActionK a
instance (ForeignPtrNewtype o, IsDescendantOf Action o) => ActionK o
type instance ParentTypes Action = '[]

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

foreign import ccall "atk_action_do_action" atk_action_do_action :: 
    Ptr Action ->                           -- _obj : TInterface "Atk" "Action"
    Int32 ->                                -- i : TBasicType TInt32
    IO CInt


actionDoAction ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m Bool
actionDoAction _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_action_do_action _obj' i
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Action::get_description
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_action_get_description" atk_action_get_description :: 
    Ptr Action ->                           -- _obj : TInterface "Atk" "Action"
    Int32 ->                                -- i : TBasicType TInt32
    IO CString


actionGetDescription ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m T.Text
actionGetDescription _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_action_get_description _obj' i
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Action::get_keybinding
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_action_get_keybinding" atk_action_get_keybinding :: 
    Ptr Action ->                           -- _obj : TInterface "Atk" "Action"
    Int32 ->                                -- i : TBasicType TInt32
    IO CString


actionGetKeybinding ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m T.Text
actionGetKeybinding _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_action_get_keybinding _obj' i
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Action::get_localized_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_action_get_localized_name" atk_action_get_localized_name :: 
    Ptr Action ->                           -- _obj : TInterface "Atk" "Action"
    Int32 ->                                -- i : TBasicType TInt32
    IO CString


actionGetLocalizedName ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m T.Text
actionGetLocalizedName _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_action_get_localized_name _obj' i
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_action_get_n_actions" atk_action_get_n_actions :: 
    Ptr Action ->                           -- _obj : TInterface "Atk" "Action"
    IO Int32


actionGetNActions ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    m Int32
actionGetNActions _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_action_get_n_actions _obj'
    touchManagedPtr _obj
    return result

-- method Action::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_action_get_name" atk_action_get_name :: 
    Ptr Action ->                           -- _obj : TInterface "Atk" "Action"
    Int32 ->                                -- i : TBasicType TInt32
    IO CString


actionGetName ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m T.Text
actionGetName _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_action_get_name _obj' i
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Action::set_description
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "desc", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "desc", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "atk_action_set_description" atk_action_set_description :: 
    Ptr Action ->                           -- _obj : TInterface "Atk" "Action"
    Int32 ->                                -- i : TBasicType TInt32
    CString ->                              -- desc : TBasicType TUTF8
    IO CInt


actionSetDescription ::
    (MonadIO m, ActionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    T.Text ->                               -- desc
    m Bool
actionSetDescription _obj i desc = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    desc' <- textToCString desc
    result <- atk_action_set_description _obj' i desc'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem desc'
    return result'

-- struct Attribute
newtype Attribute = Attribute (ForeignPtr Attribute)
noAttribute :: Maybe Attribute
noAttribute = Nothing

attributeReadName :: Attribute -> IO T.Text
attributeReadName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

attributeReadValue :: Attribute -> IO T.Text
attributeReadValue s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

-- interface Component 

newtype Component = Component (ForeignPtr Component)
noComponent :: Maybe Component
noComponent = Nothing

class ForeignPtrNewtype a => ComponentK a
instance (ForeignPtrNewtype o, IsDescendantOf Component o) => ComponentK o
type instance ParentTypes Component = '[]

-- method Component::contains
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "atk_component_contains" atk_component_contains :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    CUInt ->                                -- coord_type : TInterface "Atk" "CoordType"
    IO CInt


componentContains ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    CoordType ->                            -- coord_type
    m Bool
componentContains _obj x y coord_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let coord_type' = (fromIntegral . fromEnum) coord_type
    result <- atk_component_contains _obj' x y coord_type'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_component_get_alpha" atk_component_get_alpha :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    IO CDouble


componentGetAlpha ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    m Double
componentGetAlpha _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_component_get_alpha _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method Component::get_extents
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_component_get_extents" atk_component_get_extents :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    CUInt ->                                -- coord_type : TInterface "Atk" "CoordType"
    IO ()


componentGetExtents ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    CoordType ->                            -- coord_type
    m ()
componentGetExtents _obj x y width height coord_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let coord_type' = (fromIntegral . fromEnum) coord_type
    atk_component_get_extents _obj' x y width height coord_type'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "atk_component_get_layer" atk_component_get_layer :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    IO CUInt


componentGetLayer ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    m Layer
componentGetLayer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_component_get_layer _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_component_get_mdi_zorder" atk_component_get_mdi_zorder :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    IO Int32


componentGetMdiZorder ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    m Int32
componentGetMdiZorder _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_component_get_mdi_zorder _obj'
    touchManagedPtr _obj
    return result

-- method Component::get_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_component_get_position" atk_component_get_position :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    CUInt ->                                -- coord_type : TInterface "Atk" "CoordType"
    IO ()

{-# DEPRECATED componentGetPosition ["Since 2.12. Use atk_component_get_extents() instead."]#-}
componentGetPosition ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    CoordType ->                            -- coord_type
    m ()
componentGetPosition _obj x y coord_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let coord_type' = (fromIntegral . fromEnum) coord_type
    atk_component_get_position _obj' x y coord_type'
    touchManagedPtr _obj
    return ()

-- method Component::get_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", 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 "atk_component_get_size" atk_component_get_size :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()

{-# DEPRECATED componentGetSize ["Since 2.12. Use atk_component_get_extents() instead."]#-}
componentGetSize ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
componentGetSize _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_component_get_size _obj' width height
    touchManagedPtr _obj
    return ()

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

foreign import ccall "atk_component_grab_focus" atk_component_grab_focus :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    IO CInt


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

-- method Component::ref_accessible_at_point
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_component_ref_accessible_at_point" atk_component_ref_accessible_at_point :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    CUInt ->                                -- coord_type : TInterface "Atk" "CoordType"
    IO (Ptr Object)


componentRefAccessibleAtPoint ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    CoordType ->                            -- coord_type
    m Object
componentRefAccessibleAtPoint _obj x y coord_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let coord_type' = (fromIntegral . fromEnum) coord_type
    result <- atk_component_ref_accessible_at_point _obj' x y coord_type'
    result' <- (wrapObject Object) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_component_remove_focus_handler" atk_component_remove_focus_handler :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    Word32 ->                               -- handler_id : TBasicType TUInt32
    IO ()

{-# DEPRECATED componentRemoveFocusHandler ["(Since version 2.9.4)","If you need to track when an object gains or","lose the focus, use state-changed:focused notification instead."]#-}
componentRemoveFocusHandler ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- handler_id
    m ()
componentRemoveFocusHandler _obj handler_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_component_remove_focus_handler _obj' handler_id
    touchManagedPtr _obj
    return ()

-- method Component::set_extents
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "atk_component_set_extents" atk_component_set_extents :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    CUInt ->                                -- coord_type : TInterface "Atk" "CoordType"
    IO CInt


componentSetExtents ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    CoordType ->                            -- coord_type
    m Bool
componentSetExtents _obj x y width height coord_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let coord_type' = (fromIntegral . fromEnum) coord_type
    result <- atk_component_set_extents _obj' x y width height coord_type'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Component::set_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Component", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "atk_component_set_position" atk_component_set_position :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    CUInt ->                                -- coord_type : TInterface "Atk" "CoordType"
    IO CInt


componentSetPosition ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    CoordType ->                            -- coord_type
    m Bool
componentSetPosition _obj x y coord_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let coord_type' = (fromIntegral . fromEnum) coord_type
    result <- atk_component_set_position _obj' x y coord_type'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_component_set_size" atk_component_set_size :: 
    Ptr Component ->                        -- _obj : TInterface "Atk" "Component"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO CInt


componentSetSize ::
    (MonadIO m, ComponentK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    Int32 ->                                -- height
    m Bool
componentSetSize _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_component_set_size _obj' width height
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- signal Component::bounds-changed
type ComponentBoundsChangedCallback =
    Rectangle ->
    IO ()

noComponentBoundsChangedCallback :: Maybe ComponentBoundsChangedCallback
noComponentBoundsChangedCallback = Nothing

type ComponentBoundsChangedCallbackC =
    Ptr () ->                               -- object
    Ptr Rectangle ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkComponentBoundsChangedCallback :: ComponentBoundsChangedCallbackC -> IO (FunPtr ComponentBoundsChangedCallbackC)

componentBoundsChangedClosure :: ComponentBoundsChangedCallback -> IO Closure
componentBoundsChangedClosure cb = newCClosure =<< mkComponentBoundsChangedCallback wrapped
    where wrapped = componentBoundsChangedCallbackWrapper cb

componentBoundsChangedCallbackWrapper ::
    ComponentBoundsChangedCallback ->
    Ptr () ->
    Ptr Rectangle ->
    Ptr () ->
    IO ()
componentBoundsChangedCallbackWrapper _cb _ arg1 _ = do
    arg1' <- (newBoxed Rectangle) arg1
    _cb  arg1'

onComponentBoundsChanged :: (GObject a, MonadIO m) => a -> ComponentBoundsChangedCallback -> m SignalHandlerId
onComponentBoundsChanged obj cb = liftIO $ connectComponentBoundsChanged obj cb SignalConnectBefore
afterComponentBoundsChanged :: (GObject a, MonadIO m) => a -> ComponentBoundsChangedCallback -> m SignalHandlerId
afterComponentBoundsChanged obj cb = connectComponentBoundsChanged obj cb SignalConnectAfter

connectComponentBoundsChanged :: (GObject a, MonadIO m) =>
                                 a -> ComponentBoundsChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectComponentBoundsChanged obj cb after = liftIO $ do
    cb' <- mkComponentBoundsChangedCallback (componentBoundsChangedCallbackWrapper cb)
    connectSignalFunPtr obj "bounds-changed" cb' after

-- Enum CoordType

data CoordType = 
      CoordTypeScreen
    | CoordTypeWindow
    | AnotherCoordType Int
    deriving (Show, Eq)

instance Enum CoordType where
    fromEnum CoordTypeScreen = 0
    fromEnum CoordTypeWindow = 1
    fromEnum (AnotherCoordType k) = k

    toEnum 0 = CoordTypeScreen
    toEnum 1 = CoordTypeWindow
    toEnum k = AnotherCoordType k

foreign import ccall "atk_coord_type_get_type" c_atk_coord_type_get_type :: 
    IO GType

instance BoxedEnum CoordType where
    boxedEnumType _ = c_atk_coord_type_get_type

-- interface Document 

newtype Document = Document (ForeignPtr Document)
noDocument :: Maybe Document
noDocument = Nothing

class ForeignPtrNewtype a => DocumentK a
instance (ForeignPtrNewtype o, IsDescendantOf Document o) => DocumentK o
type instance ParentTypes Document = '[]

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

foreign import ccall "atk_document_get_attribute_value" atk_document_get_attribute_value :: 
    Ptr Document ->                         -- _obj : TInterface "Atk" "Document"
    CString ->                              -- attribute_name : TBasicType TUTF8
    IO CString


documentGetAttributeValue ::
    (MonadIO m, DocumentK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- attribute_name
    m T.Text
documentGetAttributeValue _obj attribute_name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    attribute_name' <- textToCString attribute_name
    result <- atk_document_get_attribute_value _obj' attribute_name'
    result' <- cstringToText result
    touchManagedPtr _obj
    freeMem attribute_name'
    return result'

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

foreign import ccall "atk_document_get_attributes" atk_document_get_attributes :: 
    Ptr Document ->                         -- _obj : TInterface "Atk" "Document"
    IO (Ptr (GSList (Ptr ())))


documentGetAttributes ::
    (MonadIO m, DocumentK a) =>
    a ->                                    -- _obj
    m [Ptr ()]
documentGetAttributes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_document_get_attributes _obj'
    result' <- unpackGSList result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_document_get_current_page_number" atk_document_get_current_page_number :: 
    Ptr Document ->                         -- _obj : TInterface "Atk" "Document"
    IO Int32


documentGetCurrentPageNumber ::
    (MonadIO m, DocumentK a) =>
    a ->                                    -- _obj
    m Int32
documentGetCurrentPageNumber _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_document_get_current_page_number _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_document_get_document" atk_document_get_document :: 
    Ptr Document ->                         -- _obj : TInterface "Atk" "Document"
    IO ()

{-# DEPRECATED documentGetDocument ["Since 2.12. @document is already a representation of","the document. Use it directly, or one of his children, as an","instance of the DOM."]#-}
documentGetDocument ::
    (MonadIO m, DocumentK a) =>
    a ->                                    -- _obj
    m ()
documentGetDocument _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_document_get_document _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "atk_document_get_document_type" atk_document_get_document_type :: 
    Ptr Document ->                         -- _obj : TInterface "Atk" "Document"
    IO CString

{-# DEPRECATED documentGetDocumentType ["Since 2.12. Please use atk_document_get_attributes() to","ask for the document type if it applies."]#-}
documentGetDocumentType ::
    (MonadIO m, DocumentK a) =>
    a ->                                    -- _obj
    m T.Text
documentGetDocumentType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_document_get_document_type _obj'
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_document_get_locale" atk_document_get_locale :: 
    Ptr Document ->                         -- _obj : TInterface "Atk" "Document"
    IO CString

{-# DEPRECATED documentGetLocale ["(Since version 2.7.90)","Please use atk_object_get_object_locale() instead."]#-}
documentGetLocale ::
    (MonadIO m, DocumentK a) =>
    a ->                                    -- _obj
    m T.Text
documentGetLocale _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_document_get_locale _obj'
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_document_get_page_count" atk_document_get_page_count :: 
    Ptr Document ->                         -- _obj : TInterface "Atk" "Document"
    IO Int32


documentGetPageCount ::
    (MonadIO m, DocumentK a) =>
    a ->                                    -- _obj
    m Int32
documentGetPageCount _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_document_get_page_count _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_document_set_attribute_value" atk_document_set_attribute_value :: 
    Ptr Document ->                         -- _obj : TInterface "Atk" "Document"
    CString ->                              -- attribute_name : TBasicType TUTF8
    CString ->                              -- attribute_value : TBasicType TUTF8
    IO CInt


documentSetAttributeValue ::
    (MonadIO m, DocumentK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- attribute_name
    T.Text ->                               -- attribute_value
    m Bool
documentSetAttributeValue _obj attribute_name attribute_value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    attribute_name' <- textToCString attribute_name
    attribute_value' <- textToCString attribute_value
    result <- atk_document_set_attribute_value _obj' attribute_name' attribute_value'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem attribute_name'
    freeMem attribute_value'
    return result'

-- signal Document::load-complete
type DocumentLoadCompleteCallback =
    IO ()

noDocumentLoadCompleteCallback :: Maybe DocumentLoadCompleteCallback
noDocumentLoadCompleteCallback = Nothing

type DocumentLoadCompleteCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkDocumentLoadCompleteCallback :: DocumentLoadCompleteCallbackC -> IO (FunPtr DocumentLoadCompleteCallbackC)

documentLoadCompleteClosure :: DocumentLoadCompleteCallback -> IO Closure
documentLoadCompleteClosure cb = newCClosure =<< mkDocumentLoadCompleteCallback wrapped
    where wrapped = documentLoadCompleteCallbackWrapper cb

documentLoadCompleteCallbackWrapper ::
    DocumentLoadCompleteCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
documentLoadCompleteCallbackWrapper _cb _ _ = do
    _cb 

onDocumentLoadComplete :: (GObject a, MonadIO m) => a -> DocumentLoadCompleteCallback -> m SignalHandlerId
onDocumentLoadComplete obj cb = liftIO $ connectDocumentLoadComplete obj cb SignalConnectBefore
afterDocumentLoadComplete :: (GObject a, MonadIO m) => a -> DocumentLoadCompleteCallback -> m SignalHandlerId
afterDocumentLoadComplete obj cb = connectDocumentLoadComplete obj cb SignalConnectAfter

connectDocumentLoadComplete :: (GObject a, MonadIO m) =>
                               a -> DocumentLoadCompleteCallback -> SignalConnectMode -> m SignalHandlerId
connectDocumentLoadComplete obj cb after = liftIO $ do
    cb' <- mkDocumentLoadCompleteCallback (documentLoadCompleteCallbackWrapper cb)
    connectSignalFunPtr obj "load-complete" cb' after

-- signal Document::load-stopped
type DocumentLoadStoppedCallback =
    IO ()

noDocumentLoadStoppedCallback :: Maybe DocumentLoadStoppedCallback
noDocumentLoadStoppedCallback = Nothing

type DocumentLoadStoppedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkDocumentLoadStoppedCallback :: DocumentLoadStoppedCallbackC -> IO (FunPtr DocumentLoadStoppedCallbackC)

documentLoadStoppedClosure :: DocumentLoadStoppedCallback -> IO Closure
documentLoadStoppedClosure cb = newCClosure =<< mkDocumentLoadStoppedCallback wrapped
    where wrapped = documentLoadStoppedCallbackWrapper cb

documentLoadStoppedCallbackWrapper ::
    DocumentLoadStoppedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
documentLoadStoppedCallbackWrapper _cb _ _ = do
    _cb 

onDocumentLoadStopped :: (GObject a, MonadIO m) => a -> DocumentLoadStoppedCallback -> m SignalHandlerId
onDocumentLoadStopped obj cb = liftIO $ connectDocumentLoadStopped obj cb SignalConnectBefore
afterDocumentLoadStopped :: (GObject a, MonadIO m) => a -> DocumentLoadStoppedCallback -> m SignalHandlerId
afterDocumentLoadStopped obj cb = connectDocumentLoadStopped obj cb SignalConnectAfter

connectDocumentLoadStopped :: (GObject a, MonadIO m) =>
                              a -> DocumentLoadStoppedCallback -> SignalConnectMode -> m SignalHandlerId
connectDocumentLoadStopped obj cb after = liftIO $ do
    cb' <- mkDocumentLoadStoppedCallback (documentLoadStoppedCallbackWrapper cb)
    connectSignalFunPtr obj "load-stopped" cb' after

-- signal Document::page-changed
type DocumentPageChangedCallback =
    Int32 ->
    IO ()

noDocumentPageChangedCallback :: Maybe DocumentPageChangedCallback
noDocumentPageChangedCallback = Nothing

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

foreign import ccall "wrapper"
    mkDocumentPageChangedCallback :: DocumentPageChangedCallbackC -> IO (FunPtr DocumentPageChangedCallbackC)

documentPageChangedClosure :: DocumentPageChangedCallback -> IO Closure
documentPageChangedClosure cb = newCClosure =<< mkDocumentPageChangedCallback wrapped
    where wrapped = documentPageChangedCallbackWrapper cb

documentPageChangedCallbackWrapper ::
    DocumentPageChangedCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO ()
documentPageChangedCallbackWrapper _cb _ page_number _ = do
    _cb  page_number

onDocumentPageChanged :: (GObject a, MonadIO m) => a -> DocumentPageChangedCallback -> m SignalHandlerId
onDocumentPageChanged obj cb = liftIO $ connectDocumentPageChanged obj cb SignalConnectBefore
afterDocumentPageChanged :: (GObject a, MonadIO m) => a -> DocumentPageChangedCallback -> m SignalHandlerId
afterDocumentPageChanged obj cb = connectDocumentPageChanged obj cb SignalConnectAfter

connectDocumentPageChanged :: (GObject a, MonadIO m) =>
                              a -> DocumentPageChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectDocumentPageChanged obj cb after = liftIO $ do
    cb' <- mkDocumentPageChangedCallback (documentPageChangedCallbackWrapper cb)
    connectSignalFunPtr obj "page-changed" cb' after

-- signal Document::reload
type DocumentReloadCallback =
    IO ()

noDocumentReloadCallback :: Maybe DocumentReloadCallback
noDocumentReloadCallback = Nothing

type DocumentReloadCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkDocumentReloadCallback :: DocumentReloadCallbackC -> IO (FunPtr DocumentReloadCallbackC)

documentReloadClosure :: DocumentReloadCallback -> IO Closure
documentReloadClosure cb = newCClosure =<< mkDocumentReloadCallback wrapped
    where wrapped = documentReloadCallbackWrapper cb

documentReloadCallbackWrapper ::
    DocumentReloadCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
documentReloadCallbackWrapper _cb _ _ = do
    _cb 

onDocumentReload :: (GObject a, MonadIO m) => a -> DocumentReloadCallback -> m SignalHandlerId
onDocumentReload obj cb = liftIO $ connectDocumentReload obj cb SignalConnectBefore
afterDocumentReload :: (GObject a, MonadIO m) => a -> DocumentReloadCallback -> m SignalHandlerId
afterDocumentReload obj cb = connectDocumentReload obj cb SignalConnectAfter

connectDocumentReload :: (GObject a, MonadIO m) =>
                         a -> DocumentReloadCallback -> SignalConnectMode -> m SignalHandlerId
connectDocumentReload obj cb after = liftIO $ do
    cb' <- mkDocumentReloadCallback (documentReloadCallbackWrapper cb)
    connectSignalFunPtr obj "reload" cb' after

-- interface EditableText 

newtype EditableText = EditableText (ForeignPtr EditableText)
noEditableText :: Maybe EditableText
noEditableText = Nothing

class ForeignPtrNewtype a => EditableTextK a
instance (ForeignPtrNewtype o, IsDescendantOf EditableText o) => EditableTextK o
type instance ParentTypes EditableText = '[]

-- method EditableText::copy_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", 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 "atk_editable_text_copy_text" atk_editable_text_copy_text :: 
    Ptr EditableText ->                     -- _obj : TInterface "Atk" "EditableText"
    Int32 ->                                -- start_pos : TBasicType TInt32
    Int32 ->                                -- end_pos : TBasicType TInt32
    IO ()


editableTextCopyText ::
    (MonadIO m, EditableTextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_pos
    Int32 ->                                -- end_pos
    m ()
editableTextCopyText _obj start_pos end_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_editable_text_copy_text _obj' start_pos end_pos
    touchManagedPtr _obj
    return ()

-- method EditableText::cut_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", 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 "atk_editable_text_cut_text" atk_editable_text_cut_text :: 
    Ptr EditableText ->                     -- _obj : TInterface "Atk" "EditableText"
    Int32 ->                                -- start_pos : TBasicType TInt32
    Int32 ->                                -- end_pos : TBasicType TInt32
    IO ()


editableTextCutText ::
    (MonadIO m, EditableTextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_pos
    Int32 ->                                -- end_pos
    m ()
editableTextCutText _obj start_pos end_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_editable_text_cut_text _obj' start_pos end_pos
    touchManagedPtr _obj
    return ()

-- method EditableText::delete_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_pos", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_pos", 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 "atk_editable_text_delete_text" atk_editable_text_delete_text :: 
    Ptr EditableText ->                     -- _obj : TInterface "Atk" "EditableText"
    Int32 ->                                -- start_pos : TBasicType TInt32
    Int32 ->                                -- end_pos : TBasicType TInt32
    IO ()


editableTextDeleteText ::
    (MonadIO m, EditableTextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_pos
    Int32 ->                                -- end_pos
    m ()
editableTextDeleteText _obj start_pos end_pos = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_editable_text_delete_text _obj' start_pos end_pos
    touchManagedPtr _obj
    return ()

-- method EditableText::insert_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", 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 "atk_editable_text_insert_text" atk_editable_text_insert_text :: 
    Ptr EditableText ->                     -- _obj : TInterface "Atk" "EditableText"
    CString ->                              -- string : TBasicType TUTF8
    Int32 ->                                -- length : TBasicType TInt32
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


editableTextInsertText ::
    (MonadIO m, EditableTextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- string
    Int32 ->                                -- length
    Int32 ->                                -- position
    m ()
editableTextInsertText _obj string length_ position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    string' <- textToCString string
    atk_editable_text_insert_text _obj' string' length_ position
    touchManagedPtr _obj
    freeMem string'
    return ()

-- method EditableText::paste_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", 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 "atk_editable_text_paste_text" atk_editable_text_paste_text :: 
    Ptr EditableText ->                     -- _obj : TInterface "Atk" "EditableText"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


editableTextPasteText ::
    (MonadIO m, EditableTextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- position
    m ()
editableTextPasteText _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_editable_text_paste_text _obj' position
    touchManagedPtr _obj
    return ()

-- method EditableText::set_run_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attrib_set", argType = TGSList (TBasicType TVoid), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "EditableText", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "attrib_set", argType = TGSList (TBasicType TVoid), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "atk_editable_text_set_run_attributes" atk_editable_text_set_run_attributes :: 
    Ptr EditableText ->                     -- _obj : TInterface "Atk" "EditableText"
    Ptr (GSList (Ptr ())) ->                -- attrib_set : TGSList (TBasicType TVoid)
    Int32 ->                                -- start_offset : TBasicType TInt32
    Int32 ->                                -- end_offset : TBasicType TInt32
    IO CInt


editableTextSetRunAttributes ::
    (MonadIO m, EditableTextK a) =>
    a ->                                    -- _obj
    [Ptr ()] ->                             -- attrib_set
    Int32 ->                                -- start_offset
    Int32 ->                                -- end_offset
    m Bool
editableTextSetRunAttributes _obj attrib_set start_offset end_offset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    attrib_set' <- packGSList attrib_set
    result <- atk_editable_text_set_run_attributes _obj' attrib_set' start_offset end_offset
    let result' = (/= 0) result
    touchManagedPtr _obj
    g_slist_free attrib_set'
    return result'

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

foreign import ccall "atk_editable_text_set_text_contents" atk_editable_text_set_text_contents :: 
    Ptr EditableText ->                     -- _obj : TInterface "Atk" "EditableText"
    CString ->                              -- string : TBasicType TUTF8
    IO ()


editableTextSetTextContents ::
    (MonadIO m, EditableTextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- string
    m ()
editableTextSetTextContents _obj string = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    string' <- textToCString string
    atk_editable_text_set_text_contents _obj' string'
    touchManagedPtr _obj
    freeMem string'
    return ()

-- callback EventListener
eventListenerClosure :: EventListener -> IO Closure
eventListenerClosure cb = newCClosure =<< mkEventListener wrapped
    where wrapped = eventListenerWrapper Nothing cb

type EventListenerC =
    Ptr Object ->
    IO ()

foreign import ccall "wrapper"
    mkEventListener :: EventListenerC -> IO (FunPtr EventListenerC)

type EventListener =
    Object ->
    IO ()

noEventListener :: Maybe EventListener
noEventListener = Nothing

eventListenerWrapper ::
    Maybe (Ptr (FunPtr (EventListenerC))) ->
    EventListener ->
    Ptr Object ->
    IO ()
eventListenerWrapper funptrptr _cb obj = do
    obj' <- (newObject Object) obj
    _cb  obj'
    maybeReleaseFunPtr funptrptr

-- callback EventListenerInit
eventListenerInitClosure :: EventListenerInit -> IO Closure
eventListenerInitClosure cb = newCClosure =<< mkEventListenerInit wrapped
    where wrapped = eventListenerInitWrapper Nothing cb

type EventListenerInitC =
    IO ()

foreign import ccall "wrapper"
    mkEventListenerInit :: EventListenerInitC -> IO (FunPtr EventListenerInitC)

type EventListenerInit =
    IO ()

noEventListenerInit :: Maybe EventListenerInit
noEventListenerInit = Nothing

eventListenerInitWrapper ::
    Maybe (Ptr (FunPtr (EventListenerInitC))) ->
    EventListenerInit ->
    IO ()
eventListenerInitWrapper funptrptr _cb = do
    _cb 
    maybeReleaseFunPtr funptrptr

-- callback FocusHandler
focusHandlerClosure :: FocusHandler -> IO Closure
focusHandlerClosure cb = newCClosure =<< mkFocusHandler wrapped
    where wrapped = focusHandlerWrapper Nothing cb

type FocusHandlerC =
    Ptr Object ->
    CInt ->
    IO ()

foreign import ccall "wrapper"
    mkFocusHandler :: FocusHandlerC -> IO (FunPtr FocusHandlerC)

type FocusHandler =
    Object ->
    Bool ->
    IO ()

noFocusHandler :: Maybe FocusHandler
noFocusHandler = Nothing

focusHandlerWrapper ::
    Maybe (Ptr (FunPtr (FocusHandlerC))) ->
    FocusHandler ->
    Ptr Object ->
    CInt ->
    IO ()
focusHandlerWrapper funptrptr _cb object focus_in = do
    object' <- (newObject Object) object
    let focus_in' = (/= 0) focus_in
    _cb  object' focus_in'
    maybeReleaseFunPtr funptrptr

-- callback Function
functionClosure :: Function -> IO Closure
functionClosure cb = newCClosure =<< mkFunction wrapped
    where wrapped = functionWrapper Nothing cb

type FunctionC =
    Ptr () ->
    IO CInt

foreign import ccall "wrapper"
    mkFunction :: FunctionC -> IO (FunPtr FunctionC)

type Function =
    IO Bool

noFunction :: Maybe Function
noFunction = Nothing

functionWrapper ::
    Maybe (Ptr (FunPtr (FunctionC))) ->
    Function ->
    Ptr () ->
    IO CInt
functionWrapper funptrptr _cb _ = do
    result <- _cb 
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'

-- object GObjectAccessible 
newtype GObjectAccessible = GObjectAccessible (ForeignPtr GObjectAccessible)
noGObjectAccessible :: Maybe GObjectAccessible
noGObjectAccessible = Nothing

foreign import ccall "atk_gobject_accessible_get_type"
    c_atk_gobject_accessible_get_type :: IO GType

type instance ParentTypes GObjectAccessible = '[Object, GObject.Object]

instance GObject GObjectAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_gobject_accessible_get_type
    

class GObject o => GObjectAccessibleK o
instance (GObject o, IsDescendantOf GObjectAccessible o) => GObjectAccessibleK o

toGObjectAccessible :: GObjectAccessibleK o => o -> IO GObjectAccessible
toGObjectAccessible = unsafeCastTo GObjectAccessible

-- method GObjectAccessible::get_object
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "GObjectAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "GObjectAccessible", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GObject" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_gobject_accessible_get_object" atk_gobject_accessible_get_object :: 
    Ptr GObjectAccessible ->                -- _obj : TInterface "Atk" "GObjectAccessible"
    IO (Ptr GObject.Object)


gObjectAccessibleGetObject ::
    (MonadIO m, GObjectAccessibleK a) =>
    a ->                                    -- _obj
    m GObject.Object
gObjectAccessibleGetObject _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_gobject_accessible_get_object _obj'
    result' <- (newObject GObject.Object) result
    touchManagedPtr _obj
    return result'

-- method GObjectAccessible::for_object
-- method type : MemberFunction
-- Args : [Arg {argName = "obj", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "obj", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_gobject_accessible_for_object" atk_gobject_accessible_for_object :: 
    Ptr GObject.Object ->                   -- obj : TInterface "GObject" "Object"
    IO (Ptr Object)


gObjectAccessibleForObject ::
    (MonadIO m, GObject.ObjectK a) =>
    a ->                                    -- obj
    m Object
gObjectAccessibleForObject obj = liftIO $ do
    let obj' = unsafeManagedPtrCastPtr obj
    result <- atk_gobject_accessible_for_object obj'
    result' <- (newObject Object) result
    touchManagedPtr obj
    return result'

-- object Hyperlink 
newtype Hyperlink = Hyperlink (ForeignPtr Hyperlink)
noHyperlink :: Maybe Hyperlink
noHyperlink = Nothing

foreign import ccall "atk_hyperlink_get_type"
    c_atk_hyperlink_get_type :: IO GType

type instance ParentTypes Hyperlink = '[GObject.Object, Action]

instance GObject Hyperlink where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_hyperlink_get_type
    

class GObject o => HyperlinkK o
instance (GObject o, IsDescendantOf Hyperlink o) => HyperlinkK o

toHyperlink :: HyperlinkK o => o -> IO Hyperlink
toHyperlink = unsafeCastTo Hyperlink

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

foreign import ccall "atk_hyperlink_get_end_index" atk_hyperlink_get_end_index :: 
    Ptr Hyperlink ->                        -- _obj : TInterface "Atk" "Hyperlink"
    IO Int32


hyperlinkGetEndIndex ::
    (MonadIO m, HyperlinkK a) =>
    a ->                                    -- _obj
    m Int32
hyperlinkGetEndIndex _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_hyperlink_get_end_index _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_hyperlink_get_n_anchors" atk_hyperlink_get_n_anchors :: 
    Ptr Hyperlink ->                        -- _obj : TInterface "Atk" "Hyperlink"
    IO Int32


hyperlinkGetNAnchors ::
    (MonadIO m, HyperlinkK a) =>
    a ->                                    -- _obj
    m Int32
hyperlinkGetNAnchors _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_hyperlink_get_n_anchors _obj'
    touchManagedPtr _obj
    return result

-- method Hyperlink::get_object
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Hyperlink", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Hyperlink", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_hyperlink_get_object" atk_hyperlink_get_object :: 
    Ptr Hyperlink ->                        -- _obj : TInterface "Atk" "Hyperlink"
    Int32 ->                                -- i : TBasicType TInt32
    IO (Ptr Object)


hyperlinkGetObject ::
    (MonadIO m, HyperlinkK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m Object
hyperlinkGetObject _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_hyperlink_get_object _obj' i
    result' <- (newObject Object) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_hyperlink_get_start_index" atk_hyperlink_get_start_index :: 
    Ptr Hyperlink ->                        -- _obj : TInterface "Atk" "Hyperlink"
    IO Int32


hyperlinkGetStartIndex ::
    (MonadIO m, HyperlinkK a) =>
    a ->                                    -- _obj
    m Int32
hyperlinkGetStartIndex _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_hyperlink_get_start_index _obj'
    touchManagedPtr _obj
    return result

-- method Hyperlink::get_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Hyperlink", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Hyperlink", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_hyperlink_get_uri" atk_hyperlink_get_uri :: 
    Ptr Hyperlink ->                        -- _obj : TInterface "Atk" "Hyperlink"
    Int32 ->                                -- i : TBasicType TInt32
    IO CString


hyperlinkGetUri ::
    (MonadIO m, HyperlinkK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m T.Text
hyperlinkGetUri _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_hyperlink_get_uri _obj' i
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_hyperlink_is_inline" atk_hyperlink_is_inline :: 
    Ptr Hyperlink ->                        -- _obj : TInterface "Atk" "Hyperlink"
    IO CInt


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

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

foreign import ccall "atk_hyperlink_is_selected_link" atk_hyperlink_is_selected_link :: 
    Ptr Hyperlink ->                        -- _obj : TInterface "Atk" "Hyperlink"
    IO CInt

{-# DEPRECATED hyperlinkIsSelectedLink ["(Since version 1.8)","Please use ATK_STATE_FOCUSABLE for all links,","and ATK_STATE_FOCUSED for focused links."]#-}
hyperlinkIsSelectedLink ::
    (MonadIO m, HyperlinkK a) =>
    a ->                                    -- _obj
    m Bool
hyperlinkIsSelectedLink _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_hyperlink_is_selected_link _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_hyperlink_is_valid" atk_hyperlink_is_valid :: 
    Ptr Hyperlink ->                        -- _obj : TInterface "Atk" "Hyperlink"
    IO CInt


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

-- signal Hyperlink::link-activated
type HyperlinkLinkActivatedCallback =
    IO ()

noHyperlinkLinkActivatedCallback :: Maybe HyperlinkLinkActivatedCallback
noHyperlinkLinkActivatedCallback = Nothing

type HyperlinkLinkActivatedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkHyperlinkLinkActivatedCallback :: HyperlinkLinkActivatedCallbackC -> IO (FunPtr HyperlinkLinkActivatedCallbackC)

hyperlinkLinkActivatedClosure :: HyperlinkLinkActivatedCallback -> IO Closure
hyperlinkLinkActivatedClosure cb = newCClosure =<< mkHyperlinkLinkActivatedCallback wrapped
    where wrapped = hyperlinkLinkActivatedCallbackWrapper cb

hyperlinkLinkActivatedCallbackWrapper ::
    HyperlinkLinkActivatedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
hyperlinkLinkActivatedCallbackWrapper _cb _ _ = do
    _cb 

onHyperlinkLinkActivated :: (GObject a, MonadIO m) => a -> HyperlinkLinkActivatedCallback -> m SignalHandlerId
onHyperlinkLinkActivated obj cb = liftIO $ connectHyperlinkLinkActivated obj cb SignalConnectBefore
afterHyperlinkLinkActivated :: (GObject a, MonadIO m) => a -> HyperlinkLinkActivatedCallback -> m SignalHandlerId
afterHyperlinkLinkActivated obj cb = connectHyperlinkLinkActivated obj cb SignalConnectAfter

connectHyperlinkLinkActivated :: (GObject a, MonadIO m) =>
                                 a -> HyperlinkLinkActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectHyperlinkLinkActivated obj cb after = liftIO $ do
    cb' <- mkHyperlinkLinkActivatedCallback (hyperlinkLinkActivatedCallbackWrapper cb)
    connectSignalFunPtr obj "link-activated" cb' after

-- interface HyperlinkImpl 

newtype HyperlinkImpl = HyperlinkImpl (ForeignPtr HyperlinkImpl)
noHyperlinkImpl :: Maybe HyperlinkImpl
noHyperlinkImpl = Nothing

class ForeignPtrNewtype a => HyperlinkImplK a
instance (ForeignPtrNewtype o, IsDescendantOf HyperlinkImpl o) => HyperlinkImplK o
type instance ParentTypes HyperlinkImpl = '[]

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

foreign import ccall "atk_hyperlink_impl_get_hyperlink" atk_hyperlink_impl_get_hyperlink :: 
    Ptr HyperlinkImpl ->                    -- _obj : TInterface "Atk" "HyperlinkImpl"
    IO (Ptr Hyperlink)


hyperlinkImplGetHyperlink ::
    (MonadIO m, HyperlinkImplK a) =>
    a ->                                    -- _obj
    m Hyperlink
hyperlinkImplGetHyperlink _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_hyperlink_impl_get_hyperlink _obj'
    result' <- (wrapObject Hyperlink) result
    touchManagedPtr _obj
    return result'

-- Flags HyperlinkStateFlags

data HyperlinkStateFlags = 
      HyperlinkStateFlagsInline
    | AnotherHyperlinkStateFlags Int
    deriving (Show, Eq)

instance Enum HyperlinkStateFlags where
    fromEnum HyperlinkStateFlagsInline = 1
    fromEnum (AnotherHyperlinkStateFlags k) = k

    toEnum 1 = HyperlinkStateFlagsInline
    toEnum k = AnotherHyperlinkStateFlags k

foreign import ccall "atk_hyperlink_state_flags_get_type" c_atk_hyperlink_state_flags_get_type :: 
    IO GType

instance BoxedEnum HyperlinkStateFlags where
    boxedEnumType _ = c_atk_hyperlink_state_flags_get_type

instance IsGFlag HyperlinkStateFlags

-- interface Hypertext 

newtype Hypertext = Hypertext (ForeignPtr Hypertext)
noHypertext :: Maybe Hypertext
noHypertext = Nothing

class ForeignPtrNewtype a => HypertextK a
instance (ForeignPtrNewtype o, IsDescendantOf Hypertext o) => HypertextK o
type instance ParentTypes Hypertext = '[]

-- method Hypertext::get_link
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Hypertext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "link_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Hypertext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "link_index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Hyperlink"
-- throws : False
-- Skip return : False

foreign import ccall "atk_hypertext_get_link" atk_hypertext_get_link :: 
    Ptr Hypertext ->                        -- _obj : TInterface "Atk" "Hypertext"
    Int32 ->                                -- link_index : TBasicType TInt32
    IO (Ptr Hyperlink)


hypertextGetLink ::
    (MonadIO m, HypertextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- link_index
    m Hyperlink
hypertextGetLink _obj link_index = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_hypertext_get_link _obj' link_index
    result' <- (newObject Hyperlink) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_hypertext_get_link_index" atk_hypertext_get_link_index :: 
    Ptr Hypertext ->                        -- _obj : TInterface "Atk" "Hypertext"
    Int32 ->                                -- char_index : TBasicType TInt32
    IO Int32


hypertextGetLinkIndex ::
    (MonadIO m, HypertextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- char_index
    m Int32
hypertextGetLinkIndex _obj char_index = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_hypertext_get_link_index _obj' char_index
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_hypertext_get_n_links" atk_hypertext_get_n_links :: 
    Ptr Hypertext ->                        -- _obj : TInterface "Atk" "Hypertext"
    IO Int32


hypertextGetNLinks ::
    (MonadIO m, HypertextK a) =>
    a ->                                    -- _obj
    m Int32
hypertextGetNLinks _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_hypertext_get_n_links _obj'
    touchManagedPtr _obj
    return result

-- signal Hypertext::link-selected
type HypertextLinkSelectedCallback =
    Int32 ->
    IO ()

noHypertextLinkSelectedCallback :: Maybe HypertextLinkSelectedCallback
noHypertextLinkSelectedCallback = Nothing

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

foreign import ccall "wrapper"
    mkHypertextLinkSelectedCallback :: HypertextLinkSelectedCallbackC -> IO (FunPtr HypertextLinkSelectedCallbackC)

hypertextLinkSelectedClosure :: HypertextLinkSelectedCallback -> IO Closure
hypertextLinkSelectedClosure cb = newCClosure =<< mkHypertextLinkSelectedCallback wrapped
    where wrapped = hypertextLinkSelectedCallbackWrapper cb

hypertextLinkSelectedCallbackWrapper ::
    HypertextLinkSelectedCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO ()
hypertextLinkSelectedCallbackWrapper _cb _ arg1 _ = do
    _cb  arg1

onHypertextLinkSelected :: (GObject a, MonadIO m) => a -> HypertextLinkSelectedCallback -> m SignalHandlerId
onHypertextLinkSelected obj cb = liftIO $ connectHypertextLinkSelected obj cb SignalConnectBefore
afterHypertextLinkSelected :: (GObject a, MonadIO m) => a -> HypertextLinkSelectedCallback -> m SignalHandlerId
afterHypertextLinkSelected obj cb = connectHypertextLinkSelected obj cb SignalConnectAfter

connectHypertextLinkSelected :: (GObject a, MonadIO m) =>
                                a -> HypertextLinkSelectedCallback -> SignalConnectMode -> m SignalHandlerId
connectHypertextLinkSelected obj cb after = liftIO $ do
    cb' <- mkHypertextLinkSelectedCallback (hypertextLinkSelectedCallbackWrapper cb)
    connectSignalFunPtr obj "link-selected" cb' after

-- interface Image 

newtype Image = Image (ForeignPtr Image)
noImage :: Maybe Image
noImage = Nothing

class ForeignPtrNewtype a => ImageK a
instance (ForeignPtrNewtype o, IsDescendantOf Image o) => ImageK o
type instance ParentTypes Image = '[]

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

foreign import ccall "atk_image_get_image_description" atk_image_get_image_description :: 
    Ptr Image ->                            -- _obj : TInterface "Atk" "Image"
    IO CString


imageGetImageDescription ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m T.Text
imageGetImageDescription _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_image_get_image_description _obj'
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_image_get_image_locale" atk_image_get_image_locale :: 
    Ptr Image ->                            -- _obj : TInterface "Atk" "Image"
    IO CString


imageGetImageLocale ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    m T.Text
imageGetImageLocale _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_image_get_image_locale _obj'
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Image::get_image_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_image_get_image_position" atk_image_get_image_position :: 
    Ptr Image ->                            -- _obj : TInterface "Atk" "Image"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    CUInt ->                                -- coord_type : TInterface "Atk" "CoordType"
    IO ()


imageGetImagePosition ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    CoordType ->                            -- coord_type
    m ()
imageGetImagePosition _obj x y coord_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let coord_type' = (fromIntegral . fromEnum) coord_type
    atk_image_get_image_position _obj' x y coord_type'
    touchManagedPtr _obj
    return ()

-- method Image::get_image_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Image", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", 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 "atk_image_get_image_size" atk_image_get_image_size :: 
    Ptr Image ->                            -- _obj : TInterface "Atk" "Image"
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    IO ()


imageGetImageSize ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- width
    Int32 ->                                -- height
    m ()
imageGetImageSize _obj width height = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_image_get_image_size _obj' width height
    touchManagedPtr _obj
    return ()

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

foreign import ccall "atk_image_set_image_description" atk_image_set_image_description :: 
    Ptr Image ->                            -- _obj : TInterface "Atk" "Image"
    CString ->                              -- description : TBasicType TUTF8
    IO CInt


imageSetImageDescription ::
    (MonadIO m, ImageK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- description
    m Bool
imageSetImageDescription _obj description = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    description' <- textToCString description
    result <- atk_image_set_image_description _obj' description'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem description'
    return result'

-- struct Implementor
newtype Implementor = Implementor (ForeignPtr Implementor)
noImplementor :: Maybe Implementor
noImplementor = Nothing

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

foreign import ccall "atk_implementor_ref_accessible" atk_implementor_ref_accessible :: 
    Ptr Implementor ->                      -- _obj : TInterface "Atk" "Implementor"
    IO (Ptr Object)


implementorRefAccessible ::
    (MonadIO m) =>
    Implementor ->                          -- _obj
    m Object
implementorRefAccessible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- atk_implementor_ref_accessible _obj'
    result' <- (wrapObject Object) result
    touchManagedPtr _obj
    return result'

-- interface ImplementorIface 

newtype ImplementorIface = ImplementorIface (ForeignPtr ImplementorIface)
noImplementorIface :: Maybe ImplementorIface
noImplementorIface = Nothing

class ForeignPtrNewtype a => ImplementorIfaceK a
instance (ForeignPtrNewtype o, IsDescendantOf ImplementorIface o) => ImplementorIfaceK o
type instance ParentTypes ImplementorIface = '[]

-- struct KeyEventStruct
newtype KeyEventStruct = KeyEventStruct (ForeignPtr KeyEventStruct)
noKeyEventStruct :: Maybe KeyEventStruct
noKeyEventStruct = Nothing

keyEventStructReadType :: KeyEventStruct -> IO Int32
keyEventStructReadType s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Int32
    return val

keyEventStructReadState :: KeyEventStruct -> IO Word32
keyEventStructReadState s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Word32
    return val

keyEventStructReadKeyval :: KeyEventStruct -> IO Word32
keyEventStructReadKeyval s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Word32
    return val

keyEventStructReadLength :: KeyEventStruct -> IO Int32
keyEventStructReadLength s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO Int32
    return val

keyEventStructReadString :: KeyEventStruct -> IO T.Text
keyEventStructReadString s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO CString
    val' <- cstringToText val
    return val'

keyEventStructReadKeycode :: KeyEventStruct -> IO Word16
keyEventStructReadKeycode s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO Word16
    return val

keyEventStructReadTimestamp :: KeyEventStruct -> IO Word32
keyEventStructReadTimestamp s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 28) :: IO Word32
    return val

-- Enum KeyEventType

data KeyEventType = 
      KeyEventTypePress
    | KeyEventTypeRelease
    | KeyEventTypeLastDefined
    | AnotherKeyEventType Int
    deriving (Show, Eq)

instance Enum KeyEventType where
    fromEnum KeyEventTypePress = 0
    fromEnum KeyEventTypeRelease = 1
    fromEnum KeyEventTypeLastDefined = 2
    fromEnum (AnotherKeyEventType k) = k

    toEnum 0 = KeyEventTypePress
    toEnum 1 = KeyEventTypeRelease
    toEnum 2 = KeyEventTypeLastDefined
    toEnum k = AnotherKeyEventType k

foreign import ccall "atk_key_event_type_get_type" c_atk_key_event_type_get_type :: 
    IO GType

instance BoxedEnum KeyEventType where
    boxedEnumType _ = c_atk_key_event_type_get_type

-- callback KeySnoopFunc
keySnoopFuncClosure :: KeySnoopFunc -> IO Closure
keySnoopFuncClosure cb = newCClosure =<< mkKeySnoopFunc wrapped
    where wrapped = keySnoopFuncWrapper Nothing cb

type KeySnoopFuncC =
    Ptr KeyEventStruct ->
    Ptr () ->
    IO Int32

foreign import ccall "wrapper"
    mkKeySnoopFunc :: KeySnoopFuncC -> IO (FunPtr KeySnoopFuncC)

type KeySnoopFunc =
    KeyEventStruct ->
    IO Int32

noKeySnoopFunc :: Maybe KeySnoopFunc
noKeySnoopFunc = Nothing

keySnoopFuncWrapper ::
    Maybe (Ptr (FunPtr (KeySnoopFuncC))) ->
    KeySnoopFunc ->
    Ptr KeyEventStruct ->
    Ptr () ->
    IO Int32
keySnoopFuncWrapper funptrptr _cb event _ = do
    event' <- (newPtr 32 KeyEventStruct) event
    result <- _cb  event'
    maybeReleaseFunPtr funptrptr
    return result

-- Enum Layer

data Layer = 
      LayerInvalid
    | LayerBackground
    | LayerCanvas
    | LayerWidget
    | LayerMdi
    | LayerPopup
    | LayerOverlay
    | LayerWindow
    | AnotherLayer Int
    deriving (Show, Eq)

instance Enum Layer where
    fromEnum LayerInvalid = 0
    fromEnum LayerBackground = 1
    fromEnum LayerCanvas = 2
    fromEnum LayerWidget = 3
    fromEnum LayerMdi = 4
    fromEnum LayerPopup = 5
    fromEnum LayerOverlay = 6
    fromEnum LayerWindow = 7
    fromEnum (AnotherLayer k) = k

    toEnum 0 = LayerInvalid
    toEnum 1 = LayerBackground
    toEnum 2 = LayerCanvas
    toEnum 3 = LayerWidget
    toEnum 4 = LayerMdi
    toEnum 5 = LayerPopup
    toEnum 6 = LayerOverlay
    toEnum 7 = LayerWindow
    toEnum k = AnotherLayer k

foreign import ccall "atk_layer_get_type" c_atk_layer_get_type :: 
    IO GType

instance BoxedEnum Layer where
    boxedEnumType _ = c_atk_layer_get_type

-- object Misc 
newtype Misc = Misc (ForeignPtr Misc)
noMisc :: Maybe Misc
noMisc = Nothing

foreign import ccall "atk_misc_get_type"
    c_atk_misc_get_type :: IO GType

type instance ParentTypes Misc = '[GObject.Object]

instance GObject Misc where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_misc_get_type
    

class GObject o => MiscK o
instance (GObject o, IsDescendantOf Misc o) => MiscK o

toMisc :: MiscK o => o -> IO Misc
toMisc = unsafeCastTo Misc

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

foreign import ccall "atk_misc_threads_enter" atk_misc_threads_enter :: 
    Ptr Misc ->                             -- _obj : TInterface "Atk" "Misc"
    IO ()

{-# DEPRECATED miscThreadsEnter ["Since 2.12."]#-}
miscThreadsEnter ::
    (MonadIO m, MiscK a) =>
    a ->                                    -- _obj
    m ()
miscThreadsEnter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_misc_threads_enter _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "atk_misc_threads_leave" atk_misc_threads_leave :: 
    Ptr Misc ->                             -- _obj : TInterface "Atk" "Misc"
    IO ()

{-# DEPRECATED miscThreadsLeave ["Since 2.12."]#-}
miscThreadsLeave ::
    (MonadIO m, MiscK a) =>
    a ->                                    -- _obj
    m ()
miscThreadsLeave _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_misc_threads_leave _obj'
    touchManagedPtr _obj
    return ()

-- method Misc::get_instance
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Atk" "Misc"
-- throws : False
-- Skip return : False

foreign import ccall "atk_misc_get_instance" atk_misc_get_instance :: 
    IO (Ptr Misc)

{-# DEPRECATED miscGetInstance ["Since 2.12."]#-}
miscGetInstance ::
    (MonadIO m) =>
    m Misc
miscGetInstance  = liftIO $ do
    result <- atk_misc_get_instance
    result' <- (newObject Misc) result
    return result'

-- object NoOpObject 
newtype NoOpObject = NoOpObject (ForeignPtr NoOpObject)
noNoOpObject :: Maybe NoOpObject
noNoOpObject = Nothing

foreign import ccall "atk_no_op_object_get_type"
    c_atk_no_op_object_get_type :: IO GType

type instance ParentTypes NoOpObject = '[Object, GObject.Object, Action, Component, Document, EditableText, Hypertext, Image, Selection, Table, TableCell, Text, Value, Window]

instance GObject NoOpObject where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_no_op_object_get_type
    

class GObject o => NoOpObjectK o
instance (GObject o, IsDescendantOf NoOpObject o) => NoOpObjectK o

toNoOpObject :: NoOpObjectK o => o -> IO NoOpObject
toNoOpObject = unsafeCastTo NoOpObject

-- method NoOpObject::new
-- method type : Constructor
-- Args : [Arg {argName = "obj", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "obj", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "NoOpObject"
-- throws : False
-- Skip return : False

foreign import ccall "atk_no_op_object_new" atk_no_op_object_new :: 
    Ptr GObject.Object ->                   -- obj : TInterface "GObject" "Object"
    IO (Ptr NoOpObject)


noOpObjectNew ::
    (MonadIO m, GObject.ObjectK a) =>
    a ->                                    -- obj
    m NoOpObject
noOpObjectNew obj = liftIO $ do
    let obj' = unsafeManagedPtrCastPtr obj
    result <- atk_no_op_object_new obj'
    result' <- (wrapObject NoOpObject) result
    touchManagedPtr obj
    return result'

-- object NoOpObjectFactory 
newtype NoOpObjectFactory = NoOpObjectFactory (ForeignPtr NoOpObjectFactory)
noNoOpObjectFactory :: Maybe NoOpObjectFactory
noNoOpObjectFactory = Nothing

foreign import ccall "atk_no_op_object_factory_get_type"
    c_atk_no_op_object_factory_get_type :: IO GType

type instance ParentTypes NoOpObjectFactory = '[ObjectFactory, GObject.Object]

instance GObject NoOpObjectFactory where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_no_op_object_factory_get_type
    

class GObject o => NoOpObjectFactoryK o
instance (GObject o, IsDescendantOf NoOpObjectFactory o) => NoOpObjectFactoryK o

toNoOpObjectFactory :: NoOpObjectFactoryK o => o -> IO NoOpObjectFactory
toNoOpObjectFactory = unsafeCastTo NoOpObjectFactory

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

foreign import ccall "atk_no_op_object_factory_new" atk_no_op_object_factory_new :: 
    IO (Ptr NoOpObjectFactory)


noOpObjectFactoryNew ::
    (MonadIO m) =>
    m NoOpObjectFactory
noOpObjectFactoryNew  = liftIO $ do
    result <- atk_no_op_object_factory_new
    result' <- (wrapObject NoOpObjectFactory) result
    return result'

-- object Object 
newtype Object = Object (ForeignPtr Object)
noObject :: Maybe Object
noObject = Nothing

foreign import ccall "atk_object_get_type"
    c_atk_object_get_type :: IO GType

type instance ParentTypes Object = '[GObject.Object]

instance GObject Object where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_object_get_type
    

class GObject o => ObjectK o
instance (GObject o, IsDescendantOf Object o) => ObjectK o

toObject :: ObjectK o => o -> IO Object
toObject = unsafeCastTo Object

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

foreign import ccall "atk_object_add_relationship" atk_object_add_relationship :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    CUInt ->                                -- relationship : TInterface "Atk" "RelationType"
    Ptr Object ->                           -- target : TInterface "Atk" "Object"
    IO CInt


objectAddRelationship ::
    (MonadIO m, ObjectK a, ObjectK b) =>
    a ->                                    -- _obj
    RelationType ->                         -- relationship
    b ->                                    -- target
    m Bool
objectAddRelationship _obj relationship target = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let relationship' = (fromIntegral . fromEnum) relationship
    let target' = unsafeManagedPtrCastPtr target
    result <- atk_object_add_relationship _obj' relationship' target'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr target
    return result'

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

foreign import ccall "atk_object_get_attributes" atk_object_get_attributes :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO (Ptr (GSList (Ptr ())))


objectGetAttributes ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m [Ptr ()]
objectGetAttributes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_get_attributes _obj'
    result' <- unpackGSList result
    g_slist_free result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_get_description" atk_object_get_description :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO CString


objectGetDescription ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m T.Text
objectGetDescription _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_get_description _obj'
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_get_index_in_parent" atk_object_get_index_in_parent :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO Int32


objectGetIndexInParent ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m Int32
objectGetIndexInParent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_get_index_in_parent _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_object_get_layer" atk_object_get_layer :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO CUInt

{-# DEPRECATED objectGetLayer ["Use atk_component_get_layer instead."]#-}
objectGetLayer ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m Layer
objectGetLayer _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_get_layer _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_get_mdi_zorder" atk_object_get_mdi_zorder :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO Int32

{-# DEPRECATED objectGetMdiZorder ["Use atk_component_get_mdi_zorder instead."]#-}
objectGetMdiZorder ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m Int32
objectGetMdiZorder _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_get_mdi_zorder _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_object_get_n_accessible_children" atk_object_get_n_accessible_children :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO Int32


objectGetNAccessibleChildren ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m Int32
objectGetNAccessibleChildren _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_get_n_accessible_children _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_object_get_name" atk_object_get_name :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO CString


objectGetName ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m T.Text
objectGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_get_name _obj'
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_get_object_locale" atk_object_get_object_locale :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO CString


objectGetObjectLocale ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m T.Text
objectGetObjectLocale _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_get_object_locale _obj'
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_get_parent" atk_object_get_parent :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO (Ptr Object)


objectGetParent ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m Object
objectGetParent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_get_parent _obj'
    result' <- (newObject Object) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_get_role" atk_object_get_role :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO CUInt


objectGetRole ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m Role
objectGetRole _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_get_role _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_initialize" atk_object_initialize :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    Ptr () ->                               -- data : TBasicType TVoid
    IO ()


objectInitialize ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    Ptr () ->                               -- data
    m ()
objectInitialize _obj data_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_object_initialize _obj' data_
    touchManagedPtr _obj
    return ()

-- method Object::notify_state_change
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "state", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", 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 "atk_object_notify_state_change" atk_object_notify_state_change :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    Word64 ->                               -- state : TBasicType TUInt64
    CInt ->                                 -- value : TBasicType TBoolean
    IO ()


objectNotifyStateChange ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    Word64 ->                               -- state
    Bool ->                                 -- value
    m ()
objectNotifyStateChange _obj state value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = (fromIntegral . fromEnum) value
    atk_object_notify_state_change _obj' state value'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "atk_object_peek_parent" atk_object_peek_parent :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO (Ptr Object)


objectPeekParent ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m Object
objectPeekParent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_peek_parent _obj'
    result' <- (newObject Object) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_ref_accessible_child" atk_object_ref_accessible_child :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    Int32 ->                                -- i : TBasicType TInt32
    IO (Ptr Object)


objectRefAccessibleChild ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m Object
objectRefAccessibleChild _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_ref_accessible_child _obj' i
    result' <- (wrapObject Object) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_ref_relation_set" atk_object_ref_relation_set :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO (Ptr RelationSet)


objectRefRelationSet ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m RelationSet
objectRefRelationSet _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_ref_relation_set _obj'
    result' <- (wrapObject RelationSet) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_ref_state_set" atk_object_ref_state_set :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    IO (Ptr StateSet)


objectRefStateSet ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    m StateSet
objectRefStateSet _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_ref_state_set _obj'
    result' <- (wrapObject StateSet) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_remove_property_change_handler" atk_object_remove_property_change_handler :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    Word32 ->                               -- handler_id : TBasicType TUInt32
    IO ()

{-# DEPRECATED objectRemovePropertyChangeHandler ["Since 2.12.","","Removes a property change handler."]#-}
objectRemovePropertyChangeHandler ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- handler_id
    m ()
objectRemovePropertyChangeHandler _obj handler_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_object_remove_property_change_handler _obj' handler_id
    touchManagedPtr _obj
    return ()

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

foreign import ccall "atk_object_remove_relationship" atk_object_remove_relationship :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    CUInt ->                                -- relationship : TInterface "Atk" "RelationType"
    Ptr Object ->                           -- target : TInterface "Atk" "Object"
    IO CInt


objectRemoveRelationship ::
    (MonadIO m, ObjectK a, ObjectK b) =>
    a ->                                    -- _obj
    RelationType ->                         -- relationship
    b ->                                    -- target
    m Bool
objectRemoveRelationship _obj relationship target = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let relationship' = (fromIntegral . fromEnum) relationship
    let target' = unsafeManagedPtrCastPtr target
    result <- atk_object_remove_relationship _obj' relationship' target'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr target
    return result'

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

foreign import ccall "atk_object_set_description" atk_object_set_description :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    CString ->                              -- description : TBasicType TUTF8
    IO ()


objectSetDescription ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- description
    m ()
objectSetDescription _obj description = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    description' <- textToCString description
    atk_object_set_description _obj' description'
    touchManagedPtr _obj
    freeMem description'
    return ()

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

foreign import ccall "atk_object_set_name" atk_object_set_name :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


objectSetName ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
objectSetName _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    atk_object_set_name _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

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

foreign import ccall "atk_object_set_parent" atk_object_set_parent :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    Ptr Object ->                           -- parent : TInterface "Atk" "Object"
    IO ()


objectSetParent ::
    (MonadIO m, ObjectK a, ObjectK b) =>
    a ->                                    -- _obj
    b ->                                    -- parent
    m ()
objectSetParent _obj parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let parent' = unsafeManagedPtrCastPtr parent
    atk_object_set_parent _obj' parent'
    touchManagedPtr _obj
    touchManagedPtr parent
    return ()

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

foreign import ccall "atk_object_set_role" atk_object_set_role :: 
    Ptr Object ->                           -- _obj : TInterface "Atk" "Object"
    CUInt ->                                -- role : TInterface "Atk" "Role"
    IO ()


objectSetRole ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- _obj
    Role ->                                 -- role
    m ()
objectSetRole _obj role = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let role' = (fromIntegral . fromEnum) role
    atk_object_set_role _obj' role'
    touchManagedPtr _obj
    return ()

-- signal Object::active-descendant-changed
type ObjectActiveDescendantChangedCallback =
    Ptr () ->
    IO ()

noObjectActiveDescendantChangedCallback :: Maybe ObjectActiveDescendantChangedCallback
noObjectActiveDescendantChangedCallback = Nothing

type ObjectActiveDescendantChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkObjectActiveDescendantChangedCallback :: ObjectActiveDescendantChangedCallbackC -> IO (FunPtr ObjectActiveDescendantChangedCallbackC)

objectActiveDescendantChangedClosure :: ObjectActiveDescendantChangedCallback -> IO Closure
objectActiveDescendantChangedClosure cb = newCClosure =<< mkObjectActiveDescendantChangedCallback wrapped
    where wrapped = objectActiveDescendantChangedCallbackWrapper cb

objectActiveDescendantChangedCallbackWrapper ::
    ObjectActiveDescendantChangedCallback ->
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO ()
objectActiveDescendantChangedCallbackWrapper _cb _ arg1 _ = do
    _cb  arg1

onObjectActiveDescendantChanged :: (GObject a, MonadIO m) => a -> ObjectActiveDescendantChangedCallback -> m SignalHandlerId
onObjectActiveDescendantChanged obj cb = liftIO $ connectObjectActiveDescendantChanged obj cb SignalConnectBefore
afterObjectActiveDescendantChanged :: (GObject a, MonadIO m) => a -> ObjectActiveDescendantChangedCallback -> m SignalHandlerId
afterObjectActiveDescendantChanged obj cb = connectObjectActiveDescendantChanged obj cb SignalConnectAfter

connectObjectActiveDescendantChanged :: (GObject a, MonadIO m) =>
                                        a -> ObjectActiveDescendantChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectObjectActiveDescendantChanged obj cb after = liftIO $ do
    cb' <- mkObjectActiveDescendantChangedCallback (objectActiveDescendantChangedCallbackWrapper cb)
    connectSignalFunPtr obj "active-descendant-changed" cb' after

-- signal Object::children-changed
type ObjectChildrenChangedCallback =
    Word32 ->
    Ptr () ->
    IO ()

noObjectChildrenChangedCallback :: Maybe ObjectChildrenChangedCallback
noObjectChildrenChangedCallback = Nothing

type ObjectChildrenChangedCallbackC =
    Ptr () ->                               -- object
    Word32 ->
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkObjectChildrenChangedCallback :: ObjectChildrenChangedCallbackC -> IO (FunPtr ObjectChildrenChangedCallbackC)

objectChildrenChangedClosure :: ObjectChildrenChangedCallback -> IO Closure
objectChildrenChangedClosure cb = newCClosure =<< mkObjectChildrenChangedCallback wrapped
    where wrapped = objectChildrenChangedCallbackWrapper cb

objectChildrenChangedCallbackWrapper ::
    ObjectChildrenChangedCallback ->
    Ptr () ->
    Word32 ->
    Ptr () ->
    Ptr () ->
    IO ()
objectChildrenChangedCallbackWrapper _cb _ arg1 arg2 _ = do
    _cb  arg1 arg2

onObjectChildrenChanged :: (GObject a, MonadIO m) => a -> ObjectChildrenChangedCallback -> m SignalHandlerId
onObjectChildrenChanged obj cb = liftIO $ connectObjectChildrenChanged obj cb SignalConnectBefore
afterObjectChildrenChanged :: (GObject a, MonadIO m) => a -> ObjectChildrenChangedCallback -> m SignalHandlerId
afterObjectChildrenChanged obj cb = connectObjectChildrenChanged obj cb SignalConnectAfter

connectObjectChildrenChanged :: (GObject a, MonadIO m) =>
                                a -> ObjectChildrenChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectObjectChildrenChanged obj cb after = liftIO $ do
    cb' <- mkObjectChildrenChangedCallback (objectChildrenChangedCallbackWrapper cb)
    connectSignalFunPtr obj "children-changed" cb' after

-- signal Object::focus-event
type ObjectFocusEventCallback =
    Bool ->
    IO ()

noObjectFocusEventCallback :: Maybe ObjectFocusEventCallback
noObjectFocusEventCallback = Nothing

type ObjectFocusEventCallbackC =
    Ptr () ->                               -- object
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkObjectFocusEventCallback :: ObjectFocusEventCallbackC -> IO (FunPtr ObjectFocusEventCallbackC)

objectFocusEventClosure :: ObjectFocusEventCallback -> IO Closure
objectFocusEventClosure cb = newCClosure =<< mkObjectFocusEventCallback wrapped
    where wrapped = objectFocusEventCallbackWrapper cb

objectFocusEventCallbackWrapper ::
    ObjectFocusEventCallback ->
    Ptr () ->
    CInt ->
    Ptr () ->
    IO ()
objectFocusEventCallbackWrapper _cb _ arg1 _ = do
    let arg1' = (/= 0) arg1
    _cb  arg1'

onObjectFocusEvent :: (GObject a, MonadIO m) => a -> ObjectFocusEventCallback -> m SignalHandlerId
onObjectFocusEvent obj cb = liftIO $ connectObjectFocusEvent obj cb SignalConnectBefore
afterObjectFocusEvent :: (GObject a, MonadIO m) => a -> ObjectFocusEventCallback -> m SignalHandlerId
afterObjectFocusEvent obj cb = connectObjectFocusEvent obj cb SignalConnectAfter

connectObjectFocusEvent :: (GObject a, MonadIO m) =>
                           a -> ObjectFocusEventCallback -> SignalConnectMode -> m SignalHandlerId
connectObjectFocusEvent obj cb after = liftIO $ do
    cb' <- mkObjectFocusEventCallback (objectFocusEventCallbackWrapper cb)
    connectSignalFunPtr obj "focus-event" cb' after

-- signal Object::property-change
type ObjectPropertyChangeCallback =
    Ptr () ->
    IO ()

noObjectPropertyChangeCallback :: Maybe ObjectPropertyChangeCallback
noObjectPropertyChangeCallback = Nothing

type ObjectPropertyChangeCallbackC =
    Ptr () ->                               -- object
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkObjectPropertyChangeCallback :: ObjectPropertyChangeCallbackC -> IO (FunPtr ObjectPropertyChangeCallbackC)

objectPropertyChangeClosure :: ObjectPropertyChangeCallback -> IO Closure
objectPropertyChangeClosure cb = newCClosure =<< mkObjectPropertyChangeCallback wrapped
    where wrapped = objectPropertyChangeCallbackWrapper cb

objectPropertyChangeCallbackWrapper ::
    ObjectPropertyChangeCallback ->
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO ()
objectPropertyChangeCallbackWrapper _cb _ arg1 _ = do
    _cb  arg1

onObjectPropertyChange :: (GObject a, MonadIO m) => a -> ObjectPropertyChangeCallback -> m SignalHandlerId
onObjectPropertyChange obj cb = liftIO $ connectObjectPropertyChange obj cb SignalConnectBefore
afterObjectPropertyChange :: (GObject a, MonadIO m) => a -> ObjectPropertyChangeCallback -> m SignalHandlerId
afterObjectPropertyChange obj cb = connectObjectPropertyChange obj cb SignalConnectAfter

connectObjectPropertyChange :: (GObject a, MonadIO m) =>
                               a -> ObjectPropertyChangeCallback -> SignalConnectMode -> m SignalHandlerId
connectObjectPropertyChange obj cb after = liftIO $ do
    cb' <- mkObjectPropertyChangeCallback (objectPropertyChangeCallbackWrapper cb)
    connectSignalFunPtr obj "property-change" cb' after

-- signal Object::state-change
type ObjectStateChangeCallback =
    T.Text ->
    Bool ->
    IO ()

noObjectStateChangeCallback :: Maybe ObjectStateChangeCallback
noObjectStateChangeCallback = Nothing

type ObjectStateChangeCallbackC =
    Ptr () ->                               -- object
    CString ->
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkObjectStateChangeCallback :: ObjectStateChangeCallbackC -> IO (FunPtr ObjectStateChangeCallbackC)

objectStateChangeClosure :: ObjectStateChangeCallback -> IO Closure
objectStateChangeClosure cb = newCClosure =<< mkObjectStateChangeCallback wrapped
    where wrapped = objectStateChangeCallbackWrapper cb

objectStateChangeCallbackWrapper ::
    ObjectStateChangeCallback ->
    Ptr () ->
    CString ->
    CInt ->
    Ptr () ->
    IO ()
objectStateChangeCallbackWrapper _cb _ arg1 arg2 _ = do
    arg1' <- cstringToText arg1
    let arg2' = (/= 0) arg2
    _cb  arg1' arg2'

onObjectStateChange :: (GObject a, MonadIO m) => a -> ObjectStateChangeCallback -> m SignalHandlerId
onObjectStateChange obj cb = liftIO $ connectObjectStateChange obj cb SignalConnectBefore
afterObjectStateChange :: (GObject a, MonadIO m) => a -> ObjectStateChangeCallback -> m SignalHandlerId
afterObjectStateChange obj cb = connectObjectStateChange obj cb SignalConnectAfter

connectObjectStateChange :: (GObject a, MonadIO m) =>
                            a -> ObjectStateChangeCallback -> SignalConnectMode -> m SignalHandlerId
connectObjectStateChange obj cb after = liftIO $ do
    cb' <- mkObjectStateChangeCallback (objectStateChangeCallbackWrapper cb)
    connectSignalFunPtr obj "state-change" cb' after

-- signal Object::visible-data-changed
type ObjectVisibleDataChangedCallback =
    IO ()

noObjectVisibleDataChangedCallback :: Maybe ObjectVisibleDataChangedCallback
noObjectVisibleDataChangedCallback = Nothing

type ObjectVisibleDataChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkObjectVisibleDataChangedCallback :: ObjectVisibleDataChangedCallbackC -> IO (FunPtr ObjectVisibleDataChangedCallbackC)

objectVisibleDataChangedClosure :: ObjectVisibleDataChangedCallback -> IO Closure
objectVisibleDataChangedClosure cb = newCClosure =<< mkObjectVisibleDataChangedCallback wrapped
    where wrapped = objectVisibleDataChangedCallbackWrapper cb

objectVisibleDataChangedCallbackWrapper ::
    ObjectVisibleDataChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
objectVisibleDataChangedCallbackWrapper _cb _ _ = do
    _cb 

onObjectVisibleDataChanged :: (GObject a, MonadIO m) => a -> ObjectVisibleDataChangedCallback -> m SignalHandlerId
onObjectVisibleDataChanged obj cb = liftIO $ connectObjectVisibleDataChanged obj cb SignalConnectBefore
afterObjectVisibleDataChanged :: (GObject a, MonadIO m) => a -> ObjectVisibleDataChangedCallback -> m SignalHandlerId
afterObjectVisibleDataChanged obj cb = connectObjectVisibleDataChanged obj cb SignalConnectAfter

connectObjectVisibleDataChanged :: (GObject a, MonadIO m) =>
                                   a -> ObjectVisibleDataChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectObjectVisibleDataChanged obj cb after = liftIO $ do
    cb' <- mkObjectVisibleDataChangedCallback (objectVisibleDataChangedCallbackWrapper cb)
    connectSignalFunPtr obj "visible-data-changed" cb' after

-- object ObjectFactory 
newtype ObjectFactory = ObjectFactory (ForeignPtr ObjectFactory)
noObjectFactory :: Maybe ObjectFactory
noObjectFactory = Nothing

foreign import ccall "atk_object_factory_get_type"
    c_atk_object_factory_get_type :: IO GType

type instance ParentTypes ObjectFactory = '[GObject.Object]

instance GObject ObjectFactory where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_object_factory_get_type
    

class GObject o => ObjectFactoryK o
instance (GObject o, IsDescendantOf ObjectFactory o) => ObjectFactoryK o

toObjectFactory :: ObjectFactoryK o => o -> IO ObjectFactory
toObjectFactory = unsafeCastTo ObjectFactory

-- method ObjectFactory::create_accessible
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "ObjectFactory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "obj", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "ObjectFactory", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "obj", argType = TInterface "GObject" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_object_factory_create_accessible" atk_object_factory_create_accessible :: 
    Ptr ObjectFactory ->                    -- _obj : TInterface "Atk" "ObjectFactory"
    Ptr GObject.Object ->                   -- obj : TInterface "GObject" "Object"
    IO (Ptr Object)


objectFactoryCreateAccessible ::
    (MonadIO m, ObjectFactoryK a, GObject.ObjectK b) =>
    a ->                                    -- _obj
    b ->                                    -- obj
    m Object
objectFactoryCreateAccessible _obj obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let obj' = unsafeManagedPtrCastPtr obj
    result <- atk_object_factory_create_accessible _obj' obj'
    result' <- (wrapObject Object) result
    touchManagedPtr _obj
    touchManagedPtr obj
    return result'

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

foreign import ccall "atk_object_factory_get_accessible_type" atk_object_factory_get_accessible_type :: 
    Ptr ObjectFactory ->                    -- _obj : TInterface "Atk" "ObjectFactory"
    IO CGType


objectFactoryGetAccessibleType ::
    (MonadIO m, ObjectFactoryK a) =>
    a ->                                    -- _obj
    m GType
objectFactoryGetAccessibleType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_object_factory_get_accessible_type _obj'
    let result' = GType result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_object_factory_invalidate" atk_object_factory_invalidate :: 
    Ptr ObjectFactory ->                    -- _obj : TInterface "Atk" "ObjectFactory"
    IO ()


objectFactoryInvalidate ::
    (MonadIO m, ObjectFactoryK a) =>
    a ->                                    -- _obj
    m ()
objectFactoryInvalidate _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_object_factory_invalidate _obj'
    touchManagedPtr _obj
    return ()

-- object Plug 
newtype Plug = Plug (ForeignPtr Plug)
noPlug :: Maybe Plug
noPlug = Nothing

foreign import ccall "atk_plug_get_type"
    c_atk_plug_get_type :: IO GType

type instance ParentTypes Plug = '[Object, GObject.Object, Component]

instance GObject Plug where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_plug_get_type
    

class GObject o => PlugK o
instance (GObject o, IsDescendantOf Plug o) => PlugK o

toPlug :: PlugK o => o -> IO Plug
toPlug = unsafeCastTo Plug

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

foreign import ccall "atk_plug_new" atk_plug_new :: 
    IO (Ptr Plug)


plugNew ::
    (MonadIO m) =>
    m Plug
plugNew  = liftIO $ do
    result <- atk_plug_new
    result' <- (wrapObject Plug) result
    return result'

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

foreign import ccall "atk_plug_get_id" atk_plug_get_id :: 
    Ptr Plug ->                             -- _obj : TInterface "Atk" "Plug"
    IO CString


plugGetId ::
    (MonadIO m, PlugK a) =>
    a ->                                    -- _obj
    m T.Text
plugGetId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_plug_get_id _obj'
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- callback PropertyChangeHandler
propertyChangeHandlerClosure :: PropertyChangeHandler -> IO Closure
propertyChangeHandlerClosure cb = newCClosure =<< mkPropertyChangeHandler wrapped
    where wrapped = propertyChangeHandlerWrapper Nothing cb

type PropertyChangeHandlerC =
    Ptr Object ->
    Ptr PropertyValues ->
    IO ()

foreign import ccall "wrapper"
    mkPropertyChangeHandler :: PropertyChangeHandlerC -> IO (FunPtr PropertyChangeHandlerC)

type PropertyChangeHandler =
    Object ->
    PropertyValues ->
    IO ()

noPropertyChangeHandler :: Maybe PropertyChangeHandler
noPropertyChangeHandler = Nothing

propertyChangeHandlerWrapper ::
    Maybe (Ptr (FunPtr (PropertyChangeHandlerC))) ->
    PropertyChangeHandler ->
    Ptr Object ->
    Ptr PropertyValues ->
    IO ()
propertyChangeHandlerWrapper funptrptr _cb obj vals = do
    obj' <- (newObject Object) obj
    vals' <- (newPtr 56 PropertyValues) vals
    _cb  obj' vals'
    maybeReleaseFunPtr funptrptr

-- struct PropertyValues
newtype PropertyValues = PropertyValues (ForeignPtr PropertyValues)
noPropertyValues :: Maybe PropertyValues
noPropertyValues = Nothing

propertyValuesReadPropertyName :: PropertyValues -> IO T.Text
propertyValuesReadPropertyName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

propertyValuesReadOldValue :: PropertyValues -> IO GValue
propertyValuesReadOldValue s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO (Ptr GValue)
    val' <- (newBoxed GValue) val
    return val'

propertyValuesReadNewValue :: PropertyValues -> IO GValue
propertyValuesReadNewValue s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO (Ptr GValue)
    val' <- (newBoxed GValue) val
    return val'

-- struct Range
newtype Range = Range (ForeignPtr Range)
noRange :: Maybe Range
noRange = Nothing

foreign import ccall "atk_range_get_type" c_atk_range_get_type :: 
    IO GType

instance BoxedObject Range where
    boxedType _ = c_atk_range_get_type

-- method Range::new
-- method type : Constructor
-- Args : [Arg {argName = "lower_limit", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upper_limit", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "lower_limit", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "upper_limit", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Range"
-- throws : False
-- Skip return : False

foreign import ccall "atk_range_new" atk_range_new :: 
    CDouble ->                              -- lower_limit : TBasicType TDouble
    CDouble ->                              -- upper_limit : TBasicType TDouble
    CString ->                              -- description : TBasicType TUTF8
    IO (Ptr Range)


rangeNew ::
    (MonadIO m) =>
    Double ->                               -- lower_limit
    Double ->                               -- upper_limit
    T.Text ->                               -- description
    m Range
rangeNew lower_limit upper_limit description = liftIO $ do
    let lower_limit' = realToFrac lower_limit
    let upper_limit' = realToFrac upper_limit
    description' <- textToCString description
    result <- atk_range_new lower_limit' upper_limit' description'
    result' <- (wrapBoxed Range) result
    freeMem description'
    return result'

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

foreign import ccall "atk_range_copy" atk_range_copy :: 
    Ptr Range ->                            -- _obj : TInterface "Atk" "Range"
    IO (Ptr Range)


rangeCopy ::
    (MonadIO m) =>
    Range ->                                -- _obj
    m Range
rangeCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- atk_range_copy _obj'
    result' <- (wrapBoxed Range) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_range_free" atk_range_free :: 
    Ptr Range ->                            -- _obj : TInterface "Atk" "Range"
    IO ()


rangeFree ::
    (MonadIO m) =>
    Range ->                                -- _obj
    m ()
rangeFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    atk_range_free _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "atk_range_get_description" atk_range_get_description :: 
    Ptr Range ->                            -- _obj : TInterface "Atk" "Range"
    IO CString


rangeGetDescription ::
    (MonadIO m) =>
    Range ->                                -- _obj
    m T.Text
rangeGetDescription _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- atk_range_get_description _obj'
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_range_get_lower_limit" atk_range_get_lower_limit :: 
    Ptr Range ->                            -- _obj : TInterface "Atk" "Range"
    IO CDouble


rangeGetLowerLimit ::
    (MonadIO m) =>
    Range ->                                -- _obj
    m Double
rangeGetLowerLimit _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- atk_range_get_lower_limit _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_range_get_upper_limit" atk_range_get_upper_limit :: 
    Ptr Range ->                            -- _obj : TInterface "Atk" "Range"
    IO CDouble


rangeGetUpperLimit ::
    (MonadIO m) =>
    Range ->                                -- _obj
    m Double
rangeGetUpperLimit _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- atk_range_get_upper_limit _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- struct Rectangle
newtype Rectangle = Rectangle (ForeignPtr Rectangle)
noRectangle :: Maybe Rectangle
noRectangle = Nothing

foreign import ccall "atk_rectangle_get_type" c_atk_rectangle_get_type :: 
    IO GType

instance BoxedObject Rectangle where
    boxedType _ = c_atk_rectangle_get_type

rectangleReadX :: Rectangle -> IO Int32
rectangleReadX s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Int32
    return val

rectangleReadY :: Rectangle -> IO Int32
rectangleReadY s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Int32
    return val

rectangleReadWidth :: Rectangle -> IO Int32
rectangleReadWidth s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Int32
    return val

rectangleReadHeight :: Rectangle -> IO Int32
rectangleReadHeight s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO Int32
    return val

-- object Registry 
newtype Registry = Registry (ForeignPtr Registry)
noRegistry :: Maybe Registry
noRegistry = Nothing

foreign import ccall "atk_registry_get_type"
    c_atk_registry_get_type :: IO GType

type instance ParentTypes Registry = '[GObject.Object]

instance GObject Registry where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_registry_get_type
    

class GObject o => RegistryK o
instance (GObject o, IsDescendantOf Registry o) => RegistryK o

toRegistry :: RegistryK o => o -> IO Registry
toRegistry = unsafeCastTo Registry

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

foreign import ccall "atk_registry_get_factory" atk_registry_get_factory :: 
    Ptr Registry ->                         -- _obj : TInterface "Atk" "Registry"
    CGType ->                               -- type : TBasicType TGType
    IO (Ptr ObjectFactory)


registryGetFactory ::
    (MonadIO m, RegistryK a) =>
    a ->                                    -- _obj
    GType ->                                -- type
    m ObjectFactory
registryGetFactory _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = gtypeToCGType type_
    result <- atk_registry_get_factory _obj' type_'
    result' <- (newObject ObjectFactory) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_registry_get_factory_type" atk_registry_get_factory_type :: 
    Ptr Registry ->                         -- _obj : TInterface "Atk" "Registry"
    CGType ->                               -- type : TBasicType TGType
    IO CGType


registryGetFactoryType ::
    (MonadIO m, RegistryK a) =>
    a ->                                    -- _obj
    GType ->                                -- type
    m GType
registryGetFactoryType _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = gtypeToCGType type_
    result <- atk_registry_get_factory_type _obj' type_'
    let result' = GType result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_registry_set_factory_type" atk_registry_set_factory_type :: 
    Ptr Registry ->                         -- _obj : TInterface "Atk" "Registry"
    CGType ->                               -- type : TBasicType TGType
    CGType ->                               -- factory_type : TBasicType TGType
    IO ()


registrySetFactoryType ::
    (MonadIO m, RegistryK a) =>
    a ->                                    -- _obj
    GType ->                                -- type
    GType ->                                -- factory_type
    m ()
registrySetFactoryType _obj type_ factory_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = gtypeToCGType type_
    let factory_type' = gtypeToCGType factory_type
    atk_registry_set_factory_type _obj' type_' factory_type'
    touchManagedPtr _obj
    return ()

-- object Relation 
newtype Relation = Relation (ForeignPtr Relation)
noRelation :: Maybe Relation
noRelation = Nothing

foreign import ccall "atk_relation_get_type"
    c_atk_relation_get_type :: IO GType

type instance ParentTypes Relation = '[GObject.Object]

instance GObject Relation where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_relation_get_type
    

class GObject o => RelationK o
instance (GObject o, IsDescendantOf Relation o) => RelationK o

toRelation :: RelationK o => o -> IO Relation
toRelation = unsafeCastTo Relation

-- method Relation::new
-- method type : Constructor
-- Args : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Atk" "Object"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relationship", argType = TInterface "Atk" "RelationType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_targets", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "targets", argType = TCArray False (-1) 1 (TInterface "Atk" "Object"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relationship", argType = TInterface "Atk" "RelationType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Relation"
-- throws : False
-- Skip return : False

foreign import ccall "atk_relation_new" atk_relation_new :: 
    Ptr (Ptr Object) ->                     -- targets : TCArray False (-1) 1 (TInterface "Atk" "Object")
    Int32 ->                                -- n_targets : TBasicType TInt32
    CUInt ->                                -- relationship : TInterface "Atk" "RelationType"
    IO (Ptr Relation)


relationNew ::
    (MonadIO m) =>
    [Object] ->                             -- targets
    RelationType ->                         -- relationship
    m Relation
relationNew targets relationship = liftIO $ do
    let n_targets = fromIntegral $ length targets
    let targets' = map unsafeManagedPtrCastPtr targets
    targets'' <- packPtrArray targets'
    let relationship' = (fromIntegral . fromEnum) relationship
    result <- atk_relation_new targets'' n_targets relationship'
    result' <- (wrapObject Relation) result
    mapM_ touchManagedPtr targets
    freeMem targets''
    return result'

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

foreign import ccall "atk_relation_add_target" atk_relation_add_target :: 
    Ptr Relation ->                         -- _obj : TInterface "Atk" "Relation"
    Ptr Object ->                           -- target : TInterface "Atk" "Object"
    IO ()


relationAddTarget ::
    (MonadIO m, RelationK a, ObjectK b) =>
    a ->                                    -- _obj
    b ->                                    -- target
    m ()
relationAddTarget _obj target = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let target' = unsafeManagedPtrCastPtr target
    atk_relation_add_target _obj' target'
    touchManagedPtr _obj
    touchManagedPtr target
    return ()

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

foreign import ccall "atk_relation_get_relation_type" atk_relation_get_relation_type :: 
    Ptr Relation ->                         -- _obj : TInterface "Atk" "Relation"
    IO CUInt


relationGetRelationType ::
    (MonadIO m, RelationK a) =>
    a ->                                    -- _obj
    m RelationType
relationGetRelationType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_relation_get_relation_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method Relation::get_target
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Relation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Relation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TPtrArray (TInterface "Atk" "Object")
-- throws : False
-- Skip return : False

foreign import ccall "atk_relation_get_target" atk_relation_get_target :: 
    Ptr Relation ->                         -- _obj : TInterface "Atk" "Relation"
    IO (Ptr (GPtrArray (Ptr Object)))


relationGetTarget ::
    (MonadIO m, RelationK a) =>
    a ->                                    -- _obj
    m [Object]
relationGetTarget _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_relation_get_target _obj'
    result' <- unpackGPtrArray result
    result'' <- mapM (newObject Object) result'
    touchManagedPtr _obj
    return result''

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

foreign import ccall "atk_relation_remove_target" atk_relation_remove_target :: 
    Ptr Relation ->                         -- _obj : TInterface "Atk" "Relation"
    Ptr Object ->                           -- target : TInterface "Atk" "Object"
    IO CInt


relationRemoveTarget ::
    (MonadIO m, RelationK a, ObjectK b) =>
    a ->                                    -- _obj
    b ->                                    -- target
    m Bool
relationRemoveTarget _obj target = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let target' = unsafeManagedPtrCastPtr target
    result <- atk_relation_remove_target _obj' target'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr target
    return result'

-- object RelationSet 
newtype RelationSet = RelationSet (ForeignPtr RelationSet)
noRelationSet :: Maybe RelationSet
noRelationSet = Nothing

foreign import ccall "atk_relation_set_get_type"
    c_atk_relation_set_get_type :: IO GType

type instance ParentTypes RelationSet = '[GObject.Object]

instance GObject RelationSet where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_relation_set_get_type
    

class GObject o => RelationSetK o
instance (GObject o, IsDescendantOf RelationSet o) => RelationSetK o

toRelationSet :: RelationSetK o => o -> IO RelationSet
toRelationSet = unsafeCastTo RelationSet

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

foreign import ccall "atk_relation_set_new" atk_relation_set_new :: 
    IO (Ptr RelationSet)


relationSetNew ::
    (MonadIO m) =>
    m RelationSet
relationSetNew  = liftIO $ do
    result <- atk_relation_set_new
    result' <- (wrapObject RelationSet) result
    return result'

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

foreign import ccall "atk_relation_set_add" atk_relation_set_add :: 
    Ptr RelationSet ->                      -- _obj : TInterface "Atk" "RelationSet"
    Ptr Relation ->                         -- relation : TInterface "Atk" "Relation"
    IO ()


relationSetAdd ::
    (MonadIO m, RelationSetK a, RelationK b) =>
    a ->                                    -- _obj
    b ->                                    -- relation
    m ()
relationSetAdd _obj relation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let relation' = unsafeManagedPtrCastPtr relation
    atk_relation_set_add _obj' relation'
    touchManagedPtr _obj
    touchManagedPtr relation
    return ()

-- method RelationSet::add_relation_by_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "RelationSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relationship", argType = TInterface "Atk" "RelationType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "RelationSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relationship", argType = TInterface "Atk" "RelationType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_relation_set_add_relation_by_type" atk_relation_set_add_relation_by_type :: 
    Ptr RelationSet ->                      -- _obj : TInterface "Atk" "RelationSet"
    CUInt ->                                -- relationship : TInterface "Atk" "RelationType"
    Ptr Object ->                           -- target : TInterface "Atk" "Object"
    IO ()


relationSetAddRelationByType ::
    (MonadIO m, RelationSetK a, ObjectK b) =>
    a ->                                    -- _obj
    RelationType ->                         -- relationship
    b ->                                    -- target
    m ()
relationSetAddRelationByType _obj relationship target = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let relationship' = (fromIntegral . fromEnum) relationship
    let target' = unsafeManagedPtrCastPtr target
    atk_relation_set_add_relation_by_type _obj' relationship' target'
    touchManagedPtr _obj
    touchManagedPtr target
    return ()

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

foreign import ccall "atk_relation_set_contains" atk_relation_set_contains :: 
    Ptr RelationSet ->                      -- _obj : TInterface "Atk" "RelationSet"
    CUInt ->                                -- relationship : TInterface "Atk" "RelationType"
    IO CInt


relationSetContains ::
    (MonadIO m, RelationSetK a) =>
    a ->                                    -- _obj
    RelationType ->                         -- relationship
    m Bool
relationSetContains _obj relationship = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let relationship' = (fromIntegral . fromEnum) relationship
    result <- atk_relation_set_contains _obj' relationship'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method RelationSet::contains_target
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "RelationSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relationship", argType = TInterface "Atk" "RelationType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "RelationSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relationship", argType = TInterface "Atk" "RelationType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "target", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "atk_relation_set_contains_target" atk_relation_set_contains_target :: 
    Ptr RelationSet ->                      -- _obj : TInterface "Atk" "RelationSet"
    CUInt ->                                -- relationship : TInterface "Atk" "RelationType"
    Ptr Object ->                           -- target : TInterface "Atk" "Object"
    IO CInt


relationSetContainsTarget ::
    (MonadIO m, RelationSetK a, ObjectK b) =>
    a ->                                    -- _obj
    RelationType ->                         -- relationship
    b ->                                    -- target
    m Bool
relationSetContainsTarget _obj relationship target = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let relationship' = (fromIntegral . fromEnum) relationship
    let target' = unsafeManagedPtrCastPtr target
    result <- atk_relation_set_contains_target _obj' relationship' target'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr target
    return result'

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

foreign import ccall "atk_relation_set_get_n_relations" atk_relation_set_get_n_relations :: 
    Ptr RelationSet ->                      -- _obj : TInterface "Atk" "RelationSet"
    IO Int32


relationSetGetNRelations ::
    (MonadIO m, RelationSetK a) =>
    a ->                                    -- _obj
    m Int32
relationSetGetNRelations _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_relation_set_get_n_relations _obj'
    touchManagedPtr _obj
    return result

-- method RelationSet::get_relation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "RelationSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "RelationSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Relation"
-- throws : False
-- Skip return : False

foreign import ccall "atk_relation_set_get_relation" atk_relation_set_get_relation :: 
    Ptr RelationSet ->                      -- _obj : TInterface "Atk" "RelationSet"
    Int32 ->                                -- i : TBasicType TInt32
    IO (Ptr Relation)


relationSetGetRelation ::
    (MonadIO m, RelationSetK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m Relation
relationSetGetRelation _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_relation_set_get_relation _obj' i
    result' <- (newObject Relation) result
    touchManagedPtr _obj
    return result'

-- method RelationSet::get_relation_by_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "RelationSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relationship", argType = TInterface "Atk" "RelationType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "RelationSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "relationship", argType = TInterface "Atk" "RelationType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Relation"
-- throws : False
-- Skip return : False

foreign import ccall "atk_relation_set_get_relation_by_type" atk_relation_set_get_relation_by_type :: 
    Ptr RelationSet ->                      -- _obj : TInterface "Atk" "RelationSet"
    CUInt ->                                -- relationship : TInterface "Atk" "RelationType"
    IO (Ptr Relation)


relationSetGetRelationByType ::
    (MonadIO m, RelationSetK a) =>
    a ->                                    -- _obj
    RelationType ->                         -- relationship
    m Relation
relationSetGetRelationByType _obj relationship = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let relationship' = (fromIntegral . fromEnum) relationship
    result <- atk_relation_set_get_relation_by_type _obj' relationship'
    result' <- (newObject Relation) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_relation_set_remove" atk_relation_set_remove :: 
    Ptr RelationSet ->                      -- _obj : TInterface "Atk" "RelationSet"
    Ptr Relation ->                         -- relation : TInterface "Atk" "Relation"
    IO ()


relationSetRemove ::
    (MonadIO m, RelationSetK a, RelationK b) =>
    a ->                                    -- _obj
    b ->                                    -- relation
    m ()
relationSetRemove _obj relation = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let relation' = unsafeManagedPtrCastPtr relation
    atk_relation_set_remove _obj' relation'
    touchManagedPtr _obj
    touchManagedPtr relation
    return ()

-- Enum RelationType

data RelationType = 
      RelationTypeNull
    | RelationTypeControlledBy
    | RelationTypeControllerFor
    | RelationTypeLabelFor
    | RelationTypeLabelledBy
    | RelationTypeMemberOf
    | RelationTypeNodeChildOf
    | RelationTypeFlowsTo
    | RelationTypeFlowsFrom
    | RelationTypeSubwindowOf
    | RelationTypeEmbeds
    | RelationTypeEmbeddedBy
    | RelationTypePopupFor
    | RelationTypeParentWindowOf
    | RelationTypeDescribedBy
    | RelationTypeDescriptionFor
    | RelationTypeNodeParentOf
    | RelationTypeLastDefined
    | AnotherRelationType Int
    deriving (Show, Eq)

instance Enum RelationType where
    fromEnum RelationTypeNull = 0
    fromEnum RelationTypeControlledBy = 1
    fromEnum RelationTypeControllerFor = 2
    fromEnum RelationTypeLabelFor = 3
    fromEnum RelationTypeLabelledBy = 4
    fromEnum RelationTypeMemberOf = 5
    fromEnum RelationTypeNodeChildOf = 6
    fromEnum RelationTypeFlowsTo = 7
    fromEnum RelationTypeFlowsFrom = 8
    fromEnum RelationTypeSubwindowOf = 9
    fromEnum RelationTypeEmbeds = 10
    fromEnum RelationTypeEmbeddedBy = 11
    fromEnum RelationTypePopupFor = 12
    fromEnum RelationTypeParentWindowOf = 13
    fromEnum RelationTypeDescribedBy = 14
    fromEnum RelationTypeDescriptionFor = 15
    fromEnum RelationTypeNodeParentOf = 16
    fromEnum RelationTypeLastDefined = 17
    fromEnum (AnotherRelationType k) = k

    toEnum 0 = RelationTypeNull
    toEnum 1 = RelationTypeControlledBy
    toEnum 2 = RelationTypeControllerFor
    toEnum 3 = RelationTypeLabelFor
    toEnum 4 = RelationTypeLabelledBy
    toEnum 5 = RelationTypeMemberOf
    toEnum 6 = RelationTypeNodeChildOf
    toEnum 7 = RelationTypeFlowsTo
    toEnum 8 = RelationTypeFlowsFrom
    toEnum 9 = RelationTypeSubwindowOf
    toEnum 10 = RelationTypeEmbeds
    toEnum 11 = RelationTypeEmbeddedBy
    toEnum 12 = RelationTypePopupFor
    toEnum 13 = RelationTypeParentWindowOf
    toEnum 14 = RelationTypeDescribedBy
    toEnum 15 = RelationTypeDescriptionFor
    toEnum 16 = RelationTypeNodeParentOf
    toEnum 17 = RelationTypeLastDefined
    toEnum k = AnotherRelationType k

foreign import ccall "atk_relation_type_get_type" c_atk_relation_type_get_type :: 
    IO GType

instance BoxedEnum RelationType where
    boxedEnumType _ = c_atk_relation_type_get_type

-- Enum Role

data Role = 
      RoleInvalid
    | RoleAcceleratorLabel
    | RoleAlert
    | RoleAnimation
    | RoleArrow
    | RoleCalendar
    | RoleCanvas
    | RoleCheckBox
    | RoleCheckMenuItem
    | RoleColorChooser
    | RoleColumnHeader
    | RoleComboBox
    | RoleDateEditor
    | RoleDesktopIcon
    | RoleDesktopFrame
    | RoleDial
    | RoleDialog
    | RoleDirectoryPane
    | RoleDrawingArea
    | RoleFileChooser
    | RoleFiller
    | RoleFontChooser
    | RoleFrame
    | RoleGlassPane
    | RoleHtmlContainer
    | RoleIcon
    | RoleImage
    | RoleInternalFrame
    | RoleLabel
    | RoleLayeredPane
    | RoleList
    | RoleListItem
    | RoleMenu
    | RoleMenuBar
    | RoleMenuItem
    | RoleOptionPane
    | RolePageTab
    | RolePageTabList
    | RolePanel
    | RolePasswordText
    | RolePopupMenu
    | RoleProgressBar
    | RolePushButton
    | RoleRadioButton
    | RoleRadioMenuItem
    | RoleRootPane
    | RoleRowHeader
    | RoleScrollBar
    | RoleScrollPane
    | RoleSeparator
    | RoleSlider
    | RoleSplitPane
    | RoleSpinButton
    | RoleStatusbar
    | RoleTable
    | RoleTableCell
    | RoleTableColumnHeader
    | RoleTableRowHeader
    | RoleTearOffMenuItem
    | RoleTerminal
    | RoleText
    | RoleToggleButton
    | RoleToolBar
    | RoleToolTip
    | RoleTree
    | RoleTreeTable
    | RoleUnknown
    | RoleViewport
    | RoleWindow
    | RoleHeader
    | RoleFooter
    | RoleParagraph
    | RoleRuler
    | RoleApplication
    | RoleAutocomplete
    | RoleEditBar
    | RoleEmbedded
    | RoleEntry
    | RoleChart
    | RoleCaption
    | RoleDocumentFrame
    | RoleHeading
    | RolePage
    | RoleSection
    | RoleRedundantObject
    | RoleForm
    | RoleLink
    | RoleInputMethodWindow
    | RoleTableRow
    | RoleTreeItem
    | RoleDocumentSpreadsheet
    | RoleDocumentPresentation
    | RoleDocumentText
    | RoleDocumentWeb
    | RoleDocumentEmail
    | RoleComment
    | RoleListBox
    | RoleGrouping
    | RoleImageMap
    | RoleNotification
    | RoleInfoBar
    | RoleLevelBar
    | RoleTitleBar
    | RoleBlockQuote
    | RoleAudio
    | RoleVideo
    | RoleDefinition
    | RoleArticle
    | RoleLandmark
    | RoleLog
    | RoleMarquee
    | RoleMath
    | RoleRating
    | RoleTimer
    | RoleDescriptionList
    | RoleDescriptionTerm
    | RoleDescriptionValue
    | RoleStatic
    | RoleMathFraction
    | RoleMathRoot
    | RoleSubscript
    | RoleSuperscript
    | RoleLastDefined
    | AnotherRole Int
    deriving (Show, Eq)

instance Enum Role where
    fromEnum RoleInvalid = 0
    fromEnum RoleAcceleratorLabel = 1
    fromEnum RoleAlert = 2
    fromEnum RoleAnimation = 3
    fromEnum RoleArrow = 4
    fromEnum RoleCalendar = 5
    fromEnum RoleCanvas = 6
    fromEnum RoleCheckBox = 7
    fromEnum RoleCheckMenuItem = 8
    fromEnum RoleColorChooser = 9
    fromEnum RoleColumnHeader = 10
    fromEnum RoleComboBox = 11
    fromEnum RoleDateEditor = 12
    fromEnum RoleDesktopIcon = 13
    fromEnum RoleDesktopFrame = 14
    fromEnum RoleDial = 15
    fromEnum RoleDialog = 16
    fromEnum RoleDirectoryPane = 17
    fromEnum RoleDrawingArea = 18
    fromEnum RoleFileChooser = 19
    fromEnum RoleFiller = 20
    fromEnum RoleFontChooser = 21
    fromEnum RoleFrame = 22
    fromEnum RoleGlassPane = 23
    fromEnum RoleHtmlContainer = 24
    fromEnum RoleIcon = 25
    fromEnum RoleImage = 26
    fromEnum RoleInternalFrame = 27
    fromEnum RoleLabel = 28
    fromEnum RoleLayeredPane = 29
    fromEnum RoleList = 30
    fromEnum RoleListItem = 31
    fromEnum RoleMenu = 32
    fromEnum RoleMenuBar = 33
    fromEnum RoleMenuItem = 34
    fromEnum RoleOptionPane = 35
    fromEnum RolePageTab = 36
    fromEnum RolePageTabList = 37
    fromEnum RolePanel = 38
    fromEnum RolePasswordText = 39
    fromEnum RolePopupMenu = 40
    fromEnum RoleProgressBar = 41
    fromEnum RolePushButton = 42
    fromEnum RoleRadioButton = 43
    fromEnum RoleRadioMenuItem = 44
    fromEnum RoleRootPane = 45
    fromEnum RoleRowHeader = 46
    fromEnum RoleScrollBar = 47
    fromEnum RoleScrollPane = 48
    fromEnum RoleSeparator = 49
    fromEnum RoleSlider = 50
    fromEnum RoleSplitPane = 51
    fromEnum RoleSpinButton = 52
    fromEnum RoleStatusbar = 53
    fromEnum RoleTable = 54
    fromEnum RoleTableCell = 55
    fromEnum RoleTableColumnHeader = 56
    fromEnum RoleTableRowHeader = 57
    fromEnum RoleTearOffMenuItem = 58
    fromEnum RoleTerminal = 59
    fromEnum RoleText = 60
    fromEnum RoleToggleButton = 61
    fromEnum RoleToolBar = 62
    fromEnum RoleToolTip = 63
    fromEnum RoleTree = 64
    fromEnum RoleTreeTable = 65
    fromEnum RoleUnknown = 66
    fromEnum RoleViewport = 67
    fromEnum RoleWindow = 68
    fromEnum RoleHeader = 69
    fromEnum RoleFooter = 70
    fromEnum RoleParagraph = 71
    fromEnum RoleRuler = 72
    fromEnum RoleApplication = 73
    fromEnum RoleAutocomplete = 74
    fromEnum RoleEditBar = 75
    fromEnum RoleEmbedded = 76
    fromEnum RoleEntry = 77
    fromEnum RoleChart = 78
    fromEnum RoleCaption = 79
    fromEnum RoleDocumentFrame = 80
    fromEnum RoleHeading = 81
    fromEnum RolePage = 82
    fromEnum RoleSection = 83
    fromEnum RoleRedundantObject = 84
    fromEnum RoleForm = 85
    fromEnum RoleLink = 86
    fromEnum RoleInputMethodWindow = 87
    fromEnum RoleTableRow = 88
    fromEnum RoleTreeItem = 89
    fromEnum RoleDocumentSpreadsheet = 90
    fromEnum RoleDocumentPresentation = 91
    fromEnum RoleDocumentText = 92
    fromEnum RoleDocumentWeb = 93
    fromEnum RoleDocumentEmail = 94
    fromEnum RoleComment = 95
    fromEnum RoleListBox = 96
    fromEnum RoleGrouping = 97
    fromEnum RoleImageMap = 98
    fromEnum RoleNotification = 99
    fromEnum RoleInfoBar = 100
    fromEnum RoleLevelBar = 101
    fromEnum RoleTitleBar = 102
    fromEnum RoleBlockQuote = 103
    fromEnum RoleAudio = 104
    fromEnum RoleVideo = 105
    fromEnum RoleDefinition = 106
    fromEnum RoleArticle = 107
    fromEnum RoleLandmark = 108
    fromEnum RoleLog = 109
    fromEnum RoleMarquee = 110
    fromEnum RoleMath = 111
    fromEnum RoleRating = 112
    fromEnum RoleTimer = 113
    fromEnum RoleDescriptionList = 114
    fromEnum RoleDescriptionTerm = 115
    fromEnum RoleDescriptionValue = 116
    fromEnum RoleStatic = 117
    fromEnum RoleMathFraction = 118
    fromEnum RoleMathRoot = 119
    fromEnum RoleSubscript = 120
    fromEnum RoleSuperscript = 121
    fromEnum RoleLastDefined = 122
    fromEnum (AnotherRole k) = k

    toEnum 0 = RoleInvalid
    toEnum 1 = RoleAcceleratorLabel
    toEnum 2 = RoleAlert
    toEnum 3 = RoleAnimation
    toEnum 4 = RoleArrow
    toEnum 5 = RoleCalendar
    toEnum 6 = RoleCanvas
    toEnum 7 = RoleCheckBox
    toEnum 8 = RoleCheckMenuItem
    toEnum 9 = RoleColorChooser
    toEnum 10 = RoleColumnHeader
    toEnum 11 = RoleComboBox
    toEnum 12 = RoleDateEditor
    toEnum 13 = RoleDesktopIcon
    toEnum 14 = RoleDesktopFrame
    toEnum 15 = RoleDial
    toEnum 16 = RoleDialog
    toEnum 17 = RoleDirectoryPane
    toEnum 18 = RoleDrawingArea
    toEnum 19 = RoleFileChooser
    toEnum 20 = RoleFiller
    toEnum 21 = RoleFontChooser
    toEnum 22 = RoleFrame
    toEnum 23 = RoleGlassPane
    toEnum 24 = RoleHtmlContainer
    toEnum 25 = RoleIcon
    toEnum 26 = RoleImage
    toEnum 27 = RoleInternalFrame
    toEnum 28 = RoleLabel
    toEnum 29 = RoleLayeredPane
    toEnum 30 = RoleList
    toEnum 31 = RoleListItem
    toEnum 32 = RoleMenu
    toEnum 33 = RoleMenuBar
    toEnum 34 = RoleMenuItem
    toEnum 35 = RoleOptionPane
    toEnum 36 = RolePageTab
    toEnum 37 = RolePageTabList
    toEnum 38 = RolePanel
    toEnum 39 = RolePasswordText
    toEnum 40 = RolePopupMenu
    toEnum 41 = RoleProgressBar
    toEnum 42 = RolePushButton
    toEnum 43 = RoleRadioButton
    toEnum 44 = RoleRadioMenuItem
    toEnum 45 = RoleRootPane
    toEnum 46 = RoleRowHeader
    toEnum 47 = RoleScrollBar
    toEnum 48 = RoleScrollPane
    toEnum 49 = RoleSeparator
    toEnum 50 = RoleSlider
    toEnum 51 = RoleSplitPane
    toEnum 52 = RoleSpinButton
    toEnum 53 = RoleStatusbar
    toEnum 54 = RoleTable
    toEnum 55 = RoleTableCell
    toEnum 56 = RoleTableColumnHeader
    toEnum 57 = RoleTableRowHeader
    toEnum 58 = RoleTearOffMenuItem
    toEnum 59 = RoleTerminal
    toEnum 60 = RoleText
    toEnum 61 = RoleToggleButton
    toEnum 62 = RoleToolBar
    toEnum 63 = RoleToolTip
    toEnum 64 = RoleTree
    toEnum 65 = RoleTreeTable
    toEnum 66 = RoleUnknown
    toEnum 67 = RoleViewport
    toEnum 68 = RoleWindow
    toEnum 69 = RoleHeader
    toEnum 70 = RoleFooter
    toEnum 71 = RoleParagraph
    toEnum 72 = RoleRuler
    toEnum 73 = RoleApplication
    toEnum 74 = RoleAutocomplete
    toEnum 75 = RoleEditBar
    toEnum 76 = RoleEmbedded
    toEnum 77 = RoleEntry
    toEnum 78 = RoleChart
    toEnum 79 = RoleCaption
    toEnum 80 = RoleDocumentFrame
    toEnum 81 = RoleHeading
    toEnum 82 = RolePage
    toEnum 83 = RoleSection
    toEnum 84 = RoleRedundantObject
    toEnum 85 = RoleForm
    toEnum 86 = RoleLink
    toEnum 87 = RoleInputMethodWindow
    toEnum 88 = RoleTableRow
    toEnum 89 = RoleTreeItem
    toEnum 90 = RoleDocumentSpreadsheet
    toEnum 91 = RoleDocumentPresentation
    toEnum 92 = RoleDocumentText
    toEnum 93 = RoleDocumentWeb
    toEnum 94 = RoleDocumentEmail
    toEnum 95 = RoleComment
    toEnum 96 = RoleListBox
    toEnum 97 = RoleGrouping
    toEnum 98 = RoleImageMap
    toEnum 99 = RoleNotification
    toEnum 100 = RoleInfoBar
    toEnum 101 = RoleLevelBar
    toEnum 102 = RoleTitleBar
    toEnum 103 = RoleBlockQuote
    toEnum 104 = RoleAudio
    toEnum 105 = RoleVideo
    toEnum 106 = RoleDefinition
    toEnum 107 = RoleArticle
    toEnum 108 = RoleLandmark
    toEnum 109 = RoleLog
    toEnum 110 = RoleMarquee
    toEnum 111 = RoleMath
    toEnum 112 = RoleRating
    toEnum 113 = RoleTimer
    toEnum 114 = RoleDescriptionList
    toEnum 115 = RoleDescriptionTerm
    toEnum 116 = RoleDescriptionValue
    toEnum 117 = RoleStatic
    toEnum 118 = RoleMathFraction
    toEnum 119 = RoleMathRoot
    toEnum 120 = RoleSubscript
    toEnum 121 = RoleSuperscript
    toEnum 122 = RoleLastDefined
    toEnum k = AnotherRole k

foreign import ccall "atk_role_get_type" c_atk_role_get_type :: 
    IO GType

instance BoxedEnum Role where
    boxedEnumType _ = c_atk_role_get_type

-- interface Selection 

newtype Selection = Selection (ForeignPtr Selection)
noSelection :: Maybe Selection
noSelection = Nothing

class ForeignPtrNewtype a => SelectionK a
instance (ForeignPtrNewtype o, IsDescendantOf Selection o) => SelectionK o
type instance ParentTypes Selection = '[]

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

foreign import ccall "atk_selection_add_selection" atk_selection_add_selection :: 
    Ptr Selection ->                        -- _obj : TInterface "Atk" "Selection"
    Int32 ->                                -- i : TBasicType TInt32
    IO CInt


selectionAddSelection ::
    (MonadIO m, SelectionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m Bool
selectionAddSelection _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_selection_add_selection _obj' i
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_selection_clear_selection" atk_selection_clear_selection :: 
    Ptr Selection ->                        -- _obj : TInterface "Atk" "Selection"
    IO CInt


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

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

foreign import ccall "atk_selection_get_selection_count" atk_selection_get_selection_count :: 
    Ptr Selection ->                        -- _obj : TInterface "Atk" "Selection"
    IO Int32


selectionGetSelectionCount ::
    (MonadIO m, SelectionK a) =>
    a ->                                    -- _obj
    m Int32
selectionGetSelectionCount _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_selection_get_selection_count _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_selection_is_child_selected" atk_selection_is_child_selected :: 
    Ptr Selection ->                        -- _obj : TInterface "Atk" "Selection"
    Int32 ->                                -- i : TBasicType TInt32
    IO CInt


selectionIsChildSelected ::
    (MonadIO m, SelectionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m Bool
selectionIsChildSelected _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_selection_is_child_selected _obj' i
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Selection::ref_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Selection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Selection", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_selection_ref_selection" atk_selection_ref_selection :: 
    Ptr Selection ->                        -- _obj : TInterface "Atk" "Selection"
    Int32 ->                                -- i : TBasicType TInt32
    IO (Ptr Object)


selectionRefSelection ::
    (MonadIO m, SelectionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m Object
selectionRefSelection _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_selection_ref_selection _obj' i
    result' <- (wrapObject Object) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_selection_remove_selection" atk_selection_remove_selection :: 
    Ptr Selection ->                        -- _obj : TInterface "Atk" "Selection"
    Int32 ->                                -- i : TBasicType TInt32
    IO CInt


selectionRemoveSelection ::
    (MonadIO m, SelectionK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m Bool
selectionRemoveSelection _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_selection_remove_selection _obj' i
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_selection_select_all_selection" atk_selection_select_all_selection :: 
    Ptr Selection ->                        -- _obj : TInterface "Atk" "Selection"
    IO CInt


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

-- signal Selection::selection-changed
type SelectionSelectionChangedCallback =
    IO ()

noSelectionSelectionChangedCallback :: Maybe SelectionSelectionChangedCallback
noSelectionSelectionChangedCallback = Nothing

type SelectionSelectionChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkSelectionSelectionChangedCallback :: SelectionSelectionChangedCallbackC -> IO (FunPtr SelectionSelectionChangedCallbackC)

selectionSelectionChangedClosure :: SelectionSelectionChangedCallback -> IO Closure
selectionSelectionChangedClosure cb = newCClosure =<< mkSelectionSelectionChangedCallback wrapped
    where wrapped = selectionSelectionChangedCallbackWrapper cb

selectionSelectionChangedCallbackWrapper ::
    SelectionSelectionChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
selectionSelectionChangedCallbackWrapper _cb _ _ = do
    _cb 

onSelectionSelectionChanged :: (GObject a, MonadIO m) => a -> SelectionSelectionChangedCallback -> m SignalHandlerId
onSelectionSelectionChanged obj cb = liftIO $ connectSelectionSelectionChanged obj cb SignalConnectBefore
afterSelectionSelectionChanged :: (GObject a, MonadIO m) => a -> SelectionSelectionChangedCallback -> m SignalHandlerId
afterSelectionSelectionChanged obj cb = connectSelectionSelectionChanged obj cb SignalConnectAfter

connectSelectionSelectionChanged :: (GObject a, MonadIO m) =>
                                    a -> SelectionSelectionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectSelectionSelectionChanged obj cb after = liftIO $ do
    cb' <- mkSelectionSelectionChangedCallback (selectionSelectionChangedCallbackWrapper cb)
    connectSignalFunPtr obj "selection-changed" cb' after

-- object Socket 
newtype Socket = Socket (ForeignPtr Socket)
noSocket :: Maybe Socket
noSocket = Nothing

foreign import ccall "atk_socket_get_type"
    c_atk_socket_get_type :: IO GType

type instance ParentTypes Socket = '[Object, GObject.Object, Component]

instance GObject Socket where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_socket_get_type
    

class GObject o => SocketK o
instance (GObject o, IsDescendantOf Socket o) => SocketK o

toSocket :: SocketK o => o -> IO Socket
toSocket = unsafeCastTo Socket

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

foreign import ccall "atk_socket_new" atk_socket_new :: 
    IO (Ptr Socket)


socketNew ::
    (MonadIO m) =>
    m Socket
socketNew  = liftIO $ do
    result <- atk_socket_new
    result' <- (wrapObject Socket) result
    return result'

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

foreign import ccall "atk_socket_embed" atk_socket_embed :: 
    Ptr Socket ->                           -- _obj : TInterface "Atk" "Socket"
    CString ->                              -- plug_id : TBasicType TUTF8
    IO ()


socketEmbed ::
    (MonadIO m, SocketK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- plug_id
    m ()
socketEmbed _obj plug_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    plug_id' <- textToCString plug_id
    atk_socket_embed _obj' plug_id'
    touchManagedPtr _obj
    freeMem plug_id'
    return ()

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

foreign import ccall "atk_socket_is_occupied" atk_socket_is_occupied :: 
    Ptr Socket ->                           -- _obj : TInterface "Atk" "Socket"
    IO CInt


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

-- object StateSet 
newtype StateSet = StateSet (ForeignPtr StateSet)
noStateSet :: Maybe StateSet
noStateSet = Nothing

foreign import ccall "atk_state_set_get_type"
    c_atk_state_set_get_type :: IO GType

type instance ParentTypes StateSet = '[GObject.Object]

instance GObject StateSet where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_state_set_get_type
    

class GObject o => StateSetK o
instance (GObject o, IsDescendantOf StateSet o) => StateSetK o

toStateSet :: StateSetK o => o -> IO StateSet
toStateSet = unsafeCastTo StateSet

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

foreign import ccall "atk_state_set_new" atk_state_set_new :: 
    IO (Ptr StateSet)


stateSetNew ::
    (MonadIO m) =>
    m StateSet
stateSetNew  = liftIO $ do
    result <- atk_state_set_new
    result' <- (wrapObject StateSet) result
    return result'

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

foreign import ccall "atk_state_set_add_state" atk_state_set_add_state :: 
    Ptr StateSet ->                         -- _obj : TInterface "Atk" "StateSet"
    CUInt ->                                -- type : TInterface "Atk" "StateType"
    IO CInt


stateSetAddState ::
    (MonadIO m, StateSetK a) =>
    a ->                                    -- _obj
    StateType ->                            -- type
    m Bool
stateSetAddState _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    result <- atk_state_set_add_state _obj' type_'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method StateSet::add_states
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "StateSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TCArray False (-1) 2 (TInterface "Atk" "StateType"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_types", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_types", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "StateSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TCArray False (-1) 2 (TInterface "Atk" "StateType"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_state_set_add_states" atk_state_set_add_states :: 
    Ptr StateSet ->                         -- _obj : TInterface "Atk" "StateSet"
    Ptr CUInt ->                            -- types : TCArray False (-1) 2 (TInterface "Atk" "StateType")
    Int32 ->                                -- n_types : TBasicType TInt32
    IO ()


stateSetAddStates ::
    (MonadIO m, StateSetK a) =>
    a ->                                    -- _obj
    [StateType] ->                          -- types
    m ()
stateSetAddStates _obj types = liftIO $ do
    let n_types = fromIntegral $ length types
    let _obj' = unsafeManagedPtrCastPtr _obj
    let types' = map (fromIntegral . fromEnum) types
    types'' <- packStorableArray types'
    atk_state_set_add_states _obj' types'' n_types
    touchManagedPtr _obj
    freeMem types''
    return ()

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

foreign import ccall "atk_state_set_and_sets" atk_state_set_and_sets :: 
    Ptr StateSet ->                         -- _obj : TInterface "Atk" "StateSet"
    Ptr StateSet ->                         -- compare_set : TInterface "Atk" "StateSet"
    IO (Ptr StateSet)


stateSetAndSets ::
    (MonadIO m, StateSetK a, StateSetK b) =>
    a ->                                    -- _obj
    b ->                                    -- compare_set
    m StateSet
stateSetAndSets _obj compare_set = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let compare_set' = unsafeManagedPtrCastPtr compare_set
    result <- atk_state_set_and_sets _obj' compare_set'
    result' <- (wrapObject StateSet) result
    touchManagedPtr _obj
    touchManagedPtr compare_set
    return result'

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

foreign import ccall "atk_state_set_clear_states" atk_state_set_clear_states :: 
    Ptr StateSet ->                         -- _obj : TInterface "Atk" "StateSet"
    IO ()


stateSetClearStates ::
    (MonadIO m, StateSetK a) =>
    a ->                                    -- _obj
    m ()
stateSetClearStates _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    atk_state_set_clear_states _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "atk_state_set_contains_state" atk_state_set_contains_state :: 
    Ptr StateSet ->                         -- _obj : TInterface "Atk" "StateSet"
    CUInt ->                                -- type : TInterface "Atk" "StateType"
    IO CInt


stateSetContainsState ::
    (MonadIO m, StateSetK a) =>
    a ->                                    -- _obj
    StateType ->                            -- type
    m Bool
stateSetContainsState _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    result <- atk_state_set_contains_state _obj' type_'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method StateSet::contains_states
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "StateSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TCArray False (-1) 2 (TInterface "Atk" "StateType"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "n_types", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : [Arg {argName = "n_types", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "StateSet", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "types", argType = TCArray False (-1) 2 (TInterface "Atk" "StateType"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "atk_state_set_contains_states" atk_state_set_contains_states :: 
    Ptr StateSet ->                         -- _obj : TInterface "Atk" "StateSet"
    Ptr CUInt ->                            -- types : TCArray False (-1) 2 (TInterface "Atk" "StateType")
    Int32 ->                                -- n_types : TBasicType TInt32
    IO CInt


stateSetContainsStates ::
    (MonadIO m, StateSetK a) =>
    a ->                                    -- _obj
    [StateType] ->                          -- types
    m Bool
stateSetContainsStates _obj types = liftIO $ do
    let n_types = fromIntegral $ length types
    let _obj' = unsafeManagedPtrCastPtr _obj
    let types' = map (fromIntegral . fromEnum) types
    types'' <- packStorableArray types'
    result <- atk_state_set_contains_states _obj' types'' n_types
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem types''
    return result'

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

foreign import ccall "atk_state_set_is_empty" atk_state_set_is_empty :: 
    Ptr StateSet ->                         -- _obj : TInterface "Atk" "StateSet"
    IO CInt


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

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

foreign import ccall "atk_state_set_or_sets" atk_state_set_or_sets :: 
    Ptr StateSet ->                         -- _obj : TInterface "Atk" "StateSet"
    Ptr StateSet ->                         -- compare_set : TInterface "Atk" "StateSet"
    IO (Ptr StateSet)


stateSetOrSets ::
    (MonadIO m, StateSetK a, StateSetK b) =>
    a ->                                    -- _obj
    b ->                                    -- compare_set
    m StateSet
stateSetOrSets _obj compare_set = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let compare_set' = unsafeManagedPtrCastPtr compare_set
    result <- atk_state_set_or_sets _obj' compare_set'
    result' <- (wrapObject StateSet) result
    touchManagedPtr _obj
    touchManagedPtr compare_set
    return result'

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

foreign import ccall "atk_state_set_remove_state" atk_state_set_remove_state :: 
    Ptr StateSet ->                         -- _obj : TInterface "Atk" "StateSet"
    CUInt ->                                -- type : TInterface "Atk" "StateType"
    IO CInt


stateSetRemoveState ::
    (MonadIO m, StateSetK a) =>
    a ->                                    -- _obj
    StateType ->                            -- type
    m Bool
stateSetRemoveState _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    result <- atk_state_set_remove_state _obj' type_'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_state_set_xor_sets" atk_state_set_xor_sets :: 
    Ptr StateSet ->                         -- _obj : TInterface "Atk" "StateSet"
    Ptr StateSet ->                         -- compare_set : TInterface "Atk" "StateSet"
    IO (Ptr StateSet)


stateSetXorSets ::
    (MonadIO m, StateSetK a, StateSetK b) =>
    a ->                                    -- _obj
    b ->                                    -- compare_set
    m StateSet
stateSetXorSets _obj compare_set = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let compare_set' = unsafeManagedPtrCastPtr compare_set
    result <- atk_state_set_xor_sets _obj' compare_set'
    result' <- (wrapObject StateSet) result
    touchManagedPtr _obj
    touchManagedPtr compare_set
    return result'

-- Enum StateType

data StateType = 
      StateTypeInvalid
    | StateTypeActive
    | StateTypeArmed
    | StateTypeBusy
    | StateTypeChecked
    | StateTypeDefunct
    | StateTypeEditable
    | StateTypeEnabled
    | StateTypeExpandable
    | StateTypeExpanded
    | StateTypeFocusable
    | StateTypeFocused
    | StateTypeHorizontal
    | StateTypeIconified
    | StateTypeModal
    | StateTypeMultiLine
    | StateTypeMultiselectable
    | StateTypeOpaque
    | StateTypePressed
    | StateTypeResizable
    | StateTypeSelectable
    | StateTypeSelected
    | StateTypeSensitive
    | StateTypeShowing
    | StateTypeSingleLine
    | StateTypeStale
    | StateTypeTransient
    | StateTypeVertical
    | StateTypeVisible
    | StateTypeManagesDescendants
    | StateTypeIndeterminate
    | StateTypeTruncated
    | StateTypeRequired
    | StateTypeInvalidEntry
    | StateTypeSupportsAutocompletion
    | StateTypeSelectableText
    | StateTypeDefault
    | StateTypeAnimated
    | StateTypeVisited
    | StateTypeCheckable
    | StateTypeHasPopup
    | StateTypeHasTooltip
    | StateTypeReadOnly
    | StateTypeLastDefined
    | AnotherStateType Int
    deriving (Show, Eq)

instance Enum StateType where
    fromEnum StateTypeInvalid = 0
    fromEnum StateTypeActive = 1
    fromEnum StateTypeArmed = 2
    fromEnum StateTypeBusy = 3
    fromEnum StateTypeChecked = 4
    fromEnum StateTypeDefunct = 5
    fromEnum StateTypeEditable = 6
    fromEnum StateTypeEnabled = 7
    fromEnum StateTypeExpandable = 8
    fromEnum StateTypeExpanded = 9
    fromEnum StateTypeFocusable = 10
    fromEnum StateTypeFocused = 11
    fromEnum StateTypeHorizontal = 12
    fromEnum StateTypeIconified = 13
    fromEnum StateTypeModal = 14
    fromEnum StateTypeMultiLine = 15
    fromEnum StateTypeMultiselectable = 16
    fromEnum StateTypeOpaque = 17
    fromEnum StateTypePressed = 18
    fromEnum StateTypeResizable = 19
    fromEnum StateTypeSelectable = 20
    fromEnum StateTypeSelected = 21
    fromEnum StateTypeSensitive = 22
    fromEnum StateTypeShowing = 23
    fromEnum StateTypeSingleLine = 24
    fromEnum StateTypeStale = 25
    fromEnum StateTypeTransient = 26
    fromEnum StateTypeVertical = 27
    fromEnum StateTypeVisible = 28
    fromEnum StateTypeManagesDescendants = 29
    fromEnum StateTypeIndeterminate = 30
    fromEnum StateTypeTruncated = 31
    fromEnum StateTypeRequired = 32
    fromEnum StateTypeInvalidEntry = 33
    fromEnum StateTypeSupportsAutocompletion = 34
    fromEnum StateTypeSelectableText = 35
    fromEnum StateTypeDefault = 36
    fromEnum StateTypeAnimated = 37
    fromEnum StateTypeVisited = 38
    fromEnum StateTypeCheckable = 39
    fromEnum StateTypeHasPopup = 40
    fromEnum StateTypeHasTooltip = 41
    fromEnum StateTypeReadOnly = 42
    fromEnum StateTypeLastDefined = 43
    fromEnum (AnotherStateType k) = k

    toEnum 0 = StateTypeInvalid
    toEnum 1 = StateTypeActive
    toEnum 2 = StateTypeArmed
    toEnum 3 = StateTypeBusy
    toEnum 4 = StateTypeChecked
    toEnum 5 = StateTypeDefunct
    toEnum 6 = StateTypeEditable
    toEnum 7 = StateTypeEnabled
    toEnum 8 = StateTypeExpandable
    toEnum 9 = StateTypeExpanded
    toEnum 10 = StateTypeFocusable
    toEnum 11 = StateTypeFocused
    toEnum 12 = StateTypeHorizontal
    toEnum 13 = StateTypeIconified
    toEnum 14 = StateTypeModal
    toEnum 15 = StateTypeMultiLine
    toEnum 16 = StateTypeMultiselectable
    toEnum 17 = StateTypeOpaque
    toEnum 18 = StateTypePressed
    toEnum 19 = StateTypeResizable
    toEnum 20 = StateTypeSelectable
    toEnum 21 = StateTypeSelected
    toEnum 22 = StateTypeSensitive
    toEnum 23 = StateTypeShowing
    toEnum 24 = StateTypeSingleLine
    toEnum 25 = StateTypeStale
    toEnum 26 = StateTypeTransient
    toEnum 27 = StateTypeVertical
    toEnum 28 = StateTypeVisible
    toEnum 29 = StateTypeManagesDescendants
    toEnum 30 = StateTypeIndeterminate
    toEnum 31 = StateTypeTruncated
    toEnum 32 = StateTypeRequired
    toEnum 33 = StateTypeInvalidEntry
    toEnum 34 = StateTypeSupportsAutocompletion
    toEnum 35 = StateTypeSelectableText
    toEnum 36 = StateTypeDefault
    toEnum 37 = StateTypeAnimated
    toEnum 38 = StateTypeVisited
    toEnum 39 = StateTypeCheckable
    toEnum 40 = StateTypeHasPopup
    toEnum 41 = StateTypeHasTooltip
    toEnum 42 = StateTypeReadOnly
    toEnum 43 = StateTypeLastDefined
    toEnum k = AnotherStateType k

foreign import ccall "atk_state_type_get_type" c_atk_state_type_get_type :: 
    IO GType

instance BoxedEnum StateType where
    boxedEnumType _ = c_atk_state_type_get_type

-- interface StreamableContent 

newtype StreamableContent = StreamableContent (ForeignPtr StreamableContent)
noStreamableContent :: Maybe StreamableContent
noStreamableContent = Nothing

class ForeignPtrNewtype a => StreamableContentK a
instance (ForeignPtrNewtype o, IsDescendantOf StreamableContent o) => StreamableContentK o
type instance ParentTypes StreamableContent = '[]

-- method StreamableContent::get_mime_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "StreamableContent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "StreamableContent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "i", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_streamable_content_get_mime_type" atk_streamable_content_get_mime_type :: 
    Ptr StreamableContent ->                -- _obj : TInterface "Atk" "StreamableContent"
    Int32 ->                                -- i : TBasicType TInt32
    IO CString


streamableContentGetMimeType ::
    (MonadIO m, StreamableContentK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- i
    m T.Text
streamableContentGetMimeType _obj i = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_streamable_content_get_mime_type _obj' i
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_streamable_content_get_n_mime_types" atk_streamable_content_get_n_mime_types :: 
    Ptr StreamableContent ->                -- _obj : TInterface "Atk" "StreamableContent"
    IO Int32


streamableContentGetNMimeTypes ::
    (MonadIO m, StreamableContentK a) =>
    a ->                                    -- _obj
    m Int32
streamableContentGetNMimeTypes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_streamable_content_get_n_mime_types _obj'
    touchManagedPtr _obj
    return result

-- method StreamableContent::get_stream
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "StreamableContent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "StreamableContent", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GLib" "IOChannel"
-- throws : False
-- Skip return : False

foreign import ccall "atk_streamable_content_get_stream" atk_streamable_content_get_stream :: 
    Ptr StreamableContent ->                -- _obj : TInterface "Atk" "StreamableContent"
    CString ->                              -- mime_type : TBasicType TUTF8
    IO (Ptr GLib.IOChannel)


streamableContentGetStream ::
    (MonadIO m, StreamableContentK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- mime_type
    m GLib.IOChannel
streamableContentGetStream _obj mime_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    mime_type' <- textToCString mime_type
    result <- atk_streamable_content_get_stream _obj' mime_type'
    result' <- (wrapBoxed GLib.IOChannel) result
    touchManagedPtr _obj
    freeMem mime_type'
    return result'

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

foreign import ccall "atk_streamable_content_get_uri" atk_streamable_content_get_uri :: 
    Ptr StreamableContent ->                -- _obj : TInterface "Atk" "StreamableContent"
    CString ->                              -- mime_type : TBasicType TUTF8
    IO CString


streamableContentGetUri ::
    (MonadIO m, StreamableContentK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- mime_type
    m T.Text
streamableContentGetUri _obj mime_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    mime_type' <- textToCString mime_type
    result <- atk_streamable_content_get_uri _obj' mime_type'
    result' <- cstringToText result
    touchManagedPtr _obj
    freeMem mime_type'
    return result'

-- interface Table 

newtype Table = Table (ForeignPtr Table)
noTable :: Maybe Table
noTable = Nothing

class ForeignPtrNewtype a => TableK a
instance (ForeignPtrNewtype o, IsDescendantOf Table o) => TableK o
type instance ParentTypes Table = '[]

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

foreign import ccall "atk_table_add_column_selection" atk_table_add_column_selection :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- column : TBasicType TInt32
    IO CInt


tableAddColumnSelection ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m Bool
tableAddColumnSelection _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_add_column_selection _obj' column
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_table_add_row_selection" atk_table_add_row_selection :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    IO CInt


tableAddRowSelection ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    m Bool
tableAddRowSelection _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_add_row_selection _obj' row
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_table_get_caption" atk_table_get_caption :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    IO (Ptr Object)


tableGetCaption ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    m Object
tableGetCaption _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_caption _obj'
    result' <- (newObject Object) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_table_get_column_at_index" atk_table_get_column_at_index :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- index_ : TBasicType TInt32
    IO Int32

{-# DEPRECATED tableGetColumnAtIndex ["Since 2.12."]#-}
tableGetColumnAtIndex ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- index_
    m Int32
tableGetColumnAtIndex _obj index_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_column_at_index _obj' index_
    touchManagedPtr _obj
    return result

-- method Table::get_column_description
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_get_column_description" atk_table_get_column_description :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- column : TBasicType TInt32
    IO CString


tableGetColumnDescription ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m T.Text
tableGetColumnDescription _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_column_description _obj' column
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Table::get_column_extent_at
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_get_column_extent_at" atk_table_get_column_extent_at :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    Int32 ->                                -- column : TBasicType TInt32
    IO Int32


tableGetColumnExtentAt ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    Int32 ->                                -- column
    m Int32
tableGetColumnExtentAt _obj row column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_column_extent_at _obj' row column
    touchManagedPtr _obj
    return result

-- method Table::get_column_header
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_get_column_header" atk_table_get_column_header :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- column : TBasicType TInt32
    IO (Ptr Object)


tableGetColumnHeader ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m Object
tableGetColumnHeader _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_column_header _obj' column
    result' <- (newObject Object) result
    touchManagedPtr _obj
    return result'

-- method Table::get_index_at
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_get_index_at" atk_table_get_index_at :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    Int32 ->                                -- column : TBasicType TInt32
    IO Int32

{-# DEPRECATED tableGetIndexAt ["Since 2.12. Use atk_table_ref_at() in order to get the","accessible that represents the cell at (@row, @column)"]#-}
tableGetIndexAt ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    Int32 ->                                -- column
    m Int32
tableGetIndexAt _obj row column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_index_at _obj' row column
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_table_get_n_columns" atk_table_get_n_columns :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    IO Int32


tableGetNColumns ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    m Int32
tableGetNColumns _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_n_columns _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_table_get_n_rows" atk_table_get_n_rows :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    IO Int32


tableGetNRows ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    m Int32
tableGetNRows _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_n_rows _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_table_get_row_at_index" atk_table_get_row_at_index :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- index_ : TBasicType TInt32
    IO Int32

{-# DEPRECATED tableGetRowAtIndex ["since 2.12."]#-}
tableGetRowAtIndex ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- index_
    m Int32
tableGetRowAtIndex _obj index_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_row_at_index _obj' index_
    touchManagedPtr _obj
    return result

-- method Table::get_row_description
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_get_row_description" atk_table_get_row_description :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    IO CString


tableGetRowDescription ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    m T.Text
tableGetRowDescription _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_row_description _obj' row
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Table::get_row_extent_at
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_get_row_extent_at" atk_table_get_row_extent_at :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    Int32 ->                                -- column : TBasicType TInt32
    IO Int32


tableGetRowExtentAt ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    Int32 ->                                -- column
    m Int32
tableGetRowExtentAt _obj row column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_row_extent_at _obj' row column
    touchManagedPtr _obj
    return result

-- method Table::get_row_header
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_get_row_header" atk_table_get_row_header :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    IO (Ptr Object)


tableGetRowHeader ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    m Object
tableGetRowHeader _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_row_header _obj' row
    result' <- (newObject Object) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_table_get_selected_columns" atk_table_get_selected_columns :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- selected : TBasicType TInt32
    IO Int32


tableGetSelectedColumns ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- selected
    m Int32
tableGetSelectedColumns _obj selected = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_selected_columns _obj' selected
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_table_get_selected_rows" atk_table_get_selected_rows :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- selected : TBasicType TInt32
    IO Int32


tableGetSelectedRows ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- selected
    m Int32
tableGetSelectedRows _obj selected = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_selected_rows _obj' selected
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_table_get_summary" atk_table_get_summary :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    IO (Ptr Object)


tableGetSummary ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    m Object
tableGetSummary _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_get_summary _obj'
    result' <- (wrapObject Object) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_table_is_column_selected" atk_table_is_column_selected :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- column : TBasicType TInt32
    IO CInt


tableIsColumnSelected ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m Bool
tableIsColumnSelected _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_is_column_selected _obj' column
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_table_is_row_selected" atk_table_is_row_selected :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    IO CInt


tableIsRowSelected ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    m Bool
tableIsRowSelected _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_is_row_selected _obj' row
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_table_is_selected" atk_table_is_selected :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    Int32 ->                                -- column : TBasicType TInt32
    IO CInt


tableIsSelected ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    Int32 ->                                -- column
    m Bool
tableIsSelected _obj row column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_is_selected _obj' row column
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Table::ref_at
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_ref_at" atk_table_ref_at :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    Int32 ->                                -- column : TBasicType TInt32
    IO (Ptr Object)


tableRefAt ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    Int32 ->                                -- column
    m Object
tableRefAt _obj row column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_ref_at _obj' row column
    result' <- (wrapObject Object) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_table_remove_column_selection" atk_table_remove_column_selection :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- column : TBasicType TInt32
    IO CInt


tableRemoveColumnSelection ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m Bool
tableRemoveColumnSelection _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_remove_column_selection _obj' column
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_table_remove_row_selection" atk_table_remove_row_selection :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    IO CInt


tableRemoveRowSelection ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    m Bool
tableRemoveRowSelection _obj row = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_remove_row_selection _obj' row
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_table_set_caption" atk_table_set_caption :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Ptr Object ->                           -- caption : TInterface "Atk" "Object"
    IO ()


tableSetCaption ::
    (MonadIO m, TableK a, ObjectK b) =>
    a ->                                    -- _obj
    b ->                                    -- caption
    m ()
tableSetCaption _obj caption = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let caption' = unsafeManagedPtrCastPtr caption
    atk_table_set_caption _obj' caption'
    touchManagedPtr _obj
    touchManagedPtr caption
    return ()

-- method Table::set_column_description
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_set_column_description" atk_table_set_column_description :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- column : TBasicType TInt32
    CString ->                              -- description : TBasicType TUTF8
    IO ()


tableSetColumnDescription ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    T.Text ->                               -- description
    m ()
tableSetColumnDescription _obj column description = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    description' <- textToCString description
    atk_table_set_column_description _obj' column description'
    touchManagedPtr _obj
    freeMem description'
    return ()

-- method Table::set_column_header
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "header", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "header", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_set_column_header" atk_table_set_column_header :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- column : TBasicType TInt32
    Ptr Object ->                           -- header : TInterface "Atk" "Object"
    IO ()


tableSetColumnHeader ::
    (MonadIO m, TableK a, ObjectK b) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    b ->                                    -- header
    m ()
tableSetColumnHeader _obj column header = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let header' = unsafeManagedPtrCastPtr header
    atk_table_set_column_header _obj' column header'
    touchManagedPtr _obj
    touchManagedPtr header
    return ()

-- method Table::set_row_description
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "description", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_set_row_description" atk_table_set_row_description :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    CString ->                              -- description : TBasicType TUTF8
    IO ()


tableSetRowDescription ::
    (MonadIO m, TableK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    T.Text ->                               -- description
    m ()
tableSetRowDescription _obj row description = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    description' <- textToCString description
    atk_table_set_row_description _obj' row description'
    touchManagedPtr _obj
    freeMem description'
    return ()

-- method Table::set_row_header
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "header", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Table", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "header", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_set_row_header" atk_table_set_row_header :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Int32 ->                                -- row : TBasicType TInt32
    Ptr Object ->                           -- header : TInterface "Atk" "Object"
    IO ()


tableSetRowHeader ::
    (MonadIO m, TableK a, ObjectK b) =>
    a ->                                    -- _obj
    Int32 ->                                -- row
    b ->                                    -- header
    m ()
tableSetRowHeader _obj row header = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let header' = unsafeManagedPtrCastPtr header
    atk_table_set_row_header _obj' row header'
    touchManagedPtr _obj
    touchManagedPtr header
    return ()

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

foreign import ccall "atk_table_set_summary" atk_table_set_summary :: 
    Ptr Table ->                            -- _obj : TInterface "Atk" "Table"
    Ptr Object ->                           -- accessible : TInterface "Atk" "Object"
    IO ()


tableSetSummary ::
    (MonadIO m, TableK a, ObjectK b) =>
    a ->                                    -- _obj
    b ->                                    -- accessible
    m ()
tableSetSummary _obj accessible = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let accessible' = unsafeManagedPtrCastPtr accessible
    atk_table_set_summary _obj' accessible'
    touchManagedPtr _obj
    touchManagedPtr accessible
    return ()

-- signal Table::column-deleted
type TableColumnDeletedCallback =
    Int32 ->
    Int32 ->
    IO ()

noTableColumnDeletedCallback :: Maybe TableColumnDeletedCallback
noTableColumnDeletedCallback = Nothing

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

foreign import ccall "wrapper"
    mkTableColumnDeletedCallback :: TableColumnDeletedCallbackC -> IO (FunPtr TableColumnDeletedCallbackC)

tableColumnDeletedClosure :: TableColumnDeletedCallback -> IO Closure
tableColumnDeletedClosure cb = newCClosure =<< mkTableColumnDeletedCallback wrapped
    where wrapped = tableColumnDeletedCallbackWrapper cb

tableColumnDeletedCallbackWrapper ::
    TableColumnDeletedCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO ()
tableColumnDeletedCallbackWrapper _cb _ arg1 arg2 _ = do
    _cb  arg1 arg2

onTableColumnDeleted :: (GObject a, MonadIO m) => a -> TableColumnDeletedCallback -> m SignalHandlerId
onTableColumnDeleted obj cb = liftIO $ connectTableColumnDeleted obj cb SignalConnectBefore
afterTableColumnDeleted :: (GObject a, MonadIO m) => a -> TableColumnDeletedCallback -> m SignalHandlerId
afterTableColumnDeleted obj cb = connectTableColumnDeleted obj cb SignalConnectAfter

connectTableColumnDeleted :: (GObject a, MonadIO m) =>
                             a -> TableColumnDeletedCallback -> SignalConnectMode -> m SignalHandlerId
connectTableColumnDeleted obj cb after = liftIO $ do
    cb' <- mkTableColumnDeletedCallback (tableColumnDeletedCallbackWrapper cb)
    connectSignalFunPtr obj "column-deleted" cb' after

-- signal Table::column-inserted
type TableColumnInsertedCallback =
    Int32 ->
    Int32 ->
    IO ()

noTableColumnInsertedCallback :: Maybe TableColumnInsertedCallback
noTableColumnInsertedCallback = Nothing

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

foreign import ccall "wrapper"
    mkTableColumnInsertedCallback :: TableColumnInsertedCallbackC -> IO (FunPtr TableColumnInsertedCallbackC)

tableColumnInsertedClosure :: TableColumnInsertedCallback -> IO Closure
tableColumnInsertedClosure cb = newCClosure =<< mkTableColumnInsertedCallback wrapped
    where wrapped = tableColumnInsertedCallbackWrapper cb

tableColumnInsertedCallbackWrapper ::
    TableColumnInsertedCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO ()
tableColumnInsertedCallbackWrapper _cb _ arg1 arg2 _ = do
    _cb  arg1 arg2

onTableColumnInserted :: (GObject a, MonadIO m) => a -> TableColumnInsertedCallback -> m SignalHandlerId
onTableColumnInserted obj cb = liftIO $ connectTableColumnInserted obj cb SignalConnectBefore
afterTableColumnInserted :: (GObject a, MonadIO m) => a -> TableColumnInsertedCallback -> m SignalHandlerId
afterTableColumnInserted obj cb = connectTableColumnInserted obj cb SignalConnectAfter

connectTableColumnInserted :: (GObject a, MonadIO m) =>
                              a -> TableColumnInsertedCallback -> SignalConnectMode -> m SignalHandlerId
connectTableColumnInserted obj cb after = liftIO $ do
    cb' <- mkTableColumnInsertedCallback (tableColumnInsertedCallbackWrapper cb)
    connectSignalFunPtr obj "column-inserted" cb' after

-- signal Table::column-reordered
type TableColumnReorderedCallback =
    IO ()

noTableColumnReorderedCallback :: Maybe TableColumnReorderedCallback
noTableColumnReorderedCallback = Nothing

type TableColumnReorderedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTableColumnReorderedCallback :: TableColumnReorderedCallbackC -> IO (FunPtr TableColumnReorderedCallbackC)

tableColumnReorderedClosure :: TableColumnReorderedCallback -> IO Closure
tableColumnReorderedClosure cb = newCClosure =<< mkTableColumnReorderedCallback wrapped
    where wrapped = tableColumnReorderedCallbackWrapper cb

tableColumnReorderedCallbackWrapper ::
    TableColumnReorderedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
tableColumnReorderedCallbackWrapper _cb _ _ = do
    _cb 

onTableColumnReordered :: (GObject a, MonadIO m) => a -> TableColumnReorderedCallback -> m SignalHandlerId
onTableColumnReordered obj cb = liftIO $ connectTableColumnReordered obj cb SignalConnectBefore
afterTableColumnReordered :: (GObject a, MonadIO m) => a -> TableColumnReorderedCallback -> m SignalHandlerId
afterTableColumnReordered obj cb = connectTableColumnReordered obj cb SignalConnectAfter

connectTableColumnReordered :: (GObject a, MonadIO m) =>
                               a -> TableColumnReorderedCallback -> SignalConnectMode -> m SignalHandlerId
connectTableColumnReordered obj cb after = liftIO $ do
    cb' <- mkTableColumnReorderedCallback (tableColumnReorderedCallbackWrapper cb)
    connectSignalFunPtr obj "column-reordered" cb' after

-- signal Table::model-changed
type TableModelChangedCallback =
    IO ()

noTableModelChangedCallback :: Maybe TableModelChangedCallback
noTableModelChangedCallback = Nothing

type TableModelChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTableModelChangedCallback :: TableModelChangedCallbackC -> IO (FunPtr TableModelChangedCallbackC)

tableModelChangedClosure :: TableModelChangedCallback -> IO Closure
tableModelChangedClosure cb = newCClosure =<< mkTableModelChangedCallback wrapped
    where wrapped = tableModelChangedCallbackWrapper cb

tableModelChangedCallbackWrapper ::
    TableModelChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
tableModelChangedCallbackWrapper _cb _ _ = do
    _cb 

onTableModelChanged :: (GObject a, MonadIO m) => a -> TableModelChangedCallback -> m SignalHandlerId
onTableModelChanged obj cb = liftIO $ connectTableModelChanged obj cb SignalConnectBefore
afterTableModelChanged :: (GObject a, MonadIO m) => a -> TableModelChangedCallback -> m SignalHandlerId
afterTableModelChanged obj cb = connectTableModelChanged obj cb SignalConnectAfter

connectTableModelChanged :: (GObject a, MonadIO m) =>
                            a -> TableModelChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTableModelChanged obj cb after = liftIO $ do
    cb' <- mkTableModelChangedCallback (tableModelChangedCallbackWrapper cb)
    connectSignalFunPtr obj "model-changed" cb' after

-- signal Table::row-deleted
type TableRowDeletedCallback =
    Int32 ->
    Int32 ->
    IO ()

noTableRowDeletedCallback :: Maybe TableRowDeletedCallback
noTableRowDeletedCallback = Nothing

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

foreign import ccall "wrapper"
    mkTableRowDeletedCallback :: TableRowDeletedCallbackC -> IO (FunPtr TableRowDeletedCallbackC)

tableRowDeletedClosure :: TableRowDeletedCallback -> IO Closure
tableRowDeletedClosure cb = newCClosure =<< mkTableRowDeletedCallback wrapped
    where wrapped = tableRowDeletedCallbackWrapper cb

tableRowDeletedCallbackWrapper ::
    TableRowDeletedCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO ()
tableRowDeletedCallbackWrapper _cb _ arg1 arg2 _ = do
    _cb  arg1 arg2

onTableRowDeleted :: (GObject a, MonadIO m) => a -> TableRowDeletedCallback -> m SignalHandlerId
onTableRowDeleted obj cb = liftIO $ connectTableRowDeleted obj cb SignalConnectBefore
afterTableRowDeleted :: (GObject a, MonadIO m) => a -> TableRowDeletedCallback -> m SignalHandlerId
afterTableRowDeleted obj cb = connectTableRowDeleted obj cb SignalConnectAfter

connectTableRowDeleted :: (GObject a, MonadIO m) =>
                          a -> TableRowDeletedCallback -> SignalConnectMode -> m SignalHandlerId
connectTableRowDeleted obj cb after = liftIO $ do
    cb' <- mkTableRowDeletedCallback (tableRowDeletedCallbackWrapper cb)
    connectSignalFunPtr obj "row-deleted" cb' after

-- signal Table::row-inserted
type TableRowInsertedCallback =
    Int32 ->
    Int32 ->
    IO ()

noTableRowInsertedCallback :: Maybe TableRowInsertedCallback
noTableRowInsertedCallback = Nothing

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

foreign import ccall "wrapper"
    mkTableRowInsertedCallback :: TableRowInsertedCallbackC -> IO (FunPtr TableRowInsertedCallbackC)

tableRowInsertedClosure :: TableRowInsertedCallback -> IO Closure
tableRowInsertedClosure cb = newCClosure =<< mkTableRowInsertedCallback wrapped
    where wrapped = tableRowInsertedCallbackWrapper cb

tableRowInsertedCallbackWrapper ::
    TableRowInsertedCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO ()
tableRowInsertedCallbackWrapper _cb _ arg1 arg2 _ = do
    _cb  arg1 arg2

onTableRowInserted :: (GObject a, MonadIO m) => a -> TableRowInsertedCallback -> m SignalHandlerId
onTableRowInserted obj cb = liftIO $ connectTableRowInserted obj cb SignalConnectBefore
afterTableRowInserted :: (GObject a, MonadIO m) => a -> TableRowInsertedCallback -> m SignalHandlerId
afterTableRowInserted obj cb = connectTableRowInserted obj cb SignalConnectAfter

connectTableRowInserted :: (GObject a, MonadIO m) =>
                           a -> TableRowInsertedCallback -> SignalConnectMode -> m SignalHandlerId
connectTableRowInserted obj cb after = liftIO $ do
    cb' <- mkTableRowInsertedCallback (tableRowInsertedCallbackWrapper cb)
    connectSignalFunPtr obj "row-inserted" cb' after

-- signal Table::row-reordered
type TableRowReorderedCallback =
    IO ()

noTableRowReorderedCallback :: Maybe TableRowReorderedCallback
noTableRowReorderedCallback = Nothing

type TableRowReorderedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTableRowReorderedCallback :: TableRowReorderedCallbackC -> IO (FunPtr TableRowReorderedCallbackC)

tableRowReorderedClosure :: TableRowReorderedCallback -> IO Closure
tableRowReorderedClosure cb = newCClosure =<< mkTableRowReorderedCallback wrapped
    where wrapped = tableRowReorderedCallbackWrapper cb

tableRowReorderedCallbackWrapper ::
    TableRowReorderedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
tableRowReorderedCallbackWrapper _cb _ _ = do
    _cb 

onTableRowReordered :: (GObject a, MonadIO m) => a -> TableRowReorderedCallback -> m SignalHandlerId
onTableRowReordered obj cb = liftIO $ connectTableRowReordered obj cb SignalConnectBefore
afterTableRowReordered :: (GObject a, MonadIO m) => a -> TableRowReorderedCallback -> m SignalHandlerId
afterTableRowReordered obj cb = connectTableRowReordered obj cb SignalConnectAfter

connectTableRowReordered :: (GObject a, MonadIO m) =>
                            a -> TableRowReorderedCallback -> SignalConnectMode -> m SignalHandlerId
connectTableRowReordered obj cb after = liftIO $ do
    cb' <- mkTableRowReorderedCallback (tableRowReorderedCallbackWrapper cb)
    connectSignalFunPtr obj "row-reordered" cb' after

-- interface TableCell 

newtype TableCell = TableCell (ForeignPtr TableCell)
noTableCell :: Maybe TableCell
noTableCell = Nothing

foreign import ccall "atk_table_cell_get_type"
    c_atk_table_cell_get_type :: IO GType

type instance ParentTypes TableCell = '[Object, GObject.Object]

instance GObject TableCell where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_table_cell_get_type
    

class GObject o => TableCellK o
instance (GObject o, IsDescendantOf TableCell o) => TableCellK o

toTableCell :: TableCellK o => o -> IO TableCell
toTableCell = unsafeCastTo TableCell

-- method TableCell::get_column_header_cells
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "TableCell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "TableCell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TPtrArray (TInterface "Atk" "Object")
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_cell_get_column_header_cells" atk_table_cell_get_column_header_cells :: 
    Ptr TableCell ->                        -- _obj : TInterface "Atk" "TableCell"
    IO (Ptr (GPtrArray (Ptr Object)))


tableCellGetColumnHeaderCells ::
    (MonadIO m, TableCellK a) =>
    a ->                                    -- _obj
    m [Object]
tableCellGetColumnHeaderCells _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_cell_get_column_header_cells _obj'
    result' <- unpackGPtrArray result
    result'' <- mapM (wrapObject Object) result'
    unrefPtrArray result
    touchManagedPtr _obj
    return result''

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

foreign import ccall "atk_table_cell_get_column_span" atk_table_cell_get_column_span :: 
    Ptr TableCell ->                        -- _obj : TInterface "Atk" "TableCell"
    IO Int32


tableCellGetColumnSpan ::
    (MonadIO m, TableCellK a) =>
    a ->                                    -- _obj
    m Int32
tableCellGetColumnSpan _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_cell_get_column_span _obj'
    touchManagedPtr _obj
    return result

-- method TableCell::get_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "TableCell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "TableCell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_cell_get_position" atk_table_cell_get_position :: 
    Ptr TableCell ->                        -- _obj : TInterface "Atk" "TableCell"
    Ptr Int32 ->                            -- row : TBasicType TInt32
    Ptr Int32 ->                            -- column : TBasicType TInt32
    IO CInt


tableCellGetPosition ::
    (MonadIO m, TableCellK a) =>
    a ->                                    -- _obj
    m (Bool,Int32,Int32)
tableCellGetPosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    row <- allocMem :: IO (Ptr Int32)
    column <- allocMem :: IO (Ptr Int32)
    result <- atk_table_cell_get_position _obj' row column
    let result' = (/= 0) result
    row' <- peek row
    column' <- peek column
    touchManagedPtr _obj
    freeMem row
    freeMem column
    return (result', row', column')

-- method TableCell::get_row_column_span
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "TableCell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "row", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "row_span", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "column_span", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "TableCell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_cell_get_row_column_span" atk_table_cell_get_row_column_span :: 
    Ptr TableCell ->                        -- _obj : TInterface "Atk" "TableCell"
    Ptr Int32 ->                            -- row : TBasicType TInt32
    Ptr Int32 ->                            -- column : TBasicType TInt32
    Ptr Int32 ->                            -- row_span : TBasicType TInt32
    Ptr Int32 ->                            -- column_span : TBasicType TInt32
    IO CInt


tableCellGetRowColumnSpan ::
    (MonadIO m, TableCellK a) =>
    a ->                                    -- _obj
    m (Bool,Int32,Int32,Int32,Int32)
tableCellGetRowColumnSpan _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    row <- allocMem :: IO (Ptr Int32)
    column <- allocMem :: IO (Ptr Int32)
    row_span <- allocMem :: IO (Ptr Int32)
    column_span <- allocMem :: IO (Ptr Int32)
    result <- atk_table_cell_get_row_column_span _obj' row column row_span column_span
    let result' = (/= 0) result
    row' <- peek row
    column' <- peek column
    row_span' <- peek row_span
    column_span' <- peek column_span
    touchManagedPtr _obj
    freeMem row
    freeMem column
    freeMem row_span
    freeMem column_span
    return (result', row', column', row_span', column_span')

-- method TableCell::get_row_header_cells
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "TableCell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "TableCell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TPtrArray (TInterface "Atk" "Object")
-- throws : False
-- Skip return : False

foreign import ccall "atk_table_cell_get_row_header_cells" atk_table_cell_get_row_header_cells :: 
    Ptr TableCell ->                        -- _obj : TInterface "Atk" "TableCell"
    IO (Ptr (GPtrArray (Ptr Object)))


tableCellGetRowHeaderCells ::
    (MonadIO m, TableCellK a) =>
    a ->                                    -- _obj
    m [Object]
tableCellGetRowHeaderCells _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_cell_get_row_header_cells _obj'
    result' <- unpackGPtrArray result
    result'' <- mapM (wrapObject Object) result'
    unrefPtrArray result
    touchManagedPtr _obj
    return result''

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

foreign import ccall "atk_table_cell_get_row_span" atk_table_cell_get_row_span :: 
    Ptr TableCell ->                        -- _obj : TInterface "Atk" "TableCell"
    IO Int32


tableCellGetRowSpan ::
    (MonadIO m, TableCellK a) =>
    a ->                                    -- _obj
    m Int32
tableCellGetRowSpan _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_cell_get_row_span _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "atk_table_cell_get_table" atk_table_cell_get_table :: 
    Ptr TableCell ->                        -- _obj : TInterface "Atk" "TableCell"
    IO (Ptr Object)


tableCellGetTable ::
    (MonadIO m, TableCellK a) =>
    a ->                                    -- _obj
    m Object
tableCellGetTable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_table_cell_get_table _obj'
    result' <- (wrapObject Object) result
    touchManagedPtr _obj
    return result'

-- interface Text 

newtype Text = Text (ForeignPtr Text)
noText :: Maybe Text
noText = Nothing

class ForeignPtrNewtype a => TextK a
instance (ForeignPtrNewtype o, IsDescendantOf Text o) => TextK o
type instance ParentTypes Text = '[]

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

foreign import ccall "atk_text_add_selection" atk_text_add_selection :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- start_offset : TBasicType TInt32
    Int32 ->                                -- end_offset : TBasicType TInt32
    IO CInt


textAddSelection ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_offset
    Int32 ->                                -- end_offset
    m Bool
textAddSelection _obj start_offset end_offset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_text_add_selection _obj' start_offset end_offset
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Text::get_bounded_ranges
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Atk" "TextRectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x_clip_type", argType = TInterface "Atk" "TextClipType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y_clip_type", argType = TInterface "Atk" "TextClipType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Atk" "TextRectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x_clip_type", argType = TInterface "Atk" "TextClipType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y_clip_type", argType = TInterface "Atk" "TextClipType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TInterface "Atk" "TextRange")
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_bounded_ranges" atk_text_get_bounded_ranges :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Ptr TextRectangle ->                    -- rect : TInterface "Atk" "TextRectangle"
    CUInt ->                                -- coord_type : TInterface "Atk" "CoordType"
    CUInt ->                                -- x_clip_type : TInterface "Atk" "TextClipType"
    CUInt ->                                -- y_clip_type : TInterface "Atk" "TextClipType"
    IO (Ptr (Ptr TextRange))


textGetBoundedRanges ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    TextRectangle ->                        -- rect
    CoordType ->                            -- coord_type
    TextClipType ->                         -- x_clip_type
    TextClipType ->                         -- y_clip_type
    m [TextRange]
textGetBoundedRanges _obj rect coord_type x_clip_type y_clip_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let rect' = unsafeManagedPtrGetPtr rect
    let coord_type' = (fromIntegral . fromEnum) coord_type
    let x_clip_type' = (fromIntegral . fromEnum) x_clip_type
    let y_clip_type' = (fromIntegral . fromEnum) y_clip_type
    result <- atk_text_get_bounded_ranges _obj' rect' coord_type' x_clip_type' y_clip_type'
    result' <- unpackZeroTerminatedPtrArray result
    result'' <- mapM (wrapBoxed TextRange) result'
    freeMem result
    touchManagedPtr _obj
    touchManagedPtr rect
    return result''

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

foreign import ccall "atk_text_get_caret_offset" atk_text_get_caret_offset :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    IO Int32


textGetCaretOffset ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    m Int32
textGetCaretOffset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_text_get_caret_offset _obj'
    touchManagedPtr _obj
    return result

-- method Text::get_character_at_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUniChar
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_character_at_offset" atk_text_get_character_at_offset :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- offset : TBasicType TInt32
    IO CInt


textGetCharacterAtOffset ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- offset
    m Char
textGetCharacterAtOffset _obj offset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_text_get_character_at_offset _obj' offset
    let result' = (chr . fromIntegral) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_text_get_character_count" atk_text_get_character_count :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    IO Int32


textGetCharacterCount ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    m Int32
textGetCharacterCount _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_text_get_character_count _obj'
    touchManagedPtr _obj
    return result

-- method Text::get_character_extents
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coords", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coords", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_character_extents" atk_text_get_character_extents :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- offset : TBasicType TInt32
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    Int32 ->                                -- width : TBasicType TInt32
    Int32 ->                                -- height : TBasicType TInt32
    CUInt ->                                -- coords : TInterface "Atk" "CoordType"
    IO ()


textGetCharacterExtents ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- offset
    Int32 ->                                -- x
    Int32 ->                                -- y
    Int32 ->                                -- width
    Int32 ->                                -- height
    CoordType ->                            -- coords
    m ()
textGetCharacterExtents _obj offset x y width height coords = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let coords' = (fromIntegral . fromEnum) coords
    atk_text_get_character_extents _obj' offset x y width height coords'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "atk_text_get_default_attributes" atk_text_get_default_attributes :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    IO (Ptr (GSList (Ptr ())))


textGetDefaultAttributes ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    m [Ptr ()]
textGetDefaultAttributes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_text_get_default_attributes _obj'
    result' <- unpackGSList result
    g_slist_free result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_text_get_n_selections" atk_text_get_n_selections :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    IO Int32


textGetNSelections ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    m Int32
textGetNSelections _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_text_get_n_selections _obj'
    touchManagedPtr _obj
    return result

-- method Text::get_offset_at_point
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coords", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coords", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_offset_at_point" atk_text_get_offset_at_point :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- x : TBasicType TInt32
    Int32 ->                                -- y : TBasicType TInt32
    CUInt ->                                -- coords : TInterface "Atk" "CoordType"
    IO Int32


textGetOffsetAtPoint ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- x
    Int32 ->                                -- y
    CoordType ->                            -- coords
    m Int32
textGetOffsetAtPoint _obj x y coords = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let coords' = (fromIntegral . fromEnum) coords
    result <- atk_text_get_offset_at_point _obj' x y coords'
    touchManagedPtr _obj
    return result

-- method Text::get_range_extents
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Atk" "TextRectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "coord_type", argType = TInterface "Atk" "CoordType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "Atk" "TextRectangle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_range_extents" atk_text_get_range_extents :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- start_offset : TBasicType TInt32
    Int32 ->                                -- end_offset : TBasicType TInt32
    CUInt ->                                -- coord_type : TInterface "Atk" "CoordType"
    Ptr TextRectangle ->                    -- rect : TInterface "Atk" "TextRectangle"
    IO ()


textGetRangeExtents ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_offset
    Int32 ->                                -- end_offset
    CoordType ->                            -- coord_type
    TextRectangle ->                        -- rect
    m ()
textGetRangeExtents _obj start_offset end_offset coord_type rect = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let coord_type' = (fromIntegral . fromEnum) coord_type
    let rect' = unsafeManagedPtrGetPtr rect
    atk_text_get_range_extents _obj' start_offset end_offset coord_type' rect'
    touchManagedPtr _obj
    touchManagedPtr rect
    return ()

-- method Text::get_run_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TBasicType TVoid)
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_run_attributes" atk_text_get_run_attributes :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- offset : TBasicType TInt32
    Ptr Int32 ->                            -- start_offset : TBasicType TInt32
    Ptr Int32 ->                            -- end_offset : TBasicType TInt32
    IO (Ptr (GSList (Ptr ())))


textGetRunAttributes ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- offset
    m ([Ptr ()],Int32,Int32)
textGetRunAttributes _obj offset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    start_offset <- allocMem :: IO (Ptr Int32)
    end_offset <- allocMem :: IO (Ptr Int32)
    result <- atk_text_get_run_attributes _obj' offset start_offset end_offset
    result' <- unpackGSList result
    g_slist_free result
    start_offset' <- peek start_offset
    end_offset' <- peek end_offset
    touchManagedPtr _obj
    freeMem start_offset
    freeMem end_offset
    return (result', start_offset', end_offset')

-- method Text::get_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_selection" atk_text_get_selection :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- selection_num : TBasicType TInt32
    Ptr Int32 ->                            -- start_offset : TBasicType TInt32
    Ptr Int32 ->                            -- end_offset : TBasicType TInt32
    IO CString


textGetSelection ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- selection_num
    m (T.Text,Int32,Int32)
textGetSelection _obj selection_num = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    start_offset <- allocMem :: IO (Ptr Int32)
    end_offset <- allocMem :: IO (Ptr Int32)
    result <- atk_text_get_selection _obj' selection_num start_offset end_offset
    result' <- cstringToText result
    freeMem result
    start_offset' <- peek start_offset
    end_offset' <- peek end_offset
    touchManagedPtr _obj
    freeMem start_offset
    freeMem end_offset
    return (result', start_offset', end_offset')

-- method Text::get_string_at_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "granularity", argType = TInterface "Atk" "TextGranularity", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "granularity", argType = TInterface "Atk" "TextGranularity", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_string_at_offset" atk_text_get_string_at_offset :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- offset : TBasicType TInt32
    CUInt ->                                -- granularity : TInterface "Atk" "TextGranularity"
    Ptr Int32 ->                            -- start_offset : TBasicType TInt32
    Ptr Int32 ->                            -- end_offset : TBasicType TInt32
    IO CString


textGetStringAtOffset ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- offset
    TextGranularity ->                      -- granularity
    m (T.Text,Int32,Int32)
textGetStringAtOffset _obj offset granularity = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let granularity' = (fromIntegral . fromEnum) granularity
    start_offset <- allocMem :: IO (Ptr Int32)
    end_offset <- allocMem :: IO (Ptr Int32)
    result <- atk_text_get_string_at_offset _obj' offset granularity' start_offset end_offset
    result' <- cstringToText result
    freeMem result
    start_offset' <- peek start_offset
    end_offset' <- peek end_offset
    touchManagedPtr _obj
    freeMem start_offset
    freeMem end_offset
    return (result', start_offset', end_offset')

-- method Text::get_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_text" atk_text_get_text :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- start_offset : TBasicType TInt32
    Int32 ->                                -- end_offset : TBasicType TInt32
    IO CString


textGetText ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- start_offset
    Int32 ->                                -- end_offset
    m T.Text
textGetText _obj start_offset end_offset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_text_get_text _obj' start_offset end_offset
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    return result'

-- method Text::get_text_after_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "boundary_type", argType = TInterface "Atk" "TextBoundary", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "boundary_type", argType = TInterface "Atk" "TextBoundary", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_text_after_offset" atk_text_get_text_after_offset :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- offset : TBasicType TInt32
    CUInt ->                                -- boundary_type : TInterface "Atk" "TextBoundary"
    Ptr Int32 ->                            -- start_offset : TBasicType TInt32
    Ptr Int32 ->                            -- end_offset : TBasicType TInt32
    IO CString

{-# DEPRECATED textGetTextAfterOffset ["(Since version 2.9.3)","Please use atk_text_get_string_at_offset() instead."]#-}
textGetTextAfterOffset ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- offset
    TextBoundary ->                         -- boundary_type
    m (T.Text,Int32,Int32)
textGetTextAfterOffset _obj offset boundary_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let boundary_type' = (fromIntegral . fromEnum) boundary_type
    start_offset <- allocMem :: IO (Ptr Int32)
    end_offset <- allocMem :: IO (Ptr Int32)
    result <- atk_text_get_text_after_offset _obj' offset boundary_type' start_offset end_offset
    result' <- cstringToText result
    freeMem result
    start_offset' <- peek start_offset
    end_offset' <- peek end_offset
    touchManagedPtr _obj
    freeMem start_offset
    freeMem end_offset
    return (result', start_offset', end_offset')

-- method Text::get_text_at_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "boundary_type", argType = TInterface "Atk" "TextBoundary", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "boundary_type", argType = TInterface "Atk" "TextBoundary", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_text_at_offset" atk_text_get_text_at_offset :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- offset : TBasicType TInt32
    CUInt ->                                -- boundary_type : TInterface "Atk" "TextBoundary"
    Ptr Int32 ->                            -- start_offset : TBasicType TInt32
    Ptr Int32 ->                            -- end_offset : TBasicType TInt32
    IO CString

{-# DEPRECATED textGetTextAtOffset ["This method is deprecated since ATK version","2.9.4. Please use atk_text_get_string_at_offset() instead."]#-}
textGetTextAtOffset ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- offset
    TextBoundary ->                         -- boundary_type
    m (T.Text,Int32,Int32)
textGetTextAtOffset _obj offset boundary_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let boundary_type' = (fromIntegral . fromEnum) boundary_type
    start_offset <- allocMem :: IO (Ptr Int32)
    end_offset <- allocMem :: IO (Ptr Int32)
    result <- atk_text_get_text_at_offset _obj' offset boundary_type' start_offset end_offset
    result' <- cstringToText result
    freeMem result
    start_offset' <- peek start_offset
    end_offset' <- peek end_offset
    touchManagedPtr _obj
    freeMem start_offset
    freeMem end_offset
    return (result', start_offset', end_offset')

-- method Text::get_text_before_offset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "boundary_type", argType = TInterface "Atk" "TextBoundary", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "boundary_type", argType = TInterface "Atk" "TextBoundary", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_get_text_before_offset" atk_text_get_text_before_offset :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- offset : TBasicType TInt32
    CUInt ->                                -- boundary_type : TInterface "Atk" "TextBoundary"
    Ptr Int32 ->                            -- start_offset : TBasicType TInt32
    Ptr Int32 ->                            -- end_offset : TBasicType TInt32
    IO CString

{-# DEPRECATED textGetTextBeforeOffset ["(Since version 2.9.3)","Please use atk_text_get_string_at_offset() instead."]#-}
textGetTextBeforeOffset ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- offset
    TextBoundary ->                         -- boundary_type
    m (T.Text,Int32,Int32)
textGetTextBeforeOffset _obj offset boundary_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let boundary_type' = (fromIntegral . fromEnum) boundary_type
    start_offset <- allocMem :: IO (Ptr Int32)
    end_offset <- allocMem :: IO (Ptr Int32)
    result <- atk_text_get_text_before_offset _obj' offset boundary_type' start_offset end_offset
    result' <- cstringToText result
    freeMem result
    start_offset' <- peek start_offset
    end_offset' <- peek end_offset
    touchManagedPtr _obj
    freeMem start_offset
    freeMem end_offset
    return (result', start_offset', end_offset')

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

foreign import ccall "atk_text_remove_selection" atk_text_remove_selection :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- selection_num : TBasicType TInt32
    IO CInt


textRemoveSelection ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- selection_num
    m Bool
textRemoveSelection _obj selection_num = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_text_remove_selection _obj' selection_num
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_text_set_caret_offset" atk_text_set_caret_offset :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- offset : TBasicType TInt32
    IO CInt


textSetCaretOffset ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- offset
    m Bool
textSetCaretOffset _obj offset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_text_set_caret_offset _obj' offset
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Text::set_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Text", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_num", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "start_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "end_offset", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_set_selection" atk_text_set_selection :: 
    Ptr Text ->                             -- _obj : TInterface "Atk" "Text"
    Int32 ->                                -- selection_num : TBasicType TInt32
    Int32 ->                                -- start_offset : TBasicType TInt32
    Int32 ->                                -- end_offset : TBasicType TInt32
    IO CInt


textSetSelection ::
    (MonadIO m, TextK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- selection_num
    Int32 ->                                -- start_offset
    Int32 ->                                -- end_offset
    m Bool
textSetSelection _obj selection_num start_offset end_offset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_text_set_selection _obj' selection_num start_offset end_offset
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- signal Text::text-attributes-changed
type TextTextAttributesChangedCallback =
    IO ()

noTextTextAttributesChangedCallback :: Maybe TextTextAttributesChangedCallback
noTextTextAttributesChangedCallback = Nothing

type TextTextAttributesChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextTextAttributesChangedCallback :: TextTextAttributesChangedCallbackC -> IO (FunPtr TextTextAttributesChangedCallbackC)

textTextAttributesChangedClosure :: TextTextAttributesChangedCallback -> IO Closure
textTextAttributesChangedClosure cb = newCClosure =<< mkTextTextAttributesChangedCallback wrapped
    where wrapped = textTextAttributesChangedCallbackWrapper cb

textTextAttributesChangedCallbackWrapper ::
    TextTextAttributesChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textTextAttributesChangedCallbackWrapper _cb _ _ = do
    _cb 

onTextTextAttributesChanged :: (GObject a, MonadIO m) => a -> TextTextAttributesChangedCallback -> m SignalHandlerId
onTextTextAttributesChanged obj cb = liftIO $ connectTextTextAttributesChanged obj cb SignalConnectBefore
afterTextTextAttributesChanged :: (GObject a, MonadIO m) => a -> TextTextAttributesChangedCallback -> m SignalHandlerId
afterTextTextAttributesChanged obj cb = connectTextTextAttributesChanged obj cb SignalConnectAfter

connectTextTextAttributesChanged :: (GObject a, MonadIO m) =>
                                    a -> TextTextAttributesChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextTextAttributesChanged obj cb after = liftIO $ do
    cb' <- mkTextTextAttributesChangedCallback (textTextAttributesChangedCallbackWrapper cb)
    connectSignalFunPtr obj "text-attributes-changed" cb' after

-- signal Text::text-caret-moved
type TextTextCaretMovedCallback =
    Int32 ->
    IO ()

noTextTextCaretMovedCallback :: Maybe TextTextCaretMovedCallback
noTextTextCaretMovedCallback = Nothing

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

foreign import ccall "wrapper"
    mkTextTextCaretMovedCallback :: TextTextCaretMovedCallbackC -> IO (FunPtr TextTextCaretMovedCallbackC)

textTextCaretMovedClosure :: TextTextCaretMovedCallback -> IO Closure
textTextCaretMovedClosure cb = newCClosure =<< mkTextTextCaretMovedCallback wrapped
    where wrapped = textTextCaretMovedCallbackWrapper cb

textTextCaretMovedCallbackWrapper ::
    TextTextCaretMovedCallback ->
    Ptr () ->
    Int32 ->
    Ptr () ->
    IO ()
textTextCaretMovedCallbackWrapper _cb _ arg1 _ = do
    _cb  arg1

onTextTextCaretMoved :: (GObject a, MonadIO m) => a -> TextTextCaretMovedCallback -> m SignalHandlerId
onTextTextCaretMoved obj cb = liftIO $ connectTextTextCaretMoved obj cb SignalConnectBefore
afterTextTextCaretMoved :: (GObject a, MonadIO m) => a -> TextTextCaretMovedCallback -> m SignalHandlerId
afterTextTextCaretMoved obj cb = connectTextTextCaretMoved obj cb SignalConnectAfter

connectTextTextCaretMoved :: (GObject a, MonadIO m) =>
                             a -> TextTextCaretMovedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextTextCaretMoved obj cb after = liftIO $ do
    cb' <- mkTextTextCaretMovedCallback (textTextCaretMovedCallbackWrapper cb)
    connectSignalFunPtr obj "text-caret-moved" cb' after

-- signal Text::text-changed
type TextTextChangedCallback =
    Int32 ->
    Int32 ->
    IO ()

noTextTextChangedCallback :: Maybe TextTextChangedCallback
noTextTextChangedCallback = Nothing

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

foreign import ccall "wrapper"
    mkTextTextChangedCallback :: TextTextChangedCallbackC -> IO (FunPtr TextTextChangedCallbackC)

textTextChangedClosure :: TextTextChangedCallback -> IO Closure
textTextChangedClosure cb = newCClosure =<< mkTextTextChangedCallback wrapped
    where wrapped = textTextChangedCallbackWrapper cb

textTextChangedCallbackWrapper ::
    TextTextChangedCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO ()
textTextChangedCallbackWrapper _cb _ arg1 arg2 _ = do
    _cb  arg1 arg2

onTextTextChanged :: (GObject a, MonadIO m) => a -> TextTextChangedCallback -> m SignalHandlerId
onTextTextChanged obj cb = liftIO $ connectTextTextChanged obj cb SignalConnectBefore
afterTextTextChanged :: (GObject a, MonadIO m) => a -> TextTextChangedCallback -> m SignalHandlerId
afterTextTextChanged obj cb = connectTextTextChanged obj cb SignalConnectAfter

connectTextTextChanged :: (GObject a, MonadIO m) =>
                          a -> TextTextChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextTextChanged obj cb after = liftIO $ do
    cb' <- mkTextTextChangedCallback (textTextChangedCallbackWrapper cb)
    connectSignalFunPtr obj "text-changed" cb' after

-- signal Text::text-insert
type TextTextInsertCallback =
    Int32 ->
    Int32 ->
    T.Text ->
    IO ()

noTextTextInsertCallback :: Maybe TextTextInsertCallback
noTextTextInsertCallback = Nothing

type TextTextInsertCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextTextInsertCallback :: TextTextInsertCallbackC -> IO (FunPtr TextTextInsertCallbackC)

textTextInsertClosure :: TextTextInsertCallback -> IO Closure
textTextInsertClosure cb = newCClosure =<< mkTextTextInsertCallback wrapped
    where wrapped = textTextInsertCallbackWrapper cb

textTextInsertCallbackWrapper ::
    TextTextInsertCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    CString ->
    Ptr () ->
    IO ()
textTextInsertCallbackWrapper _cb _ arg1 arg2 arg3 _ = do
    arg3' <- cstringToText arg3
    _cb  arg1 arg2 arg3'

onTextTextInsert :: (GObject a, MonadIO m) => a -> TextTextInsertCallback -> m SignalHandlerId
onTextTextInsert obj cb = liftIO $ connectTextTextInsert obj cb SignalConnectBefore
afterTextTextInsert :: (GObject a, MonadIO m) => a -> TextTextInsertCallback -> m SignalHandlerId
afterTextTextInsert obj cb = connectTextTextInsert obj cb SignalConnectAfter

connectTextTextInsert :: (GObject a, MonadIO m) =>
                         a -> TextTextInsertCallback -> SignalConnectMode -> m SignalHandlerId
connectTextTextInsert obj cb after = liftIO $ do
    cb' <- mkTextTextInsertCallback (textTextInsertCallbackWrapper cb)
    connectSignalFunPtr obj "text-insert" cb' after

-- signal Text::text-remove
type TextTextRemoveCallback =
    Int32 ->
    Int32 ->
    T.Text ->
    IO ()

noTextTextRemoveCallback :: Maybe TextTextRemoveCallback
noTextTextRemoveCallback = Nothing

type TextTextRemoveCallbackC =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextTextRemoveCallback :: TextTextRemoveCallbackC -> IO (FunPtr TextTextRemoveCallbackC)

textTextRemoveClosure :: TextTextRemoveCallback -> IO Closure
textTextRemoveClosure cb = newCClosure =<< mkTextTextRemoveCallback wrapped
    where wrapped = textTextRemoveCallbackWrapper cb

textTextRemoveCallbackWrapper ::
    TextTextRemoveCallback ->
    Ptr () ->
    Int32 ->
    Int32 ->
    CString ->
    Ptr () ->
    IO ()
textTextRemoveCallbackWrapper _cb _ arg1 arg2 arg3 _ = do
    arg3' <- cstringToText arg3
    _cb  arg1 arg2 arg3'

onTextTextRemove :: (GObject a, MonadIO m) => a -> TextTextRemoveCallback -> m SignalHandlerId
onTextTextRemove obj cb = liftIO $ connectTextTextRemove obj cb SignalConnectBefore
afterTextTextRemove :: (GObject a, MonadIO m) => a -> TextTextRemoveCallback -> m SignalHandlerId
afterTextTextRemove obj cb = connectTextTextRemove obj cb SignalConnectAfter

connectTextTextRemove :: (GObject a, MonadIO m) =>
                         a -> TextTextRemoveCallback -> SignalConnectMode -> m SignalHandlerId
connectTextTextRemove obj cb after = liftIO $ do
    cb' <- mkTextTextRemoveCallback (textTextRemoveCallbackWrapper cb)
    connectSignalFunPtr obj "text-remove" cb' after

-- signal Text::text-selection-changed
type TextTextSelectionChangedCallback =
    IO ()

noTextTextSelectionChangedCallback :: Maybe TextTextSelectionChangedCallback
noTextTextSelectionChangedCallback = Nothing

type TextTextSelectionChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkTextTextSelectionChangedCallback :: TextTextSelectionChangedCallbackC -> IO (FunPtr TextTextSelectionChangedCallbackC)

textTextSelectionChangedClosure :: TextTextSelectionChangedCallback -> IO Closure
textTextSelectionChangedClosure cb = newCClosure =<< mkTextTextSelectionChangedCallback wrapped
    where wrapped = textTextSelectionChangedCallbackWrapper cb

textTextSelectionChangedCallbackWrapper ::
    TextTextSelectionChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
textTextSelectionChangedCallbackWrapper _cb _ _ = do
    _cb 

onTextTextSelectionChanged :: (GObject a, MonadIO m) => a -> TextTextSelectionChangedCallback -> m SignalHandlerId
onTextTextSelectionChanged obj cb = liftIO $ connectTextTextSelectionChanged obj cb SignalConnectBefore
afterTextTextSelectionChanged :: (GObject a, MonadIO m) => a -> TextTextSelectionChangedCallback -> m SignalHandlerId
afterTextTextSelectionChanged obj cb = connectTextTextSelectionChanged obj cb SignalConnectAfter

connectTextTextSelectionChanged :: (GObject a, MonadIO m) =>
                                   a -> TextTextSelectionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectTextTextSelectionChanged obj cb after = liftIO $ do
    cb' <- mkTextTextSelectionChangedCallback (textTextSelectionChangedCallbackWrapper cb)
    connectSignalFunPtr obj "text-selection-changed" cb' after

-- Enum TextAttribute

data TextAttribute = 
      TextAttributeInvalid
    | TextAttributeLeftMargin
    | TextAttributeRightMargin
    | TextAttributeIndent
    | TextAttributeInvisible
    | TextAttributeEditable
    | TextAttributePixelsAboveLines
    | TextAttributePixelsBelowLines
    | TextAttributePixelsInsideWrap
    | TextAttributeBgFullHeight
    | TextAttributeRise
    | TextAttributeUnderline
    | TextAttributeStrikethrough
    | TextAttributeSize
    | TextAttributeScale
    | TextAttributeWeight
    | TextAttributeLanguage
    | TextAttributeFamilyName
    | TextAttributeBgColor
    | TextAttributeFgColor
    | TextAttributeBgStipple
    | TextAttributeFgStipple
    | TextAttributeWrapMode
    | TextAttributeDirection
    | TextAttributeJustification
    | TextAttributeStretch
    | TextAttributeVariant
    | TextAttributeStyle
    | TextAttributeLastDefined
    | AnotherTextAttribute Int
    deriving (Show, Eq)

instance Enum TextAttribute where
    fromEnum TextAttributeInvalid = 0
    fromEnum TextAttributeLeftMargin = 1
    fromEnum TextAttributeRightMargin = 2
    fromEnum TextAttributeIndent = 3
    fromEnum TextAttributeInvisible = 4
    fromEnum TextAttributeEditable = 5
    fromEnum TextAttributePixelsAboveLines = 6
    fromEnum TextAttributePixelsBelowLines = 7
    fromEnum TextAttributePixelsInsideWrap = 8
    fromEnum TextAttributeBgFullHeight = 9
    fromEnum TextAttributeRise = 10
    fromEnum TextAttributeUnderline = 11
    fromEnum TextAttributeStrikethrough = 12
    fromEnum TextAttributeSize = 13
    fromEnum TextAttributeScale = 14
    fromEnum TextAttributeWeight = 15
    fromEnum TextAttributeLanguage = 16
    fromEnum TextAttributeFamilyName = 17
    fromEnum TextAttributeBgColor = 18
    fromEnum TextAttributeFgColor = 19
    fromEnum TextAttributeBgStipple = 20
    fromEnum TextAttributeFgStipple = 21
    fromEnum TextAttributeWrapMode = 22
    fromEnum TextAttributeDirection = 23
    fromEnum TextAttributeJustification = 24
    fromEnum TextAttributeStretch = 25
    fromEnum TextAttributeVariant = 26
    fromEnum TextAttributeStyle = 27
    fromEnum TextAttributeLastDefined = 28
    fromEnum (AnotherTextAttribute k) = k

    toEnum 0 = TextAttributeInvalid
    toEnum 1 = TextAttributeLeftMargin
    toEnum 2 = TextAttributeRightMargin
    toEnum 3 = TextAttributeIndent
    toEnum 4 = TextAttributeInvisible
    toEnum 5 = TextAttributeEditable
    toEnum 6 = TextAttributePixelsAboveLines
    toEnum 7 = TextAttributePixelsBelowLines
    toEnum 8 = TextAttributePixelsInsideWrap
    toEnum 9 = TextAttributeBgFullHeight
    toEnum 10 = TextAttributeRise
    toEnum 11 = TextAttributeUnderline
    toEnum 12 = TextAttributeStrikethrough
    toEnum 13 = TextAttributeSize
    toEnum 14 = TextAttributeScale
    toEnum 15 = TextAttributeWeight
    toEnum 16 = TextAttributeLanguage
    toEnum 17 = TextAttributeFamilyName
    toEnum 18 = TextAttributeBgColor
    toEnum 19 = TextAttributeFgColor
    toEnum 20 = TextAttributeBgStipple
    toEnum 21 = TextAttributeFgStipple
    toEnum 22 = TextAttributeWrapMode
    toEnum 23 = TextAttributeDirection
    toEnum 24 = TextAttributeJustification
    toEnum 25 = TextAttributeStretch
    toEnum 26 = TextAttributeVariant
    toEnum 27 = TextAttributeStyle
    toEnum 28 = TextAttributeLastDefined
    toEnum k = AnotherTextAttribute k

foreign import ccall "atk_text_attribute_get_type" c_atk_text_attribute_get_type :: 
    IO GType

instance BoxedEnum TextAttribute where
    boxedEnumType _ = c_atk_text_attribute_get_type

-- Enum TextBoundary

data TextBoundary = 
      TextBoundaryChar
    | TextBoundaryWordStart
    | TextBoundaryWordEnd
    | TextBoundarySentenceStart
    | TextBoundarySentenceEnd
    | TextBoundaryLineStart
    | TextBoundaryLineEnd
    | AnotherTextBoundary Int
    deriving (Show, Eq)

instance Enum TextBoundary where
    fromEnum TextBoundaryChar = 0
    fromEnum TextBoundaryWordStart = 1
    fromEnum TextBoundaryWordEnd = 2
    fromEnum TextBoundarySentenceStart = 3
    fromEnum TextBoundarySentenceEnd = 4
    fromEnum TextBoundaryLineStart = 5
    fromEnum TextBoundaryLineEnd = 6
    fromEnum (AnotherTextBoundary k) = k

    toEnum 0 = TextBoundaryChar
    toEnum 1 = TextBoundaryWordStart
    toEnum 2 = TextBoundaryWordEnd
    toEnum 3 = TextBoundarySentenceStart
    toEnum 4 = TextBoundarySentenceEnd
    toEnum 5 = TextBoundaryLineStart
    toEnum 6 = TextBoundaryLineEnd
    toEnum k = AnotherTextBoundary k

foreign import ccall "atk_text_boundary_get_type" c_atk_text_boundary_get_type :: 
    IO GType

instance BoxedEnum TextBoundary where
    boxedEnumType _ = c_atk_text_boundary_get_type

-- Enum TextClipType

data TextClipType = 
      TextClipTypeNone
    | TextClipTypeMin
    | TextClipTypeMax
    | TextClipTypeBoth
    | AnotherTextClipType Int
    deriving (Show, Eq)

instance Enum TextClipType where
    fromEnum TextClipTypeNone = 0
    fromEnum TextClipTypeMin = 1
    fromEnum TextClipTypeMax = 2
    fromEnum TextClipTypeBoth = 3
    fromEnum (AnotherTextClipType k) = k

    toEnum 0 = TextClipTypeNone
    toEnum 1 = TextClipTypeMin
    toEnum 2 = TextClipTypeMax
    toEnum 3 = TextClipTypeBoth
    toEnum k = AnotherTextClipType k

foreign import ccall "atk_text_clip_type_get_type" c_atk_text_clip_type_get_type :: 
    IO GType

instance BoxedEnum TextClipType where
    boxedEnumType _ = c_atk_text_clip_type_get_type

-- Enum TextGranularity

data TextGranularity = 
      TextGranularityChar
    | TextGranularityWord
    | TextGranularitySentence
    | TextGranularityLine
    | TextGranularityParagraph
    | AnotherTextGranularity Int
    deriving (Show, Eq)

instance Enum TextGranularity where
    fromEnum TextGranularityChar = 0
    fromEnum TextGranularityWord = 1
    fromEnum TextGranularitySentence = 2
    fromEnum TextGranularityLine = 3
    fromEnum TextGranularityParagraph = 4
    fromEnum (AnotherTextGranularity k) = k

    toEnum 0 = TextGranularityChar
    toEnum 1 = TextGranularityWord
    toEnum 2 = TextGranularitySentence
    toEnum 3 = TextGranularityLine
    toEnum 4 = TextGranularityParagraph
    toEnum k = AnotherTextGranularity k

foreign import ccall "atk_text_granularity_get_type" c_atk_text_granularity_get_type :: 
    IO GType

instance BoxedEnum TextGranularity where
    boxedEnumType _ = c_atk_text_granularity_get_type

-- struct TextRange
newtype TextRange = TextRange (ForeignPtr TextRange)
noTextRange :: Maybe TextRange
noTextRange = Nothing

foreign import ccall "atk_text_range_get_type" c_atk_text_range_get_type :: 
    IO GType

instance BoxedObject TextRange where
    boxedType _ = c_atk_text_range_get_type

textRangeReadBounds :: TextRange -> IO TextRectangle
textRangeReadBounds s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO (Ptr TextRectangle)
    val' <- (newPtr 16 TextRectangle) val
    return val'

textRangeReadStartOffset :: TextRange -> IO Int32
textRangeReadStartOffset s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO Int32
    return val

textRangeReadEndOffset :: TextRange -> IO Int32
textRangeReadEndOffset s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 20) :: IO Int32
    return val

textRangeReadContent :: TextRange -> IO T.Text
textRangeReadContent s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO CString
    val' <- cstringToText val
    return val'

-- struct TextRectangle
newtype TextRectangle = TextRectangle (ForeignPtr TextRectangle)
noTextRectangle :: Maybe TextRectangle
noTextRectangle = Nothing

textRectangleReadX :: TextRectangle -> IO Int32
textRectangleReadX s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO Int32
    return val

textRectangleReadY :: TextRectangle -> IO Int32
textRectangleReadY s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 4) :: IO Int32
    return val

textRectangleReadWidth :: TextRectangle -> IO Int32
textRectangleReadWidth s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO Int32
    return val

textRectangleReadHeight :: TextRectangle -> IO Int32
textRectangleReadHeight s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 12) :: IO Int32
    return val

-- object Util 
newtype Util = Util (ForeignPtr Util)
noUtil :: Maybe Util
noUtil = Nothing

foreign import ccall "atk_util_get_type"
    c_atk_util_get_type :: IO GType

type instance ParentTypes Util = '[GObject.Object]

instance GObject Util where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_util_get_type
    

class GObject o => UtilK o
instance (GObject o, IsDescendantOf Util o) => UtilK o

toUtil :: UtilK o => o -> IO Util
toUtil = unsafeCastTo Util

-- interface Value 

newtype Value = Value (ForeignPtr Value)
noValue :: Maybe Value
noValue = Nothing

class ForeignPtrNewtype a => ValueK a
instance (ForeignPtrNewtype o, IsDescendantOf Value o) => ValueK o
type instance ParentTypes Value = '[]

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

foreign import ccall "atk_value_get_current_value" atk_value_get_current_value :: 
    Ptr Value ->                            -- _obj : TInterface "Atk" "Value"
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()

{-# DEPRECATED valueGetCurrentValue ["Since 2.12. Use atk_value_get_value_and_text()","instead."]#-}
valueGetCurrentValue ::
    (MonadIO m, ValueK a) =>
    a ->                                    -- _obj
    GValue ->                               -- value
    m ()
valueGetCurrentValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = unsafeManagedPtrGetPtr value
    atk_value_get_current_value _obj' value'
    touchManagedPtr _obj
    touchManagedPtr value
    return ()

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

foreign import ccall "atk_value_get_increment" atk_value_get_increment :: 
    Ptr Value ->                            -- _obj : TInterface "Atk" "Value"
    IO CDouble


valueGetIncrement ::
    (MonadIO m, ValueK a) =>
    a ->                                    -- _obj
    m Double
valueGetIncrement _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_value_get_increment _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "atk_value_get_maximum_value" atk_value_get_maximum_value :: 
    Ptr Value ->                            -- _obj : TInterface "Atk" "Value"
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()

{-# DEPRECATED valueGetMaximumValue ["Since 2.12. Use atk_value_get_range() instead."]#-}
valueGetMaximumValue ::
    (MonadIO m, ValueK a) =>
    a ->                                    -- _obj
    GValue ->                               -- value
    m ()
valueGetMaximumValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = unsafeManagedPtrGetPtr value
    atk_value_get_maximum_value _obj' value'
    touchManagedPtr _obj
    touchManagedPtr value
    return ()

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

foreign import ccall "atk_value_get_minimum_increment" atk_value_get_minimum_increment :: 
    Ptr Value ->                            -- _obj : TInterface "Atk" "Value"
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()

{-# DEPRECATED valueGetMinimumIncrement ["Since 2.12. Use atk_value_get_increment() instead."]#-}
valueGetMinimumIncrement ::
    (MonadIO m, ValueK a) =>
    a ->                                    -- _obj
    GValue ->                               -- value
    m ()
valueGetMinimumIncrement _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = unsafeManagedPtrGetPtr value
    atk_value_get_minimum_increment _obj' value'
    touchManagedPtr _obj
    touchManagedPtr value
    return ()

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

foreign import ccall "atk_value_get_minimum_value" atk_value_get_minimum_value :: 
    Ptr Value ->                            -- _obj : TInterface "Atk" "Value"
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO ()

{-# DEPRECATED valueGetMinimumValue ["Since 2.12. Use atk_value_get_range() instead."]#-}
valueGetMinimumValue ::
    (MonadIO m, ValueK a) =>
    a ->                                    -- _obj
    GValue ->                               -- value
    m ()
valueGetMinimumValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = unsafeManagedPtrGetPtr value
    atk_value_get_minimum_value _obj' value'
    touchManagedPtr _obj
    touchManagedPtr value
    return ()

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

foreign import ccall "atk_value_get_range" atk_value_get_range :: 
    Ptr Value ->                            -- _obj : TInterface "Atk" "Value"
    IO (Ptr Range)


valueGetRange ::
    (MonadIO m, ValueK a) =>
    a ->                                    -- _obj
    m Range
valueGetRange _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_value_get_range _obj'
    result' <- (wrapBoxed Range) result
    touchManagedPtr _obj
    return result'

-- method Value::get_sub_ranges
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGSList (TInterface "Atk" "Range")
-- throws : False
-- Skip return : False

foreign import ccall "atk_value_get_sub_ranges" atk_value_get_sub_ranges :: 
    Ptr Value ->                            -- _obj : TInterface "Atk" "Value"
    IO (Ptr (GSList (Ptr Range)))


valueGetSubRanges ::
    (MonadIO m, ValueK a) =>
    a ->                                    -- _obj
    m [Range]
valueGetSubRanges _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- atk_value_get_sub_ranges _obj'
    result' <- unpackGSList result
    result'' <- mapM (wrapBoxed Range) result'
    g_slist_free result
    touchManagedPtr _obj
    return result''

-- method Value::get_value_and_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Atk" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TDouble, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "text", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Atk" "Value", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_value_get_value_and_text" atk_value_get_value_and_text :: 
    Ptr Value ->                            -- _obj : TInterface "Atk" "Value"
    Ptr CDouble ->                          -- value : TBasicType TDouble
    Ptr CString ->                          -- text : TBasicType TUTF8
    IO ()


valueGetValueAndText ::
    (MonadIO m, ValueK a) =>
    a ->                                    -- _obj
    m (Double,T.Text)
valueGetValueAndText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    value <- allocMem :: IO (Ptr CDouble)
    text <- allocMem :: IO (Ptr CString)
    atk_value_get_value_and_text _obj' value text
    value' <- peek value
    let value'' = realToFrac value'
    text' <- peek text
    text'' <- cstringToText text'
    freeMem text'
    touchManagedPtr _obj
    freeMem value
    freeMem text
    return (value'', text'')

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

foreign import ccall "atk_value_set_current_value" atk_value_set_current_value :: 
    Ptr Value ->                            -- _obj : TInterface "Atk" "Value"
    Ptr GValue ->                           -- value : TInterface "GObject" "Value"
    IO CInt

{-# DEPRECATED valueSetCurrentValue ["Since 2.12. Use atk_value_set_value() instead."]#-}
valueSetCurrentValue ::
    (MonadIO m, ValueK a) =>
    a ->                                    -- _obj
    GValue ->                               -- value
    m Bool
valueSetCurrentValue _obj value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let value' = unsafeManagedPtrGetPtr value
    result <- atk_value_set_current_value _obj' value'
    let result' = (/= 0) result
    touchManagedPtr _obj
    touchManagedPtr value
    return result'

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

foreign import ccall "atk_value_set_value" atk_value_set_value :: 
    Ptr Value ->                            -- _obj : TInterface "Atk" "Value"
    CDouble ->                              -- new_value : TBasicType TDouble
    IO ()


valueSetValue ::
    (MonadIO m, ValueK a) =>
    a ->                                    -- _obj
    Double ->                               -- new_value
    m ()
valueSetValue _obj new_value = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let new_value' = realToFrac new_value
    atk_value_set_value _obj' new_value'
    touchManagedPtr _obj
    return ()

-- signal Value::value-changed
type ValueValueChangedCallback =
    Double ->
    T.Text ->
    IO ()

noValueValueChangedCallback :: Maybe ValueValueChangedCallback
noValueValueChangedCallback = Nothing

type ValueValueChangedCallbackC =
    Ptr () ->                               -- object
    CDouble ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkValueValueChangedCallback :: ValueValueChangedCallbackC -> IO (FunPtr ValueValueChangedCallbackC)

valueValueChangedClosure :: ValueValueChangedCallback -> IO Closure
valueValueChangedClosure cb = newCClosure =<< mkValueValueChangedCallback wrapped
    where wrapped = valueValueChangedCallbackWrapper cb

valueValueChangedCallbackWrapper ::
    ValueValueChangedCallback ->
    Ptr () ->
    CDouble ->
    CString ->
    Ptr () ->
    IO ()
valueValueChangedCallbackWrapper _cb _ value text _ = do
    let value' = realToFrac value
    text' <- cstringToText text
    _cb  value' text'

onValueValueChanged :: (GObject a, MonadIO m) => a -> ValueValueChangedCallback -> m SignalHandlerId
onValueValueChanged obj cb = liftIO $ connectValueValueChanged obj cb SignalConnectBefore
afterValueValueChanged :: (GObject a, MonadIO m) => a -> ValueValueChangedCallback -> m SignalHandlerId
afterValueValueChanged obj cb = connectValueValueChanged obj cb SignalConnectAfter

connectValueValueChanged :: (GObject a, MonadIO m) =>
                            a -> ValueValueChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectValueValueChanged obj cb after = liftIO $ do
    cb' <- mkValueValueChangedCallback (valueValueChangedCallbackWrapper cb)
    connectSignalFunPtr obj "value-changed" cb' after

-- Enum ValueType

data ValueType = 
      ValueTypeVeryWeak
    | ValueTypeWeak
    | ValueTypeAcceptable
    | ValueTypeStrong
    | ValueTypeVeryStrong
    | ValueTypeVeryLow
    | ValueTypeLow
    | ValueTypeMedium
    | ValueTypeHigh
    | ValueTypeVeryHigh
    | ValueTypeVeryBad
    | ValueTypeBad
    | ValueTypeGood
    | ValueTypeVeryGood
    | ValueTypeBest
    | ValueTypeLastDefined
    | AnotherValueType Int
    deriving (Show, Eq)

instance Enum ValueType where
    fromEnum ValueTypeVeryWeak = 0
    fromEnum ValueTypeWeak = 1
    fromEnum ValueTypeAcceptable = 2
    fromEnum ValueTypeStrong = 3
    fromEnum ValueTypeVeryStrong = 4
    fromEnum ValueTypeVeryLow = 5
    fromEnum ValueTypeLow = 6
    fromEnum ValueTypeMedium = 7
    fromEnum ValueTypeHigh = 8
    fromEnum ValueTypeVeryHigh = 9
    fromEnum ValueTypeVeryBad = 10
    fromEnum ValueTypeBad = 11
    fromEnum ValueTypeGood = 12
    fromEnum ValueTypeVeryGood = 13
    fromEnum ValueTypeBest = 14
    fromEnum ValueTypeLastDefined = 15
    fromEnum (AnotherValueType k) = k

    toEnum 0 = ValueTypeVeryWeak
    toEnum 1 = ValueTypeWeak
    toEnum 2 = ValueTypeAcceptable
    toEnum 3 = ValueTypeStrong
    toEnum 4 = ValueTypeVeryStrong
    toEnum 5 = ValueTypeVeryLow
    toEnum 6 = ValueTypeLow
    toEnum 7 = ValueTypeMedium
    toEnum 8 = ValueTypeHigh
    toEnum 9 = ValueTypeVeryHigh
    toEnum 10 = ValueTypeVeryBad
    toEnum 11 = ValueTypeBad
    toEnum 12 = ValueTypeGood
    toEnum 13 = ValueTypeVeryGood
    toEnum 14 = ValueTypeBest
    toEnum 15 = ValueTypeLastDefined
    toEnum k = AnotherValueType k

foreign import ccall "atk_value_type_get_type" c_atk_value_type_get_type :: 
    IO GType

instance BoxedEnum ValueType where
    boxedEnumType _ = c_atk_value_type_get_type

-- interface Window 

newtype Window = Window (ForeignPtr Window)
noWindow :: Maybe Window
noWindow = Nothing

foreign import ccall "atk_window_get_type"
    c_atk_window_get_type :: IO GType

type instance ParentTypes Window = '[Object, GObject.Object]

instance GObject Window where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_atk_window_get_type
    

class GObject o => WindowK o
instance (GObject o, IsDescendantOf Window o) => WindowK o

toWindow :: WindowK o => o -> IO Window
toWindow = unsafeCastTo Window

-- signal Window::activate
type WindowActivateCallback =
    IO ()

noWindowActivateCallback :: Maybe WindowActivateCallback
noWindowActivateCallback = Nothing

type WindowActivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowActivateCallback :: WindowActivateCallbackC -> IO (FunPtr WindowActivateCallbackC)

windowActivateClosure :: WindowActivateCallback -> IO Closure
windowActivateClosure cb = newCClosure =<< mkWindowActivateCallback wrapped
    where wrapped = windowActivateCallbackWrapper cb

windowActivateCallbackWrapper ::
    WindowActivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowActivateCallbackWrapper _cb _ _ = do
    _cb 

onWindowActivate :: (GObject a, MonadIO m) => a -> WindowActivateCallback -> m SignalHandlerId
onWindowActivate obj cb = liftIO $ connectWindowActivate obj cb SignalConnectBefore
afterWindowActivate :: (GObject a, MonadIO m) => a -> WindowActivateCallback -> m SignalHandlerId
afterWindowActivate obj cb = connectWindowActivate obj cb SignalConnectAfter

connectWindowActivate :: (GObject a, MonadIO m) =>
                         a -> WindowActivateCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowActivate obj cb after = liftIO $ do
    cb' <- mkWindowActivateCallback (windowActivateCallbackWrapper cb)
    connectSignalFunPtr obj "activate" cb' after

-- signal Window::create
type WindowCreateCallback =
    IO ()

noWindowCreateCallback :: Maybe WindowCreateCallback
noWindowCreateCallback = Nothing

type WindowCreateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowCreateCallback :: WindowCreateCallbackC -> IO (FunPtr WindowCreateCallbackC)

windowCreateClosure :: WindowCreateCallback -> IO Closure
windowCreateClosure cb = newCClosure =<< mkWindowCreateCallback wrapped
    where wrapped = windowCreateCallbackWrapper cb

windowCreateCallbackWrapper ::
    WindowCreateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowCreateCallbackWrapper _cb _ _ = do
    _cb 

onWindowCreate :: (GObject a, MonadIO m) => a -> WindowCreateCallback -> m SignalHandlerId
onWindowCreate obj cb = liftIO $ connectWindowCreate obj cb SignalConnectBefore
afterWindowCreate :: (GObject a, MonadIO m) => a -> WindowCreateCallback -> m SignalHandlerId
afterWindowCreate obj cb = connectWindowCreate obj cb SignalConnectAfter

connectWindowCreate :: (GObject a, MonadIO m) =>
                       a -> WindowCreateCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowCreate obj cb after = liftIO $ do
    cb' <- mkWindowCreateCallback (windowCreateCallbackWrapper cb)
    connectSignalFunPtr obj "create" cb' after

-- signal Window::deactivate
type WindowDeactivateCallback =
    IO ()

noWindowDeactivateCallback :: Maybe WindowDeactivateCallback
noWindowDeactivateCallback = Nothing

type WindowDeactivateCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowDeactivateCallback :: WindowDeactivateCallbackC -> IO (FunPtr WindowDeactivateCallbackC)

windowDeactivateClosure :: WindowDeactivateCallback -> IO Closure
windowDeactivateClosure cb = newCClosure =<< mkWindowDeactivateCallback wrapped
    where wrapped = windowDeactivateCallbackWrapper cb

windowDeactivateCallbackWrapper ::
    WindowDeactivateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowDeactivateCallbackWrapper _cb _ _ = do
    _cb 

onWindowDeactivate :: (GObject a, MonadIO m) => a -> WindowDeactivateCallback -> m SignalHandlerId
onWindowDeactivate obj cb = liftIO $ connectWindowDeactivate obj cb SignalConnectBefore
afterWindowDeactivate :: (GObject a, MonadIO m) => a -> WindowDeactivateCallback -> m SignalHandlerId
afterWindowDeactivate obj cb = connectWindowDeactivate obj cb SignalConnectAfter

connectWindowDeactivate :: (GObject a, MonadIO m) =>
                           a -> WindowDeactivateCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowDeactivate obj cb after = liftIO $ do
    cb' <- mkWindowDeactivateCallback (windowDeactivateCallbackWrapper cb)
    connectSignalFunPtr obj "deactivate" cb' after

-- signal Window::destroy
type WindowDestroyCallback =
    IO ()

noWindowDestroyCallback :: Maybe WindowDestroyCallback
noWindowDestroyCallback = Nothing

type WindowDestroyCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowDestroyCallback :: WindowDestroyCallbackC -> IO (FunPtr WindowDestroyCallbackC)

windowDestroyClosure :: WindowDestroyCallback -> IO Closure
windowDestroyClosure cb = newCClosure =<< mkWindowDestroyCallback wrapped
    where wrapped = windowDestroyCallbackWrapper cb

windowDestroyCallbackWrapper ::
    WindowDestroyCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowDestroyCallbackWrapper _cb _ _ = do
    _cb 

onWindowDestroy :: (GObject a, MonadIO m) => a -> WindowDestroyCallback -> m SignalHandlerId
onWindowDestroy obj cb = liftIO $ connectWindowDestroy obj cb SignalConnectBefore
afterWindowDestroy :: (GObject a, MonadIO m) => a -> WindowDestroyCallback -> m SignalHandlerId
afterWindowDestroy obj cb = connectWindowDestroy obj cb SignalConnectAfter

connectWindowDestroy :: (GObject a, MonadIO m) =>
                        a -> WindowDestroyCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowDestroy obj cb after = liftIO $ do
    cb' <- mkWindowDestroyCallback (windowDestroyCallbackWrapper cb)
    connectSignalFunPtr obj "destroy" cb' after

-- signal Window::maximize
type WindowMaximizeCallback =
    IO ()

noWindowMaximizeCallback :: Maybe WindowMaximizeCallback
noWindowMaximizeCallback = Nothing

type WindowMaximizeCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowMaximizeCallback :: WindowMaximizeCallbackC -> IO (FunPtr WindowMaximizeCallbackC)

windowMaximizeClosure :: WindowMaximizeCallback -> IO Closure
windowMaximizeClosure cb = newCClosure =<< mkWindowMaximizeCallback wrapped
    where wrapped = windowMaximizeCallbackWrapper cb

windowMaximizeCallbackWrapper ::
    WindowMaximizeCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowMaximizeCallbackWrapper _cb _ _ = do
    _cb 

onWindowMaximize :: (GObject a, MonadIO m) => a -> WindowMaximizeCallback -> m SignalHandlerId
onWindowMaximize obj cb = liftIO $ connectWindowMaximize obj cb SignalConnectBefore
afterWindowMaximize :: (GObject a, MonadIO m) => a -> WindowMaximizeCallback -> m SignalHandlerId
afterWindowMaximize obj cb = connectWindowMaximize obj cb SignalConnectAfter

connectWindowMaximize :: (GObject a, MonadIO m) =>
                         a -> WindowMaximizeCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowMaximize obj cb after = liftIO $ do
    cb' <- mkWindowMaximizeCallback (windowMaximizeCallbackWrapper cb)
    connectSignalFunPtr obj "maximize" cb' after

-- signal Window::minimize
type WindowMinimizeCallback =
    IO ()

noWindowMinimizeCallback :: Maybe WindowMinimizeCallback
noWindowMinimizeCallback = Nothing

type WindowMinimizeCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowMinimizeCallback :: WindowMinimizeCallbackC -> IO (FunPtr WindowMinimizeCallbackC)

windowMinimizeClosure :: WindowMinimizeCallback -> IO Closure
windowMinimizeClosure cb = newCClosure =<< mkWindowMinimizeCallback wrapped
    where wrapped = windowMinimizeCallbackWrapper cb

windowMinimizeCallbackWrapper ::
    WindowMinimizeCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowMinimizeCallbackWrapper _cb _ _ = do
    _cb 

onWindowMinimize :: (GObject a, MonadIO m) => a -> WindowMinimizeCallback -> m SignalHandlerId
onWindowMinimize obj cb = liftIO $ connectWindowMinimize obj cb SignalConnectBefore
afterWindowMinimize :: (GObject a, MonadIO m) => a -> WindowMinimizeCallback -> m SignalHandlerId
afterWindowMinimize obj cb = connectWindowMinimize obj cb SignalConnectAfter

connectWindowMinimize :: (GObject a, MonadIO m) =>
                         a -> WindowMinimizeCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowMinimize obj cb after = liftIO $ do
    cb' <- mkWindowMinimizeCallback (windowMinimizeCallbackWrapper cb)
    connectSignalFunPtr obj "minimize" cb' after

-- signal Window::move
type WindowMoveCallback =
    IO ()

noWindowMoveCallback :: Maybe WindowMoveCallback
noWindowMoveCallback = Nothing

type WindowMoveCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowMoveCallback :: WindowMoveCallbackC -> IO (FunPtr WindowMoveCallbackC)

windowMoveClosure :: WindowMoveCallback -> IO Closure
windowMoveClosure cb = newCClosure =<< mkWindowMoveCallback wrapped
    where wrapped = windowMoveCallbackWrapper cb

windowMoveCallbackWrapper ::
    WindowMoveCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowMoveCallbackWrapper _cb _ _ = do
    _cb 

onWindowMove :: (GObject a, MonadIO m) => a -> WindowMoveCallback -> m SignalHandlerId
onWindowMove obj cb = liftIO $ connectWindowMove obj cb SignalConnectBefore
afterWindowMove :: (GObject a, MonadIO m) => a -> WindowMoveCallback -> m SignalHandlerId
afterWindowMove obj cb = connectWindowMove obj cb SignalConnectAfter

connectWindowMove :: (GObject a, MonadIO m) =>
                     a -> WindowMoveCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowMove obj cb after = liftIO $ do
    cb' <- mkWindowMoveCallback (windowMoveCallbackWrapper cb)
    connectSignalFunPtr obj "move" cb' after

-- signal Window::resize
type WindowResizeCallback =
    IO ()

noWindowResizeCallback :: Maybe WindowResizeCallback
noWindowResizeCallback = Nothing

type WindowResizeCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowResizeCallback :: WindowResizeCallbackC -> IO (FunPtr WindowResizeCallbackC)

windowResizeClosure :: WindowResizeCallback -> IO Closure
windowResizeClosure cb = newCClosure =<< mkWindowResizeCallback wrapped
    where wrapped = windowResizeCallbackWrapper cb

windowResizeCallbackWrapper ::
    WindowResizeCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowResizeCallbackWrapper _cb _ _ = do
    _cb 

onWindowResize :: (GObject a, MonadIO m) => a -> WindowResizeCallback -> m SignalHandlerId
onWindowResize obj cb = liftIO $ connectWindowResize obj cb SignalConnectBefore
afterWindowResize :: (GObject a, MonadIO m) => a -> WindowResizeCallback -> m SignalHandlerId
afterWindowResize obj cb = connectWindowResize obj cb SignalConnectAfter

connectWindowResize :: (GObject a, MonadIO m) =>
                       a -> WindowResizeCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowResize obj cb after = liftIO $ do
    cb' <- mkWindowResizeCallback (windowResizeCallbackWrapper cb)
    connectSignalFunPtr obj "resize" cb' after

-- signal Window::restore
type WindowRestoreCallback =
    IO ()

noWindowRestoreCallback :: Maybe WindowRestoreCallback
noWindowRestoreCallback = Nothing

type WindowRestoreCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWindowRestoreCallback :: WindowRestoreCallbackC -> IO (FunPtr WindowRestoreCallbackC)

windowRestoreClosure :: WindowRestoreCallback -> IO Closure
windowRestoreClosure cb = newCClosure =<< mkWindowRestoreCallback wrapped
    where wrapped = windowRestoreCallbackWrapper cb

windowRestoreCallbackWrapper ::
    WindowRestoreCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
windowRestoreCallbackWrapper _cb _ _ = do
    _cb 

onWindowRestore :: (GObject a, MonadIO m) => a -> WindowRestoreCallback -> m SignalHandlerId
onWindowRestore obj cb = liftIO $ connectWindowRestore obj cb SignalConnectBefore
afterWindowRestore :: (GObject a, MonadIO m) => a -> WindowRestoreCallback -> m SignalHandlerId
afterWindowRestore obj cb = connectWindowRestore obj cb SignalConnectAfter

connectWindowRestore :: (GObject a, MonadIO m) =>
                        a -> WindowRestoreCallback -> SignalConnectMode -> m SignalHandlerId
connectWindowRestore obj cb after = liftIO $ do
    cb' <- mkWindowRestoreCallback (windowRestoreCallbackWrapper cb)
    connectSignalFunPtr obj "restore" cb' after

-- constant _BINARY_AGE

_BINARY_AGE :: Int32
_BINARY_AGE = 21610
-- constant _INTERFACE_AGE

_INTERFACE_AGE :: Int32
_INTERFACE_AGE = 1
-- constant _MAJOR_VERSION

_MAJOR_VERSION :: Int32
_MAJOR_VERSION = 2
-- constant _MICRO_VERSION

_MICRO_VERSION :: Int32
_MICRO_VERSION = 0
-- constant _MINOR_VERSION

_MINOR_VERSION :: Int32
_MINOR_VERSION = 16
-- constant _VERSION_MIN_REQUIRED

_VERSION_MIN_REQUIRED :: Int32
_VERSION_MIN_REQUIRED = 2
-- function atk_attribute_set_free
-- Args : [Arg {argName = "attrib_set", argType = TGSList (TBasicType TVoid), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "attrib_set", argType = TGSList (TBasicType TVoid), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_attribute_set_free" atk_attribute_set_free :: 
    Ptr (GSList (Ptr ())) ->                -- attrib_set : TGSList (TBasicType TVoid)
    IO ()


attributeSetFree ::
    (MonadIO m) =>
    [Ptr ()] ->                             -- attrib_set
    m ()
attributeSetFree attrib_set = liftIO $ do
    attrib_set' <- packGSList attrib_set
    atk_attribute_set_free attrib_set'
    g_slist_free attrib_set'
    return ()

-- function atk_focus_tracker_notify
-- Args : [Arg {argName = "object", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "object", argType = TInterface "Atk" "Object", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_focus_tracker_notify" atk_focus_tracker_notify :: 
    Ptr Object ->                           -- object : TInterface "Atk" "Object"
    IO ()

{-# DEPRECATED focusTrackerNotify ["(Since version 2.9.4)","Focus tracking has been dropped as a feature","to be implemented by ATK itself. As #AtkObject::focus-event was","deprecated in favor of a #AtkObject::state-change signal, in order","to notify a focus change on your implementation, you can use","atk_object_notify_state_change() instead."]#-}
focusTrackerNotify ::
    (MonadIO m, ObjectK a) =>
    a ->                                    -- object
    m ()
focusTrackerNotify object = liftIO $ do
    let object' = unsafeManagedPtrCastPtr object
    atk_focus_tracker_notify object'
    touchManagedPtr object
    return ()

-- function atk_get_binary_age
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_binary_age" atk_get_binary_age :: 
    IO Word32


getBinaryAge ::
    (MonadIO m) =>
    m Word32
getBinaryAge  = liftIO $ do
    result <- atk_get_binary_age
    return result

-- function atk_get_default_registry
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Atk" "Registry"
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_default_registry" atk_get_default_registry :: 
    IO (Ptr Registry)


getDefaultRegistry ::
    (MonadIO m) =>
    m Registry
getDefaultRegistry  = liftIO $ do
    result <- atk_get_default_registry
    result' <- (wrapObject Registry) result
    return result'

-- function atk_get_focus_object
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_focus_object" atk_get_focus_object :: 
    IO (Ptr Object)


getFocusObject ::
    (MonadIO m) =>
    m Object
getFocusObject  = liftIO $ do
    result <- atk_get_focus_object
    result' <- (newObject Object) result
    return result'

-- function atk_get_interface_age
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_interface_age" atk_get_interface_age :: 
    IO Word32


getInterfaceAge ::
    (MonadIO m) =>
    m Word32
getInterfaceAge  = liftIO $ do
    result <- atk_get_interface_age
    return result

-- function atk_get_major_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_major_version" atk_get_major_version :: 
    IO Word32


getMajorVersion ::
    (MonadIO m) =>
    m Word32
getMajorVersion  = liftIO $ do
    result <- atk_get_major_version
    return result

-- function atk_get_micro_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_micro_version" atk_get_micro_version :: 
    IO Word32


getMicroVersion ::
    (MonadIO m) =>
    m Word32
getMicroVersion  = liftIO $ do
    result <- atk_get_micro_version
    return result

-- function atk_get_minor_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_minor_version" atk_get_minor_version :: 
    IO Word32


getMinorVersion ::
    (MonadIO m) =>
    m Word32
getMinorVersion  = liftIO $ do
    result <- atk_get_minor_version
    return result

-- function atk_get_root
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Atk" "Object"
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_root" atk_get_root :: 
    IO (Ptr Object)


getRoot ::
    (MonadIO m) =>
    m Object
getRoot  = liftIO $ do
    result <- atk_get_root
    result' <- (newObject Object) result
    return result'

-- function atk_get_toolkit_name
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_toolkit_name" atk_get_toolkit_name :: 
    IO CString


getToolkitName ::
    (MonadIO m) =>
    m T.Text
getToolkitName  = liftIO $ do
    result <- atk_get_toolkit_name
    result' <- cstringToText result
    return result'

-- function atk_get_toolkit_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_toolkit_version" atk_get_toolkit_version :: 
    IO CString


getToolkitVersion ::
    (MonadIO m) =>
    m T.Text
getToolkitVersion  = liftIO $ do
    result <- atk_get_toolkit_version
    result' <- cstringToText result
    return result'

-- function atk_get_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_get_version" atk_get_version :: 
    IO CString


getVersion ::
    (MonadIO m) =>
    m T.Text
getVersion  = liftIO $ do
    result <- atk_get_version
    result' <- cstringToText result
    return result'

-- function atk_relation_type_for_name
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "RelationType"
-- throws : False
-- Skip return : False

foreign import ccall "atk_relation_type_for_name" atk_relation_type_for_name :: 
    CString ->                              -- name : TBasicType TUTF8
    IO CUInt


relationTypeForName ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m RelationType
relationTypeForName name = liftIO $ do
    name' <- textToCString name
    result <- atk_relation_type_for_name name'
    let result' = (toEnum . fromIntegral) result
    freeMem name'
    return result'

-- function atk_relation_type_get_name
-- Args : [Arg {argName = "type", argType = TInterface "Atk" "RelationType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TInterface "Atk" "RelationType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_relation_type_get_name" atk_relation_type_get_name :: 
    CUInt ->                                -- type : TInterface "Atk" "RelationType"
    IO CString


relationTypeGetName ::
    (MonadIO m) =>
    RelationType ->                         -- type
    m T.Text
relationTypeGetName type_ = liftIO $ do
    let type_' = (fromIntegral . fromEnum) type_
    result <- atk_relation_type_get_name type_'
    result' <- cstringToText result
    return result'

-- function atk_relation_type_register
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "RelationType"
-- throws : False
-- Skip return : False

foreign import ccall "atk_relation_type_register" atk_relation_type_register :: 
    CString ->                              -- name : TBasicType TUTF8
    IO CUInt


relationTypeRegister ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m RelationType
relationTypeRegister name = liftIO $ do
    name' <- textToCString name
    result <- atk_relation_type_register name'
    let result' = (toEnum . fromIntegral) result
    freeMem name'
    return result'

-- function atk_remove_focus_tracker
-- Args : [Arg {argName = "tracker_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "tracker_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_remove_focus_tracker" atk_remove_focus_tracker :: 
    Word32 ->                               -- tracker_id : TBasicType TUInt32
    IO ()

{-# DEPRECATED removeFocusTracker ["(Since version 2.9.4)","Focus tracking has been dropped as a feature","to be implemented by ATK itself. If you need focus tracking on your","implementation, subscribe to the state-changed:focused signal.","","Removes the specified focus tracker from the list of functions","to be called when any object receives focus."]#-}
removeFocusTracker ::
    (MonadIO m) =>
    Word32 ->                               -- tracker_id
    m ()
removeFocusTracker tracker_id = liftIO $ do
    atk_remove_focus_tracker tracker_id
    return ()

-- function atk_remove_global_event_listener
-- Args : [Arg {argName = "listener_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "listener_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_remove_global_event_listener" atk_remove_global_event_listener :: 
    Word32 ->                               -- listener_id : TBasicType TUInt32
    IO ()


removeGlobalEventListener ::
    (MonadIO m) =>
    Word32 ->                               -- listener_id
    m ()
removeGlobalEventListener listener_id = liftIO $ do
    atk_remove_global_event_listener listener_id
    return ()

-- function atk_remove_key_event_listener
-- Args : [Arg {argName = "listener_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "listener_id", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_remove_key_event_listener" atk_remove_key_event_listener :: 
    Word32 ->                               -- listener_id : TBasicType TUInt32
    IO ()


removeKeyEventListener ::
    (MonadIO m) =>
    Word32 ->                               -- listener_id
    m ()
removeKeyEventListener listener_id = liftIO $ do
    atk_remove_key_event_listener listener_id
    return ()

-- function atk_role_for_name
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Role"
-- throws : False
-- Skip return : False

foreign import ccall "atk_role_for_name" atk_role_for_name :: 
    CString ->                              -- name : TBasicType TUTF8
    IO CUInt


roleForName ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m Role
roleForName name = liftIO $ do
    name' <- textToCString name
    result <- atk_role_for_name name'
    let result' = (toEnum . fromIntegral) result
    freeMem name'
    return result'

-- function atk_role_get_localized_name
-- Args : [Arg {argName = "role", argType = TInterface "Atk" "Role", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "role", argType = TInterface "Atk" "Role", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_role_get_localized_name" atk_role_get_localized_name :: 
    CUInt ->                                -- role : TInterface "Atk" "Role"
    IO CString


roleGetLocalizedName ::
    (MonadIO m) =>
    Role ->                                 -- role
    m T.Text
roleGetLocalizedName role = liftIO $ do
    let role' = (fromIntegral . fromEnum) role
    result <- atk_role_get_localized_name role'
    result' <- cstringToText result
    return result'

-- function atk_role_get_name
-- Args : [Arg {argName = "role", argType = TInterface "Atk" "Role", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "role", argType = TInterface "Atk" "Role", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_role_get_name" atk_role_get_name :: 
    CUInt ->                                -- role : TInterface "Atk" "Role"
    IO CString


roleGetName ::
    (MonadIO m) =>
    Role ->                                 -- role
    m T.Text
roleGetName role = liftIO $ do
    let role' = (fromIntegral . fromEnum) role
    result <- atk_role_get_name role'
    result' <- cstringToText result
    return result'

-- function atk_role_register
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "Role"
-- throws : False
-- Skip return : False

foreign import ccall "atk_role_register" atk_role_register :: 
    CString ->                              -- name : TBasicType TUTF8
    IO CUInt

{-# DEPRECATED roleRegister ["Since 2.12. If your application/toolkit doesn't find a","suitable role for a specific object defined at #AtkRole, please","submit a bug in order to add a new role to the specification."]#-}
roleRegister ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m Role
roleRegister name = liftIO $ do
    name' <- textToCString name
    result <- atk_role_register name'
    let result' = (toEnum . fromIntegral) result
    freeMem name'
    return result'

-- function atk_state_type_for_name
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "StateType"
-- throws : False
-- Skip return : False

foreign import ccall "atk_state_type_for_name" atk_state_type_for_name :: 
    CString ->                              -- name : TBasicType TUTF8
    IO CUInt


stateTypeForName ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m StateType
stateTypeForName name = liftIO $ do
    name' <- textToCString name
    result <- atk_state_type_for_name name'
    let result' = (toEnum . fromIntegral) result
    freeMem name'
    return result'

-- function atk_state_type_get_name
-- Args : [Arg {argName = "type", argType = TInterface "Atk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "type", argType = TInterface "Atk" "StateType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_state_type_get_name" atk_state_type_get_name :: 
    CUInt ->                                -- type : TInterface "Atk" "StateType"
    IO CString


stateTypeGetName ::
    (MonadIO m) =>
    StateType ->                            -- type
    m T.Text
stateTypeGetName type_ = liftIO $ do
    let type_' = (fromIntegral . fromEnum) type_
    result <- atk_state_type_get_name type_'
    result' <- cstringToText result
    return result'

-- function atk_state_type_register
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "StateType"
-- throws : False
-- Skip return : False

foreign import ccall "atk_state_type_register" atk_state_type_register :: 
    CString ->                              -- name : TBasicType TUTF8
    IO CUInt


stateTypeRegister ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m StateType
stateTypeRegister name = liftIO $ do
    name' <- textToCString name
    result <- atk_state_type_register name'
    let result' = (toEnum . fromIntegral) result
    freeMem name'
    return result'

-- function atk_text_attribute_for_name
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "TextAttribute"
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_attribute_for_name" atk_text_attribute_for_name :: 
    CString ->                              -- name : TBasicType TUTF8
    IO CUInt


textAttributeForName ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m TextAttribute
textAttributeForName name = liftIO $ do
    name' <- textToCString name
    result <- atk_text_attribute_for_name name'
    let result' = (toEnum . fromIntegral) result
    freeMem name'
    return result'

-- function atk_text_attribute_get_name
-- Args : [Arg {argName = "attr", argType = TInterface "Atk" "TextAttribute", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "attr", argType = TInterface "Atk" "TextAttribute", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_attribute_get_name" atk_text_attribute_get_name :: 
    CUInt ->                                -- attr : TInterface "Atk" "TextAttribute"
    IO CString


textAttributeGetName ::
    (MonadIO m) =>
    TextAttribute ->                        -- attr
    m T.Text
textAttributeGetName attr = liftIO $ do
    let attr' = (fromIntegral . fromEnum) attr
    result <- atk_text_attribute_get_name attr'
    result' <- cstringToText result
    return result'

-- function atk_text_attribute_get_value
-- Args : [Arg {argName = "attr", argType = TInterface "Atk" "TextAttribute", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "attr", argType = TInterface "Atk" "TextAttribute", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_attribute_get_value" atk_text_attribute_get_value :: 
    CUInt ->                                -- attr : TInterface "Atk" "TextAttribute"
    Int32 ->                                -- index_ : TBasicType TInt32
    IO CString


textAttributeGetValue ::
    (MonadIO m) =>
    TextAttribute ->                        -- attr
    Int32 ->                                -- index_
    m T.Text
textAttributeGetValue attr index_ = liftIO $ do
    let attr' = (fromIntegral . fromEnum) attr
    result <- atk_text_attribute_get_value attr' index_
    result' <- cstringToText result
    return result'

-- function atk_text_attribute_register
-- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Atk" "TextAttribute"
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_attribute_register" atk_text_attribute_register :: 
    CString ->                              -- name : TBasicType TUTF8
    IO CUInt


textAttributeRegister ::
    (MonadIO m) =>
    T.Text ->                               -- name
    m TextAttribute
textAttributeRegister name = liftIO $ do
    name' <- textToCString name
    result <- atk_text_attribute_register name'
    let result' = (toEnum . fromIntegral) result
    freeMem name'
    return result'

-- function atk_text_free_ranges
-- Args : [Arg {argName = "ranges", argType = TCArray False (-1) (-1) (TInterface "Atk" "TextRange"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "ranges", argType = TCArray False (-1) (-1) (TInterface "Atk" "TextRange"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "atk_text_free_ranges" atk_text_free_ranges :: 
    Ptr (Ptr TextRange) ->                  -- ranges : TCArray False (-1) (-1) (TInterface "Atk" "TextRange")
    IO ()


textFreeRanges ::
    (MonadIO m) =>
    Ptr (Ptr TextRange) ->                  -- ranges
    m ()
textFreeRanges ranges = liftIO $ do
    atk_text_free_ranges ranges
    return ()

-- function atk_value_type_get_localized_name
-- Args : [Arg {argName = "value_type", argType = TInterface "Atk" "ValueType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "value_type", argType = TInterface "Atk" "ValueType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_value_type_get_localized_name" atk_value_type_get_localized_name :: 
    CUInt ->                                -- value_type : TInterface "Atk" "ValueType"
    IO CString


valueTypeGetLocalizedName ::
    (MonadIO m) =>
    ValueType ->                            -- value_type
    m T.Text
valueTypeGetLocalizedName value_type = liftIO $ do
    let value_type' = (fromIntegral . fromEnum) value_type
    result <- atk_value_type_get_localized_name value_type'
    result' <- cstringToText result
    return result'

-- function atk_value_type_get_name
-- Args : [Arg {argName = "value_type", argType = TInterface "Atk" "ValueType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "value_type", argType = TInterface "Atk" "ValueType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False

foreign import ccall "atk_value_type_get_name" atk_value_type_get_name :: 
    CUInt ->                                -- value_type : TInterface "Atk" "ValueType"
    IO CString


valueTypeGetName ::
    (MonadIO m) =>
    ValueType ->                            -- value_type
    m T.Text
valueTypeGetName value_type = liftIO $ do
    let value_type' = (fromIntegral . fromEnum) value_type
    result <- atk_value_type_get_name value_type'
    result' <- cstringToText result
    return result'