{-# LINE 2 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
module Graphics.UI.Gtk.Misc.HandleBox (
HandleBox,
HandleBoxClass,
castToHandleBox, gTypeHandleBox,
toHandleBox,
handleBoxNew,
ShadowType(..),
handleBoxSetShadowType,
handleBoxGetShadowType,
PositionType(..),
handleBoxSetHandlePosition,
handleBoxGetHandlePosition,
handleBoxSetSnapEdge,
handleBoxGetSnapEdge,
handleBoxShadowType,
handleBoxHandlePosition,
handleBoxSnapEdge,
handleBoxSnapEdgeSet,
onChildAttached,
afterChildAttached,
onChildDetached,
afterChildDetached,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.Attributes
import System.Glib.Properties
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
{-# LINE 101 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
import Graphics.UI.Gtk.Signals
{-# LINE 102 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
import Graphics.UI.Gtk.General.Enums (ShadowType(..), PositionType(..))
{-# LINE 105 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
handleBoxNew :: IO HandleBox
handleBoxNew =
makeNewObject mkHandleBox $
liftM (castPtr :: Ptr Widget -> Ptr HandleBox) $
gtk_handle_box_new
{-# LINE 116 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
handleBoxSetShadowType :: HandleBoxClass self => self -> ShadowType -> IO ()
handleBoxSetShadowType self type_ =
(\(HandleBox arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_handle_box_set_shadow_type argPtr1 arg2)
{-# LINE 125 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
(toHandleBox self)
((fromIntegral . fromEnum) type_)
handleBoxGetShadowType :: HandleBoxClass self => self
-> IO ShadowType
handleBoxGetShadowType self =
liftM (toEnum . fromIntegral) $
(\(HandleBox arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_handle_box_get_shadow_type argPtr1)
{-# LINE 137 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
(toHandleBox self)
handleBoxSetHandlePosition :: HandleBoxClass self => self
-> PositionType
-> IO ()
handleBoxSetHandlePosition self position =
(\(HandleBox arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_handle_box_set_handle_position argPtr1 arg2)
{-# LINE 147 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
(toHandleBox self)
((fromIntegral . fromEnum) position)
handleBoxGetHandlePosition :: HandleBoxClass self => self
-> IO PositionType
handleBoxGetHandlePosition self =
liftM (toEnum . fromIntegral) $
(\(HandleBox arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_handle_box_get_handle_position argPtr1)
{-# LINE 158 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
(toHandleBox self)
handleBoxSetSnapEdge :: HandleBoxClass self => self
-> PositionType
-> IO ()
handleBoxSetSnapEdge self edge =
(\(HandleBox arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_handle_box_set_snap_edge argPtr1 arg2)
{-# LINE 175 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
(toHandleBox self)
((fromIntegral . fromEnum) edge)
handleBoxGetSnapEdge :: HandleBoxClass self => self
-> IO PositionType
handleBoxGetSnapEdge self =
liftM (toEnum . fromIntegral) $
(\(HandleBox arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_handle_box_get_snap_edge argPtr1)
{-# LINE 186 "./Graphics/UI/Gtk/Misc/HandleBox.chs" #-}
(toHandleBox self)
handleBoxShadowType :: HandleBoxClass self => Attr self ShadowType
handleBoxShadowType = newAttr
handleBoxGetShadowType
handleBoxSetShadowType
handleBoxHandlePosition :: HandleBoxClass self => Attr self PositionType
handleBoxHandlePosition = newAttr
handleBoxGetHandlePosition
handleBoxSetHandlePosition
handleBoxSnapEdge :: HandleBoxClass self => Attr self PositionType
handleBoxSnapEdge = newAttr
handleBoxGetSnapEdge
handleBoxSetSnapEdge
handleBoxSnapEdgeSet :: HandleBoxClass self => Attr self Bool
handleBoxSnapEdgeSet = newAttrFromBoolProperty "snap-edge-set"
onChildAttached, afterChildAttached :: HandleBoxClass self => self
-> IO ()
-> IO (ConnectId self)
onChildAttached = connect_NONE__NONE "child-attached" False
afterChildAttached = connect_NONE__NONE "child-attached" True
onChildDetached, afterChildDetached :: HandleBoxClass self => self
-> IO ()
-> IO (ConnectId self)
onChildDetached = connect_NONE__NONE "child-detached" False
afterChildDetached = connect_NONE__NONE "child-detached" True
foreign import ccall unsafe "gtk_handle_box_new"
gtk_handle_box_new :: (IO (Ptr Widget))
foreign import ccall safe "gtk_handle_box_set_shadow_type"
gtk_handle_box_set_shadow_type :: ((Ptr HandleBox) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_handle_box_get_shadow_type"
gtk_handle_box_get_shadow_type :: ((Ptr HandleBox) -> (IO CInt))
foreign import ccall safe "gtk_handle_box_set_handle_position"
gtk_handle_box_set_handle_position :: ((Ptr HandleBox) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_handle_box_get_handle_position"
gtk_handle_box_get_handle_position :: ((Ptr HandleBox) -> (IO CInt))
foreign import ccall safe "gtk_handle_box_set_snap_edge"
gtk_handle_box_set_snap_edge :: ((Ptr HandleBox) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_handle_box_get_snap_edge"
gtk_handle_box_get_snap_edge :: ((Ptr HandleBox) -> (IO CInt))