From bd6efbd55c14269878ba54e9868313511750ad00 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sun, 18 Aug 2024 10:06:36 +0000 Subject: [PATCH] build based on abfbbcf --- dev/.documenter-siteinfo.json | 2 +- dev/api/index.html | 22 +++++++++++----------- dev/index.html | 2 +- dev/interface/index.html | 2 +- dev/intro/index.html | 2 +- dev/troubleshooting/index.html | 2 +- dev/utility/index.html | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 16fea1b..70e2797 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-08-18T10:02:42","documenter_version":"1.5.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-08-18T10:06:32","documenter_version":"1.5.0"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index bbffb78..c3d12df 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,6 +1,6 @@ -API · XCB.jl

API

XCB.ConnectionType

Connection to the X server.

mutable struct Connection <: XCB.Handle
  • h::Ptr{Nothing}: Opaque handle to the connection, used for API calls.
source
XCB.ConnectionMethod

Initialize a connection to the X server.

Connection(; display) -> Connection
-
source
XCB.ConnectionErrorType

The X Server reported a connection error.

struct ConnectionError <: Exception
  • msg::Any

  • code::Any

source
XCB.FlushErrorType

Error when flushing a connection to the X Server.

struct FlushError <: Exception
  • code::Any
source
XCB.GraphicsContextType

Graphics context attached to a window. Used to register drawing commands on the window surface.

mutable struct GraphicsContext
  • conn::Connection

  • id::UInt32

source
XCB.HandleType

Structures which contain a handle (opaque pointer) as primary data. Those structures are usually defined as mutable so that a finalizer can be registered. Any Handle structure is automatically converted to its handle data on ccalls, through unsafe_convert.

abstract type Handle
source
XCB.RequestErrorType

A request to the X Server returned with an error.

struct RequestError <: Exception
  • msg::Any
source
XCB.SetupType

Connection setup handle and data.

struct Setup <: XCB.Handle
  • h::Ptr{xcb_setup_t}: Handle to the setup, used for API calls.
  • value::xcb_setup_t: Setup value, obtained when dereferencing its handle.
source
XCB.XCBWindowType

Window type used with the XCB API.

mutable struct XCBWindow <: AbstractWindow
  • conn::Connection

  • id::UInt32

  • parent_id::UInt32

  • visual_id::UInt32

  • delete_request::UInt32

  • gc::Union{Nothing, GraphicsContext}

source
XCB.XCBWindowMethod

Create a new window whose parent is given by parent_id and visual by visual_id.

XCBWindow(
+API · XCB.jl

API

XCB.ConnectionType

Connection to the X server.

mutable struct Connection <: XCB.Handle
  • h::Ptr{Nothing}: Opaque handle to the connection, used for API calls.
source
XCB.ConnectionMethod

Initialize a connection to the X server.

Connection(; display) -> Connection
+
source
XCB.ConnectionErrorType

The X Server reported a connection error.

struct ConnectionError <: Exception
  • msg::Any

  • code::Any

source
XCB.FlushErrorType

Error when flushing a connection to the X Server.

struct FlushError <: Exception
  • code::Any
source
XCB.GraphicsContextType

Graphics context attached to a window. Used to register drawing commands on the window surface.

mutable struct GraphicsContext
  • conn::Connection

  • id::UInt32

source
XCB.HandleType

Structures which contain a handle (opaque pointer) as primary data. Those structures are usually defined as mutable so that a finalizer can be registered. Any Handle structure is automatically converted to its handle data on ccalls, through unsafe_convert.

abstract type Handle
source
XCB.RequestErrorType

A request to the X Server returned with an error.

struct RequestError <: Exception
  • msg::Any
source
XCB.SetupType

Connection setup handle and data.

struct Setup <: XCB.Handle
  • h::Ptr{xcb_setup_t}: Handle to the setup, used for API calls.
  • value::xcb_setup_t: Setup value, obtained when dereferencing its handle.
source
XCB.XCBWindowType

Window type used with the XCB API.

mutable struct XCBWindow <: AbstractWindow
  • conn::Connection

  • id::UInt32

  • parent_id::UInt32

  • visual_id::UInt32

  • delete_request::UInt32

  • gc::Union{Nothing, GraphicsContext}

source
XCB.XCBWindowMethod

Create a new window whose parent is given by parent_id and visual by visual_id.

XCBWindow(
     conn,
     parent_id,
     visual_id;
@@ -17,18 +17,18 @@
     attributes,
     values
 ) -> XCBWindow
-
source
XCB.XCBWindowMethod

Create a new window on the provided screen.

XCBWindow(conn::Connection, screen; kwargs...) -> XCBWindow
-
source
XCB.XCBWindowMethod

Create a new window on the current screen.

XCBWindow(conn::Connection; kwargs...) -> XCBWindow
-
source
XCB.checkMethod

Check that the connection to the X server was successful. Throws a ConnectionError if the connection failed.

check(connection::Connection) -> Connection
-
source
XCB.check_requestMethod

Check that the request was successfully handled by the server, throwing a RequestError if the request failed.

The severity level can be set via level with one of the two following values:

- `:warn`: logs a warning with `@warn` (default).
+
source
XCB.XCBWindowMethod

Create a new window on the provided screen.

XCBWindow(conn::Connection, screen; kwargs...) -> XCBWindow
+
source
XCB.XCBWindowMethod

Create a new window on the current screen.

XCBWindow(conn::Connection; kwargs...) -> XCBWindow
+
source
XCB.checkMethod

Check that the connection to the X server was successful. Throws a ConnectionError if the connection failed.

check(connection::Connection) -> Connection
+
source
XCB.check_requestMethod

Check that the request was successfully handled by the server, throwing a RequestError if the request failed.

The severity level can be set via level with one of the two following values:

- `:warn`: logs a warning with `@warn` (default).
 - `:error`: raise a `RequestError`.
check_request(conn, request; level)
-
source
XCB.state_xcbMethod

Translate mouse or modifier state into the corresponding XCB value.

state_xcb(
+
source
XCB.state_xcbMethod

Translate mouse or modifier state into the corresponding XCB value.

state_xcb(
     event::Event
 ) -> Union{Int64, UInt64, xcb_mod_mask_t}
-
source
XCB.@checkMacro

Check the value returned by the function call request with check_request.

The severity level (:error or :warn) can be supplied as first argument. By default, the severity level is :warn.

Wraps request with check_request. The Connection argument is taken as the first argument of the function call expression request. The request is transformed to be checkable, through the functions xcb*checked (or xcb* if there exists a xcb*_unchecked version). If no checkable substitute is found, an ArgumentError is raised.

TODO: @macroexpand example

source
XCB.@flushMacro

Flush a connection attached to a request expr.

The connection is taken to be the first argument of expr. expr can be a call to XCB.@check.

Examples

julia> @macroexpand @flush xcb_unmap_window(win.conn, win.id)
+
source
XCB.@checkMacro

Check the value returned by the function call request with check_request.

The severity level (:error or :warn) can be supplied as first argument. By default, the severity level is :warn.

Wraps request with check_request. The Connection argument is taken as the first argument of the function call expression request. The request is transformed to be checkable, through the functions xcb*checked (or xcb* if there exists a xcb*_unchecked version). If no checkable substitute is found, an ArgumentError is raised.

TODO: @macroexpand example

source
XCB.@flushMacro

Flush a connection attached to a request expr.

The connection is taken to be the first argument of expr. expr can be a call to XCB.@check.

Examples

julia> @macroexpand @flush xcb_unmap_window(win.conn, win.id)
 quote
     xcb_unmap_window(win.conn, win.id)
     (flush)(win.conn)
-end
source
+end
source
diff --git a/dev/index.html b/dev/index.html index f38809c..3658883 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · XCB.jl

XCB.jl

This package wraps the XCB library and exposes bindings for the WindowAbstractions.jl package.

The core API was generated with Clang.jl, from which abstractions were derived.

If you want to use a high-level windowing API, you should see the documentation for the WindowAbstractions package. This documentation is aimed at developers who want to know more about XCB-specific utilities that this package exposes. It also contains a developer documentation, which covers the implementation of the WindowAbstractions interface among other things.

+Home · XCB.jl

XCB.jl

This package wraps the XCB library and exposes bindings for the WindowAbstractions.jl package.

The core API was generated with Clang.jl, from which abstractions were derived.

If you want to use a high-level windowing API, you should see the documentation for the WindowAbstractions package. This documentation is aimed at developers who want to know more about XCB-specific utilities that this package exposes. It also contains a developer documentation, which covers the implementation of the WindowAbstractions interface among other things.

diff --git a/dev/interface/index.html b/dev/interface/index.html index 7418e32..8d5881d 100644 --- a/dev/interface/index.html +++ b/dev/interface/index.html @@ -1,2 +1,2 @@ -WindowAbstractions Interface · XCB.jl

WindowAbstractions Interface

Events

A large portion of this package is dedicated to handling the events reported by the X server and interfacing them into Event instances.

In order to receive events from the server, we need to tell the X server which types of event we want to be reported. This is done per-window, at their instantiation, through so-called event masks. Currently, all events are included by default; if this proves to be a source of performance issues, this may be revisited in the future.

Input events

Input events can be classified into different types:

  • Key events which are generated by pressing or releasing a key from a keyboard,
  • Mouse events originating from pressing or releasing mouse buttons,
  • Pointer events such as moving out of or entering a window with the pointer, or moving around inside the window.

Although drag actions are technically just of combination of mouse state and pointer events, they are reported as separate events.

Key events

X and XCB do not offer much keystroke-related utilities, unless we look at some extensions such as XKB, which was used here for processing key inputs. It allows the storage of keyboard and keymap states, as well as functions to translate keystrokes into characters. The input processing is performed using XKB via XKeyboard.jl.

Mouse events

It is a lot simpler to handle mouse events. Mouse state (e.g. which buttons were already pressed before the current mouse event) and pressed/released buttons are simply extracted from related X events, exposed in XCB via xcb_button_press_release_event_t and xcb_button_release_event_t.

Pointer events

Pointer events are handled similarly to mouse events. Moving the pointer in the window, as well as leaving or entering it send a X event from which the relevant data is extracted.

+WindowAbstractions Interface · XCB.jl

WindowAbstractions Interface

Events

A large portion of this package is dedicated to handling the events reported by the X server and interfacing them into Event instances.

In order to receive events from the server, we need to tell the X server which types of event we want to be reported. This is done per-window, at their instantiation, through so-called event masks. Currently, all events are included by default; if this proves to be a source of performance issues, this may be revisited in the future.

Input events

Input events can be classified into different types:

  • Key events which are generated by pressing or releasing a key from a keyboard,
  • Mouse events originating from pressing or releasing mouse buttons,
  • Pointer events such as moving out of or entering a window with the pointer, or moving around inside the window.

Although drag actions are technically just of combination of mouse state and pointer events, they are reported as separate events.

Key events

X and XCB do not offer much keystroke-related utilities, unless we look at some extensions such as XKB, which was used here for processing key inputs. It allows the storage of keyboard and keymap states, as well as functions to translate keystrokes into characters. The input processing is performed using XKB via XKeyboard.jl.

Mouse events

It is a lot simpler to handle mouse events. Mouse state (e.g. which buttons were already pressed before the current mouse event) and pressed/released buttons are simply extracted from related X events, exposed in XCB via xcb_button_press_release_event_t and xcb_button_release_event_t.

Pointer events

Pointer events are handled similarly to mouse events. Moving the pointer in the window, as well as leaving or entering it send a X event from which the relevant data is extracted.

diff --git a/dev/intro/index.html b/dev/intro/index.html index 59033d7..3c93711 100644 --- a/dev/intro/index.html +++ b/dev/intro/index.html @@ -1,2 +1,2 @@ -Introduction · XCB.jl

Introduction

XCB is a windowing API bound to the X Server and the X11 protocol on Unix-based systems. It simplifies the older X library that was traditionally used for interacting with the X Server.

+Introduction · XCB.jl

Introduction

XCB is a windowing API bound to the X Server and the X11 protocol on Unix-based systems. It simplifies the older X library that was traditionally used for interacting with the X Server.

diff --git a/dev/troubleshooting/index.html b/dev/troubleshooting/index.html index ea07630..f51b744 100644 --- a/dev/troubleshooting/index.html +++ b/dev/troubleshooting/index.html @@ -1,2 +1,2 @@ -Troubleshooting · XCB.jl

Troubleshooting

ConnectionError

If the X Server returns an error when establishing a connection, an exception of type ConnectionError is raised. One common source of error is a badly set DISPLAY environment variable. Common values are :0 or :1.

+Troubleshooting · XCB.jl

Troubleshooting

ConnectionError

If the X Server returns an error when establishing a connection, an exception of type ConnectionError is raised. One common source of error is a badly set DISPLAY environment variable. Common values are :0 or :1.

diff --git a/dev/utility/index.html b/dev/utility/index.html index 372c286..2ac1c97 100644 --- a/dev/utility/index.html +++ b/dev/utility/index.html @@ -1,2 +1,2 @@ -Utility tools · XCB.jl

Utility tools

Visualizing X events

xev is a command-line tool that setups a toy window and prints all incoming X events. It is a very useful tool to experiment with when trying to determine which events are sent upon which actions.

Keyboard configuration

xmodmap allows one to query information about various input-related keyboard elements. Notably, it lists all the keycodes and corresponding key symbols as interpreted by the X Server.

+Utility tools · XCB.jl

Utility tools

Visualizing X events

xev is a command-line tool that setups a toy window and prints all incoming X events. It is a very useful tool to experiment with when trying to determine which events are sent upon which actions.

Keyboard configuration

xmodmap allows one to query information about various input-related keyboard elements. Notably, it lists all the keycodes and corresponding key symbols as interpreted by the X Server.