//Pascal &or the FreePascal use of nintendo 2ds, 3ds regime // // Copyright (c) 2013, 2015, 2017 Kenneth Dwayne Lee Bsc. // all rights reserved // Type NotificationHeader = record dataSet : boolean; unread : boolean; enableJPEG : boolean; isSpotPass : boolean; isOptedOut : boolean; unkData : array[0..2] of u8; processID : u64; unkData2 : array[0..7] of u8; jumpParam : u64; unkData3 : array[0..7] of u8; time : u64; title : array[0..31] of u16; end; PNotificationHeader = ^NotificationHeader; {/ Initializes NEWS. } function newsInit:s32;cdecl;external; {/ Exits NEWS. } procedure newsExit;cdecl;external; {* * @brief Adds a notification to the home menu Notifications applet. * @param title UTF-16 title of the notification. * @param titleLength Number of characters in the title, not including the null-terminator. * @param message UTF-16 message of the notification, or NULL for no message. * @param messageLength Number of characters in the message, not including the null-terminator. * @param image Data of the image to show in the notification, or NULL for no image. * @param imageSize Size of the image data in bytes. * @param jpeg Whether the image is a JPEG or not. } function NEWS_AddNotification(title:Pu16; titleLength:u32; message:Pu16; messageLength:u32; imageData:pointer; imageSize:u32; jpeg:boolean):s32;cdecl;external; {* * @brief Gets current total notifications number. * @param num Pointer where total number will be saved. } function NEWS_GetTotalNotifications(num:Pu32):s32;cdecl;external; {* * @brief Sets a custom header for a specific notification. * @param news_id Identification number of the notification. * @param header Pointer to notification header to set. } (* Const before type ignored *) function NEWS_SetNotificationHeader(news_id:u32; header:PNotificationHeader):s32;cdecl;external; {* * @brief Gets the header of a specific notification. * @param news_id Identification number of the notification. * @param header Pointer where header of the notification will be saved. } function NEWS_GetNotificationHeader(news_id:u32; header:PNotificationHeader):s32;cdecl;external; {* * @brief Sets a custom message for a specific notification. * @param news_id Identification number of the notification. * @param message Pointer to UTF-16 message to set. * @param size Size of message to set. } (* Const before type ignored *) function NEWS_SetNotificationMessage(news_id:u32; message:Pu16; size:u32):s32;cdecl;external; {* * @brief Gets the message of a specific notification. * @param news_id Identification number of the notification. * @param message Pointer where UTF-16 message of the notification will be saved. * @param size Pointer where size of the message data will be saved in bytes. } function NEWS_GetNotificationMessage(news_id:u32; message:Pu16; size:Pu32):s32;cdecl;external; {* * @brief Sets a custom image for a specific notification. * @param news_id Identification number of the notification. * @param buffer Pointer to MPO image to set. * @param size Size of the MPO image to set. } (* Const before type ignored *) function NEWS_SetNotificationImage(news_id:u32; buffer:pointer; size:u32):s32;cdecl;external; {* * @brief Gets the image of a specific notification. * @param news_id Identification number of the notification. * @param buffer Pointer where MPO image of the notification will be saved. * @param size Pointer where size of the image data will be saved in bytes. } function NEWS_GetNotificationImage(news_id:u32; buffer:pointer; size:Pu32):s32;cdecl;external;