adddir ./Graphics adddir ./Graphics/X11 addfile ./Graphics/X11.hs addfile ./Graphics/X11/StdDIS.gc addfile ./Graphics/X11/Types.gc addfile ./Graphics/X11/Xlib.gc addfile ./Makefile addfile ./X11.conf.in adddir ./cbits addfile ./cbits/Makefile addfile ./cbits/auxiliaries.c adddir ./include addfile ./include/HsXlib.h hunk ./Graphics/X11/StdDIS.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.StdDIS +-- Copyright : (c) Thomas Nordin and Alastair Reid, 1997-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- Generic GreenCard support code. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.StdDIS + ( StablePtr + , ForeignPtr + , Ptr + , FunPtr + , Int8, Int16, Int32, Int64 + , Word8, Word16, Word32, Word64 + , unsafePerformIO + , MbString + , marshall_bool_, unmarshall_bool_ + , marshall_string_, unmarshall_string_ + , marshall_stringLen_, unmarshall_stringLen_ + , newStablePtr, deRefStablePtr, freeStablePtr + , newForeignPtr, withForeignPtr + , malloc, free + + -- re-exporting base Prelude types + -- (useful when generating source that + -- import StdDIS qualified.) + , Float + , Double + , Int + , Char + ) where + + +import Int( Int8, Int16, Int32, Int64 ) +import Word( Word8, Word16, Word32, Word64 ) +import System.IO.Unsafe( unsafePerformIO ) +import Foreign ( StablePtr, newStablePtr, deRefStablePtr, freeStablePtr, + ForeignPtr, newForeignPtr, withForeignPtr, + Ptr, FunPtr + ) +import CString +import MarshalAlloc( malloc, free ) + +%dis char x = %%Char ({HsChar} x) +%dis int x = %%Int ({HsInt} x) +%dis float x = %%Float ({HsFloat} x) +%dis double x = %%Double ({HsDouble} x) +%dis ptr x = %%Ptr ({HsPtr} x) +%dis funPtr x = %%FunPtr ({HsFunPtr} x) + +%dis int8 x = %%Int8 ({HsInt8} x) +%dis int16 x = %%Int16 ({HsInt16} x) +%dis int32 x = %%Int32 ({HsInt32} x) + +%dis word8 x = %%Word8 ({HsWord8} x) +%dis word16 x = %%Word16 ({HsWord16} x) +%dis word32 x = %%Word32 ({HsWord32} x) + +%dis maybeT z x = %Maybe z x +%dis maybe x = maybeT {0} x + +%dis bool x = bool_ (int x) + +marshall_bool_ :: Bool -> IO Int +marshall_bool_ True = return 1 +marshall_bool_ False = return 0 + +unmarshall_bool_ :: Int -> IO Bool +unmarshall_bool_ 0 = return False +unmarshall_bool_ _ = return True + +-- Ignore "IO" part of result type +%dis iO x = x + +---------------------------------------------------------------- +-- Strings +---------------------------------------------------------------- + +%dis string x = string_ (ptr ({char *} x)) +%dis stringLen x l = stringLen_ (ptr ({char *} x)) (int l) + +type MbString = Maybe String +%dis mbString x = maybeT {nullPtr} (string x) + +marshall_string_ :: [Char] -> IO CString +marshall_string_ = newCString + +marshall_stringLen_ :: [Char] -> IO (CString, Int) +marshall_stringLen_ = newCStringLen + +unmarshall_string_ :: CString -> IO String +unmarshall_string_ = peekCString + +unmarshall_stringLen_ :: CString -> Int -> IO String +unmarshall_stringLen_ ptr l = peekCStringLen (ptr, l) + +---------------------------------------------------------------- +-- Stable pointers +---------------------------------------------------------------- + +-- +-- Use "stable" to create a stable pointer +-- +-- Use "stablePtr" to manipulate (previously constructed) stable pointers +-- in Haskell. +-- +%dis stable x = +% declare {HsStablePtr} x in +% << newStablePtr / deRefStablePtr / %%StablePtr >> x + +%dis stablePtr x = (%%StablePtr ({HsStablePtr} x)) + +---------------------------------------------------------------- +-- Foreign pointers +---------------------------------------------------------------- + +-- +-- Use "foreignP" to create a stable pointer +-- +-- Use "foreignPtr" to manipulate (previously constructed) foreign pointers +-- in Haskell. +-- +%dis foreign x = +% declare {HsForeignPtr} x in +% << newForeignPtr / withForeignPtr / %%ForeignPtr >> x + +%dis foreignPtr x = %%ForeignPtr ({HsForeignPtr} x) + +---------------------------------------------------------------- +-- End of StdDIS +---------------------------------------------------------------- hunk ./Graphics/X11/Types.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Types +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of type declarations for interfacing with X11. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Types + ( module Graphics.X11.Types + ) where + +import Graphics.X11.StdDIS + +%#include "include/HsXlib.h" + +-- ToDo: use newtype +type XID = Word32 +type Mask = Word32 +type Atom = Word32 +type VisualID = Word32 +type Time = Word32 + +%dis xID x = word32 ({XID} x) +%dis mask x = word32 ({unsigned int} x) +%dis atom x = word32 ({Atom} x) +%dis visualID x = word32 ({VisualID} x) +%dis time x = word32 ({Time} x) + +-- end platform dependency + +type Window = XID +type Drawable = XID +type Font = XID +type Pixmap = XID +type Cursor = XID +type Colormap = XID +type GContext = XID +type KeySym = XID + +%dis window x = xID x +%dis drawable x = xID x +%dis font x = xID x +%dis pixmap x = xID x +%dis cursor x = xID x +%dis colormap x = xID x +%dis gContext x = xID x +%dis keySym x = xID x + +type KeyCode = Char +%dis keyCode x = char ({KeyCode} x) + +%const KeySym +% [ XK_VoidSymbol -- void symbol +% +% -- TTY Functions, cleverly chosen to map to ascii, for convenience of +% -- programming, but could have been arbitrary (at the cost of lookup +% -- tables in client code. +% +% , XK_BackSpace -- back space, back char +% , XK_Tab +% , XK_Linefeed -- Linefeed, LF +% , XK_Clear +% , XK_Return -- Return, enter +% , XK_Pause -- Pause, hold +% , XK_Scroll_Lock +% , XK_Sys_Req +% , XK_Escape +% , XK_Delete -- Delete, rubout +% +% -- International & multi-key character composition +% , XK_Multi_key -- Multi-key character compose +% -- , XK_Codeinput -- Not defined for SunOS. +% -- , XK_SingleCandidate -- Not defined for SunOS. +% -- , XK_MultipleCandidate -- Not defined for SunOS. +% -- , XK_PreviousCandidate -- Not defined for SunOS. +% ] + +-- Cursor control & motion +%const KeySym +% [ XK_Home +% , XK_Left -- Move left, left arrow +% , XK_Up -- Move up, up arrow +% , XK_Right -- Move right, right arrow +% , XK_Down -- Move down, down arrow +% , XK_Prior -- Prior, previous +% , XK_Page_Up +% , XK_Next -- Next +% , XK_Page_Down +% , XK_End -- EOL +% , XK_Begin -- BOL +% +% , XK_Select -- Select, mark +% , XK_Print +% , XK_Execute -- Execute, run, do +% , XK_Insert -- Insert, insert here +% , XK_Undo -- Undo, oops +% , XK_Redo -- redo, again +% , XK_Menu +% , XK_Find -- Find, search +% , XK_Cancel -- Cancel, stop, abort, exit +% , XK_Help -- Help +% , XK_Break +% , XK_Mode_switch -- Character set switch +% , XK_script_switch -- Alias for mode_switch +% , XK_Num_Lock +% ] + +-- Keypad Functions, keypad numbers cleverly chosen to map to ascii +%const KeySym +% [ XK_KP_Space -- space +% , XK_KP_Tab +% , XK_KP_Enter -- enter +% , XK_KP_F1 -- PF1, KP_A, ... +% , XK_KP_F2 +% , XK_KP_F3 +% , XK_KP_F4 +% , XK_KP_Home +% , XK_KP_Left +% , XK_KP_Up +% , XK_KP_Right +% , XK_KP_Down +% , XK_KP_Prior +% , XK_KP_Page_Up +% , XK_KP_Next +% , XK_KP_Page_Down +% , XK_KP_End +% , XK_KP_Begin +% , XK_KP_Insert +% , XK_KP_Delete +% , XK_KP_Equal -- equals +% , XK_KP_Multiply +% , XK_KP_Add +% , XK_KP_Separator -- separator, often comma +% , XK_KP_Subtract +% , XK_KP_Decimal +% , XK_KP_Divide +% +% , XK_KP_0 +% , XK_KP_1 +% , XK_KP_2 +% , XK_KP_3 +% , XK_KP_4 +% , XK_KP_5 +% , XK_KP_6 +% , XK_KP_7 +% , XK_KP_8 +% , XK_KP_9 +% +% , XK_F1 +% , XK_F2 +% , XK_F3 +% , XK_F4 +% , XK_F5 +% , XK_F6 +% , XK_F7 +% , XK_F8 +% , XK_F9 +% , XK_F10 +% , XK_F11 +% , XK_L1 +% , XK_F12 +% , XK_L2 +% , XK_F13 +% , XK_L3 +% , XK_F14 +% , XK_L4 +% , XK_F15 +% , XK_L5 +% , XK_F16 +% , XK_L6 +% , XK_F17 +% , XK_L7 +% , XK_F18 +% , XK_L8 +% , XK_F19 +% , XK_L9 +% , XK_F20 +% , XK_L10 +% , XK_F21 +% , XK_R1 +% , XK_F22 +% , XK_R2 +% , XK_F23 +% , XK_R3 +% , XK_F24 +% , XK_R4 +% , XK_F25 +% , XK_R5 +% , XK_F26 +% , XK_R6 +% , XK_F27 +% , XK_R7 +% , XK_F28 +% , XK_R8 +% , XK_F29 +% , XK_R9 +% , XK_F30 +% , XK_R10 +% , XK_F31 +% , XK_R11 +% , XK_F32 +% , XK_R12 +% , XK_F33 +% , XK_R13 +% , XK_F34 +% , XK_R14 +% , XK_F35 +% , XK_R15 +% ] + +%const KeySym +% [ XK_Shift_L -- Left shift +% , XK_Shift_R -- Right shift +% , XK_Control_L -- Left control +% , XK_Control_R -- Right control +% , XK_Caps_Lock -- Caps lock +% , XK_Shift_Lock -- Shift lock +% +% , XK_Meta_L -- Left meta +% , XK_Meta_R -- Right meta +% , XK_Alt_L -- Left alt +% , XK_Alt_R -- Right alt +% , XK_Super_L -- Left super +% , XK_Super_R -- Right super +% , XK_Hyper_L -- Left hyper +% , XK_Hyper_R -- Right hyper +% ] + +%const KeySym +% [ XK_space +% , XK_exclam +% , XK_quotedbl +% , XK_numbersign +% , XK_dollar +% , XK_percent +% , XK_ampersand +% , XK_apostrophe +% , XK_quoteright -- deprecated +% , XK_parenleft +% , XK_parenright +% , XK_asterisk +% , XK_plus +% , XK_comma +% , XK_minus +% , XK_period +% , XK_slash +% , XK_0 +% , XK_1 +% , XK_2 +% , XK_3 +% , XK_4 +% , XK_5 +% , XK_6 +% , XK_7 +% , XK_8 +% , XK_9 +% , XK_colon +% , XK_semicolon +% , XK_less +% , XK_equal +% , XK_greater +% , XK_question +% , XK_at +% , XK_A +% , XK_B +% , XK_C +% , XK_D +% , XK_E +% , XK_F +% , XK_G +% , XK_H +% , XK_I +% , XK_J +% , XK_K +% , XK_L +% , XK_M +% , XK_N +% , XK_O +% , XK_P +% , XK_Q +% , XK_R +% , XK_S +% , XK_T +% , XK_U +% , XK_V +% , XK_W +% , XK_X +% , XK_Y +% , XK_Z +% , XK_bracketleft +% , XK_backslash +% , XK_bracketright +% , XK_asciicircum +% , XK_underscore +% , XK_grave +% , XK_quoteleft -- deprecated +% , XK_a +% , XK_b +% , XK_c +% , XK_d +% , XK_e +% , XK_f +% , XK_g +% , XK_h +% , XK_i +% , XK_j +% , XK_k +% , XK_l +% , XK_m +% , XK_n +% , XK_o +% , XK_p +% , XK_q +% , XK_r +% , XK_s +% , XK_t +% , XK_u +% , XK_v +% , XK_w +% , XK_x +% , XK_y +% , XK_z +% , XK_braceleft +% , XK_bar +% , XK_braceright +% , XK_asciitilde +% +% , XK_nobreakspace +% , XK_exclamdown +% , XK_cent +% , XK_sterling +% , XK_currency +% , XK_yen +% , XK_brokenbar +% , XK_section +% , XK_diaeresis +% , XK_copyright +% , XK_ordfeminine +% , XK_guillemotleft -- left angle quotation mark +% , XK_notsign +% , XK_hyphen +% , XK_registered +% , XK_macron +% , XK_degree +% , XK_plusminus +% , XK_twosuperior +% , XK_threesuperior +% , XK_acute +% , XK_mu +% , XK_paragraph +% , XK_periodcentered +% , XK_cedilla +% , XK_onesuperior +% , XK_masculine +% , XK_guillemotright -- right angle quotation mark +% , XK_onequarter +% , XK_onehalf +% , XK_threequarters +% , XK_questiondown +% , XK_Agrave +% , XK_Aacute +% , XK_Acircumflex +% , XK_Atilde +% , XK_Adiaeresis +% , XK_Aring +% , XK_AE +% , XK_Ccedilla +% , XK_Egrave +% , XK_Eacute +% , XK_Ecircumflex +% , XK_Ediaeresis +% , XK_Igrave +% , XK_Iacute +% , XK_Icircumflex +% , XK_Idiaeresis +% , XK_ETH +% , XK_Eth -- deprecated +% , XK_Ntilde +% , XK_Ograve +% , XK_Oacute +% , XK_Ocircumflex +% , XK_Otilde +% , XK_Odiaeresis +% , XK_multiply +% , XK_Ooblique +% , XK_Ugrave +% , XK_Uacute +% , XK_Ucircumflex +% , XK_Udiaeresis +% , XK_Yacute +% , XK_THORN +% , XK_Thorn -- deprecated +% , XK_ssharp +% , XK_agrave +% , XK_aacute +% , XK_acircumflex +% , XK_atilde +% , XK_adiaeresis +% , XK_aring +% , XK_ae +% , XK_ccedilla +% , XK_egrave +% , XK_eacute +% , XK_ecircumflex +% , XK_ediaeresis +% , XK_igrave +% , XK_iacute +% , XK_icircumflex +% , XK_idiaeresis +% , XK_eth +% , XK_ntilde +% , XK_ograve +% , XK_oacute +% , XK_ocircumflex +% , XK_otilde +% , XK_odiaeresis +% , XK_division +% , XK_oslash +% , XK_ugrave +% , XK_uacute +% , XK_ucircumflex +% , XK_udiaeresis +% , XK_yacute +% , XK_thorn +% , XK_ydiaeresis +% ] + +type EventMask = Mask +%dis eventMask x = mask x + +%const EventMask +% [ NoEventMask +% , KeyPressMask +% , KeyReleaseMask +% , ButtonPressMask +% , ButtonReleaseMask +% , EnterWindowMask +% , LeaveWindowMask +% , PointerMotionMask +% , PointerMotionHintMask +% , Button1MotionMask +% , Button2MotionMask +% , Button3MotionMask +% , Button4MotionMask +% , Button5MotionMask +% , ButtonMotionMask +% , KeymapStateMask +% , ExposureMask +% , VisibilityChangeMask +% , StructureNotifyMask +% , ResizeRedirectMask +% , SubstructureNotifyMask +% , SubstructureRedirectMask +% , FocusChangeMask +% , PropertyChangeMask +% , ColormapChangeMask +% , OwnerGrabButtonMask +% ] + +type EventType = Word32 +%dis eventType x = word32 x + +%const EventType +% [ KeyPress +% , KeyRelease +% , ButtonPress +% , ButtonRelease +% , MotionNotify +% , EnterNotify +% , LeaveNotify +% , FocusIn +% , FocusOut +% , KeymapNotify +% , Expose +% , GraphicsExpose +% , NoExpose +% , VisibilityNotify +% , CreateNotify +% , DestroyNotify +% , UnmapNotify +% , MapNotify +% , MapRequest +% , ReparentNotify +% , ConfigureNotify +% , ConfigureRequest +% , GravityNotify +% , ResizeRequest +% , CirculateNotify +% , CirculateRequest +% , PropertyNotify +% , SelectionClear +% , SelectionRequest +% , SelectionNotify +% , ColormapNotify +% , ClientMessage +% , MappingNotify +% , LASTEvent +% ] + +type Modifier = Mask +%dis modifier x = mask x + +%const Modifier +% [ ShiftMapIndex +% , LockMapIndex +% , ControlMapIndex +% , Mod1MapIndex +% , Mod2MapIndex +% , Mod3MapIndex +% , Mod4MapIndex +% , Mod5MapIndex +% , AnyModifier +% ] + +type KeyMask = Modifier +%dis keyMask x = modifier x + +%const KeyMask +% [ ShiftMask +% , LockMask +% , ControlMask +% , Mod1Mask +% , Mod2Mask +% , Mod3Mask +% , Mod4Mask +% , Mod5Mask +% ] + +type ButtonMask = Modifier +%dis buttonMask x = modifier x + +%const ButtonMask +% [ Button1Mask +% , Button2Mask +% , Button3Mask +% , Button4Mask +% , Button5Mask +% ] + +type Button = Word32 +%dis button x = word32 x + +%const Button +% [ Button1 +% , Button2 +% , Button3 +% , Button4 +% , Button5 +% ] + +type NotifyMode = Int +%dis notifyMode x = int x + +-- NotifyNormal and NotifyHint are used as detail in XMotionEvents +%const NotifyMode +% [ NotifyNormal +% , NotifyGrab +% , NotifyUngrab +% , NotifyWhileGrabbed +% , NotifyHint +% ] + +type NotifyDetail = Int +%dis notifyDetail x = int x + +%const NotifyDetail +% [ NotifyAncestor +% , NotifyVirtual +% , NotifyInferior +% , NotifyNonlinear +% , NotifyNonlinearVirtual +% , NotifyPointer +% , NotifyPointerRoot +% , NotifyDetailNone +% ] + +type Visibility = Int +%dis visibility x = int x +%const Visibility +% [ VisibilityUnobscured +% , VisibilityPartiallyObscured +% , VisibilityFullyObscured +% ] + +-- Window's place relative to siblings (used in Circulation requests/events) +type Place = Int +%dis place x = int x +%const Place [ PlaceOnTop, PlaceOnBottom ] + +type Protocol = Int +%dis protocol x = int x +%const Protocol [ FamilyInternet, FamilyDECnet, FamilyChaos ] + +type PropertyNotification = Int +%dis propertyNotification x = int x +%const PropertyNotification [ PropertyNewValue, PropertyDelete ] + +type ColormapNotification = Int +%dis colormapNotification x = int x +%const ColormapNotification [ ColormapUninstalled, ColormapInstalled ] + + +-- Grab{Pointer,Button,Keyboard,Key} Modes +type GrabMode = Int +%dis grabMode x = int x +%const GrabMode [ GrabModeSync, GrabModeAsync ] + +-- Grab{Pointer,Keyboard} reply status + +type GrabStatus = Int +%dis grabStatus x = int x +%const GrabStatus +% [ GrabSuccess, AlreadyGrabbed, GrabInvalidTime, GrabNotViewable, GrabFrozen ] + +-- AllowEvents modes +type AllowEvents = Int +%dis allowEvents x = int x +%const AllowEvents +% [ AsyncPointer +% , SyncPointer +% , ReplayPointer +% , AsyncKeyboard +% , SyncKeyboard +% , ReplayKeyboard +% , AsyncBoth +% , SyncBoth +% ] + + +-- {Set,Get}InputFocus Modes +type FocusMode = Int +%dis focusMode x = int x +%const FocusMode [ RevertToNone, RevertToPointerRoot, RevertToParent ] + +-- Error codes +type Status = Int +%dis status x = int x +%const Status +% [ Success +% , BadRequest +% , BadValue +% , BadWindow +% , BadPixmap +% , BadAtom +% , BadCursor +% , BadFont +% , BadMatch +% , BadDrawable +% , BadAccess +% , BadAlloc +% , BadColor +% , BadGC +% , BadIDChoice +% , BadName +% , BadLength +% , BadImplementation +% , FirstExtensionError +% , LastExtensionError +% ] + +type WindowClass = Int +%dis windowClass x = int x +%const WindowClass [ CopyFromParent, InputOutput, InputOnly ] + +-- Window attributes mask +type AttributeMask = Mask +%dis attributeMask x = mask x + +%const AttributeMask +% [ CWBackPixmap +% , CWBackPixel +% , CWBorderPixmap +% , CWBorderPixel +% , CWBitGravity +% , CWWinGravity +% , CWBackingStore +% , CWBackingPlanes +% , CWBackingPixel +% , CWOverrideRedirect +% , CWSaveUnder +% , CWEventMask +% , CWDontPropagate +% , CWColormap +% , CWCursor +% ] + +-- Used in ChangeCloseDownMode +type CloseDownMode = Int +%dis closeDownMode x = int x + +%const CloseDownMode +% [ DestroyAll +% , RetainPermanent +% , RetainTemporary +% ] + + +---------------------------------------------------------------- +-- CURSOR STUFF +---------------------------------------------------------------- + +type QueryBestSizeClass = Int +%dis queryBestSizeClass x = int x +%const QueryBestSizeClass +% [ CursorShape -- largest size that can be displayed +% , TileShape -- size tiled fastest +% , StippleShape -- size stippled fastest +% ] + +---------------------------------------------------------------- +-- GRAPHICS DEFINITIONS +---------------------------------------------------------------- + +-- graphics functions, as in GC.alu + +type GXFunction = Int +%dis gXFunction x = int x +%const GXFunction +% [ GXclear -- 0 +% , GXand -- src AND dst +% , GXandReverse -- src AND NOT dst +% , GXcopy -- src +% , GXandInverted -- NOT src AND dst +% , GXnoop -- dst +% , GXxor -- src XOR dst +% , GXor -- src OR dst +% , GXnor -- NOT src AND NOT dst +% , GXequiv -- NOT src XOR dst +% , GXinvert -- NOT dst +% , GXorReverse -- src OR NOT dst +% , GXcopyInverted -- NOT src +% , GXorInverted -- NOT src OR dst +% , GXnand -- NOT src OR NOT dst +% , GXset -- 1 +% ] + +type LineStyle = Int +%dis lineStyle x = int x +%const LineStyle +% [ LineSolid +% , LineOnOffDash +% , LineDoubleDash +% ] + +type CapStyle = Int +%dis capStyle x = int x +%const CapStyle +% [ CapNotLast +% , CapButt +% , CapRound +% , CapProjecting +% ] + +type JoinStyle = Int +%dis joinStyle x = int x +%const JoinStyle +% [ JoinMiter +% , JoinRound +% , JoinBevel +% ] + +type FillStyle = Int +%dis fillStyle x = int x +%const FillStyle +% [ FillSolid +% , FillTiled +% , FillStippled +% , FillOpaqueStippled +% ] + +type FillRule = Int +%dis fillRule x = int x +%const FillRule +% [ EvenOddRule +% , WindingRule +% ] + +type SubWindowMode = Int +%dis subWindowMode x = int x +%const SubWindowMode +% [ ClipByChildren +% , IncludeInferiors +% ] + +-- -- SetClipRectangles ordering +-- type Ordering = Int +-- %dis ordering x = int x +-- %const Ordering +-- % [ Unsorted +-- % , YSorted +-- % , YXSorted +-- % , YXBanded +-- % ] + +-- CoordinateMode for drawing routines +type CoordinateMode = Int +%dis coordinateMode x = int x +%const CoordinateMode +% [ CoordModeOrigin -- relative to the origin +% , CoordModePrevious -- relative to previous point +% ] + +type PolygonShape = Int +%dis polygonShape x = int x +%const PolygonShape +% [ Complex -- paths may intersect +% , Nonconvex -- no paths intersect, but not convex +% , Convex -- wholly convex +% ] + +-- Arc modes for PolyFillArc +type ArcMode = Int +%dis arcMode x = int x +%const ArcMode +% [ ArcChord -- join endpoints of arc +% , ArcPieSlice -- join endpoints to center of arc +% ] + +-- GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into +-- GC.stateChanges + +type GCMask = Int +%dis gCMask x = int x +%const GCMask +% [ GCFunction +% , GCPlaneMask +% , GCForeground +% , GCBackground +% , GCLineWidth +% , GCLineStyle +% , GCCapStyle +% , GCJoinStyle +% , GCFillStyle +% , GCFillRule +% , GCTile +% , GCStipple +% , GCTileStipXOrigin +% , GCTileStipYOrigin +% , GCFont +% , GCSubwindowMode +% , GCGraphicsExposures +% , GCClipXOrigin +% , GCClipYOrigin +% , GCClipMask +% , GCDashOffset +% , GCDashList +% , GCArcMode +% , GCLastBit +% ] + +type CirculationDirection = Int +%dis circulationDirection x = int x +%const CirculationDirection +% [ RaiseLowest +% , LowerHighest +% ] + +-- used in imageByteOrder and bitmapBitOrder +type ByteOrder = Int +%dis byteOrder x = int x +%const ByteOrder +% [ LSBFirst +% , MSBFirst +% ] + +type ColormapAlloc = Int +%dis colormapAlloc x = int x +%const ColormapAlloc +% [ AllocNone -- create map with no entries +% , AllocAll -- allocate entire map writeable +% ] + +type MappingRequest = Int +%dis mappingRequest x = int x +%const MappingRequest +% [ MappingModifier +% , MappingKeyboard +% , MappingPointer +% ] + + +type ChangeSaveSetMode = Int +%dis changeSaveSetMode x = int x +%const ChangeSaveSetMode +% [ SetModeInsert +% , SetModeDelete +% ] + +type BitGravity = Int +%dis bitGravity x = int x +%const BitGravity +% [ ForgetGravity +% , NorthWestGravity +% , NorthGravity +% , NorthEastGravity +% , WestGravity +% , CenterGravity +% , EastGravity +% , SouthWestGravity +% , SouthGravity +% , SouthEastGravity +% , StaticGravity +% ] + +-- All the BitGravity's plus ... +type WindowGravity = Int +%dis windowGravity x = int x +%const WindowGravity +% [ UnmapGravity +% ] + +-- Used in CreateWindow for backing-store hint +type BackingStore = Int +%dis backingStore x = int x +%const BackingStore +% [ NotUseful +% , WhenMapped +% , Always +% ] + +%const Word8 +% [ DoRed +% , DoGreen +% , DoBlue +% ] + +type FontDirection = Int +%dis fontDirection x = int x +%const FontDirection +% [ FontLeftToRight +% , FontRightToLeft +% ] hunk ./Graphics/X11/Xlib.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of GreenCard declarations for interfacing with Xlib. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib + ( module Graphics.X11.Types + , module Graphics.X11.Xlib + , free + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types + +import Monad( zipWithM_ ) +import Foreign(mallocBytes, Storable(..)) + +%#include "include/HsXlib.h" + +%prefix X + +type Pixel = Word32 +type Position = Int32 +type Dimension = Word32 +type ScreenNumber = Word32 +type Byte = Char +type Buffer = Int + +%dis pixel x = word32 x +%dis position x = int32 x +%dis dimension x = word32 x +%dis screenNumber x = word32 x +%dis byte x = char x +%dis buffer x = int + +newtype Display = Display (Ptr Stub_Display) +newtype Screen = Screen (Ptr Stub_Screen) +newtype Visual = Visual (Ptr Stub_Visual) +newtype FontStruct = FontStruct (Ptr Stub_FontStruct) +newtype Region = Region (ForeignPtr Stub_Region) + +data Stub_Display +data Stub_Screen +data Stub_Visual +data Stub_FontStruct +data Stub_Region + +%dis display x = Display (ptr ({Display*} x)) +%dis screen x = Screen (ptr ({Screen*} x)) +%dis visual x = Visual (ptr ({Visual*} x)) +%dis fontStruct x = FontStruct (ptr ({XFontStruct*} x)) +%dis region x = Region (%ForeignPtr {Region} x {XDestroyRegion}) + +type GC = Ptr Stub_GC +data Stub_GC +%dis gC x = ptr x + +type Point = + ( Position -- x + , Position -- y + ) +%dis point x = declare {XPoint} x in +% ( position {(%x).x} +% , position {(%x).y} +% ) + +type Segment = + ( Position -- x1 + , Position -- y1 + , Position -- x2 + , Position -- y2 + ) +%dis segment x = declare {XSegment} x in +% ( position {(%x).x1} +% , position {(%x).y1} +% , position {(%x).x2} +% , position {(%x).y2} +% ) + +type Rectangle = + ( Position -- x + , Position -- y + , Dimension -- width + , Dimension -- height + ) +%dis rectangle x = declare {XRectangle} x in +% ( position {(%x).x} +% , position {(%x).y} +% , dimension {(%x).width} +% , dimension {(%x).height} +% ) + +type Arc = + ( Position + , Position + , Dimension + , Dimension + , Int + , Int + ) +%dis arc x = declare {XArc} x in +% ( position {(%x).x} +% , position {(%x).y} +% , dimension {(%x).width} +% , dimension {(%x).height} +% , int {(%x).angle1} +% , int {(%x).angle2} +% ) + +type Color = + ( Pixel + , Word16 + , Word16 + , Word16 + , Word8 + ) +%dis color x = declare {XColor} x in +% ( pixel {(%x).pixel} +% , word16 {(%x).red} +% , word16 {(%x).green} +% , word16 {(%x).blue} +% , word8 {(%x).flags} +% ) + +-- We can't use the similarily named library functions for several reasons: +-- 1) They deal with Ptrs instead of Ptr-Len pairs +-- 2) They require instances of Storable but we apply these functions +-- to type synonyms like 'Point = (Int,Int)' which cannot be +-- instances. + +type Storable' a = + ( a -> Int -- sizeOf + , Ptr a -> Int -> IO a -- peekElemOff + , Ptr a -> Int -> a -> IO () -- pokeElemOff + ) + +newArray' :: Storable' a -> [a] -> IO (Ptr a, Int) +newArray' (sz,_,wr) xs = do + p <- mallocBytes (sz undefined * l) + zipWithM_ (wr p) [0..] xs + return (p, l) + where + l = length xs + +peekArray' :: Storable' a -> (Ptr a, Int) -> IO [a] +peekArray' (_,rd,_) (p,l) + | l <= 0 = return [] + | otherwise = f (l-1) [] + where + f 0 acc = do e <- rd p 0; return (e:acc) + f n acc = do e <- rd p n; f (n-1) (e:acc) + +-- don't forget to use %end free(arg?) in conjunction with these guys +type ListPoint = [Point] +%dis listPoint x l = << newArray' s_Point / peekArray' s_Point >> (ptr ({XPoint*} x)) (int l) +type ListRectangle = [Rectangle] +%dis listRectangle x l = << newArray' s_Rectangle / peekArray' s_Rectangle >> (ptr ({XRectangle*} x)) (int l) +type ListArc = [Arc] +%dis listArc x l = << newArray' s_Arc / peekArray' s_Arc >> (ptr ({XArc*} x)) (int l) +type ListSegment = [Segment] +%dis listSegment x l = << newArray' s_Segment / peekArray' s_Segment >> (ptr ({XSegment*} x)) (int l) +type ListColor = [Color] +%dis listColor x l = << newArray' s_Color / peekArray' s_Color >> (ptr ({XColor*} x)) (int l) +type ListPixel = [Pixel] +%dis listPixel x l = << newArray' s_Pixel / peekArray' s_Pixel >> (ptr ({unsigned long*} x)) (int l) +type ListWindow = [Window] +%dis listWindow x l = << newArray' s_Window / peekArray' s_Window >> (ptr ({Window*} x)) (int l) +-- AC, 1/9/2000: Try to define types and marshalling code for Atom lists: +type ListAtom = [Atom] +%dis listAtom x l = << newArray' s_Atom / peekArray' s_Atom >> (ptr ({Atom *} x)) (int l) + +s_Pixel :: Storable' Pixel +s_Pixel = (sizeOf, peekElemOff, pokeElemOff) + +s_Window :: Storable' Window +s_Window = (sizeOf, peekElemOff, pokeElemOff) + +s_Atom :: Storable' Atom +s_Atom = (sizeOf, peekElemOff, pokeElemOff) + +s_Point :: Storable' Point +s_Point = (const sizeOfPoint,readPoint,writePoint) + +%fun writePoint :: Ptr Point -> Int -> Point -> IO () +%call (ptr ({XPoint*} s)) (int i) (point {s[i]}) +%code + +%fun readPoint :: Ptr Point -> Int -> IO Point +%call (ptr ({XPoint*} s)) (int i) +%code +%result (point {s[i]}) + +%fun sizeOfPoint :: Int +%code res1 = sizeof(XPoint) + +s_Rectangle :: Storable' Rectangle +s_Rectangle = (const sizeOfRectangle, readRectangle, writeRectangle ) + +%fun writeRectangle :: Ptr Rectangle -> Int -> Rectangle -> IO () +%call (ptr ({XRectangle*} s)) (int i) (rectangle {s[i]}) +%code + +%fun readRectangle :: Ptr Rectangle -> Int -> IO Rectangle +%call (ptr ({XRectangle*} s)) (int i) +%code +%result (rectangle {s[i]}) + +%fun sizeOfRectangle :: Int +%code res1 = sizeof(XRectangle) + + +s_Arc :: Storable' Arc +s_Arc = (const sizeOfArc, readArc, writeArc ) + +%fun writeArc :: Ptr Arc -> Int -> Arc -> IO () +%call (ptr ({XArc*} s)) (int i) (arc {s[i]}) +%code + +%fun readArc :: Ptr Arc -> Int -> IO Arc +%call (ptr ({XArc*} s)) (int i) +%code +%result (arc {s[i]}) + +%fun sizeOfArc :: Int +%code res1 = sizeof(XArc) + + +s_Segment :: Storable' Segment +s_Segment = (const sizeOfSegment, readSegment, writeSegment ) + +%fun writeSegment :: Ptr Segment -> Int -> Segment -> IO () +%call (ptr ({XSegment*} s)) (int i) (segment {s[i]}) +%code + +%fun readSegment :: Ptr Segment -> Int -> IO Segment +%call (ptr ({XSegment*} s)) (int i) +%code +%result (segment {s[i]}) + +%fun sizeOfSegment :: Int +%code res1 = sizeof(XSegment) + + +s_Color :: Storable' Color +s_Color = (const sizeOfColor, readColor, writeColor ) + +%fun writeColor :: Ptr Color -> Int -> Color -> IO () +%call (ptr ({XColor*} s)) (int i) (color {s[i]}) +%code + +%fun readColor :: Ptr Color -> Int -> IO Color +%call (ptr ({XColor*} s)) (int i) +%code +%result (color {s[i]}) + +%fun sizeOfColor :: Int +%code res1 = sizeof(XColor) + + +%fun AllPlanes_aux :: Pixel +%fun BlackPixel :: Display -> ScreenNumber -> Pixel +%fun WhitePixel :: Display -> ScreenNumber -> Pixel + +-- This may vary from one execution to another but I believe it +-- is constant during any given execution and so it can be made PURE +-- without breaking referential transparency. +-- +-- Note: underneath the opaque name, it turns out that this +-- is the file descriptor. You need to know this if you want to +-- use select. +%fun ConnectionNumber :: Display -> Int + +%fun DefaultColormap :: Display -> ScreenNumber -> Colormap + +-- %fun XListDepths :: Display -> ScreenNumber -> ListInt using res1 = XListDepths(arg1,arg2,&res1_size) + +%fun DefaultGC :: Display -> ScreenNumber -> GC +%fun DefaultDepth :: Display -> ScreenNumber -> Int +%fun DefaultScreen :: Display -> ScreenNumber +%fun DefaultScreenOfDisplay :: Display -> Screen +%fun DisplayHeight :: Display -> ScreenNumber -> Int +%fun DisplayHeightMM :: Display -> ScreenNumber -> Int +%fun DisplayWidth :: Display -> ScreenNumber -> Int +%fun DisplayWidthMM :: Display -> ScreenNumber -> Int +%fun XMaxRequestSize :: Display -> Int +%fun XDisplayMotionBufferSize:: Display -> Int +--Disnae exist in X11R5 %fun XExtendedMaxRequestSize :: Display -> Int +%fun XResourceManagerString :: Display -> String +%fun XScreenResourceString :: Screen -> String +%fun DisplayString :: Display -> String +%fun ImageByteOrder :: Display -> Int +%fun ProtocolRevision :: Display -> Int +%fun ProtocolVersion :: Display -> Int +%fun ServerVendor :: Display -> String +--Disnae exist: %fun XServerRelease :: Display -> Int +%fun ScreenCount :: Display -> Int +%fun DefaultVisual :: Display -> ScreenNumber -> Visual +%fun DisplayCells :: Display -> ScreenNumber -> Int +%fun DisplayPlanes :: Display -> ScreenNumber -> Int +%fun ScreenOfDisplay :: Display -> ScreenNumber -> Screen +%fun DefaultRootWindow :: Display -> Window + +-- The following are believed to be order dependent + +%fun XRootWindow :: Display -> ScreenNumber -> IO Window +%fun XQLength :: Display -> IO Int + +%fun XNoOp :: Display -> IO () + +%fun XOpenDisplay :: String -> IO Display +%fail {res1 == 0} { NullPtr(XOpenDisplay) } + +%fun XCloseDisplay :: Display -> IO () + +-- I'm not sure why I added this since I don't have any of the related +-- functions. +%fun XrmInitialize :: IO () + +-- %fun XGetDefault :: Display -> String -> String -> IO () + +%fun XAutoRepeatOff :: Display -> IO () +%fun XAutoRepeatOn :: Display -> IO () +%fun XBell :: Display -> Int -> IO () +%fun XSetCloseDownMode :: Display -> CloseDownMode -> IO () +%fun XLastKnownRequestProcessed :: Display -> IO Int + +%fun XGetInputFocus :: Display -> IO (Window, FocusMode) +%code XGetInputFocus(arg1,&res1,&res2); + +%fun XSetInputFocus :: Display -> Window -> FocusMode -> Time -> IO () + +-- XAllocID omitted +-- XKillClient omitted +-- XFetchName omitted +-- XGetKeyboardControl omitted +-- XChangeKeyboardControl omitted +-- XChangeKeyboardMapping omitted +-- XChangePointerControl omitted + +%fun XGrabButton :: Display -> Button -> ButtonMask -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> IO () +%fun XUngrabButton :: Display -> Button -> ButtonMask -> Window -> IO () + +%fun XGrabPointer :: Display -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> Time -> IO GrabStatus +%fun XUngrabPointer :: Display -> Time -> IO () + +%fun XGrabKey :: Display -> KeyCode -> ButtonMask -> Window -> Bool -> GrabMode -> GrabMode -> IO () +%fun XUngrabKey :: Display -> KeyCode -> ButtonMask -> Window -> IO () + +%fun XGrabKeyboard :: Display -> Window -> Bool -> GrabMode -> GrabMode -> Time -> IO GrabStatus +%fun XUngrabKeyboard :: Display -> Time -> IO () + +%fun XGrabServer :: Display -> IO () +%fun XUngrabServer :: Display -> IO () + +-- XChangeActivePointerGrab omitted + +-- XFree omitted +-- XFreeStringList omitted + +%fun XQueryBestTile :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) +%code Status err = XQueryBestTile(arg1,arg2,arg3,arg4,&res1,&res2) +%fail { Success != err }{ BadStatus(err,XQueryBestTile) } + +%fun XQueryBestStipple :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) +%code Status err = XQueryBestStipple(arg1,arg2,arg3,arg4,&res1,&res2) +%fail { Success != err }{ BadStatus(err,XQueryBestStipple) } + +%fun XQueryBestCursor :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) +%code Status err = XQueryBestCursor(arg1,arg2,arg3,arg4,&res1,&res2) +%fail { Success != err }{ BadStatus(err,XQueryBestCursor) } + +%fun XQueryBestSize :: Display -> Drawable -> QueryBestSizeClass -> Dimension -> Dimension -> IO (Dimension, Dimension) +%code Status err = XQueryBestSize(arg1,arg2,arg3,arg4,arg5,&res1,&res2) +%fail { Success != err }{ BadStatus(err,XQueryBestSize) } + +-- Note: Returns false if pointer not in window w (and win_x = win_y = 0) +-- ToDo: more effective use of Maybes? +%fun XQueryPointer :: Display -> Window -> IO (Bool, Window, Window, Int, Int, Int, Int, Modifier) +%code Status res1 = XQueryPointer(arg1,arg2,&res2,&res3,&res4,&res5,&res6,&res7,&res8) + +-- XSetSelectionOwner omitted + +-- XOpenOM omitted +-- XCloseOM omitted +-- XSetOMValues omitted +-- XGetOMValues omitted +-- DisplayOfOM omitted +-- XLocaleOfOM omitted + +-- XCreateOC omitted +-- XDestroyOC omitted +-- XOMOfOC omitted +-- XSetOCValues omitted +-- XGetOCValues omitted + +-- XVaCreateNestedList omitted + +---------------------------------------------------------------- +-- Error reporting +---------------------------------------------------------------- + +%fun XDisplayName :: String -> String + +-- type ErrorHandler = Display -> ErrorEvent -> IO Int +-- %dis errorHandler x = (stable x) +-- +-- type IOErrorHandler = Display -> IO Int +-- %dis ioErrorHandler x = (stable x) + +-- Sadly, this code doesn't work because hugs->runIO creates a fresh +-- stack of exception handlers so the exception gets thrown to the +-- wrong place. +-- +-- %C +-- % static HugsStablePtr ioErrorHandlerPtr; +-- % +-- % int genericIOErrorHandler(Display *d) +-- % { +-- % if (ioErrorHandlerPtr >= 0) { +-- % hugs->putStablePtr(ioErrorHandlerPtr); +-- % hugs->putAddr(d); +-- % if (hugs->runIO(1)) { /* exitWith value returned */ +-- % return hugs->getInt(); +-- % } else { +-- % return hugs->getWord(); +-- % } +-- % } +-- % return 1; +-- % } + +-- Here's what we might do instead. The two error handlers set flags +-- when they fire and every single call to X contains the line: +-- +-- %fail { errorFlags != 0 } { XError(errorFlags) } +-- +-- This really sucks. +-- Oh, and it won't even work with IOErrors since they terminate +-- the process if the handler returns. I don't know what the hell they +-- think they're doing taking it upon themselves to terminate MY +-- process when THEIR library has a problem but I don't think anyone +-- ever accused X of being well-designed. +-- +-- % static int genericIOErrorHandler(Display *d) +-- % { +-- % if (ioErrorHandlerPtr >= 0) { +-- % hugs->putStablePtr(ioErrorHandlerPtr); +-- % hugs->putAddr(d); +-- % if (hugs->runIO(1)) { /* exitWith value returned */ +-- % return hugs->getInt(); +-- % } else { +-- % return hugs->getWord(); +-- % } +-- % } +-- % return 1; +-- % } + + +-- HN 2001-02-06 +-- Moved to auxiliaries.c to make it easier to use the inlining option. +-- -- Sigh, for now we just use an error handler that prints an error +-- -- message on the screen +-- %C +-- % static int defaultErrorHandler(Display *d, XErrorEvent *ev) +-- % { +-- % char buffer[1000]; +-- % XGetErrorText(d,ev->error_code,buffer,1000); +-- % printf("Error: %s\n", buffer); +-- % return 0; +-- % } + + +%fun setDefaultErrorHandler :: IO () +%code XSetErrorHandler(defaultErrorHandler); + + +-- %fun XSetIOErrorHandler :: IOErrorHandler -> IO IOErrorHandler +-- %fun XSetErrorHandler :: ErrorHandler -> IO ErrorHandler + +-- XGetErrorDatabaseText omitted +-- XGetErrorText omitted + +-- ---------------------------------------------------------------- +-- -- Buffers +-- ---------------------------------------------------------------- +-- +-- -- OLD: Would arrays be more appropriate? +-- -- +-- -- IMPURE void XStoreBytes(display, bytes, nbytes) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN list[nbytes] Byte bytes +-- -- +-- -- IMPURE list[nbytes] Byte XFetchBytes(display, &nbytes) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- +-- -- IMPURE void XStoreBuffer(display, bytes, nbytes, buffer) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN list[nbytes] Byte bytes +-- -- IN Buffer buffer +-- -- +-- -- IMPURE list[nbytes] Byte XFetchBuffer(display, &nbytes, buffer) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN Buffer buffer +-- -- +-- -- IMPURE void XRotateBuffers(display, rotate) +-- -- IN Display* display +-- -- VAR Int rotate + +---------------------------------------------------------------- +-- Extensions +---------------------------------------------------------------- + +-- ToDo: Use XFreeExtensionList +-- %fun XListExtensions :: Display -> IO ListString using res1 = XListExtensions(arg1,&res1_size) + +-- %errfun False XQueryExtension :: Display -> String -> IO (Int,Int,Int) using res4 = XQueryExtension(arg1,arg2,&res1,&res2,&res3)->(res1,res2,res3) +-- %fun XInitExtensions :: Display -> String -> IO XExtCodes +-- %fun XAddExtensions :: Display -> IO XExtCodes + +-- XAddToExtensionList omitted +-- XFindOnExtensionList omitted +-- XEHeadOfExtensionList omitted + +---------------------------------------------------------------- +-- Hosts +---------------------------------------------------------------- + +-- ToDo: operations to construct and destruct an XHostAddress + +-- %fun XAddHost :: Display -> XHostAddress -> IO () +-- %fun XRemoveHost :: Display -> XHostAddress -> IO () +-- +-- %fun XAddHosts :: Display -> ListXHostAddress -> IO () using XAddHosts(arg1,arg2,arg2_size) +-- %fun XRemoveHosts :: Display -> ListXHostAddress -> IO () using XRemoveHosts(arg1,arg2,arg2_size) +-- +-- # Uses %prim to let us call XFree +-- %prim XListHosts :: Display -> IO (ListXHostAddress, Bool) +-- Bool state; +-- Int r_size; +-- XHostAddress* r = XListHosts(arg1,&r_size,&state); +-- %update(r,state); +-- XFree(r); +-- return; + +-- %fun XEnableAccessControl :: Display -> IO () +-- %fun XDisableAccessControl :: Display -> IO () +-- %fun XSetAccessControl :: Display -> Access -> IO () + + +---------------------------------------------------------------- +-- Events +---------------------------------------------------------------- + +type QueuedMode = Int +%dis queuedMode x = int x +%const QueuedMode +% [ QueuedAlready +% , QueuedAfterFlush +% , QueuedAfterReading +% ] + +-- Because of the way the corresponding C types are defined, +-- These "structs" are somewhat unusual - they omit fields which can +-- be found in more general structs. +-- For example, XAnyEvent omits type since it is in XEvent. +-- Therefore, to get the complete contents of an event one typically +-- writes: +-- do +-- ty <- get_XEvent e +-- (serial,send_event,display,window) <- get_XAnyEvent +-- window' <- get_XDestroyWindowEvent + +type XEvent = + ( EventType + ) +%dis xEvent x = declare {XEvent} x in +% ( eventType {(%x).type} +% ) +type XEventPtr = Ptr Stub_EventPtr +data Stub_EventPtr +%dis xEventPtr x = ptr ({XEvent*} x) + +%fun allocXEvent :: IO XEventPtr +%code res1 = (void*)malloc(sizeof(XEvent)) + +%fun get_EventType :: XEventPtr -> IO EventType +%code res1 = arg1->type + +%fun get_Window :: XEventPtr -> IO Window +%code res1 = ((XAnyEvent*)arg1)->window + +-- %struct : XAnyEvent : XAnyEvent arg1 +-- Int32 : serial # # of last request processed by server +-- Bool : send_event # true if this came from a SendEvent request +-- Display : display # Display the event was read from +-- Window : window # window on which event was requested in event mask + +type XKeyEvent = + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , Int -- pointer x, y coordinates in event window + , Int -- + , Int -- coordinates relative to root + , Int -- + , Modifier -- key or button mask + , KeyCode -- detail + , Bool -- same screen flag + ) +%dis xKeyEvent x = declare {XKeyEvent} x in +% ( window {(%x).root} +% , window {(%x).subwindow} +% , time {(%x).time} +% , int {(%x).x} +% , int {(%x).y} +% , int {(%x).x_root} +% , int {(%x).y_root} +% , modifier {(%x).state} +% , keyCode {(%x).keycode} +% , bool {(%x).same_screen} +% ) +type XKeyEventPtr = Ptr Stub_KeyEventPtr +data Stub_KeyEventPtr +%dis xKeyEventPtr x = ptr ({XKeyEvent*} x) + +type XButtonEvent = + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , Int -- pointer x, y coordinates in event window + , Int + , Int -- coordinates relative to root + , Int + , Modifier -- key or button mask + , Button -- detail + , Bool -- same screen flag + ) +%dis xButtonEvent x = declare {XButtonEvent} x in +% ( window {(%x).root} +% , window {(%x).subwindow} +% , time {(%x).time} +% , int {(%x).x} +% , int {(%x).y} +% , int {(%x).x_root} +% , int {(%x).y_root} +% , modifier {(%x).state} +% , button {(%x).button} +% , bool {(%x).same_screen} +% ) + +%fun get_KeyEvent :: XEventPtr -> IO XKeyEvent +%code +%result (xKeyEvent {*(XKeyEvent*)arg1}) + +%fun get_ButtonEvent :: XEventPtr -> IO XButtonEvent +%code +%result (xButtonEvent {*(XButtonEvent*)arg1}) + +%fun get_MotionEvent :: XEventPtr -> IO XMotionEvent +%code +%result (xMotionEvent {*(XMotionEvent*)arg1}) + + +type XMotionEvent = + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , Int -- pointer x, y coordinates in event window + , Int + , Int -- coordinates relative to root + , Int + , Modifier -- key or button mask + , NotifyMode -- detail + , Bool -- same screen flag + ) +%dis xMotionEvent x = declare {XMotionEvent} x in +% ( window {(%x).root} +% , window {(%x).subwindow} +% , time {(%x).time} +% , int {(%x).x} +% , int {(%x).y} +% , int {(%x).x_root} +% , int {(%x).y_root} +% , modifier {(%x).state} +% , notifyMode {(%x).is_hint} +% , bool {(%x).same_screen} +% ) + + +-- %struct : XCrossingEvent : XCrossingEvent arg1 +-- Window : root # root window that the event occured on +-- Window : subwindow # child window +-- Time : time # milliseconds +-- Int : x # pointer x, y coordinates in event window +-- Int : y +-- Int : x_root # coordinates relative to root +-- Int : y_root +-- NotifyMode : mode +-- NotifyDetail : detail +-- Bool : same_screen # same screen flag +-- Bool : focus # boolean focus +-- Modifier : state # key or button mask +-- +-- %struct : XFocusChangeEvent : XFocusChangeEvent arg1 +-- NotifyMode : mode +-- NotifyDetail : detail +-- +-- -- omitted: should be translated into bitmaps +-- -- PURE void getKeymapEvent(event) +-- -- IN XEvent* event +-- -- OUT Window window = ((XKeymapEvent*)event)->window +-- -- OUT array[32] Char key_vector = ((XKeymapEvent*)event)->key_vector +-- -- RESULT: + +type XExposeEvent = + ( Position -- x + , Position -- y + , Dimension -- width + , Dimension -- height + , Int -- count + ) +%dis xExposeEvent x = declare {XExposeEvent} x in +% ( position {(%x).x} +% , position {(%x).y} +% , dimension {(%x).width} +% , dimension {(%x).height} +% , int {(%x).count} +% ) + +%fun get_ExposeEvent :: XEventPtr -> IO XExposeEvent +%code +%result (xExposeEvent {*(XExposeEvent*)arg1}) + +-- %struct : XGraphicsExposeEvent : XGraphicsExposeEvent arg1 +-- Position : x +-- Position : y +-- Dimension : width . +-- Dimension : height +-- Int : count +-- Int : major_code +-- Int : minor_code +-- +-- %struct : XCirculateEvent : XCirculateEvent arg1 +-- Window : window +-- Place : place +-- +-- %struct : XConfigureEvent : XConfigureEvent arg1 +-- Window : window +-- Position : x +-- Position : y +-- Dimension : width +-- Dimension : height +-- Dimension : border_width +-- Window : above +-- Bool : override_redirect +-- +-- %struct : XCreateWindowEvent : XCreateWindowEvent arg1 +-- Window : window +-- Position : x +-- Position : y +-- Dimension : width +-- Dimension : height +-- Dimension : border_width +-- Bool : override_redirect +-- +-- %struct : XDestroyWindowEvent : XDestroyWindowEvent arg1 +-- Window : window +-- +-- %struct : XGravityEvent : XGravityEvent arg1 +-- Window : window +-- Position : x +-- Position : y +-- +-- %struct : XMapEvent : XMapEvent arg1 +-- Bool : override_redirect + +type XMappingEvent = + ( MappingRequest -- request + , KeyCode -- first_keycode + , Int -- count + ) +%dis xMappingEvent x = declare {XMappingEvent} x in +% ( mappingRequest {(%x).request} +% , keyCode {(%x).first_keycode} +% , int {(%x).count} +% ) + +type XConfigureEvent = + ( Position + , Position + , Dimension + , Dimension + ) +%dis xConfigureEvent x = +% ( position {(%x).x} +% , position {(%x).y} +% , dimension {(%x).width} +% , dimension {(%x).height} +% ) +%fun get_ConfigureEvent :: XEventPtr -> IO XConfigureEvent +%code +%result (xConfigureEvent {*(XConfigureEvent*)arg1}) + + +-- %struct : XResizeRequestEvent : XResizeRequestEvent arg1 +-- Dimension : width +-- Dimension : height +-- + +-- %struct : XReparentEvent : XReparentEvent arg1 +-- Window : window +-- Window : parent +-- Position : x +-- Position : y +-- Bool : override_redirect +-- +-- %struct : XUnmapEvent : XUnmapEvent arg1 +-- Window : window +-- Bool : from_configure +-- +-- %struct : XVisibilityEvent : XVisibilityEvent arg1 +-- Visibility : state +-- +-- %struct : XCirculateRequestEvent : XCirculateRequestEvent arg1 +-- Place : place +-- +-- -- omitted because valuemask looks tricky +-- -- %struct : XConfigureRequestEvent : XConfigureRequestEvent arg1 +-- -- Window : window +-- -- Position : x +-- -- Position : y +-- -- Dimension : width +-- -- Dimension : height +-- -- Dimension : border_width +-- -- Window : above +-- -- StackingMethod : detail +-- -- ??? : valuemask +-- +-- %struct : XMapRequestEvent : XMapRequestEvent arg1 +-- Window : window +-- +-- %struct : XColormapEvent : XColormapEvent arg1 +-- Colormap : colormap +-- Bool : new +-- ColormapNotification : state +-- +-- -- getClientMessageEvent omitted +-- -- getPropertyEvent omitted +-- -- getSelectionClearEvent omitted +-- -- getSelectionRequestEvent omitted +-- -- getSelectionEvent omitted + +-- functions + +-- The following is useful if you want to do a read with timeout. +-- Returns True if timeout occurs. +%fun waitForEvent :: Display -> Word32 -> IO Bool +%code +% struct timeval timeout; +% fd_set readfds; +% fd_set nofds; +% int fd = ConnectionNumber(arg1); +% int n; +% FD_ZERO(&readfds); +% FD_ZERO(&nofds); +% FD_SET(fd,&readfds); +% timeout.tv_sec = arg2 / 1000000; +% timeout.tv_usec = arg2 % 1000000; +% /* HN 2001-02-06: Select needs to be told highest fd _+_ 1. */ +% n = select(fd+1,&readfds,&nofds,&nofds,&timeout); +%result (bool {n == 0}) + +-- The following is somewhat compatible with Win32's TimeGetTime +gettimeofday_in_milliseconds :: IO Integer +gettimeofday_in_milliseconds = do + (sec,usec) <- gettimeofday_in_milliseconds_internal + return (toInteger sec * 1000 + toInteger usec `div` 1000) + +%fun gettimeofday_in_milliseconds_internal :: IO (Word32,Word32) +%code +% struct timeval tv; +% int rc = gettimeofday(&tv,0); +% res1 = tv.tv_sec; +% res2 = tv.tv_usec; + +%fun XFlush :: Display -> IO () +%fun XSync :: Display -> Bool -> IO () +%fun XPending :: Display -> IO Int +%fun XEventsQueued :: Display -> QueuedMode -> IO Int +%fun XNextEvent :: Display -> XEventPtr -> IO () +%fun XAllowEvents :: Display -> AllowEvents -> Time -> IO () + +-- ToDo: XFree(res1) after constructing result +-- %fun XGetMotionEvents :: Display -> Window -> Time -> Time -> IO ListXTimeCoord +-- %code res1 = XGetMotionEvents(arg1,arg2,arg3,arg4,&res1_size) + +%fun XSelectInput :: Display -> Window -> EventMask -> IO () +%fun XSendEvent :: Display -> Window -> Bool -> EventMask -> XEventPtr -> IO () +%code Status err = XSendEvent(arg1,arg2,arg3,arg4,arg5) +%fail { Success != err }{ BadStatus(err,XSendEvent) } + +%fun XWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO () +%fun XCheckWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO Bool + +%fun XMaskEvent :: Display -> EventMask -> XEventPtr -> IO () +%fun XCheckMaskEvent :: Display -> EventMask -> XEventPtr -> IO Bool +%fun XCheckTypedEvent :: Display -> EventType -> XEventPtr -> IO Bool +%fun XCheckTypedWindowEvent :: Display -> Window -> EventType -> XEventPtr -> IO Bool +%fun XPutBackEvent :: Display -> XEventPtr -> IO () +%fun XPeekEvent :: Display -> XEventPtr -> IO () + +-- XFilterEvent omitted (can't find documentation) +-- XIfEvent omitted (can't pass predicates (yet)) +-- XCheckIfEvent omitted (can't pass predicates (yet)) +-- XPeekIfEvent omitted (can't pass predicates (yet)) + +%fun XRefreshKeyboardMapping :: XMappingEvent -> IO () +%code XRefreshKeyboardMapping(&arg1) + +-- XSynchronize omitted (returns C function) +-- XSetAfterFunction omitted (can't pass functions (yet)) + +---------------------------------------------------------------- +-- Geometry +---------------------------------------------------------------- + +%fun XGeometry :: Display -> Int -> String -> String -> Dimension -> Dimension -> Dimension -> Int -> Int -> IO (Int, Position, Position, Dimension, Dimension) +%code res1 = XGeometry(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,&res2,&res3,&res4,&res5) + +%fun XGetGeometry :: Display -> Int -> Drawable -> IO (Window, Position, Position, Dimension, Dimension, Dimension, Int) +%code Status err = XGetGeometry(arg1,arg2,&res1,&res2,&res3,&res4,&res5,&res6,&res7) +%fail { Success != err }{ BadStatus(err,XGetGeometry) } + +-- XParseGeometry omitted (returned bitset too weird) + +---------------------------------------------------------------- +-- Locale +---------------------------------------------------------------- + +%fun XSupportsLocale :: IO Bool +%fun XSetLocaleModifiers :: String -> IO String + +---------------------------------------------------------------- +-- Screen Saver +---------------------------------------------------------------- + +type AllowExposuresMode = Int +%dis allowExposuresMode x = int x +%const AllowExposuresMode +% [ DontAllowExposures +% , AllowExposures +% , DefaultExposures +% ] + +type PreferBlankingMode = Int +%dis preferBlankingMode x = int x +%const PreferBlankingMode +% [ DontPreferBlanking +% , PreferBlanking +% , DefaultBlanking +% ] + +type ScreenSaverMode = Int +%dis screenSaverMode x = int x +%const ScreenSaverMode +% [ ScreenSaverActive +% , ScreenSaverReset +% ] + +%fun XGetScreenSaver :: Display -> IO (Int, Int, PreferBlankingMode, AllowExposuresMode) +%code XGetScreenSaver(arg1,&res1,&res2,&res3,&res4) + +%fun XSetScreenSaver :: Display -> Int -> Int -> PreferBlankingMode -> AllowExposuresMode -> IO () +%fun XActivateScreenSaver :: Display -> IO () +%fun XResetScreenSaver :: Display -> IO () +%fun XForceScreenSaver :: Display -> ScreenSaverMode -> IO () + + +---------------------------------------------------------------- +-- Pointer +---------------------------------------------------------------- + +%fun XGetPointerControl :: Display -> IO (Int, Int, Int) +%code XGetPointerControl(arg1,&res1,&res2,&res3) + +%fun XWarpPointer :: Display -> Window -> Window -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () + +-- XGetPointerMapping omitted +-- XSetPointerMapping omitted + +---------------------------------------------------------------- +-- Visuals +---------------------------------------------------------------- + +-- XVisualIDFromVisual omitted + + +---------------------------------------------------------------- +-- Threads +---------------------------------------------------------------- + +-- XInitThreads omitted (leary of thread stuff) +-- XLockDisplay omitted (leary of thread stuff) +-- XUnlockDisplay omitted (leary of thread stuff) + +---------------------------------------------------------------- +-- Screen +---------------------------------------------------------------- + +-- Many flags assumed to be PURE. + +%fun XBlackPixelOfScreen :: Screen -> Pixel +%fun XWhitePixelOfScreen :: Screen -> Pixel +%fun XCellsOfScreen :: Screen -> Int +%fun XDefaultColormapOfScreen :: Screen -> Colormap +%fun XDefaultDepthOfScreen :: Screen -> Int +%fun XDefaultGCOfScreen :: Screen -> GC +%fun XDefaultVisualOfScreen :: Screen -> Visual +%fun XDoesBackingStore :: Screen -> Bool +%fun XDoesSaveUnders :: Screen -> Bool +%fun DisplayOfScreen :: Screen -> Display + +-- event mask at connection setup time - not current event mask! +%fun XEventMaskOfScreen :: Screen -> EventMask + +%fun XMinCmapsOfScreen :: Screen -> Int +%fun XMaxCmapsOfScreen :: Screen -> Int +%fun XRootWindowOfScreen :: Screen -> Window +%fun XWidthOfScreen :: Screen -> Dimension +%fun XWidthMMOfScreen :: Screen -> Dimension +%fun XHeightOfScreen :: Screen -> Dimension +%fun XHeightMMOfScreen :: Screen -> Dimension +%fun XPlanesOfScreen :: Screen -> Int +%fun XScreenNumberOfScreen :: Screen -> ScreenNumber + + +---------------------------------------------------------------- +-- Graphics contexts +---------------------------------------------------------------- + +-- Convenience functions + +%fun XSetArcMode :: Display -> GC -> ArcMode -> IO () +%fun XSetBackground :: Display -> GC -> Pixel -> IO () +%fun XSetForeground :: Display -> GC -> Pixel -> IO () +%fun XSetFunction :: Display -> GC -> GXFunction -> IO () +%fun XSetGraphicsExposures :: Display -> GC -> Bool -> IO () +%fun XSetClipMask :: Display -> GC -> Pixmap -> IO () +%fun XSetClipOrigin :: Display -> GC -> Position -> Position -> IO () + +-- XSetClipRectangles omitted because it's not clear when it's safe to delete the +-- array of rectangles + +%fun XSetDashes :: Display -> GC -> Int -> String -> Int -> IO () +%fun XSetFillRule :: Display -> GC -> FillRule -> IO () +%fun XSetFillStyle :: Display -> GC -> FillStyle -> IO () +%fun XSetFont :: Display -> GC -> Font -> IO () +%fun XSetLineAttributes :: Display -> GC -> Int -> LineStyle -> CapStyle -> JoinStyle -> IO () +%fun XSetPlaneMask :: Display -> GC -> Pixel -> IO () +%fun XSetState :: Display -> GC -> Pixel -> Pixel -> GXFunction -> Pixel -> IO () +%fun XSetStipple :: Display -> GC -> Pixmap -> IO () +%fun XSetSubwindowMode :: Display -> GC -> SubWindowMode -> IO () +%fun XSetTSOrigin :: Display -> GC -> Position -> Position -> IO () +%fun XSetTile :: Display -> GC -> Pixmap -> IO () + +-- ToDo: create a real interface to this +%fun XCreateGC :: Display -> Drawable -> IO GC +%code res1 = XCreateGC(arg1,arg2,0,0); + +-- OLD: +-- %synonym : GCValueSet : Ptr +-- in rtsDummy +-- +-- {% +-- typedef unsigned long GCMask; /* cf XtGCMask */ +-- typedef struct _gcvalues { +-- GCMask mask; +-- XGCValues values; +-- }* GCValueSet; +-- %} +-- +-- IMPURE GCValueSet emptyGCValueSet() +-- RESULT: (RETVAL = (GCValueSet) malloc(sizeof(struct _gcvalues))) ? RETVAL->mask = 0, RETVAL : RETVAL; +-- POST: RETVAL != NULL +-- +-- IMPURE void setGCForeground(colour, set) +-- IN Pixel colour +-- IN GCValueSet set +-- RESULT: set->mask |= GCForeground; set->values.foreground = colour +-- +-- IMPURE void setGCBackground(colour, set) +-- IN Pixel colour +-- IN GCValueSet set +-- RESULT: set->mask |= GCBackground; set->values.background = colour +-- +-- IMPURE void freeGCValueSet(set) +-- IN GCValueSet set +-- RESULT: free(set) +-- +-- IMPURE GC XCreateGC(display, d, set->mask, &(set->values)) +-- NAME: xCreateGC +-- IN Display* display +-- IN Drawable d +-- IN GCValueSet set +-- +-- IMPURE void XChangeGC(display, gc, set->mask, &(set->values)) +-- NAME: xChangeGC +-- IN Display* display +-- IN GC gc +-- IN GCValueSet set +-- +-- STARTH +-- -- Code that packages GCValueSets up in a clean monoidic way. +-- +-- data GCSetter = GCSetter (GCValueSet -> IO ()) -- should be newtype +-- +-- createGC :: Display -> Drawable -> GCSetter -> IO GC +-- createGC display d (GCSetter setter) = +-- emptyGCValueSet >>= \ set -> +-- setter set >> +-- xCreateGC display d set >>= \ gc -> +-- freeGCValueSet set >> +-- return gc +-- +-- changeGC :: Display -> Drawable -> GC -> GCSetter -> IO () +-- changeGC display d gc (GCSetter setter) = +-- emptyGCValueSet >>= \ set -> +-- setter set >> +-- xChangeGC display d set >>= \ gc -> +-- freeGCValueSet set +-- +-- instance Monoid GCSetter where +-- (GCSetter m) >>> (GCSetter k) +-- = GCSetter (\ settings -> m settings >> k settings) +-- unit = GCSetter (\ _ -> return ()) +-- +-- set_Background :: Pixel -> GCSetter +-- set_Background c = GCSetter (setGCBackground c) +-- +-- set_Foreground :: Pixel -> GCSetter +-- set_Foreground c = GCSetter (setGCForeground c) +-- ENDH + +%fun XGContextFromGC :: GC -> GContext + +%fun XFreeGC :: Display -> GC -> IO () +%fun XFlushGC :: Display -> GC -> IO () + +%fun XCopyGC :: Display -> GC -> Mask -> GC -> IO () + +---------------------------------------------------------------- +-- Pixmaps +---------------------------------------------------------------- + +%fun XCreatePixmap :: Display -> Drawable -> Dimension -> Dimension -> Int -> IO Pixmap +%fun XFreePixmap :: Display -> Pixmap -> IO () + +-- XCreatePixmapFromBitmapData omitted (type looks strange) + +-- %fun XListPixmapFormatValues = res1 = XListPixmapFormatValues(display, &res1_size) :: Display -> ListXPixmapFormatValues + +---------------------------------------------------------------- +-- Bitmaps +---------------------------------------------------------------- + +-- ToDo: do these need to be available to the programmer? +-- Maybe I could just wire them into all other operations? + +%fun XBitmapBitOrder :: Display -> ByteOrder +%fun XBitmapUnit :: Display -> Int +%fun XBitmapPad :: Display -> Int + +-- ToDo: make sure that initialisation works correctly for x/y_hot +-- omitted +-- IMPURE void XWriteBitmapFile(display, filename, bitmap, width, height, x_hot, y_hot) RAISES Either +-- RETURNTYPE BitmapFileStatus +-- GLOBAL ERROR BitmapFileStatus RETVAL +-- IN Display* display +-- IN String filename +-- IN Pixmap bitmap +-- IN Dimension width +-- IN Dimension height +-- IN Maybe Int x_hot = -1 +-- IN Maybe Int y_hot = -1 +-- POST: RETVAL == BitmapSuccess + +-- omitted +-- IMPURE void XReadBitmapFile(display, d, filename, bitmap, width, height, x_hot, y_hot) RAISES Either +-- RETURNTYPE BitmapFileStatus +-- GLOBAL ERROR BitmapFileStatus RETVAL +-- IN Display* display +-- IN Drawable d +-- IN String filename +-- OUT Pixmap bitmap +-- OUT Dimension width +-- OUT Dimension height +-- OUT Int x_hot RAISES Maybe IF x_hot == -1 +-- OUT Int y_hot RAISES Maybe IF x_hot == -1 +-- POST: RETVAL == BitmapSuccess + +-- XCreateBitmapFromData omitted (awkward looking type) +-- XReadBitmapFileData omitted (awkward looking type) + +---------------------------------------------------------------- +-- Color and Colormaps +---------------------------------------------------------------- + +%fun XLookupColor :: Display -> Colormap -> String -> IO (Color, Color) +%code Status err = XLookupColor(arg1,arg2,arg3,&res1,&res2) +%fail { 0 == err }{ Zero(err,XLookupColor) } +%end free(arg3) + +%fun XAllocNamedColor :: Display -> Colormap -> String -> IO (Color, Color) +%code Status err = XAllocNamedColor(arg1,arg2,arg3,&res1,&res2) +%fail { 0 == err }{ Zero(err,XLookupColor) } +%end free(arg3) + +%fun XAllocColor :: Display -> Colormap -> Color -> IO Color +%code Status err = XAllocColor(arg1,arg2,&arg3) +%fail { 0 == err }{ Zero(err,XLookupColor) } +%result (color {arg3}) + +%fun XParseColor :: Display -> Colormap -> String -> IO Color +%code Status err = XParseColor(arg1,arg2,arg3,&res1) +%fail { 0 == err }{ Zero(err,XLookupColor) } +%end free(arg3) + +-- ToDo: Can't express relationship between arg4 and res1 properly (or arg5, res2) +-- %errfun Zero XAllocColorCells :: Display -> Colormap -> Bool -> Int -> Int -> IO (ListPixel, ListPixel) using err = XAllocColorCells(arg1,arg2,arg3,arg4_size,res1,arg5_size,res2) + +-- ToDo: Can't express relationship between arg4 and res1 properly +-- %errfun Zero XAllocColorPlanes :: Display -> Colormap -> Bool -> Int -> Int -> Int -> Int IO (ListPixel, Pixel, Pixel, Pixel) using err = XAllocColorPlanes(...) + +%fun XFreeColors :: Display -> Colormap -> ListPixel -> Pixel -> IO () +%call (display arg1) (colormap arg2) (listPixel arg3 arg3_size) (pixel arg4) +%code XFreeColors(arg1,arg2,arg3,arg3_size,arg4) +%end free(arg3) + +%fun XStoreColor :: Display -> Colormap -> Color -> IO () +%code XStoreColor(arg1,arg2,&arg3) + +-- %fun XStoreColors :: Display -> Colormap -> ListColor -> IO () +-- %code XStoreColors(arg1,arg2,arg3,arg3_size) +-- %fun XStoreNamedColor :: Display -> Colormap -> String -> Pixel -> PrimaryMask -> IO () + +%fun XQueryColor :: Display -> Colormap -> Color -> IO Color +%code XQueryColor(arg1,arg2,&arg3) +%result (color {arg3}) + +%fun XQueryColors :: Display -> Colormap -> ListColor -> IO ListColor +%call (display arg1) (colormap arg2) (listColor arg3 arg3_size) +%code XQueryColors(arg1,arg2,arg3,arg3_size) +%result (listColor {arg3} {arg3_size}) + +%fun XInstallColormap :: Display -> Colormap -> IO () +%fun XUninstallColormap :: Display -> Colormap -> IO () +%fun XCopyColormapAndFree :: Display -> Colormap -> IO Colormap +%fun XCreateColormap :: Display -> Window -> Visual -> ColormapAlloc -> IO Colormap +%fun XFreeColormap :: Display -> Colormap -> IO () + + +---------------------------------------------------------------- +-- Fonts +---------------------------------------------------------------- + +-- A glyph (or Char2b) is a 16 bit character identification. +-- The top 8 bits are zero in many fonts. +type Glyph = Int +%dis glyph x = int x + +-- Disnae exist: %fun LoadFont :: Display -> String -> IO Font +-- Disnae exist: %fun UnloadFont :: Display -> Font -> IO () + +-- Argument can be a Font or a GContext. +-- But, if it's a GContext, the fontStruct will use the GContext as the +-- FontID - which will cause most things to break so it's probably +-- safer using XGetGCValues to get a genuine font ID +%fun XQueryFont :: Display -> Font -> IO FontStruct + +-- Note that this _WILL NOT WORK_ unless you have explicitly set the font. +-- I'm slowly but surely coming to the conclusion that Xlib is a pile of +-- steaming shit. +%fun FontFromGC :: Display -> GC -> IO Font +%code +% XGCValues ret; +% Status err = XGetGCValues(arg1,arg2,GCFont,&ret); +%fail {Success != err} { BadStatus(rc,FontFromGC) } +%result (font {ret.font}) + +%fun XLoadQueryFont :: Display -> String -> IO FontStruct +%fail {res1==0} { NullPtr(XLoadQueryFont) } + +%fun XFreeFont :: Display -> FontStruct -> IO () +-- %fun XSetFontPath :: Display -> ListString -> IO () using XSetFontPath(arg1,arg2,arg2_size) + +%fun fontFromFontStruct :: FontStruct -> Font +%code res1 = arg1->fid +%fun ascentFromFontStruct :: FontStruct -> Int32 +%code res1 = arg1->ascent +%fun descentFromFontStruct :: FontStruct -> Int32 +%code res1 = arg1->descent + +-- %prim XGetFontPath :: Display -> IO ListString +--Int r_size; +--String* r = XGetFontPath(arg1,&r_size); +-- %update(r); +--XFreeFontPath(r); +--return; + +-- %prim XListFonts :: Display -> String -> Int -> IO ListString +--Int r_size; +--String *r = XListFonts(arg1,arg2,arg3,&r_size); +-- %update(r); +--XFreeFontNames(r); +--return; + +-- XListFontsWithInfo omitted (no support for FontStruct yet) + +-- XQueryTextExtents omitted (no support for CharStruct yet) +-- XQueryTextExtents16 omitted (no support for CharStruct yet) + +-- We marshall this across right away because it's usually one-off info +type CharStruct = + ( Int -- lbearing (origin to left edge of raster) + , Int -- rbearing (origin to right edge of raster) + , Int -- width (advance to next char's origin) + , Int -- ascent (baseline to top edge of raster) + , Int -- descent (baseline to bottom edge of raster) +-- attributes omitted + ) +%dis charStruct x = declare {XCharStruct} x in +% ( int {(%x).lbearing} +% , int {(%x).rbearing} +% , int {(%x).width} +% , int {(%x).ascent} +% , int {(%x).descent} +% ) + + +-- No need to put ths in the IO monad - this info is essentially constant +%fun XTextExtents :: FontStruct -> String -> (FontDirection, Int32, Int32, CharStruct) +%call (fontStruct f) (stringLen s s_len) +%code +% int direction; +% int font_ascent; +% int font_descent; +% XCharStruct cs; +% int rc = XTextExtents(f,s,s_len,&direction,&font_ascent,&font_descent,&cs); +%result ( fontDirection direction +% , int32 font_ascent +% , int32 font_descent +% , charStruct cs +% ) + +-- No need to put ths in the IO monad - this info is essentially constant +%fun XTextWidth :: FontStruct -> String -> Int32 +%call (fontStruct f) (stringLen s s_len) +%code res1 = XTextWidth(f,s,s_len) + +-- XTextExtents16 omitted +-- XTextWidth16 omitted + +-- XGetFontProperty omitted +-- XFreeFontInfo omitted +-- XFreeFontNames omitted + +-- XCreateFontSet omitted (no documentation available) +-- XFreeFontSet omitted (no documentation available) +-- XFontsOfFontSet omitted (no documentation available) +-- XBaseFontNameListOfFontSet omitted (no documentation available) +-- XLocaleOfFontSet omitted (no documentation available) +-- XExtentsOfFontSet omitted (no documentation available) + +-- XContextDependentDrawing omitted +-- XDirectionalDependentDrawing omitted +-- XContextualDrawing omitted + +-- XmbTextEscapement omitted +-- XwcTextEscapement omitted +-- XmbTextExtents omitted +-- XwcTextExtents omitted +-- XmbTextPerCharExtents omitted +-- XwcTextPerCharExtents omitted +-- XmbDrawText omitted +-- XwcDrawText omitted +-- XmbDrawString omitted +-- XwcDrawString omitted +-- XmbDrawImageString omitted +-- XwcDrawImageString omitted + +-- XOpenIM omitted +-- XCloseIM omitted +-- XGetIMValues omitted +-- XSetIMValues omitted +-- DisplayOfIM omitted +-- XLocaleOfIM omitted + +-- XCreateIC omitted +-- XDestroyIC omitted +-- XSetICFocus omitted +-- XUnsetICFocus omitted +-- XwcResetIC omitted +-- XmbResetIC omitted +-- XSetICValues omitted +-- XGetICValues omitted +-- XIMOfIC omitted + +-- XRegisterIMInstantiateCallback omitted +-- XUnregisterIMInstantiateCallback omitted + +-- XInternalConnectionNumbers omitted +-- XProcessInternalConnection omitted +-- XAddConnectionWatch omitted +-- XRemoveConnectionWatch omitted + +-- XmbLookupString omitted +-- XwcLookupString omitted + +---------------------------------------------------------------- +-- Atoms +---------------------------------------------------------------- + +-- AC, 1/9/2000: Added definition for XInternAtom +%fun XInternAtom :: Display -> String -> Bool -> IO Atom + +-- XInternAtoms omitted +-- XGetAtomName omitted +-- XGetAtomNames omitted +-- XConvertSelection omitted +-- XListProperties omitted +-- XChangeProperty omitted +-- XDeleteProperty omitted + +---------------------------------------------------------------- +-- Keycodes +---------------------------------------------------------------- + +%fun XDisplayKeycodes :: Display -> (Int,Int) +%code XDisplayKeycodes(arg1,&res1,&res2) +%fun XLookupKeysym :: XKeyEventPtr -> Int -> IO KeySym +%fun XKeycodeToKeysym :: Display -> KeyCode -> Int -> IO KeySym +%fun XKeysymToKeycode :: Display -> KeySym -> IO KeyCode +%fun XKeysymToString :: KeySym -> String +%fun XStringToKeysym :: String -> KeySym + +-- I should not need to do this: the argument to maybeT below _should_ +-- be treated as a C expression. +%const KeySym [NoSymbol] + +-- I tried to allocate the buffer below on the stack, but that was not a +-- good idea since the unmarshalling takes place in another stack frame. +-- I could use malloc, but then it seems tricky to free _after_ unmarshalling. +-- (%end free(buf) does not work: frees buffer too early.) +-- Making the buffer static works, but is potentially not thread safe. +-- But: the graphics library does not use X in a threadsafe way anyway +-- (does not import/call XInitThreads) and GHC is single threaded as far as +-- the external world is concerned(?). +-- OK, go static for now. Introduce a mutex if needs be. +-- XLookupString cannot handle compose, it seems. +%fun XLookupString :: XKeyEventPtr -> IO (Maybe KeySym, String) +%call (xKeyEventPtr e) +%code static char buf[100]; +% int n; +% KeySym ks; +% n = XLookupString(e, buf, 100, &ks, NULL); +%result (maybeT {noSymbol}(keySym ks), stringLen buf n) -- I meant "NoSymbol". + +-- XQueryKeymap omitted +-- XRebindKeysym omitted +-- XDeleteModifiermapEntry omitted +-- XInsertModifiermapEntry omitted +-- XNewModifiermap omitted +-- XFreeModifiermap omitted +-- XSetModifierMapping omitted +-- XGetModifierMapping omitted +-- XGetKeyboardMapping omitted + +---------------------------------------------------------------- +-- Image +---------------------------------------------------------------- + +-- XCreateImage omitted +-- XInitImage omitted +-- XGetImage omitted +-- XPutImage omitted +-- XGetSubImage omitted + +---------------------------------------------------------------- +-- Icons +---------------------------------------------------------------- + +%fun XGetIconName :: Display -> Window -> IO String +%code Status err = XGetIconName(arg1,arg2,&res1) +%fail { Success != err }{ BadStatus(err,XGetIconName) } + +%fun XSetIconName :: Display -> Window -> String -> IO () + +---------------------------------------------------------------- +-- Cursors +---------------------------------------------------------------- + +%fun XDefineCursor :: Display -> Window -> Cursor -> IO () +%fun XUndefineCursor :: Display -> Window -> IO () + +%fun XCreatePixmapCursor :: Display -> Pixmap -> Pixmap -> Color -> Color -> Dimension -> Dimension -> IO Cursor +%code res1 = XCreatePixmapCursor(arg1,arg2,arg3,&arg4,&arg5,arg6,arg7) + +%fun XCreateGlyphCursor :: Display -> Font -> Font -> Glyph -> Glyph -> Color -> Color -> IO Cursor +%code res1 = XCreateGlyphCursor(arg1,arg2,arg3,arg4,arg5,&arg6,&arg7) + +%fun XCreateFontCursor :: Display -> Glyph -> IO Cursor +%fun XFreeCursor :: Display -> Font -> IO () +%fun XRecolorCursor :: Display -> Cursor -> Color -> Color -> IO () +%code XRecolorCursor(arg1,arg2,&arg3,&arg4) + +---------------------------------------------------------------- +-- Window Manager stuff +---------------------------------------------------------------- + +-- XConfigureWMWindow omitted (can't find documentation) +-- XReconfigureWMWindow omitted (can't find documentation) +-- XWMGeometry omitted (can't find documentation) +-- XGetWMColormapWindows omitted (can't find documentation) +-- XSetWMColormapWindows omitted (can't find documentation) +-- XGetWMProtocols omitted + +-- AC, 1/9/2000: Added definition for XSetWMProtocols +%fun XSetWMProtocols :: Display -> Window -> ListAtom -> IO () +%call (display arg1) (window arg2) (listAtom arg3 arg3_size) +%code XSetWMProtocols(arg1,arg2,arg3,arg3_size) +%end free(arg3) + + +---------------------------------------------------------------- +-- Set Window Attributes +---------------------------------------------------------------- + +-- The following code is based on what you get from the %ptr declaration. +-- ToDo: generate this kind of stuff automatically. + +type XSetWindowAttributesPtr = Ptr Stub_SWA +data Stub_SWA +-- toXSetWindowAttributesPtr :: Addr -> XSetWindowAttributesPtr, +-- fromXSetWindowAttributesPtr :: XSetWindowAttributesPtr -> Ptr +%dis xSetWindowAttributesPtr x = ptr ({XSetWindowAttributes*} x) + +%fun allocXSetWindowAttributes :: IO XSetWindowAttributesPtr +%code res1 = (void*)malloc(sizeof(XSetWindowAttributes)) + + +-- toXSetWindowAttributesPtr x = x +-- fromXSetWindowAttributesPtr x = x +-- +-- instance Pointer XSetWindowAttributesPtr where +-- toPtr = fromXSetWindowAttributesPtr +-- fromPtr = toXSetWindowAttributesPtr +-- alloc = malloc sizeofXSetWindowAttributes +-- plus p x = fromPtr (plusPtr (toPtr p) (x * sizeofXSetWindowAttributes)) +-- minus p q = (toPtr p `minusPtr` toPtr q) `div` sizeofXSetWindowAttributes +-- %}} +-- +-- %type : XSetWindowAttributesPtr : XSetWindowAttributes* arg1 : %pack(Ptr,arg1);% : %unpack(Ptr,arg1,arg2);% +-- +-- %const Int sizeofXSetWindowAttributes = sizeof(XSetWindowAttributes) + +---------------- Access to individual fields ---------------- + +%fun set_background_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () +%code arg1->background_pixmap = arg2; + +%fun set_background_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +%code arg1->background_pixel = arg2; + +%fun set_border_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () +%code arg1->border_pixmap = arg2; + +%fun set_border_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +%code arg1->border_pixel = arg2; + +%fun set_bit_gravity :: XSetWindowAttributesPtr -> BitGravity -> IO () +%code arg1->bit_gravity = arg2; + +%fun set_win_gravity :: XSetWindowAttributesPtr -> WindowGravity -> IO () +%code arg1->win_gravity = arg2; + +%fun set_backing_store :: XSetWindowAttributesPtr -> BackingStore -> IO () +%code arg1->backing_store = arg2; + +%fun set_backing_planes :: XSetWindowAttributesPtr -> Pixel -> IO () +%code arg1->backing_planes = arg2; + +%fun set_backing_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +%code arg1->backing_pixel = arg2; + +%fun set_save_under :: XSetWindowAttributesPtr -> Bool -> IO () +%code arg1->save_under = arg2; + +%fun set_event_mask :: XSetWindowAttributesPtr -> EventMask -> IO () +%code arg1->event_mask = arg2; + +%fun set_do_not_propagate_mask :: XSetWindowAttributesPtr -> EventMask -> IO () +%code arg1->do_not_propagate_mask = arg2; + +%fun set_override_redirect :: XSetWindowAttributesPtr -> Bool -> IO () +%code arg1->override_redirect = arg2; + +%fun set_colormap :: XSetWindowAttributesPtr -> Colormap -> IO () +%code arg1->colormap = arg2; + +%fun set_cursor :: XSetWindowAttributesPtr -> Cursor -> IO () +%code arg1->cursor = arg2; + +---------------------------------------------------------------- +-- Windows +---------------------------------------------------------------- + +%fun XStoreName :: Display -> Window -> String -> IO () +%fun XCreateSimpleWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Int -> Pixel -> Pixel -> IO Window + +%fun XCreateWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> WindowClass -> Visual -> AttributeMask -> XSetWindowAttributesPtr -> IO Window + +---------------------------------------------------------------- + +--ToDo: find an effective way to use Maybes +%fun XTranslateCoordinates :: Display -> Window -> Window -> Position -> Position -> IO (Bool,Position,Position,Window) +%code res1 = XTranslateCoordinates(arg1,arg2,arg3,arg4,arg5,&res2,&res3,&res4) + +%fun XMoveResizeWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> IO () +%fun XResizeWindow :: Display -> Window -> Dimension -> Dimension -> IO () +%fun XMoveWindow :: Display -> Window -> Position -> Position -> IO () +%fun XReparentWindow :: Display -> Window -> Window -> Position -> Position -> IO () +%fun XMapSubwindows :: Display -> Window -> IO () +%fun XUnmapSubwindows :: Display -> Window -> IO () +%fun XMapWindow :: Display -> Window -> IO () +-- Disnae exist: %fun XUnmapWindows :: Display -> Window -> IO () +-- Disnae exist: %fun XMapRaisedWindow :: Display -> Window -> IO () +%fun XLowerWindow :: Display -> Window -> IO () +%fun XRaiseWindow :: Display -> Window -> IO () +%fun XCirculateSubwindowsDown :: Display -> Window -> IO () +%fun XCirculateSubwindowsUp :: Display -> Window -> IO () +%fun XCirculateSubwindows :: Display -> Window -> CirculationDirection -> IO () +%fun XIconifyWindow :: Display -> Window -> ScreenNumber -> IO () +%code Status err = XIconifyWindow(arg1,arg2,arg3) +%fail { Success != err }{ BadStatus(err,XIconifyWindow) } +%fun XWithdrawWindow :: Display -> Window -> ScreenNumber -> IO () +%code Status err = XWithdrawWindow(arg1,arg2,arg3) +%fail { Success != err }{ BadStatus(err,XWithdrawWindow) } +%fun XDestroyWindow :: Display -> Window -> IO () +%fun XDestroySubwindows :: Display -> Window -> IO () + +%fun XSetWindowBorder :: Display -> Window -> Pixel -> IO () +%fun XSetWindowBorderPixmap :: Display -> Window -> Pixmap -> IO () +%fun XSetWindowBorderWidth :: Display -> Window -> Dimension -> IO () +%fun XSetWindowBackground :: Display -> Window -> Pixel -> IO () +%fun XSetWindowBackgroundPixmap :: Display -> Window -> Pixmap -> IO () +%fun XSetWindowColormap :: Display -> Window -> Colormap -> IO () + +%fun XAddToSaveSet :: Display -> Window -> IO () +%fun XRemoveFromSaveSet :: Display -> Window -> IO () +%fun XChangeSaveSet :: Display -> Window -> ChangeSaveSetMode -> IO () + +%fun XClearWindow :: Display -> Window -> IO () +%fun XClearArea :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Bool -> IO () + +-- -- This is almost good enough - but doesn't call XFree +-- -- %errfun BadStatus XQueryTree :: Display -> Window -> IO (Window, Window, ListWindow) using err = XQueryTree(arg1,arg2,&res1,&res2,&res3,&res3_size) +-- %prim XQueryTree :: Display -> Window -> IO (Window, Window, ListWindow) +-- Window root_w, parent; +-- Int children_size; +-- Window *children; +-- Status r = XQueryTree(arg1,arg2,&root_w, &parent, &children, &children_size); +-- if (Success != r) { %failWith(BadStatus,r); } +-- %update(root_w,parent,children); +-- XFree(children); +-- return; + +%fun XRestackWindows :: Display -> ListWindow -> IO () +%call (display arg1) (listWindow arg2 arg2_size) +%code XRestackWindows(arg1, arg2, arg2_size) + +-- -- ToDo: I want to be able to write this +-- -- %fun XListInstalledColormaps :: Display -> Window -> IO ListColormap using res1 = XListInstalledColormaps(arg1,arg2,&res1_size) +-- -- But I have to write this instead - need to add a notion of cleanup code! +-- %prim XListInstalledColormaps :: Display -> Window -> IO ListColormap +-- Int r_size; +-- Colormap* r = XListInstalledColormaps(arg1,arg2,&r_size); +-- %update(r); +-- XFree(r); +-- return; +-- +-- -- Again, this is almost good enough +-- -- %errfun BadStatus XGetCommand :: Display -> Window -> IO ListString using err = XGetCommand(arg1,arg2,&res1,&res1_size) +-- -- but not quite +-- -- %prim XGetCommand :: Display -> Window -> IO ListString +-- --Int argv_size; +-- --String *argv; +-- --Status r = XGetCommand(arg1,arg2,&argv,&argv_size); +-- --if (Success != r) { %failWith(BadStatus, r); } +-- -- %update(argv); +-- --XFreeStringList(argv); +-- --return; +-- +-- -- %fun XSetCommand :: Display -> Window -> ListString -> IO () using XSetCommand(arg1,arg2,arg3,res3_size) +-- +-- %errfun BadStatus XGetTransientForHint :: Display -> Window -> IO Window using err = XGetTransientForHint(arg1,arg2,&res1) +-- +-- %fun XSetTransientForHint :: Display -> Window -> Window -> IO () +-- +-- -- XRotateWindowProperties omitted +-- -- XGetWindowProperty omitted +-- +-- -- XGetWindowAttributes omitted +-- -- XChangeWindowAttributes omitted + +---------------------------------------------------------------- +-- Drawing +---------------------------------------------------------------- + +%fun XDrawPoint :: Display -> Drawable -> GC -> Position -> Position -> IO () + +%fun XDrawPoints :: Display -> Drawable -> GC -> ListPoint -> CoordinateMode -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (coordinateMode arg5) +%code XDrawPoints(arg1,arg2,arg3,arg4,arg4_size,arg5) +%end free(arg4) + +%fun XDrawLine :: Display -> Drawable -> GC -> Position -> Position -> Position -> Position -> IO () + +%fun XDrawLines :: Display -> Drawable -> GC -> ListPoint -> CoordinateMode -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (coordinateMode arg5) +%code XDrawLines(arg1,arg2,arg3,arg4,arg4_size,arg5) +%end free(arg4) + +%fun XDrawSegments :: Display -> Drawable -> GC -> ListSegment -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listSegment arg4 arg4_size) +%code XDrawSegments(arg1,arg2,arg3,arg4,arg4_size) +%end free(arg4) + +%fun XDrawRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () + +%fun XDrawRectangles :: Display -> Drawable -> GC -> ListRectangle -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listRectangle arg4 arg4_size) +%code XDrawRectangles(arg1,arg2,arg3,arg4,arg4_size) +%end free(arg4) + +%fun XDrawArc :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> IO () + +%fun XDrawArcs :: Display -> Drawable -> GC -> ListArc -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listArc arg4 arg4_size) +%code XDrawArcs(arg1,arg2,arg3,arg4,arg4_size) +%end free(arg4) + +%fun XFillRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () + +%fun XFillRectangles :: Display -> Drawable -> GC -> ListRectangle -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listRectangle arg4 arg4_size) +%code XFillRectangles(arg1,arg2,arg3,arg4,arg4_size) +%end free(arg4) + +%fun XFillPolygon :: Display -> Drawable -> GC -> ListPoint -> PolygonShape -> CoordinateMode -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (polygonShape arg5) (coordinateMode arg6) +%code XFillPolygon(arg1,arg2,arg3,arg4,arg4_size,arg5,arg6) +%end free(arg4) + +%fun XFillArc :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> IO () + +%fun XFillArcs :: Display -> Drawable -> GC -> ListArc -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listArc arg4 arg4_size) +%code XFillArcs(arg1,arg2,arg3,arg4,arg4_size) +%end free(arg4) + +%fun XCopyArea :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () +%fun XCopyPlane :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> Pixel -> IO () + +-- draw characters over existing background +%fun XDrawString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (position arg4) (position arg5) (stringLen arg6 arg6_size) +%code XDrawString(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size) +%end free(arg6) + +-- draw characters over a blank rectangle of current background colour +%fun XDrawImageString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (position arg4) (position arg5) (stringLen arg6 arg6_size) +%code XDrawImageString(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size) +%end free(arg6) + +-- XDrawString16 omitted (16bit chars not supported) +-- XDrawImageString16 omitted (16bit chars not supported) +-- XDrawText omitted (XTextItem not supported) +-- XDrawText16 omitted (XTextItem not supported) + +---------------------------------------------------------------- +-- Cut and paste buffers +---------------------------------------------------------------- + +%fun XStoreBuffer :: Display -> String -> Int -> IO () +%call (display arg1) (stringLen arg2 arg2_size) (int arg3) +%code Status err = XStoreBuffer(arg1,arg2,arg2_size,arg3); +%fail { Success != err }{ BadStatus(err,XStoreBuffer) } + +%fun XStoreBytes :: Display -> String -> IO () +%call (display arg1) (stringLen arg2 arg2_size) +%code Status err = XStoreBytes(arg1,arg2,arg2_size); +%fail { Success != err }{ BadStatus(err,XStoreBytes) } + +%fun XFetchBuffer :: Display -> Int -> IO String +%code +% int nbytes; +% char* res1 = XFetchBuffer(arg1, &nbytes, arg2); +%fail { res1 != NULL }{ NullPtr(XFetchBuffer) } +%result (stringLen res1 nbytes) +%end XFree(res1) + +%fun XFetchBytes :: Display -> IO String +%code +% int nbytes; +% char* res1 = XFetchBytes(arg1, &nbytes); +%fail { res1 != NULL }{ NullPtr(XFetchBytes) } +%result (stringLen res1 nbytes) +%end XFree(res1) + +%fun XRotateBuffers :: Display -> Int -> IO () +%code Status err = XRotateBuffers(arg1,arg2) +%fail { Success != err }{ BadStatus(err,XRotateBuffers) } + +---------------------------------------------------------------- +-- Atoms +---------------------------------------------------------------- + +%const Atom +% [ XA_PRIMARY +% , XA_SECONDARY +% , XA_ARC +% , XA_ATOM +% , XA_BITMAP +% , XA_CARDINAL +% , XA_COLORMAP +% , XA_CURSOR +% , XA_CUT_BUFFER0 +% , XA_CUT_BUFFER1 +% , XA_CUT_BUFFER2 +% , XA_CUT_BUFFER3 +% , XA_CUT_BUFFER4 +% , XA_CUT_BUFFER5 +% , XA_CUT_BUFFER6 +% , XA_CUT_BUFFER7 +% , XA_DRAWABLE +% , XA_FONT +% , XA_INTEGER +% , XA_PIXMAP +% , XA_POINT +% , XA_RECTANGLE +% , XA_RESOURCE_MANAGER +% , XA_RGB_COLOR_MAP +% , XA_RGB_BEST_MAP +% , XA_RGB_BLUE_MAP +% , XA_RGB_DEFAULT_MAP +% , XA_RGB_GRAY_MAP +% , XA_RGB_GREEN_MAP +% , XA_RGB_RED_MAP +% , XA_STRING +% , XA_VISUALID +% , XA_WINDOW +% , XA_WM_COMMAND +% , XA_WM_HINTS +% , XA_WM_CLIENT_MACHINE +% , XA_WM_ICON_NAME +% , XA_WM_ICON_SIZE +% , XA_WM_NAME +% , XA_WM_NORMAL_HINTS +% , XA_WM_SIZE_HINTS +% , XA_WM_ZOOM_HINTS +% , XA_MIN_SPACE +% , XA_NORM_SPACE +% , XA_MAX_SPACE +% , XA_END_SPACE +% , XA_SUPERSCRIPT_X +% , XA_SUPERSCRIPT_Y +% , XA_SUBSCRIPT_X +% , XA_SUBSCRIPT_Y +% , XA_UNDERLINE_POSITION +% , XA_UNDERLINE_THICKNESS +% , XA_STRIKEOUT_ASCENT +% , XA_STRIKEOUT_DESCENT +% , XA_ITALIC_ANGLE +% , XA_X_HEIGHT +% , XA_QUAD_WIDTH +% , XA_WEIGHT +% , XA_POINT_SIZE +% , XA_RESOLUTION +% , XA_COPYRIGHT +% , XA_NOTICE +% , XA_FONT_NAME +% , XA_FAMILY_NAME +% , XA_FULL_NAME +% , XA_CAP_HEIGHT +% , XA_WM_CLASS +% , XA_WM_TRANSIENT_FOR +% , XA_LAST_PREDEFINED +% ] + +---------------------------------------------------------------- +-- Window properties +---------------------------------------------------------------- + +%fun XSetTextProperty :: Display -> Window -> String -> Atom -> IO () +%call (display arg1) (window arg2) (stringLen arg3 arg3_size) (atom arg4) +%code +% XTextProperty p = { arg3, XA_STRING, 8, arg3_size }; +% XSetTextProperty(arg1,arg2,&p,arg4); +%end free(arg3) + +-- %fun XSetStandardProperties :: Display -> Window -> String -> String -> Pixmap -> [String] -> XSizeHints -> IO () +-- %code Status err = XSetStandardProperties(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size,&arg7) +-- %fail { Success != err }{ BadStatus(err,XSetStandardProperties) } + +---------------------------------------------------------------- +-- Regions +---------------------------------------------------------------- + +type RectInRegionResult = Int +%dis rectInRegionResult x = int x + +-- Return values from XRectInRegion() +%const RectInRegionResult +% [ RectangleOut +% , RectangleIn +% , RectanglePart +% ] + +-- regions deallocation is handled by the GC (ForeignObj magic) +-- so we don't provide XDestroyRegion explicitly +-- no idea what the int is for +-- %fun XDestroyRegion :: Region -> IO Int + +---------------------------------------------------------------- +-- Creating regions +---------------------------------------------------------------- + +-- an empty region +-- (often used as "out argument" to binary operators which return regions) +%fun XCreateRegion :: IO Region + +%fun XPolygonRegion :: ListPoint -> FillRule -> IO Region +%call (listPoint arg1 arg2) (fillRule arg3) + +---------------------------------------------------------------- +-- Combining Regions +-- +-- The usual shoddy state of Xlib documentation fails to mention +-- what the Int is for. +-- +-- All operations overwrite the region in their third argument +-- which is usually a freshly created region. +---------------------------------------------------------------- + +%fun XIntersectRegion :: Region -> Region -> Region -> IO Int +%fun XSubtractRegion :: Region -> Region -> Region -> IO Int +%fun XUnionRectWithRegion :: Rectangle -> Region -> Region -> IO Int +%code res1 = XUnionRectWithRegion(&arg1,arg2,arg3) +%fun XUnionRegion :: Region -> Region -> Region -> IO Int +%fun XXorRegion :: Region -> Region -> Region -> IO Int + +---------------------------------------------------------------- +-- Examining regions (tests, bounding boxes, etc) +---------------------------------------------------------------- + +%fun XEmptyRegion :: Region -> IO Bool +%fun XEqualRegion :: Region -> Region -> IO Bool +%fun XPointInRegion :: Region -> Point -> IO Bool +%code res1 = XPointInRegion(arg1,arg2.x,arg2.y) +%fun XRectInRegion :: Region -> Rectangle -> IO RectInRegionResult +%code res1 = XRectInRegion(arg1,arg2.x,arg2.y,arg2.width,arg2.height) + +-- I have no idea what the int is for +%fun XClipBox :: Region -> IO (Rectangle,Int) +%code res2 = XClipBox(arg1,&res1) + +---------------------------------------------------------------- +-- Modifying regions +-- (If you use any of these, you can't make regions look like +-- first class data structures.) +---------------------------------------------------------------- + +-- translate region +%fun XOffsetRegion :: Region -> Point -> IO Int +%code res1 = XOffsetRegion(arg1,arg2.x,arg2.y) + +-- increase size of region by +ve or -ve number of pixels +-- while preserving the centre of the region (ie half the pixels +-- come off the left, and half off the right) +%fun XShrinkRegion :: Region -> Point -> IO Int +%code res1 = XShrinkRegion(arg1,arg2.x,arg2.y) + +---------------------------------------------------------------- +-- Graphics Context +---------------------------------------------------------------- + +-- set clip mask of GC +%fun XSetRegion :: Display -> GC -> Region -> IO Int + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11.hs 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11 +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A Haskell binding for the X11 libraries. +-- +----------------------------------------------------------------------------- + +module Graphics.X11 + ( module Graphics.X11.Types + , module Graphics.X11.Xlib + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Makefile 1 +# ----------------------------------------------------------------------------- +# $Id: Makefile,v 1.1 2003/04/03 23:44:01 reid Exp $ + +TOP = .. +include $(TOP)/mk/boilerplate.mk + +# ----------------------------------------------------------------------------- + +# SUBDIRS = include + +ALL_DIRS = \ + Graphics/X11 + +PACKAGE = X11 +PACKAGE_DEPS = base + +SRC_HC_OPTS += -Wall -fffi -cpp -fglasgow-exts +GC_OPTS += --target=ffi + +SRC_HADDOCK_OPTS += -t "X11 Libraries (X11 package)" + +# yeuch, have to get X11_CFLAGS & X11_LIBS in through CPP to X11.conf.in +comma = , +PACKAGE_CPP_OPTS += -DX11_CFLAGS='$(patsubst %,$(comma)"%",$(X11_CFLAGS))' +PACKAGE_CPP_OPTS += -DX11_LIBS='$(patsubst %,$(comma)"%",$(X11_LIBS))' + +# ----------------------------------------------------------------------------- + +include $(TOP)/mk/target.mk hunk ./X11.conf.in 1 +#include "config.h" + +Package { + name = "X11", + auto = True, +#ifdef INSTALLING + import_dirs = [ "$libdir/imports/X11" ], +#else + import_dirs = [ "$libdir/libraries/X11" ], +#endif + source_dirs = [], +#ifdef INSTALLING + library_dirs = [ "$libdir" ], +#else + library_dirs = [ "$libdir/libraries/X11" ], +#endif + hs_libraries = [ "HSX11" ], + extra_libraries = [ "HSX11_cbits" ], +#ifdef INSTALLING + include_dirs = [], +#else + include_dirs = [ "$libdir/libraries/X11/include" ], +#endif + c_includes = [ "HsX11.h" ], + package_deps = [ "base" ], + extra_ghc_opts = [], + extra_cc_opts = [ "" X11_CFLAGS ], + extra_ld_opts = [ "" X11_LIBS ] +} hunk ./cbits/Makefile 1 +# ----------------------------------------------------------------------------- +# $Id: Makefile,v 1.1 2003/04/03 23:44:03 reid Exp $ +# +# (c) The GHC Team, 1999 +# + +TOP=../.. +include $(TOP)/mk/boilerplate.mk + +PACKAGE = xlib +IS_CBITS_LIB = YES +INSTALL_DATAS+=HsXlib.h + +include $(TOP)/mk/target.mk hunk ./cbits/auxiliaries.c 1 +#include +#include +#include + +int defaultErrorHandler(Display *d, XErrorEvent *ev) +{ + char buffer[1000]; + XGetErrorText(d,ev->error_code,buffer,1000); + printf("Error: %s\n", buffer); + return 0; +} hunk ./include/HsXlib.h 1 +/* ----------------------------------------------------------------------------- + * $Id: HsXlib.h,v 1.1 2003/04/03 23:44:04 reid Exp $ + * + * Definitions for package `lang' which are visible in Haskell land. + * + * ---------------------------------------------------------------------------*/ + +#ifndef HSXLIB_H +#define HSXLIB_H + +#include +#include +#include +#include +#include + +#define XK_MISCELLANY +#define XK_LATIN1 +#include + +/* These macros are used to generate error messages in GreenCard code */ +#define ErrorMsg(where,what) "Error " what " raised in function " #where + +#define NullPtr(where) ErrorMsg(where,"null ptr") +#define BadStatus(err,where) ErrorMsg(where,"bad status") +#define Zero(err,where) ErrorMsg(where,"zero") + +/* AllPlanes is a macro so we can't call it. + * For now we can get round this by defining a macro that looks like + * it is a function. (Slightly illegal under the ffi spec.) + */ +#define AllPlanes_aux() AllPlanes + +/* This error handler is used from GreenCard code. + * It generates a slightly better error message than the one + * that comes with Xlib. + */ +extern int defaultErrorHandler(Display *, XErrorEvent *); + +/* Used in waitForTimeout */ +#include +#include +#include + +#endif hunk ./Graphics/X11/StdDIS.gc 41 -import Int( Int8, Int16, Int32, Int64 ) -import Word( Word8, Word16, Word32, Word64 ) hunk ./Graphics/X11/StdDIS.gc 42 -import Foreign ( StablePtr, newStablePtr, deRefStablePtr, freeStablePtr, - ForeignPtr, newForeignPtr, withForeignPtr, - Ptr, FunPtr - ) -import CString -import MarshalAlloc( malloc, free ) +import Foreign( + StablePtr, newStablePtr, deRefStablePtr, freeStablePtr, + ForeignPtr, newForeignPtr, withForeignPtr, + Ptr, FunPtr, + Int8, Int16, Int32, Int64, + Word8, Word16, Word32, Word64, + malloc, free + ) +import Foreign.C.String( + CString, + newCString, newCStringLen, + peekCString, peekCStringLen + ) hunk ./Graphics/X11/Types.gc 16 - ( module Graphics.X11.Types + ( + + XID, + Mask, + Atom, + VisualID, + Time, + Window, + Drawable, + Font, + Pixmap, + Cursor, + Colormap, + GContext, + KeySym, + + KeyCode, + xK_VoidSymbol, + xK_BackSpace, + xK_Tab, + xK_Linefeed, + xK_Clear, + xK_Return, + xK_Pause, + xK_Scroll_Lock, + xK_Sys_Req, + xK_Escape, + xK_Delete, + xK_Multi_key, + xK_Home, + xK_Left, + xK_Up, + xK_Right, + xK_Down, + xK_Prior, + xK_Page_Up, + xK_Next, + xK_Page_Down, + xK_End, + xK_Begin, + xK_Select, + xK_Print, + xK_Execute, + xK_Insert, + xK_Undo, + xK_Redo, + xK_Menu, + xK_Find, + xK_Cancel, + xK_Help, + xK_Break, + xK_Mode_switch, + xK_script_switch, + xK_Num_Lock, + xK_KP_Space, + xK_KP_Tab, + xK_KP_Enter, + xK_KP_F1, + xK_KP_F2, + xK_KP_F3, + xK_KP_F4, + xK_KP_Home, + xK_KP_Left, + xK_KP_Up, + xK_KP_Right, + xK_KP_Down, + xK_KP_Prior, + xK_KP_Page_Up, + xK_KP_Next, + xK_KP_Page_Down, + xK_KP_End, + xK_KP_Begin, + xK_KP_Insert, + xK_KP_Delete, + xK_KP_Equal, + xK_KP_Multiply, + xK_KP_Add, + xK_KP_Separator, + xK_KP_Subtract, + xK_KP_Decimal, + xK_KP_Divide, + xK_KP_0, + xK_KP_1, + xK_KP_2, + xK_KP_3, + xK_KP_4, + xK_KP_5, + xK_KP_6, + xK_KP_7, + xK_KP_8, + xK_KP_9, + xK_F1, + xK_F2, + xK_F3, + xK_F4, + xK_F5, + xK_F6, + xK_F7, + xK_F8, + xK_F9, + xK_F10, + xK_F11, + xK_L1, + xK_F12, + xK_L2, + xK_F13, + xK_L3, + xK_F14, + xK_L4, + xK_F15, + xK_L5, + xK_F16, + xK_L6, + xK_F17, + xK_L7, + xK_F18, + xK_L8, + xK_F19, + xK_L9, + xK_F20, + xK_L10, + xK_F21, + xK_R1, + xK_F22, + xK_R2, + xK_F23, + xK_R3, + xK_F24, + xK_R4, + xK_F25, + xK_R5, + xK_F26, + xK_R6, + xK_F27, + xK_R7, + xK_F28, + xK_R8, + xK_F29, + xK_R9, + xK_F30, + xK_R10, + xK_F31, + xK_R11, + xK_F32, + xK_R12, + xK_F33, + xK_R13, + xK_F34, + xK_R14, + xK_F35, + xK_R15, + xK_Shift_L, + xK_Shift_R, + xK_Control_L, + xK_Control_R, + xK_Caps_Lock, + xK_Shift_Lock, + xK_Meta_L, + xK_Meta_R, + xK_Alt_L, + xK_Alt_R, + xK_Super_L, + xK_Super_R, + xK_Hyper_L, + xK_Hyper_R, + xK_space, + xK_exclam, + xK_quotedbl, + xK_numbersign, + xK_dollar, + xK_percent, + xK_ampersand, + xK_apostrophe, + xK_quoteright, + xK_parenleft, + xK_parenright, + xK_asterisk, + xK_plus, + xK_comma, + xK_minus, + xK_period, + xK_slash, + xK_0, + xK_1, + xK_2, + xK_3, + xK_4, + xK_5, + xK_6, + xK_7, + xK_8, + xK_9, + xK_colon, + xK_semicolon, + xK_less, + xK_equal, + xK_greater, + xK_question, + xK_at, + xK_A, + xK_B, + xK_C, + xK_D, + xK_E, + xK_F, + xK_G, + xK_H, + xK_I, + xK_J, + xK_K, + xK_L, + xK_M, + xK_N, + xK_O, + xK_P, + xK_Q, + xK_R, + xK_S, + xK_T, + xK_U, + xK_V, + xK_W, + xK_X, + xK_Y, + xK_Z, + xK_bracketleft, + xK_backslash, + xK_bracketright, + xK_asciicircum, + xK_underscore, + xK_grave, + xK_quoteleft, + xK_a, + xK_b, + xK_c, + xK_d, + xK_e, + xK_f, + xK_g, + xK_h, + xK_i, + xK_j, + xK_k, + xK_l, + xK_m, + xK_n, + xK_o, + xK_p, + xK_q, + xK_r, + xK_s, + xK_t, + xK_u, + xK_v, + xK_w, + xK_x, + xK_y, + xK_z, + xK_braceleft, + xK_bar, + xK_braceright, + xK_asciitilde, + xK_nobreakspace, + xK_exclamdown, + xK_cent, + xK_sterling, + xK_currency, + xK_yen, + xK_brokenbar, + xK_section, + xK_diaeresis, + xK_copyright, + xK_ordfeminine, + xK_guillemotleft, + xK_notsign, + xK_hyphen, + xK_registered, + xK_macron, + xK_degree, + xK_plusminus, + xK_twosuperior, + xK_threesuperior, + xK_acute, + xK_mu, + xK_paragraph, + xK_periodcentered, + xK_cedilla, + xK_onesuperior, + xK_masculine, + xK_guillemotright, + xK_onequarter, + xK_onehalf, + xK_threequarters, + xK_questiondown, + xK_Agrave, + xK_Aacute, + xK_Acircumflex, + xK_Atilde, + xK_Adiaeresis, + xK_Aring, + xK_AE, + xK_Ccedilla, + xK_Egrave, + xK_Eacute, + xK_Ecircumflex, + xK_Ediaeresis, + xK_Igrave, + xK_Iacute, + xK_Icircumflex, + xK_Idiaeresis, + xK_ETH, + xK_Eth, + xK_Ntilde, + xK_Ograve, + xK_Oacute, + xK_Ocircumflex, + xK_Otilde, + xK_Odiaeresis, + xK_multiply, + xK_Ooblique, + xK_Ugrave, + xK_Uacute, + xK_Ucircumflex, + xK_Udiaeresis, + xK_Yacute, + xK_THORN, + xK_Thorn, + xK_ssharp, + xK_agrave, + xK_aacute, + xK_acircumflex, + xK_atilde, + xK_adiaeresis, + xK_aring, + xK_ae, + xK_ccedilla, + xK_egrave, + xK_eacute, + xK_ecircumflex, + xK_ediaeresis, + xK_igrave, + xK_iacute, + xK_icircumflex, + xK_idiaeresis, + xK_eth, + xK_ntilde, + xK_ograve, + xK_oacute, + xK_ocircumflex, + xK_otilde, + xK_odiaeresis, + xK_division, + xK_oslash, + xK_ugrave, + xK_uacute, + xK_ucircumflex, + xK_udiaeresis, + xK_yacute, + xK_thorn, + xK_ydiaeresis, + + EventMask, + noEventMask, + keyPressMask, + keyReleaseMask, + buttonPressMask, + buttonReleaseMask, + enterWindowMask, + leaveWindowMask, + pointerMotionMask, + pointerMotionHintMask, + button1MotionMask, + button2MotionMask, + button3MotionMask, + button4MotionMask, + button5MotionMask, + buttonMotionMask, + keymapStateMask, + exposureMask, + visibilityChangeMask, + structureNotifyMask, + resizeRedirectMask, + substructureNotifyMask, + substructureRedirectMask, + focusChangeMask, + propertyChangeMask, + colormapChangeMask, + ownerGrabButtonMask, + + EventType, + keyPress, + keyRelease, + buttonPress, + buttonRelease, + motionNotify, + enterNotify, + leaveNotify, + focusIn, + focusOut, + keymapNotify, + expose, + graphicsExpose, + noExpose, + visibilityNotify, + createNotify, + destroyNotify, + unmapNotify, + mapNotify, + mapRequest, + reparentNotify, + configureNotify, + configureRequest, + gravityNotify, + resizeRequest, + circulateNotify, + circulateRequest, + propertyNotify, + selectionClear, + selectionRequest, + selectionNotify, + colormapNotify, + clientMessage, + mappingNotify, + lASTEvent, + + Modifier, + shiftMapIndex, + lockMapIndex, + controlMapIndex, + mod1MapIndex, + mod2MapIndex, + mod3MapIndex, + mod4MapIndex, + mod5MapIndex, + anyModifier, + + KeyMask, + shiftMask, + lockMask, + controlMask, + mod1Mask, + mod2Mask, + mod3Mask, + mod4Mask, + mod5Mask, + + ButtonMask, + button1Mask, + button2Mask, + button3Mask, + button4Mask, + button5Mask, + + Button, + button1, + button2, + button3, + button4, + button5, + + NotifyMode, + notifyNormal, + notifyGrab, + notifyUngrab, + notifyWhileGrabbed, + notifyHint, + + NotifyDetail, + notifyAncestor, + notifyVirtual, + notifyInferior, + notifyNonlinear, + notifyNonlinearVirtual, + notifyPointer, + notifyPointerRoot, + notifyDetailNone, + + Visibility, + visibilityUnobscured, + visibilityPartiallyObscured, + visibilityFullyObscured, + + Place, + placeOnTop, + placeOnBottom, + + Protocol, + familyInternet, + familyDECnet, + familyChaos, + + PropertyNotification, + propertyNewValue, + propertyDelete, + + ColormapNotification, + colormapUninstalled, + colormapInstalled, + + GrabMode, + grabModeSync, + grabModeAsync, + + GrabStatus, + grabSuccess, + alreadyGrabbed, + grabInvalidTime, + grabNotViewable, + grabFrozen, + + AllowEvents, + asyncPointer, + syncPointer, + replayPointer, + asyncKeyboard, + syncKeyboard, + replayKeyboard, + asyncBoth, + syncBoth, + + FocusMode, + revertToNone, + revertToPointerRoot, + revertToParent, + + Status, + success, + badRequest, + badValue, + badWindow, + badPixmap, + badAtom, + badCursor, + badFont, + badMatch, + badDrawable, + badAccess, + badAlloc, + badColor, + badGC, + badIDChoice, + badName, + badLength, + badImplementation, + firstExtensionError, + lastExtensionError, + + WindowClass, + copyFromParent, + inputOutput, + inputOnly, + + AttributeMask, + cWBackPixmap, + cWBackPixel, + cWBorderPixmap, + cWBorderPixel, + cWBitGravity, + cWWinGravity, + cWBackingStore, + cWBackingPlanes, + cWBackingPixel, + cWOverrideRedirect, + cWSaveUnder, + cWEventMask, + cWDontPropagate, + cWColormap, + cWCursor, + + CloseDownMode, + destroyAll, + retainPermanent, + retainTemporary, + + QueryBestSizeClass, + cursorShape, + tileShape, + stippleShape, + + GXFunction, + gXclear, + gXand, + gXandReverse, + gXcopy, + gXandInverted, + gXnoop, + gXxor, + gXor, + gXnor, + gXequiv, + gXinvert, + gXorReverse, + gXcopyInverted, + gXorInverted, + gXnand, + gXset, + + LineStyle, + lineSolid, + lineOnOffDash, + lineDoubleDash, + + CapStyle, + capNotLast, + capButt, + capRound, + capProjecting, + + JoinStyle, + joinMiter, + joinRound, + joinBevel, + + FillStyle, + fillSolid, + fillTiled, + fillStippled, + fillOpaqueStippled, + + FillRule, + evenOddRule, + windingRule, + + SubWindowMode, + clipByChildren, + includeInferiors, + + CoordinateMode, + coordModeOrigin, + coordModePrevious, + + PolygonShape, + complex, + nonconvex, + convex, + + ArcMode, + arcChord, + arcPieSlice, + + GCMask, + gCFunction, + gCPlaneMask, + gCForeground, + gCBackground, + gCLineWidth, + gCLineStyle, + gCCapStyle, + gCJoinStyle, + gCFillStyle, + gCFillRule, + gCTile, + gCStipple, + gCTileStipXOrigin, + gCTileStipYOrigin, + gCFont, + gCSubwindowMode, + gCGraphicsExposures, + gCClipXOrigin, + gCClipYOrigin, + gCClipMask, + gCDashOffset, + gCDashList, + gCArcMode, + gCLastBit, + + CirculationDirection, + raiseLowest, + lowerHighest, + + ByteOrder, + lSBFirst, + mSBFirst, + + ColormapAlloc, + allocNone, + allocAll, + + MappingRequest, + mappingModifier, + mappingKeyboard, + mappingPointer, + + ChangeSaveSetMode, + setModeInsert, + setModeDelete, + + BitGravity, + forgetGravity, + northWestGravity, + northGravity, + northEastGravity, + westGravity, + centerGravity, + eastGravity, + southWestGravity, + southGravity, + southEastGravity, + staticGravity, + + WindowGravity, + unmapGravity, + + BackingStore, + notUseful, + whenMapped, + always, + doRed, + doGreen, + doBlue, + + FontDirection, + fontLeftToRight, + fontRightToLeft, + hunk ./Graphics/X11/Xlib.gc 16 - ( module Graphics.X11.Types - , module Graphics.X11.Xlib - , free + ( module Graphics.X11.Types, + free, + + Pixel, + Position, + Dimension, + ScreenNumber, + Byte, + Buffer, + Display, + Screen, + Visual, + FontStruct, + Region, + GC, + Point, + Segment, + Rectangle, + Arc, + Color, + ListPoint, + ListRectangle, + ListArc, + ListSegment, + ListColor, + ListPixel, + ListWindow, + ListAtom, + allPlanes_aux, + blackPixel, + whitePixel, + connectionNumber, + defaultColormap, + defaultGC, + defaultDepth, + defaultScreen, + defaultScreenOfDisplay, + displayHeight, + displayHeightMM, + displayWidth, + displayWidthMM, + maxRequestSize, + displayMotionBufferSize, + resourceManagerString, + screenResourceString, + displayString, + imageByteOrder, + protocolRevision, + protocolVersion, + serverVendor, + screenCount, + defaultVisual, + displayCells, + displayPlanes, + screenOfDisplay, + defaultRootWindow, + rootWindow, + qLength, + noOp, + openDisplay, + closeDisplay, + rmInitialize, + autoRepeatOff, + autoRepeatOn, + bell, + setCloseDownMode, + lastKnownRequestProcessed, + getInputFocus, + setInputFocus, + grabButton, + ungrabButton, + grabPointer, + ungrabPointer, + grabKey, + ungrabKey, + grabKeyboard, + ungrabKeyboard, + grabServer, + ungrabServer, + queryBestTile, + queryBestStipple, + queryBestCursor, + queryBestSize, + queryPointer, + displayName, + setDefaultErrorHandler, + QueuedMode, + queuedAlready, + queuedAfterFlush, + queuedAfterReading, + XEvent, + XEventPtr, + allocXEvent, + get_EventType, + get_Window, + XKeyEvent, + XKeyEventPtr, + XButtonEvent, + get_KeyEvent, + get_ButtonEvent, + get_MotionEvent, + XMotionEvent, + XExposeEvent, + get_ExposeEvent, + XMappingEvent, + XConfigureEvent, + get_ConfigureEvent, + waitForEvent, + gettimeofday_in_milliseconds, + gettimeofday_in_milliseconds_internal, + flush, + sync, + pending, + eventsQueued, + nextEvent, + allowEvents, + selectInput, + sendEvent, + windowEvent, + checkWindowEvent, + maskEvent, + checkMaskEvent, + checkTypedEvent, + checkTypedWindowEvent, + putBackEvent, + peekEvent, + refreshKeyboardMapping, + geometry, + getGeometry, + supportsLocale, + setLocaleModifiers, + AllowExposuresMode, + dontAllowExposures, + allowExposures, + defaultExposures, + PreferBlankingMode, + dontPreferBlanking, + preferBlanking, + defaultBlanking, + ScreenSaverMode, + screenSaverActive, + screenSaverReset, + getScreenSaver, + setScreenSaver, + activateScreenSaver, + resetScreenSaver, + forceScreenSaver, + getPointerControl, + warpPointer, + blackPixelOfScreen, + whitePixelOfScreen, + cellsOfScreen, + defaultColormapOfScreen, + defaultDepthOfScreen, + defaultGCOfScreen, + defaultVisualOfScreen, + doesBackingStore, + doesSaveUnders, + displayOfScreen, + eventMaskOfScreen, + minCmapsOfScreen, + maxCmapsOfScreen, + rootWindowOfScreen, + widthOfScreen, + widthMMOfScreen, + heightOfScreen, + heightMMOfScreen, + planesOfScreen, + screenNumberOfScreen, + setArcMode, + setBackground, + setForeground, + setFunction, + setGraphicsExposures, + setClipMask, + setClipOrigin, + setDashes, + setFillRule, + setFillStyle, + setFont, + setLineAttributes, + setPlaneMask, + setState, + setStipple, + setSubwindowMode, + setTSOrigin, + setTile, + createGC, + gContextFromGC, + freeGC, + flushGC, + copyGC, + createPixmap, + freePixmap, + bitmapBitOrder, + bitmapUnit, + bitmapPad, + lookupColor, + allocNamedColor, + allocColor, + parseColor, + freeColors, + storeColor, + queryColor, + queryColors, + installColormap, + uninstallColormap, + copyColormapAndFree, + createColormap, + freeColormap, + Glyph, + queryFont, + fontFromGC, + loadQueryFont, + freeFont, + fontFromFontStruct, + ascentFromFontStruct, + descentFromFontStruct, + CharStruct, + textExtents, + textWidth, + internAtom, + displayKeycodes, + lookupKeysym, + keycodeToKeysym, + keysymToKeycode, + keysymToString, + stringToKeysym, + noSymbol, + lookupString, + getIconName, + setIconName, + defineCursor, + undefineCursor, + createPixmapCursor, + createGlyphCursor, + createFontCursor, + freeCursor, + recolorCursor, + setWMProtocols, + XSetWindowAttributesPtr, + allocXSetWindowAttributes, + set_background_pixmap, + set_background_pixel, + set_border_pixmap, + set_border_pixel, + set_bit_gravity, + set_win_gravity, + set_backing_store, + set_backing_planes, + set_backing_pixel, + set_save_under, + set_event_mask, + set_do_not_propagate_mask, + set_override_redirect, + set_colormap, + set_cursor, + storeName, + createSimpleWindow, + createWindow, + translateCoordinates, + moveResizeWindow, + resizeWindow, + moveWindow, + reparentWindow, + mapSubwindows, + unmapSubwindows, + mapWindow, + lowerWindow, + raiseWindow, + circulateSubwindowsDown, + circulateSubwindowsUp, + circulateSubwindows, + iconifyWindow, + withdrawWindow, + destroyWindow, + destroySubwindows, + setWindowBorder, + setWindowBorderPixmap, + setWindowBorderWidth, + setWindowBackground, + setWindowBackgroundPixmap, + setWindowColormap, + addToSaveSet, + removeFromSaveSet, + changeSaveSet, + clearWindow, + clearArea, + restackWindows, + drawPoint, + drawPoints, + drawLine, + drawLines, + drawSegments, + drawRectangle, + drawRectangles, + drawArc, + drawArcs, + fillRectangle, + fillRectangles, + fillPolygon, + fillArc, + fillArcs, + copyArea, + copyPlane, + drawString, + drawImageString, + storeBuffer, + storeBytes, + fetchBuffer, + fetchBytes, + rotateBuffers, + + pRIMARY, + sECONDARY, + aRC, + aTOM, + bITMAP, + cARDINAL, + cOLORMAP, + cURSOR, + cUT_BUFFER0, + cUT_BUFFER1, + cUT_BUFFER2, + cUT_BUFFER3, + cUT_BUFFER4, + cUT_BUFFER5, + cUT_BUFFER6, + cUT_BUFFER7, + dRAWABLE, + fONT, + iNTEGER, + pIXMAP, + pOINT, + rECTANGLE, + rESOURCE_MANAGER, + rGB_COLOR_MAP, + rGB_BEST_MAP, + rGB_BLUE_MAP, + rGB_DEFAULT_MAP, + rGB_GRAY_MAP, + rGB_GREEN_MAP, + rGB_RED_MAP, + sTRING, + vISUALID, + wINDOW, + wM_COMMAND, + wM_HINTS, + wM_CLIENT_MACHINE, + wM_ICON_NAME, + wM_ICON_SIZE, + wM_NAME, + wM_NORMAL_HINTS, + wM_SIZE_HINTS, + wM_ZOOM_HINTS, + mIN_SPACE, + nORM_SPACE, + mAX_SPACE, + eND_SPACE, + sUPERSCRIPT_X, + sUPERSCRIPT_Y, + sUBSCRIPT_X, + sUBSCRIPT_Y, + uNDERLINE_POSITION, + uNDERLINE_THICKNESS, + sTRIKEOUT_ASCENT, + sTRIKEOUT_DESCENT, + iTALIC_ANGLE, + x_HEIGHT, + qUAD_WIDTH, + wEIGHT, + pOINT_SIZE, + rESOLUTION, + cOPYRIGHT, + nOTICE, + fONT_NAME, + fAMILY_NAME, + fULL_NAME, + cAP_HEIGHT, + wM_CLASS, + wM_TRANSIENT_FOR, + lAST_PREDEFINED, + + setTextProperty, + + RectInRegionResult, + rectangleOut, + rectangleIn, + rectanglePart, + createRegion, + polygonRegion, + intersectRegion, + subtractRegion, + unionRectWithRegion, + unionRegion, + xorRegion, + emptyRegion, + equalRegion, + pointInRegion, + rectInRegion, + clipBox, + offsetRegion, + shrinkRegion, + setRegion, + hunk ./Graphics/X11/Xlib.gc 426 -import Monad( zipWithM_ ) +import Control.Monad( zipWithM_ ) hunk ./Graphics/X11/Xlib.gc 432 +%prefix XA_ hunk ./Graphics/X11/Xlib.gc 951 --- # Uses %prim to let us call XFree +-- -- Uses %prim to let us call XFree adddir ./Graphics/X11/Xlib addfile ./Graphics/X11/Xlib/Atom.gc addfile ./Graphics/X11/Xlib/Color.gc addfile ./Graphics/X11/Xlib/Context.gc addfile ./Graphics/X11/Xlib/Display.gc addfile ./Graphics/X11/Xlib/Event.gc addfile ./Graphics/X11/Xlib/Font.gc addfile ./Graphics/X11/Xlib/Misc.gc addfile ./Graphics/X11/Xlib/Region.gc addfile ./Graphics/X11/Xlib/Screen.gc addfile ./Graphics/X11/Xlib/Types.gc addfile ./Graphics/X11/Xlib/Window.gc hunk ./Graphics/X11/Xlib/Atom.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Atom +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of type declarations for interfacing with X11 Atoms. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Atom( + internAtom, + + pRIMARY, + sECONDARY, + aRC, + aTOM, + bITMAP, + cARDINAL, + cOLORMAP, + cURSOR, + cUT_BUFFER0, + cUT_BUFFER1, + cUT_BUFFER2, + cUT_BUFFER3, + cUT_BUFFER4, + cUT_BUFFER5, + cUT_BUFFER6, + cUT_BUFFER7, + dRAWABLE, + fONT, + iNTEGER, + pIXMAP, + pOINT, + rECTANGLE, + rESOURCE_MANAGER, + rGB_COLOR_MAP, + rGB_BEST_MAP, + rGB_BLUE_MAP, + rGB_DEFAULT_MAP, + rGB_GRAY_MAP, + rGB_GREEN_MAP, + rGB_RED_MAP, + sTRING, + vISUALID, + wINDOW, + wM_COMMAND, + wM_HINTS, + wM_CLIENT_MACHINE, + wM_ICON_NAME, + wM_ICON_SIZE, + wM_NAME, + wM_NORMAL_HINTS, + wM_SIZE_HINTS, + wM_ZOOM_HINTS, + mIN_SPACE, + nORM_SPACE, + mAX_SPACE, + eND_SPACE, + sUPERSCRIPT_X, + sUPERSCRIPT_Y, + sUBSCRIPT_X, + sUBSCRIPT_Y, + uNDERLINE_POSITION, + uNDERLINE_THICKNESS, + sTRIKEOUT_ASCENT, + sTRIKEOUT_DESCENT, + iTALIC_ANGLE, + x_HEIGHT, + qUAD_WIDTH, + wEIGHT, + pOINT_SIZE, + rESOLUTION, + cOPYRIGHT, + nOTICE, + fONT_NAME, + fAMILY_NAME, + fULL_NAME, + cAP_HEIGHT, + wM_CLASS, + wM_TRANSIENT_FOR, + lAST_PREDEFINED, + + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +%#include "include/HsXlib.h" + +%prefix X +%prefix XA_ + +---------------------------------------------------------------- +-- Atoms +---------------------------------------------------------------- + +-- AC, 1/9/2000: Added definition for XInternAtom +%fun XInternAtom :: Display -> String -> Bool -> IO Atom + +-- XInternAtoms omitted +-- XGetAtomName omitted +-- XGetAtomNames omitted +-- XConvertSelection omitted +-- XListProperties omitted +-- XChangeProperty omitted +-- XDeleteProperty omitted + +%const Atom +% [ XA_PRIMARY +% , XA_SECONDARY +% , XA_ARC +% , XA_ATOM +% , XA_BITMAP +% , XA_CARDINAL +% , XA_COLORMAP +% , XA_CURSOR +% , XA_CUT_BUFFER0 +% , XA_CUT_BUFFER1 +% , XA_CUT_BUFFER2 +% , XA_CUT_BUFFER3 +% , XA_CUT_BUFFER4 +% , XA_CUT_BUFFER5 +% , XA_CUT_BUFFER6 +% , XA_CUT_BUFFER7 +% , XA_DRAWABLE +% , XA_FONT +% , XA_INTEGER +% , XA_PIXMAP +% , XA_POINT +% , XA_RECTANGLE +% , XA_RESOURCE_MANAGER +% , XA_RGB_COLOR_MAP +% , XA_RGB_BEST_MAP +% , XA_RGB_BLUE_MAP +% , XA_RGB_DEFAULT_MAP +% , XA_RGB_GRAY_MAP +% , XA_RGB_GREEN_MAP +% , XA_RGB_RED_MAP +% , XA_STRING +% , XA_VISUALID +% , XA_WINDOW +% , XA_WM_COMMAND +% , XA_WM_HINTS +% , XA_WM_CLIENT_MACHINE +% , XA_WM_ICON_NAME +% , XA_WM_ICON_SIZE +% , XA_WM_NAME +% , XA_WM_NORMAL_HINTS +% , XA_WM_SIZE_HINTS +% , XA_WM_ZOOM_HINTS +% , XA_MIN_SPACE +% , XA_NORM_SPACE +% , XA_MAX_SPACE +% , XA_END_SPACE +% , XA_SUPERSCRIPT_X +% , XA_SUPERSCRIPT_Y +% , XA_SUBSCRIPT_X +% , XA_SUBSCRIPT_Y +% , XA_UNDERLINE_POSITION +% , XA_UNDERLINE_THICKNESS +% , XA_STRIKEOUT_ASCENT +% , XA_STRIKEOUT_DESCENT +% , XA_ITALIC_ANGLE +% , XA_X_HEIGHT +% , XA_QUAD_WIDTH +% , XA_WEIGHT +% , XA_POINT_SIZE +% , XA_RESOLUTION +% , XA_COPYRIGHT +% , XA_NOTICE +% , XA_FONT_NAME +% , XA_FAMILY_NAME +% , XA_FULL_NAME +% , XA_CAP_HEIGHT +% , XA_WM_CLASS +% , XA_WM_TRANSIENT_FOR +% , XA_LAST_PREDEFINED +% ] + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Color.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Color +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of GreenCard declarations for interfacing with Xlib Colors. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Color( + + lookupColor, + allocNamedColor, + allocColor, + parseColor, + freeColors, + storeColor, + queryColor, + queryColors, + installColormap, + uninstallColormap, + copyColormapAndFree, + createColormap, + freeColormap, + + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +%#include "include/HsXlib.h" + +%prefix X + +---------------------------------------------------------------- +-- Color and Colormaps +---------------------------------------------------------------- + +%fun XLookupColor :: Display -> Colormap -> String -> IO (Color, Color) +%code Status err = XLookupColor(arg1,arg2,arg3,&res1,&res2) +%fail { 0 == err }{ Zero(err,XLookupColor) } +%end free(arg3) + +%fun XAllocNamedColor :: Display -> Colormap -> String -> IO (Color, Color) +%code Status err = XAllocNamedColor(arg1,arg2,arg3,&res1,&res2) +%fail { 0 == err }{ Zero(err,XLookupColor) } +%end free(arg3) + +%fun XAllocColor :: Display -> Colormap -> Color -> IO Color +%code Status err = XAllocColor(arg1,arg2,&arg3) +%fail { 0 == err }{ Zero(err,XLookupColor) } +%result (color {arg3}) + +%fun XParseColor :: Display -> Colormap -> String -> IO Color +%code Status err = XParseColor(arg1,arg2,arg3,&res1) +%fail { 0 == err }{ Zero(err,XLookupColor) } +%end free(arg3) + +-- ToDo: Can't express relationship between arg4 and res1 properly (or arg5, res2) +-- %errfun Zero XAllocColorCells :: Display -> Colormap -> Bool -> Int -> Int -> IO (ListPixel, ListPixel) using err = XAllocColorCells(arg1,arg2,arg3,arg4_size,res1,arg5_size,res2) + +-- ToDo: Can't express relationship between arg4 and res1 properly +-- %errfun Zero XAllocColorPlanes :: Display -> Colormap -> Bool -> Int -> Int -> Int -> Int IO (ListPixel, Pixel, Pixel, Pixel) using err = XAllocColorPlanes(...) + +%fun XFreeColors :: Display -> Colormap -> ListPixel -> Pixel -> IO () +%call (display arg1) (colormap arg2) (listPixel arg3 arg3_size) (pixel arg4) +%code XFreeColors(arg1,arg2,arg3,arg3_size,arg4) +%end free(arg3) + +%fun XStoreColor :: Display -> Colormap -> Color -> IO () +%code XStoreColor(arg1,arg2,&arg3) + +-- %fun XStoreColors :: Display -> Colormap -> ListColor -> IO () +-- %code XStoreColors(arg1,arg2,arg3,arg3_size) +-- %fun XStoreNamedColor :: Display -> Colormap -> String -> Pixel -> PrimaryMask -> IO () + +%fun XQueryColor :: Display -> Colormap -> Color -> IO Color +%code XQueryColor(arg1,arg2,&arg3) +%result (color {arg3}) + +%fun XQueryColors :: Display -> Colormap -> ListColor -> IO ListColor +%call (display arg1) (colormap arg2) (listColor arg3 arg3_size) +%code XQueryColors(arg1,arg2,arg3,arg3_size) +%result (listColor {arg3} {arg3_size}) + +%fun XInstallColormap :: Display -> Colormap -> IO () +%fun XUninstallColormap :: Display -> Colormap -> IO () +%fun XCopyColormapAndFree :: Display -> Colormap -> IO Colormap +%fun XCreateColormap :: Display -> Window -> Visual -> ColormapAlloc -> IO Colormap +%fun XFreeColormap :: Display -> Colormap -> IO () + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Context.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Context +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of GreenCard declarations for interfacing with Xlib Graphics +-- Contexts. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Context( + + setArcMode, + setBackground, + setForeground, + setFunction, + setGraphicsExposures, + setClipMask, + setClipOrigin, + setDashes, + setFillRule, + setFillStyle, + setFont, + setLineAttributes, + setPlaneMask, + setState, + setStipple, + setSubwindowMode, + setTSOrigin, + setTile, + createGC, + gContextFromGC, + freeGC, + flushGC, + copyGC, + + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +%#include "include/HsXlib.h" + +%prefix X + +---------------------------------------------------------------- +-- Graphics contexts +---------------------------------------------------------------- + +-- Convenience functions + +%fun XSetArcMode :: Display -> GC -> ArcMode -> IO () +%fun XSetBackground :: Display -> GC -> Pixel -> IO () +%fun XSetForeground :: Display -> GC -> Pixel -> IO () +%fun XSetFunction :: Display -> GC -> GXFunction -> IO () +%fun XSetGraphicsExposures :: Display -> GC -> Bool -> IO () +%fun XSetClipMask :: Display -> GC -> Pixmap -> IO () +%fun XSetClipOrigin :: Display -> GC -> Position -> Position -> IO () + +-- XSetClipRectangles omitted because it's not clear when it's safe to delete the +-- array of rectangles + +%fun XSetDashes :: Display -> GC -> Int -> String -> Int -> IO () +%fun XSetFillRule :: Display -> GC -> FillRule -> IO () +%fun XSetFillStyle :: Display -> GC -> FillStyle -> IO () +%fun XSetFont :: Display -> GC -> Font -> IO () +%fun XSetLineAttributes :: Display -> GC -> Int -> LineStyle -> CapStyle -> JoinStyle -> IO () +%fun XSetPlaneMask :: Display -> GC -> Pixel -> IO () +%fun XSetState :: Display -> GC -> Pixel -> Pixel -> GXFunction -> Pixel -> IO () +%fun XSetStipple :: Display -> GC -> Pixmap -> IO () +%fun XSetSubwindowMode :: Display -> GC -> SubWindowMode -> IO () +%fun XSetTSOrigin :: Display -> GC -> Position -> Position -> IO () +%fun XSetTile :: Display -> GC -> Pixmap -> IO () + +-- ToDo: create a real interface to this +%fun XCreateGC :: Display -> Drawable -> IO GC +%code res1 = XCreateGC(arg1,arg2,0,0); + +-- OLD: +-- %synonym : GCValueSet : Ptr +-- in rtsDummy +-- +-- {% +-- typedef unsigned long GCMask; /* cf XtGCMask */ +-- typedef struct _gcvalues { +-- GCMask mask; +-- XGCValues values; +-- }* GCValueSet; +-- %} +-- +-- IMPURE GCValueSet emptyGCValueSet() +-- RESULT: (RETVAL = (GCValueSet) malloc(sizeof(struct _gcvalues))) ? RETVAL->mask = 0, RETVAL : RETVAL; +-- POST: RETVAL != NULL +-- +-- IMPURE void setGCForeground(colour, set) +-- IN Pixel colour +-- IN GCValueSet set +-- RESULT: set->mask |= GCForeground; set->values.foreground = colour +-- +-- IMPURE void setGCBackground(colour, set) +-- IN Pixel colour +-- IN GCValueSet set +-- RESULT: set->mask |= GCBackground; set->values.background = colour +-- +-- IMPURE void freeGCValueSet(set) +-- IN GCValueSet set +-- RESULT: free(set) +-- +-- IMPURE GC XCreateGC(display, d, set->mask, &(set->values)) +-- NAME: xCreateGC +-- IN Display* display +-- IN Drawable d +-- IN GCValueSet set +-- +-- IMPURE void XChangeGC(display, gc, set->mask, &(set->values)) +-- NAME: xChangeGC +-- IN Display* display +-- IN GC gc +-- IN GCValueSet set +-- +-- STARTH +-- -- Code that packages GCValueSets up in a clean monoidic way. +-- +-- data GCSetter = GCSetter (GCValueSet -> IO ()) -- should be newtype +-- +-- createGC :: Display -> Drawable -> GCSetter -> IO GC +-- createGC display d (GCSetter setter) = +-- emptyGCValueSet >>= \ set -> +-- setter set >> +-- xCreateGC display d set >>= \ gc -> +-- freeGCValueSet set >> +-- return gc +-- +-- changeGC :: Display -> Drawable -> GC -> GCSetter -> IO () +-- changeGC display d gc (GCSetter setter) = +-- emptyGCValueSet >>= \ set -> +-- setter set >> +-- xChangeGC display d set >>= \ gc -> +-- freeGCValueSet set +-- +-- instance Monoid GCSetter where +-- (GCSetter m) >>> (GCSetter k) +-- = GCSetter (\ settings -> m settings >> k settings) +-- unit = GCSetter (\ _ -> return ()) +-- +-- set_Background :: Pixel -> GCSetter +-- set_Background c = GCSetter (setGCBackground c) +-- +-- set_Foreground :: Pixel -> GCSetter +-- set_Foreground c = GCSetter (setGCForeground c) +-- ENDH + +%fun XGContextFromGC :: GC -> GContext + +%fun XFreeGC :: Display -> GC -> IO () +%fun XFlushGC :: Display -> GC -> IO () + +%fun XCopyGC :: Display -> GC -> Mask -> GC -> IO () + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Display.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Display +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of GreenCard declarations for interfacing with Xlib Displays. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Display( + + allPlanes_aux, + blackPixel, + whitePixel, + connectionNumber, + defaultColormap, + defaultGC, + defaultDepth, + defaultScreen, + defaultScreenOfDisplay, + displayHeight, + displayHeightMM, + displayWidth, + displayWidthMM, + maxRequestSize, + displayMotionBufferSize, + resourceManagerString, + screenResourceString, + displayString, + imageByteOrder, + protocolRevision, + protocolVersion, + serverVendor, + screenCount, + defaultVisual, + displayCells, + displayPlanes, + screenOfDisplay, + defaultRootWindow, + rootWindow, + qLength, + noOp, + openDisplay, + closeDisplay, + + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +%#include "include/HsXlib.h" + +%prefix X + +---------------------------------------------------------------- +-- Display +---------------------------------------------------------------- + +%fun AllPlanes_aux :: Pixel +%fun BlackPixel :: Display -> ScreenNumber -> Pixel +%fun WhitePixel :: Display -> ScreenNumber -> Pixel + +-- This may vary from one execution to another but I believe it +-- is constant during any given execution and so it can be made PURE +-- without breaking referential transparency. +-- +-- Note: underneath the opaque name, it turns out that this +-- is the file descriptor. You need to know this if you want to +-- use select. +%fun ConnectionNumber :: Display -> Int + +%fun DefaultColormap :: Display -> ScreenNumber -> Colormap + +-- %fun XListDepths :: Display -> ScreenNumber -> ListInt using res1 = XListDepths(arg1,arg2,&res1_size) + +%fun DefaultGC :: Display -> ScreenNumber -> GC +%fun DefaultDepth :: Display -> ScreenNumber -> Int +%fun DefaultScreen :: Display -> ScreenNumber +%fun DefaultScreenOfDisplay :: Display -> Screen +%fun DisplayHeight :: Display -> ScreenNumber -> Int +%fun DisplayHeightMM :: Display -> ScreenNumber -> Int +%fun DisplayWidth :: Display -> ScreenNumber -> Int +%fun DisplayWidthMM :: Display -> ScreenNumber -> Int +%fun XMaxRequestSize :: Display -> Int +%fun XDisplayMotionBufferSize:: Display -> Int +--Disnae exist in X11R5 %fun XExtendedMaxRequestSize :: Display -> Int +%fun XResourceManagerString :: Display -> String +%fun XScreenResourceString :: Screen -> String +%fun DisplayString :: Display -> String +%fun ImageByteOrder :: Display -> Int +%fun ProtocolRevision :: Display -> Int +%fun ProtocolVersion :: Display -> Int +%fun ServerVendor :: Display -> String +--Disnae exist: %fun XServerRelease :: Display -> Int +%fun ScreenCount :: Display -> Int +%fun DefaultVisual :: Display -> ScreenNumber -> Visual +%fun DisplayCells :: Display -> ScreenNumber -> Int +%fun DisplayPlanes :: Display -> ScreenNumber -> Int +%fun ScreenOfDisplay :: Display -> ScreenNumber -> Screen +%fun DefaultRootWindow :: Display -> Window + +-- The following are believed to be order dependent + +%fun XRootWindow :: Display -> ScreenNumber -> IO Window +%fun XQLength :: Display -> IO Int + +%fun XNoOp :: Display -> IO () + +%fun XOpenDisplay :: String -> IO Display +%fail {res1 == 0} { NullPtr(XOpenDisplay) } + +%fun XCloseDisplay :: Display -> IO () + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Event.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Event +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of GreenCard declarations for interfacing with Xlib Events. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Event( + QueuedMode, + queuedAlready, + queuedAfterFlush, + queuedAfterReading, + XEvent, + XEventPtr, + allocXEvent, + get_EventType, + get_Window, + XKeyEvent, + XKeyEventPtr, + XButtonEvent, + get_KeyEvent, + get_ButtonEvent, + get_MotionEvent, + XMotionEvent, + XExposeEvent, + get_ExposeEvent, + XMappingEvent, + XConfigureEvent, + get_ConfigureEvent, + waitForEvent, + gettimeofday_in_milliseconds, + gettimeofday_in_milliseconds_internal, + flush, + sync, + pending, + eventsQueued, + nextEvent, + allowEvents, + selectInput, + sendEvent, + windowEvent, + checkWindowEvent, + maskEvent, + checkMaskEvent, + checkTypedEvent, + checkTypedWindowEvent, + putBackEvent, + peekEvent, + refreshKeyboardMapping, + + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +%#include "include/HsXlib.h" + +%prefix X + +---------------------------------------------------------------- +-- Events +---------------------------------------------------------------- + +type QueuedMode = Int +%dis queuedMode x = int x +%const QueuedMode +% [ QueuedAlready +% , QueuedAfterFlush +% , QueuedAfterReading +% ] + +-- Because of the way the corresponding C types are defined, +-- These "structs" are somewhat unusual - they omit fields which can +-- be found in more general structs. +-- For example, XAnyEvent omits type since it is in XEvent. +-- Therefore, to get the complete contents of an event one typically +-- writes: +-- do +-- ty <- get_XEvent e +-- (serial,send_event,display,window) <- get_XAnyEvent +-- window' <- get_XDestroyWindowEvent + +type XEvent = + ( EventType + ) +%dis xEvent x = declare {XEvent} x in +% ( eventType {(%x).type} +% ) +type XEventPtr = Ptr Stub_EventPtr +data Stub_EventPtr +%dis xEventPtr x = ptr ({XEvent*} x) + +%fun allocXEvent :: IO XEventPtr +%code res1 = (void*)malloc(sizeof(XEvent)) + +%fun get_EventType :: XEventPtr -> IO EventType +%code res1 = arg1->type + +%fun get_Window :: XEventPtr -> IO Window +%code res1 = ((XAnyEvent*)arg1)->window + +-- %struct : XAnyEvent : XAnyEvent arg1 +-- Int32 : serial # # of last request processed by server +-- Bool : send_event # true if this came from a SendEvent request +-- Display : display # Display the event was read from +-- Window : window # window on which event was requested in event mask + +type XKeyEvent = + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , Int -- pointer x, y coordinates in event window + , Int -- + , Int -- coordinates relative to root + , Int -- + , Modifier -- key or button mask + , KeyCode -- detail + , Bool -- same screen flag + ) +%dis xKeyEvent x = declare {XKeyEvent} x in +% ( window {(%x).root} +% , window {(%x).subwindow} +% , time {(%x).time} +% , int {(%x).x} +% , int {(%x).y} +% , int {(%x).x_root} +% , int {(%x).y_root} +% , modifier {(%x).state} +% , keyCode {(%x).keycode} +% , bool {(%x).same_screen} +% ) +type XKeyEventPtr = Ptr Stub_KeyEventPtr +data Stub_KeyEventPtr +%dis xKeyEventPtr x = ptr ({XKeyEvent*} x) + +type XButtonEvent = + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , Int -- pointer x, y coordinates in event window + , Int + , Int -- coordinates relative to root + , Int + , Modifier -- key or button mask + , Button -- detail + , Bool -- same screen flag + ) +%dis xButtonEvent x = declare {XButtonEvent} x in +% ( window {(%x).root} +% , window {(%x).subwindow} +% , time {(%x).time} +% , int {(%x).x} +% , int {(%x).y} +% , int {(%x).x_root} +% , int {(%x).y_root} +% , modifier {(%x).state} +% , button {(%x).button} +% , bool {(%x).same_screen} +% ) + +%fun get_KeyEvent :: XEventPtr -> IO XKeyEvent +%code +%result (xKeyEvent {*(XKeyEvent*)arg1}) + +%fun get_ButtonEvent :: XEventPtr -> IO XButtonEvent +%code +%result (xButtonEvent {*(XButtonEvent*)arg1}) + +%fun get_MotionEvent :: XEventPtr -> IO XMotionEvent +%code +%result (xMotionEvent {*(XMotionEvent*)arg1}) + + +type XMotionEvent = + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , Int -- pointer x, y coordinates in event window + , Int + , Int -- coordinates relative to root + , Int + , Modifier -- key or button mask + , NotifyMode -- detail + , Bool -- same screen flag + ) +%dis xMotionEvent x = declare {XMotionEvent} x in +% ( window {(%x).root} +% , window {(%x).subwindow} +% , time {(%x).time} +% , int {(%x).x} +% , int {(%x).y} +% , int {(%x).x_root} +% , int {(%x).y_root} +% , modifier {(%x).state} +% , notifyMode {(%x).is_hint} +% , bool {(%x).same_screen} +% ) + + +-- %struct : XCrossingEvent : XCrossingEvent arg1 +-- Window : root # root window that the event occured on +-- Window : subwindow # child window +-- Time : time # milliseconds +-- Int : x # pointer x, y coordinates in event window +-- Int : y +-- Int : x_root # coordinates relative to root +-- Int : y_root +-- NotifyMode : mode +-- NotifyDetail : detail +-- Bool : same_screen # same screen flag +-- Bool : focus # boolean focus +-- Modifier : state # key or button mask +-- +-- %struct : XFocusChangeEvent : XFocusChangeEvent arg1 +-- NotifyMode : mode +-- NotifyDetail : detail +-- +-- -- omitted: should be translated into bitmaps +-- -- PURE void getKeymapEvent(event) +-- -- IN XEvent* event +-- -- OUT Window window = ((XKeymapEvent*)event)->window +-- -- OUT array[32] Char key_vector = ((XKeymapEvent*)event)->key_vector +-- -- RESULT: + +type XExposeEvent = + ( Position -- x + , Position -- y + , Dimension -- width + , Dimension -- height + , Int -- count + ) +%dis xExposeEvent x = declare {XExposeEvent} x in +% ( position {(%x).x} +% , position {(%x).y} +% , dimension {(%x).width} +% , dimension {(%x).height} +% , int {(%x).count} +% ) + +%fun get_ExposeEvent :: XEventPtr -> IO XExposeEvent +%code +%result (xExposeEvent {*(XExposeEvent*)arg1}) + +-- %struct : XGraphicsExposeEvent : XGraphicsExposeEvent arg1 +-- Position : x +-- Position : y +-- Dimension : width . +-- Dimension : height +-- Int : count +-- Int : major_code +-- Int : minor_code +-- +-- %struct : XCirculateEvent : XCirculateEvent arg1 +-- Window : window +-- Place : place +-- +-- %struct : XConfigureEvent : XConfigureEvent arg1 +-- Window : window +-- Position : x +-- Position : y +-- Dimension : width +-- Dimension : height +-- Dimension : border_width +-- Window : above +-- Bool : override_redirect +-- +-- %struct : XCreateWindowEvent : XCreateWindowEvent arg1 +-- Window : window +-- Position : x +-- Position : y +-- Dimension : width +-- Dimension : height +-- Dimension : border_width +-- Bool : override_redirect +-- +-- %struct : XDestroyWindowEvent : XDestroyWindowEvent arg1 +-- Window : window +-- +-- %struct : XGravityEvent : XGravityEvent arg1 +-- Window : window +-- Position : x +-- Position : y +-- +-- %struct : XMapEvent : XMapEvent arg1 +-- Bool : override_redirect + +type XMappingEvent = + ( MappingRequest -- request + , KeyCode -- first_keycode + , Int -- count + ) +%dis xMappingEvent x = declare {XMappingEvent} x in +% ( mappingRequest {(%x).request} +% , keyCode {(%x).first_keycode} +% , int {(%x).count} +% ) + +type XConfigureEvent = + ( Position + , Position + , Dimension + , Dimension + ) +%dis xConfigureEvent x = +% ( position {(%x).x} +% , position {(%x).y} +% , dimension {(%x).width} +% , dimension {(%x).height} +% ) +%fun get_ConfigureEvent :: XEventPtr -> IO XConfigureEvent +%code +%result (xConfigureEvent {*(XConfigureEvent*)arg1}) + + +-- %struct : XResizeRequestEvent : XResizeRequestEvent arg1 +-- Dimension : width +-- Dimension : height +-- + +-- %struct : XReparentEvent : XReparentEvent arg1 +-- Window : window +-- Window : parent +-- Position : x +-- Position : y +-- Bool : override_redirect +-- +-- %struct : XUnmapEvent : XUnmapEvent arg1 +-- Window : window +-- Bool : from_configure +-- +-- %struct : XVisibilityEvent : XVisibilityEvent arg1 +-- Visibility : state +-- +-- %struct : XCirculateRequestEvent : XCirculateRequestEvent arg1 +-- Place : place +-- +-- -- omitted because valuemask looks tricky +-- -- %struct : XConfigureRequestEvent : XConfigureRequestEvent arg1 +-- -- Window : window +-- -- Position : x +-- -- Position : y +-- -- Dimension : width +-- -- Dimension : height +-- -- Dimension : border_width +-- -- Window : above +-- -- StackingMethod : detail +-- -- ??? : valuemask +-- +-- %struct : XMapRequestEvent : XMapRequestEvent arg1 +-- Window : window +-- +-- %struct : XColormapEvent : XColormapEvent arg1 +-- Colormap : colormap +-- Bool : new +-- ColormapNotification : state +-- +-- -- getClientMessageEvent omitted +-- -- getPropertyEvent omitted +-- -- getSelectionClearEvent omitted +-- -- getSelectionRequestEvent omitted +-- -- getSelectionEvent omitted + +-- functions + +-- The following is useful if you want to do a read with timeout. +-- Returns True if timeout occurs. +%fun waitForEvent :: Display -> Word32 -> IO Bool +%code +% struct timeval timeout; +% fd_set readfds; +% fd_set nofds; +% int fd = ConnectionNumber(arg1); +% int n; +% FD_ZERO(&readfds); +% FD_ZERO(&nofds); +% FD_SET(fd,&readfds); +% timeout.tv_sec = arg2 / 1000000; +% timeout.tv_usec = arg2 % 1000000; +% /* HN 2001-02-06: Select needs to be told highest fd _+_ 1. */ +% n = select(fd+1,&readfds,&nofds,&nofds,&timeout); +%result (bool {n == 0}) + +-- The following is somewhat compatible with Win32's TimeGetTime +gettimeofday_in_milliseconds :: IO Integer +gettimeofday_in_milliseconds = do + (sec,usec) <- gettimeofday_in_milliseconds_internal + return (toInteger sec * 1000 + toInteger usec `div` 1000) + +%fun gettimeofday_in_milliseconds_internal :: IO (Word32,Word32) +%code +% struct timeval tv; +% int rc = gettimeofday(&tv,0); +% res1 = tv.tv_sec; +% res2 = tv.tv_usec; + +%fun XFlush :: Display -> IO () +%fun XSync :: Display -> Bool -> IO () +%fun XPending :: Display -> IO Int +%fun XEventsQueued :: Display -> QueuedMode -> IO Int +%fun XNextEvent :: Display -> XEventPtr -> IO () +%fun XAllowEvents :: Display -> AllowEvents -> Time -> IO () + +-- ToDo: XFree(res1) after constructing result +-- %fun XGetMotionEvents :: Display -> Window -> Time -> Time -> IO ListXTimeCoord +-- %code res1 = XGetMotionEvents(arg1,arg2,arg3,arg4,&res1_size) + +%fun XSelectInput :: Display -> Window -> EventMask -> IO () +%fun XSendEvent :: Display -> Window -> Bool -> EventMask -> XEventPtr -> IO () +%code Status err = XSendEvent(arg1,arg2,arg3,arg4,arg5) +%fail { Success != err }{ BadStatus(err,XSendEvent) } + +%fun XWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO () +%fun XCheckWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO Bool + +%fun XMaskEvent :: Display -> EventMask -> XEventPtr -> IO () +%fun XCheckMaskEvent :: Display -> EventMask -> XEventPtr -> IO Bool +%fun XCheckTypedEvent :: Display -> EventType -> XEventPtr -> IO Bool +%fun XCheckTypedWindowEvent :: Display -> Window -> EventType -> XEventPtr -> IO Bool +%fun XPutBackEvent :: Display -> XEventPtr -> IO () +%fun XPeekEvent :: Display -> XEventPtr -> IO () + +-- XFilterEvent omitted (can't find documentation) +-- XIfEvent omitted (can't pass predicates (yet)) +-- XCheckIfEvent omitted (can't pass predicates (yet)) +-- XPeekIfEvent omitted (can't pass predicates (yet)) + +%fun XRefreshKeyboardMapping :: XMappingEvent -> IO () +%code XRefreshKeyboardMapping(&arg1) + +-- XSynchronize omitted (returns C function) +-- XSetAfterFunction omitted (can't pass functions (yet)) + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Font.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Font +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of GreenCard declarations for interfacing with Xlib Fonts. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Font( + + Glyph, + queryFont, + fontFromGC, + loadQueryFont, + freeFont, + fontFromFontStruct, + ascentFromFontStruct, + descentFromFontStruct, + CharStruct, + textExtents, + textWidth, + + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +%#include "include/HsXlib.h" + +%prefix X + +---------------------------------------------------------------- +-- Fonts +---------------------------------------------------------------- + +-- A glyph (or Char2b) is a 16 bit character identification. +-- The top 8 bits are zero in many fonts. +type Glyph = Word16 +%dis glyph x = word16 x + +-- Disnae exist: %fun LoadFont :: Display -> String -> IO Font +-- Disnae exist: %fun UnloadFont :: Display -> Font -> IO () + +-- Argument can be a Font or a GContext. +-- But, if it's a GContext, the fontStruct will use the GContext as the +-- FontID - which will cause most things to break so it's probably +-- safer using XGetGCValues to get a genuine font ID +%fun XQueryFont :: Display -> Font -> IO FontStruct + +-- Note that this _WILL NOT WORK_ unless you have explicitly set the font. +-- I'm slowly but surely coming to the conclusion that Xlib is a pile of +-- steaming shit. +%fun FontFromGC :: Display -> GC -> IO Font +%code +% XGCValues ret; +% Status err = XGetGCValues(arg1,arg2,GCFont,&ret); +%fail {Success != err} { BadStatus(rc,FontFromGC) } +%result (font {ret.font}) + +%fun XLoadQueryFont :: Display -> String -> IO FontStruct +%fail {res1==0} { NullPtr(XLoadQueryFont) } + +%fun XFreeFont :: Display -> FontStruct -> IO () +-- %fun XSetFontPath :: Display -> ListString -> IO () using XSetFontPath(arg1,arg2,arg2_size) + +%fun fontFromFontStruct :: FontStruct -> Font +%code res1 = arg1->fid +%fun ascentFromFontStruct :: FontStruct -> Int32 +%code res1 = arg1->ascent +%fun descentFromFontStruct :: FontStruct -> Int32 +%code res1 = arg1->descent + +-- %prim XGetFontPath :: Display -> IO ListString +--Int r_size; +--String* r = XGetFontPath(arg1,&r_size); +-- %update(r); +--XFreeFontPath(r); +--return; + +-- %prim XListFonts :: Display -> String -> Int -> IO ListString +--Int r_size; +--String *r = XListFonts(arg1,arg2,arg3,&r_size); +-- %update(r); +--XFreeFontNames(r); +--return; + +-- XListFontsWithInfo omitted (no support for FontStruct yet) + +-- XQueryTextExtents omitted (no support for CharStruct yet) +-- XQueryTextExtents16 omitted (no support for CharStruct yet) + +-- We marshall this across right away because it's usually one-off info +type CharStruct = + ( Int -- lbearing (origin to left edge of raster) + , Int -- rbearing (origin to right edge of raster) + , Int -- width (advance to next char's origin) + , Int -- ascent (baseline to top edge of raster) + , Int -- descent (baseline to bottom edge of raster) +-- attributes omitted + ) +%dis charStruct x = declare {XCharStruct} x in +% ( int {(%x).lbearing} +% , int {(%x).rbearing} +% , int {(%x).width} +% , int {(%x).ascent} +% , int {(%x).descent} +% ) + + +-- No need to put ths in the IO monad - this info is essentially constant +%fun XTextExtents :: FontStruct -> String -> (FontDirection, Int32, Int32, CharStruct) +%call (fontStruct f) (stringLen s s_len) +%code +% int direction; +% int font_ascent; +% int font_descent; +% XCharStruct cs; +% int rc = XTextExtents(f,s,s_len,&direction,&font_ascent,&font_descent,&cs); +%result ( fontDirection direction +% , int32 font_ascent +% , int32 font_descent +% , charStruct cs +% ) + +-- No need to put ths in the IO monad - this info is essentially constant +%fun XTextWidth :: FontStruct -> String -> Int32 +%call (fontStruct f) (stringLen s s_len) +%code res1 = XTextWidth(f,s,s_len) + +-- XTextExtents16 omitted +-- XTextWidth16 omitted + +-- XGetFontProperty omitted +-- XFreeFontInfo omitted +-- XFreeFontNames omitted + +-- XCreateFontSet omitted (no documentation available) +-- XFreeFontSet omitted (no documentation available) +-- XFontsOfFontSet omitted (no documentation available) +-- XBaseFontNameListOfFontSet omitted (no documentation available) +-- XLocaleOfFontSet omitted (no documentation available) +-- XExtentsOfFontSet omitted (no documentation available) + +-- XContextDependentDrawing omitted +-- XDirectionalDependentDrawing omitted +-- XContextualDrawing omitted + +-- XmbTextEscapement omitted +-- XwcTextEscapement omitted +-- XmbTextExtents omitted +-- XwcTextExtents omitted +-- XmbTextPerCharExtents omitted +-- XwcTextPerCharExtents omitted +-- XmbDrawText omitted +-- XwcDrawText omitted +-- XmbDrawString omitted +-- XwcDrawString omitted +-- XmbDrawImageString omitted +-- XwcDrawImageString omitted + +-- XOpenIM omitted +-- XCloseIM omitted +-- XGetIMValues omitted +-- XSetIMValues omitted +-- DisplayOfIM omitted +-- XLocaleOfIM omitted + +-- XCreateIC omitted +-- XDestroyIC omitted +-- XSetICFocus omitted +-- XUnsetICFocus omitted +-- XwcResetIC omitted +-- XmbResetIC omitted +-- XSetICValues omitted +-- XGetICValues omitted +-- XIMOfIC omitted + +-- XRegisterIMInstantiateCallback omitted +-- XUnregisterIMInstantiateCallback omitted + +-- XInternalConnectionNumbers omitted +-- XProcessInternalConnection omitted +-- XAddConnectionWatch omitted +-- XRemoveConnectionWatch omitted + +-- XmbLookupString omitted +-- XwcLookupString omitted + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Misc.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Misc +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of GreenCard declarations for interfacing with Xlib. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Misc( + + rmInitialize, + autoRepeatOff, + autoRepeatOn, + bell, + setCloseDownMode, + lastKnownRequestProcessed, + getInputFocus, + setInputFocus, + grabButton, + ungrabButton, + grabPointer, + ungrabPointer, + grabKey, + ungrabKey, + grabKeyboard, + ungrabKeyboard, + grabServer, + ungrabServer, + queryBestTile, + queryBestStipple, + queryBestCursor, + queryBestSize, + queryPointer, + displayName, + setDefaultErrorHandler, + geometry, + getGeometry, + supportsLocale, + setLocaleModifiers, + AllowExposuresMode, + dontAllowExposures, + allowExposures, + defaultExposures, + PreferBlankingMode, + dontPreferBlanking, + preferBlanking, + defaultBlanking, + ScreenSaverMode, + screenSaverActive, + screenSaverReset, + getScreenSaver, + setScreenSaver, + activateScreenSaver, + resetScreenSaver, + forceScreenSaver, + getPointerControl, + warpPointer, + + createPixmap, + freePixmap, + bitmapBitOrder, + bitmapUnit, + bitmapPad, + + displayKeycodes, + lookupKeysym, + keycodeToKeysym, + keysymToKeycode, + keysymToString, + stringToKeysym, + noSymbol, + lookupString, + getIconName, + setIconName, + defineCursor, + undefineCursor, + createPixmapCursor, + createGlyphCursor, + createFontCursor, + freeCursor, + recolorCursor, + setWMProtocols, + allocXSetWindowAttributes, + set_background_pixmap, + set_background_pixel, + set_border_pixmap, + set_border_pixel, + set_bit_gravity, + set_win_gravity, + set_backing_store, + set_backing_planes, + set_backing_pixel, + set_save_under, + set_event_mask, + set_do_not_propagate_mask, + set_override_redirect, + set_colormap, + set_cursor, + + drawPoint, + drawPoints, + drawLine, + drawLines, + drawSegments, + drawRectangle, + drawRectangles, + drawArc, + drawArcs, + fillRectangle, + fillRectangles, + fillPolygon, + fillArc, + fillArcs, + copyArea, + copyPlane, + drawString, + drawImageString, + storeBuffer, + storeBytes, + fetchBuffer, + fetchBytes, + rotateBuffers, + + setTextProperty, + + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types +import Graphics.X11.Xlib.Types +import Graphics.X11.Xlib.Event +import Graphics.X11.Xlib.Font + +%#include "include/HsXlib.h" + +%prefix X + +-- I'm not sure why I added this since I don't have any of the related +-- functions. +%fun XrmInitialize :: IO () + +-- %fun XGetDefault :: Display -> String -> String -> IO () + +%fun XAutoRepeatOff :: Display -> IO () +%fun XAutoRepeatOn :: Display -> IO () +%fun XBell :: Display -> Int -> IO () +%fun XSetCloseDownMode :: Display -> CloseDownMode -> IO () +%fun XLastKnownRequestProcessed :: Display -> IO Int + +%fun XGetInputFocus :: Display -> IO (Window, FocusMode) +%code XGetInputFocus(arg1,&res1,&res2); + +%fun XSetInputFocus :: Display -> Window -> FocusMode -> Time -> IO () + +-- XAllocID omitted +-- XKillClient omitted +-- XFetchName omitted +-- XGetKeyboardControl omitted +-- XChangeKeyboardControl omitted +-- XChangeKeyboardMapping omitted +-- XChangePointerControl omitted + +%fun XGrabButton :: Display -> Button -> ButtonMask -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> IO () +%fun XUngrabButton :: Display -> Button -> ButtonMask -> Window -> IO () + +%fun XGrabPointer :: Display -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> Time -> IO GrabStatus +%fun XUngrabPointer :: Display -> Time -> IO () + +%fun XGrabKey :: Display -> KeyCode -> ButtonMask -> Window -> Bool -> GrabMode -> GrabMode -> IO () +%fun XUngrabKey :: Display -> KeyCode -> ButtonMask -> Window -> IO () + +%fun XGrabKeyboard :: Display -> Window -> Bool -> GrabMode -> GrabMode -> Time -> IO GrabStatus +%fun XUngrabKeyboard :: Display -> Time -> IO () + +%fun XGrabServer :: Display -> IO () +%fun XUngrabServer :: Display -> IO () + +-- XChangeActivePointerGrab omitted + +-- XFree omitted +-- XFreeStringList omitted + +%fun XQueryBestTile :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) +%code Status err = XQueryBestTile(arg1,arg2,arg3,arg4,&res1,&res2) +%fail { Success != err }{ BadStatus(err,XQueryBestTile) } + +%fun XQueryBestStipple :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) +%code Status err = XQueryBestStipple(arg1,arg2,arg3,arg4,&res1,&res2) +%fail { Success != err }{ BadStatus(err,XQueryBestStipple) } + +%fun XQueryBestCursor :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) +%code Status err = XQueryBestCursor(arg1,arg2,arg3,arg4,&res1,&res2) +%fail { Success != err }{ BadStatus(err,XQueryBestCursor) } + +%fun XQueryBestSize :: Display -> Drawable -> QueryBestSizeClass -> Dimension -> Dimension -> IO (Dimension, Dimension) +%code Status err = XQueryBestSize(arg1,arg2,arg3,arg4,arg5,&res1,&res2) +%fail { Success != err }{ BadStatus(err,XQueryBestSize) } + +-- Note: Returns false if pointer not in window w (and win_x = win_y = 0) +-- ToDo: more effective use of Maybes? +%fun XQueryPointer :: Display -> Window -> IO (Bool, Window, Window, Int, Int, Int, Int, Modifier) +%code Status res1 = XQueryPointer(arg1,arg2,&res2,&res3,&res4,&res5,&res6,&res7,&res8) + +-- XSetSelectionOwner omitted + +-- XOpenOM omitted +-- XCloseOM omitted +-- XSetOMValues omitted +-- XGetOMValues omitted +-- DisplayOfOM omitted +-- XLocaleOfOM omitted + +-- XCreateOC omitted +-- XDestroyOC omitted +-- XOMOfOC omitted +-- XSetOCValues omitted +-- XGetOCValues omitted + +-- XVaCreateNestedList omitted + +---------------------------------------------------------------- +-- Error reporting +---------------------------------------------------------------- + +%fun XDisplayName :: String -> String + +-- type ErrorHandler = Display -> ErrorEvent -> IO Int +-- %dis errorHandler x = (stable x) +-- +-- type IOErrorHandler = Display -> IO Int +-- %dis ioErrorHandler x = (stable x) + +-- Sadly, this code doesn't work because hugs->runIO creates a fresh +-- stack of exception handlers so the exception gets thrown to the +-- wrong place. +-- +-- %C +-- % static HugsStablePtr ioErrorHandlerPtr; +-- % +-- % int genericIOErrorHandler(Display *d) +-- % { +-- % if (ioErrorHandlerPtr >= 0) { +-- % hugs->putStablePtr(ioErrorHandlerPtr); +-- % hugs->putAddr(d); +-- % if (hugs->runIO(1)) { /* exitWith value returned */ +-- % return hugs->getInt(); +-- % } else { +-- % return hugs->getWord(); +-- % } +-- % } +-- % return 1; +-- % } + +-- Here's what we might do instead. The two error handlers set flags +-- when they fire and every single call to X contains the line: +-- +-- %fail { errorFlags != 0 } { XError(errorFlags) } +-- +-- This really sucks. +-- Oh, and it won't even work with IOErrors since they terminate +-- the process if the handler returns. I don't know what the hell they +-- think they're doing taking it upon themselves to terminate MY +-- process when THEIR library has a problem but I don't think anyone +-- ever accused X of being well-designed. +-- +-- % static int genericIOErrorHandler(Display *d) +-- % { +-- % if (ioErrorHandlerPtr >= 0) { +-- % hugs->putStablePtr(ioErrorHandlerPtr); +-- % hugs->putAddr(d); +-- % if (hugs->runIO(1)) { /* exitWith value returned */ +-- % return hugs->getInt(); +-- % } else { +-- % return hugs->getWord(); +-- % } +-- % } +-- % return 1; +-- % } + + +-- HN 2001-02-06 +-- Moved to auxiliaries.c to make it easier to use the inlining option. +-- -- Sigh, for now we just use an error handler that prints an error +-- -- message on the screen +-- %C +-- % static int defaultErrorHandler(Display *d, XErrorEvent *ev) +-- % { +-- % char buffer[1000]; +-- % XGetErrorText(d,ev->error_code,buffer,1000); +-- % printf("Error: %s\n", buffer); +-- % return 0; +-- % } + + +%fun setDefaultErrorHandler :: IO () +%code XSetErrorHandler(defaultErrorHandler); + + +-- %fun XSetIOErrorHandler :: IOErrorHandler -> IO IOErrorHandler +-- %fun XSetErrorHandler :: ErrorHandler -> IO ErrorHandler + +-- XGetErrorDatabaseText omitted +-- XGetErrorText omitted + +-- ---------------------------------------------------------------- +-- -- Buffers +-- ---------------------------------------------------------------- +-- +-- -- OLD: Would arrays be more appropriate? +-- -- +-- -- IMPURE void XStoreBytes(display, bytes, nbytes) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN list[nbytes] Byte bytes +-- -- +-- -- IMPURE list[nbytes] Byte XFetchBytes(display, &nbytes) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- +-- -- IMPURE void XStoreBuffer(display, bytes, nbytes, buffer) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN list[nbytes] Byte bytes +-- -- IN Buffer buffer +-- -- +-- -- IMPURE list[nbytes] Byte XFetchBuffer(display, &nbytes, buffer) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN Buffer buffer +-- -- +-- -- IMPURE void XRotateBuffers(display, rotate) +-- -- IN Display* display +-- -- VAR Int rotate + +---------------------------------------------------------------- +-- Extensions +---------------------------------------------------------------- + +-- ToDo: Use XFreeExtensionList +-- %fun XListExtensions :: Display -> IO ListString using res1 = XListExtensions(arg1,&res1_size) + +-- %errfun False XQueryExtension :: Display -> String -> IO (Int,Int,Int) using res4 = XQueryExtension(arg1,arg2,&res1,&res2,&res3)->(res1,res2,res3) +-- %fun XInitExtensions :: Display -> String -> IO XExtCodes +-- %fun XAddExtensions :: Display -> IO XExtCodes + +-- XAddToExtensionList omitted +-- XFindOnExtensionList omitted +-- XEHeadOfExtensionList omitted + +---------------------------------------------------------------- +-- Hosts +---------------------------------------------------------------- + +-- ToDo: operations to construct and destruct an XHostAddress + +-- %fun XAddHost :: Display -> XHostAddress -> IO () +-- %fun XRemoveHost :: Display -> XHostAddress -> IO () +-- +-- %fun XAddHosts :: Display -> ListXHostAddress -> IO () using XAddHosts(arg1,arg2,arg2_size) +-- %fun XRemoveHosts :: Display -> ListXHostAddress -> IO () using XRemoveHosts(arg1,arg2,arg2_size) +-- +-- -- Uses %prim to let us call XFree +-- %prim XListHosts :: Display -> IO (ListXHostAddress, Bool) +-- Bool state; +-- Int r_size; +-- XHostAddress* r = XListHosts(arg1,&r_size,&state); +-- %update(r,state); +-- XFree(r); +-- return; + +-- %fun XEnableAccessControl :: Display -> IO () +-- %fun XDisableAccessControl :: Display -> IO () +-- %fun XSetAccessControl :: Display -> Access -> IO () + + +---------------------------------------------------------------- +-- Geometry +---------------------------------------------------------------- + +%fun XGeometry :: Display -> Int -> String -> String -> Dimension -> Dimension -> Dimension -> Int -> Int -> IO (Int, Position, Position, Dimension, Dimension) +%code res1 = XGeometry(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,&res2,&res3,&res4,&res5) + +%fun XGetGeometry :: Display -> Int -> Drawable -> IO (Window, Position, Position, Dimension, Dimension, Dimension, Int) +%code Status err = XGetGeometry(arg1,arg2,&res1,&res2,&res3,&res4,&res5,&res6,&res7) +%fail { Success != err }{ BadStatus(err,XGetGeometry) } + +-- XParseGeometry omitted (returned bitset too weird) + +---------------------------------------------------------------- +-- Locale +---------------------------------------------------------------- + +%fun XSupportsLocale :: IO Bool +%fun XSetLocaleModifiers :: String -> IO String + +---------------------------------------------------------------- +-- Screen Saver +---------------------------------------------------------------- + +type AllowExposuresMode = Int +%dis allowExposuresMode x = int x +%const AllowExposuresMode +% [ DontAllowExposures +% , AllowExposures +% , DefaultExposures +% ] + +type PreferBlankingMode = Int +%dis preferBlankingMode x = int x +%const PreferBlankingMode +% [ DontPreferBlanking +% , PreferBlanking +% , DefaultBlanking +% ] + +type ScreenSaverMode = Int +%dis screenSaverMode x = int x +%const ScreenSaverMode +% [ ScreenSaverActive +% , ScreenSaverReset +% ] + +%fun XGetScreenSaver :: Display -> IO (Int, Int, PreferBlankingMode, AllowExposuresMode) +%code XGetScreenSaver(arg1,&res1,&res2,&res3,&res4) + +%fun XSetScreenSaver :: Display -> Int -> Int -> PreferBlankingMode -> AllowExposuresMode -> IO () +%fun XActivateScreenSaver :: Display -> IO () +%fun XResetScreenSaver :: Display -> IO () +%fun XForceScreenSaver :: Display -> ScreenSaverMode -> IO () + + +---------------------------------------------------------------- +-- Pointer +---------------------------------------------------------------- + +%fun XGetPointerControl :: Display -> IO (Int, Int, Int) +%code XGetPointerControl(arg1,&res1,&res2,&res3) + +%fun XWarpPointer :: Display -> Window -> Window -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () + +-- XGetPointerMapping omitted +-- XSetPointerMapping omitted + +---------------------------------------------------------------- +-- Visuals +---------------------------------------------------------------- + +-- XVisualIDFromVisual omitted + + +---------------------------------------------------------------- +-- Threads +---------------------------------------------------------------- + +-- XInitThreads omitted (leary of thread stuff) +-- XLockDisplay omitted (leary of thread stuff) +-- XUnlockDisplay omitted (leary of thread stuff) + +---------------------------------------------------------------- +-- Pixmaps +---------------------------------------------------------------- + +%fun XCreatePixmap :: Display -> Drawable -> Dimension -> Dimension -> Int -> IO Pixmap +%fun XFreePixmap :: Display -> Pixmap -> IO () + +-- XCreatePixmapFromBitmapData omitted (type looks strange) + +-- %fun XListPixmapFormatValues = res1 = XListPixmapFormatValues(display, &res1_size) :: Display -> ListXPixmapFormatValues + +---------------------------------------------------------------- +-- Bitmaps +---------------------------------------------------------------- + +-- ToDo: do these need to be available to the programmer? +-- Maybe I could just wire them into all other operations? + +%fun XBitmapBitOrder :: Display -> ByteOrder +%fun XBitmapUnit :: Display -> Int +%fun XBitmapPad :: Display -> Int + +-- ToDo: make sure that initialisation works correctly for x/y_hot +-- omitted +-- IMPURE void XWriteBitmapFile(display, filename, bitmap, width, height, x_hot, y_hot) RAISES Either +-- RETURNTYPE BitmapFileStatus +-- GLOBAL ERROR BitmapFileStatus RETVAL +-- IN Display* display +-- IN String filename +-- IN Pixmap bitmap +-- IN Dimension width +-- IN Dimension height +-- IN Maybe Int x_hot = -1 +-- IN Maybe Int y_hot = -1 +-- POST: RETVAL == BitmapSuccess + +-- omitted +-- IMPURE void XReadBitmapFile(display, d, filename, bitmap, width, height, x_hot, y_hot) RAISES Either +-- RETURNTYPE BitmapFileStatus +-- GLOBAL ERROR BitmapFileStatus RETVAL +-- IN Display* display +-- IN Drawable d +-- IN String filename +-- OUT Pixmap bitmap +-- OUT Dimension width +-- OUT Dimension height +-- OUT Int x_hot RAISES Maybe IF x_hot == -1 +-- OUT Int y_hot RAISES Maybe IF x_hot == -1 +-- POST: RETVAL == BitmapSuccess + +-- XCreateBitmapFromData omitted (awkward looking type) +-- XReadBitmapFileData omitted (awkward looking type) + + +---------------------------------------------------------------- +-- Keycodes +---------------------------------------------------------------- + +%fun XDisplayKeycodes :: Display -> (Int,Int) +%code XDisplayKeycodes(arg1,&res1,&res2) +%fun XLookupKeysym :: XKeyEventPtr -> Int -> IO KeySym +%fun XKeycodeToKeysym :: Display -> KeyCode -> Int -> IO KeySym +%fun XKeysymToKeycode :: Display -> KeySym -> IO KeyCode +%fun XKeysymToString :: KeySym -> String +%fun XStringToKeysym :: String -> KeySym + +-- I should not need to do this: the argument to maybeT below _should_ +-- be treated as a C expression. +%const KeySym [NoSymbol] + +-- I tried to allocate the buffer below on the stack, but that was not a +-- good idea since the unmarshalling takes place in another stack frame. +-- I could use malloc, but then it seems tricky to free _after_ unmarshalling. +-- (%end free(buf) does not work: frees buffer too early.) +-- Making the buffer static works, but is potentially not thread safe. +-- But: the graphics library does not use X in a threadsafe way anyway +-- (does not import/call XInitThreads) and GHC is single threaded as far as +-- the external world is concerned(?). +-- OK, go static for now. Introduce a mutex if needs be. +-- XLookupString cannot handle compose, it seems. +%fun XLookupString :: XKeyEventPtr -> IO (Maybe KeySym, String) +%call (xKeyEventPtr e) +%code static char buf[100]; +% int n; +% KeySym ks; +% n = XLookupString(e, buf, 100, &ks, NULL); +%result (maybeT {noSymbol}(keySym ks), stringLen buf n) -- I meant "NoSymbol". + +-- XQueryKeymap omitted +-- XRebindKeysym omitted +-- XDeleteModifiermapEntry omitted +-- XInsertModifiermapEntry omitted +-- XNewModifiermap omitted +-- XFreeModifiermap omitted +-- XSetModifierMapping omitted +-- XGetModifierMapping omitted +-- XGetKeyboardMapping omitted + +---------------------------------------------------------------- +-- Image +---------------------------------------------------------------- + +-- XCreateImage omitted +-- XInitImage omitted +-- XGetImage omitted +-- XPutImage omitted +-- XGetSubImage omitted + +---------------------------------------------------------------- +-- Icons +---------------------------------------------------------------- + +%fun XGetIconName :: Display -> Window -> IO String +%code Status err = XGetIconName(arg1,arg2,&res1) +%fail { Success != err }{ BadStatus(err,XGetIconName) } + +%fun XSetIconName :: Display -> Window -> String -> IO () + +---------------------------------------------------------------- +-- Cursors +---------------------------------------------------------------- + +%fun XDefineCursor :: Display -> Window -> Cursor -> IO () +%fun XUndefineCursor :: Display -> Window -> IO () + +%fun XCreatePixmapCursor :: Display -> Pixmap -> Pixmap -> Color -> Color -> Dimension -> Dimension -> IO Cursor +%code res1 = XCreatePixmapCursor(arg1,arg2,arg3,&arg4,&arg5,arg6,arg7) + +%fun XCreateGlyphCursor :: Display -> Font -> Font -> Glyph -> Glyph -> Color -> Color -> IO Cursor +%code res1 = XCreateGlyphCursor(arg1,arg2,arg3,arg4,arg5,&arg6,&arg7) + +%fun XCreateFontCursor :: Display -> Glyph -> IO Cursor +%fun XFreeCursor :: Display -> Font -> IO () +%fun XRecolorCursor :: Display -> Cursor -> Color -> Color -> IO () +%code XRecolorCursor(arg1,arg2,&arg3,&arg4) + +---------------------------------------------------------------- +-- Window Manager stuff +---------------------------------------------------------------- + +-- XConfigureWMWindow omitted (can't find documentation) +-- XReconfigureWMWindow omitted (can't find documentation) +-- XWMGeometry omitted (can't find documentation) +-- XGetWMColormapWindows omitted (can't find documentation) +-- XSetWMColormapWindows omitted (can't find documentation) +-- XGetWMProtocols omitted + +-- AC, 1/9/2000: Added definition for XSetWMProtocols +%fun XSetWMProtocols :: Display -> Window -> ListAtom -> IO () +%call (display arg1) (window arg2) (listAtom arg3 arg3_size) +%code XSetWMProtocols(arg1,arg2,arg3,arg3_size) +%end free(arg3) + + +---------------------------------------------------------------- +-- Set Window Attributes +---------------------------------------------------------------- + +-- The following code is based on what you get from the %ptr declaration. +-- ToDo: generate this kind of stuff automatically. + +%fun allocXSetWindowAttributes :: IO XSetWindowAttributesPtr +%code res1 = (void*)malloc(sizeof(XSetWindowAttributes)) + + +-- toXSetWindowAttributesPtr x = x +-- fromXSetWindowAttributesPtr x = x +-- +-- instance Pointer XSetWindowAttributesPtr where +-- toPtr = fromXSetWindowAttributesPtr +-- fromPtr = toXSetWindowAttributesPtr +-- alloc = malloc sizeofXSetWindowAttributes +-- plus p x = fromPtr (plusPtr (toPtr p) (x * sizeofXSetWindowAttributes)) +-- minus p q = (toPtr p `minusPtr` toPtr q) `div` sizeofXSetWindowAttributes +-- %}} +-- +-- %type : XSetWindowAttributesPtr : XSetWindowAttributes* arg1 : %pack(Ptr,arg1);% : %unpack(Ptr,arg1,arg2);% +-- +-- %const Int sizeofXSetWindowAttributes = sizeof(XSetWindowAttributes) + +---------------- Access to individual fields ---------------- + +%fun set_background_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () +%code arg1->background_pixmap = arg2; + +%fun set_background_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +%code arg1->background_pixel = arg2; + +%fun set_border_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () +%code arg1->border_pixmap = arg2; + +%fun set_border_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +%code arg1->border_pixel = arg2; + +%fun set_bit_gravity :: XSetWindowAttributesPtr -> BitGravity -> IO () +%code arg1->bit_gravity = arg2; + +%fun set_win_gravity :: XSetWindowAttributesPtr -> WindowGravity -> IO () +%code arg1->win_gravity = arg2; + +%fun set_backing_store :: XSetWindowAttributesPtr -> BackingStore -> IO () +%code arg1->backing_store = arg2; + +%fun set_backing_planes :: XSetWindowAttributesPtr -> Pixel -> IO () +%code arg1->backing_planes = arg2; + +%fun set_backing_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +%code arg1->backing_pixel = arg2; + +%fun set_save_under :: XSetWindowAttributesPtr -> Bool -> IO () +%code arg1->save_under = arg2; + +%fun set_event_mask :: XSetWindowAttributesPtr -> EventMask -> IO () +%code arg1->event_mask = arg2; + +%fun set_do_not_propagate_mask :: XSetWindowAttributesPtr -> EventMask -> IO () +%code arg1->do_not_propagate_mask = arg2; + +%fun set_override_redirect :: XSetWindowAttributesPtr -> Bool -> IO () +%code arg1->override_redirect = arg2; + +%fun set_colormap :: XSetWindowAttributesPtr -> Colormap -> IO () +%code arg1->colormap = arg2; + +%fun set_cursor :: XSetWindowAttributesPtr -> Cursor -> IO () +%code arg1->cursor = arg2; + +---------------------------------------------------------------- +-- Drawing +---------------------------------------------------------------- + +%fun XDrawPoint :: Display -> Drawable -> GC -> Position -> Position -> IO () + +%fun XDrawPoints :: Display -> Drawable -> GC -> ListPoint -> CoordinateMode -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (coordinateMode arg5) +%code XDrawPoints(arg1,arg2,arg3,arg4,arg4_size,arg5) +%end free(arg4) + +%fun XDrawLine :: Display -> Drawable -> GC -> Position -> Position -> Position -> Position -> IO () + +%fun XDrawLines :: Display -> Drawable -> GC -> ListPoint -> CoordinateMode -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (coordinateMode arg5) +%code XDrawLines(arg1,arg2,arg3,arg4,arg4_size,arg5) +%end free(arg4) + +%fun XDrawSegments :: Display -> Drawable -> GC -> ListSegment -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listSegment arg4 arg4_size) +%code XDrawSegments(arg1,arg2,arg3,arg4,arg4_size) +%end free(arg4) + +%fun XDrawRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () + +%fun XDrawRectangles :: Display -> Drawable -> GC -> ListRectangle -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listRectangle arg4 arg4_size) +%code XDrawRectangles(arg1,arg2,arg3,arg4,arg4_size) +%end free(arg4) + +%fun XDrawArc :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> IO () + +%fun XDrawArcs :: Display -> Drawable -> GC -> ListArc -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listArc arg4 arg4_size) +%code XDrawArcs(arg1,arg2,arg3,arg4,arg4_size) +%end free(arg4) + +%fun XFillRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () + +%fun XFillRectangles :: Display -> Drawable -> GC -> ListRectangle -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listRectangle arg4 arg4_size) +%code XFillRectangles(arg1,arg2,arg3,arg4,arg4_size) +%end free(arg4) + +%fun XFillPolygon :: Display -> Drawable -> GC -> ListPoint -> PolygonShape -> CoordinateMode -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (polygonShape arg5) (coordinateMode arg6) +%code XFillPolygon(arg1,arg2,arg3,arg4,arg4_size,arg5,arg6) +%end free(arg4) + +%fun XFillArc :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> IO () + +%fun XFillArcs :: Display -> Drawable -> GC -> ListArc -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (listArc arg4 arg4_size) +%code XFillArcs(arg1,arg2,arg3,arg4,arg4_size) +%end free(arg4) + +%fun XCopyArea :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () +%fun XCopyPlane :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> Pixel -> IO () + +-- draw characters over existing background +%fun XDrawString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (position arg4) (position arg5) (stringLen arg6 arg6_size) +%code XDrawString(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size) +%end free(arg6) + +-- draw characters over a blank rectangle of current background colour +%fun XDrawImageString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () +%call (display arg1) (drawable arg2) (gC arg3) (position arg4) (position arg5) (stringLen arg6 arg6_size) +%code XDrawImageString(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size) +%end free(arg6) + +-- XDrawString16 omitted (16bit chars not supported) +-- XDrawImageString16 omitted (16bit chars not supported) +-- XDrawText omitted (XTextItem not supported) +-- XDrawText16 omitted (XTextItem not supported) + +---------------------------------------------------------------- +-- Cut and paste buffers +---------------------------------------------------------------- + +%fun XStoreBuffer :: Display -> String -> Int -> IO () +%call (display arg1) (stringLen arg2 arg2_size) (int arg3) +%code Status err = XStoreBuffer(arg1,arg2,arg2_size,arg3); +%fail { Success != err }{ BadStatus(err,XStoreBuffer) } + +%fun XStoreBytes :: Display -> String -> IO () +%call (display arg1) (stringLen arg2 arg2_size) +%code Status err = XStoreBytes(arg1,arg2,arg2_size); +%fail { Success != err }{ BadStatus(err,XStoreBytes) } + +%fun XFetchBuffer :: Display -> Int -> IO String +%code +% int nbytes; +% char* res1 = XFetchBuffer(arg1, &nbytes, arg2); +%fail { res1 != NULL }{ NullPtr(XFetchBuffer) } +%result (stringLen res1 nbytes) +%end XFree(res1) + +%fun XFetchBytes :: Display -> IO String +%code +% int nbytes; +% char* res1 = XFetchBytes(arg1, &nbytes); +%fail { res1 != NULL }{ NullPtr(XFetchBytes) } +%result (stringLen res1 nbytes) +%end XFree(res1) + +%fun XRotateBuffers :: Display -> Int -> IO () +%code Status err = XRotateBuffers(arg1,arg2) +%fail { Success != err }{ BadStatus(err,XRotateBuffers) } + +---------------------------------------------------------------- +-- Window properties +---------------------------------------------------------------- + +%fun XSetTextProperty :: Display -> Window -> String -> Atom -> IO () +%call (display arg1) (window arg2) (stringLen arg3 arg3_size) (atom arg4) +%code +% XTextProperty p = { arg3, XA_STRING, 8, arg3_size }; +% XSetTextProperty(arg1,arg2,&p,arg4); +%end free(arg3) + +-- %fun XSetStandardProperties :: Display -> Window -> String -> String -> Pixmap -> [String] -> XSizeHints -> IO () +-- %code Status err = XSetStandardProperties(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size,&arg7) +-- %fail { Success != err }{ BadStatus(err,XSetStandardProperties) } + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Region.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of GreenCard declarations for interfacing with Xlib Regions. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Region( + Region, + + RectInRegionResult, + rectangleOut, + rectangleIn, + rectanglePart, + + createRegion, + polygonRegion, + intersectRegion, + subtractRegion, + unionRectWithRegion, + unionRegion, + xorRegion, + emptyRegion, + equalRegion, + pointInRegion, + rectInRegion, + clipBox, + offsetRegion, + shrinkRegion, + setRegion, + + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +%#include "include/HsXlib.h" + +%prefix X + +---------------------------------------------------------------- +-- Regions +---------------------------------------------------------------- + +%dis region x = Region (%ForeignPtr {Region} x {XDestroyRegion}) +newtype Region = Region (ForeignPtr Stub_Region) +data Stub_Region + +type RectInRegionResult = Int +%dis rectInRegionResult x = int x + +-- Return values from XRectInRegion() +%const RectInRegionResult +% [ RectangleOut +% , RectangleIn +% , RectanglePart +% ] + +-- regions deallocation is handled by the GC (ForeignObj magic) +-- so we don't provide XDestroyRegion explicitly +-- no idea what the int is for +-- %fun XDestroyRegion :: Region -> IO Int + +---------------------------------------------------------------- +-- Creating regions +---------------------------------------------------------------- + +-- an empty region +-- (often used as "out argument" to binary operators which return regions) +%fun XCreateRegion :: IO Region + +%fun XPolygonRegion :: ListPoint -> FillRule -> IO Region +%call (listPoint arg1 arg2) (fillRule arg3) + +---------------------------------------------------------------- +-- Combining Regions +-- +-- The usual shoddy state of Xlib documentation fails to mention +-- what the Int is for. +-- +-- All operations overwrite the region in their third argument +-- which is usually a freshly created region. +---------------------------------------------------------------- + +%fun XIntersectRegion :: Region -> Region -> Region -> IO Int +%fun XSubtractRegion :: Region -> Region -> Region -> IO Int +%fun XUnionRectWithRegion :: Rectangle -> Region -> Region -> IO Int +%code res1 = XUnionRectWithRegion(&arg1,arg2,arg3) +%fun XUnionRegion :: Region -> Region -> Region -> IO Int +%fun XXorRegion :: Region -> Region -> Region -> IO Int + +---------------------------------------------------------------- +-- Examining regions (tests, bounding boxes, etc) +---------------------------------------------------------------- + +%fun XEmptyRegion :: Region -> IO Bool +%fun XEqualRegion :: Region -> Region -> IO Bool +%fun XPointInRegion :: Region -> Point -> IO Bool +%code res1 = XPointInRegion(arg1,arg2.x,arg2.y) +%fun XRectInRegion :: Region -> Rectangle -> IO RectInRegionResult +%code res1 = XRectInRegion(arg1,arg2.x,arg2.y,arg2.width,arg2.height) + +-- I have no idea what the int is for +%fun XClipBox :: Region -> IO (Rectangle,Int) +%code res2 = XClipBox(arg1,&res1) + +---------------------------------------------------------------- +-- Modifying regions +-- (If you use any of these, you can't make regions look like +-- first class data structures.) +---------------------------------------------------------------- + +-- translate region +%fun XOffsetRegion :: Region -> Point -> IO Int +%code res1 = XOffsetRegion(arg1,arg2.x,arg2.y) + +-- increase size of region by +ve or -ve number of pixels +-- while preserving the centre of the region (ie half the pixels +-- come off the left, and half off the right) +%fun XShrinkRegion :: Region -> Point -> IO Int +%code res1 = XShrinkRegion(arg1,arg2.x,arg2.y) + +---------------------------------------------------------------- +-- Graphics Context +---------------------------------------------------------------- + +-- set clip mask of GC +%fun XSetRegion :: Display -> GC -> Region -> IO Int + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Screen.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Screen +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of GreenCard declarations for interfacing with Xlib Screens. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Screen( + + blackPixelOfScreen, + whitePixelOfScreen, + cellsOfScreen, + defaultColormapOfScreen, + defaultDepthOfScreen, + defaultGCOfScreen, + defaultVisualOfScreen, + doesBackingStore, + doesSaveUnders, + displayOfScreen, + eventMaskOfScreen, + minCmapsOfScreen, + maxCmapsOfScreen, + rootWindowOfScreen, + widthOfScreen, + widthMMOfScreen, + heightOfScreen, + heightMMOfScreen, + planesOfScreen, + screenNumberOfScreen, + + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +%#include "include/HsXlib.h" + +%prefix X + +---------------------------------------------------------------- +-- Screen +---------------------------------------------------------------- + +-- Many flags assumed to be PURE. + +%fun XBlackPixelOfScreen :: Screen -> Pixel +%fun XWhitePixelOfScreen :: Screen -> Pixel +%fun XCellsOfScreen :: Screen -> Int +%fun XDefaultColormapOfScreen :: Screen -> Colormap +%fun XDefaultDepthOfScreen :: Screen -> Int +%fun XDefaultGCOfScreen :: Screen -> GC +%fun XDefaultVisualOfScreen :: Screen -> Visual +%fun XDoesBackingStore :: Screen -> Bool +%fun XDoesSaveUnders :: Screen -> Bool +%fun DisplayOfScreen :: Screen -> Display + +-- event mask at connection setup time - not current event mask! +%fun XEventMaskOfScreen :: Screen -> EventMask + +%fun XMinCmapsOfScreen :: Screen -> Int +%fun XMaxCmapsOfScreen :: Screen -> Int +%fun XRootWindowOfScreen :: Screen -> Window +%fun XWidthOfScreen :: Screen -> Dimension +%fun XWidthMMOfScreen :: Screen -> Dimension +%fun XHeightOfScreen :: Screen -> Dimension +%fun XHeightMMOfScreen :: Screen -> Dimension +%fun XPlanesOfScreen :: Screen -> Int +%fun XScreenNumberOfScreen :: Screen -> ScreenNumber + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Types.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Types +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of type declarations for interfacing with Xlib. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Types( + module Graphics.X11.Xlib.Types + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types + +import Control.Monad( zipWithM_ ) +import Foreign(mallocBytes, Storable(..)) + +%#include "include/HsXlib.h" + +%prefix X + +---------------------------------------------------------------- +-- Types +---------------------------------------------------------------- + +type Pixel = Word32 +type Position = Int32 +type Dimension = Word32 +type ScreenNumber = Word32 +type Byte = Char +type Buffer = Int + +%dis pixel x = word32 x +%dis position x = int32 x +%dis dimension x = word32 x +%dis screenNumber x = word32 x +%dis byte x = char x +%dis buffer x = int + +newtype Display = Display (Ptr Stub_Display) +newtype Screen = Screen (Ptr Stub_Screen) +newtype Visual = Visual (Ptr Stub_Visual) +newtype FontStruct = FontStruct (Ptr Stub_FontStruct) + +data Stub_Display +data Stub_Screen +data Stub_Visual +data Stub_FontStruct + +%dis display x = Display (ptr ({Display*} x)) +%dis screen x = Screen (ptr ({Screen*} x)) +%dis visual x = Visual (ptr ({Visual*} x)) +%dis fontStruct x = FontStruct (ptr ({XFontStruct*} x)) + +type GC = Ptr Stub_GC +data Stub_GC +%dis gC x = ptr x + +type Point = + ( Position -- x + , Position -- y + ) +%dis point x = declare {XPoint} x in +% ( position {(%x).x} +% , position {(%x).y} +% ) + +type Segment = + ( Position -- x1 + , Position -- y1 + , Position -- x2 + , Position -- y2 + ) +%dis segment x = declare {XSegment} x in +% ( position {(%x).x1} +% , position {(%x).y1} +% , position {(%x).x2} +% , position {(%x).y2} +% ) + +type Rectangle = + ( Position -- x + , Position -- y + , Dimension -- width + , Dimension -- height + ) +%dis rectangle x = declare {XRectangle} x in +% ( position {(%x).x} +% , position {(%x).y} +% , dimension {(%x).width} +% , dimension {(%x).height} +% ) + +type Arc = + ( Position + , Position + , Dimension + , Dimension + , Int + , Int + ) +%dis arc x = declare {XArc} x in +% ( position {(%x).x} +% , position {(%x).y} +% , dimension {(%x).width} +% , dimension {(%x).height} +% , int {(%x).angle1} +% , int {(%x).angle2} +% ) + +type Color = + ( Pixel + , Word16 + , Word16 + , Word16 + , Word8 + ) +%dis color x = declare {XColor} x in +% ( pixel {(%x).pixel} +% , word16 {(%x).red} +% , word16 {(%x).green} +% , word16 {(%x).blue} +% , word8 {(%x).flags} +% ) + +-- We can't use the similarily named library functions for several reasons: +-- 1) They deal with Ptrs instead of Ptr-Len pairs +-- 2) They require instances of Storable but we apply these functions +-- to type synonyms like 'Point = (Int,Int)' which cannot be +-- instances. + +type Storable' a = + ( a -> Int -- sizeOf + , Ptr a -> Int -> IO a -- peekElemOff + , Ptr a -> Int -> a -> IO () -- pokeElemOff + ) + +newArray' :: Storable' a -> [a] -> IO (Ptr a, Int) +newArray' (sz,_,wr) xs = do + p <- mallocBytes (sz undefined * l) + zipWithM_ (wr p) [0..] xs + return (p, l) + where + l = length xs + +peekArray' :: Storable' a -> (Ptr a, Int) -> IO [a] +peekArray' (_,rd,_) (p,l) + | l <= 0 = return [] + | otherwise = f (l-1) [] + where + f 0 acc = do e <- rd p 0; return (e:acc) + f n acc = do e <- rd p n; f (n-1) (e:acc) + +-- don't forget to use %end free(arg?) in conjunction with these guys +type ListPoint = [Point] +%dis listPoint x l = << newArray' s_Point / peekArray' s_Point >> (ptr ({XPoint*} x)) (int l) +type ListRectangle = [Rectangle] +%dis listRectangle x l = << newArray' s_Rectangle / peekArray' s_Rectangle >> (ptr ({XRectangle*} x)) (int l) +type ListArc = [Arc] +%dis listArc x l = << newArray' s_Arc / peekArray' s_Arc >> (ptr ({XArc*} x)) (int l) +type ListSegment = [Segment] +%dis listSegment x l = << newArray' s_Segment / peekArray' s_Segment >> (ptr ({XSegment*} x)) (int l) +type ListColor = [Color] +%dis listColor x l = << newArray' s_Color / peekArray' s_Color >> (ptr ({XColor*} x)) (int l) +type ListPixel = [Pixel] +%dis listPixel x l = << newArray' s_Pixel / peekArray' s_Pixel >> (ptr ({unsigned long*} x)) (int l) +type ListWindow = [Window] +%dis listWindow x l = << newArray' s_Window / peekArray' s_Window >> (ptr ({Window*} x)) (int l) +-- AC, 1/9/2000: Try to define types and marshalling code for Atom lists: +type ListAtom = [Atom] +%dis listAtom x l = << newArray' s_Atom / peekArray' s_Atom >> (ptr ({Atom *} x)) (int l) + +s_Pixel :: Storable' Pixel +s_Pixel = (sizeOf, peekElemOff, pokeElemOff) + +s_Window :: Storable' Window +s_Window = (sizeOf, peekElemOff, pokeElemOff) + +s_Atom :: Storable' Atom +s_Atom = (sizeOf, peekElemOff, pokeElemOff) + +s_Point :: Storable' Point +s_Point = (const sizeOfPoint,readPoint,writePoint) + +%fun writePoint :: Ptr Point -> Int -> Point -> IO () +%call (ptr ({XPoint*} s)) (int i) (point {s[i]}) +%code + +%fun readPoint :: Ptr Point -> Int -> IO Point +%call (ptr ({XPoint*} s)) (int i) +%code +%result (point {s[i]}) + +%fun sizeOfPoint :: Int +%code res1 = sizeof(XPoint) + +s_Rectangle :: Storable' Rectangle +s_Rectangle = (const sizeOfRectangle, readRectangle, writeRectangle ) + +%fun writeRectangle :: Ptr Rectangle -> Int -> Rectangle -> IO () +%call (ptr ({XRectangle*} s)) (int i) (rectangle {s[i]}) +%code + +%fun readRectangle :: Ptr Rectangle -> Int -> IO Rectangle +%call (ptr ({XRectangle*} s)) (int i) +%code +%result (rectangle {s[i]}) + +%fun sizeOfRectangle :: Int +%code res1 = sizeof(XRectangle) + + +s_Arc :: Storable' Arc +s_Arc = (const sizeOfArc, readArc, writeArc ) + +%fun writeArc :: Ptr Arc -> Int -> Arc -> IO () +%call (ptr ({XArc*} s)) (int i) (arc {s[i]}) +%code + +%fun readArc :: Ptr Arc -> Int -> IO Arc +%call (ptr ({XArc*} s)) (int i) +%code +%result (arc {s[i]}) + +%fun sizeOfArc :: Int +%code res1 = sizeof(XArc) + + +s_Segment :: Storable' Segment +s_Segment = (const sizeOfSegment, readSegment, writeSegment ) + +%fun writeSegment :: Ptr Segment -> Int -> Segment -> IO () +%call (ptr ({XSegment*} s)) (int i) (segment {s[i]}) +%code + +%fun readSegment :: Ptr Segment -> Int -> IO Segment +%call (ptr ({XSegment*} s)) (int i) +%code +%result (segment {s[i]}) + +%fun sizeOfSegment :: Int +%code res1 = sizeof(XSegment) + + +s_Color :: Storable' Color +s_Color = (const sizeOfColor, readColor, writeColor ) + +%fun writeColor :: Ptr Color -> Int -> Color -> IO () +%call (ptr ({XColor*} s)) (int i) (color {s[i]}) +%code + +%fun readColor :: Ptr Color -> Int -> IO Color +%call (ptr ({XColor*} s)) (int i) +%code +%result (color {s[i]}) + +%fun sizeOfColor :: Int +%code res1 = sizeof(XColor) + +type XSetWindowAttributesPtr = Ptr Stub_SWA +data Stub_SWA +-- toXSetWindowAttributesPtr :: Addr -> XSetWindowAttributesPtr, +-- fromXSetWindowAttributesPtr :: XSetWindowAttributesPtr -> Ptr +%dis xSetWindowAttributesPtr x = ptr ({XSetWindowAttributes*} x) + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Window.gc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Window +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of GreenCard declarations for interfacing with Xlib Windows. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Window( + storeName, + createSimpleWindow, + createWindow, + translateCoordinates, + moveResizeWindow, + resizeWindow, + moveWindow, + reparentWindow, + mapSubwindows, + unmapSubwindows, + mapWindow, + lowerWindow, + raiseWindow, + circulateSubwindowsDown, + circulateSubwindowsUp, + circulateSubwindows, + iconifyWindow, + withdrawWindow, + destroyWindow, + destroySubwindows, + setWindowBorder, + setWindowBorderPixmap, + setWindowBorderWidth, + setWindowBackground, + setWindowBackgroundPixmap, + setWindowColormap, + addToSaveSet, + removeFromSaveSet, + changeSaveSet, + clearWindow, + clearArea, + restackWindows, + + ) where + +import Graphics.X11.StdDIS +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +%#include "include/HsXlib.h" + +%prefix X + +---------------------------------------------------------------- +-- Windows +---------------------------------------------------------------- + +%fun XStoreName :: Display -> Window -> String -> IO () +%fun XCreateSimpleWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Int -> Pixel -> Pixel -> IO Window + +%fun XCreateWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> WindowClass -> Visual -> AttributeMask -> XSetWindowAttributesPtr -> IO Window + +---------------------------------------------------------------- + +--ToDo: find an effective way to use Maybes +%fun XTranslateCoordinates :: Display -> Window -> Window -> Position -> Position -> IO (Bool,Position,Position,Window) +%code res1 = XTranslateCoordinates(arg1,arg2,arg3,arg4,arg5,&res2,&res3,&res4) + +%fun XMoveResizeWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> IO () +%fun XResizeWindow :: Display -> Window -> Dimension -> Dimension -> IO () +%fun XMoveWindow :: Display -> Window -> Position -> Position -> IO () +%fun XReparentWindow :: Display -> Window -> Window -> Position -> Position -> IO () +%fun XMapSubwindows :: Display -> Window -> IO () +%fun XUnmapSubwindows :: Display -> Window -> IO () +%fun XMapWindow :: Display -> Window -> IO () +-- Disnae exist: %fun XUnmapWindows :: Display -> Window -> IO () +-- Disnae exist: %fun XMapRaisedWindow :: Display -> Window -> IO () +%fun XLowerWindow :: Display -> Window -> IO () +%fun XRaiseWindow :: Display -> Window -> IO () +%fun XCirculateSubwindowsDown :: Display -> Window -> IO () +%fun XCirculateSubwindowsUp :: Display -> Window -> IO () +%fun XCirculateSubwindows :: Display -> Window -> CirculationDirection -> IO () +%fun XIconifyWindow :: Display -> Window -> ScreenNumber -> IO () +%code Status err = XIconifyWindow(arg1,arg2,arg3) +%fail { Success != err }{ BadStatus(err,XIconifyWindow) } +%fun XWithdrawWindow :: Display -> Window -> ScreenNumber -> IO () +%code Status err = XWithdrawWindow(arg1,arg2,arg3) +%fail { Success != err }{ BadStatus(err,XWithdrawWindow) } +%fun XDestroyWindow :: Display -> Window -> IO () +%fun XDestroySubwindows :: Display -> Window -> IO () + +%fun XSetWindowBorder :: Display -> Window -> Pixel -> IO () +%fun XSetWindowBorderPixmap :: Display -> Window -> Pixmap -> IO () +%fun XSetWindowBorderWidth :: Display -> Window -> Dimension -> IO () +%fun XSetWindowBackground :: Display -> Window -> Pixel -> IO () +%fun XSetWindowBackgroundPixmap :: Display -> Window -> Pixmap -> IO () +%fun XSetWindowColormap :: Display -> Window -> Colormap -> IO () + +%fun XAddToSaveSet :: Display -> Window -> IO () +%fun XRemoveFromSaveSet :: Display -> Window -> IO () +%fun XChangeSaveSet :: Display -> Window -> ChangeSaveSetMode -> IO () + +%fun XClearWindow :: Display -> Window -> IO () +%fun XClearArea :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Bool -> IO () + +-- -- This is almost good enough - but doesn't call XFree +-- -- %errfun BadStatus XQueryTree :: Display -> Window -> IO (Window, Window, ListWindow) using err = XQueryTree(arg1,arg2,&res1,&res2,&res3,&res3_size) +-- %prim XQueryTree :: Display -> Window -> IO (Window, Window, ListWindow) +-- Window root_w, parent; +-- Int children_size; +-- Window *children; +-- Status r = XQueryTree(arg1,arg2,&root_w, &parent, &children, &children_size); +-- if (Success != r) { %failWith(BadStatus,r); } +-- %update(root_w,parent,children); +-- XFree(children); +-- return; + +%fun XRestackWindows :: Display -> ListWindow -> IO () +%call (display arg1) (listWindow arg2 arg2_size) +%code XRestackWindows(arg1, arg2, arg2_size) + +-- -- ToDo: I want to be able to write this +-- -- %fun XListInstalledColormaps :: Display -> Window -> IO ListColormap using res1 = XListInstalledColormaps(arg1,arg2,&res1_size) +-- -- But I have to write this instead - need to add a notion of cleanup code! +-- %prim XListInstalledColormaps :: Display -> Window -> IO ListColormap +-- Int r_size; +-- Colormap* r = XListInstalledColormaps(arg1,arg2,&r_size); +-- %update(r); +-- XFree(r); +-- return; +-- +-- -- Again, this is almost good enough +-- -- %errfun BadStatus XGetCommand :: Display -> Window -> IO ListString using err = XGetCommand(arg1,arg2,&res1,&res1_size) +-- -- but not quite +-- -- %prim XGetCommand :: Display -> Window -> IO ListString +-- --Int argv_size; +-- --String *argv; +-- --Status r = XGetCommand(arg1,arg2,&argv,&argv_size); +-- --if (Success != r) { %failWith(BadStatus, r); } +-- -- %update(argv); +-- --XFreeStringList(argv); +-- --return; +-- +-- -- %fun XSetCommand :: Display -> Window -> ListString -> IO () using XSetCommand(arg1,arg2,arg3,res3_size) +-- +-- %errfun BadStatus XGetTransientForHint :: Display -> Window -> IO Window using err = XGetTransientForHint(arg1,arg2,&res1) +-- +-- %fun XSetTransientForHint :: Display -> Window -> Window -> IO () +-- +-- -- XRotateWindowProperties omitted +-- -- XGetWindowProperty omitted +-- +-- -- XGetWindowAttributes omitted +-- -- XChangeWindowAttributes omitted + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib.gc 19 - Pixel, - Position, - Dimension, - ScreenNumber, - Byte, - Buffer, - Display, - Screen, - Visual, - FontStruct, - Region, - GC, - Point, - Segment, - Rectangle, - Arc, - Color, - ListPoint, - ListRectangle, - ListArc, - ListSegment, - ListColor, - ListPixel, - ListWindow, - ListAtom, - allPlanes_aux, - blackPixel, - whitePixel, - connectionNumber, - defaultColormap, - defaultGC, - defaultDepth, - defaultScreen, - defaultScreenOfDisplay, - displayHeight, - displayHeightMM, - displayWidth, - displayWidthMM, - maxRequestSize, - displayMotionBufferSize, - resourceManagerString, - screenResourceString, - displayString, - imageByteOrder, - protocolRevision, - protocolVersion, - serverVendor, - screenCount, - defaultVisual, - displayCells, - displayPlanes, - screenOfDisplay, - defaultRootWindow, - rootWindow, - qLength, - noOp, - openDisplay, - closeDisplay, - rmInitialize, - autoRepeatOff, - autoRepeatOn, - bell, - setCloseDownMode, - lastKnownRequestProcessed, - getInputFocus, - setInputFocus, - grabButton, - ungrabButton, - grabPointer, - ungrabPointer, - grabKey, - ungrabKey, - grabKeyboard, - ungrabKeyboard, - grabServer, - ungrabServer, - queryBestTile, - queryBestStipple, - queryBestCursor, - queryBestSize, - queryPointer, - displayName, - setDefaultErrorHandler, - QueuedMode, - queuedAlready, - queuedAfterFlush, - queuedAfterReading, - XEvent, - XEventPtr, - allocXEvent, - get_EventType, - get_Window, - XKeyEvent, - XKeyEventPtr, - XButtonEvent, - get_KeyEvent, - get_ButtonEvent, - get_MotionEvent, - XMotionEvent, - XExposeEvent, - get_ExposeEvent, - XMappingEvent, - XConfigureEvent, - get_ConfigureEvent, - waitForEvent, - gettimeofday_in_milliseconds, - gettimeofday_in_milliseconds_internal, - flush, - sync, - pending, - eventsQueued, - nextEvent, - allowEvents, - selectInput, - sendEvent, - windowEvent, - checkWindowEvent, - maskEvent, - checkMaskEvent, - checkTypedEvent, - checkTypedWindowEvent, - putBackEvent, - peekEvent, - refreshKeyboardMapping, - geometry, - getGeometry, - supportsLocale, - setLocaleModifiers, - AllowExposuresMode, - dontAllowExposures, - allowExposures, - defaultExposures, - PreferBlankingMode, - dontPreferBlanking, - preferBlanking, - defaultBlanking, - ScreenSaverMode, - screenSaverActive, - screenSaverReset, - getScreenSaver, - setScreenSaver, - activateScreenSaver, - resetScreenSaver, - forceScreenSaver, - getPointerControl, - warpPointer, - blackPixelOfScreen, - whitePixelOfScreen, - cellsOfScreen, - defaultColormapOfScreen, - defaultDepthOfScreen, - defaultGCOfScreen, - defaultVisualOfScreen, - doesBackingStore, - doesSaveUnders, - displayOfScreen, - eventMaskOfScreen, - minCmapsOfScreen, - maxCmapsOfScreen, - rootWindowOfScreen, - widthOfScreen, - widthMMOfScreen, - heightOfScreen, - heightMMOfScreen, - planesOfScreen, - screenNumberOfScreen, - setArcMode, - setBackground, - setForeground, - setFunction, - setGraphicsExposures, - setClipMask, - setClipOrigin, - setDashes, - setFillRule, - setFillStyle, - setFont, - setLineAttributes, - setPlaneMask, - setState, - setStipple, - setSubwindowMode, - setTSOrigin, - setTile, - createGC, - gContextFromGC, - freeGC, - flushGC, - copyGC, - createPixmap, - freePixmap, - bitmapBitOrder, - bitmapUnit, - bitmapPad, - lookupColor, - allocNamedColor, - allocColor, - parseColor, - freeColors, - storeColor, - queryColor, - queryColors, - installColormap, - uninstallColormap, - copyColormapAndFree, - createColormap, - freeColormap, - Glyph, - queryFont, - fontFromGC, - loadQueryFont, - freeFont, - fontFromFontStruct, - ascentFromFontStruct, - descentFromFontStruct, - CharStruct, - textExtents, - textWidth, - internAtom, - displayKeycodes, - lookupKeysym, - keycodeToKeysym, - keysymToKeycode, - keysymToString, - stringToKeysym, - noSymbol, - lookupString, - getIconName, - setIconName, - defineCursor, - undefineCursor, - createPixmapCursor, - createGlyphCursor, - createFontCursor, - freeCursor, - recolorCursor, - setWMProtocols, - XSetWindowAttributesPtr, - allocXSetWindowAttributes, - set_background_pixmap, - set_background_pixel, - set_border_pixmap, - set_border_pixel, - set_bit_gravity, - set_win_gravity, - set_backing_store, - set_backing_planes, - set_backing_pixel, - set_save_under, - set_event_mask, - set_do_not_propagate_mask, - set_override_redirect, - set_colormap, - set_cursor, - storeName, - createSimpleWindow, - createWindow, - translateCoordinates, - moveResizeWindow, - resizeWindow, - moveWindow, - reparentWindow, - mapSubwindows, - unmapSubwindows, - mapWindow, - lowerWindow, - raiseWindow, - circulateSubwindowsDown, - circulateSubwindowsUp, - circulateSubwindows, - iconifyWindow, - withdrawWindow, - destroyWindow, - destroySubwindows, - setWindowBorder, - setWindowBorderPixmap, - setWindowBorderWidth, - setWindowBackground, - setWindowBackgroundPixmap, - setWindowColormap, - addToSaveSet, - removeFromSaveSet, - changeSaveSet, - clearWindow, - clearArea, - restackWindows, - drawPoint, - drawPoints, - drawLine, - drawLines, - drawSegments, - drawRectangle, - drawRectangles, - drawArc, - drawArcs, - fillRectangle, - fillRectangles, - fillPolygon, - fillArc, - fillArcs, - copyArea, - copyPlane, - drawString, - drawImageString, - storeBuffer, - storeBytes, - fetchBuffer, - fetchBytes, - rotateBuffers, - - pRIMARY, - sECONDARY, - aRC, - aTOM, - bITMAP, - cARDINAL, - cOLORMAP, - cURSOR, - cUT_BUFFER0, - cUT_BUFFER1, - cUT_BUFFER2, - cUT_BUFFER3, - cUT_BUFFER4, - cUT_BUFFER5, - cUT_BUFFER6, - cUT_BUFFER7, - dRAWABLE, - fONT, - iNTEGER, - pIXMAP, - pOINT, - rECTANGLE, - rESOURCE_MANAGER, - rGB_COLOR_MAP, - rGB_BEST_MAP, - rGB_BLUE_MAP, - rGB_DEFAULT_MAP, - rGB_GRAY_MAP, - rGB_GREEN_MAP, - rGB_RED_MAP, - sTRING, - vISUALID, - wINDOW, - wM_COMMAND, - wM_HINTS, - wM_CLIENT_MACHINE, - wM_ICON_NAME, - wM_ICON_SIZE, - wM_NAME, - wM_NORMAL_HINTS, - wM_SIZE_HINTS, - wM_ZOOM_HINTS, - mIN_SPACE, - nORM_SPACE, - mAX_SPACE, - eND_SPACE, - sUPERSCRIPT_X, - sUPERSCRIPT_Y, - sUBSCRIPT_X, - sUBSCRIPT_Y, - uNDERLINE_POSITION, - uNDERLINE_THICKNESS, - sTRIKEOUT_ASCENT, - sTRIKEOUT_DESCENT, - iTALIC_ANGLE, - x_HEIGHT, - qUAD_WIDTH, - wEIGHT, - pOINT_SIZE, - rESOLUTION, - cOPYRIGHT, - nOTICE, - fONT_NAME, - fAMILY_NAME, - fULL_NAME, - cAP_HEIGHT, - wM_CLASS, - wM_TRANSIENT_FOR, - lAST_PREDEFINED, - - setTextProperty, + module Graphics.X11.Xlib.Types, + module Graphics.X11.Xlib.Event, + module Graphics.X11.Xlib.Display, + module Graphics.X11.Xlib.Screen, + module Graphics.X11.Xlib.Window, + module Graphics.X11.Xlib.Context, + module Graphics.X11.Xlib.Color, + module Graphics.X11.Xlib.Font, + module Graphics.X11.Xlib.Atom, + module Graphics.X11.Xlib.Region, + module Graphics.X11.Xlib.Misc, hunk ./Graphics/X11/Xlib.gc 31 - RectInRegionResult, - rectangleOut, - rectangleIn, - rectanglePart, - createRegion, - polygonRegion, - intersectRegion, - subtractRegion, - unionRectWithRegion, - unionRegion, - xorRegion, - emptyRegion, - equalRegion, - pointInRegion, - rectInRegion, - clipBox, - offsetRegion, - shrinkRegion, - setRegion, - hunk ./Graphics/X11/Xlib.gc 33 -import Graphics.X11.StdDIS hunk ./Graphics/X11/Xlib.gc 34 +import Graphics.X11.Xlib.Types +import Graphics.X11.Xlib.Event +import Graphics.X11.Xlib.Display +import Graphics.X11.Xlib.Screen +import Graphics.X11.Xlib.Window +import Graphics.X11.Xlib.Context +import Graphics.X11.Xlib.Color +import Graphics.X11.Xlib.Font +import Graphics.X11.Xlib.Atom +import Graphics.X11.Xlib.Region +import Graphics.X11.Xlib.Misc hunk ./Graphics/X11/Xlib.gc 46 -import Control.Monad( zipWithM_ ) -import Foreign(mallocBytes, Storable(..)) +import Graphics.X11.StdDIS hunk ./Graphics/X11/Xlib.gc 51 -%prefix XA_ - -type Pixel = Word32 -type Position = Int32 -type Dimension = Word32 -type ScreenNumber = Word32 -type Byte = Char -type Buffer = Int - -%dis pixel x = word32 x -%dis position x = int32 x -%dis dimension x = word32 x -%dis screenNumber x = word32 x -%dis byte x = char x -%dis buffer x = int - -newtype Display = Display (Ptr Stub_Display) -newtype Screen = Screen (Ptr Stub_Screen) -newtype Visual = Visual (Ptr Stub_Visual) -newtype FontStruct = FontStruct (Ptr Stub_FontStruct) -newtype Region = Region (ForeignPtr Stub_Region) - -data Stub_Display -data Stub_Screen -data Stub_Visual -data Stub_FontStruct -data Stub_Region - -%dis display x = Display (ptr ({Display*} x)) -%dis screen x = Screen (ptr ({Screen*} x)) -%dis visual x = Visual (ptr ({Visual*} x)) -%dis fontStruct x = FontStruct (ptr ({XFontStruct*} x)) -%dis region x = Region (%ForeignPtr {Region} x {XDestroyRegion}) - -type GC = Ptr Stub_GC -data Stub_GC -%dis gC x = ptr x - -type Point = - ( Position -- x - , Position -- y - ) -%dis point x = declare {XPoint} x in -% ( position {(%x).x} -% , position {(%x).y} -% ) - -type Segment = - ( Position -- x1 - , Position -- y1 - , Position -- x2 - , Position -- y2 - ) -%dis segment x = declare {XSegment} x in -% ( position {(%x).x1} -% , position {(%x).y1} -% , position {(%x).x2} -% , position {(%x).y2} -% ) - -type Rectangle = - ( Position -- x - , Position -- y - , Dimension -- width - , Dimension -- height - ) -%dis rectangle x = declare {XRectangle} x in -% ( position {(%x).x} -% , position {(%x).y} -% , dimension {(%x).width} -% , dimension {(%x).height} -% ) - -type Arc = - ( Position - , Position - , Dimension - , Dimension - , Int - , Int - ) -%dis arc x = declare {XArc} x in -% ( position {(%x).x} -% , position {(%x).y} -% , dimension {(%x).width} -% , dimension {(%x).height} -% , int {(%x).angle1} -% , int {(%x).angle2} -% ) - -type Color = - ( Pixel - , Word16 - , Word16 - , Word16 - , Word8 - ) -%dis color x = declare {XColor} x in -% ( pixel {(%x).pixel} -% , word16 {(%x).red} -% , word16 {(%x).green} -% , word16 {(%x).blue} -% , word8 {(%x).flags} -% ) - --- We can't use the similarily named library functions for several reasons: --- 1) They deal with Ptrs instead of Ptr-Len pairs --- 2) They require instances of Storable but we apply these functions --- to type synonyms like 'Point = (Int,Int)' which cannot be --- instances. - -type Storable' a = - ( a -> Int -- sizeOf - , Ptr a -> Int -> IO a -- peekElemOff - , Ptr a -> Int -> a -> IO () -- pokeElemOff - ) - -newArray' :: Storable' a -> [a] -> IO (Ptr a, Int) -newArray' (sz,_,wr) xs = do - p <- mallocBytes (sz undefined * l) - zipWithM_ (wr p) [0..] xs - return (p, l) - where - l = length xs - -peekArray' :: Storable' a -> (Ptr a, Int) -> IO [a] -peekArray' (_,rd,_) (p,l) - | l <= 0 = return [] - | otherwise = f (l-1) [] - where - f 0 acc = do e <- rd p 0; return (e:acc) - f n acc = do e <- rd p n; f (n-1) (e:acc) - --- don't forget to use %end free(arg?) in conjunction with these guys -type ListPoint = [Point] -%dis listPoint x l = << newArray' s_Point / peekArray' s_Point >> (ptr ({XPoint*} x)) (int l) -type ListRectangle = [Rectangle] -%dis listRectangle x l = << newArray' s_Rectangle / peekArray' s_Rectangle >> (ptr ({XRectangle*} x)) (int l) -type ListArc = [Arc] -%dis listArc x l = << newArray' s_Arc / peekArray' s_Arc >> (ptr ({XArc*} x)) (int l) -type ListSegment = [Segment] -%dis listSegment x l = << newArray' s_Segment / peekArray' s_Segment >> (ptr ({XSegment*} x)) (int l) -type ListColor = [Color] -%dis listColor x l = << newArray' s_Color / peekArray' s_Color >> (ptr ({XColor*} x)) (int l) -type ListPixel = [Pixel] -%dis listPixel x l = << newArray' s_Pixel / peekArray' s_Pixel >> (ptr ({unsigned long*} x)) (int l) -type ListWindow = [Window] -%dis listWindow x l = << newArray' s_Window / peekArray' s_Window >> (ptr ({Window*} x)) (int l) --- AC, 1/9/2000: Try to define types and marshalling code for Atom lists: -type ListAtom = [Atom] -%dis listAtom x l = << newArray' s_Atom / peekArray' s_Atom >> (ptr ({Atom *} x)) (int l) - -s_Pixel :: Storable' Pixel -s_Pixel = (sizeOf, peekElemOff, pokeElemOff) - -s_Window :: Storable' Window -s_Window = (sizeOf, peekElemOff, pokeElemOff) - -s_Atom :: Storable' Atom -s_Atom = (sizeOf, peekElemOff, pokeElemOff) - -s_Point :: Storable' Point -s_Point = (const sizeOfPoint,readPoint,writePoint) - -%fun writePoint :: Ptr Point -> Int -> Point -> IO () -%call (ptr ({XPoint*} s)) (int i) (point {s[i]}) -%code - -%fun readPoint :: Ptr Point -> Int -> IO Point -%call (ptr ({XPoint*} s)) (int i) -%code -%result (point {s[i]}) - -%fun sizeOfPoint :: Int -%code res1 = sizeof(XPoint) - -s_Rectangle :: Storable' Rectangle -s_Rectangle = (const sizeOfRectangle, readRectangle, writeRectangle ) - -%fun writeRectangle :: Ptr Rectangle -> Int -> Rectangle -> IO () -%call (ptr ({XRectangle*} s)) (int i) (rectangle {s[i]}) -%code - -%fun readRectangle :: Ptr Rectangle -> Int -> IO Rectangle -%call (ptr ({XRectangle*} s)) (int i) -%code -%result (rectangle {s[i]}) - -%fun sizeOfRectangle :: Int -%code res1 = sizeof(XRectangle) - - -s_Arc :: Storable' Arc -s_Arc = (const sizeOfArc, readArc, writeArc ) - -%fun writeArc :: Ptr Arc -> Int -> Arc -> IO () -%call (ptr ({XArc*} s)) (int i) (arc {s[i]}) -%code - -%fun readArc :: Ptr Arc -> Int -> IO Arc -%call (ptr ({XArc*} s)) (int i) -%code -%result (arc {s[i]}) - -%fun sizeOfArc :: Int -%code res1 = sizeof(XArc) - - -s_Segment :: Storable' Segment -s_Segment = (const sizeOfSegment, readSegment, writeSegment ) - -%fun writeSegment :: Ptr Segment -> Int -> Segment -> IO () -%call (ptr ({XSegment*} s)) (int i) (segment {s[i]}) -%code - -%fun readSegment :: Ptr Segment -> Int -> IO Segment -%call (ptr ({XSegment*} s)) (int i) -%code -%result (segment {s[i]}) - -%fun sizeOfSegment :: Int -%code res1 = sizeof(XSegment) - - -s_Color :: Storable' Color -s_Color = (const sizeOfColor, readColor, writeColor ) - -%fun writeColor :: Ptr Color -> Int -> Color -> IO () -%call (ptr ({XColor*} s)) (int i) (color {s[i]}) -%code - -%fun readColor :: Ptr Color -> Int -> IO Color -%call (ptr ({XColor*} s)) (int i) -%code -%result (color {s[i]}) - -%fun sizeOfColor :: Int -%code res1 = sizeof(XColor) - - -%fun AllPlanes_aux :: Pixel -%fun BlackPixel :: Display -> ScreenNumber -> Pixel -%fun WhitePixel :: Display -> ScreenNumber -> Pixel - --- This may vary from one execution to another but I believe it --- is constant during any given execution and so it can be made PURE --- without breaking referential transparency. --- --- Note: underneath the opaque name, it turns out that this --- is the file descriptor. You need to know this if you want to --- use select. -%fun ConnectionNumber :: Display -> Int - -%fun DefaultColormap :: Display -> ScreenNumber -> Colormap - --- %fun XListDepths :: Display -> ScreenNumber -> ListInt using res1 = XListDepths(arg1,arg2,&res1_size) - -%fun DefaultGC :: Display -> ScreenNumber -> GC -%fun DefaultDepth :: Display -> ScreenNumber -> Int -%fun DefaultScreen :: Display -> ScreenNumber -%fun DefaultScreenOfDisplay :: Display -> Screen -%fun DisplayHeight :: Display -> ScreenNumber -> Int -%fun DisplayHeightMM :: Display -> ScreenNumber -> Int -%fun DisplayWidth :: Display -> ScreenNumber -> Int -%fun DisplayWidthMM :: Display -> ScreenNumber -> Int -%fun XMaxRequestSize :: Display -> Int -%fun XDisplayMotionBufferSize:: Display -> Int ---Disnae exist in X11R5 %fun XExtendedMaxRequestSize :: Display -> Int -%fun XResourceManagerString :: Display -> String -%fun XScreenResourceString :: Screen -> String -%fun DisplayString :: Display -> String -%fun ImageByteOrder :: Display -> Int -%fun ProtocolRevision :: Display -> Int -%fun ProtocolVersion :: Display -> Int -%fun ServerVendor :: Display -> String ---Disnae exist: %fun XServerRelease :: Display -> Int -%fun ScreenCount :: Display -> Int -%fun DefaultVisual :: Display -> ScreenNumber -> Visual -%fun DisplayCells :: Display -> ScreenNumber -> Int -%fun DisplayPlanes :: Display -> ScreenNumber -> Int -%fun ScreenOfDisplay :: Display -> ScreenNumber -> Screen -%fun DefaultRootWindow :: Display -> Window - --- The following are believed to be order dependent - -%fun XRootWindow :: Display -> ScreenNumber -> IO Window -%fun XQLength :: Display -> IO Int - -%fun XNoOp :: Display -> IO () - -%fun XOpenDisplay :: String -> IO Display -%fail {res1 == 0} { NullPtr(XOpenDisplay) } - -%fun XCloseDisplay :: Display -> IO () - --- I'm not sure why I added this since I don't have any of the related --- functions. -%fun XrmInitialize :: IO () - --- %fun XGetDefault :: Display -> String -> String -> IO () - -%fun XAutoRepeatOff :: Display -> IO () -%fun XAutoRepeatOn :: Display -> IO () -%fun XBell :: Display -> Int -> IO () -%fun XSetCloseDownMode :: Display -> CloseDownMode -> IO () -%fun XLastKnownRequestProcessed :: Display -> IO Int - -%fun XGetInputFocus :: Display -> IO (Window, FocusMode) -%code XGetInputFocus(arg1,&res1,&res2); - -%fun XSetInputFocus :: Display -> Window -> FocusMode -> Time -> IO () - --- XAllocID omitted --- XKillClient omitted --- XFetchName omitted --- XGetKeyboardControl omitted --- XChangeKeyboardControl omitted --- XChangeKeyboardMapping omitted --- XChangePointerControl omitted - -%fun XGrabButton :: Display -> Button -> ButtonMask -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> IO () -%fun XUngrabButton :: Display -> Button -> ButtonMask -> Window -> IO () - -%fun XGrabPointer :: Display -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> Time -> IO GrabStatus -%fun XUngrabPointer :: Display -> Time -> IO () - -%fun XGrabKey :: Display -> KeyCode -> ButtonMask -> Window -> Bool -> GrabMode -> GrabMode -> IO () -%fun XUngrabKey :: Display -> KeyCode -> ButtonMask -> Window -> IO () - -%fun XGrabKeyboard :: Display -> Window -> Bool -> GrabMode -> GrabMode -> Time -> IO GrabStatus -%fun XUngrabKeyboard :: Display -> Time -> IO () - -%fun XGrabServer :: Display -> IO () -%fun XUngrabServer :: Display -> IO () - --- XChangeActivePointerGrab omitted - --- XFree omitted --- XFreeStringList omitted - -%fun XQueryBestTile :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) -%code Status err = XQueryBestTile(arg1,arg2,arg3,arg4,&res1,&res2) -%fail { Success != err }{ BadStatus(err,XQueryBestTile) } - -%fun XQueryBestStipple :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) -%code Status err = XQueryBestStipple(arg1,arg2,arg3,arg4,&res1,&res2) -%fail { Success != err }{ BadStatus(err,XQueryBestStipple) } - -%fun XQueryBestCursor :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) -%code Status err = XQueryBestCursor(arg1,arg2,arg3,arg4,&res1,&res2) -%fail { Success != err }{ BadStatus(err,XQueryBestCursor) } - -%fun XQueryBestSize :: Display -> Drawable -> QueryBestSizeClass -> Dimension -> Dimension -> IO (Dimension, Dimension) -%code Status err = XQueryBestSize(arg1,arg2,arg3,arg4,arg5,&res1,&res2) -%fail { Success != err }{ BadStatus(err,XQueryBestSize) } - --- Note: Returns false if pointer not in window w (and win_x = win_y = 0) --- ToDo: more effective use of Maybes? -%fun XQueryPointer :: Display -> Window -> IO (Bool, Window, Window, Int, Int, Int, Int, Modifier) -%code Status res1 = XQueryPointer(arg1,arg2,&res2,&res3,&res4,&res5,&res6,&res7,&res8) - --- XSetSelectionOwner omitted - --- XOpenOM omitted --- XCloseOM omitted --- XSetOMValues omitted --- XGetOMValues omitted --- DisplayOfOM omitted --- XLocaleOfOM omitted - --- XCreateOC omitted --- XDestroyOC omitted --- XOMOfOC omitted --- XSetOCValues omitted --- XGetOCValues omitted - --- XVaCreateNestedList omitted - ----------------------------------------------------------------- --- Error reporting ----------------------------------------------------------------- - -%fun XDisplayName :: String -> String - --- type ErrorHandler = Display -> ErrorEvent -> IO Int --- %dis errorHandler x = (stable x) --- --- type IOErrorHandler = Display -> IO Int --- %dis ioErrorHandler x = (stable x) - --- Sadly, this code doesn't work because hugs->runIO creates a fresh --- stack of exception handlers so the exception gets thrown to the --- wrong place. --- --- %C --- % static HugsStablePtr ioErrorHandlerPtr; --- % --- % int genericIOErrorHandler(Display *d) --- % { --- % if (ioErrorHandlerPtr >= 0) { --- % hugs->putStablePtr(ioErrorHandlerPtr); --- % hugs->putAddr(d); --- % if (hugs->runIO(1)) { /* exitWith value returned */ --- % return hugs->getInt(); --- % } else { --- % return hugs->getWord(); --- % } --- % } --- % return 1; --- % } - --- Here's what we might do instead. The two error handlers set flags --- when they fire and every single call to X contains the line: --- --- %fail { errorFlags != 0 } { XError(errorFlags) } --- --- This really sucks. --- Oh, and it won't even work with IOErrors since they terminate --- the process if the handler returns. I don't know what the hell they --- think they're doing taking it upon themselves to terminate MY --- process when THEIR library has a problem but I don't think anyone --- ever accused X of being well-designed. --- --- % static int genericIOErrorHandler(Display *d) --- % { --- % if (ioErrorHandlerPtr >= 0) { --- % hugs->putStablePtr(ioErrorHandlerPtr); --- % hugs->putAddr(d); --- % if (hugs->runIO(1)) { /* exitWith value returned */ --- % return hugs->getInt(); --- % } else { --- % return hugs->getWord(); --- % } --- % } --- % return 1; --- % } - - --- HN 2001-02-06 --- Moved to auxiliaries.c to make it easier to use the inlining option. --- -- Sigh, for now we just use an error handler that prints an error --- -- message on the screen --- %C --- % static int defaultErrorHandler(Display *d, XErrorEvent *ev) --- % { --- % char buffer[1000]; --- % XGetErrorText(d,ev->error_code,buffer,1000); --- % printf("Error: %s\n", buffer); --- % return 0; --- % } - - -%fun setDefaultErrorHandler :: IO () -%code XSetErrorHandler(defaultErrorHandler); - - --- %fun XSetIOErrorHandler :: IOErrorHandler -> IO IOErrorHandler --- %fun XSetErrorHandler :: ErrorHandler -> IO ErrorHandler - --- XGetErrorDatabaseText omitted --- XGetErrorText omitted - --- ---------------------------------------------------------------- --- -- Buffers --- ---------------------------------------------------------------- --- --- -- OLD: Would arrays be more appropriate? --- -- --- -- IMPURE void XStoreBytes(display, bytes, nbytes) --- -- IN Display* display --- -- VAR Int nbytes --- -- IN list[nbytes] Byte bytes --- -- --- -- IMPURE list[nbytes] Byte XFetchBytes(display, &nbytes) --- -- IN Display* display --- -- VAR Int nbytes --- -- --- -- IMPURE void XStoreBuffer(display, bytes, nbytes, buffer) --- -- IN Display* display --- -- VAR Int nbytes --- -- IN list[nbytes] Byte bytes --- -- IN Buffer buffer --- -- --- -- IMPURE list[nbytes] Byte XFetchBuffer(display, &nbytes, buffer) --- -- IN Display* display --- -- VAR Int nbytes --- -- IN Buffer buffer --- -- --- -- IMPURE void XRotateBuffers(display, rotate) --- -- IN Display* display --- -- VAR Int rotate - ----------------------------------------------------------------- --- Extensions ----------------------------------------------------------------- - --- ToDo: Use XFreeExtensionList --- %fun XListExtensions :: Display -> IO ListString using res1 = XListExtensions(arg1,&res1_size) - --- %errfun False XQueryExtension :: Display -> String -> IO (Int,Int,Int) using res4 = XQueryExtension(arg1,arg2,&res1,&res2,&res3)->(res1,res2,res3) --- %fun XInitExtensions :: Display -> String -> IO XExtCodes --- %fun XAddExtensions :: Display -> IO XExtCodes - --- XAddToExtensionList omitted --- XFindOnExtensionList omitted --- XEHeadOfExtensionList omitted - ----------------------------------------------------------------- --- Hosts ----------------------------------------------------------------- - --- ToDo: operations to construct and destruct an XHostAddress - --- %fun XAddHost :: Display -> XHostAddress -> IO () --- %fun XRemoveHost :: Display -> XHostAddress -> IO () --- --- %fun XAddHosts :: Display -> ListXHostAddress -> IO () using XAddHosts(arg1,arg2,arg2_size) --- %fun XRemoveHosts :: Display -> ListXHostAddress -> IO () using XRemoveHosts(arg1,arg2,arg2_size) --- --- -- Uses %prim to let us call XFree --- %prim XListHosts :: Display -> IO (ListXHostAddress, Bool) --- Bool state; --- Int r_size; --- XHostAddress* r = XListHosts(arg1,&r_size,&state); --- %update(r,state); --- XFree(r); --- return; - --- %fun XEnableAccessControl :: Display -> IO () --- %fun XDisableAccessControl :: Display -> IO () --- %fun XSetAccessControl :: Display -> Access -> IO () - - ----------------------------------------------------------------- --- Events ----------------------------------------------------------------- - -type QueuedMode = Int -%dis queuedMode x = int x -%const QueuedMode -% [ QueuedAlready -% , QueuedAfterFlush -% , QueuedAfterReading -% ] - --- Because of the way the corresponding C types are defined, --- These "structs" are somewhat unusual - they omit fields which can --- be found in more general structs. --- For example, XAnyEvent omits type since it is in XEvent. --- Therefore, to get the complete contents of an event one typically --- writes: --- do --- ty <- get_XEvent e --- (serial,send_event,display,window) <- get_XAnyEvent --- window' <- get_XDestroyWindowEvent - -type XEvent = - ( EventType - ) -%dis xEvent x = declare {XEvent} x in -% ( eventType {(%x).type} -% ) -type XEventPtr = Ptr Stub_EventPtr -data Stub_EventPtr -%dis xEventPtr x = ptr ({XEvent*} x) - -%fun allocXEvent :: IO XEventPtr -%code res1 = (void*)malloc(sizeof(XEvent)) - -%fun get_EventType :: XEventPtr -> IO EventType -%code res1 = arg1->type - -%fun get_Window :: XEventPtr -> IO Window -%code res1 = ((XAnyEvent*)arg1)->window - --- %struct : XAnyEvent : XAnyEvent arg1 --- Int32 : serial # # of last request processed by server --- Bool : send_event # true if this came from a SendEvent request --- Display : display # Display the event was read from --- Window : window # window on which event was requested in event mask - -type XKeyEvent = - ( Window -- root window that the event occured on - , Window -- child window - , Time -- milliseconds - , Int -- pointer x, y coordinates in event window - , Int -- - , Int -- coordinates relative to root - , Int -- - , Modifier -- key or button mask - , KeyCode -- detail - , Bool -- same screen flag - ) -%dis xKeyEvent x = declare {XKeyEvent} x in -% ( window {(%x).root} -% , window {(%x).subwindow} -% , time {(%x).time} -% , int {(%x).x} -% , int {(%x).y} -% , int {(%x).x_root} -% , int {(%x).y_root} -% , modifier {(%x).state} -% , keyCode {(%x).keycode} -% , bool {(%x).same_screen} -% ) -type XKeyEventPtr = Ptr Stub_KeyEventPtr -data Stub_KeyEventPtr -%dis xKeyEventPtr x = ptr ({XKeyEvent*} x) - -type XButtonEvent = - ( Window -- root window that the event occured on - , Window -- child window - , Time -- milliseconds - , Int -- pointer x, y coordinates in event window - , Int - , Int -- coordinates relative to root - , Int - , Modifier -- key or button mask - , Button -- detail - , Bool -- same screen flag - ) -%dis xButtonEvent x = declare {XButtonEvent} x in -% ( window {(%x).root} -% , window {(%x).subwindow} -% , time {(%x).time} -% , int {(%x).x} -% , int {(%x).y} -% , int {(%x).x_root} -% , int {(%x).y_root} -% , modifier {(%x).state} -% , button {(%x).button} -% , bool {(%x).same_screen} -% ) - -%fun get_KeyEvent :: XEventPtr -> IO XKeyEvent -%code -%result (xKeyEvent {*(XKeyEvent*)arg1}) - -%fun get_ButtonEvent :: XEventPtr -> IO XButtonEvent -%code -%result (xButtonEvent {*(XButtonEvent*)arg1}) - -%fun get_MotionEvent :: XEventPtr -> IO XMotionEvent -%code -%result (xMotionEvent {*(XMotionEvent*)arg1}) - - -type XMotionEvent = - ( Window -- root window that the event occured on - , Window -- child window - , Time -- milliseconds - , Int -- pointer x, y coordinates in event window - , Int - , Int -- coordinates relative to root - , Int - , Modifier -- key or button mask - , NotifyMode -- detail - , Bool -- same screen flag - ) -%dis xMotionEvent x = declare {XMotionEvent} x in -% ( window {(%x).root} -% , window {(%x).subwindow} -% , time {(%x).time} -% , int {(%x).x} -% , int {(%x).y} -% , int {(%x).x_root} -% , int {(%x).y_root} -% , modifier {(%x).state} -% , notifyMode {(%x).is_hint} -% , bool {(%x).same_screen} -% ) - - --- %struct : XCrossingEvent : XCrossingEvent arg1 --- Window : root # root window that the event occured on --- Window : subwindow # child window --- Time : time # milliseconds --- Int : x # pointer x, y coordinates in event window --- Int : y --- Int : x_root # coordinates relative to root --- Int : y_root --- NotifyMode : mode --- NotifyDetail : detail --- Bool : same_screen # same screen flag --- Bool : focus # boolean focus --- Modifier : state # key or button mask --- --- %struct : XFocusChangeEvent : XFocusChangeEvent arg1 --- NotifyMode : mode --- NotifyDetail : detail --- --- -- omitted: should be translated into bitmaps --- -- PURE void getKeymapEvent(event) --- -- IN XEvent* event --- -- OUT Window window = ((XKeymapEvent*)event)->window --- -- OUT array[32] Char key_vector = ((XKeymapEvent*)event)->key_vector --- -- RESULT: - -type XExposeEvent = - ( Position -- x - , Position -- y - , Dimension -- width - , Dimension -- height - , Int -- count - ) -%dis xExposeEvent x = declare {XExposeEvent} x in -% ( position {(%x).x} -% , position {(%x).y} -% , dimension {(%x).width} -% , dimension {(%x).height} -% , int {(%x).count} -% ) - -%fun get_ExposeEvent :: XEventPtr -> IO XExposeEvent -%code -%result (xExposeEvent {*(XExposeEvent*)arg1}) - --- %struct : XGraphicsExposeEvent : XGraphicsExposeEvent arg1 --- Position : x --- Position : y --- Dimension : width . --- Dimension : height --- Int : count --- Int : major_code --- Int : minor_code --- --- %struct : XCirculateEvent : XCirculateEvent arg1 --- Window : window --- Place : place --- --- %struct : XConfigureEvent : XConfigureEvent arg1 --- Window : window --- Position : x --- Position : y --- Dimension : width --- Dimension : height --- Dimension : border_width --- Window : above --- Bool : override_redirect --- --- %struct : XCreateWindowEvent : XCreateWindowEvent arg1 --- Window : window --- Position : x --- Position : y --- Dimension : width --- Dimension : height --- Dimension : border_width --- Bool : override_redirect --- --- %struct : XDestroyWindowEvent : XDestroyWindowEvent arg1 --- Window : window --- --- %struct : XGravityEvent : XGravityEvent arg1 --- Window : window --- Position : x --- Position : y --- --- %struct : XMapEvent : XMapEvent arg1 --- Bool : override_redirect - -type XMappingEvent = - ( MappingRequest -- request - , KeyCode -- first_keycode - , Int -- count - ) -%dis xMappingEvent x = declare {XMappingEvent} x in -% ( mappingRequest {(%x).request} -% , keyCode {(%x).first_keycode} -% , int {(%x).count} -% ) - -type XConfigureEvent = - ( Position - , Position - , Dimension - , Dimension - ) -%dis xConfigureEvent x = -% ( position {(%x).x} -% , position {(%x).y} -% , dimension {(%x).width} -% , dimension {(%x).height} -% ) -%fun get_ConfigureEvent :: XEventPtr -> IO XConfigureEvent -%code -%result (xConfigureEvent {*(XConfigureEvent*)arg1}) - - --- %struct : XResizeRequestEvent : XResizeRequestEvent arg1 --- Dimension : width --- Dimension : height --- - --- %struct : XReparentEvent : XReparentEvent arg1 --- Window : window --- Window : parent --- Position : x --- Position : y --- Bool : override_redirect --- --- %struct : XUnmapEvent : XUnmapEvent arg1 --- Window : window --- Bool : from_configure --- --- %struct : XVisibilityEvent : XVisibilityEvent arg1 --- Visibility : state --- --- %struct : XCirculateRequestEvent : XCirculateRequestEvent arg1 --- Place : place --- --- -- omitted because valuemask looks tricky --- -- %struct : XConfigureRequestEvent : XConfigureRequestEvent arg1 --- -- Window : window --- -- Position : x --- -- Position : y --- -- Dimension : width --- -- Dimension : height --- -- Dimension : border_width --- -- Window : above --- -- StackingMethod : detail --- -- ??? : valuemask --- --- %struct : XMapRequestEvent : XMapRequestEvent arg1 --- Window : window --- --- %struct : XColormapEvent : XColormapEvent arg1 --- Colormap : colormap --- Bool : new --- ColormapNotification : state --- --- -- getClientMessageEvent omitted --- -- getPropertyEvent omitted --- -- getSelectionClearEvent omitted --- -- getSelectionRequestEvent omitted --- -- getSelectionEvent omitted - --- functions - --- The following is useful if you want to do a read with timeout. --- Returns True if timeout occurs. -%fun waitForEvent :: Display -> Word32 -> IO Bool -%code -% struct timeval timeout; -% fd_set readfds; -% fd_set nofds; -% int fd = ConnectionNumber(arg1); -% int n; -% FD_ZERO(&readfds); -% FD_ZERO(&nofds); -% FD_SET(fd,&readfds); -% timeout.tv_sec = arg2 / 1000000; -% timeout.tv_usec = arg2 % 1000000; -% /* HN 2001-02-06: Select needs to be told highest fd _+_ 1. */ -% n = select(fd+1,&readfds,&nofds,&nofds,&timeout); -%result (bool {n == 0}) - --- The following is somewhat compatible with Win32's TimeGetTime -gettimeofday_in_milliseconds :: IO Integer -gettimeofday_in_milliseconds = do - (sec,usec) <- gettimeofday_in_milliseconds_internal - return (toInteger sec * 1000 + toInteger usec `div` 1000) - -%fun gettimeofday_in_milliseconds_internal :: IO (Word32,Word32) -%code -% struct timeval tv; -% int rc = gettimeofday(&tv,0); -% res1 = tv.tv_sec; -% res2 = tv.tv_usec; - -%fun XFlush :: Display -> IO () -%fun XSync :: Display -> Bool -> IO () -%fun XPending :: Display -> IO Int -%fun XEventsQueued :: Display -> QueuedMode -> IO Int -%fun XNextEvent :: Display -> XEventPtr -> IO () -%fun XAllowEvents :: Display -> AllowEvents -> Time -> IO () - --- ToDo: XFree(res1) after constructing result --- %fun XGetMotionEvents :: Display -> Window -> Time -> Time -> IO ListXTimeCoord --- %code res1 = XGetMotionEvents(arg1,arg2,arg3,arg4,&res1_size) - -%fun XSelectInput :: Display -> Window -> EventMask -> IO () -%fun XSendEvent :: Display -> Window -> Bool -> EventMask -> XEventPtr -> IO () -%code Status err = XSendEvent(arg1,arg2,arg3,arg4,arg5) -%fail { Success != err }{ BadStatus(err,XSendEvent) } - -%fun XWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO () -%fun XCheckWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO Bool - -%fun XMaskEvent :: Display -> EventMask -> XEventPtr -> IO () -%fun XCheckMaskEvent :: Display -> EventMask -> XEventPtr -> IO Bool -%fun XCheckTypedEvent :: Display -> EventType -> XEventPtr -> IO Bool -%fun XCheckTypedWindowEvent :: Display -> Window -> EventType -> XEventPtr -> IO Bool -%fun XPutBackEvent :: Display -> XEventPtr -> IO () -%fun XPeekEvent :: Display -> XEventPtr -> IO () - --- XFilterEvent omitted (can't find documentation) --- XIfEvent omitted (can't pass predicates (yet)) --- XCheckIfEvent omitted (can't pass predicates (yet)) --- XPeekIfEvent omitted (can't pass predicates (yet)) - -%fun XRefreshKeyboardMapping :: XMappingEvent -> IO () -%code XRefreshKeyboardMapping(&arg1) - --- XSynchronize omitted (returns C function) --- XSetAfterFunction omitted (can't pass functions (yet)) - ----------------------------------------------------------------- --- Geometry ----------------------------------------------------------------- - -%fun XGeometry :: Display -> Int -> String -> String -> Dimension -> Dimension -> Dimension -> Int -> Int -> IO (Int, Position, Position, Dimension, Dimension) -%code res1 = XGeometry(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,&res2,&res3,&res4,&res5) - -%fun XGetGeometry :: Display -> Int -> Drawable -> IO (Window, Position, Position, Dimension, Dimension, Dimension, Int) -%code Status err = XGetGeometry(arg1,arg2,&res1,&res2,&res3,&res4,&res5,&res6,&res7) -%fail { Success != err }{ BadStatus(err,XGetGeometry) } - --- XParseGeometry omitted (returned bitset too weird) - ----------------------------------------------------------------- --- Locale ----------------------------------------------------------------- - -%fun XSupportsLocale :: IO Bool -%fun XSetLocaleModifiers :: String -> IO String - ----------------------------------------------------------------- --- Screen Saver ----------------------------------------------------------------- - -type AllowExposuresMode = Int -%dis allowExposuresMode x = int x -%const AllowExposuresMode -% [ DontAllowExposures -% , AllowExposures -% , DefaultExposures -% ] - -type PreferBlankingMode = Int -%dis preferBlankingMode x = int x -%const PreferBlankingMode -% [ DontPreferBlanking -% , PreferBlanking -% , DefaultBlanking -% ] - -type ScreenSaverMode = Int -%dis screenSaverMode x = int x -%const ScreenSaverMode -% [ ScreenSaverActive -% , ScreenSaverReset -% ] - -%fun XGetScreenSaver :: Display -> IO (Int, Int, PreferBlankingMode, AllowExposuresMode) -%code XGetScreenSaver(arg1,&res1,&res2,&res3,&res4) - -%fun XSetScreenSaver :: Display -> Int -> Int -> PreferBlankingMode -> AllowExposuresMode -> IO () -%fun XActivateScreenSaver :: Display -> IO () -%fun XResetScreenSaver :: Display -> IO () -%fun XForceScreenSaver :: Display -> ScreenSaverMode -> IO () - - ----------------------------------------------------------------- --- Pointer ----------------------------------------------------------------- - -%fun XGetPointerControl :: Display -> IO (Int, Int, Int) -%code XGetPointerControl(arg1,&res1,&res2,&res3) - -%fun XWarpPointer :: Display -> Window -> Window -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () - --- XGetPointerMapping omitted --- XSetPointerMapping omitted - ----------------------------------------------------------------- --- Visuals ----------------------------------------------------------------- - --- XVisualIDFromVisual omitted - - ----------------------------------------------------------------- --- Threads ----------------------------------------------------------------- - --- XInitThreads omitted (leary of thread stuff) --- XLockDisplay omitted (leary of thread stuff) --- XUnlockDisplay omitted (leary of thread stuff) - ----------------------------------------------------------------- --- Screen ----------------------------------------------------------------- - --- Many flags assumed to be PURE. - -%fun XBlackPixelOfScreen :: Screen -> Pixel -%fun XWhitePixelOfScreen :: Screen -> Pixel -%fun XCellsOfScreen :: Screen -> Int -%fun XDefaultColormapOfScreen :: Screen -> Colormap -%fun XDefaultDepthOfScreen :: Screen -> Int -%fun XDefaultGCOfScreen :: Screen -> GC -%fun XDefaultVisualOfScreen :: Screen -> Visual -%fun XDoesBackingStore :: Screen -> Bool -%fun XDoesSaveUnders :: Screen -> Bool -%fun DisplayOfScreen :: Screen -> Display - --- event mask at connection setup time - not current event mask! -%fun XEventMaskOfScreen :: Screen -> EventMask - -%fun XMinCmapsOfScreen :: Screen -> Int -%fun XMaxCmapsOfScreen :: Screen -> Int -%fun XRootWindowOfScreen :: Screen -> Window -%fun XWidthOfScreen :: Screen -> Dimension -%fun XWidthMMOfScreen :: Screen -> Dimension -%fun XHeightOfScreen :: Screen -> Dimension -%fun XHeightMMOfScreen :: Screen -> Dimension -%fun XPlanesOfScreen :: Screen -> Int -%fun XScreenNumberOfScreen :: Screen -> ScreenNumber - - ----------------------------------------------------------------- --- Graphics contexts ----------------------------------------------------------------- - --- Convenience functions - -%fun XSetArcMode :: Display -> GC -> ArcMode -> IO () -%fun XSetBackground :: Display -> GC -> Pixel -> IO () -%fun XSetForeground :: Display -> GC -> Pixel -> IO () -%fun XSetFunction :: Display -> GC -> GXFunction -> IO () -%fun XSetGraphicsExposures :: Display -> GC -> Bool -> IO () -%fun XSetClipMask :: Display -> GC -> Pixmap -> IO () -%fun XSetClipOrigin :: Display -> GC -> Position -> Position -> IO () - --- XSetClipRectangles omitted because it's not clear when it's safe to delete the --- array of rectangles - -%fun XSetDashes :: Display -> GC -> Int -> String -> Int -> IO () -%fun XSetFillRule :: Display -> GC -> FillRule -> IO () -%fun XSetFillStyle :: Display -> GC -> FillStyle -> IO () -%fun XSetFont :: Display -> GC -> Font -> IO () -%fun XSetLineAttributes :: Display -> GC -> Int -> LineStyle -> CapStyle -> JoinStyle -> IO () -%fun XSetPlaneMask :: Display -> GC -> Pixel -> IO () -%fun XSetState :: Display -> GC -> Pixel -> Pixel -> GXFunction -> Pixel -> IO () -%fun XSetStipple :: Display -> GC -> Pixmap -> IO () -%fun XSetSubwindowMode :: Display -> GC -> SubWindowMode -> IO () -%fun XSetTSOrigin :: Display -> GC -> Position -> Position -> IO () -%fun XSetTile :: Display -> GC -> Pixmap -> IO () - --- ToDo: create a real interface to this -%fun XCreateGC :: Display -> Drawable -> IO GC -%code res1 = XCreateGC(arg1,arg2,0,0); - --- OLD: --- %synonym : GCValueSet : Ptr --- in rtsDummy --- --- {% --- typedef unsigned long GCMask; /* cf XtGCMask */ --- typedef struct _gcvalues { --- GCMask mask; --- XGCValues values; --- }* GCValueSet; --- %} --- --- IMPURE GCValueSet emptyGCValueSet() --- RESULT: (RETVAL = (GCValueSet) malloc(sizeof(struct _gcvalues))) ? RETVAL->mask = 0, RETVAL : RETVAL; --- POST: RETVAL != NULL --- --- IMPURE void setGCForeground(colour, set) --- IN Pixel colour --- IN GCValueSet set --- RESULT: set->mask |= GCForeground; set->values.foreground = colour --- --- IMPURE void setGCBackground(colour, set) --- IN Pixel colour --- IN GCValueSet set --- RESULT: set->mask |= GCBackground; set->values.background = colour --- --- IMPURE void freeGCValueSet(set) --- IN GCValueSet set --- RESULT: free(set) --- --- IMPURE GC XCreateGC(display, d, set->mask, &(set->values)) --- NAME: xCreateGC --- IN Display* display --- IN Drawable d --- IN GCValueSet set --- --- IMPURE void XChangeGC(display, gc, set->mask, &(set->values)) --- NAME: xChangeGC --- IN Display* display --- IN GC gc --- IN GCValueSet set --- --- STARTH --- -- Code that packages GCValueSets up in a clean monoidic way. --- --- data GCSetter = GCSetter (GCValueSet -> IO ()) -- should be newtype --- --- createGC :: Display -> Drawable -> GCSetter -> IO GC --- createGC display d (GCSetter setter) = --- emptyGCValueSet >>= \ set -> --- setter set >> --- xCreateGC display d set >>= \ gc -> --- freeGCValueSet set >> --- return gc --- --- changeGC :: Display -> Drawable -> GC -> GCSetter -> IO () --- changeGC display d gc (GCSetter setter) = --- emptyGCValueSet >>= \ set -> --- setter set >> --- xChangeGC display d set >>= \ gc -> --- freeGCValueSet set --- --- instance Monoid GCSetter where --- (GCSetter m) >>> (GCSetter k) --- = GCSetter (\ settings -> m settings >> k settings) --- unit = GCSetter (\ _ -> return ()) --- --- set_Background :: Pixel -> GCSetter --- set_Background c = GCSetter (setGCBackground c) --- --- set_Foreground :: Pixel -> GCSetter --- set_Foreground c = GCSetter (setGCForeground c) --- ENDH - -%fun XGContextFromGC :: GC -> GContext - -%fun XFreeGC :: Display -> GC -> IO () -%fun XFlushGC :: Display -> GC -> IO () - -%fun XCopyGC :: Display -> GC -> Mask -> GC -> IO () - ----------------------------------------------------------------- --- Pixmaps ----------------------------------------------------------------- - -%fun XCreatePixmap :: Display -> Drawable -> Dimension -> Dimension -> Int -> IO Pixmap -%fun XFreePixmap :: Display -> Pixmap -> IO () - --- XCreatePixmapFromBitmapData omitted (type looks strange) - --- %fun XListPixmapFormatValues = res1 = XListPixmapFormatValues(display, &res1_size) :: Display -> ListXPixmapFormatValues - ----------------------------------------------------------------- --- Bitmaps ----------------------------------------------------------------- - --- ToDo: do these need to be available to the programmer? --- Maybe I could just wire them into all other operations? - -%fun XBitmapBitOrder :: Display -> ByteOrder -%fun XBitmapUnit :: Display -> Int -%fun XBitmapPad :: Display -> Int - --- ToDo: make sure that initialisation works correctly for x/y_hot --- omitted --- IMPURE void XWriteBitmapFile(display, filename, bitmap, width, height, x_hot, y_hot) RAISES Either --- RETURNTYPE BitmapFileStatus --- GLOBAL ERROR BitmapFileStatus RETVAL --- IN Display* display --- IN String filename --- IN Pixmap bitmap --- IN Dimension width --- IN Dimension height --- IN Maybe Int x_hot = -1 --- IN Maybe Int y_hot = -1 --- POST: RETVAL == BitmapSuccess - --- omitted --- IMPURE void XReadBitmapFile(display, d, filename, bitmap, width, height, x_hot, y_hot) RAISES Either --- RETURNTYPE BitmapFileStatus --- GLOBAL ERROR BitmapFileStatus RETVAL --- IN Display* display --- IN Drawable d --- IN String filename --- OUT Pixmap bitmap --- OUT Dimension width --- OUT Dimension height --- OUT Int x_hot RAISES Maybe IF x_hot == -1 --- OUT Int y_hot RAISES Maybe IF x_hot == -1 --- POST: RETVAL == BitmapSuccess - --- XCreateBitmapFromData omitted (awkward looking type) --- XReadBitmapFileData omitted (awkward looking type) - ----------------------------------------------------------------- --- Color and Colormaps ----------------------------------------------------------------- - -%fun XLookupColor :: Display -> Colormap -> String -> IO (Color, Color) -%code Status err = XLookupColor(arg1,arg2,arg3,&res1,&res2) -%fail { 0 == err }{ Zero(err,XLookupColor) } -%end free(arg3) - -%fun XAllocNamedColor :: Display -> Colormap -> String -> IO (Color, Color) -%code Status err = XAllocNamedColor(arg1,arg2,arg3,&res1,&res2) -%fail { 0 == err }{ Zero(err,XLookupColor) } -%end free(arg3) - -%fun XAllocColor :: Display -> Colormap -> Color -> IO Color -%code Status err = XAllocColor(arg1,arg2,&arg3) -%fail { 0 == err }{ Zero(err,XLookupColor) } -%result (color {arg3}) - -%fun XParseColor :: Display -> Colormap -> String -> IO Color -%code Status err = XParseColor(arg1,arg2,arg3,&res1) -%fail { 0 == err }{ Zero(err,XLookupColor) } -%end free(arg3) - --- ToDo: Can't express relationship between arg4 and res1 properly (or arg5, res2) --- %errfun Zero XAllocColorCells :: Display -> Colormap -> Bool -> Int -> Int -> IO (ListPixel, ListPixel) using err = XAllocColorCells(arg1,arg2,arg3,arg4_size,res1,arg5_size,res2) - --- ToDo: Can't express relationship between arg4 and res1 properly --- %errfun Zero XAllocColorPlanes :: Display -> Colormap -> Bool -> Int -> Int -> Int -> Int IO (ListPixel, Pixel, Pixel, Pixel) using err = XAllocColorPlanes(...) - -%fun XFreeColors :: Display -> Colormap -> ListPixel -> Pixel -> IO () -%call (display arg1) (colormap arg2) (listPixel arg3 arg3_size) (pixel arg4) -%code XFreeColors(arg1,arg2,arg3,arg3_size,arg4) -%end free(arg3) - -%fun XStoreColor :: Display -> Colormap -> Color -> IO () -%code XStoreColor(arg1,arg2,&arg3) - --- %fun XStoreColors :: Display -> Colormap -> ListColor -> IO () --- %code XStoreColors(arg1,arg2,arg3,arg3_size) --- %fun XStoreNamedColor :: Display -> Colormap -> String -> Pixel -> PrimaryMask -> IO () - -%fun XQueryColor :: Display -> Colormap -> Color -> IO Color -%code XQueryColor(arg1,arg2,&arg3) -%result (color {arg3}) - -%fun XQueryColors :: Display -> Colormap -> ListColor -> IO ListColor -%call (display arg1) (colormap arg2) (listColor arg3 arg3_size) -%code XQueryColors(arg1,arg2,arg3,arg3_size) -%result (listColor {arg3} {arg3_size}) - -%fun XInstallColormap :: Display -> Colormap -> IO () -%fun XUninstallColormap :: Display -> Colormap -> IO () -%fun XCopyColormapAndFree :: Display -> Colormap -> IO Colormap -%fun XCreateColormap :: Display -> Window -> Visual -> ColormapAlloc -> IO Colormap -%fun XFreeColormap :: Display -> Colormap -> IO () - - ----------------------------------------------------------------- --- Fonts ----------------------------------------------------------------- - --- A glyph (or Char2b) is a 16 bit character identification. --- The top 8 bits are zero in many fonts. -type Glyph = Int -%dis glyph x = int x - --- Disnae exist: %fun LoadFont :: Display -> String -> IO Font --- Disnae exist: %fun UnloadFont :: Display -> Font -> IO () - --- Argument can be a Font or a GContext. --- But, if it's a GContext, the fontStruct will use the GContext as the --- FontID - which will cause most things to break so it's probably --- safer using XGetGCValues to get a genuine font ID -%fun XQueryFont :: Display -> Font -> IO FontStruct - --- Note that this _WILL NOT WORK_ unless you have explicitly set the font. --- I'm slowly but surely coming to the conclusion that Xlib is a pile of --- steaming shit. -%fun FontFromGC :: Display -> GC -> IO Font -%code -% XGCValues ret; -% Status err = XGetGCValues(arg1,arg2,GCFont,&ret); -%fail {Success != err} { BadStatus(rc,FontFromGC) } -%result (font {ret.font}) - -%fun XLoadQueryFont :: Display -> String -> IO FontStruct -%fail {res1==0} { NullPtr(XLoadQueryFont) } - -%fun XFreeFont :: Display -> FontStruct -> IO () --- %fun XSetFontPath :: Display -> ListString -> IO () using XSetFontPath(arg1,arg2,arg2_size) - -%fun fontFromFontStruct :: FontStruct -> Font -%code res1 = arg1->fid -%fun ascentFromFontStruct :: FontStruct -> Int32 -%code res1 = arg1->ascent -%fun descentFromFontStruct :: FontStruct -> Int32 -%code res1 = arg1->descent - --- %prim XGetFontPath :: Display -> IO ListString ---Int r_size; ---String* r = XGetFontPath(arg1,&r_size); --- %update(r); ---XFreeFontPath(r); ---return; - --- %prim XListFonts :: Display -> String -> Int -> IO ListString ---Int r_size; ---String *r = XListFonts(arg1,arg2,arg3,&r_size); --- %update(r); ---XFreeFontNames(r); ---return; - --- XListFontsWithInfo omitted (no support for FontStruct yet) - --- XQueryTextExtents omitted (no support for CharStruct yet) --- XQueryTextExtents16 omitted (no support for CharStruct yet) - --- We marshall this across right away because it's usually one-off info -type CharStruct = - ( Int -- lbearing (origin to left edge of raster) - , Int -- rbearing (origin to right edge of raster) - , Int -- width (advance to next char's origin) - , Int -- ascent (baseline to top edge of raster) - , Int -- descent (baseline to bottom edge of raster) --- attributes omitted - ) -%dis charStruct x = declare {XCharStruct} x in -% ( int {(%x).lbearing} -% , int {(%x).rbearing} -% , int {(%x).width} -% , int {(%x).ascent} -% , int {(%x).descent} -% ) - - --- No need to put ths in the IO monad - this info is essentially constant -%fun XTextExtents :: FontStruct -> String -> (FontDirection, Int32, Int32, CharStruct) -%call (fontStruct f) (stringLen s s_len) -%code -% int direction; -% int font_ascent; -% int font_descent; -% XCharStruct cs; -% int rc = XTextExtents(f,s,s_len,&direction,&font_ascent,&font_descent,&cs); -%result ( fontDirection direction -% , int32 font_ascent -% , int32 font_descent -% , charStruct cs -% ) - --- No need to put ths in the IO monad - this info is essentially constant -%fun XTextWidth :: FontStruct -> String -> Int32 -%call (fontStruct f) (stringLen s s_len) -%code res1 = XTextWidth(f,s,s_len) - --- XTextExtents16 omitted --- XTextWidth16 omitted - --- XGetFontProperty omitted --- XFreeFontInfo omitted --- XFreeFontNames omitted - --- XCreateFontSet omitted (no documentation available) --- XFreeFontSet omitted (no documentation available) --- XFontsOfFontSet omitted (no documentation available) --- XBaseFontNameListOfFontSet omitted (no documentation available) --- XLocaleOfFontSet omitted (no documentation available) --- XExtentsOfFontSet omitted (no documentation available) - --- XContextDependentDrawing omitted --- XDirectionalDependentDrawing omitted --- XContextualDrawing omitted - --- XmbTextEscapement omitted --- XwcTextEscapement omitted --- XmbTextExtents omitted --- XwcTextExtents omitted --- XmbTextPerCharExtents omitted --- XwcTextPerCharExtents omitted --- XmbDrawText omitted --- XwcDrawText omitted --- XmbDrawString omitted --- XwcDrawString omitted --- XmbDrawImageString omitted --- XwcDrawImageString omitted - --- XOpenIM omitted --- XCloseIM omitted --- XGetIMValues omitted --- XSetIMValues omitted --- DisplayOfIM omitted --- XLocaleOfIM omitted - --- XCreateIC omitted --- XDestroyIC omitted --- XSetICFocus omitted --- XUnsetICFocus omitted --- XwcResetIC omitted --- XmbResetIC omitted --- XSetICValues omitted --- XGetICValues omitted --- XIMOfIC omitted - --- XRegisterIMInstantiateCallback omitted --- XUnregisterIMInstantiateCallback omitted - --- XInternalConnectionNumbers omitted --- XProcessInternalConnection omitted --- XAddConnectionWatch omitted --- XRemoveConnectionWatch omitted - --- XmbLookupString omitted --- XwcLookupString omitted - ----------------------------------------------------------------- --- Atoms ----------------------------------------------------------------- - --- AC, 1/9/2000: Added definition for XInternAtom -%fun XInternAtom :: Display -> String -> Bool -> IO Atom - --- XInternAtoms omitted --- XGetAtomName omitted --- XGetAtomNames omitted --- XConvertSelection omitted --- XListProperties omitted --- XChangeProperty omitted --- XDeleteProperty omitted - ----------------------------------------------------------------- --- Keycodes ----------------------------------------------------------------- - -%fun XDisplayKeycodes :: Display -> (Int,Int) -%code XDisplayKeycodes(arg1,&res1,&res2) -%fun XLookupKeysym :: XKeyEventPtr -> Int -> IO KeySym -%fun XKeycodeToKeysym :: Display -> KeyCode -> Int -> IO KeySym -%fun XKeysymToKeycode :: Display -> KeySym -> IO KeyCode -%fun XKeysymToString :: KeySym -> String -%fun XStringToKeysym :: String -> KeySym - --- I should not need to do this: the argument to maybeT below _should_ --- be treated as a C expression. -%const KeySym [NoSymbol] - --- I tried to allocate the buffer below on the stack, but that was not a --- good idea since the unmarshalling takes place in another stack frame. --- I could use malloc, but then it seems tricky to free _after_ unmarshalling. --- (%end free(buf) does not work: frees buffer too early.) --- Making the buffer static works, but is potentially not thread safe. --- But: the graphics library does not use X in a threadsafe way anyway --- (does not import/call XInitThreads) and GHC is single threaded as far as --- the external world is concerned(?). --- OK, go static for now. Introduce a mutex if needs be. --- XLookupString cannot handle compose, it seems. -%fun XLookupString :: XKeyEventPtr -> IO (Maybe KeySym, String) -%call (xKeyEventPtr e) -%code static char buf[100]; -% int n; -% KeySym ks; -% n = XLookupString(e, buf, 100, &ks, NULL); -%result (maybeT {noSymbol}(keySym ks), stringLen buf n) -- I meant "NoSymbol". - --- XQueryKeymap omitted --- XRebindKeysym omitted --- XDeleteModifiermapEntry omitted --- XInsertModifiermapEntry omitted --- XNewModifiermap omitted --- XFreeModifiermap omitted --- XSetModifierMapping omitted --- XGetModifierMapping omitted --- XGetKeyboardMapping omitted - ----------------------------------------------------------------- --- Image ----------------------------------------------------------------- - --- XCreateImage omitted --- XInitImage omitted --- XGetImage omitted --- XPutImage omitted --- XGetSubImage omitted - ----------------------------------------------------------------- --- Icons ----------------------------------------------------------------- - -%fun XGetIconName :: Display -> Window -> IO String -%code Status err = XGetIconName(arg1,arg2,&res1) -%fail { Success != err }{ BadStatus(err,XGetIconName) } - -%fun XSetIconName :: Display -> Window -> String -> IO () - ----------------------------------------------------------------- --- Cursors ----------------------------------------------------------------- - -%fun XDefineCursor :: Display -> Window -> Cursor -> IO () -%fun XUndefineCursor :: Display -> Window -> IO () - -%fun XCreatePixmapCursor :: Display -> Pixmap -> Pixmap -> Color -> Color -> Dimension -> Dimension -> IO Cursor -%code res1 = XCreatePixmapCursor(arg1,arg2,arg3,&arg4,&arg5,arg6,arg7) - -%fun XCreateGlyphCursor :: Display -> Font -> Font -> Glyph -> Glyph -> Color -> Color -> IO Cursor -%code res1 = XCreateGlyphCursor(arg1,arg2,arg3,arg4,arg5,&arg6,&arg7) - -%fun XCreateFontCursor :: Display -> Glyph -> IO Cursor -%fun XFreeCursor :: Display -> Font -> IO () -%fun XRecolorCursor :: Display -> Cursor -> Color -> Color -> IO () -%code XRecolorCursor(arg1,arg2,&arg3,&arg4) - ----------------------------------------------------------------- --- Window Manager stuff ----------------------------------------------------------------- - --- XConfigureWMWindow omitted (can't find documentation) --- XReconfigureWMWindow omitted (can't find documentation) --- XWMGeometry omitted (can't find documentation) --- XGetWMColormapWindows omitted (can't find documentation) --- XSetWMColormapWindows omitted (can't find documentation) --- XGetWMProtocols omitted - --- AC, 1/9/2000: Added definition for XSetWMProtocols -%fun XSetWMProtocols :: Display -> Window -> ListAtom -> IO () -%call (display arg1) (window arg2) (listAtom arg3 arg3_size) -%code XSetWMProtocols(arg1,arg2,arg3,arg3_size) -%end free(arg3) - - ----------------------------------------------------------------- --- Set Window Attributes ----------------------------------------------------------------- - --- The following code is based on what you get from the %ptr declaration. --- ToDo: generate this kind of stuff automatically. - -type XSetWindowAttributesPtr = Ptr Stub_SWA -data Stub_SWA --- toXSetWindowAttributesPtr :: Addr -> XSetWindowAttributesPtr, --- fromXSetWindowAttributesPtr :: XSetWindowAttributesPtr -> Ptr -%dis xSetWindowAttributesPtr x = ptr ({XSetWindowAttributes*} x) - -%fun allocXSetWindowAttributes :: IO XSetWindowAttributesPtr -%code res1 = (void*)malloc(sizeof(XSetWindowAttributes)) - - --- toXSetWindowAttributesPtr x = x --- fromXSetWindowAttributesPtr x = x --- --- instance Pointer XSetWindowAttributesPtr where --- toPtr = fromXSetWindowAttributesPtr --- fromPtr = toXSetWindowAttributesPtr --- alloc = malloc sizeofXSetWindowAttributes --- plus p x = fromPtr (plusPtr (toPtr p) (x * sizeofXSetWindowAttributes)) --- minus p q = (toPtr p `minusPtr` toPtr q) `div` sizeofXSetWindowAttributes --- %}} --- --- %type : XSetWindowAttributesPtr : XSetWindowAttributes* arg1 : %pack(Ptr,arg1);% : %unpack(Ptr,arg1,arg2);% --- --- %const Int sizeofXSetWindowAttributes = sizeof(XSetWindowAttributes) - ----------------- Access to individual fields ---------------- - -%fun set_background_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () -%code arg1->background_pixmap = arg2; - -%fun set_background_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () -%code arg1->background_pixel = arg2; - -%fun set_border_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () -%code arg1->border_pixmap = arg2; - -%fun set_border_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () -%code arg1->border_pixel = arg2; - -%fun set_bit_gravity :: XSetWindowAttributesPtr -> BitGravity -> IO () -%code arg1->bit_gravity = arg2; - -%fun set_win_gravity :: XSetWindowAttributesPtr -> WindowGravity -> IO () -%code arg1->win_gravity = arg2; - -%fun set_backing_store :: XSetWindowAttributesPtr -> BackingStore -> IO () -%code arg1->backing_store = arg2; - -%fun set_backing_planes :: XSetWindowAttributesPtr -> Pixel -> IO () -%code arg1->backing_planes = arg2; - -%fun set_backing_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () -%code arg1->backing_pixel = arg2; - -%fun set_save_under :: XSetWindowAttributesPtr -> Bool -> IO () -%code arg1->save_under = arg2; - -%fun set_event_mask :: XSetWindowAttributesPtr -> EventMask -> IO () -%code arg1->event_mask = arg2; - -%fun set_do_not_propagate_mask :: XSetWindowAttributesPtr -> EventMask -> IO () -%code arg1->do_not_propagate_mask = arg2; - -%fun set_override_redirect :: XSetWindowAttributesPtr -> Bool -> IO () -%code arg1->override_redirect = arg2; - -%fun set_colormap :: XSetWindowAttributesPtr -> Colormap -> IO () -%code arg1->colormap = arg2; - -%fun set_cursor :: XSetWindowAttributesPtr -> Cursor -> IO () -%code arg1->cursor = arg2; - ----------------------------------------------------------------- --- Windows ----------------------------------------------------------------- - -%fun XStoreName :: Display -> Window -> String -> IO () -%fun XCreateSimpleWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Int -> Pixel -> Pixel -> IO Window - -%fun XCreateWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> WindowClass -> Visual -> AttributeMask -> XSetWindowAttributesPtr -> IO Window - ----------------------------------------------------------------- - ---ToDo: find an effective way to use Maybes -%fun XTranslateCoordinates :: Display -> Window -> Window -> Position -> Position -> IO (Bool,Position,Position,Window) -%code res1 = XTranslateCoordinates(arg1,arg2,arg3,arg4,arg5,&res2,&res3,&res4) - -%fun XMoveResizeWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> IO () -%fun XResizeWindow :: Display -> Window -> Dimension -> Dimension -> IO () -%fun XMoveWindow :: Display -> Window -> Position -> Position -> IO () -%fun XReparentWindow :: Display -> Window -> Window -> Position -> Position -> IO () -%fun XMapSubwindows :: Display -> Window -> IO () -%fun XUnmapSubwindows :: Display -> Window -> IO () -%fun XMapWindow :: Display -> Window -> IO () --- Disnae exist: %fun XUnmapWindows :: Display -> Window -> IO () --- Disnae exist: %fun XMapRaisedWindow :: Display -> Window -> IO () -%fun XLowerWindow :: Display -> Window -> IO () -%fun XRaiseWindow :: Display -> Window -> IO () -%fun XCirculateSubwindowsDown :: Display -> Window -> IO () -%fun XCirculateSubwindowsUp :: Display -> Window -> IO () -%fun XCirculateSubwindows :: Display -> Window -> CirculationDirection -> IO () -%fun XIconifyWindow :: Display -> Window -> ScreenNumber -> IO () -%code Status err = XIconifyWindow(arg1,arg2,arg3) -%fail { Success != err }{ BadStatus(err,XIconifyWindow) } -%fun XWithdrawWindow :: Display -> Window -> ScreenNumber -> IO () -%code Status err = XWithdrawWindow(arg1,arg2,arg3) -%fail { Success != err }{ BadStatus(err,XWithdrawWindow) } -%fun XDestroyWindow :: Display -> Window -> IO () -%fun XDestroySubwindows :: Display -> Window -> IO () - -%fun XSetWindowBorder :: Display -> Window -> Pixel -> IO () -%fun XSetWindowBorderPixmap :: Display -> Window -> Pixmap -> IO () -%fun XSetWindowBorderWidth :: Display -> Window -> Dimension -> IO () -%fun XSetWindowBackground :: Display -> Window -> Pixel -> IO () -%fun XSetWindowBackgroundPixmap :: Display -> Window -> Pixmap -> IO () -%fun XSetWindowColormap :: Display -> Window -> Colormap -> IO () - -%fun XAddToSaveSet :: Display -> Window -> IO () -%fun XRemoveFromSaveSet :: Display -> Window -> IO () -%fun XChangeSaveSet :: Display -> Window -> ChangeSaveSetMode -> IO () - -%fun XClearWindow :: Display -> Window -> IO () -%fun XClearArea :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Bool -> IO () - --- -- This is almost good enough - but doesn't call XFree --- -- %errfun BadStatus XQueryTree :: Display -> Window -> IO (Window, Window, ListWindow) using err = XQueryTree(arg1,arg2,&res1,&res2,&res3,&res3_size) --- %prim XQueryTree :: Display -> Window -> IO (Window, Window, ListWindow) --- Window root_w, parent; --- Int children_size; --- Window *children; --- Status r = XQueryTree(arg1,arg2,&root_w, &parent, &children, &children_size); --- if (Success != r) { %failWith(BadStatus,r); } --- %update(root_w,parent,children); --- XFree(children); --- return; - -%fun XRestackWindows :: Display -> ListWindow -> IO () -%call (display arg1) (listWindow arg2 arg2_size) -%code XRestackWindows(arg1, arg2, arg2_size) - --- -- ToDo: I want to be able to write this --- -- %fun XListInstalledColormaps :: Display -> Window -> IO ListColormap using res1 = XListInstalledColormaps(arg1,arg2,&res1_size) --- -- But I have to write this instead - need to add a notion of cleanup code! --- %prim XListInstalledColormaps :: Display -> Window -> IO ListColormap --- Int r_size; --- Colormap* r = XListInstalledColormaps(arg1,arg2,&r_size); --- %update(r); --- XFree(r); --- return; --- --- -- Again, this is almost good enough --- -- %errfun BadStatus XGetCommand :: Display -> Window -> IO ListString using err = XGetCommand(arg1,arg2,&res1,&res1_size) --- -- but not quite --- -- %prim XGetCommand :: Display -> Window -> IO ListString --- --Int argv_size; --- --String *argv; --- --Status r = XGetCommand(arg1,arg2,&argv,&argv_size); --- --if (Success != r) { %failWith(BadStatus, r); } --- -- %update(argv); --- --XFreeStringList(argv); --- --return; --- --- -- %fun XSetCommand :: Display -> Window -> ListString -> IO () using XSetCommand(arg1,arg2,arg3,res3_size) --- --- %errfun BadStatus XGetTransientForHint :: Display -> Window -> IO Window using err = XGetTransientForHint(arg1,arg2,&res1) --- --- %fun XSetTransientForHint :: Display -> Window -> Window -> IO () --- --- -- XRotateWindowProperties omitted --- -- XGetWindowProperty omitted --- --- -- XGetWindowAttributes omitted --- -- XChangeWindowAttributes omitted - ----------------------------------------------------------------- --- Drawing ----------------------------------------------------------------- - -%fun XDrawPoint :: Display -> Drawable -> GC -> Position -> Position -> IO () - -%fun XDrawPoints :: Display -> Drawable -> GC -> ListPoint -> CoordinateMode -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (coordinateMode arg5) -%code XDrawPoints(arg1,arg2,arg3,arg4,arg4_size,arg5) -%end free(arg4) - -%fun XDrawLine :: Display -> Drawable -> GC -> Position -> Position -> Position -> Position -> IO () - -%fun XDrawLines :: Display -> Drawable -> GC -> ListPoint -> CoordinateMode -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (coordinateMode arg5) -%code XDrawLines(arg1,arg2,arg3,arg4,arg4_size,arg5) -%end free(arg4) - -%fun XDrawSegments :: Display -> Drawable -> GC -> ListSegment -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listSegment arg4 arg4_size) -%code XDrawSegments(arg1,arg2,arg3,arg4,arg4_size) -%end free(arg4) - -%fun XDrawRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () - -%fun XDrawRectangles :: Display -> Drawable -> GC -> ListRectangle -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listRectangle arg4 arg4_size) -%code XDrawRectangles(arg1,arg2,arg3,arg4,arg4_size) -%end free(arg4) - -%fun XDrawArc :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> IO () - -%fun XDrawArcs :: Display -> Drawable -> GC -> ListArc -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listArc arg4 arg4_size) -%code XDrawArcs(arg1,arg2,arg3,arg4,arg4_size) -%end free(arg4) - -%fun XFillRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () - -%fun XFillRectangles :: Display -> Drawable -> GC -> ListRectangle -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listRectangle arg4 arg4_size) -%code XFillRectangles(arg1,arg2,arg3,arg4,arg4_size) -%end free(arg4) - -%fun XFillPolygon :: Display -> Drawable -> GC -> ListPoint -> PolygonShape -> CoordinateMode -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (polygonShape arg5) (coordinateMode arg6) -%code XFillPolygon(arg1,arg2,arg3,arg4,arg4_size,arg5,arg6) -%end free(arg4) - -%fun XFillArc :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> IO () - -%fun XFillArcs :: Display -> Drawable -> GC -> ListArc -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listArc arg4 arg4_size) -%code XFillArcs(arg1,arg2,arg3,arg4,arg4_size) -%end free(arg4) - -%fun XCopyArea :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () -%fun XCopyPlane :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> Pixel -> IO () - --- draw characters over existing background -%fun XDrawString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (position arg4) (position arg5) (stringLen arg6 arg6_size) -%code XDrawString(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size) -%end free(arg6) - --- draw characters over a blank rectangle of current background colour -%fun XDrawImageString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (position arg4) (position arg5) (stringLen arg6 arg6_size) -%code XDrawImageString(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size) -%end free(arg6) - --- XDrawString16 omitted (16bit chars not supported) --- XDrawImageString16 omitted (16bit chars not supported) --- XDrawText omitted (XTextItem not supported) --- XDrawText16 omitted (XTextItem not supported) - ----------------------------------------------------------------- --- Cut and paste buffers ----------------------------------------------------------------- - -%fun XStoreBuffer :: Display -> String -> Int -> IO () -%call (display arg1) (stringLen arg2 arg2_size) (int arg3) -%code Status err = XStoreBuffer(arg1,arg2,arg2_size,arg3); -%fail { Success != err }{ BadStatus(err,XStoreBuffer) } - -%fun XStoreBytes :: Display -> String -> IO () -%call (display arg1) (stringLen arg2 arg2_size) -%code Status err = XStoreBytes(arg1,arg2,arg2_size); -%fail { Success != err }{ BadStatus(err,XStoreBytes) } - -%fun XFetchBuffer :: Display -> Int -> IO String -%code -% int nbytes; -% char* res1 = XFetchBuffer(arg1, &nbytes, arg2); -%fail { res1 != NULL }{ NullPtr(XFetchBuffer) } -%result (stringLen res1 nbytes) -%end XFree(res1) - -%fun XFetchBytes :: Display -> IO String -%code -% int nbytes; -% char* res1 = XFetchBytes(arg1, &nbytes); -%fail { res1 != NULL }{ NullPtr(XFetchBytes) } -%result (stringLen res1 nbytes) -%end XFree(res1) - -%fun XRotateBuffers :: Display -> Int -> IO () -%code Status err = XRotateBuffers(arg1,arg2) -%fail { Success != err }{ BadStatus(err,XRotateBuffers) } - ----------------------------------------------------------------- --- Atoms ----------------------------------------------------------------- - -%const Atom -% [ XA_PRIMARY -% , XA_SECONDARY -% , XA_ARC -% , XA_ATOM -% , XA_BITMAP -% , XA_CARDINAL -% , XA_COLORMAP -% , XA_CURSOR -% , XA_CUT_BUFFER0 -% , XA_CUT_BUFFER1 -% , XA_CUT_BUFFER2 -% , XA_CUT_BUFFER3 -% , XA_CUT_BUFFER4 -% , XA_CUT_BUFFER5 -% , XA_CUT_BUFFER6 -% , XA_CUT_BUFFER7 -% , XA_DRAWABLE -% , XA_FONT -% , XA_INTEGER -% , XA_PIXMAP -% , XA_POINT -% , XA_RECTANGLE -% , XA_RESOURCE_MANAGER -% , XA_RGB_COLOR_MAP -% , XA_RGB_BEST_MAP -% , XA_RGB_BLUE_MAP -% , XA_RGB_DEFAULT_MAP -% , XA_RGB_GRAY_MAP -% , XA_RGB_GREEN_MAP -% , XA_RGB_RED_MAP -% , XA_STRING -% , XA_VISUALID -% , XA_WINDOW -% , XA_WM_COMMAND -% , XA_WM_HINTS -% , XA_WM_CLIENT_MACHINE -% , XA_WM_ICON_NAME -% , XA_WM_ICON_SIZE -% , XA_WM_NAME -% , XA_WM_NORMAL_HINTS -% , XA_WM_SIZE_HINTS -% , XA_WM_ZOOM_HINTS -% , XA_MIN_SPACE -% , XA_NORM_SPACE -% , XA_MAX_SPACE -% , XA_END_SPACE -% , XA_SUPERSCRIPT_X -% , XA_SUPERSCRIPT_Y -% , XA_SUBSCRIPT_X -% , XA_SUBSCRIPT_Y -% , XA_UNDERLINE_POSITION -% , XA_UNDERLINE_THICKNESS -% , XA_STRIKEOUT_ASCENT -% , XA_STRIKEOUT_DESCENT -% , XA_ITALIC_ANGLE -% , XA_X_HEIGHT -% , XA_QUAD_WIDTH -% , XA_WEIGHT -% , XA_POINT_SIZE -% , XA_RESOLUTION -% , XA_COPYRIGHT -% , XA_NOTICE -% , XA_FONT_NAME -% , XA_FAMILY_NAME -% , XA_FULL_NAME -% , XA_CAP_HEIGHT -% , XA_WM_CLASS -% , XA_WM_TRANSIENT_FOR -% , XA_LAST_PREDEFINED -% ] - ----------------------------------------------------------------- --- Window properties ----------------------------------------------------------------- - -%fun XSetTextProperty :: Display -> Window -> String -> Atom -> IO () -%call (display arg1) (window arg2) (stringLen arg3 arg3_size) (atom arg4) -%code -% XTextProperty p = { arg3, XA_STRING, 8, arg3_size }; -% XSetTextProperty(arg1,arg2,&p,arg4); -%end free(arg3) - --- %fun XSetStandardProperties :: Display -> Window -> String -> String -> Pixmap -> [String] -> XSizeHints -> IO () --- %code Status err = XSetStandardProperties(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size,&arg7) --- %fail { Success != err }{ BadStatus(err,XSetStandardProperties) } - ----------------------------------------------------------------- --- Regions ----------------------------------------------------------------- - -type RectInRegionResult = Int -%dis rectInRegionResult x = int x - --- Return values from XRectInRegion() -%const RectInRegionResult -% [ RectangleOut -% , RectangleIn -% , RectanglePart -% ] - --- regions deallocation is handled by the GC (ForeignObj magic) --- so we don't provide XDestroyRegion explicitly --- no idea what the int is for --- %fun XDestroyRegion :: Region -> IO Int - ----------------------------------------------------------------- --- Creating regions ----------------------------------------------------------------- - --- an empty region --- (often used as "out argument" to binary operators which return regions) -%fun XCreateRegion :: IO Region - -%fun XPolygonRegion :: ListPoint -> FillRule -> IO Region -%call (listPoint arg1 arg2) (fillRule arg3) - ----------------------------------------------------------------- --- Combining Regions --- --- The usual shoddy state of Xlib documentation fails to mention --- what the Int is for. --- --- All operations overwrite the region in their third argument --- which is usually a freshly created region. ----------------------------------------------------------------- - -%fun XIntersectRegion :: Region -> Region -> Region -> IO Int -%fun XSubtractRegion :: Region -> Region -> Region -> IO Int -%fun XUnionRectWithRegion :: Rectangle -> Region -> Region -> IO Int -%code res1 = XUnionRectWithRegion(&arg1,arg2,arg3) -%fun XUnionRegion :: Region -> Region -> Region -> IO Int -%fun XXorRegion :: Region -> Region -> Region -> IO Int - ----------------------------------------------------------------- --- Examining regions (tests, bounding boxes, etc) ----------------------------------------------------------------- - -%fun XEmptyRegion :: Region -> IO Bool -%fun XEqualRegion :: Region -> Region -> IO Bool -%fun XPointInRegion :: Region -> Point -> IO Bool -%code res1 = XPointInRegion(arg1,arg2.x,arg2.y) -%fun XRectInRegion :: Region -> Rectangle -> IO RectInRegionResult -%code res1 = XRectInRegion(arg1,arg2.x,arg2.y,arg2.width,arg2.height) - --- I have no idea what the int is for -%fun XClipBox :: Region -> IO (Rectangle,Int) -%code res2 = XClipBox(arg1,&res1) - ----------------------------------------------------------------- --- Modifying regions --- (If you use any of these, you can't make regions look like --- first class data structures.) ----------------------------------------------------------------- - --- translate region -%fun XOffsetRegion :: Region -> Point -> IO Int -%code res1 = XOffsetRegion(arg1,arg2.x,arg2.y) - --- increase size of region by +ve or -ve number of pixels --- while preserving the centre of the region (ie half the pixels --- come off the left, and half off the right) -%fun XShrinkRegion :: Region -> Point -> IO Int -%code res1 = XShrinkRegion(arg1,arg2.x,arg2.y) - ----------------------------------------------------------------- --- Graphics Context ----------------------------------------------------------------- - --- set clip mask of GC -%fun XSetRegion :: Display -> GC -> Region -> IO Int hunk ./Makefile 2 -# $Id: Makefile,v 1.1 2003/04/03 23:44:01 reid Exp $ +# $Id: Makefile,v 1.2 2003/04/04 11:11:05 reid Exp $ hunk ./Makefile 12 - Graphics/X11 + Graphics/X11 \ + Graphics/X11/Xlib hunk ./Graphics/X11/Xlib/Event.gc 27 + asKeyEvent, hunk ./Graphics/X11/Xlib/Event.gc 65 +import Foreign( castPtr ) + hunk ./Graphics/X11/Xlib/Event.gc 147 +asKeyEvent :: XEventPtr -> XKeyEventPtr +asKeyEvent = castPtr + hunk ./Graphics/X11/Xlib/Region.gc 3 --- Module : Graphics.X11.Xlib +-- Module : Graphics.X11.Xlib.Region hunk ./Makefile 2 -# $Id: Makefile,v 1.2 2003/04/04 11:11:05 reid Exp $ +# $Id: Makefile,v 1.3 2003/04/04 14:55:01 reid Exp $ hunk ./Makefile 9 -# SUBDIRS = include +SUBDIRS = cbits hunk ./Makefile 18 +SRC_CC_OPTS += -Wall -I../include -I. +SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) + hunk ./Makefile 26 -# yeuch, have to get X11_CFLAGS & X11_LIBS in through CPP to X11.conf.in +# yeuch, have to get X_CFLAGS & X_LIBS in through CPP to X11.conf.in hunk ./Makefile 28 -PACKAGE_CPP_OPTS += -DX11_CFLAGS='$(patsubst %,$(comma)"%",$(X11_CFLAGS))' -PACKAGE_CPP_OPTS += -DX11_LIBS='$(patsubst %,$(comma)"%",$(X11_LIBS))' +PACKAGE_CPP_OPTS += -DX_CFLAGS='$(patsubst %,$(comma)"%",$(X_CFLAGS))' +PACKAGE_CPP_OPTS += -DX_LIBS='$(patsubst %,$(comma)"%",$(X_LIBS))' + +# ----------------------------------------------------------------------------- + +STUBOBJS += \ + $(patsubst %.gc, %_stub_ffi.o, $(GC_SRCS)) + +# ----------------------------------------------------------------------------- + +.PHONY: examples + +examples: + $(MAKE) -C examples hunk ./X11.conf.in 15 - library_dirs = [ "$libdir/libraries/X11" ], + library_dirs = [ "$libdir/libraries/X11" + , "$libdir/libraries/X11/cbits" ], hunk ./X11.conf.in 19 - extra_libraries = [ "HSX11_cbits" ], + extra_libraries = [ "HSX11_cbits", "X11" ], hunk ./X11.conf.in 28 - extra_cc_opts = [ "" X11_CFLAGS ], - extra_ld_opts = [ "" X11_LIBS ] + extra_cc_opts = [ "" X_CFLAGS ], + extra_ld_opts = [ "" X_LIBS ] hunk ./cbits/Makefile 1 + hunk ./cbits/Makefile 3 -# $Id: Makefile,v 1.1 2003/04/03 23:44:03 reid Exp $ -# -# (c) The GHC Team, 1999 -# +# $Id: Makefile,v 1.2 2003/04/04 14:55:02 reid Exp $ hunk ./cbits/Makefile 5 -TOP=../.. +TOP = ../.. hunk ./cbits/Makefile 8 -PACKAGE = xlib -IS_CBITS_LIB = YES -INSTALL_DATAS+=HsXlib.h +# ----------------------------------------------------------------------------- + +SRC_CC_OPTS += -Wall -I../include + +LIBRARY = libHSX11_cbits.a +LIBOBJS = $(C_OBJS) + +# ----------------------------------------------------------------------------- +# Per-module flags + +# ----------------------------------------------------------------------------- hunk ./cbits/Makefile 22 + hunk ./Graphics/X11/Types.gc 735 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Atom.gc 94 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Color.gc 37 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Context.gc 48 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Display.gc 57 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Event.gc 67 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Font.gc 35 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Misc.gc 140 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Misc.gc 300 +#ifdef __HUGS__ +{-# CBITS auxiliaries.c #-} +#endif hunk ./Graphics/X11/Xlib/Region.gc 45 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Screen.gc 44 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Types.gc 25 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib/Window.gc 55 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Graphics/X11/Xlib.gc 48 -%#include "include/HsXlib.h" +%#include "HsXlib.h" hunk ./Makefile 2 -# $Id: Makefile,v 1.3 2003/04/04 14:55:01 reid Exp $ +# $Id: Makefile,v 1.4 2003/04/12 11:42:18 ross Exp $ hunk ./Makefile 18 -SRC_CC_OPTS += -Wall -I../include -I. +SRC_CC_OPTS += -Wall -Iinclude -I. hunk ./Graphics/X11/Xlib/Misc.gc 300 -#ifdef __HUGS__ hunk ./Graphics/X11/Xlib/Misc.gc 301 -#endif hunk ./Graphics/X11/StdDIS.gc 15 -module Graphics.X11.StdDIS +module System.Win32.StdDIS hunk ./Graphics/X11/StdDIS.gc 22 + , Storable(..) hunk ./Graphics/X11/StdDIS.gc 30 + , funPtrToAddr, nullPtr hunk ./Makefile 2 -# $Id: Makefile,v 1.4 2003/04/12 11:42:18 ross Exp $ +# $Id: Makefile,v 1.5 2003/04/27 21:49:48 reid Exp $ hunk ./Makefile 36 -# ----------------------------------------------------------------------------- - -.PHONY: examples - -examples: - $(MAKE) -C examples - hunk ./Graphics/X11/StdDIS.gc 15 -module System.Win32.StdDIS +module Graphics.X11.StdDIS hunk ./Graphics/X11/StdDIS.gc 30 - , funPtrToAddr, nullPtr + , castFunPtrToPtr, nullPtr hunk ./Graphics/X11/StdDIS.gc 45 + Storable(..), hunk ./Graphics/X11/StdDIS.gc 51 + castFunPtrToPtr, nullPtr, hunk ./Graphics/X11/Xlib/Region.gc 67 --- regions deallocation is handled by the GC (ForeignObj magic) +-- regions deallocation is handled by the GC (ForeignPtr magic) hunk ./include/HsXlib.h 2 - * $Id: HsXlib.h,v 1.1 2003/04/03 23:44:04 reid Exp $ + * $Id: HsXlib.h,v 1.2 2003/05/08 16:00:20 ross Exp $ hunk ./include/HsXlib.h 11 +#include + hunk ./X11.conf.in 7 - import_dirs = [ "$libdir/imports/X11" ], + import_dirs = [ "$libdir/imports" ], addfile ./package.conf.in hunk ./X11.conf.in 1 -#include "config.h" - -Package { - name = "X11", - auto = True, -#ifdef INSTALLING - import_dirs = [ "$libdir/imports" ], -#else - import_dirs = [ "$libdir/libraries/X11" ], -#endif - source_dirs = [], -#ifdef INSTALLING - library_dirs = [ "$libdir" ], -#else - library_dirs = [ "$libdir/libraries/X11" - , "$libdir/libraries/X11/cbits" ], -#endif - hs_libraries = [ "HSX11" ], - extra_libraries = [ "HSX11_cbits", "X11" ], -#ifdef INSTALLING - include_dirs = [], -#else - include_dirs = [ "$libdir/libraries/X11/include" ], -#endif - c_includes = [ "HsX11.h" ], - package_deps = [ "base" ], - extra_ghc_opts = [], - extra_cc_opts = [ "" X_CFLAGS ], - extra_ld_opts = [ "" X_LIBS ] -} rmfile ./X11.conf.in hunk ./package.conf.in 1 +#include "config.h" + +Package { + name = "X11", + auto = True, +#ifdef INSTALLING + import_dirs = [ "$libdir/imports" ], +#else + import_dirs = [ "$libdir/libraries/X11" ], +#endif + source_dirs = [], +#ifdef INSTALLING + library_dirs = [ "$libdir" ], +#else + library_dirs = [ "$libdir/libraries/X11" + , "$libdir/libraries/X11/cbits" ], +#endif + hs_libraries = [ "HSX11" ], + extra_libraries = [ "HSX11_cbits", "X11" ], +#ifdef INSTALLING + include_dirs = [], +#else + include_dirs = [ "$libdir/libraries/X11/include" ], +#endif + c_includes = [ "HsX11.h" ], + package_deps = [ "base" ], + extra_ghc_opts = [], + extra_cc_opts = [ "" X_CFLAGS ], + extra_ld_opts = [ "" X_LIBS ] +} hunk ./Makefile 2 -# $Id: Makefile,v 1.5 2003/04/27 21:49:48 reid Exp $ +# $Id: Makefile,v 1.6 2003/05/17 00:53:51 ross Exp $ hunk ./Makefile 26 -# yeuch, have to get X_CFLAGS & X_LIBS in through CPP to X11.conf.in +# yeuch, have to get X_CFLAGS & X_LIBS in through CPP to package.conf.in hunk ./Graphics/X11/StdDIS.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.StdDIS --- Copyright : (c) Thomas Nordin and Alastair Reid, 1997-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- Generic GreenCard support code. --- ------------------------------------------------------------------------------ - -module Graphics.X11.StdDIS - ( StablePtr - , ForeignPtr - , Ptr - , FunPtr - , Int8, Int16, Int32, Int64 - , Word8, Word16, Word32, Word64 - , Storable(..) - , unsafePerformIO - , MbString - , marshall_bool_, unmarshall_bool_ - , marshall_string_, unmarshall_string_ - , marshall_stringLen_, unmarshall_stringLen_ - , newStablePtr, deRefStablePtr, freeStablePtr - , newForeignPtr, withForeignPtr - , castFunPtrToPtr, nullPtr - , malloc, free - - -- re-exporting base Prelude types - -- (useful when generating source that - -- import StdDIS qualified.) - , Float - , Double - , Int - , Char - ) where - - -import System.IO.Unsafe( unsafePerformIO ) -import Foreign( - Storable(..), - StablePtr, newStablePtr, deRefStablePtr, freeStablePtr, - ForeignPtr, newForeignPtr, withForeignPtr, - Ptr, FunPtr, - Int8, Int16, Int32, Int64, - Word8, Word16, Word32, Word64, - castFunPtrToPtr, nullPtr, - malloc, free - ) -import Foreign.C.String( - CString, - newCString, newCStringLen, - peekCString, peekCStringLen - ) - -%dis char x = %%Char ({HsChar} x) -%dis int x = %%Int ({HsInt} x) -%dis float x = %%Float ({HsFloat} x) -%dis double x = %%Double ({HsDouble} x) -%dis ptr x = %%Ptr ({HsPtr} x) -%dis funPtr x = %%FunPtr ({HsFunPtr} x) - -%dis int8 x = %%Int8 ({HsInt8} x) -%dis int16 x = %%Int16 ({HsInt16} x) -%dis int32 x = %%Int32 ({HsInt32} x) - -%dis word8 x = %%Word8 ({HsWord8} x) -%dis word16 x = %%Word16 ({HsWord16} x) -%dis word32 x = %%Word32 ({HsWord32} x) - -%dis maybeT z x = %Maybe z x -%dis maybe x = maybeT {0} x - -%dis bool x = bool_ (int x) - -marshall_bool_ :: Bool -> IO Int -marshall_bool_ True = return 1 -marshall_bool_ False = return 0 - -unmarshall_bool_ :: Int -> IO Bool -unmarshall_bool_ 0 = return False -unmarshall_bool_ _ = return True - --- Ignore "IO" part of result type -%dis iO x = x - ----------------------------------------------------------------- --- Strings ----------------------------------------------------------------- - -%dis string x = string_ (ptr ({char *} x)) -%dis stringLen x l = stringLen_ (ptr ({char *} x)) (int l) - -type MbString = Maybe String -%dis mbString x = maybeT {nullPtr} (string x) - -marshall_string_ :: [Char] -> IO CString -marshall_string_ = newCString - -marshall_stringLen_ :: [Char] -> IO (CString, Int) -marshall_stringLen_ = newCStringLen - -unmarshall_string_ :: CString -> IO String -unmarshall_string_ = peekCString - -unmarshall_stringLen_ :: CString -> Int -> IO String -unmarshall_stringLen_ ptr l = peekCStringLen (ptr, l) - ----------------------------------------------------------------- --- Stable pointers ----------------------------------------------------------------- - --- --- Use "stable" to create a stable pointer --- --- Use "stablePtr" to manipulate (previously constructed) stable pointers --- in Haskell. --- -%dis stable x = -% declare {HsStablePtr} x in -% << newStablePtr / deRefStablePtr / %%StablePtr >> x - -%dis stablePtr x = (%%StablePtr ({HsStablePtr} x)) - ----------------------------------------------------------------- --- Foreign pointers ----------------------------------------------------------------- - --- --- Use "foreignP" to create a stable pointer --- --- Use "foreignPtr" to manipulate (previously constructed) foreign pointers --- in Haskell. --- -%dis foreign x = -% declare {HsForeignPtr} x in -% << newForeignPtr / withForeignPtr / %%ForeignPtr >> x - -%dis foreignPtr x = %%ForeignPtr ({HsForeignPtr} x) - ----------------------------------------------------------------- --- End of StdDIS ----------------------------------------------------------------- rmfile ./Graphics/X11/StdDIS.gc hunk ./Graphics/X11/Types.gc 733 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Atom.gc 90 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Color.gc 33 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Context.gc 44 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Display.gc 53 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Event.gc 61 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Font.gc 31 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Misc.gc 134 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Region.gc 23 - createRegion, - polygonRegion, +-- createRegion, +-- polygonRegion, hunk ./Graphics/X11/Xlib/Region.gc 41 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Region.gc 76 --- an empty region --- (often used as "out argument" to binary operators which return regions) -%fun XCreateRegion :: IO Region - -%fun XPolygonRegion :: ListPoint -> FillRule -> IO Region -%call (listPoint arg1 arg2) (fillRule arg3) +-- -- an empty region +-- -- (often used as "out argument" to binary operators which return regions) +-- %fun XCreateRegion :: IO Region +-- +-- %fun XPolygonRegion :: ListPoint -> FillRule -> IO Region +-- %call (listPoint arg1 arg2) (fillRule arg3) hunk ./Graphics/X11/Xlib/Screen.gc 40 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Types.gc 19 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib/Window.gc 51 -import Graphics.X11.StdDIS +import Foreign.GreenCard hunk ./Graphics/X11/Xlib.gc 46 -import Graphics.X11.StdDIS +import Foreign.GreenCard adddir ./mk addfile ./mk/boilerplate.mk addfile ./mk/target.mk addfile ./mk/version.mk hunk ./Makefile 2 -# $Id: Makefile,v 1.6 2003/05/17 00:53:51 ross Exp $ +# $Id: Makefile,v 1.7 2003/05/22 11:14:30 reid Exp $ hunk ./Makefile 4 -TOP = .. +TOP = . hunk ./Makefile 16 -PACKAGE_DEPS = base +PACKAGE_DEPS = base lang hunk ./Makefile 19 -SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) hunk ./Makefile 20 -SRC_HC_OPTS += -Wall -fffi -cpp -fglasgow-exts -GC_OPTS += --target=ffi +SRC_HC_OPTS += -Wall -cpp -fglasgow-exts +SRC_HC_OPTS += -fffi -package greencard hunk ./Makefile 23 -SRC_HADDOCK_OPTS += -t "X11 Libraries (X11 package)" +SRC_HADDOCK_OPTS += -t "X11 Libraries (${PACKAGE} package)" hunk ./Makefile 30 -# ----------------------------------------------------------------------------- - -STUBOBJS += \ - $(patsubst %.gc, %_stub_ffi.o, $(GC_SRCS)) - hunk ./cbits/Makefile 3 -# $Id: Makefile,v 1.2 2003/04/04 14:55:02 reid Exp $ +# $Id: Makefile,v 1.3 2003/05/22 11:14:30 reid Exp $ hunk ./cbits/Makefile 5 -TOP = ../.. +TOP = .. hunk ./mk/boilerplate.mk 1 +# ----------------------------------------------------------------------------- +# $Id: boilerplate.mk,v 1.1 2003/05/22 11:14:30 reid Exp $ + +# Begin by slurping in the boilerplate from one level up. +# Remember, TOP is the top level of the innermost level +# (FPTOOLS_TOP is the fptools top) + +# We need to set TOP to be the TOP that the next level up expects! +# The TOP variable is reset after the inclusion of the fptools +# boilerplate, so we stash TOP away first: +LIBRARY_TOP := $(TOP) +TOP:=$(TOP)/.. + +# Pull in the fptools boilerplate +include $(TOP)/mk/boilerplate.mk + +# Reset TOP +TOP:=$(LIBRARY_TOP) + +# ----------------------------------------------------------------- +# Everything after this point +# augments or overrides previously set variables. + +-include $(TOP)/mk/paths.mk +-include $(TOP)/mk/opts.mk +-include $(TOP)/mk/suffix.mk +-include $(TOP)/mk/version.mk hunk ./mk/target.mk 1 +# $Id: target.mk,v 1.1 2003/05/22 11:14:32 reid Exp $ + +TOP:=$(TOP)/.. + +# This is a standalone library. That is, it is not (and cannot be) +# built as part of the ghc build process but is built later after you have +# installed GHC. +STANDALONE_PACKAGE = YES + +# All the libs in here are "hierarchical", this flag tell the +# installation machinery to make sure that when installing interface +# files we maintain the directory structure. +HIERARCHICAL_LIB = YES + +# Some of the libraries rely on GreenCard. When you compile the GreenCard +# generated code, you have to use -I/usr/lib/ghc-/include so that +# the C compiler can find HsFFI.h. The easy way of doing this is to use ghc +# as your C compiler. +UseGhcForCc = YES + +# NOT YET: Haddock needs to understand about .raw-hs files +# +# Set our source links to point to the CVS repository on the web. +# SRC_HADDOCK_OPTS += -s http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libaries/$(PACKAGE) + +include $(TOP)/mk/target.mk + +TOP:=$(LIBRARY_TOP)/.. hunk ./mk/version.mk 1 +# +# Project-specific version information. +# +# Note: +# this config file is intended to centralise all +# project version information. To bump up the version +# info on your package, edit this file and recompile +# all the dependents. This file lives in the source tree. + +# +# Project settings: +# +# ProjectVersion is treated as a *string* +# ProjectVersionInt is treated as an *integer* (for cpp defines) + +# Versioning scheme: A.B.C +# A: major version, decimal, any number of digits +# B: minor version, decimal, any number of digits +# C: patchlevel, one digit, omitted if zero. +# +# ProjectVersionInt does *not* contain the patchlevel (rationale: this +# figure is used for conditional compilations, and library interfaces +# etc. are not supposed to change between patchlevels). +# +# The ProjectVersionInt is included in interface files, and GHC +# checks that it's reading interface generated by the same ProjectVersion +# as itself. It does this even though interface file syntax may not +# change between versions. Rationale: calling conventions or other +# random .o-file stuff might change even if the .hi syntax doesn't + +ProjectName = X11 Haskell library +ProjectNameShort = HSX11 +ProjectVersion = 1.0 +ProjectVersionInt = 100 +ProjectPatchLevel = 0 + hunk ./package.conf.in 1 -#include "config.h" +#include "mk/config.h" hunk ./package.conf.in 5 - auto = True, hunk ./package.conf.in 6 - import_dirs = [ "$libdir/imports" ], + import_dirs = [ "$libdir/imports/X11" ], adddir ./doc addfile ./doc/HSX11.sgml addfile ./doc/Makefile hunk ./Makefile 2 -# $Id: Makefile,v 1.7 2003/05/22 11:14:30 reid Exp $ +# $Id: Makefile,v 1.8 2003/05/22 14:16:41 reid Exp $ hunk ./Makefile 9 -SUBDIRS = cbits +SUBDIRS = cbits doc hunk ./doc/HSX11.sgml 1 + +]> + + + + 2003-5-22 + HSX11 Guide + + Alastair + Reid + +
alastair@reid-consulting-uk.ltd.uk
+ + 1997-2003 + Alastair Reid + + + This document describes HSX11, the Haskell binding to X11, + version 1.00. + +
+ + + + + + + + Introduction + + The library aims to provide a direct translation of the X + binding into Haskell so the most important pieces of documentation + you should read are the XFree86 website. + 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. + + + + + Changes from X11 documentation + + In making a Haskell binding to a C library, there are certain + necessary and/or desirable changes in the interface. + + These can be divided into systematic changes which are applied + uniformly throughout the library and ad-hoc changes which are + applied to particular parts of the interface. + + Systematic Changes + + + + + + In translating the library, we had to change names to conform with + Haskell's lexical syntax: function names and names of constants must + start with a lowercase letter; type names must start with an + uppercase letter. + + + In addition, we chose to take advantage of Haskell's module system + to allow us to drop common prefixes ( + + + + + + +C Name +Haskell Name + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Haskell ... + + + + + + + Haskell ... + + + + + + + + + + Ad hoc Changes + + + Finally, we chose to make some changes in the interface to better + conform with idiomatic Haskell style or to allow a typesafe interface. + + + + + + one... + + + + + + + two... + + + + + + + + + + + + + Example + + + + &the-index + +
hunk ./doc/Makefile 1 +#----------------------------------------------------------------------------- +# $Id: Makefile,v 1.1 2003/05/22 14:16:41 reid Exp $ + +TOP = .. +include $(TOP)/mk/boilerplate.mk + +SGML_DOC = HSX11 + +include $(TOP)/mk/target.mk hunk ./mk/boilerplate.mk 1 -# ----------------------------------------------------------------------------- -# $Id: boilerplate.mk,v 1.1 2003/05/22 11:14:30 reid Exp $ - hunk ./mk/boilerplate.mk 9 -TOP:=$(TOP)/.. +TOP:=$(TOP)/../.. + +HIERARCHICAL_LIB = YES + +# Some of the libraries rely on GreenCard. When you compile the GreenCard +# generated code, you have to use -I/usr/lib/ghc-/include so that +# the C compiler can find HsFFI.h. The easy way of doing this is to use ghc +# as your C compiler. +UseGhcForCc = YES + +# NOT YET: Haddock needs to understand about .raw-hs files +# +# Set our source links to point to the CVS repository on the web. +# SRC_HADDOCK_OPTS += -s http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libaries/$(PACKAGE) hunk ./mk/target.mk 1 -# $Id: target.mk,v 1.1 2003/05/22 11:14:32 reid Exp $ - -TOP:=$(TOP)/.. - -# This is a standalone library. That is, it is not (and cannot be) -# built as part of the ghc build process but is built later after you have -# installed GHC. -STANDALONE_PACKAGE = YES - -# All the libs in here are "hierarchical", this flag tell the -# installation machinery to make sure that when installing interface -# files we maintain the directory structure. -HIERARCHICAL_LIB = YES - -# Some of the libraries rely on GreenCard. When you compile the GreenCard -# generated code, you have to use -I/usr/lib/ghc-/include so that -# the C compiler can find HsFFI.h. The easy way of doing this is to use ghc -# as your C compiler. -UseGhcForCc = YES - -# NOT YET: Haddock needs to understand about .raw-hs files -# -# Set our source links to point to the CVS repository on the web. -# SRC_HADDOCK_OPTS += -s http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libaries/$(PACKAGE) - +TOP:=$(TOP)/../.. hunk ./mk/target.mk 3 - -TOP:=$(LIBRARY_TOP)/.. +TOP:=$(LIBRARY_TOP) hunk ./package.conf.in 1 -#include "mk/config.h" - hunk ./package.conf.in 3 -#ifdef INSTALLING - import_dirs = [ "$libdir/imports/X11" ], -#else - import_dirs = [ "$libdir/libraries/X11" ], -#endif + import_dirs = [ "${pkglibdir}/imports" ], hunk ./package.conf.in 5 -#ifdef INSTALLING - library_dirs = [ "$libdir" ], -#else - library_dirs = [ "$libdir/libraries/X11" - , "$libdir/libraries/X11/cbits" ], -#endif + library_dirs = [ "${pkglibdir}" ], hunk ./package.conf.in 8 -#ifdef INSTALLING hunk ./package.conf.in 9 -#else - include_dirs = [ "$libdir/libraries/X11/include" ], -#endif hunk ./Makefile 2 -# $Id: Makefile,v 1.8 2003/05/22 14:16:41 reid Exp $ +# $Id: Makefile,v 1.9 2003/05/23 10:06:24 simonmar Exp $ hunk ./Makefile 20 -SRC_HC_OPTS += -Wall -cpp -fglasgow-exts -SRC_HC_OPTS += -fffi -package greencard +SRC_HC_OPTS += -Wall -cpp -fglasgow-exts -fffi +SRC_HC_OPTS += -Iinclude +SRC_HC_OPTS += -package greencard hunk ./package.conf.in 10 - package_deps = [ "base" ], + package_deps = [ "base", "lang" ], hunk ./Makefile 2 -# $Id: Makefile,v 1.9 2003/05/23 10:06:24 simonmar Exp $ +# $Id: Makefile,v 1.10 2003/05/27 16:21:41 reid Exp $ hunk ./Makefile 16 -PACKAGE_DEPS = base lang +PACKAGE_DEPS = haskell98 HSgreencard hunk ./Makefile 22 -SRC_HC_OPTS += -package greencard +SRC_HC_OPTS += -package haskell98 -package HSgreencard hunk ./package.conf.in 10 - package_deps = [ "base", "lang" ], + package_deps = [ "haskell98", "HSgreencard" ], hunk ./doc/HSX11.sgml 15 - 1997-2003 + 1999-2003 hunk ./doc/HSX11.sgml 73 - - - - - hunk ./doc/HSX11.sgml 74 - -C Name -Haskell Name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + C Name + Haskell Name + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hunk ./doc/HSX11.sgml 123 - Haskell ... + We translate type names as follows... + + + + + + + + + + C Type + Haskell Type + Haskell Expansion + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + We systematically use a type of the form + + We named enumeration types so that function types would be easier to + understand. For example, we added ... Note that the types are + synonyms for + For example, the C function with type: + +XDrawPoints(Display *display, + Drawable d, + GC gc, + XPoint *points, + int npoints, + int mode) + + + is given the Haskell type: + +drawPoints :: Display + -> Drawable + -> GC + -> [Point] + -> CoordinateMode + -> IO () + + + + hunk ./Graphics/X11/Xlib/Region.gc 23 --- createRegion, --- polygonRegion, + createRegion, + polygonRegion, hunk ./Graphics/X11/Xlib/Region.gc 76 --- -- an empty region --- -- (often used as "out argument" to binary operators which return regions) --- %fun XCreateRegion :: IO Region --- --- %fun XPolygonRegion :: ListPoint -> FillRule -> IO Region --- %call (listPoint arg1 arg2) (fillRule arg3) +-- an empty region +-- (often used as "out argument" to binary operators which return regions) +%fun XCreateRegion :: IO Region + +%fun XPolygonRegion :: ListPoint -> FillRule -> IO Region +%call (listPoint arg1 arg2) (fillRule arg3) hunk ./Makefile 2 -# $Id: Makefile,v 1.10 2003/05/27 16:21:41 reid Exp $ +# $Id: Makefile,v 1.11 2003/05/29 14:44:31 reid Exp $ hunk ./Makefile 15 -PACKAGE = X11 +PACKAGE = HSX11 hunk ./Makefile 30 +PACKAGE_CPP_OPTS += -DPACKAGE=\"${PACKAGE}\" +PACKAGE_CPP_OPTS += -DPACKAGE_DEPS='$(patsubst %,"%"$(comma),$(PACKAGE_DEPS)) "haskell98"' +PACKAGE_CPP_OPTS += -DLIBRARY=\"HS$(PACKAGE)\" hunk ./package.conf.in 2 - name = "X11", + name = PACKAGE, hunk ./package.conf.in 6 - hs_libraries = [ "HSX11" ], + hs_libraries = [ LIBRARY ], hunk ./package.conf.in 9 - c_includes = [ "HsX11.h" ], - package_deps = [ "haskell98", "HSgreencard" ], + c_includes = [ ], + package_deps = [ PACKAGE_DEPS ], addfile ./INSTALL addfile ./LICENSE addfile ./README hunk ./INSTALL 1 +# install ghc >= 6.0 +# install greencard >= 3.00 +tar zxvf x11-1.00.tar.gz +cd x11-1.00 +./configure --with-greencard +cd libraries/X11 +make boot +make all +make install # may require su root + hunk ./LICENSE 1 +The HSX11 Library is Copyright (c) Alastair Reid, +1997-2003, All rights reserved, and is distributed as free software +under the following license. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +- Neither name of the copyright holders nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND THE CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDERS OR THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. hunk ./README 1 +We are pleased to announce a new release of the Haskell binding for +X11 which provides a binding to most of Xlib. The library is +distributed as open source. + +The library can be downloaded from: http://www.haskell.org/packages/. +You will need GreenCard 3.00 and GHC 6.0 to build the library. +Installation instructions are in x11/Install. +Bug reports should be sent to X11@reid-consulting-uk.ltd.uk + +Enjoy! + +-- +Alastair Reid +alastair@reid-consulting-uk.ltd.uk +http://www.reid-consulting-uk.ltd.uk/alastair/ hunk ./doc/HSX11.sgml 188 - - - - - - - hunk ./doc/HSX11.sgml 211 - Haskell ... + We consistently raise exceptions when a function returns an error + code. In practice, this only affects the following functions + because most Xlib functions do not return error codes. + +allocColor +allocNamedColor +fetchBuffer +fetchBytes +fontFromGC +getGeometry +getIconName +iconifyWindow +loadQueryFont +lookupColor +openDisplay +parseColor +queryBestCursor +queryBestSize +queryBestStipple +queryBestTile +rotateBuffers +selectInput +storeBuffer +storeBytes +withdrawWindow + + The Xlib library reports most errors by invoking a user-provided + error handler. The function + +setDefaultErrorHandler :: IO () + +installs this error handler. + +int defaultErrorHandler(Display *d, XErrorEvent *ev) +{ + char buffer[1000]; + XGetErrorText(d,ev->error_code,buffer,1000); + printf("Error: %s\n", buffer); + return 0; +} + hunk ./doc/HSX11.sgml 259 - For example, the C function with type: + As an example of how these rules are applied in generating a + function type, the C function with type: hunk ./doc/HSX11.sgml 292 - +waitForEvent :: Display -> Word32 -> IO Bool + +reads an event with a timeout (in microseconds). +% +It is sometimes useful in conjunction with this function: + +gettimeofday_in_milliseconds :: IO Integer + hunk ./doc/HSX11.sgml 309 - +set_background_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () +set_background_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +set_border_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () +set_border_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +set_bit_gravity :: XSetWindowAttributesPtr -> BitGravity -> IO () +set_win_gravity :: XSetWindowAttributesPtr -> WindowGravity -> IO () +set_backing_store :: XSetWindowAttributesPtr -> BackingStore -> IO () +set_backing_planes :: XSetWindowAttributesPtr -> Pixel -> IO () +set_backing_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +set_save_under :: XSetWindowAttributesPtr -> Bool -> IO () +set_event_mask :: XSetWindowAttributesPtr -> EventMask -> IO () +set_do_not_propagate_mask :: XSetWindowAttributesPtr -> EventMask -> IO () +set_override_redirect :: XSetWindowAttributesPtr -> Bool -> IO () +set_colormap :: XSetWindowAttributesPtr -> Colormap -> IO () +set_cursor :: XSetWindowAttributesPtr -> Cursor -> IO () + hunk ./doc/HSX11.sgml 339 - - - - Example - hunk ./INSTALL 3 -tar zxvf x11-1.00.tar.gz -cd x11-1.00 +tar zxvf HSX11-1.00.tar.gz +cd HSX11-1.00/fptools hunk ./INSTALL 6 +make -Cglafp-utils hunk ./Makefile 2 -# $Id: Makefile,v 1.11 2003/05/29 14:44:31 reid Exp $ +# $Id: Makefile,v 1.12 2003/06/04 12:43:56 reid Exp $ hunk ./Makefile 15 -PACKAGE = HSX11 -PACKAGE_DEPS = haskell98 HSgreencard +PACKAGE = X11 +PACKAGE_DEPS = greencard haskell98 hunk ./Makefile 22 -SRC_HC_OPTS += -package haskell98 -package HSgreencard hunk ./Makefile 27 -PACKAGE_CPP_OPTS += -DX_CFLAGS='$(patsubst %,$(comma)"%",$(X_CFLAGS))' -PACKAGE_CPP_OPTS += -DX_LIBS='$(patsubst %,$(comma)"%",$(X_LIBS))' -PACKAGE_CPP_OPTS += -DPACKAGE=\"${PACKAGE}\" -PACKAGE_CPP_OPTS += -DPACKAGE_DEPS='$(patsubst %,"%"$(comma),$(PACKAGE_DEPS)) "haskell98"' -PACKAGE_CPP_OPTS += -DLIBRARY=\"HS$(PACKAGE)\" +PACKAGE_CPP_OPTS += -DX_CFLAGS='$(patsubst %,"%"$(comma), $(X_CFLAGS))' +PACKAGE_CPP_OPTS += -DX_LIBS='$(patsubst %, "%"$(comma), $(X_LIBS))' hunk ./package.conf.in 3 - import_dirs = [ "${pkglibdir}/imports" ], + auto = True, + import_dirs = [ LIBDIR"/imports" ], hunk ./package.conf.in 6 - library_dirs = [ "${pkglibdir}" ], + library_dirs = [ LIBDIR ], hunk ./package.conf.in 13 - extra_cc_opts = [ "" X_CFLAGS ], - extra_ld_opts = [ "" X_LIBS ] + extra_cc_opts = [ X_CFLAGS ], + extra_ld_opts = [ X_LIBS ] hunk ./Makefile 2 -# $Id: Makefile,v 1.12 2003/06/04 12:43:56 reid Exp $ +# $Id: Makefile,v 1.13 2003/06/05 13:59:06 reid Exp $ hunk ./Makefile 18 -SRC_CC_OPTS += -Wall -Iinclude -I. +SRC_CC_OPTS += -Iinclude -I. hunk ./Makefile 20 -SRC_HC_OPTS += -Wall -cpp -fglasgow-exts -fffi +SRC_HC_OPTS += -cpp -fglasgow-exts -fffi adddir ./distrib addfile ./distrib/MakingDistributions.txt hunk ./README 1 + HSX11 1.00 + A Haskell binding for X11 + +In preparation for a major release of HSX11, we are making an alpha +release for folk to play with. We welcome bug reports, comments on +how the system is packaged, the web page, examples, comments from +those who build binary and source packages, etc. and especially +welcome comments accompanied by patches or cvs commit messages. + hunk ./README 14 -The library can be downloaded from: http://www.haskell.org/packages/. +The library can be downloaded from: http://www.haskell.org/packages. hunk ./README 16 -Installation instructions are in x11/Install. +Installation instructions are in HSX11-1.0/INSTALL. hunk ./README 20 - hunk ./README 21 -Alastair Reid -alastair@reid-consulting-uk.ltd.uk -http://www.reid-consulting-uk.ltd.uk/alastair/ +Alastair Reid http://www.reid-consulting-uk.ltd.uk + +ps Though they are really independent issues, it is worth +noting two other things about this release: + +1) We have created a page http://www.haskell.org/packages which + contains a list of Haskell packages and acts as a 'homepage' for + packages like this that are too small to justify a full homepage. + Please feed this page. + +2) This release is based on the GHC team's fptools infrastructure + which is evolving in the direction of supporting packages like this + one. We welcome comments on this infrastructure and, especially, + offers to help make it better. + hunk ./distrib/MakingDistributions.txt 1 +cd /tmp +mkdir HSX11-1.00 +cd HSX11-1.00 +cvs -d:ext:reid@cvs.haskell.org:/home/cvs/root checkout fpconfig +cvs -d:ext:reid@cvs.haskell.org:/home/cvs/root checkout fptools/libraries/X11 +(cd fptools; autoconf) +cp fptools/libraries/X11/INSTALL . +cp fptools/libraries/X11/LICENSE . +cp fptools/libraries/X11/README . +cd .. +tar zcf HSX11-1.00.tar.gz HSX11-1.00 +scp HSX11-1.00.tar.gz reid@haskell.org:/home/haskell/packages/downloads + hunk ./INSTALL 3 +# install X11 + hunk ./INSTALL 6 -cd HSX11-1.00/fptools +cd HSX11-1.00 + +cd fptools hunk ./INSTALL 10 -make -Cglafp-utils -cd libraries/X11 +make + +cd .. hunk ./Makefile 2 -# $Id: Makefile,v 1.13 2003/06/05 13:59:06 reid Exp $ +# $Id: Makefile,v 1.14 2003/06/26 12:36:36 reid Exp $ hunk ./Makefile 9 -SUBDIRS = cbits doc +SUBDIRS = fptools cbits doc hunk ./README 14 -The library can be downloaded from: http://www.haskell.org/packages. -You will need GreenCard 3.00 and GHC 6.0 to build the library. -Installation instructions are in HSX11-1.0/INSTALL. -Bug reports should be sent to X11@reid-consulting-uk.ltd.uk +The library can be downloaded from: + + http://www.reid-consulting-uk.ltd.uk/projects/HSX11.html + +You will need GreenCard 3.00, GHC 6.0 and, of course, X11 to build the +library. Installation instructions are in HSX11-1.0/INSTALL. Bug +reports should be sent to X11@reid-consulting-uk.ltd.uk hunk ./README 26 -ps Though they are really independent issues, it is worth -noting two other things about this release: - -1) We have created a page http://www.haskell.org/packages which - contains a list of Haskell packages and acts as a 'homepage' for - packages like this that are too small to justify a full homepage. - Please feed this page. - -2) This release is based on the GHC team's fptools infrastructure +ps This release is based on the GHC team's fptools infrastructure hunk ./distrib/MakingDistributions.txt 2 -mkdir HSX11-1.00 -cd HSX11-1.00 -cvs -d:ext:reid@cvs.haskell.org:/home/cvs/root checkout fpconfig -cvs -d:ext:reid@cvs.haskell.org:/home/cvs/root checkout fptools/libraries/X11 -(cd fptools; autoconf) -cp fptools/libraries/X11/INSTALL . -cp fptools/libraries/X11/LICENSE . -cp fptools/libraries/X11/README . -cd .. +cvs -d:ext:reid@cvs.haskell.org:/home/cvs/root checkout HSX11 +(cd HSX11/fptools; autoconf) +mv HSX11 HSX11-1.00 hunk ./mk/boilerplate.mk 9 -TOP:=$(TOP)/../.. +TOP:=$(TOP)/fptools hunk ./mk/target.mk 1 -TOP:=$(TOP)/../.. +TOP:=$(TOP)/fptools addfile ./Graphics/X11/Types.hsc addfile ./Graphics/X11/Xlib.hs addfile ./Graphics/X11/Xlib/Atom.hsc addfile ./Graphics/X11/Xlib/Color.hs addfile ./Graphics/X11/Xlib/Context.hs addfile ./Graphics/X11/Xlib/Display.hs addfile ./Graphics/X11/Xlib/Event.hsc addfile ./Graphics/X11/Xlib/Font.hsc addfile ./Graphics/X11/Xlib/Misc.hsc addfile ./Graphics/X11/Xlib/Region.hs addfile ./Graphics/X11/Xlib/Screen.hs addfile ./Graphics/X11/Xlib/Types.hsc addfile ./Graphics/X11/Xlib/Window.hs addfile ./cbits/fdset.c hunk ./Graphics/X11/Types.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Types --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of type declarations for interfacing with X11. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Types - ( - - XID, - Mask, - Atom, - VisualID, - Time, - Window, - Drawable, - Font, - Pixmap, - Cursor, - Colormap, - GContext, - KeySym, - - KeyCode, - xK_VoidSymbol, - xK_BackSpace, - xK_Tab, - xK_Linefeed, - xK_Clear, - xK_Return, - xK_Pause, - xK_Scroll_Lock, - xK_Sys_Req, - xK_Escape, - xK_Delete, - xK_Multi_key, - xK_Home, - xK_Left, - xK_Up, - xK_Right, - xK_Down, - xK_Prior, - xK_Page_Up, - xK_Next, - xK_Page_Down, - xK_End, - xK_Begin, - xK_Select, - xK_Print, - xK_Execute, - xK_Insert, - xK_Undo, - xK_Redo, - xK_Menu, - xK_Find, - xK_Cancel, - xK_Help, - xK_Break, - xK_Mode_switch, - xK_script_switch, - xK_Num_Lock, - xK_KP_Space, - xK_KP_Tab, - xK_KP_Enter, - xK_KP_F1, - xK_KP_F2, - xK_KP_F3, - xK_KP_F4, - xK_KP_Home, - xK_KP_Left, - xK_KP_Up, - xK_KP_Right, - xK_KP_Down, - xK_KP_Prior, - xK_KP_Page_Up, - xK_KP_Next, - xK_KP_Page_Down, - xK_KP_End, - xK_KP_Begin, - xK_KP_Insert, - xK_KP_Delete, - xK_KP_Equal, - xK_KP_Multiply, - xK_KP_Add, - xK_KP_Separator, - xK_KP_Subtract, - xK_KP_Decimal, - xK_KP_Divide, - xK_KP_0, - xK_KP_1, - xK_KP_2, - xK_KP_3, - xK_KP_4, - xK_KP_5, - xK_KP_6, - xK_KP_7, - xK_KP_8, - xK_KP_9, - xK_F1, - xK_F2, - xK_F3, - xK_F4, - xK_F5, - xK_F6, - xK_F7, - xK_F8, - xK_F9, - xK_F10, - xK_F11, - xK_L1, - xK_F12, - xK_L2, - xK_F13, - xK_L3, - xK_F14, - xK_L4, - xK_F15, - xK_L5, - xK_F16, - xK_L6, - xK_F17, - xK_L7, - xK_F18, - xK_L8, - xK_F19, - xK_L9, - xK_F20, - xK_L10, - xK_F21, - xK_R1, - xK_F22, - xK_R2, - xK_F23, - xK_R3, - xK_F24, - xK_R4, - xK_F25, - xK_R5, - xK_F26, - xK_R6, - xK_F27, - xK_R7, - xK_F28, - xK_R8, - xK_F29, - xK_R9, - xK_F30, - xK_R10, - xK_F31, - xK_R11, - xK_F32, - xK_R12, - xK_F33, - xK_R13, - xK_F34, - xK_R14, - xK_F35, - xK_R15, - xK_Shift_L, - xK_Shift_R, - xK_Control_L, - xK_Control_R, - xK_Caps_Lock, - xK_Shift_Lock, - xK_Meta_L, - xK_Meta_R, - xK_Alt_L, - xK_Alt_R, - xK_Super_L, - xK_Super_R, - xK_Hyper_L, - xK_Hyper_R, - xK_space, - xK_exclam, - xK_quotedbl, - xK_numbersign, - xK_dollar, - xK_percent, - xK_ampersand, - xK_apostrophe, - xK_quoteright, - xK_parenleft, - xK_parenright, - xK_asterisk, - xK_plus, - xK_comma, - xK_minus, - xK_period, - xK_slash, - xK_0, - xK_1, - xK_2, - xK_3, - xK_4, - xK_5, - xK_6, - xK_7, - xK_8, - xK_9, - xK_colon, - xK_semicolon, - xK_less, - xK_equal, - xK_greater, - xK_question, - xK_at, - xK_A, - xK_B, - xK_C, - xK_D, - xK_E, - xK_F, - xK_G, - xK_H, - xK_I, - xK_J, - xK_K, - xK_L, - xK_M, - xK_N, - xK_O, - xK_P, - xK_Q, - xK_R, - xK_S, - xK_T, - xK_U, - xK_V, - xK_W, - xK_X, - xK_Y, - xK_Z, - xK_bracketleft, - xK_backslash, - xK_bracketright, - xK_asciicircum, - xK_underscore, - xK_grave, - xK_quoteleft, - xK_a, - xK_b, - xK_c, - xK_d, - xK_e, - xK_f, - xK_g, - xK_h, - xK_i, - xK_j, - xK_k, - xK_l, - xK_m, - xK_n, - xK_o, - xK_p, - xK_q, - xK_r, - xK_s, - xK_t, - xK_u, - xK_v, - xK_w, - xK_x, - xK_y, - xK_z, - xK_braceleft, - xK_bar, - xK_braceright, - xK_asciitilde, - xK_nobreakspace, - xK_exclamdown, - xK_cent, - xK_sterling, - xK_currency, - xK_yen, - xK_brokenbar, - xK_section, - xK_diaeresis, - xK_copyright, - xK_ordfeminine, - xK_guillemotleft, - xK_notsign, - xK_hyphen, - xK_registered, - xK_macron, - xK_degree, - xK_plusminus, - xK_twosuperior, - xK_threesuperior, - xK_acute, - xK_mu, - xK_paragraph, - xK_periodcentered, - xK_cedilla, - xK_onesuperior, - xK_masculine, - xK_guillemotright, - xK_onequarter, - xK_onehalf, - xK_threequarters, - xK_questiondown, - xK_Agrave, - xK_Aacute, - xK_Acircumflex, - xK_Atilde, - xK_Adiaeresis, - xK_Aring, - xK_AE, - xK_Ccedilla, - xK_Egrave, - xK_Eacute, - xK_Ecircumflex, - xK_Ediaeresis, - xK_Igrave, - xK_Iacute, - xK_Icircumflex, - xK_Idiaeresis, - xK_ETH, - xK_Eth, - xK_Ntilde, - xK_Ograve, - xK_Oacute, - xK_Ocircumflex, - xK_Otilde, - xK_Odiaeresis, - xK_multiply, - xK_Ooblique, - xK_Ugrave, - xK_Uacute, - xK_Ucircumflex, - xK_Udiaeresis, - xK_Yacute, - xK_THORN, - xK_Thorn, - xK_ssharp, - xK_agrave, - xK_aacute, - xK_acircumflex, - xK_atilde, - xK_adiaeresis, - xK_aring, - xK_ae, - xK_ccedilla, - xK_egrave, - xK_eacute, - xK_ecircumflex, - xK_ediaeresis, - xK_igrave, - xK_iacute, - xK_icircumflex, - xK_idiaeresis, - xK_eth, - xK_ntilde, - xK_ograve, - xK_oacute, - xK_ocircumflex, - xK_otilde, - xK_odiaeresis, - xK_division, - xK_oslash, - xK_ugrave, - xK_uacute, - xK_ucircumflex, - xK_udiaeresis, - xK_yacute, - xK_thorn, - xK_ydiaeresis, - - EventMask, - noEventMask, - keyPressMask, - keyReleaseMask, - buttonPressMask, - buttonReleaseMask, - enterWindowMask, - leaveWindowMask, - pointerMotionMask, - pointerMotionHintMask, - button1MotionMask, - button2MotionMask, - button3MotionMask, - button4MotionMask, - button5MotionMask, - buttonMotionMask, - keymapStateMask, - exposureMask, - visibilityChangeMask, - structureNotifyMask, - resizeRedirectMask, - substructureNotifyMask, - substructureRedirectMask, - focusChangeMask, - propertyChangeMask, - colormapChangeMask, - ownerGrabButtonMask, - - EventType, - keyPress, - keyRelease, - buttonPress, - buttonRelease, - motionNotify, - enterNotify, - leaveNotify, - focusIn, - focusOut, - keymapNotify, - expose, - graphicsExpose, - noExpose, - visibilityNotify, - createNotify, - destroyNotify, - unmapNotify, - mapNotify, - mapRequest, - reparentNotify, - configureNotify, - configureRequest, - gravityNotify, - resizeRequest, - circulateNotify, - circulateRequest, - propertyNotify, - selectionClear, - selectionRequest, - selectionNotify, - colormapNotify, - clientMessage, - mappingNotify, - lASTEvent, - - Modifier, - shiftMapIndex, - lockMapIndex, - controlMapIndex, - mod1MapIndex, - mod2MapIndex, - mod3MapIndex, - mod4MapIndex, - mod5MapIndex, - anyModifier, - - KeyMask, - shiftMask, - lockMask, - controlMask, - mod1Mask, - mod2Mask, - mod3Mask, - mod4Mask, - mod5Mask, - - ButtonMask, - button1Mask, - button2Mask, - button3Mask, - button4Mask, - button5Mask, - - Button, - button1, - button2, - button3, - button4, - button5, - - NotifyMode, - notifyNormal, - notifyGrab, - notifyUngrab, - notifyWhileGrabbed, - notifyHint, - - NotifyDetail, - notifyAncestor, - notifyVirtual, - notifyInferior, - notifyNonlinear, - notifyNonlinearVirtual, - notifyPointer, - notifyPointerRoot, - notifyDetailNone, - - Visibility, - visibilityUnobscured, - visibilityPartiallyObscured, - visibilityFullyObscured, - - Place, - placeOnTop, - placeOnBottom, - - Protocol, - familyInternet, - familyDECnet, - familyChaos, - - PropertyNotification, - propertyNewValue, - propertyDelete, - - ColormapNotification, - colormapUninstalled, - colormapInstalled, - - GrabMode, - grabModeSync, - grabModeAsync, - - GrabStatus, - grabSuccess, - alreadyGrabbed, - grabInvalidTime, - grabNotViewable, - grabFrozen, - - AllowEvents, - asyncPointer, - syncPointer, - replayPointer, - asyncKeyboard, - syncKeyboard, - replayKeyboard, - asyncBoth, - syncBoth, - - FocusMode, - revertToNone, - revertToPointerRoot, - revertToParent, - - Status, - success, - badRequest, - badValue, - badWindow, - badPixmap, - badAtom, - badCursor, - badFont, - badMatch, - badDrawable, - badAccess, - badAlloc, - badColor, - badGC, - badIDChoice, - badName, - badLength, - badImplementation, - firstExtensionError, - lastExtensionError, - - WindowClass, - copyFromParent, - inputOutput, - inputOnly, - - AttributeMask, - cWBackPixmap, - cWBackPixel, - cWBorderPixmap, - cWBorderPixel, - cWBitGravity, - cWWinGravity, - cWBackingStore, - cWBackingPlanes, - cWBackingPixel, - cWOverrideRedirect, - cWSaveUnder, - cWEventMask, - cWDontPropagate, - cWColormap, - cWCursor, - - CloseDownMode, - destroyAll, - retainPermanent, - retainTemporary, - - QueryBestSizeClass, - cursorShape, - tileShape, - stippleShape, - - GXFunction, - gXclear, - gXand, - gXandReverse, - gXcopy, - gXandInverted, - gXnoop, - gXxor, - gXor, - gXnor, - gXequiv, - gXinvert, - gXorReverse, - gXcopyInverted, - gXorInverted, - gXnand, - gXset, - - LineStyle, - lineSolid, - lineOnOffDash, - lineDoubleDash, - - CapStyle, - capNotLast, - capButt, - capRound, - capProjecting, - - JoinStyle, - joinMiter, - joinRound, - joinBevel, - - FillStyle, - fillSolid, - fillTiled, - fillStippled, - fillOpaqueStippled, - - FillRule, - evenOddRule, - windingRule, - - SubWindowMode, - clipByChildren, - includeInferiors, - - CoordinateMode, - coordModeOrigin, - coordModePrevious, - - PolygonShape, - complex, - nonconvex, - convex, - - ArcMode, - arcChord, - arcPieSlice, - - GCMask, - gCFunction, - gCPlaneMask, - gCForeground, - gCBackground, - gCLineWidth, - gCLineStyle, - gCCapStyle, - gCJoinStyle, - gCFillStyle, - gCFillRule, - gCTile, - gCStipple, - gCTileStipXOrigin, - gCTileStipYOrigin, - gCFont, - gCSubwindowMode, - gCGraphicsExposures, - gCClipXOrigin, - gCClipYOrigin, - gCClipMask, - gCDashOffset, - gCDashList, - gCArcMode, - gCLastBit, - - CirculationDirection, - raiseLowest, - lowerHighest, - - ByteOrder, - lSBFirst, - mSBFirst, - - ColormapAlloc, - allocNone, - allocAll, - - MappingRequest, - mappingModifier, - mappingKeyboard, - mappingPointer, - - ChangeSaveSetMode, - setModeInsert, - setModeDelete, - - BitGravity, - forgetGravity, - northWestGravity, - northGravity, - northEastGravity, - westGravity, - centerGravity, - eastGravity, - southWestGravity, - southGravity, - southEastGravity, - staticGravity, - - WindowGravity, - unmapGravity, - - BackingStore, - notUseful, - whenMapped, - always, - doRed, - doGreen, - doBlue, - - FontDirection, - fontLeftToRight, - fontRightToLeft, - - ) where - -import Foreign.GreenCard - -%#include "HsXlib.h" - --- ToDo: use newtype -type XID = Word32 -type Mask = Word32 -type Atom = Word32 -type VisualID = Word32 -type Time = Word32 - -%dis xID x = word32 ({XID} x) -%dis mask x = word32 ({unsigned int} x) -%dis atom x = word32 ({Atom} x) -%dis visualID x = word32 ({VisualID} x) -%dis time x = word32 ({Time} x) - --- end platform dependency - -type Window = XID -type Drawable = XID -type Font = XID -type Pixmap = XID -type Cursor = XID -type Colormap = XID -type GContext = XID -type KeySym = XID - -%dis window x = xID x -%dis drawable x = xID x -%dis font x = xID x -%dis pixmap x = xID x -%dis cursor x = xID x -%dis colormap x = xID x -%dis gContext x = xID x -%dis keySym x = xID x - -type KeyCode = Char -%dis keyCode x = char ({KeyCode} x) - -%const KeySym -% [ XK_VoidSymbol -- void symbol -% -% -- TTY Functions, cleverly chosen to map to ascii, for convenience of -% -- programming, but could have been arbitrary (at the cost of lookup -% -- tables in client code. -% -% , XK_BackSpace -- back space, back char -% , XK_Tab -% , XK_Linefeed -- Linefeed, LF -% , XK_Clear -% , XK_Return -- Return, enter -% , XK_Pause -- Pause, hold -% , XK_Scroll_Lock -% , XK_Sys_Req -% , XK_Escape -% , XK_Delete -- Delete, rubout -% -% -- International & multi-key character composition -% , XK_Multi_key -- Multi-key character compose -% -- , XK_Codeinput -- Not defined for SunOS. -% -- , XK_SingleCandidate -- Not defined for SunOS. -% -- , XK_MultipleCandidate -- Not defined for SunOS. -% -- , XK_PreviousCandidate -- Not defined for SunOS. -% ] - --- Cursor control & motion -%const KeySym -% [ XK_Home -% , XK_Left -- Move left, left arrow -% , XK_Up -- Move up, up arrow -% , XK_Right -- Move right, right arrow -% , XK_Down -- Move down, down arrow -% , XK_Prior -- Prior, previous -% , XK_Page_Up -% , XK_Next -- Next -% , XK_Page_Down -% , XK_End -- EOL -% , XK_Begin -- BOL -% -% , XK_Select -- Select, mark -% , XK_Print -% , XK_Execute -- Execute, run, do -% , XK_Insert -- Insert, insert here -% , XK_Undo -- Undo, oops -% , XK_Redo -- redo, again -% , XK_Menu -% , XK_Find -- Find, search -% , XK_Cancel -- Cancel, stop, abort, exit -% , XK_Help -- Help -% , XK_Break -% , XK_Mode_switch -- Character set switch -% , XK_script_switch -- Alias for mode_switch -% , XK_Num_Lock -% ] - --- Keypad Functions, keypad numbers cleverly chosen to map to ascii -%const KeySym -% [ XK_KP_Space -- space -% , XK_KP_Tab -% , XK_KP_Enter -- enter -% , XK_KP_F1 -- PF1, KP_A, ... -% , XK_KP_F2 -% , XK_KP_F3 -% , XK_KP_F4 -% , XK_KP_Home -% , XK_KP_Left -% , XK_KP_Up -% , XK_KP_Right -% , XK_KP_Down -% , XK_KP_Prior -% , XK_KP_Page_Up -% , XK_KP_Next -% , XK_KP_Page_Down -% , XK_KP_End -% , XK_KP_Begin -% , XK_KP_Insert -% , XK_KP_Delete -% , XK_KP_Equal -- equals -% , XK_KP_Multiply -% , XK_KP_Add -% , XK_KP_Separator -- separator, often comma -% , XK_KP_Subtract -% , XK_KP_Decimal -% , XK_KP_Divide -% -% , XK_KP_0 -% , XK_KP_1 -% , XK_KP_2 -% , XK_KP_3 -% , XK_KP_4 -% , XK_KP_5 -% , XK_KP_6 -% , XK_KP_7 -% , XK_KP_8 -% , XK_KP_9 -% -% , XK_F1 -% , XK_F2 -% , XK_F3 -% , XK_F4 -% , XK_F5 -% , XK_F6 -% , XK_F7 -% , XK_F8 -% , XK_F9 -% , XK_F10 -% , XK_F11 -% , XK_L1 -% , XK_F12 -% , XK_L2 -% , XK_F13 -% , XK_L3 -% , XK_F14 -% , XK_L4 -% , XK_F15 -% , XK_L5 -% , XK_F16 -% , XK_L6 -% , XK_F17 -% , XK_L7 -% , XK_F18 -% , XK_L8 -% , XK_F19 -% , XK_L9 -% , XK_F20 -% , XK_L10 -% , XK_F21 -% , XK_R1 -% , XK_F22 -% , XK_R2 -% , XK_F23 -% , XK_R3 -% , XK_F24 -% , XK_R4 -% , XK_F25 -% , XK_R5 -% , XK_F26 -% , XK_R6 -% , XK_F27 -% , XK_R7 -% , XK_F28 -% , XK_R8 -% , XK_F29 -% , XK_R9 -% , XK_F30 -% , XK_R10 -% , XK_F31 -% , XK_R11 -% , XK_F32 -% , XK_R12 -% , XK_F33 -% , XK_R13 -% , XK_F34 -% , XK_R14 -% , XK_F35 -% , XK_R15 -% ] - -%const KeySym -% [ XK_Shift_L -- Left shift -% , XK_Shift_R -- Right shift -% , XK_Control_L -- Left control -% , XK_Control_R -- Right control -% , XK_Caps_Lock -- Caps lock -% , XK_Shift_Lock -- Shift lock -% -% , XK_Meta_L -- Left meta -% , XK_Meta_R -- Right meta -% , XK_Alt_L -- Left alt -% , XK_Alt_R -- Right alt -% , XK_Super_L -- Left super -% , XK_Super_R -- Right super -% , XK_Hyper_L -- Left hyper -% , XK_Hyper_R -- Right hyper -% ] - -%const KeySym -% [ XK_space -% , XK_exclam -% , XK_quotedbl -% , XK_numbersign -% , XK_dollar -% , XK_percent -% , XK_ampersand -% , XK_apostrophe -% , XK_quoteright -- deprecated -% , XK_parenleft -% , XK_parenright -% , XK_asterisk -% , XK_plus -% , XK_comma -% , XK_minus -% , XK_period -% , XK_slash -% , XK_0 -% , XK_1 -% , XK_2 -% , XK_3 -% , XK_4 -% , XK_5 -% , XK_6 -% , XK_7 -% , XK_8 -% , XK_9 -% , XK_colon -% , XK_semicolon -% , XK_less -% , XK_equal -% , XK_greater -% , XK_question -% , XK_at -% , XK_A -% , XK_B -% , XK_C -% , XK_D -% , XK_E -% , XK_F -% , XK_G -% , XK_H -% , XK_I -% , XK_J -% , XK_K -% , XK_L -% , XK_M -% , XK_N -% , XK_O -% , XK_P -% , XK_Q -% , XK_R -% , XK_S -% , XK_T -% , XK_U -% , XK_V -% , XK_W -% , XK_X -% , XK_Y -% , XK_Z -% , XK_bracketleft -% , XK_backslash -% , XK_bracketright -% , XK_asciicircum -% , XK_underscore -% , XK_grave -% , XK_quoteleft -- deprecated -% , XK_a -% , XK_b -% , XK_c -% , XK_d -% , XK_e -% , XK_f -% , XK_g -% , XK_h -% , XK_i -% , XK_j -% , XK_k -% , XK_l -% , XK_m -% , XK_n -% , XK_o -% , XK_p -% , XK_q -% , XK_r -% , XK_s -% , XK_t -% , XK_u -% , XK_v -% , XK_w -% , XK_x -% , XK_y -% , XK_z -% , XK_braceleft -% , XK_bar -% , XK_braceright -% , XK_asciitilde -% -% , XK_nobreakspace -% , XK_exclamdown -% , XK_cent -% , XK_sterling -% , XK_currency -% , XK_yen -% , XK_brokenbar -% , XK_section -% , XK_diaeresis -% , XK_copyright -% , XK_ordfeminine -% , XK_guillemotleft -- left angle quotation mark -% , XK_notsign -% , XK_hyphen -% , XK_registered -% , XK_macron -% , XK_degree -% , XK_plusminus -% , XK_twosuperior -% , XK_threesuperior -% , XK_acute -% , XK_mu -% , XK_paragraph -% , XK_periodcentered -% , XK_cedilla -% , XK_onesuperior -% , XK_masculine -% , XK_guillemotright -- right angle quotation mark -% , XK_onequarter -% , XK_onehalf -% , XK_threequarters -% , XK_questiondown -% , XK_Agrave -% , XK_Aacute -% , XK_Acircumflex -% , XK_Atilde -% , XK_Adiaeresis -% , XK_Aring -% , XK_AE -% , XK_Ccedilla -% , XK_Egrave -% , XK_Eacute -% , XK_Ecircumflex -% , XK_Ediaeresis -% , XK_Igrave -% , XK_Iacute -% , XK_Icircumflex -% , XK_Idiaeresis -% , XK_ETH -% , XK_Eth -- deprecated -% , XK_Ntilde -% , XK_Ograve -% , XK_Oacute -% , XK_Ocircumflex -% , XK_Otilde -% , XK_Odiaeresis -% , XK_multiply -% , XK_Ooblique -% , XK_Ugrave -% , XK_Uacute -% , XK_Ucircumflex -% , XK_Udiaeresis -% , XK_Yacute -% , XK_THORN -% , XK_Thorn -- deprecated -% , XK_ssharp -% , XK_agrave -% , XK_aacute -% , XK_acircumflex -% , XK_atilde -% , XK_adiaeresis -% , XK_aring -% , XK_ae -% , XK_ccedilla -% , XK_egrave -% , XK_eacute -% , XK_ecircumflex -% , XK_ediaeresis -% , XK_igrave -% , XK_iacute -% , XK_icircumflex -% , XK_idiaeresis -% , XK_eth -% , XK_ntilde -% , XK_ograve -% , XK_oacute -% , XK_ocircumflex -% , XK_otilde -% , XK_odiaeresis -% , XK_division -% , XK_oslash -% , XK_ugrave -% , XK_uacute -% , XK_ucircumflex -% , XK_udiaeresis -% , XK_yacute -% , XK_thorn -% , XK_ydiaeresis -% ] - -type EventMask = Mask -%dis eventMask x = mask x - -%const EventMask -% [ NoEventMask -% , KeyPressMask -% , KeyReleaseMask -% , ButtonPressMask -% , ButtonReleaseMask -% , EnterWindowMask -% , LeaveWindowMask -% , PointerMotionMask -% , PointerMotionHintMask -% , Button1MotionMask -% , Button2MotionMask -% , Button3MotionMask -% , Button4MotionMask -% , Button5MotionMask -% , ButtonMotionMask -% , KeymapStateMask -% , ExposureMask -% , VisibilityChangeMask -% , StructureNotifyMask -% , ResizeRedirectMask -% , SubstructureNotifyMask -% , SubstructureRedirectMask -% , FocusChangeMask -% , PropertyChangeMask -% , ColormapChangeMask -% , OwnerGrabButtonMask -% ] - -type EventType = Word32 -%dis eventType x = word32 x - -%const EventType -% [ KeyPress -% , KeyRelease -% , ButtonPress -% , ButtonRelease -% , MotionNotify -% , EnterNotify -% , LeaveNotify -% , FocusIn -% , FocusOut -% , KeymapNotify -% , Expose -% , GraphicsExpose -% , NoExpose -% , VisibilityNotify -% , CreateNotify -% , DestroyNotify -% , UnmapNotify -% , MapNotify -% , MapRequest -% , ReparentNotify -% , ConfigureNotify -% , ConfigureRequest -% , GravityNotify -% , ResizeRequest -% , CirculateNotify -% , CirculateRequest -% , PropertyNotify -% , SelectionClear -% , SelectionRequest -% , SelectionNotify -% , ColormapNotify -% , ClientMessage -% , MappingNotify -% , LASTEvent -% ] - -type Modifier = Mask -%dis modifier x = mask x - -%const Modifier -% [ ShiftMapIndex -% , LockMapIndex -% , ControlMapIndex -% , Mod1MapIndex -% , Mod2MapIndex -% , Mod3MapIndex -% , Mod4MapIndex -% , Mod5MapIndex -% , AnyModifier -% ] - -type KeyMask = Modifier -%dis keyMask x = modifier x - -%const KeyMask -% [ ShiftMask -% , LockMask -% , ControlMask -% , Mod1Mask -% , Mod2Mask -% , Mod3Mask -% , Mod4Mask -% , Mod5Mask -% ] - -type ButtonMask = Modifier -%dis buttonMask x = modifier x - -%const ButtonMask -% [ Button1Mask -% , Button2Mask -% , Button3Mask -% , Button4Mask -% , Button5Mask -% ] - -type Button = Word32 -%dis button x = word32 x - -%const Button -% [ Button1 -% , Button2 -% , Button3 -% , Button4 -% , Button5 -% ] - -type NotifyMode = Int -%dis notifyMode x = int x - --- NotifyNormal and NotifyHint are used as detail in XMotionEvents -%const NotifyMode -% [ NotifyNormal -% , NotifyGrab -% , NotifyUngrab -% , NotifyWhileGrabbed -% , NotifyHint -% ] - -type NotifyDetail = Int -%dis notifyDetail x = int x - -%const NotifyDetail -% [ NotifyAncestor -% , NotifyVirtual -% , NotifyInferior -% , NotifyNonlinear -% , NotifyNonlinearVirtual -% , NotifyPointer -% , NotifyPointerRoot -% , NotifyDetailNone -% ] - -type Visibility = Int -%dis visibility x = int x -%const Visibility -% [ VisibilityUnobscured -% , VisibilityPartiallyObscured -% , VisibilityFullyObscured -% ] - --- Window's place relative to siblings (used in Circulation requests/events) -type Place = Int -%dis place x = int x -%const Place [ PlaceOnTop, PlaceOnBottom ] - -type Protocol = Int -%dis protocol x = int x -%const Protocol [ FamilyInternet, FamilyDECnet, FamilyChaos ] - -type PropertyNotification = Int -%dis propertyNotification x = int x -%const PropertyNotification [ PropertyNewValue, PropertyDelete ] - -type ColormapNotification = Int -%dis colormapNotification x = int x -%const ColormapNotification [ ColormapUninstalled, ColormapInstalled ] - - --- Grab{Pointer,Button,Keyboard,Key} Modes -type GrabMode = Int -%dis grabMode x = int x -%const GrabMode [ GrabModeSync, GrabModeAsync ] - --- Grab{Pointer,Keyboard} reply status - -type GrabStatus = Int -%dis grabStatus x = int x -%const GrabStatus -% [ GrabSuccess, AlreadyGrabbed, GrabInvalidTime, GrabNotViewable, GrabFrozen ] - --- AllowEvents modes -type AllowEvents = Int -%dis allowEvents x = int x -%const AllowEvents -% [ AsyncPointer -% , SyncPointer -% , ReplayPointer -% , AsyncKeyboard -% , SyncKeyboard -% , ReplayKeyboard -% , AsyncBoth -% , SyncBoth -% ] - - --- {Set,Get}InputFocus Modes -type FocusMode = Int -%dis focusMode x = int x -%const FocusMode [ RevertToNone, RevertToPointerRoot, RevertToParent ] - --- Error codes -type Status = Int -%dis status x = int x -%const Status -% [ Success -% , BadRequest -% , BadValue -% , BadWindow -% , BadPixmap -% , BadAtom -% , BadCursor -% , BadFont -% , BadMatch -% , BadDrawable -% , BadAccess -% , BadAlloc -% , BadColor -% , BadGC -% , BadIDChoice -% , BadName -% , BadLength -% , BadImplementation -% , FirstExtensionError -% , LastExtensionError -% ] - -type WindowClass = Int -%dis windowClass x = int x -%const WindowClass [ CopyFromParent, InputOutput, InputOnly ] - --- Window attributes mask -type AttributeMask = Mask -%dis attributeMask x = mask x - -%const AttributeMask -% [ CWBackPixmap -% , CWBackPixel -% , CWBorderPixmap -% , CWBorderPixel -% , CWBitGravity -% , CWWinGravity -% , CWBackingStore -% , CWBackingPlanes -% , CWBackingPixel -% , CWOverrideRedirect -% , CWSaveUnder -% , CWEventMask -% , CWDontPropagate -% , CWColormap -% , CWCursor -% ] - --- Used in ChangeCloseDownMode -type CloseDownMode = Int -%dis closeDownMode x = int x - -%const CloseDownMode -% [ DestroyAll -% , RetainPermanent -% , RetainTemporary -% ] - - ----------------------------------------------------------------- --- CURSOR STUFF ----------------------------------------------------------------- - -type QueryBestSizeClass = Int -%dis queryBestSizeClass x = int x -%const QueryBestSizeClass -% [ CursorShape -- largest size that can be displayed -% , TileShape -- size tiled fastest -% , StippleShape -- size stippled fastest -% ] - ----------------------------------------------------------------- --- GRAPHICS DEFINITIONS ----------------------------------------------------------------- - --- graphics functions, as in GC.alu - -type GXFunction = Int -%dis gXFunction x = int x -%const GXFunction -% [ GXclear -- 0 -% , GXand -- src AND dst -% , GXandReverse -- src AND NOT dst -% , GXcopy -- src -% , GXandInverted -- NOT src AND dst -% , GXnoop -- dst -% , GXxor -- src XOR dst -% , GXor -- src OR dst -% , GXnor -- NOT src AND NOT dst -% , GXequiv -- NOT src XOR dst -% , GXinvert -- NOT dst -% , GXorReverse -- src OR NOT dst -% , GXcopyInverted -- NOT src -% , GXorInverted -- NOT src OR dst -% , GXnand -- NOT src OR NOT dst -% , GXset -- 1 -% ] - -type LineStyle = Int -%dis lineStyle x = int x -%const LineStyle -% [ LineSolid -% , LineOnOffDash -% , LineDoubleDash -% ] - -type CapStyle = Int -%dis capStyle x = int x -%const CapStyle -% [ CapNotLast -% , CapButt -% , CapRound -% , CapProjecting -% ] - -type JoinStyle = Int -%dis joinStyle x = int x -%const JoinStyle -% [ JoinMiter -% , JoinRound -% , JoinBevel -% ] - -type FillStyle = Int -%dis fillStyle x = int x -%const FillStyle -% [ FillSolid -% , FillTiled -% , FillStippled -% , FillOpaqueStippled -% ] - -type FillRule = Int -%dis fillRule x = int x -%const FillRule -% [ EvenOddRule -% , WindingRule -% ] - -type SubWindowMode = Int -%dis subWindowMode x = int x -%const SubWindowMode -% [ ClipByChildren -% , IncludeInferiors -% ] - --- -- SetClipRectangles ordering --- type Ordering = Int --- %dis ordering x = int x --- %const Ordering --- % [ Unsorted --- % , YSorted --- % , YXSorted --- % , YXBanded --- % ] - --- CoordinateMode for drawing routines -type CoordinateMode = Int -%dis coordinateMode x = int x -%const CoordinateMode -% [ CoordModeOrigin -- relative to the origin -% , CoordModePrevious -- relative to previous point -% ] - -type PolygonShape = Int -%dis polygonShape x = int x -%const PolygonShape -% [ Complex -- paths may intersect -% , Nonconvex -- no paths intersect, but not convex -% , Convex -- wholly convex -% ] - --- Arc modes for PolyFillArc -type ArcMode = Int -%dis arcMode x = int x -%const ArcMode -% [ ArcChord -- join endpoints of arc -% , ArcPieSlice -- join endpoints to center of arc -% ] - --- GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into --- GC.stateChanges - -type GCMask = Int -%dis gCMask x = int x -%const GCMask -% [ GCFunction -% , GCPlaneMask -% , GCForeground -% , GCBackground -% , GCLineWidth -% , GCLineStyle -% , GCCapStyle -% , GCJoinStyle -% , GCFillStyle -% , GCFillRule -% , GCTile -% , GCStipple -% , GCTileStipXOrigin -% , GCTileStipYOrigin -% , GCFont -% , GCSubwindowMode -% , GCGraphicsExposures -% , GCClipXOrigin -% , GCClipYOrigin -% , GCClipMask -% , GCDashOffset -% , GCDashList -% , GCArcMode -% , GCLastBit -% ] - -type CirculationDirection = Int -%dis circulationDirection x = int x -%const CirculationDirection -% [ RaiseLowest -% , LowerHighest -% ] - --- used in imageByteOrder and bitmapBitOrder -type ByteOrder = Int -%dis byteOrder x = int x -%const ByteOrder -% [ LSBFirst -% , MSBFirst -% ] - -type ColormapAlloc = Int -%dis colormapAlloc x = int x -%const ColormapAlloc -% [ AllocNone -- create map with no entries -% , AllocAll -- allocate entire map writeable -% ] - -type MappingRequest = Int -%dis mappingRequest x = int x -%const MappingRequest -% [ MappingModifier -% , MappingKeyboard -% , MappingPointer -% ] - - -type ChangeSaveSetMode = Int -%dis changeSaveSetMode x = int x -%const ChangeSaveSetMode -% [ SetModeInsert -% , SetModeDelete -% ] - -type BitGravity = Int -%dis bitGravity x = int x -%const BitGravity -% [ ForgetGravity -% , NorthWestGravity -% , NorthGravity -% , NorthEastGravity -% , WestGravity -% , CenterGravity -% , EastGravity -% , SouthWestGravity -% , SouthGravity -% , SouthEastGravity -% , StaticGravity -% ] - --- All the BitGravity's plus ... -type WindowGravity = Int -%dis windowGravity x = int x -%const WindowGravity -% [ UnmapGravity -% ] - --- Used in CreateWindow for backing-store hint -type BackingStore = Int -%dis backingStore x = int x -%const BackingStore -% [ NotUseful -% , WhenMapped -% , Always -% ] - -%const Word8 -% [ DoRed -% , DoGreen -% , DoBlue -% ] - -type FontDirection = Int -%dis fontDirection x = int x -%const FontDirection -% [ FontLeftToRight -% , FontRightToLeft -% ] rmfile ./Graphics/X11/Types.gc hunk ./Graphics/X11/Types.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Types +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of type declarations for interfacing with X11. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Types + ( + + XID, + Mask, + Atom, + VisualID, + Time, + Window, + Drawable, + Font, + Pixmap, + Cursor, + Colormap, + GContext, + KeySym, + + KeyCode, + xK_VoidSymbol, + xK_BackSpace, + xK_Tab, + xK_Linefeed, + xK_Clear, + xK_Return, + xK_Pause, + xK_Scroll_Lock, + xK_Sys_Req, + xK_Escape, + xK_Delete, + xK_Multi_key, + xK_Home, + xK_Left, + xK_Up, + xK_Right, + xK_Down, + xK_Prior, + xK_Page_Up, + xK_Next, + xK_Page_Down, + xK_End, + xK_Begin, + xK_Select, + xK_Print, + xK_Execute, + xK_Insert, + xK_Undo, + xK_Redo, + xK_Menu, + xK_Find, + xK_Cancel, + xK_Help, + xK_Break, + xK_Mode_switch, + xK_script_switch, + xK_Num_Lock, + xK_KP_Space, + xK_KP_Tab, + xK_KP_Enter, + xK_KP_F1, + xK_KP_F2, + xK_KP_F3, + xK_KP_F4, + xK_KP_Home, + xK_KP_Left, + xK_KP_Up, + xK_KP_Right, + xK_KP_Down, + xK_KP_Prior, + xK_KP_Page_Up, + xK_KP_Next, + xK_KP_Page_Down, + xK_KP_End, + xK_KP_Begin, + xK_KP_Insert, + xK_KP_Delete, + xK_KP_Equal, + xK_KP_Multiply, + xK_KP_Add, + xK_KP_Separator, + xK_KP_Subtract, + xK_KP_Decimal, + xK_KP_Divide, + xK_KP_0, + xK_KP_1, + xK_KP_2, + xK_KP_3, + xK_KP_4, + xK_KP_5, + xK_KP_6, + xK_KP_7, + xK_KP_8, + xK_KP_9, + xK_F1, + xK_F2, + xK_F3, + xK_F4, + xK_F5, + xK_F6, + xK_F7, + xK_F8, + xK_F9, + xK_F10, + xK_F11, + xK_L1, + xK_F12, + xK_L2, + xK_F13, + xK_L3, + xK_F14, + xK_L4, + xK_F15, + xK_L5, + xK_F16, + xK_L6, + xK_F17, + xK_L7, + xK_F18, + xK_L8, + xK_F19, + xK_L9, + xK_F20, + xK_L10, + xK_F21, + xK_R1, + xK_F22, + xK_R2, + xK_F23, + xK_R3, + xK_F24, + xK_R4, + xK_F25, + xK_R5, + xK_F26, + xK_R6, + xK_F27, + xK_R7, + xK_F28, + xK_R8, + xK_F29, + xK_R9, + xK_F30, + xK_R10, + xK_F31, + xK_R11, + xK_F32, + xK_R12, + xK_F33, + xK_R13, + xK_F34, + xK_R14, + xK_F35, + xK_R15, + xK_Shift_L, + xK_Shift_R, + xK_Control_L, + xK_Control_R, + xK_Caps_Lock, + xK_Shift_Lock, + xK_Meta_L, + xK_Meta_R, + xK_Alt_L, + xK_Alt_R, + xK_Super_L, + xK_Super_R, + xK_Hyper_L, + xK_Hyper_R, + xK_space, + xK_exclam, + xK_quotedbl, + xK_numbersign, + xK_dollar, + xK_percent, + xK_ampersand, + xK_apostrophe, + xK_quoteright, + xK_parenleft, + xK_parenright, + xK_asterisk, + xK_plus, + xK_comma, + xK_minus, + xK_period, + xK_slash, + xK_0, + xK_1, + xK_2, + xK_3, + xK_4, + xK_5, + xK_6, + xK_7, + xK_8, + xK_9, + xK_colon, + xK_semicolon, + xK_less, + xK_equal, + xK_greater, + xK_question, + xK_at, + xK_A, + xK_B, + xK_C, + xK_D, + xK_E, + xK_F, + xK_G, + xK_H, + xK_I, + xK_J, + xK_K, + xK_L, + xK_M, + xK_N, + xK_O, + xK_P, + xK_Q, + xK_R, + xK_S, + xK_T, + xK_U, + xK_V, + xK_W, + xK_X, + xK_Y, + xK_Z, + xK_bracketleft, + xK_backslash, + xK_bracketright, + xK_asciicircum, + xK_underscore, + xK_grave, + xK_quoteleft, + xK_a, + xK_b, + xK_c, + xK_d, + xK_e, + xK_f, + xK_g, + xK_h, + xK_i, + xK_j, + xK_k, + xK_l, + xK_m, + xK_n, + xK_o, + xK_p, + xK_q, + xK_r, + xK_s, + xK_t, + xK_u, + xK_v, + xK_w, + xK_x, + xK_y, + xK_z, + xK_braceleft, + xK_bar, + xK_braceright, + xK_asciitilde, + xK_nobreakspace, + xK_exclamdown, + xK_cent, + xK_sterling, + xK_currency, + xK_yen, + xK_brokenbar, + xK_section, + xK_diaeresis, + xK_copyright, + xK_ordfeminine, + xK_guillemotleft, + xK_notsign, + xK_hyphen, + xK_registered, + xK_macron, + xK_degree, + xK_plusminus, + xK_twosuperior, + xK_threesuperior, + xK_acute, + xK_mu, + xK_paragraph, + xK_periodcentered, + xK_cedilla, + xK_onesuperior, + xK_masculine, + xK_guillemotright, + xK_onequarter, + xK_onehalf, + xK_threequarters, + xK_questiondown, + xK_Agrave, + xK_Aacute, + xK_Acircumflex, + xK_Atilde, + xK_Adiaeresis, + xK_Aring, + xK_AE, + xK_Ccedilla, + xK_Egrave, + xK_Eacute, + xK_Ecircumflex, + xK_Ediaeresis, + xK_Igrave, + xK_Iacute, + xK_Icircumflex, + xK_Idiaeresis, + xK_ETH, + xK_Eth, + xK_Ntilde, + xK_Ograve, + xK_Oacute, + xK_Ocircumflex, + xK_Otilde, + xK_Odiaeresis, + xK_multiply, + xK_Ooblique, + xK_Ugrave, + xK_Uacute, + xK_Ucircumflex, + xK_Udiaeresis, + xK_Yacute, + xK_THORN, + xK_Thorn, + xK_ssharp, + xK_agrave, + xK_aacute, + xK_acircumflex, + xK_atilde, + xK_adiaeresis, + xK_aring, + xK_ae, + xK_ccedilla, + xK_egrave, + xK_eacute, + xK_ecircumflex, + xK_ediaeresis, + xK_igrave, + xK_iacute, + xK_icircumflex, + xK_idiaeresis, + xK_eth, + xK_ntilde, + xK_ograve, + xK_oacute, + xK_ocircumflex, + xK_otilde, + xK_odiaeresis, + xK_division, + xK_oslash, + xK_ugrave, + xK_uacute, + xK_ucircumflex, + xK_udiaeresis, + xK_yacute, + xK_thorn, + xK_ydiaeresis, + + EventMask, + noEventMask, + keyPressMask, + keyReleaseMask, + buttonPressMask, + buttonReleaseMask, + enterWindowMask, + leaveWindowMask, + pointerMotionMask, + pointerMotionHintMask, + button1MotionMask, + button2MotionMask, + button3MotionMask, + button4MotionMask, + button5MotionMask, + buttonMotionMask, + keymapStateMask, + exposureMask, + visibilityChangeMask, + structureNotifyMask, + resizeRedirectMask, + substructureNotifyMask, + substructureRedirectMask, + focusChangeMask, + propertyChangeMask, + colormapChangeMask, + ownerGrabButtonMask, + + EventType, + keyPress, + keyRelease, + buttonPress, + buttonRelease, + motionNotify, + enterNotify, + leaveNotify, + focusIn, + focusOut, + keymapNotify, + expose, + graphicsExpose, + noExpose, + visibilityNotify, + createNotify, + destroyNotify, + unmapNotify, + mapNotify, + mapRequest, + reparentNotify, + configureNotify, + configureRequest, + gravityNotify, + resizeRequest, + circulateNotify, + circulateRequest, + propertyNotify, + selectionClear, + selectionRequest, + selectionNotify, + colormapNotify, + clientMessage, + mappingNotify, + lASTEvent, + + Modifier, + shiftMapIndex, + lockMapIndex, + controlMapIndex, + mod1MapIndex, + mod2MapIndex, + mod3MapIndex, + mod4MapIndex, + mod5MapIndex, + anyModifier, + + KeyMask, + shiftMask, + lockMask, + controlMask, + mod1Mask, + mod2Mask, + mod3Mask, + mod4Mask, + mod5Mask, + + ButtonMask, + button1Mask, + button2Mask, + button3Mask, + button4Mask, + button5Mask, + + Button, + button1, + button2, + button3, + button4, + button5, + + NotifyMode, + notifyNormal, + notifyGrab, + notifyUngrab, + notifyWhileGrabbed, + notifyHint, + + NotifyDetail, + notifyAncestor, + notifyVirtual, + notifyInferior, + notifyNonlinear, + notifyNonlinearVirtual, + notifyPointer, + notifyPointerRoot, + notifyDetailNone, + + Visibility, + visibilityUnobscured, + visibilityPartiallyObscured, + visibilityFullyObscured, + + Place, + placeOnTop, + placeOnBottom, + + Protocol, + familyInternet, + familyDECnet, + familyChaos, + + PropertyNotification, + propertyNewValue, + propertyDelete, + + ColormapNotification, + colormapUninstalled, + colormapInstalled, + + GrabMode, + grabModeSync, + grabModeAsync, + + GrabStatus, + grabSuccess, + alreadyGrabbed, + grabInvalidTime, + grabNotViewable, + grabFrozen, + + AllowEvents, + asyncPointer, + syncPointer, + replayPointer, + asyncKeyboard, + syncKeyboard, + replayKeyboard, + asyncBoth, + syncBoth, + + FocusMode, + revertToNone, + revertToPointerRoot, + revertToParent, + + Status, + success, + badRequest, + badValue, + badWindow, + badPixmap, + badAtom, + badCursor, + badFont, + badMatch, + badDrawable, + badAccess, + badAlloc, + badColor, + badGC, + badIDChoice, + badName, + badLength, + badImplementation, + firstExtensionError, + lastExtensionError, + + throwUnlessSuccess, + throwIfZero, + + WindowClass, + copyFromParent, + inputOutput, + inputOnly, + + AttributeMask, + cWBackPixmap, + cWBackPixel, + cWBorderPixmap, + cWBorderPixel, + cWBitGravity, + cWWinGravity, + cWBackingStore, + cWBackingPlanes, + cWBackingPixel, + cWOverrideRedirect, + cWSaveUnder, + cWEventMask, + cWDontPropagate, + cWColormap, + cWCursor, + + CloseDownMode, + destroyAll, + retainPermanent, + retainTemporary, + + QueryBestSizeClass, + cursorShape, + tileShape, + stippleShape, + + GXFunction, + gXclear, + gXand, + gXandReverse, + gXcopy, + gXandInverted, + gXnoop, + gXxor, + gXor, + gXnor, + gXequiv, + gXinvert, + gXorReverse, + gXcopyInverted, + gXorInverted, + gXnand, + gXset, + + LineStyle, + lineSolid, + lineOnOffDash, + lineDoubleDash, + + CapStyle, + capNotLast, + capButt, + capRound, + capProjecting, + + JoinStyle, + joinMiter, + joinRound, + joinBevel, + + FillStyle, + fillSolid, + fillTiled, + fillStippled, + fillOpaqueStippled, + + FillRule, + evenOddRule, + windingRule, + + SubWindowMode, + clipByChildren, + includeInferiors, + + CoordinateMode, + coordModeOrigin, + coordModePrevious, + + PolygonShape, + complex, + nonconvex, + convex, + + ArcMode, + arcChord, + arcPieSlice, + + GCMask, + gCFunction, + gCPlaneMask, + gCForeground, + gCBackground, + gCLineWidth, + gCLineStyle, + gCCapStyle, + gCJoinStyle, + gCFillStyle, + gCFillRule, + gCTile, + gCStipple, + gCTileStipXOrigin, + gCTileStipYOrigin, + gCFont, + gCSubwindowMode, + gCGraphicsExposures, + gCClipXOrigin, + gCClipYOrigin, + gCClipMask, + gCDashOffset, + gCDashList, + gCArcMode, + gCLastBit, + + CirculationDirection, + raiseLowest, + lowerHighest, + + ByteOrder, + lSBFirst, + mSBFirst, + + ColormapAlloc, + allocNone, + allocAll, + + MappingRequest, + mappingModifier, + mappingKeyboard, + mappingPointer, + + ChangeSaveSetMode, + setModeInsert, + setModeDelete, + + BitGravity, + forgetGravity, + northWestGravity, + northGravity, + northEastGravity, + westGravity, + centerGravity, + eastGravity, + southWestGravity, + southGravity, + southEastGravity, + staticGravity, + + WindowGravity, + unmapGravity, + + BackingStore, + notUseful, + whenMapped, + always, + doRed, + doGreen, + doBlue, + + FontDirection, + fontLeftToRight, + fontRightToLeft, + + ) where + +import Data.Int +import Data.Word +import Foreign.Marshal.Error + +#include "HsXlib.h" + +-- ToDo: use newtype +type XID = #{type XID} +type Mask = #{type Mask} +type Atom = #{type Atom} +type VisualID = #{type VisualID} +type Time = #{type Time} + +-- end platform dependency + +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 + +#{enum KeySym, + , xK_VoidSymbol = XK_VoidSymbol + } + +-- TTY Functions, cleverly chosen to map to ascii, for convenience of +-- programming, but could have been arbitrary (at the cost of lookup +-- tables in client code. + +#{enum KeySym, + , xK_BackSpace = XK_BackSpace + , xK_Tab = XK_Tab + , xK_Linefeed = XK_Linefeed + , xK_Clear = XK_Clear + , xK_Return = XK_Return + , xK_Pause = XK_Pause + , xK_Scroll_Lock = XK_Scroll_Lock + , xK_Sys_Req = XK_Sys_Req + , xK_Escape = XK_Escape + , xK_Delete = XK_Delete + } + +-- International & multi-key character composition +#{enum KeySym, + , xK_Multi_key = XK_Multi_key + } +-- xK_Codeinput = XK_Codeinput -- Not defined for SunOS. +-- xK_SingleCandidate = XK_SingleCandidate -- Not defined for SunOS. +-- xK_MultipleCandidate = XK_MultipleCandidate -- Not defined for SunOS. +-- xK_PreviousCandidate = XK_PreviousCandidate -- Not defined for SunOS. + +-- Cursor control & motion +#{enum KeySym, + , xK_Home = XK_Home + , xK_Left = XK_Left + , xK_Up = XK_Up + , xK_Right = XK_Right + , xK_Down = XK_Down + , xK_Prior = XK_Prior + , xK_Page_Up = XK_Page_Up + , xK_Next = XK_Next + , xK_Page_Down = XK_Page_Down + , xK_End = XK_End + , xK_Begin = XK_Begin + + , xK_Select = XK_Select + , xK_Print = XK_Print + , xK_Execute = XK_Execute + , xK_Insert = XK_Insert + , xK_Undo = XK_Undo + , xK_Redo = XK_Redo + , xK_Menu = XK_Menu + , xK_Find = XK_Find + , xK_Cancel = XK_Cancel + , xK_Help = XK_Help + , xK_Break = XK_Break + , xK_Mode_switch = XK_Mode_switch + , xK_script_switch = XK_script_switch + , xK_Num_Lock = XK_Num_Lock + } + +-- Keypad Functions, keypad numbers cleverly chosen to map to ascii +#{enum KeySym, + , xK_KP_Space = XK_KP_Space + , xK_KP_Tab = XK_KP_Tab + , xK_KP_Enter = XK_KP_Enter + , xK_KP_F1 = XK_KP_F1 + , xK_KP_F2 = XK_KP_F2 + , xK_KP_F3 = XK_KP_F3 + , xK_KP_F4 = XK_KP_F4 + , xK_KP_Home = XK_KP_Home + , xK_KP_Left = XK_KP_Left + , xK_KP_Up = XK_KP_Up + , xK_KP_Right = XK_KP_Right + , xK_KP_Down = XK_KP_Down + , xK_KP_Prior = XK_KP_Prior + , xK_KP_Page_Up = XK_KP_Page_Up + , xK_KP_Next = XK_KP_Next + , xK_KP_Page_Down = XK_KP_Page_Down + , xK_KP_End = XK_KP_End + , xK_KP_Begin = XK_KP_Begin + , xK_KP_Insert = XK_KP_Insert + , xK_KP_Delete = XK_KP_Delete + , xK_KP_Equal = XK_KP_Equal + , xK_KP_Multiply = XK_KP_Multiply + , xK_KP_Add = XK_KP_Add + , xK_KP_Separator = XK_KP_Separator + , xK_KP_Subtract = XK_KP_Subtract + , xK_KP_Decimal = XK_KP_Decimal + , xK_KP_Divide = XK_KP_Divide + + , xK_KP_0 = XK_KP_0 + , xK_KP_1 = XK_KP_1 + , xK_KP_2 = XK_KP_2 + , xK_KP_3 = XK_KP_3 + , xK_KP_4 = XK_KP_4 + , xK_KP_5 = XK_KP_5 + , xK_KP_6 = XK_KP_6 + , xK_KP_7 = XK_KP_7 + , xK_KP_8 = XK_KP_8 + , xK_KP_9 = XK_KP_9 + + , xK_F1 = XK_F1 + , xK_F2 = XK_F2 + , xK_F3 = XK_F3 + , xK_F4 = XK_F4 + , xK_F5 = XK_F5 + , xK_F6 = XK_F6 + , xK_F7 = XK_F7 + , xK_F8 = XK_F8 + , xK_F9 = XK_F9 + , xK_F10 = XK_F10 + , xK_F11 = XK_F11 + , xK_L1 = XK_L1 + , xK_F12 = XK_F12 + , xK_L2 = XK_L2 + , xK_F13 = XK_F13 + , xK_L3 = XK_L3 + , xK_F14 = XK_F14 + , xK_L4 = XK_L4 + , xK_F15 = XK_F15 + , xK_L5 = XK_L5 + , xK_F16 = XK_F16 + , xK_L6 = XK_L6 + , xK_F17 = XK_F17 + , xK_L7 = XK_L7 + , xK_F18 = XK_F18 + , xK_L8 = XK_L8 + , xK_F19 = XK_F19 + , xK_L9 = XK_L9 + , xK_F20 = XK_F20 + , xK_L10 = XK_L10 + , xK_F21 = XK_F21 + , xK_R1 = XK_R1 + , xK_F22 = XK_F22 + , xK_R2 = XK_R2 + , xK_F23 = XK_F23 + , xK_R3 = XK_R3 + , xK_F24 = XK_F24 + , xK_R4 = XK_R4 + , xK_F25 = XK_F25 + , xK_R5 = XK_R5 + , xK_F26 = XK_F26 + , xK_R6 = XK_R6 + , xK_F27 = XK_F27 + , xK_R7 = XK_R7 + , xK_F28 = XK_F28 + , xK_R8 = XK_R8 + , xK_F29 = XK_F29 + , xK_R9 = XK_R9 + , xK_F30 = XK_F30 + , xK_R10 = XK_R10 + , xK_F31 = XK_F31 + , xK_R11 = XK_R11 + , xK_F32 = XK_F32 + , xK_R12 = XK_R12 + , xK_F33 = XK_F33 + , xK_R13 = XK_R13 + , xK_F34 = XK_F34 + , xK_R14 = XK_R14 + , xK_F35 = XK_F35 + , xK_R15 = XK_R15 + } + +#{enum KeySym, + , xK_Shift_L = XK_Shift_L + , xK_Shift_R = XK_Shift_R + , xK_Control_L = XK_Control_L + , xK_Control_R = XK_Control_R + , xK_Caps_Lock = XK_Caps_Lock + , xK_Shift_Lock = XK_Shift_Lock + + , xK_Meta_L = XK_Meta_L + , xK_Meta_R = XK_Meta_R + , xK_Alt_L = XK_Alt_L + , xK_Alt_R = XK_Alt_R + , xK_Super_L = XK_Super_L + , xK_Super_R = XK_Super_R + , xK_Hyper_L = XK_Hyper_L + , xK_Hyper_R = XK_Hyper_R + } + +#{enum KeySym, + , xK_space = XK_space + , xK_exclam = XK_exclam + , xK_quotedbl = XK_quotedbl + , xK_numbersign = XK_numbersign + , xK_dollar = XK_dollar + , xK_percent = XK_percent + , xK_ampersand = XK_ampersand + , xK_apostrophe = XK_apostrophe + , xK_quoteright = XK_quoteright + , xK_parenleft = XK_parenleft + , xK_parenright = XK_parenright + , xK_asterisk = XK_asterisk + , xK_plus = XK_plus + , xK_comma = XK_comma + , xK_minus = XK_minus + , xK_period = XK_period + , xK_slash = XK_slash + , xK_0 = XK_0 + , xK_1 = XK_1 + , xK_2 = XK_2 + , xK_3 = XK_3 + , xK_4 = XK_4 + , xK_5 = XK_5 + , xK_6 = XK_6 + , xK_7 = XK_7 + , xK_8 = XK_8 + , xK_9 = XK_9 + , xK_colon = XK_colon + , xK_semicolon = XK_semicolon + , xK_less = XK_less + , xK_equal = XK_equal + , xK_greater = XK_greater + , xK_question = XK_question + , xK_at = XK_at + , xK_A = XK_A + , xK_B = XK_B + , xK_C = XK_C + , xK_D = XK_D + , xK_E = XK_E + , xK_F = XK_F + , xK_G = XK_G + , xK_H = XK_H + , xK_I = XK_I + , xK_J = XK_J + , xK_K = XK_K + , xK_L = XK_L + , xK_M = XK_M + , xK_N = XK_N + , xK_O = XK_O + , xK_P = XK_P + , xK_Q = XK_Q + , xK_R = XK_R + , xK_S = XK_S + , xK_T = XK_T + , xK_U = XK_U + , xK_V = XK_V + , xK_W = XK_W + , xK_X = XK_X + , xK_Y = XK_Y + , xK_Z = XK_Z + , xK_bracketleft = XK_bracketleft + , xK_backslash = XK_backslash + , xK_bracketright = XK_bracketright + , xK_asciicircum = XK_asciicircum + , xK_underscore = XK_underscore + , xK_grave = XK_grave + , xK_quoteleft = XK_quoteleft + , xK_a = XK_a + , xK_b = XK_b + , xK_c = XK_c + , xK_d = XK_d + , xK_e = XK_e + , xK_f = XK_f + , xK_g = XK_g + , xK_h = XK_h + , xK_i = XK_i + , xK_j = XK_j + , xK_k = XK_k + , xK_l = XK_l + , xK_m = XK_m + , xK_n = XK_n + , xK_o = XK_o + , xK_p = XK_p + , xK_q = XK_q + , xK_r = XK_r + , xK_s = XK_s + , xK_t = XK_t + , xK_u = XK_u + , xK_v = XK_v + , xK_w = XK_w + , xK_x = XK_x + , xK_y = XK_y + , xK_z = XK_z + , xK_braceleft = XK_braceleft + , xK_bar = XK_bar + , xK_braceright = XK_braceright + , xK_asciitilde = XK_asciitilde + } + +#{enum KeySym, + , xK_nobreakspace = XK_nobreakspace + , xK_exclamdown = XK_exclamdown + , xK_cent = XK_cent + , xK_sterling = XK_sterling + , xK_currency = XK_currency + , xK_yen = XK_yen + , xK_brokenbar = XK_brokenbar + , xK_section = XK_section + , xK_diaeresis = XK_diaeresis + , xK_copyright = XK_copyright + , xK_ordfeminine = XK_ordfeminine + , xK_guillemotleft = XK_guillemotleft + , xK_notsign = XK_notsign + , xK_hyphen = XK_hyphen + , xK_registered = XK_registered + , xK_macron = XK_macron + , xK_degree = XK_degree + , xK_plusminus = XK_plusminus + , xK_twosuperior = XK_twosuperior + , xK_threesuperior = XK_threesuperior + , xK_acute = XK_acute + , xK_mu = XK_mu + , xK_paragraph = XK_paragraph + , xK_periodcentered = XK_periodcentered + , xK_cedilla = XK_cedilla + , xK_onesuperior = XK_onesuperior + , xK_masculine = XK_masculine + , xK_guillemotright = XK_guillemotright + , xK_onequarter = XK_onequarter + , xK_onehalf = XK_onehalf + , xK_threequarters = XK_threequarters + , xK_questiondown = XK_questiondown + , xK_Agrave = XK_Agrave + , xK_Aacute = XK_Aacute + , xK_Acircumflex = XK_Acircumflex + , xK_Atilde = XK_Atilde + , xK_Adiaeresis = XK_Adiaeresis + , xK_Aring = XK_Aring + , xK_AE = XK_AE + , xK_Ccedilla = XK_Ccedilla + , xK_Egrave = XK_Egrave + , xK_Eacute = XK_Eacute + , xK_Ecircumflex = XK_Ecircumflex + , xK_Ediaeresis = XK_Ediaeresis + , xK_Igrave = XK_Igrave + , xK_Iacute = XK_Iacute + , xK_Icircumflex = XK_Icircumflex + , xK_Idiaeresis = XK_Idiaeresis + , xK_ETH = XK_ETH + , xK_Eth = XK_Eth + , xK_Ntilde = XK_Ntilde + , xK_Ograve = XK_Ograve + , xK_Oacute = XK_Oacute + , xK_Ocircumflex = XK_Ocircumflex + , xK_Otilde = XK_Otilde + , xK_Odiaeresis = XK_Odiaeresis + , xK_multiply = XK_multiply + , xK_Ooblique = XK_Ooblique + , xK_Ugrave = XK_Ugrave + , xK_Uacute = XK_Uacute + , xK_Ucircumflex = XK_Ucircumflex + , xK_Udiaeresis = XK_Udiaeresis + , xK_Yacute = XK_Yacute + , xK_THORN = XK_THORN + , xK_Thorn = XK_Thorn + , xK_ssharp = XK_ssharp + , xK_agrave = XK_agrave + , xK_aacute = XK_aacute + , xK_acircumflex = XK_acircumflex + , xK_atilde = XK_atilde + , xK_adiaeresis = XK_adiaeresis + , xK_aring = XK_aring + , xK_ae = XK_ae + , xK_ccedilla = XK_ccedilla + , xK_egrave = XK_egrave + , xK_eacute = XK_eacute + , xK_ecircumflex = XK_ecircumflex + , xK_ediaeresis = XK_ediaeresis + , xK_igrave = XK_igrave + , xK_iacute = XK_iacute + , xK_icircumflex = XK_icircumflex + , xK_idiaeresis = XK_idiaeresis + , xK_eth = XK_eth + , xK_ntilde = XK_ntilde + , xK_ograve = XK_ograve + , xK_oacute = XK_oacute + , xK_ocircumflex = XK_ocircumflex + , xK_otilde = XK_otilde + , xK_odiaeresis = XK_odiaeresis + , xK_division = XK_division + , xK_oslash = XK_oslash + , xK_ugrave = XK_ugrave + , xK_uacute = XK_uacute + , xK_ucircumflex = XK_ucircumflex + , xK_udiaeresis = XK_udiaeresis + , xK_yacute = XK_yacute + , xK_thorn = XK_thorn + , xK_ydiaeresis = XK_ydiaeresis + } + +type EventMask = Mask +#{enum EventMask, + , noEventMask = NoEventMask + , keyPressMask = KeyPressMask + , keyReleaseMask = KeyReleaseMask + , buttonPressMask = ButtonPressMask + , buttonReleaseMask = ButtonReleaseMask + , enterWindowMask = EnterWindowMask + , leaveWindowMask = LeaveWindowMask + , pointerMotionMask = PointerMotionMask + , pointerMotionHintMask = PointerMotionHintMask + , button1MotionMask = Button1MotionMask + , button2MotionMask = Button2MotionMask + , button3MotionMask = Button3MotionMask + , button4MotionMask = Button4MotionMask + , button5MotionMask = Button5MotionMask + , buttonMotionMask = ButtonMotionMask + , keymapStateMask = KeymapStateMask + , exposureMask = ExposureMask + , visibilityChangeMask = VisibilityChangeMask + , structureNotifyMask = StructureNotifyMask + , resizeRedirectMask = ResizeRedirectMask + , substructureNotifyMask = SubstructureNotifyMask + , substructureRedirectMask = SubstructureRedirectMask + , focusChangeMask = FocusChangeMask + , propertyChangeMask = PropertyChangeMask + , colormapChangeMask = ColormapChangeMask + , ownerGrabButtonMask = OwnerGrabButtonMask + } + +type EventType = Word32 +#{enum EventType, + , keyPress = KeyPress + , keyRelease = KeyRelease + , buttonPress = ButtonPress + , buttonRelease = ButtonRelease + , motionNotify = MotionNotify + , enterNotify = EnterNotify + , leaveNotify = LeaveNotify + , focusIn = FocusIn + , focusOut = FocusOut + , keymapNotify = KeymapNotify + , expose = Expose + , graphicsExpose = GraphicsExpose + , noExpose = NoExpose + , visibilityNotify = VisibilityNotify + , createNotify = CreateNotify + , destroyNotify = DestroyNotify + , unmapNotify = UnmapNotify + , mapNotify = MapNotify + , mapRequest = MapRequest + , reparentNotify = ReparentNotify + , configureNotify = ConfigureNotify + , configureRequest = ConfigureRequest + , gravityNotify = GravityNotify + , resizeRequest = ResizeRequest + , circulateNotify = CirculateNotify + , circulateRequest = CirculateRequest + , propertyNotify = PropertyNotify + , selectionClear = SelectionClear + , selectionRequest = SelectionRequest + , selectionNotify = SelectionNotify + , colormapNotify = ColormapNotify + , clientMessage = ClientMessage + , mappingNotify = MappingNotify + , lASTEvent = LASTEvent + } + +type Modifier = Mask +#{enum Modifier, + , shiftMapIndex = ShiftMapIndex + , lockMapIndex = LockMapIndex + , controlMapIndex = ControlMapIndex + , mod1MapIndex = Mod1MapIndex + , mod2MapIndex = Mod2MapIndex + , mod3MapIndex = Mod3MapIndex + , mod4MapIndex = Mod4MapIndex + , mod5MapIndex = Mod5MapIndex + , anyModifier = AnyModifier + } + +type KeyMask = Modifier +#{enum KeyMask, + , shiftMask = ShiftMask + , lockMask = LockMask + , controlMask = ControlMask + , mod1Mask = Mod1Mask + , mod2Mask = Mod2Mask + , mod3Mask = Mod3Mask + , mod4Mask = Mod4Mask + , mod5Mask = Mod5Mask + } + +type ButtonMask = Modifier +#{enum ButtonMask, + , button1Mask = Button1Mask + , button2Mask = Button2Mask + , button3Mask = Button3Mask + , button4Mask = Button4Mask + , button5Mask = Button5Mask + } + +type Button = Word32 +#{enum Button, + , button1 = Button1 + , button2 = Button2 + , button3 = Button3 + , button4 = Button4 + , button5 = Button5 + } + +type NotifyMode = Int +-- NotifyNormal and NotifyHint are used as detail in XMotionEvents +#{enum NotifyMode, + , notifyNormal = NotifyNormal + , notifyGrab = NotifyGrab + , notifyUngrab = NotifyUngrab + , notifyWhileGrabbed = NotifyWhileGrabbed + , notifyHint = NotifyHint + } + +type NotifyDetail = Int +#{enum NotifyDetail, + , notifyAncestor = NotifyAncestor + , notifyVirtual = NotifyVirtual + , notifyInferior = NotifyInferior + , notifyNonlinear = NotifyNonlinear + , notifyNonlinearVirtual = NotifyNonlinearVirtual + , notifyPointer = NotifyPointer + , notifyPointerRoot = NotifyPointerRoot + , notifyDetailNone = NotifyDetailNone + } + +type Visibility = Int +#{enum Visibility, + , visibilityUnobscured = VisibilityUnobscured + , visibilityPartiallyObscured = VisibilityPartiallyObscured + , visibilityFullyObscured = VisibilityFullyObscured + } + +-- Window's place relative to siblings (used in Circulation requests/events) +type Place = Int +#{enum Place, + , placeOnTop = PlaceOnTop + , placeOnBottom = PlaceOnBottom + } + +type Protocol = Int +#{enum Protocol, + , familyInternet = FamilyInternet + , familyDECnet = FamilyDECnet + , familyChaos = FamilyChaos + } + +type PropertyNotification = Int +#{enum PropertyNotification, + , propertyNewValue = PropertyNewValue + , propertyDelete = PropertyDelete + } + +type ColormapNotification = Int +#{enum ColormapNotification, + , colormapUninstalled = ColormapUninstalled + , colormapInstalled = ColormapInstalled + } + +-- Grab{Pointer,Button,Keyboard,Key} Modes +type GrabMode = Int +#{enum GrabMode, + , grabModeSync = GrabModeSync + , grabModeAsync = GrabModeAsync + } + +-- Grab{Pointer,Keyboard} reply status + +type GrabStatus = Int +#{enum GrabStatus, + , grabSuccess = GrabSuccess + , alreadyGrabbed = AlreadyGrabbed + , grabInvalidTime = GrabInvalidTime + , grabNotViewable = GrabNotViewable + , grabFrozen = GrabFrozen + } + +-- AllowEvents modes +type AllowEvents = Int +#{enum AllowEvents, + , asyncPointer = AsyncPointer + , syncPointer = SyncPointer + , replayPointer = ReplayPointer + , asyncKeyboard = AsyncKeyboard + , syncKeyboard = SyncKeyboard + , replayKeyboard = ReplayKeyboard + , asyncBoth = AsyncBoth + , syncBoth = SyncBoth + } + +-- {Set,Get}InputFocus Modes +type FocusMode = Int +#{enum FocusMode, + , revertToNone = RevertToNone + , revertToPointerRoot = RevertToPointerRoot + , revertToParent = RevertToParent + } + +-- Error codes +type Status = Int +#{enum Status, + , success = Success + , badRequest = BadRequest + , badValue = BadValue + , badWindow = BadWindow + , badPixmap = BadPixmap + , badAtom = BadAtom + , badCursor = BadCursor + , badFont = BadFont + , badMatch = BadMatch + , badDrawable = BadDrawable + , badAccess = BadAccess + , badAlloc = BadAlloc + , badColor = BadColor + , badGC = BadGC + , badIDChoice = BadIDChoice + , badName = BadName + , badLength = BadLength + , badImplementation = BadImplementation + , firstExtensionError = FirstExtensionError + , lastExtensionError = LastExtensionError + } + +errorMsg :: String -> String -> String +errorMsg fn_name what = "Error " ++ what ++ " raised in function " ++ fn_name + +throwUnlessSuccess :: String -> IO Status -> IO () +throwUnlessSuccess fn_name = + throwIf_ (/= success) + (\status -> errorMsg fn_name ("bad status " ++ show status)) + +throwIfZero :: String -> IO Status -> IO () +throwIfZero fn_name = throwIf_ (== 0) (const (errorMsg fn_name "zero")) + +type WindowClass = Int +#{enum WindowClass, + , copyFromParent = CopyFromParent + , inputOutput = InputOutput + , inputOnly = InputOnly + } + +-- Window attributes mask +type AttributeMask = Mask +#{enum AttributeMask, + , cWBackPixmap = CWBackPixmap + , cWBackPixel = CWBackPixel + , cWBorderPixmap = CWBorderPixmap + , cWBorderPixel = CWBorderPixel + , cWBitGravity = CWBitGravity + , cWWinGravity = CWWinGravity + , cWBackingStore = CWBackingStore + , cWBackingPlanes = CWBackingPlanes + , cWBackingPixel = CWBackingPixel + , cWOverrideRedirect = CWOverrideRedirect + , cWSaveUnder = CWSaveUnder + , cWEventMask = CWEventMask + , cWDontPropagate = CWDontPropagate + , cWColormap = CWColormap + , cWCursor = CWCursor + } + +-- Used in ChangeCloseDownMode +type CloseDownMode = Int +#{enum CloseDownMode, + , destroyAll = DestroyAll + , retainPermanent = RetainPermanent + , retainTemporary = RetainTemporary + } + +---------------------------------------------------------------- +-- CURSOR STUFF +---------------------------------------------------------------- + +type QueryBestSizeClass = Int +#{enum QueryBestSizeClass, + , cursorShape = CursorShape + , tileShape = TileShape + , stippleShape = StippleShape + } + +---------------------------------------------------------------- +-- GRAPHICS DEFINITIONS +---------------------------------------------------------------- + +-- graphics functions, as in GC.alu + +type GXFunction = Int +#{enum GXFunction, + , gXclear = GXclear + , gXand = GXand + , gXandReverse = GXandReverse + , gXcopy = GXcopy + , gXandInverted = GXandInverted + , gXnoop = GXnoop + , gXxor = GXxor + , gXor = GXor + , gXnor = GXnor + , gXequiv = GXequiv + , gXinvert = GXinvert + , gXorReverse = GXorReverse + , gXcopyInverted = GXcopyInverted + , gXorInverted = GXorInverted + , gXnand = GXnand + , gXset = GXset + } + +type LineStyle = Int +#{enum LineStyle, + , lineSolid = LineSolid + , lineOnOffDash = LineOnOffDash + , lineDoubleDash = LineDoubleDash + } + +type CapStyle = Int +#{enum CapStyle, + , capNotLast = CapNotLast + , capButt = CapButt + , capRound = CapRound + , capProjecting = CapProjecting + } + +type JoinStyle = Int +#{enum JoinStyle, + , joinMiter = JoinMiter + , joinRound = JoinRound + , joinBevel = JoinBevel + } + +type FillStyle = Int +#{enum FillStyle, + , fillSolid = FillSolid + , fillTiled = FillTiled + , fillStippled = FillStippled + , fillOpaqueStippled = FillOpaqueStippled + } + +type FillRule = Int +#{enum FillRule, + , evenOddRule = EvenOddRule + , windingRule = WindingRule + } + +type SubWindowMode = Int +#{enum SubWindowMode, + , clipByChildren = ClipByChildren + , includeInferiors = IncludeInferiors + } + +-- -- SetClipRectangles ordering +-- type Ordering = Int +-- #{enum Ordering, +-- , unsorted = Unsorted +-- , ySorted = YSorted +-- , yXSorted = YXSorted +-- , yXBanded = YXBanded +-- } + +-- CoordinateMode for drawing routines +type CoordinateMode = Int +#{enum CoordinateMode, + , coordModeOrigin = CoordModeOrigin + , coordModePrevious = CoordModePrevious + } + +type PolygonShape = Int +#{enum PolygonShape, + , complex = Complex + , nonconvex = Nonconvex + , convex = Convex + } + +-- Arc modes for PolyFillArc +type ArcMode = Int +#{enum ArcMode, + , arcChord = ArcChord + , arcPieSlice = ArcPieSlice + } + +-- GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into +-- GC.stateChanges + +type GCMask = Int +#{enum GCMask, + , gCFunction = GCFunction + , gCPlaneMask = GCPlaneMask + , gCForeground = GCForeground + , gCBackground = GCBackground + , gCLineWidth = GCLineWidth + , gCLineStyle = GCLineStyle + , gCCapStyle = GCCapStyle + , gCJoinStyle = GCJoinStyle + , gCFillStyle = GCFillStyle + , gCFillRule = GCFillRule + , gCTile = GCTile + , gCStipple = GCStipple + , gCTileStipXOrigin = GCTileStipXOrigin + , gCTileStipYOrigin = GCTileStipYOrigin + , gCFont = GCFont + , gCSubwindowMode = GCSubwindowMode + , gCGraphicsExposures = GCGraphicsExposures + , gCClipXOrigin = GCClipXOrigin + , gCClipYOrigin = GCClipYOrigin + , gCClipMask = GCClipMask + , gCDashOffset = GCDashOffset + , gCDashList = GCDashList + , gCArcMode = GCArcMode + , gCLastBit = GCLastBit + } + +type CirculationDirection = Int +#{enum CirculationDirection, + , raiseLowest = RaiseLowest + , lowerHighest = LowerHighest + } + +-- used in imageByteOrder and bitmapBitOrder +type ByteOrder = Int +#{enum ByteOrder, + , lSBFirst = LSBFirst + , mSBFirst = MSBFirst + } + +type ColormapAlloc = Int +#{enum ColormapAlloc, + , allocNone = AllocNone + , allocAll = AllocAll + } + +type MappingRequest = Int +#{enum MappingRequest, + , mappingModifier = MappingModifier + , mappingKeyboard = MappingKeyboard + , mappingPointer = MappingPointer + } + +type ChangeSaveSetMode = Int +#{enum ChangeSaveSetMode, + , setModeInsert = SetModeInsert + , setModeDelete = SetModeDelete + } + +type BitGravity = Int +#{enum BitGravity, + , forgetGravity = ForgetGravity + , northWestGravity = NorthWestGravity + , northGravity = NorthGravity + , northEastGravity = NorthEastGravity + , westGravity = WestGravity + , centerGravity = CenterGravity + , eastGravity = EastGravity + , southWestGravity = SouthWestGravity + , southGravity = SouthGravity + , southEastGravity = SouthEastGravity + , staticGravity = StaticGravity + } + +-- All the BitGravity's plus ... +type WindowGravity = Int +#{enum WindowGravity, + , unmapGravity = UnmapGravity + } + +-- Used in CreateWindow for backing-store hint +type BackingStore = Int +#{enum BackingStore, + , notUseful = NotUseful + , whenMapped = WhenMapped + , always = Always + } + +#{enum Word8, + , doRed = DoRed + , doGreen = DoGreen + , doBlue = DoBlue + } + +type FontDirection = Int +#{enum FontDirection, + , fontLeftToRight = FontLeftToRight + , fontRightToLeft = FontRightToLeft + } hunk ./Graphics/X11/Xlib/Atom.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Atom --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of type declarations for interfacing with X11 Atoms. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Atom( - internAtom, - - pRIMARY, - sECONDARY, - aRC, - aTOM, - bITMAP, - cARDINAL, - cOLORMAP, - cURSOR, - cUT_BUFFER0, - cUT_BUFFER1, - cUT_BUFFER2, - cUT_BUFFER3, - cUT_BUFFER4, - cUT_BUFFER5, - cUT_BUFFER6, - cUT_BUFFER7, - dRAWABLE, - fONT, - iNTEGER, - pIXMAP, - pOINT, - rECTANGLE, - rESOURCE_MANAGER, - rGB_COLOR_MAP, - rGB_BEST_MAP, - rGB_BLUE_MAP, - rGB_DEFAULT_MAP, - rGB_GRAY_MAP, - rGB_GREEN_MAP, - rGB_RED_MAP, - sTRING, - vISUALID, - wINDOW, - wM_COMMAND, - wM_HINTS, - wM_CLIENT_MACHINE, - wM_ICON_NAME, - wM_ICON_SIZE, - wM_NAME, - wM_NORMAL_HINTS, - wM_SIZE_HINTS, - wM_ZOOM_HINTS, - mIN_SPACE, - nORM_SPACE, - mAX_SPACE, - eND_SPACE, - sUPERSCRIPT_X, - sUPERSCRIPT_Y, - sUBSCRIPT_X, - sUBSCRIPT_Y, - uNDERLINE_POSITION, - uNDERLINE_THICKNESS, - sTRIKEOUT_ASCENT, - sTRIKEOUT_DESCENT, - iTALIC_ANGLE, - x_HEIGHT, - qUAD_WIDTH, - wEIGHT, - pOINT_SIZE, - rESOLUTION, - cOPYRIGHT, - nOTICE, - fONT_NAME, - fAMILY_NAME, - fULL_NAME, - cAP_HEIGHT, - wM_CLASS, - wM_TRANSIENT_FOR, - lAST_PREDEFINED, - - ) where - -import Foreign.GreenCard -import Graphics.X11.Types -import Graphics.X11.Xlib.Types - -%#include "HsXlib.h" - -%prefix X -%prefix XA_ - ----------------------------------------------------------------- --- Atoms ----------------------------------------------------------------- - --- AC, 1/9/2000: Added definition for XInternAtom -%fun XInternAtom :: Display -> String -> Bool -> IO Atom - --- XInternAtoms omitted --- XGetAtomName omitted --- XGetAtomNames omitted --- XConvertSelection omitted --- XListProperties omitted --- XChangeProperty omitted --- XDeleteProperty omitted - -%const Atom -% [ XA_PRIMARY -% , XA_SECONDARY -% , XA_ARC -% , XA_ATOM -% , XA_BITMAP -% , XA_CARDINAL -% , XA_COLORMAP -% , XA_CURSOR -% , XA_CUT_BUFFER0 -% , XA_CUT_BUFFER1 -% , XA_CUT_BUFFER2 -% , XA_CUT_BUFFER3 -% , XA_CUT_BUFFER4 -% , XA_CUT_BUFFER5 -% , XA_CUT_BUFFER6 -% , XA_CUT_BUFFER7 -% , XA_DRAWABLE -% , XA_FONT -% , XA_INTEGER -% , XA_PIXMAP -% , XA_POINT -% , XA_RECTANGLE -% , XA_RESOURCE_MANAGER -% , XA_RGB_COLOR_MAP -% , XA_RGB_BEST_MAP -% , XA_RGB_BLUE_MAP -% , XA_RGB_DEFAULT_MAP -% , XA_RGB_GRAY_MAP -% , XA_RGB_GREEN_MAP -% , XA_RGB_RED_MAP -% , XA_STRING -% , XA_VISUALID -% , XA_WINDOW -% , XA_WM_COMMAND -% , XA_WM_HINTS -% , XA_WM_CLIENT_MACHINE -% , XA_WM_ICON_NAME -% , XA_WM_ICON_SIZE -% , XA_WM_NAME -% , XA_WM_NORMAL_HINTS -% , XA_WM_SIZE_HINTS -% , XA_WM_ZOOM_HINTS -% , XA_MIN_SPACE -% , XA_NORM_SPACE -% , XA_MAX_SPACE -% , XA_END_SPACE -% , XA_SUPERSCRIPT_X -% , XA_SUPERSCRIPT_Y -% , XA_SUBSCRIPT_X -% , XA_SUBSCRIPT_Y -% , XA_UNDERLINE_POSITION -% , XA_UNDERLINE_THICKNESS -% , XA_STRIKEOUT_ASCENT -% , XA_STRIKEOUT_DESCENT -% , XA_ITALIC_ANGLE -% , XA_X_HEIGHT -% , XA_QUAD_WIDTH -% , XA_WEIGHT -% , XA_POINT_SIZE -% , XA_RESOLUTION -% , XA_COPYRIGHT -% , XA_NOTICE -% , XA_FONT_NAME -% , XA_FAMILY_NAME -% , XA_FULL_NAME -% , XA_CAP_HEIGHT -% , XA_WM_CLASS -% , XA_WM_TRANSIENT_FOR -% , XA_LAST_PREDEFINED -% ] - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Atom.gc hunk ./Graphics/X11/Xlib/Atom.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Atom +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of type declarations for interfacing with X11 Atoms. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Atom( + internAtom, + + pRIMARY, + sECONDARY, + aRC, + aTOM, + bITMAP, + cARDINAL, + cOLORMAP, + cURSOR, + cUT_BUFFER0, + cUT_BUFFER1, + cUT_BUFFER2, + cUT_BUFFER3, + cUT_BUFFER4, + cUT_BUFFER5, + cUT_BUFFER6, + cUT_BUFFER7, + dRAWABLE, + fONT, + iNTEGER, + pIXMAP, + pOINT, + rECTANGLE, + rESOURCE_MANAGER, + rGB_COLOR_MAP, + rGB_BEST_MAP, + rGB_BLUE_MAP, + rGB_DEFAULT_MAP, + rGB_GRAY_MAP, + rGB_GREEN_MAP, + rGB_RED_MAP, + sTRING, + vISUALID, + wINDOW, + wM_COMMAND, + wM_HINTS, + wM_CLIENT_MACHINE, + wM_ICON_NAME, + wM_ICON_SIZE, + wM_NAME, + wM_NORMAL_HINTS, + wM_SIZE_HINTS, + wM_ZOOM_HINTS, + mIN_SPACE, + nORM_SPACE, + mAX_SPACE, + eND_SPACE, + sUPERSCRIPT_X, + sUPERSCRIPT_Y, + sUBSCRIPT_X, + sUBSCRIPT_Y, + uNDERLINE_POSITION, + uNDERLINE_THICKNESS, + sTRIKEOUT_ASCENT, + sTRIKEOUT_DESCENT, + iTALIC_ANGLE, + x_HEIGHT, + qUAD_WIDTH, + wEIGHT, + pOINT_SIZE, + rESOLUTION, + cOPYRIGHT, + nOTICE, + fONT_NAME, + fAMILY_NAME, + fULL_NAME, + cAP_HEIGHT, + wM_CLASS, + wM_TRANSIENT_FOR, + lAST_PREDEFINED, + + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +import Foreign.C.String + +#include "HsXlib.h" + +---------------------------------------------------------------- +-- Atoms +---------------------------------------------------------------- + +-- AC, 1/9/2000: Added definition for XInternAtom +internAtom :: Display -> String -> Bool -> IO Atom +internAtom display atom_name only_if_exists = + withCString atom_name $ \ c_atom_name -> + xInternAtom display c_atom_name only_if_exists +foreign import ccall unsafe "XInternAtom" + xInternAtom :: Display -> CString -> Bool -> IO Atom + +-- XInternAtoms omitted +-- XGetAtomName omitted +-- XGetAtomNames omitted +-- XConvertSelection omitted +-- XListProperties omitted +-- XChangeProperty omitted +-- XDeleteProperty omitted + +#{enum Atom, + , pRIMARY = XA_PRIMARY + , sECONDARY = XA_SECONDARY + , aRC = XA_ARC + , aTOM = XA_ATOM + , bITMAP = XA_BITMAP + , cARDINAL = XA_CARDINAL + , cOLORMAP = XA_COLORMAP + , cURSOR = XA_CURSOR + , cUT_BUFFER0 = XA_CUT_BUFFER0 + , cUT_BUFFER1 = XA_CUT_BUFFER1 + , cUT_BUFFER2 = XA_CUT_BUFFER2 + , cUT_BUFFER3 = XA_CUT_BUFFER3 + , cUT_BUFFER4 = XA_CUT_BUFFER4 + , cUT_BUFFER5 = XA_CUT_BUFFER5 + , cUT_BUFFER6 = XA_CUT_BUFFER6 + , cUT_BUFFER7 = XA_CUT_BUFFER7 + , dRAWABLE = XA_DRAWABLE + , fONT = XA_FONT + , iNTEGER = XA_INTEGER + , pIXMAP = XA_PIXMAP + , pOINT = XA_POINT + , rECTANGLE = XA_RECTANGLE + , rESOURCE_MANAGER = XA_RESOURCE_MANAGER + , rGB_COLOR_MAP = XA_RGB_COLOR_MAP + , rGB_BEST_MAP = XA_RGB_BEST_MAP + , rGB_BLUE_MAP = XA_RGB_BLUE_MAP + , rGB_DEFAULT_MAP = XA_RGB_DEFAULT_MAP + , rGB_GRAY_MAP = XA_RGB_GRAY_MAP + , rGB_GREEN_MAP = XA_RGB_GREEN_MAP + , rGB_RED_MAP = XA_RGB_RED_MAP + , sTRING = XA_STRING + , vISUALID = XA_VISUALID + , wINDOW = XA_WINDOW + , wM_COMMAND = XA_WM_COMMAND + , wM_HINTS = XA_WM_HINTS + , wM_CLIENT_MACHINE = XA_WM_CLIENT_MACHINE + , wM_ICON_NAME = XA_WM_ICON_NAME + , wM_ICON_SIZE = XA_WM_ICON_SIZE + , wM_NAME = XA_WM_NAME + , wM_NORMAL_HINTS = XA_WM_NORMAL_HINTS + , wM_SIZE_HINTS = XA_WM_SIZE_HINTS + , wM_ZOOM_HINTS = XA_WM_ZOOM_HINTS + , mIN_SPACE = XA_MIN_SPACE + , nORM_SPACE = XA_NORM_SPACE + , mAX_SPACE = XA_MAX_SPACE + , eND_SPACE = XA_END_SPACE + , sUPERSCRIPT_X = XA_SUPERSCRIPT_X + , sUPERSCRIPT_Y = XA_SUPERSCRIPT_Y + , sUBSCRIPT_X = XA_SUBSCRIPT_X + , sUBSCRIPT_Y = XA_SUBSCRIPT_Y + , uNDERLINE_POSITION = XA_UNDERLINE_POSITION + , uNDERLINE_THICKNESS = XA_UNDERLINE_THICKNESS + , sTRIKEOUT_ASCENT = XA_STRIKEOUT_ASCENT + , sTRIKEOUT_DESCENT = XA_STRIKEOUT_DESCENT + , iTALIC_ANGLE = XA_ITALIC_ANGLE + , x_HEIGHT = XA_X_HEIGHT + , qUAD_WIDTH = XA_QUAD_WIDTH + , wEIGHT = XA_WEIGHT + , pOINT_SIZE = XA_POINT_SIZE + , rESOLUTION = XA_RESOLUTION + , cOPYRIGHT = XA_COPYRIGHT + , nOTICE = XA_NOTICE + , fONT_NAME = XA_FONT_NAME + , fAMILY_NAME = XA_FAMILY_NAME + , fULL_NAME = XA_FULL_NAME + , cAP_HEIGHT = XA_CAP_HEIGHT + , wM_CLASS = XA_WM_CLASS + , wM_TRANSIENT_FOR = XA_WM_TRANSIENT_FOR + , lAST_PREDEFINED = XA_LAST_PREDEFINED + } + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Color.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Color --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of GreenCard declarations for interfacing with Xlib Colors. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Color( - - lookupColor, - allocNamedColor, - allocColor, - parseColor, - freeColors, - storeColor, - queryColor, - queryColors, - installColormap, - uninstallColormap, - copyColormapAndFree, - createColormap, - freeColormap, - - ) where - -import Foreign.GreenCard -import Graphics.X11.Types -import Graphics.X11.Xlib.Types - -%#include "HsXlib.h" - -%prefix X - ----------------------------------------------------------------- --- Color and Colormaps ----------------------------------------------------------------- - -%fun XLookupColor :: Display -> Colormap -> String -> IO (Color, Color) -%code Status err = XLookupColor(arg1,arg2,arg3,&res1,&res2) -%fail { 0 == err }{ Zero(err,XLookupColor) } -%end free(arg3) - -%fun XAllocNamedColor :: Display -> Colormap -> String -> IO (Color, Color) -%code Status err = XAllocNamedColor(arg1,arg2,arg3,&res1,&res2) -%fail { 0 == err }{ Zero(err,XLookupColor) } -%end free(arg3) - -%fun XAllocColor :: Display -> Colormap -> Color -> IO Color -%code Status err = XAllocColor(arg1,arg2,&arg3) -%fail { 0 == err }{ Zero(err,XLookupColor) } -%result (color {arg3}) - -%fun XParseColor :: Display -> Colormap -> String -> IO Color -%code Status err = XParseColor(arg1,arg2,arg3,&res1) -%fail { 0 == err }{ Zero(err,XLookupColor) } -%end free(arg3) - --- ToDo: Can't express relationship between arg4 and res1 properly (or arg5, res2) --- %errfun Zero XAllocColorCells :: Display -> Colormap -> Bool -> Int -> Int -> IO (ListPixel, ListPixel) using err = XAllocColorCells(arg1,arg2,arg3,arg4_size,res1,arg5_size,res2) - --- ToDo: Can't express relationship between arg4 and res1 properly --- %errfun Zero XAllocColorPlanes :: Display -> Colormap -> Bool -> Int -> Int -> Int -> Int IO (ListPixel, Pixel, Pixel, Pixel) using err = XAllocColorPlanes(...) - -%fun XFreeColors :: Display -> Colormap -> ListPixel -> Pixel -> IO () -%call (display arg1) (colormap arg2) (listPixel arg3 arg3_size) (pixel arg4) -%code XFreeColors(arg1,arg2,arg3,arg3_size,arg4) -%end free(arg3) - -%fun XStoreColor :: Display -> Colormap -> Color -> IO () -%code XStoreColor(arg1,arg2,&arg3) - --- %fun XStoreColors :: Display -> Colormap -> ListColor -> IO () --- %code XStoreColors(arg1,arg2,arg3,arg3_size) --- %fun XStoreNamedColor :: Display -> Colormap -> String -> Pixel -> PrimaryMask -> IO () - -%fun XQueryColor :: Display -> Colormap -> Color -> IO Color -%code XQueryColor(arg1,arg2,&arg3) -%result (color {arg3}) - -%fun XQueryColors :: Display -> Colormap -> ListColor -> IO ListColor -%call (display arg1) (colormap arg2) (listColor arg3 arg3_size) -%code XQueryColors(arg1,arg2,arg3,arg3_size) -%result (listColor {arg3} {arg3_size}) - -%fun XInstallColormap :: Display -> Colormap -> IO () -%fun XUninstallColormap :: Display -> Colormap -> IO () -%fun XCopyColormapAndFree :: Display -> Colormap -> IO Colormap -%fun XCreateColormap :: Display -> Window -> Visual -> ColormapAlloc -> IO Colormap -%fun XFreeColormap :: Display -> Colormap -> IO () - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Color.gc hunk ./Graphics/X11/Xlib/Color.hs 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Color +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of FFI declarations for interfacing with Xlib Colors. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Color( + + lookupColor, + allocNamedColor, + allocColor, + parseColor, + freeColors, + storeColor, + queryColor, + queryColors, + installColormap, + uninstallColormap, + copyColormapAndFree, + createColormap, + freeColormap, + + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +import Foreign +import Foreign.C + +---------------------------------------------------------------- +-- Color and Colormaps +---------------------------------------------------------------- + +lookupColor :: Display -> Colormap -> String -> IO (Color, Color) +lookupColor display colormap color_name = + withCString color_name $ \c_color_name -> + allocaColor $ \ exact_def_return -> + allocaColor $ \ screen_def_return -> do + throwIfZero "lookupColor" $ + xLookupColor display colormap c_color_name + exact_def_return screen_def_return + exact_def <- peekColor exact_def_return + screen_def <- peekColor screen_def_return + return (exact_def, screen_def) +foreign import ccall unsafe "HsXlib.h XLookupColor" + xLookupColor :: Display -> Colormap -> CString -> + Ptr Color -> Ptr Color -> IO Status + +allocNamedColor :: Display -> Colormap -> String -> IO (Color, Color) +allocNamedColor display colormap color_name = + withCString color_name $ \c_color_name -> + allocaColor $ \ exact_def_return -> + allocaColor $ \ screen_def_return -> do + throwIfZero "allocNamedColor" $ + xAllocNamedColor display colormap c_color_name + exact_def_return screen_def_return + exact_def <- peekColor exact_def_return + screen_def <- peekColor screen_def_return + return (exact_def, screen_def) +foreign import ccall unsafe "HsXlib.h XAllocNamedColor" + xAllocNamedColor :: Display -> Colormap -> CString -> + Ptr Color -> Ptr Color -> IO Status + +allocColor :: Display -> Colormap -> Color -> IO Color +allocColor display colormap color = + withColor color $ \ color_ptr -> do + throwIfZero "allocColor" $ + xAllocColor display colormap color_ptr + peekColor color_ptr +foreign import ccall unsafe "HsXlib.h XAllocColor" + xAllocColor :: Display -> Colormap -> Ptr Color -> IO Status + +parseColor :: Display -> Colormap -> String -> IO Color +parseColor display colormap color_spec = + withCString color_spec $ \ spec -> + allocaColor $ \ exact_def_return -> do + throwIfZero "parseColor" $ + xParseColor display colormap spec exact_def_return + peekColor exact_def_return +foreign import ccall unsafe "HsXlib.h XParseColor" + xParseColor :: Display -> Colormap -> CString -> Ptr Color -> IO Status + +-- ToDo: Can't express relationship between arg4 and res1 properly (or arg5, res2) +-- %errfun Zero XAllocColorCells :: Display -> Colormap -> Bool -> Int -> Int -> IO (ListPixel, ListPixel) using err = XAllocColorCells(arg1,arg2,arg3,arg4_size,res1,arg5_size,res2) + +-- ToDo: Can't express relationship between arg4 and res1 properly +-- %errfun Zero XAllocColorPlanes :: Display -> Colormap -> Bool -> Int -> Int -> Int -> Int IO (ListPixel, Pixel, Pixel, Pixel) using err = XAllocColorPlanes(...) + +freeColors :: Display -> Colormap -> [Pixel] -> Pixel -> IO () +freeColors display colormap pixels planes = + withArray pixels $ \ pixel_array -> + xFreeColors display colormap pixel_array (length pixels) planes +foreign import ccall unsafe "HsXlib.h XFreeColors" + xFreeColors :: Display -> Colormap -> Ptr Pixel -> Int -> Pixel -> IO () + +storeColor :: Display -> Colormap -> Color -> IO () +storeColor display colormap color = + withColor color $ \ color_ptr -> + xStoreColor display colormap color_ptr +foreign import ccall unsafe "HsXlib.h XStoreColor" + xStoreColor :: Display -> Colormap -> Ptr Color -> IO () + +-- %fun XStoreColors :: Display -> Colormap -> ListColor -> IO () +-- %code XStoreColors(arg1,arg2,arg3,arg3_size) +-- %fun XStoreNamedColor :: Display -> Colormap -> String -> Pixel -> PrimaryMask -> IO () + +queryColor :: Display -> Colormap -> Color -> IO Color +queryColor display colormap color = + withColor color $ \ color_ptr -> do + xQueryColor display colormap color_ptr + peekColor color_ptr +foreign import ccall unsafe "HsXlib.h XQueryColor" + xQueryColor :: Display -> Colormap -> Ptr Color -> IO () + +queryColors :: Display -> Colormap -> [Color] -> IO [Color] +queryColors display colormap colors = + withColorArray colors $ \ color_array ncolors -> do + xQueryColors display colormap color_array ncolors + peekColorArray ncolors color_array +foreign import ccall unsafe "HsXlib.h XQueryColors" + xQueryColors :: Display -> Colormap -> Ptr Color -> Int -> IO () + +foreign import ccall unsafe "HsXlib.h XInstallColormap" + installColormap :: Display -> Colormap -> IO () +foreign import ccall unsafe "HsXlib.h XUninstallColormap" + uninstallColormap :: Display -> Colormap -> IO () +foreign import ccall unsafe "HsXlib.h XCopyColormapAndFree" + copyColormapAndFree :: Display -> Colormap -> IO Colormap +foreign import ccall unsafe "HsXlib.h XCreateColormap" + createColormap :: Display -> Window -> Visual -> ColormapAlloc -> IO Colormap +foreign import ccall unsafe "HsXlib.h XFreeColormap" + freeColormap :: Display -> Colormap -> IO () + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Context.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Context --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of GreenCard declarations for interfacing with Xlib Graphics --- Contexts. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Context( - - setArcMode, - setBackground, - setForeground, - setFunction, - setGraphicsExposures, - setClipMask, - setClipOrigin, - setDashes, - setFillRule, - setFillStyle, - setFont, - setLineAttributes, - setPlaneMask, - setState, - setStipple, - setSubwindowMode, - setTSOrigin, - setTile, - createGC, - gContextFromGC, - freeGC, - flushGC, - copyGC, - - ) where - -import Foreign.GreenCard -import Graphics.X11.Types -import Graphics.X11.Xlib.Types - -%#include "HsXlib.h" - -%prefix X - ----------------------------------------------------------------- --- Graphics contexts ----------------------------------------------------------------- - --- Convenience functions - -%fun XSetArcMode :: Display -> GC -> ArcMode -> IO () -%fun XSetBackground :: Display -> GC -> Pixel -> IO () -%fun XSetForeground :: Display -> GC -> Pixel -> IO () -%fun XSetFunction :: Display -> GC -> GXFunction -> IO () -%fun XSetGraphicsExposures :: Display -> GC -> Bool -> IO () -%fun XSetClipMask :: Display -> GC -> Pixmap -> IO () -%fun XSetClipOrigin :: Display -> GC -> Position -> Position -> IO () - --- XSetClipRectangles omitted because it's not clear when it's safe to delete the --- array of rectangles - -%fun XSetDashes :: Display -> GC -> Int -> String -> Int -> IO () -%fun XSetFillRule :: Display -> GC -> FillRule -> IO () -%fun XSetFillStyle :: Display -> GC -> FillStyle -> IO () -%fun XSetFont :: Display -> GC -> Font -> IO () -%fun XSetLineAttributes :: Display -> GC -> Int -> LineStyle -> CapStyle -> JoinStyle -> IO () -%fun XSetPlaneMask :: Display -> GC -> Pixel -> IO () -%fun XSetState :: Display -> GC -> Pixel -> Pixel -> GXFunction -> Pixel -> IO () -%fun XSetStipple :: Display -> GC -> Pixmap -> IO () -%fun XSetSubwindowMode :: Display -> GC -> SubWindowMode -> IO () -%fun XSetTSOrigin :: Display -> GC -> Position -> Position -> IO () -%fun XSetTile :: Display -> GC -> Pixmap -> IO () - --- ToDo: create a real interface to this -%fun XCreateGC :: Display -> Drawable -> IO GC -%code res1 = XCreateGC(arg1,arg2,0,0); - --- OLD: --- %synonym : GCValueSet : Ptr --- in rtsDummy --- --- {% --- typedef unsigned long GCMask; /* cf XtGCMask */ --- typedef struct _gcvalues { --- GCMask mask; --- XGCValues values; --- }* GCValueSet; --- %} --- --- IMPURE GCValueSet emptyGCValueSet() --- RESULT: (RETVAL = (GCValueSet) malloc(sizeof(struct _gcvalues))) ? RETVAL->mask = 0, RETVAL : RETVAL; --- POST: RETVAL != NULL --- --- IMPURE void setGCForeground(colour, set) --- IN Pixel colour --- IN GCValueSet set --- RESULT: set->mask |= GCForeground; set->values.foreground = colour --- --- IMPURE void setGCBackground(colour, set) --- IN Pixel colour --- IN GCValueSet set --- RESULT: set->mask |= GCBackground; set->values.background = colour --- --- IMPURE void freeGCValueSet(set) --- IN GCValueSet set --- RESULT: free(set) --- --- IMPURE GC XCreateGC(display, d, set->mask, &(set->values)) --- NAME: xCreateGC --- IN Display* display --- IN Drawable d --- IN GCValueSet set --- --- IMPURE void XChangeGC(display, gc, set->mask, &(set->values)) --- NAME: xChangeGC --- IN Display* display --- IN GC gc --- IN GCValueSet set --- --- STARTH --- -- Code that packages GCValueSets up in a clean monoidic way. --- --- data GCSetter = GCSetter (GCValueSet -> IO ()) -- should be newtype --- --- createGC :: Display -> Drawable -> GCSetter -> IO GC --- createGC display d (GCSetter setter) = --- emptyGCValueSet >>= \ set -> --- setter set >> --- xCreateGC display d set >>= \ gc -> --- freeGCValueSet set >> --- return gc --- --- changeGC :: Display -> Drawable -> GC -> GCSetter -> IO () --- changeGC display d gc (GCSetter setter) = --- emptyGCValueSet >>= \ set -> --- setter set >> --- xChangeGC display d set >>= \ gc -> --- freeGCValueSet set --- --- instance Monoid GCSetter where --- (GCSetter m) >>> (GCSetter k) --- = GCSetter (\ settings -> m settings >> k settings) --- unit = GCSetter (\ _ -> return ()) --- --- set_Background :: Pixel -> GCSetter --- set_Background c = GCSetter (setGCBackground c) --- --- set_Foreground :: Pixel -> GCSetter --- set_Foreground c = GCSetter (setGCForeground c) --- ENDH - -%fun XGContextFromGC :: GC -> GContext - -%fun XFreeGC :: Display -> GC -> IO () -%fun XFlushGC :: Display -> GC -> IO () - -%fun XCopyGC :: Display -> GC -> Mask -> GC -> IO () - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Context.gc hunk ./Graphics/X11/Xlib/Context.hs 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Context +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of FFI declarations for interfacing with Xlib Graphics +-- Contexts. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Context( + + setArcMode, + setBackground, + setForeground, + setFunction, + setGraphicsExposures, + setClipMask, + setClipOrigin, + setDashes, + setFillRule, + setFillStyle, + setFont, + setLineAttributes, + setPlaneMask, + setState, + setStipple, + setSubwindowMode, + setTSOrigin, + setTile, + createGC, + gContextFromGC, + freeGC, + flushGC, + copyGC, + + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +import Foreign +import Foreign.C + +---------------------------------------------------------------- +-- Graphics contexts +---------------------------------------------------------------- + +-- Convenience functions + +foreign import ccall unsafe "HsXlib.h XSetArcMode" + setArcMode :: Display -> GC -> ArcMode -> IO () +foreign import ccall unsafe "HsXlib.h XSetBackground" + setBackground :: Display -> GC -> Pixel -> IO () +foreign import ccall unsafe "HsXlib.h XSetForeground" + setForeground :: Display -> GC -> Pixel -> IO () +foreign import ccall unsafe "HsXlib.h XSetFunction" + setFunction :: Display -> GC -> GXFunction -> IO () +foreign import ccall unsafe "HsXlib.h XSetGraphicsExposures" + setGraphicsExposures :: Display -> GC -> Bool -> IO () +foreign import ccall unsafe "HsXlib.h XSetClipMask" + setClipMask :: Display -> GC -> Pixmap -> IO () +foreign import ccall unsafe "HsXlib.h XSetClipOrigin" + setClipOrigin :: Display -> GC -> Position -> Position -> IO () + +-- XSetClipRectangles omitted because it's not clear when it's safe to delete the +-- array of rectangles + +setDashes :: Display -> GC -> Int -> String -> Int -> IO () +setDashes display gc dash_offset dashes n = + withCString dashes $ \ dash_list -> + xSetDashes display gc dash_offset dash_list n +foreign import ccall unsafe "HsXlib.h XSetDashes" + xSetDashes :: Display -> GC -> Int -> CString -> Int -> IO () +foreign import ccall unsafe "HsXlib.h XSetFillRule" + setFillRule :: Display -> GC -> FillRule -> IO () +foreign import ccall unsafe "HsXlib.h XSetFillStyle" + setFillStyle :: Display -> GC -> FillStyle -> IO () +foreign import ccall unsafe "HsXlib.h XSetFont" + setFont :: Display -> GC -> Font -> IO () +foreign import ccall unsafe "HsXlib.h XSetLineAttributes" + setLineAttributes :: Display -> GC -> Int -> LineStyle -> + CapStyle -> JoinStyle -> IO () +foreign import ccall unsafe "HsXlib.h XSetPlaneMask" + setPlaneMask :: Display -> GC -> Pixel -> IO () +foreign import ccall unsafe "HsXlib.h XSetState" + setState :: Display -> GC -> Pixel -> Pixel -> + GXFunction -> Pixel -> IO () +foreign import ccall unsafe "HsXlib.h XSetStipple" + setStipple :: Display -> GC -> Pixmap -> IO () +foreign import ccall unsafe "HsXlib.h XSetSubwindowMode" + setSubwindowMode :: Display -> GC -> SubWindowMode -> IO () +foreign import ccall unsafe "HsXlib.h XSetTSOrigin" + setTSOrigin :: Display -> GC -> Position -> Position -> IO () +foreign import ccall unsafe "HsXlib.h XSetTile" + setTile :: Display -> GC -> Pixmap -> IO () + +-- ToDo: create a real interface to this +createGC :: Display -> Drawable -> IO GC +createGC display d = xCreateGC display d 0 nullPtr +foreign import ccall unsafe "HsXlib.h XCreateGC" + xCreateGC :: Display -> Drawable -> ValueMask -> Ptr XGCValues -> IO GC + +type ValueMask = Word32 + +-- OLD: +-- %synonym : GCValueSet : Ptr +-- in rtsDummy +-- +-- {% +-- typedef unsigned long GCMask; /* cf XtGCMask */ +-- typedef struct _gcvalues { +-- GCMask mask; +-- XGCValues values; +-- }* GCValueSet; +-- %} +-- +-- IMPURE GCValueSet emptyGCValueSet() +-- RESULT: (RETVAL = (GCValueSet) malloc(sizeof(struct _gcvalues))) ? RETVAL->mask = 0, RETVAL : RETVAL; +-- POST: RETVAL != NULL +-- +-- IMPURE void setGCForeground(colour, set) +-- IN Pixel colour +-- IN GCValueSet set +-- RESULT: set->mask |= GCForeground; set->values.foreground = colour +-- +-- IMPURE void setGCBackground(colour, set) +-- IN Pixel colour +-- IN GCValueSet set +-- RESULT: set->mask |= GCBackground; set->values.background = colour +-- +-- IMPURE void freeGCValueSet(set) +-- IN GCValueSet set +-- RESULT: free(set) +-- +-- IMPURE GC XCreateGC(display, d, set->mask, &(set->values)) +-- NAME: xCreateGC +-- IN Display* display +-- IN Drawable d +-- IN GCValueSet set +-- +-- IMPURE void XChangeGC(display, gc, set->mask, &(set->values)) +-- NAME: xChangeGC +-- IN Display* display +-- IN GC gc +-- IN GCValueSet set +-- +-- STARTH +-- -- Code that packages GCValueSets up in a clean monoidic way. +-- +-- data GCSetter = GCSetter (GCValueSet -> IO ()) -- should be newtype +-- +-- createGC :: Display -> Drawable -> GCSetter -> IO GC +-- createGC display d (GCSetter setter) = +-- emptyGCValueSet >>= \ set -> +-- setter set >> +-- xCreateGC display d set >>= \ gc -> +-- freeGCValueSet set >> +-- return gc +-- +-- changeGC :: Display -> Drawable -> GC -> GCSetter -> IO () +-- changeGC display d gc (GCSetter setter) = +-- emptyGCValueSet >>= \ set -> +-- setter set >> +-- xChangeGC display d set >>= \ gc -> +-- freeGCValueSet set +-- +-- instance Monoid GCSetter where +-- (GCSetter m) >>> (GCSetter k) +-- = GCSetter (\ settings -> m settings >> k settings) +-- unit = GCSetter (\ _ -> return ()) +-- +-- set_Background :: Pixel -> GCSetter +-- set_Background c = GCSetter (setGCBackground c) +-- +-- set_Foreground :: Pixel -> GCSetter +-- set_Foreground c = GCSetter (setGCForeground c) +-- ENDH + +foreign import ccall unsafe "HsXlib.h XGContextFromGC" + gContextFromGC :: GC -> GContext + +foreign import ccall unsafe "HsXlib.h XFreeGC" + freeGC :: Display -> GC -> IO () +foreign import ccall unsafe "HsXlib.h XFlushGC" + flushGC :: Display -> GC -> IO () + +foreign import ccall unsafe "HsXlib.h XCopyGC" + copyGC :: Display -> GC -> Mask -> GC -> IO () + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Display.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Display --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of GreenCard declarations for interfacing with Xlib Displays. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Display( - - allPlanes_aux, - blackPixel, - whitePixel, - connectionNumber, - defaultColormap, - defaultGC, - defaultDepth, - defaultScreen, - defaultScreenOfDisplay, - displayHeight, - displayHeightMM, - displayWidth, - displayWidthMM, - maxRequestSize, - displayMotionBufferSize, - resourceManagerString, - screenResourceString, - displayString, - imageByteOrder, - protocolRevision, - protocolVersion, - serverVendor, - screenCount, - defaultVisual, - displayCells, - displayPlanes, - screenOfDisplay, - defaultRootWindow, - rootWindow, - qLength, - noOp, - openDisplay, - closeDisplay, - - ) where - -import Foreign.GreenCard -import Graphics.X11.Types -import Graphics.X11.Xlib.Types - -%#include "HsXlib.h" - -%prefix X - ----------------------------------------------------------------- --- Display ----------------------------------------------------------------- - -%fun AllPlanes_aux :: Pixel -%fun BlackPixel :: Display -> ScreenNumber -> Pixel -%fun WhitePixel :: Display -> ScreenNumber -> Pixel - --- This may vary from one execution to another but I believe it --- is constant during any given execution and so it can be made PURE --- without breaking referential transparency. --- --- Note: underneath the opaque name, it turns out that this --- is the file descriptor. You need to know this if you want to --- use select. -%fun ConnectionNumber :: Display -> Int - -%fun DefaultColormap :: Display -> ScreenNumber -> Colormap - --- %fun XListDepths :: Display -> ScreenNumber -> ListInt using res1 = XListDepths(arg1,arg2,&res1_size) - -%fun DefaultGC :: Display -> ScreenNumber -> GC -%fun DefaultDepth :: Display -> ScreenNumber -> Int -%fun DefaultScreen :: Display -> ScreenNumber -%fun DefaultScreenOfDisplay :: Display -> Screen -%fun DisplayHeight :: Display -> ScreenNumber -> Int -%fun DisplayHeightMM :: Display -> ScreenNumber -> Int -%fun DisplayWidth :: Display -> ScreenNumber -> Int -%fun DisplayWidthMM :: Display -> ScreenNumber -> Int -%fun XMaxRequestSize :: Display -> Int -%fun XDisplayMotionBufferSize:: Display -> Int ---Disnae exist in X11R5 %fun XExtendedMaxRequestSize :: Display -> Int -%fun XResourceManagerString :: Display -> String -%fun XScreenResourceString :: Screen -> String -%fun DisplayString :: Display -> String -%fun ImageByteOrder :: Display -> Int -%fun ProtocolRevision :: Display -> Int -%fun ProtocolVersion :: Display -> Int -%fun ServerVendor :: Display -> String ---Disnae exist: %fun XServerRelease :: Display -> Int -%fun ScreenCount :: Display -> Int -%fun DefaultVisual :: Display -> ScreenNumber -> Visual -%fun DisplayCells :: Display -> ScreenNumber -> Int -%fun DisplayPlanes :: Display -> ScreenNumber -> Int -%fun ScreenOfDisplay :: Display -> ScreenNumber -> Screen -%fun DefaultRootWindow :: Display -> Window - --- The following are believed to be order dependent - -%fun XRootWindow :: Display -> ScreenNumber -> IO Window -%fun XQLength :: Display -> IO Int - -%fun XNoOp :: Display -> IO () - -%fun XOpenDisplay :: String -> IO Display -%fail {res1 == 0} { NullPtr(XOpenDisplay) } - -%fun XCloseDisplay :: Display -> IO () - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Display.gc hunk ./Graphics/X11/Xlib/Display.hs 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Display +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of FFI declarations for interfacing with Xlib Displays. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Display( + + allPlanes_aux, + blackPixel, + whitePixel, + connectionNumber, + defaultColormap, + defaultGC, + defaultDepth, + defaultScreen, + defaultScreenOfDisplay, + displayHeight, + displayHeightMM, + displayWidth, + displayWidthMM, + maxRequestSize, + displayMotionBufferSize, + resourceManagerString, + screenResourceString, + displayString, + imageByteOrder, + protocolRevision, + protocolVersion, + serverVendor, + screenCount, + defaultVisual, + displayCells, + displayPlanes, + screenOfDisplay, + defaultRootWindow, + rootWindow, + qLength, + noOp, + openDisplay, + closeDisplay, + + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +import Foreign +import Foreign.C + +---------------------------------------------------------------- +-- Display +---------------------------------------------------------------- + +foreign import ccall unsafe "HsXlib.h XAllPlanes" + allPlanes_aux :: Pixel +foreign import ccall unsafe "HsXlib.h XBlackPixel" + blackPixel :: Display -> ScreenNumber -> Pixel +foreign import ccall unsafe "HsXlib.h XWhitePixel" + whitePixel :: Display -> ScreenNumber -> Pixel + +-- This may vary from one execution to another but I believe it +-- is constant during any given execution and so it can be made PURE +-- without breaking referential transparency. +-- +-- Note: underneath the opaque name, it turns out that this +-- is the file descriptor. You need to know this if you want to +-- use select. +foreign import ccall unsafe "HsXlib.h XConnectionNumber" + connectionNumber :: Display -> Int + +foreign import ccall unsafe "HsXlib.h XDefaultColormap" + defaultColormap :: Display -> ScreenNumber -> Colormap + +-- XListDepths :: Display -> ScreenNumber -> ListInt using res1 = XListDepths(arg1,arg2,&res1_size) + +foreign import ccall unsafe "HsXlib.h XDefaultGC" + defaultGC :: Display -> ScreenNumber -> GC +foreign import ccall unsafe "HsXlib.h XDefaultDepth" + defaultDepth :: Display -> ScreenNumber -> Int +foreign import ccall unsafe "HsXlib.h XDefaultScreen" + defaultScreen :: Display -> ScreenNumber +foreign import ccall unsafe "HsXlib.h XDefaultScreenOfDisplay" + defaultScreenOfDisplay :: Display -> Screen +foreign import ccall unsafe "HsXlib.h XDisplayHeight" + displayHeight :: Display -> ScreenNumber -> Int +foreign import ccall unsafe "HsXlib.h XDisplayHeightMM" + displayHeightMM :: Display -> ScreenNumber -> Int +foreign import ccall unsafe "HsXlib.h XDisplayWidth" + displayWidth :: Display -> ScreenNumber -> Int +foreign import ccall unsafe "HsXlib.h XDisplayWidthMM" + displayWidthMM :: Display -> ScreenNumber -> Int +foreign import ccall unsafe "HsXlib.h XMaxRequestSize" + maxRequestSize :: Display -> Int +foreign import ccall unsafe "HsXlib.h XDisplayMotionBufferSize" + displayMotionBufferSize :: Display -> Int +--Disnae exist in X11R5 XExtendedMaxRequestSize :: Display -> Int + +resourceManagerString :: Display -> String +resourceManagerString display = xlibCString (xResourceManagerString display) +foreign import ccall unsafe "HsXlib.h XResourceManagerString" + xResourceManagerString :: Display -> IO CString + +screenResourceString :: Screen -> String +screenResourceString screen = xlibCString (xScreenResourceString screen) +foreign import ccall unsafe "HsXlib.h XScreenResourceString" + xScreenResourceString :: Screen -> IO CString + +displayString :: Display -> String +displayString display = xlibCString (xDisplayString display) +foreign import ccall unsafe "HsXlib.h DisplayString" + xDisplayString :: Display -> IO CString + +foreign import ccall unsafe "HsXlib.h ImageByteOrder" + imageByteOrder :: Display -> Int +foreign import ccall unsafe "HsXlib.h ProtocolRevision" + protocolRevision :: Display -> Int +foreign import ccall unsafe "HsXlib.h ProtocolVersion" + protocolVersion :: Display -> Int + +serverVendor :: Display -> String +serverVendor display = xlibCString (xServerVendor display) +foreign import ccall unsafe "HsXlib.h ServerVendor" + xServerVendor :: Display -> IO CString + +--Disnae exist: XServerRelease :: Display -> Int +foreign import ccall unsafe "HsXlib.h ScreenCount" + screenCount :: Display -> Int +foreign import ccall unsafe "HsXlib.h DefaultVisual" + defaultVisual :: Display -> ScreenNumber -> Visual +foreign import ccall unsafe "HsXlib.h DisplayCells" + displayCells :: Display -> ScreenNumber -> Int +foreign import ccall unsafe "HsXlib.h DisplayPlanes" + displayPlanes :: Display -> ScreenNumber -> Int +foreign import ccall unsafe "HsXlib.h ScreenOfDisplay" + screenOfDisplay :: Display -> ScreenNumber -> Screen +foreign import ccall unsafe "HsXlib.h DefaultRootWindow" + defaultRootWindow :: Display -> Window + +-- The following are believed to be order dependent + +foreign import ccall unsafe "HsXlib.h XRootWindow" + rootWindow :: Display -> ScreenNumber -> IO Window +foreign import ccall unsafe "HsXlib.h XQLength" + qLength :: Display -> IO Int + +foreign import ccall unsafe "HsXlib.h XNoOp" + noOp :: Display -> IO () + +openDisplay :: String -> IO Display +openDisplay name = + withCString name $ \ c_name -> do + display <- throwIfNull "openDisplay" (xOpenDisplay c_name) + return (Display display) +foreign import ccall unsafe "HsXlib.h XOpenDisplay" + xOpenDisplay :: CString -> IO (Ptr Display) + +foreign import ccall unsafe "HsXlib.h XCloseDisplay" + closeDisplay :: Display -> IO () + +-- convert a CString owned by Xlib to a Haskell String +xlibCString :: IO CString -> String +xlibCString act = unsafePerformIO $ do + cs <- act + peekCString cs + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Event.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Event --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of GreenCard declarations for interfacing with Xlib Events. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Event( - QueuedMode, - queuedAlready, - queuedAfterFlush, - queuedAfterReading, - XEvent, - XEventPtr, - allocXEvent, - get_EventType, - get_Window, - XKeyEvent, - XKeyEventPtr, - asKeyEvent, - XButtonEvent, - get_KeyEvent, - get_ButtonEvent, - get_MotionEvent, - XMotionEvent, - XExposeEvent, - get_ExposeEvent, - XMappingEvent, - XConfigureEvent, - get_ConfigureEvent, - waitForEvent, - gettimeofday_in_milliseconds, - gettimeofday_in_milliseconds_internal, - flush, - sync, - pending, - eventsQueued, - nextEvent, - allowEvents, - selectInput, - sendEvent, - windowEvent, - checkWindowEvent, - maskEvent, - checkMaskEvent, - checkTypedEvent, - checkTypedWindowEvent, - putBackEvent, - peekEvent, - refreshKeyboardMapping, - - ) where - -import Foreign.GreenCard -import Graphics.X11.Types -import Graphics.X11.Xlib.Types - -import Foreign( castPtr ) - -%#include "HsXlib.h" - -%prefix X - ----------------------------------------------------------------- --- Events ----------------------------------------------------------------- - -type QueuedMode = Int -%dis queuedMode x = int x -%const QueuedMode -% [ QueuedAlready -% , QueuedAfterFlush -% , QueuedAfterReading -% ] - --- Because of the way the corresponding C types are defined, --- These "structs" are somewhat unusual - they omit fields which can --- be found in more general structs. --- For example, XAnyEvent omits type since it is in XEvent. --- Therefore, to get the complete contents of an event one typically --- writes: --- do --- ty <- get_XEvent e --- (serial,send_event,display,window) <- get_XAnyEvent --- window' <- get_XDestroyWindowEvent - -type XEvent = - ( EventType - ) -%dis xEvent x = declare {XEvent} x in -% ( eventType {(%x).type} -% ) -type XEventPtr = Ptr Stub_EventPtr -data Stub_EventPtr -%dis xEventPtr x = ptr ({XEvent*} x) - -%fun allocXEvent :: IO XEventPtr -%code res1 = (void*)malloc(sizeof(XEvent)) - -%fun get_EventType :: XEventPtr -> IO EventType -%code res1 = arg1->type - -%fun get_Window :: XEventPtr -> IO Window -%code res1 = ((XAnyEvent*)arg1)->window - --- %struct : XAnyEvent : XAnyEvent arg1 --- Int32 : serial # # of last request processed by server --- Bool : send_event # true if this came from a SendEvent request --- Display : display # Display the event was read from --- Window : window # window on which event was requested in event mask - -type XKeyEvent = - ( Window -- root window that the event occured on - , Window -- child window - , Time -- milliseconds - , Int -- pointer x, y coordinates in event window - , Int -- - , Int -- coordinates relative to root - , Int -- - , Modifier -- key or button mask - , KeyCode -- detail - , Bool -- same screen flag - ) -%dis xKeyEvent x = declare {XKeyEvent} x in -% ( window {(%x).root} -% , window {(%x).subwindow} -% , time {(%x).time} -% , int {(%x).x} -% , int {(%x).y} -% , int {(%x).x_root} -% , int {(%x).y_root} -% , modifier {(%x).state} -% , keyCode {(%x).keycode} -% , bool {(%x).same_screen} -% ) -type XKeyEventPtr = Ptr Stub_KeyEventPtr -data Stub_KeyEventPtr -%dis xKeyEventPtr x = ptr ({XKeyEvent*} x) - -asKeyEvent :: XEventPtr -> XKeyEventPtr -asKeyEvent = castPtr - -type XButtonEvent = - ( Window -- root window that the event occured on - , Window -- child window - , Time -- milliseconds - , Int -- pointer x, y coordinates in event window - , Int - , Int -- coordinates relative to root - , Int - , Modifier -- key or button mask - , Button -- detail - , Bool -- same screen flag - ) -%dis xButtonEvent x = declare {XButtonEvent} x in -% ( window {(%x).root} -% , window {(%x).subwindow} -% , time {(%x).time} -% , int {(%x).x} -% , int {(%x).y} -% , int {(%x).x_root} -% , int {(%x).y_root} -% , modifier {(%x).state} -% , button {(%x).button} -% , bool {(%x).same_screen} -% ) - -%fun get_KeyEvent :: XEventPtr -> IO XKeyEvent -%code -%result (xKeyEvent {*(XKeyEvent*)arg1}) - -%fun get_ButtonEvent :: XEventPtr -> IO XButtonEvent -%code -%result (xButtonEvent {*(XButtonEvent*)arg1}) - -%fun get_MotionEvent :: XEventPtr -> IO XMotionEvent -%code -%result (xMotionEvent {*(XMotionEvent*)arg1}) - - -type XMotionEvent = - ( Window -- root window that the event occured on - , Window -- child window - , Time -- milliseconds - , Int -- pointer x, y coordinates in event window - , Int - , Int -- coordinates relative to root - , Int - , Modifier -- key or button mask - , NotifyMode -- detail - , Bool -- same screen flag - ) -%dis xMotionEvent x = declare {XMotionEvent} x in -% ( window {(%x).root} -% , window {(%x).subwindow} -% , time {(%x).time} -% , int {(%x).x} -% , int {(%x).y} -% , int {(%x).x_root} -% , int {(%x).y_root} -% , modifier {(%x).state} -% , notifyMode {(%x).is_hint} -% , bool {(%x).same_screen} -% ) - - --- %struct : XCrossingEvent : XCrossingEvent arg1 --- Window : root # root window that the event occured on --- Window : subwindow # child window --- Time : time # milliseconds --- Int : x # pointer x, y coordinates in event window --- Int : y --- Int : x_root # coordinates relative to root --- Int : y_root --- NotifyMode : mode --- NotifyDetail : detail --- Bool : same_screen # same screen flag --- Bool : focus # boolean focus --- Modifier : state # key or button mask --- --- %struct : XFocusChangeEvent : XFocusChangeEvent arg1 --- NotifyMode : mode --- NotifyDetail : detail --- --- -- omitted: should be translated into bitmaps --- -- PURE void getKeymapEvent(event) --- -- IN XEvent* event --- -- OUT Window window = ((XKeymapEvent*)event)->window --- -- OUT array[32] Char key_vector = ((XKeymapEvent*)event)->key_vector --- -- RESULT: - -type XExposeEvent = - ( Position -- x - , Position -- y - , Dimension -- width - , Dimension -- height - , Int -- count - ) -%dis xExposeEvent x = declare {XExposeEvent} x in -% ( position {(%x).x} -% , position {(%x).y} -% , dimension {(%x).width} -% , dimension {(%x).height} -% , int {(%x).count} -% ) - -%fun get_ExposeEvent :: XEventPtr -> IO XExposeEvent -%code -%result (xExposeEvent {*(XExposeEvent*)arg1}) - --- %struct : XGraphicsExposeEvent : XGraphicsExposeEvent arg1 --- Position : x --- Position : y --- Dimension : width . --- Dimension : height --- Int : count --- Int : major_code --- Int : minor_code --- --- %struct : XCirculateEvent : XCirculateEvent arg1 --- Window : window --- Place : place --- --- %struct : XConfigureEvent : XConfigureEvent arg1 --- Window : window --- Position : x --- Position : y --- Dimension : width --- Dimension : height --- Dimension : border_width --- Window : above --- Bool : override_redirect --- --- %struct : XCreateWindowEvent : XCreateWindowEvent arg1 --- Window : window --- Position : x --- Position : y --- Dimension : width --- Dimension : height --- Dimension : border_width --- Bool : override_redirect --- --- %struct : XDestroyWindowEvent : XDestroyWindowEvent arg1 --- Window : window --- --- %struct : XGravityEvent : XGravityEvent arg1 --- Window : window --- Position : x --- Position : y --- --- %struct : XMapEvent : XMapEvent arg1 --- Bool : override_redirect - -type XMappingEvent = - ( MappingRequest -- request - , KeyCode -- first_keycode - , Int -- count - ) -%dis xMappingEvent x = declare {XMappingEvent} x in -% ( mappingRequest {(%x).request} -% , keyCode {(%x).first_keycode} -% , int {(%x).count} -% ) - -type XConfigureEvent = - ( Position - , Position - , Dimension - , Dimension - ) -%dis xConfigureEvent x = -% ( position {(%x).x} -% , position {(%x).y} -% , dimension {(%x).width} -% , dimension {(%x).height} -% ) -%fun get_ConfigureEvent :: XEventPtr -> IO XConfigureEvent -%code -%result (xConfigureEvent {*(XConfigureEvent*)arg1}) - - --- %struct : XResizeRequestEvent : XResizeRequestEvent arg1 --- Dimension : width --- Dimension : height --- - --- %struct : XReparentEvent : XReparentEvent arg1 --- Window : window --- Window : parent --- Position : x --- Position : y --- Bool : override_redirect --- --- %struct : XUnmapEvent : XUnmapEvent arg1 --- Window : window --- Bool : from_configure --- --- %struct : XVisibilityEvent : XVisibilityEvent arg1 --- Visibility : state --- --- %struct : XCirculateRequestEvent : XCirculateRequestEvent arg1 --- Place : place --- --- -- omitted because valuemask looks tricky --- -- %struct : XConfigureRequestEvent : XConfigureRequestEvent arg1 --- -- Window : window --- -- Position : x --- -- Position : y --- -- Dimension : width --- -- Dimension : height --- -- Dimension : border_width --- -- Window : above --- -- StackingMethod : detail --- -- ??? : valuemask --- --- %struct : XMapRequestEvent : XMapRequestEvent arg1 --- Window : window --- --- %struct : XColormapEvent : XColormapEvent arg1 --- Colormap : colormap --- Bool : new --- ColormapNotification : state --- --- -- getClientMessageEvent omitted --- -- getPropertyEvent omitted --- -- getSelectionClearEvent omitted --- -- getSelectionRequestEvent omitted --- -- getSelectionEvent omitted - --- functions - --- The following is useful if you want to do a read with timeout. --- Returns True if timeout occurs. -%fun waitForEvent :: Display -> Word32 -> IO Bool -%code -% struct timeval timeout; -% fd_set readfds; -% fd_set nofds; -% int fd = ConnectionNumber(arg1); -% int n; -% FD_ZERO(&readfds); -% FD_ZERO(&nofds); -% FD_SET(fd,&readfds); -% timeout.tv_sec = arg2 / 1000000; -% timeout.tv_usec = arg2 % 1000000; -% /* HN 2001-02-06: Select needs to be told highest fd _+_ 1. */ -% n = select(fd+1,&readfds,&nofds,&nofds,&timeout); -%result (bool {n == 0}) - --- The following is somewhat compatible with Win32's TimeGetTime -gettimeofday_in_milliseconds :: IO Integer -gettimeofday_in_milliseconds = do - (sec,usec) <- gettimeofday_in_milliseconds_internal - return (toInteger sec * 1000 + toInteger usec `div` 1000) - -%fun gettimeofday_in_milliseconds_internal :: IO (Word32,Word32) -%code -% struct timeval tv; -% int rc = gettimeofday(&tv,0); -% res1 = tv.tv_sec; -% res2 = tv.tv_usec; - -%fun XFlush :: Display -> IO () -%fun XSync :: Display -> Bool -> IO () -%fun XPending :: Display -> IO Int -%fun XEventsQueued :: Display -> QueuedMode -> IO Int -%fun XNextEvent :: Display -> XEventPtr -> IO () -%fun XAllowEvents :: Display -> AllowEvents -> Time -> IO () - --- ToDo: XFree(res1) after constructing result --- %fun XGetMotionEvents :: Display -> Window -> Time -> Time -> IO ListXTimeCoord --- %code res1 = XGetMotionEvents(arg1,arg2,arg3,arg4,&res1_size) - -%fun XSelectInput :: Display -> Window -> EventMask -> IO () -%fun XSendEvent :: Display -> Window -> Bool -> EventMask -> XEventPtr -> IO () -%code Status err = XSendEvent(arg1,arg2,arg3,arg4,arg5) -%fail { Success != err }{ BadStatus(err,XSendEvent) } - -%fun XWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO () -%fun XCheckWindowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO Bool - -%fun XMaskEvent :: Display -> EventMask -> XEventPtr -> IO () -%fun XCheckMaskEvent :: Display -> EventMask -> XEventPtr -> IO Bool -%fun XCheckTypedEvent :: Display -> EventType -> XEventPtr -> IO Bool -%fun XCheckTypedWindowEvent :: Display -> Window -> EventType -> XEventPtr -> IO Bool -%fun XPutBackEvent :: Display -> XEventPtr -> IO () -%fun XPeekEvent :: Display -> XEventPtr -> IO () - --- XFilterEvent omitted (can't find documentation) --- XIfEvent omitted (can't pass predicates (yet)) --- XCheckIfEvent omitted (can't pass predicates (yet)) --- XPeekIfEvent omitted (can't pass predicates (yet)) - -%fun XRefreshKeyboardMapping :: XMappingEvent -> IO () -%code XRefreshKeyboardMapping(&arg1) - --- XSynchronize omitted (returns C function) --- XSetAfterFunction omitted (can't pass functions (yet)) - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Event.gc hunk ./Graphics/X11/Xlib/Event.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Event +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of FFI declarations for interfacing with Xlib Events. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Event( + QueuedMode, + queuedAlready, + queuedAfterFlush, + queuedAfterReading, + XEvent, + XEventPtr, + allocXEvent, + get_EventType, + get_Window, + XKeyEvent, + XKeyEventPtr, + asKeyEvent, + XButtonEvent, + get_KeyEvent, + get_ButtonEvent, + get_MotionEvent, + XMotionEvent, + XExposeEvent, + get_ExposeEvent, + XMappingEvent, + XConfigureEvent, + get_ConfigureEvent, + waitForEvent, + gettimeofday_in_milliseconds, + -- gettimeofday_in_milliseconds_internal, + flush, + sync, + pending, + eventsQueued, + nextEvent, + allowEvents, + selectInput, + sendEvent, + windowEvent, + checkWindowEvent, + maskEvent, + checkMaskEvent, + checkTypedEvent, + checkTypedWindowEvent, + putBackEvent, + peekEvent, + refreshKeyboardMapping, + + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types +import Graphics.X11.Xlib.Display( connectionNumber ) + +import Foreign + +#include "HsXlib.h" + +{-# CBITS fdset.c #-} + +---------------------------------------------------------------- +-- Events +---------------------------------------------------------------- + +type QueuedMode = Int +#{enum QueuedMode, + , queuedAlready = QueuedAlready + , queuedAfterFlush = QueuedAfterFlush + , queuedAfterReading = QueuedAfterReading + } + +-- Because of the way the corresponding C types are defined, +-- These "structs" are somewhat unusual - they omit fields which can +-- be found in more general structs. +-- For example, XAnyEvent omits type since it is in XEvent. +-- Therefore, to get the complete contents of an event one typically +-- writes: +-- do +-- ty <- get_XEvent e +-- (serial,send_event,display,window) <- get_XAnyEvent +-- window' <- get_XDestroyWindowEvent + +newtype XEvent = XEvent XEventPtr +type XEventPtr = Ptr XEvent + +allocXEvent :: IO XEventPtr +allocXEvent = mallocBytes #{size XEvent} + +get_EventType :: XEventPtr -> IO EventType +get_EventType = #{peek XEvent,type} + +get_Window :: XEventPtr -> IO Window +get_Window = #{peek XAnyEvent,window} + +-- %struct : XAnyEvent : XAnyEvent arg1 +-- Int32 : serial # # of last request processed by server +-- Bool : send_event # true if this came from a SendEvent request +-- Display : display # Display the event was read from +-- Window : window # window on which event was requested in event mask + +type XKeyEvent = + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , Int -- pointer x, y coordinates in event window + , Int -- + , Int -- coordinates relative to root + , Int -- + , Modifier -- key or button mask + , KeyCode -- detail + , Bool -- same screen flag + ) + +peekXKeyEvent :: Ptr XKeyEvent -> IO XKeyEvent +peekXKeyEvent p = do + root <- #{peek XKeyEvent,root} p + subwindow <- #{peek XKeyEvent,subwindow} p + time <- #{peek XKeyEvent,time} p + x <- #{peek XKeyEvent,x} p + y <- #{peek XKeyEvent,y} p + x_root <- #{peek XKeyEvent,x_root} p + y_root <- #{peek XKeyEvent,y_root} p + state <- #{peek XKeyEvent,state} p + keycode <- #{peek XKeyEvent,keycode} p + same_screen <- #{peek XKeyEvent,same_screen} p + return (root, subwindow, time, x, y, x_root, y_root, + state, keycode, same_screen) + +get_KeyEvent :: XEventPtr -> IO XKeyEvent +get_KeyEvent p = peekXKeyEvent (castPtr p) + +type XKeyEventPtr = Ptr XKeyEvent + +asKeyEvent :: XEventPtr -> XKeyEventPtr +asKeyEvent = castPtr + +type XButtonEvent = + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , Int -- pointer x, y coordinates in event window + , Int + , Int -- coordinates relative to root + , Int + , Modifier -- key or button mask + , Button -- detail + , Bool -- same screen flag + ) + +peekXButtonEvent :: Ptr XButtonEvent -> IO XButtonEvent +peekXButtonEvent p = do + root <- #{peek XButtonEvent,root} p + subwindow <- #{peek XButtonEvent,subwindow} p + time <- #{peek XButtonEvent,time} p + x <- #{peek XButtonEvent,x} p + y <- #{peek XButtonEvent,y} p + x_root <- #{peek XButtonEvent,x_root} p + y_root <- #{peek XButtonEvent,y_root} p + state <- #{peek XButtonEvent,state} p + button <- #{peek XButtonEvent,button} p + same_screen <- #{peek XButtonEvent,same_screen} p + return (root, subwindow, time, x, y, x_root, y_root, + state, button, same_screen) + +get_ButtonEvent :: XEventPtr -> IO XButtonEvent +get_ButtonEvent p = peekXButtonEvent (castPtr p) + + +type XMotionEvent = + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , Int -- pointer x, y coordinates in event window + , Int + , Int -- coordinates relative to root + , Int + , Modifier -- key or button mask + , NotifyMode -- detail + , Bool -- same screen flag + ) + +peekXMotionEvent :: Ptr XMotionEvent -> IO XMotionEvent +peekXMotionEvent p = do + root <- #{peek XMotionEvent,root} p + subwindow <- #{peek XMotionEvent,subwindow} p + time <- #{peek XMotionEvent,time} p + x <- #{peek XMotionEvent,x} p + y <- #{peek XMotionEvent,y} p + x_root <- #{peek XMotionEvent,x_root} p + y_root <- #{peek XMotionEvent,y_root} p + state <- #{peek XMotionEvent,state} p + is_hint <- #{peek XMotionEvent,is_hint} p + same_screen <- #{peek XMotionEvent,same_screen} p + return (root, subwindow, time, x, y, x_root, y_root, + state, is_hint, same_screen) + +get_MotionEvent :: XEventPtr -> IO XMotionEvent +get_MotionEvent p = peekXMotionEvent (castPtr p) + +-- %struct : XCrossingEvent : XCrossingEvent arg1 +-- Window : root # root window that the event occured on +-- Window : subwindow # child window +-- Time : time # milliseconds +-- Int : x # pointer x, y coordinates in event window +-- Int : y +-- Int : x_root # coordinates relative to root +-- Int : y_root +-- NotifyMode : mode +-- NotifyDetail : detail +-- Bool : same_screen # same screen flag +-- Bool : focus # boolean focus +-- Modifier : state # key or button mask +-- +-- %struct : XFocusChangeEvent : XFocusChangeEvent arg1 +-- NotifyMode : mode +-- NotifyDetail : detail +-- +-- -- omitted: should be translated into bitmaps +-- -- PURE void getKeymapEvent(event) +-- -- IN XEvent* event +-- -- OUT Window window = ((XKeymapEvent*)event)->window +-- -- OUT array[32] Char key_vector = ((XKeymapEvent*)event)->key_vector +-- -- RESULT: + +type XExposeEvent = + ( Position -- x + , Position -- y + , Dimension -- width + , Dimension -- height + , Int -- count + ) + +peekXExposeEvent :: Ptr XExposeEvent -> IO XExposeEvent +peekXExposeEvent p = do + x <- #{peek XExposeEvent,x} p + y <- #{peek XExposeEvent,y} p + width <- #{peek XExposeEvent,width} p + height <- #{peek XExposeEvent,height} p + count <- #{peek XExposeEvent,count} p + return (x, y, width, height, count) + +get_ExposeEvent :: XEventPtr -> IO XExposeEvent +get_ExposeEvent p = peekXExposeEvent (castPtr p) + +-- %struct : XGraphicsExposeEvent : XGraphicsExposeEvent arg1 +-- Position : x +-- Position : y +-- Dimension : width . +-- Dimension : height +-- Int : count +-- Int : major_code +-- Int : minor_code +-- +-- %struct : XCirculateEvent : XCirculateEvent arg1 +-- Window : window +-- Place : place +-- +-- %struct : XConfigureEvent : XConfigureEvent arg1 +-- Window : window +-- Position : x +-- Position : y +-- Dimension : width +-- Dimension : height +-- Dimension : border_width +-- Window : above +-- Bool : override_redirect +-- +-- %struct : XCreateWindowEvent : XCreateWindowEvent arg1 +-- Window : window +-- Position : x +-- Position : y +-- Dimension : width +-- Dimension : height +-- Dimension : border_width +-- Bool : override_redirect +-- +-- %struct : XDestroyWindowEvent : XDestroyWindowEvent arg1 +-- Window : window +-- +-- %struct : XGravityEvent : XGravityEvent arg1 +-- Window : window +-- Position : x +-- Position : y +-- +-- %struct : XMapEvent : XMapEvent arg1 +-- Bool : override_redirect + +type XMappingEvent = + ( MappingRequest -- request + , KeyCode -- first_keycode + , Int -- count + ) + +withXMappingEvent :: XMappingEvent -> (Ptr XMappingEvent -> IO a) -> IO a +withXMappingEvent event_map f = + allocaBytes #{size XMappingEvent} $ \ event_map_ptr -> do + pokeXMappingEvent event_map_ptr event_map + f event_map_ptr + +pokeXMappingEvent :: Ptr XMappingEvent -> XMappingEvent -> IO () +pokeXMappingEvent p (request, first_keycode, count) = do + #{poke XMappingEvent,request} p request + #{poke XMappingEvent,first_keycode} p first_keycode + #{poke XMappingEvent,count} p count + +type XConfigureEvent = + ( Position + , Position + , Dimension + , Dimension + ) + +peekXConfigureEvent :: Ptr XConfigureEvent -> IO XConfigureEvent +peekXConfigureEvent p = do + x <- #{peek XConfigureEvent,x} p + y <- #{peek XConfigureEvent,y} p + width <- #{peek XConfigureEvent,width} p + height <- #{peek XConfigureEvent,height} p + return (x, y, width, height) + +get_ConfigureEvent :: XEventPtr -> IO XConfigureEvent +get_ConfigureEvent p = peekXConfigureEvent (castPtr p) + + +-- %struct : XResizeRequestEvent : XResizeRequestEvent arg1 +-- Dimension : width +-- Dimension : height +-- + +-- %struct : XReparentEvent : XReparentEvent arg1 +-- Window : window +-- Window : parent +-- Position : x +-- Position : y +-- Bool : override_redirect +-- +-- %struct : XUnmapEvent : XUnmapEvent arg1 +-- Window : window +-- Bool : from_configure +-- +-- %struct : XVisibilityEvent : XVisibilityEvent arg1 +-- Visibility : state +-- +-- %struct : XCirculateRequestEvent : XCirculateRequestEvent arg1 +-- Place : place +-- +-- -- omitted because valuemask looks tricky +-- -- %struct : XConfigureRequestEvent : XConfigureRequestEvent arg1 +-- -- Window : window +-- -- Position : x +-- -- Position : y +-- -- Dimension : width +-- -- Dimension : height +-- -- Dimension : border_width +-- -- Window : above +-- -- StackingMethod : detail +-- -- ??? : valuemask +-- +-- %struct : XMapRequestEvent : XMapRequestEvent arg1 +-- Window : window +-- +-- %struct : XColormapEvent : XColormapEvent arg1 +-- Colormap : colormap +-- Bool : new +-- ColormapNotification : state +-- +-- -- getClientMessageEvent omitted +-- -- getPropertyEvent omitted +-- -- getSelectionClearEvent omitted +-- -- getSelectionRequestEvent omitted +-- -- getSelectionEvent omitted + +-- functions + +-- The following is useful if you want to do a read with timeout. +-- Returns True if timeout occurs. +waitForEvent :: Display -> Word32 -> IO Bool +waitForEvent display usecs = + with (TimeVal (usecs `div` 1000000) (usecs `mod` 1000000)) $ \ tv_ptr -> + allocaBytes #{size fd_set} $ \ readfds -> + allocaBytes #{size fd_set} $ \ nofds -> do + let fd = connectionNumber display + fdZero readfds + fdZero nofds + fdSet fd readfds + n <- select (fd+1) readfds nofds nofds tv_ptr + return (n == 0) + +newtype FdSet = FdSet (Ptr FdSet) + +foreign import ccall unsafe "HsXlib.h" fdZero :: Ptr FdSet -> IO () +foreign import ccall unsafe "HsXlib.h" fdSet :: Int -> Ptr FdSet -> IO () + +foreign import ccall unsafe "HsXlib.h" select :: + Int -> Ptr FdSet -> Ptr FdSet -> Ptr FdSet -> Ptr TimeVal -> IO Int + +-- The following is somewhat compatible with Win32's TimeGetTime +gettimeofday_in_milliseconds :: IO Integer +gettimeofday_in_milliseconds = + alloca $ \ tv_ptr -> do + rc <- gettimeofday tv_ptr nullPtr + TimeVal sec usec <- peek tv_ptr + return (toInteger sec * 1000 + toInteger usec `div` 1000) + +data TimeVal = TimeVal Word32 Word32 + +instance Storable TimeVal where + alignment _ = #{size int} + sizeOf _ = #{size struct timeval} + peek p = do + sec <- #{peek struct timeval,tv_sec} p + usec <- #{peek struct timeval,tv_usec} p + return (TimeVal sec usec) + poke p (TimeVal sec usec) = do + #{poke struct timeval,tv_sec} p sec + #{poke struct timeval,tv_usec} p usec + +newtype TimeZone = TimeZone (Ptr TimeZone) + +foreign import ccall unsafe "HsXlib.h" + gettimeofday :: Ptr TimeVal -> Ptr TimeZone -> IO () + +foreign import ccall unsafe "HsXlib.h XFlush" + flush :: Display -> IO () +foreign import ccall unsafe "HsXlib.h XSync" + sync :: Display -> Bool -> IO () +foreign import ccall unsafe "HsXlib.h XPending" + pending :: Display -> IO Int +foreign import ccall unsafe "HsXlib.h XEventsQueued" + eventsQueued :: Display -> QueuedMode -> IO Int +foreign import ccall unsafe "HsXlib.h XNextEvent" + nextEvent :: Display -> XEventPtr -> IO () +foreign import ccall unsafe "HsXlib.h XAllowEvents" + allowEvents :: Display -> AllowEvents -> Time -> IO () + +-- ToDo: XFree(res1) after constructing result +-- %fun XGetMotionEvents :: Display -> Window -> Time -> Time -> IO ListXTimeCoord +-- %code res1 = XGetMotionEvents(arg1,arg2,arg3,arg4,&res1_size) + +foreign import ccall unsafe "HsXlib.h XSelectInput" + selectInput :: Display -> Window -> EventMask -> IO () + +sendEvent :: Display -> Window -> Bool -> EventMask -> XEventPtr -> IO () +sendEvent display w propagate event_mask event_send = + throwUnlessSuccess "sendEvent" $ + xSendEvent display w propagate event_mask event_send +foreign import ccall unsafe "HsXlib.h XSendEvent" + xSendEvent :: Display -> Window -> Bool -> EventMask -> + XEventPtr -> IO Status + +foreign import ccall unsafe "HsXlib.h XWindowEvent" + windowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO () +foreign import ccall unsafe "HsXlib.h XCheckWindowEvent" + checkWindowEvent :: Display -> Window -> EventMask -> + XEventPtr -> IO Bool + +foreign import ccall unsafe "HsXlib.h XMaskEvent" + maskEvent :: Display -> EventMask -> XEventPtr -> IO () +foreign import ccall unsafe "HsXlib.h XCheckMaskEvent" + checkMaskEvent :: Display -> EventMask -> XEventPtr -> IO Bool +foreign import ccall unsafe "HsXlib.h XCheckTypedEvent" + checkTypedEvent :: Display -> EventType -> XEventPtr -> IO Bool +foreign import ccall unsafe "HsXlib.h XCheckTypedWindowEvent" + checkTypedWindowEvent :: Display -> Window -> EventType -> + XEventPtr -> IO Bool +foreign import ccall unsafe "HsXlib.h XPutBackEvent" + putBackEvent :: Display -> XEventPtr -> IO () +foreign import ccall unsafe "HsXlib.h XPeekEvent" + peekEvent :: Display -> XEventPtr -> IO () + +-- XFilterEvent omitted (can't find documentation) +-- XIfEvent omitted (can't pass predicates (yet)) +-- XCheckIfEvent omitted (can't pass predicates (yet)) +-- XPeekIfEvent omitted (can't pass predicates (yet)) + +refreshKeyboardMapping :: XMappingEvent -> IO () +refreshKeyboardMapping event_map = + withXMappingEvent event_map $ \ event_map_ptr -> + xRefreshKeyboardMapping event_map_ptr +foreign import ccall unsafe "HsXlib.h XRefreshKeyboardMapping" + xRefreshKeyboardMapping :: Ptr XMappingEvent -> IO () + +-- XSynchronize omitted (returns C function) +-- XSetAfterFunction omitted (can't pass functions (yet)) + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Font.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Font --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of GreenCard declarations for interfacing with Xlib Fonts. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Font( - - Glyph, - queryFont, - fontFromGC, - loadQueryFont, - freeFont, - fontFromFontStruct, - ascentFromFontStruct, - descentFromFontStruct, - CharStruct, - textExtents, - textWidth, - - ) where - -import Foreign.GreenCard -import Graphics.X11.Types -import Graphics.X11.Xlib.Types - -%#include "HsXlib.h" - -%prefix X - ----------------------------------------------------------------- --- Fonts ----------------------------------------------------------------- - --- A glyph (or Char2b) is a 16 bit character identification. --- The top 8 bits are zero in many fonts. -type Glyph = Word16 -%dis glyph x = word16 x - --- Disnae exist: %fun LoadFont :: Display -> String -> IO Font --- Disnae exist: %fun UnloadFont :: Display -> Font -> IO () - --- Argument can be a Font or a GContext. --- But, if it's a GContext, the fontStruct will use the GContext as the --- FontID - which will cause most things to break so it's probably --- safer using XGetGCValues to get a genuine font ID -%fun XQueryFont :: Display -> Font -> IO FontStruct - --- Note that this _WILL NOT WORK_ unless you have explicitly set the font. --- I'm slowly but surely coming to the conclusion that Xlib is a pile of --- steaming shit. -%fun FontFromGC :: Display -> GC -> IO Font -%code -% XGCValues ret; -% Status err = XGetGCValues(arg1,arg2,GCFont,&ret); -%fail {Success != err} { BadStatus(rc,FontFromGC) } -%result (font {ret.font}) - -%fun XLoadQueryFont :: Display -> String -> IO FontStruct -%fail {res1==0} { NullPtr(XLoadQueryFont) } - -%fun XFreeFont :: Display -> FontStruct -> IO () --- %fun XSetFontPath :: Display -> ListString -> IO () using XSetFontPath(arg1,arg2,arg2_size) - -%fun fontFromFontStruct :: FontStruct -> Font -%code res1 = arg1->fid -%fun ascentFromFontStruct :: FontStruct -> Int32 -%code res1 = arg1->ascent -%fun descentFromFontStruct :: FontStruct -> Int32 -%code res1 = arg1->descent - --- %prim XGetFontPath :: Display -> IO ListString ---Int r_size; ---String* r = XGetFontPath(arg1,&r_size); --- %update(r); ---XFreeFontPath(r); ---return; - --- %prim XListFonts :: Display -> String -> Int -> IO ListString ---Int r_size; ---String *r = XListFonts(arg1,arg2,arg3,&r_size); --- %update(r); ---XFreeFontNames(r); ---return; - --- XListFontsWithInfo omitted (no support for FontStruct yet) - --- XQueryTextExtents omitted (no support for CharStruct yet) --- XQueryTextExtents16 omitted (no support for CharStruct yet) - --- We marshall this across right away because it's usually one-off info -type CharStruct = - ( Int -- lbearing (origin to left edge of raster) - , Int -- rbearing (origin to right edge of raster) - , Int -- width (advance to next char's origin) - , Int -- ascent (baseline to top edge of raster) - , Int -- descent (baseline to bottom edge of raster) --- attributes omitted - ) -%dis charStruct x = declare {XCharStruct} x in -% ( int {(%x).lbearing} -% , int {(%x).rbearing} -% , int {(%x).width} -% , int {(%x).ascent} -% , int {(%x).descent} -% ) - - --- No need to put ths in the IO monad - this info is essentially constant -%fun XTextExtents :: FontStruct -> String -> (FontDirection, Int32, Int32, CharStruct) -%call (fontStruct f) (stringLen s s_len) -%code -% int direction; -% int font_ascent; -% int font_descent; -% XCharStruct cs; -% int rc = XTextExtents(f,s,s_len,&direction,&font_ascent,&font_descent,&cs); -%result ( fontDirection direction -% , int32 font_ascent -% , int32 font_descent -% , charStruct cs -% ) - --- No need to put ths in the IO monad - this info is essentially constant -%fun XTextWidth :: FontStruct -> String -> Int32 -%call (fontStruct f) (stringLen s s_len) -%code res1 = XTextWidth(f,s,s_len) - --- XTextExtents16 omitted --- XTextWidth16 omitted - --- XGetFontProperty omitted --- XFreeFontInfo omitted --- XFreeFontNames omitted - --- XCreateFontSet omitted (no documentation available) --- XFreeFontSet omitted (no documentation available) --- XFontsOfFontSet omitted (no documentation available) --- XBaseFontNameListOfFontSet omitted (no documentation available) --- XLocaleOfFontSet omitted (no documentation available) --- XExtentsOfFontSet omitted (no documentation available) - --- XContextDependentDrawing omitted --- XDirectionalDependentDrawing omitted --- XContextualDrawing omitted - --- XmbTextEscapement omitted --- XwcTextEscapement omitted --- XmbTextExtents omitted --- XwcTextExtents omitted --- XmbTextPerCharExtents omitted --- XwcTextPerCharExtents omitted --- XmbDrawText omitted --- XwcDrawText omitted --- XmbDrawString omitted --- XwcDrawString omitted --- XmbDrawImageString omitted --- XwcDrawImageString omitted - --- XOpenIM omitted --- XCloseIM omitted --- XGetIMValues omitted --- XSetIMValues omitted --- DisplayOfIM omitted --- XLocaleOfIM omitted - --- XCreateIC omitted --- XDestroyIC omitted --- XSetICFocus omitted --- XUnsetICFocus omitted --- XwcResetIC omitted --- XmbResetIC omitted --- XSetICValues omitted --- XGetICValues omitted --- XIMOfIC omitted - --- XRegisterIMInstantiateCallback omitted --- XUnregisterIMInstantiateCallback omitted - --- XInternalConnectionNumbers omitted --- XProcessInternalConnection omitted --- XAddConnectionWatch omitted --- XRemoveConnectionWatch omitted - --- XmbLookupString omitted --- XwcLookupString omitted - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Font.gc hunk ./Graphics/X11/Xlib/Font.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Font +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of FFI declarations for interfacing with Xlib Fonts. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Font( + + Glyph, + queryFont, + fontFromGC, + loadQueryFont, + freeFont, + fontFromFontStruct, + ascentFromFontStruct, + descentFromFontStruct, + CharStruct, + textExtents, + textWidth, + + ) where + +#include "HsXlib.h" + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +import Foreign +import Foreign.C + +---------------------------------------------------------------- +-- Fonts +---------------------------------------------------------------- + +-- A glyph (or Char2b) is a 16 bit character identification. +-- The top 8 bits are zero in many fonts. +type Glyph = Word16 + +-- Disnae exist: %fun LoadFont :: Display -> String -> IO Font +-- Disnae exist: %fun UnloadFont :: Display -> Font -> IO () + +-- Argument can be a Font or a GContext. +-- But, if it's a GContext, the fontStruct will use the GContext as the +-- FontID - which will cause most things to break so it's probably +-- safer using XGetGCValues to get a genuine font ID +foreign import ccall unsafe "HsXlib.h XQueryFont" + queryFont :: Display -> Font -> IO FontStruct + +-- Note that this _WILL NOT WORK_ unless you have explicitly set the font. +-- I'm slowly but surely coming to the conclusion that Xlib is a pile of +-- steaming shit. +fontFromGC :: Display -> GC -> IO Font +fontFromGC display gc = + allocaBytes #{size XGCValues} $ \ values -> do + throwUnlessSuccess "fontFromGC" $ + xGetGCValues display gc #{const GCFont} (XGCValues values) + #{peek XGCValues,font} values +foreign import ccall unsafe "HsXlib.h XGetGCValues" + xGetGCValues :: Display -> GC -> ValueMask -> XGCValues -> IO Int + +type ValueMask = #{type unsigned long} + +loadQueryFont :: Display -> String -> IO FontStruct +loadQueryFont display name = + withCString name $ \ c_name -> do + fs <- throwIfNull "loadQueryFont" $ xLoadQueryFont display c_name + return (FontStruct fs) +foreign import ccall unsafe "HsXlib.h XLoadQueryFont" + xLoadQueryFont :: Display -> CString -> IO (Ptr FontStruct) + +foreign import ccall unsafe "HsXlib.h XFreeFont" + freeFont :: Display -> FontStruct -> IO () +-- %fun XSetFontPath :: Display -> ListString -> IO () using XSetFontPath(arg1,arg2,arg2_size) + +fontFromFontStruct :: FontStruct -> Font +fontFromFontStruct (FontStruct fs) = unsafePerformIO $ + #{peek XFontStruct,fid} fs + +ascentFromFontStruct :: FontStruct -> Int32 +ascentFromFontStruct (FontStruct fs) = unsafePerformIO $ + #{peek XFontStruct,ascent} fs + +descentFromFontStruct :: FontStruct -> Int32 +descentFromFontStruct (FontStruct fs) = unsafePerformIO $ + #{peek XFontStruct,descent} fs + +-- %prim XGetFontPath :: Display -> IO ListString +--Int r_size; +--String* r = XGetFontPath(arg1,&r_size); +-- %update(r); +--XFreeFontPath(r); +--return; + +-- %prim XListFonts :: Display -> String -> Int -> IO ListString +--Int r_size; +--String *r = XListFonts(arg1,arg2,arg3,&r_size); +-- %update(r); +--XFreeFontNames(r); +--return; + +-- XListFontsWithInfo omitted (no support for FontStruct yet) + +-- XQueryTextExtents omitted (no support for CharStruct yet) +-- XQueryTextExtents16 omitted (no support for CharStruct yet) + +-- We marshall this across right away because it's usually one-off info +type CharStruct = + ( Int -- lbearing (origin to left edge of raster) + , Int -- rbearing (origin to right edge of raster) + , Int -- width (advance to next char's origin) + , Int -- ascent (baseline to top edge of raster) + , Int -- descent (baseline to bottom edge of raster) + -- attributes omitted + ) + +peekCharStruct :: Ptr CharStruct -> IO CharStruct +peekCharStruct p = do + lbearing <- #{peek XCharStruct,lbearing} p + rbearing <- #{peek XCharStruct,rbearing} p + width <- #{peek XCharStruct,width} p + ascent <- #{peek XCharStruct,ascent} p + descent <- #{peek XCharStruct,descent} p + return (fromIntegral (lbearing::Short), + fromIntegral (rbearing::Short), + fromIntegral (width::Short), + fromIntegral (ascent::Short), + fromIntegral (descent::Short)) + +-- No need to put this in the IO monad - this info is essentially constant +textExtents :: FontStruct -> String -> (FontDirection, Int32, Int32, CharStruct) +textExtents font_struct string = unsafePerformIO $ + withCStringLen string $ \ (c_string, nchars) -> + alloca $ \ direction_return -> + alloca $ \ font_ascent_return -> + alloca $ \ font_descent_return -> + allocaBytes #{size XCharStruct} $ \ overall_return -> do + xTextExtents font_struct c_string nchars direction_return + font_ascent_return font_descent_return overall_return + direction <- peek direction_return + ascent <- peek font_ascent_return + descent <- peek font_descent_return + cs <- peekCharStruct overall_return + return (direction, ascent, descent, cs) +foreign import ccall unsafe "HsXlib.h XTextExtents" + xTextExtents :: FontStruct -> CString -> Int -> + Ptr FontDirection -> Ptr Int32 -> Ptr Int32 -> + Ptr CharStruct -> IO Int + +-- No need to put ths in the IO monad - this info is essentially constant +textWidth :: FontStruct -> String -> Int32 +textWidth font_struct string = unsafePerformIO $ + withCStringLen string $ \ (c_string, len) -> + xTextWidth font_struct c_string len +foreign import ccall unsafe "HsXlib.h XTextWidth" + xTextWidth :: FontStruct -> CString -> Int -> IO Int32 + +-- XTextExtents16 omitted +-- XTextWidth16 omitted + +-- XGetFontProperty omitted +-- XFreeFontInfo omitted +-- XFreeFontNames omitted + +-- XCreateFontSet omitted (no documentation available) +-- XFreeFontSet omitted (no documentation available) +-- XFontsOfFontSet omitted (no documentation available) +-- XBaseFontNameListOfFontSet omitted (no documentation available) +-- XLocaleOfFontSet omitted (no documentation available) +-- XExtentsOfFontSet omitted (no documentation available) + +-- XContextDependentDrawing omitted +-- XDirectionalDependentDrawing omitted +-- XContextualDrawing omitted + +-- XmbTextEscapement omitted +-- XwcTextEscapement omitted +-- XmbTextExtents omitted +-- XwcTextExtents omitted +-- XmbTextPerCharExtents omitted +-- XwcTextPerCharExtents omitted +-- XmbDrawText omitted +-- XwcDrawText omitted +-- XmbDrawString omitted +-- XwcDrawString omitted +-- XmbDrawImageString omitted +-- XwcDrawImageString omitted + +-- XOpenIM omitted +-- XCloseIM omitted +-- XGetIMValues omitted +-- XSetIMValues omitted +-- DisplayOfIM omitted +-- XLocaleOfIM omitted + +-- XCreateIC omitted +-- XDestroyIC omitted +-- XSetICFocus omitted +-- XUnsetICFocus omitted +-- XwcResetIC omitted +-- XmbResetIC omitted +-- XSetICValues omitted +-- XGetICValues omitted +-- XIMOfIC omitted + +-- XRegisterIMInstantiateCallback omitted +-- XUnregisterIMInstantiateCallback omitted + +-- XInternalConnectionNumbers omitted +-- XProcessInternalConnection omitted +-- XAddConnectionWatch omitted +-- XRemoveConnectionWatch omitted + +-- XmbLookupString omitted +-- XwcLookupString omitted + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Misc.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Misc --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of GreenCard declarations for interfacing with Xlib. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Misc( - - rmInitialize, - autoRepeatOff, - autoRepeatOn, - bell, - setCloseDownMode, - lastKnownRequestProcessed, - getInputFocus, - setInputFocus, - grabButton, - ungrabButton, - grabPointer, - ungrabPointer, - grabKey, - ungrabKey, - grabKeyboard, - ungrabKeyboard, - grabServer, - ungrabServer, - queryBestTile, - queryBestStipple, - queryBestCursor, - queryBestSize, - queryPointer, - displayName, - setDefaultErrorHandler, - geometry, - getGeometry, - supportsLocale, - setLocaleModifiers, - AllowExposuresMode, - dontAllowExposures, - allowExposures, - defaultExposures, - PreferBlankingMode, - dontPreferBlanking, - preferBlanking, - defaultBlanking, - ScreenSaverMode, - screenSaverActive, - screenSaverReset, - getScreenSaver, - setScreenSaver, - activateScreenSaver, - resetScreenSaver, - forceScreenSaver, - getPointerControl, - warpPointer, - - createPixmap, - freePixmap, - bitmapBitOrder, - bitmapUnit, - bitmapPad, - - displayKeycodes, - lookupKeysym, - keycodeToKeysym, - keysymToKeycode, - keysymToString, - stringToKeysym, - noSymbol, - lookupString, - getIconName, - setIconName, - defineCursor, - undefineCursor, - createPixmapCursor, - createGlyphCursor, - createFontCursor, - freeCursor, - recolorCursor, - setWMProtocols, - allocXSetWindowAttributes, - set_background_pixmap, - set_background_pixel, - set_border_pixmap, - set_border_pixel, - set_bit_gravity, - set_win_gravity, - set_backing_store, - set_backing_planes, - set_backing_pixel, - set_save_under, - set_event_mask, - set_do_not_propagate_mask, - set_override_redirect, - set_colormap, - set_cursor, - - drawPoint, - drawPoints, - drawLine, - drawLines, - drawSegments, - drawRectangle, - drawRectangles, - drawArc, - drawArcs, - fillRectangle, - fillRectangles, - fillPolygon, - fillArc, - fillArcs, - copyArea, - copyPlane, - drawString, - drawImageString, - storeBuffer, - storeBytes, - fetchBuffer, - fetchBytes, - rotateBuffers, - - setTextProperty, - - ) where - -import Foreign.GreenCard -import Graphics.X11.Types -import Graphics.X11.Xlib.Types -import Graphics.X11.Xlib.Event -import Graphics.X11.Xlib.Font - -%#include "HsXlib.h" - -%prefix X - --- I'm not sure why I added this since I don't have any of the related --- functions. -%fun XrmInitialize :: IO () - --- %fun XGetDefault :: Display -> String -> String -> IO () - -%fun XAutoRepeatOff :: Display -> IO () -%fun XAutoRepeatOn :: Display -> IO () -%fun XBell :: Display -> Int -> IO () -%fun XSetCloseDownMode :: Display -> CloseDownMode -> IO () -%fun XLastKnownRequestProcessed :: Display -> IO Int - -%fun XGetInputFocus :: Display -> IO (Window, FocusMode) -%code XGetInputFocus(arg1,&res1,&res2); - -%fun XSetInputFocus :: Display -> Window -> FocusMode -> Time -> IO () - --- XAllocID omitted --- XKillClient omitted --- XFetchName omitted --- XGetKeyboardControl omitted --- XChangeKeyboardControl omitted --- XChangeKeyboardMapping omitted --- XChangePointerControl omitted - -%fun XGrabButton :: Display -> Button -> ButtonMask -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> IO () -%fun XUngrabButton :: Display -> Button -> ButtonMask -> Window -> IO () - -%fun XGrabPointer :: Display -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> Time -> IO GrabStatus -%fun XUngrabPointer :: Display -> Time -> IO () - -%fun XGrabKey :: Display -> KeyCode -> ButtonMask -> Window -> Bool -> GrabMode -> GrabMode -> IO () -%fun XUngrabKey :: Display -> KeyCode -> ButtonMask -> Window -> IO () - -%fun XGrabKeyboard :: Display -> Window -> Bool -> GrabMode -> GrabMode -> Time -> IO GrabStatus -%fun XUngrabKeyboard :: Display -> Time -> IO () - -%fun XGrabServer :: Display -> IO () -%fun XUngrabServer :: Display -> IO () - --- XChangeActivePointerGrab omitted - --- XFree omitted --- XFreeStringList omitted - -%fun XQueryBestTile :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) -%code Status err = XQueryBestTile(arg1,arg2,arg3,arg4,&res1,&res2) -%fail { Success != err }{ BadStatus(err,XQueryBestTile) } - -%fun XQueryBestStipple :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) -%code Status err = XQueryBestStipple(arg1,arg2,arg3,arg4,&res1,&res2) -%fail { Success != err }{ BadStatus(err,XQueryBestStipple) } - -%fun XQueryBestCursor :: Display -> Drawable -> Dimension -> Dimension -> IO (Dimension, Dimension) -%code Status err = XQueryBestCursor(arg1,arg2,arg3,arg4,&res1,&res2) -%fail { Success != err }{ BadStatus(err,XQueryBestCursor) } - -%fun XQueryBestSize :: Display -> Drawable -> QueryBestSizeClass -> Dimension -> Dimension -> IO (Dimension, Dimension) -%code Status err = XQueryBestSize(arg1,arg2,arg3,arg4,arg5,&res1,&res2) -%fail { Success != err }{ BadStatus(err,XQueryBestSize) } - --- Note: Returns false if pointer not in window w (and win_x = win_y = 0) --- ToDo: more effective use of Maybes? -%fun XQueryPointer :: Display -> Window -> IO (Bool, Window, Window, Int, Int, Int, Int, Modifier) -%code Status res1 = XQueryPointer(arg1,arg2,&res2,&res3,&res4,&res5,&res6,&res7,&res8) - --- XSetSelectionOwner omitted - --- XOpenOM omitted --- XCloseOM omitted --- XSetOMValues omitted --- XGetOMValues omitted --- DisplayOfOM omitted --- XLocaleOfOM omitted - --- XCreateOC omitted --- XDestroyOC omitted --- XOMOfOC omitted --- XSetOCValues omitted --- XGetOCValues omitted - --- XVaCreateNestedList omitted - ----------------------------------------------------------------- --- Error reporting ----------------------------------------------------------------- - -%fun XDisplayName :: String -> String - --- type ErrorHandler = Display -> ErrorEvent -> IO Int --- %dis errorHandler x = (stable x) --- --- type IOErrorHandler = Display -> IO Int --- %dis ioErrorHandler x = (stable x) - --- Sadly, this code doesn't work because hugs->runIO creates a fresh --- stack of exception handlers so the exception gets thrown to the --- wrong place. --- --- %C --- % static HugsStablePtr ioErrorHandlerPtr; --- % --- % int genericIOErrorHandler(Display *d) --- % { --- % if (ioErrorHandlerPtr >= 0) { --- % hugs->putStablePtr(ioErrorHandlerPtr); --- % hugs->putAddr(d); --- % if (hugs->runIO(1)) { /* exitWith value returned */ --- % return hugs->getInt(); --- % } else { --- % return hugs->getWord(); --- % } --- % } --- % return 1; --- % } - --- Here's what we might do instead. The two error handlers set flags --- when they fire and every single call to X contains the line: --- --- %fail { errorFlags != 0 } { XError(errorFlags) } --- --- This really sucks. --- Oh, and it won't even work with IOErrors since they terminate --- the process if the handler returns. I don't know what the hell they --- think they're doing taking it upon themselves to terminate MY --- process when THEIR library has a problem but I don't think anyone --- ever accused X of being well-designed. --- --- % static int genericIOErrorHandler(Display *d) --- % { --- % if (ioErrorHandlerPtr >= 0) { --- % hugs->putStablePtr(ioErrorHandlerPtr); --- % hugs->putAddr(d); --- % if (hugs->runIO(1)) { /* exitWith value returned */ --- % return hugs->getInt(); --- % } else { --- % return hugs->getWord(); --- % } --- % } --- % return 1; --- % } - - --- HN 2001-02-06 --- Moved to auxiliaries.c to make it easier to use the inlining option. --- -- Sigh, for now we just use an error handler that prints an error --- -- message on the screen --- %C --- % static int defaultErrorHandler(Display *d, XErrorEvent *ev) --- % { --- % char buffer[1000]; --- % XGetErrorText(d,ev->error_code,buffer,1000); --- % printf("Error: %s\n", buffer); --- % return 0; --- % } - -{-# CBITS auxiliaries.c #-} - -%fun setDefaultErrorHandler :: IO () -%code XSetErrorHandler(defaultErrorHandler); - - --- %fun XSetIOErrorHandler :: IOErrorHandler -> IO IOErrorHandler --- %fun XSetErrorHandler :: ErrorHandler -> IO ErrorHandler - --- XGetErrorDatabaseText omitted --- XGetErrorText omitted - --- ---------------------------------------------------------------- --- -- Buffers --- ---------------------------------------------------------------- --- --- -- OLD: Would arrays be more appropriate? --- -- --- -- IMPURE void XStoreBytes(display, bytes, nbytes) --- -- IN Display* display --- -- VAR Int nbytes --- -- IN list[nbytes] Byte bytes --- -- --- -- IMPURE list[nbytes] Byte XFetchBytes(display, &nbytes) --- -- IN Display* display --- -- VAR Int nbytes --- -- --- -- IMPURE void XStoreBuffer(display, bytes, nbytes, buffer) --- -- IN Display* display --- -- VAR Int nbytes --- -- IN list[nbytes] Byte bytes --- -- IN Buffer buffer --- -- --- -- IMPURE list[nbytes] Byte XFetchBuffer(display, &nbytes, buffer) --- -- IN Display* display --- -- VAR Int nbytes --- -- IN Buffer buffer --- -- --- -- IMPURE void XRotateBuffers(display, rotate) --- -- IN Display* display --- -- VAR Int rotate - ----------------------------------------------------------------- --- Extensions ----------------------------------------------------------------- - --- ToDo: Use XFreeExtensionList --- %fun XListExtensions :: Display -> IO ListString using res1 = XListExtensions(arg1,&res1_size) - --- %errfun False XQueryExtension :: Display -> String -> IO (Int,Int,Int) using res4 = XQueryExtension(arg1,arg2,&res1,&res2,&res3)->(res1,res2,res3) --- %fun XInitExtensions :: Display -> String -> IO XExtCodes --- %fun XAddExtensions :: Display -> IO XExtCodes - --- XAddToExtensionList omitted --- XFindOnExtensionList omitted --- XEHeadOfExtensionList omitted - ----------------------------------------------------------------- --- Hosts ----------------------------------------------------------------- - --- ToDo: operations to construct and destruct an XHostAddress - --- %fun XAddHost :: Display -> XHostAddress -> IO () --- %fun XRemoveHost :: Display -> XHostAddress -> IO () --- --- %fun XAddHosts :: Display -> ListXHostAddress -> IO () using XAddHosts(arg1,arg2,arg2_size) --- %fun XRemoveHosts :: Display -> ListXHostAddress -> IO () using XRemoveHosts(arg1,arg2,arg2_size) --- --- -- Uses %prim to let us call XFree --- %prim XListHosts :: Display -> IO (ListXHostAddress, Bool) --- Bool state; --- Int r_size; --- XHostAddress* r = XListHosts(arg1,&r_size,&state); --- %update(r,state); --- XFree(r); --- return; - --- %fun XEnableAccessControl :: Display -> IO () --- %fun XDisableAccessControl :: Display -> IO () --- %fun XSetAccessControl :: Display -> Access -> IO () - - ----------------------------------------------------------------- --- Geometry ----------------------------------------------------------------- - -%fun XGeometry :: Display -> Int -> String -> String -> Dimension -> Dimension -> Dimension -> Int -> Int -> IO (Int, Position, Position, Dimension, Dimension) -%code res1 = XGeometry(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,&res2,&res3,&res4,&res5) - -%fun XGetGeometry :: Display -> Int -> Drawable -> IO (Window, Position, Position, Dimension, Dimension, Dimension, Int) -%code Status err = XGetGeometry(arg1,arg2,&res1,&res2,&res3,&res4,&res5,&res6,&res7) -%fail { Success != err }{ BadStatus(err,XGetGeometry) } - --- XParseGeometry omitted (returned bitset too weird) - ----------------------------------------------------------------- --- Locale ----------------------------------------------------------------- - -%fun XSupportsLocale :: IO Bool -%fun XSetLocaleModifiers :: String -> IO String - ----------------------------------------------------------------- --- Screen Saver ----------------------------------------------------------------- - -type AllowExposuresMode = Int -%dis allowExposuresMode x = int x -%const AllowExposuresMode -% [ DontAllowExposures -% , AllowExposures -% , DefaultExposures -% ] - -type PreferBlankingMode = Int -%dis preferBlankingMode x = int x -%const PreferBlankingMode -% [ DontPreferBlanking -% , PreferBlanking -% , DefaultBlanking -% ] - -type ScreenSaverMode = Int -%dis screenSaverMode x = int x -%const ScreenSaverMode -% [ ScreenSaverActive -% , ScreenSaverReset -% ] - -%fun XGetScreenSaver :: Display -> IO (Int, Int, PreferBlankingMode, AllowExposuresMode) -%code XGetScreenSaver(arg1,&res1,&res2,&res3,&res4) - -%fun XSetScreenSaver :: Display -> Int -> Int -> PreferBlankingMode -> AllowExposuresMode -> IO () -%fun XActivateScreenSaver :: Display -> IO () -%fun XResetScreenSaver :: Display -> IO () -%fun XForceScreenSaver :: Display -> ScreenSaverMode -> IO () - - ----------------------------------------------------------------- --- Pointer ----------------------------------------------------------------- - -%fun XGetPointerControl :: Display -> IO (Int, Int, Int) -%code XGetPointerControl(arg1,&res1,&res2,&res3) - -%fun XWarpPointer :: Display -> Window -> Window -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () - --- XGetPointerMapping omitted --- XSetPointerMapping omitted - ----------------------------------------------------------------- --- Visuals ----------------------------------------------------------------- - --- XVisualIDFromVisual omitted - - ----------------------------------------------------------------- --- Threads ----------------------------------------------------------------- - --- XInitThreads omitted (leary of thread stuff) --- XLockDisplay omitted (leary of thread stuff) --- XUnlockDisplay omitted (leary of thread stuff) - ----------------------------------------------------------------- --- Pixmaps ----------------------------------------------------------------- - -%fun XCreatePixmap :: Display -> Drawable -> Dimension -> Dimension -> Int -> IO Pixmap -%fun XFreePixmap :: Display -> Pixmap -> IO () - --- XCreatePixmapFromBitmapData omitted (type looks strange) - --- %fun XListPixmapFormatValues = res1 = XListPixmapFormatValues(display, &res1_size) :: Display -> ListXPixmapFormatValues - ----------------------------------------------------------------- --- Bitmaps ----------------------------------------------------------------- - --- ToDo: do these need to be available to the programmer? --- Maybe I could just wire them into all other operations? - -%fun XBitmapBitOrder :: Display -> ByteOrder -%fun XBitmapUnit :: Display -> Int -%fun XBitmapPad :: Display -> Int - --- ToDo: make sure that initialisation works correctly for x/y_hot --- omitted --- IMPURE void XWriteBitmapFile(display, filename, bitmap, width, height, x_hot, y_hot) RAISES Either --- RETURNTYPE BitmapFileStatus --- GLOBAL ERROR BitmapFileStatus RETVAL --- IN Display* display --- IN String filename --- IN Pixmap bitmap --- IN Dimension width --- IN Dimension height --- IN Maybe Int x_hot = -1 --- IN Maybe Int y_hot = -1 --- POST: RETVAL == BitmapSuccess - --- omitted --- IMPURE void XReadBitmapFile(display, d, filename, bitmap, width, height, x_hot, y_hot) RAISES Either --- RETURNTYPE BitmapFileStatus --- GLOBAL ERROR BitmapFileStatus RETVAL --- IN Display* display --- IN Drawable d --- IN String filename --- OUT Pixmap bitmap --- OUT Dimension width --- OUT Dimension height --- OUT Int x_hot RAISES Maybe IF x_hot == -1 --- OUT Int y_hot RAISES Maybe IF x_hot == -1 --- POST: RETVAL == BitmapSuccess - --- XCreateBitmapFromData omitted (awkward looking type) --- XReadBitmapFileData omitted (awkward looking type) - - ----------------------------------------------------------------- --- Keycodes ----------------------------------------------------------------- - -%fun XDisplayKeycodes :: Display -> (Int,Int) -%code XDisplayKeycodes(arg1,&res1,&res2) -%fun XLookupKeysym :: XKeyEventPtr -> Int -> IO KeySym -%fun XKeycodeToKeysym :: Display -> KeyCode -> Int -> IO KeySym -%fun XKeysymToKeycode :: Display -> KeySym -> IO KeyCode -%fun XKeysymToString :: KeySym -> String -%fun XStringToKeysym :: String -> KeySym - --- I should not need to do this: the argument to maybeT below _should_ --- be treated as a C expression. -%const KeySym [NoSymbol] - --- I tried to allocate the buffer below on the stack, but that was not a --- good idea since the unmarshalling takes place in another stack frame. --- I could use malloc, but then it seems tricky to free _after_ unmarshalling. --- (%end free(buf) does not work: frees buffer too early.) --- Making the buffer static works, but is potentially not thread safe. --- But: the graphics library does not use X in a threadsafe way anyway --- (does not import/call XInitThreads) and GHC is single threaded as far as --- the external world is concerned(?). --- OK, go static for now. Introduce a mutex if needs be. --- XLookupString cannot handle compose, it seems. -%fun XLookupString :: XKeyEventPtr -> IO (Maybe KeySym, String) -%call (xKeyEventPtr e) -%code static char buf[100]; -% int n; -% KeySym ks; -% n = XLookupString(e, buf, 100, &ks, NULL); -%result (maybeT {noSymbol}(keySym ks), stringLen buf n) -- I meant "NoSymbol". - --- XQueryKeymap omitted --- XRebindKeysym omitted --- XDeleteModifiermapEntry omitted --- XInsertModifiermapEntry omitted --- XNewModifiermap omitted --- XFreeModifiermap omitted --- XSetModifierMapping omitted --- XGetModifierMapping omitted --- XGetKeyboardMapping omitted - ----------------------------------------------------------------- --- Image ----------------------------------------------------------------- - --- XCreateImage omitted --- XInitImage omitted --- XGetImage omitted --- XPutImage omitted --- XGetSubImage omitted - ----------------------------------------------------------------- --- Icons ----------------------------------------------------------------- - -%fun XGetIconName :: Display -> Window -> IO String -%code Status err = XGetIconName(arg1,arg2,&res1) -%fail { Success != err }{ BadStatus(err,XGetIconName) } - -%fun XSetIconName :: Display -> Window -> String -> IO () - ----------------------------------------------------------------- --- Cursors ----------------------------------------------------------------- - -%fun XDefineCursor :: Display -> Window -> Cursor -> IO () -%fun XUndefineCursor :: Display -> Window -> IO () - -%fun XCreatePixmapCursor :: Display -> Pixmap -> Pixmap -> Color -> Color -> Dimension -> Dimension -> IO Cursor -%code res1 = XCreatePixmapCursor(arg1,arg2,arg3,&arg4,&arg5,arg6,arg7) - -%fun XCreateGlyphCursor :: Display -> Font -> Font -> Glyph -> Glyph -> Color -> Color -> IO Cursor -%code res1 = XCreateGlyphCursor(arg1,arg2,arg3,arg4,arg5,&arg6,&arg7) - -%fun XCreateFontCursor :: Display -> Glyph -> IO Cursor -%fun XFreeCursor :: Display -> Font -> IO () -%fun XRecolorCursor :: Display -> Cursor -> Color -> Color -> IO () -%code XRecolorCursor(arg1,arg2,&arg3,&arg4) - ----------------------------------------------------------------- --- Window Manager stuff ----------------------------------------------------------------- - --- XConfigureWMWindow omitted (can't find documentation) --- XReconfigureWMWindow omitted (can't find documentation) --- XWMGeometry omitted (can't find documentation) --- XGetWMColormapWindows omitted (can't find documentation) --- XSetWMColormapWindows omitted (can't find documentation) --- XGetWMProtocols omitted - --- AC, 1/9/2000: Added definition for XSetWMProtocols -%fun XSetWMProtocols :: Display -> Window -> ListAtom -> IO () -%call (display arg1) (window arg2) (listAtom arg3 arg3_size) -%code XSetWMProtocols(arg1,arg2,arg3,arg3_size) -%end free(arg3) - - ----------------------------------------------------------------- --- Set Window Attributes ----------------------------------------------------------------- - --- The following code is based on what you get from the %ptr declaration. --- ToDo: generate this kind of stuff automatically. - -%fun allocXSetWindowAttributes :: IO XSetWindowAttributesPtr -%code res1 = (void*)malloc(sizeof(XSetWindowAttributes)) - - --- toXSetWindowAttributesPtr x = x --- fromXSetWindowAttributesPtr x = x --- --- instance Pointer XSetWindowAttributesPtr where --- toPtr = fromXSetWindowAttributesPtr --- fromPtr = toXSetWindowAttributesPtr --- alloc = malloc sizeofXSetWindowAttributes --- plus p x = fromPtr (plusPtr (toPtr p) (x * sizeofXSetWindowAttributes)) --- minus p q = (toPtr p `minusPtr` toPtr q) `div` sizeofXSetWindowAttributes --- %}} --- --- %type : XSetWindowAttributesPtr : XSetWindowAttributes* arg1 : %pack(Ptr,arg1);% : %unpack(Ptr,arg1,arg2);% --- --- %const Int sizeofXSetWindowAttributes = sizeof(XSetWindowAttributes) - ----------------- Access to individual fields ---------------- - -%fun set_background_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () -%code arg1->background_pixmap = arg2; - -%fun set_background_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () -%code arg1->background_pixel = arg2; - -%fun set_border_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () -%code arg1->border_pixmap = arg2; - -%fun set_border_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () -%code arg1->border_pixel = arg2; - -%fun set_bit_gravity :: XSetWindowAttributesPtr -> BitGravity -> IO () -%code arg1->bit_gravity = arg2; - -%fun set_win_gravity :: XSetWindowAttributesPtr -> WindowGravity -> IO () -%code arg1->win_gravity = arg2; - -%fun set_backing_store :: XSetWindowAttributesPtr -> BackingStore -> IO () -%code arg1->backing_store = arg2; - -%fun set_backing_planes :: XSetWindowAttributesPtr -> Pixel -> IO () -%code arg1->backing_planes = arg2; - -%fun set_backing_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () -%code arg1->backing_pixel = arg2; - -%fun set_save_under :: XSetWindowAttributesPtr -> Bool -> IO () -%code arg1->save_under = arg2; - -%fun set_event_mask :: XSetWindowAttributesPtr -> EventMask -> IO () -%code arg1->event_mask = arg2; - -%fun set_do_not_propagate_mask :: XSetWindowAttributesPtr -> EventMask -> IO () -%code arg1->do_not_propagate_mask = arg2; - -%fun set_override_redirect :: XSetWindowAttributesPtr -> Bool -> IO () -%code arg1->override_redirect = arg2; - -%fun set_colormap :: XSetWindowAttributesPtr -> Colormap -> IO () -%code arg1->colormap = arg2; - -%fun set_cursor :: XSetWindowAttributesPtr -> Cursor -> IO () -%code arg1->cursor = arg2; - ----------------------------------------------------------------- --- Drawing ----------------------------------------------------------------- - -%fun XDrawPoint :: Display -> Drawable -> GC -> Position -> Position -> IO () - -%fun XDrawPoints :: Display -> Drawable -> GC -> ListPoint -> CoordinateMode -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (coordinateMode arg5) -%code XDrawPoints(arg1,arg2,arg3,arg4,arg4_size,arg5) -%end free(arg4) - -%fun XDrawLine :: Display -> Drawable -> GC -> Position -> Position -> Position -> Position -> IO () - -%fun XDrawLines :: Display -> Drawable -> GC -> ListPoint -> CoordinateMode -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (coordinateMode arg5) -%code XDrawLines(arg1,arg2,arg3,arg4,arg4_size,arg5) -%end free(arg4) - -%fun XDrawSegments :: Display -> Drawable -> GC -> ListSegment -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listSegment arg4 arg4_size) -%code XDrawSegments(arg1,arg2,arg3,arg4,arg4_size) -%end free(arg4) - -%fun XDrawRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () - -%fun XDrawRectangles :: Display -> Drawable -> GC -> ListRectangle -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listRectangle arg4 arg4_size) -%code XDrawRectangles(arg1,arg2,arg3,arg4,arg4_size) -%end free(arg4) - -%fun XDrawArc :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> IO () - -%fun XDrawArcs :: Display -> Drawable -> GC -> ListArc -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listArc arg4 arg4_size) -%code XDrawArcs(arg1,arg2,arg3,arg4,arg4_size) -%end free(arg4) - -%fun XFillRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () - -%fun XFillRectangles :: Display -> Drawable -> GC -> ListRectangle -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listRectangle arg4 arg4_size) -%code XFillRectangles(arg1,arg2,arg3,arg4,arg4_size) -%end free(arg4) - -%fun XFillPolygon :: Display -> Drawable -> GC -> ListPoint -> PolygonShape -> CoordinateMode -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listPoint arg4 arg4_size) (polygonShape arg5) (coordinateMode arg6) -%code XFillPolygon(arg1,arg2,arg3,arg4,arg4_size,arg5,arg6) -%end free(arg4) - -%fun XFillArc :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> IO () - -%fun XFillArcs :: Display -> Drawable -> GC -> ListArc -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (listArc arg4 arg4_size) -%code XFillArcs(arg1,arg2,arg3,arg4,arg4_size) -%end free(arg4) - -%fun XCopyArea :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () -%fun XCopyPlane :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> Pixel -> IO () - --- draw characters over existing background -%fun XDrawString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (position arg4) (position arg5) (stringLen arg6 arg6_size) -%code XDrawString(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size) -%end free(arg6) - --- draw characters over a blank rectangle of current background colour -%fun XDrawImageString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () -%call (display arg1) (drawable arg2) (gC arg3) (position arg4) (position arg5) (stringLen arg6 arg6_size) -%code XDrawImageString(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size) -%end free(arg6) - --- XDrawString16 omitted (16bit chars not supported) --- XDrawImageString16 omitted (16bit chars not supported) --- XDrawText omitted (XTextItem not supported) --- XDrawText16 omitted (XTextItem not supported) - ----------------------------------------------------------------- --- Cut and paste buffers ----------------------------------------------------------------- - -%fun XStoreBuffer :: Display -> String -> Int -> IO () -%call (display arg1) (stringLen arg2 arg2_size) (int arg3) -%code Status err = XStoreBuffer(arg1,arg2,arg2_size,arg3); -%fail { Success != err }{ BadStatus(err,XStoreBuffer) } - -%fun XStoreBytes :: Display -> String -> IO () -%call (display arg1) (stringLen arg2 arg2_size) -%code Status err = XStoreBytes(arg1,arg2,arg2_size); -%fail { Success != err }{ BadStatus(err,XStoreBytes) } - -%fun XFetchBuffer :: Display -> Int -> IO String -%code -% int nbytes; -% char* res1 = XFetchBuffer(arg1, &nbytes, arg2); -%fail { res1 != NULL }{ NullPtr(XFetchBuffer) } -%result (stringLen res1 nbytes) -%end XFree(res1) - -%fun XFetchBytes :: Display -> IO String -%code -% int nbytes; -% char* res1 = XFetchBytes(arg1, &nbytes); -%fail { res1 != NULL }{ NullPtr(XFetchBytes) } -%result (stringLen res1 nbytes) -%end XFree(res1) - -%fun XRotateBuffers :: Display -> Int -> IO () -%code Status err = XRotateBuffers(arg1,arg2) -%fail { Success != err }{ BadStatus(err,XRotateBuffers) } - ----------------------------------------------------------------- --- Window properties ----------------------------------------------------------------- - -%fun XSetTextProperty :: Display -> Window -> String -> Atom -> IO () -%call (display arg1) (window arg2) (stringLen arg3 arg3_size) (atom arg4) -%code -% XTextProperty p = { arg3, XA_STRING, 8, arg3_size }; -% XSetTextProperty(arg1,arg2,&p,arg4); -%end free(arg3) - --- %fun XSetStandardProperties :: Display -> Window -> String -> String -> Pixmap -> [String] -> XSizeHints -> IO () --- %code Status err = XSetStandardProperties(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size,&arg7) --- %fail { Success != err }{ BadStatus(err,XSetStandardProperties) } - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Misc.gc hunk ./Graphics/X11/Xlib/Misc.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Misc +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of FFI declarations for interfacing with Xlib. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Misc( + + rmInitialize, + autoRepeatOff, + autoRepeatOn, + bell, + setCloseDownMode, + lastKnownRequestProcessed, + getInputFocus, + setInputFocus, + grabButton, + ungrabButton, + grabPointer, + ungrabPointer, + grabKey, + ungrabKey, + grabKeyboard, + ungrabKeyboard, + grabServer, + ungrabServer, + queryBestTile, + queryBestStipple, + queryBestCursor, + queryBestSize, + queryPointer, + displayName, + setDefaultErrorHandler, + geometry, + getGeometry, + supportsLocale, + setLocaleModifiers, + AllowExposuresMode, + dontAllowExposures, + allowExposures, + defaultExposures, + PreferBlankingMode, + dontPreferBlanking, + preferBlanking, + defaultBlanking, + ScreenSaverMode, + screenSaverActive, + screenSaverReset, + getScreenSaver, + setScreenSaver, + activateScreenSaver, + resetScreenSaver, + forceScreenSaver, + getPointerControl, + warpPointer, + + createPixmap, + freePixmap, + bitmapBitOrder, + bitmapUnit, + bitmapPad, + + displayKeycodes, + lookupKeysym, + keycodeToKeysym, + keysymToKeycode, + keysymToString, + stringToKeysym, + noSymbol, + lookupString, + getIconName, + setIconName, + defineCursor, + undefineCursor, + createPixmapCursor, + createGlyphCursor, + createFontCursor, + freeCursor, + recolorCursor, + setWMProtocols, + allocXSetWindowAttributes, + set_background_pixmap, + set_background_pixel, + set_border_pixmap, + set_border_pixel, + set_bit_gravity, + set_win_gravity, + set_backing_store, + set_backing_planes, + set_backing_pixel, + set_save_under, + set_event_mask, + set_do_not_propagate_mask, + set_override_redirect, + set_colormap, + set_cursor, + + drawPoint, + drawPoints, + drawLine, + drawLines, + drawSegments, + drawRectangle, + drawRectangles, + drawArc, + drawArcs, + fillRectangle, + fillRectangles, + fillPolygon, + fillArc, + fillArcs, + copyArea, + copyPlane, + drawString, + drawImageString, + storeBuffer, + storeBytes, + fetchBuffer, + fetchBytes, + rotateBuffers, + + setTextProperty, + + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types +import Graphics.X11.Xlib.Atom +import Graphics.X11.Xlib.Event +import Graphics.X11.Xlib.Font + +import Foreign +import Foreign.C + +#include "HsXlib.h" + +-- I'm not sure why I added this since I don't have any of the related +-- functions. +foreign import ccall unsafe "HsXlib.h XrmInitialize" + rmInitialize :: IO () + +-- %fun XGetDefault :: Display -> String -> String -> IO () + +foreign import ccall unsafe "HsXlib.h XAutoRepeatOff" + autoRepeatOff :: Display -> IO () +foreign import ccall unsafe "HsXlib.h XAutoRepeatOn" + autoRepeatOn :: Display -> IO () +foreign import ccall unsafe "HsXlib.h XBell" + bell :: Display -> Int -> IO () +foreign import ccall unsafe "HsXlib.h XSetCloseDownMode" + setCloseDownMode :: Display -> CloseDownMode -> IO () +foreign import ccall unsafe "HsXlib.h XLastKnownRequestProcessed" + lastKnownRequestProcessed :: Display -> IO Int + +getInputFocus :: Display -> IO (Window, FocusMode) +getInputFocus display = + alloca $ \ focus_return -> + alloca $ \ revert_to_return -> do + xGetInputFocus display focus_return revert_to_return + focus <- peek focus_return + revert_to <- peek revert_to_return + return (focus, revert_to) +foreign import ccall unsafe "HsXlib.h XGetInputFocus" + xGetInputFocus :: Display -> Ptr Window -> Ptr FocusMode -> IO () + +foreign import ccall unsafe "HsXlib.h XSetInputFocus" + setInputFocus :: Display -> Window -> FocusMode -> Time -> IO () + +-- XAllocID omitted +-- XKillClient omitted +-- XFetchName omitted +-- XGetKeyboardControl omitted +-- XChangeKeyboardControl omitted +-- XChangeKeyboardMapping omitted +-- XChangePointerControl omitted + +foreign import ccall unsafe "HsXlib.h XGrabButton" + grabButton :: Display -> Button -> ButtonMask -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> IO () +foreign import ccall unsafe "HsXlib.h XUngrabButton" + ungrabButton :: Display -> Button -> ButtonMask -> Window -> IO () + +foreign import ccall unsafe "HsXlib.h XGrabPointer" + grabPointer :: Display -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> Time -> IO GrabStatus +foreign import ccall unsafe "HsXlib.h XUngrabPointer" + ungrabPointer :: Display -> Time -> IO () + +foreign import ccall unsafe "HsXlib.h XGrabKey" + grabKey :: Display -> KeyCode -> ButtonMask -> Window -> Bool -> GrabMode -> GrabMode -> IO () +foreign import ccall unsafe "HsXlib.h XUngrabKey" + ungrabKey :: Display -> KeyCode -> ButtonMask -> Window -> IO () + +foreign import ccall unsafe "HsXlib.h XGrabKeyboard" + grabKeyboard :: Display -> Window -> Bool -> GrabMode -> GrabMode -> Time -> IO GrabStatus +foreign import ccall unsafe "HsXlib.h XUngrabKeyboard" + ungrabKeyboard :: Display -> Time -> IO () + +foreign import ccall unsafe "HsXlib.h XGrabServer" + grabServer :: Display -> IO () +foreign import ccall unsafe "HsXlib.h XUngrabServer" + ungrabServer :: Display -> IO () + +-- XChangeActivePointerGrab omitted + +foreign import ccall unsafe "HsXlib.h XFree" xFree :: Ptr a -> IO () + +-- XFreeStringList omitted + +queryBestTile :: Display -> Drawable -> Dimension -> Dimension -> + IO (Dimension, Dimension) +queryBestTile display which_screen width height = + outParameters2 (throwUnlessSuccess "queryBestTile") $ + xQueryBestTile display which_screen width height +foreign import ccall unsafe "HsXlib.h XQueryBestTile" + xQueryBestTile :: Display -> Drawable -> Dimension -> Dimension -> + Ptr Dimension -> Ptr Dimension -> IO Status + +queryBestStipple :: Display -> Drawable -> Dimension -> Dimension -> + IO (Dimension, Dimension) +queryBestStipple display which_screen width height = + outParameters2 (throwUnlessSuccess "queryBestStipple") $ + xQueryBestStipple display which_screen width height +foreign import ccall unsafe "HsXlib.h XQueryBestStipple" + xQueryBestStipple :: Display -> Drawable -> Dimension -> Dimension -> + Ptr Dimension -> Ptr Dimension -> IO Status + +queryBestCursor :: Display -> Drawable -> Dimension -> Dimension -> + IO (Dimension, Dimension) +queryBestCursor display d width height = + outParameters2 (throwUnlessSuccess "queryBestCursor") $ + xQueryBestCursor display d width height +foreign import ccall unsafe "HsXlib.h XQueryBestCursor" + xQueryBestCursor :: Display -> Drawable -> Dimension -> Dimension -> + Ptr Dimension -> Ptr Dimension -> IO Status + +queryBestSize :: Display -> QueryBestSizeClass -> Drawable -> + Dimension -> Dimension -> IO (Dimension, Dimension) +queryBestSize display shape_class which_screen width height = + outParameters2 (throwUnlessSuccess "queryBestSize") $ + xQueryBestSize display shape_class which_screen width height +foreign import ccall unsafe "HsXlib.h XQueryBestSize" + xQueryBestSize :: Display -> QueryBestSizeClass -> Drawable -> + Dimension -> Dimension -> + Ptr Dimension -> Ptr Dimension -> IO Status + +-- Note: Returns false if pointer not in window w (and win_x = win_y = 0) +-- ToDo: more effective use of Maybes? +queryPointer :: Display -> Window -> + IO (Bool, Window, Window, Int, Int, Int, Int, Modifier) +queryPointer display w = + alloca $ \ root_return -> + alloca $ \ child_return -> + alloca $ \ root_x_return -> + alloca $ \ root_y_return -> + alloca $ \ win_x_return -> + alloca $ \ win_y_return -> + alloca $ \ mask_return -> do + rel <- xQueryPointer display w root_return child_return root_x_return + root_y_return win_x_return win_y_return mask_return + root <- peek root_return + child <- peek child_return + root_x <- peek root_x_return + root_y <- peek root_y_return + win_x <- peek win_x_return + win_y <- peek win_y_return + mask <- peek mask_return + return (rel, root, child, root_x, root_y, win_x, win_y, mask) +foreign import ccall unsafe "HsXlib.h XQueryPointer" + xQueryPointer :: Display -> Window -> + Ptr Window -> Ptr Window -> Ptr Int -> Ptr Int -> + Ptr Int -> Ptr Int -> Ptr Modifier -> IO Bool + +-- XSetSelectionOwner omitted + +-- XOpenOM omitted +-- XCloseOM omitted +-- XSetOMValues omitted +-- XGetOMValues omitted +-- DisplayOfOM omitted +-- XLocaleOfOM omitted + +-- XCreateOC omitted +-- XDestroyOC omitted +-- XOMOfOC omitted +-- XSetOCValues omitted +-- XGetOCValues omitted + +-- XVaCreateNestedList omitted + +---------------------------------------------------------------- +-- Error reporting +---------------------------------------------------------------- + +displayName :: String -> String +displayName str = unsafePerformIO $ + withCString str $ \ c_str -> do + c_name <- xDisplayName c_str + peekCString c_name +foreign import ccall unsafe "HsXlib.h XDisplayName" + xDisplayName :: CString -> IO CString + +-- type ErrorHandler = Display -> ErrorEvent -> IO Int +-- %dis errorHandler x = (stable x) +-- +-- type IOErrorHandler = Display -> IO Int +-- %dis ioErrorHandler x = (stable x) + +-- Sadly, this code doesn't work because hugs->runIO creates a fresh +-- stack of exception handlers so the exception gets thrown to the +-- wrong place. +-- +-- %C +-- % static HugsStablePtr ioErrorHandlerPtr; +-- % +-- % int genericIOErrorHandler(Display *d) +-- % { +-- % if (ioErrorHandlerPtr >= 0) { +-- % hugs->putStablePtr(ioErrorHandlerPtr); +-- % hugs->putAddr(d); +-- % if (hugs->runIO(1)) { /* exitWith value returned */ +-- % return hugs->getInt(); +-- % } else { +-- % return hugs->getWord(); +-- % } +-- % } +-- % return 1; +-- % } + +-- Here's what we might do instead. The two error handlers set flags +-- when they fire and every single call to X contains the line: +-- +-- %fail { errorFlags != 0 } { XError(errorFlags) } +-- +-- This really sucks. +-- Oh, and it won't even work with IOErrors since they terminate +-- the process if the handler returns. I don't know what the hell they +-- think they're doing taking it upon themselves to terminate MY +-- process when THEIR library has a problem but I don't think anyone +-- ever accused X of being well-designed. +-- +-- % static int genericIOErrorHandler(Display *d) +-- % { +-- % if (ioErrorHandlerPtr >= 0) { +-- % hugs->putStablePtr(ioErrorHandlerPtr); +-- % hugs->putAddr(d); +-- % if (hugs->runIO(1)) { /* exitWith value returned */ +-- % return hugs->getInt(); +-- % } else { +-- % return hugs->getWord(); +-- % } +-- % } +-- % return 1; +-- % } + + +-- HN 2001-02-06 +-- Moved to auxiliaries.c to make it easier to use the inlining option. +-- -- Sigh, for now we just use an error handler that prints an error +-- -- message on the screen +-- %C +-- % static int defaultErrorHandler(Display *d, XErrorEvent *ev) +-- % { +-- % char buffer[1000]; +-- % XGetErrorText(d,ev->error_code,buffer,1000); +-- % printf("Error: %s\n", buffer); +-- % return 0; +-- % } + +{-# CBITS auxiliaries.c #-} + +newtype XErrorEvent = XErrorEvent (Ptr XErrorEvent) + +type ErrorHandler = FunPtr (Display -> Ptr XErrorEvent -> IO Int) + +foreign import ccall unsafe "HsXlib.h &defaultErrorHandler" + defaultErrorHandler :: FunPtr (Display -> Ptr XErrorEvent -> IO Int) + +setDefaultErrorHandler :: IO () +setDefaultErrorHandler = do + xSetErrorHandler defaultErrorHandler + return () + +-- %fun XSetIOErrorHandler :: IOErrorHandler -> IO IOErrorHandler + +foreign import ccall unsafe "HsXlib.h XSetErrorHandler" + xSetErrorHandler :: ErrorHandler -> IO ErrorHandler + +-- XGetErrorDatabaseText omitted +-- XGetErrorText omitted + +-- ---------------------------------------------------------------- +-- -- Buffers +-- ---------------------------------------------------------------- +-- +-- -- OLD: Would arrays be more appropriate? +-- -- +-- -- IMPURE void XStoreBytes(display, bytes, nbytes) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN list[nbytes] Byte bytes +-- -- +-- -- IMPURE list[nbytes] Byte XFetchBytes(display, &nbytes) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- +-- -- IMPURE void XStoreBuffer(display, bytes, nbytes, buffer) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN list[nbytes] Byte bytes +-- -- IN Buffer buffer +-- -- +-- -- IMPURE list[nbytes] Byte XFetchBuffer(display, &nbytes, buffer) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN Buffer buffer +-- -- +-- -- IMPURE void XRotateBuffers(display, rotate) +-- -- IN Display* display +-- -- VAR Int rotate + +---------------------------------------------------------------- +-- Extensions +---------------------------------------------------------------- + +-- ToDo: Use XFreeExtensionList +-- %fun XListExtensions :: Display -> IO ListString using res1 = XListExtensions(arg1,&res1_size) + +-- %errfun False XQueryExtension :: Display -> String -> IO (Int,Int,Int) using res4 = XQueryExtension(arg1,arg2,&res1,&res2,&res3)->(res1,res2,res3) +-- %fun XInitExtensions :: Display -> String -> IO XExtCodes +-- %fun XAddExtensions :: Display -> IO XExtCodes + +-- XAddToExtensionList omitted +-- XFindOnExtensionList omitted +-- XEHeadOfExtensionList omitted + +---------------------------------------------------------------- +-- Hosts +---------------------------------------------------------------- + +-- ToDo: operations to construct and destruct an XHostAddress + +-- %fun XAddHost :: Display -> XHostAddress -> IO () +-- %fun XRemoveHost :: Display -> XHostAddress -> IO () +-- +-- %fun XAddHosts :: Display -> ListXHostAddress -> IO () using XAddHosts(arg1,arg2,arg2_size) +-- %fun XRemoveHosts :: Display -> ListXHostAddress -> IO () using XRemoveHosts(arg1,arg2,arg2_size) +-- +-- -- Uses %prim to let us call XFree +-- %prim XListHosts :: Display -> IO (ListXHostAddress, Bool) +-- Bool state; +-- Int r_size; +-- XHostAddress* r = XListHosts(arg1,&r_size,&state); +-- %update(r,state); +-- XFree(r); +-- return; + +-- %fun XEnableAccessControl :: Display -> IO () +-- %fun XDisableAccessControl :: Display -> IO () +-- %fun XSetAccessControl :: Display -> Access -> IO () + + +---------------------------------------------------------------- +-- Geometry +---------------------------------------------------------------- + +geometry :: Display -> Int -> String -> String -> + Dimension -> Dimension -> Dimension -> Int -> Int -> + IO (Int, Position, Position, Dimension, Dimension) +geometry display screen position default_position + bwidth fwidth fheight xadder yadder = + withCString position $ \ c_position -> + withCString default_position $ \ c_default_position -> + alloca $ \ x_return -> + alloca $ \ y_return -> + alloca $ \ width_return -> + alloca $ \ height_return -> do + res <- xGeometry display screen c_position c_default_position + bwidth fwidth fheight xadder yadder + x_return y_return width_return height_return + x <- peek x_return + y <- peek y_return + width <- peek width_return + height <- peek height_return + return (res, x, y, width, height) +foreign import ccall unsafe "HsXlib.h XGeometry" + xGeometry :: Display -> Int -> CString -> CString -> + Dimension -> Dimension -> Dimension -> Int -> Int -> + Ptr Position -> Ptr Position -> + Ptr Dimension -> Ptr Dimension -> IO Int + +getGeometry :: Display -> Drawable -> + IO (Window, Position, Position, Dimension, Dimension, Dimension, Int) +getGeometry display d = + outParameters7 (throwUnlessSuccess "getGeometry") $ + xGetGeometry display d +foreign import ccall unsafe "HsXlib.h XGetGeometry" + xGetGeometry :: Display -> Drawable -> + Ptr Window -> Ptr Position -> Ptr Position -> Ptr Dimension -> + Ptr Dimension -> Ptr Dimension -> Ptr Int -> IO Status + +-- XParseGeometry omitted (returned bitset too weird) + +---------------------------------------------------------------- +-- Locale +---------------------------------------------------------------- + +foreign import ccall unsafe "HsXlib.h XSupportsLocale" + supportsLocale :: IO Bool + +setLocaleModifiers :: String -> IO String +setLocaleModifiers mods = + withCString mods $ \ modifier_list -> do + c_str <- xSetLocaleModifiers modifier_list + peekCString c_str +foreign import ccall unsafe "HsXlib.h XSetLocaleModifiers" + xSetLocaleModifiers :: CString -> IO CString + +---------------------------------------------------------------- +-- Screen Saver +---------------------------------------------------------------- + +type AllowExposuresMode = Int +#{enum AllowExposuresMode, + , dontAllowExposures = DontAllowExposures + , allowExposures = AllowExposures + , defaultExposures = DefaultExposures + } + +type PreferBlankingMode = Int +#{enum PreferBlankingMode, + , dontPreferBlanking = DontPreferBlanking + , preferBlanking = PreferBlanking + , defaultBlanking = DefaultBlanking + } + +type ScreenSaverMode = Int +#{enum ScreenSaverMode, + , screenSaverActive = ScreenSaverActive + , screenSaverReset = ScreenSaverReset + } + +getScreenSaver :: Display -> + IO (Int, Int, PreferBlankingMode, AllowExposuresMode) +getScreenSaver display = outParameters4 id (xGetScreenSaver display) +foreign import ccall unsafe "HsXlib.h XGetScreenSaver" + xGetScreenSaver :: Display -> Ptr Int -> Ptr Int -> + Ptr PreferBlankingMode -> Ptr AllowExposuresMode -> IO () + +foreign import ccall unsafe "HsXlib.h XSetScreenSaver" + setScreenSaver :: Display -> Int -> Int -> + PreferBlankingMode -> AllowExposuresMode -> IO () +foreign import ccall unsafe "HsXlib.h XActivateScreenSaver" + activateScreenSaver :: Display -> IO () +foreign import ccall unsafe "HsXlib.h XResetScreenSaver" + resetScreenSaver :: Display -> IO () +foreign import ccall unsafe "HsXlib.h XForceScreenSaver" + forceScreenSaver :: Display -> ScreenSaverMode -> IO () + + +---------------------------------------------------------------- +-- Pointer +---------------------------------------------------------------- + +getPointerControl :: Display -> IO (Int, Int, Int) +getPointerControl display = outParameters3 id (xGetPointerControl display) +foreign import ccall unsafe "HsXlib.h XGetPointerControl" + xGetPointerControl :: Display -> Ptr Int -> Ptr Int -> Ptr Int -> IO () + +foreign import ccall unsafe "HsXlib.h XWarpPointer" + warpPointer :: Display -> Window -> Window -> Position -> Position -> + Dimension -> Dimension -> Position -> Position -> IO () + +-- XGetPointerMapping omitted +-- XSetPointerMapping omitted + +---------------------------------------------------------------- +-- Visuals +---------------------------------------------------------------- + +-- XVisualIDFromVisual omitted + + +---------------------------------------------------------------- +-- Threads +---------------------------------------------------------------- + +-- XInitThreads omitted (leary of thread stuff) +-- XLockDisplay omitted (leary of thread stuff) +-- XUnlockDisplay omitted (leary of thread stuff) + +---------------------------------------------------------------- +-- Pixmaps +---------------------------------------------------------------- + +foreign import ccall unsafe "HsXlib.h XCreatePixmap" + createPixmap :: Display -> Drawable -> Dimension -> Dimension -> Int -> IO Pixmap +foreign import ccall unsafe "HsXlib.h XFreePixmap" + freePixmap :: Display -> Pixmap -> IO () + +-- XCreatePixmapFromBitmapData omitted (type looks strange) + +-- %fun XListPixmapFormatValues = res1 = XListPixmapFormatValues(display, &res1_size) :: Display -> ListXPixmapFormatValues + +---------------------------------------------------------------- +-- Bitmaps +---------------------------------------------------------------- + +-- ToDo: do these need to be available to the programmer? +-- Maybe I could just wire them into all other operations? + +foreign import ccall unsafe "HsXlib.h XBitmapBitOrder" + bitmapBitOrder :: Display -> ByteOrder +foreign import ccall unsafe "HsXlib.h XBitmapUnit" + bitmapUnit :: Display -> Int +foreign import ccall unsafe "HsXlib.h XBitmapPad" + bitmapPad :: Display -> Int + +-- ToDo: make sure that initialisation works correctly for x/y_hot +-- omitted +-- IMPURE void XWriteBitmapFile(display, filename, bitmap, width, height, x_hot, y_hot) RAISES Either +-- RETURNTYPE BitmapFileStatus +-- GLOBAL ERROR BitmapFileStatus RETVAL +-- IN Display* display +-- IN String filename +-- IN Pixmap bitmap +-- IN Dimension width +-- IN Dimension height +-- IN Maybe Int x_hot = -1 +-- IN Maybe Int y_hot = -1 +-- POST: RETVAL == BitmapSuccess + +-- omitted +-- IMPURE void XReadBitmapFile(display, d, filename, bitmap, width, height, x_hot, y_hot) RAISES Either +-- RETURNTYPE BitmapFileStatus +-- GLOBAL ERROR BitmapFileStatus RETVAL +-- IN Display* display +-- IN Drawable d +-- IN String filename +-- OUT Pixmap bitmap +-- OUT Dimension width +-- OUT Dimension height +-- OUT Int x_hot RAISES Maybe IF x_hot == -1 +-- OUT Int y_hot RAISES Maybe IF x_hot == -1 +-- POST: RETVAL == BitmapSuccess + +-- XCreateBitmapFromData omitted (awkward looking type) +-- XReadBitmapFileData omitted (awkward looking type) + + +---------------------------------------------------------------- +-- Keycodes +---------------------------------------------------------------- + +displayKeycodes :: Display -> (Int,Int) +displayKeycodes display = + unsafePerformIO $ outParameters2 id $ xDisplayKeycodes display +foreign import ccall unsafe "HsXlib.h XDisplayKeycodes" + xDisplayKeycodes :: Display -> Ptr Int -> Ptr Int -> IO () + +foreign import ccall unsafe "HsXlib.h XLookupKeysym" + lookupKeysym :: XKeyEventPtr -> Int -> IO KeySym +foreign import ccall unsafe "HsXlib.h XKeycodeToKeysym" + keycodeToKeysym :: Display -> KeyCode -> Int -> IO KeySym +foreign import ccall unsafe "HsXlib.h XKeysymToKeycode" + keysymToKeycode :: Display -> KeySym -> IO KeyCode + +keysymToString :: KeySym -> String +keysymToString keysym = unsafePerformIO $ do + c_str <- xKeysymToString keysym + peekCString c_str +foreign import ccall unsafe "HsXlib.h XKeysymToString" + xKeysymToString :: KeySym -> IO CString + +stringToKeysym :: String -> KeySym +stringToKeysym str = unsafePerformIO $ + withCString str $ \ c_str -> + xStringToKeysym c_str +foreign import ccall unsafe "HsXlib.h XStringToKeysym" + xStringToKeysym :: CString -> IO KeySym + +noSymbol = #{const NoSymbol} :: KeySym + +newtype XComposeStatus = XComposeStatus (Ptr XComposeStatus) + +-- XLookupString cannot handle compose, it seems. +lookupString :: XKeyEventPtr -> IO (Maybe KeySym, String) +lookupString event_ptr = + allocaBytes 100 $ \ buf -> + alloca $ \ keysym_return -> do + n <- xLookupString event_ptr buf 100 keysym_return nullPtr + str <- peekCStringLen (buf, n) + keysym <- peek keysym_return + return (if keysym == noSymbol then Nothing else Just keysym, str) +foreign import ccall unsafe "HsXlib.h XLookupString" + xLookupString :: XKeyEventPtr -> CString -> Int -> + Ptr KeySym -> Ptr XComposeStatus -> IO Int + +-- XQueryKeymap omitted +-- XRebindKeysym omitted +-- XDeleteModifiermapEntry omitted +-- XInsertModifiermapEntry omitted +-- XNewModifiermap omitted +-- XFreeModifiermap omitted +-- XSetModifierMapping omitted +-- XGetModifierMapping omitted +-- XGetKeyboardMapping omitted + +---------------------------------------------------------------- +-- Image +---------------------------------------------------------------- + +-- XCreateImage omitted +-- XInitImage omitted +-- XGetImage omitted +-- XPutImage omitted +-- XGetSubImage omitted + +---------------------------------------------------------------- +-- Icons +---------------------------------------------------------------- + +getIconName :: Display -> Window -> IO String +getIconName display w = + alloca $ \ icon_name_return -> do + throwUnlessSuccess "getIconName" $ + xGetIconName display w icon_name_return + c_icon_name <- peek icon_name_return + peekCString c_icon_name +foreign import ccall unsafe "HsXlib.h XGetIconName" + xGetIconName :: Display -> Window -> Ptr CString -> IO Status + +setIconName :: Display -> Window -> String -> IO () +setIconName display w icon_name = + withCString icon_name $ \ c_icon_name -> + xSetIconName display w c_icon_name +foreign import ccall unsafe "HsXlib.h XSetIconName" + xSetIconName :: Display -> Window -> CString -> IO () + +---------------------------------------------------------------- +-- Cursors +---------------------------------------------------------------- + +foreign import ccall unsafe "HsXlib.h XDefineCursor" + defineCursor :: Display -> Window -> Cursor -> IO () +foreign import ccall unsafe "HsXlib.h XUndefineCursor" + undefineCursor :: Display -> Window -> IO () + +createPixmapCursor :: Display -> Pixmap -> Pixmap -> Color -> Color -> + Dimension -> Dimension -> IO Cursor +createPixmapCursor display source mask fg_color bg_color x y = + withColor fg_color $ \ fg_color_ptr -> + withColor bg_color $ \ bg_color_ptr -> + xCreatePixmapCursor display source mask fg_color_ptr bg_color_ptr x y +foreign import ccall unsafe "HsXlib.h XCreatePixmapCursor" + xCreatePixmapCursor :: Display -> Pixmap -> Pixmap -> + Ptr Color -> Ptr Color -> Dimension -> Dimension -> IO Cursor + +createGlyphCursor :: Display -> Font -> Font -> Glyph -> Glyph -> + Color -> Color -> IO Cursor +createGlyphCursor display source_font mask_font source_char mask_char + fg_color bg_color = + withColor fg_color $ \ fg_color_ptr -> + withColor bg_color $ \ bg_color_ptr -> + xCreateGlyphCursor display source_font mask_font source_char mask_char + fg_color_ptr bg_color_ptr +foreign import ccall unsafe "HsXlib.h XCreateGlyphCursor" + xCreateGlyphCursor :: Display -> Font -> Font -> Glyph -> Glyph -> + Ptr Color -> Ptr Color -> IO Cursor + +foreign import ccall unsafe "HsXlib.h XCreateFontCursor" + createFontCursor :: Display -> Glyph -> IO Cursor +foreign import ccall unsafe "HsXlib.h XFreeCursor" + freeCursor :: Display -> Font -> IO () + +recolorCursor :: Display -> Cursor -> Color -> Color -> IO () +recolorCursor display cursor fg_color bg_color = + withColor fg_color $ \ fg_color_ptr -> + withColor bg_color $ \ bg_color_ptr -> + xRecolorCursor display cursor fg_color_ptr bg_color_ptr +foreign import ccall unsafe "HsXlib.h XRecolorCursor" + xRecolorCursor :: Display -> Cursor -> Ptr Color -> Ptr Color -> IO () + +---------------------------------------------------------------- +-- Window Manager stuff +---------------------------------------------------------------- + +-- XConfigureWMWindow omitted (can't find documentation) +-- XReconfigureWMWindow omitted (can't find documentation) +-- XWMGeometry omitted (can't find documentation) +-- XGetWMColormapWindows omitted (can't find documentation) +-- XSetWMColormapWindows omitted (can't find documentation) +-- XGetWMProtocols omitted + +-- AC, 1/9/2000: Added definition for XSetWMProtocols +setWMProtocols :: Display -> Window -> [Atom] -> IO () +setWMProtocols display w protocols = + withArray protocols $ \ protocol_array -> + xSetWMProtocols display w protocol_array (length protocols) +foreign import ccall unsafe "HsXlib.h XSetWMProtocols" + xSetWMProtocols :: Display -> Window -> Ptr Atom -> Int -> IO () + + +---------------------------------------------------------------- +-- Set Window Attributes +---------------------------------------------------------------- + +-- ToDo: generate this kind of stuff automatically. + +allocXSetWindowAttributes :: IO (Ptr XSetWindowAttributes) +allocXSetWindowAttributes = mallocBytes #{size XSetWindowAttributes} + +---------------- Access to individual fields ---------------- + +set_background_pixmap :: Ptr XSetWindowAttributes -> Pixmap -> IO () +set_background_pixmap = #{poke XSetWindowAttributes,background_pixmap} + +set_background_pixel :: Ptr XSetWindowAttributes -> Pixel -> IO () +set_background_pixel = #{poke XSetWindowAttributes,background_pixel} + +set_border_pixmap :: Ptr XSetWindowAttributes -> Pixmap -> IO () +set_border_pixmap = #{poke XSetWindowAttributes,border_pixmap} + +set_border_pixel :: Ptr XSetWindowAttributes -> Pixel -> IO () +set_border_pixel = #{poke XSetWindowAttributes,border_pixel} + +set_bit_gravity :: Ptr XSetWindowAttributes -> BitGravity -> IO () +set_bit_gravity = #{poke XSetWindowAttributes,bit_gravity} + +set_win_gravity :: Ptr XSetWindowAttributes -> WindowGravity -> IO () +set_win_gravity = #{poke XSetWindowAttributes,win_gravity} + +set_backing_store :: Ptr XSetWindowAttributes -> BackingStore -> IO () +set_backing_store = #{poke XSetWindowAttributes,backing_store} + +set_backing_planes :: Ptr XSetWindowAttributes -> Pixel -> IO () +set_backing_planes = #{poke XSetWindowAttributes,backing_planes} + +set_backing_pixel :: Ptr XSetWindowAttributes -> Pixel -> IO () +set_backing_pixel = #{poke XSetWindowAttributes,backing_pixel} + +set_save_under :: Ptr XSetWindowAttributes -> Bool -> IO () +set_save_under = #{poke XSetWindowAttributes,save_under} + +set_event_mask :: Ptr XSetWindowAttributes -> EventMask -> IO () +set_event_mask = #{poke XSetWindowAttributes,event_mask} + +set_do_not_propagate_mask :: Ptr XSetWindowAttributes -> EventMask -> IO () +set_do_not_propagate_mask = #{poke XSetWindowAttributes,do_not_propagate_mask} + +set_override_redirect :: Ptr XSetWindowAttributes -> Bool -> IO () +set_override_redirect = #{poke XSetWindowAttributes,override_redirect} + +set_colormap :: Ptr XSetWindowAttributes -> Colormap -> IO () +set_colormap = #{poke XSetWindowAttributes,colormap} + +set_cursor :: Ptr XSetWindowAttributes -> Cursor -> IO () +set_cursor = #{poke XSetWindowAttributes,cursor} + +---------------------------------------------------------------- +-- Drawing +---------------------------------------------------------------- + +foreign import ccall unsafe "HsXlib.h XDrawPoint" + drawPoint :: Display -> Drawable -> GC -> Position -> Position -> IO () + +drawPoints :: Display -> Drawable -> GC -> [Point] -> CoordinateMode -> IO () +drawPoints display d gc points mode = + withPointArray points $ \ point_array npoints -> + xDrawPoints display d gc point_array npoints mode +foreign import ccall unsafe "HsXlib.h XDrawPoints" + xDrawPoints :: Display -> Drawable -> GC -> Ptr Point -> Int -> + CoordinateMode -> IO () + +foreign import ccall unsafe "HsXlib.h XDrawLine" + drawLine :: Display -> Drawable -> GC -> Position -> Position -> + Position -> Position -> IO () + +drawLines :: Display -> Drawable -> GC -> [Point] -> CoordinateMode -> IO () +drawLines display d gc points mode = + withPointArray points $ \ point_array npoints -> + xDrawLines display d gc point_array npoints mode +foreign import ccall unsafe "HsXlib.h XDrawLines" + xDrawLines :: Display -> Drawable -> GC -> Ptr Point -> Int -> + CoordinateMode -> IO () + +drawSegments :: Display -> Drawable -> GC -> [Segment] -> IO () +drawSegments display d gc segments = + withSegmentArray segments $ \ segment_array nsegments -> + xDrawSegments display d gc segment_array nsegments +foreign import ccall unsafe "HsXlib.h XDrawSegments" + xDrawSegments :: Display -> Drawable -> GC -> Ptr Segment -> Int -> IO () + +foreign import ccall unsafe "HsXlib.h XDrawRectangle" + drawRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () + +drawRectangles :: Display -> Drawable -> GC -> [Rectangle] -> IO () +drawRectangles display d gc rectangles = + withRectangleArray rectangles $ \ rectangle_array nrectangles -> + xDrawRectangles display d gc rectangle_array nrectangles +foreign import ccall unsafe "HsXlib.h XDrawRectangles" + xDrawRectangles :: Display -> Drawable -> GC -> Ptr Rectangle -> Int -> IO () + +foreign import ccall unsafe "HsXlib.h XDrawArc" + drawArc :: Display -> Drawable -> GC -> Position -> Position -> + Dimension -> Dimension -> Angle -> Angle -> IO () + +drawArcs :: Display -> Drawable -> GC -> [Arc] -> IO () +drawArcs display d gc arcs = + withArcArray arcs $ \ arc_array narcs -> + xDrawArcs display d gc arc_array narcs +foreign import ccall unsafe "HsXlib.h XDrawArcs" + xDrawArcs :: Display -> Drawable -> GC -> Ptr Arc -> Int -> IO () + +foreign import ccall unsafe "HsXlib.h XFillRectangle" + fillRectangle :: Display -> Drawable -> GC -> Position -> Position -> + Dimension -> Dimension -> IO () + +fillRectangles :: Display -> Drawable -> GC -> [Rectangle] -> IO () +fillRectangles display d gc rectangles = + withRectangleArray rectangles $ \ rectangle_array nrectangles -> + xFillRectangles display d gc rectangle_array nrectangles +foreign import ccall unsafe "HsXlib.h XFillRectangles" + xFillRectangles :: Display -> Drawable -> GC -> Ptr Rectangle -> Int -> IO () + +fillPolygon :: Display -> Drawable -> GC -> [Point] -> PolygonShape -> CoordinateMode -> IO () +fillPolygon display d gc points shape mode = + withPointArray points $ \ point_array npoints -> + xFillPolygon display d gc point_array npoints shape mode +foreign import ccall unsafe "HsXlib.h XFillPolygon" + xFillPolygon :: Display -> Drawable -> GC -> Ptr Point -> Int -> PolygonShape -> CoordinateMode -> IO () + +foreign import ccall unsafe "HsXlib.h XFillArc" + fillArc :: Display -> Drawable -> GC -> Position -> Position -> + Dimension -> Dimension -> Angle -> Angle -> IO () + +fillArcs :: Display -> Drawable -> GC -> [Arc] -> IO () +fillArcs display d gc arcs = + withArcArray arcs $ \ arc_array narcs -> + xFillArcs display d gc arc_array narcs +foreign import ccall unsafe "HsXlib.h XFillArcs" + xFillArcs :: Display -> Drawable -> GC -> Ptr Arc -> Int -> IO () + +foreign import ccall unsafe "HsXlib.h XCopyArea" + copyArea :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () +foreign import ccall unsafe "HsXlib.h XCopyPlane" + copyPlane :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> Pixel -> IO () + +-- draw characters over existing background +drawString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () +drawString display d gc x y str = + withCStringLen str $ \ (c_str, len) -> + xDrawString display d gc x y c_str len +foreign import ccall unsafe "HsXlib.h XDrawString" + xDrawString :: Display -> Drawable -> GC -> Position -> Position -> CString -> Int -> IO () + +-- draw characters over a blank rectangle of current background colour +drawImageString :: Display -> Drawable -> GC -> Position -> Position -> String -> IO () +drawImageString display d gc x y str = + withCStringLen str $ \ (c_str, len) -> + xDrawImageString display d gc x y c_str len +foreign import ccall unsafe "HsXlib.h XDrawImageString" + xDrawImageString :: Display -> Drawable -> GC -> Position -> Position -> CString -> Int -> IO () + +-- XDrawString16 omitted (16bit chars not supported) +-- XDrawImageString16 omitted (16bit chars not supported) +-- XDrawText omitted (XTextItem not supported) +-- XDrawText16 omitted (XTextItem not supported) + +---------------------------------------------------------------- +-- Cut and paste buffers +---------------------------------------------------------------- + +storeBuffer :: Display -> String -> Int -> IO () +storeBuffer display bytes buffer = + withCStringLen bytes $ \ (c_bytes, nbytes) -> + throwUnlessSuccess "storeBuffer" $ + xStoreBuffer display c_bytes nbytes buffer +foreign import ccall unsafe "HsXlib.h XStoreBuffer" + xStoreBuffer :: Display -> CString -> Int -> Int -> IO Status + +storeBytes :: Display -> String -> IO () +storeBytes display bytes = + withCStringLen bytes $ \ (c_bytes, nbytes) -> + throwUnlessSuccess "storeBytes" $ + xStoreBytes display c_bytes nbytes +foreign import ccall unsafe "HsXlib.h XStoreBytes" + xStoreBytes :: Display -> CString -> Int -> IO Status + +fetchBuffer :: Display -> Int -> IO String +fetchBuffer display buffer = + alloca $ \ nbytes_return -> do + c_bytes <- throwIfNull "fetchBuffer" $ + xFetchBuffer display nbytes_return buffer + nbytes <- peek nbytes_return + bytes <- peekCStringLen (c_bytes, nbytes) + xFree c_bytes + return bytes +foreign import ccall unsafe "HsXlib.h XFetchBuffer" + xFetchBuffer :: Display -> Ptr Int -> Int -> IO CString + +fetchBytes :: Display -> IO String +fetchBytes display = + alloca $ \ nbytes_return -> do + c_bytes <- throwIfNull "fetchBytes" $ + xFetchBytes display nbytes_return + nbytes <- peek nbytes_return + bytes <- peekCStringLen (c_bytes, nbytes) + xFree c_bytes + return bytes +foreign import ccall unsafe "HsXlib.h XFetchBytes" + xFetchBytes :: Display -> Ptr Int -> IO CString + +rotateBuffers :: Display -> Int -> IO () +rotateBuffers display rotate = + throwUnlessSuccess "rotateBuffers" $ + xRotateBuffers display rotate +foreign import ccall unsafe "HsXlib.h XRotateBuffers" + xRotateBuffers :: Display -> Int -> IO Status + +---------------------------------------------------------------- +-- Window properties +---------------------------------------------------------------- + +newtype XTextProperty = XTextProperty (Ptr XTextProperty) + +setTextProperty :: Display -> Window -> String -> Atom -> IO () +setTextProperty display w value property = + withCStringLen value $ \ (c_value, value_len) -> + allocaBytes #{size XTextProperty} $ \ text_prop -> do + #{poke XTextProperty,value} text_prop c_value + #{poke XTextProperty,encoding} text_prop sTRING + #{poke XTextProperty,format} text_prop (8::Int) + #{poke XTextProperty,nitems} text_prop (fromIntegral value_len::Word32) + xSetTextProperty display w text_prop property +foreign import ccall unsafe "HsXlib.h XSetTextProperty" + xSetTextProperty :: Display -> Window -> Ptr XTextProperty -> Atom -> IO () + +-- %fun XSetStandardProperties :: Display -> Window -> String -> String -> Pixmap -> [String] -> XSizeHints -> IO () +-- %code Status err = XSetStandardProperties(arg1,arg2,arg3,arg4,arg5,arg6,arg6_size,&arg7) +-- %fail { Success != err }{ BadStatus(err,XSetStandardProperties) } + +---------------------------------------------------------------- +-- Canned handling of output parameters +---------------------------------------------------------------- + +outParameters2 :: (Storable a, Storable b) => + (IO r -> IO ()) -> (Ptr a -> Ptr b -> IO r) -> IO (a,b) +outParameters2 check fn = + alloca $ \ a_return -> + alloca $ \ b_return -> do + check (fn a_return b_return) + a <- peek a_return + b <- peek b_return + return (a,b) + +outParameters3 :: (Storable a, Storable b, Storable c) => + (IO r -> IO ()) -> (Ptr a -> Ptr b -> Ptr c -> IO r) -> IO (a,b,c) +outParameters3 check fn = + alloca $ \ a_return -> + alloca $ \ b_return -> + alloca $ \ c_return -> do + check (fn a_return b_return c_return) + a <- peek a_return + b <- peek b_return + c <- peek c_return + return (a,b,c) + +outParameters4 :: (Storable a, Storable b, Storable c, Storable d) => + (IO r -> IO ()) -> (Ptr a -> Ptr b -> Ptr c -> Ptr d -> IO r) -> + IO (a,b,c,d) +outParameters4 check fn = + alloca $ \ a_return -> + alloca $ \ b_return -> + alloca $ \ c_return -> + alloca $ \ d_return -> do + check (fn a_return b_return c_return d_return) + a <- peek a_return + b <- peek b_return + c <- peek c_return + d <- peek d_return + return (a,b,c,d) + +outParameters7 :: (Storable a, Storable b, Storable c, Storable d, Storable e, Storable f, Storable g) => + (IO r -> IO ()) -> (Ptr a -> Ptr b -> Ptr c -> Ptr d -> Ptr e -> Ptr f -> Ptr g -> IO r) -> + IO (a,b,c,d,e,f,g) +outParameters7 check fn = + alloca $ \ a_return -> + alloca $ \ b_return -> + alloca $ \ c_return -> + alloca $ \ d_return -> + alloca $ \ e_return -> + alloca $ \ f_return -> + alloca $ \ g_return -> do + check (fn a_return b_return c_return d_return e_return f_return g_return) + a <- peek a_return + b <- peek b_return + c <- peek c_return + d <- peek d_return + e <- peek e_return + f <- peek f_return + g <- peek g_return + return (a,b,c,d,e,f,g) + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Region.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Region --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of GreenCard declarations for interfacing with Xlib Regions. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Region( - Region, - - RectInRegionResult, - rectangleOut, - rectangleIn, - rectanglePart, - - createRegion, - polygonRegion, - intersectRegion, - subtractRegion, - unionRectWithRegion, - unionRegion, - xorRegion, - emptyRegion, - equalRegion, - pointInRegion, - rectInRegion, - clipBox, - offsetRegion, - shrinkRegion, - setRegion, - - ) where - -import Foreign.GreenCard -import Graphics.X11.Types -import Graphics.X11.Xlib.Types - -%#include "HsXlib.h" - -%prefix X - ----------------------------------------------------------------- --- Regions ----------------------------------------------------------------- - -%dis region x = Region (%ForeignPtr {Region} x {XDestroyRegion}) -newtype Region = Region (ForeignPtr Stub_Region) -data Stub_Region - -type RectInRegionResult = Int -%dis rectInRegionResult x = int x - --- Return values from XRectInRegion() -%const RectInRegionResult -% [ RectangleOut -% , RectangleIn -% , RectanglePart -% ] - --- regions deallocation is handled by the GC (ForeignPtr magic) --- so we don't provide XDestroyRegion explicitly --- no idea what the int is for --- %fun XDestroyRegion :: Region -> IO Int - ----------------------------------------------------------------- --- Creating regions ----------------------------------------------------------------- - --- an empty region --- (often used as "out argument" to binary operators which return regions) -%fun XCreateRegion :: IO Region - -%fun XPolygonRegion :: ListPoint -> FillRule -> IO Region -%call (listPoint arg1 arg2) (fillRule arg3) - ----------------------------------------------------------------- --- Combining Regions --- --- The usual shoddy state of Xlib documentation fails to mention --- what the Int is for. --- --- All operations overwrite the region in their third argument --- which is usually a freshly created region. ----------------------------------------------------------------- - -%fun XIntersectRegion :: Region -> Region -> Region -> IO Int -%fun XSubtractRegion :: Region -> Region -> Region -> IO Int -%fun XUnionRectWithRegion :: Rectangle -> Region -> Region -> IO Int -%code res1 = XUnionRectWithRegion(&arg1,arg2,arg3) -%fun XUnionRegion :: Region -> Region -> Region -> IO Int -%fun XXorRegion :: Region -> Region -> Region -> IO Int - ----------------------------------------------------------------- --- Examining regions (tests, bounding boxes, etc) ----------------------------------------------------------------- - -%fun XEmptyRegion :: Region -> IO Bool -%fun XEqualRegion :: Region -> Region -> IO Bool -%fun XPointInRegion :: Region -> Point -> IO Bool -%code res1 = XPointInRegion(arg1,arg2.x,arg2.y) -%fun XRectInRegion :: Region -> Rectangle -> IO RectInRegionResult -%code res1 = XRectInRegion(arg1,arg2.x,arg2.y,arg2.width,arg2.height) - --- I have no idea what the int is for -%fun XClipBox :: Region -> IO (Rectangle,Int) -%code res2 = XClipBox(arg1,&res1) - ----------------------------------------------------------------- --- Modifying regions --- (If you use any of these, you can't make regions look like --- first class data structures.) ----------------------------------------------------------------- - --- translate region -%fun XOffsetRegion :: Region -> Point -> IO Int -%code res1 = XOffsetRegion(arg1,arg2.x,arg2.y) - --- increase size of region by +ve or -ve number of pixels --- while preserving the centre of the region (ie half the pixels --- come off the left, and half off the right) -%fun XShrinkRegion :: Region -> Point -> IO Int -%code res1 = XShrinkRegion(arg1,arg2.x,arg2.y) - ----------------------------------------------------------------- --- Graphics Context ----------------------------------------------------------------- - --- set clip mask of GC -%fun XSetRegion :: Display -> GC -> Region -> IO Int - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Region.gc hunk ./Graphics/X11/Xlib/Region.hs 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Region +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of FFI declarations for interfacing with Xlib Regions. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Region( + Region, + + RectInRegionResult, + rectangleOut, + rectangleIn, + rectanglePart, + + createRegion, + polygonRegion, + intersectRegion, + subtractRegion, + unionRectWithRegion, + unionRegion, + xorRegion, + emptyRegion, + equalRegion, + pointInRegion, + rectInRegion, + clipBox, + offsetRegion, + shrinkRegion, + setRegion, + + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +import Foreign.ForeignPtr +import Foreign.Ptr + +---------------------------------------------------------------- +-- Regions +---------------------------------------------------------------- + +newtype Region = Region (ForeignPtr Region) + +withRegion :: Region -> (Ptr Region -> IO a) -> IO a +withRegion (Region r) = withForeignPtr r + +type RectInRegionResult = Int + +-- Return values from XRectInRegion() +rectangleOut = 0 :: RectInRegionResult +rectangleIn = 1 :: RectInRegionResult +rectanglePart = 2 :: RectInRegionResult + +---------------------------------------------------------------- +-- Creating regions +---------------------------------------------------------------- + +-- regions deallocation is handled by the GC (ForeignPtr magic) +-- so we don't provide XDestroyRegion explicitly +-- no idea what the int is for +-- %fun XDestroyRegion :: Region -> IO Int +foreign import ccall unsafe "HsXlib.h &XDestroyRegion" + xDestroyRegionPtr :: FunPtr (Ptr Region -> IO ()) + +makeRegion :: Ptr Region -> IO Region +makeRegion rp = do + r <- newForeignPtr xDestroyRegionPtr rp + return (Region r) + +-- an empty region +-- (often used as "out argument" to binary operators which return regions) +createRegion :: IO Region +createRegion = do + rp <- xCreateRegion + makeRegion rp +foreign import ccall unsafe "HsXlib.h XCreateRegion" + xCreateRegion :: IO (Ptr Region) + +polygonRegion :: [Point] -> FillRule -> IO Region +polygonRegion points fill_rule = + withPointArray points $ \ point_arr n -> do + rp <- xPolygonRegion point_arr n fill_rule + makeRegion rp +foreign import ccall unsafe "HsXlib.h XPolygonRegion" + xPolygonRegion :: Ptr Point -> Int -> FillRule -> IO (Ptr Region) + +---------------------------------------------------------------- +-- Combining Regions +-- +-- The usual shoddy state of Xlib documentation fails to mention +-- what the Int is for. +-- +-- All operations overwrite the region in their third argument +-- which is usually a freshly created region. +---------------------------------------------------------------- + +intersectRegion :: Region -> Region -> Region -> IO Int +intersectRegion src1 src2 dest = + withRegion src1 $ \ src1_ptr -> + withRegion src2 $ \ src2_ptr -> + withRegion dest $ \ dest_ptr -> + xIntersectRegion src1_ptr src2_ptr dest_ptr +foreign import ccall unsafe + "HsXlib.h XIntersectRegion" xIntersectRegion :: + Ptr Region -> Ptr Region -> Ptr Region -> IO Int + +subtractRegion :: Region -> Region -> Region -> IO Int +subtractRegion src1 src2 dest = + withRegion src1 $ \ src1_ptr -> + withRegion src2 $ \ src2_ptr -> + withRegion dest $ \ dest_ptr -> + xSubtractRegion src1_ptr src2_ptr dest_ptr +foreign import ccall unsafe + "HsXlib.h XSubtractRegion" xSubtractRegion :: + Ptr Region -> Ptr Region -> Ptr Region -> IO Int + +unionRectWithRegion :: Rectangle -> Region -> Region -> IO Int +unionRectWithRegion rect src dest = + withRectangle rect $ \ rect_ptr -> + withRegion src $ \ src_ptr -> + withRegion dest $ \ dest_ptr -> + xUnionRectWithRegion rect_ptr src_ptr dest_ptr +foreign import ccall unsafe + "HsXlib.h XUnionRectWithRegion" xUnionRectWithRegion :: + Ptr Rectangle -> Ptr Region -> Ptr Region -> IO Int + +unionRegion :: Region -> Region -> Region -> IO Int +unionRegion src1 src2 dest = + withRegion src1 $ \ src1_ptr -> + withRegion src2 $ \ src2_ptr -> + withRegion dest $ \ dest_ptr -> + xUnionRegion src1_ptr src2_ptr dest_ptr +foreign import ccall unsafe + "HsXlib.h XUnionRegion" xUnionRegion :: + Ptr Region -> Ptr Region -> Ptr Region -> IO Int + +xorRegion :: Region -> Region -> Region -> IO Int +xorRegion src1 src2 dest = + withRegion src1 $ \ src1_ptr -> + withRegion src2 $ \ src2_ptr -> + withRegion dest $ \ dest_ptr -> + xXorRegion src1_ptr src2_ptr dest_ptr +foreign import ccall unsafe + "HsXlib.h XXorRegion" xXorRegion :: + Ptr Region -> Ptr Region -> Ptr Region -> IO Int + +---------------------------------------------------------------- +-- Examining regions (tests, bounding boxes, etc) +---------------------------------------------------------------- + +emptyRegion :: Region -> IO Bool +emptyRegion r = withRegion r xEmptyRegion +foreign import ccall unsafe "HsXlib.h XEmptyRegion" + xEmptyRegion :: Ptr Region -> IO Bool + +equalRegion :: Region -> Region -> IO Bool +equalRegion r1 r2 = + withRegion r1 $ \ rp1 -> + withRegion r2 $ \ rp2 -> + xEqualRegion rp1 rp2 +foreign import ccall unsafe "HsXlib.h XEqualRegion" + xEqualRegion :: Ptr Region -> Ptr Region -> IO Bool + +pointInRegion :: Region -> Point -> IO Bool +pointInRegion r (x,y) = + withRegion r $ \ rp -> + xPointInRegion rp x y +foreign import ccall unsafe "HsXlib.h XPointInRegion" + xPointInRegion :: Ptr Region -> Position -> Position -> IO Bool + +rectInRegion :: Region -> Rectangle -> IO RectInRegionResult +rectInRegion r (x,y,w,h) = + withRegion r $ \ rp -> + xRectInRegion rp x y w h +foreign import ccall unsafe "HsXlib.h XRectInRegion" + xRectInRegion :: Ptr Region -> Position -> Position -> + Dimension -> Dimension -> IO RectInRegionResult + +-- I have no idea what the int is for +clipBox :: Region -> IO (Rectangle,Int) +clipBox r = + withRegion r $ \ rp -> + allocaRectangle $ \ rect_ptr -> do + res <- xClipBox rp rect_ptr + rect <- peekRectangle rect_ptr + return (rect, res) +foreign import ccall unsafe "HsXlib.h XClipBox" + xClipBox :: Ptr Region -> Ptr Rectangle -> IO Int + +---------------------------------------------------------------- +-- Modifying regions +-- (If you use any of these, you can't make regions look like +-- first class data structures.) +---------------------------------------------------------------- + +-- translate region +offsetRegion :: Region -> Point -> IO Int +offsetRegion r (x,y) = + withRegion r $ \ rp -> + xOffsetRegion rp x y +foreign import ccall unsafe "HsXlib.h XOffsetRegion" + xOffsetRegion :: Ptr Region -> Position -> Position -> IO Int + +-- increase size of region by +ve or -ve number of pixels +-- while preserving the centre of the region (ie half the pixels +-- come off the left, and half off the right) +shrinkRegion :: Region -> Point -> IO Int +shrinkRegion r (x,y) = + withRegion r $ \ rp -> + xShrinkRegion rp x y +foreign import ccall unsafe "HsXlib.h XShrinkRegion" + xShrinkRegion :: Ptr Region -> Position -> Position -> IO Int + +---------------------------------------------------------------- +-- Graphics Context +---------------------------------------------------------------- + +-- set clip mask of GC +setRegion :: Display -> GC -> Region -> IO Int +setRegion disp gc r = + withRegion r $ \ rp -> + xSetRegion disp gc rp +foreign import ccall unsafe "HsXlib.h XSetRegion" + xSetRegion :: Display -> GC -> Ptr Region -> IO Int + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Screen.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Screen --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of GreenCard declarations for interfacing with Xlib Screens. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Screen( - - blackPixelOfScreen, - whitePixelOfScreen, - cellsOfScreen, - defaultColormapOfScreen, - defaultDepthOfScreen, - defaultGCOfScreen, - defaultVisualOfScreen, - doesBackingStore, - doesSaveUnders, - displayOfScreen, - eventMaskOfScreen, - minCmapsOfScreen, - maxCmapsOfScreen, - rootWindowOfScreen, - widthOfScreen, - widthMMOfScreen, - heightOfScreen, - heightMMOfScreen, - planesOfScreen, - screenNumberOfScreen, - - ) where - -import Foreign.GreenCard -import Graphics.X11.Types -import Graphics.X11.Xlib.Types - -%#include "HsXlib.h" - -%prefix X - ----------------------------------------------------------------- --- Screen ----------------------------------------------------------------- - --- Many flags assumed to be PURE. - -%fun XBlackPixelOfScreen :: Screen -> Pixel -%fun XWhitePixelOfScreen :: Screen -> Pixel -%fun XCellsOfScreen :: Screen -> Int -%fun XDefaultColormapOfScreen :: Screen -> Colormap -%fun XDefaultDepthOfScreen :: Screen -> Int -%fun XDefaultGCOfScreen :: Screen -> GC -%fun XDefaultVisualOfScreen :: Screen -> Visual -%fun XDoesBackingStore :: Screen -> Bool -%fun XDoesSaveUnders :: Screen -> Bool -%fun DisplayOfScreen :: Screen -> Display - --- event mask at connection setup time - not current event mask! -%fun XEventMaskOfScreen :: Screen -> EventMask - -%fun XMinCmapsOfScreen :: Screen -> Int -%fun XMaxCmapsOfScreen :: Screen -> Int -%fun XRootWindowOfScreen :: Screen -> Window -%fun XWidthOfScreen :: Screen -> Dimension -%fun XWidthMMOfScreen :: Screen -> Dimension -%fun XHeightOfScreen :: Screen -> Dimension -%fun XHeightMMOfScreen :: Screen -> Dimension -%fun XPlanesOfScreen :: Screen -> Int -%fun XScreenNumberOfScreen :: Screen -> ScreenNumber - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Screen.gc hunk ./Graphics/X11/Xlib/Screen.hs 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Screen +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of FFI declarations for interfacing with Xlib Screens. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Screen( + + blackPixelOfScreen, + whitePixelOfScreen, + cellsOfScreen, + defaultColormapOfScreen, + defaultDepthOfScreen, + defaultGCOfScreen, + defaultVisualOfScreen, + doesBackingStore, + doesSaveUnders, + displayOfScreen, + eventMaskOfScreen, + minCmapsOfScreen, + maxCmapsOfScreen, + rootWindowOfScreen, + widthOfScreen, + widthMMOfScreen, + heightOfScreen, + heightMMOfScreen, + planesOfScreen, + screenNumberOfScreen, + + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +---------------------------------------------------------------- +-- Screen +---------------------------------------------------------------- + +-- Many flags assumed to be PURE. + +foreign import ccall unsafe "HsXlib.h XBlackPixelOfScreen" + blackPixelOfScreen :: Screen -> Pixel +foreign import ccall unsafe "HsXlib.h XWhitePixelOfScreen" + whitePixelOfScreen :: Screen -> Pixel +foreign import ccall unsafe "HsXlib.h XCellsOfScreen" + cellsOfScreen :: Screen -> Int +foreign import ccall unsafe "HsXlib.h XDefaultColormapOfScreen" + defaultColormapOfScreen :: Screen -> Colormap +foreign import ccall unsafe "HsXlib.h XDefaultDepthOfScreen" + defaultDepthOfScreen :: Screen -> Int +foreign import ccall unsafe "HsXlib.h XDefaultGCOfScreen" + defaultGCOfScreen :: Screen -> GC +foreign import ccall unsafe "HsXlib.h XDefaultVisualOfScreen" + defaultVisualOfScreen :: Screen -> Visual +foreign import ccall unsafe "HsXlib.h XDoesBackingStore" + doesBackingStore :: Screen -> Bool +foreign import ccall unsafe "HsXlib.h XDoesSaveUnders" + doesSaveUnders :: Screen -> Bool +foreign import ccall unsafe "HsXlib.h XDisplayOfScreen" + displayOfScreen :: Screen -> Display + +-- event mask at connection setup time - not current event mask! +foreign import ccall unsafe "HsXlib.h XEventMaskOfScreen" + eventMaskOfScreen :: Screen -> EventMask + +foreign import ccall unsafe "HsXlib.h XMinCmapsOfScreen" + minCmapsOfScreen :: Screen -> Int +foreign import ccall unsafe "HsXlib.h XMaxCmapsOfScreen" + maxCmapsOfScreen :: Screen -> Int +foreign import ccall unsafe "HsXlib.h XRootWindowOfScreen" + rootWindowOfScreen :: Screen -> Window +foreign import ccall unsafe "HsXlib.h XWidthOfScreen" + widthOfScreen :: Screen -> Dimension +foreign import ccall unsafe "HsXlib.h XWidthMMOfScreen" + widthMMOfScreen :: Screen -> Dimension +foreign import ccall unsafe "HsXlib.h XHeightOfScreen" + heightOfScreen :: Screen -> Dimension +foreign import ccall unsafe "HsXlib.h XHeightMMOfScreen" + heightMMOfScreen :: Screen -> Dimension +foreign import ccall unsafe "HsXlib.h XPlanesOfScreen" + planesOfScreen :: Screen -> Int +foreign import ccall unsafe "HsXlib.h XScreenNumberOfScreen" + screenNumberOfScreen :: Screen -> ScreenNumber + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Types.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Types --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of type declarations for interfacing with Xlib. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Types( - module Graphics.X11.Xlib.Types - ) where - -import Foreign.GreenCard -import Graphics.X11.Types - -import Control.Monad( zipWithM_ ) -import Foreign(mallocBytes, Storable(..)) - -%#include "HsXlib.h" - -%prefix X - ----------------------------------------------------------------- --- Types ----------------------------------------------------------------- - -type Pixel = Word32 -type Position = Int32 -type Dimension = Word32 -type ScreenNumber = Word32 -type Byte = Char -type Buffer = Int - -%dis pixel x = word32 x -%dis position x = int32 x -%dis dimension x = word32 x -%dis screenNumber x = word32 x -%dis byte x = char x -%dis buffer x = int - -newtype Display = Display (Ptr Stub_Display) -newtype Screen = Screen (Ptr Stub_Screen) -newtype Visual = Visual (Ptr Stub_Visual) -newtype FontStruct = FontStruct (Ptr Stub_FontStruct) - -data Stub_Display -data Stub_Screen -data Stub_Visual -data Stub_FontStruct - -%dis display x = Display (ptr ({Display*} x)) -%dis screen x = Screen (ptr ({Screen*} x)) -%dis visual x = Visual (ptr ({Visual*} x)) -%dis fontStruct x = FontStruct (ptr ({XFontStruct*} x)) - -type GC = Ptr Stub_GC -data Stub_GC -%dis gC x = ptr x - -type Point = - ( Position -- x - , Position -- y - ) -%dis point x = declare {XPoint} x in -% ( position {(%x).x} -% , position {(%x).y} -% ) - -type Segment = - ( Position -- x1 - , Position -- y1 - , Position -- x2 - , Position -- y2 - ) -%dis segment x = declare {XSegment} x in -% ( position {(%x).x1} -% , position {(%x).y1} -% , position {(%x).x2} -% , position {(%x).y2} -% ) - -type Rectangle = - ( Position -- x - , Position -- y - , Dimension -- width - , Dimension -- height - ) -%dis rectangle x = declare {XRectangle} x in -% ( position {(%x).x} -% , position {(%x).y} -% , dimension {(%x).width} -% , dimension {(%x).height} -% ) - -type Arc = - ( Position - , Position - , Dimension - , Dimension - , Int - , Int - ) -%dis arc x = declare {XArc} x in -% ( position {(%x).x} -% , position {(%x).y} -% , dimension {(%x).width} -% , dimension {(%x).height} -% , int {(%x).angle1} -% , int {(%x).angle2} -% ) - -type Color = - ( Pixel - , Word16 - , Word16 - , Word16 - , Word8 - ) -%dis color x = declare {XColor} x in -% ( pixel {(%x).pixel} -% , word16 {(%x).red} -% , word16 {(%x).green} -% , word16 {(%x).blue} -% , word8 {(%x).flags} -% ) - --- We can't use the similarily named library functions for several reasons: --- 1) They deal with Ptrs instead of Ptr-Len pairs --- 2) They require instances of Storable but we apply these functions --- to type synonyms like 'Point = (Int,Int)' which cannot be --- instances. - -type Storable' a = - ( a -> Int -- sizeOf - , Ptr a -> Int -> IO a -- peekElemOff - , Ptr a -> Int -> a -> IO () -- pokeElemOff - ) - -newArray' :: Storable' a -> [a] -> IO (Ptr a, Int) -newArray' (sz,_,wr) xs = do - p <- mallocBytes (sz undefined * l) - zipWithM_ (wr p) [0..] xs - return (p, l) - where - l = length xs - -peekArray' :: Storable' a -> (Ptr a, Int) -> IO [a] -peekArray' (_,rd,_) (p,l) - | l <= 0 = return [] - | otherwise = f (l-1) [] - where - f 0 acc = do e <- rd p 0; return (e:acc) - f n acc = do e <- rd p n; f (n-1) (e:acc) - --- don't forget to use %end free(arg?) in conjunction with these guys -type ListPoint = [Point] -%dis listPoint x l = << newArray' s_Point / peekArray' s_Point >> (ptr ({XPoint*} x)) (int l) -type ListRectangle = [Rectangle] -%dis listRectangle x l = << newArray' s_Rectangle / peekArray' s_Rectangle >> (ptr ({XRectangle*} x)) (int l) -type ListArc = [Arc] -%dis listArc x l = << newArray' s_Arc / peekArray' s_Arc >> (ptr ({XArc*} x)) (int l) -type ListSegment = [Segment] -%dis listSegment x l = << newArray' s_Segment / peekArray' s_Segment >> (ptr ({XSegment*} x)) (int l) -type ListColor = [Color] -%dis listColor x l = << newArray' s_Color / peekArray' s_Color >> (ptr ({XColor*} x)) (int l) -type ListPixel = [Pixel] -%dis listPixel x l = << newArray' s_Pixel / peekArray' s_Pixel >> (ptr ({unsigned long*} x)) (int l) -type ListWindow = [Window] -%dis listWindow x l = << newArray' s_Window / peekArray' s_Window >> (ptr ({Window*} x)) (int l) --- AC, 1/9/2000: Try to define types and marshalling code for Atom lists: -type ListAtom = [Atom] -%dis listAtom x l = << newArray' s_Atom / peekArray' s_Atom >> (ptr ({Atom *} x)) (int l) - -s_Pixel :: Storable' Pixel -s_Pixel = (sizeOf, peekElemOff, pokeElemOff) - -s_Window :: Storable' Window -s_Window = (sizeOf, peekElemOff, pokeElemOff) - -s_Atom :: Storable' Atom -s_Atom = (sizeOf, peekElemOff, pokeElemOff) - -s_Point :: Storable' Point -s_Point = (const sizeOfPoint,readPoint,writePoint) - -%fun writePoint :: Ptr Point -> Int -> Point -> IO () -%call (ptr ({XPoint*} s)) (int i) (point {s[i]}) -%code - -%fun readPoint :: Ptr Point -> Int -> IO Point -%call (ptr ({XPoint*} s)) (int i) -%code -%result (point {s[i]}) - -%fun sizeOfPoint :: Int -%code res1 = sizeof(XPoint) - -s_Rectangle :: Storable' Rectangle -s_Rectangle = (const sizeOfRectangle, readRectangle, writeRectangle ) - -%fun writeRectangle :: Ptr Rectangle -> Int -> Rectangle -> IO () -%call (ptr ({XRectangle*} s)) (int i) (rectangle {s[i]}) -%code - -%fun readRectangle :: Ptr Rectangle -> Int -> IO Rectangle -%call (ptr ({XRectangle*} s)) (int i) -%code -%result (rectangle {s[i]}) - -%fun sizeOfRectangle :: Int -%code res1 = sizeof(XRectangle) - - -s_Arc :: Storable' Arc -s_Arc = (const sizeOfArc, readArc, writeArc ) - -%fun writeArc :: Ptr Arc -> Int -> Arc -> IO () -%call (ptr ({XArc*} s)) (int i) (arc {s[i]}) -%code - -%fun readArc :: Ptr Arc -> Int -> IO Arc -%call (ptr ({XArc*} s)) (int i) -%code -%result (arc {s[i]}) - -%fun sizeOfArc :: Int -%code res1 = sizeof(XArc) - - -s_Segment :: Storable' Segment -s_Segment = (const sizeOfSegment, readSegment, writeSegment ) - -%fun writeSegment :: Ptr Segment -> Int -> Segment -> IO () -%call (ptr ({XSegment*} s)) (int i) (segment {s[i]}) -%code - -%fun readSegment :: Ptr Segment -> Int -> IO Segment -%call (ptr ({XSegment*} s)) (int i) -%code -%result (segment {s[i]}) - -%fun sizeOfSegment :: Int -%code res1 = sizeof(XSegment) - - -s_Color :: Storable' Color -s_Color = (const sizeOfColor, readColor, writeColor ) - -%fun writeColor :: Ptr Color -> Int -> Color -> IO () -%call (ptr ({XColor*} s)) (int i) (color {s[i]}) -%code - -%fun readColor :: Ptr Color -> Int -> IO Color -%call (ptr ({XColor*} s)) (int i) -%code -%result (color {s[i]}) - -%fun sizeOfColor :: Int -%code res1 = sizeof(XColor) - -type XSetWindowAttributesPtr = Ptr Stub_SWA -data Stub_SWA --- toXSetWindowAttributesPtr :: Addr -> XSetWindowAttributesPtr, --- fromXSetWindowAttributesPtr :: XSetWindowAttributesPtr -> Ptr -%dis xSetWindowAttributesPtr x = ptr ({XSetWindowAttributes*} x) - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Types.gc hunk ./Graphics/X11/Xlib/Types.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Types +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of type declarations for interfacing with Xlib. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Types( + module Graphics.X11.Xlib.Types + ) where + +import Control.Monad( zipWithM_ ) +import Data.Int +import Data.Word +import Foreign.Marshal.Alloc( allocaBytes ) +import Foreign.Ptr +import Foreign.Storable( Storable(..) ) + +#include "HsXlib.h" + +---------------------------------------------------------------- +-- Types +---------------------------------------------------------------- + +newtype Display = Display (Ptr Display) +newtype Screen = Screen (Ptr Screen) +newtype Visual = Visual (Ptr Visual) +newtype FontStruct = FontStruct (Ptr FontStruct) +newtype GC = GC (Ptr GC) +newtype XGCValues = XGCValues (Ptr XGCValues) + +newtype XSetWindowAttributes = XSetWindowAttributes XSetWindowAttributesPtr +type XSetWindowAttributesPtr = Ptr XSetWindowAttributes + +type Pixel = #{type unsigned long} +type Position = #{type int} +type Dimension = #{type unsigned int} +type Angle = Int +type ScreenNumber = Word32 +type Byte = Word8 +type Buffer = Int + +---------------------------------------------------------------- +-- Short forms used in structs +---------------------------------------------------------------- + +type ShortPosition = #{type short} +type ShortDimension = #{type unsigned short} +type ShortAngle = #{type short} +type Short = #{type short} + +peekPositionField :: Ptr a -> Int -> IO Position +peekPositionField ptr off = do + v <- peekByteOff ptr off + return (fromIntegral (v::ShortPosition)) + +peekDimensionField :: Ptr a -> Int -> IO Dimension +peekDimensionField ptr off = do + v <- peekByteOff ptr off + return (fromIntegral (v::ShortDimension)) + +peekAngleField :: Ptr a -> Int -> IO Angle +peekAngleField ptr off = do + v <- peekByteOff ptr off + return (fromIntegral (v::ShortAngle)) + +pokePositionField :: Ptr a -> Int -> Position -> IO () +pokePositionField ptr off v = + pokeByteOff ptr off (fromIntegral v::ShortPosition) + +pokeDimensionField :: Ptr a -> Int -> Dimension -> IO () +pokeDimensionField ptr off v = + pokeByteOff ptr off (fromIntegral v::ShortDimension) + +pokeAngleField :: Ptr a -> Int -> Angle -> IO () +pokeAngleField ptr off v = + pokeByteOff ptr off (fromIntegral v::ShortAngle) + +---------------------------------------------------------------- +-- Marshalling of arbitrary types +---------------------------------------------------------------- + +-- We can't use the similarily named library functions for several reasons: +-- 1) They deal with Ptrs instead of Ptr-Len pairs +-- 2) They require instances of Storable but we apply these functions +-- to type synonyms like 'Point = (Int,Int)' which cannot be +-- instances. + +data Storable' a = Storable' + { size :: Int + , peek' :: Ptr a -> IO a + , poke' :: Ptr a -> a -> IO () + } + +alloca' :: Storable' a -> (Ptr a -> IO b) -> IO b +alloca' st = allocaBytes (size st) + +withStorable' :: Storable' a -> a -> (Ptr a -> IO b) -> IO b +withStorable' st x f = alloca' st $ \ ptr -> do + poke' st ptr x + f ptr + +peekElemOff' :: Storable' a -> Ptr a -> Int -> IO a +peekElemOff' st p off = peek' st (p `plusPtr` (size st*off)) + +pokeElemOff' :: Storable' a -> Ptr a -> Int -> a -> IO () +pokeElemOff' st p off = poke' st (p `plusPtr` (size st*off)) + +peekArray' :: Storable' a -> Int -> Ptr a -> IO [a] +peekArray' st len ptr = mapM (peekElemOff' st ptr) [0..len-1] + +pokeArray' :: Storable' a -> Ptr a -> [a] -> IO () +pokeArray' st ptr xs = zipWithM_ (pokeElemOff' st ptr) [0..] xs + +withArray' :: Storable' a -> [a] -> (Ptr a -> Int -> IO b) -> IO b +withArray' st xs f = allocaBytes (size st * len) $ \ ptr -> do + pokeArray' st ptr xs + f ptr len + where len = length xs + +---------------------------------------------------------------- +-- Point +---------------------------------------------------------------- + +type Point = + ( Position -- x + , Position -- y + ) + +s_Point :: Storable' Point +s_Point = Storable' #{size XPoint} peekPoint pokePoint + +peekPoint :: Ptr Point -> IO Point +peekPoint p = do + x <- peekPositionField p #{offset XPoint,x} + y <- peekPositionField p #{offset XPoint,y} + return (x,y) + +pokePoint :: Ptr Point -> Point -> IO () +pokePoint p (x,y) = do + pokePositionField p #{offset XPoint,x} x + pokePositionField p #{offset XPoint,y} y + +peekPointArray :: Int -> Ptr Point -> IO [Point] +peekPointArray = peekArray' s_Point + +withPointArray :: [Point] -> (Ptr Point -> Int -> IO b) -> IO b +withPointArray = withArray' s_Point + +---------------------------------------------------------------- +-- Rectangle +---------------------------------------------------------------- + +type Rectangle = + ( Position -- x + , Position -- y + , Dimension -- width + , Dimension -- height + ) + +s_Rectangle :: Storable' Rectangle +s_Rectangle = Storable' #{size XRectangle} peekRectangle pokeRectangle + +peekRectangle :: Ptr Rectangle -> IO Rectangle +peekRectangle p = do + x <- peekPositionField p #{offset XRectangle,x} + y <- peekPositionField p #{offset XRectangle,y} + width <- peekDimensionField p #{offset XRectangle,width} + height <- peekDimensionField p #{offset XRectangle,height} + return (x,y,width,height) + +pokeRectangle :: Ptr Rectangle -> Rectangle -> IO () +pokeRectangle p (x,y,width,height) = do + pokePositionField p #{offset XRectangle,x} x + pokePositionField p #{offset XRectangle,y} y + pokeDimensionField p #{offset XRectangle,width} width + pokeDimensionField p #{offset XRectangle,height} height + +allocaRectangle :: (Ptr Rectangle -> IO a) -> IO a +allocaRectangle = alloca' s_Rectangle + +withRectangle :: Rectangle -> (Ptr Rectangle -> IO a) -> IO a +withRectangle = withStorable' s_Rectangle + +peekRectangleArray :: Int -> Ptr Rectangle -> IO [Rectangle] +peekRectangleArray = peekArray' s_Rectangle + +withRectangleArray :: [Rectangle] -> (Ptr Rectangle -> Int -> IO b) -> IO b +withRectangleArray = withArray' s_Rectangle + +---------------------------------------------------------------- +-- Arc +---------------------------------------------------------------- + +type Arc = + ( Position -- x + , Position -- y + , Dimension -- width + , Dimension -- height + , Angle -- angle1 + , Angle -- angle2 + ) + +s_Arc :: Storable' Arc +s_Arc = Storable' #{size XArc} peekArc pokeArc + +peekArc :: Ptr Arc -> IO Arc +peekArc p = do + x <- peekPositionField p #{offset XArc,x} + y <- peekPositionField p #{offset XArc,y} + width <- peekDimensionField p #{offset XArc,width} + height <- peekDimensionField p #{offset XArc,height} + angle1 <- peekAngleField p #{offset XArc,angle1} + angle2 <- peekAngleField p #{offset XArc,angle2} + return (x,y,width,height,angle1,angle2) + +pokeArc :: Ptr Arc -> Arc -> IO () +pokeArc p (x,y,width,height,angle1,angle2) = do + pokePositionField p #{offset XArc,x} x + pokePositionField p #{offset XArc,y} y + pokeDimensionField p #{offset XArc,width} width + pokeDimensionField p #{offset XArc,height} height + pokeAngleField p #{offset XArc,angle1} angle1 + pokeAngleField p #{offset XArc,angle2} angle2 + +peekArcArray :: Int -> Ptr Arc -> IO [Arc] +peekArcArray = peekArray' s_Arc + +withArcArray :: [Arc] -> (Ptr Arc -> Int -> IO b) -> IO b +withArcArray = withArray' s_Arc + +---------------------------------------------------------------- +-- Segment +---------------------------------------------------------------- + +type Segment = + ( Position -- x1 + , Position -- y1 + , Position -- x2 + , Position -- y2 + ) + +s_Segment :: Storable' Segment +s_Segment = Storable' #{size XSegment} peekSegment pokeSegment + +peekSegment :: Ptr Segment -> IO Segment +peekSegment p = do + x1 <- peekPositionField p #{offset XSegment,x1} + y1 <- peekPositionField p #{offset XSegment,y1} + x2 <- peekPositionField p #{offset XSegment,x2} + y2 <- peekPositionField p #{offset XSegment,y2} + return (x1,y1,x2,y2) + +pokeSegment :: Ptr Segment -> Segment -> IO () +pokeSegment p (x1,y1,x2,y2) = do + pokePositionField p #{offset XSegment,x1} x1 + pokePositionField p #{offset XSegment,y1} y1 + pokePositionField p #{offset XSegment,x2} x2 + pokePositionField p #{offset XSegment,y2} y2 + +peekSegmentArray :: Int -> Ptr Segment -> IO [Segment] +peekSegmentArray = peekArray' s_Segment + +withSegmentArray :: [Segment] -> (Ptr Segment -> Int -> IO b) -> IO b +withSegmentArray = withArray' s_Segment + +---------------------------------------------------------------- +-- Color +---------------------------------------------------------------- + +type Color = + ( Pixel -- pixel + , Word16 -- red + , Word16 -- green + , Word16 -- blue + , Word8 -- flags + ) + +s_Color :: Storable' Color +s_Color = Storable' #{size XColor} peekColor pokeColor + +peekColor :: Ptr Color -> IO Color +peekColor p = do + pixel <- #{peek XColor,pixel} p + red <- #{peek XColor,red} p + green <- #{peek XColor,green} p + blue <- #{peek XColor,blue} p + flags <- #{peek XColor,flags} p + return (pixel,red,green,blue,flags) + +pokeColor :: Ptr Color -> Color -> IO () +pokeColor p (pixel,red,green,blue,flags) = do + #{poke XColor,pixel} p pixel + #{poke XColor,red} p red + #{poke XColor,green} p green + #{poke XColor,blue} p blue + #{poke XColor,flags} p flags + +allocaColor :: (Ptr Color -> IO a) -> IO a +allocaColor = alloca' s_Color + +withColor :: Color -> (Ptr Color -> IO a) -> IO a +withColor = withStorable' s_Color + +peekColorArray :: Int -> Ptr Color -> IO [Color] +peekColorArray = peekArray' s_Color + +withColorArray :: [Color] -> (Ptr Color -> Int -> IO b) -> IO b +withColorArray = withArray' s_Color + +---------------------------------------------------------------- +-- Backwards compatibility +---------------------------------------------------------------- + +type ListPoint = [Point] +type ListRectangle = [Rectangle] +type ListArc = [Arc] +type ListSegment = [Segment] +type ListColor = [Color] + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Window.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib.Window --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of GreenCard declarations for interfacing with Xlib Windows. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib.Window( - storeName, - createSimpleWindow, - createWindow, - translateCoordinates, - moveResizeWindow, - resizeWindow, - moveWindow, - reparentWindow, - mapSubwindows, - unmapSubwindows, - mapWindow, - lowerWindow, - raiseWindow, - circulateSubwindowsDown, - circulateSubwindowsUp, - circulateSubwindows, - iconifyWindow, - withdrawWindow, - destroyWindow, - destroySubwindows, - setWindowBorder, - setWindowBorderPixmap, - setWindowBorderWidth, - setWindowBackground, - setWindowBackgroundPixmap, - setWindowColormap, - addToSaveSet, - removeFromSaveSet, - changeSaveSet, - clearWindow, - clearArea, - restackWindows, - - ) where - -import Foreign.GreenCard -import Graphics.X11.Types -import Graphics.X11.Xlib.Types - -%#include "HsXlib.h" - -%prefix X - ----------------------------------------------------------------- --- Windows ----------------------------------------------------------------- - -%fun XStoreName :: Display -> Window -> String -> IO () -%fun XCreateSimpleWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Int -> Pixel -> Pixel -> IO Window - -%fun XCreateWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Int -> Int -> WindowClass -> Visual -> AttributeMask -> XSetWindowAttributesPtr -> IO Window - ----------------------------------------------------------------- - ---ToDo: find an effective way to use Maybes -%fun XTranslateCoordinates :: Display -> Window -> Window -> Position -> Position -> IO (Bool,Position,Position,Window) -%code res1 = XTranslateCoordinates(arg1,arg2,arg3,arg4,arg5,&res2,&res3,&res4) - -%fun XMoveResizeWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> IO () -%fun XResizeWindow :: Display -> Window -> Dimension -> Dimension -> IO () -%fun XMoveWindow :: Display -> Window -> Position -> Position -> IO () -%fun XReparentWindow :: Display -> Window -> Window -> Position -> Position -> IO () -%fun XMapSubwindows :: Display -> Window -> IO () -%fun XUnmapSubwindows :: Display -> Window -> IO () -%fun XMapWindow :: Display -> Window -> IO () --- Disnae exist: %fun XUnmapWindows :: Display -> Window -> IO () --- Disnae exist: %fun XMapRaisedWindow :: Display -> Window -> IO () -%fun XLowerWindow :: Display -> Window -> IO () -%fun XRaiseWindow :: Display -> Window -> IO () -%fun XCirculateSubwindowsDown :: Display -> Window -> IO () -%fun XCirculateSubwindowsUp :: Display -> Window -> IO () -%fun XCirculateSubwindows :: Display -> Window -> CirculationDirection -> IO () -%fun XIconifyWindow :: Display -> Window -> ScreenNumber -> IO () -%code Status err = XIconifyWindow(arg1,arg2,arg3) -%fail { Success != err }{ BadStatus(err,XIconifyWindow) } -%fun XWithdrawWindow :: Display -> Window -> ScreenNumber -> IO () -%code Status err = XWithdrawWindow(arg1,arg2,arg3) -%fail { Success != err }{ BadStatus(err,XWithdrawWindow) } -%fun XDestroyWindow :: Display -> Window -> IO () -%fun XDestroySubwindows :: Display -> Window -> IO () - -%fun XSetWindowBorder :: Display -> Window -> Pixel -> IO () -%fun XSetWindowBorderPixmap :: Display -> Window -> Pixmap -> IO () -%fun XSetWindowBorderWidth :: Display -> Window -> Dimension -> IO () -%fun XSetWindowBackground :: Display -> Window -> Pixel -> IO () -%fun XSetWindowBackgroundPixmap :: Display -> Window -> Pixmap -> IO () -%fun XSetWindowColormap :: Display -> Window -> Colormap -> IO () - -%fun XAddToSaveSet :: Display -> Window -> IO () -%fun XRemoveFromSaveSet :: Display -> Window -> IO () -%fun XChangeSaveSet :: Display -> Window -> ChangeSaveSetMode -> IO () - -%fun XClearWindow :: Display -> Window -> IO () -%fun XClearArea :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> Bool -> IO () - --- -- This is almost good enough - but doesn't call XFree --- -- %errfun BadStatus XQueryTree :: Display -> Window -> IO (Window, Window, ListWindow) using err = XQueryTree(arg1,arg2,&res1,&res2,&res3,&res3_size) --- %prim XQueryTree :: Display -> Window -> IO (Window, Window, ListWindow) --- Window root_w, parent; --- Int children_size; --- Window *children; --- Status r = XQueryTree(arg1,arg2,&root_w, &parent, &children, &children_size); --- if (Success != r) { %failWith(BadStatus,r); } --- %update(root_w,parent,children); --- XFree(children); --- return; - -%fun XRestackWindows :: Display -> ListWindow -> IO () -%call (display arg1) (listWindow arg2 arg2_size) -%code XRestackWindows(arg1, arg2, arg2_size) - --- -- ToDo: I want to be able to write this --- -- %fun XListInstalledColormaps :: Display -> Window -> IO ListColormap using res1 = XListInstalledColormaps(arg1,arg2,&res1_size) --- -- But I have to write this instead - need to add a notion of cleanup code! --- %prim XListInstalledColormaps :: Display -> Window -> IO ListColormap --- Int r_size; --- Colormap* r = XListInstalledColormaps(arg1,arg2,&r_size); --- %update(r); --- XFree(r); --- return; --- --- -- Again, this is almost good enough --- -- %errfun BadStatus XGetCommand :: Display -> Window -> IO ListString using err = XGetCommand(arg1,arg2,&res1,&res1_size) --- -- but not quite --- -- %prim XGetCommand :: Display -> Window -> IO ListString --- --Int argv_size; --- --String *argv; --- --Status r = XGetCommand(arg1,arg2,&argv,&argv_size); --- --if (Success != r) { %failWith(BadStatus, r); } --- -- %update(argv); --- --XFreeStringList(argv); --- --return; --- --- -- %fun XSetCommand :: Display -> Window -> ListString -> IO () using XSetCommand(arg1,arg2,arg3,res3_size) --- --- %errfun BadStatus XGetTransientForHint :: Display -> Window -> IO Window using err = XGetTransientForHint(arg1,arg2,&res1) --- --- %fun XSetTransientForHint :: Display -> Window -> Window -> IO () --- --- -- XRotateWindowProperties omitted --- -- XGetWindowProperty omitted --- --- -- XGetWindowAttributes omitted --- -- XChangeWindowAttributes omitted - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib/Window.gc hunk ./Graphics/X11/Xlib/Window.hs 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Window +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of FFI declarations for interfacing with Xlib Windows. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Window( + storeName, + createSimpleWindow, + createWindow, + translateCoordinates, + moveResizeWindow, + resizeWindow, + moveWindow, + reparentWindow, + mapSubwindows, + unmapSubwindows, + mapWindow, + lowerWindow, + raiseWindow, + circulateSubwindowsDown, + circulateSubwindowsUp, + circulateSubwindows, + iconifyWindow, + withdrawWindow, + destroyWindow, + destroySubwindows, + setWindowBorder, + setWindowBorderPixmap, + setWindowBorderWidth, + setWindowBackground, + setWindowBackgroundPixmap, + setWindowColormap, + addToSaveSet, + removeFromSaveSet, + changeSaveSet, + clearWindow, + clearArea, + restackWindows, + + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +import Foreign +import Foreign.C + +---------------------------------------------------------------- +-- Windows +---------------------------------------------------------------- + +storeName :: Display -> Window -> String -> IO () +storeName display window name = + withCString name $ \ c_name -> + xStoreName display window c_name +foreign import ccall unsafe "HsXlib.h XStoreName" + xStoreName :: Display -> Window -> CString -> IO () + +foreign import ccall unsafe "HsXlib.h XCreateSimpleWindow" + createSimpleWindow :: Display -> Window -> Position -> Position -> + Dimension -> Dimension -> Int -> Pixel -> Pixel -> IO Window + +foreign import ccall unsafe "HsXlib.h XCreateWindow" + createWindow :: Display -> Window -> Position -> Position -> + Dimension -> Dimension -> Int -> Int -> WindowClass -> + Visual -> AttributeMask -> XSetWindowAttributesPtr -> IO Window + +---------------------------------------------------------------- + +--ToDo: find an effective way to use Maybes +translateCoordinates :: Display -> Window -> Window -> Position -> Position -> + IO (Bool,Position,Position,Window) +translateCoordinates display src_w dest_w src_x src_y = + alloca $ \ dest_x_return -> + alloca $ \ dest_y_return -> + alloca $ \ child_return -> do + res <- xTranslateCoordinates display src_w dest_w src_x src_y + dest_x_return dest_y_return child_return + dest_x <- peek dest_x_return + dest_y <- peek dest_y_return + child <- peek child_return + return (res, dest_x, dest_y, child) +foreign import ccall unsafe "HsXlib.h XTranslateCoordinates" + xTranslateCoordinates :: Display -> Window -> Window -> + Position -> Position -> + Ptr Position -> Ptr Position -> Ptr Window -> IO Bool + +foreign import ccall unsafe "HsXlib.h XMoveResizeWindow" + moveResizeWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> IO () +foreign import ccall unsafe "HsXlib.h XResizeWindow" + resizeWindow :: Display -> Window -> Dimension -> Dimension -> IO () +foreign import ccall unsafe "HsXlib.h XMoveWindow" + moveWindow :: Display -> Window -> Position -> Position -> IO () +foreign import ccall unsafe "HsXlib.h XReparentWindow" + reparentWindow :: Display -> Window -> Window -> Position -> Position -> IO () +foreign import ccall unsafe "HsXlib.h XMapSubwindows" + mapSubwindows :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XUnmapSubwindows" + unmapSubwindows :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XMapWindow" + mapWindow :: Display -> Window -> IO () +-- Disnae exist: %fun XUnmapWindows :: Display -> Window -> IO () +-- Disnae exist: %fun XMapRaisedWindow :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XLowerWindow" + lowerWindow :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XRaiseWindow" + raiseWindow :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XCirculateSubwindowsDown" + circulateSubwindowsDown :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XCirculateSubwindowsUp" + circulateSubwindowsUp :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XCirculateSubwindows" + circulateSubwindows :: Display -> Window -> CirculationDirection -> IO () + +iconifyWindow :: Display -> Window -> ScreenNumber -> IO () +iconifyWindow display window screenno = + throwUnlessSuccess "iconifyWindow" + (xIconifyWindow display window screenno) +foreign import ccall unsafe "HsXlib.h XIconifyWindow" + xIconifyWindow :: Display -> Window -> ScreenNumber -> IO Status + +withdrawWindow :: Display -> Window -> ScreenNumber -> IO () +withdrawWindow display window screenno = + throwUnlessSuccess "withdrawWindow" + (xWithdrawWindow display window screenno) +foreign import ccall unsafe "HsXlib.h XWithdrawWindow" + xWithdrawWindow :: Display -> Window -> ScreenNumber -> IO Status + +foreign import ccall unsafe "HsXlib.h XDestroyWindow" + destroyWindow :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XDestroySubwindows" + destroySubwindows :: Display -> Window -> IO () + +foreign import ccall unsafe "HsXlib.h XSetWindowBorder" + setWindowBorder :: Display -> Window -> Pixel -> IO () +foreign import ccall unsafe "HsXlib.h XSetWindowBorderPixmap" + setWindowBorderPixmap :: Display -> Window -> Pixmap -> IO () +foreign import ccall unsafe "HsXlib.h XSetWindowBorderWidth" + setWindowBorderWidth :: Display -> Window -> Dimension -> IO () +foreign import ccall unsafe "HsXlib.h XSetWindowBackground" + setWindowBackground :: Display -> Window -> Pixel -> IO () +foreign import ccall unsafe "HsXlib.h XSetWindowBackgroundPixmap" + setWindowBackgroundPixmap :: Display -> Window -> Pixmap -> IO () +foreign import ccall unsafe "HsXlib.h XSetWindowColormap" + setWindowColormap :: Display -> Window -> Colormap -> IO () + +foreign import ccall unsafe "HsXlib.h XAddToSaveSet" + addToSaveSet :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XRemoveFromSaveSet" + removeFromSaveSet :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XChangeSaveSet" + changeSaveSet :: Display -> Window -> ChangeSaveSetMode -> IO () + +foreign import ccall unsafe "HsXlib.h XClearWindow" + clearWindow :: Display -> Window -> IO () +foreign import ccall unsafe "HsXlib.h XClearArea" + clearArea :: Display -> Window -> + Position -> Position -> Dimension -> Dimension -> Bool -> IO () + +-- -- This is almost good enough - but doesn't call XFree +-- -- %errfun BadStatus XQueryTree :: Display -> Window -> IO (Window, Window, ListWindow) using err = XQueryTree(arg1,arg2,&res1,&res2,&res3,&res3_size) +-- %prim XQueryTree :: Display -> Window -> IO (Window, Window, ListWindow) +-- Window root_w, parent; +-- Int children_size; +-- Window *children; +-- Status r = XQueryTree(arg1,arg2,&root_w, &parent, &children, &children_size); +-- if (Success != r) { %failWith(BadStatus,r); } +-- %update(root_w,parent,children); +-- XFree(children); +-- return; + +restackWindows :: Display -> [Window] -> IO () +restackWindows display windows = + withArray windows $ \ window_array -> + xRestackWindows display window_array (length windows) +foreign import ccall unsafe "HsXlib.h XRestackWindows" + xRestackWindows :: Display -> Ptr Window -> Int -> IO () + +-- -- ToDo: I want to be able to write this +-- -- %fun XListInstalledColormaps :: Display -> Window -> IO ListColormap using res1 = XListInstalledColormaps(arg1,arg2,&res1_size) +-- -- But I have to write this instead - need to add a notion of cleanup code! +-- %prim XListInstalledColormaps :: Display -> Window -> IO ListColormap +-- Int r_size; +-- Colormap* r = XListInstalledColormaps(arg1,arg2,&r_size); +-- %update(r); +-- XFree(r); +-- return; +-- +-- -- Again, this is almost good enough +-- -- %errfun BadStatus XGetCommand :: Display -> Window -> IO ListString using err = XGetCommand(arg1,arg2,&res1,&res1_size) +-- -- but not quite +-- -- %prim XGetCommand :: Display -> Window -> IO ListString +-- --Int argv_size; +-- --String *argv; +-- --Status r = XGetCommand(arg1,arg2,&argv,&argv_size); +-- --if (Success != r) { %failWith(BadStatus, r); } +-- -- %update(argv); +-- --XFreeStringList(argv); +-- --return; +-- +-- -- %fun XSetCommand :: Display -> Window -> ListString -> IO () using XSetCommand(arg1,arg2,arg3,res3_size) +-- +-- %errfun BadStatus XGetTransientForHint :: Display -> Window -> IO Window using err = XGetTransientForHint(arg1,arg2,&res1) +-- +-- %fun XSetTransientForHint :: Display -> Window -> Window -> IO () +-- +-- -- XRotateWindowProperties omitted +-- -- XGetWindowProperty omitted +-- +-- -- XGetWindowAttributes omitted +-- -- XChangeWindowAttributes omitted + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib.gc 1 ------------------------------------------------------------------------------ --- | --- Module : Graphics.X11.Xlib --- Copyright : (c) Alastair Reid, 1999-2003 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : provisional --- Portability : portable --- --- A collection of GreenCard declarations for interfacing with Xlib. --- ------------------------------------------------------------------------------ - -module Graphics.X11.Xlib - ( module Graphics.X11.Types, - free, - - module Graphics.X11.Xlib.Types, - module Graphics.X11.Xlib.Event, - module Graphics.X11.Xlib.Display, - module Graphics.X11.Xlib.Screen, - module Graphics.X11.Xlib.Window, - module Graphics.X11.Xlib.Context, - module Graphics.X11.Xlib.Color, - module Graphics.X11.Xlib.Font, - module Graphics.X11.Xlib.Atom, - module Graphics.X11.Xlib.Region, - module Graphics.X11.Xlib.Misc, - - ) where - -import Graphics.X11.Types -import Graphics.X11.Xlib.Types -import Graphics.X11.Xlib.Event -import Graphics.X11.Xlib.Display -import Graphics.X11.Xlib.Screen -import Graphics.X11.Xlib.Window -import Graphics.X11.Xlib.Context -import Graphics.X11.Xlib.Color -import Graphics.X11.Xlib.Font -import Graphics.X11.Xlib.Atom -import Graphics.X11.Xlib.Region -import Graphics.X11.Xlib.Misc - -import Foreign.GreenCard - -%#include "HsXlib.h" - -%prefix X - ----------------------------------------------------------------- --- End ----------------------------------------------------------------- rmfile ./Graphics/X11/Xlib.gc hunk ./Graphics/X11/Xlib.hs 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of FFI declarations for interfacing with Xlib. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib + ( module Graphics.X11.Types, + free, + + module Graphics.X11.Xlib.Types, + module Graphics.X11.Xlib.Event, + module Graphics.X11.Xlib.Display, + module Graphics.X11.Xlib.Screen, + module Graphics.X11.Xlib.Window, + module Graphics.X11.Xlib.Context, + module Graphics.X11.Xlib.Color, + module Graphics.X11.Xlib.Font, + module Graphics.X11.Xlib.Atom, + module Graphics.X11.Xlib.Region, + module Graphics.X11.Xlib.Misc, + + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types +import Graphics.X11.Xlib.Event +import Graphics.X11.Xlib.Display +import Graphics.X11.Xlib.Screen +import Graphics.X11.Xlib.Window +import Graphics.X11.Xlib.Context +import Graphics.X11.Xlib.Color +import Graphics.X11.Xlib.Font +import Graphics.X11.Xlib.Atom +import Graphics.X11.Xlib.Region +import Graphics.X11.Xlib.Misc + +import Foreign.Marshal.Alloc( free ) + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Makefile 2 -# $Id: Makefile,v 1.14 2003/06/26 12:36:36 reid Exp $ +# $Id: Makefile,v 1.15 2004/02/16 18:01:25 ross Exp $ hunk ./Makefile 16 -PACKAGE_DEPS = greencard haskell98 +PACKAGE_DEPS = hunk ./Makefile 22 +SRC_HSC2HS_OPTS += -Iinclude hunk ./cbits/fdset.c 1 +#include "HsXlib.h" + +void fdZero(fd_set *set) { FD_ZERO(set); } +void fdSet(int fd, fd_set *set) { FD_SET(fd, set); } hunk ./include/HsXlib.h 2 - * $Id: HsXlib.h,v 1.2 2003/05/08 16:00:20 ross Exp $ + * $Id: HsXlib.h,v 1.3 2004/02/16 18:01:29 ross Exp $ hunk ./include/HsXlib.h 4 - * Definitions for package `lang' which are visible in Haskell land. + * Definitions for package `X11' which are visible in Haskell land. hunk ./include/HsXlib.h 23 -/* These macros are used to generate error messages in GreenCard code */ -#define ErrorMsg(where,what) "Error " what " raised in function " #where - -#define NullPtr(where) ErrorMsg(where,"null ptr") -#define BadStatus(err,where) ErrorMsg(where,"bad status") -#define Zero(err,where) ErrorMsg(where,"zero") - -/* AllPlanes is a macro so we can't call it. - * For now we can get round this by defining a macro that looks like - * it is a function. (Slightly illegal under the ffi spec.) - */ -#define AllPlanes_aux() AllPlanes - -/* This error handler is used from GreenCard code. +/* This error handler is used from FFI code. hunk ./include/HsXlib.h 29 -/* Used in waitForTimeout */ +/* Used in waitForEvent */ +#include hunk ./include/HsXlib.h 35 +extern void fdZero(fd_set *set); +extern void fdSet(int fd, fd_set *set); + hunk ./Graphics/X11/Types.hsc 1502 --- #{enum Ordering, +-- {enum Ordering, hunk ./Graphics/X11/Xlib/Misc.hsc 688 -noSymbol = #{const NoSymbol} :: KeySym +noSymbol :: KeySym +noSymbol = #{const NoSymbol} hunk ./Graphics/X11/Xlib/Region.hs 59 -rectangleOut = 0 :: RectInRegionResult -rectangleIn = 1 :: RectInRegionResult -rectanglePart = 2 :: RectInRegionResult +rectangleOut, rectangleIn, rectanglePart :: RectInRegionResult +rectangleOut = 0 +rectangleIn = 1 +rectanglePart = 2 addfile ./include/Makefile hunk ./Makefile 2 -# $Id: Makefile,v 1.15 2004/02/16 18:01:25 ross Exp $ +# $Id: Makefile,v 1.16 2004/03/07 01:04:23 ross Exp $ hunk ./Makefile 4 -TOP = . +TOP = .. hunk ./Makefile 9 -SUBDIRS = fptools cbits doc +SUBDIRS = cbits doc include hunk ./Makefile 16 -PACKAGE_DEPS = +PACKAGE_DEPS = base hunk ./Makefile 18 -SRC_CC_OPTS += -Iinclude -I. +SRC_CC_OPTS += -Iinclude $(X_CFLAGS) hunk ./Makefile 20 -SRC_HC_OPTS += -cpp -fglasgow-exts -fffi -SRC_HC_OPTS += -Iinclude -SRC_HSC2HS_OPTS += -Iinclude +SRC_HC_OPTS += -cpp -fffi +SRC_HC_OPTS += -Iinclude $(X_CFLAGS) +SRC_HSC2HS_OPTS += -Iinclude $(X_CFLAGS) hunk ./Makefile 24 -SRC_HADDOCK_OPTS += -t "X11 Libraries (${PACKAGE} package)" +SRC_HADDOCK_OPTS += -t "X11 Libraries ($(PACKAGE) package)" hunk ./Makefile 28 -PACKAGE_CPP_OPTS += -DX_CFLAGS='$(patsubst %,"%"$(comma), $(X_CFLAGS))' -PACKAGE_CPP_OPTS += -DX_LIBS='$(patsubst %, "%"$(comma), $(X_LIBS))' +PACKAGE_CPP_OPTS += -DX_CFLAGS='$(patsubst %,$(comma)"%", $(X_CFLAGS))' +PACKAGE_CPP_OPTS += -DX_LIBS='$(patsubst %, $(comma)"%", $(X_LIBS))' hunk ./cbits/Makefile 3 -# $Id: Makefile,v 1.3 2003/05/22 11:14:30 reid Exp $ +# $Id: Makefile,v 1.4 2004/03/07 01:04:23 ross Exp $ hunk ./cbits/Makefile 5 -TOP = .. +TOP = ../.. hunk ./doc/Makefile 2 -# $Id: Makefile,v 1.1 2003/05/22 14:16:41 reid Exp $ +# $Id: Makefile,v 1.2 2004/03/07 01:04:24 ross Exp $ hunk ./doc/Makefile 4 -TOP = .. +TOP = ../.. hunk ./include/Makefile 1 +# ----------------------------------------------------------------------------- + +TOP = ../.. +include $(TOP)/mk/boilerplate.mk + +H_FILES = $(wildcard *.h) + +includedir = $(libdir)/include +INSTALL_INCLUDES = $(H_FILES) + +include $(TOP)/mk/target.mk hunk ./package.conf.in 2 - name = PACKAGE, + name = "X11", hunk ./package.conf.in 4 - import_dirs = [ LIBDIR"/imports" ], +#ifdef INSTALLING + import_dirs = [ "$libdir/imports" ], +#else + import_dirs = [ "$libdir/libraries/X11" ], +#endif hunk ./package.conf.in 10 - library_dirs = [ LIBDIR ], - hs_libraries = [ LIBRARY ], - extra_libraries = [ "HSX11_cbits", "X11" ], +#ifdef INSTALLING + library_dirs = [ "$libdir" ], +#else + library_dirs = [ "$libdir/libraries/X11", + "$libdir/libraries/X11/cbits" ], +#endif + hs_libraries = [ "HSX11" ], + extra_libraries = [ "HSX11_cbits" ], +#ifdef INSTALLING hunk ./package.conf.in 20 - c_includes = [ ], - package_deps = [ PACKAGE_DEPS ], +#else + include_dirs = [ "$libdir/libraries/X11/include" ], +#endif + c_includes = [ "HsXlib.h" ], + package_deps = [ "base" ], hunk ./package.conf.in 17 - extra_libraries = [ "HSX11_cbits" ], + extra_libraries = [ "HSX11_cbits", "X11" ], addfile ./prologue.txt hunk ./prologue.txt 1 +A Haskell binding for X11. hunk ./Graphics/X11/Types.hsc 30 + KeyCode, + + -- * Enumeration types + -- | These types were introduced to make function types clearer. + -- Note that the types are synonyms for 'Int', so no extra + -- typesafety was obtained. + + -- ** Key symbols hunk ./Graphics/X11/Types.hsc 40 - KeyCode, hunk ./Graphics/X11/Types.hsc 384 + -- ** Event masks hunk ./Graphics/X11/Types.hsc 413 + -- ** Event types hunk ./Graphics/X11/Types.hsc 450 + -- ** Modifiers hunk ./Graphics/X11/Types.hsc 462 + -- ** Key masks hunk ./Graphics/X11/Types.hsc 473 + -- ** Button masks hunk ./Graphics/X11/Types.hsc 481 + -- ** Buttons hunk ./Graphics/X11/Types.hsc 489 + -- ** Notify modes hunk ./Graphics/X11/Types.hsc 497 + -- ** Notify details hunk ./Graphics/X11/Types.hsc 508 + -- ** Visibility hunk ./Graphics/X11/Types.hsc 514 + -- ** Place of window hunk ./Graphics/X11/Types.hsc 519 + -- ** Protocols hunk ./Graphics/X11/Types.hsc 525 + -- ** Property notification hunk ./Graphics/X11/Types.hsc 530 + -- ** Colormap notification hunk ./Graphics/X11/Types.hsc 535 + -- ** Grab modes hunk ./Graphics/X11/Types.hsc 540 + -- ** Grab status hunk ./Graphics/X11/Types.hsc 548 + -- ** Allow events hunk ./Graphics/X11/Types.hsc 559 + -- ** Focus modes hunk ./Graphics/X11/Types.hsc 565 + -- ** Return status hunk ./Graphics/X11/Types.hsc 588 + -- *** Exceptions hunk ./Graphics/X11/Types.hsc 592 + -- ** WindowClass hunk ./Graphics/X11/Types.hsc 598 + -- ** Attribute masks hunk ./Graphics/X11/Types.hsc 616 + -- ** Close down modes hunk ./Graphics/X11/Types.hsc 622 + -- ** QueryBestSize classes hunk ./Graphics/X11/Types.hsc 628 + -- ** Graphics functions hunk ./Graphics/X11/Types.hsc 647 + -- ** Line styles hunk ./Graphics/X11/Types.hsc 653 + -- ** Cap styles hunk ./Graphics/X11/Types.hsc 660 + -- ** Join styles hunk ./Graphics/X11/Types.hsc 666 + -- ** Fill styles hunk ./Graphics/X11/Types.hsc 673 + -- ** Fill rules hunk ./Graphics/X11/Types.hsc 678 + -- ** Subwindow modes hunk ./Graphics/X11/Types.hsc 683 + -- ** Coordinate modes hunk ./Graphics/X11/Types.hsc 688 + -- ** Polygon shapes hunk ./Graphics/X11/Types.hsc 694 + -- ** Arc modes hunk ./Graphics/X11/Types.hsc 699 + -- ** GC masks hunk ./Graphics/X11/Types.hsc 726 + -- ** Circulation direction hunk ./Graphics/X11/Types.hsc 731 + -- ** Byte order hunk ./Graphics/X11/Types.hsc 736 + -- ** ColormapAlloc hunk ./Graphics/X11/Types.hsc 741 + -- ** Mapping requests hunk ./Graphics/X11/Types.hsc 747 + -- ** ChangeSaveSetMode hunk ./Graphics/X11/Types.hsc 752 + -- ** Bit gravity hunk ./Graphics/X11/Types.hsc 766 + -- ** Window gravity hunk ./Graphics/X11/Types.hsc 770 + -- ** Backing store hunk ./Graphics/X11/Types.hsc 779 + -- ** Font direction hunk ./Graphics/X11/Types.hsc 1335 --- Window's place relative to siblings (used in Circulation requests/events) +-- | Place of window relative to siblings +-- (used in Circulation requests or events) hunk ./Graphics/X11/Xlib/Atom.hsc 102 + +-- | interface to the X11 library function @XInternAtom()@. hunk ./Graphics/X11/Xlib/Color.hs 43 +-- | interface to the X11 library function @XLookupColor()@. hunk ./Graphics/X11/Xlib/Color.hs 59 +-- | interface to the X11 library function @XAllocNamedColor()@. hunk ./Graphics/X11/Xlib/Color.hs 75 +-- | interface to the X11 library function @XAllocColor()@. hunk ./Graphics/X11/Xlib/Color.hs 85 +-- | interface to the X11 library function @XParseColor()@. hunk ./Graphics/X11/Xlib/Color.hs 102 +-- | interface to the X11 library function @XFreeColors()@. hunk ./Graphics/X11/Xlib/Color.hs 110 +-- | interface to the X11 library function @XStoreColor()@. hunk ./Graphics/X11/Xlib/Color.hs 122 +-- | interface to the X11 library function @XQueryColor()@. hunk ./Graphics/X11/Xlib/Color.hs 131 +-- | interface to the X11 library function @XQueryColors()@. hunk ./Graphics/X11/Xlib/Color.hs 140 +-- | interface to the X11 library function @XInstallColormap()@. hunk ./Graphics/X11/Xlib/Color.hs 143 + +-- | interface to the X11 library function @XUninstallColormap()@. hunk ./Graphics/X11/Xlib/Color.hs 147 + +-- | interface to the X11 library function @XCopyColormapAndFree()@. hunk ./Graphics/X11/Xlib/Color.hs 151 + +-- | interface to the X11 library function @XCreateColormap()@. hunk ./Graphics/X11/Xlib/Color.hs 155 + +-- | interface to the X11 library function @XFreeColormap()@. hunk ./Graphics/X11/Xlib/Context.hs 56 +-- | interface to the X11 library function @XSetArcMode()@. hunk ./Graphics/X11/Xlib/Context.hs 59 + +-- | interface to the X11 library function @XSetBackground()@. hunk ./Graphics/X11/Xlib/Context.hs 63 + +-- | interface to the X11 library function @XSetForeground()@. hunk ./Graphics/X11/Xlib/Context.hs 67 + +-- | interface to the X11 library function @XSetFunction()@. hunk ./Graphics/X11/Xlib/Context.hs 71 + +-- | interface to the X11 library function @XSetGraphicsExposures()@. hunk ./Graphics/X11/Xlib/Context.hs 75 + +-- | interface to the X11 library function @XSetClipMask()@. hunk ./Graphics/X11/Xlib/Context.hs 79 + +-- | interface to the X11 library function @XSetClipOrigin()@. hunk ./Graphics/X11/Xlib/Context.hs 87 +-- | interface to the X11 library function @XSetDashes()@. hunk ./Graphics/X11/Xlib/Context.hs 94 + +-- | interface to the X11 library function @XSetFillRule()@. hunk ./Graphics/X11/Xlib/Context.hs 98 + +-- | interface to the X11 library function @XSetFillStyle()@. hunk ./Graphics/X11/Xlib/Context.hs 102 + +-- | interface to the X11 library function @XSetFont()@. hunk ./Graphics/X11/Xlib/Context.hs 106 + +-- | interface to the X11 library function @XSetLineAttributes()@. hunk ./Graphics/X11/Xlib/Context.hs 111 + +-- | interface to the X11 library function @XSetPlaneMask()@. hunk ./Graphics/X11/Xlib/Context.hs 115 + +-- | interface to the X11 library function @XSetState()@. hunk ./Graphics/X11/Xlib/Context.hs 120 + +-- | interface to the X11 library function @XSetStipple()@. hunk ./Graphics/X11/Xlib/Context.hs 124 + +-- | interface to the X11 library function @XSetSubwindowMode()@. hunk ./Graphics/X11/Xlib/Context.hs 128 + +-- | interface to the X11 library function @XSetTSOrigin()@. hunk ./Graphics/X11/Xlib/Context.hs 132 + +-- | interface to the X11 library function @XSetTile()@. hunk ./Graphics/X11/Xlib/Context.hs 138 +-- | partial interface to the X11 library function @XCreateGC()@. hunk ./Graphics/X11/Xlib/Context.hs 220 +-- | interface to the X11 library function @XGContextFromGC()@. hunk ./Graphics/X11/Xlib/Context.hs 224 +-- | interface to the X11 library function @XFreeGC()@. hunk ./Graphics/X11/Xlib/Context.hs 227 + +-- | interface to the X11 library function @XFlushGC()@. hunk ./Graphics/X11/Xlib/Context.hs 232 +-- | interface to the X11 library function @XCopyGC()@. hunk ./Graphics/X11/Xlib/Display.hs 63 +-- | interface to the X11 library function @XAllPlanes()@. hunk ./Graphics/X11/Xlib/Display.hs 66 + +-- | interface to the X11 library function @XBlackPixel()@. hunk ./Graphics/X11/Xlib/Display.hs 70 + +-- | interface to the X11 library function @XWhitePixel()@. hunk ./Graphics/X11/Xlib/Display.hs 82 + +-- | interface to the X11 library function @XConnectionNumber()@. hunk ./Graphics/X11/Xlib/Display.hs 87 +-- | interface to the X11 library function @XDefaultColormap()@. hunk ./Graphics/X11/Xlib/Display.hs 91 --- XListDepths :: Display -> ScreenNumber -> ListInt using res1 = XListDepths(arg1,arg2,&res1_size) +-- XListDepths :: Display -> ScreenNumber -> ListInt using res1 = XListDepths(arg1,arg2,&res1_size) hunk ./Graphics/X11/Xlib/Display.hs 93 +-- | interface to the X11 library function @XDefaultGC()@. hunk ./Graphics/X11/Xlib/Display.hs 96 + +-- | interface to the X11 library function @XDefaultDepth()@. hunk ./Graphics/X11/Xlib/Display.hs 100 + +-- | interface to the X11 library function @XDefaultScreen()@. hunk ./Graphics/X11/Xlib/Display.hs 104 + +-- | interface to the X11 library function @XDefaultScreenOfDisplay()@. hunk ./Graphics/X11/Xlib/Display.hs 108 + +-- | interface to the X11 library function @XDisplayHeight()@. hunk ./Graphics/X11/Xlib/Display.hs 112 + +-- | interface to the X11 library function @XDisplayHeightMM()@. hunk ./Graphics/X11/Xlib/Display.hs 116 + +-- | interface to the X11 library function @XDisplayWidth()@. hunk ./Graphics/X11/Xlib/Display.hs 120 + +-- | interface to the X11 library function @XDisplayWidthMM()@. hunk ./Graphics/X11/Xlib/Display.hs 124 + +-- | interface to the X11 library function @XMaxRequestSize()@. hunk ./Graphics/X11/Xlib/Display.hs 128 + +-- | interface to the X11 library function @XDisplayMotionBufferSize()@. hunk ./Graphics/X11/Xlib/Display.hs 134 +-- | interface to the X11 library function @XResourceManagerString()@. hunk ./Graphics/X11/Xlib/Display.hs 140 +-- | interface to the X11 library function @XScreenResourceString()@. hunk ./Graphics/X11/Xlib/Display.hs 146 +-- | interface to the X11 library function @DisplayString()@. hunk ./Graphics/X11/Xlib/Display.hs 152 +-- | interface to the X11 library function @ImageByteOrder()@. hunk ./Graphics/X11/Xlib/Display.hs 155 + +-- | interface to the X11 library function @ProtocolRevision()@. hunk ./Graphics/X11/Xlib/Display.hs 159 + +-- | interface to the X11 library function @ProtocolVersion()@. hunk ./Graphics/X11/Xlib/Display.hs 164 +-- | interface to the X11 library function @ServerVendor()@. hunk ./Graphics/X11/Xlib/Display.hs 171 + +-- | interface to the X11 library function @ScreenCount()@. hunk ./Graphics/X11/Xlib/Display.hs 175 + +-- | interface to the X11 library function @DefaultVisual()@. hunk ./Graphics/X11/Xlib/Display.hs 179 + +-- | interface to the X11 library function @DisplayCells()@. hunk ./Graphics/X11/Xlib/Display.hs 183 + +-- | interface to the X11 library function @DisplayPlanes()@. hunk ./Graphics/X11/Xlib/Display.hs 187 + +-- | interface to the X11 library function @ScreenOfDisplay()@. hunk ./Graphics/X11/Xlib/Display.hs 191 + +-- | interface to the X11 library function @DefaultRootWindow()@. hunk ./Graphics/X11/Xlib/Display.hs 198 +-- | interface to the X11 library function @XRootWindow()@. hunk ./Graphics/X11/Xlib/Display.hs 201 + +-- | interface to the X11 library function @XQLength()@. hunk ./Graphics/X11/Xlib/Display.hs 206 +-- | interface to the X11 library function @XNoOp()@. hunk ./Graphics/X11/Xlib/Display.hs 210 +-- | interface to the X11 library function @XOpenDisplay()@. hunk ./Graphics/X11/Xlib/Display.hs 219 +-- | interface to the X11 library function @XCloseDisplay()@. hunk ./Graphics/X11/Xlib/Display.hs 223 --- convert a CString owned by Xlib to a Haskell String +-- | convert a CString owned by Xlib to a Haskell String hunk ./Graphics/X11/Xlib/Event.hsc 178 - hunk ./Graphics/X11/Xlib/Event.hsc 333 - hunk ./Graphics/X11/Xlib/Event.hsc 384 + +-- | Reads an event with a timeout (in microseconds). hunk ./Graphics/X11/Xlib/Event.hsc 407 --- The following is somewhat compatible with Win32's TimeGetTime +-- | This function is somewhat compatible with Win32's @TimeGetTime()@ hunk ./Graphics/X11/Xlib/Event.hsc 433 +-- | interface to the X11 library function @XFlush()@. hunk ./Graphics/X11/Xlib/Event.hsc 436 + +-- | interface to the X11 library function @XSync()@. hunk ./Graphics/X11/Xlib/Event.hsc 440 + +-- | interface to the X11 library function @XPending()@. hunk ./Graphics/X11/Xlib/Event.hsc 444 + +-- | interface to the X11 library function @XEventsQueued()@. hunk ./Graphics/X11/Xlib/Event.hsc 448 + +-- | interface to the X11 library function @XNextEvent()@. hunk ./Graphics/X11/Xlib/Event.hsc 452 + +-- | interface to the X11 library function @XAllowEvents()@. hunk ./Graphics/X11/Xlib/Event.hsc 461 +-- | interface to the X11 library function @XSelectInput()@. hunk ./Graphics/X11/Xlib/Event.hsc 465 +-- | interface to the X11 library function @XSendEvent()@. hunk ./Graphics/X11/Xlib/Event.hsc 474 +-- | interface to the X11 library function @XWindowEvent()@. hunk ./Graphics/X11/Xlib/Event.hsc 477 + +-- | interface to the X11 library function @XCheckWindowEvent()@. hunk ./Graphics/X11/Xlib/Event.hsc 483 +-- | interface to the X11 library function @XMaskEvent()@. hunk ./Graphics/X11/Xlib/Event.hsc 486 + +-- | interface to the X11 library function @XCheckMaskEvent()@. hunk ./Graphics/X11/Xlib/Event.hsc 490 + +-- | interface to the X11 library function @XCheckTypedEvent()@. hunk ./Graphics/X11/Xlib/Event.hsc 494 + +-- | interface to the X11 library function @XCheckTypedWindowEvent()@. hunk ./Graphics/X11/Xlib/Event.hsc 499 + +-- | interface to the X11 library function @XPutBackEvent()@. hunk ./Graphics/X11/Xlib/Event.hsc 503 + +-- | interface to the X11 library function @XPeekEvent()@. hunk ./Graphics/X11/Xlib/Event.hsc 513 +-- | interface to the X11 library function @XRefreshKeyboardMapping()@. hunk ./Graphics/X11/Xlib/Font.hsc 54 + +-- | interface to the X11 library function @XQueryFont()@. hunk ./Graphics/X11/Xlib/Font.hsc 62 + +-- | interface to the X11 library function @XGetGCValues()@. hunk ./Graphics/X11/Xlib/Font.hsc 75 +-- | interface to the X11 library function @XLoadQueryFont()@. hunk ./Graphics/X11/Xlib/Font.hsc 84 +-- | interface to the X11 library function @XFreeFont()@. hunk ./Graphics/X11/Xlib/Font.hsc 144 + +-- | interface to the X11 library function @XTextExtents()@. hunk ./Graphics/X11/Xlib/Font.hsc 166 + +-- | interface to the X11 library function @XTextWidth()@. hunk ./Graphics/X11/Xlib/Misc.hsc 40 + + -- * Error reporting hunk ./Graphics/X11/Xlib/Misc.hsc 44 + + -- * Geometry hunk ./Graphics/X11/Xlib/Misc.hsc 48 + + -- * Locale hunk ./Graphics/X11/Xlib/Misc.hsc 52 + + -- * Screen saver hunk ./Graphics/X11/Xlib/Misc.hsc 70 + + -- * Pointer hunk ./Graphics/X11/Xlib/Misc.hsc 75 + -- * Pixmaps hunk ./Graphics/X11/Xlib/Misc.hsc 82 + -- * Keycodes hunk ./Graphics/X11/Xlib/Misc.hsc 91 + + -- * Icons hunk ./Graphics/X11/Xlib/Misc.hsc 95 + + -- * Cursors hunk ./Graphics/X11/Xlib/Misc.hsc 104 + + -- * Window manager stuff hunk ./Graphics/X11/Xlib/Misc.hsc 107 + + -- * Set window attributes hunk ./Graphics/X11/Xlib/Misc.hsc 126 + -- * Drawing hunk ./Graphics/X11/Xlib/Misc.hsc 145 + + -- * Cut and paste buffers hunk ./Graphics/X11/Xlib/Misc.hsc 153 + -- * Window properties hunk ./Graphics/X11/Xlib/Misc.hsc 171 + +-- | interface to the X11 library function @XrmInitialize()@. hunk ./Graphics/X11/Xlib/Misc.hsc 178 +-- | interface to the X11 library function @XAutoRepeatOff()@. hunk ./Graphics/X11/Xlib/Misc.hsc 181 + +-- | interface to the X11 library function @XAutoRepeatOn()@. hunk ./Graphics/X11/Xlib/Misc.hsc 185 + +-- | interface to the X11 library function @XBell()@. hunk ./Graphics/X11/Xlib/Misc.hsc 189 + +-- | interface to the X11 library function @XSetCloseDownMode()@. hunk ./Graphics/X11/Xlib/Misc.hsc 193 + +-- | interface to the X11 library function @XLastKnownRequestProcessed()@. hunk ./Graphics/X11/Xlib/Misc.hsc 198 +-- | interface to the X11 library function @XGetInputFocus()@. hunk ./Graphics/X11/Xlib/Misc.hsc 210 +-- | interface to the X11 library function @XSetInputFocus()@. hunk ./Graphics/X11/Xlib/Misc.hsc 222 +-- | interface to the X11 library function @XGrabButton()@. hunk ./Graphics/X11/Xlib/Misc.hsc 225 + +-- | interface to the X11 library function @XUngrabButton()@. hunk ./Graphics/X11/Xlib/Misc.hsc 230 +-- | interface to the X11 library function @XGrabPointer()@. hunk ./Graphics/X11/Xlib/Misc.hsc 233 + +-- | interface to the X11 library function @XUngrabPointer()@. hunk ./Graphics/X11/Xlib/Misc.hsc 238 +-- | interface to the X11 library function @XGrabKey()@. hunk ./Graphics/X11/Xlib/Misc.hsc 241 + +-- | interface to the X11 library function @XUngrabKey()@. hunk ./Graphics/X11/Xlib/Misc.hsc 246 +-- | interface to the X11 library function @XGrabKeyboard()@. hunk ./Graphics/X11/Xlib/Misc.hsc 249 + +-- | interface to the X11 library function @XUngrabKeyboard()@. hunk ./Graphics/X11/Xlib/Misc.hsc 254 +-- | interface to the X11 library function @XGrabServer()@. hunk ./Graphics/X11/Xlib/Misc.hsc 257 + +-- | interface to the X11 library function @XUngrabServer()@. hunk ./Graphics/X11/Xlib/Misc.hsc 264 +-- | interface to the X11 library function @XFree()@. hunk ./Graphics/X11/Xlib/Misc.hsc 269 +-- | interface to the X11 library function @XQueryBestTile()@. hunk ./Graphics/X11/Xlib/Misc.hsc 279 +-- | interface to the X11 library function @XQueryBestStipple()@. hunk ./Graphics/X11/Xlib/Misc.hsc 289 +-- | interface to the X11 library function @XQueryBestCursor()@. hunk ./Graphics/X11/Xlib/Misc.hsc 299 +-- | interface to the X11 library function @XQueryBestSize()@. hunk ./Graphics/X11/Xlib/Misc.hsc 312 + +-- | interface to the X11 library function @XQueryPointer()@. hunk ./Graphics/X11/Xlib/Misc.hsc 360 +-- | interface to the X11 library function @XDisplayName()@. hunk ./Graphics/X11/Xlib/Misc.hsc 422 - hunk ./Graphics/X11/Xlib/Misc.hsc 444 +-- | 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. hunk ./Graphics/X11/Xlib/Misc.hsc 460 --- ---------------------------------------------------------------- +---------------------------------------------------------------- hunk ./Graphics/X11/Xlib/Misc.hsc 530 - hunk ./Graphics/X11/Xlib/Misc.hsc 534 +-- | interface to the X11 library function @XGeometry()@. hunk ./Graphics/X11/Xlib/Misc.hsc 560 +-- | interface to the X11 library function @XGetGeometry()@. hunk ./Graphics/X11/Xlib/Misc.hsc 577 +-- | interface to the X11 library function @XSupportsLocale()@. hunk ./Graphics/X11/Xlib/Misc.hsc 581 +-- | interface to the X11 library function @XSetLocaleModifiers()@. hunk ./Graphics/X11/Xlib/Misc.hsc 621 +-- | interface to the X11 library function @XSetScreenSaver()@. hunk ./Graphics/X11/Xlib/Misc.hsc 625 + +-- | interface to the X11 library function @XActivateScreenSaver()@. hunk ./Graphics/X11/Xlib/Misc.hsc 629 + +-- | interface to the X11 library function @XResetScreenSaver()@. hunk ./Graphics/X11/Xlib/Misc.hsc 633 + +-- | interface to the X11 library function @XForceScreenSaver()@. hunk ./Graphics/X11/Xlib/Misc.hsc 638 - hunk ./Graphics/X11/Xlib/Misc.hsc 642 +-- | interface to the X11 library function @XGetPointerControl()@. hunk ./Graphics/X11/Xlib/Misc.hsc 648 +-- | interface to the X11 library function @XWarpPointer()@. hunk ./Graphics/X11/Xlib/Misc.hsc 662 - hunk ./Graphics/X11/Xlib/Misc.hsc 674 +-- | interface to the X11 library function @XCreatePixmap()@. hunk ./Graphics/X11/Xlib/Misc.hsc 677 + +-- | interface to the X11 library function @XFreePixmap()@. hunk ./Graphics/X11/Xlib/Misc.hsc 693 +-- | interface to the X11 library function @XBitmapBitOrder()@. hunk ./Graphics/X11/Xlib/Misc.hsc 696 + +-- | interface to the X11 library function @XBitmapUnit()@. hunk ./Graphics/X11/Xlib/Misc.hsc 700 + +-- | interface to the X11 library function @XBitmapPad()@. hunk ./Graphics/X11/Xlib/Misc.hsc 736 - hunk ./Graphics/X11/Xlib/Misc.hsc 740 +-- | interface to the X11 library function @XDisplayKeycodes()@. hunk ./Graphics/X11/Xlib/Misc.hsc 747 +-- | interface to the X11 library function @XLookupKeysym()@. hunk ./Graphics/X11/Xlib/Misc.hsc 750 + +-- | interface to the X11 library function @XKeycodeToKeysym()@. hunk ./Graphics/X11/Xlib/Misc.hsc 754 + +-- | interface to the X11 library function @XKeysymToKeycode()@. hunk ./Graphics/X11/Xlib/Misc.hsc 759 +-- | interface to the X11 library function @XKeysymToString()@. hunk ./Graphics/X11/Xlib/Misc.hsc 767 +-- | interface to the X11 library function @XStringToKeysym()@. hunk ./Graphics/X11/Xlib/Misc.hsc 781 + +-- | interface to the X11 library function @XLookupString()@. hunk ./Graphics/X11/Xlib/Misc.hsc 819 +-- | interface to the X11 library function @XGetIconName()@. hunk ./Graphics/X11/Xlib/Misc.hsc 830 +-- | interface to the X11 library function @XSetIconName()@. hunk ./Graphics/X11/Xlib/Misc.hsc 842 +-- | interface to the X11 library function @XDefineCursor()@. hunk ./Graphics/X11/Xlib/Misc.hsc 845 + +-- | interface to the X11 library function @XUndefineCursor()@. hunk ./Graphics/X11/Xlib/Misc.hsc 850 +-- | interface to the X11 library function @XCreatePixmapCursor()@. hunk ./Graphics/X11/Xlib/Misc.hsc 861 +-- | interface to the X11 library function @XCreateGlyphCursor()@. hunk ./Graphics/X11/Xlib/Misc.hsc 874 +-- | interface to the X11 library function @XCreateFontCursor()@. hunk ./Graphics/X11/Xlib/Misc.hsc 877 + +-- | interface to the X11 library function @XFreeCursor()@. hunk ./Graphics/X11/Xlib/Misc.hsc 882 +-- | interface to the X11 library function @XRecolorCursor()@. hunk ./Graphics/X11/Xlib/Misc.hsc 903 + +-- | interface to the X11 library function @XSetWMProtocols()@. hunk ./Graphics/X11/Xlib/Misc.hsc 912 - hunk ./Graphics/X11/Xlib/Misc.hsc 972 +-- | interface to the X11 library function @XDrawPoint()@. hunk ./Graphics/X11/Xlib/Misc.hsc 976 +-- | interface to the X11 library function @XDrawPoints()@. hunk ./Graphics/X11/Xlib/Misc.hsc 985 +-- | interface to the X11 library function @XDrawLine()@. hunk ./Graphics/X11/Xlib/Misc.hsc 990 +-- | interface to the X11 library function @XDrawLines()@. hunk ./Graphics/X11/Xlib/Misc.hsc 999 +-- | interface to the X11 library function @XDrawSegments()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1007 +-- | interface to the X11 library function @XDrawRectangle()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1011 +-- | interface to the X11 library function @XDrawRectangles()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1019 +-- | interface to the X11 library function @XDrawArc()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1024 +-- | interface to the X11 library function @XDrawArcs()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1032 +-- | interface to the X11 library function @XFillRectangle()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1037 +-- | interface to the X11 library function @XFillRectangles()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1045 +-- | interface to the X11 library function @XFillPolygon()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1053 +-- | interface to the X11 library function @XFillArc()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1058 +-- | interface to the X11 library function @XFillArcs()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1066 +-- | interface to the X11 library function @XCopyArea()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1069 + +-- | interface to the X11 library function @XCopyPlane()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1075 + +-- | interface to the X11 library function @XDrawString()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1085 + +-- | interface to the X11 library function @XDrawImageString()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1103 +-- | interface to the X11 library function @XStoreBuffer()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1112 +-- | interface to the X11 library function @XStoreBytes()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1121 +-- | interface to the X11 library function @XFetchBuffer()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1134 +-- | interface to the X11 library function @XFetchBytes()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1147 +-- | interface to the X11 library function @XRotateBuffers()@. hunk ./Graphics/X11/Xlib/Misc.hsc 1161 +-- | interface to the X11 library function @XSetTextProperty()@. hunk ./Graphics/X11/Xlib/Region.hs 82 + +-- | interface to the X11 library function @XCreateRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 91 +-- | interface to the X11 library function @XPolygonRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 98 - xPolygonRegion :: Ptr Point -> Int -> FillRule -> IO (Ptr Region) + xPolygonRegion :: Ptr Point -> Int -> FillRule -> IO (Ptr Region) hunk ./Graphics/X11/Xlib/Region.hs 110 +-- | interface to the X11 library function @XIntersectRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 121 +-- | interface to the X11 library function @XSubtractRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 132 +-- | interface to the X11 library function @XUnionRectWithRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 143 +-- | interface to the X11 library function @XUnionRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 154 +-- | interface to the X11 library function @XXorRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 169 +-- | interface to the X11 library function @XEmptyRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 175 +-- | interface to the X11 library function @XEqualRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 184 +-- | interface to the X11 library function @XPointInRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 192 +-- | interface to the X11 library function @XRectInRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 202 + +-- | interface to the X11 library function @XClipBox()@. hunk ./Graphics/X11/Xlib/Region.hs 221 + +-- | interface to the X11 library function @XOffsetRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 233 + +-- | interface to the X11 library function @XShrinkRegion()@. hunk ./Graphics/X11/Xlib/Region.hs 247 + +-- | interface to the X11 library function @XSetRegion()@. hunk ./Graphics/X11/Xlib/Screen.hs 49 +-- | interface to the X11 library function @XBlackPixelOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 52 + +-- | interface to the X11 library function @XWhitePixelOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 56 + +-- | interface to the X11 library function @XCellsOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 60 + +-- | interface to the X11 library function @XDefaultColormapOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 64 + +-- | interface to the X11 library function @XDefaultDepthOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 68 + +-- | interface to the X11 library function @XDefaultGCOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 72 + +-- | interface to the X11 library function @XDefaultVisualOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 76 + +-- | interface to the X11 library function @XDoesBackingStore()@. hunk ./Graphics/X11/Xlib/Screen.hs 80 + +-- | interface to the X11 library function @XDoesSaveUnders()@. hunk ./Graphics/X11/Xlib/Screen.hs 84 + +-- | interface to the X11 library function @XDisplayOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 89 --- event mask at connection setup time - not current event mask! +-- | interface to the X11 library function @XEventMaskOfScreen()@. +-- Event mask at connection setup time - not current event mask! hunk ./Graphics/X11/Xlib/Screen.hs 94 +-- | interface to the X11 library function @XMinCmapsOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 97 + +-- | interface to the X11 library function @XMaxCmapsOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 101 + +-- | interface to the X11 library function @XRootWindowOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 105 + +-- | interface to the X11 library function @XWidthOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 109 + +-- | interface to the X11 library function @XWidthMMOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 113 + +-- | interface to the X11 library function @XHeightOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 117 + +-- | interface to the X11 library function @XHeightMMOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 121 + +-- | interface to the X11 library function @XPlanesOfScreen()@. hunk ./Graphics/X11/Xlib/Screen.hs 125 + +-- | interface to the X11 library function @XScreenNumberOfScreen()@. hunk ./Graphics/X11/Xlib/Types.hsc 32 +-- | pointer to an X11 @Display@ structure hunk ./Graphics/X11/Xlib/Types.hsc 34 +-- | pointer to an X11 @Screen@ structure hunk ./Graphics/X11/Xlib/Types.hsc 36 +-- | pointer to an X11 @Visual@ structure hunk ./Graphics/X11/Xlib/Types.hsc 38 +-- | pointer to an X11 @XFontStruct@ structure hunk ./Graphics/X11/Xlib/Types.hsc 136 +-- | counterpart of an X11 @XPoint@ structure hunk ./Graphics/X11/Xlib/Types.hsc 166 +-- | counterpart of an X11 @XRectangle@ structure hunk ./Graphics/X11/Xlib/Types.hsc 208 +-- | counterpart of an X11 @XArc@ structure hunk ./Graphics/X11/Xlib/Types.hsc 250 +-- | counterpart of an X11 @XSegment@ structure hunk ./Graphics/X11/Xlib/Types.hsc 286 +-- | counterpart of an X11 @XColor@ structure hunk ./Graphics/X11/Xlib/Window.hs 61 +-- | interface to the X11 library function @XStoreName()@. hunk ./Graphics/X11/Xlib/Window.hs 69 +-- | interface to the X11 library function @XCreateSimpleWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 74 +-- | interface to the X11 library function @XCreateWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 78 - Visual -> AttributeMask -> XSetWindowAttributesPtr -> IO Window + Visual -> AttributeMask -> Ptr XSetWindowAttributes -> IO Window hunk ./Graphics/X11/Xlib/Window.hs 83 + +-- | interface to the X11 library function @XTranslateCoordinates()@. hunk ./Graphics/X11/Xlib/Window.hs 102 +-- | interface to the X11 library function @XMoveResizeWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 105 + +-- | interface to the X11 library function @XResizeWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 109 + +-- | interface to the X11 library function @XMoveWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 113 + +-- | interface to the X11 library function @XReparentWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 117 + +-- | interface to the X11 library function @XMapSubwindows()@. hunk ./Graphics/X11/Xlib/Window.hs 121 + +-- | interface to the X11 library function @XUnmapSubwindows()@. hunk ./Graphics/X11/Xlib/Window.hs 125 + +-- | interface to the X11 library function @XMapWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 131 + +-- | interface to the X11 library function @XLowerWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 135 + +-- | interface to the X11 library function @XRaiseWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 139 + +-- | interface to the X11 library function @XCirculateSubwindowsDown()@. hunk ./Graphics/X11/Xlib/Window.hs 143 + +-- | interface to the X11 library function @XCirculateSubwindowsUp()@. hunk ./Graphics/X11/Xlib/Window.hs 147 + +-- | interface to the X11 library function @XCirculateSubwindows()@. hunk ./Graphics/X11/Xlib/Window.hs 152 +-- | interface to the X11 library function @XIconifyWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 160 +-- | interface to the X11 library function @XWithdrawWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 168 +-- | interface to the X11 library function @XDestroyWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 171 + +-- | interface to the X11 library function @XDestroySubwindows()@. hunk ./Graphics/X11/Xlib/Window.hs 176 +-- | interface to the X11 library function @XSetWindowBorder()@. hunk ./Graphics/X11/Xlib/Window.hs 179 + +-- | interface to the X11 library function @XSetWindowBorderPixmap()@. hunk ./Graphics/X11/Xlib/Window.hs 183 + +-- | interface to the X11 library function @XSetWindowBorderWidth()@. hunk ./Graphics/X11/Xlib/Window.hs 187 + +-- | interface to the X11 library function @XSetWindowBackground()@. hunk ./Graphics/X11/Xlib/Window.hs 191 + +-- | interface to the X11 library function @XSetWindowBackgroundPixmap()@. hunk ./Graphics/X11/Xlib/Window.hs 195 + +-- | interface to the X11 library function @XSetWindowColormap()@. hunk ./Graphics/X11/Xlib/Window.hs 200 +-- | interface to the X11 library function @XAddToSaveSet()@. hunk ./Graphics/X11/Xlib/Window.hs 203 + +-- | interface to the X11 library function @XRemoveFromSaveSet()@. hunk ./Graphics/X11/Xlib/Window.hs 207 + +-- | interface to the X11 library function @XChangeSaveSet()@. hunk ./Graphics/X11/Xlib/Window.hs 212 +-- | interface to the X11 library function @XClearWindow()@. hunk ./Graphics/X11/Xlib/Window.hs 215 + +-- | interface to the X11 library function @XClearArea()@. hunk ./Graphics/X11/Xlib/Window.hs 221 --- -- This is almost good enough - but doesn't call XFree +-- This is almost good enough - but doesn't call XFree hunk ./Graphics/X11/Xlib/Window.hs 233 +-- | interface to the X11 library function @XRestackWindows()@. hunk ./Graphics/X11/Xlib/Window.hs 241 --- -- ToDo: I want to be able to write this +-- ToDo: I want to be able to write this hunk ./Graphics/X11/Xlib.hs 13 +-- 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 +-- . 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. +-- hunk ./Graphics/X11/Xlib.hs 23 - ( module Graphics.X11.Types, - free, + ( -- * Conventions + -- $conventions + + -- * Types + module Graphics.X11.Types, + -- module Graphics.X11.Xlib.Types, + Display, Screen, Visual, FontStruct, GC, XSetWindowAttributes, + Pixel, Position, Dimension, Angle, + ScreenNumber, Byte, Buffer, + Point, Rectangle, Arc, Segment, Color, hunk ./Graphics/X11/Xlib.hs 34 - module Graphics.X11.Xlib.Types, + -- * X11 library functions hunk ./Graphics/X11/Xlib.hs 61 -import Foreign.Marshal.Alloc( free ) +{- $conventions + +In translating the library, we had to change names to conform with +Haskell's lexical syntax: function names and names of constants must start +with a lowercase letter; type names must start with an uppercase letter. +The case of the remaining letters is unchanged. + +In addition, we chose to take advantage of Haskell's module system to +allow us to drop common prefixes (@X@, @XA_@, etc.) attached to X11 +identifiers. + +We named enumeration types so that function types would be easier +to understand. For example, we added 'Status', 'WindowClass', etc. +Note that the types are synonyms for 'Int' so no extra typesafety was +obtained. + +We consistently raise exceptions when a function returns an error code. +In practice, this only affects the following functions because most Xlib +functions do not return error codes: 'allocColor', 'allocNamedColor', +'fetchBuffer', 'fetchBytes', 'fontFromGC', 'getGeometry', 'getIconName', +'iconifyWindow', 'loadQueryFont', 'lookupColor', 'openDisplay', +'parseColor', 'queryBestCursor', 'queryBestSize', 'queryBestStipple', +'queryBestTile', 'rotateBuffers', 'selectInput', 'storeBuffer', +'storeBytes', 'withdrawWindow'. + +-} hunk ./prologue.txt 1 -A Haskell binding for X11. +A Haskell binding to the X11 library. + +The binding is a direct translation of C binding; +for documentation of these calls, refer to /The Xlib Programming Manual/, +available online at . hunk ./Graphics/X11/Xlib/Event.hsc 22 - allocXEvent, + allocaXEvent, hunk ./Graphics/X11/Xlib/Event.hsc 96 -allocXEvent :: IO XEventPtr -allocXEvent = mallocBytes #{size XEvent} +allocaXEvent :: (XEventPtr -> IO a) -> IO a +allocaXEvent = allocaBytes #{size XEvent} hunk ./Graphics/X11/Xlib/Misc.hsc 109 - allocXSetWindowAttributes, + allocaXSetWindowAttributes, hunk ./Graphics/X11/Xlib/Misc.hsc 918 -allocXSetWindowAttributes :: IO (Ptr XSetWindowAttributes) -allocXSetWindowAttributes = mallocBytes #{size XSetWindowAttributes} +allocaXSetWindowAttributes :: (Ptr XSetWindowAttributes -> IO a) -> IO a +allocaXSetWindowAttributes = allocaBytes #{size XSetWindowAttributes} hunk ./Graphics/X11/Xlib/Display.hs 146 --- | interface to the X11 library function @DisplayString()@. +-- | interface to the X11 library function @XDisplayString()@. hunk ./Graphics/X11/Xlib/Display.hs 149 -foreign import ccall unsafe "HsXlib.h DisplayString" +foreign import ccall unsafe "HsXlib.h XDisplayString" hunk ./Graphics/X11/Xlib/Display.hs 152 --- | interface to the X11 library function @ImageByteOrder()@. -foreign import ccall unsafe "HsXlib.h ImageByteOrder" +-- | interface to the X11 library function @XImageByteOrder()@. +foreign import ccall unsafe "HsXlib.h XImageByteOrder" hunk ./Graphics/X11/Xlib/Display.hs 156 --- | interface to the X11 library function @ProtocolRevision()@. -foreign import ccall unsafe "HsXlib.h ProtocolRevision" +-- | interface to the X11 library function @XProtocolRevision()@. +foreign import ccall unsafe "HsXlib.h XProtocolRevision" hunk ./Graphics/X11/Xlib/Display.hs 160 --- | interface to the X11 library function @ProtocolVersion()@. -foreign import ccall unsafe "HsXlib.h ProtocolVersion" +-- | interface to the X11 library function @XProtocolVersion()@. +foreign import ccall unsafe "HsXlib.h XProtocolVersion" hunk ./Graphics/X11/Xlib/Display.hs 164 --- | interface to the X11 library function @ServerVendor()@. +-- | interface to the X11 library function @XServerVendor()@. hunk ./Graphics/X11/Xlib/Display.hs 167 -foreign import ccall unsafe "HsXlib.h ServerVendor" +foreign import ccall unsafe "HsXlib.h XServerVendor" hunk ./Graphics/X11/Xlib/Display.hs 172 --- | interface to the X11 library function @ScreenCount()@. -foreign import ccall unsafe "HsXlib.h ScreenCount" +-- | interface to the X11 library function @XScreenCount()@. +foreign import ccall unsafe "HsXlib.h XScreenCount" hunk ./Graphics/X11/Xlib/Display.hs 176 --- | interface to the X11 library function @DefaultVisual()@. -foreign import ccall unsafe "HsXlib.h DefaultVisual" +-- | interface to the X11 library function @XDefaultVisual()@. +foreign import ccall unsafe "HsXlib.h XDefaultVisual" hunk ./Graphics/X11/Xlib/Display.hs 180 --- | interface to the X11 library function @DisplayCells()@. -foreign import ccall unsafe "HsXlib.h DisplayCells" +-- | interface to the X11 library function @XDisplayCells()@. +foreign import ccall unsafe "HsXlib.h XDisplayCells" hunk ./Graphics/X11/Xlib/Display.hs 184 --- | interface to the X11 library function @DisplayPlanes()@. -foreign import ccall unsafe "HsXlib.h DisplayPlanes" +-- | interface to the X11 library function @XDisplayPlanes()@. +foreign import ccall unsafe "HsXlib.h XDisplayPlanes" hunk ./Graphics/X11/Xlib/Display.hs 188 --- | interface to the X11 library function @ScreenOfDisplay()@. -foreign import ccall unsafe "HsXlib.h ScreenOfDisplay" +-- | interface to the X11 library function @XScreenOfDisplay()@. +foreign import ccall unsafe "HsXlib.h XScreenOfDisplay" hunk ./Graphics/X11/Xlib/Display.hs 192 --- | interface to the X11 library function @DefaultRootWindow()@. -foreign import ccall unsafe "HsXlib.h DefaultRootWindow" +-- | interface to the X11 library function @XDefaultRootWindow()@. +foreign import ccall unsafe "HsXlib.h XDefaultRootWindow" hunk ./cbits/Makefile 3 -# $Id: Makefile,v 1.4 2004/03/07 01:04:23 ross Exp $ +# $Id: Makefile,v 1.5 2004/05/09 01:34:38 dons Exp $ hunk ./cbits/Makefile 10 -SRC_CC_OPTS += -Wall -I../include +SRC_CC_OPTS += -Wall -I../include $(X_CFLAGS) addfile ./doc/HSX11.xml hunk ./doc/HSX11.sgml 1 - -]> - - - - 2003-5-22 - HSX11 Guide - - Alastair - Reid - -
alastair@reid-consulting-uk.ltd.uk
- - 1999-2003 - Alastair Reid - - - This document describes HSX11, the Haskell binding to X11, - version 1.00. - -
- - - - - - - - Introduction - - The library aims to provide a direct translation of the X - binding into Haskell so the most important pieces of documentation - you should read are the XFree86 website. - 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. - - - - - Changes from X11 documentation - - In making a Haskell binding to a C library, there are certain - necessary and/or desirable changes in the interface. - - These can be divided into systematic changes which are applied - uniformly throughout the library and ad-hoc changes which are - applied to particular parts of the interface. - - Systematic Changes - - - - - - In translating the library, we had to change names to conform with - Haskell's lexical syntax: function names and names of constants must - start with a lowercase letter; type names must start with an - uppercase letter. - - - In addition, we chose to take advantage of Haskell's module system - to allow us to drop common prefixes ( - - - - - - - C Name - Haskell Name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - We translate type names as follows... - - - - - - - - - - C Type - Haskell Type - Haskell Expansion - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - We systematically use a type of the form - - We named enumeration types so that function types would be easier to - understand. For example, we added ... Note that the types are - synonyms for - - - - - - We consistently raise exceptions when a function returns an error - code. In practice, this only affects the following functions - because most Xlib functions do not return error codes. - -allocColor -allocNamedColor -fetchBuffer -fetchBytes -fontFromGC -getGeometry -getIconName -iconifyWindow -loadQueryFont -lookupColor -openDisplay -parseColor -queryBestCursor -queryBestSize -queryBestStipple -queryBestTile -rotateBuffers -selectInput -storeBuffer -storeBytes -withdrawWindow - - The Xlib library reports most errors by invoking a user-provided - error handler. The function - -setDefaultErrorHandler :: IO () - -installs this error handler. - -int defaultErrorHandler(Display *d, XErrorEvent *ev) -{ - char buffer[1000]; - XGetErrorText(d,ev->error_code,buffer,1000); - printf("Error: %s\n", buffer); - return 0; -} - - - - - - - - - As an example of how these rules are applied in generating a - function type, the C function with type: - -XDrawPoints(Display *display, - Drawable d, - GC gc, - XPoint *points, - int npoints, - int mode) - - - is given the Haskell type: - -drawPoints :: Display - -> Drawable - -> GC - -> [Point] - -> CoordinateMode - -> IO () - - - - - - - Ad hoc Changes - - - Finally, we chose to make some changes in the interface to better - conform with idiomatic Haskell style or to allow a typesafe interface. - - - - - -The function - -waitForEvent :: Display -> Word32 -> IO Bool - -reads an event with a timeout (in microseconds). -% -It is sometimes useful in conjunction with this function: - -gettimeofday_in_milliseconds :: IO Integer - - - - - - - -We provide the following operations on WindowsAttributes: - -set_background_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () -set_background_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () -set_border_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () -set_border_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () -set_bit_gravity :: XSetWindowAttributesPtr -> BitGravity -> IO () -set_win_gravity :: XSetWindowAttributesPtr -> WindowGravity -> IO () -set_backing_store :: XSetWindowAttributesPtr -> BackingStore -> IO () -set_backing_planes :: XSetWindowAttributesPtr -> Pixel -> IO () -set_backing_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () -set_save_under :: XSetWindowAttributesPtr -> Bool -> IO () -set_event_mask :: XSetWindowAttributesPtr -> EventMask -> IO () -set_do_not_propagate_mask :: XSetWindowAttributesPtr -> EventMask -> IO () -set_override_redirect :: XSetWindowAttributesPtr -> Bool -> IO () -set_colormap :: XSetWindowAttributesPtr -> Colormap -> IO () -set_cursor :: XSetWindowAttributesPtr -> Cursor -> IO () - - - - - - - - - - - - - &the-index - -
rmfile ./doc/HSX11.sgml hunk ./doc/HSX11.xml 1 + + + + + + 2003-05-22 + HSX11 Guide + + Alastair + Reid + +
alastair@reid-consulting-uk.ltd.uk
+ + 1999-2003 + Alastair Reid + + + This document describes HSX11, the Haskell binding to X11, + version 1.00. + +
+ + + + + + Introduction + + HSX11 is a Haskell binding to the popular + X11 library. + + The library aims to provide a direct translation of the X + binding into Haskell so the most important pieces of documentation + you should read are the X11 documents which can + be obtained from the XFree86 website. + 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. + + + + + Changes from X11 documentation + + In making a Haskell binding to a C library, there are + certain necessary and/or desirable changes in the + interface. + + These can be divided into systematic changes which are + applied uniformly throughout the library and ad-hoc changes which + are applied to particular parts of the interface. + + + Systematic Changes + + + + + Naming Conventions + + In translating the library, we had to change names + to conform with Haskell's lexical syntax: function names + and names of constants must start with a lowercase letter; + type names must start with an uppercase letter. + + In addition, we chose to take advantage of Haskell's + module system to allow us to drop common prefixes + (X, XA_, etc.) + attached to X11 identifiers. For example, we translate + some C functions, constants and types as follows: + + + + + + + + + C Name + Haskell Name + + + + XWindowEvent + windowEvent + + + + XCheckWindowEvent + checkWindowEvent + + + + QueuedAlready + queuedAlready + + + + XA_WM_ICON_NAME + wM_ICON_NAME + + + + XA_WM_ICON_SIZE + wM_ICON_SIZE + + + + + + + + + + + Types + + We translate type names as follows... + + + + + + + + + + C Type + Haskell Type + Haskell Expansion + + + + Display* + Display + + + + Screen* + Screen + + + + Visual* + Visual + + + + XFontStruct* + FontStruct + + + + XPoint + Point + (Position,Position) + + + + XSegment + Segment + (Position,Position,Position,Position) + + + + XRectangle + Rectangle + (Position,Position,Dimension,Dimension) + + + + XArc + Arc + (Position,Position,Dimension,Dimension,Int,Int) + + + + XColor + Color + (Pixel,Word16, Word16, Word16, Word8) + + + + + + + We systematically use a type of the form + ListFoo as a synonym for + [Foo] and MbFoo as a + synonym for Maybe Foo. This is an + unfortunate side-effect of the tool we used to generate + the bindings. + + We named enumeration types so that function types + would be easier to understand. For example, we added ... + Note that the types are synonyms for + Int so no extra typesafety was + obtained. + + + + + Exception Handling + + We consistently raise exceptions when a function + returns an error code. In practice, this only affects the + following functions because most Xlib functions do not + return error codes. + +allocColor +allocNamedColor +fetchBuffer +fetchBytes +fontFromGC +getGeometry +getIconName +iconifyWindow +loadQueryFont +lookupColor +openDisplay +parseColor +queryBestCursor +queryBestSize +queryBestStipple +queryBestTile +rotateBuffers +selectInput +storeBuffer +storeBytes +withdrawWindow + + + The Xlib library reports most errors by invoking a + user-provided error handler. The function + + +setDefaultErrorHandler :: IO () + + + installs this error handler. + + +int defaultErrorHandler(Display *d, XErrorEvent *ev) +{ + char buffer[1000]; + XGetErrorText(d,ev->error_code,buffer,1000); + printf("Error: %s\n", buffer); + return 0; +} + + + + + + + As an example of how these rules are applied in generating a + function type, the C function with type: + +XDrawPoints(Display *display, + Drawable d, + GC gc, + XPoint *points, + int npoints, + int mode) + + + + is given the Haskell type: + + +drawPoints :: Display + -> Drawable + -> GC + -> [Point] + -> CoordinateMode + -> IO () + + + + + + Ad hoc Changes + + Finally, we chose to make some changes in the interface to + better conform with idiomatic Haskell style or to allow a + typesafe interface. + + + + + waitForEvent + + The function + +waitForEvent :: Display -> Word32 -> IO Bool + + reads an event with a timeout (in microseconds). It + is sometimes useful in conjunction with this + function: + +gettimeofday_in_milliseconds :: IO Integer + + + + + + WindowAttribute operations + + We provide the following operations on + WindowsAttributes: + +set_background_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () +set_background_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +set_border_pixmap :: XSetWindowAttributesPtr -> Pixmap -> IO () +set_border_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +set_bit_gravity :: XSetWindowAttributesPtr -> BitGravity -> IO () +set_win_gravity :: XSetWindowAttributesPtr -> WindowGravity -> IO () +set_backing_store :: XSetWindowAttributesPtr -> BackingStore -> IO () +set_backing_planes :: XSetWindowAttributesPtr -> Pixel -> IO () +set_backing_pixel :: XSetWindowAttributesPtr -> Pixel -> IO () +set_save_under :: XSetWindowAttributesPtr -> Bool -> IO () +set_event_mask :: XSetWindowAttributesPtr -> EventMask -> IO () +set_do_not_propagate_mask :: XSetWindowAttributesPtr -> EventMask -> IO () +set_override_redirect :: XSetWindowAttributesPtr -> Bool -> IO () +set_colormap :: XSetWindowAttributesPtr -> Colormap -> IO () +set_cursor :: XSetWindowAttributesPtr -> Cursor -> IO () + + + + + + +
hunk ./doc/Makefile 1 -#----------------------------------------------------------------------------- -# $Id: Makefile,v 1.2 2004/03/07 01:04:24 ross Exp $ - hunk ./doc/Makefile 4 -SGML_DOC = HSX11 +XML_DOC = HSX11 addfile ./aclocal.m4 addfile ./config.mk.in addfile ./configure.ac hunk ./Makefile 2 -# $Id: Makefile,v 1.16 2004/03/07 01:04:23 ross Exp $ +# $Id: Makefile,v 1.17 2004/11/23 12:35:18 ross Exp $ hunk ./Makefile 6 +-include config.mk hunk ./Makefile 10 +ifeq "$(X11_BUILD_PACKAGE)" "yes" + hunk ./Makefile 29 -# yeuch, have to get X_CFLAGS & X_LIBS in through CPP to package.conf.in -comma = , -PACKAGE_CPP_OPTS += -DX_CFLAGS='$(patsubst %,$(comma)"%", $(X_CFLAGS))' -PACKAGE_CPP_OPTS += -DX_LIBS='$(patsubst %, $(comma)"%", $(X_LIBS))' +endif hunk ./aclocal.m4 1 +# Empty file to avoid a dependency on automake: autoreconf calls aclocal to +# generate a temporary aclocal.m4t when no aclocal.m4 is present. hunk ./config.mk.in 1 +X11_BUILD_PACKAGE=@X11_BUILD_PACKAGE@ +X_CFLAGS=@X_CFLAGS@ +X_PRE_LIBS=@X_PRE_LIBS@ +X_LIBS=@X_LIBS@ +X_EXTRA_LIBS=@X_EXTRA_LIBS@ hunk ./configure.ac 1 +AC_INIT([Haskell X11 package], [1.0], [libraries@haskell.org], [X11]) + +# Safety check: Ensure that we are in the correct source directory. +AC_CONFIG_SRCDIR([include/HsXlib.h]) + +AC_CONFIG_HEADERS([include/HsX11Config.h]) + +# Check for X11 include paths and libraries +AC_PATH_XTRA() + +# Build the package if we found X11 stuff +if test "$no_x" = yes; then + X11_BUILD_PACKAGE=no +else + X11_BUILD_PACKAGE=yes +fi +AC_SUBST([X11_BUILD_PACKAGE]) + +# Define CPP variables used in package.conf.in +if test "$X11_BUILD_PACKAGE" = yes; then + x_cflags=`echo '' $X_CFLAGS | sed -e 's/-[[^ ]]*/,"&"/g' -e 's/^ *,//'` + x_libs=`echo '' $X_LIBS | sed -e 's/-[[^ ]]*/,"&"/g' -e 's/^ *,//'` + AC_DEFINE_UNQUOTED(X_CFLAGS, $x_cflags, + [C flags for X11, as a list of string literals.]) + AC_DEFINE_UNQUOTED(X_LIBS, $x_libs, + [Library flags for X11, as a list of string literals.]) +fi + +AC_CONFIG_FILES([config.mk]) +AC_OUTPUT hunk ./package.conf.in 1 +#include "HsX11Config.h" + hunk ./cbits/Makefile 1 - hunk ./cbits/Makefile 2 -# $Id: Makefile,v 1.5 2004/05/09 01:34:38 dons Exp $ hunk ./cbits/Makefile 5 +-include ../config.mk hunk ./package.conf.in 1 -#include "HsX11Config.h" +#include "include/HsX11Config.h" hunk ./package.conf.in 1 -#include "include/HsX11Config.h" +#include "HsX11Config.h" hunk ./Makefile 2 -# $Id: Makefile,v 1.17 2004/11/23 12:35:18 ross Exp $ +# $Id: Makefile,v 1.18 2004/11/26 16:22:09 simonmar Exp $ hunk ./Makefile 19 +VERSION = 1.0 hunk ./package.conf.in 3 -Package { - name = "X11", - auto = True, +name: PACKAGE +version: VERSION +license: BSD3 +maintainer: libraries@haskell.org +exposed: True + +exposed-modules: + Graphics.X11.Xlib.Atom, + Graphics.X11.Xlib.Color, + Graphics.X11.Xlib.Context, + Graphics.X11.Xlib.Display, + Graphics.X11.Xlib.Event, + Graphics.X11.Xlib.Font, + Graphics.X11.Xlib.Misc, + Graphics.X11.Xlib.Region, + Graphics.X11.Xlib.Screen, + Graphics.X11.Xlib.Types, + Graphics.X11.Xlib.Window, + Graphics.X11.Types, + Graphics.X11.Xlib, + Graphics.X11 + +hidden-modules: + hunk ./package.conf.in 28 - import_dirs = [ "$libdir/imports" ], +import-dirs: "$libdir/imports" hunk ./package.conf.in 30 - import_dirs = [ "$libdir/libraries/X11" ], +import-dirs: "$libdir/libraries/X11" hunk ./package.conf.in 32 - source_dirs = [], + hunk ./package.conf.in 34 - library_dirs = [ "$libdir" ], +library-dirs: "$libdir" hunk ./package.conf.in 36 - library_dirs = [ "$libdir/libraries/X11", - "$libdir/libraries/X11/cbits" ], +library-dirs: "$libdir/libraries/X11" hunk ./package.conf.in 38 - hs_libraries = [ "HSX11" ], - extra_libraries = [ "HSX11_cbits", "X11" ], + +hs-libraries: "HSX11" +extra-libs: "HSX11_cbits", "X11" + hunk ./package.conf.in 43 - include_dirs = [], +include-dirs: hunk ./package.conf.in 45 - include_dirs = [ "$libdir/libraries/X11/include" ], +include-dirs: "$libdir/libraries/X11/include" hunk ./package.conf.in 47 - c_includes = [ "HsXlib.h" ], - package_deps = [ "base" ], - extra_ghc_opts = [], - extra_cc_opts = [ X_CFLAGS ], - extra_ld_opts = [ X_LIBS ] -} + +includes: "HsXlib.h" +depends: base +extra-hugs-opts: + +extra-cc-opts: X_CFLAGS +extra-ld-opts: X_LIBS +framework-dirs: +extra-frameworks: +haddock-interfaces: +haddock-html: hunk ./Makefile 2 -# $Id: Makefile,v 1.18 2004/11/26 16:22:09 simonmar Exp $ hunk ./configure.ac 21 - x_cflags=`echo '' $X_CFLAGS | sed -e 's/-[[^ ]]*/,"&"/g' -e 's/^ *,//'` - x_libs=`echo '' $X_LIBS | sed -e 's/-[[^ ]]*/,"&"/g' -e 's/^ *,//'` - AC_DEFINE_UNQUOTED(X_CFLAGS, $x_cflags, - [C flags for X11, as a list of string literals.]) - AC_DEFINE_UNQUOTED(X_LIBS, $x_libs, - [Library flags for X11, as a list of string literals.]) + + AC_DEFINE_UNQUOTED(X_CFLAGS, + [`echo '' $X_CFLAGS | sed -e 's/-[[^ ]]*/,"&"/g' -e 's/^ *,//'`], + [C flags for X11, as a list of string literals.]) + + AC_DEFINE_UNQUOTED(X_LIBS, + [`echo '' $X_LIBS | sed -e 's/-[[^ ]]*/,"&"/g' -e 's/^ *,//'`], + [Library flags for X11, as a list of string literals.]) + hunk ./package.conf.in 56 + hunk ./configure.ac 9 -AC_PATH_XTRA() +AC_PATH_XTRA hunk ./Makefile 17 -PACKAGE = X11 -VERSION = 1.0 hunk ./Makefile 25 +PACKAGE_CPP_OPTS += -DMAINTAINER=$(MAINTAINER) + hunk ./config.mk.in 6 +PACKAGE=@PACKAGE_TARNAME@ +VERSION=@PACKAGE_VERSION@ +MAINTAINER=@PACKAGE_BUGREPORT@ hunk ./package.conf.in 6 -maintainer: libraries@haskell.org +maintainer: MAINTAINER hunk ./cbits/Makefile 6 + +# HACK +PACKAGE= hunk ./config.mk.in 2 +ifneq "$(X11_BUILD_PACKAGE)" "no" hunk ./config.mk.in 10 +endif hunk ./Graphics/X11/Xlib/Event.hsc 69 -{-# CBITS fdset.c #-} +{-# CFILES cbits/fdset.c #-} hunk ./Graphics/X11/Xlib/Misc.hsc 435 -{-# CBITS auxiliaries.c #-} +{-# CFILES cbits/auxiliaries.c #-} addfile ./Setup.buildinfo.in addfile ./Setup.description hunk ./Setup.buildinfo.in 1 +-- @configure_input@ +-- System-dependent values used by HugsSetup.hs + +build-package: @BUILD_PACKAGE_BOOL@ +cc-options: -Iinclude @X_CFLAGS@ +ld-options: @X_LIBS@ +frameworks: hunk ./Setup.description 1 +name: X11 +version: 1.0 +license: BSD3 +copyright: Alastair Reid, 1999-2003 +maintainer: +category: Graphics +description: A Haskell binding to the X11 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 . +modules: + Graphics.X11.Xlib.Atom, + Graphics.X11.Xlib.Color, + Graphics.X11.Xlib.Context, + Graphics.X11.Xlib.Display, + Graphics.X11.Xlib.Event, + Graphics.X11.Xlib.Font, + Graphics.X11.Xlib.Misc, + Graphics.X11.Xlib.Region, + Graphics.X11.Xlib.Screen, + Graphics.X11.Xlib.Types, + Graphics.X11.Xlib.Window, + Graphics.X11.Types, + Graphics.X11.Xlib, + Graphics.X11 +exposed-modules: + Graphics.X11.Xlib.Atom, + Graphics.X11.Xlib.Color, + Graphics.X11.Xlib.Context, + Graphics.X11.Xlib.Display, + Graphics.X11.Xlib.Event, + Graphics.X11.Xlib.Font, + Graphics.X11.Xlib.Misc, + Graphics.X11.Xlib.Region, + Graphics.X11.Xlib.Screen, + Graphics.X11.Xlib.Types, + Graphics.X11.Xlib.Window, + Graphics.X11.Types, + Graphics.X11.Xlib, + Graphics.X11 +extra-libs: "X11" +includes: "HsXlib.h" hunk ./configure.ac 14 + BUILD_PACKAGE_BOOL=False hunk ./configure.ac 17 + BUILD_PACKAGE_BOOL=True hunk ./configure.ac 20 +AC_SUBST([BUILD_PACKAGE_BOOL]) hunk ./configure.ac 35 -AC_CONFIG_FILES([config.mk]) +AC_CONFIG_FILES([config.mk Setup.buildinfo]) hunk ./configure.ac 10 + +# AC_PATH_XTRA doesn't actually check that the C compiler can +# really include the X headers, so double-check here. In particular, +# this will catch the case of using a mingw32 gcc on a Cygwin system: +# Cygwin has the X headers & libs installed, but the mingw32 gcc can't +# use them, and we want to disable the package in this case. +AC_TRY_CPP([#include ],,[no_x=yes]) hunk ./Setup.description 8 - . - The binding is a direct translation of the C binding; - for documentation of these calls, refer to - /The Xlib Programming Manual/, available online - at . + . + The binding is a direct translation of the C binding; for + documentation of these calls, refer to "The Xlib Programming + Manual", available online at . hunk ./Setup.description 13 - Graphics.X11.Xlib.Atom, - Graphics.X11.Xlib.Color, - Graphics.X11.Xlib.Context, - Graphics.X11.Xlib.Display, - Graphics.X11.Xlib.Event, - Graphics.X11.Xlib.Font, - Graphics.X11.Xlib.Misc, - Graphics.X11.Xlib.Region, - Graphics.X11.Xlib.Screen, - Graphics.X11.Xlib.Types, - Graphics.X11.Xlib.Window, - Graphics.X11.Types, - Graphics.X11.Xlib, - Graphics.X11 + Graphics.X11.Xlib.Atom, + Graphics.X11.Xlib.Color, + Graphics.X11.Xlib.Context, + Graphics.X11.Xlib.Display, + Graphics.X11.Xlib.Event, + Graphics.X11.Xlib.Font, + Graphics.X11.Xlib.Misc, + Graphics.X11.Xlib.Region, + Graphics.X11.Xlib.Screen, + Graphics.X11.Xlib.Types, + Graphics.X11.Xlib.Window, + Graphics.X11.Types, + Graphics.X11.Xlib, + Graphics.X11 hunk ./Setup.description 28 - Graphics.X11.Xlib.Atom, - Graphics.X11.Xlib.Color, - Graphics.X11.Xlib.Context, - Graphics.X11.Xlib.Display, - Graphics.X11.Xlib.Event, - Graphics.X11.Xlib.Font, - Graphics.X11.Xlib.Misc, - Graphics.X11.Xlib.Region, - Graphics.X11.Xlib.Screen, - Graphics.X11.Xlib.Types, - Graphics.X11.Xlib.Window, - Graphics.X11.Types, - Graphics.X11.Xlib, - Graphics.X11 + Graphics.X11.Xlib.Atom, + Graphics.X11.Xlib.Color, + Graphics.X11.Xlib.Context, + Graphics.X11.Xlib.Display, + Graphics.X11.Xlib.Event, + Graphics.X11.Xlib.Font, + Graphics.X11.Xlib.Misc, + Graphics.X11.Xlib.Region, + Graphics.X11.Xlib.Screen, + Graphics.X11.Xlib.Types, + Graphics.X11.Xlib.Window, + Graphics.X11.Types, + Graphics.X11.Xlib, + Graphics.X11 +c-sources: + cbits/fdset.c, + cbits/auxiliaries.c hunk ./Setup.description 47 +build-depends: base hunk ./Setup.description 12 -modules: - Graphics.X11.Xlib.Atom, - Graphics.X11.Xlib.Color, - Graphics.X11.Xlib.Context, - Graphics.X11.Xlib.Display, - Graphics.X11.Xlib.Event, - Graphics.X11.Xlib.Font, - Graphics.X11.Xlib.Misc, - Graphics.X11.Xlib.Region, - Graphics.X11.Xlib.Screen, - Graphics.X11.Xlib.Types, - Graphics.X11.Xlib.Window, - Graphics.X11.Types, - Graphics.X11.Xlib, - Graphics.X11 hunk ./Setup.description 13 + Graphics.X11, + Graphics.X11.Types, + Graphics.X11.Xlib, hunk ./Setup.description 26 - Graphics.X11.Xlib.Window, - Graphics.X11.Types, - Graphics.X11.Xlib, - Graphics.X11 + Graphics.X11.Xlib.Window hunk ./Setup.description 30 +extensions: ForeignFunctionInterface hunk ./Setup.buildinfo.in 3 - +-- hunk ./Setup.buildinfo.in 5 -cc-options: -Iinclude @X_CFLAGS@ +cc-options: @X_CFLAGS@ hunk ./Setup.description 32 +include-dirs: include addfile ./X11.cabal hunk ./Setup.description 1 -name: X11 -version: 1.0 -license: BSD3 -copyright: Alastair Reid, 1999-2003 -maintainer: -category: Graphics -description: A Haskell binding to the X11 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 . -exposed-modules: - Graphics.X11, - Graphics.X11.Types, - Graphics.X11.Xlib, - Graphics.X11.Xlib.Atom, - Graphics.X11.Xlib.Color, - Graphics.X11.Xlib.Context, - Graphics.X11.Xlib.Display, - Graphics.X11.Xlib.Event, - Graphics.X11.Xlib.Font, - Graphics.X11.Xlib.Misc, - Graphics.X11.Xlib.Region, - Graphics.X11.Xlib.Screen, - Graphics.X11.Xlib.Types, - Graphics.X11.Xlib.Window -c-sources: - cbits/fdset.c, - cbits/auxiliaries.c -extensions: ForeignFunctionInterface -extra-libs: "X11" -include-dirs: include -includes: "HsXlib.h" -build-depends: base rmfile ./Setup.description hunk ./X11.cabal 1 +name: X11 +version: 1.0 +license: BSD3 +copyright: Alastair Reid, 1999-2003 +maintainer: +category: Graphics +description: A Haskell binding to the X11 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 . +exposed-modules: + Graphics.X11, + Graphics.X11.Types, + Graphics.X11.Xlib, + Graphics.X11.Xlib.Atom, + Graphics.X11.Xlib.Color, + Graphics.X11.Xlib.Context, + Graphics.X11.Xlib.Display, + Graphics.X11.Xlib.Event, + Graphics.X11.Xlib.Font, + Graphics.X11.Xlib.Misc, + Graphics.X11.Xlib.Region, + Graphics.X11.Xlib.Screen, + Graphics.X11.Xlib.Types, + Graphics.X11.Xlib.Window +c-sources: + cbits/fdset.c, + cbits/auxiliaries.c +extensions: ForeignFunctionInterface +extra-libs: "X11" +include-dirs: include +includes: "HsXlib.h" +build-depends: base addfile ./X11.buildinfo.in hunk ./Setup.buildinfo.in 1 --- @configure_input@ --- System-dependent values used by HugsSetup.hs --- -build-package: @BUILD_PACKAGE_BOOL@ -cc-options: @X_CFLAGS@ -ld-options: @X_LIBS@ -frameworks: rmfile ./Setup.buildinfo.in hunk ./X11.buildinfo.in 1 +-- @configure_input@ +-- System-dependent values used by HugsSetup.hs +-- +build-package: @BUILD_PACKAGE_BOOL@ +cc-options: @X_CFLAGS@ +ld-options: @X_LIBS@ +frameworks: hunk ./configure.ac 42 -AC_CONFIG_FILES([config.mk Setup.buildinfo]) +AC_CONFIG_FILES([config.mk X11.buildinfo]) hunk ./X11.buildinfo.in 2 --- System-dependent values used by HugsSetup.hs +-- System-dependent values used by Distribution.Simple.defaultUserHooks hunk ./X11.buildinfo.in 7 -frameworks: hunk ./X11.buildinfo.in 4 -build-package: @BUILD_PACKAGE_BOOL@ +buildable: @BUILD_PACKAGE_BOOL@ hunk ./X11.cabal 2 -version: 1.0 +version: 1.1 hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.0], [libraries@haskell.org], [X11]) +AC_INIT([Haskell X11 package], [1.1], [libraries@haskell.org], [X11]) hunk ./package.conf.in 27 -#ifdef INSTALLING -import-dirs: "$libdir/imports" -#else -import-dirs: "$libdir/libraries/X11" -#endif - -#ifdef INSTALLING -library-dirs: "$libdir" -#else -library-dirs: "$libdir/libraries/X11" -#endif - +import-dirs: IMPORT_DIR +library-dirs: LIB_DIR hunk ./package.conf.in 31 - -#ifdef INSTALLING -include-dirs: -#else -include-dirs: "$libdir/libraries/X11/include" -#endif - +include-dirs: INCLUDE_DIR hunk ./package.conf.in 41 -haddock-interfaces: -haddock-html: +haddock-interfaces: HADDOCK_IFACE +haddock-html: HTML_DIR hunk ./X11.cabal 4 +license-file: LICENSE hunk ./X11.cabal 8 -description: A Haskell binding to the X11 library. +synopsis: A binding to the X11 graphics library +description: A Haskell binding to the X11 graphics library. hunk ./package.conf.in 30 -extra-libs: "HSX11_cbits", "X11" +extra-libraries: "HSX11_cbits", "X11" hunk ./package.conf.in 34 -extra-hugs-opts: +hugs-options: hunk ./package.conf.in 36 -extra-cc-opts: X_CFLAGS -extra-ld-opts: X_LIBS +cc-options: X_CFLAGS +ld-options: X_LIBS hunk ./package.conf.in 39 -extra-frameworks: +frameworks: hunk ./X11.cabal 33 -extra-libs: "X11" +extra-libraries: "X11" hunk ./Makefile 32 + +DIST_CLEAN_FILES += HsX11Config.h X11.buildinfo config.cache config.status +LATE_DIST_CLEAN_FILES += config.mk hunk ./Makefile 35 + +extraclean:: + $(RM) -rf autom4te.cache hunk ./Makefile 33 -DIST_CLEAN_FILES += HsX11Config.h X11.buildinfo config.cache config.status +DIST_CLEAN_FILES += X11.buildinfo config.cache config.status hunk ./include/Makefile 10 + +DIST_CLEAN_FILES += HsX11Config.h addfile ./Makefile.inc addfile ./Makefile.nhc98 hunk ./Makefile.inc 1 +ifeq "" "${MKDIR}" +MKDIR:=$(shell pwd) +#MKDIR:=$(PWD) +else +MKDIR:=$(patsubst %/$(notdir ${MKDIR}),%, ${MKDIR}) +endif +include ${MKDIR}/Makefile.inc + hunk ./Makefile.nhc98 1 +THISPKG = X11 +SEARCH = -I/usr/X11/include -Iinclude +EXTRA_H_FLAGS = -package base + +SRCS = \ + Graphics/X11.hs \ + Graphics/X11/Types.hs \ + Graphics/X11/Xlib.hs \ + Graphics/X11/Xlib/Atom.hs \ + Graphics/X11/Xlib/Color.hs \ + Graphics/X11/Xlib/Context.hs \ + Graphics/X11/Xlib/Display.hs \ + Graphics/X11/Xlib/Event.hs \ + Graphics/X11/Xlib/Font.hs \ + Graphics/X11/Xlib/Misc.hs \ + Graphics/X11/Xlib/Region.hs \ + Graphics/X11/Xlib/Screen.hs \ + Graphics/X11/Xlib/Types.hs \ + Graphics/X11/Xlib/Window.hs \ + fdset.c \ + auxiliaries.c + +# Here are the main rules. +include ../Makefile.common + +# some extra rules + +# Here are the dependencies. + +# C-files dependencies. + hunk ./Makefile.nhc98 7 - Graphics/X11/Types.hs \ + Graphics/X11/Types.hsc \ hunk ./Makefile.nhc98 9 - Graphics/X11/Xlib/Atom.hs \ + Graphics/X11/Xlib/Atom.hsc \ hunk ./Makefile.nhc98 13 - Graphics/X11/Xlib/Event.hs \ - Graphics/X11/Xlib/Font.hs \ - Graphics/X11/Xlib/Misc.hs \ + Graphics/X11/Xlib/Event.hsc \ + Graphics/X11/Xlib/Font.hsc \ + Graphics/X11/Xlib/Misc.hsc \ hunk ./Makefile.nhc98 18 - Graphics/X11/Xlib/Types.hs \ + Graphics/X11/Xlib/Types.hsc \ hunk ./Graphics/X11/Types.hsc 565 - -- ** Return status - Status, + -- ** Error codes + ErrorCode, hunk ./Graphics/X11/Types.hsc 588 - -- *** Exceptions - throwUnlessSuccess, + -- ** Return status + Status, hunk ./Graphics/X11/Types.hsc 1402 -type Status = Int -#{enum Status, +type ErrorCode = Int +#{enum ErrorCode, hunk ./Graphics/X11/Types.hsc 1426 -errorMsg :: String -> String -> String -errorMsg fn_name what = "Error " ++ what ++ " raised in function " ++ fn_name - -throwUnlessSuccess :: String -> IO Status -> IO () -throwUnlessSuccess fn_name = - throwIf_ (/= success) - (\status -> errorMsg fn_name ("bad status " ++ show status)) +type Status = Int hunk ./Graphics/X11/Types.hsc 1428 +-- |Xlib functions with return values of type @Status@ return zero on +-- failure and nonzero on success. hunk ./Graphics/X11/Types.hsc 1431 -throwIfZero fn_name = throwIf_ (== 0) (const (errorMsg fn_name "zero")) +throwIfZero fn_name = throwIf_ (== 0) (const ("Error in function " ++ fn_name)) hunk ./Graphics/X11/Xlib/Event.hsc 468 - throwUnlessSuccess "sendEvent" $ + throwIfZero "sendEvent" $ hunk ./Graphics/X11/Xlib/Font.hsc 67 - throwUnlessSuccess "fontFromGC" $ + throwIfZero "fontFromGC" $ hunk ./Graphics/X11/Xlib/Misc.hsc 273 - outParameters2 (throwUnlessSuccess "queryBestTile") $ + outParameters2 (throwIfZero "queryBestTile") $ hunk ./Graphics/X11/Xlib/Misc.hsc 283 - outParameters2 (throwUnlessSuccess "queryBestStipple") $ + outParameters2 (throwIfZero "queryBestStipple") $ hunk ./Graphics/X11/Xlib/Misc.hsc 293 - outParameters2 (throwUnlessSuccess "queryBestCursor") $ + outParameters2 (throwIfZero "queryBestCursor") $ hunk ./Graphics/X11/Xlib/Misc.hsc 303 - outParameters2 (throwUnlessSuccess "queryBestSize") $ + outParameters2 (throwIfZero "queryBestSize") $ hunk ./Graphics/X11/Xlib/Misc.hsc 564 - outParameters7 (throwUnlessSuccess "getGeometry") $ + outParameters7 (throwIfZero "getGeometry") $ hunk ./Graphics/X11/Xlib/Misc.hsc 823 - throwUnlessSuccess "getIconName" $ + throwIfZero "getIconName" $ hunk ./Graphics/X11/Xlib/Misc.hsc 1107 - throwUnlessSuccess "storeBuffer" $ + throwIfZero "storeBuffer" $ hunk ./Graphics/X11/Xlib/Misc.hsc 1116 - throwUnlessSuccess "storeBytes" $ + throwIfZero "storeBytes" $ hunk ./Graphics/X11/Xlib/Misc.hsc 1150 - throwUnlessSuccess "rotateBuffers" $ + throwIfZero "rotateBuffers" $ hunk ./Graphics/X11/Xlib/Window.hs 155 - throwUnlessSuccess "iconifyWindow" + throwIfZero "iconifyWindow" hunk ./Graphics/X11/Xlib/Window.hs 163 - throwUnlessSuccess "withdrawWindow" + throwIfZero "withdrawWindow" hunk ./configure.ac 16 +CPPFLAGS="$CPPFLAGS $X_CFLAGS" hunk ./X11.cabal 14 +other-files: + configure.ac configure config.mk.in X11.buildinfo.in + include/HsX11Config.h.in include/HsXlib.h hunk ./Makefile 7 +ifneq "$(findstring clean, $(MAKECMDGOALS))" "" +# if we're cleaning, then config.mk might have been cleaned already +X11_BUILD_PACKAGE=yes +PACKAGE=X11 +endif + hunk ./Makefile 39 -DIST_CLEAN_FILES += X11.buildinfo config.cache config.status -LATE_DIST_CLEAN_FILES += config.mk +DIST_CLEAN_FILES += X11.buildinfo config.cache config.status config.mk hunk ./X11.cabal 14 -other-files: - configure.ac configure config.mk.in X11.buildinfo.in - include/HsX11Config.h.in include/HsXlib.h +extra-source-files: + configure.ac configure + config.mk.in X11.buildinfo.in include/HsX11Config.h.in + include/HsXlib.h +extra-tmp-files: + config.log config.status autom4te.cache + config.mk X11.buildinfo include/HsX11Config.h hunk ./Graphics/X11/Xlib/Color.hs 47 - allocaColor $ \ exact_def_return -> - allocaColor $ \ screen_def_return -> do + alloca $ \ exact_def_return -> + alloca $ \ screen_def_return -> do hunk ./Graphics/X11/Xlib/Color.hs 52 - exact_def <- peekColor exact_def_return - screen_def <- peekColor screen_def_return + exact_def <- peek exact_def_return + screen_def <- peek screen_def_return hunk ./Graphics/X11/Xlib/Color.hs 63 - allocaColor $ \ exact_def_return -> - allocaColor $ \ screen_def_return -> do + alloca $ \ exact_def_return -> + alloca $ \ screen_def_return -> do hunk ./Graphics/X11/Xlib/Color.hs 68 - exact_def <- peekColor exact_def_return - screen_def <- peekColor screen_def_return + exact_def <- peek exact_def_return + screen_def <- peek screen_def_return hunk ./Graphics/X11/Xlib/Color.hs 78 - withColor color $ \ color_ptr -> do + with color $ \ color_ptr -> do hunk ./Graphics/X11/Xlib/Color.hs 81 - peekColor color_ptr + peek color_ptr hunk ./Graphics/X11/Xlib/Color.hs 89 - allocaColor $ \ exact_def_return -> do + alloca $ \ exact_def_return -> do hunk ./Graphics/X11/Xlib/Color.hs 92 - peekColor exact_def_return + peek exact_def_return hunk ./Graphics/X11/Xlib/Color.hs 113 - withColor color $ \ color_ptr -> + with color $ \ color_ptr -> hunk ./Graphics/X11/Xlib/Color.hs 125 - withColor color $ \ color_ptr -> do + with color $ \ color_ptr -> do hunk ./Graphics/X11/Xlib/Color.hs 127 - peekColor color_ptr + peek color_ptr hunk ./Graphics/X11/Xlib/Color.hs 134 - withColorArray colors $ \ color_array ncolors -> do + withArrayLen colors $ \ ncolors color_array -> do hunk ./Graphics/X11/Xlib/Color.hs 136 - peekColorArray ncolors color_array + peekArray ncolors color_array hunk ./Graphics/X11/Xlib/Context.hs 142 - xCreateGC :: Display -> Drawable -> ValueMask -> Ptr XGCValues -> IO GC + xCreateGC :: Display -> Drawable -> ValueMask -> Ptr GCValues -> IO GC hunk ./Graphics/X11/Xlib/Event.hsc 1 +{-# OPTIONS_GHC -fglasgow-exts #-} hunk ./Graphics/X11/Xlib/Event.hsc 68 +#if __GLASGOW_HASKELL__ +import Data.Generics +#endif + hunk ./Graphics/X11/Xlib/Event.hsc 99 +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif hunk ./Graphics/X11/Xlib/Event.hsc 410 +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif hunk ./Graphics/X11/Xlib/Event.hsc 444 +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif hunk ./Graphics/X11/Xlib/Font.hsc 1 +{-# OPTIONS_GHC -fglasgow-exts #-} hunk ./Graphics/X11/Xlib/Font.hsc 23 + FontStruct, hunk ./Graphics/X11/Xlib/Font.hsc 41 +#if __GLASGOW_HASKELL__ +import Data.Generics +#endif + hunk ./Graphics/X11/Xlib/Font.hsc 53 +-- | pointer to an X11 @XFontStruct@ structure +newtype FontStruct = FontStruct (Ptr FontStruct) +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif + hunk ./Graphics/X11/Xlib/Font.hsc 82 - xGetGCValues display gc #{const GCFont} (XGCValues values) + xGetGCValues display gc #{const GCFont} values hunk ./Graphics/X11/Xlib/Font.hsc 85 - xGetGCValues :: Display -> GC -> ValueMask -> XGCValues -> IO Int + xGetGCValues :: Display -> GC -> ValueMask -> Ptr GCValues -> IO Int hunk ./Graphics/X11/Xlib/Font.hsc 151 - return (fromIntegral (lbearing::Short), - fromIntegral (rbearing::Short), - fromIntegral (width::Short), - fromIntegral (ascent::Short), - fromIntegral (descent::Short)) + return (fromIntegral (lbearing::CShort), + fromIntegral (rbearing::CShort), + fromIntegral (width::CShort), + fromIntegral (ascent::CShort), + fromIntegral (descent::CShort)) hunk ./Graphics/X11/Xlib/Misc.hsc 1 +{-# OPTIONS_GHC -fglasgow-exts #-} hunk ./Graphics/X11/Xlib/Misc.hsc 110 - allocaXSetWindowAttributes, + allocaSetWindowAttributes, hunk ./Graphics/X11/Xlib/Misc.hsc 168 +#if __GLASGOW_HASKELL__ +import Data.Generics +#endif + hunk ./Graphics/X11/Xlib/Misc.hsc 443 +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif hunk ./Graphics/X11/Xlib/Misc.hsc 789 +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif hunk ./Graphics/X11/Xlib/Misc.hsc 869 - withColor fg_color $ \ fg_color_ptr -> - withColor bg_color $ \ bg_color_ptr -> + with fg_color $ \ fg_color_ptr -> + with bg_color $ \ bg_color_ptr -> hunk ./Graphics/X11/Xlib/Misc.hsc 881 - withColor fg_color $ \ fg_color_ptr -> - withColor bg_color $ \ bg_color_ptr -> + with fg_color $ \ fg_color_ptr -> + with bg_color $ \ bg_color_ptr -> hunk ./Graphics/X11/Xlib/Misc.hsc 900 - withColor fg_color $ \ fg_color_ptr -> - withColor bg_color $ \ bg_color_ptr -> + with fg_color $ \ fg_color_ptr -> + with bg_color $ \ bg_color_ptr -> hunk ./Graphics/X11/Xlib/Misc.hsc 933 -allocaXSetWindowAttributes :: (Ptr XSetWindowAttributes -> IO a) -> IO a -allocaXSetWindowAttributes = allocaBytes #{size XSetWindowAttributes} +allocaSetWindowAttributes :: (Ptr SetWindowAttributes -> IO a) -> IO a +allocaSetWindowAttributes = allocaBytes #{size XSetWindowAttributes} hunk ./Graphics/X11/Xlib/Misc.hsc 938 -set_background_pixmap :: Ptr XSetWindowAttributes -> Pixmap -> IO () +set_background_pixmap :: Ptr SetWindowAttributes -> Pixmap -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 941 -set_background_pixel :: Ptr XSetWindowAttributes -> Pixel -> IO () +set_background_pixel :: Ptr SetWindowAttributes -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 944 -set_border_pixmap :: Ptr XSetWindowAttributes -> Pixmap -> IO () +set_border_pixmap :: Ptr SetWindowAttributes -> Pixmap -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 947 -set_border_pixel :: Ptr XSetWindowAttributes -> Pixel -> IO () +set_border_pixel :: Ptr SetWindowAttributes -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 950 -set_bit_gravity :: Ptr XSetWindowAttributes -> BitGravity -> IO () +set_bit_gravity :: Ptr SetWindowAttributes -> BitGravity -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 953 -set_win_gravity :: Ptr XSetWindowAttributes -> WindowGravity -> IO () +set_win_gravity :: Ptr SetWindowAttributes -> WindowGravity -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 956 -set_backing_store :: Ptr XSetWindowAttributes -> BackingStore -> IO () +set_backing_store :: Ptr SetWindowAttributes -> BackingStore -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 959 -set_backing_planes :: Ptr XSetWindowAttributes -> Pixel -> IO () +set_backing_planes :: Ptr SetWindowAttributes -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 962 -set_backing_pixel :: Ptr XSetWindowAttributes -> Pixel -> IO () +set_backing_pixel :: Ptr SetWindowAttributes -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 965 -set_save_under :: Ptr XSetWindowAttributes -> Bool -> IO () +set_save_under :: Ptr SetWindowAttributes -> Bool -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 968 -set_event_mask :: Ptr XSetWindowAttributes -> EventMask -> IO () +set_event_mask :: Ptr SetWindowAttributes -> EventMask -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 971 -set_do_not_propagate_mask :: Ptr XSetWindowAttributes -> EventMask -> IO () +set_do_not_propagate_mask :: Ptr SetWindowAttributes -> EventMask -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 974 -set_override_redirect :: Ptr XSetWindowAttributes -> Bool -> IO () +set_override_redirect :: Ptr SetWindowAttributes -> Bool -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 977 -set_colormap :: Ptr XSetWindowAttributes -> Colormap -> IO () +set_colormap :: Ptr SetWindowAttributes -> Colormap -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 980 -set_cursor :: Ptr XSetWindowAttributes -> Cursor -> IO () +set_cursor :: Ptr SetWindowAttributes -> Cursor -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 994 - withPointArray points $ \ point_array npoints -> + withArrayLen points $ \ npoints point_array -> hunk ./Graphics/X11/Xlib/Misc.hsc 1008 - withPointArray points $ \ point_array npoints -> + withArrayLen points $ \ npoints point_array -> hunk ./Graphics/X11/Xlib/Misc.hsc 1017 - withSegmentArray segments $ \ segment_array nsegments -> + withArrayLen segments $ \ nsegments segment_array -> hunk ./Graphics/X11/Xlib/Misc.hsc 1029 - withRectangleArray rectangles $ \ rectangle_array nrectangles -> + withArrayLen rectangles $ \ nrectangles rectangle_array -> hunk ./Graphics/X11/Xlib/Misc.hsc 1042 - withArcArray arcs $ \ arc_array narcs -> + withArrayLen arcs $ \ narcs arc_array -> hunk ./Graphics/X11/Xlib/Misc.hsc 1055 - withRectangleArray rectangles $ \ rectangle_array nrectangles -> + withArrayLen rectangles $ \ nrectangles rectangle_array -> hunk ./Graphics/X11/Xlib/Misc.hsc 1063 - withPointArray points $ \ point_array npoints -> + withArrayLen points $ \ npoints point_array -> hunk ./Graphics/X11/Xlib/Misc.hsc 1076 - withArcArray arcs $ \ arc_array narcs -> + withArrayLen arcs $ \ narcs arc_array -> hunk ./Graphics/X11/Xlib/Misc.hsc 1175 +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif hunk ./Graphics/X11/Xlib/Region.hs 1 +{-# OPTIONS_GHC -cpp -fglasgow-exts #-} hunk ./Graphics/X11/Xlib/Region.hs 47 +import Foreign.Storable +import Foreign.Marshal.Alloc +import Foreign.Marshal.Array +import Foreign.Marshal.Utils + +#if __GLASGOW_HASKELL__ +import Data.Generics +#endif hunk ./Graphics/X11/Xlib/Region.hs 61 +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif hunk ./Graphics/X11/Xlib/Region.hs 108 - withPointArray points $ \ point_arr n -> do + withArrayLen points $ \ n point_arr -> do hunk ./Graphics/X11/Xlib/Region.hs 149 - withRectangle rect $ \ rect_ptr -> + with rect $ \ rect_ptr -> hunk ./Graphics/X11/Xlib/Region.hs 200 -pointInRegion r (x,y) = +pointInRegion r (Point x y) = hunk ./Graphics/X11/Xlib/Region.hs 208 -rectInRegion r (x,y,w,h) = +rectInRegion r (Rectangle x y w h) = hunk ./Graphics/X11/Xlib/Region.hs 221 - allocaRectangle $ \ rect_ptr -> do + alloca $ \ rect_ptr -> do hunk ./Graphics/X11/Xlib/Region.hs 223 - rect <- peekRectangle rect_ptr + rect <- peek rect_ptr hunk ./Graphics/X11/Xlib/Region.hs 238 -offsetRegion r (x,y) = +offsetRegion r (Point x y) = hunk ./Graphics/X11/Xlib/Region.hs 250 -shrinkRegion r (x,y) = +shrinkRegion r (Point x y) = hunk ./Graphics/X11/Xlib/Types.hsc 1 +{-# OPTIONS_GHC -fglasgow-exts #-} hunk ./Graphics/X11/Xlib/Types.hsc 16 +-- #hide hunk ./Graphics/X11/Xlib/Types.hsc 18 - module Graphics.X11.Xlib.Types + Display(..), Screen, Visual, GC, GCValues, SetWindowAttributes, + Point(..), Rectangle(..), Arc(..), Segment(..), Color(..), + Pixel, Position, Dimension, Angle, ScreenNumber, Buffer hunk ./Graphics/X11/Xlib/Types.hsc 26 +import Foreign.C.Types hunk ./Graphics/X11/Xlib/Types.hsc 31 +#if __GLASGOW_HASKELL__ +import Data.Generics +#endif + hunk ./Graphics/X11/Xlib/Types.hsc 43 +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif + hunk ./Graphics/X11/Xlib/Types.hsc 51 +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif + hunk ./Graphics/X11/Xlib/Types.hsc 59 --- | pointer to an X11 @XFontStruct@ structure -newtype FontStruct = FontStruct (Ptr FontStruct) +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif + +-- | pointer to an X11 @GC@ structure hunk ./Graphics/X11/Xlib/Types.hsc 67 -newtype XGCValues = XGCValues (Ptr XGCValues) +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif hunk ./Graphics/X11/Xlib/Types.hsc 73 -newtype XSetWindowAttributes = XSetWindowAttributes XSetWindowAttributesPtr -type XSetWindowAttributesPtr = Ptr XSetWindowAttributes +-- | pointer to an X11 @XGCValues@ structure +newtype GCValues = GCValues (Ptr GCValues) +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif + +-- | pointer to an X11 @XSetWindowAttributes@ structure +newtype SetWindowAttributes = SetWindowAttributes (Ptr SetWindowAttributes) +#if __GLASGOW_HASKELL__ + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif hunk ./Graphics/X11/Xlib/Types.hsc 94 -type Byte = Word8 hunk ./Graphics/X11/Xlib/Types.hsc 100 -type ShortPosition = #{type short} -type ShortDimension = #{type unsigned short} -type ShortAngle = #{type short} -type Short = #{type short} +type ShortPosition = CShort +type ShortDimension = CUShort +type ShortAngle = CShort hunk ./Graphics/X11/Xlib/Types.hsc 131 ----------------------------------------------------------------- --- Marshalling of arbitrary types ----------------------------------------------------------------- - --- We can't use the similarily named library functions for several reasons: --- 1) They deal with Ptrs instead of Ptr-Len pairs --- 2) They require instances of Storable but we apply these functions --- to type synonyms like 'Point = (Int,Int)' which cannot be --- instances. - -data Storable' a = Storable' - { size :: Int - , peek' :: Ptr a -> IO a - , poke' :: Ptr a -> a -> IO () - } - -alloca' :: Storable' a -> (Ptr a -> IO b) -> IO b -alloca' st = allocaBytes (size st) - -withStorable' :: Storable' a -> a -> (Ptr a -> IO b) -> IO b -withStorable' st x f = alloca' st $ \ ptr -> do - poke' st ptr x - f ptr - -peekElemOff' :: Storable' a -> Ptr a -> Int -> IO a -peekElemOff' st p off = peek' st (p `plusPtr` (size st*off)) - -pokeElemOff' :: Storable' a -> Ptr a -> Int -> a -> IO () -pokeElemOff' st p off = poke' st (p `plusPtr` (size st*off)) - -peekArray' :: Storable' a -> Int -> Ptr a -> IO [a] -peekArray' st len ptr = mapM (peekElemOff' st ptr) [0..len-1] - -pokeArray' :: Storable' a -> Ptr a -> [a] -> IO () -pokeArray' st ptr xs = zipWithM_ (pokeElemOff' st ptr) [0..] xs - -withArray' :: Storable' a -> [a] -> (Ptr a -> Int -> IO b) -> IO b -withArray' st xs f = allocaBytes (size st * len) $ \ ptr -> do - pokeArray' st ptr xs - f ptr len - where len = length xs - hunk ./Graphics/X11/Xlib/Types.hsc 136 -type Point = - ( Position -- x - , Position -- y - ) - -s_Point :: Storable' Point -s_Point = Storable' #{size XPoint} peekPoint pokePoint +data Point = Point { pt_x :: Position, pt_y :: Position } +#if __GLASGOW_HASKELL__ + deriving (Eq, Show, Typeable, Data) +#else + deriving (Eq, Show) +#endif hunk ./Graphics/X11/Xlib/Types.hsc 143 -peekPoint :: Ptr Point -> IO Point -peekPoint p = do - x <- peekPositionField p #{offset XPoint,x} - y <- peekPositionField p #{offset XPoint,y} - return (x,y) - -pokePoint :: Ptr Point -> Point -> IO () -pokePoint p (x,y) = do - pokePositionField p #{offset XPoint,x} x - pokePositionField p #{offset XPoint,y} y - -peekPointArray :: Int -> Ptr Point -> IO [Point] -peekPointArray = peekArray' s_Point - -withPointArray :: [Point] -> (Ptr Point -> Int -> IO b) -> IO b -withPointArray = withArray' s_Point +instance Storable Point where + sizeOf _ = #{size XPoint} + alignment _ = alignment (undefined::CInt) + peek p = do + x <- peekPositionField p #{offset XPoint,x} + y <- peekPositionField p #{offset XPoint,y} + return (Point x y) + poke p (Point x y) = do + pokePositionField p #{offset XPoint,x} x + pokePositionField p #{offset XPoint,y} y hunk ./Graphics/X11/Xlib/Types.hsc 159 -type Rectangle = - ( Position -- x - , Position -- y - , Dimension -- width - , Dimension -- height - ) - -s_Rectangle :: Storable' Rectangle -s_Rectangle = Storable' #{size XRectangle} peekRectangle pokeRectangle - -peekRectangle :: Ptr Rectangle -> IO Rectangle -peekRectangle p = do - x <- peekPositionField p #{offset XRectangle,x} - y <- peekPositionField p #{offset XRectangle,y} - width <- peekDimensionField p #{offset XRectangle,width} - height <- peekDimensionField p #{offset XRectangle,height} - return (x,y,width,height) - -pokeRectangle :: Ptr Rectangle -> Rectangle -> IO () -pokeRectangle p (x,y,width,height) = do - pokePositionField p #{offset XRectangle,x} x - pokePositionField p #{offset XRectangle,y} y - pokeDimensionField p #{offset XRectangle,width} width - pokeDimensionField p #{offset XRectangle,height} height - -allocaRectangle :: (Ptr Rectangle -> IO a) -> IO a -allocaRectangle = alloca' s_Rectangle - -withRectangle :: Rectangle -> (Ptr Rectangle -> IO a) -> IO a -withRectangle = withStorable' s_Rectangle - -peekRectangleArray :: Int -> Ptr Rectangle -> IO [Rectangle] -peekRectangleArray = peekArray' s_Rectangle +data Rectangle = Rectangle { + rect_x :: Position, + rect_y :: Position, + rect_width :: Dimension, + rect_height :: Dimension + } +#if __GLASGOW_HASKELL__ + deriving (Eq, Show, Typeable, Data) +#else + deriving (Eq, Show) +#endif hunk ./Graphics/X11/Xlib/Types.hsc 171 -withRectangleArray :: [Rectangle] -> (Ptr Rectangle -> Int -> IO b) -> IO b -withRectangleArray = withArray' s_Rectangle +instance Storable Rectangle where + sizeOf _ = #{size XRectangle} + alignment _ = alignment (undefined::CInt) + peek p = do + x <- peekPositionField p #{offset XRectangle,x} + y <- peekPositionField p #{offset XRectangle,y} + width <- peekDimensionField p #{offset XRectangle,width} + height <- peekDimensionField p #{offset XRectangle,height} + return (Rectangle x y width height) + poke p (Rectangle x y width height) = do + pokePositionField p #{offset XRectangle,x} x + pokePositionField p #{offset XRectangle,y} y + pokeDimensionField p #{offset XRectangle,width} width + pokeDimensionField p #{offset XRectangle,height} height hunk ./Graphics/X11/Xlib/Types.hsc 191 -type Arc = - ( Position -- x - , Position -- y - , Dimension -- width - , Dimension -- height - , Angle -- angle1 - , Angle -- angle2 - ) - -s_Arc :: Storable' Arc -s_Arc = Storable' #{size XArc} peekArc pokeArc - -peekArc :: Ptr Arc -> IO Arc -peekArc p = do - x <- peekPositionField p #{offset XArc,x} - y <- peekPositionField p #{offset XArc,y} - width <- peekDimensionField p #{offset XArc,width} - height <- peekDimensionField p #{offset XArc,height} - angle1 <- peekAngleField p #{offset XArc,angle1} - angle2 <- peekAngleField p #{offset XArc,angle2} - return (x,y,width,height,angle1,angle2) - -pokeArc :: Ptr Arc -> Arc -> IO () -pokeArc p (x,y,width,height,angle1,angle2) = do - pokePositionField p #{offset XArc,x} x - pokePositionField p #{offset XArc,y} y - pokeDimensionField p #{offset XArc,width} width - pokeDimensionField p #{offset XArc,height} height - pokeAngleField p #{offset XArc,angle1} angle1 - pokeAngleField p #{offset XArc,angle2} angle2 - -peekArcArray :: Int -> Ptr Arc -> IO [Arc] -peekArcArray = peekArray' s_Arc +data Arc = Arc { + arc_x :: Position, + arc_y :: Position, + arc_width :: Dimension, + arc_height :: Dimension, + arc_angle1 :: Angle, + arc_angle2 :: Angle + } +#if __GLASGOW_HASKELL__ + deriving (Eq, Show, Typeable, Data) +#else + deriving (Eq, Show) +#endif hunk ./Graphics/X11/Xlib/Types.hsc 205 -withArcArray :: [Arc] -> (Ptr Arc -> Int -> IO b) -> IO b -withArcArray = withArray' s_Arc +instance Storable Arc where + sizeOf _ = #{size XArc} + alignment _ = alignment (undefined::CInt) + peek p = do + x <- peekPositionField p #{offset XArc,x} + y <- peekPositionField p #{offset XArc,y} + width <- peekDimensionField p #{offset XArc,width} + height <- peekDimensionField p #{offset XArc,height} + angle1 <- peekAngleField p #{offset XArc,angle1} + angle2 <- peekAngleField p #{offset XArc,angle2} + return (Arc x y width height angle1 angle2) + poke p (Arc x y width height angle1 angle2) = do + pokePositionField p #{offset XArc,x} x + pokePositionField p #{offset XArc,y} y + pokeDimensionField p #{offset XArc,width} width + pokeDimensionField p #{offset XArc,height} height + pokeAngleField p #{offset XArc,angle1} angle1 + pokeAngleField p #{offset XArc,angle2} angle2 hunk ./Graphics/X11/Xlib/Types.hsc 229 -type Segment = - ( Position -- x1 - , Position -- y1 - , Position -- x2 - , Position -- y2 - ) - -s_Segment :: Storable' Segment -s_Segment = Storable' #{size XSegment} peekSegment pokeSegment - -peekSegment :: Ptr Segment -> IO Segment -peekSegment p = do - x1 <- peekPositionField p #{offset XSegment,x1} - y1 <- peekPositionField p #{offset XSegment,y1} - x2 <- peekPositionField p #{offset XSegment,x2} - y2 <- peekPositionField p #{offset XSegment,y2} - return (x1,y1,x2,y2) - -pokeSegment :: Ptr Segment -> Segment -> IO () -pokeSegment p (x1,y1,x2,y2) = do - pokePositionField p #{offset XSegment,x1} x1 - pokePositionField p #{offset XSegment,y1} y1 - pokePositionField p #{offset XSegment,x2} x2 - pokePositionField p #{offset XSegment,y2} y2 - -peekSegmentArray :: Int -> Ptr Segment -> IO [Segment] -peekSegmentArray = peekArray' s_Segment +data Segment = Segment { + seg_x1 :: Position, + seg_y1 :: Position, + seg_x2 :: Position, + seg_y2 :: Position + } +#if __GLASGOW_HASKELL__ + deriving (Eq, Show, Typeable, Data) +#else + deriving (Eq, Show) +#endif hunk ./Graphics/X11/Xlib/Types.hsc 241 -withSegmentArray :: [Segment] -> (Ptr Segment -> Int -> IO b) -> IO b -withSegmentArray = withArray' s_Segment +instance Storable Segment where + sizeOf _ = #{size XSegment} + alignment _ = alignment (undefined::CInt) + peek p = do + x1 <- peekPositionField p #{offset XSegment,x1} + y1 <- peekPositionField p #{offset XSegment,y1} + x2 <- peekPositionField p #{offset XSegment,x2} + y2 <- peekPositionField p #{offset XSegment,y2} + return (Segment x1 y1 x2 y2) + poke p (Segment x1 y1 x2 y2) = do + pokePositionField p #{offset XSegment,x1} x1 + pokePositionField p #{offset XSegment,y1} y1 + pokePositionField p #{offset XSegment,x2} x2 + pokePositionField p #{offset XSegment,y2} y2 hunk ./Graphics/X11/Xlib/Types.hsc 261 -type Color = - ( Pixel -- pixel - , Word16 -- red - , Word16 -- green - , Word16 -- blue - , Word8 -- flags - ) - -s_Color :: Storable' Color -s_Color = Storable' #{size XColor} peekColor pokeColor - -peekColor :: Ptr Color -> IO Color -peekColor p = do - pixel <- #{peek XColor,pixel} p - red <- #{peek XColor,red} p - green <- #{peek XColor,green} p - blue <- #{peek XColor,blue} p - flags <- #{peek XColor,flags} p - return (pixel,red,green,blue,flags) - -pokeColor :: Ptr Color -> Color -> IO () -pokeColor p (pixel,red,green,blue,flags) = do - #{poke XColor,pixel} p pixel - #{poke XColor,red} p red - #{poke XColor,green} p green - #{poke XColor,blue} p blue - #{poke XColor,flags} p flags - -allocaColor :: (Ptr Color -> IO a) -> IO a -allocaColor = alloca' s_Color - -withColor :: Color -> (Ptr Color -> IO a) -> IO a -withColor = withStorable' s_Color - -peekColorArray :: Int -> Ptr Color -> IO [Color] -peekColorArray = peekArray' s_Color - -withColorArray :: [Color] -> (Ptr Color -> Int -> IO b) -> IO b -withColorArray = withArray' s_Color - ----------------------------------------------------------------- --- Backwards compatibility ----------------------------------------------------------------- +data Color = Color { + color_pixel :: Pixel, + color_red :: Word16, + color_green :: Word16, + color_blue :: Word16, + color_flags :: Word8 + } +#if __GLASGOW_HASKELL__ + deriving (Eq, Show, Typeable, Data) +#else + deriving (Eq, Show) +#endif hunk ./Graphics/X11/Xlib/Types.hsc 274 -type ListPoint = [Point] -type ListRectangle = [Rectangle] -type ListArc = [Arc] -type ListSegment = [Segment] -type ListColor = [Color] +instance Storable Color where + sizeOf _ = #{size XColor} + alignment _ = alignment (undefined::CInt) + peek p = do + pixel <- #{peek XColor,pixel} p + red <- #{peek XColor,red} p + green <- #{peek XColor,green} p + blue <- #{peek XColor,blue} p + flags <- #{peek XColor,flags} p + return (Color pixel red green blue flags) + poke p (Color pixel red green blue flags) = do + #{poke XColor,pixel} p pixel + #{poke XColor,red} p red + #{poke XColor,green} p green + #{poke XColor,blue} p blue + #{poke XColor,flags} p flags hunk ./Graphics/X11/Xlib/Window.hs 78 - Visual -> AttributeMask -> Ptr XSetWindowAttributes -> IO Window + Visual -> AttributeMask -> Ptr SetWindowAttributes -> IO Window hunk ./Graphics/X11/Xlib.hs 29 - Display, Screen, Visual, FontStruct, GC, XSetWindowAttributes, - Pixel, Position, Dimension, Angle, - ScreenNumber, Byte, Buffer, - Point, Rectangle, Arc, Segment, Color, + Display, Screen, Visual, GC, SetWindowAttributes, + Point(..), Rectangle(..), Arc(..), Segment(..), Color(..), + Pixel, Position, Dimension, Angle, ScreenNumber, Buffer, hunk ./aclocal.m4 4 +# FP_ARG_X11 +# ------------- +AC_DEFUN([FP_ARG_X11], +[AC_ARG_ENABLE([x11], + [AC_HELP_STRING([--enable-x11], + [build a Haskell binding for X11. + (default=autodetect)])], + [enable_x11=$enableval], + [enable_x11=yes]) +])# FP_ARG_X11 + hunk ./configure.ac 3 +FP_ARG_X11 + +if test "$enable_x11" = no; then + X11_BUILD_PACKAGE=no + BUILD_PACKAGE_BOOL=False +else hunk ./configure.ac 33 +fi addfile ./Setup.hs hunk ./Setup.hs 1 +module Main (main) where + +import Distribution.Simple (defaultMainWithHooks, defaultUserHooks) + +main :: IO () +main = defaultMainWithHooks defaultUserHooks hunk ./Makefile 22 + +EXCLUDED_SRCS += Setup.hs hunk ./X11.cabal 2 -version: 1.1 +version: 1.2 hunk ./Makefile 23 -EXCLUDED_SRCS += Setup.hs - hunk ./Makefile 37 +EXCLUDED_SRCS += Setup.hs + hunk ./X11.cabal 42 -includes: "HsXlib.h" +install-includes: HsXlib.h hunk ./X11.cabal 39 -extensions: ForeignFunctionInterface +extensions: ForeignFunctionInterface, CPP hunk ./Graphics/X11/Types.hsc 784 + -- ** Image format + ImageFormat, + xyBitmap, + xyPixmap, + zPixmap hunk ./Graphics/X11/Types.hsc 1685 + +type ImageFormat = Int +#{enum ImageFormat, + , xyBitmap = XYBitmap + , xyPixmap = XYPixmap + , zPixmap = ZPixmap + } hunk ./Graphics/X11/Xlib/Misc.hsc 670 --- XVisualIDFromVisual omitted +-- | see @XVisualIDFromVisual()@ +foreign import ccall unsafe "HsXlib.h XVisualIDFromVisual" + visualIDFromVisual :: Visual -> IO VisualID + +-- XGetVisualInfo omitted +-- XMatchVisualInfo omitted + hunk ./Graphics/X11/Xlib/Misc.hsc 826 ----------------------------------------------------------------- --- Image ----------------------------------------------------------------- - --- XCreateImage omitted --- XInitImage omitted --- XGetImage omitted --- XPutImage omitted --- XGetSubImage omitted - hunk ./Graphics/X11/Xlib/Types.hsc 19 - Point(..), Rectangle(..), Arc(..), Segment(..), Color(..), + Image(..), Point(..), Rectangle(..), Arc(..), Segment(..), Color(..), hunk ./Graphics/X11/Xlib/Types.hsc 84 + deriving (Eq, Ord, Show, Typeable, Data) +#else + deriving (Eq, Ord, Show) +#endif + +-- | pointer to an X11 @XImage@ structure +newtype Image = Image (Ptr Image) +#if __GLASGOW_HASKELL__ hunk ./X11.cabal 35 - Graphics.X11.Xlib.Window + Graphics.X11.Xlib.Window, + Graphics.X11.Xlib.Image addfile ./Graphics/X11/Xlib/Image.hsc hunk ./Graphics/X11/Xlib/Image.hsc 1 +{-# OPTIONS_GHC -fglasgow-exts #-} +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Image +-- Copyright : (c) Frederik Eaton 2006 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org, frederik@ofb.net +-- Stability : provisional +-- Portability : portable +-- +-- Xlib image routines +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Image( + -- * Images, + Image, + createImage, + putImage, + destroyImage, + ) where + +import Graphics.X11.Types +import Graphics.X11.Xlib.Types + +import Foreign +import Foreign.C + +#include "HsXlib.h" + +---------------------------------------------------------------- +-- Image +---------------------------------------------------------------- + +-- | XCreateImage +createImage :: Display -> Visual -> Int -> ImageFormat -> Int -> Ptr CChar -> Dimension -> Dimension -> Int -> Int -> IO Image +createImage display vis depth format offset dat width height bitmap_pad bytes_per_line = do + image <- throwIfNull "createImage" (xCreateImage display vis depth format offset dat width height bitmap_pad bytes_per_line) + return (Image image) +foreign import ccall unsafe "HsXlib.h XCreateImage" + xCreateImage :: Display -> Visual -> Int -> ImageFormat -> Int -> + Ptr CChar -> Dimension -> Dimension -> Int -> Int -> IO (Ptr Image) + +-- | XPutImage +foreign import ccall unsafe "HsXlib.h XPutImage" + putImage :: Display -> Drawable -> GC -> Image -> + Position -> Position -> Position -> Position -> Dimension -> Dimension -> IO () + +foreign import ccall unsafe "HsXlib.h XDestroyImage" + destroyImage :: Image -> IO () + +{- don't need XInitImage since Haskell users probably won't be setting +members of the XImage structure themselves -} +-- XInitImage omitted + +{- these two functions are for fetching image data from a drawable +back into an image struct. i'm not exactly sure when they would be +used -} +-- XGetImage omitted +-- XGetSubImage omitted + hunk ./include/HsXlib.h 2 - * $Id: HsXlib.h,v 1.3 2004/02/16 18:01:29 ross Exp $ hunk ./include/HsXlib.h 16 +#define XUTIL_DEFINE_FUNCTIONS move ./Graphics/X11/Xlib/Image.hsc ./Graphics/X11/Xlib/Image.hs hunk ./Graphics/X11/Xlib/Image.hs 1 -{-# OPTIONS_GHC -fglasgow-exts #-} hunk ./Graphics/X11/Xlib/Image.hs 29 -#include "HsXlib.h" - hunk ./Graphics/X11/Xlib/Image.hs 16 - -- * Images, hunk ./Graphics/X11/Xlib/Image.hs 32 --- | XCreateImage +-- | interface to the X11 library function @XCreateImage()@. hunk ./Graphics/X11/Xlib/Image.hs 41 --- | XPutImage +-- | interface to the X11 library function @XPutImage()@. hunk ./Graphics/X11/Xlib/Image.hs 46 +-- | interface to the X11 library function @XDestroyImage()@. hunk ./Graphics/X11/Xlib.hs 43 + module Graphics.X11.Xlib.Image, hunk ./Graphics/X11/Xlib.hs 59 +import Graphics.X11.Xlib.Image hunk ./include/HsXlib.h 16 -#define XUTIL_DEFINE_FUNCTIONS hunk ./include/HsXlib.h 18 +/* Xutil.h overrides some functions with macros. + * In recent versions of X this can be turned off with + * + * #define XUTIL_DEFINE_FUNCTIONS + * + * before the #include, but this doesn't work with older versions. + * As a workaround, we undef the macros here. Note that this is only + * safe for functions with return type int. + */ +#undef XDestroyImage +#undef AddPixel + hunk ./include/HsXlib.h 11 + +/* This doesn't always work, so we play safe below... */ +#define XUTIL_DEFINE_FUNCTIONS hunk ./include/HsXlib.h 31 -#undef AddPixel +#undef XGetPixel +#undef XPutPixel +#undef XSubImage +#undef XAddPixel hunk ./package.conf.in 29 +#ifndef INSTALLING + , LIB_DIR"/cbits" +#endif hunk ./Makefile 20 + Graphics \ hunk ./Graphics/X11/Xlib/Misc.hsc 76 + -- * Threads + initThreads, + lockDisplay, + unlockDisplay, + hunk ./Graphics/X11/Xlib/Misc.hsc 687 --- XInitThreads omitted (leary of thread stuff) --- XLockDisplay omitted (leary of thread stuff) --- XUnlockDisplay omitted (leary of thread stuff) +foreign import ccall unsafe "HsXlib.h XInitThreads" + initThreads :: IO Status + +foreign import ccall unsafe "HsXlib.h XLockDisplay" + lockDisplay :: Display -> IO () + +foreign import ccall unsafe "HsXlib.h XLockDisplay" + unlockDisplay :: Display -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 470 -foreign import ccall unsafe "HsXlib.h XNextEvent" +foreign import ccall safe "HsXlib.h XNextEvent" hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.1], [libraries@haskell.org], [X11]) +AC_INIT([Haskell X11 package], [1.2], [libraries@haskell.org], [X11]) hunk ./Graphics/X11.hs 16 - ( module Graphics.X11.Types - , module Graphics.X11.Xlib + ( module Graphics.X11.Xlib hunk ./Graphics/X11.hs 19 -import Graphics.X11.Types hunk ./README 1 - HSX11 1.00 - A Haskell binding for X11 - -In preparation for a major release of HSX11, we are making an alpha -release for folk to play with. We welcome bug reports, comments on -how the system is packaged, the web page, examples, comments from -those who build binary and source packages, etc. and especially -welcome comments accompanied by patches or cvs commit messages. - -We are pleased to announce a new release of the Haskell binding for -X11 which provides a binding to most of Xlib. The library is -distributed as open source. - -The library can be downloaded from: - - http://www.reid-consulting-uk.ltd.uk/projects/HSX11.html - -You will need GreenCard 3.00, GHC 6.0 and, of course, X11 to build the -library. Installation instructions are in HSX11-1.0/INSTALL. Bug -reports should be sent to X11@reid-consulting-uk.ltd.uk - -Enjoy! --- -Alastair Reid http://www.reid-consulting-uk.ltd.uk - -ps This release is based on the GHC team's fptools infrastructure - which is evolving in the direction of supporting packages like this - one. We welcome comments on this infrastructure and, especially, - offers to help make it better. - +To build this package using Cabal directly from darcs, you must run +"autoreconf" before the usual Cabal build steps (configure/build/install). +autoreconf is included in the GNU autoconf tools. There is no need to run +the "configure" script: the "setup configure" step will do this for you. hunk ./Graphics/X11/Types.hsc 794 +import Foreign.C.Types hunk ./Graphics/X11/Types.hsc 1312 -type NotifyMode = Int +type NotifyMode = CInt hunk ./Graphics/X11/Types.hsc 1322 -type NotifyDetail = Int +type NotifyDetail = CInt hunk ./Graphics/X11/Types.hsc 1334 -type Visibility = Int +type Visibility = CInt hunk ./Graphics/X11/Types.hsc 1343 -type Place = Int +type Place = CInt hunk ./Graphics/X11/Types.hsc 1349 -type Protocol = Int +type Protocol = CInt hunk ./Graphics/X11/Types.hsc 1356 -type PropertyNotification = Int +type PropertyNotification = CInt hunk ./Graphics/X11/Types.hsc 1362 -type ColormapNotification = Int +type ColormapNotification = CInt hunk ./Graphics/X11/Types.hsc 1369 -type GrabMode = Int +type GrabMode = CInt hunk ./Graphics/X11/Types.hsc 1377 -type GrabStatus = Int +type GrabStatus = CInt hunk ./Graphics/X11/Types.hsc 1387 -type AllowEvents = Int +type AllowEvents = CInt hunk ./Graphics/X11/Types.hsc 1400 -type FocusMode = Int +type FocusMode = CInt hunk ./Graphics/X11/Types.hsc 1408 -type ErrorCode = Int +type ErrorCode = CInt hunk ./Graphics/X11/Types.hsc 1432 -type Status = Int +type Status = CInt hunk ./Graphics/X11/Types.hsc 1439 -type WindowClass = Int +type WindowClass = CInt hunk ./Graphics/X11/Types.hsc 1467 -type CloseDownMode = Int +type CloseDownMode = CInt hunk ./Graphics/X11/Types.hsc 1478 -type QueryBestSizeClass = Int +type QueryBestSizeClass = CInt hunk ./Graphics/X11/Types.hsc 1491 -type GXFunction = Int +type GXFunction = CInt hunk ./Graphics/X11/Types.hsc 1511 -type LineStyle = Int +type LineStyle = CInt hunk ./Graphics/X11/Types.hsc 1518 -type CapStyle = Int +type CapStyle = CInt hunk ./Graphics/X11/Types.hsc 1526 -type JoinStyle = Int +type JoinStyle = CInt hunk ./Graphics/X11/Types.hsc 1533 -type FillStyle = Int +type FillStyle = CInt hunk ./Graphics/X11/Types.hsc 1541 -type FillRule = Int +type FillRule = CInt hunk ./Graphics/X11/Types.hsc 1547 -type SubWindowMode = Int +type SubWindowMode = CInt hunk ./Graphics/X11/Types.hsc 1554 --- type Ordering = Int +-- type Ordering = CInt hunk ./Graphics/X11/Types.hsc 1563 -type CoordinateMode = Int +type CoordinateMode = CInt hunk ./Graphics/X11/Types.hsc 1569 -type PolygonShape = Int +type PolygonShape = CInt hunk ./Graphics/X11/Types.hsc 1577 -type ArcMode = Int +type ArcMode = CInt hunk ./Graphics/X11/Types.hsc 1586 -type GCMask = Int +type GCMask = CInt hunk ./Graphics/X11/Types.hsc 1614 -type CirculationDirection = Int +type CirculationDirection = CInt hunk ./Graphics/X11/Types.hsc 1621 -type ByteOrder = Int +type ByteOrder = CInt hunk ./Graphics/X11/Types.hsc 1627 -type ColormapAlloc = Int +type ColormapAlloc = CInt hunk ./Graphics/X11/Types.hsc 1633 -type MappingRequest = Int +type MappingRequest = CInt hunk ./Graphics/X11/Types.hsc 1640 -type ChangeSaveSetMode = Int +type ChangeSaveSetMode = CInt hunk ./Graphics/X11/Types.hsc 1646 -type BitGravity = Int +type BitGravity = CInt hunk ./Graphics/X11/Types.hsc 1662 -type WindowGravity = Int +type WindowGravity = CInt hunk ./Graphics/X11/Types.hsc 1668 -type BackingStore = Int +type BackingStore = CInt hunk ./Graphics/X11/Types.hsc 1681 -type FontDirection = Int +type FontDirection = CInt hunk ./Graphics/X11/Types.hsc 1687 -type ImageFormat = Int +type ImageFormat = CInt hunk ./Graphics/X11/Xlib/Event.hsc 67 +import Foreign.C.Types hunk ./Graphics/X11/Xlib/Event.hsc 81 -type QueuedMode = Int +type QueuedMode = CInt hunk ./Graphics/X11/Xlib/Event.hsc 126 - , Int -- pointer x, y coordinates in event window - , Int -- - , Int -- coordinates relative to root - , Int -- + , CInt -- pointer x, y coordinates in event window + , CInt -- + , CInt -- coordinates relative to root + , CInt -- hunk ./Graphics/X11/Xlib/Event.hsc 162 - , Int -- pointer x, y coordinates in event window - , Int - , Int -- coordinates relative to root - , Int + , CInt -- pointer x, y coordinates in event window + , CInt + , CInt -- coordinates relative to root + , CInt hunk ./Graphics/X11/Xlib/Event.hsc 193 - , Int -- pointer x, y coordinates in event window - , Int - , Int -- coordinates relative to root - , Int + , CInt -- pointer x, y coordinates in event window + , CInt + , CInt -- coordinates relative to root + , CInt hunk ./Graphics/X11/Xlib/Event.hsc 250 - , Int -- count + , CInt -- count hunk ./Graphics/X11/Xlib/Event.hsc 311 - , Int -- count + , CInt -- count hunk ./Graphics/X11/Xlib/Event.hsc 406 - fdSet fd readfds - n <- select (fd+1) readfds nofds nofds tv_ptr + fdSet (fromIntegral fd) readfds + n <- select ((fromIntegral fd)+1) readfds nofds nofds tv_ptr hunk ./Graphics/X11/Xlib/Event.hsc 418 -foreign import ccall unsafe "HsXlib.h" fdSet :: Int -> Ptr FdSet -> IO () +foreign import ccall unsafe "HsXlib.h" fdSet :: CInt -> Ptr FdSet -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 421 - Int -> Ptr FdSet -> Ptr FdSet -> Ptr FdSet -> Ptr TimeVal -> IO Int + CInt -> Ptr FdSet -> Ptr FdSet -> Ptr FdSet -> Ptr TimeVal -> IO CInt hunk ./Graphics/X11/Xlib/Event.hsc 464 - pending :: Display -> IO Int + pending :: Display -> IO CInt hunk ./Graphics/X11/Xlib/Event.hsc 468 - eventsQueued :: Display -> QueuedMode -> IO Int + eventsQueued :: Display -> QueuedMode -> IO CInt hunk ./Graphics/X11/Xlib/Font.hsc 85 - xGetGCValues :: Display -> GC -> ValueMask -> Ptr GCValues -> IO Int + xGetGCValues :: Display -> GC -> ValueMask -> Ptr GCValues -> IO CInt hunk ./Graphics/X11/Xlib/Font.hsc 136 - ( Int -- lbearing (origin to left edge of raster) - , Int -- rbearing (origin to right edge of raster) - , Int -- width (advance to next char's origin) - , Int -- ascent (baseline to top edge of raster) - , Int -- descent (baseline to bottom edge of raster) + ( CInt -- lbearing (origin to left edge of raster) + , CInt -- rbearing (origin to right edge of raster) + , CInt -- width (advance to next char's origin) + , CInt -- ascent (baseline to top edge of raster) + , CInt -- descent (baseline to bottom edge of raster) hunk ./Graphics/X11/Xlib/Font.hsc 167 - xTextExtents font_struct c_string nchars direction_return + xTextExtents font_struct c_string (fromIntegral nchars) direction_return hunk ./Graphics/X11/Xlib/Font.hsc 175 - xTextExtents :: FontStruct -> CString -> Int -> + xTextExtents :: FontStruct -> CString -> CInt -> hunk ./Graphics/X11/Xlib/Font.hsc 177 - Ptr CharStruct -> IO Int + Ptr CharStruct -> IO CInt hunk ./Graphics/X11/Xlib/Font.hsc 185 - xTextWidth font_struct c_string len + xTextWidth font_struct c_string (fromIntegral len) hunk ./Graphics/X11/Xlib/Font.hsc 187 - xTextWidth :: FontStruct -> CString -> Int -> IO Int32 + xTextWidth :: FontStruct -> CString -> CInt -> IO Int32 hunk ./Graphics/X11/Xlib/Misc.hsc 198 - bell :: Display -> Int -> IO () + bell :: Display -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 206 - lastKnownRequestProcessed :: Display -> IO Int + lastKnownRequestProcessed :: Display -> IO CInt hunk ./Graphics/X11/Xlib/Misc.hsc 325 - IO (Bool, Window, Window, Int, Int, Int, Int, Modifier) + IO (Bool, Window, Window, CInt, CInt, CInt, CInt, Modifier) hunk ./Graphics/X11/Xlib/Misc.hsc 346 - Ptr Window -> Ptr Window -> Ptr Int -> Ptr Int -> - Ptr Int -> Ptr Int -> Ptr Modifier -> IO Bool + Ptr Window -> Ptr Window -> Ptr CInt -> Ptr CInt -> + Ptr CInt -> Ptr CInt -> Ptr Modifier -> IO Bool hunk ./Graphics/X11/Xlib/Misc.hsc 379 --- type ErrorHandler = Display -> ErrorEvent -> IO Int +-- type ErrorHandler = Display -> ErrorEvent -> IO CInt hunk ./Graphics/X11/Xlib/Misc.hsc 382 --- type IOErrorHandler = Display -> IO Int +-- type IOErrorHandler = Display -> IO CInt hunk ./Graphics/X11/Xlib/Misc.hsc 454 -type ErrorHandler = FunPtr (Display -> Ptr XErrorEvent -> IO Int) +type ErrorHandler = FunPtr (Display -> Ptr XErrorEvent -> IO CInt) hunk ./Graphics/X11/Xlib/Misc.hsc 457 - defaultErrorHandler :: FunPtr (Display -> Ptr XErrorEvent -> IO Int) + defaultErrorHandler :: FunPtr (Display -> Ptr XErrorEvent -> IO CInt) hunk ./Graphics/X11/Xlib/Misc.hsc 550 -geometry :: Display -> Int -> String -> String -> - Dimension -> Dimension -> Dimension -> Int -> Int -> - IO (Int, Position, Position, Dimension, Dimension) +geometry :: Display -> CInt -> String -> String -> + Dimension -> Dimension -> Dimension -> CInt -> CInt -> + IO (CInt, Position, Position, Dimension, Dimension) hunk ./Graphics/X11/Xlib/Misc.hsc 570 - xGeometry :: Display -> Int -> CString -> CString -> - Dimension -> Dimension -> Dimension -> Int -> Int -> + xGeometry :: Display -> CInt -> CString -> CString -> + Dimension -> Dimension -> Dimension -> CInt -> CInt -> hunk ./Graphics/X11/Xlib/Misc.hsc 573 - Ptr Dimension -> Ptr Dimension -> IO Int + Ptr Dimension -> Ptr Dimension -> IO CInt hunk ./Graphics/X11/Xlib/Misc.hsc 577 - IO (Window, Position, Position, Dimension, Dimension, Dimension, Int) + IO (Window, Position, Position, Dimension, Dimension, Dimension, CInt) hunk ./Graphics/X11/Xlib/Misc.hsc 584 - Ptr Dimension -> Ptr Dimension -> Ptr Int -> IO Status + Ptr Dimension -> Ptr Dimension -> Ptr CInt -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 609 -type AllowExposuresMode = Int +type AllowExposuresMode = CInt hunk ./Graphics/X11/Xlib/Misc.hsc 616 -type PreferBlankingMode = Int +type PreferBlankingMode = CInt hunk ./Graphics/X11/Xlib/Misc.hsc 623 -type ScreenSaverMode = Int +type ScreenSaverMode = CInt hunk ./Graphics/X11/Xlib/Misc.hsc 630 - IO (Int, Int, PreferBlankingMode, AllowExposuresMode) + IO (CInt, CInt, PreferBlankingMode, AllowExposuresMode) hunk ./Graphics/X11/Xlib/Misc.hsc 633 - xGetScreenSaver :: Display -> Ptr Int -> Ptr Int -> + xGetScreenSaver :: Display -> Ptr CInt -> Ptr CInt -> hunk ./Graphics/X11/Xlib/Misc.hsc 638 - setScreenSaver :: Display -> Int -> Int -> + setScreenSaver :: Display -> CInt -> CInt -> hunk ./Graphics/X11/Xlib/Misc.hsc 658 -getPointerControl :: Display -> IO (Int, Int, Int) +getPointerControl :: Display -> IO (CInt, CInt, CInt) hunk ./Graphics/X11/Xlib/Misc.hsc 661 - xGetPointerControl :: Display -> Ptr Int -> Ptr Int -> Ptr Int -> IO () + xGetPointerControl :: Display -> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 702 - createPixmap :: Display -> Drawable -> Dimension -> Dimension -> Int -> IO Pixmap + createPixmap :: Display -> Drawable -> Dimension -> Dimension -> CInt -> IO Pixmap hunk ./Graphics/X11/Xlib/Misc.hsc 725 - bitmapUnit :: Display -> Int + bitmapUnit :: Display -> CInt hunk ./Graphics/X11/Xlib/Misc.hsc 729 - bitmapPad :: Display -> Int + bitmapPad :: Display -> CInt hunk ./Graphics/X11/Xlib/Misc.hsc 767 -displayKeycodes :: Display -> (Int,Int) +displayKeycodes :: Display -> (CInt,CInt) hunk ./Graphics/X11/Xlib/Misc.hsc 771 - xDisplayKeycodes :: Display -> Ptr Int -> Ptr Int -> IO () + xDisplayKeycodes :: Display -> Ptr CInt -> Ptr CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 775 - lookupKeysym :: XKeyEventPtr -> Int -> IO KeySym + lookupKeysym :: XKeyEventPtr -> CInt -> IO KeySym hunk ./Graphics/X11/Xlib/Misc.hsc 779 - keycodeToKeysym :: Display -> KeyCode -> Int -> IO KeySym + keycodeToKeysym :: Display -> KeyCode -> CInt -> IO KeySym hunk ./Graphics/X11/Xlib/Misc.hsc 819 - str <- peekCStringLen (buf, n) + str <- peekCStringLen (buf, fromIntegral n) hunk ./Graphics/X11/Xlib/Misc.hsc 823 - xLookupString :: XKeyEventPtr -> CString -> Int -> - Ptr KeySym -> Ptr XComposeStatus -> IO Int + xLookupString :: XKeyEventPtr -> CString -> CInt -> + Ptr KeySym -> Ptr XComposeStatus -> IO CInt hunk ./Graphics/X11/Xlib/Misc.hsc 929 - xSetWMProtocols display w protocol_array (length protocols) + xSetWMProtocols display w protocol_array (fromIntegral $ length protocols) hunk ./Graphics/X11/Xlib/Misc.hsc 931 - xSetWMProtocols :: Display -> Window -> Ptr Atom -> Int -> IO () + xSetWMProtocols :: Display -> Window -> Ptr Atom -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1001 - xDrawPoints display d gc point_array npoints mode + xDrawPoints display d gc point_array (fromIntegral npoints) mode hunk ./Graphics/X11/Xlib/Misc.hsc 1003 - xDrawPoints :: Display -> Drawable -> GC -> Ptr Point -> Int -> + xDrawPoints :: Display -> Drawable -> GC -> Ptr Point -> CInt -> hunk ./Graphics/X11/Xlib/Misc.hsc 1015 - xDrawLines display d gc point_array npoints mode + xDrawLines display d gc point_array (fromIntegral npoints) mode hunk ./Graphics/X11/Xlib/Misc.hsc 1017 - xDrawLines :: Display -> Drawable -> GC -> Ptr Point -> Int -> + xDrawLines :: Display -> Drawable -> GC -> Ptr Point -> CInt -> hunk ./Graphics/X11/Xlib/Misc.hsc 1024 - xDrawSegments display d gc segment_array nsegments + xDrawSegments display d gc segment_array (fromIntegral nsegments) hunk ./Graphics/X11/Xlib/Misc.hsc 1026 - xDrawSegments :: Display -> Drawable -> GC -> Ptr Segment -> Int -> IO () + xDrawSegments :: Display -> Drawable -> GC -> Ptr Segment -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1036 - xDrawRectangles display d gc rectangle_array nrectangles + xDrawRectangles display d gc rectangle_array (fromIntegral nrectangles) hunk ./Graphics/X11/Xlib/Misc.hsc 1038 - xDrawRectangles :: Display -> Drawable -> GC -> Ptr Rectangle -> Int -> IO () + xDrawRectangles :: Display -> Drawable -> GC -> Ptr Rectangle -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1049 - xDrawArcs display d gc arc_array narcs + xDrawArcs display d gc arc_array (fromIntegral narcs) hunk ./Graphics/X11/Xlib/Misc.hsc 1051 - xDrawArcs :: Display -> Drawable -> GC -> Ptr Arc -> Int -> IO () + xDrawArcs :: Display -> Drawable -> GC -> Ptr Arc -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1062 - xFillRectangles display d gc rectangle_array nrectangles + xFillRectangles display d gc rectangle_array (fromIntegral nrectangles) hunk ./Graphics/X11/Xlib/Misc.hsc 1064 - xFillRectangles :: Display -> Drawable -> GC -> Ptr Rectangle -> Int -> IO () + xFillRectangles :: Display -> Drawable -> GC -> Ptr Rectangle -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1070 - xFillPolygon display d gc point_array npoints shape mode + xFillPolygon display d gc point_array (fromIntegral npoints) shape mode hunk ./Graphics/X11/Xlib/Misc.hsc 1072 - xFillPolygon :: Display -> Drawable -> GC -> Ptr Point -> Int -> PolygonShape -> CoordinateMode -> IO () + xFillPolygon :: Display -> Drawable -> GC -> Ptr Point -> CInt -> PolygonShape -> CoordinateMode -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1083 - xFillArcs display d gc arc_array narcs + xFillArcs display d gc arc_array (fromIntegral narcs) hunk ./Graphics/X11/Xlib/Misc.hsc 1085 - xFillArcs :: Display -> Drawable -> GC -> Ptr Arc -> Int -> IO () + xFillArcs :: Display -> Drawable -> GC -> Ptr Arc -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1101 - xDrawString display d gc x y c_str len + xDrawString display d gc x y c_str (fromIntegral len) hunk ./Graphics/X11/Xlib/Misc.hsc 1103 - xDrawString :: Display -> Drawable -> GC -> Position -> Position -> CString -> Int -> IO () + xDrawString :: Display -> Drawable -> GC -> Position -> Position -> CString -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1111 - xDrawImageString display d gc x y c_str len + xDrawImageString display d gc x y c_str (fromIntegral len) hunk ./Graphics/X11/Xlib/Misc.hsc 1113 - xDrawImageString :: Display -> Drawable -> GC -> Position -> Position -> CString -> Int -> IO () + xDrawImageString :: Display -> Drawable -> GC -> Position -> Position -> CString -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1125 -storeBuffer :: Display -> String -> Int -> IO () +storeBuffer :: Display -> String -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1129 - xStoreBuffer display c_bytes nbytes buffer + xStoreBuffer display c_bytes (fromIntegral nbytes) buffer hunk ./Graphics/X11/Xlib/Misc.hsc 1131 - xStoreBuffer :: Display -> CString -> Int -> Int -> IO Status + xStoreBuffer :: Display -> CString -> CInt -> CInt -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 1138 - xStoreBytes display c_bytes nbytes + xStoreBytes display c_bytes (fromIntegral nbytes) hunk ./Graphics/X11/Xlib/Misc.hsc 1140 - xStoreBytes :: Display -> CString -> Int -> IO Status + xStoreBytes :: Display -> CString -> CInt -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 1143 -fetchBuffer :: Display -> Int -> IO String +fetchBuffer :: Display -> CInt -> IO String hunk ./Graphics/X11/Xlib/Misc.hsc 1149 - bytes <- peekCStringLen (c_bytes, nbytes) + bytes <- peekCStringLen (c_bytes, (fromIntegral nbytes)) hunk ./Graphics/X11/Xlib/Misc.hsc 1153 - xFetchBuffer :: Display -> Ptr Int -> Int -> IO CString + xFetchBuffer :: Display -> Ptr CInt -> CInt -> IO CString hunk ./Graphics/X11/Xlib/Misc.hsc 1162 - bytes <- peekCStringLen (c_bytes, nbytes) + bytes <- peekCStringLen (c_bytes, (fromIntegral nbytes)) hunk ./Graphics/X11/Xlib/Misc.hsc 1166 - xFetchBytes :: Display -> Ptr Int -> IO CString + xFetchBytes :: Display -> Ptr CInt -> IO CString hunk ./Graphics/X11/Xlib/Misc.hsc 1169 -rotateBuffers :: Display -> Int -> IO () +rotateBuffers :: Display -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1174 - xRotateBuffers :: Display -> Int -> IO Status + xRotateBuffers :: Display -> CInt -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 1194 - #{poke XTextProperty,format} text_prop (8::Int) + #{poke XTextProperty,format} text_prop (8::CInt) hunk ./Graphics/X11/Xlib/Types.hsc 100 -type Angle = Int +type Angle = CInt hunk ./Graphics/X11/Xlib/Types.hsc 102 -type Buffer = Int +type Buffer = CInt hunk ./Graphics/X11/Xlib/Types.hsc 112 -peekPositionField :: Ptr a -> Int -> IO Position +peekPositionField :: Ptr a -> CInt -> IO Position hunk ./Graphics/X11/Xlib/Types.hsc 114 - v <- peekByteOff ptr off + v <- peekByteOff ptr (fromIntegral off) hunk ./Graphics/X11/Xlib/Types.hsc 117 -peekDimensionField :: Ptr a -> Int -> IO Dimension +peekDimensionField :: Ptr a -> CInt -> IO Dimension hunk ./Graphics/X11/Xlib/Types.hsc 119 - v <- peekByteOff ptr off + v <- peekByteOff ptr (fromIntegral off) hunk ./Graphics/X11/Xlib/Types.hsc 122 -peekAngleField :: Ptr a -> Int -> IO Angle +peekAngleField :: Ptr a -> CInt -> IO Angle hunk ./Graphics/X11/Xlib/Types.hsc 124 - v <- peekByteOff ptr off + v <- peekByteOff ptr (fromIntegral off) hunk ./Graphics/X11/Xlib/Types.hsc 127 -pokePositionField :: Ptr a -> Int -> Position -> IO () +pokePositionField :: Ptr a -> CInt -> Position -> IO () hunk ./Graphics/X11/Xlib/Types.hsc 129 - pokeByteOff ptr off (fromIntegral v::ShortPosition) + pokeByteOff ptr (fromIntegral off) (fromIntegral v::ShortPosition) hunk ./Graphics/X11/Xlib/Types.hsc 131 -pokeDimensionField :: Ptr a -> Int -> Dimension -> IO () +pokeDimensionField :: Ptr a -> CInt -> Dimension -> IO () hunk ./Graphics/X11/Xlib/Types.hsc 133 - pokeByteOff ptr off (fromIntegral v::ShortDimension) + pokeByteOff ptr (fromIntegral off) (fromIntegral v::ShortDimension) hunk ./Graphics/X11/Xlib/Types.hsc 135 -pokeAngleField :: Ptr a -> Int -> Angle -> IO () +pokeAngleField :: Ptr a -> CInt -> Angle -> IO () hunk ./Graphics/X11/Xlib/Types.hsc 137 - pokeByteOff ptr off (fromIntegral v::ShortAngle) + pokeByteOff ptr (fromIntegral off) (fromIntegral v::ShortAngle) hunk ./Graphics/X11/Xlib/Types.hsc 208 - deriving (Eq, Show, Typeable, Data) + deriving (Eq, Show, Typeable) hunk ./X11.buildinfo.in 5 -cc-options: @X_CFLAGS@ +cc-options: @X_CFLAGS@ @XSERVER64@ hunk ./configure.ac 47 + + AC_CHECK_SIZEOF([unsigned long]) + if test "$ac_cv_sizeof_unsigned_long" = 8; then + AC_SUBST(XSERVER64,["-D_XSERVER64"]) + fi hunk ./Graphics/X11/Xlib/Color.hs 38 +import Foreign.C.Types hunk ./Graphics/X11/Xlib/Color.hs 107 - xFreeColors display colormap pixel_array (length pixels) planes + xFreeColors display colormap pixel_array (fromIntegral (length pixels)) planes hunk ./Graphics/X11/Xlib/Color.hs 109 - xFreeColors :: Display -> Colormap -> Ptr Pixel -> Int -> Pixel -> IO () + xFreeColors :: Display -> Colormap -> Ptr Pixel -> CInt -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Color.hs 136 - xQueryColors display colormap color_array ncolors + xQueryColors display colormap color_array (fromIntegral ncolors) hunk ./Graphics/X11/Xlib/Color.hs 139 - xQueryColors :: Display -> Colormap -> Ptr Color -> Int -> IO () + xQueryColors :: Display -> Colormap -> Ptr Color -> CInt -> IO () hunk ./Graphics/X11/Xlib/Context.hs 49 +import Foreign.C.Types hunk ./Graphics/X11/Xlib/Context.hs 89 -setDashes :: Display -> GC -> Int -> String -> Int -> IO () +setDashes :: Display -> GC -> CInt -> String -> CInt -> IO () hunk ./Graphics/X11/Xlib/Context.hs 94 - xSetDashes :: Display -> GC -> Int -> CString -> Int -> IO () + xSetDashes :: Display -> GC -> CInt -> CString -> CInt -> IO () hunk ./Graphics/X11/Xlib/Context.hs 110 - setLineAttributes :: Display -> GC -> Int -> LineStyle -> + setLineAttributes :: Display -> GC -> CInt -> LineStyle -> hunk ./Graphics/X11/Xlib/Display.hs 85 - connectionNumber :: Display -> Int + connectionNumber :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 99 - defaultDepth :: Display -> ScreenNumber -> Int + defaultDepth :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 111 - displayHeight :: Display -> ScreenNumber -> Int + displayHeight :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 115 - displayHeightMM :: Display -> ScreenNumber -> Int + displayHeightMM :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 119 - displayWidth :: Display -> ScreenNumber -> Int + displayWidth :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 123 - displayWidthMM :: Display -> ScreenNumber -> Int + displayWidthMM :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 127 - maxRequestSize :: Display -> Int + maxRequestSize :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 131 - displayMotionBufferSize :: Display -> Int + displayMotionBufferSize :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 154 - imageByteOrder :: Display -> Int + imageByteOrder :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 158 - protocolRevision :: Display -> Int + protocolRevision :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 162 - protocolVersion :: Display -> Int + protocolVersion :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 174 - screenCount :: Display -> Int + screenCount :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 182 - displayCells :: Display -> ScreenNumber -> Int + displayCells :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 186 - displayPlanes :: Display -> ScreenNumber -> Int + displayPlanes :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 204 - qLength :: Display -> IO Int + qLength :: Display -> IO CInt hunk ./Graphics/X11/Xlib/Image.hs 27 +import Foreign.C.Types hunk ./Graphics/X11/Xlib/Image.hs 34 -createImage :: Display -> Visual -> Int -> ImageFormat -> Int -> Ptr CChar -> Dimension -> Dimension -> Int -> Int -> IO Image +createImage :: Display -> Visual -> CInt -> ImageFormat -> CInt -> Ptr CChar -> Dimension -> Dimension -> CInt -> CInt -> IO Image hunk ./Graphics/X11/Xlib/Image.hs 39 - xCreateImage :: Display -> Visual -> Int -> ImageFormat -> Int -> - Ptr CChar -> Dimension -> Dimension -> Int -> Int -> IO (Ptr Image) + xCreateImage :: Display -> Visual -> CInt -> ImageFormat -> CInt -> + Ptr CChar -> Dimension -> Dimension -> CInt -> CInt -> IO (Ptr Image) hunk ./Graphics/X11/Xlib/Region.hs 47 +import Foreign.C.Types hunk ./Graphics/X11/Xlib/Region.hs 71 -type RectInRegionResult = Int +type RectInRegionResult = CInt hunk ./Graphics/X11/Xlib/Region.hs 110 - rp <- xPolygonRegion point_arr n fill_rule + rp <- xPolygonRegion point_arr (fromIntegral n) fill_rule hunk ./Graphics/X11/Xlib/Region.hs 113 - xPolygonRegion :: Ptr Point -> Int -> FillRule -> IO (Ptr Region) + xPolygonRegion :: Ptr Point -> CInt -> FillRule -> IO (Ptr Region) hunk ./Graphics/X11/Xlib/Region.hs 126 -intersectRegion :: Region -> Region -> Region -> IO Int +intersectRegion :: Region -> Region -> Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 134 - Ptr Region -> Ptr Region -> Ptr Region -> IO Int + Ptr Region -> Ptr Region -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 137 -subtractRegion :: Region -> Region -> Region -> IO Int +subtractRegion :: Region -> Region -> Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 145 - Ptr Region -> Ptr Region -> Ptr Region -> IO Int + Ptr Region -> Ptr Region -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 148 -unionRectWithRegion :: Rectangle -> Region -> Region -> IO Int +unionRectWithRegion :: Rectangle -> Region -> Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 156 - Ptr Rectangle -> Ptr Region -> Ptr Region -> IO Int + Ptr Rectangle -> Ptr Region -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 159 -unionRegion :: Region -> Region -> Region -> IO Int +unionRegion :: Region -> Region -> Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 167 - Ptr Region -> Ptr Region -> Ptr Region -> IO Int + Ptr Region -> Ptr Region -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 170 -xorRegion :: Region -> Region -> Region -> IO Int +xorRegion :: Region -> Region -> Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 178 - Ptr Region -> Ptr Region -> Ptr Region -> IO Int + Ptr Region -> Ptr Region -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 219 -clipBox :: Region -> IO (Rectangle,Int) +clipBox :: Region -> IO (Rectangle,CInt) hunk ./Graphics/X11/Xlib/Region.hs 227 - xClipBox :: Ptr Region -> Ptr Rectangle -> IO Int + xClipBox :: Ptr Region -> Ptr Rectangle -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 238 -offsetRegion :: Region -> Point -> IO Int +offsetRegion :: Region -> Point -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 243 - xOffsetRegion :: Ptr Region -> Position -> Position -> IO Int + xOffsetRegion :: Ptr Region -> Position -> Position -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 250 -shrinkRegion :: Region -> Point -> IO Int +shrinkRegion :: Region -> Point -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 255 - xShrinkRegion :: Ptr Region -> Position -> Position -> IO Int + xShrinkRegion :: Ptr Region -> Position -> Position -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 264 -setRegion :: Display -> GC -> Region -> IO Int +setRegion :: Display -> GC -> Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 269 - xSetRegion :: Display -> GC -> Ptr Region -> IO Int + xSetRegion :: Display -> GC -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Screen.hs 42 +import Foreign.C.Types hunk ./Graphics/X11/Xlib/Screen.hs 60 - cellsOfScreen :: Screen -> Int + cellsOfScreen :: Screen -> CInt hunk ./Graphics/X11/Xlib/Screen.hs 68 - defaultDepthOfScreen :: Screen -> Int + defaultDepthOfScreen :: Screen -> CInt hunk ./Graphics/X11/Xlib/Screen.hs 97 - minCmapsOfScreen :: Screen -> Int + minCmapsOfScreen :: Screen -> CInt hunk ./Graphics/X11/Xlib/Screen.hs 101 - maxCmapsOfScreen :: Screen -> Int + maxCmapsOfScreen :: Screen -> CInt hunk ./Graphics/X11/Xlib/Screen.hs 125 - planesOfScreen :: Screen -> Int + planesOfScreen :: Screen -> CInt hunk ./Graphics/X11/Xlib/Window.hs 56 +import Foreign.C.Types hunk ./Graphics/X11/Xlib/Window.hs 73 - Dimension -> Dimension -> Int -> Pixel -> Pixel -> IO Window + Dimension -> Dimension -> CInt -> Pixel -> Pixel -> IO Window hunk ./Graphics/X11/Xlib/Window.hs 78 - Dimension -> Dimension -> Int -> Int -> WindowClass -> + Dimension -> Dimension -> CInt -> CInt -> WindowClass -> hunk ./Graphics/X11/Xlib/Window.hs 238 - xRestackWindows display window_array (length windows) + xRestackWindows display window_array (fromIntegral (length windows)) hunk ./Graphics/X11/Xlib/Window.hs 240 - xRestackWindows :: Display -> Ptr Window -> Int -> IO () + xRestackWindows :: Display -> Ptr Window -> CInt -> IO () hunk ./Graphics/X11/Types.hsc 1269 -type Modifier = Mask +type Modifier = CUInt hunk ./X11.buildinfo.in 5 -cc-options: @X_CFLAGS@ @XSERVER64@ +cc-options: @X_CFLAGS@ hunk ./configure.ac 47 - - AC_CHECK_SIZEOF([unsigned long]) - if test "$ac_cv_sizeof_unsigned_long" = 8; then - AC_SUBST(XSERVER64,["-D_XSERVER64"]) - fi hunk ./Setup.hs 1 + hunk ./Setup.hs 4 -import Distribution.Simple (defaultMainWithHooks, defaultUserHooks) +import Data.List +import Distribution.Simple +import Distribution.PackageDescription +import Distribution.PreProcess +import Distribution.Setup +import Distribution.Simple.LocalBuildInfo +import System.Environment hunk ./Setup.hs 13 -main = defaultMainWithHooks defaultUserHooks +main = do args <- getArgs + let (ghcArgs, args') = extractGhcArgs args + (_, args'') = extractConfigureArgs args' + hooks = defaultUserHooks { + buildHook = add_ghc_options ghcArgs + $ buildHook defaultUserHooks } + withArgs args'' $ defaultMainWithHooks hooks + +extractGhcArgs :: [String] -> ([String], [String]) +extractGhcArgs = extractPrefixArgs "--ghc-option=" + +extractConfigureArgs :: [String] -> ([String], [String]) +extractConfigureArgs = extractPrefixArgs "--configure-option=" + +extractPrefixArgs :: String -> [String] -> ([String], [String]) +extractPrefixArgs prefix args + = let f [] = ([], []) + f (x:xs) = case f xs of + (wantedArgs, otherArgs) -> + case removePrefix prefix x of + Just wantedArg -> + (wantedArg:wantedArgs, otherArgs) + Nothing -> + (wantedArgs, x:otherArgs) + in f args + +removePrefix :: String -> String -> Maybe String +removePrefix "" ys = Just ys +removePrefix (x:xs) (y:ys) + | x == y = removePrefix xs ys + | otherwise = Nothing + +type Hook a = PackageDescription -> LocalBuildInfo -> Maybe UserHooks -> a + -> IO () + +add_ghc_options :: [String] -> Hook a -> Hook a +add_ghc_options args f pd lbi muhs x + = do let lib' = case library pd of + Just lib -> + let bi = libBuildInfo lib + opts = options bi ++ [(GHC, args)] + bi' = bi { options = opts } + in lib { libBuildInfo = bi' } + Nothing -> error "Expected a library" + pd' = pd { library = Just lib' } + f pd' lbi muhs x + hunk ./Setup.hs 7 -import Distribution.PreProcess hunk ./Setup.hs 27 -extractPrefixArgs prefix args +extractPrefixArgs the_prefix args hunk ./Setup.hs 31 - case removePrefix prefix x of + case removePrefix the_prefix x of hunk ./Setup.hs 40 +removePrefix _ "" = Nothing hunk ./Setup.hs 45 -type Hook a = PackageDescription -> LocalBuildInfo -> Maybe UserHooks -> a - -> IO () +type Hook a = PackageDescription -> LocalBuildInfo -> UserHooks -> a -> IO () hunk ./Setup.hs 48 -add_ghc_options args f pd lbi muhs x +add_ghc_options args f pd lbi uhs x hunk ./Setup.hs 57 - f pd' lbi muhs x + f pd' lbi uhs x hunk ./X11.cabal 2 -version: 1.2 +version: 1.2.1 hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.2], [libraries@haskell.org], [X11]) +AC_INIT([Haskell X11 package], [1.2.1], [libraries@haskell.org], [X11]) hunk ./configure.ac 27 - X11_BUILD_PACKAGE=no - BUILD_PACKAGE_BOOL=False + AC_MSG_FAILURE([X11 libraries not found, so X11 package cannot be built]) hunk ./X11.cabal 43 +includes: HsXlib.h hunk ./Setup.hs 47 -add_ghc_options :: [String] -> Hook a -> Hook a +-- We can't give a type signature as Cabal < 1.1.7 has Maybe UserHooks +-- where we have UserHooks. +-- add_ghc_options :: [String] -> Hook a -> Hook a hunk ./Makefile 1 -# ----------------------------------------------------------------------------- - -TOP = .. -include $(TOP)/mk/boilerplate.mk --include config.mk - -ifneq "$(findstring clean, $(MAKECMDGOALS))" "" -# if we're cleaning, then config.mk might have been cleaned already -X11_BUILD_PACKAGE=yes -PACKAGE=X11 -endif - -# ----------------------------------------------------------------------------- - -ifeq "$(X11_BUILD_PACKAGE)" "yes" - -SUBDIRS = cbits doc include - -ALL_DIRS = \ - Graphics \ - Graphics/X11 \ - Graphics/X11/Xlib - -PACKAGE_DEPS = base - -SRC_CC_OPTS += -Iinclude $(X_CFLAGS) - -SRC_HC_OPTS += -cpp -fffi -SRC_HC_OPTS += -Iinclude $(X_CFLAGS) -SRC_HSC2HS_OPTS += -Iinclude $(X_CFLAGS) - -PACKAGE_CPP_OPTS += -DMAINTAINER=$(MAINTAINER) - -SRC_HADDOCK_OPTS += -t "X11 Libraries ($(PACKAGE) package)" - -endif - -EXCLUDED_SRCS += Setup.hs - -# ----------------------------------------------------------------------------- - -DIST_CLEAN_FILES += X11.buildinfo config.cache config.status config.mk - -extraclean:: - $(RM) -rf autom4te.cache - -include $(TOP)/mk/target.mk rmfile ./Makefile hunk ./package.conf.in 1 -#include "HsX11Config.h" - -name: PACKAGE -version: VERSION -license: BSD3 -maintainer: MAINTAINER -exposed: True - -exposed-modules: - Graphics.X11.Xlib.Atom, - Graphics.X11.Xlib.Color, - Graphics.X11.Xlib.Context, - Graphics.X11.Xlib.Display, - Graphics.X11.Xlib.Event, - Graphics.X11.Xlib.Font, - Graphics.X11.Xlib.Misc, - Graphics.X11.Xlib.Region, - Graphics.X11.Xlib.Screen, - Graphics.X11.Xlib.Types, - Graphics.X11.Xlib.Window, - Graphics.X11.Types, - Graphics.X11.Xlib, - Graphics.X11 - -hidden-modules: - -import-dirs: IMPORT_DIR -library-dirs: LIB_DIR -#ifndef INSTALLING - , LIB_DIR"/cbits" -#endif -hs-libraries: "HSX11" -extra-libraries: "HSX11_cbits", "X11" -include-dirs: INCLUDE_DIR -includes: "HsXlib.h" -depends: base -hugs-options: - -cc-options: X_CFLAGS -ld-options: X_LIBS -framework-dirs: -frameworks: - -haddock-interfaces: HADDOCK_IFACE -haddock-html: HTML_DIR rmfile ./package.conf.in hunk ./X11.cabal 2 -version: 1.2.1 +version: 1.2.2 hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.2.1], [libraries@haskell.org], [X11]) +AC_INIT([Haskell X11 package], [1.2.2], [libraries@haskell.org], [X11]) hunk ./Setup.hs 1 - hunk ./Setup.hs 3 -import Data.List hunk ./Setup.hs 4 -import Distribution.PackageDescription -import Distribution.Setup -import Distribution.Simple.LocalBuildInfo -import System.Environment hunk ./Setup.hs 6 -main = do args <- getArgs - let (ghcArgs, args') = extractGhcArgs args - (_, args'') = extractConfigureArgs args' - hooks = defaultUserHooks { - buildHook = add_ghc_options ghcArgs - $ buildHook defaultUserHooks } - withArgs args'' $ defaultMainWithHooks hooks - -extractGhcArgs :: [String] -> ([String], [String]) -extractGhcArgs = extractPrefixArgs "--ghc-option=" - -extractConfigureArgs :: [String] -> ([String], [String]) -extractConfigureArgs = extractPrefixArgs "--configure-option=" - -extractPrefixArgs :: String -> [String] -> ([String], [String]) -extractPrefixArgs the_prefix args - = let f [] = ([], []) - f (x:xs) = case f xs of - (wantedArgs, otherArgs) -> - case removePrefix the_prefix x of - Just wantedArg -> - (wantedArg:wantedArgs, otherArgs) - Nothing -> - (wantedArgs, x:otherArgs) - in f args - -removePrefix :: String -> String -> Maybe String -removePrefix "" ys = Just ys -removePrefix _ "" = Nothing -removePrefix (x:xs) (y:ys) - | x == y = removePrefix xs ys - | otherwise = Nothing - -type Hook a = PackageDescription -> LocalBuildInfo -> UserHooks -> a -> IO () - --- We can't give a type signature as Cabal < 1.1.7 has Maybe UserHooks --- where we have UserHooks. --- add_ghc_options :: [String] -> Hook a -> Hook a -add_ghc_options args f pd lbi uhs x - = do let lib' = case library pd of - Just lib -> - let bi = libBuildInfo lib - opts = options bi ++ [(GHC, args)] - bi' = bi { options = opts } - in lib { libBuildInfo = bi' } - Nothing -> error "Expected a library" - pd' = pd { library = Just lib' } - f pd' lbi uhs x - +main = defaultMainWithHooks defaultUserHooks hunk ./Graphics/X11/Xlib/Types.hsc 144 -data Point = Point { pt_x :: Position, pt_y :: Position } +data Point = Point { pt_x :: !Position, pt_y :: !Position } hunk ./Graphics/X11/Xlib/Types.hsc 168 - rect_x :: Position, - rect_y :: Position, - rect_width :: Dimension, - rect_height :: Dimension + rect_x :: !Position, + rect_y :: !Position, + rect_width :: !Dimension, + rect_height :: !Dimension hunk ./X11.cabal 46 +ghc-options: -O2 -Wall hunk ./cbits/fdset.c 2 + +#include hunk ./X11.cabal 1 -name: X11 -version: 1.2.2 -license: BSD3 -license-file: LICENSE -copyright: Alastair Reid, 1999-2003 -maintainer: -category: Graphics -synopsis: A binding to the X11 graphics library +name: X11 +version: 1.2.3 +license: BSD3 +license-file: LICENSE +copyright: Alastair Reid, 1999-2003 +maintainer: +category: Graphics +synopsis: A binding to the X11 graphics library hunk ./X11.cabal 40 -extensions: ForeignFunctionInterface, CPP -extra-libraries: "X11" -include-dirs: include -includes: HsXlib.h -install-includes: HsXlib.h -build-depends: base -ghc-options: -O2 -Wall +extensions: ForeignFunctionInterface, CPP +extra-libraries: "X11" +include-dirs: include +includes: HsXlib.h +install-includes: HsXlib.h +build-depends: base +build-type: Configure +ghc-options: -O2 -Wall hunk ./X11.cabal 6 -maintainer: +maintainer: Don Stewart + +import Foreign +import Foreign.C.Types +import Graphics.X11.Xlib +import Graphics.X11.Xlib.Extras (WindowAttributes(..), getWindowAttributes) +import Control.Monad + +-- | Representation of the XineramaScreenInfo struct +data XineramaScreenInfo = XineramaScreenInfo + { xsi_screen_number :: CInt, + xsi_x_org :: CShort, + xsi_y_org :: CShort, + xsi_width :: CShort, + xsi_height :: CShort } + deriving (Show) + +-- | Wrapper around xineramaQueryScreens that fakes a single screen when +-- Xinerama is not active. This is the preferred interface to +-- Graphics.X11.Xinerama. +getScreenInfo :: Display -> IO [Rectangle] +getScreenInfo dpy = do + mxs <- xineramaQueryScreens dpy + case mxs of + Just xs -> return . map xsiToRect $ xs + Nothing -> do + wa <- getWindowAttributes dpy (defaultRootWindow dpy) + return $ [Rectangle + { rect_x = fromIntegral $ wa_x wa + , rect_y = fromIntegral $ wa_y wa + , rect_width = fromIntegral $ wa_width wa + , rect_height = fromIntegral $ wa_height wa }] + where + xsiToRect xsi = Rectangle + { rect_x = fromIntegral $ xsi_x_org xsi + , rect_y = fromIntegral $ xsi_y_org xsi + , rect_width = fromIntegral $ xsi_width xsi + , rect_height = fromIntegral $ xsi_height xsi + } + +#ifdef HAVE_X11_EXTENSIONS_XINERAMA_H +-- We have Xinerama, so the library will actually work +compiledWithXinerama :: Bool +compiledWithXinerama = True + +-- for XFree() (already included from Xinerama.h, but I don't know if I can count on that.) +#include + +#include + +instance Storable XineramaScreenInfo where + sizeOf _ = #{size XineramaScreenInfo} + -- FIXME: Is this right? + alignment _ = alignment (undefined :: CInt) + + poke p xsi = do + #{poke XineramaScreenInfo, screen_number } p $ xsi_screen_number xsi + #{poke XineramaScreenInfo, x_org } p $ xsi_x_org xsi + #{poke XineramaScreenInfo, y_org } p $ xsi_y_org xsi + #{poke XineramaScreenInfo, width } p $ xsi_width xsi + #{poke XineramaScreenInfo, height } p $ xsi_height xsi + + peek p = return XineramaScreenInfo + `ap` (#{peek XineramaScreenInfo, screen_number} p) + `ap` (#{peek XineramaScreenInfo, x_org} p) + `ap` (#{peek XineramaScreenInfo, y_org} p) + `ap` (#{peek XineramaScreenInfo, width} p) + `ap` (#{peek XineramaScreenInfo, height} p) + +foreign import ccall "XineramaIsActive" + xineramaIsActive :: Display -> IO Bool + +xineramaQueryExtension :: Display -> IO (Maybe (CInt, CInt)) +xineramaQueryExtension dpy = wrapPtr2 (cXineramaQueryExtension dpy) go + where go False _ _ = Nothing + go True eventbase errorbase = Just (fromIntegral eventbase, fromIntegral errorbase) + +xineramaQueryVersion :: Display -> IO (Maybe (CInt, CInt)) +xineramaQueryVersion dpy = wrapPtr2 (cXineramaQueryVersion dpy) go + where go False _ _ = Nothing + go True major minor = Just (fromIntegral major, fromIntegral minor) + +xineramaQueryScreens :: Display -> IO (Maybe [XineramaScreenInfo]) +xineramaQueryScreens dpy = + withPool $ \pool -> do intp <- pooledMalloc pool + p <- cXineramaQueryScreens dpy intp + if p == nullPtr + then return Nothing + else do nscreens <- peek intp + screens <- peekArray (fromIntegral nscreens) p + cXFree p + return (Just screens) + +foreign import ccall "XineramaQueryExtension" + cXineramaQueryExtension :: Display -> Ptr CInt -> Ptr CInt -> IO Bool +foreign import ccall "XineramaQueryVersion" + cXineramaQueryVersion :: Display -> Ptr CInt -> Ptr CInt -> IO Bool +foreign import ccall "XineramaQueryScreens" + cXineramaQueryScreens :: Display -> Ptr CInt -> IO (Ptr XineramaScreenInfo) +foreign import ccall "XFree" + cXFree :: Ptr a -> IO CInt + +wrapPtr2 :: (Storable a, Storable b) => (Ptr a -> Ptr b -> IO c) -> (c -> a -> b -> d) -> IO d +wrapPtr2 cfun f = + withPool $ \pool -> do aptr <- pooledMalloc pool + bptr <- pooledMalloc pool + ret <- cfun aptr bptr + a <- peek aptr + b <- peek bptr + return (f ret a b) + +#else + +-- No Xinerama, but if we fake a non-active Xinerama interface, "getScreenInfo" +-- will continue to work fine in the single-screen case. +compiledWithXinerama :: Bool +compiledWithXinerama = False + +xineramaIsActive :: Display -> IO Bool +xineramaIsActive _ = return False + +xineramaQueryExtension :: Display -> IO (Maybe (CInt, CInt)) +xineramaQueryExtension _ = return Nothing + +xineramaQueryVersion :: Display -> IO (Maybe (CInt, CInt)) +xineramaQueryVersion _ = return Nothing + +xineramaQueryScreens :: Display -> IO (Maybe [XineramaScreenInfo]) +xineramaQueryScreens _ = return Nothing +#endif hunk ./Graphics/X11/Xlib/Extras.hsc 1 +{-# OPTIONS -fglasgow-exts #-} +----------------------------------------------------------------------------- +-- | +-- Module : +-- Copyright : (c) Spencer Janssen +-- License : BSD3-style (see LICENSE) +-- +-- Stability : stable +-- +----------------------------------------------------------------------------- +-- +-- missing functionality from the X11 library +-- + +module Graphics.X11.Xlib.Extras where + +import Data.Typeable ( Typeable ) +import Graphics.X11.Xlib +import Graphics.X11.Xlib.Types +import Graphics.X11.Xlib.Misc +import Foreign +import Foreign.C.Types +import Foreign.C.String +import Control.Monad + +#include "XlibExtras.h" + +data Event + = AnyEvent + { ev_event_type :: !EventType + , ev_serial :: !CULong + , ev_send_event :: !Bool + , ev_event_display :: Display + , ev_window :: !Window + } + | ConfigureRequestEvent + { 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 + { 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 + { ev_event_type :: !EventType + , ev_serial :: !CULong + , ev_send_event :: !Bool + , ev_event_display :: Display + , ev_parent :: !Window + , ev_window :: !Window + } + | KeyEvent + { 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 + { 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 + { 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 + { ev_event_type :: !EventType + , ev_serial :: !CULong + , ev_send_event :: !Bool + , ev_event_display :: Display + , ev_event :: !Window + , ev_window :: !Window + } + | UnmapEvent + { ev_event_type :: !EventType + , ev_serial :: !CULong + , ev_send_event :: !Bool + , ev_event_display :: Display + , ev_event :: !Window + , ev_window :: !Window + , ev_from_configure :: !Bool + } + | MapNotifyEvent + { ev_event_type :: !EventType + , ev_serial :: !CULong + , ev_send_event :: !Bool + , ev_event_display :: Display + , ev_event :: !Window + , ev_window :: !Window + , ev_override_redirect :: !Bool + } + | MappingNotifyEvent + { ev_event_type :: !EventType + , ev_serial :: !CULong + , ev_send_event :: !Bool + , ev_event_display :: Display + , ev_window :: !Window + , ev_request :: !MappingRequest + , ev_first_keycode :: !KeyCode + , ev_count :: !CInt + } + | CrossingEvent + { 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 + { ev_event_type :: !EventType + , ev_serial :: !CULong + , ev_send_event :: !Bool + , ev_event_display :: Display + , ev_owner :: !Window + , ev_requestor :: !Window + , ev_selection :: !Atom + , ev_target :: !Atom + , ev_property :: !Atom + , ev_time :: !Time + } + | PropertyEvent + { ev_event_type :: !EventType + , ev_serial :: !CULong + , ev_send_event :: !Bool + , ev_event_display :: Display + , ev_window :: !Window + , ev_atom :: !Atom + , ev_time :: !Time + , ev_propstate :: !CInt + } + | ExposeEvent + { 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 + { ev_event_type :: !EventType + , ev_serial :: !CULong + , ev_send_event :: !Bool + , ev_event_display :: Display + , ev_window :: !Window + , ev_message_type :: !Atom + , ev_data :: ![CInt] + } + + deriving ( Show, Typeable ) + +eventTable = + [ (keyPress , "KeyPress") + , (keyRelease , "KeyRelease") + , (buttonPress , "ButtonPress") + , (buttonRelease , "ButtonRelease") + , (motionNotify , "MotionNotify") + , (enterNotify , "EnterNotify") + , (leaveNotify , "LeaveNotify") + , (focusIn , "FocusIn") + , (focusOut , "FocusOut") + , (keymapNotify , "KeymapNotify") + , (expose , "Expose") + , (graphicsExpose , "GraphicsExpose") + , (noExpose , "NoExpose") + , (visibilityNotify , "VisibilityNotify") + , (createNotify , "CreateNotify") + , (destroyNotify , "DestroyNotify") + , (unmapNotify , "UnmapNotify") + , (mapNotify , "MapNotify") + , (mapRequest , "MapRequest") + , (reparentNotify , "ReparentNotify") + , (configureNotify , "ConfigureNotify") + , (configureRequest , "ConfigureRequest") + , (gravityNotify , "GravityNotify") + , (resizeRequest , "ResizeRequest") + , (circulateNotify , "CirculateNotify") + , (circulateRequest , "CirculateRequest") + , (propertyNotify , "PropertyNotify") + , (selectionClear , "SelectionClear") + , (selectionRequest , "SelectionRequest") + , (selectionNotify , "SelectionNotify") + , (colormapNotify , "ColormapNotify") + , (clientMessage , "ClientMessage") + , (mappingNotify , "MappingNotify") + , (lASTEvent , "LASTEvent") + ] + +eventName :: Event -> String +eventName e = maybe ("unknown " ++ show x) id $ lookup x eventTable + where x = fromIntegral $ ev_event_type e + +getEvent :: XEventPtr -> IO Event +getEvent p = do + -- All events share this layout and naming convention, there is also a + -- common Window field, but the names for this field vary. + type_ <- #{peek XAnyEvent, type} p + serial <- #{peek XAnyEvent, serial} p + send_event <- #{peek XAnyEvent, send_event} p + display <- fmap Display (#{peek XAnyEvent, display} p) + case () of + + ------------------------- + -- ConfigureRequestEvent: + ------------------------- + _ | type_ == configureRequest -> do + parent <- #{peek XConfigureRequestEvent, parent } p + window <- #{peek XConfigureRequestEvent, window } p + x <- #{peek XConfigureRequestEvent, x } p + y <- #{peek XConfigureRequestEvent, y } p + width <- #{peek XConfigureRequestEvent, width } p + height <- #{peek XConfigureRequestEvent, height } p + border_width <- #{peek XConfigureRequestEvent, border_width} p + above <- #{peek XConfigureRequestEvent, above } p + detail <- #{peek XConfigureRequestEvent, detail } p + value_mask <- #{peek XConfigureRequestEvent, value_mask } p + return $ ConfigureRequestEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_parent = parent + , ev_window = window + , ev_x = x + , ev_y = y + , ev_width = width + , ev_height = height + , ev_border_width = border_width + , ev_above = above + , ev_detail = detail + , ev_value_mask = value_mask + } + + ------------------ + -- ConfigureEvent: + ------------------ + | type_ == configureNotify -> do + return (ConfigureEvent type_ serial send_event display) + `ap` #{peek XConfigureEvent, event } p + `ap` #{peek XConfigureEvent, window } p + `ap` #{peek XConfigureEvent, x } p + `ap` #{peek XConfigureEvent, y } p + `ap` #{peek XConfigureEvent, width } p + `ap` #{peek XConfigureEvent, height } p + `ap` #{peek XConfigureEvent, border_width } p + `ap` #{peek XConfigureEvent, above } p + `ap` #{peek XConfigureEvent, override_redirect } p + + ------------------- + -- MapRequestEvent: + ------------------- + | type_ == mapRequest -> do + parent <- #{peek XMapRequestEvent, parent} p + window <- #{peek XMapRequestEvent, window} p + return $ MapRequestEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_parent = parent + , ev_window = window + } + + ------------------- + -- MapNotifyEvent + ------------------- + | type_ == mapNotify -> do + event <- #{peek XMapEvent, event} p + window <- #{peek XMapEvent, window} p + override_redirect <- #{peek XMapEvent, override_redirect} p + return $ MapNotifyEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_event = event + , ev_window = window + , ev_override_redirect = override_redirect + } + + ------------------- + -- MappingNotifyEvent + ------------------- + | type_ == mappingNotify -> do + window <- #{peek XMappingEvent,window} p + request <- #{peek XMappingEvent,request} p + first_keycode <- #{peek XMappingEvent,first_keycode} p + count <- #{peek XMappingEvent,count} p + + return $ MappingNotifyEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_window = window + , ev_request = request + , ev_first_keycode = first_keycode + , ev_count = count + } + + ------------ + -- KeyEvent: + ------------ + | type_ == keyPress || type_ == keyRelease -> do + window <- #{peek XKeyEvent, window } p + root <- #{peek XKeyEvent, root } p + subwindow <- #{peek XKeyEvent, subwindow } p + time <- #{peek XKeyEvent, time } p + x <- #{peek XKeyEvent, x } p + y <- #{peek XKeyEvent, y } p + x_root <- #{peek XKeyEvent, x_root } p + y_root <- #{peek XKeyEvent, y_root } p + state <- (#{peek XKeyEvent, state } p) :: IO CUInt + keycode <- #{peek XKeyEvent, keycode } p + same_screen <- #{peek XKeyEvent, same_screen} p + return $ KeyEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_window = window + , ev_root = root + , ev_subwindow = subwindow + , ev_time = time + , ev_x = x + , ev_y = y + , ev_x_root = x_root + , ev_y_root = y_root + , ev_state = fromIntegral state + , ev_keycode = keycode + , ev_same_screen = same_screen + } + + --------------- + -- ButtonEvent: + --------------- + | type_ == buttonPress || type_ == buttonRelease -> do + + window <- #{peek XButtonEvent, window } p + root <- #{peek XButtonEvent, root } p + subwindow <- #{peek XButtonEvent, subwindow } p + time <- #{peek XButtonEvent, time } p + x <- #{peek XButtonEvent, x } p + y <- #{peek XButtonEvent, y } p + x_root <- #{peek XButtonEvent, x_root } p + y_root <- #{peek XButtonEvent, y_root } p + state <- (#{peek XButtonEvent, state } p) :: IO CUInt + button <- #{peek XButtonEvent, button } p + same_screen <- #{peek XButtonEvent, same_screen} p + + return $ ButtonEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_window = window + , ev_root = root + , ev_subwindow = subwindow + , ev_time = time + , ev_x = x + , ev_y = y + , ev_x_root = x_root + , ev_y_root = y_root + , ev_state = fromIntegral state + , ev_button = button + , ev_same_screen = same_screen + } + + --------------- + -- MotionEvent: + --------------- + | type_ == motionNotify -> do + window <- #{peek XMotionEvent, window} p + x <- #{peek XMotionEvent, x } p + y <- #{peek XMotionEvent, y } p + return $ MotionEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_x = x + , ev_y = y + , ev_window = window + } + + + ---------------------- + -- DestroyWindowEvent: + ---------------------- + | type_ == destroyNotify -> do + event <- #{peek XDestroyWindowEvent, event } p + window <- #{peek XDestroyWindowEvent, window} p + return $ DestroyWindowEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_event = event + , ev_window = window + } + + + -------------------- + -- UnmapNotifyEvent: + -------------------- + | type_ == unmapNotify -> do + event <- #{peek XUnmapEvent, event } p + window <- #{peek XUnmapEvent, window } p + from_configure <- #{peek XUnmapEvent, from_configure} p + return $ UnmapEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_event = event + , ev_window = window + , ev_from_configure = from_configure + } + + -------------------- + -- CrossingEvent + -------------------- + | type_ == enterNotify || type_ == leaveNotify -> do + window <- #{peek XCrossingEvent, window } p + root <- #{peek XCrossingEvent, root } p + subwindow <- #{peek XCrossingEvent, subwindow } p + time <- #{peek XCrossingEvent, time } p + x <- #{peek XCrossingEvent, x } p + y <- #{peek XCrossingEvent, y } p + x_root <- #{peek XCrossingEvent, x_root } p + y_root <- #{peek XCrossingEvent, y_root } p + mode <- #{peek XCrossingEvent, mode } p + detail <- #{peek XCrossingEvent, detail } p + same_screen <- #{peek XCrossingEvent, same_screen } p + focus <- #{peek XCrossingEvent, focus } p + state <- (#{peek XCrossingEvent, state } p) :: IO CUInt + + return $ CrossingEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_window = window + , ev_root = root + , ev_subwindow = subwindow + , ev_time = time + , ev_x = x + , ev_y = y + , ev_x_root = x_root + , ev_y_root = y_root + , ev_mode = mode + , ev_detail = detail + , ev_same_screen = same_screen + , ev_focus = focus + , ev_state = fromIntegral state + } + + ------------------------- + -- SelectionRequestEvent: + ------------------------- + | type_ == selectionRequest -> do + owner <- #{peek XSelectionRequestEvent, owner } p + requestor <- #{peek XSelectionRequestEvent, requestor } p + selection <- #{peek XSelectionRequestEvent, selection } p + target <- #{peek XSelectionRequestEvent, target } p + property <- #{peek XSelectionRequestEvent, property } p + time <- #{peek XSelectionRequestEvent, time } p + return $ SelectionRequest + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_owner = owner + , ev_requestor = requestor + , ev_selection = selection + , ev_target = target + , ev_property = property + , ev_time = time + } + + ------------------------- + -- PropertyEvent + ------------------------- + | type_ == propertyNotify -> do + window <- #{peek XPropertyEvent, window } p + atom <- #{peek XPropertyEvent, atom } p + time <- #{peek XPropertyEvent, time } p + state <- #{peek XPropertyEvent, state } p + return $ PropertyEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_window = window + , ev_atom = atom + , ev_time = time + , ev_propstate = state + } + + ------------------------- + -- ExposeEvent + ------------------------- + | type_ == expose -> do + window <- #{peek XExposeEvent, window } p + x <- #{peek XExposeEvent, x } p + y <- #{peek XExposeEvent, y } p + width <- #{peek XExposeEvent, width } p + height <- #{peek XExposeEvent, height } p + count <- #{peek XExposeEvent, count } p + return $ ExposeEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_window = window + , ev_x = x + , ev_y = y + , ev_width = width + , ev_height = height + , ev_count = count + } + + ------------------------- + -- ClientMessageEvent + ------------------------- + | type_ == clientMessage -> do + window <- #{peek XClientMessageEvent, window } p + message_type <- #{peek XClientMessageEvent, message_type } p + format <- #{peek XClientMessageEvent, format } p + let datPtr = #{ptr XClientMessageEvent, data } p + dat <- case (format::CInt) of + 8 -> do a <- peekArray 20 datPtr + return $ map fromIntegral (a::[Word8]) + 16 -> do a <- peekArray 10 datPtr + return $ map fromIntegral (a::[Word16]) + 32 -> do a <- peekArray 5 datPtr + return $ map fromIntegral (a::[Word32]) + return $ ClientMessageEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_window = window + , ev_message_type = message_type + , ev_data = dat + } + + -- We don't handle this event specifically, so return the generic + -- AnyEvent. + | otherwise -> do + window <- #{peek XAnyEvent, window} p + return $ AnyEvent + { ev_event_type = type_ + , ev_serial = serial + , ev_send_event = send_event + , ev_event_display = display + , ev_window = window + } + +data WindowChanges = WindowChanges + { wc_x :: CInt + , wc_y :: CInt + , wc_width :: CInt + , wc_height:: CInt + , wc_border_width :: CInt + , wc_sibling :: Window + , wc_stack_mode :: CInt + } + +instance Storable WindowChanges where + sizeOf _ = #{size XWindowChanges} + + -- I really hope this is right: + alignment _ = alignment (undefined :: CInt) + + poke p wc = do + #{poke XWindowChanges, x } p $ wc_x wc + #{poke XWindowChanges, y } p $ wc_y wc + #{poke XWindowChanges, width } p $ wc_width wc + #{poke XWindowChanges, height } p $ wc_height wc + #{poke XWindowChanges, border_width} p $ wc_border_width wc + #{poke XWindowChanges, sibling } p $ wc_sibling wc + #{poke XWindowChanges, stack_mode } p $ wc_stack_mode wc + + peek p = return WindowChanges + `ap` (#{peek XWindowChanges, x} p) + `ap` (#{peek XWindowChanges, y} p) + `ap` (#{peek XWindowChanges, width} p) + `ap` (#{peek XWindowChanges, height} p) + `ap` (#{peek XWindowChanges, border_width} p) + `ap` (#{peek XWindowChanges, sibling} p) + `ap` (#{peek XWindowChanges, stack_mode} p) + +-- +-- Some extra constants +-- + +none :: XID +none = #{const None} + +anyButton :: Button +anyButton = #{const AnyButton} + +anyKey :: KeyCode +anyKey = toEnum #{const AnyKey} + +currentTime :: Time +currentTime = #{const CurrentTime} + +-- +-- The use of Int rather than CInt isn't 64 bit clean. +-- + +foreign import ccall unsafe "XlibExtras.h XConfigureWindow" + xConfigureWindow :: Display -> Window -> CULong -> Ptr WindowChanges -> IO CInt + +foreign import ccall unsafe "XlibExtras.h XKillClient" + killClient :: Display -> Window -> IO CInt + +configureWindow :: Display -> Window -> CULong -> WindowChanges -> IO () +configureWindow d w m c = do + with c (xConfigureWindow d w m) + return () + +foreign import ccall unsafe "XlibExtras.h XFree" + xFree :: Ptr a -> IO CInt + +foreign import ccall unsafe "XlibExtras.h XQueryTree" + xQueryTree :: Display -> Window -> Ptr Window -> Ptr Window -> Ptr (Ptr Window) -> Ptr CInt -> IO Status + +queryTree :: Display -> Window -> IO (Window, Window, [Window]) +queryTree d w = + alloca $ \root_return -> + alloca $ \parent_return -> + alloca $ \children_return -> + alloca $ \nchildren_return -> do + xQueryTree d w root_return parent_return children_return nchildren_return + p <- peek children_return + n <- fmap fromIntegral $ peek nchildren_return + ws <- peekArray n p + xFree p + liftM3 (,,) (peek root_return) (peek parent_return) (return ws) + +-- TODO: this data type is incomplete wrt. the C struct +data WindowAttributes = WindowAttributes + { wa_x, wa_y, wa_width, wa_height, wa_border_width :: CInt + , wa_map_state :: CInt + , wa_override_redirect :: Bool + } + +-- +-- possible map_states' +-- +waIsUnmapped, waIsUnviewable, waIsViewable :: CInt +waIsUnmapped = fromIntegral $ #{const IsUnmapped} -- 0 +waIsUnviewable = fromIntegral $ #{const IsUnviewable} -- 1 +waIsViewable = fromIntegral $ #{const IsViewable} -- 2 + +instance Storable WindowAttributes where + -- this might be incorrect + alignment _ = alignment (undefined :: CInt) + sizeOf _ = #{size XWindowAttributes} + peek p = return WindowAttributes + `ap` (#{peek XWindowAttributes, x } p) + `ap` (#{peek XWindowAttributes, y } p) + `ap` (#{peek XWindowAttributes, width } p) + `ap` (#{peek XWindowAttributes, height } p) + `ap` (#{peek XWindowAttributes, border_width } p) + `ap` (#{peek XWindowAttributes, map_state } p) + `ap` (#{peek XWindowAttributes, override_redirect} p) + poke p wa = do + #{poke XWindowAttributes, x } p $ wa_x wa + #{poke XWindowAttributes, y } p $ wa_y wa + #{poke XWindowAttributes, width } p $ wa_width wa + #{poke XWindowAttributes, height } p $ wa_height wa + #{poke XWindowAttributes, border_width } p $ wa_border_width wa + #{poke XWindowAttributes, map_state } p $ wa_map_state wa + #{poke XWindowAttributes, override_redirect} p $ wa_override_redirect wa + +foreign import ccall unsafe "XlibExtras.h XGetWindowAttributes" + xGetWindowAttributes :: Display -> Window -> Ptr (WindowAttributes) -> IO Status + +getWindowAttributes d w = alloca $ \p -> do + xGetWindowAttributes d w p + peek p + +-- | interface to the X11 library function @XChangeWindowAttributes()@. +foreign import ccall unsafe "XlibExtras.h XChangeWindowAttributes" + changeWindowAttributes :: Display -> Window -> AttributeMask -> Ptr SetWindowAttributes -> IO () + +-- | Run an action with the server +withServer :: Display -> IO () -> IO () +withServer dpy f = do + grabServer dpy + f + ungrabServer dpy + +data TextProperty = TextProperty { + tp_value :: CString, + tp_encoding :: Atom, + tp_format :: CInt, + tp_nitems :: #{type unsigned long} + } + +instance Storable TextProperty where + sizeOf _ = #{size XTextProperty} + alignment _ = alignment (undefined :: #{type unsigned long}) + peek p = TextProperty `fmap` #{peek XTextProperty, value } p + `ap` #{peek XTextProperty, encoding} p + `ap` #{peek XTextProperty, format } p + `ap` #{peek XTextProperty, nitems } p + poke p (TextProperty val enc fmt nitems) = do + #{poke XTextProperty, value } p val + #{poke XTextProperty, encoding} p enc + #{poke XTextProperty, format } p fmt + #{poke XTextProperty, nitems } p nitems + +foreign import ccall unsafe "XlibExtras.h XGetTextProperty" + xGetTextProperty :: Display -> Window -> Ptr TextProperty -> Atom -> IO Status + +getTextProperty :: Display -> Window -> Atom -> IO TextProperty +getTextProperty d w a = + alloca $ \textp -> do + throwIf (0==) (const "getTextProperty") $ xGetTextProperty d w textp a + peek textp + +foreign import ccall unsafe "XlibExtras.h XwcTextPropertyToTextList" + xwcTextPropertyToTextList :: Display -> Ptr TextProperty -> Ptr (Ptr CWString) -> Ptr CInt -> IO CInt + +wcTextPropertyToTextList :: Display -> TextProperty -> IO [String] +wcTextPropertyToTextList d prop = + alloca $ \listp -> + alloca $ \countp -> + with prop $ \propp -> do + throwIf (success>) (const "wcTextPropertyToTextList") $ + xwcTextPropertyToTextList d propp listp countp + count <- peek countp + list <- peek listp + texts <- flip mapM [0..fromIntegral count - 1] $ \i -> + peekElemOff list i >>= peekCWString + wcFreeStringList list + return texts + +foreign import ccall unsafe "XlibExtras.h XwcFreeStringList" + wcFreeStringList :: Ptr CWString -> IO () + +newtype FontSet = FontSet (Ptr FontSet) + deriving (Eq, Ord, Show) + +foreign import ccall unsafe "XlibExtras.h XCreateFontSet" + xCreateFontSet :: Display -> CString -> Ptr (Ptr CString) -> Ptr CInt -> Ptr CString -> IO (Ptr FontSet) + +createFontSet :: Display -> String -> IO ([String], String, FontSet) +createFontSet d fn = + withCString fn $ \fontp -> + alloca $ \listp -> + alloca $ \countp -> + alloca $ \defp -> do + fs <- throwIfNull "createFontSet" $ + xCreateFontSet d fontp listp countp defp + count <- peek countp + list <- peek listp + missing <- flip mapM [0..fromIntegral count - 1] $ \i -> + peekElemOff list i >>= peekCString + def <- peek defp >>= peekCString + freeStringList list + return (missing, def, FontSet fs) + +foreign import ccall unsafe "XlibExtras.h XFreeStringList" + freeStringList :: Ptr CString -> IO () + +foreign import ccall unsafe "XlibExtras.h XFreeFontSet" + freeFontSet :: Display -> FontSet -> IO () + +foreign import ccall unsafe "XlibExtras.h XwcTextExtents" + xwcTextExtents :: FontSet -> CWString -> CInt -> Ptr Rectangle -> Ptr Rectangle -> IO CInt + +wcTextExtents :: FontSet -> String -> (Rectangle, Rectangle) +wcTextExtents fs text = unsafePerformIO $ + withCWStringLen text $ \(textp, len) -> + alloca $ \inkp -> + alloca $ \logicalp -> do + xwcTextExtents fs textp (fromIntegral len) inkp logicalp + (,) `fmap` peek inkp `ap` peek logicalp + +foreign import ccall unsafe "XlibExtras.h XwcDrawString" + xwcDrawString :: Display -> Drawable -> FontSet -> GC -> Position -> Position -> CWString -> CInt -> IO () + +wcDrawString :: Display -> Drawable -> FontSet -> GC -> Position -> Position -> String -> IO () +wcDrawString d w fs gc x y = + flip withCWStringLen $ \(s, len) -> + xwcDrawString d w fs gc x y s (fromIntegral len) + +foreign import ccall unsafe "XlibExtras.h XwcDrawImageString" + xwcDrawImageString :: Display -> Drawable -> FontSet -> GC -> Position -> Position -> CWString -> CInt -> IO () + +wcDrawImageString :: Display -> Drawable -> FontSet -> GC -> Position -> Position -> String -> IO () +wcDrawImageString d w fs gc x y = + flip withCWStringLen $ \(s, len) -> + xwcDrawImageString d w fs gc x y s (fromIntegral len) + +foreign import ccall unsafe "XlibExtras.h XwcTextEscapement" + xwcTextEscapement :: FontSet -> CWString -> CInt -> IO Int32 + +wcTextEscapement :: FontSet -> String -> Int32 +wcTextEscapement font_set string = unsafePerformIO $ + withCWStringLen string $ \ (c_string, len) -> + xwcTextEscapement font_set c_string (fromIntegral len) + +foreign import ccall unsafe "XlibExtras.h XFetchName" + xFetchName :: Display -> Window -> Ptr CString -> IO Status + +fetchName :: Display -> Window -> IO (Maybe String) +fetchName d w = alloca $ \p -> do + xFetchName d w p + cstr <- peek p + if cstr == nullPtr + then return Nothing + else do + str <- peekCString cstr + xFree cstr + return $ Just str + +foreign import ccall unsafe "XlibExtras.h XGetTransientForHint" + xGetTransientForHint :: Display -> Window -> Ptr Window -> IO Status + +getTransientForHint :: Display -> Window -> IO (Maybe Window) +getTransientForHint d w = alloca $ \wp -> do + status <- xGetTransientForHint d w wp + if status == 0 + then return Nothing + else Just `liftM` peek wp + +------------------------------------------------------------------------ +-- setWMProtocols :: Display -> Window -> [Atom] -> IO () + +{- +setWMProtocols :: Display -> Window -> [Atom] -> IO () +setWMProtocols display w protocols = + withArray protocols $ \ protocol_array -> + xSetWMProtocols display w protocol_array (length protocols) +foreign import ccall unsafe "HsXlib.h XSetWMProtocols" + xSetWMProtocols :: Display -> Window -> Ptr Atom -> CInt -> IO () +-} + +-- | The XGetWMProtocols function returns the list of atoms +-- stored in the WM_PROTOCOLS property on the specified win­ +-- dow. 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. +-- +getWMProtocols :: Display -> Window -> IO [Atom] +getWMProtocols display w = do + alloca $ \atom_ptr_ptr -> + alloca $ \count_ptr -> do + + st <- xGetWMProtocols display w atom_ptr_ptr count_ptr + if st == 0 + then return [] + else do sz <- peek count_ptr + atom_ptr <- peek atom_ptr_ptr + atoms <- peekArray (fromIntegral sz) atom_ptr + xFree atom_ptr + return atoms + +foreign import ccall unsafe "HsXlib.h XGetWMProtocols" + xGetWMProtocols :: Display -> Window -> Ptr (Ptr Atom) -> Ptr CInt -> IO Status + + +------------------------------------------------------------------------ +-- Creating events + +setEventType :: XEventPtr -> EventType -> IO () +setEventType = #{poke XEvent,type} + +{- +typedef struct { + int type; /* SelectionNotify */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window requestor; + Atom selection; + Atom target; + Atom property; /* atom or None */ + Time time; +} XSelectionEvent; +-} + +setSelectionNotify :: XEventPtr -> Window -> Atom -> Atom -> Atom -> Time -> IO () +setSelectionNotify p requestor selection target property time = do + setEventType p selectionNotify + #{poke XSelectionEvent, requestor} p requestor + #{poke XSelectionEvent, selection} p selection + #{poke XSelectionEvent, target} p target + #{poke XSelectionEvent, property} p property + #{poke XSelectionEvent, time} p time + +-- hacky way to set up an XClientMessageEvent +-- Should have a Storable instance for XEvent/Event? +setClientMessageEvent :: XEventPtr -> Window -> Atom -> CInt -> Atom -> Time -> IO () +setClientMessageEvent p window message_type format l_0_ l_1_ = do + #{poke XClientMessageEvent, window} p window + #{poke XClientMessageEvent, message_type} p message_type + #{poke XClientMessageEvent, format} p format + let datap = #{ptr XClientMessageEvent, data} p :: Ptr CLong + poke datap (fromIntegral l_0_) -- does this work? + pokeElemOff datap 1 (fromIntegral l_1_) + + return () + +setConfigureEvent :: XEventPtr -> Window -> Window -> CInt -> CInt -> CInt -> CInt -> CInt -> Window -> Bool -> IO () +setConfigureEvent p ev win x y w h bw abv or = do + #{poke XConfigureEvent, event } p ev + #{poke XConfigureEvent, window } p win + #{poke XConfigureEvent, x } p x + #{poke XConfigureEvent, y } p y + #{poke XConfigureEvent, width } p w + #{poke XConfigureEvent, height } p h + #{poke XConfigureEvent, border_width } p bw + #{poke XConfigureEvent, above } p abv + #{poke XConfigureEvent, override_redirect} p (if or then 1 else 0 :: CInt) + + +{- + typedef struct { + int type; /* ClientMessage */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + Atom message_type; + int format; + union { + char b[20]; + short s[10]; + long l[5]; + } data; + } XClientMessageEvent; + +-} + +------------------------------------------------------------------------ +-- XErrorEvents +-- +-- I'm too lazy to write the binding +-- + +foreign import ccall unsafe "XlibExtras.h x11_extras_set_error_handler" + xSetErrorHandler :: IO () + +-- | refreshKeyboardMapping. TODO Remove this binding when the fix has been commited to +-- X11 +refreshKeyboardMapping :: Event -> IO () +refreshKeyboardMapping ev@(MappingNotifyEvent {ev_event_display = (Display d)}) + = allocaBytes #{size XMappingEvent} $ \p -> do + #{poke XMappingEvent, type } p $ ev_event_type ev + #{poke XMappingEvent, serial } p $ ev_serial ev + #{poke XMappingEvent, send_event } p $ ev_send_event ev + #{poke XMappingEvent, display } p $ d + #{poke XMappingEvent, window } p $ ev_window ev + #{poke XMappingEvent, request } p $ ev_request ev + #{poke XMappingEvent, first_keycode } p $ ev_first_keycode ev + #{poke XMappingEvent, count } p $ ev_count ev + xRefreshKeyboardMapping p + return () +refreshKeyboardMapping _ = return () + +foreign import ccall unsafe "XlibExtras.h XRefreshKeyboardMapping" + xRefreshKeyboardMapping :: Ptr () -> IO CInt + +-- Properties + +anyPropertyType :: Atom +anyPropertyType = #{const AnyPropertyType} + +foreign import ccall unsafe "XlibExtras.h XChangeProperty" + xChangeProperty :: Display -> Window -> Atom -> Atom -> CInt -> CInt -> Ptr CUChar -> CInt -> IO Status + +foreign import ccall unsafe "XlibExtras.h XGetWindowProperty" + 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]) +rawGetWindowProperty bits d atom w = + alloca $ \actual_type_return -> + alloca $ \actual_format_return -> + alloca $ \nitems_return -> + alloca $ \bytes_after_return -> + alloca $ \prop_return -> do + xGetWindowProperty d w atom 0 0xFFFFFFFF False anyPropertyType + actual_type_return + actual_format_return + nitems_return + bytes_after_return + prop_return + + prop_ptr <- peek prop_return + actual_format <- fromIntegral `liftM` peek actual_format_return + nitems <- fromIntegral `liftM` peek nitems_return + getprop prop_ptr nitems actual_format + where + getprop prop_ptr nitems actual_format + | actual_format == 0 = return Nothing -- Property not found + | actual_format /= bits = xFree prop_ptr >> return Nothing + | otherwise = do + retval <- peekArray nitems (castPtr prop_ptr) + xFree prop_ptr + return $ Just retval + +getWindowProperty8 :: Display -> Atom -> Window -> IO (Maybe [Word8]) +getWindowProperty8 = rawGetWindowProperty 8 + +getWindowProperty16 :: Display -> Atom -> Window -> IO (Maybe [Word16]) +getWindowProperty16 = rawGetWindowProperty 16 + +getWindowProperty32 :: Display -> Atom -> Window -> IO (Maybe [Word32]) +getWindowProperty32 = rawGetWindowProperty 32 + +-- this assumes bytes are 8 bits. I hope X isn't more portable than that :( + +changeProperty8 :: Display -> Window -> Atom -> Atom -> CInt -> [Word8] -> IO () +changeProperty8 dpy w prop typ mode dat = + withArrayLen dat $ \ len ptr -> do + xChangeProperty dpy w prop typ 8 mode (castPtr ptr) (fromIntegral len) + return () + +changeProperty16 :: Display -> Window -> Atom -> Atom -> CInt -> [Word16] -> IO () +changeProperty16 dpy w prop typ mode dat = + withArrayLen dat $ \ len ptr -> do + xChangeProperty dpy w prop typ 16 mode (castPtr ptr) (fromIntegral len) + return () + +changeProperty32 :: Display -> Window -> Atom -> Atom -> CInt -> [Word32] -> IO () +changeProperty32 dpy w prop typ mode dat = + withArrayLen dat $ \ len ptr -> do + xChangeProperty dpy w prop typ 32 mode (castPtr ptr) (fromIntegral len) + return () + +propModeReplace, propModePrepend, propModeAppend :: CInt +propModeReplace = #{const PropModeReplace} +propModePrepend = #{const PropModePrepend} +propModeAppend = #{const PropModeAppend} + +-- Windows + +foreign import ccall unsafe "XlibExtras.h XUnmapWindow" + xUnmapWindow :: Display -> Window -> IO CInt + +unmapWindow :: Display -> Window -> IO () +unmapWindow d w = xUnmapWindow d w >> return () + +------------------------------------------------------------------------ +-- Size hints + +data SizeHints = SizeHints + { sh_min_size :: Maybe (Dimension, Dimension) + , sh_max_size :: Maybe (Dimension, Dimension) + , sh_resize_inc :: Maybe (Dimension, Dimension) + , sh_aspect :: Maybe ((Dimension, Dimension), (Dimension, Dimension)) + , sh_base_size :: Maybe (Dimension, Dimension) + , sh_win_gravity :: Maybe (BitGravity) + } + +pMinSizeBit = 4 +pMaxSizeBit = 5 +pResizeIncBit = 6 +pAspectBit = 7 +pBaseSizeBit = 8 +pWinGravityBit = 9 + +instance Storable SizeHints where + alignment _ = alignment (undefined :: CInt) + sizeOf _ = #{size XSizeHints} + + poke p sh = do + let whenSet f x = maybe (return ()) x (f sh) + let pokeFlag b = do flag <- #{peek XSizeHints, flags} p :: IO CLong + #{poke XSizeHints, flags} p (setBit flag b) + #{poke XSizeHints, flags} p (0 :: CLong) + whenSet sh_min_size $ \(w, h) -> do + pokeFlag pMinSizeBit + #{poke XSizeHints, min_width } p w + #{poke XSizeHints, min_height } p h + whenSet sh_max_size $ \(w, h) -> do + pokeFlag pMaxSizeBit + #{poke XSizeHints, max_width } p w + #{poke XSizeHints, max_height } p h + whenSet sh_resize_inc $ \(w, h) -> do + pokeFlag pResizeIncBit + #{poke XSizeHints, width_inc } p w + #{poke XSizeHints, height_inc } p w + whenSet sh_aspect $ \((minx, miny), (maxx, maxy)) -> do + pokeFlag pAspectBit + #{poke XSizeHints, min_aspect.x} p minx + #{poke XSizeHints, min_aspect.y} p miny + #{poke XSizeHints, max_aspect.x} p maxx + #{poke XSizeHints, max_aspect.y} p maxy + whenSet sh_base_size $ \(w, h) -> do + pokeFlag pBaseSizeBit + #{poke XSizeHints, base_width } p w + #{poke XSizeHints, base_height } p h + whenSet sh_win_gravity $ \g -> do + pokeFlag pWinGravityBit + #{poke XSizeHints, win_gravity } p g + + peek p = do + flags <- #{peek XSizeHints, flags} p :: IO CLong + let whenBit n x = if testBit flags n then liftM Just x else return Nothing + return SizeHints + `ap` whenBit pMinSizeBit (do liftM2 (,) (#{peek XSizeHints, min_width } p) + (#{peek XSizeHints, min_height } p)) + `ap` whenBit pMaxSizeBit (do liftM2 (,) (#{peek XSizeHints, max_width } p) + (#{peek XSizeHints, max_height } p)) + `ap` whenBit pResizeIncBit (do liftM2 (,) (#{peek XSizeHints, width_inc } p) + (#{peek XSizeHints, height_inc } p)) + `ap` whenBit pAspectBit (do minx <- #{peek XSizeHints, min_aspect.x} p + miny <- #{peek XSizeHints, min_aspect.y} p + maxx <- #{peek XSizeHints, max_aspect.x} p + maxy <- #{peek XSizeHints, max_aspect.y} p + return ((minx, miny), (maxx, maxy))) + `ap` whenBit pBaseSizeBit (do liftM2 (,) (#{peek XSizeHints, base_width } p) + (#{peek XSizeHints, base_height} p)) + `ap` whenBit pWinGravityBit (#{peek XSizeHints, win_gravity} p) + + +foreign import ccall unsafe "XlibExtras.h XGetWMNormalHints" + xGetWMNormalHints :: Display -> Window -> Ptr SizeHints -> Ptr CLong -> IO Status + +getWMNormalHints :: Display -> Window -> IO SizeHints +getWMNormalHints d w + = alloca $ \sh -> do + alloca $ \supplied_return -> do + -- what's the purpose of supplied_return? + xGetWMNormalHints d w sh supplied_return + peek sh + + +data ClassHint = ClassHint + { resName :: String + , resClass :: String + } + +getClassHint :: Display -> Window -> IO ClassHint +getClassHint d w = allocaBytes (#{size XClassHint}) $ \ p -> do + s <- xGetClassHint d w p + if s /= 0 -- returns a nonzero status on success + then do + res_name_p <- #{peek XClassHint, res_name} p + res_class_p <- #{peek XClassHint, res_class} p + res <- liftM2 ClassHint (peekCString res_name_p) (peekCString res_class_p) + xFree res_name_p + xFree res_class_p + return res + else return $ ClassHint "" "" + +foreign import ccall unsafe "XlibExtras.h XGetClassHint" + xGetClassHint :: Display -> Window -> Ptr ClassHint -> IO Status + +------------------------------------------------------------------------ +-- WM Hints + +-- These are the documented values for a window's "WM State", set, for example, +-- in wmh_initial_state, below. Note, you may need to play games with +-- fromIntegral and/or fromEnum. +withdrawnState = #{const WithdrawnState} :: Int +normalState = #{const NormalState} :: Int +iconicState = #{const IconicState} :: Int + +-- The following values are the documented bit positions on XWMHints's flags field. +-- Use testBit, setBit, and clearBit to manipulate the field. +inputHintBit = 0 :: Int +stateHintBit = 1 :: Int +iconPixmapHintBit = 2 :: Int +iconWindowHintBit = 3 :: Int +iconPositionHintBit = 4 :: Int +iconMaskHintBit = 5 :: Int +windowGroupHintBit = 6 :: Int +urgencyHintBit = 8 :: Int + +-- The following bitmask tests for the presence of all bits except for the +-- urgencyHintBit. +allHintsBitmask = #{const AllHints} :: CLong + +data WMHints = WMHints + { wmh_flags :: CLong + , wmh_input :: Bool + , wmh_initial_state :: CInt + , wmh_icon_pixmap :: Pixmap + , wmh_icon_window :: Window + , wmh_icon_x :: CInt + , wmh_icon_y :: CInt + , wmh_icon_mask :: Pixmap + , wmh_window_group :: XID + } + +instance Storable WMHints where + -- should align to the alignment of the largest type + alignment _ = alignment (undefined :: CLong) + sizeOf _ = #{size XWMHints} + + peek p = return WMHints + `ap` #{peek XWMHints, flags} p + `ap` #{peek XWMHints, input} p + `ap` #{peek XWMHints, initial_state} p + `ap` #{peek XWMHints, icon_pixmap} p + `ap` #{peek XWMHints, icon_window} p + `ap` #{peek XWMHints, icon_x} p + `ap` #{peek XWMHints, icon_x} p + `ap` #{peek XWMHints, icon_mask} p + `ap` #{peek XWMHints, window_group} p + + poke p wmh = do + #{poke XWMHints, flags} p $ wmh_flags wmh + #{poke XWMHints, input} p $ wmh_input wmh + #{poke XWMHints, initial_state} p $ wmh_initial_state wmh + #{poke XWMHints, icon_pixmap} p $ wmh_icon_pixmap wmh + #{poke XWMHints, icon_window} p $ wmh_icon_window wmh + #{poke XWMHints, icon_x} p $ wmh_icon_x wmh + #{poke XWMHints, icon_y} p $ wmh_icon_y wmh + #{poke XWMHints, icon_mask} p $ wmh_icon_mask wmh + #{poke XWMHints, window_group} p $ wmh_window_group wmh + +foreign import ccall unsafe "Xutils.h XGetWMHints" + xGetWMHints :: Display -> Window -> IO (Ptr WMHints) + +getWMHints :: Display -> Window -> IO WMHints +getWMHints dpy w = xGetWMHints dpy w >>= peek + +foreign import ccall unsafe "Xutils.h XAllocWMHints" + xAllocWMHints :: IO (Ptr WMHints) + +foreign import ccall unsafe "Xutils.h XSetWMHints" + xSetWMHints :: Display -> Window -> Ptr WMHints -> IO Status + +setWMHints :: Display -> Window -> WMHints -> IO Status +setWMHints dpy w wmh = do + p_wmh <- xAllocWMHints + poke p_wmh wmh + res <- xSetWMHints dpy w p_wmh + xFree p_wmh + return res + +------------------------------------------------------------------------ +-- Keysym Macros +-- +-- Which we have to wrap in functions, then bind here. + +foreign import ccall unsafe "XlibExtras.h x11_extras_IsCursorKey" + isCursorKey :: KeySym -> Bool +foreign import ccall unsafe "XlibExtras.h x11_extras_IsFunctionKey" + isFunctionKey :: KeySym -> Bool +foreign import ccall unsafe "XlibExtras.h x11_extras_IsKeypadKey" + isKeypadKey :: KeySym -> Bool +foreign import ccall unsafe "XlibExtras.h x11_extras_IsMiscFunctionKey" + isMiscFunctionKey :: KeySym -> Bool +foreign import ccall unsafe "XlibExtras.h x11_extras_IsModifierKey" + isModifierKey :: KeySym -> Bool +foreign import ccall unsafe "XlibExtras.h x11_extras_IsPFKey" + isPFKey :: KeySym -> Bool +foreign import ccall unsafe "XlibExtras.h x11_extras_IsPrivateKeypadKey" + isPrivateKeypadKey :: KeySym -> Bool + +-- FIXME: X11 doesn't have a Read instance for Rectangle, so we include one for now. +{-* Generated by DrIFT : Look, but Don't Touch. *-} +instance Read Rectangle where + readsPrec d input = + readParen (d > 9) + (\ inp -> + [((Rectangle aa ab ac ad) , rest) | ("Rectangle" , inp) <- lex inp + , ("{" , inp) <- lex inp , ("rect_x" , inp) <- lex inp , + ("=" , inp) <- lex inp , (aa , inp) <- readsPrec 10 inp , + ("," , inp) <- lex inp , ("rect_y" , inp) <- lex inp , + ("=" , inp) <- lex inp , (ab , inp) <- readsPrec 10 inp , + ("," , inp) <- lex inp , ("rect_width" , inp) <- lex inp , + ("=" , inp) <- lex inp , (ac , inp) <- readsPrec 10 inp , + ("," , inp) <- lex inp , ("rect_height" , inp) <- lex inp , + ("=" , inp) <- lex inp , (ad , inp) <- readsPrec 10 inp , + ("}" , rest) <- lex inp]) + input + +------------------------------------------------------------------------------- +-- Selections +-- +foreign import ccall unsafe "HsXlib.h XSetSelectionOwner" + xSetSelectionOwner :: Display -> Atom -> Window -> Time -> IO () + +foreign import ccall unsafe "HsXlib.h XGetSelectionOwner" + xGetSelectionOwner :: Display -> Atom -> IO Window + +foreign import ccall unsafe "HsXlib.h XConvertSelection" + xConvertSelection :: Display -> Atom -> Atom -> Atom -> Window -> Time -> IO () hunk ./Graphics/X11/Xlib/Types.hsc 23 -import Control.Monad( zipWithM_ ) +-- import Control.Monad( zipWithM_ ) hunk ./Makefile.nhc98 20 + Graphics.X11.Xlib.Extras \ + Graphics.X11.Xinerama \ hunk ./Makefile.nhc98 23 + XUtils.c \ hunk ./X11.buildinfo.in 7 +@EXTRA_LIBRARIES@ hunk ./X11.cabal 2 -version: 1.2.3 +version: 1.3.0 hunk ./X11.cabal 6 -maintainer: Don Stewart hunk ./X11.cabal 36 - Graphics.X11.Xlib.Image + Graphics.X11.Xlib.Image, + Graphics.X11.Xlib.Extras, + Graphics.X11.Xinerama hunk ./X11.cabal 41 - cbits/auxiliaries.c + cbits/auxiliaries.c, + cbits/XUtils.c hunk ./X11.cabal 45 +extra-source-files: + include/XlibExtras.h + include/X11_extras_config.h.in + configure.ac + configure + X11.buildinfo.in hunk ./X11.cabal 53 -install-includes: HsXlib.h +install-includes: HsXlib.h, + XlibExtras.h +extra-tmp-files: include/X11_extras_config.h X11.buildinfo config.log config.status autom4te.cache hunk ./cbits/XUtils.c 1 +#include +#include +#include +#include +#include +#include + +int x11_extras_xerror(Display *dpy, XErrorEvent *ee) { + char buffer[1000]; + + XGetErrorText(dpy,ee->error_code,buffer,1000); + + if(ee->error_code == BadWindow + || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch) + || (ee->request_code == X_ConfigureWindow && ee->error_code == BadMatch) + || (ee->request_code == X_GrabKey && ee->error_code == BadAccess)) + return 0; + + fprintf(stderr, "xmonad: X11 error: %s, request code=%d, error code=%d\n", + buffer, ee->request_code, ee->error_code); + + return 0; +} + +void x11_extras_set_error_handler() { + XSetErrorHandler(x11_extras_xerror); +} + +/* bloody macros */ +int x11_extras_IsCursorKey(KeySym keysym) { + return IsCursorKey(keysym); +} +int x11_extras_IsFunctionKey(KeySym keysym) { + return IsFunctionKey(keysym); +} +int x11_extras_IsKeypadKey(KeySym keysym) { + return IsKeypadKey(keysym); +} +int x11_extras_IsMiscFunctionKey(KeySym keysym) { + return IsMiscFunctionKey(keysym); +} +int x11_extras_IsModifierKey(KeySym keysym) { + return IsModifierKey(keysym); +} +int x11_extras_IsPFKey(KeySym keysym) { + return IsPFKey(keysym); +} +int x11_extras_IsPrivateKeypadKey(KeySym keysym) { + return IsPrivateKeypadKey(keysym); +} hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.2.2], [libraries@haskell.org], [X11]) +AC_INIT([Haskell X11 package], [1.3.0], [dons@galois.com], [X11]) hunk ./configure.ac 12 -AC_CONFIG_HEADERS([include/HsX11Config.h]) +AC_CONFIG_HEADERS([include/HsX11Config.h include/X11_extras_config.h]) hunk ./configure.ac 25 +# If there's some oddball X11 include path, we need it to check there for +# Xinerama headers. +if test -n "$x_includes"; then + CPPFLAGS="$CPPFLAGS -I $x_includes" +fi + hunk ./configure.ac 55 + +AC_MSG_CHECKING([whether to build Xinerama]) +AC_ARG_WITH(xinerama, + AS_HELP_STRING([--without-xinerama], [do not build Xinerama support]), + want_xinerama=no, + want_xinerama=yes) +AC_MSG_RESULT([$want_xinerama]) + +if test "$want_xinerama" = yes; then + AC_CHECK_HEADERS([X11/extensions/Xinerama.h], [have_xinerama=yes]) + if test "$have_xinerama" = yes; then + EXTRA_LIBRARIES="extra-libraries: Xinerama Xext" + else + EXTRA_LIBRARIES="" + echo "WARNING: Xinerama headers not found. Building without Xinerama support" + fi +else + EXTRA_LIBRARIES="" + echo "WARNING: Building without Xinerama support per user request" +fi + +AC_SUBST([EXTRA_LIBRARIES]) + hunk ./include/HsX11Config.h.in 1 +/* include/HsX11Config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_X11_EXTENSIONS_XINERAMA_H + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* C flags for X11, as a list of string literals. */ +#undef X_CFLAGS + +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING + +/* Library flags for X11, as a list of string literals. */ +#undef X_LIBS hunk ./include/X11_extras_config.h.in 1 +/* include/X11_extras_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_X11_EXTENSIONS_XINERAMA_H + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING hunk ./include/XlibExtras.h 1 +/* This file copied from the X11 package */ + +/* ----------------------------------------------------------------------------- + * Definitions for package `X11' which are visible in Haskell land. + * ---------------------------------------------------------------------------* + */ + +#ifndef XLIBEXTRAS_H +#define XLIBEXTRAS_H +#include +/* This doesn't always work, so we play safe below... */ +#define XUTIL_DEFINE_FUNCTIONS +#include +#include +#include +#include +#include +#include + +/* Xutil.h overrides some functions with macros. + * In recent versions of X this can be turned off with + * #define XUTIL_DEFINE_FUNCTIONS + * before the #include, but this doesn't work with older versions. + * As a workaround, we undef the macros here. Note that this is only + * safe for functions with return type int. + */ +#undef XDestroyImage +#undef XGetPixel +#undef XPutPixel +#undef XSubImage +#undef XAddPixel +#define XK_MISCELLANY +#define XK_LATIN1 +#include +#endif + +void x11_extras_set_error_handler(); +int x11_extras_IsCursorKey(KeySym keysym); +int x11_extras_IsFunctionKey(KeySym keysym); +int x11_extras_IsKeypadKey(KeySym keysym); +int x11_extras_IsMiscFunctionKey(KeySym keysym); +int x11_extras_IsModifierKey(KeySym keysym); +int x11_extras_IsPFKey(KeySym keysym); +int x11_extras_IsPrivateKeypadKey(KeySym keysym); hunk ./X11.cabal 21 + include/X11_extras_config.h hunk ./X11.cabal 56 -extra-tmp-files: include/X11_extras_config.h X11.buildinfo config.log config.status autom4te.cache hunk ./X11.cabal 17 - include/HsXlib.h + include/HsXlib.h include/XlibExtras.h include/X11_extras_config.h.in hunk ./X11.cabal 46 -extra-source-files: - include/XlibExtras.h - include/X11_extras_config.h.in - configure.ac - configure - X11.buildinfo.in hunk ./X11.cabal 48 -install-includes: HsXlib.h, - XlibExtras.h +install-includes: HsXlib.h, XlibExtras.h hunk ./README 6 + + +If you are building from a source tarball, you can just use the standard cabal +installation stanza: + + runhaskell Setup.lhs configure --prefix=$USER + runhaskell Setup.lhs build + runhaskell Setup.lhs install --user + +Xinerama support is enabled by default if Xinerama headers are detected. To +disable Xinerama support, add the '--without-xinerama' flag to configure: + + runhaskell Setup.lhs configure --prefix=$USER --without-xinerama + +However, if you are building from darcs, X11 uses autoconf, so you need +to have autoconf installed and run autoconf/autoheader before building: + + autoconf + autoheader + +or + + autoreconf + hunk ./Graphics/X11/Xlib/Extras.hsc 1296 -foreign import ccall unsafe "Xutils.h XGetWMHints" +foreign import ccall unsafe "Xutil.h XGetWMHints" hunk ./Graphics/X11/Xlib/Extras.hsc 1302 -foreign import ccall unsafe "Xutils.h XAllocWMHints" +foreign import ccall unsafe "Xutil.h XAllocWMHints" hunk ./Graphics/X11/Xlib/Extras.hsc 1305 -foreign import ccall unsafe "Xutils.h XSetWMHints" +foreign import ccall unsafe "Xutil.h XSetWMHints" hunk ./README 11 - runhaskell Setup.lhs configure --prefix=$USER - runhaskell Setup.lhs build - runhaskell Setup.lhs install --user + runhaskell Setup.hs configure --prefix=$USER + runhaskell Setup.hs build + runhaskell Setup.hs install --user hunk ./README 18 - runhaskell Setup.lhs configure --prefix=$USER --without-xinerama + runhaskell Setup.hs configure --prefix=$USER --without-xinerama hunk ./Graphics/X11/Xlib/Extras.hsc 1296 -foreign import ccall unsafe "Xutil.h XGetWMHints" +foreign import ccall unsafe "XlibExtras.h XGetWMHints" hunk ./Graphics/X11/Xlib/Extras.hsc 1302 -foreign import ccall unsafe "Xutil.h XAllocWMHints" +foreign import ccall unsafe "XlibExtras.h XAllocWMHints" hunk ./Graphics/X11/Xlib/Extras.hsc 1305 -foreign import ccall unsafe "Xutil.h XSetWMHints" +foreign import ccall unsafe "XlibExtras.h XSetWMHints" hunk ./Graphics/X11/Xlib/Event.hsc 83 - , queuedAlready = QueuedAlready - , queuedAfterFlush = QueuedAfterFlush - , queuedAfterReading = QueuedAfterReading + , queuedAlready = QueuedAlready + , queuedAfterFlush = QueuedAfterFlush + , queuedAfterReading = QueuedAfterReading hunk ./Graphics/X11/Xlib/Event.hsc 101 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Event.hsc 103 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Event.hsc 123 - ( Window -- root window that the event occured on - , Window -- child window - , Time -- milliseconds - , CInt -- pointer x, y coordinates in event window - , CInt -- - , CInt -- coordinates relative to root - , CInt -- - , Modifier -- key or button mask - , KeyCode -- detail - , Bool -- same screen flag - ) + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , CInt -- pointer x, y coordinates in event window + , CInt -- + , CInt -- coordinates relative to root + , CInt -- + , Modifier -- key or button mask + , KeyCode -- detail + , Bool -- same screen flag + ) hunk ./Graphics/X11/Xlib/Event.hsc 137 - root <- #{peek XKeyEvent,root} p - subwindow <- #{peek XKeyEvent,subwindow} p - time <- #{peek XKeyEvent,time} p - x <- #{peek XKeyEvent,x} p - y <- #{peek XKeyEvent,y} p - x_root <- #{peek XKeyEvent,x_root} p - y_root <- #{peek XKeyEvent,y_root} p - state <- #{peek XKeyEvent,state} p - keycode <- #{peek XKeyEvent,keycode} p - same_screen <- #{peek XKeyEvent,same_screen} p - return (root, subwindow, time, x, y, x_root, y_root, - state, keycode, same_screen) + root <- #{peek XKeyEvent,root} p + subwindow <- #{peek XKeyEvent,subwindow} p + time <- #{peek XKeyEvent,time} p + x <- #{peek XKeyEvent,x} p + y <- #{peek XKeyEvent,y} p + x_root <- #{peek XKeyEvent,x_root} p + y_root <- #{peek XKeyEvent,y_root} p + state <- #{peek XKeyEvent,state} p + keycode <- #{peek XKeyEvent,keycode} p + same_screen <- #{peek XKeyEvent,same_screen} p + return (root, subwindow, time, x, y, x_root, y_root, + state, keycode, same_screen) hunk ./Graphics/X11/Xlib/Event.hsc 159 - ( Window -- root window that the event occured on - , Window -- child window - , Time -- milliseconds - , CInt -- pointer x, y coordinates in event window - , CInt - , CInt -- coordinates relative to root - , CInt - , Modifier -- key or button mask - , Button -- detail - , Bool -- same screen flag - ) + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , CInt -- pointer x, y coordinates in event window + , CInt + , CInt -- coordinates relative to root + , CInt + , Modifier -- key or button mask + , Button -- detail + , Bool -- same screen flag + ) hunk ./Graphics/X11/Xlib/Event.hsc 173 - root <- #{peek XButtonEvent,root} p - subwindow <- #{peek XButtonEvent,subwindow} p - time <- #{peek XButtonEvent,time} p - x <- #{peek XButtonEvent,x} p - y <- #{peek XButtonEvent,y} p - x_root <- #{peek XButtonEvent,x_root} p - y_root <- #{peek XButtonEvent,y_root} p - state <- #{peek XButtonEvent,state} p - button <- #{peek XButtonEvent,button} p - same_screen <- #{peek XButtonEvent,same_screen} p - return (root, subwindow, time, x, y, x_root, y_root, - state, button, same_screen) + root <- #{peek XButtonEvent,root} p + subwindow <- #{peek XButtonEvent,subwindow} p + time <- #{peek XButtonEvent,time} p + x <- #{peek XButtonEvent,x} p + y <- #{peek XButtonEvent,y} p + x_root <- #{peek XButtonEvent,x_root} p + y_root <- #{peek XButtonEvent,y_root} p + state <- #{peek XButtonEvent,state} p + button <- #{peek XButtonEvent,button} p + same_screen <- #{peek XButtonEvent,same_screen} p + return (root, subwindow, time, x, y, x_root, y_root, + state, button, same_screen) hunk ./Graphics/X11/Xlib/Event.hsc 190 - ( Window -- root window that the event occured on - , Window -- child window - , Time -- milliseconds - , CInt -- pointer x, y coordinates in event window - , CInt - , CInt -- coordinates relative to root - , CInt - , Modifier -- key or button mask - , NotifyMode -- detail - , Bool -- same screen flag - ) + ( Window -- root window that the event occured on + , Window -- child window + , Time -- milliseconds + , CInt -- pointer x, y coordinates in event window + , CInt + , CInt -- coordinates relative to root + , CInt + , Modifier -- key or button mask + , NotifyMode -- detail + , Bool -- same screen flag + ) hunk ./Graphics/X11/Xlib/Event.hsc 204 - root <- #{peek XMotionEvent,root} p - subwindow <- #{peek XMotionEvent,subwindow} p - time <- #{peek XMotionEvent,time} p - x <- #{peek XMotionEvent,x} p - y <- #{peek XMotionEvent,y} p - x_root <- #{peek XMotionEvent,x_root} p - y_root <- #{peek XMotionEvent,y_root} p - state <- #{peek XMotionEvent,state} p - is_hint <- #{peek XMotionEvent,is_hint} p - same_screen <- #{peek XMotionEvent,same_screen} p - return (root, subwindow, time, x, y, x_root, y_root, - state, is_hint, same_screen) + root <- #{peek XMotionEvent,root} p + subwindow <- #{peek XMotionEvent,subwindow} p + time <- #{peek XMotionEvent,time} p + x <- #{peek XMotionEvent,x} p + y <- #{peek XMotionEvent,y} p + x_root <- #{peek XMotionEvent,x_root} p + y_root <- #{peek XMotionEvent,y_root} p + state <- #{peek XMotionEvent,state} p + is_hint <- #{peek XMotionEvent,is_hint} p + same_screen <- #{peek XMotionEvent,same_screen} p + return (root, subwindow, time, x, y, x_root, y_root, + state, is_hint, same_screen) hunk ./Graphics/X11/Xlib/Event.hsc 221 --- Window : root # root window that the event occured on --- Window : subwindow # child window --- Time : time # milliseconds --- Int : x # pointer x, y coordinates in event window +-- Window : root # root window that the event occured on +-- Window : subwindow # child window +-- Time : time # milliseconds +-- Int : x # pointer x, y coordinates in event window hunk ./Graphics/X11/Xlib/Event.hsc 226 --- Int : x_root # coordinates relative to root +-- Int : x_root # coordinates relative to root hunk ./Graphics/X11/Xlib/Event.hsc 230 --- Bool : same_screen # same screen flag --- Bool : focus # boolean focus --- Modifier : state # key or button mask +-- Bool : same_screen # same screen flag +-- Bool : focus # boolean focus +-- Modifier : state # key or button mask hunk ./Graphics/X11/Xlib/Event.hsc 239 --- -- PURE void getKeymapEvent(event) --- -- IN XEvent* event --- -- OUT Window window = ((XKeymapEvent*)event)->window --- -- OUT array[32] Char key_vector = ((XKeymapEvent*)event)->key_vector +-- -- PURE void getKeymapEvent(event) +-- -- IN XEvent* event +-- -- OUT Window window = ((XKeymapEvent*)event)->window +-- -- OUT array[32] Char key_vector = ((XKeymapEvent*)event)->key_vector hunk ./Graphics/X11/Xlib/Event.hsc 246 - ( Position -- x - , Position -- y - , Dimension -- width - , Dimension -- height - , CInt -- count - ) + ( Position -- x + , Position -- y + , Dimension -- width + , Dimension -- height + , CInt -- count + ) hunk ./Graphics/X11/Xlib/Event.hsc 255 - x <- #{peek XExposeEvent,x} p - y <- #{peek XExposeEvent,y} p - width <- #{peek XExposeEvent,width} p - height <- #{peek XExposeEvent,height} p - count <- #{peek XExposeEvent,count} p - return (x, y, width, height, count) + x <- #{peek XExposeEvent,x} p + y <- #{peek XExposeEvent,y} p + width <- #{peek XExposeEvent,width} p + height <- #{peek XExposeEvent,height} p + count <- #{peek XExposeEvent,count} p + return (x, y, width, height, count) hunk ./Graphics/X11/Xlib/Event.hsc 266 --- Position : x --- Position : y --- Dimension : width . --- Dimension : height --- Int : count --- Int : major_code --- Int : minor_code +-- Position : x +-- Position : y +-- Dimension : width . +-- Dimension : height +-- Int : count +-- Int : major_code +-- Int : minor_code hunk ./Graphics/X11/Xlib/Event.hsc 275 --- Window : window --- Place : place +-- Window : window +-- Place : place hunk ./Graphics/X11/Xlib/Event.hsc 279 --- Window : window --- Position : x --- Position : y --- Dimension : width --- Dimension : height --- Dimension : border_width --- Window : above --- Bool : override_redirect +-- Window : window +-- Position : x +-- Position : y +-- Dimension : width +-- Dimension : height +-- Dimension : border_width +-- Window : above +-- Bool : override_redirect hunk ./Graphics/X11/Xlib/Event.hsc 289 --- Window : window --- Position : x --- Position : y --- Dimension : width --- Dimension : height --- Dimension : border_width --- Bool : override_redirect +-- Window : window +-- Position : x +-- Position : y +-- Dimension : width +-- Dimension : height +-- Dimension : border_width +-- Bool : override_redirect hunk ./Graphics/X11/Xlib/Event.hsc 298 --- Window : window +-- Window : window hunk ./Graphics/X11/Xlib/Event.hsc 301 --- Window : window --- Position : x --- Position : y +-- Window : window +-- Position : x +-- Position : y hunk ./Graphics/X11/Xlib/Event.hsc 306 --- Bool : override_redirect +-- Bool : override_redirect hunk ./Graphics/X11/Xlib/Event.hsc 309 - ( MappingRequest -- request - , KeyCode -- first_keycode - , CInt -- count - ) + ( MappingRequest -- request + , KeyCode -- first_keycode + , CInt -- count + ) hunk ./Graphics/X11/Xlib/Event.hsc 316 - allocaBytes #{size XMappingEvent} $ \ event_map_ptr -> do - pokeXMappingEvent event_map_ptr event_map - f event_map_ptr + allocaBytes #{size XMappingEvent} $ \ event_map_ptr -> do + pokeXMappingEvent event_map_ptr event_map + f event_map_ptr hunk ./Graphics/X11/Xlib/Event.hsc 322 - #{poke XMappingEvent,request} p request - #{poke XMappingEvent,first_keycode} p first_keycode - #{poke XMappingEvent,count} p count + #{poke XMappingEvent,request} p request + #{poke XMappingEvent,first_keycode} p first_keycode + #{poke XMappingEvent,count} p count hunk ./Graphics/X11/Xlib/Event.hsc 327 - ( Position - , Position - , Dimension - , Dimension - ) + ( Position + , Position + , Dimension + , Dimension + ) hunk ./Graphics/X11/Xlib/Event.hsc 335 - x <- #{peek XConfigureEvent,x} p - y <- #{peek XConfigureEvent,y} p - width <- #{peek XConfigureEvent,width} p - height <- #{peek XConfigureEvent,height} p - return (x, y, width, height) + x <- #{peek XConfigureEvent,x} p + y <- #{peek XConfigureEvent,y} p + width <- #{peek XConfigureEvent,width} p + height <- #{peek XConfigureEvent,height} p + return (x, y, width, height) hunk ./Graphics/X11/Xlib/Event.hsc 345 --- Dimension : width --- Dimension : height +-- Dimension : width +-- Dimension : height hunk ./Graphics/X11/Xlib/Event.hsc 350 --- Window : window --- Window : parent --- Position : x --- Position : y --- Bool : override_redirect +-- Window : window +-- Window : parent +-- Position : x +-- Position : y +-- Bool : override_redirect hunk ./Graphics/X11/Xlib/Event.hsc 357 --- Window : window --- Bool : from_configure +-- Window : window +-- Bool : from_configure hunk ./Graphics/X11/Xlib/Event.hsc 361 --- Visibility : state +-- Visibility : state hunk ./Graphics/X11/Xlib/Event.hsc 364 --- Place : place +-- Place : place hunk ./Graphics/X11/Xlib/Event.hsc 368 --- -- Window : window --- -- Position : x --- -- Position : y --- -- Dimension : width --- -- Dimension : height --- -- Dimension : border_width --- -- Window : above +-- -- Window : window +-- -- Position : x +-- -- Position : y +-- -- Dimension : width +-- -- Dimension : height +-- -- Dimension : border_width +-- -- Window : above hunk ./Graphics/X11/Xlib/Event.hsc 376 --- -- ??? : valuemask +-- -- ??? : valuemask hunk ./Graphics/X11/Xlib/Event.hsc 379 --- Window : window +-- Window : window hunk ./Graphics/X11/Xlib/Event.hsc 382 --- Colormap : colormap --- Bool : new --- ColormapNotification : state +-- Colormap : colormap +-- Bool : new +-- ColormapNotification : state hunk ./Graphics/X11/Xlib/Event.hsc 400 - with (TimeVal (usecs `div` 1000000) (usecs `mod` 1000000)) $ \ tv_ptr -> - allocaBytes #{size fd_set} $ \ readfds -> - allocaBytes #{size fd_set} $ \ nofds -> do - let fd = connectionNumber display - fdZero readfds - fdZero nofds - fdSet (fromIntegral fd) readfds - n <- select ((fromIntegral fd)+1) readfds nofds nofds tv_ptr - return (n == 0) + with (TimeVal (usecs `div` 1000000) (usecs `mod` 1000000)) $ \ tv_ptr -> + allocaBytes #{size fd_set} $ \ readfds -> + allocaBytes #{size fd_set} $ \ nofds -> do + let fd = connectionNumber display + fdZero readfds + fdZero nofds + fdSet (fromIntegral fd) readfds + n <- select ((fromIntegral fd)+1) readfds nofds nofds tv_ptr + return (n == 0) hunk ./Graphics/X11/Xlib/Event.hsc 412 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Event.hsc 414 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Event.hsc 421 - CInt -> Ptr FdSet -> Ptr FdSet -> Ptr FdSet -> Ptr TimeVal -> IO CInt + CInt -> Ptr FdSet -> Ptr FdSet -> Ptr FdSet -> Ptr TimeVal -> IO CInt hunk ./Graphics/X11/Xlib/Event.hsc 426 - alloca $ \ tv_ptr -> do - rc <- gettimeofday tv_ptr nullPtr - TimeVal sec usec <- peek tv_ptr - return (toInteger sec * 1000 + toInteger usec `div` 1000) + alloca $ \ tv_ptr -> do + _rc <- gettimeofday tv_ptr nullPtr + TimeVal sec usec <- peek tv_ptr + return (toInteger sec * 1000 + toInteger usec `div` 1000) hunk ./Graphics/X11/Xlib/Event.hsc 434 - alignment _ = #{size int} - sizeOf _ = #{size struct timeval} - peek p = do - sec <- #{peek struct timeval,tv_sec} p - usec <- #{peek struct timeval,tv_usec} p - return (TimeVal sec usec) - poke p (TimeVal sec usec) = do - #{poke struct timeval,tv_sec} p sec - #{poke struct timeval,tv_usec} p usec + alignment _ = #{size int} + sizeOf _ = #{size struct timeval} + peek p = do + sec <- #{peek struct timeval,tv_sec} p + usec <- #{peek struct timeval,tv_usec} p + return (TimeVal sec usec) + poke p (TimeVal sec usec) = do + #{poke struct timeval,tv_sec} p sec + #{poke struct timeval,tv_usec} p usec hunk ./Graphics/X11/Xlib/Event.hsc 446 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Event.hsc 448 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Event.hsc 452 - gettimeofday :: Ptr TimeVal -> Ptr TimeZone -> IO () + gettimeofday :: Ptr TimeVal -> Ptr TimeZone -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 456 - flush :: Display -> IO () + flush :: Display -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 460 - sync :: Display -> Bool -> IO () + sync :: Display -> Bool -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 464 - pending :: Display -> IO CInt + pending :: Display -> IO CInt hunk ./Graphics/X11/Xlib/Event.hsc 468 - eventsQueued :: Display -> QueuedMode -> IO CInt + eventsQueued :: Display -> QueuedMode -> IO CInt hunk ./Graphics/X11/Xlib/Event.hsc 472 - nextEvent :: Display -> XEventPtr -> IO () + nextEvent :: Display -> XEventPtr -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 476 - allowEvents :: Display -> AllowEvents -> Time -> IO () + allowEvents :: Display -> AllowEvents -> Time -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 484 - selectInput :: Display -> Window -> EventMask -> IO () + selectInput :: Display -> Window -> EventMask -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 489 - throwIfZero "sendEvent" $ - xSendEvent display w propagate event_mask event_send + throwIfZero "sendEvent" $ + xSendEvent display w propagate event_mask event_send hunk ./Graphics/X11/Xlib/Event.hsc 492 - xSendEvent :: Display -> Window -> Bool -> EventMask -> - XEventPtr -> IO Status + xSendEvent :: Display -> Window -> Bool -> EventMask -> + XEventPtr -> IO Status hunk ./Graphics/X11/Xlib/Event.hsc 497 - windowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO () + windowEvent :: Display -> Window -> EventMask -> XEventPtr -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 501 - checkWindowEvent :: Display -> Window -> EventMask -> - XEventPtr -> IO Bool + checkWindowEvent :: Display -> Window -> EventMask -> + XEventPtr -> IO Bool hunk ./Graphics/X11/Xlib/Event.hsc 506 - maskEvent :: Display -> EventMask -> XEventPtr -> IO () + maskEvent :: Display -> EventMask -> XEventPtr -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 510 - checkMaskEvent :: Display -> EventMask -> XEventPtr -> IO Bool + checkMaskEvent :: Display -> EventMask -> XEventPtr -> IO Bool hunk ./Graphics/X11/Xlib/Event.hsc 514 - checkTypedEvent :: Display -> EventType -> XEventPtr -> IO Bool + checkTypedEvent :: Display -> EventType -> XEventPtr -> IO Bool hunk ./Graphics/X11/Xlib/Event.hsc 518 - checkTypedWindowEvent :: Display -> Window -> EventType -> - XEventPtr -> IO Bool + checkTypedWindowEvent :: Display -> Window -> EventType -> + XEventPtr -> IO Bool hunk ./Graphics/X11/Xlib/Event.hsc 523 - putBackEvent :: Display -> XEventPtr -> IO () + putBackEvent :: Display -> XEventPtr -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 527 - peekEvent :: Display -> XEventPtr -> IO () + peekEvent :: Display -> XEventPtr -> IO () hunk ./Graphics/X11/Xlib/Event.hsc 537 - withXMappingEvent event_map $ \ event_map_ptr -> - xRefreshKeyboardMapping event_map_ptr + withXMappingEvent event_map $ \ event_map_ptr -> + xRefreshKeyboardMapping event_map_ptr hunk ./Graphics/X11/Xlib/Event.hsc 540 - xRefreshKeyboardMapping :: Ptr XMappingEvent -> IO () + xRefreshKeyboardMapping :: Ptr XMappingEvent -> IO () hunk ./Graphics/X11/Xlib/Image.hs 16 - Image, + Image, hunk ./Graphics/X11/Xlib/Image.hs 26 -import Foreign.C +-- import Foreign.C hunk ./Graphics/X11/Xlib/Misc.hsc 42 - -- * Error reporting + -- * Error reporting hunk ./Graphics/X11/Xlib/Misc.hsc 46 - -- * Geometry + -- * Geometry hunk ./Graphics/X11/Xlib/Misc.hsc 50 - -- * Locale + -- * Locale hunk ./Graphics/X11/Xlib/Misc.hsc 54 - -- * Screen saver + -- * Screen saver hunk ./Graphics/X11/Xlib/Misc.hsc 72 - -- * Pointer + -- * Pointer hunk ./Graphics/X11/Xlib/Misc.hsc 81 - -- * Pixmaps + -- * Pixmaps hunk ./Graphics/X11/Xlib/Misc.hsc 88 - -- * Keycodes + -- * Keycodes hunk ./Graphics/X11/Xlib/Misc.hsc 98 - -- * Icons + -- * Icons hunk ./Graphics/X11/Xlib/Misc.hsc 102 - -- * Cursors + -- * Cursors hunk ./Graphics/X11/Xlib/Misc.hsc 111 - -- * Window manager stuff + -- * Window manager stuff hunk ./Graphics/X11/Xlib/Misc.hsc 114 - -- * Set window attributes + -- * Set window attributes hunk ./Graphics/X11/Xlib/Misc.hsc 132 - -- * Drawing + -- * Drawing hunk ./Graphics/X11/Xlib/Misc.hsc 152 - -- * Cut and paste buffers + -- * Cut and paste buffers hunk ./Graphics/X11/Xlib/Misc.hsc 159 - -- * Window properties + -- * Window properties hunk ./Graphics/X11/Xlib/Misc.hsc 184 - rmInitialize :: IO () + rmInitialize :: IO () hunk ./Graphics/X11/Xlib/Misc.hsc 190 - autoRepeatOff :: Display -> IO () + autoRepeatOff :: Display -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 194 - autoRepeatOn :: Display -> IO () + autoRepeatOn :: Display -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 198 - bell :: Display -> CInt -> IO () + bell :: Display -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 202 - setCloseDownMode :: Display -> CloseDownMode -> IO () + setCloseDownMode :: Display -> CloseDownMode -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 206 - lastKnownRequestProcessed :: Display -> IO CInt + lastKnownRequestProcessed :: Display -> IO CInt hunk ./Graphics/X11/Xlib/Misc.hsc 211 - alloca $ \ focus_return -> - alloca $ \ revert_to_return -> do - xGetInputFocus display focus_return revert_to_return - focus <- peek focus_return - revert_to <- peek revert_to_return - return (focus, revert_to) + alloca $ \ focus_return -> + alloca $ \ revert_to_return -> do + xGetInputFocus display focus_return revert_to_return + focus <- peek focus_return + revert_to <- peek revert_to_return + return (focus, revert_to) hunk ./Graphics/X11/Xlib/Misc.hsc 218 - xGetInputFocus :: Display -> Ptr Window -> Ptr FocusMode -> IO () + xGetInputFocus :: Display -> Ptr Window -> Ptr FocusMode -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 222 - setInputFocus :: Display -> Window -> FocusMode -> Time -> IO () + setInputFocus :: Display -> Window -> FocusMode -> Time -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 234 - grabButton :: Display -> Button -> ButtonMask -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> IO () + grabButton :: Display -> Button -> ButtonMask -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 238 - ungrabButton :: Display -> Button -> ButtonMask -> Window -> IO () + ungrabButton :: Display -> Button -> ButtonMask -> Window -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 242 - grabPointer :: Display -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> Time -> IO GrabStatus + grabPointer :: Display -> Window -> Bool -> EventMask -> GrabMode -> GrabMode -> Window -> Cursor -> Time -> IO GrabStatus hunk ./Graphics/X11/Xlib/Misc.hsc 246 - ungrabPointer :: Display -> Time -> IO () + ungrabPointer :: Display -> Time -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 250 - grabKey :: Display -> KeyCode -> ButtonMask -> Window -> Bool -> GrabMode -> GrabMode -> IO () + grabKey :: Display -> KeyCode -> ButtonMask -> Window -> Bool -> GrabMode -> GrabMode -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 254 - ungrabKey :: Display -> KeyCode -> ButtonMask -> Window -> IO () + ungrabKey :: Display -> KeyCode -> ButtonMask -> Window -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 258 - grabKeyboard :: Display -> Window -> Bool -> GrabMode -> GrabMode -> Time -> IO GrabStatus + grabKeyboard :: Display -> Window -> Bool -> GrabMode -> GrabMode -> Time -> IO GrabStatus hunk ./Graphics/X11/Xlib/Misc.hsc 262 - ungrabKeyboard :: Display -> Time -> IO () + ungrabKeyboard :: Display -> Time -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 266 - grabServer :: Display -> IO () + grabServer :: Display -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 270 - ungrabServer :: Display -> IO () + ungrabServer :: Display -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 281 - IO (Dimension, Dimension) + IO (Dimension, Dimension) hunk ./Graphics/X11/Xlib/Misc.hsc 283 - outParameters2 (throwIfZero "queryBestTile") $ - xQueryBestTile display which_screen width height + outParameters2 (throwIfZero "queryBestTile") $ + xQueryBestTile display which_screen width height hunk ./Graphics/X11/Xlib/Misc.hsc 286 - xQueryBestTile :: Display -> Drawable -> Dimension -> Dimension -> - Ptr Dimension -> Ptr Dimension -> IO Status + xQueryBestTile :: Display -> Drawable -> Dimension -> Dimension -> + Ptr Dimension -> Ptr Dimension -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 291 - IO (Dimension, Dimension) + IO (Dimension, Dimension) hunk ./Graphics/X11/Xlib/Misc.hsc 293 - outParameters2 (throwIfZero "queryBestStipple") $ - xQueryBestStipple display which_screen width height + outParameters2 (throwIfZero "queryBestStipple") $ + xQueryBestStipple display which_screen width height hunk ./Graphics/X11/Xlib/Misc.hsc 296 - xQueryBestStipple :: Display -> Drawable -> Dimension -> Dimension -> - Ptr Dimension -> Ptr Dimension -> IO Status + xQueryBestStipple :: Display -> Drawable -> Dimension -> Dimension -> + Ptr Dimension -> Ptr Dimension -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 301 - IO (Dimension, Dimension) + IO (Dimension, Dimension) hunk ./Graphics/X11/Xlib/Misc.hsc 303 - outParameters2 (throwIfZero "queryBestCursor") $ - xQueryBestCursor display d width height + outParameters2 (throwIfZero "queryBestCursor") $ + xQueryBestCursor display d width height hunk ./Graphics/X11/Xlib/Misc.hsc 306 - xQueryBestCursor :: Display -> Drawable -> Dimension -> Dimension -> - Ptr Dimension -> Ptr Dimension -> IO Status + xQueryBestCursor :: Display -> Drawable -> Dimension -> Dimension -> + Ptr Dimension -> Ptr Dimension -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 311 - Dimension -> Dimension -> IO (Dimension, Dimension) + Dimension -> Dimension -> IO (Dimension, Dimension) hunk ./Graphics/X11/Xlib/Misc.hsc 313 - outParameters2 (throwIfZero "queryBestSize") $ - xQueryBestSize display shape_class which_screen width height + outParameters2 (throwIfZero "queryBestSize") $ + xQueryBestSize display shape_class which_screen width height hunk ./Graphics/X11/Xlib/Misc.hsc 316 - xQueryBestSize :: Display -> QueryBestSizeClass -> Drawable -> - Dimension -> Dimension -> - Ptr Dimension -> Ptr Dimension -> IO Status + xQueryBestSize :: Display -> QueryBestSizeClass -> Drawable -> + Dimension -> Dimension -> + Ptr Dimension -> Ptr Dimension -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 325 - IO (Bool, Window, Window, CInt, CInt, CInt, CInt, Modifier) + IO (Bool, Window, Window, CInt, CInt, CInt, CInt, Modifier) hunk ./Graphics/X11/Xlib/Misc.hsc 327 - alloca $ \ root_return -> - alloca $ \ child_return -> - alloca $ \ root_x_return -> - alloca $ \ root_y_return -> - alloca $ \ win_x_return -> - alloca $ \ win_y_return -> - alloca $ \ mask_return -> do - rel <- xQueryPointer display w root_return child_return root_x_return - root_y_return win_x_return win_y_return mask_return - root <- peek root_return - child <- peek child_return - root_x <- peek root_x_return - root_y <- peek root_y_return - win_x <- peek win_x_return - win_y <- peek win_y_return - mask <- peek mask_return - return (rel, root, child, root_x, root_y, win_x, win_y, mask) + alloca $ \ root_return -> + alloca $ \ child_return -> + alloca $ \ root_x_return -> + alloca $ \ root_y_return -> + alloca $ \ win_x_return -> + alloca $ \ win_y_return -> + alloca $ \ mask_return -> do + rel <- xQueryPointer display w root_return child_return root_x_return + root_y_return win_x_return win_y_return mask_return + root <- peek root_return + child <- peek child_return + root_x <- peek root_x_return + root_y <- peek root_y_return + win_x <- peek win_x_return + win_y <- peek win_y_return + mask <- peek mask_return + return (rel, root, child, root_x, root_y, win_x, win_y, mask) hunk ./Graphics/X11/Xlib/Misc.hsc 345 - xQueryPointer :: Display -> Window -> - Ptr Window -> Ptr Window -> Ptr CInt -> Ptr CInt -> - Ptr CInt -> Ptr CInt -> Ptr Modifier -> IO Bool + xQueryPointer :: Display -> Window -> + Ptr Window -> Ptr Window -> Ptr CInt -> Ptr CInt -> + Ptr CInt -> Ptr CInt -> Ptr Modifier -> IO Bool hunk ./Graphics/X11/Xlib/Misc.hsc 373 - withCString str $ \ c_str -> do - c_name <- xDisplayName c_str - peekCString c_name + withCString str $ \ c_str -> do + c_name <- xDisplayName c_str + peekCString c_name hunk ./Graphics/X11/Xlib/Misc.hsc 377 - xDisplayName :: CString -> IO CString + xDisplayName :: CString -> IO CString hunk ./Graphics/X11/Xlib/Misc.hsc 395 --- % hugs->putStablePtr(ioErrorHandlerPtr); --- % hugs->putAddr(d); --- % if (hugs->runIO(1)) { /* exitWith value returned */ --- % return hugs->getInt(); --- % } else { --- % return hugs->getWord(); --- % } +-- % hugs->putStablePtr(ioErrorHandlerPtr); +-- % hugs->putAddr(d); +-- % if (hugs->runIO(1)) { /* exitWith value returned */ +-- % return hugs->getInt(); +-- % } else { +-- % return hugs->getWord(); +-- % } hunk ./Graphics/X11/Xlib/Misc.hsc 421 --- % hugs->putStablePtr(ioErrorHandlerPtr); --- % hugs->putAddr(d); --- % if (hugs->runIO(1)) { /* exitWith value returned */ --- % return hugs->getInt(); --- % } else { --- % return hugs->getWord(); --- % } +-- % hugs->putStablePtr(ioErrorHandlerPtr); +-- % hugs->putAddr(d); +-- % if (hugs->runIO(1)) { /* exitWith value returned */ +-- % return hugs->getInt(); +-- % } else { +-- % return hugs->getWord(); +-- % } hunk ./Graphics/X11/Xlib/Misc.hsc 439 --- % char buffer[1000]; --- % XGetErrorText(d,ev->error_code,buffer,1000); --- % printf("Error: %s\n", buffer); --- % return 0; +-- % char buffer[1000]; +-- % XGetErrorText(d,ev->error_code,buffer,1000); +-- % printf("Error: %s\n", buffer); +-- % return 0; hunk ./Graphics/X11/Xlib/Misc.hsc 449 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Misc.hsc 451 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Misc.hsc 457 - defaultErrorHandler :: FunPtr (Display -> Ptr XErrorEvent -> IO CInt) + defaultErrorHandler :: FunPtr (Display -> Ptr XErrorEvent -> IO CInt) hunk ./Graphics/X11/Xlib/Misc.hsc 464 - xSetErrorHandler defaultErrorHandler - return () + xSetErrorHandler defaultErrorHandler + return () hunk ./Graphics/X11/Xlib/Misc.hsc 470 - xSetErrorHandler :: ErrorHandler -> IO ErrorHandler + xSetErrorHandler :: ErrorHandler -> IO ErrorHandler hunk ./Graphics/X11/Xlib/Misc.hsc 481 --- -- IMPURE void XStoreBytes(display, bytes, nbytes) --- -- IN Display* display --- -- VAR Int nbytes --- -- IN list[nbytes] Byte bytes +-- -- IMPURE void XStoreBytes(display, bytes, nbytes) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN list[nbytes] Byte bytes hunk ./Graphics/X11/Xlib/Misc.hsc 486 --- -- IMPURE list[nbytes] Byte XFetchBytes(display, &nbytes) --- -- IN Display* display --- -- VAR Int nbytes +-- -- IMPURE list[nbytes] Byte XFetchBytes(display, &nbytes) +-- -- IN Display* display +-- -- VAR Int nbytes hunk ./Graphics/X11/Xlib/Misc.hsc 490 --- -- IMPURE void XStoreBuffer(display, bytes, nbytes, buffer) --- -- IN Display* display --- -- VAR Int nbytes --- -- IN list[nbytes] Byte bytes --- -- IN Buffer buffer +-- -- IMPURE void XStoreBuffer(display, bytes, nbytes, buffer) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN list[nbytes] Byte bytes +-- -- IN Buffer buffer hunk ./Graphics/X11/Xlib/Misc.hsc 496 --- -- IMPURE list[nbytes] Byte XFetchBuffer(display, &nbytes, buffer) --- -- IN Display* display --- -- VAR Int nbytes --- -- IN Buffer buffer +-- -- IMPURE list[nbytes] Byte XFetchBuffer(display, &nbytes, buffer) +-- -- IN Display* display +-- -- VAR Int nbytes +-- -- IN Buffer buffer hunk ./Graphics/X11/Xlib/Misc.hsc 501 --- -- IMPURE void XRotateBuffers(display, rotate) --- -- IN Display* display --- -- VAR Int rotate +-- -- IMPURE void XRotateBuffers(display, rotate) +-- -- IN Display* display +-- -- VAR Int rotate hunk ./Graphics/X11/Xlib/Misc.hsc 551 - Dimension -> Dimension -> Dimension -> CInt -> CInt -> - IO (CInt, Position, Position, Dimension, Dimension) + Dimension -> Dimension -> Dimension -> CInt -> CInt -> + IO (CInt, Position, Position, Dimension, Dimension) hunk ./Graphics/X11/Xlib/Misc.hsc 554 - bwidth fwidth fheight xadder yadder = - withCString position $ \ c_position -> - withCString default_position $ \ c_default_position -> - alloca $ \ x_return -> - alloca $ \ y_return -> - alloca $ \ width_return -> - alloca $ \ height_return -> do - res <- xGeometry display screen c_position c_default_position - bwidth fwidth fheight xadder yadder - x_return y_return width_return height_return - x <- peek x_return - y <- peek y_return - width <- peek width_return - height <- peek height_return - return (res, x, y, width, height) + bwidth fwidth fheight xadder yadder = + withCString position $ \ c_position -> + withCString default_position $ \ c_default_position -> + alloca $ \ x_return -> + alloca $ \ y_return -> + alloca $ \ width_return -> + alloca $ \ height_return -> do + res <- xGeometry display screen c_position c_default_position + bwidth fwidth fheight xadder yadder + x_return y_return width_return height_return + x <- peek x_return + y <- peek y_return + width <- peek width_return + height <- peek height_return + return (res, x, y, width, height) hunk ./Graphics/X11/Xlib/Misc.hsc 570 - xGeometry :: Display -> CInt -> CString -> CString -> - Dimension -> Dimension -> Dimension -> CInt -> CInt -> - Ptr Position -> Ptr Position -> - Ptr Dimension -> Ptr Dimension -> IO CInt + xGeometry :: Display -> CInt -> CString -> CString -> + Dimension -> Dimension -> Dimension -> CInt -> CInt -> + Ptr Position -> Ptr Position -> + Ptr Dimension -> Ptr Dimension -> IO CInt hunk ./Graphics/X11/Xlib/Misc.hsc 577 - IO (Window, Position, Position, Dimension, Dimension, Dimension, CInt) + IO (Window, Position, Position, Dimension, Dimension, Dimension, CInt) hunk ./Graphics/X11/Xlib/Misc.hsc 579 - outParameters7 (throwIfZero "getGeometry") $ - xGetGeometry display d + outParameters7 (throwIfZero "getGeometry") $ + xGetGeometry display d hunk ./Graphics/X11/Xlib/Misc.hsc 582 - xGetGeometry :: Display -> Drawable -> - Ptr Window -> Ptr Position -> Ptr Position -> Ptr Dimension -> - Ptr Dimension -> Ptr Dimension -> Ptr CInt -> IO Status + xGetGeometry :: Display -> Drawable -> + Ptr Window -> Ptr Position -> Ptr Position -> Ptr Dimension -> + Ptr Dimension -> Ptr Dimension -> Ptr CInt -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 594 - supportsLocale :: IO Bool + supportsLocale :: IO Bool hunk ./Graphics/X11/Xlib/Misc.hsc 599 - withCString mods $ \ modifier_list -> do - c_str <- xSetLocaleModifiers modifier_list - peekCString c_str + withCString mods $ \ modifier_list -> do + c_str <- xSetLocaleModifiers modifier_list + peekCString c_str hunk ./Graphics/X11/Xlib/Misc.hsc 603 - xSetLocaleModifiers :: CString -> IO CString + xSetLocaleModifiers :: CString -> IO CString hunk ./Graphics/X11/Xlib/Misc.hsc 611 - , dontAllowExposures = DontAllowExposures - , allowExposures = AllowExposures - , defaultExposures = DefaultExposures + , dontAllowExposures = DontAllowExposures + , allowExposures = AllowExposures + , defaultExposures = DefaultExposures hunk ./Graphics/X11/Xlib/Misc.hsc 618 - , dontPreferBlanking = DontPreferBlanking - , preferBlanking = PreferBlanking - , defaultBlanking = DefaultBlanking + , dontPreferBlanking = DontPreferBlanking + , preferBlanking = PreferBlanking + , defaultBlanking = DefaultBlanking hunk ./Graphics/X11/Xlib/Misc.hsc 625 - , screenSaverActive = ScreenSaverActive - , screenSaverReset = ScreenSaverReset + , screenSaverActive = ScreenSaverActive + , screenSaverReset = ScreenSaverReset hunk ./Graphics/X11/Xlib/Misc.hsc 630 - IO (CInt, CInt, PreferBlankingMode, AllowExposuresMode) + IO (CInt, CInt, PreferBlankingMode, AllowExposuresMode) hunk ./Graphics/X11/Xlib/Misc.hsc 633 - xGetScreenSaver :: Display -> Ptr CInt -> Ptr CInt -> - Ptr PreferBlankingMode -> Ptr AllowExposuresMode -> IO () + xGetScreenSaver :: Display -> Ptr CInt -> Ptr CInt -> + Ptr PreferBlankingMode -> Ptr AllowExposuresMode -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 638 - setScreenSaver :: Display -> CInt -> CInt -> - PreferBlankingMode -> AllowExposuresMode -> IO () + setScreenSaver :: Display -> CInt -> CInt -> + PreferBlankingMode -> AllowExposuresMode -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 643 - activateScreenSaver :: Display -> IO () + activateScreenSaver :: Display -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 647 - resetScreenSaver :: Display -> IO () + resetScreenSaver :: Display -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 651 - forceScreenSaver :: Display -> ScreenSaverMode -> IO () + forceScreenSaver :: Display -> ScreenSaverMode -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 661 - xGetPointerControl :: Display -> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO () + xGetPointerControl :: Display -> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 665 - warpPointer :: Display -> Window -> Window -> Position -> Position -> - Dimension -> Dimension -> Position -> Position -> IO () + warpPointer :: Display -> Window -> Window -> Position -> Position -> + Dimension -> Dimension -> Position -> Position -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 676 -foreign import ccall unsafe "HsXlib.h XVisualIDFromVisual" - visualIDFromVisual :: Visual -> IO VisualID +--foreign import ccall unsafe "HsXlib.h XVisualIDFromVisual" +-- visualIDFromVisual :: Visual -> IO VisualID hunk ./Graphics/X11/Xlib/Misc.hsc 702 - createPixmap :: Display -> Drawable -> Dimension -> Dimension -> CInt -> IO Pixmap + createPixmap :: Display -> Drawable -> Dimension -> Dimension -> CInt -> IO Pixmap hunk ./Graphics/X11/Xlib/Misc.hsc 706 - freePixmap :: Display -> Pixmap -> IO () + freePixmap :: Display -> Pixmap -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 721 - bitmapBitOrder :: Display -> ByteOrder + bitmapBitOrder :: Display -> ByteOrder hunk ./Graphics/X11/Xlib/Misc.hsc 725 - bitmapUnit :: Display -> CInt + bitmapUnit :: Display -> CInt hunk ./Graphics/X11/Xlib/Misc.hsc 729 - bitmapPad :: Display -> CInt + bitmapPad :: Display -> CInt hunk ./Graphics/X11/Xlib/Misc.hsc 733 --- IMPURE void XWriteBitmapFile(display, filename, bitmap, width, height, x_hot, y_hot) RAISES Either --- RETURNTYPE BitmapFileStatus --- GLOBAL ERROR BitmapFileStatus RETVAL --- IN Display* display --- IN String filename --- IN Pixmap bitmap --- IN Dimension width --- IN Dimension height --- IN Maybe Int x_hot = -1 --- IN Maybe Int y_hot = -1 +-- IMPURE void XWriteBitmapFile(display, filename, bitmap, width, height, x_hot, y_hot) RAISES Either +-- RETURNTYPE BitmapFileStatus +-- GLOBAL ERROR BitmapFileStatus RETVAL +-- IN Display* display +-- IN String filename +-- IN Pixmap bitmap +-- IN Dimension width +-- IN Dimension height +-- IN Maybe Int x_hot = -1 +-- IN Maybe Int y_hot = -1 hunk ./Graphics/X11/Xlib/Misc.hsc 746 --- IMPURE void XReadBitmapFile(display, d, filename, bitmap, width, height, x_hot, y_hot) RAISES Either --- RETURNTYPE BitmapFileStatus --- GLOBAL ERROR BitmapFileStatus RETVAL --- IN Display* display --- IN Drawable d --- IN String filename --- OUT Pixmap bitmap --- OUT Dimension width --- OUT Dimension height --- OUT Int x_hot RAISES Maybe IF x_hot == -1 --- OUT Int y_hot RAISES Maybe IF x_hot == -1 +-- IMPURE void XReadBitmapFile(display, d, filename, bitmap, width, height, x_hot, y_hot) RAISES Either +-- RETURNTYPE BitmapFileStatus +-- GLOBAL ERROR BitmapFileStatus RETVAL +-- IN Display* display +-- IN Drawable d +-- IN String filename +-- OUT Pixmap bitmap +-- OUT Dimension width +-- OUT Dimension height +-- OUT Int x_hot RAISES Maybe IF x_hot == -1 +-- OUT Int y_hot RAISES Maybe IF x_hot == -1 hunk ./Graphics/X11/Xlib/Misc.hsc 769 - unsafePerformIO $ outParameters2 id $ xDisplayKeycodes display + unsafePerformIO $ outParameters2 id $ xDisplayKeycodes display hunk ./Graphics/X11/Xlib/Misc.hsc 771 - xDisplayKeycodes :: Display -> Ptr CInt -> Ptr CInt -> IO () + xDisplayKeycodes :: Display -> Ptr CInt -> Ptr CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 775 - lookupKeysym :: XKeyEventPtr -> CInt -> IO KeySym + lookupKeysym :: XKeyEventPtr -> CInt -> IO KeySym hunk ./Graphics/X11/Xlib/Misc.hsc 779 - keycodeToKeysym :: Display -> KeyCode -> CInt -> IO KeySym + keycodeToKeysym :: Display -> KeyCode -> CInt -> IO KeySym hunk ./Graphics/X11/Xlib/Misc.hsc 783 - keysymToKeycode :: Display -> KeySym -> IO KeyCode + keysymToKeycode :: Display -> KeySym -> IO KeyCode hunk ./Graphics/X11/Xlib/Misc.hsc 788 - c_str <- xKeysymToString keysym - peekCString c_str + c_str <- xKeysymToString keysym + peekCString c_str hunk ./Graphics/X11/Xlib/Misc.hsc 791 - xKeysymToString :: KeySym -> IO CString + xKeysymToString :: KeySym -> IO CString hunk ./Graphics/X11/Xlib/Misc.hsc 796 - withCString str $ \ c_str -> - xStringToKeysym c_str + withCString str $ \ c_str -> + xStringToKeysym c_str hunk ./Graphics/X11/Xlib/Misc.hsc 799 - xStringToKeysym :: CString -> IO KeySym + xStringToKeysym :: CString -> IO KeySym hunk ./Graphics/X11/Xlib/Misc.hsc 806 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Misc.hsc 808 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Misc.hsc 816 - allocaBytes 100 $ \ buf -> - alloca $ \ keysym_return -> do - n <- xLookupString event_ptr buf 100 keysym_return nullPtr - str <- peekCStringLen (buf, fromIntegral n) - keysym <- peek keysym_return - return (if keysym == noSymbol then Nothing else Just keysym, str) + allocaBytes 100 $ \ buf -> + alloca $ \ keysym_return -> do + n <- xLookupString event_ptr buf 100 keysym_return nullPtr + str <- peekCStringLen (buf, fromIntegral n) + keysym <- peek keysym_return + return (if keysym == noSymbol then Nothing else Just keysym, str) hunk ./Graphics/X11/Xlib/Misc.hsc 823 - xLookupString :: XKeyEventPtr -> CString -> CInt -> - Ptr KeySym -> Ptr XComposeStatus -> IO CInt + xLookupString :: XKeyEventPtr -> CString -> CInt -> + Ptr KeySym -> Ptr XComposeStatus -> IO CInt hunk ./Graphics/X11/Xlib/Misc.hsc 843 - alloca $ \ icon_name_return -> do - throwIfZero "getIconName" $ - xGetIconName display w icon_name_return - c_icon_name <- peek icon_name_return - peekCString c_icon_name + alloca $ \ icon_name_return -> do + throwIfZero "getIconName" $ + xGetIconName display w icon_name_return + c_icon_name <- peek icon_name_return + peekCString c_icon_name hunk ./Graphics/X11/Xlib/Misc.hsc 849 - xGetIconName :: Display -> Window -> Ptr CString -> IO Status + xGetIconName :: Display -> Window -> Ptr CString -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 854 - withCString icon_name $ \ c_icon_name -> - xSetIconName display w c_icon_name + withCString icon_name $ \ c_icon_name -> + xSetIconName display w c_icon_name hunk ./Graphics/X11/Xlib/Misc.hsc 857 - xSetIconName :: Display -> Window -> CString -> IO () + xSetIconName :: Display -> Window -> CString -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 865 - defineCursor :: Display -> Window -> Cursor -> IO () + defineCursor :: Display -> Window -> Cursor -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 869 - undefineCursor :: Display -> Window -> IO () + undefineCursor :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 873 - Dimension -> Dimension -> IO Cursor + Dimension -> Dimension -> IO Cursor hunk ./Graphics/X11/Xlib/Misc.hsc 875 - with fg_color $ \ fg_color_ptr -> - with bg_color $ \ bg_color_ptr -> - xCreatePixmapCursor display source mask fg_color_ptr bg_color_ptr x y + with fg_color $ \ fg_color_ptr -> + with bg_color $ \ bg_color_ptr -> + xCreatePixmapCursor display source mask fg_color_ptr bg_color_ptr x y hunk ./Graphics/X11/Xlib/Misc.hsc 879 - xCreatePixmapCursor :: Display -> Pixmap -> Pixmap -> - Ptr Color -> Ptr Color -> Dimension -> Dimension -> IO Cursor + xCreatePixmapCursor :: Display -> Pixmap -> Pixmap -> + Ptr Color -> Ptr Color -> Dimension -> Dimension -> IO Cursor hunk ./Graphics/X11/Xlib/Misc.hsc 884 - Color -> Color -> IO Cursor + Color -> Color -> IO Cursor hunk ./Graphics/X11/Xlib/Misc.hsc 886 - fg_color bg_color = - with fg_color $ \ fg_color_ptr -> - with bg_color $ \ bg_color_ptr -> - xCreateGlyphCursor display source_font mask_font source_char mask_char - fg_color_ptr bg_color_ptr + fg_color bg_color = + with fg_color $ \ fg_color_ptr -> + with bg_color $ \ bg_color_ptr -> + xCreateGlyphCursor display source_font mask_font source_char mask_char + fg_color_ptr bg_color_ptr hunk ./Graphics/X11/Xlib/Misc.hsc 892 - xCreateGlyphCursor :: Display -> Font -> Font -> Glyph -> Glyph -> - Ptr Color -> Ptr Color -> IO Cursor + xCreateGlyphCursor :: Display -> Font -> Font -> Glyph -> Glyph -> + Ptr Color -> Ptr Color -> IO Cursor hunk ./Graphics/X11/Xlib/Misc.hsc 897 - createFontCursor :: Display -> Glyph -> IO Cursor + createFontCursor :: Display -> Glyph -> IO Cursor hunk ./Graphics/X11/Xlib/Misc.hsc 901 - freeCursor :: Display -> Font -> IO () + freeCursor :: Display -> Font -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 906 - with fg_color $ \ fg_color_ptr -> - with bg_color $ \ bg_color_ptr -> - xRecolorCursor display cursor fg_color_ptr bg_color_ptr + with fg_color $ \ fg_color_ptr -> + with bg_color $ \ bg_color_ptr -> + xRecolorCursor display cursor fg_color_ptr bg_color_ptr hunk ./Graphics/X11/Xlib/Misc.hsc 910 - xRecolorCursor :: Display -> Cursor -> Ptr Color -> Ptr Color -> IO () + xRecolorCursor :: Display -> Cursor -> Ptr Color -> Ptr Color -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 928 - withArray protocols $ \ protocol_array -> - xSetWMProtocols display w protocol_array (fromIntegral $ length protocols) + withArray protocols $ \ protocol_array -> + xSetWMProtocols display w protocol_array (fromIntegral $ length protocols) hunk ./Graphics/X11/Xlib/Misc.hsc 931 - xSetWMProtocols :: Display -> Window -> Ptr Atom -> CInt -> IO () + xSetWMProtocols :: Display -> Window -> Ptr Atom -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 995 - drawPoint :: Display -> Drawable -> GC -> Position -> Position -> IO () + drawPoint :: Display -> Drawable -> GC -> Position -> Position -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1000 - withArrayLen points $ \ npoints point_array -> - xDrawPoints display d gc point_array (fromIntegral npoints) mode + withArrayLen points $ \ npoints point_array -> + xDrawPoints display d gc point_array (fromIntegral npoints) mode hunk ./Graphics/X11/Xlib/Misc.hsc 1003 - xDrawPoints :: Display -> Drawable -> GC -> Ptr Point -> CInt -> - CoordinateMode -> IO () + xDrawPoints :: Display -> Drawable -> GC -> Ptr Point -> CInt -> + CoordinateMode -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1008 - drawLine :: Display -> Drawable -> GC -> Position -> Position -> - Position -> Position -> IO () + drawLine :: Display -> Drawable -> GC -> Position -> Position -> + Position -> Position -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1014 - withArrayLen points $ \ npoints point_array -> - xDrawLines display d gc point_array (fromIntegral npoints) mode + withArrayLen points $ \ npoints point_array -> + xDrawLines display d gc point_array (fromIntegral npoints) mode hunk ./Graphics/X11/Xlib/Misc.hsc 1017 - xDrawLines :: Display -> Drawable -> GC -> Ptr Point -> CInt -> - CoordinateMode -> IO () + xDrawLines :: Display -> Drawable -> GC -> Ptr Point -> CInt -> + CoordinateMode -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1023 - withArrayLen segments $ \ nsegments segment_array -> - xDrawSegments display d gc segment_array (fromIntegral nsegments) + withArrayLen segments $ \ nsegments segment_array -> + xDrawSegments display d gc segment_array (fromIntegral nsegments) hunk ./Graphics/X11/Xlib/Misc.hsc 1026 - xDrawSegments :: Display -> Drawable -> GC -> Ptr Segment -> CInt -> IO () + xDrawSegments :: Display -> Drawable -> GC -> Ptr Segment -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1030 - drawRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () + drawRectangle :: Display -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1035 - withArrayLen rectangles $ \ nrectangles rectangle_array -> - xDrawRectangles display d gc rectangle_array (fromIntegral nrectangles) + withArrayLen rectangles $ \ nrectangles rectangle_array -> + xDrawRectangles display d gc rectangle_array (fromIntegral nrectangles) hunk ./Graphics/X11/Xlib/Misc.hsc 1038 - xDrawRectangles :: Display -> Drawable -> GC -> Ptr Rectangle -> CInt -> IO () + xDrawRectangles :: Display -> Drawable -> GC -> Ptr Rectangle -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1042 - drawArc :: Display -> Drawable -> GC -> Position -> Position -> - Dimension -> Dimension -> Angle -> Angle -> IO () + drawArc :: Display -> Drawable -> GC -> Position -> Position -> + Dimension -> Dimension -> Angle -> Angle -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1048 - withArrayLen arcs $ \ narcs arc_array -> - xDrawArcs display d gc arc_array (fromIntegral narcs) + withArrayLen arcs $ \ narcs arc_array -> + xDrawArcs display d gc arc_array (fromIntegral narcs) hunk ./Graphics/X11/Xlib/Misc.hsc 1051 - xDrawArcs :: Display -> Drawable -> GC -> Ptr Arc -> CInt -> IO () + xDrawArcs :: Display -> Drawable -> GC -> Ptr Arc -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1055 - fillRectangle :: Display -> Drawable -> GC -> Position -> Position -> - Dimension -> Dimension -> IO () + fillRectangle :: Display -> Drawable -> GC -> Position -> Position -> + Dimension -> Dimension -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1061 - withArrayLen rectangles $ \ nrectangles rectangle_array -> - xFillRectangles display d gc rectangle_array (fromIntegral nrectangles) + withArrayLen rectangles $ \ nrectangles rectangle_array -> + xFillRectangles display d gc rectangle_array (fromIntegral nrectangles) hunk ./Graphics/X11/Xlib/Misc.hsc 1064 - xFillRectangles :: Display -> Drawable -> GC -> Ptr Rectangle -> CInt -> IO () + xFillRectangles :: Display -> Drawable -> GC -> Ptr Rectangle -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1069 - withArrayLen points $ \ npoints point_array -> - xFillPolygon display d gc point_array (fromIntegral npoints) shape mode + withArrayLen points $ \ npoints point_array -> + xFillPolygon display d gc point_array (fromIntegral npoints) shape mode hunk ./Graphics/X11/Xlib/Misc.hsc 1072 - xFillPolygon :: Display -> Drawable -> GC -> Ptr Point -> CInt -> PolygonShape -> CoordinateMode -> IO () + xFillPolygon :: Display -> Drawable -> GC -> Ptr Point -> CInt -> PolygonShape -> CoordinateMode -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1076 - fillArc :: Display -> Drawable -> GC -> Position -> Position -> - Dimension -> Dimension -> Angle -> Angle -> IO () + fillArc :: Display -> Drawable -> GC -> Position -> Position -> + Dimension -> Dimension -> Angle -> Angle -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1082 - withArrayLen arcs $ \ narcs arc_array -> - xFillArcs display d gc arc_array (fromIntegral narcs) + withArrayLen arcs $ \ narcs arc_array -> + xFillArcs display d gc arc_array (fromIntegral narcs) hunk ./Graphics/X11/Xlib/Misc.hsc 1085 - xFillArcs :: Display -> Drawable -> GC -> Ptr Arc -> CInt -> IO () + xFillArcs :: Display -> Drawable -> GC -> Ptr Arc -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1089 - copyArea :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () + copyArea :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1093 - copyPlane :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> Pixel -> IO () + copyPlane :: Display -> Drawable -> Drawable -> GC -> Position -> Position -> Dimension -> Dimension -> Position -> Position -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1100 - withCStringLen str $ \ (c_str, len) -> - xDrawString display d gc x y c_str (fromIntegral len) + withCStringLen str $ \ (c_str, len) -> + xDrawString display d gc x y c_str (fromIntegral len) hunk ./Graphics/X11/Xlib/Misc.hsc 1103 - xDrawString :: Display -> Drawable -> GC -> Position -> Position -> CString -> CInt -> IO () + xDrawString :: Display -> Drawable -> GC -> Position -> Position -> CString -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1110 - withCStringLen str $ \ (c_str, len) -> - xDrawImageString display d gc x y c_str (fromIntegral len) + withCStringLen str $ \ (c_str, len) -> + xDrawImageString display d gc x y c_str (fromIntegral len) hunk ./Graphics/X11/Xlib/Misc.hsc 1113 - xDrawImageString :: Display -> Drawable -> GC -> Position -> Position -> CString -> CInt -> IO () + xDrawImageString :: Display -> Drawable -> GC -> Position -> Position -> CString -> CInt -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1127 - withCStringLen bytes $ \ (c_bytes, nbytes) -> - throwIfZero "storeBuffer" $ - xStoreBuffer display c_bytes (fromIntegral nbytes) buffer + withCStringLen bytes $ \ (c_bytes, nbytes) -> + throwIfZero "storeBuffer" $ + xStoreBuffer display c_bytes (fromIntegral nbytes) buffer hunk ./Graphics/X11/Xlib/Misc.hsc 1131 - xStoreBuffer :: Display -> CString -> CInt -> CInt -> IO Status + xStoreBuffer :: Display -> CString -> CInt -> CInt -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 1136 - withCStringLen bytes $ \ (c_bytes, nbytes) -> - throwIfZero "storeBytes" $ - xStoreBytes display c_bytes (fromIntegral nbytes) + withCStringLen bytes $ \ (c_bytes, nbytes) -> + throwIfZero "storeBytes" $ + xStoreBytes display c_bytes (fromIntegral nbytes) hunk ./Graphics/X11/Xlib/Misc.hsc 1140 - xStoreBytes :: Display -> CString -> CInt -> IO Status + xStoreBytes :: Display -> CString -> CInt -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 1145 - alloca $ \ nbytes_return -> do - c_bytes <- throwIfNull "fetchBuffer" $ - xFetchBuffer display nbytes_return buffer - nbytes <- peek nbytes_return - bytes <- peekCStringLen (c_bytes, (fromIntegral nbytes)) - xFree c_bytes - return bytes + alloca $ \ nbytes_return -> do + c_bytes <- throwIfNull "fetchBuffer" $ + xFetchBuffer display nbytes_return buffer + nbytes <- peek nbytes_return + bytes <- peekCStringLen (c_bytes, (fromIntegral nbytes)) + xFree c_bytes + return bytes hunk ./Graphics/X11/Xlib/Misc.hsc 1153 - xFetchBuffer :: Display -> Ptr CInt -> CInt -> IO CString + xFetchBuffer :: Display -> Ptr CInt -> CInt -> IO CString hunk ./Graphics/X11/Xlib/Misc.hsc 1158 - alloca $ \ nbytes_return -> do - c_bytes <- throwIfNull "fetchBytes" $ - xFetchBytes display nbytes_return - nbytes <- peek nbytes_return - bytes <- peekCStringLen (c_bytes, (fromIntegral nbytes)) - xFree c_bytes - return bytes + alloca $ \ nbytes_return -> do + c_bytes <- throwIfNull "fetchBytes" $ + xFetchBytes display nbytes_return + nbytes <- peek nbytes_return + bytes <- peekCStringLen (c_bytes, (fromIntegral nbytes)) + xFree c_bytes + return bytes hunk ./Graphics/X11/Xlib/Misc.hsc 1166 - xFetchBytes :: Display -> Ptr CInt -> IO CString + xFetchBytes :: Display -> Ptr CInt -> IO CString hunk ./Graphics/X11/Xlib/Misc.hsc 1170 -rotateBuffers display rotate = - throwIfZero "rotateBuffers" $ - xRotateBuffers display rotate +rotateBuffers display rot = + throwIfZero "rotateBuffers" $ + xRotateBuffers display rot hunk ./Graphics/X11/Xlib/Misc.hsc 1174 - xRotateBuffers :: Display -> CInt -> IO Status + xRotateBuffers :: Display -> CInt -> IO Status hunk ./Graphics/X11/Xlib/Misc.hsc 1182 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Misc.hsc 1184 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Misc.hsc 1190 - withCStringLen value $ \ (c_value, value_len) -> - allocaBytes #{size XTextProperty} $ \ text_prop -> do - #{poke XTextProperty,value} text_prop c_value - #{poke XTextProperty,encoding} text_prop sTRING - #{poke XTextProperty,format} text_prop (8::CInt) - #{poke XTextProperty,nitems} text_prop (fromIntegral value_len::Word32) - xSetTextProperty display w text_prop property + withCStringLen value $ \ (c_value, value_len) -> + allocaBytes #{size XTextProperty} $ \ text_prop -> do + #{poke XTextProperty,value} text_prop c_value + #{poke XTextProperty,encoding} text_prop sTRING + #{poke XTextProperty,format} text_prop (8::CInt) + #{poke XTextProperty,nitems} text_prop (fromIntegral value_len::Word32) + xSetTextProperty display w text_prop property hunk ./Graphics/X11/Xlib/Misc.hsc 1198 - xSetTextProperty :: Display -> Window -> Ptr XTextProperty -> Atom -> IO () + xSetTextProperty :: Display -> Window -> Ptr XTextProperty -> Atom -> IO () hunk ./Graphics/X11/Xlib/Misc.hsc 1209 - (IO r -> IO ()) -> (Ptr a -> Ptr b -> IO r) -> IO (a,b) + (IO r -> IO ()) -> (Ptr a -> Ptr b -> IO r) -> IO (a,b) hunk ./Graphics/X11/Xlib/Misc.hsc 1211 - alloca $ \ a_return -> - alloca $ \ b_return -> do - check (fn a_return b_return) - a <- peek a_return - b <- peek b_return - return (a,b) + alloca $ \ a_return -> + alloca $ \ b_return -> do + check (fn a_return b_return) + a <- peek a_return + b <- peek b_return + return (a,b) hunk ./Graphics/X11/Xlib/Misc.hsc 1219 - (IO r -> IO ()) -> (Ptr a -> Ptr b -> Ptr c -> IO r) -> IO (a,b,c) + (IO r -> IO ()) -> (Ptr a -> Ptr b -> Ptr c -> IO r) -> IO (a,b,c) hunk ./Graphics/X11/Xlib/Misc.hsc 1221 - alloca $ \ a_return -> - alloca $ \ b_return -> - alloca $ \ c_return -> do - check (fn a_return b_return c_return) - a <- peek a_return - b <- peek b_return - c <- peek c_return - return (a,b,c) + alloca $ \ a_return -> + alloca $ \ b_return -> + alloca $ \ c_return -> do + check (fn a_return b_return c_return) + a <- peek a_return + b <- peek b_return + c <- peek c_return + return (a,b,c) hunk ./Graphics/X11/Xlib/Misc.hsc 1231 - (IO r -> IO ()) -> (Ptr a -> Ptr b -> Ptr c -> Ptr d -> IO r) -> - IO (a,b,c,d) + (IO r -> IO ()) -> (Ptr a -> Ptr b -> Ptr c -> Ptr d -> IO r) -> + IO (a,b,c,d) hunk ./Graphics/X11/Xlib/Misc.hsc 1234 - alloca $ \ a_return -> - alloca $ \ b_return -> - alloca $ \ c_return -> - alloca $ \ d_return -> do - check (fn a_return b_return c_return d_return) - a <- peek a_return - b <- peek b_return - c <- peek c_return - d <- peek d_return - return (a,b,c,d) + alloca $ \ a_return -> + alloca $ \ b_return -> + alloca $ \ c_return -> + alloca $ \ d_return -> do + check (fn a_return b_return c_return d_return) + a <- peek a_return + b <- peek b_return + c <- peek c_return + d <- peek d_return + return (a,b,c,d) hunk ./Graphics/X11/Xlib/Misc.hsc 1246 - (IO r -> IO ()) -> (Ptr a -> Ptr b -> Ptr c -> Ptr d -> Ptr e -> Ptr f -> Ptr g -> IO r) -> - IO (a,b,c,d,e,f,g) + (IO r -> IO ()) -> (Ptr a -> Ptr b -> Ptr c -> Ptr d -> Ptr e -> Ptr f -> Ptr g -> IO r) -> + IO (a,b,c,d,e,f,g) hunk ./Graphics/X11/Xlib/Misc.hsc 1249 - alloca $ \ a_return -> - alloca $ \ b_return -> - alloca $ \ c_return -> - alloca $ \ d_return -> - alloca $ \ e_return -> - alloca $ \ f_return -> - alloca $ \ g_return -> do - check (fn a_return b_return c_return d_return e_return f_return g_return) - a <- peek a_return - b <- peek b_return - c <- peek c_return - d <- peek d_return - e <- peek e_return - f <- peek f_return - g <- peek g_return - return (a,b,c,d,e,f,g) + alloca $ \ a_return -> + alloca $ \ b_return -> + alloca $ \ c_return -> + alloca $ \ d_return -> + alloca $ \ e_return -> + alloca $ \ f_return -> + alloca $ \ g_return -> do + check (fn a_return b_return c_return d_return e_return f_return g_return) + a <- peek a_return + b <- peek b_return + c <- peek c_return + d <- peek d_return + e <- peek e_return + f <- peek f_return + g <- peek g_return + return (a,b,c,d,e,f,g) hunk ./Graphics/X11/Xlib/Types.hsc 27 -import Foreign.Marshal.Alloc( allocaBytes ) +-- import Foreign.Marshal.Alloc( allocaBytes ) hunk ./Graphics/X11/Xlib/Extras.hsc 219 +eventTable :: [(EventType, String)] hunk ./Graphics/X11/Xlib/Extras.hsc 723 -waIsUnmapped = fromIntegral $ #{const IsUnmapped} -- 0 -waIsUnviewable = fromIntegral $ #{const IsUnviewable} -- 1 -waIsViewable = fromIntegral $ #{const IsViewable} -- 2 +waIsUnmapped = fromIntegral ( #{const IsUnmapped} :: CInt ) -- 0 +waIsUnviewable = fromIntegral ( #{const IsUnviewable} :: CInt ) -- 1 +waIsViewable = fromIntegral ( #{const IsViewable} :: CInt ) -- 2 hunk ./Graphics/X11/Xlib/Extras.hsc 751 +getWindowAttributes :: Display -> Window -> IO WindowAttributes hunk ./Graphics/X11/Xlib/Extras.hsc 758 - changeWindowAttributes :: Display -> Window -> AttributeMask -> Ptr SetWindowAttributes -> IO () + changeWindowAttributes :: Display -> Window -> AttributeMask -> Ptr SetWindowAttributes -> IO () hunk ./Graphics/X11/Xlib/Extras.hsc 953 - int type; /* SelectionNotify */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - Window requestor; - Atom selection; - Atom target; - Atom property; /* atom or None */ - Time time; + int type; /* SelectionNotify */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window requestor; + Atom selection; + Atom target; + Atom property; /* atom or None */ + Time time; hunk ./Graphics/X11/Xlib/Extras.hsc 988 -setConfigureEvent p ev win x y w h bw abv or = do +setConfigureEvent p ev win x y w h bw abv org = do hunk ./Graphics/X11/Xlib/Extras.hsc 997 - #{poke XConfigureEvent, override_redirect} p (if or then 1 else 0 :: CInt) + #{poke XConfigureEvent, override_redirect} p (if org then 1 else 0 :: CInt) hunk ./Graphics/X11/Xlib/Extras.hsc 1139 +pMinSizeBit, pMaxSizeBit, pResizeIncBit, pAspectBit, pBaseSizeBit, pWinGravityBit :: Int hunk ./Graphics/X11/Xlib/Extras.hsc 1167 - #{poke XSizeHints, height_inc } p w + #{poke XSizeHints, height_inc } p h hunk ./Graphics/X11/Xlib/Extras.hsc 606 + _ -> error "X11.Extras.clientMessage: illegal value" hunk ./Graphics/X11/Xlib/Extras.hsc 1242 -withdrawnState = #{const WithdrawnState} :: Int -normalState = #{const NormalState} :: Int -iconicState = #{const IconicState} :: Int +withdrawnState,normalState, iconicState :: Int +withdrawnState = #{const WithdrawnState} +normalState = #{const NormalState} +iconicState = #{const IconicState} hunk ./Graphics/X11/Xlib/Extras.hsc 1249 -inputHintBit = 0 :: Int -stateHintBit = 1 :: Int -iconPixmapHintBit = 2 :: Int -iconWindowHintBit = 3 :: Int -iconPositionHintBit = 4 :: Int -iconMaskHintBit = 5 :: Int -windowGroupHintBit = 6 :: Int -urgencyHintBit = 8 :: Int +inputHintBit,stateHintBit,iconPixmapHintBit,iconWindowHintBit,iconPositionHintBit,iconMaskHintBit,windowGroupHintBit,urgencyHintBit :: Int +inputHintBit = 0 +stateHintBit = 1 +iconPixmapHintBit = 2 +iconWindowHintBit = 3 +iconPositionHintBit = 4 +iconMaskHintBit = 5 +windowGroupHintBit = 6 +urgencyHintBit = 8 hunk ./Graphics/X11/Xlib/Extras.hsc 1261 -allHintsBitmask = #{const AllHints} :: CLong +allHintsBitmask :: CLong +allHintsBitmask = #{const AllHints} hunk ./X11.cabal 7 +homepage: http://darcs.haskell.org/X11 hunk ./X11.cabal 52 -ghc-options: -O2 -funbox-strict-fields -Wall +ghc-options: -O2 -funbox-strict-fields -Wall -fno-warn-unused-binds hunk ./Graphics/X11/Xlib/Extras.hsc 1 -{-# OPTIONS -fglasgow-exts #-} +{-# OPTIONS -fglasgow-exts -fno-warn-name-shadowing #-} move ./Setup.hs ./Setup.lhs hunk ./Setup.lhs 1 -module Main (main) where - -import Distribution.Simple - -main :: IO () -main = defaultMainWithHooks defaultUserHooks +#!/usr/bin/env runhaskell +> import Distribution.Simple +> main = defaultMain hunk ./X11.cabal 2 -version: 1.3.0 +version: 1.2.3 hunk ./X11.cabal 2 -version: 1.2.3 +version: 1.3.0 hunk ./Setup.lhs 1 -#!/usr/bin/env runhaskell -> import Distribution.Simple -> main = defaultMain +module Main (main) where + +import Distribution.Simple + +main :: IO () +main = defaultMainWithHooks defaultUserHooks move ./Setup.lhs ./Setup.hs hunk ./Graphics/X11/Types.hsc 16 - ( + ( hunk ./Graphics/X11/Types.hsc 18 - XID, - Mask, - Atom, - VisualID, - Time, - Window, - Drawable, - Font, - Pixmap, - Cursor, - Colormap, - GContext, - KeyCode, + XID, + Mask, + Atom, + VisualID, + Time, + Window, + Drawable, + Font, + Pixmap, + Cursor, + Colormap, + GContext, + KeyCode, hunk ./Graphics/X11/Types.hsc 32 - -- * Enumeration types - -- | These types were introduced to make function types clearer. - -- Note that the types are synonyms for 'Int', so no extra - -- typesafety was obtained. + -- * Enumeration types + -- | These types were introduced to make function types clearer. + -- Note that the types are synonyms for 'Int', so no extra + -- typesafety was obtained. hunk ./Graphics/X11/Types.hsc 37 - -- ** Key symbols - KeySym, + -- ** Key symbols + KeySym, hunk ./Graphics/X11/Types.hsc 40 - xK_VoidSymbol, - xK_BackSpace, - xK_Tab, - xK_Linefeed, - xK_Clear, - xK_Return, - xK_Pause, - xK_Scroll_Lock, - xK_Sys_Req, - xK_Escape, - xK_Delete, - xK_Multi_key, - xK_Home, - xK_Left, - xK_Up, - xK_Right, - xK_Down, - xK_Prior, - xK_Page_Up, - xK_Next, - xK_Page_Down, - xK_End, - xK_Begin, - xK_Select, - xK_Print, - xK_Execute, - xK_Insert, - xK_Undo, - xK_Redo, - xK_Menu, - xK_Find, - xK_Cancel, - xK_Help, - xK_Break, - xK_Mode_switch, - xK_script_switch, - xK_Num_Lock, - xK_KP_Space, - xK_KP_Tab, - xK_KP_Enter, - xK_KP_F1, - xK_KP_F2, - xK_KP_F3, - xK_KP_F4, - xK_KP_Home, - xK_KP_Left, - xK_KP_Up, - xK_KP_Right, - xK_KP_Down, - xK_KP_Prior, - xK_KP_Page_Up, - xK_KP_Next, - xK_KP_Page_Down, - xK_KP_End, - xK_KP_Begin, - xK_KP_Insert, - xK_KP_Delete, - xK_KP_Equal, - xK_KP_Multiply, - xK_KP_Add, - xK_KP_Separator, - xK_KP_Subtract, - xK_KP_Decimal, - xK_KP_Divide, - xK_KP_0, - xK_KP_1, - xK_KP_2, - xK_KP_3, - xK_KP_4, - xK_KP_5, - xK_KP_6, - xK_KP_7, - xK_KP_8, - xK_KP_9, - xK_F1, - xK_F2, - xK_F3, - xK_F4, - xK_F5, - xK_F6, - xK_F7, - xK_F8, - xK_F9, - xK_F10, - xK_F11, - xK_L1, - xK_F12, - xK_L2, - xK_F13, - xK_L3, - xK_F14, - xK_L4, - xK_F15, - xK_L5, - xK_F16, - xK_L6, - xK_F17, - xK_L7, - xK_F18, - xK_L8, - xK_F19, - xK_L9, - xK_F20, - xK_L10, - xK_F21, - xK_R1, - xK_F22, - xK_R2, - xK_F23, - xK_R3, - xK_F24, - xK_R4, - xK_F25, - xK_R5, - xK_F26, - xK_R6, - xK_F27, - xK_R7, - xK_F28, - xK_R8, - xK_F29, - xK_R9, - xK_F30, - xK_R10, - xK_F31, - xK_R11, - xK_F32, - xK_R12, - xK_F33, - xK_R13, - xK_F34, - xK_R14, - xK_F35, - xK_R15, - xK_Shift_L, - xK_Shift_R, - xK_Control_L, - xK_Control_R, - xK_Caps_Lock, - xK_Shift_Lock, - xK_Meta_L, - xK_Meta_R, - xK_Alt_L, - xK_Alt_R, - xK_Super_L, - xK_Super_R, - xK_Hyper_L, - xK_Hyper_R, - xK_space, - xK_exclam, - xK_quotedbl, - xK_numbersign, - xK_dollar, - xK_percent, - xK_ampersand, - xK_apostrophe, - xK_quoteright, - xK_parenleft, - xK_parenright, - xK_asterisk, - xK_plus, - xK_comma, - xK_minus, - xK_period, - xK_slash, - xK_0, - xK_1, - xK_2, - xK_3, - xK_4, - xK_5, - xK_6, - xK_7, - xK_8, - xK_9, - xK_colon, - xK_semicolon, - xK_less, - xK_equal, - xK_greater, - xK_question, - xK_at, - xK_A, - xK_B, - xK_C, - xK_D, - xK_E, - xK_F, - xK_G, - xK_H, - xK_I, - xK_J, - xK_K, - xK_L, - xK_M, - xK_N, - xK_O, - xK_P, - xK_Q, - xK_R, - xK_S, - xK_T, - xK_U, - xK_V, - xK_W, - xK_X, - xK_Y, - xK_Z, - xK_bracketleft, - xK_backslash, - xK_bracketright, - xK_asciicircum, - xK_underscore, - xK_grave, - xK_quoteleft, - xK_a, - xK_b, - xK_c, - xK_d, - xK_e, - xK_f, - xK_g, - xK_h, - xK_i, - xK_j, - xK_k, - xK_l, - xK_m, - xK_n, - xK_o, - xK_p, - xK_q, - xK_r, - xK_s, - xK_t, - xK_u, - xK_v, - xK_w, - xK_x, - xK_y, - xK_z, - xK_braceleft, - xK_bar, - xK_braceright, - xK_asciitilde, - xK_nobreakspace, - xK_exclamdown, - xK_cent, - xK_sterling, - xK_currency, - xK_yen, - xK_brokenbar, - xK_section, - xK_diaeresis, - xK_copyright, - xK_ordfeminine, - xK_guillemotleft, - xK_notsign, - xK_hyphen, - xK_registered, - xK_macron, - xK_degree, - xK_plusminus, - xK_twosuperior, - xK_threesuperior, - xK_acute, - xK_mu, - xK_paragraph, - xK_periodcentered, - xK_cedilla, - xK_onesuperior, - xK_masculine, - xK_guillemotright, - xK_onequarter, - xK_onehalf, - xK_threequarters, - xK_questiondown, - xK_Agrave, - xK_Aacute, - xK_Acircumflex, - xK_Atilde, - xK_Adiaeresis, - xK_Aring, - xK_AE, - xK_Ccedilla, - xK_Egrave, - xK_Eacute, - xK_Ecircumflex, - xK_Ediaeresis, - xK_Igrave, - xK_Iacute, - xK_Icircumflex, - xK_Idiaeresis, - xK_ETH, - xK_Eth, - xK_Ntilde, - xK_Ograve, - xK_Oacute, - xK_Ocircumflex, - xK_Otilde, - xK_Odiaeresis, - xK_multiply, - xK_Ooblique, - xK_Ugrave, - xK_Uacute, - xK_Ucircumflex, - xK_Udiaeresis, - xK_Yacute, - xK_THORN, - xK_Thorn, - xK_ssharp, - xK_agrave, - xK_aacute, - xK_acircumflex, - xK_atilde, - xK_adiaeresis, - xK_aring, - xK_ae, - xK_ccedilla, - xK_egrave, - xK_eacute, - xK_ecircumflex, - xK_ediaeresis, - xK_igrave, - xK_iacute, - xK_icircumflex, - xK_idiaeresis, - xK_eth, - xK_ntilde, - xK_ograve, - xK_oacute, - xK_ocircumflex, - xK_otilde, - xK_odiaeresis, - xK_division, - xK_oslash, - xK_ugrave, - xK_uacute, - xK_ucircumflex, - xK_udiaeresis, - xK_yacute, - xK_thorn, - xK_ydiaeresis, + xK_VoidSymbol, + xK_BackSpace, + xK_Tab, + xK_Linefeed, + xK_Clear, + xK_Return, + xK_Pause, + xK_Scroll_Lock, + xK_Sys_Req, + xK_Escape, + xK_Delete, + xK_Multi_key, + xK_Home, + xK_Left, + xK_Up, + xK_Right, + xK_Down, + xK_Prior, + xK_Page_Up, + xK_Next, + xK_Page_Down, + xK_End, + xK_Begin, + xK_Select, + xK_Print, + xK_Execute, + xK_Insert, + xK_Undo, + xK_Redo, + xK_Menu, + xK_Find, + xK_Cancel, + xK_Help, + xK_Break, + xK_Mode_switch, + xK_script_switch, + xK_Num_Lock, + xK_KP_Space, + xK_KP_Tab, + xK_KP_Enter, + xK_KP_F1, + xK_KP_F2, + xK_KP_F3, + xK_KP_F4, + xK_KP_Home, + xK_KP_Left, + xK_KP_Up, + xK_KP_Right, + xK_KP_Down, + xK_KP_Prior, + xK_KP_Page_Up, + xK_KP_Next, + xK_KP_Page_Down, + xK_KP_End, + xK_KP_Begin, + xK_KP_Insert, + xK_KP_Delete, + xK_KP_Equal, + xK_KP_Multiply, + xK_KP_Add, + xK_KP_Separator, + xK_KP_Subtract, + xK_KP_Decimal, + xK_KP_Divide, + xK_KP_0, + xK_KP_1, + xK_KP_2, + xK_KP_3, + xK_KP_4, + xK_KP_5, + xK_KP_6, + xK_KP_7, + xK_KP_8, + xK_KP_9, + xK_F1, + xK_F2, + xK_F3, + xK_F4, + xK_F5, + xK_F6, + xK_F7, + xK_F8, + xK_F9, + xK_F10, + xK_F11, + xK_L1, + xK_F12, + xK_L2, + xK_F13, + xK_L3, + xK_F14, + xK_L4, + xK_F15, + xK_L5, + xK_F16, + xK_L6, + xK_F17, + xK_L7, + xK_F18, + xK_L8, + xK_F19, + xK_L9, + xK_F20, + xK_L10, + xK_F21, + xK_R1, + xK_F22, + xK_R2, + xK_F23, + xK_R3, + xK_F24, + xK_R4, + xK_F25, + xK_R5, + xK_F26, + xK_R6, + xK_F27, + xK_R7, + xK_F28, + xK_R8, + xK_F29, + xK_R9, + xK_F30, + xK_R10, + xK_F31, + xK_R11, + xK_F32, + xK_R12, + xK_F33, + xK_R13, + xK_F34, + xK_R14, + xK_F35, + xK_R15, + xK_Shift_L, + xK_Shift_R, + xK_Control_L, + xK_Control_R, + xK_Caps_Lock, + xK_Shift_Lock, + xK_Meta_L, + xK_Meta_R, + xK_Alt_L, + xK_Alt_R, + xK_Super_L, + xK_Super_R, + xK_Hyper_L, + xK_Hyper_R, + xK_space, + xK_exclam, + xK_quotedbl, + xK_numbersign, + xK_dollar, + xK_percent, + xK_ampersand, + xK_apostrophe, + xK_quoteright, + xK_parenleft, + xK_parenright, + xK_asterisk, + xK_plus, + xK_comma, + xK_minus, + xK_period, + xK_slash, + xK_0, + xK_1, + xK_2, + xK_3, + xK_4, + xK_5, + xK_6, + xK_7, + xK_8, + xK_9, + xK_colon, + xK_semicolon, + xK_less, + xK_equal, + xK_greater, + xK_question, + xK_at, + xK_A, + xK_B, + xK_C, + xK_D, + xK_E, + xK_F, + xK_G, + xK_H, + xK_I, + xK_J, + xK_K, + xK_L, + xK_M, + xK_N, + xK_O, + xK_P, + xK_Q, + xK_R, + xK_S, + xK_T, + xK_U, + xK_V, + xK_W, + xK_X, + xK_Y, + xK_Z, + xK_bracketleft, + xK_backslash, + xK_bracketright, + xK_asciicircum, + xK_underscore, + xK_grave, + xK_quoteleft, + xK_a, + xK_b, + xK_c, + xK_d, + xK_e, + xK_f, + xK_g, + xK_h, + xK_i, + xK_j, + xK_k, + xK_l, + xK_m, + xK_n, + xK_o, + xK_p, + xK_q, + xK_r, + xK_s, + xK_t, + xK_u, + xK_v, + xK_w, + xK_x, + xK_y, + xK_z, + xK_braceleft, + xK_bar, + xK_braceright, + xK_asciitilde, + xK_nobreakspace, + xK_exclamdown, + xK_cent, + xK_sterling, + xK_currency, + xK_yen, + xK_brokenbar, + xK_section, + xK_diaeresis, + xK_copyright, + xK_ordfeminine, + xK_guillemotleft, + xK_notsign, + xK_hyphen, + xK_registered, + xK_macron, + xK_degree, + xK_plusminus, + xK_twosuperior, + xK_threesuperior, + xK_acute, + xK_mu, + xK_paragraph, + xK_periodcentered, + xK_cedilla, + xK_onesuperior, + xK_masculine, + xK_guillemotright, + xK_onequarter, + xK_onehalf, + xK_threequarters, + xK_questiondown, + xK_Agrave, + xK_Aacute, + xK_Acircumflex, + xK_Atilde, + xK_Adiaeresis, + xK_Aring, + xK_AE, + xK_Ccedilla, + xK_Egrave, + xK_Eacute, + xK_Ecircumflex, + xK_Ediaeresis, + xK_Igrave, + xK_Iacute, + xK_Icircumflex, + xK_Idiaeresis, + xK_ETH, + xK_Eth, + xK_Ntilde, + xK_Ograve, + xK_Oacute, + xK_Ocircumflex, + xK_Otilde, + xK_Odiaeresis, + xK_multiply, + xK_Ooblique, + xK_Ugrave, + xK_Uacute, + xK_Ucircumflex, + xK_Udiaeresis, + xK_Yacute, + xK_THORN, + xK_Thorn, + xK_ssharp, + xK_agrave, + xK_aacute, + xK_acircumflex, + xK_atilde, + xK_adiaeresis, + xK_aring, + xK_ae, + xK_ccedilla, + xK_egrave, + xK_eacute, + xK_ecircumflex, + xK_ediaeresis, + xK_igrave, + xK_iacute, + xK_icircumflex, + xK_idiaeresis, + xK_eth, + xK_ntilde, + xK_ograve, + xK_oacute, + xK_ocircumflex, + xK_otilde, + xK_odiaeresis, + xK_division, + xK_oslash, + xK_ugrave, + xK_uacute, + xK_ucircumflex, + xK_udiaeresis, + xK_yacute, + xK_thorn, + xK_ydiaeresis, hunk ./Graphics/X11/Types.hsc 384 - -- ** Event masks - EventMask, - noEventMask, - keyPressMask, - keyReleaseMask, - buttonPressMask, - buttonReleaseMask, - enterWindowMask, - leaveWindowMask, - pointerMotionMask, - pointerMotionHintMask, - button1MotionMask, - button2MotionMask, - button3MotionMask, - button4MotionMask, - button5MotionMask, - buttonMotionMask, - keymapStateMask, - exposureMask, - visibilityChangeMask, - structureNotifyMask, - resizeRedirectMask, - substructureNotifyMask, - substructureRedirectMask, - focusChangeMask, - propertyChangeMask, - colormapChangeMask, - ownerGrabButtonMask, + -- ** Event masks + EventMask, + noEventMask, + keyPressMask, + keyReleaseMask, + buttonPressMask, + buttonReleaseMask, + enterWindowMask, + leaveWindowMask, + pointerMotionMask, + pointerMotionHintMask, + button1MotionMask, + button2MotionMask, + button3MotionMask, + button4MotionMask, + button5MotionMask, + buttonMotionMask, + keymapStateMask, + exposureMask, + visibilityChangeMask, + structureNotifyMask, + resizeRedirectMask, + substructureNotifyMask, + substructureRedirectMask, + focusChangeMask, + propertyChangeMask, + colormapChangeMask, + ownerGrabButtonMask, hunk ./Graphics/X11/Types.hsc 413 - -- ** Event types - EventType, - keyPress, - keyRelease, - buttonPress, - buttonRelease, - motionNotify, - enterNotify, - leaveNotify, - focusIn, - focusOut, - keymapNotify, - expose, - graphicsExpose, - noExpose, - visibilityNotify, - createNotify, - destroyNotify, - unmapNotify, - mapNotify, - mapRequest, - reparentNotify, - configureNotify, - configureRequest, - gravityNotify, - resizeRequest, - circulateNotify, - circulateRequest, - propertyNotify, - selectionClear, - selectionRequest, - selectionNotify, - colormapNotify, - clientMessage, - mappingNotify, - lASTEvent, + -- ** Event types + EventType, + keyPress, + keyRelease, + buttonPress, + buttonRelease, + motionNotify, + enterNotify, + leaveNotify, + focusIn, + focusOut, + keymapNotify, + expose, + graphicsExpose, + noExpose, + visibilityNotify, + createNotify, + destroyNotify, + unmapNotify, + mapNotify, + mapRequest, + reparentNotify, + configureNotify, + configureRequest, + gravityNotify, + resizeRequest, + circulateNotify, + circulateRequest, + propertyNotify, + selectionClear, + selectionRequest, + selectionNotify, + colormapNotify, + clientMessage, + mappingNotify, + lASTEvent, hunk ./Graphics/X11/Types.hsc 450 - -- ** Modifiers - Modifier, - shiftMapIndex, - lockMapIndex, - controlMapIndex, - mod1MapIndex, - mod2MapIndex, - mod3MapIndex, - mod4MapIndex, - mod5MapIndex, - anyModifier, + -- ** Modifiers + Modifier, + shiftMapIndex, + lockMapIndex, + controlMapIndex, + mod1MapIndex, + mod2MapIndex, + mod3MapIndex, + mod4MapIndex, + mod5MapIndex, + anyModifier, hunk ./Graphics/X11/Types.hsc 462 - -- ** Key masks - KeyMask, - shiftMask, - lockMask, - controlMask, - mod1Mask, - mod2Mask, - mod3Mask, - mod4Mask, - mod5Mask, + -- ** Key masks + KeyMask, + shiftMask, + lockMask, + controlMask, + mod1Mask, + mod2Mask, + mod3Mask, + mod4Mask, + mod5Mask, hunk ./Graphics/X11/Types.hsc 473 - -- ** Button masks - ButtonMask, - button1Mask, - button2Mask, - button3Mask, - button4Mask, - button5Mask, + -- ** Button masks + ButtonMask, + button1Mask, + button2Mask, + button3Mask, + button4Mask, + button5Mask, hunk ./Graphics/X11/Types.hsc 481 - -- ** Buttons - Button, - button1, - button2, - button3, - button4, - button5, + -- ** Buttons + Button, + button1, + button2, + button3, + button4, + button5, hunk ./Graphics/X11/Types.hsc 489 - -- ** Notify modes - NotifyMode, - notifyNormal, - notifyGrab, - notifyUngrab, - notifyWhileGrabbed, - notifyHint, + -- ** Notify modes + NotifyMode, + notifyNormal, + notifyGrab, + notifyUngrab, + notifyWhileGrabbed, + notifyHint, hunk ./Graphics/X11/Types.hsc 497 - -- ** Notify details - NotifyDetail, - notifyAncestor, - notifyVirtual, - notifyInferior, - notifyNonlinear, - notifyNonlinearVirtual, - notifyPointer, - notifyPointerRoot, - notifyDetailNone, + -- ** Notify details + NotifyDetail, + notifyAncestor, + notifyVirtual, + notifyInferior, + notifyNonlinear, + notifyNonlinearVirtual, + notifyPointer, + notifyPointerRoot, + notifyDetailNone, hunk ./Graphics/X11/Types.hsc 508 - -- ** Visibility - Visibility, - visibilityUnobscured, - visibilityPartiallyObscured, - visibilityFullyObscured, + -- ** Visibility + Visibility, + visibilityUnobscured, + visibilityPartiallyObscured, + visibilityFullyObscured, hunk ./Graphics/X11/Types.hsc 514 - -- ** Place of window - Place, - placeOnTop, - placeOnBottom, + -- ** Place of window + Place, + placeOnTop, + placeOnBottom, hunk ./Graphics/X11/Types.hsc 519 - -- ** Protocols - Protocol, - familyInternet, - familyDECnet, - familyChaos, + -- ** Protocols + Protocol, + familyInternet, + familyDECnet, + familyChaos, hunk ./Graphics/X11/Types.hsc 525 - -- ** Property notification - PropertyNotification, - propertyNewValue, - propertyDelete, + -- ** Property notification + PropertyNotification, + propertyNewValue, + propertyDelete, hunk ./Graphics/X11/Types.hsc 530 - -- ** Colormap notification - ColormapNotification, - colormapUninstalled, - colormapInstalled, + -- ** Colormap notification + ColormapNotification, + colormapUninstalled, + colormapInstalled, hunk ./Graphics/X11/Types.hsc 535 - -- ** Grab modes - GrabMode, - grabModeSync, - grabModeAsync, + -- ** Grab modes + GrabMode, + grabModeSync, + grabModeAsync, hunk ./Graphics/X11/Types.hsc 540 - -- ** Grab status - GrabStatus, - grabSuccess, - alreadyGrabbed, - grabInvalidTime, - grabNotViewable, - grabFrozen, + -- ** Grab status + GrabStatus, + grabSuccess, + alreadyGrabbed, + grabInvalidTime, + grabNotViewable, + grabFrozen, hunk ./Graphics/X11/Types.hsc 548 - -- ** Allow events - AllowEvents, - asyncPointer, - syncPointer, - replayPointer, - asyncKeyboard, - syncKeyboard, - replayKeyboard, - asyncBoth, - syncBoth, + -- ** Allow events + AllowEvents, + asyncPointer, + syncPointer, + replayPointer, + asyncKeyboard, + syncKeyboard, + replayKeyboard, + asyncBoth, + syncBoth, hunk ./Graphics/X11/Types.hsc 559 - -- ** Focus modes - FocusMode, - revertToNone, - revertToPointerRoot, - revertToParent, + -- ** Focus modes + FocusMode, + revertToNone, + revertToPointerRoot, + revertToParent, hunk ./Graphics/X11/Types.hsc 565 - -- ** Error codes - ErrorCode, - success, - badRequest, - badValue, - badWindow, - badPixmap, - badAtom, - badCursor, - badFont, - badMatch, - badDrawable, - badAccess, - badAlloc, - badColor, - badGC, - badIDChoice, - badName, - badLength, - badImplementation, - firstExtensionError, - lastExtensionError, + -- ** Error codes + ErrorCode, + success, + badRequest, + badValue, + badWindow, + badPixmap, + badAtom, + badCursor, + badFont, + badMatch, + badDrawable, + badAccess, + badAlloc, + badColor, + badGC, + badIDChoice, + badName, + badLength, + badImplementation, + firstExtensionError, + lastExtensionError, hunk ./Graphics/X11/Types.hsc 588 - -- ** Return status - Status, - throwIfZero, + -- ** Return status + Status, + throwIfZero, hunk ./Graphics/X11/Types.hsc 592 - -- ** WindowClass - WindowClass, - copyFromParent, - inputOutput, - inputOnly, + -- ** WindowClass + WindowClass, + copyFromParent, + inputOutput, + inputOnly, hunk ./Graphics/X11/Types.hsc 598 - -- ** Attribute masks - AttributeMask, - cWBackPixmap, - cWBackPixel, - cWBorderPixmap, - cWBorderPixel, - cWBitGravity, - cWWinGravity, - cWBackingStore, - cWBackingPlanes, - cWBackingPixel, - cWOverrideRedirect, - cWSaveUnder, - cWEventMask, - cWDontPropagate, - cWColormap, - cWCursor, + -- ** Attribute masks + AttributeMask, + cWBackPixmap, + cWBackPixel, + cWBorderPixmap, + cWBorderPixel, + cWBitGravity, + cWWinGravity, + cWBackingStore, + cWBackingPlanes, + cWBackingPixel, + cWOverrideRedirect, + cWSaveUnder, + cWEventMask, + cWDontPropagate, + cWColormap, + cWCursor, hunk ./Graphics/X11/Types.hsc 616 - -- ** Close down modes - CloseDownMode, - destroyAll, - retainPermanent, - retainTemporary, + -- ** Close down modes + CloseDownMode, + destroyAll, + retainPermanent, + retainTemporary, hunk ./Graphics/X11/Types.hsc 622 - -- ** QueryBestSize classes - QueryBestSizeClass, - cursorShape, - tileShape, - stippleShape, + -- ** QueryBestSize classes + QueryBestSizeClass, + cursorShape, + tileShape, + stippleShape, hunk ./Graphics/X11/Types.hsc 628 - -- ** Graphics functions - GXFunction, - gXclear, - gXand, - gXandReverse, - gXcopy, - gXandInverted, - gXnoop, - gXxor, - gXor, - gXnor, - gXequiv, - gXinvert, - gXorReverse, - gXcopyInverted, - gXorInverted, - gXnand, - gXset, + -- ** Graphics functions + GXFunction, + gXclear, + gXand, + gXandReverse, + gXcopy, + gXandInverted, + gXnoop, + gXxor, + gXor, + gXnor, + gXequiv, + gXinvert, + gXorReverse, + gXcopyInverted, + gXorInverted, + gXnand, + gXset, hunk ./Graphics/X11/Types.hsc 647 - -- ** Line styles - LineStyle, - lineSolid, - lineOnOffDash, - lineDoubleDash, + -- ** Line styles + LineStyle, + lineSolid, + lineOnOffDash, + lineDoubleDash, hunk ./Graphics/X11/Types.hsc 653 - -- ** Cap styles - CapStyle, - capNotLast, - capButt, - capRound, - capProjecting, + -- ** Cap styles + CapStyle, + capNotLast, + capButt, + capRound, + capProjecting, hunk ./Graphics/X11/Types.hsc 660 - -- ** Join styles - JoinStyle, - joinMiter, - joinRound, - joinBevel, + -- ** Join styles + JoinStyle, + joinMiter, + joinRound, + joinBevel, hunk ./Graphics/X11/Types.hsc 666 - -- ** Fill styles - FillStyle, - fillSolid, - fillTiled, - fillStippled, - fillOpaqueStippled, + -- ** Fill styles + FillStyle, + fillSolid, + fillTiled, + fillStippled, + fillOpaqueStippled, hunk ./Graphics/X11/Types.hsc 673 - -- ** Fill rules - FillRule, - evenOddRule, - windingRule, + -- ** Fill rules + FillRule, + evenOddRule, + windingRule, hunk ./Graphics/X11/Types.hsc 678 - -- ** Subwindow modes - SubWindowMode, - clipByChildren, - includeInferiors, + -- ** Subwindow modes + SubWindowMode, + clipByChildren, + includeInferiors, hunk ./Graphics/X11/Types.hsc 683 - -- ** Coordinate modes - CoordinateMode, - coordModeOrigin, - coordModePrevious, + -- ** Coordinate modes + CoordinateMode, + coordModeOrigin, + coordModePrevious, hunk ./Graphics/X11/Types.hsc 688 - -- ** Polygon shapes - PolygonShape, - complex, - nonconvex, - convex, + -- ** Polygon shapes + PolygonShape, + complex, + nonconvex, + convex, hunk ./Graphics/X11/Types.hsc 694 - -- ** Arc modes - ArcMode, - arcChord, - arcPieSlice, + -- ** Arc modes + ArcMode, + arcChord, + arcPieSlice, hunk ./Graphics/X11/Types.hsc 699 - -- ** GC masks - GCMask, - gCFunction, - gCPlaneMask, - gCForeground, - gCBackground, - gCLineWidth, - gCLineStyle, - gCCapStyle, - gCJoinStyle, - gCFillStyle, - gCFillRule, - gCTile, - gCStipple, - gCTileStipXOrigin, - gCTileStipYOrigin, - gCFont, - gCSubwindowMode, - gCGraphicsExposures, - gCClipXOrigin, - gCClipYOrigin, - gCClipMask, - gCDashOffset, - gCDashList, - gCArcMode, - gCLastBit, + -- ** GC masks + GCMask, + gCFunction, + gCPlaneMask, + gCForeground, + gCBackground, + gCLineWidth, + gCLineStyle, + gCCapStyle, + gCJoinStyle, + gCFillStyle, + gCFillRule, + gCTile, + gCStipple, + gCTileStipXOrigin, + gCTileStipYOrigin, + gCFont, + gCSubwindowMode, + gCGraphicsExposures, + gCClipXOrigin, + gCClipYOrigin, + gCClipMask, + gCDashOffset, + gCDashList, + gCArcMode, + gCLastBit, hunk ./Graphics/X11/Types.hsc 726 - -- ** Circulation direction - CirculationDirection, - raiseLowest, - lowerHighest, + -- ** Circulation direction + CirculationDirection, + raiseLowest, + lowerHighest, hunk ./Graphics/X11/Types.hsc 731 - -- ** Byte order - ByteOrder, - lSBFirst, - mSBFirst, + -- ** Byte order + ByteOrder, + lSBFirst, + mSBFirst, hunk ./Graphics/X11/Types.hsc 736 - -- ** ColormapAlloc - ColormapAlloc, - allocNone, - allocAll, + -- ** ColormapAlloc + ColormapAlloc, + allocNone, + allocAll, hunk ./Graphics/X11/Types.hsc 741 - -- ** Mapping requests - MappingRequest, - mappingModifier, - mappingKeyboard, - mappingPointer, + -- ** Mapping requests + MappingRequest, + mappingModifier, + mappingKeyboard, + mappingPointer, hunk ./Graphics/X11/Types.hsc 747 - -- ** ChangeSaveSetMode - ChangeSaveSetMode, - setModeInsert, - setModeDelete, + -- ** ChangeSaveSetMode + ChangeSaveSetMode, + setModeInsert, + setModeDelete, hunk ./Graphics/X11/Types.hsc 752 - -- ** Bit gravity - BitGravity, - forgetGravity, - northWestGravity, - northGravity, - northEastGravity, - westGravity, - centerGravity, - eastGravity, - southWestGravity, - southGravity, - southEastGravity, - staticGravity, + -- ** Bit gravity + BitGravity, + forgetGravity, + northWestGravity, + northGravity, + northEastGravity, + westGravity, + centerGravity, + eastGravity, + southWestGravity, + southGravity, + southEastGravity, + staticGravity, hunk ./Graphics/X11/Types.hsc 766 - -- ** Window gravity - WindowGravity, - unmapGravity, + -- ** Window gravity + WindowGravity, + unmapGravity, hunk ./Graphics/X11/Types.hsc 770 - -- ** Backing store - BackingStore, - notUseful, - whenMapped, - always, - doRed, - doGreen, - doBlue, + -- ** Backing store + BackingStore, + notUseful, + whenMapped, + always, + doRed, + doGreen, + doBlue, hunk ./Graphics/X11/Types.hsc 779 - -- ** Font direction - FontDirection, - fontLeftToRight, - fontRightToLeft, + -- ** Font direction + FontDirection, + fontLeftToRight, + fontRightToLeft, hunk ./Graphics/X11/Types.hsc 784 - -- ** Image format + -- ** Image format hunk ./Graphics/X11/Types.hsc 786 - xyBitmap, - xyPixmap, - zPixmap - ) where + xyBitmap, + xyPixmap, + zPixmap + ) where hunk ./Graphics/X11/Types.hsc 820 - , xK_VoidSymbol = XK_VoidSymbol + , xK_VoidSymbol = XK_VoidSymbol hunk ./Graphics/X11/Types.hsc 828 - , xK_BackSpace = XK_BackSpace - , xK_Tab = XK_Tab - , xK_Linefeed = XK_Linefeed - , xK_Clear = XK_Clear - , xK_Return = XK_Return - , xK_Pause = XK_Pause - , xK_Scroll_Lock = XK_Scroll_Lock - , xK_Sys_Req = XK_Sys_Req - , xK_Escape = XK_Escape - , xK_Delete = XK_Delete + , xK_BackSpace = XK_BackSpace + , xK_Tab = XK_Tab + , xK_Linefeed = XK_Linefeed + , xK_Clear = XK_Clear + , xK_Return = XK_Return + , xK_Pause = XK_Pause + , xK_Scroll_Lock = XK_Scroll_Lock + , xK_Sys_Req = XK_Sys_Req + , xK_Escape = XK_Escape + , xK_Delete = XK_Delete hunk ./Graphics/X11/Types.hsc 842 - , xK_Multi_key = XK_Multi_key + , xK_Multi_key = XK_Multi_key hunk ./Graphics/X11/Types.hsc 844 --- xK_Codeinput = XK_Codeinput -- Not defined for SunOS. --- xK_SingleCandidate = XK_SingleCandidate -- Not defined for SunOS. --- xK_MultipleCandidate = XK_MultipleCandidate -- Not defined for SunOS. --- xK_PreviousCandidate = XK_PreviousCandidate -- Not defined for SunOS. +-- xK_Codeinput = XK_Codeinput -- Not defined for SunOS. +-- xK_SingleCandidate = XK_SingleCandidate -- Not defined for SunOS. +-- xK_MultipleCandidate = XK_MultipleCandidate -- Not defined for SunOS. +-- xK_PreviousCandidate = XK_PreviousCandidate -- Not defined for SunOS. hunk ./Graphics/X11/Types.hsc 851 - , xK_Home = XK_Home - , xK_Left = XK_Left - , xK_Up = XK_Up - , xK_Right = XK_Right - , xK_Down = XK_Down - , xK_Prior = XK_Prior - , xK_Page_Up = XK_Page_Up - , xK_Next = XK_Next - , xK_Page_Down = XK_Page_Down - , xK_End = XK_End - , xK_Begin = XK_Begin + , xK_Home = XK_Home + , xK_Left = XK_Left + , xK_Up = XK_Up + , xK_Right = XK_Right + , xK_Down = XK_Down + , xK_Prior = XK_Prior + , xK_Page_Up = XK_Page_Up + , xK_Next = XK_Next + , xK_Page_Down = XK_Page_Down + , xK_End = XK_End + , xK_Begin = XK_Begin hunk ./Graphics/X11/Types.hsc 863 - , xK_Select = XK_Select - , xK_Print = XK_Print - , xK_Execute = XK_Execute - , xK_Insert = XK_Insert - , xK_Undo = XK_Undo - , xK_Redo = XK_Redo - , xK_Menu = XK_Menu - , xK_Find = XK_Find - , xK_Cancel = XK_Cancel - , xK_Help = XK_Help - , xK_Break = XK_Break - , xK_Mode_switch = XK_Mode_switch - , xK_script_switch = XK_script_switch - , xK_Num_Lock = XK_Num_Lock + , xK_Select = XK_Select + , xK_Print = XK_Print + , xK_Execute = XK_Execute + , xK_Insert = XK_Insert + , xK_Undo = XK_Undo + , xK_Redo = XK_Redo + , xK_Menu = XK_Menu + , xK_Find = XK_Find + , xK_Cancel = XK_Cancel + , xK_Help = XK_Help + , xK_Break = XK_Break + , xK_Mode_switch = XK_Mode_switch + , xK_script_switch = XK_script_switch + , xK_Num_Lock = XK_Num_Lock hunk ./Graphics/X11/Types.hsc 881 - , xK_KP_Space = XK_KP_Space - , xK_KP_Tab = XK_KP_Tab - , xK_KP_Enter = XK_KP_Enter - , xK_KP_F1 = XK_KP_F1 - , xK_KP_F2 = XK_KP_F2 - , xK_KP_F3 = XK_KP_F3 - , xK_KP_F4 = XK_KP_F4 - , xK_KP_Home = XK_KP_Home - , xK_KP_Left = XK_KP_Left - , xK_KP_Up = XK_KP_Up - , xK_KP_Right = XK_KP_Right - , xK_KP_Down = XK_KP_Down - , xK_KP_Prior = XK_KP_Prior - , xK_KP_Page_Up = XK_KP_Page_Up - , xK_KP_Next = XK_KP_Next - , xK_KP_Page_Down = XK_KP_Page_Down - , xK_KP_End = XK_KP_End - , xK_KP_Begin = XK_KP_Begin - , xK_KP_Insert = XK_KP_Insert - , xK_KP_Delete = XK_KP_Delete - , xK_KP_Equal = XK_KP_Equal - , xK_KP_Multiply = XK_KP_Multiply - , xK_KP_Add = XK_KP_Add - , xK_KP_Separator = XK_KP_Separator - , xK_KP_Subtract = XK_KP_Subtract - , xK_KP_Decimal = XK_KP_Decimal - , xK_KP_Divide = XK_KP_Divide + , xK_KP_Space = XK_KP_Space + , xK_KP_Tab = XK_KP_Tab + , xK_KP_Enter = XK_KP_Enter + , xK_KP_F1 = XK_KP_F1 + , xK_KP_F2 = XK_KP_F2 + , xK_KP_F3 = XK_KP_F3 + , xK_KP_F4 = XK_KP_F4 + , xK_KP_Home = XK_KP_Home + , xK_KP_Left = XK_KP_Left + , xK_KP_Up = XK_KP_Up + , xK_KP_Right = XK_KP_Right + , xK_KP_Down = XK_KP_Down + , xK_KP_Prior = XK_KP_Prior + , xK_KP_Page_Up = XK_KP_Page_Up + , xK_KP_Next = XK_KP_Next + , xK_KP_Page_Down = XK_KP_Page_Down + , xK_KP_End = XK_KP_End + , xK_KP_Begin = XK_KP_Begin + , xK_KP_Insert = XK_KP_Insert + , xK_KP_Delete = XK_KP_Delete + , xK_KP_Equal = XK_KP_Equal + , xK_KP_Multiply = XK_KP_Multiply + , xK_KP_Add = XK_KP_Add + , xK_KP_Separator = XK_KP_Separator + , xK_KP_Subtract = XK_KP_Subtract + , xK_KP_Decimal = XK_KP_Decimal + , xK_KP_Divide = XK_KP_Divide hunk ./Graphics/X11/Types.hsc 909 - , xK_KP_0 = XK_KP_0 - , xK_KP_1 = XK_KP_1 - , xK_KP_2 = XK_KP_2 - , xK_KP_3 = XK_KP_3 - , xK_KP_4 = XK_KP_4 - , xK_KP_5 = XK_KP_5 - , xK_KP_6 = XK_KP_6 - , xK_KP_7 = XK_KP_7 - , xK_KP_8 = XK_KP_8 - , xK_KP_9 = XK_KP_9 + , xK_KP_0 = XK_KP_0 + , xK_KP_1 = XK_KP_1 + , xK_KP_2 = XK_KP_2 + , xK_KP_3 = XK_KP_3 + , xK_KP_4 = XK_KP_4 + , xK_KP_5 = XK_KP_5 + , xK_KP_6 = XK_KP_6 + , xK_KP_7 = XK_KP_7 + , xK_KP_8 = XK_KP_8 + , xK_KP_9 = XK_KP_9 hunk ./Graphics/X11/Types.hsc 920 - , xK_F1 = XK_F1 - , xK_F2 = XK_F2 - , xK_F3 = XK_F3 - , xK_F4 = XK_F4 - , xK_F5 = XK_F5 - , xK_F6 = XK_F6 - , xK_F7 = XK_F7 - , xK_F8 = XK_F8 - , xK_F9 = XK_F9 - , xK_F10 = XK_F10 - , xK_F11 = XK_F11 - , xK_L1 = XK_L1 - , xK_F12 = XK_F12 - , xK_L2 = XK_L2 - , xK_F13 = XK_F13 - , xK_L3 = XK_L3 - , xK_F14 = XK_F14 - , xK_L4 = XK_L4 - , xK_F15 = XK_F15 - , xK_L5 = XK_L5 - , xK_F16 = XK_F16 - , xK_L6 = XK_L6 - , xK_F17 = XK_F17 - , xK_L7 = XK_L7 - , xK_F18 = XK_F18 - , xK_L8 = XK_L8 - , xK_F19 = XK_F19 - , xK_L9 = XK_L9 - , xK_F20 = XK_F20 - , xK_L10 = XK_L10 - , xK_F21 = XK_F21 - , xK_R1 = XK_R1 - , xK_F22 = XK_F22 - , xK_R2 = XK_R2 - , xK_F23 = XK_F23 - , xK_R3 = XK_R3 - , xK_F24 = XK_F24 - , xK_R4 = XK_R4 - , xK_F25 = XK_F25 - , xK_R5 = XK_R5 - , xK_F26 = XK_F26 - , xK_R6 = XK_R6 - , xK_F27 = XK_F27 - , xK_R7 = XK_R7 - , xK_F28 = XK_F28 - , xK_R8 = XK_R8 - , xK_F29 = XK_F29 - , xK_R9 = XK_R9 - , xK_F30 = XK_F30 - , xK_R10 = XK_R10 - , xK_F31 = XK_F31 - , xK_R11 = XK_R11 - , xK_F32 = XK_F32 - , xK_R12 = XK_R12 - , xK_F33 = XK_F33 - , xK_R13 = XK_R13 - , xK_F34 = XK_F34 - , xK_R14 = XK_R14 - , xK_F35 = XK_F35 - , xK_R15 = XK_R15 + , xK_F1 = XK_F1 + , xK_F2 = XK_F2 + , xK_F3 = XK_F3 + , xK_F4 = XK_F4 + , xK_F5 = XK_F5 + , xK_F6 = XK_F6 + , xK_F7 = XK_F7 + , xK_F8 = XK_F8 + , xK_F9 = XK_F9 + , xK_F10 = XK_F10 + , xK_F11 = XK_F11 + , xK_L1 = XK_L1 + , xK_F12 = XK_F12 + , xK_L2 = XK_L2 + , xK_F13 = XK_F13 + , xK_L3 = XK_L3 + , xK_F14 = XK_F14 + , xK_L4 = XK_L4 + , xK_F15 = XK_F15 + , xK_L5 = XK_L5 + , xK_F16 = XK_F16 + , xK_L6 = XK_L6 + , xK_F17 = XK_F17 + , xK_L7 = XK_L7 + , xK_F18 = XK_F18 + , xK_L8 = XK_L8 + , xK_F19 = XK_F19 + , xK_L9 = XK_L9 + , xK_F20 = XK_F20 + , xK_L10 = XK_L10 + , xK_F21 = XK_F21 + , xK_R1 = XK_R1 + , xK_F22 = XK_F22 + , xK_R2 = XK_R2 + , xK_F23 = XK_F23 + , xK_R3 = XK_R3 + , xK_F24 = XK_F24 + , xK_R4 = XK_R4 + , xK_F25 = XK_F25 + , xK_R5 = XK_R5 + , xK_F26 = XK_F26 + , xK_R6 = XK_R6 + , xK_F27 = XK_F27 + , xK_R7 = XK_R7 + , xK_F28 = XK_F28 + , xK_R8 = XK_R8 + , xK_F29 = XK_F29 + , xK_R9 = XK_R9 + , xK_F30 = XK_F30 + , xK_R10 = XK_R10 + , xK_F31 = XK_F31 + , xK_R11 = XK_R11 + , xK_F32 = XK_F32 + , xK_R12 = XK_R12 + , xK_F33 = XK_F33 + , xK_R13 = XK_R13 + , xK_F34 = XK_F34 + , xK_R14 = XK_R14 + , xK_F35 = XK_F35 + , xK_R15 = XK_R15 hunk ./Graphics/X11/Types.hsc 983 - , xK_Shift_L = XK_Shift_L - , xK_Shift_R = XK_Shift_R - , xK_Control_L = XK_Control_L - , xK_Control_R = XK_Control_R - , xK_Caps_Lock = XK_Caps_Lock - , xK_Shift_Lock = XK_Shift_Lock + , xK_Shift_L = XK_Shift_L + , xK_Shift_R = XK_Shift_R + , xK_Control_L = XK_Control_L + , xK_Control_R = XK_Control_R + , xK_Caps_Lock = XK_Caps_Lock + , xK_Shift_Lock = XK_Shift_Lock hunk ./Graphics/X11/Types.hsc 990 - , xK_Meta_L = XK_Meta_L - , xK_Meta_R = XK_Meta_R - , xK_Alt_L = XK_Alt_L - , xK_Alt_R = XK_Alt_R - , xK_Super_L = XK_Super_L - , xK_Super_R = XK_Super_R - , xK_Hyper_L = XK_Hyper_L - , xK_Hyper_R = XK_Hyper_R + , xK_Meta_L = XK_Meta_L + , xK_Meta_R = XK_Meta_R + , xK_Alt_L = XK_Alt_L + , xK_Alt_R = XK_Alt_R + , xK_Super_L = XK_Super_L + , xK_Super_R = XK_Super_R + , xK_Hyper_L = XK_Hyper_L + , xK_Hyper_R = XK_Hyper_R hunk ./Graphics/X11/Types.hsc 1001 - , xK_space = XK_space - , xK_exclam = XK_exclam - , xK_quotedbl = XK_quotedbl - , xK_numbersign = XK_numbersign - , xK_dollar = XK_dollar - , xK_percent = XK_percent - , xK_ampersand = XK_ampersand - , xK_apostrophe = XK_apostrophe - , xK_quoteright = XK_quoteright - , xK_parenleft = XK_parenleft - , xK_parenright = XK_parenright - , xK_asterisk = XK_asterisk - , xK_plus = XK_plus - , xK_comma = XK_comma - , xK_minus = XK_minus - , xK_period = XK_period - , xK_slash = XK_slash - , xK_0 = XK_0 - , xK_1 = XK_1 - , xK_2 = XK_2 - , xK_3 = XK_3 - , xK_4 = XK_4 - , xK_5 = XK_5 - , xK_6 = XK_6 - , xK_7 = XK_7 - , xK_8 = XK_8 - , xK_9 = XK_9 - , xK_colon = XK_colon - , xK_semicolon = XK_semicolon - , xK_less = XK_less - , xK_equal = XK_equal - , xK_greater = XK_greater - , xK_question = XK_question - , xK_at = XK_at - , xK_A = XK_A - , xK_B = XK_B - , xK_C = XK_C - , xK_D = XK_D - , xK_E = XK_E - , xK_F = XK_F - , xK_G = XK_G - , xK_H = XK_H - , xK_I = XK_I - , xK_J = XK_J - , xK_K = XK_K - , xK_L = XK_L - , xK_M = XK_M - , xK_N = XK_N - , xK_O = XK_O - , xK_P = XK_P - , xK_Q = XK_Q - , xK_R = XK_R - , xK_S = XK_S - , xK_T = XK_T - , xK_U = XK_U - , xK_V = XK_V - , xK_W = XK_W - , xK_X = XK_X - , xK_Y = XK_Y - , xK_Z = XK_Z - , xK_bracketleft = XK_bracketleft - , xK_backslash = XK_backslash - , xK_bracketright = XK_bracketright - , xK_asciicircum = XK_asciicircum - , xK_underscore = XK_underscore - , xK_grave = XK_grave - , xK_quoteleft = XK_quoteleft - , xK_a = XK_a - , xK_b = XK_b - , xK_c = XK_c - , xK_d = XK_d - , xK_e = XK_e - , xK_f = XK_f - , xK_g = XK_g - , xK_h = XK_h - , xK_i = XK_i - , xK_j = XK_j - , xK_k = XK_k - , xK_l = XK_l - , xK_m = XK_m - , xK_n = XK_n - , xK_o = XK_o - , xK_p = XK_p - , xK_q = XK_q - , xK_r = XK_r - , xK_s = XK_s - , xK_t = XK_t - , xK_u = XK_u - , xK_v = XK_v - , xK_w = XK_w - , xK_x = XK_x - , xK_y = XK_y - , xK_z = XK_z - , xK_braceleft = XK_braceleft - , xK_bar = XK_bar - , xK_braceright = XK_braceright - , xK_asciitilde = XK_asciitilde + , xK_space = XK_space + , xK_exclam = XK_exclam + , xK_quotedbl = XK_quotedbl + , xK_numbersign = XK_numbersign + , xK_dollar = XK_dollar + , xK_percent = XK_percent + , xK_ampersand = XK_ampersand + , xK_apostrophe = XK_apostrophe + , xK_quoteright = XK_quoteright + , xK_parenleft = XK_parenleft + , xK_parenright = XK_parenright + , xK_asterisk = XK_asterisk + , xK_plus = XK_plus + , xK_comma = XK_comma + , xK_minus = XK_minus + , xK_period = XK_period + , xK_slash = XK_slash + , xK_0 = XK_0 + , xK_1 = XK_1 + , xK_2 = XK_2 + , xK_3 = XK_3 + , xK_4 = XK_4 + , xK_5 = XK_5 + , xK_6 = XK_6 + , xK_7 = XK_7 + , xK_8 = XK_8 + , xK_9 = XK_9 + , xK_colon = XK_colon + , xK_semicolon = XK_semicolon + , xK_less = XK_less + , xK_equal = XK_equal + , xK_greater = XK_greater + , xK_question = XK_question + , xK_at = XK_at + , xK_A = XK_A + , xK_B = XK_B + , xK_C = XK_C + , xK_D = XK_D + , xK_E = XK_E + , xK_F = XK_F + , xK_G = XK_G + , xK_H = XK_H + , xK_I = XK_I + , xK_J = XK_J + , xK_K = XK_K + , xK_L = XK_L + , xK_M = XK_M + , xK_N = XK_N + , xK_O = XK_O + , xK_P = XK_P + , xK_Q = XK_Q + , xK_R = XK_R + , xK_S = XK_S + , xK_T = XK_T + , xK_U = XK_U + , xK_V = XK_V + , xK_W = XK_W + , xK_X = XK_X + , xK_Y = XK_Y + , xK_Z = XK_Z + , xK_bracketleft = XK_bracketleft + , xK_backslash = XK_backslash + , xK_bracketright = XK_bracketright + , xK_asciicircum = XK_asciicircum + , xK_underscore = XK_underscore + , xK_grave = XK_grave + , xK_quoteleft = XK_quoteleft + , xK_a = XK_a + , xK_b = XK_b + , xK_c = XK_c + , xK_d = XK_d + , xK_e = XK_e + , xK_f = XK_f + , xK_g = XK_g + , xK_h = XK_h + , xK_i = XK_i + , xK_j = XK_j + , xK_k = XK_k + , xK_l = XK_l + , xK_m = XK_m + , xK_n = XK_n + , xK_o = XK_o + , xK_p = XK_p + , xK_q = XK_q + , xK_r = XK_r + , xK_s = XK_s + , xK_t = XK_t + , xK_u = XK_u + , xK_v = XK_v + , xK_w = XK_w + , xK_x = XK_x + , xK_y = XK_y + , xK_z = XK_z + , xK_braceleft = XK_braceleft + , xK_bar = XK_bar + , xK_braceright = XK_braceright + , xK_asciitilde = XK_asciitilde hunk ./Graphics/X11/Types.hsc 1101 - , xK_nobreakspace = XK_nobreakspace - , xK_exclamdown = XK_exclamdown - , xK_cent = XK_cent - , xK_sterling = XK_sterling - , xK_currency = XK_currency - , xK_yen = XK_yen - , xK_brokenbar = XK_brokenbar - , xK_section = XK_section - , xK_diaeresis = XK_diaeresis - , xK_copyright = XK_copyright - , xK_ordfeminine = XK_ordfeminine - , xK_guillemotleft = XK_guillemotleft - , xK_notsign = XK_notsign - , xK_hyphen = XK_hyphen - , xK_registered = XK_registered - , xK_macron = XK_macron - , xK_degree = XK_degree - , xK_plusminus = XK_plusminus - , xK_twosuperior = XK_twosuperior - , xK_threesuperior = XK_threesuperior - , xK_acute = XK_acute - , xK_mu = XK_mu - , xK_paragraph = XK_paragraph - , xK_periodcentered = XK_periodcentered - , xK_cedilla = XK_cedilla - , xK_onesuperior = XK_onesuperior - , xK_masculine = XK_masculine - , xK_guillemotright = XK_guillemotright - , xK_onequarter = XK_onequarter - , xK_onehalf = XK_onehalf - , xK_threequarters = XK_threequarters - , xK_questiondown = XK_questiondown - , xK_Agrave = XK_Agrave - , xK_Aacute = XK_Aacute - , xK_Acircumflex = XK_Acircumflex - , xK_Atilde = XK_Atilde - , xK_Adiaeresis = XK_Adiaeresis - , xK_Aring = XK_Aring - , xK_AE = XK_AE - , xK_Ccedilla = XK_Ccedilla - , xK_Egrave = XK_Egrave - , xK_Eacute = XK_Eacute - , xK_Ecircumflex = XK_Ecircumflex - , xK_Ediaeresis = XK_Ediaeresis - , xK_Igrave = XK_Igrave - , xK_Iacute = XK_Iacute - , xK_Icircumflex = XK_Icircumflex - , xK_Idiaeresis = XK_Idiaeresis - , xK_ETH = XK_ETH - , xK_Eth = XK_Eth - , xK_Ntilde = XK_Ntilde - , xK_Ograve = XK_Ograve - , xK_Oacute = XK_Oacute - , xK_Ocircumflex = XK_Ocircumflex - , xK_Otilde = XK_Otilde - , xK_Odiaeresis = XK_Odiaeresis - , xK_multiply = XK_multiply - , xK_Ooblique = XK_Ooblique - , xK_Ugrave = XK_Ugrave - , xK_Uacute = XK_Uacute - , xK_Ucircumflex = XK_Ucircumflex - , xK_Udiaeresis = XK_Udiaeresis - , xK_Yacute = XK_Yacute - , xK_THORN = XK_THORN - , xK_Thorn = XK_Thorn - , xK_ssharp = XK_ssharp - , xK_agrave = XK_agrave - , xK_aacute = XK_aacute - , xK_acircumflex = XK_acircumflex - , xK_atilde = XK_atilde - , xK_adiaeresis = XK_adiaeresis - , xK_aring = XK_aring - , xK_ae = XK_ae - , xK_ccedilla = XK_ccedilla - , xK_egrave = XK_egrave - , xK_eacute = XK_eacute - , xK_ecircumflex = XK_ecircumflex - , xK_ediaeresis = XK_ediaeresis - , xK_igrave = XK_igrave - , xK_iacute = XK_iacute - , xK_icircumflex = XK_icircumflex - , xK_idiaeresis = XK_idiaeresis - , xK_eth = XK_eth - , xK_ntilde = XK_ntilde - , xK_ograve = XK_ograve - , xK_oacute = XK_oacute - , xK_ocircumflex = XK_ocircumflex - , xK_otilde = XK_otilde - , xK_odiaeresis = XK_odiaeresis - , xK_division = XK_division - , xK_oslash = XK_oslash - , xK_ugrave = XK_ugrave - , xK_uacute = XK_uacute - , xK_ucircumflex = XK_ucircumflex - , xK_udiaeresis = XK_udiaeresis - , xK_yacute = XK_yacute - , xK_thorn = XK_thorn - , xK_ydiaeresis = XK_ydiaeresis + , xK_nobreakspace = XK_nobreakspace + , xK_exclamdown = XK_exclamdown + , xK_cent = XK_cent + , xK_sterling = XK_sterling + , xK_currency = XK_currency + , xK_yen = XK_yen + , xK_brokenbar = XK_brokenbar + , xK_section = XK_section + , xK_diaeresis = XK_diaeresis + , xK_copyright = XK_copyright + , xK_ordfeminine = XK_ordfeminine + , xK_guillemotleft = XK_guillemotleft + , xK_notsign = XK_notsign + , xK_hyphen = XK_hyphen + , xK_registered = XK_registered + , xK_macron = XK_macron + , xK_degree = XK_degree + , xK_plusminus = XK_plusminus + , xK_twosuperior = XK_twosuperior + , xK_threesuperior = XK_threesuperior + , xK_acute = XK_acute + , xK_mu = XK_mu + , xK_paragraph = XK_paragraph + , xK_periodcentered = XK_periodcentered + , xK_cedilla = XK_cedilla + , xK_onesuperior = XK_onesuperior + , xK_masculine = XK_masculine + , xK_guillemotright = XK_guillemotright + , xK_onequarter = XK_onequarter + , xK_onehalf = XK_onehalf + , xK_threequarters = XK_threequarters + , xK_questiondown = XK_questiondown + , xK_Agrave = XK_Agrave + , xK_Aacute = XK_Aacute + , xK_Acircumflex = XK_Acircumflex + , xK_Atilde = XK_Atilde + , xK_Adiaeresis = XK_Adiaeresis + , xK_Aring = XK_Aring + , xK_AE = XK_AE + , xK_Ccedilla = XK_Ccedilla + , xK_Egrave = XK_Egrave + , xK_Eacute = XK_Eacute + , xK_Ecircumflex = XK_Ecircumflex + , xK_Ediaeresis = XK_Ediaeresis + , xK_Igrave = XK_Igrave + , xK_Iacute = XK_Iacute + , xK_Icircumflex = XK_Icircumflex + , xK_Idiaeresis = XK_Idiaeresis + , xK_ETH = XK_ETH + , xK_Eth = XK_Eth + , xK_Ntilde = XK_Ntilde + , xK_Ograve = XK_Ograve + , xK_Oacute = XK_Oacute + , xK_Ocircumflex = XK_Ocircumflex + , xK_Otilde = XK_Otilde + , xK_Odiaeresis = XK_Odiaeresis + , xK_multiply = XK_multiply + , xK_Ooblique = XK_Ooblique + , xK_Ugrave = XK_Ugrave + , xK_Uacute = XK_Uacute + , xK_Ucircumflex = XK_Ucircumflex + , xK_Udiaeresis = XK_Udiaeresis + , xK_Yacute = XK_Yacute + , xK_THORN = XK_THORN + , xK_Thorn = XK_Thorn + , xK_ssharp = XK_ssharp + , xK_agrave = XK_agrave + , xK_aacute = XK_aacute + , xK_acircumflex = XK_acircumflex + , xK_atilde = XK_atilde + , xK_adiaeresis = XK_adiaeresis + , xK_aring = XK_aring + , xK_ae = XK_ae + , xK_ccedilla = XK_ccedilla + , xK_egrave = XK_egrave + , xK_eacute = XK_eacute + , xK_ecircumflex = XK_ecircumflex + , xK_ediaeresis = XK_ediaeresis + , xK_igrave = XK_igrave + , xK_iacute = XK_iacute + , xK_icircumflex = XK_icircumflex + , xK_idiaeresis = XK_idiaeresis + , xK_eth = XK_eth + , xK_ntilde = XK_ntilde + , xK_ograve = XK_ograve + , xK_oacute = XK_oacute + , xK_ocircumflex = XK_ocircumflex + , xK_otilde = XK_otilde + , xK_odiaeresis = XK_odiaeresis + , xK_division = XK_division + , xK_oslash = XK_oslash + , xK_ugrave = XK_ugrave + , xK_uacute = XK_uacute + , xK_ucircumflex = XK_ucircumflex + , xK_udiaeresis = XK_udiaeresis + , xK_yacute = XK_yacute + , xK_thorn = XK_thorn + , xK_ydiaeresis = XK_ydiaeresis hunk ./Graphics/X11/Types.hsc 1201 -type EventMask = Mask +type EventMask = Mask hunk ./Graphics/X11/Types.hsc 1203 - , noEventMask = NoEventMask - , keyPressMask = KeyPressMask - , keyReleaseMask = KeyReleaseMask - , buttonPressMask = ButtonPressMask - , buttonReleaseMask = ButtonReleaseMask - , enterWindowMask = EnterWindowMask - , leaveWindowMask = LeaveWindowMask - , pointerMotionMask = PointerMotionMask - , pointerMotionHintMask = PointerMotionHintMask - , button1MotionMask = Button1MotionMask - , button2MotionMask = Button2MotionMask - , button3MotionMask = Button3MotionMask - , button4MotionMask = Button4MotionMask - , button5MotionMask = Button5MotionMask - , buttonMotionMask = ButtonMotionMask - , keymapStateMask = KeymapStateMask - , exposureMask = ExposureMask - , visibilityChangeMask = VisibilityChangeMask - , structureNotifyMask = StructureNotifyMask - , resizeRedirectMask = ResizeRedirectMask - , substructureNotifyMask = SubstructureNotifyMask - , substructureRedirectMask = SubstructureRedirectMask - , focusChangeMask = FocusChangeMask - , propertyChangeMask = PropertyChangeMask - , colormapChangeMask = ColormapChangeMask - , ownerGrabButtonMask = OwnerGrabButtonMask + , noEventMask = NoEventMask + , keyPressMask = KeyPressMask + , keyReleaseMask = KeyReleaseMask + , buttonPressMask = ButtonPressMask + , buttonReleaseMask = ButtonReleaseMask + , enterWindowMask = EnterWindowMask + , leaveWindowMask = LeaveWindowMask + , pointerMotionMask = PointerMotionMask + , pointerMotionHintMask = PointerMotionHintMask + , button1MotionMask = Button1MotionMask + , button2MotionMask = Button2MotionMask + , button3MotionMask = Button3MotionMask + , button4MotionMask = Button4MotionMask + , button5MotionMask = Button5MotionMask + , buttonMotionMask = ButtonMotionMask + , keymapStateMask = KeymapStateMask + , exposureMask = ExposureMask + , visibilityChangeMask = VisibilityChangeMask + , structureNotifyMask = StructureNotifyMask + , resizeRedirectMask = ResizeRedirectMask + , substructureNotifyMask = SubstructureNotifyMask + , substructureRedirectMask = SubstructureRedirectMask + , focusChangeMask = FocusChangeMask + , propertyChangeMask = PropertyChangeMask + , colormapChangeMask = ColormapChangeMask + , ownerGrabButtonMask = OwnerGrabButtonMask hunk ./Graphics/X11/Types.hsc 1231 -type EventType = Word32 +type EventType = Word32 hunk ./Graphics/X11/Types.hsc 1233 - , keyPress = KeyPress - , keyRelease = KeyRelease - , buttonPress = ButtonPress - , buttonRelease = ButtonRelease - , motionNotify = MotionNotify - , enterNotify = EnterNotify - , leaveNotify = LeaveNotify - , focusIn = FocusIn - , focusOut = FocusOut - , keymapNotify = KeymapNotify - , expose = Expose - , graphicsExpose = GraphicsExpose - , noExpose = NoExpose - , visibilityNotify = VisibilityNotify - , createNotify = CreateNotify - , destroyNotify = DestroyNotify - , unmapNotify = UnmapNotify - , mapNotify = MapNotify - , mapRequest = MapRequest - , reparentNotify = ReparentNotify - , configureNotify = ConfigureNotify - , configureRequest = ConfigureRequest - , gravityNotify = GravityNotify - , resizeRequest = ResizeRequest - , circulateNotify = CirculateNotify - , circulateRequest = CirculateRequest - , propertyNotify = PropertyNotify - , selectionClear = SelectionClear - , selectionRequest = SelectionRequest - , selectionNotify = SelectionNotify - , colormapNotify = ColormapNotify - , clientMessage = ClientMessage - , mappingNotify = MappingNotify - , lASTEvent = LASTEvent + , keyPress = KeyPress + , keyRelease = KeyRelease + , buttonPress = ButtonPress + , buttonRelease = ButtonRelease + , motionNotify = MotionNotify + , enterNotify = EnterNotify + , leaveNotify = LeaveNotify + , focusIn = FocusIn + , focusOut = FocusOut + , keymapNotify = KeymapNotify + , expose = Expose + , graphicsExpose = GraphicsExpose + , noExpose = NoExpose + , visibilityNotify = VisibilityNotify + , createNotify = CreateNotify + , destroyNotify = DestroyNotify + , unmapNotify = UnmapNotify + , mapNotify = MapNotify + , mapRequest = MapRequest + , reparentNotify = ReparentNotify + , configureNotify = ConfigureNotify + , configureRequest = ConfigureRequest + , gravityNotify = GravityNotify + , resizeRequest = ResizeRequest + , circulateNotify = CirculateNotify + , circulateRequest = CirculateRequest + , propertyNotify = PropertyNotify + , selectionClear = SelectionClear + , selectionRequest = SelectionRequest + , selectionNotify = SelectionNotify + , colormapNotify = ColormapNotify + , clientMessage = ClientMessage + , mappingNotify = MappingNotify + , lASTEvent = LASTEvent hunk ./Graphics/X11/Types.hsc 1269 -type Modifier = CUInt +type Modifier = CUInt hunk ./Graphics/X11/Types.hsc 1271 - , shiftMapIndex = ShiftMapIndex - , lockMapIndex = LockMapIndex - , controlMapIndex = ControlMapIndex - , mod1MapIndex = Mod1MapIndex - , mod2MapIndex = Mod2MapIndex - , mod3MapIndex = Mod3MapIndex - , mod4MapIndex = Mod4MapIndex - , mod5MapIndex = Mod5MapIndex - , anyModifier = AnyModifier + , shiftMapIndex = ShiftMapIndex + , lockMapIndex = LockMapIndex + , controlMapIndex = ControlMapIndex + , mod1MapIndex = Mod1MapIndex + , mod2MapIndex = Mod2MapIndex + , mod3MapIndex = Mod3MapIndex + , mod4MapIndex = Mod4MapIndex + , mod5MapIndex = Mod5MapIndex + , anyModifier = AnyModifier hunk ./Graphics/X11/Types.hsc 1282 -type KeyMask = Modifier +type KeyMask = Modifier hunk ./Graphics/X11/Types.hsc 1284 - , shiftMask = ShiftMask - , lockMask = LockMask - , controlMask = ControlMask - , mod1Mask = Mod1Mask - , mod2Mask = Mod2Mask - , mod3Mask = Mod3Mask - , mod4Mask = Mod4Mask - , mod5Mask = Mod5Mask + , shiftMask = ShiftMask + , lockMask = LockMask + , controlMask = ControlMask + , mod1Mask = Mod1Mask + , mod2Mask = Mod2Mask + , mod3Mask = Mod3Mask + , mod4Mask = Mod4Mask + , mod5Mask = Mod5Mask hunk ./Graphics/X11/Types.hsc 1294 -type ButtonMask = Modifier +type ButtonMask = Modifier hunk ./Graphics/X11/Types.hsc 1296 - , button1Mask = Button1Mask - , button2Mask = Button2Mask - , button3Mask = Button3Mask - , button4Mask = Button4Mask - , button5Mask = Button5Mask + , button1Mask = Button1Mask + , button2Mask = Button2Mask + , button3Mask = Button3Mask + , button4Mask = Button4Mask + , button5Mask = Button5Mask hunk ./Graphics/X11/Types.hsc 1303 -type Button = Word32 +type Button = Word32 hunk ./Graphics/X11/Types.hsc 1305 - , button1 = Button1 - , button2 = Button2 - , button3 = Button3 - , button4 = Button4 - , button5 = Button5 + , button1 = Button1 + , button2 = Button2 + , button3 = Button3 + , button4 = Button4 + , button5 = Button5 hunk ./Graphics/X11/Types.hsc 1312 -type NotifyMode = CInt +type NotifyMode = CInt hunk ./Graphics/X11/Types.hsc 1315 - , notifyNormal = NotifyNormal - , notifyGrab = NotifyGrab - , notifyUngrab = NotifyUngrab - , notifyWhileGrabbed = NotifyWhileGrabbed - , notifyHint = NotifyHint + , notifyNormal = NotifyNormal + , notifyGrab = NotifyGrab + , notifyUngrab = NotifyUngrab + , notifyWhileGrabbed = NotifyWhileGrabbed + , notifyHint = NotifyHint hunk ./Graphics/X11/Types.hsc 1322 -type NotifyDetail = CInt +type NotifyDetail = CInt hunk ./Graphics/X11/Types.hsc 1324 - , notifyAncestor = NotifyAncestor - , notifyVirtual = NotifyVirtual - , notifyInferior = NotifyInferior - , notifyNonlinear = NotifyNonlinear + , notifyAncestor = NotifyAncestor + , notifyVirtual = NotifyVirtual + , notifyInferior = NotifyInferior + , notifyNonlinear = NotifyNonlinear hunk ./Graphics/X11/Types.hsc 1329 - , notifyPointer = NotifyPointer - , notifyPointerRoot = NotifyPointerRoot - , notifyDetailNone = NotifyDetailNone + , notifyPointer = NotifyPointer + , notifyPointerRoot = NotifyPointerRoot + , notifyDetailNone = NotifyDetailNone hunk ./Graphics/X11/Types.hsc 1336 - , visibilityUnobscured = VisibilityUnobscured - , visibilityPartiallyObscured = VisibilityPartiallyObscured - , visibilityFullyObscured = VisibilityFullyObscured + , visibilityUnobscured = VisibilityUnobscured + , visibilityPartiallyObscured = VisibilityPartiallyObscured + , visibilityFullyObscured = VisibilityFullyObscured hunk ./Graphics/X11/Types.hsc 1345 - , placeOnTop = PlaceOnTop - , placeOnBottom = PlaceOnBottom + , placeOnTop = PlaceOnTop + , placeOnBottom = PlaceOnBottom hunk ./Graphics/X11/Types.hsc 1349 -type Protocol = CInt +type Protocol = CInt hunk ./Graphics/X11/Types.hsc 1351 - , familyInternet = FamilyInternet - , familyDECnet = FamilyDECnet - , familyChaos = FamilyChaos + , familyInternet = FamilyInternet + , familyDECnet = FamilyDECnet + , familyChaos = FamilyChaos hunk ./Graphics/X11/Types.hsc 1358 - , propertyNewValue = PropertyNewValue - , propertyDelete = PropertyDelete + , propertyNewValue = PropertyNewValue + , propertyDelete = PropertyDelete hunk ./Graphics/X11/Types.hsc 1364 - , colormapUninstalled = ColormapUninstalled - , colormapInstalled = ColormapInstalled + , colormapUninstalled = ColormapUninstalled + , colormapInstalled = ColormapInstalled hunk ./Graphics/X11/Types.hsc 1369 -type GrabMode = CInt +type GrabMode = CInt hunk ./Graphics/X11/Types.hsc 1371 - , grabModeSync = GrabModeSync - , grabModeAsync = GrabModeAsync + , grabModeSync = GrabModeSync + , grabModeAsync = GrabModeAsync hunk ./Graphics/X11/Types.hsc 1377 -type GrabStatus = CInt +type GrabStatus = CInt hunk ./Graphics/X11/Types.hsc 1379 - , grabSuccess = GrabSuccess - , alreadyGrabbed = AlreadyGrabbed - , grabInvalidTime = GrabInvalidTime - , grabNotViewable = GrabNotViewable - , grabFrozen = GrabFrozen + , grabSuccess = GrabSuccess + , alreadyGrabbed = AlreadyGrabbed + , grabInvalidTime = GrabInvalidTime + , grabNotViewable = GrabNotViewable + , grabFrozen = GrabFrozen hunk ./Graphics/X11/Types.hsc 1387 -type AllowEvents = CInt +type AllowEvents = CInt hunk ./Graphics/X11/Types.hsc 1389 - , asyncPointer = AsyncPointer - , syncPointer = SyncPointer - , replayPointer = ReplayPointer - , asyncKeyboard = AsyncKeyboard - , syncKeyboard = SyncKeyboard - , replayKeyboard = ReplayKeyboard - , asyncBoth = AsyncBoth - , syncBoth = SyncBoth + , asyncPointer = AsyncPointer + , syncPointer = SyncPointer + , replayPointer = ReplayPointer + , asyncKeyboard = AsyncKeyboard + , syncKeyboard = SyncKeyboard + , replayKeyboard = ReplayKeyboard + , asyncBoth = AsyncBoth + , syncBoth = SyncBoth hunk ./Graphics/X11/Types.hsc 1400 -type FocusMode = CInt +type FocusMode = CInt hunk ./Graphics/X11/Types.hsc 1402 - , revertToNone = RevertToNone - , revertToPointerRoot = RevertToPointerRoot - , revertToParent = RevertToParent + , revertToNone = RevertToNone + , revertToPointerRoot = RevertToPointerRoot + , revertToParent = RevertToParent hunk ./Graphics/X11/Types.hsc 1408 -type ErrorCode = CInt +type ErrorCode = CInt hunk ./Graphics/X11/Types.hsc 1410 - , success = Success - , badRequest = BadRequest - , badValue = BadValue - , badWindow = BadWindow - , badPixmap = BadPixmap - , badAtom = BadAtom - , badCursor = BadCursor - , badFont = BadFont - , badMatch = BadMatch - , badDrawable = BadDrawable - , badAccess = BadAccess - , badAlloc = BadAlloc - , badColor = BadColor - , badGC = BadGC - , badIDChoice = BadIDChoice - , badName = BadName - , badLength = BadLength - , badImplementation = BadImplementation - , firstExtensionError = FirstExtensionError - , lastExtensionError = LastExtensionError + , success = Success + , badRequest = BadRequest + , badValue = BadValue + , badWindow = BadWindow + , badPixmap = BadPixmap + , badAtom = BadAtom + , badCursor = BadCursor + , badFont = BadFont + , badMatch = BadMatch + , badDrawable = BadDrawable + , badAccess = BadAccess + , badAlloc = BadAlloc + , badColor = BadColor + , badGC = BadGC + , badIDChoice = BadIDChoice + , badName = BadName + , badLength = BadLength + , badImplementation = BadImplementation + , firstExtensionError = FirstExtensionError + , lastExtensionError = LastExtensionError hunk ./Graphics/X11/Types.hsc 1432 -type Status = CInt +type Status = CInt hunk ./Graphics/X11/Types.hsc 1439 -type WindowClass = CInt +type WindowClass = CInt hunk ./Graphics/X11/Types.hsc 1441 - , copyFromParent = CopyFromParent - , inputOutput = InputOutput - , inputOnly = InputOnly + , copyFromParent = CopyFromParent + , inputOutput = InputOutput + , inputOnly = InputOnly hunk ./Graphics/X11/Types.hsc 1447 -type AttributeMask = Mask +type AttributeMask = Mask hunk ./Graphics/X11/Types.hsc 1449 - , cWBackPixmap = CWBackPixmap - , cWBackPixel = CWBackPixel - , cWBorderPixmap = CWBorderPixmap - , cWBorderPixel = CWBorderPixel - , cWBitGravity = CWBitGravity - , cWWinGravity = CWWinGravity - , cWBackingStore = CWBackingStore - , cWBackingPlanes = CWBackingPlanes - , cWBackingPixel = CWBackingPixel - , cWOverrideRedirect = CWOverrideRedirect - , cWSaveUnder = CWSaveUnder - , cWEventMask = CWEventMask - , cWDontPropagate = CWDontPropagate - , cWColormap = CWColormap - , cWCursor = CWCursor + , cWBackPixmap = CWBackPixmap + , cWBackPixel = CWBackPixel + , cWBorderPixmap = CWBorderPixmap + , cWBorderPixel = CWBorderPixel + , cWBitGravity = CWBitGravity + , cWWinGravity = CWWinGravity + , cWBackingStore = CWBackingStore + , cWBackingPlanes = CWBackingPlanes + , cWBackingPixel = CWBackingPixel + , cWOverrideRedirect = CWOverrideRedirect + , cWSaveUnder = CWSaveUnder + , cWEventMask = CWEventMask + , cWDontPropagate = CWDontPropagate + , cWColormap = CWColormap + , cWCursor = CWCursor hunk ./Graphics/X11/Types.hsc 1467 -type CloseDownMode = CInt +type CloseDownMode = CInt hunk ./Graphics/X11/Types.hsc 1469 - , destroyAll = DestroyAll - , retainPermanent = RetainPermanent - , retainTemporary = RetainTemporary + , destroyAll = DestroyAll + , retainPermanent = RetainPermanent + , retainTemporary = RetainTemporary hunk ./Graphics/X11/Types.hsc 1480 - , cursorShape = CursorShape - , tileShape = TileShape - , stippleShape = StippleShape + , cursorShape = CursorShape + , tileShape = TileShape + , stippleShape = StippleShape hunk ./Graphics/X11/Types.hsc 1491 -type GXFunction = CInt +type GXFunction = CInt hunk ./Graphics/X11/Types.hsc 1493 - , gXclear = GXclear - , gXand = GXand - , gXandReverse = GXandReverse - , gXcopy = GXcopy - , gXandInverted = GXandInverted - , gXnoop = GXnoop - , gXxor = GXxor - , gXor = GXor - , gXnor = GXnor - , gXequiv = GXequiv - , gXinvert = GXinvert - , gXorReverse = GXorReverse - , gXcopyInverted = GXcopyInverted - , gXorInverted = GXorInverted - , gXnand = GXnand - , gXset = GXset + , gXclear = GXclear + , gXand = GXand + , gXandReverse = GXandReverse + , gXcopy = GXcopy + , gXandInverted = GXandInverted + , gXnoop = GXnoop + , gXxor = GXxor + , gXor = GXor + , gXnor = GXnor + , gXequiv = GXequiv + , gXinvert = GXinvert + , gXorReverse = GXorReverse + , gXcopyInverted = GXcopyInverted + , gXorInverted = GXorInverted + , gXnand = GXnand + , gXset = GXset hunk ./Graphics/X11/Types.hsc 1511 -type LineStyle = CInt +type LineStyle = CInt hunk ./Graphics/X11/Types.hsc 1513 - , lineSolid = LineSolid - , lineOnOffDash = LineOnOffDash - , lineDoubleDash = LineDoubleDash + , lineSolid = LineSolid + , lineOnOffDash = LineOnOffDash + , lineDoubleDash = LineDoubleDash hunk ./Graphics/X11/Types.hsc 1518 -type CapStyle = CInt +type CapStyle = CInt hunk ./Graphics/X11/Types.hsc 1520 - , capNotLast = CapNotLast - , capButt = CapButt - , capRound = CapRound - , capProjecting = CapProjecting + , capNotLast = CapNotLast + , capButt = CapButt + , capRound = CapRound + , capProjecting = CapProjecting hunk ./Graphics/X11/Types.hsc 1526 -type JoinStyle = CInt +type JoinStyle = CInt hunk ./Graphics/X11/Types.hsc 1528 - , joinMiter = JoinMiter - , joinRound = JoinRound - , joinBevel = JoinBevel + , joinMiter = JoinMiter + , joinRound = JoinRound + , joinBevel = JoinBevel hunk ./Graphics/X11/Types.hsc 1533 -type FillStyle = CInt +type FillStyle = CInt hunk ./Graphics/X11/Types.hsc 1535 - , fillSolid = FillSolid - , fillTiled = FillTiled - , fillStippled = FillStippled - , fillOpaqueStippled = FillOpaqueStippled + , fillSolid = FillSolid + , fillTiled = FillTiled + , fillStippled = FillStippled + , fillOpaqueStippled = FillOpaqueStippled hunk ./Graphics/X11/Types.hsc 1541 -type FillRule = CInt +type FillRule = CInt hunk ./Graphics/X11/Types.hsc 1543 - , evenOddRule = EvenOddRule - , windingRule = WindingRule + , evenOddRule = EvenOddRule + , windingRule = WindingRule hunk ./Graphics/X11/Types.hsc 1547 -type SubWindowMode = CInt +type SubWindowMode = CInt hunk ./Graphics/X11/Types.hsc 1549 - , clipByChildren = ClipByChildren - , includeInferiors = IncludeInferiors + , clipByChildren = ClipByChildren + , includeInferiors = IncludeInferiors hunk ./Graphics/X11/Types.hsc 1556 --- , unsorted = Unsorted --- , ySorted = YSorted --- , yXSorted = YXSorted --- , yXBanded = YXBanded +-- , unsorted = Unsorted +-- , ySorted = YSorted +-- , yXSorted = YXSorted +-- , yXBanded = YXBanded hunk ./Graphics/X11/Types.hsc 1563 -type CoordinateMode = CInt +type CoordinateMode = CInt hunk ./Graphics/X11/Types.hsc 1565 - , coordModeOrigin = CoordModeOrigin - , coordModePrevious = CoordModePrevious + , coordModeOrigin = CoordModeOrigin + , coordModePrevious = CoordModePrevious hunk ./Graphics/X11/Types.hsc 1569 -type PolygonShape = CInt +type PolygonShape = CInt hunk ./Graphics/X11/Types.hsc 1571 - , complex = Complex - , nonconvex = Nonconvex - , convex = Convex + , complex = Complex + , nonconvex = Nonconvex + , convex = Convex hunk ./Graphics/X11/Types.hsc 1577 -type ArcMode = CInt +type ArcMode = CInt hunk ./Graphics/X11/Types.hsc 1579 - , arcChord = ArcChord - , arcPieSlice = ArcPieSlice + , arcChord = ArcChord + , arcPieSlice = ArcPieSlice hunk ./Graphics/X11/Types.hsc 1586 -type GCMask = CInt +type GCMask = CInt hunk ./Graphics/X11/Types.hsc 1588 - , gCFunction = GCFunction - , gCPlaneMask = GCPlaneMask - , gCForeground = GCForeground - , gCBackground = GCBackground - , gCLineWidth = GCLineWidth - , gCLineStyle = GCLineStyle - , gCCapStyle = GCCapStyle - , gCJoinStyle = GCJoinStyle - , gCFillStyle = GCFillStyle - , gCFillRule = GCFillRule - , gCTile = GCTile - , gCStipple = GCStipple - , gCTileStipXOrigin = GCTileStipXOrigin - , gCTileStipYOrigin = GCTileStipYOrigin - , gCFont = GCFont - , gCSubwindowMode = GCSubwindowMode - , gCGraphicsExposures = GCGraphicsExposures - , gCClipXOrigin = GCClipXOrigin - , gCClipYOrigin = GCClipYOrigin - , gCClipMask = GCClipMask - , gCDashOffset = GCDashOffset - , gCDashList = GCDashList - , gCArcMode = GCArcMode - , gCLastBit = GCLastBit + , gCFunction = GCFunction + , gCPlaneMask = GCPlaneMask + , gCForeground = GCForeground + , gCBackground = GCBackground + , gCLineWidth = GCLineWidth + , gCLineStyle = GCLineStyle + , gCCapStyle = GCCapStyle + , gCJoinStyle = GCJoinStyle + , gCFillStyle = GCFillStyle + , gCFillRule = GCFillRule + , gCTile = GCTile + , gCStipple = GCStipple + , gCTileStipXOrigin = GCTileStipXOrigin + , gCTileStipYOrigin = GCTileStipYOrigin + , gCFont = GCFont + , gCSubwindowMode = GCSubwindowMode + , gCGraphicsExposures = GCGraphicsExposures + , gCClipXOrigin = GCClipXOrigin + , gCClipYOrigin = GCClipYOrigin + , gCClipMask = GCClipMask + , gCDashOffset = GCDashOffset + , gCDashList = GCDashList + , gCArcMode = GCArcMode + , gCLastBit = GCLastBit hunk ./Graphics/X11/Types.hsc 1616 - , raiseLowest = RaiseLowest - , lowerHighest = LowerHighest + , raiseLowest = RaiseLowest + , lowerHighest = LowerHighest hunk ./Graphics/X11/Types.hsc 1621 -type ByteOrder = CInt +type ByteOrder = CInt hunk ./Graphics/X11/Types.hsc 1623 - , lSBFirst = LSBFirst - , mSBFirst = MSBFirst + , lSBFirst = LSBFirst + , mSBFirst = MSBFirst hunk ./Graphics/X11/Types.hsc 1627 -type ColormapAlloc = CInt +type ColormapAlloc = CInt hunk ./Graphics/X11/Types.hsc 1629 - , allocNone = AllocNone - , allocAll = AllocAll + , allocNone = AllocNone + , allocAll = AllocAll hunk ./Graphics/X11/Types.hsc 1635 - , mappingModifier = MappingModifier - , mappingKeyboard = MappingKeyboard - , mappingPointer = MappingPointer + , mappingModifier = MappingModifier + , mappingKeyboard = MappingKeyboard + , mappingPointer = MappingPointer hunk ./Graphics/X11/Types.hsc 1642 - , setModeInsert = SetModeInsert - , setModeDelete = SetModeDelete + , setModeInsert = SetModeInsert + , setModeDelete = SetModeDelete hunk ./Graphics/X11/Types.hsc 1646 -type BitGravity = CInt +type BitGravity = CInt hunk ./Graphics/X11/Types.hsc 1648 - , forgetGravity = ForgetGravity - , northWestGravity = NorthWestGravity - , northGravity = NorthGravity - , northEastGravity = NorthEastGravity - , westGravity = WestGravity - , centerGravity = CenterGravity - , eastGravity = EastGravity - , southWestGravity = SouthWestGravity - , southGravity = SouthGravity - , southEastGravity = SouthEastGravity - , staticGravity = StaticGravity + , forgetGravity = ForgetGravity + , northWestGravity = NorthWestGravity + , northGravity = NorthGravity + , northEastGravity = NorthEastGravity + , westGravity = WestGravity + , centerGravity = CenterGravity + , eastGravity = EastGravity + , southWestGravity = SouthWestGravity + , southGravity = SouthGravity + , southEastGravity = SouthEastGravity + , staticGravity = StaticGravity hunk ./Graphics/X11/Types.hsc 1664 - , unmapGravity = UnmapGravity + , unmapGravity = UnmapGravity hunk ./Graphics/X11/Types.hsc 1668 -type BackingStore = CInt +type BackingStore = CInt hunk ./Graphics/X11/Types.hsc 1670 - , notUseful = NotUseful - , whenMapped = WhenMapped - , always = Always + , notUseful = NotUseful + , whenMapped = WhenMapped + , always = Always hunk ./Graphics/X11/Types.hsc 1676 - , doRed = DoRed - , doGreen = DoGreen - , doBlue = DoBlue + , doRed = DoRed + , doGreen = DoGreen + , doBlue = DoBlue hunk ./Graphics/X11/Types.hsc 1683 - , fontLeftToRight = FontLeftToRight - , fontRightToLeft = FontRightToLeft + , fontLeftToRight = FontLeftToRight + , fontRightToLeft = FontRightToLeft hunk ./Graphics/X11/Types.hsc 1689 - , xyBitmap = XYBitmap - , xyPixmap = XYPixmap - , zPixmap = ZPixmap + , xyBitmap = XYBitmap + , xyPixmap = XYPixmap + , zPixmap = ZPixmap hunk ./Graphics/X11/Xlib/Atom.hsc 106 - withCString atom_name $ \ c_atom_name -> - xInternAtom display c_atom_name only_if_exists + withCString atom_name $ \ c_atom_name -> + xInternAtom display c_atom_name only_if_exists hunk ./Graphics/X11/Xlib/Atom.hsc 109 - xInternAtom :: Display -> CString -> Bool -> IO Atom + xInternAtom :: Display -> CString -> Bool -> IO Atom hunk ./Graphics/X11/Xlib/Atom.hsc 120 - , pRIMARY = XA_PRIMARY - , sECONDARY = XA_SECONDARY - , aRC = XA_ARC - , aTOM = XA_ATOM - , bITMAP = XA_BITMAP - , cARDINAL = XA_CARDINAL - , cOLORMAP = XA_COLORMAP - , cURSOR = XA_CURSOR - , cUT_BUFFER0 = XA_CUT_BUFFER0 - , cUT_BUFFER1 = XA_CUT_BUFFER1 - , cUT_BUFFER2 = XA_CUT_BUFFER2 - , cUT_BUFFER3 = XA_CUT_BUFFER3 - , cUT_BUFFER4 = XA_CUT_BUFFER4 - , cUT_BUFFER5 = XA_CUT_BUFFER5 - , cUT_BUFFER6 = XA_CUT_BUFFER6 - , cUT_BUFFER7 = XA_CUT_BUFFER7 - , dRAWABLE = XA_DRAWABLE - , fONT = XA_FONT - , iNTEGER = XA_INTEGER - , pIXMAP = XA_PIXMAP - , pOINT = XA_POINT - , rECTANGLE = XA_RECTANGLE - , rESOURCE_MANAGER = XA_RESOURCE_MANAGER - , rGB_COLOR_MAP = XA_RGB_COLOR_MAP - , rGB_BEST_MAP = XA_RGB_BEST_MAP - , rGB_BLUE_MAP = XA_RGB_BLUE_MAP - , rGB_DEFAULT_MAP = XA_RGB_DEFAULT_MAP - , rGB_GRAY_MAP = XA_RGB_GRAY_MAP - , rGB_GREEN_MAP = XA_RGB_GREEN_MAP - , rGB_RED_MAP = XA_RGB_RED_MAP - , sTRING = XA_STRING - , vISUALID = XA_VISUALID - , wINDOW = XA_WINDOW - , wM_COMMAND = XA_WM_COMMAND - , wM_HINTS = XA_WM_HINTS - , wM_CLIENT_MACHINE = XA_WM_CLIENT_MACHINE - , wM_ICON_NAME = XA_WM_ICON_NAME - , wM_ICON_SIZE = XA_WM_ICON_SIZE - , wM_NAME = XA_WM_NAME - , wM_NORMAL_HINTS = XA_WM_NORMAL_HINTS - , wM_SIZE_HINTS = XA_WM_SIZE_HINTS - , wM_ZOOM_HINTS = XA_WM_ZOOM_HINTS - , mIN_SPACE = XA_MIN_SPACE - , nORM_SPACE = XA_NORM_SPACE - , mAX_SPACE = XA_MAX_SPACE - , eND_SPACE = XA_END_SPACE - , sUPERSCRIPT_X = XA_SUPERSCRIPT_X - , sUPERSCRIPT_Y = XA_SUPERSCRIPT_Y - , sUBSCRIPT_X = XA_SUBSCRIPT_X - , sUBSCRIPT_Y = XA_SUBSCRIPT_Y - , uNDERLINE_POSITION = XA_UNDERLINE_POSITION - , uNDERLINE_THICKNESS = XA_UNDERLINE_THICKNESS - , sTRIKEOUT_ASCENT = XA_STRIKEOUT_ASCENT - , sTRIKEOUT_DESCENT = XA_STRIKEOUT_DESCENT - , iTALIC_ANGLE = XA_ITALIC_ANGLE - , x_HEIGHT = XA_X_HEIGHT - , qUAD_WIDTH = XA_QUAD_WIDTH - , wEIGHT = XA_WEIGHT - , pOINT_SIZE = XA_POINT_SIZE - , rESOLUTION = XA_RESOLUTION - , cOPYRIGHT = XA_COPYRIGHT - , nOTICE = XA_NOTICE - , fONT_NAME = XA_FONT_NAME - , fAMILY_NAME = XA_FAMILY_NAME - , fULL_NAME = XA_FULL_NAME - , cAP_HEIGHT = XA_CAP_HEIGHT - , wM_CLASS = XA_WM_CLASS - , wM_TRANSIENT_FOR = XA_WM_TRANSIENT_FOR - , lAST_PREDEFINED = XA_LAST_PREDEFINED + , pRIMARY = XA_PRIMARY + , sECONDARY = XA_SECONDARY + , aRC = XA_ARC + , aTOM = XA_ATOM + , bITMAP = XA_BITMAP + , cARDINAL = XA_CARDINAL + , cOLORMAP = XA_COLORMAP + , cURSOR = XA_CURSOR + , cUT_BUFFER0 = XA_CUT_BUFFER0 + , cUT_BUFFER1 = XA_CUT_BUFFER1 + , cUT_BUFFER2 = XA_CUT_BUFFER2 + , cUT_BUFFER3 = XA_CUT_BUFFER3 + , cUT_BUFFER4 = XA_CUT_BUFFER4 + , cUT_BUFFER5 = XA_CUT_BUFFER5 + , cUT_BUFFER6 = XA_CUT_BUFFER6 + , cUT_BUFFER7 = XA_CUT_BUFFER7 + , dRAWABLE = XA_DRAWABLE + , fONT = XA_FONT + , iNTEGER = XA_INTEGER + , pIXMAP = XA_PIXMAP + , pOINT = XA_POINT + , rECTANGLE = XA_RECTANGLE + , rESOURCE_MANAGER = XA_RESOURCE_MANAGER + , rGB_COLOR_MAP = XA_RGB_COLOR_MAP + , rGB_BEST_MAP = XA_RGB_BEST_MAP + , rGB_BLUE_MAP = XA_RGB_BLUE_MAP + , rGB_DEFAULT_MAP = XA_RGB_DEFAULT_MAP + , rGB_GRAY_MAP = XA_RGB_GRAY_MAP + , rGB_GREEN_MAP = XA_RGB_GREEN_MAP + , rGB_RED_MAP = XA_RGB_RED_MAP + , sTRING = XA_STRING + , vISUALID = XA_VISUALID + , wINDOW = XA_WINDOW + , wM_COMMAND = XA_WM_COMMAND + , wM_HINTS = XA_WM_HINTS + , wM_CLIENT_MACHINE = XA_WM_CLIENT_MACHINE + , wM_ICON_NAME = XA_WM_ICON_NAME + , wM_ICON_SIZE = XA_WM_ICON_SIZE + , wM_NAME = XA_WM_NAME + , wM_NORMAL_HINTS = XA_WM_NORMAL_HINTS + , wM_SIZE_HINTS = XA_WM_SIZE_HINTS + , wM_ZOOM_HINTS = XA_WM_ZOOM_HINTS + , mIN_SPACE = XA_MIN_SPACE + , nORM_SPACE = XA_NORM_SPACE + , mAX_SPACE = XA_MAX_SPACE + , eND_SPACE = XA_END_SPACE + , sUPERSCRIPT_X = XA_SUPERSCRIPT_X + , sUPERSCRIPT_Y = XA_SUPERSCRIPT_Y + , sUBSCRIPT_X = XA_SUBSCRIPT_X + , sUBSCRIPT_Y = XA_SUBSCRIPT_Y + , uNDERLINE_POSITION = XA_UNDERLINE_POSITION + , uNDERLINE_THICKNESS = XA_UNDERLINE_THICKNESS + , sTRIKEOUT_ASCENT = XA_STRIKEOUT_ASCENT + , sTRIKEOUT_DESCENT = XA_STRIKEOUT_DESCENT + , iTALIC_ANGLE = XA_ITALIC_ANGLE + , x_HEIGHT = XA_X_HEIGHT + , qUAD_WIDTH = XA_QUAD_WIDTH + , wEIGHT = XA_WEIGHT + , pOINT_SIZE = XA_POINT_SIZE + , rESOLUTION = XA_RESOLUTION + , cOPYRIGHT = XA_COPYRIGHT + , nOTICE = XA_NOTICE + , fONT_NAME = XA_FONT_NAME + , fAMILY_NAME = XA_FAMILY_NAME + , fULL_NAME = XA_FULL_NAME + , cAP_HEIGHT = XA_CAP_HEIGHT + , wM_CLASS = XA_WM_CLASS + , wM_TRANSIENT_FOR = XA_WM_TRANSIENT_FOR + , lAST_PREDEFINED = XA_LAST_PREDEFINED hunk ./Graphics/X11/Xlib/Color.hs 47 - withCString color_name $ \c_color_name -> - alloca $ \ exact_def_return -> - alloca $ \ screen_def_return -> do - throwIfZero "lookupColor" $ - xLookupColor display colormap c_color_name - exact_def_return screen_def_return - exact_def <- peek exact_def_return - screen_def <- peek screen_def_return - return (exact_def, screen_def) + withCString color_name $ \c_color_name -> + alloca $ \ exact_def_return -> + alloca $ \ screen_def_return -> do + throwIfZero "lookupColor" $ + xLookupColor display colormap c_color_name + exact_def_return screen_def_return + exact_def <- peek exact_def_return + screen_def <- peek screen_def_return + return (exact_def, screen_def) + hunk ./Graphics/X11/Xlib/Color.hs 58 - xLookupColor :: Display -> Colormap -> CString -> - Ptr Color -> Ptr Color -> IO Status + xLookupColor :: Display -> Colormap -> CString -> + Ptr Color -> Ptr Color -> IO Status hunk ./Graphics/X11/Xlib/Color.hs 64 - withCString color_name $ \c_color_name -> - alloca $ \ exact_def_return -> - alloca $ \ screen_def_return -> do - throwIfZero "allocNamedColor" $ - xAllocNamedColor display colormap c_color_name - exact_def_return screen_def_return - exact_def <- peek exact_def_return - screen_def <- peek screen_def_return - return (exact_def, screen_def) + withCString color_name $ \c_color_name -> + alloca $ \ exact_def_return -> + alloca $ \ screen_def_return -> do + throwIfZero "allocNamedColor" $ + xAllocNamedColor display colormap c_color_name + exact_def_return screen_def_return + exact_def <- peek exact_def_return + screen_def <- peek screen_def_return + return (exact_def, screen_def) + hunk ./Graphics/X11/Xlib/Color.hs 75 - xAllocNamedColor :: Display -> Colormap -> CString -> - Ptr Color -> Ptr Color -> IO Status + xAllocNamedColor :: Display -> Colormap -> CString -> + Ptr Color -> Ptr Color -> IO Status hunk ./Graphics/X11/Xlib/Color.hs 81 - with color $ \ color_ptr -> do - throwIfZero "allocColor" $ - xAllocColor display colormap color_ptr - peek color_ptr + with color $ \ color_ptr -> do + throwIfZero "allocColor" $ + xAllocColor display colormap color_ptr + peek color_ptr + hunk ./Graphics/X11/Xlib/Color.hs 87 - xAllocColor :: Display -> Colormap -> Ptr Color -> IO Status + xAllocColor :: Display -> Colormap -> Ptr Color -> IO Status hunk ./Graphics/X11/Xlib/Color.hs 92 - withCString color_spec $ \ spec -> - alloca $ \ exact_def_return -> do - throwIfZero "parseColor" $ - xParseColor display colormap spec exact_def_return - peek exact_def_return + withCString color_spec $ \ spec -> + alloca $ \ exact_def_return -> do + throwIfZero "parseColor" $ + xParseColor display colormap spec exact_def_return + peek exact_def_return + hunk ./Graphics/X11/Xlib/Color.hs 99 - xParseColor :: Display -> Colormap -> CString -> Ptr Color -> IO Status + xParseColor :: Display -> Colormap -> CString -> Ptr Color -> IO Status hunk ./Graphics/X11/Xlib/Color.hs 110 - withArray pixels $ \ pixel_array -> - xFreeColors display colormap pixel_array (fromIntegral (length pixels)) planes + withArray pixels $ \ pixel_array -> + xFreeColors display colormap pixel_array (fromIntegral (length pixels)) planes + hunk ./Graphics/X11/Xlib/Color.hs 114 - xFreeColors :: Display -> Colormap -> Ptr Pixel -> CInt -> Pixel -> IO () + xFreeColors :: Display -> Colormap -> Ptr Pixel -> CInt -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Color.hs 119 - with color $ \ color_ptr -> - xStoreColor display colormap color_ptr + with color $ \ color_ptr -> + xStoreColor display colormap color_ptr + hunk ./Graphics/X11/Xlib/Color.hs 123 - xStoreColor :: Display -> Colormap -> Ptr Color -> IO () + xStoreColor :: Display -> Colormap -> Ptr Color -> IO () hunk ./Graphics/X11/Xlib/Color.hs 132 - with color $ \ color_ptr -> do - xQueryColor display colormap color_ptr - peek color_ptr + with color $ \ color_ptr -> do + xQueryColor display colormap color_ptr + peek color_ptr + hunk ./Graphics/X11/Xlib/Color.hs 137 - xQueryColor :: Display -> Colormap -> Ptr Color -> IO () + xQueryColor :: Display -> Colormap -> Ptr Color -> IO () hunk ./Graphics/X11/Xlib/Color.hs 142 - withArrayLen colors $ \ ncolors color_array -> do - xQueryColors display colormap color_array (fromIntegral ncolors) - peekArray ncolors color_array + withArrayLen colors $ \ ncolors color_array -> do + xQueryColors display colormap color_array (fromIntegral ncolors) + peekArray ncolors color_array + hunk ./Graphics/X11/Xlib/Color.hs 147 - xQueryColors :: Display -> Colormap -> Ptr Color -> CInt -> IO () + xQueryColors :: Display -> Colormap -> Ptr Color -> CInt -> IO () hunk ./Graphics/X11/Xlib/Color.hs 151 - installColormap :: Display -> Colormap -> IO () + installColormap :: Display -> Colormap -> IO () hunk ./Graphics/X11/Xlib/Color.hs 155 - uninstallColormap :: Display -> Colormap -> IO () + uninstallColormap :: Display -> Colormap -> IO () hunk ./Graphics/X11/Xlib/Color.hs 159 - copyColormapAndFree :: Display -> Colormap -> IO Colormap + copyColormapAndFree :: Display -> Colormap -> IO Colormap hunk ./Graphics/X11/Xlib/Color.hs 163 - createColormap :: Display -> Window -> Visual -> ColormapAlloc -> IO Colormap + createColormap :: Display -> Window -> Visual -> ColormapAlloc -> IO Colormap hunk ./Graphics/X11/Xlib/Color.hs 167 - freeColormap :: Display -> Colormap -> IO () + freeColormap :: Display -> Colormap -> IO () hunk ./Graphics/X11/Xlib/Context.hs 59 - setArcMode :: Display -> GC -> ArcMode -> IO () + setArcMode :: Display -> GC -> ArcMode -> IO () hunk ./Graphics/X11/Xlib/Context.hs 63 - setBackground :: Display -> GC -> Pixel -> IO () + setBackground :: Display -> GC -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Context.hs 67 - setForeground :: Display -> GC -> Pixel -> IO () + setForeground :: Display -> GC -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Context.hs 71 - setFunction :: Display -> GC -> GXFunction -> IO () + setFunction :: Display -> GC -> GXFunction -> IO () hunk ./Graphics/X11/Xlib/Context.hs 75 - setGraphicsExposures :: Display -> GC -> Bool -> IO () + setGraphicsExposures :: Display -> GC -> Bool -> IO () hunk ./Graphics/X11/Xlib/Context.hs 79 - setClipMask :: Display -> GC -> Pixmap -> IO () + setClipMask :: Display -> GC -> Pixmap -> IO () hunk ./Graphics/X11/Xlib/Context.hs 83 - setClipOrigin :: Display -> GC -> Position -> Position -> IO () + setClipOrigin :: Display -> GC -> Position -> Position -> IO () hunk ./Graphics/X11/Xlib/Context.hs 91 - withCString dashes $ \ dash_list -> - xSetDashes display gc dash_offset dash_list n + withCString dashes $ \ dash_list -> + xSetDashes display gc dash_offset dash_list n hunk ./Graphics/X11/Xlib/Context.hs 94 - xSetDashes :: Display -> GC -> CInt -> CString -> CInt -> IO () + xSetDashes :: Display -> GC -> CInt -> CString -> CInt -> IO () hunk ./Graphics/X11/Xlib/Context.hs 98 - setFillRule :: Display -> GC -> FillRule -> IO () + setFillRule :: Display -> GC -> FillRule -> IO () hunk ./Graphics/X11/Xlib/Context.hs 102 - setFillStyle :: Display -> GC -> FillStyle -> IO () + setFillStyle :: Display -> GC -> FillStyle -> IO () hunk ./Graphics/X11/Xlib/Context.hs 106 - setFont :: Display -> GC -> Font -> IO () + setFont :: Display -> GC -> Font -> IO () hunk ./Graphics/X11/Xlib/Context.hs 110 - setLineAttributes :: Display -> GC -> CInt -> LineStyle -> - CapStyle -> JoinStyle -> IO () + setLineAttributes :: Display -> GC -> CInt -> LineStyle -> + CapStyle -> JoinStyle -> IO () hunk ./Graphics/X11/Xlib/Context.hs 115 - setPlaneMask :: Display -> GC -> Pixel -> IO () + setPlaneMask :: Display -> GC -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Context.hs 119 - setState :: Display -> GC -> Pixel -> Pixel -> - GXFunction -> Pixel -> IO () + setState :: Display -> GC -> Pixel -> Pixel -> + GXFunction -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Context.hs 124 - setStipple :: Display -> GC -> Pixmap -> IO () + setStipple :: Display -> GC -> Pixmap -> IO () hunk ./Graphics/X11/Xlib/Context.hs 128 - setSubwindowMode :: Display -> GC -> SubWindowMode -> IO () + setSubwindowMode :: Display -> GC -> SubWindowMode -> IO () hunk ./Graphics/X11/Xlib/Context.hs 132 - setTSOrigin :: Display -> GC -> Position -> Position -> IO () + setTSOrigin :: Display -> GC -> Position -> Position -> IO () hunk ./Graphics/X11/Xlib/Context.hs 136 - setTile :: Display -> GC -> Pixmap -> IO () + setTile :: Display -> GC -> Pixmap -> IO () hunk ./Graphics/X11/Xlib/Context.hs 143 - xCreateGC :: Display -> Drawable -> ValueMask -> Ptr GCValues -> IO GC + xCreateGC :: Display -> Drawable -> ValueMask -> Ptr GCValues -> IO GC hunk ./Graphics/X11/Xlib/Context.hs 154 --- GCMask mask; --- XGCValues values; +-- GCMask mask; +-- XGCValues values; hunk ./Graphics/X11/Xlib/Context.hs 159 --- IMPURE GCValueSet emptyGCValueSet() +-- IMPURE GCValueSet emptyGCValueSet() hunk ./Graphics/X11/Xlib/Context.hs 163 --- IMPURE void setGCForeground(colour, set) --- IN Pixel colour --- IN GCValueSet set +-- IMPURE void setGCForeground(colour, set) +-- IN Pixel colour +-- IN GCValueSet set hunk ./Graphics/X11/Xlib/Context.hs 168 --- IMPURE void setGCBackground(colour, set) --- IN Pixel colour --- IN GCValueSet set +-- IMPURE void setGCBackground(colour, set) +-- IN Pixel colour +-- IN GCValueSet set hunk ./Graphics/X11/Xlib/Context.hs 173 --- IMPURE void freeGCValueSet(set) --- IN GCValueSet set +-- IMPURE void freeGCValueSet(set) +-- IN GCValueSet set hunk ./Graphics/X11/Xlib/Context.hs 177 --- IMPURE GC XCreateGC(display, d, set->mask, &(set->values)) +-- IMPURE GC XCreateGC(display, d, set->mask, &(set->values)) hunk ./Graphics/X11/Xlib/Context.hs 179 --- IN Display* display --- IN Drawable d --- IN GCValueSet set +-- IN Display* display +-- IN Drawable d +-- IN GCValueSet set hunk ./Graphics/X11/Xlib/Context.hs 183 --- IMPURE void XChangeGC(display, gc, set->mask, &(set->values)) +-- IMPURE void XChangeGC(display, gc, set->mask, &(set->values)) hunk ./Graphics/X11/Xlib/Context.hs 185 --- IN Display* display --- IN GC gc --- IN GCValueSet set +-- IN Display* display +-- IN GC gc +-- IN GCValueSet set hunk ./Graphics/X11/Xlib/Context.hs 223 - gContextFromGC :: GC -> GContext + gContextFromGC :: GC -> GContext hunk ./Graphics/X11/Xlib/Context.hs 227 - freeGC :: Display -> GC -> IO () + freeGC :: Display -> GC -> IO () hunk ./Graphics/X11/Xlib/Context.hs 231 - flushGC :: Display -> GC -> IO () + flushGC :: Display -> GC -> IO () hunk ./Graphics/X11/Xlib/Context.hs 235 - copyGC :: Display -> GC -> Mask -> GC -> IO () + copyGC :: Display -> GC -> Mask -> GC -> IO () hunk ./Graphics/X11/Xlib/Display.hs 65 - allPlanes_aux :: Pixel + allPlanes_aux :: Pixel hunk ./Graphics/X11/Xlib/Display.hs 69 - blackPixel :: Display -> ScreenNumber -> Pixel + blackPixel :: Display -> ScreenNumber -> Pixel hunk ./Graphics/X11/Xlib/Display.hs 73 - whitePixel :: Display -> ScreenNumber -> Pixel + whitePixel :: Display -> ScreenNumber -> Pixel hunk ./Graphics/X11/Xlib/Display.hs 85 - connectionNumber :: Display -> CInt + connectionNumber :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 89 - defaultColormap :: Display -> ScreenNumber -> Colormap + defaultColormap :: Display -> ScreenNumber -> Colormap hunk ./Graphics/X11/Xlib/Display.hs 95 - defaultGC :: Display -> ScreenNumber -> GC + defaultGC :: Display -> ScreenNumber -> GC hunk ./Graphics/X11/Xlib/Display.hs 99 - defaultDepth :: Display -> ScreenNumber -> CInt + defaultDepth :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 103 - defaultScreen :: Display -> ScreenNumber + defaultScreen :: Display -> ScreenNumber hunk ./Graphics/X11/Xlib/Display.hs 107 - defaultScreenOfDisplay :: Display -> Screen + defaultScreenOfDisplay :: Display -> Screen hunk ./Graphics/X11/Xlib/Display.hs 111 - displayHeight :: Display -> ScreenNumber -> CInt + displayHeight :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 115 - displayHeightMM :: Display -> ScreenNumber -> CInt + displayHeightMM :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 119 - displayWidth :: Display -> ScreenNumber -> CInt + displayWidth :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 123 - displayWidthMM :: Display -> ScreenNumber -> CInt + displayWidthMM :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 127 - maxRequestSize :: Display -> CInt + maxRequestSize :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 131 - displayMotionBufferSize :: Display -> CInt ---Disnae exist in X11R5 XExtendedMaxRequestSize :: Display -> Int + displayMotionBufferSize :: Display -> CInt +--Disnae exist in X11R5 XExtendedMaxRequestSize :: Display -> Int hunk ./Graphics/X11/Xlib/Display.hs 138 - xResourceManagerString :: Display -> IO CString + xResourceManagerString :: Display -> IO CString hunk ./Graphics/X11/Xlib/Display.hs 144 - xScreenResourceString :: Screen -> IO CString + xScreenResourceString :: Screen -> IO CString hunk ./Graphics/X11/Xlib/Display.hs 150 - xDisplayString :: Display -> IO CString + xDisplayString :: Display -> IO CString hunk ./Graphics/X11/Xlib/Display.hs 154 - imageByteOrder :: Display -> CInt + imageByteOrder :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 158 - protocolRevision :: Display -> CInt + protocolRevision :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 162 - protocolVersion :: Display -> CInt + protocolVersion :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 168 - xServerVendor :: Display -> IO CString + xServerVendor :: Display -> IO CString hunk ./Graphics/X11/Xlib/Display.hs 170 ---Disnae exist: XServerRelease :: Display -> Int +--Disnae exist: XServerRelease :: Display -> Int hunk ./Graphics/X11/Xlib/Display.hs 174 - screenCount :: Display -> CInt + screenCount :: Display -> CInt hunk ./Graphics/X11/Xlib/Display.hs 178 - defaultVisual :: Display -> ScreenNumber -> Visual + defaultVisual :: Display -> ScreenNumber -> Visual hunk ./Graphics/X11/Xlib/Display.hs 182 - displayCells :: Display -> ScreenNumber -> CInt + displayCells :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 186 - displayPlanes :: Display -> ScreenNumber -> CInt + displayPlanes :: Display -> ScreenNumber -> CInt hunk ./Graphics/X11/Xlib/Display.hs 190 - screenOfDisplay :: Display -> ScreenNumber -> Screen + screenOfDisplay :: Display -> ScreenNumber -> Screen hunk ./Graphics/X11/Xlib/Display.hs 194 - defaultRootWindow :: Display -> Window + defaultRootWindow :: Display -> Window hunk ./Graphics/X11/Xlib/Display.hs 200 - rootWindow :: Display -> ScreenNumber -> IO Window + rootWindow :: Display -> ScreenNumber -> IO Window hunk ./Graphics/X11/Xlib/Display.hs 204 - qLength :: Display -> IO CInt + qLength :: Display -> IO CInt hunk ./Graphics/X11/Xlib/Display.hs 208 - noOp :: Display -> IO () + noOp :: Display -> IO () hunk ./Graphics/X11/Xlib/Display.hs 213 - withCString name $ \ c_name -> do - display <- throwIfNull "openDisplay" (xOpenDisplay c_name) - return (Display display) + withCString name $ \ c_name -> do + display <- throwIfNull "openDisplay" (xOpenDisplay c_name) + return (Display display) hunk ./Graphics/X11/Xlib/Display.hs 217 - xOpenDisplay :: CString -> IO (Ptr Display) + xOpenDisplay :: CString -> IO (Ptr Display) hunk ./Graphics/X11/Xlib/Display.hs 221 - closeDisplay :: Display -> IO () + closeDisplay :: Display -> IO () hunk ./Graphics/X11/Xlib/Display.hs 226 - cs <- act - peekCString cs + cs <- act + peekCString cs hunk ./Graphics/X11/Xlib/Region.hs 63 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Region.hs 65 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Region.hs 92 - r <- newForeignPtr xDestroyRegionPtr rp - return (Region r) + r <- newForeignPtr xDestroyRegionPtr rp + return (Region r) hunk ./Graphics/X11/Xlib/Region.hs 101 - rp <- xCreateRegion - makeRegion rp + rp <- xCreateRegion + makeRegion rp hunk ./Graphics/X11/Xlib/Region.hs 109 - withArrayLen points $ \ n point_arr -> do - rp <- xPolygonRegion point_arr (fromIntegral n) fill_rule - makeRegion rp + withArrayLen points $ \ n point_arr -> do + rp <- xPolygonRegion point_arr (fromIntegral n) fill_rule + makeRegion rp hunk ./Graphics/X11/Xlib/Region.hs 113 - xPolygonRegion :: Ptr Point -> CInt -> FillRule -> IO (Ptr Region) + xPolygonRegion :: Ptr Point -> CInt -> FillRule -> IO (Ptr Region) hunk ./Graphics/X11/Xlib/Region.hs 128 - withRegion src1 $ \ src1_ptr -> - withRegion src2 $ \ src2_ptr -> - withRegion dest $ \ dest_ptr -> - xIntersectRegion src1_ptr src2_ptr dest_ptr + withRegion src1 $ \ src1_ptr -> + withRegion src2 $ \ src2_ptr -> + withRegion dest $ \ dest_ptr -> + xIntersectRegion src1_ptr src2_ptr dest_ptr hunk ./Graphics/X11/Xlib/Region.hs 133 - "HsXlib.h XIntersectRegion" xIntersectRegion :: - Ptr Region -> Ptr Region -> Ptr Region -> IO CInt + "HsXlib.h XIntersectRegion" xIntersectRegion :: + Ptr Region -> Ptr Region -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 139 - withRegion src1 $ \ src1_ptr -> - withRegion src2 $ \ src2_ptr -> - withRegion dest $ \ dest_ptr -> - xSubtractRegion src1_ptr src2_ptr dest_ptr + withRegion src1 $ \ src1_ptr -> + withRegion src2 $ \ src2_ptr -> + withRegion dest $ \ dest_ptr -> + xSubtractRegion src1_ptr src2_ptr dest_ptr hunk ./Graphics/X11/Xlib/Region.hs 144 - "HsXlib.h XSubtractRegion" xSubtractRegion :: - Ptr Region -> Ptr Region -> Ptr Region -> IO CInt + "HsXlib.h XSubtractRegion" xSubtractRegion :: + Ptr Region -> Ptr Region -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 150 - with rect $ \ rect_ptr -> - withRegion src $ \ src_ptr -> - withRegion dest $ \ dest_ptr -> - xUnionRectWithRegion rect_ptr src_ptr dest_ptr + with rect $ \ rect_ptr -> + withRegion src $ \ src_ptr -> + withRegion dest $ \ dest_ptr -> + xUnionRectWithRegion rect_ptr src_ptr dest_ptr hunk ./Graphics/X11/Xlib/Region.hs 155 - "HsXlib.h XUnionRectWithRegion" xUnionRectWithRegion :: - Ptr Rectangle -> Ptr Region -> Ptr Region -> IO CInt + "HsXlib.h XUnionRectWithRegion" xUnionRectWithRegion :: + Ptr Rectangle -> Ptr Region -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 161 - withRegion src1 $ \ src1_ptr -> - withRegion src2 $ \ src2_ptr -> - withRegion dest $ \ dest_ptr -> - xUnionRegion src1_ptr src2_ptr dest_ptr + withRegion src1 $ \ src1_ptr -> + withRegion src2 $ \ src2_ptr -> + withRegion dest $ \ dest_ptr -> + xUnionRegion src1_ptr src2_ptr dest_ptr hunk ./Graphics/X11/Xlib/Region.hs 166 - "HsXlib.h XUnionRegion" xUnionRegion :: - Ptr Region -> Ptr Region -> Ptr Region -> IO CInt + "HsXlib.h XUnionRegion" xUnionRegion :: + Ptr Region -> Ptr Region -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 172 - withRegion src1 $ \ src1_ptr -> - withRegion src2 $ \ src2_ptr -> - withRegion dest $ \ dest_ptr -> - xXorRegion src1_ptr src2_ptr dest_ptr + withRegion src1 $ \ src1_ptr -> + withRegion src2 $ \ src2_ptr -> + withRegion dest $ \ dest_ptr -> + xXorRegion src1_ptr src2_ptr dest_ptr hunk ./Graphics/X11/Xlib/Region.hs 177 - "HsXlib.h XXorRegion" xXorRegion :: - Ptr Region -> Ptr Region -> Ptr Region -> IO CInt + "HsXlib.h XXorRegion" xXorRegion :: + Ptr Region -> Ptr Region -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 188 - xEmptyRegion :: Ptr Region -> IO Bool + xEmptyRegion :: Ptr Region -> IO Bool hunk ./Graphics/X11/Xlib/Region.hs 193 - withRegion r1 $ \ rp1 -> - withRegion r2 $ \ rp2 -> - xEqualRegion rp1 rp2 + withRegion r1 $ \ rp1 -> + withRegion r2 $ \ rp2 -> + xEqualRegion rp1 rp2 hunk ./Graphics/X11/Xlib/Region.hs 197 - xEqualRegion :: Ptr Region -> Ptr Region -> IO Bool + xEqualRegion :: Ptr Region -> Ptr Region -> IO Bool hunk ./Graphics/X11/Xlib/Region.hs 202 - withRegion r $ \ rp -> - xPointInRegion rp x y + withRegion r $ \ rp -> + xPointInRegion rp x y hunk ./Graphics/X11/Xlib/Region.hs 205 - xPointInRegion :: Ptr Region -> Position -> Position -> IO Bool + xPointInRegion :: Ptr Region -> Position -> Position -> IO Bool hunk ./Graphics/X11/Xlib/Region.hs 210 - withRegion r $ \ rp -> - xRectInRegion rp x y w h + withRegion r $ \ rp -> + xRectInRegion rp x y w h hunk ./Graphics/X11/Xlib/Region.hs 213 - xRectInRegion :: Ptr Region -> Position -> Position -> - Dimension -> Dimension -> IO RectInRegionResult + xRectInRegion :: Ptr Region -> Position -> Position -> + Dimension -> Dimension -> IO RectInRegionResult hunk ./Graphics/X11/Xlib/Region.hs 221 - withRegion r $ \ rp -> - alloca $ \ rect_ptr -> do - res <- xClipBox rp rect_ptr - rect <- peek rect_ptr - return (rect, res) + withRegion r $ \ rp -> + alloca $ \ rect_ptr -> do + res <- xClipBox rp rect_ptr + rect <- peek rect_ptr + return (rect, res) hunk ./Graphics/X11/Xlib/Region.hs 227 - xClipBox :: Ptr Region -> Ptr Rectangle -> IO CInt + xClipBox :: Ptr Region -> Ptr Rectangle -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 240 - withRegion r $ \ rp -> - xOffsetRegion rp x y + withRegion r $ \ rp -> + xOffsetRegion rp x y hunk ./Graphics/X11/Xlib/Region.hs 243 - xOffsetRegion :: Ptr Region -> Position -> Position -> IO CInt + xOffsetRegion :: Ptr Region -> Position -> Position -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 252 - withRegion r $ \ rp -> - xShrinkRegion rp x y + withRegion r $ \ rp -> + xShrinkRegion rp x y hunk ./Graphics/X11/Xlib/Region.hs 255 - xShrinkRegion :: Ptr Region -> Position -> Position -> IO CInt + xShrinkRegion :: Ptr Region -> Position -> Position -> IO CInt hunk ./Graphics/X11/Xlib/Region.hs 266 - withRegion r $ \ rp -> - xSetRegion disp gc rp + withRegion r $ \ rp -> + xSetRegion disp gc rp hunk ./Graphics/X11/Xlib/Region.hs 269 - xSetRegion :: Display -> GC -> Ptr Region -> IO CInt + xSetRegion :: Display -> GC -> Ptr Region -> IO CInt hunk ./Graphics/X11/Xlib/Screen.hs 52 - blackPixelOfScreen :: Screen -> Pixel + blackPixelOfScreen :: Screen -> Pixel hunk ./Graphics/X11/Xlib/Screen.hs 56 - whitePixelOfScreen :: Screen -> Pixel + whitePixelOfScreen :: Screen -> Pixel hunk ./Graphics/X11/Xlib/Screen.hs 60 - cellsOfScreen :: Screen -> CInt + cellsOfScreen :: Screen -> CInt hunk ./Graphics/X11/Xlib/Screen.hs 64 - defaultColormapOfScreen :: Screen -> Colormap + defaultColormapOfScreen :: Screen -> Colormap hunk ./Graphics/X11/Xlib/Screen.hs 68 - defaultDepthOfScreen :: Screen -> CInt + defaultDepthOfScreen :: Screen -> CInt hunk ./Graphics/X11/Xlib/Screen.hs 72 - defaultGCOfScreen :: Screen -> GC + defaultGCOfScreen :: Screen -> GC hunk ./Graphics/X11/Xlib/Screen.hs 76 - defaultVisualOfScreen :: Screen -> Visual + defaultVisualOfScreen :: Screen -> Visual hunk ./Graphics/X11/Xlib/Screen.hs 80 - doesBackingStore :: Screen -> Bool + doesBackingStore :: Screen -> Bool hunk ./Graphics/X11/Xlib/Screen.hs 84 - doesSaveUnders :: Screen -> Bool + doesSaveUnders :: Screen -> Bool hunk ./Graphics/X11/Xlib/Screen.hs 88 - displayOfScreen :: Screen -> Display + displayOfScreen :: Screen -> Display hunk ./Graphics/X11/Xlib/Screen.hs 93 - eventMaskOfScreen :: Screen -> EventMask + eventMaskOfScreen :: Screen -> EventMask hunk ./Graphics/X11/Xlib/Screen.hs 97 - minCmapsOfScreen :: Screen -> CInt + minCmapsOfScreen :: Screen -> CInt hunk ./Graphics/X11/Xlib/Screen.hs 101 - maxCmapsOfScreen :: Screen -> CInt + maxCmapsOfScreen :: Screen -> CInt hunk ./Graphics/X11/Xlib/Screen.hs 105 - rootWindowOfScreen :: Screen -> Window + rootWindowOfScreen :: Screen -> Window hunk ./Graphics/X11/Xlib/Screen.hs 109 - widthOfScreen :: Screen -> Dimension + widthOfScreen :: Screen -> Dimension hunk ./Graphics/X11/Xlib/Screen.hs 113 - widthMMOfScreen :: Screen -> Dimension + widthMMOfScreen :: Screen -> Dimension hunk ./Graphics/X11/Xlib/Screen.hs 117 - heightOfScreen :: Screen -> Dimension + heightOfScreen :: Screen -> Dimension hunk ./Graphics/X11/Xlib/Screen.hs 121 - heightMMOfScreen :: Screen -> Dimension + heightMMOfScreen :: Screen -> Dimension hunk ./Graphics/X11/Xlib/Screen.hs 125 - planesOfScreen :: Screen -> CInt + planesOfScreen :: Screen -> CInt hunk ./Graphics/X11/Xlib/Screen.hs 129 - screenNumberOfScreen :: Screen -> ScreenNumber + screenNumberOfScreen :: Screen -> ScreenNumber hunk ./Graphics/X11/Xlib/Types.hsc 18 - Display(..), Screen, Visual, GC, GCValues, SetWindowAttributes, - Image(..), Point(..), Rectangle(..), Arc(..), Segment(..), Color(..), - Pixel, Position, Dimension, Angle, ScreenNumber, Buffer + Display(..), Screen, Visual, GC, GCValues, SetWindowAttributes, + Image(..), Point(..), Rectangle(..), Arc(..), Segment(..), Color(..), + Pixel, Position, Dimension, Angle, ScreenNumber, Buffer hunk ./Graphics/X11/Xlib/Types.hsc 44 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 46 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Types.hsc 52 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 54 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Types.hsc 60 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 62 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Types.hsc 68 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 70 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Types.hsc 76 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 78 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Types.hsc 84 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 86 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Types.hsc 92 - deriving (Eq, Ord, Show, Typeable, Data) + deriving (Eq, Ord, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 94 - deriving (Eq, Ord, Show) + deriving (Eq, Ord, Show) hunk ./Graphics/X11/Xlib/Types.hsc 114 - v <- peekByteOff ptr (fromIntegral off) - return (fromIntegral (v::ShortPosition)) + v <- peekByteOff ptr (fromIntegral off) + return (fromIntegral (v::ShortPosition)) hunk ./Graphics/X11/Xlib/Types.hsc 119 - v <- peekByteOff ptr (fromIntegral off) - return (fromIntegral (v::ShortDimension)) + v <- peekByteOff ptr (fromIntegral off) + return (fromIntegral (v::ShortDimension)) hunk ./Graphics/X11/Xlib/Types.hsc 124 - v <- peekByteOff ptr (fromIntegral off) - return (fromIntegral (v::ShortAngle)) + v <- peekByteOff ptr (fromIntegral off) + return (fromIntegral (v::ShortAngle)) hunk ./Graphics/X11/Xlib/Types.hsc 129 - pokeByteOff ptr (fromIntegral off) (fromIntegral v::ShortPosition) + pokeByteOff ptr (fromIntegral off) (fromIntegral v::ShortPosition) hunk ./Graphics/X11/Xlib/Types.hsc 133 - pokeByteOff ptr (fromIntegral off) (fromIntegral v::ShortDimension) + pokeByteOff ptr (fromIntegral off) (fromIntegral v::ShortDimension) hunk ./Graphics/X11/Xlib/Types.hsc 137 - pokeByteOff ptr (fromIntegral off) (fromIntegral v::ShortAngle) + pokeByteOff ptr (fromIntegral off) (fromIntegral v::ShortAngle) hunk ./Graphics/X11/Xlib/Types.hsc 146 - deriving (Eq, Show, Typeable, Data) + deriving (Eq, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 148 - deriving (Eq, Show) + deriving (Eq, Show) hunk ./Graphics/X11/Xlib/Types.hsc 152 - sizeOf _ = #{size XPoint} - alignment _ = alignment (undefined::CInt) - peek p = do - x <- peekPositionField p #{offset XPoint,x} - y <- peekPositionField p #{offset XPoint,y} - return (Point x y) - poke p (Point x y) = do - pokePositionField p #{offset XPoint,x} x - pokePositionField p #{offset XPoint,y} y + sizeOf _ = #{size XPoint} + alignment _ = alignment (undefined::CInt) + peek p = do + x <- peekPositionField p #{offset XPoint,x} + y <- peekPositionField p #{offset XPoint,y} + return (Point x y) + poke p (Point x y) = do + pokePositionField p #{offset XPoint,x} x + pokePositionField p #{offset XPoint,y} y hunk ./Graphics/X11/Xlib/Types.hsc 168 - rect_x :: !Position, - rect_y :: !Position, - rect_width :: !Dimension, - rect_height :: !Dimension - } + rect_x :: !Position, + rect_y :: !Position, + rect_width :: !Dimension, + rect_height :: !Dimension + } hunk ./Graphics/X11/Xlib/Types.hsc 174 - deriving (Eq, Show, Typeable, Data) + deriving (Eq, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 176 - deriving (Eq, Show) + deriving (Eq, Show) hunk ./Graphics/X11/Xlib/Types.hsc 180 - sizeOf _ = #{size XRectangle} - alignment _ = alignment (undefined::CInt) - peek p = do - x <- peekPositionField p #{offset XRectangle,x} - y <- peekPositionField p #{offset XRectangle,y} - width <- peekDimensionField p #{offset XRectangle,width} - height <- peekDimensionField p #{offset XRectangle,height} - return (Rectangle x y width height) - poke p (Rectangle x y width height) = do - pokePositionField p #{offset XRectangle,x} x - pokePositionField p #{offset XRectangle,y} y - pokeDimensionField p #{offset XRectangle,width} width - pokeDimensionField p #{offset XRectangle,height} height + sizeOf _ = #{size XRectangle} + alignment _ = alignment (undefined::CInt) + peek p = do + x <- peekPositionField p #{offset XRectangle,x} + y <- peekPositionField p #{offset XRectangle,y} + width <- peekDimensionField p #{offset XRectangle,width} + height <- peekDimensionField p #{offset XRectangle,height} + return (Rectangle x y width height) + poke p (Rectangle x y width height) = do + pokePositionField p #{offset XRectangle,x} x + pokePositionField p #{offset XRectangle,y} y + pokeDimensionField p #{offset XRectangle,width} width + pokeDimensionField p #{offset XRectangle,height} height hunk ./Graphics/X11/Xlib/Types.hsc 200 - arc_x :: Position, - arc_y :: Position, - arc_width :: Dimension, - arc_height :: Dimension, - arc_angle1 :: Angle, - arc_angle2 :: Angle - } + arc_x :: Position, + arc_y :: Position, + arc_width :: Dimension, + arc_height :: Dimension, + arc_angle1 :: Angle, + arc_angle2 :: Angle + } hunk ./Graphics/X11/Xlib/Types.hsc 208 - deriving (Eq, Show, Typeable) + deriving (Eq, Show, Typeable) hunk ./Graphics/X11/Xlib/Types.hsc 210 - deriving (Eq, Show) + deriving (Eq, Show) hunk ./Graphics/X11/Xlib/Types.hsc 214 - sizeOf _ = #{size XArc} - alignment _ = alignment (undefined::CInt) - peek p = do - x <- peekPositionField p #{offset XArc,x} - y <- peekPositionField p #{offset XArc,y} - width <- peekDimensionField p #{offset XArc,width} - height <- peekDimensionField p #{offset XArc,height} - angle1 <- peekAngleField p #{offset XArc,angle1} - angle2 <- peekAngleField p #{offset XArc,angle2} - return (Arc x y width height angle1 angle2) - poke p (Arc x y width height angle1 angle2) = do - pokePositionField p #{offset XArc,x} x - pokePositionField p #{offset XArc,y} y - pokeDimensionField p #{offset XArc,width} width - pokeDimensionField p #{offset XArc,height} height - pokeAngleField p #{offset XArc,angle1} angle1 - pokeAngleField p #{offset XArc,angle2} angle2 + sizeOf _ = #{size XArc} + alignment _ = alignment (undefined::CInt) + peek p = do + x <- peekPositionField p #{offset XArc,x} + y <- peekPositionField p #{offset XArc,y} + width <- peekDimensionField p #{offset XArc,width} + height <- peekDimensionField p #{offset XArc,height} + angle1 <- peekAngleField p #{offset XArc,angle1} + angle2 <- peekAngleField p #{offset XArc,angle2} + return (Arc x y width height angle1 angle2) + poke p (Arc x y width height angle1 angle2) = do + pokePositionField p #{offset XArc,x} x + pokePositionField p #{offset XArc,y} y + pokeDimensionField p #{offset XArc,width} width + pokeDimensionField p #{offset XArc,height} height + pokeAngleField p #{offset XArc,angle1} angle1 + pokeAngleField p #{offset XArc,angle2} angle2 hunk ./Graphics/X11/Xlib/Types.hsc 238 - seg_x1 :: Position, - seg_y1 :: Position, - seg_x2 :: Position, - seg_y2 :: Position - } + seg_x1 :: Position, + seg_y1 :: Position, + seg_x2 :: Position, + seg_y2 :: Position + } hunk ./Graphics/X11/Xlib/Types.hsc 244 - deriving (Eq, Show, Typeable, Data) + deriving (Eq, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 246 - deriving (Eq, Show) + deriving (Eq, Show) hunk ./Graphics/X11/Xlib/Types.hsc 250 - sizeOf _ = #{size XSegment} - alignment _ = alignment (undefined::CInt) - peek p = do - x1 <- peekPositionField p #{offset XSegment,x1} - y1 <- peekPositionField p #{offset XSegment,y1} - x2 <- peekPositionField p #{offset XSegment,x2} - y2 <- peekPositionField p #{offset XSegment,y2} - return (Segment x1 y1 x2 y2) - poke p (Segment x1 y1 x2 y2) = do - pokePositionField p #{offset XSegment,x1} x1 - pokePositionField p #{offset XSegment,y1} y1 - pokePositionField p #{offset XSegment,x2} x2 - pokePositionField p #{offset XSegment,y2} y2 + sizeOf _ = #{size XSegment} + alignment _ = alignment (undefined::CInt) + peek p = do + x1 <- peekPositionField p #{offset XSegment,x1} + y1 <- peekPositionField p #{offset XSegment,y1} + x2 <- peekPositionField p #{offset XSegment,x2} + y2 <- peekPositionField p #{offset XSegment,y2} + return (Segment x1 y1 x2 y2) + poke p (Segment x1 y1 x2 y2) = do + pokePositionField p #{offset XSegment,x1} x1 + pokePositionField p #{offset XSegment,y1} y1 + pokePositionField p #{offset XSegment,x2} x2 + pokePositionField p #{offset XSegment,y2} y2 hunk ./Graphics/X11/Xlib/Types.hsc 270 - color_pixel :: Pixel, - color_red :: Word16, - color_green :: Word16, - color_blue :: Word16, - color_flags :: Word8 - } + color_pixel :: Pixel, + color_red :: Word16, + color_green :: Word16, + color_blue :: Word16, + color_flags :: Word8 + } hunk ./Graphics/X11/Xlib/Types.hsc 277 - deriving (Eq, Show, Typeable, Data) + deriving (Eq, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 279 - deriving (Eq, Show) + deriving (Eq, Show) hunk ./Graphics/X11/Xlib/Types.hsc 283 - sizeOf _ = #{size XColor} - alignment _ = alignment (undefined::CInt) - peek p = do - pixel <- #{peek XColor,pixel} p - red <- #{peek XColor,red} p - green <- #{peek XColor,green} p - blue <- #{peek XColor,blue} p - flags <- #{peek XColor,flags} p - return (Color pixel red green blue flags) - poke p (Color pixel red green blue flags) = do - #{poke XColor,pixel} p pixel - #{poke XColor,red} p red - #{poke XColor,green} p green - #{poke XColor,blue} p blue - #{poke XColor,flags} p flags + sizeOf _ = #{size XColor} + alignment _ = alignment (undefined::CInt) + peek p = do + pixel <- #{peek XColor,pixel} p + red <- #{peek XColor,red} p + green <- #{peek XColor,green} p + blue <- #{peek XColor,blue} p + flags <- #{peek XColor,flags} p + return (Color pixel red green blue flags) + poke p (Color pixel red green blue flags) = do + #{poke XColor,pixel} p pixel + #{poke XColor,red} p red + #{poke XColor,green} p green + #{poke XColor,blue} p blue + #{poke XColor,flags} p flags hunk ./Graphics/X11/Xlib/Window.hs 65 - withCString name $ \ c_name -> - xStoreName display window c_name + withCString name $ \ c_name -> + xStoreName display window c_name hunk ./Graphics/X11/Xlib/Window.hs 68 - xStoreName :: Display -> Window -> CString -> IO () + xStoreName :: Display -> Window -> CString -> IO () hunk ./Graphics/X11/Xlib/Window.hs 72 - createSimpleWindow :: Display -> Window -> Position -> Position -> - Dimension -> Dimension -> CInt -> Pixel -> Pixel -> IO Window + createSimpleWindow :: Display -> Window -> Position -> Position -> + Dimension -> Dimension -> CInt -> Pixel -> Pixel -> IO Window hunk ./Graphics/X11/Xlib/Window.hs 77 - createWindow :: Display -> Window -> Position -> Position -> - Dimension -> Dimension -> CInt -> CInt -> WindowClass -> - Visual -> AttributeMask -> Ptr SetWindowAttributes -> IO Window + createWindow :: Display -> Window -> Position -> Position -> + Dimension -> Dimension -> CInt -> CInt -> WindowClass -> + Visual -> AttributeMask -> Ptr SetWindowAttributes -> IO Window hunk ./Graphics/X11/Xlib/Window.hs 87 - IO (Bool,Position,Position,Window) + IO (Bool,Position,Position,Window) hunk ./Graphics/X11/Xlib/Window.hs 89 - alloca $ \ dest_x_return -> - alloca $ \ dest_y_return -> - alloca $ \ child_return -> do - res <- xTranslateCoordinates display src_w dest_w src_x src_y - dest_x_return dest_y_return child_return - dest_x <- peek dest_x_return - dest_y <- peek dest_y_return - child <- peek child_return - return (res, dest_x, dest_y, child) + alloca $ \ dest_x_return -> + alloca $ \ dest_y_return -> + alloca $ \ child_return -> do + res <- xTranslateCoordinates display src_w dest_w src_x src_y + dest_x_return dest_y_return child_return + dest_x <- peek dest_x_return + dest_y <- peek dest_y_return + child <- peek child_return + return (res, dest_x, dest_y, child) hunk ./Graphics/X11/Xlib/Window.hs 99 - xTranslateCoordinates :: Display -> Window -> Window -> - Position -> Position -> - Ptr Position -> Ptr Position -> Ptr Window -> IO Bool + xTranslateCoordinates :: Display -> Window -> Window -> + Position -> Position -> + Ptr Position -> Ptr Position -> Ptr Window -> IO Bool hunk ./Graphics/X11/Xlib/Window.hs 105 - moveResizeWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> IO () + moveResizeWindow :: Display -> Window -> Position -> Position -> Dimension -> Dimension -> IO () hunk ./Graphics/X11/Xlib/Window.hs 109 - resizeWindow :: Display -> Window -> Dimension -> Dimension -> IO () + resizeWindow :: Display -> Window -> Dimension -> Dimension -> IO () hunk ./Graphics/X11/Xlib/Window.hs 113 - moveWindow :: Display -> Window -> Position -> Position -> IO () + moveWindow :: Display -> Window -> Position -> Position -> IO () hunk ./Graphics/X11/Xlib/Window.hs 117 - reparentWindow :: Display -> Window -> Window -> Position -> Position -> IO () + reparentWindow :: Display -> Window -> Window -> Position -> Position -> IO () hunk ./Graphics/X11/Xlib/Window.hs 121 - mapSubwindows :: Display -> Window -> IO () + mapSubwindows :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 125 - unmapSubwindows :: Display -> Window -> IO () + unmapSubwindows :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 129 - mapWindow :: Display -> Window -> IO () + mapWindow :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 135 - lowerWindow :: Display -> Window -> IO () + lowerWindow :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 139 - raiseWindow :: Display -> Window -> IO () + raiseWindow :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 143 - circulateSubwindowsDown :: Display -> Window -> IO () + circulateSubwindowsDown :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 147 - circulateSubwindowsUp :: Display -> Window -> IO () + circulateSubwindowsUp :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 151 - circulateSubwindows :: Display -> Window -> CirculationDirection -> IO () + circulateSubwindows :: Display -> Window -> CirculationDirection -> IO () hunk ./Graphics/X11/Xlib/Window.hs 156 - throwIfZero "iconifyWindow" - (xIconifyWindow display window screenno) + throwIfZero "iconifyWindow" + (xIconifyWindow display window screenno) hunk ./Graphics/X11/Xlib/Window.hs 159 - xIconifyWindow :: Display -> Window -> ScreenNumber -> IO Status + xIconifyWindow :: Display -> Window -> ScreenNumber -> IO Status hunk ./Graphics/X11/Xlib/Window.hs 164 - throwIfZero "withdrawWindow" - (xWithdrawWindow display window screenno) + throwIfZero "withdrawWindow" + (xWithdrawWindow display window screenno) hunk ./Graphics/X11/Xlib/Window.hs 167 - xWithdrawWindow :: Display -> Window -> ScreenNumber -> IO Status + xWithdrawWindow :: Display -> Window -> ScreenNumber -> IO Status hunk ./Graphics/X11/Xlib/Window.hs 171 - destroyWindow :: Display -> Window -> IO () + destroyWindow :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 175 - destroySubwindows :: Display -> Window -> IO () + destroySubwindows :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 179 - setWindowBorder :: Display -> Window -> Pixel -> IO () + setWindowBorder :: Display -> Window -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Window.hs 183 - setWindowBorderPixmap :: Display -> Window -> Pixmap -> IO () + setWindowBorderPixmap :: Display -> Window -> Pixmap -> IO () hunk ./Graphics/X11/Xlib/Window.hs 187 - setWindowBorderWidth :: Display -> Window -> Dimension -> IO () + setWindowBorderWidth :: Display -> Window -> Dimension -> IO () hunk ./Graphics/X11/Xlib/Window.hs 191 - setWindowBackground :: Display -> Window -> Pixel -> IO () + setWindowBackground :: Display -> Window -> Pixel -> IO () hunk ./Graphics/X11/Xlib/Window.hs 195 - setWindowBackgroundPixmap :: Display -> Window -> Pixmap -> IO () + setWindowBackgroundPixmap :: Display -> Window -> Pixmap -> IO () hunk ./Graphics/X11/Xlib/Window.hs 199 - setWindowColormap :: Display -> Window -> Colormap -> IO () + setWindowColormap :: Display -> Window -> Colormap -> IO () hunk ./Graphics/X11/Xlib/Window.hs 203 - addToSaveSet :: Display -> Window -> IO () + addToSaveSet :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 207 - removeFromSaveSet :: Display -> Window -> IO () + removeFromSaveSet :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 211 - changeSaveSet :: Display -> Window -> ChangeSaveSetMode -> IO () + changeSaveSet :: Display -> Window -> ChangeSaveSetMode -> IO () hunk ./Graphics/X11/Xlib/Window.hs 215 - clearWindow :: Display -> Window -> IO () + clearWindow :: Display -> Window -> IO () hunk ./Graphics/X11/Xlib/Window.hs 219 - clearArea :: Display -> Window -> - Position -> Position -> Dimension -> Dimension -> Bool -> IO () + clearArea :: Display -> Window -> + Position -> Position -> Dimension -> Dimension -> Bool -> IO () hunk ./Graphics/X11/Xlib/Window.hs 237 - withArray windows $ \ window_array -> - xRestackWindows display window_array (fromIntegral (length windows)) + withArray windows $ \ window_array -> + xRestackWindows display window_array (fromIntegral (length windows)) hunk ./Graphics/X11/Xlib/Window.hs 240 - xRestackWindows :: Display -> Ptr Window -> CInt -> IO () + xRestackWindows :: Display -> Ptr Window -> CInt -> IO () hunk ./Graphics/X11/Xinerama.hsc 1 --- | Interface to Xinerama API +-------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xinerama +-- Copyright : (c) Haskell.org, 2007 +-- License : BSD3 +-- +-- Maintainer: Don Stewart +-- Stability : provisional +-- Portability: portable +-- +-------------------------------------------------------------------- +-- +-- Interface to Xinerama API +-- + hunk ./Graphics/X11/Xinerama.hsc 16 -module Graphics.X11.Xinerama - (XineramaScreenInfo(..), - xineramaIsActive, - xineramaQueryExtension, - xineramaQueryVersion, +module Graphics.X11.Xinerama ( + XineramaScreenInfo(..), + xineramaIsActive, + xineramaQueryExtension, + xineramaQueryVersion, hunk ./Graphics/X11/Xinerama.hsc 23 - getScreenInfo) where + getScreenInfo + ) where hunk ./Graphics/X11/Xinerama.hsc 35 -data XineramaScreenInfo = XineramaScreenInfo - { xsi_screen_number :: CInt, - xsi_x_org :: CShort, - xsi_y_org :: CShort, - xsi_width :: CShort, - xsi_height :: CShort } +data XineramaScreenInfo = XineramaScreenInfo + { xsi_screen_number :: !CInt, + xsi_x_org :: !CShort, + xsi_y_org :: !CShort, + xsi_width :: !CShort, + xsi_height :: !CShort } hunk ./Graphics/X11/Xinerama.hsc 58 - where + where hunk ./Graphics/X11/Xinerama.hsc 121 + hunk ./Graphics/X11/Xinerama.hsc 124 + hunk ./Graphics/X11/Xinerama.hsc 127 + hunk ./Graphics/X11/Xinerama.hsc 132 -wrapPtr2 cfun f = +wrapPtr2 cfun f = hunk ./Graphics/X11/Xinerama.hsc 158 + hunk ./X11.buildinfo.in 5 -cc-options: @X_CFLAGS@ -ld-options: @X_LIBS@ +cc-options: @X_CFLAGS@ @CPPFLAGS@ +ld-options: @X_LIBS@ @LDFLAGS@ hunk ./configure.ac 28 - CPPFLAGS="$CPPFLAGS -I $x_includes" + CPPFLAGS="$CPPFLAGS -I$x_includes" hunk ./README 6 - - hunk ./README 9 - runhaskell Setup.hs configure --prefix=$USER + runhaskell Setup.hs configure --prefix=$HOME hunk ./README 16 - runhaskell Setup.hs configure --prefix=$USER --without-xinerama + runhaskell Setup.hs configure --prefix=$HOME --without-xinerama hunk ./Graphics/X11/Xlib/Extras.hsc 1086 -getWindowProperty8 :: Display -> Atom -> Window -> IO (Maybe [Word8]) +getWindowProperty8 :: Display -> Atom -> Window -> IO (Maybe [CChar]) hunk ./Graphics/X11/Xlib/Extras.hsc 1089 -getWindowProperty16 :: Display -> Atom -> Window -> IO (Maybe [Word16]) +getWindowProperty16 :: Display -> Atom -> Window -> IO (Maybe [CShort]) hunk ./Graphics/X11/Xlib/Extras.hsc 1092 -getWindowProperty32 :: Display -> Atom -> Window -> IO (Maybe [Word32]) +getWindowProperty32 :: Display -> Atom -> Window -> IO (Maybe [CLong]) hunk ./Graphics/X11/Xlib/Extras.hsc 1097 -changeProperty8 :: Display -> Window -> Atom -> Atom -> CInt -> [Word8] -> IO () +changeProperty8 :: Display -> Window -> Atom -> Atom -> CInt -> [CChar] -> IO () hunk ./Graphics/X11/Xlib/Extras.hsc 1103 -changeProperty16 :: Display -> Window -> Atom -> Atom -> CInt -> [Word16] -> IO () +changeProperty16 :: Display -> Window -> Atom -> Atom -> CInt -> [CShort] -> IO () hunk ./Graphics/X11/Xlib/Extras.hsc 1109 -changeProperty32 :: Display -> Window -> Atom -> Atom -> CInt -> [Word32] -> IO () +changeProperty32 :: Display -> Window -> Atom -> Atom -> CInt -> [CLong] -> IO () hunk ./X11.cabal 2 -version: 1.3.0 +version: 1.3.0.20071111 hunk ./Graphics/X11/Xlib/Extras.hsc 4 --- Module : --- Copyright : (c) Spencer Janssen --- License : BSD3-style (see LICENSE) --- --- Stability : stable +-- Module : Graphics.X11.Xlib.Extras +-- Copyright : 2007 (c) Spencer Janssen +-- License : BSD3-style (see LICENSE) +-- Stability : experimental hunk ./X11.cabal 2 -version: 1.3.0.20071111 +version: 1.4.0 hunk ./Graphics/X11/Xlib/Event.hsc 459 -foreign import ccall unsafe "HsXlib.h XSync" +foreign import ccall safe "HsXlib.h XSync" hunk ./Graphics/X11/Xlib/Extras.hsc 1372 +------------------------------------------------------------------------------- +-- Error handling +-- +-- 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 +type XErrorEventPtr = Ptr () +type CXErrorHandler = Display -> XErrorEventPtr -> IO CInt +type XErrorHandler = Display -> XErrorEventPtr -> IO () + +data ErrorEvent = ErrorEvent { + ev_type :: !CInt, + ev_display :: Display, + ev_serialnum :: !CULong, + ev_error_code :: !CUChar, + ev_request_code :: !CUChar, + ev_minor_code :: !CUChar, + ev_resourceid :: !XID +} + +foreign import ccall safe "wrapper" + mkXErrorHandler :: CXErrorHandler -> IO (FunPtr CXErrorHandler) +foreign import ccall safe "dynamic" + getXErrorHandler :: FunPtr CXErrorHandler -> CXErrorHandler +foreign import ccall safe "Xlib.h XSetErrorHandler" + _xSetErrorHandler :: FunPtr CXErrorHandler -> IO (FunPtr CXErrorHandler) + +setErrorHandler :: XErrorHandler -> IO () +setErrorHandler new_handler = do + _handler <- mkXErrorHandler (\d -> \e -> new_handler d e >> return 0) + _xSetErrorHandler _handler + return () + +getErrorEvent :: XErrorEventPtr -> IO ErrorEvent +getErrorEvent ev_ptr = do + _type <- #{peek XErrorEvent, type } ev_ptr + serial <- #{peek XErrorEvent, serial} ev_ptr + dsp <- fmap Display (#{peek XErrorEvent, display} ev_ptr) + error_code <- #{peek XErrorEvent, error_code} ev_ptr + request_code <- #{peek XErrorEvent, request_code} ev_ptr + minor_code <- #{peek XErrorEvent, minor_code} ev_ptr + resourceid <- #{peek XErrorEvent, resourceid} ev_ptr + return $ ErrorEvent { + ev_type = _type, + ev_display = dsp, + ev_serialnum = serial, + ev_error_code = error_code, + ev_request_code = request_code, + ev_minor_code = minor_code, + ev_resourceid = resourceid + } + hunk ./Graphics/X11/Xlib/Extras.hsc 1396 -foreign import ccall safe "Xlib.h XSetErrorHandler" +foreign import ccall safe "HsXlib.h XSetErrorHandler" hunk ./Graphics/X11/Xlib/Extras.hsc 1375 --- 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 hunk ./Graphics/X11/Xlib/Extras.hsc 1396 +-- |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 hunk ./Graphics/X11/Xlib/Extras.hsc 1406 +-- |Retrieves error event data from a pointer to an XErrorEvent and +-- puts it into an ErrorEvent. hunk ./Graphics/X11/Xlib/Extras.hsc 1427 +-- |A binding to XIconifyWindow. +foreign import ccall unsafe "HsXlib.h XIconifyWindow" + iconifyWindow :: Display -> Window -> ScreenNumber -> IO Status + +-- |A binding to XMapRaised. +foreign import ccall unsafe "HsXlib.h XMapRaised" + mapRaised :: Display -> Window -> IO CInt + hunk ./Graphics/X11/Xlib/Extras.hsc 1426 - --- |A binding to XIconifyWindow. -foreign import ccall unsafe "HsXlib.h XIconifyWindow" - iconifyWindow :: Display -> Window -> ScreenNumber -> IO Status hunk ./INSTALL 1 -# install ghc >= 6.0 -# install greencard >= 3.00 -# install X11 - -tar zxvf HSX11-1.00.tar.gz -cd HSX11-1.00 - -cd fptools -./configure --with-greencard -make - -cd .. -make boot -make all -make install # may require su root - rmfile ./INSTALL hunk ./README 14 -disable Xinerama support, add the '--without-xinerama' flag to configure: +disable Xinerama support, add the '--without-xinerama' flag to +configure-option: hunk ./README 17 - runhaskell Setup.hs configure --prefix=$HOME --without-xinerama + runhaskell Setup.hs configure --prefix=$HOME --configure-option="--without-xinerama" hunk ./README 25 -or +or hunk ./Graphics/X11/Xlib/Extras.hsc 1065 - xGetWindowProperty d w atom 0 0xFFFFFFFF False anyPropertyType + ret <- xGetWindowProperty d w atom 0 0xFFFFFFFF False anyPropertyType hunk ./Graphics/X11/Xlib/Extras.hsc 1072 - prop_ptr <- peek prop_return - actual_format <- fromIntegral `liftM` peek actual_format_return - nitems <- fromIntegral `liftM` peek nitems_return - getprop prop_ptr nitems actual_format + if ret /= 0 + then return Nothing + else do + prop_ptr <- peek prop_return + actual_format <- fromIntegral `fmap` peek actual_format_return + nitems <- fromIntegral `fmap` peek nitems_return + getprop prop_ptr nitems actual_format hunk ./X11.cabal 2 -version: 1.4.0 +version: 1.4.1 hunk ./X11.cabal 52 -ghc-options: -O2 -funbox-strict-fields -Wall -fno-warn-unused-binds +ghc-options: -funbox-strict-fields -Wall -fno-warn-unused-binds hunk ./Graphics/X11/Xlib/Color.hs 61 +-- TODO don't throw an exception. hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.3.0], [dons@galois.com], [X11]) +AC_INIT([Haskell X11 package], [1.4.1], [dons@galois.com], [X11]) hunk ./Graphics/X11/Xlib/Extras.hsc 1309 -getWMHints dpy w = xGetWMHints dpy w >>= peek +getWMHints dpy w = do + p <- xGetWMHints dpy w + if p == nullPtr + then return $ WMHints 0 False 0 0 0 0 0 0 0 + else peek p hunk ./X11.cabal 2 -version: 1.4.1 +version: 1.4.2 hunk ./Graphics/X11/Xlib/Extras.hsc 999 +setKeyEvent :: XEventPtr -> Window -> Window -> Window -> KeyMask -> KeyCode -> Bool -> IO () +setKeyEvent p win root subwin state keycode sameScreen = do + #{poke XKeyEvent, window } p win + #{poke XKeyEvent, root } p root + #{poke XKeyEvent, subwindow } p subwin + #{poke XKeyEvent, time } p currentTime + #{poke XKeyEvent, x } p (1 :: CInt) + #{poke XKeyEvent, y } p (1 :: CInt) + #{poke XKeyEvent, x_root } p (1 :: CInt) + #{poke XKeyEvent, y_root } p (1 :: CInt) + #{poke XKeyEvent, state } p state + #{poke XKeyEvent, keycode } p keycode + #{poke XKeyEvent, same_screen } p sameScreen + return () hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.4.1], [dons@galois.com], [X11]) +AC_INIT([Haskell X11 package], [1.4.2], [dons@galois.com], [X11]) hunk ./X11.cabal 53 +ghc-prof-options: -prof -auto-all hunk ./configure.ac 59 - want_xinerama=no, - want_xinerama=yes) -AC_MSG_RESULT([$want_xinerama]) + [], + [with_xinerama=yes]) +AC_MSG_RESULT([$with_xinerama]) hunk ./configure.ac 63 -if test "$want_xinerama" = yes; then +if test "$with_xinerama" = yes; then adddir ./Graphics/X11/ExtraTypes addfile ./Graphics/X11/ExtraTypes.hs hunk ./Graphics/X11/ExtraTypes.hs 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.ExtraTypes +-- Copyright : (c) Alastair Reid, 1999-2003 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : unstable +-- Portability : unportable +-- +-- Extra keysyms defined by X.org that may not be in other implementations. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.ExtraTypes + ( + -- * Types + module Graphics.X11.ExtraTypes.AP, + module Graphics.X11.ExtraTypes.DEC, + module Graphics.X11.ExtraTypes.HP, + module Graphics.X11.ExtraTypes.Sun, + module Graphics.X11.ExtraTypes.XF86, + module Graphics.X11.ExtraTypes.XorgDefault, + + ) where + +import Graphics.X11.ExtraTypes.AP +import Graphics.X11.ExtraTypes.DEC +import Graphics.X11.ExtraTypes.HP +import Graphics.X11.ExtraTypes.Sun +import Graphics.X11.ExtraTypes.XF86 +import Graphics.X11.ExtraTypes.XorgDefault + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- addfile ./Graphics/X11/ExtraTypes/AP.hsc hunk ./Graphics/X11/ExtraTypes/AP.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.ExtraTypes.AP +-- Copyright : (c) Apollo 1987, HP 1989 +-- License : X11 (see below) due to X headers +-- +-- Maintainer : libraries@haskell.org +-- Stability : unstable +-- Portability : unportable +-- +-- +-- This file is generated based on X.org includes. It contains +-- the keysyms for AP. +----------------------------------------------------------------------------- + +-- Generated from /usr/include/X11/ap_keysym.h +-- + +-- Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts. +-- Copyright 1989 by Hewlett-Packard Company. +-- +-- All Rights Reserved +-- +-- Permission to use, duplicate, change, and distribute this software and +-- its documentation for any purpose and without fee is granted, provided +-- that the above copyright notice appear in such copy and that this +-- copyright notice appear in all supporting documentation, and that the +-- names of Apollo Computer Inc., the Hewlett-Packard Company, or the X +-- Consortium not be used in advertising or publicity pertaining to +-- distribution of the software without written prior permission. +-- +-- HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD +-- TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +-- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +-- PURPOSE. Hewlett-Packard shall not be liable for errors +-- contained herein or direct, indirect, special, incidental or +-- consequential damages in connection with the furnishing, +-- performance, or use of this material. +-- +-- This software is not subject to any license of the American +-- Telephone and Telegraph Company or of the Regents of the +-- University of California. + +module Graphics.X11.ExtraTypes.AP + ( + +#ifdef apXK_LineDel + apXK_LineDel, +#else + -- Skipping apXK_LineDel because your X doesn't define it +#endif +#ifdef apXK_CharDel + apXK_CharDel, +#else + -- Skipping apXK_CharDel because your X doesn't define it +#endif +#ifdef apXK_Copy + apXK_Copy, +#else + -- Skipping apXK_Copy because your X doesn't define it +#endif +#ifdef apXK_Cut + apXK_Cut, +#else + -- Skipping apXK_Cut because your X doesn't define it +#endif +#ifdef apXK_Paste + apXK_Paste, +#else + -- Skipping apXK_Paste because your X doesn't define it +#endif +#ifdef apXK_Move + apXK_Move, +#else + -- Skipping apXK_Move because your X doesn't define it +#endif +#ifdef apXK_Grow + apXK_Grow, +#else + -- Skipping apXK_Grow because your X doesn't define it +#endif +#ifdef apXK_Cmd + apXK_Cmd, +#else + -- Skipping apXK_Cmd because your X doesn't define it +#endif +#ifdef apXK_Shell + apXK_Shell, +#else + -- Skipping apXK_Shell because your X doesn't define it +#endif +#ifdef apXK_LeftBar + apXK_LeftBar, +#else + -- Skipping apXK_LeftBar because your X doesn't define it +#endif +#ifdef apXK_RightBar + apXK_RightBar, +#else + -- Skipping apXK_RightBar because your X doesn't define it +#endif +#ifdef apXK_LeftBox + apXK_LeftBox, +#else + -- Skipping apXK_LeftBox because your X doesn't define it +#endif +#ifdef apXK_RightBox + apXK_RightBox, +#else + -- Skipping apXK_RightBox because your X doesn't define it +#endif +#ifdef apXK_UpBox + apXK_UpBox, +#else + -- Skipping apXK_UpBox because your X doesn't define it +#endif +#ifdef apXK_DownBox + apXK_DownBox, +#else + -- Skipping apXK_DownBox because your X doesn't define it +#endif +#ifdef apXK_Pop + apXK_Pop, +#else + -- Skipping apXK_Pop because your X doesn't define it +#endif +#ifdef apXK_Read + apXK_Read, +#else + -- Skipping apXK_Read because your X doesn't define it +#endif +#ifdef apXK_Edit + apXK_Edit, +#else + -- Skipping apXK_Edit because your X doesn't define it +#endif +#ifdef apXK_Save + apXK_Save, +#else + -- Skipping apXK_Save because your X doesn't define it +#endif +#ifdef apXK_Exit + apXK_Exit, +#else + -- Skipping apXK_Exit because your X doesn't define it +#endif +#ifdef apXK_Repeat + apXK_Repeat, +#else + -- Skipping apXK_Repeat because your X doesn't define it +#endif +#ifdef apXK_KP_parenleft + apXK_KP_parenleft, +#else + -- Skipping apXK_KP_parenleft because your X doesn't define it +#endif +#ifdef apXK_KP_parenright + apXK_KP_parenright, +#else + -- Skipping apXK_KP_parenright because your X doesn't define it +#endif + ) where + +import Graphics.X11.Types + +#include "HsAllKeysyms.h" + +#ifdef apXK_LineDel +apXK_LineDel :: KeySym +apXK_LineDel = #const apXK_LineDel +#endif +#ifdef apXK_CharDel +apXK_CharDel :: KeySym +apXK_CharDel = #const apXK_CharDel +#endif +#ifdef apXK_Copy +apXK_Copy :: KeySym +apXK_Copy = #const apXK_Copy +#endif +#ifdef apXK_Cut +apXK_Cut :: KeySym +apXK_Cut = #const apXK_Cut +#endif +#ifdef apXK_Paste +apXK_Paste :: KeySym +apXK_Paste = #const apXK_Paste +#endif +#ifdef apXK_Move +apXK_Move :: KeySym +apXK_Move = #const apXK_Move +#endif +#ifdef apXK_Grow +apXK_Grow :: KeySym +apXK_Grow = #const apXK_Grow +#endif +#ifdef apXK_Cmd +apXK_Cmd :: KeySym +apXK_Cmd = #const apXK_Cmd +#endif +#ifdef apXK_Shell +apXK_Shell :: KeySym +apXK_Shell = #const apXK_Shell +#endif +#ifdef apXK_LeftBar +apXK_LeftBar :: KeySym +apXK_LeftBar = #const apXK_LeftBar +#endif +#ifdef apXK_RightBar +apXK_RightBar :: KeySym +apXK_RightBar = #const apXK_RightBar +#endif +#ifdef apXK_LeftBox +apXK_LeftBox :: KeySym +apXK_LeftBox = #const apXK_LeftBox +#endif +#ifdef apXK_RightBox +apXK_RightBox :: KeySym +apXK_RightBox = #const apXK_RightBox +#endif +#ifdef apXK_UpBox +apXK_UpBox :: KeySym +apXK_UpBox = #const apXK_UpBox +#endif +#ifdef apXK_DownBox +apXK_DownBox :: KeySym +apXK_DownBox = #const apXK_DownBox +#endif +#ifdef apXK_Pop +apXK_Pop :: KeySym +apXK_Pop = #const apXK_Pop +#endif +#ifdef apXK_Read +apXK_Read :: KeySym +apXK_Read = #const apXK_Read +#endif +#ifdef apXK_Edit +apXK_Edit :: KeySym +apXK_Edit = #const apXK_Edit +#endif +#ifdef apXK_Save +apXK_Save :: KeySym +apXK_Save = #const apXK_Save +#endif +#ifdef apXK_Exit +apXK_Exit :: KeySym +apXK_Exit = #const apXK_Exit +#endif +#ifdef apXK_Repeat +apXK_Repeat :: KeySym +apXK_Repeat = #const apXK_Repeat +#endif +#ifdef apXK_KP_parenleft +apXK_KP_parenleft :: KeySym +apXK_KP_parenleft = #const apXK_KP_parenleft +#endif +#ifdef apXK_KP_parenright +apXK_KP_parenright :: KeySym +apXK_KP_parenright = #const apXK_KP_parenright +#endif addfile ./Graphics/X11/ExtraTypes/DEC.hsc hunk ./Graphics/X11/ExtraTypes/DEC.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.ExtraTypes.DEC +-- Copyright : (c) Open Group 1988,1998, DEC 1988 +-- License : X11 (see below) due to X headers +-- +-- Maintainer : libraries@haskell.org +-- Stability : unstable +-- Portability : unportable +-- +-- +-- This file is generated based on X.org includes. It contains +-- the keysyms for DEC. +----------------------------------------------------------------------------- + +-- Generated from /usr/include/X11/DECkeysym.h +-- + +-- +-- Copyright 1988, 1998 The Open Group +-- +-- Permission to use, copy, modify, distribute, and sell this software and its +-- documentation for any purpose is hereby granted without fee, provided that +-- the above copyright notice appear in all copies and that both that +-- copyright notice and this permission notice appear in supporting +-- documentation. +-- +-- The above copyright notice and this permission notice shall be included in +-- all copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +-- AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +-- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +-- +-- Except as contained in this notice, the name of The Open Group shall not be +-- used in advertising or otherwise to promote the sale, use or other dealings +-- in this Software without prior written authorization from The Open Group. +-- +-- +-- Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts. +-- +-- All Rights Reserved +-- +-- Permission to use, copy, modify, and distribute this software and its +-- documentation for any purpose and without fee is hereby granted, +-- provided that the above copyright notice appear in all copies and that +-- both that copyright notice and this permission notice appear in +-- supporting documentation, and that the name of Digital not be +-- used in advertising or publicity pertaining to distribution of the +-- software without specific, written prior permission. +-- +-- DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +-- ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +-- DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +-- ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +-- WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +-- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +-- SOFTWARE. +-- + +module Graphics.X11.ExtraTypes.DEC + ( + +#ifdef DXK_ring_accent + dXK_ring_accent, +#else + -- Skipping dXK_ring_accent because your X doesn't define it +#endif +#ifdef DXK_circumflex_accent + dXK_circumflex_accent, +#else + -- Skipping dXK_circumflex_accent because your X doesn't define it +#endif +#ifdef DXK_cedilla_accent + dXK_cedilla_accent, +#else + -- Skipping dXK_cedilla_accent because your X doesn't define it +#endif +#ifdef DXK_acute_accent + dXK_acute_accent, +#else + -- Skipping dXK_acute_accent because your X doesn't define it +#endif +#ifdef DXK_grave_accent + dXK_grave_accent, +#else + -- Skipping dXK_grave_accent because your X doesn't define it +#endif +#ifdef DXK_tilde + dXK_tilde, +#else + -- Skipping dXK_tilde because your X doesn't define it +#endif +#ifdef DXK_diaeresis + dXK_diaeresis, +#else + -- Skipping dXK_diaeresis because your X doesn't define it +#endif +#ifdef DXK_Remove + dXK_Remove, -- Remove +#else + -- Skipping dXK_Remove because your X doesn't define it +#endif + ) where + +import Graphics.X11.Types + +#include "HsAllKeysyms.h" + +#ifdef DXK_ring_accent +dXK_ring_accent :: KeySym +dXK_ring_accent = #const DXK_ring_accent +#endif +#ifdef DXK_circumflex_accent +dXK_circumflex_accent :: KeySym +dXK_circumflex_accent = #const DXK_circumflex_accent +#endif +#ifdef DXK_cedilla_accent +dXK_cedilla_accent :: KeySym +dXK_cedilla_accent = #const DXK_cedilla_accent +#endif +#ifdef DXK_acute_accent +dXK_acute_accent :: KeySym +dXK_acute_accent = #const DXK_acute_accent +#endif +#ifdef DXK_grave_accent +dXK_grave_accent :: KeySym +dXK_grave_accent = #const DXK_grave_accent +#endif +#ifdef DXK_tilde +dXK_tilde :: KeySym +dXK_tilde = #const DXK_tilde +#endif +#ifdef DXK_diaeresis +dXK_diaeresis :: KeySym +dXK_diaeresis = #const DXK_diaeresis +#endif +#ifdef DXK_Remove +dXK_Remove :: KeySym +dXK_Remove = #const DXK_Remove +#endif addfile ./Graphics/X11/ExtraTypes/HP.hsc hunk ./Graphics/X11/ExtraTypes/HP.hsc 1 +----------------------------------------------------------------------------- +-- +-- Module : Graphics.X11.ExtraTypes.HP +-- Copyright : (c) Open Group 1987,1998, DEC 1987 +-- License : X11 (see below) due to X headers +-- +-- Maintainer : libraries@haskell.org +-- Stability : unstable +-- Portability : unportable +-- +-- +-- This file is generated based on X.org includes. It contains +-- the keysyms for HP. +----------------------------------------------------------------------------- + +-- Generated from /usr/include/X11/HPkeysym.h +-- + +-- Copyright 1987, 1998 The Open Group +-- +-- Permission to use, copy, modify, distribute, and sell this software and its +-- documentation for any purpose is hereby granted without fee, provided that +-- the above copyright notice appear in all copies and that both that +-- copyright notice and this permission notice appear in supporting +-- documentation. +-- +-- The above copyright notice and this permission notice shall be included +-- in all copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +-- IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +-- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +-- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +-- OTHER DEALINGS IN THE SOFTWARE. +-- +-- Except as contained in this notice, the name of The Open Group shall +-- not be used in advertising or otherwise to promote the sale, use or +-- other dealings in this Software without prior written authorization +-- from The Open Group. +-- +-- Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, +-- +-- All Rights Reserved +-- +-- Permission to use, copy, modify, and distribute this software and its +-- documentation for any purpose and without fee is hereby granted, +-- provided that the above copyright notice appear in all copies and that +-- both that copyright notice and this permission notice appear in +-- supporting documentation, and that the names of Hewlett Packard +-- or Digital not be +-- used in advertising or publicity pertaining to distribution of the +-- software without specific, written prior permission. +-- +-- DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +-- ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +-- DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +-- ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +-- WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +-- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +-- SOFTWARE. +-- +-- HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD +-- TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +-- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +-- PURPOSE. Hewlett-Packard shall not be liable for errors +-- contained herein or direct, indirect, special, incidental or +-- consequential damages in connection with the furnishing, +-- performance, or use of this material. + +module Graphics.X11.ExtraTypes.HP + ( + +#ifdef hpXK_ClearLine + hpXK_ClearLine, +#else + -- Skipping hpXK_ClearLine because your X doesn't define it +#endif +#ifdef hpXK_InsertLine + hpXK_InsertLine, +#else + -- Skipping hpXK_InsertLine because your X doesn't define it +#endif +#ifdef hpXK_DeleteLine + hpXK_DeleteLine, +#else + -- Skipping hpXK_DeleteLine because your X doesn't define it +#endif +#ifdef hpXK_InsertChar + hpXK_InsertChar, +#else + -- Skipping hpXK_InsertChar because your X doesn't define it +#endif +#ifdef hpXK_DeleteChar + hpXK_DeleteChar, +#else + -- Skipping hpXK_DeleteChar because your X doesn't define it +#endif +#ifdef hpXK_BackTab + hpXK_BackTab, +#else + -- Skipping hpXK_BackTab because your X doesn't define it +#endif +#ifdef hpXK_KP_BackTab + hpXK_KP_BackTab, +#else + -- Skipping hpXK_KP_BackTab because your X doesn't define it +#endif +#ifdef hpXK_Modelock1 + hpXK_Modelock1, +#else + -- Skipping hpXK_Modelock1 because your X doesn't define it +#endif +#ifdef hpXK_Modelock2 + hpXK_Modelock2, +#else + -- Skipping hpXK_Modelock2 because your X doesn't define it +#endif +#ifdef hpXK_Reset + hpXK_Reset, +#else + -- Skipping hpXK_Reset because your X doesn't define it +#endif +#ifdef hpXK_System + hpXK_System, +#else + -- Skipping hpXK_System because your X doesn't define it +#endif +#ifdef hpXK_User + hpXK_User, +#else + -- Skipping hpXK_User because your X doesn't define it +#endif +#ifdef hpXK_mute_acute + hpXK_mute_acute, +#else + -- Skipping hpXK_mute_acute because your X doesn't define it +#endif +#ifdef hpXK_mute_grave + hpXK_mute_grave, +#else + -- Skipping hpXK_mute_grave because your X doesn't define it +#endif +#ifdef hpXK_mute_asciicircum + hpXK_mute_asciicircum, +#else + -- Skipping hpXK_mute_asciicircum because your X doesn't define it +#endif +#ifdef hpXK_mute_diaeresis + hpXK_mute_diaeresis, +#else + -- Skipping hpXK_mute_diaeresis because your X doesn't define it +#endif +#ifdef hpXK_mute_asciitilde + hpXK_mute_asciitilde, +#else + -- Skipping hpXK_mute_asciitilde because your X doesn't define it +#endif +#ifdef hpXK_lira + hpXK_lira, +#else + -- Skipping hpXK_lira because your X doesn't define it +#endif +#ifdef hpXK_guilder + hpXK_guilder, +#else + -- Skipping hpXK_guilder because your X doesn't define it +#endif +#ifdef hpXK_Ydiaeresis + hpXK_Ydiaeresis, +#else + -- Skipping hpXK_Ydiaeresis because your X doesn't define it +#endif +#ifdef hpXK_IO + hpXK_IO, +#else + -- Skipping hpXK_IO because your X doesn't define it +#endif +#ifdef hpXK_longminus + hpXK_longminus, +#else + -- Skipping hpXK_longminus because your X doesn't define it +#endif +#ifdef hpXK_block + hpXK_block, +#else + -- Skipping hpXK_block because your X doesn't define it +#endif +#ifdef osfXK_Copy + osfXK_Copy, +#else + -- Skipping osfXK_Copy because your X doesn't define it +#endif +#ifdef osfXK_Cut + osfXK_Cut, +#else + -- Skipping osfXK_Cut because your X doesn't define it +#endif +#ifdef osfXK_Paste + osfXK_Paste, +#else + -- Skipping osfXK_Paste because your X doesn't define it +#endif +#ifdef osfXK_BackTab + osfXK_BackTab, +#else + -- Skipping osfXK_BackTab because your X doesn't define it +#endif +#ifdef osfXK_BackSpace + osfXK_BackSpace, +#else + -- Skipping osfXK_BackSpace because your X doesn't define it +#endif +#ifdef osfXK_Clear + osfXK_Clear, +#else + -- Skipping osfXK_Clear because your X doesn't define it +#endif +#ifdef osfXK_Escape + osfXK_Escape, +#else + -- Skipping osfXK_Escape because your X doesn't define it +#endif +#ifdef osfXK_AddMode + osfXK_AddMode, +#else + -- Skipping osfXK_AddMode because your X doesn't define it +#endif +#ifdef osfXK_PrimaryPaste + osfXK_PrimaryPaste, +#else + -- Skipping osfXK_PrimaryPaste because your X doesn't define it +#endif +#ifdef osfXK_QuickPaste + osfXK_QuickPaste, +#else + -- Skipping osfXK_QuickPaste because your X doesn't define it +#endif +#ifdef osfXK_PageLeft + osfXK_PageLeft, +#else + -- Skipping osfXK_PageLeft because your X doesn't define it +#endif +#ifdef osfXK_PageUp + osfXK_PageUp, +#else + -- Skipping osfXK_PageUp because your X doesn't define it +#endif +#ifdef osfXK_PageDown + osfXK_PageDown, +#else + -- Skipping osfXK_PageDown because your X doesn't define it +#endif +#ifdef osfXK_PageRight + osfXK_PageRight, +#else + -- Skipping osfXK_PageRight because your X doesn't define it +#endif +#ifdef osfXK_Activate + osfXK_Activate, +#else + -- Skipping osfXK_Activate because your X doesn't define it +#endif +#ifdef osfXK_MenuBar + osfXK_MenuBar, +#else + -- Skipping osfXK_MenuBar because your X doesn't define it +#endif +#ifdef osfXK_Left + osfXK_Left, +#else + -- Skipping osfXK_Left because your X doesn't define it +#endif +#ifdef osfXK_Up + osfXK_Up, +#else + -- Skipping osfXK_Up because your X doesn't define it +#endif +#ifdef osfXK_Right + osfXK_Right, +#else + -- Skipping osfXK_Right because your X doesn't define it +#endif +#ifdef osfXK_Down + osfXK_Down, +#else + -- Skipping osfXK_Down because your X doesn't define it +#endif +#ifdef osfXK_EndLine + osfXK_EndLine, +#else + -- Skipping osfXK_EndLine because your X doesn't define it +#endif +#ifdef osfXK_BeginLine + osfXK_BeginLine, +#else + -- Skipping osfXK_BeginLine because your X doesn't define it +#endif +#ifdef osfXK_EndData + osfXK_EndData, +#else + -- Skipping osfXK_EndData because your X doesn't define it +#endif +#ifdef osfXK_BeginData + osfXK_BeginData, +#else + -- Skipping osfXK_BeginData because your X doesn't define it +#endif +#ifdef osfXK_PrevMenu + osfXK_PrevMenu, +#else + -- Skipping osfXK_PrevMenu because your X doesn't define it +#endif +#ifdef osfXK_NextMenu + osfXK_NextMenu, +#else + -- Skipping osfXK_NextMenu because your X doesn't define it +#endif +#ifdef osfXK_PrevField + osfXK_PrevField, +#else + -- Skipping osfXK_PrevField because your X doesn't define it +#endif +#ifdef osfXK_NextField + osfXK_NextField, +#else + -- Skipping osfXK_NextField because your X doesn't define it +#endif +#ifdef osfXK_Select + osfXK_Select, +#else + -- Skipping osfXK_Select because your X doesn't define it +#endif +#ifdef osfXK_Insert + osfXK_Insert, +#else + -- Skipping osfXK_Insert because your X doesn't define it +#endif +#ifdef osfXK_Undo + osfXK_Undo, +#else + -- Skipping osfXK_Undo because your X doesn't define it +#endif +#ifdef osfXK_Menu + osfXK_Menu, +#else + -- Skipping osfXK_Menu because your X doesn't define it +#endif +#ifdef osfXK_Cancel + osfXK_Cancel, +#else + -- Skipping osfXK_Cancel because your X doesn't define it +#endif +#ifdef osfXK_Help + osfXK_Help, +#else + -- Skipping osfXK_Help because your X doesn't define it +#endif +#ifdef osfXK_SelectAll + osfXK_SelectAll, +#else + -- Skipping osfXK_SelectAll because your X doesn't define it +#endif +#ifdef osfXK_DeselectAll + osfXK_DeselectAll, +#else + -- Skipping osfXK_DeselectAll because your X doesn't define it +#endif +#ifdef osfXK_Reselect + osfXK_Reselect, +#else + -- Skipping osfXK_Reselect because your X doesn't define it +#endif +#ifdef osfXK_Extend + osfXK_Extend, +#else + -- Skipping osfXK_Extend because your X doesn't define it +#endif +#ifdef osfXK_Restore + osfXK_Restore, +#else + -- Skipping osfXK_Restore because your X doesn't define it +#endif +#ifdef osfXK_Delete + osfXK_Delete, +#else + -- Skipping osfXK_Delete because your X doesn't define it +#endif +#ifdef XK_Reset + xK_Reset, +#else + -- Skipping xK_Reset because your X doesn't define it +#endif +#ifdef XK_System + xK_System, +#else + -- Skipping xK_System because your X doesn't define it +#endif +#ifdef XK_User + xK_User, +#else + -- Skipping xK_User because your X doesn't define it +#endif +#ifdef XK_ClearLine + xK_ClearLine, +#else + -- Skipping xK_ClearLine because your X doesn't define it +#endif +#ifdef XK_InsertLine + xK_InsertLine, +#else + -- Skipping xK_InsertLine because your X doesn't define it +#endif +#ifdef XK_DeleteLine + xK_DeleteLine, +#else + -- Skipping xK_DeleteLine because your X doesn't define it +#endif +#ifdef XK_InsertChar + xK_InsertChar, +#else + -- Skipping xK_InsertChar because your X doesn't define it +#endif +#ifdef XK_DeleteChar + xK_DeleteChar, +#else + -- Skipping xK_DeleteChar because your X doesn't define it +#endif +#ifdef XK_BackTab + xK_BackTab, +#else + -- Skipping xK_BackTab because your X doesn't define it +#endif +#ifdef XK_KP_BackTab + xK_KP_BackTab, +#else + -- Skipping xK_KP_BackTab because your X doesn't define it +#endif +#ifdef XK_Ext16bit_L + xK_Ext16bit_L, +#else + -- Skipping xK_Ext16bit_L because your X doesn't define it +#endif +#ifdef XK_Ext16bit_R + xK_Ext16bit_R, +#else + -- Skipping xK_Ext16bit_R because your X doesn't define it +#endif +#ifdef XK_mute_acute + xK_mute_acute, +#else + -- Skipping xK_mute_acute because your X doesn't define it +#endif +#ifdef XK_mute_grave + xK_mute_grave, +#else + -- Skipping xK_mute_grave because your X doesn't define it +#endif +#ifdef XK_mute_asciicircum + xK_mute_asciicircum, +#else + -- Skipping xK_mute_asciicircum because your X doesn't define it +#endif +#ifdef XK_mute_diaeresis + xK_mute_diaeresis, +#else + -- Skipping xK_mute_diaeresis because your X doesn't define it +#endif +#ifdef XK_mute_asciitilde + xK_mute_asciitilde, +#else + -- Skipping xK_mute_asciitilde because your X doesn't define it +#endif +#ifdef XK_lira + xK_lira, +#else + -- Skipping xK_lira because your X doesn't define it +#endif +#ifdef XK_guilder + xK_guilder, +#else + -- Skipping xK_guilder because your X doesn't define it +#endif +#ifdef XK_IO + xK_IO, +#else + -- Skipping xK_IO because your X doesn't define it +#endif +#ifdef XK_longminus + xK_longminus, +#else + -- Skipping xK_longminus because your X doesn't define it +#endif +#ifdef XK_block + xK_block, +#else + -- Skipping xK_block because your X doesn't define it +#endif + ) where + +import Graphics.X11.Types + +#include "HsAllKeysyms.h" + +#ifdef hpXK_ClearLine +hpXK_ClearLine :: KeySym +hpXK_ClearLine = #const hpXK_ClearLine +#endif +#ifdef hpXK_InsertLine +hpXK_InsertLine :: KeySym +hpXK_InsertLine = #const hpXK_InsertLine +#endif +#ifdef hpXK_DeleteLine +hpXK_DeleteLine :: KeySym +hpXK_DeleteLine = #const hpXK_DeleteLine +#endif +#ifdef hpXK_InsertChar +hpXK_InsertChar :: KeySym +hpXK_InsertChar = #const hpXK_InsertChar +#endif +#ifdef hpXK_DeleteChar +hpXK_DeleteChar :: KeySym +hpXK_DeleteChar = #const hpXK_DeleteChar +#endif +#ifdef hpXK_BackTab +hpXK_BackTab :: KeySym +hpXK_BackTab = #const hpXK_BackTab +#endif +#ifdef hpXK_KP_BackTab +hpXK_KP_BackTab :: KeySym +hpXK_KP_BackTab = #const hpXK_KP_BackTab +#endif +#ifdef hpXK_Modelock1 +hpXK_Modelock1 :: KeySym +hpXK_Modelock1 = #const hpXK_Modelock1 +#endif +#ifdef hpXK_Modelock2 +hpXK_Modelock2 :: KeySym +hpXK_Modelock2 = #const hpXK_Modelock2 +#endif +#ifdef hpXK_Reset +hpXK_Reset :: KeySym +hpXK_Reset = #const hpXK_Reset +#endif +#ifdef hpXK_System +hpXK_System :: KeySym +hpXK_System = #const hpXK_System +#endif +#ifdef hpXK_User +hpXK_User :: KeySym +hpXK_User = #const hpXK_User +#endif +#ifdef hpXK_mute_acute +hpXK_mute_acute :: KeySym +hpXK_mute_acute = #const hpXK_mute_acute +#endif +#ifdef hpXK_mute_grave +hpXK_mute_grave :: KeySym +hpXK_mute_grave = #const hpXK_mute_grave +#endif +#ifdef hpXK_mute_asciicircum +hpXK_mute_asciicircum :: KeySym +hpXK_mute_asciicircum = #const hpXK_mute_asciicircum +#endif +#ifdef hpXK_mute_diaeresis +hpXK_mute_diaeresis :: KeySym +hpXK_mute_diaeresis = #const hpXK_mute_diaeresis +#endif +#ifdef hpXK_mute_asciitilde +hpXK_mute_asciitilde :: KeySym +hpXK_mute_asciitilde = #const hpXK_mute_asciitilde +#endif +#ifdef hpXK_lira +hpXK_lira :: KeySym +hpXK_lira = #const hpXK_lira +#endif +#ifdef hpXK_guilder +hpXK_guilder :: KeySym +hpXK_guilder = #const hpXK_guilder +#endif +#ifdef hpXK_Ydiaeresis +hpXK_Ydiaeresis :: KeySym +hpXK_Ydiaeresis = #const hpXK_Ydiaeresis +#endif +#ifdef hpXK_IO +hpXK_IO :: KeySym +hpXK_IO = #const hpXK_IO +#endif +#ifdef hpXK_longminus +hpXK_longminus :: KeySym +hpXK_longminus = #const hpXK_longminus +#endif +#ifdef hpXK_block +hpXK_block :: KeySym +hpXK_block = #const hpXK_block +#endif +#ifdef osfXK_Copy +osfXK_Copy :: KeySym +osfXK_Copy = #const osfXK_Copy +#endif +#ifdef osfXK_Cut +osfXK_Cut :: KeySym +osfXK_Cut = #const osfXK_Cut +#endif +#ifdef osfXK_Paste +osfXK_Paste :: KeySym +osfXK_Paste = #const osfXK_Paste +#endif +#ifdef osfXK_BackTab +osfXK_BackTab :: KeySym +osfXK_BackTab = #const osfXK_BackTab +#endif +#ifdef osfXK_BackSpace +osfXK_BackSpace :: KeySym +osfXK_BackSpace = #const osfXK_BackSpace +#endif +#ifdef osfXK_Clear +osfXK_Clear :: KeySym +osfXK_Clear = #const osfXK_Clear +#endif +#ifdef osfXK_Escape +osfXK_Escape :: KeySym +osfXK_Escape = #const osfXK_Escape +#endif +#ifdef osfXK_AddMode +osfXK_AddMode :: KeySym +osfXK_AddMode = #const osfXK_AddMode +#endif +#ifdef osfXK_PrimaryPaste +osfXK_PrimaryPaste :: KeySym +osfXK_PrimaryPaste = #const osfXK_PrimaryPaste +#endif +#ifdef osfXK_QuickPaste +osfXK_QuickPaste :: KeySym +osfXK_QuickPaste = #const osfXK_QuickPaste +#endif +#ifdef osfXK_PageLeft +osfXK_PageLeft :: KeySym +osfXK_PageLeft = #const osfXK_PageLeft +#endif +#ifdef osfXK_PageUp +osfXK_PageUp :: KeySym +osfXK_PageUp = #const osfXK_PageUp +#endif +#ifdef osfXK_PageDown +osfXK_PageDown :: KeySym +osfXK_PageDown = #const osfXK_PageDown +#endif +#ifdef osfXK_PageRight +osfXK_PageRight :: KeySym +osfXK_PageRight = #const osfXK_PageRight +#endif +#ifdef osfXK_Activate +osfXK_Activate :: KeySym +osfXK_Activate = #const osfXK_Activate +#endif +#ifdef osfXK_MenuBar +osfXK_MenuBar :: KeySym +osfXK_MenuBar = #const osfXK_MenuBar +#endif +#ifdef osfXK_Left +osfXK_Left :: KeySym +osfXK_Left = #const osfXK_Left +#endif +#ifdef osfXK_Up +osfXK_Up :: KeySym +osfXK_Up = #const osfXK_Up +#endif +#ifdef osfXK_Right +osfXK_Right :: KeySym +osfXK_Right = #const osfXK_Right +#endif +#ifdef osfXK_Down +osfXK_Down :: KeySym +osfXK_Down = #const osfXK_Down +#endif +#ifdef osfXK_EndLine +osfXK_EndLine :: KeySym +osfXK_EndLine = #const osfXK_EndLine +#endif +#ifdef osfXK_BeginLine +osfXK_BeginLine :: KeySym +osfXK_BeginLine = #const osfXK_BeginLine +#endif +#ifdef osfXK_EndData +osfXK_EndData :: KeySym +osfXK_EndData = #const osfXK_EndData +#endif +#ifdef osfXK_BeginData +osfXK_BeginData :: KeySym +osfXK_BeginData = #const osfXK_BeginData +#endif +#ifdef osfXK_PrevMenu +osfXK_PrevMenu :: KeySym +osfXK_PrevMenu = #const osfXK_PrevMenu +#endif +#ifdef osfXK_NextMenu +osfXK_NextMenu :: KeySym +osfXK_NextMenu = #const osfXK_NextMenu +#endif +#ifdef osfXK_PrevField +osfXK_PrevField :: KeySym +osfXK_PrevField = #const osfXK_PrevField +#endif +#ifdef osfXK_NextField +osfXK_NextField :: KeySym +osfXK_NextField = #const osfXK_NextField +#endif +#ifdef osfXK_Select +osfXK_Select :: KeySym +osfXK_Select = #const osfXK_Select +#endif +#ifdef osfXK_Insert +osfXK_Insert :: KeySym +osfXK_Insert = #const osfXK_Insert +#endif +#ifdef osfXK_Undo +osfXK_Undo :: KeySym +osfXK_Undo = #const osfXK_Undo +#endif +#ifdef osfXK_Menu +osfXK_Menu :: KeySym +osfXK_Menu = #const osfXK_Menu +#endif +#ifdef osfXK_Cancel +osfXK_Cancel :: KeySym +osfXK_Cancel = #const osfXK_Cancel +#endif +#ifdef osfXK_Help +osfXK_Help :: KeySym +osfXK_Help = #const osfXK_Help +#endif +#ifdef osfXK_SelectAll +osfXK_SelectAll :: KeySym +osfXK_SelectAll = #const osfXK_SelectAll +#endif +#ifdef osfXK_DeselectAll +osfXK_DeselectAll :: KeySym +osfXK_DeselectAll = #const osfXK_DeselectAll +#endif +#ifdef osfXK_Reselect +osfXK_Reselect :: KeySym +osfXK_Reselect = #const osfXK_Reselect +#endif +#ifdef osfXK_Extend +osfXK_Extend :: KeySym +osfXK_Extend = #const osfXK_Extend +#endif +#ifdef osfXK_Restore +osfXK_Restore :: KeySym +osfXK_Restore = #const osfXK_Restore +#endif +#ifdef osfXK_Delete +osfXK_Delete :: KeySym +osfXK_Delete = #const osfXK_Delete +#endif +#ifdef XK_Reset +xK_Reset :: KeySym +xK_Reset = #const XK_Reset +#endif +#ifdef XK_System +xK_System :: KeySym +xK_System = #const XK_System +#endif +#ifdef XK_User +xK_User :: KeySym +xK_User = #const XK_User +#endif +#ifdef XK_ClearLine +xK_ClearLine :: KeySym +xK_ClearLine = #const XK_ClearLine +#endif +#ifdef XK_InsertLine +xK_InsertLine :: KeySym +xK_InsertLine = #const XK_InsertLine +#endif +#ifdef XK_DeleteLine +xK_DeleteLine :: KeySym +xK_DeleteLine = #const XK_DeleteLine +#endif +#ifdef XK_InsertChar +xK_InsertChar :: KeySym +xK_InsertChar = #const XK_InsertChar +#endif +#ifdef XK_DeleteChar +xK_DeleteChar :: KeySym +xK_DeleteChar = #const XK_DeleteChar +#endif +#ifdef XK_BackTab +xK_BackTab :: KeySym +xK_BackTab = #const XK_BackTab +#endif +#ifdef XK_KP_BackTab +xK_KP_BackTab :: KeySym +xK_KP_BackTab = #const XK_KP_BackTab +#endif +#ifdef XK_Ext16bit_L +xK_Ext16bit_L :: KeySym +xK_Ext16bit_L = #const XK_Ext16bit_L +#endif +#ifdef XK_Ext16bit_R +xK_Ext16bit_R :: KeySym +xK_Ext16bit_R = #const XK_Ext16bit_R +#endif +#ifdef XK_mute_acute +xK_mute_acute :: KeySym +xK_mute_acute = #const XK_mute_acute +#endif +#ifdef XK_mute_grave +xK_mute_grave :: KeySym +xK_mute_grave = #const XK_mute_grave +#endif +#ifdef XK_mute_asciicircum +xK_mute_asciicircum :: KeySym +xK_mute_asciicircum = #const XK_mute_asciicircum +#endif +#ifdef XK_mute_diaeresis +xK_mute_diaeresis :: KeySym +xK_mute_diaeresis = #const XK_mute_diaeresis +#endif +#ifdef XK_mute_asciitilde +xK_mute_asciitilde :: KeySym +xK_mute_asciitilde = #const XK_mute_asciitilde +#endif +#ifdef XK_lira +xK_lira :: KeySym +xK_lira = #const XK_lira +#endif +#ifdef XK_guilder +xK_guilder :: KeySym +xK_guilder = #const XK_guilder +#endif +#ifdef XK_Ydiaeresis +xK_Ydiaeresis :: KeySym +xK_Ydiaeresis = #const XK_Ydiaeresis +#endif +#ifdef XK_IO +xK_IO :: KeySym +xK_IO = #const XK_IO +#endif +#ifdef XK_longminus +xK_longminus :: KeySym +xK_longminus = #const XK_longminus +#endif +#ifdef XK_block +xK_block :: KeySym +xK_block = #const XK_block +#endif addfile ./Graphics/X11/ExtraTypes/Sun.hsc hunk ./Graphics/X11/ExtraTypes/Sun.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.ExtraTypes.Sun +-- Copyright : (c) Open Group 1991,1998, Sun 1991 +-- License : X11 (see below) due to X headers +-- +-- Maintainer : libraries@haskell.org +-- Stability : unstable +-- Portability : unportable +-- +-- +-- This file is generated based on X.org includes. It contains +-- the keysyms for Sun. +----------------------------------------------------------------------------- + +-- Generated from /usr/include/X11/Sunkeysym.h +-- + +-- +-- Copyright 1991, 1998 The Open Group +-- +-- Permission to use, copy, modify, distribute, and sell this software and its +-- documentation for any purpose is hereby granted without fee, provided that +-- the above copyright notice appear in all copies and that both that +-- copyright notice and this permission notice appear in supporting +-- documentation. +-- +-- The above copyright notice and this permission notice shall be included in +-- all copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +-- AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +-- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +-- +-- Except as contained in this notice, the name of The Open Group shall not be +-- used in advertising or otherwise to promote the sale, use or other dealings +-- in this Software without prior written authorization from The Open Group. +-- +-- +-- Copyright 1991 by Sun Microsystems, Inc. Mountain View, CA. +-- +-- All Rights Reserved +-- +-- Permission to use, copy, modify, and distribute this +-- software and its documentation for any purpose and without +-- fee is hereby granted, provided that the above copyright no- +-- tice appear in all copies and that both that copyright no- +-- tice and this permission notice appear in supporting docu- +-- mentation, and that the name of Sun not be used in +-- advertising or publicity pertaining to distribution of the +-- software without specific prior written permission. Sun +-- makes no representations about the suitability of this +-- software for any purpose. It is provided "as is" without any +-- express or implied warranty. +-- +-- SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +-- INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- +-- NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- +-- ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +-- ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +-- PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +-- OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +-- THE USE OR PERFORMANCE OF THIS SOFTWARE. +-- + +module Graphics.X11.ExtraTypes.Sun + ( + +#ifdef SunXK_FA_Grave + sunXK_FA_Grave, +#else + -- Skipping sunXK_FA_Grave because your X doesn't define it +#endif +#ifdef SunXK_FA_Circum + sunXK_FA_Circum, +#else + -- Skipping sunXK_FA_Circum because your X doesn't define it +#endif +#ifdef SunXK_FA_Tilde + sunXK_FA_Tilde, +#else + -- Skipping sunXK_FA_Tilde because your X doesn't define it +#endif +#ifdef SunXK_FA_Acute + sunXK_FA_Acute, +#else + -- Skipping sunXK_FA_Acute because your X doesn't define it +#endif +#ifdef SunXK_FA_Diaeresis + sunXK_FA_Diaeresis, +#else + -- Skipping sunXK_FA_Diaeresis because your X doesn't define it +#endif +#ifdef SunXK_FA_Cedilla + sunXK_FA_Cedilla, +#else + -- Skipping sunXK_FA_Cedilla because your X doesn't define it +#endif +#ifdef SunXK_F36 + sunXK_F36, -- Labeled F11 +#else + -- Skipping sunXK_F36 because your X doesn't define it +#endif +#ifdef SunXK_F37 + sunXK_F37, -- Labeled F12 +#else + -- Skipping sunXK_F37 because your X doesn't define it +#endif +#ifdef SunXK_Sys_Req + sunXK_Sys_Req, +#else + -- Skipping sunXK_Sys_Req because your X doesn't define it +#endif +#ifdef SunXK_Print_Screen + sunXK_Print_Screen, -- Same as XK_Print +#else + -- Skipping sunXK_Print_Screen because your X doesn't define it +#endif +#ifdef SunXK_Compose + sunXK_Compose, -- Same as XK_Multi_key +#else + -- Skipping sunXK_Compose because your X doesn't define it +#endif +#ifdef SunXK_AltGraph + sunXK_AltGraph, -- Same as XK_Mode_switch +#else + -- Skipping sunXK_AltGraph because your X doesn't define it +#endif +#ifdef SunXK_PageUp + sunXK_PageUp, -- Same as XK_Prior +#else + -- Skipping sunXK_PageUp because your X doesn't define it +#endif +#ifdef SunXK_PageDown + sunXK_PageDown, -- Same as XK_Next +#else + -- Skipping sunXK_PageDown because your X doesn't define it +#endif +#ifdef SunXK_Undo + sunXK_Undo, -- Same as XK_Undo +#else + -- Skipping sunXK_Undo because your X doesn't define it +#endif +#ifdef SunXK_Again + sunXK_Again, -- Same as XK_Redo +#else + -- Skipping sunXK_Again because your X doesn't define it +#endif +#ifdef SunXK_Find + sunXK_Find, -- Same as XK_Find +#else + -- Skipping sunXK_Find because your X doesn't define it +#endif +#ifdef SunXK_Stop + sunXK_Stop, -- Same as XK_Cancel +#else + -- Skipping sunXK_Stop because your X doesn't define it +#endif +#ifdef SunXK_Props + sunXK_Props, +#else + -- Skipping sunXK_Props because your X doesn't define it +#endif +#ifdef SunXK_Front + sunXK_Front, +#else + -- Skipping sunXK_Front because your X doesn't define it +#endif +#ifdef SunXK_Copy + sunXK_Copy, +#else + -- Skipping sunXK_Copy because your X doesn't define it +#endif +#ifdef SunXK_Open + sunXK_Open, +#else + -- Skipping sunXK_Open because your X doesn't define it +#endif +#ifdef SunXK_Paste + sunXK_Paste, +#else + -- Skipping sunXK_Paste because your X doesn't define it +#endif +#ifdef SunXK_Cut + sunXK_Cut, +#else + -- Skipping sunXK_Cut because your X doesn't define it +#endif +#ifdef SunXK_PowerSwitch + sunXK_PowerSwitch, +#else + -- Skipping sunXK_PowerSwitch because your X doesn't define it +#endif +#ifdef SunXK_AudioLowerVolume + sunXK_AudioLowerVolume, +#else + -- Skipping sunXK_AudioLowerVolume because your X doesn't define it +#endif +#ifdef SunXK_AudioMute + sunXK_AudioMute, +#else + -- Skipping sunXK_AudioMute because your X doesn't define it +#endif +#ifdef SunXK_AudioRaiseVolume + sunXK_AudioRaiseVolume, +#else + -- Skipping sunXK_AudioRaiseVolume because your X doesn't define it +#endif +#ifdef SunXK_VideoDegauss + sunXK_VideoDegauss, +#else + -- Skipping sunXK_VideoDegauss because your X doesn't define it +#endif +#ifdef SunXK_VideoLowerBrightness + sunXK_VideoLowerBrightness, +#else + -- Skipping sunXK_VideoLowerBrightness because your X doesn't define it +#endif +#ifdef SunXK_VideoRaiseBrightness + sunXK_VideoRaiseBrightness, +#else + -- Skipping sunXK_VideoRaiseBrightness because your X doesn't define it +#endif +#ifdef SunXK_PowerSwitchShift + sunXK_PowerSwitchShift, +#else + -- Skipping sunXK_PowerSwitchShift because your X doesn't define it +#endif + ) where + +import Graphics.X11.Types + +#include "HsAllKeysyms.h" + +#ifdef SunXK_FA_Grave +sunXK_FA_Grave :: KeySym +sunXK_FA_Grave = #const SunXK_FA_Grave +#endif +#ifdef SunXK_FA_Circum +sunXK_FA_Circum :: KeySym +sunXK_FA_Circum = #const SunXK_FA_Circum +#endif +#ifdef SunXK_FA_Tilde +sunXK_FA_Tilde :: KeySym +sunXK_FA_Tilde = #const SunXK_FA_Tilde +#endif +#ifdef SunXK_FA_Acute +sunXK_FA_Acute :: KeySym +sunXK_FA_Acute = #const SunXK_FA_Acute +#endif +#ifdef SunXK_FA_Diaeresis +sunXK_FA_Diaeresis :: KeySym +sunXK_FA_Diaeresis = #const SunXK_FA_Diaeresis +#endif +#ifdef SunXK_FA_Cedilla +sunXK_FA_Cedilla :: KeySym +sunXK_FA_Cedilla = #const SunXK_FA_Cedilla +#endif +#ifdef SunXK_F36 +sunXK_F36 :: KeySym +sunXK_F36 = #const SunXK_F36 +#endif +#ifdef SunXK_F37 +sunXK_F37 :: KeySym +sunXK_F37 = #const SunXK_F37 +#endif +#ifdef SunXK_Sys_Req +sunXK_Sys_Req :: KeySym +sunXK_Sys_Req = #const SunXK_Sys_Req +#endif +#ifdef SunXK_Print_Screen +sunXK_Print_Screen :: KeySym +sunXK_Print_Screen = #const SunXK_Print_Screen +#endif +#ifdef SunXK_Compose +sunXK_Compose :: KeySym +sunXK_Compose = #const SunXK_Compose +#endif +#ifdef SunXK_AltGraph +sunXK_AltGraph :: KeySym +sunXK_AltGraph = #const SunXK_AltGraph +#endif +#ifdef SunXK_PageUp +sunXK_PageUp :: KeySym +sunXK_PageUp = #const SunXK_PageUp +#endif +#ifdef SunXK_PageDown +sunXK_PageDown :: KeySym +sunXK_PageDown = #const SunXK_PageDown +#endif +#ifdef SunXK_Undo +sunXK_Undo :: KeySym +sunXK_Undo = #const SunXK_Undo +#endif +#ifdef SunXK_Again +sunXK_Again :: KeySym +sunXK_Again = #const SunXK_Again +#endif +#ifdef SunXK_Find +sunXK_Find :: KeySym +sunXK_Find = #const SunXK_Find +#endif +#ifdef SunXK_Stop +sunXK_Stop :: KeySym +sunXK_Stop = #const SunXK_Stop +#endif +#ifdef SunXK_Props +sunXK_Props :: KeySym +sunXK_Props = #const SunXK_Props +#endif +#ifdef SunXK_Front +sunXK_Front :: KeySym +sunXK_Front = #const SunXK_Front +#endif +#ifdef SunXK_Copy +sunXK_Copy :: KeySym +sunXK_Copy = #const SunXK_Copy +#endif +#ifdef SunXK_Open +sunXK_Open :: KeySym +sunXK_Open = #const SunXK_Open +#endif +#ifdef SunXK_Paste +sunXK_Paste :: KeySym +sunXK_Paste = #const SunXK_Paste +#endif +#ifdef SunXK_Cut +sunXK_Cut :: KeySym +sunXK_Cut = #const SunXK_Cut +#endif +#ifdef SunXK_PowerSwitch +sunXK_PowerSwitch :: KeySym +sunXK_PowerSwitch = #const SunXK_PowerSwitch +#endif +#ifdef SunXK_AudioLowerVolume +sunXK_AudioLowerVolume :: KeySym +sunXK_AudioLowerVolume = #const SunXK_AudioLowerVolume +#endif +#ifdef SunXK_AudioMute +sunXK_AudioMute :: KeySym +sunXK_AudioMute = #const SunXK_AudioMute +#endif +#ifdef SunXK_AudioRaiseVolume +sunXK_AudioRaiseVolume :: KeySym +sunXK_AudioRaiseVolume = #const SunXK_AudioRaiseVolume +#endif +#ifdef SunXK_VideoDegauss +sunXK_VideoDegauss :: KeySym +sunXK_VideoDegauss = #const SunXK_VideoDegauss +#endif +#ifdef SunXK_VideoLowerBrightness +sunXK_VideoLowerBrightness :: KeySym +sunXK_VideoLowerBrightness = #const SunXK_VideoLowerBrightness +#endif +#ifdef SunXK_VideoRaiseBrightness +sunXK_VideoRaiseBrightness :: KeySym +sunXK_VideoRaiseBrightness = #const SunXK_VideoRaiseBrightness +#endif +#ifdef SunXK_PowerSwitchShift +sunXK_PowerSwitchShift :: KeySym +sunXK_PowerSwitchShift = #const SunXK_PowerSwitchShift +#endif addfile ./Graphics/X11/ExtraTypes/XF86.hsc hunk ./Graphics/X11/ExtraTypes/XF86.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.ExtraTypes.XF86 +-- Copyright : (c) XFree86/X.org +-- License : X11 (see below) due to X headers +-- +-- Maintainer : libraries@haskell.org +-- Stability : unstable +-- Portability : unportable +-- +-- +-- This file is generated based on X.org includes. It contains +-- the keysyms for XF86. +----------------------------------------------------------------------------- + +-- Generated from /usr/include/X11/XF86keysym.h +-- + +-- Presumably XFree86/X.org has copyright on the header but it's not +-- explicit in the file. + + +module Graphics.X11.ExtraTypes.XF86 + ( + +#ifdef XF86XK_ModeLock + xF86XK_ModeLock, -- Mode Switch Lock +#else + -- Skipping xF86XK_ModeLock because your X doesn't define it +#endif +#ifdef XF86XK_MonBrightnessUp + xF86XK_MonBrightnessUp, -- Monitor/panel brightness +#else + -- Skipping xF86XK_MonBrightnessUp because your X doesn't define it +#endif +#ifdef XF86XK_MonBrightnessDown + xF86XK_MonBrightnessDown, -- Monitor/panel brightness +#else + -- Skipping xF86XK_MonBrightnessDown because your X doesn't define it +#endif +#ifdef XF86XK_KbdLightOnOff + xF86XK_KbdLightOnOff, -- Keyboards may be lit +#else + -- Skipping xF86XK_KbdLightOnOff because your X doesn't define it +#endif +#ifdef XF86XK_KbdBrightnessUp + xF86XK_KbdBrightnessUp, -- Keyboards may be lit +#else + -- Skipping xF86XK_KbdBrightnessUp because your X doesn't define it +#endif +#ifdef XF86XK_KbdBrightnessDown + xF86XK_KbdBrightnessDown, -- Keyboards may be lit +#else + -- Skipping xF86XK_KbdBrightnessDown because your X doesn't define it +#endif +#ifdef XF86XK_Standby + xF86XK_Standby, -- System into standby mode +#else + -- Skipping xF86XK_Standby because your X doesn't define it +#endif +#ifdef XF86XK_AudioLowerVolume + xF86XK_AudioLowerVolume, -- Volume control down +#else + -- Skipping xF86XK_AudioLowerVolume because your X doesn't define it +#endif +#ifdef XF86XK_AudioMute + xF86XK_AudioMute, -- Mute sound from the system +#else + -- Skipping xF86XK_AudioMute because your X doesn't define it +#endif +#ifdef XF86XK_AudioRaiseVolume + xF86XK_AudioRaiseVolume, -- Volume control up +#else + -- Skipping xF86XK_AudioRaiseVolume because your X doesn't define it +#endif +#ifdef XF86XK_AudioPlay + xF86XK_AudioPlay, -- Start playing of audio > +#else + -- Skipping xF86XK_AudioPlay because your X doesn't define it +#endif +#ifdef XF86XK_AudioStop + xF86XK_AudioStop, -- Stop playing audio +#else + -- Skipping xF86XK_AudioStop because your X doesn't define it +#endif +#ifdef XF86XK_AudioPrev + xF86XK_AudioPrev, -- Previous track +#else + -- Skipping xF86XK_AudioPrev because your X doesn't define it +#endif +#ifdef XF86XK_AudioNext + xF86XK_AudioNext, -- Next track +#else + -- Skipping xF86XK_AudioNext because your X doesn't define it +#endif +#ifdef XF86XK_HomePage + xF86XK_HomePage, -- Display user's home page +#else + -- Skipping xF86XK_HomePage because your X doesn't define it +#endif +#ifdef XF86XK_Mail + xF86XK_Mail, -- Invoke user's mail program +#else + -- Skipping xF86XK_Mail because your X doesn't define it +#endif +#ifdef XF86XK_Start + xF86XK_Start, -- Start application +#else + -- Skipping xF86XK_Start because your X doesn't define it +#endif +#ifdef XF86XK_Search + xF86XK_Search, -- Search +#else + -- Skipping xF86XK_Search because your X doesn't define it +#endif +#ifdef XF86XK_AudioRecord + xF86XK_AudioRecord, -- Record audio application +#else + -- Skipping xF86XK_AudioRecord because your X doesn't define it +#endif +#ifdef XF86XK_Calculator + xF86XK_Calculator, -- Invoke calculator program +#else + -- Skipping xF86XK_Calculator because your X doesn't define it +#endif +#ifdef XF86XK_Memo + xF86XK_Memo, -- Invoke Memo taking program +#else + -- Skipping xF86XK_Memo because your X doesn't define it +#endif +#ifdef XF86XK_ToDoList + xF86XK_ToDoList, -- Invoke To Do List program +#else + -- Skipping xF86XK_ToDoList because your X doesn't define it +#endif +#ifdef XF86XK_Calendar + xF86XK_Calendar, -- Invoke Calendar program +#else + -- Skipping xF86XK_Calendar because your X doesn't define it +#endif +#ifdef XF86XK_PowerDown + xF86XK_PowerDown, -- Deep sleep the system +#else + -- Skipping xF86XK_PowerDown because your X doesn't define it +#endif +#ifdef XF86XK_ContrastAdjust + xF86XK_ContrastAdjust, -- Adjust screen contrast +#else + -- Skipping xF86XK_ContrastAdjust because your X doesn't define it +#endif +#ifdef XF86XK_RockerUp + xF86XK_RockerUp, -- Rocker switches exist up +#else + -- Skipping xF86XK_RockerUp because your X doesn't define it +#endif +#ifdef XF86XK_RockerDown + xF86XK_RockerDown, -- and down +#else + -- Skipping xF86XK_RockerDown because your X doesn't define it +#endif +#ifdef XF86XK_RockerEnter + xF86XK_RockerEnter, -- and let you press them +#else + -- Skipping xF86XK_RockerEnter because your X doesn't define it +#endif +#ifdef XF86XK_Back + xF86XK_Back, -- Like back on a browser +#else + -- Skipping xF86XK_Back because your X doesn't define it +#endif +#ifdef XF86XK_Forward + xF86XK_Forward, -- Like forward on a browser +#else + -- Skipping xF86XK_Forward because your X doesn't define it +#endif +#ifdef XF86XK_Stop + xF86XK_Stop, -- Stop current operation +#else + -- Skipping xF86XK_Stop because your X doesn't define it +#endif +#ifdef XF86XK_Refresh + xF86XK_Refresh, -- Refresh the page +#else + -- Skipping xF86XK_Refresh because your X doesn't define it +#endif +#ifdef XF86XK_PowerOff + xF86XK_PowerOff, -- Power off system entirely +#else + -- Skipping xF86XK_PowerOff because your X doesn't define it +#endif +#ifdef XF86XK_WakeUp + xF86XK_WakeUp, -- Wake up system from sleep +#else + -- Skipping xF86XK_WakeUp because your X doesn't define it +#endif +#ifdef XF86XK_Eject + xF86XK_Eject, -- Eject device (e.g. DVD) +#else + -- Skipping xF86XK_Eject because your X doesn't define it +#endif +#ifdef XF86XK_ScreenSaver + xF86XK_ScreenSaver, -- Invoke screensaver +#else + -- Skipping xF86XK_ScreenSaver because your X doesn't define it +#endif +#ifdef XF86XK_WWW + xF86XK_WWW, -- Invoke web browser +#else + -- Skipping xF86XK_WWW because your X doesn't define it +#endif +#ifdef XF86XK_Sleep + xF86XK_Sleep, -- Put system to sleep +#else + -- Skipping xF86XK_Sleep because your X doesn't define it +#endif +#ifdef XF86XK_Favorites + xF86XK_Favorites, -- Show favorite locations +#else + -- Skipping xF86XK_Favorites because your X doesn't define it +#endif +#ifdef XF86XK_AudioPause + xF86XK_AudioPause, -- Pause audio playing +#else + -- Skipping xF86XK_AudioPause because your X doesn't define it +#endif +#ifdef XF86XK_AudioMedia + xF86XK_AudioMedia, -- Launch media collection app +#else + -- Skipping xF86XK_AudioMedia because your X doesn't define it +#endif +#ifdef XF86XK_MyComputer + xF86XK_MyComputer, -- Display "My Computer" window +#else + -- Skipping xF86XK_MyComputer because your X doesn't define it +#endif +#ifdef XF86XK_VendorHome + xF86XK_VendorHome, -- Display vendor home web site +#else + -- Skipping xF86XK_VendorHome because your X doesn't define it +#endif +#ifdef XF86XK_LightBulb + xF86XK_LightBulb, -- Light bulb keys exist +#else + -- Skipping xF86XK_LightBulb because your X doesn't define it +#endif +#ifdef XF86XK_Shop + xF86XK_Shop, -- Display shopping web site +#else + -- Skipping xF86XK_Shop because your X doesn't define it +#endif +#ifdef XF86XK_History + xF86XK_History, -- Show history of web surfing +#else + -- Skipping xF86XK_History because your X doesn't define it +#endif +#ifdef XF86XK_OpenURL + xF86XK_OpenURL, -- Open selected URL +#else + -- Skipping xF86XK_OpenURL because your X doesn't define it +#endif +#ifdef XF86XK_AddFavorite + xF86XK_AddFavorite, -- Add URL to favorites list +#else + -- Skipping xF86XK_AddFavorite because your X doesn't define it +#endif +#ifdef XF86XK_HotLinks + xF86XK_HotLinks, -- Show "hot" links +#else + -- Skipping xF86XK_HotLinks because your X doesn't define it +#endif +#ifdef XF86XK_BrightnessAdjust + xF86XK_BrightnessAdjust, -- Invoke brightness adj. UI +#else + -- Skipping xF86XK_BrightnessAdjust because your X doesn't define it +#endif +#ifdef XF86XK_Finance + xF86XK_Finance, -- Display financial site +#else + -- Skipping xF86XK_Finance because your X doesn't define it +#endif +#ifdef XF86XK_Community + xF86XK_Community, -- Display user's community +#else + -- Skipping xF86XK_Community because your X doesn't define it +#endif +#ifdef XF86XK_AudioRewind + xF86XK_AudioRewind, -- "rewind" audio track +#else + -- Skipping xF86XK_AudioRewind because your X doesn't define it +#endif +#ifdef XF86XK_XF86BackForward + xF86XK_XF86BackForward, -- ??? +#else + -- Skipping xF86XK_XF86BackForward because your X doesn't define it +#endif +#ifdef XF86XK_Launch0 + xF86XK_Launch0, -- Launch Application +#else + -- Skipping xF86XK_Launch0 because your X doesn't define it +#endif +#ifdef XF86XK_Launch1 + xF86XK_Launch1, -- Launch Application +#else + -- Skipping xF86XK_Launch1 because your X doesn't define it +#endif +#ifdef XF86XK_Launch2 + xF86XK_Launch2, -- Launch Application +#else + -- Skipping xF86XK_Launch2 because your X doesn't define it +#endif +#ifdef XF86XK_Launch3 + xF86XK_Launch3, -- Launch Application +#else + -- Skipping xF86XK_Launch3 because your X doesn't define it +#endif +#ifdef XF86XK_Launch4 + xF86XK_Launch4, -- Launch Application +#else + -- Skipping xF86XK_Launch4 because your X doesn't define it +#endif +#ifdef XF86XK_Launch5 + xF86XK_Launch5, -- Launch Application +#else + -- Skipping xF86XK_Launch5 because your X doesn't define it +#endif +#ifdef XF86XK_Launch6 + xF86XK_Launch6, -- Launch Application +#else + -- Skipping xF86XK_Launch6 because your X doesn't define it +#endif +#ifdef XF86XK_Launch7 + xF86XK_Launch7, -- Launch Application +#else + -- Skipping xF86XK_Launch7 because your X doesn't define it +#endif +#ifdef XF86XK_Launch8 + xF86XK_Launch8, -- Launch Application +#else + -- Skipping xF86XK_Launch8 because your X doesn't define it +#endif +#ifdef XF86XK_Launch9 + xF86XK_Launch9, -- Launch Application +#else + -- Skipping xF86XK_Launch9 because your X doesn't define it +#endif +#ifdef XF86XK_LaunchA + xF86XK_LaunchA, -- Launch Application +#else + -- Skipping xF86XK_LaunchA because your X doesn't define it +#endif +#ifdef XF86XK_LaunchB + xF86XK_LaunchB, -- Launch Application +#else + -- Skipping xF86XK_LaunchB because your X doesn't define it +#endif +#ifdef XF86XK_LaunchC + xF86XK_LaunchC, -- Launch Application +#else + -- Skipping xF86XK_LaunchC because your X doesn't define it +#endif +#ifdef XF86XK_LaunchD + xF86XK_LaunchD, -- Launch Application +#else + -- Skipping xF86XK_LaunchD because your X doesn't define it +#endif +#ifdef XF86XK_LaunchE + xF86XK_LaunchE, -- Launch Application +#else + -- Skipping xF86XK_LaunchE because your X doesn't define it +#endif +#ifdef XF86XK_LaunchF + xF86XK_LaunchF, -- Launch Application +#else + -- Skipping xF86XK_LaunchF because your X doesn't define it +#endif +#ifdef XF86XK_ApplicationLeft + xF86XK_ApplicationLeft, -- switch to application, left +#else + -- Skipping xF86XK_ApplicationLeft because your X doesn't define it +#endif +#ifdef XF86XK_ApplicationRight + xF86XK_ApplicationRight, -- switch to application, right +#else + -- Skipping xF86XK_ApplicationRight because your X doesn't define it +#endif +#ifdef XF86XK_Book + xF86XK_Book, -- Launch bookreader +#else + -- Skipping xF86XK_Book because your X doesn't define it +#endif +#ifdef XF86XK_CD + xF86XK_CD, -- Launch CD/DVD player +#else + -- Skipping xF86XK_CD because your X doesn't define it +#endif +#ifdef XF86XK_Calculater + xF86XK_Calculater, -- Launch Calculater +#else + -- Skipping xF86XK_Calculater because your X doesn't define it +#endif +#ifdef XF86XK_Clear + xF86XK_Clear, -- Clear window, screen +#else + -- Skipping xF86XK_Clear because your X doesn't define it +#endif +#ifdef XF86XK_Close + xF86XK_Close, -- Close window +#else + -- Skipping xF86XK_Close because your X doesn't define it +#endif +#ifdef XF86XK_Copy + xF86XK_Copy, -- Copy selection +#else + -- Skipping xF86XK_Copy because your X doesn't define it +#endif +#ifdef XF86XK_Cut + xF86XK_Cut, -- Cut selection +#else + -- Skipping xF86XK_Cut because your X doesn't define it +#endif +#ifdef XF86XK_Display + xF86XK_Display, -- Output switch key +#else + -- Skipping xF86XK_Display because your X doesn't define it +#endif +#ifdef XF86XK_DOS + xF86XK_DOS, -- Launch DOS (emulation) +#else + -- Skipping xF86XK_DOS because your X doesn't define it +#endif +#ifdef XF86XK_Documents + xF86XK_Documents, -- Open documents window +#else + -- Skipping xF86XK_Documents because your X doesn't define it +#endif +#ifdef XF86XK_Excel + xF86XK_Excel, -- Launch spread sheet +#else + -- Skipping xF86XK_Excel because your X doesn't define it +#endif +#ifdef XF86XK_Explorer + xF86XK_Explorer, -- Launch file explorer +#else + -- Skipping xF86XK_Explorer because your X doesn't define it +#endif +#ifdef XF86XK_Game + xF86XK_Game, -- Launch game +#else + -- Skipping xF86XK_Game because your X doesn't define it +#endif +#ifdef XF86XK_Go + xF86XK_Go, -- Go to URL +#else + -- Skipping xF86XK_Go because your X doesn't define it +#endif +#ifdef XF86XK_iTouch + xF86XK_iTouch, -- Logitch iTouch- don't use +#else + -- Skipping xF86XK_iTouch because your X doesn't define it +#endif +#ifdef XF86XK_LogOff + xF86XK_LogOff, -- Log off system +#else + -- Skipping xF86XK_LogOff because your X doesn't define it +#endif +#ifdef XF86XK_Market + xF86XK_Market, -- ?? +#else + -- Skipping xF86XK_Market because your X doesn't define it +#endif +#ifdef XF86XK_Meeting + xF86XK_Meeting, -- enter meeting in calendar +#else + -- Skipping xF86XK_Meeting because your X doesn't define it +#endif +#ifdef XF86XK_MenuKB + xF86XK_MenuKB, -- distingush keyboard from PB +#else + -- Skipping xF86XK_MenuKB because your X doesn't define it +#endif +#ifdef XF86XK_MenuPB + xF86XK_MenuPB, -- distinuish PB from keyboard +#else + -- Skipping xF86XK_MenuPB because your X doesn't define it +#endif +#ifdef XF86XK_MySites + xF86XK_MySites, -- Favourites +#else + -- Skipping xF86XK_MySites because your X doesn't define it +#endif +#ifdef XF86XK_New + xF86XK_New, -- New (folder, document... +#else + -- Skipping xF86XK_New because your X doesn't define it +#endif +#ifdef XF86XK_News + xF86XK_News, -- News +#else + -- Skipping xF86XK_News because your X doesn't define it +#endif +#ifdef XF86XK_OfficeHome + xF86XK_OfficeHome, -- Office home (old Staroffice) +#else + -- Skipping xF86XK_OfficeHome because your X doesn't define it +#endif +#ifdef XF86XK_Open + xF86XK_Open, -- Open +#else + -- Skipping xF86XK_Open because your X doesn't define it +#endif +#ifdef XF86XK_Option + xF86XK_Option, -- ?? +#else + -- Skipping xF86XK_Option because your X doesn't define it +#endif +#ifdef XF86XK_Paste + xF86XK_Paste, -- Paste +#else + -- Skipping xF86XK_Paste because your X doesn't define it +#endif +#ifdef XF86XK_Phone + xF86XK_Phone, -- Launch phone; dial number +#else + -- Skipping xF86XK_Phone because your X doesn't define it +#endif +#ifdef XF86XK_Q + xF86XK_Q, -- Compaq's Q - don't use +#else + -- Skipping xF86XK_Q because your X doesn't define it +#endif +#ifdef XF86XK_Reply + xF86XK_Reply, -- Reply e.g., mail +#else + -- Skipping xF86XK_Reply because your X doesn't define it +#endif +#ifdef XF86XK_Reload + xF86XK_Reload, -- Reload web page, file, etc. +#else + -- Skipping xF86XK_Reload because your X doesn't define it +#endif +#ifdef XF86XK_RotateWindows + xF86XK_RotateWindows, -- Rotate windows e.g. xrandr +#else + -- Skipping xF86XK_RotateWindows because your X doesn't define it +#endif +#ifdef XF86XK_RotationPB + xF86XK_RotationPB, -- don't use +#else + -- Skipping xF86XK_RotationPB because your X doesn't define it +#endif +#ifdef XF86XK_RotationKB + xF86XK_RotationKB, -- don't use +#else + -- Skipping xF86XK_RotationKB because your X doesn't define it +#endif +#ifdef XF86XK_Save + xF86XK_Save, -- Save (file, document, state +#else + -- Skipping xF86XK_Save because your X doesn't define it +#endif +#ifdef XF86XK_ScrollUp + xF86XK_ScrollUp, -- Scroll window/contents up +#else + -- Skipping xF86XK_ScrollUp because your X doesn't define it +#endif +#ifdef XF86XK_ScrollDown + xF86XK_ScrollDown, -- Scrool window/contentd down +#else + -- Skipping xF86XK_ScrollDown because your X doesn't define it +#endif +#ifdef XF86XK_ScrollClick + xF86XK_ScrollClick, -- Use XKB mousekeys instead +#else + -- Skipping xF86XK_ScrollClick because your X doesn't define it +#endif +#ifdef XF86XK_Send + xF86XK_Send, -- Send mail, file, object +#else + -- Skipping xF86XK_Send because your X doesn't define it +#endif +#ifdef XF86XK_Spell + xF86XK_Spell, -- Spell checker +#else + -- Skipping xF86XK_Spell because your X doesn't define it +#endif +#ifdef XF86XK_SplitScreen + xF86XK_SplitScreen, -- Split window or screen +#else + -- Skipping xF86XK_SplitScreen because your X doesn't define it +#endif +#ifdef XF86XK_Support + xF86XK_Support, -- Get support (??) +#else + -- Skipping xF86XK_Support because your X doesn't define it +#endif +#ifdef XF86XK_TaskPane + xF86XK_TaskPane, -- Show tasks +#else + -- Skipping xF86XK_TaskPane because your X doesn't define it +#endif +#ifdef XF86XK_Terminal + xF86XK_Terminal, -- Launch terminal emulator +#else + -- Skipping xF86XK_Terminal because your X doesn't define it +#endif +#ifdef XF86XK_Tools + xF86XK_Tools, -- toolbox of desktop/app. +#else + -- Skipping xF86XK_Tools because your X doesn't define it +#endif +#ifdef XF86XK_Travel + xF86XK_Travel, -- ?? +#else + -- Skipping xF86XK_Travel because your X doesn't define it +#endif +#ifdef XF86XK_UserPB + xF86XK_UserPB, -- ?? +#else + -- Skipping xF86XK_UserPB because your X doesn't define it +#endif +#ifdef XF86XK_User1KB + xF86XK_User1KB, -- ?? +#else + -- Skipping xF86XK_User1KB because your X doesn't define it +#endif +#ifdef XF86XK_User2KB + xF86XK_User2KB, -- ?? +#else + -- Skipping xF86XK_User2KB because your X doesn't define it +#endif +#ifdef XF86XK_Video + xF86XK_Video, -- Launch video player +#else + -- Skipping xF86XK_Video because your X doesn't define it +#endif +#ifdef XF86XK_WheelButton + xF86XK_WheelButton, -- button from a mouse wheel +#else + -- Skipping xF86XK_WheelButton because your X doesn't define it +#endif +#ifdef XF86XK_Word + xF86XK_Word, -- Launch word processor +#else + -- Skipping xF86XK_Word because your X doesn't define it +#endif +#ifdef XF86XK_Xfer + xF86XK_Xfer, +#else + -- Skipping xF86XK_Xfer because your X doesn't define it +#endif +#ifdef XF86XK_ZoomIn + xF86XK_ZoomIn, -- zoom in view, map, etc. +#else + -- Skipping xF86XK_ZoomIn because your X doesn't define it +#endif +#ifdef XF86XK_ZoomOut + xF86XK_ZoomOut, -- zoom out view, map, etc. +#else + -- Skipping xF86XK_ZoomOut because your X doesn't define it +#endif +#ifdef XF86XK_Away + xF86XK_Away, -- mark yourself as away +#else + -- Skipping xF86XK_Away because your X doesn't define it +#endif +#ifdef XF86XK_Messenger + xF86XK_Messenger, -- as in instant messaging +#else + -- Skipping xF86XK_Messenger because your X doesn't define it +#endif +#ifdef XF86XK_WebCam + xF86XK_WebCam, -- Launch web camera app. +#else + -- Skipping xF86XK_WebCam because your X doesn't define it +#endif +#ifdef XF86XK_MailForward + xF86XK_MailForward, -- Forward in mail +#else + -- Skipping xF86XK_MailForward because your X doesn't define it +#endif +#ifdef XF86XK_Pictures + xF86XK_Pictures, -- Show pictures +#else + -- Skipping xF86XK_Pictures because your X doesn't define it +#endif +#ifdef XF86XK_Music + xF86XK_Music, -- Launch music application +#else + -- Skipping xF86XK_Music because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_1 + xF86XK_Switch_VT_1, +#else + -- Skipping xF86XK_Switch_VT_1 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_2 + xF86XK_Switch_VT_2, +#else + -- Skipping xF86XK_Switch_VT_2 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_3 + xF86XK_Switch_VT_3, +#else + -- Skipping xF86XK_Switch_VT_3 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_4 + xF86XK_Switch_VT_4, +#else + -- Skipping xF86XK_Switch_VT_4 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_5 + xF86XK_Switch_VT_5, +#else + -- Skipping xF86XK_Switch_VT_5 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_6 + xF86XK_Switch_VT_6, +#else + -- Skipping xF86XK_Switch_VT_6 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_7 + xF86XK_Switch_VT_7, +#else + -- Skipping xF86XK_Switch_VT_7 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_8 + xF86XK_Switch_VT_8, +#else + -- Skipping xF86XK_Switch_VT_8 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_9 + xF86XK_Switch_VT_9, +#else + -- Skipping xF86XK_Switch_VT_9 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_10 + xF86XK_Switch_VT_10, +#else + -- Skipping xF86XK_Switch_VT_10 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_11 + xF86XK_Switch_VT_11, +#else + -- Skipping xF86XK_Switch_VT_11 because your X doesn't define it +#endif +#ifdef XF86XK_Switch_VT_12 + xF86XK_Switch_VT_12, +#else + -- Skipping xF86XK_Switch_VT_12 because your X doesn't define it +#endif +#ifdef XF86XK_Ungrab + xF86XK_Ungrab, -- force ungrab +#else + -- Skipping xF86XK_Ungrab because your X doesn't define it +#endif +#ifdef XF86XK_ClearGrab + xF86XK_ClearGrab, -- kill application with grab +#else + -- Skipping xF86XK_ClearGrab because your X doesn't define it +#endif +#ifdef XF86XK_Next_VMode + xF86XK_Next_VMode, -- next video mode available +#else + -- Skipping xF86XK_Next_VMode because your X doesn't define it +#endif +#ifdef XF86XK_Prev_VMode + xF86XK_Prev_VMode, -- prev. video mode available +#else + -- Skipping xF86XK_Prev_VMode because your X doesn't define it +#endif + ) where + +import Graphics.X11.Types + +#include "HsAllKeysyms.h" + +#ifdef XF86XK_ModeLock +xF86XK_ModeLock :: KeySym +xF86XK_ModeLock = #const XF86XK_ModeLock +#endif +#ifdef XF86XK_MonBrightnessUp +xF86XK_MonBrightnessUp :: KeySym +xF86XK_MonBrightnessUp = #const XF86XK_MonBrightnessUp +#endif +#ifdef XF86XK_MonBrightnessDown +xF86XK_MonBrightnessDown :: KeySym +xF86XK_MonBrightnessDown = #const XF86XK_MonBrightnessDown +#endif +#ifdef XF86XK_KbdLightOnOff +xF86XK_KbdLightOnOff :: KeySym +xF86XK_KbdLightOnOff = #const XF86XK_KbdLightOnOff +#endif +#ifdef XF86XK_KbdBrightnessUp +xF86XK_KbdBrightnessUp :: KeySym +xF86XK_KbdBrightnessUp = #const XF86XK_KbdBrightnessUp +#endif +#ifdef XF86XK_KbdBrightnessDown +xF86XK_KbdBrightnessDown :: KeySym +xF86XK_KbdBrightnessDown = #const XF86XK_KbdBrightnessDown +#endif +#ifdef XF86XK_Standby +xF86XK_Standby :: KeySym +xF86XK_Standby = #const XF86XK_Standby +#endif +#ifdef XF86XK_AudioLowerVolume +xF86XK_AudioLowerVolume :: KeySym +xF86XK_AudioLowerVolume = #const XF86XK_AudioLowerVolume +#endif +#ifdef XF86XK_AudioMute +xF86XK_AudioMute :: KeySym +xF86XK_AudioMute = #const XF86XK_AudioMute +#endif +#ifdef XF86XK_AudioRaiseVolume +xF86XK_AudioRaiseVolume :: KeySym +xF86XK_AudioRaiseVolume = #const XF86XK_AudioRaiseVolume +#endif +#ifdef XF86XK_AudioPlay +xF86XK_AudioPlay :: KeySym +xF86XK_AudioPlay = #const XF86XK_AudioPlay +#endif +#ifdef XF86XK_AudioStop +xF86XK_AudioStop :: KeySym +xF86XK_AudioStop = #const XF86XK_AudioStop +#endif +#ifdef XF86XK_AudioPrev +xF86XK_AudioPrev :: KeySym +xF86XK_AudioPrev = #const XF86XK_AudioPrev +#endif +#ifdef XF86XK_AudioNext +xF86XK_AudioNext :: KeySym +xF86XK_AudioNext = #const XF86XK_AudioNext +#endif +#ifdef XF86XK_HomePage +xF86XK_HomePage :: KeySym +xF86XK_HomePage = #const XF86XK_HomePage +#endif +#ifdef XF86XK_Mail +xF86XK_Mail :: KeySym +xF86XK_Mail = #const XF86XK_Mail +#endif +#ifdef XF86XK_Start +xF86XK_Start :: KeySym +xF86XK_Start = #const XF86XK_Start +#endif +#ifdef XF86XK_Search +xF86XK_Search :: KeySym +xF86XK_Search = #const XF86XK_Search +#endif +#ifdef XF86XK_AudioRecord +xF86XK_AudioRecord :: KeySym +xF86XK_AudioRecord = #const XF86XK_AudioRecord +#endif +#ifdef XF86XK_Calculator +xF86XK_Calculator :: KeySym +xF86XK_Calculator = #const XF86XK_Calculator +#endif +#ifdef XF86XK_Memo +xF86XK_Memo :: KeySym +xF86XK_Memo = #const XF86XK_Memo +#endif +#ifdef XF86XK_ToDoList +xF86XK_ToDoList :: KeySym +xF86XK_ToDoList = #const XF86XK_ToDoList +#endif +#ifdef XF86XK_Calendar +xF86XK_Calendar :: KeySym +xF86XK_Calendar = #const XF86XK_Calendar +#endif +#ifdef XF86XK_PowerDown +xF86XK_PowerDown :: KeySym +xF86XK_PowerDown = #const XF86XK_PowerDown +#endif +#ifdef XF86XK_ContrastAdjust +xF86XK_ContrastAdjust :: KeySym +xF86XK_ContrastAdjust = #const XF86XK_ContrastAdjust +#endif +#ifdef XF86XK_RockerUp +xF86XK_RockerUp :: KeySym +xF86XK_RockerUp = #const XF86XK_RockerUp +#endif +#ifdef XF86XK_RockerDown +xF86XK_RockerDown :: KeySym +xF86XK_RockerDown = #const XF86XK_RockerDown +#endif +#ifdef XF86XK_RockerEnter +xF86XK_RockerEnter :: KeySym +xF86XK_RockerEnter = #const XF86XK_RockerEnter +#endif +#ifdef XF86XK_Back +xF86XK_Back :: KeySym +xF86XK_Back = #const XF86XK_Back +#endif +#ifdef XF86XK_Forward +xF86XK_Forward :: KeySym +xF86XK_Forward = #const XF86XK_Forward +#endif +#ifdef XF86XK_Stop +xF86XK_Stop :: KeySym +xF86XK_Stop = #const XF86XK_Stop +#endif +#ifdef XF86XK_Refresh +xF86XK_Refresh :: KeySym +xF86XK_Refresh = #const XF86XK_Refresh +#endif +#ifdef XF86XK_PowerOff +xF86XK_PowerOff :: KeySym +xF86XK_PowerOff = #const XF86XK_PowerOff +#endif +#ifdef XF86XK_WakeUp +xF86XK_WakeUp :: KeySym +xF86XK_WakeUp = #const XF86XK_WakeUp +#endif +#ifdef XF86XK_Eject +xF86XK_Eject :: KeySym +xF86XK_Eject = #const XF86XK_Eject +#endif +#ifdef XF86XK_ScreenSaver +xF86XK_ScreenSaver :: KeySym +xF86XK_ScreenSaver = #const XF86XK_ScreenSaver +#endif +#ifdef XF86XK_WWW +xF86XK_WWW :: KeySym +xF86XK_WWW = #const XF86XK_WWW +#endif +#ifdef XF86XK_Sleep +xF86XK_Sleep :: KeySym +xF86XK_Sleep = #const XF86XK_Sleep +#endif +#ifdef XF86XK_Favorites +xF86XK_Favorites :: KeySym +xF86XK_Favorites = #const XF86XK_Favorites +#endif +#ifdef XF86XK_AudioPause +xF86XK_AudioPause :: KeySym +xF86XK_AudioPause = #const XF86XK_AudioPause +#endif +#ifdef XF86XK_AudioMedia +xF86XK_AudioMedia :: KeySym +xF86XK_AudioMedia = #const XF86XK_AudioMedia +#endif +#ifdef XF86XK_MyComputer +xF86XK_MyComputer :: KeySym +xF86XK_MyComputer = #const XF86XK_MyComputer +#endif +#ifdef XF86XK_VendorHome +xF86XK_VendorHome :: KeySym +xF86XK_VendorHome = #const XF86XK_VendorHome +#endif +#ifdef XF86XK_LightBulb +xF86XK_LightBulb :: KeySym +xF86XK_LightBulb = #const XF86XK_LightBulb +#endif +#ifdef XF86XK_Shop +xF86XK_Shop :: KeySym +xF86XK_Shop = #const XF86XK_Shop +#endif +#ifdef XF86XK_History +xF86XK_History :: KeySym +xF86XK_History = #const XF86XK_History +#endif +#ifdef XF86XK_OpenURL +xF86XK_OpenURL :: KeySym +xF86XK_OpenURL = #const XF86XK_OpenURL +#endif +#ifdef XF86XK_AddFavorite +xF86XK_AddFavorite :: KeySym +xF86XK_AddFavorite = #const XF86XK_AddFavorite +#endif +#ifdef XF86XK_HotLinks +xF86XK_HotLinks :: KeySym +xF86XK_HotLinks = #const XF86XK_HotLinks +#endif +#ifdef XF86XK_BrightnessAdjust +xF86XK_BrightnessAdjust :: KeySym +xF86XK_BrightnessAdjust = #const XF86XK_BrightnessAdjust +#endif +#ifdef XF86XK_Finance +xF86XK_Finance :: KeySym +xF86XK_Finance = #const XF86XK_Finance +#endif +#ifdef XF86XK_Community +xF86XK_Community :: KeySym +xF86XK_Community = #const XF86XK_Community +#endif +#ifdef XF86XK_AudioRewind +xF86XK_AudioRewind :: KeySym +xF86XK_AudioRewind = #const XF86XK_AudioRewind +#endif +#ifdef XF86XK_XF86BackForward +xF86XK_XF86BackForward :: KeySym +xF86XK_XF86BackForward = #const XF86XK_XF86BackForward +#endif +#ifdef XF86XK_Launch0 +xF86XK_Launch0 :: KeySym +xF86XK_Launch0 = #const XF86XK_Launch0 +#endif +#ifdef XF86XK_Launch1 +xF86XK_Launch1 :: KeySym +xF86XK_Launch1 = #const XF86XK_Launch1 +#endif +#ifdef XF86XK_Launch2 +xF86XK_Launch2 :: KeySym +xF86XK_Launch2 = #const XF86XK_Launch2 +#endif +#ifdef XF86XK_Launch3 +xF86XK_Launch3 :: KeySym +xF86XK_Launch3 = #const XF86XK_Launch3 +#endif +#ifdef XF86XK_Launch4 +xF86XK_Launch4 :: KeySym +xF86XK_Launch4 = #const XF86XK_Launch4 +#endif +#ifdef XF86XK_Launch5 +xF86XK_Launch5 :: KeySym +xF86XK_Launch5 = #const XF86XK_Launch5 +#endif +#ifdef XF86XK_Launch6 +xF86XK_Launch6 :: KeySym +xF86XK_Launch6 = #const XF86XK_Launch6 +#endif +#ifdef XF86XK_Launch7 +xF86XK_Launch7 :: KeySym +xF86XK_Launch7 = #const XF86XK_Launch7 +#endif +#ifdef XF86XK_Launch8 +xF86XK_Launch8 :: KeySym +xF86XK_Launch8 = #const XF86XK_Launch8 +#endif +#ifdef XF86XK_Launch9 +xF86XK_Launch9 :: KeySym +xF86XK_Launch9 = #const XF86XK_Launch9 +#endif +#ifdef XF86XK_LaunchA +xF86XK_LaunchA :: KeySym +xF86XK_LaunchA = #const XF86XK_LaunchA +#endif +#ifdef XF86XK_LaunchB +xF86XK_LaunchB :: KeySym +xF86XK_LaunchB = #const XF86XK_LaunchB +#endif +#ifdef XF86XK_LaunchC +xF86XK_LaunchC :: KeySym +xF86XK_LaunchC = #const XF86XK_LaunchC +#endif +#ifdef XF86XK_LaunchD +xF86XK_LaunchD :: KeySym +xF86XK_LaunchD = #const XF86XK_LaunchD +#endif +#ifdef XF86XK_LaunchE +xF86XK_LaunchE :: KeySym +xF86XK_LaunchE = #const XF86XK_LaunchE +#endif +#ifdef XF86XK_LaunchF +xF86XK_LaunchF :: KeySym +xF86XK_LaunchF = #const XF86XK_LaunchF +#endif +#ifdef XF86XK_ApplicationLeft +xF86XK_ApplicationLeft :: KeySym +xF86XK_ApplicationLeft = #const XF86XK_ApplicationLeft +#endif +#ifdef XF86XK_ApplicationRight +xF86XK_ApplicationRight :: KeySym +xF86XK_ApplicationRight = #const XF86XK_ApplicationRight +#endif +#ifdef XF86XK_Book +xF86XK_Book :: KeySym +xF86XK_Book = #const XF86XK_Book +#endif +#ifdef XF86XK_CD +xF86XK_CD :: KeySym +xF86XK_CD = #const XF86XK_CD +#endif +#ifdef XF86XK_Calculater +xF86XK_Calculater :: KeySym +xF86XK_Calculater = #const XF86XK_Calculater +#endif +#ifdef XF86XK_Clear +xF86XK_Clear :: KeySym +xF86XK_Clear = #const XF86XK_Clear +#endif +#ifdef XF86XK_Close +xF86XK_Close :: KeySym +xF86XK_Close = #const XF86XK_Close +#endif +#ifdef XF86XK_Copy +xF86XK_Copy :: KeySym +xF86XK_Copy = #const XF86XK_Copy +#endif +#ifdef XF86XK_Cut +xF86XK_Cut :: KeySym +xF86XK_Cut = #const XF86XK_Cut +#endif +#ifdef XF86XK_Display +xF86XK_Display :: KeySym +xF86XK_Display = #const XF86XK_Display +#endif +#ifdef XF86XK_DOS +xF86XK_DOS :: KeySym +xF86XK_DOS = #const XF86XK_DOS +#endif +#ifdef XF86XK_Documents +xF86XK_Documents :: KeySym +xF86XK_Documents = #const XF86XK_Documents +#endif +#ifdef XF86XK_Excel +xF86XK_Excel :: KeySym +xF86XK_Excel = #const XF86XK_Excel +#endif +#ifdef XF86XK_Explorer +xF86XK_Explorer :: KeySym +xF86XK_Explorer = #const XF86XK_Explorer +#endif +#ifdef XF86XK_Game +xF86XK_Game :: KeySym +xF86XK_Game = #const XF86XK_Game +#endif +#ifdef XF86XK_Go +xF86XK_Go :: KeySym +xF86XK_Go = #const XF86XK_Go +#endif +#ifdef XF86XK_iTouch +xF86XK_iTouch :: KeySym +xF86XK_iTouch = #const XF86XK_iTouch +#endif +#ifdef XF86XK_LogOff +xF86XK_LogOff :: KeySym +xF86XK_LogOff = #const XF86XK_LogOff +#endif +#ifdef XF86XK_Market +xF86XK_Market :: KeySym +xF86XK_Market = #const XF86XK_Market +#endif +#ifdef XF86XK_Meeting +xF86XK_Meeting :: KeySym +xF86XK_Meeting = #const XF86XK_Meeting +#endif +#ifdef XF86XK_MenuKB +xF86XK_MenuKB :: KeySym +xF86XK_MenuKB = #const XF86XK_MenuKB +#endif +#ifdef XF86XK_MenuPB +xF86XK_MenuPB :: KeySym +xF86XK_MenuPB = #const XF86XK_MenuPB +#endif +#ifdef XF86XK_MySites +xF86XK_MySites :: KeySym +xF86XK_MySites = #const XF86XK_MySites +#endif +#ifdef XF86XK_New +xF86XK_New :: KeySym +xF86XK_New = #const XF86XK_New +#endif +#ifdef XF86XK_News +xF86XK_News :: KeySym +xF86XK_News = #const XF86XK_News +#endif +#ifdef XF86XK_OfficeHome +xF86XK_OfficeHome :: KeySym +xF86XK_OfficeHome = #const XF86XK_OfficeHome +#endif +#ifdef XF86XK_Open +xF86XK_Open :: KeySym +xF86XK_Open = #const XF86XK_Open +#endif +#ifdef XF86XK_Option +xF86XK_Option :: KeySym +xF86XK_Option = #const XF86XK_Option +#endif +#ifdef XF86XK_Paste +xF86XK_Paste :: KeySym +xF86XK_Paste = #const XF86XK_Paste +#endif +#ifdef XF86XK_Phone +xF86XK_Phone :: KeySym +xF86XK_Phone = #const XF86XK_Phone +#endif +#ifdef XF86XK_Q +xF86XK_Q :: KeySym +xF86XK_Q = #const XF86XK_Q +#endif +#ifdef XF86XK_Reply +xF86XK_Reply :: KeySym +xF86XK_Reply = #const XF86XK_Reply +#endif +#ifdef XF86XK_Reload +xF86XK_Reload :: KeySym +xF86XK_Reload = #const XF86XK_Reload +#endif +#ifdef XF86XK_RotateWindows +xF86XK_RotateWindows :: KeySym +xF86XK_RotateWindows = #const XF86XK_RotateWindows +#endif +#ifdef XF86XK_RotationPB +xF86XK_RotationPB :: KeySym +xF86XK_RotationPB = #const XF86XK_RotationPB +#endif +#ifdef XF86XK_RotationKB +xF86XK_RotationKB :: KeySym +xF86XK_RotationKB = #const XF86XK_RotationKB +#endif +#ifdef XF86XK_Save +xF86XK_Save :: KeySym +xF86XK_Save = #const XF86XK_Save +#endif +#ifdef XF86XK_ScrollUp +xF86XK_ScrollUp :: KeySym +xF86XK_ScrollUp = #const XF86XK_ScrollUp +#endif +#ifdef XF86XK_ScrollDown +xF86XK_ScrollDown :: KeySym +xF86XK_ScrollDown = #const XF86XK_ScrollDown +#endif +#ifdef XF86XK_ScrollClick +xF86XK_ScrollClick :: KeySym +xF86XK_ScrollClick = #const XF86XK_ScrollClick +#endif +#ifdef XF86XK_Send +xF86XK_Send :: KeySym +xF86XK_Send = #const XF86XK_Send +#endif +#ifdef XF86XK_Spell +xF86XK_Spell :: KeySym +xF86XK_Spell = #const XF86XK_Spell +#endif +#ifdef XF86XK_SplitScreen +xF86XK_SplitScreen :: KeySym +xF86XK_SplitScreen = #const XF86XK_SplitScreen +#endif +#ifdef XF86XK_Support +xF86XK_Support :: KeySym +xF86XK_Support = #const XF86XK_Support +#endif +#ifdef XF86XK_TaskPane +xF86XK_TaskPane :: KeySym +xF86XK_TaskPane = #const XF86XK_TaskPane +#endif +#ifdef XF86XK_Terminal +xF86XK_Terminal :: KeySym +xF86XK_Terminal = #const XF86XK_Terminal +#endif +#ifdef XF86XK_Tools +xF86XK_Tools :: KeySym +xF86XK_Tools = #const XF86XK_Tools +#endif +#ifdef XF86XK_Travel +xF86XK_Travel :: KeySym +xF86XK_Travel = #const XF86XK_Travel +#endif +#ifdef XF86XK_UserPB +xF86XK_UserPB :: KeySym +xF86XK_UserPB = #const XF86XK_UserPB +#endif +#ifdef XF86XK_User1KB +xF86XK_User1KB :: KeySym +xF86XK_User1KB = #const XF86XK_User1KB +#endif +#ifdef XF86XK_User2KB +xF86XK_User2KB :: KeySym +xF86XK_User2KB = #const XF86XK_User2KB +#endif +#ifdef XF86XK_Video +xF86XK_Video :: KeySym +xF86XK_Video = #const XF86XK_Video +#endif +#ifdef XF86XK_WheelButton +xF86XK_WheelButton :: KeySym +xF86XK_WheelButton = #const XF86XK_WheelButton +#endif +#ifdef XF86XK_Word +xF86XK_Word :: KeySym +xF86XK_Word = #const XF86XK_Word +#endif +#ifdef XF86XK_Xfer +xF86XK_Xfer :: KeySym +xF86XK_Xfer = #const XF86XK_Xfer +#endif +#ifdef XF86XK_ZoomIn +xF86XK_ZoomIn :: KeySym +xF86XK_ZoomIn = #const XF86XK_ZoomIn +#endif +#ifdef XF86XK_ZoomOut +xF86XK_ZoomOut :: KeySym +xF86XK_ZoomOut = #const XF86XK_ZoomOut +#endif +#ifdef XF86XK_Away +xF86XK_Away :: KeySym +xF86XK_Away = #const XF86XK_Away +#endif +#ifdef XF86XK_Messenger +xF86XK_Messenger :: KeySym +xF86XK_Messenger = #const XF86XK_Messenger +#endif +#ifdef XF86XK_WebCam +xF86XK_WebCam :: KeySym +xF86XK_WebCam = #const XF86XK_WebCam +#endif +#ifdef XF86XK_MailForward +xF86XK_MailForward :: KeySym +xF86XK_MailForward = #const XF86XK_MailForward +#endif +#ifdef XF86XK_Pictures +xF86XK_Pictures :: KeySym +xF86XK_Pictures = #const XF86XK_Pictures +#endif +#ifdef XF86XK_Music +xF86XK_Music :: KeySym +xF86XK_Music = #const XF86XK_Music +#endif +#ifdef XF86XK_Switch_VT_1 +xF86XK_Switch_VT_1 :: KeySym +xF86XK_Switch_VT_1 = #const XF86XK_Switch_VT_1 +#endif +#ifdef XF86XK_Switch_VT_2 +xF86XK_Switch_VT_2 :: KeySym +xF86XK_Switch_VT_2 = #const XF86XK_Switch_VT_2 +#endif +#ifdef XF86XK_Switch_VT_3 +xF86XK_Switch_VT_3 :: KeySym +xF86XK_Switch_VT_3 = #const XF86XK_Switch_VT_3 +#endif +#ifdef XF86XK_Switch_VT_4 +xF86XK_Switch_VT_4 :: KeySym +xF86XK_Switch_VT_4 = #const XF86XK_Switch_VT_4 +#endif +#ifdef XF86XK_Switch_VT_5 +xF86XK_Switch_VT_5 :: KeySym +xF86XK_Switch_VT_5 = #const XF86XK_Switch_VT_5 +#endif +#ifdef XF86XK_Switch_VT_6 +xF86XK_Switch_VT_6 :: KeySym +xF86XK_Switch_VT_6 = #const XF86XK_Switch_VT_6 +#endif +#ifdef XF86XK_Switch_VT_7 +xF86XK_Switch_VT_7 :: KeySym +xF86XK_Switch_VT_7 = #const XF86XK_Switch_VT_7 +#endif +#ifdef XF86XK_Switch_VT_8 +xF86XK_Switch_VT_8 :: KeySym +xF86XK_Switch_VT_8 = #const XF86XK_Switch_VT_8 +#endif +#ifdef XF86XK_Switch_VT_9 +xF86XK_Switch_VT_9 :: KeySym +xF86XK_Switch_VT_9 = #const XF86XK_Switch_VT_9 +#endif +#ifdef XF86XK_Switch_VT_10 +xF86XK_Switch_VT_10 :: KeySym +xF86XK_Switch_VT_10 = #const XF86XK_Switch_VT_10 +#endif +#ifdef XF86XK_Switch_VT_11 +xF86XK_Switch_VT_11 :: KeySym +xF86XK_Switch_VT_11 = #const XF86XK_Switch_VT_11 +#endif +#ifdef XF86XK_Switch_VT_12 +xF86XK_Switch_VT_12 :: KeySym +xF86XK_Switch_VT_12 = #const XF86XK_Switch_VT_12 +#endif +#ifdef XF86XK_Ungrab +xF86XK_Ungrab :: KeySym +xF86XK_Ungrab = #const XF86XK_Ungrab +#endif +#ifdef XF86XK_ClearGrab +xF86XK_ClearGrab :: KeySym +xF86XK_ClearGrab = #const XF86XK_ClearGrab +#endif +#ifdef XF86XK_Next_VMode +xF86XK_Next_VMode :: KeySym +xF86XK_Next_VMode = #const XF86XK_Next_VMode +#endif +#ifdef XF86XK_Prev_VMode +xF86XK_Prev_VMode :: KeySym +xF86XK_Prev_VMode = #const XF86XK_Prev_VMode +#endif addfile ./Graphics/X11/ExtraTypes/XorgDefault.hsc hunk ./Graphics/X11/ExtraTypes/XorgDefault.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.ExtraTypes.XorgDefault +-- Copyright : (c) Open Group 1987,1994,1998, DEC 1987 +-- License : X11 (see below) due to X headers +-- +-- Maintainer : libraries@haskell.org +-- Stability : unstable +-- Portability : unportable +-- +-- +-- This file is generated based on X.org includes. It contains +-- the keysyms for XorgDefault. Because there are so many entries and +-- each one is checked for #ifdef twice, the C preprocessor part takes +-- a long time. +----------------------------------------------------------------------------- + +-- Generated from /usr/include/X11/keysymdef.h +-- + +-- Copyright 1987, 1994, 1998 The Open Group +-- +-- Permission to use, copy, modify, distribute, and sell this software and its +-- documentation for any purpose is hereby granted without fee, provided that +-- the above copyright notice appear in all copies and that both that +-- copyright notice and this permission notice appear in supporting +-- documentation. +-- +-- The above copyright notice and this permission notice shall be included +-- in all copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +-- IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +-- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +-- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +-- OTHER DEALINGS IN THE SOFTWARE. +-- +-- Except as contained in this notice, the name of The Open Group shall +-- not be used in advertising or otherwise to promote the sale, use or +-- other dealings in this Software without prior written authorization +-- from The Open Group. +-- +-- +-- Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts +-- +-- All Rights Reserved +-- +-- Permission to use, copy, modify, and distribute this software and its +-- documentation for any purpose and without fee is hereby granted, +-- provided that the above copyright notice appear in all copies and that +-- both that copyright notice and this permission notice appear in +-- supporting documentation, and that the name of Digital not be +-- used in advertising or publicity pertaining to distribution of the +-- software without specific, written prior permission. +-- +-- DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +-- ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +-- DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +-- ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +-- WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +-- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +-- SOFTWARE. +-- + +module Graphics.X11.ExtraTypes.XorgDefault + ( + +-- Skipping xK_VoidSymbol because Graphics.X11.Types defines it. +#if 0 +# ifdef XK_VoidSymbol + xK_VoidSymbol, -- Void symbol +# else + -- Skipping xK_VoidSymbol because your X doesn't define it +# endif +#endif + +-- Skipping XK_MISCELLANY because Graphics.X11.Types defines it +#if 0 + -- XK_MISCELLANY +# ifdef XK_BackSpace + xK_BackSpace, -- Back space, back char +# else + -- Skipping xK_BackSpace because your X doesn't define it +# endif +# ifdef XK_Tab + xK_Tab, +# else + -- Skipping xK_Tab because your X doesn't define it +# endif +# ifdef XK_Linefeed + xK_Linefeed, -- Linefeed, LF +# else + -- Skipping xK_Linefeed because your X doesn't define it +# endif +# ifdef XK_Clear + xK_Clear, +# else + -- Skipping xK_Clear because your X doesn't define it +# endif +# ifdef XK_Return + xK_Return, -- Return, enter +# else + -- Skipping xK_Return because your X doesn't define it +# endif +# ifdef XK_Pause + xK_Pause, -- Pause, hold +# else + -- Skipping xK_Pause because your X doesn't define it +# endif +# ifdef XK_Scroll_Lock + xK_Scroll_Lock, +# else + -- Skipping xK_Scroll_Lock because your X doesn't define it +# endif +# ifdef XK_Sys_Req + xK_Sys_Req, +# else + -- Skipping xK_Sys_Req because your X doesn't define it +# endif +# ifdef XK_Escape + xK_Escape, +# else + -- Skipping xK_Escape because your X doesn't define it +# endif +# ifdef XK_Delete + xK_Delete, -- Delete, rubout +# else + -- Skipping xK_Delete because your X doesn't define it +# endif +# ifdef XK_Multi_key + xK_Multi_key, -- Multi-key character compose +# else + -- Skipping xK_Multi_key because your X doesn't define it +# endif +# ifdef XK_Codeinput + xK_Codeinput, +# else + -- Skipping xK_Codeinput because your X doesn't define it +# endif +# ifdef XK_SingleCandidate + xK_SingleCandidate, +# else + -- Skipping xK_SingleCandidate because your X doesn't define it +# endif +# ifdef XK_MultipleCandidate + xK_MultipleCandidate, +# else + -- Skipping xK_MultipleCandidate because your X doesn't define it +# endif +# ifdef XK_PreviousCandidate + xK_PreviousCandidate, +# else + -- Skipping xK_PreviousCandidate because your X doesn't define it +# endif +# ifdef XK_Kanji + xK_Kanji, -- Kanji, Kanji convert +# else + -- Skipping xK_Kanji because your X doesn't define it +# endif +# ifdef XK_Muhenkan + xK_Muhenkan, -- Cancel Conversion +# else + -- Skipping xK_Muhenkan because your X doesn't define it +# endif +# ifdef XK_Henkan_Mode + xK_Henkan_Mode, -- Start/Stop Conversion +# else + -- Skipping xK_Henkan_Mode because your X doesn't define it +# endif +# ifdef XK_Henkan + xK_Henkan, -- Alias for Henkan_Mode +# else + -- Skipping xK_Henkan because your X doesn't define it +# endif +# ifdef XK_Romaji + xK_Romaji, -- to Romaji +# else + -- Skipping xK_Romaji because your X doesn't define it +# endif +# ifdef XK_Hiragana + xK_Hiragana, -- to Hiragana +# else + -- Skipping xK_Hiragana because your X doesn't define it +# endif +# ifdef XK_Katakana + xK_Katakana, -- to Katakana +# else + -- Skipping xK_Katakana because your X doesn't define it +# endif +# ifdef XK_Hiragana_Katakana + xK_Hiragana_Katakana, -- Hiragana/Katakana toggle +# else + -- Skipping xK_Hiragana_Katakana because your X doesn't define it +# endif +# ifdef XK_Zenkaku + xK_Zenkaku, -- to Zenkaku +# else + -- Skipping xK_Zenkaku because your X doesn't define it +# endif +# ifdef XK_Hankaku + xK_Hankaku, -- to Hankaku +# else + -- Skipping xK_Hankaku because your X doesn't define it +# endif +# ifdef XK_Zenkaku_Hankaku + xK_Zenkaku_Hankaku, -- Zenkaku/Hankaku toggle +# else + -- Skipping xK_Zenkaku_Hankaku because your X doesn't define it +# endif +# ifdef XK_Touroku + xK_Touroku, -- Add to Dictionary +# else + -- Skipping xK_Touroku because your X doesn't define it +# endif +# ifdef XK_Massyo + xK_Massyo, -- Delete from Dictionary +# else + -- Skipping xK_Massyo because your X doesn't define it +# endif +# ifdef XK_Kana_Lock + xK_Kana_Lock, -- Kana Lock +# else + -- Skipping xK_Kana_Lock because your X doesn't define it +# endif +# ifdef XK_Kana_Shift + xK_Kana_Shift, -- Kana Shift +# else + -- Skipping xK_Kana_Shift because your X doesn't define it +# endif +# ifdef XK_Eisu_Shift + xK_Eisu_Shift, -- Alphanumeric Shift +# else + -- Skipping xK_Eisu_Shift because your X doesn't define it +# endif +# ifdef XK_Eisu_toggle + xK_Eisu_toggle, -- Alphanumeric toggle +# else + -- Skipping xK_Eisu_toggle because your X doesn't define it +# endif +# ifdef XK_Kanji_Bangou + xK_Kanji_Bangou, -- Codeinput +# else + -- Skipping xK_Kanji_Bangou because your X doesn't define it +# endif +# ifdef XK_Zen_Koho + xK_Zen_Koho, -- Multiple/All Candidate(s) +# else + -- Skipping xK_Zen_Koho because your X doesn't define it +# endif +# ifdef XK_Mae_Koho + xK_Mae_Koho, -- Previous Candidate +# else + -- Skipping xK_Mae_Koho because your X doesn't define it +# endif +# ifdef XK_Home + xK_Home, +# else + -- Skipping xK_Home because your X doesn't define it +# endif +# ifdef XK_Left + xK_Left, -- Move left, left arrow +# else + -- Skipping xK_Left because your X doesn't define it +# endif +# ifdef XK_Up + xK_Up, -- Move up, up arrow +# else + -- Skipping xK_Up because your X doesn't define it +# endif +# ifdef XK_Right + xK_Right, -- Move right, right arrow +# else + -- Skipping xK_Right because your X doesn't define it +# endif +# ifdef XK_Down + xK_Down, -- Move down, down arrow +# else + -- Skipping xK_Down because your X doesn't define it +# endif +# ifdef XK_Prior + xK_Prior, -- Prior, previous +# else + -- Skipping xK_Prior because your X doesn't define it +# endif +# ifdef XK_Page_Up + xK_Page_Up, +# else + -- Skipping xK_Page_Up because your X doesn't define it +# endif +# ifdef XK_Next + xK_Next, -- Next +# else + -- Skipping xK_Next because your X doesn't define it +# endif +# ifdef XK_Page_Down + xK_Page_Down, +# else + -- Skipping xK_Page_Down because your X doesn't define it +# endif +# ifdef XK_End + xK_End, -- EOL +# else + -- Skipping xK_End because your X doesn't define it +# endif +# ifdef XK_Begin + xK_Begin, -- BOL +# else + -- Skipping xK_Begin because your X doesn't define it +# endif +# ifdef XK_Select + xK_Select, -- Select, mark +# else + -- Skipping xK_Select because your X doesn't define it +# endif +# ifdef XK_Print + xK_Print, +# else + -- Skipping xK_Print because your X doesn't define it +# endif +# ifdef XK_Execute + xK_Execute, -- Execute, run, do +# else + -- Skipping xK_Execute because your X doesn't define it +# endif +# ifdef XK_Insert + xK_Insert, -- Insert, insert here +# else + -- Skipping xK_Insert because your X doesn't define it +# endif +# ifdef XK_Undo + xK_Undo, +# else + -- Skipping xK_Undo because your X doesn't define it +# endif +# ifdef XK_Redo + xK_Redo, -- Redo, again +# else + -- Skipping xK_Redo because your X doesn't define it +# endif +# ifdef XK_Menu + xK_Menu, +# else + -- Skipping xK_Menu because your X doesn't define it +# endif +# ifdef XK_Find + xK_Find, -- Find, search +# else + -- Skipping xK_Find because your X doesn't define it +# endif +# ifdef XK_Cancel + xK_Cancel, -- Cancel, stop, abort, exit +# else + -- Skipping xK_Cancel because your X doesn't define it +# endif +# ifdef XK_Help + xK_Help, -- Help +# else + -- Skipping xK_Help because your X doesn't define it +# endif +# ifdef XK_Break + xK_Break, +# else + -- Skipping xK_Break because your X doesn't define it +# endif +# ifdef XK_Mode_switch + xK_Mode_switch, -- Character set switch +# else + -- Skipping xK_Mode_switch because your X doesn't define it +# endif +# ifdef XK_script_switch + xK_script_switch, -- Alias for mode_switch +# else + -- Skipping xK_script_switch because your X doesn't define it +# endif +# ifdef XK_Num_Lock + xK_Num_Lock, +# else + -- Skipping xK_Num_Lock because your X doesn't define it +# endif +# ifdef XK_KP_Space + xK_KP_Space, -- Space +# else + -- Skipping xK_KP_Space because your X doesn't define it +# endif +# ifdef XK_KP_Tab + xK_KP_Tab, +# else + -- Skipping xK_KP_Tab because your X doesn't define it +# endif +# ifdef XK_KP_Enter + xK_KP_Enter, -- Enter +# else + -- Skipping xK_KP_Enter because your X doesn't define it +# endif +# ifdef XK_KP_F1 + xK_KP_F1, -- PF1, KP_A, ... +# else + -- Skipping xK_KP_F1 because your X doesn't define it +# endif +# ifdef XK_KP_F2 + xK_KP_F2, +# else + -- Skipping xK_KP_F2 because your X doesn't define it +# endif +# ifdef XK_KP_F3 + xK_KP_F3, +# else + -- Skipping xK_KP_F3 because your X doesn't define it +# endif +# ifdef XK_KP_F4 + xK_KP_F4, +# else + -- Skipping xK_KP_F4 because your X doesn't define it +# endif +# ifdef XK_KP_Home + xK_KP_Home, +# else + -- Skipping xK_KP_Home because your X doesn't define it +# endif +# ifdef XK_KP_Left + xK_KP_Left, +# else + -- Skipping xK_KP_Left because your X doesn't define it +# endif +# ifdef XK_KP_Up + xK_KP_Up, +# else + -- Skipping xK_KP_Up because your X doesn't define it +# endif +# ifdef XK_KP_Right + xK_KP_Right, +# else + -- Skipping xK_KP_Right because your X doesn't define it +# endif +# ifdef XK_KP_Down + xK_KP_Down, +# else + -- Skipping xK_KP_Down because your X doesn't define it +# endif +# ifdef XK_KP_Prior + xK_KP_Prior, +# else + -- Skipping xK_KP_Prior because your X doesn't define it +# endif +# ifdef XK_KP_Page_Up + xK_KP_Page_Up, +# else + -- Skipping xK_KP_Page_Up because your X doesn't define it +# endif +# ifdef XK_KP_Next + xK_KP_Next, +# else + -- Skipping xK_KP_Next because your X doesn't define it +# endif +# ifdef XK_KP_Page_Down + xK_KP_Page_Down, +# else + -- Skipping xK_KP_Page_Down because your X doesn't define it +# endif +# ifdef XK_KP_End + xK_KP_End, +# else + -- Skipping xK_KP_End because your X doesn't define it +# endif +# ifdef XK_KP_Begin + xK_KP_Begin, +# else + -- Skipping xK_KP_Begin because your X doesn't define it +# endif +# ifdef XK_KP_Insert + xK_KP_Insert, +# else + -- Skipping xK_KP_Insert because your X doesn't define it +# endif +# ifdef XK_KP_Delete + xK_KP_Delete, +# else + -- Skipping xK_KP_Delete because your X doesn't define it +# endif +# ifdef XK_KP_Equal + xK_KP_Equal, -- Equals +# else + -- Skipping xK_KP_Equal because your X doesn't define it +# endif +# ifdef XK_KP_Multiply + xK_KP_Multiply, +# else + -- Skipping xK_KP_Multiply because your X doesn't define it +# endif +# ifdef XK_KP_Add + xK_KP_Add, +# else + -- Skipping xK_KP_Add because your X doesn't define it +# endif +# ifdef XK_KP_Separator + xK_KP_Separator, -- Separator, often comma +# else + -- Skipping xK_KP_Separator because your X doesn't define it +# endif +# ifdef XK_KP_Subtract + xK_KP_Subtract, +# else + -- Skipping xK_KP_Subtract because your X doesn't define it +# endif +# ifdef XK_KP_Decimal + xK_KP_Decimal, +# else + -- Skipping xK_KP_Decimal because your X doesn't define it +# endif +# ifdef XK_KP_Divide + xK_KP_Divide, +# else + -- Skipping xK_KP_Divide because your X doesn't define it +# endif +# ifdef XK_KP_0 + xK_KP_0, +# else + -- Skipping xK_KP_0 because your X doesn't define it +# endif +# ifdef XK_KP_1 + xK_KP_1, +# else + -- Skipping xK_KP_1 because your X doesn't define it +# endif +# ifdef XK_KP_2 + xK_KP_2, +# else + -- Skipping xK_KP_2 because your X doesn't define it +# endif +# ifdef XK_KP_3 + xK_KP_3, +# else + -- Skipping xK_KP_3 because your X doesn't define it +# endif +# ifdef XK_KP_4 + xK_KP_4, +# else + -- Skipping xK_KP_4 because your X doesn't define it +# endif +# ifdef XK_KP_5 + xK_KP_5, +# else + -- Skipping xK_KP_5 because your X doesn't define it +# endif +# ifdef XK_KP_6 + xK_KP_6, +# else + -- Skipping xK_KP_6 because your X doesn't define it +# endif +# ifdef XK_KP_7 + xK_KP_7, +# else + -- Skipping xK_KP_7 because your X doesn't define it +# endif +# ifdef XK_KP_8 + xK_KP_8, +# else + -- Skipping xK_KP_8 because your X doesn't define it +# endif +# ifdef XK_KP_9 + xK_KP_9, +# else + -- Skipping xK_KP_9 because your X doesn't define it +# endif +# ifdef XK_F1 + xK_F1, +# else + -- Skipping xK_F1 because your X doesn't define it +# endif +# ifdef XK_F2 + xK_F2, +# else + -- Skipping xK_F2 because your X doesn't define it +# endif +# ifdef XK_F3 + xK_F3, +# else + -- Skipping xK_F3 because your X doesn't define it +# endif +# ifdef XK_F4 + xK_F4, +# else + -- Skipping xK_F4 because your X doesn't define it +# endif +# ifdef XK_F5 + xK_F5, +# else + -- Skipping xK_F5 because your X doesn't define it +# endif +# ifdef XK_F6 + xK_F6, +# else + -- Skipping xK_F6 because your X doesn't define it +# endif +# ifdef XK_F7 + xK_F7, +# else + -- Skipping xK_F7 because your X doesn't define it +# endif +# ifdef XK_F8 + xK_F8, +# else + -- Skipping xK_F8 because your X doesn't define it +# endif +# ifdef XK_F9 + xK_F9, +# else + -- Skipping xK_F9 because your X doesn't define it +# endif +# ifdef XK_F10 + xK_F10, +# else + -- Skipping xK_F10 because your X doesn't define it +# endif +# ifdef XK_F11 + xK_F11, +# else + -- Skipping xK_F11 because your X doesn't define it +# endif +# ifdef XK_L1 + xK_L1, +# else + -- Skipping xK_L1 because your X doesn't define it +# endif +# ifdef XK_F12 + xK_F12, +# else + -- Skipping xK_F12 because your X doesn't define it +# endif +# ifdef XK_L2 + xK_L2, +# else + -- Skipping xK_L2 because your X doesn't define it +# endif +# ifdef XK_F13 + xK_F13, +# else + -- Skipping xK_F13 because your X doesn't define it +# endif +# ifdef XK_L3 + xK_L3, +# else + -- Skipping xK_L3 because your X doesn't define it +# endif +# ifdef XK_F14 + xK_F14, +# else + -- Skipping xK_F14 because your X doesn't define it +# endif +# ifdef XK_L4 + xK_L4, +# else + -- Skipping xK_L4 because your X doesn't define it +# endif +# ifdef XK_F15 + xK_F15, +# else + -- Skipping xK_F15 because your X doesn't define it +# endif +# ifdef XK_L5 + xK_L5, +# else + -- Skipping xK_L5 because your X doesn't define it +# endif +# ifdef XK_F16 + xK_F16, +# else + -- Skipping xK_F16 because your X doesn't define it +# endif +# ifdef XK_L6 + xK_L6, +# else + -- Skipping xK_L6 because your X doesn't define it +# endif +# ifdef XK_F17 + xK_F17, +# else + -- Skipping xK_F17 because your X doesn't define it +# endif +# ifdef XK_L7 + xK_L7, +# else + -- Skipping xK_L7 because your X doesn't define it +# endif +# ifdef XK_F18 + xK_F18, +# else + -- Skipping xK_F18 because your X doesn't define it +# endif +# ifdef XK_L8 + xK_L8, +# else + -- Skipping xK_L8 because your X doesn't define it +# endif +# ifdef XK_F19 + xK_F19, +# else + -- Skipping xK_F19 because your X doesn't define it +# endif +# ifdef XK_L9 + xK_L9, +# else + -- Skipping xK_L9 because your X doesn't define it +# endif +# ifdef XK_F20 + xK_F20, +# else + -- Skipping xK_F20 because your X doesn't define it +# endif +# ifdef XK_L10 + xK_L10, +# else + -- Skipping xK_L10 because your X doesn't define it +# endif +# ifdef XK_F21 + xK_F21, +# else + -- Skipping xK_F21 because your X doesn't define it +# endif +# ifdef XK_R1 + xK_R1, +# else + -- Skipping xK_R1 because your X doesn't define it +# endif +# ifdef XK_F22 + xK_F22, +# else + -- Skipping xK_F22 because your X doesn't define it +# endif +# ifdef XK_R2 + xK_R2, +# else + -- Skipping xK_R2 because your X doesn't define it +# endif +# ifdef XK_F23 + xK_F23, +# else + -- Skipping xK_F23 because your X doesn't define it +# endif +# ifdef XK_R3 + xK_R3, +# else + -- Skipping xK_R3 because your X doesn't define it +# endif +# ifdef XK_F24 + xK_F24, +# else + -- Skipping xK_F24 because your X doesn't define it +# endif +# ifdef XK_R4 + xK_R4, +# else + -- Skipping xK_R4 because your X doesn't define it +# endif +# ifdef XK_F25 + xK_F25, +# else + -- Skipping xK_F25 because your X doesn't define it +# endif +# ifdef XK_R5 + xK_R5, +# else + -- Skipping xK_R5 because your X doesn't define it +# endif +# ifdef XK_F26 + xK_F26, +# else + -- Skipping xK_F26 because your X doesn't define it +# endif +# ifdef XK_R6 + xK_R6, +# else + -- Skipping xK_R6 because your X doesn't define it +# endif +# ifdef XK_F27 + xK_F27, +# else + -- Skipping xK_F27 because your X doesn't define it +# endif +# ifdef XK_R7 + xK_R7, +# else + -- Skipping xK_R7 because your X doesn't define it +# endif +# ifdef XK_F28 + xK_F28, +# else + -- Skipping xK_F28 because your X doesn't define it +# endif +# ifdef XK_R8 + xK_R8, +# else + -- Skipping xK_R8 because your X doesn't define it +# endif +# ifdef XK_F29 + xK_F29, +# else + -- Skipping xK_F29 because your X doesn't define it +# endif +# ifdef XK_R9 + xK_R9, +# else + -- Skipping xK_R9 because your X doesn't define it +# endif +# ifdef XK_F30 + xK_F30, +# else + -- Skipping xK_F30 because your X doesn't define it +# endif +# ifdef XK_R10 + xK_R10, +# else + -- Skipping xK_R10 because your X doesn't define it +# endif +# ifdef XK_F31 + xK_F31, +# else + -- Skipping xK_F31 because your X doesn't define it +# endif +# ifdef XK_R11 + xK_R11, +# else + -- Skipping xK_R11 because your X doesn't define it +# endif +# ifdef XK_F32 + xK_F32, +# else + -- Skipping xK_F32 because your X doesn't define it +# endif +# ifdef XK_R12 + xK_R12, +# else + -- Skipping xK_R12 because your X doesn't define it +# endif +# ifdef XK_F33 + xK_F33, +# else + -- Skipping xK_F33 because your X doesn't define it +# endif +# ifdef XK_R13 + xK_R13, +# else + -- Skipping xK_R13 because your X doesn't define it +# endif +# ifdef XK_F34 + xK_F34, +# else + -- Skipping xK_F34 because your X doesn't define it +# endif +# ifdef XK_R14 + xK_R14, +# else + -- Skipping xK_R14 because your X doesn't define it +# endif +# ifdef XK_F35 + xK_F35, +# else + -- Skipping xK_F35 because your X doesn't define it +# endif +# ifdef XK_R15 + xK_R15, +# else + -- Skipping xK_R15 because your X doesn't define it +# endif +# ifdef XK_Shift_L + xK_Shift_L, -- Left shift +# else + -- Skipping xK_Shift_L because your X doesn't define it +# endif +# ifdef XK_Shift_R + xK_Shift_R, -- Right shift +# else + -- Skipping xK_Shift_R because your X doesn't define it +# endif +# ifdef XK_Control_L + xK_Control_L, -- Left control +# else + -- Skipping xK_Control_L because your X doesn't define it +# endif +# ifdef XK_Control_R + xK_Control_R, -- Right control +# else + -- Skipping xK_Control_R because your X doesn't define it +# endif +# ifdef XK_Caps_Lock + xK_Caps_Lock, -- Caps lock +# else + -- Skipping xK_Caps_Lock because your X doesn't define it +# endif +# ifdef XK_Shift_Lock + xK_Shift_Lock, -- Shift lock +# else + -- Skipping xK_Shift_Lock because your X doesn't define it +# endif +# ifdef XK_Meta_L + xK_Meta_L, -- Left meta +# else + -- Skipping xK_Meta_L because your X doesn't define it +# endif +# ifdef XK_Meta_R + xK_Meta_R, -- Right meta +# else + -- Skipping xK_Meta_R because your X doesn't define it +# endif +# ifdef XK_Alt_L + xK_Alt_L, -- Left alt +# else + -- Skipping xK_Alt_L because your X doesn't define it +# endif +# ifdef XK_Alt_R + xK_Alt_R, -- Right alt +# else + -- Skipping xK_Alt_R because your X doesn't define it +# endif +# ifdef XK_Super_L + xK_Super_L, -- Left super +# else + -- Skipping xK_Super_L because your X doesn't define it +# endif +# ifdef XK_Super_R + xK_Super_R, -- Right super +# else + -- Skipping xK_Super_R because your X doesn't define it +# endif +# ifdef XK_Hyper_L + xK_Hyper_L, -- Left hyper +# else + -- Skipping xK_Hyper_L because your X doesn't define it +# endif +# ifdef XK_Hyper_R + xK_Hyper_R, -- Right hyper +# else + -- Skipping xK_Hyper_R because your X doesn't define it +# endif +#endif + + -- XK_XKB_KEYS +#ifdef XK_ISO_Lock + xK_ISO_Lock, +#else + -- Skipping xK_ISO_Lock because your X doesn't define it +#endif +#ifdef XK_ISO_Level2_Latch + xK_ISO_Level2_Latch, +#else + -- Skipping xK_ISO_Level2_Latch because your X doesn't define it +#endif +#ifdef XK_ISO_Level3_Shift + xK_ISO_Level3_Shift, +#else + -- Skipping xK_ISO_Level3_Shift because your X doesn't define it +#endif +#ifdef XK_ISO_Level3_Latch + xK_ISO_Level3_Latch, +#else + -- Skipping xK_ISO_Level3_Latch because your X doesn't define it +#endif +#ifdef XK_ISO_Level3_Lock + xK_ISO_Level3_Lock, +#else + -- Skipping xK_ISO_Level3_Lock because your X doesn't define it +#endif +#ifdef XK_ISO_Level5_Shift + xK_ISO_Level5_Shift, +#else + -- Skipping xK_ISO_Level5_Shift because your X doesn't define it +#endif +#ifdef XK_ISO_Level5_Latch + xK_ISO_Level5_Latch, +#else + -- Skipping xK_ISO_Level5_Latch because your X doesn't define it +#endif +#ifdef XK_ISO_Level5_Lock + xK_ISO_Level5_Lock, +#else + -- Skipping xK_ISO_Level5_Lock because your X doesn't define it +#endif +#ifdef XK_ISO_Group_Shift + xK_ISO_Group_Shift, -- Alias for mode_switch +#else + -- Skipping xK_ISO_Group_Shift because your X doesn't define it +#endif +#ifdef XK_ISO_Group_Latch + xK_ISO_Group_Latch, +#else + -- Skipping xK_ISO_Group_Latch because your X doesn't define it +#endif +#ifdef XK_ISO_Group_Lock + xK_ISO_Group_Lock, +#else + -- Skipping xK_ISO_Group_Lock because your X doesn't define it +#endif +#ifdef XK_ISO_Next_Group + xK_ISO_Next_Group, +#else + -- Skipping xK_ISO_Next_Group because your X doesn't define it +#endif +#ifdef XK_ISO_Next_Group_Lock + xK_ISO_Next_Group_Lock, +#else + -- Skipping xK_ISO_Next_Group_Lock because your X doesn't define it +#endif +#ifdef XK_ISO_Prev_Group + xK_ISO_Prev_Group, +#else + -- Skipping xK_ISO_Prev_Group because your X doesn't define it +#endif +#ifdef XK_ISO_Prev_Group_Lock + xK_ISO_Prev_Group_Lock, +#else + -- Skipping xK_ISO_Prev_Group_Lock because your X doesn't define it +#endif +#ifdef XK_ISO_First_Group + xK_ISO_First_Group, +#else + -- Skipping xK_ISO_First_Group because your X doesn't define it +#endif +#ifdef XK_ISO_First_Group_Lock + xK_ISO_First_Group_Lock, +#else + -- Skipping xK_ISO_First_Group_Lock because your X doesn't define it +#endif +#ifdef XK_ISO_Last_Group + xK_ISO_Last_Group, +#else + -- Skipping xK_ISO_Last_Group because your X doesn't define it +#endif +#ifdef XK_ISO_Last_Group_Lock + xK_ISO_Last_Group_Lock, +#else + -- Skipping xK_ISO_Last_Group_Lock because your X doesn't define it +#endif +#ifdef XK_ISO_Left_Tab + xK_ISO_Left_Tab, +#else + -- Skipping xK_ISO_Left_Tab because your X doesn't define it +#endif +#ifdef XK_ISO_Move_Line_Up + xK_ISO_Move_Line_Up, +#else + -- Skipping xK_ISO_Move_Line_Up because your X doesn't define it +#endif +#ifdef XK_ISO_Move_Line_Down + xK_ISO_Move_Line_Down, +#else + -- Skipping xK_ISO_Move_Line_Down because your X doesn't define it +#endif +#ifdef XK_ISO_Partial_Line_Up + xK_ISO_Partial_Line_Up, +#else + -- Skipping xK_ISO_Partial_Line_Up because your X doesn't define it +#endif +#ifdef XK_ISO_Partial_Line_Down + xK_ISO_Partial_Line_Down, +#else + -- Skipping xK_ISO_Partial_Line_Down because your X doesn't define it +#endif +#ifdef XK_ISO_Partial_Space_Left + xK_ISO_Partial_Space_Left, +#else + -- Skipping xK_ISO_Partial_Space_Left because your X doesn't define it +#endif +#ifdef XK_ISO_Partial_Space_Right + xK_ISO_Partial_Space_Right, +#else + -- Skipping xK_ISO_Partial_Space_Right because your X doesn't define it +#endif +#ifdef XK_ISO_Set_Margin_Left + xK_ISO_Set_Margin_Left, +#else + -- Skipping xK_ISO_Set_Margin_Left because your X doesn't define it +#endif +#ifdef XK_ISO_Set_Margin_Right + xK_ISO_Set_Margin_Right, +#else + -- Skipping xK_ISO_Set_Margin_Right because your X doesn't define it +#endif +#ifdef XK_ISO_Release_Margin_Left + xK_ISO_Release_Margin_Left, +#else + -- Skipping xK_ISO_Release_Margin_Left because your X doesn't define it +#endif +#ifdef XK_ISO_Release_Margin_Right + xK_ISO_Release_Margin_Right, +#else + -- Skipping xK_ISO_Release_Margin_Right because your X doesn't define it +#endif +#ifdef XK_ISO_Release_Both_Margins + xK_ISO_Release_Both_Margins, +#else + -- Skipping xK_ISO_Release_Both_Margins because your X doesn't define it +#endif +#ifdef XK_ISO_Fast_Cursor_Left + xK_ISO_Fast_Cursor_Left, +#else + -- Skipping xK_ISO_Fast_Cursor_Left because your X doesn't define it +#endif +#ifdef XK_ISO_Fast_Cursor_Right + xK_ISO_Fast_Cursor_Right, +#else + -- Skipping xK_ISO_Fast_Cursor_Right because your X doesn't define it +#endif +#ifdef XK_ISO_Fast_Cursor_Up + xK_ISO_Fast_Cursor_Up, +#else + -- Skipping xK_ISO_Fast_Cursor_Up because your X doesn't define it +#endif +#ifdef XK_ISO_Fast_Cursor_Down + xK_ISO_Fast_Cursor_Down, +#else + -- Skipping xK_ISO_Fast_Cursor_Down because your X doesn't define it +#endif +#ifdef XK_ISO_Continuous_Underline + xK_ISO_Continuous_Underline, +#else + -- Skipping xK_ISO_Continuous_Underline because your X doesn't define it +#endif +#ifdef XK_ISO_Discontinuous_Underline + xK_ISO_Discontinuous_Underline, +#else + -- Skipping xK_ISO_Discontinuous_Underline because your X doesn't define it +#endif +#ifdef XK_ISO_Emphasize + xK_ISO_Emphasize, +#else + -- Skipping xK_ISO_Emphasize because your X doesn't define it +#endif +#ifdef XK_ISO_Center_Object + xK_ISO_Center_Object, +#else + -- Skipping xK_ISO_Center_Object because your X doesn't define it +#endif +#ifdef XK_ISO_Enter + xK_ISO_Enter, +#else + -- Skipping xK_ISO_Enter because your X doesn't define it +#endif +#ifdef XK_dead_grave + xK_dead_grave, +#else + -- Skipping xK_dead_grave because your X doesn't define it +#endif +#ifdef XK_dead_acute + xK_dead_acute, +#else + -- Skipping xK_dead_acute because your X doesn't define it +#endif +#ifdef XK_dead_circumflex + xK_dead_circumflex, +#else + -- Skipping xK_dead_circumflex because your X doesn't define it +#endif +#ifdef XK_dead_tilde + xK_dead_tilde, +#else + -- Skipping xK_dead_tilde because your X doesn't define it +#endif +#ifdef XK_dead_macron + xK_dead_macron, +#else + -- Skipping xK_dead_macron because your X doesn't define it +#endif +#ifdef XK_dead_breve + xK_dead_breve, +#else + -- Skipping xK_dead_breve because your X doesn't define it +#endif +#ifdef XK_dead_abovedot + xK_dead_abovedot, +#else + -- Skipping xK_dead_abovedot because your X doesn't define it +#endif +#ifdef XK_dead_diaeresis + xK_dead_diaeresis, +#else + -- Skipping xK_dead_diaeresis because your X doesn't define it +#endif +#ifdef XK_dead_abovering + xK_dead_abovering, +#else + -- Skipping xK_dead_abovering because your X doesn't define it +#endif +#ifdef XK_dead_doubleacute + xK_dead_doubleacute, +#else + -- Skipping xK_dead_doubleacute because your X doesn't define it +#endif +#ifdef XK_dead_caron + xK_dead_caron, +#else + -- Skipping xK_dead_caron because your X doesn't define it +#endif +#ifdef XK_dead_cedilla + xK_dead_cedilla, +#else + -- Skipping xK_dead_cedilla because your X doesn't define it +#endif +#ifdef XK_dead_ogonek + xK_dead_ogonek, +#else + -- Skipping xK_dead_ogonek because your X doesn't define it +#endif +#ifdef XK_dead_iota + xK_dead_iota, +#else + -- Skipping xK_dead_iota because your X doesn't define it +#endif +#ifdef XK_dead_voiced_sound + xK_dead_voiced_sound, +#else + -- Skipping xK_dead_voiced_sound because your X doesn't define it +#endif +#ifdef XK_dead_semivoiced_sound + xK_dead_semivoiced_sound, +#else + -- Skipping xK_dead_semivoiced_sound because your X doesn't define it +#endif +#ifdef XK_dead_belowdot + xK_dead_belowdot, +#else + -- Skipping xK_dead_belowdot because your X doesn't define it +#endif +#ifdef XK_dead_hook + xK_dead_hook, +#else + -- Skipping xK_dead_hook because your X doesn't define it +#endif +#ifdef XK_dead_horn + xK_dead_horn, +#else + -- Skipping xK_dead_horn because your X doesn't define it +#endif +#ifdef XK_dead_stroke + xK_dead_stroke, +#else + -- Skipping xK_dead_stroke because your X doesn't define it +#endif +#ifdef XK_dead_abovecomma + xK_dead_abovecomma, +#else + -- Skipping xK_dead_abovecomma because your X doesn't define it +#endif +#ifdef XK_dead_psili + xK_dead_psili, -- alias for dead_abovecomma +#else + -- Skipping xK_dead_psili because your X doesn't define it +#endif +#ifdef XK_dead_abovereversedcomma + xK_dead_abovereversedcomma, +#else + -- Skipping xK_dead_abovereversedcomma because your X doesn't define it +#endif +#ifdef XK_dead_dasia + xK_dead_dasia, -- alias for dead_abovereversedcomma +#else + -- Skipping xK_dead_dasia because your X doesn't define it +#endif +#ifdef XK_First_Virtual_Screen + xK_First_Virtual_Screen, +#else + -- Skipping xK_First_Virtual_Screen because your X doesn't define it +#endif +#ifdef XK_Prev_Virtual_Screen + xK_Prev_Virtual_Screen, +#else + -- Skipping xK_Prev_Virtual_Screen because your X doesn't define it +#endif +#ifdef XK_Next_Virtual_Screen + xK_Next_Virtual_Screen, +#else + -- Skipping xK_Next_Virtual_Screen because your X doesn't define it +#endif +#ifdef XK_Last_Virtual_Screen + xK_Last_Virtual_Screen, +#else + -- Skipping xK_Last_Virtual_Screen because your X doesn't define it +#endif +#ifdef XK_Terminate_Server + xK_Terminate_Server, +#else + -- Skipping xK_Terminate_Server because your X doesn't define it +#endif +#ifdef XK_AccessX_Enable + xK_AccessX_Enable, +#else + -- Skipping xK_AccessX_Enable because your X doesn't define it +#endif +#ifdef XK_AccessX_Feedback_Enable + xK_AccessX_Feedback_Enable, +#else + -- Skipping xK_AccessX_Feedback_Enable because your X doesn't define it +#endif +#ifdef XK_RepeatKeys_Enable + xK_RepeatKeys_Enable, +#else + -- Skipping xK_RepeatKeys_Enable because your X doesn't define it +#endif +#ifdef XK_SlowKeys_Enable + xK_SlowKeys_Enable, +#else + -- Skipping xK_SlowKeys_Enable because your X doesn't define it +#endif +#ifdef XK_BounceKeys_Enable + xK_BounceKeys_Enable, +#else + -- Skipping xK_BounceKeys_Enable because your X doesn't define it +#endif +#ifdef XK_StickyKeys_Enable + xK_StickyKeys_Enable, +#else + -- Skipping xK_StickyKeys_Enable because your X doesn't define it +#endif +#ifdef XK_MouseKeys_Enable + xK_MouseKeys_Enable, +#else + -- Skipping xK_MouseKeys_Enable because your X doesn't define it +#endif +#ifdef XK_MouseKeys_Accel_Enable + xK_MouseKeys_Accel_Enable, +#else + -- Skipping xK_MouseKeys_Accel_Enable because your X doesn't define it +#endif +#ifdef XK_Overlay1_Enable + xK_Overlay1_Enable, +#else + -- Skipping xK_Overlay1_Enable because your X doesn't define it +#endif +#ifdef XK_Overlay2_Enable + xK_Overlay2_Enable, +#else + -- Skipping xK_Overlay2_Enable because your X doesn't define it +#endif +#ifdef XK_AudibleBell_Enable + xK_AudibleBell_Enable, +#else + -- Skipping xK_AudibleBell_Enable because your X doesn't define it +#endif +#ifdef XK_Pointer_Left + xK_Pointer_Left, +#else + -- Skipping xK_Pointer_Left because your X doesn't define it +#endif +#ifdef XK_Pointer_Right + xK_Pointer_Right, +#else + -- Skipping xK_Pointer_Right because your X doesn't define it +#endif +#ifdef XK_Pointer_Up + xK_Pointer_Up, +#else + -- Skipping xK_Pointer_Up because your X doesn't define it +#endif +#ifdef XK_Pointer_Down + xK_Pointer_Down, +#else + -- Skipping xK_Pointer_Down because your X doesn't define it +#endif +#ifdef XK_Pointer_UpLeft + xK_Pointer_UpLeft, +#else + -- Skipping xK_Pointer_UpLeft because your X doesn't define it +#endif +#ifdef XK_Pointer_UpRight + xK_Pointer_UpRight, +#else + -- Skipping xK_Pointer_UpRight because your X doesn't define it +#endif +#ifdef XK_Pointer_DownLeft + xK_Pointer_DownLeft, +#else + -- Skipping xK_Pointer_DownLeft because your X doesn't define it +#endif +#ifdef XK_Pointer_DownRight + xK_Pointer_DownRight, +#else + -- Skipping xK_Pointer_DownRight because your X doesn't define it +#endif +#ifdef XK_Pointer_Button_Dflt + xK_Pointer_Button_Dflt, +#else + -- Skipping xK_Pointer_Button_Dflt because your X doesn't define it +#endif +#ifdef XK_Pointer_Button1 + xK_Pointer_Button1, +#else + -- Skipping xK_Pointer_Button1 because your X doesn't define it +#endif +#ifdef XK_Pointer_Button2 + xK_Pointer_Button2, +#else + -- Skipping xK_Pointer_Button2 because your X doesn't define it +#endif +#ifdef XK_Pointer_Button3 + xK_Pointer_Button3, +#else + -- Skipping xK_Pointer_Button3 because your X doesn't define it +#endif +#ifdef XK_Pointer_Button4 + xK_Pointer_Button4, +#else + -- Skipping xK_Pointer_Button4 because your X doesn't define it +#endif +#ifdef XK_Pointer_Button5 + xK_Pointer_Button5, +#else + -- Skipping xK_Pointer_Button5 because your X doesn't define it +#endif +#ifdef XK_Pointer_DblClick_Dflt + xK_Pointer_DblClick_Dflt, +#else + -- Skipping xK_Pointer_DblClick_Dflt because your X doesn't define it +#endif +#ifdef XK_Pointer_DblClick1 + xK_Pointer_DblClick1, +#else + -- Skipping xK_Pointer_DblClick1 because your X doesn't define it +#endif +#ifdef XK_Pointer_DblClick2 + xK_Pointer_DblClick2, +#else + -- Skipping xK_Pointer_DblClick2 because your X doesn't define it +#endif +#ifdef XK_Pointer_DblClick3 + xK_Pointer_DblClick3, +#else + -- Skipping xK_Pointer_DblClick3 because your X doesn't define it +#endif +#ifdef XK_Pointer_DblClick4 + xK_Pointer_DblClick4, +#else + -- Skipping xK_Pointer_DblClick4 because your X doesn't define it +#endif +#ifdef XK_Pointer_DblClick5 + xK_Pointer_DblClick5, +#else + -- Skipping xK_Pointer_DblClick5 because your X doesn't define it +#endif +#ifdef XK_Pointer_Drag_Dflt + xK_Pointer_Drag_Dflt, +#else + -- Skipping xK_Pointer_Drag_Dflt because your X doesn't define it +#endif +#ifdef XK_Pointer_Drag1 + xK_Pointer_Drag1, +#else + -- Skipping xK_Pointer_Drag1 because your X doesn't define it +#endif +#ifdef XK_Pointer_Drag2 + xK_Pointer_Drag2, +#else + -- Skipping xK_Pointer_Drag2 because your X doesn't define it +#endif +#ifdef XK_Pointer_Drag3 + xK_Pointer_Drag3, +#else + -- Skipping xK_Pointer_Drag3 because your X doesn't define it +#endif +#ifdef XK_Pointer_Drag4 + xK_Pointer_Drag4, +#else + -- Skipping xK_Pointer_Drag4 because your X doesn't define it +#endif +#ifdef XK_Pointer_Drag5 + xK_Pointer_Drag5, +#else + -- Skipping xK_Pointer_Drag5 because your X doesn't define it +#endif +#ifdef XK_Pointer_EnableKeys + xK_Pointer_EnableKeys, +#else + -- Skipping xK_Pointer_EnableKeys because your X doesn't define it +#endif +#ifdef XK_Pointer_Accelerate + xK_Pointer_Accelerate, +#else + -- Skipping xK_Pointer_Accelerate because your X doesn't define it +#endif +#ifdef XK_Pointer_DfltBtnNext + xK_Pointer_DfltBtnNext, +#else + -- Skipping xK_Pointer_DfltBtnNext because your X doesn't define it +#endif +#ifdef XK_Pointer_DfltBtnPrev + xK_Pointer_DfltBtnPrev, +#else + -- Skipping xK_Pointer_DfltBtnPrev because your X doesn't define it +#endif + + -- XK_3270 +#ifdef XK_3270_Duplicate + xK_3270_Duplicate, +#else + -- Skipping xK_3270_Duplicate because your X doesn't define it +#endif +#ifdef XK_3270_FieldMark + xK_3270_FieldMark, +#else + -- Skipping xK_3270_FieldMark because your X doesn't define it +#endif +#ifdef XK_3270_Right2 + xK_3270_Right2, +#else + -- Skipping xK_3270_Right2 because your X doesn't define it +#endif +#ifdef XK_3270_Left2 + xK_3270_Left2, +#else + -- Skipping xK_3270_Left2 because your X doesn't define it +#endif +#ifdef XK_3270_BackTab + xK_3270_BackTab, +#else + -- Skipping xK_3270_BackTab because your X doesn't define it +#endif +#ifdef XK_3270_EraseEOF + xK_3270_EraseEOF, +#else + -- Skipping xK_3270_EraseEOF because your X doesn't define it +#endif +#ifdef XK_3270_EraseInput + xK_3270_EraseInput, +#else + -- Skipping xK_3270_EraseInput because your X doesn't define it +#endif +#ifdef XK_3270_Reset + xK_3270_Reset, +#else + -- Skipping xK_3270_Reset because your X doesn't define it +#endif +#ifdef XK_3270_Quit + xK_3270_Quit, +#else + -- Skipping xK_3270_Quit because your X doesn't define it +#endif +#ifdef XK_3270_PA1 + xK_3270_PA1, +#else + -- Skipping xK_3270_PA1 because your X doesn't define it +#endif +#ifdef XK_3270_PA2 + xK_3270_PA2, +#else + -- Skipping xK_3270_PA2 because your X doesn't define it +#endif +#ifdef XK_3270_PA3 + xK_3270_PA3, +#else + -- Skipping xK_3270_PA3 because your X doesn't define it +#endif +#ifdef XK_3270_Test + xK_3270_Test, +#else + -- Skipping xK_3270_Test because your X doesn't define it +#endif +#ifdef XK_3270_Attn + xK_3270_Attn, +#else + -- Skipping xK_3270_Attn because your X doesn't define it +#endif +#ifdef XK_3270_CursorBlink + xK_3270_CursorBlink, +#else + -- Skipping xK_3270_CursorBlink because your X doesn't define it +#endif +#ifdef XK_3270_AltCursor + xK_3270_AltCursor, +#else + -- Skipping xK_3270_AltCursor because your X doesn't define it +#endif +#ifdef XK_3270_KeyClick + xK_3270_KeyClick, +#else + -- Skipping xK_3270_KeyClick because your X doesn't define it +#endif +#ifdef XK_3270_Jump + xK_3270_Jump, +#else + -- Skipping xK_3270_Jump because your X doesn't define it +#endif +#ifdef XK_3270_Ident + xK_3270_Ident, +#else + -- Skipping xK_3270_Ident because your X doesn't define it +#endif +#ifdef XK_3270_Rule + xK_3270_Rule, +#else + -- Skipping xK_3270_Rule because your X doesn't define it +#endif +#ifdef XK_3270_Copy + xK_3270_Copy, +#else + -- Skipping xK_3270_Copy because your X doesn't define it +#endif +#ifdef XK_3270_Play + xK_3270_Play, +#else + -- Skipping xK_3270_Play because your X doesn't define it +#endif +#ifdef XK_3270_Setup + xK_3270_Setup, +#else + -- Skipping xK_3270_Setup because your X doesn't define it +#endif +#ifdef XK_3270_Record + xK_3270_Record, +#else + -- Skipping xK_3270_Record because your X doesn't define it +#endif +#ifdef XK_3270_ChangeScreen + xK_3270_ChangeScreen, +#else + -- Skipping xK_3270_ChangeScreen because your X doesn't define it +#endif +#ifdef XK_3270_DeleteWord + xK_3270_DeleteWord, +#else + -- Skipping xK_3270_DeleteWord because your X doesn't define it +#endif +#ifdef XK_3270_ExSelect + xK_3270_ExSelect, +#else + -- Skipping xK_3270_ExSelect because your X doesn't define it +#endif +#ifdef XK_3270_CursorSelect + xK_3270_CursorSelect, +#else + -- Skipping xK_3270_CursorSelect because your X doesn't define it +#endif +#ifdef XK_3270_PrintScreen + xK_3270_PrintScreen, +#else + -- Skipping xK_3270_PrintScreen because your X doesn't define it +#endif +#ifdef XK_3270_Enter + xK_3270_Enter, +#else + -- Skipping xK_3270_Enter because your X doesn't define it +#endif + +-- Skipping XK_LATIN1 because Graphics.X11.Types already defines it. +#if 0 + -- XK_LATIN1 +# ifdef XK_space + xK_space, -- U+0020 SPACE +# else + -- Skipping xK_space because your X doesn't define it +# endif +# ifdef XK_exclam + xK_exclam, -- U+0021 EXCLAMATION MARK +# else + -- Skipping xK_exclam because your X doesn't define it +# endif +# ifdef XK_quotedbl + xK_quotedbl, -- U+0022 QUOTATION MARK +# else + -- Skipping xK_quotedbl because your X doesn't define it +# endif +# ifdef XK_numbersign + xK_numbersign, -- U+0023 NUMBER SIGN +# else + -- Skipping xK_numbersign because your X doesn't define it +# endif +# ifdef XK_dollar + xK_dollar, -- U+0024 DOLLAR SIGN +# else + -- Skipping xK_dollar because your X doesn't define it +# endif +# ifdef XK_percent + xK_percent, -- U+0025 PERCENT SIGN +# else + -- Skipping xK_percent because your X doesn't define it +# endif +# ifdef XK_ampersand + xK_ampersand, -- U+0026 AMPERSAND +# else + -- Skipping xK_ampersand because your X doesn't define it +# endif +# ifdef XK_apostrophe + xK_apostrophe, -- U+0027 APOSTROPHE +# else + -- Skipping xK_apostrophe because your X doesn't define it +# endif +# ifdef XK_quoteright + xK_quoteright, -- deprecated +# else + -- Skipping xK_quoteright because your X doesn't define it +# endif +# ifdef XK_parenleft + xK_parenleft, -- U+0028 LEFT PARENTHESIS +# else + -- Skipping xK_parenleft because your X doesn't define it +# endif +# ifdef XK_parenright + xK_parenright, -- U+0029 RIGHT PARENTHESIS +# else + -- Skipping xK_parenright because your X doesn't define it +# endif +# ifdef XK_asterisk + xK_asterisk, -- U+002A ASTERISK +# else + -- Skipping xK_asterisk because your X doesn't define it +# endif +# ifdef XK_plus + xK_plus, -- U+002B PLUS SIGN +# else + -- Skipping xK_plus because your X doesn't define it +# endif +# ifdef XK_comma + xK_comma, -- U+002C COMMA +# else + -- Skipping xK_comma because your X doesn't define it +# endif +# ifdef XK_minus + xK_minus, -- U+002D HYPHEN-MINUS +# else + -- Skipping xK_minus because your X doesn't define it +# endif +# ifdef XK_period + xK_period, -- U+002E FULL STOP +# else + -- Skipping xK_period because your X doesn't define it +# endif +# ifdef XK_slash + xK_slash, -- U+002F SOLIDUS +# else + -- Skipping xK_slash because your X doesn't define it +# endif +# ifdef XK_0 + xK_0, -- U+0030 DIGIT ZERO +# else + -- Skipping xK_0 because your X doesn't define it +# endif +# ifdef XK_1 + xK_1, -- U+0031 DIGIT ONE +# else + -- Skipping xK_1 because your X doesn't define it +# endif +# ifdef XK_2 + xK_2, -- U+0032 DIGIT TWO +# else + -- Skipping xK_2 because your X doesn't define it +# endif +# ifdef XK_3 + xK_3, -- U+0033 DIGIT THREE +# else + -- Skipping xK_3 because your X doesn't define it +# endif +# ifdef XK_4 + xK_4, -- U+0034 DIGIT FOUR +# else + -- Skipping xK_4 because your X doesn't define it +# endif +# ifdef XK_5 + xK_5, -- U+0035 DIGIT FIVE +# else + -- Skipping xK_5 because your X doesn't define it +# endif +# ifdef XK_6 + xK_6, -- U+0036 DIGIT SIX +# else + -- Skipping xK_6 because your X doesn't define it +# endif +# ifdef XK_7 + xK_7, -- U+0037 DIGIT SEVEN +# else + -- Skipping xK_7 because your X doesn't define it +# endif +# ifdef XK_8 + xK_8, -- U+0038 DIGIT EIGHT +# else + -- Skipping xK_8 because your X doesn't define it +# endif +# ifdef XK_9 + xK_9, -- U+0039 DIGIT NINE +# else + -- Skipping xK_9 because your X doesn't define it +# endif +# ifdef XK_colon + xK_colon, -- U+003A COLON +# else + -- Skipping xK_colon because your X doesn't define it +# endif +# ifdef XK_semicolon + xK_semicolon, -- U+003B SEMICOLON +# else + -- Skipping xK_semicolon because your X doesn't define it +# endif +# ifdef XK_less + xK_less, -- U+003C LESS-THAN SIGN +# else + -- Skipping xK_less because your X doesn't define it +# endif +# ifdef XK_equal + xK_equal, -- U+003D EQUALS SIGN +# else + -- Skipping xK_equal because your X doesn't define it +# endif +# ifdef XK_greater + xK_greater, -- U+003E GREATER-THAN SIGN +# else + -- Skipping xK_greater because your X doesn't define it +# endif +# ifdef XK_question + xK_question, -- U+003F QUESTION MARK +# else + -- Skipping xK_question because your X doesn't define it +# endif +# ifdef XK_at + xK_at, -- U+0040 COMMERCIAL AT +# else + -- Skipping xK_at because your X doesn't define it +# endif +# ifdef XK_A + xK_A, -- U+0041 LATIN CAPITAL LETTER A +# else + -- Skipping xK_A because your X doesn't define it +# endif +# ifdef XK_B + xK_B, -- U+0042 LATIN CAPITAL LETTER B +# else + -- Skipping xK_B because your X doesn't define it +# endif +# ifdef XK_C + xK_C, -- U+0043 LATIN CAPITAL LETTER C +# else + -- Skipping xK_C because your X doesn't define it +# endif +# ifdef XK_D + xK_D, -- U+0044 LATIN CAPITAL LETTER D +# else + -- Skipping xK_D because your X doesn't define it +# endif +# ifdef XK_E + xK_E, -- U+0045 LATIN CAPITAL LETTER E +# else + -- Skipping xK_E because your X doesn't define it +# endif +# ifdef XK_F + xK_F, -- U+0046 LATIN CAPITAL LETTER F +# else + -- Skipping xK_F because your X doesn't define it +# endif +# ifdef XK_G + xK_G, -- U+0047 LATIN CAPITAL LETTER G +# else + -- Skipping xK_G because your X doesn't define it +# endif +# ifdef XK_H + xK_H, -- U+0048 LATIN CAPITAL LETTER H +# else + -- Skipping xK_H because your X doesn't define it +# endif +# ifdef XK_I + xK_I, -- U+0049 LATIN CAPITAL LETTER I +# else + -- Skipping xK_I because your X doesn't define it +# endif +# ifdef XK_J + xK_J, -- U+004A LATIN CAPITAL LETTER J +# else + -- Skipping xK_J because your X doesn't define it +# endif +# ifdef XK_K + xK_K, -- U+004B LATIN CAPITAL LETTER K +# else + -- Skipping xK_K because your X doesn't define it +# endif +# ifdef XK_L + xK_L, -- U+004C LATIN CAPITAL LETTER L +# else + -- Skipping xK_L because your X doesn't define it +# endif +# ifdef XK_M + xK_M, -- U+004D LATIN CAPITAL LETTER M +# else + -- Skipping xK_M because your X doesn't define it +# endif +# ifdef XK_N + xK_N, -- U+004E LATIN CAPITAL LETTER N +# else + -- Skipping xK_N because your X doesn't define it +# endif +# ifdef XK_O + xK_O, -- U+004F LATIN CAPITAL LETTER O +# else + -- Skipping xK_O because your X doesn't define it +# endif +# ifdef XK_P + xK_P, -- U+0050 LATIN CAPITAL LETTER P +# else + -- Skipping xK_P because your X doesn't define it +# endif +# ifdef XK_Q + xK_Q, -- U+0051 LATIN CAPITAL LETTER Q +# else + -- Skipping xK_Q because your X doesn't define it +# endif +# ifdef XK_R + xK_R, -- U+0052 LATIN CAPITAL LETTER R +# else + -- Skipping xK_R because your X doesn't define it +# endif +# ifdef XK_S + xK_S, -- U+0053 LATIN CAPITAL LETTER S +# else + -- Skipping xK_S because your X doesn't define it +# endif +# ifdef XK_T + xK_T, -- U+0054 LATIN CAPITAL LETTER T +# else + -- Skipping xK_T because your X doesn't define it +# endif +# ifdef XK_U + xK_U, -- U+0055 LATIN CAPITAL LETTER U +# else + -- Skipping xK_U because your X doesn't define it +# endif +# ifdef XK_V + xK_V, -- U+0056 LATIN CAPITAL LETTER V +# else + -- Skipping xK_V because your X doesn't define it +# endif +# ifdef XK_W + xK_W, -- U+0057 LATIN CAPITAL LETTER W +# else + -- Skipping xK_W because your X doesn't define it +# endif +# ifdef XK_X + xK_X, -- U+0058 LATIN CAPITAL LETTER X +# else + -- Skipping xK_X because your X doesn't define it +# endif +# ifdef XK_Y + xK_Y, -- U+0059 LATIN CAPITAL LETTER Y +# else + -- Skipping xK_Y because your X doesn't define it +# endif +# ifdef XK_Z + xK_Z, -- U+005A LATIN CAPITAL LETTER Z +# else + -- Skipping xK_Z because your X doesn't define it +# endif +# ifdef XK_bracketleft + xK_bracketleft, -- U+005B LEFT SQUARE BRACKET +# else + -- Skipping xK_bracketleft because your X doesn't define it +# endif +# ifdef XK_backslash + xK_backslash, -- U+005C REVERSE SOLIDUS +# else + -- Skipping xK_backslash because your X doesn't define it +# endif +# ifdef XK_bracketright + xK_bracketright, -- U+005D RIGHT SQUARE BRACKET +# else + -- Skipping xK_bracketright because your X doesn't define it +# endif +# ifdef XK_asciicircum + xK_asciicircum, -- U+005E CIRCUMFLEX ACCENT +# else + -- Skipping xK_asciicircum because your X doesn't define it +# endif +# ifdef XK_underscore + xK_underscore, -- U+005F LOW LINE +# else + -- Skipping xK_underscore because your X doesn't define it +# endif +# ifdef XK_grave + xK_grave, -- U+0060 GRAVE ACCENT +# else + -- Skipping xK_grave because your X doesn't define it +# endif +# ifdef XK_quoteleft + xK_quoteleft, -- deprecated +# else + -- Skipping xK_quoteleft because your X doesn't define it +# endif +# ifdef XK_a + xK_a, -- U+0061 LATIN SMALL LETTER A +# else + -- Skipping xK_a because your X doesn't define it +# endif +# ifdef XK_b + xK_b, -- U+0062 LATIN SMALL LETTER B +# else + -- Skipping xK_b because your X doesn't define it +# endif +# ifdef XK_c + xK_c, -- U+0063 LATIN SMALL LETTER C +# else + -- Skipping xK_c because your X doesn't define it +# endif +# ifdef XK_d + xK_d, -- U+0064 LATIN SMALL LETTER D +# else + -- Skipping xK_d because your X doesn't define it +# endif +# ifdef XK_e + xK_e, -- U+0065 LATIN SMALL LETTER E +# else + -- Skipping xK_e because your X doesn't define it +# endif +# ifdef XK_f + xK_f, -- U+0066 LATIN SMALL LETTER F +# else + -- Skipping xK_f because your X doesn't define it +# endif +# ifdef XK_g + xK_g, -- U+0067 LATIN SMALL LETTER G +# else + -- Skipping xK_g because your X doesn't define it +# endif +# ifdef XK_h + xK_h, -- U+0068 LATIN SMALL LETTER H +# else + -- Skipping xK_h because your X doesn't define it +# endif +# ifdef XK_i + xK_i, -- U+0069 LATIN SMALL LETTER I +# else + -- Skipping xK_i because your X doesn't define it +# endif +# ifdef XK_j + xK_j, -- U+006A LATIN SMALL LETTER J +# else + -- Skipping xK_j because your X doesn't define it +# endif +# ifdef XK_k + xK_k, -- U+006B LATIN SMALL LETTER K +# else + -- Skipping xK_k because your X doesn't define it +# endif +# ifdef XK_l + xK_l, -- U+006C LATIN SMALL LETTER L +# else + -- Skipping xK_l because your X doesn't define it +# endif +# ifdef XK_m + xK_m, -- U+006D LATIN SMALL LETTER M +# else + -- Skipping xK_m because your X doesn't define it +# endif +# ifdef XK_n + xK_n, -- U+006E LATIN SMALL LETTER N +# else + -- Skipping xK_n because your X doesn't define it +# endif +# ifdef XK_o + xK_o, -- U+006F LATIN SMALL LETTER O +# else + -- Skipping xK_o because your X doesn't define it +# endif +# ifdef XK_p + xK_p, -- U+0070 LATIN SMALL LETTER P +# else + -- Skipping xK_p because your X doesn't define it +# endif +# ifdef XK_q + xK_q, -- U+0071 LATIN SMALL LETTER Q +# else + -- Skipping xK_q because your X doesn't define it +# endif +# ifdef XK_r + xK_r, -- U+0072 LATIN SMALL LETTER R +# else + -- Skipping xK_r because your X doesn't define it +# endif +# ifdef XK_s + xK_s, -- U+0073 LATIN SMALL LETTER S +# else + -- Skipping xK_s because your X doesn't define it +# endif +# ifdef XK_t + xK_t, -- U+0074 LATIN SMALL LETTER T +# else + -- Skipping xK_t because your X doesn't define it +# endif +# ifdef XK_u + xK_u, -- U+0075 LATIN SMALL LETTER U +# else + -- Skipping xK_u because your X doesn't define it +# endif +# ifdef XK_v + xK_v, -- U+0076 LATIN SMALL LETTER V +# else + -- Skipping xK_v because your X doesn't define it +# endif +# ifdef XK_w + xK_w, -- U+0077 LATIN SMALL LETTER W +# else + -- Skipping xK_w because your X doesn't define it +# endif +# ifdef XK_x + xK_x, -- U+0078 LATIN SMALL LETTER X +# else + -- Skipping xK_x because your X doesn't define it +# endif +# ifdef XK_y + xK_y, -- U+0079 LATIN SMALL LETTER Y +# else + -- Skipping xK_y because your X doesn't define it +# endif +# ifdef XK_z + xK_z, -- U+007A LATIN SMALL LETTER Z +# else + -- Skipping xK_z because your X doesn't define it +# endif +# ifdef XK_braceleft + xK_braceleft, -- U+007B LEFT CURLY BRACKET +# else + -- Skipping xK_braceleft because your X doesn't define it +# endif +# ifdef XK_bar + xK_bar, -- U+007C VERTICAL LINE +# else + -- Skipping xK_bar because your X doesn't define it +# endif +# ifdef XK_braceright + xK_braceright, -- U+007D RIGHT CURLY BRACKET +# else + -- Skipping xK_braceright because your X doesn't define it +# endif +# ifdef XK_asciitilde + xK_asciitilde, -- U+007E TILDE +# else + -- Skipping xK_asciitilde because your X doesn't define it +# endif +# ifdef XK_nobreakspace + xK_nobreakspace, -- U+00A0 NO-BREAK SPACE +# else + -- Skipping xK_nobreakspace because your X doesn't define it +# endif +# ifdef XK_exclamdown + xK_exclamdown, -- U+00A1 INVERTED EXCLAMATION MARK +# else + -- Skipping xK_exclamdown because your X doesn't define it +# endif +# ifdef XK_cent + xK_cent, -- U+00A2 CENT SIGN +# else + -- Skipping xK_cent because your X doesn't define it +# endif +# ifdef XK_sterling + xK_sterling, -- U+00A3 POUND SIGN +# else + -- Skipping xK_sterling because your X doesn't define it +# endif +# ifdef XK_currency + xK_currency, -- U+00A4 CURRENCY SIGN +# else + -- Skipping xK_currency because your X doesn't define it +# endif +# ifdef XK_yen + xK_yen, -- U+00A5 YEN SIGN +# else + -- Skipping xK_yen because your X doesn't define it +# endif +# ifdef XK_brokenbar + xK_brokenbar, -- U+00A6 BROKEN BAR +# else + -- Skipping xK_brokenbar because your X doesn't define it +# endif +# ifdef XK_section + xK_section, -- U+00A7 SECTION SIGN +# else + -- Skipping xK_section because your X doesn't define it +# endif +# ifdef XK_diaeresis + xK_diaeresis, -- U+00A8 DIAERESIS +# else + -- Skipping xK_diaeresis because your X doesn't define it +# endif +# ifdef XK_copyright + xK_copyright, -- U+00A9 COPYRIGHT SIGN +# else + -- Skipping xK_copyright because your X doesn't define it +# endif +# ifdef XK_ordfeminine + xK_ordfeminine, -- U+00AA FEMININE ORDINAL INDICATOR +# else + -- Skipping xK_ordfeminine because your X doesn't define it +# endif +# ifdef XK_guillemotleft + xK_guillemotleft, -- U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +# else + -- Skipping xK_guillemotleft because your X doesn't define it +# endif +# ifdef XK_notsign + xK_notsign, -- U+00AC NOT SIGN +# else + -- Skipping xK_notsign because your X doesn't define it +# endif +# ifdef XK_hyphen + xK_hyphen, -- U+00AD SOFT HYPHEN +# else + -- Skipping xK_hyphen because your X doesn't define it +# endif +# ifdef XK_registered + xK_registered, -- U+00AE REGISTERED SIGN +# else + -- Skipping xK_registered because your X doesn't define it +# endif +# ifdef XK_macron + xK_macron, -- U+00AF MACRON +# else + -- Skipping xK_macron because your X doesn't define it +# endif +# ifdef XK_degree + xK_degree, -- U+00B0 DEGREE SIGN +# else + -- Skipping xK_degree because your X doesn't define it +# endif +# ifdef XK_plusminus + xK_plusminus, -- U+00B1 PLUS-MINUS SIGN +# else + -- Skipping xK_plusminus because your X doesn't define it +# endif +# ifdef XK_twosuperior + xK_twosuperior, -- U+00B2 SUPERSCRIPT TWO +# else + -- Skipping xK_twosuperior because your X doesn't define it +# endif +# ifdef XK_threesuperior + xK_threesuperior, -- U+00B3 SUPERSCRIPT THREE +# else + -- Skipping xK_threesuperior because your X doesn't define it +# endif +# ifdef XK_acute + xK_acute, -- U+00B4 ACUTE ACCENT +# else + -- Skipping xK_acute because your X doesn't define it +# endif +# ifdef XK_mu + xK_mu, -- U+00B5 MICRO SIGN +# else + -- Skipping xK_mu because your X doesn't define it +# endif +# ifdef XK_paragraph + xK_paragraph, -- U+00B6 PILCROW SIGN +# else + -- Skipping xK_paragraph because your X doesn't define it +# endif +# ifdef XK_periodcentered + xK_periodcentered, -- U+00B7 MIDDLE DOT +# else + -- Skipping xK_periodcentered because your X doesn't define it +# endif +# ifdef XK_cedilla + xK_cedilla, -- U+00B8 CEDILLA +# else + -- Skipping xK_cedilla because your X doesn't define it +# endif +# ifdef XK_onesuperior + xK_onesuperior, -- U+00B9 SUPERSCRIPT ONE +# else + -- Skipping xK_onesuperior because your X doesn't define it +# endif +# ifdef XK_masculine + xK_masculine, -- U+00BA MASCULINE ORDINAL INDICATOR +# else + -- Skipping xK_masculine because your X doesn't define it +# endif +# ifdef XK_guillemotright + xK_guillemotright, -- U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +# else + -- Skipping xK_guillemotright because your X doesn't define it +# endif +# ifdef XK_onequarter + xK_onequarter, -- U+00BC VULGAR FRACTION ONE QUARTER +# else + -- Skipping xK_onequarter because your X doesn't define it +# endif +# ifdef XK_onehalf + xK_onehalf, -- U+00BD VULGAR FRACTION ONE HALF +# else + -- Skipping xK_onehalf because your X doesn't define it +# endif +# ifdef XK_threequarters + xK_threequarters, -- U+00BE VULGAR FRACTION THREE QUARTERS +# else + -- Skipping xK_threequarters because your X doesn't define it +# endif +# ifdef XK_questiondown + xK_questiondown, -- U+00BF INVERTED QUESTION MARK +# else + -- Skipping xK_questiondown because your X doesn't define it +# endif +# ifdef XK_Agrave + xK_Agrave, -- U+00C0 LATIN CAPITAL LETTER A WITH GRAVE +# else + -- Skipping xK_Agrave because your X doesn't define it +# endif +# ifdef XK_Aacute + xK_Aacute, -- U+00C1 LATIN CAPITAL LETTER A WITH ACUTE +# else + -- Skipping xK_Aacute because your X doesn't define it +# endif +# ifdef XK_Acircumflex + xK_Acircumflex, -- U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX +# else + -- Skipping xK_Acircumflex because your X doesn't define it +# endif +# ifdef XK_Atilde + xK_Atilde, -- U+00C3 LATIN CAPITAL LETTER A WITH TILDE +# else + -- Skipping xK_Atilde because your X doesn't define it +# endif +# ifdef XK_Adiaeresis + xK_Adiaeresis, -- U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS +# else + -- Skipping xK_Adiaeresis because your X doesn't define it +# endif +# ifdef XK_Aring + xK_Aring, -- U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE +# else + -- Skipping xK_Aring because your X doesn't define it +# endif +# ifdef XK_AE + xK_AE, -- U+00C6 LATIN CAPITAL LETTER AE +# else + -- Skipping xK_AE because your X doesn't define it +# endif +# ifdef XK_Ccedilla + xK_Ccedilla, -- U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA +# else + -- Skipping xK_Ccedilla because your X doesn't define it +# endif +# ifdef XK_Egrave + xK_Egrave, -- U+00C8 LATIN CAPITAL LETTER E WITH GRAVE +# else + -- Skipping xK_Egrave because your X doesn't define it +# endif +# ifdef XK_Eacute + xK_Eacute, -- U+00C9 LATIN CAPITAL LETTER E WITH ACUTE +# else + -- Skipping xK_Eacute because your X doesn't define it +# endif +# ifdef XK_Ecircumflex + xK_Ecircumflex, -- U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX +# else + -- Skipping xK_Ecircumflex because your X doesn't define it +# endif +# ifdef XK_Ediaeresis + xK_Ediaeresis, -- U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS +# else + -- Skipping xK_Ediaeresis because your X doesn't define it +# endif +# ifdef XK_Igrave + xK_Igrave, -- U+00CC LATIN CAPITAL LETTER I WITH GRAVE +# else + -- Skipping xK_Igrave because your X doesn't define it +# endif +# ifdef XK_Iacute + xK_Iacute, -- U+00CD LATIN CAPITAL LETTER I WITH ACUTE +# else + -- Skipping xK_Iacute because your X doesn't define it +# endif +# ifdef XK_Icircumflex + xK_Icircumflex, -- U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX +# else + -- Skipping xK_Icircumflex because your X doesn't define it +# endif +# ifdef XK_Idiaeresis + xK_Idiaeresis, -- U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS +# else + -- Skipping xK_Idiaeresis because your X doesn't define it +# endif +# ifdef XK_ETH + xK_ETH, -- U+00D0 LATIN CAPITAL LETTER ETH +# else + -- Skipping xK_ETH because your X doesn't define it +# endif +# ifdef XK_Eth + xK_Eth, -- deprecated +# else + -- Skipping xK_Eth because your X doesn't define it +# endif +# ifdef XK_Ntilde + xK_Ntilde, -- U+00D1 LATIN CAPITAL LETTER N WITH TILDE +# else + -- Skipping xK_Ntilde because your X doesn't define it +# endif +# ifdef XK_Ograve + xK_Ograve, -- U+00D2 LATIN CAPITAL LETTER O WITH GRAVE +# else + -- Skipping xK_Ograve because your X doesn't define it +# endif +# ifdef XK_Oacute + xK_Oacute, -- U+00D3 LATIN CAPITAL LETTER O WITH ACUTE +# else + -- Skipping xK_Oacute because your X doesn't define it +# endif +# ifdef XK_Ocircumflex + xK_Ocircumflex, -- U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX +# else + -- Skipping xK_Ocircumflex because your X doesn't define it +# endif +# ifdef XK_Otilde + xK_Otilde, -- U+00D5 LATIN CAPITAL LETTER O WITH TILDE +# else + -- Skipping xK_Otilde because your X doesn't define it +# endif +# ifdef XK_Odiaeresis + xK_Odiaeresis, -- U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS +# else + -- Skipping xK_Odiaeresis because your X doesn't define it +# endif +# ifdef XK_multiply + xK_multiply, -- U+00D7 MULTIPLICATION SIGN +# else + -- Skipping xK_multiply because your X doesn't define it +# endif +# ifdef XK_Oslash + xK_Oslash, -- U+00D8 LATIN CAPITAL LETTER O WITH STROKE +# else + -- Skipping xK_Oslash because your X doesn't define it +# endif +# ifdef XK_Ooblique + xK_Ooblique, -- U+00D8 LATIN CAPITAL LETTER O WITH STROKE +# else + -- Skipping xK_Ooblique because your X doesn't define it +# endif +# ifdef XK_Ugrave + xK_Ugrave, -- U+00D9 LATIN CAPITAL LETTER U WITH GRAVE +# else + -- Skipping xK_Ugrave because your X doesn't define it +# endif +# ifdef XK_Uacute + xK_Uacute, -- U+00DA LATIN CAPITAL LETTER U WITH ACUTE +# else + -- Skipping xK_Uacute because your X doesn't define it +# endif +# ifdef XK_Ucircumflex + xK_Ucircumflex, -- U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX +# else + -- Skipping xK_Ucircumflex because your X doesn't define it +# endif +# ifdef XK_Udiaeresis + xK_Udiaeresis, -- U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS +# else + -- Skipping xK_Udiaeresis because your X doesn't define it +# endif +# ifdef XK_Yacute + xK_Yacute, -- U+00DD LATIN CAPITAL LETTER Y WITH ACUTE +# else + -- Skipping xK_Yacute because your X doesn't define it +# endif +# ifdef XK_THORN + xK_THORN, -- U+00DE LATIN CAPITAL LETTER THORN +# else + -- Skipping xK_THORN because your X doesn't define it +# endif +# ifdef XK_Thorn + xK_Thorn, -- deprecated +# else + -- Skipping xK_Thorn because your X doesn't define it +# endif +# ifdef XK_ssharp + xK_ssharp, -- U+00DF LATIN SMALL LETTER SHARP S +# else + -- Skipping xK_ssharp because your X doesn't define it +# endif +# ifdef XK_agrave + xK_agrave, -- U+00E0 LATIN SMALL LETTER A WITH GRAVE +# else + -- Skipping xK_agrave because your X doesn't define it +# endif +# ifdef XK_aacute + xK_aacute, -- U+00E1 LATIN SMALL LETTER A WITH ACUTE +# else + -- Skipping xK_aacute because your X doesn't define it +# endif +# ifdef XK_acircumflex + xK_acircumflex, -- U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX +# else + -- Skipping xK_acircumflex because your X doesn't define it +# endif +# ifdef XK_atilde + xK_atilde, -- U+00E3 LATIN SMALL LETTER A WITH TILDE +# else + -- Skipping xK_atilde because your X doesn't define it +# endif +# ifdef XK_adiaeresis + xK_adiaeresis, -- U+00E4 LATIN SMALL LETTER A WITH DIAERESIS +# else + -- Skipping xK_adiaeresis because your X doesn't define it +# endif +# ifdef XK_aring + xK_aring, -- U+00E5 LATIN SMALL LETTER A WITH RING ABOVE +# else + -- Skipping xK_aring because your X doesn't define it +# endif +# ifdef XK_ae + xK_ae, -- U+00E6 LATIN SMALL LETTER AE +# else + -- Skipping xK_ae because your X doesn't define it +# endif +# ifdef XK_ccedilla + xK_ccedilla, -- U+00E7 LATIN SMALL LETTER C WITH CEDILLA +# else + -- Skipping xK_ccedilla because your X doesn't define it +# endif +# ifdef XK_egrave + xK_egrave, -- U+00E8 LATIN SMALL LETTER E WITH GRAVE +# else + -- Skipping xK_egrave because your X doesn't define it +# endif +# ifdef XK_eacute + xK_eacute, -- U+00E9 LATIN SMALL LETTER E WITH ACUTE +# else + -- Skipping xK_eacute because your X doesn't define it +# endif +# ifdef XK_ecircumflex + xK_ecircumflex, -- U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX +# else + -- Skipping xK_ecircumflex because your X doesn't define it +# endif +# ifdef XK_ediaeresis + xK_ediaeresis, -- U+00EB LATIN SMALL LETTER E WITH DIAERESIS +# else + -- Skipping xK_ediaeresis because your X doesn't define it +# endif +# ifdef XK_igrave + xK_igrave, -- U+00EC LATIN SMALL LETTER I WITH GRAVE +# else + -- Skipping xK_igrave because your X doesn't define it +# endif +# ifdef XK_iacute + xK_iacute, -- U+00ED LATIN SMALL LETTER I WITH ACUTE +# else + -- Skipping xK_iacute because your X doesn't define it +# endif +# ifdef XK_icircumflex + xK_icircumflex, -- U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX +# else + -- Skipping xK_icircumflex because your X doesn't define it +# endif +# ifdef XK_idiaeresis + xK_idiaeresis, -- U+00EF LATIN SMALL LETTER I WITH DIAERESIS +# else + -- Skipping xK_idiaeresis because your X doesn't define it +# endif +# ifdef XK_eth + xK_eth, -- U+00F0 LATIN SMALL LETTER ETH +# else + -- Skipping xK_eth because your X doesn't define it +# endif +# ifdef XK_ntilde + xK_ntilde, -- U+00F1 LATIN SMALL LETTER N WITH TILDE +# else + -- Skipping xK_ntilde because your X doesn't define it +# endif +# ifdef XK_ograve + xK_ograve, -- U+00F2 LATIN SMALL LETTER O WITH GRAVE +# else + -- Skipping xK_ograve because your X doesn't define it +# endif +# ifdef XK_oacute + xK_oacute, -- U+00F3 LATIN SMALL LETTER O WITH ACUTE +# else + -- Skipping xK_oacute because your X doesn't define it +# endif +# ifdef XK_ocircumflex + xK_ocircumflex, -- U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX +# else + -- Skipping xK_ocircumflex because your X doesn't define it +# endif +# ifdef XK_otilde + xK_otilde, -- U+00F5 LATIN SMALL LETTER O WITH TILDE +# else + -- Skipping xK_otilde because your X doesn't define it +# endif +# ifdef XK_odiaeresis + xK_odiaeresis, -- U+00F6 LATIN SMALL LETTER O WITH DIAERESIS +# else + -- Skipping xK_odiaeresis because your X doesn't define it +# endif +# ifdef XK_division + xK_division, -- U+00F7 DIVISION SIGN +# else + -- Skipping xK_division because your X doesn't define it +# endif +# ifdef XK_oslash + xK_oslash, -- U+00F8 LATIN SMALL LETTER O WITH STROKE +# else + -- Skipping xK_oslash because your X doesn't define it +# endif +# ifdef XK_ooblique + xK_ooblique, -- U+00F8 LATIN SMALL LETTER O WITH STROKE +# else + -- Skipping xK_ooblique because your X doesn't define it +# endif +# ifdef XK_ugrave + xK_ugrave, -- U+00F9 LATIN SMALL LETTER U WITH GRAVE +# else + -- Skipping xK_ugrave because your X doesn't define it +# endif +# ifdef XK_uacute + xK_uacute, -- U+00FA LATIN SMALL LETTER U WITH ACUTE +# else + -- Skipping xK_uacute because your X doesn't define it +# endif +# ifdef XK_ucircumflex + xK_ucircumflex, -- U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX +# else + -- Skipping xK_ucircumflex because your X doesn't define it +# endif +# ifdef XK_udiaeresis + xK_udiaeresis, -- U+00FC LATIN SMALL LETTER U WITH DIAERESIS +# else + -- Skipping xK_udiaeresis because your X doesn't define it +# endif +# ifdef XK_yacute + xK_yacute, -- U+00FD LATIN SMALL LETTER Y WITH ACUTE +# else + -- Skipping xK_yacute because your X doesn't define it +# endif +# ifdef XK_thorn + xK_thorn, -- U+00FE LATIN SMALL LETTER THORN +# else + -- Skipping xK_thorn because your X doesn't define it +# endif +# ifdef XK_ydiaeresis + xK_ydiaeresis, -- U+00FF LATIN SMALL LETTER Y WITH DIAERESIS +# else + -- Skipping xK_ydiaeresis because your X doesn't define it +# endif +#endif + + -- XK_LATIN2 +#ifdef XK_Aogonek + xK_Aogonek, -- U+0104 LATIN CAPITAL LETTER A WITH OGONEK +#else + -- Skipping xK_Aogonek because your X doesn't define it +#endif +#ifdef XK_breve + xK_breve, -- U+02D8 BREVE +#else + -- Skipping xK_breve because your X doesn't define it +#endif +#ifdef XK_Lstroke + xK_Lstroke, -- U+0141 LATIN CAPITAL LETTER L WITH STROKE +#else + -- Skipping xK_Lstroke because your X doesn't define it +#endif +#ifdef XK_Lcaron + xK_Lcaron, -- U+013D LATIN CAPITAL LETTER L WITH CARON +#else + -- Skipping xK_Lcaron because your X doesn't define it +#endif +#ifdef XK_Sacute + xK_Sacute, -- U+015A LATIN CAPITAL LETTER S WITH ACUTE +#else + -- Skipping xK_Sacute because your X doesn't define it +#endif +#ifdef XK_Scaron + xK_Scaron, -- U+0160 LATIN CAPITAL LETTER S WITH CARON +#else + -- Skipping xK_Scaron because your X doesn't define it +#endif +#ifdef XK_Scedilla + xK_Scedilla, -- U+015E LATIN CAPITAL LETTER S WITH CEDILLA +#else + -- Skipping xK_Scedilla because your X doesn't define it +#endif +#ifdef XK_Tcaron + xK_Tcaron, -- U+0164 LATIN CAPITAL LETTER T WITH CARON +#else + -- Skipping xK_Tcaron because your X doesn't define it +#endif +#ifdef XK_Zacute + xK_Zacute, -- U+0179 LATIN CAPITAL LETTER Z WITH ACUTE +#else + -- Skipping xK_Zacute because your X doesn't define it +#endif +#ifdef XK_Zcaron + xK_Zcaron, -- U+017D LATIN CAPITAL LETTER Z WITH CARON +#else + -- Skipping xK_Zcaron because your X doesn't define it +#endif +#ifdef XK_Zabovedot + xK_Zabovedot, -- U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE +#else + -- Skipping xK_Zabovedot because your X doesn't define it +#endif +#ifdef XK_aogonek + xK_aogonek, -- U+0105 LATIN SMALL LETTER A WITH OGONEK +#else + -- Skipping xK_aogonek because your X doesn't define it +#endif +#ifdef XK_ogonek + xK_ogonek, -- U+02DB OGONEK +#else + -- Skipping xK_ogonek because your X doesn't define it +#endif +#ifdef XK_lstroke + xK_lstroke, -- U+0142 LATIN SMALL LETTER L WITH STROKE +#else + -- Skipping xK_lstroke because your X doesn't define it +#endif +#ifdef XK_lcaron + xK_lcaron, -- U+013E LATIN SMALL LETTER L WITH CARON +#else + -- Skipping xK_lcaron because your X doesn't define it +#endif +#ifdef XK_sacute + xK_sacute, -- U+015B LATIN SMALL LETTER S WITH ACUTE +#else + -- Skipping xK_sacute because your X doesn't define it +#endif +#ifdef XK_caron + xK_caron, -- U+02C7 CARON +#else + -- Skipping xK_caron because your X doesn't define it +#endif +#ifdef XK_scaron + xK_scaron, -- U+0161 LATIN SMALL LETTER S WITH CARON +#else + -- Skipping xK_scaron because your X doesn't define it +#endif +#ifdef XK_scedilla + xK_scedilla, -- U+015F LATIN SMALL LETTER S WITH CEDILLA +#else + -- Skipping xK_scedilla because your X doesn't define it +#endif +#ifdef XK_tcaron + xK_tcaron, -- U+0165 LATIN SMALL LETTER T WITH CARON +#else + -- Skipping xK_tcaron because your X doesn't define it +#endif +#ifdef XK_zacute + xK_zacute, -- U+017A LATIN SMALL LETTER Z WITH ACUTE +#else + -- Skipping xK_zacute because your X doesn't define it +#endif +#ifdef XK_doubleacute + xK_doubleacute, -- U+02DD DOUBLE ACUTE ACCENT +#else + -- Skipping xK_doubleacute because your X doesn't define it +#endif +#ifdef XK_zcaron + xK_zcaron, -- U+017E LATIN SMALL LETTER Z WITH CARON +#else + -- Skipping xK_zcaron because your X doesn't define it +#endif +#ifdef XK_zabovedot + xK_zabovedot, -- U+017C LATIN SMALL LETTER Z WITH DOT ABOVE +#else + -- Skipping xK_zabovedot because your X doesn't define it +#endif +#ifdef XK_Racute + xK_Racute, -- U+0154 LATIN CAPITAL LETTER R WITH ACUTE +#else + -- Skipping xK_Racute because your X doesn't define it +#endif +#ifdef XK_Abreve + xK_Abreve, -- U+0102 LATIN CAPITAL LETTER A WITH BREVE +#else + -- Skipping xK_Abreve because your X doesn't define it +#endif +#ifdef XK_Lacute + xK_Lacute, -- U+0139 LATIN CAPITAL LETTER L WITH ACUTE +#else + -- Skipping xK_Lacute because your X doesn't define it +#endif +#ifdef XK_Cacute + xK_Cacute, -- U+0106 LATIN CAPITAL LETTER C WITH ACUTE +#else + -- Skipping xK_Cacute because your X doesn't define it +#endif +#ifdef XK_Ccaron + xK_Ccaron, -- U+010C LATIN CAPITAL LETTER C WITH CARON +#else + -- Skipping xK_Ccaron because your X doesn't define it +#endif +#ifdef XK_Eogonek + xK_Eogonek, -- U+0118 LATIN CAPITAL LETTER E WITH OGONEK +#else + -- Skipping xK_Eogonek because your X doesn't define it +#endif +#ifdef XK_Ecaron + xK_Ecaron, -- U+011A LATIN CAPITAL LETTER E WITH CARON +#else + -- Skipping xK_Ecaron because your X doesn't define it +#endif +#ifdef XK_Dcaron + xK_Dcaron, -- U+010E LATIN CAPITAL LETTER D WITH CARON +#else + -- Skipping xK_Dcaron because your X doesn't define it +#endif +#ifdef XK_Dstroke + xK_Dstroke, -- U+0110 LATIN CAPITAL LETTER D WITH STROKE +#else + -- Skipping xK_Dstroke because your X doesn't define it +#endif +#ifdef XK_Nacute + xK_Nacute, -- U+0143 LATIN CAPITAL LETTER N WITH ACUTE +#else + -- Skipping xK_Nacute because your X doesn't define it +#endif +#ifdef XK_Ncaron + xK_Ncaron, -- U+0147 LATIN CAPITAL LETTER N WITH CARON +#else + -- Skipping xK_Ncaron because your X doesn't define it +#endif +#ifdef XK_Odoubleacute + xK_Odoubleacute, -- U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +#else + -- Skipping xK_Odoubleacute because your X doesn't define it +#endif +#ifdef XK_Rcaron + xK_Rcaron, -- U+0158 LATIN CAPITAL LETTER R WITH CARON +#else + -- Skipping xK_Rcaron because your X doesn't define it +#endif +#ifdef XK_Uring + xK_Uring, -- U+016E LATIN CAPITAL LETTER U WITH RING ABOVE +#else + -- Skipping xK_Uring because your X doesn't define it +#endif +#ifdef XK_Udoubleacute + xK_Udoubleacute, -- U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE +#else + -- Skipping xK_Udoubleacute because your X doesn't define it +#endif +#ifdef XK_Tcedilla + xK_Tcedilla, -- U+0162 LATIN CAPITAL LETTER T WITH CEDILLA +#else + -- Skipping xK_Tcedilla because your X doesn't define it +#endif +#ifdef XK_racute + xK_racute, -- U+0155 LATIN SMALL LETTER R WITH ACUTE +#else + -- Skipping xK_racute because your X doesn't define it +#endif +#ifdef XK_abreve + xK_abreve, -- U+0103 LATIN SMALL LETTER A WITH BREVE +#else + -- Skipping xK_abreve because your X doesn't define it +#endif +#ifdef XK_lacute + xK_lacute, -- U+013A LATIN SMALL LETTER L WITH ACUTE +#else + -- Skipping xK_lacute because your X doesn't define it +#endif +#ifdef XK_cacute + xK_cacute, -- U+0107 LATIN SMALL LETTER C WITH ACUTE +#else + -- Skipping xK_cacute because your X doesn't define it +#endif +#ifdef XK_ccaron + xK_ccaron, -- U+010D LATIN SMALL LETTER C WITH CARON +#else + -- Skipping xK_ccaron because your X doesn't define it +#endif +#ifdef XK_eogonek + xK_eogonek, -- U+0119 LATIN SMALL LETTER E WITH OGONEK +#else + -- Skipping xK_eogonek because your X doesn't define it +#endif +#ifdef XK_ecaron + xK_ecaron, -- U+011B LATIN SMALL LETTER E WITH CARON +#else + -- Skipping xK_ecaron because your X doesn't define it +#endif +#ifdef XK_dcaron + xK_dcaron, -- U+010F LATIN SMALL LETTER D WITH CARON +#else + -- Skipping xK_dcaron because your X doesn't define it +#endif +#ifdef XK_dstroke + xK_dstroke, -- U+0111 LATIN SMALL LETTER D WITH STROKE +#else + -- Skipping xK_dstroke because your X doesn't define it +#endif +#ifdef XK_nacute + xK_nacute, -- U+0144 LATIN SMALL LETTER N WITH ACUTE +#else + -- Skipping xK_nacute because your X doesn't define it +#endif +#ifdef XK_ncaron + xK_ncaron, -- U+0148 LATIN SMALL LETTER N WITH CARON +#else + -- Skipping xK_ncaron because your X doesn't define it +#endif +#ifdef XK_odoubleacute + xK_odoubleacute, -- U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE +#else + -- Skipping xK_odoubleacute because your X doesn't define it +#endif +#ifdef XK_udoubleacute + xK_udoubleacute, -- U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE +#else + -- Skipping xK_udoubleacute because your X doesn't define it +#endif +#ifdef XK_rcaron + xK_rcaron, -- U+0159 LATIN SMALL LETTER R WITH CARON +#else + -- Skipping xK_rcaron because your X doesn't define it +#endif +#ifdef XK_uring + xK_uring, -- U+016F LATIN SMALL LETTER U WITH RING ABOVE +#else + -- Skipping xK_uring because your X doesn't define it +#endif +#ifdef XK_tcedilla + xK_tcedilla, -- U+0163 LATIN SMALL LETTER T WITH CEDILLA +#else + -- Skipping xK_tcedilla because your X doesn't define it +#endif +#ifdef XK_abovedot + xK_abovedot, -- U+02D9 DOT ABOVE +#else + -- Skipping xK_abovedot because your X doesn't define it +#endif + + -- XK_LATIN3 +#ifdef XK_Hstroke + xK_Hstroke, -- U+0126 LATIN CAPITAL LETTER H WITH STROKE +#else + -- Skipping xK_Hstroke because your X doesn't define it +#endif +#ifdef XK_Hcircumflex + xK_Hcircumflex, -- U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX +#else + -- Skipping xK_Hcircumflex because your X doesn't define it +#endif +#ifdef XK_Iabovedot + xK_Iabovedot, -- U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE +#else + -- Skipping xK_Iabovedot because your X doesn't define it +#endif +#ifdef XK_Gbreve + xK_Gbreve, -- U+011E LATIN CAPITAL LETTER G WITH BREVE +#else + -- Skipping xK_Gbreve because your X doesn't define it +#endif +#ifdef XK_Jcircumflex + xK_Jcircumflex, -- U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX +#else + -- Skipping xK_Jcircumflex because your X doesn't define it +#endif +#ifdef XK_hstroke + xK_hstroke, -- U+0127 LATIN SMALL LETTER H WITH STROKE +#else + -- Skipping xK_hstroke because your X doesn't define it +#endif +#ifdef XK_hcircumflex + xK_hcircumflex, -- U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX +#else + -- Skipping xK_hcircumflex because your X doesn't define it +#endif +#ifdef XK_idotless + xK_idotless, -- U+0131 LATIN SMALL LETTER DOTLESS I +#else + -- Skipping xK_idotless because your X doesn't define it +#endif +#ifdef XK_gbreve + xK_gbreve, -- U+011F LATIN SMALL LETTER G WITH BREVE +#else + -- Skipping xK_gbreve because your X doesn't define it +#endif +#ifdef XK_jcircumflex + xK_jcircumflex, -- U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX +#else + -- Skipping xK_jcircumflex because your X doesn't define it +#endif +#ifdef XK_Cabovedot + xK_Cabovedot, -- U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE +#else + -- Skipping xK_Cabovedot because your X doesn't define it +#endif +#ifdef XK_Ccircumflex + xK_Ccircumflex, -- U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX +#else + -- Skipping xK_Ccircumflex because your X doesn't define it +#endif +#ifdef XK_Gabovedot + xK_Gabovedot, -- U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE +#else + -- Skipping xK_Gabovedot because your X doesn't define it +#endif +#ifdef XK_Gcircumflex + xK_Gcircumflex, -- U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX +#else + -- Skipping xK_Gcircumflex because your X doesn't define it +#endif +#ifdef XK_Ubreve + xK_Ubreve, -- U+016C LATIN CAPITAL LETTER U WITH BREVE +#else + -- Skipping xK_Ubreve because your X doesn't define it +#endif +#ifdef XK_Scircumflex + xK_Scircumflex, -- U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX +#else + -- Skipping xK_Scircumflex because your X doesn't define it +#endif +#ifdef XK_cabovedot + xK_cabovedot, -- U+010B LATIN SMALL LETTER C WITH DOT ABOVE +#else + -- Skipping xK_cabovedot because your X doesn't define it +#endif +#ifdef XK_ccircumflex + xK_ccircumflex, -- U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX +#else + -- Skipping xK_ccircumflex because your X doesn't define it +#endif +#ifdef XK_gabovedot + xK_gabovedot, -- U+0121 LATIN SMALL LETTER G WITH DOT ABOVE +#else + -- Skipping xK_gabovedot because your X doesn't define it +#endif +#ifdef XK_gcircumflex + xK_gcircumflex, -- U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX +#else + -- Skipping xK_gcircumflex because your X doesn't define it +#endif +#ifdef XK_ubreve + xK_ubreve, -- U+016D LATIN SMALL LETTER U WITH BREVE +#else + -- Skipping xK_ubreve because your X doesn't define it +#endif +#ifdef XK_scircumflex + xK_scircumflex, -- U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX +#else + -- Skipping xK_scircumflex because your X doesn't define it +#endif + + -- XK_LATIN4 +#ifdef XK_kra + xK_kra, -- U+0138 LATIN SMALL LETTER KRA +#else + -- Skipping xK_kra because your X doesn't define it +#endif +#ifdef XK_kappa + xK_kappa, -- deprecated +#else + -- Skipping xK_kappa because your X doesn't define it +#endif +#ifdef XK_Rcedilla + xK_Rcedilla, -- U+0156 LATIN CAPITAL LETTER R WITH CEDILLA +#else + -- Skipping xK_Rcedilla because your X doesn't define it +#endif +#ifdef XK_Itilde + xK_Itilde, -- U+0128 LATIN CAPITAL LETTER I WITH TILDE +#else + -- Skipping xK_Itilde because your X doesn't define it +#endif +#ifdef XK_Lcedilla + xK_Lcedilla, -- U+013B LATIN CAPITAL LETTER L WITH CEDILLA +#else + -- Skipping xK_Lcedilla because your X doesn't define it +#endif +#ifdef XK_Emacron + xK_Emacron, -- U+0112 LATIN CAPITAL LETTER E WITH MACRON +#else + -- Skipping xK_Emacron because your X doesn't define it +#endif +#ifdef XK_Gcedilla + xK_Gcedilla, -- U+0122 LATIN CAPITAL LETTER G WITH CEDILLA +#else + -- Skipping xK_Gcedilla because your X doesn't define it +#endif +#ifdef XK_Tslash + xK_Tslash, -- U+0166 LATIN CAPITAL LETTER T WITH STROKE +#else + -- Skipping xK_Tslash because your X doesn't define it +#endif +#ifdef XK_rcedilla + xK_rcedilla, -- U+0157 LATIN SMALL LETTER R WITH CEDILLA +#else + -- Skipping xK_rcedilla because your X doesn't define it +#endif +#ifdef XK_itilde + xK_itilde, -- U+0129 LATIN SMALL LETTER I WITH TILDE +#else + -- Skipping xK_itilde because your X doesn't define it +#endif +#ifdef XK_lcedilla + xK_lcedilla, -- U+013C LATIN SMALL LETTER L WITH CEDILLA +#else + -- Skipping xK_lcedilla because your X doesn't define it +#endif +#ifdef XK_emacron + xK_emacron, -- U+0113 LATIN SMALL LETTER E WITH MACRON +#else + -- Skipping xK_emacron because your X doesn't define it +#endif +#ifdef XK_gcedilla + xK_gcedilla, -- U+0123 LATIN SMALL LETTER G WITH CEDILLA +#else + -- Skipping xK_gcedilla because your X doesn't define it +#endif +#ifdef XK_tslash + xK_tslash, -- U+0167 LATIN SMALL LETTER T WITH STROKE +#else + -- Skipping xK_tslash because your X doesn't define it +#endif +#ifdef XK_ENG + xK_ENG, -- U+014A LATIN CAPITAL LETTER ENG +#else + -- Skipping xK_ENG because your X doesn't define it +#endif +#ifdef XK_eng + xK_eng, -- U+014B LATIN SMALL LETTER ENG +#else + -- Skipping xK_eng because your X doesn't define it +#endif +#ifdef XK_Amacron + xK_Amacron, -- U+0100 LATIN CAPITAL LETTER A WITH MACRON +#else + -- Skipping xK_Amacron because your X doesn't define it +#endif +#ifdef XK_Iogonek + xK_Iogonek, -- U+012E LATIN CAPITAL LETTER I WITH OGONEK +#else + -- Skipping xK_Iogonek because your X doesn't define it +#endif +#ifdef XK_Eabovedot + xK_Eabovedot, -- U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE +#else + -- Skipping xK_Eabovedot because your X doesn't define it +#endif +#ifdef XK_Imacron + xK_Imacron, -- U+012A LATIN CAPITAL LETTER I WITH MACRON +#else + -- Skipping xK_Imacron because your X doesn't define it +#endif +#ifdef XK_Ncedilla + xK_Ncedilla, -- U+0145 LATIN CAPITAL LETTER N WITH CEDILLA +#else + -- Skipping xK_Ncedilla because your X doesn't define it +#endif +#ifdef XK_Omacron + xK_Omacron, -- U+014C LATIN CAPITAL LETTER O WITH MACRON +#else + -- Skipping xK_Omacron because your X doesn't define it +#endif +#ifdef XK_Kcedilla + xK_Kcedilla, -- U+0136 LATIN CAPITAL LETTER K WITH CEDILLA +#else + -- Skipping xK_Kcedilla because your X doesn't define it +#endif +#ifdef XK_Uogonek + xK_Uogonek, -- U+0172 LATIN CAPITAL LETTER U WITH OGONEK +#else + -- Skipping xK_Uogonek because your X doesn't define it +#endif +#ifdef XK_Utilde + xK_Utilde, -- U+0168 LATIN CAPITAL LETTER U WITH TILDE +#else + -- Skipping xK_Utilde because your X doesn't define it +#endif +#ifdef XK_Umacron + xK_Umacron, -- U+016A LATIN CAPITAL LETTER U WITH MACRON +#else + -- Skipping xK_Umacron because your X doesn't define it +#endif +#ifdef XK_amacron + xK_amacron, -- U+0101 LATIN SMALL LETTER A WITH MACRON +#else + -- Skipping xK_amacron because your X doesn't define it +#endif +#ifdef XK_iogonek + xK_iogonek, -- U+012F LATIN SMALL LETTER I WITH OGONEK +#else + -- Skipping xK_iogonek because your X doesn't define it +#endif +#ifdef XK_eabovedot + xK_eabovedot, -- U+0117 LATIN SMALL LETTER E WITH DOT ABOVE +#else + -- Skipping xK_eabovedot because your X doesn't define it +#endif +#ifdef XK_imacron + xK_imacron, -- U+012B LATIN SMALL LETTER I WITH MACRON +#else + -- Skipping xK_imacron because your X doesn't define it +#endif +#ifdef XK_ncedilla + xK_ncedilla, -- U+0146 LATIN SMALL LETTER N WITH CEDILLA +#else + -- Skipping xK_ncedilla because your X doesn't define it +#endif +#ifdef XK_omacron + xK_omacron, -- U+014D LATIN SMALL LETTER O WITH MACRON +#else + -- Skipping xK_omacron because your X doesn't define it +#endif +#ifdef XK_kcedilla + xK_kcedilla, -- U+0137 LATIN SMALL LETTER K WITH CEDILLA +#else + -- Skipping xK_kcedilla because your X doesn't define it +#endif +#ifdef XK_uogonek + xK_uogonek, -- U+0173 LATIN SMALL LETTER U WITH OGONEK +#else + -- Skipping xK_uogonek because your X doesn't define it +#endif +#ifdef XK_utilde + xK_utilde, -- U+0169 LATIN SMALL LETTER U WITH TILDE +#else + -- Skipping xK_utilde because your X doesn't define it +#endif +#ifdef XK_umacron + xK_umacron, -- U+016B LATIN SMALL LETTER U WITH MACRON +#else + -- Skipping xK_umacron because your X doesn't define it +#endif + + -- XK_LATIN8 +#ifdef XK_Babovedot + xK_Babovedot, -- U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE +#else + -- Skipping xK_Babovedot because your X doesn't define it +#endif +#ifdef XK_babovedot + xK_babovedot, -- U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE +#else + -- Skipping xK_babovedot because your X doesn't define it +#endif +#ifdef XK_Dabovedot + xK_Dabovedot, -- U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE +#else + -- Skipping xK_Dabovedot because your X doesn't define it +#endif +#ifdef XK_Wgrave + xK_Wgrave, -- U+1E80 LATIN CAPITAL LETTER W WITH GRAVE +#else + -- Skipping xK_Wgrave because your X doesn't define it +#endif +#ifdef XK_Wacute + xK_Wacute, -- U+1E82 LATIN CAPITAL LETTER W WITH ACUTE +#else + -- Skipping xK_Wacute because your X doesn't define it +#endif +#ifdef XK_dabovedot + xK_dabovedot, -- U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE +#else + -- Skipping xK_dabovedot because your X doesn't define it +#endif +#ifdef XK_Ygrave + xK_Ygrave, -- U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE +#else + -- Skipping xK_Ygrave because your X doesn't define it +#endif +#ifdef XK_Fabovedot + xK_Fabovedot, -- U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE +#else + -- Skipping xK_Fabovedot because your X doesn't define it +#endif +#ifdef XK_fabovedot + xK_fabovedot, -- U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE +#else + -- Skipping xK_fabovedot because your X doesn't define it +#endif +#ifdef XK_Mabovedot + xK_Mabovedot, -- U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE +#else + -- Skipping xK_Mabovedot because your X doesn't define it +#endif +#ifdef XK_mabovedot + xK_mabovedot, -- U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE +#else + -- Skipping xK_mabovedot because your X doesn't define it +#endif +#ifdef XK_Pabovedot + xK_Pabovedot, -- U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE +#else + -- Skipping xK_Pabovedot because your X doesn't define it +#endif +#ifdef XK_wgrave + xK_wgrave, -- U+1E81 LATIN SMALL LETTER W WITH GRAVE +#else + -- Skipping xK_wgrave because your X doesn't define it +#endif +#ifdef XK_pabovedot + xK_pabovedot, -- U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE +#else + -- Skipping xK_pabovedot because your X doesn't define it +#endif +#ifdef XK_wacute + xK_wacute, -- U+1E83 LATIN SMALL LETTER W WITH ACUTE +#else + -- Skipping xK_wacute because your X doesn't define it +#endif +#ifdef XK_Sabovedot + xK_Sabovedot, -- U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE +#else + -- Skipping xK_Sabovedot because your X doesn't define it +#endif +#ifdef XK_ygrave + xK_ygrave, -- U+1EF3 LATIN SMALL LETTER Y WITH GRAVE +#else + -- Skipping xK_ygrave because your X doesn't define it +#endif +#ifdef XK_Wdiaeresis + xK_Wdiaeresis, -- U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS +#else + -- Skipping xK_Wdiaeresis because your X doesn't define it +#endif +#ifdef XK_wdiaeresis + xK_wdiaeresis, -- U+1E85 LATIN SMALL LETTER W WITH DIAERESIS +#else + -- Skipping xK_wdiaeresis because your X doesn't define it +#endif +#ifdef XK_sabovedot + xK_sabovedot, -- U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE +#else + -- Skipping xK_sabovedot because your X doesn't define it +#endif +#ifdef XK_Wcircumflex + xK_Wcircumflex, -- U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX +#else + -- Skipping xK_Wcircumflex because your X doesn't define it +#endif +#ifdef XK_Tabovedot + xK_Tabovedot, -- U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE +#else + -- Skipping xK_Tabovedot because your X doesn't define it +#endif +#ifdef XK_Ycircumflex + xK_Ycircumflex, -- U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX +#else + -- Skipping xK_Ycircumflex because your X doesn't define it +#endif +#ifdef XK_wcircumflex + xK_wcircumflex, -- U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX +#else + -- Skipping xK_wcircumflex because your X doesn't define it +#endif +#ifdef XK_tabovedot + xK_tabovedot, -- U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE +#else + -- Skipping xK_tabovedot because your X doesn't define it +#endif +#ifdef XK_ycircumflex + xK_ycircumflex, -- U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX +#else + -- Skipping xK_ycircumflex because your X doesn't define it +#endif + + -- XK_LATIN9 +#ifdef XK_OE + xK_OE, -- U+0152 LATIN CAPITAL LIGATURE OE +#else + -- Skipping xK_OE because your X doesn't define it +#endif +#ifdef XK_oe + xK_oe, -- U+0153 LATIN SMALL LIGATURE OE +#else + -- Skipping xK_oe because your X doesn't define it +#endif +#ifdef XK_Ydiaeresis + xK_Ydiaeresis, -- U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS +#else + -- Skipping xK_Ydiaeresis because your X doesn't define it +#endif + + -- XK_KATAKANA +#ifdef XK_overline + xK_overline, -- U+203E OVERLINE +#else + -- Skipping xK_overline because your X doesn't define it +#endif +#ifdef XK_kana_fullstop + xK_kana_fullstop, -- U+3002 IDEOGRAPHIC FULL STOP +#else + -- Skipping xK_kana_fullstop because your X doesn't define it +#endif +#ifdef XK_kana_openingbracket + xK_kana_openingbracket, -- U+300C LEFT CORNER BRACKET +#else + -- Skipping xK_kana_openingbracket because your X doesn't define it +#endif +#ifdef XK_kana_closingbracket + xK_kana_closingbracket, -- U+300D RIGHT CORNER BRACKET +#else + -- Skipping xK_kana_closingbracket because your X doesn't define it +#endif +#ifdef XK_kana_comma + xK_kana_comma, -- U+3001 IDEOGRAPHIC COMMA +#else + -- Skipping xK_kana_comma because your X doesn't define it +#endif +#ifdef XK_kana_conjunctive + xK_kana_conjunctive, -- U+30FB KATAKANA MIDDLE DOT +#else + -- Skipping xK_kana_conjunctive because your X doesn't define it +#endif +#ifdef XK_kana_middledot + xK_kana_middledot, -- deprecated +#else + -- Skipping xK_kana_middledot because your X doesn't define it +#endif +#ifdef XK_kana_WO + xK_kana_WO, -- U+30F2 KATAKANA LETTER WO +#else + -- Skipping xK_kana_WO because your X doesn't define it +#endif +#ifdef XK_kana_a + xK_kana_a, -- U+30A1 KATAKANA LETTER SMALL A +#else + -- Skipping xK_kana_a because your X doesn't define it +#endif +#ifdef XK_kana_i + xK_kana_i, -- U+30A3 KATAKANA LETTER SMALL I +#else + -- Skipping xK_kana_i because your X doesn't define it +#endif +#ifdef XK_kana_u + xK_kana_u, -- U+30A5 KATAKANA LETTER SMALL U +#else + -- Skipping xK_kana_u because your X doesn't define it +#endif +#ifdef XK_kana_e + xK_kana_e, -- U+30A7 KATAKANA LETTER SMALL E +#else + -- Skipping xK_kana_e because your X doesn't define it +#endif +#ifdef XK_kana_o + xK_kana_o, -- U+30A9 KATAKANA LETTER SMALL O +#else + -- Skipping xK_kana_o because your X doesn't define it +#endif +#ifdef XK_kana_ya + xK_kana_ya, -- U+30E3 KATAKANA LETTER SMALL YA +#else + -- Skipping xK_kana_ya because your X doesn't define it +#endif +#ifdef XK_kana_yu + xK_kana_yu, -- U+30E5 KATAKANA LETTER SMALL YU +#else + -- Skipping xK_kana_yu because your X doesn't define it +#endif +#ifdef XK_kana_yo + xK_kana_yo, -- U+30E7 KATAKANA LETTER SMALL YO +#else + -- Skipping xK_kana_yo because your X doesn't define it +#endif +#ifdef XK_kana_tsu + xK_kana_tsu, -- U+30C3 KATAKANA LETTER SMALL TU +#else + -- Skipping xK_kana_tsu because your X doesn't define it +#endif +#ifdef XK_kana_tu + xK_kana_tu, -- deprecated +#else + -- Skipping xK_kana_tu because your X doesn't define it +#endif +#ifdef XK_prolongedsound + xK_prolongedsound, -- U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK +#else + -- Skipping xK_prolongedsound because your X doesn't define it +#endif +#ifdef XK_kana_A + xK_kana_A, -- U+30A2 KATAKANA LETTER A +#else + -- Skipping xK_kana_A because your X doesn't define it +#endif +#ifdef XK_kana_I + xK_kana_I, -- U+30A4 KATAKANA LETTER I +#else + -- Skipping xK_kana_I because your X doesn't define it +#endif +#ifdef XK_kana_U + xK_kana_U, -- U+30A6 KATAKANA LETTER U +#else + -- Skipping xK_kana_U because your X doesn't define it +#endif +#ifdef XK_kana_E + xK_kana_E, -- U+30A8 KATAKANA LETTER E +#else + -- Skipping xK_kana_E because your X doesn't define it +#endif +#ifdef XK_kana_O + xK_kana_O, -- U+30AA KATAKANA LETTER O +#else + -- Skipping xK_kana_O because your X doesn't define it +#endif +#ifdef XK_kana_KA + xK_kana_KA, -- U+30AB KATAKANA LETTER KA +#else + -- Skipping xK_kana_KA because your X doesn't define it +#endif +#ifdef XK_kana_KI + xK_kana_KI, -- U+30AD KATAKANA LETTER KI +#else + -- Skipping xK_kana_KI because your X doesn't define it +#endif +#ifdef XK_kana_KU + xK_kana_KU, -- U+30AF KATAKANA LETTER KU +#else + -- Skipping xK_kana_KU because your X doesn't define it +#endif +#ifdef XK_kana_KE + xK_kana_KE, -- U+30B1 KATAKANA LETTER KE +#else + -- Skipping xK_kana_KE because your X doesn't define it +#endif +#ifdef XK_kana_KO + xK_kana_KO, -- U+30B3 KATAKANA LETTER KO +#else + -- Skipping xK_kana_KO because your X doesn't define it +#endif +#ifdef XK_kana_SA + xK_kana_SA, -- U+30B5 KATAKANA LETTER SA +#else + -- Skipping xK_kana_SA because your X doesn't define it +#endif +#ifdef XK_kana_SHI + xK_kana_SHI, -- U+30B7 KATAKANA LETTER SI +#else + -- Skipping xK_kana_SHI because your X doesn't define it +#endif +#ifdef XK_kana_SU + xK_kana_SU, -- U+30B9 KATAKANA LETTER SU +#else + -- Skipping xK_kana_SU because your X doesn't define it +#endif +#ifdef XK_kana_SE + xK_kana_SE, -- U+30BB KATAKANA LETTER SE +#else + -- Skipping xK_kana_SE because your X doesn't define it +#endif +#ifdef XK_kana_SO + xK_kana_SO, -- U+30BD KATAKANA LETTER SO +#else + -- Skipping xK_kana_SO because your X doesn't define it +#endif +#ifdef XK_kana_TA + xK_kana_TA, -- U+30BF KATAKANA LETTER TA +#else + -- Skipping xK_kana_TA because your X doesn't define it +#endif +#ifdef XK_kana_CHI + xK_kana_CHI, -- U+30C1 KATAKANA LETTER TI +#else + -- Skipping xK_kana_CHI because your X doesn't define it +#endif +#ifdef XK_kana_TI + xK_kana_TI, -- deprecated +#else + -- Skipping xK_kana_TI because your X doesn't define it +#endif +#ifdef XK_kana_TSU + xK_kana_TSU, -- U+30C4 KATAKANA LETTER TU +#else + -- Skipping xK_kana_TSU because your X doesn't define it +#endif +#ifdef XK_kana_TU + xK_kana_TU, -- deprecated +#else + -- Skipping xK_kana_TU because your X doesn't define it +#endif +#ifdef XK_kana_TE + xK_kana_TE, -- U+30C6 KATAKANA LETTER TE +#else + -- Skipping xK_kana_TE because your X doesn't define it +#endif +#ifdef XK_kana_TO + xK_kana_TO, -- U+30C8 KATAKANA LETTER TO +#else + -- Skipping xK_kana_TO because your X doesn't define it +#endif +#ifdef XK_kana_NA + xK_kana_NA, -- U+30CA KATAKANA LETTER NA +#else + -- Skipping xK_kana_NA because your X doesn't define it +#endif +#ifdef XK_kana_NI + xK_kana_NI, -- U+30CB KATAKANA LETTER NI +#else + -- Skipping xK_kana_NI because your X doesn't define it +#endif +#ifdef XK_kana_NU + xK_kana_NU, -- U+30CC KATAKANA LETTER NU +#else + -- Skipping xK_kana_NU because your X doesn't define it +#endif +#ifdef XK_kana_NE + xK_kana_NE, -- U+30CD KATAKANA LETTER NE +#else + -- Skipping xK_kana_NE because your X doesn't define it +#endif +#ifdef XK_kana_NO + xK_kana_NO, -- U+30CE KATAKANA LETTER NO +#else + -- Skipping xK_kana_NO because your X doesn't define it +#endif +#ifdef XK_kana_HA + xK_kana_HA, -- U+30CF KATAKANA LETTER HA +#else + -- Skipping xK_kana_HA because your X doesn't define it +#endif +#ifdef XK_kana_HI + xK_kana_HI, -- U+30D2 KATAKANA LETTER HI +#else + -- Skipping xK_kana_HI because your X doesn't define it +#endif +#ifdef XK_kana_FU + xK_kana_FU, -- U+30D5 KATAKANA LETTER HU +#else + -- Skipping xK_kana_FU because your X doesn't define it +#endif +#ifdef XK_kana_HU + xK_kana_HU, -- deprecated +#else + -- Skipping xK_kana_HU because your X doesn't define it +#endif +#ifdef XK_kana_HE + xK_kana_HE, -- U+30D8 KATAKANA LETTER HE +#else + -- Skipping xK_kana_HE because your X doesn't define it +#endif +#ifdef XK_kana_HO + xK_kana_HO, -- U+30DB KATAKANA LETTER HO +#else + -- Skipping xK_kana_HO because your X doesn't define it +#endif +#ifdef XK_kana_MA + xK_kana_MA, -- U+30DE KATAKANA LETTER MA +#else + -- Skipping xK_kana_MA because your X doesn't define it +#endif +#ifdef XK_kana_MI + xK_kana_MI, -- U+30DF KATAKANA LETTER MI +#else + -- Skipping xK_kana_MI because your X doesn't define it +#endif +#ifdef XK_kana_MU + xK_kana_MU, -- U+30E0 KATAKANA LETTER MU +#else + -- Skipping xK_kana_MU because your X doesn't define it +#endif +#ifdef XK_kana_ME + xK_kana_ME, -- U+30E1 KATAKANA LETTER ME +#else + -- Skipping xK_kana_ME because your X doesn't define it +#endif +#ifdef XK_kana_MO + xK_kana_MO, -- U+30E2 KATAKANA LETTER MO +#else + -- Skipping xK_kana_MO because your X doesn't define it +#endif +#ifdef XK_kana_YA + xK_kana_YA, -- U+30E4 KATAKANA LETTER YA +#else + -- Skipping xK_kana_YA because your X doesn't define it +#endif +#ifdef XK_kana_YU + xK_kana_YU, -- U+30E6 KATAKANA LETTER YU +#else + -- Skipping xK_kana_YU because your X doesn't define it +#endif +#ifdef XK_kana_YO + xK_kana_YO, -- U+30E8 KATAKANA LETTER YO +#else + -- Skipping xK_kana_YO because your X doesn't define it +#endif +#ifdef XK_kana_RA + xK_kana_RA, -- U+30E9 KATAKANA LETTER RA +#else + -- Skipping xK_kana_RA because your X doesn't define it +#endif +#ifdef XK_kana_RI + xK_kana_RI, -- U+30EA KATAKANA LETTER RI +#else + -- Skipping xK_kana_RI because your X doesn't define it +#endif +#ifdef XK_kana_RU + xK_kana_RU, -- U+30EB KATAKANA LETTER RU +#else + -- Skipping xK_kana_RU because your X doesn't define it +#endif +#ifdef XK_kana_RE + xK_kana_RE, -- U+30EC KATAKANA LETTER RE +#else + -- Skipping xK_kana_RE because your X doesn't define it +#endif +#ifdef XK_kana_RO + xK_kana_RO, -- U+30ED KATAKANA LETTER RO +#else + -- Skipping xK_kana_RO because your X doesn't define it +#endif +#ifdef XK_kana_WA + xK_kana_WA, -- U+30EF KATAKANA LETTER WA +#else + -- Skipping xK_kana_WA because your X doesn't define it +#endif +#ifdef XK_kana_N + xK_kana_N, -- U+30F3 KATAKANA LETTER N +#else + -- Skipping xK_kana_N because your X doesn't define it +#endif +#ifdef XK_voicedsound + xK_voicedsound, -- U+309B KATAKANA-HIRAGANA VOICED SOUND MARK +#else + -- Skipping xK_voicedsound because your X doesn't define it +#endif +#ifdef XK_semivoicedsound + xK_semivoicedsound, -- U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK +#else + -- Skipping xK_semivoicedsound because your X doesn't define it +#endif +#ifdef XK_kana_switch + xK_kana_switch, -- Alias for mode_switch +#else + -- Skipping xK_kana_switch because your X doesn't define it +#endif + + -- XK_ARABIC +#ifdef XK_Farsi_0 + xK_Farsi_0, -- U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO +#else + -- Skipping xK_Farsi_0 because your X doesn't define it +#endif +#ifdef XK_Farsi_1 + xK_Farsi_1, -- U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE +#else + -- Skipping xK_Farsi_1 because your X doesn't define it +#endif +#ifdef XK_Farsi_2 + xK_Farsi_2, -- U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO +#else + -- Skipping xK_Farsi_2 because your X doesn't define it +#endif +#ifdef XK_Farsi_3 + xK_Farsi_3, -- U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE +#else + -- Skipping xK_Farsi_3 because your X doesn't define it +#endif +#ifdef XK_Farsi_4 + xK_Farsi_4, -- U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR +#else + -- Skipping xK_Farsi_4 because your X doesn't define it +#endif +#ifdef XK_Farsi_5 + xK_Farsi_5, -- U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE +#else + -- Skipping xK_Farsi_5 because your X doesn't define it +#endif +#ifdef XK_Farsi_6 + xK_Farsi_6, -- U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX +#else + -- Skipping xK_Farsi_6 because your X doesn't define it +#endif +#ifdef XK_Farsi_7 + xK_Farsi_7, -- U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN +#else + -- Skipping xK_Farsi_7 because your X doesn't define it +#endif +#ifdef XK_Farsi_8 + xK_Farsi_8, -- U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT +#else + -- Skipping xK_Farsi_8 because your X doesn't define it +#endif +#ifdef XK_Farsi_9 + xK_Farsi_9, -- U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE +#else + -- Skipping xK_Farsi_9 because your X doesn't define it +#endif +#ifdef XK_Arabic_percent + xK_Arabic_percent, -- U+066A ARABIC PERCENT SIGN +#else + -- Skipping xK_Arabic_percent because your X doesn't define it +#endif +#ifdef XK_Arabic_superscript_alef + xK_Arabic_superscript_alef, -- U+0670 ARABIC LETTER SUPERSCRIPT ALEF +#else + -- Skipping xK_Arabic_superscript_alef because your X doesn't define it +#endif +#ifdef XK_Arabic_tteh + xK_Arabic_tteh, -- U+0679 ARABIC LETTER TTEH +#else + -- Skipping xK_Arabic_tteh because your X doesn't define it +#endif +#ifdef XK_Arabic_peh + xK_Arabic_peh, -- U+067E ARABIC LETTER PEH +#else + -- Skipping xK_Arabic_peh because your X doesn't define it +#endif +#ifdef XK_Arabic_tcheh + xK_Arabic_tcheh, -- U+0686 ARABIC LETTER TCHEH +#else + -- Skipping xK_Arabic_tcheh because your X doesn't define it +#endif +#ifdef XK_Arabic_ddal + xK_Arabic_ddal, -- U+0688 ARABIC LETTER DDAL +#else + -- Skipping xK_Arabic_ddal because your X doesn't define it +#endif +#ifdef XK_Arabic_rreh + xK_Arabic_rreh, -- U+0691 ARABIC LETTER RREH +#else + -- Skipping xK_Arabic_rreh because your X doesn't define it +#endif +#ifdef XK_Arabic_comma + xK_Arabic_comma, -- U+060C ARABIC COMMA +#else + -- Skipping xK_Arabic_comma because your X doesn't define it +#endif +#ifdef XK_Arabic_fullstop + xK_Arabic_fullstop, -- U+06D4 ARABIC FULL STOP +#else + -- Skipping xK_Arabic_fullstop because your X doesn't define it +#endif +#ifdef XK_Arabic_0 + xK_Arabic_0, -- U+0660 ARABIC-INDIC DIGIT ZERO +#else + -- Skipping xK_Arabic_0 because your X doesn't define it +#endif +#ifdef XK_Arabic_1 + xK_Arabic_1, -- U+0661 ARABIC-INDIC DIGIT ONE +#else + -- Skipping xK_Arabic_1 because your X doesn't define it +#endif +#ifdef XK_Arabic_2 + xK_Arabic_2, -- U+0662 ARABIC-INDIC DIGIT TWO +#else + -- Skipping xK_Arabic_2 because your X doesn't define it +#endif +#ifdef XK_Arabic_3 + xK_Arabic_3, -- U+0663 ARABIC-INDIC DIGIT THREE +#else + -- Skipping xK_Arabic_3 because your X doesn't define it +#endif +#ifdef XK_Arabic_4 + xK_Arabic_4, -- U+0664 ARABIC-INDIC DIGIT FOUR +#else + -- Skipping xK_Arabic_4 because your X doesn't define it +#endif +#ifdef XK_Arabic_5 + xK_Arabic_5, -- U+0665 ARABIC-INDIC DIGIT FIVE +#else + -- Skipping xK_Arabic_5 because your X doesn't define it +#endif +#ifdef XK_Arabic_6 + xK_Arabic_6, -- U+0666 ARABIC-INDIC DIGIT SIX +#else + -- Skipping xK_Arabic_6 because your X doesn't define it +#endif +#ifdef XK_Arabic_7 + xK_Arabic_7, -- U+0667 ARABIC-INDIC DIGIT SEVEN +#else + -- Skipping xK_Arabic_7 because your X doesn't define it +#endif +#ifdef XK_Arabic_8 + xK_Arabic_8, -- U+0668 ARABIC-INDIC DIGIT EIGHT +#else + -- Skipping xK_Arabic_8 because your X doesn't define it +#endif +#ifdef XK_Arabic_9 + xK_Arabic_9, -- U+0669 ARABIC-INDIC DIGIT NINE +#else + -- Skipping xK_Arabic_9 because your X doesn't define it +#endif +#ifdef XK_Arabic_semicolon + xK_Arabic_semicolon, -- U+061B ARABIC SEMICOLON +#else + -- Skipping xK_Arabic_semicolon because your X doesn't define it +#endif +#ifdef XK_Arabic_question_mark + xK_Arabic_question_mark, -- U+061F ARABIC QUESTION MARK +#else + -- Skipping xK_Arabic_question_mark because your X doesn't define it +#endif +#ifdef XK_Arabic_hamza + xK_Arabic_hamza, -- U+0621 ARABIC LETTER HAMZA +#else + -- Skipping xK_Arabic_hamza because your X doesn't define it +#endif +#ifdef XK_Arabic_maddaonalef + xK_Arabic_maddaonalef, -- U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE +#else + -- Skipping xK_Arabic_maddaonalef because your X doesn't define it +#endif +#ifdef XK_Arabic_hamzaonalef + xK_Arabic_hamzaonalef, -- U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE +#else + -- Skipping xK_Arabic_hamzaonalef because your X doesn't define it +#endif +#ifdef XK_Arabic_hamzaonwaw + xK_Arabic_hamzaonwaw, -- U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE +#else + -- Skipping xK_Arabic_hamzaonwaw because your X doesn't define it +#endif +#ifdef XK_Arabic_hamzaunderalef + xK_Arabic_hamzaunderalef, -- U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW +#else + -- Skipping xK_Arabic_hamzaunderalef because your X doesn't define it +#endif +#ifdef XK_Arabic_hamzaonyeh + xK_Arabic_hamzaonyeh, -- U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE +#else + -- Skipping xK_Arabic_hamzaonyeh because your X doesn't define it +#endif +#ifdef XK_Arabic_alef + xK_Arabic_alef, -- U+0627 ARABIC LETTER ALEF +#else + -- Skipping xK_Arabic_alef because your X doesn't define it +#endif +#ifdef XK_Arabic_beh + xK_Arabic_beh, -- U+0628 ARABIC LETTER BEH +#else + -- Skipping xK_Arabic_beh because your X doesn't define it +#endif +#ifdef XK_Arabic_tehmarbuta + xK_Arabic_tehmarbuta, -- U+0629 ARABIC LETTER TEH MARBUTA +#else + -- Skipping xK_Arabic_tehmarbuta because your X doesn't define it +#endif +#ifdef XK_Arabic_teh + xK_Arabic_teh, -- U+062A ARABIC LETTER TEH +#else + -- Skipping xK_Arabic_teh because your X doesn't define it +#endif +#ifdef XK_Arabic_theh + xK_Arabic_theh, -- U+062B ARABIC LETTER THEH +#else + -- Skipping xK_Arabic_theh because your X doesn't define it +#endif +#ifdef XK_Arabic_jeem + xK_Arabic_jeem, -- U+062C ARABIC LETTER JEEM +#else + -- Skipping xK_Arabic_jeem because your X doesn't define it +#endif +#ifdef XK_Arabic_hah + xK_Arabic_hah, -- U+062D ARABIC LETTER HAH +#else + -- Skipping xK_Arabic_hah because your X doesn't define it +#endif +#ifdef XK_Arabic_khah + xK_Arabic_khah, -- U+062E ARABIC LETTER KHAH +#else + -- Skipping xK_Arabic_khah because your X doesn't define it +#endif +#ifdef XK_Arabic_dal + xK_Arabic_dal, -- U+062F ARABIC LETTER DAL +#else + -- Skipping xK_Arabic_dal because your X doesn't define it +#endif +#ifdef XK_Arabic_thal + xK_Arabic_thal, -- U+0630 ARABIC LETTER THAL +#else + -- Skipping xK_Arabic_thal because your X doesn't define it +#endif +#ifdef XK_Arabic_ra + xK_Arabic_ra, -- U+0631 ARABIC LETTER REH +#else + -- Skipping xK_Arabic_ra because your X doesn't define it +#endif +#ifdef XK_Arabic_zain + xK_Arabic_zain, -- U+0632 ARABIC LETTER ZAIN +#else + -- Skipping xK_Arabic_zain because your X doesn't define it +#endif +#ifdef XK_Arabic_seen + xK_Arabic_seen, -- U+0633 ARABIC LETTER SEEN +#else + -- Skipping xK_Arabic_seen because your X doesn't define it +#endif +#ifdef XK_Arabic_sheen + xK_Arabic_sheen, -- U+0634 ARABIC LETTER SHEEN +#else + -- Skipping xK_Arabic_sheen because your X doesn't define it +#endif +#ifdef XK_Arabic_sad + xK_Arabic_sad, -- U+0635 ARABIC LETTER SAD +#else + -- Skipping xK_Arabic_sad because your X doesn't define it +#endif +#ifdef XK_Arabic_dad + xK_Arabic_dad, -- U+0636 ARABIC LETTER DAD +#else + -- Skipping xK_Arabic_dad because your X doesn't define it +#endif +#ifdef XK_Arabic_tah + xK_Arabic_tah, -- U+0637 ARABIC LETTER TAH +#else + -- Skipping xK_Arabic_tah because your X doesn't define it +#endif +#ifdef XK_Arabic_zah + xK_Arabic_zah, -- U+0638 ARABIC LETTER ZAH +#else + -- Skipping xK_Arabic_zah because your X doesn't define it +#endif +#ifdef XK_Arabic_ain + xK_Arabic_ain, -- U+0639 ARABIC LETTER AIN +#else + -- Skipping xK_Arabic_ain because your X doesn't define it +#endif +#ifdef XK_Arabic_ghain + xK_Arabic_ghain, -- U+063A ARABIC LETTER GHAIN +#else + -- Skipping xK_Arabic_ghain because your X doesn't define it +#endif +#ifdef XK_Arabic_tatweel + xK_Arabic_tatweel, -- U+0640 ARABIC TATWEEL +#else + -- Skipping xK_Arabic_tatweel because your X doesn't define it +#endif +#ifdef XK_Arabic_feh + xK_Arabic_feh, -- U+0641 ARABIC LETTER FEH +#else + -- Skipping xK_Arabic_feh because your X doesn't define it +#endif +#ifdef XK_Arabic_qaf + xK_Arabic_qaf, -- U+0642 ARABIC LETTER QAF +#else + -- Skipping xK_Arabic_qaf because your X doesn't define it +#endif +#ifdef XK_Arabic_kaf + xK_Arabic_kaf, -- U+0643 ARABIC LETTER KAF +#else + -- Skipping xK_Arabic_kaf because your X doesn't define it +#endif +#ifdef XK_Arabic_lam + xK_Arabic_lam, -- U+0644 ARABIC LETTER LAM +#else + -- Skipping xK_Arabic_lam because your X doesn't define it +#endif +#ifdef XK_Arabic_meem + xK_Arabic_meem, -- U+0645 ARABIC LETTER MEEM +#else + -- Skipping xK_Arabic_meem because your X doesn't define it +#endif +#ifdef XK_Arabic_noon + xK_Arabic_noon, -- U+0646 ARABIC LETTER NOON +#else + -- Skipping xK_Arabic_noon because your X doesn't define it +#endif +#ifdef XK_Arabic_ha + xK_Arabic_ha, -- U+0647 ARABIC LETTER HEH +#else + -- Skipping xK_Arabic_ha because your X doesn't define it +#endif +#ifdef XK_Arabic_heh + xK_Arabic_heh, -- deprecated +#else + -- Skipping xK_Arabic_heh because your X doesn't define it +#endif +#ifdef XK_Arabic_waw + xK_Arabic_waw, -- U+0648 ARABIC LETTER WAW +#else + -- Skipping xK_Arabic_waw because your X doesn't define it +#endif +#ifdef XK_Arabic_alefmaksura + xK_Arabic_alefmaksura, -- U+0649 ARABIC LETTER ALEF MAKSURA +#else + -- Skipping xK_Arabic_alefmaksura because your X doesn't define it +#endif +#ifdef XK_Arabic_yeh + xK_Arabic_yeh, -- U+064A ARABIC LETTER YEH +#else + -- Skipping xK_Arabic_yeh because your X doesn't define it +#endif +#ifdef XK_Arabic_fathatan + xK_Arabic_fathatan, -- U+064B ARABIC FATHATAN +#else + -- Skipping xK_Arabic_fathatan because your X doesn't define it +#endif +#ifdef XK_Arabic_dammatan + xK_Arabic_dammatan, -- U+064C ARABIC DAMMATAN +#else + -- Skipping xK_Arabic_dammatan because your X doesn't define it +#endif +#ifdef XK_Arabic_kasratan + xK_Arabic_kasratan, -- U+064D ARABIC KASRATAN +#else + -- Skipping xK_Arabic_kasratan because your X doesn't define it +#endif +#ifdef XK_Arabic_fatha + xK_Arabic_fatha, -- U+064E ARABIC FATHA +#else + -- Skipping xK_Arabic_fatha because your X doesn't define it +#endif +#ifdef XK_Arabic_damma + xK_Arabic_damma, -- U+064F ARABIC DAMMA +#else + -- Skipping xK_Arabic_damma because your X doesn't define it +#endif +#ifdef XK_Arabic_kasra + xK_Arabic_kasra, -- U+0650 ARABIC KASRA +#else + -- Skipping xK_Arabic_kasra because your X doesn't define it +#endif +#ifdef XK_Arabic_shadda + xK_Arabic_shadda, -- U+0651 ARABIC SHADDA +#else + -- Skipping xK_Arabic_shadda because your X doesn't define it +#endif +#ifdef XK_Arabic_sukun + xK_Arabic_sukun, -- U+0652 ARABIC SUKUN +#else + -- Skipping xK_Arabic_sukun because your X doesn't define it +#endif +#ifdef XK_Arabic_madda_above + xK_Arabic_madda_above, -- U+0653 ARABIC MADDAH ABOVE +#else + -- Skipping xK_Arabic_madda_above because your X doesn't define it +#endif +#ifdef XK_Arabic_hamza_above + xK_Arabic_hamza_above, -- U+0654 ARABIC HAMZA ABOVE +#else + -- Skipping xK_Arabic_hamza_above because your X doesn't define it +#endif +#ifdef XK_Arabic_hamza_below + xK_Arabic_hamza_below, -- U+0655 ARABIC HAMZA BELOW +#else + -- Skipping xK_Arabic_hamza_below because your X doesn't define it +#endif +#ifdef XK_Arabic_jeh + xK_Arabic_jeh, -- U+0698 ARABIC LETTER JEH +#else + -- Skipping xK_Arabic_jeh because your X doesn't define it +#endif +#ifdef XK_Arabic_veh + xK_Arabic_veh, -- U+06A4 ARABIC LETTER VEH +#else + -- Skipping xK_Arabic_veh because your X doesn't define it +#endif +#ifdef XK_Arabic_keheh + xK_Arabic_keheh, -- U+06A9 ARABIC LETTER KEHEH +#else + -- Skipping xK_Arabic_keheh because your X doesn't define it +#endif +#ifdef XK_Arabic_gaf + xK_Arabic_gaf, -- U+06AF ARABIC LETTER GAF +#else + -- Skipping xK_Arabic_gaf because your X doesn't define it +#endif +#ifdef XK_Arabic_noon_ghunna + xK_Arabic_noon_ghunna, -- U+06BA ARABIC LETTER NOON GHUNNA +#else + -- Skipping xK_Arabic_noon_ghunna because your X doesn't define it +#endif +#ifdef XK_Arabic_heh_doachashmee + xK_Arabic_heh_doachashmee, -- U+06BE ARABIC LETTER HEH DOACHASHMEE +#else + -- Skipping xK_Arabic_heh_doachashmee because your X doesn't define it +#endif +#ifdef XK_Farsi_yeh + xK_Farsi_yeh, -- U+06CC ARABIC LETTER FARSI YEH +#else + -- Skipping xK_Farsi_yeh because your X doesn't define it +#endif +#ifdef XK_Arabic_farsi_yeh + xK_Arabic_farsi_yeh, -- U+06CC ARABIC LETTER FARSI YEH +#else + -- Skipping xK_Arabic_farsi_yeh because your X doesn't define it +#endif +#ifdef XK_Arabic_yeh_baree + xK_Arabic_yeh_baree, -- U+06D2 ARABIC LETTER YEH BARREE +#else + -- Skipping xK_Arabic_yeh_baree because your X doesn't define it +#endif +#ifdef XK_Arabic_heh_goal + xK_Arabic_heh_goal, -- U+06C1 ARABIC LETTER HEH GOAL +#else + -- Skipping xK_Arabic_heh_goal because your X doesn't define it +#endif +#ifdef XK_Arabic_switch + xK_Arabic_switch, -- Alias for mode_switch +#else + -- Skipping xK_Arabic_switch because your X doesn't define it +#endif + + -- XK_CYRILLIC +#ifdef XK_Cyrillic_GHE_bar + xK_Cyrillic_GHE_bar, -- U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE +#else + -- Skipping xK_Cyrillic_GHE_bar because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ghe_bar + xK_Cyrillic_ghe_bar, -- U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE +#else + -- Skipping xK_Cyrillic_ghe_bar because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ZHE_descender + xK_Cyrillic_ZHE_descender, -- U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER +#else + -- Skipping xK_Cyrillic_ZHE_descender because your X doesn't define it +#endif +#ifdef XK_Cyrillic_zhe_descender + xK_Cyrillic_zhe_descender, -- U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER +#else + -- Skipping xK_Cyrillic_zhe_descender because your X doesn't define it +#endif +#ifdef XK_Cyrillic_KA_descender + xK_Cyrillic_KA_descender, -- U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER +#else + -- Skipping xK_Cyrillic_KA_descender because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ka_descender + xK_Cyrillic_ka_descender, -- U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER +#else + -- Skipping xK_Cyrillic_ka_descender because your X doesn't define it +#endif +#ifdef XK_Cyrillic_KA_vertstroke + xK_Cyrillic_KA_vertstroke, -- U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE +#else + -- Skipping xK_Cyrillic_KA_vertstroke because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ka_vertstroke + xK_Cyrillic_ka_vertstroke, -- U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE +#else + -- Skipping xK_Cyrillic_ka_vertstroke because your X doesn't define it +#endif +#ifdef XK_Cyrillic_EN_descender + xK_Cyrillic_EN_descender, -- U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER +#else + -- Skipping xK_Cyrillic_EN_descender because your X doesn't define it +#endif +#ifdef XK_Cyrillic_en_descender + xK_Cyrillic_en_descender, -- U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER +#else + -- Skipping xK_Cyrillic_en_descender because your X doesn't define it +#endif +#ifdef XK_Cyrillic_U_straight + xK_Cyrillic_U_straight, -- U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U +#else + -- Skipping xK_Cyrillic_U_straight because your X doesn't define it +#endif +#ifdef XK_Cyrillic_u_straight + xK_Cyrillic_u_straight, -- U+04AF CYRILLIC SMALL LETTER STRAIGHT U +#else + -- Skipping xK_Cyrillic_u_straight because your X doesn't define it +#endif +#ifdef XK_Cyrillic_U_straight_bar + xK_Cyrillic_U_straight_bar, -- U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE +#else + -- Skipping xK_Cyrillic_U_straight_bar because your X doesn't define it +#endif +#ifdef XK_Cyrillic_u_straight_bar + xK_Cyrillic_u_straight_bar, -- U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE +#else + -- Skipping xK_Cyrillic_u_straight_bar because your X doesn't define it +#endif +#ifdef XK_Cyrillic_HA_descender + xK_Cyrillic_HA_descender, -- U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER +#else + -- Skipping xK_Cyrillic_HA_descender because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ha_descender + xK_Cyrillic_ha_descender, -- U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER +#else + -- Skipping xK_Cyrillic_ha_descender because your X doesn't define it +#endif +#ifdef XK_Cyrillic_CHE_descender + xK_Cyrillic_CHE_descender, -- U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER +#else + -- Skipping xK_Cyrillic_CHE_descender because your X doesn't define it +#endif +#ifdef XK_Cyrillic_che_descender + xK_Cyrillic_che_descender, -- U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER +#else + -- Skipping xK_Cyrillic_che_descender because your X doesn't define it +#endif +#ifdef XK_Cyrillic_CHE_vertstroke + xK_Cyrillic_CHE_vertstroke, -- U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE +#else + -- Skipping xK_Cyrillic_CHE_vertstroke because your X doesn't define it +#endif +#ifdef XK_Cyrillic_che_vertstroke + xK_Cyrillic_che_vertstroke, -- U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE +#else + -- Skipping xK_Cyrillic_che_vertstroke because your X doesn't define it +#endif +#ifdef XK_Cyrillic_SHHA + xK_Cyrillic_SHHA, -- U+04BA CYRILLIC CAPITAL LETTER SHHA +#else + -- Skipping xK_Cyrillic_SHHA because your X doesn't define it +#endif +#ifdef XK_Cyrillic_shha + xK_Cyrillic_shha, -- U+04BB CYRILLIC SMALL LETTER SHHA +#else + -- Skipping xK_Cyrillic_shha because your X doesn't define it +#endif +#ifdef XK_Cyrillic_SCHWA + xK_Cyrillic_SCHWA, -- U+04D8 CYRILLIC CAPITAL LETTER SCHWA +#else + -- Skipping xK_Cyrillic_SCHWA because your X doesn't define it +#endif +#ifdef XK_Cyrillic_schwa + xK_Cyrillic_schwa, -- U+04D9 CYRILLIC SMALL LETTER SCHWA +#else + -- Skipping xK_Cyrillic_schwa because your X doesn't define it +#endif +#ifdef XK_Cyrillic_I_macron + xK_Cyrillic_I_macron, -- U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON +#else + -- Skipping xK_Cyrillic_I_macron because your X doesn't define it +#endif +#ifdef XK_Cyrillic_i_macron + xK_Cyrillic_i_macron, -- U+04E3 CYRILLIC SMALL LETTER I WITH MACRON +#else + -- Skipping xK_Cyrillic_i_macron because your X doesn't define it +#endif +#ifdef XK_Cyrillic_O_bar + xK_Cyrillic_O_bar, -- U+04E8 CYRILLIC CAPITAL LETTER BARRED O +#else + -- Skipping xK_Cyrillic_O_bar because your X doesn't define it +#endif +#ifdef XK_Cyrillic_o_bar + xK_Cyrillic_o_bar, -- U+04E9 CYRILLIC SMALL LETTER BARRED O +#else + -- Skipping xK_Cyrillic_o_bar because your X doesn't define it +#endif +#ifdef XK_Cyrillic_U_macron + xK_Cyrillic_U_macron, -- U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON +#else + -- Skipping xK_Cyrillic_U_macron because your X doesn't define it +#endif +#ifdef XK_Cyrillic_u_macron + xK_Cyrillic_u_macron, -- U+04EF CYRILLIC SMALL LETTER U WITH MACRON +#else + -- Skipping xK_Cyrillic_u_macron because your X doesn't define it +#endif +#ifdef XK_Serbian_dje + xK_Serbian_dje, -- U+0452 CYRILLIC SMALL LETTER DJE +#else + -- Skipping xK_Serbian_dje because your X doesn't define it +#endif +#ifdef XK_Macedonia_gje + xK_Macedonia_gje, -- U+0453 CYRILLIC SMALL LETTER GJE +#else + -- Skipping xK_Macedonia_gje because your X doesn't define it +#endif +#ifdef XK_Cyrillic_io + xK_Cyrillic_io, -- U+0451 CYRILLIC SMALL LETTER IO +#else + -- Skipping xK_Cyrillic_io because your X doesn't define it +#endif +#ifdef XK_Ukrainian_ie + xK_Ukrainian_ie, -- U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE +#else + -- Skipping xK_Ukrainian_ie because your X doesn't define it +#endif +#ifdef XK_Ukranian_je + xK_Ukranian_je, -- deprecated +#else + -- Skipping xK_Ukranian_je because your X doesn't define it +#endif +#ifdef XK_Macedonia_dse + xK_Macedonia_dse, -- U+0455 CYRILLIC SMALL LETTER DZE +#else + -- Skipping xK_Macedonia_dse because your X doesn't define it +#endif +#ifdef XK_Ukrainian_i + xK_Ukrainian_i, -- U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I +#else + -- Skipping xK_Ukrainian_i because your X doesn't define it +#endif +#ifdef XK_Ukranian_i + xK_Ukranian_i, -- deprecated +#else + -- Skipping xK_Ukranian_i because your X doesn't define it +#endif +#ifdef XK_Ukrainian_yi + xK_Ukrainian_yi, -- U+0457 CYRILLIC SMALL LETTER YI +#else + -- Skipping xK_Ukrainian_yi because your X doesn't define it +#endif +#ifdef XK_Ukranian_yi + xK_Ukranian_yi, -- deprecated +#else + -- Skipping xK_Ukranian_yi because your X doesn't define it +#endif +#ifdef XK_Cyrillic_je + xK_Cyrillic_je, -- U+0458 CYRILLIC SMALL LETTER JE +#else + -- Skipping xK_Cyrillic_je because your X doesn't define it +#endif +#ifdef XK_Serbian_je + xK_Serbian_je, -- deprecated +#else + -- Skipping xK_Serbian_je because your X doesn't define it +#endif +#ifdef XK_Cyrillic_lje + xK_Cyrillic_lje, -- U+0459 CYRILLIC SMALL LETTER LJE +#else + -- Skipping xK_Cyrillic_lje because your X doesn't define it +#endif +#ifdef XK_Serbian_lje + xK_Serbian_lje, -- deprecated +#else + -- Skipping xK_Serbian_lje because your X doesn't define it +#endif +#ifdef XK_Cyrillic_nje + xK_Cyrillic_nje, -- U+045A CYRILLIC SMALL LETTER NJE +#else + -- Skipping xK_Cyrillic_nje because your X doesn't define it +#endif +#ifdef XK_Serbian_nje + xK_Serbian_nje, -- deprecated +#else + -- Skipping xK_Serbian_nje because your X doesn't define it +#endif +#ifdef XK_Serbian_tshe + xK_Serbian_tshe, -- U+045B CYRILLIC SMALL LETTER TSHE +#else + -- Skipping xK_Serbian_tshe because your X doesn't define it +#endif +#ifdef XK_Macedonia_kje + xK_Macedonia_kje, -- U+045C CYRILLIC SMALL LETTER KJE +#else + -- Skipping xK_Macedonia_kje because your X doesn't define it +#endif +#ifdef XK_Ukrainian_ghe_with_upturn + xK_Ukrainian_ghe_with_upturn, -- U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN +#else + -- Skipping xK_Ukrainian_ghe_with_upturn because your X doesn't define it +#endif +#ifdef XK_Byelorussian_shortu + xK_Byelorussian_shortu, -- U+045E CYRILLIC SMALL LETTER SHORT U +#else + -- Skipping xK_Byelorussian_shortu because your X doesn't define it +#endif +#ifdef XK_Cyrillic_dzhe + xK_Cyrillic_dzhe, -- U+045F CYRILLIC SMALL LETTER DZHE +#else + -- Skipping xK_Cyrillic_dzhe because your X doesn't define it +#endif +#ifdef XK_Serbian_dze + xK_Serbian_dze, -- deprecated +#else + -- Skipping xK_Serbian_dze because your X doesn't define it +#endif +#ifdef XK_numerosign + xK_numerosign, -- U+2116 NUMERO SIGN +#else + -- Skipping xK_numerosign because your X doesn't define it +#endif +#ifdef XK_Serbian_DJE + xK_Serbian_DJE, -- U+0402 CYRILLIC CAPITAL LETTER DJE +#else + -- Skipping xK_Serbian_DJE because your X doesn't define it +#endif +#ifdef XK_Macedonia_GJE + xK_Macedonia_GJE, -- U+0403 CYRILLIC CAPITAL LETTER GJE +#else + -- Skipping xK_Macedonia_GJE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_IO + xK_Cyrillic_IO, -- U+0401 CYRILLIC CAPITAL LETTER IO +#else + -- Skipping xK_Cyrillic_IO because your X doesn't define it +#endif +#ifdef XK_Ukrainian_IE + xK_Ukrainian_IE, -- U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE +#else + -- Skipping xK_Ukrainian_IE because your X doesn't define it +#endif +#ifdef XK_Ukranian_JE + xK_Ukranian_JE, -- deprecated +#else + -- Skipping xK_Ukranian_JE because your X doesn't define it +#endif +#ifdef XK_Macedonia_DSE + xK_Macedonia_DSE, -- U+0405 CYRILLIC CAPITAL LETTER DZE +#else + -- Skipping xK_Macedonia_DSE because your X doesn't define it +#endif +#ifdef XK_Ukrainian_I + xK_Ukrainian_I, -- U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I +#else + -- Skipping xK_Ukrainian_I because your X doesn't define it +#endif +#ifdef XK_Ukranian_I + xK_Ukranian_I, -- deprecated +#else + -- Skipping xK_Ukranian_I because your X doesn't define it +#endif +#ifdef XK_Ukrainian_YI + xK_Ukrainian_YI, -- U+0407 CYRILLIC CAPITAL LETTER YI +#else + -- Skipping xK_Ukrainian_YI because your X doesn't define it +#endif +#ifdef XK_Ukranian_YI + xK_Ukranian_YI, -- deprecated +#else + -- Skipping xK_Ukranian_YI because your X doesn't define it +#endif +#ifdef XK_Cyrillic_JE + xK_Cyrillic_JE, -- U+0408 CYRILLIC CAPITAL LETTER JE +#else + -- Skipping xK_Cyrillic_JE because your X doesn't define it +#endif +#ifdef XK_Serbian_JE + xK_Serbian_JE, -- deprecated +#else + -- Skipping xK_Serbian_JE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_LJE + xK_Cyrillic_LJE, -- U+0409 CYRILLIC CAPITAL LETTER LJE +#else + -- Skipping xK_Cyrillic_LJE because your X doesn't define it +#endif +#ifdef XK_Serbian_LJE + xK_Serbian_LJE, -- deprecated +#else + -- Skipping xK_Serbian_LJE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_NJE + xK_Cyrillic_NJE, -- U+040A CYRILLIC CAPITAL LETTER NJE +#else + -- Skipping xK_Cyrillic_NJE because your X doesn't define it +#endif +#ifdef XK_Serbian_NJE + xK_Serbian_NJE, -- deprecated +#else + -- Skipping xK_Serbian_NJE because your X doesn't define it +#endif +#ifdef XK_Serbian_TSHE + xK_Serbian_TSHE, -- U+040B CYRILLIC CAPITAL LETTER TSHE +#else + -- Skipping xK_Serbian_TSHE because your X doesn't define it +#endif +#ifdef XK_Macedonia_KJE + xK_Macedonia_KJE, -- U+040C CYRILLIC CAPITAL LETTER KJE +#else + -- Skipping xK_Macedonia_KJE because your X doesn't define it +#endif +#ifdef XK_Ukrainian_GHE_WITH_UPTURN + xK_Ukrainian_GHE_WITH_UPTURN, -- U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN +#else + -- Skipping xK_Ukrainian_GHE_WITH_UPTURN because your X doesn't define it +#endif +#ifdef XK_Byelorussian_SHORTU + xK_Byelorussian_SHORTU, -- U+040E CYRILLIC CAPITAL LETTER SHORT U +#else + -- Skipping xK_Byelorussian_SHORTU because your X doesn't define it +#endif +#ifdef XK_Cyrillic_DZHE + xK_Cyrillic_DZHE, -- U+040F CYRILLIC CAPITAL LETTER DZHE +#else + -- Skipping xK_Cyrillic_DZHE because your X doesn't define it +#endif +#ifdef XK_Serbian_DZE + xK_Serbian_DZE, -- deprecated +#else + -- Skipping xK_Serbian_DZE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_yu + xK_Cyrillic_yu, -- U+044E CYRILLIC SMALL LETTER YU +#else + -- Skipping xK_Cyrillic_yu because your X doesn't define it +#endif +#ifdef XK_Cyrillic_a + xK_Cyrillic_a, -- U+0430 CYRILLIC SMALL LETTER A +#else + -- Skipping xK_Cyrillic_a because your X doesn't define it +#endif +#ifdef XK_Cyrillic_be + xK_Cyrillic_be, -- U+0431 CYRILLIC SMALL LETTER BE +#else + -- Skipping xK_Cyrillic_be because your X doesn't define it +#endif +#ifdef XK_Cyrillic_tse + xK_Cyrillic_tse, -- U+0446 CYRILLIC SMALL LETTER TSE +#else + -- Skipping xK_Cyrillic_tse because your X doesn't define it +#endif +#ifdef XK_Cyrillic_de + xK_Cyrillic_de, -- U+0434 CYRILLIC SMALL LETTER DE +#else + -- Skipping xK_Cyrillic_de because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ie + xK_Cyrillic_ie, -- U+0435 CYRILLIC SMALL LETTER IE +#else + -- Skipping xK_Cyrillic_ie because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ef + xK_Cyrillic_ef, -- U+0444 CYRILLIC SMALL LETTER EF +#else + -- Skipping xK_Cyrillic_ef because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ghe + xK_Cyrillic_ghe, -- U+0433 CYRILLIC SMALL LETTER GHE +#else + -- Skipping xK_Cyrillic_ghe because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ha + xK_Cyrillic_ha, -- U+0445 CYRILLIC SMALL LETTER HA +#else + -- Skipping xK_Cyrillic_ha because your X doesn't define it +#endif +#ifdef XK_Cyrillic_i + xK_Cyrillic_i, -- U+0438 CYRILLIC SMALL LETTER I +#else + -- Skipping xK_Cyrillic_i because your X doesn't define it +#endif +#ifdef XK_Cyrillic_shorti + xK_Cyrillic_shorti, -- U+0439 CYRILLIC SMALL LETTER SHORT I +#else + -- Skipping xK_Cyrillic_shorti because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ka + xK_Cyrillic_ka, -- U+043A CYRILLIC SMALL LETTER KA +#else + -- Skipping xK_Cyrillic_ka because your X doesn't define it +#endif +#ifdef XK_Cyrillic_el + xK_Cyrillic_el, -- U+043B CYRILLIC SMALL LETTER EL +#else + -- Skipping xK_Cyrillic_el because your X doesn't define it +#endif +#ifdef XK_Cyrillic_em + xK_Cyrillic_em, -- U+043C CYRILLIC SMALL LETTER EM +#else + -- Skipping xK_Cyrillic_em because your X doesn't define it +#endif +#ifdef XK_Cyrillic_en + xK_Cyrillic_en, -- U+043D CYRILLIC SMALL LETTER EN +#else + -- Skipping xK_Cyrillic_en because your X doesn't define it +#endif +#ifdef XK_Cyrillic_o + xK_Cyrillic_o, -- U+043E CYRILLIC SMALL LETTER O +#else + -- Skipping xK_Cyrillic_o because your X doesn't define it +#endif +#ifdef XK_Cyrillic_pe + xK_Cyrillic_pe, -- U+043F CYRILLIC SMALL LETTER PE +#else + -- Skipping xK_Cyrillic_pe because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ya + xK_Cyrillic_ya, -- U+044F CYRILLIC SMALL LETTER YA +#else + -- Skipping xK_Cyrillic_ya because your X doesn't define it +#endif +#ifdef XK_Cyrillic_er + xK_Cyrillic_er, -- U+0440 CYRILLIC SMALL LETTER ER +#else + -- Skipping xK_Cyrillic_er because your X doesn't define it +#endif +#ifdef XK_Cyrillic_es + xK_Cyrillic_es, -- U+0441 CYRILLIC SMALL LETTER ES +#else + -- Skipping xK_Cyrillic_es because your X doesn't define it +#endif +#ifdef XK_Cyrillic_te + xK_Cyrillic_te, -- U+0442 CYRILLIC SMALL LETTER TE +#else + -- Skipping xK_Cyrillic_te because your X doesn't define it +#endif +#ifdef XK_Cyrillic_u + xK_Cyrillic_u, -- U+0443 CYRILLIC SMALL LETTER U +#else + -- Skipping xK_Cyrillic_u because your X doesn't define it +#endif +#ifdef XK_Cyrillic_zhe + xK_Cyrillic_zhe, -- U+0436 CYRILLIC SMALL LETTER ZHE +#else + -- Skipping xK_Cyrillic_zhe because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ve + xK_Cyrillic_ve, -- U+0432 CYRILLIC SMALL LETTER VE +#else + -- Skipping xK_Cyrillic_ve because your X doesn't define it +#endif +#ifdef XK_Cyrillic_softsign + xK_Cyrillic_softsign, -- U+044C CYRILLIC SMALL LETTER SOFT SIGN +#else + -- Skipping xK_Cyrillic_softsign because your X doesn't define it +#endif +#ifdef XK_Cyrillic_yeru + xK_Cyrillic_yeru, -- U+044B CYRILLIC SMALL LETTER YERU +#else + -- Skipping xK_Cyrillic_yeru because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ze + xK_Cyrillic_ze, -- U+0437 CYRILLIC SMALL LETTER ZE +#else + -- Skipping xK_Cyrillic_ze because your X doesn't define it +#endif +#ifdef XK_Cyrillic_sha + xK_Cyrillic_sha, -- U+0448 CYRILLIC SMALL LETTER SHA +#else + -- Skipping xK_Cyrillic_sha because your X doesn't define it +#endif +#ifdef XK_Cyrillic_e + xK_Cyrillic_e, -- U+044D CYRILLIC SMALL LETTER E +#else + -- Skipping xK_Cyrillic_e because your X doesn't define it +#endif +#ifdef XK_Cyrillic_shcha + xK_Cyrillic_shcha, -- U+0449 CYRILLIC SMALL LETTER SHCHA +#else + -- Skipping xK_Cyrillic_shcha because your X doesn't define it +#endif +#ifdef XK_Cyrillic_che + xK_Cyrillic_che, -- U+0447 CYRILLIC SMALL LETTER CHE +#else + -- Skipping xK_Cyrillic_che because your X doesn't define it +#endif +#ifdef XK_Cyrillic_hardsign + xK_Cyrillic_hardsign, -- U+044A CYRILLIC SMALL LETTER HARD SIGN +#else + -- Skipping xK_Cyrillic_hardsign because your X doesn't define it +#endif +#ifdef XK_Cyrillic_YU + xK_Cyrillic_YU, -- U+042E CYRILLIC CAPITAL LETTER YU +#else + -- Skipping xK_Cyrillic_YU because your X doesn't define it +#endif +#ifdef XK_Cyrillic_A + xK_Cyrillic_A, -- U+0410 CYRILLIC CAPITAL LETTER A +#else + -- Skipping xK_Cyrillic_A because your X doesn't define it +#endif +#ifdef XK_Cyrillic_BE + xK_Cyrillic_BE, -- U+0411 CYRILLIC CAPITAL LETTER BE +#else + -- Skipping xK_Cyrillic_BE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_TSE + xK_Cyrillic_TSE, -- U+0426 CYRILLIC CAPITAL LETTER TSE +#else + -- Skipping xK_Cyrillic_TSE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_DE + xK_Cyrillic_DE, -- U+0414 CYRILLIC CAPITAL LETTER DE +#else + -- Skipping xK_Cyrillic_DE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_IE + xK_Cyrillic_IE, -- U+0415 CYRILLIC CAPITAL LETTER IE +#else + -- Skipping xK_Cyrillic_IE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_EF + xK_Cyrillic_EF, -- U+0424 CYRILLIC CAPITAL LETTER EF +#else + -- Skipping xK_Cyrillic_EF because your X doesn't define it +#endif +#ifdef XK_Cyrillic_GHE + xK_Cyrillic_GHE, -- U+0413 CYRILLIC CAPITAL LETTER GHE +#else + -- Skipping xK_Cyrillic_GHE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_HA + xK_Cyrillic_HA, -- U+0425 CYRILLIC CAPITAL LETTER HA +#else + -- Skipping xK_Cyrillic_HA because your X doesn't define it +#endif +#ifdef XK_Cyrillic_I + xK_Cyrillic_I, -- U+0418 CYRILLIC CAPITAL LETTER I +#else + -- Skipping xK_Cyrillic_I because your X doesn't define it +#endif +#ifdef XK_Cyrillic_SHORTI + xK_Cyrillic_SHORTI, -- U+0419 CYRILLIC CAPITAL LETTER SHORT I +#else + -- Skipping xK_Cyrillic_SHORTI because your X doesn't define it +#endif +#ifdef XK_Cyrillic_KA + xK_Cyrillic_KA, -- U+041A CYRILLIC CAPITAL LETTER KA +#else + -- Skipping xK_Cyrillic_KA because your X doesn't define it +#endif +#ifdef XK_Cyrillic_EL + xK_Cyrillic_EL, -- U+041B CYRILLIC CAPITAL LETTER EL +#else + -- Skipping xK_Cyrillic_EL because your X doesn't define it +#endif +#ifdef XK_Cyrillic_EM + xK_Cyrillic_EM, -- U+041C CYRILLIC CAPITAL LETTER EM +#else + -- Skipping xK_Cyrillic_EM because your X doesn't define it +#endif +#ifdef XK_Cyrillic_EN + xK_Cyrillic_EN, -- U+041D CYRILLIC CAPITAL LETTER EN +#else + -- Skipping xK_Cyrillic_EN because your X doesn't define it +#endif +#ifdef XK_Cyrillic_O + xK_Cyrillic_O, -- U+041E CYRILLIC CAPITAL LETTER O +#else + -- Skipping xK_Cyrillic_O because your X doesn't define it +#endif +#ifdef XK_Cyrillic_PE + xK_Cyrillic_PE, -- U+041F CYRILLIC CAPITAL LETTER PE +#else + -- Skipping xK_Cyrillic_PE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_YA + xK_Cyrillic_YA, -- U+042F CYRILLIC CAPITAL LETTER YA +#else + -- Skipping xK_Cyrillic_YA because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ER + xK_Cyrillic_ER, -- U+0420 CYRILLIC CAPITAL LETTER ER +#else + -- Skipping xK_Cyrillic_ER because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ES + xK_Cyrillic_ES, -- U+0421 CYRILLIC CAPITAL LETTER ES +#else + -- Skipping xK_Cyrillic_ES because your X doesn't define it +#endif +#ifdef XK_Cyrillic_TE + xK_Cyrillic_TE, -- U+0422 CYRILLIC CAPITAL LETTER TE +#else + -- Skipping xK_Cyrillic_TE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_U + xK_Cyrillic_U, -- U+0423 CYRILLIC CAPITAL LETTER U +#else + -- Skipping xK_Cyrillic_U because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ZHE + xK_Cyrillic_ZHE, -- U+0416 CYRILLIC CAPITAL LETTER ZHE +#else + -- Skipping xK_Cyrillic_ZHE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_VE + xK_Cyrillic_VE, -- U+0412 CYRILLIC CAPITAL LETTER VE +#else + -- Skipping xK_Cyrillic_VE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_SOFTSIGN + xK_Cyrillic_SOFTSIGN, -- U+042C CYRILLIC CAPITAL LETTER SOFT SIGN +#else + -- Skipping xK_Cyrillic_SOFTSIGN because your X doesn't define it +#endif +#ifdef XK_Cyrillic_YERU + xK_Cyrillic_YERU, -- U+042B CYRILLIC CAPITAL LETTER YERU +#else + -- Skipping xK_Cyrillic_YERU because your X doesn't define it +#endif +#ifdef XK_Cyrillic_ZE + xK_Cyrillic_ZE, -- U+0417 CYRILLIC CAPITAL LETTER ZE +#else + -- Skipping xK_Cyrillic_ZE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_SHA + xK_Cyrillic_SHA, -- U+0428 CYRILLIC CAPITAL LETTER SHA +#else + -- Skipping xK_Cyrillic_SHA because your X doesn't define it +#endif +#ifdef XK_Cyrillic_E + xK_Cyrillic_E, -- U+042D CYRILLIC CAPITAL LETTER E +#else + -- Skipping xK_Cyrillic_E because your X doesn't define it +#endif +#ifdef XK_Cyrillic_SHCHA + xK_Cyrillic_SHCHA, -- U+0429 CYRILLIC CAPITAL LETTER SHCHA +#else + -- Skipping xK_Cyrillic_SHCHA because your X doesn't define it +#endif +#ifdef XK_Cyrillic_CHE + xK_Cyrillic_CHE, -- U+0427 CYRILLIC CAPITAL LETTER CHE +#else + -- Skipping xK_Cyrillic_CHE because your X doesn't define it +#endif +#ifdef XK_Cyrillic_HARDSIGN + xK_Cyrillic_HARDSIGN, -- U+042A CYRILLIC CAPITAL LETTER HARD SIGN +#else + -- Skipping xK_Cyrillic_HARDSIGN because your X doesn't define it +#endif + + -- XK_GREEK +#ifdef XK_Greek_ALPHAaccent + xK_Greek_ALPHAaccent, -- U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS +#else + -- Skipping xK_Greek_ALPHAaccent because your X doesn't define it +#endif +#ifdef XK_Greek_EPSILONaccent + xK_Greek_EPSILONaccent, -- U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS +#else + -- Skipping xK_Greek_EPSILONaccent because your X doesn't define it +#endif +#ifdef XK_Greek_ETAaccent + xK_Greek_ETAaccent, -- U+0389 GREEK CAPITAL LETTER ETA WITH TONOS +#else + -- Skipping xK_Greek_ETAaccent because your X doesn't define it +#endif +#ifdef XK_Greek_IOTAaccent + xK_Greek_IOTAaccent, -- U+038A GREEK CAPITAL LETTER IOTA WITH TONOS +#else + -- Skipping xK_Greek_IOTAaccent because your X doesn't define it +#endif +#ifdef XK_Greek_IOTAdieresis + xK_Greek_IOTAdieresis, -- U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA +#else + -- Skipping xK_Greek_IOTAdieresis because your X doesn't define it +#endif +#ifdef XK_Greek_IOTAdiaeresis + xK_Greek_IOTAdiaeresis, -- old typo +#else + -- Skipping xK_Greek_IOTAdiaeresis because your X doesn't define it +#endif +#ifdef XK_Greek_OMICRONaccent + xK_Greek_OMICRONaccent, -- U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS +#else + -- Skipping xK_Greek_OMICRONaccent because your X doesn't define it +#endif +#ifdef XK_Greek_UPSILONaccent + xK_Greek_UPSILONaccent, -- U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS +#else + -- Skipping xK_Greek_UPSILONaccent because your X doesn't define it +#endif +#ifdef XK_Greek_UPSILONdieresis + xK_Greek_UPSILONdieresis, -- U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA +#else + -- Skipping xK_Greek_UPSILONdieresis because your X doesn't define it +#endif +#ifdef XK_Greek_OMEGAaccent + xK_Greek_OMEGAaccent, -- U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS +#else + -- Skipping xK_Greek_OMEGAaccent because your X doesn't define it +#endif +#ifdef XK_Greek_accentdieresis + xK_Greek_accentdieresis, -- U+0385 GREEK DIALYTIKA TONOS +#else + -- Skipping xK_Greek_accentdieresis because your X doesn't define it +#endif +#ifdef XK_Greek_horizbar + xK_Greek_horizbar, -- U+2015 HORIZONTAL BAR +#else + -- Skipping xK_Greek_horizbar because your X doesn't define it +#endif +#ifdef XK_Greek_alphaaccent + xK_Greek_alphaaccent, -- U+03AC GREEK SMALL LETTER ALPHA WITH TONOS +#else + -- Skipping xK_Greek_alphaaccent because your X doesn't define it +#endif +#ifdef XK_Greek_epsilonaccent + xK_Greek_epsilonaccent, -- U+03AD GREEK SMALL LETTER EPSILON WITH TONOS +#else + -- Skipping xK_Greek_epsilonaccent because your X doesn't define it +#endif +#ifdef XK_Greek_etaaccent + xK_Greek_etaaccent, -- U+03AE GREEK SMALL LETTER ETA WITH TONOS +#else + -- Skipping xK_Greek_etaaccent because your X doesn't define it +#endif +#ifdef XK_Greek_iotaaccent + xK_Greek_iotaaccent, -- U+03AF GREEK SMALL LETTER IOTA WITH TONOS +#else + -- Skipping xK_Greek_iotaaccent because your X doesn't define it +#endif +#ifdef XK_Greek_iotadieresis + xK_Greek_iotadieresis, -- U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA +#else + -- Skipping xK_Greek_iotadieresis because your X doesn't define it +#endif +#ifdef XK_Greek_iotaaccentdieresis + xK_Greek_iotaaccentdieresis, -- U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +#else + -- Skipping xK_Greek_iotaaccentdieresis because your X doesn't define it +#endif +#ifdef XK_Greek_omicronaccent + xK_Greek_omicronaccent, -- U+03CC GREEK SMALL LETTER OMICRON WITH TONOS +#else + -- Skipping xK_Greek_omicronaccent because your X doesn't define it +#endif +#ifdef XK_Greek_upsilonaccent + xK_Greek_upsilonaccent, -- U+03CD GREEK SMALL LETTER UPSILON WITH TONOS +#else + -- Skipping xK_Greek_upsilonaccent because your X doesn't define it +#endif +#ifdef XK_Greek_upsilondieresis + xK_Greek_upsilondieresis, -- U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA +#else + -- Skipping xK_Greek_upsilondieresis because your X doesn't define it +#endif +#ifdef XK_Greek_upsilonaccentdieresis + xK_Greek_upsilonaccentdieresis, -- U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +#else + -- Skipping xK_Greek_upsilonaccentdieresis because your X doesn't define it +#endif +#ifdef XK_Greek_omegaaccent + xK_Greek_omegaaccent, -- U+03CE GREEK SMALL LETTER OMEGA WITH TONOS +#else + -- Skipping xK_Greek_omegaaccent because your X doesn't define it +#endif +#ifdef XK_Greek_ALPHA + xK_Greek_ALPHA, -- U+0391 GREEK CAPITAL LETTER ALPHA +#else + -- Skipping xK_Greek_ALPHA because your X doesn't define it +#endif +#ifdef XK_Greek_BETA + xK_Greek_BETA, -- U+0392 GREEK CAPITAL LETTER BETA +#else + -- Skipping xK_Greek_BETA because your X doesn't define it +#endif +#ifdef XK_Greek_GAMMA + xK_Greek_GAMMA, -- U+0393 GREEK CAPITAL LETTER GAMMA +#else + -- Skipping xK_Greek_GAMMA because your X doesn't define it +#endif +#ifdef XK_Greek_DELTA + xK_Greek_DELTA, -- U+0394 GREEK CAPITAL LETTER DELTA +#else + -- Skipping xK_Greek_DELTA because your X doesn't define it +#endif +#ifdef XK_Greek_EPSILON + xK_Greek_EPSILON, -- U+0395 GREEK CAPITAL LETTER EPSILON +#else + -- Skipping xK_Greek_EPSILON because your X doesn't define it +#endif +#ifdef XK_Greek_ZETA + xK_Greek_ZETA, -- U+0396 GREEK CAPITAL LETTER ZETA +#else + -- Skipping xK_Greek_ZETA because your X doesn't define it +#endif +#ifdef XK_Greek_ETA + xK_Greek_ETA, -- U+0397 GREEK CAPITAL LETTER ETA +#else + -- Skipping xK_Greek_ETA because your X doesn't define it +#endif +#ifdef XK_Greek_THETA + xK_Greek_THETA, -- U+0398 GREEK CAPITAL LETTER THETA +#else + -- Skipping xK_Greek_THETA because your X doesn't define it +#endif +#ifdef XK_Greek_IOTA + xK_Greek_IOTA, -- U+0399 GREEK CAPITAL LETTER IOTA +#else + -- Skipping xK_Greek_IOTA because your X doesn't define it +#endif +#ifdef XK_Greek_KAPPA + xK_Greek_KAPPA, -- U+039A GREEK CAPITAL LETTER KAPPA +#else + -- Skipping xK_Greek_KAPPA because your X doesn't define it +#endif +#ifdef XK_Greek_LAMDA + xK_Greek_LAMDA, -- U+039B GREEK CAPITAL LETTER LAMDA +#else + -- Skipping xK_Greek_LAMDA because your X doesn't define it +#endif +#ifdef XK_Greek_LAMBDA + xK_Greek_LAMBDA, -- U+039B GREEK CAPITAL LETTER LAMDA +#else + -- Skipping xK_Greek_LAMBDA because your X doesn't define it +#endif +#ifdef XK_Greek_MU + xK_Greek_MU, -- U+039C GREEK CAPITAL LETTER MU +#else + -- Skipping xK_Greek_MU because your X doesn't define it +#endif +#ifdef XK_Greek_NU + xK_Greek_NU, -- U+039D GREEK CAPITAL LETTER NU +#else + -- Skipping xK_Greek_NU because your X doesn't define it +#endif +#ifdef XK_Greek_XI + xK_Greek_XI, -- U+039E GREEK CAPITAL LETTER XI +#else + -- Skipping xK_Greek_XI because your X doesn't define it +#endif +#ifdef XK_Greek_OMICRON + xK_Greek_OMICRON, -- U+039F GREEK CAPITAL LETTER OMICRON +#else + -- Skipping xK_Greek_OMICRON because your X doesn't define it +#endif +#ifdef XK_Greek_PI + xK_Greek_PI, -- U+03A0 GREEK CAPITAL LETTER PI +#else + -- Skipping xK_Greek_PI because your X doesn't define it +#endif +#ifdef XK_Greek_RHO + xK_Greek_RHO, -- U+03A1 GREEK CAPITAL LETTER RHO +#else + -- Skipping xK_Greek_RHO because your X doesn't define it +#endif +#ifdef XK_Greek_SIGMA + xK_Greek_SIGMA, -- U+03A3 GREEK CAPITAL LETTER SIGMA +#else + -- Skipping xK_Greek_SIGMA because your X doesn't define it +#endif +#ifdef XK_Greek_TAU + xK_Greek_TAU, -- U+03A4 GREEK CAPITAL LETTER TAU +#else + -- Skipping xK_Greek_TAU because your X doesn't define it +#endif +#ifdef XK_Greek_UPSILON + xK_Greek_UPSILON, -- U+03A5 GREEK CAPITAL LETTER UPSILON +#else + -- Skipping xK_Greek_UPSILON because your X doesn't define it +#endif +#ifdef XK_Greek_PHI + xK_Greek_PHI, -- U+03A6 GREEK CAPITAL LETTER PHI +#else + -- Skipping xK_Greek_PHI because your X doesn't define it +#endif +#ifdef XK_Greek_CHI + xK_Greek_CHI, -- U+03A7 GREEK CAPITAL LETTER CHI +#else + -- Skipping xK_Greek_CHI because your X doesn't define it +#endif +#ifdef XK_Greek_PSI + xK_Greek_PSI, -- U+03A8 GREEK CAPITAL LETTER PSI +#else + -- Skipping xK_Greek_PSI because your X doesn't define it +#endif +#ifdef XK_Greek_OMEGA + xK_Greek_OMEGA, -- U+03A9 GREEK CAPITAL LETTER OMEGA +#else + -- Skipping xK_Greek_OMEGA because your X doesn't define it +#endif +#ifdef XK_Greek_alpha + xK_Greek_alpha, -- U+03B1 GREEK SMALL LETTER ALPHA +#else + -- Skipping xK_Greek_alpha because your X doesn't define it +#endif +#ifdef XK_Greek_beta + xK_Greek_beta, -- U+03B2 GREEK SMALL LETTER BETA +#else + -- Skipping xK_Greek_beta because your X doesn't define it +#endif +#ifdef XK_Greek_gamma + xK_Greek_gamma, -- U+03B3 GREEK SMALL LETTER GAMMA +#else + -- Skipping xK_Greek_gamma because your X doesn't define it +#endif +#ifdef XK_Greek_delta + xK_Greek_delta, -- U+03B4 GREEK SMALL LETTER DELTA +#else + -- Skipping xK_Greek_delta because your X doesn't define it +#endif +#ifdef XK_Greek_epsilon + xK_Greek_epsilon, -- U+03B5 GREEK SMALL LETTER EPSILON +#else + -- Skipping xK_Greek_epsilon because your X doesn't define it +#endif +#ifdef XK_Greek_zeta + xK_Greek_zeta, -- U+03B6 GREEK SMALL LETTER ZETA +#else + -- Skipping xK_Greek_zeta because your X doesn't define it +#endif +#ifdef XK_Greek_eta + xK_Greek_eta, -- U+03B7 GREEK SMALL LETTER ETA +#else + -- Skipping xK_Greek_eta because your X doesn't define it +#endif +#ifdef XK_Greek_theta + xK_Greek_theta, -- U+03B8 GREEK SMALL LETTER THETA +#else + -- Skipping xK_Greek_theta because your X doesn't define it +#endif +#ifdef XK_Greek_iota + xK_Greek_iota, -- U+03B9 GREEK SMALL LETTER IOTA +#else + -- Skipping xK_Greek_iota because your X doesn't define it +#endif +#ifdef XK_Greek_kappa + xK_Greek_kappa, -- U+03BA GREEK SMALL LETTER KAPPA +#else + -- Skipping xK_Greek_kappa because your X doesn't define it +#endif +#ifdef XK_Greek_lamda + xK_Greek_lamda, -- U+03BB GREEK SMALL LETTER LAMDA +#else + -- Skipping xK_Greek_lamda because your X doesn't define it +#endif +#ifdef XK_Greek_lambda + xK_Greek_lambda, -- U+03BB GREEK SMALL LETTER LAMDA +#else + -- Skipping xK_Greek_lambda because your X doesn't define it +#endif +#ifdef XK_Greek_mu + xK_Greek_mu, -- U+03BC GREEK SMALL LETTER MU +#else + -- Skipping xK_Greek_mu because your X doesn't define it +#endif +#ifdef XK_Greek_nu + xK_Greek_nu, -- U+03BD GREEK SMALL LETTER NU +#else + -- Skipping xK_Greek_nu because your X doesn't define it +#endif +#ifdef XK_Greek_xi + xK_Greek_xi, -- U+03BE GREEK SMALL LETTER XI +#else + -- Skipping xK_Greek_xi because your X doesn't define it +#endif +#ifdef XK_Greek_omicron + xK_Greek_omicron, -- U+03BF GREEK SMALL LETTER OMICRON +#else + -- Skipping xK_Greek_omicron because your X doesn't define it +#endif +#ifdef XK_Greek_pi + xK_Greek_pi, -- U+03C0 GREEK SMALL LETTER PI +#else + -- Skipping xK_Greek_pi because your X doesn't define it +#endif +#ifdef XK_Greek_rho + xK_Greek_rho, -- U+03C1 GREEK SMALL LETTER RHO +#else + -- Skipping xK_Greek_rho because your X doesn't define it +#endif +#ifdef XK_Greek_sigma + xK_Greek_sigma, -- U+03C3 GREEK SMALL LETTER SIGMA +#else + -- Skipping xK_Greek_sigma because your X doesn't define it +#endif +#ifdef XK_Greek_finalsmallsigma + xK_Greek_finalsmallsigma, -- U+03C2 GREEK SMALL LETTER FINAL SIGMA +#else + -- Skipping xK_Greek_finalsmallsigma because your X doesn't define it +#endif +#ifdef XK_Greek_tau + xK_Greek_tau, -- U+03C4 GREEK SMALL LETTER TAU +#else + -- Skipping xK_Greek_tau because your X doesn't define it +#endif +#ifdef XK_Greek_upsilon + xK_Greek_upsilon, -- U+03C5 GREEK SMALL LETTER UPSILON +#else + -- Skipping xK_Greek_upsilon because your X doesn't define it +#endif +#ifdef XK_Greek_phi + xK_Greek_phi, -- U+03C6 GREEK SMALL LETTER PHI +#else + -- Skipping xK_Greek_phi because your X doesn't define it +#endif +#ifdef XK_Greek_chi + xK_Greek_chi, -- U+03C7 GREEK SMALL LETTER CHI +#else + -- Skipping xK_Greek_chi because your X doesn't define it +#endif +#ifdef XK_Greek_psi + xK_Greek_psi, -- U+03C8 GREEK SMALL LETTER PSI +#else + -- Skipping xK_Greek_psi because your X doesn't define it +#endif +#ifdef XK_Greek_omega + xK_Greek_omega, -- U+03C9 GREEK SMALL LETTER OMEGA +#else + -- Skipping xK_Greek_omega because your X doesn't define it +#endif +#ifdef XK_Greek_switch + xK_Greek_switch, -- Alias for mode_switch +#else + -- Skipping xK_Greek_switch because your X doesn't define it +#endif + + -- XK_TECHNICAL +#ifdef XK_leftradical + xK_leftradical, -- U+23B7 RADICAL SYMBOL BOTTOM +#else + -- Skipping xK_leftradical because your X doesn't define it +#endif +#ifdef XK_topleftradical + xK_topleftradical, -- (U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT) +#else + -- Skipping xK_topleftradical because your X doesn't define it +#endif +#ifdef XK_horizconnector + xK_horizconnector, -- (U+2500 BOX DRAWINGS LIGHT HORIZONTAL) +#else + -- Skipping xK_horizconnector because your X doesn't define it +#endif +#ifdef XK_topintegral + xK_topintegral, -- U+2320 TOP HALF INTEGRAL +#else + -- Skipping xK_topintegral because your X doesn't define it +#endif +#ifdef XK_botintegral + xK_botintegral, -- U+2321 BOTTOM HALF INTEGRAL +#else + -- Skipping xK_botintegral because your X doesn't define it +#endif +#ifdef XK_vertconnector + xK_vertconnector, -- (U+2502 BOX DRAWINGS LIGHT VERTICAL) +#else + -- Skipping xK_vertconnector because your X doesn't define it +#endif +#ifdef XK_topleftsqbracket + xK_topleftsqbracket, -- U+23A1 LEFT SQUARE BRACKET UPPER CORNER +#else + -- Skipping xK_topleftsqbracket because your X doesn't define it +#endif +#ifdef XK_botleftsqbracket + xK_botleftsqbracket, -- U+23A3 LEFT SQUARE BRACKET LOWER CORNER +#else + -- Skipping xK_botleftsqbracket because your X doesn't define it +#endif +#ifdef XK_toprightsqbracket + xK_toprightsqbracket, -- U+23A4 RIGHT SQUARE BRACKET UPPER CORNER +#else + -- Skipping xK_toprightsqbracket because your X doesn't define it +#endif +#ifdef XK_botrightsqbracket + xK_botrightsqbracket, -- U+23A6 RIGHT SQUARE BRACKET LOWER CORNER +#else + -- Skipping xK_botrightsqbracket because your X doesn't define it +#endif +#ifdef XK_topleftparens + xK_topleftparens, -- U+239B LEFT PARENTHESIS UPPER HOOK +#else + -- Skipping xK_topleftparens because your X doesn't define it +#endif +#ifdef XK_botleftparens + xK_botleftparens, -- U+239D LEFT PARENTHESIS LOWER HOOK +#else + -- Skipping xK_botleftparens because your X doesn't define it +#endif +#ifdef XK_toprightparens + xK_toprightparens, -- U+239E RIGHT PARENTHESIS UPPER HOOK +#else + -- Skipping xK_toprightparens because your X doesn't define it +#endif +#ifdef XK_botrightparens + xK_botrightparens, -- U+23A0 RIGHT PARENTHESIS LOWER HOOK +#else + -- Skipping xK_botrightparens because your X doesn't define it +#endif +#ifdef XK_leftmiddlecurlybrace + xK_leftmiddlecurlybrace, -- U+23A8 LEFT CURLY BRACKET MIDDLE PIECE +#else + -- Skipping xK_leftmiddlecurlybrace because your X doesn't define it +#endif +#ifdef XK_rightmiddlecurlybrace + xK_rightmiddlecurlybrace, -- U+23AC RIGHT CURLY BRACKET MIDDLE PIECE +#else + -- Skipping xK_rightmiddlecurlybrace because your X doesn't define it +#endif +#ifdef XK_topleftsummation + xK_topleftsummation, +#else + -- Skipping xK_topleftsummation because your X doesn't define it +#endif +#ifdef XK_botleftsummation + xK_botleftsummation, +#else + -- Skipping xK_botleftsummation because your X doesn't define it +#endif +#ifdef XK_topvertsummationconnector + xK_topvertsummationconnector, +#else + -- Skipping xK_topvertsummationconnector because your X doesn't define it +#endif +#ifdef XK_botvertsummationconnector + xK_botvertsummationconnector, +#else + -- Skipping xK_botvertsummationconnector because your X doesn't define it +#endif +#ifdef XK_toprightsummation + xK_toprightsummation, +#else + -- Skipping xK_toprightsummation because your X doesn't define it +#endif +#ifdef XK_botrightsummation + xK_botrightsummation, +#else + -- Skipping xK_botrightsummation because your X doesn't define it +#endif +#ifdef XK_rightmiddlesummation + xK_rightmiddlesummation, +#else + -- Skipping xK_rightmiddlesummation because your X doesn't define it +#endif +#ifdef XK_lessthanequal + xK_lessthanequal, -- U+2264 LESS-THAN OR EQUAL TO +#else + -- Skipping xK_lessthanequal because your X doesn't define it +#endif +#ifdef XK_notequal + xK_notequal, -- U+2260 NOT EQUAL TO +#else + -- Skipping xK_notequal because your X doesn't define it +#endif +#ifdef XK_greaterthanequal + xK_greaterthanequal, -- U+2265 GREATER-THAN OR EQUAL TO +#else + -- Skipping xK_greaterthanequal because your X doesn't define it +#endif +#ifdef XK_integral + xK_integral, -- U+222B INTEGRAL +#else + -- Skipping xK_integral because your X doesn't define it +#endif +#ifdef XK_therefore + xK_therefore, -- U+2234 THEREFORE +#else + -- Skipping xK_therefore because your X doesn't define it +#endif +#ifdef XK_variation + xK_variation, -- U+221D PROPORTIONAL TO +#else + -- Skipping xK_variation because your X doesn't define it +#endif +#ifdef XK_infinity + xK_infinity, -- U+221E INFINITY +#else + -- Skipping xK_infinity because your X doesn't define it +#endif +#ifdef XK_nabla + xK_nabla, -- U+2207 NABLA +#else + -- Skipping xK_nabla because your X doesn't define it +#endif +#ifdef XK_approximate + xK_approximate, -- U+223C TILDE OPERATOR +#else + -- Skipping xK_approximate because your X doesn't define it +#endif +#ifdef XK_similarequal + xK_similarequal, -- U+2243 ASYMPTOTICALLY EQUAL TO +#else + -- Skipping xK_similarequal because your X doesn't define it +#endif +#ifdef XK_ifonlyif + xK_ifonlyif, -- U+21D4 LEFT RIGHT DOUBLE ARROW +#else + -- Skipping xK_ifonlyif because your X doesn't define it +#endif +#ifdef XK_implies + xK_implies, -- U+21D2 RIGHTWARDS DOUBLE ARROW +#else + -- Skipping xK_implies because your X doesn't define it +#endif +#ifdef XK_identical + xK_identical, -- U+2261 IDENTICAL TO +#else + -- Skipping xK_identical because your X doesn't define it +#endif +#ifdef XK_radical + xK_radical, -- U+221A SQUARE ROOT +#else + -- Skipping xK_radical because your X doesn't define it +#endif +#ifdef XK_includedin + xK_includedin, -- U+2282 SUBSET OF +#else + -- Skipping xK_includedin because your X doesn't define it +#endif +#ifdef XK_includes + xK_includes, -- U+2283 SUPERSET OF +#else + -- Skipping xK_includes because your X doesn't define it +#endif +#ifdef XK_intersection + xK_intersection, -- U+2229 INTERSECTION +#else + -- Skipping xK_intersection because your X doesn't define it +#endif +#ifdef XK_union + xK_union, -- U+222A UNION +#else + -- Skipping xK_union because your X doesn't define it +#endif +#ifdef XK_logicaland + xK_logicaland, -- U+2227 LOGICAL AND +#else + -- Skipping xK_logicaland because your X doesn't define it +#endif +#ifdef XK_logicalor + xK_logicalor, -- U+2228 LOGICAL OR +#else + -- Skipping xK_logicalor because your X doesn't define it +#endif +#ifdef XK_partialderivative + xK_partialderivative, -- U+2202 PARTIAL DIFFERENTIAL +#else + -- Skipping xK_partialderivative because your X doesn't define it +#endif +#ifdef XK_function + xK_function, -- U+0192 LATIN SMALL LETTER F WITH HOOK +#else + -- Skipping xK_function because your X doesn't define it +#endif +#ifdef XK_leftarrow + xK_leftarrow, -- U+2190 LEFTWARDS ARROW +#else + -- Skipping xK_leftarrow because your X doesn't define it +#endif +#ifdef XK_uparrow + xK_uparrow, -- U+2191 UPWARDS ARROW +#else + -- Skipping xK_uparrow because your X doesn't define it +#endif +#ifdef XK_rightarrow + xK_rightarrow, -- U+2192 RIGHTWARDS ARROW +#else + -- Skipping xK_rightarrow because your X doesn't define it +#endif +#ifdef XK_downarrow + xK_downarrow, -- U+2193 DOWNWARDS ARROW +#else + -- Skipping xK_downarrow because your X doesn't define it +#endif + + -- XK_SPECIAL +#ifdef XK_blank + xK_blank, +#else + -- Skipping xK_blank because your X doesn't define it +#endif +#ifdef XK_soliddiamond + xK_soliddiamond, -- U+25C6 BLACK DIAMOND +#else + -- Skipping xK_soliddiamond because your X doesn't define it +#endif +#ifdef XK_checkerboard + xK_checkerboard, -- U+2592 MEDIUM SHADE +#else + -- Skipping xK_checkerboard because your X doesn't define it +#endif +#ifdef XK_ht + xK_ht, -- U+2409 SYMBOL FOR HORIZONTAL TABULATION +#else + -- Skipping xK_ht because your X doesn't define it +#endif +#ifdef XK_ff + xK_ff, -- U+240C SYMBOL FOR FORM FEED +#else + -- Skipping xK_ff because your X doesn't define it +#endif +#ifdef XK_cr + xK_cr, -- U+240D SYMBOL FOR CARRIAGE RETURN +#else + -- Skipping xK_cr because your X doesn't define it +#endif +#ifdef XK_lf + xK_lf, -- U+240A SYMBOL FOR LINE FEED +#else + -- Skipping xK_lf because your X doesn't define it +#endif +#ifdef XK_nl + xK_nl, -- U+2424 SYMBOL FOR NEWLINE +#else + -- Skipping xK_nl because your X doesn't define it +#endif +#ifdef XK_vt + xK_vt, -- U+240B SYMBOL FOR VERTICAL TABULATION +#else + -- Skipping xK_vt because your X doesn't define it +#endif +#ifdef XK_lowrightcorner + xK_lowrightcorner, -- U+2518 BOX DRAWINGS LIGHT UP AND LEFT +#else + -- Skipping xK_lowrightcorner because your X doesn't define it +#endif +#ifdef XK_uprightcorner + xK_uprightcorner, -- U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT +#else + -- Skipping xK_uprightcorner because your X doesn't define it +#endif +#ifdef XK_upleftcorner + xK_upleftcorner, -- U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT +#else + -- Skipping xK_upleftcorner because your X doesn't define it +#endif +#ifdef XK_lowleftcorner + xK_lowleftcorner, -- U+2514 BOX DRAWINGS LIGHT UP AND RIGHT +#else + -- Skipping xK_lowleftcorner because your X doesn't define it +#endif +#ifdef XK_crossinglines + xK_crossinglines, -- U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL +#else + -- Skipping xK_crossinglines because your X doesn't define it +#endif +#ifdef XK_horizlinescan1 + xK_horizlinescan1, -- U+23BA HORIZONTAL SCAN LINE-1 +#else + -- Skipping xK_horizlinescan1 because your X doesn't define it +#endif +#ifdef XK_horizlinescan3 + xK_horizlinescan3, -- U+23BB HORIZONTAL SCAN LINE-3 +#else + -- Skipping xK_horizlinescan3 because your X doesn't define it +#endif +#ifdef XK_horizlinescan5 + xK_horizlinescan5, -- U+2500 BOX DRAWINGS LIGHT HORIZONTAL +#else + -- Skipping xK_horizlinescan5 because your X doesn't define it +#endif +#ifdef XK_horizlinescan7 + xK_horizlinescan7, -- U+23BC HORIZONTAL SCAN LINE-7 +#else + -- Skipping xK_horizlinescan7 because your X doesn't define it +#endif +#ifdef XK_horizlinescan9 + xK_horizlinescan9, -- U+23BD HORIZONTAL SCAN LINE-9 +#else + -- Skipping xK_horizlinescan9 because your X doesn't define it +#endif +#ifdef XK_leftt + xK_leftt, -- U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT +#else + -- Skipping xK_leftt because your X doesn't define it +#endif +#ifdef XK_rightt + xK_rightt, -- U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT +#else + -- Skipping xK_rightt because your X doesn't define it +#endif +#ifdef XK_bott + xK_bott, -- U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL +#else + -- Skipping xK_bott because your X doesn't define it +#endif +#ifdef XK_topt + xK_topt, -- U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL +#else + -- Skipping xK_topt because your X doesn't define it +#endif +#ifdef XK_vertbar + xK_vertbar, -- U+2502 BOX DRAWINGS LIGHT VERTICAL +#else + -- Skipping xK_vertbar because your X doesn't define it +#endif + + -- XK_PUBLISHING +#ifdef XK_emspace + xK_emspace, -- U+2003 EM SPACE +#else + -- Skipping xK_emspace because your X doesn't define it +#endif +#ifdef XK_enspace + xK_enspace, -- U+2002 EN SPACE +#else + -- Skipping xK_enspace because your X doesn't define it +#endif +#ifdef XK_em3space + xK_em3space, -- U+2004 THREE-PER-EM SPACE +#else + -- Skipping xK_em3space because your X doesn't define it +#endif +#ifdef XK_em4space + xK_em4space, -- U+2005 FOUR-PER-EM SPACE +#else + -- Skipping xK_em4space because your X doesn't define it +#endif +#ifdef XK_digitspace + xK_digitspace, -- U+2007 FIGURE SPACE +#else + -- Skipping xK_digitspace because your X doesn't define it +#endif +#ifdef XK_punctspace + xK_punctspace, -- U+2008 PUNCTUATION SPACE +#else + -- Skipping xK_punctspace because your X doesn't define it +#endif +#ifdef XK_thinspace + xK_thinspace, -- U+2009 THIN SPACE +#else + -- Skipping xK_thinspace because your X doesn't define it +#endif +#ifdef XK_hairspace + xK_hairspace, -- U+200A HAIR SPACE +#else + -- Skipping xK_hairspace because your X doesn't define it +#endif +#ifdef XK_emdash + xK_emdash, -- U+2014 EM DASH +#else + -- Skipping xK_emdash because your X doesn't define it +#endif +#ifdef XK_endash + xK_endash, -- U+2013 EN DASH +#else + -- Skipping xK_endash because your X doesn't define it +#endif +#ifdef XK_signifblank + xK_signifblank, -- (U+2423 OPEN BOX) +#else + -- Skipping xK_signifblank because your X doesn't define it +#endif +#ifdef XK_ellipsis + xK_ellipsis, -- U+2026 HORIZONTAL ELLIPSIS +#else + -- Skipping xK_ellipsis because your X doesn't define it +#endif +#ifdef XK_doubbaselinedot + xK_doubbaselinedot, -- U+2025 TWO DOT LEADER +#else + -- Skipping xK_doubbaselinedot because your X doesn't define it +#endif +#ifdef XK_onethird + xK_onethird, -- U+2153 VULGAR FRACTION ONE THIRD +#else + -- Skipping xK_onethird because your X doesn't define it +#endif +#ifdef XK_twothirds + xK_twothirds, -- U+2154 VULGAR FRACTION TWO THIRDS +#else + -- Skipping xK_twothirds because your X doesn't define it +#endif +#ifdef XK_onefifth + xK_onefifth, -- U+2155 VULGAR FRACTION ONE FIFTH +#else + -- Skipping xK_onefifth because your X doesn't define it +#endif +#ifdef XK_twofifths + xK_twofifths, -- U+2156 VULGAR FRACTION TWO FIFTHS +#else + -- Skipping xK_twofifths because your X doesn't define it +#endif +#ifdef XK_threefifths + xK_threefifths, -- U+2157 VULGAR FRACTION THREE FIFTHS +#else + -- Skipping xK_threefifths because your X doesn't define it +#endif +#ifdef XK_fourfifths + xK_fourfifths, -- U+2158 VULGAR FRACTION FOUR FIFTHS +#else + -- Skipping xK_fourfifths because your X doesn't define it +#endif +#ifdef XK_onesixth + xK_onesixth, -- U+2159 VULGAR FRACTION ONE SIXTH +#else + -- Skipping xK_onesixth because your X doesn't define it +#endif +#ifdef XK_fivesixths + xK_fivesixths, -- U+215A VULGAR FRACTION FIVE SIXTHS +#else + -- Skipping xK_fivesixths because your X doesn't define it +#endif +#ifdef XK_careof + xK_careof, -- U+2105 CARE OF +#else + -- Skipping xK_careof because your X doesn't define it +#endif +#ifdef XK_figdash + xK_figdash, -- U+2012 FIGURE DASH +#else + -- Skipping xK_figdash because your X doesn't define it +#endif +#ifdef XK_leftanglebracket + xK_leftanglebracket, -- (U+27E8 MATHEMATICAL LEFT ANGLE BRACKET) +#else + -- Skipping xK_leftanglebracket because your X doesn't define it +#endif +#ifdef XK_decimalpoint + xK_decimalpoint, -- (U+002E FULL STOP) +#else + -- Skipping xK_decimalpoint because your X doesn't define it +#endif +#ifdef XK_rightanglebracket + xK_rightanglebracket, -- (U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET) +#else + -- Skipping xK_rightanglebracket because your X doesn't define it +#endif +#ifdef XK_marker + xK_marker, +#else + -- Skipping xK_marker because your X doesn't define it +#endif +#ifdef XK_oneeighth + xK_oneeighth, -- U+215B VULGAR FRACTION ONE EIGHTH +#else + -- Skipping xK_oneeighth because your X doesn't define it +#endif +#ifdef XK_threeeighths + xK_threeeighths, -- U+215C VULGAR FRACTION THREE EIGHTHS +#else + -- Skipping xK_threeeighths because your X doesn't define it +#endif +#ifdef XK_fiveeighths + xK_fiveeighths, -- U+215D VULGAR FRACTION FIVE EIGHTHS +#else + -- Skipping xK_fiveeighths because your X doesn't define it +#endif +#ifdef XK_seveneighths + xK_seveneighths, -- U+215E VULGAR FRACTION SEVEN EIGHTHS +#else + -- Skipping xK_seveneighths because your X doesn't define it +#endif +#ifdef XK_trademark + xK_trademark, -- U+2122 TRADE MARK SIGN +#else + -- Skipping xK_trademark because your X doesn't define it +#endif +#ifdef XK_signaturemark + xK_signaturemark, -- (U+2613 SALTIRE) +#else + -- Skipping xK_signaturemark because your X doesn't define it +#endif +#ifdef XK_trademarkincircle + xK_trademarkincircle, +#else + -- Skipping xK_trademarkincircle because your X doesn't define it +#endif +#ifdef XK_leftopentriangle + xK_leftopentriangle, -- (U+25C1 WHITE LEFT-POINTING TRIANGLE) +#else + -- Skipping xK_leftopentriangle because your X doesn't define it +#endif +#ifdef XK_rightopentriangle + xK_rightopentriangle, -- (U+25B7 WHITE RIGHT-POINTING TRIANGLE) +#else + -- Skipping xK_rightopentriangle because your X doesn't define it +#endif +#ifdef XK_emopencircle + xK_emopencircle, -- (U+25CB WHITE CIRCLE) +#else + -- Skipping xK_emopencircle because your X doesn't define it +#endif +#ifdef XK_emopenrectangle + xK_emopenrectangle, -- (U+25AF WHITE VERTICAL RECTANGLE) +#else + -- Skipping xK_emopenrectangle because your X doesn't define it +#endif +#ifdef XK_leftsinglequotemark + xK_leftsinglequotemark, -- U+2018 LEFT SINGLE QUOTATION MARK +#else + -- Skipping xK_leftsinglequotemark because your X doesn't define it +#endif +#ifdef XK_rightsinglequotemark + xK_rightsinglequotemark, -- U+2019 RIGHT SINGLE QUOTATION MARK +#else + -- Skipping xK_rightsinglequotemark because your X doesn't define it +#endif +#ifdef XK_leftdoublequotemark + xK_leftdoublequotemark, -- U+201C LEFT DOUBLE QUOTATION MARK +#else + -- Skipping xK_leftdoublequotemark because your X doesn't define it +#endif +#ifdef XK_rightdoublequotemark + xK_rightdoublequotemark, -- U+201D RIGHT DOUBLE QUOTATION MARK +#else + -- Skipping xK_rightdoublequotemark because your X doesn't define it +#endif +#ifdef XK_prescription + xK_prescription, -- U+211E PRESCRIPTION TAKE +#else + -- Skipping xK_prescription because your X doesn't define it +#endif +#ifdef XK_minutes + xK_minutes, -- U+2032 PRIME +#else + -- Skipping xK_minutes because your X doesn't define it +#endif +#ifdef XK_seconds + xK_seconds, -- U+2033 DOUBLE PRIME +#else + -- Skipping xK_seconds because your X doesn't define it +#endif +#ifdef XK_latincross + xK_latincross, -- U+271D LATIN CROSS +#else + -- Skipping xK_latincross because your X doesn't define it +#endif +#ifdef XK_hexagram + xK_hexagram, +#else + -- Skipping xK_hexagram because your X doesn't define it +#endif +#ifdef XK_filledrectbullet + xK_filledrectbullet, -- (U+25AC BLACK RECTANGLE) +#else + -- Skipping xK_filledrectbullet because your X doesn't define it +#endif +#ifdef XK_filledlefttribullet + xK_filledlefttribullet, -- (U+25C0 BLACK LEFT-POINTING TRIANGLE) +#else + -- Skipping xK_filledlefttribullet because your X doesn't define it +#endif +#ifdef XK_filledrighttribullet + xK_filledrighttribullet, -- (U+25B6 BLACK RIGHT-POINTING TRIANGLE) +#else + -- Skipping xK_filledrighttribullet because your X doesn't define it +#endif +#ifdef XK_emfilledcircle + xK_emfilledcircle, -- (U+25CF BLACK CIRCLE) +#else + -- Skipping xK_emfilledcircle because your X doesn't define it +#endif +#ifdef XK_emfilledrect + xK_emfilledrect, -- (U+25AE BLACK VERTICAL RECTANGLE) +#else + -- Skipping xK_emfilledrect because your X doesn't define it +#endif +#ifdef XK_enopencircbullet + xK_enopencircbullet, -- (U+25E6 WHITE BULLET) +#else + -- Skipping xK_enopencircbullet because your X doesn't define it +#endif +#ifdef XK_enopensquarebullet + xK_enopensquarebullet, -- (U+25AB WHITE SMALL SQUARE) +#else + -- Skipping xK_enopensquarebullet because your X doesn't define it +#endif +#ifdef XK_openrectbullet + xK_openrectbullet, -- (U+25AD WHITE RECTANGLE) +#else + -- Skipping xK_openrectbullet because your X doesn't define it +#endif +#ifdef XK_opentribulletup + xK_opentribulletup, -- (U+25B3 WHITE UP-POINTING TRIANGLE) +#else + -- Skipping xK_opentribulletup because your X doesn't define it +#endif +#ifdef XK_opentribulletdown + xK_opentribulletdown, -- (U+25BD WHITE DOWN-POINTING TRIANGLE) +#else + -- Skipping xK_opentribulletdown because your X doesn't define it +#endif +#ifdef XK_openstar + xK_openstar, -- (U+2606 WHITE STAR) +#else + -- Skipping xK_openstar because your X doesn't define it +#endif +#ifdef XK_enfilledcircbullet + xK_enfilledcircbullet, -- (U+2022 BULLET) +#else + -- Skipping xK_enfilledcircbullet because your X doesn't define it +#endif +#ifdef XK_enfilledsqbullet + xK_enfilledsqbullet, -- (U+25AA BLACK SMALL SQUARE) +#else + -- Skipping xK_enfilledsqbullet because your X doesn't define it +#endif +#ifdef XK_filledtribulletup + xK_filledtribulletup, -- (U+25B2 BLACK UP-POINTING TRIANGLE) +#else + -- Skipping xK_filledtribulletup because your X doesn't define it +#endif +#ifdef XK_filledtribulletdown + xK_filledtribulletdown, -- (U+25BC BLACK DOWN-POINTING TRIANGLE) +#else + -- Skipping xK_filledtribulletdown because your X doesn't define it +#endif +#ifdef XK_leftpointer + xK_leftpointer, -- (U+261C WHITE LEFT POINTING INDEX) +#else + -- Skipping xK_leftpointer because your X doesn't define it +#endif +#ifdef XK_rightpointer + xK_rightpointer, -- (U+261E WHITE RIGHT POINTING INDEX) +#else + -- Skipping xK_rightpointer because your X doesn't define it +#endif +#ifdef XK_club + xK_club, -- U+2663 BLACK CLUB SUIT +#else + -- Skipping xK_club because your X doesn't define it +#endif +#ifdef XK_diamond + xK_diamond, -- U+2666 BLACK DIAMOND SUIT +#else + -- Skipping xK_diamond because your X doesn't define it +#endif +#ifdef XK_heart + xK_heart, -- U+2665 BLACK HEART SUIT +#else + -- Skipping xK_heart because your X doesn't define it +#endif +#ifdef XK_maltesecross + xK_maltesecross, -- U+2720 MALTESE CROSS +#else + -- Skipping xK_maltesecross because your X doesn't define it +#endif +#ifdef XK_dagger + xK_dagger, -- U+2020 DAGGER +#else + -- Skipping xK_dagger because your X doesn't define it +#endif +#ifdef XK_doubledagger + xK_doubledagger, -- U+2021 DOUBLE DAGGER +#else + -- Skipping xK_doubledagger because your X doesn't define it +#endif +#ifdef XK_checkmark + xK_checkmark, -- U+2713 CHECK MARK +#else + -- Skipping xK_checkmark because your X doesn't define it +#endif +#ifdef XK_ballotcross + xK_ballotcross, -- U+2717 BALLOT X +#else + -- Skipping xK_ballotcross because your X doesn't define it +#endif +#ifdef XK_musicalsharp + xK_musicalsharp, -- U+266F MUSIC SHARP SIGN +#else + -- Skipping xK_musicalsharp because your X doesn't define it +#endif +#ifdef XK_musicalflat + xK_musicalflat, -- U+266D MUSIC FLAT SIGN +#else + -- Skipping xK_musicalflat because your X doesn't define it +#endif +#ifdef XK_malesymbol + xK_malesymbol, -- U+2642 MALE SIGN +#else + -- Skipping xK_malesymbol because your X doesn't define it +#endif +#ifdef XK_femalesymbol + xK_femalesymbol, -- U+2640 FEMALE SIGN +#else + -- Skipping xK_femalesymbol because your X doesn't define it +#endif +#ifdef XK_telephone + xK_telephone, -- U+260E BLACK TELEPHONE +#else + -- Skipping xK_telephone because your X doesn't define it +#endif +#ifdef XK_telephonerecorder + xK_telephonerecorder, -- U+2315 TELEPHONE RECORDER +#else + -- Skipping xK_telephonerecorder because your X doesn't define it +#endif +#ifdef XK_phonographcopyright + xK_phonographcopyright, -- U+2117 SOUND RECORDING COPYRIGHT +#else + -- Skipping xK_phonographcopyright because your X doesn't define it +#endif +#ifdef XK_caret + xK_caret, -- U+2038 CARET +#else + -- Skipping xK_caret because your X doesn't define it +#endif +#ifdef XK_singlelowquotemark + xK_singlelowquotemark, -- U+201A SINGLE LOW-9 QUOTATION MARK +#else + -- Skipping xK_singlelowquotemark because your X doesn't define it +#endif +#ifdef XK_doublelowquotemark + xK_doublelowquotemark, -- U+201E DOUBLE LOW-9 QUOTATION MARK +#else + -- Skipping xK_doublelowquotemark because your X doesn't define it +#endif +#ifdef XK_cursor + xK_cursor, +#else + -- Skipping xK_cursor because your X doesn't define it +#endif + + -- XK_APL +#ifdef XK_leftcaret + xK_leftcaret, -- (U+003C LESS-THAN SIGN) +#else + -- Skipping xK_leftcaret because your X doesn't define it +#endif +#ifdef XK_rightcaret + xK_rightcaret, -- (U+003E GREATER-THAN SIGN) +#else + -- Skipping xK_rightcaret because your X doesn't define it +#endif +#ifdef XK_downcaret + xK_downcaret, -- (U+2228 LOGICAL OR) +#else + -- Skipping xK_downcaret because your X doesn't define it +#endif +#ifdef XK_upcaret + xK_upcaret, -- (U+2227 LOGICAL AND) +#else + -- Skipping xK_upcaret because your X doesn't define it +#endif +#ifdef XK_overbar + xK_overbar, -- (U+00AF MACRON) +#else + -- Skipping xK_overbar because your X doesn't define it +#endif +#ifdef XK_downtack + xK_downtack, -- U+22A5 UP TACK +#else + -- Skipping xK_downtack because your X doesn't define it +#endif +#ifdef XK_upshoe + xK_upshoe, -- (U+2229 INTERSECTION) +#else + -- Skipping xK_upshoe because your X doesn't define it +#endif +#ifdef XK_downstile + xK_downstile, -- U+230A LEFT FLOOR +#else + -- Skipping xK_downstile because your X doesn't define it +#endif +#ifdef XK_underbar + xK_underbar, -- (U+005F LOW LINE) +#else + -- Skipping xK_underbar because your X doesn't define it +#endif +#ifdef XK_jot + xK_jot, -- U+2218 RING OPERATOR +#else + -- Skipping xK_jot because your X doesn't define it +#endif +#ifdef XK_quad + xK_quad, -- U+2395 APL FUNCTIONAL SYMBOL QUAD +#else + -- Skipping xK_quad because your X doesn't define it +#endif +#ifdef XK_uptack + xK_uptack, -- U+22A4 DOWN TACK +#else + -- Skipping xK_uptack because your X doesn't define it +#endif +#ifdef XK_circle + xK_circle, -- U+25CB WHITE CIRCLE +#else + -- Skipping xK_circle because your X doesn't define it +#endif +#ifdef XK_upstile + xK_upstile, -- U+2308 LEFT CEILING +#else + -- Skipping xK_upstile because your X doesn't define it +#endif +#ifdef XK_downshoe + xK_downshoe, -- (U+222A UNION) +#else + -- Skipping xK_downshoe because your X doesn't define it +#endif +#ifdef XK_rightshoe + xK_rightshoe, -- (U+2283 SUPERSET OF) +#else + -- Skipping xK_rightshoe because your X doesn't define it +#endif +#ifdef XK_leftshoe + xK_leftshoe, -- (U+2282 SUBSET OF) +#else + -- Skipping xK_leftshoe because your X doesn't define it +#endif +#ifdef XK_lefttack + xK_lefttack, -- U+22A2 RIGHT TACK +#else + -- Skipping xK_lefttack because your X doesn't define it +#endif +#ifdef XK_righttack + xK_righttack, -- U+22A3 LEFT TACK +#else + -- Skipping xK_righttack because your X doesn't define it +#endif + + -- XK_HEBREW +#ifdef XK_hebrew_doublelowline + xK_hebrew_doublelowline, -- U+2017 DOUBLE LOW LINE +#else + -- Skipping xK_hebrew_doublelowline because your X doesn't define it +#endif +#ifdef XK_hebrew_aleph + xK_hebrew_aleph, -- U+05D0 HEBREW LETTER ALEF +#else + -- Skipping xK_hebrew_aleph because your X doesn't define it +#endif +#ifdef XK_hebrew_bet + xK_hebrew_bet, -- U+05D1 HEBREW LETTER BET +#else + -- Skipping xK_hebrew_bet because your X doesn't define it +#endif +#ifdef XK_hebrew_beth + xK_hebrew_beth, -- deprecated +#else + -- Skipping xK_hebrew_beth because your X doesn't define it +#endif +#ifdef XK_hebrew_gimel + xK_hebrew_gimel, -- U+05D2 HEBREW LETTER GIMEL +#else + -- Skipping xK_hebrew_gimel because your X doesn't define it +#endif +#ifdef XK_hebrew_gimmel + xK_hebrew_gimmel, -- deprecated +#else + -- Skipping xK_hebrew_gimmel because your X doesn't define it +#endif +#ifdef XK_hebrew_dalet + xK_hebrew_dalet, -- U+05D3 HEBREW LETTER DALET +#else + -- Skipping xK_hebrew_dalet because your X doesn't define it +#endif +#ifdef XK_hebrew_daleth + xK_hebrew_daleth, -- deprecated +#else + -- Skipping xK_hebrew_daleth because your X doesn't define it +#endif +#ifdef XK_hebrew_he + xK_hebrew_he, -- U+05D4 HEBREW LETTER HE +#else + -- Skipping xK_hebrew_he because your X doesn't define it +#endif +#ifdef XK_hebrew_waw + xK_hebrew_waw, -- U+05D5 HEBREW LETTER VAV +#else + -- Skipping xK_hebrew_waw because your X doesn't define it +#endif +#ifdef XK_hebrew_zain + xK_hebrew_zain, -- U+05D6 HEBREW LETTER ZAYIN +#else + -- Skipping xK_hebrew_zain because your X doesn't define it +#endif +#ifdef XK_hebrew_zayin + xK_hebrew_zayin, -- deprecated +#else + -- Skipping xK_hebrew_zayin because your X doesn't define it +#endif +#ifdef XK_hebrew_chet + xK_hebrew_chet, -- U+05D7 HEBREW LETTER HET +#else + -- Skipping xK_hebrew_chet because your X doesn't define it +#endif +#ifdef XK_hebrew_het + xK_hebrew_het, -- deprecated +#else + -- Skipping xK_hebrew_het because your X doesn't define it +#endif +#ifdef XK_hebrew_tet + xK_hebrew_tet, -- U+05D8 HEBREW LETTER TET +#else + -- Skipping xK_hebrew_tet because your X doesn't define it +#endif +#ifdef XK_hebrew_teth + xK_hebrew_teth, -- deprecated +#else + -- Skipping xK_hebrew_teth because your X doesn't define it +#endif +#ifdef XK_hebrew_yod + xK_hebrew_yod, -- U+05D9 HEBREW LETTER YOD +#else + -- Skipping xK_hebrew_yod because your X doesn't define it +#endif +#ifdef XK_hebrew_finalkaph + xK_hebrew_finalkaph, -- U+05DA HEBREW LETTER FINAL KAF +#else + -- Skipping xK_hebrew_finalkaph because your X doesn't define it +#endif +#ifdef XK_hebrew_kaph + xK_hebrew_kaph, -- U+05DB HEBREW LETTER KAF +#else + -- Skipping xK_hebrew_kaph because your X doesn't define it +#endif +#ifdef XK_hebrew_lamed + xK_hebrew_lamed, -- U+05DC HEBREW LETTER LAMED +#else + -- Skipping xK_hebrew_lamed because your X doesn't define it +#endif +#ifdef XK_hebrew_finalmem + xK_hebrew_finalmem, -- U+05DD HEBREW LETTER FINAL MEM +#else + -- Skipping xK_hebrew_finalmem because your X doesn't define it +#endif +#ifdef XK_hebrew_mem + xK_hebrew_mem, -- U+05DE HEBREW LETTER MEM +#else + -- Skipping xK_hebrew_mem because your X doesn't define it +#endif +#ifdef XK_hebrew_finalnun + xK_hebrew_finalnun, -- U+05DF HEBREW LETTER FINAL NUN +#else + -- Skipping xK_hebrew_finalnun because your X doesn't define it +#endif +#ifdef XK_hebrew_nun + xK_hebrew_nun, -- U+05E0 HEBREW LETTER NUN +#else + -- Skipping xK_hebrew_nun because your X doesn't define it +#endif +#ifdef XK_hebrew_samech + xK_hebrew_samech, -- U+05E1 HEBREW LETTER SAMEKH +#else + -- Skipping xK_hebrew_samech because your X doesn't define it +#endif +#ifdef XK_hebrew_samekh + xK_hebrew_samekh, -- deprecated +#else + -- Skipping xK_hebrew_samekh because your X doesn't define it +#endif +#ifdef XK_hebrew_ayin + xK_hebrew_ayin, -- U+05E2 HEBREW LETTER AYIN +#else + -- Skipping xK_hebrew_ayin because your X doesn't define it +#endif +#ifdef XK_hebrew_finalpe + xK_hebrew_finalpe, -- U+05E3 HEBREW LETTER FINAL PE +#else + -- Skipping xK_hebrew_finalpe because your X doesn't define it +#endif +#ifdef XK_hebrew_pe + xK_hebrew_pe, -- U+05E4 HEBREW LETTER PE +#else + -- Skipping xK_hebrew_pe because your X doesn't define it +#endif +#ifdef XK_hebrew_finalzade + xK_hebrew_finalzade, -- U+05E5 HEBREW LETTER FINAL TSADI +#else + -- Skipping xK_hebrew_finalzade because your X doesn't define it +#endif +#ifdef XK_hebrew_finalzadi + xK_hebrew_finalzadi, -- deprecated +#else + -- Skipping xK_hebrew_finalzadi because your X doesn't define it +#endif +#ifdef XK_hebrew_zade + xK_hebrew_zade, -- U+05E6 HEBREW LETTER TSADI +#else + -- Skipping xK_hebrew_zade because your X doesn't define it +#endif +#ifdef XK_hebrew_zadi + xK_hebrew_zadi, -- deprecated +#else + -- Skipping xK_hebrew_zadi because your X doesn't define it +#endif +#ifdef XK_hebrew_qoph + xK_hebrew_qoph, -- U+05E7 HEBREW LETTER QOF +#else + -- Skipping xK_hebrew_qoph because your X doesn't define it +#endif +#ifdef XK_hebrew_kuf + xK_hebrew_kuf, -- deprecated +#else + -- Skipping xK_hebrew_kuf because your X doesn't define it +#endif +#ifdef XK_hebrew_resh + xK_hebrew_resh, -- U+05E8 HEBREW LETTER RESH +#else + -- Skipping xK_hebrew_resh because your X doesn't define it +#endif +#ifdef XK_hebrew_shin + xK_hebrew_shin, -- U+05E9 HEBREW LETTER SHIN +#else + -- Skipping xK_hebrew_shin because your X doesn't define it +#endif +#ifdef XK_hebrew_taw + xK_hebrew_taw, -- U+05EA HEBREW LETTER TAV +#else + -- Skipping xK_hebrew_taw because your X doesn't define it +#endif +#ifdef XK_hebrew_taf + xK_hebrew_taf, -- deprecated +#else + -- Skipping xK_hebrew_taf because your X doesn't define it +#endif +#ifdef XK_Hebrew_switch + xK_Hebrew_switch, -- Alias for mode_switch +#else + -- Skipping xK_Hebrew_switch because your X doesn't define it +#endif + + -- XK_THAI +#ifdef XK_Thai_kokai + xK_Thai_kokai, -- U+0E01 THAI CHARACTER KO KAI +#else + -- Skipping xK_Thai_kokai because your X doesn't define it +#endif +#ifdef XK_Thai_khokhai + xK_Thai_khokhai, -- U+0E02 THAI CHARACTER KHO KHAI +#else + -- Skipping xK_Thai_khokhai because your X doesn't define it +#endif +#ifdef XK_Thai_khokhuat + xK_Thai_khokhuat, -- U+0E03 THAI CHARACTER KHO KHUAT +#else + -- Skipping xK_Thai_khokhuat because your X doesn't define it +#endif +#ifdef XK_Thai_khokhwai + xK_Thai_khokhwai, -- U+0E04 THAI CHARACTER KHO KHWAI +#else + -- Skipping xK_Thai_khokhwai because your X doesn't define it +#endif +#ifdef XK_Thai_khokhon + xK_Thai_khokhon, -- U+0E05 THAI CHARACTER KHO KHON +#else + -- Skipping xK_Thai_khokhon because your X doesn't define it +#endif +#ifdef XK_Thai_khorakhang + xK_Thai_khorakhang, -- U+0E06 THAI CHARACTER KHO RAKHANG +#else + -- Skipping xK_Thai_khorakhang because your X doesn't define it +#endif +#ifdef XK_Thai_ngongu + xK_Thai_ngongu, -- U+0E07 THAI CHARACTER NGO NGU +#else + -- Skipping xK_Thai_ngongu because your X doesn't define it +#endif +#ifdef XK_Thai_chochan + xK_Thai_chochan, -- U+0E08 THAI CHARACTER CHO CHAN +#else + -- Skipping xK_Thai_chochan because your X doesn't define it +#endif +#ifdef XK_Thai_choching + xK_Thai_choching, -- U+0E09 THAI CHARACTER CHO CHING +#else + -- Skipping xK_Thai_choching because your X doesn't define it +#endif +#ifdef XK_Thai_chochang + xK_Thai_chochang, -- U+0E0A THAI CHARACTER CHO CHANG +#else + -- Skipping xK_Thai_chochang because your X doesn't define it +#endif +#ifdef XK_Thai_soso + xK_Thai_soso, -- U+0E0B THAI CHARACTER SO SO +#else + -- Skipping xK_Thai_soso because your X doesn't define it +#endif +#ifdef XK_Thai_chochoe + xK_Thai_chochoe, -- U+0E0C THAI CHARACTER CHO CHOE +#else + -- Skipping xK_Thai_chochoe because your X doesn't define it +#endif +#ifdef XK_Thai_yoying + xK_Thai_yoying, -- U+0E0D THAI CHARACTER YO YING +#else + -- Skipping xK_Thai_yoying because your X doesn't define it +#endif +#ifdef XK_Thai_dochada + xK_Thai_dochada, -- U+0E0E THAI CHARACTER DO CHADA +#else + -- Skipping xK_Thai_dochada because your X doesn't define it +#endif +#ifdef XK_Thai_topatak + xK_Thai_topatak, -- U+0E0F THAI CHARACTER TO PATAK +#else + -- Skipping xK_Thai_topatak because your X doesn't define it +#endif +#ifdef XK_Thai_thothan + xK_Thai_thothan, -- U+0E10 THAI CHARACTER THO THAN +#else + -- Skipping xK_Thai_thothan because your X doesn't define it +#endif +#ifdef XK_Thai_thonangmontho + xK_Thai_thonangmontho, -- U+0E11 THAI CHARACTER THO NANGMONTHO +#else + -- Skipping xK_Thai_thonangmontho because your X doesn't define it +#endif +#ifdef XK_Thai_thophuthao + xK_Thai_thophuthao, -- U+0E12 THAI CHARACTER THO PHUTHAO +#else + -- Skipping xK_Thai_thophuthao because your X doesn't define it +#endif +#ifdef XK_Thai_nonen + xK_Thai_nonen, -- U+0E13 THAI CHARACTER NO NEN +#else + -- Skipping xK_Thai_nonen because your X doesn't define it +#endif +#ifdef XK_Thai_dodek + xK_Thai_dodek, -- U+0E14 THAI CHARACTER DO DEK +#else + -- Skipping xK_Thai_dodek because your X doesn't define it +#endif +#ifdef XK_Thai_totao + xK_Thai_totao, -- U+0E15 THAI CHARACTER TO TAO +#else + -- Skipping xK_Thai_totao because your X doesn't define it +#endif +#ifdef XK_Thai_thothung + xK_Thai_thothung, -- U+0E16 THAI CHARACTER THO THUNG +#else + -- Skipping xK_Thai_thothung because your X doesn't define it +#endif +#ifdef XK_Thai_thothahan + xK_Thai_thothahan, -- U+0E17 THAI CHARACTER THO THAHAN +#else + -- Skipping xK_Thai_thothahan because your X doesn't define it +#endif +#ifdef XK_Thai_thothong + xK_Thai_thothong, -- U+0E18 THAI CHARACTER THO THONG +#else + -- Skipping xK_Thai_thothong because your X doesn't define it +#endif +#ifdef XK_Thai_nonu + xK_Thai_nonu, -- U+0E19 THAI CHARACTER NO NU +#else + -- Skipping xK_Thai_nonu because your X doesn't define it +#endif +#ifdef XK_Thai_bobaimai + xK_Thai_bobaimai, -- U+0E1A THAI CHARACTER BO BAIMAI +#else + -- Skipping xK_Thai_bobaimai because your X doesn't define it +#endif +#ifdef XK_Thai_popla + xK_Thai_popla, -- U+0E1B THAI CHARACTER PO PLA +#else + -- Skipping xK_Thai_popla because your X doesn't define it +#endif +#ifdef XK_Thai_phophung + xK_Thai_phophung, -- U+0E1C THAI CHARACTER PHO PHUNG +#else + -- Skipping xK_Thai_phophung because your X doesn't define it +#endif +#ifdef XK_Thai_fofa + xK_Thai_fofa, -- U+0E1D THAI CHARACTER FO FA +#else + -- Skipping xK_Thai_fofa because your X doesn't define it +#endif +#ifdef XK_Thai_phophan + xK_Thai_phophan, -- U+0E1E THAI CHARACTER PHO PHAN +#else + -- Skipping xK_Thai_phophan because your X doesn't define it +#endif +#ifdef XK_Thai_fofan + xK_Thai_fofan, -- U+0E1F THAI CHARACTER FO FAN +#else + -- Skipping xK_Thai_fofan because your X doesn't define it +#endif +#ifdef XK_Thai_phosamphao + xK_Thai_phosamphao, -- U+0E20 THAI CHARACTER PHO SAMPHAO +#else + -- Skipping xK_Thai_phosamphao because your X doesn't define it +#endif +#ifdef XK_Thai_moma + xK_Thai_moma, -- U+0E21 THAI CHARACTER MO MA +#else + -- Skipping xK_Thai_moma because your X doesn't define it +#endif +#ifdef XK_Thai_yoyak + xK_Thai_yoyak, -- U+0E22 THAI CHARACTER YO YAK +#else + -- Skipping xK_Thai_yoyak because your X doesn't define it +#endif +#ifdef XK_Thai_rorua + xK_Thai_rorua, -- U+0E23 THAI CHARACTER RO RUA +#else + -- Skipping xK_Thai_rorua because your X doesn't define it +#endif +#ifdef XK_Thai_ru + xK_Thai_ru, -- U+0E24 THAI CHARACTER RU +#else + -- Skipping xK_Thai_ru because your X doesn't define it +#endif +#ifdef XK_Thai_loling + xK_Thai_loling, -- U+0E25 THAI CHARACTER LO LING +#else + -- Skipping xK_Thai_loling because your X doesn't define it +#endif +#ifdef XK_Thai_lu + xK_Thai_lu, -- U+0E26 THAI CHARACTER LU +#else + -- Skipping xK_Thai_lu because your X doesn't define it +#endif +#ifdef XK_Thai_wowaen + xK_Thai_wowaen, -- U+0E27 THAI CHARACTER WO WAEN +#else + -- Skipping xK_Thai_wowaen because your X doesn't define it +#endif +#ifdef XK_Thai_sosala + xK_Thai_sosala, -- U+0E28 THAI CHARACTER SO SALA +#else + -- Skipping xK_Thai_sosala because your X doesn't define it +#endif +#ifdef XK_Thai_sorusi + xK_Thai_sorusi, -- U+0E29 THAI CHARACTER SO RUSI +#else + -- Skipping xK_Thai_sorusi because your X doesn't define it +#endif +#ifdef XK_Thai_sosua + xK_Thai_sosua, -- U+0E2A THAI CHARACTER SO SUA +#else + -- Skipping xK_Thai_sosua because your X doesn't define it +#endif +#ifdef XK_Thai_hohip + xK_Thai_hohip, -- U+0E2B THAI CHARACTER HO HIP +#else + -- Skipping xK_Thai_hohip because your X doesn't define it +#endif +#ifdef XK_Thai_lochula + xK_Thai_lochula, -- U+0E2C THAI CHARACTER LO CHULA +#else + -- Skipping xK_Thai_lochula because your X doesn't define it +#endif +#ifdef XK_Thai_oang + xK_Thai_oang, -- U+0E2D THAI CHARACTER O ANG +#else + -- Skipping xK_Thai_oang because your X doesn't define it +#endif +#ifdef XK_Thai_honokhuk + xK_Thai_honokhuk, -- U+0E2E THAI CHARACTER HO NOKHUK +#else + -- Skipping xK_Thai_honokhuk because your X doesn't define it +#endif +#ifdef XK_Thai_paiyannoi + xK_Thai_paiyannoi, -- U+0E2F THAI CHARACTER PAIYANNOI +#else + -- Skipping xK_Thai_paiyannoi because your X doesn't define it +#endif +#ifdef XK_Thai_saraa + xK_Thai_saraa, -- U+0E30 THAI CHARACTER SARA A +#else + -- Skipping xK_Thai_saraa because your X doesn't define it +#endif +#ifdef XK_Thai_maihanakat + xK_Thai_maihanakat, -- U+0E31 THAI CHARACTER MAI HAN-AKAT +#else + -- Skipping xK_Thai_maihanakat because your X doesn't define it +#endif +#ifdef XK_Thai_saraaa + xK_Thai_saraaa, -- U+0E32 THAI CHARACTER SARA AA +#else + -- Skipping xK_Thai_saraaa because your X doesn't define it +#endif +#ifdef XK_Thai_saraam + xK_Thai_saraam, -- U+0E33 THAI CHARACTER SARA AM +#else + -- Skipping xK_Thai_saraam because your X doesn't define it +#endif +#ifdef XK_Thai_sarai + xK_Thai_sarai, -- U+0E34 THAI CHARACTER SARA I +#else + -- Skipping xK_Thai_sarai because your X doesn't define it +#endif +#ifdef XK_Thai_saraii + xK_Thai_saraii, -- U+0E35 THAI CHARACTER SARA II +#else + -- Skipping xK_Thai_saraii because your X doesn't define it +#endif +#ifdef XK_Thai_saraue + xK_Thai_saraue, -- U+0E36 THAI CHARACTER SARA UE +#else + -- Skipping xK_Thai_saraue because your X doesn't define it +#endif +#ifdef XK_Thai_sarauee + xK_Thai_sarauee, -- U+0E37 THAI CHARACTER SARA UEE +#else + -- Skipping xK_Thai_sarauee because your X doesn't define it +#endif +#ifdef XK_Thai_sarau + xK_Thai_sarau, -- U+0E38 THAI CHARACTER SARA U +#else + -- Skipping xK_Thai_sarau because your X doesn't define it +#endif +#ifdef XK_Thai_sarauu + xK_Thai_sarauu, -- U+0E39 THAI CHARACTER SARA UU +#else + -- Skipping xK_Thai_sarauu because your X doesn't define it +#endif +#ifdef XK_Thai_phinthu + xK_Thai_phinthu, -- U+0E3A THAI CHARACTER PHINTHU +#else + -- Skipping xK_Thai_phinthu because your X doesn't define it +#endif +#ifdef XK_Thai_maihanakat_maitho + xK_Thai_maihanakat_maitho, +#else + -- Skipping xK_Thai_maihanakat_maitho because your X doesn't define it +#endif +#ifdef XK_Thai_baht + xK_Thai_baht, -- U+0E3F THAI CURRENCY SYMBOL BAHT +#else + -- Skipping xK_Thai_baht because your X doesn't define it +#endif +#ifdef XK_Thai_sarae + xK_Thai_sarae, -- U+0E40 THAI CHARACTER SARA E +#else + -- Skipping xK_Thai_sarae because your X doesn't define it +#endif +#ifdef XK_Thai_saraae + xK_Thai_saraae, -- U+0E41 THAI CHARACTER SARA AE +#else + -- Skipping xK_Thai_saraae because your X doesn't define it +#endif +#ifdef XK_Thai_sarao + xK_Thai_sarao, -- U+0E42 THAI CHARACTER SARA O +#else + -- Skipping xK_Thai_sarao because your X doesn't define it +#endif +#ifdef XK_Thai_saraaimaimuan + xK_Thai_saraaimaimuan, -- U+0E43 THAI CHARACTER SARA AI MAIMUAN +#else + -- Skipping xK_Thai_saraaimaimuan because your X doesn't define it +#endif +#ifdef XK_Thai_saraaimaimalai + xK_Thai_saraaimaimalai, -- U+0E44 THAI CHARACTER SARA AI MAIMALAI +#else + -- Skipping xK_Thai_saraaimaimalai because your X doesn't define it +#endif +#ifdef XK_Thai_lakkhangyao + xK_Thai_lakkhangyao, -- U+0E45 THAI CHARACTER LAKKHANGYAO +#else + -- Skipping xK_Thai_lakkhangyao because your X doesn't define it +#endif +#ifdef XK_Thai_maiyamok + xK_Thai_maiyamok, -- U+0E46 THAI CHARACTER MAIYAMOK +#else + -- Skipping xK_Thai_maiyamok because your X doesn't define it +#endif +#ifdef XK_Thai_maitaikhu + xK_Thai_maitaikhu, -- U+0E47 THAI CHARACTER MAITAIKHU +#else + -- Skipping xK_Thai_maitaikhu because your X doesn't define it +#endif +#ifdef XK_Thai_maiek + xK_Thai_maiek, -- U+0E48 THAI CHARACTER MAI EK +#else + -- Skipping xK_Thai_maiek because your X doesn't define it +#endif +#ifdef XK_Thai_maitho + xK_Thai_maitho, -- U+0E49 THAI CHARACTER MAI THO +#else + -- Skipping xK_Thai_maitho because your X doesn't define it +#endif +#ifdef XK_Thai_maitri + xK_Thai_maitri, -- U+0E4A THAI CHARACTER MAI TRI +#else + -- Skipping xK_Thai_maitri because your X doesn't define it +#endif +#ifdef XK_Thai_maichattawa + xK_Thai_maichattawa, -- U+0E4B THAI CHARACTER MAI CHATTAWA +#else + -- Skipping xK_Thai_maichattawa because your X doesn't define it +#endif +#ifdef XK_Thai_thanthakhat + xK_Thai_thanthakhat, -- U+0E4C THAI CHARACTER THANTHAKHAT +#else + -- Skipping xK_Thai_thanthakhat because your X doesn't define it +#endif +#ifdef XK_Thai_nikhahit + xK_Thai_nikhahit, -- U+0E4D THAI CHARACTER NIKHAHIT +#else + -- Skipping xK_Thai_nikhahit because your X doesn't define it +#endif +#ifdef XK_Thai_leksun + xK_Thai_leksun, -- U+0E50 THAI DIGIT ZERO +#else + -- Skipping xK_Thai_leksun because your X doesn't define it +#endif +#ifdef XK_Thai_leknung + xK_Thai_leknung, -- U+0E51 THAI DIGIT ONE +#else + -- Skipping xK_Thai_leknung because your X doesn't define it +#endif +#ifdef XK_Thai_leksong + xK_Thai_leksong, -- U+0E52 THAI DIGIT TWO +#else + -- Skipping xK_Thai_leksong because your X doesn't define it +#endif +#ifdef XK_Thai_leksam + xK_Thai_leksam, -- U+0E53 THAI DIGIT THREE +#else + -- Skipping xK_Thai_leksam because your X doesn't define it +#endif +#ifdef XK_Thai_leksi + xK_Thai_leksi, -- U+0E54 THAI DIGIT FOUR +#else + -- Skipping xK_Thai_leksi because your X doesn't define it +#endif +#ifdef XK_Thai_lekha + xK_Thai_lekha, -- U+0E55 THAI DIGIT FIVE +#else + -- Skipping xK_Thai_lekha because your X doesn't define it +#endif +#ifdef XK_Thai_lekhok + xK_Thai_lekhok, -- U+0E56 THAI DIGIT SIX +#else + -- Skipping xK_Thai_lekhok because your X doesn't define it +#endif +#ifdef XK_Thai_lekchet + xK_Thai_lekchet, -- U+0E57 THAI DIGIT SEVEN +#else + -- Skipping xK_Thai_lekchet because your X doesn't define it +#endif +#ifdef XK_Thai_lekpaet + xK_Thai_lekpaet, -- U+0E58 THAI DIGIT EIGHT +#else + -- Skipping xK_Thai_lekpaet because your X doesn't define it +#endif +#ifdef XK_Thai_lekkao + xK_Thai_lekkao, -- U+0E59 THAI DIGIT NINE +#else + -- Skipping xK_Thai_lekkao because your X doesn't define it +#endif + + -- XK_KOREAN +#ifdef XK_Hangul + xK_Hangul, -- Hangul start/stop(toggle) +#else + -- Skipping xK_Hangul because your X doesn't define it +#endif +#ifdef XK_Hangul_Start + xK_Hangul_Start, -- Hangul start +#else + -- Skipping xK_Hangul_Start because your X doesn't define it +#endif +#ifdef XK_Hangul_End + xK_Hangul_End, -- Hangul end, English start +#else + -- Skipping xK_Hangul_End because your X doesn't define it +#endif +#ifdef XK_Hangul_Hanja + xK_Hangul_Hanja, -- Start Hangul->Hanja Conversion +#else + -- Skipping xK_Hangul_Hanja because your X doesn't define it +#endif +#ifdef XK_Hangul_Jamo + xK_Hangul_Jamo, -- Hangul Jamo mode +#else + -- Skipping xK_Hangul_Jamo because your X doesn't define it +#endif +#ifdef XK_Hangul_Romaja + xK_Hangul_Romaja, -- Hangul Romaja mode +#else + -- Skipping xK_Hangul_Romaja because your X doesn't define it +#endif +#ifdef XK_Hangul_Codeinput + xK_Hangul_Codeinput, -- Hangul code input mode +#else + -- Skipping xK_Hangul_Codeinput because your X doesn't define it +#endif +#ifdef XK_Hangul_Jeonja + xK_Hangul_Jeonja, -- Jeonja mode +#else + -- Skipping xK_Hangul_Jeonja because your X doesn't define it +#endif +#ifdef XK_Hangul_Banja + xK_Hangul_Banja, -- Banja mode +#else + -- Skipping xK_Hangul_Banja because your X doesn't define it +#endif +#ifdef XK_Hangul_PreHanja + xK_Hangul_PreHanja, -- Pre Hanja conversion +#else + -- Skipping xK_Hangul_PreHanja because your X doesn't define it +#endif +#ifdef XK_Hangul_PostHanja + xK_Hangul_PostHanja, -- Post Hanja conversion +#else + -- Skipping xK_Hangul_PostHanja because your X doesn't define it +#endif +#ifdef XK_Hangul_SingleCandidate + xK_Hangul_SingleCandidate, -- Single candidate +#else + -- Skipping xK_Hangul_SingleCandidate because your X doesn't define it +#endif +#ifdef XK_Hangul_MultipleCandidate + xK_Hangul_MultipleCandidate, -- Multiple candidate +#else + -- Skipping xK_Hangul_MultipleCandidate because your X doesn't define it +#endif +#ifdef XK_Hangul_PreviousCandidate + xK_Hangul_PreviousCandidate, -- Previous candidate +#else + -- Skipping xK_Hangul_PreviousCandidate because your X doesn't define it +#endif +#ifdef XK_Hangul_Special + xK_Hangul_Special, -- Special symbols +#else + -- Skipping xK_Hangul_Special because your X doesn't define it +#endif +#ifdef XK_Hangul_switch + xK_Hangul_switch, -- Alias for mode_switch +#else + -- Skipping xK_Hangul_switch because your X doesn't define it +#endif +#ifdef XK_Hangul_Kiyeog + xK_Hangul_Kiyeog, +#else + -- Skipping xK_Hangul_Kiyeog because your X doesn't define it +#endif +#ifdef XK_Hangul_SsangKiyeog + xK_Hangul_SsangKiyeog, +#else + -- Skipping xK_Hangul_SsangKiyeog because your X doesn't define it +#endif +#ifdef XK_Hangul_KiyeogSios + xK_Hangul_KiyeogSios, +#else + -- Skipping xK_Hangul_KiyeogSios because your X doesn't define it +#endif +#ifdef XK_Hangul_Nieun + xK_Hangul_Nieun, +#else + -- Skipping xK_Hangul_Nieun because your X doesn't define it +#endif +#ifdef XK_Hangul_NieunJieuj + xK_Hangul_NieunJieuj, +#else + -- Skipping xK_Hangul_NieunJieuj because your X doesn't define it +#endif +#ifdef XK_Hangul_NieunHieuh + xK_Hangul_NieunHieuh, +#else + -- Skipping xK_Hangul_NieunHieuh because your X doesn't define it +#endif +#ifdef XK_Hangul_Dikeud + xK_Hangul_Dikeud, +#else + -- Skipping xK_Hangul_Dikeud because your X doesn't define it +#endif +#ifdef XK_Hangul_SsangDikeud + xK_Hangul_SsangDikeud, +#else + -- Skipping xK_Hangul_SsangDikeud because your X doesn't define it +#endif +#ifdef XK_Hangul_Rieul + xK_Hangul_Rieul, +#else + -- Skipping xK_Hangul_Rieul because your X doesn't define it +#endif +#ifdef XK_Hangul_RieulKiyeog + xK_Hangul_RieulKiyeog, +#else + -- Skipping xK_Hangul_RieulKiyeog because your X doesn't define it +#endif +#ifdef XK_Hangul_RieulMieum + xK_Hangul_RieulMieum, +#else + -- Skipping xK_Hangul_RieulMieum because your X doesn't define it +#endif +#ifdef XK_Hangul_RieulPieub + xK_Hangul_RieulPieub, +#else + -- Skipping xK_Hangul_RieulPieub because your X doesn't define it +#endif +#ifdef XK_Hangul_RieulSios + xK_Hangul_RieulSios, +#else + -- Skipping xK_Hangul_RieulSios because your X doesn't define it +#endif +#ifdef XK_Hangul_RieulTieut + xK_Hangul_RieulTieut, +#else + -- Skipping xK_Hangul_RieulTieut because your X doesn't define it +#endif +#ifdef XK_Hangul_RieulPhieuf + xK_Hangul_RieulPhieuf, +#else + -- Skipping xK_Hangul_RieulPhieuf because your X doesn't define it +#endif +#ifdef XK_Hangul_RieulHieuh + xK_Hangul_RieulHieuh, +#else + -- Skipping xK_Hangul_RieulHieuh because your X doesn't define it +#endif +#ifdef XK_Hangul_Mieum + xK_Hangul_Mieum, +#else + -- Skipping xK_Hangul_Mieum because your X doesn't define it +#endif +#ifdef XK_Hangul_Pieub + xK_Hangul_Pieub, +#else + -- Skipping xK_Hangul_Pieub because your X doesn't define it +#endif +#ifdef XK_Hangul_SsangPieub + xK_Hangul_SsangPieub, +#else + -- Skipping xK_Hangul_SsangPieub because your X doesn't define it +#endif +#ifdef XK_Hangul_PieubSios + xK_Hangul_PieubSios, +#else + -- Skipping xK_Hangul_PieubSios because your X doesn't define it +#endif +#ifdef XK_Hangul_Sios + xK_Hangul_Sios, +#else + -- Skipping xK_Hangul_Sios because your X doesn't define it +#endif +#ifdef XK_Hangul_SsangSios + xK_Hangul_SsangSios, +#else + -- Skipping xK_Hangul_SsangSios because your X doesn't define it +#endif +#ifdef XK_Hangul_Ieung + xK_Hangul_Ieung, +#else + -- Skipping xK_Hangul_Ieung because your X doesn't define it +#endif +#ifdef XK_Hangul_Jieuj + xK_Hangul_Jieuj, +#else + -- Skipping xK_Hangul_Jieuj because your X doesn't define it +#endif +#ifdef XK_Hangul_SsangJieuj + xK_Hangul_SsangJieuj, +#else + -- Skipping xK_Hangul_SsangJieuj because your X doesn't define it +#endif +#ifdef XK_Hangul_Cieuc + xK_Hangul_Cieuc, +#else + -- Skipping xK_Hangul_Cieuc because your X doesn't define it +#endif +#ifdef XK_Hangul_Khieuq + xK_Hangul_Khieuq, +#else + -- Skipping xK_Hangul_Khieuq because your X doesn't define it +#endif +#ifdef XK_Hangul_Tieut + xK_Hangul_Tieut, +#else + -- Skipping xK_Hangul_Tieut because your X doesn't define it +#endif +#ifdef XK_Hangul_Phieuf + xK_Hangul_Phieuf, +#else + -- Skipping xK_Hangul_Phieuf because your X doesn't define it +#endif +#ifdef XK_Hangul_Hieuh + xK_Hangul_Hieuh, +#else + -- Skipping xK_Hangul_Hieuh because your X doesn't define it +#endif +#ifdef XK_Hangul_A + xK_Hangul_A, +#else + -- Skipping xK_Hangul_A because your X doesn't define it +#endif +#ifdef XK_Hangul_AE + xK_Hangul_AE, +#else + -- Skipping xK_Hangul_AE because your X doesn't define it +#endif +#ifdef XK_Hangul_YA + xK_Hangul_YA, +#else + -- Skipping xK_Hangul_YA because your X doesn't define it +#endif +#ifdef XK_Hangul_YAE + xK_Hangul_YAE, +#else + -- Skipping xK_Hangul_YAE because your X doesn't define it +#endif +#ifdef XK_Hangul_EO + xK_Hangul_EO, +#else + -- Skipping xK_Hangul_EO because your X doesn't define it +#endif +#ifdef XK_Hangul_E + xK_Hangul_E, +#else + -- Skipping xK_Hangul_E because your X doesn't define it +#endif +#ifdef XK_Hangul_YEO + xK_Hangul_YEO, +#else + -- Skipping xK_Hangul_YEO because your X doesn't define it +#endif +#ifdef XK_Hangul_YE + xK_Hangul_YE, +#else + -- Skipping xK_Hangul_YE because your X doesn't define it +#endif +#ifdef XK_Hangul_O + xK_Hangul_O, +#else + -- Skipping xK_Hangul_O because your X doesn't define it +#endif +#ifdef XK_Hangul_WA + xK_Hangul_WA, +#else + -- Skipping xK_Hangul_WA because your X doesn't define it +#endif +#ifdef XK_Hangul_WAE + xK_Hangul_WAE, +#else + -- Skipping xK_Hangul_WAE because your X doesn't define it +#endif +#ifdef XK_Hangul_OE + xK_Hangul_OE, +#else + -- Skipping xK_Hangul_OE because your X doesn't define it +#endif +#ifdef XK_Hangul_YO + xK_Hangul_YO, +#else + -- Skipping xK_Hangul_YO because your X doesn't define it +#endif +#ifdef XK_Hangul_U + xK_Hangul_U, +#else + -- Skipping xK_Hangul_U because your X doesn't define it +#endif +#ifdef XK_Hangul_WEO + xK_Hangul_WEO, +#else + -- Skipping xK_Hangul_WEO because your X doesn't define it +#endif +#ifdef XK_Hangul_WE + xK_Hangul_WE, +#else + -- Skipping xK_Hangul_WE because your X doesn't define it +#endif +#ifdef XK_Hangul_WI + xK_Hangul_WI, +#else + -- Skipping xK_Hangul_WI because your X doesn't define it +#endif +#ifdef XK_Hangul_YU + xK_Hangul_YU, +#else + -- Skipping xK_Hangul_YU because your X doesn't define it +#endif +#ifdef XK_Hangul_EU + xK_Hangul_EU, +#else + -- Skipping xK_Hangul_EU because your X doesn't define it +#endif +#ifdef XK_Hangul_YI + xK_Hangul_YI, +#else + -- Skipping xK_Hangul_YI because your X doesn't define it +#endif +#ifdef XK_Hangul_I + xK_Hangul_I, +#else + -- Skipping xK_Hangul_I because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Kiyeog + xK_Hangul_J_Kiyeog, +#else + -- Skipping xK_Hangul_J_Kiyeog because your X doesn't define it +#endif +#ifdef XK_Hangul_J_SsangKiyeog + xK_Hangul_J_SsangKiyeog, +#else + -- Skipping xK_Hangul_J_SsangKiyeog because your X doesn't define it +#endif +#ifdef XK_Hangul_J_KiyeogSios + xK_Hangul_J_KiyeogSios, +#else + -- Skipping xK_Hangul_J_KiyeogSios because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Nieun + xK_Hangul_J_Nieun, +#else + -- Skipping xK_Hangul_J_Nieun because your X doesn't define it +#endif +#ifdef XK_Hangul_J_NieunJieuj + xK_Hangul_J_NieunJieuj, +#else + -- Skipping xK_Hangul_J_NieunJieuj because your X doesn't define it +#endif +#ifdef XK_Hangul_J_NieunHieuh + xK_Hangul_J_NieunHieuh, +#else + -- Skipping xK_Hangul_J_NieunHieuh because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Dikeud + xK_Hangul_J_Dikeud, +#else + -- Skipping xK_Hangul_J_Dikeud because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Rieul + xK_Hangul_J_Rieul, +#else + -- Skipping xK_Hangul_J_Rieul because your X doesn't define it +#endif +#ifdef XK_Hangul_J_RieulKiyeog + xK_Hangul_J_RieulKiyeog, +#else + -- Skipping xK_Hangul_J_RieulKiyeog because your X doesn't define it +#endif +#ifdef XK_Hangul_J_RieulMieum + xK_Hangul_J_RieulMieum, +#else + -- Skipping xK_Hangul_J_RieulMieum because your X doesn't define it +#endif +#ifdef XK_Hangul_J_RieulPieub + xK_Hangul_J_RieulPieub, +#else + -- Skipping xK_Hangul_J_RieulPieub because your X doesn't define it +#endif +#ifdef XK_Hangul_J_RieulSios + xK_Hangul_J_RieulSios, +#else + -- Skipping xK_Hangul_J_RieulSios because your X doesn't define it +#endif +#ifdef XK_Hangul_J_RieulTieut + xK_Hangul_J_RieulTieut, +#else + -- Skipping xK_Hangul_J_RieulTieut because your X doesn't define it +#endif +#ifdef XK_Hangul_J_RieulPhieuf + xK_Hangul_J_RieulPhieuf, +#else + -- Skipping xK_Hangul_J_RieulPhieuf because your X doesn't define it +#endif +#ifdef XK_Hangul_J_RieulHieuh + xK_Hangul_J_RieulHieuh, +#else + -- Skipping xK_Hangul_J_RieulHieuh because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Mieum + xK_Hangul_J_Mieum, +#else + -- Skipping xK_Hangul_J_Mieum because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Pieub + xK_Hangul_J_Pieub, +#else + -- Skipping xK_Hangul_J_Pieub because your X doesn't define it +#endif +#ifdef XK_Hangul_J_PieubSios + xK_Hangul_J_PieubSios, +#else + -- Skipping xK_Hangul_J_PieubSios because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Sios + xK_Hangul_J_Sios, +#else + -- Skipping xK_Hangul_J_Sios because your X doesn't define it +#endif +#ifdef XK_Hangul_J_SsangSios + xK_Hangul_J_SsangSios, +#else + -- Skipping xK_Hangul_J_SsangSios because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Ieung + xK_Hangul_J_Ieung, +#else + -- Skipping xK_Hangul_J_Ieung because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Jieuj + xK_Hangul_J_Jieuj, +#else + -- Skipping xK_Hangul_J_Jieuj because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Cieuc + xK_Hangul_J_Cieuc, +#else + -- Skipping xK_Hangul_J_Cieuc because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Khieuq + xK_Hangul_J_Khieuq, +#else + -- Skipping xK_Hangul_J_Khieuq because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Tieut + xK_Hangul_J_Tieut, +#else + -- Skipping xK_Hangul_J_Tieut because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Phieuf + xK_Hangul_J_Phieuf, +#else + -- Skipping xK_Hangul_J_Phieuf because your X doesn't define it +#endif +#ifdef XK_Hangul_J_Hieuh + xK_Hangul_J_Hieuh, +#else + -- Skipping xK_Hangul_J_Hieuh because your X doesn't define it +#endif +#ifdef XK_Hangul_RieulYeorinHieuh + xK_Hangul_RieulYeorinHieuh, +#else + -- Skipping xK_Hangul_RieulYeorinHieuh because your X doesn't define it +#endif +#ifdef XK_Hangul_SunkyeongeumMieum + xK_Hangul_SunkyeongeumMieum, +#else + -- Skipping xK_Hangul_SunkyeongeumMieum because your X doesn't define it +#endif +#ifdef XK_Hangul_SunkyeongeumPieub + xK_Hangul_SunkyeongeumPieub, +#else + -- Skipping xK_Hangul_SunkyeongeumPieub because your X doesn't define it +#endif +#ifdef XK_Hangul_PanSios + xK_Hangul_PanSios, +#else + -- Skipping xK_Hangul_PanSios because your X doesn't define it +#endif +#ifdef XK_Hangul_KkogjiDalrinIeung + xK_Hangul_KkogjiDalrinIeung, +#else + -- Skipping xK_Hangul_KkogjiDalrinIeung because your X doesn't define it +#endif +#ifdef XK_Hangul_SunkyeongeumPhieuf + xK_Hangul_SunkyeongeumPhieuf, +#else + -- Skipping xK_Hangul_SunkyeongeumPhieuf because your X doesn't define it +#endif +#ifdef XK_Hangul_YeorinHieuh + xK_Hangul_YeorinHieuh, +#else + -- Skipping xK_Hangul_YeorinHieuh because your X doesn't define it +#endif +#ifdef XK_Hangul_AraeA + xK_Hangul_AraeA, +#else + -- Skipping xK_Hangul_AraeA because your X doesn't define it +#endif +#ifdef XK_Hangul_AraeAE + xK_Hangul_AraeAE, +#else + -- Skipping xK_Hangul_AraeAE because your X doesn't define it +#endif +#ifdef XK_Hangul_J_PanSios + xK_Hangul_J_PanSios, +#else + -- Skipping xK_Hangul_J_PanSios because your X doesn't define it +#endif +#ifdef XK_Hangul_J_KkogjiDalrinIeung + xK_Hangul_J_KkogjiDalrinIeung, +#else + -- Skipping xK_Hangul_J_KkogjiDalrinIeung because your X doesn't define it +#endif +#ifdef XK_Hangul_J_YeorinHieuh + xK_Hangul_J_YeorinHieuh, +#else + -- Skipping xK_Hangul_J_YeorinHieuh because your X doesn't define it +#endif +#ifdef XK_Korean_Won + xK_Korean_Won, -- (U+20A9 WON SIGN) +#else + -- Skipping xK_Korean_Won because your X doesn't define it +#endif + + -- XK_ARMENIAN +#ifdef XK_Armenian_ligature_ew + xK_Armenian_ligature_ew, -- U+0587 ARMENIAN SMALL LIGATURE ECH YIWN +#else + -- Skipping xK_Armenian_ligature_ew because your X doesn't define it +#endif +#ifdef XK_Armenian_full_stop + xK_Armenian_full_stop, -- U+0589 ARMENIAN FULL STOP +#else + -- Skipping xK_Armenian_full_stop because your X doesn't define it +#endif +#ifdef XK_Armenian_verjaket + xK_Armenian_verjaket, -- U+0589 ARMENIAN FULL STOP +#else + -- Skipping xK_Armenian_verjaket because your X doesn't define it +#endif +#ifdef XK_Armenian_separation_mark + xK_Armenian_separation_mark, -- U+055D ARMENIAN COMMA +#else + -- Skipping xK_Armenian_separation_mark because your X doesn't define it +#endif +#ifdef XK_Armenian_but + xK_Armenian_but, -- U+055D ARMENIAN COMMA +#else + -- Skipping xK_Armenian_but because your X doesn't define it +#endif +#ifdef XK_Armenian_hyphen + xK_Armenian_hyphen, -- U+058A ARMENIAN HYPHEN +#else + -- Skipping xK_Armenian_hyphen because your X doesn't define it +#endif +#ifdef XK_Armenian_yentamna + xK_Armenian_yentamna, -- U+058A ARMENIAN HYPHEN +#else + -- Skipping xK_Armenian_yentamna because your X doesn't define it +#endif +#ifdef XK_Armenian_exclam + xK_Armenian_exclam, -- U+055C ARMENIAN EXCLAMATION MARK +#else + -- Skipping xK_Armenian_exclam because your X doesn't define it +#endif +#ifdef XK_Armenian_amanak + xK_Armenian_amanak, -- U+055C ARMENIAN EXCLAMATION MARK +#else + -- Skipping xK_Armenian_amanak because your X doesn't define it +#endif +#ifdef XK_Armenian_accent + xK_Armenian_accent, -- U+055B ARMENIAN EMPHASIS MARK +#else + -- Skipping xK_Armenian_accent because your X doesn't define it +#endif +#ifdef XK_Armenian_shesht + xK_Armenian_shesht, -- U+055B ARMENIAN EMPHASIS MARK +#else + -- Skipping xK_Armenian_shesht because your X doesn't define it +#endif +#ifdef XK_Armenian_question + xK_Armenian_question, -- U+055E ARMENIAN QUESTION MARK +#else + -- Skipping xK_Armenian_question because your X doesn't define it +#endif +#ifdef XK_Armenian_paruyk + xK_Armenian_paruyk, -- U+055E ARMENIAN QUESTION MARK +#else + -- Skipping xK_Armenian_paruyk because your X doesn't define it +#endif +#ifdef XK_Armenian_AYB + xK_Armenian_AYB, -- U+0531 ARMENIAN CAPITAL LETTER AYB +#else + -- Skipping xK_Armenian_AYB because your X doesn't define it +#endif +#ifdef XK_Armenian_ayb + xK_Armenian_ayb, -- U+0561 ARMENIAN SMALL LETTER AYB +#else + -- Skipping xK_Armenian_ayb because your X doesn't define it +#endif +#ifdef XK_Armenian_BEN + xK_Armenian_BEN, -- U+0532 ARMENIAN CAPITAL LETTER BEN +#else + -- Skipping xK_Armenian_BEN because your X doesn't define it +#endif +#ifdef XK_Armenian_ben + xK_Armenian_ben, -- U+0562 ARMENIAN SMALL LETTER BEN +#else + -- Skipping xK_Armenian_ben because your X doesn't define it +#endif +#ifdef XK_Armenian_GIM + xK_Armenian_GIM, -- U+0533 ARMENIAN CAPITAL LETTER GIM +#else + -- Skipping xK_Armenian_GIM because your X doesn't define it +#endif +#ifdef XK_Armenian_gim + xK_Armenian_gim, -- U+0563 ARMENIAN SMALL LETTER GIM +#else + -- Skipping xK_Armenian_gim because your X doesn't define it +#endif +#ifdef XK_Armenian_DA + xK_Armenian_DA, -- U+0534 ARMENIAN CAPITAL LETTER DA +#else + -- Skipping xK_Armenian_DA because your X doesn't define it +#endif +#ifdef XK_Armenian_da + xK_Armenian_da, -- U+0564 ARMENIAN SMALL LETTER DA +#else + -- Skipping xK_Armenian_da because your X doesn't define it +#endif +#ifdef XK_Armenian_YECH + xK_Armenian_YECH, -- U+0535 ARMENIAN CAPITAL LETTER ECH +#else + -- Skipping xK_Armenian_YECH because your X doesn't define it +#endif +#ifdef XK_Armenian_yech + xK_Armenian_yech, -- U+0565 ARMENIAN SMALL LETTER ECH +#else + -- Skipping xK_Armenian_yech because your X doesn't define it +#endif +#ifdef XK_Armenian_ZA + xK_Armenian_ZA, -- U+0536 ARMENIAN CAPITAL LETTER ZA +#else + -- Skipping xK_Armenian_ZA because your X doesn't define it +#endif +#ifdef XK_Armenian_za + xK_Armenian_za, -- U+0566 ARMENIAN SMALL LETTER ZA +#else + -- Skipping xK_Armenian_za because your X doesn't define it +#endif +#ifdef XK_Armenian_E + xK_Armenian_E, -- U+0537 ARMENIAN CAPITAL LETTER EH +#else + -- Skipping xK_Armenian_E because your X doesn't define it +#endif +#ifdef XK_Armenian_e + xK_Armenian_e, -- U+0567 ARMENIAN SMALL LETTER EH +#else + -- Skipping xK_Armenian_e because your X doesn't define it +#endif +#ifdef XK_Armenian_AT + xK_Armenian_AT, -- U+0538 ARMENIAN CAPITAL LETTER ET +#else + -- Skipping xK_Armenian_AT because your X doesn't define it +#endif +#ifdef XK_Armenian_at + xK_Armenian_at, -- U+0568 ARMENIAN SMALL LETTER ET +#else + -- Skipping xK_Armenian_at because your X doesn't define it +#endif +#ifdef XK_Armenian_TO + xK_Armenian_TO, -- U+0539 ARMENIAN CAPITAL LETTER TO +#else + -- Skipping xK_Armenian_TO because your X doesn't define it +#endif +#ifdef XK_Armenian_to + xK_Armenian_to, -- U+0569 ARMENIAN SMALL LETTER TO +#else + -- Skipping xK_Armenian_to because your X doesn't define it +#endif +#ifdef XK_Armenian_ZHE + xK_Armenian_ZHE, -- U+053A ARMENIAN CAPITAL LETTER ZHE +#else + -- Skipping xK_Armenian_ZHE because your X doesn't define it +#endif +#ifdef XK_Armenian_zhe + xK_Armenian_zhe, -- U+056A ARMENIAN SMALL LETTER ZHE +#else + -- Skipping xK_Armenian_zhe because your X doesn't define it +#endif +#ifdef XK_Armenian_INI + xK_Armenian_INI, -- U+053B ARMENIAN CAPITAL LETTER INI +#else + -- Skipping xK_Armenian_INI because your X doesn't define it +#endif +#ifdef XK_Armenian_ini + xK_Armenian_ini, -- U+056B ARMENIAN SMALL LETTER INI +#else + -- Skipping xK_Armenian_ini because your X doesn't define it +#endif +#ifdef XK_Armenian_LYUN + xK_Armenian_LYUN, -- U+053C ARMENIAN CAPITAL LETTER LIWN +#else + -- Skipping xK_Armenian_LYUN because your X doesn't define it +#endif +#ifdef XK_Armenian_lyun + xK_Armenian_lyun, -- U+056C ARMENIAN SMALL LETTER LIWN +#else + -- Skipping xK_Armenian_lyun because your X doesn't define it +#endif +#ifdef XK_Armenian_KHE + xK_Armenian_KHE, -- U+053D ARMENIAN CAPITAL LETTER XEH +#else + -- Skipping xK_Armenian_KHE because your X doesn't define it +#endif +#ifdef XK_Armenian_khe + xK_Armenian_khe, -- U+056D ARMENIAN SMALL LETTER XEH +#else + -- Skipping xK_Armenian_khe because your X doesn't define it +#endif +#ifdef XK_Armenian_TSA + xK_Armenian_TSA, -- U+053E ARMENIAN CAPITAL LETTER CA +#else + -- Skipping xK_Armenian_TSA because your X doesn't define it +#endif +#ifdef XK_Armenian_tsa + xK_Armenian_tsa, -- U+056E ARMENIAN SMALL LETTER CA +#else + -- Skipping xK_Armenian_tsa because your X doesn't define it +#endif +#ifdef XK_Armenian_KEN + xK_Armenian_KEN, -- U+053F ARMENIAN CAPITAL LETTER KEN +#else + -- Skipping xK_Armenian_KEN because your X doesn't define it +#endif +#ifdef XK_Armenian_ken + xK_Armenian_ken, -- U+056F ARMENIAN SMALL LETTER KEN +#else + -- Skipping xK_Armenian_ken because your X doesn't define it +#endif +#ifdef XK_Armenian_HO + xK_Armenian_HO, -- U+0540 ARMENIAN CAPITAL LETTER HO +#else + -- Skipping xK_Armenian_HO because your X doesn't define it +#endif +#ifdef XK_Armenian_ho + xK_Armenian_ho, -- U+0570 ARMENIAN SMALL LETTER HO +#else + -- Skipping xK_Armenian_ho because your X doesn't define it +#endif +#ifdef XK_Armenian_DZA + xK_Armenian_DZA, -- U+0541 ARMENIAN CAPITAL LETTER JA +#else + -- Skipping xK_Armenian_DZA because your X doesn't define it +#endif +#ifdef XK_Armenian_dza + xK_Armenian_dza, -- U+0571 ARMENIAN SMALL LETTER JA +#else + -- Skipping xK_Armenian_dza because your X doesn't define it +#endif +#ifdef XK_Armenian_GHAT + xK_Armenian_GHAT, -- U+0542 ARMENIAN CAPITAL LETTER GHAD +#else + -- Skipping xK_Armenian_GHAT because your X doesn't define it +#endif +#ifdef XK_Armenian_ghat + xK_Armenian_ghat, -- U+0572 ARMENIAN SMALL LETTER GHAD +#else + -- Skipping xK_Armenian_ghat because your X doesn't define it +#endif +#ifdef XK_Armenian_TCHE + xK_Armenian_TCHE, -- U+0543 ARMENIAN CAPITAL LETTER CHEH +#else + -- Skipping xK_Armenian_TCHE because your X doesn't define it +#endif +#ifdef XK_Armenian_tche + xK_Armenian_tche, -- U+0573 ARMENIAN SMALL LETTER CHEH +#else + -- Skipping xK_Armenian_tche because your X doesn't define it +#endif +#ifdef XK_Armenian_MEN + xK_Armenian_MEN, -- U+0544 ARMENIAN CAPITAL LETTER MEN +#else + -- Skipping xK_Armenian_MEN because your X doesn't define it +#endif +#ifdef XK_Armenian_men + xK_Armenian_men, -- U+0574 ARMENIAN SMALL LETTER MEN +#else + -- Skipping xK_Armenian_men because your X doesn't define it +#endif +#ifdef XK_Armenian_HI + xK_Armenian_HI, -- U+0545 ARMENIAN CAPITAL LETTER YI +#else + -- Skipping xK_Armenian_HI because your X doesn't define it +#endif +#ifdef XK_Armenian_hi + xK_Armenian_hi, -- U+0575 ARMENIAN SMALL LETTER YI +#else + -- Skipping xK_Armenian_hi because your X doesn't define it +#endif +#ifdef XK_Armenian_NU + xK_Armenian_NU, -- U+0546 ARMENIAN CAPITAL LETTER NOW +#else + -- Skipping xK_Armenian_NU because your X doesn't define it +#endif +#ifdef XK_Armenian_nu + xK_Armenian_nu, -- U+0576 ARMENIAN SMALL LETTER NOW +#else + -- Skipping xK_Armenian_nu because your X doesn't define it +#endif +#ifdef XK_Armenian_SHA + xK_Armenian_SHA, -- U+0547 ARMENIAN CAPITAL LETTER SHA +#else + -- Skipping xK_Armenian_SHA because your X doesn't define it +#endif +#ifdef XK_Armenian_sha + xK_Armenian_sha, -- U+0577 ARMENIAN SMALL LETTER SHA +#else + -- Skipping xK_Armenian_sha because your X doesn't define it +#endif +#ifdef XK_Armenian_VO + xK_Armenian_VO, -- U+0548 ARMENIAN CAPITAL LETTER VO +#else + -- Skipping xK_Armenian_VO because your X doesn't define it +#endif +#ifdef XK_Armenian_vo + xK_Armenian_vo, -- U+0578 ARMENIAN SMALL LETTER VO +#else + -- Skipping xK_Armenian_vo because your X doesn't define it +#endif +#ifdef XK_Armenian_CHA + xK_Armenian_CHA, -- U+0549 ARMENIAN CAPITAL LETTER CHA +#else + -- Skipping xK_Armenian_CHA because your X doesn't define it +#endif +#ifdef XK_Armenian_cha + xK_Armenian_cha, -- U+0579 ARMENIAN SMALL LETTER CHA +#else + -- Skipping xK_Armenian_cha because your X doesn't define it +#endif +#ifdef XK_Armenian_PE + xK_Armenian_PE, -- U+054A ARMENIAN CAPITAL LETTER PEH +#else + -- Skipping xK_Armenian_PE because your X doesn't define it +#endif +#ifdef XK_Armenian_pe + xK_Armenian_pe, -- U+057A ARMENIAN SMALL LETTER PEH +#else + -- Skipping xK_Armenian_pe because your X doesn't define it +#endif +#ifdef XK_Armenian_JE + xK_Armenian_JE, -- U+054B ARMENIAN CAPITAL LETTER JHEH +#else + -- Skipping xK_Armenian_JE because your X doesn't define it +#endif +#ifdef XK_Armenian_je + xK_Armenian_je, -- U+057B ARMENIAN SMALL LETTER JHEH +#else + -- Skipping xK_Armenian_je because your X doesn't define it +#endif +#ifdef XK_Armenian_RA + xK_Armenian_RA, -- U+054C ARMENIAN CAPITAL LETTER RA +#else + -- Skipping xK_Armenian_RA because your X doesn't define it +#endif +#ifdef XK_Armenian_ra + xK_Armenian_ra, -- U+057C ARMENIAN SMALL LETTER RA +#else + -- Skipping xK_Armenian_ra because your X doesn't define it +#endif +#ifdef XK_Armenian_SE + xK_Armenian_SE, -- U+054D ARMENIAN CAPITAL LETTER SEH +#else + -- Skipping xK_Armenian_SE because your X doesn't define it +#endif +#ifdef XK_Armenian_se + xK_Armenian_se, -- U+057D ARMENIAN SMALL LETTER SEH +#else + -- Skipping xK_Armenian_se because your X doesn't define it +#endif +#ifdef XK_Armenian_VEV + xK_Armenian_VEV, -- U+054E ARMENIAN CAPITAL LETTER VEW +#else + -- Skipping xK_Armenian_VEV because your X doesn't define it +#endif +#ifdef XK_Armenian_vev + xK_Armenian_vev, -- U+057E ARMENIAN SMALL LETTER VEW +#else + -- Skipping xK_Armenian_vev because your X doesn't define it +#endif +#ifdef XK_Armenian_TYUN + xK_Armenian_TYUN, -- U+054F ARMENIAN CAPITAL LETTER TIWN +#else + -- Skipping xK_Armenian_TYUN because your X doesn't define it +#endif +#ifdef XK_Armenian_tyun + xK_Armenian_tyun, -- U+057F ARMENIAN SMALL LETTER TIWN +#else + -- Skipping xK_Armenian_tyun because your X doesn't define it +#endif +#ifdef XK_Armenian_RE + xK_Armenian_RE, -- U+0550 ARMENIAN CAPITAL LETTER REH +#else + -- Skipping xK_Armenian_RE because your X doesn't define it +#endif +#ifdef XK_Armenian_re + xK_Armenian_re, -- U+0580 ARMENIAN SMALL LETTER REH +#else + -- Skipping xK_Armenian_re because your X doesn't define it +#endif +#ifdef XK_Armenian_TSO + xK_Armenian_TSO, -- U+0551 ARMENIAN CAPITAL LETTER CO +#else + -- Skipping xK_Armenian_TSO because your X doesn't define it +#endif +#ifdef XK_Armenian_tso + xK_Armenian_tso, -- U+0581 ARMENIAN SMALL LETTER CO +#else + -- Skipping xK_Armenian_tso because your X doesn't define it +#endif +#ifdef XK_Armenian_VYUN + xK_Armenian_VYUN, -- U+0552 ARMENIAN CAPITAL LETTER YIWN +#else + -- Skipping xK_Armenian_VYUN because your X doesn't define it +#endif +#ifdef XK_Armenian_vyun + xK_Armenian_vyun, -- U+0582 ARMENIAN SMALL LETTER YIWN +#else + -- Skipping xK_Armenian_vyun because your X doesn't define it +#endif +#ifdef XK_Armenian_PYUR + xK_Armenian_PYUR, -- U+0553 ARMENIAN CAPITAL LETTER PIWR +#else + -- Skipping xK_Armenian_PYUR because your X doesn't define it +#endif +#ifdef XK_Armenian_pyur + xK_Armenian_pyur, -- U+0583 ARMENIAN SMALL LETTER PIWR +#else + -- Skipping xK_Armenian_pyur because your X doesn't define it +#endif +#ifdef XK_Armenian_KE + xK_Armenian_KE, -- U+0554 ARMENIAN CAPITAL LETTER KEH +#else + -- Skipping xK_Armenian_KE because your X doesn't define it +#endif +#ifdef XK_Armenian_ke + xK_Armenian_ke, -- U+0584 ARMENIAN SMALL LETTER KEH +#else + -- Skipping xK_Armenian_ke because your X doesn't define it +#endif +#ifdef XK_Armenian_O + xK_Armenian_O, -- U+0555 ARMENIAN CAPITAL LETTER OH +#else + -- Skipping xK_Armenian_O because your X doesn't define it +#endif +#ifdef XK_Armenian_o + xK_Armenian_o, -- U+0585 ARMENIAN SMALL LETTER OH +#else + -- Skipping xK_Armenian_o because your X doesn't define it +#endif +#ifdef XK_Armenian_FE + xK_Armenian_FE, -- U+0556 ARMENIAN CAPITAL LETTER FEH +#else + -- Skipping xK_Armenian_FE because your X doesn't define it +#endif +#ifdef XK_Armenian_fe + xK_Armenian_fe, -- U+0586 ARMENIAN SMALL LETTER FEH +#else + -- Skipping xK_Armenian_fe because your X doesn't define it +#endif +#ifdef XK_Armenian_apostrophe + xK_Armenian_apostrophe, -- U+055A ARMENIAN APOSTROPHE +#else + -- Skipping xK_Armenian_apostrophe because your X doesn't define it +#endif + + -- XK_GEORGIAN +#ifdef XK_Georgian_an + xK_Georgian_an, -- U+10D0 GEORGIAN LETTER AN +#else + -- Skipping xK_Georgian_an because your X doesn't define it +#endif +#ifdef XK_Georgian_ban + xK_Georgian_ban, -- U+10D1 GEORGIAN LETTER BAN +#else + -- Skipping xK_Georgian_ban because your X doesn't define it +#endif +#ifdef XK_Georgian_gan + xK_Georgian_gan, -- U+10D2 GEORGIAN LETTER GAN +#else + -- Skipping xK_Georgian_gan because your X doesn't define it +#endif +#ifdef XK_Georgian_don + xK_Georgian_don, -- U+10D3 GEORGIAN LETTER DON +#else + -- Skipping xK_Georgian_don because your X doesn't define it +#endif +#ifdef XK_Georgian_en + xK_Georgian_en, -- U+10D4 GEORGIAN LETTER EN +#else + -- Skipping xK_Georgian_en because your X doesn't define it +#endif +#ifdef XK_Georgian_vin + xK_Georgian_vin, -- U+10D5 GEORGIAN LETTER VIN +#else + -- Skipping xK_Georgian_vin because your X doesn't define it +#endif +#ifdef XK_Georgian_zen + xK_Georgian_zen, -- U+10D6 GEORGIAN LETTER ZEN +#else + -- Skipping xK_Georgian_zen because your X doesn't define it +#endif +#ifdef XK_Georgian_tan + xK_Georgian_tan, -- U+10D7 GEORGIAN LETTER TAN +#else + -- Skipping xK_Georgian_tan because your X doesn't define it +#endif +#ifdef XK_Georgian_in + xK_Georgian_in, -- U+10D8 GEORGIAN LETTER IN +#else + -- Skipping xK_Georgian_in because your X doesn't define it +#endif +#ifdef XK_Georgian_kan + xK_Georgian_kan, -- U+10D9 GEORGIAN LETTER KAN +#else + -- Skipping xK_Georgian_kan because your X doesn't define it +#endif +#ifdef XK_Georgian_las + xK_Georgian_las, -- U+10DA GEORGIAN LETTER LAS +#else + -- Skipping xK_Georgian_las because your X doesn't define it +#endif +#ifdef XK_Georgian_man + xK_Georgian_man, -- U+10DB GEORGIAN LETTER MAN +#else + -- Skipping xK_Georgian_man because your X doesn't define it +#endif +#ifdef XK_Georgian_nar + xK_Georgian_nar, -- U+10DC GEORGIAN LETTER NAR +#else + -- Skipping xK_Georgian_nar because your X doesn't define it +#endif +#ifdef XK_Georgian_on + xK_Georgian_on, -- U+10DD GEORGIAN LETTER ON +#else + -- Skipping xK_Georgian_on because your X doesn't define it +#endif +#ifdef XK_Georgian_par + xK_Georgian_par, -- U+10DE GEORGIAN LETTER PAR +#else + -- Skipping xK_Georgian_par because your X doesn't define it +#endif +#ifdef XK_Georgian_zhar + xK_Georgian_zhar, -- U+10DF GEORGIAN LETTER ZHAR +#else + -- Skipping xK_Georgian_zhar because your X doesn't define it +#endif +#ifdef XK_Georgian_rae + xK_Georgian_rae, -- U+10E0 GEORGIAN LETTER RAE +#else + -- Skipping xK_Georgian_rae because your X doesn't define it +#endif +#ifdef XK_Georgian_san + xK_Georgian_san, -- U+10E1 GEORGIAN LETTER SAN +#else + -- Skipping xK_Georgian_san because your X doesn't define it +#endif +#ifdef XK_Georgian_tar + xK_Georgian_tar, -- U+10E2 GEORGIAN LETTER TAR +#else + -- Skipping xK_Georgian_tar because your X doesn't define it +#endif +#ifdef XK_Georgian_un + xK_Georgian_un, -- U+10E3 GEORGIAN LETTER UN +#else + -- Skipping xK_Georgian_un because your X doesn't define it +#endif +#ifdef XK_Georgian_phar + xK_Georgian_phar, -- U+10E4 GEORGIAN LETTER PHAR +#else + -- Skipping xK_Georgian_phar because your X doesn't define it +#endif +#ifdef XK_Georgian_khar + xK_Georgian_khar, -- U+10E5 GEORGIAN LETTER KHAR +#else + -- Skipping xK_Georgian_khar because your X doesn't define it +#endif +#ifdef XK_Georgian_ghan + xK_Georgian_ghan, -- U+10E6 GEORGIAN LETTER GHAN +#else + -- Skipping xK_Georgian_ghan because your X doesn't define it +#endif +#ifdef XK_Georgian_qar + xK_Georgian_qar, -- U+10E7 GEORGIAN LETTER QAR +#else + -- Skipping xK_Georgian_qar because your X doesn't define it +#endif +#ifdef XK_Georgian_shin + xK_Georgian_shin, -- U+10E8 GEORGIAN LETTER SHIN +#else + -- Skipping xK_Georgian_shin because your X doesn't define it +#endif +#ifdef XK_Georgian_chin + xK_Georgian_chin, -- U+10E9 GEORGIAN LETTER CHIN +#else + -- Skipping xK_Georgian_chin because your X doesn't define it +#endif +#ifdef XK_Georgian_can + xK_Georgian_can, -- U+10EA GEORGIAN LETTER CAN +#else + -- Skipping xK_Georgian_can because your X doesn't define it +#endif +#ifdef XK_Georgian_jil + xK_Georgian_jil, -- U+10EB GEORGIAN LETTER JIL +#else + -- Skipping xK_Georgian_jil because your X doesn't define it +#endif +#ifdef XK_Georgian_cil + xK_Georgian_cil, -- U+10EC GEORGIAN LETTER CIL +#else + -- Skipping xK_Georgian_cil because your X doesn't define it +#endif +#ifdef XK_Georgian_char + xK_Georgian_char, -- U+10ED GEORGIAN LETTER CHAR +#else + -- Skipping xK_Georgian_char because your X doesn't define it +#endif +#ifdef XK_Georgian_xan + xK_Georgian_xan, -- U+10EE GEORGIAN LETTER XAN +#else + -- Skipping xK_Georgian_xan because your X doesn't define it +#endif +#ifdef XK_Georgian_jhan + xK_Georgian_jhan, -- U+10EF GEORGIAN LETTER JHAN +#else + -- Skipping xK_Georgian_jhan because your X doesn't define it +#endif +#ifdef XK_Georgian_hae + xK_Georgian_hae, -- U+10F0 GEORGIAN LETTER HAE +#else + -- Skipping xK_Georgian_hae because your X doesn't define it +#endif +#ifdef XK_Georgian_he + xK_Georgian_he, -- U+10F1 GEORGIAN LETTER HE +#else + -- Skipping xK_Georgian_he because your X doesn't define it +#endif +#ifdef XK_Georgian_hie + xK_Georgian_hie, -- U+10F2 GEORGIAN LETTER HIE +#else + -- Skipping xK_Georgian_hie because your X doesn't define it +#endif +#ifdef XK_Georgian_we + xK_Georgian_we, -- U+10F3 GEORGIAN LETTER WE +#else + -- Skipping xK_Georgian_we because your X doesn't define it +#endif +#ifdef XK_Georgian_har + xK_Georgian_har, -- U+10F4 GEORGIAN LETTER HAR +#else + -- Skipping xK_Georgian_har because your X doesn't define it +#endif +#ifdef XK_Georgian_hoe + xK_Georgian_hoe, -- U+10F5 GEORGIAN LETTER HOE +#else + -- Skipping xK_Georgian_hoe because your X doesn't define it +#endif +#ifdef XK_Georgian_fi + xK_Georgian_fi, -- U+10F6 GEORGIAN LETTER FI +#else + -- Skipping xK_Georgian_fi because your X doesn't define it +#endif + + -- XK_CAUCASUS +#ifdef XK_Xabovedot + xK_Xabovedot, -- U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE +#else + -- Skipping xK_Xabovedot because your X doesn't define it +#endif +#ifdef XK_Ibreve + xK_Ibreve, -- U+012C LATIN CAPITAL LETTER I WITH BREVE +#else + -- Skipping xK_Ibreve because your X doesn't define it +#endif +#ifdef XK_Zstroke + xK_Zstroke, -- U+01B5 LATIN CAPITAL LETTER Z WITH STROKE +#else + -- Skipping xK_Zstroke because your X doesn't define it +#endif +#ifdef XK_Gcaron + xK_Gcaron, -- U+01E6 LATIN CAPITAL LETTER G WITH CARON +#else + -- Skipping xK_Gcaron because your X doesn't define it +#endif +#ifdef XK_Ocaron + xK_Ocaron, -- U+01D2 LATIN CAPITAL LETTER O WITH CARON +#else + -- Skipping xK_Ocaron because your X doesn't define it +#endif +#ifdef XK_Obarred + xK_Obarred, -- U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE +#else + -- Skipping xK_Obarred because your X doesn't define it +#endif +#ifdef XK_xabovedot + xK_xabovedot, -- U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE +#else + -- Skipping xK_xabovedot because your X doesn't define it +#endif +#ifdef XK_ibreve + xK_ibreve, -- U+012D LATIN SMALL LETTER I WITH BREVE +#else + -- Skipping xK_ibreve because your X doesn't define it +#endif +#ifdef XK_zstroke + xK_zstroke, -- U+01B6 LATIN SMALL LETTER Z WITH STROKE +#else + -- Skipping xK_zstroke because your X doesn't define it +#endif +#ifdef XK_gcaron + xK_gcaron, -- U+01E7 LATIN SMALL LETTER G WITH CARON +#else + -- Skipping xK_gcaron because your X doesn't define it +#endif +#ifdef XK_ocaron + xK_ocaron, -- U+01D2 LATIN SMALL LETTER O WITH CARON +#else + -- Skipping xK_ocaron because your X doesn't define it +#endif +#ifdef XK_obarred + xK_obarred, -- U+0275 LATIN SMALL LETTER BARRED O +#else + -- Skipping xK_obarred because your X doesn't define it +#endif +#ifdef XK_SCHWA + xK_SCHWA, -- U+018F LATIN CAPITAL LETTER SCHWA +#else + -- Skipping xK_SCHWA because your X doesn't define it +#endif +#ifdef XK_schwa + xK_schwa, -- U+0259 LATIN SMALL LETTER SCHWA +#else + -- Skipping xK_schwa because your X doesn't define it +#endif +#ifdef XK_Lbelowdot + xK_Lbelowdot, -- U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW +#else + -- Skipping xK_Lbelowdot because your X doesn't define it +#endif +#ifdef XK_lbelowdot + xK_lbelowdot, -- U+1E37 LATIN SMALL LETTER L WITH DOT BELOW +#else + -- Skipping xK_lbelowdot because your X doesn't define it +#endif + + -- XK_VIETNAMESE +#ifdef XK_Abelowdot + xK_Abelowdot, -- U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW +#else + -- Skipping xK_Abelowdot because your X doesn't define it +#endif +#ifdef XK_abelowdot + xK_abelowdot, -- U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW +#else + -- Skipping xK_abelowdot because your X doesn't define it +#endif +#ifdef XK_Ahook + xK_Ahook, -- U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE +#else + -- Skipping xK_Ahook because your X doesn't define it +#endif +#ifdef XK_ahook + xK_ahook, -- U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE +#else + -- Skipping xK_ahook because your X doesn't define it +#endif +#ifdef XK_Acircumflexacute + xK_Acircumflexacute, -- U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +#else + -- Skipping xK_Acircumflexacute because your X doesn't define it +#endif +#ifdef XK_acircumflexacute + xK_acircumflexacute, -- U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +#else + -- Skipping xK_acircumflexacute because your X doesn't define it +#endif +#ifdef XK_Acircumflexgrave + xK_Acircumflexgrave, -- U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE +#else + -- Skipping xK_Acircumflexgrave because your X doesn't define it +#endif +#ifdef XK_acircumflexgrave + xK_acircumflexgrave, -- U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +#else + -- Skipping xK_acircumflexgrave because your X doesn't define it +#endif +#ifdef XK_Acircumflexhook + xK_Acircumflexhook, -- U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +#else + -- Skipping xK_Acircumflexhook because your X doesn't define it +#endif +#ifdef XK_acircumflexhook + xK_acircumflexhook, -- U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +#else + -- Skipping xK_acircumflexhook because your X doesn't define it +#endif +#ifdef XK_Acircumflextilde + xK_Acircumflextilde, -- U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE +#else + -- Skipping xK_Acircumflextilde because your X doesn't define it +#endif +#ifdef XK_acircumflextilde + xK_acircumflextilde, -- U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +#else + -- Skipping xK_acircumflextilde because your X doesn't define it +#endif +#ifdef XK_Acircumflexbelowdot + xK_Acircumflexbelowdot, -- U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW +#else + -- Skipping xK_Acircumflexbelowdot because your X doesn't define it +#endif +#ifdef XK_acircumflexbelowdot + xK_acircumflexbelowdot, -- U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW +#else + -- Skipping xK_acircumflexbelowdot because your X doesn't define it +#endif +#ifdef XK_Abreveacute + xK_Abreveacute, -- U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +#else + -- Skipping xK_Abreveacute because your X doesn't define it +#endif +#ifdef XK_abreveacute + xK_abreveacute, -- U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE +#else + -- Skipping xK_abreveacute because your X doesn't define it +#endif +#ifdef XK_Abrevegrave + xK_Abrevegrave, -- U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +#else + -- Skipping xK_Abrevegrave because your X doesn't define it +#endif +#ifdef XK_abrevegrave + xK_abrevegrave, -- U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE +#else + -- Skipping xK_abrevegrave because your X doesn't define it +#endif +#ifdef XK_Abrevehook + xK_Abrevehook, -- U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +#else + -- Skipping xK_Abrevehook because your X doesn't define it +#endif +#ifdef XK_abrevehook + xK_abrevehook, -- U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +#else + -- Skipping xK_abrevehook because your X doesn't define it +#endif +#ifdef XK_Abrevetilde + xK_Abrevetilde, -- U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE +#else + -- Skipping xK_Abrevetilde because your X doesn't define it +#endif +#ifdef XK_abrevetilde + xK_abrevetilde, -- U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE +#else + -- Skipping xK_abrevetilde because your X doesn't define it +#endif +#ifdef XK_Abrevebelowdot + xK_Abrevebelowdot, -- U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +#else + -- Skipping xK_Abrevebelowdot because your X doesn't define it +#endif +#ifdef XK_abrevebelowdot + xK_abrevebelowdot, -- U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +#else + -- Skipping xK_abrevebelowdot because your X doesn't define it +#endif +#ifdef XK_Ebelowdot + xK_Ebelowdot, -- U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW +#else + -- Skipping xK_Ebelowdot because your X doesn't define it +#endif +#ifdef XK_ebelowdot + xK_ebelowdot, -- U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW +#else + -- Skipping xK_ebelowdot because your X doesn't define it +#endif +#ifdef XK_Ehook + xK_Ehook, -- U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE +#else + -- Skipping xK_Ehook because your X doesn't define it +#endif +#ifdef XK_ehook + xK_ehook, -- U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE +#else + -- Skipping xK_ehook because your X doesn't define it +#endif +#ifdef XK_Etilde + xK_Etilde, -- U+1EBC LATIN CAPITAL LETTER E WITH TILDE +#else + -- Skipping xK_Etilde because your X doesn't define it +#endif +#ifdef XK_etilde + xK_etilde, -- U+1EBD LATIN SMALL LETTER E WITH TILDE +#else + -- Skipping xK_etilde because your X doesn't define it +#endif +#ifdef XK_Ecircumflexacute + xK_Ecircumflexacute, -- U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +#else + -- Skipping xK_Ecircumflexacute because your X doesn't define it +#endif +#ifdef XK_ecircumflexacute + xK_ecircumflexacute, -- U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +#else + -- Skipping xK_ecircumflexacute because your X doesn't define it +#endif +#ifdef XK_Ecircumflexgrave + xK_Ecircumflexgrave, -- U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE +#else + -- Skipping xK_Ecircumflexgrave because your X doesn't define it +#endif +#ifdef XK_ecircumflexgrave + xK_ecircumflexgrave, -- U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +#else + -- Skipping xK_ecircumflexgrave because your X doesn't define it +#endif +#ifdef XK_Ecircumflexhook + xK_Ecircumflexhook, -- U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +#else + -- Skipping xK_Ecircumflexhook because your X doesn't define it +#endif +#ifdef XK_ecircumflexhook + xK_ecircumflexhook, -- U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +#else + -- Skipping xK_ecircumflexhook because your X doesn't define it +#endif +#ifdef XK_Ecircumflextilde + xK_Ecircumflextilde, -- U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE +#else + -- Skipping xK_Ecircumflextilde because your X doesn't define it +#endif +#ifdef XK_ecircumflextilde + xK_ecircumflextilde, -- U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +#else + -- Skipping xK_ecircumflextilde because your X doesn't define it +#endif +#ifdef XK_Ecircumflexbelowdot + xK_Ecircumflexbelowdot, -- U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW +#else + -- Skipping xK_Ecircumflexbelowdot because your X doesn't define it +#endif +#ifdef XK_ecircumflexbelowdot + xK_ecircumflexbelowdot, -- U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW +#else + -- Skipping xK_ecircumflexbelowdot because your X doesn't define it +#endif +#ifdef XK_Ihook + xK_Ihook, -- U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE +#else + -- Skipping xK_Ihook because your X doesn't define it +#endif +#ifdef XK_ihook + xK_ihook, -- U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE +#else + -- Skipping xK_ihook because your X doesn't define it +#endif +#ifdef XK_Ibelowdot + xK_Ibelowdot, -- U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW +#else + -- Skipping xK_Ibelowdot because your X doesn't define it +#endif +#ifdef XK_ibelowdot + xK_ibelowdot, -- U+1ECB LATIN SMALL LETTER I WITH DOT BELOW +#else + -- Skipping xK_ibelowdot because your X doesn't define it +#endif +#ifdef XK_Obelowdot + xK_Obelowdot, -- U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW +#else + -- Skipping xK_Obelowdot because your X doesn't define it +#endif +#ifdef XK_obelowdot + xK_obelowdot, -- U+1ECD LATIN SMALL LETTER O WITH DOT BELOW +#else + -- Skipping xK_obelowdot because your X doesn't define it +#endif +#ifdef XK_Ohook + xK_Ohook, -- U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE +#else + -- Skipping xK_Ohook because your X doesn't define it +#endif +#ifdef XK_ohook + xK_ohook, -- U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE +#else + -- Skipping xK_ohook because your X doesn't define it +#endif +#ifdef XK_Ocircumflexacute + xK_Ocircumflexacute, -- U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +#else + -- Skipping xK_Ocircumflexacute because your X doesn't define it +#endif +#ifdef XK_ocircumflexacute + xK_ocircumflexacute, -- U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +#else + -- Skipping xK_ocircumflexacute because your X doesn't define it +#endif +#ifdef XK_Ocircumflexgrave + xK_Ocircumflexgrave, -- U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE +#else + -- Skipping xK_Ocircumflexgrave because your X doesn't define it +#endif +#ifdef XK_ocircumflexgrave + xK_ocircumflexgrave, -- U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +#else + -- Skipping xK_ocircumflexgrave because your X doesn't define it +#endif +#ifdef XK_Ocircumflexhook + xK_Ocircumflexhook, -- U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +#else + -- Skipping xK_Ocircumflexhook because your X doesn't define it +#endif +#ifdef XK_ocircumflexhook + xK_ocircumflexhook, -- U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +#else + -- Skipping xK_ocircumflexhook because your X doesn't define it +#endif +#ifdef XK_Ocircumflextilde + xK_Ocircumflextilde, -- U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE +#else + -- Skipping xK_Ocircumflextilde because your X doesn't define it +#endif +#ifdef XK_ocircumflextilde + xK_ocircumflextilde, -- U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +#else + -- Skipping xK_ocircumflextilde because your X doesn't define it +#endif +#ifdef XK_Ocircumflexbelowdot + xK_Ocircumflexbelowdot, -- U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW +#else + -- Skipping xK_Ocircumflexbelowdot because your X doesn't define it +#endif +#ifdef XK_ocircumflexbelowdot + xK_ocircumflexbelowdot, -- U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW +#else + -- Skipping xK_ocircumflexbelowdot because your X doesn't define it +#endif +#ifdef XK_Ohornacute + xK_Ohornacute, -- U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE +#else + -- Skipping xK_Ohornacute because your X doesn't define it +#endif +#ifdef XK_ohornacute + xK_ohornacute, -- U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE +#else + -- Skipping xK_ohornacute because your X doesn't define it +#endif +#ifdef XK_Ohorngrave + xK_Ohorngrave, -- U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE +#else + -- Skipping xK_Ohorngrave because your X doesn't define it +#endif +#ifdef XK_ohorngrave + xK_ohorngrave, -- U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE +#else + -- Skipping xK_ohorngrave because your X doesn't define it +#endif +#ifdef XK_Ohornhook + xK_Ohornhook, -- U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE +#else + -- Skipping xK_Ohornhook because your X doesn't define it +#endif +#ifdef XK_ohornhook + xK_ohornhook, -- U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +#else + -- Skipping xK_ohornhook because your X doesn't define it +#endif +#ifdef XK_Ohorntilde + xK_Ohorntilde, -- U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE +#else + -- Skipping xK_Ohorntilde because your X doesn't define it +#endif +#ifdef XK_ohorntilde + xK_ohorntilde, -- U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE +#else + -- Skipping xK_ohorntilde because your X doesn't define it +#endif +#ifdef XK_Ohornbelowdot + xK_Ohornbelowdot, -- U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW +#else + -- Skipping xK_Ohornbelowdot because your X doesn't define it +#endif +#ifdef XK_ohornbelowdot + xK_ohornbelowdot, -- U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW +#else + -- Skipping xK_ohornbelowdot because your X doesn't define it +#endif +#ifdef XK_Ubelowdot + xK_Ubelowdot, -- U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW +#else + -- Skipping xK_Ubelowdot because your X doesn't define it +#endif +#ifdef XK_ubelowdot + xK_ubelowdot, -- U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW +#else + -- Skipping xK_ubelowdot because your X doesn't define it +#endif +#ifdef XK_Uhook + xK_Uhook, -- U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE +#else + -- Skipping xK_Uhook because your X doesn't define it +#endif +#ifdef XK_uhook + xK_uhook, -- U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE +#else + -- Skipping xK_uhook because your X doesn't define it +#endif +#ifdef XK_Uhornacute + xK_Uhornacute, -- U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE +#else + -- Skipping xK_Uhornacute because your X doesn't define it +#endif +#ifdef XK_uhornacute + xK_uhornacute, -- U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE +#else + -- Skipping xK_uhornacute because your X doesn't define it +#endif +#ifdef XK_Uhorngrave + xK_Uhorngrave, -- U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE +#else + -- Skipping xK_Uhorngrave because your X doesn't define it +#endif +#ifdef XK_uhorngrave + xK_uhorngrave, -- U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE +#else + -- Skipping xK_uhorngrave because your X doesn't define it +#endif +#ifdef XK_Uhornhook + xK_Uhornhook, -- U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE +#else + -- Skipping xK_Uhornhook because your X doesn't define it +#endif +#ifdef XK_uhornhook + xK_uhornhook, -- U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +#else + -- Skipping xK_uhornhook because your X doesn't define it +#endif +#ifdef XK_Uhorntilde + xK_Uhorntilde, -- U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE +#else + -- Skipping xK_Uhorntilde because your X doesn't define it +#endif +#ifdef XK_uhorntilde + xK_uhorntilde, -- U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE +#else + -- Skipping xK_uhorntilde because your X doesn't define it +#endif +#ifdef XK_Uhornbelowdot + xK_Uhornbelowdot, -- U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW +#else + -- Skipping xK_Uhornbelowdot because your X doesn't define it +#endif +#ifdef XK_uhornbelowdot + xK_uhornbelowdot, -- U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW +#else + -- Skipping xK_uhornbelowdot because your X doesn't define it +#endif +#ifdef XK_Ybelowdot + xK_Ybelowdot, -- U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW +#else + -- Skipping xK_Ybelowdot because your X doesn't define it +#endif +#ifdef XK_ybelowdot + xK_ybelowdot, -- U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW +#else + -- Skipping xK_ybelowdot because your X doesn't define it +#endif +#ifdef XK_Yhook + xK_Yhook, -- U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE +#else + -- Skipping xK_Yhook because your X doesn't define it +#endif +#ifdef XK_yhook + xK_yhook, -- U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE +#else + -- Skipping xK_yhook because your X doesn't define it +#endif +#ifdef XK_Ytilde + xK_Ytilde, -- U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE +#else + -- Skipping xK_Ytilde because your X doesn't define it +#endif +#ifdef XK_ytilde + xK_ytilde, -- U+1EF9 LATIN SMALL LETTER Y WITH TILDE +#else + -- Skipping xK_ytilde because your X doesn't define it +#endif +#ifdef XK_Ohorn + xK_Ohorn, -- U+01A0 LATIN CAPITAL LETTER O WITH HORN +#else + -- Skipping xK_Ohorn because your X doesn't define it +#endif +#ifdef XK_ohorn + xK_ohorn, -- U+01A1 LATIN SMALL LETTER O WITH HORN +#else + -- Skipping xK_ohorn because your X doesn't define it +#endif +#ifdef XK_Uhorn + xK_Uhorn, -- U+01AF LATIN CAPITAL LETTER U WITH HORN +#else + -- Skipping xK_Uhorn because your X doesn't define it +#endif +#ifdef XK_uhorn + xK_uhorn, -- U+01B0 LATIN SMALL LETTER U WITH HORN +#else + -- Skipping xK_uhorn because your X doesn't define it +#endif + + -- XK_CURRENCY +#ifdef XK_EcuSign + xK_EcuSign, -- U+20A0 EURO-CURRENCY SIGN +#else + -- Skipping xK_EcuSign because your X doesn't define it +#endif +#ifdef XK_ColonSign + xK_ColonSign, -- U+20A1 COLON SIGN +#else + -- Skipping xK_ColonSign because your X doesn't define it +#endif +#ifdef XK_CruzeiroSign + xK_CruzeiroSign, -- U+20A2 CRUZEIRO SIGN +#else + -- Skipping xK_CruzeiroSign because your X doesn't define it +#endif +#ifdef XK_FFrancSign + xK_FFrancSign, -- U+20A3 FRENCH FRANC SIGN +#else + -- Skipping xK_FFrancSign because your X doesn't define it +#endif +#ifdef XK_LiraSign + xK_LiraSign, -- U+20A4 LIRA SIGN +#else + -- Skipping xK_LiraSign because your X doesn't define it +#endif +#ifdef XK_MillSign + xK_MillSign, -- U+20A5 MILL SIGN +#else + -- Skipping xK_MillSign because your X doesn't define it +#endif +#ifdef XK_NairaSign + xK_NairaSign, -- U+20A6 NAIRA SIGN +#else + -- Skipping xK_NairaSign because your X doesn't define it +#endif +#ifdef XK_PesetaSign + xK_PesetaSign, -- U+20A7 PESETA SIGN +#else + -- Skipping xK_PesetaSign because your X doesn't define it +#endif +#ifdef XK_RupeeSign + xK_RupeeSign, -- U+20A8 RUPEE SIGN +#else + -- Skipping xK_RupeeSign because your X doesn't define it +#endif +#ifdef XK_WonSign + xK_WonSign, -- U+20A9 WON SIGN +#else + -- Skipping xK_WonSign because your X doesn't define it +#endif +#ifdef XK_NewSheqelSign + xK_NewSheqelSign, -- U+20AA NEW SHEQEL SIGN +#else + -- Skipping xK_NewSheqelSign because your X doesn't define it +#endif +#ifdef XK_DongSign + xK_DongSign, -- U+20AB DONG SIGN +#else + -- Skipping xK_DongSign because your X doesn't define it +#endif +#ifdef XK_EuroSign + xK_EuroSign, -- U+20AC EURO SIGN +#else + -- Skipping xK_EuroSign because your X doesn't define it +#endif + + -- XK_MATHEMATICAL +#ifdef XK_zerosuperior + xK_zerosuperior, -- U+2070 SUPERSCRIPT ZERO +#else + -- Skipping xK_zerosuperior because your X doesn't define it +#endif +#ifdef XK_foursuperior + xK_foursuperior, -- U+2074 SUPERSCRIPT FOUR +#else + -- Skipping xK_foursuperior because your X doesn't define it +#endif +#ifdef XK_fivesuperior + xK_fivesuperior, -- U+2075 SUPERSCRIPT FIVE +#else + -- Skipping xK_fivesuperior because your X doesn't define it +#endif +#ifdef XK_sixsuperior + xK_sixsuperior, -- U+2076 SUPERSCRIPT SIX +#else + -- Skipping xK_sixsuperior because your X doesn't define it +#endif +#ifdef XK_sevensuperior + xK_sevensuperior, -- U+2077 SUPERSCRIPT SEVEN +#else + -- Skipping xK_sevensuperior because your X doesn't define it +#endif +#ifdef XK_eightsuperior + xK_eightsuperior, -- U+2078 SUPERSCRIPT EIGHT +#else + -- Skipping xK_eightsuperior because your X doesn't define it +#endif +#ifdef XK_ninesuperior + xK_ninesuperior, -- U+2079 SUPERSCRIPT NINE +#else + -- Skipping xK_ninesuperior because your X doesn't define it +#endif +#ifdef XK_zerosubscript + xK_zerosubscript, -- U+2080 SUBSCRIPT ZERO +#else + -- Skipping xK_zerosubscript because your X doesn't define it +#endif +#ifdef XK_onesubscript + xK_onesubscript, -- U+2081 SUBSCRIPT ONE +#else + -- Skipping xK_onesubscript because your X doesn't define it +#endif +#ifdef XK_twosubscript + xK_twosubscript, -- U+2082 SUBSCRIPT TWO +#else + -- Skipping xK_twosubscript because your X doesn't define it +#endif +#ifdef XK_threesubscript + xK_threesubscript, -- U+2083 SUBSCRIPT THREE +#else + -- Skipping xK_threesubscript because your X doesn't define it +#endif +#ifdef XK_foursubscript + xK_foursubscript, -- U+2084 SUBSCRIPT FOUR +#else + -- Skipping xK_foursubscript because your X doesn't define it +#endif +#ifdef XK_fivesubscript + xK_fivesubscript, -- U+2085 SUBSCRIPT FIVE +#else + -- Skipping xK_fivesubscript because your X doesn't define it +#endif +#ifdef XK_sixsubscript + xK_sixsubscript, -- U+2086 SUBSCRIPT SIX +#else + -- Skipping xK_sixsubscript because your X doesn't define it +#endif +#ifdef XK_sevensubscript + xK_sevensubscript, -- U+2087 SUBSCRIPT SEVEN +#else + -- Skipping xK_sevensubscript because your X doesn't define it +#endif +#ifdef XK_eightsubscript + xK_eightsubscript, -- U+2088 SUBSCRIPT EIGHT +#else + -- Skipping xK_eightsubscript because your X doesn't define it +#endif +#ifdef XK_ninesubscript + xK_ninesubscript, -- U+2089 SUBSCRIPT NINE +#else + -- Skipping xK_ninesubscript because your X doesn't define it +#endif +#ifdef XK_partdifferential + xK_partdifferential, -- U+2202 PARTIAL DIFFERENTIAL +#else + -- Skipping xK_partdifferential because your X doesn't define it +#endif +#ifdef XK_emptyset + xK_emptyset, -- U+2205 NULL SET +#else + -- Skipping xK_emptyset because your X doesn't define it +#endif +#ifdef XK_elementof + xK_elementof, -- U+2208 ELEMENT OF +#else + -- Skipping xK_elementof because your X doesn't define it +#endif +#ifdef XK_notelementof + xK_notelementof, -- U+2209 NOT AN ELEMENT OF +#else + -- Skipping xK_notelementof because your X doesn't define it +#endif +#ifdef XK_containsas + xK_containsas, -- U+220B CONTAINS AS MEMBER +#else + -- Skipping xK_containsas because your X doesn't define it +#endif +#ifdef XK_squareroot + xK_squareroot, -- U+221A SQUARE ROOT +#else + -- Skipping xK_squareroot because your X doesn't define it +#endif +#ifdef XK_cuberoot + xK_cuberoot, -- U+221B CUBE ROOT +#else + -- Skipping xK_cuberoot because your X doesn't define it +#endif +#ifdef XK_fourthroot + xK_fourthroot, -- U+221C FOURTH ROOT +#else + -- Skipping xK_fourthroot because your X doesn't define it +#endif +#ifdef XK_dintegral + xK_dintegral, -- U+222C DOUBLE INTEGRAL +#else + -- Skipping xK_dintegral because your X doesn't define it +#endif +#ifdef XK_tintegral + xK_tintegral, -- U+222D TRIPLE INTEGRAL +#else + -- Skipping xK_tintegral because your X doesn't define it +#endif +#ifdef XK_because + xK_because, -- U+2235 BECAUSE +#else + -- Skipping xK_because because your X doesn't define it +#endif +#ifdef XK_approxeq + xK_approxeq, -- U+2245 ALMOST EQUAL TO +#else + -- Skipping xK_approxeq because your X doesn't define it +#endif +#ifdef XK_notapproxeq + xK_notapproxeq, -- U+2247 NOT ALMOST EQUAL TO +#else + -- Skipping xK_notapproxeq because your X doesn't define it +#endif +#ifdef XK_notidentical + xK_notidentical, -- U+2262 NOT IDENTICAL TO +#else + -- Skipping xK_notidentical because your X doesn't define it +#endif +#ifdef XK_stricteq + xK_stricteq, -- U+2263 STRICTLY EQUIVALENT TO +#else + -- Skipping xK_stricteq because your X doesn't define it +#endif + + -- XK_BRAILLE +#ifdef XK_braille_dot_1 + xK_braille_dot_1, +#else + -- Skipping xK_braille_dot_1 because your X doesn't define it +#endif +#ifdef XK_braille_dot_2 + xK_braille_dot_2, +#else + -- Skipping xK_braille_dot_2 because your X doesn't define it +#endif +#ifdef XK_braille_dot_3 + xK_braille_dot_3, +#else + -- Skipping xK_braille_dot_3 because your X doesn't define it +#endif +#ifdef XK_braille_dot_4 + xK_braille_dot_4, +#else + -- Skipping xK_braille_dot_4 because your X doesn't define it +#endif +#ifdef XK_braille_dot_5 + xK_braille_dot_5, +#else + -- Skipping xK_braille_dot_5 because your X doesn't define it +#endif +#ifdef XK_braille_dot_6 + xK_braille_dot_6, +#else + -- Skipping xK_braille_dot_6 because your X doesn't define it +#endif +#ifdef XK_braille_dot_7 + xK_braille_dot_7, +#else + -- Skipping xK_braille_dot_7 because your X doesn't define it +#endif +#ifdef XK_braille_dot_8 + xK_braille_dot_8, +#else + -- Skipping xK_braille_dot_8 because your X doesn't define it +#endif +#ifdef XK_braille_dot_9 + xK_braille_dot_9, +#else + -- Skipping xK_braille_dot_9 because your X doesn't define it +#endif +#ifdef XK_braille_dot_10 + xK_braille_dot_10, +#else + -- Skipping xK_braille_dot_10 because your X doesn't define it +#endif +#ifdef XK_braille_blank + xK_braille_blank, -- U+2800 BRAILLE PATTERN BLANK +#else + -- Skipping xK_braille_blank because your X doesn't define it +#endif +#ifdef XK_braille_dots_1 + xK_braille_dots_1, -- U+2801 BRAILLE PATTERN DOTS-1 +#else + -- Skipping xK_braille_dots_1 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2 + xK_braille_dots_2, -- U+2802 BRAILLE PATTERN DOTS-2 +#else + -- Skipping xK_braille_dots_2 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12 + xK_braille_dots_12, -- U+2803 BRAILLE PATTERN DOTS-12 +#else + -- Skipping xK_braille_dots_12 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3 + xK_braille_dots_3, -- U+2804 BRAILLE PATTERN DOTS-3 +#else + -- Skipping xK_braille_dots_3 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13 + xK_braille_dots_13, -- U+2805 BRAILLE PATTERN DOTS-13 +#else + -- Skipping xK_braille_dots_13 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23 + xK_braille_dots_23, -- U+2806 BRAILLE PATTERN DOTS-23 +#else + -- Skipping xK_braille_dots_23 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123 + xK_braille_dots_123, -- U+2807 BRAILLE PATTERN DOTS-123 +#else + -- Skipping xK_braille_dots_123 because your X doesn't define it +#endif +#ifdef XK_braille_dots_4 + xK_braille_dots_4, -- U+2808 BRAILLE PATTERN DOTS-4 +#else + -- Skipping xK_braille_dots_4 because your X doesn't define it +#endif +#ifdef XK_braille_dots_14 + xK_braille_dots_14, -- U+2809 BRAILLE PATTERN DOTS-14 +#else + -- Skipping xK_braille_dots_14 because your X doesn't define it +#endif +#ifdef XK_braille_dots_24 + xK_braille_dots_24, -- U+280a BRAILLE PATTERN DOTS-24 +#else + -- Skipping xK_braille_dots_24 because your X doesn't define it +#endif +#ifdef XK_braille_dots_124 + xK_braille_dots_124, -- U+280b BRAILLE PATTERN DOTS-124 +#else + -- Skipping xK_braille_dots_124 because your X doesn't define it +#endif +#ifdef XK_braille_dots_34 + xK_braille_dots_34, -- U+280c BRAILLE PATTERN DOTS-34 +#else + -- Skipping xK_braille_dots_34 because your X doesn't define it +#endif +#ifdef XK_braille_dots_134 + xK_braille_dots_134, -- U+280d BRAILLE PATTERN DOTS-134 +#else + -- Skipping xK_braille_dots_134 because your X doesn't define it +#endif +#ifdef XK_braille_dots_234 + xK_braille_dots_234, -- U+280e BRAILLE PATTERN DOTS-234 +#else + -- Skipping xK_braille_dots_234 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1234 + xK_braille_dots_1234, -- U+280f BRAILLE PATTERN DOTS-1234 +#else + -- Skipping xK_braille_dots_1234 because your X doesn't define it +#endif +#ifdef XK_braille_dots_5 + xK_braille_dots_5, -- U+2810 BRAILLE PATTERN DOTS-5 +#else + -- Skipping xK_braille_dots_5 because your X doesn't define it +#endif +#ifdef XK_braille_dots_15 + xK_braille_dots_15, -- U+2811 BRAILLE PATTERN DOTS-15 +#else + -- Skipping xK_braille_dots_15 because your X doesn't define it +#endif +#ifdef XK_braille_dots_25 + xK_braille_dots_25, -- U+2812 BRAILLE PATTERN DOTS-25 +#else + -- Skipping xK_braille_dots_25 because your X doesn't define it +#endif +#ifdef XK_braille_dots_125 + xK_braille_dots_125, -- U+2813 BRAILLE PATTERN DOTS-125 +#else + -- Skipping xK_braille_dots_125 because your X doesn't define it +#endif +#ifdef XK_braille_dots_35 + xK_braille_dots_35, -- U+2814 BRAILLE PATTERN DOTS-35 +#else + -- Skipping xK_braille_dots_35 because your X doesn't define it +#endif +#ifdef XK_braille_dots_135 + xK_braille_dots_135, -- U+2815 BRAILLE PATTERN DOTS-135 +#else + -- Skipping xK_braille_dots_135 because your X doesn't define it +#endif +#ifdef XK_braille_dots_235 + xK_braille_dots_235, -- U+2816 BRAILLE PATTERN DOTS-235 +#else + -- Skipping xK_braille_dots_235 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1235 + xK_braille_dots_1235, -- U+2817 BRAILLE PATTERN DOTS-1235 +#else + -- Skipping xK_braille_dots_1235 because your X doesn't define it +#endif +#ifdef XK_braille_dots_45 + xK_braille_dots_45, -- U+2818 BRAILLE PATTERN DOTS-45 +#else + -- Skipping xK_braille_dots_45 because your X doesn't define it +#endif +#ifdef XK_braille_dots_145 + xK_braille_dots_145, -- U+2819 BRAILLE PATTERN DOTS-145 +#else + -- Skipping xK_braille_dots_145 because your X doesn't define it +#endif +#ifdef XK_braille_dots_245 + xK_braille_dots_245, -- U+281a BRAILLE PATTERN DOTS-245 +#else + -- Skipping xK_braille_dots_245 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1245 + xK_braille_dots_1245, -- U+281b BRAILLE PATTERN DOTS-1245 +#else + -- Skipping xK_braille_dots_1245 because your X doesn't define it +#endif +#ifdef XK_braille_dots_345 + xK_braille_dots_345, -- U+281c BRAILLE PATTERN DOTS-345 +#else + -- Skipping xK_braille_dots_345 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1345 + xK_braille_dots_1345, -- U+281d BRAILLE PATTERN DOTS-1345 +#else + -- Skipping xK_braille_dots_1345 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2345 + xK_braille_dots_2345, -- U+281e BRAILLE PATTERN DOTS-2345 +#else + -- Skipping xK_braille_dots_2345 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12345 + xK_braille_dots_12345, -- U+281f BRAILLE PATTERN DOTS-12345 +#else + -- Skipping xK_braille_dots_12345 because your X doesn't define it +#endif +#ifdef XK_braille_dots_6 + xK_braille_dots_6, -- U+2820 BRAILLE PATTERN DOTS-6 +#else + -- Skipping xK_braille_dots_6 because your X doesn't define it +#endif +#ifdef XK_braille_dots_16 + xK_braille_dots_16, -- U+2821 BRAILLE PATTERN DOTS-16 +#else + -- Skipping xK_braille_dots_16 because your X doesn't define it +#endif +#ifdef XK_braille_dots_26 + xK_braille_dots_26, -- U+2822 BRAILLE PATTERN DOTS-26 +#else + -- Skipping xK_braille_dots_26 because your X doesn't define it +#endif +#ifdef XK_braille_dots_126 + xK_braille_dots_126, -- U+2823 BRAILLE PATTERN DOTS-126 +#else + -- Skipping xK_braille_dots_126 because your X doesn't define it +#endif +#ifdef XK_braille_dots_36 + xK_braille_dots_36, -- U+2824 BRAILLE PATTERN DOTS-36 +#else + -- Skipping xK_braille_dots_36 because your X doesn't define it +#endif +#ifdef XK_braille_dots_136 + xK_braille_dots_136, -- U+2825 BRAILLE PATTERN DOTS-136 +#else + -- Skipping xK_braille_dots_136 because your X doesn't define it +#endif +#ifdef XK_braille_dots_236 + xK_braille_dots_236, -- U+2826 BRAILLE PATTERN DOTS-236 +#else + -- Skipping xK_braille_dots_236 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1236 + xK_braille_dots_1236, -- U+2827 BRAILLE PATTERN DOTS-1236 +#else + -- Skipping xK_braille_dots_1236 because your X doesn't define it +#endif +#ifdef XK_braille_dots_46 + xK_braille_dots_46, -- U+2828 BRAILLE PATTERN DOTS-46 +#else + -- Skipping xK_braille_dots_46 because your X doesn't define it +#endif +#ifdef XK_braille_dots_146 + xK_braille_dots_146, -- U+2829 BRAILLE PATTERN DOTS-146 +#else + -- Skipping xK_braille_dots_146 because your X doesn't define it +#endif +#ifdef XK_braille_dots_246 + xK_braille_dots_246, -- U+282a BRAILLE PATTERN DOTS-246 +#else + -- Skipping xK_braille_dots_246 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1246 + xK_braille_dots_1246, -- U+282b BRAILLE PATTERN DOTS-1246 +#else + -- Skipping xK_braille_dots_1246 because your X doesn't define it +#endif +#ifdef XK_braille_dots_346 + xK_braille_dots_346, -- U+282c BRAILLE PATTERN DOTS-346 +#else + -- Skipping xK_braille_dots_346 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1346 + xK_braille_dots_1346, -- U+282d BRAILLE PATTERN DOTS-1346 +#else + -- Skipping xK_braille_dots_1346 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2346 + xK_braille_dots_2346, -- U+282e BRAILLE PATTERN DOTS-2346 +#else + -- Skipping xK_braille_dots_2346 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12346 + xK_braille_dots_12346, -- U+282f BRAILLE PATTERN DOTS-12346 +#else + -- Skipping xK_braille_dots_12346 because your X doesn't define it +#endif +#ifdef XK_braille_dots_56 + xK_braille_dots_56, -- U+2830 BRAILLE PATTERN DOTS-56 +#else + -- Skipping xK_braille_dots_56 because your X doesn't define it +#endif +#ifdef XK_braille_dots_156 + xK_braille_dots_156, -- U+2831 BRAILLE PATTERN DOTS-156 +#else + -- Skipping xK_braille_dots_156 because your X doesn't define it +#endif +#ifdef XK_braille_dots_256 + xK_braille_dots_256, -- U+2832 BRAILLE PATTERN DOTS-256 +#else + -- Skipping xK_braille_dots_256 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1256 + xK_braille_dots_1256, -- U+2833 BRAILLE PATTERN DOTS-1256 +#else + -- Skipping xK_braille_dots_1256 because your X doesn't define it +#endif +#ifdef XK_braille_dots_356 + xK_braille_dots_356, -- U+2834 BRAILLE PATTERN DOTS-356 +#else + -- Skipping xK_braille_dots_356 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1356 + xK_braille_dots_1356, -- U+2835 BRAILLE PATTERN DOTS-1356 +#else + -- Skipping xK_braille_dots_1356 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2356 + xK_braille_dots_2356, -- U+2836 BRAILLE PATTERN DOTS-2356 +#else + -- Skipping xK_braille_dots_2356 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12356 + xK_braille_dots_12356, -- U+2837 BRAILLE PATTERN DOTS-12356 +#else + -- Skipping xK_braille_dots_12356 because your X doesn't define it +#endif +#ifdef XK_braille_dots_456 + xK_braille_dots_456, -- U+2838 BRAILLE PATTERN DOTS-456 +#else + -- Skipping xK_braille_dots_456 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1456 + xK_braille_dots_1456, -- U+2839 BRAILLE PATTERN DOTS-1456 +#else + -- Skipping xK_braille_dots_1456 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2456 + xK_braille_dots_2456, -- U+283a BRAILLE PATTERN DOTS-2456 +#else + -- Skipping xK_braille_dots_2456 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12456 + xK_braille_dots_12456, -- U+283b BRAILLE PATTERN DOTS-12456 +#else + -- Skipping xK_braille_dots_12456 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3456 + xK_braille_dots_3456, -- U+283c BRAILLE PATTERN DOTS-3456 +#else + -- Skipping xK_braille_dots_3456 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13456 + xK_braille_dots_13456, -- U+283d BRAILLE PATTERN DOTS-13456 +#else + -- Skipping xK_braille_dots_13456 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23456 + xK_braille_dots_23456, -- U+283e BRAILLE PATTERN DOTS-23456 +#else + -- Skipping xK_braille_dots_23456 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123456 + xK_braille_dots_123456, -- U+283f BRAILLE PATTERN DOTS-123456 +#else + -- Skipping xK_braille_dots_123456 because your X doesn't define it +#endif +#ifdef XK_braille_dots_7 + xK_braille_dots_7, -- U+2840 BRAILLE PATTERN DOTS-7 +#else + -- Skipping xK_braille_dots_7 because your X doesn't define it +#endif +#ifdef XK_braille_dots_17 + xK_braille_dots_17, -- U+2841 BRAILLE PATTERN DOTS-17 +#else + -- Skipping xK_braille_dots_17 because your X doesn't define it +#endif +#ifdef XK_braille_dots_27 + xK_braille_dots_27, -- U+2842 BRAILLE PATTERN DOTS-27 +#else + -- Skipping xK_braille_dots_27 because your X doesn't define it +#endif +#ifdef XK_braille_dots_127 + xK_braille_dots_127, -- U+2843 BRAILLE PATTERN DOTS-127 +#else + -- Skipping xK_braille_dots_127 because your X doesn't define it +#endif +#ifdef XK_braille_dots_37 + xK_braille_dots_37, -- U+2844 BRAILLE PATTERN DOTS-37 +#else + -- Skipping xK_braille_dots_37 because your X doesn't define it +#endif +#ifdef XK_braille_dots_137 + xK_braille_dots_137, -- U+2845 BRAILLE PATTERN DOTS-137 +#else + -- Skipping xK_braille_dots_137 because your X doesn't define it +#endif +#ifdef XK_braille_dots_237 + xK_braille_dots_237, -- U+2846 BRAILLE PATTERN DOTS-237 +#else + -- Skipping xK_braille_dots_237 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1237 + xK_braille_dots_1237, -- U+2847 BRAILLE PATTERN DOTS-1237 +#else + -- Skipping xK_braille_dots_1237 because your X doesn't define it +#endif +#ifdef XK_braille_dots_47 + xK_braille_dots_47, -- U+2848 BRAILLE PATTERN DOTS-47 +#else + -- Skipping xK_braille_dots_47 because your X doesn't define it +#endif +#ifdef XK_braille_dots_147 + xK_braille_dots_147, -- U+2849 BRAILLE PATTERN DOTS-147 +#else + -- Skipping xK_braille_dots_147 because your X doesn't define it +#endif +#ifdef XK_braille_dots_247 + xK_braille_dots_247, -- U+284a BRAILLE PATTERN DOTS-247 +#else + -- Skipping xK_braille_dots_247 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1247 + xK_braille_dots_1247, -- U+284b BRAILLE PATTERN DOTS-1247 +#else + -- Skipping xK_braille_dots_1247 because your X doesn't define it +#endif +#ifdef XK_braille_dots_347 + xK_braille_dots_347, -- U+284c BRAILLE PATTERN DOTS-347 +#else + -- Skipping xK_braille_dots_347 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1347 + xK_braille_dots_1347, -- U+284d BRAILLE PATTERN DOTS-1347 +#else + -- Skipping xK_braille_dots_1347 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2347 + xK_braille_dots_2347, -- U+284e BRAILLE PATTERN DOTS-2347 +#else + -- Skipping xK_braille_dots_2347 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12347 + xK_braille_dots_12347, -- U+284f BRAILLE PATTERN DOTS-12347 +#else + -- Skipping xK_braille_dots_12347 because your X doesn't define it +#endif +#ifdef XK_braille_dots_57 + xK_braille_dots_57, -- U+2850 BRAILLE PATTERN DOTS-57 +#else + -- Skipping xK_braille_dots_57 because your X doesn't define it +#endif +#ifdef XK_braille_dots_157 + xK_braille_dots_157, -- U+2851 BRAILLE PATTERN DOTS-157 +#else + -- Skipping xK_braille_dots_157 because your X doesn't define it +#endif +#ifdef XK_braille_dots_257 + xK_braille_dots_257, -- U+2852 BRAILLE PATTERN DOTS-257 +#else + -- Skipping xK_braille_dots_257 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1257 + xK_braille_dots_1257, -- U+2853 BRAILLE PATTERN DOTS-1257 +#else + -- Skipping xK_braille_dots_1257 because your X doesn't define it +#endif +#ifdef XK_braille_dots_357 + xK_braille_dots_357, -- U+2854 BRAILLE PATTERN DOTS-357 +#else + -- Skipping xK_braille_dots_357 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1357 + xK_braille_dots_1357, -- U+2855 BRAILLE PATTERN DOTS-1357 +#else + -- Skipping xK_braille_dots_1357 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2357 + xK_braille_dots_2357, -- U+2856 BRAILLE PATTERN DOTS-2357 +#else + -- Skipping xK_braille_dots_2357 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12357 + xK_braille_dots_12357, -- U+2857 BRAILLE PATTERN DOTS-12357 +#else + -- Skipping xK_braille_dots_12357 because your X doesn't define it +#endif +#ifdef XK_braille_dots_457 + xK_braille_dots_457, -- U+2858 BRAILLE PATTERN DOTS-457 +#else + -- Skipping xK_braille_dots_457 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1457 + xK_braille_dots_1457, -- U+2859 BRAILLE PATTERN DOTS-1457 +#else + -- Skipping xK_braille_dots_1457 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2457 + xK_braille_dots_2457, -- U+285a BRAILLE PATTERN DOTS-2457 +#else + -- Skipping xK_braille_dots_2457 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12457 + xK_braille_dots_12457, -- U+285b BRAILLE PATTERN DOTS-12457 +#else + -- Skipping xK_braille_dots_12457 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3457 + xK_braille_dots_3457, -- U+285c BRAILLE PATTERN DOTS-3457 +#else + -- Skipping xK_braille_dots_3457 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13457 + xK_braille_dots_13457, -- U+285d BRAILLE PATTERN DOTS-13457 +#else + -- Skipping xK_braille_dots_13457 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23457 + xK_braille_dots_23457, -- U+285e BRAILLE PATTERN DOTS-23457 +#else + -- Skipping xK_braille_dots_23457 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123457 + xK_braille_dots_123457, -- U+285f BRAILLE PATTERN DOTS-123457 +#else + -- Skipping xK_braille_dots_123457 because your X doesn't define it +#endif +#ifdef XK_braille_dots_67 + xK_braille_dots_67, -- U+2860 BRAILLE PATTERN DOTS-67 +#else + -- Skipping xK_braille_dots_67 because your X doesn't define it +#endif +#ifdef XK_braille_dots_167 + xK_braille_dots_167, -- U+2861 BRAILLE PATTERN DOTS-167 +#else + -- Skipping xK_braille_dots_167 because your X doesn't define it +#endif +#ifdef XK_braille_dots_267 + xK_braille_dots_267, -- U+2862 BRAILLE PATTERN DOTS-267 +#else + -- Skipping xK_braille_dots_267 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1267 + xK_braille_dots_1267, -- U+2863 BRAILLE PATTERN DOTS-1267 +#else + -- Skipping xK_braille_dots_1267 because your X doesn't define it +#endif +#ifdef XK_braille_dots_367 + xK_braille_dots_367, -- U+2864 BRAILLE PATTERN DOTS-367 +#else + -- Skipping xK_braille_dots_367 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1367 + xK_braille_dots_1367, -- U+2865 BRAILLE PATTERN DOTS-1367 +#else + -- Skipping xK_braille_dots_1367 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2367 + xK_braille_dots_2367, -- U+2866 BRAILLE PATTERN DOTS-2367 +#else + -- Skipping xK_braille_dots_2367 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12367 + xK_braille_dots_12367, -- U+2867 BRAILLE PATTERN DOTS-12367 +#else + -- Skipping xK_braille_dots_12367 because your X doesn't define it +#endif +#ifdef XK_braille_dots_467 + xK_braille_dots_467, -- U+2868 BRAILLE PATTERN DOTS-467 +#else + -- Skipping xK_braille_dots_467 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1467 + xK_braille_dots_1467, -- U+2869 BRAILLE PATTERN DOTS-1467 +#else + -- Skipping xK_braille_dots_1467 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2467 + xK_braille_dots_2467, -- U+286a BRAILLE PATTERN DOTS-2467 +#else + -- Skipping xK_braille_dots_2467 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12467 + xK_braille_dots_12467, -- U+286b BRAILLE PATTERN DOTS-12467 +#else + -- Skipping xK_braille_dots_12467 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3467 + xK_braille_dots_3467, -- U+286c BRAILLE PATTERN DOTS-3467 +#else + -- Skipping xK_braille_dots_3467 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13467 + xK_braille_dots_13467, -- U+286d BRAILLE PATTERN DOTS-13467 +#else + -- Skipping xK_braille_dots_13467 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23467 + xK_braille_dots_23467, -- U+286e BRAILLE PATTERN DOTS-23467 +#else + -- Skipping xK_braille_dots_23467 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123467 + xK_braille_dots_123467, -- U+286f BRAILLE PATTERN DOTS-123467 +#else + -- Skipping xK_braille_dots_123467 because your X doesn't define it +#endif +#ifdef XK_braille_dots_567 + xK_braille_dots_567, -- U+2870 BRAILLE PATTERN DOTS-567 +#else + -- Skipping xK_braille_dots_567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1567 + xK_braille_dots_1567, -- U+2871 BRAILLE PATTERN DOTS-1567 +#else + -- Skipping xK_braille_dots_1567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2567 + xK_braille_dots_2567, -- U+2872 BRAILLE PATTERN DOTS-2567 +#else + -- Skipping xK_braille_dots_2567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12567 + xK_braille_dots_12567, -- U+2873 BRAILLE PATTERN DOTS-12567 +#else + -- Skipping xK_braille_dots_12567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3567 + xK_braille_dots_3567, -- U+2874 BRAILLE PATTERN DOTS-3567 +#else + -- Skipping xK_braille_dots_3567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13567 + xK_braille_dots_13567, -- U+2875 BRAILLE PATTERN DOTS-13567 +#else + -- Skipping xK_braille_dots_13567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23567 + xK_braille_dots_23567, -- U+2876 BRAILLE PATTERN DOTS-23567 +#else + -- Skipping xK_braille_dots_23567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123567 + xK_braille_dots_123567, -- U+2877 BRAILLE PATTERN DOTS-123567 +#else + -- Skipping xK_braille_dots_123567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_4567 + xK_braille_dots_4567, -- U+2878 BRAILLE PATTERN DOTS-4567 +#else + -- Skipping xK_braille_dots_4567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_14567 + xK_braille_dots_14567, -- U+2879 BRAILLE PATTERN DOTS-14567 +#else + -- Skipping xK_braille_dots_14567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_24567 + xK_braille_dots_24567, -- U+287a BRAILLE PATTERN DOTS-24567 +#else + -- Skipping xK_braille_dots_24567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_124567 + xK_braille_dots_124567, -- U+287b BRAILLE PATTERN DOTS-124567 +#else + -- Skipping xK_braille_dots_124567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_34567 + xK_braille_dots_34567, -- U+287c BRAILLE PATTERN DOTS-34567 +#else + -- Skipping xK_braille_dots_34567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_134567 + xK_braille_dots_134567, -- U+287d BRAILLE PATTERN DOTS-134567 +#else + -- Skipping xK_braille_dots_134567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_234567 + xK_braille_dots_234567, -- U+287e BRAILLE PATTERN DOTS-234567 +#else + -- Skipping xK_braille_dots_234567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1234567 + xK_braille_dots_1234567, -- U+287f BRAILLE PATTERN DOTS-1234567 +#else + -- Skipping xK_braille_dots_1234567 because your X doesn't define it +#endif +#ifdef XK_braille_dots_8 + xK_braille_dots_8, -- U+2880 BRAILLE PATTERN DOTS-8 +#else + -- Skipping xK_braille_dots_8 because your X doesn't define it +#endif +#ifdef XK_braille_dots_18 + xK_braille_dots_18, -- U+2881 BRAILLE PATTERN DOTS-18 +#else + -- Skipping xK_braille_dots_18 because your X doesn't define it +#endif +#ifdef XK_braille_dots_28 + xK_braille_dots_28, -- U+2882 BRAILLE PATTERN DOTS-28 +#else + -- Skipping xK_braille_dots_28 because your X doesn't define it +#endif +#ifdef XK_braille_dots_128 + xK_braille_dots_128, -- U+2883 BRAILLE PATTERN DOTS-128 +#else + -- Skipping xK_braille_dots_128 because your X doesn't define it +#endif +#ifdef XK_braille_dots_38 + xK_braille_dots_38, -- U+2884 BRAILLE PATTERN DOTS-38 +#else + -- Skipping xK_braille_dots_38 because your X doesn't define it +#endif +#ifdef XK_braille_dots_138 + xK_braille_dots_138, -- U+2885 BRAILLE PATTERN DOTS-138 +#else + -- Skipping xK_braille_dots_138 because your X doesn't define it +#endif +#ifdef XK_braille_dots_238 + xK_braille_dots_238, -- U+2886 BRAILLE PATTERN DOTS-238 +#else + -- Skipping xK_braille_dots_238 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1238 + xK_braille_dots_1238, -- U+2887 BRAILLE PATTERN DOTS-1238 +#else + -- Skipping xK_braille_dots_1238 because your X doesn't define it +#endif +#ifdef XK_braille_dots_48 + xK_braille_dots_48, -- U+2888 BRAILLE PATTERN DOTS-48 +#else + -- Skipping xK_braille_dots_48 because your X doesn't define it +#endif +#ifdef XK_braille_dots_148 + xK_braille_dots_148, -- U+2889 BRAILLE PATTERN DOTS-148 +#else + -- Skipping xK_braille_dots_148 because your X doesn't define it +#endif +#ifdef XK_braille_dots_248 + xK_braille_dots_248, -- U+288a BRAILLE PATTERN DOTS-248 +#else + -- Skipping xK_braille_dots_248 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1248 + xK_braille_dots_1248, -- U+288b BRAILLE PATTERN DOTS-1248 +#else + -- Skipping xK_braille_dots_1248 because your X doesn't define it +#endif +#ifdef XK_braille_dots_348 + xK_braille_dots_348, -- U+288c BRAILLE PATTERN DOTS-348 +#else + -- Skipping xK_braille_dots_348 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1348 + xK_braille_dots_1348, -- U+288d BRAILLE PATTERN DOTS-1348 +#else + -- Skipping xK_braille_dots_1348 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2348 + xK_braille_dots_2348, -- U+288e BRAILLE PATTERN DOTS-2348 +#else + -- Skipping xK_braille_dots_2348 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12348 + xK_braille_dots_12348, -- U+288f BRAILLE PATTERN DOTS-12348 +#else + -- Skipping xK_braille_dots_12348 because your X doesn't define it +#endif +#ifdef XK_braille_dots_58 + xK_braille_dots_58, -- U+2890 BRAILLE PATTERN DOTS-58 +#else + -- Skipping xK_braille_dots_58 because your X doesn't define it +#endif +#ifdef XK_braille_dots_158 + xK_braille_dots_158, -- U+2891 BRAILLE PATTERN DOTS-158 +#else + -- Skipping xK_braille_dots_158 because your X doesn't define it +#endif +#ifdef XK_braille_dots_258 + xK_braille_dots_258, -- U+2892 BRAILLE PATTERN DOTS-258 +#else + -- Skipping xK_braille_dots_258 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1258 + xK_braille_dots_1258, -- U+2893 BRAILLE PATTERN DOTS-1258 +#else + -- Skipping xK_braille_dots_1258 because your X doesn't define it +#endif +#ifdef XK_braille_dots_358 + xK_braille_dots_358, -- U+2894 BRAILLE PATTERN DOTS-358 +#else + -- Skipping xK_braille_dots_358 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1358 + xK_braille_dots_1358, -- U+2895 BRAILLE PATTERN DOTS-1358 +#else + -- Skipping xK_braille_dots_1358 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2358 + xK_braille_dots_2358, -- U+2896 BRAILLE PATTERN DOTS-2358 +#else + -- Skipping xK_braille_dots_2358 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12358 + xK_braille_dots_12358, -- U+2897 BRAILLE PATTERN DOTS-12358 +#else + -- Skipping xK_braille_dots_12358 because your X doesn't define it +#endif +#ifdef XK_braille_dots_458 + xK_braille_dots_458, -- U+2898 BRAILLE PATTERN DOTS-458 +#else + -- Skipping xK_braille_dots_458 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1458 + xK_braille_dots_1458, -- U+2899 BRAILLE PATTERN DOTS-1458 +#else + -- Skipping xK_braille_dots_1458 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2458 + xK_braille_dots_2458, -- U+289a BRAILLE PATTERN DOTS-2458 +#else + -- Skipping xK_braille_dots_2458 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12458 + xK_braille_dots_12458, -- U+289b BRAILLE PATTERN DOTS-12458 +#else + -- Skipping xK_braille_dots_12458 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3458 + xK_braille_dots_3458, -- U+289c BRAILLE PATTERN DOTS-3458 +#else + -- Skipping xK_braille_dots_3458 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13458 + xK_braille_dots_13458, -- U+289d BRAILLE PATTERN DOTS-13458 +#else + -- Skipping xK_braille_dots_13458 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23458 + xK_braille_dots_23458, -- U+289e BRAILLE PATTERN DOTS-23458 +#else + -- Skipping xK_braille_dots_23458 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123458 + xK_braille_dots_123458, -- U+289f BRAILLE PATTERN DOTS-123458 +#else + -- Skipping xK_braille_dots_123458 because your X doesn't define it +#endif +#ifdef XK_braille_dots_68 + xK_braille_dots_68, -- U+28a0 BRAILLE PATTERN DOTS-68 +#else + -- Skipping xK_braille_dots_68 because your X doesn't define it +#endif +#ifdef XK_braille_dots_168 + xK_braille_dots_168, -- U+28a1 BRAILLE PATTERN DOTS-168 +#else + -- Skipping xK_braille_dots_168 because your X doesn't define it +#endif +#ifdef XK_braille_dots_268 + xK_braille_dots_268, -- U+28a2 BRAILLE PATTERN DOTS-268 +#else + -- Skipping xK_braille_dots_268 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1268 + xK_braille_dots_1268, -- U+28a3 BRAILLE PATTERN DOTS-1268 +#else + -- Skipping xK_braille_dots_1268 because your X doesn't define it +#endif +#ifdef XK_braille_dots_368 + xK_braille_dots_368, -- U+28a4 BRAILLE PATTERN DOTS-368 +#else + -- Skipping xK_braille_dots_368 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1368 + xK_braille_dots_1368, -- U+28a5 BRAILLE PATTERN DOTS-1368 +#else + -- Skipping xK_braille_dots_1368 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2368 + xK_braille_dots_2368, -- U+28a6 BRAILLE PATTERN DOTS-2368 +#else + -- Skipping xK_braille_dots_2368 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12368 + xK_braille_dots_12368, -- U+28a7 BRAILLE PATTERN DOTS-12368 +#else + -- Skipping xK_braille_dots_12368 because your X doesn't define it +#endif +#ifdef XK_braille_dots_468 + xK_braille_dots_468, -- U+28a8 BRAILLE PATTERN DOTS-468 +#else + -- Skipping xK_braille_dots_468 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1468 + xK_braille_dots_1468, -- U+28a9 BRAILLE PATTERN DOTS-1468 +#else + -- Skipping xK_braille_dots_1468 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2468 + xK_braille_dots_2468, -- U+28aa BRAILLE PATTERN DOTS-2468 +#else + -- Skipping xK_braille_dots_2468 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12468 + xK_braille_dots_12468, -- U+28ab BRAILLE PATTERN DOTS-12468 +#else + -- Skipping xK_braille_dots_12468 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3468 + xK_braille_dots_3468, -- U+28ac BRAILLE PATTERN DOTS-3468 +#else + -- Skipping xK_braille_dots_3468 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13468 + xK_braille_dots_13468, -- U+28ad BRAILLE PATTERN DOTS-13468 +#else + -- Skipping xK_braille_dots_13468 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23468 + xK_braille_dots_23468, -- U+28ae BRAILLE PATTERN DOTS-23468 +#else + -- Skipping xK_braille_dots_23468 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123468 + xK_braille_dots_123468, -- U+28af BRAILLE PATTERN DOTS-123468 +#else + -- Skipping xK_braille_dots_123468 because your X doesn't define it +#endif +#ifdef XK_braille_dots_568 + xK_braille_dots_568, -- U+28b0 BRAILLE PATTERN DOTS-568 +#else + -- Skipping xK_braille_dots_568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1568 + xK_braille_dots_1568, -- U+28b1 BRAILLE PATTERN DOTS-1568 +#else + -- Skipping xK_braille_dots_1568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2568 + xK_braille_dots_2568, -- U+28b2 BRAILLE PATTERN DOTS-2568 +#else + -- Skipping xK_braille_dots_2568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12568 + xK_braille_dots_12568, -- U+28b3 BRAILLE PATTERN DOTS-12568 +#else + -- Skipping xK_braille_dots_12568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3568 + xK_braille_dots_3568, -- U+28b4 BRAILLE PATTERN DOTS-3568 +#else + -- Skipping xK_braille_dots_3568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13568 + xK_braille_dots_13568, -- U+28b5 BRAILLE PATTERN DOTS-13568 +#else + -- Skipping xK_braille_dots_13568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23568 + xK_braille_dots_23568, -- U+28b6 BRAILLE PATTERN DOTS-23568 +#else + -- Skipping xK_braille_dots_23568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123568 + xK_braille_dots_123568, -- U+28b7 BRAILLE PATTERN DOTS-123568 +#else + -- Skipping xK_braille_dots_123568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_4568 + xK_braille_dots_4568, -- U+28b8 BRAILLE PATTERN DOTS-4568 +#else + -- Skipping xK_braille_dots_4568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_14568 + xK_braille_dots_14568, -- U+28b9 BRAILLE PATTERN DOTS-14568 +#else + -- Skipping xK_braille_dots_14568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_24568 + xK_braille_dots_24568, -- U+28ba BRAILLE PATTERN DOTS-24568 +#else + -- Skipping xK_braille_dots_24568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_124568 + xK_braille_dots_124568, -- U+28bb BRAILLE PATTERN DOTS-124568 +#else + -- Skipping xK_braille_dots_124568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_34568 + xK_braille_dots_34568, -- U+28bc BRAILLE PATTERN DOTS-34568 +#else + -- Skipping xK_braille_dots_34568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_134568 + xK_braille_dots_134568, -- U+28bd BRAILLE PATTERN DOTS-134568 +#else + -- Skipping xK_braille_dots_134568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_234568 + xK_braille_dots_234568, -- U+28be BRAILLE PATTERN DOTS-234568 +#else + -- Skipping xK_braille_dots_234568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1234568 + xK_braille_dots_1234568, -- U+28bf BRAILLE PATTERN DOTS-1234568 +#else + -- Skipping xK_braille_dots_1234568 because your X doesn't define it +#endif +#ifdef XK_braille_dots_78 + xK_braille_dots_78, -- U+28c0 BRAILLE PATTERN DOTS-78 +#else + -- Skipping xK_braille_dots_78 because your X doesn't define it +#endif +#ifdef XK_braille_dots_178 + xK_braille_dots_178, -- U+28c1 BRAILLE PATTERN DOTS-178 +#else + -- Skipping xK_braille_dots_178 because your X doesn't define it +#endif +#ifdef XK_braille_dots_278 + xK_braille_dots_278, -- U+28c2 BRAILLE PATTERN DOTS-278 +#else + -- Skipping xK_braille_dots_278 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1278 + xK_braille_dots_1278, -- U+28c3 BRAILLE PATTERN DOTS-1278 +#else + -- Skipping xK_braille_dots_1278 because your X doesn't define it +#endif +#ifdef XK_braille_dots_378 + xK_braille_dots_378, -- U+28c4 BRAILLE PATTERN DOTS-378 +#else + -- Skipping xK_braille_dots_378 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1378 + xK_braille_dots_1378, -- U+28c5 BRAILLE PATTERN DOTS-1378 +#else + -- Skipping xK_braille_dots_1378 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2378 + xK_braille_dots_2378, -- U+28c6 BRAILLE PATTERN DOTS-2378 +#else + -- Skipping xK_braille_dots_2378 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12378 + xK_braille_dots_12378, -- U+28c7 BRAILLE PATTERN DOTS-12378 +#else + -- Skipping xK_braille_dots_12378 because your X doesn't define it +#endif +#ifdef XK_braille_dots_478 + xK_braille_dots_478, -- U+28c8 BRAILLE PATTERN DOTS-478 +#else + -- Skipping xK_braille_dots_478 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1478 + xK_braille_dots_1478, -- U+28c9 BRAILLE PATTERN DOTS-1478 +#else + -- Skipping xK_braille_dots_1478 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2478 + xK_braille_dots_2478, -- U+28ca BRAILLE PATTERN DOTS-2478 +#else + -- Skipping xK_braille_dots_2478 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12478 + xK_braille_dots_12478, -- U+28cb BRAILLE PATTERN DOTS-12478 +#else + -- Skipping xK_braille_dots_12478 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3478 + xK_braille_dots_3478, -- U+28cc BRAILLE PATTERN DOTS-3478 +#else + -- Skipping xK_braille_dots_3478 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13478 + xK_braille_dots_13478, -- U+28cd BRAILLE PATTERN DOTS-13478 +#else + -- Skipping xK_braille_dots_13478 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23478 + xK_braille_dots_23478, -- U+28ce BRAILLE PATTERN DOTS-23478 +#else + -- Skipping xK_braille_dots_23478 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123478 + xK_braille_dots_123478, -- U+28cf BRAILLE PATTERN DOTS-123478 +#else + -- Skipping xK_braille_dots_123478 because your X doesn't define it +#endif +#ifdef XK_braille_dots_578 + xK_braille_dots_578, -- U+28d0 BRAILLE PATTERN DOTS-578 +#else + -- Skipping xK_braille_dots_578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1578 + xK_braille_dots_1578, -- U+28d1 BRAILLE PATTERN DOTS-1578 +#else + -- Skipping xK_braille_dots_1578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2578 + xK_braille_dots_2578, -- U+28d2 BRAILLE PATTERN DOTS-2578 +#else + -- Skipping xK_braille_dots_2578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12578 + xK_braille_dots_12578, -- U+28d3 BRAILLE PATTERN DOTS-12578 +#else + -- Skipping xK_braille_dots_12578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3578 + xK_braille_dots_3578, -- U+28d4 BRAILLE PATTERN DOTS-3578 +#else + -- Skipping xK_braille_dots_3578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13578 + xK_braille_dots_13578, -- U+28d5 BRAILLE PATTERN DOTS-13578 +#else + -- Skipping xK_braille_dots_13578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23578 + xK_braille_dots_23578, -- U+28d6 BRAILLE PATTERN DOTS-23578 +#else + -- Skipping xK_braille_dots_23578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123578 + xK_braille_dots_123578, -- U+28d7 BRAILLE PATTERN DOTS-123578 +#else + -- Skipping xK_braille_dots_123578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_4578 + xK_braille_dots_4578, -- U+28d8 BRAILLE PATTERN DOTS-4578 +#else + -- Skipping xK_braille_dots_4578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_14578 + xK_braille_dots_14578, -- U+28d9 BRAILLE PATTERN DOTS-14578 +#else + -- Skipping xK_braille_dots_14578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_24578 + xK_braille_dots_24578, -- U+28da BRAILLE PATTERN DOTS-24578 +#else + -- Skipping xK_braille_dots_24578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_124578 + xK_braille_dots_124578, -- U+28db BRAILLE PATTERN DOTS-124578 +#else + -- Skipping xK_braille_dots_124578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_34578 + xK_braille_dots_34578, -- U+28dc BRAILLE PATTERN DOTS-34578 +#else + -- Skipping xK_braille_dots_34578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_134578 + xK_braille_dots_134578, -- U+28dd BRAILLE PATTERN DOTS-134578 +#else + -- Skipping xK_braille_dots_134578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_234578 + xK_braille_dots_234578, -- U+28de BRAILLE PATTERN DOTS-234578 +#else + -- Skipping xK_braille_dots_234578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1234578 + xK_braille_dots_1234578, -- U+28df BRAILLE PATTERN DOTS-1234578 +#else + -- Skipping xK_braille_dots_1234578 because your X doesn't define it +#endif +#ifdef XK_braille_dots_678 + xK_braille_dots_678, -- U+28e0 BRAILLE PATTERN DOTS-678 +#else + -- Skipping xK_braille_dots_678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1678 + xK_braille_dots_1678, -- U+28e1 BRAILLE PATTERN DOTS-1678 +#else + -- Skipping xK_braille_dots_1678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2678 + xK_braille_dots_2678, -- U+28e2 BRAILLE PATTERN DOTS-2678 +#else + -- Skipping xK_braille_dots_2678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12678 + xK_braille_dots_12678, -- U+28e3 BRAILLE PATTERN DOTS-12678 +#else + -- Skipping xK_braille_dots_12678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_3678 + xK_braille_dots_3678, -- U+28e4 BRAILLE PATTERN DOTS-3678 +#else + -- Skipping xK_braille_dots_3678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_13678 + xK_braille_dots_13678, -- U+28e5 BRAILLE PATTERN DOTS-13678 +#else + -- Skipping xK_braille_dots_13678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_23678 + xK_braille_dots_23678, -- U+28e6 BRAILLE PATTERN DOTS-23678 +#else + -- Skipping xK_braille_dots_23678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_123678 + xK_braille_dots_123678, -- U+28e7 BRAILLE PATTERN DOTS-123678 +#else + -- Skipping xK_braille_dots_123678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_4678 + xK_braille_dots_4678, -- U+28e8 BRAILLE PATTERN DOTS-4678 +#else + -- Skipping xK_braille_dots_4678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_14678 + xK_braille_dots_14678, -- U+28e9 BRAILLE PATTERN DOTS-14678 +#else + -- Skipping xK_braille_dots_14678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_24678 + xK_braille_dots_24678, -- U+28ea BRAILLE PATTERN DOTS-24678 +#else + -- Skipping xK_braille_dots_24678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_124678 + xK_braille_dots_124678, -- U+28eb BRAILLE PATTERN DOTS-124678 +#else + -- Skipping xK_braille_dots_124678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_34678 + xK_braille_dots_34678, -- U+28ec BRAILLE PATTERN DOTS-34678 +#else + -- Skipping xK_braille_dots_34678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_134678 + xK_braille_dots_134678, -- U+28ed BRAILLE PATTERN DOTS-134678 +#else + -- Skipping xK_braille_dots_134678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_234678 + xK_braille_dots_234678, -- U+28ee BRAILLE PATTERN DOTS-234678 +#else + -- Skipping xK_braille_dots_234678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1234678 + xK_braille_dots_1234678, -- U+28ef BRAILLE PATTERN DOTS-1234678 +#else + -- Skipping xK_braille_dots_1234678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_5678 + xK_braille_dots_5678, -- U+28f0 BRAILLE PATTERN DOTS-5678 +#else + -- Skipping xK_braille_dots_5678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_15678 + xK_braille_dots_15678, -- U+28f1 BRAILLE PATTERN DOTS-15678 +#else + -- Skipping xK_braille_dots_15678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_25678 + xK_braille_dots_25678, -- U+28f2 BRAILLE PATTERN DOTS-25678 +#else + -- Skipping xK_braille_dots_25678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_125678 + xK_braille_dots_125678, -- U+28f3 BRAILLE PATTERN DOTS-125678 +#else + -- Skipping xK_braille_dots_125678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_35678 + xK_braille_dots_35678, -- U+28f4 BRAILLE PATTERN DOTS-35678 +#else + -- Skipping xK_braille_dots_35678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_135678 + xK_braille_dots_135678, -- U+28f5 BRAILLE PATTERN DOTS-135678 +#else + -- Skipping xK_braille_dots_135678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_235678 + xK_braille_dots_235678, -- U+28f6 BRAILLE PATTERN DOTS-235678 +#else + -- Skipping xK_braille_dots_235678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1235678 + xK_braille_dots_1235678, -- U+28f7 BRAILLE PATTERN DOTS-1235678 +#else + -- Skipping xK_braille_dots_1235678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_45678 + xK_braille_dots_45678, -- U+28f8 BRAILLE PATTERN DOTS-45678 +#else + -- Skipping xK_braille_dots_45678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_145678 + xK_braille_dots_145678, -- U+28f9 BRAILLE PATTERN DOTS-145678 +#else + -- Skipping xK_braille_dots_145678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_245678 + xK_braille_dots_245678, -- U+28fa BRAILLE PATTERN DOTS-245678 +#else + -- Skipping xK_braille_dots_245678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1245678 + xK_braille_dots_1245678, -- U+28fb BRAILLE PATTERN DOTS-1245678 +#else + -- Skipping xK_braille_dots_1245678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_345678 + xK_braille_dots_345678, -- U+28fc BRAILLE PATTERN DOTS-345678 +#else + -- Skipping xK_braille_dots_345678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_1345678 + xK_braille_dots_1345678, -- U+28fd BRAILLE PATTERN DOTS-1345678 +#else + -- Skipping xK_braille_dots_1345678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_2345678 + xK_braille_dots_2345678, -- U+28fe BRAILLE PATTERN DOTS-2345678 +#else + -- Skipping xK_braille_dots_2345678 because your X doesn't define it +#endif +#ifdef XK_braille_dots_12345678 + xK_braille_dots_12345678, -- U+28ff BRAILLE PATTERN DOTS-12345678 +#else + -- Skipping xK_braille_dots_12345678 because your X doesn't define it +#endif + ) where + +import Graphics.X11.Types + +#include "HsAllKeysyms.h" + +#if 0 +# ifdef XK_VoidSymbol +xK_VoidSymbol :: KeySym +xK_VoidSymbol = #const XK_VoidSymbol +# endif +#endif + +-- XK_MISCELLANY +#if 0 +# ifdef XK_BackSpace +xK_BackSpace :: KeySym +xK_BackSpace = #const XK_BackSpace +# endif +# ifdef XK_Tab +xK_Tab :: KeySym +xK_Tab = #const XK_Tab +# endif +# ifdef XK_Linefeed +xK_Linefeed :: KeySym +xK_Linefeed = #const XK_Linefeed +# endif +# ifdef XK_Clear +xK_Clear :: KeySym +xK_Clear = #const XK_Clear +# endif +# ifdef XK_Return +xK_Return :: KeySym +xK_Return = #const XK_Return +# endif +# ifdef XK_Pause +xK_Pause :: KeySym +xK_Pause = #const XK_Pause +# endif +# ifdef XK_Scroll_Lock +xK_Scroll_Lock :: KeySym +xK_Scroll_Lock = #const XK_Scroll_Lock +# endif +# ifdef XK_Sys_Req +xK_Sys_Req :: KeySym +xK_Sys_Req = #const XK_Sys_Req +# endif +# ifdef XK_Escape +xK_Escape :: KeySym +xK_Escape = #const XK_Escape +# endif +# ifdef XK_Delete +xK_Delete :: KeySym +xK_Delete = #const XK_Delete +# endif +# ifdef XK_Multi_key +xK_Multi_key :: KeySym +xK_Multi_key = #const XK_Multi_key +# endif +# ifdef XK_Codeinput +xK_Codeinput :: KeySym +xK_Codeinput = #const XK_Codeinput +# endif +# ifdef XK_SingleCandidate +xK_SingleCandidate :: KeySym +xK_SingleCandidate = #const XK_SingleCandidate +# endif +# ifdef XK_MultipleCandidate +xK_MultipleCandidate :: KeySym +xK_MultipleCandidate = #const XK_MultipleCandidate +# endif +# ifdef XK_PreviousCandidate +xK_PreviousCandidate :: KeySym +xK_PreviousCandidate = #const XK_PreviousCandidate +# endif +# ifdef XK_Kanji +xK_Kanji :: KeySym +xK_Kanji = #const XK_Kanji +# endif +# ifdef XK_Muhenkan +xK_Muhenkan :: KeySym +xK_Muhenkan = #const XK_Muhenkan +# endif +# ifdef XK_Henkan_Mode +xK_Henkan_Mode :: KeySym +xK_Henkan_Mode = #const XK_Henkan_Mode +# endif +# ifdef XK_Henkan +xK_Henkan :: KeySym +xK_Henkan = #const XK_Henkan +# endif +# ifdef XK_Romaji +xK_Romaji :: KeySym +xK_Romaji = #const XK_Romaji +# endif +# ifdef XK_Hiragana +xK_Hiragana :: KeySym +xK_Hiragana = #const XK_Hiragana +# endif +# ifdef XK_Katakana +xK_Katakana :: KeySym +xK_Katakana = #const XK_Katakana +# endif +# ifdef XK_Hiragana_Katakana +xK_Hiragana_Katakana :: KeySym +xK_Hiragana_Katakana = #const XK_Hiragana_Katakana +# endif +# ifdef XK_Zenkaku +xK_Zenkaku :: KeySym +xK_Zenkaku = #const XK_Zenkaku +# endif +# ifdef XK_Hankaku +xK_Hankaku :: KeySym +xK_Hankaku = #const XK_Hankaku +# endif +# ifdef XK_Zenkaku_Hankaku +xK_Zenkaku_Hankaku :: KeySym +xK_Zenkaku_Hankaku = #const XK_Zenkaku_Hankaku +# endif +# ifdef XK_Touroku +xK_Touroku :: KeySym +xK_Touroku = #const XK_Touroku +# endif +# ifdef XK_Massyo +xK_Massyo :: KeySym +xK_Massyo = #const XK_Massyo +# endif +# ifdef XK_Kana_Lock +xK_Kana_Lock :: KeySym +xK_Kana_Lock = #const XK_Kana_Lock +# endif +# ifdef XK_Kana_Shift +xK_Kana_Shift :: KeySym +xK_Kana_Shift = #const XK_Kana_Shift +# endif +# ifdef XK_Eisu_Shift +xK_Eisu_Shift :: KeySym +xK_Eisu_Shift = #const XK_Eisu_Shift +# endif +# ifdef XK_Eisu_toggle +xK_Eisu_toggle :: KeySym +xK_Eisu_toggle = #const XK_Eisu_toggle +# endif +# ifdef XK_Kanji_Bangou +xK_Kanji_Bangou :: KeySym +xK_Kanji_Bangou = #const XK_Kanji_Bangou +# endif +# ifdef XK_Zen_Koho +xK_Zen_Koho :: KeySym +xK_Zen_Koho = #const XK_Zen_Koho +# endif +# ifdef XK_Mae_Koho +xK_Mae_Koho :: KeySym +xK_Mae_Koho = #const XK_Mae_Koho +# endif +# ifdef XK_Home +xK_Home :: KeySym +xK_Home = #const XK_Home +# endif +# ifdef XK_Left +xK_Left :: KeySym +xK_Left = #const XK_Left +# endif +# ifdef XK_Up +xK_Up :: KeySym +xK_Up = #const XK_Up +# endif +# ifdef XK_Right +xK_Right :: KeySym +xK_Right = #const XK_Right +# endif +# ifdef XK_Down +xK_Down :: KeySym +xK_Down = #const XK_Down +# endif +# ifdef XK_Prior +xK_Prior :: KeySym +xK_Prior = #const XK_Prior +# endif +# ifdef XK_Page_Up +xK_Page_Up :: KeySym +xK_Page_Up = #const XK_Page_Up +# endif +# ifdef XK_Next +xK_Next :: KeySym +xK_Next = #const XK_Next +# endif +# ifdef XK_Page_Down +xK_Page_Down :: KeySym +xK_Page_Down = #const XK_Page_Down +# endif +# ifdef XK_End +xK_End :: KeySym +xK_End = #const XK_End +# endif +# ifdef XK_Begin +xK_Begin :: KeySym +xK_Begin = #const XK_Begin +# endif +# ifdef XK_Select +xK_Select :: KeySym +xK_Select = #const XK_Select +# endif +# ifdef XK_Print +xK_Print :: KeySym +xK_Print = #const XK_Print +# endif +# ifdef XK_Execute +xK_Execute :: KeySym +xK_Execute = #const XK_Execute +# endif +# ifdef XK_Insert +xK_Insert :: KeySym +xK_Insert = #const XK_Insert +# endif +# ifdef XK_Undo +xK_Undo :: KeySym +xK_Undo = #const XK_Undo +# endif +# ifdef XK_Redo +xK_Redo :: KeySym +xK_Redo = #const XK_Redo +# endif +# ifdef XK_Menu +xK_Menu :: KeySym +xK_Menu = #const XK_Menu +# endif +# ifdef XK_Find +xK_Find :: KeySym +xK_Find = #const XK_Find +# endif +# ifdef XK_Cancel +xK_Cancel :: KeySym +xK_Cancel = #const XK_Cancel +# endif +# ifdef XK_Help +xK_Help :: KeySym +xK_Help = #const XK_Help +# endif +# ifdef XK_Break +xK_Break :: KeySym +xK_Break = #const XK_Break +# endif +# ifdef XK_Mode_switch +xK_Mode_switch :: KeySym +xK_Mode_switch = #const XK_Mode_switch +# endif +# ifdef XK_script_switch +xK_script_switch :: KeySym +xK_script_switch = #const XK_script_switch +# endif +# ifdef XK_Num_Lock +xK_Num_Lock :: KeySym +xK_Num_Lock = #const XK_Num_Lock +# endif +# ifdef XK_KP_Space +xK_KP_Space :: KeySym +xK_KP_Space = #const XK_KP_Space +# endif +# ifdef XK_KP_Tab +xK_KP_Tab :: KeySym +xK_KP_Tab = #const XK_KP_Tab +# endif +# ifdef XK_KP_Enter +xK_KP_Enter :: KeySym +xK_KP_Enter = #const XK_KP_Enter +# endif +# ifdef XK_KP_F1 +xK_KP_F1 :: KeySym +xK_KP_F1 = #const XK_KP_F1 +# endif +# ifdef XK_KP_F2 +xK_KP_F2 :: KeySym +xK_KP_F2 = #const XK_KP_F2 +# endif +# ifdef XK_KP_F3 +xK_KP_F3 :: KeySym +xK_KP_F3 = #const XK_KP_F3 +# endif +# ifdef XK_KP_F4 +xK_KP_F4 :: KeySym +xK_KP_F4 = #const XK_KP_F4 +# endif +# ifdef XK_KP_Home +xK_KP_Home :: KeySym +xK_KP_Home = #const XK_KP_Home +# endif +# ifdef XK_KP_Left +xK_KP_Left :: KeySym +xK_KP_Left = #const XK_KP_Left +# endif +# ifdef XK_KP_Up +xK_KP_Up :: KeySym +xK_KP_Up = #const XK_KP_Up +# endif +# ifdef XK_KP_Right +xK_KP_Right :: KeySym +xK_KP_Right = #const XK_KP_Right +# endif +# ifdef XK_KP_Down +xK_KP_Down :: KeySym +xK_KP_Down = #const XK_KP_Down +# endif +# ifdef XK_KP_Prior +xK_KP_Prior :: KeySym +xK_KP_Prior = #const XK_KP_Prior +# endif +# ifdef XK_KP_Page_Up +xK_KP_Page_Up :: KeySym +xK_KP_Page_Up = #const XK_KP_Page_Up +# endif +# ifdef XK_KP_Next +xK_KP_Next :: KeySym +xK_KP_Next = #const XK_KP_Next +# endif +# ifdef XK_KP_Page_Down +xK_KP_Page_Down :: KeySym +xK_KP_Page_Down = #const XK_KP_Page_Down +# endif +# ifdef XK_KP_End +xK_KP_End :: KeySym +xK_KP_End = #const XK_KP_End +# endif +# ifdef XK_KP_Begin +xK_KP_Begin :: KeySym +xK_KP_Begin = #const XK_KP_Begin +# endif +# ifdef XK_KP_Insert +xK_KP_Insert :: KeySym +xK_KP_Insert = #const XK_KP_Insert +# endif +# ifdef XK_KP_Delete +xK_KP_Delete :: KeySym +xK_KP_Delete = #const XK_KP_Delete +# endif +# ifdef XK_KP_Equal +xK_KP_Equal :: KeySym +xK_KP_Equal = #const XK_KP_Equal +# endif +# ifdef XK_KP_Multiply +xK_KP_Multiply :: KeySym +xK_KP_Multiply = #const XK_KP_Multiply +# endif +# ifdef XK_KP_Add +xK_KP_Add :: KeySym +xK_KP_Add = #const XK_KP_Add +# endif +# ifdef XK_KP_Separator +xK_KP_Separator :: KeySym +xK_KP_Separator = #const XK_KP_Separator +# endif +# ifdef XK_KP_Subtract +xK_KP_Subtract :: KeySym +xK_KP_Subtract = #const XK_KP_Subtract +# endif +# ifdef XK_KP_Decimal +xK_KP_Decimal :: KeySym +xK_KP_Decimal = #const XK_KP_Decimal +# endif +# ifdef XK_KP_Divide +xK_KP_Divide :: KeySym +xK_KP_Divide = #const XK_KP_Divide +# endif +# ifdef XK_KP_0 +xK_KP_0 :: KeySym +xK_KP_0 = #const XK_KP_0 +# endif +# ifdef XK_KP_1 +xK_KP_1 :: KeySym +xK_KP_1 = #const XK_KP_1 +# endif +# ifdef XK_KP_2 +xK_KP_2 :: KeySym +xK_KP_2 = #const XK_KP_2 +# endif +# ifdef XK_KP_3 +xK_KP_3 :: KeySym +xK_KP_3 = #const XK_KP_3 +# endif +# ifdef XK_KP_4 +xK_KP_4 :: KeySym +xK_KP_4 = #const XK_KP_4 +# endif +# ifdef XK_KP_5 +xK_KP_5 :: KeySym +xK_KP_5 = #const XK_KP_5 +# endif +# ifdef XK_KP_6 +xK_KP_6 :: KeySym +xK_KP_6 = #const XK_KP_6 +# endif +# ifdef XK_KP_7 +xK_KP_7 :: KeySym +xK_KP_7 = #const XK_KP_7 +# endif +# ifdef XK_KP_8 +xK_KP_8 :: KeySym +xK_KP_8 = #const XK_KP_8 +# endif +# ifdef XK_KP_9 +xK_KP_9 :: KeySym +xK_KP_9 = #const XK_KP_9 +# endif +# ifdef XK_F1 +xK_F1 :: KeySym +xK_F1 = #const XK_F1 +# endif +# ifdef XK_F2 +xK_F2 :: KeySym +xK_F2 = #const XK_F2 +# endif +# ifdef XK_F3 +xK_F3 :: KeySym +xK_F3 = #const XK_F3 +# endif +# ifdef XK_F4 +xK_F4 :: KeySym +xK_F4 = #const XK_F4 +# endif +# ifdef XK_F5 +xK_F5 :: KeySym +xK_F5 = #const XK_F5 +# endif +# ifdef XK_F6 +xK_F6 :: KeySym +xK_F6 = #const XK_F6 +# endif +# ifdef XK_F7 +xK_F7 :: KeySym +xK_F7 = #const XK_F7 +# endif +# ifdef XK_F8 +xK_F8 :: KeySym +xK_F8 = #const XK_F8 +# endif +# ifdef XK_F9 +xK_F9 :: KeySym +xK_F9 = #const XK_F9 +# endif +# ifdef XK_F10 +xK_F10 :: KeySym +xK_F10 = #const XK_F10 +# endif +# ifdef XK_F11 +xK_F11 :: KeySym +xK_F11 = #const XK_F11 +# endif +# ifdef XK_L1 +xK_L1 :: KeySym +xK_L1 = #const XK_L1 +# endif +# ifdef XK_F12 +xK_F12 :: KeySym +xK_F12 = #const XK_F12 +# endif +# ifdef XK_L2 +xK_L2 :: KeySym +xK_L2 = #const XK_L2 +# endif +# ifdef XK_F13 +xK_F13 :: KeySym +xK_F13 = #const XK_F13 +# endif +# ifdef XK_L3 +xK_L3 :: KeySym +xK_L3 = #const XK_L3 +# endif +# ifdef XK_F14 +xK_F14 :: KeySym +xK_F14 = #const XK_F14 +# endif +# ifdef XK_L4 +xK_L4 :: KeySym +xK_L4 = #const XK_L4 +# endif +# ifdef XK_F15 +xK_F15 :: KeySym +xK_F15 = #const XK_F15 +# endif +# ifdef XK_L5 +xK_L5 :: KeySym +xK_L5 = #const XK_L5 +# endif +# ifdef XK_F16 +xK_F16 :: KeySym +xK_F16 = #const XK_F16 +# endif +# ifdef XK_L6 +xK_L6 :: KeySym +xK_L6 = #const XK_L6 +# endif +# ifdef XK_F17 +xK_F17 :: KeySym +xK_F17 = #const XK_F17 +# endif +# ifdef XK_L7 +xK_L7 :: KeySym +xK_L7 = #const XK_L7 +# endif +# ifdef XK_F18 +xK_F18 :: KeySym +xK_F18 = #const XK_F18 +# endif +# ifdef XK_L8 +xK_L8 :: KeySym +xK_L8 = #const XK_L8 +# endif +# ifdef XK_F19 +xK_F19 :: KeySym +xK_F19 = #const XK_F19 +# endif +# ifdef XK_L9 +xK_L9 :: KeySym +xK_L9 = #const XK_L9 +# endif +# ifdef XK_F20 +xK_F20 :: KeySym +xK_F20 = #const XK_F20 +# endif +# ifdef XK_L10 +xK_L10 :: KeySym +xK_L10 = #const XK_L10 +# endif +# ifdef XK_F21 +xK_F21 :: KeySym +xK_F21 = #const XK_F21 +# endif +# ifdef XK_R1 +xK_R1 :: KeySym +xK_R1 = #const XK_R1 +# endif +# ifdef XK_F22 +xK_F22 :: KeySym +xK_F22 = #const XK_F22 +# endif +# ifdef XK_R2 +xK_R2 :: KeySym +xK_R2 = #const XK_R2 +# endif +# ifdef XK_F23 +xK_F23 :: KeySym +xK_F23 = #const XK_F23 +# endif +# ifdef XK_R3 +xK_R3 :: KeySym +xK_R3 = #const XK_R3 +# endif +# ifdef XK_F24 +xK_F24 :: KeySym +xK_F24 = #const XK_F24 +# endif +# ifdef XK_R4 +xK_R4 :: KeySym +xK_R4 = #const XK_R4 +# endif +# ifdef XK_F25 +xK_F25 :: KeySym +xK_F25 = #const XK_F25 +# endif +# ifdef XK_R5 +xK_R5 :: KeySym +xK_R5 = #const XK_R5 +# endif +# ifdef XK_F26 +xK_F26 :: KeySym +xK_F26 = #const XK_F26 +# endif +# ifdef XK_R6 +xK_R6 :: KeySym +xK_R6 = #const XK_R6 +# endif +# ifdef XK_F27 +xK_F27 :: KeySym +xK_F27 = #const XK_F27 +# endif +# ifdef XK_R7 +xK_R7 :: KeySym +xK_R7 = #const XK_R7 +# endif +# ifdef XK_F28 +xK_F28 :: KeySym +xK_F28 = #const XK_F28 +# endif +# ifdef XK_R8 +xK_R8 :: KeySym +xK_R8 = #const XK_R8 +# endif +# ifdef XK_F29 +xK_F29 :: KeySym +xK_F29 = #const XK_F29 +# endif +# ifdef XK_R9 +xK_R9 :: KeySym +xK_R9 = #const XK_R9 +# endif +# ifdef XK_F30 +xK_F30 :: KeySym +xK_F30 = #const XK_F30 +# endif +# ifdef XK_R10 +xK_R10 :: KeySym +xK_R10 = #const XK_R10 +# endif +# ifdef XK_F31 +xK_F31 :: KeySym +xK_F31 = #const XK_F31 +# endif +# ifdef XK_R11 +xK_R11 :: KeySym +xK_R11 = #const XK_R11 +# endif +# ifdef XK_F32 +xK_F32 :: KeySym +xK_F32 = #const XK_F32 +# endif +# ifdef XK_R12 +xK_R12 :: KeySym +xK_R12 = #const XK_R12 +# endif +# ifdef XK_F33 +xK_F33 :: KeySym +xK_F33 = #const XK_F33 +# endif +# ifdef XK_R13 +xK_R13 :: KeySym +xK_R13 = #const XK_R13 +# endif +# ifdef XK_F34 +xK_F34 :: KeySym +xK_F34 = #const XK_F34 +# endif +# ifdef XK_R14 +xK_R14 :: KeySym +xK_R14 = #const XK_R14 +# endif +# ifdef XK_F35 +xK_F35 :: KeySym +xK_F35 = #const XK_F35 +# endif +# ifdef XK_R15 +xK_R15 :: KeySym +xK_R15 = #const XK_R15 +# endif +# ifdef XK_Shift_L +xK_Shift_L :: KeySym +xK_Shift_L = #const XK_Shift_L +# endif +# ifdef XK_Shift_R +xK_Shift_R :: KeySym +xK_Shift_R = #const XK_Shift_R +# endif +# ifdef XK_Control_L +xK_Control_L :: KeySym +xK_Control_L = #const XK_Control_L +# endif +# ifdef XK_Control_R +xK_Control_R :: KeySym +xK_Control_R = #const XK_Control_R +# endif +# ifdef XK_Caps_Lock +xK_Caps_Lock :: KeySym +xK_Caps_Lock = #const XK_Caps_Lock +# endif +# ifdef XK_Shift_Lock +xK_Shift_Lock :: KeySym +xK_Shift_Lock = #const XK_Shift_Lock +# endif +# ifdef XK_Meta_L +xK_Meta_L :: KeySym +xK_Meta_L = #const XK_Meta_L +# endif +# ifdef XK_Meta_R +xK_Meta_R :: KeySym +xK_Meta_R = #const XK_Meta_R +# endif +# ifdef XK_Alt_L +xK_Alt_L :: KeySym +xK_Alt_L = #const XK_Alt_L +# endif +# ifdef XK_Alt_R +xK_Alt_R :: KeySym +xK_Alt_R = #const XK_Alt_R +# endif +# ifdef XK_Super_L +xK_Super_L :: KeySym +xK_Super_L = #const XK_Super_L +# endif +# ifdef XK_Super_R +xK_Super_R :: KeySym +xK_Super_R = #const XK_Super_R +# endif +# ifdef XK_Hyper_L +xK_Hyper_L :: KeySym +xK_Hyper_L = #const XK_Hyper_L +# endif +# ifdef XK_Hyper_R +xK_Hyper_R :: KeySym +xK_Hyper_R = #const XK_Hyper_R +# endif +#endif + +-- XK_XKB_KEYS +#ifdef XK_ISO_Lock +xK_ISO_Lock :: KeySym +xK_ISO_Lock = #const XK_ISO_Lock +#endif +#ifdef XK_ISO_Level2_Latch +xK_ISO_Level2_Latch :: KeySym +xK_ISO_Level2_Latch = #const XK_ISO_Level2_Latch +#endif +#ifdef XK_ISO_Level3_Shift +xK_ISO_Level3_Shift :: KeySym +xK_ISO_Level3_Shift = #const XK_ISO_Level3_Shift +#endif +#ifdef XK_ISO_Level3_Latch +xK_ISO_Level3_Latch :: KeySym +xK_ISO_Level3_Latch = #const XK_ISO_Level3_Latch +#endif +#ifdef XK_ISO_Level3_Lock +xK_ISO_Level3_Lock :: KeySym +xK_ISO_Level3_Lock = #const XK_ISO_Level3_Lock +#endif +#ifdef XK_ISO_Level5_Shift +xK_ISO_Level5_Shift :: KeySym +xK_ISO_Level5_Shift = #const XK_ISO_Level5_Shift +#endif +#ifdef XK_ISO_Level5_Latch +xK_ISO_Level5_Latch :: KeySym +xK_ISO_Level5_Latch = #const XK_ISO_Level5_Latch +#endif +#ifdef XK_ISO_Level5_Lock +xK_ISO_Level5_Lock :: KeySym +xK_ISO_Level5_Lock = #const XK_ISO_Level5_Lock +#endif +#ifdef XK_ISO_Group_Shift +xK_ISO_Group_Shift :: KeySym +xK_ISO_Group_Shift = #const XK_ISO_Group_Shift +#endif +#ifdef XK_ISO_Group_Latch +xK_ISO_Group_Latch :: KeySym +xK_ISO_Group_Latch = #const XK_ISO_Group_Latch +#endif +#ifdef XK_ISO_Group_Lock +xK_ISO_Group_Lock :: KeySym +xK_ISO_Group_Lock = #const XK_ISO_Group_Lock +#endif +#ifdef XK_ISO_Next_Group +xK_ISO_Next_Group :: KeySym +xK_ISO_Next_Group = #const XK_ISO_Next_Group +#endif +#ifdef XK_ISO_Next_Group_Lock +xK_ISO_Next_Group_Lock :: KeySym +xK_ISO_Next_Group_Lock = #const XK_ISO_Next_Group_Lock +#endif +#ifdef XK_ISO_Prev_Group +xK_ISO_Prev_Group :: KeySym +xK_ISO_Prev_Group = #const XK_ISO_Prev_Group +#endif +#ifdef XK_ISO_Prev_Group_Lock +xK_ISO_Prev_Group_Lock :: KeySym +xK_ISO_Prev_Group_Lock = #const XK_ISO_Prev_Group_Lock +#endif +#ifdef XK_ISO_First_Group +xK_ISO_First_Group :: KeySym +xK_ISO_First_Group = #const XK_ISO_First_Group +#endif +#ifdef XK_ISO_First_Group_Lock +xK_ISO_First_Group_Lock :: KeySym +xK_ISO_First_Group_Lock = #const XK_ISO_First_Group_Lock +#endif +#ifdef XK_ISO_Last_Group +xK_ISO_Last_Group :: KeySym +xK_ISO_Last_Group = #const XK_ISO_Last_Group +#endif +#ifdef XK_ISO_Last_Group_Lock +xK_ISO_Last_Group_Lock :: KeySym +xK_ISO_Last_Group_Lock = #const XK_ISO_Last_Group_Lock +#endif +#ifdef XK_ISO_Left_Tab +xK_ISO_Left_Tab :: KeySym +xK_ISO_Left_Tab = #const XK_ISO_Left_Tab +#endif +#ifdef XK_ISO_Move_Line_Up +xK_ISO_Move_Line_Up :: KeySym +xK_ISO_Move_Line_Up = #const XK_ISO_Move_Line_Up +#endif +#ifdef XK_ISO_Move_Line_Down +xK_ISO_Move_Line_Down :: KeySym +xK_ISO_Move_Line_Down = #const XK_ISO_Move_Line_Down +#endif +#ifdef XK_ISO_Partial_Line_Up +xK_ISO_Partial_Line_Up :: KeySym +xK_ISO_Partial_Line_Up = #const XK_ISO_Partial_Line_Up +#endif +#ifdef XK_ISO_Partial_Line_Down +xK_ISO_Partial_Line_Down :: KeySym +xK_ISO_Partial_Line_Down = #const XK_ISO_Partial_Line_Down +#endif +#ifdef XK_ISO_Partial_Space_Left +xK_ISO_Partial_Space_Left :: KeySym +xK_ISO_Partial_Space_Left = #const XK_ISO_Partial_Space_Left +#endif +#ifdef XK_ISO_Partial_Space_Right +xK_ISO_Partial_Space_Right :: KeySym +xK_ISO_Partial_Space_Right = #const XK_ISO_Partial_Space_Right +#endif +#ifdef XK_ISO_Set_Margin_Left +xK_ISO_Set_Margin_Left :: KeySym +xK_ISO_Set_Margin_Left = #const XK_ISO_Set_Margin_Left +#endif +#ifdef XK_ISO_Set_Margin_Right +xK_ISO_Set_Margin_Right :: KeySym +xK_ISO_Set_Margin_Right = #const XK_ISO_Set_Margin_Right +#endif +#ifdef XK_ISO_Release_Margin_Left +xK_ISO_Release_Margin_Left :: KeySym +xK_ISO_Release_Margin_Left = #const XK_ISO_Release_Margin_Left +#endif +#ifdef XK_ISO_Release_Margin_Right +xK_ISO_Release_Margin_Right :: KeySym +xK_ISO_Release_Margin_Right = #const XK_ISO_Release_Margin_Right +#endif +#ifdef XK_ISO_Release_Both_Margins +xK_ISO_Release_Both_Margins :: KeySym +xK_ISO_Release_Both_Margins = #const XK_ISO_Release_Both_Margins +#endif +#ifdef XK_ISO_Fast_Cursor_Left +xK_ISO_Fast_Cursor_Left :: KeySym +xK_ISO_Fast_Cursor_Left = #const XK_ISO_Fast_Cursor_Left +#endif +#ifdef XK_ISO_Fast_Cursor_Right +xK_ISO_Fast_Cursor_Right :: KeySym +xK_ISO_Fast_Cursor_Right = #const XK_ISO_Fast_Cursor_Right +#endif +#ifdef XK_ISO_Fast_Cursor_Up +xK_ISO_Fast_Cursor_Up :: KeySym +xK_ISO_Fast_Cursor_Up = #const XK_ISO_Fast_Cursor_Up +#endif +#ifdef XK_ISO_Fast_Cursor_Down +xK_ISO_Fast_Cursor_Down :: KeySym +xK_ISO_Fast_Cursor_Down = #const XK_ISO_Fast_Cursor_Down +#endif +#ifdef XK_ISO_Continuous_Underline +xK_ISO_Continuous_Underline :: KeySym +xK_ISO_Continuous_Underline = #const XK_ISO_Continuous_Underline +#endif +#ifdef XK_ISO_Discontinuous_Underline +xK_ISO_Discontinuous_Underline :: KeySym +xK_ISO_Discontinuous_Underline = #const XK_ISO_Discontinuous_Underline +#endif +#ifdef XK_ISO_Emphasize +xK_ISO_Emphasize :: KeySym +xK_ISO_Emphasize = #const XK_ISO_Emphasize +#endif +#ifdef XK_ISO_Center_Object +xK_ISO_Center_Object :: KeySym +xK_ISO_Center_Object = #const XK_ISO_Center_Object +#endif +#ifdef XK_ISO_Enter +xK_ISO_Enter :: KeySym +xK_ISO_Enter = #const XK_ISO_Enter +#endif +#ifdef XK_dead_grave +xK_dead_grave :: KeySym +xK_dead_grave = #const XK_dead_grave +#endif +#ifdef XK_dead_acute +xK_dead_acute :: KeySym +xK_dead_acute = #const XK_dead_acute +#endif +#ifdef XK_dead_circumflex +xK_dead_circumflex :: KeySym +xK_dead_circumflex = #const XK_dead_circumflex +#endif +#ifdef XK_dead_tilde +xK_dead_tilde :: KeySym +xK_dead_tilde = #const XK_dead_tilde +#endif +#ifdef XK_dead_macron +xK_dead_macron :: KeySym +xK_dead_macron = #const XK_dead_macron +#endif +#ifdef XK_dead_breve +xK_dead_breve :: KeySym +xK_dead_breve = #const XK_dead_breve +#endif +#ifdef XK_dead_abovedot +xK_dead_abovedot :: KeySym +xK_dead_abovedot = #const XK_dead_abovedot +#endif +#ifdef XK_dead_diaeresis +xK_dead_diaeresis :: KeySym +xK_dead_diaeresis = #const XK_dead_diaeresis +#endif +#ifdef XK_dead_abovering +xK_dead_abovering :: KeySym +xK_dead_abovering = #const XK_dead_abovering +#endif +#ifdef XK_dead_doubleacute +xK_dead_doubleacute :: KeySym +xK_dead_doubleacute = #const XK_dead_doubleacute +#endif +#ifdef XK_dead_caron +xK_dead_caron :: KeySym +xK_dead_caron = #const XK_dead_caron +#endif +#ifdef XK_dead_cedilla +xK_dead_cedilla :: KeySym +xK_dead_cedilla = #const XK_dead_cedilla +#endif +#ifdef XK_dead_ogonek +xK_dead_ogonek :: KeySym +xK_dead_ogonek = #const XK_dead_ogonek +#endif +#ifdef XK_dead_iota +xK_dead_iota :: KeySym +xK_dead_iota = #const XK_dead_iota +#endif +#ifdef XK_dead_voiced_sound +xK_dead_voiced_sound :: KeySym +xK_dead_voiced_sound = #const XK_dead_voiced_sound +#endif +#ifdef XK_dead_semivoiced_sound +xK_dead_semivoiced_sound :: KeySym +xK_dead_semivoiced_sound = #const XK_dead_semivoiced_sound +#endif +#ifdef XK_dead_belowdot +xK_dead_belowdot :: KeySym +xK_dead_belowdot = #const XK_dead_belowdot +#endif +#ifdef XK_dead_hook +xK_dead_hook :: KeySym +xK_dead_hook = #const XK_dead_hook +#endif +#ifdef XK_dead_horn +xK_dead_horn :: KeySym +xK_dead_horn = #const XK_dead_horn +#endif +#ifdef XK_dead_stroke +xK_dead_stroke :: KeySym +xK_dead_stroke = #const XK_dead_stroke +#endif +#ifdef XK_dead_abovecomma +xK_dead_abovecomma :: KeySym +xK_dead_abovecomma = #const XK_dead_abovecomma +#endif +#ifdef XK_dead_psili +xK_dead_psili :: KeySym +xK_dead_psili = #const XK_dead_psili +#endif +#ifdef XK_dead_abovereversedcomma +xK_dead_abovereversedcomma :: KeySym +xK_dead_abovereversedcomma = #const XK_dead_abovereversedcomma +#endif +#ifdef XK_dead_dasia +xK_dead_dasia :: KeySym +xK_dead_dasia = #const XK_dead_dasia +#endif +#ifdef XK_First_Virtual_Screen +xK_First_Virtual_Screen :: KeySym +xK_First_Virtual_Screen = #const XK_First_Virtual_Screen +#endif +#ifdef XK_Prev_Virtual_Screen +xK_Prev_Virtual_Screen :: KeySym +xK_Prev_Virtual_Screen = #const XK_Prev_Virtual_Screen +#endif +#ifdef XK_Next_Virtual_Screen +xK_Next_Virtual_Screen :: KeySym +xK_Next_Virtual_Screen = #const XK_Next_Virtual_Screen +#endif +#ifdef XK_Last_Virtual_Screen +xK_Last_Virtual_Screen :: KeySym +xK_Last_Virtual_Screen = #const XK_Last_Virtual_Screen +#endif +#ifdef XK_Terminate_Server +xK_Terminate_Server :: KeySym +xK_Terminate_Server = #const XK_Terminate_Server +#endif +#ifdef XK_AccessX_Enable +xK_AccessX_Enable :: KeySym +xK_AccessX_Enable = #const XK_AccessX_Enable +#endif +#ifdef XK_AccessX_Feedback_Enable +xK_AccessX_Feedback_Enable :: KeySym +xK_AccessX_Feedback_Enable = #const XK_AccessX_Feedback_Enable +#endif +#ifdef XK_RepeatKeys_Enable +xK_RepeatKeys_Enable :: KeySym +xK_RepeatKeys_Enable = #const XK_RepeatKeys_Enable +#endif +#ifdef XK_SlowKeys_Enable +xK_SlowKeys_Enable :: KeySym +xK_SlowKeys_Enable = #const XK_SlowKeys_Enable +#endif +#ifdef XK_BounceKeys_Enable +xK_BounceKeys_Enable :: KeySym +xK_BounceKeys_Enable = #const XK_BounceKeys_Enable +#endif +#ifdef XK_StickyKeys_Enable +xK_StickyKeys_Enable :: KeySym +xK_StickyKeys_Enable = #const XK_StickyKeys_Enable +#endif +#ifdef XK_MouseKeys_Enable +xK_MouseKeys_Enable :: KeySym +xK_MouseKeys_Enable = #const XK_MouseKeys_Enable +#endif +#ifdef XK_MouseKeys_Accel_Enable +xK_MouseKeys_Accel_Enable :: KeySym +xK_MouseKeys_Accel_Enable = #const XK_MouseKeys_Accel_Enable +#endif +#ifdef XK_Overlay1_Enable +xK_Overlay1_Enable :: KeySym +xK_Overlay1_Enable = #const XK_Overlay1_Enable +#endif +#ifdef XK_Overlay2_Enable +xK_Overlay2_Enable :: KeySym +xK_Overlay2_Enable = #const XK_Overlay2_Enable +#endif +#ifdef XK_AudibleBell_Enable +xK_AudibleBell_Enable :: KeySym +xK_AudibleBell_Enable = #const XK_AudibleBell_Enable +#endif +#ifdef XK_Pointer_Left +xK_Pointer_Left :: KeySym +xK_Pointer_Left = #const XK_Pointer_Left +#endif +#ifdef XK_Pointer_Right +xK_Pointer_Right :: KeySym +xK_Pointer_Right = #const XK_Pointer_Right +#endif +#ifdef XK_Pointer_Up +xK_Pointer_Up :: KeySym +xK_Pointer_Up = #const XK_Pointer_Up +#endif +#ifdef XK_Pointer_Down +xK_Pointer_Down :: KeySym +xK_Pointer_Down = #const XK_Pointer_Down +#endif +#ifdef XK_Pointer_UpLeft +xK_Pointer_UpLeft :: KeySym +xK_Pointer_UpLeft = #const XK_Pointer_UpLeft +#endif +#ifdef XK_Pointer_UpRight +xK_Pointer_UpRight :: KeySym +xK_Pointer_UpRight = #const XK_Pointer_UpRight +#endif +#ifdef XK_Pointer_DownLeft +xK_Pointer_DownLeft :: KeySym +xK_Pointer_DownLeft = #const XK_Pointer_DownLeft +#endif +#ifdef XK_Pointer_DownRight +xK_Pointer_DownRight :: KeySym +xK_Pointer_DownRight = #const XK_Pointer_DownRight +#endif +#ifdef XK_Pointer_Button_Dflt +xK_Pointer_Button_Dflt :: KeySym +xK_Pointer_Button_Dflt = #const XK_Pointer_Button_Dflt +#endif +#ifdef XK_Pointer_Button1 +xK_Pointer_Button1 :: KeySym +xK_Pointer_Button1 = #const XK_Pointer_Button1 +#endif +#ifdef XK_Pointer_Button2 +xK_Pointer_Button2 :: KeySym +xK_Pointer_Button2 = #const XK_Pointer_Button2 +#endif +#ifdef XK_Pointer_Button3 +xK_Pointer_Button3 :: KeySym +xK_Pointer_Button3 = #const XK_Pointer_Button3 +#endif +#ifdef XK_Pointer_Button4 +xK_Pointer_Button4 :: KeySym +xK_Pointer_Button4 = #const XK_Pointer_Button4 +#endif +#ifdef XK_Pointer_Button5 +xK_Pointer_Button5 :: KeySym +xK_Pointer_Button5 = #const XK_Pointer_Button5 +#endif +#ifdef XK_Pointer_DblClick_Dflt +xK_Pointer_DblClick_Dflt :: KeySym +xK_Pointer_DblClick_Dflt = #const XK_Pointer_DblClick_Dflt +#endif +#ifdef XK_Pointer_DblClick1 +xK_Pointer_DblClick1 :: KeySym +xK_Pointer_DblClick1 = #const XK_Pointer_DblClick1 +#endif +#ifdef XK_Pointer_DblClick2 +xK_Pointer_DblClick2 :: KeySym +xK_Pointer_DblClick2 = #const XK_Pointer_DblClick2 +#endif +#ifdef XK_Pointer_DblClick3 +xK_Pointer_DblClick3 :: KeySym +xK_Pointer_DblClick3 = #const XK_Pointer_DblClick3 +#endif +#ifdef XK_Pointer_DblClick4 +xK_Pointer_DblClick4 :: KeySym +xK_Pointer_DblClick4 = #const XK_Pointer_DblClick4 +#endif +#ifdef XK_Pointer_DblClick5 +xK_Pointer_DblClick5 :: KeySym +xK_Pointer_DblClick5 = #const XK_Pointer_DblClick5 +#endif +#ifdef XK_Pointer_Drag_Dflt +xK_Pointer_Drag_Dflt :: KeySym +xK_Pointer_Drag_Dflt = #const XK_Pointer_Drag_Dflt +#endif +#ifdef XK_Pointer_Drag1 +xK_Pointer_Drag1 :: KeySym +xK_Pointer_Drag1 = #const XK_Pointer_Drag1 +#endif +#ifdef XK_Pointer_Drag2 +xK_Pointer_Drag2 :: KeySym +xK_Pointer_Drag2 = #const XK_Pointer_Drag2 +#endif +#ifdef XK_Pointer_Drag3 +xK_Pointer_Drag3 :: KeySym +xK_Pointer_Drag3 = #const XK_Pointer_Drag3 +#endif +#ifdef XK_Pointer_Drag4 +xK_Pointer_Drag4 :: KeySym +xK_Pointer_Drag4 = #const XK_Pointer_Drag4 +#endif +#ifdef XK_Pointer_Drag5 +xK_Pointer_Drag5 :: KeySym +xK_Pointer_Drag5 = #const XK_Pointer_Drag5 +#endif +#ifdef XK_Pointer_EnableKeys +xK_Pointer_EnableKeys :: KeySym +xK_Pointer_EnableKeys = #const XK_Pointer_EnableKeys +#endif +#ifdef XK_Pointer_Accelerate +xK_Pointer_Accelerate :: KeySym +xK_Pointer_Accelerate = #const XK_Pointer_Accelerate +#endif +#ifdef XK_Pointer_DfltBtnNext +xK_Pointer_DfltBtnNext :: KeySym +xK_Pointer_DfltBtnNext = #const XK_Pointer_DfltBtnNext +#endif +#ifdef XK_Pointer_DfltBtnPrev +xK_Pointer_DfltBtnPrev :: KeySym +xK_Pointer_DfltBtnPrev = #const XK_Pointer_DfltBtnPrev +#endif + +-- XK_3270 +#ifdef XK_3270_Duplicate +xK_3270_Duplicate :: KeySym +xK_3270_Duplicate = #const XK_3270_Duplicate +#endif +#ifdef XK_3270_FieldMark +xK_3270_FieldMark :: KeySym +xK_3270_FieldMark = #const XK_3270_FieldMark +#endif +#ifdef XK_3270_Right2 +xK_3270_Right2 :: KeySym +xK_3270_Right2 = #const XK_3270_Right2 +#endif +#ifdef XK_3270_Left2 +xK_3270_Left2 :: KeySym +xK_3270_Left2 = #const XK_3270_Left2 +#endif +#ifdef XK_3270_BackTab +xK_3270_BackTab :: KeySym +xK_3270_BackTab = #const XK_3270_BackTab +#endif +#ifdef XK_3270_EraseEOF +xK_3270_EraseEOF :: KeySym +xK_3270_EraseEOF = #const XK_3270_EraseEOF +#endif +#ifdef XK_3270_EraseInput +xK_3270_EraseInput :: KeySym +xK_3270_EraseInput = #const XK_3270_EraseInput +#endif +#ifdef XK_3270_Reset +xK_3270_Reset :: KeySym +xK_3270_Reset = #const XK_3270_Reset +#endif +#ifdef XK_3270_Quit +xK_3270_Quit :: KeySym +xK_3270_Quit = #const XK_3270_Quit +#endif +#ifdef XK_3270_PA1 +xK_3270_PA1 :: KeySym +xK_3270_PA1 = #const XK_3270_PA1 +#endif +#ifdef XK_3270_PA2 +xK_3270_PA2 :: KeySym +xK_3270_PA2 = #const XK_3270_PA2 +#endif +#ifdef XK_3270_PA3 +xK_3270_PA3 :: KeySym +xK_3270_PA3 = #const XK_3270_PA3 +#endif +#ifdef XK_3270_Test +xK_3270_Test :: KeySym +xK_3270_Test = #const XK_3270_Test +#endif +#ifdef XK_3270_Attn +xK_3270_Attn :: KeySym +xK_3270_Attn = #const XK_3270_Attn +#endif +#ifdef XK_3270_CursorBlink +xK_3270_CursorBlink :: KeySym +xK_3270_CursorBlink = #const XK_3270_CursorBlink +#endif +#ifdef XK_3270_AltCursor +xK_3270_AltCursor :: KeySym +xK_3270_AltCursor = #const XK_3270_AltCursor +#endif +#ifdef XK_3270_KeyClick +xK_3270_KeyClick :: KeySym +xK_3270_KeyClick = #const XK_3270_KeyClick +#endif +#ifdef XK_3270_Jump +xK_3270_Jump :: KeySym +xK_3270_Jump = #const XK_3270_Jump +#endif +#ifdef XK_3270_Ident +xK_3270_Ident :: KeySym +xK_3270_Ident = #const XK_3270_Ident +#endif +#ifdef XK_3270_Rule +xK_3270_Rule :: KeySym +xK_3270_Rule = #const XK_3270_Rule +#endif +#ifdef XK_3270_Copy +xK_3270_Copy :: KeySym +xK_3270_Copy = #const XK_3270_Copy +#endif +#ifdef XK_3270_Play +xK_3270_Play :: KeySym +xK_3270_Play = #const XK_3270_Play +#endif +#ifdef XK_3270_Setup +xK_3270_Setup :: KeySym +xK_3270_Setup = #const XK_3270_Setup +#endif +#ifdef XK_3270_Record +xK_3270_Record :: KeySym +xK_3270_Record = #const XK_3270_Record +#endif +#ifdef XK_3270_ChangeScreen +xK_3270_ChangeScreen :: KeySym +xK_3270_ChangeScreen = #const XK_3270_ChangeScreen +#endif +#ifdef XK_3270_DeleteWord +xK_3270_DeleteWord :: KeySym +xK_3270_DeleteWord = #const XK_3270_DeleteWord +#endif +#ifdef XK_3270_ExSelect +xK_3270_ExSelect :: KeySym +xK_3270_ExSelect = #const XK_3270_ExSelect +#endif +#ifdef XK_3270_CursorSelect +xK_3270_CursorSelect :: KeySym +xK_3270_CursorSelect = #const XK_3270_CursorSelect +#endif +#ifdef XK_3270_PrintScreen +xK_3270_PrintScreen :: KeySym +xK_3270_PrintScreen = #const XK_3270_PrintScreen +#endif +#ifdef XK_3270_Enter +xK_3270_Enter :: KeySym +xK_3270_Enter = #const XK_3270_Enter +#endif + +-- XK_LATIN1 +#if 0 +# ifdef XK_space +xK_space :: KeySym +xK_space = #const XK_space +# endif +# ifdef XK_exclam +xK_exclam :: KeySym +xK_exclam = #const XK_exclam +# endif +# ifdef XK_quotedbl +xK_quotedbl :: KeySym +xK_quotedbl = #const XK_quotedbl +# endif +# ifdef XK_numbersign +xK_numbersign :: KeySym +xK_numbersign = #const XK_numbersign +# endif +# ifdef XK_dollar +xK_dollar :: KeySym +xK_dollar = #const XK_dollar +# endif +# ifdef XK_percent +xK_percent :: KeySym +xK_percent = #const XK_percent +# endif +# ifdef XK_ampersand +xK_ampersand :: KeySym +xK_ampersand = #const XK_ampersand +# endif +# ifdef XK_apostrophe +xK_apostrophe :: KeySym +xK_apostrophe = #const XK_apostrophe +# endif +# ifdef XK_quoteright +xK_quoteright :: KeySym +xK_quoteright = #const XK_quoteright +# endif +# ifdef XK_parenleft +xK_parenleft :: KeySym +xK_parenleft = #const XK_parenleft +# endif +# ifdef XK_parenright +xK_parenright :: KeySym +xK_parenright = #const XK_parenright +# endif +# ifdef XK_asterisk +xK_asterisk :: KeySym +xK_asterisk = #const XK_asterisk +# endif +# ifdef XK_plus +xK_plus :: KeySym +xK_plus = #const XK_plus +# endif +# ifdef XK_comma +xK_comma :: KeySym +xK_comma = #const XK_comma +# endif +# ifdef XK_minus +xK_minus :: KeySym +xK_minus = #const XK_minus +# endif +# ifdef XK_period +xK_period :: KeySym +xK_period = #const XK_period +# endif +# ifdef XK_slash +xK_slash :: KeySym +xK_slash = #const XK_slash +# endif +# ifdef XK_0 +xK_0 :: KeySym +xK_0 = #const XK_0 +# endif +# ifdef XK_1 +xK_1 :: KeySym +xK_1 = #const XK_1 +# endif +# ifdef XK_2 +xK_2 :: KeySym +xK_2 = #const XK_2 +# endif +# ifdef XK_3 +xK_3 :: KeySym +xK_3 = #const XK_3 +# endif +# ifdef XK_4 +xK_4 :: KeySym +xK_4 = #const XK_4 +# endif +# ifdef XK_5 +xK_5 :: KeySym +xK_5 = #const XK_5 +# endif +# ifdef XK_6 +xK_6 :: KeySym +xK_6 = #const XK_6 +# endif +# ifdef XK_7 +xK_7 :: KeySym +xK_7 = #const XK_7 +# endif +# ifdef XK_8 +xK_8 :: KeySym +xK_8 = #const XK_8 +# endif +# ifdef XK_9 +xK_9 :: KeySym +xK_9 = #const XK_9 +# endif +# ifdef XK_colon +xK_colon :: KeySym +xK_colon = #const XK_colon +# endif +# ifdef XK_semicolon +xK_semicolon :: KeySym +xK_semicolon = #const XK_semicolon +# endif +# ifdef XK_less +xK_less :: KeySym +xK_less = #const XK_less +# endif +# ifdef XK_equal +xK_equal :: KeySym +xK_equal = #const XK_equal +# endif +# ifdef XK_greater +xK_greater :: KeySym +xK_greater = #const XK_greater +# endif +# ifdef XK_question +xK_question :: KeySym +xK_question = #const XK_question +# endif +# ifdef XK_at +xK_at :: KeySym +xK_at = #const XK_at +# endif +# ifdef XK_A +xK_A :: KeySym +xK_A = #const XK_A +# endif +# ifdef XK_B +xK_B :: KeySym +xK_B = #const XK_B +# endif +# ifdef XK_C +xK_C :: KeySym +xK_C = #const XK_C +# endif +# ifdef XK_D +xK_D :: KeySym +xK_D = #const XK_D +# endif +# ifdef XK_E +xK_E :: KeySym +xK_E = #const XK_E +# endif +# ifdef XK_F +xK_F :: KeySym +xK_F = #const XK_F +# endif +# ifdef XK_G +xK_G :: KeySym +xK_G = #const XK_G +# endif +# ifdef XK_H +xK_H :: KeySym +xK_H = #const XK_H +# endif +# ifdef XK_I +xK_I :: KeySym +xK_I = #const XK_I +# endif +# ifdef XK_J +xK_J :: KeySym +xK_J = #const XK_J +# endif +# ifdef XK_K +xK_K :: KeySym +xK_K = #const XK_K +# endif +# ifdef XK_L +xK_L :: KeySym +xK_L = #const XK_L +# endif +# ifdef XK_M +xK_M :: KeySym +xK_M = #const XK_M +# endif +# ifdef XK_N +xK_N :: KeySym +xK_N = #const XK_N +# endif +# ifdef XK_O +xK_O :: KeySym +xK_O = #const XK_O +# endif +# ifdef XK_P +xK_P :: KeySym +xK_P = #const XK_P +# endif +# ifdef XK_Q +xK_Q :: KeySym +xK_Q = #const XK_Q +# endif +# ifdef XK_R +xK_R :: KeySym +xK_R = #const XK_R +# endif +# ifdef XK_S +xK_S :: KeySym +xK_S = #const XK_S +# endif +# ifdef XK_T +xK_T :: KeySym +xK_T = #const XK_T +# endif +# ifdef XK_U +xK_U :: KeySym +xK_U = #const XK_U +# endif +# ifdef XK_V +xK_V :: KeySym +xK_V = #const XK_V +# endif +# ifdef XK_W +xK_W :: KeySym +xK_W = #const XK_W +# endif +# ifdef XK_X +xK_X :: KeySym +xK_X = #const XK_X +# endif +# ifdef XK_Y +xK_Y :: KeySym +xK_Y = #const XK_Y +# endif +# ifdef XK_Z +xK_Z :: KeySym +xK_Z = #const XK_Z +# endif +# ifdef XK_bracketleft +xK_bracketleft :: KeySym +xK_bracketleft = #const XK_bracketleft +# endif +# ifdef XK_backslash +xK_backslash :: KeySym +xK_backslash = #const XK_backslash +# endif +# ifdef XK_bracketright +xK_bracketright :: KeySym +xK_bracketright = #const XK_bracketright +# endif +# ifdef XK_asciicircum +xK_asciicircum :: KeySym +xK_asciicircum = #const XK_asciicircum +# endif +# ifdef XK_underscore +xK_underscore :: KeySym +xK_underscore = #const XK_underscore +# endif +# ifdef XK_grave +xK_grave :: KeySym +xK_grave = #const XK_grave +# endif +# ifdef XK_quoteleft +xK_quoteleft :: KeySym +xK_quoteleft = #const XK_quoteleft +# endif +# ifdef XK_a +xK_a :: KeySym +xK_a = #const XK_a +# endif +# ifdef XK_b +xK_b :: KeySym +xK_b = #const XK_b +# endif +# ifdef XK_c +xK_c :: KeySym +xK_c = #const XK_c +# endif +# ifdef XK_d +xK_d :: KeySym +xK_d = #const XK_d +# endif +# ifdef XK_e +xK_e :: KeySym +xK_e = #const XK_e +# endif +# ifdef XK_f +xK_f :: KeySym +xK_f = #const XK_f +# endif +# ifdef XK_g +xK_g :: KeySym +xK_g = #const XK_g +# endif +# ifdef XK_h +xK_h :: KeySym +xK_h = #const XK_h +# endif +# ifdef XK_i +xK_i :: KeySym +xK_i = #const XK_i +# endif +# ifdef XK_j +xK_j :: KeySym +xK_j = #const XK_j +# endif +# ifdef XK_k +xK_k :: KeySym +xK_k = #const XK_k +# endif +# ifdef XK_l +xK_l :: KeySym +xK_l = #const XK_l +# endif +# ifdef XK_m +xK_m :: KeySym +xK_m = #const XK_m +# endif +# ifdef XK_n +xK_n :: KeySym +xK_n = #const XK_n +# endif +# ifdef XK_o +xK_o :: KeySym +xK_o = #const XK_o +# endif +# ifdef XK_p +xK_p :: KeySym +xK_p = #const XK_p +# endif +# ifdef XK_q +xK_q :: KeySym +xK_q = #const XK_q +# endif +# ifdef XK_r +xK_r :: KeySym +xK_r = #const XK_r +# endif +# ifdef XK_s +xK_s :: KeySym +xK_s = #const XK_s +# endif +# ifdef XK_t +xK_t :: KeySym +xK_t = #const XK_t +# endif +# ifdef XK_u +xK_u :: KeySym +xK_u = #const XK_u +# endif +# ifdef XK_v +xK_v :: KeySym +xK_v = #const XK_v +# endif +# ifdef XK_w +xK_w :: KeySym +xK_w = #const XK_w +# endif +# ifdef XK_x +xK_x :: KeySym +xK_x = #const XK_x +# endif +# ifdef XK_y +xK_y :: KeySym +xK_y = #const XK_y +# endif +# ifdef XK_z +xK_z :: KeySym +xK_z = #const XK_z +# endif +# ifdef XK_braceleft +xK_braceleft :: KeySym +xK_braceleft = #const XK_braceleft +# endif +# ifdef XK_bar +xK_bar :: KeySym +xK_bar = #const XK_bar +# endif +# ifdef XK_braceright +xK_braceright :: KeySym +xK_braceright = #const XK_braceright +# endif +# ifdef XK_asciitilde +xK_asciitilde :: KeySym +xK_asciitilde = #const XK_asciitilde +# endif +# ifdef XK_nobreakspace +xK_nobreakspace :: KeySym +xK_nobreakspace = #const XK_nobreakspace +# endif +# ifdef XK_exclamdown +xK_exclamdown :: KeySym +xK_exclamdown = #const XK_exclamdown +# endif +# ifdef XK_cent +xK_cent :: KeySym +xK_cent = #const XK_cent +# endif +# ifdef XK_sterling +xK_sterling :: KeySym +xK_sterling = #const XK_sterling +# endif +# ifdef XK_currency +xK_currency :: KeySym +xK_currency = #const XK_currency +# endif +# ifdef XK_yen +xK_yen :: KeySym +xK_yen = #const XK_yen +# endif +# ifdef XK_brokenbar +xK_brokenbar :: KeySym +xK_brokenbar = #const XK_brokenbar +# endif +# ifdef XK_section +xK_section :: KeySym +xK_section = #const XK_section +# endif +# ifdef XK_diaeresis +xK_diaeresis :: KeySym +xK_diaeresis = #const XK_diaeresis +# endif +# ifdef XK_copyright +xK_copyright :: KeySym +xK_copyright = #const XK_copyright +# endif +# ifdef XK_ordfeminine +xK_ordfeminine :: KeySym +xK_ordfeminine = #const XK_ordfeminine +# endif +# ifdef XK_guillemotleft +xK_guillemotleft :: KeySym +xK_guillemotleft = #const XK_guillemotleft +# endif +# ifdef XK_notsign +xK_notsign :: KeySym +xK_notsign = #const XK_notsign +# endif +# ifdef XK_hyphen +xK_hyphen :: KeySym +xK_hyphen = #const XK_hyphen +# endif +# ifdef XK_registered +xK_registered :: KeySym +xK_registered = #const XK_registered +# endif +# ifdef XK_macron +xK_macron :: KeySym +xK_macron = #const XK_macron +# endif +# ifdef XK_degree +xK_degree :: KeySym +xK_degree = #const XK_degree +# endif +# ifdef XK_plusminus +xK_plusminus :: KeySym +xK_plusminus = #const XK_plusminus +# endif +# ifdef XK_twosuperior +xK_twosuperior :: KeySym +xK_twosuperior = #const XK_twosuperior +# endif +# ifdef XK_threesuperior +xK_threesuperior :: KeySym +xK_threesuperior = #const XK_threesuperior +# endif +# ifdef XK_acute +xK_acute :: KeySym +xK_acute = #const XK_acute +# endif +# ifdef XK_mu +xK_mu :: KeySym +xK_mu = #const XK_mu +# endif +# ifdef XK_paragraph +xK_paragraph :: KeySym +xK_paragraph = #const XK_paragraph +# endif +# ifdef XK_periodcentered +xK_periodcentered :: KeySym +xK_periodcentered = #const XK_periodcentered +# endif +# ifdef XK_cedilla +xK_cedilla :: KeySym +xK_cedilla = #const XK_cedilla +# endif +# ifdef XK_onesuperior +xK_onesuperior :: KeySym +xK_onesuperior = #const XK_onesuperior +# endif +# ifdef XK_masculine +xK_masculine :: KeySym +xK_masculine = #const XK_masculine +# endif +# ifdef XK_guillemotright +xK_guillemotright :: KeySym +xK_guillemotright = #const XK_guillemotright +# endif +# ifdef XK_onequarter +xK_onequarter :: KeySym +xK_onequarter = #const XK_onequarter +# endif +# ifdef XK_onehalf +xK_onehalf :: KeySym +xK_onehalf = #const XK_onehalf +# endif +# ifdef XK_threequarters +xK_threequarters :: KeySym +xK_threequarters = #const XK_threequarters +# endif +# ifdef XK_questiondown +xK_questiondown :: KeySym +xK_questiondown = #const XK_questiondown +# endif +# ifdef XK_Agrave +xK_Agrave :: KeySym +xK_Agrave = #const XK_Agrave +# endif +# ifdef XK_Aacute +xK_Aacute :: KeySym +xK_Aacute = #const XK_Aacute +# endif +# ifdef XK_Acircumflex +xK_Acircumflex :: KeySym +xK_Acircumflex = #const XK_Acircumflex +# endif +# ifdef XK_Atilde +xK_Atilde :: KeySym +xK_Atilde = #const XK_Atilde +# endif +# ifdef XK_Adiaeresis +xK_Adiaeresis :: KeySym +xK_Adiaeresis = #const XK_Adiaeresis +# endif +# ifdef XK_Aring +xK_Aring :: KeySym +xK_Aring = #const XK_Aring +# endif +# ifdef XK_AE +xK_AE :: KeySym +xK_AE = #const XK_AE +# endif +# ifdef XK_Ccedilla +xK_Ccedilla :: KeySym +xK_Ccedilla = #const XK_Ccedilla +# endif +# ifdef XK_Egrave +xK_Egrave :: KeySym +xK_Egrave = #const XK_Egrave +# endif +# ifdef XK_Eacute +xK_Eacute :: KeySym +xK_Eacute = #const XK_Eacute +# endif +# ifdef XK_Ecircumflex +xK_Ecircumflex :: KeySym +xK_Ecircumflex = #const XK_Ecircumflex +# endif +# ifdef XK_Ediaeresis +xK_Ediaeresis :: KeySym +xK_Ediaeresis = #const XK_Ediaeresis +# endif +# ifdef XK_Igrave +xK_Igrave :: KeySym +xK_Igrave = #const XK_Igrave +# endif +# ifdef XK_Iacute +xK_Iacute :: KeySym +xK_Iacute = #const XK_Iacute +# endif +# ifdef XK_Icircumflex +xK_Icircumflex :: KeySym +xK_Icircumflex = #const XK_Icircumflex +# endif +# ifdef XK_Idiaeresis +xK_Idiaeresis :: KeySym +xK_Idiaeresis = #const XK_Idiaeresis +# endif +# ifdef XK_ETH +xK_ETH :: KeySym +xK_ETH = #const XK_ETH +# endif +# ifdef XK_Eth +xK_Eth :: KeySym +xK_Eth = #const XK_Eth +# endif +# ifdef XK_Ntilde +xK_Ntilde :: KeySym +xK_Ntilde = #const XK_Ntilde +# endif +# ifdef XK_Ograve +xK_Ograve :: KeySym +xK_Ograve = #const XK_Ograve +# endif +# ifdef XK_Oacute +xK_Oacute :: KeySym +xK_Oacute = #const XK_Oacute +# endif +# ifdef XK_Ocircumflex +xK_Ocircumflex :: KeySym +xK_Ocircumflex = #const XK_Ocircumflex +# endif +# ifdef XK_Otilde +xK_Otilde :: KeySym +xK_Otilde = #const XK_Otilde +# endif +# ifdef XK_Odiaeresis +xK_Odiaeresis :: KeySym +xK_Odiaeresis = #const XK_Odiaeresis +# endif +# ifdef XK_multiply +xK_multiply :: KeySym +xK_multiply = #const XK_multiply +# endif +# ifdef XK_Oslash +xK_Oslash :: KeySym +xK_Oslash = #const XK_Oslash +# endif +# ifdef XK_Ooblique +xK_Ooblique :: KeySym +xK_Ooblique = #const XK_Ooblique +# endif +# ifdef XK_Ugrave +xK_Ugrave :: KeySym +xK_Ugrave = #const XK_Ugrave +# endif +# ifdef XK_Uacute +xK_Uacute :: KeySym +xK_Uacute = #const XK_Uacute +# endif +# ifdef XK_Ucircumflex +xK_Ucircumflex :: KeySym +xK_Ucircumflex = #const XK_Ucircumflex +# endif +# ifdef XK_Udiaeresis +xK_Udiaeresis :: KeySym +xK_Udiaeresis = #const XK_Udiaeresis +# endif +# ifdef XK_Yacute +xK_Yacute :: KeySym +xK_Yacute = #const XK_Yacute +# endif +# ifdef XK_THORN +xK_THORN :: KeySym +xK_THORN = #const XK_THORN +# endif +# ifdef XK_Thorn +xK_Thorn :: KeySym +xK_Thorn = #const XK_Thorn +# endif +# ifdef XK_ssharp +xK_ssharp :: KeySym +xK_ssharp = #const XK_ssharp +# endif +# ifdef XK_agrave +xK_agrave :: KeySym +xK_agrave = #const XK_agrave +# endif +# ifdef XK_aacute +xK_aacute :: KeySym +xK_aacute = #const XK_aacute +# endif +# ifdef XK_acircumflex +xK_acircumflex :: KeySym +xK_acircumflex = #const XK_acircumflex +# endif +# ifdef XK_atilde +xK_atilde :: KeySym +xK_atilde = #const XK_atilde +# endif +# ifdef XK_adiaeresis +xK_adiaeresis :: KeySym +xK_adiaeresis = #const XK_adiaeresis +# endif +# ifdef XK_aring +xK_aring :: KeySym +xK_aring = #const XK_aring +# endif +# ifdef XK_ae +xK_ae :: KeySym +xK_ae = #const XK_ae +# endif +# ifdef XK_ccedilla +xK_ccedilla :: KeySym +xK_ccedilla = #const XK_ccedilla +# endif +# ifdef XK_egrave +xK_egrave :: KeySym +xK_egrave = #const XK_egrave +# endif +# ifdef XK_eacute +xK_eacute :: KeySym +xK_eacute = #const XK_eacute +# endif +# ifdef XK_ecircumflex +xK_ecircumflex :: KeySym +xK_ecircumflex = #const XK_ecircumflex +# endif +# ifdef XK_ediaeresis +xK_ediaeresis :: KeySym +xK_ediaeresis = #const XK_ediaeresis +# endif +# ifdef XK_igrave +xK_igrave :: KeySym +xK_igrave = #const XK_igrave +# endif +# ifdef XK_iacute +xK_iacute :: KeySym +xK_iacute = #const XK_iacute +# endif +# ifdef XK_icircumflex +xK_icircumflex :: KeySym +xK_icircumflex = #const XK_icircumflex +# endif +# ifdef XK_idiaeresis +xK_idiaeresis :: KeySym +xK_idiaeresis = #const XK_idiaeresis +# endif +# ifdef XK_eth +xK_eth :: KeySym +xK_eth = #const XK_eth +# endif +# ifdef XK_ntilde +xK_ntilde :: KeySym +xK_ntilde = #const XK_ntilde +# endif +# ifdef XK_ograve +xK_ograve :: KeySym +xK_ograve = #const XK_ograve +# endif +# ifdef XK_oacute +xK_oacute :: KeySym +xK_oacute = #const XK_oacute +# endif +# ifdef XK_ocircumflex +xK_ocircumflex :: KeySym +xK_ocircumflex = #const XK_ocircumflex +# endif +# ifdef XK_otilde +xK_otilde :: KeySym +xK_otilde = #const XK_otilde +# endif +# ifdef XK_odiaeresis +xK_odiaeresis :: KeySym +xK_odiaeresis = #const XK_odiaeresis +# endif +# ifdef XK_division +xK_division :: KeySym +xK_division = #const XK_division +# endif +# ifdef XK_oslash +xK_oslash :: KeySym +xK_oslash = #const XK_oslash +# endif +# ifdef XK_ooblique +xK_ooblique :: KeySym +xK_ooblique = #const XK_ooblique +# endif +# ifdef XK_ugrave +xK_ugrave :: KeySym +xK_ugrave = #const XK_ugrave +# endif +# ifdef XK_uacute +xK_uacute :: KeySym +xK_uacute = #const XK_uacute +# endif +# ifdef XK_ucircumflex +xK_ucircumflex :: KeySym +xK_ucircumflex = #const XK_ucircumflex +# endif +# ifdef XK_udiaeresis +xK_udiaeresis :: KeySym +xK_udiaeresis = #const XK_udiaeresis +# endif +# ifdef XK_yacute +xK_yacute :: KeySym +xK_yacute = #const XK_yacute +# endif +# ifdef XK_thorn +xK_thorn :: KeySym +xK_thorn = #const XK_thorn +# endif +# ifdef XK_ydiaeresis +xK_ydiaeresis :: KeySym +xK_ydiaeresis = #const XK_ydiaeresis +# endif +#endif + +-- XK_LATIN2 +#ifdef XK_Aogonek +xK_Aogonek :: KeySym +xK_Aogonek = #const XK_Aogonek +#endif +#ifdef XK_breve +xK_breve :: KeySym +xK_breve = #const XK_breve +#endif +#ifdef XK_Lstroke +xK_Lstroke :: KeySym +xK_Lstroke = #const XK_Lstroke +#endif +#ifdef XK_Lcaron +xK_Lcaron :: KeySym +xK_Lcaron = #const XK_Lcaron +#endif +#ifdef XK_Sacute +xK_Sacute :: KeySym +xK_Sacute = #const XK_Sacute +#endif +#ifdef XK_Scaron +xK_Scaron :: KeySym +xK_Scaron = #const XK_Scaron +#endif +#ifdef XK_Scedilla +xK_Scedilla :: KeySym +xK_Scedilla = #const XK_Scedilla +#endif +#ifdef XK_Tcaron +xK_Tcaron :: KeySym +xK_Tcaron = #const XK_Tcaron +#endif +#ifdef XK_Zacute +xK_Zacute :: KeySym +xK_Zacute = #const XK_Zacute +#endif +#ifdef XK_Zcaron +xK_Zcaron :: KeySym +xK_Zcaron = #const XK_Zcaron +#endif +#ifdef XK_Zabovedot +xK_Zabovedot :: KeySym +xK_Zabovedot = #const XK_Zabovedot +#endif +#ifdef XK_aogonek +xK_aogonek :: KeySym +xK_aogonek = #const XK_aogonek +#endif +#ifdef XK_ogonek +xK_ogonek :: KeySym +xK_ogonek = #const XK_ogonek +#endif +#ifdef XK_lstroke +xK_lstroke :: KeySym +xK_lstroke = #const XK_lstroke +#endif +#ifdef XK_lcaron +xK_lcaron :: KeySym +xK_lcaron = #const XK_lcaron +#endif +#ifdef XK_sacute +xK_sacute :: KeySym +xK_sacute = #const XK_sacute +#endif +#ifdef XK_caron +xK_caron :: KeySym +xK_caron = #const XK_caron +#endif +#ifdef XK_scaron +xK_scaron :: KeySym +xK_scaron = #const XK_scaron +#endif +#ifdef XK_scedilla +xK_scedilla :: KeySym +xK_scedilla = #const XK_scedilla +#endif +#ifdef XK_tcaron +xK_tcaron :: KeySym +xK_tcaron = #const XK_tcaron +#endif +#ifdef XK_zacute +xK_zacute :: KeySym +xK_zacute = #const XK_zacute +#endif +#ifdef XK_doubleacute +xK_doubleacute :: KeySym +xK_doubleacute = #const XK_doubleacute +#endif +#ifdef XK_zcaron +xK_zcaron :: KeySym +xK_zcaron = #const XK_zcaron +#endif +#ifdef XK_zabovedot +xK_zabovedot :: KeySym +xK_zabovedot = #const XK_zabovedot +#endif +#ifdef XK_Racute +xK_Racute :: KeySym +xK_Racute = #const XK_Racute +#endif +#ifdef XK_Abreve +xK_Abreve :: KeySym +xK_Abreve = #const XK_Abreve +#endif +#ifdef XK_Lacute +xK_Lacute :: KeySym +xK_Lacute = #const XK_Lacute +#endif +#ifdef XK_Cacute +xK_Cacute :: KeySym +xK_Cacute = #const XK_Cacute +#endif +#ifdef XK_Ccaron +xK_Ccaron :: KeySym +xK_Ccaron = #const XK_Ccaron +#endif +#ifdef XK_Eogonek +xK_Eogonek :: KeySym +xK_Eogonek = #const XK_Eogonek +#endif +#ifdef XK_Ecaron +xK_Ecaron :: KeySym +xK_Ecaron = #const XK_Ecaron +#endif +#ifdef XK_Dcaron +xK_Dcaron :: KeySym +xK_Dcaron = #const XK_Dcaron +#endif +#ifdef XK_Dstroke +xK_Dstroke :: KeySym +xK_Dstroke = #const XK_Dstroke +#endif +#ifdef XK_Nacute +xK_Nacute :: KeySym +xK_Nacute = #const XK_Nacute +#endif +#ifdef XK_Ncaron +xK_Ncaron :: KeySym +xK_Ncaron = #const XK_Ncaron +#endif +#ifdef XK_Odoubleacute +xK_Odoubleacute :: KeySym +xK_Odoubleacute = #const XK_Odoubleacute +#endif +#ifdef XK_Rcaron +xK_Rcaron :: KeySym +xK_Rcaron = #const XK_Rcaron +#endif +#ifdef XK_Uring +xK_Uring :: KeySym +xK_Uring = #const XK_Uring +#endif +#ifdef XK_Udoubleacute +xK_Udoubleacute :: KeySym +xK_Udoubleacute = #const XK_Udoubleacute +#endif +#ifdef XK_Tcedilla +xK_Tcedilla :: KeySym +xK_Tcedilla = #const XK_Tcedilla +#endif +#ifdef XK_racute +xK_racute :: KeySym +xK_racute = #const XK_racute +#endif +#ifdef XK_abreve +xK_abreve :: KeySym +xK_abreve = #const XK_abreve +#endif +#ifdef XK_lacute +xK_lacute :: KeySym +xK_lacute = #const XK_lacute +#endif +#ifdef XK_cacute +xK_cacute :: KeySym +xK_cacute = #const XK_cacute +#endif +#ifdef XK_ccaron +xK_ccaron :: KeySym +xK_ccaron = #const XK_ccaron +#endif +#ifdef XK_eogonek +xK_eogonek :: KeySym +xK_eogonek = #const XK_eogonek +#endif +#ifdef XK_ecaron +xK_ecaron :: KeySym +xK_ecaron = #const XK_ecaron +#endif +#ifdef XK_dcaron +xK_dcaron :: KeySym +xK_dcaron = #const XK_dcaron +#endif +#ifdef XK_dstroke +xK_dstroke :: KeySym +xK_dstroke = #const XK_dstroke +#endif +#ifdef XK_nacute +xK_nacute :: KeySym +xK_nacute = #const XK_nacute +#endif +#ifdef XK_ncaron +xK_ncaron :: KeySym +xK_ncaron = #const XK_ncaron +#endif +#ifdef XK_odoubleacute +xK_odoubleacute :: KeySym +xK_odoubleacute = #const XK_odoubleacute +#endif +#ifdef XK_udoubleacute +xK_udoubleacute :: KeySym +xK_udoubleacute = #const XK_udoubleacute +#endif +#ifdef XK_rcaron +xK_rcaron :: KeySym +xK_rcaron = #const XK_rcaron +#endif +#ifdef XK_uring +xK_uring :: KeySym +xK_uring = #const XK_uring +#endif +#ifdef XK_tcedilla +xK_tcedilla :: KeySym +xK_tcedilla = #const XK_tcedilla +#endif +#ifdef XK_abovedot +xK_abovedot :: KeySym +xK_abovedot = #const XK_abovedot +#endif + +-- XK_LATIN3 +#ifdef XK_Hstroke +xK_Hstroke :: KeySym +xK_Hstroke = #const XK_Hstroke +#endif +#ifdef XK_Hcircumflex +xK_Hcircumflex :: KeySym +xK_Hcircumflex = #const XK_Hcircumflex +#endif +#ifdef XK_Iabovedot +xK_Iabovedot :: KeySym +xK_Iabovedot = #const XK_Iabovedot +#endif +#ifdef XK_Gbreve +xK_Gbreve :: KeySym +xK_Gbreve = #const XK_Gbreve +#endif +#ifdef XK_Jcircumflex +xK_Jcircumflex :: KeySym +xK_Jcircumflex = #const XK_Jcircumflex +#endif +#ifdef XK_hstroke +xK_hstroke :: KeySym +xK_hstroke = #const XK_hstroke +#endif +#ifdef XK_hcircumflex +xK_hcircumflex :: KeySym +xK_hcircumflex = #const XK_hcircumflex +#endif +#ifdef XK_idotless +xK_idotless :: KeySym +xK_idotless = #const XK_idotless +#endif +#ifdef XK_gbreve +xK_gbreve :: KeySym +xK_gbreve = #const XK_gbreve +#endif +#ifdef XK_jcircumflex +xK_jcircumflex :: KeySym +xK_jcircumflex = #const XK_jcircumflex +#endif +#ifdef XK_Cabovedot +xK_Cabovedot :: KeySym +xK_Cabovedot = #const XK_Cabovedot +#endif +#ifdef XK_Ccircumflex +xK_Ccircumflex :: KeySym +xK_Ccircumflex = #const XK_Ccircumflex +#endif +#ifdef XK_Gabovedot +xK_Gabovedot :: KeySym +xK_Gabovedot = #const XK_Gabovedot +#endif +#ifdef XK_Gcircumflex +xK_Gcircumflex :: KeySym +xK_Gcircumflex = #const XK_Gcircumflex +#endif +#ifdef XK_Ubreve +xK_Ubreve :: KeySym +xK_Ubreve = #const XK_Ubreve +#endif +#ifdef XK_Scircumflex +xK_Scircumflex :: KeySym +xK_Scircumflex = #const XK_Scircumflex +#endif +#ifdef XK_cabovedot +xK_cabovedot :: KeySym +xK_cabovedot = #const XK_cabovedot +#endif +#ifdef XK_ccircumflex +xK_ccircumflex :: KeySym +xK_ccircumflex = #const XK_ccircumflex +#endif +#ifdef XK_gabovedot +xK_gabovedot :: KeySym +xK_gabovedot = #const XK_gabovedot +#endif +#ifdef XK_gcircumflex +xK_gcircumflex :: KeySym +xK_gcircumflex = #const XK_gcircumflex +#endif +#ifdef XK_ubreve +xK_ubreve :: KeySym +xK_ubreve = #const XK_ubreve +#endif +#ifdef XK_scircumflex +xK_scircumflex :: KeySym +xK_scircumflex = #const XK_scircumflex +#endif + +-- XK_LATIN4 +#ifdef XK_kra +xK_kra :: KeySym +xK_kra = #const XK_kra +#endif +#ifdef XK_kappa +xK_kappa :: KeySym +xK_kappa = #const XK_kappa +#endif +#ifdef XK_Rcedilla +xK_Rcedilla :: KeySym +xK_Rcedilla = #const XK_Rcedilla +#endif +#ifdef XK_Itilde +xK_Itilde :: KeySym +xK_Itilde = #const XK_Itilde +#endif +#ifdef XK_Lcedilla +xK_Lcedilla :: KeySym +xK_Lcedilla = #const XK_Lcedilla +#endif +#ifdef XK_Emacron +xK_Emacron :: KeySym +xK_Emacron = #const XK_Emacron +#endif +#ifdef XK_Gcedilla +xK_Gcedilla :: KeySym +xK_Gcedilla = #const XK_Gcedilla +#endif +#ifdef XK_Tslash +xK_Tslash :: KeySym +xK_Tslash = #const XK_Tslash +#endif +#ifdef XK_rcedilla +xK_rcedilla :: KeySym +xK_rcedilla = #const XK_rcedilla +#endif +#ifdef XK_itilde +xK_itilde :: KeySym +xK_itilde = #const XK_itilde +#endif +#ifdef XK_lcedilla +xK_lcedilla :: KeySym +xK_lcedilla = #const XK_lcedilla +#endif +#ifdef XK_emacron +xK_emacron :: KeySym +xK_emacron = #const XK_emacron +#endif +#ifdef XK_gcedilla +xK_gcedilla :: KeySym +xK_gcedilla = #const XK_gcedilla +#endif +#ifdef XK_tslash +xK_tslash :: KeySym +xK_tslash = #const XK_tslash +#endif +#ifdef XK_ENG +xK_ENG :: KeySym +xK_ENG = #const XK_ENG +#endif +#ifdef XK_eng +xK_eng :: KeySym +xK_eng = #const XK_eng +#endif +#ifdef XK_Amacron +xK_Amacron :: KeySym +xK_Amacron = #const XK_Amacron +#endif +#ifdef XK_Iogonek +xK_Iogonek :: KeySym +xK_Iogonek = #const XK_Iogonek +#endif +#ifdef XK_Eabovedot +xK_Eabovedot :: KeySym +xK_Eabovedot = #const XK_Eabovedot +#endif +#ifdef XK_Imacron +xK_Imacron :: KeySym +xK_Imacron = #const XK_Imacron +#endif +#ifdef XK_Ncedilla +xK_Ncedilla :: KeySym +xK_Ncedilla = #const XK_Ncedilla +#endif +#ifdef XK_Omacron +xK_Omacron :: KeySym +xK_Omacron = #const XK_Omacron +#endif +#ifdef XK_Kcedilla +xK_Kcedilla :: KeySym +xK_Kcedilla = #const XK_Kcedilla +#endif +#ifdef XK_Uogonek +xK_Uogonek :: KeySym +xK_Uogonek = #const XK_Uogonek +#endif +#ifdef XK_Utilde +xK_Utilde :: KeySym +xK_Utilde = #const XK_Utilde +#endif +#ifdef XK_Umacron +xK_Umacron :: KeySym +xK_Umacron = #const XK_Umacron +#endif +#ifdef XK_amacron +xK_amacron :: KeySym +xK_amacron = #const XK_amacron +#endif +#ifdef XK_iogonek +xK_iogonek :: KeySym +xK_iogonek = #const XK_iogonek +#endif +#ifdef XK_eabovedot +xK_eabovedot :: KeySym +xK_eabovedot = #const XK_eabovedot +#endif +#ifdef XK_imacron +xK_imacron :: KeySym +xK_imacron = #const XK_imacron +#endif +#ifdef XK_ncedilla +xK_ncedilla :: KeySym +xK_ncedilla = #const XK_ncedilla +#endif +#ifdef XK_omacron +xK_omacron :: KeySym +xK_omacron = #const XK_omacron +#endif +#ifdef XK_kcedilla +xK_kcedilla :: KeySym +xK_kcedilla = #const XK_kcedilla +#endif +#ifdef XK_uogonek +xK_uogonek :: KeySym +xK_uogonek = #const XK_uogonek +#endif +#ifdef XK_utilde +xK_utilde :: KeySym +xK_utilde = #const XK_utilde +#endif +#ifdef XK_umacron +xK_umacron :: KeySym +xK_umacron = #const XK_umacron +#endif + +-- XK_LATIN8 +#ifdef XK_Babovedot +xK_Babovedot :: KeySym +xK_Babovedot = #const XK_Babovedot +#endif +#ifdef XK_babovedot +xK_babovedot :: KeySym +xK_babovedot = #const XK_babovedot +#endif +#ifdef XK_Dabovedot +xK_Dabovedot :: KeySym +xK_Dabovedot = #const XK_Dabovedot +#endif +#ifdef XK_Wgrave +xK_Wgrave :: KeySym +xK_Wgrave = #const XK_Wgrave +#endif +#ifdef XK_Wacute +xK_Wacute :: KeySym +xK_Wacute = #const XK_Wacute +#endif +#ifdef XK_dabovedot +xK_dabovedot :: KeySym +xK_dabovedot = #const XK_dabovedot +#endif +#ifdef XK_Ygrave +xK_Ygrave :: KeySym +xK_Ygrave = #const XK_Ygrave +#endif +#ifdef XK_Fabovedot +xK_Fabovedot :: KeySym +xK_Fabovedot = #const XK_Fabovedot +#endif +#ifdef XK_fabovedot +xK_fabovedot :: KeySym +xK_fabovedot = #const XK_fabovedot +#endif +#ifdef XK_Mabovedot +xK_Mabovedot :: KeySym +xK_Mabovedot = #const XK_Mabovedot +#endif +#ifdef XK_mabovedot +xK_mabovedot :: KeySym +xK_mabovedot = #const XK_mabovedot +#endif +#ifdef XK_Pabovedot +xK_Pabovedot :: KeySym +xK_Pabovedot = #const XK_Pabovedot +#endif +#ifdef XK_wgrave +xK_wgrave :: KeySym +xK_wgrave = #const XK_wgrave +#endif +#ifdef XK_pabovedot +xK_pabovedot :: KeySym +xK_pabovedot = #const XK_pabovedot +#endif +#ifdef XK_wacute +xK_wacute :: KeySym +xK_wacute = #const XK_wacute +#endif +#ifdef XK_Sabovedot +xK_Sabovedot :: KeySym +xK_Sabovedot = #const XK_Sabovedot +#endif +#ifdef XK_ygrave +xK_ygrave :: KeySym +xK_ygrave = #const XK_ygrave +#endif +#ifdef XK_Wdiaeresis +xK_Wdiaeresis :: KeySym +xK_Wdiaeresis = #const XK_Wdiaeresis +#endif +#ifdef XK_wdiaeresis +xK_wdiaeresis :: KeySym +xK_wdiaeresis = #const XK_wdiaeresis +#endif +#ifdef XK_sabovedot +xK_sabovedot :: KeySym +xK_sabovedot = #const XK_sabovedot +#endif +#ifdef XK_Wcircumflex +xK_Wcircumflex :: KeySym +xK_Wcircumflex = #const XK_Wcircumflex +#endif +#ifdef XK_Tabovedot +xK_Tabovedot :: KeySym +xK_Tabovedot = #const XK_Tabovedot +#endif +#ifdef XK_Ycircumflex +xK_Ycircumflex :: KeySym +xK_Ycircumflex = #const XK_Ycircumflex +#endif +#ifdef XK_wcircumflex +xK_wcircumflex :: KeySym +xK_wcircumflex = #const XK_wcircumflex +#endif +#ifdef XK_tabovedot +xK_tabovedot :: KeySym +xK_tabovedot = #const XK_tabovedot +#endif +#ifdef XK_ycircumflex +xK_ycircumflex :: KeySym +xK_ycircumflex = #const XK_ycircumflex +#endif + +-- XK_LATIN9 +#ifdef XK_OE +xK_OE :: KeySym +xK_OE = #const XK_OE +#endif +#ifdef XK_oe +xK_oe :: KeySym +xK_oe = #const XK_oe +#endif +#ifdef XK_Ydiaeresis +xK_Ydiaeresis :: KeySym +xK_Ydiaeresis = #const XK_Ydiaeresis +#endif + +-- XK_KATAKANA +#ifdef XK_overline +xK_overline :: KeySym +xK_overline = #const XK_overline +#endif +#ifdef XK_kana_fullstop +xK_kana_fullstop :: KeySym +xK_kana_fullstop = #const XK_kana_fullstop +#endif +#ifdef XK_kana_openingbracket +xK_kana_openingbracket :: KeySym +xK_kana_openingbracket = #const XK_kana_openingbracket +#endif +#ifdef XK_kana_closingbracket +xK_kana_closingbracket :: KeySym +xK_kana_closingbracket = #const XK_kana_closingbracket +#endif +#ifdef XK_kana_comma +xK_kana_comma :: KeySym +xK_kana_comma = #const XK_kana_comma +#endif +#ifdef XK_kana_conjunctive +xK_kana_conjunctive :: KeySym +xK_kana_conjunctive = #const XK_kana_conjunctive +#endif +#ifdef XK_kana_middledot +xK_kana_middledot :: KeySym +xK_kana_middledot = #const XK_kana_middledot +#endif +#ifdef XK_kana_WO +xK_kana_WO :: KeySym +xK_kana_WO = #const XK_kana_WO +#endif +#ifdef XK_kana_a +xK_kana_a :: KeySym +xK_kana_a = #const XK_kana_a +#endif +#ifdef XK_kana_i +xK_kana_i :: KeySym +xK_kana_i = #const XK_kana_i +#endif +#ifdef XK_kana_u +xK_kana_u :: KeySym +xK_kana_u = #const XK_kana_u +#endif +#ifdef XK_kana_e +xK_kana_e :: KeySym +xK_kana_e = #const XK_kana_e +#endif +#ifdef XK_kana_o +xK_kana_o :: KeySym +xK_kana_o = #const XK_kana_o +#endif +#ifdef XK_kana_ya +xK_kana_ya :: KeySym +xK_kana_ya = #const XK_kana_ya +#endif +#ifdef XK_kana_yu +xK_kana_yu :: KeySym +xK_kana_yu = #const XK_kana_yu +#endif +#ifdef XK_kana_yo +xK_kana_yo :: KeySym +xK_kana_yo = #const XK_kana_yo +#endif +#ifdef XK_kana_tsu +xK_kana_tsu :: KeySym +xK_kana_tsu = #const XK_kana_tsu +#endif +#ifdef XK_kana_tu +xK_kana_tu :: KeySym +xK_kana_tu = #const XK_kana_tu +#endif +#ifdef XK_prolongedsound +xK_prolongedsound :: KeySym +xK_prolongedsound = #const XK_prolongedsound +#endif +#ifdef XK_kana_A +xK_kana_A :: KeySym +xK_kana_A = #const XK_kana_A +#endif +#ifdef XK_kana_I +xK_kana_I :: KeySym +xK_kana_I = #const XK_kana_I +#endif +#ifdef XK_kana_U +xK_kana_U :: KeySym +xK_kana_U = #const XK_kana_U +#endif +#ifdef XK_kana_E +xK_kana_E :: KeySym +xK_kana_E = #const XK_kana_E +#endif +#ifdef XK_kana_O +xK_kana_O :: KeySym +xK_kana_O = #const XK_kana_O +#endif +#ifdef XK_kana_KA +xK_kana_KA :: KeySym +xK_kana_KA = #const XK_kana_KA +#endif +#ifdef XK_kana_KI +xK_kana_KI :: KeySym +xK_kana_KI = #const XK_kana_KI +#endif +#ifdef XK_kana_KU +xK_kana_KU :: KeySym +xK_kana_KU = #const XK_kana_KU +#endif +#ifdef XK_kana_KE +xK_kana_KE :: KeySym +xK_kana_KE = #const XK_kana_KE +#endif +#ifdef XK_kana_KO +xK_kana_KO :: KeySym +xK_kana_KO = #const XK_kana_KO +#endif +#ifdef XK_kana_SA +xK_kana_SA :: KeySym +xK_kana_SA = #const XK_kana_SA +#endif +#ifdef XK_kana_SHI +xK_kana_SHI :: KeySym +xK_kana_SHI = #const XK_kana_SHI +#endif +#ifdef XK_kana_SU +xK_kana_SU :: KeySym +xK_kana_SU = #const XK_kana_SU +#endif +#ifdef XK_kana_SE +xK_kana_SE :: KeySym +xK_kana_SE = #const XK_kana_SE +#endif +#ifdef XK_kana_SO +xK_kana_SO :: KeySym +xK_kana_SO = #const XK_kana_SO +#endif +#ifdef XK_kana_TA +xK_kana_TA :: KeySym +xK_kana_TA = #const XK_kana_TA +#endif +#ifdef XK_kana_CHI +xK_kana_CHI :: KeySym +xK_kana_CHI = #const XK_kana_CHI +#endif +#ifdef XK_kana_TI +xK_kana_TI :: KeySym +xK_kana_TI = #const XK_kana_TI +#endif +#ifdef XK_kana_TSU +xK_kana_TSU :: KeySym +xK_kana_TSU = #const XK_kana_TSU +#endif +#ifdef XK_kana_TU +xK_kana_TU :: KeySym +xK_kana_TU = #const XK_kana_TU +#endif +#ifdef XK_kana_TE +xK_kana_TE :: KeySym +xK_kana_TE = #const XK_kana_TE +#endif +#ifdef XK_kana_TO +xK_kana_TO :: KeySym +xK_kana_TO = #const XK_kana_TO +#endif +#ifdef XK_kana_NA +xK_kana_NA :: KeySym +xK_kana_NA = #const XK_kana_NA +#endif +#ifdef XK_kana_NI +xK_kana_NI :: KeySym +xK_kana_NI = #const XK_kana_NI +#endif +#ifdef XK_kana_NU +xK_kana_NU :: KeySym +xK_kana_NU = #const XK_kana_NU +#endif +#ifdef XK_kana_NE +xK_kana_NE :: KeySym +xK_kana_NE = #const XK_kana_NE +#endif +#ifdef XK_kana_NO +xK_kana_NO :: KeySym +xK_kana_NO = #const XK_kana_NO +#endif +#ifdef XK_kana_HA +xK_kana_HA :: KeySym +xK_kana_HA = #const XK_kana_HA +#endif +#ifdef XK_kana_HI +xK_kana_HI :: KeySym +xK_kana_HI = #const XK_kana_HI +#endif +#ifdef XK_kana_FU +xK_kana_FU :: KeySym +xK_kana_FU = #const XK_kana_FU +#endif +#ifdef XK_kana_HU +xK_kana_HU :: KeySym +xK_kana_HU = #const XK_kana_HU +#endif +#ifdef XK_kana_HE +xK_kana_HE :: KeySym +xK_kana_HE = #const XK_kana_HE +#endif +#ifdef XK_kana_HO +xK_kana_HO :: KeySym +xK_kana_HO = #const XK_kana_HO +#endif +#ifdef XK_kana_MA +xK_kana_MA :: KeySym +xK_kana_MA = #const XK_kana_MA +#endif +#ifdef XK_kana_MI +xK_kana_MI :: KeySym +xK_kana_MI = #const XK_kana_MI +#endif +#ifdef XK_kana_MU +xK_kana_MU :: KeySym +xK_kana_MU = #const XK_kana_MU +#endif +#ifdef XK_kana_ME +xK_kana_ME :: KeySym +xK_kana_ME = #const XK_kana_ME +#endif +#ifdef XK_kana_MO +xK_kana_MO :: KeySym +xK_kana_MO = #const XK_kana_MO +#endif +#ifdef XK_kana_YA +xK_kana_YA :: KeySym +xK_kana_YA = #const XK_kana_YA +#endif +#ifdef XK_kana_YU +xK_kana_YU :: KeySym +xK_kana_YU = #const XK_kana_YU +#endif +#ifdef XK_kana_YO +xK_kana_YO :: KeySym +xK_kana_YO = #const XK_kana_YO +#endif +#ifdef XK_kana_RA +xK_kana_RA :: KeySym +xK_kana_RA = #const XK_kana_RA +#endif +#ifdef XK_kana_RI +xK_kana_RI :: KeySym +xK_kana_RI = #const XK_kana_RI +#endif +#ifdef XK_kana_RU +xK_kana_RU :: KeySym +xK_kana_RU = #const XK_kana_RU +#endif +#ifdef XK_kana_RE +xK_kana_RE :: KeySym +xK_kana_RE = #const XK_kana_RE +#endif +#ifdef XK_kana_RO +xK_kana_RO :: KeySym +xK_kana_RO = #const XK_kana_RO +#endif +#ifdef XK_kana_WA +xK_kana_WA :: KeySym +xK_kana_WA = #const XK_kana_WA +#endif +#ifdef XK_kana_N +xK_kana_N :: KeySym +xK_kana_N = #const XK_kana_N +#endif +#ifdef XK_voicedsound +xK_voicedsound :: KeySym +xK_voicedsound = #const XK_voicedsound +#endif +#ifdef XK_semivoicedsound +xK_semivoicedsound :: KeySym +xK_semivoicedsound = #const XK_semivoicedsound +#endif +#ifdef XK_kana_switch +xK_kana_switch :: KeySym +xK_kana_switch = #const XK_kana_switch +#endif + +-- XK_ARABIC +#ifdef XK_Farsi_0 +xK_Farsi_0 :: KeySym +xK_Farsi_0 = #const XK_Farsi_0 +#endif +#ifdef XK_Farsi_1 +xK_Farsi_1 :: KeySym +xK_Farsi_1 = #const XK_Farsi_1 +#endif +#ifdef XK_Farsi_2 +xK_Farsi_2 :: KeySym +xK_Farsi_2 = #const XK_Farsi_2 +#endif +#ifdef XK_Farsi_3 +xK_Farsi_3 :: KeySym +xK_Farsi_3 = #const XK_Farsi_3 +#endif +#ifdef XK_Farsi_4 +xK_Farsi_4 :: KeySym +xK_Farsi_4 = #const XK_Farsi_4 +#endif +#ifdef XK_Farsi_5 +xK_Farsi_5 :: KeySym +xK_Farsi_5 = #const XK_Farsi_5 +#endif +#ifdef XK_Farsi_6 +xK_Farsi_6 :: KeySym +xK_Farsi_6 = #const XK_Farsi_6 +#endif +#ifdef XK_Farsi_7 +xK_Farsi_7 :: KeySym +xK_Farsi_7 = #const XK_Farsi_7 +#endif +#ifdef XK_Farsi_8 +xK_Farsi_8 :: KeySym +xK_Farsi_8 = #const XK_Farsi_8 +#endif +#ifdef XK_Farsi_9 +xK_Farsi_9 :: KeySym +xK_Farsi_9 = #const XK_Farsi_9 +#endif +#ifdef XK_Arabic_percent +xK_Arabic_percent :: KeySym +xK_Arabic_percent = #const XK_Arabic_percent +#endif +#ifdef XK_Arabic_superscript_alef +xK_Arabic_superscript_alef :: KeySym +xK_Arabic_superscript_alef = #const XK_Arabic_superscript_alef +#endif +#ifdef XK_Arabic_tteh +xK_Arabic_tteh :: KeySym +xK_Arabic_tteh = #const XK_Arabic_tteh +#endif +#ifdef XK_Arabic_peh +xK_Arabic_peh :: KeySym +xK_Arabic_peh = #const XK_Arabic_peh +#endif +#ifdef XK_Arabic_tcheh +xK_Arabic_tcheh :: KeySym +xK_Arabic_tcheh = #const XK_Arabic_tcheh +#endif +#ifdef XK_Arabic_ddal +xK_Arabic_ddal :: KeySym +xK_Arabic_ddal = #const XK_Arabic_ddal +#endif +#ifdef XK_Arabic_rreh +xK_Arabic_rreh :: KeySym +xK_Arabic_rreh = #const XK_Arabic_rreh +#endif +#ifdef XK_Arabic_comma +xK_Arabic_comma :: KeySym +xK_Arabic_comma = #const XK_Arabic_comma +#endif +#ifdef XK_Arabic_fullstop +xK_Arabic_fullstop :: KeySym +xK_Arabic_fullstop = #const XK_Arabic_fullstop +#endif +#ifdef XK_Arabic_0 +xK_Arabic_0 :: KeySym +xK_Arabic_0 = #const XK_Arabic_0 +#endif +#ifdef XK_Arabic_1 +xK_Arabic_1 :: KeySym +xK_Arabic_1 = #const XK_Arabic_1 +#endif +#ifdef XK_Arabic_2 +xK_Arabic_2 :: KeySym +xK_Arabic_2 = #const XK_Arabic_2 +#endif +#ifdef XK_Arabic_3 +xK_Arabic_3 :: KeySym +xK_Arabic_3 = #const XK_Arabic_3 +#endif +#ifdef XK_Arabic_4 +xK_Arabic_4 :: KeySym +xK_Arabic_4 = #const XK_Arabic_4 +#endif +#ifdef XK_Arabic_5 +xK_Arabic_5 :: KeySym +xK_Arabic_5 = #const XK_Arabic_5 +#endif +#ifdef XK_Arabic_6 +xK_Arabic_6 :: KeySym +xK_Arabic_6 = #const XK_Arabic_6 +#endif +#ifdef XK_Arabic_7 +xK_Arabic_7 :: KeySym +xK_Arabic_7 = #const XK_Arabic_7 +#endif +#ifdef XK_Arabic_8 +xK_Arabic_8 :: KeySym +xK_Arabic_8 = #const XK_Arabic_8 +#endif +#ifdef XK_Arabic_9 +xK_Arabic_9 :: KeySym +xK_Arabic_9 = #const XK_Arabic_9 +#endif +#ifdef XK_Arabic_semicolon +xK_Arabic_semicolon :: KeySym +xK_Arabic_semicolon = #const XK_Arabic_semicolon +#endif +#ifdef XK_Arabic_question_mark +xK_Arabic_question_mark :: KeySym +xK_Arabic_question_mark = #const XK_Arabic_question_mark +#endif +#ifdef XK_Arabic_hamza +xK_Arabic_hamza :: KeySym +xK_Arabic_hamza = #const XK_Arabic_hamza +#endif +#ifdef XK_Arabic_maddaonalef +xK_Arabic_maddaonalef :: KeySym +xK_Arabic_maddaonalef = #const XK_Arabic_maddaonalef +#endif +#ifdef XK_Arabic_hamzaonalef +xK_Arabic_hamzaonalef :: KeySym +xK_Arabic_hamzaonalef = #const XK_Arabic_hamzaonalef +#endif +#ifdef XK_Arabic_hamzaonwaw +xK_Arabic_hamzaonwaw :: KeySym +xK_Arabic_hamzaonwaw = #const XK_Arabic_hamzaonwaw +#endif +#ifdef XK_Arabic_hamzaunderalef +xK_Arabic_hamzaunderalef :: KeySym +xK_Arabic_hamzaunderalef = #const XK_Arabic_hamzaunderalef +#endif +#ifdef XK_Arabic_hamzaonyeh +xK_Arabic_hamzaonyeh :: KeySym +xK_Arabic_hamzaonyeh = #const XK_Arabic_hamzaonyeh +#endif +#ifdef XK_Arabic_alef +xK_Arabic_alef :: KeySym +xK_Arabic_alef = #const XK_Arabic_alef +#endif +#ifdef XK_Arabic_beh +xK_Arabic_beh :: KeySym +xK_Arabic_beh = #const XK_Arabic_beh +#endif +#ifdef XK_Arabic_tehmarbuta +xK_Arabic_tehmarbuta :: KeySym +xK_Arabic_tehmarbuta = #const XK_Arabic_tehmarbuta +#endif +#ifdef XK_Arabic_teh +xK_Arabic_teh :: KeySym +xK_Arabic_teh = #const XK_Arabic_teh +#endif +#ifdef XK_Arabic_theh +xK_Arabic_theh :: KeySym +xK_Arabic_theh = #const XK_Arabic_theh +#endif +#ifdef XK_Arabic_jeem +xK_Arabic_jeem :: KeySym +xK_Arabic_jeem = #const XK_Arabic_jeem +#endif +#ifdef XK_Arabic_hah +xK_Arabic_hah :: KeySym +xK_Arabic_hah = #const XK_Arabic_hah +#endif +#ifdef XK_Arabic_khah +xK_Arabic_khah :: KeySym +xK_Arabic_khah = #const XK_Arabic_khah +#endif +#ifdef XK_Arabic_dal +xK_Arabic_dal :: KeySym +xK_Arabic_dal = #const XK_Arabic_dal +#endif +#ifdef XK_Arabic_thal +xK_Arabic_thal :: KeySym +xK_Arabic_thal = #const XK_Arabic_thal +#endif +#ifdef XK_Arabic_ra +xK_Arabic_ra :: KeySym +xK_Arabic_ra = #const XK_Arabic_ra +#endif +#ifdef XK_Arabic_zain +xK_Arabic_zain :: KeySym +xK_Arabic_zain = #const XK_Arabic_zain +#endif +#ifdef XK_Arabic_seen +xK_Arabic_seen :: KeySym +xK_Arabic_seen = #const XK_Arabic_seen +#endif +#ifdef XK_Arabic_sheen +xK_Arabic_sheen :: KeySym +xK_Arabic_sheen = #const XK_Arabic_sheen +#endif +#ifdef XK_Arabic_sad +xK_Arabic_sad :: KeySym +xK_Arabic_sad = #const XK_Arabic_sad +#endif +#ifdef XK_Arabic_dad +xK_Arabic_dad :: KeySym +xK_Arabic_dad = #const XK_Arabic_dad +#endif +#ifdef XK_Arabic_tah +xK_Arabic_tah :: KeySym +xK_Arabic_tah = #const XK_Arabic_tah +#endif +#ifdef XK_Arabic_zah +xK_Arabic_zah :: KeySym +xK_Arabic_zah = #const XK_Arabic_zah +#endif +#ifdef XK_Arabic_ain +xK_Arabic_ain :: KeySym +xK_Arabic_ain = #const XK_Arabic_ain +#endif +#ifdef XK_Arabic_ghain +xK_Arabic_ghain :: KeySym +xK_Arabic_ghain = #const XK_Arabic_ghain +#endif +#ifdef XK_Arabic_tatweel +xK_Arabic_tatweel :: KeySym +xK_Arabic_tatweel = #const XK_Arabic_tatweel +#endif +#ifdef XK_Arabic_feh +xK_Arabic_feh :: KeySym +xK_Arabic_feh = #const XK_Arabic_feh +#endif +#ifdef XK_Arabic_qaf +xK_Arabic_qaf :: KeySym +xK_Arabic_qaf = #const XK_Arabic_qaf +#endif +#ifdef XK_Arabic_kaf +xK_Arabic_kaf :: KeySym +xK_Arabic_kaf = #const XK_Arabic_kaf +#endif +#ifdef XK_Arabic_lam +xK_Arabic_lam :: KeySym +xK_Arabic_lam = #const XK_Arabic_lam +#endif +#ifdef XK_Arabic_meem +xK_Arabic_meem :: KeySym +xK_Arabic_meem = #const XK_Arabic_meem +#endif +#ifdef XK_Arabic_noon +xK_Arabic_noon :: KeySym +xK_Arabic_noon = #const XK_Arabic_noon +#endif +#ifdef XK_Arabic_ha +xK_Arabic_ha :: KeySym +xK_Arabic_ha = #const XK_Arabic_ha +#endif +#ifdef XK_Arabic_heh +xK_Arabic_heh :: KeySym +xK_Arabic_heh = #const XK_Arabic_heh +#endif +#ifdef XK_Arabic_waw +xK_Arabic_waw :: KeySym +xK_Arabic_waw = #const XK_Arabic_waw +#endif +#ifdef XK_Arabic_alefmaksura +xK_Arabic_alefmaksura :: KeySym +xK_Arabic_alefmaksura = #const XK_Arabic_alefmaksura +#endif +#ifdef XK_Arabic_yeh +xK_Arabic_yeh :: KeySym +xK_Arabic_yeh = #const XK_Arabic_yeh +#endif +#ifdef XK_Arabic_fathatan +xK_Arabic_fathatan :: KeySym +xK_Arabic_fathatan = #const XK_Arabic_fathatan +#endif +#ifdef XK_Arabic_dammatan +xK_Arabic_dammatan :: KeySym +xK_Arabic_dammatan = #const XK_Arabic_dammatan +#endif +#ifdef XK_Arabic_kasratan +xK_Arabic_kasratan :: KeySym +xK_Arabic_kasratan = #const XK_Arabic_kasratan +#endif +#ifdef XK_Arabic_fatha +xK_Arabic_fatha :: KeySym +xK_Arabic_fatha = #const XK_Arabic_fatha +#endif +#ifdef XK_Arabic_damma +xK_Arabic_damma :: KeySym +xK_Arabic_damma = #const XK_Arabic_damma +#endif +#ifdef XK_Arabic_kasra +xK_Arabic_kasra :: KeySym +xK_Arabic_kasra = #const XK_Arabic_kasra +#endif +#ifdef XK_Arabic_shadda +xK_Arabic_shadda :: KeySym +xK_Arabic_shadda = #const XK_Arabic_shadda +#endif +#ifdef XK_Arabic_sukun +xK_Arabic_sukun :: KeySym +xK_Arabic_sukun = #const XK_Arabic_sukun +#endif +#ifdef XK_Arabic_madda_above +xK_Arabic_madda_above :: KeySym +xK_Arabic_madda_above = #const XK_Arabic_madda_above +#endif +#ifdef XK_Arabic_hamza_above +xK_Arabic_hamza_above :: KeySym +xK_Arabic_hamza_above = #const XK_Arabic_hamza_above +#endif +#ifdef XK_Arabic_hamza_below +xK_Arabic_hamza_below :: KeySym +xK_Arabic_hamza_below = #const XK_Arabic_hamza_below +#endif +#ifdef XK_Arabic_jeh +xK_Arabic_jeh :: KeySym +xK_Arabic_jeh = #const XK_Arabic_jeh +#endif +#ifdef XK_Arabic_veh +xK_Arabic_veh :: KeySym +xK_Arabic_veh = #const XK_Arabic_veh +#endif +#ifdef XK_Arabic_keheh +xK_Arabic_keheh :: KeySym +xK_Arabic_keheh = #const XK_Arabic_keheh +#endif +#ifdef XK_Arabic_gaf +xK_Arabic_gaf :: KeySym +xK_Arabic_gaf = #const XK_Arabic_gaf +#endif +#ifdef XK_Arabic_noon_ghunna +xK_Arabic_noon_ghunna :: KeySym +xK_Arabic_noon_ghunna = #const XK_Arabic_noon_ghunna +#endif +#ifdef XK_Arabic_heh_doachashmee +xK_Arabic_heh_doachashmee :: KeySym +xK_Arabic_heh_doachashmee = #const XK_Arabic_heh_doachashmee +#endif +#ifdef XK_Farsi_yeh +xK_Farsi_yeh :: KeySym +xK_Farsi_yeh = #const XK_Farsi_yeh +#endif +#ifdef XK_Arabic_farsi_yeh +xK_Arabic_farsi_yeh :: KeySym +xK_Arabic_farsi_yeh = #const XK_Arabic_farsi_yeh +#endif +#ifdef XK_Arabic_yeh_baree +xK_Arabic_yeh_baree :: KeySym +xK_Arabic_yeh_baree = #const XK_Arabic_yeh_baree +#endif +#ifdef XK_Arabic_heh_goal +xK_Arabic_heh_goal :: KeySym +xK_Arabic_heh_goal = #const XK_Arabic_heh_goal +#endif +#ifdef XK_Arabic_switch +xK_Arabic_switch :: KeySym +xK_Arabic_switch = #const XK_Arabic_switch +#endif + +-- XK_CYRILLIC +#ifdef XK_Cyrillic_GHE_bar +xK_Cyrillic_GHE_bar :: KeySym +xK_Cyrillic_GHE_bar = #const XK_Cyrillic_GHE_bar +#endif +#ifdef XK_Cyrillic_ghe_bar +xK_Cyrillic_ghe_bar :: KeySym +xK_Cyrillic_ghe_bar = #const XK_Cyrillic_ghe_bar +#endif +#ifdef XK_Cyrillic_ZHE_descender +xK_Cyrillic_ZHE_descender :: KeySym +xK_Cyrillic_ZHE_descender = #const XK_Cyrillic_ZHE_descender +#endif +#ifdef XK_Cyrillic_zhe_descender +xK_Cyrillic_zhe_descender :: KeySym +xK_Cyrillic_zhe_descender = #const XK_Cyrillic_zhe_descender +#endif +#ifdef XK_Cyrillic_KA_descender +xK_Cyrillic_KA_descender :: KeySym +xK_Cyrillic_KA_descender = #const XK_Cyrillic_KA_descender +#endif +#ifdef XK_Cyrillic_ka_descender +xK_Cyrillic_ka_descender :: KeySym +xK_Cyrillic_ka_descender = #const XK_Cyrillic_ka_descender +#endif +#ifdef XK_Cyrillic_KA_vertstroke +xK_Cyrillic_KA_vertstroke :: KeySym +xK_Cyrillic_KA_vertstroke = #const XK_Cyrillic_KA_vertstroke +#endif +#ifdef XK_Cyrillic_ka_vertstroke +xK_Cyrillic_ka_vertstroke :: KeySym +xK_Cyrillic_ka_vertstroke = #const XK_Cyrillic_ka_vertstroke +#endif +#ifdef XK_Cyrillic_EN_descender +xK_Cyrillic_EN_descender :: KeySym +xK_Cyrillic_EN_descender = #const XK_Cyrillic_EN_descender +#endif +#ifdef XK_Cyrillic_en_descender +xK_Cyrillic_en_descender :: KeySym +xK_Cyrillic_en_descender = #const XK_Cyrillic_en_descender +#endif +#ifdef XK_Cyrillic_U_straight +xK_Cyrillic_U_straight :: KeySym +xK_Cyrillic_U_straight = #const XK_Cyrillic_U_straight +#endif +#ifdef XK_Cyrillic_u_straight +xK_Cyrillic_u_straight :: KeySym +xK_Cyrillic_u_straight = #const XK_Cyrillic_u_straight +#endif +#ifdef XK_Cyrillic_U_straight_bar +xK_Cyrillic_U_straight_bar :: KeySym +xK_Cyrillic_U_straight_bar = #const XK_Cyrillic_U_straight_bar +#endif +#ifdef XK_Cyrillic_u_straight_bar +xK_Cyrillic_u_straight_bar :: KeySym +xK_Cyrillic_u_straight_bar = #const XK_Cyrillic_u_straight_bar +#endif +#ifdef XK_Cyrillic_HA_descender +xK_Cyrillic_HA_descender :: KeySym +xK_Cyrillic_HA_descender = #const XK_Cyrillic_HA_descender +#endif +#ifdef XK_Cyrillic_ha_descender +xK_Cyrillic_ha_descender :: KeySym +xK_Cyrillic_ha_descender = #const XK_Cyrillic_ha_descender +#endif +#ifdef XK_Cyrillic_CHE_descender +xK_Cyrillic_CHE_descender :: KeySym +xK_Cyrillic_CHE_descender = #const XK_Cyrillic_CHE_descender +#endif +#ifdef XK_Cyrillic_che_descender +xK_Cyrillic_che_descender :: KeySym +xK_Cyrillic_che_descender = #const XK_Cyrillic_che_descender +#endif +#ifdef XK_Cyrillic_CHE_vertstroke +xK_Cyrillic_CHE_vertstroke :: KeySym +xK_Cyrillic_CHE_vertstroke = #const XK_Cyrillic_CHE_vertstroke +#endif +#ifdef XK_Cyrillic_che_vertstroke +xK_Cyrillic_che_vertstroke :: KeySym +xK_Cyrillic_che_vertstroke = #const XK_Cyrillic_che_vertstroke +#endif +#ifdef XK_Cyrillic_SHHA +xK_Cyrillic_SHHA :: KeySym +xK_Cyrillic_SHHA = #const XK_Cyrillic_SHHA +#endif +#ifdef XK_Cyrillic_shha +xK_Cyrillic_shha :: KeySym +xK_Cyrillic_shha = #const XK_Cyrillic_shha +#endif +#ifdef XK_Cyrillic_SCHWA +xK_Cyrillic_SCHWA :: KeySym +xK_Cyrillic_SCHWA = #const XK_Cyrillic_SCHWA +#endif +#ifdef XK_Cyrillic_schwa +xK_Cyrillic_schwa :: KeySym +xK_Cyrillic_schwa = #const XK_Cyrillic_schwa +#endif +#ifdef XK_Cyrillic_I_macron +xK_Cyrillic_I_macron :: KeySym +xK_Cyrillic_I_macron = #const XK_Cyrillic_I_macron +#endif +#ifdef XK_Cyrillic_i_macron +xK_Cyrillic_i_macron :: KeySym +xK_Cyrillic_i_macron = #const XK_Cyrillic_i_macron +#endif +#ifdef XK_Cyrillic_O_bar +xK_Cyrillic_O_bar :: KeySym +xK_Cyrillic_O_bar = #const XK_Cyrillic_O_bar +#endif +#ifdef XK_Cyrillic_o_bar +xK_Cyrillic_o_bar :: KeySym +xK_Cyrillic_o_bar = #const XK_Cyrillic_o_bar +#endif +#ifdef XK_Cyrillic_U_macron +xK_Cyrillic_U_macron :: KeySym +xK_Cyrillic_U_macron = #const XK_Cyrillic_U_macron +#endif +#ifdef XK_Cyrillic_u_macron +xK_Cyrillic_u_macron :: KeySym +xK_Cyrillic_u_macron = #const XK_Cyrillic_u_macron +#endif +#ifdef XK_Serbian_dje +xK_Serbian_dje :: KeySym +xK_Serbian_dje = #const XK_Serbian_dje +#endif +#ifdef XK_Macedonia_gje +xK_Macedonia_gje :: KeySym +xK_Macedonia_gje = #const XK_Macedonia_gje +#endif +#ifdef XK_Cyrillic_io +xK_Cyrillic_io :: KeySym +xK_Cyrillic_io = #const XK_Cyrillic_io +#endif +#ifdef XK_Ukrainian_ie +xK_Ukrainian_ie :: KeySym +xK_Ukrainian_ie = #const XK_Ukrainian_ie +#endif +#ifdef XK_Ukranian_je +xK_Ukranian_je :: KeySym +xK_Ukranian_je = #const XK_Ukranian_je +#endif +#ifdef XK_Macedonia_dse +xK_Macedonia_dse :: KeySym +xK_Macedonia_dse = #const XK_Macedonia_dse +#endif +#ifdef XK_Ukrainian_i +xK_Ukrainian_i :: KeySym +xK_Ukrainian_i = #const XK_Ukrainian_i +#endif +#ifdef XK_Ukranian_i +xK_Ukranian_i :: KeySym +xK_Ukranian_i = #const XK_Ukranian_i +#endif +#ifdef XK_Ukrainian_yi +xK_Ukrainian_yi :: KeySym +xK_Ukrainian_yi = #const XK_Ukrainian_yi +#endif +#ifdef XK_Ukranian_yi +xK_Ukranian_yi :: KeySym +xK_Ukranian_yi = #const XK_Ukranian_yi +#endif +#ifdef XK_Cyrillic_je +xK_Cyrillic_je :: KeySym +xK_Cyrillic_je = #const XK_Cyrillic_je +#endif +#ifdef XK_Serbian_je +xK_Serbian_je :: KeySym +xK_Serbian_je = #const XK_Serbian_je +#endif +#ifdef XK_Cyrillic_lje +xK_Cyrillic_lje :: KeySym +xK_Cyrillic_lje = #const XK_Cyrillic_lje +#endif +#ifdef XK_Serbian_lje +xK_Serbian_lje :: KeySym +xK_Serbian_lje = #const XK_Serbian_lje +#endif +#ifdef XK_Cyrillic_nje +xK_Cyrillic_nje :: KeySym +xK_Cyrillic_nje = #const XK_Cyrillic_nje +#endif +#ifdef XK_Serbian_nje +xK_Serbian_nje :: KeySym +xK_Serbian_nje = #const XK_Serbian_nje +#endif +#ifdef XK_Serbian_tshe +xK_Serbian_tshe :: KeySym +xK_Serbian_tshe = #const XK_Serbian_tshe +#endif +#ifdef XK_Macedonia_kje +xK_Macedonia_kje :: KeySym +xK_Macedonia_kje = #const XK_Macedonia_kje +#endif +#ifdef XK_Ukrainian_ghe_with_upturn +xK_Ukrainian_ghe_with_upturn :: KeySym +xK_Ukrainian_ghe_with_upturn = #const XK_Ukrainian_ghe_with_upturn +#endif +#ifdef XK_Byelorussian_shortu +xK_Byelorussian_shortu :: KeySym +xK_Byelorussian_shortu = #const XK_Byelorussian_shortu +#endif +#ifdef XK_Cyrillic_dzhe +xK_Cyrillic_dzhe :: KeySym +xK_Cyrillic_dzhe = #const XK_Cyrillic_dzhe +#endif +#ifdef XK_Serbian_dze +xK_Serbian_dze :: KeySym +xK_Serbian_dze = #const XK_Serbian_dze +#endif +#ifdef XK_numerosign +xK_numerosign :: KeySym +xK_numerosign = #const XK_numerosign +#endif +#ifdef XK_Serbian_DJE +xK_Serbian_DJE :: KeySym +xK_Serbian_DJE = #const XK_Serbian_DJE +#endif +#ifdef XK_Macedonia_GJE +xK_Macedonia_GJE :: KeySym +xK_Macedonia_GJE = #const XK_Macedonia_GJE +#endif +#ifdef XK_Cyrillic_IO +xK_Cyrillic_IO :: KeySym +xK_Cyrillic_IO = #const XK_Cyrillic_IO +#endif +#ifdef XK_Ukrainian_IE +xK_Ukrainian_IE :: KeySym +xK_Ukrainian_IE = #const XK_Ukrainian_IE +#endif +#ifdef XK_Ukranian_JE +xK_Ukranian_JE :: KeySym +xK_Ukranian_JE = #const XK_Ukranian_JE +#endif +#ifdef XK_Macedonia_DSE +xK_Macedonia_DSE :: KeySym +xK_Macedonia_DSE = #const XK_Macedonia_DSE +#endif +#ifdef XK_Ukrainian_I +xK_Ukrainian_I :: KeySym +xK_Ukrainian_I = #const XK_Ukrainian_I +#endif +#ifdef XK_Ukranian_I +xK_Ukranian_I :: KeySym +xK_Ukranian_I = #const XK_Ukranian_I +#endif +#ifdef XK_Ukrainian_YI +xK_Ukrainian_YI :: KeySym +xK_Ukrainian_YI = #const XK_Ukrainian_YI +#endif +#ifdef XK_Ukranian_YI +xK_Ukranian_YI :: KeySym +xK_Ukranian_YI = #const XK_Ukranian_YI +#endif +#ifdef XK_Cyrillic_JE +xK_Cyrillic_JE :: KeySym +xK_Cyrillic_JE = #const XK_Cyrillic_JE +#endif +#ifdef XK_Serbian_JE +xK_Serbian_JE :: KeySym +xK_Serbian_JE = #const XK_Serbian_JE +#endif +#ifdef XK_Cyrillic_LJE +xK_Cyrillic_LJE :: KeySym +xK_Cyrillic_LJE = #const XK_Cyrillic_LJE +#endif +#ifdef XK_Serbian_LJE +xK_Serbian_LJE :: KeySym +xK_Serbian_LJE = #const XK_Serbian_LJE +#endif +#ifdef XK_Cyrillic_NJE +xK_Cyrillic_NJE :: KeySym +xK_Cyrillic_NJE = #const XK_Cyrillic_NJE +#endif +#ifdef XK_Serbian_NJE +xK_Serbian_NJE :: KeySym +xK_Serbian_NJE = #const XK_Serbian_NJE +#endif +#ifdef XK_Serbian_TSHE +xK_Serbian_TSHE :: KeySym +xK_Serbian_TSHE = #const XK_Serbian_TSHE +#endif +#ifdef XK_Macedonia_KJE +xK_Macedonia_KJE :: KeySym +xK_Macedonia_KJE = #const XK_Macedonia_KJE +#endif +#ifdef XK_Ukrainian_GHE_WITH_UPTURN +xK_Ukrainian_GHE_WITH_UPTURN :: KeySym +xK_Ukrainian_GHE_WITH_UPTURN = #const XK_Ukrainian_GHE_WITH_UPTURN +#endif +#ifdef XK_Byelorussian_SHORTU +xK_Byelorussian_SHORTU :: KeySym +xK_Byelorussian_SHORTU = #const XK_Byelorussian_SHORTU +#endif +#ifdef XK_Cyrillic_DZHE +xK_Cyrillic_DZHE :: KeySym +xK_Cyrillic_DZHE = #const XK_Cyrillic_DZHE +#endif +#ifdef XK_Serbian_DZE +xK_Serbian_DZE :: KeySym +xK_Serbian_DZE = #const XK_Serbian_DZE +#endif +#ifdef XK_Cyrillic_yu +xK_Cyrillic_yu :: KeySym +xK_Cyrillic_yu = #const XK_Cyrillic_yu +#endif +#ifdef XK_Cyrillic_a +xK_Cyrillic_a :: KeySym +xK_Cyrillic_a = #const XK_Cyrillic_a +#endif +#ifdef XK_Cyrillic_be +xK_Cyrillic_be :: KeySym +xK_Cyrillic_be = #const XK_Cyrillic_be +#endif +#ifdef XK_Cyrillic_tse +xK_Cyrillic_tse :: KeySym +xK_Cyrillic_tse = #const XK_Cyrillic_tse +#endif +#ifdef XK_Cyrillic_de +xK_Cyrillic_de :: KeySym +xK_Cyrillic_de = #const XK_Cyrillic_de +#endif +#ifdef XK_Cyrillic_ie +xK_Cyrillic_ie :: KeySym +xK_Cyrillic_ie = #const XK_Cyrillic_ie +#endif +#ifdef XK_Cyrillic_ef +xK_Cyrillic_ef :: KeySym +xK_Cyrillic_ef = #const XK_Cyrillic_ef +#endif +#ifdef XK_Cyrillic_ghe +xK_Cyrillic_ghe :: KeySym +xK_Cyrillic_ghe = #const XK_Cyrillic_ghe +#endif +#ifdef XK_Cyrillic_ha +xK_Cyrillic_ha :: KeySym +xK_Cyrillic_ha = #const XK_Cyrillic_ha +#endif +#ifdef XK_Cyrillic_i +xK_Cyrillic_i :: KeySym +xK_Cyrillic_i = #const XK_Cyrillic_i +#endif +#ifdef XK_Cyrillic_shorti +xK_Cyrillic_shorti :: KeySym +xK_Cyrillic_shorti = #const XK_Cyrillic_shorti +#endif +#ifdef XK_Cyrillic_ka +xK_Cyrillic_ka :: KeySym +xK_Cyrillic_ka = #const XK_Cyrillic_ka +#endif +#ifdef XK_Cyrillic_el +xK_Cyrillic_el :: KeySym +xK_Cyrillic_el = #const XK_Cyrillic_el +#endif +#ifdef XK_Cyrillic_em +xK_Cyrillic_em :: KeySym +xK_Cyrillic_em = #const XK_Cyrillic_em +#endif +#ifdef XK_Cyrillic_en +xK_Cyrillic_en :: KeySym +xK_Cyrillic_en = #const XK_Cyrillic_en +#endif +#ifdef XK_Cyrillic_o +xK_Cyrillic_o :: KeySym +xK_Cyrillic_o = #const XK_Cyrillic_o +#endif +#ifdef XK_Cyrillic_pe +xK_Cyrillic_pe :: KeySym +xK_Cyrillic_pe = #const XK_Cyrillic_pe +#endif +#ifdef XK_Cyrillic_ya +xK_Cyrillic_ya :: KeySym +xK_Cyrillic_ya = #const XK_Cyrillic_ya +#endif +#ifdef XK_Cyrillic_er +xK_Cyrillic_er :: KeySym +xK_Cyrillic_er = #const XK_Cyrillic_er +#endif +#ifdef XK_Cyrillic_es +xK_Cyrillic_es :: KeySym +xK_Cyrillic_es = #const XK_Cyrillic_es +#endif +#ifdef XK_Cyrillic_te +xK_Cyrillic_te :: KeySym +xK_Cyrillic_te = #const XK_Cyrillic_te +#endif +#ifdef XK_Cyrillic_u +xK_Cyrillic_u :: KeySym +xK_Cyrillic_u = #const XK_Cyrillic_u +#endif +#ifdef XK_Cyrillic_zhe +xK_Cyrillic_zhe :: KeySym +xK_Cyrillic_zhe = #const XK_Cyrillic_zhe +#endif +#ifdef XK_Cyrillic_ve +xK_Cyrillic_ve :: KeySym +xK_Cyrillic_ve = #const XK_Cyrillic_ve +#endif +#ifdef XK_Cyrillic_softsign +xK_Cyrillic_softsign :: KeySym +xK_Cyrillic_softsign = #const XK_Cyrillic_softsign +#endif +#ifdef XK_Cyrillic_yeru +xK_Cyrillic_yeru :: KeySym +xK_Cyrillic_yeru = #const XK_Cyrillic_yeru +#endif +#ifdef XK_Cyrillic_ze +xK_Cyrillic_ze :: KeySym +xK_Cyrillic_ze = #const XK_Cyrillic_ze +#endif +#ifdef XK_Cyrillic_sha +xK_Cyrillic_sha :: KeySym +xK_Cyrillic_sha = #const XK_Cyrillic_sha +#endif +#ifdef XK_Cyrillic_e +xK_Cyrillic_e :: KeySym +xK_Cyrillic_e = #const XK_Cyrillic_e +#endif +#ifdef XK_Cyrillic_shcha +xK_Cyrillic_shcha :: KeySym +xK_Cyrillic_shcha = #const XK_Cyrillic_shcha +#endif +#ifdef XK_Cyrillic_che +xK_Cyrillic_che :: KeySym +xK_Cyrillic_che = #const XK_Cyrillic_che +#endif +#ifdef XK_Cyrillic_hardsign +xK_Cyrillic_hardsign :: KeySym +xK_Cyrillic_hardsign = #const XK_Cyrillic_hardsign +#endif +#ifdef XK_Cyrillic_YU +xK_Cyrillic_YU :: KeySym +xK_Cyrillic_YU = #const XK_Cyrillic_YU +#endif +#ifdef XK_Cyrillic_A +xK_Cyrillic_A :: KeySym +xK_Cyrillic_A = #const XK_Cyrillic_A +#endif +#ifdef XK_Cyrillic_BE +xK_Cyrillic_BE :: KeySym +xK_Cyrillic_BE = #const XK_Cyrillic_BE +#endif +#ifdef XK_Cyrillic_TSE +xK_Cyrillic_TSE :: KeySym +xK_Cyrillic_TSE = #const XK_Cyrillic_TSE +#endif +#ifdef XK_Cyrillic_DE +xK_Cyrillic_DE :: KeySym +xK_Cyrillic_DE = #const XK_Cyrillic_DE +#endif +#ifdef XK_Cyrillic_IE +xK_Cyrillic_IE :: KeySym +xK_Cyrillic_IE = #const XK_Cyrillic_IE +#endif +#ifdef XK_Cyrillic_EF +xK_Cyrillic_EF :: KeySym +xK_Cyrillic_EF = #const XK_Cyrillic_EF +#endif +#ifdef XK_Cyrillic_GHE +xK_Cyrillic_GHE :: KeySym +xK_Cyrillic_GHE = #const XK_Cyrillic_GHE +#endif +#ifdef XK_Cyrillic_HA +xK_Cyrillic_HA :: KeySym +xK_Cyrillic_HA = #const XK_Cyrillic_HA +#endif +#ifdef XK_Cyrillic_I +xK_Cyrillic_I :: KeySym +xK_Cyrillic_I = #const XK_Cyrillic_I +#endif +#ifdef XK_Cyrillic_SHORTI +xK_Cyrillic_SHORTI :: KeySym +xK_Cyrillic_SHORTI = #const XK_Cyrillic_SHORTI +#endif +#ifdef XK_Cyrillic_KA +xK_Cyrillic_KA :: KeySym +xK_Cyrillic_KA = #const XK_Cyrillic_KA +#endif +#ifdef XK_Cyrillic_EL +xK_Cyrillic_EL :: KeySym +xK_Cyrillic_EL = #const XK_Cyrillic_EL +#endif +#ifdef XK_Cyrillic_EM +xK_Cyrillic_EM :: KeySym +xK_Cyrillic_EM = #const XK_Cyrillic_EM +#endif +#ifdef XK_Cyrillic_EN +xK_Cyrillic_EN :: KeySym +xK_Cyrillic_EN = #const XK_Cyrillic_EN +#endif +#ifdef XK_Cyrillic_O +xK_Cyrillic_O :: KeySym +xK_Cyrillic_O = #const XK_Cyrillic_O +#endif +#ifdef XK_Cyrillic_PE +xK_Cyrillic_PE :: KeySym +xK_Cyrillic_PE = #const XK_Cyrillic_PE +#endif +#ifdef XK_Cyrillic_YA +xK_Cyrillic_YA :: KeySym +xK_Cyrillic_YA = #const XK_Cyrillic_YA +#endif +#ifdef XK_Cyrillic_ER +xK_Cyrillic_ER :: KeySym +xK_Cyrillic_ER = #const XK_Cyrillic_ER +#endif +#ifdef XK_Cyrillic_ES +xK_Cyrillic_ES :: KeySym +xK_Cyrillic_ES = #const XK_Cyrillic_ES +#endif +#ifdef XK_Cyrillic_TE +xK_Cyrillic_TE :: KeySym +xK_Cyrillic_TE = #const XK_Cyrillic_TE +#endif +#ifdef XK_Cyrillic_U +xK_Cyrillic_U :: KeySym +xK_Cyrillic_U = #const XK_Cyrillic_U +#endif +#ifdef XK_Cyrillic_ZHE +xK_Cyrillic_ZHE :: KeySym +xK_Cyrillic_ZHE = #const XK_Cyrillic_ZHE +#endif +#ifdef XK_Cyrillic_VE +xK_Cyrillic_VE :: KeySym +xK_Cyrillic_VE = #const XK_Cyrillic_VE +#endif +#ifdef XK_Cyrillic_SOFTSIGN +xK_Cyrillic_SOFTSIGN :: KeySym +xK_Cyrillic_SOFTSIGN = #const XK_Cyrillic_SOFTSIGN +#endif +#ifdef XK_Cyrillic_YERU +xK_Cyrillic_YERU :: KeySym +xK_Cyrillic_YERU = #const XK_Cyrillic_YERU +#endif +#ifdef XK_Cyrillic_ZE +xK_Cyrillic_ZE :: KeySym +xK_Cyrillic_ZE = #const XK_Cyrillic_ZE +#endif +#ifdef XK_Cyrillic_SHA +xK_Cyrillic_SHA :: KeySym +xK_Cyrillic_SHA = #const XK_Cyrillic_SHA +#endif +#ifdef XK_Cyrillic_E +xK_Cyrillic_E :: KeySym +xK_Cyrillic_E = #const XK_Cyrillic_E +#endif +#ifdef XK_Cyrillic_SHCHA +xK_Cyrillic_SHCHA :: KeySym +xK_Cyrillic_SHCHA = #const XK_Cyrillic_SHCHA +#endif +#ifdef XK_Cyrillic_CHE +xK_Cyrillic_CHE :: KeySym +xK_Cyrillic_CHE = #const XK_Cyrillic_CHE +#endif +#ifdef XK_Cyrillic_HARDSIGN +xK_Cyrillic_HARDSIGN :: KeySym +xK_Cyrillic_HARDSIGN = #const XK_Cyrillic_HARDSIGN +#endif + +-- XK_GREEK +#ifdef XK_Greek_ALPHAaccent +xK_Greek_ALPHAaccent :: KeySym +xK_Greek_ALPHAaccent = #const XK_Greek_ALPHAaccent +#endif +#ifdef XK_Greek_EPSILONaccent +xK_Greek_EPSILONaccent :: KeySym +xK_Greek_EPSILONaccent = #const XK_Greek_EPSILONaccent +#endif +#ifdef XK_Greek_ETAaccent +xK_Greek_ETAaccent :: KeySym +xK_Greek_ETAaccent = #const XK_Greek_ETAaccent +#endif +#ifdef XK_Greek_IOTAaccent +xK_Greek_IOTAaccent :: KeySym +xK_Greek_IOTAaccent = #const XK_Greek_IOTAaccent +#endif +#ifdef XK_Greek_IOTAdieresis +xK_Greek_IOTAdieresis :: KeySym +xK_Greek_IOTAdieresis = #const XK_Greek_IOTAdieresis +#endif +#ifdef XK_Greek_IOTAdiaeresis +xK_Greek_IOTAdiaeresis :: KeySym +xK_Greek_IOTAdiaeresis = #const XK_Greek_IOTAdiaeresis +#endif +#ifdef XK_Greek_OMICRONaccent +xK_Greek_OMICRONaccent :: KeySym +xK_Greek_OMICRONaccent = #const XK_Greek_OMICRONaccent +#endif +#ifdef XK_Greek_UPSILONaccent +xK_Greek_UPSILONaccent :: KeySym +xK_Greek_UPSILONaccent = #const XK_Greek_UPSILONaccent +#endif +#ifdef XK_Greek_UPSILONdieresis +xK_Greek_UPSILONdieresis :: KeySym +xK_Greek_UPSILONdieresis = #const XK_Greek_UPSILONdieresis +#endif +#ifdef XK_Greek_OMEGAaccent +xK_Greek_OMEGAaccent :: KeySym +xK_Greek_OMEGAaccent = #const XK_Greek_OMEGAaccent +#endif +#ifdef XK_Greek_accentdieresis +xK_Greek_accentdieresis :: KeySym +xK_Greek_accentdieresis = #const XK_Greek_accentdieresis +#endif +#ifdef XK_Greek_horizbar +xK_Greek_horizbar :: KeySym +xK_Greek_horizbar = #const XK_Greek_horizbar +#endif +#ifdef XK_Greek_alphaaccent +xK_Greek_alphaaccent :: KeySym +xK_Greek_alphaaccent = #const XK_Greek_alphaaccent +#endif +#ifdef XK_Greek_epsilonaccent +xK_Greek_epsilonaccent :: KeySym +xK_Greek_epsilonaccent = #const XK_Greek_epsilonaccent +#endif +#ifdef XK_Greek_etaaccent +xK_Greek_etaaccent :: KeySym +xK_Greek_etaaccent = #const XK_Greek_etaaccent +#endif +#ifdef XK_Greek_iotaaccent +xK_Greek_iotaaccent :: KeySym +xK_Greek_iotaaccent = #const XK_Greek_iotaaccent +#endif +#ifdef XK_Greek_iotadieresis +xK_Greek_iotadieresis :: KeySym +xK_Greek_iotadieresis = #const XK_Greek_iotadieresis +#endif +#ifdef XK_Greek_iotaaccentdieresis +xK_Greek_iotaaccentdieresis :: KeySym +xK_Greek_iotaaccentdieresis = #const XK_Greek_iotaaccentdieresis +#endif +#ifdef XK_Greek_omicronaccent +xK_Greek_omicronaccent :: KeySym +xK_Greek_omicronaccent = #const XK_Greek_omicronaccent +#endif +#ifdef XK_Greek_upsilonaccent +xK_Greek_upsilonaccent :: KeySym +xK_Greek_upsilonaccent = #const XK_Greek_upsilonaccent +#endif +#ifdef XK_Greek_upsilondieresis +xK_Greek_upsilondieresis :: KeySym +xK_Greek_upsilondieresis = #const XK_Greek_upsilondieresis +#endif +#ifdef XK_Greek_upsilonaccentdieresis +xK_Greek_upsilonaccentdieresis :: KeySym +xK_Greek_upsilonaccentdieresis = #const XK_Greek_upsilonaccentdieresis +#endif +#ifdef XK_Greek_omegaaccent +xK_Greek_omegaaccent :: KeySym +xK_Greek_omegaaccent = #const XK_Greek_omegaaccent +#endif +#ifdef XK_Greek_ALPHA +xK_Greek_ALPHA :: KeySym +xK_Greek_ALPHA = #const XK_Greek_ALPHA +#endif +#ifdef XK_Greek_BETA +xK_Greek_BETA :: KeySym +xK_Greek_BETA = #const XK_Greek_BETA +#endif +#ifdef XK_Greek_GAMMA +xK_Greek_GAMMA :: KeySym +xK_Greek_GAMMA = #const XK_Greek_GAMMA +#endif +#ifdef XK_Greek_DELTA +xK_Greek_DELTA :: KeySym +xK_Greek_DELTA = #const XK_Greek_DELTA +#endif +#ifdef XK_Greek_EPSILON +xK_Greek_EPSILON :: KeySym +xK_Greek_EPSILON = #const XK_Greek_EPSILON +#endif +#ifdef XK_Greek_ZETA +xK_Greek_ZETA :: KeySym +xK_Greek_ZETA = #const XK_Greek_ZETA +#endif +#ifdef XK_Greek_ETA +xK_Greek_ETA :: KeySym +xK_Greek_ETA = #const XK_Greek_ETA +#endif +#ifdef XK_Greek_THETA +xK_Greek_THETA :: KeySym +xK_Greek_THETA = #const XK_Greek_THETA +#endif +#ifdef XK_Greek_IOTA +xK_Greek_IOTA :: KeySym +xK_Greek_IOTA = #const XK_Greek_IOTA +#endif +#ifdef XK_Greek_KAPPA +xK_Greek_KAPPA :: KeySym +xK_Greek_KAPPA = #const XK_Greek_KAPPA +#endif +#ifdef XK_Greek_LAMDA +xK_Greek_LAMDA :: KeySym +xK_Greek_LAMDA = #const XK_Greek_LAMDA +#endif +#ifdef XK_Greek_LAMBDA +xK_Greek_LAMBDA :: KeySym +xK_Greek_LAMBDA = #const XK_Greek_LAMBDA +#endif +#ifdef XK_Greek_MU +xK_Greek_MU :: KeySym +xK_Greek_MU = #const XK_Greek_MU +#endif +#ifdef XK_Greek_NU +xK_Greek_NU :: KeySym +xK_Greek_NU = #const XK_Greek_NU +#endif +#ifdef XK_Greek_XI +xK_Greek_XI :: KeySym +xK_Greek_XI = #const XK_Greek_XI +#endif +#ifdef XK_Greek_OMICRON +xK_Greek_OMICRON :: KeySym +xK_Greek_OMICRON = #const XK_Greek_OMICRON +#endif +#ifdef XK_Greek_PI +xK_Greek_PI :: KeySym +xK_Greek_PI = #const XK_Greek_PI +#endif +#ifdef XK_Greek_RHO +xK_Greek_RHO :: KeySym +xK_Greek_RHO = #const XK_Greek_RHO +#endif +#ifdef XK_Greek_SIGMA +xK_Greek_SIGMA :: KeySym +xK_Greek_SIGMA = #const XK_Greek_SIGMA +#endif +#ifdef XK_Greek_TAU +xK_Greek_TAU :: KeySym +xK_Greek_TAU = #const XK_Greek_TAU +#endif +#ifdef XK_Greek_UPSILON +xK_Greek_UPSILON :: KeySym +xK_Greek_UPSILON = #const XK_Greek_UPSILON +#endif +#ifdef XK_Greek_PHI +xK_Greek_PHI :: KeySym +xK_Greek_PHI = #const XK_Greek_PHI +#endif +#ifdef XK_Greek_CHI +xK_Greek_CHI :: KeySym +xK_Greek_CHI = #const XK_Greek_CHI +#endif +#ifdef XK_Greek_PSI +xK_Greek_PSI :: KeySym +xK_Greek_PSI = #const XK_Greek_PSI +#endif +#ifdef XK_Greek_OMEGA +xK_Greek_OMEGA :: KeySym +xK_Greek_OMEGA = #const XK_Greek_OMEGA +#endif +#ifdef XK_Greek_alpha +xK_Greek_alpha :: KeySym +xK_Greek_alpha = #const XK_Greek_alpha +#endif +#ifdef XK_Greek_beta +xK_Greek_beta :: KeySym +xK_Greek_beta = #const XK_Greek_beta +#endif +#ifdef XK_Greek_gamma +xK_Greek_gamma :: KeySym +xK_Greek_gamma = #const XK_Greek_gamma +#endif +#ifdef XK_Greek_delta +xK_Greek_delta :: KeySym +xK_Greek_delta = #const XK_Greek_delta +#endif +#ifdef XK_Greek_epsilon +xK_Greek_epsilon :: KeySym +xK_Greek_epsilon = #const XK_Greek_epsilon +#endif +#ifdef XK_Greek_zeta +xK_Greek_zeta :: KeySym +xK_Greek_zeta = #const XK_Greek_zeta +#endif +#ifdef XK_Greek_eta +xK_Greek_eta :: KeySym +xK_Greek_eta = #const XK_Greek_eta +#endif +#ifdef XK_Greek_theta +xK_Greek_theta :: KeySym +xK_Greek_theta = #const XK_Greek_theta +#endif +#ifdef XK_Greek_iota +xK_Greek_iota :: KeySym +xK_Greek_iota = #const XK_Greek_iota +#endif +#ifdef XK_Greek_kappa +xK_Greek_kappa :: KeySym +xK_Greek_kappa = #const XK_Greek_kappa +#endif +#ifdef XK_Greek_lamda +xK_Greek_lamda :: KeySym +xK_Greek_lamda = #const XK_Greek_lamda +#endif +#ifdef XK_Greek_lambda +xK_Greek_lambda :: KeySym +xK_Greek_lambda = #const XK_Greek_lambda +#endif +#ifdef XK_Greek_mu +xK_Greek_mu :: KeySym +xK_Greek_mu = #const XK_Greek_mu +#endif +#ifdef XK_Greek_nu +xK_Greek_nu :: KeySym +xK_Greek_nu = #const XK_Greek_nu +#endif +#ifdef XK_Greek_xi +xK_Greek_xi :: KeySym +xK_Greek_xi = #const XK_Greek_xi +#endif +#ifdef XK_Greek_omicron +xK_Greek_omicron :: KeySym +xK_Greek_omicron = #const XK_Greek_omicron +#endif +#ifdef XK_Greek_pi +xK_Greek_pi :: KeySym +xK_Greek_pi = #const XK_Greek_pi +#endif +#ifdef XK_Greek_rho +xK_Greek_rho :: KeySym +xK_Greek_rho = #const XK_Greek_rho +#endif +#ifdef XK_Greek_sigma +xK_Greek_sigma :: KeySym +xK_Greek_sigma = #const XK_Greek_sigma +#endif +#ifdef XK_Greek_finalsmallsigma +xK_Greek_finalsmallsigma :: KeySym +xK_Greek_finalsmallsigma = #const XK_Greek_finalsmallsigma +#endif +#ifdef XK_Greek_tau +xK_Greek_tau :: KeySym +xK_Greek_tau = #const XK_Greek_tau +#endif +#ifdef XK_Greek_upsilon +xK_Greek_upsilon :: KeySym +xK_Greek_upsilon = #const XK_Greek_upsilon +#endif +#ifdef XK_Greek_phi +xK_Greek_phi :: KeySym +xK_Greek_phi = #const XK_Greek_phi +#endif +#ifdef XK_Greek_chi +xK_Greek_chi :: KeySym +xK_Greek_chi = #const XK_Greek_chi +#endif +#ifdef XK_Greek_psi +xK_Greek_psi :: KeySym +xK_Greek_psi = #const XK_Greek_psi +#endif +#ifdef XK_Greek_omega +xK_Greek_omega :: KeySym +xK_Greek_omega = #const XK_Greek_omega +#endif +#ifdef XK_Greek_switch +xK_Greek_switch :: KeySym +xK_Greek_switch = #const XK_Greek_switch +#endif + +-- XK_TECHNICAL +#ifdef XK_leftradical +xK_leftradical :: KeySym +xK_leftradical = #const XK_leftradical +#endif +#ifdef XK_topleftradical +xK_topleftradical :: KeySym +xK_topleftradical = #const XK_topleftradical +#endif +#ifdef XK_horizconnector +xK_horizconnector :: KeySym +xK_horizconnector = #const XK_horizconnector +#endif +#ifdef XK_topintegral +xK_topintegral :: KeySym +xK_topintegral = #const XK_topintegral +#endif +#ifdef XK_botintegral +xK_botintegral :: KeySym +xK_botintegral = #const XK_botintegral +#endif +#ifdef XK_vertconnector +xK_vertconnector :: KeySym +xK_vertconnector = #const XK_vertconnector +#endif +#ifdef XK_topleftsqbracket +xK_topleftsqbracket :: KeySym +xK_topleftsqbracket = #const XK_topleftsqbracket +#endif +#ifdef XK_botleftsqbracket +xK_botleftsqbracket :: KeySym +xK_botleftsqbracket = #const XK_botleftsqbracket +#endif +#ifdef XK_toprightsqbracket +xK_toprightsqbracket :: KeySym +xK_toprightsqbracket = #const XK_toprightsqbracket +#endif +#ifdef XK_botrightsqbracket +xK_botrightsqbracket :: KeySym +xK_botrightsqbracket = #const XK_botrightsqbracket +#endif +#ifdef XK_topleftparens +xK_topleftparens :: KeySym +xK_topleftparens = #const XK_topleftparens +#endif +#ifdef XK_botleftparens +xK_botleftparens :: KeySym +xK_botleftparens = #const XK_botleftparens +#endif +#ifdef XK_toprightparens +xK_toprightparens :: KeySym +xK_toprightparens = #const XK_toprightparens +#endif +#ifdef XK_botrightparens +xK_botrightparens :: KeySym +xK_botrightparens = #const XK_botrightparens +#endif +#ifdef XK_leftmiddlecurlybrace +xK_leftmiddlecurlybrace :: KeySym +xK_leftmiddlecurlybrace = #const XK_leftmiddlecurlybrace +#endif +#ifdef XK_rightmiddlecurlybrace +xK_rightmiddlecurlybrace :: KeySym +xK_rightmiddlecurlybrace = #const XK_rightmiddlecurlybrace +#endif +#ifdef XK_topleftsummation +xK_topleftsummation :: KeySym +xK_topleftsummation = #const XK_topleftsummation +#endif +#ifdef XK_botleftsummation +xK_botleftsummation :: KeySym +xK_botleftsummation = #const XK_botleftsummation +#endif +#ifdef XK_topvertsummationconnector +xK_topvertsummationconnector :: KeySym +xK_topvertsummationconnector = #const XK_topvertsummationconnector +#endif +#ifdef XK_botvertsummationconnector +xK_botvertsummationconnector :: KeySym +xK_botvertsummationconnector = #const XK_botvertsummationconnector +#endif +#ifdef XK_toprightsummation +xK_toprightsummation :: KeySym +xK_toprightsummation = #const XK_toprightsummation +#endif +#ifdef XK_botrightsummation +xK_botrightsummation :: KeySym +xK_botrightsummation = #const XK_botrightsummation +#endif +#ifdef XK_rightmiddlesummation +xK_rightmiddlesummation :: KeySym +xK_rightmiddlesummation = #const XK_rightmiddlesummation +#endif +#ifdef XK_lessthanequal +xK_lessthanequal :: KeySym +xK_lessthanequal = #const XK_lessthanequal +#endif +#ifdef XK_notequal +xK_notequal :: KeySym +xK_notequal = #const XK_notequal +#endif +#ifdef XK_greaterthanequal +xK_greaterthanequal :: KeySym +xK_greaterthanequal = #const XK_greaterthanequal +#endif +#ifdef XK_integral +xK_integral :: KeySym +xK_integral = #const XK_integral +#endif +#ifdef XK_therefore +xK_therefore :: KeySym +xK_therefore = #const XK_therefore +#endif +#ifdef XK_variation +xK_variation :: KeySym +xK_variation = #const XK_variation +#endif +#ifdef XK_infinity +xK_infinity :: KeySym +xK_infinity = #const XK_infinity +#endif +#ifdef XK_nabla +xK_nabla :: KeySym +xK_nabla = #const XK_nabla +#endif +#ifdef XK_approximate +xK_approximate :: KeySym +xK_approximate = #const XK_approximate +#endif +#ifdef XK_similarequal +xK_similarequal :: KeySym +xK_similarequal = #const XK_similarequal +#endif +#ifdef XK_ifonlyif +xK_ifonlyif :: KeySym +xK_ifonlyif = #const XK_ifonlyif +#endif +#ifdef XK_implies +xK_implies :: KeySym +xK_implies = #const XK_implies +#endif +#ifdef XK_identical +xK_identical :: KeySym +xK_identical = #const XK_identical +#endif +#ifdef XK_radical +xK_radical :: KeySym +xK_radical = #const XK_radical +#endif +#ifdef XK_includedin +xK_includedin :: KeySym +xK_includedin = #const XK_includedin +#endif +#ifdef XK_includes +xK_includes :: KeySym +xK_includes = #const XK_includes +#endif +#ifdef XK_intersection +xK_intersection :: KeySym +xK_intersection = #const XK_intersection +#endif +#ifdef XK_union +xK_union :: KeySym +xK_union = #const XK_union +#endif +#ifdef XK_logicaland +xK_logicaland :: KeySym +xK_logicaland = #const XK_logicaland +#endif +#ifdef XK_logicalor +xK_logicalor :: KeySym +xK_logicalor = #const XK_logicalor +#endif +#ifdef XK_partialderivative +xK_partialderivative :: KeySym +xK_partialderivative = #const XK_partialderivative +#endif +#ifdef XK_function +xK_function :: KeySym +xK_function = #const XK_function +#endif +#ifdef XK_leftarrow +xK_leftarrow :: KeySym +xK_leftarrow = #const XK_leftarrow +#endif +#ifdef XK_uparrow +xK_uparrow :: KeySym +xK_uparrow = #const XK_uparrow +#endif +#ifdef XK_rightarrow +xK_rightarrow :: KeySym +xK_rightarrow = #const XK_rightarrow +#endif +#ifdef XK_downarrow +xK_downarrow :: KeySym +xK_downarrow = #const XK_downarrow +#endif + +-- XK_SPECIAL +#ifdef XK_blank +xK_blank :: KeySym +xK_blank = #const XK_blank +#endif +#ifdef XK_soliddiamond +xK_soliddiamond :: KeySym +xK_soliddiamond = #const XK_soliddiamond +#endif +#ifdef XK_checkerboard +xK_checkerboard :: KeySym +xK_checkerboard = #const XK_checkerboard +#endif +#ifdef XK_ht +xK_ht :: KeySym +xK_ht = #const XK_ht +#endif +#ifdef XK_ff +xK_ff :: KeySym +xK_ff = #const XK_ff +#endif +#ifdef XK_cr +xK_cr :: KeySym +xK_cr = #const XK_cr +#endif +#ifdef XK_lf +xK_lf :: KeySym +xK_lf = #const XK_lf +#endif +#ifdef XK_nl +xK_nl :: KeySym +xK_nl = #const XK_nl +#endif +#ifdef XK_vt +xK_vt :: KeySym +xK_vt = #const XK_vt +#endif +#ifdef XK_lowrightcorner +xK_lowrightcorner :: KeySym +xK_lowrightcorner = #const XK_lowrightcorner +#endif +#ifdef XK_uprightcorner +xK_uprightcorner :: KeySym +xK_uprightcorner = #const XK_uprightcorner +#endif +#ifdef XK_upleftcorner +xK_upleftcorner :: KeySym +xK_upleftcorner = #const XK_upleftcorner +#endif +#ifdef XK_lowleftcorner +xK_lowleftcorner :: KeySym +xK_lowleftcorner = #const XK_lowleftcorner +#endif +#ifdef XK_crossinglines +xK_crossinglines :: KeySym +xK_crossinglines = #const XK_crossinglines +#endif +#ifdef XK_horizlinescan1 +xK_horizlinescan1 :: KeySym +xK_horizlinescan1 = #const XK_horizlinescan1 +#endif +#ifdef XK_horizlinescan3 +xK_horizlinescan3 :: KeySym +xK_horizlinescan3 = #const XK_horizlinescan3 +#endif +#ifdef XK_horizlinescan5 +xK_horizlinescan5 :: KeySym +xK_horizlinescan5 = #const XK_horizlinescan5 +#endif +#ifdef XK_horizlinescan7 +xK_horizlinescan7 :: KeySym +xK_horizlinescan7 = #const XK_horizlinescan7 +#endif +#ifdef XK_horizlinescan9 +xK_horizlinescan9 :: KeySym +xK_horizlinescan9 = #const XK_horizlinescan9 +#endif +#ifdef XK_leftt +xK_leftt :: KeySym +xK_leftt = #const XK_leftt +#endif +#ifdef XK_rightt +xK_rightt :: KeySym +xK_rightt = #const XK_rightt +#endif +#ifdef XK_bott +xK_bott :: KeySym +xK_bott = #const XK_bott +#endif +#ifdef XK_topt +xK_topt :: KeySym +xK_topt = #const XK_topt +#endif +#ifdef XK_vertbar +xK_vertbar :: KeySym +xK_vertbar = #const XK_vertbar +#endif + +-- XK_PUBLISHING +#ifdef XK_emspace +xK_emspace :: KeySym +xK_emspace = #const XK_emspace +#endif +#ifdef XK_enspace +xK_enspace :: KeySym +xK_enspace = #const XK_enspace +#endif +#ifdef XK_em3space +xK_em3space :: KeySym +xK_em3space = #const XK_em3space +#endif +#ifdef XK_em4space +xK_em4space :: KeySym +xK_em4space = #const XK_em4space +#endif +#ifdef XK_digitspace +xK_digitspace :: KeySym +xK_digitspace = #const XK_digitspace +#endif +#ifdef XK_punctspace +xK_punctspace :: KeySym +xK_punctspace = #const XK_punctspace +#endif +#ifdef XK_thinspace +xK_thinspace :: KeySym +xK_thinspace = #const XK_thinspace +#endif +#ifdef XK_hairspace +xK_hairspace :: KeySym +xK_hairspace = #const XK_hairspace +#endif +#ifdef XK_emdash +xK_emdash :: KeySym +xK_emdash = #const XK_emdash +#endif +#ifdef XK_endash +xK_endash :: KeySym +xK_endash = #const XK_endash +#endif +#ifdef XK_signifblank +xK_signifblank :: KeySym +xK_signifblank = #const XK_signifblank +#endif +#ifdef XK_ellipsis +xK_ellipsis :: KeySym +xK_ellipsis = #const XK_ellipsis +#endif +#ifdef XK_doubbaselinedot +xK_doubbaselinedot :: KeySym +xK_doubbaselinedot = #const XK_doubbaselinedot +#endif +#ifdef XK_onethird +xK_onethird :: KeySym +xK_onethird = #const XK_onethird +#endif +#ifdef XK_twothirds +xK_twothirds :: KeySym +xK_twothirds = #const XK_twothirds +#endif +#ifdef XK_onefifth +xK_onefifth :: KeySym +xK_onefifth = #const XK_onefifth +#endif +#ifdef XK_twofifths +xK_twofifths :: KeySym +xK_twofifths = #const XK_twofifths +#endif +#ifdef XK_threefifths +xK_threefifths :: KeySym +xK_threefifths = #const XK_threefifths +#endif +#ifdef XK_fourfifths +xK_fourfifths :: KeySym +xK_fourfifths = #const XK_fourfifths +#endif +#ifdef XK_onesixth +xK_onesixth :: KeySym +xK_onesixth = #const XK_onesixth +#endif +#ifdef XK_fivesixths +xK_fivesixths :: KeySym +xK_fivesixths = #const XK_fivesixths +#endif +#ifdef XK_careof +xK_careof :: KeySym +xK_careof = #const XK_careof +#endif +#ifdef XK_figdash +xK_figdash :: KeySym +xK_figdash = #const XK_figdash +#endif +#ifdef XK_leftanglebracket +xK_leftanglebracket :: KeySym +xK_leftanglebracket = #const XK_leftanglebracket +#endif +#ifdef XK_decimalpoint +xK_decimalpoint :: KeySym +xK_decimalpoint = #const XK_decimalpoint +#endif +#ifdef XK_rightanglebracket +xK_rightanglebracket :: KeySym +xK_rightanglebracket = #const XK_rightanglebracket +#endif +#ifdef XK_marker +xK_marker :: KeySym +xK_marker = #const XK_marker +#endif +#ifdef XK_oneeighth +xK_oneeighth :: KeySym +xK_oneeighth = #const XK_oneeighth +#endif +#ifdef XK_threeeighths +xK_threeeighths :: KeySym +xK_threeeighths = #const XK_threeeighths +#endif +#ifdef XK_fiveeighths +xK_fiveeighths :: KeySym +xK_fiveeighths = #const XK_fiveeighths +#endif +#ifdef XK_seveneighths +xK_seveneighths :: KeySym +xK_seveneighths = #const XK_seveneighths +#endif +#ifdef XK_trademark +xK_trademark :: KeySym +xK_trademark = #const XK_trademark +#endif +#ifdef XK_signaturemark +xK_signaturemark :: KeySym +xK_signaturemark = #const XK_signaturemark +#endif +#ifdef XK_trademarkincircle +xK_trademarkincircle :: KeySym +xK_trademarkincircle = #const XK_trademarkincircle +#endif +#ifdef XK_leftopentriangle +xK_leftopentriangle :: KeySym +xK_leftopentriangle = #const XK_leftopentriangle +#endif +#ifdef XK_rightopentriangle +xK_rightopentriangle :: KeySym +xK_rightopentriangle = #const XK_rightopentriangle +#endif +#ifdef XK_emopencircle +xK_emopencircle :: KeySym +xK_emopencircle = #const XK_emopencircle +#endif +#ifdef XK_emopenrectangle +xK_emopenrectangle :: KeySym +xK_emopenrectangle = #const XK_emopenrectangle +#endif +#ifdef XK_leftsinglequotemark +xK_leftsinglequotemark :: KeySym +xK_leftsinglequotemark = #const XK_leftsinglequotemark +#endif +#ifdef XK_rightsinglequotemark +xK_rightsinglequotemark :: KeySym +xK_rightsinglequotemark = #const XK_rightsinglequotemark +#endif +#ifdef XK_leftdoublequotemark +xK_leftdoublequotemark :: KeySym +xK_leftdoublequotemark = #const XK_leftdoublequotemark +#endif +#ifdef XK_rightdoublequotemark +xK_rightdoublequotemark :: KeySym +xK_rightdoublequotemark = #const XK_rightdoublequotemark +#endif +#ifdef XK_prescription +xK_prescription :: KeySym +xK_prescription = #const XK_prescription +#endif +#ifdef XK_minutes +xK_minutes :: KeySym +xK_minutes = #const XK_minutes +#endif +#ifdef XK_seconds +xK_seconds :: KeySym +xK_seconds = #const XK_seconds +#endif +#ifdef XK_latincross +xK_latincross :: KeySym +xK_latincross = #const XK_latincross +#endif +#ifdef XK_hexagram +xK_hexagram :: KeySym +xK_hexagram = #const XK_hexagram +#endif +#ifdef XK_filledrectbullet +xK_filledrectbullet :: KeySym +xK_filledrectbullet = #const XK_filledrectbullet +#endif +#ifdef XK_filledlefttribullet +xK_filledlefttribullet :: KeySym +xK_filledlefttribullet = #const XK_filledlefttribullet +#endif +#ifdef XK_filledrighttribullet +xK_filledrighttribullet :: KeySym +xK_filledrighttribullet = #const XK_filledrighttribullet +#endif +#ifdef XK_emfilledcircle +xK_emfilledcircle :: KeySym +xK_emfilledcircle = #const XK_emfilledcircle +#endif +#ifdef XK_emfilledrect +xK_emfilledrect :: KeySym +xK_emfilledrect = #const XK_emfilledrect +#endif +#ifdef XK_enopencircbullet +xK_enopencircbullet :: KeySym +xK_enopencircbullet = #const XK_enopencircbullet +#endif +#ifdef XK_enopensquarebullet +xK_enopensquarebullet :: KeySym +xK_enopensquarebullet = #const XK_enopensquarebullet +#endif +#ifdef XK_openrectbullet +xK_openrectbullet :: KeySym +xK_openrectbullet = #const XK_openrectbullet +#endif +#ifdef XK_opentribulletup +xK_opentribulletup :: KeySym +xK_opentribulletup = #const XK_opentribulletup +#endif +#ifdef XK_opentribulletdown +xK_opentribulletdown :: KeySym +xK_opentribulletdown = #const XK_opentribulletdown +#endif +#ifdef XK_openstar +xK_openstar :: KeySym +xK_openstar = #const XK_openstar +#endif +#ifdef XK_enfilledcircbullet +xK_enfilledcircbullet :: KeySym +xK_enfilledcircbullet = #const XK_enfilledcircbullet +#endif +#ifdef XK_enfilledsqbullet +xK_enfilledsqbullet :: KeySym +xK_enfilledsqbullet = #const XK_enfilledsqbullet +#endif +#ifdef XK_filledtribulletup +xK_filledtribulletup :: KeySym +xK_filledtribulletup = #const XK_filledtribulletup +#endif +#ifdef XK_filledtribulletdown +xK_filledtribulletdown :: KeySym +xK_filledtribulletdown = #const XK_filledtribulletdown +#endif +#ifdef XK_leftpointer +xK_leftpointer :: KeySym +xK_leftpointer = #const XK_leftpointer +#endif +#ifdef XK_rightpointer +xK_rightpointer :: KeySym +xK_rightpointer = #const XK_rightpointer +#endif +#ifdef XK_club +xK_club :: KeySym +xK_club = #const XK_club +#endif +#ifdef XK_diamond +xK_diamond :: KeySym +xK_diamond = #const XK_diamond +#endif +#ifdef XK_heart +xK_heart :: KeySym +xK_heart = #const XK_heart +#endif +#ifdef XK_maltesecross +xK_maltesecross :: KeySym +xK_maltesecross = #const XK_maltesecross +#endif +#ifdef XK_dagger +xK_dagger :: KeySym +xK_dagger = #const XK_dagger +#endif +#ifdef XK_doubledagger +xK_doubledagger :: KeySym +xK_doubledagger = #const XK_doubledagger +#endif +#ifdef XK_checkmark +xK_checkmark :: KeySym +xK_checkmark = #const XK_checkmark +#endif +#ifdef XK_ballotcross +xK_ballotcross :: KeySym +xK_ballotcross = #const XK_ballotcross +#endif +#ifdef XK_musicalsharp +xK_musicalsharp :: KeySym +xK_musicalsharp = #const XK_musicalsharp +#endif +#ifdef XK_musicalflat +xK_musicalflat :: KeySym +xK_musicalflat = #const XK_musicalflat +#endif +#ifdef XK_malesymbol +xK_malesymbol :: KeySym +xK_malesymbol = #const XK_malesymbol +#endif +#ifdef XK_femalesymbol +xK_femalesymbol :: KeySym +xK_femalesymbol = #const XK_femalesymbol +#endif +#ifdef XK_telephone +xK_telephone :: KeySym +xK_telephone = #const XK_telephone +#endif +#ifdef XK_telephonerecorder +xK_telephonerecorder :: KeySym +xK_telephonerecorder = #const XK_telephonerecorder +#endif +#ifdef XK_phonographcopyright +xK_phonographcopyright :: KeySym +xK_phonographcopyright = #const XK_phonographcopyright +#endif +#ifdef XK_caret +xK_caret :: KeySym +xK_caret = #const XK_caret +#endif +#ifdef XK_singlelowquotemark +xK_singlelowquotemark :: KeySym +xK_singlelowquotemark = #const XK_singlelowquotemark +#endif +#ifdef XK_doublelowquotemark +xK_doublelowquotemark :: KeySym +xK_doublelowquotemark = #const XK_doublelowquotemark +#endif +#ifdef XK_cursor +xK_cursor :: KeySym +xK_cursor = #const XK_cursor +#endif + +-- XK_APL +#ifdef XK_leftcaret +xK_leftcaret :: KeySym +xK_leftcaret = #const XK_leftcaret +#endif +#ifdef XK_rightcaret +xK_rightcaret :: KeySym +xK_rightcaret = #const XK_rightcaret +#endif +#ifdef XK_downcaret +xK_downcaret :: KeySym +xK_downcaret = #const XK_downcaret +#endif +#ifdef XK_upcaret +xK_upcaret :: KeySym +xK_upcaret = #const XK_upcaret +#endif +#ifdef XK_overbar +xK_overbar :: KeySym +xK_overbar = #const XK_overbar +#endif +#ifdef XK_downtack +xK_downtack :: KeySym +xK_downtack = #const XK_downtack +#endif +#ifdef XK_upshoe +xK_upshoe :: KeySym +xK_upshoe = #const XK_upshoe +#endif +#ifdef XK_downstile +xK_downstile :: KeySym +xK_downstile = #const XK_downstile +#endif +#ifdef XK_underbar +xK_underbar :: KeySym +xK_underbar = #const XK_underbar +#endif +#ifdef XK_jot +xK_jot :: KeySym +xK_jot = #const XK_jot +#endif +#ifdef XK_quad +xK_quad :: KeySym +xK_quad = #const XK_quad +#endif +#ifdef XK_uptack +xK_uptack :: KeySym +xK_uptack = #const XK_uptack +#endif +#ifdef XK_circle +xK_circle :: KeySym +xK_circle = #const XK_circle +#endif +#ifdef XK_upstile +xK_upstile :: KeySym +xK_upstile = #const XK_upstile +#endif +#ifdef XK_downshoe +xK_downshoe :: KeySym +xK_downshoe = #const XK_downshoe +#endif +#ifdef XK_rightshoe +xK_rightshoe :: KeySym +xK_rightshoe = #const XK_rightshoe +#endif +#ifdef XK_leftshoe +xK_leftshoe :: KeySym +xK_leftshoe = #const XK_leftshoe +#endif +#ifdef XK_lefttack +xK_lefttack :: KeySym +xK_lefttack = #const XK_lefttack +#endif +#ifdef XK_righttack +xK_righttack :: KeySym +xK_righttack = #const XK_righttack +#endif + +-- XK_HEBREW +#ifdef XK_hebrew_doublelowline +xK_hebrew_doublelowline :: KeySym +xK_hebrew_doublelowline = #const XK_hebrew_doublelowline +#endif +#ifdef XK_hebrew_aleph +xK_hebrew_aleph :: KeySym +xK_hebrew_aleph = #const XK_hebrew_aleph +#endif +#ifdef XK_hebrew_bet +xK_hebrew_bet :: KeySym +xK_hebrew_bet = #const XK_hebrew_bet +#endif +#ifdef XK_hebrew_beth +xK_hebrew_beth :: KeySym +xK_hebrew_beth = #const XK_hebrew_beth +#endif +#ifdef XK_hebrew_gimel +xK_hebrew_gimel :: KeySym +xK_hebrew_gimel = #const XK_hebrew_gimel +#endif +#ifdef XK_hebrew_gimmel +xK_hebrew_gimmel :: KeySym +xK_hebrew_gimmel = #const XK_hebrew_gimmel +#endif +#ifdef XK_hebrew_dalet +xK_hebrew_dalet :: KeySym +xK_hebrew_dalet = #const XK_hebrew_dalet +#endif +#ifdef XK_hebrew_daleth +xK_hebrew_daleth :: KeySym +xK_hebrew_daleth = #const XK_hebrew_daleth +#endif +#ifdef XK_hebrew_he +xK_hebrew_he :: KeySym +xK_hebrew_he = #const XK_hebrew_he +#endif +#ifdef XK_hebrew_waw +xK_hebrew_waw :: KeySym +xK_hebrew_waw = #const XK_hebrew_waw +#endif +#ifdef XK_hebrew_zain +xK_hebrew_zain :: KeySym +xK_hebrew_zain = #const XK_hebrew_zain +#endif +#ifdef XK_hebrew_zayin +xK_hebrew_zayin :: KeySym +xK_hebrew_zayin = #const XK_hebrew_zayin +#endif +#ifdef XK_hebrew_chet +xK_hebrew_chet :: KeySym +xK_hebrew_chet = #const XK_hebrew_chet +#endif +#ifdef XK_hebrew_het +xK_hebrew_het :: KeySym +xK_hebrew_het = #const XK_hebrew_het +#endif +#ifdef XK_hebrew_tet +xK_hebrew_tet :: KeySym +xK_hebrew_tet = #const XK_hebrew_tet +#endif +#ifdef XK_hebrew_teth +xK_hebrew_teth :: KeySym +xK_hebrew_teth = #const XK_hebrew_teth +#endif +#ifdef XK_hebrew_yod +xK_hebrew_yod :: KeySym +xK_hebrew_yod = #const XK_hebrew_yod +#endif +#ifdef XK_hebrew_finalkaph +xK_hebrew_finalkaph :: KeySym +xK_hebrew_finalkaph = #const XK_hebrew_finalkaph +#endif +#ifdef XK_hebrew_kaph +xK_hebrew_kaph :: KeySym +xK_hebrew_kaph = #const XK_hebrew_kaph +#endif +#ifdef XK_hebrew_lamed +xK_hebrew_lamed :: KeySym +xK_hebrew_lamed = #const XK_hebrew_lamed +#endif +#ifdef XK_hebrew_finalmem +xK_hebrew_finalmem :: KeySym +xK_hebrew_finalmem = #const XK_hebrew_finalmem +#endif +#ifdef XK_hebrew_mem +xK_hebrew_mem :: KeySym +xK_hebrew_mem = #const XK_hebrew_mem +#endif +#ifdef XK_hebrew_finalnun +xK_hebrew_finalnun :: KeySym +xK_hebrew_finalnun = #const XK_hebrew_finalnun +#endif +#ifdef XK_hebrew_nun +xK_hebrew_nun :: KeySym +xK_hebrew_nun = #const XK_hebrew_nun +#endif +#ifdef XK_hebrew_samech +xK_hebrew_samech :: KeySym +xK_hebrew_samech = #const XK_hebrew_samech +#endif +#ifdef XK_hebrew_samekh +xK_hebrew_samekh :: KeySym +xK_hebrew_samekh = #const XK_hebrew_samekh +#endif +#ifdef XK_hebrew_ayin +xK_hebrew_ayin :: KeySym +xK_hebrew_ayin = #const XK_hebrew_ayin +#endif +#ifdef XK_hebrew_finalpe +xK_hebrew_finalpe :: KeySym +xK_hebrew_finalpe = #const XK_hebrew_finalpe +#endif +#ifdef XK_hebrew_pe +xK_hebrew_pe :: KeySym +xK_hebrew_pe = #const XK_hebrew_pe +#endif +#ifdef XK_hebrew_finalzade +xK_hebrew_finalzade :: KeySym +xK_hebrew_finalzade = #const XK_hebrew_finalzade +#endif +#ifdef XK_hebrew_finalzadi +xK_hebrew_finalzadi :: KeySym +xK_hebrew_finalzadi = #const XK_hebrew_finalzadi +#endif +#ifdef XK_hebrew_zade +xK_hebrew_zade :: KeySym +xK_hebrew_zade = #const XK_hebrew_zade +#endif +#ifdef XK_hebrew_zadi +xK_hebrew_zadi :: KeySym +xK_hebrew_zadi = #const XK_hebrew_zadi +#endif +#ifdef XK_hebrew_qoph +xK_hebrew_qoph :: KeySym +xK_hebrew_qoph = #const XK_hebrew_qoph +#endif +#ifdef XK_hebrew_kuf +xK_hebrew_kuf :: KeySym +xK_hebrew_kuf = #const XK_hebrew_kuf +#endif +#ifdef XK_hebrew_resh +xK_hebrew_resh :: KeySym +xK_hebrew_resh = #const XK_hebrew_resh +#endif +#ifdef XK_hebrew_shin +xK_hebrew_shin :: KeySym +xK_hebrew_shin = #const XK_hebrew_shin +#endif +#ifdef XK_hebrew_taw +xK_hebrew_taw :: KeySym +xK_hebrew_taw = #const XK_hebrew_taw +#endif +#ifdef XK_hebrew_taf +xK_hebrew_taf :: KeySym +xK_hebrew_taf = #const XK_hebrew_taf +#endif +#ifdef XK_Hebrew_switch +xK_Hebrew_switch :: KeySym +xK_Hebrew_switch = #const XK_Hebrew_switch +#endif + +-- XK_THAI +#ifdef XK_Thai_kokai +xK_Thai_kokai :: KeySym +xK_Thai_kokai = #const XK_Thai_kokai +#endif +#ifdef XK_Thai_khokhai +xK_Thai_khokhai :: KeySym +xK_Thai_khokhai = #const XK_Thai_khokhai +#endif +#ifdef XK_Thai_khokhuat +xK_Thai_khokhuat :: KeySym +xK_Thai_khokhuat = #const XK_Thai_khokhuat +#endif +#ifdef XK_Thai_khokhwai +xK_Thai_khokhwai :: KeySym +xK_Thai_khokhwai = #const XK_Thai_khokhwai +#endif +#ifdef XK_Thai_khokhon +xK_Thai_khokhon :: KeySym +xK_Thai_khokhon = #const XK_Thai_khokhon +#endif +#ifdef XK_Thai_khorakhang +xK_Thai_khorakhang :: KeySym +xK_Thai_khorakhang = #const XK_Thai_khorakhang +#endif +#ifdef XK_Thai_ngongu +xK_Thai_ngongu :: KeySym +xK_Thai_ngongu = #const XK_Thai_ngongu +#endif +#ifdef XK_Thai_chochan +xK_Thai_chochan :: KeySym +xK_Thai_chochan = #const XK_Thai_chochan +#endif +#ifdef XK_Thai_choching +xK_Thai_choching :: KeySym +xK_Thai_choching = #const XK_Thai_choching +#endif +#ifdef XK_Thai_chochang +xK_Thai_chochang :: KeySym +xK_Thai_chochang = #const XK_Thai_chochang +#endif +#ifdef XK_Thai_soso +xK_Thai_soso :: KeySym +xK_Thai_soso = #const XK_Thai_soso +#endif +#ifdef XK_Thai_chochoe +xK_Thai_chochoe :: KeySym +xK_Thai_chochoe = #const XK_Thai_chochoe +#endif +#ifdef XK_Thai_yoying +xK_Thai_yoying :: KeySym +xK_Thai_yoying = #const XK_Thai_yoying +#endif +#ifdef XK_Thai_dochada +xK_Thai_dochada :: KeySym +xK_Thai_dochada = #const XK_Thai_dochada +#endif +#ifdef XK_Thai_topatak +xK_Thai_topatak :: KeySym +xK_Thai_topatak = #const XK_Thai_topatak +#endif +#ifdef XK_Thai_thothan +xK_Thai_thothan :: KeySym +xK_Thai_thothan = #const XK_Thai_thothan +#endif +#ifdef XK_Thai_thonangmontho +xK_Thai_thonangmontho :: KeySym +xK_Thai_thonangmontho = #const XK_Thai_thonangmontho +#endif +#ifdef XK_Thai_thophuthao +xK_Thai_thophuthao :: KeySym +xK_Thai_thophuthao = #const XK_Thai_thophuthao +#endif +#ifdef XK_Thai_nonen +xK_Thai_nonen :: KeySym +xK_Thai_nonen = #const XK_Thai_nonen +#endif +#ifdef XK_Thai_dodek +xK_Thai_dodek :: KeySym +xK_Thai_dodek = #const XK_Thai_dodek +#endif +#ifdef XK_Thai_totao +xK_Thai_totao :: KeySym +xK_Thai_totao = #const XK_Thai_totao +#endif +#ifdef XK_Thai_thothung +xK_Thai_thothung :: KeySym +xK_Thai_thothung = #const XK_Thai_thothung +#endif +#ifdef XK_Thai_thothahan +xK_Thai_thothahan :: KeySym +xK_Thai_thothahan = #const XK_Thai_thothahan +#endif +#ifdef XK_Thai_thothong +xK_Thai_thothong :: KeySym +xK_Thai_thothong = #const XK_Thai_thothong +#endif +#ifdef XK_Thai_nonu +xK_Thai_nonu :: KeySym +xK_Thai_nonu = #const XK_Thai_nonu +#endif +#ifdef XK_Thai_bobaimai +xK_Thai_bobaimai :: KeySym +xK_Thai_bobaimai = #const XK_Thai_bobaimai +#endif +#ifdef XK_Thai_popla +xK_Thai_popla :: KeySym +xK_Thai_popla = #const XK_Thai_popla +#endif +#ifdef XK_Thai_phophung +xK_Thai_phophung :: KeySym +xK_Thai_phophung = #const XK_Thai_phophung +#endif +#ifdef XK_Thai_fofa +xK_Thai_fofa :: KeySym +xK_Thai_fofa = #const XK_Thai_fofa +#endif +#ifdef XK_Thai_phophan +xK_Thai_phophan :: KeySym +xK_Thai_phophan = #const XK_Thai_phophan +#endif +#ifdef XK_Thai_fofan +xK_Thai_fofan :: KeySym +xK_Thai_fofan = #const XK_Thai_fofan +#endif +#ifdef XK_Thai_phosamphao +xK_Thai_phosamphao :: KeySym +xK_Thai_phosamphao = #const XK_Thai_phosamphao +#endif +#ifdef XK_Thai_moma +xK_Thai_moma :: KeySym +xK_Thai_moma = #const XK_Thai_moma +#endif +#ifdef XK_Thai_yoyak +xK_Thai_yoyak :: KeySym +xK_Thai_yoyak = #const XK_Thai_yoyak +#endif +#ifdef XK_Thai_rorua +xK_Thai_rorua :: KeySym +xK_Thai_rorua = #const XK_Thai_rorua +#endif +#ifdef XK_Thai_ru +xK_Thai_ru :: KeySym +xK_Thai_ru = #const XK_Thai_ru +#endif +#ifdef XK_Thai_loling +xK_Thai_loling :: KeySym +xK_Thai_loling = #const XK_Thai_loling +#endif +#ifdef XK_Thai_lu +xK_Thai_lu :: KeySym +xK_Thai_lu = #const XK_Thai_lu +#endif +#ifdef XK_Thai_wowaen +xK_Thai_wowaen :: KeySym +xK_Thai_wowaen = #const XK_Thai_wowaen +#endif +#ifdef XK_Thai_sosala +xK_Thai_sosala :: KeySym +xK_Thai_sosala = #const XK_Thai_sosala +#endif +#ifdef XK_Thai_sorusi +xK_Thai_sorusi :: KeySym +xK_Thai_sorusi = #const XK_Thai_sorusi +#endif +#ifdef XK_Thai_sosua +xK_Thai_sosua :: KeySym +xK_Thai_sosua = #const XK_Thai_sosua +#endif +#ifdef XK_Thai_hohip +xK_Thai_hohip :: KeySym +xK_Thai_hohip = #const XK_Thai_hohip +#endif +#ifdef XK_Thai_lochula +xK_Thai_lochula :: KeySym +xK_Thai_lochula = #const XK_Thai_lochula +#endif +#ifdef XK_Thai_oang +xK_Thai_oang :: KeySym +xK_Thai_oang = #const XK_Thai_oang +#endif +#ifdef XK_Thai_honokhuk +xK_Thai_honokhuk :: KeySym +xK_Thai_honokhuk = #const XK_Thai_honokhuk +#endif +#ifdef XK_Thai_paiyannoi +xK_Thai_paiyannoi :: KeySym +xK_Thai_paiyannoi = #const XK_Thai_paiyannoi +#endif +#ifdef XK_Thai_saraa +xK_Thai_saraa :: KeySym +xK_Thai_saraa = #const XK_Thai_saraa +#endif +#ifdef XK_Thai_maihanakat +xK_Thai_maihanakat :: KeySym +xK_Thai_maihanakat = #const XK_Thai_maihanakat +#endif +#ifdef XK_Thai_saraaa +xK_Thai_saraaa :: KeySym +xK_Thai_saraaa = #const XK_Thai_saraaa +#endif +#ifdef XK_Thai_saraam +xK_Thai_saraam :: KeySym +xK_Thai_saraam = #const XK_Thai_saraam +#endif +#ifdef XK_Thai_sarai +xK_Thai_sarai :: KeySym +xK_Thai_sarai = #const XK_Thai_sarai +#endif +#ifdef XK_Thai_saraii +xK_Thai_saraii :: KeySym +xK_Thai_saraii = #const XK_Thai_saraii +#endif +#ifdef XK_Thai_saraue +xK_Thai_saraue :: KeySym +xK_Thai_saraue = #const XK_Thai_saraue +#endif +#ifdef XK_Thai_sarauee +xK_Thai_sarauee :: KeySym +xK_Thai_sarauee = #const XK_Thai_sarauee +#endif +#ifdef XK_Thai_sarau +xK_Thai_sarau :: KeySym +xK_Thai_sarau = #const XK_Thai_sarau +#endif +#ifdef XK_Thai_sarauu +xK_Thai_sarauu :: KeySym +xK_Thai_sarauu = #const XK_Thai_sarauu +#endif +#ifdef XK_Thai_phinthu +xK_Thai_phinthu :: KeySym +xK_Thai_phinthu = #const XK_Thai_phinthu +#endif +#ifdef XK_Thai_maihanakat_maitho +xK_Thai_maihanakat_maitho :: KeySym +xK_Thai_maihanakat_maitho = #const XK_Thai_maihanakat_maitho +#endif +#ifdef XK_Thai_baht +xK_Thai_baht :: KeySym +xK_Thai_baht = #const XK_Thai_baht +#endif +#ifdef XK_Thai_sarae +xK_Thai_sarae :: KeySym +xK_Thai_sarae = #const XK_Thai_sarae +#endif +#ifdef XK_Thai_saraae +xK_Thai_saraae :: KeySym +xK_Thai_saraae = #const XK_Thai_saraae +#endif +#ifdef XK_Thai_sarao +xK_Thai_sarao :: KeySym +xK_Thai_sarao = #const XK_Thai_sarao +#endif +#ifdef XK_Thai_saraaimaimuan +xK_Thai_saraaimaimuan :: KeySym +xK_Thai_saraaimaimuan = #const XK_Thai_saraaimaimuan +#endif +#ifdef XK_Thai_saraaimaimalai +xK_Thai_saraaimaimalai :: KeySym +xK_Thai_saraaimaimalai = #const XK_Thai_saraaimaimalai +#endif +#ifdef XK_Thai_lakkhangyao +xK_Thai_lakkhangyao :: KeySym +xK_Thai_lakkhangyao = #const XK_Thai_lakkhangyao +#endif +#ifdef XK_Thai_maiyamok +xK_Thai_maiyamok :: KeySym +xK_Thai_maiyamok = #const XK_Thai_maiyamok +#endif +#ifdef XK_Thai_maitaikhu +xK_Thai_maitaikhu :: KeySym +xK_Thai_maitaikhu = #const XK_Thai_maitaikhu +#endif +#ifdef XK_Thai_maiek +xK_Thai_maiek :: KeySym +xK_Thai_maiek = #const XK_Thai_maiek +#endif +#ifdef XK_Thai_maitho +xK_Thai_maitho :: KeySym +xK_Thai_maitho = #const XK_Thai_maitho +#endif +#ifdef XK_Thai_maitri +xK_Thai_maitri :: KeySym +xK_Thai_maitri = #const XK_Thai_maitri +#endif +#ifdef XK_Thai_maichattawa +xK_Thai_maichattawa :: KeySym +xK_Thai_maichattawa = #const XK_Thai_maichattawa +#endif +#ifdef XK_Thai_thanthakhat +xK_Thai_thanthakhat :: KeySym +xK_Thai_thanthakhat = #const XK_Thai_thanthakhat +#endif +#ifdef XK_Thai_nikhahit +xK_Thai_nikhahit :: KeySym +xK_Thai_nikhahit = #const XK_Thai_nikhahit +#endif +#ifdef XK_Thai_leksun +xK_Thai_leksun :: KeySym +xK_Thai_leksun = #const XK_Thai_leksun +#endif +#ifdef XK_Thai_leknung +xK_Thai_leknung :: KeySym +xK_Thai_leknung = #const XK_Thai_leknung +#endif +#ifdef XK_Thai_leksong +xK_Thai_leksong :: KeySym +xK_Thai_leksong = #const XK_Thai_leksong +#endif +#ifdef XK_Thai_leksam +xK_Thai_leksam :: KeySym +xK_Thai_leksam = #const XK_Thai_leksam +#endif +#ifdef XK_Thai_leksi +xK_Thai_leksi :: KeySym +xK_Thai_leksi = #const XK_Thai_leksi +#endif +#ifdef XK_Thai_lekha +xK_Thai_lekha :: KeySym +xK_Thai_lekha = #const XK_Thai_lekha +#endif +#ifdef XK_Thai_lekhok +xK_Thai_lekhok :: KeySym +xK_Thai_lekhok = #const XK_Thai_lekhok +#endif +#ifdef XK_Thai_lekchet +xK_Thai_lekchet :: KeySym +xK_Thai_lekchet = #const XK_Thai_lekchet +#endif +#ifdef XK_Thai_lekpaet +xK_Thai_lekpaet :: KeySym +xK_Thai_lekpaet = #const XK_Thai_lekpaet +#endif +#ifdef XK_Thai_lekkao +xK_Thai_lekkao :: KeySym +xK_Thai_lekkao = #const XK_Thai_lekkao +#endif + +-- XK_KOREAN +#ifdef XK_Hangul +xK_Hangul :: KeySym +xK_Hangul = #const XK_Hangul +#endif +#ifdef XK_Hangul_Start +xK_Hangul_Start :: KeySym +xK_Hangul_Start = #const XK_Hangul_Start +#endif +#ifdef XK_Hangul_End +xK_Hangul_End :: KeySym +xK_Hangul_End = #const XK_Hangul_End +#endif +#ifdef XK_Hangul_Hanja +xK_Hangul_Hanja :: KeySym +xK_Hangul_Hanja = #const XK_Hangul_Hanja +#endif +#ifdef XK_Hangul_Jamo +xK_Hangul_Jamo :: KeySym +xK_Hangul_Jamo = #const XK_Hangul_Jamo +#endif +#ifdef XK_Hangul_Romaja +xK_Hangul_Romaja :: KeySym +xK_Hangul_Romaja = #const XK_Hangul_Romaja +#endif +#ifdef XK_Hangul_Codeinput +xK_Hangul_Codeinput :: KeySym +xK_Hangul_Codeinput = #const XK_Hangul_Codeinput +#endif +#ifdef XK_Hangul_Jeonja +xK_Hangul_Jeonja :: KeySym +xK_Hangul_Jeonja = #const XK_Hangul_Jeonja +#endif +#ifdef XK_Hangul_Banja +xK_Hangul_Banja :: KeySym +xK_Hangul_Banja = #const XK_Hangul_Banja +#endif +#ifdef XK_Hangul_PreHanja +xK_Hangul_PreHanja :: KeySym +xK_Hangul_PreHanja = #const XK_Hangul_PreHanja +#endif +#ifdef XK_Hangul_PostHanja +xK_Hangul_PostHanja :: KeySym +xK_Hangul_PostHanja = #const XK_Hangul_PostHanja +#endif +#ifdef XK_Hangul_SingleCandidate +xK_Hangul_SingleCandidate :: KeySym +xK_Hangul_SingleCandidate = #const XK_Hangul_SingleCandidate +#endif +#ifdef XK_Hangul_MultipleCandidate +xK_Hangul_MultipleCandidate :: KeySym +xK_Hangul_MultipleCandidate = #const XK_Hangul_MultipleCandidate +#endif +#ifdef XK_Hangul_PreviousCandidate +xK_Hangul_PreviousCandidate :: KeySym +xK_Hangul_PreviousCandidate = #const XK_Hangul_PreviousCandidate +#endif +#ifdef XK_Hangul_Special +xK_Hangul_Special :: KeySym +xK_Hangul_Special = #const XK_Hangul_Special +#endif +#ifdef XK_Hangul_switch +xK_Hangul_switch :: KeySym +xK_Hangul_switch = #const XK_Hangul_switch +#endif +#ifdef XK_Hangul_Kiyeog +xK_Hangul_Kiyeog :: KeySym +xK_Hangul_Kiyeog = #const XK_Hangul_Kiyeog +#endif +#ifdef XK_Hangul_SsangKiyeog +xK_Hangul_SsangKiyeog :: KeySym +xK_Hangul_SsangKiyeog = #const XK_Hangul_SsangKiyeog +#endif +#ifdef XK_Hangul_KiyeogSios +xK_Hangul_KiyeogSios :: KeySym +xK_Hangul_KiyeogSios = #const XK_Hangul_KiyeogSios +#endif +#ifdef XK_Hangul_Nieun +xK_Hangul_Nieun :: KeySym +xK_Hangul_Nieun = #const XK_Hangul_Nieun +#endif +#ifdef XK_Hangul_NieunJieuj +xK_Hangul_NieunJieuj :: KeySym +xK_Hangul_NieunJieuj = #const XK_Hangul_NieunJieuj +#endif +#ifdef XK_Hangul_NieunHieuh +xK_Hangul_NieunHieuh :: KeySym +xK_Hangul_NieunHieuh = #const XK_Hangul_NieunHieuh +#endif +#ifdef XK_Hangul_Dikeud +xK_Hangul_Dikeud :: KeySym +xK_Hangul_Dikeud = #const XK_Hangul_Dikeud +#endif +#ifdef XK_Hangul_SsangDikeud +xK_Hangul_SsangDikeud :: KeySym +xK_Hangul_SsangDikeud = #const XK_Hangul_SsangDikeud +#endif +#ifdef XK_Hangul_Rieul +xK_Hangul_Rieul :: KeySym +xK_Hangul_Rieul = #const XK_Hangul_Rieul +#endif +#ifdef XK_Hangul_RieulKiyeog +xK_Hangul_RieulKiyeog :: KeySym +xK_Hangul_RieulKiyeog = #const XK_Hangul_RieulKiyeog +#endif +#ifdef XK_Hangul_RieulMieum +xK_Hangul_RieulMieum :: KeySym +xK_Hangul_RieulMieum = #const XK_Hangul_RieulMieum +#endif +#ifdef XK_Hangul_RieulPieub +xK_Hangul_RieulPieub :: KeySym +xK_Hangul_RieulPieub = #const XK_Hangul_RieulPieub +#endif +#ifdef XK_Hangul_RieulSios +xK_Hangul_RieulSios :: KeySym +xK_Hangul_RieulSios = #const XK_Hangul_RieulSios +#endif +#ifdef XK_Hangul_RieulTieut +xK_Hangul_RieulTieut :: KeySym +xK_Hangul_RieulTieut = #const XK_Hangul_RieulTieut +#endif +#ifdef XK_Hangul_RieulPhieuf +xK_Hangul_RieulPhieuf :: KeySym +xK_Hangul_RieulPhieuf = #const XK_Hangul_RieulPhieuf +#endif +#ifdef XK_Hangul_RieulHieuh +xK_Hangul_RieulHieuh :: KeySym +xK_Hangul_RieulHieuh = #const XK_Hangul_RieulHieuh +#endif +#ifdef XK_Hangul_Mieum +xK_Hangul_Mieum :: KeySym +xK_Hangul_Mieum = #const XK_Hangul_Mieum +#endif +#ifdef XK_Hangul_Pieub +xK_Hangul_Pieub :: KeySym +xK_Hangul_Pieub = #const XK_Hangul_Pieub +#endif +#ifdef XK_Hangul_SsangPieub +xK_Hangul_SsangPieub :: KeySym +xK_Hangul_SsangPieub = #const XK_Hangul_SsangPieub +#endif +#ifdef XK_Hangul_PieubSios +xK_Hangul_PieubSios :: KeySym +xK_Hangul_PieubSios = #const XK_Hangul_PieubSios +#endif +#ifdef XK_Hangul_Sios +xK_Hangul_Sios :: KeySym +xK_Hangul_Sios = #const XK_Hangul_Sios +#endif +#ifdef XK_Hangul_SsangSios +xK_Hangul_SsangSios :: KeySym +xK_Hangul_SsangSios = #const XK_Hangul_SsangSios +#endif +#ifdef XK_Hangul_Ieung +xK_Hangul_Ieung :: KeySym +xK_Hangul_Ieung = #const XK_Hangul_Ieung +#endif +#ifdef XK_Hangul_Jieuj +xK_Hangul_Jieuj :: KeySym +xK_Hangul_Jieuj = #const XK_Hangul_Jieuj +#endif +#ifdef XK_Hangul_SsangJieuj +xK_Hangul_SsangJieuj :: KeySym +xK_Hangul_SsangJieuj = #const XK_Hangul_SsangJieuj +#endif +#ifdef XK_Hangul_Cieuc +xK_Hangul_Cieuc :: KeySym +xK_Hangul_Cieuc = #const XK_Hangul_Cieuc +#endif +#ifdef XK_Hangul_Khieuq +xK_Hangul_Khieuq :: KeySym +xK_Hangul_Khieuq = #const XK_Hangul_Khieuq +#endif +#ifdef XK_Hangul_Tieut +xK_Hangul_Tieut :: KeySym +xK_Hangul_Tieut = #const XK_Hangul_Tieut +#endif +#ifdef XK_Hangul_Phieuf +xK_Hangul_Phieuf :: KeySym +xK_Hangul_Phieuf = #const XK_Hangul_Phieuf +#endif +#ifdef XK_Hangul_Hieuh +xK_Hangul_Hieuh :: KeySym +xK_Hangul_Hieuh = #const XK_Hangul_Hieuh +#endif +#ifdef XK_Hangul_A +xK_Hangul_A :: KeySym +xK_Hangul_A = #const XK_Hangul_A +#endif +#ifdef XK_Hangul_AE +xK_Hangul_AE :: KeySym +xK_Hangul_AE = #const XK_Hangul_AE +#endif +#ifdef XK_Hangul_YA +xK_Hangul_YA :: KeySym +xK_Hangul_YA = #const XK_Hangul_YA +#endif +#ifdef XK_Hangul_YAE +xK_Hangul_YAE :: KeySym +xK_Hangul_YAE = #const XK_Hangul_YAE +#endif +#ifdef XK_Hangul_EO +xK_Hangul_EO :: KeySym +xK_Hangul_EO = #const XK_Hangul_EO +#endif +#ifdef XK_Hangul_E +xK_Hangul_E :: KeySym +xK_Hangul_E = #const XK_Hangul_E +#endif +#ifdef XK_Hangul_YEO +xK_Hangul_YEO :: KeySym +xK_Hangul_YEO = #const XK_Hangul_YEO +#endif +#ifdef XK_Hangul_YE +xK_Hangul_YE :: KeySym +xK_Hangul_YE = #const XK_Hangul_YE +#endif +#ifdef XK_Hangul_O +xK_Hangul_O :: KeySym +xK_Hangul_O = #const XK_Hangul_O +#endif +#ifdef XK_Hangul_WA +xK_Hangul_WA :: KeySym +xK_Hangul_WA = #const XK_Hangul_WA +#endif +#ifdef XK_Hangul_WAE +xK_Hangul_WAE :: KeySym +xK_Hangul_WAE = #const XK_Hangul_WAE +#endif +#ifdef XK_Hangul_OE +xK_Hangul_OE :: KeySym +xK_Hangul_OE = #const XK_Hangul_OE +#endif +#ifdef XK_Hangul_YO +xK_Hangul_YO :: KeySym +xK_Hangul_YO = #const XK_Hangul_YO +#endif +#ifdef XK_Hangul_U +xK_Hangul_U :: KeySym +xK_Hangul_U = #const XK_Hangul_U +#endif +#ifdef XK_Hangul_WEO +xK_Hangul_WEO :: KeySym +xK_Hangul_WEO = #const XK_Hangul_WEO +#endif +#ifdef XK_Hangul_WE +xK_Hangul_WE :: KeySym +xK_Hangul_WE = #const XK_Hangul_WE +#endif +#ifdef XK_Hangul_WI +xK_Hangul_WI :: KeySym +xK_Hangul_WI = #const XK_Hangul_WI +#endif +#ifdef XK_Hangul_YU +xK_Hangul_YU :: KeySym +xK_Hangul_YU = #const XK_Hangul_YU +#endif +#ifdef XK_Hangul_EU +xK_Hangul_EU :: KeySym +xK_Hangul_EU = #const XK_Hangul_EU +#endif +#ifdef XK_Hangul_YI +xK_Hangul_YI :: KeySym +xK_Hangul_YI = #const XK_Hangul_YI +#endif +#ifdef XK_Hangul_I +xK_Hangul_I :: KeySym +xK_Hangul_I = #const XK_Hangul_I +#endif +#ifdef XK_Hangul_J_Kiyeog +xK_Hangul_J_Kiyeog :: KeySym +xK_Hangul_J_Kiyeog = #const XK_Hangul_J_Kiyeog +#endif +#ifdef XK_Hangul_J_SsangKiyeog +xK_Hangul_J_SsangKiyeog :: KeySym +xK_Hangul_J_SsangKiyeog = #const XK_Hangul_J_SsangKiyeog +#endif +#ifdef XK_Hangul_J_KiyeogSios +xK_Hangul_J_KiyeogSios :: KeySym +xK_Hangul_J_KiyeogSios = #const XK_Hangul_J_KiyeogSios +#endif +#ifdef XK_Hangul_J_Nieun +xK_Hangul_J_Nieun :: KeySym +xK_Hangul_J_Nieun = #const XK_Hangul_J_Nieun +#endif +#ifdef XK_Hangul_J_NieunJieuj +xK_Hangul_J_NieunJieuj :: KeySym +xK_Hangul_J_NieunJieuj = #const XK_Hangul_J_NieunJieuj +#endif +#ifdef XK_Hangul_J_NieunHieuh +xK_Hangul_J_NieunHieuh :: KeySym +xK_Hangul_J_NieunHieuh = #const XK_Hangul_J_NieunHieuh +#endif +#ifdef XK_Hangul_J_Dikeud +xK_Hangul_J_Dikeud :: KeySym +xK_Hangul_J_Dikeud = #const XK_Hangul_J_Dikeud +#endif +#ifdef XK_Hangul_J_Rieul +xK_Hangul_J_Rieul :: KeySym +xK_Hangul_J_Rieul = #const XK_Hangul_J_Rieul +#endif +#ifdef XK_Hangul_J_RieulKiyeog +xK_Hangul_J_RieulKiyeog :: KeySym +xK_Hangul_J_RieulKiyeog = #const XK_Hangul_J_RieulKiyeog +#endif +#ifdef XK_Hangul_J_RieulMieum +xK_Hangul_J_RieulMieum :: KeySym +xK_Hangul_J_RieulMieum = #const XK_Hangul_J_RieulMieum +#endif +#ifdef XK_Hangul_J_RieulPieub +xK_Hangul_J_RieulPieub :: KeySym +xK_Hangul_J_RieulPieub = #const XK_Hangul_J_RieulPieub +#endif +#ifdef XK_Hangul_J_RieulSios +xK_Hangul_J_RieulSios :: KeySym +xK_Hangul_J_RieulSios = #const XK_Hangul_J_RieulSios +#endif +#ifdef XK_Hangul_J_RieulTieut +xK_Hangul_J_RieulTieut :: KeySym +xK_Hangul_J_RieulTieut = #const XK_Hangul_J_RieulTieut +#endif +#ifdef XK_Hangul_J_RieulPhieuf +xK_Hangul_J_RieulPhieuf :: KeySym +xK_Hangul_J_RieulPhieuf = #const XK_Hangul_J_RieulPhieuf +#endif +#ifdef XK_Hangul_J_RieulHieuh +xK_Hangul_J_RieulHieuh :: KeySym +xK_Hangul_J_RieulHieuh = #const XK_Hangul_J_RieulHieuh +#endif +#ifdef XK_Hangul_J_Mieum +xK_Hangul_J_Mieum :: KeySym +xK_Hangul_J_Mieum = #const XK_Hangul_J_Mieum +#endif +#ifdef XK_Hangul_J_Pieub +xK_Hangul_J_Pieub :: KeySym +xK_Hangul_J_Pieub = #const XK_Hangul_J_Pieub +#endif +#ifdef XK_Hangul_J_PieubSios +xK_Hangul_J_PieubSios :: KeySym +xK_Hangul_J_PieubSios = #const XK_Hangul_J_PieubSios +#endif +#ifdef XK_Hangul_J_Sios +xK_Hangul_J_Sios :: KeySym +xK_Hangul_J_Sios = #const XK_Hangul_J_Sios +#endif +#ifdef XK_Hangul_J_SsangSios +xK_Hangul_J_SsangSios :: KeySym +xK_Hangul_J_SsangSios = #const XK_Hangul_J_SsangSios +#endif +#ifdef XK_Hangul_J_Ieung +xK_Hangul_J_Ieung :: KeySym +xK_Hangul_J_Ieung = #const XK_Hangul_J_Ieung +#endif +#ifdef XK_Hangul_J_Jieuj +xK_Hangul_J_Jieuj :: KeySym +xK_Hangul_J_Jieuj = #const XK_Hangul_J_Jieuj +#endif +#ifdef XK_Hangul_J_Cieuc +xK_Hangul_J_Cieuc :: KeySym +xK_Hangul_J_Cieuc = #const XK_Hangul_J_Cieuc +#endif +#ifdef XK_Hangul_J_Khieuq +xK_Hangul_J_Khieuq :: KeySym +xK_Hangul_J_Khieuq = #const XK_Hangul_J_Khieuq +#endif +#ifdef XK_Hangul_J_Tieut +xK_Hangul_J_Tieut :: KeySym +xK_Hangul_J_Tieut = #const XK_Hangul_J_Tieut +#endif +#ifdef XK_Hangul_J_Phieuf +xK_Hangul_J_Phieuf :: KeySym +xK_Hangul_J_Phieuf = #const XK_Hangul_J_Phieuf +#endif +#ifdef XK_Hangul_J_Hieuh +xK_Hangul_J_Hieuh :: KeySym +xK_Hangul_J_Hieuh = #const XK_Hangul_J_Hieuh +#endif +#ifdef XK_Hangul_RieulYeorinHieuh +xK_Hangul_RieulYeorinHieuh :: KeySym +xK_Hangul_RieulYeorinHieuh = #const XK_Hangul_RieulYeorinHieuh +#endif +#ifdef XK_Hangul_SunkyeongeumMieum +xK_Hangul_SunkyeongeumMieum :: KeySym +xK_Hangul_SunkyeongeumMieum = #const XK_Hangul_SunkyeongeumMieum +#endif +#ifdef XK_Hangul_SunkyeongeumPieub +xK_Hangul_SunkyeongeumPieub :: KeySym +xK_Hangul_SunkyeongeumPieub = #const XK_Hangul_SunkyeongeumPieub +#endif +#ifdef XK_Hangul_PanSios +xK_Hangul_PanSios :: KeySym +xK_Hangul_PanSios = #const XK_Hangul_PanSios +#endif +#ifdef XK_Hangul_KkogjiDalrinIeung +xK_Hangul_KkogjiDalrinIeung :: KeySym +xK_Hangul_KkogjiDalrinIeung = #const XK_Hangul_KkogjiDalrinIeung +#endif +#ifdef XK_Hangul_SunkyeongeumPhieuf +xK_Hangul_SunkyeongeumPhieuf :: KeySym +xK_Hangul_SunkyeongeumPhieuf = #const XK_Hangul_SunkyeongeumPhieuf +#endif +#ifdef XK_Hangul_YeorinHieuh +xK_Hangul_YeorinHieuh :: KeySym +xK_Hangul_YeorinHieuh = #const XK_Hangul_YeorinHieuh +#endif +#ifdef XK_Hangul_AraeA +xK_Hangul_AraeA :: KeySym +xK_Hangul_AraeA = #const XK_Hangul_AraeA +#endif +#ifdef XK_Hangul_AraeAE +xK_Hangul_AraeAE :: KeySym +xK_Hangul_AraeAE = #const XK_Hangul_AraeAE +#endif +#ifdef XK_Hangul_J_PanSios +xK_Hangul_J_PanSios :: KeySym +xK_Hangul_J_PanSios = #const XK_Hangul_J_PanSios +#endif +#ifdef XK_Hangul_J_KkogjiDalrinIeung +xK_Hangul_J_KkogjiDalrinIeung :: KeySym +xK_Hangul_J_KkogjiDalrinIeung = #const XK_Hangul_J_KkogjiDalrinIeung +#endif +#ifdef XK_Hangul_J_YeorinHieuh +xK_Hangul_J_YeorinHieuh :: KeySym +xK_Hangul_J_YeorinHieuh = #const XK_Hangul_J_YeorinHieuh +#endif +#ifdef XK_Korean_Won +xK_Korean_Won :: KeySym +xK_Korean_Won = #const XK_Korean_Won +#endif + +-- XK_ARMENIAN +#ifdef XK_Armenian_ligature_ew +xK_Armenian_ligature_ew :: KeySym +xK_Armenian_ligature_ew = #const XK_Armenian_ligature_ew +#endif +#ifdef XK_Armenian_full_stop +xK_Armenian_full_stop :: KeySym +xK_Armenian_full_stop = #const XK_Armenian_full_stop +#endif +#ifdef XK_Armenian_verjaket +xK_Armenian_verjaket :: KeySym +xK_Armenian_verjaket = #const XK_Armenian_verjaket +#endif +#ifdef XK_Armenian_separation_mark +xK_Armenian_separation_mark :: KeySym +xK_Armenian_separation_mark = #const XK_Armenian_separation_mark +#endif +#ifdef XK_Armenian_but +xK_Armenian_but :: KeySym +xK_Armenian_but = #const XK_Armenian_but +#endif +#ifdef XK_Armenian_hyphen +xK_Armenian_hyphen :: KeySym +xK_Armenian_hyphen = #const XK_Armenian_hyphen +#endif +#ifdef XK_Armenian_yentamna +xK_Armenian_yentamna :: KeySym +xK_Armenian_yentamna = #const XK_Armenian_yentamna +#endif +#ifdef XK_Armenian_exclam +xK_Armenian_exclam :: KeySym +xK_Armenian_exclam = #const XK_Armenian_exclam +#endif +#ifdef XK_Armenian_amanak +xK_Armenian_amanak :: KeySym +xK_Armenian_amanak = #const XK_Armenian_amanak +#endif +#ifdef XK_Armenian_accent +xK_Armenian_accent :: KeySym +xK_Armenian_accent = #const XK_Armenian_accent +#endif +#ifdef XK_Armenian_shesht +xK_Armenian_shesht :: KeySym +xK_Armenian_shesht = #const XK_Armenian_shesht +#endif +#ifdef XK_Armenian_question +xK_Armenian_question :: KeySym +xK_Armenian_question = #const XK_Armenian_question +#endif +#ifdef XK_Armenian_paruyk +xK_Armenian_paruyk :: KeySym +xK_Armenian_paruyk = #const XK_Armenian_paruyk +#endif +#ifdef XK_Armenian_AYB +xK_Armenian_AYB :: KeySym +xK_Armenian_AYB = #const XK_Armenian_AYB +#endif +#ifdef XK_Armenian_ayb +xK_Armenian_ayb :: KeySym +xK_Armenian_ayb = #const XK_Armenian_ayb +#endif +#ifdef XK_Armenian_BEN +xK_Armenian_BEN :: KeySym +xK_Armenian_BEN = #const XK_Armenian_BEN +#endif +#ifdef XK_Armenian_ben +xK_Armenian_ben :: KeySym +xK_Armenian_ben = #const XK_Armenian_ben +#endif +#ifdef XK_Armenian_GIM +xK_Armenian_GIM :: KeySym +xK_Armenian_GIM = #const XK_Armenian_GIM +#endif +#ifdef XK_Armenian_gim +xK_Armenian_gim :: KeySym +xK_Armenian_gim = #const XK_Armenian_gim +#endif +#ifdef XK_Armenian_DA +xK_Armenian_DA :: KeySym +xK_Armenian_DA = #const XK_Armenian_DA +#endif +#ifdef XK_Armenian_da +xK_Armenian_da :: KeySym +xK_Armenian_da = #const XK_Armenian_da +#endif +#ifdef XK_Armenian_YECH +xK_Armenian_YECH :: KeySym +xK_Armenian_YECH = #const XK_Armenian_YECH +#endif +#ifdef XK_Armenian_yech +xK_Armenian_yech :: KeySym +xK_Armenian_yech = #const XK_Armenian_yech +#endif +#ifdef XK_Armenian_ZA +xK_Armenian_ZA :: KeySym +xK_Armenian_ZA = #const XK_Armenian_ZA +#endif +#ifdef XK_Armenian_za +xK_Armenian_za :: KeySym +xK_Armenian_za = #const XK_Armenian_za +#endif +#ifdef XK_Armenian_E +xK_Armenian_E :: KeySym +xK_Armenian_E = #const XK_Armenian_E +#endif +#ifdef XK_Armenian_e +xK_Armenian_e :: KeySym +xK_Armenian_e = #const XK_Armenian_e +#endif +#ifdef XK_Armenian_AT +xK_Armenian_AT :: KeySym +xK_Armenian_AT = #const XK_Armenian_AT +#endif +#ifdef XK_Armenian_at +xK_Armenian_at :: KeySym +xK_Armenian_at = #const XK_Armenian_at +#endif +#ifdef XK_Armenian_TO +xK_Armenian_TO :: KeySym +xK_Armenian_TO = #const XK_Armenian_TO +#endif +#ifdef XK_Armenian_to +xK_Armenian_to :: KeySym +xK_Armenian_to = #const XK_Armenian_to +#endif +#ifdef XK_Armenian_ZHE +xK_Armenian_ZHE :: KeySym +xK_Armenian_ZHE = #const XK_Armenian_ZHE +#endif +#ifdef XK_Armenian_zhe +xK_Armenian_zhe :: KeySym +xK_Armenian_zhe = #const XK_Armenian_zhe +#endif +#ifdef XK_Armenian_INI +xK_Armenian_INI :: KeySym +xK_Armenian_INI = #const XK_Armenian_INI +#endif +#ifdef XK_Armenian_ini +xK_Armenian_ini :: KeySym +xK_Armenian_ini = #const XK_Armenian_ini +#endif +#ifdef XK_Armenian_LYUN +xK_Armenian_LYUN :: KeySym +xK_Armenian_LYUN = #const XK_Armenian_LYUN +#endif +#ifdef XK_Armenian_lyun +xK_Armenian_lyun :: KeySym +xK_Armenian_lyun = #const XK_Armenian_lyun +#endif +#ifdef XK_Armenian_KHE +xK_Armenian_KHE :: KeySym +xK_Armenian_KHE = #const XK_Armenian_KHE +#endif +#ifdef XK_Armenian_khe +xK_Armenian_khe :: KeySym +xK_Armenian_khe = #const XK_Armenian_khe +#endif +#ifdef XK_Armenian_TSA +xK_Armenian_TSA :: KeySym +xK_Armenian_TSA = #const XK_Armenian_TSA +#endif +#ifdef XK_Armenian_tsa +xK_Armenian_tsa :: KeySym +xK_Armenian_tsa = #const XK_Armenian_tsa +#endif +#ifdef XK_Armenian_KEN +xK_Armenian_KEN :: KeySym +xK_Armenian_KEN = #const XK_Armenian_KEN +#endif +#ifdef XK_Armenian_ken +xK_Armenian_ken :: KeySym +xK_Armenian_ken = #const XK_Armenian_ken +#endif +#ifdef XK_Armenian_HO +xK_Armenian_HO :: KeySym +xK_Armenian_HO = #const XK_Armenian_HO +#endif +#ifdef XK_Armenian_ho +xK_Armenian_ho :: KeySym +xK_Armenian_ho = #const XK_Armenian_ho +#endif +#ifdef XK_Armenian_DZA +xK_Armenian_DZA :: KeySym +xK_Armenian_DZA = #const XK_Armenian_DZA +#endif +#ifdef XK_Armenian_dza +xK_Armenian_dza :: KeySym +xK_Armenian_dza = #const XK_Armenian_dza +#endif +#ifdef XK_Armenian_GHAT +xK_Armenian_GHAT :: KeySym +xK_Armenian_GHAT = #const XK_Armenian_GHAT +#endif +#ifdef XK_Armenian_ghat +xK_Armenian_ghat :: KeySym +xK_Armenian_ghat = #const XK_Armenian_ghat +#endif +#ifdef XK_Armenian_TCHE +xK_Armenian_TCHE :: KeySym +xK_Armenian_TCHE = #const XK_Armenian_TCHE +#endif +#ifdef XK_Armenian_tche +xK_Armenian_tche :: KeySym +xK_Armenian_tche = #const XK_Armenian_tche +#endif +#ifdef XK_Armenian_MEN +xK_Armenian_MEN :: KeySym +xK_Armenian_MEN = #const XK_Armenian_MEN +#endif +#ifdef XK_Armenian_men +xK_Armenian_men :: KeySym +xK_Armenian_men = #const XK_Armenian_men +#endif +#ifdef XK_Armenian_HI +xK_Armenian_HI :: KeySym +xK_Armenian_HI = #const XK_Armenian_HI +#endif +#ifdef XK_Armenian_hi +xK_Armenian_hi :: KeySym +xK_Armenian_hi = #const XK_Armenian_hi +#endif +#ifdef XK_Armenian_NU +xK_Armenian_NU :: KeySym +xK_Armenian_NU = #const XK_Armenian_NU +#endif +#ifdef XK_Armenian_nu +xK_Armenian_nu :: KeySym +xK_Armenian_nu = #const XK_Armenian_nu +#endif +#ifdef XK_Armenian_SHA +xK_Armenian_SHA :: KeySym +xK_Armenian_SHA = #const XK_Armenian_SHA +#endif +#ifdef XK_Armenian_sha +xK_Armenian_sha :: KeySym +xK_Armenian_sha = #const XK_Armenian_sha +#endif +#ifdef XK_Armenian_VO +xK_Armenian_VO :: KeySym +xK_Armenian_VO = #const XK_Armenian_VO +#endif +#ifdef XK_Armenian_vo +xK_Armenian_vo :: KeySym +xK_Armenian_vo = #const XK_Armenian_vo +#endif +#ifdef XK_Armenian_CHA +xK_Armenian_CHA :: KeySym +xK_Armenian_CHA = #const XK_Armenian_CHA +#endif +#ifdef XK_Armenian_cha +xK_Armenian_cha :: KeySym +xK_Armenian_cha = #const XK_Armenian_cha +#endif +#ifdef XK_Armenian_PE +xK_Armenian_PE :: KeySym +xK_Armenian_PE = #const XK_Armenian_PE +#endif +#ifdef XK_Armenian_pe +xK_Armenian_pe :: KeySym +xK_Armenian_pe = #const XK_Armenian_pe +#endif +#ifdef XK_Armenian_JE +xK_Armenian_JE :: KeySym +xK_Armenian_JE = #const XK_Armenian_JE +#endif +#ifdef XK_Armenian_je +xK_Armenian_je :: KeySym +xK_Armenian_je = #const XK_Armenian_je +#endif +#ifdef XK_Armenian_RA +xK_Armenian_RA :: KeySym +xK_Armenian_RA = #const XK_Armenian_RA +#endif +#ifdef XK_Armenian_ra +xK_Armenian_ra :: KeySym +xK_Armenian_ra = #const XK_Armenian_ra +#endif +#ifdef XK_Armenian_SE +xK_Armenian_SE :: KeySym +xK_Armenian_SE = #const XK_Armenian_SE +#endif +#ifdef XK_Armenian_se +xK_Armenian_se :: KeySym +xK_Armenian_se = #const XK_Armenian_se +#endif +#ifdef XK_Armenian_VEV +xK_Armenian_VEV :: KeySym +xK_Armenian_VEV = #const XK_Armenian_VEV +#endif +#ifdef XK_Armenian_vev +xK_Armenian_vev :: KeySym +xK_Armenian_vev = #const XK_Armenian_vev +#endif +#ifdef XK_Armenian_TYUN +xK_Armenian_TYUN :: KeySym +xK_Armenian_TYUN = #const XK_Armenian_TYUN +#endif +#ifdef XK_Armenian_tyun +xK_Armenian_tyun :: KeySym +xK_Armenian_tyun = #const XK_Armenian_tyun +#endif +#ifdef XK_Armenian_RE +xK_Armenian_RE :: KeySym +xK_Armenian_RE = #const XK_Armenian_RE +#endif +#ifdef XK_Armenian_re +xK_Armenian_re :: KeySym +xK_Armenian_re = #const XK_Armenian_re +#endif +#ifdef XK_Armenian_TSO +xK_Armenian_TSO :: KeySym +xK_Armenian_TSO = #const XK_Armenian_TSO +#endif +#ifdef XK_Armenian_tso +xK_Armenian_tso :: KeySym +xK_Armenian_tso = #const XK_Armenian_tso +#endif +#ifdef XK_Armenian_VYUN +xK_Armenian_VYUN :: KeySym +xK_Armenian_VYUN = #const XK_Armenian_VYUN +#endif +#ifdef XK_Armenian_vyun +xK_Armenian_vyun :: KeySym +xK_Armenian_vyun = #const XK_Armenian_vyun +#endif +#ifdef XK_Armenian_PYUR +xK_Armenian_PYUR :: KeySym +xK_Armenian_PYUR = #const XK_Armenian_PYUR +#endif +#ifdef XK_Armenian_pyur +xK_Armenian_pyur :: KeySym +xK_Armenian_pyur = #const XK_Armenian_pyur +#endif +#ifdef XK_Armenian_KE +xK_Armenian_KE :: KeySym +xK_Armenian_KE = #const XK_Armenian_KE +#endif +#ifdef XK_Armenian_ke +xK_Armenian_ke :: KeySym +xK_Armenian_ke = #const XK_Armenian_ke +#endif +#ifdef XK_Armenian_O +xK_Armenian_O :: KeySym +xK_Armenian_O = #const XK_Armenian_O +#endif +#ifdef XK_Armenian_o +xK_Armenian_o :: KeySym +xK_Armenian_o = #const XK_Armenian_o +#endif +#ifdef XK_Armenian_FE +xK_Armenian_FE :: KeySym +xK_Armenian_FE = #const XK_Armenian_FE +#endif +#ifdef XK_Armenian_fe +xK_Armenian_fe :: KeySym +xK_Armenian_fe = #const XK_Armenian_fe +#endif +#ifdef XK_Armenian_apostrophe +xK_Armenian_apostrophe :: KeySym +xK_Armenian_apostrophe = #const XK_Armenian_apostrophe +#endif + +-- XK_GEORGIAN +#ifdef XK_Georgian_an +xK_Georgian_an :: KeySym +xK_Georgian_an = #const XK_Georgian_an +#endif +#ifdef XK_Georgian_ban +xK_Georgian_ban :: KeySym +xK_Georgian_ban = #const XK_Georgian_ban +#endif +#ifdef XK_Georgian_gan +xK_Georgian_gan :: KeySym +xK_Georgian_gan = #const XK_Georgian_gan +#endif +#ifdef XK_Georgian_don +xK_Georgian_don :: KeySym +xK_Georgian_don = #const XK_Georgian_don +#endif +#ifdef XK_Georgian_en +xK_Georgian_en :: KeySym +xK_Georgian_en = #const XK_Georgian_en +#endif +#ifdef XK_Georgian_vin +xK_Georgian_vin :: KeySym +xK_Georgian_vin = #const XK_Georgian_vin +#endif +#ifdef XK_Georgian_zen +xK_Georgian_zen :: KeySym +xK_Georgian_zen = #const XK_Georgian_zen +#endif +#ifdef XK_Georgian_tan +xK_Georgian_tan :: KeySym +xK_Georgian_tan = #const XK_Georgian_tan +#endif +#ifdef XK_Georgian_in +xK_Georgian_in :: KeySym +xK_Georgian_in = #const XK_Georgian_in +#endif +#ifdef XK_Georgian_kan +xK_Georgian_kan :: KeySym +xK_Georgian_kan = #const XK_Georgian_kan +#endif +#ifdef XK_Georgian_las +xK_Georgian_las :: KeySym +xK_Georgian_las = #const XK_Georgian_las +#endif +#ifdef XK_Georgian_man +xK_Georgian_man :: KeySym +xK_Georgian_man = #const XK_Georgian_man +#endif +#ifdef XK_Georgian_nar +xK_Georgian_nar :: KeySym +xK_Georgian_nar = #const XK_Georgian_nar +#endif +#ifdef XK_Georgian_on +xK_Georgian_on :: KeySym +xK_Georgian_on = #const XK_Georgian_on +#endif +#ifdef XK_Georgian_par +xK_Georgian_par :: KeySym +xK_Georgian_par = #const XK_Georgian_par +#endif +#ifdef XK_Georgian_zhar +xK_Georgian_zhar :: KeySym +xK_Georgian_zhar = #const XK_Georgian_zhar +#endif +#ifdef XK_Georgian_rae +xK_Georgian_rae :: KeySym +xK_Georgian_rae = #const XK_Georgian_rae +#endif +#ifdef XK_Georgian_san +xK_Georgian_san :: KeySym +xK_Georgian_san = #const XK_Georgian_san +#endif +#ifdef XK_Georgian_tar +xK_Georgian_tar :: KeySym +xK_Georgian_tar = #const XK_Georgian_tar +#endif +#ifdef XK_Georgian_un +xK_Georgian_un :: KeySym +xK_Georgian_un = #const XK_Georgian_un +#endif +#ifdef XK_Georgian_phar +xK_Georgian_phar :: KeySym +xK_Georgian_phar = #const XK_Georgian_phar +#endif +#ifdef XK_Georgian_khar +xK_Georgian_khar :: KeySym +xK_Georgian_khar = #const XK_Georgian_khar +#endif +#ifdef XK_Georgian_ghan +xK_Georgian_ghan :: KeySym +xK_Georgian_ghan = #const XK_Georgian_ghan +#endif +#ifdef XK_Georgian_qar +xK_Georgian_qar :: KeySym +xK_Georgian_qar = #const XK_Georgian_qar +#endif +#ifdef XK_Georgian_shin +xK_Georgian_shin :: KeySym +xK_Georgian_shin = #const XK_Georgian_shin +#endif +#ifdef XK_Georgian_chin +xK_Georgian_chin :: KeySym +xK_Georgian_chin = #const XK_Georgian_chin +#endif +#ifdef XK_Georgian_can +xK_Georgian_can :: KeySym +xK_Georgian_can = #const XK_Georgian_can +#endif +#ifdef XK_Georgian_jil +xK_Georgian_jil :: KeySym +xK_Georgian_jil = #const XK_Georgian_jil +#endif +#ifdef XK_Georgian_cil +xK_Georgian_cil :: KeySym +xK_Georgian_cil = #const XK_Georgian_cil +#endif +#ifdef XK_Georgian_char +xK_Georgian_char :: KeySym +xK_Georgian_char = #const XK_Georgian_char +#endif +#ifdef XK_Georgian_xan +xK_Georgian_xan :: KeySym +xK_Georgian_xan = #const XK_Georgian_xan +#endif +#ifdef XK_Georgian_jhan +xK_Georgian_jhan :: KeySym +xK_Georgian_jhan = #const XK_Georgian_jhan +#endif +#ifdef XK_Georgian_hae +xK_Georgian_hae :: KeySym +xK_Georgian_hae = #const XK_Georgian_hae +#endif +#ifdef XK_Georgian_he +xK_Georgian_he :: KeySym +xK_Georgian_he = #const XK_Georgian_he +#endif +#ifdef XK_Georgian_hie +xK_Georgian_hie :: KeySym +xK_Georgian_hie = #const XK_Georgian_hie +#endif +#ifdef XK_Georgian_we +xK_Georgian_we :: KeySym +xK_Georgian_we = #const XK_Georgian_we +#endif +#ifdef XK_Georgian_har +xK_Georgian_har :: KeySym +xK_Georgian_har = #const XK_Georgian_har +#endif +#ifdef XK_Georgian_hoe +xK_Georgian_hoe :: KeySym +xK_Georgian_hoe = #const XK_Georgian_hoe +#endif +#ifdef XK_Georgian_fi +xK_Georgian_fi :: KeySym +xK_Georgian_fi = #const XK_Georgian_fi +#endif + +-- XK_CAUCASUS +#ifdef XK_Xabovedot +xK_Xabovedot :: KeySym +xK_Xabovedot = #const XK_Xabovedot +#endif +#ifdef XK_Ibreve +xK_Ibreve :: KeySym +xK_Ibreve = #const XK_Ibreve +#endif +#ifdef XK_Zstroke +xK_Zstroke :: KeySym +xK_Zstroke = #const XK_Zstroke +#endif +#ifdef XK_Gcaron +xK_Gcaron :: KeySym +xK_Gcaron = #const XK_Gcaron +#endif +#ifdef XK_Ocaron +xK_Ocaron :: KeySym +xK_Ocaron = #const XK_Ocaron +#endif +#ifdef XK_Obarred +xK_Obarred :: KeySym +xK_Obarred = #const XK_Obarred +#endif +#ifdef XK_xabovedot +xK_xabovedot :: KeySym +xK_xabovedot = #const XK_xabovedot +#endif +#ifdef XK_ibreve +xK_ibreve :: KeySym +xK_ibreve = #const XK_ibreve +#endif +#ifdef XK_zstroke +xK_zstroke :: KeySym +xK_zstroke = #const XK_zstroke +#endif +#ifdef XK_gcaron +xK_gcaron :: KeySym +xK_gcaron = #const XK_gcaron +#endif +#ifdef XK_ocaron +xK_ocaron :: KeySym +xK_ocaron = #const XK_ocaron +#endif +#ifdef XK_obarred +xK_obarred :: KeySym +xK_obarred = #const XK_obarred +#endif +#ifdef XK_SCHWA +xK_SCHWA :: KeySym +xK_SCHWA = #const XK_SCHWA +#endif +#ifdef XK_schwa +xK_schwa :: KeySym +xK_schwa = #const XK_schwa +#endif +#ifdef XK_Lbelowdot +xK_Lbelowdot :: KeySym +xK_Lbelowdot = #const XK_Lbelowdot +#endif +#ifdef XK_lbelowdot +xK_lbelowdot :: KeySym +xK_lbelowdot = #const XK_lbelowdot +#endif + +-- XK_VIETNAMESE +#ifdef XK_Abelowdot +xK_Abelowdot :: KeySym +xK_Abelowdot = #const XK_Abelowdot +#endif +#ifdef XK_abelowdot +xK_abelowdot :: KeySym +xK_abelowdot = #const XK_abelowdot +#endif +#ifdef XK_Ahook +xK_Ahook :: KeySym +xK_Ahook = #const XK_Ahook +#endif +#ifdef XK_ahook +xK_ahook :: KeySym +xK_ahook = #const XK_ahook +#endif +#ifdef XK_Acircumflexacute +xK_Acircumflexacute :: KeySym +xK_Acircumflexacute = #const XK_Acircumflexacute +#endif +#ifdef XK_acircumflexacute +xK_acircumflexacute :: KeySym +xK_acircumflexacute = #const XK_acircumflexacute +#endif +#ifdef XK_Acircumflexgrave +xK_Acircumflexgrave :: KeySym +xK_Acircumflexgrave = #const XK_Acircumflexgrave +#endif +#ifdef XK_acircumflexgrave +xK_acircumflexgrave :: KeySym +xK_acircumflexgrave = #const XK_acircumflexgrave +#endif +#ifdef XK_Acircumflexhook +xK_Acircumflexhook :: KeySym +xK_Acircumflexhook = #const XK_Acircumflexhook +#endif +#ifdef XK_acircumflexhook +xK_acircumflexhook :: KeySym +xK_acircumflexhook = #const XK_acircumflexhook +#endif +#ifdef XK_Acircumflextilde +xK_Acircumflextilde :: KeySym +xK_Acircumflextilde = #const XK_Acircumflextilde +#endif +#ifdef XK_acircumflextilde +xK_acircumflextilde :: KeySym +xK_acircumflextilde = #const XK_acircumflextilde +#endif +#ifdef XK_Acircumflexbelowdot +xK_Acircumflexbelowdot :: KeySym +xK_Acircumflexbelowdot = #const XK_Acircumflexbelowdot +#endif +#ifdef XK_acircumflexbelowdot +xK_acircumflexbelowdot :: KeySym +xK_acircumflexbelowdot = #const XK_acircumflexbelowdot +#endif +#ifdef XK_Abreveacute +xK_Abreveacute :: KeySym +xK_Abreveacute = #const XK_Abreveacute +#endif +#ifdef XK_abreveacute +xK_abreveacute :: KeySym +xK_abreveacute = #const XK_abreveacute +#endif +#ifdef XK_Abrevegrave +xK_Abrevegrave :: KeySym +xK_Abrevegrave = #const XK_Abrevegrave +#endif +#ifdef XK_abrevegrave +xK_abrevegrave :: KeySym +xK_abrevegrave = #const XK_abrevegrave +#endif +#ifdef XK_Abrevehook +xK_Abrevehook :: KeySym +xK_Abrevehook = #const XK_Abrevehook +#endif +#ifdef XK_abrevehook +xK_abrevehook :: KeySym +xK_abrevehook = #const XK_abrevehook +#endif +#ifdef XK_Abrevetilde +xK_Abrevetilde :: KeySym +xK_Abrevetilde = #const XK_Abrevetilde +#endif +#ifdef XK_abrevetilde +xK_abrevetilde :: KeySym +xK_abrevetilde = #const XK_abrevetilde +#endif +#ifdef XK_Abrevebelowdot +xK_Abrevebelowdot :: KeySym +xK_Abrevebelowdot = #const XK_Abrevebelowdot +#endif +#ifdef XK_abrevebelowdot +xK_abrevebelowdot :: KeySym +xK_abrevebelowdot = #const XK_abrevebelowdot +#endif +#ifdef XK_Ebelowdot +xK_Ebelowdot :: KeySym +xK_Ebelowdot = #const XK_Ebelowdot +#endif +#ifdef XK_ebelowdot +xK_ebelowdot :: KeySym +xK_ebelowdot = #const XK_ebelowdot +#endif +#ifdef XK_Ehook +xK_Ehook :: KeySym +xK_Ehook = #const XK_Ehook +#endif +#ifdef XK_ehook +xK_ehook :: KeySym +xK_ehook = #const XK_ehook +#endif +#ifdef XK_Etilde +xK_Etilde :: KeySym +xK_Etilde = #const XK_Etilde +#endif +#ifdef XK_etilde +xK_etilde :: KeySym +xK_etilde = #const XK_etilde +#endif +#ifdef XK_Ecircumflexacute +xK_Ecircumflexacute :: KeySym +xK_Ecircumflexacute = #const XK_Ecircumflexacute +#endif +#ifdef XK_ecircumflexacute +xK_ecircumflexacute :: KeySym +xK_ecircumflexacute = #const XK_ecircumflexacute +#endif +#ifdef XK_Ecircumflexgrave +xK_Ecircumflexgrave :: KeySym +xK_Ecircumflexgrave = #const XK_Ecircumflexgrave +#endif +#ifdef XK_ecircumflexgrave +xK_ecircumflexgrave :: KeySym +xK_ecircumflexgrave = #const XK_ecircumflexgrave +#endif +#ifdef XK_Ecircumflexhook +xK_Ecircumflexhook :: KeySym +xK_Ecircumflexhook = #const XK_Ecircumflexhook +#endif +#ifdef XK_ecircumflexhook +xK_ecircumflexhook :: KeySym +xK_ecircumflexhook = #const XK_ecircumflexhook +#endif +#ifdef XK_Ecircumflextilde +xK_Ecircumflextilde :: KeySym +xK_Ecircumflextilde = #const XK_Ecircumflextilde +#endif +#ifdef XK_ecircumflextilde +xK_ecircumflextilde :: KeySym +xK_ecircumflextilde = #const XK_ecircumflextilde +#endif +#ifdef XK_Ecircumflexbelowdot +xK_Ecircumflexbelowdot :: KeySym +xK_Ecircumflexbelowdot = #const XK_Ecircumflexbelowdot +#endif +#ifdef XK_ecircumflexbelowdot +xK_ecircumflexbelowdot :: KeySym +xK_ecircumflexbelowdot = #const XK_ecircumflexbelowdot +#endif +#ifdef XK_Ihook +xK_Ihook :: KeySym +xK_Ihook = #const XK_Ihook +#endif +#ifdef XK_ihook +xK_ihook :: KeySym +xK_ihook = #const XK_ihook +#endif +#ifdef XK_Ibelowdot +xK_Ibelowdot :: KeySym +xK_Ibelowdot = #const XK_Ibelowdot +#endif +#ifdef XK_ibelowdot +xK_ibelowdot :: KeySym +xK_ibelowdot = #const XK_ibelowdot +#endif +#ifdef XK_Obelowdot +xK_Obelowdot :: KeySym +xK_Obelowdot = #const XK_Obelowdot +#endif +#ifdef XK_obelowdot +xK_obelowdot :: KeySym +xK_obelowdot = #const XK_obelowdot +#endif +#ifdef XK_Ohook +xK_Ohook :: KeySym +xK_Ohook = #const XK_Ohook +#endif +#ifdef XK_ohook +xK_ohook :: KeySym +xK_ohook = #const XK_ohook +#endif +#ifdef XK_Ocircumflexacute +xK_Ocircumflexacute :: KeySym +xK_Ocircumflexacute = #const XK_Ocircumflexacute +#endif +#ifdef XK_ocircumflexacute +xK_ocircumflexacute :: KeySym +xK_ocircumflexacute = #const XK_ocircumflexacute +#endif +#ifdef XK_Ocircumflexgrave +xK_Ocircumflexgrave :: KeySym +xK_Ocircumflexgrave = #const XK_Ocircumflexgrave +#endif +#ifdef XK_ocircumflexgrave +xK_ocircumflexgrave :: KeySym +xK_ocircumflexgrave = #const XK_ocircumflexgrave +#endif +#ifdef XK_Ocircumflexhook +xK_Ocircumflexhook :: KeySym +xK_Ocircumflexhook = #const XK_Ocircumflexhook +#endif +#ifdef XK_ocircumflexhook +xK_ocircumflexhook :: KeySym +xK_ocircumflexhook = #const XK_ocircumflexhook +#endif +#ifdef XK_Ocircumflextilde +xK_Ocircumflextilde :: KeySym +xK_Ocircumflextilde = #const XK_Ocircumflextilde +#endif +#ifdef XK_ocircumflextilde +xK_ocircumflextilde :: KeySym +xK_ocircumflextilde = #const XK_ocircumflextilde +#endif +#ifdef XK_Ocircumflexbelowdot +xK_Ocircumflexbelowdot :: KeySym +xK_Ocircumflexbelowdot = #const XK_Ocircumflexbelowdot +#endif +#ifdef XK_ocircumflexbelowdot +xK_ocircumflexbelowdot :: KeySym +xK_ocircumflexbelowdot = #const XK_ocircumflexbelowdot +#endif +#ifdef XK_Ohornacute +xK_Ohornacute :: KeySym +xK_Ohornacute = #const XK_Ohornacute +#endif +#ifdef XK_ohornacute +xK_ohornacute :: KeySym +xK_ohornacute = #const XK_ohornacute +#endif +#ifdef XK_Ohorngrave +xK_Ohorngrave :: KeySym +xK_Ohorngrave = #const XK_Ohorngrave +#endif +#ifdef XK_ohorngrave +xK_ohorngrave :: KeySym +xK_ohorngrave = #const XK_ohorngrave +#endif +#ifdef XK_Ohornhook +xK_Ohornhook :: KeySym +xK_Ohornhook = #const XK_Ohornhook +#endif +#ifdef XK_ohornhook +xK_ohornhook :: KeySym +xK_ohornhook = #const XK_ohornhook +#endif +#ifdef XK_Ohorntilde +xK_Ohorntilde :: KeySym +xK_Ohorntilde = #const XK_Ohorntilde +#endif +#ifdef XK_ohorntilde +xK_ohorntilde :: KeySym +xK_ohorntilde = #const XK_ohorntilde +#endif +#ifdef XK_Ohornbelowdot +xK_Ohornbelowdot :: KeySym +xK_Ohornbelowdot = #const XK_Ohornbelowdot +#endif +#ifdef XK_ohornbelowdot +xK_ohornbelowdot :: KeySym +xK_ohornbelowdot = #const XK_ohornbelowdot +#endif +#ifdef XK_Ubelowdot +xK_Ubelowdot :: KeySym +xK_Ubelowdot = #const XK_Ubelowdot +#endif +#ifdef XK_ubelowdot +xK_ubelowdot :: KeySym +xK_ubelowdot = #const XK_ubelowdot +#endif +#ifdef XK_Uhook +xK_Uhook :: KeySym +xK_Uhook = #const XK_Uhook +#endif +#ifdef XK_uhook +xK_uhook :: KeySym +xK_uhook = #const XK_uhook +#endif +#ifdef XK_Uhornacute +xK_Uhornacute :: KeySym +xK_Uhornacute = #const XK_Uhornacute +#endif +#ifdef XK_uhornacute +xK_uhornacute :: KeySym +xK_uhornacute = #const XK_uhornacute +#endif +#ifdef XK_Uhorngrave +xK_Uhorngrave :: KeySym +xK_Uhorngrave = #const XK_Uhorngrave +#endif +#ifdef XK_uhorngrave +xK_uhorngrave :: KeySym +xK_uhorngrave = #const XK_uhorngrave +#endif +#ifdef XK_Uhornhook +xK_Uhornhook :: KeySym +xK_Uhornhook = #const XK_Uhornhook +#endif +#ifdef XK_uhornhook +xK_uhornhook :: KeySym +xK_uhornhook = #const XK_uhornhook +#endif +#ifdef XK_Uhorntilde +xK_Uhorntilde :: KeySym +xK_Uhorntilde = #const XK_Uhorntilde +#endif +#ifdef XK_uhorntilde +xK_uhorntilde :: KeySym +xK_uhorntilde = #const XK_uhorntilde +#endif +#ifdef XK_Uhornbelowdot +xK_Uhornbelowdot :: KeySym +xK_Uhornbelowdot = #const XK_Uhornbelowdot +#endif +#ifdef XK_uhornbelowdot +xK_uhornbelowdot :: KeySym +xK_uhornbelowdot = #const XK_uhornbelowdot +#endif +#ifdef XK_Ybelowdot +xK_Ybelowdot :: KeySym +xK_Ybelowdot = #const XK_Ybelowdot +#endif +#ifdef XK_ybelowdot +xK_ybelowdot :: KeySym +xK_ybelowdot = #const XK_ybelowdot +#endif +#ifdef XK_Yhook +xK_Yhook :: KeySym +xK_Yhook = #const XK_Yhook +#endif +#ifdef XK_yhook +xK_yhook :: KeySym +xK_yhook = #const XK_yhook +#endif +#ifdef XK_Ytilde +xK_Ytilde :: KeySym +xK_Ytilde = #const XK_Ytilde +#endif +#ifdef XK_ytilde +xK_ytilde :: KeySym +xK_ytilde = #const XK_ytilde +#endif +#ifdef XK_Ohorn +xK_Ohorn :: KeySym +xK_Ohorn = #const XK_Ohorn +#endif +#ifdef XK_ohorn +xK_ohorn :: KeySym +xK_ohorn = #const XK_ohorn +#endif +#ifdef XK_Uhorn +xK_Uhorn :: KeySym +xK_Uhorn = #const XK_Uhorn +#endif +#ifdef XK_uhorn +xK_uhorn :: KeySym +xK_uhorn = #const XK_uhorn +#endif + +-- XK_CURRENCY +#ifdef XK_EcuSign +xK_EcuSign :: KeySym +xK_EcuSign = #const XK_EcuSign +#endif +#ifdef XK_ColonSign +xK_ColonSign :: KeySym +xK_ColonSign = #const XK_ColonSign +#endif +#ifdef XK_CruzeiroSign +xK_CruzeiroSign :: KeySym +xK_CruzeiroSign = #const XK_CruzeiroSign +#endif +#ifdef XK_FFrancSign +xK_FFrancSign :: KeySym +xK_FFrancSign = #const XK_FFrancSign +#endif +#ifdef XK_LiraSign +xK_LiraSign :: KeySym +xK_LiraSign = #const XK_LiraSign +#endif +#ifdef XK_MillSign +xK_MillSign :: KeySym +xK_MillSign = #const XK_MillSign +#endif +#ifdef XK_NairaSign +xK_NairaSign :: KeySym +xK_NairaSign = #const XK_NairaSign +#endif +#ifdef XK_PesetaSign +xK_PesetaSign :: KeySym +xK_PesetaSign = #const XK_PesetaSign +#endif +#ifdef XK_RupeeSign +xK_RupeeSign :: KeySym +xK_RupeeSign = #const XK_RupeeSign +#endif +#ifdef XK_WonSign +xK_WonSign :: KeySym +xK_WonSign = #const XK_WonSign +#endif +#ifdef XK_NewSheqelSign +xK_NewSheqelSign :: KeySym +xK_NewSheqelSign = #const XK_NewSheqelSign +#endif +#ifdef XK_DongSign +xK_DongSign :: KeySym +xK_DongSign = #const XK_DongSign +#endif +#ifdef XK_EuroSign +xK_EuroSign :: KeySym +xK_EuroSign = #const XK_EuroSign +#endif + +-- XK_MATHEMATICAL +#ifdef XK_zerosuperior +xK_zerosuperior :: KeySym +xK_zerosuperior = #const XK_zerosuperior +#endif +#ifdef XK_foursuperior +xK_foursuperior :: KeySym +xK_foursuperior = #const XK_foursuperior +#endif +#ifdef XK_fivesuperior +xK_fivesuperior :: KeySym +xK_fivesuperior = #const XK_fivesuperior +#endif +#ifdef XK_sixsuperior +xK_sixsuperior :: KeySym +xK_sixsuperior = #const XK_sixsuperior +#endif +#ifdef XK_sevensuperior +xK_sevensuperior :: KeySym +xK_sevensuperior = #const XK_sevensuperior +#endif +#ifdef XK_eightsuperior +xK_eightsuperior :: KeySym +xK_eightsuperior = #const XK_eightsuperior +#endif +#ifdef XK_ninesuperior +xK_ninesuperior :: KeySym +xK_ninesuperior = #const XK_ninesuperior +#endif +#ifdef XK_zerosubscript +xK_zerosubscript :: KeySym +xK_zerosubscript = #const XK_zerosubscript +#endif +#ifdef XK_onesubscript +xK_onesubscript :: KeySym +xK_onesubscript = #const XK_onesubscript +#endif +#ifdef XK_twosubscript +xK_twosubscript :: KeySym +xK_twosubscript = #const XK_twosubscript +#endif +#ifdef XK_threesubscript +xK_threesubscript :: KeySym +xK_threesubscript = #const XK_threesubscript +#endif +#ifdef XK_foursubscript +xK_foursubscript :: KeySym +xK_foursubscript = #const XK_foursubscript +#endif +#ifdef XK_fivesubscript +xK_fivesubscript :: KeySym +xK_fivesubscript = #const XK_fivesubscript +#endif +#ifdef XK_sixsubscript +xK_sixsubscript :: KeySym +xK_sixsubscript = #const XK_sixsubscript +#endif +#ifdef XK_sevensubscript +xK_sevensubscript :: KeySym +xK_sevensubscript = #const XK_sevensubscript +#endif +#ifdef XK_eightsubscript +xK_eightsubscript :: KeySym +xK_eightsubscript = #const XK_eightsubscript +#endif +#ifdef XK_ninesubscript +xK_ninesubscript :: KeySym +xK_ninesubscript = #const XK_ninesubscript +#endif +#ifdef XK_partdifferential +xK_partdifferential :: KeySym +xK_partdifferential = #const XK_partdifferential +#endif +#ifdef XK_emptyset +xK_emptyset :: KeySym +xK_emptyset = #const XK_emptyset +#endif +#ifdef XK_elementof +xK_elementof :: KeySym +xK_elementof = #const XK_elementof +#endif +#ifdef XK_notelementof +xK_notelementof :: KeySym +xK_notelementof = #const XK_notelementof +#endif +#ifdef XK_containsas +xK_containsas :: KeySym +xK_containsas = #const XK_containsas +#endif +#ifdef XK_squareroot +xK_squareroot :: KeySym +xK_squareroot = #const XK_squareroot +#endif +#ifdef XK_cuberoot +xK_cuberoot :: KeySym +xK_cuberoot = #const XK_cuberoot +#endif +#ifdef XK_fourthroot +xK_fourthroot :: KeySym +xK_fourthroot = #const XK_fourthroot +#endif +#ifdef XK_dintegral +xK_dintegral :: KeySym +xK_dintegral = #const XK_dintegral +#endif +#ifdef XK_tintegral +xK_tintegral :: KeySym +xK_tintegral = #const XK_tintegral +#endif +#ifdef XK_because +xK_because :: KeySym +xK_because = #const XK_because +#endif +#ifdef XK_approxeq +xK_approxeq :: KeySym +xK_approxeq = #const XK_approxeq +#endif +#ifdef XK_notapproxeq +xK_notapproxeq :: KeySym +xK_notapproxeq = #const XK_notapproxeq +#endif +#ifdef XK_notidentical +xK_notidentical :: KeySym +xK_notidentical = #const XK_notidentical +#endif +#ifdef XK_stricteq +xK_stricteq :: KeySym +xK_stricteq = #const XK_stricteq +#endif + +-- XK_BRAILLE +#ifdef XK_braille_dot_1 +xK_braille_dot_1 :: KeySym +xK_braille_dot_1 = #const XK_braille_dot_1 +#endif +#ifdef XK_braille_dot_2 +xK_braille_dot_2 :: KeySym +xK_braille_dot_2 = #const XK_braille_dot_2 +#endif +#ifdef XK_braille_dot_3 +xK_braille_dot_3 :: KeySym +xK_braille_dot_3 = #const XK_braille_dot_3 +#endif +#ifdef XK_braille_dot_4 +xK_braille_dot_4 :: KeySym +xK_braille_dot_4 = #const XK_braille_dot_4 +#endif +#ifdef XK_braille_dot_5 +xK_braille_dot_5 :: KeySym +xK_braille_dot_5 = #const XK_braille_dot_5 +#endif +#ifdef XK_braille_dot_6 +xK_braille_dot_6 :: KeySym +xK_braille_dot_6 = #const XK_braille_dot_6 +#endif +#ifdef XK_braille_dot_7 +xK_braille_dot_7 :: KeySym +xK_braille_dot_7 = #const XK_braille_dot_7 +#endif +#ifdef XK_braille_dot_8 +xK_braille_dot_8 :: KeySym +xK_braille_dot_8 = #const XK_braille_dot_8 +#endif +#ifdef XK_braille_dot_9 +xK_braille_dot_9 :: KeySym +xK_braille_dot_9 = #const XK_braille_dot_9 +#endif +#ifdef XK_braille_dot_10 +xK_braille_dot_10 :: KeySym +xK_braille_dot_10 = #const XK_braille_dot_10 +#endif +#ifdef XK_braille_blank +xK_braille_blank :: KeySym +xK_braille_blank = #const XK_braille_blank +#endif +#ifdef XK_braille_dots_1 +xK_braille_dots_1 :: KeySym +xK_braille_dots_1 = #const XK_braille_dots_1 +#endif +#ifdef XK_braille_dots_2 +xK_braille_dots_2 :: KeySym +xK_braille_dots_2 = #const XK_braille_dots_2 +#endif +#ifdef XK_braille_dots_12 +xK_braille_dots_12 :: KeySym +xK_braille_dots_12 = #const XK_braille_dots_12 +#endif +#ifdef XK_braille_dots_3 +xK_braille_dots_3 :: KeySym +xK_braille_dots_3 = #const XK_braille_dots_3 +#endif +#ifdef XK_braille_dots_13 +xK_braille_dots_13 :: KeySym +xK_braille_dots_13 = #const XK_braille_dots_13 +#endif +#ifdef XK_braille_dots_23 +xK_braille_dots_23 :: KeySym +xK_braille_dots_23 = #const XK_braille_dots_23 +#endif +#ifdef XK_braille_dots_123 +xK_braille_dots_123 :: KeySym +xK_braille_dots_123 = #const XK_braille_dots_123 +#endif +#ifdef XK_braille_dots_4 +xK_braille_dots_4 :: KeySym +xK_braille_dots_4 = #const XK_braille_dots_4 +#endif +#ifdef XK_braille_dots_14 +xK_braille_dots_14 :: KeySym +xK_braille_dots_14 = #const XK_braille_dots_14 +#endif +#ifdef XK_braille_dots_24 +xK_braille_dots_24 :: KeySym +xK_braille_dots_24 = #const XK_braille_dots_24 +#endif +#ifdef XK_braille_dots_124 +xK_braille_dots_124 :: KeySym +xK_braille_dots_124 = #const XK_braille_dots_124 +#endif +#ifdef XK_braille_dots_34 +xK_braille_dots_34 :: KeySym +xK_braille_dots_34 = #const XK_braille_dots_34 +#endif +#ifdef XK_braille_dots_134 +xK_braille_dots_134 :: KeySym +xK_braille_dots_134 = #const XK_braille_dots_134 +#endif +#ifdef XK_braille_dots_234 +xK_braille_dots_234 :: KeySym +xK_braille_dots_234 = #const XK_braille_dots_234 +#endif +#ifdef XK_braille_dots_1234 +xK_braille_dots_1234 :: KeySym +xK_braille_dots_1234 = #const XK_braille_dots_1234 +#endif +#ifdef XK_braille_dots_5 +xK_braille_dots_5 :: KeySym +xK_braille_dots_5 = #const XK_braille_dots_5 +#endif +#ifdef XK_braille_dots_15 +xK_braille_dots_15 :: KeySym +xK_braille_dots_15 = #const XK_braille_dots_15 +#endif +#ifdef XK_braille_dots_25 +xK_braille_dots_25 :: KeySym +xK_braille_dots_25 = #const XK_braille_dots_25 +#endif +#ifdef XK_braille_dots_125 +xK_braille_dots_125 :: KeySym +xK_braille_dots_125 = #const XK_braille_dots_125 +#endif +#ifdef XK_braille_dots_35 +xK_braille_dots_35 :: KeySym +xK_braille_dots_35 = #const XK_braille_dots_35 +#endif +#ifdef XK_braille_dots_135 +xK_braille_dots_135 :: KeySym +xK_braille_dots_135 = #const XK_braille_dots_135 +#endif +#ifdef XK_braille_dots_235 +xK_braille_dots_235 :: KeySym +xK_braille_dots_235 = #const XK_braille_dots_235 +#endif +#ifdef XK_braille_dots_1235 +xK_braille_dots_1235 :: KeySym +xK_braille_dots_1235 = #const XK_braille_dots_1235 +#endif +#ifdef XK_braille_dots_45 +xK_braille_dots_45 :: KeySym +xK_braille_dots_45 = #const XK_braille_dots_45 +#endif +#ifdef XK_braille_dots_145 +xK_braille_dots_145 :: KeySym +xK_braille_dots_145 = #const XK_braille_dots_145 +#endif +#ifdef XK_braille_dots_245 +xK_braille_dots_245 :: KeySym +xK_braille_dots_245 = #const XK_braille_dots_245 +#endif +#ifdef XK_braille_dots_1245 +xK_braille_dots_1245 :: KeySym +xK_braille_dots_1245 = #const XK_braille_dots_1245 +#endif +#ifdef XK_braille_dots_345 +xK_braille_dots_345 :: KeySym +xK_braille_dots_345 = #const XK_braille_dots_345 +#endif +#ifdef XK_braille_dots_1345 +xK_braille_dots_1345 :: KeySym +xK_braille_dots_1345 = #const XK_braille_dots_1345 +#endif +#ifdef XK_braille_dots_2345 +xK_braille_dots_2345 :: KeySym +xK_braille_dots_2345 = #const XK_braille_dots_2345 +#endif +#ifdef XK_braille_dots_12345 +xK_braille_dots_12345 :: KeySym +xK_braille_dots_12345 = #const XK_braille_dots_12345 +#endif +#ifdef XK_braille_dots_6 +xK_braille_dots_6 :: KeySym +xK_braille_dots_6 = #const XK_braille_dots_6 +#endif +#ifdef XK_braille_dots_16 +xK_braille_dots_16 :: KeySym +xK_braille_dots_16 = #const XK_braille_dots_16 +#endif +#ifdef XK_braille_dots_26 +xK_braille_dots_26 :: KeySym +xK_braille_dots_26 = #const XK_braille_dots_26 +#endif +#ifdef XK_braille_dots_126 +xK_braille_dots_126 :: KeySym +xK_braille_dots_126 = #const XK_braille_dots_126 +#endif +#ifdef XK_braille_dots_36 +xK_braille_dots_36 :: KeySym +xK_braille_dots_36 = #const XK_braille_dots_36 +#endif +#ifdef XK_braille_dots_136 +xK_braille_dots_136 :: KeySym +xK_braille_dots_136 = #const XK_braille_dots_136 +#endif +#ifdef XK_braille_dots_236 +xK_braille_dots_236 :: KeySym +xK_braille_dots_236 = #const XK_braille_dots_236 +#endif +#ifdef XK_braille_dots_1236 +xK_braille_dots_1236 :: KeySym +xK_braille_dots_1236 = #const XK_braille_dots_1236 +#endif +#ifdef XK_braille_dots_46 +xK_braille_dots_46 :: KeySym +xK_braille_dots_46 = #const XK_braille_dots_46 +#endif +#ifdef XK_braille_dots_146 +xK_braille_dots_146 :: KeySym +xK_braille_dots_146 = #const XK_braille_dots_146 +#endif +#ifdef XK_braille_dots_246 +xK_braille_dots_246 :: KeySym +xK_braille_dots_246 = #const XK_braille_dots_246 +#endif +#ifdef XK_braille_dots_1246 +xK_braille_dots_1246 :: KeySym +xK_braille_dots_1246 = #const XK_braille_dots_1246 +#endif +#ifdef XK_braille_dots_346 +xK_braille_dots_346 :: KeySym +xK_braille_dots_346 = #const XK_braille_dots_346 +#endif +#ifdef XK_braille_dots_1346 +xK_braille_dots_1346 :: KeySym +xK_braille_dots_1346 = #const XK_braille_dots_1346 +#endif +#ifdef XK_braille_dots_2346 +xK_braille_dots_2346 :: KeySym +xK_braille_dots_2346 = #const XK_braille_dots_2346 +#endif +#ifdef XK_braille_dots_12346 +xK_braille_dots_12346 :: KeySym +xK_braille_dots_12346 = #const XK_braille_dots_12346 +#endif +#ifdef XK_braille_dots_56 +xK_braille_dots_56 :: KeySym +xK_braille_dots_56 = #const XK_braille_dots_56 +#endif +#ifdef XK_braille_dots_156 +xK_braille_dots_156 :: KeySym +xK_braille_dots_156 = #const XK_braille_dots_156 +#endif +#ifdef XK_braille_dots_256 +xK_braille_dots_256 :: KeySym +xK_braille_dots_256 = #const XK_braille_dots_256 +#endif +#ifdef XK_braille_dots_1256 +xK_braille_dots_1256 :: KeySym +xK_braille_dots_1256 = #const XK_braille_dots_1256 +#endif +#ifdef XK_braille_dots_356 +xK_braille_dots_356 :: KeySym +xK_braille_dots_356 = #const XK_braille_dots_356 +#endif +#ifdef XK_braille_dots_1356 +xK_braille_dots_1356 :: KeySym +xK_braille_dots_1356 = #const XK_braille_dots_1356 +#endif +#ifdef XK_braille_dots_2356 +xK_braille_dots_2356 :: KeySym +xK_braille_dots_2356 = #const XK_braille_dots_2356 +#endif +#ifdef XK_braille_dots_12356 +xK_braille_dots_12356 :: KeySym +xK_braille_dots_12356 = #const XK_braille_dots_12356 +#endif +#ifdef XK_braille_dots_456 +xK_braille_dots_456 :: KeySym +xK_braille_dots_456 = #const XK_braille_dots_456 +#endif +#ifdef XK_braille_dots_1456 +xK_braille_dots_1456 :: KeySym +xK_braille_dots_1456 = #const XK_braille_dots_1456 +#endif +#ifdef XK_braille_dots_2456 +xK_braille_dots_2456 :: KeySym +xK_braille_dots_2456 = #const XK_braille_dots_2456 +#endif +#ifdef XK_braille_dots_12456 +xK_braille_dots_12456 :: KeySym +xK_braille_dots_12456 = #const XK_braille_dots_12456 +#endif +#ifdef XK_braille_dots_3456 +xK_braille_dots_3456 :: KeySym +xK_braille_dots_3456 = #const XK_braille_dots_3456 +#endif +#ifdef XK_braille_dots_13456 +xK_braille_dots_13456 :: KeySym +xK_braille_dots_13456 = #const XK_braille_dots_13456 +#endif +#ifdef XK_braille_dots_23456 +xK_braille_dots_23456 :: KeySym +xK_braille_dots_23456 = #const XK_braille_dots_23456 +#endif +#ifdef XK_braille_dots_123456 +xK_braille_dots_123456 :: KeySym +xK_braille_dots_123456 = #const XK_braille_dots_123456 +#endif +#ifdef XK_braille_dots_7 +xK_braille_dots_7 :: KeySym +xK_braille_dots_7 = #const XK_braille_dots_7 +#endif +#ifdef XK_braille_dots_17 +xK_braille_dots_17 :: KeySym +xK_braille_dots_17 = #const XK_braille_dots_17 +#endif +#ifdef XK_braille_dots_27 +xK_braille_dots_27 :: KeySym +xK_braille_dots_27 = #const XK_braille_dots_27 +#endif +#ifdef XK_braille_dots_127 +xK_braille_dots_127 :: KeySym +xK_braille_dots_127 = #const XK_braille_dots_127 +#endif +#ifdef XK_braille_dots_37 +xK_braille_dots_37 :: KeySym +xK_braille_dots_37 = #const XK_braille_dots_37 +#endif +#ifdef XK_braille_dots_137 +xK_braille_dots_137 :: KeySym +xK_braille_dots_137 = #const XK_braille_dots_137 +#endif +#ifdef XK_braille_dots_237 +xK_braille_dots_237 :: KeySym +xK_braille_dots_237 = #const XK_braille_dots_237 +#endif +#ifdef XK_braille_dots_1237 +xK_braille_dots_1237 :: KeySym +xK_braille_dots_1237 = #const XK_braille_dots_1237 +#endif +#ifdef XK_braille_dots_47 +xK_braille_dots_47 :: KeySym +xK_braille_dots_47 = #const XK_braille_dots_47 +#endif +#ifdef XK_braille_dots_147 +xK_braille_dots_147 :: KeySym +xK_braille_dots_147 = #const XK_braille_dots_147 +#endif +#ifdef XK_braille_dots_247 +xK_braille_dots_247 :: KeySym +xK_braille_dots_247 = #const XK_braille_dots_247 +#endif +#ifdef XK_braille_dots_1247 +xK_braille_dots_1247 :: KeySym +xK_braille_dots_1247 = #const XK_braille_dots_1247 +#endif +#ifdef XK_braille_dots_347 +xK_braille_dots_347 :: KeySym +xK_braille_dots_347 = #const XK_braille_dots_347 +#endif +#ifdef XK_braille_dots_1347 +xK_braille_dots_1347 :: KeySym +xK_braille_dots_1347 = #const XK_braille_dots_1347 +#endif +#ifdef XK_braille_dots_2347 +xK_braille_dots_2347 :: KeySym +xK_braille_dots_2347 = #const XK_braille_dots_2347 +#endif +#ifdef XK_braille_dots_12347 +xK_braille_dots_12347 :: KeySym +xK_braille_dots_12347 = #const XK_braille_dots_12347 +#endif +#ifdef XK_braille_dots_57 +xK_braille_dots_57 :: KeySym +xK_braille_dots_57 = #const XK_braille_dots_57 +#endif +#ifdef XK_braille_dots_157 +xK_braille_dots_157 :: KeySym +xK_braille_dots_157 = #const XK_braille_dots_157 +#endif +#ifdef XK_braille_dots_257 +xK_braille_dots_257 :: KeySym +xK_braille_dots_257 = #const XK_braille_dots_257 +#endif +#ifdef XK_braille_dots_1257 +xK_braille_dots_1257 :: KeySym +xK_braille_dots_1257 = #const XK_braille_dots_1257 +#endif +#ifdef XK_braille_dots_357 +xK_braille_dots_357 :: KeySym +xK_braille_dots_357 = #const XK_braille_dots_357 +#endif +#ifdef XK_braille_dots_1357 +xK_braille_dots_1357 :: KeySym +xK_braille_dots_1357 = #const XK_braille_dots_1357 +#endif +#ifdef XK_braille_dots_2357 +xK_braille_dots_2357 :: KeySym +xK_braille_dots_2357 = #const XK_braille_dots_2357 +#endif +#ifdef XK_braille_dots_12357 +xK_braille_dots_12357 :: KeySym +xK_braille_dots_12357 = #const XK_braille_dots_12357 +#endif +#ifdef XK_braille_dots_457 +xK_braille_dots_457 :: KeySym +xK_braille_dots_457 = #const XK_braille_dots_457 +#endif +#ifdef XK_braille_dots_1457 +xK_braille_dots_1457 :: KeySym +xK_braille_dots_1457 = #const XK_braille_dots_1457 +#endif +#ifdef XK_braille_dots_2457 +xK_braille_dots_2457 :: KeySym +xK_braille_dots_2457 = #const XK_braille_dots_2457 +#endif +#ifdef XK_braille_dots_12457 +xK_braille_dots_12457 :: KeySym +xK_braille_dots_12457 = #const XK_braille_dots_12457 +#endif +#ifdef XK_braille_dots_3457 +xK_braille_dots_3457 :: KeySym +xK_braille_dots_3457 = #const XK_braille_dots_3457 +#endif +#ifdef XK_braille_dots_13457 +xK_braille_dots_13457 :: KeySym +xK_braille_dots_13457 = #const XK_braille_dots_13457 +#endif +#ifdef XK_braille_dots_23457 +xK_braille_dots_23457 :: KeySym +xK_braille_dots_23457 = #const XK_braille_dots_23457 +#endif +#ifdef XK_braille_dots_123457 +xK_braille_dots_123457 :: KeySym +xK_braille_dots_123457 = #const XK_braille_dots_123457 +#endif +#ifdef XK_braille_dots_67 +xK_braille_dots_67 :: KeySym +xK_braille_dots_67 = #const XK_braille_dots_67 +#endif +#ifdef XK_braille_dots_167 +xK_braille_dots_167 :: KeySym +xK_braille_dots_167 = #const XK_braille_dots_167 +#endif +#ifdef XK_braille_dots_267 +xK_braille_dots_267 :: KeySym +xK_braille_dots_267 = #const XK_braille_dots_267 +#endif +#ifdef XK_braille_dots_1267 +xK_braille_dots_1267 :: KeySym +xK_braille_dots_1267 = #const XK_braille_dots_1267 +#endif +#ifdef XK_braille_dots_367 +xK_braille_dots_367 :: KeySym +xK_braille_dots_367 = #const XK_braille_dots_367 +#endif +#ifdef XK_braille_dots_1367 +xK_braille_dots_1367 :: KeySym +xK_braille_dots_1367 = #const XK_braille_dots_1367 +#endif +#ifdef XK_braille_dots_2367 +xK_braille_dots_2367 :: KeySym +xK_braille_dots_2367 = #const XK_braille_dots_2367 +#endif +#ifdef XK_braille_dots_12367 +xK_braille_dots_12367 :: KeySym +xK_braille_dots_12367 = #const XK_braille_dots_12367 +#endif +#ifdef XK_braille_dots_467 +xK_braille_dots_467 :: KeySym +xK_braille_dots_467 = #const XK_braille_dots_467 +#endif +#ifdef XK_braille_dots_1467 +xK_braille_dots_1467 :: KeySym +xK_braille_dots_1467 = #const XK_braille_dots_1467 +#endif +#ifdef XK_braille_dots_2467 +xK_braille_dots_2467 :: KeySym +xK_braille_dots_2467 = #const XK_braille_dots_2467 +#endif +#ifdef XK_braille_dots_12467 +xK_braille_dots_12467 :: KeySym +xK_braille_dots_12467 = #const XK_braille_dots_12467 +#endif +#ifdef XK_braille_dots_3467 +xK_braille_dots_3467 :: KeySym +xK_braille_dots_3467 = #const XK_braille_dots_3467 +#endif +#ifdef XK_braille_dots_13467 +xK_braille_dots_13467 :: KeySym +xK_braille_dots_13467 = #const XK_braille_dots_13467 +#endif +#ifdef XK_braille_dots_23467 +xK_braille_dots_23467 :: KeySym +xK_braille_dots_23467 = #const XK_braille_dots_23467 +#endif +#ifdef XK_braille_dots_123467 +xK_braille_dots_123467 :: KeySym +xK_braille_dots_123467 = #const XK_braille_dots_123467 +#endif +#ifdef XK_braille_dots_567 +xK_braille_dots_567 :: KeySym +xK_braille_dots_567 = #const XK_braille_dots_567 +#endif +#ifdef XK_braille_dots_1567 +xK_braille_dots_1567 :: KeySym +xK_braille_dots_1567 = #const XK_braille_dots_1567 +#endif +#ifdef XK_braille_dots_2567 +xK_braille_dots_2567 :: KeySym +xK_braille_dots_2567 = #const XK_braille_dots_2567 +#endif +#ifdef XK_braille_dots_12567 +xK_braille_dots_12567 :: KeySym +xK_braille_dots_12567 = #const XK_braille_dots_12567 +#endif +#ifdef XK_braille_dots_3567 +xK_braille_dots_3567 :: KeySym +xK_braille_dots_3567 = #const XK_braille_dots_3567 +#endif +#ifdef XK_braille_dots_13567 +xK_braille_dots_13567 :: KeySym +xK_braille_dots_13567 = #const XK_braille_dots_13567 +#endif +#ifdef XK_braille_dots_23567 +xK_braille_dots_23567 :: KeySym +xK_braille_dots_23567 = #const XK_braille_dots_23567 +#endif +#ifdef XK_braille_dots_123567 +xK_braille_dots_123567 :: KeySym +xK_braille_dots_123567 = #const XK_braille_dots_123567 +#endif +#ifdef XK_braille_dots_4567 +xK_braille_dots_4567 :: KeySym +xK_braille_dots_4567 = #const XK_braille_dots_4567 +#endif +#ifdef XK_braille_dots_14567 +xK_braille_dots_14567 :: KeySym +xK_braille_dots_14567 = #const XK_braille_dots_14567 +#endif +#ifdef XK_braille_dots_24567 +xK_braille_dots_24567 :: KeySym +xK_braille_dots_24567 = #const XK_braille_dots_24567 +#endif +#ifdef XK_braille_dots_124567 +xK_braille_dots_124567 :: KeySym +xK_braille_dots_124567 = #const XK_braille_dots_124567 +#endif +#ifdef XK_braille_dots_34567 +xK_braille_dots_34567 :: KeySym +xK_braille_dots_34567 = #const XK_braille_dots_34567 +#endif +#ifdef XK_braille_dots_134567 +xK_braille_dots_134567 :: KeySym +xK_braille_dots_134567 = #const XK_braille_dots_134567 +#endif +#ifdef XK_braille_dots_234567 +xK_braille_dots_234567 :: KeySym +xK_braille_dots_234567 = #const XK_braille_dots_234567 +#endif +#ifdef XK_braille_dots_1234567 +xK_braille_dots_1234567 :: KeySym +xK_braille_dots_1234567 = #const XK_braille_dots_1234567 +#endif +#ifdef XK_braille_dots_8 +xK_braille_dots_8 :: KeySym +xK_braille_dots_8 = #const XK_braille_dots_8 +#endif +#ifdef XK_braille_dots_18 +xK_braille_dots_18 :: KeySym +xK_braille_dots_18 = #const XK_braille_dots_18 +#endif +#ifdef XK_braille_dots_28 +xK_braille_dots_28 :: KeySym +xK_braille_dots_28 = #const XK_braille_dots_28 +#endif +#ifdef XK_braille_dots_128 +xK_braille_dots_128 :: KeySym +xK_braille_dots_128 = #const XK_braille_dots_128 +#endif +#ifdef XK_braille_dots_38 +xK_braille_dots_38 :: KeySym +xK_braille_dots_38 = #const XK_braille_dots_38 +#endif +#ifdef XK_braille_dots_138 +xK_braille_dots_138 :: KeySym +xK_braille_dots_138 = #const XK_braille_dots_138 +#endif +#ifdef XK_braille_dots_238 +xK_braille_dots_238 :: KeySym +xK_braille_dots_238 = #const XK_braille_dots_238 +#endif +#ifdef XK_braille_dots_1238 +xK_braille_dots_1238 :: KeySym +xK_braille_dots_1238 = #const XK_braille_dots_1238 +#endif +#ifdef XK_braille_dots_48 +xK_braille_dots_48 :: KeySym +xK_braille_dots_48 = #const XK_braille_dots_48 +#endif +#ifdef XK_braille_dots_148 +xK_braille_dots_148 :: KeySym +xK_braille_dots_148 = #const XK_braille_dots_148 +#endif +#ifdef XK_braille_dots_248 +xK_braille_dots_248 :: KeySym +xK_braille_dots_248 = #const XK_braille_dots_248 +#endif +#ifdef XK_braille_dots_1248 +xK_braille_dots_1248 :: KeySym +xK_braille_dots_1248 = #const XK_braille_dots_1248 +#endif +#ifdef XK_braille_dots_348 +xK_braille_dots_348 :: KeySym +xK_braille_dots_348 = #const XK_braille_dots_348 +#endif +#ifdef XK_braille_dots_1348 +xK_braille_dots_1348 :: KeySym +xK_braille_dots_1348 = #const XK_braille_dots_1348 +#endif +#ifdef XK_braille_dots_2348 +xK_braille_dots_2348 :: KeySym +xK_braille_dots_2348 = #const XK_braille_dots_2348 +#endif +#ifdef XK_braille_dots_12348 +xK_braille_dots_12348 :: KeySym +xK_braille_dots_12348 = #const XK_braille_dots_12348 +#endif +#ifdef XK_braille_dots_58 +xK_braille_dots_58 :: KeySym +xK_braille_dots_58 = #const XK_braille_dots_58 +#endif +#ifdef XK_braille_dots_158 +xK_braille_dots_158 :: KeySym +xK_braille_dots_158 = #const XK_braille_dots_158 +#endif +#ifdef XK_braille_dots_258 +xK_braille_dots_258 :: KeySym +xK_braille_dots_258 = #const XK_braille_dots_258 +#endif +#ifdef XK_braille_dots_1258 +xK_braille_dots_1258 :: KeySym +xK_braille_dots_1258 = #const XK_braille_dots_1258 +#endif +#ifdef XK_braille_dots_358 +xK_braille_dots_358 :: KeySym +xK_braille_dots_358 = #const XK_braille_dots_358 +#endif +#ifdef XK_braille_dots_1358 +xK_braille_dots_1358 :: KeySym +xK_braille_dots_1358 = #const XK_braille_dots_1358 +#endif +#ifdef XK_braille_dots_2358 +xK_braille_dots_2358 :: KeySym +xK_braille_dots_2358 = #const XK_braille_dots_2358 +#endif +#ifdef XK_braille_dots_12358 +xK_braille_dots_12358 :: KeySym +xK_braille_dots_12358 = #const XK_braille_dots_12358 +#endif +#ifdef XK_braille_dots_458 +xK_braille_dots_458 :: KeySym +xK_braille_dots_458 = #const XK_braille_dots_458 +#endif +#ifdef XK_braille_dots_1458 +xK_braille_dots_1458 :: KeySym +xK_braille_dots_1458 = #const XK_braille_dots_1458 +#endif +#ifdef XK_braille_dots_2458 +xK_braille_dots_2458 :: KeySym +xK_braille_dots_2458 = #const XK_braille_dots_2458 +#endif +#ifdef XK_braille_dots_12458 +xK_braille_dots_12458 :: KeySym +xK_braille_dots_12458 = #const XK_braille_dots_12458 +#endif +#ifdef XK_braille_dots_3458 +xK_braille_dots_3458 :: KeySym +xK_braille_dots_3458 = #const XK_braille_dots_3458 +#endif +#ifdef XK_braille_dots_13458 +xK_braille_dots_13458 :: KeySym +xK_braille_dots_13458 = #const XK_braille_dots_13458 +#endif +#ifdef XK_braille_dots_23458 +xK_braille_dots_23458 :: KeySym +xK_braille_dots_23458 = #const XK_braille_dots_23458 +#endif +#ifdef XK_braille_dots_123458 +xK_braille_dots_123458 :: KeySym +xK_braille_dots_123458 = #const XK_braille_dots_123458 +#endif +#ifdef XK_braille_dots_68 +xK_braille_dots_68 :: KeySym +xK_braille_dots_68 = #const XK_braille_dots_68 +#endif +#ifdef XK_braille_dots_168 +xK_braille_dots_168 :: KeySym +xK_braille_dots_168 = #const XK_braille_dots_168 +#endif +#ifdef XK_braille_dots_268 +xK_braille_dots_268 :: KeySym +xK_braille_dots_268 = #const XK_braille_dots_268 +#endif +#ifdef XK_braille_dots_1268 +xK_braille_dots_1268 :: KeySym +xK_braille_dots_1268 = #const XK_braille_dots_1268 +#endif +#ifdef XK_braille_dots_368 +xK_braille_dots_368 :: KeySym +xK_braille_dots_368 = #const XK_braille_dots_368 +#endif +#ifdef XK_braille_dots_1368 +xK_braille_dots_1368 :: KeySym +xK_braille_dots_1368 = #const XK_braille_dots_1368 +#endif +#ifdef XK_braille_dots_2368 +xK_braille_dots_2368 :: KeySym +xK_braille_dots_2368 = #const XK_braille_dots_2368 +#endif +#ifdef XK_braille_dots_12368 +xK_braille_dots_12368 :: KeySym +xK_braille_dots_12368 = #const XK_braille_dots_12368 +#endif +#ifdef XK_braille_dots_468 +xK_braille_dots_468 :: KeySym +xK_braille_dots_468 = #const XK_braille_dots_468 +#endif +#ifdef XK_braille_dots_1468 +xK_braille_dots_1468 :: KeySym +xK_braille_dots_1468 = #const XK_braille_dots_1468 +#endif +#ifdef XK_braille_dots_2468 +xK_braille_dots_2468 :: KeySym +xK_braille_dots_2468 = #const XK_braille_dots_2468 +#endif +#ifdef XK_braille_dots_12468 +xK_braille_dots_12468 :: KeySym +xK_braille_dots_12468 = #const XK_braille_dots_12468 +#endif +#ifdef XK_braille_dots_3468 +xK_braille_dots_3468 :: KeySym +xK_braille_dots_3468 = #const XK_braille_dots_3468 +#endif +#ifdef XK_braille_dots_13468 +xK_braille_dots_13468 :: KeySym +xK_braille_dots_13468 = #const XK_braille_dots_13468 +#endif +#ifdef XK_braille_dots_23468 +xK_braille_dots_23468 :: KeySym +xK_braille_dots_23468 = #const XK_braille_dots_23468 +#endif +#ifdef XK_braille_dots_123468 +xK_braille_dots_123468 :: KeySym +xK_braille_dots_123468 = #const XK_braille_dots_123468 +#endif +#ifdef XK_braille_dots_568 +xK_braille_dots_568 :: KeySym +xK_braille_dots_568 = #const XK_braille_dots_568 +#endif +#ifdef XK_braille_dots_1568 +xK_braille_dots_1568 :: KeySym +xK_braille_dots_1568 = #const XK_braille_dots_1568 +#endif +#ifdef XK_braille_dots_2568 +xK_braille_dots_2568 :: KeySym +xK_braille_dots_2568 = #const XK_braille_dots_2568 +#endif +#ifdef XK_braille_dots_12568 +xK_braille_dots_12568 :: KeySym +xK_braille_dots_12568 = #const XK_braille_dots_12568 +#endif +#ifdef XK_braille_dots_3568 +xK_braille_dots_3568 :: KeySym +xK_braille_dots_3568 = #const XK_braille_dots_3568 +#endif +#ifdef XK_braille_dots_13568 +xK_braille_dots_13568 :: KeySym +xK_braille_dots_13568 = #const XK_braille_dots_13568 +#endif +#ifdef XK_braille_dots_23568 +xK_braille_dots_23568 :: KeySym +xK_braille_dots_23568 = #const XK_braille_dots_23568 +#endif +#ifdef XK_braille_dots_123568 +xK_braille_dots_123568 :: KeySym +xK_braille_dots_123568 = #const XK_braille_dots_123568 +#endif +#ifdef XK_braille_dots_4568 +xK_braille_dots_4568 :: KeySym +xK_braille_dots_4568 = #const XK_braille_dots_4568 +#endif +#ifdef XK_braille_dots_14568 +xK_braille_dots_14568 :: KeySym +xK_braille_dots_14568 = #const XK_braille_dots_14568 +#endif +#ifdef XK_braille_dots_24568 +xK_braille_dots_24568 :: KeySym +xK_braille_dots_24568 = #const XK_braille_dots_24568 +#endif +#ifdef XK_braille_dots_124568 +xK_braille_dots_124568 :: KeySym +xK_braille_dots_124568 = #const XK_braille_dots_124568 +#endif +#ifdef XK_braille_dots_34568 +xK_braille_dots_34568 :: KeySym +xK_braille_dots_34568 = #const XK_braille_dots_34568 +#endif +#ifdef XK_braille_dots_134568 +xK_braille_dots_134568 :: KeySym +xK_braille_dots_134568 = #const XK_braille_dots_134568 +#endif +#ifdef XK_braille_dots_234568 +xK_braille_dots_234568 :: KeySym +xK_braille_dots_234568 = #const XK_braille_dots_234568 +#endif +#ifdef XK_braille_dots_1234568 +xK_braille_dots_1234568 :: KeySym +xK_braille_dots_1234568 = #const XK_braille_dots_1234568 +#endif +#ifdef XK_braille_dots_78 +xK_braille_dots_78 :: KeySym +xK_braille_dots_78 = #const XK_braille_dots_78 +#endif +#ifdef XK_braille_dots_178 +xK_braille_dots_178 :: KeySym +xK_braille_dots_178 = #const XK_braille_dots_178 +#endif +#ifdef XK_braille_dots_278 +xK_braille_dots_278 :: KeySym +xK_braille_dots_278 = #const XK_braille_dots_278 +#endif +#ifdef XK_braille_dots_1278 +xK_braille_dots_1278 :: KeySym +xK_braille_dots_1278 = #const XK_braille_dots_1278 +#endif +#ifdef XK_braille_dots_378 +xK_braille_dots_378 :: KeySym +xK_braille_dots_378 = #const XK_braille_dots_378 +#endif +#ifdef XK_braille_dots_1378 +xK_braille_dots_1378 :: KeySym +xK_braille_dots_1378 = #const XK_braille_dots_1378 +#endif +#ifdef XK_braille_dots_2378 +xK_braille_dots_2378 :: KeySym +xK_braille_dots_2378 = #const XK_braille_dots_2378 +#endif +#ifdef XK_braille_dots_12378 +xK_braille_dots_12378 :: KeySym +xK_braille_dots_12378 = #const XK_braille_dots_12378 +#endif +#ifdef XK_braille_dots_478 +xK_braille_dots_478 :: KeySym +xK_braille_dots_478 = #const XK_braille_dots_478 +#endif +#ifdef XK_braille_dots_1478 +xK_braille_dots_1478 :: KeySym +xK_braille_dots_1478 = #const XK_braille_dots_1478 +#endif +#ifdef XK_braille_dots_2478 +xK_braille_dots_2478 :: KeySym +xK_braille_dots_2478 = #const XK_braille_dots_2478 +#endif +#ifdef XK_braille_dots_12478 +xK_braille_dots_12478 :: KeySym +xK_braille_dots_12478 = #const XK_braille_dots_12478 +#endif +#ifdef XK_braille_dots_3478 +xK_braille_dots_3478 :: KeySym +xK_braille_dots_3478 = #const XK_braille_dots_3478 +#endif +#ifdef XK_braille_dots_13478 +xK_braille_dots_13478 :: KeySym +xK_braille_dots_13478 = #const XK_braille_dots_13478 +#endif +#ifdef XK_braille_dots_23478 +xK_braille_dots_23478 :: KeySym +xK_braille_dots_23478 = #const XK_braille_dots_23478 +#endif +#ifdef XK_braille_dots_123478 +xK_braille_dots_123478 :: KeySym +xK_braille_dots_123478 = #const XK_braille_dots_123478 +#endif +#ifdef XK_braille_dots_578 +xK_braille_dots_578 :: KeySym +xK_braille_dots_578 = #const XK_braille_dots_578 +#endif +#ifdef XK_braille_dots_1578 +xK_braille_dots_1578 :: KeySym +xK_braille_dots_1578 = #const XK_braille_dots_1578 +#endif +#ifdef XK_braille_dots_2578 +xK_braille_dots_2578 :: KeySym +xK_braille_dots_2578 = #const XK_braille_dots_2578 +#endif +#ifdef XK_braille_dots_12578 +xK_braille_dots_12578 :: KeySym +xK_braille_dots_12578 = #const XK_braille_dots_12578 +#endif +#ifdef XK_braille_dots_3578 +xK_braille_dots_3578 :: KeySym +xK_braille_dots_3578 = #const XK_braille_dots_3578 +#endif +#ifdef XK_braille_dots_13578 +xK_braille_dots_13578 :: KeySym +xK_braille_dots_13578 = #const XK_braille_dots_13578 +#endif +#ifdef XK_braille_dots_23578 +xK_braille_dots_23578 :: KeySym +xK_braille_dots_23578 = #const XK_braille_dots_23578 +#endif +#ifdef XK_braille_dots_123578 +xK_braille_dots_123578 :: KeySym +xK_braille_dots_123578 = #const XK_braille_dots_123578 +#endif +#ifdef XK_braille_dots_4578 +xK_braille_dots_4578 :: KeySym +xK_braille_dots_4578 = #const XK_braille_dots_4578 +#endif +#ifdef XK_braille_dots_14578 +xK_braille_dots_14578 :: KeySym +xK_braille_dots_14578 = #const XK_braille_dots_14578 +#endif +#ifdef XK_braille_dots_24578 +xK_braille_dots_24578 :: KeySym +xK_braille_dots_24578 = #const XK_braille_dots_24578 +#endif +#ifdef XK_braille_dots_124578 +xK_braille_dots_124578 :: KeySym +xK_braille_dots_124578 = #const XK_braille_dots_124578 +#endif +#ifdef XK_braille_dots_34578 +xK_braille_dots_34578 :: KeySym +xK_braille_dots_34578 = #const XK_braille_dots_34578 +#endif +#ifdef XK_braille_dots_134578 +xK_braille_dots_134578 :: KeySym +xK_braille_dots_134578 = #const XK_braille_dots_134578 +#endif +#ifdef XK_braille_dots_234578 +xK_braille_dots_234578 :: KeySym +xK_braille_dots_234578 = #const XK_braille_dots_234578 +#endif +#ifdef XK_braille_dots_1234578 +xK_braille_dots_1234578 :: KeySym +xK_braille_dots_1234578 = #const XK_braille_dots_1234578 +#endif +#ifdef XK_braille_dots_678 +xK_braille_dots_678 :: KeySym +xK_braille_dots_678 = #const XK_braille_dots_678 +#endif +#ifdef XK_braille_dots_1678 +xK_braille_dots_1678 :: KeySym +xK_braille_dots_1678 = #const XK_braille_dots_1678 +#endif +#ifdef XK_braille_dots_2678 +xK_braille_dots_2678 :: KeySym +xK_braille_dots_2678 = #const XK_braille_dots_2678 +#endif +#ifdef XK_braille_dots_12678 +xK_braille_dots_12678 :: KeySym +xK_braille_dots_12678 = #const XK_braille_dots_12678 +#endif +#ifdef XK_braille_dots_3678 +xK_braille_dots_3678 :: KeySym +xK_braille_dots_3678 = #const XK_braille_dots_3678 +#endif +#ifdef XK_braille_dots_13678 +xK_braille_dots_13678 :: KeySym +xK_braille_dots_13678 = #const XK_braille_dots_13678 +#endif +#ifdef XK_braille_dots_23678 +xK_braille_dots_23678 :: KeySym +xK_braille_dots_23678 = #const XK_braille_dots_23678 +#endif +#ifdef XK_braille_dots_123678 +xK_braille_dots_123678 :: KeySym +xK_braille_dots_123678 = #const XK_braille_dots_123678 +#endif +#ifdef XK_braille_dots_4678 +xK_braille_dots_4678 :: KeySym +xK_braille_dots_4678 = #const XK_braille_dots_4678 +#endif +#ifdef XK_braille_dots_14678 +xK_braille_dots_14678 :: KeySym +xK_braille_dots_14678 = #const XK_braille_dots_14678 +#endif +#ifdef XK_braille_dots_24678 +xK_braille_dots_24678 :: KeySym +xK_braille_dots_24678 = #const XK_braille_dots_24678 +#endif +#ifdef XK_braille_dots_124678 +xK_braille_dots_124678 :: KeySym +xK_braille_dots_124678 = #const XK_braille_dots_124678 +#endif +#ifdef XK_braille_dots_34678 +xK_braille_dots_34678 :: KeySym +xK_braille_dots_34678 = #const XK_braille_dots_34678 +#endif +#ifdef XK_braille_dots_134678 +xK_braille_dots_134678 :: KeySym +xK_braille_dots_134678 = #const XK_braille_dots_134678 +#endif +#ifdef XK_braille_dots_234678 +xK_braille_dots_234678 :: KeySym +xK_braille_dots_234678 = #const XK_braille_dots_234678 +#endif +#ifdef XK_braille_dots_1234678 +xK_braille_dots_1234678 :: KeySym +xK_braille_dots_1234678 = #const XK_braille_dots_1234678 +#endif +#ifdef XK_braille_dots_5678 +xK_braille_dots_5678 :: KeySym +xK_braille_dots_5678 = #const XK_braille_dots_5678 +#endif +#ifdef XK_braille_dots_15678 +xK_braille_dots_15678 :: KeySym +xK_braille_dots_15678 = #const XK_braille_dots_15678 +#endif +#ifdef XK_braille_dots_25678 +xK_braille_dots_25678 :: KeySym +xK_braille_dots_25678 = #const XK_braille_dots_25678 +#endif +#ifdef XK_braille_dots_125678 +xK_braille_dots_125678 :: KeySym +xK_braille_dots_125678 = #const XK_braille_dots_125678 +#endif +#ifdef XK_braille_dots_35678 +xK_braille_dots_35678 :: KeySym +xK_braille_dots_35678 = #const XK_braille_dots_35678 +#endif +#ifdef XK_braille_dots_135678 +xK_braille_dots_135678 :: KeySym +xK_braille_dots_135678 = #const XK_braille_dots_135678 +#endif +#ifdef XK_braille_dots_235678 +xK_braille_dots_235678 :: KeySym +xK_braille_dots_235678 = #const XK_braille_dots_235678 +#endif +#ifdef XK_braille_dots_1235678 +xK_braille_dots_1235678 :: KeySym +xK_braille_dots_1235678 = #const XK_braille_dots_1235678 +#endif +#ifdef XK_braille_dots_45678 +xK_braille_dots_45678 :: KeySym +xK_braille_dots_45678 = #const XK_braille_dots_45678 +#endif +#ifdef XK_braille_dots_145678 +xK_braille_dots_145678 :: KeySym +xK_braille_dots_145678 = #const XK_braille_dots_145678 +#endif +#ifdef XK_braille_dots_245678 +xK_braille_dots_245678 :: KeySym +xK_braille_dots_245678 = #const XK_braille_dots_245678 +#endif +#ifdef XK_braille_dots_1245678 +xK_braille_dots_1245678 :: KeySym +xK_braille_dots_1245678 = #const XK_braille_dots_1245678 +#endif +#ifdef XK_braille_dots_345678 +xK_braille_dots_345678 :: KeySym +xK_braille_dots_345678 = #const XK_braille_dots_345678 +#endif +#ifdef XK_braille_dots_1345678 +xK_braille_dots_1345678 :: KeySym +xK_braille_dots_1345678 = #const XK_braille_dots_1345678 +#endif +#ifdef XK_braille_dots_2345678 +xK_braille_dots_2345678 :: KeySym +xK_braille_dots_2345678 = #const XK_braille_dots_2345678 +#endif +#ifdef XK_braille_dots_12345678 +xK_braille_dots_12345678 :: KeySym +xK_braille_dots_12345678 = #const XK_braille_dots_12345678 +#endif hunk ./Graphics/X11/Types.hsc 52 + + -- SunOS does not define these. +#ifdef XK_Codeinput + xK_Codeinput, +#endif +#ifdef XK_SingleCandidate + xK_SingleCandidate, +#endif +#ifdef XK_MultipleCandidate + xK_MultipleCandidate, +#endif +#ifdef XK_PreviousCandidate + xK_PreviousCandidate, +#endif hunk ./Graphics/X11/Types.hsc 858 --- xK_Codeinput = XK_Codeinput -- Not defined for SunOS. --- xK_SingleCandidate = XK_SingleCandidate -- Not defined for SunOS. --- xK_MultipleCandidate = XK_MultipleCandidate -- Not defined for SunOS. --- xK_PreviousCandidate = XK_PreviousCandidate -- Not defined for SunOS. + +-- Not defined for SunOS +#ifdef XK_Codeinput +xK_Codeinput :: KeySym +xK_Codeinput = #const XK_Codeinput +#endif +#ifdef XK_SingleCandidate +xK_SingleCandidate :: KeySym +xK_SingleCandidate = #const XK_SingleCandidate +#endif +#ifdef XK_MultipleCandidate +xK_MultipleCandidate :: KeySym +xK_MultipleCandidate = #const XK_MultipleCandidate +#endif +#ifdef XK_PreviousCandidate +xK_PreviousCandidate :: KeySym +xK_PreviousCandidate = #const XK_PreviousCandidate +#endif hunk ./X11.cabal 19 + include/HsAllKeysyms.h hunk ./X11.cabal 42 + Graphics.X11.ExtraTypes, + Graphics.X11.ExtraTypes.AP, + Graphics.X11.ExtraTypes.DEC, + Graphics.X11.ExtraTypes.HP, + Graphics.X11.ExtraTypes.Sun + Graphics.X11.ExtraTypes.XF86, + Graphics.X11.ExtraTypes.XorgDefault hunk ./X11.cabal 56 -includes: HsXlib.h -install-includes: HsXlib.h, XlibExtras.h +includes: HsXlib.h, HsAllKeysyms.h +install-includes: HsXlib.h, XlibExtras.h, HsAllKeysyms.h hunk ./configure.ac 42 + hunk ./configure.ac 53 - hunk ./configure.ac 76 +AC_MSG_CHECKING([whether to include X.org keysyms]) +AC_ARG_WITH(xorg-keysym, + AS_HELP_STRING([--without-xorg-keysym], [do not build X.org keysym support]), + [], + [with_xorg_keysym=yes]) +AC_MSG_RESULT([$with_xorg_keysym]) + +if test "$with_xorg_keysym" = yes; then + AC_CHECK_HEADERS([X11/keysym.h], [have_keysym=yes]) + if ! test "$have_keysym" = yes; then + echo "WARNING: Couldn't find for X.org keysyms" + fi + + AC_CHECK_HEADERS([X11/DECkeysym.h], [have_dec_keysym=yes]) + if ! test "$have_dec_keysym" = yes; then + echo "WARNING: Couldn't find for X.org keysyms" + fi + + AC_CHECK_HEADERS([X11/Sunkeysym.h], [have_sun_keysym=yes]) + if ! test "$have_sun_keysym" = yes; then + echo "WARNING: Couldn't find for X.org keysyms" + fi + + AC_CHECK_HEADERS([X11/ap_keysym.h], [have_ap_keysym=yes]) + if ! test "$have_ap_keysym" = yes; then + echo "WARNING: Couldn't find for X.org keysyms" + fi + + AC_CHECK_HEADERS([X11/HPkeysym.h], [have_hp_keysym=yes]) + if ! test "$have_hp_keysym" = yes; then + echo "WARNING: Couldn't find for X.org keysyms" + fi + + AC_CHECK_HEADERS([X11/XF86keysym.h], [have_xf86_keysym=yes]) + if ! test "$have_xf86_keysym" = yes; then + echo "WARNING: Couldn't find for X.org keysyms" + fi + + AC_CHECK_HEADERS([X11/keysymdef.h], [have_keysymdef=yes]) + if ! test "$have_keysymdef" = yes; then + echo "WARNING: Couldn't find for X.org keysyms" + fi +fi + + + addfile ./include/HsAllKeysyms.h hunk ./include/HsAllKeysyms.h 1 +#ifndef HSALLKEYSYMS_H +#define HSALLKEYSYMS_H 1 + +#include "HsX11Config.h" + +/* Defaults */ +#if HAVE_X11_KEYSYM_H +# include +#elif HAVE_X11_KEYSYMDEF_H +/* Everything in X.org by default */ +# define XK_MISCELLANY +# define XK_XKB_KEYS +# define XK_LATIN1 +# define XK_LATIN2 +# define XK_LATIN3 +# define XK_LATIN4 +# define XK_LATIN8 +# define XK_LATIN9 +# define XK_CAUCASUS +# define XK_GREEK +# define XK_KATAKANA +# define XK_ARABIC +# define XK_CYRILLIC +# define XK_HEBREW +# define XK_THAI +# define XK_KOREAN +# define XK_ARMENIAN +# define XK_GEORGIAN +# define XK_VIETNAMESE +# define XK_CURRENCY +# define XK_MATHEMATICAL +# define XK_BRAILLE + +# include +#endif + +/* Vendor specific */ +#if HAVE_X11_DECKEYSYM_H +# include +#endif +#if HAVE_X11_SUNKEYSYM_H +# include +#endif +#if HAVE_X11_AP_KEYSYM_H +# include +#endif +#if HAVE_X11_HPKEYSYM_H +# include +#endif +#if HAVE_X11_XF86KEYSYM_H +# include +#endif + +#include + +#endif /* HSALLKEYSYMS_H */ hunk ./include/HsX11Config.h.in 30 +/* Define to 1 if you have the header file. */ +#undef HAVE_X11_AP_KEYSYM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_X11_DECKEYSYM_H + hunk ./include/HsX11Config.h.in 39 +/* Define to 1 if you have the header file. */ +#undef HAVE_X11_HPKEYSYM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_X11_KEYSYMDEF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_X11_KEYSYM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_X11_SUNKEYSYM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_X11_XF86KEYSYM_H + hunk ./Graphics/X11/Xlib/Extras.hsc 1452 +foreign import ccall unsafe "HsXlib.h XGetCommand" + xGetCommand :: Display -> Window -> Ptr (Ptr CWString) -> Ptr CInt -> IO Status + +getCommand :: Display -> Window -> IO [String] +getCommand d w = + alloca $ + \argvp -> + alloca $ + \argcp -> + do + throwIf (success >) (\status -> "xGetCommand returned status: " ++ show status) $ xGetCommand d w argvp argcp + argc <- peek argcp + argv <- peek argvp + texts <- flip mapM [0 .. fromIntegral $ pred argc] $ \i -> peekElemOff argv i >>= peekCWString + wcFreeStringList argv + return texts + hunk ./X11.cabal 2 -version: 1.4.2 +version: 1.4.3 hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.4.2], [dons@galois.com], [X11]) +AC_INIT([Haskell X11 package], [1.4.3], [dons@galois.com], [X11]) hunk ./X11.cabal 2 -version: 1.4.3 +version: 1.4.4 hunk ./X11.cabal 58 -build-depends: base +build-depends: base >= 3 && < 4 hunk ./Graphics/X11/Xlib/Extras.hsc 1327 - else peek p + else do x <- peek p; xFree p; return x hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.4.3], [dons@galois.com], [X11]) +AC_INIT([Haskell X11 package], [1.4.4], [dons@galois.com], [X11]) hunk ./X11.cabal 2 -version: 1.4.4 +version: 1.4.5 hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.4.4], [dons@galois.com], [X11]) +AC_INIT([Haskell X11 package], [1.4.5], [dons@galois.com], [X11]) addfile ./Graphics/X11/Xlib/Cursor.hsc hunk ./Graphics/X11/Xlib/Cursor.hsc 1 +----------------------------------------------------------------------------- +-- | +-- Module : Graphics.X11.Xlib.Cursor +-- Copyright : (C) Collabora Ltd 2009 +-- License : BSD-style (see the file libraries/base/LICENSE) +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- A collection of cursor types defined by /usr/include/X11/cursorfont.h. +-- +----------------------------------------------------------------------------- + +module Graphics.X11.Xlib.Cursor( + + xC_X_cursor, + xC_arrow, + xC_based_arrow_down, + xC_based_arrow_up, + xC_boat, + xC_bogosity, + xC_bottom_left_corner, + xC_bottom_right_corner, + xC_bottom_side, + xC_bottom_tee, + xC_box_spiral, + xC_center_ptr, + xC_circle, + xC_clock, + xC_coffee_mug, + xC_cross, + xC_cross_reverse, + xC_crosshair, + xC_diamond_cross, + xC_dot, + xC_dotbox, + xC_double_arrow, + xC_draft_large, + xC_draft_small, + xC_draped_box, + xC_exchange, + xC_fleur, + xC_gobbler, + xC_gumby, + xC_hand1, + xC_hand2, + xC_heart, + xC_icon, + xC_iron_cross, + xC_left_ptr, + xC_left_side, + xC_left_tee, + xC_leftbutton, + xC_ll_angle, + xC_lr_angle, + xC_man, + xC_mouse, + xC_pencil, + xC_pirate, + xC_plus, + xC_question_arrow, + xC_right_ptr, + xC_right_side, + xC_right_tee, + xC_rightbutton, + xC_rtl_logo, + xC_sailboat, + xC_sb_down_arrow, + xC_sb_h_double_arrow, + xC_sb_left_arrow, + xC_sb_right_arrow, + xC_sb_up_arrow, + xC_sb_v_double_arrow, + xC_shuttle, + xC_sizing, + xC_spider, + xC_spraycan, + xC_star, + xC_target, + xC_tcross, + xC_top_left_arrow, + xC_top_left_corner, + xC_top_right_corner, + xC_top_side, + xC_top_tee, + xC_trek, + xC_ul_angle, + xC_umbrella, + xC_ur_angle, + xC_watch, + xC_xterm, + + ) where + +import Graphics.X11.Xlib.Font + +---------------------------------------------------------------- +-- Cursors +---------------------------------------------------------------- + +#include "HsXlib.h" + +xC_X_cursor :: Glyph +xC_X_cursor = #const XC_X_cursor + +xC_arrow :: Glyph +xC_arrow = #const XC_arrow + +xC_based_arrow_down :: Glyph +xC_based_arrow_down = #const XC_based_arrow_down + +xC_based_arrow_up :: Glyph +xC_based_arrow_up = #const XC_based_arrow_up + +xC_boat :: Glyph +xC_boat = #const XC_boat + +xC_bogosity :: Glyph +xC_bogosity = #const XC_bogosity + +xC_bottom_left_corner :: Glyph +xC_bottom_left_corner = #const XC_bottom_left_corner + +xC_bottom_right_corner :: Glyph +xC_bottom_right_corner = #const XC_bottom_right_corner + +xC_bottom_side :: Glyph +xC_bottom_side = #const XC_bottom_side + +xC_bottom_tee :: Glyph +xC_bottom_tee = #const XC_bottom_tee + +xC_box_spiral :: Glyph +xC_box_spiral = #const XC_box_spiral + +xC_center_ptr :: Glyph +xC_center_ptr = #const XC_center_ptr + +xC_circle :: Glyph +xC_circle = #const XC_circle + +xC_clock :: Glyph +xC_clock = #const XC_clock + +xC_coffee_mug :: Glyph +xC_coffee_mug = #const XC_coffee_mug + +xC_cross :: Glyph +xC_cross = #const XC_cross + +xC_cross_reverse :: Glyph +xC_cross_reverse = #const XC_cross_reverse + +xC_crosshair :: Glyph +xC_crosshair = #const XC_crosshair + +xC_diamond_cross :: Glyph +xC_diamond_cross = #const XC_diamond_cross + +xC_dot :: Glyph +xC_dot = #const XC_dot + +xC_dotbox :: Glyph +xC_dotbox = #const XC_dotbox + +xC_double_arrow :: Glyph +xC_double_arrow = #const XC_double_arrow + +xC_draft_large :: Glyph +xC_draft_large = #const XC_draft_large + +xC_draft_small :: Glyph +xC_draft_small = #const XC_draft_small + +xC_draped_box :: Glyph +xC_draped_box = #const XC_draped_box + +xC_exchange :: Glyph +xC_exchange = #const XC_exchange + +xC_fleur :: Glyph +xC_fleur = #const XC_fleur + +xC_gobbler :: Glyph +xC_gobbler = #const XC_gobbler + +xC_gumby :: Glyph +xC_gumby = #const XC_gumby + +xC_hand1 :: Glyph +xC_hand1 = #const XC_hand1 + +xC_hand2 :: Glyph +xC_hand2 = #const XC_hand2 + +xC_heart :: Glyph +xC_heart = #const XC_heart + +xC_icon :: Glyph +xC_icon = #const XC_icon + +xC_iron_cross :: Glyph +xC_iron_cross = #const XC_iron_cross + +xC_left_ptr :: Glyph +xC_left_ptr = #const XC_left_ptr + +xC_left_side :: Glyph +xC_left_side = #const XC_left_side + +xC_left_tee :: Glyph +xC_left_tee = #const XC_left_tee + +xC_leftbutton :: Glyph +xC_leftbutton = #const XC_leftbutton + +xC_ll_angle :: Glyph +xC_ll_angle = #const XC_ll_angle + +xC_lr_angle :: Glyph +xC_lr_angle = #const XC_lr_angle + +xC_man :: Glyph +xC_man = #const XC_man + +xC_middlebutton :: Glyph +xC_middlebutton = #const XC_middlebutton + +xC_mouse :: Glyph +xC_mouse = #const XC_mouse + +xC_pencil :: Glyph +xC_pencil = #const XC_pencil + +xC_pirate :: Glyph +xC_pirate = #const XC_pirate + +xC_plus :: Glyph +xC_plus = #const XC_plus + +xC_question_arrow :: Glyph +xC_question_arrow = #const XC_question_arrow + +xC_right_ptr :: Glyph +xC_right_ptr = #const XC_right_ptr + +xC_right_side :: Glyph +xC_right_side = #const XC_right_side + +xC_right_tee :: Glyph +xC_right_tee = #const XC_right_tee + +xC_rightbutton :: Glyph +xC_rightbutton = #const XC_rightbutton + +xC_rtl_logo :: Glyph +xC_rtl_logo = #const XC_rtl_logo + +xC_sailboat :: Glyph +xC_sailboat = #const XC_sailboat + +xC_sb_down_arrow :: Glyph +xC_sb_down_arrow = #const XC_sb_down_arrow + +xC_sb_h_double_arrow :: Glyph +xC_sb_h_double_arrow = #const XC_sb_h_double_arrow + +xC_sb_left_arrow :: Glyph +xC_sb_left_arrow = #const XC_sb_left_arrow + +xC_sb_right_arrow :: Glyph +xC_sb_right_arrow = #const XC_sb_right_arrow + +xC_sb_up_arrow :: Glyph +xC_sb_up_arrow = #const XC_sb_up_arrow + +xC_sb_v_double_arrow :: Glyph +xC_sb_v_double_arrow = #const XC_sb_v_double_arrow + +xC_shuttle :: Glyph +xC_shuttle = #const XC_shuttle + +xC_sizing :: Glyph +xC_sizing = #const XC_sizing + +xC_spider :: Glyph +xC_spider = #const XC_spider + +xC_spraycan :: Glyph +xC_spraycan = #const XC_spraycan + +xC_star :: Glyph +xC_star = #const XC_star + +xC_target :: Glyph +xC_target = #const XC_target + +xC_tcross :: Glyph +xC_tcross = #const XC_tcross + +xC_top_left_arrow :: Glyph +xC_top_left_arrow = #const XC_top_left_arrow + +xC_top_left_corner :: Glyph +xC_top_left_corner = #const XC_top_left_corner + +xC_top_right_corner :: Glyph +xC_top_right_corner = #const XC_top_right_corner + +xC_top_side :: Glyph +xC_top_side = #const XC_top_side + +xC_top_tee :: Glyph +xC_top_tee = #const XC_top_tee + +xC_trek :: Glyph +xC_trek = #const XC_trek + +xC_ul_angle :: Glyph +xC_ul_angle = #const XC_ul_angle + +xC_umbrella :: Glyph +xC_umbrella = #const XC_umbrella + +xC_ur_angle :: Glyph +xC_ur_angle = #const XC_ur_angle + +xC_watch :: Glyph +xC_watch = #const XC_watch + +xC_xterm :: Glyph +xC_xterm = #const XC_xterm + +---------------------------------------------------------------- +-- End +---------------------------------------------------------------- hunk ./Makefile.nhc98 12 + Graphics/X11/Xlib/Cursor.hsc \ hunk ./X11.cabal 31 + Graphics.X11.Xlib.Cursor, hunk ./configure.ac 118 + + AC_CHECK_HEADERS([X11/cursorfont.h], [have_cursorfont=yes]) + if ! test "$have_cursorfont" = yes; then + AC_MSG_ERROR([X11/cursorfont.h (from libx11) is required]) + fi hunk ./include/HsXlib.h 40 +#include + hunk ./X11.cabal 2 -version: 1.4.5 +version: 1.4.6 hunk ./X11.cabal 5 -copyright: Alastair Reid, 1999-2003, libraries@haskell.org 2003-2007 +copyright: Alastair Reid, 1999-2003, libraries@haskell.org 2003-2007, Don Stewart 2007-2009. hunk ./include/HsX11Config.h.in 33 +/* Define to 1 if you have the header file. */ +#undef HAVE_X11_CURSORFONT_H + hunk ./include/HsX11Config.h.in 69 +/* Define to the home page for this package. */ +#undef PACKAGE_URL + hunk ./Graphics/X11/Xlib.hs 40 + module Graphics.X11.Xlib.Cursor, hunk ./Graphics/X11/Xlib.hs 57 +import Graphics.X11.Xlib.Cursor hunk ./configure.ac 1 -AC_INIT([Haskell X11 package], [1.4.5], [dons@galois.com], [X11]) +AC_INIT([Haskell X11 package], [1.4.6], [dons@galois.com], [X11]) hunk ./X11.cabal 59 -build-depends: base >= 3 && < 4 +build-depends: base >= 3 && < 5 hunk ./X11.cabal 1 -name: X11 -version: 1.4.6 -license: BSD3 -license-file: LICENSE -copyright: Alastair Reid, 1999-2003, libraries@haskell.org 2003-2007, Don Stewart 2007-2009. -maintainer: Don Stewart +name: X11 +version: 1.4.6.1 +license: BSD3 +license-file: LICENSE +copyright: Alastair Reid, 1999-2003, libraries@haskell.org 2003-2007, Don Stewart 2007-2009. +maintainer: Don Stewart hunk ./X11.cabal 8 -category: Graphics -synopsis: A binding to the X11 graphics library -description: 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 . +category: Graphics +synopsis: A binding to the X11 graphics library +description: 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 . hunk ./X11.cabal 15 - configure.ac configure - config.mk.in X11.buildinfo.in include/HsX11Config.h.in - include/HsXlib.h include/XlibExtras.h include/X11_extras_config.h.in - include/HsAllKeysyms.h + configure.ac configure + config.mk.in X11.buildinfo.in include/HsX11Config.h.in + include/HsXlib.h include/XlibExtras.h include/X11_extras_config.h.in + include/HsAllKeysyms.h hunk ./X11.cabal 20 - config.log config.status autom4te.cache - config.mk X11.buildinfo include/HsX11Config.h + config.log config.status autom4te.cache + config.mk X11.buildinfo include/HsX11Config.h hunk ./X11.cabal 23 -exposed-modules: - Graphics.X11, - Graphics.X11.Types, - Graphics.X11.Xlib, - Graphics.X11.Xlib.Atom, - Graphics.X11.Xlib.Color, - Graphics.X11.Xlib.Context, - Graphics.X11.Xlib.Cursor, - Graphics.X11.Xlib.Display, - Graphics.X11.Xlib.Event, - Graphics.X11.Xlib.Font, - Graphics.X11.Xlib.Misc, - Graphics.X11.Xlib.Region, - Graphics.X11.Xlib.Screen, - Graphics.X11.Xlib.Types, - Graphics.X11.Xlib.Window, - Graphics.X11.Xlib.Image, - Graphics.X11.Xlib.Extras, - Graphics.X11.Xinerama - Graphics.X11.ExtraTypes, - Graphics.X11.ExtraTypes.AP, - Graphics.X11.ExtraTypes.DEC, - Graphics.X11.ExtraTypes.HP, - Graphics.X11.ExtraTypes.Sun - Graphics.X11.ExtraTypes.XF86, - Graphics.X11.ExtraTypes.XorgDefault -c-sources: - cbits/fdset.c, - cbits/auxiliaries.c, - cbits/XUtils.c -extensions: ForeignFunctionInterface, CPP -extra-libraries: "X11" -include-dirs: include -includes: HsXlib.h, HsAllKeysyms.h -install-includes: HsXlib.h, XlibExtras.h, HsAllKeysyms.h -build-depends: base >= 3 && < 5 -build-type: Configure -ghc-options: -funbox-strict-fields -Wall -fno-warn-unused-binds -ghc-prof-options: -prof -auto-all + +flag smaller_base + description: Build with the even smaller base. + +library + exposed-modules: + Graphics.X11, + Graphics.X11.Types, + Graphics.X11.Xlib, + Graphics.X11.Xlib.Atom, + Graphics.X11.Xlib.Color, + Graphics.X11.Xlib.Context, + Graphics.X11.Xlib.Cursor, + Graphics.X11.Xlib.Display, + Graphics.X11.Xlib.Event, + Graphics.X11.Xlib.Font, + Graphics.X11.Xlib.Misc, + Graphics.X11.Xlib.Region, + Graphics.X11.Xlib.Screen, + Graphics.X11.Xlib.Types, + Graphics.X11.Xlib.Window, + Graphics.X11.Xlib.Image, + Graphics.X11.Xlib.Extras, + Graphics.X11.Xinerama + Graphics.X11.ExtraTypes, + Graphics.X11.ExtraTypes.AP, + Graphics.X11.ExtraTypes.DEC, + Graphics.X11.ExtraTypes.HP, + Graphics.X11.ExtraTypes.Sun + Graphics.X11.ExtraTypes.XF86, + Graphics.X11.ExtraTypes.XorgDefault + c-sources: + cbits/fdset.c, + cbits/auxiliaries.c, + cbits/XUtils.c + extensions: ForeignFunctionInterface, CPP + extra-libraries: "X11" + include-dirs: include + includes: HsXlib.h, HsAllKeysyms.h + install-includes: HsXlib.h, XlibExtras.h, HsAllKeysyms.h + if flag(smaller_base) + build-depends: base >= 4 && < 5, syb + else + build-depends: base >= 3 && < 4 + build-type: Configure + ghc-options: -funbox-strict-fields -Wall -fno-warn-unused-binds + ghc-prof-options: -prof -auto-all hunk ./X11.cabal 23 +Cabal-Version: >= 1.2 hunk ./Graphics/X11/Types.hsc 829 -type KeyCode = Char +type KeyCode = #{type KeyCode} hunk ./Graphics/X11/Xlib/Extras.hsc 1469 +foreign import ccall unsafe "HsXlib.h XGetModifierMapping" + xGetModifierMapping :: Display -> IO (Ptr ()) + +foreign import ccall unsafe "HsXlib.h XFreeModifiermap" + xFreeModifiermap :: Ptr () -> IO (Ptr CInt) + +getModifierMapping :: Display -> IO [(Modifier, [KeyCode])] +getModifierMapping d = do + p <- xGetModifierMapping d + m' <- #{peek XModifierKeymap, max_keypermod} p :: IO CInt + let m = fromIntegral m' + pks <- #{peek XModifierKeymap, modifiermap} p :: IO (Ptr KeyCode) + ks <- peekArray (m * 8) pks + xFreeModifiermap p + return . zip masks . map fst . tail . iterate (splitAt m . snd) $ ([], ks) + where + masks = [shiftMapIndex .. mod5MapIndex] + hunk ./X11.cabal 24 +build-type: Configure hunk ./X11.cabal 69 - build-type: Configure hunk ./Graphics/X11/Xlib/Types.hsc 18 - Display(..), Screen, Visual, GC, GCValues, SetWindowAttributes, + Display(..), Screen(..), Visual, GC, GCValues, SetWindowAttributes, hunk ./Graphics/X11/Xlib/Cursor.hsc 11 --- A collection of cursor types defined by /usr/include/X11/cursorfont.h. +-- A collection of cursor types defined by \/usr/include/X11/cursorfont.h. hunk ./Graphics/X11/Xlib/Extras.hsc 1363 --- FIXME: X11 doesn't have a Read instance for Rectangle, so we include one for now. -{-* Generated by DrIFT : Look, but Don't Touch. *-} -instance Read Rectangle where - readsPrec d input = - readParen (d > 9) - (\ inp -> - [((Rectangle aa ab ac ad) , rest) | ("Rectangle" , inp) <- lex inp - , ("{" , inp) <- lex inp , ("rect_x" , inp) <- lex inp , - ("=" , inp) <- lex inp , (aa , inp) <- readsPrec 10 inp , - ("," , inp) <- lex inp , ("rect_y" , inp) <- lex inp , - ("=" , inp) <- lex inp , (ab , inp) <- readsPrec 10 inp , - ("," , inp) <- lex inp , ("rect_width" , inp) <- lex inp , - ("=" , inp) <- lex inp , (ac , inp) <- readsPrec 10 inp , - ("," , inp) <- lex inp , ("rect_height" , inp) <- lex inp , - ("=" , inp) <- lex inp , (ad , inp) <- readsPrec 10 inp , - ("}" , rest) <- lex inp]) - input - hunk ./Graphics/X11/Xlib/Types.hsc 174 - deriving (Eq, Show, Typeable, Data) + deriving (Eq, Read, Show, Typeable, Data) hunk ./Graphics/X11/Xlib/Types.hsc 176 - deriving (Eq, Show) + deriving (Eq, Read, Show) hunk ./Graphics/X11/Xlib/Extras.hsc 916 --- stored in the WM_PROTOCOLS property on the specified win­ --- dow. These atoms describe window manager protocols in +-- stored in the WM_PROTOCOLS property on the specified window. +-- These atoms describe window manager protocols in hunk ./X11.cabal 5 -copyright: Alastair Reid, 1999-2003, libraries@haskell.org 2003-2007, Don Stewart 2007-2009. -maintainer: Don Stewart -homepage: http://darcs.haskell.org/X11 +copyright: Alastair Reid, 1999-2003, libraries@haskell.org 2003-2007, Don Stewart 2007-2009, Spencer Janssen 2007-2009. +maintainer: Spencer Janssen +homepage: http://code.haskell.org/X11 hunk ./X11.cabal 2 -version: 1.4.6.1 +version: 1.5.0.0