mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
Renamed AppletNotificationMessage to AppletMessage. Updated docs.
This commit is contained in:
parent
eeaa63aa28
commit
112da06f37
@ -36,29 +36,29 @@ typedef enum {
|
|||||||
|
|
||||||
/// applet hook types.
|
/// applet hook types.
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AppletHookType_OnFocusState = 0, ///< ::AppletNotificationMessage_FocusStateChanged
|
AppletHookType_OnFocusState = 0, ///< ::AppletMessage_FocusStateChanged
|
||||||
AppletHookType_OnOperationMode, ///< ::AppletNotificationMessage_OperationModeChanged
|
AppletHookType_OnOperationMode, ///< ::AppletMessage_OperationModeChanged
|
||||||
AppletHookType_OnPerformanceMode, ///< ::AppletNotificationMessage_PerformanceModeChanged
|
AppletHookType_OnPerformanceMode, ///< ::AppletMessage_PerformanceModeChanged
|
||||||
AppletHookType_OnExitRequest, ///< ::AppletNotificationMessage_ExitRequested
|
AppletHookType_OnExitRequest, ///< ::AppletMessage_ExitRequested
|
||||||
AppletHookType_OnRestart, ///< ::AppletNotificationMessage_Restart
|
AppletHookType_OnRestart, ///< ::AppletMessage_Restart
|
||||||
AppletHookType_OnCaptureButtonShortPressed, ///< ::AppletNotificationMessage_CaptureButtonShortPressed
|
AppletHookType_OnCaptureButtonShortPressed, ///< ::AppletMessage_CaptureButtonShortPressed
|
||||||
AppletHookType_OnAlbumImageTaken, ///< ::AppletNotificationMessage_AlbumImageTaken
|
AppletHookType_OnAlbumImageTaken, ///< ::AppletMessage_AlbumImageTaken
|
||||||
AppletHookType_RequestToDisplay, ///< ::AppletNotificationMessage_RequestToDisplay
|
AppletHookType_RequestToDisplay, ///< ::AppletMessage_RequestToDisplay
|
||||||
|
|
||||||
AppletHookType_Max, ///< Number of applet hook types.
|
AppletHookType_Max, ///< Number of applet hook types.
|
||||||
} AppletHookType;
|
} AppletHookType;
|
||||||
|
|
||||||
/// NotificationMessage, for \ref appletGetMessage. See also \ref AppletHookType.
|
/// AppletMessage, for \ref appletGetMessage. See also \ref AppletHookType.
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AppletNotificationMessage_ExitRequested = 0x4, ///< Exit requested.
|
AppletMessage_ExitRequested = 0x4, ///< Exit requested.
|
||||||
AppletNotificationMessage_FocusStateChanged = 0xF, ///< FocusState changed.
|
AppletMessage_FocusStateChanged = 0xF, ///< FocusState changed.
|
||||||
AppletNotificationMessage_Restart = 0x10, ///< Current applet execution was resumed.
|
AppletMessage_Restart = 0x10, ///< Current applet execution was resumed.
|
||||||
AppletNotificationMessage_OperationModeChanged = 0x1E, ///< OperationMode changed.
|
AppletMessage_OperationModeChanged = 0x1E, ///< OperationMode changed.
|
||||||
AppletNotificationMessage_PerformanceModeChanged = 0x1F, ///< PerformanceMode changed.
|
AppletMessage_PerformanceModeChanged = 0x1F, ///< PerformanceMode changed.
|
||||||
AppletNotificationMessage_RequestToDisplay = 0x33, ///< Display requested, see \ref appletApproveToDisplay.
|
AppletMessage_RequestToDisplay = 0x33, ///< Display requested, see \ref appletApproveToDisplay.
|
||||||
AppletNotificationMessage_CaptureButtonShortPressed = 0x5A, ///< Capture button was short-pressed.
|
AppletMessage_CaptureButtonShortPressed = 0x5A, ///< Capture button was short-pressed.
|
||||||
AppletNotificationMessage_AlbumImageTaken = 0x5C, ///< Screenshot was taken.
|
AppletMessage_AlbumImageTaken = 0x5C, ///< Screenshot was taken.
|
||||||
} AppletNotificationMessage;
|
} AppletMessage;
|
||||||
|
|
||||||
/// FocusState
|
/// FocusState
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -489,7 +489,7 @@ Result appletLeaveFatalSection(void);
|
|||||||
Result appletSetScreenShotPermission(AppletScreenShotPermission permission);
|
Result appletSetScreenShotPermission(AppletScreenShotPermission permission);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets whether ::AppletNotificationMessage_Restart is enabled.
|
* @brief Sets whether ::AppletMessage_Restart is enabled.
|
||||||
* @param[in] flag Whether to enable the notification.
|
* @param[in] flag Whether to enable the notification.
|
||||||
*/
|
*/
|
||||||
Result appletSetRestartMessageEnabled(bool flag);
|
Result appletSetRestartMessageEnabled(bool flag);
|
||||||
@ -509,7 +509,7 @@ Result appletSetScreenShotAppletIdentityInfo(AppletIdentityInfo *info);
|
|||||||
Result appletSetControllerFirmwareUpdateSection(bool flag);
|
Result appletSetControllerFirmwareUpdateSection(bool flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets whether ::AppletNotificationMessage_CaptureButtonShortPressed is enabled.
|
* @brief Sets whether ::AppletMessage_CaptureButtonShortPressed is enabled.
|
||||||
* @note Only available with [3.0.0+].
|
* @note Only available with [3.0.0+].
|
||||||
* @note When enabled with a non-Overlay applet, Overlay applet will not be notified of capture button short-presses for screenshots.
|
* @note When enabled with a non-Overlay applet, Overlay applet will not be notified of capture button short-presses for screenshots.
|
||||||
* @param[in] flag Whether to enable the notification.
|
* @param[in] flag Whether to enable the notification.
|
||||||
@ -554,14 +554,14 @@ Result appletGetSystemSharedLayerHandle(u64 *SharedBufferHandle, u64 *SharedLaye
|
|||||||
Result appletGetSystemSharedBufferHandle(u64 *SharedBufferHandle);
|
Result appletGetSystemSharedBufferHandle(u64 *SharedBufferHandle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets whether ::AppletNotificationMessage_RequestToDisplay is enabled.
|
* @brief Sets whether ::AppletMessage_RequestToDisplay is enabled.
|
||||||
* @note Sets an internal state flag. When the input flag is 0, this will in additional run the same code as \ref appletApproveToDisplay.
|
* @note Sets an internal state flag. When the input flag is 0, this will in additional run the same code as \ref appletApproveToDisplay.
|
||||||
* @param[in] flag Flag
|
* @param[in] flag Flag
|
||||||
*/
|
*/
|
||||||
Result appletSetHandlesRequestToDisplay(bool flag);
|
Result appletSetHandlesRequestToDisplay(bool flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Approve the display requested by ::AppletNotificationMessage_RequestToDisplay, see also \ref appletSetHandlesRequestToDisplay.
|
* @brief Approve the display requested by ::AppletMessage_RequestToDisplay, see also \ref appletSetHandlesRequestToDisplay.
|
||||||
*/
|
*/
|
||||||
Result appletApproveToDisplay(void);
|
Result appletApproveToDisplay(void);
|
||||||
|
|
||||||
@ -642,7 +642,7 @@ Result appletGetCurrentIlluminanceEx(bool *bOverLimit, float *fLux);
|
|||||||
Result appletSetWirelessPriorityMode(AppletWirelessPriorityMode mode);
|
Result appletSetWirelessPriorityMode(AppletWirelessPriorityMode mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets whether ::AppletNotificationMessage_AlbumImageTaken is enabled.
|
* @brief Sets whether ::AppletMessage_AlbumImageTaken is enabled.
|
||||||
* @note Only available with [7.0.0+].
|
* @note Only available with [7.0.0+].
|
||||||
* @param[in] flag Whether to enable the notification.
|
* @param[in] flag Whether to enable the notification.
|
||||||
*/
|
*/
|
||||||
@ -1696,7 +1696,7 @@ Result appletGetHomeButtonDoubleClickEnabled(bool *out);
|
|||||||
AppletInfo *appletGetAppletInfo(void);
|
AppletInfo *appletGetAppletInfo(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets a notification message.
|
* @brief Gets a notification message, see \ref AppletMessage.
|
||||||
*/
|
*/
|
||||||
Result appletGetMessage(u32 *msg);
|
Result appletGetMessage(u32 *msg);
|
||||||
|
|
||||||
|
@ -4808,12 +4808,12 @@ bool appletProcessMessage(u32 msg) {
|
|||||||
Result rc;
|
Result rc;
|
||||||
|
|
||||||
switch(msg) {
|
switch(msg) {
|
||||||
case AppletNotificationMessage_ExitRequested:
|
case AppletMessage_ExitRequested:
|
||||||
appletCallHook(AppletHookType_OnExitRequest);
|
appletCallHook(AppletHookType_OnExitRequest);
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AppletNotificationMessage_FocusStateChanged:
|
case AppletMessage_FocusStateChanged:
|
||||||
rc = _appletGetCurrentFocusState(&g_appletFocusState);
|
rc = _appletGetCurrentFocusState(&g_appletFocusState);
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalSimple(MAKERESULT(Module_Libnx, LibnxError_BadAppletGetCurrentFocusState));
|
fatalSimple(MAKERESULT(Module_Libnx, LibnxError_BadAppletGetCurrentFocusState));
|
||||||
@ -4821,11 +4821,11 @@ bool appletProcessMessage(u32 msg) {
|
|||||||
appletCallHook(AppletHookType_OnFocusState);
|
appletCallHook(AppletHookType_OnFocusState);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AppletNotificationMessage_Restart:
|
case AppletMessage_Restart:
|
||||||
appletCallHook(AppletHookType_OnRestart);
|
appletCallHook(AppletHookType_OnRestart);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AppletNotificationMessage_OperationModeChanged:
|
case AppletMessage_OperationModeChanged:
|
||||||
rc = _appletGetOperationMode(&g_appletOperationMode);
|
rc = _appletGetOperationMode(&g_appletOperationMode);
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalSimple(MAKERESULT(Module_Libnx, LibnxError_BadAppletGetOperationMode));
|
fatalSimple(MAKERESULT(Module_Libnx, LibnxError_BadAppletGetOperationMode));
|
||||||
@ -4833,7 +4833,7 @@ bool appletProcessMessage(u32 msg) {
|
|||||||
appletCallHook(AppletHookType_OnOperationMode);
|
appletCallHook(AppletHookType_OnOperationMode);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AppletNotificationMessage_PerformanceModeChanged:
|
case AppletMessage_PerformanceModeChanged:
|
||||||
rc = _appletGetPerformanceMode(&g_appletPerformanceMode);
|
rc = _appletGetPerformanceMode(&g_appletPerformanceMode);
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalSimple(MAKERESULT(Module_Libnx, LibnxError_BadAppletGetPerformanceMode));
|
fatalSimple(MAKERESULT(Module_Libnx, LibnxError_BadAppletGetPerformanceMode));
|
||||||
@ -4841,15 +4841,15 @@ bool appletProcessMessage(u32 msg) {
|
|||||||
appletCallHook(AppletHookType_OnPerformanceMode);
|
appletCallHook(AppletHookType_OnPerformanceMode);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AppletNotificationMessage_RequestToDisplay:
|
case AppletMessage_RequestToDisplay:
|
||||||
appletCallHook(AppletHookType_RequestToDisplay);
|
appletCallHook(AppletHookType_RequestToDisplay);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AppletNotificationMessage_CaptureButtonShortPressed:
|
case AppletMessage_CaptureButtonShortPressed:
|
||||||
appletCallHook(AppletHookType_OnCaptureButtonShortPressed);
|
appletCallHook(AppletHookType_OnCaptureButtonShortPressed);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AppletNotificationMessage_AlbumImageTaken:
|
case AppletMessage_AlbumImageTaken:
|
||||||
appletCallHook(AppletHookType_OnAlbumImageTaken);
|
appletCallHook(AppletHookType_OnAlbumImageTaken);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user