e_plane: added role to plane 98/96498/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 8 Nov 2016 04:38:58 +0000 (13:38 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 17 Nov 2016 00:34:05 +0000 (16:34 -0800)
role of e_plane means that current plane is used for what purpose.

Change-Id: I2c1999f509c29c0c236f0364cf795995603ac020

src/bin/e_plane.c
src/bin/e_plane.h

index eb6e8a11dd4885a29defc2ecf540b6efe7a2727b..86cfc167136765402957e7e50b00d8dc7c745e39 100644 (file)
@@ -983,6 +983,24 @@ e_plane_type_set(E_Plane *plane, E_Plane_Type type)
    return EINA_TRUE;
 }
 
+E_API Eina_Bool
+e_plane_role_set(E_Plane *plane, E_Plane_Role role)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(plane, EINA_FALSE);
+
+   plane->role = role;
+
+   return EINA_TRUE;
+}
+
+E_API E_Plane_Role
+e_plane_role_get(E_Plane *plane)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(plane, E_PLANE_ROLE_NONE);
+
+   return plane->role;
+}
+
 E_API E_Plane_Type
 e_plane_type_get(E_Plane *plane)
 {
index 0e74fe0476a7d13a973ecdd567ead0993f196825..aff3045ed51b43c06a21e047d2e92be401833f61 100644 (file)
@@ -8,6 +8,14 @@ typedef enum _E_Plane_Type
    E_PLANE_TYPE_CURSOR
 } E_Plane_Type;
 
+typedef enum _E_Plane_Role
+{
+   E_PLANE_ROLE_NONE,
+   E_PLANE_ROLE_VIDEO,
+   E_PLANE_ROLE_OVERLAY,
+   E_PLANE_ROLE_CURSOR
+} E_Plane_Role;
+
 typedef enum _E_Plane_Color
 {
    E_PLANE_COLOR_INVALID,
@@ -62,6 +70,8 @@ struct _E_Plane
     * false when E_Event_Plane_Win_Change has been generated.
     */
    Eina_Bool             need_ev;
+
+   E_Plane_Role          role;
 };
 
 struct _E_Plane_Commit_Data {
@@ -95,6 +105,8 @@ EINTERN Eina_Bool            e_plane_render(E_Plane *plane);
 
 E_API Eina_Bool              e_plane_type_set(E_Plane *plane, E_Plane_Type type);
 E_API E_Plane_Type           e_plane_type_get(E_Plane *plane);
+E_API Eina_Bool              e_plane_role_set(E_Plane *plane, E_Plane_Role role);
+E_API E_Plane_Role           e_plane_role_get(E_Plane *plane);
 E_API E_Client              *e_plane_ec_get(E_Plane *plane);
 E_API Eina_Bool              e_plane_ec_set(E_Plane *plane, E_Client *ec);
 E_API E_Client              *e_plane_ec_prepare_get(E_Plane *plane);