tray topic

CategoryTray

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.

Functions

sdlClickTrayEntry(Pointer<SdlTrayEntry> entry) → void tray
Simulate a click on a tray entry.
sdlCreateTray(Pointer<SdlSurface> icon, String? tooltip) Pointer<SdlTray> tray
Create an icon to be placed in the operating system's tray, or equivalent.
sdlCreateTrayMenu(Pointer<SdlTray> tray) Pointer<SdlTrayMenu> tray
Create a menu for a system tray.
sdlCreateTraySubmenu(Pointer<SdlTrayEntry> entry) Pointer<SdlTrayMenu> tray
Create a submenu for a system tray entry.
sdlDestroyTray(Pointer<SdlTray> tray) → void tray
Destroys a tray object.
sdlGetTrayEntries(Pointer<SdlTrayMenu> menu, Pointer<Int32> count) Pointer<Pointer<SdlTrayEntry>> tray
Returns a list of entries in the menu, in order.
sdlGetTrayEntryChecked(Pointer<SdlTrayEntry> entry) bool tray
Gets whether or not an entry is checked.
sdlGetTrayEntryEnabled(Pointer<SdlTrayEntry> entry) bool tray
Gets whether or not an entry is enabled.
sdlGetTrayEntryLabel(Pointer<SdlTrayEntry> entry) String? tray
Gets the label of an entry.
sdlGetTrayEntryParent(Pointer<SdlTrayEntry> entry) Pointer<SdlTrayMenu> tray
Gets the menu containing a certain tray entry.
sdlGetTrayMenu(Pointer<SdlTray> tray) Pointer<SdlTrayMenu> tray
Gets a previously created tray menu.
sdlGetTrayMenuParentEntry(Pointer<SdlTrayMenu> menu) Pointer<SdlTrayEntry> tray
Gets the entry for which the menu is a submenu, if the current menu is a submenu.
sdlGetTrayMenuParentTray(Pointer<SdlTrayMenu> menu) Pointer<SdlTray> tray
Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu.
sdlGetTraySubmenu(Pointer<SdlTrayEntry> entry) Pointer<SdlTrayMenu> tray
Gets a previously created tray entry submenu.
sdlInsertTrayEntryAt(Pointer<SdlTrayMenu> menu, int pos, String? label, int flags) Pointer<SdlTrayEntry> tray
Insert a tray entry at a given position.
sdlRemoveTrayEntry(Pointer<SdlTrayEntry> entry) → void tray
Removes a tray entry.
sdlSetTrayEntryCallback(Pointer<SdlTrayEntry> entry, Pointer<NativeFunction<SdlTrayCallback>> callback, Pointer<NativeType> userdata) → void tray
Sets a callback to be invoked when the entry is selected.
sdlSetTrayEntryChecked(Pointer<SdlTrayEntry> entry, bool checked) → void tray
Sets whether or not an entry is checked.
sdlSetTrayEntryEnabled(Pointer<SdlTrayEntry> entry, bool enabled) → void tray
Sets whether or not an entry is enabled.
sdlSetTrayEntryLabel(Pointer<SdlTrayEntry> entry, String? label) → void tray
Sets the label of an entry.
sdlSetTrayIcon(Pointer<SdlTray> tray, Pointer<SdlSurface> icon) → void tray
Updates the system tray icon's icon.
sdlSetTrayTooltip(Pointer<SdlTray> tray, String? tooltip) → void tray
Updates the system tray icon's tooltip.
sdlUpdateTrays() → void tray
Update the trays.