Commit Graph

77 Commits

Author SHA1 Message Date
Cedric BAIL fcfa0f56a7 edje_cc: fix detecting missing part for insert_before/after
Summary:
Detecting missing part for insert_before/after is broken.
This patch makes the feature work and clarifies error message,
and removes redundant internal function.

Reviewers: cedric, jpeg

Subscribers: raster, jpeg

Maniphest Tasks: T2513

Differential Revision: https://phab.enlightenment.org/D3576
2016-02-05 08:03:18 +01:00
Jee-Yong Um 800f5d8156 edje: introduce color_tree (color_class inheritance)
Summary:
The "color_tree" block contains a list of one or more "node" blocks.
A "node" block consists of its own color class name and the list of child
color classes. At runtime, parent color class will be referred instead,
if child color class is set to part but its color values are not defined.

Reviewers: raster, Jaehyun_Cho, jpeg, cedric

Reviewed By: cedric

Subscribers: cedric, kimcinoo

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-05 07:55:49 +01:00
Carsten Haitzler 8b11d04ded Revert "edje_cc: fix detecting missing part for insert_before/after"
This reverts commit 2ca99b8b68.

This breaks elm compile:

  EDJ      default.edj
edje_cc: Critical. In group "genlist_arrow": Unable to find part "sel_bevel" for insert_after in part "arrow_img_l".
2016-01-20 21:23:22 +09:00
Jee-Yong Um 2ca99b8b68 edje_cc: fix detecting missing part for insert_before/after
Summary:
Detecting missing part for insert_before/after is broken.
This patch makes the feature work and clarifies error message,
and removes redundant internal function.

Reviewers: cedric, jpeg

Subscribers: jpeg

Maniphest Tasks: T2513

Differential Revision: https://phab.enlightenment.org/D3576
2016-01-20 11:45:34 +09:00
Jee-Yong Um e12456f3e7 edje_cc: abort when insert_before/after part doesn't exist
Summary:
edje_cc does not check whether insert_before/after part exists.
edje_cc will notify a compilation error to developer when insert_before
or insert_after part does not exist.

T2513

Reviewers: Hermet, NikaWhite

Subscribers: cedric, jpeg

Maniphest Tasks: T2513

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:42:59 -08:00
perepelits.m 728eff8836 edje: implementation of Edje_3d
Summary:
I have a strange feeling that I always commit the same code to edje-3d, I hope it will finish very soon.
However here are some important new keywords, descriptors for them, methods for models,
structure for providing animation in edje programs and some more changes.

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, artem.popov

Projects: #efl

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 14:03:15 -08:00
Jean-Philippe Andre a5d0284820 Edje: Directly embed TGV files inside EDJ when possible
This checks that the ETC format is the same, and then proceeds
to simply stuff in the TGV file inside the EDJ as an "edje/image/n"

This will save a huge amount of time since now you just need
to encode an image once to TGV (ETC1 or ETC2) and you can reuse it
directly without re-encoding.

To use this, convert images with ecore_evas_convert and then
add them to EDC with the ".tgv" extension and the proper LOSSY format.
The quality argument will then be ignored.

@feature
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre 8e00403047 edje_cc: Allow PROXY as clipper (clip_to and desc.clip_to)
This arbitrary limitation can now be lifted since masking
is well supported (ie. clip_to can point to an IMAGE rather than
a RECT).

@feature
2015-10-01 22:08:46 +09:00
Jean-Philippe Andre ad268c1d94 edje_cc: Check default state as well
Strangely only the other states were checked for errors. Errors
include:
- no name for state, or "description with missing state"
- invalid clip_to

Also improve the error message a bit
2015-10-01 21:45:32 +09:00
Jean-Philippe Andre 7c8ca6b752 edje_cc: Fix TEXT part validation for aliased parts
Not 100% sure of this fix but it "works". This is just compile-time
safety checking code after all, so it won't impact any existing
application.

This fixes commit d4444bf7a0. Tested with empc.

Thanks @zmike for the report and test case.
2015-10-01 18:07:04 +09:00
Carsten Haitzler 76c854433f efl - edje_cc - fix double close of embryo script fd's to tmp files
@fix

thanks to 김낙경 <nakkyong.kim@samsung.com> for pointing this out.
indeed fclose() closes the fd adopted by fdopen(). it doesn't dup it.
so we double-closed. it seems this never caused an issue until now.
this should fix it.
2015-09-21 16:50:17 +09:00
Mykyta Biliavskyi d4444bf7a0 Edje_cc: check value for text.source attribute.
Summary:
Add additional check for description.text.source
and description.text.text_source attributes in TEXT part.
For cases when as source uses non TEXT/TEXTBLOCK part
serialization process should be stopped. This will cause
segmentation fault on runtime. (see edje_text.c line 251)

Reviewers: Hermet, raster, cedric, jpeg

Subscribers: cedric

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-09-08 18:41:19 +09:00
Stefan Schmidt 55c48ca7c5 edje_cc: remove executable bit from source file 2015-09-04 14:54:07 +02:00
Jaehyun Cho b9c24fa951 edje_cc_out: Fix edje_cc compile error with script on Windows.
On Windows, PATH_MAX is 260 and PATH_MAX is used as string buffer
size in edje_cc compile. This causes edje_cc compile error when the edc
file contains "script" keyword and the length of file paths is
relatively long.
To resolve this problem, change the string buffer size in edje_cc
compile.

@fix
2015-08-26 13:43:38 +09:00
jiin.moon 29bcec0669 edje_cc: fix dereference before null check
Summary:
Fix Coverity issue which reports a dereference before null check.
The enc_info can not has NULL point
because _edje_multisense_encode api calls exit() in case of failure

Reviewers: Hermet, Jaehyun, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-07-28 03:05:37 +02:00
Chris Michael 30363956f1 edje_cc: Fix dereference before null check
Summary: Fix Coverity CID1302700 which reports a dereference before
null check. Basically, it is safe to call free() with a possible NULL
value so we can remove the 'if' check here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-25 14:59:28 -04: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
jiin.moon 6986e3126d edje: fix memory leak detected by prevent static analyser.
Summary:
Modified codes according to prevent result
The im will be freed by data_image_preload_done api.
But if image load error happen, never call that api

@fix

Test Plan: prevent tool

Reviewers: Jaehyun, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-27 00:31:07 +02: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
Yomi 186cb58238 edje: fix misspelling of annotate.
Summary: Anotate to Annotate

Test Plan: test it to make sure I didn't break it...

Reviewers: raster, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-16 19:21:45 +02:00
Carsten Haitzler bea8877029 edje_cc - handle image sets that are empty by skipping them
this fixes an edje_cc crash on compile for "invalid" edc that has
empty image sets.
2015-04-09 13:33:41 +09:00
Cedric BAIL ae157734ff Added non-edc resource dependencies on .edc while dumping dependencies
Summary: Added code to include non-edc resource (image, sound, video etc) path in dep file while dumping include dependencies for edc files.

Reviewers: raster, cedric, Sergeant_Whitespace

Reviewed By: cedric, Sergeant_Whitespace

Subscribers: Sergeant_Whitespace

Projects: #efl

Maniphest Tasks: T2252

Differential Revision: https://phab.enlightenment.org/D2270
2015-04-06 16:37:53 +02:00
Stefan Schmidt 8cbe288227 edje_cc: Avoid segfault when strcmp NULL items
Martin reported a porblem with one of the SHR project edc files after an upgrade
to 1.13. The segfault itself is easy enough to fix here but I think there might
be other problems with the edc after this segfault is gone. We will see.

Fixes T2106
2015-02-12 15:30:11 +01:00
perepelits.m 2e3b9ea589 edje: add of model lookups.
Summary:
I have added some methods to edje_cc_out.c to organize model lookups. The same methods already exists for images.
Also, I have removed source_type because now we don't need it in efl_file_set.

@feature

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-09 22:03:26 +01:00
Vitalii Vorobiov ac0b42a51a Edje: edje_cc - abort recursive Reference that is made by GROUP parts
Summary:
It is easy to create edj collections that aren't working at all and
edje_cc easily allows user to do that.
For example:
>   Having group A with GROUP part that has group B as source.
>   Having group B with GROUP part that has group A as source.
In this case edje_cc compile source code perfectly, but if user try to load
this edje as layout or use together with edje_edit it will cause unexpacted
and wrong behaviour.

@fix

Reviewers: seoz, Hermet, reutskiy.v.v, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-29 21:21:08 +01:00
Vyacheslav Reutskiy 6f7608befd Set the name for table, box items
If box or table items haven't name in the edc we generate a new
name by mask "item_0xFFFFFFFFFFFFFFFF". Item name important for
Edje_Edit.

@fix
2015-01-28 17:10:40 +00:00
Jaeun Choi 145fe108b8 Evas masking: Add edje support
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-01-07 15:06:02 +09:00
Srivardhan Hebbar 9792943910 edje: use realloc instead of malloc and memcpy.
Summary:
Replaced malloc with realloc. Removed free. Added a Error message.

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: devilhorns, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-12 04:22:54 +01:00
Vyacheslav Reutskiy 1654a12773 edje_cc: fix log message for authors write procedure.
@fix
2014-11-13 17:03:03 +00:00
Jaehwan Kim e4a1696a72 Edje: Set the min, max sizes of the image automatically.
Set the min, max sizes of the image automatically,
if it uses image set and there's no setting about min, max sizes.
This idea is originated by Jinsol Park.

@feature
2014-11-10 21:01:19 +09:00
Stefan Schmidt cad8353d62 edje_cc_out: Do not shadow another local variable. 2014-10-29 16:07:39 +01:00
Jaehwan Kim dfdc31cae7 edje_cc_out: update the id of set images.
Before it removes unused images, it updates ids.
For the set images, it should be done.

@fix
2014-10-29 21:06:36 +09:00
Cedric BAIL 7c92d4fa7b edje: correctly destroy reference to removed part.
NOTE: I do believe their is still the possibility that a wrong program
or part may reference a dead part. Would require to check that scenario
better later.
2014-10-20 10:47:41 +02:00
Cedric BAIL 9d69033411 edje: actually reuse the right Part_Lookup and not a destroyed one. 2014-10-20 01:28:12 +02:00
Stefan Schmidt 693e9095eb edje_cc: Use eina_file_mkstemp() to avoid problems with umask
In this case it also clears up the setup of temp dir.

CID 1039619
2014-09-10 16:43:02 +02:00
Stefan Schmidt 6d67f69061 edje_cc: Print out the right file name on the error message.
We failed to create sc->tmpo not tmpn here. Looks like a classical C&P error
2014-09-10 16:43:02 +02:00
Mike Blumenkrantz 84b985b45c edje_cc only prints kitten-harming message with nosave 2014-08-21 15:03:28 -04:00
Mike Blumenkrantz 82c0f67f02 de-frenchify edje_cc --no-save option 2014-08-21 15:02:46 -04:00
Cedric BAIL 9e8ece571b edje: edje_cc - warn people when they do bad things. 2014-08-21 12:04:53 +02:00
Irfan Abdul 3709a908d7 edje: Edje_cc - fix not storing edc sources in .edj file with --no-save option
Reviewers: govi, raster, jpeg, zmike, cedric

Subscribers: cedric

@fix

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-08-21 12:04:53 +02:00
Jean-Philippe Andre 8ce52c2380 Edje: Add support for ETC1+Alpha
If the image is not opaque and etc1 is selected, choose
ETC1_ALPHA as encoding format.
2014-07-11 16:40:34 +09:00
Jean-Philippe Andre e8d7c46253 Edje: Add support for ETC2 through LOSSY_ETC2 images
Declare your images as LOSSY_ETC2 to encode them as ETC2.
Add options to edje_cc to disable etc2.
Use ETC2 support from Eet.

@feature
2014-06-13 17:58:08 +09:00
Mike Blumenkrantz b35dfc5f05 edje_cc now (more) correctly handles text filter inheriting/resetting 2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 5f376fde36 edje now correctly supports text.source and text.text_source for swallowed parts
fix T1186
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz d498f6f723 edje_cc no longer has "slave" lookups
these appear to have been replaced many centuries ago with copied_X lookups
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 6b712f6f02 edje_cc now supports the group.inherit_only attribute
use this for flagging a group as a "virtual" group which is only used for inheriting

@feature
2014-04-25 10:52:14 -04:00
Jean-Philippe Andre f6eae69eb2 Edje: Use LOSSY_ETC1 instead of LOSSY
Add a new flag in EDC files to specify ETC1 compression
should be enabled. It follows the same rules as the
current LOSSY flag for JPEG compression.

@feature
2014-04-18 16:50:01 +09:00
Jean-Philippe Andre 7ff410b9f6 Edje: Fix ETC1 encoding with EET and Edje
There were a few critical issues:
- Invalid pointer arithmetics on the input data (char vs. int)
- Invalid logic in the pixel duplication code

All of these due to bad copy and paste :(

Also, use LZ4HC instead of LZ4 when compression is enabled.
ETC1 encoding is so damn slow you won't see the difference between
LZ4 and LZ4HC compression times.
2014-04-18 15:43:07 +09:00