as reported, elicity triggers an infinite loop by calling
edje_object_part_geometry_get(), which in turns calls
_edje_recalc_do() which in turns calls the elicit code that requests
edje_object_part_geometry_get() and since it's still marked as
"dirty", it enters the loop...
the real fix is just the move of ed->dirty = 0; before calling
recalcs, but I also unmarked object as need_recalculate so we can even
avoid requesting object to recalculate from evas.
SVN revision: 38139
* src/bin/evil_test_gettimeofday.c:
fix unit test; now all tests pass, finally
* src/lib/evil_unistd.c:
fix gettimeofday() on mingw32ce
SVN revision: 38130
* src/bin/evil_test_dlfcn.c:
* src/bin/evil_test_dlfcn.h:
add dflcn unit test
* src/bin/evil_suite.c:
show result of the unit tests and add dlfcn unit test
* src/bin/evil_test_environment.c:
remove debug
* src/bin/evil_test_gettimeofday.c:
debug, not working yet :/
* src/bin/evil_test_link.c:
* src/lib/evil_link_ce.c:
fix link support on Windows CE
SVN revision: 38126
Wow, this was tricky to find since it is hard to trigger, thanks to
Canola complex edje files we could spot it!
In some cases we end with object being marked as dirty while
calculating its state (ie: edje), then we need to run smart calculate
again.
This has a drawback however: we cannot check for need_recalculate()
inside smart calculate anymore, we must assume it is only called if
the flag is set. To avoid that we could mark a shadow member and use
that or use a counter, that has the problem of using more data.
SVN revision: 38108
give the possibility to write small code like :
it = eina_hash_iterator_tuple_new(hash);
eina_iterator_foreach(it, do_something_cb, NULL);
eina_iterator_free(it);
If hash is empty, but valid it will return a NULL iterator for this
example.
SVN revision: 38104
Eina hash api must get non NULL pointer allocated with
eina_hash_new(), but Evas hash started with NULL and would allocate
and destroy the hash as required by operations.
To do a proper wrapper we must ensure we don't call Eina hash API with
NULL, we must handle that outside Eina.
PLEASE do not remove this code again (it's the second time I add it),
this is the correct approach. Other than that is going after evas_hash
usage and converting directly to eina_hash.
SVN revision: 38091
Unset value is now 0x0 and this is handled as invalid, with an error message.
1x1 is a valid fill, but it is very slow and often system hangs while
it scale the whole thing... usually nobody want it at 1x1, we just end
using that for unset values. With unset value at 0x0 it will not
happen and we'll know when we forgot to do so!.
SVN revision: 38071
add output
* src/bin/evil_test_link.c:
add a unit test for readlink()
* src/lib/evil_link_xp.cpp:
fix readlink() and symlink() on Windows XP
SVN revision: 38070
destroyed by _edje_cache_coll_unref. So moving the call to _edje_cache_coll_unref
after the last use of Edje_Real_Part should be better.
SVN revision: 38020
* evas: if we automatically destroy hash, check for NULL before
handling it to eina api, which expect elements to be created with
eina_hash_new() and thus will fail on NULL.
* eina: add magic checking for eina_hash and eina_hash_iterator, this will
help spot when NULL is used.
* eina_hash_foreach: do not try to create the iterator if hash is NULL.
SVN revision: 37982
By using simpler functions for hash element deletion we can avoid the
hack to shut up GCC warking about hash_num not being used. As these
simple functions are more often needed than the catch-all, expose them
as well.
SVN revision: 37962
Keep EINA_MAGIC at the end of the structure (WHEN POSSIBLE! Watch out
flexible arrays like char str[] at the end!)
this way if parts use EINA_MAGIC and others do not, it will possible overflow and valgrind can help us.
WARNING: make uninstall before update! Then make clean and make install, check if everything is working with "make check".
SVN revision: 37961
eina_magic.h MUST include eina_config.h, otherwise it will not
consider EINA_MAGIC stuff. Worse than that, some files were including
that directly and were considering EINA_MAGIC attribute even if the
file that alloc'ed the memory were not!
Also add missing EINA_MAGIC_SET() to iterators and accessors.
SVN revision: 37960
Many places in EFL we just create walk something, create a list with
walked data, return, then the user walks it again and then deletes
(which will walk again). For such cases it's way better to define
iterators or accessors.
I'm not moving any EFL code to it now, but if people are interested,
things like evas_render_method_list(), evas_font_available_list(),
evas_objects_at_xy_get(), evas_objects_in_rectangle_get(),
evas_object_smart_members_get() are good candidates. If the subject is
already using Eina list, then you can just use
eina_list_iterator_new() and return it, otherwise you can define your
own iterator, which is very easy.
SVN revision: 37956
* Fix buffer overflow with EDJE_PROGRAM_CACHE (not tested since I don't use it).
* break_prog should always unset walking_callbacks and do after-tasks.
* Fix list walking! ouch!!!
SVN revision: 37944
replace evil_gettimeofday by gettimeofday
* src/lib/evil_string.c:
* src/lib/evil_string.h:
add strcoll() "port" to Windows CE OS. Note it's
just strcmp, no locale stuff is used onn that OS.
SVN revision: 37910
- add shape support in ecore_win32
- add drag'n drop support in ecore_win32 (reworked)
* remove strange character (ecore_evas_win32.c)
* include Eina.h before defining EAPI (Ecore_Data.h)
* add -lole32 as lib for DnD, minor thing (configure.ac)
next steps will be the new direct3d engine, and full support
of DnD, shapes and fullscreen for the directdraw engine and
in ecore_evas.
SVN revision: 37831
* group the want_* variables related to engines and loaders at the beginning
of configure.ac
* use -no-undefined directly instead of a flag checked wrt the host
* some clean up in Makefile.am files
Please report any problem
SVN revision: 37784
Create a parser description and give it the parameters, that's it. You
can store values (automatically converting types!), count occurrences,
make it true or false, create a list, choose from a list of items or
even specify your own callback to process arguments!
It was inspired by Python's optparse: http://www.python.org/doc/2.5.2/lib/module-optparse.html
SVN revision: 37781
* src/bin/evil_suite.c:
* src/bin/evil_test_gettimeofday.c:
* src/bin/evil_test_gettimeofday.h:
add a small test for gettimeofday
* src/bin/evil_test_memcpy.c:
fix warning
* src/lib/Evil.h:
* src/lib/Makefile.am:
* src/lib/evil_main.c:
* src/lib/evil_main.h:
* src/lib/evil_unistd.c:
* src/lib/evil_unistd.h:
* src/lib/evil_private.h:
add gettimeofday for Windows CE natively. It is necessary
to initialise evil with evil_init() now, to have that
feature.
* src/lib/evil_stdio.c:
* src/lib/evil_string.c:
fix warnings
SVN revision: 37734
but some other people can help me now with that code in svn
* expedite is working but sometimes crashes. Maybe a big mem leak ?
* maybe moving the creation of the bitmap in
evas_software_wince_gdi_output_buffer_paste()
to
evas_software_wince_gdi_output_buffer_new()
so that the memcpy is not necessary anymore
SVN revision: 37709
giving an extra void *user_data to layout function is now easy to
write bindings, just give the callback to be a generic function that
will call the language/binding specific function handled as user_data.
Example, for python we can use:
void _layout_dispatcher(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) {
PyObject *pyobj = data, *args;
args = PyTyple_New(1);
PyTuple_SET_ITEM(args, 0, Evas_object_from_instance(o));
PyObject_Call(pyobj, args, NULL);
Py_DECREF(args);
}
evas_object_box_layout_set(o, _layout_dispatcher, pyobj, Py_DecRef);
SVN revision: 37640
This makes use of new Evas_Smart_Class calculate() callback to
postpone calculations until render time, possible saving lots of
calculations to happen.
It is another try, with Cedric's changes to force recalculations when
requried (ie: just before doing some edje_object_*_get()), let's see
if this one solve found issues.
SVN revision: 37620
One can now configure the maximum acceptable delay to be introduced by
Ecore so possibly more timers will be dispatched together, reducing
wakeups and saving more power.
SVN revision: 37607
solution, but the fastest to implement without breaking edje file format.
So now, when a callback or a program don't use globbing charactere (*, ?,
[] and \), the match are put in a little rbtree instead of the big automate
matrix.
This patch could potentially break edje user, if you experience anything
strange with your edje file, please report.
SVN revision: 37577
remove -ldl
* src/lib/evil_dirent.c:
change guards
* src/lib/evil_stdio.c:
* src/lib/evil_stdio.h:
add some checks,
add a function that more or less mimic fopen, but with
native win32 api calls. This is only for the evas loader
and saver of png files and works only for Windows CE.
* src/lib/evil_unistd.c:
move a free() and remove debug calls.
SVN revision: 37570
* when fopen used, open in binary mode
* use Evil when fopen is used
* clean a bit some Makefile.am and add Evil dependency where needed
* in evas_path.c, remove useless old Windows CE code. It's managed by Evil, now
* in Evas_Data.h, move Eina.h before EAPI is defined for Evas.
* define _WIN32_WCE when the host is windows cee
SVN revision: 37476
This is a faster "add", if we know we're using a shared string we know
the node without any need to search it, just increment reference and
exit.
SVN revision: 37458
tyo fix up some of these breaks first and there isn't a lot of time devoted
to this. so revert this. it's in svn history so we can dig it out any time we
like.
SVN revision: 37453
* src/lib/evil_stdio.h:
* src/lib/evil_unistd.c:
* src/lib/evil_unistd.h:
overload the stat() function for native Windows CE platform.
move pipe() and fopen() definitions to their own header files
SVN revision: 37452
1. nearest scaling is now broken - it's always linear interpolation. this
will lead to slowdowns. i need to fix this - a must.
2. i think it's time i put in a transformed image cache that can cache an
image object at a transform (and share it) automatically.
3. transforms in non-software-engines will not work - broken. need to at
least do xrender and gl engines.
any volunteers to help?
SVN revision: 37447
One possible problem that come to mind, is that some one could del a pipe inside of the handler. That segfaults at the moment. So this should be fixed some time.
SVN revision: 37438
* remove useless _DEPENDENCIES variables
* remove useless files in EXTRA_DIST
* use -no-undefied directly
* add some flags when the host is windows ce
make distcheck succeeds on my computer
next step will be to fix the horrible mess in Ecore.h and ecore_private.h
SVN revision: 37406
add a flag to know if cegcc is used or not
* src/lib/Makefile.am:
* src/lib/dirent.h:
* src/lib/evil_dirent.c:
add opendir(), closedir() and readdir() implementations
for Windows XP and CE. Now, the evas engines are correctly
found.
* src/lib/fnmatch.h:
formatting
SVN revision: 37376
Table code is still *incomplete*, it just do homogeneous layouts as
I'm still trying to figure out how to make it great.
I'm not expecting to make layout configurable, as we did for box, but
if you think it's required we can do that later.
Now that the public API of both BOX and TABLE are in, we can add these
as parts of Edje.
SVN revision: 37359
Draw back: When we are destroying an Evas canvas, we loose all cached font
that are not used anymore.
A correct fix would be to link Fndat to the Evas that provide and use them.
And only delete them when no more Evas reference them.
SVN revision: 37353
sizeof(Eina_Stringshare_Node) is now 24 bytes on 64bits platforms, but
str[] was pointing to before that, to the 20th byte, causing out of
bounds access.
Adding the padding will cause str[] to use the correct position. It
wastes 4 more bytes, like pre-optimizations, but it's just on big
machines.
SVN revision: 37305
use AC_CHECK_HEADERS instead of AC_CHECK_HEADERS_ONCE, because it
leads to more trouble than it improves configure speed...
* src/lib/Evil.h:
use __VA_ARGS__ instead of ##args to make gcc happy.
SVN revision: 37302
define _WIN32_WCE with the cegcc compiler too
useless EVIL_HAVE_WINCE define
* src/bin/evil_test_memcpy.c:
use _WIN32_WCE insead of EVIL_HAVE_WINCE
* src/lib/Evil.h:
try another definition of open(). Need feedback.
* src/lib/evil_private.h:
* src/lib/evil_util.c:
add private error message when GetLastMessage must be called
* src/lib/Makefile.am:
* src/lib/evil_link_ce.c:
* src/lib/evil_link_xp.cpp:
* src/lib/evil_unistd.c:
* src/lib/evil_unistd.cpp:
move specific link code (readlink and symlink) outside
evil_unistd to evil_link_ce.c for Windows CE and
evil_link_xp.cpp for Windows XP. This allow the Windows CE
code not depend on c++ code anymore and above all, not
statically link libstdc++ on that platform.
I need feedback on Windows XP, btw :)
SVN revision: 37295
mixing #ifdef'ed blocks inside code is bad, can lead to warnings if
some variables are not used and it's a pain to read.
instead, just define functions and always call them, choose their
implementation based on the ifdef macros. I opted to have 2
declarations, but one can go like other parts and #ifdef around the
function contents as well.
SVN revision: 37281
we don't need to use 'begin' flag (that takes a byte) just to see if
we're in the same memory block as the head, just do a pointer math.
SVN revision: 37270
trade off safety by speed, we will always assume str was previously
shared, like evas_stringshare_del() did and we can know with zero-cost
the number of references and can avoid strlen() too.
When references drop to zero we still have to do the hash, access the
bucket and then lookup the Red-Black tree, then walk the list of
nodes, but avoiding so would use more memory, unacceptable at this
point.
SVN revision: 37268
add c++ compiler checks
remove linking against libuid.a as it's not an import lib.
* src/bin/Makefile.am:
* src/bin/evil_suite.c:
* src/bin/evil_test_link.c:
* src/bin/evil_test_link.h:
add unit test for links. Must be improved.
* src/lib/Makefile.am:
add unistd.cpp and uuid.c
use -fno-exceptions when compiling c++ code
* src/lib/evil_unistd.c:
* src/lib/evil_unistd.cpp:
use C++ api to manage links on Windows XP. Can be considered
as heavy but it's cleaner as the internals can change later.
I might consider to compile Windows CE code with only C compiler
as with mingw32ce, libstdc++ is statically linked to the
DLL / app (legacy of mingw stuff), to reduce a bit the DLL size.
* src/lib/evil_private.h:
declare _evil_error_display() as C function (otherwise linker
not happy)
* src/lib/evil_stdlib.c:
use RegCreateKeyEx() instead of RegOpenKeyEx in getenv().
fix an _evil_error_display() call.
* src/lib/evil_util.c:
add more error messages
* src/lib/evil_uuid.c:
define IID_IPersistFile (for links on Windows XP)
* src/lib/evil_unistd.h:
fix doc
SVN revision: 37267