Package org.gnome.gdk
Class ToplevelLayout
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gdk.ToplevelLayout
- All Implemented Interfaces:
Proxy
The
GdkToplevelLayout
struct contains information that
is necessary to present a sovereign window on screen.
The GdkToplevelLayout
struct is necessary for using
Toplevel.present(org.gnome.gdk.ToplevelLayout)
.
Toplevel surfaces are sovereign windows that can be presented to the user in various states (maximized, on all workspaces, etc).
-
Constructor Summary
ConstructorDescriptionCreate a toplevel layout description.ToplevelLayout
(MemorySegment address) Create a ToplevelLayout proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Create a newGdkToplevelLayout
and copy the contents of this ToplevelLayout into it.boolean
equal
(ToplevelLayout other) Check whether this ToplevelLayout andother
has identical layout properties.boolean
getFullscreen
(Out<Boolean> fullscreen) If the layout specifies whether to the toplevel should go fullscreen, the value pointed to byfullscreen
is set totrue
if it should go fullscreen, orfalse
, if it should go unfullscreen.Returns the monitor that the layout is fullscreening the surface on.boolean
getMaximized
(Out<Boolean> maximized) If the layout specifies whether to the toplevel should go maximized, the value pointed to bymaximized
is set totrue
if it should go fullscreen, orfalse
, if it should go unmaximized.boolean
Returns whether the layout should allow the user to resize the surface.static Type
getType()
Get the GType of the ToplevelLayout classref()
Increases the reference count of this ToplevelLayout.void
setFullscreen
(boolean fullscreen, @Nullable Monitor monitor) Sets whether the layout should cause the surface to be fullscreen when presented.void
setMaximized
(boolean maximized) Sets whether the layout should cause the surface to be maximized when presented.void
setResizable
(boolean resizable) Sets whether the layout should allow the user to resize the surface after it has been presented.void
unref()
Decreases the reference count of this ToplevelLayout.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ToplevelLayout
Create a ToplevelLayout proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
ToplevelLayout
public 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()).
-
-
Method Details
-
getType
-
copy
Create a newGdkToplevelLayout
and copy the contents of this ToplevelLayout into it.- Returns:
- a copy of this ToplevelLayout.
-
equal
Check whether this ToplevelLayout andother
has identical layout properties.- Parameters:
other
- anotherGdkToplevelLayout
- Returns:
true
if this ToplevelLayout andother
have identical layout properties, otherwisefalse
.
-
getFullscreen
If the layout specifies whether to the toplevel should go fullscreen, the value pointed to byfullscreen
is set totrue
if it should go fullscreen, orfalse
, if it should go unfullscreen.- Parameters:
fullscreen
- location to store whether the toplevel should be fullscreen- Returns:
- whether the this ToplevelLayout specifies the fullscreen state for the toplevel
-
getFullscreenMonitor
Returns the monitor that the layout is fullscreening the surface on.- Returns:
- the monitor on which this ToplevelLayout fullscreens
-
getMaximized
If the layout specifies whether to the toplevel should go maximized, the value pointed to bymaximized
is set totrue
if it should go fullscreen, orfalse
, if it should go unmaximized.- Parameters:
maximized
- set totrue
if the toplevel should be maximized- Returns:
- whether the this ToplevelLayout specifies the maximized state for the toplevel
-
getResizable
public boolean getResizable()Returns whether the layout should allow the user to resize the surface.- Returns:
true
if the layout is resizable
-
ref
Increases the reference count of this ToplevelLayout.- Returns:
- the same this ToplevelLayout
-
setFullscreen
Sets whether the layout should cause the surface to be fullscreen when presented.- Parameters:
fullscreen
-true
to fullscreen the surfacemonitor
- the monitor to fullscreen on
-
setMaximized
public void setMaximized(boolean maximized) Sets whether the layout should cause the surface to be maximized when presented.- Parameters:
maximized
-true
to maximize
-
setResizable
public void setResizable(boolean resizable) Sets whether the layout should allow the user to resize the surface after it has been presented.- Parameters:
resizable
-true
to allow resizing
-
unref
public void unref()Decreases the reference count of this ToplevelLayout.
-