Commit Graph

2507 Commits

Author SHA1 Message Date
Christopher Michael bb651d8eb8 Move Ecore.h (and associated headers) to own dir.
SVN revision: 50142
2010-07-09 06:23:19 +00:00
Carsten Haitzler 0a642224aa hmm seems not kosher
SVN revision: 50122
2010-07-08 06:53:06 +00:00
Lucas De Marchi c7d1c78c46 Finish fixing int => Eina_Bool
A buggy standard.h caused some parser errors in the previous committed
patch generated by Coccinelle. This commit find the other places.



SVN revision: 50052
2010-07-06 00:08:52 +00:00
Brett Nash 1c185410b4 Old bug: Don't suffer from buffer overflow in readlink.
SVN revision: 50040
2010-07-05 04:11:53 +00:00
Nicholas Hughart 520441b412 Fix a couple of missed Eina_Bool conversions
SVN revision: 50007
2010-07-03 03:07:28 +00:00
Cedric BAIL d4059c7107 * eina: rename ecore_file_ls_iterator to eina_file_ls.
SVN revision: 50002
2010-07-02 17:23:05 +00:00
Cedric BAIL f424ca1e1e * ecore: for the 50 000 commits, why not adding some docs ?
SVN revision: 50000
2010-07-02 16:01:21 +00:00
Cedric BAIL 87b85132dd * ecore: add ecore_file_ls_iterator.
SVN revision: 49997
2010-07-02 15:25:22 +00:00
Cedric BAIL 062f4c3920 * ecore: fix long run thread, now that I have a nice user.
SVN revision: 49994
2010-07-02 11:15:20 +00:00
Lucas De Marchi 7051feb04e Fix callback signatures
The change from returning int to Eina_Bool left several call sites with
warnings because they were not updated. Here they are fixed by using
Coccinelle, a tool that allows us to automate tasks like that. This
commit was generated from the following semantic patch:

virtual org

@r1@
identifier fn!=NULL, fn2;
expression E1, E2, E3;
@@
(
ecore_event_handler_add(E1, fn, ...)
|
ecore_event_filter_add(E1, fn, ...)
|
ecore_idler_add(fn, ...)
|
ecore_idle_enterer_add(E1, fn, ...)
|
ecore_idle_enterer_before_add(E1, fn, ...)
|
ecore_idle_exiter_add(E1, fn, ...)
|
ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...)
|
ecore_main_win32_handler_add(E1, fn, ...)
|
ecore_timer_add(E1, fn, ...)
|
ecore_timer_loop_add(E1, fn, ...)
|
ecore_animator_add(fn, ...)
|
ecore_poller_add(E1, E2, fn, ...)
)

@r2@
identifier r1.fn;
identifier ret;
typedef Eina_Bool;
position p;
@@
- int
+ Eina_Bool
fn@p(...) {
<...
(
- return 1;
+ return EINA_TRUE;
|
- return 0;
+ return EINA_FALSE;
|
- int
+ Eina_Bool
ret;
...
return <+...ret...+>;
|
return ...;
)
...>
}

@r3@
identifier r1.fn2;
identifier ret;
position p;
@@
- int
+ Eina_Bool
fn2@p(...) {
...
(
- return 1;
+ return EINA_TRUE;
|
- return 0;
+ return EINA_FALSE;
|
- int
+ Eina_Bool
ret;
...
return <+...ret...+>;
|
return ...;
)
...
}

@r4@
identifier r1.fn;
@@
- int
+ Eina_Bool
fn(...);

@r5@
identifier r1.fn2;
@@
- int
+ Eina_Bool
fn2(...);

@script:python depends on org@
p << r2.p;
f << r1.fn;
@@
import sys
msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line)
print >> sys.stderr, msg

@script:python depends on org@
p << r3.p;
f << r1.fn2;
@@
import sys
msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line)
print >> sys.stderr, msg



SVN revision: 49985
2010-07-02 01:38:05 +00:00
Brett Nash bb4c28dbb1 Commit ecore_evas_ecore_evases get
Coming soon:
	ecore_ecore_evas_evas_get
	evas_ecore_ecore_evas_get
	get_ecore_evas_ecore_evas_name_gen()


SVN revision: 49983
2010-07-02 00:32:56 +00:00
Cedric BAIL d1fcb71f84 * ecore: add ecore_long_run facility with notify to main loop.
SVN revision: 49948
2010-06-30 13:25:28 +00:00
Vincent Torri eeddb1f399 fix returned type of callbacks
SVN revision: 49878
2010-06-26 15:38:50 +00:00
Vincent Torri ed3725ddcd fix returned type of callbacks
SVN revision: 49877
2010-06-26 15:35:30 +00:00
Cedric BAIL fbe9064310 * ecore: Ecore callback really should return Eina_Bool.
SVN revision: 49829
2010-06-24 16:15:56 +00:00
Brett Nash 5779ea8a4c Pass original data to targest selections
Users of targets may well want the atoms anyway.


SVN revision: 49811
2010-06-23 08:01:43 +00:00
Vincent Torri a90bb64143 fix icccm
Patch by Alexander Kerner


SVN revision: 49691
2010-06-15 23:45:45 +00:00
Vincent Torri eb4c9979f2 fix for double free, occured while processing a buffered event twice.
patch by Alexander Kerner


SVN revision: 49690
2010-06-15 22:37:07 +00:00
Vincent Torri af955f4767 wrong symbol
SVN revision: 49674
2010-06-14 20:44:44 +00:00
Vincent Torri 698ac34608 formatting
SVN revision: 49672
2010-06-14 19:34:14 +00:00
Vincent Torri de14ee6ecf fix compilation
SVN revision: 49671
2010-06-14 19:32:24 +00:00
Vincent Torri b1a203f57b fix selection compilation
SVN revision: 49670
2010-06-14 19:22:45 +00:00
Vincent Torri 635ac723f6 add the missing functions
ecore_x_sync_counter_new()
ecore_x_sync_counter_free()
ecore_x_sync_counter_inc()
ecore_x_sync_counter_val_wait()


SVN revision: 49669
2010-06-14 19:21:11 +00:00
Vincent Torri 5d148e55b1 fix code.
Patch by Mikhail Gusarov


SVN revision: 49668
2010-06-14 19:19:30 +00:00
Vincent Torri 7c4ab89bc9 XCB used to provide iterators for requests returning
list of values. Recent versions dropped it and return
arrays instead. Adapt code to use arrays unconditionally
(arrays were present in earlier libxcb versions).

Patch by Mikhail Gusarov


SVN revision: 49667
2010-06-14 19:17:49 +00:00
Cedric BAIL 238b9836ca * ecore: return Eina_Bool instead of int when it make sense.
Patch from Nicolas Aguirre.


SVN revision: 49611
2010-06-10 11:57:12 +00:00
Brett Nash 08bee8f6b7 Ecore_x_selection convert is now a little richer.
Allows implementation of proper X cut & paste by an applicaiton, exisitng code
should not be affected (may need an recompile).


SVN revision: 49586
2010-06-09 09:40:37 +00:00
Carsten Haitzler 194fc4c4ac fix cedric b0rk
SVN revision: 49569
2010-06-08 11:31:15 +00:00
Cedric BAIL f3457b3bdf * ecore_con: close connection when other side end it.
SVN revision: 49567
2010-06-08 11:08:43 +00:00
Carsten Haitzler bba7aaba2a quick - limit # of tries for reading... this means 1000% cpu usage...
but at least things dont hang.



SVN revision: 49566
2010-06-08 11:02:57 +00:00
Carsten Haitzler d36320a7de off! shhh!
SVN revision: 49565
2010-06-08 08:05:30 +00:00
Brett Nash d186808783 Minor tweak: Include stdio if logging enabled (ugly, but it is for debug)
SVN revision: 49564
2010-06-08 07:20:12 +00:00
Cedric BAIL 6aac60a150 * ecore_con: with AF_UNSPEC, c-ares will prefer IPv4 address
when IPv4 and IPv6 exist, if you ask AF_INET6, it will first
	try IPv6 before falling back to IPv4 address.

	So now ecore_con_ares will prefer IPv6 if available.


SVN revision: 49552
2010-06-07 13:08:19 +00:00
Cedric BAIL d76f881898 * ecore_con: improve error detection.
SVN revision: 49551
2010-06-07 13:05:49 +00:00
Carsten Haitzler eb886add0e be mroe explicit on keeping im handle.
SVN revision: 49444
2010-06-04 06:36:54 +00:00
Carsten Haitzler 6e1b5c42fa formatting.
SVN revision: 49441
2010-06-04 04:53:10 +00:00
Carsten Haitzler 8fba7a4476 formatting.
SVN revision: 49440
2010-06-04 04:45:53 +00:00
Carsten Haitzler f8cc974e07 didnt set right ptr to null
SVN revision: 49439
2010-06-04 04:18:50 +00:00
Lucas De Marchi 4ce0e74d63 housekeeping++
* process filters in their own function
* remove commented printf
* remove trailing white space
* lower indentation needed by breaking loop instead of a big if



SVN revision: 49436
2010-06-04 02:47:00 +00:00
Lucas De Marchi bda2b1d0af Fix current event pointer when walking filters
When walking the filters' list, using event_current might screw a
recursive main loop that had to process filters *and* events on the
first iteration. Thus, use a new pointer to mark the current event being
treated when walking filters' list.

Tests for this one is difficult. I'll try to think about a test later.



SVN revision: 49435
2010-06-04 02:45:47 +00:00
Lucas De Marchi 0fa2ca5721 Fix semantics of event->delete_me
* _ecore_event_purge_deleted() purges only events marked with
delete_me
* _ecore_events_exist() walks the events list to control that
at least one event with delete_me == 0 exists

Tests coming in a separate patch.



SVN revision: 49434
2010-06-04 02:45:20 +00:00
Carsten Haitzler eb4b780754 set magic to none later - and set props to null after freeing each -
in case del callbacks on objects access ee.



SVN revision: 49410
2010-06-03 12:33:27 +00:00
Lucas De Marchi c3dd8fa055 Fix ecore_events for recursive main loops
This fixes the following scenario:
1) An event handler starts another main loop
2) The new main loop processes all the remaining event_handlers of this
event and the remaining events
3) New events are added to the events list
4) A new iteration occurs

Prior behavior was that on (4) the events already processed were
triggered again. The code added to ecore_suite shows a test case,
similar to the one that is fixed now for modal dialogs on WebKit-EFL. I
preferred to let the INF() messages in order to be easy to copy, paste
and debug outside of the suite if anyone wants to. When the number of
tests grows more, we might want to separate them in different files.

By: Lucas De Marchi <lucas.demarchi@profusion.mobi>



SVN revision: 49390
2010-06-02 06:20:18 +00:00
Carsten Haitzler e232fcd42b make other defines in ecore the same.
SVN revision: 49300
2010-05-29 13:59:42 +00:00
Carsten Haitzler b28f662869 bah. VMIN conflicts with system header defines ... termin.h
SVN revision: 49299
2010-05-29 13:56:21 +00:00
Carsten Haitzler 427b678d44 proto wrong. fix.
SVN revision: 49298
2010-05-29 13:49:43 +00:00
Carsten Haitzler d639576e8e wanring: shadddaaap
SVN revision: 49297
2010-05-29 13:43:48 +00:00
Carsten Haitzler 78fd14d116 more extern c outside typedefs etc.
SVN revision: 49273
2010-05-29 06:37:02 +00:00
Carsten Haitzler 17263ea263 add ecore versioning
SVN revision: 49271
2010-05-29 06:28:25 +00:00
Lucas De Marchi 98d843e91b Reschedule timer_current in case of inner mainloop
Timers' list is and *ordered list*. Therefore, timers can be added
before timer_current in an inner mainloop. Reschedule timer_current in
this case before looping through timers' list.

Thanks to Barbieri for the insight.

The following test didn't work before and it's ok now (I'm adding it to
ecore_suite too).

static int _timer3(void *data)
{
printf("timer 3, do nothing\n");
return 0;
}

static int _timer2(void *data)
{
printf("timer 2, quit inner\n");
ecore_main_loop_quit();
return 0;
}

static int _timer1(void *data)
{
int *times = data;
(*times)++;
printf("BEGIN: inner\n");

ecore_timer_add(0.3, _timer2, NULL);
ecore_timer_add(0.1, _timer3, NULL);

ecore_main_loop_begin();
printf("END: inner\n");
ecore_main_loop_quit();

return 0;
}

int main(void)
{
int times = 0;

ecore_init();
ecore_timer_add(1.0, _timer1, &times);
printf("BEGIN: main\n");
ecore_main_loop_begin();
assert(times == 1);
printf("timer1 called %d times \n", times);
printf("END: main\n");
return 0;
}

By: Lucas De Marchi <lucas.demarchi@profusion.mobi>



SVN revision: 49245
2010-05-28 02:31:02 +00:00