Commit Graph

333 Commits

Author SHA1 Message Date
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
Amitesh Singh 68b3bc3583 focus: Renamed the config APIs _item_focus_on_selection_get/set to _item_select_on_focus_disabled_set/get()
Summary: - List: On Enter/Space/KP_Enter key press, focused item gets selected.

Test Plan: elementary_test->List Focus

Reviewers: seoz, raster

Reviewed By: seoz

CC: seoz

Differential Revision: https://phab.enlightenment.org/D704
2014-04-06 00:10:55 +09:00
Amitesh Singh 1479664ec0 list/genlist/gengrid/toolbar: Fix - _nearest_visible_item_get() should always return an item.
Test Plan:
Bug:
- elementary_test->genlist/list/toolbar/gengrid Focus
- Resize the window to a state when no item is fully visible. only partially visible.
- Move Focus from outer widgets (Up/Down/Left/right buttons) to list/genlist/gengrid/toolbar.
- Focus goes away (size - 0). Reason: _nearest_visible_item_get returns NULL.

@fix

Reviewers: seoz, raster, woohyun

Reviewed By: raster

CC: seoz, nirajkr, anand.km

Differential Revision: https://phab.enlightenment.org/D696
2014-04-04 12:04:04 +09:00
Amitesh Singh 73b16ef210 focus: Added optional focus feature - item focus on selection.
Summary:
Currenly focus and selection happens together. This patch makes item focus
on selection optional by configuration and API.

- configuration: "item_focus_on_selection".
- API: elm_config_item_focus_on_selection_get/set.
- Implemented item_focus_on_selection feature in elm list.
@feature

Test Plan: elementary_test->List focus

Reviewers: raster, seoz, woohyun

CC: seoz

Differential Revision: https://phab.enlightenment.org/D676
2014-04-03 19:11:57 +09:00
Amitesh Singh e8ce63b33d list: Added focus movement on widget items by mouse in.
Summary: @feature

Test Plan: elementary_test->List Focus

Reviewers: raster, cedric, woohyun

Reviewed By: raster

CC: seoz

Differential Revision: https://phab.enlightenment.org/D662
2014-04-01 20:23:24 +09:00
Daniel Zaoui 78d4ae4258 Eolian: Integration of List 2014-03-31 16:00:46 +03:00
Hosang Kim 7b4a539e9e list: Add item loop feature
Summary:
If item loop feature is enabled, item is moved infinitely.

1. add new widget api - item_loop_enabled
2. add smart event using new config - elm_list.c
3. add demo - test_list.c/list_focus

Reviewers: seoz, woohyun, raster, jaehwan, Hermet

CC: singh.amitesh, c

Differential Revision: https://phab.enlightenment.org/D619
2014-03-24 17:35:07 +09:00
Daniel Juyung Seo e79bbb2fb5 list: Check disabled status of an item in nearest visible item.
Also added a test for it.
2014-03-24 01:52:07 +09:00
Daniel Juyung Seo e5f9c254bd list: Fixed item multi/single selection routine to skip disabled item correctly.
@fix
2014-03-24 00:48:11 +09:00
Daniel Juyung Seo 7f0f50fbc6 list/genlist/gengrid: Internal refactoring of item_focused/unfocused
codes.

- Added a check for focus highlight enable status before calling focus
signal to edje.
- Used obj instead of WIDGET(it) because that is used many times.
2014-03-23 23:29:16 +09:00
Daniel Juyung Seo 26f4d3fcd9 list: Removed unnecessary check in focused_item_get.
focused_item is NULL if the list is unfocused so do not need to check if
the list is focused. Just return focused_item.
2014-03-23 23:28:26 +09:00
Daniel Juyung Seo 0288e89f17 list: Fixed annoying list scrolling issue when focus is back to list.
This patch is a list version of genlist patch cc827fef6.

Now, list does not autoscroll to last focused/selected item when the list
is focused. It tries to find the nearest visible item instead of the
last focused/selected item.
2014-03-23 19:14:18 +09:00
Daniel Juyung Seo fad3a2dfc4 list/genlist/gengrid: Handle on_focus event on focus set only for key
event.

When you use mouse(touch) that triggers mouse up event, the
focus/selection movement is done by mouse up callback, so don't need to
handle on_focus event when mouse(touch) is used.

You can reproduce the bug by the following step.
1. launch elementary_test -> list focus, genlist focus, gengrid focus
2. focus an item (by touch, by key)
3. move focus to left button (by touch, by key)
4. click an another item (by touch)
5. previously focused item will be unfocused again even it was unfocused
at step #3/

Special thanks to Amitesh for the report.
2014-03-23 16:48:10 +09:00
Daniel Juyung Seo ba36abd6d8 list: Added missing return from my previous commit ac0b3c. 2014-03-22 21:50:21 +09:00
Daniel Juyung Seo 65c948ca93 list/genlist/gengrid: Call item_show not bring_in on focus.
Elm 1.9 does item_show not bring_in so let's keep the consistency. I
will make this optional later.
2014-03-22 18:38:00 +09:00