X11-1.10.3: A binding to the X11 graphics library

Copyright | (c) Alastair Reid 1999-2003
License | BSD-style (see the file libraries/base/LICENSE)
Maintainer | libraries@haskell.org
Stability | provisional
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell98

Graphics.X11.Xlib.Event

Description

A collection of FFI declarations for interfacing with Xlib Events.

Synopsis

- type QueuedMode = CInt
- queuedAlready :: QueuedMode
- queuedAfterFlush :: QueuedMode
- queuedAfterReading :: QueuedMode
- newtype XEvent = XEvent XEventPtr
- type XEventPtr = Ptr XEvent
- allocaXEvent :: (XEventPtr -> IO a) -> IO a
- get_EventType :: XEventPtr -> IO EventType
- get_Window :: XEventPtr -> IO Window
- type XKeyEvent = (Window, Window, Time, CInt, CInt, CInt, CInt, Modifier, KeyCode, Bool)
- type XKeyEventPtr = Ptr XKeyEvent
- asKeyEvent :: XEventPtr -> XKeyEventPtr
- type XButtonEvent = (Window, Window, Time, CInt, CInt, CInt, CInt, Modifier, Button, Bool)
- get_KeyEvent :: XEventPtr -> IO XKeyEvent
- get_ButtonEvent :: XEventPtr -> IO XButtonEvent
- get_MotionEvent :: XEventPtr -> IO XMotionEvent
- type XMotionEvent = (Window, Window, Time, CInt, CInt, CInt, CInt, Modifier, NotifyMode, Bool)
- type XExposeEvent = (Position, Position, Dimension, Dimension, CInt)
- get_ExposeEvent :: XEventPtr -> IO XExposeEvent
- type XMappingEvent = (MappingRequest, KeyCode, CInt)
- type XConfigureEvent = (Position, Position, Dimension, Dimension)
- get_ConfigureEvent :: XEventPtr -> IO XConfigureEvent
- waitForEvent :: Display -> Word32 -> IO Bool
- gettimeofday_in_milliseconds :: IO Integer
- flush :: Display -> IO ()
- sync :: Display -> Bool -> IO ()
- pending :: Display -> IO CInt
- eventsQueued :: Display -> QueuedMode -> IO CInt
- nextEvent :: Display -> XEventPtr -> IO ()
- allowEvents :: Display -> AllowEvents -> Time -> IO ()
- selectInput :: Display -> Window -> EventMask -> IO ()
- sendEvent :: Display -> Window -> Bool -> EventMask -> XEventPtr -> IO ()
- windowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO ()
- checkWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO Bool
- maskEvent :: Display -> EventMask -> XEventPtr -> IO ()
- checkMaskEvent :: Display -> EventMask -> XEventPtr -> IO Bool
- checkTypedEvent :: Display -> EventType -> XEventPtr -> IO Bool
- checkTypedWindowEvent :: Display -> Window -> EventType -> XEventPtr -> IO Bool
- putBackEvent :: Display -> XEventPtr -> IO ()
- peekEvent :: Display -> XEventPtr -> IO ()
- refreshKeyboardMapping :: XMappingEvent -> IO ()

# Documentation

type QueuedMode = CInt Source #

queuedAlready :: QueuedMode Source #

queuedAfterFlush :: QueuedMode Source #

queuedAfterReading :: QueuedMode Source #

newtype XEvent Source #

Constructors

XEvent XEventPtr |

#### Instances

Instances details

Data XEvent Source # |

Instance details

Defined in Graphics.X11.Xlib.Event

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> XEvent -> c XEvent Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c XEvent Source #

toConstr :: XEvent -> Constr Source #

dataTypeOf :: XEvent -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c XEvent) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c XEvent) Source #

gmapT :: (forall b. Data b => b -> b) -> XEvent -> XEvent Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> XEvent -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> XEvent -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> XEvent -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> XEvent -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> XEvent -> m XEvent Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> XEvent -> m XEvent Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> XEvent -> m XEvent Source #

Show XEvent Source # |
Instance details Defined in Graphics.X11.Xlib.Event Methods showsPrec :: Int -> XEvent -> ShowS Source # show :: XEvent -> String Source # showList :: [XEvent] -> ShowS Source #
Eq XEvent Source # |
Instance details Defined in Graphics.X11.Xlib.Event Methods (==) :: XEvent -> XEvent -> Bool Source # (/=) :: XEvent -> XEvent -> Bool Source #
Ord XEvent Source # |
Instance details Defined in Graphics.X11.Xlib.Event Methods compare :: XEvent -> XEvent -> Ordering Source # (<) :: XEvent -> XEvent -> Bool Source # (<=) :: XEvent -> XEvent -> Bool Source # (>) :: XEvent -> XEvent -> Bool Source # (>=) :: XEvent -> XEvent -> Bool Source # max :: XEvent -> XEvent -> XEvent Source # min :: XEvent -> XEvent -> XEvent Source #

type XEventPtr = Ptr XEvent Source #

allocaXEvent :: (XEventPtr -> IO a) -> IO a Source #

get_EventType :: XEventPtr -> IO EventType Source #

get_Window :: XEventPtr -> IO Window Source #

type XKeyEvent = (Window, Window, Time, CInt, CInt, CInt, CInt, Modifier, KeyCode, Bool) Source #

type XKeyEventPtr = Ptr XKeyEvent Source #

asKeyEvent :: XEventPtr -> XKeyEventPtr Source #

type XButtonEvent = (Window, Window, Time, CInt, CInt, CInt, CInt, Modifier, Button, Bool) Source #

get_KeyEvent :: XEventPtr -> IO XKeyEvent Source #

get_ButtonEvent :: XEventPtr -> IO XButtonEvent Source #

get_MotionEvent :: XEventPtr -> IO XMotionEvent Source #

type XMotionEvent = (Window, Window, Time, CInt, CInt, CInt, CInt, Modifier, NotifyMode, Bool) Source #

type XExposeEvent = (Position, Position, Dimension, Dimension, CInt) Source #

get_ExposeEvent :: XEventPtr -> IO XExposeEvent Source #

type XMappingEvent = (MappingRequest, KeyCode, CInt) Source #

type XConfigureEvent = (Position, Position, Dimension, Dimension) Source #

get_ConfigureEvent :: XEventPtr -> IO XConfigureEvent Source #

waitForEvent :: Display -> Word32 -> IO Bool Source #

Reads an event with a timeout (in microseconds). Returns True if timeout occurs.

gettimeofday_in_milliseconds :: IO Integer Source #

This function is somewhat compatible with Win32's `TimeGetTime()`

flush :: Display -> IO () Source #

interface to the X11 library function `XFlush()`.

sync :: Display -> Bool -> IO () Source #

interface to the X11 library function `XSync()`.

pending :: Display -> IO CInt Source #

interface to the X11 library function `XPending()`.

eventsQueued :: Display -> QueuedMode -> IO CInt Source #

interface to the X11 library function `XEventsQueued()`.

nextEvent :: Display -> XEventPtr -> IO () Source #

interface to the X11 library function `XNextEvent()`.

allowEvents :: Display -> AllowEvents -> Time -> IO () Source #

interface to the X11 library function `XAllowEvents()`.

selectInput :: Display -> Window -> EventMask -> IO () Source #

interface to the X11 library function `XSelectInput()`.

sendEvent :: Display -> Window -> Bool -> EventMask -> XEventPtr -> IO () Source #

interface to the X11 library function `XSendEvent()`.

windowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO () Source #

interface to the X11 library function `XWindowEvent()`.

checkWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO Bool Source #

interface to the X11 library function `XCheckWindowEvent()`.

maskEvent :: Display -> EventMask -> XEventPtr -> IO () Source #

interface to the X11 library function `XMaskEvent()`.

checkMaskEvent :: Display -> EventMask -> XEventPtr -> IO Bool Source #

interface to the X11 library function `XCheckMaskEvent()`.

checkTypedEvent :: Display -> EventType -> XEventPtr -> IO Bool Source #

interface to the X11 library function `XCheckTypedEvent()`.

checkTypedWindowEvent :: Display -> Window -> EventType -> XEventPtr -> IO Bool Source #

interface to the X11 library function `XCheckTypedWindowEvent()`.

putBackEvent :: Display -> XEventPtr -> IO () Source #

interface to the X11 library function `XPutBackEvent()`.

peekEvent :: Display -> XEventPtr -> IO () Source #

interface to the X11 library function `XPeekEvent()`.

refreshKeyboardMapping :: XMappingEvent -> IO () Source #

interface to the X11 library function `XRefreshKeyboardMapping()`.