There are few image formats that converted into *.png on data writing
stage (*.svg, *.tgv). After converting image, this image entry name
changes by <name>.<vector format ext>.png. This make possible save
vector images into edj file.
Because images set could contain vector images too - after save on
disk set image entry name wasn't updated. And still have original name:
<name>.<vector format ext>. This commit update image set entries
name accordingly to the global pool of images.
@fix
yes - the type is const char * for edje runtime (the library) but in
edje_cc we strdup these strings and yes - assign them to a const char *
thus the warning and the need to cast. it's specific co edje_cc only
and so this is correct.
This path add notify for user in case when svg use in image section. It
need for clear understanding why vertor image scale like bitmap. And
add to file name new extension '.png'
Summary:
The inherit_only groups could be used for template of other groups.
So, even if it has image part, it dose not need to have image attributes.
@fix
Test Plan: N/A
Reviewers: cedric, conr2d, jpeg, raster
Reviewed By: raster
Differential Revision: https://phab.enlightenment.org/D4322
Summary:
"after" program inherited from inherit_only group does not have original
program lookup, but _edje_program_copy() doesn't consider this case.
When it fails to copy program lookup, new program lookup should be appeded.
@fix
Test Plan: make attached program and run
Reviewers: cedric, jpeg, Hermet
Reviewed By: Hermet
Subscribers: taxi2se
Differential Revision: https://phab.enlightenment.org/D4253
Summary:
bin/edje/edje_cc_out.c: In function ‘data_write_images’:
bin/edje/edje_cc_out.c:1164:7: warning: ‘f’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (!f) return EINA_FALSE;
^
bin/edje/edje_cc_out.c:1154:15: note: ‘f’ was declared here
Eina_File *f;
^
Reviewers: cedric, jpeg
Reviewed By: jpeg
Subscribers: seoz, jpeg
Differential Revision: https://phab.enlightenment.org/D4101
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
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>
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.
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>
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
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>
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>
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>
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
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>
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".
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
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>
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>
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
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
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.
@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.
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>
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
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>
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>
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
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
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>
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>
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>
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>
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
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
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>
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>
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
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.
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
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.
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
Update the data_process_lookups function.
Earlier images are not deleted, but his name was
removed from the list, and it was possible to
access the image by id. Now all unused images
are deleted.
Reviewers: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D309
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
NB: If we are going to exit data_thread_script function due to malloc
failure or fread failure, then we should close the previously fdopen'd
file so that we do not leak 'f'.
Signed-off-by: Chris Michael <cp.michael@samsung.com>