e_client: add new APIs to access the internal value of E_Client (3rd phase) 58/314858/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 22 Jul 2024 06:18:59 +0000 (15:18 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 22 Jul 2024 07:24:24 +0000 (16:24 +0900)
Change-Id: I0a9a12d90dac036e94a07d2b68e6c1fc8a886d24

src/bin/core/e_client.c
src/include/e_client.h

index 09c985f..95b477b 100644 (file)
@@ -7494,6 +7494,44 @@ e_client_e_state_rot_angle_reserve_get(E_Client *ec)
 }
 
 E_API Eina_Bool
+e_client_e_state_rot_available_angles_set(E_Client *ec, int count, E_Client_Rotation_Angle *angles)
+{
+   int i;
+   E_Client_Rotation_Angle *new_angles;
+
+   if (!ec) return EINA_FALSE;
+
+   new_angles = E_NEW(E_Client_Rotation_Angle, count);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(new_angles, EINA_FALSE);
+
+   if (ec->e.state.rot.available_rots)
+     E_FREE(ec->e.state.rot.available_rots);
+
+   for (i = 0; i < count; i++)
+     new_angles[i] = angles[i];
+
+   ec->e.state.rot.available_rots = new_angles;
+
+   return EINA_TRUE;
+}
+
+E_API const E_Client_Rotation_Angle *
+e_client_e_state_rot_available_anlges_get(E_Client *ec)
+{
+   if (!ec) return NULL;
+   return ec->e.state.rot.available_rots;
+}
+
+E_API void
+e_client_e_state_rot_available_angles_free(E_Client *ec)
+{
+   if (!ec) return;
+   if (!ec->e.state.rot.available_rots) return;
+
+   E_FREE(ec->e.state.rot.available_rots);
+}
+
+E_API Eina_Bool
 e_client_e_state_rot_available_angle_check(E_Client *ec)
 {
    if (!ec) return EINA_FALSE;
@@ -7958,7 +7996,7 @@ e_client_netwm_type_set(E_Client *ec, E_Window_Type type)
 }
 
 E_API E_Window_Type
-e_client_netwm_type(E_Client *ec)
+e_client_netwm_type_get(E_Client *ec)
 {
    if (!ec) return E_WINDOW_TYPE_UNKNOWN;
    return ec->netwm.type;
index 213ddc8..af29ac1 100644 (file)
@@ -1257,6 +1257,9 @@ E_API void      e_client_e_state_rot_angle_prev_set(E_Client *ec, E_Client_Rotat
 E_API E_Client_Rotation_Angle e_client_e_state_rot_angle_prev_get(E_Client *ec);
 E_API void      e_client_e_state_rot_angle_reserve_set(E_Client *ec, E_Client_Rotation_Angle angle);
 E_API E_Client_Rotation_Angle e_client_e_state_rot_angle_reserve_get(E_Client *ec);
+E_API Eina_Bool e_client_e_state_rot_available_angles_set(E_Client *ec, int count, E_Client_Rotation_Angle *angles);
+E_API const E_Client_Rotation_Angle *e_client_e_state_rot_available_anlges_get(E_Client *ec);
+E_API void e_client_e_state_rot_available_angles_free(E_Client *ec);
 E_API Eina_Bool e_client_e_state_rot_available_angle_check(E_Client *ec);
 E_API Eina_Bool e_client_e_state_rot_available_angle_get(E_Client *ec,  unsigned int id, E_Client_Rotation_Angle *angle);
 E_API void      e_client_e_state_rot_available_angle_count_set(E_Client *ec, int count);
@@ -1335,7 +1338,7 @@ E_API E_Maximize e_client_maximized_get(E_Client *ec);
 E_API Eina_Bool     e_client_netwm_opacity_get(E_Client *ec, unsigned char *opacity);
 E_API pid_t         e_client_netwm_pid_get(E_Client *ec);
 E_API void          e_client_netwm_type_set(E_Client *ec, E_Window_Type type);
-E_API E_Window_Type e_client_netwm_type(E_Client *ec);
+E_API E_Window_Type e_client_netwm_type_get(E_Client *ec);
 E_API void          e_client_netwm_state_skip_pager_set(E_Client *ec, Eina_Bool set);
 E_API void          e_client_netwm_state_skip_taskbar_set(E_Client *ec, Eina_Bool set);