summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-11-04 12:33:46 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-11-05 11:44:16 +0900
commit4ccb501a346133fbcc56238e107fbf55bf350433 (patch)
tree85a1ebec4b09e5a7418f2fd10ae81fb82ab21881
parent99288a9e35f9ea2dec5aa63d43ec996dd4e976c5 (diff)
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.
-rw-r--r--src/bin/test_genlist.c55
1 files changed, 53 insertions, 2 deletions
diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c
index 2d6d6ce0b..2dd636e33 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)
1399{ 1399{
1400 Elm_Object_Item *glit = event_info; 1400 Elm_Object_Item *glit = event_info;
1401 int depth = elm_genlist_item_expanded_depth_get(glit); 1401 int depth = elm_genlist_item_expanded_depth_get(glit);
1402 printf("expanded depth for selected item is %d", depth); 1402 printf("item sel callback %p - expanded depth = %d\n", glit, depth);
1403} 1403}
1404 1404
1405static void 1405static void
@@ -1411,6 +1411,7 @@ gl4_exp(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
1411 int val = (int)(uintptr_t) elm_object_item_data_get(glit); 1411 int val = (int)(uintptr_t) elm_object_item_data_get(glit);
1412 int i = 0; 1412 int i = 0;
1413 1413
1414 printf("expand %p\n", glit);
1414 val *= 10; 1415 val *= 10;
1415 for (i = 0; i < 30; i++) 1416 for (i = 0; i < 30; i++)
1416 { 1417 {
@@ -1429,7 +1430,7 @@ gl4_con(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
1429 const Eina_List *list = NULL, *l = NULL; 1430 const Eina_List *list = NULL, *l = NULL;
1430 Elm_Object_Item *it = NULL; 1431 Elm_Object_Item *it = NULL;
1431 1432
1432 printf("\n"); 1433 printf("contract request %p\n", glit);
1433 1434
1434 list = elm_genlist_item_subitems_get(glit); 1435 list = elm_genlist_item_subitems_get(glit);
1435 EINA_LIST_FOREACH(list, l, it) 1436 EINA_LIST_FOREACH(list, l, it)
@@ -1444,6 +1445,7 @@ static void
1444gl4_exp_req(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 1445gl4_exp_req(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
1445{ 1446{
1446 Elm_Object_Item *glit = event_info; 1447 Elm_Object_Item *glit = event_info;
1448 printf("expand request %p\n", glit);
1447 elm_genlist_item_expanded_set(glit, EINA_TRUE); 1449 elm_genlist_item_expanded_set(glit, EINA_TRUE);
1448} 1450}
1449 1451
@@ -1454,6 +1456,48 @@ gl4_con_req(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
1454 elm_genlist_item_expanded_set(glit, EINA_FALSE); 1456 elm_genlist_item_expanded_set(glit, EINA_FALSE);
1455} 1457}
1456 1458
1459static void
1460gl4_selected(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
1461{
1462 Elm_Object_Item *glit = event_info;
1463 printf("selected %p\n", glit);
1464}
1465
1466static void
1467gl4_activated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
1468{
1469 Elm_Object_Item *glit = event_info;
1470 printf("activated %p\n", glit);
1471}
1472
1473static void
1474gl4_unselected(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
1475{
1476 Elm_Object_Item *glit = event_info;
1477 printf("unselected %p\n", glit);
1478}
1479
1480static void
1481gl4_longpressed(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
1482{
1483 Elm_Object_Item *glit = event_info;
1484 printf("longpressed %p\n", glit);
1485}
1486
1487static void
1488gl4_pressed(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
1489{
1490 Elm_Object_Item *glit = event_info;
1491 printf("pressed %p\n", glit);
1492}
1493
1494static void
1495gl4_released(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
1496{
1497 Elm_Object_Item *glit = event_info;
1498 printf("released %p\n", glit);
1499}
1500
1457char * 1501char *
1458gl4_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 1502gl4_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
1459{ 1503{
@@ -1595,6 +1639,13 @@ test_genlist6(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
1595 evas_object_smart_callback_add(gl, "expanded", gl4_exp, api); 1639 evas_object_smart_callback_add(gl, "expanded", gl4_exp, api);
1596 evas_object_smart_callback_add(gl, "contracted", gl4_con, api); 1640 evas_object_smart_callback_add(gl, "contracted", gl4_con, api);
1597 1641
1642 evas_object_smart_callback_add(gl, "selected", gl4_selected, api);
1643 evas_object_smart_callback_add(gl, "unselected", gl4_unselected, api);
1644 evas_object_smart_callback_add(gl, "activated", gl4_activated, api);
1645 evas_object_smart_callback_add(gl, "longpressed", gl4_longpressed, api);
1646 evas_object_smart_callback_add(gl, "pressed", gl4_pressed, api);
1647 evas_object_smart_callback_add(gl, "released", gl4_released, api);
1648
1598 evas_object_smart_callback_add(ck1, "changed", _tree_effect_changed_cb, gl); 1649 evas_object_smart_callback_add(ck1, "changed", _tree_effect_changed_cb, gl);
1599 evas_object_smart_callback_add(ck2, "changed", _tree_homogeneous_changed_cb, gl); 1650 evas_object_smart_callback_add(ck2, "changed", _tree_homogeneous_changed_cb, gl);
1600 1651