raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=4ccb501a346133fbcc56238e107fbf55bf350433

commit 4ccb501a346133fbcc56238e107fbf55bf350433
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Wed Nov 4 12:33:46 2015 +0900

    genlist tree test - minor - show all callbacks called so people know
    
    act as "docs" so people can see what is called when. minor just in elm
    test.
---
 src/bin/test_genlist.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 53 insertions(+), 2 deletions(-)

diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c
index 2d6d6ce..2dd636e 100644
--- a/src/bin/test_genlist.c
+++ b/src/bin/test_genlist.c
@@ -1399,7 +1399,7 @@ gl4_sel(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info)
 {
    Elm_Object_Item *glit = event_info;
    int depth = elm_genlist_item_expanded_depth_get(glit);
-   printf("expanded depth for selected item is %d", depth);
+   printf("item sel callback %p - expanded depth = %d\n", glit, depth);
 }
 
 static void
@@ -1411,6 +1411,7 @@ gl4_exp(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info)
    int val = (int)(uintptr_t) elm_object_item_data_get(glit);
    int i = 0;
 
+   printf("expand %p\n", glit);
    val *= 10;
    for (i = 0; i < 30; i++)
      {
@@ -1429,7 +1430,7 @@ gl4_con(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info)
    const Eina_List *list = NULL, *l = NULL;
    Elm_Object_Item *it = NULL;
 
-   printf("\n");
+   printf("contract request %p\n", glit);
 
    list = elm_genlist_item_subitems_get(glit);
    EINA_LIST_FOREACH(list, l, it)
@@ -1444,6 +1445,7 @@ static void
 gl4_exp_req(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info)
 {
    Elm_Object_Item *glit = event_info;
+   printf("expand request %p\n", glit);
    elm_genlist_item_expanded_set(glit, EINA_TRUE);
 }
 
@@ -1454,6 +1456,48 @@ gl4_con_req(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
    elm_genlist_item_expanded_set(glit, EINA_FALSE);
 }
 
+static void
+gl4_selected(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info)
+{
+   Elm_Object_Item *glit = event_info;
+   printf("selected %p\n", glit);
+}
+
+static void
+gl4_activated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info)
+{
+   Elm_Object_Item *glit = event_info;
+   printf("activated %p\n", glit);
+}
+
+static void
+gl4_unselected(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info)
+{
+   Elm_Object_Item *glit = event_info;
+   printf("unselected %p\n", glit);
+}
+
+static void
+gl4_longpressed(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info)
+{
+   Elm_Object_Item *glit = event_info;
+   printf("longpressed %p\n", glit);
+}
+
+static void
+gl4_pressed(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info)
+{
+   Elm_Object_Item *glit = event_info;
+   printf("pressed %p\n", glit);
+}
+
+static void
+gl4_released(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info)
+{
+   Elm_Object_Item *glit = event_info;
+   printf("released %p\n", glit);
+}
+
 char *
 gl4_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part 
EINA_UNUSED)
 {
@@ -1595,6 +1639,13 @@ test_genlist6(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_
    evas_object_smart_callback_add(gl, "expanded", gl4_exp, api);
    evas_object_smart_callback_add(gl, "contracted", gl4_con, api);
 
+   evas_object_smart_callback_add(gl, "selected", gl4_selected, api);
+   evas_object_smart_callback_add(gl, "unselected", gl4_unselected, api);
+   evas_object_smart_callback_add(gl, "activated", gl4_activated, api);
+   evas_object_smart_callback_add(gl, "longpressed", gl4_longpressed, api);
+   evas_object_smart_callback_add(gl, "pressed", gl4_pressed, api);
+   evas_object_smart_callback_add(gl, "released", gl4_released, api);
+
    evas_object_smart_callback_add(ck1, "changed", _tree_effect_changed_cb, gl);
    evas_object_smart_callback_add(ck2, "changed", 
_tree_homogeneous_changed_cb, gl);
 

-- 


Reply via email to