Added appletRequestToGetForeground, appletLockForeground, appletUnlockForeground, appletPopFromGeneralChannel, and appletGetPopFromGeneralChannelEvent.

This commit is contained in:
yellows8 2019-08-07 19:57:03 -04:00
parent 9049a12209
commit 3bbc181531
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 68 additions and 0 deletions

View File

@ -1221,6 +1221,39 @@ Result appletGetGpuErrorDetectedSystemEvent(Event *out_event);
// IHomeMenuFunctions
/**
* @brief RequestToGetForeground
* @note Only available with AppletType_SystemApplet.
*/
Result appletRequestToGetForeground(void);
/**
* @brief LockForeground
* @note Only available with AppletType_SystemApplet.
*/
Result appletLockForeground(void);
/**
* @brief UnlockForeground
* @note Only available with AppletType_SystemApplet.
*/
Result appletUnlockForeground(void);
/**
* @brief Pops a storage from the general channel.
* @note Only available with AppletType_SystemApplet.
* @param[out] s Storage object.
*/
Result appletPopFromGeneralChannel(AppletStorage *s);
/**
* @brief Gets an Event which is signaled when a new storage is available with \ref appletPopFromGeneralChannel.
* @note Only available with AppletType_SystemApplet.
* @note The Event must be closed by the user once finished with it.
* @param[out] out_event Output Event with autoclear=false.
*/
Result appletGetPopFromGeneralChannelEvent(Event *out_event);
/**
* @brief Gets a \ref AppletLockAccessor for HomeButtonWriter.
* @note Only available with AppletType_SystemApplet.

View File

@ -3932,6 +3932,41 @@ Result appletGetGpuErrorDetectedSystemEvent(Event *out_event) {
// IHomeMenuFunctions
Result appletRequestToGetForeground(void) {
if (__nx_applet_type != AppletType_SystemApplet)
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
return _appletCmdNoIO(&g_appletIFunctions, 10);
}
Result appletLockForeground(void) {
if (__nx_applet_type != AppletType_SystemApplet)
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
return _appletCmdNoIO(&g_appletIFunctions, 11);
}
Result appletUnlockForeground(void) {
if (__nx_applet_type != AppletType_SystemApplet)
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
return _appletCmdNoIO(&g_appletIFunctions, 12);
}
Result appletPopFromGeneralChannel(AppletStorage *s) {
if (__nx_applet_type != AppletType_SystemApplet)
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
return _appletCmdNoInOutStorage(&g_appletIFunctions, s, 20);
}
Result appletGetPopFromGeneralChannelEvent(Event *out_event) {
if (__nx_applet_type != AppletType_SystemApplet)
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
return _appletGetEvent(&g_appletIFunctions, out_event, 21, false);
}
Result appletGetHomeButtonWriterLockAccessor(AppletLockAccessor *a) {
if (__nx_applet_type != AppletType_SystemApplet)
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);