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

module GI.Gtk.Objects.ContainerCellAccessible
    ( 

-- * Exported types
    ContainerCellAccessible(..)             ,
    ContainerCellAccessibleK                ,
    toContainerCellAccessible               ,
    noContainerCellAccessible               ,


 -- * Methods
-- ** containerCellAccessibleAddChild
    containerCellAccessibleAddChild         ,


-- ** containerCellAccessibleGetChildren
    containerCellAccessibleGetChildren      ,


-- ** containerCellAccessibleNew
    containerCellAccessibleNew              ,


-- ** containerCellAccessibleRemoveChild
    containerCellAccessibleRemoveChild      ,




    ) where

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

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

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

newtype ContainerCellAccessible = ContainerCellAccessible (ForeignPtr ContainerCellAccessible)
foreign import ccall "gtk_container_cell_accessible_get_type"
    c_gtk_container_cell_accessible_get_type :: IO GType

type instance ParentTypes ContainerCellAccessible = ContainerCellAccessibleParentTypes
type ContainerCellAccessibleParentTypes = '[CellAccessible, Accessible, Atk.Object, GObject.Object, Atk.Action, Atk.Component]

instance GObject ContainerCellAccessible where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_container_cell_accessible_get_type
    

class GObject o => ContainerCellAccessibleK o
instance (GObject o, IsDescendantOf ContainerCellAccessible o) => ContainerCellAccessibleK o

toContainerCellAccessible :: ContainerCellAccessibleK o => o -> IO ContainerCellAccessible
toContainerCellAccessible = unsafeCastTo ContainerCellAccessible

noContainerCellAccessible :: Maybe ContainerCellAccessible
noContainerCellAccessible = Nothing

type instance AttributeList ContainerCellAccessible = ContainerCellAccessibleAttributeList
type ContainerCellAccessibleAttributeList = ('[ '("accessible-component-layer", Atk.ObjectAccessibleComponentLayerPropertyInfo), '("accessible-component-mdi-zorder", Atk.ObjectAccessibleComponentMdiZorderPropertyInfo), '("accessible-description", Atk.ObjectAccessibleDescriptionPropertyInfo), '("accessible-hypertext-nlinks", Atk.ObjectAccessibleHypertextNlinksPropertyInfo), '("accessible-name", Atk.ObjectAccessibleNamePropertyInfo), '("accessible-parent", Atk.ObjectAccessibleParentPropertyInfo), '("accessible-role", Atk.ObjectAccessibleRolePropertyInfo), '("accessible-table-caption", Atk.ObjectAccessibleTableCaptionPropertyInfo), '("accessible-table-caption-object", Atk.ObjectAccessibleTableCaptionObjectPropertyInfo), '("accessible-table-column-description", Atk.ObjectAccessibleTableColumnDescriptionPropertyInfo), '("accessible-table-column-header", Atk.ObjectAccessibleTableColumnHeaderPropertyInfo), '("accessible-table-row-description", Atk.ObjectAccessibleTableRowDescriptionPropertyInfo), '("accessible-table-row-header", Atk.ObjectAccessibleTableRowHeaderPropertyInfo), '("accessible-table-summary", Atk.ObjectAccessibleTableSummaryPropertyInfo), '("accessible-value", Atk.ObjectAccessibleValuePropertyInfo), '("widget", AccessibleWidgetPropertyInfo)] :: [(Symbol, *)])

type instance SignalList ContainerCellAccessible = ContainerCellAccessibleSignalList
type ContainerCellAccessibleSignalList = ('[ '("active-descendant-changed", Atk.ObjectActiveDescendantChangedSignalInfo), '("bounds-changed", Atk.ComponentBoundsChangedSignalInfo), '("children-changed", Atk.ObjectChildrenChangedSignalInfo), '("focus-event", Atk.ObjectFocusEventSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("property-change", Atk.ObjectPropertyChangeSignalInfo), '("state-change", Atk.ObjectStateChangeSignalInfo), '("visible-data-changed", Atk.ObjectVisibleDataChangedSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

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

foreign import ccall "gtk_container_cell_accessible_new" gtk_container_cell_accessible_new :: 
    IO (Ptr ContainerCellAccessible)


containerCellAccessibleNew ::
    (MonadIO m) =>
    m ContainerCellAccessible
containerCellAccessibleNew  = liftIO $ do
    result <- gtk_container_cell_accessible_new
    checkUnexpectedReturnNULL "gtk_container_cell_accessible_new" result
    result' <- (wrapObject ContainerCellAccessible) result
    return result'

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

foreign import ccall "gtk_container_cell_accessible_add_child" gtk_container_cell_accessible_add_child :: 
    Ptr ContainerCellAccessible ->          -- _obj : TInterface "Gtk" "ContainerCellAccessible"
    Ptr CellAccessible ->                   -- child : TInterface "Gtk" "CellAccessible"
    IO ()


containerCellAccessibleAddChild ::
    (MonadIO m, ContainerCellAccessibleK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
containerCellAccessibleAddChild _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_container_cell_accessible_add_child _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()

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

foreign import ccall "gtk_container_cell_accessible_get_children" gtk_container_cell_accessible_get_children :: 
    Ptr ContainerCellAccessible ->          -- _obj : TInterface "Gtk" "ContainerCellAccessible"
    IO (Ptr (GList (Ptr CellAccessible)))


containerCellAccessibleGetChildren ::
    (MonadIO m, ContainerCellAccessibleK a) =>
    a ->                                    -- _obj
    m [CellAccessible]
containerCellAccessibleGetChildren _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_container_cell_accessible_get_children _obj'
    checkUnexpectedReturnNULL "gtk_container_cell_accessible_get_children" result
    result' <- unpackGList result
    result'' <- mapM (newObject CellAccessible) result'
    touchManagedPtr _obj
    return result''

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

foreign import ccall "gtk_container_cell_accessible_remove_child" gtk_container_cell_accessible_remove_child :: 
    Ptr ContainerCellAccessible ->          -- _obj : TInterface "Gtk" "ContainerCellAccessible"
    Ptr CellAccessible ->                   -- child : TInterface "Gtk" "CellAccessible"
    IO ()


containerCellAccessibleRemoveChild ::
    (MonadIO m, ContainerCellAccessibleK a, CellAccessibleK b) =>
    a ->                                    -- _obj
    b ->                                    -- child
    m ()
containerCellAccessibleRemoveChild _obj child = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child' = unsafeManagedPtrCastPtr child
    gtk_container_cell_accessible_remove_child _obj' child'
    touchManagedPtr _obj
    touchManagedPtr child
    return ()