Schnittstelle X11

Alle Superschnittstellen:
Library

public interface X11 extends Library
Definition (incomplete) of the X library.
  • Felddetails

  • Methodendetails

    • XQueryExtension

      boolean XQueryExtension(X11.Display display, String name, IntByReference major_opcode_return, IntByReference first_event_return, IntByReference first_error_return)
      The XQueryExtension function determines if the named extension is present.
      Parameter:
      display - Specifies the connection to the X server.
      name - Specifies the extension name.
      major_opcode_return - Returns the major opcode.
      first_event_return - Returns the first event code, if any.
      first_error_return - Returns the first error code, if any.
      Gibt zurück:
      if present
    • XOpenDisplay

      X11.Display XOpenDisplay(String name)
    • XGetErrorText

      int XGetErrorText(X11.Display display, int code, byte[] buffer, int len)
    • XDefaultScreen

      int XDefaultScreen(X11.Display display)
    • DefaultScreenOfDisplay

      X11.Screen DefaultScreenOfDisplay(X11.Display display)
    • XDefaultVisual

      X11.Visual XDefaultVisual(X11.Display display, int screen)
    • XDefaultColormap

      X11.Colormap XDefaultColormap(X11.Display display, int screen)
    • XDisplayWidth

      int XDisplayWidth(X11.Display display, int screen)
    • XDisplayHeight

      int XDisplayHeight(X11.Display display, int screen)
    • XDefaultRootWindow

      X11.Window XDefaultRootWindow(X11.Display display)
    • XRootWindow

      X11.Window XRootWindow(X11.Display display, int screen)
    • XAllocNamedColor

      int XAllocNamedColor(X11.Display display, int colormap, String color_name, Pointer screen_def_return, Pointer exact_def_return)
    • XAllocSizeHints

      X11.XSizeHints XAllocSizeHints()
    • XSetWMProperties

      void XSetWMProperties(X11.Display display, X11.Window window, String window_name, String icon_name, String[] argv, int argc, X11.XSizeHints normal_hints, Pointer wm_hints, Pointer class_hints)
    • XSetWMProtocols

      int XSetWMProtocols(X11.Display display, X11.Window window, X11.Atom[] atom, int count)
    • XGetWMProtocols

      int XGetWMProtocols(X11.Display display, X11.Window w, PointerByReference protocols_return, IntByReference count_return)
    • XFree

      int XFree(Pointer data)
    • XCreateSimpleWindow

      X11.Window XCreateSimpleWindow(X11.Display display, X11.Window parent, int x, int y, int width, int height, int border_width, int border, int background)
    • XCreateBitmapFromData

      X11.Pixmap XCreateBitmapFromData(X11.Display display, X11.Window window, Pointer data, int width, int height)
    • XMapWindow

      int XMapWindow(X11.Display display, X11.Window window)
    • XMapRaised

      int XMapRaised(X11.Display display, X11.Window window)
    • XMapSubwindows

      int XMapSubwindows(X11.Display display, X11.Window window)
    • XFlush

      int XFlush(X11.Display display)
      Flushes the output buffer. Most client applications need not use this function because the output buffer is automatically flushed as needed by calls to XPending, XNextEvent, and XWindowEvent. Events generated by the server may be enqueued into the library's event queue.
      Parameter:
      display - target Display
      Gibt zurück:
      status
    • XSync

      int XSync(X11.Display display, boolean discard)

      Flushes the output buffer and then waits until all requests have been received and processed by the X server. Any errors generated must be handled by the error handler. For each protocol error received by Xlib, XSync calls the client application's error handling routine (see section 11.8.2). Any events generated by the server are enqueued into the library's event queue.

      Finally, if you passed False, XSync does not discard the events in the queue. If you passed True, XSync discards all events in the queue, including those events that were on the queue before XSync was called. Client applications seldom need to call XSync.
      Parameter:
      display - target Display
      discard - whether to discard events
      Gibt zurück:
      status
    • XEventsQueued

      int XEventsQueued(X11.Display display, int mode)

      If mode is QueuedAlready, XEventsQueued returns the number of events already in the event queue (and never performs a system call). If mode is QueuedAfterFlush, XEventsQueued returns the number of events already in the queue if the number is nonzero. If there are no events in the queue, XEventsQueued flushes the output buffer, attempts to read more events out of the application's connection, and returns the number read. If mode is QueuedAfterReading, XEventsQueued returns the number of events already in the queue if the number is nonzero. If there are no events in the queue, XEventsQueued attempts to read more events out of the application's connection without flushing the output buffer and returns the number read.

      XEventsQueued always returns immediately without I/O if there are events already in the queue. XEventsQueued with mode QueuedAfterFlush is identical in behavior to XPending. XEventsQueued with mode QueuedAlready is identical to the XQLength function.
      Parameter:
      display - target Display
      mode - QueuedAlready, QueuedAfterFlush, or QueuedAfterReading
      Gibt zurück:
      status
    • XPending

      int XPending(X11.Display display)
      Returns the number of events that have been received from the X server but have not been removed from the event queue. XPending is identical to XEventsQueued with the mode QueuedAfterFlush specified.
      Parameter:
      display - target Display
      Gibt zurück:
      status
    • XUnmapWindow

      int XUnmapWindow(X11.Display display, X11.Window window)
    • XDestroyWindow

      int XDestroyWindow(X11.Display display, X11.Window window)
    • XCloseDisplay

      int XCloseDisplay(X11.Display display)
    • XClearWindow

      int XClearWindow(X11.Display display, X11.Window window)
    • XClearArea

      int XClearArea(X11.Display display, X11.Window window, int x, int y, int w, int h, int exposures)
    • XCreatePixmap

      X11.Pixmap XCreatePixmap(X11.Display display, X11.Drawable drawable, int width, int height, int depth)
    • XFreePixmap

      int XFreePixmap(X11.Display display, X11.Pixmap pixmap)
    • XCreateGC

      X11.GC XCreateGC(X11.Display display, X11.Drawable drawable, NativeLong mask, X11.XGCValues values)
    • XSetFillRule

      int XSetFillRule(X11.Display display, X11.GC gc, int fill_rule)
    • XFreeGC

      int XFreeGC(X11.Display display, X11.GC gc)
    • XDrawPoint

      int XDrawPoint(X11.Display display, X11.Drawable drawable, X11.GC gc, int x, int y)
    • XDrawPoints

      int XDrawPoints(X11.Display display, X11.Drawable drawable, X11.GC gc, X11.XPoint[] points, int npoints, int mode)
    • XFillRectangle

      int XFillRectangle(X11.Display display, X11.Drawable drawable, X11.GC gc, int x, int y, int width, int height)
    • XFillRectangles

      int XFillRectangles(X11.Display display, X11.Drawable drawable, X11.GC gc, X11.XRectangle[] rectangles, int nrectangles)
    • XSetForeground

      int XSetForeground(X11.Display display, X11.GC gc, NativeLong color)
    • XSetBackground

      int XSetBackground(X11.Display display, X11.GC gc, NativeLong color)
    • XFillArc

      int XFillArc(X11.Display display, X11.Drawable drawable, X11.GC gc, int x, int y, int width, int height, int angle1, int angle2)
    • XFillPolygon

      int XFillPolygon(X11.Display dpy, X11.Drawable drawable, X11.GC gc, X11.XPoint[] points, int npoints, int shape, int mode)
    • XQueryTree

      int XQueryTree(X11.Display display, X11.Window window, X11.WindowByReference root, X11.WindowByReference parent, PointerByReference children, IntByReference childCount)
    • XQueryPointer

      boolean XQueryPointer(X11.Display display, X11.Window window, X11.WindowByReference root_return, X11.WindowByReference child_return, IntByReference root_x_return, IntByReference root_y_return, IntByReference win_x_return, IntByReference win_y_return, IntByReference mask_return)
    • XGetWindowAttributes

      int XGetWindowAttributes(X11.Display display, X11.Window window, X11.XWindowAttributes attributes)
    • XChangeWindowAttributes

      int XChangeWindowAttributes(X11.Display display, X11.Window window, NativeLong valuemask, X11.XSetWindowAttributes attributes)
    • XGetGeometry

      int XGetGeometry(X11.Display display, X11.Drawable d, X11.WindowByReference w, IntByReference x, IntByReference y, IntByReference width, IntByReference heigth, IntByReference border_width, IntByReference depth)
    • XTranslateCoordinates

      boolean XTranslateCoordinates(X11.Display display, X11.Window src_w, X11.Window dest_w, int src_x, int src_y, IntByReference dest_x_return, IntByReference dest_y_return, X11.WindowByReference child_return)
    • XMoveWindow

      int XMoveWindow(X11.Display display, X11.Window w, int x, int y)
    • XResizeWindow

      int XResizeWindow(X11.Display display, X11.Window w, int width, int height)
    • XMoveResizeWindow

      int XMoveResizeWindow(X11.Display display, X11.Window w, int x, int y, int width, int height)
    • XRaiseWindow

      int XRaiseWindow(X11.Display display, X11.Window w)
    • XLowerWindow

      int XLowerWindow(X11.Display display, X11.Window w)
    • XSelectInput

      int XSelectInput(X11.Display display, X11.Window window, NativeLong eventMask)
    • XSendEvent

      int XSendEvent(X11.Display display, X11.Window w, int propagate, NativeLong event_mask, X11.XEvent event_send)
    • XNextEvent

      int XNextEvent(X11.Display display, X11.XEvent event_return)
    • XPeekEvent

      int XPeekEvent(X11.Display display, X11.XEvent event_return)
    • XWindowEvent

      int XWindowEvent(X11.Display display, X11.Window w, NativeLong event_mask, X11.XEvent event_return)
    • XCheckWindowEvent

      boolean XCheckWindowEvent(X11.Display display, X11.Window w, NativeLong event_mask, X11.XEvent event_return)
    • XMaskEvent

      int XMaskEvent(X11.Display display, NativeLong event_mask, X11.XEvent event_return)
    • XCheckMaskEvent

      boolean XCheckMaskEvent(X11.Display display, NativeLong event_mask, X11.XEvent event_return)
    • XCheckTypedEvent

      boolean XCheckTypedEvent(X11.Display display, int event_type, X11.XEvent event_return)
    • XCheckTypedWindowEvent

      boolean XCheckTypedWindowEvent(X11.Display display, X11.Window w, int event_type, X11.XEvent event_return)
    • XGetEventData

      boolean XGetEventData(X11.Display display, X11.XGenericEventCookie cookie)
    • XFreeEventData

      void XFreeEventData(X11.Display display, X11.XGenericEventCookie cookie)
    • XGetWMHints

      X11.XWMHints XGetWMHints(X11.Display display, X11.Window window)
      Returns an X11.XWMHints which must be freed by XFree(com.sun.jna.Pointer).
      Parameter:
      display - target Display
      window - target Window
      Gibt zurück:
      XWMHints structure for the requested window
    • XGetWMName

      int XGetWMName(X11.Display display, X11.Window window, X11.XTextProperty text_property_return)
    • XGetVisualInfo

      X11.XVisualInfo XGetVisualInfo(X11.Display display, NativeLong vinfo_mask, X11.XVisualInfo vinfo_template, IntByReference nitems_return)
      Returns an array of X11.XVisualInfo which must be freed by XFree(com.sun.jna.Pointer). Use toArray(nitems_return.getValue() to obtain the array.
      Parameter:
      display - target Display
      vinfo_mask - mask of data to retrieve
      vinfo_template - template struct to use as basis for returned data
      nitems_return - number size of returned array
      Gibt zurück:
      returned array
    • XCreateColormap

      X11.Colormap XCreateColormap(X11.Display display, X11.Window w, X11.Visual visual, int alloc)
    • XGetWindowProperty

      int XGetWindowProperty(X11.Display display, X11.Window w, X11.Atom property, NativeLong long_offset, NativeLong long_length, boolean delete, X11.Atom reg_type, X11.AtomByReference actual_type_return, IntByReference actual_format_return, NativeLongByReference nitems_return, NativeLongByReference bytes_after_return, PointerByReference prop_return)
    • XChangeProperty

      int XChangeProperty(X11.Display display, X11.Window w, X11.Atom property, X11.Atom type, int format, int mode, Pointer data, int nelements)
    • XDeleteProperty

      int XDeleteProperty(X11.Display display, X11.Window w, X11.Atom property)
    • XInternAtom

      X11.Atom XInternAtom(X11.Display display, String name, boolean only_if_exists)
    • XGetAtomName

      String XGetAtomName(X11.Display display, X11.Atom atom)
    • XCopyArea

      int XCopyArea(X11.Display dpy, X11.Drawable src, X11.Drawable dst, X11.GC gc, int src_x, int src_y, int w, int h, int dst_x, int dst_y)
    • XCreateImage

      X11.XImage XCreateImage(X11.Display dpy, X11.Visual visual, int depth, int format, int offset, Pointer data, int width, int height, int bitmap_pad, int bytes_per_line)
    • XPutImage

      int XPutImage(X11.Display dpy, X11.Drawable d, X11.GC gc, X11.XImage image, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
    • XDestroyImage

      int XDestroyImage(X11.XImage image)
    • XSetErrorHandler

      X11.XErrorHandler XSetErrorHandler(X11.XErrorHandler handler)
      Installs an error handler
      Parameter:
      handler - Specifies the program's supplied error handler
      Gibt zurück:
      The previous error handler
    • XKeysymToString

      String XKeysymToString(X11.KeySym keysym)
    • XStringToKeysym

      X11.KeySym XStringToKeysym(String string)
    • XKeysymToKeycode

      byte XKeysymToKeycode(X11.Display display, X11.KeySym keysym)
    • XKeycodeToKeysym

      X11.KeySym XKeycodeToKeysym(X11.Display display, byte keycode, int index)
    • XGrabKey

      int XGrabKey(X11.Display display, int keyCode, int modifiers, X11.Window grab_window, int ownerEvents, int pointerMode, int keyBoardMode)
      Establishes a passive grab on the keyboard
      Parameter:
      display - Specifies the connection to the X server.
      keyCode - Specifies the KeyCode or AnyKey.
      modifiers - Specifies the set of keymasks or AnyModifier. The mask is the bitwise inclusive OR of the valid keymask bits.
      grab_window - Specifies the grab window.
      ownerEvents - Specifies a Boolean value that indicates whether the keyboard events are to be reported as usual.
      pointerMode - Specifies further processing of pointer events. You can pass GrabModeSync or GrabModeAsync.
      keyBoardMode - Specifies further processing of keyboard events. You can pass GrabModeSync or GrabModeAsync.
      Gibt zurück:
      nothing
    • XUngrabKey

      int XUngrabKey(X11.Display display, int keyCode, int modifiers, X11.Window grab_window)
      The XUngrabKey() function releases the key combination on the specified window if it was grabbed by this client.
      Parameter:
      display - Specifies the connection to the X server.
      keyCode - Specifies the KeyCode or AnyKey.
      modifiers - Specifies the set of keymasks or AnyModifier. The mask is the bitwise inclusive OR of the valid keymask bits
      grab_window - Specifies the grab window.
      Gibt zurück:
      nothing
    • XGrabKeyboard

      int XGrabKeyboard(X11.Display display, X11.Window grab_window, int owner_events, int pointer_mode, int keyboard_mode, NativeLong time)
      Actively grabs control of the keyboard and generates FocusIn and FocusOut events
      Parameter:
      display - Specifies the connection to the X server.
      grab_window - Specifies the grab window.
      owner_events - Specifies a Boolean value that indicates whether the keyboard events are to be reported as usual.
      pointer_mode - Specifies further processing of pointer events. You can pass GrabModeSync or GrabModeAsync.
      keyboard_mode - Specifies further processing of keyboard events. You can pass GrabModeSync or GrabModeAsync.
      time - Specifies the time. You can pass either a timestamp or CurrentTime.
      Gibt zurück:
      nothing
    • XUngrabKeyboard

      int XUngrabKeyboard(X11.Display display, NativeLong time)
      Releases the keyboard and any queued events if this client has it actively grabbed from either XGrabKeyboard() or XGrabKey().
      Parameter:
      display - Specifies the connection to the X server.
      time - Specifies the time. You can pass either a timestamp or CurrentTime.
      Gibt zurück:
      nothing
    • XFetchName

      int XFetchName(X11.Display display, X11.Window window, PointerByReference window_name_return)
      The XFetchName() function returns the name of the specified window. If it succeeds, it returns a nonzero status; otherwise, no name has been set for the window, and it returns zero. If the WM_NAME property has not been set for this window, XFetchName() sets window_name_return to NULL. If the data returned by the server is in the Latin Portable Character Encoding, then the returned string is in the Host Portable Character Encoding. Otherwise, the result is implementation dependent. When finished with it, a client must free the window name string using XFree().
      Parameter:
      display - Specifies the connection to the X server.
      window - Specifies the window.
      window_name_return - Returns the window name, which is a null-terminated string.
      Gibt zurück:
      Integer. Nonzero = success, zero = no name has been set.
    • XChangeKeyboardMapping

      int XChangeKeyboardMapping(X11.Display display, int first_keycode, int keysyms_per_keycode, X11.KeySym[] keysyms, int num_codes)
      Defines the symbols for the specified number of KeyCodes starting with first_keycode. The symbols for KeyCodes outside this range remain unchanged. The number of elements in keysyms must be: num_codes * keysyms_per_keycode. The specified first_keycode must be greater than or equal to min_keycode returned by XDisplayKeycodes, or a BadValue error results. In addition, the following expression must be less than or equal to max_keycode as returned by XDisplayKeycodes, or a BadValue error results: first_keycode + num_codes - 1.
      Parameter:
      display - target Display
      first_keycode - first keycode
      keysyms_per_keycode - number of syms per keycode
      keysyms - array of KeySym
      num_codes - number of keycodes to be changed
      Gibt zurück:
      status
    • XGetKeyboardMapping

      X11.KeySym XGetKeyboardMapping(X11.Display display, byte first_keycode, int keycode_count, IntByReference keysyms_per_keycode_return)
      Returns the symbols for the specified number of KeyCodes starting with first_keycode. The value specified in first_keycode must be greater than or equal to min_keycode as returned by XDisplayKeycodes, or a BadValue error results. In addition, the following expression must be less than or equal to max_keycode as returned by XDisplayKeycodes: first_keycode + keycode_count - 1. If this is not the case, a BadValue error results. The number of elements in the KeySyms list is: keycode_count * keysyms_per_keycode_return. KeySym number N, counting from zero, for KeyCode K has the following index in the list, counting from zero: (K - first_code) * keysyms_per_code_return + N. The X server arbitrarily chooses the keysyms_per_keycode_return value to be large enough to report all requested symbols. A special KeySym value of NoSymbol is used to fill in unused elements for individual KeyCodes. To free the storage returned by XGetKeyboardMapping, use XFree.
      Parameter:
      display - target Display
      first_keycode - first keycode to be changed or returned
      keycode_count - how many
      keysyms_per_keycode_return - number of syms per keycode
      Gibt zurück:
      KeySym for the requested code
    • XDisplayKeycodes

      int XDisplayKeycodes(X11.Display display, IntByReference min_keycodes_return, IntByReference max_keycodes_return)
      Returns the min-keycodes and max-keycodes supported by the specified display. The minimum number of KeyCodes returned is never less than 8, and the maximum number of KeyCodes returned is never greater than 255. Not all KeyCodes in this range are required to have corresponding keys.
      Parameter:
      display - target Display
      min_keycodes_return - smallest keycode
      max_keycodes_return - largest keycode
      Gibt zurück:
      status
    • XSetModifierMapping

      int XSetModifierMapping(X11.Display display, X11.XModifierKeymapRef modmap)
      Specifies the KeyCodes of the keys (if any) that are to be used as modifiers. If it succeeds, the X server generates a MappingNotify event, and XSetModifierMapping returns MappingSuccess. X permits at most 8 modifier keys. If more than 8 are specified in the XModifierKeymap structure, a BadLength error results.
      Parameter:
      display - target Display
      modmap - modifier specification
      Gibt zurück:
      status
    • XGetModifierMapping

      X11.XModifierKeymapRef XGetModifierMapping(X11.Display display)
      The XGetModifierMapping function returns a pointer to a newly created XModifierKeymap structure that contains the keys being used as modifiers. The structure should be freed after use by calling XFreeModifiermap. If only zero values appear in the set for any modifier, that modifier is disabled.
      Parameter:
      display - target Display
      Gibt zurück:
      modifier specification
    • XNewModifiermap

      X11.XModifierKeymapRef XNewModifiermap(int max_keys_per_mod)
      Returns a pointer to XModifierKeymap structure for later use.
      Parameter:
      max_keys_per_mod - number of keys to include in the mapping
      Gibt zurück:
      modifier specification struct
    • XInsertModifiermapEntry

      X11.XModifierKeymapRef XInsertModifiermapEntry(X11.XModifierKeymapRef modmap, byte keycode_entry, int modifier)
      Adds the specified KeyCode to the set that controls the specified modifier and returns the resulting XModifierKeymap structure (expanded as needed).
      Parameter:
      modmap - modifier map
      keycode_entry - keycode entry
      modifier - modifier
      Gibt zurück:
      modifier specification struct
    • XDeleteModifiermapEntry

      X11.XModifierKeymapRef XDeleteModifiermapEntry(X11.XModifierKeymapRef modmap, byte keycode_entry, int modifier)
      Deletes the specified KeyCode from the set that controls the specified modifier and returns a pointer to the resulting XModifierKeymap structure.
      Parameter:
      modmap - modifier map
      keycode_entry - keycode entry
      modifier - modifier
      Gibt zurück:
      modifier specification struct
    • XFreeModifiermap

      int XFreeModifiermap(X11.XModifierKeymapRef modmap)
      Frees the specified XModifierKeymap structure.
      Parameter:
      modmap - modifier map to be freed
      Gibt zurück:
      status
    • XChangeKeyboardControl

      int XChangeKeyboardControl(X11.Display display, NativeLong value_mask, X11.XKeyboardControlRef values)
      Changes the keyboard control state.
      Parameter:
      display - display
      value_mask - disjunction of KBKeyClickPercent, KBBellPercent, KBBellPitch, KBBellDuration, KBLed, KBLedMode, KBKey, KBAutoRepeatMode
      values - control ref values
      Gibt zurück:
      status
    • XGetKeyboardControl

      int XGetKeyboardControl(X11.Display display, X11.XKeyboardStateRef values_return)
      Returns the current control values for the keyboard to the XKeyboardState structure.
      Parameter:
      display - display
      values_return - keyboard state structure
      Gibt zurück:
      status
    • XAutoRepeatOn

      int XAutoRepeatOn(X11.Display display)
      Turns on auto-repeat for the keyboard on the specified display.
      Parameter:
      display - display
      Gibt zurück:
      status
    • XAutoRepeatOff

      int XAutoRepeatOff(X11.Display display)
      Turns off auto-repeat for the keyboard on the specified display.
      Parameter:
      display - display
      Gibt zurück:
      status
    • XBell

      int XBell(X11.Display display, int percent)
      Rings the bell on the keyboard on the specified display, if possible. The specified volume is relative to the base volume for the keyboard. If the value for the percent argument is not in the range -100 to 100 inclusive, a BadValue error results. The volume at which the bell rings when the percent argument is nonnegative is: base - [(base * percent) / 100] + percent. The volume at which the bell rings when the percent argument is negative is: base + [(base * percent) / 100]. To change the base volume of the bell, use XChangeKeyboardControl.
      Parameter:
      display - display
      percent - value to set
      Gibt zurück:
      status
    • XQueryKeymap

      int XQueryKeymap(X11.Display display, byte[] keys_return)
      Returns a bit vector for the logical state of the keyboard, where each bit set to 1 indicates that the corresponding key is currently pressed down. The vector is represented as 32 bytes. Byte N (from 0) contains the bits for keys 8N to 8N + 7 with the least significant bit in the byte representing key 8N. Note that the logical state of a device (as seen by client applications) may lag the physical state if device event processing is frozen.
      Parameter:
      display - display
      keys_return - keymap
      Gibt zurück:
      status