xdg_toplevel_icon_manager_v1¤
wayland.xdg_toplevel_icon_manager_v1 ¤
Interface to manage toplevel icons
This interface allows clients to create toplevel window icons and set them on toplevel windows to be displayed to the user.
Methods:
-
destroy
–Destroy the toplevel icon manager
-
create_icon
–Create a new icon instance
-
set_icon
–Set an icon on a toplevel window
-
on_icon_size
–Describes a supported & preferred icon size.
-
on_done
–All information has been sent.
events
icon_size ¤
Describes a supported & preferred icon size
This event indicates an icon size the compositor prefers to be available if the client has scalable icons and can render to any size.
When the 'xdg_toplevel_icon_manager_v1' object is created, the compositor may send one or more 'icon_size' events to describe the list of preferred icon sizes. If the compositor has no size preference, it may not send any 'icon_size' event, and it is up to the client to decide a suitable icon size.
A sequence of 'icon_size' events must be finished with a 'done' event. If the compositor has no size preferences, it must still send the 'done' event, without any preceding 'icon_size' events.
Parameters:
done ¤
done() -> None
All information has been sent
This event is sent after all 'icon_size' events have been sent.
destroy ¤
destroy() -> None
Destroy the toplevel icon manager
Destroy the toplevel icon manager. This does not destroy objects created with the manager.
create_icon ¤
create_icon() -> xdg_toplevel_icon_v1
Create a new icon instance
Creates a new icon object. This icon can then be attached to a xdg_toplevel via the 'set_icon' request.
Returns:
-
xdg_toplevel_icon_v1
(xdg_toplevel_icon_v1
) –The created object
set_icon ¤
set_icon(toplevel: xdg_toplevel, icon: xdg_toplevel_icon_v1) -> None
Set an icon on a toplevel window
This request assigns the icon 'icon' to 'toplevel', or clears the toplevel icon if 'icon' was null. This state is double-buffered and is applied on the next wl_surface.commit of the toplevel.
After making this call, the xdg_toplevel_icon_v1 provided as 'icon' can be destroyed by the client without 'toplevel' losing its icon. The xdg_toplevel_icon_v1 is immutable from this point, and any future attempts to change it must raise the 'xdg_toplevel_icon_v1.immutable' protocol error.
The compositor must set the toplevel icon from either the pixel data the icon provides, or by loading a stock icon using the icon name. See the description of 'xdg_toplevel_icon_v1' for details.
If 'icon' is set to null, the icon of the respective toplevel is reset to its default icon (usually the icon of the application, derived from its desktop-entry file, or a placeholder icon). If this request is passed an icon with no pixel buffers or icon name assigned, the icon must be reset just like if 'icon' was null.
Parameters:
-
toplevel
¤xdg_toplevel
) –The toplevel to act on
on_icon_size ¤
on_icon_size(size: int) -> None
Describes a supported & preferred icon size.
Override to handle wayland.xdg_toplevel_icon_manager_v1.events.icon_size
.
on_done ¤
on_done() -> None
All information has been sent.
Override to handle wayland.xdg_toplevel_icon_manager_v1.events.done
.