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

-- * Exported types
    HandleBox(..)                           ,
    HandleBoxK                              ,
    toHandleBox                             ,
    noHandleBox                             ,


 -- * Methods
-- ** handleBoxGetChildDetached
    handleBoxGetChildDetached               ,


-- ** handleBoxGetHandlePosition
    handleBoxGetHandlePosition              ,


-- ** handleBoxGetShadowType
    handleBoxGetShadowType                  ,


-- ** handleBoxGetSnapEdge
    handleBoxGetSnapEdge                    ,


-- ** handleBoxNew
    handleBoxNew                            ,


-- ** handleBoxSetHandlePosition
    handleBoxSetHandlePosition              ,


-- ** handleBoxSetShadowType
    handleBoxSetShadowType                  ,


-- ** handleBoxSetSnapEdge
    handleBoxSetSnapEdge                    ,




 -- * Properties
-- ** ChildDetached
    HandleBoxChildDetachedPropertyInfo      ,
    getHandleBoxChildDetached               ,


-- ** HandlePosition
    HandleBoxHandlePositionPropertyInfo     ,
    constructHandleBoxHandlePosition        ,
    getHandleBoxHandlePosition              ,
    setHandleBoxHandlePosition              ,


-- ** ShadowType
    HandleBoxShadowTypePropertyInfo         ,
    constructHandleBoxShadowType            ,
    getHandleBoxShadowType                  ,
    setHandleBoxShadowType                  ,


-- ** SnapEdge
    HandleBoxSnapEdgePropertyInfo           ,
    constructHandleBoxSnapEdge              ,
    getHandleBoxSnapEdge                    ,
    setHandleBoxSnapEdge                    ,


-- ** SnapEdgeSet
    HandleBoxSnapEdgeSetPropertyInfo        ,
    constructHandleBoxSnapEdgeSet           ,
    getHandleBoxSnapEdgeSet                 ,
    setHandleBoxSnapEdgeSet                 ,




 -- * Signals
-- ** ChildAttached
    HandleBoxChildAttachedCallback          ,
    HandleBoxChildAttachedCallbackC         ,
    HandleBoxChildAttachedSignalInfo        ,
    afterHandleBoxChildAttached             ,
    handleBoxChildAttachedCallbackWrapper   ,
    handleBoxChildAttachedClosure           ,
    mkHandleBoxChildAttachedCallback        ,
    noHandleBoxChildAttachedCallback        ,
    onHandleBoxChildAttached                ,


-- ** ChildDetached
    HandleBoxChildDetachedCallback          ,
    HandleBoxChildDetachedCallbackC         ,
    HandleBoxChildDetachedSignalInfo        ,
    afterHandleBoxChildDetached             ,
    handleBoxChildDetachedCallbackWrapper   ,
    handleBoxChildDetachedClosure           ,
    mkHandleBoxChildDetachedCallback        ,
    noHandleBoxChildDetachedCallback        ,
    onHandleBoxChildDetached                ,




    ) 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 HandleBox = HandleBox (ForeignPtr HandleBox)
foreign import ccall "gtk_handle_box_get_type"
    c_gtk_handle_box_get_type :: IO GType

type instance ParentTypes HandleBox = HandleBoxParentTypes
type HandleBoxParentTypes = '[Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject HandleBox where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_handle_box_get_type
    

class GObject o => HandleBoxK o
instance (GObject o, IsDescendantOf HandleBox o) => HandleBoxK o

toHandleBox :: HandleBoxK o => o -> IO HandleBox
toHandleBox = unsafeCastTo HandleBox

noHandleBox :: Maybe HandleBox
noHandleBox = Nothing

-- signal HandleBox::child-attached
type HandleBoxChildAttachedCallback =
    Widget ->
    IO ()

noHandleBoxChildAttachedCallback :: Maybe HandleBoxChildAttachedCallback
noHandleBoxChildAttachedCallback = Nothing

type HandleBoxChildAttachedCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkHandleBoxChildAttachedCallback :: HandleBoxChildAttachedCallbackC -> IO (FunPtr HandleBoxChildAttachedCallbackC)

handleBoxChildAttachedClosure :: HandleBoxChildAttachedCallback -> IO Closure
handleBoxChildAttachedClosure cb = newCClosure =<< mkHandleBoxChildAttachedCallback wrapped
    where wrapped = handleBoxChildAttachedCallbackWrapper cb

handleBoxChildAttachedCallbackWrapper ::
    HandleBoxChildAttachedCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
handleBoxChildAttachedCallbackWrapper _cb _ widget _ = do
    widget' <- (newObject Widget) widget
    _cb  widget'

onHandleBoxChildAttached :: (GObject a, MonadIO m) => a -> HandleBoxChildAttachedCallback -> m SignalHandlerId
onHandleBoxChildAttached obj cb = liftIO $ connectHandleBoxChildAttached obj cb SignalConnectBefore
afterHandleBoxChildAttached :: (GObject a, MonadIO m) => a -> HandleBoxChildAttachedCallback -> m SignalHandlerId
afterHandleBoxChildAttached obj cb = connectHandleBoxChildAttached obj cb SignalConnectAfter

connectHandleBoxChildAttached :: (GObject a, MonadIO m) =>
                                 a -> HandleBoxChildAttachedCallback -> SignalConnectMode -> m SignalHandlerId
connectHandleBoxChildAttached obj cb after = liftIO $ do
    cb' <- mkHandleBoxChildAttachedCallback (handleBoxChildAttachedCallbackWrapper cb)
    connectSignalFunPtr obj "child-attached" cb' after

-- signal HandleBox::child-detached
type HandleBoxChildDetachedCallback =
    Widget ->
    IO ()

noHandleBoxChildDetachedCallback :: Maybe HandleBoxChildDetachedCallback
noHandleBoxChildDetachedCallback = Nothing

type HandleBoxChildDetachedCallbackC =
    Ptr () ->                               -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkHandleBoxChildDetachedCallback :: HandleBoxChildDetachedCallbackC -> IO (FunPtr HandleBoxChildDetachedCallbackC)

handleBoxChildDetachedClosure :: HandleBoxChildDetachedCallback -> IO Closure
handleBoxChildDetachedClosure cb = newCClosure =<< mkHandleBoxChildDetachedCallback wrapped
    where wrapped = handleBoxChildDetachedCallbackWrapper cb

handleBoxChildDetachedCallbackWrapper ::
    HandleBoxChildDetachedCallback ->
    Ptr () ->
    Ptr Widget ->
    Ptr () ->
    IO ()
handleBoxChildDetachedCallbackWrapper _cb _ widget _ = do
    widget' <- (newObject Widget) widget
    _cb  widget'

onHandleBoxChildDetached :: (GObject a, MonadIO m) => a -> HandleBoxChildDetachedCallback -> m SignalHandlerId
onHandleBoxChildDetached obj cb = liftIO $ connectHandleBoxChildDetached obj cb SignalConnectBefore
afterHandleBoxChildDetached :: (GObject a, MonadIO m) => a -> HandleBoxChildDetachedCallback -> m SignalHandlerId
afterHandleBoxChildDetached obj cb = connectHandleBoxChildDetached obj cb SignalConnectAfter

connectHandleBoxChildDetached :: (GObject a, MonadIO m) =>
                                 a -> HandleBoxChildDetachedCallback -> SignalConnectMode -> m SignalHandlerId
connectHandleBoxChildDetached obj cb after = liftIO $ do
    cb' <- mkHandleBoxChildDetachedCallback (handleBoxChildDetachedCallbackWrapper cb)
    connectSignalFunPtr obj "child-detached" cb' after

-- VVV Prop "child-detached"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]

getHandleBoxChildDetached :: (MonadIO m, HandleBoxK o) => o -> m Bool
getHandleBoxChildDetached obj = liftIO $ getObjectPropertyBool obj "child-detached"

data HandleBoxChildDetachedPropertyInfo
instance AttrInfo HandleBoxChildDetachedPropertyInfo where
    type AttrAllowedOps HandleBoxChildDetachedPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint HandleBoxChildDetachedPropertyInfo = (~) ()
    type AttrBaseTypeConstraint HandleBoxChildDetachedPropertyInfo = HandleBoxK
    type AttrGetType HandleBoxChildDetachedPropertyInfo = Bool
    type AttrLabel HandleBoxChildDetachedPropertyInfo = "HandleBox::child-detached"
    attrGet _ = getHandleBoxChildDetached
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "handle-position"
   -- Type: TInterface "Gtk" "PositionType"
   -- Flags: [PropertyReadable,PropertyWritable]

getHandleBoxHandlePosition :: (MonadIO m, HandleBoxK o) => o -> m PositionType
getHandleBoxHandlePosition obj = liftIO $ getObjectPropertyEnum obj "handle-position"

setHandleBoxHandlePosition :: (MonadIO m, HandleBoxK o) => o -> PositionType -> m ()
setHandleBoxHandlePosition obj val = liftIO $ setObjectPropertyEnum obj "handle-position" val

constructHandleBoxHandlePosition :: PositionType -> IO ([Char], GValue)
constructHandleBoxHandlePosition val = constructObjectPropertyEnum "handle-position" val

data HandleBoxHandlePositionPropertyInfo
instance AttrInfo HandleBoxHandlePositionPropertyInfo where
    type AttrAllowedOps HandleBoxHandlePositionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint HandleBoxHandlePositionPropertyInfo = (~) PositionType
    type AttrBaseTypeConstraint HandleBoxHandlePositionPropertyInfo = HandleBoxK
    type AttrGetType HandleBoxHandlePositionPropertyInfo = PositionType
    type AttrLabel HandleBoxHandlePositionPropertyInfo = "HandleBox::handle-position"
    attrGet _ = getHandleBoxHandlePosition
    attrSet _ = setHandleBoxHandlePosition
    attrConstruct _ = constructHandleBoxHandlePosition

-- VVV Prop "shadow-type"
   -- Type: TInterface "Gtk" "ShadowType"
   -- Flags: [PropertyReadable,PropertyWritable]

getHandleBoxShadowType :: (MonadIO m, HandleBoxK o) => o -> m ShadowType
getHandleBoxShadowType obj = liftIO $ getObjectPropertyEnum obj "shadow-type"

setHandleBoxShadowType :: (MonadIO m, HandleBoxK o) => o -> ShadowType -> m ()
setHandleBoxShadowType obj val = liftIO $ setObjectPropertyEnum obj "shadow-type" val

constructHandleBoxShadowType :: ShadowType -> IO ([Char], GValue)
constructHandleBoxShadowType val = constructObjectPropertyEnum "shadow-type" val

data HandleBoxShadowTypePropertyInfo
instance AttrInfo HandleBoxShadowTypePropertyInfo where
    type AttrAllowedOps HandleBoxShadowTypePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint HandleBoxShadowTypePropertyInfo = (~) ShadowType
    type AttrBaseTypeConstraint HandleBoxShadowTypePropertyInfo = HandleBoxK
    type AttrGetType HandleBoxShadowTypePropertyInfo = ShadowType
    type AttrLabel HandleBoxShadowTypePropertyInfo = "HandleBox::shadow-type"
    attrGet _ = getHandleBoxShadowType
    attrSet _ = setHandleBoxShadowType
    attrConstruct _ = constructHandleBoxShadowType

-- VVV Prop "snap-edge"
   -- Type: TInterface "Gtk" "PositionType"
   -- Flags: [PropertyReadable,PropertyWritable]

getHandleBoxSnapEdge :: (MonadIO m, HandleBoxK o) => o -> m PositionType
getHandleBoxSnapEdge obj = liftIO $ getObjectPropertyEnum obj "snap-edge"

setHandleBoxSnapEdge :: (MonadIO m, HandleBoxK o) => o -> PositionType -> m ()
setHandleBoxSnapEdge obj val = liftIO $ setObjectPropertyEnum obj "snap-edge" val

constructHandleBoxSnapEdge :: PositionType -> IO ([Char], GValue)
constructHandleBoxSnapEdge val = constructObjectPropertyEnum "snap-edge" val

data HandleBoxSnapEdgePropertyInfo
instance AttrInfo HandleBoxSnapEdgePropertyInfo where
    type AttrAllowedOps HandleBoxSnapEdgePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint HandleBoxSnapEdgePropertyInfo = (~) PositionType
    type AttrBaseTypeConstraint HandleBoxSnapEdgePropertyInfo = HandleBoxK
    type AttrGetType HandleBoxSnapEdgePropertyInfo = PositionType
    type AttrLabel HandleBoxSnapEdgePropertyInfo = "HandleBox::snap-edge"
    attrGet _ = getHandleBoxSnapEdge
    attrSet _ = setHandleBoxSnapEdge
    attrConstruct _ = constructHandleBoxSnapEdge

-- VVV Prop "snap-edge-set"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]

getHandleBoxSnapEdgeSet :: (MonadIO m, HandleBoxK o) => o -> m Bool
getHandleBoxSnapEdgeSet obj = liftIO $ getObjectPropertyBool obj "snap-edge-set"

setHandleBoxSnapEdgeSet :: (MonadIO m, HandleBoxK o) => o -> Bool -> m ()
setHandleBoxSnapEdgeSet obj val = liftIO $ setObjectPropertyBool obj "snap-edge-set" val

constructHandleBoxSnapEdgeSet :: Bool -> IO ([Char], GValue)
constructHandleBoxSnapEdgeSet val = constructObjectPropertyBool "snap-edge-set" val

data HandleBoxSnapEdgeSetPropertyInfo
instance AttrInfo HandleBoxSnapEdgeSetPropertyInfo where
    type AttrAllowedOps HandleBoxSnapEdgeSetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint HandleBoxSnapEdgeSetPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint HandleBoxSnapEdgeSetPropertyInfo = HandleBoxK
    type AttrGetType HandleBoxSnapEdgeSetPropertyInfo = Bool
    type AttrLabel HandleBoxSnapEdgeSetPropertyInfo = "HandleBox::snap-edge-set"
    attrGet _ = getHandleBoxSnapEdgeSet
    attrSet _ = setHandleBoxSnapEdgeSet
    attrConstruct _ = constructHandleBoxSnapEdgeSet

type instance AttributeList HandleBox = HandleBoxAttributeList
type HandleBoxAttributeList = ('[ '("app-paintable", WidgetAppPaintablePropertyInfo), '("border-width", ContainerBorderWidthPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("child", ContainerChildPropertyInfo), '("child-detached", HandleBoxChildDetachedPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("handle-position", HandleBoxHandlePositionPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("resize-mode", ContainerResizeModePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("shadow-type", HandleBoxShadowTypePropertyInfo), '("snap-edge", HandleBoxSnapEdgePropertyInfo), '("snap-edge-set", HandleBoxSnapEdgeSetPropertyInfo), '("style", WidgetStylePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo)] :: [(Symbol, *)])

data HandleBoxChildAttachedSignalInfo
instance SignalInfo HandleBoxChildAttachedSignalInfo where
    type HaskellCallbackType HandleBoxChildAttachedSignalInfo = HandleBoxChildAttachedCallback
    connectSignal _ = connectHandleBoxChildAttached

data HandleBoxChildDetachedSignalInfo
instance SignalInfo HandleBoxChildDetachedSignalInfo where
    type HaskellCallbackType HandleBoxChildDetachedSignalInfo = HandleBoxChildDetachedCallback
    connectSignal _ = connectHandleBoxChildDetached

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

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

foreign import ccall "gtk_handle_box_new" gtk_handle_box_new :: 
    IO (Ptr HandleBox)

{-# DEPRECATED handleBoxNew ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxNew ::
    (MonadIO m) =>
    m HandleBox
handleBoxNew  = liftIO $ do
    result <- gtk_handle_box_new
    checkUnexpectedReturnNULL "gtk_handle_box_new" result
    result' <- (newObject HandleBox) result
    return result'

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

foreign import ccall "gtk_handle_box_get_child_detached" gtk_handle_box_get_child_detached :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    IO CInt

{-# DEPRECATED handleBoxGetChildDetached ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxGetChildDetached ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    m Bool
handleBoxGetChildDetached _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_handle_box_get_child_detached _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "gtk_handle_box_get_handle_position" gtk_handle_box_get_handle_position :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    IO CUInt

{-# DEPRECATED handleBoxGetHandlePosition ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxGetHandlePosition ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    m PositionType
handleBoxGetHandlePosition _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_handle_box_get_handle_position _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "gtk_handle_box_get_shadow_type" gtk_handle_box_get_shadow_type :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    IO CUInt

{-# DEPRECATED handleBoxGetShadowType ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxGetShadowType ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    m ShadowType
handleBoxGetShadowType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_handle_box_get_shadow_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "gtk_handle_box_get_snap_edge" gtk_handle_box_get_snap_edge :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    IO CUInt

{-# DEPRECATED handleBoxGetSnapEdge ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxGetSnapEdge ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    m PositionType
handleBoxGetSnapEdge _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_handle_box_get_snap_edge _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "gtk_handle_box_set_handle_position" gtk_handle_box_set_handle_position :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    CUInt ->                                -- position : TInterface "Gtk" "PositionType"
    IO ()

{-# DEPRECATED handleBoxSetHandlePosition ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxSetHandlePosition ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    PositionType ->                         -- position
    m ()
handleBoxSetHandlePosition _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let position' = (fromIntegral . fromEnum) position
    gtk_handle_box_set_handle_position _obj' position'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "gtk_handle_box_set_shadow_type" gtk_handle_box_set_shadow_type :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    CUInt ->                                -- type : TInterface "Gtk" "ShadowType"
    IO ()

{-# DEPRECATED handleBoxSetShadowType ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxSetShadowType ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    ShadowType ->                           -- type
    m ()
handleBoxSetShadowType _obj type_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let type_' = (fromIntegral . fromEnum) type_
    gtk_handle_box_set_shadow_type _obj' type_'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "gtk_handle_box_set_snap_edge" gtk_handle_box_set_snap_edge :: 
    Ptr HandleBox ->                        -- _obj : TInterface "Gtk" "HandleBox"
    CUInt ->                                -- edge : TInterface "Gtk" "PositionType"
    IO ()

{-# DEPRECATED handleBoxSetSnapEdge ["(Since version 3.4)","#GtkHandleBox has been deprecated."]#-}
handleBoxSetSnapEdge ::
    (MonadIO m, HandleBoxK a) =>
    a ->                                    -- _obj
    PositionType ->                         -- edge
    m ()
handleBoxSetSnapEdge _obj edge = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let edge' = (fromIntegral . fromEnum) edge
    gtk_handle_box_set_snap_edge _obj' edge'
    touchManagedPtr _obj
    return ()