1 | [package] |
2 | name = "x11rb" |
3 | version = "0.12.0" |
4 | description = "Rust bindings to X11" |
5 | authors = [ |
6 | "Uli Schlachter <psychon@znc.in>" , |
7 | "Eduardo Sánchez Muñoz <eduardosm-dev@e64.io>" , |
8 | "notgull <jtnunley01@gmail.com>" , |
9 | ] |
10 | repository = "https://github.com/psychon/x11rb" |
11 | readme = "../README.md" |
12 | edition = "2021" |
13 | rust-version = "1.56" |
14 | license = "MIT OR Apache-2.0" |
15 | keywords = ["xcb" , "X11" ] |
16 | exclude = [ |
17 | "/xcb-proto-1.15.2" , |
18 | "/Makefile" , |
19 | "/.mergify.yml" , |
20 | "/appveyor.yml" , |
21 | ] |
22 | |
23 | [dependencies] |
24 | x11rb-protocol = { version = "0.12.0" , path = "../x11rb-protocol" } |
25 | libc = { version = "0.2" , optional = true } |
26 | libloading = { version = "0.7.0" , optional = true } |
27 | once_cell = { version = "1.16" , optional = true } |
28 | gethostname = "0.3.0" |
29 | as-raw-xcb-connection = { version = "1.0" , optional = true } |
30 | tracing = { version = "0.1" , optional = true, default-features = false } |
31 | |
32 | [target.'cfg(unix)'.dependencies.nix] |
33 | version = "0.26" |
34 | default-features = false |
35 | features = ["socket" , "uio" , "poll" ] |
36 | |
37 | [target.'cfg(windows)'.dependencies] |
38 | winapi-wsapoll = "0.1.1" |
39 | |
40 | [target.'cfg(windows)'.dependencies.winapi] |
41 | version = "0.3" |
42 | features = ["winsock2" ] |
43 | |
44 | [dev-dependencies] |
45 | polling = "2.7.0" |
46 | tracing-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. |
51 | allow-unsafe-code = ["libc" , "as-raw-xcb-connection" ] |
52 | |
53 | # Enable utility functions in `x11rb::cursor` for loading mouse cursors. |
54 | cursor = ["render" , "resource_manager" ] |
55 | |
56 | # Enable utility functions in `x11rb::image` for working with image data. |
57 | image = [] |
58 | |
59 | # Enable utility functions in `x11rb::resource_manager` for querying the |
60 | # resource databases. |
61 | resource_manager = ["x11rb-protocol/resource_manager" ] |
62 | |
63 | dl-libxcb = ["allow-unsafe-code" , "libloading" , "once_cell" ] |
64 | |
65 | # Enable this feature to enable all the X11 extensions |
66 | all-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 |
99 | composite = ["x11rb-protocol/composite" , "xfixes" ] |
100 | damage = ["x11rb-protocol/damage" , "xfixes" ] |
101 | dbe = ["x11rb-protocol/dbe" ] |
102 | dpms = ["x11rb-protocol/dpms" ] |
103 | dri2 = ["x11rb-protocol/dri2" ] |
104 | dri3 = ["x11rb-protocol/dri3" ] |
105 | glx = ["x11rb-protocol/glx" ] |
106 | present = ["x11rb-protocol/present" , "randr" , "xfixes" , "sync" ] |
107 | randr = ["x11rb-protocol/randr" , "render" ] |
108 | record = ["x11rb-protocol/record" ] |
109 | render = ["x11rb-protocol/render" ] |
110 | res = ["x11rb-protocol/res" ] |
111 | screensaver = ["x11rb-protocol/screensaver" ] |
112 | shape = ["x11rb-protocol/shape" ] |
113 | shm = ["x11rb-protocol/shm" ] |
114 | sync = ["x11rb-protocol/sync" ] |
115 | xevie = ["x11rb-protocol/xevie" ] |
116 | xf86dri = ["x11rb-protocol/xf86dri" ] |
117 | xf86vidmode = ["x11rb-protocol/xf86vidmode" ] |
118 | xfixes = ["x11rb-protocol/xfixes" , "render" , "shape" ] |
119 | xinerama = ["x11rb-protocol/xinerama" ] |
120 | xinput = ["x11rb-protocol/xinput" , "xfixes" ] |
121 | xkb = ["x11rb-protocol/xkb" ] |
122 | xprint = ["x11rb-protocol/xprint" ] |
123 | xselinux = ["x11rb-protocol/xselinux" ] |
124 | xtest = ["x11rb-protocol/xtest" ] |
125 | xv = ["x11rb-protocol/xv" , "shm" ] |
126 | xvmc = ["x11rb-protocol/xvmc" , "xv" ] |
127 | |
128 | [package.metadata.docs.rs] |
129 | features = [ |
130 | "all-extensions" , |
131 | "allow-unsafe-code" , |
132 | "cursor" , |
133 | "dl-libxcb" , |
134 | "image" , |
135 | "resource_manager" , |
136 | ] |
137 | |
138 | [[example]] |
139 | name = "generic_events" |
140 | required-features = ["present" ] |
141 | |
142 | [[example]] |
143 | name = "shared_memory" |
144 | required-features = ["libc" , "shm" ] |
145 | |
146 | [[example]] |
147 | name = "xeyes" |
148 | required-features = ["shape" ] |
149 | |
150 | [[example]] |
151 | name = "simple_window" |
152 | required-features = ["cursor" , "resource_manager" , "tracing" , "tracing-subscriber/env-filter" ] |
153 | |
154 | [[example]] |
155 | name = "display_ppm" |
156 | required-features = ["image" ] |
157 | |
158 | [[example]] |
159 | name = "record" |
160 | required-features = ["record" ] |
161 | |