{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Structs.EventCrossing
(
EventCrossing(..) ,
newZeroEventCrossing ,
#if defined(ENABLE_OVERLOADING)
ResolveEventCrossingMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
eventCrossing_detail ,
#endif
getEventCrossingDetail ,
setEventCrossingDetail ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_focus ,
#endif
getEventCrossingFocus ,
setEventCrossingFocus ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_mode ,
#endif
getEventCrossingMode ,
setEventCrossingMode ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_sendEvent ,
#endif
getEventCrossingSendEvent ,
setEventCrossingSendEvent ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_state ,
#endif
getEventCrossingState ,
setEventCrossingState ,
clearEventCrossingSubwindow ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_subwindow ,
#endif
getEventCrossingSubwindow ,
setEventCrossingSubwindow ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_time ,
#endif
getEventCrossingTime ,
setEventCrossingTime ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_type ,
#endif
getEventCrossingType ,
setEventCrossingType ,
clearEventCrossingWindow ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_window ,
#endif
getEventCrossingWindow ,
setEventCrossingWindow ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_x ,
#endif
getEventCrossingX ,
setEventCrossingX ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_xRoot ,
#endif
getEventCrossingXRoot ,
setEventCrossingXRoot ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_y ,
#endif
getEventCrossingY ,
setEventCrossingY ,
#if defined(ENABLE_OVERLOADING)
eventCrossing_yRoot ,
#endif
getEventCrossingYRoot ,
setEventCrossingYRoot ,
) 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.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 {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Objects.Window as Gdk.Window
newtype EventCrossing = EventCrossing (SP.ManagedPtr EventCrossing)
deriving (EventCrossing -> EventCrossing -> Bool
(EventCrossing -> EventCrossing -> Bool)
-> (EventCrossing -> EventCrossing -> Bool) -> Eq EventCrossing
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventCrossing -> EventCrossing -> Bool
$c/= :: EventCrossing -> EventCrossing -> Bool
== :: EventCrossing -> EventCrossing -> Bool
$c== :: EventCrossing -> EventCrossing -> Bool
Eq)
instance SP.ManagedPtrNewtype EventCrossing where
toManagedPtr :: EventCrossing -> ManagedPtr EventCrossing
toManagedPtr (EventCrossing ManagedPtr EventCrossing
p) = ManagedPtr EventCrossing
p
instance BoxedPtr EventCrossing where
boxedPtrCopy :: EventCrossing -> IO EventCrossing
boxedPtrCopy = \EventCrossing
p -> EventCrossing
-> (Ptr EventCrossing -> IO EventCrossing) -> IO EventCrossing
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr EventCrossing
p (Int -> Ptr EventCrossing -> IO (Ptr EventCrossing)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
88 (Ptr EventCrossing -> IO (Ptr EventCrossing))
-> (Ptr EventCrossing -> IO EventCrossing)
-> Ptr EventCrossing
-> IO EventCrossing
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr EventCrossing -> EventCrossing)
-> Ptr EventCrossing -> IO EventCrossing
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr EventCrossing -> EventCrossing
EventCrossing)
boxedPtrFree :: EventCrossing -> IO ()
boxedPtrFree = \EventCrossing
x -> EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr EventCrossing
x Ptr EventCrossing -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr EventCrossing where
boxedPtrCalloc :: IO (Ptr EventCrossing)
boxedPtrCalloc = Int -> IO (Ptr EventCrossing)
forall a. Int -> IO (Ptr a)
callocBytes Int
88
newZeroEventCrossing :: MonadIO m => m EventCrossing
newZeroEventCrossing :: m EventCrossing
newZeroEventCrossing = IO EventCrossing -> m EventCrossing
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventCrossing -> m EventCrossing)
-> IO EventCrossing -> m EventCrossing
forall a b. (a -> b) -> a -> b
$ IO (Ptr EventCrossing)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr EventCrossing)
-> (Ptr EventCrossing -> IO EventCrossing) -> IO EventCrossing
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr EventCrossing -> EventCrossing)
-> Ptr EventCrossing -> IO EventCrossing
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr EventCrossing -> EventCrossing
EventCrossing
instance tag ~ 'AttrSet => Constructible EventCrossing tag where
new :: (ManagedPtr EventCrossing -> EventCrossing)
-> [AttrOp EventCrossing tag] -> m EventCrossing
new ManagedPtr EventCrossing -> EventCrossing
_ [AttrOp EventCrossing tag]
attrs = do
EventCrossing
o <- m EventCrossing
forall (m :: * -> *). MonadIO m => m EventCrossing
newZeroEventCrossing
EventCrossing -> [AttrOp EventCrossing 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set EventCrossing
o [AttrOp EventCrossing tag]
[AttrOp EventCrossing 'AttrSet]
attrs
EventCrossing -> m EventCrossing
forall (m :: * -> *) a. Monad m => a -> m a
return EventCrossing
o
getEventCrossingType :: MonadIO m => EventCrossing -> m Gdk.Enums.EventType
getEventCrossingType :: EventCrossing -> m EventType
getEventCrossingType EventCrossing
s = IO EventType -> m EventType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EventType -> m EventType) -> IO EventType -> m EventType
forall a b. (a -> b) -> a -> b
$ EventCrossing
-> (Ptr EventCrossing -> IO EventType) -> IO EventType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO EventType) -> IO EventType)
-> (Ptr EventCrossing -> IO EventType) -> IO EventType
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
CInt
val <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CInt
let val' :: EventType
val' = (Int -> EventType
forall a. Enum a => Int -> a
toEnum (Int -> EventType) -> (CInt -> Int) -> CInt -> EventType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
val
EventType -> IO EventType
forall (m :: * -> *) a. Monad m => a -> m a
return EventType
val'
setEventCrossingType :: MonadIO m => EventCrossing -> Gdk.Enums.EventType -> m ()
setEventCrossingType :: EventCrossing -> EventType -> m ()
setEventCrossingType EventCrossing
s EventType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
let val' :: CInt
val' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (EventType -> Int) -> EventType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. EventType -> Int
forall a. Enum a => a -> Int
fromEnum) EventType
val
Ptr CInt -> CInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CInt
val' :: CInt)
#if defined(ENABLE_OVERLOADING)
data EventCrossingTypeFieldInfo
instance AttrInfo EventCrossingTypeFieldInfo where
type AttrBaseTypeConstraint EventCrossingTypeFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingTypeFieldInfo = (~) Gdk.Enums.EventType
type AttrTransferTypeConstraint EventCrossingTypeFieldInfo = (~)Gdk.Enums.EventType
type AttrTransferType EventCrossingTypeFieldInfo = Gdk.Enums.EventType
type AttrGetType EventCrossingTypeFieldInfo = Gdk.Enums.EventType
type AttrLabel EventCrossingTypeFieldInfo = "type"
type AttrOrigin EventCrossingTypeFieldInfo = EventCrossing
attrGet = getEventCrossingType
attrSet = setEventCrossingType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_type :: AttrLabelProxy "type"
eventCrossing_type = AttrLabelProxy
#endif
getEventCrossingWindow :: MonadIO m => EventCrossing -> m (Maybe Gdk.Window.Window)
getEventCrossingWindow :: EventCrossing -> m (Maybe Window)
getEventCrossingWindow EventCrossing
s = IO (Maybe Window) -> m (Maybe Window)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe Window)
forall a b. (a -> b) -> a -> b
$ EventCrossing
-> (Ptr EventCrossing -> IO (Maybe Window)) -> IO (Maybe Window)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO (Maybe Window)) -> IO (Maybe Window))
-> (Ptr EventCrossing -> IO (Maybe Window)) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
Ptr Window
val <- Ptr (Ptr Window) -> IO (Ptr Window)
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr (Ptr Window)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO (Ptr Gdk.Window.Window)
Maybe Window
result <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Window
val ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
val' -> do
Window
val'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
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'
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
val''
Maybe Window -> IO (Maybe Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
result
setEventCrossingWindow :: MonadIO m => EventCrossing -> Ptr Gdk.Window.Window -> m ()
setEventCrossingWindow :: EventCrossing -> Ptr Window -> m ()
setEventCrossingWindow EventCrossing
s Ptr Window
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
Ptr (Ptr Window) -> Ptr Window -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr (Ptr Window)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Ptr Window
val :: Ptr Gdk.Window.Window)
clearEventCrossingWindow :: MonadIO m => EventCrossing -> m ()
clearEventCrossingWindow :: EventCrossing -> m ()
clearEventCrossingWindow EventCrossing
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
Ptr (Ptr Window) -> Ptr Window -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr (Ptr Window)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Ptr Window
forall a. Ptr a
FP.nullPtr :: Ptr Gdk.Window.Window)
#if defined(ENABLE_OVERLOADING)
data EventCrossingWindowFieldInfo
instance AttrInfo EventCrossingWindowFieldInfo where
type AttrBaseTypeConstraint EventCrossingWindowFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingWindowFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EventCrossingWindowFieldInfo = (~) (Ptr Gdk.Window.Window)
type AttrTransferTypeConstraint EventCrossingWindowFieldInfo = (~)(Ptr Gdk.Window.Window)
type AttrTransferType EventCrossingWindowFieldInfo = (Ptr Gdk.Window.Window)
type AttrGetType EventCrossingWindowFieldInfo = Maybe Gdk.Window.Window
type AttrLabel EventCrossingWindowFieldInfo = "window"
type AttrOrigin EventCrossingWindowFieldInfo = EventCrossing
attrGet = getEventCrossingWindow
attrSet = setEventCrossingWindow
attrConstruct = undefined
attrClear = clearEventCrossingWindow
attrTransfer _ v = do
return v
eventCrossing_window :: AttrLabelProxy "window"
eventCrossing_window = AttrLabelProxy
#endif
getEventCrossingSendEvent :: MonadIO m => EventCrossing -> m Int8
getEventCrossingSendEvent :: EventCrossing -> m Int8
getEventCrossingSendEvent EventCrossing
s = IO Int8 -> m Int8
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int8 -> m Int8) -> IO Int8 -> m Int8
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO Int8) -> IO Int8
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO Int8) -> IO Int8)
-> (Ptr EventCrossing -> IO Int8) -> IO Int8
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
Int8
val <- Ptr Int8 -> IO Int8
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr Int8
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO Int8
Int8 -> IO Int8
forall (m :: * -> *) a. Monad m => a -> m a
return Int8
val
setEventCrossingSendEvent :: MonadIO m => EventCrossing -> Int8 -> m ()
setEventCrossingSendEvent :: EventCrossing -> Int8 -> m ()
setEventCrossingSendEvent EventCrossing
s Int8
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
Ptr Int8 -> Int8 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr Int8
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Int8
val :: Int8)
#if defined(ENABLE_OVERLOADING)
data EventCrossingSendEventFieldInfo
instance AttrInfo EventCrossingSendEventFieldInfo where
type AttrBaseTypeConstraint EventCrossingSendEventFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingSendEventFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingSendEventFieldInfo = (~) Int8
type AttrTransferTypeConstraint EventCrossingSendEventFieldInfo = (~)Int8
type AttrTransferType EventCrossingSendEventFieldInfo = Int8
type AttrGetType EventCrossingSendEventFieldInfo = Int8
type AttrLabel EventCrossingSendEventFieldInfo = "send_event"
type AttrOrigin EventCrossingSendEventFieldInfo = EventCrossing
attrGet = getEventCrossingSendEvent
attrSet = setEventCrossingSendEvent
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_sendEvent :: AttrLabelProxy "sendEvent"
eventCrossing_sendEvent = AttrLabelProxy
#endif
getEventCrossingSubwindow :: MonadIO m => EventCrossing -> m (Maybe Gdk.Window.Window)
getEventCrossingSubwindow :: EventCrossing -> m (Maybe Window)
getEventCrossingSubwindow EventCrossing
s = IO (Maybe Window) -> m (Maybe Window)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe Window)
forall a b. (a -> b) -> a -> b
$ EventCrossing
-> (Ptr EventCrossing -> IO (Maybe Window)) -> IO (Maybe Window)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO (Maybe Window)) -> IO (Maybe Window))
-> (Ptr EventCrossing -> IO (Maybe Window)) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
Ptr Window
val <- Ptr (Ptr Window) -> IO (Ptr Window)
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr (Ptr Window)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO (Ptr Gdk.Window.Window)
Maybe Window
result <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Window
val ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
val' -> do
Window
val'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
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'
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
val''
Maybe Window -> IO (Maybe Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
result
setEventCrossingSubwindow :: MonadIO m => EventCrossing -> Ptr Gdk.Window.Window -> m ()
setEventCrossingSubwindow :: EventCrossing -> Ptr Window -> m ()
setEventCrossingSubwindow EventCrossing
s Ptr Window
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
Ptr (Ptr Window) -> Ptr Window -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr (Ptr Window)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Ptr Window
val :: Ptr Gdk.Window.Window)
clearEventCrossingSubwindow :: MonadIO m => EventCrossing -> m ()
clearEventCrossingSubwindow :: EventCrossing -> m ()
clearEventCrossingSubwindow EventCrossing
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
Ptr (Ptr Window) -> Ptr Window -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr (Ptr Window)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Ptr Window
forall a. Ptr a
FP.nullPtr :: Ptr Gdk.Window.Window)
#if defined(ENABLE_OVERLOADING)
data EventCrossingSubwindowFieldInfo
instance AttrInfo EventCrossingSubwindowFieldInfo where
type AttrBaseTypeConstraint EventCrossingSubwindowFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingSubwindowFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EventCrossingSubwindowFieldInfo = (~) (Ptr Gdk.Window.Window)
type AttrTransferTypeConstraint EventCrossingSubwindowFieldInfo = (~)(Ptr Gdk.Window.Window)
type AttrTransferType EventCrossingSubwindowFieldInfo = (Ptr Gdk.Window.Window)
type AttrGetType EventCrossingSubwindowFieldInfo = Maybe Gdk.Window.Window
type AttrLabel EventCrossingSubwindowFieldInfo = "subwindow"
type AttrOrigin EventCrossingSubwindowFieldInfo = EventCrossing
attrGet = getEventCrossingSubwindow
attrSet = setEventCrossingSubwindow
attrConstruct = undefined
attrClear = clearEventCrossingSubwindow
attrTransfer _ v = do
return v
eventCrossing_subwindow :: AttrLabelProxy "subwindow"
eventCrossing_subwindow = AttrLabelProxy
#endif
getEventCrossingTime :: MonadIO m => EventCrossing -> m Word32
getEventCrossingTime :: EventCrossing -> m Word32
getEventCrossingTime EventCrossing
s = 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
$ EventCrossing -> (Ptr EventCrossing -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO Word32) -> IO Word32)
-> (Ptr EventCrossing -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO Word32
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setEventCrossingTime :: MonadIO m => EventCrossing -> Word32 -> m ()
setEventCrossingTime :: EventCrossing -> Word32 -> m ()
setEventCrossingTime EventCrossing
s Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data EventCrossingTimeFieldInfo
instance AttrInfo EventCrossingTimeFieldInfo where
type AttrBaseTypeConstraint EventCrossingTimeFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingTimeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingTimeFieldInfo = (~) Word32
type AttrTransferTypeConstraint EventCrossingTimeFieldInfo = (~)Word32
type AttrTransferType EventCrossingTimeFieldInfo = Word32
type AttrGetType EventCrossingTimeFieldInfo = Word32
type AttrLabel EventCrossingTimeFieldInfo = "time"
type AttrOrigin EventCrossingTimeFieldInfo = EventCrossing
attrGet = getEventCrossingTime
attrSet = setEventCrossingTime
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_time :: AttrLabelProxy "time"
eventCrossing_time = AttrLabelProxy
#endif
getEventCrossingX :: MonadIO m => EventCrossing -> m Double
getEventCrossingX :: EventCrossing -> m Double
getEventCrossingX EventCrossing
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO Double) -> IO Double)
-> (Ptr EventCrossing -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setEventCrossingX :: MonadIO m => EventCrossing -> Double -> m ()
setEventCrossingX :: EventCrossing -> Double -> m ()
setEventCrossingX EventCrossing
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data EventCrossingXFieldInfo
instance AttrInfo EventCrossingXFieldInfo where
type AttrBaseTypeConstraint EventCrossingXFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingXFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingXFieldInfo = (~) Double
type AttrTransferTypeConstraint EventCrossingXFieldInfo = (~)Double
type AttrTransferType EventCrossingXFieldInfo = Double
type AttrGetType EventCrossingXFieldInfo = Double
type AttrLabel EventCrossingXFieldInfo = "x"
type AttrOrigin EventCrossingXFieldInfo = EventCrossing
attrGet = getEventCrossingX
attrSet = setEventCrossingX
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_x :: AttrLabelProxy "x"
eventCrossing_x = AttrLabelProxy
#endif
getEventCrossingY :: MonadIO m => EventCrossing -> m Double
getEventCrossingY :: EventCrossing -> m Double
getEventCrossingY EventCrossing
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO Double) -> IO Double)
-> (Ptr EventCrossing -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setEventCrossingY :: MonadIO m => EventCrossing -> Double -> m ()
setEventCrossingY :: EventCrossing -> Double -> m ()
setEventCrossingY EventCrossing
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data EventCrossingYFieldInfo
instance AttrInfo EventCrossingYFieldInfo where
type AttrBaseTypeConstraint EventCrossingYFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingYFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingYFieldInfo = (~) Double
type AttrTransferTypeConstraint EventCrossingYFieldInfo = (~)Double
type AttrTransferType EventCrossingYFieldInfo = Double
type AttrGetType EventCrossingYFieldInfo = Double
type AttrLabel EventCrossingYFieldInfo = "y"
type AttrOrigin EventCrossingYFieldInfo = EventCrossing
attrGet = getEventCrossingY
attrSet = setEventCrossingY
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_y :: AttrLabelProxy "y"
eventCrossing_y = AttrLabelProxy
#endif
getEventCrossingXRoot :: MonadIO m => EventCrossing -> m Double
getEventCrossingXRoot :: EventCrossing -> m Double
getEventCrossingXRoot EventCrossing
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO Double) -> IO Double)
-> (Ptr EventCrossing -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setEventCrossingXRoot :: MonadIO m => EventCrossing -> Double -> m ()
setEventCrossingXRoot :: EventCrossing -> Double -> m ()
setEventCrossingXRoot EventCrossing
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data EventCrossingXRootFieldInfo
instance AttrInfo EventCrossingXRootFieldInfo where
type AttrBaseTypeConstraint EventCrossingXRootFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingXRootFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingXRootFieldInfo = (~) Double
type AttrTransferTypeConstraint EventCrossingXRootFieldInfo = (~)Double
type AttrTransferType EventCrossingXRootFieldInfo = Double
type AttrGetType EventCrossingXRootFieldInfo = Double
type AttrLabel EventCrossingXRootFieldInfo = "x_root"
type AttrOrigin EventCrossingXRootFieldInfo = EventCrossing
attrGet = getEventCrossingXRoot
attrSet = setEventCrossingXRoot
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_xRoot :: AttrLabelProxy "xRoot"
eventCrossing_xRoot = AttrLabelProxy
#endif
getEventCrossingYRoot :: MonadIO m => EventCrossing -> m Double
getEventCrossingYRoot :: EventCrossing -> m Double
getEventCrossingYRoot EventCrossing
s = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO Double) -> IO Double
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO Double) -> IO Double)
-> (Ptr EventCrossing -> IO Double) -> IO Double
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
CDouble
val <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64) :: IO CDouble
let val' :: Double
val' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
val
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
val'
setEventCrossingYRoot :: MonadIO m => EventCrossing -> Double -> m ()
setEventCrossingYRoot :: EventCrossing -> Double -> m ()
setEventCrossingYRoot EventCrossing
s Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CDouble
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64) (CDouble
val' :: CDouble)
#if defined(ENABLE_OVERLOADING)
data EventCrossingYRootFieldInfo
instance AttrInfo EventCrossingYRootFieldInfo where
type AttrBaseTypeConstraint EventCrossingYRootFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingYRootFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingYRootFieldInfo = (~) Double
type AttrTransferTypeConstraint EventCrossingYRootFieldInfo = (~)Double
type AttrTransferType EventCrossingYRootFieldInfo = Double
type AttrGetType EventCrossingYRootFieldInfo = Double
type AttrLabel EventCrossingYRootFieldInfo = "y_root"
type AttrOrigin EventCrossingYRootFieldInfo = EventCrossing
attrGet = getEventCrossingYRoot
attrSet = setEventCrossingYRoot
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_yRoot :: AttrLabelProxy "yRoot"
eventCrossing_yRoot = AttrLabelProxy
#endif
getEventCrossingMode :: MonadIO m => EventCrossing -> m Gdk.Enums.CrossingMode
getEventCrossingMode :: EventCrossing -> m CrossingMode
getEventCrossingMode EventCrossing
s = IO CrossingMode -> m CrossingMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CrossingMode -> m CrossingMode)
-> IO CrossingMode -> m CrossingMode
forall a b. (a -> b) -> a -> b
$ EventCrossing
-> (Ptr EventCrossing -> IO CrossingMode) -> IO CrossingMode
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO CrossingMode) -> IO CrossingMode)
-> (Ptr EventCrossing -> IO CrossingMode) -> IO CrossingMode
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72) :: IO CUInt
let val' :: CrossingMode
val' = (Int -> CrossingMode
forall a. Enum a => Int -> a
toEnum (Int -> CrossingMode) -> (CUInt -> Int) -> CUInt -> CrossingMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
val
CrossingMode -> IO CrossingMode
forall (m :: * -> *) a. Monad m => a -> m a
return CrossingMode
val'
setEventCrossingMode :: MonadIO m => EventCrossing -> Gdk.Enums.CrossingMode -> m ()
setEventCrossingMode :: EventCrossing -> CrossingMode -> m ()
setEventCrossingMode EventCrossing
s CrossingMode
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
let val' :: CUInt
val' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (CrossingMode -> Int) -> CrossingMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CrossingMode -> Int
forall a. Enum a => a -> Int
fromEnum) CrossingMode
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data EventCrossingModeFieldInfo
instance AttrInfo EventCrossingModeFieldInfo where
type AttrBaseTypeConstraint EventCrossingModeFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingModeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingModeFieldInfo = (~) Gdk.Enums.CrossingMode
type AttrTransferTypeConstraint EventCrossingModeFieldInfo = (~)Gdk.Enums.CrossingMode
type AttrTransferType EventCrossingModeFieldInfo = Gdk.Enums.CrossingMode
type AttrGetType EventCrossingModeFieldInfo = Gdk.Enums.CrossingMode
type AttrLabel EventCrossingModeFieldInfo = "mode"
type AttrOrigin EventCrossingModeFieldInfo = EventCrossing
attrGet = getEventCrossingMode
attrSet = setEventCrossingMode
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_mode :: AttrLabelProxy "mode"
eventCrossing_mode = AttrLabelProxy
#endif
getEventCrossingDetail :: MonadIO m => EventCrossing -> m Gdk.Enums.NotifyType
getEventCrossingDetail :: EventCrossing -> m NotifyType
getEventCrossingDetail EventCrossing
s = IO NotifyType -> m NotifyType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO NotifyType -> m NotifyType) -> IO NotifyType -> m NotifyType
forall a b. (a -> b) -> a -> b
$ EventCrossing
-> (Ptr EventCrossing -> IO NotifyType) -> IO NotifyType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO NotifyType) -> IO NotifyType)
-> (Ptr EventCrossing -> IO NotifyType) -> IO NotifyType
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76) :: IO CUInt
let val' :: NotifyType
val' = (Int -> NotifyType
forall a. Enum a => Int -> a
toEnum (Int -> NotifyType) -> (CUInt -> Int) -> CUInt -> NotifyType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
val
NotifyType -> IO NotifyType
forall (m :: * -> *) a. Monad m => a -> m a
return NotifyType
val'
setEventCrossingDetail :: MonadIO m => EventCrossing -> Gdk.Enums.NotifyType -> m ()
setEventCrossingDetail :: EventCrossing -> NotifyType -> m ()
setEventCrossingDetail EventCrossing
s NotifyType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
let val' :: CUInt
val' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (NotifyType -> Int) -> NotifyType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NotifyType -> Int
forall a. Enum a => a -> Int
fromEnum) NotifyType
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
76) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data EventCrossingDetailFieldInfo
instance AttrInfo EventCrossingDetailFieldInfo where
type AttrBaseTypeConstraint EventCrossingDetailFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingDetailFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingDetailFieldInfo = (~) Gdk.Enums.NotifyType
type AttrTransferTypeConstraint EventCrossingDetailFieldInfo = (~)Gdk.Enums.NotifyType
type AttrTransferType EventCrossingDetailFieldInfo = Gdk.Enums.NotifyType
type AttrGetType EventCrossingDetailFieldInfo = Gdk.Enums.NotifyType
type AttrLabel EventCrossingDetailFieldInfo = "detail"
type AttrOrigin EventCrossingDetailFieldInfo = EventCrossing
attrGet = getEventCrossingDetail
attrSet = setEventCrossingDetail
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_detail :: AttrLabelProxy "detail"
eventCrossing_detail = AttrLabelProxy
#endif
getEventCrossingFocus :: MonadIO m => EventCrossing -> m Bool
getEventCrossingFocus :: EventCrossing -> m Bool
getEventCrossingFocus EventCrossing
s = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO Bool) -> IO Bool
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO Bool) -> IO Bool)
-> (Ptr EventCrossing -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
CInt
val <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80) :: IO CInt
let val' :: Bool
val' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
val
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
val'
setEventCrossingFocus :: MonadIO m => EventCrossing -> Bool -> m ()
setEventCrossingFocus :: EventCrossing -> Bool -> m ()
setEventCrossingFocus EventCrossing
s Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
let val' :: CInt
val' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
val
Ptr CInt -> CInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80) (CInt
val' :: CInt)
#if defined(ENABLE_OVERLOADING)
data EventCrossingFocusFieldInfo
instance AttrInfo EventCrossingFocusFieldInfo where
type AttrBaseTypeConstraint EventCrossingFocusFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingFocusFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingFocusFieldInfo = (~) Bool
type AttrTransferTypeConstraint EventCrossingFocusFieldInfo = (~)Bool
type AttrTransferType EventCrossingFocusFieldInfo = Bool
type AttrGetType EventCrossingFocusFieldInfo = Bool
type AttrLabel EventCrossingFocusFieldInfo = "focus"
type AttrOrigin EventCrossingFocusFieldInfo = EventCrossing
attrGet = getEventCrossingFocus
attrSet = setEventCrossingFocus
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_focus :: AttrLabelProxy "focus"
eventCrossing_focus = AttrLabelProxy
#endif
getEventCrossingState :: MonadIO m => EventCrossing -> m [Gdk.Flags.ModifierType]
getEventCrossingState :: EventCrossing -> m [ModifierType]
getEventCrossingState EventCrossing
s = 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
$ EventCrossing
-> (Ptr EventCrossing -> IO [ModifierType]) -> IO [ModifierType]
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO [ModifierType]) -> IO [ModifierType])
-> (Ptr EventCrossing -> IO [ModifierType]) -> IO [ModifierType]
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84) :: IO CUInt
let val' :: [ModifierType]
val' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
val
[ModifierType] -> IO [ModifierType]
forall (m :: * -> *) a. Monad m => a -> m a
return [ModifierType]
val'
setEventCrossingState :: MonadIO m => EventCrossing -> [Gdk.Flags.ModifierType] -> m ()
setEventCrossingState :: EventCrossing -> [ModifierType] -> m ()
setEventCrossingState EventCrossing
s [ModifierType]
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ EventCrossing -> (Ptr EventCrossing -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr EventCrossing
s ((Ptr EventCrossing -> IO ()) -> IO ())
-> (Ptr EventCrossing -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr EventCrossing
ptr -> do
let val' :: CUInt
val' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr EventCrossing
ptr Ptr EventCrossing -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
84) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data EventCrossingStateFieldInfo
instance AttrInfo EventCrossingStateFieldInfo where
type AttrBaseTypeConstraint EventCrossingStateFieldInfo = (~) EventCrossing
type AttrAllowedOps EventCrossingStateFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventCrossingStateFieldInfo = (~) [Gdk.Flags.ModifierType]
type AttrTransferTypeConstraint EventCrossingStateFieldInfo = (~)[Gdk.Flags.ModifierType]
type AttrTransferType EventCrossingStateFieldInfo = [Gdk.Flags.ModifierType]
type AttrGetType EventCrossingStateFieldInfo = [Gdk.Flags.ModifierType]
type AttrLabel EventCrossingStateFieldInfo = "state"
type AttrOrigin EventCrossingStateFieldInfo = EventCrossing
attrGet = getEventCrossingState
attrSet = setEventCrossingState
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
eventCrossing_state :: AttrLabelProxy "state"
eventCrossing_state = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList EventCrossing
type instance O.AttributeList EventCrossing = EventCrossingAttributeList
type EventCrossingAttributeList = ('[ '("type", EventCrossingTypeFieldInfo), '("window", EventCrossingWindowFieldInfo), '("sendEvent", EventCrossingSendEventFieldInfo), '("subwindow", EventCrossingSubwindowFieldInfo), '("time", EventCrossingTimeFieldInfo), '("x", EventCrossingXFieldInfo), '("y", EventCrossingYFieldInfo), '("xRoot", EventCrossingXRootFieldInfo), '("yRoot", EventCrossingYRootFieldInfo), '("mode", EventCrossingModeFieldInfo), '("detail", EventCrossingDetailFieldInfo), '("focus", EventCrossingFocusFieldInfo), '("state", EventCrossingStateFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveEventCrossingMethod (t :: Symbol) (o :: *) :: * where
ResolveEventCrossingMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEventCrossingMethod t EventCrossing, O.MethodInfo info EventCrossing p) => OL.IsLabel t (EventCrossing -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif