From: Daehyeon Jung Date: Tue, 3 Mar 2020 03:41:25 +0000 (+0900) Subject: Add screen connector trigger focus X-Git-Tag: accepted/tizen/unified/20200309.215548~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F57%2F226457%2F2;p=platform%2Fcore%2Fappfw%2Faul-1.git Add screen connector trigger focus Change-Id: I1ad6a96d4387258f6be838d4279518565a1b7081 Signed-off-by: Daehyeon Jung --- diff --git a/include/aul_cmd.h b/include/aul_cmd.h index bf21132..aa2ced9 100755 --- a/include/aul_cmd.h +++ b/include/aul_cmd.h @@ -179,6 +179,7 @@ enum app_cmd { APP_PREPARE_APP_DEFINED_LOADER = 140, WIDGET_DISABLE = 141, + TRIGGER_APP_SCREEN_FOCUSED_FORCE = 142, APP_CMD_MAX }; diff --git a/include/aul_screen_connector.h b/include/aul_screen_connector.h index 8b5901d..ec21b87 100644 --- a/include/aul_screen_connector.h +++ b/include/aul_screen_connector.h @@ -35,6 +35,7 @@ typedef enum { AUL_SCREEN_CONNECTOR_EVENT_TYPE_ADD, AUL_SCREEN_CONNECTOR_EVENT_TYPE_REMOVE, AUL_SCREEN_CONNECTOR_EVENT_TYPE_UPDATE, + AUL_SCREEN_CONNECTOR_EVENT_TYPE_FOCUS, } aul_screen_connector_event_type_e; typedef enum { @@ -97,6 +98,11 @@ int aul_screen_connector_get_instance_id_by_surface_id(unsigned int surface_id, int aul_screen_connector_update_screen_viewer_status(aul_screen_status_e status, unsigned int provider_surf); +/* + * This API is only for Appfw internally. + */ +int aul_screen_connector_trigger_focused_force(); + #ifdef __cplusplus } #endif diff --git a/src/aul_cmd.c b/src/aul_cmd.c index cacf378..5058515 100755 --- a/src/aul_cmd.c +++ b/src/aul_cmd.c @@ -308,6 +308,8 @@ API const char *aul_cmd_convert_to_string(int cmd) return "APP_PREPARE_APP_DEFINED_LOADER"; case WIDGET_DISABLE: return "WIDGET_DISABLE"; + case TRIGGER_APP_SCREEN_FOCUSED_FORCE: + return "TRIGGER_APP_SCREEN_FOCUSED_FORCE"; default: return "CUSTOM_COMMAND"; } diff --git a/src/aul_screen_connector.c b/src/aul_screen_connector.c index 1922427..95cd32c 100644 --- a/src/aul_screen_connector.c +++ b/src/aul_screen_connector.c @@ -161,6 +161,8 @@ static int __app_screen_event_cb(const char *endpoint, aul_app_com_result_e res, event_type = AUL_SCREEN_CONNECTOR_EVENT_TYPE_REMOVE; } else if (strcmp(event, "update_screen") == 0) { event_type = AUL_SCREEN_CONNECTOR_EVENT_TYPE_UPDATE; + } else if (strcmp(event, "focus_screen") == 0) { + event_type = AUL_SCREEN_CONNECTOR_EVENT_TYPE_FOCUS; } else { _E("Unknown event type(%s)", event); return -1; @@ -557,3 +559,13 @@ API int aul_screen_connector_update_screen_viewer_status( return ret; } + +API int aul_screen_connector_trigger_focused_force() { + int ret; + + ret = aul_sock_send_raw(AUL_UTIL_PID, getuid(), + TRIGGER_APP_SCREEN_FOCUSED_FORCE, NULL, 0, AUL_SOCK_NOREPLY); + + return ret; +} +