Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • XConnection

Index

Properties

Methods

Properties

Optional onButtonPressEvent

onButtonPressEvent: ButtonPressEventHandler

Optional onButtonReleaseEvent

onButtonReleaseEvent: ButtonReleaseEventHandler

Optional onCirculateNotifyEvent

onCirculateNotifyEvent: CirculateNotifyEventHandler

Optional onCirculateRequestEvent

onCirculateRequestEvent: CirculateRequestEventHandler

Optional onClientMessageEvent

onClientMessageEvent: ClientMessageEventHandler

Optional onColormapNotifyEvent

onColormapNotifyEvent: ColormapNotifyEventHandler

Optional onConfigureNotifyEvent

onConfigureNotifyEvent: ConfigureNotifyEventHandler

Optional onConfigureRequestEvent

onConfigureRequestEvent: ConfigureRequestEventHandler

Optional onCreateNotifyEvent

onCreateNotifyEvent: CreateNotifyEventHandler

Optional onDestroyNotifyEvent

onDestroyNotifyEvent: DestroyNotifyEventHandler

Optional onEnterNotifyEvent

onEnterNotifyEvent: EnterNotifyEventHandler

Optional onExposeEvent

onExposeEvent: ExposeEventHandler

Optional onFocusInEvent

onFocusInEvent: FocusInEventHandler

Optional onFocusOutEvent

onFocusOutEvent: FocusOutEventHandler

Optional onGeGenericEvent

onGeGenericEvent: GeGenericEventHandler

Optional onGraphicsExposureEvent

onGraphicsExposureEvent: GraphicsExposureEventHandler

Optional onGravityNotifyEvent

onGravityNotifyEvent: GravityNotifyEventHandler

Optional onKeyPressEvent

onKeyPressEvent: KeyPressEventHandler

Optional onKeyReleaseEvent

onKeyReleaseEvent: KeyReleaseEventHandler

Optional onKeymapNotifyEvent

onKeymapNotifyEvent: KeymapNotifyEventHandler

Optional onLeaveNotifyEvent

onLeaveNotifyEvent: LeaveNotifyEventHandler

Optional onMapNotifyEvent

onMapNotifyEvent: MapNotifyEventHandler

Optional onMapRequestEvent

onMapRequestEvent: MapRequestEventHandler

Optional onMappingNotifyEvent

onMappingNotifyEvent: MappingNotifyEventHandler

Optional onMotionNotifyEvent

onMotionNotifyEvent: MotionNotifyEventHandler

Optional onNoExposureEvent

onNoExposureEvent: NoExposureEventHandler

Optional onPropertyNotifyEvent

onPropertyNotifyEvent: PropertyNotifyEventHandler

Optional onReparentNotifyEvent

onReparentNotifyEvent: ReparentNotifyEventHandler

Optional onResizeRequestEvent

onResizeRequestEvent: ResizeRequestEventHandler

Optional onSelectionClearEvent

onSelectionClearEvent: SelectionClearEventHandler

Optional onSelectionNotifyEvent

onSelectionNotifyEvent: SelectionNotifyEventHandler

Optional onSelectionRequestEvent

onSelectionRequestEvent: SelectionRequestEventHandler

Optional onUnmapNotifyEvent

onUnmapNotifyEvent: UnmapNotifyEventHandler

Optional onVisibilityNotifyEvent

onVisibilityNotifyEvent: VisibilityNotifyEventHandler

Methods

allocColor

  • Allocate a color

    Allocates a read-only colormap entry corresponding to the closest RGB value supported by the hardware. If you are using TrueColor, you can take a shortcut and directly calculate the color pixel value to avoid the round trip. But, for example, on 16-bit color setups (VNC), you can easily get the closest supported RGB value to the RGB value you are specifying.

    Parameters

    • cmap: COLORMAP

      TODO

    • red: number

      The red value of your color.

    • green: number

      The green value of your color.

    • blue: number

      The blue value of your color.

    Returns AllocColorCookie

allocColorCells

allocColorPlanes

allocNamedColor

allowEvents

  • release queued events

    Releases queued events if the client has caused a device (pointer/keyboard) to freeze due to grabbing it actively. This request has no effect if time is earlier than the last-grab time of the most recent active grab for this client or if time is later than the current X server time.

    Parameters

    • mode: Allow
    • time: TIMESTAMP

      Timestamp to avoid race conditions when running X over the network. * The special value XCB_CURRENT_TIME will be replaced with the current server time.

    Returns RequestChecker

bell

  • bell(percent: number): RequestChecker

changeActivePointerGrab

  • changeActivePointerGrab(cursor: CURSOR, time: TIMESTAMP, eventMask: number): RequestChecker

changeGC

  • changeGC(gc: GCONTEXT, valueList: Partial<{ arcMode: ArcMode; background: number; capStyle: CapStyle; clipMask: PIXMAP; clipXOrigin: number; clipYOrigin: number; dashOffset: number; dashes: number; fillRule: FillRule; fillStyle: FillStyle; font: FONT; foreground: number; function: GX; graphicsExposures: BOOL32; joinStyle: JoinStyle; lineStyle: LineStyle; lineWidth: number; planeMask: number; stipple: PIXMAP; subwindowMode: SubwindowMode; tile: PIXMAP; tileStippleXOrigin: number; tileStippleYOrigin: number }>): RequestChecker
  • change graphics context components

    Changes the components specified by value_mask for the specified graphics context.

    Parameters

    • gc: GCONTEXT

      The graphics context to change.

    • valueList: Partial<{ arcMode: ArcMode; background: number; capStyle: CapStyle; clipMask: PIXMAP; clipXOrigin: number; clipYOrigin: number; dashOffset: number; dashes: number; fillRule: FillRule; fillStyle: FillStyle; font: FONT; foreground: number; function: GX; graphicsExposures: BOOL32; joinStyle: JoinStyle; lineStyle: LineStyle; lineWidth: number; planeMask: number; stipple: PIXMAP; subwindowMode: SubwindowMode; tile: PIXMAP; tileStippleXOrigin: number; tileStippleYOrigin: number }>

    Returns RequestChecker

changeHosts

  • changeHosts(mode: HostMode, family: Family, address: Uint8Array): RequestChecker

changeKeyboardControl

  • changeKeyboardControl(valueList: Partial<{ autoRepeatMode: AutoRepeatMode; bellDuration: number; bellPercent: number; bellPitch: number; key: KEYCODE32; keyClickPercent: number; led: number; ledMode: LedMode }>): RequestChecker
  • Parameters

    • valueList: Partial<{ autoRepeatMode: AutoRepeatMode; bellDuration: number; bellPercent: number; bellPitch: number; key: KEYCODE32; keyClickPercent: number; led: number; ledMode: LedMode }>

    Returns RequestChecker

changeKeyboardMapping

  • changeKeyboardMapping(firstKeycode: KEYCODE, keysymsPerKeycode: number, keysyms: Uint32Array): RequestChecker
  • Parameters

    • firstKeycode: KEYCODE
    • keysymsPerKeycode: number
    • keysyms: Uint32Array

    Returns RequestChecker

changePointerControl

  • changePointerControl(accelerationNumerator: number, accelerationDenominator: number, threshold: number, doAcceleration: number, doThreshold: number): RequestChecker
  • Parameters

    • accelerationNumerator: number
    • accelerationDenominator: number
    • threshold: number
    • doAcceleration: number
    • doThreshold: number

    Returns RequestChecker

changeProperty

  • changeProperty(mode: PropMode, window: WINDOW, property: ATOM, _type: ATOM, format: number, data: Uint8Array): RequestChecker
  • Changes a window property

    Sets or updates a property on the specified window. Properties are for example the window title (WM_NAME) or its minimum size (WM_NORMAL_HINTS). Protocols such as EWMH also use properties - for example EWMH defines the window title, encoded as UTF-8 string, in the _NET_WM_NAME property.

    Parameters

    • mode: PropMode
    • window: WINDOW

      The window whose property you want to change.

    • property: ATOM

      The property you want to change (an atom).

    • _type: ATOM
    • format: number

      Specifies whether the data should be viewed as a list of 8-bit, 16-bit or 32-bit quantities. Possible values are 8, 16 and 32. This information allows the X server to correctly perform byte-swap operations as necessary.

    • data: Uint8Array

      The property data.

      See also:

      XConnection.internAtom

    Returns RequestChecker

changeSaveSet

  • Changes a client's save set

    TODO: explain what the save set is for.

    This function either adds or removes the specified window to the client's (your application's) save set.

    Parameters

    • mode: SetMode

      Insert to add the specified window to the save set or Delete to delete it from the save set.

    • window: WINDOW

      The window to add or delete to/from your save set.

      See also:

      XConnection.reparentWindow

    Returns RequestChecker

changeWindowAttributes

  • changeWindowAttributes(window: WINDOW, valueList: Partial<{ backgroundPixel: number; backgroundPixmap: PIXMAP; backingPixel: number; backingPlanes: number; backingStore: BackingStore; bitGravity: Gravity; borderPixel: number; borderPixmap: PIXMAP; colormap: COLORMAP; cursor: CURSOR; doNotPropogateMask: number; eventMask: number; overrideRedirect: BOOL32; saveUnder: BOOL32; winGravity: Gravity }>): RequestChecker
  • change window attributes

    Changes the attributes specified by value_mask for the specified window.

    Parameters

    • window: WINDOW

      The window to change.

    • valueList: Partial<{ backgroundPixel: number; backgroundPixmap: PIXMAP; backingPixel: number; backingPlanes: number; backingStore: BackingStore; bitGravity: Gravity; borderPixel: number; borderPixmap: PIXMAP; colormap: COLORMAP; cursor: CURSOR; doNotPropogateMask: number; eventMask: number; overrideRedirect: BOOL32; saveUnder: BOOL32; winGravity: Gravity }>

    Returns RequestChecker

circulateWindow

  • Change window stacking order

    If direction is XCB_CIRCULATE_RAISE_LOWEST, the lowest mapped child (if any) will be raised to the top of the stack.

    If direction is XCB_CIRCULATE_LOWER_HIGHEST, the highest mapped child will be lowered to the bottom of the stack.

    Parameters

    • direction: Circulate
    • window: WINDOW

      The window to raise/lower (depending on direction).

    Returns RequestChecker

clearArea

  • clearArea(exposures: number, window: WINDOW, x: number, y: number, width: number, height: number): RequestChecker
  • Parameters

    • exposures: number
    • window: WINDOW
    • x: number
    • y: number
    • width: number
    • height: number

    Returns RequestChecker

closeFont

  • closeFont(font: FONT): RequestChecker

configureWindow

  • configureWindow(window: WINDOW, valueList: Partial<{ borderWidth: number; height: number; sibling: WINDOW; stackMode: StackMode; width: number; x: number; y: number }>): RequestChecker
  • Configures window attributes

    Configures a window's size, position, border width and stacking order.

    Parameters

    • window: WINDOW

      The window to configure.

    • valueList: Partial<{ borderWidth: number; height: number; sibling: WINDOW; stackMode: StackMode; width: number; x: number; y: number }>

    Returns RequestChecker

convertSelection

copyArea

  • copyArea(srcDrawable: DRAWABLE, dstDrawable: DRAWABLE, gc: GCONTEXT, srcX: number, srcY: number, dstX: number, dstY: number, width: number, height: number): RequestChecker
  • copy areas

    Copies the specified rectangle from src_drawable to dst_drawable.

    Parameters

    • srcDrawable: DRAWABLE
    • dstDrawable: DRAWABLE
    • gc: GCONTEXT

      The graphics context to use.

    • srcX: number
    • srcY: number
    • dstX: number
    • dstY: number
    • width: number

      The width of the area to copy (in pixels).

    • height: number

      The height of the area to copy (in pixels).

    Returns RequestChecker

copyColormapAndFree

copyGC

copyPlane

  • copyPlane(srcDrawable: DRAWABLE, dstDrawable: DRAWABLE, gc: GCONTEXT, srcX: number, srcY: number, dstX: number, dstY: number, width: number, height: number, bitPlane: number): RequestChecker
  • Parameters

    • srcDrawable: DRAWABLE
    • dstDrawable: DRAWABLE
    • gc: GCONTEXT
    • srcX: number
    • srcY: number
    • dstX: number
    • dstY: number
    • width: number
    • height: number
    • bitPlane: number

    Returns RequestChecker

createColormap

createCursor

  • createCursor(cid: CURSOR, source: PIXMAP, mask: PIXMAP, foreRed: number, foreGreen: number, foreBlue: number, backRed: number, backGreen: number, backBlue: number, x: number, y: number): RequestChecker
  • Parameters

    • cid: CURSOR
    • source: PIXMAP
    • mask: PIXMAP
    • foreRed: number
    • foreGreen: number
    • foreBlue: number
    • backRed: number
    • backGreen: number
    • backBlue: number
    • x: number
    • y: number

    Returns RequestChecker

createGC

  • createGC(cid: GCONTEXT, drawable: DRAWABLE, valueList: Partial<{ arcMode: ArcMode; background: number; capStyle: CapStyle; clipMask: PIXMAP; clipXOrigin: number; clipYOrigin: number; dashOffset: number; dashes: number; fillRule: FillRule; fillStyle: FillStyle; font: FONT; foreground: number; function: GX; graphicsExposures: BOOL32; joinStyle: JoinStyle; lineStyle: LineStyle; lineWidth: number; planeMask: number; stipple: PIXMAP; subwindowMode: SubwindowMode; tile: PIXMAP; tileStippleXOrigin: number; tileStippleYOrigin: number }>): RequestChecker
  • Creates a graphics context

    Creates a graphics context. The graphics context can be used with any drawable that has the same root and depth as the specified drawable.

    Parameters

    • cid: GCONTEXT

      The ID with which you will refer to the graphics context, created by xcb_generate_id.

    • drawable: DRAWABLE

      Drawable to get the root/depth from.

      See also:

    • valueList: Partial<{ arcMode: ArcMode; background: number; capStyle: CapStyle; clipMask: PIXMAP; clipXOrigin: number; clipYOrigin: number; dashOffset: number; dashes: number; fillRule: FillRule; fillStyle: FillStyle; font: FONT; foreground: number; function: GX; graphicsExposures: BOOL32; joinStyle: JoinStyle; lineStyle: LineStyle; lineWidth: number; planeMask: number; stipple: PIXMAP; subwindowMode: SubwindowMode; tile: PIXMAP; tileStippleXOrigin: number; tileStippleYOrigin: number }>

    Returns RequestChecker

createGlyphCursor

  • createGlyphCursor(cid: CURSOR, sourceFont: FONT, maskFont: FONT, sourceChar: number, maskChar: number, foreRed: number, foreGreen: number, foreBlue: number, backRed: number, backGreen: number, backBlue: number): RequestChecker
  • create cursor

    Creates a cursor from a font glyph. X provides a set of standard cursor shapes in a special font named cursor. Applications are encouraged to use this interface for their cursors because the font can be customized for the individual display type.

    All pixels which are set to 1 in the source will use the foreground color (as specified by fore_red, fore_green and fore_blue). All pixels set to 0 will use the background color (as specified by back_red, back_green and back_blue).

    Parameters

    • cid: CURSOR

      The ID with which you will refer to the cursor, created by xcb_generate_id.

    • sourceFont: FONT
    • maskFont: FONT
    • sourceChar: number
    • maskChar: number
    • foreRed: number
    • foreGreen: number
    • foreBlue: number
    • backRed: number
    • backGreen: number
    • backBlue: number

    Returns RequestChecker

createPixmap

  • createPixmap(depth: number, pid: PIXMAP, drawable: DRAWABLE, width: number, height: number): RequestChecker
  • Creates a pixmap

    Creates a pixmap. The pixmap can only be used on the same screen as drawable is on and only with drawables of the same depth.

    Parameters

    • depth: number

      TODO

    • pid: PIXMAP

      The ID with which you will refer to the new pixmap, created by xcb_generate_id.

    • drawable: DRAWABLE

      Drawable to get the screen from.

    • width: number

      The width of the new pixmap.

    • height: number

      The height of the new pixmap.

      See also:

    Returns RequestChecker

createWindow

  • createWindow(depth: number, wid: WINDOW, parent: WINDOW, x: number, y: number, width: number, height: number, borderWidth: number, _class: WindowClass, visual: VISUALID, valueList: Partial<{ backgroundPixel: number; backgroundPixmap: PIXMAP; backingPixel: number; backingPlanes: number; backingStore: BackingStore; bitGravity: Gravity; borderPixel: number; borderPixmap: PIXMAP; colormap: COLORMAP; cursor: CURSOR; doNotPropogateMask: number; eventMask: number; overrideRedirect: BOOL32; saveUnder: BOOL32; winGravity: Gravity }>): RequestChecker
  • Creates a window

    Creates an unmapped window as child of the specified parent window. A CreateNotify event will be generated. The new 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 created window is not yet displayed (mapped), call xcb_map_window to display it.

    The created window will initially use the same cursor as its parent.

    Parameters

    • depth: number

      Specifies the new window's depth (TODO: what unit?). * The special value XCB_COPY_FROM_PARENT means the depth is taken from the parent window.

    • wid: WINDOW

      The ID with which you will refer to the new window, created by xcb_generate_id.

    • parent: WINDOW

      The parent window of the new window.

    • x: number

      The X coordinate of the new window.

    • y: number

      The Y coordinate of the new window.

    • width: number

      The width of the new window.

    • height: number

      The height of the new window.

      See also:

      XConnection.mapWindow

      CreateNotifyEvent

    • borderWidth: number
    • _class: WindowClass
    • visual: VISUALID

      Specifies the id for the new window's visual. * The special value XCB_COPY_FROM_PARENT means the visual is taken from the parent window.

    • valueList: Partial<{ backgroundPixel: number; backgroundPixmap: PIXMAP; backingPixel: number; backingPlanes: number; backingStore: BackingStore; bitGravity: Gravity; borderPixel: number; borderPixmap: PIXMAP; colormap: COLORMAP; cursor: CURSOR; doNotPropogateMask: number; eventMask: number; overrideRedirect: BOOL32; saveUnder: BOOL32; winGravity: Gravity }>

    Returns RequestChecker

deleteProperty

  • deleteProperty(window: WINDOW, property: ATOM): RequestChecker

destroySubwindows

  • destroySubwindows(window: WINDOW): RequestChecker

destroyWindow

  • destroyWindow(window: WINDOW): RequestChecker
  • Destroys a window

    Destroys the specified window and all of its subwindows. A DestroyNotify event is generated for each destroyed window (a DestroyNotify event is first generated for any given window's inferiors). If the window was mapped, it will be automatically unmapped before destroying.

    Calling DestroyWindow on the root window will do nothing.

    Parameters

    Returns RequestChecker

fillPoly

forceScreenSaver

freeColormap

  • freeColormap(cmap: COLORMAP): RequestChecker

freeColors

  • freeColors(cmap: COLORMAP, planeMask: number, pixelsLen: number, pixels: Uint32Array): RequestChecker
  • Parameters

    • cmap: COLORMAP
    • planeMask: number
    • pixelsLen: number
    • pixels: Uint32Array

    Returns RequestChecker

freeCursor

  • freeCursor(cursor: CURSOR): RequestChecker
  • Deletes a cursor

    Deletes the association between the cursor resource ID and the specified cursor. The cursor is freed when no other resource references it.

    Parameters

    • cursor: CURSOR

      The cursor to destroy.

    Returns RequestChecker

freeGC

  • Destroys a graphics context

    Destroys the specified gc and all associated storage.

    Parameters

    • gc: GCONTEXT

      The graphics context to destroy.

    Returns RequestChecker

freePixmap

  • freePixmap(pixmap: PIXMAP): RequestChecker
  • Destroys a pixmap

    Deletes the association between the pixmap ID and the pixmap. The pixmap storage will be freed when there are no more references to it.

    Parameters

    • pixmap: PIXMAP

      The pixmap to destroy.

    Returns RequestChecker

getAtomName

getFontPath

getGeometry

  • Get current window geometry

    Gets the current geometry of the specified drawable (either Window or Pixmap).

    Parameters

    • drawable: DRAWABLE

      The drawable (Window or Pixmap) of which the geometry will be received.

      See also:

    Returns GetGeometryCookie

getImage

getInputFocus

getKeyboardControl

getKeyboardMapping

getModifierMapping

getMotionEvents

getPointerControl

getPointerMapping

getProperty

  • Gets a window property

    Gets the specified property from the specified window. Properties are for example the window title (WM_NAME) or its minimum size (WM_NORMAL_HINTS). Protocols such as EWMH also use properties - for example EWMH defines the window title, encoded as UTF-8 string, in the _NET_WM_NAME property.

    TODO: talk about type

    TODO: talk about delete

    TODO: talk about the offset/length thing. what's a valid use case?

    Parameters

    • _delete: number
    • window: WINDOW

      The window whose property you want to get.

    • property: ATOM

      The property you want to get (an atom).

    • _type: ATOM
    • longOffset: number
    • longLength: number

    Returns GetPropertyCookie

getScreenSaver

getSelectionOwner

getWindowAttributes

grabButton

  • Grab pointer button(s)

    This request establishes a passive grab. The pointer is actively grabbed as described in GrabPointer, the last-pointer-grab time is set to the time at which the button was pressed (as transmitted in the ButtonPress event), and the ButtonPress event is reported if all of the following conditions are true:

    The pointer is not grabbed and the specified button is logically pressed when the specified modifier keys are logically down, and no other buttons or modifier keys are logically down.

    The grab-window contains the pointer.

    The confine-to window (if any) is viewable.

    A passive grab on the same button/key combination does not exist on any ancestor of grab-window.

    The interpretation of the remaining arguments is the same as for GrabPointer. The active grab is terminated automatically when the logical state of the pointer has all buttons released, independent of the logical state of modifier keys. Note that the logical state of a device (as seen by means of the protocol) may lag the physical state if device event processing is frozen. This request overrides all previous passive grabs by the same client on the same button/key combinations on the same window. A modifier of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all specified modifiers have currently assigned keycodes. A button of AnyButton is equivalent to issuing the request for all possible buttons. Otherwise, it is not required that the button specified currently be assigned to a physical button.

    An Access error is generated if some other client has already issued a GrabButton request with the same button/key combination on the same window. When using AnyModifier or AnyButton, the request fails completely (no grabs are established), and an Access error is generated if there is a conflicting grab for any combination. The request has no effect on an active grab.

    Parameters

    • ownerEvents: number
    • grabWindow: WINDOW
    • eventMask: number
    • pointerMode: GrabMode
    • keyboardMode: GrabMode
    • confineTo: WINDOW
    • cursor: CURSOR

      Specifies the cursor that should be displayed or XCB_NONE to not change the cursor.

    • button: ButtonIndex
    • modifiers: number

      The modifiers to grab. * Using the special value XCB_MOD_MASK_ANY means grab the pointer with all possible modifier combinations.

    Returns RequestChecker

grabKey

  • grabKey(ownerEvents: number, grabWindow: WINDOW, modifiers: number, key: KEYCODE, pointerMode: GrabMode, keyboardMode: GrabMode): RequestChecker
  • Grab keyboard key(s)

    Establishes a passive grab on the keyboard. In the future, the keyboard is actively grabbed (as for GrabKeyboard), the last-keyboard-grab time is set to the time at which the key was pressed (as transmitted in the KeyPress event), and the KeyPress event is reported if all of the following conditions are true:

    The keyboard is not grabbed and the specified key (which can itself be a modifier key) is logically pressed when the specified modifier keys are logically down, and no other modifier keys are logically down.

    Either the grab_window is an ancestor of (or is) the focus window, or the grab_window is a descendant of the focus window and contains the pointer.

    A passive grab on the same key combination does not exist on any ancestor of grab_window.

    The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated automatically when the logical state of the keyboard has the specified key released (independent of the logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window.

    Note that the logical state of a device (as seen by client applications) may lag the physical state if device event processing is frozen.

    A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode and max_keycode in the connection setup, or a BadValue error results.

    If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error results (no grabs are established) if there is a conflicting grab for any combination.

    Parameters

    • ownerEvents: number
    • grabWindow: WINDOW
    • modifiers: number

      The modifiers to grab. * Using the special value XCB_MOD_MASK_ANY means grab the pointer with all possible modifier combinations.

    • key: KEYCODE

      The keycode of the key to grab. * The special value XCB_GRAB_ANY means grab any key.

    • pointerMode: GrabMode
    • keyboardMode: GrabMode

    Returns RequestChecker

grabKeyboard

  • Grab the keyboard

    Actively grabs control of the keyboard and generates FocusIn and FocusOut events. Further key events are reported only to the grabbing client.

    Any active keyboard grab by this client is overridden. If the keyboard is actively grabbed by some other client, AlreadyGrabbed is returned. If grab_window is not viewable, GrabNotViewable is returned. If the keyboard is frozen by an active grab of another client, GrabFrozen is returned. If the specified time is earlier than the last-keyboard-grab time or later than the current X server time, GrabInvalidTime is returned. Otherwise, the last-keyboard-grab time is set to the specified time.

    Parameters

    • ownerEvents: number
    • grabWindow: WINDOW
    • time: TIMESTAMP

      Timestamp to avoid race conditions when running X over the network. * The special value XCB_CURRENT_TIME will be replaced with the current server time.

    • pointerMode: GrabMode
    • keyboardMode: GrabMode

    Returns GrabKeyboardCookie

grabPointer

  • Grab the pointer

    Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client.

    Parameters

    • ownerEvents: number
    • grabWindow: WINDOW
    • eventMask: number
    • pointerMode: GrabMode
    • keyboardMode: GrabMode
    • confineTo: WINDOW
    • cursor: CURSOR

      Specifies the cursor that should be displayed or XCB_NONE to not change the cursor.

    • time: TIMESTAMP

      The time argument allows you to avoid certain circumstances that come up if applications take a long time to respond or if there are long network delays. Consider a situation where you have two applications, both of which normally grab the pointer when clicked on. If both applications specify the timestamp from the event, the second application may wake up faster and successfully grab the pointer before the first application. The first application then will get an indication that the other application grabbed the pointer before its request was processed. * The special value XCB_CURRENT_TIME will be replaced with the current server time.

    Returns GrabPointerCookie

grabServer

  • grabServer(): RequestChecker

imageText16

  • Draws text

    Fills the destination rectangle with the background pixel from gc, then paints the text with the foreground pixel from gc. The upper-left corner of the filled rectangle is at [x, y - font-ascent]. The width is overall-width, the height is font-ascent + font-descent. The overall-width, font-ascent and font-descent are as returned by xcb_query_text_extents (TODO).

    Note that using X core fonts is deprecated (but still supported) in favor of client-side rendering using Xft.

    Parameters

    • drawable: DRAWABLE

      The drawable (Window or Pixmap) to draw text on.

    • gc: GCONTEXT

      The graphics context to use. * The following graphics context components are used: plane-mask, foreground, background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.

      See also:

      XConnection.imageText8

    • x: number

      The x coordinate of the first character, relative to the origin of drawable.

    • y: number

      The y coordinate of the first character, relative to the origin of drawable.

    • _string: CHAR2B[]

    Returns RequestChecker

imageText8

  • imageText8(drawable: DRAWABLE, gc: GCONTEXT, x: number, y: number, _string: Int8Array): RequestChecker
  • Draws text

    Fills the destination rectangle with the background pixel from gc, then paints the text with the foreground pixel from gc. The upper-left corner of the filled rectangle is at [x, y - font-ascent]. The width is overall-width, the height is font-ascent + font-descent. The overall-width, font-ascent and font-descent are as returned by xcb_query_text_extents (TODO).

    Note that using X core fonts is deprecated (but still supported) in favor of client-side rendering using Xft.

    Parameters

    • drawable: DRAWABLE

      The drawable (Window or Pixmap) to draw text on.

    • gc: GCONTEXT

      The graphics context to use. * The following graphics context components are used: plane-mask, foreground, background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.

      See also:

      XConnection.imageText16

    • x: number

      The x coordinate of the first character, relative to the origin of drawable.

    • y: number

      The y coordinate of the first character, relative to the origin of drawable.

    • _string: Int8Array

    Returns RequestChecker

installColormap

  • installColormap(cmap: COLORMAP): RequestChecker

internAtom

  • Get atom identifier by name

    Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified name. Atoms are used in protocols like EWMH, for example to store window titles (_NET_WM_NAME atom) as property of a window.

    If only_if_exists is 0, the atom will be created if it does not already exist. If only_if_exists is 1, XCB_ATOM_NONE will be returned if the atom does not yet exist.

    Parameters

    • onlyIfExists: number
    • name: Int8Array

      The name of the atom.

    Returns InternAtomCookie

killClient

  • killClient(resource: number): RequestChecker
  • kills a client

    Forces a close down of the client that created the specified resource.

    Parameters

    • resource: number

      Any resource belonging to the client (for example a Window), used to identify the client connection. * The special value of XCB_KILL_ALL_TEMPORARY, the resources of all clients that have terminated in RetainTemporary (TODO) are destroyed.

      See also:

    Returns RequestChecker

listExtensions

listFonts

  • get matching font names

    Gets a list of available font names which match the given pattern.

    Parameters

    • maxNames: number
    • pattern: Int8Array

      A font pattern, for example "-misc-fixed-*". * The asterisk (*) is a wildcard for any number of characters. The question mark (?) is a wildcard for a single character. Use of uppercase or lowercase does not matter.

    Returns ListFontsCookie

listFontsWithInfo

  • get matching font names and information

    Gets a list of available font names which match the given pattern.

    Parameters

    • maxNames: number
    • pattern: Int8Array

      A font pattern, for example "-misc-fixed-*". * The asterisk (*) is a wildcard for any number of characters. The question mark (?) is a wildcard for a single character. Use of uppercase or lowercase does not matter.

    Returns ListFontsWithInfoCookie

listHosts

listInstalledColormaps

listProperties

lookupColor

mapSubwindows

  • mapSubwindows(window: WINDOW): RequestChecker

mapWindow

  • mapWindow(window: WINDOW): RequestChecker
  • Makes a window visible

    Maps the specified window. This means making the window visible (as long as its parent is visible).

    This MapWindow request will be translated to a MapRequest request if a window manager is running. The window manager then decides to either map the window or not. Set the override-redirect window attribute to true if you want to bypass this mechanism.

    If the window manager decides to map the window (or if no window manager is running), a MapNotify event is generated.

    If the window becomes viewable and no earlier contents for it are remembered, the X server tiles the window with its background. If the window's background is undefined, the existing screen contents are not altered, and the X server generates zero or more Expose events.

    If the window type is InputOutput, an Expose event will be generated when the window becomes visible. The normal response to an Expose event should be to repaint the window.

    Parameters

    Returns RequestChecker

noOperation

  • noOperation(): RequestChecker

openFont

  • openFont(fid: FONT, name: Int8Array): RequestChecker
  • opens a font

    Opens any X core font matching the given name (for example "-misc-fixed-*").

    Note that X core fonts are deprecated (but still supported) in favor of client-side rendering using Xft.

    Parameters

    • fid: FONT

      The ID with which you will refer to the font, created by xcb_generate_id.

    • name: Int8Array

      A pattern describing an X core font.

      See also:

    Returns RequestChecker

polyArc

polyFillArc

polyFillRectangle

  • Fills rectangles

    Fills the specified rectangle(s) in the order listed in the array. For any given rectangle, each pixel is not drawn more than once. If rectangles intersect, the intersecting pixels are drawn multiple times.

    Parameters

    • drawable: DRAWABLE

      The drawable (Window or Pixmap) to draw on.

    • gc: GCONTEXT

      The graphics context to use. * The following graphics context components are used: function, plane-mask, fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. * The following graphics context mode-dependent components are used: foreground, background, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-origin.

    • rectanglesLen: number
    • rectangles: RECTANGLE[]

      The rectangles to fill.

    Returns RequestChecker

polyLine

  • draw lines

    Draws points_len-1 lines between each pair of points (point[i], point[i+1]) in the points array. The lines are drawn in the order listed in the array. They join correctly at all intermediate points, and if the first and last points coincide, the first and last lines also join correctly. For any given line, a pixel is not drawn more than once. If thin (zero line-width) lines intersect, the intersecting pixels are drawn multiple times. If wide lines intersect, the intersecting pixels are drawn only once, as though the entire request were a single, filled shape.

    Parameters

    • coordinateMode: CoordMode
    • drawable: DRAWABLE

      The drawable to draw the line(s) on.

    • gc: GCONTEXT

      The graphics context to use.

    • pointsLen: number
    • points: POINT[]

      An array of points.

    Returns RequestChecker

polyPoint

polyRectangle

polySegment

  • draw lines

    Draws multiple, unconnected lines. For each segment, a line is drawn between (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of xcb_segment_t structures and does not perform joining at coincident endpoints. For any given line, a pixel is not drawn more than once. If lines intersect, the intersecting pixels are drawn multiple times.

    TODO: include the xcb_segment_t data structure

    TODO: an example

    Parameters

    • drawable: DRAWABLE

      A drawable (Window or Pixmap) to draw on.

    • gc: GCONTEXT

      The graphics context to use. * TODO: document which attributes of a gc are used

    • segmentsLen: number
    • segments: SEGMENT[]

      An array of xcb_segment_t structures.

    Returns RequestChecker

polyText16

  • polyText16(drawable: DRAWABLE, gc: GCONTEXT, x: number, y: number, itemsLen: number, items: Uint8Array): RequestChecker

polyText8

  • polyText8(drawable: DRAWABLE, gc: GCONTEXT, x: number, y: number, itemsLen: number, items: Uint8Array): RequestChecker

putImage

  • putImage(format: ImageFormat, drawable: DRAWABLE, gc: GCONTEXT, width: number, height: number, dstX: number, dstY: number, leftPad: number, depth: number, dataLen: number, data: Uint8Array): RequestChecker
  • Parameters

    • format: ImageFormat
    • drawable: DRAWABLE
    • gc: GCONTEXT
    • width: number
    • height: number
    • dstX: number
    • dstY: number
    • leftPad: number
    • depth: number
    • dataLen: number
    • data: Uint8Array

    Returns RequestChecker

queryBestSize

queryColors

queryExtension

  • check if extension is present

    Determines if the specified extension is present on this X11 server.

    Every extension has a unique major_opcode to identify requests, the minor opcodes and request formats are extension-specific. If the extension provides events and errors, the first_event and first_error fields in the reply are set accordingly.

    There should rarely be a need to use this request directly, XCB provides the xcb_get_extension_data function instead.

    Parameters

    • name: Int8Array

      The name of the extension to query, for example "RANDR". This is case sensitive!

      See also:

    Returns QueryExtensionCookie

queryFont

queryKeymap

queryPointer

  • get pointer coordinates

    Gets the root window the pointer is logically on and the pointer coordinates relative to the root window's origin.

    Parameters

    • window: WINDOW

      A window to check if the pointer is on the same screen as window (see the same_screen field in the reply).

    Returns QueryPointerCookie

queryTextExtents

  • get text extents

    Query text extents from the X11 server. This request returns the bounding box of the specified 16-bit character string in the specified font or the font contained in the specified graphics context.

    font_ascent is set to the maximum of the ascent metrics of all characters in the string. font_descent is set to the maximum of the descent metrics. overall_width is set to the sum of the character-width metrics of all characters in the string. For each character in the string, let W be the sum of the character-width metrics of all characters preceding it in the string. Let L be the left-side-bearing metric of the character plus W. Let R be the right-side-bearing metric of the character plus W. The lbearing member is set to the minimum L of all characters in the string. The rbearing member is set to the maximum R.

    For fonts defined with linear indexing rather than 2-byte matrix indexing, each xcb_char2b_t structure is interpreted as a 16-bit number with byte1 as the most significant byte. If the font has no defined default character, undefined characters in the string are taken to have all zero metrics.

    Characters with all zero metrics are ignored. If the font has no defined default_char, the undefined characters in the string are also ignored.

    Parameters

    • font: FONTABLE

      The font to calculate text extents in. You can also pass a graphics context.

    • stringLen: number
    • _string: CHAR2B[]

    Returns QueryTextExtentsCookie

queryTree

  • query the window tree

    Gets the root window ID, parent window ID and list of children windows for the specified window. The children are listed in bottom-to-top stacking order.

    Parameters

    • window: WINDOW

      The window to query.

      See also:

    Returns QueryTreeCookie

recolorCursor

  • recolorCursor(cursor: CURSOR, foreRed: number, foreGreen: number, foreBlue: number, backRed: number, backGreen: number, backBlue: number): RequestChecker
  • Parameters

    • cursor: CURSOR
    • foreRed: number
    • foreGreen: number
    • foreBlue: number
    • backRed: number
    • backGreen: number
    • backBlue: number

    Returns RequestChecker

reparentWindow

  • reparentWindow(window: WINDOW, parent: WINDOW, x: number, y: number): RequestChecker
  • Reparents a window

    Makes the specified window a child of the specified parent window. If the window is mapped, it will automatically be unmapped before reparenting and re-mapped after reparenting. The window is placed in the stacking order on top with respect to sibling windows.

    After reparenting, a ReparentNotify event is generated.

    Parameters

    Returns RequestChecker

rotateProperties

  • rotateProperties(window: WINDOW, delta: number, atoms: Uint32Array): RequestChecker

sendEvent

  • sendEvent(propagate: number, destination: WINDOW, eventMask: number, event: Int8Array): RequestChecker
  • send an event

    Identifies the destination window, determines which clients should receive the specified event and ignores any active grabs.

    The event must be one of the core events or an event defined by an extension, so that the X server can correctly byte-swap the contents as necessary. The contents of event are otherwise unaltered and unchecked except for the send_event field which is forced to 'true'.

    Parameters

    • propagate: number

      If propagate is true and no clients have selected any event on destination, 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 and InputFocus 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 in event_mask.

    • destination: WINDOW

      The window to send this event to. Every client which selects any event within event_mask on destination will get the event. * The special value XCB_SEND_EVENT_DEST_POINTER_WINDOW refers to the window that contains the mouse pointer. * The special value XCB_SEND_EVENT_DEST_ITEM_FOCUS refers to the window which has the keyboard focus.

    • eventMask: number
    • event: Int8Array

      The event to send to the specified destination.

      See also:

      ConfigureNotifyEvent

    Returns RequestChecker

setAccessControl

setClipRectangles

  • setClipRectangles(ordering: ClipOrdering, gc: GCONTEXT, clipXOrigin: number, clipYOrigin: number, rectanglesLen: number, rectangles: RECTANGLE[]): RequestChecker

setCloseDownMode

  • setCloseDownMode(mode: CloseDown): RequestChecker

setDashes

  • setDashes(gc: GCONTEXT, dashOffset: number, dashes: Uint8Array): RequestChecker

setFontPath

  • setFontPath(font: STR[]): RequestChecker

setInputFocus

  • Sets input focus

    Changes the input focus and the last-focus-change time. If the specified time is earlier than the current last-focus-change time, the request is ignored (to avoid race conditions when running X over the network).

    A FocusIn and FocusOut event is generated when focus is changed.

    Parameters

    • revertTo: InputFocus
    • focus: WINDOW

      The window to focus. All keyboard events will be reported to this window. The window must be viewable (TODO), or a xcb_match_error_t occurs (TODO). * If focus is XCB_NONE (TODO), all keyboard events are discarded until a new focus window is set. * If focus is XCB_POINTER_ROOT (TODO), focus is on the root window of the screen on which the pointer is on currently.

    • time: TIMESTAMP

      Timestamp to avoid race conditions when running X over the network. * The special value XCB_CURRENT_TIME will be replaced with the current server time.

    Returns RequestChecker

setModifierMapping

setPointerMapping

setScreenSaver

  • setScreenSaver(timeout: number, interval: number, preferBlanking: Blanking, allowExposures: Exposures): RequestChecker

setSelectionOwner

  • Sets the owner of a selection

    Makes window the owner of the selection selection and updates the last-change time of the specified selection.

    TODO: briefly explain what a selection is.

    Parameters

    • owner: WINDOW

      The new owner of the selection. * The special value XCB_NONE means that the selection will have no owner.

    • selection: ATOM

      The selection.

    • time: TIMESTAMP

      Timestamp to avoid race conditions when running X over the network. * The selection will not be changed if time is earlier than the current last-change time of the selection or is later than the current X server time. Otherwise, the last-change time is set to the specified time. * The special value XCB_CURRENT_TIME will be replaced with the current server time.

      See also:

      XConnection.setSelectionOwner

    Returns RequestChecker

storeColors

storeNamedColor

  • storeNamedColor(flags: number, cmap: COLORMAP, pixel: number, name: Int8Array): RequestChecker

translateCoordinates

ungrabButton

  • ungrabButton(button: ButtonIndex, grabWindow: WINDOW, modifiers: number): RequestChecker

ungrabKey

  • ungrabKey(key: KEYCODE, grabWindow: WINDOW, modifiers: number): RequestChecker
  • release a key combination

    Releases the key combination on grab_window if you grabbed it using xcb_grab_key before.

    Parameters

    • key: KEYCODE

      The keycode of the specified key combination. * Using the special value XCB_GRAB_ANY means releasing all possible key codes.

    • grabWindow: WINDOW
    • modifiers: number

      The modifiers of the specified key combination. * Using the special value XCB_MOD_MASK_ANY means releasing the key combination with every possible modifier combination.

      See also:

      XConnection.grabKey

    Returns RequestChecker

ungrabKeyboard

  • ungrabKeyboard(time: TIMESTAMP): RequestChecker

ungrabPointer

  • ungrabPointer(time: TIMESTAMP): RequestChecker
  • release the pointer

    Releases the pointer and any queued events if you actively grabbed the pointer before using xcb_grab_pointer, xcb_grab_button or within a normal button press.

    EnterNotify and LeaveNotify events are generated.

    Parameters

    • time: TIMESTAMP

      Timestamp to avoid race conditions when running X over the network. * The pointer will not be released if time is earlier than the last-pointer-grab time or later than the current X server time.

    Returns RequestChecker

ungrabServer

  • ungrabServer(): RequestChecker

uninstallColormap

  • uninstallColormap(cmap: COLORMAP): RequestChecker

unmapSubwindows

  • unmapSubwindows(window: WINDOW): RequestChecker

unmapWindow

  • unmapWindow(window: WINDOW): RequestChecker
  • Makes a window invisible

    Unmaps the specified window. This means making the window invisible (and all its child windows).

    Unmapping a window leads to the UnmapNotify event being generated. Also, Expose events are generated for formerly obscured windows.

    Parameters

    Returns RequestChecker

warpPointer

  • warpPointer(srcWindow: WINDOW, dstWindow: WINDOW, srcX: number, srcY: number, srcWidth: number, srcHeight: number, dstX: number, dstY: number): RequestChecker
  • move mouse pointer

    Moves the mouse pointer to the specified position.

    If src_window is not XCB_NONE (TODO), the move will only take place if the pointer is inside src_window and within the rectangle specified by (src_x, src_y, src_width, src_height). The rectangle coordinates are relative to src_window.

    If dst_window is not XCB_NONE (TODO), the pointer will be moved to the offsets (dst_x, dst_y) relative to dst_window. If dst_window is XCB_NONE (TODO), the pointer will be moved by the offsets (dst_x, dst_y) relative to the current position of the pointer.

    Parameters

    • srcWindow: WINDOW
    • dstWindow: WINDOW
    • srcX: number
    • srcY: number
    • srcWidth: number
    • srcHeight: number
    • dstX: number
    • dstY: number

    Returns RequestChecker

Legend

  • Interface
  • Property
  • Method
  • Function
  • Type alias
  • Enumeration
  • Class

Generated using TypeDoc