| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Tray.FunPtr
Synopsis
- sDL_CreateTray :: FunPtr (Ptr SDL_Surface -> PtrConst CChar -> IO (Ptr SDL_Tray))
- sDL_SetTrayIcon :: FunPtr (Ptr SDL_Tray -> Ptr SDL_Surface -> IO ())
- sDL_SetTrayTooltip :: FunPtr (Ptr SDL_Tray -> PtrConst CChar -> IO ())
- sDL_CreateTrayMenu :: FunPtr (Ptr SDL_Tray -> IO (Ptr SDL_TrayMenu))
- sDL_CreateTraySubmenu :: FunPtr (Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu))
- sDL_GetTrayMenu :: FunPtr (Ptr SDL_Tray -> IO (Ptr SDL_TrayMenu))
- sDL_GetTraySubmenu :: FunPtr (Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu))
- sDL_GetTrayEntries :: FunPtr (Ptr SDL_TrayMenu -> Ptr CInt -> IO (Ptr (PtrConst SDL_TrayEntry)))
- sDL_RemoveTrayEntry :: FunPtr (Ptr SDL_TrayEntry -> IO ())
- sDL_InsertTrayEntryAt :: FunPtr (Ptr SDL_TrayMenu -> CInt -> PtrConst CChar -> SDL_TrayEntryFlags -> IO (Ptr SDL_TrayEntry))
- sDL_SetTrayEntryLabel :: FunPtr (Ptr SDL_TrayEntry -> PtrConst CChar -> IO ())
- sDL_GetTrayEntryLabel :: FunPtr (Ptr SDL_TrayEntry -> IO (PtrConst CChar))
- sDL_SetTrayEntryChecked :: FunPtr (Ptr SDL_TrayEntry -> CBool -> IO ())
- sDL_GetTrayEntryChecked :: FunPtr (Ptr SDL_TrayEntry -> IO CBool)
- sDL_SetTrayEntryEnabled :: FunPtr (Ptr SDL_TrayEntry -> CBool -> IO ())
- sDL_GetTrayEntryEnabled :: FunPtr (Ptr SDL_TrayEntry -> IO CBool)
- sDL_SetTrayEntryCallback :: FunPtr (Ptr SDL_TrayEntry -> SDL_TrayCallback -> Ptr Void -> IO ())
- sDL_ClickTrayEntry :: FunPtr (Ptr SDL_TrayEntry -> IO ())
- sDL_DestroyTray :: FunPtr (Ptr SDL_Tray -> IO ())
- sDL_GetTrayEntryParent :: FunPtr (Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu))
- sDL_GetTrayMenuParentEntry :: FunPtr (Ptr SDL_TrayMenu -> IO (Ptr SDL_TrayEntry))
- sDL_GetTrayMenuParentTray :: FunPtr (Ptr SDL_TrayMenu -> IO (Ptr SDL_Tray))
- sDL_UpdateTrays :: FunPtr (IO ())
Documentation
sDL_CreateTray :: FunPtr (Ptr SDL_Surface -> PtrConst CChar -> IO (Ptr SDL_Tray)) Source #
Create an icon to be placed in the operating system's tray, or equivalent.
Many platforms advise not using a system tray unless persistence is a necessary feature. Avoid needlessly creating a tray icon, as the user may feel like it clutters their interface.
Using tray icons require the video subsystem.
icon- a surface to be used as icon. May be NULL.
tooltip- a tooltip to be displayed when the mouse hovers the icon in UTF-8 encoding. Not supported on all platforms. May be NULL.
- Returns
- The newly created system tray icon.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_CreateTrayMenu,sDL_GetTrayMenu,sDL_DestroyTray- C declaration
SDL_CreateTray, defined atSDL3/SDL_tray.h 121:40
Since: 3.2.0
sDL_SetTrayIcon :: FunPtr (Ptr SDL_Tray -> Ptr SDL_Surface -> IO ()) Source #
Updates the system tray icon's icon.
tray- the tray icon to be updated.
icon- the new icon. May be NULL.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_CreateTray- C declaration
SDL_SetTrayIcon, defined atSDL3/SDL_tray.h 136:34
Since: 3.2.0
sDL_SetTrayTooltip :: FunPtr (Ptr SDL_Tray -> PtrConst CChar -> IO ()) Source #
Updates the system tray icon's tooltip.
tray- the tray icon to be updated.
tooltip- the new tooltip in UTF-8 encoding. May be NULL.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_CreateTray- C declaration
SDL_SetTrayTooltip, defined atSDL3/SDL_tray.h 151:34
Since: 3.2.0
sDL_CreateTrayMenu :: FunPtr (Ptr SDL_Tray -> IO (Ptr SDL_TrayMenu)) Source #
Create a menu for a system tray.
This should be called at most once per tray icon.
This function does the same thing as SDL_CreateTraySubmenu(), except that it takes a SDL_Tray instead of a SDL_TrayEntry.
A menu does not need to be destroyed; it will be destroyed with the tray.
tray- the tray to bind the menu to.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_CreateTray,sDL_GetTrayMenu,sDL_GetTrayMenuParentTray- C declaration
SDL_CreateTrayMenu, defined atSDL3/SDL_tray.h 175:44
Since: 3.2.0
sDL_CreateTraySubmenu :: FunPtr (Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu)) Source #
Create a submenu for a system tray entry.
This should be called at most once per tray entry.
This function does the same thing as SDL_CreateTrayMenu, except that it takes a SDL_TrayEntry instead of a SDL_Tray.
A menu does not need to be destroyed; it will be destroyed with the tray.
entry- the tray entry to bind the menu to.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_InsertTrayEntryAt,sDL_GetTraySubmenu,sDL_GetTrayMenuParentEntry- C declaration
SDL_CreateTraySubmenu, defined atSDL3/SDL_tray.h 199:44
Since: 3.2.0
sDL_GetTrayMenu :: FunPtr (Ptr SDL_Tray -> IO (Ptr SDL_TrayMenu)) Source #
Gets a previously created tray menu.
You should have called SDL_CreateTrayMenu() on the tray object. This function allows you to fetch it again later.
This function does the same thing as SDL_GetTraySubmenu(), except that it takes a SDL_Tray instead of a SDL_TrayEntry.
A menu does not need to be destroyed; it will be destroyed with the tray.
tray- the tray entry to bind the menu to.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_CreateTray,sDL_CreateTrayMenu- C declaration
SDL_GetTrayMenu, defined atSDL3/SDL_tray.h 223:44
Since: 3.2.0
sDL_GetTraySubmenu :: FunPtr (Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu)) Source #
Gets a previously created tray entry submenu.
You should have called SDL_CreateTraySubmenu() on the entry object. This function allows you to fetch it again later.
This function does the same thing as SDL_GetTrayMenu(), except that it takes a SDL_TrayEntry instead of a SDL_Tray.
A menu does not need to be destroyed; it will be destroyed with the tray.
entry- the tray entry to bind the menu to.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_InsertTrayEntryAt,sDL_CreateTraySubmenu- C declaration
SDL_GetTraySubmenu, defined atSDL3/SDL_tray.h 247:44
Since: 3.2.0
sDL_GetTrayEntries :: FunPtr (Ptr SDL_TrayMenu -> Ptr CInt -> IO (Ptr (PtrConst SDL_TrayEntry))) Source #
Returns a list of entries in the menu, in order.
menu- The menu to get entries from.
count- An optional pointer to obtain the number of entries in the menu.
- Returns
- a NULL-terminated list of entries within the given menu. The pointer becomes invalid when any function that inserts or deletes entries in the menu is called.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_RemoveTrayEntry,sDL_InsertTrayEntryAt- C declaration
SDL_GetTrayEntries, defined atSDL3/SDL_tray.h 267:52
Since: 3.2.0
sDL_RemoveTrayEntry :: FunPtr (Ptr SDL_TrayEntry -> IO ()) Source #
Removes a tray entry.
entry- The entry to be deleted.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_GetTrayEntries,sDL_InsertTrayEntryAt- C declaration
SDL_RemoveTrayEntry, defined atSDL3/SDL_tray.h 282:34
Since: 3.2.0
sDL_InsertTrayEntryAt :: FunPtr (Ptr SDL_TrayMenu -> CInt -> PtrConst CChar -> SDL_TrayEntryFlags -> IO (Ptr SDL_TrayEntry)) Source #
Insert a tray entry at a given position.
If label is NULL, the entry will be a separator. Many functions won't work for an entry that is a separator.
An entry does not need to be destroyed; it will be destroyed with the tray.
menu- the menu to append the entry to.
pos- the desired position for the new entry. Entries at or following this place will be moved. If pos is -1, the entry is appended.
label- the text to be displayed on the entry, in UTF-8 encoding, or NULL for a separator.
flags- a combination of flags, some of which are mandatory.
- Returns
- the newly created entry, or NULL if pos is out of bounds.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
SDL_TrayEntryFlags,sDL_GetTrayEntries,sDL_RemoveTrayEntry,sDL_GetTrayEntryParent- C declaration
SDL_InsertTrayEntryAt, defined atSDL3/SDL_tray.h 310:45
Since: 3.2.0
sDL_SetTrayEntryLabel :: FunPtr (Ptr SDL_TrayEntry -> PtrConst CChar -> IO ()) Source #
Sets the label of an entry.
An entry cannot change between a separator and an ordinary entry; that is, it is not possible to set a non-NULL label on an entry that has a NULL label (separators), or to set a NULL label to an entry that has a non-NULL label. The function will silently fail if that happens.
entry- the entry to be updated.
label- the new label for the entry in UTF-8 encoding.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_GetTrayEntries,sDL_InsertTrayEntryAt,sDL_GetTrayEntryLabel- C declaration
SDL_SetTrayEntryLabel, defined atSDL3/SDL_tray.h 332:34
Since: 3.2.0
sDL_GetTrayEntryLabel :: FunPtr (Ptr SDL_TrayEntry -> IO (PtrConst CChar)) Source #
Gets the label of an entry.
If the returned value is NULL, the entry is a separator.
entry- the entry to be read.
- Returns
- the label of the entry in UTF-8 encoding.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_GetTrayEntries,sDL_InsertTrayEntryAt,sDL_SetTrayEntryLabel- C declaration
SDL_GetTrayEntryLabel, defined atSDL3/SDL_tray.h 351:42
Since: 3.2.0
sDL_SetTrayEntryChecked :: FunPtr (Ptr SDL_TrayEntry -> CBool -> IO ()) Source #
Sets whether or not an entry is checked.
The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.
entry- the entry to be updated.
checked- true if the entry should be checked; false otherwise.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_GetTrayEntries,sDL_InsertTrayEntryAt,sDL_GetTrayEntryChecked- C declaration
SDL_SetTrayEntryChecked, defined atSDL3/SDL_tray.h 370:34
Since: 3.2.0
sDL_GetTrayEntryChecked :: FunPtr (Ptr SDL_TrayEntry -> IO CBool) Source #
Gets whether or not an entry is checked.
The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.
entry- the entry to be read.
- Returns
- true if the entry is checked; false otherwise.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_GetTrayEntries,sDL_InsertTrayEntryAt,sDL_SetTrayEntryChecked- C declaration
SDL_GetTrayEntryChecked, defined atSDL3/SDL_tray.h 389:34
Since: 3.2.0
sDL_SetTrayEntryEnabled :: FunPtr (Ptr SDL_TrayEntry -> CBool -> IO ()) Source #
Sets whether or not an entry is enabled.
entry- the entry to be updated.
enabled- true if the entry should be enabled; false otherwise.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_GetTrayEntries,sDL_InsertTrayEntryAt,sDL_GetTrayEntryEnabled- C declaration
SDL_SetTrayEntryEnabled, defined atSDL3/SDL_tray.h 406:34
Since: 3.2.0
sDL_GetTrayEntryEnabled :: FunPtr (Ptr SDL_TrayEntry -> IO CBool) Source #
Gets whether or not an entry is enabled.
entry- the entry to be read.
- Returns
- true if the entry is enabled; false otherwise.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_GetTrayEntries,sDL_InsertTrayEntryAt,sDL_SetTrayEntryEnabled- C declaration
SDL_GetTrayEntryEnabled, defined atSDL3/SDL_tray.h 423:34
Since: 3.2.0
sDL_SetTrayEntryCallback :: FunPtr (Ptr SDL_TrayEntry -> SDL_TrayCallback -> Ptr Void -> IO ()) Source #
Sets a callback to be invoked when the entry is selected.
entry- the entry to be updated.
callback- a callback to be invoked when the entry is selected.
userdata- an optional pointer to pass extra data to the callback when it will be invoked.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_GetTrayEntries,sDL_InsertTrayEntryAt- C declaration
SDL_SetTrayEntryCallback, defined atSDL3/SDL_tray.h 441:34
Since: 3.2.0
sDL_ClickTrayEntry :: FunPtr (Ptr SDL_TrayEntry -> IO ()) Source #
Simulate a click on a tray entry.
entry- The entry to activate.
- Thread safety
- This function should be called on the thread that created the tray.
- C declaration
SDL_ClickTrayEntry, defined atSDL3/SDL_tray.h 453:34
Since: 3.2.0
sDL_DestroyTray :: FunPtr (Ptr SDL_Tray -> IO ()) Source #
Destroys a tray object.
This also destroys all associated menus and entries.
tray- the tray icon to be destroyed.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_CreateTray- C declaration
SDL_DestroyTray, defined atSDL3/SDL_tray.h 469:34
Since: 3.2.0
sDL_GetTrayEntryParent :: FunPtr (Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu)) Source #
Gets the menu containing a certain tray entry.
entry- the entry for which to get the parent menu.
- Returns
- the parent menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_InsertTrayEntryAt- C declaration
SDL_GetTrayEntryParent, defined atSDL3/SDL_tray.h 484:44
Since: 3.2.0
sDL_GetTrayMenuParentEntry :: FunPtr (Ptr SDL_TrayMenu -> IO (Ptr SDL_TrayEntry)) Source #
Gets the entry for which the menu is a submenu, if the current menu is a submenu.
Either this function or SDL_GetTrayMenuParentTray() will return non-NULL for any given menu.
menu- the menu for which to get the parent entry.
- Returns
- the parent entry, or NULL if this menu is not a submenu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_CreateTraySubmenu,sDL_GetTrayMenuParentTray- C declaration
SDL_GetTrayMenuParentEntry, defined atSDL3/SDL_tray.h 504:45
Since: 3.2.0
sDL_GetTrayMenuParentTray :: FunPtr (Ptr SDL_TrayMenu -> IO (Ptr SDL_Tray)) Source #
Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu.
Either this function or SDL_GetTrayMenuParentEntry() will return non-NULL for any given menu.
menu- the menu for which to get the parent enttrayry.
- Returns
- the parent tray, or NULL if this menu is a submenu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
sDL_CreateTrayMenu,sDL_GetTrayMenuParentEntry- C declaration
SDL_GetTrayMenuParentTray, defined atSDL3/SDL_tray.h 524:40
Since: 3.2.0
sDL_UpdateTrays :: FunPtr (IO ()) Source #
Update the trays.
This is called automatically by the event loop and is only needed if you're using trays but aren't handling SDL events.
- Thread safety
- This function should only be called on the main thread.
- C declaration
SDL_UpdateTrays, defined atSDL3/SDL_tray.h 536:34
Since: 3.2.0