{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.AlternativeTrigger
(
AlternativeTrigger(..) ,
IsAlternativeTrigger ,
toAlternativeTrigger ,
#if defined(ENABLE_OVERLOADING)
ResolveAlternativeTriggerMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
AlternativeTriggerGetFirstMethodInfo ,
#endif
alternativeTriggerGetFirst ,
#if defined(ENABLE_OVERLOADING)
AlternativeTriggerGetSecondMethodInfo ,
#endif
alternativeTriggerGetSecond ,
alternativeTriggerNew ,
#if defined(ENABLE_OVERLOADING)
AlternativeTriggerFirstPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
alternativeTriggerFirst ,
#endif
constructAlternativeTriggerFirst ,
getAlternativeTriggerFirst ,
#if defined(ENABLE_OVERLOADING)
AlternativeTriggerSecondPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
alternativeTriggerSecond ,
#endif
constructAlternativeTriggerSecond ,
getAlternativeTriggerSecond ,
) 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 {-# SOURCE #-} qualified GI.Gtk.Objects.ShortcutTrigger as Gtk.ShortcutTrigger
newtype AlternativeTrigger = AlternativeTrigger (SP.ManagedPtr AlternativeTrigger)
deriving (AlternativeTrigger -> AlternativeTrigger -> Bool
(AlternativeTrigger -> AlternativeTrigger -> Bool)
-> (AlternativeTrigger -> AlternativeTrigger -> Bool)
-> Eq AlternativeTrigger
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AlternativeTrigger -> AlternativeTrigger -> Bool
$c/= :: AlternativeTrigger -> AlternativeTrigger -> Bool
== :: AlternativeTrigger -> AlternativeTrigger -> Bool
$c== :: AlternativeTrigger -> AlternativeTrigger -> Bool
Eq)
instance SP.ManagedPtrNewtype AlternativeTrigger where
toManagedPtr :: AlternativeTrigger -> ManagedPtr AlternativeTrigger
toManagedPtr (AlternativeTrigger ManagedPtr AlternativeTrigger
p) = ManagedPtr AlternativeTrigger
p
foreign import ccall "gtk_alternative_trigger_get_type"
c_gtk_alternative_trigger_get_type :: IO B.Types.GType
instance B.Types.TypedObject AlternativeTrigger where
glibType :: IO GType
glibType = IO GType
c_gtk_alternative_trigger_get_type
instance B.Types.GObject AlternativeTrigger
class (SP.GObject o, O.IsDescendantOf AlternativeTrigger o) => IsAlternativeTrigger o
instance (SP.GObject o, O.IsDescendantOf AlternativeTrigger o) => IsAlternativeTrigger o
instance O.HasParentTypes AlternativeTrigger
type instance O.ParentTypes AlternativeTrigger = '[Gtk.ShortcutTrigger.ShortcutTrigger, GObject.Object.Object]
toAlternativeTrigger :: (MIO.MonadIO m, IsAlternativeTrigger o) => o -> m AlternativeTrigger
toAlternativeTrigger :: forall (m :: * -> *) o.
(MonadIO m, IsAlternativeTrigger o) =>
o -> m AlternativeTrigger
toAlternativeTrigger = IO AlternativeTrigger -> m AlternativeTrigger
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO AlternativeTrigger -> m AlternativeTrigger)
-> (o -> IO AlternativeTrigger) -> o -> m AlternativeTrigger
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr AlternativeTrigger -> AlternativeTrigger)
-> o -> IO AlternativeTrigger
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr AlternativeTrigger -> AlternativeTrigger
AlternativeTrigger
instance B.GValue.IsGValue (Maybe AlternativeTrigger) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_alternative_trigger_get_type
gvalueSet_ :: Ptr GValue -> Maybe AlternativeTrigger -> IO ()
gvalueSet_ Ptr GValue
gv Maybe AlternativeTrigger
P.Nothing = Ptr GValue -> Ptr AlternativeTrigger -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr AlternativeTrigger
forall a. Ptr a
FP.nullPtr :: FP.Ptr AlternativeTrigger)
gvalueSet_ Ptr GValue
gv (P.Just AlternativeTrigger
obj) = AlternativeTrigger -> (Ptr AlternativeTrigger -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AlternativeTrigger
obj (Ptr GValue -> Ptr AlternativeTrigger -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe AlternativeTrigger)
gvalueGet_ Ptr GValue
gv = do
Ptr AlternativeTrigger
ptr <- Ptr GValue -> IO (Ptr AlternativeTrigger)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr AlternativeTrigger)
if Ptr AlternativeTrigger
ptr Ptr AlternativeTrigger -> Ptr AlternativeTrigger -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr AlternativeTrigger
forall a. Ptr a
FP.nullPtr
then AlternativeTrigger -> Maybe AlternativeTrigger
forall a. a -> Maybe a
P.Just (AlternativeTrigger -> Maybe AlternativeTrigger)
-> IO AlternativeTrigger -> IO (Maybe AlternativeTrigger)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr AlternativeTrigger -> AlternativeTrigger)
-> Ptr AlternativeTrigger -> IO AlternativeTrigger
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AlternativeTrigger -> AlternativeTrigger
AlternativeTrigger Ptr AlternativeTrigger
ptr
else Maybe AlternativeTrigger -> IO (Maybe AlternativeTrigger)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe AlternativeTrigger
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveAlternativeTriggerMethod (t :: Symbol) (o :: *) :: * where
ResolveAlternativeTriggerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAlternativeTriggerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAlternativeTriggerMethod "compare" o = Gtk.ShortcutTrigger.ShortcutTriggerCompareMethodInfo
ResolveAlternativeTriggerMethod "equal" o = Gtk.ShortcutTrigger.ShortcutTriggerEqualMethodInfo
ResolveAlternativeTriggerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAlternativeTriggerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAlternativeTriggerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAlternativeTriggerMethod "hash" o = Gtk.ShortcutTrigger.ShortcutTriggerHashMethodInfo
ResolveAlternativeTriggerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAlternativeTriggerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAlternativeTriggerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAlternativeTriggerMethod "print" o = Gtk.ShortcutTrigger.ShortcutTriggerPrintMethodInfo
ResolveAlternativeTriggerMethod "printLabel" o = Gtk.ShortcutTrigger.ShortcutTriggerPrintLabelMethodInfo
ResolveAlternativeTriggerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveAlternativeTriggerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAlternativeTriggerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAlternativeTriggerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAlternativeTriggerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAlternativeTriggerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAlternativeTriggerMethod "toLabel" o = Gtk.ShortcutTrigger.ShortcutTriggerToLabelMethodInfo
ResolveAlternativeTriggerMethod "toString" o = Gtk.ShortcutTrigger.ShortcutTriggerToStringMethodInfo
ResolveAlternativeTriggerMethod "trigger" o = Gtk.ShortcutTrigger.ShortcutTriggerTriggerMethodInfo
ResolveAlternativeTriggerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveAlternativeTriggerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAlternativeTriggerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAlternativeTriggerMethod "getFirst" o = AlternativeTriggerGetFirstMethodInfo
ResolveAlternativeTriggerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAlternativeTriggerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAlternativeTriggerMethod "getSecond" o = AlternativeTriggerGetSecondMethodInfo
ResolveAlternativeTriggerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAlternativeTriggerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAlternativeTriggerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAlternativeTriggerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAlternativeTriggerMethod t AlternativeTrigger, O.OverloadedMethod info AlternativeTrigger p) => OL.IsLabel t (AlternativeTrigger -> 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 ~ ResolveAlternativeTriggerMethod t AlternativeTrigger, O.OverloadedMethod info AlternativeTrigger p, R.HasField t AlternativeTrigger p) => R.HasField t AlternativeTrigger p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveAlternativeTriggerMethod t AlternativeTrigger, O.OverloadedMethodInfo info AlternativeTrigger) => OL.IsLabel t (O.MethodProxy info AlternativeTrigger) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getAlternativeTriggerFirst :: (MonadIO m, IsAlternativeTrigger o) => o -> m Gtk.ShortcutTrigger.ShortcutTrigger
getAlternativeTriggerFirst :: forall (m :: * -> *) o.
(MonadIO m, IsAlternativeTrigger o) =>
o -> m ShortcutTrigger
getAlternativeTriggerFirst o
obj = IO ShortcutTrigger -> m ShortcutTrigger
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ShortcutTrigger -> m ShortcutTrigger)
-> IO ShortcutTrigger -> m ShortcutTrigger
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getAlternativeTriggerFirst" (IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger)
-> IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr ShortcutTrigger -> ShortcutTrigger)
-> IO (Maybe ShortcutTrigger)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"first" ManagedPtr ShortcutTrigger -> ShortcutTrigger
Gtk.ShortcutTrigger.ShortcutTrigger
constructAlternativeTriggerFirst :: (IsAlternativeTrigger o, MIO.MonadIO m, Gtk.ShortcutTrigger.IsShortcutTrigger a) => a -> m (GValueConstruct o)
constructAlternativeTriggerFirst :: forall o (m :: * -> *) a.
(IsAlternativeTrigger o, MonadIO m, IsShortcutTrigger a) =>
a -> m (GValueConstruct o)
constructAlternativeTriggerFirst a
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 -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"first" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data AlternativeTriggerFirstPropertyInfo
instance AttrInfo AlternativeTriggerFirstPropertyInfo where
type AttrAllowedOps AlternativeTriggerFirstPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint AlternativeTriggerFirstPropertyInfo = IsAlternativeTrigger
type AttrSetTypeConstraint AlternativeTriggerFirstPropertyInfo = Gtk.ShortcutTrigger.IsShortcutTrigger
type AttrTransferTypeConstraint AlternativeTriggerFirstPropertyInfo = Gtk.ShortcutTrigger.IsShortcutTrigger
type AttrTransferType AlternativeTriggerFirstPropertyInfo = Gtk.ShortcutTrigger.ShortcutTrigger
type AttrGetType AlternativeTriggerFirstPropertyInfo = Gtk.ShortcutTrigger.ShortcutTrigger
type AttrLabel AlternativeTriggerFirstPropertyInfo = "first"
type AttrOrigin AlternativeTriggerFirstPropertyInfo = AlternativeTrigger
attrGet = getAlternativeTriggerFirst
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gtk.ShortcutTrigger.ShortcutTrigger v
attrConstruct = constructAlternativeTriggerFirst
attrClear = undefined
#endif
getAlternativeTriggerSecond :: (MonadIO m, IsAlternativeTrigger o) => o -> m Gtk.ShortcutTrigger.ShortcutTrigger
getAlternativeTriggerSecond :: forall (m :: * -> *) o.
(MonadIO m, IsAlternativeTrigger o) =>
o -> m ShortcutTrigger
getAlternativeTriggerSecond o
obj = IO ShortcutTrigger -> m ShortcutTrigger
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ShortcutTrigger -> m ShortcutTrigger)
-> IO ShortcutTrigger -> m ShortcutTrigger
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getAlternativeTriggerSecond" (IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger)
-> IO (Maybe ShortcutTrigger) -> IO ShortcutTrigger
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr ShortcutTrigger -> ShortcutTrigger)
-> IO (Maybe ShortcutTrigger)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"second" ManagedPtr ShortcutTrigger -> ShortcutTrigger
Gtk.ShortcutTrigger.ShortcutTrigger
constructAlternativeTriggerSecond :: (IsAlternativeTrigger o, MIO.MonadIO m, Gtk.ShortcutTrigger.IsShortcutTrigger a) => a -> m (GValueConstruct o)
constructAlternativeTriggerSecond :: forall o (m :: * -> *) a.
(IsAlternativeTrigger o, MonadIO m, IsShortcutTrigger a) =>
a -> m (GValueConstruct o)
constructAlternativeTriggerSecond a
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 -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"second" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data AlternativeTriggerSecondPropertyInfo
instance AttrInfo AlternativeTriggerSecondPropertyInfo where
type AttrAllowedOps AlternativeTriggerSecondPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint AlternativeTriggerSecondPropertyInfo = IsAlternativeTrigger
type AttrSetTypeConstraint AlternativeTriggerSecondPropertyInfo = Gtk.ShortcutTrigger.IsShortcutTrigger
type AttrTransferTypeConstraint AlternativeTriggerSecondPropertyInfo = Gtk.ShortcutTrigger.IsShortcutTrigger
type AttrTransferType AlternativeTriggerSecondPropertyInfo = Gtk.ShortcutTrigger.ShortcutTrigger
type AttrGetType AlternativeTriggerSecondPropertyInfo = Gtk.ShortcutTrigger.ShortcutTrigger
type AttrLabel AlternativeTriggerSecondPropertyInfo = "second"
type AttrOrigin AlternativeTriggerSecondPropertyInfo = AlternativeTrigger
attrGet = getAlternativeTriggerSecond
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gtk.ShortcutTrigger.ShortcutTrigger v
attrConstruct = constructAlternativeTriggerSecond
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AlternativeTrigger
type instance O.AttributeList AlternativeTrigger = AlternativeTriggerAttributeList
type AlternativeTriggerAttributeList = ('[ '("first", AlternativeTriggerFirstPropertyInfo), '("second", AlternativeTriggerSecondPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
alternativeTriggerFirst :: AttrLabelProxy "first"
alternativeTriggerFirst = AttrLabelProxy
alternativeTriggerSecond :: AttrLabelProxy "second"
alternativeTriggerSecond = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList AlternativeTrigger = AlternativeTriggerSignalList
type AlternativeTriggerSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_alternative_trigger_new" gtk_alternative_trigger_new ::
Ptr Gtk.ShortcutTrigger.ShortcutTrigger ->
Ptr Gtk.ShortcutTrigger.ShortcutTrigger ->
IO (Ptr AlternativeTrigger)
alternativeTriggerNew ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.ShortcutTrigger.IsShortcutTrigger a, Gtk.ShortcutTrigger.IsShortcutTrigger b) =>
a
-> b
-> m AlternativeTrigger
alternativeTriggerNew :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsShortcutTrigger a,
IsShortcutTrigger b) =>
a -> b -> m AlternativeTrigger
alternativeTriggerNew a
first b
second = IO AlternativeTrigger -> m AlternativeTrigger
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AlternativeTrigger -> m AlternativeTrigger)
-> IO AlternativeTrigger -> m AlternativeTrigger
forall a b. (a -> b) -> a -> b
$ do
Ptr ShortcutTrigger
first' <- a -> IO (Ptr ShortcutTrigger)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
first
Ptr ShortcutTrigger
second' <- b -> IO (Ptr ShortcutTrigger)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
second
Ptr AlternativeTrigger
result <- Ptr ShortcutTrigger
-> Ptr ShortcutTrigger -> IO (Ptr AlternativeTrigger)
gtk_alternative_trigger_new Ptr ShortcutTrigger
first' Ptr ShortcutTrigger
second'
Text -> Ptr AlternativeTrigger -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"alternativeTriggerNew" Ptr AlternativeTrigger
result
AlternativeTrigger
result' <- ((ManagedPtr AlternativeTrigger -> AlternativeTrigger)
-> Ptr AlternativeTrigger -> IO AlternativeTrigger
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr AlternativeTrigger -> AlternativeTrigger
AlternativeTrigger) Ptr AlternativeTrigger
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
first
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
second
AlternativeTrigger -> IO AlternativeTrigger
forall (m :: * -> *) a. Monad m => a -> m a
return AlternativeTrigger
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_alternative_trigger_get_first" gtk_alternative_trigger_get_first ::
Ptr AlternativeTrigger ->
IO (Ptr Gtk.ShortcutTrigger.ShortcutTrigger)
alternativeTriggerGetFirst ::
(B.CallStack.HasCallStack, MonadIO m, IsAlternativeTrigger a) =>
a
-> m Gtk.ShortcutTrigger.ShortcutTrigger
alternativeTriggerGetFirst :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAlternativeTrigger a) =>
a -> m ShortcutTrigger
alternativeTriggerGetFirst a
self = IO ShortcutTrigger -> m ShortcutTrigger
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ShortcutTrigger -> m ShortcutTrigger)
-> IO ShortcutTrigger -> m ShortcutTrigger
forall a b. (a -> b) -> a -> b
$ do
Ptr AlternativeTrigger
self' <- a -> IO (Ptr AlternativeTrigger)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr ShortcutTrigger
result <- Ptr AlternativeTrigger -> IO (Ptr ShortcutTrigger)
gtk_alternative_trigger_get_first Ptr AlternativeTrigger
self'
Text -> Ptr ShortcutTrigger -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"alternativeTriggerGetFirst" Ptr ShortcutTrigger
result
ShortcutTrigger
result' <- ((ManagedPtr ShortcutTrigger -> ShortcutTrigger)
-> Ptr ShortcutTrigger -> IO ShortcutTrigger
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ShortcutTrigger -> ShortcutTrigger
Gtk.ShortcutTrigger.ShortcutTrigger) Ptr ShortcutTrigger
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
ShortcutTrigger -> IO ShortcutTrigger
forall (m :: * -> *) a. Monad m => a -> m a
return ShortcutTrigger
result'
#if defined(ENABLE_OVERLOADING)
data AlternativeTriggerGetFirstMethodInfo
instance (signature ~ (m Gtk.ShortcutTrigger.ShortcutTrigger), MonadIO m, IsAlternativeTrigger a) => O.OverloadedMethod AlternativeTriggerGetFirstMethodInfo a signature where
overloadedMethod = alternativeTriggerGetFirst
instance O.OverloadedMethodInfo AlternativeTriggerGetFirstMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AlternativeTrigger.alternativeTriggerGetFirst",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-AlternativeTrigger.html#v:alternativeTriggerGetFirst"
}
#endif
foreign import ccall "gtk_alternative_trigger_get_second" gtk_alternative_trigger_get_second ::
Ptr AlternativeTrigger ->
IO (Ptr Gtk.ShortcutTrigger.ShortcutTrigger)
alternativeTriggerGetSecond ::
(B.CallStack.HasCallStack, MonadIO m, IsAlternativeTrigger a) =>
a
-> m Gtk.ShortcutTrigger.ShortcutTrigger
alternativeTriggerGetSecond :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAlternativeTrigger a) =>
a -> m ShortcutTrigger
alternativeTriggerGetSecond a
self = IO ShortcutTrigger -> m ShortcutTrigger
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ShortcutTrigger -> m ShortcutTrigger)
-> IO ShortcutTrigger -> m ShortcutTrigger
forall a b. (a -> b) -> a -> b
$ do
Ptr AlternativeTrigger
self' <- a -> IO (Ptr AlternativeTrigger)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr ShortcutTrigger
result <- Ptr AlternativeTrigger -> IO (Ptr ShortcutTrigger)
gtk_alternative_trigger_get_second Ptr AlternativeTrigger
self'
Text -> Ptr ShortcutTrigger -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"alternativeTriggerGetSecond" Ptr ShortcutTrigger
result
ShortcutTrigger
result' <- ((ManagedPtr ShortcutTrigger -> ShortcutTrigger)
-> Ptr ShortcutTrigger -> IO ShortcutTrigger
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ShortcutTrigger -> ShortcutTrigger
Gtk.ShortcutTrigger.ShortcutTrigger) Ptr ShortcutTrigger
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
ShortcutTrigger -> IO ShortcutTrigger
forall (m :: * -> *) a. Monad m => a -> m a
return ShortcutTrigger
result'
#if defined(ENABLE_OVERLOADING)
data AlternativeTriggerGetSecondMethodInfo
instance (signature ~ (m Gtk.ShortcutTrigger.ShortcutTrigger), MonadIO m, IsAlternativeTrigger a) => O.OverloadedMethod AlternativeTriggerGetSecondMethodInfo a signature where
overloadedMethod = alternativeTriggerGetSecond
instance O.OverloadedMethodInfo AlternativeTriggerGetSecondMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.AlternativeTrigger.alternativeTriggerGetSecond",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-AlternativeTrigger.html#v:alternativeTriggerGetSecond"
}
#endif