pub struct ToplevelLayout { /* private fields */ }
Expand description
The ToplevelLayout
struct contains information that
is necessary to present a sovereign window on screen.
The ToplevelLayout
struct is necessary for using
ToplevelExt::present()
.
Toplevel surfaces are sovereign windows that can be presented to the user in various states (maximized, on all workspaces, etc).
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
Source§impl ToplevelLayout
impl ToplevelLayout
Sourcepub fn as_ptr(&self) -> *mut GdkToplevelLayout
pub fn as_ptr(&self) -> *mut GdkToplevelLayout
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut GdkToplevelLayout) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut GdkToplevelLayout) -> &Self
Borrows the underlying C value.
Source§impl ToplevelLayout
impl ToplevelLayout
Sourcepub fn new() -> ToplevelLayout
pub fn new() -> ToplevelLayout
Create a toplevel layout description.
Used together with gdk_toplevel_present() to describe how a toplevel surface should be placed and behave on-screen.
The size is in ”application pixels”, not ”device pixels” (see gdk_surface_get_scale_factor()).
§Returns
newly created instance of ToplevelLayout
pub fn copy(&self) -> ToplevelLayout
Sourcepub fn fullscreen(&self) -> Option<bool>
pub fn fullscreen(&self) -> Option<bool>
If the layout specifies whether to the toplevel should go fullscreen,
the value pointed to by @fullscreen is set to true
if it should go
fullscreen, or false
, if it should go unfullscreen.
§Returns
whether the @self specifies the fullscreen state for the toplevel
§fullscreen
location to store whether the toplevel should be fullscreen
Sourcepub fn fullscreen_monitor(&self) -> Option<Monitor>
pub fn fullscreen_monitor(&self) -> Option<Monitor>
Returns the monitor that the layout is fullscreening the surface on.
§Returns
the monitor on which @self fullscreens
Sourcepub fn maximized(&self) -> Option<bool>
pub fn maximized(&self) -> Option<bool>
If the layout specifies whether to the toplevel should go maximized,
the value pointed to by @maximized is set to true
if it should go
fullscreen, or false
, if it should go unmaximized.
§Returns
whether the @self specifies the maximized state for the toplevel
§maximized
set to true
if the toplevel should be maximized
Sourcepub fn is_resizable(&self) -> bool
pub fn is_resizable(&self) -> bool
Sourcepub fn set_maximized(&self, maximized: bool)
pub fn set_maximized(&self, maximized: bool)
Sourcepub fn set_resizable(&self, resizable: bool)
pub fn set_resizable(&self, resizable: bool)
Trait Implementations§
Source§impl Clone for ToplevelLayout
impl Clone for ToplevelLayout
Source§impl Debug for ToplevelLayout
impl Debug for ToplevelLayout
Source§impl Default for ToplevelLayout
impl Default for ToplevelLayout
Source§impl From<ToplevelLayout> for Value
impl From<ToplevelLayout> for Value
Source§fn from(s: ToplevelLayout) -> Self
fn from(s: ToplevelLayout) -> Self
Source§impl HasParamSpec for ToplevelLayout
impl HasParamSpec for ToplevelLayout
type ParamSpec = ParamSpecBoxed
Source§type SetValue = ToplevelLayout
type SetValue = ToplevelLayout
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, ToplevelLayout>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for ToplevelLayout
impl Hash for ToplevelLayout
Source§impl Ord for ToplevelLayout
impl Ord for ToplevelLayout
Source§fn cmp(&self, other: &ToplevelLayout) -> Ordering
fn cmp(&self, other: &ToplevelLayout) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ToplevelLayout
impl PartialEq for ToplevelLayout
Source§impl PartialOrd for ToplevelLayout
impl PartialOrd for ToplevelLayout
Source§impl StaticType for ToplevelLayout
impl StaticType for ToplevelLayout
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.