Commit Graph

64 Commits

Author SHA1 Message Date
Mike Blumenkrantz 15b6563357 edje_cc: fix comparisons for possible non-float values
Summary:
when defined, BUILD_EDJE_FP causes some of these struct members to not
be floating types and additionally defines special macros to be used
for comparisons to handle this case
Depends on D11786

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11787
2020-05-09 09:26:41 +01:00
Mike Blumenkrantz 955574c044 add EFL_VERSION_1_24 define
Summary: this needs to go in right after every release

Reviewers: stefan_schmidt, devilhorns

Reviewed By: stefan_schmidt, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11477
2020-03-12 12:17:07 -04:00
Mike Blumenkrantz 3e7017e6a8 add EFL_VERSION_1_23 define 2019-04-05 20:17:27 -04:00
Mike Blumenkrantz a5e3d2c455 add EFL_VERSION_1_22 defines
whoops
2019-04-05 20:16:44 -04:00
Carsten Haitzler 906183f2cd edje_cc_parse - use memcpy instead of strncpy as we are truncating
we mean it here so it's right - use memcpy as its equivalent without
warnings.
2018-11-09 11:44:00 +00:00
Carsten Haitzler 24b345bb53 edje_cc_parse - warn - make buffers bigger to avoid truncation 2018-11-09 11:43:59 +00:00
Mike Blumenkrantz 786210db6f edje_cc: add 'skip_namespace_validation' keyword
this pairs with the newly-added -N option to denote groups in edc files
which should not be checked for correct namespacing

the option is useful for cases such as music_control.edc,
where a group has been shipping for years with API signals like
"btn,clicked" which cannot be changed since they are used in an external
application and compatibility must be maintained

the documentation for this option explicitly states that it must only be used
inside an #ifdef SKIP_NAMESPACE_VALIDATION block, allowing this keyword to
be easily removed at a later point

ref T7072

@feature

Differential Revision: https://phab.enlightenment.org/D6388
2018-07-05 22:59:18 +02:00
Mike Blumenkrantz 30378f26fa edje: reformat bin/ c files
a lot of this was unreadable due to mixed tabs/spaces or just random
formatting
2018-02-28 16:02:37 -05:00
Jeeyong Um 7c0f1fdd34 edje_cc: Extract function to build stack ending with wildcard 2017-11-10 12:59:55 +09:00
Mike Blumenkrantz 595aa6bbb4 efl: add EFL_VERSION_1_21
indicate that features from this version can be used
2017-08-14 07:25:04 -04:00
Mike Blumenkrantz 5b39bb5a3d efl: add EFL_VERSION_1_20
indicate that features from this version can be used
2017-06-09 19:14:58 -04:00
Jean-Philippe Andre cebfc8d808 edje: Fix warnings introduced in recent fix
See b9b0177d5e
See d3420cd35c
2017-06-08 16:16:11 +09:00
Carsten Haitzler d3420cd35c edje_cc handle line too long for buffers
if a line from the cpp processor is too long (more than 4k) then abort
compilation as something is wrong asnd our buffers can't handle it
anyway.

@fix
2017-06-08 12:01:38 +09:00
Jeeyong Um 56b8d1f908 edje_cc: Allow to set float position for anchors 2017-04-26 11:23:06 +09:00
Jaehyun Cho f3647f24d5 edje_cc_parse: Support edje_cc in path containing space character
Previously, edje_cc in a path containing space character was not
supported. (e.g. "/usr/local/s p a c e/bin/edje_cc")

Now, to resolve above issue, edje_cc path is treated with double
quotation marks.

On Windows, if command begins with double quotation marks, then the
first and the last double quotation marks may be either deleted or not.
(See "help cmd" on Windows.)
Therefore, to preserve the string between the first and the last double
quotation marks, "cmd /S /C" and additional outer double quotation marks
are added.
2017-03-07 19:46:19 +09:00
Gustavo Sverzut Barbieri 8dc853f230 ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the
installation file structure and thus eina_prefix works out of box.
2017-02-03 12:36:38 -02:00
Jaehyun Cho e23a4521ea Revert "edje_cc_parse: Fix to insert missing double quotation marks"
This reverts commit 5ae6e1db2f.

On Windows, system() does not execute file if the argument of system()
begins with double quotation marks.
(e.g. system("\"C:\efl\lib/edje/utils/v-1.18/epp.exe\" ...");)

To resolve this issue on Windows, it has been fixed to have the argument
of system() not begin with double quotation marks.
(i.e. Do not use double quotation marks for epp.exe path in system().)
2017-01-11 15:22:52 +09:00
Jaehyun Cho 8cf38539a1 edje_cc_parse: Fix not to convert macros to a single string
Double quotation marks convert macros to a single macro string and only
the first macro becomes valid.

So double quotation marks are not used for macros.
2017-01-11 10:29:46 +09:00
Jaehyun Cho 5ae6e1db2f edje_cc_parse: Fix to insert missing double quotation marks 2017-01-02 20:03:05 +09:00
Jaehyun Cho c670a32053 edje_cc_parse: Compile EDC file whose path contains space character.
Previously, edje_cc could not compile EDC file whose path contains space
character since edje_cc interpreted the EDC file as separate 2 inputs.
(i.e. "input file.edc" was interpreted as "input" and "file.edc")

This patch enables edje_cc to interpret above case correctly.
2017-01-02 19:25:45 +09:00
Jean-Philippe Andre 176b0c8d03 Revert "edje: fix float comparison warning in edje_cc."
This reverts commit 9730eb1f47.

This introduces new issues, such as:
Warning: naviframe.edc:451: couldn't find an exact match in
 part 'elements_clip' when looking for 'hidden' 0.000000. Falling
 back to nearest one 'hidden' 0.000000.

Because some comparison was not done properly, and changed
float != 0 to float == 0.

Get it right if you insist on "fixing" those floating point
comparisons.
2016-12-22 14:13:25 +09:00
Cedric BAIL 9730eb1f47 edje: fix float comparison warning in edje_cc. 2016-12-20 16:39:30 -08:00
Jee-Yong Um ed7febb2c5 edje_cc: allow combine lazEDC keywords
Summary:
Fix parsing error which occurs when lazEDC keyword is combined
with other keyword by period. (like parts.rect)

@fix

Test Plan: Download attached file and run "make"

Reviewers: Hermet, cedric, jpeg

Subscribers: taxi2se

Differential Revision: https://phab.enlightenment.org/D4309
2016-09-23 11:56:19 +09:00
Carsten Haitzler 53095d6fc7 Revert "edje/edje_cc: use strncpy() instead of strcpy()."
This reverts commit ab1a72f5e7.

just dismiss in coverity if the code is not actually wrong
2016-09-22 08:31:04 +09:00
Hermet Park ab1a72f5e7 edje/edje_cc: use strncpy() instead of strcpy().
strncpy() is better for security.
Also, this change avoids annoying coverity detection.
2016-09-21 13:30:44 +09:00
Mike Blumenkrantz f0400e604c efl: add EFL_VERSION_1_19
indicate that features from this version can be used
2016-08-11 13:42:42 -04:00
Carsten Haitzler 4329a359dc edje_cc handle theoretical string overflow (not real) shhh coverity
these strings are internal fixed strings so never bigger than buffer,.
but silence coverity to avoid noise. fixes CID 1355588 , 1355589
2016-07-11 22:23:58 +09:00
Jee-Yong Um 9bf261fa24 LazEDC: introduce simple external param syntax
Summary:
EXTERNAL parts can have parameters, and its form is like the next.
   params.string: "param_name" "param_value";

This patch will shorten above line by the next syntax.
   params.param_name: "param_value";

The type of param will be determined by the type of inserted value.

Reviewers: cedric, raster, Hermet

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-05-19 02:23:56 -07:00
Jee-Yong Um e260f23c94 edje_cc: fix parsing error when some keywords are used as part name
Summary:
Some keywords cause parsing error when they are used as part name.
For example,
   group { "some_group";
      parts {
         box { "box";
         }
      }
   }
The part name "box" should be processed by wildcard handler,
but this is pushed into stack. (collections.group.parts.part.box ...)
This patch pushes token into stack only when it doesn't have quotes.

@fix

Reviewers: cedric, raster, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3841
2016-03-29 17:35:05 +09:00
Mike Blumenkrantz 9ad7ddbcd4 efl+edje: add EFL_VERSION_1_18 define for detecting 1.18 feature support
this define means that any 1.18 feature can now be detected by testing for
the presence of this define, even before the release has gone out

for future (non-bugfix) releases, further defines should be created in addition
to this one in order to provide detection for features in each version
2016-02-29 07:32:42 -05: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
Vincent Torri 7500ef6f8c edje_cc: Use ecore_file_file_get() and ecore_file_dir_get() for EDC parsing
Replace current EDC parsing code in edje_cc on Windows with the code
using ecore_file_file_get() and ecore_file_dir_get().

Signed-off-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
2015-12-10 20:44:45 +09:00
Jaehyun Cho a05171d39f edje_cc: Fix parsing including file path in EDC on Windows.
On Windows, including file path in EDC has not been parsed correctly
because '\' has not been used for path separator.
This commit fixes edje_cc complie to use '\' as path separator on
Windows.
2015-12-08 11:01:11 +09:00
Chris Michael 6949d1193e edje_cc: Fix dereference null return value
Summary: Fix Coverity CID1308232 which reports that we may be passing
NULL to strcmp here as the function _parse_param_get May return NULL.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-25 14:56:48 -04:00
Chris Michael cbc726ac56 edje_cc: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-25 14:56:48 -04:00
Jean-Philippe Andre 88b81d240a Edje: Move filter desc to common desc
This will be shared between IMAGE and TEXT.
In the future it can also be shared with PROXY and TEXTBLOCK.
2015-06-25 14:36:09 +09:00
jiin.moon 6487a26354 edje: add support to control the transition time of edje animation globally.
Summary:
Add the transition scale flag and the transtion scale value.
This flag can be change using "transition_scale_enable" in edje program.
If flag is true, the transition scale value affect the transition speed of edje
The transition scale value can be change by elm_config.

@feature

Test Plan: elementary_config

Reviewers: Hermet, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-22 17:56:15 +02:00
Nak-Gyeong Kim 7d33ae501b edje: edje_cc_parse should check pair of parens.
Summary:
Fix parens bug.
((x + y)-z) is OK.
((x + y) - z) is NOT OK. This patch can cover this case.

@fix

Signed-off-by: Nak-Gyeong Kim <nakkyong.kim@samsung.com>

Test Plan:
Test in edc.

((x + y)-z) is OK.
((x + y) - z) is NOT OK. This patch can cover this case.
If parens are not paired, it will notify.

Reviewers: raster, Hermet, cedric

Subscribers: kimcinoo, jaehwan

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-29 18:22:09 +02:00
Cedric BAIL 863ed65a0f epp: fix annotate. 2015-04-16 19:21:45 +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
Dinesh Dwivedi 70df9f48ba edje: add option to dump gnu style include dependencies in edje_cc.
Summary:
We were facing one problem in tizen sdk's build system as it does not trigger build for edc file
if only sub-edc files are changed. During analysis, we found that there is no option in edje_cc
for dumping include dependencies which other compiler (clang/ gcc etc) does have. We can do other
hack to solve this problem but it will be great if edje_cc can emit gnu style include dependency
target.

This patch will add support to generate gnu format include dependency file while compiling edc file.
similar to what gcc generates with option '-MMD -MF=<dep_file> -MT<dep_file>'
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Preprocessor-Options.html

Test Plan: no failure in existing test

Reviewers: raster, cedric

Reviewed By: cedric

Projects: #efl

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-31 18:03:56 +02:00
Cedric BAIL 7b2aecff79 edje: use the right variable.
Thanks michelle_lg.
2014-10-31 10:45:28 +01:00
Cedric BAIL 62fd3c0a9b edje: fix use of eina_tmpstr_del after eina_shutdown.
atexit could call eina_tmpstr_del after the shutdown of eina leading
to the access of some random/garbage memory.

@fix
2014-10-30 00:36:49 +01:00
Stefan Schmidt cbc6cdda89 edje_cc_parse: Use eina_file_mkstemp() to avoid problems with umask
CID 1039618
2014-09-10 16:43:02 +02:00
Carsten Haitzler 874e87e8df fix noop self-assignment
this fixes CID 1040028
2014-08-14 18:25:42 +09:00
Gwanglim Lee 52fab4e55d edje: fix coverity defects
Summary:
CID 1214113: logically dead code
CID 1230295: dereference null return value
CID 1230296: use after free
@fix

Test Plan: N/A

Reviewers: raster, cedric, jpeg, q66

Reviewed By: q66

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1275
2014-08-06 10:55:32 +01:00
ChunEon Park b2841c0db6 edje/edje_cc - intensive null check. 2014-05-27 22:00:59 +09:00
Mike Blumenkrantz a84f19beb7 redo lazEDC parsing a bit to fix desc.state omission 2014-05-09 15:58:25 -04:00
Mike Blumenkrantz 1d6b9d71e6 fix be9b27ac99 for edje_cc
do_params is set when expecting parameters, not req_params
2014-05-09 12:26:22 -04:00
Mike Blumenkrantz 7823b187d9 edje_cc now requires quotes for using lazEDC block naming
this was making syntax errors much harder to debug and only served the purpose of further enabling shitty, nonconformant edc creating. removing now before it becomes an api break
2014-04-28 10:17:23 -04:00