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

git pushed a commit to branch master
in repository entice.

View the commit online.

commit 53e0b065ea2b1561c4227974cb34b0cb9541b6cc
Author: Vincent Torri <vto...@outlook.fr>
AuthorDate: Tue Dec 5 23:46:42 2023 +0100

    winlist: initial commit, WIP
---
 data/themes/default.edc   | 66 +++++++++++++++++++++++++++++++++++++++++++++++
 src/bin/entice_controls.c | 22 ++++++++++++++++
 src/bin/entice_key.c      |  4 +++
 src/bin/entice_win.h      | 24 ++++++++++-------
 src/bin/meson.build       |  3 ++-
 5 files changed, 108 insertions(+), 11 deletions(-)

diff --git a/data/themes/default.edc b/data/themes/default.edc
index 24d9962..1e99c42 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -50,6 +50,72 @@ collections
         }
       }
 
+      // WINLIST
+      part
+      {
+        name: "entice.winlist.event";
+        type: RECT;
+        mouse_events: 1;
+        description
+        {
+          state: "default" 0.0;
+          color: 255 255 255 0;
+          fixed: 1 1;
+          visible: 1;
+          rel.to: "entice.image";
+          rel1.relative: 0.0 0.0;
+          rel2.relative: 0.05 1.0;
+        }
+      }
+      program
+      {
+        signal: "mouse,in";
+        source: "entice.winlist.event";
+        action: SIGNAL_EMIT "state,winlist,show" "entice";
+      }
+
+      part
+      {
+        name: "entice.winlist";
+        type: SWALLOW;
+        description
+        {
+          state: "default" 0.0;
+          fixed: 1 1;
+          visible: 0;
+          rel.to: "entice.image";
+          rel1.relative: -0.1 0.0;
+          rel2.relative: 0.0 1.0;
+        }
+        description
+        {
+          state: "visible" 0.0;
+          fixed: 1 1;
+          visible: 1;
+          rel.to: "entice.image";
+          rel1.relative: 0.0 0.0;
+          rel2.relative: 0.1 1.0;
+        }
+      }
+      program
+      {
+        signal: "mouse,out";
+        source: "entice.winlist";
+        action: SIGNAL_EMIT "state,winlist,hide" "entice";
+      }
+      program {
+        signal: "state,winlist,show";
+        source: "entice";
+        action: STATE_SET "visible" 0.0;
+        transition: ACCELERATE 0.5;
+        target: "entice.winlist";
+      }
+      program { signal: "state,winlist,hide"; source: "entice";
+        action: STATE_SET "default" 0.0;
+        transition: DECELERATE 1.5;
+        target: "entice.winlist";
+      }
+
 
       // Information text (when fullscreen)
       part
diff --git a/src/bin/entice_controls.c b/src/bin/entice_controls.c
index 30bd495..976ab9a 100644
--- a/src/bin/entice_controls.c
+++ b/src/bin/entice_controls.c
@@ -34,6 +34,7 @@
 #include "entice_settings.h"
 #include "entice_exif.h"
 #include "entice_win.h"
+#include "entice_winlist.h"
 #include "entice_controls.h"
 
 /*============================================================================*
@@ -376,6 +377,22 @@ _entice_ctrl_menu_ctor(Evas_Object *win)
 #undef MENU_ITEM_ADD
 }
 
+static void
+_entice_winlist_show_cb(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
+{
+   /* Inf *inf = evas_object_data_get(data, "inf"); */
+   /* if (eina_list_count(inf->file_list) <= 1) return; */
+   entice_winlist_show(data);
+}
+
+static void
+_entice_winlist_hide_cb(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED)
+{
+   /* Inf *inf = evas_object_data_get(data, "inf"); */
+   /* if (eina_list_count(inf->file_list) <= 1) return; */
+   entice_winlist_hide(data);
+}
+
 /*============================================================================*
  *                                 Global                                     *
  *============================================================================*/
@@ -391,6 +408,11 @@ entice_controls_init(Evas_Object *win)
 
     entice = evas_object_data_get(win, "entice");
 
+    elm_layout_signal_callback_add(entice->layout, "state,winlist,show", "entice",
+                                   _entice_winlist_show_cb, win);
+    elm_layout_signal_callback_add(entice->layout, "state,winlist,hide", "entice",
+                                   _entice_winlist_hide_cb, win);
+
     // initial invalid zoom so we set up ui zoom representation right
     entice->zoom = -999;
 
diff --git a/src/bin/entice_key.c b/src/bin/entice_key.c
index 4ade5d6..8db83b0 100644
--- a/src/bin/entice_key.c
+++ b/src/bin/entice_key.c
@@ -172,6 +172,10 @@ void entice_key_handle(Evas_Object *win, Evas_Event_Key_Down *ev)
                 entice->exif_shown = EINA_FALSE;
             }
         }
+        else if (!strcmp(ev->keyname, "w"))
+        {
+            elm_layout_signal_emit(entice->layout, "state,winlist,show", "entice");
+        }
     }
 
     /* Control modifier */
diff --git a/src/bin/entice_win.h b/src/bin/entice_win.h
index 1c8699c..e805048 100644
--- a/src/bin/entice_win.h
+++ b/src/bin/entice_win.h
@@ -35,6 +35,8 @@ struct Entice_List_Data
 {
     const char *path;
     unsigned long date;
+    /* winlist */
+    Elm_Object_Item *item;
 };
 
 struct Entice_Hover_Menu_Item
@@ -61,18 +63,20 @@ struct Entice
     Eina_List *image_current;
 
     /* gui */
-    Evas_Object *prev;      /* previous image */
-    Evas_Object *next;      /* next image */
-    Evas_Object *rotleft;   /* rotate left (counter clock) */
-    Evas_Object *rotright;  /* rotate right (clock) */
-    Evas_Object *zoomin;    /* zoom in */
-    Evas_Object *zoomval;   /* button for zoom value */
-    Evas_Object *zoomout;   /* zoom out */
+    Evas_Object *prev;                /* previous image */
+    Evas_Object *next;                /* next image */
+    Evas_Object *rotleft;             /* rotate left (counter clock) */
+    Evas_Object *rotright;            /* rotate right (clock) */
+    Evas_Object *zoomin;              /* zoom in */
+    Evas_Object *zoomval;             /* button for zoom value */
+    Evas_Object *zoomout;             /* zoom out */
     Evas_Object *hover_zoom;
+    Evas_Object *wl_gl;               /* winlist genlist */
+    Elm_Genlist_Item_Class *wl_gl_ic; /* winlist genlist item class */
 
-    Evas_Object *menu;      /* menu icon */
-    Evas_Object *fullscreen;/* fullscreen icon */
-    Evas_Object *close;     /* close icon */
+    Evas_Object *menu;                /* menu icon */
+    Evas_Object *fullscreen;          /* fullscreen icon */
+    Evas_Object *close;               /* close icon */
     Evas_Object *menu_menu;
     Evas_Object *hover_list;
     Evas_Object *frame_exif;
diff --git a/src/bin/meson.build b/src/bin/meson.build
index 3d80a11..311c7b3 100644
--- a/src/bin/meson.build
+++ b/src/bin/meson.build
@@ -7,7 +7,8 @@ entice_bin_src = [
   'entice_main.c',
   'entice_settings.c',
   'entice_theme.c',
-  'entice_win.c'
+  'entice_win.c',
+  'entice_winlist.c'
 ]
 
 if sys_windows == true

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

Reply via email to