Trait x11rb::protocol::damage::ConnectionExt

source ·
pub trait ConnectionExt: RequestConnection {
    // Provided methods
    fn damage_query_version(
        &self,
        client_major_version: u32,
        client_minor_version: u32
    ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError> { ... }
    fn damage_create(
        &self,
        damage: Damage,
        drawable: Drawable,
        level: ReportLevel
    ) -> Result<VoidCookie<'_, Self>, ConnectionError> { ... }
    fn damage_destroy(
        &self,
        damage: Damage
    ) -> Result<VoidCookie<'_, Self>, ConnectionError> { ... }
    fn damage_subtract<A, B>(
        &self,
        damage: Damage,
        repair: A,
        parts: B
    ) -> Result<VoidCookie<'_, Self>, ConnectionError>
       where A: Into<Region>,
             B: Into<Region> { ... }
    fn damage_add(
        &self,
        drawable: Drawable,
        region: Region
    ) -> Result<VoidCookie<'_, Self>, ConnectionError> { ... }
}
Expand description

Extension trait defining the requests of this extension.

Provided Methods§

source

fn damage_query_version( &self, client_major_version: u32, client_minor_version: u32 ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

Negotiate the version of the DAMAGE extension.

This negotiates the version of the DAMAGE extension. It must precede any other request using the DAMAGE extension. Failure to do so will cause a BadRequest error for those requests.

§Fields
  • client_major_version - The major version supported by the client.
  • client_minor_version - The minor version supported by the client.
source

fn damage_create( &self, damage: Damage, drawable: Drawable, level: ReportLevel ) -> Result<VoidCookie<'_, Self>, ConnectionError>

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 by xcb_generate_id.
  • drawable - The ID of the drawable to be monitored.
  • level - The level of detail to be provided in Damage events.
source

fn damage_destroy( &self, damage: Damage ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Destroys a previously created Damage object..

This destroys a Damage object and requests the X server stop reporting the changes it was tracking.

§Fields
  • damage - The ID you provided to xcb_create_damage.
source

fn damage_subtract<A, B>( &self, damage: Damage, repair: A, parts: B ) -> Result<VoidCookie<'_, Self>, ConnectionError>
where A: Into<Region>, B: Into<Region>,

Remove regions from a previously created Damage object..

This updates the regions of damage recorded in a a Damage object. See https://www.x.org/releases/current/doc/damageproto/damageproto.txt for details.

§Fields
  • damage - The ID you provided to xcb_create_damage.
source

fn damage_add( &self, drawable: Drawable, region: Region ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Add a region to a previously created Damage object..

This updates the regions of damage recorded in a a Damage object. See https://www.x.org/releases/current/doc/damageproto/damageproto.txt for details.

§Fields
  • damage - The ID you provided to xcb_create_damage.

Object Safety§

This trait is not object safe.

Implementors§