This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository exclaim.

View the commit online.

commit 0dae304551ec319322a7c527ee7f843f083a4c65
Author: Nekobit <m...@ow.nekobit.net>
AuthorDate: Fri Sep 22 19:01:27 2023 -0400

    Add a sideview popout
---
 src/main.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 55 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c
index 3c62a3f..a6ee708 100644
--- a/src/main.c
+++ b/src/main.c
@@ -4,9 +4,59 @@
 #include "etc.h"
 #include "status.h"
 
+Evas_Object* sidebar, *sidebar_root, *sidebar_content;
+
 void
 explode_win_enable(Evas_Object* win);
 
+void
+toggle_sideview()
+{
+	
+}
+
+static void
+win_move(void* data EINA_UNUSED, Evas* e EINA_UNUSED, Evas_Object* obj, void* ev_info EINA_UNUSED)
+{
+	Evas_Coord w, h;
+	evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+	evas_object_resize(sidebar_root, 300, h);
+	
+	printf("test\n");
+}
+
+void
+create_sideview(Evas_Object* parent)
+{
+	sidebar_root = E_SHOW(elm_frame_add(parent));
+	E_BEGIN(sidebar_root);
+		elm_widget_style_set(sidebar_root, "outline");
+		sidebar = E_SHOW(elm_scroller_add(parent));
+		//evas_object_resize(sidebar, 400, 400);
+		E_BEGIN(sidebar);
+			sidebar_content = E_SHOW(elm_box_add(sidebar_root));
+			//evas_object_resize(sidebar, 400, 400);
+			E_BEGIN(sidebar_content);
+				elm_object_content_set(sidebar, sidebar_content);
+			E_END(sidebar_content);
+		E_END(sidebar);
+		elm_object_content_set(sidebar_root, sidebar);
+	E_END(sidebar_root);
+	
+	evas_object_resize(sidebar_root, 300, 0);
+	evas_object_move(sidebar_root, 68, 0);
+	
+}
+
+static void
+_cb_toggle_sideview(void* data,
+                    Evas_Object* obj EINA_UNUSED,
+                    void* ev_info EINA_UNUSED)
+{
+	printf("%s\n", "test");
+	toggle_sideview();
+}
+
 Evas_Object*
 create_sidebar(Evas_Object* parent)
 {
@@ -24,9 +74,9 @@ create_sidebar(Evas_Object* parent)
 	elm_toolbar_item_priority_set(o, 0);
 	o = elm_toolbar_item_append(sb, "applications-internet", "Federated", NULL, NULL);
 	elm_toolbar_item_priority_set(o, 0);
-	o = elm_toolbar_item_append(sb, "mail-unread", "Notifications", NULL, NULL);
+	o = elm_toolbar_item_append(sb, "mail-unread", "Notifications", _cb_toggle_sideview, NULL);
 	elm_toolbar_item_priority_set(o, 1);
-	o = elm_toolbar_item_append(sb, "view-list-compact", "Lists", NULL, NULL);
+	o = elm_toolbar_item_append(sb, "view-list-compact", "Lists", _cb_toggle_sideview, NULL);
 	elm_toolbar_item_priority_set(o, -1);
 	o = elm_toolbar_item_append(sb, "mail-send", "Direct", NULL, NULL);
 	elm_toolbar_item_priority_set(o, -2);
@@ -47,6 +97,7 @@ elm_main(int argc, char** argv)
 	E_BEGIN(win);
 	elm_win_icon_name_set(win, "email-unread");
 	elm_win_autodel_set(win, EINA_TRUE);
+	evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, win_move, NULL);
 	
 	explode_win_enable(win);
 	
@@ -89,6 +140,8 @@ elm_main(int argc, char** argv)
 	E_END(root);
 	E_END(win);
 	
+	create_sideview(win);
+	
 	elm_run();
 	return EXIT_SUCCESS;
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to