@@ -52,39 +52,55 @@ typedef enum
5252typedef enum
5353{
5454 SDL_ICON_TYPE_SINGLE_FILE = 0x00000010 , /**< A single icon file. */
55- SDL_ICON_TYPE_ICON_DIRECTORY = 0x00000020 , /**< A directory containing icons in "heightxwidth.bmp" format . */
56- SDL_ICON_TYPE_SURFACE = 0x00000040 /**< Icon inside an SDL surface . */
55+ SDL_ICON_TYPE_SURFACE = 0x00000020 , /**< Icon inside an SDL surface . */
56+ SDL_ICON_TYPE_WINDOW = 0x00000040 /**< Icon is same as SDL window . */
5757} SDL_IconFlags ;
5858
59+ /**
60+ * Notification structure containing title, text, window, etc.
61+ */
5962typedef struct
6063{
61- Uint32 flags ;
62- union {
63- const char * path ;
64- SDL_Surface * surface ;
65- } icon ;
66- } SDL_Icon ;
64+ Uint32 flags ; /**< ::SDL_NotificationFlags */
65+ const char * title ; /**< UTF-8 title */
66+ const char * message ; /**< UTF-8 message text */
67+
68+ struct
69+ {
70+ Uint32 flags ; /**< ::SDL_IconFlags */
71+ union {
72+ const char * path ;
73+ SDL_Surface * surface ;
74+ SDL_Window * window ;
75+ } data ;
76+ } icon ;
77+
78+ } SDL_NotificationData ;
6779
6880/**
69- * \brief Create a simple system notification.
81+ * \brief Create a system notification.
7082 *
71- * If a window is specified it's icon will be used for the notification,
72- * and the notifcation will open that window when clicked on supported
73- * platforms. Alternatively if an icon is specified for the icon this will,
74- * be used instead.
83+ * \param notificationdata the SDL_NotificationData structure with title, text and other options
84+ * \returns 0 on success or a negative error code on failure; call
85+ * SDL_GetError() for more information.
86+ *
87+ * \sa SDL_ShowSimpleNotification
88+ * \sa SDL_NotificationData
89+ */
90+ extern DECLSPEC int SDLCALL SDL_ShowNotification (const SDL_NotificationData * notificationdata );
91+
92+ /**
93+ * \brief Create a simple system notification.
7594 *
76- * \param flags Notification/Priority Flags
7795 * \param title UTF-8 title text
7896 * \param message UTF-8 message text
79- * \param window Window to associate to the notfication.
80- * \param icon Icon (if different to window icon).
81- *
82- * \return 0 on success, -1 on error
97+ * \returns 0 on success or a negative error code on failure; call
98+ * SDL_GetError() for more information.
8399 *
84- * \sa SDL_ShowSimpleNotification
100+ * \sa SDL_ShowNotification
101+ * \sa SDL_NotificationData
85102 */
86- extern DECLSPEC int SDLCALL SDL_ShowSimpleNotification (Uint32 flags , const char * title , const char * message ,
87- SDL_Window * window , SDL_Icon * icon );
103+ extern DECLSPEC int SDLCALL SDL_ShowSimpleNotification (const char * title , const char * message );
88104
89105/* Ends C function definitions when using C++ */
90106#ifdef __cplusplus
0 commit comments