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

git pushed a commit to branch master
in repository efm2.

View the commit online.

commit 09f93c64210e6e1e6d1eb2597b840310b215d82a
Author: Carsten Haitzler (Rasterman) <[email protected]>
AuthorDate: Wed Jan 21 15:16:16 2026 +0000

    typebuf - more polishing work
---
 src/efm/efm.c         | 23 +++++++++++++----------
 src/efm/efm_structs.h |  2 ++
 src/efm/efm_typebuf.c | 41 +++++++++++++++++++++++++++++------------
 src/efm/efm_util.c    |  4 ++--
 4 files changed, 46 insertions(+), 24 deletions(-)

diff --git a/src/efm/efm.c b/src/efm/efm.c
index 35a9eb9..019510e 100644
--- a/src/efm/efm.c
+++ b/src/efm/efm.c
@@ -48,7 +48,7 @@ _cb_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
   Evas_Event_Key_Down *ev      = event_info;
   Eina_Bool            handled = EINA_FALSE;
 
-  if (!sd->o_typebuf)
+  if (!sd->typebuf)
     {
       handled = _efm_key_handle(sd, ev);
       // flag on hold if we use the  event - otherwise pass it on
@@ -75,7 +75,7 @@ _cb_refocus(void *data)
   if (sd->focused)
     {
       printf("XXX:  focus widget\n");
-      if (sd->o_typebuf) elm_object_focus_set(sd->o_typebuf, EINA_TRUE);
+      if (sd->typebuf) elm_object_focus_set(sd->o_typebuf, EINA_TRUE);
       else evas_object_focus_set(sd->o_clip, EINA_TRUE);
       if (sd->key_control) _icon_focus_show(sd);
     }
@@ -452,6 +452,12 @@ _add_overlay_objects(Smart_Data *sd)
       edje_object_part_swallow(sd->o_list_detailed_dummy, buf, o);
       evas_object_show(o);
     }
+  sd->o_typebuf_over = o = edje_object_add(e);
+  grp            = "e/fileman/default/typebuf";
+  theme_edj_file = elm_theme_group_path_find(NULL, grp);
+  edje_object_file_set(o, theme_edj_file, grp);
+  elm_grid_pack(sd->o_overlay_grid_fill, o, 0, 0, 1, 1);
+  evas_object_show(o);
 }
 
 static void
@@ -543,14 +549,6 @@ _smart_add(Evas_Object *obj)
   theme_edj_file = elm_theme_group_path_find(NULL, grp);
   edje_object_file_set(o, theme_edj_file, grp);
 
-  sd->o_over = o = edje_object_add(e);
-  evas_object_pass_events_set(o, EINA_TRUE);
-  evas_object_smart_member_add(o, obj);
-  evas_object_clip_set(o, sd->o_clip);
-  grp            = "e/fileman/default/list/drop_in";
-  theme_edj_file = elm_theme_group_path_find(NULL, grp);
-  edje_object_file_set(o, theme_edj_file, grp);
-
   sd->handler_exe_del
     = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, _cb_exe_del, sd);
   sd->handler_exe_data
@@ -700,6 +698,11 @@ _smart_del(Evas_Object *obj)
       evas_object_del(sd->o_typebuf);
       sd->o_typebuf = NULL;
     }
+  if (sd->o_typebuf_over)
+    {
+      evas_object_del(sd->o_typebuf_over);
+      sd->o_typebuf_over = NULL;
+    }
   if (sd->o_list_detailed_dummy)
     {
       evas_object_del(sd->o_list_detailed_dummy);
diff --git a/src/efm/efm_structs.h b/src/efm/efm_structs.h
index 75ad352..55265f6 100644
--- a/src/efm/efm_structs.h
+++ b/src/efm/efm_structs.h
@@ -44,6 +44,7 @@ struct _Smart_Data
   Evas_Object *o_focus;
   Evas_Object *o_sel;
   Evas_Object *o_over;
+  Evas_Object *o_typebuf_over;
   Evas_Object *o_typebuf;
   Evas_Object *o_detail_header;
   Evas_Object *o_detail_header_item[7];
@@ -134,6 +135,7 @@ struct _Smart_Data
   Eina_Bool detail_down          : 1;
   Eina_Bool listing_done         : 1;
   Eina_Bool listing_done_reblock : 1;
+  Eina_Bool typebuf              : 1;
 
   struct
   {
diff --git a/src/efm/efm_typebuf.c b/src/efm/efm_typebuf.c
index 62d1b3b..3e76c52 100644
--- a/src/efm/efm_typebuf.c
+++ b/src/efm/efm_typebuf.c
@@ -1,4 +1,7 @@
 #include "efm_typebuf.h"
+#include "Edje.h"
+#include "Evas.h"
+#include "eina_types.h"
 
 static int
 _typebuf_command_detect(const char *str)
@@ -155,14 +158,22 @@ _cb_typebuf_key(void *data, Evas_Object *obj EINA_UNUSED,
   return EINA_FALSE;
 }
 
+static void
+_cb_typebuf_size_hint_change(void *data, Evas *evas EINA_UNUSED,
+                             Evas_Object *obj EINA_UNUSED, void *info EINA_UNUSED)
+{ // handle min size changes of entry in the typebuf over edje obj
+  Smart_Data *sd = data;
+
+  edje_object_size_min_calc(sd->o_typebuf_over, NULL, NULL);
+}
+
 void
 typebuf_del(Smart_Data *sd)
 {
-  Evas_Object *o = sd->o_typebuf;
-
+  if (!sd->typebuf) return;
   printf("XXX: hide typebuf\n");
-  sd->o_typebuf = NULL;
-  evas_object_del(o);
+  sd->typebuf = EINA_FALSE;
+  edje_object_signal_emit(sd->o_typebuf_over, "e,state,typebuf,stop", "e");
   evas_object_focus_set(sd->o_clip, EINA_TRUE);
 }
 
@@ -171,24 +182,30 @@ typebuf_add(Smart_Data *sd, Evas_Event_Key_Down *ev)
 {
   Evas_Object *o;
 
-  if (sd->o_typebuf) return;
-  elm_object_focus_set(sd->o_scroller, EINA_TRUE);
+  if (sd->typebuf) return;
+  sd->typebuf = EINA_TRUE;
+  // new entry obj to start fresh
+  if (sd->o_typebuf) evas_object_del(sd->o_typebuf);
   sd->o_typebuf = o = elm_entry_add(sd->o_scroller);
   elm_object_style_set(o, "blank");
-  elm_grid_pack(sd->o_overlay_grid, o, 10, 40, 400, 20);
+  // when entry changes min size - handle it...
+  evas_object_event_callback_add(o, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                 _cb_typebuf_size_hint_change, sd);
+  evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+  edje_object_part_swallow(sd->o_typebuf_over, "e.swallow.content", o);
   elm_entry_single_line_set(o, EINA_TRUE);
   elm_entry_key_down_intercept_set(o, _cb_typebuf_key, sd);
   elm_entry_scrollable_set(o, EINA_TRUE);
   elm_scroller_policy_set(o, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
-  evas_object_move(o, 100, 100);
-  evas_object_resize(o, 200, 40);
   elm_entry_entry_insert(o, ev->string);
   evas_object_smart_callback_add(o, "aborted", _cb_typebuf_aborted, sd);
   evas_object_smart_callback_add(o, "activated", _cb_typebuf_activated, sd);
   evas_object_smart_callback_add(o, "changed,user", _cb_typebuf_changed, sd);
   evas_object_smart_callback_add(o, "cursor,changed", _cb_typebuf_cursor, sd);
-  evas_object_show(o);
-  elm_object_focus_set(o, EINA_TRUE);
-  // handle first initial text
+  // handle initial text already inserted above
   _cb_typebuf_changed(sd, o, NULL);
+  // raise + emit to show typebuf over object that holds the entry
+  evas_object_raise(sd->o_typebuf_over);
+  edje_object_signal_emit(sd->o_typebuf_over, "e,state,typebuf,start", "e");
+  elm_object_focus_set(o, EINA_TRUE);
 }
\ No newline at end of file
diff --git a/src/efm/efm_util.c b/src/efm/efm_util.c
index c1783a2..4d7fc43 100644
--- a/src/efm/efm_util.c
+++ b/src/efm/efm_util.c
@@ -1136,10 +1136,10 @@ _icon_over_on(Icon *icon)
   icon->sd->over_icon = icon;
   edje_object_signal_emit(icon->sd->o_over, "e,state,selected", "e");
   evas_object_raise(icon->sd->o_over);
-  evas_object_show(icon->sd->o_over);
   evas_object_geometry_set(icon->sd->o_over, icon->sd->geom.x + icon->geom.x,
                            icon->sd->geom.y + icon->geom.y, icon->geom.w,
                            icon->geom.h);
+  evas_object_show(icon->sd->o_over);
 }
 
 void
@@ -1192,10 +1192,10 @@ _icon_over_order_on(Icon *icon, int before_over_after)
   icon->sd->over_icon = icon;
   edje_object_signal_emit(icon->sd->o_over, emission, "e");
   evas_object_raise(icon->sd->o_over);
-  evas_object_show(icon->sd->o_over);
   evas_object_geometry_set(icon->sd->o_over, icon->sd->geom.x + icon->geom.x,
                            icon->sd->geom.y + icon->geom.y, icon->geom.w,
                            icon->geom.h);
+  evas_object_show(icon->sd->o_over);
 }
 
 void

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

Reply via email to