Class X11
- java.lang.Object
-
- org.lwjgl.system.linux.X11
-
public class X11 extends java.lang.Object
Native bindings to libX11.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
X11.Functions
Contains the function pointers loaded from the X11SharedLibrary
.
-
Field Summary
Fields Modifier and Type Field Description static int
Above
static int
AllocAll
AllocNonestatic int
AllowExposures
SCREEN SAVER STUFFstatic int
AllTemporary
RESERVED RESOURCE AND CONSTANT DEFINITIONSstatic int
AlreadyGrabbed
GrabPointer, GrabKeyboard reply statusstatic int
AnyButton
AnyKeyRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic int
AnyModifier
button masks.static int
AnyPropertyType
RESERVED RESOURCE AND CONSTANT DEFINITIONSstatic int
ArcChord
ArcPieSliceArc modes for PolyFillArcstatic int
AsyncBoth
AsyncKeyboard
AsyncPointerAllowEvents modesstatic int
BadAccess
BadAlloc
BadAtom
BadColor
BadCursor
BadDrawable
BadFont
BadGC
BadIDChoice
BadImplementation
BadLength
BadMatch
BadName
BadPixmap
BadRequest
BadValue
BadWindowERROR CODESstatic int
Below
BottomIfstatic int
Button1
button names.static int
Button1Mask
button masks.static int
Button1MotionMask
Input Event Masks.static int
Button2
button names.static int
Button2Mask
button masks.static int
Button2MotionMask
Input Event Masks.static int
Button3
button names.static int
Button3Mask
button masks.static int
Button3MotionMask
Input Event Masks.static int
Button4
button names.static int
Button4Mask
button masks.static int
Button4MotionMask
Input Event Masks.static int
Button5
button names.static int
Button5Mask
button masks.static int
Button5MotionMask
ButtonMotionMaskInput Event Masks.static int
ButtonPress
Event names.static int
ButtonPressMask
Input Event Masks.static int
ButtonRelease
Event names.static int
ButtonReleaseMask
Input Event Masks.static int
CapButt
CapNotLast
CapProjecting
CapRoundcapStylestatic int
CirculateNotify
CirculateRequest
ClientMessageEvent names.static int
ClipByChildren
subwindow modestatic int
ColormapChangeMask
Input Event Masks.static int
ColormapInstalled
Color Map notificationstatic int
ColormapNotify
Event names.static int
ColormapUninstalled
Color Map notificationstatic int
Complex
Polygon shapesstatic int
ConfigureNotify
ConfigureRequestEvent names.static int
ControlMapIndex
modifier names.static int
ControlMask
Key masks.static int
Convex
Polygon shapesstatic int
CoordModeOrigin
CoordModePreviousCoordinateMode for drawing routinesstatic int
CopyFromParent
RESERVED RESOURCE AND CONSTANT DEFINITIONSstatic int
CreateNotify
Event names.static int
CurrentTime
RESERVED RESOURCE AND CONSTANT DEFINITIONSstatic int
CWBackingPixel
CWBackingPlanes
CWBackingStore
CWBackPixel
CWBackPixmap
CWBitGravity
CWBorderPixel
CWBorderPixmap
CWColormap
CWCursor
CWDontPropagate
CWEventMask
CWOverrideRedirect
CWSaveUnder
CWWinGravityWindow attributes for CreateWindow and ChangeWindowAttributesstatic int
DefaultBlanking
DefaultExposuresSCREEN SAVER STUFFstatic int
DestroyNotify
Event names.static int
DisableScreenInterval
DisableScreenSaver
DontAllowExposures
DontPreferBlankingSCREEN SAVER STUFFstatic int
EnterNotify
Event names.static int
EnterWindowMask
Input Event Masks.static int
EvenOddRule
fillRulestatic int
Expose
Event names.static int
ExposureMask
Input Event Masks.static int
False
Boolean valuesstatic int
FillOpaqueStippled
FillSolid
FillStippled
FillTiledfillStylestatic int
FirstExtensionError
ERROR CODESstatic int
FocusChangeMask
Input Event Masks.static int
FocusIn
FocusOutEvent names.static int
GCArcMode
GCBackground
GCCapStyle
GCClipMask
GCClipXOrigin
GCClipYOrigin
GCDashList
GCDashOffset
GCFillRule
GCFillStyle
GCFont
GCForeground
GCFunction
GCGraphicsExposures
GCJoinStyle
GCLastBit
GCLineStyle
GCLineWidth
GCPlaneMask
GCStipple
GCSubwindowMode
GCTile
GCTileStipXOrigin
GCTileStipYOriginGC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into GC.stateChangesstatic int
GenericEvent
Event names.static int
GrabFrozen
GrabInvalidTimeGrabPointer, GrabKeyboard reply statusstatic int
GrabModeAsync
GrabModeSyncGrabPointer, GrabButton, GrabKeyboard, GrabKey Modesstatic int
GrabNotViewable
GrabSuccessGrabPointer, GrabKeyboard reply statusstatic int
GraphicsExpose
GravityNotifyEvent names.static int
GXand
GXandInverted
GXandReverse
GXclear
GXcopy
GXcopyInverted
GXequiv
GXinvert
GXnand
GXnoop
GXnor
GXor
GXorInverted
GXorReverse
GXset
GXxorgraphics functions, as in GC.alustatic int
IncludeInferiors
subwindow modestatic int
InputFocus
RESERVED RESOURCE AND CONSTANT DEFINITIONSstatic int
InputOnly
InputOutputstatic int
JoinBevel
JoinMiter
JoinRoundjoinStylestatic int
KeymapNotify
Event names.static int
KeymapStateMask
Input Event Masks.static int
KeyPress
Event names.static int
KeyPressMask
Input Event Masks.static int
KeyRelease
Event names.static int
KeyReleaseMask
Input Event Masks.static int
LASTEvent
Event names.static int
LastExtensionError
ERROR CODESstatic int
LeaveNotify
Event names.static int
LeaveWindowMask
Input Event Masks.static int
LineDoubleDash
LineOnOffDash
LineSolidLineStylestatic int
LockMapIndex
modifier names.static int
LockMask
Key masks.static int
MapNotify
Event names.static int
MappingKeyboard
MappingModifierstatic int
MappingNotify
Event names.static int
MappingPointer
static int
MapRequest
Event names.static int
Mod1MapIndex
modifier names.static int
Mod1Mask
Key masks.static int
Mod2MapIndex
modifier names.static int
Mod2Mask
Key masks.static int
Mod3MapIndex
modifier names.static int
Mod3Mask
Key masks.static int
Mod4MapIndex
modifier names.static int
Mod4Mask
Key masks.static int
Mod5MapIndex
modifier names.static int
Mod5Mask
Key masks.static int
MotionNotify
Event names.static int
NoEventMask
Input Event Masks.static int
NoExpose
Event names.static int
Nonconvex
Polygon shapesstatic int
None
NoSymbolRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic int
NotifyAncestor
NotifyDetailNoneNotify detailstatic int
NotifyGrab
NotifyHintNotify modesstatic int
NotifyInferior
NotifyNonlinear
NotifyNonlinearVirtualNotify detailstatic int
NotifyNormal
Notify modesstatic int
NotifyPointer
NotifyPointerRootNotify detailstatic int
NotifyUngrab
Notify modesstatic int
NotifyVirtual
Notify detailstatic int
NotifyWhileGrabbed
Notify modesstatic int
Opposite
static int
OwnerGrabButtonMask
Input Event Masks.static int
ParentRelative
RESERVED RESOURCE AND CONSTANT DEFINITIONSstatic int
PlaceOnBottom
PlaceOnTopCirculation requeststatic int
PointerMotionHintMask
PointerMotionMaskInput Event Masks.static int
PointerRoot
PointerWindowRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic int
PreferBlanking
SCREEN SAVER STUFFstatic int
PropertyChangeMask
Input Event Masks.static int
PropertyDelete
PropertyNewValueProperty notificationstatic int
PropertyNotify
Event names.static int
PropModeAppend
PropModePrepend
PropModeReplaceProperty modesstatic int
ReparentNotify
Event names.static int
ReplayKeyboard
ReplayPointerAllowEvents modesstatic int
ResizeRedirectMask
Input Event Masks.static int
ResizeRequest
Event names.static int
RevertToNone
RevertToParent
RevertToPointerRootUsed in XSetInputFocus(), XGetInputFocus().static int
ScreenSaverActive
ScreenSaverResetSCREEN SAVER STUFFstatic int
SelectionClear
SelectionNotify
SelectionRequestEvent names.static int
ShiftMapIndex
modifier names.static int
ShiftMask
Key masks.static int
StructureNotifyMask
SubstructureNotifyMask
SubstructureRedirectMaskInput Event Masks.static int
Success
ERROR CODESstatic int
SyncBoth
SyncKeyboard
SyncPointerAllowEvents modesstatic int
TopIf
static int
True
Boolean valuesstatic int
UnmapNotify
Event names.static int
Unsorted
SetClipRectangles orderingstatic int
VisibilityChangeMask
Input Event Masks.static int
VisibilityFullyObscured
Visibility notifystatic int
VisibilityNotify
Event names.static int
VisibilityPartiallyObscured
VisibilityUnobscuredVisibility notifystatic int
WindingRule
fillRulestatic int
YSorted
YXBanded
YXSortedSetClipRectangles ordering
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SharedLibrary
getLibrary()
Returns the X11SharedLibrary
.static long
nXCreateColormap(long display, long w, long visual, int alloc)
Unsafe version of:XCreateColormap(long, long, org.lwjgl.system.linux.Visual, int)
static long
nXCreateWindow(long display, long parent, int x, int y, int width, int height, int border_width, int depth, int windowClass, long visual, long valuemask, long attributes)
static int
nXFree(long data)
Unsafe version of:XFree(java.nio.ByteBuffer)
static long
nXGetMotionEvents(long display, long w, long start, long stop, long nevents_return)
Unsafe version of:XGetMotionEvents(long, long, long, long)
static long
nXOpenDisplay(long display_name)
Unsafe version of:XOpenDisplay(java.nio.ByteBuffer)
static int
nXSendEvent(long display, long w, int propagate, long event_mask, long event_send)
Unsafe version of:XSendEvent(long, long, boolean, long, org.lwjgl.system.linux.XEvent)
static int
nXTranslateCoordinates(long display, long src_w, long dest_w, int src_x, int src_y, long dest_x_return, long dest_y_return, long child_return)
static void
XCloseDisplay(long display)
Closes the connection to the X server for the display specified in theDisplay
structure and destroys all windows, resource IDs (Window, Font, Pixmap, Colormap, Cursor, and GContext), or other resources that the client has created on this display, unless the close-down mode of the resource has been changed (seeXSetCloseDownMode()
).static long
XCreateColormap(long display, long w, Visual visual, int alloc)
Creates a colormap of the specified visual type for the screen on which the specified window resides and returns the colormap ID associated with it.static long
XCreateWindow(long display, long parent, int x, int y, int width, int height, int border_width, int depth, int windowClass, Visual visual, long valuemask, XSetWindowAttributes attributes)
Creates an unmapped subwindow for a specified parent window, returns the window ID of the created window, and causes the X server to generate aCreateNotify
event.static int
XDefaultScreen(long display)
Returns a pointer to the default screen.static int
XDestroyWindow(long display, long w)
Destroys the specified window as well as all of its subwindows and causes the X server to generate aDestroyNotify
event for each window.static long
XDisplayMotionBufferSize(long display)
static int
XFree(java.nio.ByteBuffer data)
Free in-memory data that was created by an Xlib function.static int
XFree(PointerBuffer data)
Free in-memory data that was created by an Xlib function.static int
XFreeColormap(long display, long colormap)
Deletes the association between thecolormap
resource ID and thecolormap
and frees thecolormap
storage.static XTimeCoord.Buffer
XGetMotionEvents(long display, long w, long start, long stop)
TheXGetMotionEvents
function returns all events in the motion history buffer that fall between the specified start and stop times, inclusive, and that have coordinates that lie within the specified window (including its borders) at its present placement.static long
XOpenDisplay(java.lang.CharSequence display_name)
Returns a Display structure that serves as the connection to the X server and that contains all the information about that X server.static long
XOpenDisplay(java.nio.ByteBuffer display_name)
Returns a Display structure that serves as the connection to the X server and that contains all the information about that X server.static long
XRootWindow(long display, int screen_number)
Returns the root window of the specified screen.static int
XSendEvent(long display, long w, boolean propagate, long event_mask, XEvent event_send)
TheXSendEvent
function identifies the destination window, determines which clients should receive the specified events, and ignores any active grabs.static boolean
XTranslateCoordinates(long display, long src_w, long dest_w, int src_x, int src_y, int[] dest_x_return, int[] dest_y_return, CLongBuffer child_return)
static boolean
XTranslateCoordinates(long display, long src_w, long dest_w, int src_x, int src_y, java.nio.IntBuffer dest_x_return, java.nio.IntBuffer dest_y_return, CLongBuffer child_return)
Translates window coordinates.
-
-
-
Field Detail
-
None, ParentRelative, CopyFromParent, PointerWindow, InputFocus, PointerRoot, AnyPropertyType, AnyKey, AnyButton, AllTemporary, CurrentTime, NoSymbol
RESERVED RESOURCE AND CONSTANT DEFINITIONS
-
Success, BadRequest, BadValue, BadWindow, BadPixmap, BadAtom, BadCursor, BadFont, BadMatch, BadDrawable, BadAccess, BadAlloc, BadColor, BadGC, BadIDChoice, BadName, BadLength, BadImplementation, FirstExtensionError, LastExtensionError
ERROR CODES
-
CWBackPixmap, CWBackPixel, CWBorderPixmap, CWBorderPixel, CWBitGravity, CWWinGravity, CWBackingStore, CWBackingPlanes, CWBackingPixel, CWOverrideRedirect, CWSaveUnder, CWEventMask, CWDontPropagate, CWColormap, CWCursor
Window attributes for CreateWindow and ChangeWindowAttributes
-
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
Input Event Masks. Used as event-mask window attribute and as arguments to Grab requests. Not to be confused with event names.
-
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, GenericEvent, LASTEvent
Event names. Used in "type" field inXEvent
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.
-
ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask
Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer, state in various key-, mouse-, and button-related events.
-
ShiftMapIndex, LockMapIndex, ControlMapIndex, Mod1MapIndex, Mod2MapIndex, Mod3MapIndex, Mod4MapIndex, Mod5MapIndex
modifier names. Used to build a SetModifierMapping request or to read a GetModifierMapping request. These correspond to the masks defined above.
-
Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask, AnyModifier
button masks. Used in same manner as Key masks above. Not to be confused with button names below.
-
Button1, Button2, Button3, Button4, Button5
button names. Used as arguments to GrabButton and as detail in ButtonPress and ButtonRelease events. Not to be confused with button masks above. Note that 0 is already defined above as "AnyButton".
-
NotifyNormal, NotifyGrab, NotifyUngrab, NotifyWhileGrabbed, NotifyHint
Notify modes
-
NotifyAncestor, NotifyVirtual, NotifyInferior, NotifyNonlinear, NotifyNonlinearVirtual, NotifyPointer, NotifyPointerRoot, NotifyDetailNone
Notify detail
-
VisibilityUnobscured, VisibilityPartiallyObscured, VisibilityFullyObscured
Visibility notify
-
PlaceOnTop, PlaceOnBottom
Circulation request
-
PropertyNewValue, PropertyDelete
Property notification
-
ColormapUninstalled, ColormapInstalled
Color Map notification
-
GrabModeSync, GrabModeAsync
GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes
-
GrabSuccess, AlreadyGrabbed, GrabInvalidTime, GrabNotViewable, GrabFrozen
GrabPointer, GrabKeyboard reply status
-
AsyncPointer, SyncPointer, ReplayPointer, AsyncKeyboard, SyncKeyboard, ReplayKeyboard, AsyncBoth, SyncBoth
AllowEvents modes
-
RevertToNone, RevertToPointerRoot, RevertToParent
Used in XSetInputFocus(), XGetInputFocus().
-
DontPreferBlanking, PreferBlanking, DefaultBlanking, DisableScreenSaver, DisableScreenInterval, DontAllowExposures, AllowExposures, DefaultExposures, ScreenSaverReset, ScreenSaverActive
SCREEN SAVER STUFF
-
PropModeReplace, PropModePrepend, PropModeAppend
Property modes
-
GXclear, GXand, GXandReverse, GXcopy, GXandInverted, GXnoop, GXxor, GXor, GXnor, GXequiv, GXinvert, GXorReverse, GXcopyInverted, GXorInverted, GXnand, GXset
graphics functions, as in GC.alu
-
LineSolid, LineOnOffDash, LineDoubleDash
LineStyle
-
CapNotLast, CapButt, CapRound, CapProjecting
capStyle
-
FillSolid, FillTiled, FillStippled, FillOpaqueStippled
fillStyle
-
EvenOddRule, WindingRule
fillRule
-
ClipByChildren, IncludeInferiors
subwindow mode
-
CoordModeOrigin, CoordModePrevious
CoordinateMode for drawing routines
-
ArcChord, ArcPieSlice
Arc modes for PolyFillArc
-
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 components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into GC.stateChanges
-
Above
- See Also:
- Constant Field Values
-
Below
- See Also:
- Constant Field Values
-
TopIf
- See Also:
- Constant Field Values
-
BottomIf
- See Also:
- Constant Field Values
-
Opposite
- See Also:
- Constant Field Values
-
MappingModifier
- See Also:
- Constant Field Values
-
MappingKeyboard
- See Also:
- Constant Field Values
-
MappingPointer
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLibrary
public static SharedLibrary getLibrary()
Returns the X11SharedLibrary
.
-
nXOpenDisplay
public static long nXOpenDisplay(long display_name)
Unsafe version of:XOpenDisplay(java.nio.ByteBuffer)
-
XOpenDisplay
public static long XOpenDisplay(@Nullable java.nio.ByteBuffer display_name) public static long XOpenDisplay(@Nullable java.lang.CharSequence display_name)
Returns a Display structure that serves as the connection to the X server and that contains all the information about that X server.XOpenDisplay
connects your application to the X server through TCP or DECnet communications protocols, or through some local inter-process communication protocol. If the hostname is a host machine name and a single colon (:) separates the hostname and display number,XOpenDisplay
connects using TCP streams. If the hostname is not specified, Xlib uses whatever it believes is the fastest transport. If the hostname is a host machine name and a double colon (::) separates the hostname and display number,XOpenDisplay
connects using DECnet. A single X server can support any or all of these transport mechanisms simultaneously. A particular Xlib implementation can support many more of these transport mechanisms.- Parameters:
display_name
- the hardware display name, which determines the display and communications domain to be used. On a POSIX-conformant system, if thedisplay_name
isNULL
, it defaults to the value of the DISPLAY environment variable.
-
XCloseDisplay
public static void XCloseDisplay(long display)
Closes the connection to the X server for the display specified in theDisplay
structure and destroys all windows, resource IDs (Window, Font, Pixmap, Colormap, Cursor, and GContext), or other resources that the client has created on this display, unless the close-down mode of the resource has been changed (seeXSetCloseDownMode()
). Therefore, these windows, resource IDs, and other resources should never be referenced again or an error will be generated. Before exiting, you should callXCloseDisplay()
explicitly so that any pending errors are reported asXCloseDisplay()
performs a finalXSync()
operation.- Parameters:
display
- the connection to the X server
-
XDefaultScreen
public static int XDefaultScreen(long display)
Returns a pointer to the default screen.- Parameters:
display
- the connection to the X server
-
XRootWindow
public static long XRootWindow(long display, int screen_number)
Returns the root window of the specified screen.- Parameters:
display
- the connection to the X serverscreen_number
- the appropriate screen number on the host server
-
nXCreateColormap
public static long nXCreateColormap(long display, long w, long visual, int alloc)
Unsafe version of:XCreateColormap(long, long, org.lwjgl.system.linux.Visual, int)
-
XCreateColormap
public static long XCreateColormap(long display, long w, Visual visual, int alloc)
Creates a colormap of the specified visual type for the screen on which the specified window resides and returns the colormap ID associated with it. Note that the specified window is only used to determine the screen.- Parameters:
display
- the connection to the X serverw
- the windowvisual
- a visual type supported on the screen. If the visual type is not one supported by the screen, aBadMatch
error results.alloc
- the colormap entries to be allocated. You can pass AllocNone or AllocAll.
-
XFreeColormap
public static int XFreeColormap(long display, long colormap)
Deletes the association between thecolormap
resource ID and thecolormap
and frees thecolormap
storage. However, this function has no effect on the default colormap for a screen. If the specifiedcolormap
is an installed map for a screen, it is uninstalled. If the specifiedcolormap
is defined as thecolormap
for a window,XFreeColormap()
changes the colormap associated with the window toNone
and generates aColormapNotify
event. X does not define the colors displayed for a window with a colormap ofNone
.- Parameters:
display
- the connection to the X servercolormap
- the colormap to destroy
-
nXCreateWindow
public static long nXCreateWindow(long display, long parent, int x, int y, int width, int height, int border_width, int depth, int windowClass, long visual, long valuemask, long attributes)
-
XCreateWindow
public static long XCreateWindow(long display, long parent, int x, int y, int width, int height, int border_width, int depth, int windowClass, Visual visual, long valuemask, XSetWindowAttributes attributes)
Creates an unmapped subwindow for a specified parent window, returns the window ID of the created window, and causes the X server to generate aCreateNotify
event. The created window is placed on top in the stacking order with respect to siblings.The coordinate system has the X axis horizontal and the Y axis vertical with the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms of pixels, and coincide with pixel centers. Each window and pixmap has its own coordinate system. For a window, the origin is inside the border at the inside, upper-left corner.
The x and y coordinates are the top-left outside corner of the window's borders and are relative to the inside of the parent window's borders.
The width and height are the created window's inside dimensions and do not include the created window's borders.
- Parameters:
display
- the connection to the X serverparent
- the parent windowx
- the window x-coordinatey
- the window y-coordinatewidth
- the window widthheight
- the window heightborder_width
- the border widthdepth
- the window's depth. A depth ofCopyFromParent
means the depth is taken from the parent.windowClass
- the created window's class. One of:InputOutput
InputOnly
CopyFromParent
visual
- the visual type. A visual ofCopyFromParent
means the visual type is taken from the parent.valuemask
- which window attributes are defined in the attributes argument. This mask is the bitwise inclusive OR of the valid attribute mask bits. Ifvaluemask
is zero, the attributes are ignored and are not referenced.attributes
- the structure from which the values (as specified by the value mask) are to be taken
-
XDestroyWindow
public static int XDestroyWindow(long display, long w)
Destroys the specified window as well as all of its subwindows and causes the X server to generate aDestroyNotify
event for each window. The window should never be referenced again. If the window specified by thew
argument is mapped, it is unmapped automatically. The ordering of theDestroyNotify
events is such that for any given window being destroyed,DestroyNotify
is generated on any inferiors of the window before being generated on the window itself. The ordering among siblings and across subhierarchies is not otherwise constrained. If the window you specified is a root window, no windows are destroyed. Destroying a mapped window will generateExpose
events on other windows that were obscured by the window being destroyed.- Parameters:
display
- the connection to the X serverw
- the window
-
nXFree
public static int nXFree(long data)
Unsafe version of:XFree(java.nio.ByteBuffer)
-
XFree
public static int XFree(java.nio.ByteBuffer data) public static int XFree(PointerBuffer data)
Free in-memory data that was created by an Xlib function.- Parameters:
data
- the data that is to be freed
-
nXSendEvent
public static int nXSendEvent(long display, long w, int propagate, long event_mask, long event_send)
Unsafe version of:XSendEvent(long, long, boolean, long, org.lwjgl.system.linux.XEvent)
-
XSendEvent
public static int XSendEvent(long display, long w, boolean propagate, long event_mask, XEvent event_send)
TheXSendEvent
function identifies the destination window, determines which clients should receive the specified events, and ignores any active grabs. This function requires you to pass an event mask. This function uses thew
argument to identify the destination window as follows:- If
w
isPointerWindow
, the destination window is the window that contains the pointer. - If
w
isInputFocus
and if the focus window contains the pointer, the destination window is the window that contains the pointer; otherwise, the destination window is the focus window.
To determine which clients should receive the specified events,
XSendEvent
uses the propagate argument as follows:- If
event_mask
is the empty set, the event is sent to the client that created the destination window. If that client no longer exists, no event is sent. - If
propagate
isFalse
, the event is sent to every client selecting on destination any of the event types in theevent_mask
argument. - If
propagate
isTrue
and no clients have selected on destination any of the event types in event-mask, the destination is replaced with the closest ancestor of destination for which some client has selected a type in event-mask and for which no intervening window has that type in its do-not-propagate-mask. If no such window exists or if the window is an ancestor of the focus window andInputFocus
was originally specified as the destination, the event is not sent to any clients. Otherwise, the event is reported to every client selecting on the final destination any of the types specified inevent_mask
.
The event in the
XEvent
structure must be one of the core events or one of the events defined by an extension (or aBadValue
error results) so that the X server can correctly byte-swap the contents as necessary. The contents of the event are otherwise unaltered and unchecked by the X server except to forcesend_event
toTrue
in the forwarded event and to set the serial number in the event correctly; therefore these fields and the display field are ignored byXSendEvent
.XSendEvent
returns zero if the conversion to wire protocol format failed and returns nonzero otherwise.XSendEvent
can generateBadValue
andBadWindow
errors.The server may retain the recent history of the pointer motion and do so to a finer granularity than is reported by
MotionNotify
events. TheXGetMotionEvents(long, long, long, long)
function makes this history available.- Parameters:
display
- the connection to the X serverw
- specifies the window the event is to be sent topropagate
- specifies aBoolean
valueevent_mask
- specifies the event maskevent_send
- specifies the event that is to be sent
- If
-
XDisplayMotionBufferSize
public static long XDisplayMotionBufferSize(long display)
- Parameters:
display
- the connection to the X server
-
nXGetMotionEvents
public static long nXGetMotionEvents(long display, long w, long start, long stop, long nevents_return)
Unsafe version of:XGetMotionEvents(long, long, long, long)
-
XGetMotionEvents
@Nullable public static XTimeCoord.Buffer XGetMotionEvents(long display, long w, long start, long stop)
TheXGetMotionEvents
function returns all events in the motion history buffer that fall between the specified start and stop times, inclusive, and that have coordinates that lie within the specified window (including its borders) at its present placement.If the server does not support motion history, if the start time is later than the stop time, or if the start time is in the future, no events are returned;
XGetMotionEvents
returnsNULL
. If the stop time is in the future, it is equivalent to specifyingCurrentTime
.XGetMotionEvents
can generate aBadWindow
error.- Parameters:
display
- the connection to the X server
-
nXTranslateCoordinates
public static int nXTranslateCoordinates(long display, long src_w, long dest_w, int src_x, int src_y, long dest_x_return, long dest_y_return, long child_return)
-
XTranslateCoordinates
public static boolean XTranslateCoordinates(long display, long src_w, long dest_w, int src_x, int src_y, java.nio.IntBuffer dest_x_return, java.nio.IntBuffer dest_y_return, CLongBuffer child_return)
Translates window coordinates.If
XTranslateCoordinates
returnsTrue
, it takes thesrc_x
andsrc_y
coordinates relative to the source window's origin and returns these coordinates todest_x_return
anddest_y_return
relative to the destination window's origin. IfXTranslateCoordinates
returnsFalse
,src_w
anddest_w
are on different screens, anddest_x_return
anddest_y_return
are zero. If the coordinates are contained in a mapped child ofdest_w
, that child is returned tochild_return
. Otherwise,child_return
is set toNone
.XTranslateCoordinates
can generate aBadWindow
error.- Parameters:
display
- the connection to the X serversrc_w
- specifies the source windowdest_w
- specifies the destination windowsrc_x
- specifies the x coordinate within the source windowsrc_y
- specifies the x coordinate within the source windowdest_x_return
- returns the x coordinate within the destination windowdest_y_return
- returns the y coordinate within the destination windowchild_return
- returns the child if the coordinates are contained in a mapped child of the destination window
-
XTranslateCoordinates
public static boolean XTranslateCoordinates(long display, long src_w, long dest_w, int src_x, int src_y, int[] dest_x_return, int[] dest_y_return, CLongBuffer child_return)
-
-