[−][src]Struct wayland_client::protocol::wl_shm_pool::WlShmPool
Implementations
impl WlShmPool
[src]
pub fn create_buffer<F>(
&self,
offset: i32,
width: i32,
height: i32,
stride: i32,
format: Format,
implementor: F
) -> Result<WlBuffer, ()> where
F: FnOnce(NewProxy<WlBuffer>) -> WlBuffer,
[src]
&self,
offset: i32,
width: i32,
height: i32,
stride: i32,
format: Format,
implementor: F
) -> Result<WlBuffer, ()> where
F: FnOnce(NewProxy<WlBuffer>) -> WlBuffer,
create a buffer from the pool
Create a wl_buffer object from the pool.
The buffer is created offset bytes into the pool and has width and height as specified. The stride argument specifies the number of bytes from the beginning of one row to the beginning of the next. The format is the pixel format of the buffer and must be one of those advertised through the wl_shm.format event.
A buffer will keep a reference to the pool it was created from so it is valid to destroy the pool immediately after creating a buffer from it.
pub fn destroy(&self)
[src]
destroy the pool
Destroy the shared memory pool.
The mmapped memory will be released when all buffers that have been created from this pool are gone.
This is a destructor, you cannot send requests to this object any longer once this method is called.
pub fn resize(&self, size: i32)
[src]
change the size of the pool mapping
This request will cause the server to remap the backing memory for the pool from the file descriptor passed when the pool was created, but using the new size. This request can only be used to make the pool bigger.
Trait Implementations
impl AsRef<Proxy<WlShmPool>> for WlShmPool
[src]
impl Clone for WlShmPool
[src]
impl Eq for WlShmPool
[src]
impl From<Proxy<WlShmPool>> for WlShmPool
[src]
impl From<WlShmPool> for Proxy<WlShmPool>
[src]
impl<T: EventHandler> HandledBy<T> for WlShmPool
[src]
impl Interface for WlShmPool
[src]
type Request = Request
Set of requests associated to this interface Read more
type Event = Event
Set of events associated to this interface Read more
const NAME: &'static str
[src]
const VERSION: u32
[src]
fn c_interface() -> *const wl_interface
[src]
impl PartialEq<WlShmPool> for WlShmPool
[src]
impl StructuralEq for WlShmPool
[src]
impl StructuralPartialEq for WlShmPool
[src]
Auto Trait Implementations
impl !RefUnwindSafe for WlShmPool
impl Send for WlShmPool
impl Sync for WlShmPool
impl Unpin for WlShmPool
impl !UnwindSafe for WlShmPool
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,