pub struct WlBuffer { /* private fields */ }Expand description
A wl_buffer object.
See the documentation of the module for the interface description.
Implementations§
Source§impl WlBuffer
impl WlBuffer
Sourcepub fn set_handler(&self, handler: impl WlBufferHandler)
pub fn set_handler(&self, handler: impl WlBufferHandler)
Sets a new handler.
Sourcepub fn set_boxed_handler(&self, handler: Box<dyn WlBufferHandler>)
pub fn set_boxed_handler(&self, handler: Box<dyn WlBufferHandler>)
Sets a new, already boxed handler.
Source§impl WlBuffer
impl WlBuffer
Sourcepub const MSG__DESTROY__SINCE: u32 = 1u32
pub const MSG__DESTROY__SINCE: u32 = 1u32
Since when the destroy message is available.
Sourcepub const MSG__RELEASE__SINCE: u32 = 1u32
pub const MSG__RELEASE__SINCE: u32 = 1u32
Since when the release message is available.
Sourcepub fn try_send_destroy(&self) -> Result<(), ObjectError>
pub fn try_send_destroy(&self) -> Result<(), ObjectError>
destroy a buffer
Destroy a buffer. If and how you need to release the backing storage is defined by the buffer factory interface.
For possible side-effects to a surface, see wl_surface.attach.
Sourcepub fn send_destroy(&self)
pub fn send_destroy(&self)
destroy a buffer
Destroy a buffer. If and how you need to release the backing storage is defined by the buffer factory interface.
For possible side-effects to a surface, see wl_surface.attach.
Sourcepub fn try_send_release(&self) -> Result<(), ObjectError>
pub fn try_send_release(&self) -> Result<(), ObjectError>
compositor releases buffer
Sent when this wl_buffer is no longer used by the compositor.
For more information on when release events may or may not be sent, and what consequences it has, please see the description of wl_surface.attach.
If a client receives a release event before the frame callback requested in the same wl_surface.commit that attaches this wl_buffer to a surface, then the client is immediately free to reuse the buffer and its backing storage, and does not need a second buffer for the next surface content update. Typically this is possible, when the compositor maintains a copy of the wl_surface contents, e.g. as a GL texture. This is an important optimization for GL(ES) compositors with wl_shm clients.
Sourcepub fn send_release(&self)
pub fn send_release(&self)
compositor releases buffer
Sent when this wl_buffer is no longer used by the compositor.
For more information on when release events may or may not be sent, and what consequences it has, please see the description of wl_surface.attach.
If a client receives a release event before the frame callback requested in the same wl_surface.commit that attaches this wl_buffer to a surface, then the client is immediately free to reuse the buffer and its backing storage, and does not need a second buffer for the next surface content update. Typically this is possible, when the compositor maintains a copy of the wl_surface contents, e.g. as a GL texture. This is an important optimization for GL(ES) compositors with wl_shm clients.
Trait Implementations§
Source§impl ConcreteObject for WlBuffer
impl ConcreteObject for WlBuffer
Source§const XML_VERSION: u32 = 1u32
const XML_VERSION: u32 = 1u32
Source§const INTERFACE: ObjectInterface = ObjectInterface::WlBuffer
const INTERFACE: ObjectInterface = ObjectInterface::WlBuffer
Source§const INTERFACE_NAME: &str = "wl_buffer"
const INTERFACE_NAME: &str = "wl_buffer"
Source§impl Object for WlBuffer
impl Object for WlBuffer
Source§fn core(&self) -> &ObjectCore
fn core(&self) -> &ObjectCore
ObjectCore of this object.Source§fn unset_handler(&self)
fn unset_handler(&self)
Source§fn get_handler_any_ref(
&self,
) -> Result<HandlerRef<'_, dyn Any>, HandlerAccessError>
fn get_handler_any_ref( &self, ) -> Result<HandlerRef<'_, dyn Any>, HandlerAccessError>
Source§fn get_handler_any_mut(
&self,
) -> Result<HandlerMut<'_, dyn Any>, HandlerAccessError>
fn get_handler_any_mut( &self, ) -> Result<HandlerMut<'_, dyn Any>, HandlerAccessError>
Auto Trait Implementations§
impl !Freeze for WlBuffer
impl !RefUnwindSafe for WlBuffer
impl !Send for WlBuffer
impl !Sync for WlBuffer
impl Unpin for WlBuffer
impl !UnwindSafe for WlBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ObjectCoreApi for T
impl<T> ObjectCoreApi for T
Source§fn client(&self) -> Option<Rc<Client>>
fn client(&self) -> Option<Rc<Client>>
Client associated with this object, if any.Source§fn interface(&self) -> ObjectInterface
fn interface(&self) -> ObjectInterface
ObjectInterface of this object.