Trait x11rb::protocol::dbe::ConnectionExt

source ·
pub trait ConnectionExt: RequestConnection {
    // Provided methods
    fn dbe_query_version(
        &self,
        major_version: u8,
        minor_version: u8
    ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError> { ... }
    fn dbe_allocate_back_buffer(
        &self,
        window: Window,
        buffer: BackBuffer,
        swap_action: u8
    ) -> Result<VoidCookie<'_, Self>, ConnectionError> { ... }
    fn dbe_deallocate_back_buffer(
        &self,
        buffer: BackBuffer
    ) -> Result<VoidCookie<'_, Self>, ConnectionError> { ... }
    fn dbe_swap_buffers<'c, 'input>(
        &'c self,
        actions: &'input [SwapInfo]
    ) -> Result<VoidCookie<'c, Self>, ConnectionError> { ... }
    fn dbe_begin_idiom(&self) -> Result<VoidCookie<'_, Self>, ConnectionError> { ... }
    fn dbe_end_idiom(&self) -> Result<VoidCookie<'_, Self>, ConnectionError> { ... }
    fn dbe_get_visual_info<'c, 'input>(
        &'c self,
        drawables: &'input [Drawable]
    ) -> Result<Cookie<'c, Self, GetVisualInfoReply>, ConnectionError> { ... }
    fn dbe_get_back_buffer_attributes(
        &self,
        buffer: BackBuffer
    ) -> Result<Cookie<'_, Self, GetBackBufferAttributesReply>, ConnectionError> { ... }
}
Expand description

Extension trait defining the requests of this extension.

Provided Methods§

source

fn dbe_query_version( &self, major_version: u8, minor_version: u8 ) -> Result<Cookie<'_, Self, QueryVersionReply>, ConnectionError>

Queries the version of this extension.

Queries the version of this extension. You must do this before using any functionality it provides.

§Fields
  • major_version - The major version of the extension. Check that it is compatible with the XCB_DBE_MAJOR_VERSION that your code is compiled with.
  • minor_version - The minor version of the extension. Check that it is compatible with the XCB_DBE_MINOR_VERSION that your code is compiled with.
source

fn dbe_allocate_back_buffer( &self, window: Window, buffer: BackBuffer, swap_action: u8 ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Allocates a back buffer.

Associates buffer with the back buffer of window. Multiple ids may be associated with the back buffer, which is created by the first allocate call and destroyed by the last deallocate.

§Fields
  • window - The window to which to add the back buffer.
  • buffer - The buffer id to associate with the back buffer.
  • swap_action - The swap action most likely to be used to present this back buffer. This is only a hint, and does not preclude the use of other swap actions.
source

fn dbe_deallocate_back_buffer( &self, buffer: BackBuffer ) -> Result<VoidCookie<'_, Self>, ConnectionError>

Deallocates a back buffer.

Deallocates the given buffer. If buffer is an invalid id, a BadBuffer error is returned. Because a window may have allocated multiple back buffer ids, the back buffer itself is not deleted until all these ids are deallocated by this call.

§Fields
  • buffer - The back buffer to deallocate.
source

fn dbe_swap_buffers<'c, 'input>( &'c self, actions: &'input [SwapInfo] ) -> Result<VoidCookie<'c, Self>, ConnectionError>

Swaps front and back buffers.

Swaps the front and back buffers on the specified windows. The front and back buffers retain their ids, so that the window id continues to refer to the front buffer, while the back buffer id created by this extension continues to refer to the back buffer. Back buffer contents is moved to the front buffer. Back buffer contents after the operation depends on the given swap action. The optimal swap action depends on how each frame is rendered. For example, if the buffer is cleared and fully overwritten on every frame, the “untouched” action, which throws away the buffer contents, would provide the best performance. To eliminate visual artifacts, the swap will occure during the monitor VSync, if the X server supports detecting it.

§Fields
  • n_actions - Number of swap actions in actions.
  • actions - List of windows on which to swap buffers.
source

fn dbe_begin_idiom(&self) -> Result<VoidCookie<'_, Self>, ConnectionError>

Begins a logical swap block.

Creates a block of operations intended to occur together. This may be needed if window presentation requires changing buffers unknown to this extension, such as depth or stencil buffers.

source

fn dbe_end_idiom(&self) -> Result<VoidCookie<'_, Self>, ConnectionError>

Ends a logical swap block.

source

fn dbe_get_visual_info<'c, 'input>( &'c self, drawables: &'input [Drawable] ) -> Result<Cookie<'c, Self, GetVisualInfoReply>, ConnectionError>

Requests visuals that support double buffering.

source

fn dbe_get_back_buffer_attributes( &self, buffer: BackBuffer ) -> Result<Cookie<'_, Self, GetBackBufferAttributesReply>, ConnectionError>

Gets back buffer attributes.

Returns the attributes of the specified buffer.

§Fields
  • buffer - The back buffer to query.
  • attributes - The attributes of buffer.

Object Safety§

This trait is not object safe.

Implementors§