x11.*: new vocab x11.X for ffi stuff from the X.h header
It's nicer to have one vocab for each X11 header file than the previous organization.char-rename
parent
acdcc1f2c2
commit
1c3f345396
|
@ -6,14 +6,22 @@ environment io.encodings.ascii io.encodings.string io.encodings.utf8
|
||||||
kernel literals locals math namespaces sequences specialized-arrays
|
kernel literals locals math namespaces sequences specialized-arrays
|
||||||
strings ui ui.backend ui.backend.x11.keys ui.clipboards ui.event-loop
|
strings ui ui.backend ui.backend.x11.keys ui.clipboards ui.event-loop
|
||||||
ui.gadgets ui.gadgets.private ui.gadgets.worlds ui.gestures
|
ui.gadgets ui.gadgets.private ui.gadgets.worlds ui.gestures
|
||||||
ui.pixel-formats ui.pixel-formats.private ui.private x11 x11.clipboard
|
ui.pixel-formats ui.pixel-formats.private ui.private x11 x11.X
|
||||||
x11.constants x11.events x11.glx x11.io x11.windows x11.xim x11.xlib ;
|
x11.clipboard x11.events x11.glx x11.io x11.windows x11.xim x11.xlib ;
|
||||||
FROM: libc => system ;
|
FROM: libc => system ;
|
||||||
SPECIALIZED-ARRAYS: uchar ulong ;
|
SPECIALIZED-ARRAYS: uchar ulong ;
|
||||||
IN: ui.backend.x11
|
IN: ui.backend.x11
|
||||||
|
|
||||||
SINGLETON: x11-ui-backend
|
SINGLETON: x11-ui-backend
|
||||||
|
|
||||||
|
! *****************************************************************
|
||||||
|
! * EXTENDED WINDOW MANAGER HINTS
|
||||||
|
! *****************************************************************
|
||||||
|
|
||||||
|
CONSTANT: _NET_WM_STATE_REMOVE 0
|
||||||
|
CONSTANT: _NET_WM_STATE_ADD 1
|
||||||
|
CONSTANT: _NET_WM_STATE_TOGGLE 2
|
||||||
|
|
||||||
: XA_NET_SUPPORTED ( -- atom ) "_NET_SUPPORTED" x-atom ;
|
: XA_NET_SUPPORTED ( -- atom ) "_NET_SUPPORTED" x-atom ;
|
||||||
: XA_NET_WM_NAME ( -- atom ) "_NET_WM_NAME" x-atom ;
|
: XA_NET_WM_NAME ( -- atom ) "_NET_WM_NAME" x-atom ;
|
||||||
: XA_NET_WM_STATE ( -- atom ) "_NET_WM_STATE" x-atom ;
|
: XA_NET_WM_STATE ( -- atom ) "_NET_WM_STATE" x-atom ;
|
||||||
|
|
|
@ -1,17 +1,26 @@
|
||||||
! Copyright (C) 2005, 2006 Eduardo Cavazos and Alex Chapman
|
! Copyright (C) 2005, 2006 Eduardo Cavazos and Alex Chapman, 2016 Björn Lindqvist
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! http://factorcode.org/license.txt for BSD license.
|
||||||
|
|
||||||
! Based on X.h
|
! Selected parts of /usr/include/X11/X.h
|
||||||
|
USING: alien.c-types alien.syntax math ;
|
||||||
USING: alien alien.c-types alien.syntax math x11.xlib ;
|
IN: x11.X
|
||||||
IN: x11.constants
|
|
||||||
|
|
||||||
|
! Resources
|
||||||
|
TYPEDEF: ulong XID
|
||||||
TYPEDEF: ulong Mask
|
TYPEDEF: ulong Mask
|
||||||
|
TYPEDEF: ulong Atom
|
||||||
|
TYPEDEF: XID Window
|
||||||
|
TYPEDEF: XID Drawable
|
||||||
|
TYPEDEF: XID Font
|
||||||
|
TYPEDEF: XID Pixmap
|
||||||
|
TYPEDEF: XID Cursor
|
||||||
|
TYPEDEF: XID Colormap
|
||||||
|
TYPEDEF: XID GContext
|
||||||
|
TYPEDEF: XID KeySym
|
||||||
|
|
||||||
TYPEDEF: uchar KeyCode
|
TYPEDEF: uchar KeyCode
|
||||||
|
|
||||||
! Reserved Resource and Constant Definitions
|
! Reserved resource and constant definitions
|
||||||
|
|
||||||
CONSTANT: ParentRelative 1
|
CONSTANT: ParentRelative 1
|
||||||
CONSTANT: CopyFromParent 0
|
CONSTANT: CopyFromParent 0
|
||||||
CONSTANT: PointerWindow 0
|
CONSTANT: PointerWindow 0
|
||||||
|
@ -24,8 +33,87 @@ CONSTANT: AllTemporary 0
|
||||||
CONSTANT: CurrentTime 0
|
CONSTANT: CurrentTime 0
|
||||||
CONSTANT: NoSymbol 0
|
CONSTANT: NoSymbol 0
|
||||||
|
|
||||||
! Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
|
CONSTANT: None 0
|
||||||
! state in various key-, mouse-, and button-related events.
|
|
||||||
|
! Input Event Masks. Used as event-mask window attribute and as
|
||||||
|
! arguments to Grab requests. Not to be confused with event names.
|
||||||
|
: NoEventMask ( -- n ) 0 ; inline
|
||||||
|
: KeyPressMask ( -- n ) 0 2^ ; inline
|
||||||
|
: KeyReleaseMask ( -- n ) 1 2^ ; inline
|
||||||
|
: ButtonPressMask ( -- n ) 2 2^ ; inline
|
||||||
|
: ButtonReleaseMask ( -- n ) 3 2^ ; inline
|
||||||
|
: EnterWindowMask ( -- n ) 4 2^ ; inline
|
||||||
|
: LeaveWindowMask ( -- n ) 5 2^ ; inline
|
||||||
|
: PointerMotionMask ( -- n ) 6 2^ ; inline
|
||||||
|
: PointerMotionHintMask ( -- n ) 7 2^ ; inline
|
||||||
|
: Button1MotionMask ( -- n ) 8 2^ ; inline
|
||||||
|
: Button2MotionMask ( -- n ) 9 2^ ; inline
|
||||||
|
: Button3MotionMask ( -- n ) 10 2^ ; inline
|
||||||
|
: Button4MotionMask ( -- n ) 11 2^ ; inline
|
||||||
|
: Button5MotionMask ( -- n ) 12 2^ ; inline
|
||||||
|
: ButtonMotionMask ( -- n ) 13 2^ ; inline
|
||||||
|
: KeymapStateMask ( -- n ) 14 2^ ; inline
|
||||||
|
: ExposureMask ( -- n ) 15 2^ ; inline
|
||||||
|
: VisibilityChangeMask ( -- n ) 16 2^ ; inline
|
||||||
|
: StructureNotifyMask ( -- n ) 17 2^ ; inline
|
||||||
|
: ResizeRedirectMask ( -- n ) 18 2^ ; inline
|
||||||
|
: SubstructureNotifyMask ( -- n ) 19 2^ ; inline
|
||||||
|
: SubstructureRedirectMask ( -- n ) 20 2^ ; inline
|
||||||
|
: FocusChangeMask ( -- n ) 21 2^ ; inline
|
||||||
|
: PropertyChangeMask ( -- n ) 22 2^ ; inline
|
||||||
|
: ColormapChangeMask ( -- n ) 23 2^ ; inline
|
||||||
|
: OwnerGrabButtonMask ( -- n ) 24 2^ ; inline
|
||||||
|
|
||||||
|
! Event names. Used in "type" field in XEvent structures. Not to be
|
||||||
|
! confused with event masks above. They start from 2 because 0 and 1
|
||||||
|
! are reserved in the protocol for errors and replies.
|
||||||
|
CONSTANT: KeyPress 2
|
||||||
|
CONSTANT: KeyRelease 3
|
||||||
|
CONSTANT: ButtonPress 4
|
||||||
|
CONSTANT: ButtonRelease 5
|
||||||
|
CONSTANT: MotionNotify 6
|
||||||
|
CONSTANT: EnterNotify 7
|
||||||
|
CONSTANT: LeaveNotify 8
|
||||||
|
CONSTANT: FocusIn 9
|
||||||
|
CONSTANT: FocusOut 10
|
||||||
|
CONSTANT: KeymapNotify 11
|
||||||
|
CONSTANT: Expose 12
|
||||||
|
CONSTANT: GraphicsExpose 13
|
||||||
|
CONSTANT: NoExpose 14
|
||||||
|
CONSTANT: VisibilityNotify 15
|
||||||
|
CONSTANT: CreateNotify 16
|
||||||
|
CONSTANT: DestroyNotify 17
|
||||||
|
CONSTANT: UnmapNotify 18
|
||||||
|
CONSTANT: MapNotify 19
|
||||||
|
CONSTANT: MapRequest 20
|
||||||
|
CONSTANT: ReparentNotify 21
|
||||||
|
CONSTANT: ConfigureNotify 22
|
||||||
|
CONSTANT: ConfigureRequest 23
|
||||||
|
CONSTANT: GravityNotify 24
|
||||||
|
CONSTANT: ResizeRequest 25
|
||||||
|
CONSTANT: CirculateNotify 26
|
||||||
|
CONSTANT: CirculateRequest 27
|
||||||
|
CONSTANT: PropertyNotify 28
|
||||||
|
CONSTANT: SelectionClear 29
|
||||||
|
CONSTANT: SelectionRequest 30
|
||||||
|
CONSTANT: SelectionNotify 31
|
||||||
|
CONSTANT: ColormapNotify 32
|
||||||
|
CONSTANT: ClientMessage 33
|
||||||
|
CONSTANT: MappingNotify 34
|
||||||
|
CONSTANT: GenericEvent 35
|
||||||
|
CONSTANT: LASTEvent 36
|
||||||
|
|
||||||
|
! Key masks. Used as modifiers to GrabButton and GrabKey, results of
|
||||||
|
! QueryPointer, state in various key-, mouse-, and button-related
|
||||||
|
! events.
|
||||||
|
: ShiftMask ( -- n ) 1 0 shift ; inline
|
||||||
|
: LockMask ( -- n ) 1 1 shift ; inline
|
||||||
|
: ControlMask ( -- n ) 1 2 shift ; inline
|
||||||
|
: Mod1Mask ( -- n ) 1 3 shift ; inline
|
||||||
|
: Mod2Mask ( -- n ) 1 4 shift ; inline
|
||||||
|
: Mod3Mask ( -- n ) 1 5 shift ; inline
|
||||||
|
: Mod4Mask ( -- n ) 1 6 shift ; inline
|
||||||
|
: Mod5Mask ( -- n ) 1 7 shift ; inline
|
||||||
|
|
||||||
! modifier names. Used to build a SetModifierMapping request or
|
! modifier names. Used to build a SetModifierMapping request or
|
||||||
! to read a GetModifierMapping request. These correspond to the
|
! to read a GetModifierMapping request. These correspond to the
|
||||||
|
@ -39,16 +127,25 @@ CONSTANT: Mod3MapIndex 5
|
||||||
CONSTANT: Mod4MapIndex 6
|
CONSTANT: Mod4MapIndex 6
|
||||||
CONSTANT: Mod5MapIndex 7
|
CONSTANT: Mod5MapIndex 7
|
||||||
|
|
||||||
|
! button masks. Used in same manner as Key masks above. Not to be
|
||||||
! button masks. Used in same manner as Key masks above. Not to be confused
|
! confused with button names below.
|
||||||
! with button names below.
|
: Button1Mask ( -- n ) 1 8 shift ; inline
|
||||||
|
: Button2Mask ( -- n ) 1 9 shift ; inline
|
||||||
|
: Button3Mask ( -- n ) 1 10 shift ; inline
|
||||||
|
: Button4Mask ( -- n ) 1 11 shift ; inline
|
||||||
|
: Button5Mask ( -- n ) 1 12 shift ; inline
|
||||||
|
|
||||||
: AnyModifier ( -- n ) 15 2^ ; ! used in GrabButton, GrabKey
|
: AnyModifier ( -- n ) 15 2^ ; ! used in GrabButton, GrabKey
|
||||||
|
|
||||||
! button names. Used as arguments to GrabButton and as detail in ButtonPress
|
! button names. Used as arguments to GrabButton and as detail in
|
||||||
! and ButtonRelease events. Not to be confused with button masks above.
|
! ButtonPress and ButtonRelease events. Not to be confused with
|
||||||
! Note that 0 is already defined above as "AnyButton".
|
! button masks above. Note that 0 is already defined above as
|
||||||
|
! "AnyButton". */
|
||||||
|
CONSTANT: Button1 1
|
||||||
|
CONSTANT: Button2 2
|
||||||
|
CONSTANT: Button3 3
|
||||||
|
CONSTANT: Button4 4
|
||||||
|
CONSTANT: Button5 5
|
||||||
|
|
||||||
! Notify modes
|
! Notify modes
|
||||||
|
|
||||||
|
@ -174,12 +271,45 @@ CONSTANT: LastExtensionError 255
|
||||||
CONSTANT: InputOutput 1
|
CONSTANT: InputOutput 1
|
||||||
CONSTANT: InputOnly 2
|
CONSTANT: InputOnly 2
|
||||||
|
|
||||||
|
! ConfigureWindow structure
|
||||||
|
: CWX ( -- n ) 0 2^ ; inline
|
||||||
|
: CWY ( -- n ) 1 2^ ; inline
|
||||||
|
: CWWidth ( -- n ) 2 2^ ; inline
|
||||||
|
: CWHeight ( -- n ) 3 2^ ; inline
|
||||||
|
: CWBorderWidth ( -- n ) 4 2^ ; inline
|
||||||
|
: CWSibling ( -- n ) 5 2^ ; inline
|
||||||
|
: CWStackMode ( -- n ) 6 2^ ; inline
|
||||||
|
|
||||||
|
! Bit Gravity
|
||||||
|
|
||||||
|
CONSTANT: ForgetGravity 0
|
||||||
|
CONSTANT: NorthWestGravity 1
|
||||||
|
CONSTANT: NorthGravity 2
|
||||||
|
CONSTANT: NorthEastGravity 3
|
||||||
|
CONSTANT: WestGravity 4
|
||||||
|
CONSTANT: CenterGravity 5
|
||||||
|
CONSTANT: EastGravity 6
|
||||||
|
CONSTANT: SouthWestGravity 7
|
||||||
|
CONSTANT: SouthGravity 8
|
||||||
|
CONSTANT: SouthEastGravity 9
|
||||||
|
CONSTANT: StaticGravity 10
|
||||||
|
|
||||||
|
! Window gravity + bit gravity above
|
||||||
|
|
||||||
|
CONSTANT: UnmapGravity 0
|
||||||
|
|
||||||
! Used in CreateWindow for backing-store hint
|
! Used in CreateWindow for backing-store hint
|
||||||
|
|
||||||
CONSTANT: NotUseful 0
|
CONSTANT: NotUseful 0
|
||||||
CONSTANT: WhenMapped 1
|
CONSTANT: WhenMapped 1
|
||||||
CONSTANT: Always 2
|
CONSTANT: Always 2
|
||||||
|
|
||||||
|
! Used in GetWindowAttributes reply
|
||||||
|
CONSTANT: IsUnmapped 0
|
||||||
|
CONSTANT: IsUnviewable 1
|
||||||
|
CONSTANT: IsViewable 2
|
||||||
|
|
||||||
|
|
||||||
! Used in ChangeSaveSet
|
! Used in ChangeSaveSet
|
||||||
|
|
||||||
CONSTANT: SetModeInsert 0
|
CONSTANT: SetModeInsert 0
|
||||||
|
@ -214,6 +344,25 @@ CONSTANT: PropModeAppend 2
|
||||||
! * GRAPHICS DEFINITIONS
|
! * GRAPHICS DEFINITIONS
|
||||||
! *****************************************************************
|
! *****************************************************************
|
||||||
|
|
||||||
|
! graphics functions, as in GC.alu
|
||||||
|
|
||||||
|
CONSTANT: GXclear 0x0
|
||||||
|
CONSTANT: GXand 0x1
|
||||||
|
CONSTANT: GXandReverse 0x2
|
||||||
|
CONSTANT: GXcopy 0x3
|
||||||
|
CONSTANT: GXandInverted 0x4
|
||||||
|
CONSTANT: GXnoop 0x5
|
||||||
|
CONSTANT: GXxor 0x6
|
||||||
|
CONSTANT: GXor 0x7
|
||||||
|
CONSTANT: GXnor 0x8
|
||||||
|
CONSTANT: GXequiv 0x9
|
||||||
|
CONSTANT: GXinvert 0xa
|
||||||
|
CONSTANT: GXorReverse 0xb
|
||||||
|
CONSTANT: GXcopyInverted 0xc
|
||||||
|
CONSTANT: GXorInverted 0xd
|
||||||
|
CONSTANT: GXnand 0xe
|
||||||
|
CONSTANT: GXset 0xf
|
||||||
|
|
||||||
! LineStyle
|
! LineStyle
|
||||||
|
|
||||||
CONSTANT: LineSolid 0
|
CONSTANT: LineSolid 0
|
||||||
|
@ -273,6 +422,33 @@ CONSTANT: Convex 2 ! wholly convex
|
||||||
CONSTANT: ArcChord 0 ! join endpoints of arc
|
CONSTANT: ArcChord 0 ! join endpoints of arc
|
||||||
CONSTANT: ArcPieSlice 1 ! join endpoints to center of arc
|
CONSTANT: ArcPieSlice 1 ! join endpoints to center of arc
|
||||||
|
|
||||||
|
! GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
|
||||||
|
! GC.stateChanges
|
||||||
|
|
||||||
|
: GCFunction ( -- n ) 0 2^ ; inline
|
||||||
|
: GCPlaneMask ( -- n ) 1 2^ ; inline
|
||||||
|
: GCForeground ( -- n ) 2 2^ ; inline
|
||||||
|
: GCBackground ( -- n ) 3 2^ ; inline
|
||||||
|
: GCLineWidth ( -- n ) 4 2^ ; inline
|
||||||
|
: GCLineStyle ( -- n ) 5 2^ ; inline
|
||||||
|
: GCCapStyle ( -- n ) 6 2^ ; inline
|
||||||
|
: GCJoinStyle ( -- n ) 7 2^ ; inline
|
||||||
|
: GCFillStyle ( -- n ) 8 2^ ; inline
|
||||||
|
: GCFillRule ( -- n ) 9 2^ ; inline
|
||||||
|
: GCTile ( -- n ) 10 2^ ; inline
|
||||||
|
: GCStipple ( -- n ) 11 2^ ; inline
|
||||||
|
: GCTileStipXOrigin ( -- n ) 12 2^ ; inline
|
||||||
|
: GCTileStipYOrigin ( -- n ) 13 2^ ; inline
|
||||||
|
: GCFont ( -- n ) 14 2^ ; inline
|
||||||
|
: GCSubwindowMode ( -- n ) 15 2^ ; inline
|
||||||
|
: GCGraphicsExposures ( -- n ) 16 2^ ; inline
|
||||||
|
: GCClipXOrigin ( -- n ) 17 2^ ; inline
|
||||||
|
: GCClipYOrigin ( -- n ) 18 2^ ; inline
|
||||||
|
: GCClipMask ( -- n ) 19 2^ ; inline
|
||||||
|
: GCDashOffset ( -- n ) 20 2^ ; inline
|
||||||
|
: GCDashList ( -- n ) 21 2^ ; inline
|
||||||
|
: GCArcMode ( -- n ) 22 2^ ; inline
|
||||||
|
|
||||||
! *****************************************************************
|
! *****************************************************************
|
||||||
! * FONTS
|
! * FONTS
|
||||||
! *****************************************************************
|
! *****************************************************************
|
||||||
|
@ -399,11 +575,3 @@ CONSTANT: DirectColor 5
|
||||||
|
|
||||||
CONSTANT: LSBFirst 0
|
CONSTANT: LSBFirst 0
|
||||||
CONSTANT: MSBFirst 1
|
CONSTANT: MSBFirst 1
|
||||||
|
|
||||||
! *****************************************************************
|
|
||||||
! * EXTENDED WINDOW MANAGER HINTS
|
|
||||||
! *****************************************************************
|
|
||||||
|
|
||||||
CONSTANT: _NET_WM_STATE_REMOVE 0
|
|
||||||
CONSTANT: _NET_WM_STATE_ADD 1
|
|
||||||
CONSTANT: _NET_WM_STATE_TOGGLE 2
|
|
|
@ -1,2 +1,3 @@
|
||||||
Eduardo Cavazos
|
Eduardo Cavazos
|
||||||
Slava Pestov
|
Slava Pestov
|
||||||
|
Björn Lindqvist
|
|
@ -0,0 +1 @@
|
||||||
|
Bindings for /usr/include/X11/X.h constants
|
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2006, 2010 Slava Pestov
|
! Copyright (C) 2006, 2010 Slava Pestov
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien.c-types alien.data alien.strings
|
USING: accessors alien.c-types alien.data alien.strings classes.struct
|
||||||
classes.struct io.encodings.utf8 kernel namespaces sequences
|
io.encodings.utf8 kernel namespaces sequences specialized-arrays x11
|
||||||
specialized-arrays x11 x11.constants x11.xlib ;
|
x11.X x11.xlib ;
|
||||||
SPECIALIZED-ARRAY: int
|
SPECIALIZED-ARRAY: int
|
||||||
IN: x11.clipboard
|
IN: x11.clipboard
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Xlib constants
|
|
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2005, 2010 Eduardo Cavazos, Slava Pestov.
|
! Copyright (C) 2005, 2010 Eduardo Cavazos, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays classes.struct combinators
|
USING: accessors arrays classes.struct combinators
|
||||||
combinators.short-circuit kernel math.order namespaces
|
combinators.short-circuit kernel math.order namespaces x11 x11.X
|
||||||
x11 x11.xlib ;
|
x11.xlib ;
|
||||||
IN: x11.events
|
IN: x11.events
|
||||||
|
|
||||||
GENERIC: expose-event ( event window -- )
|
GENERIC: expose-event ( event window -- )
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
!
|
!
|
||||||
! based on glx.h from xfree86, and some of glxtokens.h
|
! based on glx.h from xfree86, and some of glxtokens.h
|
||||||
USING: alien alien.c-types alien.syntax x11 x11.xlib x11.syntax
|
USING: alien.c-types alien.syntax kernel namespaces specialized-arrays
|
||||||
namespaces make kernel sequences parser words
|
x11 x11.X x11.syntax x11.xlib ;
|
||||||
specialized-arrays accessors ;
|
|
||||||
SPECIALIZED-ARRAY: int
|
SPECIALIZED-ARRAY: int
|
||||||
IN: x11.glx
|
IN: x11.glx
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2016 Björn Lindqvist
|
! Copyright (C) 2016 Björn Lindqvist
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
|
||||||
! Selected parts of keysymdef.h
|
! Selected parts of /usr/include/X11/keysymdef.h
|
||||||
IN: x11.keysymdef
|
IN: x11.keysymdef
|
||||||
|
|
||||||
! TTY function keys, cleverly chosen to map to ASCII, for convenience
|
! TTY function keys, cleverly chosen to map to ASCII, for convenience
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Bindings for /usr/include/X11/keysymdef.h constants
|
|
@ -1,9 +1,8 @@
|
||||||
! Copyright (C) 2005, 2010 Eduardo Cavazos, Slava Pestov.
|
! Copyright (C) 2005, 2010 Eduardo Cavazos, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien.c-types alien.data kernel math
|
USING: accessors alien.data classes.struct fry kernel literals math
|
||||||
math.bitwise math.vectors namespaces sequences arrays fry
|
math.vectors namespaces sequences x11 x11.X x11.events x11.glx
|
||||||
classes.struct literals x11 x11.xlib x11.constants x11.events
|
x11.xlib ;
|
||||||
x11.glx ;
|
|
||||||
IN: x11.windows
|
IN: x11.windows
|
||||||
|
|
||||||
CONSTANT: create-window-mask
|
CONSTANT: create-window-mask
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
! Copyright (C) 2007, 2008 Slava Pestov
|
! Copyright (C) 2007, 2008 Slava Pestov
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien alien.c-types alien.data alien.strings arrays
|
USING: alien.c-types alien.data byte-arrays continuations
|
||||||
byte-arrays hashtables io io.encodings.string kernel math
|
io.encodings.string io.encodings.utf8 kernel literals math namespaces
|
||||||
namespaces sequences strings continuations x11 x11.xlib
|
sequences x11 x11.X x11.xlib ;
|
||||||
accessors io.encodings.utf8 literals ;
|
|
||||||
IN: x11.xim
|
IN: x11.xim
|
||||||
|
|
||||||
SYMBOL: xim
|
SYMBOL: xim
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2010 Niklas Waern.
|
! Copyright (C) 2010 Niklas Waern.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien alien.c-types alien.libraries alien.syntax
|
USING: alien alien.c-types alien.libraries alien.syntax classes.struct
|
||||||
classes.struct locals sequences x11.syntax x11.xlib ;
|
locals sequences x11.X x11.syntax x11.xlib ;
|
||||||
EXCLUDE: math => float ;
|
EXCLUDE: math => float ;
|
||||||
IN: x11.xinput2.ffi
|
IN: x11.xinput2.ffi
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2010 Niklas Waern.
|
! Copyright (C) 2010 Niklas Waern.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien.c-types alien.data combinators kernel namespaces
|
USING: alien.c-types alien.data combinators kernel namespaces x11
|
||||||
x11 x11.constants x11.xinput2.ffi ;
|
x11.X x11.xinput2.ffi ;
|
||||||
IN: x11.xinput2
|
IN: x11.xinput2
|
||||||
|
|
||||||
: (xi2-available?) ( display -- ? )
|
: (xi2-available?) ( display -- ? )
|
||||||
|
|
|
@ -12,27 +12,13 @@
|
||||||
! and note the section.
|
! and note the section.
|
||||||
!
|
!
|
||||||
! https://www.x.org/releases/X11R7.6/doc/libX11/specs/libX11/libX11.html
|
! https://www.x.org/releases/X11R7.6/doc/libX11/specs/libX11/libX11.html
|
||||||
USING: accessors kernel arrays alien alien.c-types alien.data
|
USING: accessors alien.c-types alien.data alien.syntax classes.struct
|
||||||
alien.strings alien.syntax classes.struct math math.bitwise words
|
kernel literals math x11.syntax x11.X ;
|
||||||
sequences namespaces continuations io io.encodings.ascii x11.syntax
|
|
||||||
literals ;
|
|
||||||
FROM: alien.c-types => short ;
|
FROM: alien.c-types => short ;
|
||||||
IN: x11.xlib
|
IN: x11.xlib
|
||||||
|
|
||||||
LIBRARY: xlib
|
LIBRARY: xlib
|
||||||
|
|
||||||
TYPEDEF: ulong XID
|
|
||||||
TYPEDEF: XID Window
|
|
||||||
TYPEDEF: XID Drawable
|
|
||||||
TYPEDEF: XID Font
|
|
||||||
TYPEDEF: XID Pixmap
|
|
||||||
TYPEDEF: XID Cursor
|
|
||||||
TYPEDEF: XID Colormap
|
|
||||||
TYPEDEF: XID GContext
|
|
||||||
TYPEDEF: XID KeySym
|
|
||||||
|
|
||||||
TYPEDEF: ulong Atom
|
|
||||||
|
|
||||||
TYPEDEF: c-string XPointer
|
TYPEDEF: c-string XPointer
|
||||||
C-TYPE: Screen
|
C-TYPE: Screen
|
||||||
TYPEDEF: void* GC
|
TYPEDEF: void* GC
|
||||||
|
@ -125,20 +111,6 @@ STRUCT: XSetWindowAttributes
|
||||||
{ colormap Colormap }
|
{ colormap Colormap }
|
||||||
{ cursor Cursor } ;
|
{ cursor Cursor } ;
|
||||||
|
|
||||||
CONSTANT: UnmapGravity 0
|
|
||||||
|
|
||||||
CONSTANT: ForgetGravity 0
|
|
||||||
CONSTANT: NorthWestGravity 1
|
|
||||||
CONSTANT: NorthGravity 2
|
|
||||||
CONSTANT: NorthEastGravity 3
|
|
||||||
CONSTANT: WestGravity 4
|
|
||||||
CONSTANT: CenterGravity 5
|
|
||||||
CONSTANT: EastGravity 6
|
|
||||||
CONSTANT: SouthWestGravity 7
|
|
||||||
CONSTANT: SouthGravity 8
|
|
||||||
CONSTANT: SouthEastGravity 9
|
|
||||||
CONSTANT: StaticGravity 10
|
|
||||||
|
|
||||||
! 3.3 - Creating Windows
|
! 3.3 - Creating Windows
|
||||||
|
|
||||||
X-FUNCTION: Window XCreateWindow ( Display* display,
|
X-FUNCTION: Window XCreateWindow ( Display* display,
|
||||||
|
@ -164,14 +136,6 @@ X-FUNCTION: int XMapRaised ( Display* display, Window w )
|
||||||
|
|
||||||
! 3.7 - Configuring Windows
|
! 3.7 - Configuring Windows
|
||||||
|
|
||||||
: CWX ( -- n ) 0 2^ ; inline
|
|
||||||
: CWY ( -- n ) 1 2^ ; inline
|
|
||||||
: CWWidth ( -- n ) 2 2^ ; inline
|
|
||||||
: CWHeight ( -- n ) 3 2^ ; inline
|
|
||||||
: CWBorderWidth ( -- n ) 4 2^ ; inline
|
|
||||||
: CWSibling ( -- n ) 5 2^ ; inline
|
|
||||||
: CWStackMode ( -- n ) 6 2^ ; inline
|
|
||||||
|
|
||||||
STRUCT: XWindowChanges
|
STRUCT: XWindowChanges
|
||||||
{ x int }
|
{ x int }
|
||||||
{ y int }
|
{ y int }
|
||||||
|
@ -186,8 +150,13 @@ X-FUNCTION: Status XConfigureWindow ( Display* display,
|
||||||
uint value_mask, XWindowChanges* values )
|
uint value_mask, XWindowChanges* values )
|
||||||
X-FUNCTION: Status XMoveWindow ( Display* display, Window w,
|
X-FUNCTION: Status XMoveWindow ( Display* display, Window w,
|
||||||
int x, int y )
|
int x, int y )
|
||||||
X-FUNCTION: Status XResizeWindow ( Display* display, Window w, uint width, uint height )
|
X-FUNCTION: Status XResizeWindow ( Display* display,
|
||||||
X-FUNCTION: Status XSetWindowBorderWidth ( Display* display, ulong w, uint width )
|
Window w,
|
||||||
|
uint width,
|
||||||
|
uint height )
|
||||||
|
X-FUNCTION: Status XSetWindowBorderWidth ( Display* display,
|
||||||
|
ulong w,
|
||||||
|
uint width )
|
||||||
|
|
||||||
|
|
||||||
! 3.8 Changing Window Stacking Order
|
! 3.8 Changing Window Stacking Order
|
||||||
|
@ -199,7 +168,8 @@ X-FUNCTION: Status XLowerWindow ( Display* display, Window w )
|
||||||
|
|
||||||
X-FUNCTION: Status XChangeWindowAttributes ( Display* display,
|
X-FUNCTION: Status XChangeWindowAttributes ( Display* display,
|
||||||
Window w,
|
Window w,
|
||||||
ulong valuemask, XSetWindowAttributes* attr )
|
ulong valuemask,
|
||||||
|
XSetWindowAttributes* attr )
|
||||||
X-FUNCTION: Status XSetWindowBackground ( Display* display,
|
X-FUNCTION: Status XSetWindowBackground ( Display* display,
|
||||||
Window w, ulong background_pixel )
|
Window w, ulong background_pixel )
|
||||||
X-FUNCTION: Status XDefineCursor ( Display* display, Window w, Cursor cursor )
|
X-FUNCTION: Status XDefineCursor ( Display* display, Window w, Cursor cursor )
|
||||||
|
@ -211,13 +181,12 @@ X-FUNCTION: Status XUndefineCursor ( Display* display, Window w )
|
||||||
|
|
||||||
! 4.1 - Obtaining Window Information
|
! 4.1 - Obtaining Window Information
|
||||||
|
|
||||||
X-FUNCTION: Status XQueryTree (
|
X-FUNCTION: Status XQueryTree ( Display* display,
|
||||||
Display* display,
|
Window w,
|
||||||
Window w,
|
Window* root_return,
|
||||||
Window* root_return,
|
Window* parent_return,
|
||||||
Window* parent_return,
|
Window** children_return,
|
||||||
Window** children_return, uint* nchildren_return
|
uint* nchildren_return )
|
||||||
)
|
|
||||||
|
|
||||||
STRUCT: XWindowAttributes
|
STRUCT: XWindowAttributes
|
||||||
{ x int }
|
{ x int }
|
||||||
|
@ -244,66 +213,67 @@ STRUCT: XWindowAttributes
|
||||||
{ override_redirect Bool }
|
{ override_redirect Bool }
|
||||||
{ screen Screen* } ;
|
{ screen Screen* } ;
|
||||||
|
|
||||||
X-FUNCTION: Status XGetWindowAttributes ( Display* display, Window w, XWindowAttributes* attr )
|
X-FUNCTION: Status XGetWindowAttributes ( Display* display,
|
||||||
|
Window w,
|
||||||
|
XWindowAttributes* attr )
|
||||||
|
|
||||||
CONSTANT: IsUnmapped 0
|
X-FUNCTION: Status XGetGeometry ( Display* display,
|
||||||
CONSTANT: IsUnviewable 1
|
Drawable d,
|
||||||
CONSTANT: IsViewable 2
|
Window* root_return,
|
||||||
|
int* x_return,
|
||||||
X-FUNCTION: Status XGetGeometry (
|
int* y_return,
|
||||||
Display* display,
|
uint* width_return,
|
||||||
Drawable d,
|
uint* height_return,
|
||||||
Window* root_return,
|
uint* border_width_return,
|
||||||
int* x_return,
|
uint* depth_return )
|
||||||
int* y_return,
|
|
||||||
uint* width_return,
|
|
||||||
uint* height_return,
|
|
||||||
uint* border_width_return,
|
|
||||||
uint* depth_return
|
|
||||||
)
|
|
||||||
|
|
||||||
! 4.2 - Translating Screen Coordinates
|
! 4.2 - Translating Screen Coordinates
|
||||||
|
|
||||||
X-FUNCTION: Bool XQueryPointer (
|
X-FUNCTION: Bool XQueryPointer ( Display* display,
|
||||||
Display* display,
|
Window w,
|
||||||
Window w,
|
Window* root_return, Window* child_return,
|
||||||
Window* root_return, Window* child_return,
|
int* root_x_return, int* root_y_return,
|
||||||
int* root_x_return, int* root_y_return, int* win_x_return, int* win_y_return,
|
int* win_x_return, int* win_y_return,
|
||||||
uint* mask_return
|
uint* mask_return )
|
||||||
)
|
|
||||||
|
|
||||||
! 4.3 - Properties and Atoms
|
! 4.3 - Properties and Atoms
|
||||||
|
|
||||||
X-FUNCTION: Atom XInternAtom ( Display* display, c-string atom_name, Bool only_if_exists )
|
X-FUNCTION: Atom XInternAtom ( Display* display,
|
||||||
|
c-string atom_name,
|
||||||
|
Bool only_if_exists )
|
||||||
|
|
||||||
X-FUNCTION: c-string XGetAtomName ( Display* display, Atom atom )
|
X-FUNCTION: c-string XGetAtomName ( Display* display, Atom atom )
|
||||||
|
|
||||||
! 4.4 - Obtaining and Changing Window Properties
|
! 4.4 - Obtaining and Changing Window Properties
|
||||||
|
|
||||||
X-FUNCTION: int XGetWindowProperty (
|
X-FUNCTION: int XGetWindowProperty ( Display* display, Window w, Atom property,
|
||||||
Display* display, Window w, Atom property,
|
long long_offset, long long_length,
|
||||||
long long_offset, long long_length,
|
Bool delete, Atom req_type,
|
||||||
Bool delete, Atom req_type,
|
Atom* actual_type_return,
|
||||||
Atom* actual_type_return, int* actual_format_return,
|
int* actual_format_return,
|
||||||
ulong* nitems_return, ulong* bytes_after_return, c-string* prop_return
|
ulong* nitems_return,
|
||||||
)
|
ulong* bytes_after_return,
|
||||||
|
c-string* prop_return )
|
||||||
|
|
||||||
X-FUNCTION: int XChangeProperty (
|
X-FUNCTION: int XChangeProperty ( Display* display, Window w, Atom property,
|
||||||
Display* display, Window w, Atom property,
|
Atom type, int format,
|
||||||
Atom type, int format,
|
int mode, void* data, int nelements )
|
||||||
int mode, void* data, int nelements
|
|
||||||
)
|
|
||||||
|
|
||||||
! 4.5 Selections
|
! 4.5 Selections
|
||||||
|
|
||||||
X-FUNCTION: int XSetSelectionOwner ( Display* display, Atom selection, Window owner, Time time )
|
X-FUNCTION: int XSetSelectionOwner ( Display* display,
|
||||||
|
Atom selection,
|
||||||
|
Window owner,
|
||||||
|
Time time )
|
||||||
|
|
||||||
X-FUNCTION: Window XGetSelectionOwner ( Display* display, Atom selection )
|
X-FUNCTION: Window XGetSelectionOwner ( Display* display, Atom selection )
|
||||||
|
|
||||||
X-FUNCTION: int XConvertSelection (
|
X-FUNCTION: int XConvertSelection ( Display* display,
|
||||||
Display* display, Atom selection, Atom target,
|
Atom selection,
|
||||||
Atom property, Window requestor, Time time
|
Atom target,
|
||||||
)
|
Atom property,
|
||||||
|
Window requestor,
|
||||||
|
Time time )
|
||||||
|
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
@ -312,13 +282,19 @@ X-FUNCTION: int XConvertSelection (
|
||||||
|
|
||||||
! 5.1 - Creating and Freeing Pixmaps
|
! 5.1 - Creating and Freeing Pixmaps
|
||||||
|
|
||||||
X-FUNCTION: Pixmap XCreatePixmap ( Display* display, Drawable d, uint width, uint height, uint depth )
|
X-FUNCTION: Pixmap XCreatePixmap ( Display* display,
|
||||||
|
Drawable d,
|
||||||
|
uint width, uint height, uint depth )
|
||||||
X-FUNCTION: int XFreePixmap ( Display* display, Pixmap pixmap )
|
X-FUNCTION: int XFreePixmap ( Display* display, Pixmap pixmap )
|
||||||
|
|
||||||
! 5.2 - Creating, Recoloring, and Freeing Cursors
|
! 5.2 - Creating, Recoloring, and Freeing Cursors
|
||||||
|
|
||||||
C-TYPE: XColor
|
C-TYPE: XColor
|
||||||
X-FUNCTION: Cursor XCreatePixmapCursor ( Display* display, Pixmap source, Pixmap mask, XColor* foreground_color, XColor* background_color, uint x, uint y )
|
X-FUNCTION: Cursor XCreatePixmapCursor ( Display* display,
|
||||||
|
Pixmap source, Pixmap mask,
|
||||||
|
XColor* foreground_color,
|
||||||
|
XColor* background_color,
|
||||||
|
uint x, uint y )
|
||||||
X-FUNCTION: int XFreeCursor ( Display* display, Cursor cursor )
|
X-FUNCTION: int XFreeCursor ( Display* display, Cursor cursor )
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
@ -349,47 +325,6 @@ X-FUNCTION: Colormap XCreateColormap ( Display* display, Window w, Visual* visua
|
||||||
! 7 - Graphics Context Functions
|
! 7 - Graphics Context Functions
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
: GCFunction ( -- n ) 0 2^ ; inline
|
|
||||||
: GCPlaneMask ( -- n ) 1 2^ ; inline
|
|
||||||
: GCForeground ( -- n ) 2 2^ ; inline
|
|
||||||
: GCBackground ( -- n ) 3 2^ ; inline
|
|
||||||
: GCLineWidth ( -- n ) 4 2^ ; inline
|
|
||||||
: GCLineStyle ( -- n ) 5 2^ ; inline
|
|
||||||
: GCCapStyle ( -- n ) 6 2^ ; inline
|
|
||||||
: GCJoinStyle ( -- n ) 7 2^ ; inline
|
|
||||||
: GCFillStyle ( -- n ) 8 2^ ; inline
|
|
||||||
: GCFillRule ( -- n ) 9 2^ ; inline
|
|
||||||
: GCTile ( -- n ) 10 2^ ; inline
|
|
||||||
: GCStipple ( -- n ) 11 2^ ; inline
|
|
||||||
: GCTileStipXOrigin ( -- n ) 12 2^ ; inline
|
|
||||||
: GCTileStipYOrigin ( -- n ) 13 2^ ; inline
|
|
||||||
: GCFont ( -- n ) 14 2^ ; inline
|
|
||||||
: GCSubwindowMode ( -- n ) 15 2^ ; inline
|
|
||||||
: GCGraphicsExposures ( -- n ) 16 2^ ; inline
|
|
||||||
: GCClipXOrigin ( -- n ) 17 2^ ; inline
|
|
||||||
: GCClipYOrigin ( -- n ) 18 2^ ; inline
|
|
||||||
: GCClipMask ( -- n ) 19 2^ ; inline
|
|
||||||
: GCDashOffset ( -- n ) 20 2^ ; inline
|
|
||||||
: GCDashList ( -- n ) 21 2^ ; inline
|
|
||||||
: GCArcMode ( -- n ) 22 2^ ; inline
|
|
||||||
|
|
||||||
CONSTANT: GXclear 0x0
|
|
||||||
CONSTANT: GXand 0x1
|
|
||||||
CONSTANT: GXandReverse 0x2
|
|
||||||
CONSTANT: GXcopy 0x3
|
|
||||||
CONSTANT: GXandInverted 0x4
|
|
||||||
CONSTANT: GXnoop 0x5
|
|
||||||
CONSTANT: GXxor 0x6
|
|
||||||
CONSTANT: GXor 0x7
|
|
||||||
CONSTANT: GXnor 0x8
|
|
||||||
CONSTANT: GXequiv 0x9
|
|
||||||
CONSTANT: GXinvert 0xa
|
|
||||||
CONSTANT: GXorReverse 0xb
|
|
||||||
CONSTANT: GXcopyInverted 0xc
|
|
||||||
CONSTANT: GXorInverted 0xd
|
|
||||||
CONSTANT: GXnand 0xe
|
|
||||||
CONSTANT: GXset 0xf
|
|
||||||
|
|
||||||
STRUCT: XGCValues
|
STRUCT: XGCValues
|
||||||
{ function int }
|
{ function int }
|
||||||
{ plane_mask ulong }
|
{ plane_mask ulong }
|
||||||
|
@ -539,69 +474,6 @@ X-FUNCTION: Status XKillClient ( Display* display, XID resource )
|
||||||
|
|
||||||
! 10.3 - Event Masks
|
! 10.3 - Event Masks
|
||||||
|
|
||||||
: NoEventMask ( -- n ) 0 ; inline
|
|
||||||
: KeyPressMask ( -- n ) 0 2^ ; inline
|
|
||||||
: KeyReleaseMask ( -- n ) 1 2^ ; inline
|
|
||||||
: ButtonPressMask ( -- n ) 2 2^ ; inline
|
|
||||||
: ButtonReleaseMask ( -- n ) 3 2^ ; inline
|
|
||||||
: EnterWindowMask ( -- n ) 4 2^ ; inline
|
|
||||||
: LeaveWindowMask ( -- n ) 5 2^ ; inline
|
|
||||||
: PointerMotionMask ( -- n ) 6 2^ ; inline
|
|
||||||
: PointerMotionHintMask ( -- n ) 7 2^ ; inline
|
|
||||||
: Button1MotionMask ( -- n ) 8 2^ ; inline
|
|
||||||
: Button2MotionMask ( -- n ) 9 2^ ; inline
|
|
||||||
: Button3MotionMask ( -- n ) 10 2^ ; inline
|
|
||||||
: Button4MotionMask ( -- n ) 11 2^ ; inline
|
|
||||||
: Button5MotionMask ( -- n ) 12 2^ ; inline
|
|
||||||
: ButtonMotionMask ( -- n ) 13 2^ ; inline
|
|
||||||
: KeymapStateMask ( -- n ) 14 2^ ; inline
|
|
||||||
: ExposureMask ( -- n ) 15 2^ ; inline
|
|
||||||
: VisibilityChangeMask ( -- n ) 16 2^ ; inline
|
|
||||||
: StructureNotifyMask ( -- n ) 17 2^ ; inline
|
|
||||||
: ResizeRedirectMask ( -- n ) 18 2^ ; inline
|
|
||||||
: SubstructureNotifyMask ( -- n ) 19 2^ ; inline
|
|
||||||
: SubstructureRedirectMask ( -- n ) 20 2^ ; inline
|
|
||||||
: FocusChangeMask ( -- n ) 21 2^ ; inline
|
|
||||||
: PropertyChangeMask ( -- n ) 22 2^ ; inline
|
|
||||||
: ColormapChangeMask ( -- n ) 23 2^ ; inline
|
|
||||||
: OwnerGrabButtonMask ( -- n ) 24 2^ ; inline
|
|
||||||
|
|
||||||
CONSTANT: KeyPress 2
|
|
||||||
CONSTANT: KeyRelease 3
|
|
||||||
CONSTANT: ButtonPress 4
|
|
||||||
CONSTANT: ButtonRelease 5
|
|
||||||
CONSTANT: MotionNotify 6
|
|
||||||
CONSTANT: EnterNotify 7
|
|
||||||
CONSTANT: LeaveNotify 8
|
|
||||||
CONSTANT: FocusIn 9
|
|
||||||
CONSTANT: FocusOut 10
|
|
||||||
CONSTANT: KeymapNotify 11
|
|
||||||
CONSTANT: Expose 12
|
|
||||||
CONSTANT: GraphicsExpose 13
|
|
||||||
CONSTANT: NoExpose 14
|
|
||||||
CONSTANT: VisibilityNotify 15
|
|
||||||
CONSTANT: CreateNotify 16
|
|
||||||
CONSTANT: DestroyNotify 17
|
|
||||||
CONSTANT: UnmapNotify 18
|
|
||||||
CONSTANT: MapNotify 19
|
|
||||||
CONSTANT: MapRequest 20
|
|
||||||
CONSTANT: ReparentNotify 21
|
|
||||||
CONSTANT: ConfigureNotify 22
|
|
||||||
CONSTANT: ConfigureRequest 23
|
|
||||||
CONSTANT: GravityNotify 24
|
|
||||||
CONSTANT: ResizeRequest 25
|
|
||||||
CONSTANT: CirculateNotify 26
|
|
||||||
CONSTANT: CirculateRequest 27
|
|
||||||
CONSTANT: PropertyNotify 28
|
|
||||||
CONSTANT: SelectionClear 29
|
|
||||||
CONSTANT: SelectionRequest 30
|
|
||||||
CONSTANT: SelectionNotify 31
|
|
||||||
CONSTANT: ColormapNotify 32
|
|
||||||
CONSTANT: ClientMessage 33
|
|
||||||
CONSTANT: MappingNotify 34
|
|
||||||
CONSTANT: GenericEvent 35
|
|
||||||
CONSTANT: LASTEvent 36
|
|
||||||
|
|
||||||
STRUCT: XAnyEvent
|
STRUCT: XAnyEvent
|
||||||
{ type int }
|
{ type int }
|
||||||
{ serial ulong }
|
{ serial ulong }
|
||||||
|
@ -613,27 +485,6 @@ STRUCT: XAnyEvent
|
||||||
|
|
||||||
! 10.5 Keyboard and Pointer Events
|
! 10.5 Keyboard and Pointer Events
|
||||||
|
|
||||||
CONSTANT: Button1 1
|
|
||||||
CONSTANT: Button2 2
|
|
||||||
CONSTANT: Button3 3
|
|
||||||
CONSTANT: Button4 4
|
|
||||||
CONSTANT: Button5 5
|
|
||||||
|
|
||||||
: Button1Mask ( -- n ) 1 8 shift ; inline
|
|
||||||
: Button2Mask ( -- n ) 1 9 shift ; inline
|
|
||||||
: Button3Mask ( -- n ) 1 10 shift ; inline
|
|
||||||
: Button4Mask ( -- n ) 1 11 shift ; inline
|
|
||||||
: Button5Mask ( -- n ) 1 12 shift ; inline
|
|
||||||
|
|
||||||
: ShiftMask ( -- n ) 1 0 shift ; inline
|
|
||||||
: LockMask ( -- n ) 1 1 shift ; inline
|
|
||||||
: ControlMask ( -- n ) 1 2 shift ; inline
|
|
||||||
: Mod1Mask ( -- n ) 1 3 shift ; inline
|
|
||||||
: Mod2Mask ( -- n ) 1 4 shift ; inline
|
|
||||||
: Mod3Mask ( -- n ) 1 5 shift ; inline
|
|
||||||
: Mod4Mask ( -- n ) 1 6 shift ; inline
|
|
||||||
: Mod5Mask ( -- n ) 1 7 shift ; inline
|
|
||||||
|
|
||||||
STRUCT: XButtonEvent
|
STRUCT: XButtonEvent
|
||||||
{ type int }
|
{ type int }
|
||||||
{ serial ulong }
|
{ serial ulong }
|
||||||
|
@ -1121,7 +972,9 @@ X-FUNCTION: Status XSelectInput ( Display* display, Window w, long event_mask )
|
||||||
X-FUNCTION: Status XFlush ( Display* display )
|
X-FUNCTION: Status XFlush ( Display* display )
|
||||||
X-FUNCTION: Status XSync ( Display* display, int discard )
|
X-FUNCTION: Status XSync ( Display* display, int discard )
|
||||||
X-FUNCTION: Status XNextEvent ( Display* display, XEvent* event )
|
X-FUNCTION: Status XNextEvent ( Display* display, XEvent* event )
|
||||||
X-FUNCTION: Status XMaskEvent ( Display* display, long event_mask, XEvent* event_return )
|
X-FUNCTION: Status XMaskEvent ( Display* display,
|
||||||
|
long event_mask,
|
||||||
|
XEvent* event_return )
|
||||||
|
|
||||||
! 11.3 - Event Queue Management
|
! 11.3 - Event Queue Management
|
||||||
|
|
||||||
|
@ -1134,7 +987,11 @@ X-FUNCTION: int XPending ( Display* display )
|
||||||
|
|
||||||
! 11.6 - Sending Events to Other Applications
|
! 11.6 - Sending Events to Other Applications
|
||||||
|
|
||||||
X-FUNCTION: Status XSendEvent ( Display* display, Window w, Bool propagate, long event_mask, XEvent* event_send )
|
X-FUNCTION: Status XSendEvent ( Display* display,
|
||||||
|
Window w,
|
||||||
|
Bool propagate,
|
||||||
|
long event_mask,
|
||||||
|
XEvent* event_send )
|
||||||
|
|
||||||
! 11.8 - Handling Protocol Errors
|
! 11.8 - Handling Protocol Errors
|
||||||
|
|
||||||
|
@ -1143,9 +1000,6 @@ X-FUNCTION: int XSetErrorHandler ( void* handler )
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
! 12 - Input Device Functions
|
! 12 - Input Device Functions
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
CONSTANT: None 0
|
|
||||||
|
|
||||||
X-FUNCTION: int XGrabPointer (
|
X-FUNCTION: int XGrabPointer (
|
||||||
Display* display,
|
Display* display,
|
||||||
Window grab_window,
|
Window grab_window,
|
||||||
|
@ -1411,7 +1265,9 @@ CONSTANT: XA_LAST_PREDEFINED 68
|
||||||
|
|
||||||
X-FUNCTION: void XFree ( void* data )
|
X-FUNCTION: void XFree ( void* data )
|
||||||
X-FUNCTION: int XStoreName ( Display* display, Window w, c-string window_name )
|
X-FUNCTION: int XStoreName ( Display* display, Window w, c-string window_name )
|
||||||
X-FUNCTION: void XSetWMNormalHints ( Display* display, Window w, XSizeHints* hints )
|
X-FUNCTION: void XSetWMNormalHints ( Display* display,
|
||||||
|
Window w,
|
||||||
|
XSizeHints* hints )
|
||||||
X-FUNCTION: int XBell ( Display* display, int percent )
|
X-FUNCTION: int XBell ( Display* display, int percent )
|
||||||
|
|
||||||
! !!! INPUT METHODS
|
! !!! INPUT METHODS
|
||||||
|
@ -1478,19 +1334,20 @@ CONSTANT: XLookupBoth 4
|
||||||
|
|
||||||
X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w )
|
X-FUNCTION: Bool XFilterEvent ( XEvent* event, Window w )
|
||||||
|
|
||||||
X-FUNCTION: XIM XOpenIM ( Display* dpy, void* rdb, c-string res_name, c-string res_class )
|
X-FUNCTION: XIM XOpenIM ( Display* dpy,
|
||||||
|
void* rdb,
|
||||||
|
c-string res_name,
|
||||||
|
c-string res_class )
|
||||||
|
|
||||||
X-FUNCTION: Status XCloseIM ( XIM im )
|
X-FUNCTION: Status XCloseIM ( XIM im )
|
||||||
|
|
||||||
X-FUNCTION: XIC XCreateIC (
|
X-FUNCTION: XIC XCreateIC ( XIM im,
|
||||||
XIM im,
|
c-string key1, Window value1,
|
||||||
c-string key1, Window value1,
|
c-string key2, Window value2,
|
||||||
c-string key2, Window value2,
|
c-string key3, int value3,
|
||||||
c-string key3, int value3,
|
c-string key4, c-string value4,
|
||||||
c-string key4, c-string value4,
|
c-string key5, c-string value5,
|
||||||
c-string key5, c-string value5,
|
int key6 )
|
||||||
int key6
|
|
||||||
)
|
|
||||||
|
|
||||||
X-FUNCTION: void XDestroyIC ( XIC ic )
|
X-FUNCTION: void XDestroyIC ( XIC ic )
|
||||||
|
|
||||||
|
@ -1498,9 +1355,19 @@ X-FUNCTION: void XSetICFocus ( XIC ic )
|
||||||
|
|
||||||
X-FUNCTION: void XUnsetICFocus ( XIC ic )
|
X-FUNCTION: void XUnsetICFocus ( XIC ic )
|
||||||
|
|
||||||
X-FUNCTION: int XwcLookupString ( XIC ic, XKeyPressedEvent* event, ulong* buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return )
|
X-FUNCTION: int XwcLookupString ( XIC ic,
|
||||||
|
XKeyPressedEvent* event,
|
||||||
|
ulong* buffer_return,
|
||||||
|
int bytes_buffer,
|
||||||
|
KeySym* keysym_return,
|
||||||
|
Status* status_return )
|
||||||
|
|
||||||
X-FUNCTION: int Xutf8LookupString ( XIC ic, XKeyPressedEvent* event, c-string buffer_return, int bytes_buffer, KeySym* keysym_return, Status* status_return )
|
X-FUNCTION: int Xutf8LookupString ( XIC ic,
|
||||||
|
XKeyPressedEvent* event,
|
||||||
|
c-string buffer_return,
|
||||||
|
int bytes_buffer,
|
||||||
|
KeySym* keysym_return,
|
||||||
|
Status* status_return )
|
||||||
|
|
||||||
! !!! category of setlocale
|
! !!! category of setlocale
|
||||||
CONSTANT: LC_ALL 0
|
CONSTANT: LC_ALL 0
|
||||||
|
|
Loading…
Reference in New Issue