| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Tray
Contents
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. An opaque handle representing a toplevel system tray object.
FFI conventions
Unsuffixed aliases are unsafe foreign imports; aliases suffixed Safe are safe. Functions whose callbacks fire during the call export only the Safe alias (the genuine unsafe import stays reachable under SDL3.Sys.Bindgen.Tray.Unsafe); functions curated unsafe-only export only the unsuffixed one. Each alias's documentation records its flavor and rationale.
Full conventions: SDL3.Sys.
Since: 3.2.0
Synopsis
- module SDL3.Sys.Bindgen.Tray
- pattern SDL_TRAYENTRY_BUTTON :: SDL_TrayEntryFlags
- pattern SDL_TRAYENTRY_CHECKBOX :: SDL_TrayEntryFlags
- pattern SDL_TRAYENTRY_SUBMENU :: SDL_TrayEntryFlags
- pattern SDL_TRAYENTRY_DISABLED :: SDL_TrayEntryFlags
- pattern SDL_TRAYENTRY_CHECKED :: SDL_TrayEntryFlags
- createTray :: Ptr SDL_Surface -> PtrConst CChar -> IO (Ptr SDL_Tray)
- createTraySafe :: Ptr SDL_Surface -> PtrConst CChar -> IO (Ptr SDL_Tray)
- setTrayIcon :: Ptr SDL_Tray -> Ptr SDL_Surface -> IO ()
- setTrayIconSafe :: Ptr SDL_Tray -> Ptr SDL_Surface -> IO ()
- setTrayTooltip :: Ptr SDL_Tray -> PtrConst CChar -> IO ()
- setTrayTooltipSafe :: Ptr SDL_Tray -> PtrConst CChar -> IO ()
- createTrayMenu :: Ptr SDL_Tray -> IO (Ptr SDL_TrayMenu)
- createTrayMenuSafe :: Ptr SDL_Tray -> IO (Ptr SDL_TrayMenu)
- createTraySubmenu :: Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu)
- createTraySubmenuSafe :: Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu)
- getTrayMenu :: Ptr SDL_Tray -> IO (Ptr SDL_TrayMenu)
- getTrayMenuSafe :: Ptr SDL_Tray -> IO (Ptr SDL_TrayMenu)
- getTraySubmenu :: Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu)
- getTraySubmenuSafe :: Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu)
- getTrayEntries :: Ptr SDL_TrayMenu -> Ptr CInt -> IO (Ptr (PtrConst SDL_TrayEntry))
- getTrayEntriesSafe :: Ptr SDL_TrayMenu -> Ptr CInt -> IO (Ptr (PtrConst SDL_TrayEntry))
- removeTrayEntry :: Ptr SDL_TrayEntry -> IO ()
- removeTrayEntrySafe :: Ptr SDL_TrayEntry -> IO ()
- insertTrayEntryAt :: Ptr SDL_TrayMenu -> Int32 -> PtrConst CChar -> SDL_TrayEntryFlags -> IO (Ptr SDL_TrayEntry)
- insertTrayEntryAtSafe :: Ptr SDL_TrayMenu -> Int32 -> PtrConst CChar -> SDL_TrayEntryFlags -> IO (Ptr SDL_TrayEntry)
- setTrayEntryLabel :: Ptr SDL_TrayEntry -> PtrConst CChar -> IO ()
- setTrayEntryLabelSafe :: Ptr SDL_TrayEntry -> PtrConst CChar -> IO ()
- getTrayEntryLabel :: Ptr SDL_TrayEntry -> IO (PtrConst CChar)
- getTrayEntryLabelSafe :: Ptr SDL_TrayEntry -> IO (PtrConst CChar)
- setTrayEntryChecked :: Ptr SDL_TrayEntry -> Bool -> IO ()
- setTrayEntryCheckedSafe :: Ptr SDL_TrayEntry -> Bool -> IO ()
- getTrayEntryChecked :: Ptr SDL_TrayEntry -> IO Bool
- getTrayEntryCheckedSafe :: Ptr SDL_TrayEntry -> IO Bool
- setTrayEntryEnabled :: Ptr SDL_TrayEntry -> Bool -> IO ()
- setTrayEntryEnabledSafe :: Ptr SDL_TrayEntry -> Bool -> IO ()
- getTrayEntryEnabled :: Ptr SDL_TrayEntry -> IO Bool
- getTrayEntryEnabledSafe :: Ptr SDL_TrayEntry -> IO Bool
- setTrayEntryCallback :: Ptr SDL_TrayEntry -> SDL_TrayCallback -> Ptr Void -> IO ()
- setTrayEntryCallbackSafe :: Ptr SDL_TrayEntry -> SDL_TrayCallback -> Ptr Void -> IO ()
- clickTrayEntry :: Ptr SDL_TrayEntry -> IO ()
- clickTrayEntrySafe :: Ptr SDL_TrayEntry -> IO ()
- destroyTray :: Ptr SDL_Tray -> IO ()
- destroyTraySafe :: Ptr SDL_Tray -> IO ()
- getTrayEntryParent :: Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu)
- getTrayEntryParentSafe :: Ptr SDL_TrayEntry -> IO (Ptr SDL_TrayMenu)
- getTrayMenuParentEntry :: Ptr SDL_TrayMenu -> IO (Ptr SDL_TrayEntry)
- getTrayMenuParentEntrySafe :: Ptr SDL_TrayMenu -> IO (Ptr SDL_TrayEntry)
- getTrayMenuParentTray :: Ptr SDL_TrayMenu -> IO (Ptr SDL_Tray)
- getTrayMenuParentTraySafe :: Ptr SDL_TrayMenu -> IO (Ptr SDL_Tray)
- updateTrays :: IO ()
- updateTraysSafe :: IO ()
Documentation
module SDL3.Sys.Bindgen.Tray
Typed constants
pattern SDL_TRAYENTRY_BUTTON :: SDL_TrayEntryFlags Source #
Typed constant for macro SDL_TRAYENTRY_BUTTON. Combine with .|. from Data.Bits.
pattern SDL_TRAYENTRY_CHECKBOX :: SDL_TrayEntryFlags Source #
Typed constant for macro SDL_TRAYENTRY_CHECKBOX. Combine with .|. from Data.Bits.
pattern SDL_TRAYENTRY_SUBMENU :: SDL_TrayEntryFlags Source #
Typed constant for macro SDL_TRAYENTRY_SUBMENU. Combine with .|. from Data.Bits.
pattern SDL_TRAYENTRY_DISABLED :: SDL_TrayEntryFlags Source #
Typed constant for macro SDL_TRAYENTRY_DISABLED. Combine with .|. from Data.Bits.
pattern SDL_TRAYENTRY_CHECKED :: SDL_TrayEntryFlags Source #
Typed constant for macro SDL_TRAYENTRY_CHECKED. Combine with .|. from Data.Bits.
Function aliases
Arguments
| :: Ptr SDL_Surface |
|
| -> PtrConst CChar |
|
| -> IO (Ptr SDL_Tray) |
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.
- Returns
- The newly created system tray icon.
- Thread safety
- This function should only be called on the main thread.
- See also
createTrayMenu,getTrayMenu,destroyTray
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_CreateTray. The safe flavor iscreateTraySafe. - C declaration
SDL_CreateTray, defined atSDL3/SDL_tray.h 121:40
Since: 3.2.0
Arguments
| :: Ptr SDL_Surface |
|
| -> PtrConst CChar |
|
| -> IO (Ptr SDL_Tray) |
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.
- Returns
- The newly created system tray icon.
- Thread safety
- This function should only be called on the main thread.
- See also
createTrayMenu,getTrayMenu,destroyTray
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_CreateTray. The unsafe flavor iscreateTray. - C declaration
SDL_CreateTray, defined atSDL3/SDL_tray.h 121:40
Since: 3.2.0
Arguments
| :: Ptr SDL_Tray |
|
| -> Ptr SDL_Surface |
|
| -> IO () |
Updates the system tray icon's icon.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
createTray
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetTrayIcon. The safe flavor issetTrayIconSafe. - C declaration
SDL_SetTrayIcon, defined atSDL3/SDL_tray.h 136:34
Since: 3.2.0
Arguments
| :: Ptr SDL_Tray |
|
| -> Ptr SDL_Surface |
|
| -> IO () |
Updates the system tray icon's icon.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
createTray
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetTrayIcon. The unsafe flavor issetTrayIcon. - C declaration
SDL_SetTrayIcon, defined atSDL3/SDL_tray.h 136:34
Since: 3.2.0
Arguments
| :: Ptr SDL_Tray |
|
| -> PtrConst CChar |
|
| -> IO () |
Updates the system tray icon's tooltip.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
createTray
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetTrayTooltip. The safe flavor issetTrayTooltipSafe. - C declaration
SDL_SetTrayTooltip, defined atSDL3/SDL_tray.h 151:34
Since: 3.2.0
Arguments
| :: Ptr SDL_Tray |
|
| -> PtrConst CChar |
|
| -> IO () |
Updates the system tray icon's tooltip.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
createTray
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetTrayTooltip. The unsafe flavor issetTrayTooltip. - C declaration
SDL_SetTrayTooltip, defined atSDL3/SDL_tray.h 151:34
Since: 3.2.0
Arguments
| :: Ptr SDL_Tray |
|
| -> IO (Ptr SDL_TrayMenu) |
Create a menu for a system tray.
This should be called at most once per tray icon.
This function does the same thing as , except that it takes a createTraySubmenuSDL_Tray instead of a SDL_TrayEntry.
A menu does not need to be destroyed; it will be destroyed with the tray.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
createTray,getTrayMenu,getTrayMenuParentTray
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_CreateTrayMenu. The safe flavor iscreateTrayMenuSafe. - C declaration
SDL_CreateTrayMenu, defined atSDL3/SDL_tray.h 175:44
Since: 3.2.0
Arguments
| :: Ptr SDL_Tray |
|
| -> IO (Ptr SDL_TrayMenu) |
Create a menu for a system tray.
This should be called at most once per tray icon.
This function does the same thing as , except that it takes a createTraySubmenuSDL_Tray instead of a SDL_TrayEntry.
A menu does not need to be destroyed; it will be destroyed with the tray.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
createTray,getTrayMenu,getTrayMenuParentTray
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_CreateTrayMenu. The unsafe flavor iscreateTrayMenu. - C declaration
SDL_CreateTrayMenu, defined atSDL3/SDL_tray.h 175:44
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO (Ptr SDL_TrayMenu) |
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 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.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
insertTrayEntryAt,getTraySubmenu,getTrayMenuParentEntry
sdl3-bindgen-sys notes
Since: 3.2.0
createTraySubmenuSafe Source #
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO (Ptr SDL_TrayMenu) |
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 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.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
insertTrayEntryAt,getTraySubmenu,getTrayMenuParentEntry
sdl3-bindgen-sys notes
Since: 3.2.0
Arguments
| :: Ptr SDL_Tray |
|
| -> IO (Ptr SDL_TrayMenu) |
Gets a previously created tray menu.
You should have called on the tray object. This function allows you to fetch it again later.createTrayMenu
This function does the same thing as , except that it takes a getTraySubmenuSDL_Tray instead of a SDL_TrayEntry.
A menu does not need to be destroyed; it will be destroyed with the tray.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
createTray,createTrayMenu
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetTrayMenu. The safe flavor isgetTrayMenuSafe. - C declaration
SDL_GetTrayMenu, defined atSDL3/SDL_tray.h 223:44
Since: 3.2.0
Arguments
| :: Ptr SDL_Tray |
|
| -> IO (Ptr SDL_TrayMenu) |
Gets a previously created tray menu.
You should have called on the tray object. This function allows you to fetch it again later.createTrayMenu
This function does the same thing as , except that it takes a getTraySubmenuSDL_Tray instead of a SDL_TrayEntry.
A menu does not need to be destroyed; it will be destroyed with the tray.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
createTray,createTrayMenu
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetTrayMenu. The unsafe flavor isgetTrayMenu. - C declaration
SDL_GetTrayMenu, defined atSDL3/SDL_tray.h 223:44
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO (Ptr SDL_TrayMenu) |
Gets a previously created tray entry submenu.
You should have called on the entry object. This function allows you to fetch it again later.createTraySubmenu
This function does the same thing as , except that it takes a getTrayMenuSDL_TrayEntry instead of a SDL_Tray.
A menu does not need to be destroyed; it will be destroyed with the tray.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
insertTrayEntryAt,createTraySubmenu
sdl3-bindgen-sys notes
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO (Ptr SDL_TrayMenu) |
Gets a previously created tray entry submenu.
You should have called on the entry object. This function allows you to fetch it again later.createTraySubmenu
This function does the same thing as , except that it takes a getTrayMenuSDL_TrayEntry instead of a SDL_Tray.
A menu does not need to be destroyed; it will be destroyed with the tray.
- Returns
- the newly created menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
insertTrayEntryAt,createTraySubmenu
sdl3-bindgen-sys notes
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayMenu |
|
| -> Ptr CInt |
|
| -> IO (Ptr (PtrConst SDL_TrayEntry)) |
Returns a list of entries in the menu, in order.
- 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
removeTrayEntry,insertTrayEntryAt
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetTrayEntries. The safe flavor isgetTrayEntriesSafe. - C declaration
SDL_GetTrayEntries, defined atSDL3/SDL_tray.h 267:52
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayMenu |
|
| -> Ptr CInt |
|
| -> IO (Ptr (PtrConst SDL_TrayEntry)) |
Returns a list of entries in the menu, in order.
- 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
removeTrayEntry,insertTrayEntryAt
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetTrayEntries. The unsafe flavor isgetTrayEntries. - C declaration
SDL_GetTrayEntries, defined atSDL3/SDL_tray.h 267:52
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO () |
Removes a tray entry.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
getTrayEntries,insertTrayEntryAt
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_RemoveTrayEntry. The safe flavor isremoveTrayEntrySafe. - C declaration
SDL_RemoveTrayEntry, defined atSDL3/SDL_tray.h 282:34
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO () |
Removes a tray entry.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
getTrayEntries,insertTrayEntryAt
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_RemoveTrayEntry. The unsafe flavor isremoveTrayEntry. - C declaration
SDL_RemoveTrayEntry, defined atSDL3/SDL_tray.h 282:34
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayMenu |
|
| -> Int32 |
|
| -> PtrConst CChar |
|
| -> SDL_TrayEntryFlags |
|
| -> IO (Ptr SDL_TrayEntry) |
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.
- 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,getTrayEntries,removeTrayEntry,getTrayEntryParent
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_InsertTrayEntryAt. The safe flavor isinsertTrayEntryAtSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_InsertTrayEntryAt, defined atSDL3/SDL_tray.h 310:45
Since: 3.2.0
insertTrayEntryAtSafe Source #
Arguments
| :: Ptr SDL_TrayMenu |
|
| -> Int32 |
|
| -> PtrConst CChar |
|
| -> SDL_TrayEntryFlags |
|
| -> IO (Ptr SDL_TrayEntry) |
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.
- 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,getTrayEntries,removeTrayEntry,getTrayEntryParent
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_InsertTrayEntryAt. The unsafe flavor isinsertTrayEntryAt. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_InsertTrayEntryAt, defined atSDL3/SDL_tray.h 310:45
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> PtrConst CChar |
|
| -> IO () |
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.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
getTrayEntries,insertTrayEntryAt,getTrayEntryLabel
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetTrayEntryLabel. The safe flavor issetTrayEntryLabelSafe. - C declaration
SDL_SetTrayEntryLabel, defined atSDL3/SDL_tray.h 332:34
Since: 3.2.0
setTrayEntryLabelSafe Source #
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> PtrConst CChar |
|
| -> IO () |
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.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
getTrayEntries,insertTrayEntryAt,getTrayEntryLabel
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetTrayEntryLabel. The unsafe flavor issetTrayEntryLabel. - C declaration
SDL_SetTrayEntryLabel, defined atSDL3/SDL_tray.h 332:34
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO (PtrConst CChar) |
Gets the label of an entry.
If the returned value is NULL, the entry is a separator.
- 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
getTrayEntries,insertTrayEntryAt,setTrayEntryLabel
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetTrayEntryLabel. The safe flavor isgetTrayEntryLabelSafe. - C declaration
SDL_GetTrayEntryLabel, defined atSDL3/SDL_tray.h 351:42
Since: 3.2.0
getTrayEntryLabelSafe Source #
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO (PtrConst CChar) |
Gets the label of an entry.
If the returned value is NULL, the entry is a separator.
- 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
getTrayEntries,insertTrayEntryAt,setTrayEntryLabel
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetTrayEntryLabel. The unsafe flavor isgetTrayEntryLabel. - C declaration
SDL_GetTrayEntryLabel, defined atSDL3/SDL_tray.h 351:42
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> Bool |
|
| -> IO () |
Sets whether or not an entry is checked.
The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
getTrayEntries,insertTrayEntryAt,getTrayEntryChecked
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetTrayEntryChecked. The safe flavor issetTrayEntryCheckedSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetTrayEntryChecked, defined atSDL3/SDL_tray.h 370:34
Since: 3.2.0
setTrayEntryCheckedSafe Source #
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> Bool |
|
| -> IO () |
Sets whether or not an entry is checked.
The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
getTrayEntries,insertTrayEntryAt,getTrayEntryChecked
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetTrayEntryChecked. The unsafe flavor issetTrayEntryChecked. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetTrayEntryChecked, defined atSDL3/SDL_tray.h 370:34
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO Bool |
Gets whether or not an entry is checked.
The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.
- 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
getTrayEntries,insertTrayEntryAt,setTrayEntryChecked
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetTrayEntryChecked. The safe flavor isgetTrayEntryCheckedSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetTrayEntryChecked, defined atSDL3/SDL_tray.h 389:34
Since: 3.2.0
getTrayEntryCheckedSafe Source #
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO Bool |
Gets whether or not an entry is checked.
The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.
- 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
getTrayEntries,insertTrayEntryAt,setTrayEntryChecked
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetTrayEntryChecked. The unsafe flavor isgetTrayEntryChecked. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetTrayEntryChecked, defined atSDL3/SDL_tray.h 389:34
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> Bool |
|
| -> IO () |
Sets whether or not an entry is enabled.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
getTrayEntries,insertTrayEntryAt,getTrayEntryEnabled
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetTrayEntryEnabled. The safe flavor issetTrayEntryEnabledSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetTrayEntryEnabled, defined atSDL3/SDL_tray.h 406:34
Since: 3.2.0
setTrayEntryEnabledSafe Source #
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> Bool |
|
| -> IO () |
Sets whether or not an entry is enabled.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
getTrayEntries,insertTrayEntryAt,getTrayEntryEnabled
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetTrayEntryEnabled. The unsafe flavor issetTrayEntryEnabled. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_SetTrayEntryEnabled, defined atSDL3/SDL_tray.h 406:34
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO Bool |
Gets whether or not an entry is enabled.
- 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
getTrayEntries,insertTrayEntryAt,setTrayEntryEnabled
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetTrayEntryEnabled. The safe flavor isgetTrayEntryEnabledSafe. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetTrayEntryEnabled, defined atSDL3/SDL_tray.h 423:34
Since: 3.2.0
getTrayEntryEnabledSafe Source #
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO Bool |
Gets whether or not an entry is enabled.
- 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
getTrayEntries,insertTrayEntryAt,setTrayEntryEnabled
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetTrayEntryEnabled. The unsafe flavor isgetTrayEntryEnabled. - Scalars
- The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
- C declaration
SDL_GetTrayEntryEnabled, defined atSDL3/SDL_tray.h 423:34
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> SDL_TrayCallback |
|
| -> Ptr Void |
|
| -> IO () |
Sets a callback to be invoked when the entry is selected.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
getTrayEntries,insertTrayEntryAt
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetTrayEntryCallback. The safe flavor issetTrayEntryCallbackSafe: registration; fires from the event loop. - C declaration
SDL_SetTrayEntryCallback, defined atSDL3/SDL_tray.h 441:34
Since: 3.2.0
setTrayEntryCallbackSafe Source #
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> SDL_TrayCallback |
|
| -> Ptr Void |
|
| -> IO () |
Sets a callback to be invoked when the entry is selected.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
getTrayEntries,insertTrayEntryAt
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetTrayEntryCallback. The unsafe flavor issetTrayEntryCallback: registration; fires from the event loop. - C declaration
SDL_SetTrayEntryCallback, defined atSDL3/SDL_tray.h 441:34
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO () |
Simulate a click on a tray entry.
- Thread safety
- This function should be called on the thread that created the tray.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_ClickTrayEntry. The safe flavor isclickTrayEntrySafe. - C declaration
SDL_ClickTrayEntry, defined atSDL3/SDL_tray.h 453:34
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO () |
Simulate a click on a tray entry.
- Thread safety
- This function should be called on the thread that created the tray.
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_ClickTrayEntry. The unsafe flavor isclickTrayEntry. - C declaration
SDL_ClickTrayEntry, defined atSDL3/SDL_tray.h 453:34
Since: 3.2.0
Destroys a tray object.
This also destroys all associated menus and entries.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
createTray
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_DestroyTray. The safe flavor isdestroyTraySafe. - C declaration
SDL_DestroyTray, defined atSDL3/SDL_tray.h 469:34
Since: 3.2.0
Destroys a tray object.
This also destroys all associated menus and entries.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
createTray
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_DestroyTray. The unsafe flavor isdestroyTray. - C declaration
SDL_DestroyTray, defined atSDL3/SDL_tray.h 469:34
Since: 3.2.0
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO (Ptr SDL_TrayMenu) |
Gets the menu containing a certain tray entry.
- Returns
- the parent menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
insertTrayEntryAt
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetTrayEntryParent. The safe flavor isgetTrayEntryParentSafe. - C declaration
SDL_GetTrayEntryParent, defined atSDL3/SDL_tray.h 484:44
Since: 3.2.0
getTrayEntryParentSafe Source #
Arguments
| :: Ptr SDL_TrayEntry |
|
| -> IO (Ptr SDL_TrayMenu) |
Gets the menu containing a certain tray entry.
- Returns
- the parent menu.
- Thread safety
- This function should be called on the thread that created the tray.
- See also
insertTrayEntryAt
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetTrayEntryParent. The unsafe flavor isgetTrayEntryParent. - C declaration
SDL_GetTrayEntryParent, defined atSDL3/SDL_tray.h 484:44
Since: 3.2.0
getTrayMenuParentEntry Source #
Arguments
| :: Ptr SDL_TrayMenu |
|
| -> IO (Ptr SDL_TrayEntry) |
Gets the entry for which the menu is a submenu, if the current menu is a submenu.
Either this function or will return non-NULL for any given menu.getTrayMenuParentTray
- 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
createTraySubmenu,getTrayMenuParentTray
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetTrayMenuParentEntry. The safe flavor isgetTrayMenuParentEntrySafe. - C declaration
SDL_GetTrayMenuParentEntry, defined atSDL3/SDL_tray.h 504:45
Since: 3.2.0
getTrayMenuParentEntrySafe Source #
Arguments
| :: Ptr SDL_TrayMenu |
|
| -> IO (Ptr SDL_TrayEntry) |
Gets the entry for which the menu is a submenu, if the current menu is a submenu.
Either this function or will return non-NULL for any given menu.getTrayMenuParentTray
- 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
createTraySubmenu,getTrayMenuParentTray
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetTrayMenuParentEntry. The unsafe flavor isgetTrayMenuParentEntry. - C declaration
SDL_GetTrayMenuParentEntry, defined atSDL3/SDL_tray.h 504:45
Since: 3.2.0
getTrayMenuParentTray Source #
Arguments
| :: Ptr SDL_TrayMenu |
|
| -> IO (Ptr SDL_Tray) |
Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu.
Either this function or will return non-NULL for any given menu.getTrayMenuParentEntry
- 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
createTrayMenu,getTrayMenuParentEntry
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetTrayMenuParentTray. The safe flavor isgetTrayMenuParentTraySafe. - C declaration
SDL_GetTrayMenuParentTray, defined atSDL3/SDL_tray.h 524:40
Since: 3.2.0
getTrayMenuParentTraySafe Source #
Arguments
| :: Ptr SDL_TrayMenu |
|
| -> IO (Ptr SDL_Tray) |
Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu.
Either this function or will return non-NULL for any given menu.getTrayMenuParentEntry
- 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
createTrayMenu,getTrayMenuParentEntry
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetTrayMenuParentTray. The unsafe flavor isgetTrayMenuParentTray. - C declaration
SDL_GetTrayMenuParentTray, defined atSDL3/SDL_tray.h 524:40
Since: 3.2.0
updateTrays :: 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.
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_UpdateTrays. The safe flavor isupdateTraysSafe. - C declaration
SDL_UpdateTrays, defined atSDL3/SDL_tray.h 536:34
Since: 3.2.0
updateTraysSafe :: 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.
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_UpdateTrays. The unsafe flavor isupdateTrays. - C declaration
SDL_UpdateTrays, defined atSDL3/SDL_tray.h 536:34
Since: 3.2.0