Struct x11rb_protocol::protocol::damage::CreateRequest
source · pub struct CreateRequest {
pub damage: Damage,
pub drawable: Drawable,
pub level: ReportLevel,
}
Expand description
Creates a Damage object to monitor changes to a drawable..
This creates a Damage object to monitor changes to a drawable, and specifies the level of detail to be reported for changes.
We call changes made to pixel contents of windows and pixmaps ‘damage’ throughout this extension.
Damage accumulates as drawing occurs in the drawable. Each drawing operation ‘damages’ one or more rectangular areas within the drawable. The rectangles are guaranteed to include the set of pixels modified by each operation, but may include significantly more than just those pixels. The desire is for the damage to strike a balance between the number of rectangles reported and the extraneous area included. A reasonable goal is for each primitive object drawn (line, string, rectangle) to be represented as a single rectangle and for the damage area of the operation to be the union of these rectangles.
The DAMAGE extension allows applications to either receive the raw rectangles as a stream of events, or to have them partially processed within the X server to reduce the amount of data transmitted as well as reduce the processing latency once the repaint operation has started.
The Damage object holds any accumulated damage region and reflects the relationship between the drawable selected for damage notification and the drawable for which damage is tracked.
§Fields
damage
- The ID with which you will refer to the new Damage object, created byxcb_generate_id
.drawable
- The ID of the drawable to be monitored.level
- The level of detail to be provided in Damage events.
Fields§
§damage: Damage
§drawable: Drawable
§level: ReportLevel
Implementations§
source§impl CreateRequest
impl CreateRequest
sourcepub fn serialize(self, major_opcode: u8) -> BufWithFds<[Cow<'static, [u8]>; 1]>
pub fn serialize(self, major_opcode: u8) -> BufWithFds<[Cow<'static, [u8]>; 1]>
Serialize this request into bytes for the provided connection
sourcepub fn try_parse_request(
header: RequestHeader,
value: &[u8]
) -> Result<Self, ParseError>
pub fn try_parse_request( header: RequestHeader, value: &[u8] ) -> Result<Self, ParseError>
Parse this request given its header, its body, and any fds that go along with it
Trait Implementations§
source§impl Clone for CreateRequest
impl Clone for CreateRequest
source§fn clone(&self) -> CreateRequest
fn clone(&self) -> CreateRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateRequest
impl Debug for CreateRequest
source§impl Default for CreateRequest
impl Default for CreateRequest
source§fn default() -> CreateRequest
fn default() -> CreateRequest
source§impl<'de> Deserialize<'de> for CreateRequest
impl<'de> Deserialize<'de> for CreateRequest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Hash for CreateRequest
impl Hash for CreateRequest
source§impl Ord for CreateRequest
impl Ord for CreateRequest
source§fn cmp(&self, other: &CreateRequest) -> Ordering
fn cmp(&self, other: &CreateRequest) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for CreateRequest
impl PartialEq for CreateRequest
source§fn eq(&self, other: &CreateRequest) -> bool
fn eq(&self, other: &CreateRequest) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CreateRequest
impl PartialOrd for CreateRequest
source§fn partial_cmp(&self, other: &CreateRequest) -> Option<Ordering>
fn partial_cmp(&self, other: &CreateRequest) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more