{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.EventController
(
EventController(..) ,
IsEventController ,
toEventController ,
#if defined(ENABLE_OVERLOADING)
ResolveEventControllerMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
EventControllerGetCurrentEventMethodInfo,
#endif
eventControllerGetCurrentEvent ,
#if defined(ENABLE_OVERLOADING)
EventControllerGetCurrentEventDeviceMethodInfo,
#endif
eventControllerGetCurrentEventDevice ,
#if defined(ENABLE_OVERLOADING)
EventControllerGetCurrentEventStateMethodInfo,
#endif
eventControllerGetCurrentEventState ,
#if defined(ENABLE_OVERLOADING)
EventControllerGetCurrentEventTimeMethodInfo,
#endif
eventControllerGetCurrentEventTime ,
#if defined(ENABLE_OVERLOADING)
EventControllerGetNameMethodInfo ,
#endif
eventControllerGetName ,
#if defined(ENABLE_OVERLOADING)
EventControllerGetPropagationLimitMethodInfo,
#endif
eventControllerGetPropagationLimit ,
#if defined(ENABLE_OVERLOADING)
EventControllerGetPropagationPhaseMethodInfo,
#endif
eventControllerGetPropagationPhase ,
#if defined(ENABLE_OVERLOADING)
EventControllerGetWidgetMethodInfo ,
#endif
eventControllerGetWidget ,
#if defined(ENABLE_OVERLOADING)
EventControllerResetMethodInfo ,
#endif
eventControllerReset ,
#if defined(ENABLE_OVERLOADING)
EventControllerSetNameMethodInfo ,
#endif
eventControllerSetName ,
#if defined(ENABLE_OVERLOADING)
EventControllerSetPropagationLimitMethodInfo,
#endif
eventControllerSetPropagationLimit ,
#if defined(ENABLE_OVERLOADING)
EventControllerSetPropagationPhaseMethodInfo,
#endif
eventControllerSetPropagationPhase ,
#if defined(ENABLE_OVERLOADING)
EventControllerNamePropertyInfo ,
#endif
constructEventControllerName ,
#if defined(ENABLE_OVERLOADING)
eventControllerName ,
#endif
getEventControllerName ,
setEventControllerName ,
#if defined(ENABLE_OVERLOADING)
EventControllerPropagationLimitPropertyInfo,
#endif
constructEventControllerPropagationLimit,
#if defined(ENABLE_OVERLOADING)
eventControllerPropagationLimit ,
#endif
getEventControllerPropagationLimit ,
setEventControllerPropagationLimit ,
#if defined(ENABLE_OVERLOADING)
EventControllerPropagationPhasePropertyInfo,
#endif
constructEventControllerPropagationPhase,
#if defined(ENABLE_OVERLOADING)
eventControllerPropagationPhase ,
#endif
getEventControllerPropagationPhase ,
setEventControllerPropagationPhase ,
#if defined(ENABLE_OVERLOADING)
EventControllerWidgetPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
eventControllerWidget ,
#endif
getEventControllerWidget ,
) 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 qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Event as Gdk.Event
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype EventController = EventController (SP.ManagedPtr EventController)
deriving (EventController -> EventController -> Bool
(EventController -> EventController -> Bool)
-> (EventController -> EventController -> Bool)
-> Eq EventController
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventController -> EventController -> Bool
$c/= :: EventController -> EventController -> Bool
== :: EventController -> EventController -> Bool
$c== :: EventController -> EventController -> Bool
Eq)
instance SP.ManagedPtrNewtype EventController where
toManagedPtr :: EventController -> ManagedPtr EventController
toManagedPtr (EventController ManagedPtr EventController
p) = ManagedPtr EventController
p
foreign import ccall "gtk_event_controller_get_type"
c_gtk_event_controller_get_type :: IO B.Types.GType
instance B.Types.TypedObject EventController where
glibType :: IO GType
glibType = IO GType
c_gtk_event_controller_get_type
instance B.Types.GObject EventController
class (SP.GObject o, O.IsDescendantOf EventController o) => IsEventController o
instance (SP.GObject o, O.IsDescendantOf EventController o) => IsEventController o
instance O.HasParentTypes EventController
type instance O.ParentTypes EventController = '[GObject.Object.Object]
toEventController :: (MIO.MonadIO m, IsEventController o) => o -> m EventController
toEventController :: forall (m :: * -> *) o.
(MonadIO m, IsEventController o) =>
o -> m EventController
toEventController = IO EventController -> m EventController
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO EventController -> m EventController)
-> (o -> IO EventController) -> o -> m EventController
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr EventController -> EventController)
-> o -> IO EventController
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr EventController -> EventController
EventController
instance B.GValue.IsGValue (Maybe EventController) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_event_controller_get_type
gvalueSet_ :: Ptr GValue -> Maybe EventController -> IO ()
gvalueSet_ Ptr GValue
gv Maybe EventController
P.Nothing = Ptr GValue -> Ptr EventController -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr EventController
forall a. Ptr a
FP.nullPtr :: FP.Ptr EventController)
gvalueSet_ Ptr GValue
gv (P.Just EventController
obj) = EventController -> (Ptr EventController -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr EventController
obj (Ptr GValue -> Ptr EventController -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe EventController)
gvalueGet_ Ptr GValue
gv = do
Ptr EventController
ptr <- Ptr GValue -> IO (Ptr EventController)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr EventController)
if Ptr EventController
ptr Ptr EventController -> Ptr EventController -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr EventController
forall a. Ptr a
FP.nullPtr
then EventController -> Maybe EventController
forall a. a -> Maybe a
P.Just (EventController -> Maybe EventController)
-> IO EventController -> IO (Maybe EventController)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr EventController -> EventController)
-> Ptr EventController -> IO EventController
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr EventController -> EventController
EventController Ptr EventController
ptr
else Maybe EventController -> IO (Maybe EventController)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe EventController
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveEventControllerMethod (t :: Symbol) (o :: *) :: * where
ResolveEventControllerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveEventControllerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveEventControllerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveEventControllerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveEventControllerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveEventControllerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveEventControllerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveEventControllerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveEventControllerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveEventControllerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveEventControllerMethod "reset" o = EventControllerResetMethodInfo
ResolveEventControllerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveEventControllerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveEventControllerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveEventControllerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveEventControllerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveEventControllerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveEventControllerMethod "getCurrentEvent" o = EventControllerGetCurrentEventMethodInfo
ResolveEventControllerMethod "getCurrentEventDevice" o = EventControllerGetCurrentEventDeviceMethodInfo
ResolveEventControllerMethod "getCurrentEventState" o = EventControllerGetCurrentEventStateMethodInfo
ResolveEventControllerMethod "getCurrentEventTime" o = EventControllerGetCurrentEventTimeMethodInfo
ResolveEventControllerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveEventControllerMethod "getName" o = EventControllerGetNameMethodInfo
ResolveEventControllerMethod "getPropagationLimit" o = EventControllerGetPropagationLimitMethodInfo
ResolveEventControllerMethod "getPropagationPhase" o = EventControllerGetPropagationPhaseMethodInfo
ResolveEventControllerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveEventControllerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveEventControllerMethod "getWidget" o = EventControllerGetWidgetMethodInfo
ResolveEventControllerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveEventControllerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveEventControllerMethod "setName" o = EventControllerSetNameMethodInfo
ResolveEventControllerMethod "setPropagationLimit" o = EventControllerSetPropagationLimitMethodInfo
ResolveEventControllerMethod "setPropagationPhase" o = EventControllerSetPropagationPhaseMethodInfo
ResolveEventControllerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveEventControllerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEventControllerMethod t EventController, O.OverloadedMethod info EventController p) => OL.IsLabel t (EventController -> 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 ~ ResolveEventControllerMethod t EventController, O.OverloadedMethod info EventController p, R.HasField t EventController p) => R.HasField t EventController p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveEventControllerMethod t EventController, O.OverloadedMethodInfo info EventController) => OL.IsLabel t (O.MethodProxy info EventController) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getEventControllerName :: (MonadIO m, IsEventController o) => o -> m T.Text
getEventControllerName :: forall (m :: * -> *) o.
(MonadIO m, IsEventController o) =>
o -> m Text
getEventControllerName o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getEventControllerName" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"name"
setEventControllerName :: (MonadIO m, IsEventController o) => o -> T.Text -> m ()
setEventControllerName :: forall (m :: * -> *) o.
(MonadIO m, IsEventController o) =>
o -> Text -> m ()
setEventControllerName o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructEventControllerName :: (IsEventController o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructEventControllerName :: forall o (m :: * -> *).
(IsEventController o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructEventControllerName Text
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 Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data EventControllerNamePropertyInfo
instance AttrInfo EventControllerNamePropertyInfo where
type AttrAllowedOps EventControllerNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint EventControllerNamePropertyInfo = IsEventController
type AttrSetTypeConstraint EventControllerNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint EventControllerNamePropertyInfo = (~) T.Text
type AttrTransferType EventControllerNamePropertyInfo = T.Text
type AttrGetType EventControllerNamePropertyInfo = T.Text
type AttrLabel EventControllerNamePropertyInfo = "name"
type AttrOrigin EventControllerNamePropertyInfo = EventController
attrGet = getEventControllerName
attrSet = setEventControllerName
attrTransfer _ v = do
return v
attrConstruct = constructEventControllerName
attrClear = undefined
#endif
getEventControllerPropagationLimit :: (MonadIO m, IsEventController o) => o -> m Gtk.Enums.PropagationLimit
getEventControllerPropagationLimit :: forall (m :: * -> *) o.
(MonadIO m, IsEventController o) =>
o -> m PropagationLimit
getEventControllerPropagationLimit o
obj = IO PropagationLimit -> m PropagationLimit
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO PropagationLimit -> m PropagationLimit)
-> IO PropagationLimit -> m PropagationLimit
forall a b. (a -> b) -> a -> b
$ o -> String -> IO PropagationLimit
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"propagation-limit"
setEventControllerPropagationLimit :: (MonadIO m, IsEventController o) => o -> Gtk.Enums.PropagationLimit -> m ()
setEventControllerPropagationLimit :: forall (m :: * -> *) o.
(MonadIO m, IsEventController o) =>
o -> PropagationLimit -> m ()
setEventControllerPropagationLimit o
obj PropagationLimit
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> PropagationLimit -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"propagation-limit" PropagationLimit
val
constructEventControllerPropagationLimit :: (IsEventController o, MIO.MonadIO m) => Gtk.Enums.PropagationLimit -> m (GValueConstruct o)
constructEventControllerPropagationLimit :: forall o (m :: * -> *).
(IsEventController o, MonadIO m) =>
PropagationLimit -> m (GValueConstruct o)
constructEventControllerPropagationLimit PropagationLimit
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 -> PropagationLimit -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"propagation-limit" PropagationLimit
val
#if defined(ENABLE_OVERLOADING)
data EventControllerPropagationLimitPropertyInfo
instance AttrInfo EventControllerPropagationLimitPropertyInfo where
type AttrAllowedOps EventControllerPropagationLimitPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint EventControllerPropagationLimitPropertyInfo = IsEventController
type AttrSetTypeConstraint EventControllerPropagationLimitPropertyInfo = (~) Gtk.Enums.PropagationLimit
type AttrTransferTypeConstraint EventControllerPropagationLimitPropertyInfo = (~) Gtk.Enums.PropagationLimit
type AttrTransferType EventControllerPropagationLimitPropertyInfo = Gtk.Enums.PropagationLimit
type AttrGetType EventControllerPropagationLimitPropertyInfo = Gtk.Enums.PropagationLimit
type AttrLabel EventControllerPropagationLimitPropertyInfo = "propagation-limit"
type AttrOrigin EventControllerPropagationLimitPropertyInfo = EventController
attrGet = getEventControllerPropagationLimit
attrSet = setEventControllerPropagationLimit
attrTransfer _ v = do
return v
attrConstruct = constructEventControllerPropagationLimit
attrClear = undefined
#endif
getEventControllerPropagationPhase :: (MonadIO m, IsEventController o) => o -> m Gtk.Enums.PropagationPhase
getEventControllerPropagationPhase :: forall (m :: * -> *) o.
(MonadIO m, IsEventController o) =>
o -> m PropagationPhase
getEventControllerPropagationPhase o
obj = IO PropagationPhase -> m PropagationPhase
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO PropagationPhase -> m PropagationPhase)
-> IO PropagationPhase -> m PropagationPhase
forall a b. (a -> b) -> a -> b
$ o -> String -> IO PropagationPhase
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"propagation-phase"
setEventControllerPropagationPhase :: (MonadIO m, IsEventController o) => o -> Gtk.Enums.PropagationPhase -> m ()
setEventControllerPropagationPhase :: forall (m :: * -> *) o.
(MonadIO m, IsEventController o) =>
o -> PropagationPhase -> m ()
setEventControllerPropagationPhase o
obj PropagationPhase
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> PropagationPhase -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"propagation-phase" PropagationPhase
val
constructEventControllerPropagationPhase :: (IsEventController o, MIO.MonadIO m) => Gtk.Enums.PropagationPhase -> m (GValueConstruct o)
constructEventControllerPropagationPhase :: forall o (m :: * -> *).
(IsEventController o, MonadIO m) =>
PropagationPhase -> m (GValueConstruct o)
constructEventControllerPropagationPhase PropagationPhase
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 -> PropagationPhase -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"propagation-phase" PropagationPhase
val
#if defined(ENABLE_OVERLOADING)
data EventControllerPropagationPhasePropertyInfo
instance AttrInfo EventControllerPropagationPhasePropertyInfo where
type AttrAllowedOps EventControllerPropagationPhasePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint EventControllerPropagationPhasePropertyInfo = IsEventController
type AttrSetTypeConstraint EventControllerPropagationPhasePropertyInfo = (~) Gtk.Enums.PropagationPhase
type AttrTransferTypeConstraint EventControllerPropagationPhasePropertyInfo = (~) Gtk.Enums.PropagationPhase
type AttrTransferType EventControllerPropagationPhasePropertyInfo = Gtk.Enums.PropagationPhase
type AttrGetType EventControllerPropagationPhasePropertyInfo = Gtk.Enums.PropagationPhase
type AttrLabel EventControllerPropagationPhasePropertyInfo = "propagation-phase"
type AttrOrigin EventControllerPropagationPhasePropertyInfo = EventController
attrGet = getEventControllerPropagationPhase
attrSet = setEventControllerPropagationPhase
attrTransfer _ v = do
return v
attrConstruct = constructEventControllerPropagationPhase
attrClear = undefined
#endif
getEventControllerWidget :: (MonadIO m, IsEventController o) => o -> m Gtk.Widget.Widget
getEventControllerWidget :: forall (m :: * -> *) o.
(MonadIO m, IsEventController o) =>
o -> m Widget
getEventControllerWidget o
obj = IO Widget -> m Widget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Widget -> m Widget) -> IO Widget -> m Widget
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Widget) -> IO Widget
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getEventControllerWidget" (IO (Maybe Widget) -> IO Widget) -> IO (Maybe Widget) -> IO Widget
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"widget" ManagedPtr Widget -> Widget
Gtk.Widget.Widget
#if defined(ENABLE_OVERLOADING)
data EventControllerWidgetPropertyInfo
instance AttrInfo EventControllerWidgetPropertyInfo where
type AttrAllowedOps EventControllerWidgetPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint EventControllerWidgetPropertyInfo = IsEventController
type AttrSetTypeConstraint EventControllerWidgetPropertyInfo = (~) ()
type AttrTransferTypeConstraint EventControllerWidgetPropertyInfo = (~) ()
type AttrTransferType EventControllerWidgetPropertyInfo = ()
type AttrGetType EventControllerWidgetPropertyInfo = Gtk.Widget.Widget
type AttrLabel EventControllerWidgetPropertyInfo = "widget"
type AttrOrigin EventControllerWidgetPropertyInfo = EventController
attrGet = getEventControllerWidget
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList EventController
type instance O.AttributeList EventController = EventControllerAttributeList
type EventControllerAttributeList = ('[ '("name", EventControllerNamePropertyInfo), '("propagationLimit", EventControllerPropagationLimitPropertyInfo), '("propagationPhase", EventControllerPropagationPhasePropertyInfo), '("widget", EventControllerWidgetPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
eventControllerName :: AttrLabelProxy "name"
eventControllerName = AttrLabelProxy
eventControllerPropagationLimit :: AttrLabelProxy "propagationLimit"
eventControllerPropagationLimit = AttrLabelProxy
eventControllerPropagationPhase :: AttrLabelProxy "propagationPhase"
eventControllerPropagationPhase = AttrLabelProxy
eventControllerWidget :: AttrLabelProxy "widget"
eventControllerWidget = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList EventController = EventControllerSignalList
type EventControllerSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_event_controller_get_current_event" gtk_event_controller_get_current_event ::
Ptr EventController ->
IO (Ptr Gdk.Event.Event)
eventControllerGetCurrentEvent ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> m (Maybe Gdk.Event.Event)
eventControllerGetCurrentEvent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> m (Maybe Event)
eventControllerGetCurrentEvent a
controller = IO (Maybe Event) -> m (Maybe Event)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Event) -> m (Maybe Event))
-> IO (Maybe Event) -> m (Maybe Event)
forall a b. (a -> b) -> a -> b
$ do
Ptr EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
Ptr Event
result <- Ptr EventController -> IO (Ptr Event)
gtk_event_controller_get_current_event Ptr EventController
controller'
Maybe Event
maybeResult <- Ptr Event -> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Event
result ((Ptr Event -> IO Event) -> IO (Maybe Event))
-> (Ptr Event -> IO Event) -> IO (Maybe Event)
forall a b. (a -> b) -> a -> b
$ \Ptr Event
result' -> do
Event
result'' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Event -> Event
Gdk.Event.Event) Ptr Event
result'
Event -> IO Event
forall (m :: * -> *) a. Monad m => a -> m a
return Event
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
Maybe Event -> IO (Maybe Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Event
maybeResult
#if defined(ENABLE_OVERLOADING)
data EventControllerGetCurrentEventMethodInfo
instance (signature ~ (m (Maybe Gdk.Event.Event)), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerGetCurrentEventMethodInfo a signature where
overloadedMethod = eventControllerGetCurrentEvent
instance O.OverloadedMethodInfo EventControllerGetCurrentEventMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerGetCurrentEvent",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerGetCurrentEvent"
}
#endif
foreign import ccall "gtk_event_controller_get_current_event_device" gtk_event_controller_get_current_event_device ::
Ptr EventController ->
IO (Ptr Gdk.Device.Device)
eventControllerGetCurrentEventDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> m (Maybe Gdk.Device.Device)
eventControllerGetCurrentEventDevice :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> m (Maybe Device)
eventControllerGetCurrentEventDevice a
controller = IO (Maybe Device) -> m (Maybe Device)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Device) -> m (Maybe Device))
-> IO (Maybe Device) -> m (Maybe Device)
forall a b. (a -> b) -> a -> b
$ do
Ptr EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
Ptr Device
result <- Ptr EventController -> IO (Ptr Device)
gtk_event_controller_get_current_event_device Ptr EventController
controller'
Maybe Device
maybeResult <- Ptr Device -> (Ptr Device -> IO Device) -> IO (Maybe Device)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Device
result ((Ptr Device -> IO Device) -> IO (Maybe Device))
-> (Ptr Device -> IO Device) -> IO (Maybe Device)
forall a b. (a -> b) -> a -> b
$ \Ptr Device
result' -> do
Device
result'' <- ((ManagedPtr Device -> Device) -> Ptr Device -> IO Device
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Device -> Device
Gdk.Device.Device) Ptr Device
result'
Device -> IO Device
forall (m :: * -> *) a. Monad m => a -> m a
return Device
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
Maybe Device -> IO (Maybe Device)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Device
maybeResult
#if defined(ENABLE_OVERLOADING)
data EventControllerGetCurrentEventDeviceMethodInfo
instance (signature ~ (m (Maybe Gdk.Device.Device)), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerGetCurrentEventDeviceMethodInfo a signature where
overloadedMethod = eventControllerGetCurrentEventDevice
instance O.OverloadedMethodInfo EventControllerGetCurrentEventDeviceMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerGetCurrentEventDevice",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerGetCurrentEventDevice"
}
#endif
foreign import ccall "gtk_event_controller_get_current_event_state" gtk_event_controller_get_current_event_state ::
Ptr EventController ->
IO CUInt
eventControllerGetCurrentEventState ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> m [Gdk.Flags.ModifierType]
eventControllerGetCurrentEventState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> m [ModifierType]
eventControllerGetCurrentEventState a
controller = 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 EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
CUInt
result <- Ptr EventController -> IO CUInt
gtk_event_controller_get_current_event_state Ptr EventController
controller'
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
controller
[ModifierType] -> IO [ModifierType]
forall (m :: * -> *) a. Monad m => a -> m a
return [ModifierType]
result'
#if defined(ENABLE_OVERLOADING)
data EventControllerGetCurrentEventStateMethodInfo
instance (signature ~ (m [Gdk.Flags.ModifierType]), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerGetCurrentEventStateMethodInfo a signature where
overloadedMethod = eventControllerGetCurrentEventState
instance O.OverloadedMethodInfo EventControllerGetCurrentEventStateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerGetCurrentEventState",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerGetCurrentEventState"
}
#endif
foreign import ccall "gtk_event_controller_get_current_event_time" gtk_event_controller_get_current_event_time ::
Ptr EventController ->
IO Word32
eventControllerGetCurrentEventTime ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> m Word32
eventControllerGetCurrentEventTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> m Word32
eventControllerGetCurrentEventTime a
controller = 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 EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
Word32
result <- Ptr EventController -> IO Word32
gtk_event_controller_get_current_event_time Ptr EventController
controller'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data EventControllerGetCurrentEventTimeMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerGetCurrentEventTimeMethodInfo a signature where
overloadedMethod = eventControllerGetCurrentEventTime
instance O.OverloadedMethodInfo EventControllerGetCurrentEventTimeMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerGetCurrentEventTime",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerGetCurrentEventTime"
}
#endif
foreign import ccall "gtk_event_controller_get_name" gtk_event_controller_get_name ::
Ptr EventController ->
IO CString
eventControllerGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> m T.Text
eventControllerGetName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> m Text
eventControllerGetName a
controller = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
CString
result <- Ptr EventController -> IO CString
gtk_event_controller_get_name Ptr EventController
controller'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"eventControllerGetName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data EventControllerGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerGetNameMethodInfo a signature where
overloadedMethod = eventControllerGetName
instance O.OverloadedMethodInfo EventControllerGetNameMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerGetName",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerGetName"
}
#endif
foreign import ccall "gtk_event_controller_get_propagation_limit" gtk_event_controller_get_propagation_limit ::
Ptr EventController ->
IO CUInt
eventControllerGetPropagationLimit ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> m Gtk.Enums.PropagationLimit
eventControllerGetPropagationLimit :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> m PropagationLimit
eventControllerGetPropagationLimit a
controller = IO PropagationLimit -> m PropagationLimit
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PropagationLimit -> m PropagationLimit)
-> IO PropagationLimit -> m PropagationLimit
forall a b. (a -> b) -> a -> b
$ do
Ptr EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
CUInt
result <- Ptr EventController -> IO CUInt
gtk_event_controller_get_propagation_limit Ptr EventController
controller'
let result' :: PropagationLimit
result' = (Int -> PropagationLimit
forall a. Enum a => Int -> a
toEnum (Int -> PropagationLimit)
-> (CUInt -> Int) -> CUInt -> PropagationLimit
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
PropagationLimit -> IO PropagationLimit
forall (m :: * -> *) a. Monad m => a -> m a
return PropagationLimit
result'
#if defined(ENABLE_OVERLOADING)
data EventControllerGetPropagationLimitMethodInfo
instance (signature ~ (m Gtk.Enums.PropagationLimit), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerGetPropagationLimitMethodInfo a signature where
overloadedMethod = eventControllerGetPropagationLimit
instance O.OverloadedMethodInfo EventControllerGetPropagationLimitMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerGetPropagationLimit",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerGetPropagationLimit"
}
#endif
foreign import ccall "gtk_event_controller_get_propagation_phase" gtk_event_controller_get_propagation_phase ::
Ptr EventController ->
IO CUInt
eventControllerGetPropagationPhase ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> m Gtk.Enums.PropagationPhase
eventControllerGetPropagationPhase :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> m PropagationPhase
eventControllerGetPropagationPhase a
controller = IO PropagationPhase -> m PropagationPhase
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PropagationPhase -> m PropagationPhase)
-> IO PropagationPhase -> m PropagationPhase
forall a b. (a -> b) -> a -> b
$ do
Ptr EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
CUInt
result <- Ptr EventController -> IO CUInt
gtk_event_controller_get_propagation_phase Ptr EventController
controller'
let result' :: PropagationPhase
result' = (Int -> PropagationPhase
forall a. Enum a => Int -> a
toEnum (Int -> PropagationPhase)
-> (CUInt -> Int) -> CUInt -> PropagationPhase
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
PropagationPhase -> IO PropagationPhase
forall (m :: * -> *) a. Monad m => a -> m a
return PropagationPhase
result'
#if defined(ENABLE_OVERLOADING)
data EventControllerGetPropagationPhaseMethodInfo
instance (signature ~ (m Gtk.Enums.PropagationPhase), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerGetPropagationPhaseMethodInfo a signature where
overloadedMethod = eventControllerGetPropagationPhase
instance O.OverloadedMethodInfo EventControllerGetPropagationPhaseMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerGetPropagationPhase",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerGetPropagationPhase"
}
#endif
foreign import ccall "gtk_event_controller_get_widget" gtk_event_controller_get_widget ::
Ptr EventController ->
IO (Ptr Gtk.Widget.Widget)
eventControllerGetWidget ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> m Gtk.Widget.Widget
eventControllerGetWidget :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> m Widget
eventControllerGetWidget a
controller = IO Widget -> m Widget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Widget -> m Widget) -> IO Widget -> m Widget
forall a b. (a -> b) -> a -> b
$ do
Ptr EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
Ptr Widget
result <- Ptr EventController -> IO (Ptr Widget)
gtk_event_controller_get_widget Ptr EventController
controller'
Text -> Ptr Widget -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"eventControllerGetWidget" Ptr Widget
result
Widget
result' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result'
#if defined(ENABLE_OVERLOADING)
data EventControllerGetWidgetMethodInfo
instance (signature ~ (m Gtk.Widget.Widget), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerGetWidgetMethodInfo a signature where
overloadedMethod = eventControllerGetWidget
instance O.OverloadedMethodInfo EventControllerGetWidgetMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerGetWidget",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerGetWidget"
}
#endif
foreign import ccall "gtk_event_controller_reset" gtk_event_controller_reset ::
Ptr EventController ->
IO ()
eventControllerReset ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> m ()
eventControllerReset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> m ()
eventControllerReset a
controller = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
Ptr EventController -> IO ()
gtk_event_controller_reset Ptr EventController
controller'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EventControllerResetMethodInfo
instance (signature ~ (m ()), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerResetMethodInfo a signature where
overloadedMethod = eventControllerReset
instance O.OverloadedMethodInfo EventControllerResetMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerReset",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerReset"
}
#endif
foreign import ccall "gtk_event_controller_set_name" gtk_event_controller_set_name ::
Ptr EventController ->
CString ->
IO ()
eventControllerSetName ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> T.Text
-> m ()
eventControllerSetName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> Text -> m ()
eventControllerSetName a
controller Text
name = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr EventController -> CString -> IO ()
gtk_event_controller_set_name Ptr EventController
controller' CString
name'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EventControllerSetNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerSetNameMethodInfo a signature where
overloadedMethod = eventControllerSetName
instance O.OverloadedMethodInfo EventControllerSetNameMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerSetName",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerSetName"
}
#endif
foreign import ccall "gtk_event_controller_set_propagation_limit" gtk_event_controller_set_propagation_limit ::
Ptr EventController ->
CUInt ->
IO ()
eventControllerSetPropagationLimit ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> Gtk.Enums.PropagationLimit
-> m ()
eventControllerSetPropagationLimit :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> PropagationLimit -> m ()
eventControllerSetPropagationLimit a
controller PropagationLimit
limit = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
let limit' :: CUInt
limit' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (PropagationLimit -> Int) -> PropagationLimit -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PropagationLimit -> Int
forall a. Enum a => a -> Int
fromEnum) PropagationLimit
limit
Ptr EventController -> CUInt -> IO ()
gtk_event_controller_set_propagation_limit Ptr EventController
controller' CUInt
limit'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EventControllerSetPropagationLimitMethodInfo
instance (signature ~ (Gtk.Enums.PropagationLimit -> m ()), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerSetPropagationLimitMethodInfo a signature where
overloadedMethod = eventControllerSetPropagationLimit
instance O.OverloadedMethodInfo EventControllerSetPropagationLimitMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerSetPropagationLimit",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerSetPropagationLimit"
}
#endif
foreign import ccall "gtk_event_controller_set_propagation_phase" gtk_event_controller_set_propagation_phase ::
Ptr EventController ->
CUInt ->
IO ()
eventControllerSetPropagationPhase ::
(B.CallStack.HasCallStack, MonadIO m, IsEventController a) =>
a
-> Gtk.Enums.PropagationPhase
-> m ()
eventControllerSetPropagationPhase :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsEventController a) =>
a -> PropagationPhase -> m ()
eventControllerSetPropagationPhase a
controller PropagationPhase
phase = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EventController
controller' <- a -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
controller
let phase' :: CUInt
phase' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (PropagationPhase -> Int) -> PropagationPhase -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PropagationPhase -> Int
forall a. Enum a => a -> Int
fromEnum) PropagationPhase
phase
Ptr EventController -> CUInt -> IO ()
gtk_event_controller_set_propagation_phase Ptr EventController
controller' CUInt
phase'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
controller
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EventControllerSetPropagationPhaseMethodInfo
instance (signature ~ (Gtk.Enums.PropagationPhase -> m ()), MonadIO m, IsEventController a) => O.OverloadedMethod EventControllerSetPropagationPhaseMethodInfo a signature where
overloadedMethod = eventControllerSetPropagationPhase
instance O.OverloadedMethodInfo EventControllerSetPropagationPhaseMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.EventController.eventControllerSetPropagationPhase",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-EventController.html#v:eventControllerSetPropagationPhase"
}
#endif