{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Atk.Interfaces.Selection
(
Selection(..) ,
IsSelection ,
toSelection ,
#if defined(ENABLE_OVERLOADING)
ResolveSelectionMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
SelectionAddSelectionMethodInfo ,
#endif
selectionAddSelection ,
#if defined(ENABLE_OVERLOADING)
SelectionClearSelectionMethodInfo ,
#endif
selectionClearSelection ,
#if defined(ENABLE_OVERLOADING)
SelectionGetSelectionCountMethodInfo ,
#endif
selectionGetSelectionCount ,
#if defined(ENABLE_OVERLOADING)
SelectionIsChildSelectedMethodInfo ,
#endif
selectionIsChildSelected ,
#if defined(ENABLE_OVERLOADING)
SelectionRefSelectionMethodInfo ,
#endif
selectionRefSelection ,
#if defined(ENABLE_OVERLOADING)
SelectionRemoveSelectionMethodInfo ,
#endif
selectionRemoveSelection ,
#if defined(ENABLE_OVERLOADING)
SelectionSelectAllSelectionMethodInfo ,
#endif
selectionSelectAllSelection ,
C_SelectionSelectionChangedCallback ,
SelectionSelectionChangedCallback ,
#if defined(ENABLE_OVERLOADING)
SelectionSelectionChangedSignalInfo ,
#endif
afterSelectionSelectionChanged ,
genClosure_SelectionSelectionChanged ,
mk_SelectionSelectionChangedCallback ,
noSelectionSelectionChangedCallback ,
onSelectionSelectionChanged ,
wrap_SelectionSelectionChangedCallback ,
) 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.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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.Text as T
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 {-# SOURCE #-} qualified GI.Atk.Objects.Object as Atk.Object
import qualified GI.GObject.Objects.Object as GObject.Object
newtype Selection = Selection (SP.ManagedPtr Selection)
deriving (Selection -> Selection -> Bool
(Selection -> Selection -> Bool)
-> (Selection -> Selection -> Bool) -> Eq Selection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Selection -> Selection -> Bool
$c/= :: Selection -> Selection -> Bool
== :: Selection -> Selection -> Bool
$c== :: Selection -> Selection -> Bool
Eq)
instance SP.ManagedPtrNewtype Selection where
toManagedPtr :: Selection -> ManagedPtr Selection
toManagedPtr (Selection ManagedPtr Selection
p) = ManagedPtr Selection
p
foreign import ccall "atk_selection_get_type"
c_atk_selection_get_type :: IO B.Types.GType
instance B.Types.TypedObject Selection where
glibType :: IO GType
glibType = IO GType
c_atk_selection_get_type
instance B.Types.GObject Selection
instance B.GValue.IsGValue Selection where
toGValue :: Selection -> IO GValue
toGValue Selection
o = do
GType
gtype <- IO GType
c_atk_selection_get_type
Selection -> (Ptr Selection -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Selection
o (GType
-> (GValue -> Ptr Selection -> IO ()) -> Ptr Selection -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Selection -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Selection
fromGValue GValue
gv = do
Ptr Selection
ptr <- GValue -> IO (Ptr Selection)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Selection)
(ManagedPtr Selection -> Selection)
-> Ptr Selection -> IO Selection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Selection -> Selection
Selection Ptr Selection
ptr
class (SP.GObject o, O.IsDescendantOf Selection o) => IsSelection o
instance (SP.GObject o, O.IsDescendantOf Selection o) => IsSelection o
instance O.HasParentTypes Selection
type instance O.ParentTypes Selection = '[GObject.Object.Object]
toSelection :: (MonadIO m, IsSelection o) => o -> m Selection
toSelection :: o -> m Selection
toSelection = IO Selection -> m Selection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Selection -> m Selection)
-> (o -> IO Selection) -> o -> m Selection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Selection -> Selection) -> o -> IO Selection
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Selection -> Selection
Selection
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Selection
type instance O.AttributeList Selection = SelectionAttributeList
type SelectionAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveSelectionMethod (t :: Symbol) (o :: *) :: * where
ResolveSelectionMethod "addSelection" o = SelectionAddSelectionMethodInfo
ResolveSelectionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSelectionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSelectionMethod "clearSelection" o = SelectionClearSelectionMethodInfo
ResolveSelectionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSelectionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSelectionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSelectionMethod "isChildSelected" o = SelectionIsChildSelectedMethodInfo
ResolveSelectionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSelectionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSelectionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSelectionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSelectionMethod "refSelection" o = SelectionRefSelectionMethodInfo
ResolveSelectionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSelectionMethod "removeSelection" o = SelectionRemoveSelectionMethodInfo
ResolveSelectionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSelectionMethod "selectAllSelection" o = SelectionSelectAllSelectionMethodInfo
ResolveSelectionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSelectionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSelectionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSelectionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSelectionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSelectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSelectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSelectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSelectionMethod "getSelectionCount" o = SelectionGetSelectionCountMethodInfo
ResolveSelectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSelectionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSelectionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSelectionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSelectionMethod t Selection, O.MethodInfo info Selection p) => OL.IsLabel t (Selection -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
foreign import ccall "atk_selection_add_selection" atk_selection_add_selection ::
Ptr Selection ->
Int32 ->
IO CInt
selectionAddSelection ::
(B.CallStack.HasCallStack, MonadIO m, IsSelection a) =>
a
-> Int32
-> m Bool
selectionAddSelection :: a -> Int32 -> m Bool
selectionAddSelection a
selection Int32
i = IO Bool -> m Bool
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
Ptr Selection
selection' <- a -> IO (Ptr Selection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
selection
CInt
result <- Ptr Selection -> Int32 -> IO CInt
atk_selection_add_selection Ptr Selection
selection' Int32
i
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
selection
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SelectionAddSelectionMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m, IsSelection a) => O.MethodInfo SelectionAddSelectionMethodInfo a signature where
overloadedMethod = selectionAddSelection
#endif
foreign import ccall "atk_selection_clear_selection" atk_selection_clear_selection ::
Ptr Selection ->
IO CInt
selectionClearSelection ::
(B.CallStack.HasCallStack, MonadIO m, IsSelection a) =>
a
-> m Bool
selectionClearSelection :: a -> m Bool
selectionClearSelection a
selection = IO Bool -> m Bool
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
Ptr Selection
selection' <- a -> IO (Ptr Selection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
selection
CInt
result <- Ptr Selection -> IO CInt
atk_selection_clear_selection Ptr Selection
selection'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
selection
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SelectionClearSelectionMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSelection a) => O.MethodInfo SelectionClearSelectionMethodInfo a signature where
overloadedMethod = selectionClearSelection
#endif
foreign import ccall "atk_selection_get_selection_count" atk_selection_get_selection_count ::
Ptr Selection ->
IO Int32
selectionGetSelectionCount ::
(B.CallStack.HasCallStack, MonadIO m, IsSelection a) =>
a
-> m Int32
selectionGetSelectionCount :: a -> m Int32
selectionGetSelectionCount a
selection = IO Int32 -> m Int32
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
Ptr Selection
selection' <- a -> IO (Ptr Selection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
selection
Int32
result <- Ptr Selection -> IO Int32
atk_selection_get_selection_count Ptr Selection
selection'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
selection
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data SelectionGetSelectionCountMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSelection a) => O.MethodInfo SelectionGetSelectionCountMethodInfo a signature where
overloadedMethod = selectionGetSelectionCount
#endif
foreign import ccall "atk_selection_is_child_selected" atk_selection_is_child_selected ::
Ptr Selection ->
Int32 ->
IO CInt
selectionIsChildSelected ::
(B.CallStack.HasCallStack, MonadIO m, IsSelection a) =>
a
-> Int32
-> m Bool
selectionIsChildSelected :: a -> Int32 -> m Bool
selectionIsChildSelected a
selection Int32
i = IO Bool -> m Bool
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
Ptr Selection
selection' <- a -> IO (Ptr Selection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
selection
CInt
result <- Ptr Selection -> Int32 -> IO CInt
atk_selection_is_child_selected Ptr Selection
selection' Int32
i
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
selection
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SelectionIsChildSelectedMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m, IsSelection a) => O.MethodInfo SelectionIsChildSelectedMethodInfo a signature where
overloadedMethod = selectionIsChildSelected
#endif
foreign import ccall "atk_selection_ref_selection" atk_selection_ref_selection ::
Ptr Selection ->
Int32 ->
IO (Ptr Atk.Object.Object)
selectionRefSelection ::
(B.CallStack.HasCallStack, MonadIO m, IsSelection a) =>
a
-> Int32
-> m (Maybe Atk.Object.Object)
selectionRefSelection :: a -> Int32 -> m (Maybe Object)
selectionRefSelection a
selection Int32
i = IO (Maybe Object) -> m (Maybe Object)
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
Ptr Selection
selection' <- a -> IO (Ptr Selection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
selection
Ptr Object
result <- Ptr Selection -> Int32 -> IO (Ptr Object)
atk_selection_ref_selection Ptr Selection
selection' Int32
i
Maybe Object
maybeResult <- Ptr Object -> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Object
result ((Ptr Object -> IO Object) -> IO (Maybe Object))
-> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. (a -> b) -> a -> b
$ \Ptr Object
result' -> do
Object
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'
Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
selection
Maybe Object -> IO (Maybe Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Object
maybeResult
#if defined(ENABLE_OVERLOADING)
data SelectionRefSelectionMethodInfo
instance (signature ~ (Int32 -> m (Maybe Atk.Object.Object)), MonadIO m, IsSelection a) => O.MethodInfo SelectionRefSelectionMethodInfo a signature where
overloadedMethod = selectionRefSelection
#endif
foreign import ccall "atk_selection_remove_selection" atk_selection_remove_selection ::
Ptr Selection ->
Int32 ->
IO CInt
selectionRemoveSelection ::
(B.CallStack.HasCallStack, MonadIO m, IsSelection a) =>
a
-> Int32
-> m Bool
selectionRemoveSelection :: a -> Int32 -> m Bool
selectionRemoveSelection a
selection Int32
i = IO Bool -> m Bool
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
Ptr Selection
selection' <- a -> IO (Ptr Selection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
selection
CInt
result <- Ptr Selection -> Int32 -> IO CInt
atk_selection_remove_selection Ptr Selection
selection' Int32
i
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
selection
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SelectionRemoveSelectionMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m, IsSelection a) => O.MethodInfo SelectionRemoveSelectionMethodInfo a signature where
overloadedMethod = selectionRemoveSelection
#endif
foreign import ccall "atk_selection_select_all_selection" atk_selection_select_all_selection ::
Ptr Selection ->
IO CInt
selectionSelectAllSelection ::
(B.CallStack.HasCallStack, MonadIO m, IsSelection a) =>
a
-> m Bool
selectionSelectAllSelection :: a -> m Bool
selectionSelectAllSelection a
selection = IO Bool -> m Bool
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
Ptr Selection
selection' <- a -> IO (Ptr Selection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
selection
CInt
result <- Ptr Selection -> IO CInt
atk_selection_select_all_selection Ptr Selection
selection'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
selection
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SelectionSelectAllSelectionMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSelection a) => O.MethodInfo SelectionSelectAllSelectionMethodInfo a signature where
overloadedMethod = selectionSelectAllSelection
#endif
type SelectionSelectionChangedCallback =
IO ()
noSelectionSelectionChangedCallback :: Maybe SelectionSelectionChangedCallback
noSelectionSelectionChangedCallback :: Maybe (IO ())
noSelectionSelectionChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_SelectionSelectionChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_SelectionSelectionChangedCallback :: C_SelectionSelectionChangedCallback -> IO (FunPtr C_SelectionSelectionChangedCallback)
genClosure_SelectionSelectionChanged :: MonadIO m => SelectionSelectionChangedCallback -> m (GClosure C_SelectionSelectionChangedCallback)
genClosure_SelectionSelectionChanged :: IO () -> m (GClosure C_SelectionSelectionChangedCallback)
genClosure_SelectionSelectionChanged IO ()
cb = IO (GClosure C_SelectionSelectionChangedCallback)
-> m (GClosure C_SelectionSelectionChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SelectionSelectionChangedCallback)
-> m (GClosure C_SelectionSelectionChangedCallback))
-> IO (GClosure C_SelectionSelectionChangedCallback)
-> m (GClosure C_SelectionSelectionChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SelectionSelectionChangedCallback
cb' = IO () -> C_SelectionSelectionChangedCallback
wrap_SelectionSelectionChangedCallback IO ()
cb
C_SelectionSelectionChangedCallback
-> IO (FunPtr C_SelectionSelectionChangedCallback)
mk_SelectionSelectionChangedCallback C_SelectionSelectionChangedCallback
cb' IO (FunPtr C_SelectionSelectionChangedCallback)
-> (FunPtr C_SelectionSelectionChangedCallback
-> IO (GClosure C_SelectionSelectionChangedCallback))
-> IO (GClosure C_SelectionSelectionChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SelectionSelectionChangedCallback
-> IO (GClosure C_SelectionSelectionChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SelectionSelectionChangedCallback ::
SelectionSelectionChangedCallback ->
C_SelectionSelectionChangedCallback
wrap_SelectionSelectionChangedCallback :: IO () -> C_SelectionSelectionChangedCallback
wrap_SelectionSelectionChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onSelectionSelectionChanged :: (IsSelection a, MonadIO m) => a -> SelectionSelectionChangedCallback -> m SignalHandlerId
onSelectionSelectionChanged :: a -> IO () -> m SignalHandlerId
onSelectionSelectionChanged a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_SelectionSelectionChangedCallback
cb' = IO () -> C_SelectionSelectionChangedCallback
wrap_SelectionSelectionChangedCallback IO ()
cb
FunPtr C_SelectionSelectionChangedCallback
cb'' <- C_SelectionSelectionChangedCallback
-> IO (FunPtr C_SelectionSelectionChangedCallback)
mk_SelectionSelectionChangedCallback C_SelectionSelectionChangedCallback
cb'
a
-> Text
-> FunPtr C_SelectionSelectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-changed" FunPtr C_SelectionSelectionChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterSelectionSelectionChanged :: (IsSelection a, MonadIO m) => a -> SelectionSelectionChangedCallback -> m SignalHandlerId
afterSelectionSelectionChanged :: a -> IO () -> m SignalHandlerId
afterSelectionSelectionChanged a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_SelectionSelectionChangedCallback
cb' = IO () -> C_SelectionSelectionChangedCallback
wrap_SelectionSelectionChangedCallback IO ()
cb
FunPtr C_SelectionSelectionChangedCallback
cb'' <- C_SelectionSelectionChangedCallback
-> IO (FunPtr C_SelectionSelectionChangedCallback)
mk_SelectionSelectionChangedCallback C_SelectionSelectionChangedCallback
cb'
a
-> Text
-> FunPtr C_SelectionSelectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-changed" FunPtr C_SelectionSelectionChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data SelectionSelectionChangedSignalInfo
instance SignalInfo SelectionSelectionChangedSignalInfo where
type HaskellCallbackType SelectionSelectionChangedSignalInfo = SelectionSelectionChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SelectionSelectionChangedCallback cb
cb'' <- mk_SelectionSelectionChangedCallback cb'
connectSignalFunPtr obj "selection-changed" cb'' connectMode detail
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Selection = SelectionSignalList
type SelectionSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("selectionChanged", SelectionSelectionChangedSignalInfo)] :: [(Symbol, *)])
#endif