libctru
v2.4.1
|
NEWS (Notification) service. More...
Go to the source code of this file.
Data Structures | |
struct | NotificationHeader |
Notification header data. More... | |
Functions | |
Result | newsInit (void) |
Initializes NEWS. | |
void | newsExit (void) |
Exits NEWS. | |
Result | NEWS_AddNotification (const u16 *title, u32 titleLength, const u16 *message, u32 messageLength, const void *imageData, u32 imageSize, bool jpeg) |
Adds a notification to the home menu Notifications applet. More... | |
Result | NEWS_GetTotalNotifications (u32 *num) |
Gets current total notifications number. More... | |
Result | NEWS_SetNotificationHeader (u32 news_id, const NotificationHeader *header) |
Sets a custom header for a specific notification. More... | |
Result | NEWS_GetNotificationHeader (u32 news_id, NotificationHeader *header) |
Gets the header of a specific notification. More... | |
Result | NEWS_SetNotificationMessage (u32 news_id, const u16 *message, u32 size) |
Sets a custom message for a specific notification. More... | |
Result | NEWS_GetNotificationMessage (u32 news_id, u16 *message, u32 *size) |
Gets the message of a specific notification. More... | |
Result | NEWS_SetNotificationImage (u32 news_id, const void *buffer, u32 size) |
Sets a custom image for a specific notification. More... | |
Result | NEWS_GetNotificationImage (u32 news_id, void *buffer, u32 *size) |
Gets the image of a specific notification. More... | |
NEWS (Notification) service.
Result NEWS_AddNotification | ( | const u16 * | title, |
u32 | titleLength, | ||
const u16 * | message, | ||
u32 | messageLength, | ||
const void * | imageData, | ||
u32 | imageSize, | ||
bool | jpeg | ||
) |
Adds a notification to the home menu Notifications applet.
title | UTF-16 title of the notification. |
titleLength | Number of characters in the title, not including the null-terminator. |
message | UTF-16 message of the notification, or NULL for no message. |
messageLength | Number of characters in the message, not including the null-terminator. |
image | Data of the image to show in the notification, or NULL for no image. |
imageSize | Size of the image data in bytes. |
jpeg | Whether the image is a JPEG or not. |
Result NEWS_GetNotificationHeader | ( | u32 | news_id, |
NotificationHeader * | header | ||
) |
Gets the header of a specific notification.
news_id | Identification number of the notification. |
header | Pointer where header of the notification will be saved. |
Gets the image of a specific notification.
news_id | Identification number of the notification. |
buffer | Pointer where MPO image of the notification will be saved. |
size | Pointer where size of the image data will be saved in bytes. |
Gets the message of a specific notification.
news_id | Identification number of the notification. |
message | Pointer where UTF-16 message of the notification will be saved. |
size | Pointer where size of the message data will be saved in bytes. |
Gets current total notifications number.
num | Pointer where total number will be saved. |
Result NEWS_SetNotificationHeader | ( | u32 | news_id, |
const NotificationHeader * | header | ||
) |
Sets a custom header for a specific notification.
news_id | Identification number of the notification. |
header | Pointer to notification header to set. |
Sets a custom image for a specific notification.
news_id | Identification number of the notification. |
buffer | Pointer to MPO image to set. |
size | Size of the MPO image to set. |