X11Client

Implements the X11 protocol as a client. Allows connecting to a local or remote X11 server.

Note: Because of heavy use of code generation, this class's API may be a little opaque. You may instead find the example in demo/x11/demo.d more illuminating.

Constructors

this
this()

Connect to the default X server (according to $DISPLAY).

this
this(string display)

Connect to the server described by the specified display string.

this
this(AddressInfo[] ai)

Connect to the given address specs.

Members

Functions

configureAuthentication
void configureAuthentication(string display)

Automatically attempt to configure authentication by reading ~/.Xauthority.

newRID
CARD32 newRID()

Generate a new resource ID, which can be used to identify resources created by this connection.

requestExtension
Promise!Ext requestExtension()

Request an extension. The promise is fulfilled with an instance of the extension bound to the current connection, or null if the extension is not available.

sendRequest
void sendRequest(BYTE reqType, Data requestData, void delegate(Data) handler)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

handleDisconnect
void delegate(string, DisconnectType) handleDisconnect [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

parseDisplayString
AddressInfo[] parseDisplayString(string display)

Parse a display string into connectable address specs.

Structs

AuthRecord
struct AuthRecord

Xauthority parsing.

Root
struct Root
Undocumented in source.
XAuthorityReader
struct XAuthorityReader
Undocumented in source.

Variables

authorizationProtocolData
ubyte[] authorizationProtocolData;

Authentication information used during connection.

authorizationProtocolName
string authorizationProtocolName;

Authentication information used during connection.

conn
SocketConnection conn;

Underlying connection.

connSetup
xConnSetup connSetup;

Connection information received from the server.

connSetupPrefix
xConnSetupPrefix connSetupPrefix;

Connection information received from the server.

eventHandlers
void delegate(Data packet)[0x80] eventHandlers;
Undocumented in source.
handleConnect
void delegate() handleConnect;

Handler for when a connection is successfully established.

handleError
void delegate(scope ref const xError error) handleError;

Error handler

handleGenericEvent
void delegate(Data event) handleGenericEvent;

GenericEvent handler

pixmapFormats
immutable(xPixmapFormat)[] pixmapFormats;
roots
Root[] roots;
vendor
string vendor;

Connection information received from the server.

Inherited Members

From X11SubProtocol

RequestSpec
struct RequestSpec(args...)
Undocumented in source.
EventSpec
struct EventSpec(args...)
Undocumented in source.
simpleEncoder
template simpleEncoder(Req, string[] ignoreFields = [])

Instantiates to a function which accepts arguments and puts them into a struct, according to its fields.

simpleDecoder
template simpleDecoder(Res)
Undocumented in source.
pad4
Data pad4(Data packet)
Undocumented in source. Be warned that the author may not have intended to support it.
ProtocolGlue
mixintemplate ProtocolGlue()

Generates code based on RequestSpecs and EventSpecs. Mix this into your extension definition to generate callable methods and event handlers. This mixin is also used to generate the core protocol glue code.

Meta