1[package]
2name = "x11rb"
3version = "0.12.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.56"
14license = "MIT OR Apache-2.0"
15keywords = ["xcb", "X11"]
16exclude = [
17 "/xcb-proto-1.15.2",
18 "/Makefile",
19 "/.mergify.yml",
20 "/appveyor.yml",
21]
22
23[dependencies]
24x11rb-protocol = { version = "0.12.0", path = "../x11rb-protocol" }
25libc = { version = "0.2", optional = true }
26libloading = { version = "0.7.0", optional = true }
27once_cell = { version = "1.16", optional = true }
28gethostname = "0.3.0"
29as-raw-xcb-connection = { version = "1.0", optional = true }
30tracing = { version = "0.1", optional = true, default-features = false }
31
32[target.'cfg(unix)'.dependencies.nix]
33version = "0.26"
34default-features = false
35features = ["socket", "uio", "poll"]
36
37[target.'cfg(windows)'.dependencies]
38winapi-wsapoll = "0.1.1"
39
40[target.'cfg(windows)'.dependencies.winapi]
41version = "0.3"
42features = ["winsock2"]
43
44[dev-dependencies]
45polling = "2.7.0"
46tracing-subscriber = "0.3"
47
48[features]
49# Without this feature, all uses of `unsafe` in the crate are forbidden via
50# #![deny(unsafe_code)]. This has the effect of disabling the XCB FFI bindings.
51allow-unsafe-code = ["libc", "as-raw-xcb-connection"]
52
53# Enable utility functions in `x11rb::cursor` for loading mouse cursors.
54cursor = ["render", "resource_manager"]
55
56# Enable utility functions in `x11rb::image` for working with image data.
57image = []
58
59# Enable utility functions in `x11rb::resource_manager` for querying the
60# resource databases.
61resource_manager = ["x11rb-protocol/resource_manager"]
62
63dl-libxcb = ["allow-unsafe-code", "libloading", "once_cell"]
64
65# Enable this feature to enable all the X11 extensions
66all-extensions = [
67 "x11rb-protocol/all-extensions",
68 "composite",
69 "damage",
70 "dbe",
71 "dpms",
72 "dri2",
73 "dri3",
74 "glx",
75 "present",
76 "randr",
77 "record",
78 "render",
79 "res",
80 "screensaver",
81 "shape",
82 "shm",
83 "sync",
84 "xevie",
85 "xf86dri",
86 "xf86vidmode",
87 "xfixes",
88 "xinerama",
89 "xinput",
90 "xkb",
91 "xprint",
92 "xselinux",
93 "xtest",
94 "xv",
95 "xvmc"
96]
97
98# Features to enable individual X11 extensions
99composite = ["x11rb-protocol/composite", "xfixes"]
100damage = ["x11rb-protocol/damage", "xfixes"]
101dbe = ["x11rb-protocol/dbe"]
102dpms = ["x11rb-protocol/dpms"]
103dri2 = ["x11rb-protocol/dri2"]
104dri3 = ["x11rb-protocol/dri3"]
105glx = ["x11rb-protocol/glx"]
106present = ["x11rb-protocol/present", "randr", "xfixes", "sync"]
107randr = ["x11rb-protocol/randr", "render"]
108record = ["x11rb-protocol/record"]
109render = ["x11rb-protocol/render"]
110res = ["x11rb-protocol/res"]
111screensaver = ["x11rb-protocol/screensaver"]
112shape = ["x11rb-protocol/shape"]
113shm = ["x11rb-protocol/shm"]
114sync = ["x11rb-protocol/sync"]
115xevie = ["x11rb-protocol/xevie"]
116xf86dri = ["x11rb-protocol/xf86dri"]
117xf86vidmode = ["x11rb-protocol/xf86vidmode"]
118xfixes = ["x11rb-protocol/xfixes", "render", "shape"]
119xinerama = ["x11rb-protocol/xinerama"]
120xinput = ["x11rb-protocol/xinput", "xfixes"]
121xkb = ["x11rb-protocol/xkb"]
122xprint = ["x11rb-protocol/xprint"]
123xselinux = ["x11rb-protocol/xselinux"]
124xtest = ["x11rb-protocol/xtest"]
125xv = ["x11rb-protocol/xv", "shm"]
126xvmc = ["x11rb-protocol/xvmc", "xv"]
127
128[package.metadata.docs.rs]
129features = [
130 "all-extensions",
131 "allow-unsafe-code",
132 "cursor",
133 "dl-libxcb",
134 "image",
135 "resource_manager",
136]
137
138[[example]]
139name = "generic_events"
140required-features = ["present"]
141
142[[example]]
143name = "shared_memory"
144required-features = ["libc", "shm"]
145
146[[example]]
147name = "xeyes"
148required-features = ["shape"]
149
150[[example]]
151name = "simple_window"
152required-features = ["cursor", "resource_manager", "tracing", "tracing-subscriber/env-filter"]
153
154[[example]]
155name = "display_ppm"
156required-features = ["image"]
157
158[[example]]
159name = "record"
160required-features = ["record"]
161