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