mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-14 15:00:30 +02:00
Switch UI event notifications (used for soft-keyboard) from strings to enums
This commit is contained in:
1 parent
f0befda912
commit
f61baa3b51
5 files changed
+29
-22
No files matched your search
@@ -160,8 +160,8 @@ inline void System_ShareText(std::string_view text) {
|
||||
g_requestManager.MakeSystemRequest(SystemRequestType::SHARE_TEXT, NO_REQUESTER_TOKEN, nullptr, nullptr, text, "", 0);
|
||||
}
|
||||
|
||||
inline void System_NotifyUIState(std::string_view state) {
|
||||
g_requestManager.MakeSystemRequest(SystemRequestType::NOTIFY_UI_STATE, NO_REQUESTER_TOKEN, nullptr, nullptr, state, "", 0);
|
||||
inline void System_NotifyUIEvent(UIEventNotification notification) {
|
||||
g_requestManager.MakeSystemRequest(SystemRequestType::NOTIFY_UI_EVENT, NO_REQUESTER_TOKEN, nullptr, nullptr, "", "", (int64_t)notification, 0);
|
||||
}
|
||||
|
||||
inline void System_SetKeepScreenBright(bool keepScreenBright) {
|
||||
|
||||
@@ -56,6 +56,13 @@ void System_LaunchUrl(LaunchUrlType urlType, const char *url);
|
||||
// Going forward, "optional" things (PPSSPP will still function alright without it) will be requests,
|
||||
// to make implementations simpler in the default case.
|
||||
|
||||
enum class UIEventNotification {
|
||||
MENU_RETURN,
|
||||
POPUP_CLOSED,
|
||||
TEXT_GOTFOCUS,
|
||||
TEXT_LOSTFOCUS,
|
||||
};
|
||||
|
||||
enum class SystemRequestType {
|
||||
INPUT_TEXT_MODAL,
|
||||
ASK_USERNAME_PASSWORD,
|
||||
@@ -79,7 +86,7 @@ enum class SystemRequestType {
|
||||
// Note: height specified as param3, width based on param1.size() / param3.
|
||||
SEND_DEBUG_SCREENSHOT,
|
||||
|
||||
NOTIFY_UI_STATE, // Used on Android only. Not a SystemNotification since it takes a parameter.
|
||||
NOTIFY_UI_EVENT, // Used to manage events that are useful for popup virtual keyboards.
|
||||
SET_KEEP_SCREEN_BRIGHT,
|
||||
|
||||
// High-level hardware control
|
||||
|
||||
Reference in new issue
Block a user