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
* 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
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
elm.diff is a patch which implements a number of convenience functions
for various widgets, as well as some new features for toolbar and panel.
With the panel widget, I've written a number of calls related to
toolbar items and the selected item in particular, allowing
manipulation of the selection and toolbar items more easily. These
functions are as follows:
+elm_toolbar_item_get_all() returns a Eina_List* of all the toolbar
items
+elm_toolbar_item_get_first() returns the first toolbar item
+elm_toolbar_item_get_last() returns the last toolbar item
+elm_toolbar_item_get_next() returns the item after the
currently selected item
+elm_toolbar_item_select_next() moves the selection to the next valid
item
+elm_toolbar_item_select_first() selects the first valid item
+elm_toolbar_item_select_last() selects the last valid item
+elm_toolbar_item_find_by_label() returns the first Elm_Toolbar_Item
matching "label"
The new panel functions I have written allow for control of the panel's
state from code, and are as follows:
+elm_panel_hidden_set() sets the panel's toggle state to a bool value
and runs the animation
+elm_panel_hidden_get() returns whether the panel is hidden
+elm_panel_toggle() toggles the panel to its other state
The remainder of the functions are just general wd->data returns which
were missing, the functionality of which may be of use to people.
SVN revision: 48355
Add support to automatic proxy events from Elementary to Edje using
callbacks described with Evas_Smart_Cb_Description and set to
Evas_Smart_Class or per-instance with
evas_object_smart_callbacks_descriptions_set().
Right now elm_widget is not subclassable, so there is no way to define
class signals, just instance signals.
Just doing it for button, lots of widgets to do... If you can help,
please follow the process:
* see example at src/lib/elm_button.c, copy it.
* read your widget documentation at Elementary.h
* grep for evas_object_smart_callback_call(), see if they are all
documented in Elementary.h, or if there are some missing. Fix Elementary.h
* paste and change based on fixed Elementary.h My recommendation is
to create "static const char []" variables and replace all
evas_object_smart_callback_call() with that, to force sync.
With callback descriptions pre-defined and using the same pointer with
a custom variation evas_object_smart_callback_call_ptr() we may later
optimize signal calling heavily, removing the requirement to call
eina_stringshare_add()/eina_stringshare_del() and also not mixing all
the callbacks in teh same list, instead having an array for defined
signals, and a list from there. These optimizations are not in, but
they are easily added later without breaking the API/ABI.
SVN revision: 47461
Now it is possible to change labels and lots of other parameters
directly through Edje's API.
BIG FAT NOTE: this is a convenience that comes with a reasonable
price. If you have hot paths, like loops, then avoid calling this
and use the object directly. This functions add a cost to check
edje, then find the part, then get the type, then get the
param_set/param_get methods, then calling it, then finding the
parameters using strcmp(), then checking the type and just then it
will call the actual method. So whenever possible, just call the
method directly.
Due the reasoning of the "big fat note" I'm adding this inside edje
externals only. The code would be almost the same to expose it in
Elementary.h as elm_widget_property_set/get, but then I know people
would misuse it... actually this kind of stuff could be easily ported
to Evas smart object, but then abuse and slowness will hunt us
foreveeeeer...
SVN revision: 47457
This patch makes it possible to specify a different style to an
elm_scrolled_entry. Worked fine in ewebkit-demo.
By: Raphael Kubo da Costa <kubo@profusion.mobi>
SVN revision: 47376
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
Idea by Lucas de Marchi, implementation by myself.
It's not as fancy as it could be, since elm_list does not have an
animated "bring-in" as genlist... but I added a macro to make it easy
to migrate to genlist later without lots of changes...
SVN revision: 47272