Class Window
- All Implemented Interfaces:
WlPointerEvents
,WlPointerEventsV2
,WlPointerEventsV3
,WlRegionEvents
,WlSurfaceEvents
,WlSurfaceEventsV2
,WlSurfaceEventsV3
,XdgSurfaceEvents
,XdgSurfaceEventsV2
,XdgSurfaceEventsV3
,XdgSurfaceEventsV4
,XdgSurfaceEventsV5
,XdgSurfaceEventsV6
,XdgToplevelEvents
,XdgToplevelEventsV2
,XdgToplevelEventsV3
,XdgToplevelEventsV4
,XdgToplevelEventsV5
-
Field Summary
Fields inherited from interface org.freedesktop.wayland.client.WlPointerEventsV3
VERSION
Fields inherited from interface org.freedesktop.wayland.client.WlRegionEvents
VERSION
Fields inherited from interface org.freedesktop.wayland.client.WlSurfaceEventsV3
VERSION
Fields inherited from interface org.freedesktop.wayland.client.XdgSurfaceEventsV6
VERSION
Fields inherited from interface org.freedesktop.wayland.client.XdgToplevelEventsV5
VERSION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
axis
(WlPointerProxy emitter, int time, int axis, Fixed value) axis eventvoid
button
(WlPointerProxy emitter, int serial, int time, int button, int state) pointer button eventvoid
close
(XdgToplevelProxy emitter) surface wants to be closedvoid
configure
(XdgSurfaceProxy emitter, int serial) suggest a surface changevoid
configure
(XdgToplevelProxy emitter, int width, int height, WlArray states) suggest a surface changevoid
configureBounds
(XdgToplevelProxy emitter, int width, int height) recommended window geometry boundsvoid
destroy()
void
enter
(WlPointerProxy emitter, int serial, WlSurfaceProxy surface, Fixed surfaceX, Fixed surfaceY) enter eventvoid
enter
(WlSurfaceProxy emitter, WlOutputProxy output) surface enters an outputboolean
void
leave
(WlPointerProxy emitter, int serial, WlSurfaceProxy surface) leave eventvoid
leave
(WlSurfaceProxy emitter, WlOutputProxy output) surface leaves an outputvoid
motion
(WlPointerProxy emitter, int time, Fixed surfaceX, Fixed surfaceY) pointer motion eventvoid
redraw
(int time) void
wmCapabilities
(XdgToplevelProxy emitter, WlArray capabilities) compositor capabilities
-
Constructor Details
-
Window
- Throws:
IOException
-
-
Method Details
-
enter
public void enter(WlPointerProxy emitter, int serial, @Nonnull WlSurfaceProxy surface, @Nonnull Fixed surfaceX, @Nonnull Fixed surfaceY) Description copied from interface:WlPointerEventsV3
enter eventNotification that this seat's pointer is focused on a certain surface.
When a seat's focus enters a surface, the pointer image is undefined and a client should respond to this event by setting an appropriate pointer image with the set_cursor request.
- Specified by:
enter
in interfaceWlPointerEvents
- Specified by:
enter
in interfaceWlPointerEventsV2
- Specified by:
enter
in interfaceWlPointerEventsV3
- Parameters:
emitter
- The protocol object that emitted the event.serial
- serial number of the enter eventsurface
- surface entered by the pointersurfaceX
- surface-local x coordinatesurfaceY
- surface-local y coordinate
-
leave
Description copied from interface:WlPointerEventsV3
leave eventNotification that this seat's pointer is no longer focused on a certain surface.
The leave notification is sent before the enter notification for the new focus.
- Specified by:
leave
in interfaceWlPointerEvents
- Specified by:
leave
in interfaceWlPointerEventsV2
- Specified by:
leave
in interfaceWlPointerEventsV3
- Parameters:
emitter
- The protocol object that emitted the event.serial
- serial number of the leave eventsurface
- surface left by the pointer
-
motion
public void motion(WlPointerProxy emitter, int time, @Nonnull Fixed surfaceX, @Nonnull Fixed surfaceY) Description copied from interface:WlPointerEventsV3
pointer motion eventNotification of pointer location change. The arguments surface_x and surface_y are the location relative to the focused surface.
- Specified by:
motion
in interfaceWlPointerEvents
- Specified by:
motion
in interfaceWlPointerEventsV2
- Specified by:
motion
in interfaceWlPointerEventsV3
- Parameters:
emitter
- The protocol object that emitted the event.time
- timestamp with millisecond granularitysurfaceX
- surface-local x coordinatesurfaceY
- surface-local y coordinate
-
button
Description copied from interface:WlPointerEventsV3
pointer button eventMouse button click and release notifications.
The location of the click is given by the last motion or enter event. The time argument is a timestamp with millisecond granularity, with an undefined base.
The button is a button code as defined in the Linux kernel's linux/input-event-codes.h header file, e.g. BTN_LEFT.
Any 16-bit button code value is reserved for future additions to the kernel's event code list. All other button codes above 0xFFFF are currently undefined but may be used in future versions of this protocol.
- Specified by:
button
in interfaceWlPointerEvents
- Specified by:
button
in interfaceWlPointerEventsV2
- Specified by:
button
in interfaceWlPointerEventsV3
- Parameters:
emitter
- The protocol object that emitted the event.serial
- serial number of the button eventtime
- timestamp with millisecond granularitybutton
- button that produced the eventstate
- physical state of the button
-
axis
Description copied from interface:WlPointerEventsV3
axis eventScroll and other axis notifications.
For scroll events (vertical and horizontal scroll axes), the value parameter is the length of a vector along the specified axis in a coordinate space identical to those of motion events, representing a relative movement along the specified axis.
For devices that support movements non-parallel to axes multiple axis events will be emitted.
When applicable, for example for touch pads, the server can choose to emit scroll events where the motion vector is equivalent to a motion event vector.
When applicable, a client can transform its content relative to the scroll distance.
- Specified by:
axis
in interfaceWlPointerEvents
- Specified by:
axis
in interfaceWlPointerEventsV2
- Specified by:
axis
in interfaceWlPointerEventsV3
- Parameters:
emitter
- The protocol object that emitted the event.time
- timestamp with millisecond granularityaxis
- axis typevalue
- length of vector in surface-local coordinate space
-
configure
Description copied from interface:XdgSurfaceEventsV6
suggest a surface changeThe configure event marks the end of a configure sequence. A configure sequence is a set of one or more events configuring the state of the xdg_surface, including the final xdg_surface.configure event.
Where applicable, xdg_surface surface roles will during a configure sequence extend this event as a latched state sent as events before the xdg_surface.configure event. Such events should be considered to make up a set of atomically applied configuration states, where the xdg_surface.configure commits the accumulated state.
Clients should arrange their surface for the new states, and then send an ack_configure request with the serial sent in this configure event at some point before committing the new surface.
If the client receives multiple configure events before it can respond to one, it is free to discard all but the last event it received.
- Specified by:
configure
in interfaceXdgSurfaceEvents
- Specified by:
configure
in interfaceXdgSurfaceEventsV2
- Specified by:
configure
in interfaceXdgSurfaceEventsV3
- Specified by:
configure
in interfaceXdgSurfaceEventsV4
- Specified by:
configure
in interfaceXdgSurfaceEventsV5
- Specified by:
configure
in interfaceXdgSurfaceEventsV6
- Parameters:
emitter
- The protocol object that emitted the event.serial
- serial of the configure event
-
isWaitForConfigure
public boolean isWaitForConfigure() -
enter
Description copied from interface:WlSurfaceEventsV3
surface enters an outputThis is emitted whenever a surface's creation, movement, or resizing results in some part of it being within the scanout region of an output.
Note that a surface may be overlapping with zero or more outputs.
- Specified by:
enter
in interfaceWlSurfaceEvents
- Specified by:
enter
in interfaceWlSurfaceEventsV2
- Specified by:
enter
in interfaceWlSurfaceEventsV3
- Parameters:
emitter
- The protocol object that emitted the event.output
- output entered by the surface
-
leave
Description copied from interface:WlSurfaceEventsV3
surface leaves an outputThis is emitted whenever a surface's creation, movement, or resizing results in it no longer having any part of it within the scanout region of an output.
Clients should not use the number of outputs the surface is on for frame throttling purposes. The surface might be hidden even if no leave event has been sent, and the compositor might expect new surface content updates even if no enter event has been sent. The frame event should be used instead.
- Specified by:
leave
in interfaceWlSurfaceEvents
- Specified by:
leave
in interfaceWlSurfaceEventsV2
- Specified by:
leave
in interfaceWlSurfaceEventsV3
- Parameters:
emitter
- The protocol object that emitted the event.output
- output left by the surface
-
destroy
public void destroy() -
redraw
public void redraw(int time) -
configure
Description copied from interface:XdgToplevelEventsV5
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.
- Specified by:
configure
in interfaceXdgToplevelEvents
- Specified by:
configure
in interfaceXdgToplevelEventsV2
- Specified by:
configure
in interfaceXdgToplevelEventsV3
- Specified by:
configure
in interfaceXdgToplevelEventsV4
- Specified by:
configure
in interfaceXdgToplevelEventsV5
- Parameters:
emitter
- The protocol object that emitted the event.width
-height
-states
-
-
close
Description copied from interface:XdgToplevelEventsV5
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.
- Specified by:
close
in interfaceXdgToplevelEvents
- Specified by:
close
in interfaceXdgToplevelEventsV2
- Specified by:
close
in interfaceXdgToplevelEventsV3
- Specified by:
close
in interfaceXdgToplevelEventsV4
- Specified by:
close
in interfaceXdgToplevelEventsV5
- Parameters:
emitter
- The protocol object that emitted the event.
-
configureBounds
Description copied from interface:XdgToplevelEventsV5
recommended window geometry boundsThe configure_bounds event may be sent prior to a xdg_toplevel.configure event to communicate the bounds a window geometry size is recommended to constrain to.
The passed width and height are in surface coordinate space. If width and height are 0, it means bounds is unknown and equivalent to as if no configure_bounds event was ever sent for this surface.
The bounds can for example correspond to the size of a monitor excluding any panels or other shell components, so that a surface isn't created in a way that it cannot fit.
The bounds may change at any point, and in such a case, a new xdg_toplevel.configure_bounds will be sent, followed by xdg_toplevel.configure and xdg_surface.configure.
- Specified by:
configureBounds
in interfaceXdgToplevelEventsV4
- Specified by:
configureBounds
in interfaceXdgToplevelEventsV5
- Parameters:
emitter
- The protocol object that emitted the event.width
-height
-
-
wmCapabilities
Description copied from interface:XdgToplevelEventsV5
compositor capabilitiesThis event advertises the capabilities supported by the compositor. If a capability isn't supported, clients should hide or disable the UI elements that expose this functionality. For instance, if the compositor doesn't advertise support for minimized toplevels, a button triggering the set_minimized request should not be displayed.
The compositor will ignore requests it doesn't support. For instance, a compositor which doesn't advertise support for minimized will ignore set_minimized requests.
Compositors must send this event once before the first xdg_surface.configure event. When the capabilities change, compositors must send this event again and then send an xdg_surface.configure event.
The configured state should not be applied immediately. See xdg_surface.configure for details.
The capabilities are sent as an array of 32-bit unsigned integers in native endianness.
- Specified by:
wmCapabilities
in interfaceXdgToplevelEventsV5
- Parameters:
emitter
- The protocol object that emitted the event.capabilities
- array of 32-bit capabilities
-