Interface XdgToplevelEvents
- All Known Subinterfaces:
XdgToplevelEventsV2
,XdgToplevelEventsV3
,XdgToplevelEventsV4
,XdgToplevelEventsV5
,XdgToplevelEventsV6
- All Known Implementing Classes:
Window
This interface defines an xdg_surface role which allows a surface to, among other things, set window-like properties such as maximize, fullscreen, and minimize, set application-specific metadata like title and id, and well as trigger user interactive operations such as interactive resize and move.
A xdg_toplevel by default is responsible for providing the full intended visual representation of the toplevel, which depending on the window state, may mean things like a title bar, window controls and drop shadow.
Unmapping an xdg_toplevel means that the surface cannot be shown by the compositor until it is explicitly mapped again. All active operations (e.g., move, resize) are canceled and all attributes (e.g. title, state, stacking, ...) are discarded for an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to the state it had right after xdg_surface.get_toplevel. The client can re-map the toplevel by perfoming a commit without any buffer attached, waiting for a configure event and handling it as usual (see xdg_surface description).
Attaching a null buffer to a toplevel unmaps the surface.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
close
(XdgToplevelProxy emitter) surface wants to be closedvoid
configure
(XdgToplevelProxy emitter, int width, int height, WlArray states) suggest a surface change
-
Field Details
-
VERSION
static final int VERSION- See Also:
-
-
Method Details
-
configure
suggest a surface changeThis configure event asks the client to resize its toplevel surface or to change its state. The configured state should not be applied immediately. See xdg_surface.configure for details.
The width and height arguments specify a hint to the window about how its surface should be resized in window geometry coordinates. See set_window_geometry.
If the width or height arguments are zero, it means the client should decide its own window dimension. This may happen when the compositor needs to configure the state of the surface but doesn't have any information about any previous or expected dimension.
The states listed in the event specify how the width/height arguments should be interpreted, and possibly how it should be drawn.
Clients must send an ack_configure in response to this event. See xdg_surface.configure and xdg_surface.ack_configure for details.
- Parameters:
emitter
- The protocol object that emitted the event.width
-height
-states
-
-
close
surface wants to be closedThe close event is sent by the compositor when the user wants the surface to be closed. This should be equivalent to the user clicking the close button in client-side decorations, if your application has any.
This is only a request that the user intends to close the window. The client may choose to ignore this request, or show a dialog to ask the user to save their data, etc.
- Parameters:
emitter
- The protocol object that emitted the event.
-