module GI.Gdk.Structs.EventSelection
(
EventSelection(..) ,
noEventSelection ,
eventSelectionReadProperty ,
eventSelectionReadRequestor ,
eventSelectionReadSelection ,
eventSelectionReadSendEvent ,
eventSelectionReadTarget ,
eventSelectionReadTime ,
eventSelectionReadType ,
eventSelectionReadWindow ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gdk.Types
import GI.Gdk.Callbacks
newtype EventSelection = EventSelection (ForeignPtr EventSelection)
noEventSelection :: Maybe EventSelection
noEventSelection = Nothing
eventSelectionReadType :: EventSelection -> IO EventType
eventSelectionReadType s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CUInt
let val' = (toEnum . fromIntegral) val
return val'
eventSelectionReadWindow :: EventSelection -> IO Window
eventSelectionReadWindow s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO (Ptr Window)
val' <- (newObject Window) val
return val'
eventSelectionReadSendEvent :: EventSelection -> IO Int8
eventSelectionReadSendEvent s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO Int8
return val
eventSelectionReadSelection :: EventSelection -> IO Atom
eventSelectionReadSelection s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO (Ptr Atom)
val' <- (\x -> Atom <$> newForeignPtr_ x) val
return val'
eventSelectionReadTarget :: EventSelection -> IO Atom
eventSelectionReadTarget s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 32) :: IO (Ptr Atom)
val' <- (\x -> Atom <$> newForeignPtr_ x) val
return val'
eventSelectionReadProperty :: EventSelection -> IO Atom
eventSelectionReadProperty s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 40) :: IO (Ptr Atom)
val' <- (\x -> Atom <$> newForeignPtr_ x) val
return val'
eventSelectionReadTime :: EventSelection -> IO Word32
eventSelectionReadTime s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 48) :: IO Word32
return val
eventSelectionReadRequestor :: EventSelection -> IO Window
eventSelectionReadRequestor s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 56) :: IO (Ptr Window)
val' <- (newObject Window) val
return val'