Commit Graph

180 Commits

Author SHA1 Message Date
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
Amitesh Singh 048b5f70e5 edje: load - use evas_object_clipees_has instead of evas_object_clipees_get
evas_object_clipees_has is far cheaper than evas_object_clipees_get in case of checking if
clipees exist or not. This should improve the performance in case of large set of clipees.

@fix
2015-10-15 15:04:23 +05:30
Jean-Philippe Andre 4de199b7ac Edje: Fix big oopsie in previous commit 2015-10-01 20:27:36 +09:00
Jean-Philippe Andre a449bfc555 Edje: Turn SNAPSHOT objects into filled images for now
Without that, the image has no fill information. Fill properties
may need to be added to SNAPHOT parts but the default behaviour
should make sense. Before this patch you just get a black rectangle.

Considering how image filters currently work, marking snapshots
as filled by default is not the best solution (need padding_set(0)
to render nicely).
2015-10-01 20:13:00 +09:00
Cedric BAIL a7fd98f8f6 edje: add a SNAPSHOT part in EDC. 2015-08-06 11:05:50 +02:00
Jean-Philippe Andre 6ca02cbfe8 Edje: Embed verbatim scripts for Efl.Gfx.Filters
This is now like the other embedded scripts, where a verbatim
string is parsed. The syntax is now:

filters {
   filter {
      name: "filter0";
      file: "filter.lua";
   }
   filter {
      name: "filter1";
      script {
         blend {}
      }
   }
   filter.file: "file.lua"; // name is "file.lua"
}

Thanks @raster for the quick review.
2015-07-01 20:46:34 +09:00
Jean-Philippe Andre 84e3dd5c34 Evas filters: Add name to the filters
Deep down internally there was already a name, but no API could
really set it properly.
Here Edje will set the name of the filter based on the part name
or the data item name if relevant.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 707b979ffd Edje/evas filters: Use EDJ data sections to store filters code
Use the file data {item, file} block to embed filters code.
It can become especially useful to keep the filters as separated
Lua files, that will be embedded in the final edj file.

@feature
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 0e11e0a6dc Edje/evas filters: Quick renaming of evas filters related stuff 2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 111e51a6ff Evas: Add "no-render" flag for proxy sources & clippers
Those objects should never be rendered on the canvas, even if they
are visible. On the other hand, they need to be rendered in mask or
proxy surfaces.

note: this patch includes some extra whitespaces changes :(

@feature
2015-06-15 16:59:41 +09:00
Jean-Philippe Andre 75ec3a7338 Edje: Add clip as a property of a part description
Since masking, for performance and themeing reasons, it becomes
interesting to be able to switch clippers on the fly. In particular,
switching from an IMAGE mask to a standard RECT clipper can save a
lot of power when masking is not required.

This new flag "description.clip_to" will behave a bit like a mix of
rel.to and visible:

- It points to a part by name, just like part.clip_to. This will
  override the clipper set by the part, or override the default clipper.

- Like "visible", it can not be interpolated between two values, so
  it will switch only at the end of a transition.

- By default there is no clip override, which means Edje will fallback
  to the part's clipper, if any, or the base (group's) clipper.

NOTE:
- Since a clipper that does not clip anything becomes a standard object,
  it is visible and rendered. This will in 99.999% cases not be the
  intended behaviour. Currently we can simply use a transparent RECT
  in order to always have something clipped by the clipper, but this is
  a hack and this will trigger rendering of masks in their surfaces even
  when they are not actually used.
  Ideally, there should be a flag indicating to Edje & Evas that an object
  should be considered a clipper in all situations, and never be rendered
  on screen.

TODO:
- Support Edje Edit
- Add Embryo & Lua functions
- Add support in edje_convert
- Add Edje/Evas flag to mark objects as "no_render"

@feature
2015-06-15 16:59:41 +09:00
katpavalli 26b27319b4 edje: add po file support in edc translation.
Summary:
   Implementation to support .po files in edc for translation

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
   edje_cc -md . text.edc && gcc -o edje-text edje-text.c `pkg-config --libs --cflags ecore-evas edje evas ecore eo`
   ./edje-text

   1) Click On the text "Click here"
      The language gets changed.

Reviewers: shilpasingh, cedric

Reviewed By: shilpasingh, cedric

Subscribers: cedric, rajeshps, govi, poornima.srinivasan

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-11 10:40:55 +02: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
Mike Blumenkrantz 86e5a1a27c Revert "edje: set GROUP/SWALLOW/EXTERNAL pass events based on mouse events"
This reverts commit c38f84e64f.

apparently many existing edje groups were written with the assumption that
this was broken, so fixing it is impossible at this point
2015-06-08 13:29:02 -04:00
Mike Blumenkrantz c38f84e64f edje: set GROUP/SWALLOW/EXTERNAL pass events based on mouse events
previously these parts would fail to consume mouse events as expected,
leading to strange event chains which were inconsistent with other types
of parts

@fix
2015-06-08 13:21:58 -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
Mike Blumenkrantz 43779dfa6f edje group part init no longer forces synchronous hint updating during load
hints will be updated later and any user who wants these hints is going to
be calling edje calc functions anyway, causing this to be a redundant calc
2015-03-31 19:16:54 -04:00
Cedric BAIL b72df468f2 edje: add edje_file_iterator_new().
This list the actually opened Edje file by the current process.
2015-03-31 23:23:32 +02:00
Mike Blumenkrantz 1cf630f2bd edje color classes can now have text descriptions
@feature
2015-03-07 13:44:52 -05:00
Andrii Kroitor 4ad20ac8e4 edje: Edje_Edit - fix part alias source generation.
Summary:
generating correct part alias string 'alias: "theme_part_path" "real_part_path";'
@fix

Reviewers: cedric, seoz, Hermet, raster

Subscribers: cedric, reutskiy.v.v

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-06 20:19:22 +01:00
Sohyun Kim 78ddad3daf edje: Add edje to text_class_member_hash properly.
Summary:
When textblock styles have text_classes, all edjes in the files were added
to text_class_member_hash even if the edjes didn't use the textblock styles. It
makes time long to update text_class.
This will add the edje using the textblock style which has a text_class to
text_class_member_hash.

Reviewers: cedric, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2035
2015-02-24 18:26:18 +01:00
Cedric BAIL 6a3971ec3d edje: quick fix to guarantee that ed->path is always correctly set.
NOTE: It will be better to completly remove ed->path in favor of using ed->file->f,
but that would be way to intrusive for this release cycle.
2015-02-04 14:08:07 +01:00
ChunEon Park 382c41e42d edje: support anti_alias option
set anti_alias in part section.
default is enabled.

part { name: "test";
   type: XXX;
   anti_alias: 0;
   ...
}

@feature
2014-12-24 16:29:49 +09: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 acb24adcaf edje - document intented fallthrough 2014-08-22 20:14:59 +09:00
Carsten Haitzler 87aee5ab61 edje -document intentional fallthrough 2014-08-22 20:14:59 +09:00
Carsten Haitzler c8a8ee3f5e edje fix real part get
fixes CID 1039331
2014-08-22 20:14:57 +09:00
Carsten Haitzler 855cc98ee4 fix possible null real part lookup in edje
reap part get is always checked.. except here. check and be safe.

fixes CID 1039331
2014-08-22 20:14:57 +09:00
Tom Hacohen ceada9523f Efl interfaces: Drop interface namespace from the used interfaces.
We don't need this namespace, it just makes the names long and complicated.
2014-08-21 11:02:11 +01:00
Tom Hacohen 3a468f7ad3 Efl interface file: Start using the new interface. 2014-08-21 11:02:11 +01:00
Carsten Haitzler 9d40475b22 edje - edje load - remove structurally dead code
CID 1039543
2014-08-14 20:17:16 +09: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
Tom Hacohen aa450fa8dd Edje eolian: Fix namespaces for all of the edje classes. 2014-06-30 17:47:06 +01:00
Mike Blumenkrantz ceb13556b1 Revert "Revert "recursively hide edje group objects on edje hide""
This reverts commit b8ca758658.
2014-05-26 12:25:07 -04:00
Carsten Haitzler b8ca758658 Revert "recursively hide edje group objects on edje hide"
Unless you like your desktop to look something like:

http://www.enlightenment.org/ss/e-53834e0c0cb3c1.87889787.png

then this commit really needs reverting.

This reverts commit 385326b8e4.
2014-05-26 23:17:33 +09:00
zmike 385326b8e4 recursively hide edje group objects on edje hide
this massively improves edje performance when using groups, which previously would continue calculating their parts even when their parent object was hidden

CPU usage in my test case went from 20-30% to 1%.

@fix
2014-05-26 08:48:00 -04:00
Carsten Haitzler 9fb0640d57 Revert "eo null object complaints - silence."
This reverts commit 1678d272af.

... actually... on second thought... i think eo just needs to sensibly
handle null objects.
2014-04-16 12:27:40 +09:00
Carsten Haitzler 1678d272af eo null object complaints - silence. 2014-04-16 12:18:06 +09:00
Yossi Kantor 2be615916a Eolian: Integration of Edje and Edje Edit 2014-03-24 08:14:30 +02:00
Tae-Hwan Kim 3061a706c4 Add new PLUGIN_RUN action type and new plugins.plugin handlers 1. If external library is commerical source and not opensource, we cannot include/build the library within edje. 2. If external library does not use general encodable sources, we...
Summary:
...cannot encode those things into edje.

In our case, we need vibration when longpressed. But those files are not
audio or image and cannot be encoded into edje. Also, this library is not
opensource so should not be linked directly with edje.
So we should call vibration API by using this plug-in.

Reviewers: raster, cedric, seoz, Hermet

CC: cedric

Differential Revision: https://phab.enlightenment.org/D588
2014-03-20 13:00:21 +09:00
Carsten Haitzler d636c0f801 edje - fix probable leak by ensuring current prog is freed on real part free
this should fix T923
2014-02-11 15:03:01 +09:00
Albin Tonnerre 62efaed9dc comments: typo fix - s/dictionnary/dictionary
Reviewers: cedric

Reviewed By: cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-10 10:40:12 +09:00
Jean-Philippe Andre 08f2624e6a Evas filters: Implement basic Edje support
Does not support proxies yet.
Implemented as "filter" field in a part.description.text (next
to a "font").
2014-02-07 17:33:18 +09:00
Carsten Haitzler 7aff400cc4 edje - formatting - indenting fix 2014-01-10 19:54:01 +09:00
Cedric Bail af83a4511c edje: correct english. 2014-01-05 19:30:34 +09:00
Cedric Bail 89a11c2d77 edje: be more informative when and where a file was not found. 2014-01-05 10:59:43 +09:00
Vyacheslav Reutskiy 641d823cbb edje: edje_calc - update _edje_part_description_find
Add to fuction prototype new param: Eina_Bool approximation.
If need exact matching state name and value set EINA_FALSE to
'approximate'. In other cases used EINA_TRUE.

Reviewers: cedric, raster, seoz

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-23 10:47:32 +09:00
Cedric Bail 7e3286b4ed edje: update use of eina_cow_free to latest change. 2013-11-04 12:47:34 +09:00
Cedric Bail 1c7f602087 edje: use const Eina_File for mmap_set function. 2013-11-04 11:28:29 +09:00
Cedric Bail cf452cc419 edje: make it possible for all upper layer function to query the exact same file.
With Eina_File we now can pass an efficient handler accross library boundary. Edje
and all underlayer already use it to avoid race condition when setting an Edje object.
Elementary and Enlightenment are still exposed to some potential race condition when
an Edje file is modified underneath there feet. With the following set of function it
should now be possible to avoid those race condition to:
edje_mmap_data_get
edje_mmap_collection_list
edje_mmap_collection_list_free
edje_mmap_group_exists
2013-11-01 11:01:18 +09:00
Cedric Bail 64b2b9c2b2 edje: fix a memory leak of Edje_Part_Element for any .edj using them. 2013-10-11 14:47:44 +09:00
Cedric Bail 7506faaca2 edje: add edje_file_mmap_set.
This reduce the number of system call to stat especially when using GROUP
and reduce the risk of a race condition when using GROUP.
2013-08-09 20:50:54 +09:00
Cedric Bail 5710c3acb7 edje: let's not stupiddly create list all over the place when we can avoid it. 2013-08-01 11:22:52 +09:00
Cedric Bail cf9b0180d6 edje: add threshold to draggable part. 2013-07-19 15:40:11 +09:00
ChunEon Park d34f25949d edje - fault casting. 2013-07-18 20:34:24 +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 14a32521c8 edje - removed white spaces 2013-07-18 14:48:04 +09:00
Cedric Bail df7b19090a edje: simplify the logic and make code easier to read. 2013-07-05 10:18:49 +09:00
Cedric Bail 669e40fbce edje: reduce memory footprint of edje callbacks.
Divide by two the amount of memory used by callbacks in elementary_test.
2013-06-17 16:55:22 +09:00
Cedric Bail 56180a7ff4 Revert "Revert 2 commits from cedric:"
This reverts commit 71c0eb6dc6.
2013-05-09 09:37:55 +09:00
Mike Blumenkrantz 71c0eb6dc6 Revert 2 commits from cedric:
"edje: open Eina_File ourself instead of delegating it to edje."
	"edje: don't never corrupt an opened edje object."

This reverts commits 8727e43c1f and 8f12f21cf0, which caused nonstop crashes.
2013-05-08 13:17:21 +01:00
Cedric Bail 8727e43c1f edje: open Eina_File ourself instead of delegating it to edje. 2013-05-08 18:17:00 +09:00
Cedric Bail 483029a717 edje: silence warning by doing explicit conversion. 2013-04-12 11:23:55 +09:00
Cedric Bail 948ea14379 edje: always invalidate and recalc the correct Edje object. 2013-04-08 20:03:43 +09:00
Cedric Bail fb50c9b366 edje: reuse existing index instead of a direct pointer (-30KB).
This one does account for the fact that we always read relative
information even when only computing a part of it.
2013-04-08 12:16:22 +09:00
Cedric Bail 4437235c85 Revert "edje: reuse existing index instead of a direct pointer (-30KB)."
This reverts commit 6a6e6dda68.
2013-04-08 00:14:50 +09:00
Cedric Bail 6a6e6dda68 edje: reuse existing index instead of a direct pointer (-30KB). 2013-04-07 23:50:29 +09:00
Cedric Bail 162df16598 edje: fix little bug with table naming. 2013-04-07 20:18:50 +09:00
Cedric Bail 0cee296fa7 edje: don't use 30K of pointers for an indirection in some event path. 2013-04-07 11:39:20 +09:00
Cedric Bail a645c8153f edje: one less pointer per Edje_Real_Part. 2013-04-07 02:18:48 +09:00
Cedric BAIL 5081098925 edje: fix border limit bug. 2013-03-26 11:59:27 +09:00
Cedric BAIL fc2124436c edje: shutup you moronic GCC 4.7.
This memset is not necessary as pack_it_copy can only be accessed when
the part type is a BOX or a TABLE and thus pack_it will be defined. Sadly
GCC 4.7 is more stupid than GCC 4.6 and think that it is an unitialized data
resulting in a massive number of useless warning that could hide real warning.
2013-03-22 20:15:05 +09:00
Cedric BAIL 2b30804b3f edje: fix buffer overrun. 2013-03-22 20:15:05 +09:00
Cedric BAIL 8222bf4650 edje: add spread.{w,h}.
This is particularly useful when using table and replicating the
same group all over the place. At least for many games I have in mind
this will save a lot of lines !
2013-03-22 18:17:12 +09:00
Cedric Bail d8791d3d17 edje: lower warning level. 2013-03-16 22:59:01 +09:00
Cedric Bail cc9343803e edje: remove that anoying \n. 2013-03-16 22:55:46 +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
Daniel Zaoui c5ac584a57 edje file_set: _edje_object_orientation_inform should be in the Eo
implementation, not just legacy

Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com>
2013-02-19 17:51:43 +02:00
Cedric BAIL d065dd4750 efl/edje: edje program are static for all object of the same edje collection.
This reduce our waste of memory by 300K in most elementary application. There is
another 400K to win by merging edje signal callback automat.


SVN revision: 83879
2013-02-14 03:36:13 +00: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