{- |
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.CellAreaBox
    ( 

-- * Exported types
    CellAreaBox(..)                         ,
    CellAreaBoxK                            ,
    toCellAreaBox                           ,
    noCellAreaBox                           ,


 -- * Methods
-- ** cellAreaBoxGetSpacing
    cellAreaBoxGetSpacing                   ,


-- ** cellAreaBoxNew
    cellAreaBoxNew                          ,


-- ** cellAreaBoxPackEnd
    cellAreaBoxPackEnd                      ,


-- ** cellAreaBoxPackStart
    cellAreaBoxPackStart                    ,


-- ** cellAreaBoxSetSpacing
    cellAreaBoxSetSpacing                   ,




 -- * Properties
-- ** Spacing
    CellAreaBoxSpacingPropertyInfo          ,
    constructCellAreaBoxSpacing             ,
    getCellAreaBoxSpacing                   ,
    setCellAreaBoxSpacing                   ,




    ) 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.GObject as GObject

newtype CellAreaBox = CellAreaBox (ForeignPtr CellAreaBox)
foreign import ccall "gtk_cell_area_box_get_type"
    c_gtk_cell_area_box_get_type :: IO GType

type instance ParentTypes CellAreaBox = CellAreaBoxParentTypes
type CellAreaBoxParentTypes = '[CellArea, GObject.Object, Buildable, CellLayout, Orientable]

instance GObject CellAreaBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_cell_area_box_get_type
    

class GObject o => CellAreaBoxK o
instance (GObject o, IsDescendantOf CellAreaBox o) => CellAreaBoxK o

toCellAreaBox :: CellAreaBoxK o => o -> IO CellAreaBox
toCellAreaBox = unsafeCastTo CellAreaBox

noCellAreaBox :: Maybe CellAreaBox
noCellAreaBox = Nothing

-- VVV Prop "spacing"
   -- Type: TBasicType TInt32
   -- Flags: [PropertyReadable,PropertyWritable]

getCellAreaBoxSpacing :: (MonadIO m, CellAreaBoxK o) => o -> m Int32
getCellAreaBoxSpacing obj = liftIO $ getObjectPropertyCInt obj "spacing"

setCellAreaBoxSpacing :: (MonadIO m, CellAreaBoxK o) => o -> Int32 -> m ()
setCellAreaBoxSpacing obj val = liftIO $ setObjectPropertyCInt obj "spacing" val

constructCellAreaBoxSpacing :: Int32 -> IO ([Char], GValue)
constructCellAreaBoxSpacing val = constructObjectPropertyCInt "spacing" val

data CellAreaBoxSpacingPropertyInfo
instance AttrInfo CellAreaBoxSpacingPropertyInfo where
    type AttrAllowedOps CellAreaBoxSpacingPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint CellAreaBoxSpacingPropertyInfo = (~) Int32
    type AttrBaseTypeConstraint CellAreaBoxSpacingPropertyInfo = CellAreaBoxK
    type AttrGetType CellAreaBoxSpacingPropertyInfo = Int32
    type AttrLabel CellAreaBoxSpacingPropertyInfo = "CellAreaBox::spacing"
    attrGet _ = getCellAreaBoxSpacing
    attrSet _ = setCellAreaBoxSpacing
    attrConstruct _ = constructCellAreaBoxSpacing

type instance AttributeList CellAreaBox = CellAreaBoxAttributeList
type CellAreaBoxAttributeList = ('[ '("edit-widget", CellAreaEditWidgetPropertyInfo), '("edited-cell", CellAreaEditedCellPropertyInfo), '("focus-cell", CellAreaFocusCellPropertyInfo), '("orientation", OrientableOrientationPropertyInfo), '("spacing", CellAreaBoxSpacingPropertyInfo)] :: [(Symbol, *)])

type instance SignalList CellAreaBox = CellAreaBoxSignalList
type CellAreaBoxSignalList = ('[ '("add-editable", CellAreaAddEditableSignalInfo), '("apply-attributes", CellAreaApplyAttributesSignalInfo), '("focus-changed", CellAreaFocusChangedSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("remove-editable", CellAreaRemoveEditableSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

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

foreign import ccall "gtk_cell_area_box_new" gtk_cell_area_box_new :: 
    IO (Ptr CellAreaBox)


cellAreaBoxNew ::
    (MonadIO m) =>
    m CellAreaBox
cellAreaBoxNew  = liftIO $ do
    result <- gtk_cell_area_box_new
    checkUnexpectedReturnNULL "gtk_cell_area_box_new" result
    result' <- (newObject CellAreaBox) result
    return result'

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

foreign import ccall "gtk_cell_area_box_get_spacing" gtk_cell_area_box_get_spacing :: 
    Ptr CellAreaBox ->                      -- _obj : TInterface "Gtk" "CellAreaBox"
    IO Int32


cellAreaBoxGetSpacing ::
    (MonadIO m, CellAreaBoxK a) =>
    a ->                                    -- _obj
    m Int32
cellAreaBoxGetSpacing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_cell_area_box_get_spacing _obj'
    touchManagedPtr _obj
    return result

-- method CellAreaBox::pack_end
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_box_pack_end" gtk_cell_area_box_pack_end :: 
    Ptr CellAreaBox ->                      -- _obj : TInterface "Gtk" "CellAreaBox"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- expand : TBasicType TBoolean
    CInt ->                                 -- align : TBasicType TBoolean
    CInt ->                                 -- fixed : TBasicType TBoolean
    IO ()


cellAreaBoxPackEnd ::
    (MonadIO m, CellAreaBoxK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    Bool ->                                 -- expand
    Bool ->                                 -- align
    Bool ->                                 -- fixed
    m ()
cellAreaBoxPackEnd _obj renderer expand align fixed = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    let expand' = (fromIntegral . fromEnum) expand
    let align' = (fromIntegral . fromEnum) align
    let fixed' = (fromIntegral . fromEnum) fixed
    gtk_cell_area_box_pack_end _obj' renderer' expand' align' fixed'
    touchManagedPtr _obj
    touchManagedPtr renderer
    return ()

-- method CellAreaBox::pack_start
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "CellAreaBox", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "renderer", argType = TInterface "Gtk" "CellRenderer", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "expand", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "align", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fixed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_box_pack_start" gtk_cell_area_box_pack_start :: 
    Ptr CellAreaBox ->                      -- _obj : TInterface "Gtk" "CellAreaBox"
    Ptr CellRenderer ->                     -- renderer : TInterface "Gtk" "CellRenderer"
    CInt ->                                 -- expand : TBasicType TBoolean
    CInt ->                                 -- align : TBasicType TBoolean
    CInt ->                                 -- fixed : TBasicType TBoolean
    IO ()


cellAreaBoxPackStart ::
    (MonadIO m, CellAreaBoxK a, CellRendererK b) =>
    a ->                                    -- _obj
    b ->                                    -- renderer
    Bool ->                                 -- expand
    Bool ->                                 -- align
    Bool ->                                 -- fixed
    m ()
cellAreaBoxPackStart _obj renderer expand align fixed = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let renderer' = unsafeManagedPtrCastPtr renderer
    let expand' = (fromIntegral . fromEnum) expand
    let align' = (fromIntegral . fromEnum) align
    let fixed' = (fromIntegral . fromEnum) fixed
    gtk_cell_area_box_pack_start _obj' renderer' expand' align' fixed'
    touchManagedPtr _obj
    touchManagedPtr renderer
    return ()

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

foreign import ccall "gtk_cell_area_box_set_spacing" gtk_cell_area_box_set_spacing :: 
    Ptr CellAreaBox ->                      -- _obj : TInterface "Gtk" "CellAreaBox"
    Int32 ->                                -- spacing : TBasicType TInt32
    IO ()


cellAreaBoxSetSpacing ::
    (MonadIO m, CellAreaBoxK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- spacing
    m ()
cellAreaBoxSetSpacing _obj spacing = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_cell_area_box_set_spacing _obj' spacing
    touchManagedPtr _obj
    return ()