pub struct Geometry { /* private fields */ }Expand description
hints, GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE); ]|
The other useful fields are the min_aspect and max_aspect fields; these
contain a width/height ratio as a floating point number. If a geometry widget
is set, the aspect applies to the geometry widget rather than the entire
window. The most common use of these hints is probably to set min_aspect and
max_aspect to the same value, thus forcing the window to keep a constant
aspect ratio.
GLib type: Inline allocated boxed type with stack copy semantics.
Implementations§
Source§impl Geometry
impl Geometry
pub fn as_ptr(&self) -> *mut GdkGeometry
Sourcepub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const GdkGeometry) -> &'a Self
pub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const GdkGeometry) -> &'a Self
Borrows the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow_mut<'a>(
ptr: *mut GdkGeometry,
) -> &'a mut Self
pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut GdkGeometry, ) -> &'a mut Self
Borrows the underlying C value mutably.
Source§impl Geometry
impl Geometry
pub fn new( min_width: i32, min_height: i32, max_width: i32, max_height: i32, base_width: i32, base_height: i32, width_inc: i32, height_inc: i32, min_aspect: f64, max_aspect: f64, win_gravity: Gravity, ) -> Self
pub fn min_width(&self) -> i32
pub fn min_height(&self) -> i32
pub fn max_width(&self) -> i32
pub fn max_height(&self) -> i32
pub fn base_width(&self) -> i32
pub fn base_height(&self) -> i32
pub fn width_inc(&self) -> i32
pub fn height_inc(&self) -> i32
pub fn min_aspect(&self) -> f64
pub fn max_aspect(&self) -> f64
pub fn win_gravity(&self) -> Gravity
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Geometry
impl RefUnwindSafe for Geometry
impl Send for Geometry
impl Sync for Geometry
impl Unpin for Geometry
impl UnsafeUnpin for Geometry
impl UnwindSafe for Geometry
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