e_policy_container: Introduce policy_container 62/322662/1
authorJunseok Kim <juns.kim@samsung.com>
Wed, 26 Mar 2025 04:38:40 +0000 (13:38 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 14 Apr 2025 06:48:50 +0000 (15:48 +0900)
Change-Id: I9b4ee63ebc3095974505645301a108488e97ebad

src/bin/Makefile.mk
src/bin/windowmgr/e_policy_container.c [new file with mode: 0644]
src/bin/windowmgr/e_policy_container_intern.h [new file with mode: 0644]

index edac208ec31f08766bdc2a6ef2dcf3e2b34392e6..81404a600937af5b10e44dfe61819668734d98b8 100644 (file)
@@ -221,6 +221,7 @@ src/bin/windowmgr/services/e_service_softkey.c \
 src/bin/windowmgr/services/e_service_taskbar.c \
 src/bin/windowmgr/services/e_service_kvm.c \
 src/bin/windowmgr/e_policy.c \
+src/bin/windowmgr/e_policy_container.c \
 src/bin/windowmgr/e_policy_zone.c \
 src/bin/windowmgr/e_policy_desk.c \
 src/bin/windowmgr/e_policy_desk_area.c \
diff --git a/src/bin/windowmgr/e_policy_container.c b/src/bin/windowmgr/e_policy_container.c
new file mode 100644 (file)
index 0000000..9b39f9d
--- /dev/null
@@ -0,0 +1,48 @@
+#include "e_policy_container_intern.h"
+#include "e_comp_canvas_intern.h"
+#include "e_canvas_intern.h"
+
+EINTERN E_View_Tree *
+e_policy_container_view_tree_get(E_Policy_Container *container)
+{
+   if (!container) return NULL;
+
+   return &container->tree;
+}
+
+EINTERN void
+e_policy_container_view_tree_shutdown(E_Policy_Container *container)
+{
+   if (!container) return;
+
+   // need to something... what?
+   e_view_hide(&container->tree.view);
+
+   return;
+}
+
+EINTERN Eina_Bool
+e_policy_container_view_tree_init(E_Policy_Container *container, E_View_Tree_Impl *container_tree_impl, E_Policy_Container *parent_container)
+{
+   E_Canvas *canvas;
+   E_View_Tree *parent_tree = NULL;
+
+   if (!container) return EINA_FALSE;
+
+   if (parent_container)
+     {
+        parent_tree = &parent_container->tree;
+     }
+   else
+     {
+        canvas = e_comp_canvas_get();
+        parent_tree = e_canvas_root_view_tree_get(canvas);
+     }
+   if (!parent_tree) return EINA_FALSE;
+
+   e_view_tree_init(&container->tree, container_tree_impl, parent_tree);
+   e_view_show(&container->tree.view);
+   e_view_reorderable_set(&container->tree.view, false);
+
+   return EINA_TRUE;
+}
\ No newline at end of file
diff --git a/src/bin/windowmgr/e_policy_container_intern.h b/src/bin/windowmgr/e_policy_container_intern.h
new file mode 100644 (file)
index 0000000..c46cef3
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef E_POLICY_CONTAINER_INTERN_H
+#define E_POLICY_CONTAINER_INTERN_H
+
+#include "e_intern.h"
+#include "e_view_intern.h"
+
+
+typedef struct _E_Policy_Container E_Policy_Container;
+
+struct _E_Policy_Container
+{
+   E_View_Tree tree;
+};
+
+#define E_POLICY_CONTAINER_INIT(XX) \
+static inline E_Policy_Container * \
+e_policy_container_get(XX *container_impl) \
+{ \
+   return &container_impl->container; \
+} \
+static inline XX * \
+e_policy_container_impl_get(E_Policy_Container *container) \
+{ \
+   return (XX *) container; \
+}
+
+EINTERN inline E_Policy_Container *
+e_policy_container_general_get(void *container_impl)
+{
+   return (E_Policy_Container *) container_impl;
+}
+
+EINTERN E_View_Tree *e_policy_container_view_tree_get(E_Policy_Container *container);
+EINTERN void      e_policy_container_view_tree_shutdown(E_Policy_Container *container);
+EINTERN Eina_Bool e_policy_container_view_tree_init(E_Policy_Container *container, E_View_Tree_Impl *container_tree_impl, E_Policy_Container *parent_container);
+
+#endif // E_POLICY_CONTAINER_INTERN_H