-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A binding to the X11 graphics library -- -- A Haskell binding to the X11 graphics library. -- -- The binding is a direct translation of the C binding; for -- documentation of these calls, refer to The Xlib Programming -- Manual, available online at http://tronche.com/gui/x/xlib/. @package X11 @version 1.2 -- | A collection of type declarations for interfacing with Xlib. module Graphics.X11.Xlib.Types -- | pointer to an X11 Display structure newtype Display Display :: (Ptr Display) -> Display -- | pointer to an X11 Screen structure data Screen -- | pointer to an X11 Visual structure data Visual -- | pointer to an X11 GC structure data GC -- | pointer to an X11 XGCValues structure data GCValues -- | pointer to an X11 XSetWindowAttributes structure data SetWindowAttributes -- | counterpart of an X11 XPoint structure data Point Point :: Position -> Position -> Point pt_x :: Point -> Position pt_y :: Point -> Position -- | counterpart of an X11 XRectangle structure data Rectangle Rectangle :: Position -> Position -> Dimension -> Dimension -> Rectangle rect_x :: Rectangle -> Position rect_y :: Rectangle -> Position rect_width :: Rectangle -> Dimension rect_height :: Rectangle -> Dimension -- | counterpart of an X11 XArc structure data Arc Arc :: Position -> Position -> Dimension -> Dimension -> Angle -> Angle -> Arc arc_x :: Arc -> Position arc_y :: Arc -> Position arc_width :: Arc -> Dimension arc_height :: Arc -> Dimension arc_angle1 :: Arc -> Angle arc_angle2 :: Arc -> Angle -- | counterpart of an X11 XSegment structure data Segment Segment :: Position -> Position -> Position -> Position -> Segment seg_x1 :: Segment -> Position seg_y1 :: Segment -> Position seg_x2 :: Segment -> Position seg_y2 :: Segment -> Position -- | counterpart of an X11 XColor structure data Color Color :: Pixel -> Word16 -> Word16 -> Word16 -> Word8 -> Color color_pixel :: Color -> Pixel color_red :: Color -> Word16 color_green :: Color -> Word16 color_blue :: Color -> Word16 color_flags :: Color -> Word8 type Pixel = Word32 type Position = Int32 type Dimension = Word32 type Angle = Int type ScreenNumber = Word32 type Buffer = Int instance Typeable Color instance Typeable Segment instance Typeable Arc instance Typeable Rectangle instance Typeable Point instance Typeable SetWindowAttributes instance Typeable GCValues instance Typeable GC instance Typeable Visual instance Typeable Screen instance Typeable Display instance Eq Color instance Show Color instance Data Color instance Eq Segment instance Show Segment instance Data Segment instance Eq Arc instance Show Arc instance Data Arc instance Eq Rectangle instance Show Rectangle instance Data Rectangle instance Eq Point instance Show Point instance Data Point instance Eq SetWindowAttributes instance Ord SetWindowAttributes instance Show SetWindowAttributes instance Data SetWindowAttributes instance Eq GCValues instance Ord GCValues instance Show GCValues instance Data GCValues instance Eq GC instance Ord GC instance Show GC instance Data GC instance Eq Visual instance Ord Visual instance Show Visual instance Data Visual instance Eq Screen instance Ord Screen instance Show Screen instance Data Screen instance Eq Display instance Ord Display instance Show Display instance Data Display instance Storable Color instance Storable Segment instance Storable Arc instance Storable Rectangle instance Storable Point -- | A collection of type declarations for interfacing with X11. module Graphics.X11.Types type XID = Word32 type Mask = Word32 type Atom = Word32 type VisualID = Word32 type Time = Word32 type Window = XID type Drawable = XID type Font = XID type Pixmap = XID type Cursor = XID type Colormap = XID type GContext = XID type KeyCode = Char type KeySym = XID xK_VoidSymbol :: KeySym xK_BackSpace :: KeySym xK_Tab :: KeySym xK_Linefeed :: KeySym xK_Clear :: KeySym xK_Return :: KeySym xK_Pause :: KeySym xK_Scroll_Lock :: KeySym xK_Sys_Req :: KeySym xK_Escape :: KeySym xK_Delete :: KeySym xK_Multi_key :: KeySym xK_Home :: KeySym xK_Left :: KeySym xK_Up :: KeySym xK_Right :: KeySym xK_Down :: KeySym xK_Prior :: KeySym xK_Page_Up :: KeySym xK_Next :: KeySym xK_Page_Down :: KeySym xK_End :: KeySym xK_Begin :: KeySym xK_Select :: KeySym xK_Print :: KeySym xK_Execute :: KeySym xK_Insert :: KeySym xK_Undo :: KeySym xK_Redo :: KeySym xK_Menu :: KeySym xK_Find :: KeySym xK_Cancel :: KeySym xK_Help :: KeySym xK_Break :: KeySym xK_Mode_switch :: KeySym xK_script_switch :: KeySym xK_Num_Lock :: KeySym xK_KP_Space :: KeySym xK_KP_Tab :: KeySym xK_KP_Enter :: KeySym xK_KP_F1 :: KeySym xK_KP_F2 :: KeySym xK_KP_F3 :: KeySym xK_KP_F4 :: KeySym xK_KP_Home :: KeySym xK_KP_Left :: KeySym xK_KP_Up :: KeySym xK_KP_Right :: KeySym xK_KP_Down :: KeySym xK_KP_Prior :: KeySym xK_KP_Page_Up :: KeySym xK_KP_Next :: KeySym xK_KP_Page_Down :: KeySym xK_KP_End :: KeySym xK_KP_Begin :: KeySym xK_KP_Insert :: KeySym xK_KP_Delete :: KeySym xK_KP_Equal :: KeySym xK_KP_Multiply :: KeySym xK_KP_Add :: KeySym xK_KP_Separator :: KeySym xK_KP_Subtract :: KeySym xK_KP_Decimal :: KeySym xK_KP_Divide :: KeySym xK_KP_0 :: KeySym xK_KP_1 :: KeySym xK_KP_2 :: KeySym xK_KP_3 :: KeySym xK_KP_4 :: KeySym xK_KP_5 :: KeySym xK_KP_6 :: KeySym xK_KP_7 :: KeySym xK_KP_8 :: KeySym xK_KP_9 :: KeySym xK_F1 :: KeySym xK_F2 :: KeySym xK_F3 :: KeySym xK_F4 :: KeySym xK_F5 :: KeySym xK_F6 :: KeySym xK_F7 :: KeySym xK_F8 :: KeySym xK_F9 :: KeySym xK_F10 :: KeySym xK_F11 :: KeySym xK_L1 :: KeySym xK_F12 :: KeySym xK_L2 :: KeySym xK_F13 :: KeySym xK_L3 :: KeySym xK_F14 :: KeySym xK_L4 :: KeySym xK_F15 :: KeySym xK_L5 :: KeySym xK_F16 :: KeySym xK_L6 :: KeySym xK_F17 :: KeySym xK_L7 :: KeySym xK_F18 :: KeySym xK_L8 :: KeySym xK_F19 :: KeySym xK_L9 :: KeySym xK_F20 :: KeySym xK_L10 :: KeySym xK_F21 :: KeySym xK_R1 :: KeySym xK_F22 :: KeySym xK_R2 :: KeySym xK_F23 :: KeySym xK_R3 :: KeySym xK_F24 :: KeySym xK_R4 :: KeySym xK_F25 :: KeySym xK_R5 :: KeySym xK_F26 :: KeySym xK_R6 :: KeySym xK_F27 :: KeySym xK_R7 :: KeySym xK_F28 :: KeySym xK_R8 :: KeySym xK_F29 :: KeySym xK_R9 :: KeySym xK_F30 :: KeySym xK_R10 :: KeySym xK_F31 :: KeySym xK_R11 :: KeySym xK_F32 :: KeySym xK_R12 :: KeySym xK_F33 :: KeySym xK_R13 :: KeySym xK_F34 :: KeySym xK_R14 :: KeySym xK_F35 :: KeySym xK_R15 :: KeySym xK_Shift_L :: KeySym xK_Shift_R :: KeySym xK_Control_L :: KeySym xK_Control_R :: KeySym xK_Caps_Lock :: KeySym xK_Shift_Lock :: KeySym xK_Meta_L :: KeySym xK_Meta_R :: KeySym xK_Alt_L :: KeySym xK_Alt_R :: KeySym xK_Super_L :: KeySym xK_Super_R :: KeySym xK_Hyper_L :: KeySym xK_Hyper_R :: KeySym xK_space :: KeySym xK_exclam :: KeySym xK_quotedbl :: KeySym xK_numbersign :: KeySym xK_dollar :: KeySym xK_percent :: KeySym xK_ampersand :: KeySym xK_apostrophe :: KeySym xK_quoteright :: KeySym xK_parenleft :: KeySym xK_parenright :: KeySym xK_asterisk :: KeySym xK_plus :: KeySym xK_comma :: KeySym xK_minus :: KeySym xK_period :: KeySym xK_slash :: KeySym xK_0 :: KeySym xK_1 :: KeySym xK_2 :: KeySym xK_3 :: KeySym xK_4 :: KeySym xK_5 :: KeySym xK_6 :: KeySym xK_7 :: KeySym xK_8 :: KeySym xK_9 :: KeySym xK_colon :: KeySym xK_semicolon :: KeySym xK_less :: KeySym xK_equal :: KeySym xK_greater :: KeySym xK_question :: KeySym xK_at :: KeySym xK_A :: KeySym xK_B :: KeySym xK_C :: KeySym xK_D :: KeySym xK_E :: KeySym xK_F :: KeySym xK_G :: KeySym xK_H :: KeySym xK_I :: KeySym xK_J :: KeySym xK_K :: KeySym xK_L :: KeySym xK_M :: KeySym xK_N :: KeySym xK_O :: KeySym xK_P :: KeySym xK_Q :: KeySym xK_R :: KeySym xK_S :: KeySym xK_T :: KeySym xK_U :: KeySym xK_V :: KeySym xK_W :: KeySym xK_X :: KeySym xK_Y :: KeySym xK_Z :: KeySym xK_bracketleft :: KeySym xK_backslash :: KeySym xK_bracketright :: KeySym xK_asciicircum :: KeySym xK_underscore :: KeySym xK_grave :: KeySym xK_quoteleft :: KeySym xK_a :: KeySym xK_b :: KeySym xK_c :: KeySym xK_d :: KeySym xK_e :: KeySym xK_f :: KeySym xK_g :: KeySym xK_h :: KeySym xK_i :: KeySym xK_j :: KeySym xK_k :: KeySym xK_l :: KeySym xK_m :: KeySym xK_n :: KeySym xK_o :: KeySym xK_p :: KeySym xK_q :: KeySym xK_r :: KeySym xK_s :: KeySym xK_t :: KeySym xK_u :: KeySym xK_v :: KeySym xK_w :: KeySym xK_x :: KeySym xK_y :: KeySym xK_z :: KeySym xK_braceleft :: KeySym xK_bar :: KeySym xK_braceright :: KeySym xK_asciitilde :: KeySym xK_nobreakspace :: KeySym xK_exclamdown :: KeySym xK_cent :: KeySym xK_sterling :: KeySym xK_currency :: KeySym xK_yen :: KeySym xK_brokenbar :: KeySym xK_section :: KeySym xK_diaeresis :: KeySym xK_copyright :: KeySym xK_ordfeminine :: KeySym xK_guillemotleft :: KeySym xK_notsign :: KeySym xK_hyphen :: KeySym xK_registered :: KeySym xK_macron :: KeySym xK_degree :: KeySym xK_plusminus :: KeySym xK_twosuperior :: KeySym xK_threesuperior :: KeySym xK_acute :: KeySym xK_mu :: KeySym xK_paragraph :: KeySym xK_periodcentered :: KeySym xK_cedilla :: KeySym xK_onesuperior :: KeySym xK_masculine :: KeySym xK_guillemotright :: KeySym xK_onequarter :: KeySym xK_onehalf :: KeySym xK_threequarters :: KeySym xK_questiondown :: KeySym xK_Agrave :: KeySym xK_Aacute :: KeySym xK_Acircumflex :: KeySym xK_Atilde :: KeySym xK_Adiaeresis :: KeySym xK_Aring :: KeySym xK_AE :: KeySym xK_Ccedilla :: KeySym xK_Egrave :: KeySym xK_Eacute :: KeySym xK_Ecircumflex :: KeySym xK_Ediaeresis :: KeySym xK_Igrave :: KeySym xK_Iacute :: KeySym xK_Icircumflex :: KeySym xK_Idiaeresis :: KeySym xK_ETH :: KeySym xK_Eth :: KeySym xK_Ntilde :: KeySym xK_Ograve :: KeySym xK_Oacute :: KeySym xK_Ocircumflex :: KeySym xK_Otilde :: KeySym xK_Odiaeresis :: KeySym xK_multiply :: KeySym xK_Ooblique :: KeySym xK_Ugrave :: KeySym xK_Uacute :: KeySym xK_Ucircumflex :: KeySym xK_Udiaeresis :: KeySym xK_Yacute :: KeySym xK_THORN :: KeySym xK_Thorn :: KeySym xK_ssharp :: KeySym xK_agrave :: KeySym xK_aacute :: KeySym xK_acircumflex :: KeySym xK_atilde :: KeySym xK_adiaeresis :: KeySym xK_aring :: KeySym xK_ae :: KeySym xK_ccedilla :: KeySym xK_egrave :: KeySym xK_eacute :: KeySym xK_ecircumflex :: KeySym xK_ediaeresis :: KeySym xK_igrave :: KeySym xK_iacute :: KeySym xK_icircumflex :: KeySym xK_idiaeresis :: KeySym xK_eth :: KeySym xK_ntilde :: KeySym xK_ograve :: KeySym xK_oacute :: KeySym xK_ocircumflex :: KeySym xK_otilde :: KeySym xK_odiaeresis :: KeySym xK_division :: KeySym xK_oslash :: KeySym xK_ugrave :: KeySym xK_uacute :: KeySym xK_ucircumflex :: KeySym xK_udiaeresis :: KeySym xK_yacute :: KeySym xK_thorn :: KeySym xK_ydiaeresis :: KeySym type EventMask = Mask noEventMask :: EventMask keyPressMask :: EventMask keyReleaseMask :: EventMask buttonPressMask :: EventMask buttonReleaseMask :: EventMask enterWindowMask :: EventMask leaveWindowMask :: EventMask pointerMotionMask :: EventMask pointerMotionHintMask :: EventMask button1MotionMask :: EventMask button2MotionMask :: EventMask button3MotionMask :: EventMask button4MotionMask :: EventMask button5MotionMask :: EventMask buttonMotionMask :: EventMask keymapStateMask :: EventMask exposureMask :: EventMask visibilityChangeMask :: EventMask structureNotifyMask :: EventMask resizeRedirectMask :: EventMask substructureNotifyMask :: EventMask substructureRedirectMask :: EventMask focusChangeMask :: EventMask propertyChangeMask :: EventMask colormapChangeMask :: EventMask ownerGrabButtonMask :: EventMask type EventType = Word32 keyPress :: EventType keyRelease :: EventType buttonPress :: EventType buttonRelease :: EventType motionNotify :: EventType enterNotify :: EventType leaveNotify :: EventType focusIn :: EventType focusOut :: EventType keymapNotify :: EventType expose :: EventType graphicsExpose :: EventType noExpose :: EventType visibilityNotify :: EventType createNotify :: EventType destroyNotify :: EventType unmapNotify :: EventType mapNotify :: EventType mapRequest :: EventType reparentNotify :: EventType configureNotify :: EventType configureRequest :: EventType gravityNotify :: EventType resizeRequest :: EventType circulateNotify :: EventType circulateRequest :: EventType propertyNotify :: EventType selectionClear :: EventType selectionRequest :: EventType selectionNotify :: EventType colormapNotify :: EventType clientMessage :: EventType mappingNotify :: EventType lASTEvent :: EventType type Modifier = Mask shiftMapIndex :: Modifier lockMapIndex :: Modifier controlMapIndex :: Modifier mod1MapIndex :: Modifier mod2MapIndex :: Modifier mod3MapIndex :: Modifier mod4MapIndex :: Modifier mod5MapIndex :: Modifier anyModifier :: Modifier type KeyMask = Modifier shiftMask :: KeyMask lockMask :: KeyMask controlMask :: KeyMask mod1Mask :: KeyMask mod2Mask :: KeyMask mod3Mask :: KeyMask mod4Mask :: KeyMask mod5Mask :: KeyMask type ButtonMask = Modifier button1Mask :: ButtonMask button2Mask :: ButtonMask button3Mask :: ButtonMask button4Mask :: ButtonMask button5Mask :: ButtonMask type Button = Word32 button1 :: Button button2 :: Button button3 :: Button button4 :: Button button5 :: Button type NotifyMode = Int notifyNormal :: NotifyMode notifyGrab :: NotifyMode notifyUngrab :: NotifyMode notifyWhileGrabbed :: NotifyMode notifyHint :: NotifyMode type NotifyDetail = Int notifyAncestor :: NotifyDetail notifyVirtual :: NotifyDetail notifyInferior :: NotifyDetail notifyNonlinear :: NotifyDetail notifyNonlinearVirtual :: NotifyDetail notifyPointer :: NotifyDetail notifyPointerRoot :: NotifyDetail notifyDetailNone :: NotifyDetail type Visibility = Int visibilityUnobscured :: Visibility visibilityPartiallyObscured :: Visibility visibilityFullyObscured :: Visibility -- | Place of window relative to siblings (used in Circulation requests or -- events) type Place = Int placeOnTop :: Place placeOnBottom :: Place type Protocol = Int familyInternet :: Protocol familyDECnet :: Protocol familyChaos :: Protocol type PropertyNotification = Int propertyNewValue :: PropertyNotification propertyDelete :: PropertyNotification type ColormapNotification = Int colormapUninstalled :: ColormapNotification colormapInstalled :: ColormapNotification type GrabMode = Int grabModeSync :: GrabMode grabModeAsync :: GrabMode type GrabStatus = Int grabSuccess :: GrabStatus alreadyGrabbed :: GrabStatus grabInvalidTime :: GrabStatus grabNotViewable :: GrabStatus grabFrozen :: GrabStatus type AllowEvents = Int asyncPointer :: AllowEvents syncPointer :: AllowEvents replayPointer :: AllowEvents asyncKeyboard :: AllowEvents syncKeyboard :: AllowEvents replayKeyboard :: AllowEvents asyncBoth :: AllowEvents syncBoth :: AllowEvents type FocusMode = Int revertToNone :: FocusMode revertToPointerRoot :: FocusMode revertToParent :: FocusMode type ErrorCode = Int success :: ErrorCode badRequest :: ErrorCode badValue :: ErrorCode badWindow :: ErrorCode badPixmap :: ErrorCode badAtom :: ErrorCode badCursor :: ErrorCode badFont :: ErrorCode badMatch :: ErrorCode badDrawable :: ErrorCode badAccess :: ErrorCode badAlloc :: ErrorCode badColor :: ErrorCode -- | Xlib functions with return values of type Status return zero -- on failure and nonzero on success. badGC :: ErrorCode badIDChoice :: ErrorCode badName :: ErrorCode badLength :: ErrorCode badImplementation :: ErrorCode firstExtensionError :: ErrorCode lastExtensionError :: ErrorCode type Status = Int throwIfZero :: String -> IO Status -> IO () type WindowClass = Int copyFromParent :: WindowClass inputOutput :: WindowClass inputOnly :: WindowClass type AttributeMask = Mask cWBackPixmap :: AttributeMask cWBackPixel :: AttributeMask cWBorderPixmap :: AttributeMask cWBorderPixel :: AttributeMask cWBitGravity :: AttributeMask cWWinGravity :: AttributeMask cWBackingStore :: AttributeMask cWBackingPlanes :: AttributeMask cWBackingPixel :: AttributeMask cWOverrideRedirect :: AttributeMask cWSaveUnder :: AttributeMask cWEventMask :: AttributeMask cWDontPropagate :: AttributeMask cWColormap :: AttributeMask cWCursor :: AttributeMask type CloseDownMode = Int destroyAll :: CloseDownMode retainPermanent :: CloseDownMode retainTemporary :: CloseDownMode type QueryBestSizeClass = Int cursorShape :: QueryBestSizeClass tileShape :: QueryBestSizeClass stippleShape :: QueryBestSizeClass type GXFunction = Int gXclear :: GXFunction gXand :: GXFunction gXandReverse :: GXFunction gXcopy :: GXFunction gXandInverted :: GXFunction gXnoop :: GXFunction gXxor :: GXFunction gXor :: GXFunction gXnor :: GXFunction gXequiv :: GXFunction gXinvert :: GXFunction gXorReverse :: GXFunction gXcopyInverted :: GXFunction gXorInverted :: GXFunction gXnand :: GXFunction gXset :: GXFunction type LineStyle = Int lineSolid :: LineStyle lineOnOffDash :: LineStyle lineDoubleDash :: LineStyle type CapStyle = Int capNotLast :: CapStyle capButt :: CapStyle capRound :: CapStyle capProjecting :: CapStyle type JoinStyle = Int joinMiter :: JoinStyle joinRound :: JoinStyle joinBevel :: JoinStyle type FillStyle = Int fillSolid :: FillStyle fillTiled :: FillStyle fillStippled :: FillStyle fillOpaqueStippled :: FillStyle type FillRule = Int evenOddRule :: FillRule windingRule :: FillRule type SubWindowMode = Int clipByChildren :: SubWindowMode includeInferiors :: SubWindowMode type CoordinateMode = Int coordModeOrigin :: CoordinateMode coordModePrevious :: CoordinateMode type PolygonShape = Int complex :: PolygonShape nonconvex :: PolygonShape convex :: PolygonShape type ArcMode = Int arcChord :: ArcMode arcPieSlice :: ArcMode type GCMask = Int gCFunction :: GCMask gCPlaneMask :: GCMask gCForeground :: GCMask gCBackground :: GCMask gCLineWidth :: GCMask gCLineStyle :: GCMask gCCapStyle :: GCMask gCJoinStyle :: GCMask gCFillStyle :: GCMask gCFillRule :: GCMask gCTile :: GCMask gCStipple :: GCMask gCTileStipXOrigin :: GCMask gCTileStipYOrigin :: GCMask gCFont :: GCMask gCSubwindowMode :: GCMask gCGraphicsExposures :: GCMask gCClipXOrigin :: GCMask gCClipYOrigin :: GCMask gCClipMask :: GCMask gCDashOffset :: GCMask gCDashList :: GCMask gCArcMode :: GCMask gCLastBit :: GCMask type CirculationDirection = Int raiseLowest :: CirculationDirection lowerHighest :: CirculationDirection type ByteOrder = Int lSBFirst :: ByteOrder mSBFirst :: ByteOrder type ColormapAlloc = Int allocNone :: ColormapAlloc allocAll :: ColormapAlloc type MappingRequest = Int mappingModifier :: MappingRequest mappingKeyboard :: MappingRequest mappingPointer :: MappingRequest type ChangeSaveSetMode = Int setModeInsert :: ChangeSaveSetMode setModeDelete :: ChangeSaveSetMode type BitGravity = Int forgetGravity :: BitGravity northWestGravity :: BitGravity northGravity :: BitGravity northEastGravity :: BitGravity westGravity :: BitGravity centerGravity :: BitGravity eastGravity :: BitGravity southWestGravity :: BitGravity southGravity :: BitGravity southEastGravity :: BitGravity staticGravity :: BitGravity type WindowGravity = Int unmapGravity :: WindowGravity type BackingStore = Int notUseful :: BackingStore whenMapped :: BackingStore always :: BackingStore doRed :: Word8 doGreen :: Word8 doBlue :: Word8 type FontDirection = Int fontLeftToRight :: FontDirection fontRightToLeft :: FontDirection -- | A collection of FFI declarations for interfacing with Xlib Displays. module Graphics.X11.Xlib.Display -- | interface to the X11 library function XAllPlanes(). allPlanes_aux :: Pixel -- | interface to the X11 library function XBlackPixel(). blackPixel :: Display -> ScreenNumber -> Pixel -- | interface to the X11 library function XWhitePixel(). whitePixel :: Display -> ScreenNumber -> Pixel -- | interface to the X11 library function XConnectionNumber(). connectionNumber :: Display -> Int -- | interface to the X11 library function XDefaultColormap(). defaultColormap :: Display -> ScreenNumber -> Colormap -- | interface to the X11 library function XDefaultGC(). defaultGC :: Display -> ScreenNumber -> GC -- | interface to the X11 library function XDefaultDepth(). defaultDepth :: Display -> ScreenNumber -> Int -- | interface to the X11 library function XDefaultScreen(). defaultScreen :: Display -> ScreenNumber -- | interface to the X11 library function -- XDefaultScreenOfDisplay(). defaultScreenOfDisplay :: Display -> Screen -- | interface to the X11 library function XDisplayHeight(). displayHeight :: Display -> ScreenNumber -> Int -- | interface to the X11 library function XDisplayHeightMM(). displayHeightMM :: Display -> ScreenNumber -> Int -- | interface to the X11 library function XDisplayWidth(). displayWidth :: Display -> ScreenNumber -> Int -- | interface to the X11 library function XDisplayWidthMM(). displayWidthMM :: Display -> ScreenNumber -> Int -- | interface to the X11 library function XMaxRequestSize(). maxRequestSize :: Display -> Int -- | interface to the X11 library function -- XDisplayMotionBufferSize(). displayMotionBufferSize :: Display -> Int -- | interface to the X11 library function -- XResourceManagerString(). resourceManagerString :: Display -> String -- | interface to the X11 library function -- XScreenResourceString(). screenResourceString :: Screen -> String -- | interface to the X11 library function XDisplayString(). displayString :: Display -> String -- | interface to the X11 library function XImageByteOrder(). imageByteOrder :: Display -> Int -- | interface to the X11 library function XProtocolRevision(). protocolRevision :: Display -> Int -- | interface to the X11 library function XProtocolVersion(). protocolVersion :: Display -> Int -- | interface to the X11 library function XServerVendor(). serverVendor :: Display -> String -- | interface to the X11 library function XScreenCount(). screenCount :: Display -> Int -- | interface to the X11 library function XDefaultVisual(). defaultVisual :: Display -> ScreenNumber -> Visual -- | interface to the X11 library function XDisplayCells(). displayCells :: Display -> ScreenNumber -> Int -- | interface to the X11 library function XDisplayPlanes(). displayPlanes :: Display -> ScreenNumber -> Int -- | interface to the X11 library function XScreenOfDisplay(). screenOfDisplay :: Display -> ScreenNumber -> Screen -- | interface to the X11 library function XDefaultRootWindow(). defaultRootWindow :: Display -> Window -- | interface to the X11 library function XRootWindow(). rootWindow :: Display -> ScreenNumber -> IO Window -- | interface to the X11 library function XQLength(). qLength :: Display -> IO Int -- | interface to the X11 library function XNoOp(). noOp :: Display -> IO () -- | interface to the X11 library function XOpenDisplay(). openDisplay :: String -> IO Display -- | interface to the X11 library function XCloseDisplay(). closeDisplay :: Display -> IO () -- | A collection of FFI declarations for interfacing with Xlib Events. module Graphics.X11.Xlib.Event type QueuedMode = Int queuedAlready :: QueuedMode queuedAfterFlush :: QueuedMode queuedAfterReading :: QueuedMode data XEvent 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, Int, Int, Int, Int, Modifier, KeyCode, Bool) type XKeyEventPtr = Ptr XKeyEvent asKeyEvent :: XEventPtr -> XKeyEventPtr type XButtonEvent = (Window, Window, Time, Int, Int, Int, Int, Modifier, Button, Bool) get_KeyEvent :: XEventPtr -> IO XKeyEvent get_ButtonEvent :: XEventPtr -> IO XButtonEvent get_MotionEvent :: XEventPtr -> IO XMotionEvent type XMotionEvent = (Window, Window, Time, Int, Int, Int, Int, Modifier, NotifyMode, Bool) type XExposeEvent = (Position, Position, Dimension, Dimension, Int) get_ExposeEvent :: XEventPtr -> IO XExposeEvent type XMappingEvent = (MappingRequest, KeyCode, Int) type XConfigureEvent = (Position, Position, Dimension, Dimension) get_ConfigureEvent :: XEventPtr -> IO XConfigureEvent -- | Reads an event with a timeout (in microseconds). Returns True if -- timeout occurs. waitForEvent :: Display -> Word32 -> IO Bool -- | This function is somewhat compatible with Win32's -- TimeGetTime() gettimeofday_in_milliseconds :: IO Integer -- | interface to the X11 library function XFlush(). flush :: Display -> IO () -- | interface to the X11 library function XSync(). sync :: Display -> Bool -> IO () -- | interface to the X11 library function XPending(). pending :: Display -> IO Int -- | interface to the X11 library function XEventsQueued(). eventsQueued :: Display -> QueuedMode -> IO Int -- | interface to the X11 library function XNextEvent(). nextEvent :: Display -> XEventPtr -> IO () -- | interface to the X11 library function XAllowEvents(). allowEvents :: Display -> AllowEvents -> Time -> IO () -- | interface to the X11 library function XSelectInput(). selectInput :: Display -> Window -> EventMask -> IO () -- | interface to the X11 library function XSendEvent(). sendEvent :: Display -> Window -> Bool -> EventMask -> XEventPtr -> IO () -- | interface to the X11 library function XWindowEvent(). windowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO () -- | interface to the X11 library function XCheckWindowEvent(). checkWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO Bool -- | interface to the X11 library function XMaskEvent(). maskEvent :: Display -> EventMask -> XEventPtr -> IO () -- | interface to the X11 library function XCheckMaskEvent(). checkMaskEvent :: Display -> EventMask -> XEventPtr -> IO Bool -- | interface to the X11 library function XCheckTypedEvent(). checkTypedEvent :: Display -> EventType -> XEventPtr -> IO Bool -- | interface to the X11 library function -- XCheckTypedWindowEvent(). checkTypedWindowEvent :: Display -> Window -> EventType -> XEventPtr -> IO Bool -- | interface to the X11 library function XPutBackEvent(). putBackEvent :: Display -> XEventPtr -> IO () -- | interface to the X11 library function XPeekEvent(). peekEvent :: Display -> XEventPtr -> IO () -- | interface to the X11 library function -- XRefreshKeyboardMapping(). refreshKeyboardMapping :: XMappingEvent -> IO () instance Typeable TimeZone instance Typeable FdSet instance Typeable XEvent instance Eq TimeZone instance Ord TimeZone instance Show TimeZone instance Data TimeZone instance Eq FdSet instance Ord FdSet instance Show FdSet instance Data FdSet instance Eq XEvent instance Ord XEvent instance Show XEvent instance Data XEvent instance Storable TimeVal -- | A collection of FFI declarations for interfacing with Xlib Screens. module Graphics.X11.Xlib.Screen -- | interface to the X11 library function XBlackPixelOfScreen(). blackPixelOfScreen :: Screen -> Pixel -- | interface to the X11 library function XWhitePixelOfScreen(). whitePixelOfScreen :: Screen -> Pixel -- | interface to the X11 library function XCellsOfScreen(). cellsOfScreen :: Screen -> Int -- | interface to the X11 library function -- XDefaultColormapOfScreen(). defaultColormapOfScreen :: Screen -> Colormap -- | interface to the X11 library function -- XDefaultDepthOfScreen(). defaultDepthOfScreen :: Screen -> Int -- | interface to the X11 library function XDefaultGCOfScreen(). defaultGCOfScreen :: Screen -> GC -- | interface to the X11 library function -- XDefaultVisualOfScreen(). defaultVisualOfScreen :: Screen -> Visual -- | interface to the X11 library function XDoesBackingStore(). doesBackingStore :: Screen -> Bool -- | interface to the X11 library function XDoesSaveUnders(). doesSaveUnders :: Screen -> Bool -- | interface to the X11 library function XDisplayOfScreen(). displayOfScreen :: Screen -> Display -- | interface to the X11 library function XEventMaskOfScreen(). -- Event mask at connection setup time - not current event mask! eventMaskOfScreen :: Screen -> EventMask -- | interface to the X11 library function XMinCmapsOfScreen(). minCmapsOfScreen :: Screen -> Int -- | interface to the X11 library function XMaxCmapsOfScreen(). maxCmapsOfScreen :: Screen -> Int -- | interface to the X11 library function XRootWindowOfScreen(). rootWindowOfScreen :: Screen -> Window -- | interface to the X11 library function XWidthOfScreen(). widthOfScreen :: Screen -> Dimension -- | interface to the X11 library function XWidthMMOfScreen(). widthMMOfScreen :: Screen -> Dimension -- | interface to the X11 library function XHeightOfScreen(). heightOfScreen :: Screen -> Dimension -- | interface to the X11 library function XHeightMMOfScreen(). heightMMOfScreen :: Screen -> Dimension -- | interface to the X11 library function XPlanesOfScreen(). planesOfScreen :: Screen -> Int -- | interface to the X11 library function -- XScreenNumberOfScreen(). screenNumberOfScreen :: Screen -> ScreenNumber -- | A collection of FFI declarations for interfacing with Xlib Windows. module Graphics.X11.Xlib.Window -- | interface to the X11 library function XStoreName(). storeName :: Display -> Window -> String -> IO () -- | interface to the X11 library function XCreateSimpleWindow(). createSimpleWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Int -> Pixel -> Pixel -> IO Window -- | interface to the X11 library function XCreateWindow(). createWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> WindowClass -> Visual -> AttributeMask -> Ptr SetWindowAttributes -> IO Window -- | interface to the X11 library function -- XTranslateCoordinates(). translateCoordinates :: Display -> Window -> Window -> Position -> Position -> IO (Bool, Position, Position, Window) -- | interface to the X11 library function XMoveResizeWindow(). moveResizeWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> IO () -- | interface to the X11 library function XResizeWindow(). resizeWindow :: Display -> Window -> Dimension -> Dimension -> IO () -- | interface to the X11 library function XMoveWindow(). moveWindow :: Display -> Window -> Position -> Position -> IO () -- | interface to the X11 library function XReparentWindow(). reparentWindow :: Display -> Window -> Window -> Position -> Position -> IO () -- | interface to the X11 library function XMapSubwindows(). mapSubwindows :: Display -> Window -> IO () -- | interface to the X11 library function XUnmapSubwindows(). unmapSubwindows :: Display -> Window -> IO () -- | interface to the X11 library function XMapWindow(). mapWindow :: Display -> Window -> IO () -- | interface to the X11 library function XLowerWindow(). lowerWindow :: Display -> Window -> IO () -- | interface to the X11 library function XRaiseWindow(). raiseWindow :: Display -> Window -> IO () -- | interface to the X11 library function -- XCirculateSubwindowsDown(). circulateSubwindowsDown :: Display -> Window -> IO () -- | interface to the X11 library function -- XCirculateSubwindowsUp(). circulateSubwindowsUp :: Display -> Window -> IO () -- | interface to the X11 library function XCirculateSubwindows(). circulateSubwindows :: Display -> Window -> CirculationDirection -> IO () -- | interface to the X11 library function XIconifyWindow(). iconifyWindow :: Display -> Window -> ScreenNumber -> IO () -- | interface to the X11 library function XWithdrawWindow(). withdrawWindow :: Display -> Window -> ScreenNumber -> IO () -- | interface to the X11 library function XDestroyWindow(). destroyWindow :: Display -> Window -> IO () -- | interface to the X11 library function XDestroySubwindows(). destroySubwindows :: Display -> Window -> IO () -- | interface to the X11 library function XSetWindowBorder(). setWindowBorder :: Display -> Window -> Pixel -> IO () -- | interface to the X11 library function -- XSetWindowBorderPixmap(). setWindowBorderPixmap :: Display -> Window -> Pixmap -> IO () -- | interface to the X11 library function -- XSetWindowBorderWidth(). setWindowBorderWidth :: Display -> Window -> Dimension -> IO () -- | interface to the X11 library function XSetWindowBackground(). setWindowBackground :: Display -> Window -> Pixel -> IO () -- | interface to the X11 library function -- XSetWindowBackgroundPixmap(). setWindowBackgroundPixmap :: Display -> Window -> Pixmap -> IO () -- | interface to the X11 library function XSetWindowColormap(). setWindowColormap :: Display -> Window -> Colormap -> IO () -- | interface to the X11 library function XAddToSaveSet(). addToSaveSet :: Display -> Window -> IO () -- | interface to the X11 library function XRemoveFromSaveSet(). removeFromSaveSet :: Display -> Window -> IO () -- | interface to the X11 library function XChangeSaveSet(). changeSaveSet :: Display -> Window -> ChangeSaveSetMode -> IO () -- | interface to the X11 library function XClearWindow(). clearWindow :: Display -> Window -> IO () -- | interface to the X11 library function XClearArea(). clearArea :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Bool -> IO () -- | interface to the X11 library function XRestackWindows(). restackWindows :: Display -> [Window] -> IO () -- | A collection of FFI declarations for interfacing with Xlib Graphics -- Contexts. module Graphics.X11.Xlib.Context -- | interface to the X11 library function XSetArcMode(). setArcMode :: Display -> GC -> ArcMode -> IO () -- | interface to the X11 library function XSetBackground(). setBackground :: Display -> GC -> Pixel -> IO () -- | interface to the X11 library function XSetForeground(). setForeground :: Display -> GC -> Pixel -> IO () -- | interface to the X11 library function XSetFunction(). setFunction :: Display -> GC -> GXFunction -> IO () -- | interface to the X11 library function -- XSetGraphicsExposures(). setGraphicsExposures :: Display -> GC -> Bool -> IO () -- | interface to the X11 library function XSetClipMask(). setClipMask :: Display -> GC -> Pixmap -> IO () -- | interface to the X11 library function XSetClipOrigin(). setClipOrigin :: Display -> GC -> Position -> Position -> IO () -- | interface to the X11 library function XSetDashes(). setDashes :: Display -> GC -> Int -> String -> Int -> IO () -- | interface to the X11 library function XSetFillRule(). setFillRule :: Display -> GC -> FillRule -> IO () -- | interface to the X11 library function XSetFillStyle(). setFillStyle :: Display -> GC -> FillStyle -> IO () -- | interface to the X11 library function XSetFont(). setFont :: Display -> GC -> Font -> IO () -- | interface to the X11 library function XSetLineAttributes(). setLineAttributes :: Display -> GC -> Int -> LineStyle -> CapStyle -> JoinStyle -> IO () -- | interface to the X11 library function XSetPlaneMask(). setPlaneMask :: Display -> GC -> Pixel -> IO () -- | interface to the X11 library function XSetState(). setState :: Display -> GC -> Pixel -> Pixel -> GXFunction -> Pixel -> IO () -- | interface to the X11 library function XSetStipple(). setStipple :: Display -> GC -> Pixmap -> IO () -- | interface to the X11 library function XSetSubwindowMode(). setSubwindowMode :: Display -> GC -> SubWindowMode -> IO () -- | interface to the X11 library function XSetTSOrigin(). setTSOrigin :: Display -> GC -> Position -> Position -> IO () -- | interface to the X11 library function XSetTile(). setTile :: Display -> GC -> Pixmap -> IO () -- | partial interface to the X11 library function XCreateGC(). createGC :: Display -> Drawable -> IO GC -- | interface to the X11 library function XGContextFromGC(). gContextFromGC :: GC -> GContext -- | interface to the X11 library function XFreeGC(). freeGC :: Display -> GC -> IO () -- | interface to the X11 library function XFlushGC(). flushGC :: Display -> GC -> IO () -- | interface to the X11 library function XCopyGC(). copyGC :: Display -> GC -> Mask -> GC -> IO () -- | A collection of FFI declarations for interfacing with Xlib Colors. module Graphics.X11.Xlib.Color -- | interface to the X11 library function XLookupColor(). lookupColor :: Display -> Colormap -> String -> IO (Color, Color) -- | interface to the X11 library function XAllocNamedColor(). allocNamedColor :: Display -> Colormap -> String -> IO (Color, Color) -- | interface to the X11 library function XAllocColor(). allocColor :: Display -> Colormap -> Color -> IO Color -- | interface to the X11 library function XParseColor(). parseColor :: Display -> Colormap -> String -> IO Color -- | interface to the X11 library function XFreeColors(). freeColors :: Display -> Colormap -> [Pixel] -> Pixel -> IO () -- | interface to the X11 library function XStoreColor(). storeColor :: Display -> Colormap -> Color -> IO () -- | interface to the X11 library function XQueryColor(). queryColor :: Display -> Colormap -> Color -> IO Color -- | interface to the X11 library function XQueryColors(). queryColors :: Display -> Colormap -> [Color] -> IO [Color] -- | interface to the X11 library function XInstallColormap(). installColormap :: Display -> Colormap -> IO () -- | interface to the X11 library function XUninstallColormap(). uninstallColormap :: Display -> Colormap -> IO () -- | interface to the X11 library function XCopyColormapAndFree(). copyColormapAndFree :: Display -> Colormap -> IO Colormap -- | interface to the X11 library function XCreateColormap(). createColormap :: Display -> Window -> Visual -> ColormapAlloc -> IO Colormap -- | interface to the X11 library function XFreeColormap(). freeColormap :: Display -> Colormap -> IO () -- | A collection of FFI declarations for interfacing with Xlib Fonts. module Graphics.X11.Xlib.Font type Glyph = Word16 -- | interface to the X11 library function XQueryFont(). queryFont :: Display -> Font -> IO FontStruct -- | interface to the X11 library function XGetGCValues(). fontFromGC :: Display -> GC -> IO Font -- | interface to the X11 library function XLoadQueryFont(). loadQueryFont :: Display -> String -> IO FontStruct -- | interface to the X11 library function XFreeFont(). freeFont :: Display -> FontStruct -> IO () -- | pointer to an X11 XFontStruct structure data FontStruct fontFromFontStruct :: FontStruct -> Font ascentFromFontStruct :: FontStruct -> Int32 descentFromFontStruct :: FontStruct -> Int32 type CharStruct = (Int, Int, Int, Int, Int) -- | interface to the X11 library function XTextExtents(). textExtents :: FontStruct -> String -> (FontDirection, Int32, Int32, CharStruct) -- | interface to the X11 library function XTextWidth(). textWidth :: FontStruct -> String -> Int32 instance Typeable FontStruct instance Eq FontStruct instance Ord FontStruct instance Show FontStruct instance Data FontStruct -- | A collection of type declarations for interfacing with X11 Atoms. module Graphics.X11.Xlib.Atom -- | interface to the X11 library function XInternAtom(). internAtom :: Display -> String -> Bool -> IO Atom pRIMARY :: Atom sECONDARY :: Atom aRC :: Atom aTOM :: Atom bITMAP :: Atom cARDINAL :: Atom cOLORMAP :: Atom cURSOR :: Atom cUT_BUFFER0 :: Atom cUT_BUFFER1 :: Atom cUT_BUFFER2 :: Atom cUT_BUFFER3 :: Atom cUT_BUFFER4 :: Atom cUT_BUFFER5 :: Atom cUT_BUFFER6 :: Atom cUT_BUFFER7 :: Atom dRAWABLE :: Atom fONT :: Atom iNTEGER :: Atom pIXMAP :: Atom pOINT :: Atom rECTANGLE :: Atom rESOURCE_MANAGER :: Atom rGB_COLOR_MAP :: Atom rGB_BEST_MAP :: Atom rGB_BLUE_MAP :: Atom rGB_DEFAULT_MAP :: Atom rGB_GRAY_MAP :: Atom rGB_GREEN_MAP :: Atom rGB_RED_MAP :: Atom sTRING :: Atom vISUALID :: Atom wINDOW :: Atom wM_COMMAND :: Atom wM_HINTS :: Atom wM_CLIENT_MACHINE :: Atom wM_ICON_NAME :: Atom wM_ICON_SIZE :: Atom wM_NAME :: Atom wM_NORMAL_HINTS :: Atom wM_SIZE_HINTS :: Atom wM_ZOOM_HINTS :: Atom mIN_SPACE :: Atom nORM_SPACE :: Atom mAX_SPACE :: Atom eND_SPACE :: Atom sUPERSCRIPT_X :: Atom sUPERSCRIPT_Y :: Atom sUBSCRIPT_X :: Atom sUBSCRIPT_Y :: Atom uNDERLINE_POSITION :: Atom uNDERLINE_THICKNESS :: Atom sTRIKEOUT_ASCENT :: Atom sTRIKEOUT_DESCENT :: Atom iTALIC_ANGLE :: Atom x_HEIGHT :: Atom qUAD_WIDTH :: Atom wEIGHT :: Atom pOINT_SIZE :: Atom rESOLUTION :: Atom cOPYRIGHT :: Atom nOTICE :: Atom fONT_NAME :: Atom fAMILY_NAME :: Atom fULL_NAME :: Atom cAP_HEIGHT :: Atom wM_CLASS :: Atom wM_TRANSIENT_FOR :: Atom lAST_PREDEFINED :: Atom -- | A collection of FFI declarations for interfacing with Xlib Regions. module Graphics.X11.Xlib.Region data Region type RectInRegionResult = Int rectangleOut :: RectInRegionResult rectangleIn :: RectInRegionResult rectanglePart :: RectInRegionResult -- | interface to the X11 library function XCreateRegion(). createRegion :: IO Region -- | interface to the X11 library function XPolygonRegion(). polygonRegion :: [Point] -> FillRule -> IO Region -- | interface to the X11 library function XIntersectRegion(). intersectRegion :: Region -> Region -> Region -> IO Int -- | interface to the X11 library function XSubtractRegion(). subtractRegion :: Region -> Region -> Region -> IO Int -- | interface to the X11 library function XUnionRectWithRegion(). unionRectWithRegion :: Rectangle -> Region -> Region -> IO Int -- | interface to the X11 library function XUnionRegion(). unionRegion :: Region -> Region -> Region -> IO Int -- | interface to the X11 library function XXorRegion(). xorRegion :: Region -> Region -> Region -> IO Int -- | interface to the X11 library function XEmptyRegion(). emptyRegion :: Region -> IO Bool -- | interface to the X11 library function XEqualRegion(). equalRegion :: Region -> Region -> IO Bool -- | interface to the X11 library function XPointInRegion(). pointInRegion :: Region -> Point -> IO Bool -- | interface to the X11 library function XRectInRegion(). rectInRegion :: Region -> Rectangle -> IO RectInRegionResult -- | interface to the X11 library function XClipBox(). clipBox :: Region -> IO (Rectangle, Int) -- | interface to the X11 library function XOffsetRegion(). offsetRegion :: Region -> Point -> IO Int -- | interface to the X11 library function XShrinkRegion(). shrinkRegion :: Region -> Point -> IO Int -- | interface to the X11 library function XSetRegion(). setRegion :: Display -> GC -> Region -> IO Int instance Typeable Region instance Eq Region instance Ord Region instance Show Region instance Data Region -- | A collection of FFI declarations for interfacing with Xlib. module Graphics.X11.Xlib.Misc -- | interface to the X11 library function XrmInitialize(). rmInitialize :: IO () -- | interface to the X11 library function XAutoRepeatOff(). autoRepeatOff :: Display -> IO () -- | interface to the X11 library function XAutoRepeatOn(). autoRepeatOn :: Display -> IO () -- | interface to the X11 library function XBell(). bell :: Display -> Int -> IO () -- | interface to the X11 library function XSetCloseDownMode(). setCloseDownMode :: Display -> CloseDownMode -> IO () -- | interface to the X11 library function -- XLastKnownRequestProcessed(). lastKnownRequestProcessed :: Display -> IO Int -- | interface to the X11 library function XGetInputFocus(). getInputFocus :: Display -> IO (Window, FocusMode) -- | interface to the X11 library function XSetInputFocus(). setInputFocus :: Display -> Window -> FocusMode -> Time -> IO () -- | interface to the X11 library function XGrabButton(). grabButton :: Display -> Button -> ButtonMask -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> IO () -- | interface to the X11 library function XUngrabButton(). ungrabButton :: Display -> Button -> ButtonMask -> Window -> IO () -- | interface to the X11 library function XGrabPointer(). grabPointer :: Display -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> Time -> IO GrabStatus -- | interface to the X11 library function XUngrabPointer(). ungrabPointer :: Display -> Time -> IO () -- | interface to the X11 library function XGrabKey(). grabKey :: Display -> KeyCode -> ButtonMask -> Window -> Bool -> GrabMode -> GrabMode -> IO () -- | interface to the X11 library function XUngrabKey(). ungrabKey :: Display -> KeyCode -> ButtonMask -> Window -> IO () -- | interface to the X11 library function XGrabKeyboard(). grabKeyboard :: Display -> Window -> Bool -> GrabMode -> GrabMode -> Time -> IO GrabStatus -- | interface to the X11 library function XUngrabKeyboard(). ungrabKeyboard :: Display -> Time -> IO () -- | interface to the X11 library function XGrabServer(). grabServer :: Display -> IO () -- | interface to the X11 library function XUngrabServer(). ungrabServer :: Display -> IO () -- | interface to the X11 library function XQueryBestTile(). queryBestTile :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) -- | interface to the X11 library function XQueryBestStipple(). queryBestStipple :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) -- | interface to the X11 library function XQueryBestCursor(). queryBestCursor :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) -- | interface to the X11 library function XQueryBestSize(). queryBestSize :: Display -> QueryBestSizeClass -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) -- | interface to the X11 library function XQueryPointer(). queryPointer :: Display -> Window -> IO (Bool, Window, Window, Int, Int, Int, Int, Modifier) -- | interface to the X11 library function XDisplayName(). displayName :: String -> String -- | The Xlib library reports most errors by invoking a user-provided error -- handler. This function installs an error handler that prints a textual -- representation of the error. setDefaultErrorHandler :: IO () -- | interface to the X11 library function XGeometry(). geometry :: Display -> Int -> String -> String -> Dimension -> Dimension -> Dimension -> Int -> Int -> IO (Int, Position, Position, Dimension, Dimension) -- | interface to the X11 library function XGetGeometry(). getGeometry :: Display -> Drawable -> IO (Window, Position, Position, Dimension, Dimension, Dimension, Int) -- | interface to the X11 library function XSupportsLocale(). supportsLocale :: IO Bool -- | interface to the X11 library function XSetLocaleModifiers(). setLocaleModifiers :: String -> IO String type AllowExposuresMode = Int dontAllowExposures :: AllowExposuresMode allowExposures :: AllowExposuresMode defaultExposures :: AllowExposuresMode type PreferBlankingMode = Int dontPreferBlanking :: PreferBlankingMode preferBlanking :: PreferBlankingMode defaultBlanking :: PreferBlankingMode type ScreenSaverMode = Int screenSaverActive :: ScreenSaverMode screenSaverReset :: ScreenSaverMode getScreenSaver :: Display -> IO (Int, Int, PreferBlankingMode, AllowExposuresMode) -- | interface to the X11 library function XSetScreenSaver(). setScreenSaver :: Display -> Int -> Int -> PreferBlankingMode -> AllowExposuresMode -> IO () -- | interface to the X11 library function XActivateScreenSaver(). activateScreenSaver :: Display -> IO () -- | interface to the X11 library function XResetScreenSaver(). resetScreenSaver :: Display -> IO () -- | interface to the X11 library function XForceScreenSaver(). forceScreenSaver :: Display -> ScreenSaverMode -> IO () -- | interface to the X11 library function XGetPointerControl(). getPointerControl :: Display -> IO (Int, Int, Int) -- | interface to the X11 library function XWarpPointer(). warpPointer :: Display -> Window -> Window -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () -- | interface to the X11 library function XCreatePixmap(). createPixmap :: Display -> Drawable -> Dimension -> Dimension -> Int -> IO Pixmap -- | interface to the X11 library function XFreePixmap(). freePixmap :: Display -> Pixmap -> IO () -- | interface to the X11 library function XBitmapBitOrder(). bitmapBitOrder :: Display -> ByteOrder -- | interface to the X11 library function XBitmapUnit(). bitmapUnit :: Display -> Int -- | interface to the X11 library function XBitmapPad(). bitmapPad :: Display -> Int -- | interface to the X11 library function XDisplayKeycodes(). displayKeycodes :: Display -> (Int, Int) -- | interface to the X11 library function XLookupKeysym(). lookupKeysym :: XKeyEventPtr -> Int -> IO KeySym -- | interface to the X11 library function XKeycodeToKeysym(). keycodeToKeysym :: Display -> KeyCode -> Int -> IO KeySym -- | interface to the X11 library function XKeysymToKeycode(). keysymToKeycode :: Display -> KeySym -> IO KeyCode -- | interface to the X11 library function XKeysymToString(). keysymToString :: KeySym -> String -- | interface to the X11 library function XStringToKeysym(). stringToKeysym :: String -> KeySym noSymbol :: KeySym -- | interface to the X11 library function XLookupString(). lookupString :: XKeyEventPtr -> IO (Maybe KeySym, String) -- | interface to the X11 library function XGetIconName(). getIconName :: Display -> Window -> IO String -- | interface to the X11 library function XSetIconName(). setIconName :: Display -> Window -> String -> IO () -- | interface to the X11 library function XDefineCursor(). defineCursor :: Display -> Window -> Cursor -> IO () -- | interface to the X11 library function XUndefineCursor(). undefineCursor :: Display -> Window -> IO () -- | interface to the X11 library function XCreatePixmapCursor(). createPixmapCursor :: Display -> Pixmap -> Pixmap -> Color -> Color -> Dimension -> Dimension -> IO Cursor -- | interface to the X11 library function XCreateGlyphCursor(). createGlyphCursor :: Display -> Font -> Font -> Glyph -> Glyph -> Color -> Color -> IO Cursor -- | interface to the X11 library function XCreateFontCursor(). createFontCursor :: Display -> Glyph -> IO Cursor -- | interface to the X11 library function XFreeCursor(). freeCursor :: Display -> Font -> IO () -- | interface to the X11 library function XRecolorCursor(). recolorCursor :: Display -> Cursor -> Color -> Color -> IO () -- | interface to the X11 library function XSetWMProtocols(). setWMProtocols :: Display -> Window -> [Atom] -> IO () allocaSetWindowAttributes :: (Ptr SetWindowAttributes -> IO a) -> IO a set_background_pixmap :: Ptr SetWindowAttributes -> Pixmap -> IO () set_background_pixel :: Ptr SetWindowAttributes -> Pixel -> IO () set_border_pixmap :: Ptr SetWindowAttributes -> Pixmap -> IO () set_border_pixel :: Ptr SetWindowAttributes -> Pixel -> IO () set_bit_gravity :: Ptr SetWindowAttributes -> BitGravity -> IO () set_win_gravity :: Ptr SetWindowAttributes -> WindowGravity -> IO () set_backing_store :: Ptr SetWindowAttributes -> BackingStore -> IO () set_backing_planes :: Ptr SetWindowAttributes -> Pixel -> IO () set_backing_pixel :: Ptr SetWindowAttributes -> Pixel -> IO () set_save_under :: Ptr SetWindowAttributes -> Bool -> IO () set_event_mask :: Ptr SetWindowAttributes -> EventMask -> IO () set_do_not_propagate_mask :: Ptr SetWindowAttributes -> EventMask -> IO () set_override_redirect :: Ptr SetWindowAttributes -> Bool -> IO () set_colormap :: Ptr SetWindowAttributes -> Colormap -> IO () set_cursor :: Ptr SetWindowAttributes -> Cursor -> IO () -- | interface to the X11 library function XDrawPoint(). drawPoint :: Display -> Drawable -> GC -> Position -> Position -> IO () -- | interface to the X11 library function XDrawPoints(). drawPoints :: Display -> Drawable -> GC -> [Point] -> CoordinateMode -> IO () -- | interface to the X11 library function XDrawLine(). drawLine :: Display -> Drawable -> GC -> Position -> Position -> Position -> Position -> IO () -- | interface to the X11 library function XDrawLines(). drawLines :: Display -> Drawable -> GC -> [Point] -> CoordinateMode -> IO () -- | interface to the X11 library function XDrawSegments(). drawSegments :: Display -> Drawable -> GC -> [Segment] -> IO () -- | interface to the X11 library function XDrawRectangle(). drawRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () -- | interface to the X11 library function XDrawRectangles(). drawRectangles :: Display -> Drawable -> GC -> [Rectangle] -> IO () -- | interface to the X11 library function XDrawArc(). drawArc :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Angle -> Angle -> IO () -- | interface to the X11 library function XDrawArcs(). drawArcs :: Display -> Drawable -> GC -> [Arc] -> IO () -- | interface to the X11 library function XFillRectangle(). fillRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () -- | interface to the X11 library function XFillRectangles(). fillRectangles :: Display -> Drawable -> GC -> [Rectangle] -> IO () -- | interface to the X11 library function XFillPolygon(). fillPolygon :: Display -> Drawable -> GC -> [Point] -> PolygonShape -> CoordinateMode -> IO () -- | interface to the X11 library function XFillArc(). fillArc :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Angle -> Angle -> IO () -- | interface to the X11 library function XFillArcs(). fillArcs :: Display -> Drawable -> GC -> [Arc] -> IO () -- | interface to the X11 library function XCopyArea(). copyArea :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () -- | interface to the X11 library function XCopyPlane(). copyPlane :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> Pixel -> IO () -- | interface to the X11 library function XDrawString(). drawString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () -- | interface to the X11 library function XDrawImageString(). drawImageString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () -- | interface to the X11 library function XStoreBuffer(). storeBuffer :: Display -> String -> Int -> IO () -- | interface to the X11 library function XStoreBytes(). storeBytes :: Display -> String -> IO () -- | interface to the X11 library function XFetchBuffer(). fetchBuffer :: Display -> Int -> IO String -- | interface to the X11 library function XFetchBytes(). fetchBytes :: Display -> IO String -- | interface to the X11 library function XRotateBuffers(). rotateBuffers :: Display -> Int -> IO () -- | interface to the X11 library function XSetTextProperty(). setTextProperty :: Display -> Window -> String -> Atom -> IO () instance Typeable XTextProperty instance Typeable XComposeStatus instance Typeable XErrorEvent instance Eq XTextProperty instance Ord XTextProperty instance Show XTextProperty instance Data XTextProperty instance Eq XComposeStatus instance Ord XComposeStatus instance Show XComposeStatus instance Data XComposeStatus instance Eq XErrorEvent instance Ord XErrorEvent instance Show XErrorEvent instance Data XErrorEvent -- | A collection of FFI declarations for interfacing with Xlib. -- -- The library aims to provide a direct translation of the X binding into -- Haskell so the most important documentation you should read is The -- Xlib Programming Manual, available online at -- http://tronche.com/gui/x/xlib/. Let me say that again because -- it is very important. Get hold of this documentation and read it: it -- tells you almost everything you need to know to use this library. module Graphics.X11.Xlib -- | pointer to an X11 Display structure data Display -- | pointer to an X11 Screen structure data Screen -- | pointer to an X11 Visual structure data Visual -- | pointer to an X11 GC structure data GC -- | pointer to an X11 XSetWindowAttributes structure data SetWindowAttributes -- | counterpart of an X11 XPoint structure data Point Point :: Position -> Position -> Point pt_x :: Point -> Position pt_y :: Point -> Position -- | counterpart of an X11 XRectangle structure data Rectangle Rectangle :: Position -> Position -> Dimension -> Dimension -> Rectangle rect_x :: Rectangle -> Position rect_y :: Rectangle -> Position rect_width :: Rectangle -> Dimension rect_height :: Rectangle -> Dimension -- | counterpart of an X11 XArc structure data Arc Arc :: Position -> Position -> Dimension -> Dimension -> Angle -> Angle -> Arc arc_x :: Arc -> Position arc_y :: Arc -> Position arc_width :: Arc -> Dimension arc_height :: Arc -> Dimension arc_angle1 :: Arc -> Angle arc_angle2 :: Arc -> Angle -- | counterpart of an X11 XSegment structure data Segment Segment :: Position -> Position -> Position -> Position -> Segment seg_x1 :: Segment -> Position seg_y1 :: Segment -> Position seg_x2 :: Segment -> Position seg_y2 :: Segment -> Position -- | counterpart of an X11 XColor structure data Color Color :: Pixel -> Word16 -> Word16 -> Word16 -> Word8 -> Color color_pixel :: Color -> Pixel color_red :: Color -> Word16 color_green :: Color -> Word16 color_blue :: Color -> Word16 color_flags :: Color -> Word8 type Pixel = Word32 type Position = Int32 type Dimension = Word32 type Angle = Int type ScreenNumber = Word32 type Buffer = Int -- | A Haskell binding for the X11 libraries. module Graphics.X11