Struct x11rb_protocol::protocol::shm::CreatePixmapRequest
source · pub struct CreatePixmapRequest {
pub pid: Pixmap,
pub drawable: Drawable,
pub width: u16,
pub height: u16,
pub depth: u8,
pub shmseg: Seg,
pub offset: u32,
}
Expand description
Create a pixmap backed by shared memory..
Create a pixmap backed by shared memory. Writes to the shared memory will be reflected in the contents of the pixmap, and writes to the pixmap will be reflected in the contents of the shared memory.
§Fields
pid
- A pixmap ID created with xcb_generate_id().drawable
- The drawable to create the pixmap in.width
- The width of the pixmap to create. Must be nonzero, or a Value error results.height
- The height of the pixmap to create. Must be nonzero, or a Value error results.depth
- The depth of the pixmap to create. Must be nonzero, or a Value error results.shmseg
- The shared memory segment to use to create the pixmap.offset
- The offset in the segment to create the pixmap at.
Fields§
§pid: Pixmap
§drawable: Drawable
§width: u16
§height: u16
§depth: u8
§shmseg: Seg
§offset: u32
Implementations§
source§impl CreatePixmapRequest
impl CreatePixmapRequest
sourcepub fn serialize(self, major_opcode: u8) -> BufWithFds<[Cow<'static, [u8]>; 1]>
pub fn serialize(self, major_opcode: u8) -> BufWithFds<[Cow<'static, [u8]>; 1]>
Serialize this request into bytes for the provided connection
sourcepub fn try_parse_request(
header: RequestHeader,
value: &[u8]
) -> Result<Self, ParseError>
pub fn try_parse_request( header: RequestHeader, value: &[u8] ) -> Result<Self, ParseError>
Parse this request given its header, its body, and any fds that go along with it
Trait Implementations§
source§impl Clone for CreatePixmapRequest
impl Clone for CreatePixmapRequest
source§fn clone(&self) -> CreatePixmapRequest
fn clone(&self) -> CreatePixmapRequest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CreatePixmapRequest
impl Debug for CreatePixmapRequest
source§impl Default for CreatePixmapRequest
impl Default for CreatePixmapRequest
source§fn default() -> CreatePixmapRequest
fn default() -> CreatePixmapRequest
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CreatePixmapRequest
impl<'de> Deserialize<'de> for CreatePixmapRequest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for CreatePixmapRequest
impl Hash for CreatePixmapRequest
source§impl Ord for CreatePixmapRequest
impl Ord for CreatePixmapRequest
source§fn cmp(&self, other: &CreatePixmapRequest) -> Ordering
fn cmp(&self, other: &CreatePixmapRequest) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CreatePixmapRequest
impl PartialEq for CreatePixmapRequest
source§fn eq(&self, other: &CreatePixmapRequest) -> bool
fn eq(&self, other: &CreatePixmapRequest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CreatePixmapRequest
impl PartialOrd for CreatePixmapRequest
source§fn partial_cmp(&self, other: &CreatePixmapRequest) -> Option<Ordering>
fn partial_cmp(&self, other: &CreatePixmapRequest) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Request for CreatePixmapRequest
impl Request for CreatePixmapRequest
source§impl Serialize for CreatePixmapRequest
impl Serialize for CreatePixmapRequest
impl Copy for CreatePixmapRequest
impl Eq for CreatePixmapRequest
impl StructuralPartialEq for CreatePixmapRequest
impl VoidRequest for CreatePixmapRequest
Auto Trait Implementations§
impl Freeze for CreatePixmapRequest
impl RefUnwindSafe for CreatePixmapRequest
impl Send for CreatePixmapRequest
impl Sync for CreatePixmapRequest
impl Unpin for CreatePixmapRequest
impl UnwindSafe for CreatePixmapRequest
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
Mutably borrows from an owned value. Read more