On Tue, Mar 13, 2012 at 07:42:17AM +0100, Martin Jansa wrote: > On Tue, Mar 13, 2012 at 10:45:46AM +0900, ChunEon Park wrote: > > > > > > in 69270 > > > > Thank you very much. > > You have forgot first 4 patches.
I've rebased them now as they don't apply anymore and latest changes need a bit more fixes. -- Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com
From 1201690c868758df7ae1508517880182e4c609e9 Mon Sep 17 00:00:00 2001 From: Martin Jansa <martin.ja...@gmail.com> Date: Thu, 8 Mar 2012 15:59:12 +0100 Subject: [PATCH 1/4] python-elementary: fix build Signed-off-by: Martin Jansa <martin.ja...@gmail.com> --- .../elementary.c_elementary_hoversel.pxi | 4 +- .../elementary/elementary.c_elementary_list.pxi | 52 ++++++++++---------- .../elementary/elementary.c_elementary_toolbar.pxi | 6 +- .../include/elementary/c_elementary.pxd | 19 +++++++ 4 files changed, 50 insertions(+), 31 deletions(-) diff --git a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_hoversel.pxi b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_hoversel.pxi index 6da7e89..2c09c1f 100644 --- a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_hoversel.pxi +++ b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_hoversel.pxi @@ -133,11 +133,11 @@ cdef class Hoversel(Object): self.label_set(value) def icon_set(self, c_evas.Object icon): - elm_object_item_part_content_set(self.obj, icon.obj) + elm_object_part_content_set(self.obj, "icon", icon.obj); def icon_get(self): cdef c_evas.Evas_Object *icon - icon = elm_object_item_part_content_get(self.obj) + icon = elm_object_part_content_get(self.obj, "icon") return evas.c_evas._Object_from_instance(<long> icon) property icon: diff --git a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_list.pxi b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_list.pxi index 69141fe..9db6ad0 100644 --- a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_list.pxi +++ b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_list.pxi @@ -29,7 +29,7 @@ cdef void _list_item_del_cb(void *data, c_evas.Evas_Object *o, void *event_info) def _list_item_conv(long addr): cdef Elm_Object_Item *it = <Elm_Object_Item *>addr - cdef void *data = elm_list_item_data_get(it) + cdef void *data = elm_object_item_data_get(it) if data == NULL: return None else: @@ -101,7 +101,7 @@ cdef class ListItem(WidgetItem): cb, cbdata) Py_INCREF(self) - elm_list_item_del_cb_set(self.item, _list_item_del_cb) + elm_object_item_del_cb_set(self.item, _list_item_del_cb) def __str__(self): return ("%s(label=%r, icon=%s, end=%s, " @@ -121,7 +121,7 @@ cdef class ListItem(WidgetItem): def delete(self): if self.item == NULL: raise ValueError("Object already deleted") - elm_list_item_del(self.item) + elm_object_item_del(self.item) def selected_set(self, selected): elm_list_item_selected_set(self.item, selected) @@ -142,7 +142,7 @@ cdef class ListItem(WidgetItem): @rtype: tuple of (args, kargs), args is tuple, kargs is dict. """ cdef void* data - data = elm_list_item_data_get(self.item) + data = elm_object_item_data_get(self.item) if data == NULL: return None else: @@ -160,7 +160,7 @@ cdef class ListItem(WidgetItem): @rtype: evas.c_evas.Object """ cdef c_evas.Evas_Object *icon - icon = elm_list_item_icon_get(self.item) + icon = elm_object_item_part_content_get(self.item, NULL) return evas.c_evas._Object_from_instance(<long> icon) property icon: @@ -173,14 +173,14 @@ cdef class ListItem(WidgetItem): @rtype: str """ cdef const_char_ptr l - l = elm_list_item_label_get(self.item) + l = elm_object_item_text_get(self.item) if l == NULL: return None return l def label_set(self, char *label): """Set the label string for this list item.""" - elm_list_item_label_set(self.item, label) + elm_object_item_text_set(self.item, label) property label: def __get__(self): @@ -220,7 +220,7 @@ cdef class ListItem(WidgetItem): if item == NULL: return None - data = elm_list_item_data_get(item) + data = elm_object_item_data_get(item) if data == NULL: return None @@ -238,7 +238,7 @@ cdef class ListItem(WidgetItem): cdef c_evas.Evas_Object *obj cdef void *data - obj = elm_list_item_end_get(self.item) + obj = elm_object_item_part_content_get(self.item, "end") if obj == NULL: return None return evas.c_evas._Object_from_instance(<long>obj) @@ -276,7 +276,7 @@ cdef class ListItem(WidgetItem): tooltip, so any previous tooltip data is removed. Internaly, this method call @tooltip_content_cb_set """ - elm_list_item_tooltip_text_set(self.item, text) + elm_object_item_tooltip_text_set(self.item, text) def tooltip_content_cb_set(self, func, *args, **kargs): """ Set the content to be shown in the tooltip object @@ -298,7 +298,7 @@ cdef class ListItem(WidgetItem): data = (func, self, args, kargs) Py_INCREF(data) cbdata = <void *>data - elm_list_item_tooltip_content_cb_set(self.item, + elm_object_item_tooltip_content_cb_set(self.item, _tooltip_item_content_create, cbdata, _tooltip_item_data_del_cb) @@ -309,25 +309,25 @@ cdef class ListItem(WidgetItem): copy of label will be removed correctly. If used @tooltip_content_cb_set, the data will be unreferred but no freed. """ - elm_list_item_tooltip_unset(self.item) + elm_object_item_tooltip_unset(self.item) def tooltip_style_set(self, style=None): """ Sets a different style for this object tooltip. @note before you set a style you should define a tooltip with - elm_list_item_tooltip_content_cb_set() or - elm_list_item_tooltip_text_set() + elm_object_item_tooltip_content_cb_set() or + elm_object_item_tooltip_text_set() """ if style: - elm_list_item_tooltip_style_set(self.item, style) + elm_object_item_tooltip_style_set(self.item, style) else: - elm_list_item_tooltip_style_set(self.item, NULL) + elm_object_item_tooltip_style_set(self.item, NULL) def tooltip_style_get(self): """ Get the style for this object tooltip. """ cdef const_char_ptr style - style = elm_list_item_tooltip_style_get(self.item) + style = elm_object_item_tooltip_style_get(self.item) if style == NULL: return None return style @@ -340,29 +340,29 @@ cdef class ListItem(WidgetItem): this function is called twice for an item, the previous set will be unset. """ - elm_list_item_cursor_set(self.item, cursor) + elm_object_item_cursor_set(self.item, cursor) def cursor_unset(self): """ Unset the cursor to be shown when mouse is over the list item """ - elm_list_item_cursor_unset(self.item) + elm_object_item_cursor_unset(self.item) def cursor_style_set(self, style=None): """ Sets a different style for this object cursor. @note before you set a style you should define a cursor with - elm_list_item_cursor_set() + elm_object_item_cursor_set() """ if style: - elm_list_item_cursor_style_set(self.item, style) + elm_object_item_cursor_style_set(self.item, style) else: - elm_list_item_cursor_style_set(self.item, NULL) + elm_object_item_cursor_style_set(self.item, NULL) def cursor_style_get(self): """ Get the style for this object cursor. """ cdef const_char_ptr style - style = elm_list_item_cursor_style_get(self.item) + style = elm_object_item_cursor_style_get(self.item) if style == NULL: return None return style @@ -371,14 +371,14 @@ cdef class ListItem(WidgetItem): """ Sets cursor engine only usage for this object. @note before you set engine only usage you should define a cursor with - elm_list_item_cursor_set() + elm_object_item_cursor_set() """ - elm_list_item_cursor_engine_only_set(self.item, bool(engine_only)) + elm_object_item_cursor_engine_only_set(self.item, bool(engine_only)) def cursor_engine_only_get(self): """ Get the engine only usage for this object. """ - return elm_list_item_cursor_engine_only_get(self.item) + return elm_object_item_cursor_engine_only_get(self.item) cdef class List(Object): diff --git a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_toolbar.pxi b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_toolbar.pxi index 43babab..dfa8f94 100644 --- a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_toolbar.pxi +++ b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_toolbar.pxi @@ -182,7 +182,7 @@ cdef class ToolbarItem(WidgetItem): tooltip, so any previous tooltip data is removed. Internaly, this method call @tooltip_content_cb_set """ - elm_toolbar_item_tooltip_text_set(self.obj, text) + elm_object_item_tooltip_text_set(self.obj, text) def tooltip_content_cb_set(self, func, *args, **kargs): """ Set the content to be shown in the tooltip object @@ -223,7 +223,7 @@ cdef class ToolbarItem(WidgetItem): @note before you set a style you should define a tooltip with elm_object_item_tooltip_content_cb_set() or - elm_toolbar_item_tooltip_text_set() + elm_object_item_tooltip_text_set() """ if style: elm_object_item_tooltip_style_set(self.obj, style) @@ -234,7 +234,7 @@ cdef class ToolbarItem(WidgetItem): """ Get the style for this object tooltip. """ cdef const_char_ptr style - style = elm_object_item_style_get(self.obj) + style = elm_object_item_tooltip_style_get(self.obj) if style == NULL: return None return style diff --git a/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd b/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd index 44d532d..68ba9a3 100644 --- a/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd +++ b/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd @@ -309,6 +309,22 @@ cdef extern from "Elementary.h": void elm_object_item_data_set(Elm_Object_Item *item, void *data) void elm_object_item_del(Elm_Object_Item *item) evas.c_evas.Evas_Object* elm_object_item_widget_get(Elm_Object_Item *it) + void elm_object_item_del_cb_set(Elm_Object_Item *it, evas.c_evas.Evas_Smart_Cb del_cb) + evas.c_evas.Eina_Bool elm_object_item_cursor_engine_only_get(Elm_Object_Item *it) + void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, evas.c_evas.Eina_Bool engine_only) + const_char_ptr elm_object_item_cursor_style_get(Elm_Object_Item *it) + void elm_object_item_cursor_style_set(Elm_Object_Item *it, const_char_ptr style) + const_char_ptr elm_object_item_cursor_get(Elm_Object_Item *it) + void elm_object_item_cursor_set(Elm_Object_Item *it, const_char_ptr cursor) + void elm_object_item_cursor_unset(Elm_Object_Item *it) + const_char_ptr elm_object_item_tooltip_style_get(Elm_Object_Item *it) + void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const_char_ptr style) + void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const_char_ptr text) + void elm_object_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, void *data, evas.c_evas.Evas_Smart_Cb del_cb) + void elm_object_item_tooltip_unset(Elm_Object_Item *it) + void elm_object_item_part_content_set(Elm_Object_Item *it, const_char_ptr part, evas.c_evas.Evas_Object* content) + evas.c_evas.Evas_Object* elm_object_item_part_content_get(Elm_Object_Item *it, const_char_ptr part) + evas.c_evas.Evas_Object* elm_object_item_part_content_unset(Elm_Object_Item *it, const_char_ptr part) double elm_config_scale_get() void elm_config_scale_set(double scale) @@ -726,6 +742,8 @@ cdef extern from "Elementary.h": char* elm_genlist_item_cursor_style_get(Elm_Object_Item *item) void elm_genlist_item_cursor_engine_only_set(Elm_Object_Item *item, evas.c_evas.Eina_Bool engine_only) evas.c_evas.Eina_Bool elm_genlist_item_cursor_engine_only_get(Elm_Object_Item *item) + Elm_List_Mode elm_genlist_mode_get(evas.c_evas.Evas_Object *obj) + void elm_genlist_mode_set(evas.c_evas.Evas_Object *obj, Elm_List_Mode mode) # Generic Grid evas.c_evas.Evas_Object *elm_gengrid_add(evas.c_evas.Evas_Object *parent) @@ -864,6 +882,7 @@ cdef extern from "Elementary.h": Elm_Object_Item *elm_menu_item_separator_add(evas.c_evas.Evas_Object *obj, Elm_Object_Item *parent) evas.c_evas.Evas_Object *elm_menu_object_get(Elm_Object_Item *it) evas.c_evas.Eina_List *elm_menu_item_subitems_get(Elm_Object_Item *item) + void elm_menu_item_icon_name_set(Elm_Object_Item *it, const_char_ptr icon) # Panel evas.c_evas.Evas_Object *elm_panel_add(evas.c_evas.Evas_Object *parent) -- 1.7.8.5
From 9c1373860dc0d3d4ff53ad70d537fd0b7ab20464 Mon Sep 17 00:00:00 2001 From: Martin Jansa <martin.ja...@gmail.com> Date: Mon, 12 Mar 2012 11:47:11 +0100 Subject: [PATCH 2/4] python-elementary: Elm_Genlist_Item_Flags was renamed to Elm_Genlist_Item_Type Signed-off-by: Martin Jansa <martin.ja...@gmail.com> --- .../elementary/elementary.c_elementary_genlist.pxi | 8 ++++---- .../include/elementary/c_elementary.pxd | 14 ++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_genlist.pxi b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_genlist.pxi index fba1a78..0cce0fb 100644 --- a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_genlist.pxi +++ b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_genlist.pxi @@ -665,7 +665,7 @@ cdef class Genlist(Object): prm = (item_class, item_data, ret, func) item = elm_genlist_item_append(self.obj, &item_class.obj, <void*>prm, parent, - <Elm_Genlist_Item_Flags>flags, cb, + <Elm_Genlist_Item_Type>flags, cb, <void*>prm) if item != NULL: ret._set_obj(item, prm) @@ -719,7 +719,7 @@ cdef class Genlist(Object): prm = (item_class, item_data, ret, func) item = elm_genlist_item_prepend(self.obj, &item_class.obj, <void*>prm, parent, - <Elm_Genlist_Item_Flags>flags, cb, + <Elm_Genlist_Item_Type>flags, cb, <void*>prm) if item != NULL: ret._set_obj(item, prm) @@ -773,7 +773,7 @@ cdef class Genlist(Object): <void*>prm, NULL, before, - <Elm_Genlist_Item_Flags>flags, cb, + <Elm_Genlist_Item_Type>flags, cb, <void*>prm) if item != NULL: ret._set_obj(item, prm) @@ -827,7 +827,7 @@ cdef class Genlist(Object): <void*>prm, NULL, after, - <Elm_Genlist_Item_Flags>flags, cb, + <Elm_Genlist_Item_Type>flags, cb, <void*>prm) if item != NULL: ret._set_obj(item, prm) diff --git a/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd b/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd index 68ba9a3..61ee6a0 100644 --- a/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd +++ b/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd @@ -126,9 +126,11 @@ cdef extern from "Elementary.h": ELM_FLIP_CUBE_LEFT ELM_FLIP_CUBE_RIGHT - ctypedef enum Elm_Genlist_Item_Flags: + ctypedef enum Elm_Genlist_Item_Type: ELM_GENLIST_ITEM_NONE - ELM_GENLIST_ITEM_SUBITEMS + ELM_GENLIST_ITEM_TREE + ELM_GENLIST_ITEM_GROUP + ELM_GENLIST_ITEM_MAX ctypedef enum Elm_Genlist_Item_Scrollto_Type: ELM_GENLIST_ITEM_SCROLLTO_NON # no scrollto @@ -706,10 +708,10 @@ cdef extern from "Elementary.h": void elm_genlist_bounce_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool h_bounce, evas.c_evas.Eina_Bool v_bounce) void elm_genlist_homogeneous_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool homogeneous) void elm_genlist_block_count_set(evas.c_evas.Evas_Object *obj, int n) - Elm_Object_Item *elm_genlist_item_append(evas.c_evas.Evas_Object *obj, Elm_Genlist_Item_Class *itc, void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, evas.c_evas.Evas_Smart_Cb func, void *func_data) - Elm_Object_Item *elm_genlist_item_prepend(evas.c_evas.Evas_Object *obj, Elm_Genlist_Item_Class *itc, void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Flags flags, evas.c_evas.Evas_Smart_Cb func, void *func_data) - Elm_Object_Item *elm_genlist_item_insert_before(evas.c_evas.Evas_Object *obj, Elm_Genlist_Item_Class *itc, void *data, Elm_Object_Item *parent, Elm_Object_Item *before, Elm_Genlist_Item_Flags flags, evas.c_evas.Evas_Smart_Cb func, void *func_data) - Elm_Object_Item *elm_genlist_item_insert_after(evas.c_evas.Evas_Object *obj, Elm_Genlist_Item_Class *itc, void *data, Elm_Object_Item *parent, Elm_Object_Item *after, Elm_Genlist_Item_Flags flags, evas.c_evas.Evas_Smart_Cb func, void *func_data) + Elm_Object_Item *elm_genlist_item_append(evas.c_evas.Evas_Object *obj, Elm_Genlist_Item_Class *itc, void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Type flags, evas.c_evas.Evas_Smart_Cb func, void *func_data) + Elm_Object_Item *elm_genlist_item_prepend(evas.c_evas.Evas_Object *obj, Elm_Genlist_Item_Class *itc, void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Type flags, evas.c_evas.Evas_Smart_Cb func, void *func_data) + Elm_Object_Item *elm_genlist_item_insert_before(evas.c_evas.Evas_Object *obj, Elm_Genlist_Item_Class *itc, void *data, Elm_Object_Item *parent, Elm_Object_Item *before, Elm_Genlist_Item_Type flags, evas.c_evas.Evas_Smart_Cb func, void *func_data) + Elm_Object_Item *elm_genlist_item_insert_after(evas.c_evas.Evas_Object *obj, Elm_Genlist_Item_Class *itc, void *data, Elm_Object_Item *parent, Elm_Object_Item *after, Elm_Genlist_Item_Type flags, evas.c_evas.Evas_Smart_Cb func, void *func_data) Elm_Object_Item *elm_genlist_selected_item_get(evas.c_evas.Evas_Object *obj) evas.c_evas.Eina_List *elm_genlist_selected_items_get(evas.c_evas.Evas_Object *obj) evas.c_evas.Eina_List *elm_genlist_realized_items_get(evas.c_evas.Evas_Object *obj) -- 1.7.8.5
From 639f119f2c8dbfd2aee862079a9f4111f582b285 Mon Sep 17 00:00:00 2001 From: Martin Jansa <martin.ja...@gmail.com> Date: Mon, 12 Mar 2012 13:09:04 +0100 Subject: [PATCH 3/4] python-elementary: drop anchorblock/anchorview, they were merged to entry in r68802 Signed-off-by: Martin Jansa <martin.ja...@gmail.com> --- BINDINGS/python/python-elementary/Makefile.am | 4 - .../python-elementary/elementary/__init__.py | 2 +- .../elementary/elementary.c_elementary.pyx | 2 - .../elementary.c_elementary_anchorblock.pxi | 129 ------------- .../elementary.c_elementary_anchorview.pxi | 119 ------------ .../include/elementary/c_elementary.pxd | 33 ---- BINDINGS/python/python-elementary/tests/test.py | 6 - .../python-elementary/tests/test_anchorblock.py | 192 -------------------- .../python-elementary/tests/test_anchorview.py | 96 ---------- 9 files changed, 1 insertions(+), 582 deletions(-) delete mode 100644 BINDINGS/python/python-elementary/elementary/elementary.c_elementary_anchorblock.pxi delete mode 100644 BINDINGS/python/python-elementary/elementary/elementary.c_elementary_anchorview.pxi delete mode 100644 BINDINGS/python/python-elementary/tests/test_anchorblock.py delete mode 100644 BINDINGS/python/python-elementary/tests/test_anchorview.py diff --git a/BINDINGS/python/python-elementary/Makefile.am b/BINDINGS/python/python-elementary/Makefile.am index 566995a..e22112e 100644 --- a/BINDINGS/python/python-elementary/Makefile.am +++ b/BINDINGS/python/python-elementary/Makefile.am @@ -15,8 +15,6 @@ c_elementary_includes = \ c_elementary_deps = \ - elementary/elementary.c_elementary_anchorblock.pxi \ - elementary/elementary.c_elementary_anchorview.pxi \ elementary/elementary.c_elementary_background.pxi \ elementary/elementary.c_elementary_box.pxi \ elementary/elementary.c_elementary_bubble.pxi \ @@ -59,8 +57,6 @@ c_elementary_deps = \ # elementary tests are not actual unit tests but a test AND a nice example examples_files = \ - tests/test_anchorblock.py \ - tests/test_anchorview.py \ tests/test_bg.py \ tests/test_box.py \ tests/test_button.py \ diff --git a/BINDINGS/python/python-elementary/elementary/__init__.py b/BINDINGS/python/python-elementary/elementary/__init__.py index 53cb71f..e5af518 100644 --- a/BINDINGS/python/python-elementary/elementary/__init__.py +++ b/BINDINGS/python/python-elementary/elementary/__init__.py @@ -18,7 +18,7 @@ from c_elementary import Object, Window, Background, Icon, \ Box, Button, Scroller, Label, Toggle, Frame, Flip, Table, \ - Clock, Layout, Hover, Entry, AnchorView, AnchorBlock, Bubble, \ + Clock, Layout, Hover, Entry, Bubble, \ Photo, Hoversel, Toolbar, ToolbarItem, List, ListItem, Slider, \ Radio, Check, Pager, InnerWindow, Image, Spinner, Fileselector, FileselectorEntry, Notify, \ Separator, Progressbar, Menu, MenuItem, MenuItemSeparator, Panel, \ diff --git a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary.pyx b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary.pyx index 6502c3d..7d4aebb 100644 --- a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary.pyx +++ b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary.pyx @@ -207,8 +207,6 @@ include "elementary.c_elementary_layout.pxi" include "elementary.c_elementary_hover.pxi" include "elementary.c_elementary_entry.pxi" include "elementary.c_elementary_scrolled_entry.pxi" -include "elementary.c_elementary_anchorview.pxi" -include "elementary.c_elementary_anchorblock.pxi" include "elementary.c_elementary_bubble.pxi" include "elementary.c_elementary_photo.pxi" include "elementary.c_elementary_hoversel.pxi" diff --git a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_anchorblock.pxi b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_anchorblock.pxi deleted file mode 100644 index 4615d29..0000000 --- a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_anchorblock.pxi +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright (c) 2008-2009 Simon Busch -# -# This file is part of python-elementary. -# -# python-elementary is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# python-elementary is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with python-elementary. If not, see <http://www.gnu.org/licenses/>. -# - -class AnchorBlockInfo: - def __init__(self): - self.name = None - self.button = 0 - self.hover = None - self.anchor = (0, 0, 0, 0) - self.hover_parent = (0, 0, 0, 0) - self.hover_left = False - self.hover_right = False - self.hover_top = False - self.hover_bottom = False - -def _anchorblock_conv(long addr): - cdef Elm_Entry_Anchorblock_Info *ei = <Elm_Entry_Anchorblock_Info *>addr - ab = AnchorBlockInfo() - ab.name = ei.name - ab.button = ei.button - ab.hover = Hover(None, <object>ei.hover) - ab.anchor = (ei.anchor.x, ei.anchor.y, ei.anchor.w, ei.anchor.h) - ab.hover_parent = (ei.hover_parent.x, ei.hover_parent.y, - ei.hover_parent.w, ei.hover_parent.h) - ab.hover_left = ei.hover_left - ab.hover_right = ei.hover_right - ab.hover_top = ei.hover_top - ab.hover_bottom = ei.hover_bottom - return ab - -cdef class AnchorBlock(Object): - """ - Anchorblock is for displaying tet that contains markup with anchors like: - \<a href=1234\>something\</\> in it. These will be drawn differently and will - be able to be clicked on by the user to display a popup. This popup then - is intended to contain extra options such as "call", "add to contacts", - "open web page" etc. - - Signals that you can add callbacks for are: - - anchor,clicked - anchor called was clicked. event_info is anchor info - - AnchorBlockInfo - This signal can be bound with "callback_clicked_add" - """ - cdef object _cbs - def __init__(self, c_evas.Object parent): - """Initialize the Anchorblock - - @parm: B{parent} Parent window - """ - Object.__init__(self, parent.evas) - self._set_obj(elm_anchorblock_add(parent.obj)) - self._cbs = {} - - def callback_clicked_add(self, func, *args, **kargs): - """ Bound to signal "anchor, clicked" - - The callback should have the following signature: - callback(obj, ab, *args, **kwargs) - obj: the object raising the signal - ab: AnchorBlockInfo - - The value set is either the callback function or a tuple like - (callback, *args, **kwargs) - """ - return self._callback_add_full("anchor,clicked", _anchorblock_conv, - func, *args, **kargs) - - def callback_clicked_del(self, func): - return self._callback_del_full("anchor,clicked", _anchorblock_conv, - func) - - def hover_parent_set(self, c_evas.Object parent): - """ - Set the parent of the hover popup - - This sets the parent of the hover that anchorblock will create. See hover - objects for more information on this. - - @param: B{parent} The parent the hover should use - """ - elm_anchorblock_hover_parent_set(self.obj, parent.obj) - - def hover_parent_get(self): - """ - Get the parent of the hover popup - - @return: The parent the hover is using - """ - cdef c_evas.Evas_Object *parent - parent = elm_anchorblock_hover_parent_get(self.obj) - return evas.c_evas._Object_from_instance(<long> parent) - - def hover_style_set(self, style): - """ - Set the style that the hover should use - - This sets the style for the hover that anchorblock will create. See hover - objects for more information - - @param: B{style} The style to use - """ - elm_anchorblock_hover_style_set(self.obj, style) - - def hover_end(self): - """ - Stop the hover popup in the anchorblock - - This will stop the hover popup in the anchorblock if it is currently active. - """ - elm_anchorblock_hover_end(self.obj) - - -_elm_widget_type_register("anchorblock", AnchorBlock) diff --git a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_anchorview.pxi b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_anchorview.pxi deleted file mode 100644 index 3b116f9..0000000 --- a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_anchorview.pxi +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (c) 2008-2009 Simon Busch -# -# This file is part of python-elementary. -# -# python-elementary is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# python-elementary is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with python-elementary. If not, see <http://www.gnu.org/licenses/>. -# - -class AnchorViewInfo: - def __init__(self): - self.name = None - self.button = 0 - self.hover = None - self.anchor = (0, 0, 0, 0) - self.hover_parent = (0, 0, 0, 0) - self.hover_left = False - self.hover_right = False - self.hover_top = False - self.hover_bottom = False - -def _anchorview_conv(long addr): - cdef Elm_Entry_Anchorview_Info *ei = <Elm_Entry_Anchorview_Info *>addr - av = AnchorViewInfo() - av.name = ei.name - av.button = ei.button - av.hover = Hover(None, <object>ei.hover) - av.anchor = (ei.anchor.x, ei.anchor.y, ei.anchor.w, ei.anchor.h) - av.hover_parent = (ei.hover_parent.x, ei.hover_parent.y, - ei.hover_parent.w, ei.hover_parent.h) - av.hover_left = ei.hover_left - av.hover_right = ei.hover_right - av.hover_top = ei.hover_top - av.hover_bottom = ei.hover_bottom - return av - -cdef class AnchorView(Object): - """ - This is just like the Anchorblock object, but provides a scroller to hold - the text automatically. - - Signals that you can add callbacks for are: - - anchor,clicked - anchor called was clicked. event_info is anchor info - - AnchorViewInfo - This signal can be bound with "callback_clicked_add" - """ - - cdef object _cbs - def __init__(self, c_evas.Object parent): - """Initialize the Anchorview - - @parm: B{parent} Parent window - """ - Object.__init__(self, parent.evas) - self._set_obj(elm_anchorview_add(parent.obj)) - self._cbs = {} - - def callback_clicked_add(self, func, *args, **kargs): - """ Bound to signal "anchor, clicked" - - The callback should have the following signature: - callback(obj, av, *args, **kargs) - obj: the object raising the signal - ab: AnchorViewInfo - - The value set is either the callback function or a tuple like - (callback, *args, **kargs) - """ - return self._callback_add_full("anchor,clicked", _anchorview_conv, - func, *args, **kargs) - - def callback_clicked_del(self, func): - return self._callback_del_full("anchor,clicked", _anchorview_conv, func) - - def bounce_set(self, h, v): - elm_anchorview_bounce_set(self.obj, h, v) - - def hover_parent_set(self, c_evas.Object parent): - """ - Set the parent of the hover popup - - This sets the parent of the hover that anchorview will create. See hover - objects for more information on this. - - @param: B{parent} The parent the hover should use - """ - elm_anchorview_hover_parent_set(self.obj, parent.obj) - - def hover_style_set(self, style): - """ - Set the style that the hover should use - - This sets the style for the hover that anchorview will create. See hover - objects for more information - - @param: B{style} The style to use - """ - elm_anchorview_hover_style_set(self.obj, style) - - def hover_end(self): - """ - Stop the hover popup in the anchorview - - This will stop the hover popup in the anchorview if it is currently active. - """ - elm_anchorview_hover_end(self.obj) - - -_elm_widget_type_register("anchorview", AnchorView) diff --git a/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd b/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd index 61ee6a0..5eb8d72 100644 --- a/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd +++ b/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd @@ -172,25 +172,6 @@ cdef extern from "Elementary.h": ELM_WRAP_LAST ctypedef struct Elm_Entry_Anchor_Info - ctypedef struct Elm_Entry_Anchorview_Info: - char *name - int button - evas.c_evas.Evas_Object *hover - evas.c_evas.Eina_Rectangle anchor, hover_parent - evas.c_evas.Eina_Bool hover_left - evas.c_evas.Eina_Bool hover_right - evas.c_evas.Eina_Bool hover_top - evas.c_evas.Eina_Bool hover_bottom - - ctypedef struct Elm_Entry_Anchorblock_Info: - char *name - int button - evas.c_evas.Evas_Object *hover - evas.c_evas.Eina_Rectangle anchor, hover_parent - evas.c_evas.Eina_Bool hover_left - evas.c_evas.Eina_Bool hover_right - evas.c_evas.Eina_Bool hover_top - evas.c_evas.Eina_Bool hover_bottom ctypedef char *(*GenlistItemLabelGetFunc)(void *data, evas.c_evas.Evas_Object *obj, const_char_ptr part) ctypedef evas.c_evas.Evas_Object *(*GenlistItemIconGetFunc)(void *data, evas.c_evas.Evas_Object *obj, const_char_ptr part) @@ -598,20 +579,6 @@ cdef extern from "Elementary.h": # Composite objects - # Anchorview object - evas.c_evas.Evas_Object *elm_anchorview_add(evas.c_evas.Evas_Object *parent) - void elm_anchorview_hover_parent_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Evas_Object *parent) - void elm_anchorview_hover_style_set(evas.c_evas.Evas_Object *obj, char *style) - void elm_anchorview_hover_end(evas.c_evas.Evas_Object *obj) - void elm_anchorview_bounce_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Eina_Bool h_bounce, evas.c_evas.Eina_Bool v_bounce) - - # Anchorblock object - evas.c_evas.Evas_Object *elm_anchorblock_add(evas.c_evas.Evas_Object *parent) - void elm_anchorblock_hover_parent_set(evas.c_evas.Evas_Object *obj, evas.c_evas.Evas_Object *parent) - evas.c_evas.Evas_Object *elm_anchorblock_hover_parent_get(evas.c_evas.Evas_Object *obj) - void elm_anchorblock_hover_style_set(evas.c_evas.Evas_Object *obj, char *style) - void elm_anchorblock_hover_end(evas.c_evas.Evas_Object *obj) - # Bubble object evas.c_evas.Evas_Object *elm_bubble_add(evas.c_evas.Evas_Object *parent) diff --git a/BINDINGS/python/python-elementary/tests/test.py b/BINDINGS/python/python-elementary/tests/test.py index 2ea017d..bc157c5 100644 --- a/BINDINGS/python/python-elementary/tests/test.py +++ b/BINDINGS/python/python-elementary/tests/test.py @@ -13,8 +13,6 @@ from test_table import table_clicked from test_clock import clock_clicked from test_hover import hover_clicked, hover2_clicked from test_entry import entry_clicked -from test_anchorview import anchorview_clicked -from test_anchorblock import anchorblock_clicked from test_toolbar import toolbar_clicked from test_hoversel import hoversel_clicked from test_list import list_clicked, list2_clicked, list3_clicked @@ -147,10 +145,6 @@ if __name__ == "__main__": # ("Storyboard", [ TODO # ("Naviframe", pager_clicked), # ]), - ("Text", [ - ("Anchorview", anchorview_clicked), - ("Anchorblock", anchorblock_clicked), - ]), ("Times & Dates", [ ("Clock", clock_clicked), ]), diff --git a/BINDINGS/python/python-elementary/tests/test_anchorblock.py b/BINDINGS/python/python-elementary/tests/test_anchorblock.py deleted file mode 100644 index 5b8fafd..0000000 --- a/BINDINGS/python/python-elementary/tests/test_anchorblock.py +++ /dev/null @@ -1,192 +0,0 @@ -#!/usr/bin/env python -import os -import elementary -import edje -import ecore -import evas - -#----- AnchorBlock -{{{- -def my_anchorblock_bt(bt, ab): - ab.hover_end() - -def my_anchorblock_anchor(obj, ei, ab): - if ei: - bt = elementary.Button(obj) - bt.label_set(ei.name) - ei.hover.content_set("middle", bt) - bt.show() - if (ei.hover_top): - bx = elementary.Box(obj) - bt = elementary.Button(obj) - bt.label_set("Top 1") - bx.pack_end(bt) - bt.callback_clicked_add(my_anchorblock_bt, ab) - bt.show() - bt = elementary.Button(obj) - bt.label_set("Top 2") - bx.pack_end(bt) - bt.callback_clicked_add(my_anchorblock_bt, ab) - bt.show() - bt = elementary.Button(obj) - bt.label_set("Top 3") - bx.pack_end(bt) - bt.callback_clicked_add(my_anchorblock_bt, ab) - bt.show() - ei.hover.content_set("top", bx) - bx.show() - if (ei.hover_bottom): - bt = elementary.Button(obj) - bt.label_set("Bot") - ei.hover.content_set("bottom", bt) - bt.callback_clicked_add(my_anchorblock_bt, ab) - bt.show() - if (ei.hover_left): - bt = elementary.Button(obj) - bt.label_set("Left") - ei.hover.content_set("left", bt) - bt.callback_clicked_add(my_anchorblock_bt, ab) - bt.show() - if (ei.hover_right): - bt = elementary.Button(obj) - bt.label_set("Right") - ei.hover.content_set("right", bt) - bt.callback_clicked_add(my_anchorblock_bt, ab) - bt.show() - -def my_anchorblock_edge_left(obj): - print "left" -def my_anchorblock_edge_right(obj): - print "right" -def my_anchorblock_edge_top(obj): - print "top" -def my_anchorblock_edge_bottom(obj): - print "bottom" - -def my_anchorblock_scroll(obj): - (x, y, w, h) = obj.region_get() - (vw, vh) = obj.child_size_get() - print "scroll %ix%i +%i+%i in %ix%i" % (w, h, x, y, vw, vh) - -def anchorblock_clicked(obj): - win = elementary.Window("anchorblock", elementary.ELM_WIN_BASIC) - win.title_set("Anchorblock") - win.autodel_set(True) - - bg = elementary.Background(win) - win.resize_object_add(bg) - bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) - bg.show() - - sc = elementary.Scroller(win) - sc.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) - win.resize_object_add(sc) - - sc._callback_add("edge_left", my_anchorblock_edge_left) - sc._callback_add("edge_right", my_anchorblock_edge_right) - sc._callback_add("edge_top", my_anchorblock_edge_top) - sc._callback_add("edge_bottom", my_anchorblock_edge_bottom) - sc._callback_add("scroll", my_anchorblock_scroll) - - bx = elementary.Box(win) - bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) - bx.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) - sc.content_set(bx) - bx.show() - - ic = elementary.Icon(win) - ic.file_set("images/logo_small.png") - ic.scale_set(0, 0) - ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1) - - bb = elementary.Bubble(win) - bb.text_set("Message 3") - bb.text_part_set("info", "10:32 4/11/2008") - bb.icon_set(ic) - ic.show() - bb.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) - bb.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) - ab = elementary.AnchorBlock(win) - ab.hover_style_set("popout") - ab.hover_parent_set(win) - ab.text_set("Hi there. This is the most recent message in the " - "list of messages. It has one <a href=tel:+614321234>+61 432 1234</a> " - "(phone number) to click on.") - ab.callback_clicked_add(my_anchorblock_anchor, ab) - bb.content_set(ab) - ab.show() - bx.pack_end(bb) - bb.show() - - ic = elementary.Icon(win) - ic.file_set("images/logo_small.png") - ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1) - - bb = elementary.Bubble(win) - bb.text_set("Message 2") - bb.text_part_set("info", "7:16 27/10/2008") - bb.icon_set(ic) - ic.show() - bb.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) - bb.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) - ab = elementary.AnchorBlock(win) - ab.hover_style_set("popout") - ab.hover_parent_set(win) - ab.text_set("Hey what are you doing? This is the second last message " - "Hi there. This is the most recent message in the " - "list. It's a longer one so it can wrap more and " - "contains a <a href=contact:john>John</a> contact " - "link in it to test popups on links. The idea is that " - "all SMS's are scanned for things that look like phone " - "numbers or names that are in your contacts list, and " - "if they are, they become clickable links that pop up " - "a menus of obvious actions to perform on this piece " - "of information. This of course can be later explicitly " - "done by links maybe running local apps or even being " - "web URL's too that launch the web browser and point it " - "to that URL.") - ab.callback_clicked_add(my_anchorblock_anchor, ab) - bb.content_set(ab) - ab.show() - bx.pack_end(bb) - bb.show() - - ic = elementary.Icon(win) - ic.file_set("images/logo_small.png") - ic.scale_set(0, 0) - ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1) - - bb = elementary.Bubble(win) - bb.text_set("Message 1") - bb.text_part_set("info", "20:47 18/6/2008") - bb.icon_set(ic) - ic.show() - bb.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) - bb.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) - ab = elementary.AnchorBlock(win) - ab.hover_style_set("popout") - ab.hover_parent_set(win) - ab.text_set("This is a short message") - ab.callback_clicked_add(my_anchorblock_anchor, ab) - bb.content_set(ab) - ab.show() - bx.pack_end(bb) - bb.show() - - sc.show() - - win.resize(320, 300) - - win.focus_set(True) - win.show() -# }}} - -#----- Main -{{{- -if __name__ == "__main__": - elementary.init() - - anchorblock_clicked(None) - - elementary.run() - elementary.shutdown() -# }}} -# vim:foldmethod=marker diff --git a/BINDINGS/python/python-elementary/tests/test_anchorview.py b/BINDINGS/python/python-elementary/tests/test_anchorview.py deleted file mode 100644 index 1a9fee7..0000000 --- a/BINDINGS/python/python-elementary/tests/test_anchorview.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python -import os -import elementary -import edje -import ecore -import evas - -#----- AnchorView -{{{- -def my_anchorview_bt(bt, av): - av.hover_end() - -def my_anchorview_anchor(obj, ei, av): - if ei: - bt = elementary.Button(obj) - bt.label_set(ei.name) - ei.hover.content_set("middle", bt) - bt.show() - if (ei.hover_top): - bx = elementary.Box(obj) - bt = elementary.Button(obj) - bt.label_set("Top 1") - bx.pack_end(bt) - bt.callback_clicked_add(my_anchorview_bt, av) - bt.show() - bt = elementary.Button(obj) - bt.label_set("Top 2") - bx.pack_end(bt) - bt.callback_clicked_add(my_anchorview_bt, av) - bt.show() - bt.label_set("Top 3") - bx.pack_end(bt) - bt.callback_clicked_add(my_anchorview_bt, av) - bt.show() - ei.hover.content_set("top", bx) - bx.show() - if (ei.hover_bottom): - bt = elementary.Button(obj) - bt.label_set("Bot") - ei.hover.content_set("bottom", bt) - bt.callback_clicked_add(my_anchorview_bt, av) - bt.show() - if (ei.hover_left): - bt = elementary.Button(obj) - bt.label_set("Left") - ei.hover.content_set("left", bt) - bt.callback_clicked_add(my_anchorview_bt, av) - bt.show() - if (ei.hover_right): - bt = elementary.Button(obj) - bt.label_set("Right") - ei.hover.content_set("right", bt) - bt.callback_clicked_add(my_anchorview_bt, av) - bt.show() - - -def anchorview_clicked(obj): - win = elementary.Window("anchorview", elementary.ELM_WIN_BASIC) - win.title_set("Anchorview") - win.autodel_set(True) - - bg = elementary.Background(win) - win.resize_object_add(bg) - bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) - bg.show() - - av = elementary.AnchorView(win) - av.hover_style_set("popout") - av.hover_parent_set(win) - av.text_set("This is an entry widget in this window that<br>" - "uses markup <b>like this</> for styling and<br>" - "formatting <em>like this</>, as well as<br>" - "<a href=X><link>links in the text</></a>, so enter text<br>" - "in here to edit it. By the way, links are<br>" - "called <a href=anc-02>Anchors</a> so you will need<br>" - "to refer to them this way.") - av.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) - av.callback_clicked_add(my_anchorview_anchor, av) - win.resize_object_add(av) - av.show() - - win.resize(320, 300) - - win.focus_set(True) - win.show() -# }}} - -#----- Main -{{{- -if __name__ == "__main__": - elementary.init() - - anchorview_clicked(None) - - elementary.run() - elementary.shutdown() -# }}} -# vim:foldmethod=marker -- 1.7.8.5
From 9c0f8d0e6df2d77c0d4d5398991bed44edd1f9a2 Mon Sep 17 00:00:00 2001 From: Martin Jansa <martin.ja...@gmail.com> Date: Mon, 12 Mar 2012 13:27:29 +0100 Subject: [PATCH 4/4] python-elementary: adapt gengrid/genlist bindings to added ELM_GENLIST_ITEM_SCROLLTO* param from r68897 Signed-off-by: Martin Jansa <martin.ja...@gmail.com> --- .../elementary/elementary.c_elementary_gengrid.pxi | 8 ++++---- .../elementary/elementary.c_elementary_genlist.pxi | 8 ++++---- .../include/elementary/c_elementary.pxd | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_gengrid.pxi b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_gengrid.pxi index c1a458e..0931b17 100644 --- a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_gengrid.pxi +++ b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_gengrid.pxi @@ -390,11 +390,11 @@ cdef class GengridItem(WidgetItem): def __set__(self, selected): self.selected_set(selected) - def show(self): - elm_gengrid_item_show(self.obj) + def show(self, scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN): + elm_gengrid_item_show(self.obj, scrollto_type) - def bring_in(self): - elm_gengrid_item_bring_in(self.obj) + def bring_in(self, scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN): + elm_gengrid_item_bring_in(self.obj, scrollto_type) def pos_get(self): cdef unsigned int x, y diff --git a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_genlist.pxi b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_genlist.pxi index 0cce0fb..e0d1651 100644 --- a/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_genlist.pxi +++ b/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_genlist.pxi @@ -426,11 +426,11 @@ cdef class GenlistItem(WidgetItem): def __set__(self, display_only): self.display_only_set(display_only) - def show(self, type): - elm_genlist_item_show(self.obj, type) + def show(self, scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN): + elm_genlist_item_show(self.obj, scrollto_type) - def bring_in(self, type): - elm_genlist_item_bring_in(self.obj, type) + def bring_in(self, scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN): + elm_genlist_item_bring_in(self.obj, scrollto_type) def tooltip_text_set(self, char *text): """ Set the text to be shown in the tooltip object diff --git a/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd b/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd index 5eb8d72..beec574 100644 --- a/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd +++ b/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd @@ -133,7 +133,7 @@ cdef extern from "Elementary.h": ELM_GENLIST_ITEM_MAX ctypedef enum Elm_Genlist_Item_Scrollto_Type: - ELM_GENLIST_ITEM_SCROLLTO_NON # no scrollto + ELM_GENLIST_ITEM_SCROLLTO_NONE # no scrollto ELM_GENLIST_ITEM_SCROLLTO_IN # to the nearest viewport ELM_GENLIST_ITEM_SCROLLTO_TOP # to the top of viewport ELM_GENLIST_ITEM_SCROLLTO_MIDDLE # to the middle of viewport @@ -696,8 +696,8 @@ cdef extern from "Elementary.h": evas.c_evas.Eina_Bool elm_genlist_item_expanded_get(Elm_Object_Item *item) void elm_genlist_item_display_only_set(Elm_Object_Item *it, evas.c_evas.Eina_Bool display_only) evas.c_evas.Eina_Bool elm_genlist_item_display_only_get(Elm_Object_Item *it) - void elm_genlist_item_show(Elm_Object_Item *item, Elm_Genlist_Item_Scrollto_Type type) - void elm_genlist_item_bring_in(Elm_Object_Item *item, Elm_Genlist_Item_Scrollto_Type type) + void elm_genlist_item_show(Elm_Object_Item *item, Elm_Genlist_Item_Scrollto_Type scrollto_type) + void elm_genlist_item_bring_in(Elm_Object_Item *item, Elm_Genlist_Item_Scrollto_Type scrollto_type) evas.c_evas.Evas_Object *elm_genlist_item_object_get(Elm_Object_Item *it) void elm_genlist_item_update(Elm_Object_Item *item) void elm_genlist_item_tooltip_text_set(Elm_Object_Item *item, char *text) @@ -747,8 +747,8 @@ cdef extern from "Elementary.h": void elm_gengrid_item_selected_set(Elm_Object_Item *item, evas.c_evas.Eina_Bool selected) evas.c_evas.Eina_Bool elm_gengrid_item_selected_get(Elm_Object_Item *item) - void elm_gengrid_item_show(Elm_Object_Item *item) - void elm_gengrid_item_bring_in(Elm_Object_Item *item) + void elm_gengrid_item_show(Elm_Object_Item *item, Elm_Genlist_Item_Scrollto_Type scrollto_type) + void elm_gengrid_item_bring_in(Elm_Object_Item *item, Elm_Genlist_Item_Scrollto_Type scrollto_type) evas.c_evas.Evas_Object *elm_gengrid_item_object_get(Elm_Object_Item *it) void elm_gengrid_item_update(Elm_Object_Item *item) void elm_gengrid_item_pos_get(Elm_Object_Item *item, unsigned int *x, unsigned int *y) -- 1.7.8.5
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel