Commit Graph

347 Commits

Author SHA1 Message Date
Daniel Juyung Seo d47a4adae4 gengrid, genlist, list, toolbar: Fix memory leak and enhance performance.
1. Fix memory leak by freeing eina_list.
2. Enhance performance by getting the item list when it is really
needed.

@fix
2014-12-26 18:41:48 +09:00
kabeer khan 8d4437b1f9 elm_list : Resolved TODO in elm_list.c and declared corresponding macros in elm_macros.h
Summary:
As mentioned in TODO replaced expressions in if statement with macros in elm_macros.

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: seoz, raster

Reviewed By: raster

Subscribers: raster

Differential Revision: https://phab.enlightenment.org/D1424
2014-12-16 20:01:04 +09:00
Anand efe737b3b8 List: Focus highlight when loop is enable
Summary:
Implemented focus highlight feature in list for vertical and horizontal looping
@feature

Test Plan: elementary_test->"List Focus" & "List Focus Horizontal"

Reviewers: singh.amitesh, nirajkr, seoz, eagleeye, raster

Subscribers: sachin.dev

Differential Revision: https://phab.enlightenment.org/D1216

Conflicts:
	src/lib/elm_list.c
2014-12-15 17:24:36 +09:00
Daniel Juyung Seo cead9c0ba2 index, list, menu: Optimize eo item usage.
Remove unnecessary pointer reference.
2014-11-25 21:55:39 +09:00
Daniel Juyung Seo 9b9a0267b7 list: Optimize eo item usage.
Remove unnecessary pointer reference.
2014-11-24 17:40:28 +09:00
Daniel Juyung Seo d31b51eccc list: Fix wrong eo item porting.
Fix egitu crash issue :)
Special thanks to davemds for letting me know python gdb
usage.
2014-11-24 17:40:28 +09:00
Daniel Zaoui 7e396432ef Object Items: replace most of del_pre functions with destructor.
This change is not simple because Elementary has not been built from the
first day to work with Eo. Code had to be adapted to fit the new design.

The del_pre that have not been replaced yet can return FALSE and
prevent deletion. For these classes, code modification has to be deeper
and will be done later.
2014-11-12 12:03:58 +02:00
Daniel Zaoui 05225b162e Object Items: remove data variable from widget item.
Now, data is stored in Eo layer via eo_key_data_set/get.

Two macros have been added to facilitate access.
2014-11-12 12:03:58 +02:00
Daniel Zaoui ef03bc098e Object Items: remove legacy APIs.
They are now generated by Eolian.
2014-11-12 12:03:58 +02:00
Daniel Zaoui b01d01528a Object Items: remove casts that are no more needed.
It includes casts to Eo, Elm_Object_Item and to specific items data.
This belongs to the cleaning phase of the object items porting to Eo.
2014-11-12 12:03:57 +02:00
Daniel Zaoui fffa035895 Elm List Item: Migrate to Eo 2014-11-12 12:03:56 +02:00
Daniel Zaoui a9b13f7633 Elm Widget Item: Migrate to Eo
Since we want to support legacy inheritance mechanism, code is not
finished and will have to be cleaned when all the items are ported.
2014-11-12 11:52:10 +02:00
Lukasz Stanislawski 2ca1f8a75a atspi: properly include at-spi headers.
Summary:
Change requested by TAsn. Previuosly AT-SPI headers were kept private
and included directly into elementary source code. From now on,
AT-SPI headers can be included from Elementary.h public header, however
will be marked as beta APIs.

Commit includes following changes:
* include all atspi headers into new elm_interfaces.h header.
* marking all at-spi interfaces methods/properties as @protected.
* wrap all common headers with EFL_BETA_API_SUPPORT.
* make some common APIs visible in lib, by adding EAPI attribute
  (if someone decides to use beta APIs).

Test Plan: out-off tree build with gcc, g++

Reviewers: tasn

Reviewed By: tasn

Subscribers: seoz, q66, kuuko

Maniphest Tasks: T1721

Differential Revision: https://phab.enlightenment.org/D1528
2014-10-17 16:57:26 +01:00
Daniel Zaoui 718b4900fb List: fix annoying Valgrind unitialized value. 2014-10-06 11:30:58 +03:00
Tom Hacohen 7629c147eb Eo related: Change according to recent changes in eo_add().
For more info check out a7560dbc61 in
the EFL tree.
2014-09-25 17:39:34 +01:00
Daniel Juyung Seo 4b4ed72181 gengrid, list: Use newly introduced macros internally.
ELM_GENGRID_DATA_GET_FROM_ITEM and ELM_LIST_DATA_GET_FROM_ITEM.
2014-08-22 03:09:10 +09:00
Daniel Juyung Seo 408e334bf6 list: Fixed ELM_OBJECT_SELECT_MODE_NONE codes and added more DISPLAY_ONLY check.
Also made an internal function to check it easily.

@fix
2014-08-22 03:02:01 +09:00
Daniel Juyung Seo 509112325d gengrid, genlist, list, toolbar: Fixed DISPLAY_ONLY select mode for an object.
DISPLAY_ONLY select mode for elm_xxx_item_select_mode_set works fine but
elm_xxx_select_mode_set was broken.

@fix
2014-08-22 01:12:38 +09:00
Lukasz Stanislawski 09b9ef0bc0 atspi: expose more actions through atspi bus.
Summary:
Main purpose of exposing widget actions and keyboard shortcuts
is to allow accessibility clients to implement alternative methods
of GUI navigation.

Reviewers: z.kosinski

Reviewed By: z.kosinski

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D1227
2014-07-25 11:58:16 +02:00
Hosang Kim 105ee3660d genlist : Add item looping on flag.
Summary: When item looping feature is on and press up or down key, screen seems to be frozen.

Test Plan: elementary_test -to "genlist focus" -> click item looing enable -> move list up and down

Reviewers: anand.km, seoz, woohyun

Subscribers: singh.amitesh

Differential Revision: https://phab.enlightenment.org/D1193
2014-07-22 15:11:18 +09:00
Anil Kumar Nahak 76e3372531 Focus: first item should be focused when there is no focused/selected item
Summary: First item of widget should be focused when focus comes to the widget for first time.

Test Plan:
elementary_test -to "Genlist Focus"
elementary_test -to "Gengrid Focus"
elementary_test -to "List Focus"
elementary_test -to "toolbar Focus"

Reviewers: seoz

Differential Revision: https://phab.enlightenment.org/D1135
2014-07-21 18:55:55 +09:00
Daniel Juyung Seo 2bfacb3942 list: fixed wrong indentation. 2014-07-20 00:59:23 +09:00
Jaeun Choi 6ce0f6b4b2 list: call "selected" callback after set focus to the selected item
in current code, when a list item is selected, "selected" callback is called first
and then focus is set to the item. this is a problem if another widget, popup for instance,
is created on top of the list in the callback function. in such a case, the popup should
get focused (not the list item). this patch fixes it by changing the order.

@fix
2014-07-18 19:34:13 +09:00
wonguk.jeong 2b062fe557 list: remove annoying error msg on select
Summary:
on select below message was shown,

ERR<19329>: elm_main.c:1556 elm_object_widget_check() safety check failed: obj == NULL

Test Plan:
1. terminology -> options -> keys -> select item -> check error message
2. elementary_test -> list2 -> select topmost item -> check error message

Reviewers: raster, cedric, seoz, Hermet

Reviewed By: Hermet

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D1185
2014-07-15 12:10:04 +09:00
Daniel Juyung Seo e7e1b39014 gengrid, list: removed unnecessary condition check.
This is a successive commit of aac6e071e.
2014-07-10 00:46:52 +09:00
Amitesh Singh 24ce4835c1 list/genlist/gengrid/toolbar: removed unused smart data member prev_focused_item.
Reviewers: raster, seoz

CC: seoz

Differential Revision: https://phab.enlightenment.org/D1119
2014-07-07 12:20:54 +09:00
efl 589a8ba74f List: Focus does not move if it's set on item content object.
Summary:
If focus is set on item content object, it's treated as a
different object which results the focus deadlock. So, every
time whenever focus sets on item content object, we need to
unset and set the focus on genlist object. Thanks to Seoz for
the idea.

Test Plan: elementary_test -to "list focus"

Reviewers: seoz, SanghyeonLee, eagleeye

CC: seoz

Differential Revision: https://phab.enlightenment.org/D973
2014-06-11 14:14:28 +09:00
efl f6b7012329 List: Focus set on item content objects, the item content objects should be checked whether type widget or not.
Summary:
Upon focus set, if the item content object is not of type widget
(could be of type Evas_Rectnagle) focus set/get is not possible.
ERR<17428>:eo lib/eo/eo.c:603 _eo_call_resolve() in elm_widget.eo.c:112: you called func 'elm_obj_widget_can_focus_get' (239) which is unknown in class 'Evas_Rectangle'.
ERR<17428>:eo lib/eo/eo.c:788 _eo_api_op_id_get() in elm_widget.eo.c:212: unable to resolve regular api func 'elm_obj_widget_child_can_focus_get' 0xb75e6f40 in class 'Evas_Rectangle'

Test Plan: elementary_test -to "list focus" (make focus_on_selection enabled and give a right key event when a content object is focused)

Reviewers: seoz, SanghyeonLee, eagleeye

CC: seoz

Differential Revision: https://phab.enlightenment.org/D972
2014-06-11 14:07:01 +09:00
Zbigniew Kosinski 9ce23f0004 atspi:Set roles for widgets
Reviewers: stanluk, m.jagiello, raster

Differential Revision: https://phab.enlightenment.org/D930
2014-06-11 11:07:16 +09:00
Tom Hacohen efa41c7d75 Elm: Update code to use the new class names generated by eolian. 2014-06-03 11:54:44 +01:00
Daniel Juyung Seo 7357290056 genlist: fixed wrong item focus set on item_focus_set API call.
Reset the last_focused_item on _item_focus_set_hook.
This fixes the issue which sets the focus to the wrong item when the
focus is set by an API.

Reproduction step:
elementary_test -> genlist focus -> click an item (not the 2nd item) -> click "Focus 2nd
Item after 1.5 seconds" button.
Focus is not moved to the 2nd item.

@fix
2014-05-26 22:08:13 +09:00
Daniel Juyung Seo d6a8cea94c list: Use convenient macro ELM_RECTS_INCLUDE. 2014-05-11 23:06:59 +09:00
Daniel Juyung Seo 45e8b4c82e focus: Change new API names related to focus auto scrolling.
elm_config_focus_auto_scroll_bring_in_enabled_get/set()
 ->
elm_config_focus_autoscroll_mode_get/set()

The main reason is that bring_in_enabled_get/set() APIs are too restricted
and thus not flexible. I got more requirements for the focus autoscrolling
such as none, wholely visible not just bring_in and show. So it is correct
to add mode_set/get() APIs for the focus auto scrolling.

Thanks god, we've found this before the release :)

@feature
2014-05-11 22:46:16 +09:00
Daniel Juyung Seo 4f8614e866 Revert "remove all scrolling changes for focused items."
This reverts commit 377179bdaf84aa1a86621cdfa64ed43613ab9d45.

The main claim of https://phab.enlightenment.org/T1205 was fixed in
the previous commit 30cada369. This code will be modifed again in the
next commit due to the api change during development life cycle.

Note: do not blindly revert this commit if you have any problem with
widget item focus. This commit is not related to any fundamental cause
of the issues. If you have a problem, please contact me first.

seojuyung2@gmail.com or SeoZ on IRC.

Thanks.
2014-05-11 22:42:15 +09:00
Daniel Juyung Seo dfead75366 gengrid/genlist/list/toolbar: Do not set the focus to the item on widget's first focus.
This was introduced during 1.10 development phase but this changed the
default focus behavior and got a lot of complaints. (especially from
discomfitor)

So I would like to comment this out now and make it optional on 1.11
by keeping the default behavior.
2014-05-11 21:21:51 +09:00
Daniel Juyung Seo 5407141ac6 list: added comments about an unused function.
Fixing this issue is not trivial and will bring another issues like crashing.
So it is better to fix this in a development phase by refactoring list.

To fix this issue, the following are needed:
1. it->walking concept should be adopted instead of using just sd->walking.
   sd->walking was introduced in beb418d6
2. elm_widget_item_del() should be called instead of the combination of
   _elm_list_item_free() + elm_widget_item_free()
   This was introduced in f343011d
2014-05-10 23:44:28 +09:00
Daniel Juyung Seo 254798b47e list: initialize some internal variables on item free not item del pre.
This fixes variable initialize problems related to focus. This can be
reproduced when you enable focus highlight/animation and reuse
elm_list by clearing it.

This problem occurred because list item del pre is never been called.
This bug will be addressed in a next commit.
2014-05-10 23:44:28 +09:00
zmike fe4fae4954 Revert "Revert "focus: Removed unused parameter from an internal focus function.""
This reverts commit b8549f3e83a8592145a50085182583adead2c74e.

this build system is bad and whoever did the eo integration should not feel pleased with themselves.
2014-05-07 01:13:19 -04:00
zmike 54eabd94e2 Revert "focus: Removed unused parameter from an internal focus function."
This reverts commit 5832b692aa5f68a2924bd7886390d489eb13aefb.

broke build
2014-05-07 01:08:04 -04:00
zmike be636e58be remove all scrolling changes for focused items.
this.is.BROOOOOOOOOOOOOOOKEEEEEEEEEEEEEEEEEEENNNNNNNNNNNNNNNNNNNNNNNNNNNNN.

SERIOUSLY.

you cannot go scrolling all over the place in every widget that has a scroller just because the widget gets focus. what user wants that? no user anywhere, under any circumstances, ever, in all of history.

if you dare to put this back in, I will continue to remove it for the rest of eternity until it never, ever scrolls in any unwanted case. the focused item doesn't have to always be in the viewport, and should never be moved into the viewport [[[[[[[ except to maintain an already-existing position inside the viewport ]]]]]]]

too much of my time wasted on this stupid "feature" which should have been MUCH more thoroughly tested and reviewed before it was merged.

T1205 STILL NOT FIXED
2014-05-07 01:06:30 -04:00
Daniel Juyung Seo d0380e3342 focus: Removed unused parameter from an internal focus function.
is_next parameter is not used for
elm_widget_focus_highlight_geometry_get() function.
But this parameter was not cleaned up in the commit 5320cca.
2014-05-07 00:05:07 +09:00
Amitesh Singh 8e0ffb8332 config: Added two APIs to enable/disable focus auto scroll bring in feature.
Summary:
 Summary:
    - APIs
      - elm_config_focus_auto_scroll_bring_in_enabled_set
      - elm_config_focus_auto_scroll_bring_in_enabled_get
    - list/genlist/toolbar/gengrid: Using this feature for scrolling for focus movement.
    - Added test case in "List Focus", "Genlist Focus", "Toolbar Focus" and "Gengrid Focus"

    @feature

Test Plan: elementary_test->"List Focus", "Genlist Focus", "Toolbar Focus" & "Gengrid Focus".

Reviewers: raster, seoz

CC: seoz

Differential Revision: https://phab.enlightenment.org/D799
2014-04-27 04:15:26 +09:00
Daniel Juyung Seo b173ed7c85 genlist/gengrid/list: Fix first on_focus call correctly by checking focus highlight.
First on_focus call should consider focus highlight enable status and
do the different job according to that.

This can be tested in "genlist 7" and "genlist focus" examples in
elementary_test.
2014-04-22 23:18:04 +09:00
Carsten Haitzler 9d55fab418 entry: wrong viewport value calculation issue fix
Summary:
Issue: As entire scroller edje co-ordinates was being taken instead of the actual viewport value,
if in scroller edje more parts are added apart from just "elm.swallow.content", then the viewport value
set will be wrong. hence the selection handlers will not hide when they have to hide.

solution: Instead of taking scroller edje's geometry, get the actual viewport values.
To get viewport x,y a new scrollable interface is also added.

signed-off by: Shilpa Singh <shilpa.singh@samsung.com>

@fix

Test Plan: Selection handlers have to hide correctly when the text is scrolled in a scrolled entry, if the scroller edc of entry has more parts added other than elm.swallow.content, then when we scroll the selection handlers are not hidden correctly.

Reviewers: jaehwan, woohyun, seoz, Hermet, raster

CC: govi, rajeshps, thiepha

Differential Revision: https://phab.enlightenment.org/D674
2014-04-21 12:31:49 +09:00
ChunEon Park 5ab6a7739f widgets - don't handle the events(key,mouse) if the object is disabled.
we can prevent to handle the widget events from the widget infra,
if the object is disabled.

conceptually, disabled object should not be interacted to user input(key, mouse)
2014-04-16 10:59:43 +09:00
Jaeun Choi fbcadfd87a list: apply key binding
Summary: This patch applies key binding to elm_list.

Test Plan: elementary_test > list > check key events

Reviewers: Hermet, raster, seoz

Differential Revision: https://phab.enlightenment.org/D727
2014-04-15 13:13:57 +09:00
Tom Hacohen 8f65677fff list: Adjusted to Eo2. 2014-04-10 09:35:01 +01:00
Daniel Juyung Seo 5cc573f361 list: Fixed _elm_list_item_content_focus_set in case the first content
is focused.

The function should return true when the first content of an item is
focused.

@fix
2014-04-07 04:13:01 +09:00
Daniel Juyung Seo 42483955ca list: Refactor direction key event handling routine in list.
- Added internal function _elm_list_elm_widget_event_direction.
- Simplified cascaded if statements.
- Note: focus_on_selection feature is still broken.
2014-04-07 04:12:41 +09:00
Daniel Juyung Seo a80edec90c list: Fixed _elm_list_item_content_focus_set misbehavior.
- Moved a check for direction at the start of the function based on the
horizontal mode configuration.
- Removed unnecessary focus set to edje object. In this case, that item
will get the focus automatically by elm widget item focus
infrastructure.

But this focus_on_selection feature is still broken. I need to fix them
more.
2014-04-07 03:10:21 +09:00