Commit Graph

93 Commits

Author SHA1 Message Date
Subhransu Mohanty de7809a868 edje/svg: add few error message reagrding parsing and storing of svg file.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-23 10:12:23 -07:00
Subhransu Mohanty 5eca781a3b edje_cc_out : fix possible buffer overrun
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4044
2016-06-16 15:28:08 +09:00
Cedric BAIL ba0aac6909 edje: make svg support a beta feature of edje_cc.
Should we do the same with Canvas3D part ?
2016-06-13 10:58:34 -07:00
Carsten Haitzler 3f426ca519 edje cc - remove debug printf i missed. :(
oops. i removed the others but not this one. yes i did git diff etc.
2016-06-13 15:22:11 +09:00
Carsten Haitzler 2845f5eff0 edje_cc - limit embryo_cc instances in bg to something sensible
so compiling current efl theme seems to spawn 178 instances of
embryo_cc in the background (then collect results). this is a bit
excessive and may be a source of issues. this may be causing T3874
perhaps due to embryo_cc's not launching (fork failing or something
else) and we don't check if fork fails. so try limit to 8 embryo_cc's
in the bg which is more reasonable than the currently "unlimited"
which leads to 178 currently...

i hope this fixes T3874

@fix
2016-06-13 14:18:03 +09:00
Subhransu Mohanty 62c0a4ef08 edje: add new svg part to edc
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, cedric, Hermet

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-08 11:35:33 -07:00
Tom Hacohen 6dcc2e6cc4 Edje cc out: Make list removal slightly more efficient. 2016-05-20 16:24:06 +01:00
Tom Hacohen b7ef3bcf0d Edje cc: Rename shadowing variables. 2016-05-20 16:24:06 +01:00
Jee-Yong Um 5bb39ed43d edje_cc: cleanup queued jobs for removed program
Summary:
When a new edje program is created, some jobs like lookup part
(Part_Lookup) or compiling embryo script (Code_Program) are queued.
If program is removed, queued jobs should be removed also.

Reviewers: jpeg, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-05-10 16:36:22 -07:00
Cedric BAIL 7c743b6754 Revert "Set the name for table, box items"
This reverts commit 6f7608befd.

Item in table and box do not need names as they have an index. This
is breaking ABI for edje application that rely on getting the index
properly when a signal is emitted. To be precise, this did break
elemines.
2016-04-19 11:56:17 -07:00
Jee-Yong Um 974daa5f98 edje_cc: delete anonymous lookup during program removal
Summary:
program_remove attribute allows to remove program inherited from
parent group, but if its action is EDJE_ACTION_TYPE_SCRIPT,
anonymous lookup also should be deleted.

@fix

Reviewers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-15 11:20:07 -07:00
Jee-Yong Um 984a8f7f90 edje_cc: support hexadecimal color code
Summary:
Support hexadecimal color code in EDC.

Four types of color code are acceptable.
All values below mean 'Red'. (255 0 0 255)
   color: "#F00";
   color: "#F00F";
   color: "#FF0000";
   color: "#FF0000FF";

Color code tables are usually provided with hexadecimal numbers.
Supporting hexadecimal color code will allow developers to skip
manual conversion hex to decimal.

Test Plan: Test case will provided with seperated commit.

Reviewers: cedric, jpeg, raster

Reviewed By: raster

Subscribers: raster

Differential Revision: https://phab.enlightenment.org/D3831
2016-03-28 15:43:04 +09:00
Jee-Yong Um afb49ec096 edje_cc: remove unnecessary internal function
Summary:
This internal function was made for checking non-existence of
Edje Part when handling insert_before/after attributes.
However, checking is implemented in different way and this function
is not used anywhere.

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-15 11:31:33 -07:00
Jee-Yong Um a91d5e8f72 edje_cc: fix typo in error message
Summary: meaningless suffix is attached to a word in error message.

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-15 11:24:31 -07:00
Chris Michael 07da0ba5d7 edje: Don't leak array source if we are going to exit function
This patch fixes a potential resource leak where we would previously
create a new eina_array and then possibly return from this function
(when checking validity of 's' parameter) without freeing the newly
created array.

Coverity CID1350291

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-10 12:13:44 -05:00
Tom Hacohen d9b5ce0192 Edje cc: Fix shadow warnings. 2016-02-16 09:38:36 +00:00
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