{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.KeyvalTrigger
(
KeyvalTrigger(..) ,
IsKeyvalTrigger ,
toKeyvalTrigger ,
#if defined(ENABLE_OVERLOADING)
ResolveKeyvalTriggerMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
KeyvalTriggerGetKeyvalMethodInfo ,
#endif
keyvalTriggerGetKeyval ,
#if defined(ENABLE_OVERLOADING)
KeyvalTriggerGetModifiersMethodInfo ,
#endif
keyvalTriggerGetModifiers ,
keyvalTriggerNew ,
#if defined(ENABLE_OVERLOADING)
KeyvalTriggerKeyvalPropertyInfo ,
#endif
constructKeyvalTriggerKeyval ,
getKeyvalTriggerKeyval ,
#if defined(ENABLE_OVERLOADING)
keyvalTriggerKeyval ,
#endif
#if defined(ENABLE_OVERLOADING)
KeyvalTriggerModifiersPropertyInfo ,
#endif
constructKeyvalTriggerModifiers ,
getKeyvalTriggerModifiers ,
#if defined(ENABLE_OVERLOADING)
keyvalTriggerModifiers ,
#endif
) 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.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 qualified GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Objects.ShortcutTrigger as Gtk.ShortcutTrigger
newtype KeyvalTrigger = KeyvalTrigger (SP.ManagedPtr KeyvalTrigger)
deriving (KeyvalTrigger -> KeyvalTrigger -> Bool
(KeyvalTrigger -> KeyvalTrigger -> Bool)
-> (KeyvalTrigger -> KeyvalTrigger -> Bool) -> Eq KeyvalTrigger
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KeyvalTrigger -> KeyvalTrigger -> Bool
$c/= :: KeyvalTrigger -> KeyvalTrigger -> Bool
== :: KeyvalTrigger -> KeyvalTrigger -> Bool
$c== :: KeyvalTrigger -> KeyvalTrigger -> Bool
Eq)
instance SP.ManagedPtrNewtype KeyvalTrigger where
toManagedPtr :: KeyvalTrigger -> ManagedPtr KeyvalTrigger
toManagedPtr (KeyvalTrigger ManagedPtr KeyvalTrigger
p) = ManagedPtr KeyvalTrigger
p
foreign import ccall "gtk_keyval_trigger_get_type"
c_gtk_keyval_trigger_get_type :: IO B.Types.GType
instance B.Types.TypedObject KeyvalTrigger where
glibType :: IO GType
glibType = IO GType
c_gtk_keyval_trigger_get_type
instance B.Types.GObject KeyvalTrigger
class (SP.GObject o, O.IsDescendantOf KeyvalTrigger o) => IsKeyvalTrigger o
instance (SP.GObject o, O.IsDescendantOf KeyvalTrigger o) => IsKeyvalTrigger o
instance O.HasParentTypes KeyvalTrigger
type instance O.ParentTypes KeyvalTrigger = '[Gtk.ShortcutTrigger.ShortcutTrigger, GObject.Object.Object]
toKeyvalTrigger :: (MIO.MonadIO m, IsKeyvalTrigger o) => o -> m KeyvalTrigger
toKeyvalTrigger :: forall (m :: * -> *) o.
(MonadIO m, IsKeyvalTrigger o) =>
o -> m KeyvalTrigger
toKeyvalTrigger = IO KeyvalTrigger -> m KeyvalTrigger
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO KeyvalTrigger -> m KeyvalTrigger)
-> (o -> IO KeyvalTrigger) -> o -> m KeyvalTrigger
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr KeyvalTrigger -> KeyvalTrigger)
-> o -> IO KeyvalTrigger
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr KeyvalTrigger -> KeyvalTrigger
KeyvalTrigger
instance B.GValue.IsGValue (Maybe KeyvalTrigger) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_keyval_trigger_get_type
gvalueSet_ :: Ptr GValue -> Maybe KeyvalTrigger -> IO ()
gvalueSet_ Ptr GValue
gv Maybe KeyvalTrigger
P.Nothing = Ptr GValue -> Ptr KeyvalTrigger -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr KeyvalTrigger
forall a. Ptr a
FP.nullPtr :: FP.Ptr KeyvalTrigger)
gvalueSet_ Ptr GValue
gv (P.Just KeyvalTrigger
obj) = KeyvalTrigger -> (Ptr KeyvalTrigger -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr KeyvalTrigger
obj (Ptr GValue -> Ptr KeyvalTrigger -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe KeyvalTrigger)
gvalueGet_ Ptr GValue
gv = do
Ptr KeyvalTrigger
ptr <- Ptr GValue -> IO (Ptr KeyvalTrigger)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr KeyvalTrigger)
if Ptr KeyvalTrigger
ptr Ptr KeyvalTrigger -> Ptr KeyvalTrigger -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr KeyvalTrigger
forall a. Ptr a
FP.nullPtr
then KeyvalTrigger -> Maybe KeyvalTrigger
forall a. a -> Maybe a
P.Just (KeyvalTrigger -> Maybe KeyvalTrigger)
-> IO KeyvalTrigger -> IO (Maybe KeyvalTrigger)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr KeyvalTrigger -> KeyvalTrigger)
-> Ptr KeyvalTrigger -> IO KeyvalTrigger
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr KeyvalTrigger -> KeyvalTrigger
KeyvalTrigger Ptr KeyvalTrigger
ptr
else Maybe KeyvalTrigger -> IO (Maybe KeyvalTrigger)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe KeyvalTrigger
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveKeyvalTriggerMethod (t :: Symbol) (o :: *) :: * where
ResolveKeyvalTriggerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveKeyvalTriggerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveKeyvalTriggerMethod "compare" o = Gtk.ShortcutTrigger.ShortcutTriggerCompareMethodInfo
ResolveKeyvalTriggerMethod "equal" o = Gtk.ShortcutTrigger.ShortcutTriggerEqualMethodInfo
ResolveKeyvalTriggerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveKeyvalTriggerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveKeyvalTriggerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveKeyvalTriggerMethod "hash" o = Gtk.ShortcutTrigger.ShortcutTriggerHashMethodInfo
ResolveKeyvalTriggerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveKeyvalTriggerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveKeyvalTriggerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveKeyvalTriggerMethod "print" o = Gtk.ShortcutTrigger.ShortcutTriggerPrintMethodInfo
ResolveKeyvalTriggerMethod "printLabel" o = Gtk.ShortcutTrigger.ShortcutTriggerPrintLabelMethodInfo
ResolveKeyvalTriggerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveKeyvalTriggerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveKeyvalTriggerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveKeyvalTriggerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveKeyvalTriggerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveKeyvalTriggerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveKeyvalTriggerMethod "toLabel" o = Gtk.ShortcutTrigger.ShortcutTriggerToLabelMethodInfo
ResolveKeyvalTriggerMethod "toString" o = Gtk.ShortcutTrigger.ShortcutTriggerToStringMethodInfo
ResolveKeyvalTriggerMethod "trigger" o = Gtk.ShortcutTrigger.ShortcutTriggerTriggerMethodInfo
ResolveKeyvalTriggerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveKeyvalTriggerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveKeyvalTriggerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveKeyvalTriggerMethod "getKeyval" o = KeyvalTriggerGetKeyvalMethodInfo
ResolveKeyvalTriggerMethod "getModifiers" o = KeyvalTriggerGetModifiersMethodInfo
ResolveKeyvalTriggerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveKeyvalTriggerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveKeyvalTriggerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveKeyvalTriggerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveKeyvalTriggerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveKeyvalTriggerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveKeyvalTriggerMethod t KeyvalTrigger, O.OverloadedMethod info KeyvalTrigger p) => OL.IsLabel t (KeyvalTrigger -> 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 ~ ResolveKeyvalTriggerMethod t KeyvalTrigger, O.OverloadedMethod info KeyvalTrigger p, R.HasField t KeyvalTrigger p) => R.HasField t KeyvalTrigger p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveKeyvalTriggerMethod t KeyvalTrigger, O.OverloadedMethodInfo info KeyvalTrigger) => OL.IsLabel t (O.MethodProxy info KeyvalTrigger) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getKeyvalTriggerKeyval :: (MonadIO m, IsKeyvalTrigger o) => o -> m Word32
getKeyvalTriggerKeyval :: forall (m :: * -> *) o.
(MonadIO m, IsKeyvalTrigger o) =>
o -> m Word32
getKeyvalTriggerKeyval o
obj = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"keyval"
constructKeyvalTriggerKeyval :: (IsKeyvalTrigger o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructKeyvalTriggerKeyval :: forall o (m :: * -> *).
(IsKeyvalTrigger o, MonadIO m) =>
Word32 -> m (GValueConstruct o)
constructKeyvalTriggerKeyval Word32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"keyval" Word32
val
#if defined(ENABLE_OVERLOADING)
data KeyvalTriggerKeyvalPropertyInfo
instance AttrInfo KeyvalTriggerKeyvalPropertyInfo where
type AttrAllowedOps KeyvalTriggerKeyvalPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint KeyvalTriggerKeyvalPropertyInfo = IsKeyvalTrigger
type AttrSetTypeConstraint KeyvalTriggerKeyvalPropertyInfo = (~) Word32
type AttrTransferTypeConstraint KeyvalTriggerKeyvalPropertyInfo = (~) Word32
type AttrTransferType KeyvalTriggerKeyvalPropertyInfo = Word32
type AttrGetType KeyvalTriggerKeyvalPropertyInfo = Word32
type AttrLabel KeyvalTriggerKeyvalPropertyInfo = "keyval"
type AttrOrigin KeyvalTriggerKeyvalPropertyInfo = KeyvalTrigger
attrGet = getKeyvalTriggerKeyval
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructKeyvalTriggerKeyval
attrClear = undefined
#endif
getKeyvalTriggerModifiers :: (MonadIO m, IsKeyvalTrigger o) => o -> m [Gdk.Flags.ModifierType]
getKeyvalTriggerModifiers :: forall (m :: * -> *) o.
(MonadIO m, IsKeyvalTrigger o) =>
o -> m [ModifierType]
getKeyvalTriggerModifiers o
obj = IO [ModifierType] -> m [ModifierType]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [ModifierType] -> m [ModifierType])
-> IO [ModifierType] -> m [ModifierType]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [ModifierType]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"modifiers"
constructKeyvalTriggerModifiers :: (IsKeyvalTrigger o, MIO.MonadIO m) => [Gdk.Flags.ModifierType] -> m (GValueConstruct o)
constructKeyvalTriggerModifiers :: forall o (m :: * -> *).
(IsKeyvalTrigger o, MonadIO m) =>
[ModifierType] -> m (GValueConstruct o)
constructKeyvalTriggerModifiers [ModifierType]
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> [ModifierType] -> IO (GValueConstruct o)
forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"modifiers" [ModifierType]
val
#if defined(ENABLE_OVERLOADING)
data KeyvalTriggerModifiersPropertyInfo
instance AttrInfo KeyvalTriggerModifiersPropertyInfo where
type AttrAllowedOps KeyvalTriggerModifiersPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint KeyvalTriggerModifiersPropertyInfo = IsKeyvalTrigger
type AttrSetTypeConstraint KeyvalTriggerModifiersPropertyInfo = (~) [Gdk.Flags.ModifierType]
type AttrTransferTypeConstraint KeyvalTriggerModifiersPropertyInfo = (~) [Gdk.Flags.ModifierType]
type AttrTransferType KeyvalTriggerModifiersPropertyInfo = [Gdk.Flags.ModifierType]
type AttrGetType KeyvalTriggerModifiersPropertyInfo = [Gdk.Flags.ModifierType]
type AttrLabel KeyvalTriggerModifiersPropertyInfo = "modifiers"
type AttrOrigin KeyvalTriggerModifiersPropertyInfo = KeyvalTrigger
attrGet = getKeyvalTriggerModifiers
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructKeyvalTriggerModifiers
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList KeyvalTrigger
type instance O.AttributeList KeyvalTrigger = KeyvalTriggerAttributeList
type KeyvalTriggerAttributeList = ('[ '("keyval", KeyvalTriggerKeyvalPropertyInfo), '("modifiers", KeyvalTriggerModifiersPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
keyvalTriggerKeyval :: AttrLabelProxy "keyval"
keyvalTriggerKeyval = AttrLabelProxy
keyvalTriggerModifiers :: AttrLabelProxy "modifiers"
keyvalTriggerModifiers = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList KeyvalTrigger = KeyvalTriggerSignalList
type KeyvalTriggerSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_keyval_trigger_new" gtk_keyval_trigger_new ::
Word32 ->
CUInt ->
IO (Ptr KeyvalTrigger)
keyvalTriggerNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word32
-> [Gdk.Flags.ModifierType]
-> m KeyvalTrigger
keyvalTriggerNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word32 -> [ModifierType] -> m KeyvalTrigger
keyvalTriggerNew Word32
keyval [ModifierType]
modifiers = IO KeyvalTrigger -> m KeyvalTrigger
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO KeyvalTrigger -> m KeyvalTrigger)
-> IO KeyvalTrigger -> m KeyvalTrigger
forall a b. (a -> b) -> a -> b
$ do
let modifiers' :: CUInt
modifiers' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
modifiers
Ptr KeyvalTrigger
result <- Word32 -> CUInt -> IO (Ptr KeyvalTrigger)
gtk_keyval_trigger_new Word32
keyval CUInt
modifiers'
Text -> Ptr KeyvalTrigger -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keyvalTriggerNew" Ptr KeyvalTrigger
result
KeyvalTrigger
result' <- ((ManagedPtr KeyvalTrigger -> KeyvalTrigger)
-> Ptr KeyvalTrigger -> IO KeyvalTrigger
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr KeyvalTrigger -> KeyvalTrigger
KeyvalTrigger) Ptr KeyvalTrigger
result
KeyvalTrigger -> IO KeyvalTrigger
forall (m :: * -> *) a. Monad m => a -> m a
return KeyvalTrigger
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_keyval_trigger_get_keyval" gtk_keyval_trigger_get_keyval ::
Ptr KeyvalTrigger ->
IO Word32
keyvalTriggerGetKeyval ::
(B.CallStack.HasCallStack, MonadIO m, IsKeyvalTrigger a) =>
a
-> m Word32
keyvalTriggerGetKeyval :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsKeyvalTrigger a) =>
a -> m Word32
keyvalTriggerGetKeyval a
self = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyvalTrigger
self' <- a -> IO (Ptr KeyvalTrigger)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Word32
result <- Ptr KeyvalTrigger -> IO Word32
gtk_keyval_trigger_get_keyval Ptr KeyvalTrigger
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data KeyvalTriggerGetKeyvalMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsKeyvalTrigger a) => O.OverloadedMethod KeyvalTriggerGetKeyvalMethodInfo a signature where
overloadedMethod = keyvalTriggerGetKeyval
instance O.OverloadedMethodInfo KeyvalTriggerGetKeyvalMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.KeyvalTrigger.keyvalTriggerGetKeyval",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-KeyvalTrigger.html#v:keyvalTriggerGetKeyval"
}
#endif
foreign import ccall "gtk_keyval_trigger_get_modifiers" gtk_keyval_trigger_get_modifiers ::
Ptr KeyvalTrigger ->
IO CUInt
keyvalTriggerGetModifiers ::
(B.CallStack.HasCallStack, MonadIO m, IsKeyvalTrigger a) =>
a
-> m [Gdk.Flags.ModifierType]
keyvalTriggerGetModifiers :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsKeyvalTrigger a) =>
a -> m [ModifierType]
keyvalTriggerGetModifiers a
self = IO [ModifierType] -> m [ModifierType]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [ModifierType] -> m [ModifierType])
-> IO [ModifierType] -> m [ModifierType]
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyvalTrigger
self' <- a -> IO (Ptr KeyvalTrigger)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CUInt
result <- Ptr KeyvalTrigger -> IO CUInt
gtk_keyval_trigger_get_modifiers Ptr KeyvalTrigger
self'
let result' :: [ModifierType]
result' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
[ModifierType] -> IO [ModifierType]
forall (m :: * -> *) a. Monad m => a -> m a
return [ModifierType]
result'
#if defined(ENABLE_OVERLOADING)
data KeyvalTriggerGetModifiersMethodInfo
instance (signature ~ (m [Gdk.Flags.ModifierType]), MonadIO m, IsKeyvalTrigger a) => O.OverloadedMethod KeyvalTriggerGetModifiersMethodInfo a signature where
overloadedMethod = keyvalTriggerGetModifiers
instance O.OverloadedMethodInfo KeyvalTriggerGetModifiersMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.KeyvalTrigger.keyvalTriggerGetModifiers",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-KeyvalTrigger.html#v:keyvalTriggerGetModifiers"
}
#endif