Commit Graph

27 Commits

Author SHA1 Message Date
João Paulo Taylor Ienczak Zanette 9031750e62 efl: Make lua support optional 2021-01-31 11:40:45 -03:00
Felipe Magno de Almeida b8dccb3154 edje: Rename EAPI macro to EDJE_API in Edje library
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

EAPI was designed to be able to pass
```__attribute__ ((visibility ("default")))``` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
```__atttribute__((visibility("default")))```.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
EAPI is the only solution that worked for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
2020-12-14 13:22:33 -03:00
Hosang Kim 91ab84286a edje_message_queue: decrease number of messages when message is removed.
Summary:
Sometimes edje_message_del is called while processing edje message.
It makes double free corruption.

Reviewers: raster, bu5hm4n, zmike

Reviewed By: zmike

Subscribers: bu5hm4n, zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11393
2020-03-17 09:52:59 -04:00
Carsten Haitzler f850cf6a00 edje - double make sure edje messages are zero'd due to a segv i saw
i saw a segv on freeing em->msg as it was a junk ptr... i dont know
for sure it msg was properly initted but as em is recycled from trash
be sure and zero it when digging out of trash because em->msg was not
a valid ptr (and i wasnt using valgrind at the time to know for sure
and cant find this with valgrind now).

@fix
2019-07-09 16:04:22 +01:00
Carsten Haitzler 1c02b7740d fix segv when adding optimizations to edje message handling
613e1715be (and friends) added a bit a
biug where messages in the queue were not skipped as they were before
causing a segv witha null lookup. this fixes that. eclipse about
dialog showed this bug up. no longer happens now.
2019-06-21 09:29:52 +01:00
Carsten Haitzler 7c081c691b edje messages - use trash to keep message structs around for a short time
more optimizations for edje messages to avoid excess alloc and frees
if we have some trash around... since messages already have list
nodes, re-use the main list node for storing trash and not eina trash
as this avoids extra allocs for trash nodes.
2019-06-15 08:43:51 +01:00
Carsten Haitzler c2d1aaaed6 edje messages - on del use the per edje message list not global
this massively cuts the walk to remove messages to only what's needed
on teardown ... so yay! speedup.
2019-06-15 08:43:51 +01:00
Carsten Haitzler 613e1715be edje messages - avoid nasty On2 walk of message lists with skipping
so to process a single obj we added a lot of mesgs to the message
queueue only then to wak most and SKIP most msgs again and again -
when this adds up to 1000's of messages and 10k+ then literally moving
a window in e hangs for multiple seconds and we walk such lists in On2
like complexity. this gets it down to O(1) along with some other minor
optimizations of not adding to tmp list only then to add them to the
nex queue/list.

there is more i can optimize here as well now we track messages for an
edje in th edje. that's next.
2019-06-15 08:43:44 +01:00
Carsten Haitzler bda708d38f edje messages - track all messages for an edge obj in the edje
this is the basis for some future speedups to avoid full message queue
walks - get this right first.
2019-06-15 08:43:33 +01:00
Carsten Haitzler e667dd8b2c edje messages - make it use inlist to fragment ram less
using regular lists means we double our indirect ptr jumps and
fragment ram more - this is step one in improving performance of
message handling in some nasty corner cases i have found. first this
so it can be identified as an issue on its own if it is one. i've
tested it and it seems ok. so this si stage 1.
2019-06-15 08:43:18 +01:00
Hermet Park 2663dceaf1 Revert "edje: code refactoring for readibility."
This reverts commit 7fb47fc064.

subsequential revert for previous one.

90a89d1ab2b5d23b29ad0f2680b77b5ba7f56b42.
2018-06-21 19:33:41 +09:00
Hermet Park 7fb47fc064 edje: code refactoring for readibility.
collection.part is too ambigious, since group has parts as well.
Normally we regard it as "name" (of group) instead of part.
2018-06-07 17:53:12 +09:00
Derek Foreman d21ff733df edje: Factor out signal extra data setup code
Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6111
2018-05-08 12:25:51 -05:00
Amitesh Singh 54ae9cc18b edje: rename Edje.Object to Efl.Canvas.Layout 2017-12-06 13:12:29 +09:00
Amitesh Singh 7b3fde4d4b edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal 2017-12-05 16:18:32 +09:00
Jean-Philippe Andre efac7d523a edje: Move signal APIs to an interface
This interface will be used by elm_layout as well.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre e9c7159210 edje: Add recursive flag for message_signal_process
Original patch by Jinwoo Shin:

If edje has multiple levels of child group,
edje_object_message_signal_process cannot process message on
child group. To cover that, it needs to add new API which
traverses its hierarchy and process messages.

@feature

Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>

Differential Revision: https://phab.enlightenment.org/D4914
2017-05-29 15:45:31 +09:00
Jean-Philippe Andre 9d48350ae4 edje: Implement EO API for message_send
Since this uses generic_value (aka Eina_Value), there is an
implicit type detection and conversion. I did not attempt to
cover all types (namely string+int and string+float and even
less sets of those) as I believe they aren't really used. Or
they most likely could be replaced by multiple messages rather
than a single message.

Note: should we pass ptr(generic_value) instead of generic_value?
The API looks a little odd in C when passing by value.

@feature
2017-05-24 13:02:20 +09:00
Jean-Philippe Andre e7abfba034 edje: Fix typos and overall strange function name
popornot was supposed to be propornot which stands for prop or not.
prop itself means propagate. Why choose a name so complicated? :)
2017-05-24 11:04:58 +09:00
Jean-Philippe Andre df4e8653c7 edje: Remove message_handler_set from EO
It is used to receive messages with a payload from embryo to C.
This API has a function pointer, which means it would have to be
manually bound, or transformed (eg. eo event).

Also, prepare the change for message_send to use Eina_Value and
no explicit type.

This feature seems rarely used.

But note that handler_set is in fact used in terminology, rage and
luncher. So, if the need arises, it will have to be transformed in
a proper EO way.
2017-05-24 11:04:58 +09:00
Mike Blumenkrantz 172a0ccf0c edje: reformat all C files
this has been unreadable for years due to the french tabber.
2015-06-08 14:43:00 -04:00
Carsten Haitzler ee0eb1336b edje - remove old script_only code that used embryo (not lua)
thjis was deprecated even before efl 1.0 by never removed. lua
replaced it for script_only objects and you havent been able to
compile an edje file with script_only enabled since 1.0, so no point
having the code here.

this cleans up that code and cruft.
2014-11-25 15:09:00 +09:00
Carsten Haitzler eeb66d4d32 update po files 2014-07-01 19:40:26 +09:00
Carsten Haitzler d43c8eb4dd edje - fix self feed complaint to be an ERR so we see it 2014-07-01 19:40:26 +09:00
Tom Hacohen aa450fa8dd Edje eolian: Fix namespaces for all of the edje classes. 2014-06-30 17:47:06 +01:00
Yossi Kantor 2be615916a Eolian: Integration of Edje and Edje Edit 2014-03-24 08:14:30 +02:00
Gustavo Sverzut Barbieri 9ea2ce1041 efl: merge edje.
this is still in progress, mostly the multisense stuff is pending.

it seems that when we merge ecore_audio in edje the libremix and
similar are gone, at least from Edje, and will be in ecore_audio
itself (or pulseaudio).

Changes:
 * __UNUSED__ to EINA_UNUSED
 * binaries (epp, embryo_cc, edje_cc) now consider EFL_RUN_IN_TREE and
   will assume the binaries are still not installed, running from
   build tree location (needs more testing, maybe doesn't work with
   srcdir != builddir, still doesn't solve cross compile builds)



SVN revision: 82139
2013-01-04 02:08:14 +00:00