Package org.gnome.gdk
Class ToplevelLayout
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gdk.ToplevelLayout
- All Implemented Interfaces:
Proxy
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
ConstructorsConstructorDescriptionCreate a toplevel layout description.ToplevelLayout(MemorySegment address) Create a ToplevelLayout proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Create a newGdkToplevelLayoutand copy the contents of this ToplevelLayout into it.booleanequal(ToplevelLayout other) Check whether this ToplevelLayout andotherhas identical layout properties.booleangetFullscreen(Out<Boolean> fullscreen) If the layout specifies whether to the toplevel should go fullscreen, the value pointed to byfullscreenis set to true if it should go fullscreen, or false, if it should go unfullscreen.@Nullable MonitorReturns the monitor that the layout is fullscreening the surface on.booleangetMaximized(Out<Boolean> maximized) If the layout specifies whether to the toplevel should go maximized, the value pointed to bymaximizedis set to true if it should go maximized, or false, if it should go unmaximized.booleanReturns whether the layout should allow the user to resize the surface.static @Nullable TypegetType()Get the GType of the ToplevelLayout classref()Increases the reference count oflayout.voidsetFullscreen(boolean fullscreen, @Nullable Monitor monitor) Sets whether the layout should cause the surface to be fullscreen when presented.voidsetMaximized(boolean maximized) Sets whether the layout should cause the surface to be maximized when presented.voidsetResizable(boolean resizable) Sets whether the layout should allow the user to resize the surface after it has been presented.voidunref()Decreases the reference count oflayout.Methods inherited from class org.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
Toplevel.present(org.gnome.gdk.ToplevelLayout)to describe how a toplevel surface should be placed and behave on-screen.The size is in ”application pixels”, not ”device pixels” (see
Surface.getScale()).
-
-
Method Details
-
getType
-
copy
Create a newGdkToplevelLayoutand copy the contents of this ToplevelLayout into it.- Returns:
- a copy of
layout.
-
equal
Check whether this ToplevelLayout andotherhas identical layout properties.- Parameters:
other- another toplevel layout- Returns:
- true if this ToplevelLayout and
otherhave identical layout properties, otherwise false.
-
getFullscreen
If the layout specifies whether to the toplevel should go fullscreen, the value pointed to byfullscreenis set to true if it should go fullscreen, or false, 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 bymaximizedis set to true if it should go maximized, or false, if it should go unmaximized.- Parameters:
maximized- set to true 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 oflayout.- 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 oflayout.
-