Commit Graph

81 Commits

Author SHA1 Message Date
Tiago Rezende Campos Falcao 113ad55d2e Focus Linear Chain for some Widgets
Containers implemented (and with test):
* Win
* Box
* Scroller
* Layout
* Panel

SVN revision: 52686
2010-09-24 14:47:59 +00:00
Tiago Rezende Campos Falcao 66d585a905 Elm_widget_can_focus only return if can have focus.
If want the old comportament, use elm_widget_can_focus_receive_get()

SVN revision: 52684
2010-09-24 14:47:52 +00:00
Iván Briano 7255d69dc1 Highlight in theme wins over generic object
Still needs stuff done in themes and widgets code to make it functional.
It will start coming tomorrow morning. (My morning)



SVN revision: 52608
2010-09-22 22:33:57 +00:00
Gustavo Lima Chaves 79de9a1792 Fix reverting focus to the previous widget.
There's currently in Elementary a way for widgets that die to revert
    focus to whoever had it first, but it was broken in some cases.




SVN revision: 52550
2010-09-21 18:55:32 +00:00
Tiago Rezende Campos Falcao ba4e1c944e Elementary event propagation to widget parents
The Elm Widgets aren't disposed exactly as trees of Evas Objects, so
need store widget parents separated from Evas Smart Object parents.

The Evas propagation events don't satisfy all use cases. Like managing
events in elm_win or try if one parent manage the event before manage
it.

In this, I add hook to each widget manage their interested events or
from their child.

SVN revision: 52527
2010-09-21 02:02:24 +00:00
Iván Briano 6879d7fdad Begins highlight on focused object.
There's still work to do here, particularly in the theme, but it has
something nice and fun to see the code working.
The idea behind this:
Window tracks focused object and sends the highlight object(s) to it. These
are simple edje objects, one on top, one below the focused widget for nice
effects. Widgets can choose to ignore the highlight and this will be sent to
the parent object, if it doesn't ignore it as well.
About the bottom object, it doesn't work now. For the most part, focused
widget will always be a member of some smart object, so stacking won't work
and the desired effect is nowhere to be seen. This will be worked out later.
To be done now:
 - Let the theme for a widget define its own highlight, disabling if needed
 the standard one for those objects.
 - Needed base in code to allow animations when switching focus. All in theme.
 - Properly test all widgets and fix some things that will most likely work
 in weird ways, given the nature of Evas/Edje and how Elementary makes use
 of them.
 - Forgot the rest, stay tuned, test, report, give ideas, plant a tree.

Work started by glima, continued with some refactors by me when he
decided he needed vacations.


SVN revision: 52524
2010-09-20 22:18:58 +00:00
Iván Briano 66707ffab4 Fix typo, we want the parent, not some random data
SVN revision: 52506
2010-09-20 19:54:48 +00:00
Bruno Dilly 66e512552f Add support on Elm to customized cursors
Widgets can have customized cursors setting it with elm_object_cursor_set.
Widget's item can use elm_X_item_cursor_set to set a different cursor
for each item.
It will work only if HAVE_ELEMENTARY_X for now, but support for themeable
cursors is planned.



SVN revision: 52382
2010-09-17 18:24:10 +00:00
Carsten Haitzler bb4e5a8f8a just a sec. back that out.. someone has broken icons.. and now i dont
want to hunt thru recent commits to find it.



SVN revision: 52335
2010-09-16 05:33:19 +00:00
이명재 6b36a90eae From: 이명재 <mjae.lee@samsung.com>
Subject: patch for elm_widget_show_region_set function



SVN revision: 52334
2010-09-16 05:23:34 +00:00
Carsten Haitzler 68f5b4119b oooh big cleanup. internal elm widget api cleaned up a bit.
SVN revision: 52178
2010-09-13 07:56:23 +00:00
Gustavo Sverzut Barbieri 494c1a6dca Tooltips: split owner/eventarea, allow subitems to have indepentent tooltips.
Now owner widget (elm_widget) is just used to listen for theme changes
and create/destroy the tooltip data. The actual mouse events operates
on all Evas_Object and is the one where tooltip data is actually
stored.

The public API is basically the same, just the event_info is now NULL
to avoid confusion.

The internal API introduces elm_object_sub_tooltip_content_cb_set()
and as the first parameter the eventarea. While this may be confusing,
as the second parameter is the actual elementary object, it is the one
that all other calls receive, like elm_object_tooltip_hide() or
elm_object_tooltip_unset(), thus it does make sense to have such order.

Also internal API, elm_widget_item_tooltip_* functions were
added. They are a variation of the widget API to handle its items, as
such the func() gets one more parameter: item, and the del_cb() gets
the item as event_info (that's why the public widget version got
event_info always NULL, to not confuse with this one!)

Widgets with items that makes sense to have tooltips got extra API:
  * toolbar
  * list
  * gengrid
  * genlist




SVN revision: 52173
2010-09-12 21:05:13 +00:00
Gustavo Sverzut Barbieri 5c61931bd1 Welcome Tooltips.
Tooltips are set using elm_object_tooltip_content_cb_set(), that
returns the desired Evas_Object to use as contents, or using the
helper function elm_object_tooltip_text_set() that uses that
underneath.

The behavior is controlled part on elm_config, theme and user
application. In elm_config one defines the tooltip timeout. The theme
defines the padding around cursor x/y and window border x/y, as well
as the look and feel. Last but not least, the user application may
want to change the tooltip style with elm_object_tooltip_style_set().

Have fun!

This code was initially written by Tiago Falcao and Fabiano Fidencio,
I did some API review and changed some bits.

TODO: elm widget item support, like with toolbar items.




SVN revision: 52150
2010-09-11 00:52:33 +00:00
Gustavo Sverzut Barbieri 5e7dfe1c8c Introducing Elm_Widget_Item: common ground for widget sub items.
Lots of widgets have items that are not Evas_Object of type elm_widget
per se, like Elm_List_Item or Elm_Toolbar_Item. They all have, or
should have, some common attributes and functions such as data,
del_cb, a view object and a parent/owner widget. Thus this is being
provided and will be later used in future patches.

Right now I opted to hide elm_widget_item_del_cb_set(),
elm_widget_item_data_get(), elm_widget_item_data_set() inside
elm_priv.h and keep the old functions as wrappers to the new. But
maybe in future we can remove them and have the user to call the
common function.

Future extensions will use this base, such as tooltip support.




SVN revision: 52116
2010-09-10 01:54:05 +00:00
Carsten Haitzler 9edf419558 and umm... work... and .. struff.. ugh. don't ask.
SVN revision: 51851
2010-09-03 00:08:11 +00:00
Carsten Haitzler 27298797f0 finally! flip works! happy!
SVN revision: 51833
2010-09-02 10:25:05 +00:00
Carsten Haitzler cda4f422b1 ooof flippidy-do-da... working much better.
SVN revision: 51831
2010-09-02 09:58:52 +00:00
Carsten Haitzler 42ec2033bb fix some most unfortunate lack of clip honorning :)
SVN revision: 51773
2010-08-31 06:20:33 +00:00
Lucas De Marchi 5fa0945d28 Constify parameters of elm_widget_drag_*_get functions
Change "Evas_Object*" to "const Evas_Object*" in:
 * elm_widget_drag_lock_x_get()
 * elm_widget_drag_lock_y_get()
 * elm_widget_drag_child_locked_x_get()
 * elm_widget_drag_child_locked_y_get()

By: Fabiano Fidencio <fidencio@profusion.mobi>



SVN revision: 50177
2010-07-10 22:05:37 +00:00
Bruno Dilly d350f3a293 Change elm functions elm_object_signal_listen to elm_object_signal_callback_add
and elm_object_signal_unlisten to elm_object_signal_callback_del


SVN revision: 49926
2010-06-28 15:32:20 +00:00
Bruno Dilly 8d644e43ed Implement elm_object_signal_listen and unlisten
elm_object_signal_listen add callback(s) for edje object(s) of the widget.
elm_object_signal_unlisten delete this callback.
They're general functions, and every widget should set hooks for these.

It will improve elm extension flexibility. We have already
elm_object_signal_emit to send signals for the widgets theme, adding callbacks
is an expected step.

It provides a way to support sound on widgets. For example, in the elm extension
we could emit "file_to_play", "play", and add a callback with
elm_object_signal_listen for "*", "play". The callback function could use
the signal received to request the file to be played by the backend
sound system.

Certainly we should look for a better way to provide support for sound
on edje, but for now, it does the work. And anyway, it's only a use case
for these new functions.



SVN revision: 49868
2010-06-25 22:38:32 +00:00
Carsten Haitzler 643d06dd16 aaah safety delete - nash nash nash. for you.
SVN revision: 49825
2010-06-24 02:54:03 +00:00
Iván Briano 1e173716de Fix the usage of API_ENTRY macro in the new funcion _newest_focus_order_get
By: Thiago Ribeiro Masaki <masaki@profusion.mobi>



SVN revision: 49785
2010-06-21 18:16:45 +00:00
Carsten Haitzler e8e922488e fix focus issue if child has focus and is deleted (or in this case not
- hidden) - focuse most recent focused widget.



SVN revision: 49780
2010-06-21 07:39:49 +00:00
Bruno Dilly db550353a8 Add elm_object_signal_emit
This function sends a signal to the edje object of the obj.
It's a general function, and every widget should set a hook for this.

I'm setting a hook only for the spinner now, but soon I will work on other widgets.



SVN revision: 49681
2010-06-15 14:11:13 +00:00
Fabiano Fidêncio 7746e8b514 From: Fabiano Fidêncio <fidencio@profusion.mobi>
Changing return of Eina_Bool functions that were not EINA_TRUE or
EINA_FALSE in Edje.
In Elementary too ...



SVN revision: 49470
2010-06-05 13:12:45 +00:00
Carsten Haitzler d888b71dba theme -> can specify a new theme for an object andit gets inherited. need to
add tests.



SVN revision: 48771
2010-05-12 01:03:46 +00:00
Carsten Haitzler 83286a1d84 scroller in scroller.... works! well with scrollers for now (elm_scroller).
need to fix up some other instances of use of elm_smart_scroller. it's a 1
liner.



SVN revision: 48667
2010-05-07 13:21:45 +00:00
Carsten Haitzler 27012f5b0e sorry.. elm_widget is internal. dont document it. not to be known outside of
elm. :)



SVN revision: 48535
2010-05-02 01:44:38 +00:00
Vincent Torri 86d5c41583 * remove shadow declarations
* missing initializer in Evas_Smart_Class (the data field was missing)


SVN revision: 48197
2010-04-21 07:46:03 +00:00
Boris Faure 1ca26086db elm: add lots of doc! Thanks to Mike (zmike/discomfitor)
SVN revision: 47944
2010-04-12 08:12:02 +00:00
Gustavo Sverzut Barbieri 86bf257913 fix _elm_widget_type_check() to return FALSE on failure.
SVN revision: 47497
2010-03-27 01:19:44 +00:00
Gustavo Sverzut Barbieri dbd9fcce4d Enable check of Elementary widgets and getting the first widget that
is parent of an Evas_Object.

With these in place, one can check if the given object is an elmentary
widget and query for the first widget that is parent, so we can add
them and keep focus chain correct, useful for Edje externals, patch to
follow.




SVN revision: 47374
2010-03-22 21:36:59 +00:00
Carsten Haitzler 2257453fe4 example of how to work around heirachy to go back up the tree - but wont work
for going bck down. i.e. - focus.



SVN revision: 47302
2010-03-17 01:08:39 +00:00
Carsten Haitzler 5ceae54321 fix more runtime wornings... added ELM_ERROR_ABORT! :)
SVN revision: 47195
2010-03-14 03:48:22 +00:00
Gustavo Sverzut Barbieri e01d72fe26 Use eina_stringshare_replace to avoid crashes.
By: Rafael Fonseca <rfonseca@profusion.mobi>



SVN revision: 47187
2010-03-13 21:01:26 +00:00
Vincent Torri b07e49d435 remove unused parameter in the library.
I won't do this everyday, and i won't touch the tests.


SVN revision: 47093
2010-03-09 17:51:30 +00:00
Carsten Haitzler f3034c8196 more members for newer struct - init to null.
SVN revision: 47092
2010-03-09 16:56:31 +00:00
Carsten Haitzler 6792e2db2c warning fix 1. :)
SVN revision: 47074
2010-03-09 07:30:48 +00:00
Carsten Haitzler 91e01aa86e patch from discomfitor <- check type of widget on api call and return if not
the right type



SVN revision: 47073
2010-03-09 06:15:39 +00:00
Gustavo Sverzut Barbieri 818032a68f elm_layout: deferred sizing_eval to calculate (pre-render) phase.
This plays well with edje's own deferred calculations. Usually size
hints are set on children and edje will flag itself as dirty, but real
calculations are deferred to "calculate" phase before rendering.

For now this unbreaks elm_layout with contents... but other types such
as GROUP, BOX and TABLE remain broken: when they change their internal
state (ie: child object is packed into box or table), this will not
trigger elm_layout.

That said, we need a better solution. Maybe ask edje to emit signals
when one of its children change hints (it already listen to this
anyway), in this case elm_layout should listen to those instead of
connecting directly to objects given through elm_layout_content_set().



SVN revision: 43752
2009-11-17 16:32:45 +00:00
Gustavo Sverzut Barbieri 16fec09332 nasty bug, die die dieeeeeeeeeeeeee
took me some time to spot the problem was in the nasty typo... :-(



SVN revision: 43681
2009-11-13 22:18:43 +00:00
Jonathan Atton 7be1d94aa2 Elm: use evas_object_event_callback_del_full() everywhere and improve elm_notify
SVN revision: 43217
2009-10-22 22:10:23 +00:00
Carsten Haitzler 07dee04e84 dont grab focus if widget cant focus.
SVN revision: 43197
2009-10-22 12:04:55 +00:00
Christopher Michael 8eab5228ea Remove unused variables.
Formatting.



SVN revision: 43144
2009-10-18 06:03:03 +00:00
Carsten Haitzler 82540069b8 fix scale_get(). thanks marco
SVN revision: 43010
2009-10-11 05:43:42 +00:00
Jonathan Atton 82a9eb4bc5 elementary, new widget: slideshow. See elementary_test
SVN revision: 42660
2009-09-23 22:56:47 +00:00
Carsten Haitzler fa8fac0c23 comments.
SVN revision: 42339
2009-09-08 04:41:36 +00:00
Christopher Michael 158f95cd37 Simplier check for disabled state.
SVN revision: 42022
2009-08-26 16:52:53 +00:00
Vincent Torri e2be9d2b24 remove trailing spaces
SVN revision: 41261
2009-07-07 06:46:51 +00:00