Struct x11rb::properties::WmSizeHints
source · pub struct WmSizeHints {
pub position: Option<(WmSizeHintsSpecification, i32, i32)>,
pub size: Option<(WmSizeHintsSpecification, i32, i32)>,
pub min_size: Option<(i32, i32)>,
pub max_size: Option<(i32, i32)>,
pub size_increment: Option<(i32, i32)>,
pub aspect: Option<(AspectRatio, AspectRatio)>,
pub base_size: Option<(i32, i32)>,
pub win_gravity: Option<Gravity>,
}
Expand description
A structure representing a WM_SIZE_HINTS
property.
Fields§
§position: Option<(WmSizeHintsSpecification, i32, i32)>
The position that the window should be assigned.
Note that current versions of ICCCM only make use of the WmSizeHintsSpecification
field.
The later two fields exist only for backwards compatibility.
size: Option<(WmSizeHintsSpecification, i32, i32)>
The size that the window should be assigned.
Note that current versions of ICCCM only make use of the WmSizeHintsSpecification
field.
The later two fields exist only for backwards compatibility.
min_size: Option<(i32, i32)>
The minimum size that the window may be assigned.
max_size: Option<(i32, i32)>
The maximum size that the window may be assigned.
size_increment: Option<(i32, i32)>
The increment to be used for sizing the window together with base_size
.
aspect: Option<(AspectRatio, AspectRatio)>
The minimum and maximum aspect ratio.
base_size: Option<(i32, i32)>
The base size of the window.
This is used together with size_increment
.
win_gravity: Option<Gravity>
The gravity that is used to make room for window decorations.
Implementations§
source§impl WmSizeHints
impl WmSizeHints
sourcepub fn get<C: RequestConnection>(
conn: &C,
window: Window,
property: impl Into<Atom>,
) -> Result<WmSizeHintsCookie<'_, C>, ConnectionError>
pub fn get<C: RequestConnection>( conn: &C, window: Window, property: impl Into<Atom>, ) -> Result<WmSizeHintsCookie<'_, C>, ConnectionError>
Send a GetProperty
request for the given property of the given window
sourcepub fn get_normal_hints<C: RequestConnection>(
conn: &C,
window: Window,
) -> Result<WmSizeHintsCookie<'_, C>, ConnectionError>
pub fn get_normal_hints<C: RequestConnection>( conn: &C, window: Window, ) -> Result<WmSizeHintsCookie<'_, C>, ConnectionError>
Send a GetProperty
request for the WM_NORMAL_HINTS
property of the given window
sourcepub fn from_reply(reply: &GetPropertyReply) -> Result<Option<Self>, ParseError>
pub fn from_reply(reply: &GetPropertyReply) -> Result<Option<Self>, ParseError>
Construct a new WmSizeHints
instance from a GetPropertyReply
.
The original WmSizeHints
request must have been for a WM_SIZE_HINTS
property for this
function to return sensible results.
sourcepub fn set_normal_hints<'a, C: RequestConnection + ?Sized>(
&self,
conn: &'a C,
window: Window,
) -> Result<VoidCookie<'a, C>, ConnectionError>
pub fn set_normal_hints<'a, C: RequestConnection + ?Sized>( &self, conn: &'a C, window: Window, ) -> Result<VoidCookie<'a, C>, ConnectionError>
Set these WM_SIZE_HINTS
on some window as the WM_NORMAL_HINTS
property.
sourcepub fn set<'a, C: RequestConnection + ?Sized>(
&self,
conn: &'a C,
window: Window,
property: impl Into<Atom>,
) -> Result<VoidCookie<'a, C>, ConnectionError>
pub fn set<'a, C: RequestConnection + ?Sized>( &self, conn: &'a C, window: Window, property: impl Into<Atom>, ) -> Result<VoidCookie<'a, C>, ConnectionError>
Set these WM_SIZE_HINTS
on some window as the given property.
Trait Implementations§
source§impl Clone for WmSizeHints
impl Clone for WmSizeHints
source§fn clone(&self) -> WmSizeHints
fn clone(&self) -> WmSizeHints
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more