1[package]
2name = "x11rb"
3version = "0.13.0"
4description = "Rust bindings to X11"
5authors = [
6 "Uli Schlachter <psychon@znc.in>",
7 "Eduardo Sánchez Muñoz <eduardosm-dev@e64.io>",
8 "notgull <jtnunley01@gmail.com>",
9]
10repository = "https://github.com/psychon/x11rb"
11readme = "../README.md"
12edition = "2021"
13rust-version = "1.63"
14license = "MIT OR Apache-2.0"
15keywords = ["xcb", "X11"]
16
17[dependencies]
18x11rb-protocol = { version = "0.13.0", default-features = false, features = ["std"], path = "../x11rb-protocol" }
19libc = { version = "0.2", optional = true }
20libloading = { version = "0.8.0", optional = true }
21once_cell = { version = "1.17", optional = true }
22as-raw-xcb-connection = { version = "1.0", optional = true }
23tracing = { version = "0.1", optional = true, default-features = false }
24rustix = { version = "0.38", default-features = false, features = ["std", "event", "fs", "net", "system"] }
25
26[target.'cfg(not(unix))'.dependencies]
27gethostname = "0.4"
28
29[dev-dependencies]
30gethostname = "0.4"
31polling = "3.3.1"
32tracing-subscriber = "0.3"
33
34[features]
35# Without this feature, all uses of `unsafe` in the crate are forbidden via
36# #![deny(unsafe_code)]. This has the effect of disabling the XCB FFI bindings.
37allow-unsafe-code = ["libc", "as-raw-xcb-connection"]
38
39# Enable utility functions in `x11rb::cursor` for loading mouse cursors.
40cursor = ["render", "resource_manager"]
41
42# Enable utility functions in `x11rb::image` for working with image data.
43image = []
44
45# Enable utility functions in `x11rb::resource_manager` for querying the
46# resource databases.
47resource_manager = ["x11rb-protocol/resource_manager"]
48
49dl-libxcb = ["allow-unsafe-code", "libloading", "once_cell"]
50
51# Enable extra traits on protocol types.
52extra-traits = ["x11rb-protocol/extra-traits"]
53
54# Add the ability to parse X11 requests (not normally needed).
55request-parsing = ["x11rb-protocol/request-parsing"]
56
57# Enable this feature to enable all the X11 extensions
58all-extensions = [
59 "x11rb-protocol/all-extensions",
60 "composite",
61 "damage",
62 "dbe",
63 "dpms",
64 "dri2",
65 "dri3",
66 "glx",
67 "present",
68 "randr",
69 "record",
70 "render",
71 "res",
72 "screensaver",
73 "shape",
74 "shm",
75 "sync",
76 "xevie",
77 "xf86dri",
78 "xf86vidmode",
79 "xfixes",
80 "xinerama",
81 "xinput",
82 "xkb",
83 "xprint",
84 "xselinux",
85 "xtest",
86 "xv",
87 "xvmc"
88]
89
90# Features to enable individual X11 extensions
91composite = ["x11rb-protocol/composite", "xfixes"]
92damage = ["x11rb-protocol/damage", "xfixes"]
93dbe = ["x11rb-protocol/dbe"]
94dpms = ["x11rb-protocol/dpms"]
95dri2 = ["x11rb-protocol/dri2"]
96dri3 = ["x11rb-protocol/dri3"]
97glx = ["x11rb-protocol/glx"]
98present = ["x11rb-protocol/present", "randr", "xfixes", "sync"]
99randr = ["x11rb-protocol/randr", "render"]
100record = ["x11rb-protocol/record"]
101render = ["x11rb-protocol/render"]
102res = ["x11rb-protocol/res"]
103screensaver = ["x11rb-protocol/screensaver"]
104shape = ["x11rb-protocol/shape"]
105shm = ["x11rb-protocol/shm"]
106sync = ["x11rb-protocol/sync"]
107xevie = ["x11rb-protocol/xevie"]
108xf86dri = ["x11rb-protocol/xf86dri"]
109xf86vidmode = ["x11rb-protocol/xf86vidmode"]
110xfixes = ["x11rb-protocol/xfixes", "render", "shape"]
111xinerama = ["x11rb-protocol/xinerama"]
112xinput = ["x11rb-protocol/xinput", "xfixes"]
113xkb = ["x11rb-protocol/xkb"]
114xprint = ["x11rb-protocol/xprint"]
115xselinux = ["x11rb-protocol/xselinux"]
116xtest = ["x11rb-protocol/xtest"]
117xv = ["x11rb-protocol/xv", "shm"]
118xvmc = ["x11rb-protocol/xvmc", "xv"]
119
120[package.metadata.docs.rs]
121all-features = true
122
123[[example]]
124name = "generic_events"
125required-features = ["present"]
126
127[[example]]
128name = "shared_memory"
129required-features = ["libc", "shm"]
130
131[[example]]
132name = "xeyes"
133required-features = ["shape"]
134
135[[example]]
136name = "simple_window"
137required-features = ["cursor", "resource_manager", "tracing", "tracing-subscriber/env-filter"]
138
139[[example]]
140name = "display_ppm"
141required-features = ["image"]
142
143[[example]]
144name = "record"
145required-features = ["record"]
146