{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Structs.EventSelection
(
EventSelection(..) ,
newZeroEventSelection ,
#if defined(ENABLE_OVERLOADING)
ResolveEventSelectionMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
eventSelection_property ,
#endif
getEventSelectionProperty ,
clearEventSelectionRequestor ,
#if defined(ENABLE_OVERLOADING)
eventSelection_requestor ,
#endif
getEventSelectionRequestor ,
setEventSelectionRequestor ,
#if defined(ENABLE_OVERLOADING)
eventSelection_selection ,
#endif
getEventSelectionSelection ,
#if defined(ENABLE_OVERLOADING)
eventSelection_sendEvent ,
#endif
getEventSelectionSendEvent ,
setEventSelectionSendEvent ,
#if defined(ENABLE_OVERLOADING)
eventSelection_target ,
#endif
getEventSelectionTarget ,
#if defined(ENABLE_OVERLOADING)
eventSelection_time ,
#endif
getEventSelectionTime ,
setEventSelectionTime ,
#if defined(ENABLE_OVERLOADING)
eventSelection_type ,
#endif
getEventSelectionType ,
setEventSelectionType ,
clearEventSelectionWindow ,
#if defined(ENABLE_OVERLOADING)
eventSelection_window ,
#endif
getEventSelectionWindow ,
setEventSelectionWindow ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Objects.Window as Gdk.Window
import {-# SOURCE #-} qualified GI.Gdk.Structs.Atom as Gdk.Atom
newtype EventSelection = EventSelection (SP.ManagedPtr EventSelection)
deriving (EventSelection -> EventSelection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventSelection -> EventSelection -> Bool
$c/= :: EventSelection -> EventSelection -> Bool
== :: EventSelection -> EventSelection -> Bool
$c== :: EventSelection -> EventSelection -> Bool
Eq)
instance SP.ManagedPtrNewtype EventSelection where
toManagedPtr :: EventSelection -> ManagedPtr EventSelection
toManagedPtr (EventSelection ManagedPtr EventSelection
p) = ManagedPtr EventSelection
p
instance BoxedPtr EventSelection where
boxedPtrCopy :: EventSelection -> IO EventSelection
boxedPtrCopy = \EventSelection
p -> forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr EventSelection
p (forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
32 forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr EventSelection -> EventSelection
EventSelection)
boxedPtrFree :: EventSelection -> IO ()
boxedPtrFree = \EventSelection
x -> forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr EventSelection
x forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr EventSelection where
boxedPtrCalloc :: IO (Ptr EventSelection)
boxedPtrCalloc = forall a. Int -> IO (Ptr a)
callocBytes Int
32
newZeroEventSelection :: MonadIO m => m EventSelection
newZeroEventSelection :: forall (m :: * -> *). MonadIO m => m EventSelection
newZeroEventSelection = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr EventSelection -> EventSelection
EventSelection
instance tag ~ 'AttrSet => Constructible EventSelection tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr EventSelection -> EventSelection)
-> [AttrOp EventSelection tag] -> m EventSelection
new ManagedPtr EventSelection -> EventSelection
_ [AttrOp EventSelection tag]
attrs = do
EventSelection
o <- forall (m :: * -> *). MonadIO m => m EventSelection
newZeroEventSelection
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set EventSelection
o [AttrOp EventSelection tag]
attrs
forall (m :: * -> *) a. Monad m => a -> m a
return EventSelection
o
getEventSelectionType :: MonadIO m => EventSelection -> m Gdk.Enums.EventType
getEventSelectionType :: forall (m :: * -> *). MonadIO m => EventSelection -> m EventType
getEventSelectionType EventSelection
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
CInt
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CInt
let val' :: EventType
val' = (forall a. Enum a => Int -> a
toEnum forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
val
forall (m :: * -> *) a. Monad m => a -> m a
return EventType
val'
setEventSelectionType :: MonadIO m => EventSelection -> Gdk.Enums.EventType -> m ()
setEventSelectionType :: forall (m :: * -> *).
MonadIO m =>
EventSelection -> EventType -> m ()
setEventSelectionType EventSelection
s EventType
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
let val' :: CInt
val' = (forall a b. (Integral a, Num b) => a -> b
fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
fromEnum) EventType
val
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CInt
val' :: CInt)
#if defined(ENABLE_OVERLOADING)
data EventSelectionTypeFieldInfo
instance AttrInfo EventSelectionTypeFieldInfo where
type AttrBaseTypeConstraint EventSelectionTypeFieldInfo = (~) EventSelection
type AttrAllowedOps EventSelectionTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventSelectionTypeFieldInfo = (~) Gdk.Enums.EventType
type AttrTransferTypeConstraint EventSelectionTypeFieldInfo = (~)Gdk.Enums.EventType
type AttrTransferType EventSelectionTypeFieldInfo = Gdk.Enums.EventType
type AttrGetType EventSelectionTypeFieldInfo = Gdk.Enums.EventType
type AttrLabel EventSelectionTypeFieldInfo = "type"
type AttrOrigin EventSelectionTypeFieldInfo = EventSelection
attrGet = getEventSelectionType
attrSet = setEventSelectionType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Structs.EventSelection.type"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.26/docs/GI-Gdk-Structs-EventSelection.html#g:attr:type"
})
eventSelection_type :: AttrLabelProxy "type"
eventSelection_type = AttrLabelProxy
#endif
getEventSelectionWindow :: MonadIO m => EventSelection -> m (Maybe Gdk.Window.Window)
getEventSelectionWindow :: forall (m :: * -> *).
MonadIO m =>
EventSelection -> m (Maybe Window)
getEventSelectionWindow EventSelection
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
Ptr Window
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) :: IO (Ptr Gdk.Window.Window)
Maybe Window
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Window
val forall a b. (a -> b) -> a -> b
$ \Ptr Window
val' -> do
Window
val'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gdk.Window.Window) Ptr Window
val'
forall (m :: * -> *) a. Monad m => a -> m a
return Window
val''
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
result
setEventSelectionWindow :: MonadIO m => EventSelection -> Ptr Gdk.Window.Window -> m ()
setEventSelectionWindow :: forall (m :: * -> *).
MonadIO m =>
EventSelection -> Ptr Window -> m ()
setEventSelectionWindow EventSelection
s Ptr Window
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) (Ptr Window
val :: Ptr Gdk.Window.Window)
clearEventSelectionWindow :: MonadIO m => EventSelection -> m ()
clearEventSelectionWindow :: forall (m :: * -> *). MonadIO m => EventSelection -> m ()
clearEventSelectionWindow EventSelection
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
4) (forall a. Ptr a
FP.nullPtr :: Ptr Gdk.Window.Window)
#if defined(ENABLE_OVERLOADING)
data EventSelectionWindowFieldInfo
instance AttrInfo EventSelectionWindowFieldInfo where
type AttrBaseTypeConstraint EventSelectionWindowFieldInfo = (~) EventSelection
type AttrAllowedOps EventSelectionWindowFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EventSelectionWindowFieldInfo = (~) (Ptr Gdk.Window.Window)
type AttrTransferTypeConstraint EventSelectionWindowFieldInfo = (~)(Ptr Gdk.Window.Window)
type AttrTransferType EventSelectionWindowFieldInfo = (Ptr Gdk.Window.Window)
type AttrGetType EventSelectionWindowFieldInfo = Maybe Gdk.Window.Window
type AttrLabel EventSelectionWindowFieldInfo = "window"
type AttrOrigin EventSelectionWindowFieldInfo = EventSelection
attrGet = getEventSelectionWindow
attrSet = setEventSelectionWindow
attrConstruct = undefined
attrClear = clearEventSelectionWindow
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Structs.EventSelection.window"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.26/docs/GI-Gdk-Structs-EventSelection.html#g:attr:window"
})
eventSelection_window :: AttrLabelProxy "window"
eventSelection_window = AttrLabelProxy
#endif
getEventSelectionSendEvent :: MonadIO m => EventSelection -> m Int8
getEventSelectionSendEvent :: forall (m :: * -> *). MonadIO m => EventSelection -> m Int8
getEventSelectionSendEvent EventSelection
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
Int8
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO Int8
forall (m :: * -> *) a. Monad m => a -> m a
return Int8
val
setEventSelectionSendEvent :: MonadIO m => EventSelection -> Int8 -> m ()
setEventSelectionSendEvent :: forall (m :: * -> *). MonadIO m => EventSelection -> Int8 -> m ()
setEventSelectionSendEvent EventSelection
s Int8
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Int8
val :: Int8)
#if defined(ENABLE_OVERLOADING)
data EventSelectionSendEventFieldInfo
instance AttrInfo EventSelectionSendEventFieldInfo where
type AttrBaseTypeConstraint EventSelectionSendEventFieldInfo = (~) EventSelection
type AttrAllowedOps EventSelectionSendEventFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventSelectionSendEventFieldInfo = (~) Int8
type AttrTransferTypeConstraint EventSelectionSendEventFieldInfo = (~)Int8
type AttrTransferType EventSelectionSendEventFieldInfo = Int8
type AttrGetType EventSelectionSendEventFieldInfo = Int8
type AttrLabel EventSelectionSendEventFieldInfo = "send_event"
type AttrOrigin EventSelectionSendEventFieldInfo = EventSelection
attrGet = getEventSelectionSendEvent
attrSet = setEventSelectionSendEvent
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Structs.EventSelection.sendEvent"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.26/docs/GI-Gdk-Structs-EventSelection.html#g:attr:sendEvent"
})
eventSelection_sendEvent :: AttrLabelProxy "sendEvent"
eventSelection_sendEvent = AttrLabelProxy
#endif
getEventSelectionSelection :: MonadIO m => EventSelection -> m Gdk.Atom.Atom
getEventSelectionSelection :: forall (m :: * -> *). MonadIO m => EventSelection -> m Atom
getEventSelectionSelection EventSelection
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
let val :: Ptr Atom
val = Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12 :: (Ptr Gdk.Atom.Atom)
Atom
val' <- (forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Atom -> Atom
Gdk.Atom.Atom) Ptr Atom
val
forall (m :: * -> *) a. Monad m => a -> m a
return Atom
val'
#if defined(ENABLE_OVERLOADING)
data EventSelectionSelectionFieldInfo
instance AttrInfo EventSelectionSelectionFieldInfo where
type AttrBaseTypeConstraint EventSelectionSelectionFieldInfo = (~) EventSelection
type AttrAllowedOps EventSelectionSelectionFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventSelectionSelectionFieldInfo = (~) (Ptr Gdk.Atom.Atom)
type AttrTransferTypeConstraint EventSelectionSelectionFieldInfo = (~)(Ptr Gdk.Atom.Atom)
type AttrTransferType EventSelectionSelectionFieldInfo = (Ptr Gdk.Atom.Atom)
type AttrGetType EventSelectionSelectionFieldInfo = Gdk.Atom.Atom
type AttrLabel EventSelectionSelectionFieldInfo = "selection"
type AttrOrigin EventSelectionSelectionFieldInfo = EventSelection
attrGet = getEventSelectionSelection
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Structs.EventSelection.selection"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.26/docs/GI-Gdk-Structs-EventSelection.html#g:attr:selection"
})
eventSelection_selection :: AttrLabelProxy "selection"
eventSelection_selection = AttrLabelProxy
#endif
getEventSelectionTarget :: MonadIO m => EventSelection -> m Gdk.Atom.Atom
getEventSelectionTarget :: forall (m :: * -> *). MonadIO m => EventSelection -> m Atom
getEventSelectionTarget EventSelection
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
let val :: Ptr Atom
val = Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: (Ptr Gdk.Atom.Atom)
Atom
val' <- (forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Atom -> Atom
Gdk.Atom.Atom) Ptr Atom
val
forall (m :: * -> *) a. Monad m => a -> m a
return Atom
val'
#if defined(ENABLE_OVERLOADING)
data EventSelectionTargetFieldInfo
instance AttrInfo EventSelectionTargetFieldInfo where
type AttrBaseTypeConstraint EventSelectionTargetFieldInfo = (~) EventSelection
type AttrAllowedOps EventSelectionTargetFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventSelectionTargetFieldInfo = (~) (Ptr Gdk.Atom.Atom)
type AttrTransferTypeConstraint EventSelectionTargetFieldInfo = (~)(Ptr Gdk.Atom.Atom)
type AttrTransferType EventSelectionTargetFieldInfo = (Ptr Gdk.Atom.Atom)
type AttrGetType EventSelectionTargetFieldInfo = Gdk.Atom.Atom
type AttrLabel EventSelectionTargetFieldInfo = "target"
type AttrOrigin EventSelectionTargetFieldInfo = EventSelection
attrGet = getEventSelectionTarget
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Structs.EventSelection.target"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.26/docs/GI-Gdk-Structs-EventSelection.html#g:attr:target"
})
eventSelection_target :: AttrLabelProxy "target"
eventSelection_target = AttrLabelProxy
#endif
getEventSelectionProperty :: MonadIO m => EventSelection -> m Gdk.Atom.Atom
getEventSelectionProperty :: forall (m :: * -> *). MonadIO m => EventSelection -> m Atom
getEventSelectionProperty EventSelection
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
let val :: Ptr Atom
val = Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: (Ptr Gdk.Atom.Atom)
Atom
val' <- (forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Atom -> Atom
Gdk.Atom.Atom) Ptr Atom
val
forall (m :: * -> *) a. Monad m => a -> m a
return Atom
val'
#if defined(ENABLE_OVERLOADING)
data EventSelectionPropertyFieldInfo
instance AttrInfo EventSelectionPropertyFieldInfo where
type AttrBaseTypeConstraint EventSelectionPropertyFieldInfo = (~) EventSelection
type AttrAllowedOps EventSelectionPropertyFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint EventSelectionPropertyFieldInfo = (~) (Ptr Gdk.Atom.Atom)
type AttrTransferTypeConstraint EventSelectionPropertyFieldInfo = (~)(Ptr Gdk.Atom.Atom)
type AttrTransferType EventSelectionPropertyFieldInfo = (Ptr Gdk.Atom.Atom)
type AttrGetType EventSelectionPropertyFieldInfo = Gdk.Atom.Atom
type AttrLabel EventSelectionPropertyFieldInfo = "property"
type AttrOrigin EventSelectionPropertyFieldInfo = EventSelection
attrGet = getEventSelectionProperty
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Structs.EventSelection.property"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.26/docs/GI-Gdk-Structs-EventSelection.html#g:attr:property"
})
eventSelection_property :: AttrLabelProxy "property"
eventSelection_property = AttrLabelProxy
#endif
getEventSelectionTime :: MonadIO m => EventSelection -> m Word32
getEventSelectionTime :: forall (m :: * -> *). MonadIO m => EventSelection -> m Word32
getEventSelectionTime EventSelection
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
Word32
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setEventSelectionTime :: MonadIO m => EventSelection -> Word32 -> m ()
setEventSelectionTime :: forall (m :: * -> *). MonadIO m => EventSelection -> Word32 -> m ()
setEventSelectionTime EventSelection
s Word32
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data EventSelectionTimeFieldInfo
instance AttrInfo EventSelectionTimeFieldInfo where
type AttrBaseTypeConstraint EventSelectionTimeFieldInfo = (~) EventSelection
type AttrAllowedOps EventSelectionTimeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventSelectionTimeFieldInfo = (~) Word32
type AttrTransferTypeConstraint EventSelectionTimeFieldInfo = (~)Word32
type AttrTransferType EventSelectionTimeFieldInfo = Word32
type AttrGetType EventSelectionTimeFieldInfo = Word32
type AttrLabel EventSelectionTimeFieldInfo = "time"
type AttrOrigin EventSelectionTimeFieldInfo = EventSelection
attrGet = getEventSelectionTime
attrSet = setEventSelectionTime
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Structs.EventSelection.time"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.26/docs/GI-Gdk-Structs-EventSelection.html#g:attr:time"
})
eventSelection_time :: AttrLabelProxy "time"
eventSelection_time = AttrLabelProxy
#endif
getEventSelectionRequestor :: MonadIO m => EventSelection -> m (Maybe Gdk.Window.Window)
getEventSelectionRequestor :: forall (m :: * -> *).
MonadIO m =>
EventSelection -> m (Maybe Window)
getEventSelectionRequestor EventSelection
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
Ptr Window
val <- forall a. Storable a => Ptr a -> IO a
peek (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28) :: IO (Ptr Gdk.Window.Window)
Maybe Window
result <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Window
val forall a b. (a -> b) -> a -> b
$ \Ptr Window
val' -> do
Window
val'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gdk.Window.Window) Ptr Window
val'
forall (m :: * -> *) a. Monad m => a -> m a
return Window
val''
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
result
setEventSelectionRequestor :: MonadIO m => EventSelection -> Ptr Gdk.Window.Window -> m ()
setEventSelectionRequestor :: forall (m :: * -> *).
MonadIO m =>
EventSelection -> Ptr Window -> m ()
setEventSelectionRequestor EventSelection
s Ptr Window
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28) (Ptr Window
val :: Ptr Gdk.Window.Window)
clearEventSelectionRequestor :: MonadIO m => EventSelection -> m ()
clearEventSelectionRequestor :: forall (m :: * -> *). MonadIO m => EventSelection -> m ()
clearEventSelectionRequestor EventSelection
s = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventSelection
s forall a b. (a -> b) -> a -> b
$ \Ptr EventSelection
ptr -> do
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventSelection
ptr forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28) (forall a. Ptr a
FP.nullPtr :: Ptr Gdk.Window.Window)
#if defined(ENABLE_OVERLOADING)
data EventSelectionRequestorFieldInfo
instance AttrInfo EventSelectionRequestorFieldInfo where
type AttrBaseTypeConstraint EventSelectionRequestorFieldInfo = (~) EventSelection
type AttrAllowedOps EventSelectionRequestorFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EventSelectionRequestorFieldInfo = (~) (Ptr Gdk.Window.Window)
type AttrTransferTypeConstraint EventSelectionRequestorFieldInfo = (~)(Ptr Gdk.Window.Window)
type AttrTransferType EventSelectionRequestorFieldInfo = (Ptr Gdk.Window.Window)
type AttrGetType EventSelectionRequestorFieldInfo = Maybe Gdk.Window.Window
type AttrLabel EventSelectionRequestorFieldInfo = "requestor"
type AttrOrigin EventSelectionRequestorFieldInfo = EventSelection
attrGet = getEventSelectionRequestor
attrSet = setEventSelectionRequestor
attrConstruct = undefined
attrClear = clearEventSelectionRequestor
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gdk.Structs.EventSelection.requestor"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gdk-3.0.26/docs/GI-Gdk-Structs-EventSelection.html#g:attr:requestor"
})
eventSelection_requestor :: AttrLabelProxy "requestor"
eventSelection_requestor = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList EventSelection
type instance O.AttributeList EventSelection = EventSelectionAttributeList
type EventSelectionAttributeList = ('[ '("type", EventSelectionTypeFieldInfo), '("window", EventSelectionWindowFieldInfo), '("sendEvent", EventSelectionSendEventFieldInfo), '("selection", EventSelectionSelectionFieldInfo), '("target", EventSelectionTargetFieldInfo), '("property", EventSelectionPropertyFieldInfo), '("time", EventSelectionTimeFieldInfo), '("requestor", EventSelectionRequestorFieldInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveEventSelectionMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveEventSelectionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEventSelectionMethod t EventSelection, O.OverloadedMethod info EventSelection p) => OL.IsLabel t (EventSelection -> 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 ~ ResolveEventSelectionMethod t EventSelection, O.OverloadedMethod info EventSelection p, R.HasField t EventSelection p) => R.HasField t EventSelection p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveEventSelectionMethod t EventSelection, O.OverloadedMethodInfo info EventSelection) => OL.IsLabel t (O.MethodProxy info EventSelection) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif