X11-1.6.1.1: A binding to the X11 graphics library

Stabilityexperimental
Safe HaskellNone

Graphics.X11.Xlib.Extras

Description

 

Synopsis

Documentation

data Event

Constructors

AnyEvent 
ConfigureRequestEvent 

Fields

ev_event_type :: !EventType
 
ev_serial :: !CULong
 
ev_send_event :: !Bool
 
ev_event_display :: Display
 
ev_parent :: !Window
 
ev_window :: !Window
 
ev_x :: !CInt
 
ev_y :: !CInt
 
ev_width :: !CInt
 
ev_height :: !CInt
 
ev_border_width :: !CInt
 
ev_above :: !Window
 
ev_detail :: !NotifyDetail
 
ev_value_mask :: !CULong
 
ConfigureEvent 

Fields

ev_event_type :: !EventType
 
ev_serial :: !CULong
 
ev_send_event :: !Bool
 
ev_event_display :: Display
 
ev_event :: !Window
 
ev_window :: !Window
 
ev_x :: !CInt
 
ev_y :: !CInt
 
ev_width :: !CInt
 
ev_height :: !CInt
 
ev_border_width :: !CInt
 
ev_above :: !Window
 
ev_override_redirect :: !Bool
 
MapRequestEvent 
KeyEvent 

Fields

ev_event_type :: !EventType
 
ev_serial :: !CULong
 
ev_send_event :: !Bool
 
ev_event_display :: Display
 
ev_window :: !Window
 
ev_root :: !Window
 
ev_subwindow :: !Window
 
ev_time :: !Time
 
ev_x :: !CInt
 
ev_y :: !CInt
 
ev_x_root :: !CInt
 
ev_y_root :: !CInt
 
ev_state :: !KeyMask
 
ev_keycode :: !KeyCode
 
ev_same_screen :: !Bool
 
ButtonEvent 

Fields

ev_event_type :: !EventType
 
ev_serial :: !CULong
 
ev_send_event :: !Bool
 
ev_event_display :: Display
 
ev_window :: !Window
 
ev_root :: !Window
 
ev_subwindow :: !Window
 
ev_time :: !Time
 
ev_x :: !CInt
 
ev_y :: !CInt
 
ev_x_root :: !CInt
 
ev_y_root :: !CInt
 
ev_state :: !KeyMask
 
ev_button :: !Button
 
ev_same_screen :: !Bool
 
MotionEvent 

Fields

ev_event_type :: !EventType
 
ev_serial :: !CULong
 
ev_send_event :: !Bool
 
ev_event_display :: Display
 
ev_x :: !CInt
 
ev_y :: !CInt
 
ev_window :: !Window
 
DestroyWindowEvent 
UnmapEvent 
MapNotifyEvent 
MappingNotifyEvent 
CrossingEvent 

Fields

ev_event_type :: !EventType
 
ev_serial :: !CULong
 
ev_send_event :: !Bool
 
ev_event_display :: Display
 
ev_window :: !Window
 
ev_root :: !Window
 
ev_subwindow :: !Window
 
ev_time :: !Time
 
ev_x :: !CInt
 
ev_y :: !CInt
 
ev_x_root :: !CInt
 
ev_y_root :: !CInt
 
ev_mode :: !NotifyMode
 
ev_detail :: !NotifyDetail
 
ev_same_screen :: !Bool
 
ev_focus :: !Bool
 
ev_state :: !Modifier
 
SelectionRequest 
PropertyEvent 
ExposeEvent 

Fields

ev_event_type :: !EventType
 
ev_serial :: !CULong
 
ev_send_event :: !Bool
 
ev_event_display :: Display
 
ev_window :: !Window
 
ev_x :: !CInt
 
ev_y :: !CInt
 
ev_width :: !CInt
 
ev_height :: !CInt
 
ev_count :: !CInt
 
ClientMessageEvent 
RRScreenChangeNotifyEvent 
RRNotifyEvent 
RRCrtcChangeNotifyEvent 

Fields

ev_event_type :: !EventType
 
ev_serial :: !CULong
 
ev_send_event :: !Bool
 
ev_event_display :: Display
 
ev_window :: !Window
 
ev_subtype :: !CInt
 
ev_crtc :: !RRCrtc
 
ev_rr_mode :: !RRMode
 
ev_rotation :: !Rotation
 
ev_x :: !CInt
 
ev_y :: !CInt
 
ev_rr_width :: !CUInt
 
ev_rr_height :: !CUInt
 
RROutputChangeNotifyEvent 
RROutputPropertyNotifyEvent 

Instances

Show Event 
Typeable Event 

eventTable :: [(EventType, String)]

eventName :: Event -> String

data WindowChanges

Constructors

WindowChanges 

Fields

wc_x :: CInt
 
wc_y :: CInt
 
wc_width :: CInt
 
wc_height :: CInt
 
wc_border_width :: CInt
 
wc_sibling :: Window
 
wc_stack_mode :: CInt
 

Instances

Storable WindowChanges 

xConfigureWindow :: Display -> Window -> CULong -> Ptr WindowChanges -> IO CInt

killClient :: Display -> Window -> IO CInt

configureWindow :: Display -> Window -> CULong -> WindowChanges -> IO ()

xQueryTree :: Display -> Window -> Ptr Window -> Ptr Window -> Ptr (Ptr Window) -> Ptr CInt -> IO Status

data WindowAttributes

Constructors

WindowAttributes 

Fields

wa_x :: CInt
 
wa_y :: CInt
 
wa_width :: CInt
 
wa_height :: CInt
 
wa_border_width :: CInt
 
wa_map_state :: CInt
 
wa_override_redirect :: Bool
 

Instances

Storable WindowAttributes 

waIsUnmapped :: CInt

waIsViewable :: CInt

changeWindowAttributes :: Display -> Window -> AttributeMask -> Ptr SetWindowAttributes -> IO ()

interface to the X11 library function XChangeWindowAttributes().

withServer :: Display -> IO () -> IO ()

Run an action with the server

data TextProperty

Constructors

TextProperty 

Fields

tp_value :: CString
 
tp_encoding :: Atom
 
tp_format :: CInt
 
tp_nitems :: Word32
 

Instances

Storable TextProperty 

xwcTextPropertyToTextList :: Display -> Ptr TextProperty -> Ptr (Ptr CWString) -> Ptr CInt -> IO CInt

wcFreeStringList :: Ptr CWString -> IO ()

newtype FontSet

Constructors

FontSet (Ptr FontSet) 

Instances

Eq FontSet 
Ord FontSet 
Show FontSet 

xCreateFontSet :: Display -> CString -> Ptr (Ptr CString) -> Ptr CInt -> Ptr CString -> IO (Ptr FontSet)

createFontSet :: Display -> String -> IO ([String], String, FontSet)

freeStringList :: Ptr CString -> IO ()

freeFontSet :: Display -> FontSet -> IO ()

xwcTextExtents :: FontSet -> CWString -> CInt -> Ptr Rectangle -> Ptr Rectangle -> IO CInt

xwcDrawString :: Display -> Drawable -> FontSet -> GC -> Position -> Position -> CWString -> CInt -> IO ()

wcDrawString :: Display -> Drawable -> FontSet -> GC -> Position -> Position -> String -> IO ()

xwcDrawImageString :: Display -> Drawable -> FontSet -> GC -> Position -> Position -> CWString -> CInt -> IO ()

wcDrawImageString :: Display -> Drawable -> FontSet -> GC -> Position -> Position -> String -> IO ()

xwcTextEscapement :: FontSet -> CWString -> CInt -> IO Int32

wcTextEscapement :: FontSet -> String -> Int32

xFetchName :: Display -> Window -> Ptr CString -> IO Status

fetchName :: Display -> Window -> IO (Maybe String)

getWMProtocols :: Display -> Window -> IO [Atom]

The XGetWMProtocols function returns the list of atoms stored in the WM_PROTOCOLS property on the specified window. These atoms describe window manager protocols in which the owner of this window is willing to participate. If the property exists, is of type ATOM, is of format 32, and the atom WM_PROTOCOLS can be interned, XGetWMProtocols sets the protocols_return argument to a list of atoms, sets the count_return argument to the number of elements in the list, and returns a nonzero status. Otherwise, it sets neither of the return arguments and returns a zero status. To release the list of atoms, use XFree.

xGetWMProtocols :: Display -> Window -> Ptr (Ptr Atom) -> Ptr CInt -> IO Status

setSelectionNotify :: XEventPtr -> Window -> Atom -> Atom -> Atom -> Time -> IO ()

setClientMessageEvent :: XEventPtr -> Window -> Atom -> CInt -> Atom -> Time -> IO ()

setConfigureEvent :: XEventPtr -> Window -> Window -> CInt -> CInt -> CInt -> CInt -> CInt -> Window -> Bool -> IO ()

setKeyEvent :: XEventPtr -> Window -> Window -> Window -> KeyMask -> KeyCode -> Bool -> IO ()

refreshKeyboardMapping :: Event -> IO ()

refreshKeyboardMapping. TODO Remove this binding when the fix has been commited to X11

xRefreshKeyboardMapping :: Ptr () -> IO CInt

xChangeProperty :: Display -> Window -> Atom -> Atom -> CInt -> CInt -> Ptr CUChar -> CInt -> IO Status

xGetWindowProperty :: Display -> Window -> Atom -> CLong -> CLong -> Bool -> Atom -> Ptr Atom -> Ptr CInt -> Ptr CULong -> Ptr CULong -> Ptr (Ptr CUChar) -> IO Status

rawGetWindowProperty :: Storable a => Int -> Display -> Atom -> Window -> IO (Maybe [a])

getWindowProperty8 :: Display -> Atom -> Window -> IO (Maybe [CChar])

getWindowProperty16 :: Display -> Atom -> Window -> IO (Maybe [CShort])

getWindowProperty32 :: Display -> Atom -> Window -> IO (Maybe [CLong])

changeProperty8 :: Display -> Window -> Atom -> Atom -> CInt -> [CChar] -> IO ()

changeProperty16 :: Display -> Window -> Atom -> Atom -> CInt -> [CShort] -> IO ()

changeProperty32 :: Display -> Window -> Atom -> Atom -> CInt -> [CLong] -> IO ()

xUnmapWindow :: Display -> Window -> IO CInt

unmapWindow :: Display -> Window -> IO ()

data SizeHints

Instances

Storable SizeHints 

pAspectBit :: Int

xGetWMNormalHints :: Display -> Window -> Ptr SizeHints -> Ptr CLong -> IO Status

data ClassHint

Constructors

ClassHint 

Fields

resName :: String
 
resClass :: String
 

data WMHints

Constructors

WMHints 

Instances

Storable WMHints 

xGetWMHints :: Display -> Window -> IO (Ptr WMHints)

isCursorKey :: KeySym -> Bool

isKeypadKey :: KeySym -> Bool

isPFKey :: KeySym -> Bool

xConvertSelection :: Display -> Atom -> Atom -> Atom -> Window -> Time -> IO ()

type XErrorEventPtr = Ptr ()

data ErrorEvent

Constructors

ErrorEvent 

Fields

ev_type :: !CInt
 
ev_display :: Display
 
ev_serialnum :: !CULong
 
ev_error_code :: !CUChar
 
ev_request_code :: !CUChar
 
ev_minor_code :: !CUChar
 
ev_resourceid :: !XID
 

setErrorHandler :: XErrorHandler -> IO ()

A binding to XSetErrorHandler. NOTE: This is pretty experimental because of safe vs. unsafe calls. I changed sync to a safe call, but there *might* be other calls that cause a problem

getErrorEvent :: XErrorEventPtr -> IO ErrorEvent

Retrieves error event data from a pointer to an XErrorEvent and puts it into an ErrorEvent.

mapRaised :: Display -> Window -> IO CInt

A binding to XMapRaised.

xGetCommand :: Display -> Window -> Ptr (Ptr CWString) -> Ptr CInt -> IO Status

getCommand :: Display -> Window -> IO [String]

xGetModifierMapping :: Display -> IO (Ptr ())

xFreeModifiermap :: Ptr () -> IO (Ptr CInt)

xFree :: Ptr a -> IO CInt