summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-01-03 05:28:34 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-01-03 05:28:34 +0000
commit2bdab4131ae0ae0b7058b31fae75d5924c9f8345 (patch)
tree3838799afa59a09dfed12d3dce6bfb171cb52b5b /src
parent13a511ef46ee50d942996b3b42be48c9acb23760 (diff)
put notes in elm_list.c as to what to do.
SVN revision: 66777
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_list.c489
1 files changed, 249 insertions, 240 deletions
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 819f9390a..e9aac4481 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -1385,139 +1385,6 @@ elm_list_add(Evas_Object *parent)
1385 return obj; 1385 return obj;
1386} 1386}
1387 1387
1388EAPI Elm_List_Item *
1389elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
1390{
1391 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1392 Widget_Data *wd = elm_widget_data_get(obj);
1393 Elm_List_Item *it = _item_new(obj, label, icon, end, func, data);
1394
1395 wd->items = eina_list_append(wd->items, it);
1396 it->node = eina_list_last(wd->items);
1397 elm_box_pack_end(wd->box, VIEW(it));
1398 return it;
1399}
1400
1401EAPI Elm_List_Item *
1402elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
1403{
1404 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1405 Widget_Data *wd = elm_widget_data_get(obj);
1406 Elm_List_Item *it = _item_new(obj, label, icon, end, func, data);
1407
1408 wd->items = eina_list_prepend(wd->items, it);
1409 it->node = wd->items;
1410 elm_box_pack_start(wd->box, VIEW(it));
1411 return it;
1412}
1413
1414EAPI Elm_List_Item *
1415elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
1416{
1417 Widget_Data *wd;
1418 Elm_List_Item *it;
1419
1420 EINA_SAFETY_ON_NULL_RETURN_VAL(before, NULL);
1421 if (!before->node) return NULL;
1422 ELM_LIST_ITEM_CHECK_DELETED_RETURN(before, NULL);
1423
1424 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1425 wd = elm_widget_data_get(obj);
1426 if (!wd) return NULL;
1427 it = _item_new(obj, label, icon, end, func, data);
1428 wd->items = eina_list_prepend_relative_list(wd->items, it, before->node);
1429 it->node = before->node->prev;
1430 elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
1431 return it;
1432}
1433
1434EAPI Elm_List_Item *
1435elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
1436{
1437 Widget_Data *wd;
1438 Elm_List_Item *it;
1439
1440 EINA_SAFETY_ON_NULL_RETURN_VAL(after, NULL);
1441 if (!after->node) return NULL;
1442 ELM_LIST_ITEM_CHECK_DELETED_RETURN(after, NULL);
1443
1444 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1445 wd = elm_widget_data_get(obj);
1446 if (!wd) return NULL;
1447 it = _item_new(obj, label, icon, end, func, data);
1448 wd->items = eina_list_append_relative_list(wd->items, it, after->node);
1449 it->node = after->node->next;
1450 elm_box_pack_after(wd->box, VIEW(it), VIEW(after));
1451 return it;
1452}
1453
1454EAPI Elm_List_Item *
1455elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func)
1456{
1457 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1458 Widget_Data *wd = elm_widget_data_get(obj);
1459 Elm_List_Item *it = _item_new(obj, label, icon, end, func, data);
1460 Eina_List *l;
1461
1462 wd->items = eina_list_sorted_insert(wd->items, cmp_func, it);
1463 l = eina_list_data_find_list(wd->items, it);
1464 l = eina_list_next(l);
1465 if (!l)
1466 {
1467 it->node = eina_list_last(wd->items);
1468 elm_box_pack_end(wd->box, VIEW(it));
1469 }
1470 else
1471 {
1472 Elm_List_Item *before = eina_list_data_get(l);
1473 it->node = before->node->prev;
1474 elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
1475 }
1476 return it;
1477}
1478
1479EAPI void
1480elm_list_clear(Evas_Object *obj)
1481{
1482 ELM_CHECK_WIDTYPE(obj, widtype);
1483 Widget_Data *wd = elm_widget_data_get(obj);
1484 Elm_List_Item *it;
1485
1486 if (!wd) return;
1487 if (!wd->items) return;
1488
1489 eina_list_free(wd->selected);
1490 wd->selected = NULL;
1491
1492 if (wd->walking > 0)
1493 {
1494 Eina_List *n;
1495
1496 EINA_LIST_FOREACH(wd->items, n, it)
1497 {
1498 if (it->deleted) continue;
1499 it->deleted = EINA_TRUE;
1500 wd->to_delete = eina_list_append(wd->to_delete, it);
1501 }
1502 return;
1503 }
1504
1505 evas_object_ref(obj);
1506 _elm_list_walk(wd);
1507
1508 EINA_LIST_FREE(wd->items, it)
1509 {
1510 elm_widget_item_pre_notify_del(it);
1511 _elm_list_item_free(it);
1512 }
1513
1514 _elm_list_unwalk(wd);
1515
1516 _fix_items(obj);
1517 _sizing_eval(obj);
1518 evas_object_unref(obj);
1519}
1520
1521EAPI void 1388EAPI void
1522elm_list_go(Evas_Object *obj) 1389elm_list_go(Evas_Object *obj)
1523{ 1390{
@@ -1637,6 +1504,91 @@ elm_list_always_select_mode_get(const Evas_Object *obj)
1637 return wd->always_select; 1504 return wd->always_select;
1638} 1505}
1639 1506
1507EAPI void
1508elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
1509{
1510 ELM_CHECK_WIDTYPE(obj, widtype);
1511 Widget_Data *wd = elm_widget_data_get(obj);
1512 if (!wd) return;
1513 if (wd->scr)
1514 elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
1515}
1516
1517EAPI void
1518elm_list_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
1519{
1520 ELM_CHECK_WIDTYPE(obj, widtype);
1521 Widget_Data *wd = elm_widget_data_get(obj);
1522 if (!wd) return;
1523 elm_smart_scroller_bounce_allow_get(wd->scr, h_bounce, v_bounce);
1524}
1525
1526EAPI void
1527elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
1528{
1529 ELM_CHECK_WIDTYPE(obj, widtype);
1530 Widget_Data *wd = elm_widget_data_get(obj);
1531 if ((!wd) || (!wd->scr)) return;
1532 if ((policy_h >= ELM_SCROLLER_POLICY_LAST) ||
1533 (policy_v >= ELM_SCROLLER_POLICY_LAST))
1534 return;
1535 elm_smart_scroller_policy_set(wd->scr, policy_h, policy_v);
1536}
1537
1538EAPI void
1539elm_list_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
1540{
1541 ELM_CHECK_WIDTYPE(obj, widtype);
1542 Widget_Data *wd = elm_widget_data_get(obj);
1543 Elm_Smart_Scroller_Policy s_policy_h, s_policy_v;
1544 if ((!wd) || (!wd->scr)) return;
1545 elm_smart_scroller_policy_get(wd->scr, &s_policy_h, &s_policy_v);
1546 if (policy_h) *policy_h = (Elm_Scroller_Policy) s_policy_h;
1547 if (policy_v) *policy_v = (Elm_Scroller_Policy) s_policy_v;
1548}
1549
1550EAPI void
1551elm_list_clear(Evas_Object *obj)
1552{
1553 ELM_CHECK_WIDTYPE(obj, widtype);
1554 Widget_Data *wd = elm_widget_data_get(obj);
1555 Elm_List_Item *it;
1556
1557 if (!wd) return;
1558 if (!wd->items) return;
1559
1560 eina_list_free(wd->selected);
1561 wd->selected = NULL;
1562
1563 if (wd->walking > 0)
1564 {
1565 Eina_List *n;
1566
1567 EINA_LIST_FOREACH(wd->items, n, it)
1568 {
1569 if (it->deleted) continue;
1570 it->deleted = EINA_TRUE;
1571 wd->to_delete = eina_list_append(wd->to_delete, it);
1572 }
1573 return;
1574 }
1575
1576 evas_object_ref(obj);
1577 _elm_list_walk(wd);
1578
1579 EINA_LIST_FREE(wd->items, it)
1580 {
1581 elm_widget_item_pre_notify_del(it);
1582 _elm_list_item_free(it);
1583 }
1584
1585 _elm_list_unwalk(wd);
1586
1587 _fix_items(obj);
1588 _sizing_eval(obj);
1589 evas_object_unref(obj);
1590}
1591
1640EAPI const Eina_List * 1592EAPI const Eina_List *
1641elm_list_items_get(const Evas_Object *obj) 1593elm_list_items_get(const Evas_Object *obj)
1642{ 1594{
@@ -1665,6 +1617,97 @@ elm_list_selected_items_get(const Evas_Object *obj)
1665 return wd->selected; 1617 return wd->selected;
1666} 1618}
1667 1619
1620EAPI Elm_List_Item *
1621elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
1622{
1623 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1624 Widget_Data *wd = elm_widget_data_get(obj);
1625 Elm_List_Item *it = _item_new(obj, label, icon, end, func, data);
1626
1627 wd->items = eina_list_append(wd->items, it);
1628 it->node = eina_list_last(wd->items);
1629 elm_box_pack_end(wd->box, VIEW(it));
1630 return it;
1631}
1632
1633EAPI Elm_List_Item *
1634elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
1635{
1636 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1637 Widget_Data *wd = elm_widget_data_get(obj);
1638 Elm_List_Item *it = _item_new(obj, label, icon, end, func, data);
1639
1640 wd->items = eina_list_prepend(wd->items, it);
1641 it->node = wd->items;
1642 elm_box_pack_start(wd->box, VIEW(it));
1643 return it;
1644}
1645
1646EAPI Elm_List_Item *
1647elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
1648{
1649 Widget_Data *wd;
1650 Elm_List_Item *it;
1651
1652 EINA_SAFETY_ON_NULL_RETURN_VAL(before, NULL);
1653 if (!before->node) return NULL;
1654 ELM_LIST_ITEM_CHECK_DELETED_RETURN(before, NULL);
1655
1656 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1657 wd = elm_widget_data_get(obj);
1658 if (!wd) return NULL;
1659 it = _item_new(obj, label, icon, end, func, data);
1660 wd->items = eina_list_prepend_relative_list(wd->items, it, before->node);
1661 it->node = before->node->prev;
1662 elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
1663 return it;
1664}
1665
1666EAPI Elm_List_Item *
1667elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data)
1668{
1669 Widget_Data *wd;
1670 Elm_List_Item *it;
1671
1672 EINA_SAFETY_ON_NULL_RETURN_VAL(after, NULL);
1673 if (!after->node) return NULL;
1674 ELM_LIST_ITEM_CHECK_DELETED_RETURN(after, NULL);
1675
1676 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1677 wd = elm_widget_data_get(obj);
1678 if (!wd) return NULL;
1679 it = _item_new(obj, label, icon, end, func, data);
1680 wd->items = eina_list_append_relative_list(wd->items, it, after->node);
1681 it->node = after->node->next;
1682 elm_box_pack_after(wd->box, VIEW(it), VIEW(after));
1683 return it;
1684}
1685
1686EAPI Elm_List_Item *
1687elm_list_item_sorted_insert(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, Evas_Smart_Cb func, const void *data, Eina_Compare_Cb cmp_func)
1688{
1689 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
1690 Widget_Data *wd = elm_widget_data_get(obj);
1691 Elm_List_Item *it = _item_new(obj, label, icon, end, func, data);
1692 Eina_List *l;
1693
1694 wd->items = eina_list_sorted_insert(wd->items, cmp_func, it);
1695 l = eina_list_data_find_list(wd->items, it);
1696 l = eina_list_next(l);
1697 if (!l)
1698 {
1699 it->node = eina_list_last(wd->items);
1700 elm_box_pack_end(wd->box, VIEW(it));
1701 }
1702 else
1703 {
1704 Elm_List_Item *before = eina_list_data_get(l);
1705 it->node = before->node->prev;
1706 elm_box_pack_before(wd->box, VIEW(it), VIEW(before));
1707 }
1708 return it;
1709}
1710
1668EAPI void 1711EAPI void
1669elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting) 1712elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting)
1670{ 1713{
@@ -1679,7 +1722,6 @@ elm_list_item_separator_get(const Elm_List_Item *it)
1679 return it->is_separator; 1722 return it->is_separator;
1680} 1723}
1681 1724
1682
1683EAPI void 1725EAPI void
1684elm_list_item_selected_set(Elm_List_Item *it, Eina_Bool selected) 1726elm_list_item_selected_set(Elm_List_Item *it, Eina_Bool selected)
1685{ 1727{
@@ -1780,21 +1822,66 @@ elm_list_item_del(Elm_List_Item *it)
1780 evas_object_unref(obj); 1822 evas_object_unref(obj);
1781} 1823}
1782 1824
1783EAPI void 1825EAPI Evas_Object *
1826elm_list_item_object_get(const Elm_List_Item *it)
1827{
1828 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
1829 return VIEW(it);
1830}
1831
1832EAPI Elm_List_Item *
1833elm_list_item_prev(const Elm_List_Item *it)
1834{
1835 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
1836 if (it->node->prev) return it->node->prev->data;
1837 else return NULL;
1838}
1839
1840EAPI Elm_List_Item *
1841elm_list_item_next(const Elm_List_Item *it)
1842{
1843 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
1844 if (it->node->next) return it->node->next->data;
1845 else return NULL;
1846}
1847
1848EINA_DEPRECATED EAPI Evas_Object *
1849elm_list_item_base_get(const Elm_List_Item *it)
1850{
1851 return elm_list_item_object_get(it);
1852}
1853
1854EINA_DEPRECATED EAPI void
1855elm_list_item_disabled_set(Elm_List_Item *it, Eina_Bool disabled)
1856{
1857 elm_object_item_disabled_set((Elm_Object_Item *)it, disabled);
1858}
1859
1860EINA_DEPRECATED EAPI Eina_Bool
1861elm_list_item_disabled_get(const Elm_List_Item *it)
1862{
1863 return elm_object_item_disabled_get((Elm_Object_Item *)it);
1864}
1865
1866// XXX: the below need to use the elm_object_item infra indicated
1867// use elm_object_item_data_set
1868EINA_DEPRECATED EAPI void
1784elm_list_item_del_cb_set(Elm_List_Item *it, Evas_Smart_Cb func) 1869elm_list_item_del_cb_set(Elm_List_Item *it, Evas_Smart_Cb func)
1785{ 1870{
1786 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it); 1871 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
1787 elm_widget_item_del_cb_set(it, func); 1872 elm_widget_item_del_cb_set(it, func);
1788} 1873}
1789 1874
1790EAPI void * 1875// use elm_object_item_data_get
1876EINA_DEPRECATED EAPI void *
1791elm_list_item_data_get(const Elm_List_Item *it) 1877elm_list_item_data_get(const Elm_List_Item *it)
1792{ 1878{
1793 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL); 1879 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
1794 return elm_widget_item_data_get(it); 1880 return elm_widget_item_data_get(it);
1795} 1881}
1796 1882
1797EAPI Evas_Object * 1883// use elm_object_item_part_content_get
1884EINA_DEPRECATED EAPI Evas_Object *
1798elm_list_item_icon_get(const Elm_List_Item *it) 1885elm_list_item_icon_get(const Elm_List_Item *it)
1799{ 1886{
1800 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL); 1887 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
@@ -1802,7 +1889,8 @@ elm_list_item_icon_get(const Elm_List_Item *it)
1802 return it->icon; 1889 return it->icon;
1803} 1890}
1804 1891
1805EAPI void 1892// use elm_object_item_part_content_set
1893EINA_DEPRECATED EAPI void
1806elm_list_item_icon_set(Elm_List_Item *it, Evas_Object *icon) 1894elm_list_item_icon_set(Elm_List_Item *it, Evas_Object *icon)
1807{ 1895{
1808 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it); 1896 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
@@ -1829,7 +1917,8 @@ elm_list_item_icon_set(Elm_List_Item *it, Evas_Object *icon)
1829 edje_object_part_swallow(VIEW(it), "elm.swallow.icon", icon); 1917 edje_object_part_swallow(VIEW(it), "elm.swallow.icon", icon);
1830} 1918}
1831 1919
1832EAPI Evas_Object * 1920// use elm_object_item_part_content_get
1921EINA_DEPRECATED EAPI Evas_Object *
1833elm_list_item_end_get(const Elm_List_Item *it) 1922elm_list_item_end_get(const Elm_List_Item *it)
1834{ 1923{
1835 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL); 1924 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
@@ -1837,7 +1926,8 @@ elm_list_item_end_get(const Elm_List_Item *it)
1837 return it->end; 1926 return it->end;
1838} 1927}
1839 1928
1840EAPI void 1929// use elm_object_item_part_content_set
1930EINA_DEPRECATED EAPI void
1841elm_list_item_end_set(Elm_List_Item *it, Evas_Object *end) 1931elm_list_item_end_set(Elm_List_Item *it, Evas_Object *end)
1842{ 1932{
1843 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it); 1933 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
@@ -1864,27 +1954,16 @@ elm_list_item_end_set(Elm_List_Item *it, Evas_Object *end)
1864 edje_object_part_swallow(VIEW(it), "elm.swallow.end", end); 1954 edje_object_part_swallow(VIEW(it), "elm.swallow.end", end);
1865} 1955}
1866 1956
1867EAPI Evas_Object * 1957// use elm_object_item_part_text_get
1868elm_list_item_base_get(const Elm_List_Item *it) 1958EINA_DEPRECATED EAPI const char *
1869{
1870 return elm_list_item_object_get(it);
1871}
1872
1873EAPI Evas_Object *
1874elm_list_item_object_get(const Elm_List_Item *it)
1875{
1876 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
1877 return VIEW(it);
1878}
1879
1880EAPI const char *
1881elm_list_item_label_get(const Elm_List_Item *it) 1959elm_list_item_label_get(const Elm_List_Item *it)
1882{ 1960{
1883 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL); 1961 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
1884 return it->label; 1962 return it->label;
1885} 1963}
1886 1964
1887EAPI void 1965// use elm_object_item_part_text_set
1966EINA_DEPRECATED EAPI void
1888elm_list_item_label_set(Elm_List_Item *it, const char *text) 1967elm_list_item_label_set(Elm_List_Item *it, const char *text)
1889{ 1968{
1890 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it); 1969 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
@@ -1893,171 +1972,101 @@ elm_list_item_label_set(Elm_List_Item *it, const char *text)
1893 edje_object_part_text_set(VIEW(it), "elm.text", it->label); 1972 edje_object_part_text_set(VIEW(it), "elm.text", it->label);
1894} 1973}
1895 1974
1896EAPI Elm_List_Item * 1975// XXX: all the below - make elm_object_item*() calls to do these
1897elm_list_item_prev(const Elm_List_Item *it) 1976EINA_DEPRECATED EAPI void
1898{
1899 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
1900 if (it->node->prev) return it->node->prev->data;
1901 else return NULL;
1902}
1903
1904EAPI Elm_List_Item *
1905elm_list_item_next(const Elm_List_Item *it)
1906{
1907 ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, NULL);
1908 if (it->node->next) return it->node->next->data;
1909 else return NULL;
1910}
1911
1912EAPI void
1913elm_list_item_tooltip_text_set(Elm_List_Item *item, const char *text) 1977elm_list_item_tooltip_text_set(Elm_List_Item *item, const char *text)
1914{ 1978{
1915 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item); 1979 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
1916 elm_widget_item_tooltip_text_set(item, text); 1980 elm_widget_item_tooltip_text_set(item, text);
1917} 1981}
1918 1982
1919EAPI void 1983EINA_DEPRECATED EAPI void
1920elm_list_item_tooltip_content_cb_set(Elm_List_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb) 1984elm_list_item_tooltip_content_cb_set(Elm_List_Item *item, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb)
1921{ 1985{
1922 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item); 1986 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
1923 elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb); 1987 elm_widget_item_tooltip_content_cb_set(item, func, data, del_cb);
1924} 1988}
1925 1989
1926EAPI void 1990EINA_DEPRECATED EAPI void
1927elm_list_item_tooltip_unset(Elm_List_Item *item) 1991elm_list_item_tooltip_unset(Elm_List_Item *item)
1928{ 1992{
1929 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item); 1993 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
1930 elm_widget_item_tooltip_unset(item); 1994 elm_widget_item_tooltip_unset(item);
1931} 1995}
1932 1996
1933EAPI Eina_Bool 1997EINA_DEPRECATED EAPI Eina_Bool
1934elm_list_item_tooltip_window_mode_set(Elm_List_Item *item, Eina_Bool disable) 1998elm_list_item_tooltip_window_mode_set(Elm_List_Item *item, Eina_Bool disable)
1935{ 1999{
1936 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE); 2000 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
1937 return elm_widget_item_tooltip_window_mode_set(item, disable); 2001 return elm_widget_item_tooltip_window_mode_set(item, disable);
1938} 2002}
1939 2003
1940EAPI Eina_Bool 2004EINA_DEPRECATED EAPI Eina_Bool
1941elm_list_item_tooltip_window_mode_get(const Elm_List_Item *item) 2005elm_list_item_tooltip_window_mode_get(const Elm_List_Item *item)
1942{ 2006{
1943 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE); 2007 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
1944 return elm_widget_item_tooltip_window_mode_get(item); 2008 return elm_widget_item_tooltip_window_mode_get(item);
1945} 2009}
1946 2010
1947EAPI void 2011EINA_DEPRECATED EAPI void
1948elm_list_item_tooltip_style_set(Elm_List_Item *item, const char *style) 2012elm_list_item_tooltip_style_set(Elm_List_Item *item, const char *style)
1949{ 2013{
1950 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item); 2014 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
1951 elm_widget_item_tooltip_style_set(item, style); 2015 elm_widget_item_tooltip_style_set(item, style);
1952} 2016}
1953 2017
1954EAPI const char * 2018EINA_DEPRECATED EAPI const char *
1955elm_list_item_tooltip_style_get(const Elm_List_Item *item) 2019elm_list_item_tooltip_style_get(const Elm_List_Item *item)
1956{ 2020{
1957 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL); 2021 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL);
1958 return elm_widget_item_tooltip_style_get(item); 2022 return elm_widget_item_tooltip_style_get(item);
1959} 2023}
1960 2024
1961EAPI void 2025EINA_DEPRECATED EAPI void
1962elm_list_item_cursor_set(Elm_List_Item *item, const char *cursor) 2026elm_list_item_cursor_set(Elm_List_Item *item, const char *cursor)
1963{ 2027{
1964 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item); 2028 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
1965 elm_widget_item_cursor_set(item, cursor); 2029 elm_widget_item_cursor_set(item, cursor);
1966} 2030}
1967 2031
1968EAPI const char * 2032EINA_DEPRECATED EAPI const char *
1969elm_list_item_cursor_get(const Elm_List_Item *item) 2033elm_list_item_cursor_get(const Elm_List_Item *item)
1970{ 2034{
1971 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL); 2035 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL);
1972 return elm_widget_item_cursor_get(item); 2036 return elm_widget_item_cursor_get(item);
1973} 2037}
1974 2038
1975EAPI void 2039EINA_DEPRECATED EAPI void
1976elm_list_item_cursor_unset(Elm_List_Item *item) 2040elm_list_item_cursor_unset(Elm_List_Item *item)
1977{ 2041{
1978 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item); 2042 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
1979 elm_widget_item_cursor_unset(item); 2043 elm_widget_item_cursor_unset(item);
1980} 2044}
1981 2045
1982EAPI void 2046EINA_DEPRECATED EAPI void
1983elm_list_item_cursor_style_set(Elm_List_Item *item, const char *style) 2047elm_list_item_cursor_style_set(Elm_List_Item *item, const char *style)
1984{ 2048{
1985 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item); 2049 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
1986 elm_widget_item_cursor_style_set(item, style); 2050 elm_widget_item_cursor_style_set(item, style);
1987} 2051}
1988 2052
1989EAPI const char * 2053EINA_DEPRECATED EAPI const char *
1990elm_list_item_cursor_style_get(const Elm_List_Item *item) 2054elm_list_item_cursor_style_get(const Elm_List_Item *item)
1991{ 2055{
1992 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL); 2056 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, NULL);
1993 return elm_widget_item_cursor_style_get(item); 2057 return elm_widget_item_cursor_style_get(item);
1994} 2058}
1995 2059
1996EAPI void 2060EINA_DEPRECATED EAPI void
1997elm_list_item_cursor_engine_only_set(Elm_List_Item *item, Eina_Bool engine_only) 2061elm_list_item_cursor_engine_only_set(Elm_List_Item *item, Eina_Bool engine_only)
1998{ 2062{
1999 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item); 2063 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item);
2000 elm_widget_item_cursor_engine_only_set(item, engine_only); 2064 elm_widget_item_cursor_engine_only_set(item, engine_only);
2001} 2065}
2002 2066
2003EAPI Eina_Bool 2067EINA_DEPRECATED EAPI Eina_Bool
2004elm_list_item_cursor_engine_only_get(const Elm_List_Item *item) 2068elm_list_item_cursor_engine_only_get(const Elm_List_Item *item)
2005{ 2069{
2006 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE); 2070 ELM_LIST_ITEM_CHECK_DELETED_RETURN(item, EINA_FALSE);
2007 return elm_widget_item_cursor_engine_only_get(item); 2071 return elm_widget_item_cursor_engine_only_get(item);
2008} 2072}
2009
2010EAPI void
2011elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
2012{
2013 ELM_CHECK_WIDTYPE(obj, widtype);
2014 Widget_Data *wd = elm_widget_data_get(obj);
2015 if (!wd) return;
2016 if (wd->scr)
2017 elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
2018}
2019
2020EAPI void
2021elm_list_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
2022{
2023 ELM_CHECK_WIDTYPE(obj, widtype);
2024 Widget_Data *wd = elm_widget_data_get(obj);
2025 if (!wd) return;
2026 elm_smart_scroller_bounce_allow_get(wd->scr, h_bounce, v_bounce);
2027}
2028
2029EAPI void
2030elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
2031{
2032 ELM_CHECK_WIDTYPE(obj, widtype);
2033 Widget_Data *wd = elm_widget_data_get(obj);
2034 if ((!wd) || (!wd->scr)) return;
2035 if ((policy_h >= ELM_SCROLLER_POLICY_LAST) ||
2036 (policy_v >= ELM_SCROLLER_POLICY_LAST))
2037 return;
2038 elm_smart_scroller_policy_set(wd->scr, policy_h, policy_v);
2039}
2040
2041EAPI void
2042elm_list_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
2043{
2044 ELM_CHECK_WIDTYPE(obj, widtype);
2045 Widget_Data *wd = elm_widget_data_get(obj);
2046 Elm_Smart_Scroller_Policy s_policy_h, s_policy_v;
2047 if ((!wd) || (!wd->scr)) return;
2048 elm_smart_scroller_policy_get(wd->scr, &s_policy_h, &s_policy_v);
2049 if (policy_h) *policy_h = (Elm_Scroller_Policy) s_policy_h;
2050 if (policy_v) *policy_v = (Elm_Scroller_Policy) s_policy_v;
2051}
2052
2053EINA_DEPRECATED EAPI void
2054elm_list_item_disabled_set(Elm_List_Item *it, Eina_Bool disabled)
2055{
2056 elm_object_item_disabled_set((Elm_Object_Item *)it, disabled);
2057}
2058
2059EINA_DEPRECATED EAPI Eina_Bool
2060elm_list_item_disabled_get(const Elm_List_Item *it)
2061{
2062 return elm_object_item_disabled_get((Elm_Object_Item *)it);
2063}