{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if !defined(__HADDOCK_VERSION__)
#define ENABLE_OVERLOADING
#endif
module GI.Atk.Interfaces.Component
(
Component(..) ,
IsComponent ,
toComponent ,
#if defined(ENABLE_OVERLOADING)
ResolveComponentMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ComponentContainsMethodInfo ,
#endif
componentContains ,
#if defined(ENABLE_OVERLOADING)
ComponentGetAlphaMethodInfo ,
#endif
componentGetAlpha ,
#if defined(ENABLE_OVERLOADING)
ComponentGetExtentsMethodInfo ,
#endif
componentGetExtents ,
#if defined(ENABLE_OVERLOADING)
ComponentGetLayerMethodInfo ,
#endif
componentGetLayer ,
#if defined(ENABLE_OVERLOADING)
ComponentGetMdiZorderMethodInfo ,
#endif
componentGetMdiZorder ,
#if defined(ENABLE_OVERLOADING)
ComponentGetPositionMethodInfo ,
#endif
componentGetPosition ,
#if defined(ENABLE_OVERLOADING)
ComponentGetSizeMethodInfo ,
#endif
componentGetSize ,
#if defined(ENABLE_OVERLOADING)
ComponentGrabFocusMethodInfo ,
#endif
componentGrabFocus ,
#if defined(ENABLE_OVERLOADING)
ComponentRefAccessibleAtPointMethodInfo ,
#endif
componentRefAccessibleAtPoint ,
#if defined(ENABLE_OVERLOADING)
ComponentRemoveFocusHandlerMethodInfo ,
#endif
componentRemoveFocusHandler ,
#if defined(ENABLE_OVERLOADING)
ComponentScrollToMethodInfo ,
#endif
componentScrollTo ,
#if defined(ENABLE_OVERLOADING)
ComponentScrollToPointMethodInfo ,
#endif
componentScrollToPoint ,
#if defined(ENABLE_OVERLOADING)
ComponentSetExtentsMethodInfo ,
#endif
componentSetExtents ,
#if defined(ENABLE_OVERLOADING)
ComponentSetPositionMethodInfo ,
#endif
componentSetPosition ,
#if defined(ENABLE_OVERLOADING)
ComponentSetSizeMethodInfo ,
#endif
componentSetSize ,
ComponentBoundsChangedCallback ,
#if defined(ENABLE_OVERLOADING)
ComponentBoundsChangedSignalInfo ,
#endif
afterComponentBoundsChanged ,
onComponentBoundsChanged ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import {-# SOURCE #-} qualified GI.Atk.Enums as Atk.Enums
import {-# SOURCE #-} qualified GI.Atk.Objects.Object as Atk.Object
import {-# SOURCE #-} qualified GI.Atk.Objects.Relation as Atk.Relation
import {-# SOURCE #-} qualified GI.Atk.Objects.RelationSet as Atk.RelationSet
import {-# SOURCE #-} qualified GI.Atk.Objects.StateSet as Atk.StateSet
import {-# SOURCE #-} qualified GI.Atk.Structs.PropertyValues as Atk.PropertyValues
import {-# SOURCE #-} qualified GI.Atk.Structs.Rectangle as Atk.Rectangle
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GObject.Structs.ValueArray as GObject.ValueArray
#else
import {-# SOURCE #-} qualified GI.Atk.Enums as Atk.Enums
import {-# SOURCE #-} qualified GI.Atk.Objects.Object as Atk.Object
import {-# SOURCE #-} qualified GI.Atk.Structs.Rectangle as Atk.Rectangle
import qualified GI.GObject.Objects.Object as GObject.Object
#endif
newtype Component = Component (SP.ManagedPtr Component)
deriving (Component -> Component -> Bool
(Component -> Component -> Bool)
-> (Component -> Component -> Bool) -> Eq Component
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Component -> Component -> Bool
== :: Component -> Component -> Bool
$c/= :: Component -> Component -> Bool
/= :: Component -> Component -> Bool
Eq)
instance SP.ManagedPtrNewtype Component where
toManagedPtr :: Component -> ManagedPtr Component
toManagedPtr (Component ManagedPtr Component
p) = ManagedPtr Component
p
foreign import ccall "atk_component_get_type"
c_atk_component_get_type :: IO B.Types.GType
instance B.Types.TypedObject Component where
glibType :: IO GType
glibType = IO GType
c_atk_component_get_type
instance B.Types.GObject Component
class (SP.GObject o, O.IsDescendantOf Component o) => IsComponent o
instance (SP.GObject o, O.IsDescendantOf Component o) => IsComponent o
instance O.HasParentTypes Component
type instance O.ParentTypes Component = '[GObject.Object.Object]
toComponent :: (MIO.MonadIO m, IsComponent o) => o -> m Component
toComponent :: forall (m :: * -> *) o.
(MonadIO m, IsComponent o) =>
o -> m Component
toComponent = IO Component -> m Component
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Component -> m Component)
-> (o -> IO Component) -> o -> m Component
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Component -> Component) -> o -> IO Component
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Component -> Component
Component
instance B.GValue.IsGValue (Maybe Component) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_atk_component_get_type
gvalueSet_ :: Ptr GValue -> Maybe Component -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Component
P.Nothing = Ptr GValue -> Ptr Component -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Component
forall a. Ptr a
FP.nullPtr :: FP.Ptr Component)
gvalueSet_ Ptr GValue
gv (P.Just Component
obj) = Component -> (Ptr Component -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Component
obj (Ptr GValue -> Ptr Component -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Component)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr Component)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Component)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject Component ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Component
type instance O.AttributeList Component = ComponentAttributeList
type ComponentAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveComponentMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveComponentMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveComponentMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveComponentMethod "contains" o = ComponentContainsMethodInfo
ResolveComponentMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveComponentMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveComponentMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveComponentMethod "grabFocus" o = ComponentGrabFocusMethodInfo
ResolveComponentMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveComponentMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveComponentMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveComponentMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveComponentMethod "refAccessibleAtPoint" o = ComponentRefAccessibleAtPointMethodInfo
ResolveComponentMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveComponentMethod "removeFocusHandler" o = ComponentRemoveFocusHandlerMethodInfo
ResolveComponentMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveComponentMethod "scrollTo" o = ComponentScrollToMethodInfo
ResolveComponentMethod "scrollToPoint" o = ComponentScrollToPointMethodInfo
ResolveComponentMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveComponentMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveComponentMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveComponentMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveComponentMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveComponentMethod "getAlpha" o = ComponentGetAlphaMethodInfo
ResolveComponentMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveComponentMethod "getExtents" o = ComponentGetExtentsMethodInfo
ResolveComponentMethod "getLayer" o = ComponentGetLayerMethodInfo
ResolveComponentMethod "getMdiZorder" o = ComponentGetMdiZorderMethodInfo
ResolveComponentMethod "getPosition" o = ComponentGetPositionMethodInfo
ResolveComponentMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveComponentMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveComponentMethod "getSize" o = ComponentGetSizeMethodInfo
ResolveComponentMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveComponentMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveComponentMethod "setExtents" o = ComponentSetExtentsMethodInfo
ResolveComponentMethod "setPosition" o = ComponentSetPositionMethodInfo
ResolveComponentMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveComponentMethod "setSize" o = ComponentSetSizeMethodInfo
ResolveComponentMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveComponentMethod t Component, O.OverloadedMethod info Component p) => OL.IsLabel t (Component -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveComponentMethod t Component, O.OverloadedMethod info Component p, R.HasField t Component p) => R.HasField t Component p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveComponentMethod t Component, O.OverloadedMethodInfo info Component) => OL.IsLabel t (O.MethodProxy info Component) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
foreign import ccall "atk_component_contains" atk_component_contains ::
Ptr Component ->
Int32 ->
Int32 ->
CUInt ->
IO CInt
componentContains ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> Int32
-> Int32
-> Atk.Enums.CoordType
-> m Bool
componentContains :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> Int32 -> Int32 -> CoordType -> m Bool
componentContains a
component Int32
x Int32
y CoordType
coordType = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
let coordType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (CoordType -> Int) -> CoordType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CoordType -> Int
forall a. Enum a => a -> Int
fromEnum) CoordType
coordType
result <- atk_component_contains component' x y coordType'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr component
return result'
#if defined(ENABLE_OVERLOADING)
data ComponentContainsMethodInfo
instance (signature ~ (Int32 -> Int32 -> Atk.Enums.CoordType -> m Bool), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentContainsMethodInfo a signature where
overloadedMethod = componentContains
instance O.OverloadedMethodInfo ComponentContainsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentContains",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentContains"
})
#endif
foreign import ccall "atk_component_get_alpha" atk_component_get_alpha ::
Ptr Component ->
IO CDouble
componentGetAlpha ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m Double
componentGetAlpha :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> m Double
componentGetAlpha a
component = IO Double -> m Double
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
result <- atk_component_get_alpha component'
let result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
touchManagedPtr component
return result'
#if defined(ENABLE_OVERLOADING)
data ComponentGetAlphaMethodInfo
instance (signature ~ (m Double), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentGetAlphaMethodInfo a signature where
overloadedMethod = componentGetAlpha
instance O.OverloadedMethodInfo ComponentGetAlphaMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentGetAlpha",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentGetAlpha"
})
#endif
foreign import ccall "atk_component_get_extents" atk_component_get_extents ::
Ptr Component ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Int32 ->
CUInt ->
IO ()
componentGetExtents ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> Atk.Enums.CoordType
-> m ((Int32, Int32, Int32, Int32))
componentGetExtents :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> CoordType -> m (Int32, Int32, Int32, Int32)
componentGetExtents a
component CoordType
coordType = IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32))
-> IO (Int32, Int32, Int32, Int32)
-> m (Int32, Int32, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
x <- allocMem :: IO (Ptr Int32)
y <- allocMem :: IO (Ptr Int32)
width <- allocMem :: IO (Ptr Int32)
height <- allocMem :: IO (Ptr Int32)
let coordType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (CoordType -> Int) -> CoordType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CoordType -> Int
forall a. Enum a => a -> Int
fromEnum) CoordType
coordType
atk_component_get_extents component' x y width height coordType'
x' <- peek x
y' <- peek y
width' <- peek width
height' <- peek height
touchManagedPtr component
freeMem x
freeMem y
freeMem width
freeMem height
return (x', y', width', height')
#if defined(ENABLE_OVERLOADING)
data ComponentGetExtentsMethodInfo
instance (signature ~ (Atk.Enums.CoordType -> m ((Int32, Int32, Int32, Int32))), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentGetExtentsMethodInfo a signature where
overloadedMethod = componentGetExtents
instance O.OverloadedMethodInfo ComponentGetExtentsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentGetExtents",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentGetExtents"
})
#endif
foreign import ccall "atk_component_get_layer" atk_component_get_layer ::
Ptr Component ->
IO CUInt
componentGetLayer ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m Atk.Enums.Layer
componentGetLayer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> m Layer
componentGetLayer a
component = IO Layer -> m Layer
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Layer -> m Layer) -> IO Layer -> m Layer
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
result <- atk_component_get_layer component'
let result' = (Int -> Layer
forall a. Enum a => Int -> a
toEnum (Int -> Layer) -> (CUInt -> Int) -> CUInt -> Layer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
touchManagedPtr component
return result'
#if defined(ENABLE_OVERLOADING)
data ComponentGetLayerMethodInfo
instance (signature ~ (m Atk.Enums.Layer), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentGetLayerMethodInfo a signature where
overloadedMethod = componentGetLayer
instance O.OverloadedMethodInfo ComponentGetLayerMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentGetLayer",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentGetLayer"
})
#endif
foreign import ccall "atk_component_get_mdi_zorder" atk_component_get_mdi_zorder ::
Ptr Component ->
IO Int32
componentGetMdiZorder ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m Int32
componentGetMdiZorder :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> m Int32
componentGetMdiZorder a
component = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
result <- atk_component_get_mdi_zorder component'
touchManagedPtr component
return result
#if defined(ENABLE_OVERLOADING)
data ComponentGetMdiZorderMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentGetMdiZorderMethodInfo a signature where
overloadedMethod = componentGetMdiZorder
instance O.OverloadedMethodInfo ComponentGetMdiZorderMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentGetMdiZorder",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentGetMdiZorder"
})
#endif
foreign import ccall "atk_component_get_position" atk_component_get_position ::
Ptr Component ->
Ptr Int32 ->
Ptr Int32 ->
CUInt ->
IO ()
{-# DEPRECATED componentGetPosition ["Since 2.12. Use 'GI.Atk.Interfaces.Component.componentGetExtents' instead."] #-}
componentGetPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> Atk.Enums.CoordType
-> m ((Int32, Int32))
componentGetPosition :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> CoordType -> m (Int32, Int32)
componentGetPosition a
component CoordType
coordType = IO (Int32, Int32) -> m (Int32, Int32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
x <- allocMem :: IO (Ptr Int32)
y <- allocMem :: IO (Ptr Int32)
let coordType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (CoordType -> Int) -> CoordType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CoordType -> Int
forall a. Enum a => a -> Int
fromEnum) CoordType
coordType
atk_component_get_position component' x y coordType'
x' <- peek x
y' <- peek y
touchManagedPtr component
freeMem x
freeMem y
return (x', y')
#if defined(ENABLE_OVERLOADING)
data ComponentGetPositionMethodInfo
instance (signature ~ (Atk.Enums.CoordType -> m ((Int32, Int32))), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentGetPositionMethodInfo a signature where
overloadedMethod = componentGetPosition
instance O.OverloadedMethodInfo ComponentGetPositionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentGetPosition",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentGetPosition"
})
#endif
foreign import ccall "atk_component_get_size" atk_component_get_size ::
Ptr Component ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
{-# DEPRECATED componentGetSize ["Since 2.12. Use 'GI.Atk.Interfaces.Component.componentGetExtents' instead."] #-}
componentGetSize ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m ((Int32, Int32))
componentGetSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> m (Int32, Int32)
componentGetSize a
component = IO (Int32, Int32) -> m (Int32, Int32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
width <- allocMem :: IO (Ptr Int32)
height <- allocMem :: IO (Ptr Int32)
atk_component_get_size component' width height
width' <- peek width
height' <- peek height
touchManagedPtr component
freeMem width
freeMem height
return (width', height')
#if defined(ENABLE_OVERLOADING)
data ComponentGetSizeMethodInfo
instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentGetSizeMethodInfo a signature where
overloadedMethod = componentGetSize
instance O.OverloadedMethodInfo ComponentGetSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentGetSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentGetSize"
})
#endif
foreign import ccall "atk_component_grab_focus" atk_component_grab_focus ::
Ptr Component ->
IO CInt
componentGrabFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> m Bool
componentGrabFocus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> m Bool
componentGrabFocus a
component = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
result <- atk_component_grab_focus component'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr component
return result'
#if defined(ENABLE_OVERLOADING)
data ComponentGrabFocusMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentGrabFocusMethodInfo a signature where
overloadedMethod = componentGrabFocus
instance O.OverloadedMethodInfo ComponentGrabFocusMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentGrabFocus",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentGrabFocus"
})
#endif
foreign import ccall "atk_component_ref_accessible_at_point" atk_component_ref_accessible_at_point ::
Ptr Component ->
Int32 ->
Int32 ->
CUInt ->
IO (Ptr Atk.Object.Object)
componentRefAccessibleAtPoint ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> Int32
-> Int32
-> Atk.Enums.CoordType
-> m (Maybe Atk.Object.Object)
componentRefAccessibleAtPoint :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> Int32 -> Int32 -> CoordType -> m (Maybe Object)
componentRefAccessibleAtPoint a
component Int32
x Int32
y CoordType
coordType = IO (Maybe Object) -> m (Maybe Object)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Object) -> m (Maybe Object))
-> IO (Maybe Object) -> m (Maybe Object)
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
let coordType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (CoordType -> Int) -> CoordType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CoordType -> Int
forall a. Enum a => a -> Int
fromEnum) CoordType
coordType
result <- atk_component_ref_accessible_at_point component' x y coordType'
maybeResult <- convertIfNonNull result $ \Ptr Object
result' -> do
result'' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
Atk.Object.Object) Ptr Object
result'
return result''
touchManagedPtr component
return maybeResult
#if defined(ENABLE_OVERLOADING)
data ComponentRefAccessibleAtPointMethodInfo
instance (signature ~ (Int32 -> Int32 -> Atk.Enums.CoordType -> m (Maybe Atk.Object.Object)), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentRefAccessibleAtPointMethodInfo a signature where
overloadedMethod = componentRefAccessibleAtPoint
instance O.OverloadedMethodInfo ComponentRefAccessibleAtPointMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentRefAccessibleAtPoint",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentRefAccessibleAtPoint"
})
#endif
foreign import ccall "atk_component_remove_focus_handler" atk_component_remove_focus_handler ::
Ptr Component ->
Word32 ->
IO ()
{-# DEPRECATED componentRemoveFocusHandler ["(Since version 2.9.4)","If you need to track when an object gains or","lose the focus, use the [Object::stateChange](\"GI.Atk.Objects.Object#g:signal:stateChange\") \\\"focused\\\" notification instead."] #-}
componentRemoveFocusHandler ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> Word32
-> m ()
componentRemoveFocusHandler :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> Word32 -> m ()
componentRemoveFocusHandler a
component Word32
handlerId = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
atk_component_remove_focus_handler component' handlerId
touchManagedPtr component
return ()
#if defined(ENABLE_OVERLOADING)
data ComponentRemoveFocusHandlerMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentRemoveFocusHandlerMethodInfo a signature where
overloadedMethod = componentRemoveFocusHandler
instance O.OverloadedMethodInfo ComponentRemoveFocusHandlerMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentRemoveFocusHandler",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentRemoveFocusHandler"
})
#endif
foreign import ccall "atk_component_scroll_to" atk_component_scroll_to ::
Ptr Component ->
CUInt ->
IO CInt
componentScrollTo ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> Atk.Enums.ScrollType
-> m Bool
componentScrollTo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> ScrollType -> m Bool
componentScrollTo a
component ScrollType
type_ = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
let type_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ScrollType -> Int) -> ScrollType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ScrollType -> Int
forall a. Enum a => a -> Int
fromEnum) ScrollType
type_
result <- atk_component_scroll_to component' type_'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr component
return result'
#if defined(ENABLE_OVERLOADING)
data ComponentScrollToMethodInfo
instance (signature ~ (Atk.Enums.ScrollType -> m Bool), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentScrollToMethodInfo a signature where
overloadedMethod = componentScrollTo
instance O.OverloadedMethodInfo ComponentScrollToMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentScrollTo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentScrollTo"
})
#endif
foreign import ccall "atk_component_scroll_to_point" atk_component_scroll_to_point ::
Ptr Component ->
CUInt ->
Int32 ->
Int32 ->
IO CInt
componentScrollToPoint ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> Atk.Enums.CoordType
-> Int32
-> Int32
-> m Bool
componentScrollToPoint :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> CoordType -> Int32 -> Int32 -> m Bool
componentScrollToPoint a
component CoordType
coords Int32
x Int32
y = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
let coords' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (CoordType -> Int) -> CoordType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CoordType -> Int
forall a. Enum a => a -> Int
fromEnum) CoordType
coords
result <- atk_component_scroll_to_point component' coords' x y
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr component
return result'
#if defined(ENABLE_OVERLOADING)
data ComponentScrollToPointMethodInfo
instance (signature ~ (Atk.Enums.CoordType -> Int32 -> Int32 -> m Bool), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentScrollToPointMethodInfo a signature where
overloadedMethod = componentScrollToPoint
instance O.OverloadedMethodInfo ComponentScrollToPointMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentScrollToPoint",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentScrollToPoint"
})
#endif
foreign import ccall "atk_component_set_extents" atk_component_set_extents ::
Ptr Component ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
CUInt ->
IO CInt
componentSetExtents ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> Int32
-> Int32
-> Int32
-> Int32
-> Atk.Enums.CoordType
-> m Bool
componentSetExtents :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> Int32 -> Int32 -> Int32 -> Int32 -> CoordType -> m Bool
componentSetExtents a
component Int32
x Int32
y Int32
width Int32
height CoordType
coordType = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
let coordType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (CoordType -> Int) -> CoordType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CoordType -> Int
forall a. Enum a => a -> Int
fromEnum) CoordType
coordType
result <- atk_component_set_extents component' x y width height coordType'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr component
return result'
#if defined(ENABLE_OVERLOADING)
data ComponentSetExtentsMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> Atk.Enums.CoordType -> m Bool), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentSetExtentsMethodInfo a signature where
overloadedMethod = componentSetExtents
instance O.OverloadedMethodInfo ComponentSetExtentsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentSetExtents",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentSetExtents"
})
#endif
foreign import ccall "atk_component_set_position" atk_component_set_position ::
Ptr Component ->
Int32 ->
Int32 ->
CUInt ->
IO CInt
componentSetPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> Int32
-> Int32
-> Atk.Enums.CoordType
-> m Bool
componentSetPosition :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> Int32 -> Int32 -> CoordType -> m Bool
componentSetPosition a
component Int32
x Int32
y CoordType
coordType = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
let coordType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (CoordType -> Int) -> CoordType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CoordType -> Int
forall a. Enum a => a -> Int
fromEnum) CoordType
coordType
result <- atk_component_set_position component' x y coordType'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr component
return result'
#if defined(ENABLE_OVERLOADING)
data ComponentSetPositionMethodInfo
instance (signature ~ (Int32 -> Int32 -> Atk.Enums.CoordType -> m Bool), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentSetPositionMethodInfo a signature where
overloadedMethod = componentSetPosition
instance O.OverloadedMethodInfo ComponentSetPositionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentSetPosition",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentSetPosition"
})
#endif
foreign import ccall "atk_component_set_size" atk_component_set_size ::
Ptr Component ->
Int32 ->
Int32 ->
IO CInt
componentSetSize ::
(B.CallStack.HasCallStack, MonadIO m, IsComponent a) =>
a
-> Int32
-> Int32
-> m Bool
componentSetSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsComponent a) =>
a -> Int32 -> Int32 -> m Bool
componentSetSize a
component Int32
width Int32
height = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
component' <- a -> IO (Ptr Component)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
component
result <- atk_component_set_size component' width height
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr component
return result'
#if defined(ENABLE_OVERLOADING)
data ComponentSetSizeMethodInfo
instance (signature ~ (Int32 -> Int32 -> m Bool), MonadIO m, IsComponent a) => O.OverloadedMethod ComponentSetSizeMethodInfo a signature where
overloadedMethod = componentSetSize
instance O.OverloadedMethodInfo ComponentSetSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component.componentSetSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#v:componentSetSize"
})
#endif
type ComponentBoundsChangedCallback =
Atk.Rectangle.Rectangle
-> IO ()
type C_ComponentBoundsChangedCallback =
Ptr Component ->
Ptr Atk.Rectangle.Rectangle ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ComponentBoundsChangedCallback :: C_ComponentBoundsChangedCallback -> IO (FunPtr C_ComponentBoundsChangedCallback)
wrap_ComponentBoundsChangedCallback ::
GObject a => (a -> ComponentBoundsChangedCallback) ->
C_ComponentBoundsChangedCallback
wrap_ComponentBoundsChangedCallback :: forall a.
GObject a =>
(a -> ComponentBoundsChangedCallback)
-> C_ComponentBoundsChangedCallback
wrap_ComponentBoundsChangedCallback a -> ComponentBoundsChangedCallback
gi'cb Ptr Component
gi'selfPtr Ptr Rectangle
arg1 Ptr ()
_ = do
Ptr Rectangle -> ComponentBoundsChangedCallback -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Rectangle
arg1 (ComponentBoundsChangedCallback -> IO ())
-> ComponentBoundsChangedCallback -> IO ()
forall a b. (a -> b) -> a -> b
$ \Rectangle
arg1' -> do
Ptr Component -> (Component -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Component
gi'selfPtr ((Component -> IO ()) -> IO ()) -> (Component -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Component
gi'self -> a -> ComponentBoundsChangedCallback
gi'cb (Component -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Component
gi'self) Rectangle
arg1'
onComponentBoundsChanged :: (IsComponent a, MonadIO m) => a -> ((?self :: a) => ComponentBoundsChangedCallback) -> m SignalHandlerId
onComponentBoundsChanged :: forall a (m :: * -> *).
(IsComponent a, MonadIO m) =>
a
-> ((?self::a) => ComponentBoundsChangedCallback)
-> m SignalHandlerId
onComponentBoundsChanged a
obj (?self::a) => ComponentBoundsChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ComponentBoundsChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ComponentBoundsChangedCallback
ComponentBoundsChangedCallback
cb
let wrapped' :: C_ComponentBoundsChangedCallback
wrapped' = (a -> ComponentBoundsChangedCallback)
-> C_ComponentBoundsChangedCallback
forall a.
GObject a =>
(a -> ComponentBoundsChangedCallback)
-> C_ComponentBoundsChangedCallback
wrap_ComponentBoundsChangedCallback a -> ComponentBoundsChangedCallback
wrapped
wrapped'' <- C_ComponentBoundsChangedCallback
-> IO (FunPtr C_ComponentBoundsChangedCallback)
mk_ComponentBoundsChangedCallback C_ComponentBoundsChangedCallback
wrapped'
connectSignalFunPtr obj "bounds-changed" wrapped'' SignalConnectBefore Nothing
afterComponentBoundsChanged :: (IsComponent a, MonadIO m) => a -> ((?self :: a) => ComponentBoundsChangedCallback) -> m SignalHandlerId
afterComponentBoundsChanged :: forall a (m :: * -> *).
(IsComponent a, MonadIO m) =>
a
-> ((?self::a) => ComponentBoundsChangedCallback)
-> m SignalHandlerId
afterComponentBoundsChanged a
obj (?self::a) => ComponentBoundsChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ComponentBoundsChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ComponentBoundsChangedCallback
ComponentBoundsChangedCallback
cb
let wrapped' :: C_ComponentBoundsChangedCallback
wrapped' = (a -> ComponentBoundsChangedCallback)
-> C_ComponentBoundsChangedCallback
forall a.
GObject a =>
(a -> ComponentBoundsChangedCallback)
-> C_ComponentBoundsChangedCallback
wrap_ComponentBoundsChangedCallback a -> ComponentBoundsChangedCallback
wrapped
wrapped'' <- C_ComponentBoundsChangedCallback
-> IO (FunPtr C_ComponentBoundsChangedCallback)
mk_ComponentBoundsChangedCallback C_ComponentBoundsChangedCallback
wrapped'
connectSignalFunPtr obj "bounds-changed" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data ComponentBoundsChangedSignalInfo
instance SignalInfo ComponentBoundsChangedSignalInfo where
type HaskellCallbackType ComponentBoundsChangedSignalInfo = ComponentBoundsChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ComponentBoundsChangedCallback cb
cb'' <- mk_ComponentBoundsChangedCallback cb'
connectSignalFunPtr obj "bounds-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Atk.Interfaces.Component::bounds-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-atk-2.0.28/docs/GI-Atk-Interfaces-Component.html#g:signal:boundsChanged"})
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Component = ComponentSignalList
type ComponentSignalList = ('[ '("boundsChanged", ComponentBoundsChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif