Commit Graph

51 Commits

Author SHA1 Message Date
Carsten Haitzler 42c123d1d7 singularize srand in eina_init - only once in one place
simplify down to having a single srand() in eina_init and use urandom
if it works and is there - if not, time(NULL) will do. it's the best
we can...
2020-10-03 20:46:50 +01:00
Cedric BAIL e0ee318fe1 eo: use efl_provider_{un,}register infrastructure instead of Efl_Loop one.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9296
2019-07-17 21:57:57 +02:00
Subodh Kumar 2854702f8e edje: Add support for map zoom to use other part center.
Summary:
Current:
In edc, zoom is supposed to happen from object center, there is no way to
change the center of the zoom.

Changes:
Adding support to change the center of zooming just like map rotation by using
other part's center.

@feature

Reviewers: cedric, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9115
2019-07-12 12:04:06 -04:00
Mike Blumenkrantz 1b568327c4 efl_gfx_color_class: make this a mixin and move color_class_code here
Summary:
color_class_code seems to only have been added to efl_gfx_color in order to
share the hex conversion code, but this is trivial to do when it's in another
class and makes the api more sensible

ref T7559

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7559

Differential Revision: https://phab.enlightenment.org/D7898
2019-02-11 12:34:12 +01:00
Mike Blumenkrantz 59b8a63d65 edje: unset internal _need_imf flag on shutdown
Summary:
failing to unset this causes the ecore_imf flag to go negative if edje
is ever completely shut down twice

@fix

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: ManMower, #reviewers, cedric, #committers

Tags: #efl_layout_engine, #easy

Differential Revision: https://phab.enlightenment.org/D6763
2018-08-14 10:45:13 -04:00
Mike Blumenkrantz 67f50eb5d6 edje: handle all failure cases with error messages in init
Summary:
fix T7025
Depends on D6677

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7025

Differential Revision: https://phab.enlightenment.org/D6678
2018-07-26 21:30:03 +09:00
Cedric BAIL ae5d0005d3 edje: properly handle lifecycle of edje global object.x
Differential Revision: https://phab.enlightenment.org/D6087
2018-05-24 16:02:18 -07:00
Cedric BAIL ccb5642eb9 Revert "efl_add_ref - fis to use efl_add properly with a parent."
This reverts commit 2fb5cc3ad0.

Most of this change where wrong as they didn't affect the destruction
of the object. efl_add_ref allow for manual handling of the lifecycle
of the object and make sure it is still alive during destructor. efl_add
will not allow you to access an object after invalidate also efl.parent.get
will always return NULL once the object is invalidated.

Differential Revision: https://phab.enlightenment.org/D6062
2018-05-24 16:02:17 -07:00
Carsten Haitzler 2fb5cc3ad0 efl_add_ref - fis to use efl_add properly with a parent.
fixes bc18b7e7ad and
168849e8a0
2018-03-29 13:30:55 +09:00
Cedric BAIL 4c4177ac20 efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:56 -07:00
Cedric Bail 2d973475ee edje: global class should actually be bound to the main loop. 2018-03-19 15:33:44 -07:00
Carsten Haitzler 1c74aaa7e9 Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303b.

Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.

Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.

Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.

Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?

1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)

etc.
2018-03-03 13:40:33 +09:00
Mike Blumenkrantz 28fe00b94e efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Carsten Haitzler 9bedda14b3 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Jean-Philippe Andre cc1ed7183c edje: Hide edje_global from the rest of the world
Call provider_find on the loop (or basically any object) with the
color/text/size class interface instead, to find it. The main loop is
the main holder of those objects.

Note: This makes use of provider_find instead of direct access to the
variable, in order to self-test the code. In theory release builds will
not do this and user directly the variable.
2017-11-08 20:02:31 +09:00
Jee-Yong Um 2f838acd4e Efl: add class interfaces (color/text/size)
Summary: implement Efl.Gfx.Class interface

Reviewers: jpeg, cedric

Subscribers: taxi2se, herdsman

Differential Revision: https://phab.enlightenment.org/D4403
2017-11-08 19:17:59 +09:00
Jean-Philippe Andre 46001cde38 edje: Remove use of smart clipped data
This removes dependency on a legacy structure.
Edje object does not change the smart data, unlike evas box and grid.
2017-09-13 09:57:05 +09:00
Cedric BAIL 8195e825a6 edje: reorder shutdown to match internal event emit use.
We do have event emited that rely on evas still being initialized.
If we shutdown evas and then process ecore event, we would be in trouble.
2017-02-27 15:05:35 -08:00
Jean-Philippe Andre a9497131f7 edje: Fix object leak with Efl.Part
A call to efl_reuse was missing.
2017-02-15 20:57:31 +09:00
Jee-Yong Um 0fd1445508 edje.object: implement Efl.Observer interface
Summary:
To remove duplicated lines to handle edje class (color, text, size),
observer interface is implemented to Edje.Object.

Reviewers: jpeg, cedric

Reviewed By: cedric

Subscribers: bu5hm4n, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-01 11:48:44 -07:00
Carsten Haitzler 879d93377b efl runtime dynamic lib loading - make errors consistent and useful
so drop trying to appease the openbsd packages and stick to "upstream
so major versions" and let users fix their systems with symlinks. also
report what we are looking for so they have a chance to symlink to
make efl happy.

at some point we should make a single simple runtime lib linker
subsystem in efl so all these errors are reported in the same way,
input libray names are listed in a simple consistent way etc. etc.

for now we have 3 locations in efl that do this and they are roughly
similar. we can unify it later.
2016-08-02 11:23:34 +09:00
Carsten Haitzler 1d0b500fa8 edje - reduce memory footrpint by dlopening ephysics on demand
this saves about another 80Kb or so in dirty pages by only loading
ephysics when needed. This removed ephysics and bullet library dirty
pages from the process space. this is another patch to address T4227.

@fix
2016-08-01 19:11:39 +09:00
Jean-Philippe Andre ba43e12722 Edje: cache proxy objects (1 slot only)
Also, fix calls to a proxy obj from a proxy function.
2016-05-24 18:50:58 +09:00
Carsten Haitzler c2e26a5121 edje - delete obj - null out freed items in structs/data
i just got a segv freeing ian invalid ptr... it SEEMS as if something
has tried to free and edje object twice... but i can't be sure as
valgrind can't catch this. it's a one-off, so ensure after free, we
NULL out things we freed to avoid this.

@fix
2016-04-13 20:02:12 +09:00
Cedric BAIL a13752dcc7 edje: switch to use per window animator. 2016-02-02 10:47:25 -08:00
Jee-Yong Um 71f578dc0b edje: add text_classes syntax to EDC
Summary:
text_class can be defined in text_classes block.

T2900

@feature

Reviewers: jpeg, raster

Subscribers: raster, cedric, Jaehyun_Cho, CHAN, kimcinoo

Differential Revision: https://phab.enlightenment.org/D3435
2015-12-24 15:58:34 +09:00
Jee-Yong Um 3e31eda3bd edje: introduce size_class attribute
Edje_Part can change its min or max size in code level with
size_class.

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

PS: Manual commit, arc refused to work...

@feature

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-12-08 12:25:15 +09:00
Daniel Kolesa d9db8888ac Revert "edje: unset efreet cache update flag to prevent dbus connections"
This reverts commit 1edb35fff3.

Accessing symbols from other libs like this should never be done. The
consequences of this are not significant enough to do this; better solution
can be found but definitely not like this.
2015-06-23 10:22:36 +01:00
Mike Blumenkrantz 1edb35fff3 edje: unset efreet cache update flag to prevent dbus connections
efreet_init began to be called with the addition of translatable strings,
but allowing dbus connections in edje (and thus edje-derived tools) will
result in errors when edje_init is called without a dbus connection available
2015-06-22 14:53:13 -04: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
katpavalli dca95fb45a edje: support translation on static strings in edc.
Summary:
   Internationalisation of the static text specified as part of the edc is implemented.
   Problem: Static text when specified in the edc, remains unchanged when the system language is changed.
   Solution: Language support is provided even for the static strings in the edc.

Test Plan:
   Test code to test this implementation is done as part of efl/src/examples/edje/edje-text.c and efl/src/examples/edje/text.edc
   Compile the code with the below  command
   edje_cc -md <dir path>/efl/src/examples/edje/ text.edc && gcc -o edje-text edje-text.c `pkg-config --libs --cflags ecore-evas edje evas ecore`
   ./edje-text

   1) change the language of the system using the command
      export LANGUAGE=hi
      ./edje.text

      Not the text Loading gets displayed in hindi language

   2) change the language of the system using the command
      export LANGUAGE=ta
      ./edje.text

      Not the text Loading gets displayed in tamil language

   3) change the language of the system using the command
      export LANGUAGE=en
      ./edje.text

      Not the text Loading gets displayed in english language
As the number of .mo files in the /edje folder can be increased, those many languages can be supported

Reviewers: cedric, shilpasingh

Reviewed By: shilpasingh

Subscribers: cedric, rajeshps, govi, poornima.srinivasan

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-14 18:41:47 +02:00
Tom Hacohen dac7e8844f Edje init: fix typo in error message.
Evas is the one being initiated, not eet.
2015-03-05 09:26:01 +00:00
Carsten Haitzler aa0324af36 edje - somehow edje doesn't init evas and this makes edje_decc break...
@fix

how on earth has everything worked to date? someone must have remved
some evas_init from somewhere int he init codepath. this adds it back
in and edje_decc works again without a segv.
2015-03-05 10:33:58 +09:00
jiin.moon 4673dbeb4b edje: Adding the zoom effect of map to edje
Summary:
Support zoom effect of map in edje
@feature

Reviewers: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2068
2015-03-02 20:19:01 +09:00
Shinwoo Kim d41b77ec21 [edje] refine odd lines to delete _edje_timer
Summary: Refine odd lines to delete _edje_timer

Test Plan: Run example using edc programs to change state

Reviewers: raster, cedric, woohyun, jaehwan, Hermet

Reviewed By: Hermet

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D1838
2015-01-05 13:42:52 +09:00
Cedric BAIL 1b54047ac4 edje: reduce overhead of setting text and color class in theme.
This reduce by 10% some elementary tests case that was provided
by some crazy french.
2014-07-06 22:50:32 +02:00
Carsten Haitzler 8edc879cc2 remove edje file changed monitoring as it's nothing but a bug vector
so this has to go. reloading edje files is nothing but trouble.
example - if you update your os your theme files get updated and then
all sorts of stuff goes wrong. jeff is right. this makes it an
intractible problem. we have an open file handle on the edj file. we
share that anre reuse it via eina_file - keep it. this keeps tyhe edje
file stable and consistant.

<Jef91> Elementary applications freak the fuck out
<Jef91> if you change the theme file
<Jef91> that they are using
<Jef91> SeoZ,
http://forums.bodhilinux.com/index.php?/topic/10629-eepdater-display-issue/
<Jef91> that happens when my theme file that is in use changes

we will get nothing but continued issues and complains if we keep
doing this. it's a fairly pointless mis-feature. thank god its got no
apis - just signals and internals.
2014-07-02 11:28:42 +09:00
ChunEon Park 8cec34d1d4 edje/map - changed data structure from list to array to improve color data memory access 2013-07-18 20:09:54 +09:00
ChunEon Park dfd491a751 edje/main - incorrect size set 2013-06-05 13:43:27 +09:00
Cedric Bail 10afabb68c edje: increase item number in the mempool to reduce its over head. 2013-04-07 17:04:21 +09:00
Cedric BAIL 7ebe7373e6 eina: make it possible to disable Eina_Cow GC at instantiation time. 2013-04-02 17:11:05 +09:00
Cedric BAIL 2063e4353d efl: integrate eina_log_timing. 2013-03-27 21:43:45 +09:00
Cedric BAIL 488ea9ec82 edje: reduce memory usage of Edje signal callbacks and automates.
This patch try to share signal callbacks and automate accross all Edje
object. It does use an Eina_Hash on the callback description (signal,
source, func). There is no need to check it against Edje file or group
only the callbacks matter.

This version remove all use of size_t as it should never be above 32bits.
We have a hard limit on the number of callback to 2^32 now. I am considering
it would be sane to make it a short.
2013-03-13 16:46:42 +09:00
Cedric BAIL c78f4d7bfa edje: use Eina_Cow for physics and map Edje_Real_Part_State.
This reduce memory used per Edje_Part description by 2 on my tests.
2013-03-13 14:35:31 +09:00
Carsten Haitzler b7221512d5 This causes segv's on 64bit!
Program received signal SIGSEGV, Segmentation fault.
_edje_emit_cb (ed=ed@entry=0x8ebd68, sig=sig@entry=0x8fba4c
"focus,part,in", src=src@entry=0x8222fc "elm.text",
data=data@entry=0x0, prop=prop@entry=0 '\000') at
lib/edje/edje_program.c:1442
warning: Source file is more recent than executable.
1442                                eina_list_free(data.matches);
(gdb) bt
"focus,part,in", src=src@entry=0x8222fc "elm.text",
data=data@entry=0x0, prop=prop@entry=0 '\000') at
lib/edje/edje_program.c:1442
"focus,part,in", src=0x8222fc "elm.text", sdata=0x0, prop=0 '\000') at
lib/edje/edje_program.c:1366
_pd=0x8222f0, list=0x7fff00000001) at lib/edje/edje_message_queue.c:124
op_type=EO_OP_TYPE_REGULAR, op=564, p_list=0x7fffffffcf28) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ebae0) at lib/eo/eo.c:404
op_type=op_type@entry=EO_OP_TYPE_REGULAR) at lib/eo/eo.c:435
(obj=<optimized out>) at lib/edje/edje_message_queue.c:71
(sid=sid@entry=0x8eae88) at elm_interface_scrollable.c:788
(sid=0x8eae88) at elm_interface_scrollable.c:805
_pd=0x8eae88, list=<optimized out>) at elm_interface_scrollable.c:3370
op_type=EO_OP_TYPE_REGULAR, op=840, p_list=0x7fffffffd158) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
op_type=op_type@entry=EO_OP_TYPE_REGULAR) at lib/eo/eo.c:435
_pd=0x8ead70, list=<optimized out>) at elm_entry.c:2804
op_type=EO_OP_TYPE_REGULAR, op=129, p_list=0x7fffffffd328) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
lib/eo/eo.c:435
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd4a8) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
class_data=<optimized out>, list=<optimized out>) at elm_widget.c:5526
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd628) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
out>, list=<optimized out>) at elm_layout.c:2157
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd7b8) at
lib/eo/eo.c:364
op_type=<optimized out>, op=1) at lib/eo/eo.c:463
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd928) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
out>, list=<optimized out>) at elm_entry.c:3076
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffdad8) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
lib/eo/eo.c:1162
elm_entry.c:3068
autorun=0x0) at test.c:441

Revert "edje: reduce memory usage of Edje signal callbacks and automates."

This reverts commit 15aae2c0a4.
2013-03-12 23:48:42 +09:00
Cedric BAIL 15aae2c0a4 edje: reduce memory usage of Edje signal callbacks and automates.
This patch try to share signal callbacks and automate accross all Edje
object. It does use an Eina_Hash on the callback description (signal,
source, func). There is no need to check it against Edje file or group
only the callbacks matter.
2013-03-12 15:58:42 +09:00
Gustavo Sverzut Barbieri c72d6b68cd maybe this time svnlook will work?
SVN revision: 82496
2013-01-09 23:27:31 +00:00
Gustavo Sverzut Barbieri c5c3af138e still not there with svnlook diff :-/
hell, how to make this bastard show C function names in diff!?


SVN revision: 82495
2013-01-09 23:25:01 +00:00
Gustavo Sverzut Barbieri cd7cf2cec9 bogus commit to see if post-commit hook worked.
svnlook diff is a bitch, come on :-/


SVN revision: 82494
2013-01-09 23:21:39 +00:00
Gustavo Sverzut Barbieri 9b5958ce91 efl/edje: ecore_imf_init() only once.
use technique similar to elementary and delay init() of module, but
once you do, do it only once and avoid shutdown() until
edje_shutdown().

This is good if we keep creating and deleting edje objects with entry,
the count could go to 0 and ecore_imf_shutdown() would unload
everything, just to load it soon.



SVN revision: 82281
2013-01-05 16:17:53 +00:00