36 lines
10 KiB
HTML
36 lines
10 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="X11 rust bindings."><title>x11rb_protocol - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="x11rb_protocol" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../x11rb_protocol/index.html">x11rb_<wbr>protocol</a><span class="version">0.13.1</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#feature-flags" title="Feature flags">Feature flags</a><ul><li><a href="#feature-flags-for-specific-x11-extensions" title="Feature flags for specific X11 extensions">Feature flags for specific X11 extensions</a></li><li><a href="#feature-flags-for-additional-functionality" title="Feature flags for additional functionality">Feature flags for additional functionality</a></li></ul></li></ul><h3><a href="#modules">Crate Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>x11rb_protocol</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/x11rb_protocol/lib.rs.html#1-122">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>X11 rust bindings.</p>
|
|
<p>This crate provides a representation of the X11 protocol in Rust. With this protocol, raw X11
|
|
bytes can be parsed into a structured representation or raw bytes can be produces.</p>
|
|
<p>This protocol does not do any I/O. If you need an X11 client library, look at
|
|
<a href="https://docs.rs/x11rb/latest/x11rb/">https://docs.rs/x11rb/latest/x11rb/</a>.</p>
|
|
<h2 id="feature-flags"><a class="doc-anchor" href="#feature-flags">§</a>Feature flags</h2>
|
|
<p>This crate uses <a href="https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section">feature
|
|
flags</a> to reduce
|
|
the amount of compiled code. There are two kinds of feature flags available:</p>
|
|
<ul>
|
|
<li>Feature flags for specific X11 extensions</li>
|
|
<li>Feature flags for additional functionality</li>
|
|
</ul>
|
|
<h3 id="feature-flags-for-specific-x11-extensions"><a class="doc-anchor" href="#feature-flags-for-specific-x11-extensions">§</a>Feature flags for specific X11 extensions</h3>
|
|
<p>By default, only the core X11 protocol and some small, commonly needed X11 extensions are
|
|
enabled. These are the <code>bigreq</code>, <code>ge</code> and <code>xc_misc</code> extensions. Further extensions need to be
|
|
explicitly enabled via their feature flag:</p>
|
|
<p><code>composite</code>, <code>damage</code>, <code>dpms</code>, <code>dri2</code>, <code>dri3</code>, <code>glx</code>, <code>present</code>, <code>randr</code>, <code>record</code>, <code>render</code>,
|
|
<code>res</code>, <code>screensaver</code>, <code>shape</code>, <code>shm</code>, <code>sync</code>, <code>xevie</code>, <code>xf86dri</code>, <code>xf86vidmode</code>, <code>xfixes</code>,
|
|
<code>xinerama</code>, <code>xinput</code>, <code>xkb</code>, <code>xprint</code>, <code>xselinux</code>, <code>xtest</code>, <code>xv</code>, <code>xvmc</code>.</p>
|
|
<p>If you want to take the “I do not want to think about this”-approach, you can enable the
|
|
<code>all-extensions</code> feature to just enable, well, all extensions.</p>
|
|
<h3 id="feature-flags-for-additional-functionality"><a class="doc-anchor" href="#feature-flags-for-additional-functionality">§</a>Feature flags for additional functionality</h3>
|
|
<p>Additionally, the following flags exist:</p>
|
|
<ul>
|
|
<li><code>std</code> (enabled by default): Enable functionality needing the std library, e.g. environment
|
|
variables or <a href="https://doc.rust-lang.org/1.84.0/std/os/fd/owned/struct.OwnedFd.html" title="struct std::os::fd::owned::OwnedFd"><code>std::os::unix::io::OwnedFd</code></a>.</li>
|
|
<li><code>resource_manager</code>: Enable the code in <a href="resource_manager/index.html" title="mod x11rb_protocol::resource_manager">resource_manager</a> for loading and querying the
|
|
X11 resource database.</li>
|
|
<li><code>serde</code>: Implement [<code>serde::Serialize</code>] and [<code>serde::Deserialize</code>] for all objects.</li>
|
|
<li><code>request-parsing</code>: Add the ability to parse X11 requests. Not normally needed.</li>
|
|
<li><code>extra-traits</code>: Implement extra traits for types. This improves the output of the <code>Debug</code>
|
|
impl and adds <code>PartialEq</code>, <code>Eq</code>, <code>PartialOrd</code>, <code>Ord</code>, and <code>Hash</code> where possible.</li>
|
|
</ul>
|
|
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="connect/index.html" title="mod x11rb_protocol::connect">connect</a></div><div class="desc docblock-short">Contains utilities for connection to the X11 server.</div></li><li><div class="item-name"><a class="mod" href="connection/index.html" title="mod x11rb_protocol::connection">connection</a></div><div class="desc docblock-short">Helper types for implementing an X11 client.</div></li><li><div class="item-name"><a class="mod" href="errors/index.html" title="mod x11rb_protocol::errors">errors</a></div><div class="desc docblock-short">This module contains the current mess that is error handling.</div></li><li><div class="item-name"><a class="mod" href="id_allocator/index.html" title="mod x11rb_protocol::id_allocator">id_<wbr>allocator</a></div><div class="desc docblock-short">A mechanism for allocating XIDs.</div></li><li><div class="item-name"><a class="mod" href="packet_reader/index.html" title="mod x11rb_protocol::packet_reader">packet_<wbr>reader</a></div><div class="desc docblock-short">Collects X11 data into “packets” to be parsed by a display.</div></li><li><div class="item-name"><a class="mod" href="parse_display/index.html" title="mod x11rb_protocol::parse_display">parse_<wbr>display</a></div><div class="desc docblock-short">Utilities for parsing X11 display strings.</div></li><li><div class="item-name"><a class="mod" href="protocol/index.html" title="mod x11rb_protocol::protocol">protocol</a></div><div class="desc docblock-short">Bindings to the X11 protocol.</div></li><li><div class="item-name"><a class="mod" href="resource_manager/index.html" title="mod x11rb_protocol::resource_manager">resource_<wbr>manager</a></div><div class="desc docblock-short">X11 resource manager library.</div></li><li><div class="item-name"><a class="mod" href="wrapper/index.html" title="mod x11rb_protocol::wrapper">wrapper</a></div><div class="desc docblock-short">Helpers for the generated code</div></li><li><div class="item-name"><a class="mod" href="x11_utils/index.html" title="mod x11rb_protocol::x11_utils">x11_<wbr>utils</a></div><div class="desc docblock-short">Utility functions for X11 things.</div></li><li><div class="item-name"><a class="mod" href="xauth/index.html" title="mod x11rb_protocol::xauth">xauth</a></div><div class="desc docblock-short">Helpers for working with <code>~/.Xauthority</code>.</div></li></ul><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.DiscardMode.html" title="enum x11rb_protocol::DiscardMode">Discard<wbr>Mode</a></div><div class="desc docblock-short">Variants describing which responses to a request should be discarded.</div></li></ul><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="type" href="type.BufWithFds.html" title="type x11rb_protocol::BufWithFds">BufWith<wbr>Fds</a></div><div class="desc docblock-short">A combination of a buffer and a list of file descriptors.</div></li><li><div class="item-name"><a class="type" href="type.RawEventAndSeqNumber.html" title="type x11rb_protocol::RawEventAndSeqNumber">RawEvent<wbr>AndSeq<wbr>Number</a></div><div class="desc docblock-short">The raw bytes of an event and its sequence number.</div></li><li><div class="item-name"><a class="type" href="type.RawFdContainer.html" title="type x11rb_protocol::RawFdContainer">RawFd<wbr>Container</a></div><div class="desc docblock-short">A type representative of the file descriptors as they are sent to and from the X server.</div></li><li><div class="item-name"><a class="type" href="type.SequenceNumber.html" title="type x11rb_protocol::SequenceNumber">Sequence<wbr>Number</a></div><div class="desc docblock-short">Number type used for referring to things that were sent to the server in responses from the
|
|
server.</div></li></ul></section></div></main></body></html> |