From: jinbong.lee Date: Sat, 31 Aug 2024 12:18:34 +0000 (+0900) Subject: Add internal interface of e_comp X-Git-Tag: accepted/tizen/unified/x/20240905.123135~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F15%2F317015%2F1;p=platform%2Fupstream%2Fenlightenment.git Add internal interface of e_comp - for preventing accssing to e_comp as global variable. Change-Id: If83e622ead610d9f6da2d1d3d28ae5bc4e190b44 --- diff --git a/src/bin/compmgr/e_comp.c b/src/bin/compmgr/e_comp.c index 7534aca..093558a 100644 --- a/src/bin/compmgr/e_comp.c +++ b/src/bin/compmgr/e_comp.c @@ -456,6 +456,14 @@ e_comp_client_render_list_add(E_Client *ec) e_object_ref(E_OBJECT(ec)); } +EINTERN Eina_List * +e_comp_client_render_list_get(void) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL); + + return e_comp->render_list; +} + E_API E_Comp_Config * e_comp_config_get(void) { @@ -943,6 +951,12 @@ e_comp_launchscrn_ec_find_by_pid(pid_t pid) } EINTERN void +e_comp_launchscrn_ec_add(E_Client *ec) +{ + e_comp->launchscrns = eina_list_append(e_comp->launchscrns, ec); +} + +EINTERN void e_comp_launchscrn_ec_remove(E_Client *ec) { e_comp->launchscrns = eina_list_remove(e_comp->launchscrns, ec); @@ -1280,6 +1294,69 @@ e_comp_socket_init(const char *name) return EINA_TRUE; } +/* get the hwc is configured */ +EINTERN Eina_Bool +e_comp_hwc_is_configured(void) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE); + + return e_comp->hwc; +} + +/* get the hwc_send_redraw_request value */ +EINTERN Eina_Bool +e_comp_hwc_send_redraw_request(void) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE); + + return e_comp->hwc_send_redraw_request; +} + +/* get the hwc_prefer_gbm value */ +EINTERN Eina_Bool +e_comp_hwc_is_prefer_gbm(void) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE); + + return e_comp->hwc_prefer_gbm; +} + +/* get the hwc_ignore_primary value */ +EINTERN Eina_Bool +e_comp_hwc_ignore_primary(void) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE); + + return e_comp->hwc_ignore_primary; +} + +/* get the hwc_use_detach value */ +EINTERN Eina_Bool +e_comp_hwc_use_detach(void) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE); + + return e_comp->hwc_use_detach; +} + +/* get the hwc_reuse_cursor_buffer value */ +EINTERN Eina_Bool +e_comp_hwc_reuse_cursor_buffer(void) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE); + + return e_comp->hwc_reuse_cursor_buffer; +} + +/* get the hwc_sync_mode_change value */ +EINTERN Eina_Bool +e_comp_hwc_sync_mode_change(void) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE); + + return e_comp->hwc_sync_mode_change; +} + /* set the deactive value to the only primary output */ EINTERN void e_comp_hwc_deactive_set(Eina_Bool set) diff --git a/src/bin/compmgr/e_comp_intern.h b/src/bin/compmgr/e_comp_intern.h index 9394a6d..908e674 100644 --- a/src/bin/compmgr/e_comp_intern.h +++ b/src/bin/compmgr/e_comp_intern.h @@ -31,6 +31,7 @@ EINTERN Eina_Bool e_comp_util_kbd_grabbed(void); EINTERN Eina_Bool e_comp_util_mouse_grabbed(void); EINTERN void e_comp_client_render_list_add(E_Client *ec); +EINTERN Eina_List *e_comp_client_render_list_get(void); EINTERN void e_comp_post_update_add(E_Client *ec); EINTERN void e_comp_post_update_purge(E_Client *ec); @@ -40,6 +41,14 @@ EINTERN E_Zone *e_comp_zone_find(const char *output_id); EINTERN Eina_Bool e_comp_socket_init(const char *name); +EINTERN Eina_Bool e_comp_hwc_is_configured(void); +EINTERN Eina_Bool e_comp_hwc_send_redraw_request(void); +EINTERN Eina_Bool e_comp_hwc_is_prefer_gbm(void); +EINTERN Eina_Bool e_comp_hwc_ignore_primary(void); +EINTERN Eina_Bool e_comp_hwc_use_detach(void); +EINTERN Eina_Bool e_comp_hwc_reuse_cursor_buffer(void); +EINTERN Eina_Bool e_comp_hwc_sync_mode_change(void); + EINTERN void e_comp_hwc_deactive_set(Eina_Bool set); EINTERN Eina_Bool e_comp_hwc_deactive_get(void); EINTERN void e_comp_hwc_multi_plane_set(Eina_Bool set); @@ -62,5 +71,6 @@ EINTERN Eina_Bool e_comp_conf_hwc_deactive_get(void); EINTERN E_Client *e_comp_launchscrn_ec_find_by_pid(pid_t pid); EINTERN void e_comp_launchscrn_ec_remove(E_Client *ec); +EINTERN void e_comp_launchscrn_ec_add(E_Client *ec); #endif