Module tray
Available on crate feature
dep_sdl3
only.Expand description
SDL offers a way to add items to the “system tray” (more correctly called the “notification area” on Windows). On platforms that offer this concept, an SDL app can add a tray icon, submenus, checkboxes, and clickable entries, and register a callback that is fired when the user clicks on these pieces.
Structs§
- SDL_
Tray - An opaque handle representing a toplevel system tray object.
- SDL_
Tray Entry - An opaque handle representing an entry on a system tray object.
- SDL_
Tray Menu - An opaque handle representing a menu/submenu on a system tray object.
Constants§
- SDL_
TRAYENTRY_ BUTTON - Make the entry a simple button. Required.
- SDL_
TRAYENTRY_ CHECKBOX - Make the entry a checkbox. Required.
- SDL_
TRAYENTRY_ CHECKED - Make the entry checked. This is valid only for checkboxes. Optional.
- SDL_
TRAYENTRY_ DISABLED - Make the entry disabled. Optional.
- SDL_
TRAYENTRY_ SUBMENU - Prepare the entry to have a submenu. Required
Functions§
- SDL_
Click ⚠Tray Entry - Simulate a click on a tray entry.
- SDL_
Create ⚠Tray - Create an icon to be placed in the operating system’s tray, or equivalent.
- SDL_
Create ⚠Tray Menu - Create a menu for a system tray.
- SDL_
Create ⚠Tray Submenu - Create a submenu for a system tray entry.
- SDL_
Destroy ⚠Tray - Destroys a tray object.
- SDL_
GetTray ⚠Entries - Returns a list of entries in the menu, in order.
- SDL_
GetTray ⚠Entry Checked - Gets whether or not an entry is checked.
- SDL_
GetTray ⚠Entry Enabled - Gets whether or not an entry is enabled.
- SDL_
GetTray ⚠Entry Label - Gets the label of an entry.
- SDL_
GetTray ⚠Entry Parent - Gets the menu containing a certain tray entry.
- SDL_
GetTray ⚠Menu - Gets a previously created tray menu.
- SDL_
GetTray ⚠Menu Parent Entry - Gets the entry for which the menu is a submenu, if the current menu is a submenu.
- SDL_
GetTray ⚠Menu Parent Tray - Gets the tray for which this menu is the first-level menu, if the current menu isn’t a submenu.
- SDL_
GetTray ⚠Submenu - Gets a previously created tray entry submenu.
- SDL_
Insert ⚠Tray Entry At - Insert a tray entry at a given position.
- SDL_
Remove ⚠Tray Entry - Removes a tray entry.
- SDL_
SetTray ⚠Entry Callback - Sets a callback to be invoked when the entry is selected.
- SDL_
SetTray ⚠Entry Checked - Sets whether or not an entry is checked.
- SDL_
SetTray ⚠Entry Enabled - Sets whether or not an entry is enabled.
- SDL_
SetTray ⚠Entry Label - Sets the label of an entry.
- SDL_
SetTray ⚠Icon - Updates the system tray icon’s icon.
- SDL_
SetTray ⚠Tooltip - Updates the system tray icon’s tooltip.
- SDL_
Update ⚠Trays - Update the trays.
Type Aliases§
- SDL_
Tray Callback - A callback that is invoked when a tray entry is selected.
- SDL_
Tray Entry Flags - Flags that control the creation of system tray entries.