Commit Graph

680 Commits

Author SHA1 Message Date
Cedric BAIL dd1d3f0d2d autotools: since it has been broken for some times and nobody noticed, let's remove per directory support. 2016-08-01 13:36:47 -07:00
Carsten Haitzler 04c6313114 ecore - add more ecore main loop checks that were missing in some places
so 1 ecore_exe func was missing a main loop check... just to be sure.
2016-07-14 08:55:03 +09:00
Cedric BAIL fd5d31696d ecore: early destruction of animator allow for tick end to always be triggered.
T4043
2016-07-13 15:32:15 -07:00
Ivan Furs 4387f34b54 [Bug] EFL memory leak on Windows(handler continuously increasing)
Summary:
Fix: event need to clese  when create event:
  event = WSACreateEvent();

Reviewers: bowonryu, herb, Jaehyun, thiepha, Hermet, jaehwan, cedric, raster

Reviewed By: raster

Subscribers: NikaWhite, reutskiy.v.v, artem.popov

Differential Revision: https://phab.enlightenment.org/D4157
2016-07-13 21:01:50 +09:00
Carsten Haitzler 2d003e2503 ecore pipe - fix close of pipe that doesnt set fd to invalid
this should fix CID 1267459
2016-07-11 22:02:45 +09:00
Carsten Haitzler f6d8ae3123 ecore animator - remove dead code
fix CID 1356618
2016-07-09 12:09:41 +09:00
Jean-Philippe Andre b32a8d3a0f ecore: Fix warning about err_no
Double warning, yay:
 explicitly assigning value of variable of type 'int' to itself
 variable 'err_no' is uninitialized when used here

See 1abbfdd1f7
2016-07-08 12:27:29 +09:00
Carsten Haitzler 1abbfdd1f7 ecore - be paranoid about storing errno from select immediately
in theory another libc call could overwrite errno between select
exiting and errno being used for errors. be paranoid. i know of no
real bug that this causes though.
2016-07-08 11:00:55 +09:00
Cedric BAIL cdf04241db ecore: on first arguments event notify the needs to initialize the process state. 2016-07-06 15:51:25 -07:00
Carsten Haitzler 9527240d74 efl - fix lots of little init/shutdown pairs that are wrong
i've fixed almost all the eina init/shutdown pairs to do the right
thing now... except one (ecore_shutdown) with comment inline where
eo_shutdown is not called. if this is called we are in crash land.
this needs further inspection.
2016-07-04 21:30:34 +09:00
Jean-Philippe Andre 3671dd64c6 ecore: Fix obvious crash with legacy timers
ecore_timer_del() checks a flag "inside_call" that can be
set before calling the timer cb... but it was never reset
to 0. So, all legacy timers would keep on ticking forever
and ever, until they return CANCEL.

Anyway, I find the distinction between eo_del and
ecore_timer_del very troubling. eo_del() should work
on a legacy timer. Ping @cedric. Maybe override eo_del()?

Fixes T3898
2016-07-04 15:15:48 +09:00
Jean-Philippe Andre 45cd0465a4 efl: Add Efl.Version struct and APIs
The original idea behind knowing the app's version of EFL is not
a great story. It comes from the fact that some bugs exist in
earlier versions of EFL, and some things need to be fixed. But
those fixes may break behaviour for older apps. This patch is
opening the way to the slippery slope of bug compatibility.

Unfortunately this is a requirement if we want to be able to move
forward and not break apps when we fix bugs (behaviour or ABI).

I hope we will not need to implement too many (if any) workaround
such issues. For now, this will only be used as debugging info.

EFL_MAIN() and ELM_MAIN() will both set the app's EFL version
automatically at startup time. Some internal helpers can be added
later to check how the app build-time and run-time version of
EFL differ.

@feature
2016-06-29 15:01:34 +09:00
Jean-Philippe Andre a73e51136f loop: Add main class property to return the main loop
Note: this is both @class and @property. Hope that's ok for
all bindings.

This returns same as ecore_main_loop_get() (which now uses the eo
api instead).

Ping @cedric (so he can check this patch).
2016-06-29 11:17:44 +09:00
Jean-Philippe Andre 4d6216c7f6 ecore: Replace TABs with spaces 2016-06-27 17:29:06 +09:00
Cedric BAIL f441859bfb ecore: add the possibility to return an exit code when leaving the main loop. 2016-06-24 16:44:59 -07:00
Cedric BAIL c512bb68e7 ecore: fix Windows build by properly defining EAPI in all case for internal API user. 2016-06-23 10:53:46 -07:00
Cedric BAIL 068f57a79d ecore: fix arguments to use Eo native array type. 2016-06-22 14:36:39 -07:00
Cedric BAIL ec77773aa3 ecore: add ability for the main loop to provide other class of object. 2016-06-22 10:17:06 -07:00
Jean-Philippe Andre e68e8d0088 ecore: Fix _ecore_animator_shutdown (double free)
evas 3d examples would always exit on a double free, since
EINA_INLIST_FREE was misused. Not surprising considering
it's different from EINA_LIST_FREE but has a similar name.
2016-06-21 10:14:13 +09:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Cedric Bail 70aa45829a ecore: prevent crash in case of double ecore_timer_del in legacy case. 2016-06-15 10:54:09 -07:00
Vincent Torri 8cccde76fe Ecore: detect ieeefp.h existence instead of including it with compiler's macro
On Solaris, this header is necessary for finite(). Instead of including it
if the sun compiler is used, include it if it exists. This fixes a warning
if gcc is used on Solaris
2016-06-14 18:50:00 +09:00
Felipe Magno de Almeida 949af55947 eina: Add support for eina_safepointer in promises 2016-06-11 10:40:27 -03:00
Lauro Moura 46843551c0 eina: Remove value type promises
All values in promises are now considered as by-pointer.
2016-06-09 22:38:54 -03:00
Cedric BAIL ef0df96da1 ecore: properly reset fd handler when parent get deleted. 2016-06-06 16:29:16 -07:00
Cedric BAIL d8d00bd228 ecore: migrate ecore_timer lifecycle to rely cleanly on Eo lifecycle. 2016-06-06 15:41:24 -07:00
Benjamin Jacobs d41b47f47e ecore_time.c: do not mess with the representation of clockid_t.
Clockid_t should be used as an opaque type. Some platform might want
to (and even do, e.g. DragonFlyBSD) declare clockid_t as an unsigned.

On such platform, testing the sign of clockid_t is never false, and
assigning it a negative value is an UB, which makes this code unlikely to
work as intended. Fixes black window on dragonfly!

Thanks to gcc for spotting this.

  CC       lib/ecore/lib_ecore_libecore_la-ecore_time.lo
  In file included from ../src/lib/eina/Eina.h:215:0,
                   from lib/ecore/Ecore.h:304,
                   from lib/ecore/ecore_time.c:18:
                   lib/ecore/ecore_time.c: In function 'ecore_time_get':

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 12:05:43 -07:00
Benjamin Jacobs b548a6396b ecore_signal.c: factoring out the platform test to improve readability.
Turns out there is no PRI?SIGATOMIC in the C99 standard. Work around
that by deducing the effective integer type by comparing the
SIG_ATOMIC_MAX with integers *MAX.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 12:05:43 -07:00
Lauro Moura 217f3ce842 ecore: Fix ecore thread promises
Make sure we free the promise memory, set MAGIC numbers and avoid
leaking the underlying eina promise
2016-06-05 21:59:35 -03:00
Cedric BAIL 58c477a30a ecore: properly handle double free case of timeout promise.
The bug came from the fact we need to handle the destruction of the
main loop which destroy the underlying timer. The event handler that
catch the destruction of the timer can not make the difference between
eo_del call from the timeout code and eo_del from the main loop
destruction. By removing the event handler, the double free is properly
avoided.
2016-06-03 17:00:12 -07:00
Cedric BAIL 0e6d5df60c ecore: use EINA_ERROR_PROMISE_CANCEL instead of a custom Ecore one. 2016-06-03 17:00:12 -07:00
Cedric BAIL 10ee8bc844 ecore: do not generate error while rescheduling the last timer. 2016-06-03 17:00:12 -07:00
Cedric BAIL 2b12aea5e6 ecore: Ecore_Cb is used by elm_box.eo. 2016-06-03 17:00:12 -07:00
Cedric BAIL b3d56820d5 ecore: Efl.Timer should be Efl.Loop.Timer for coherence.
As we add more object in the main loop, they can't live in the top
namespace as they make little sense there (Efl.Fd !). For coherence,
everyone should in the loop namespace, so move timer there.
2016-06-03 17:00:12 -07:00
Cedric BAIL 5cc16b1c29 ecore: remove Ecore_Animator Eo object.
This is only a legacy API.
2016-06-03 17:00:12 -07:00
Derek Foreman 6c2a3a2034 ecore_anim: Fix bad assumption about signedness of chars
Whether "char" is signed or unsigned is architecture dependent, so if we
know we need a -1 in a char type we must declared it to be signed.
2016-06-03 16:28:24 -05:00
Felipe Magno de Almeida e79eb53e8d eina: Remove Eina_Promise* parameter in promise callback
Remove not very useful parameter to eina_promise_then callbacks.
2016-06-03 18:15:57 -03:00
Felipe Magno de Almeida 8fec0d5139 eina: Remove unnecessary indirection to promises
Now when dealing with pointer types, we will not get pointer to
pointer semantics in callbacks and eina_promise_owner_value_set
for Eina_Promise.

It will work as expected:

Eina_Promise_Owner* promise = eina_promise_add();

void* p = malloc(sizeof(T));
eina_promise_owner_value_set(promise, p, &free);
2016-06-03 17:22:12 -03:00
Carsten Haitzler f3b6d34a0f ecore timeouts - dont crash on cancel
this fixes a nasty double deletion on cancel of timeouts. at least for
now as long as we have promises.
2016-06-03 18:09:35 +09:00
Daniel Kolesa b1946ca5d6 eolian: utilize the new void_ptr builtin across eo files
This lets me narrow down the remaining cases of pointers across the EFL.
The void pointers will later need to be reevaluated on per-case basis and
replaced appropriately where possible/feasible.
2016-06-02 13:00:26 +01:00
Carsten Haitzler 23f6bb33ee ecore loop args - go back to eo_del not eo_unref. 2016-06-01 22:11:02 +09:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Cedric BAIL 6bf9cd6ecc ecore: if you don't use the value, then don't set it. 2016-05-31 14:59:26 -07:00
Jean Guyomarc'h bc0547a705 ecore: remove unwanted debug messages
Da is making my console output ugly.
2016-05-31 21:47:48 +02:00
Daniel Kolesa 6fc482aa9b eolian: utilize the new builtin string type across eo files 2016-05-31 16:05:43 +01:00
Jean-Philippe Andre 5aa00004a5 ecore_evas: Register direct input cb from modules
If the ecore_evas modules were using
ecore_event_window_register() then they can also redirect
everything though the direct callback instead.
2016-05-31 19:03:04 +09:00
Carsten Haitzler f0335bde28 efl loop - add an args event and ability to produce it
this is an args event. right now we don't use it, but this should be
done by some of the setup/init of an app and then produce an args
event. the idea would be that this can be used by single-instance apps
like web browsers, terminology to treat launch as an event.
2016-05-30 19:47:21 +09:00
Felipe Magno de Almeida de9be13d45 eina: Add promise parameter to then calllbacks
Added promise parameter to then callbacks so callbacks can steal
ownership of the value from the promise.
2016-05-25 21:32:03 -03:00
Daniel Kolesa e984e5a11a eolian: remove pointers from complex and class types
Complex types (i.e. list, array, hash, accessor etc.) now do not require
pointers with them anymore (the pointer is implied) and the same goes for
class handles. Eolian now explicitly disallows creating pointers to these
as well. This is the first part of the work to remove pointers from Eolian
completely, with the goal of simplifying the DSL (higher level) and therefore
making it easier for bindings (as well as easier API usage).

@feature
2016-05-23 15:58:33 +01:00
Cedric Bail 4f43c27450 ecore: promise for timeout and job are clearly never optional, so return them. 2016-05-20 02:25:48 -07:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Daniel Kolesa 7782c0bcb9 eolian: add event_prefix and have classes follow that or eo_prefix by default
Previously events used to use class name as a prefix and ignored eo_prefix
when specified. This is no longer the case. Events follow eo_prefix by default
now. In order to get around this for classes where this is undesirable, a new
field event_prefix was added which takes priority over eo_prefix. If neither
is specified, class name is used like previously.

@feature
2016-05-17 17:50:43 +01:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Cedric Bail aa4da11b33 ecore: do not create another main loop object
So ecore main loop does restart everything with an main loop shutdown
and init when it detect a bad fd. This can happen if you del a fd after
you have destroyed it. Something terminology is doing (and should be
legal), but that then ended up with a main loop with no event handler
registered and the process was looking like stuck with nothing happening.
2016-05-17 07:41:13 -07:00
Tom Hacohen 6bdf4af016 Add legacy_prefix now that the default has changed to null. 2016-05-12 17:27:35 +01:00
Tom Hacohen 96c4c88070 Efl: Remove "legacy_prefix: null;" as it's now the default. 2016-05-12 17:27:35 +01:00
Tom Hacohen 3d6238c044 Ecore exe: Fix namespacing to use . and not _. 2016-05-12 12:20:34 +01:00
Cedric BAIL 0c4880e99d efl: everyone should now rely on Eina MIN/MAX redefinition. 2016-05-09 16:58:53 -07:00
Felipe Magno de Almeida 6d43adaaf4 eina: Fix memory leaks in promise 2016-05-07 13:55:18 -03:00
Cedric BAIL c96383e42c ecore: add Efl.Loop.Fd.
This allow you to monitor fd and get notification using Eo events. I
have not implemented the buffered read as used by X. I think that if
this is useful, we should just do another class to handle bufferred fd.
2016-05-06 15:35:36 -07:00
Cedric BAIL 45d17f100e ecore: update documentation of Efl.Timer.
I am wondering how this is going to affect our legacy API documentation
which has indeed a different lifecycle.
2016-05-06 15:35:36 -07:00
Jean Guyomarc'h 334d32a575 ecore: don't use an unspecified amount of arguments 2016-05-06 22:18:57 +02:00
Jean Guyomarc'h 279203c016 ecore/getopt: slightly improve documentation 2016-05-06 22:18:57 +02:00
Jean Guyomarc'h 198326fbd2 ecore: fix typo in documentation of Ecore_Exe_Event_Del 2016-05-06 22:18:57 +02:00
Cedric Bail c7d652ade1 ecore: fix legacy use of double free scenario. 2016-05-05 21:55:43 -07:00
Cedric Bail bfc19893d7 Revert "ecore timer - fuix up segv storm that has crept in with frees"
This reverts commit a13570c17c.

This doesn't really fix the problem which is hidden by eo capability to not
crash on bad unref. With legacy API you are allowed to do a ecore_timer_del
and also return EINA_FALSE. In that case you have a double eo_del (which is
luckily protected) and a double free (that is not). It does crash on the
double free, but the issue is a lifecycle issue. Will bring a better patch
for this.
2016-05-05 21:40:23 -07:00
Carsten Haitzler a13570c17c ecore timer - fuix up segv storm that has crept in with frees
freeing already freed data, not clearing up pointers to freed data
once freed etc. etc. etc. - segv land. fix that up so we can use efl
again. :(
2016-05-06 11:06:56 +09:00
Cedric BAIL 43a4411f43 ecore: make efl.timer depend on efl.loop_user. 2016-05-05 17:03:07 -07:00
Cedric BAIL 05424556b0 ecore: add an efl.loop_user class. 2016-05-05 17:03:07 -07:00
Cedric BAIL 8d50990a27 ecore: add a timeout promise. 2016-05-04 15:42:59 -07:00
Cedric BAIL 3ba901f15e ecore: rework efl_timer to be a proper eo object emiting signal. 2016-05-04 15:42:59 -07:00
Cedric BAIL 639378bfc7 ecore: remove timer dump logic as Eo and clouseau should give us that info. 2016-05-04 10:30:13 -07:00
Cedric BAIL 1adf08e41c ecore: fix split built. 2016-05-04 10:30:13 -07:00
Cedric BAIL 93af61f255 ecore: rename ecore_timer to efl_timer. 2016-05-04 10:30:13 -07:00
Marcel Hollerbach c66695bedb eo: replace loop_get with object_find
Summary:
object_find is more generic, so other mechanisms can also reuse the
code.
The object itself has to support the function, so there is no need for
eo_isa which would have a negative performance impact.
The base class implementation calls interface_get on the parent, so a
override of the function can just call the super function to continue in
the recursion.

Test Plan: just run the eo test suite

Reviewers: raster, tasn, jpeg

Reviewed By: tasn, jpeg

Subscribers: felipealmeida, netstar, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3909
2016-05-04 10:43:55 +02:00
Cedric BAIL ba10fa6636 ecore: silent warnings by directly freeing. 2016-05-03 14:32:05 -07:00
Cedric BAIL c1141c7b0b ecore: remove dead Ecore_Job eo object. 2016-05-03 13:31:43 -07:00
Cedric Bail 7fa953e9ae ecore: add Efl.Loop.Job promise. 2016-05-02 18:17:09 -07:00
Cedric Bail 3b68135baf ecore: forgot to handle recursive destruction in a function that actually ask for destruction. 2016-04-21 22:37:45 -07:00
Carsten Haitzler 0d0ba19e51 efl loop: implement loop.get property to return self
this means that on loop_get on any obj as long as its a child of a
loop obj... it'll retunr that loop now. it will work. no more code
needed.

we can shortcut this with ui/gfx objects returning the mainloop
singletone.
2016-04-22 09:38:58 +09:00
Cedric BAIL 454722cf6f ecore: rename Ecore_Mainloop to Efl.Loop. 2016-04-21 15:11:32 -07:00
Cedric BAIL 9efefb1f2e ecore: ecore_main_loop_animator_ticked_get seems to be useful only for Ecore_Evas. 2016-04-21 14:54:02 -07:00
Cedric BAIL 869a2243e7 ecore: ecore_main_loop_select_func_set is definitively an internal function. 2016-04-21 14:50:19 -07:00
Cedric BAIL 3108f023ba ecore: move ecore idle exiter to relly on the factorized main loop event. 2016-04-21 14:49:00 -07:00
Cedric BAIL e87e501230 ecore: remove useless define 2016-04-21 14:49:00 -07:00
Cedric BAIL 5c87f2762f ecore: use new refactorized idle infrastructure to make idle enterer rely on mainloop events 2016-04-21 14:07:49 -07:00
Cedric BAIL 7c62154d52 ecore: allow for possible factorization of all idler event. 2016-04-21 14:07:49 -07:00
Cedric BAIL 3ff21c021d ecore: move Ecore_Idler to legacy and rely on Eo event restart capability. 2016-04-21 12:07:50 -07:00
Cedric BAIL 559d4e8b68 ecore: give the mainloop its own private data. 2016-04-21 12:07:50 -07:00
Cedric BAIL bc7174262f ecore: make the main loop singleton initialized and available early on. 2016-04-21 12:07:50 -07:00
Cedric BAIL 54126d8fa5 ecore: use restartable event for main loop event. 2016-04-20 15:54:18 -07:00
Tom Hacohen 5bec0d07b4 Ecore eo: Resolve duplicate Ecore_Cb definition. 2016-04-20 10:11:21 +01:00
Carsten Haitzler 84a4870d5b ecore exe: don't allocate inside fork to avoid issues with mem debuggers
so i've been doing some debugging and having a mem debugger that
preloads and tracks allocs means you need locks, but locks can do
nasty things after forks + threads.... esp if threads held locks.

this allows mem debugging with preloads easily and doesn't muck things
up.
2016-04-18 21:46:25 +09:00
Stefan Schmidt f012499f47 docs: document ecore_mainloop class, functions and events. 2016-04-17 17:42:41 +02:00
Stefan Schmidt e728ea168f docs: add description for ecore_poller class and cleanup some other parts 2016-04-17 17:42:40 +02:00
Stefan Schmidt 4f6cc20e84 docs: fix some typos in ecore_timer EO docs 2016-04-17 17:42:40 +02:00
Cedric BAIL 192a966e60 ecore: make it possible to build the library alone. 2016-04-14 16:07:32 -07:00
Stefan Schmidt 5a3af92e5b docs: add description for class and method parameters 2016-04-14 18:27:42 +02:00
Stefan Schmidt 3c93a3268c docs: add method parameter descriptions for ecore_idle_*
Now that we support these in docgen catch up in some example EO files.
2016-04-14 18:27:42 +02:00
Stefan Schmidt f9189fea78 docs: add class and method parameter descriptions to ecore_idler class 2016-04-14 18:27:42 +02:00
Stefan Schmidt 89d63475ae docs: add descriptions and and more to ecore.idle classes 2016-04-13 17:01:23 +02:00
Stefan Schmidt 9f63aaca13 docs: add description for ecore.exe class and events 2016-04-13 17:01:23 +02:00
Stefan Schmidt 05a66cebc0 docs: document ecore_animator EO class.
Keep it brief as we want the larger parts being editable from the wiki part of
the new doc system.
2016-04-11 16:52:43 +02:00
Daniel Zaoui 3e02f6fd4c Ecore Exe: check parameter validity 2016-04-10 15:15:08 +03:00
Jean Guyomarc'h ca346eb273 ecore: fix documentation of Ecore_Exe_Event_Del 2016-04-09 21:52:39 +02:00
Jean-Philippe Andre 83a591b335 Ecore: Try to fix build for windows
Move efl.h above ecore.h to not mess with EAPI's dllimport
vs. dllexport definition. This addresses T3423.
2016-04-07 15:25:42 +09:00
Jean-Philippe Andre 4e4b42ec03 Efl: Add internal strong symbol to fix build on GCC < 5.3
This fixes a crash in ecore_init, calling a weak function from
libefl that was resolved to NULL.

So, here's a fun thing happening with GCC < 5.3. Since a1a506e13e
all EOAPI and EO class_get() functions are weak symbols. This means
that all APIs inside libefl.so are weak.

As a result, gcc linker with --as-needed skipped linking to libefl
since not a single strong symbol from libefl was required by
libecore. This is actually a bug in gcc linker since we do in fact
use symbols from libefl, just weak ones.

GCC 5.3 seems to be fixed, so people with GCC 5.3+ will not
experience any build/runtime issue. The current patch is
a workaround that bug, by artifically creating a strong symbol
required by ecore.

Other libraries than ecore might also need to call
__efl_internal_init, if they end up not being linked to libefl.
2016-04-07 14:40:10 +09:00
Cedric Bail 7b0d332e01 ecore: attempt to fix windows build by putting header in a more logical place. 2016-04-06 14:34:45 -07:00
Felipe Magno de Almeida 887608e146 ecore: add promise for Ecore_Thread
Add ecore_thread_promise_run function that returns a Promise
and runs function in another thread which you can set the
value on a Eina_Promise_Owner.

Eina_Promise* promise;
Ecore_Thread* thread = ecore_thread_promise_run
( &function_heavy, &cancellation_function, private_data,
sizeof(ValueType), &promise);

This calls function_heavy on another thread and returns
the Ecore_Thread and a Eina_Promise as an out-parameter.

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-05 11:35:12 -07:00
Carsten Haitzler 7c8b2da286 efl ecore - init vpath on ecore init so we have a base object working
this inits a new vpath object and adds it at priority 0 to the vpath
manager so you can use the vpath manager to create vpath file objects
and look things up.

@feature
2016-04-05 16:22:59 +09:00
Stefan Schmidt dac047a5fc ecore_timer: remove redundancy in property docs
Streamline this a bit to document the property itself and only extra information
the the methods if needed.
2016-04-01 15:40:01 +02:00
Stefan Schmidt 1a4674dfc8 ecore_timer: document properties
Make sure that we actually document the property itself and not only the
property methods.
2016-04-01 15:03:46 +02:00
Mike Blumenkrantz bcad71f4fa ecore: add ecore_main_fd_handler_file_add() handlers to file handler list
broken in a bad refactoring patch, resulting in this function having no effect
whatsoever

ref 9281fb5537

@fix
2016-03-31 13:28:50 -04:00
Tom Hacohen fea8913633 Ecore: Move all of the duplicate type definitions to ecore_types.eot. 2016-03-23 15:05:20 +00:00
Tom Hacohen 8706d03b43 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen 7d8cd6c40f Revert "ecore: Create Promises"
Reverting this at Felipe's request following my email. There are many
things I strongly object to in this commit. I've touched the surface of
those on the ML (which doesn't work at the moment), though we need to
better discuss it.

The gist:
1. dlsym is a really bad hack that is not even needed.
2. I don't see why eo should even be aware of promises. It's not aware
of list, hash and etc.
3. The eolian changes were done wrong.

This should have been discussed and consulted before done, even if only
because of the amount of hacks it includes and the cross-domain (ecore,
eo and eolian) nature of it.

This reverts commit f9ba80ab33.
2016-03-08 14:23:57 +00:00
Felipe Magno de Almeida f9ba80ab33 ecore: Create Promises
Add a promise object that allows Eolian interface to include promises
as a way to have asynchronous value return and composibility.

The usage is like this in a .eo file:

class Foo {
   methods {
      bar {
         params {
            promise: Promise<int>;
         }
      }
   }
}

Which will create the following API interface:

void foo_bar(Ecore_Promise** promise);

and the equivalent declaration for implementation.

However, the API function will instantiate the Promise for the
user and the implementer of the class.
2016-03-06 17:55:33 -03:00
Jean Guyomarc'h 15ddd174a1 ecore: better resources use in the glib integration
Summary:
When glib support is enabled (HAVE_GLIB), _ecore_glib_init()
was always reserving resources. However, its counterpart may not
be called when:
- glib is not always integrated and
- when a user didn't explicitly required the integration.

Calling _ecore_glib_init() within the request code will cause the
resources to be reserved only when the integration with glib is
required and furthermore guarantees that resources always have a
chance to be released.

Reviewers: cedric, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3749

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-04 16:09:51 -08:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Tom Hacohen 0ef330a363 Ecore poller: Fix tests.
Very confusing, we have:
poller_poller_interval_set and poller_poll_interval_set.

Thanks to herdsman for reporting.
2016-02-16 15:43:50 +00:00
Tom Hacohen 2bddf709c7 Ecore poller: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-16 14:00:46 +00:00
Tom Hacohen d114926b66 Ecore eolian: Ignore callback prototypes for now.
We don't plan on handling function pointers in Eolian.
Fixing these is work for the future, in the meanwhile, we should just work
around these.
2016-02-16 13:55:22 +00:00
Tom Hacohen 57cb1d8ec0 Ecore exe: Move more structs and enums to Eolian. 2016-02-12 14:29:27 +00:00
Felipe Magno de Almeida e1de58a3ad efl: Renamed Ecore.Time to Efl.Time and defined it
Moved the Ecore.Time @extern struct to Efl lib and defined it as
specified in C specification for struct tm. Thus, bindings can be
automatically generated for where struct tm is used.
2016-02-09 13:28:25 -02:00
Vitor Sousa 0e8ce5dd23 ecore: move Ecore_Pos_Map to ecore_types.eot
Move Ecore_Pos_Map from Ecore_Common.h to ecore_types.eot.
Give it the namespaced Eolian name "Ecore_Pos_Map" to follow the
standards.

Update documentation to refer to Ecore_Pos_Map instead of its previous
enum definition "_Ecore_Pos_Map".
2016-02-09 11:38:58 -02:00
Vitor Sousa c674f64a07 ecore: create ecore_types.eot and add Ecore.Time to it
Create the file ecore_types.eot to hold common types related with Ecore.

Add Ecore.Time as an external type to ecore_types.eot.
This type is intended to be a alias to struct tm (from time.h).
That way .eo files have a standard way to reference it.
Each language should manually bind it.
2016-02-09 11:38:58 -02:00
Cedric BAIL 8cc6c7561a ecore: remove useless ecore_lock/unlock. 2016-02-02 10:45:42 -08:00
Sung-Taek Hong 5e53e4b7e1 ecore: check eina_main_loop before lock.
Summary:
 - EINA_MAIN_LOOP_CHECK_RETURN should be called before ecore lock
   because this may return without ecore_unlock.
 - remove EINA_UNLIKELY(!eina_main_loop_is()) which is redundant.

Reviewers: jpeg, jaehwan, cedric, raster

Reviewed By: raster

Subscribers: raster, conr2d, cedric, jpeg

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3541

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-14 14:23:06 -08:00
Vincent Torri 47ed848a87 Evil: integrate the dlfcn code into Evil
This will remove some incompatibilities with other packages,
especially for win-builds
2015-12-29 22:13:58 +09:00
Felipe Magno de Almeida a3db1dddd3 efl-js: JavaScript Eolian binding
To configure efl sources with bindings to use in nodejs add ––with-js=nodejs in configure flags to generate node files

$ configure --with-js=nodejs

and compile normally with:

$ make
$ make install

To use, you have to require efl:

efl = require('efl')

The bindings is divided in two parts: generated and manually
written. The generation uses the Eolian library for parsing Eo files
and generate C++ code that is compiled against V8 interpreter library
to create a efl.node file that can be required in a node.js instance.

@feature
2015-12-23 23:59:40 -02:00
Sung-Taek Hong 1b6a400a29 ecore_idle_exiter: return NULL in eo_finalize() when Ecore_Task_Cb is not set
Summary: - ecore_idle_exiter_add should return NULL, when Ecore_Task_Cb is not set.

Reviewers: jpeg, woohyun, jaehwan, Jaehyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3425
2015-12-18 17:58:54 +09:00
Sung-Taek Hong e840b255f4 ecore_idle_exiter: unlock when Ecore_Task_Cb is NULL
Summary:
- When Ecore_Task_Cb is not set, _ecore_idle_exiter_constructor
  returns without _ecore_unlock(), and remains to be locked.

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3424
2015-12-10 17:01:25 +09:00
Vincent Torri 0497b9685c efl: add binary mode to open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:06:04 +01:00
Vincent Torri 3b44645363 efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:04:36 +01:00
Shinwoo Kim 163b50d0f1 ecore: thread - need to null check of function pointer
Summary: you can meet a segmentation fault without this patch

Test Plan:
please use the following snippet
   Ecore_Thread  *th;
   th = ecore_thread_feedback_run(_heavy_cb, _notify_cb, NULL, NULL, obj, EINA_TRUE);
   ecore_thread_wait(th, 1.0);

Reviewers: raster, Hermet, jaehwan, woohyun, cedric

Reviewed By: cedric

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3315

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 14:10:02 -08:00
Cedric BAIL be99d11662 ecore: remove useless printf in Win32 main loop. 2015-11-06 10:53:29 -08:00
Shinwoo Kim 7a046b0c36 ecore: use recursive lock for _ecore_glib_select
Summary: Fix a deadlock caused by recursive call of _ecore_glib_select.

Test Plan:
Delete elm_image on the glib callback(ref: g_source_set_callback).
The _elm_image_evas_object_smart_del calls ecore_thread_wait.

Reviewers: raster, jpeg, woohyun, jaehwan, Hermet, seoz, cedric

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D3202

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-22 12:28:53 -07:00
Vincent Torri 5a3fb40b4c ecore_exe: terminate threads also in destructor
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 14:48:49 -07:00
Cedric BAIL c4117cdae4 ecore: fix usage eina_condition_timedwait to use relative time instead of absolute time.
This could lead to some very long and unexpected pause as the timeout passed
to eina_condition_timedwait was passed as a absolute time instead of relative.
Hopefully we don't build rocket.
2015-10-14 11:03:21 -07:00
Tom Hacohen d8eae4d4e5 Ecore exe win32: Fix double-free errors.
As reported by vtorri, sometimes ecore_exe on win32 will encounter double
free issues. This was because the variable was freed, but not set to NULL
as expected by the cleanup function.

Fixes T2675

@fix
2015-10-13 14:41:57 +01:00
Vincent Torri a4542b2457 ecore: mimic UNIX code even more
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri 18cbdad446 ecore_exe: avoid thread doing nothing by adding a small sleep
This fixes the CPU to be usedat 100% for each thread in ecore_exe. This
is obviously not an ideal fix and will be improved in the future.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri ce4ef2cf91 ecore_exe: close handles only if they are valid
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri 1885086413 ecore_exe: fix command line when a shell is used, and increase buffer to 32768 bytes
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri b8a9684755 ecore_exe: remove infinite loop when killin process
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri ee8df155d9 ecore_exe: use macro to free resources
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri 8c8bfda978 ecore_exe: better error message when child process can not be run
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri dd45d7f744 ecore_exe: make sure that ReadFile() will not hang
When child process exits, ReadFile() will hang if those pipes are maintained

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri f1a2c22dc3 ecore_exe: read remaining data when the child application has closed
Output and error threads could not read all the data sent by the child.

Based on a patch by Guillaume Friloux

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri d4de2a2d87 ecore: lower log error level. Too much noise otherwise
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri 0f4060e8a9 ecore: mimic Win32 handlers deletion with Fd ones
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Srivardhan Hebbar 01e42f86ab ecore_exe: correcting spelling mistake in comment.
Summary:
Corrected the spelling mistake of mechanism.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3152

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-09 10:00:32 +02:00
Hosang Kim ec53c8845e ecore_fd: add _ecore_main_fdh_poll_del() when fd handler is deleted.
Summary:
When fd handler is deleted by ECORE_CALLBACK_CANCEL, _ecore_main_fdh_poll_del() is not called.
So fd still exists in epoll's event pool.

Reviewers: raster, seoz, woohyun, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3131

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-09 10:00:32 +02:00
Carsten Haitzler 594dab8078 ecore docs - adjust docs to be explicit about ecore main loops nesting
it seems some people think ecore main loops can nest. they can't. be
explicit in docs.
2015-10-05 16:04:31 +09:00
Carsten Haitzler 5a8632ab36 ecore - detect nested ecore_main_loop_begins from silly code
@feature
2015-10-05 16:00:47 +09:00
Tom Hacohen 625eba7d0f Ecore pipe: clean up handling of already read information.
Coverity was complaining about a possible integer overflow. This isn't
actually possible, but coverity has no way to know that because we were
in fact using a too big of a type. I fixed it to be the right type so
now everything should work.

CID 98384

@fix
2015-10-04 16:03:21 +01:00
Amitesh Singh 5f74afe4f7 ecore: fix typos in documentation 2015-09-28 15:49:11 +05:30
Srivardhan Hebbar 826998c15e ecore_exe: fix memory leak on realloc.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3091

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-23 14:03:34 -07:00
Carsten Haitzler 5b2baf173e efl - set thread names for internally created threads for debugging
@feature
2015-09-10 15:17:08 +09:00
ChunEon Park d71182af7a ecore win32: increase command buffer size.
PATH_MAX is not enough for command.
Even in this case, the buffer is not being used only for path.
2015-08-29 16:59:19 +09:00
ChunEon Park 0647f68770 ecore win32: modifiy to better meaningful exception. 2015-08-29 16:46:22 +09:00
Ji-Youn Park bd8f585d74 ecore_pipe: add write fdset and except fdset.
ecore_pipe_wait can be run not only select but also _ecore_glib_select__locked.
if write fdset is null, it make problem in FD_ISSET.

@fix
2015-08-27 16:28:10 +08:30
Carsten Haitzler e9c5f37ab4 efl debug infra - add more event types for ability to check extended inf 2015-08-17 19:37:06 +09:00
Carsten Haitzler 956182c7c5 efl debug - add the ability to begin/end states not just call ranges 2015-08-17 11:10:26 +09:00
Jean-Philippe Andre 868d0fb2e8 ecore_pipe: Fix potential double close
p->fd_read can be closed in _ecore_pipe_read (from a previous loop)

CID 1267459
2015-08-03 12:27:21 +09:00
Jean-Philippe Andre a1a1a93175 Ecore: Fix invalid lock count if DEBUG is enabled
With -DDEBUG, we can see an error message, like:
ERR: You are calling _ecore_lock() from outside of the main loop
     threads in lib/ecore/ecore_private at line 306

Looking at the code shows that ecore_lock fails immediately if
thread debugging is enabled, but ecore_unlock does not, so the
value _ecore_main_lock_count could go below 0.

This is not very important as the value is never used.
2015-07-28 17:13:52 +09:00
Vincent Torri 16063b8ab1 Use eina_environment_tmp_get() 2015-07-22 09:22:02 +01:00
Vincent Torri 6e80c4aea1 Ecore: lower log level
On Windows, this insanely fills a temporary file, reaching
gigabytes
2015-07-22 09:22:02 +01:00
Carsten Haitzler 155a102a45 ecore anim - oops. coverity silence checked wrong value for read/write
fix
2015-07-09 08:22:40 +09:00
Carsten Haitzler ef65806ce4 new animator coverity complaints - silence them
check return of read/write to make coverity happy (even though they
should never fail as it's a pipe within a process).
2015-07-08 18:51:11 +09:00
Vincent Torri 0985ec1cac Ecore Anim: fix compilation on Windows
sys/select.h is not available on Windows
2015-07-07 13:22:32 +01:00
Vincent Torri f965fbe623 Ecore Exe: decrease log level on Windows 2015-07-07 13:22:16 +01:00
Tom Hacohen a3e3afeb01 Ecore exe (windows): Fix object destruction/failed creation.
The correct way of disposing of an object in a failed finalisation is to
return NULL, not to delete it.

Also, since the destructor is already called when the object is deleted
anyway, there's no point in having cleanup code in the finalizer too.

@fix
2015-07-07 12:05:34 +01:00
Carsten Haitzler 786ab74d6d ecore animator - use windows ifdefs/macros so it works there 2015-07-07 15:41:44 +09:00
Carsten Haitzler 24f9e6a458 animator - use select not uslleep so we can wake up during a sleep
if you change animator frametime while we are sleeping for a frame...
we can't wake up and adjust. this allows that with a pipe and select.
2015-07-07 12:32:04 +09:00
Carsten Haitzler 851e1b5cba ecore - animator - new thread timer animator - fiux shutdown
expedite actualyl shuts ecore down - fix eina magic complaints with
safe shutdown.
2015-07-06 18:01:01 +09:00
Carsten Haitzler f33161c9ea ecore animators - improve accuracy by having a thread do animator timing
this will cause animators to be more accurate now with timing coming
from a dedicated thread whose only reason in life is to trigger timed
wakeups. the wakeup time is even adjusted with fmod to the exact
frametime slot that is expected
2015-07-02 18:24:18 +09:00
Daniel Kolesa 7d40ec0ad9 ector,ecore,eio,emotion: convert some docs 2015-06-10 14:35:11 +01:00
ChunEon Park be0c2f5a31 ecore: null cb function is unacceptable.
@fix
2015-06-10 17:46:31 +09:00
Daniel Kolesa d8a56d03a9 ecore: move eo docs to new format 2015-06-08 17:36:32 +01:00
Tom Hacohen 92fb2917cb Eo: Remove eo_error_set() and clean up finalizer()
This is another cleanup in perparation for the Eo stable release.
This is no longer needed thanks to the proper error reporting with
eo_constructor()'s new return value.

The finalizer change cleans it up a bit so it catches more cases/issues.
This also means that the finalizer cleans up the object in all cases,
and not only some.

@feature.
2015-05-20 16:25:38 +01:00
Daniel Kolesa 058a9c9d88 eolian: new syntax for params/values/keys
Instead of "@in type name;" we now use "@in name: type;". This change
is done because of consistency with the rest of Eolian; pretty much
every other part of Eolian syntax uses the latter form.

This is a big breaking change in the .eo format, so please update your
.eo files accordingly and compile Elementary together with the EFL.

@feature
2015-05-18 16:14:31 +01:00
Vinícius dos Santos Oliveira d744223f6d ecore: add documentation for ecore_timer_dump 2015-05-15 10:29:35 +02:00
Carsten Haitzler 8a101cd8f0 efl - add more evlog points
@feature
2015-05-14 17:35:22 +09:00
Carsten Haitzler 2aeb289063 eina - begin event log infra we can get from the new debug monitor
we can down dump event logs. some ecore mainloop bits are logging at
the moment.
2015-05-10 19:05:54 +09:00
Carsten Haitzler 38faeacee1 ecore - ecore_pipe_wait timeout broken as it never adjusts while waiting
if select gets interrupted it just waits again from the start because
it uses loop time not "now" time. this is wrong and makes timeout
waits possibly hang if enough things interrupt select without reading
data. this fixes that.

@fix
2015-05-08 14:13:17 +09:00
Daniel Kolesa ed0988a22d eolian: change all EFL .eo files to use new syntax for properties 2015-05-07 16:36:58 +01:00
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Vincent Torri a53c52dee0 Ecore_Exe: remove process_id field as it is a duplicate of the pid one
It breaks ABI on Windows (not a big deal at this stage).

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:07 +02:00
Jaehwan Kim bd71d818f9 ecore_timer: fix the default return value.
When this function fails to get the interval value, it should return -1.0.
Currently, the value can be integer(-1.0 has an Error).
Maybe it should be fixed.

@fix
2015-04-23 18:34:54 +09:00
Conrad Meyer 9281fb5537 ecore_main.c: Refactor purely duplicate ecore_main_fd_handler_file_add()
Summary:
... to simply invoke `_ecore_main_fd_handler_add()`. The only difference appears to be the former sets `->file` to `EINA_TRUE`. So, we add that as a parameter.

You can consider this patch, and any other contributions I make to enlightenment, to be under the terms of whatever open source license governs that particular project, or at your option, the MIT license. Basically, if I'm uploading patches here, it's because I want them to be useful.

Test Plan: Should be pretty straightforward. I am in the process of doing a compile check.

Reviewers: #efl

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2302
2015-04-08 15:47:26 +09:00
Stefan Schmidt eae15fbb28 ecore: Move documentation for ecore_timer_add at the correct place.
Many thanks to Vinicius dos Santos Oliveira for spotting this and
pointing it out on the mailing list.
2015-04-01 10:23:00 +02:00
ChunEon Park bc9265f16d ecore/idler - simpler checking. 2015-03-28 15:43:50 +09:00
Nicolas Aguirre 257e399e53 ecore: trigger events on FD_READ, FD_CONNECT and FD_ACCEPT.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-26 17:46:54 +01:00
ChunEon Park e56548aa33 ecore_idler: + null check.
like timer, animator we do check the idler validation
and prevert crash there just in user misusage case.

@fix
2015-03-25 14:45:43 +09:00
Andrii Kroitor 1c3dbc3267 ecore_exe: fix ecore_exe_pid_get on windows
Summary:
ecore_exe_pid_get returns exe->pid value so it should be filled

@fix

Reviewers: raster, seoz, cedric, Hermet

Subscribers: NikaWhite, cedric, reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D2195

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-23 19:37:24 +01:00
Andrii Kroitor 9f96d4996c ecore_win32: fix segfault
Summary:
_ecore_exe_pipe_read_thread_cb and _ecore_exe_pipe_error_thread_cb expecting
object as argument.

Reviewers: cedric, seoz, Hermet

Subscribers: cedric, reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D2185

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 11:05:24 +01:00
Carsten Haitzler 33dd9a05cc ecore signals - make note of forkfd stuff that is new to avoid sigchld 2015-03-13 14:54:02 +09:00
Carsten Haitzler 009ec26460 eina + ecore - fix main loop thread id tracking on fork
if you fork and even if you do ecore_fork_reset() a thread calling
ecore_main_loop_thread_safe_call_async(0 for example eill end up
resetting the mainloop thread id to itself (a non mainlopo thread) via
calling eina_main_loop_is() since pid changed. there is little point
in doing this so remove the pid tracking from eina and ensure mainloop
thread id is updated in ecore's fork reset.

@fix
2015-02-26 19:47:51 +09:00
Tom Hacohen 648ad2591c Fix code to conform to recent Eo changes. 2015-02-23 17:16:02 +00:00
Guillaume Friloux d0dabf8613 ecore: improve network events handling on Windows. 2015-02-11 17:03:39 +01:00
Guillaume Friloux 9cf31fc842 ecore: add FD_CLOSE, FD_ACCEPT and FD_CONNECT for sockets on Windows. 2015-02-11 17:03:38 +01:00
michelle legrand fbb8236700 ecore: directly allocating and freeing Ecore_Win32_Handler variable.
There was no memory pool nor any function like that in fact.

@fix
2015-02-11 17:03:37 +01:00
Stefan Schmidt 5eb2d474ff ecore: Add since tag for new ecore_thread_wait() API
Added in this cycle but no since tag was given.
2015-01-27 11:35:54 +01:00
Chris Michael f046a60a48 ecore: Remove potentially useless 'else' branches
Summary: We actually don't need an else branch here if we don't have
USE_G_MAIN_LOOP

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-26 08:37:08 -05:00
Chris Michael e063027ed8 ecore: Remove blank line
Summary: No functional changes, just removing an empty line

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-26 08:37:08 -05:00
Vincent Torri 546d87c8b5 autotools: remove some Windows CE bits.
We actually do not support Windows CE and don't plan to. Let's remove that
from our configure.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-24 12:33:27 +01:00
Vasyl Vavrychuk 62dd6d6dd4 ecore: lower priority of some intrusive logs.
Summary:
After fixed logging to journald there is lots of prints like
Jan 15 16:04:21 localhost system_server[1017]: enter idling=1 fds=1 events=0 timers=0 (next=17.14) idlers=0

Jan 15 16:04:21 localhost system_server[1017]: leave, timeout = 0

Change-Id: Id26e37a55ddaad36094308ac7fd09767cf659c04
Signed-off-by: Vasyl Vavrychuk <vasyl.vavrychuk@globallogic.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1875

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-20 19:13:34 +01:00
Jérémy Zurcher cb670931d6 ecore: fix compilation, missing return value in ecore_thread_wait
@fix ecore_thread_wait return EINA_TRUE if execution is over or thread is NULL
2015-01-07 22:12:29 +01:00
Cedric BAIL e5ddfb4b2b ecore: add ecore_thread_wait and necessary infrastructure.
This enable the possibility to block the main loop until a
specific thread is done. It may trigger still process ending
of other thread during that function call, but not any other
type of event (timer, animator, idler, ... are all ignored).
2015-01-07 16:45:07 +01:00
Carsten Haitzler 0e4cfade80 ecore animator pos map - move from v[] array to *v pointer.
this moves from double v[][ as a param to double *v - which is more
consistent with the rest of efl. this shouldnt be an abi break.
2014-12-17 17:00:11 +09:00
ChunEon Park 8df0c5cf6d ecore/animator: improve the doc description. 2014-12-09 16:51:08 +09:00
ChunEon Park 1d8693d3e9 ecore/animator: code refactoring.
renamed to more meaningful name.
don't stupid computaion twice.
2014-12-09 16:43:23 +09:00
ChunEon Park 3b6a5956f9 ecore/animator: fix the wrong computation of bezier cubic.
Previous beizer cubic finds t value approximately.
In this sequence, there were 2 problems.

1. Previous guess_t value should be passed to differential equation to get the more accurate t value.
2. Guessing time count is not enough. I found 6 is enough time to get the t value experimentally. Previously it just tried 4 times on the other hand.

@fix
2014-12-09 16:36:53 +09:00
ChunEon Park 4e1c0c54ec Revert "ecore/animator: fix the bezier cubic compuation."
This reverts commit 2e1032e28f.

This patch is wrong. On reviewing the origin implementation.
2014-12-09 16:36:53 +09:00
ChunEon Park 7642c3357b Revert "ecore/animator: simpler code"
This reverts commit 44f0f3e170.
2014-12-09 16:36:53 +09:00
Mike Blumenkrantz 0c6844707f upower module now errors and kills itself off when unsupported new version detected
0.99.0 removed the OnLowBattery property and added the per-device WarningLevel property. this requires what will effectively be a full rewrite of the module to track all the power levels of all the attached batteries and set the ecore power level somehow based on a combination of their levels

since I have no desire to spend any more hours working on and debugging this module which is based on a known-unstable api, I'm making it disable itself if it detects a version >= 0.99.0. hopefully someone will decide to maintain both this and eldbus in the future so that we can more accurately track upstream when they make changes to these things

ref T1908

ref T1909
2014-12-08 15:22:19 -05:00
ChunEon Park 44f0f3e170 ecore/animator: simpler code 2014-12-05 23:24:16 +09:00
ChunEon Park 2e1032e28f ecore/animator: fix the bezier cubic compuation.
The previous compuation is totally wrong.
Even it doesn't work correctly.
(I have no idea what the orignal author was thinking?)

Here we just need a simple and clear fomular to get the current progress frame.

If i'm wrong, please ping me.

@fix
2014-12-05 23:17:38 +09:00
Stefan Schmidt e291b3c226 ecore: Fix @since version to 1.13 for new API
1.3 is acient so we really will release this with 1.13.
Removed some trailing whitespaces devilhorns added. :)
2014-12-04 15:02:34 +01:00
Chris Michael 3c4e0545a1 ecore: Add code for new API function 'ecore_main_loop_nested_get'
Summary: This commit adds the actual code to the function, which
returns the 'in_main_loop' variable so that we can detect if the
ecore_main_loop is actually running.

NB: Will be needed for new eldbus API function (yet to add).

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-04 08:58:10 -05:00
Chris Michael 607026d3c6 ecore: Add a new API function ecore_main_loop_nested_get
Summary: This commit adds a new function 'ecore_main_loop_nested_get'
so that we can detect if the ecore_main_loop is running.

NB: This is going to be needed for a new eldbus function that we have
to add in order to handle a use-case on the Wayland side. Spoke with
cedric for a while wrt to all this, and he gave it his 'ok' ;)

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-04 08:58:10 -05:00
Daniel Juyung Seo 29abdd9ca4 ecore: Add warnings to the public internal APIs.
These APIs were not meant to be exposed so it is not recommended to
use them out side of EFL. We had to expose them to use them between
EFL libraries. (Talked with Raster)
2014-11-25 19:30:16 +09:00
Jaehwan Kim a50aa2c938 ecore_anim: fix source_set bug.
The source and the function should be set after _end_tick is called.

@fix
2014-11-14 11:41:56 +09:00
Adrien Nader e9e61718d1 ecore_exe_win32: CreateProcess was called with random flags.
CreateProcess() has a flags parameter which is being passed
"run_pri | CREATE_SUSPENDED".

The issue lies in the value of run_pri. It is best explained by the
following code somewhere else in the file:

   switch (run_pri)
     {
      case IDLE_PRIORITY_CLASS:
        return ECORE_EXE_WIN32_PRIORITY_IDLE;

The run_pri variable is supposed to store a value from the win32 API while
it was used to store one from the ecore API.

If I recall correctly, the windows one is equal to 32 and the ecore one to
9999. Meaning 9999 ended up used as flags so let's have a look at what that
actually enabled; the reference is "Process Creation Flags" from MSDN
http://msdn.microsoft.com/en-us/library/ms684863%28v=vs.85%29.aspx .

9999 gives 0x0000270F and this matches
  DEBUG_PROCESS | DETACHED_PROCESS | DEBUG_ONLY_THIS_PROCESS
  | CREATE_SUSPENDED | CREATE_NEW_PROCESS_GROUP | CREATE_SEPARATE_WOW_VDM
  | CREATE_UNICODE_ENVIRONMENT | <0x00002000 matches nothing>

Matches nothing? Weird. Well, maybe. Except that I stumbled upon this define
in the mingw-w64 headers:
  #define CREATE_FORCEDOS 0x2000

Mingw-w64 only has a #define, Wine has nothing (they don't do DOS anyway),
but ReactOS has some code about it:
  https://git.reactos.org/?p=reactos.git;a=blob;f=reactos/dll/win32/kernel32/client/proc.c;hb=f60941f8dc775427af04eb0a3c3e4d38160c7641#l3007

Overall the actual set of flags probably made very little sense and wasn't
working very well. :)

I also noticed the following in the mingw-w64 headers:
  #define INHERIT_CALLER_PRIORITY 0x20000

This should be a better match for what seemed to be the original intent of
inheriting the priority. I haven't tested it and it's only documented on
MSDN for Windows CE and similar so I'm really not sure about what it does.

MSDN however mentions that the child processes will have at most the
"normal" priority by default (same as its parent if the parent has less
than the default one) but I'm under the impression a process can raise its
own priority level... Anyway, "NORMAL_PRIORITY_CLASS" will do for now.

With this change and a couple others, elementary's theme builds properly
on Windows (_on_ Windows). I'll assess the usefulness of the other changes
in my tree over the next few days.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-10-25 16:42:00 +02:00
Pierre Le Magourou 1c0390bf08 ecore_ipc: update missing API documentation. 2014-10-20 18:32:27 +02:00
Pierre Le Magourou ab9691be44 ecore: update Ecore documentation main page.
Add missing groups and remove groups that are already in subgroups in
order to have a nicer Ecore main page in the documentation.
2014-10-20 18:17:26 +02:00
Pierre Le Magourou 6a9cfbcfef ecore: update the doxygen groups to compile forgotten parts of the API.
Some parts of the API documentation where not compiled at all by doxygen
because of missing '@{' and '@}' tags. This commit adds the missing tags
in Ecore_Getopt.h, Ecore_Con_Eet.h, and Ecore_IMF.h headers.
2014-10-20 18:17:26 +02:00
Pierre Le Magourou a598e3db02 ecore: update missing Ecore_Getopt.h API documentation. 2014-10-20 18:17:26 +02:00
Pierre Le Magourou f59359d5be ecore: update missing Ecore_Common.h API documentation.
Add some new documentation when missing, and fix old documentation
warnings in Doxygen output.
2014-10-20 18:17:26 +02:00
Nicolas Aguirre 0bbcef65ab ecore: add documentation for Ecore_Version structure. 2014-10-20 18:01:49 +02:00
Daniel Juyung Seo b8ce446c2b ecore: Add more documentation for ecore_animator_source_set(). 2014-10-13 14:56:19 +09:00
Tom Hacohen a7560dbc61 Eo: Change eo_add/del/unref behaviour.
Before this change eo_add() used to create an object with 1 ref, and if
the object had a parent, a second ref.
Now, eo_add() always returns an object with 1 ref, and eo_add_ref()
    preserves the old behaviour (for bindings).

eo_unref now un-parents if refcount is 0, and eo_del() is an alias for
eo_unref (will change to be a way to ensure an object is dead and goes
        to zombie-land even if still refed).
2014-09-25 17:38:45 +01:00
Tom Hacohen 6846978ebd Eo: Get rid of eo_add_custom.
We decided to deprecate this one in favour of setting thing in the
construction between the constructor and the finalizer.
2014-09-25 10:30:56 +01:00
Jean Guyomarc'h 5ac739efc6 ecore: silent pointless warning when not having epoll
Reviewers: cedric, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1441
2014-09-16 12:11:59 +02:00
Stefan Schmidt 6996aac561 docs: Add links to avahi, drm and wl groups form main ecore page.
While some docs have been added for these nobody added them to the
main ecore page. Which in turn makes them invisible for people reading
our docs.

I found three ecore family members to not even having a brief group
description: cocoa, pslight and sdl.

Would be good to get some basic docs in for them.
2014-09-11 15:39:43 +02:00
Stefan Schmidt 7f5e22b474 ecore: Remove WinCE group from docs as we removed the support. 2014-09-11 15:39:43 +02:00
Cedric BAIL 7e0631eafb ecore: fix documentation. 2014-09-09 18:10:48 +02:00
Chris Michael d7433b2bfe ecore: Check that eo_data_scope_get returns valid Ecore_Timer_Data
before trying to use it

eo_data_scope_get Could return NULL if it does not find valid
ecore_timer_data on this object. We should check that return before
just Assuming that timer data is valid.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-05 11:39:36 -04:00
Tom Hacohen 1a58ad78ab Ecore exe: Mark obj as unused. 2014-09-02 13:23:41 +01:00
Tom Hacohen e5ed4b7f04 Ecore exe: Fix ecore_exe_send (on posix). 2014-09-02 12:56:54 +01:00
Daniel Kolesa 46715c3574 eolian: move efl eo files over to the new ctor syntax 2014-09-01 15:53:35 +01:00
Daniel Kolesa dfb5501d71 ecore: do not use Eina_Bool in ecore_mainloop.eo 2014-08-28 17:02:20 +01:00
Daniel Kolesa 77d148cec9 eo: migrate constructors sections to constructing methods 2014-08-27 15:43:47 +01:00
Tom Hacohen 686acd88f7 Ecore exe: refactor and fix compilation on windows.
This is the first step towards splitting it nicely. This fixes
compilation on windows (or so it seems from my testing) and takes out
all the platform specific code (posix included) out of the main source
file.
2014-08-27 15:14:17 +01:00
Daniel Kolesa 9a3cf2ff49 ecore_getopt: correct fix for CID 98382 and 98383 2014-08-27 11:57:19 +01:00
Tom Hacohen 27f738115e Revert "ecore_getopt - fix possible null arg"
This breaks terminology, look at the previous commit for more info.

This reverts commit d8130825d5.
2014-08-27 11:50:14 +01:00
Tom Hacohen 2f249a6436 Revert "ecore_getopt - fix possible null arg"
Breaks getopt completely, try terminology --help.

You committing it again doesn't fix the fact it doesn't work. :)

This reverts commit e876ec527f.
2014-08-27 11:50:14 +01:00
Carsten Haitzler e876ec527f ecore_getopt - fix possible null arg
fixes CID 98382
2014-08-27 17:55:06 +09:00
Carsten Haitzler d8130825d5 ecore_getopt - fix possible null arg
fixes CID 98383
2014-08-27 17:53:42 +09:00
Tom Hacohen 185d1f44cb Ecore exe: Fix object construction on linux and windows.
Thanks to Vincent Torri for reporting.
2014-08-27 09:04:14 +01:00
Carsten Haitzler 4c25e710a7 ecore-pipe - check fcntl return
fix CID 1039703
2014-08-27 15:17:00 +09:00
Tom Hacohen d4f6870bb5 Ecore exe: Fix windows build by making the windows stuff less redundant.
This should fix the dumb way it was split until now (everything was redundant).
Now we just reimplement the parts we need to reimplement and the rest is shared.
The win32 code is called from within the normal code.
2014-08-26 16:48:07 +01:00
Tom Hacohen 791f1e5f6c Ecore exe: Start using the eo destructor. 2014-08-26 16:36:44 +01:00
Tom Hacohen b4f49eddb0 Ecore exe: Fix object deletion. 2014-08-26 16:02:48 +01:00
Tom Hacohen 7cbfa52dd5 Ecore exe: Fix compilation on windows (fix inlist usage).
Hopefully. I don't have a winodws box to test it on. Go Jenkins go.
2014-08-26 15:21:05 +01:00
Tom Hacohen 40aa38c164 Ecore exe: Fix compilation on windows.
Hopefully. I don't have a winodws box to test it on. Go Jenkins go.
2014-08-26 15:16:00 +01:00
Daniel Kolesa 8c8a2b1098 ecore_getopt: correct fix for CID 98382 and 98383 2014-08-22 15:13:44 +01:00
Daniel Kolesa 50632600e6 Revert "ecore_getopt - fix arg_val being null"
It's as wrong as the other commit which TAsn already reverted.
This needs a fix elsewhere, particularly in the functions that
use arg_val.

This reverts commit ab53900364.
2014-08-22 15:07:21 +01:00
Tom Hacohen 41ec0da2aa Revert "ecore_getopt - handle if arg_val is null"
This completely breaks getopt. Try running terminology --help.

This reverts commit 1bb6a8a4e4.
2014-08-22 14:51:35 +01:00
Carsten Haitzler ab53900364 ecore_getopt - fix arg_val being null
fix CID 98382
2014-08-22 20:14:58 +09:00
Carsten Haitzler 1bb6a8a4e4 ecore_getopt - handle if arg_val is null
fix CID 98383
2014-08-22 20:14:58 +09:00
Jérémy Zurcher 4cbdd93b13 Ecore_Common: protect against Ecore_Exe redefinition 2014-08-22 09:20:32 +02:00
Tom Hacohen a9a049b8ab Eo files: Adjust according to latest eolian changes. 2014-08-21 11:02:11 +01:00
Tom Hacohen 6e5a35e43e Ecore exe: Start using the control interface. 2014-08-21 11:02:11 +01:00
Tom Hacohen cc6b02bc22 Ecore Exe: Start using eo events. 2014-08-21 11:02:11 +01:00
Tom Hacohen eed11ac529 Ecore Exe: Migrate to eo. 2014-08-21 11:02:11 +01:00
Tom Hacohen 345f1fc7ca Ecore mainloop: add some more events. 2014-08-21 11:02:11 +01:00
Tom Hacohen 0658591a4d Efl eolian: Adjust according to eolian syntax changes. 2014-08-21 11:02:10 +01:00
Tom Hacohen 17e99e6750 Ecore mainloop: Add .eo implementation. 2014-08-21 11:02:10 +01:00
Daniel Kolesa 459638c2b9 eolian: more consistent syntax
"legacy foo" is now "legacy: foo" and "return foo" is now "return: foo".
2014-08-21 09:26:03 +01:00
Daniel Kolesa bb24b60638 eolian: generate implicit typedef for each class
And use these typedefs instead of just Eo in API.
2014-08-21 09:26:03 +01:00
Daniel Kolesa ac2ea63867 ecore_poller: no need for eo_prefix 2014-08-21 09:26:03 +01:00
Daniel Kolesa 8d74261a30 eolian: fix a bug that caused wrong comparisons of class and file name
This also renames ecore_poll files to ecore_poller so that the class name matches.
2014-08-21 09:26:03 +01:00
Stefan Schmidt 9412a409a2 ecore: Add missing since version for new ecore_loop_time_set()
Introuduced during this cycle. Note it down in doxy.
2014-08-07 11:43:14 +02:00
Carsten Haitzler aa6e9c2968 ecore animator - this fixes suspended animators still waking up
@fix

this fixes a long standing issue where a suspended animator still is
waking up as originally suspended animators were expected to hang out
for a small time. as e's comp uses a suspended animator, this is a
problem as it causes continual wakupes every single frame (60hz or so)
with this suspended animator. this fixes that and accounts for
suspended animators with tick begin/end
2014-08-01 09:31:18 +09:00
Carsten Haitzler 164ea41b3e move ecore documentation not in headers to .h files for consistency 2014-07-26 12:30:12 +09:00
Carsten Haitzler 8f654b8f24 add function to set ecore loop time
@feature

this allows you to set the ecore loop time. only useful in trying to
get hyper-accurate frame timings from sources when doin a custom tick
source.
2014-07-26 12:30:12 +09:00
Carsten Haitzler 8130b0ccb8 ecore animator - adjust ecore loop time when animtor ticks to be exact
this adjusts ecore loop time very slightlye tp be the "Exact" timepoint
when then animator timer, if timer is used, should have gone off. this
should make animations more precise.

@feature
2014-07-26 12:30:12 +09:00
Vincent Torri 9631585f24 efl: remove Windows CE support 2014-07-13 15:17:17 +02:00
Daniel Kolesa c9744596de eolian: builtin bool type, and change the eo files to use that 2014-07-11 14:40:49 +01:00
ChunEon Park 5a3080cd5d ecore - fix a typo in doc. 2014-07-11 00:21:37 +09:00
Jérémy Zurcher a7dfaef215 Revert "ecore: animator use eo_add() instead of eo_add_custom()"
mmhhmm, missing @ Constructor tag, bad for the bindings,
maybe we must split animator and timeline into 2 classes,
maybe support callback hot swaping ...

This reverts commit ec4ffb86d6.
2014-07-03 23:05:57 +02:00
Jérémy Zurcher ec4ffb86d6 ecore: animator use eo_add() instead of eo_add_custom()
Summary:
- use defauld constructor instead of custom one.
- we don't allow construction of an animator with a NULL callback function,
  this is checked in overriden eo_finalize.
- we don't support changing this callback once the object is created,
  such calls will call ERR() and return.

see 46a78e8c and f92e5d50 for eo_add_custom() -> eo_add() details

Reviewers: tasn

Reviewed By: tasn

CC: cedric

Differential Revision: https://phab.enlightenment.org/D1113
2014-07-03 22:33:15 +02:00
Tom Hacohen e4123fda30 Ecore eolian: Fix namespaces for all of the ecore classes. 2014-06-30 17:47:06 +01:00
Tom Hacohen c19948c2cf Eo (base class): Fix .eo file to have proper namespacing for the class naem. 2014-06-30 17:47:06 +01:00
Daniel Kolesa 8221e9dd45 eolian: modify all eo files according to the new type syntax 2014-06-30 17:20:38 +01:00
Vincent Torri ed2987eb69 ecore: fix ecore main loop on Windows when number of objects is greater that MAXIMUM_WAIT_OBJECTS
@fix

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-23 10:21:37 +02:00
Daniel Kolesa e9f4890747 eolian: fix end-of-file checking, move namespaces from :: to . 2014-06-20 10:46:04 +01:00
Carsten Haitzler c32f914ac5 trailing spaces-- 2014-06-16 15:58:58 +09:00
Carsten Haitzler 4b24b386db fix duplicate function call names in ecore and ecore_con that can clash
this fixes T1341. also it removes the pointless return value from
these two functions as the return is never used. also the ifdef in
ecore_main.c seemed wrong as it wasd using fcntl not execvp but the
ifdef was for execvp. this just never was discovered, so it's slid
under the hood for a long time.
2014-06-16 15:57:05 +09:00
Tom Hacohen 0fc3279db9 Efl: Update code to use the new class names generated by eolian. 2014-06-03 11:28:01 +01:00
Tom Hacohen d9263e6571 Eo base: rename event_freeze_get to event_freeze_count_get.
This is needed because of a possible clash between the method event_freeze
and the property event_freeze with bindings.
2014-06-02 12:50:23 +01:00
Guillaume Friloux 6d320cac20 Fix warnings with sig_atomic_t being a long on FreeBSD. 2014-05-30 14:02:36 +02:00
ChunEon Park 28871750b7 Revert "ecore/ecore_event - logically this check is redundant."
This reverts commit df60e63bf9.

seems this patch is wrong.
2014-05-27 22:27:05 +09:00
ChunEon Park b5ca4c3500 ecore/ecore_exe - removed duplicated null check. 2014-05-27 20:44:37 +09:00
ChunEon Park df60e63bf9 ecore/ecore_event - logically this check is redundant.
remove check so that prevent tool doens't notify this anymore.
2014-05-27 20:36:42 +09:00
Carsten Haitzler ddc09dd04e fix ecore_thread_global_data_wait to work when no data exists yet
@fix

this is based on feedback from wonil choi, where this didn't work
right. this also has an if check for the hash itself.
2014-05-15 21:23:51 +09:00