This patch add tooltip and mouse cursor support for items of genlist
and gengrid and extends the elementary tests for tooltips and
cursor
By: Thiago Ribeiro Masaki <masaki@profusion.mobi>
SVN revision: 52805
yeah, i should do the tooltips one as well, but it's boring so I'll
leave the implementation as the exercise for someone else :-)
and yeah, we should have that inside edje, like a nice description {
cursor: "xterm"; }, but that's not going to happen in Edje 1.0.
SVN revision: 52793
If you have problem seeing stuff due theme misses, then use:
export EINA_LOG_LEVELS=elementary:4
and you should see some reports of missing groups with files. This
helps a lot for genlist and its complex way of naming items :-)
SVN revision: 52791
instead of refetching and revalidating Widget_Data everytime, just
handle it. Although this will save some instructions, the goal is to
make code shorter and less error prone.
SVN revision: 52790
With this commit is now possible to not use theme's cursor (default behevior)
that could be overriding cursors defined by the engine.
SVN revision: 52761
Basically, get the group from widget theme, using the string passed to
elm_object_cursor_set, get hot spots x and y from the theme (keeps the object
and these two integers on cursor struct).
Cursor is set with ecore_evas_object_cursor_set()
Some functions to change style were added to the api.
SVN revision: 52760
Raster, if possible give it a try as it seems that most of the focus
steal and clear is your code and maybe you have a clue of what is
happening. For instance I have no clue why that global focus_order
counter that always grows.
This test is now exposing various problems, some of them is what bug
us in Editje, some is what eve's url bar, etc:
- press "Give focus to scrolled entry", then press it again. See
that the scrolled entry looses its focus, although we're giving it
focus? This is related to the object loosing focus but not
detecting it, thus the next elm_widget_focus_steal() will just
ignore it and say "you already have focus, do nothing!"
- start pressing "TAB", after a full iteration, the next iteration
just goes up to the last item. If you keep doing that, at some
point the TAB will just not work anymore. If you change PARENT
from "bx" to "win", then it does not happen. But adding to "bx"
would be the correct thing to do (more logical structure)
SVN revision: 52709
Most of the errors referred to the cast from int to void* in x86_64.
This need conversion to long, as intermediate.
Some calls to elm_widget not exposed API were changed to their similar
at elm_object API.
Elm_Photo never call "drop" smart callback, but i leave the callback
in tests.
And others API methods are included in Elementary.h
Now elementary build with -Wall -Werror in x86_64.
SVN revision: 52691
it's simple. only allows 1 level of theme. would need an advanced
dialog to allow:
theme1:theme2:theme3:theme4... etc.
also no browsing for themes - just whats instaleld n system and user
dirs atm.
SVN revision: 52667
This defines a new theme group for elm_scrolled_entry:
"elm/scroller/entry/$THEME". Themes that wants to support the icon/end
feature in scrolled entry should implement parts "elm.swallow.icon" and
"elm.swallow.end". Black&White theme has been changed, Effeniht changes
to come on a later commit.
SVN revision: 52657
These two functions mimic what is already done in gengrid object.
* elm_gengrid_item_show : scroll immediatly to the item
* elm_gengrid_item_bring : scroll with an animation to the item
SVN revision: 52620
Subject: Re: [E-devel] Transition Layout for elm_box
There are 2 simple problems with the committed code. First, it would
be better to locate the struct _Elm_Box_Transition in elm_box.c
instead of Elementary.h.in, because users should create it with
elm_box_transition_new and changing its contents can be dangerous. And
second, in struct _Transition_Animation_Data, I declared 4 coordinate
variables as int, instead of using Evas_Coords.
I am sending both patches attached.
SVN revision: 52560
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
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
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
Subject: patch for indentation and using enum in elementary
I send the patch for elementary.
In this patch, I fixed the indentation of Elementary.h.in.
In addition, I use EINA_TRUE or EINA_FALSE instead of 1 or 0.
EVAS_HINT_EXPAND and EVA_HINT_FILL is used instead of 1.0 and -1.0.
Thanks.
SVN revision: 52447
Calling resize_object_del() when a resize_object died calls
elm_widget_sub_object_del(), which sets the parent of the (now dead)
widget to NULL. The problem is that this breaks some of the
stuff done in the smart_del() method in the smart class for widgets,
like reverting focus to whoever held it previously.
SVN revision: 52387
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
don't connect twice to the same object (happened whenever not using
sub-items), then the callback was being called twice.
also set the dead object pointer to NULL, so we avoid operating on it
any further.
SVN revision: 52354
The els_scroller.c:_smart_add() as disabling event propagation on
itself, that way an owner object (ie: elm_scroller,
elm_scrolled_entry, elm_list, ...) was not getting the mouse events it
gets, thus any evas_object_event_callback_add(..., EVAS_CALLBACK_MOUSE_*...)
were not working (effectively breaking tooltips).
Seems that the reason to do so was double-event reporting. It could
happen as the elm_smart_scroller has an event_obj that repeats event,
thus the object behind it, the edje_object, could get and possibly
repeat them as well.
As we are sure event_obj always get the events, but not sure of the
edje, as it depend on user contents, the logic is now changed to stop
propagation of the edje instead (it still processes the events! just
not propagates to elm_smart_scroller).
I hope this patch does not break anything, but please check your software!
SVN revision: 52350
It was elm_panes_horizontal_is, but grep shows no matches.
So I'm guessing horiztonal_get.
Seems was originally comited by watchwolf when the file was added.
SVN revision: 52287
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
Whenever object starts hiding Elementary sends "elm,action,hide", so
when it aborts such action it must always emit "elm,action,show" and
the best place to do this is at _elm_tooltip_hide_anim_stop().
Note: _elm_tooltip_hide() calls _elm_tooltip_hide_anim_stop() and thus
would show the object, but this is void as right after that the
tooltip object is deleted and thus the signal is never processed and
as we don't go back to main loop, nothing changes on screen.
SVN revision: 52167
I always wished tooltips would be less boring, and so we have them all
fancy and nice :-)
* tooltip theme can request a timeout before hiding. This means we
can fade out the tooltips nicely.
* tooltip theme get enough information to track its origin. The
current theme will show a small tip where it was created, and
dynamically follows it. The graphics kinda suck, but I tried to
achieve a cartoon-like buble using Inkscape.
* label style is set to "tooltip". I'm providing a default with
dark-gray text and 8 as size.
SVN revision: 52166
The Elm_Object_Layer is a convenience enumeration to help standardize
values so we don't ride into problems in future.
Tooltip has now its own layer, so set it there and avoid newly created
objects being created on top of them (usually they show on top of
everything as they are the last created, thus the topmost on the
default layer)
SVN revision: 52158
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
This patch changes all Elm_*_Item to use new infrastructure of
Elm_Widget_Item. This patch is basically a find-and-replace, but even
that was a bit tricky since every code had different names for the
same things, particularly for "view" and "widget" the names ranged
from "o"/"obj" to "base"/"o", quite confusing!
It is worth noting that Genlist and variants that adopted its "item
class" style such as Gengrid and Slideshow already provide a "del()"
callback there and I'm keeping them, however we should reconsider if
it is good to remove them and use elm_widget_item_del_cb_set()
instead. The drawback is that onde would have to set it, while the
other is done automatically when you create the object with the
class. Nonetheless this patch already introduces support to use
elm_widget_item_pre_notify_del(), but it will be void in such code as
nobody ever sets it.
Some new setters and getters were introduced to normalize code... and
they would be required once people write python-bindings for them,
like index and carousel.
SVN revision: 52118
IF we're replacing the pan_obj, then we should disconnect from the old
in order to avoid receive useless callbacks... actually if it is an
external pan object and we die and it does not, we may end crashing
due it calling function callbacks with garbage data.
SVN revision: 52117
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
At del_hook() stuff are already gone and invalid access may
happen. Doing it from del_pre_hook you still have things working nice.
Also refactor the destructor to do recursion and stop allocate list
nodes to avoid it... simpler.
SVN revision: 52114
The correct way is to use EINA_INLIST_CONTAINER_GET() that allows the
Eina_Inlist structure to be moved around in the structure. Right now
it did work fine, but I want to change the Elm_Genlist_Item later and
this change will be required and it is better to come in a separate
patch.
SVN revision: 52112
From _del_pre_hook() we first delete pan_smart and then call
elm_genlist_clear() to rip off children, however genlist_clear was
always doing evas_object_smart_callback_call() on it.
SVN revision: 52111
Like was already done to other widgets by bdilly, this patch adds the
possibility to send signals to elm_gengrid's theme.
P.S: lfelipe, ahi esta mi primer commit :P
SVN revision: 52109
Im going to clear the fileselector widget, I will make the theme use
a layout instead of a fixed box and also I will clear the api that have
silly names atm
If you have suggestions please speak now
DaveMDS
SVN revision: 51966
this is clear when building with -fvisibility=hidden and it breaks
with undefined reference as elm_selection_get() is not marked as EAPI.
SVN revision: 51956
This is not doing much now, just the version field in the struct,
some stuff stolen from E and a base to use when new things are added.
There are some comments in the code about what to do in certain cases
that E does not have, like a system update, new config and apps linked
to the old version still running when the config Atoms are updated. These
things we'll probably be addressed as they are needed, as well as come
clean up in quick code I ditched in there, but it would be good to do so
with more feedback from the good guys around that like to break SVN
every now and then.
Since the commit message is already long enough, I'm adding some more crap
just for the sake of doing so. I could go with some tl;dr thing as well,
but I don't feel like resuming what's up there.
Have a nice day.
SVN revision: 51843
A calendar is a widget that allows the user to select a date. It has
support to adding marks (holidays and checks by default). The calendar
is displayed month at a time.
Weekdays names and the function used to format month and year to
be displayed can be set, giving more flexibility to this widget.
SVN revision: 51584
Apply badzero.cocci, badnull.coci and badnull2.cocci
This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:
code before patch ||code after patch
===============================================================
return a == NULL; return !a;
return a != NULL; return !!a;
func(a == NULL); func(!a);
func(a != NULL); func(!!a);
b = a == NULL; b = !a;
b = a != NULL; b = !!a;
b = a == NULL ? c : d; b = !a ? c : d;
b = a != NULL ? c : d; b = a ? c : d;
other cases:
a == NULL !a
a != NULL a
SVN revision: 51487
1. Selection now works with the buttons in elementary_test.
2. Selection with ctrl+v does not print ERR:elementary elm_widget.c:1373 _elm_widget_type_check() Passing Object: (nil), of type: '(unknown)' when expecting type: 'entry' anymore.
SVN revision: 51216
This is still the default in the object, but this allows us to auto-align according to natural text direction without breaking functionality.
SVN revision: 50967
* Remove vim modelines:
find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;
* Remove leading blank lines:
find . -name '*.[cxh]' -exec sed -i '/./,$!d'
If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0
SVN revision: 50816
Subject: [E-devel] New elm pager "slide" and "slide_invisible" styles
Hi everyone,
I have done 2 new style for the pager widget:
"slide" and "slide_invisible"
They work different from the other styles: new (pushed) pages
comes from right and the old go out left, while popped pages
goes out from right. It works like the enna browser, or like all the
"browser lists" on iphone.
The patch include the 2 new styles, a new elementary_test
page called "Pager Slide", a little code for elm_pager.c that was
needed
for the new style to work and simple update for the other existing
styles.
The patch is located at:
http://pastebin.com/jSbg0wb9
I can commit this myself, just give me the go ;)
SVN revision: 50559
Subject: [E-devel] [PATCH] Genlist longpress timeout
Hello,
I've made a patch that makes the genlist capable of configuring the
timeout for the longpress event.
The patch compiles but I haven't tested it yet. However it's very
simple, it should work out of the box.
Patch is the output of "svn diff" from revision 49809.
SVN revision: 50558
elm_thumb widget, all the stuff about alignement and crop are not
used anymore.
By: Rafael "15 years experience" Fonseca <rfonseca@profusion.mobi>
SVN revision: 50388
* remove printf
* no more realize the current item in item_add(). The last item is always and it is the previous item of the first item, consequently a new item was built each time a item vas added :/
SVN revision: 50386
ELM_FLIP_CUBE_RIGHT, ELM_FLIP_CUBE_LEFT
As you can imagine the new animations make the flip as a rotating cube,
the 2 contents are on 2 different faces.
SVN revision: 50287
I've added elm_label features. That are fontsize, color, background color and
ellipsis (cutting text to fit widget size) features. Most of the property
setting API is wrapping to label tag set.
The rllipsis feature checks part size and cuts character to fit its size.
SVN revision: 50275
PS: probably other widgets that use swallow should have this, so
objects that have minimum size of 0x0 (like list/genlist) can be
forced to some size using group.min.
SVN revision: 50274
Elm_Notify: set orient = -1, else the default orientation (0) will be not set because the orient does not change (see the test in elm_notify_orient_set())
SVN revision: 50270
As spotted by Brian, we were not cancelling the thumbnail generation
on hide/delete, when the generation finished garbage would be used and
we'd segv. This commit fixes this, also removing the useless
is_generating, as it can be interpreted from wd->id (-1 is not
generating).
As an optimization, we now just delete the view object if it changed
between image and edje (video), otherwise we reuse it.
SVN revision: 50268
Currently, elm_thumb is passing the wrong pointer to the
smart_callback_call function, so the callbacks are not being
called. The attached patch fix that.
By: Rafael Fonseca <rfonseca@profusion.mobi>
SVN revision: 50258
- Add a new layout : expose
- Add a way to display more than 1 slide at a time, the number of slides displayed is defined in the layout
SVN revision: 50256
- Add a way to display a photo by keeping the ratio AND the theme can display something around the photo (border ...). The way I use is maybe a bit crappy (embryo, offset ...) but I do not know a better way.
- Add a new style (with a shadow). The default style has no changes
If you do not like my way, revert the commit and commit your way :)
Elm_Slideshow:
- Use elm_photo in the test
- Add a black background
SVN revision: 50248
The notnull.cocci script from Coccinelle finds places where you check if a
variable is NULL, but it's known not to be NULL. The check can be safely
removed. For example, this code would be caught by notnull:
if (!var) return;
if (var && var->fld) { ... }
It's needless to check again if var is not NULL because if it's in fact NULL,
it would have returned on the previous "if". This commit removes all the
trivial places where this pattern happens. Another patch will be generated for
the more complex cases.
SVN revision: 50241
Subject: [E-devel] [PATCH] [Elementary] Fix flickering issue on
elm_slideshow
Hey guys,
the attached patch solves the issue of the previous image flickering
after the transition is over on elm_slideshow.
SVN revision: 50190
Subject: elm_animator
an animator wrapper - can be attached to an object (and be deleted if
object is deleted) and otherwise call a callback with a 0.0->1.0 value
where along the path you should be etc. etc. - ie handle higher level
animation runs.
SVN revision: 50039
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
Also useful for arguments about widget_top or top_widget.
After all it's not a widget of type top, but rather the widget at the top.
Your views? Opinions on a postcard plase.
SVN revision: 49814
elm_<widget>_icon_set was changed to the better form and the signals
was passed to hidden icons when one icon is changed/removed.
Moreover, when changed by {icon,content}_set the old {icon,content}
will be deleted.
By: Fabiano Fidencio <fidencio@profusion.mobi>
SVN revision: 49706
States and program craeted to allow that the user can change/delete
an icon without the icon remain floating on the screen
By: Fabiano Fidencio <fidencio@profusion.mobi>
SVN revision: 49703
When params_free is made icons/content were deleted.
It's not necessary with the new API for icon/content set in elementary.
By: Fabiano Fidencio <fidencio@profusion.mobi>
SVN revision: 49702
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
Some systems, like the Gentoo, copy the svn contents somewhere before
doing the autoconf, this may result in lack of .svn and thus minor
version "0".
This patch introduces the $SVN_REPO_PATH to say where the svn checkout
containing the ".svn" directory is.
SVN revision: 49594
And create a new test for panel, a bit more complex, that should
be extended to show panels with all the 4 orientations, when they're
implemented.
SVN revision: 49202
- Name index item as Elm_Index_Item
- Add some other index functions:
+ Item find
+ Data get/set
+ Letter get
I think this stuff will make easier to create index for
dynamically created lists.
SVN revision: 49171
(thanks k-s).
Fix formatting & remove some whitespace.
NB: Please take notice, do not format if statements like this:
if (val && !val2).
You will get spanked...hard :P
Proper if formatting should be:
if ((val) && (!val2))
This avoids potential evaluation errors (as was recently seen in
ecore_con).
SVN revision: 49111
This way, Elementary handles stacking, resizing and moving of the
object by itself, instead of letting it loose and stacked over
everything else.
SVN revision: 48945
Someday someone should take care to make elementary real smart objects
and benefit from everything it brings... yes, types more, but it is
worth -- and we added macros to help the type-a-lot.
SVN revision: 48831
Function that include items to an elm list in a sorted way defined by
an Eina_Compare_Cb function.
Author: Bruno Dilly <bdilly@profusion.mobi>
SVN revision: 48777