Package org.lwjgl.system.linux
Class X11
- java.lang.Object
-
- org.lwjgl.system.linux.X11
-
public class X11 extends java.lang.ObjectNative bindings to libX11.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classX11.FunctionsContains the function pointers loaded from the X11SharedLibrary.
-
Field Summary
Fields Modifier and Type Field and Description static intAllocAll
AllocNonestatic intAllowExposuresSCREEN SAVER STUFFstatic intAllTemporaryRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic intAlreadyGrabbedGrabPointer, GrabKeyboard reply statusstatic intAnyButton
AnyKeyRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic intAnyModifierbutton masks.static intAnyPropertyTypeRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic intArcChord
ArcPieSliceArc modes for PolyFillArcstatic intAsyncBoth
AsyncKeyboard
AsyncPointerAllowEvents modesstatic intBadAccess
BadAlloc
BadAtom
BadColor
BadCursor
BadDrawable
BadFont
BadGC
BadIDChoice
BadImplementation
BadLength
BadMatch
BadName
BadPixmap
BadRequest
BadValue
BadWindowERROR CODESstatic intButton1button names.static intButton1Maskbutton masks.static intButton1MotionMaskInput Event Masks.static intButton2button names.static intButton2Maskbutton masks.static intButton2MotionMaskInput Event Masks.static intButton3button names.static intButton3Maskbutton masks.static intButton3MotionMaskInput Event Masks.static intButton4button names.static intButton4Maskbutton masks.static intButton4MotionMaskInput Event Masks.static intButton5button names.static intButton5Maskbutton masks.static intButton5MotionMask
ButtonMotionMaskInput Event Masks.static intButtonPressEvent names.static intButtonPressMaskInput Event Masks.static intButtonReleaseEvent names.static intButtonReleaseMaskInput Event Masks.static intCapButt
CapNotLast
CapProjecting
CapRoundcapStylestatic intCirculateNotify
CirculateRequest
ClientMessageEvent names.static intClipByChildrensubwindow modestatic intColormapChangeMaskInput Event Masks.static intColormapInstalledColor Map notificationstatic intColormapNotifyEvent names.static intColormapUninstalledColor Map notificationstatic intComplexPolygon shapesstatic intConfigureNotify
ConfigureRequestEvent names.static intControlMapIndexmodifier names.static intControlMaskKey masks.static intConvexPolygon shapesstatic intCoordModeOrigin
CoordModePreviousCoordinateMode for drawing routinesstatic intCopyFromParentRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic intCreateNotifyEvent names.static intCurrentTimeRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic intCWBackingPixel
CWBackingPlanes
CWBackingStore
CWBackPixel
CWBackPixmap
CWBitGravity
CWBorderPixel
CWBorderPixmap
CWColormap
CWCursor
CWDontPropagate
CWEventMask
CWOverrideRedirect
CWSaveUnder
CWWinGravityWindow attributes for CreateWindow and ChangeWindowAttributesstatic intDefaultBlanking
DefaultExposuresSCREEN SAVER STUFFstatic intDestroyNotifyEvent names.static intDisableScreenInterval
DisableScreenSaver
DontAllowExposures
DontPreferBlankingSCREEN SAVER STUFFstatic intEnterNotifyEvent names.static intEnterWindowMaskInput Event Masks.static intEvenOddRulefillRulestatic intExposeEvent names.static intExposureMaskInput Event Masks.static intFalseBoolean valuesstatic intFillOpaqueStippled
FillSolid
FillStippled
FillTiledfillStylestatic intFocusChangeMaskInput Event Masks.static intFocusIn
FocusOutEvent names.static intGCArcMode
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 intGenericEventEvent names.static intGrabFrozen
GrabInvalidTimeGrabPointer, GrabKeyboard reply statusstatic intGrabModeAsync
GrabModeSyncGrabPointer, GrabButton, GrabKeyboard, GrabKey Modesstatic intGrabNotViewable
GrabSuccessGrabPointer, GrabKeyboard reply statusstatic intGraphicsExpose
GravityNotifyEvent names.static intGXand
GXandInverted
GXandReverse
GXclear
GXcopy
GXcopyInverted
GXequiv
GXinvert
GXnand
GXnoop
GXnor
GXor
GXorInverted
GXorReverse
GXset
GXxorgraphics functions, as in GC.alustatic intIncludeInferiorssubwindow modestatic intInputFocusRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic intInputOnly
InputOutputstatic intJoinBevel
JoinMiter
JoinRoundjoinStylestatic intKeymapNotifyEvent names.static intKeymapStateMaskInput Event Masks.static intKeyPressEvent names.static intKeyPressMaskInput Event Masks.static intKeyReleaseEvent names.static intKeyReleaseMaskInput Event Masks.static intLASTEvent
LeaveNotifyEvent names.static intLeaveWindowMaskInput Event Masks.static intLineDoubleDash
LineOnOffDash
LineSolidLineStylestatic intLockMapIndexmodifier names.static intLockMaskKey masks.static intMapNotify
MappingNotify
MapRequestEvent names.static intMod1MapIndexmodifier names.static intMod1MaskKey masks.static intMod2MapIndexmodifier names.static intMod2MaskKey masks.static intMod3MapIndexmodifier names.static intMod3MaskKey masks.static intMod4MapIndexmodifier names.static intMod4MaskKey masks.static intMod5MapIndexmodifier names.static intMod5MaskKey masks.static intMotionNotifyEvent names.static intNoEventMaskInput Event Masks.static intNoExposeEvent names.static intNonconvexPolygon shapesstatic intNone
NoSymbolRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic intNotifyAncestor
NotifyDetailNoneNotify detailstatic intNotifyGrab
NotifyHintNotify modesstatic intNotifyInferior
NotifyNonlinear
NotifyNonlinearVirtualNotify detailstatic intNotifyNormalNotify modesstatic intNotifyPointer
NotifyPointerRootNotify detailstatic intNotifyUngrabNotify modesstatic intNotifyVirtualNotify detailstatic intNotifyWhileGrabbedNotify modesstatic intOwnerGrabButtonMaskInput Event Masks.static intParentRelativeRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic intPlaceOnBottom
PlaceOnTopCirculation requeststatic intPointerMotionHintMask
PointerMotionMaskInput Event Masks.static intPointerRoot
PointerWindowRESERVED RESOURCE AND CONSTANT DEFINITIONSstatic intPreferBlankingSCREEN SAVER STUFFstatic intPropertyChangeMaskInput Event Masks.static intPropertyDelete
PropertyNewValueProperty notificationstatic intPropertyNotifyEvent names.static intPropModeAppend
PropModePrepend
PropModeReplaceProperty modesstatic intReparentNotifyEvent names.static intReplayKeyboard
ReplayPointerAllowEvents modesstatic intResizeRedirectMaskInput Event Masks.static intResizeRequestEvent names.static intRevertToNone
RevertToParent
RevertToPointerRootUsed in XSetInputFocus(), XGetInputFocus().static intScreenSaverActive
ScreenSaverResetSCREEN SAVER STUFFstatic intSelectionClear
SelectionNotify
SelectionRequestEvent names.static intShiftMapIndexmodifier names.static intShiftMaskKey masks.static intStructureNotifyMask
SubstructureNotifyMask
SubstructureRedirectMaskInput Event Masks.static intSuccessERROR CODESstatic intSyncBoth
SyncKeyboard
SyncPointerAllowEvents modesstatic intTrueBoolean valuesstatic intUnmapNotifyEvent names.static intUnsortedSetClipRectangles orderingstatic intVisibilityChangeMaskInput Event Masks.static intVisibilityFullyObscuredVisibility notifystatic intVisibilityNotifyEvent names.static intVisibilityPartiallyObscured
VisibilityUnobscuredVisibility notifystatic intWindingRulefillRulestatic intYSorted
YXBanded
YXSortedSetClipRectangles ordering
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static SharedLibrarygetLibrary()Returns the X11SharedLibrary.static voidXCloseDisplay(long display)Closes the connection to the X server for the display specified in theDisplaystructure 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 longXCreateColormap(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 longXCreateWindow(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 aCreateNotifyevent.static intXDefaultScreen(long display)Returns a pointer to the default screen.static intXDestroyWindow(long display, long w)Destroys the specified window as well as all of its subwindows and causes the X server to generate aDestroyNotifyevent for each window.static intXFree(java.nio.ByteBuffer data)Free in-memory data that was created by an Xlib function.static intXFree(PointerBuffer data)Free in-memory data that was created by an Xlib function.static intXFreeColormap(long display, long colormap)Deletes the association between thecolormapresource ID and thecolormapand frees thecolormapstorage.static longXOpenDisplay(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 longXOpenDisplay(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 longXRootWindow(long display, int screen_number)Returns the root window of the specified screen.
-
-
-
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
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 inXEventstructures. 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
-
-
Method Detail
-
getLibrary
public static SharedLibrary getLibrary()
Returns the X11SharedLibrary.
-
XOpenDisplay
public static long XOpenDisplay(java.nio.ByteBuffer display_name) public 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.XOpenDisplayconnects 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,XOpenDisplayconnects 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,XOpenDisplayconnects 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_nameisNULL, 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 theDisplaystructure 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
-
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, aBadMatcherror 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 thecolormapresource ID and thecolormapand frees thecolormapstorage. However, this function has no effect on the default colormap for a screen. If the specifiedcolormapis an installed map for a screen, it is uninstalled. If the specifiedcolormapis defined as thecolormapfor a window,XFreeColormap()changes the colormap associated with the window toX11.Noneand generates aColormapNotifyevent. X does not define the colors displayed for a window with a colormap ofX11.None.- Parameters:
display- the connection to the X servercolormap- the colormap to destroy
-
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 aCreateNotifyevent. 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 ofX11.CopyFromParentmeans the depth is taken from the parent.windowClass- the created window's class. One of:X11.InputOutputX11.InputOnlyX11.CopyFromParentvisual- the visual type. A visual ofX11.CopyFromParentmeans 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. Ifvaluemaskis 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 aDestroyNotifyevent for each window. The window should never be referenced again. If the window specified by thewargument is mapped, it is unmapped automatically. The ordering of theDestroyNotifyevents is such that for any given window being destroyed,DestroyNotifyis 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 generateExposeevents on other windows that were obscured by the window being destroyed.- Parameters:
display- the connection to the X serverw- the window
-
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
-
-