x11rb 0.12.0

Rust bindings to X11
Documentation
[package]
name = "x11rb"
version = "0.12.0"
description = "Rust bindings to X11"
authors = [
    "Uli Schlachter <psychon@znc.in>",
    "Eduardo Sánchez Muñoz <eduardosm-dev@e64.io>",
    "notgull <jtnunley01@gmail.com>",
]
repository = "https://github.com/psychon/x11rb"
readme = "../README.md"
edition = "2021"
rust-version = "1.56"
license = "MIT OR Apache-2.0"
keywords = ["xcb", "X11"]
exclude = [
    "/xcb-proto-1.15.2",
    "/Makefile",
    "/.mergify.yml",
    "/appveyor.yml",
]

[dependencies]
x11rb-protocol = { version = "0.12.0", path = "../x11rb-protocol" }
libc = { version = "0.2", optional = true }
libloading = { version = "0.7.0", optional = true }
once_cell = { version = "1.16", optional = true }
gethostname = "0.3.0"
as-raw-xcb-connection = { version = "1.0", optional = true }
tracing = { version = "0.1", optional = true, default-features = false }

[target.'cfg(unix)'.dependencies.nix]
version = "0.26"
default-features = false
features = ["socket", "uio", "poll"]

[target.'cfg(windows)'.dependencies]
winapi-wsapoll = "0.1.1"

[target.'cfg(windows)'.dependencies.winapi]
version = "0.3"
features = ["winsock2"]

[dev-dependencies]
polling = "2.7.0"
tracing-subscriber = "0.3"

[features]
# Without this feature, all uses of `unsafe` in the crate are forbidden via
# #![deny(unsafe_code)]. This has the effect of disabling the XCB FFI bindings.
allow-unsafe-code = ["libc", "as-raw-xcb-connection"]

# Enable utility functions in `x11rb::cursor` for loading mouse cursors.
cursor = ["render", "resource_manager"]

# Enable utility functions in `x11rb::image` for working with image data.
image = []

# Enable utility functions in `x11rb::resource_manager` for querying the
# resource databases.
resource_manager = ["x11rb-protocol/resource_manager"]

dl-libxcb = ["allow-unsafe-code", "libloading", "once_cell"]

# Enable this feature to enable all the X11 extensions
all-extensions = [
    "x11rb-protocol/all-extensions",
    "composite",
    "damage",
    "dbe",
    "dpms",
    "dri2",
    "dri3",
    "glx",
    "present",
    "randr",
    "record",
    "render",
    "res",
    "screensaver",
    "shape",
    "shm",
    "sync",
    "xevie",
    "xf86dri",
    "xf86vidmode",
    "xfixes",
    "xinerama",
    "xinput",
    "xkb",
    "xprint",
    "xselinux",
    "xtest",
    "xv",
    "xvmc"
]

# Features to enable individual X11 extensions
composite = ["x11rb-protocol/composite", "xfixes"]
damage = ["x11rb-protocol/damage", "xfixes"]
dbe = ["x11rb-protocol/dbe"]
dpms = ["x11rb-protocol/dpms"]
dri2 = ["x11rb-protocol/dri2"]
dri3 = ["x11rb-protocol/dri3"]
glx = ["x11rb-protocol/glx"]
present = ["x11rb-protocol/present", "randr", "xfixes", "sync"]
randr = ["x11rb-protocol/randr", "render"]
record = ["x11rb-protocol/record"]
render = ["x11rb-protocol/render"]
res = ["x11rb-protocol/res"]
screensaver = ["x11rb-protocol/screensaver"]
shape = ["x11rb-protocol/shape"]
shm = ["x11rb-protocol/shm"]
sync = ["x11rb-protocol/sync"]
xevie = ["x11rb-protocol/xevie"]
xf86dri = ["x11rb-protocol/xf86dri"]
xf86vidmode = ["x11rb-protocol/xf86vidmode"]
xfixes = ["x11rb-protocol/xfixes", "render", "shape"]
xinerama = ["x11rb-protocol/xinerama"]
xinput = ["x11rb-protocol/xinput", "xfixes"]
xkb = ["x11rb-protocol/xkb"]
xprint = ["x11rb-protocol/xprint"]
xselinux = ["x11rb-protocol/xselinux"]
xtest = ["x11rb-protocol/xtest"]
xv = ["x11rb-protocol/xv", "shm"]
xvmc = ["x11rb-protocol/xvmc", "xv"]

[package.metadata.docs.rs]
features = [
    "all-extensions",
    "allow-unsafe-code",
    "cursor",
    "dl-libxcb",
    "image",
    "resource_manager",
]

[[example]]
name = "generic_events"
required-features = ["present"]

[[example]]
name = "shared_memory"
required-features = ["libc", "shm"]

[[example]]
name = "xeyes"
required-features = ["shape"]

[[example]]
name = "simple_window"
required-features = ["cursor", "resource_manager", "tracing", "tracing-subscriber/env-filter"]

[[example]]
name = "display_ppm"
required-features = ["image"]

[[example]]
name = "record"
required-features = ["record"]