Struct gbm::SurfaceBufferHandle
[−]
[src]
pub struct SurfaceBufferHandle<'a, T: 'static>(_, _);
Handle to a front buffer of a surface
Methods from Deref<Target = BufferObject<'a, T>>
fn width(&self) -> u32
[src]
Get the width of the buffer object
fn height(&self) -> u32
[src]
Get the height of the buffer object
fn stride(&self) -> u32
[src]
Get the stride of the buffer object
fn format(&self) -> Format
[src]
Get the format of the buffer object
fn handle(&self) -> BufferObjectHandle
[src]
Get the handle of the buffer object
This is stored in the platform generic union BufferObjectHandle
type. However
the format of this handle is platform specific.
fn map(
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> IoResult<MappedBufferObject<'a, T>>
[src]
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> IoResult<MappedBufferObject<'a, T>>
Map a region of a gbm buffer object for cpu access
This function maps a region of a gbm bo for cpu read access.
fn map_mut(
&'a mut self,
x: u32,
y: u32,
width: u32,
height: u32
) -> IoResult<MappedBufferObjectRW<'a, T>>
[src]
&'a mut self,
x: u32,
y: u32,
width: u32,
height: u32
) -> IoResult<MappedBufferObjectRW<'a, T>>
Map a region of a gbm buffer object for cpu access
This function maps a region of a gbm bo for cpu read/write access.
fn write(&mut self, buffer: &[u8]) -> IoResult<()>
[src]
Write data into the buffer object
If the buffer object was created with the BufferObjectFlags::Write
flag,
this function can be used to write data into the buffer object. The
data is copied directly into the object and it's the responsibility
of the caller to make sure the data represents valid pixel data,
according to the width, height, stride and format of the buffer object.
fn set_userdata(&mut self, userdata: T) -> Option<T>
[src]
Sets the userdata of the buffer object.
If previously userdata was set, it is returned.
fn clear_userdata(&mut self)
[src]
Clears the set userdata of the buffer object.
fn userdata(&self) -> Option<&T>
[src]
Returns a reference to set userdata, if any.
fn userdata_mut(&mut self) -> Option<&mut T>
[src]
Returns a mutable reference to set userdata, if any.
fn take_userdata(&mut self) -> Option<T>
[src]
Takes ownership of previously set userdata, if any.
This removes the userdata from the buffer object.
Trait Implementations
impl<'a, T: 'static> Deref for SurfaceBufferHandle<'a, T>
[src]
type Target = BufferObject<'a, T>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.