gi-atk-0.2.18.12: GI/Atk/Interfaces/Component.hs
{- |
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.Atk.Interfaces.Component
(
-- * Exported types
Component(..) ,
noComponent ,
ComponentK ,
-- * Methods
-- ** componentContains
componentContains ,
-- ** componentGetAlpha
componentGetAlpha ,
-- ** componentGetExtents
componentGetExtents ,
-- ** componentGetLayer
componentGetLayer ,
-- ** componentGetMdiZorder
componentGetMdiZorder ,
-- ** componentGetPosition
componentGetPosition ,
-- ** componentGetSize
componentGetSize ,
-- ** componentGrabFocus
componentGrabFocus ,
-- ** componentRefAccessibleAtPoint
componentRefAccessibleAtPoint ,
-- ** componentRemoveFocusHandler
componentRemoveFocusHandler ,
-- ** componentSetExtents
componentSetExtents ,
-- ** componentSetPosition
componentSetPosition ,
-- ** componentSetSize
componentSetSize ,
-- * Signals
-- ** BoundsChanged
ComponentBoundsChangedCallback ,
ComponentBoundsChangedCallbackC ,
ComponentBoundsChangedSignalInfo ,
afterComponentBoundsChanged ,
componentBoundsChangedCallbackWrapper ,
componentBoundsChangedClosure ,
mkComponentBoundsChangedCallback ,
noComponentBoundsChangedCallback ,
onComponentBoundsChanged ,
) 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.Atk.Types
import GI.Atk.Callbacks
-- interface Component
newtype Component = Component (ForeignPtr Component)
noComponent :: Maybe Component
noComponent = Nothing
-- 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
type instance AttributeList Component = ComponentAttributeList
type ComponentAttributeList = ('[ ] :: [(Symbol, *)])
data ComponentBoundsChangedSignalInfo
instance SignalInfo ComponentBoundsChangedSignalInfo where
type HaskellCallbackType ComponentBoundsChangedSignalInfo = ComponentBoundsChangedCallback
connectSignal _ = connectComponentBoundsChanged
type instance SignalList Component = ComponentSignalList
type ComponentSignalList = ('[ '("bounds-changed", ComponentBoundsChangedSignalInfo)] :: [(Symbol, *)])
class ForeignPtrNewtype a => ComponentK a
instance (ForeignPtrNewtype o, IsDescendantOf Component o) => ComponentK o
type instance ParentTypes Component = ComponentParentTypes
type ComponentParentTypes = '[]
-- 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'
checkUnexpectedReturnNULL "atk_component_ref_accessible_at_point" result
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 the #AtkObject::state-change \"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'