Interface XdgPopupEventsV6
- All Superinterfaces:
XdgPopupEvents
,XdgPopupEventsV2
,XdgPopupEventsV3
,XdgPopupEventsV4
,XdgPopupEventsV5
A popup surface is a short-lived, temporary surface. It can be used to implement for example menus, popovers, tooltips and other similar user interface concepts.
A popup can be made to take an explicit grab. See xdg_popup.grab for details.
When the popup is dismissed, a popup_done event will be sent out, and at the same time the surface will be unmapped. See the xdg_popup.popup_done event for details.
Explicitly destroying the xdg_popup object will also dismiss the popup and unmap the surface. Clients that want to dismiss the popup when another surface of their own is clicked should dismiss the popup using the destroy request.
A newly created xdg_popup will be stacked on top of all previously created xdg_popup surfaces associated with the same xdg_toplevel.
The parent of an xdg_popup must be mapped (see the xdg_surface description) before the xdg_popup itself.
The client must call wl_surface.commit on the corresponding wl_surface for the xdg_popup state to take effect.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(XdgPopupProxy emitter, int x, int y, int width, int height) configure the popup surfacevoid
popupDone
(XdgPopupProxy emitter) popup interaction is donevoid
repositioned
(XdgPopupProxy emitter, int token) signal the completion of a repositioned request
-
Field Details
-
VERSION
static final int VERSION- See Also:
-
-
Method Details
-
configure
configure the popup surfaceThis event asks the popup surface to configure itself given the configuration. The configured state should not be applied immediately. See xdg_surface.configure for details.
The x and y arguments represent the position the popup was placed at given the xdg_positioner rule, relative to the upper left corner of the window geometry of the parent surface.
For version 2 or older, the configure event for an xdg_popup is only ever sent once for the initial configuration. Starting with version 3, it may be sent again if the popup is setup with an xdg_positioner with set_reactive requested, or in response to xdg_popup.reposition requests.
- Specified by:
configure
in interfaceXdgPopupEvents
- Specified by:
configure
in interfaceXdgPopupEventsV2
- Specified by:
configure
in interfaceXdgPopupEventsV3
- Specified by:
configure
in interfaceXdgPopupEventsV4
- Specified by:
configure
in interfaceXdgPopupEventsV5
- Parameters:
emitter
- The protocol object that emitted the event.x
- x position relative to parent surface window geometryy
- y position relative to parent surface window geometrywidth
- window geometry widthheight
- window geometry height
-
popupDone
popup interaction is doneThe popup_done event is sent out when a popup is dismissed by the compositor. The client should destroy the xdg_popup object at this point.
- Specified by:
popupDone
in interfaceXdgPopupEvents
- Specified by:
popupDone
in interfaceXdgPopupEventsV2
- Specified by:
popupDone
in interfaceXdgPopupEventsV3
- Specified by:
popupDone
in interfaceXdgPopupEventsV4
- Specified by:
popupDone
in interfaceXdgPopupEventsV5
- Parameters:
emitter
- The protocol object that emitted the event.
-
repositioned
signal the completion of a repositioned requestThe repositioned event is sent as part of a popup configuration sequence, together with xdg_popup.configure and lastly xdg_surface.configure to notify the completion of a reposition request.
The repositioned event is to notify about the completion of a xdg_popup.reposition request. The token argument is the token passed in the xdg_popup.reposition request.
Immediately after this event is emitted, xdg_popup.configure and xdg_surface.configure will be sent with the updated size and position, as well as a new configure serial.
The client should optionally update the content of the popup, but must acknowledge the new popup configuration for the new position to take effect. See xdg_surface.ack_configure for details.
- Specified by:
repositioned
in interfaceXdgPopupEventsV3
- Specified by:
repositioned
in interfaceXdgPopupEventsV4
- Specified by:
repositioned
in interfaceXdgPopupEventsV5
- Parameters:
emitter
- The protocol object that emitted the event.token
- reposition request token
-