Commit Graph

223 Commits

Author SHA1 Message Date
Jee-Yong Um 20c9d087d1 edje_cc: make script_override default value as EINA_FALSE
Summary:
script_override variable is initialized as EINA_FALSE
when group is created, but assign EINA_TRUE can mislead
some developers to think script_override default value
is EINA_TRUE.

Reviewers: Jaehyun_Cho

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-18 11:52:55 -07:00
Jee-Yong Um 4a63c917aa edje_cc: fix inheriting script from other group
Summary:
If a group inherits from the other, group script block is copied
only when there are program script blocks in parent group.
This patch makes edje_cc always copies group script block,
but allows to override group script block in child group.
The content of reverted D3799 is included. That reveals this inconsistency.

Reviewers: cedric

Subscribers: Jaehyun_Cho, woohyun, jpeg

Differential Revision: https://phab.enlightenment.org/D3802
2016-03-18 13:30:55 +09:00
Jaehyun Cho 4e0cff107e Revert "edje: remove unnecessary repetition during copying code"
This reverts commit 37408aef95.

This commit is reverted temporarily to prevent build fail.
This commit reveals the hidden bug when elementary theme is built.
This commit will be applied after the hidden bug is resolved.
2016-03-18 11:31:45 +09:00
Jee-Yong Um 37408aef95 edje: remove unnecessary repetition during copying code
Summary: Code doesn't need to be copied every time when program is copied.

Reviewers: cedric

Reviewed By: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-17 11:53:26 -07:00
Hosang Kim 544bd91e5f edje_cc: fix group inheriting
Summary:
When edje_cc inherits group, group's script wasn't copied.
So base group and inherited groups use same pointer.
When edje_cc makes lookups for script, loopkups is overwritten.

Test Plan: elementary_test -> shown error log

Reviewers: Hermet, woohyun, cedric, raster

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-15 11:23:32 -07:00
Carsten Haitzler d5be71065f edje cc: make the unnamed party non-fatal but punishhed by a pause
allow old edc code that was bad with no named parts to still build BUT
punish with a sleep for 10 seconds to help it be noticed, yet still
work.
2016-02-25 07:53:52 +09:00
Vitalii Vorobiov 499e66ac78 edje_cc_handlers: font field in new text_class should be NULL at the begining
@fix
2016-02-23 11:35:48 +00:00
Vyacheslav Reutskiy 81f8e8683d edje_cc: abort compile when unnamed part exists
Summary: abort compile when unnamed part exists.

Reviewers: raster, reutskiy.v.v

Reviewed By: reutskiy.v.v

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3723
2016-02-23 11:06:55 +02:00
perepelits.m ef767580a5 Edje: add of some new features and fixes for Canvas3d types in edje_calc.
Summary:
Adding of new properties for light in edje-3d. Recalculation of main properties in Canvas3D parts to provide animation (only those which I used in widgets).
Checking of frame existing when setting material.

Reviewers: cedric, raster, Hermet

Subscribers: jpeg, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-17 14:48:36 -08:00
Jee-Yong Um f04d509feb edje_cc: allow omitting "name" keyword in color_classes.color_class block
Summary:
This allows developer to omit "name" keyword in color_classes.color_class
block in EDC.

Reviewers: cedric, jpeg

Reviewed By: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-05 08:30:37 +01: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
Jee-Yong Um 35e28b1958 edje_cc: remove redundant comments which makes reference seem weird
Summary:

Group.Parts.Part.Description.Domain @edcsubription is in wrong place,
(actually that is not necessary one.)
so it makes Group.Parts.Part.Description.Text block seem weird.

Reviewers: jpeg, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-22 11:03:27 -08: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
Chris Michael 6fb35ad415 edje: Fix compiler warning about set but not used variables
When compiling src/bin/edje, we end up with compiler warnings about
'pc' variable being set but not used. This patch just comments out
(for now) those variables (as I am unsure if they are going to be used
later or not).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-01-05 08:47:54 -05: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
Mykyta Biliavskyi a96bf53c21 Edje_cc: support braces for description.proxy attribute.
Fix parsing Group.Parts.Part.Description.Proxy block in cases
when uses braces:

part { type: PROXY;
  description {
    ..
    proxy {
      source_clip:    1;
      source_visible: 1;
    }
      ..
  }
}

@fix
2015-12-30 16:18:58 +09:00
Jee-Yong Um 71f578dc0b edje: add text_classes syntax to EDC
Summary:
text_class can be defined in text_classes block.

T2900

@feature

Reviewers: jpeg, raster

Subscribers: raster, cedric, Jaehyun_Cho, CHAN, kimcinoo

Differential Revision: https://phab.enlightenment.org/D3435
2015-12-24 15:58:34 +09:00
Carsten Haitzler 93c2b85bd4 edje - list mouse pressed signals as they are new in edcref 2015-12-23 21:53:55 +09:00
Mike Blumenkrantz b47d9caf84 edje_cc: redo part type setting to be even more correct
when changing the type of a part which already has descriptions, it's
necessary to avoid copying any of the previous type-specific desc data

this should be the last of them...

@fix
2015-12-16 15:53:50 -05:00
Mike Blumenkrantz e14dc0f11d edje_cc: correctly copy part descriptions when setting part type
in the case where a part is inherited, changing the type will lead to
broken part/program lookups for the part during resolving in write-out;
memcpy alone is not enough to fix this.

@fix
2015-12-16 15:03:40 -05:00
Mike Blumenkrantz 6eff8ab5ba edje_cc: move part desc free function within file
no funcitonal changes
2015-12-16 14:38:33 -05:00
Mike Blumenkrantz b14a06b040 edje_cc: terminate filter file scripts
==24030== Invalid read of size 1
==24030==    at 0x4A0AC77: strcmp (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24030==    by 0x598A9DC: _eet_dictionary_lookup (eet_dictionary.c:69)
==24030==    by 0x598AA93: eet_dictionary_string_add (eet_dictionary.c:103)
==24030==    by 0x598107B: eet_data_put_string (eet_data.c:857)
==24030==    by 0x598213F: eet_data_put_type (eet_data.c:1433)
==24030==    by 0x59895AB: eet_data_put_unknown (eet_data.c:4798)
==24030==    by 0x598A113: _eet_data_descriptor_encode (eet_data.c:5172)
==24030==    by 0x59894A4: eet_data_put_array (eet_data.c:4760)
==24030==    by 0x598A113: _eet_data_descriptor_encode (eet_data.c:5172)
==24030==    by 0x5989617: eet_data_put_unknown (eet_data.c:4807)
==24030==    by 0x598A113: _eet_data_descriptor_encode (eet_data.c:5172)
==24030==    by 0x5983E06: eet_data_write_cipher (eet_data.c:2396)
==24030==    by 0x5983E92: eet_data_write (eet_data.c:2412)
==24030==    by 0x406BC2: data_thread_head (edje_cc_out.c:674)
==24030==    by 0x406D51: data_write_header (edje_cc_out.c:717)
==24030==    by 0x40B52E: data_write (edje_cc_out.c:2439)
==24030==    by 0x40563D: main (edje_cc.c:399)
==24030==  Address 0xf45cb7b is 0 bytes after a block of size 347 alloc'd
==24030==    at 0x4A089C7: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24030==    by 0x414BAC: mem_alloc (edje_cc_mem.c:15)
==24030==    by 0x41B66A: st_filters_filter_file (edje_cc_handlers.c:4718)
==24030==    by 0x410EDA: new_statement (edje_cc_parse.c:229)
==24030==    by 0x41227C: parse (edje_cc_parse.c:719)
==24030==    by 0x412E5C: compile (edje_cc_parse.c:1044)
==24030==    by 0x405624: main (edje_cc.c:394)
==24030==
==24030== Invalid read of size 1
==24030==    at 0x4A0AC77: strcmp (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24030==    by 0x598AAFB: eet_dictionary_string_add (eet_dictionary.c:109)
==24030==    by 0x598107B: eet_data_put_string (eet_data.c:857)
==24030==    by 0x598213F: eet_data_put_type (eet_data.c:1433)
==24030==    by 0x59895AB: eet_data_put_unknown (eet_data.c:4798)
==24030==    by 0x598A113: _eet_data_descriptor_encode (eet_data.c:5172)
==24030==    by 0x59894A4: eet_data_put_array (eet_data.c:4760)
==24030==    by 0x598A113: _eet_data_descriptor_encode (eet_data.c:5172)
==24030==    by 0x5989617: eet_data_put_unknown (eet_data.c:4807)
==24030==    by 0x598A113: _eet_data_descriptor_encode (eet_data.c:5172)
==24030==    by 0x5983E06: eet_data_write_cipher (eet_data.c:2396)
==24030==    by 0x5983E92: eet_data_write (eet_data.c:2412)
==24030==    by 0x406BC2: data_thread_head (edje_cc_out.c:674)
==24030==    by 0x406D51: data_write_header (edje_cc_out.c:717)
==24030==    by 0x40B52E: data_write (edje_cc_out.c:2439)
==24030==    by 0x40563D: main (edje_cc.c:399)
==24030==  Address 0xf45cb7b is 0 bytes after a block of size 347 alloc'd
==24030==    at 0x4A089C7: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24030==    by 0x414BAC: mem_alloc (edje_cc_mem.c:15)
==24030==    by 0x41B66A: st_filters_filter_file (edje_cc_handlers.c:4718)
==24030==    by 0x410EDA: new_statement (edje_cc_parse.c:229)
==24030==    by 0x41227C: parse (edje_cc_parse.c:719)
==24030==    by 0x412E5C: compile (edje_cc_parse.c:1044)
==24030==    by 0x405624: main (edje_cc.c:394)

@fix
2015-12-16 14:34:20 -05:00
Mike Blumenkrantz b7cf69cd78 edje_cc: track parts for descriptions, ensure part types match when inheriting
since it's now possible to inherit parts, it's possible that inheriting from
a different part type can lead to memory errors in the case where one part
has a larger desc struct than the other

@fix
2015-12-16 14:31:49 -05:00
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
Carsten Haitzler ea7394a491 edje cc fix - we parsed floats not intsfor min and max desc size
thanks conr2d for pointing this out - we uses the float parse func and
not in parse. we should use int parse as the min and max sizes are
just ints and not floats. :)

@fix
2015-12-02 15:24:21 +09:00
Jee-Yong Um 290b92852e edje: revise the explanation for mask_flags attribute
Reviewers: cedric, raster

Reviewed By: raster

Subscribers: raster

Differential Revision: https://phab.enlightenment.org/D3330
2015-11-19 15:33:45 +09:00
Jean-Philippe Andre 6ad565a6af edje_cc: Allow LOSSY compression without quality param
LOSSY quality will then default to 90.
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre cb2530d921 doc: Fixup EDC doc for Evas 3D stuff
Use same paragraph title format
2015-11-09 16:11:35 +09:00
Jean-Philippe Andre b52e9202cc doc: Add EDC doc for desc.proxy, fix for desc.fill 2015-11-09 16:11:34 +09:00
Jean Guyomarc'h b2fb58b915 edje_cc: fix segfault when a program attempts to play a non-registered sound
Summary:
When an edje program attempted to play a sound that was not registered
(e.g. in a sounds{} block), edje_cc would segfault instead of throwing
an error.

@fix

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 14:01:23 -07:00
Tom Hacohen e54fd09c34 Edje cc handlers: Fix memory leak and possible crash.
Due to a misplaced semicolon, EINA_LIST_FREE was doing nothing and only
the last part was freed if there was one, and probably a crash if there
wasn't.

This shows again that having statements without {} is dangerous. We need
to force {} and add a lint rule, or at the very least, add a rule to put
the ; in a new line (like clang warns about by default anyway).

@fix
2015-10-09 12:29:41 +01:00
Jean-Philippe Andre 12f9fea2a4 EDC Doc: Some fixes
We need to move this doc to the wiki and complete it :)
2015-10-07 10:48:18 +09:00
Jean-Philippe Andre 60d77cf853 edje_cc: Fix inheritance of "no_render" flag
@fix
2015-10-02 12:25:29 +09:00
Jean-Philippe Andre 6882bb6328 edje_cc: Add "render" keyword for lazEDC
Since @zmike also thought this could be useful, let's add it.
2015-10-02 12:25:29 +09:00
Jean-Philippe Andre 9c5e873c68 edje_cc: Add "norender;" as lazEDC for "no_render: 1;" 2015-10-01 22:22:03 +09:00
Jean-Philippe Andre 6ac4f7154b Edje: Add filter support to SNAPSHOT parts
This makes SNAPSHOT a part type on it own, combining the
common and filter subtypes.

This means it is now possible to set an evas filter on
a SNAPSHOT object, just like for TEXT, IMAGE and PROXY.

@feature
2015-10-01 20:10:54 +09:00
Jean-Philippe Andre 31edfbb817 Edje: Add support for filters to PROXY parts
Same syntax as for IMAGE and TEXT: description.filter
2015-10-01 20:10:54 +09:00
Jean-Philippe Andre 99b1c7622b Edje: Fix filters for IMAGE parts inherited states 2015-10-01 20:10:54 +09:00
Jean-Philippe Andre c0f887b429 Edje: Move internal struct filter around (refactor) 2015-10-01 20:10:54 +09:00
Thanatermesis 08238de3e0 small typo in docs, mounse is mouse 2015-08-25 03:04:50 +02:00
Cedric BAIL a7fd98f8f6 edje: add a SNAPSHOT part in EDC. 2015-08-06 11:05:50 +02:00
Oleksandr Shcherbina 60b16be772 Evas canvas3d: Move evas 3d types to evas_types.eot
Summary:
Move evas_canvas3d types from Evas_Eo.h to evas_types.eot
Change enum constatnt for vertex_arrtib, material_attrib, blend_func
Correct namespace for Evas.Real type

Reviewers: cedric, tasn

Reviewed By: tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2734
2015-08-04 10:57:14 +01: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 4e6e7def00 doc: Fixup EDC documentation about filters & examples 2015-06-30 10:12:13 +09:00
Jean-Philippe Andre fc36eedadd Edje: Replace index() by strchr()
Thanks vtorri for pointing out the build break on windows and
that index() is deprecated.
2015-06-30 10:12:13 +09:00
Jean-Philippe Andre 3648b0e252 Edje: Add proper filters section in the EDJ file
Don't [ab]use the file data section for filter scripts, instead
create a proper section for them. The rest of the behaviour stays
the same.
2015-06-30 10:12:13 +09:00
Jean-Philippe Andre a31222ae6f doc: EDC reference: Add specific doc for group.data
Group.data does not support "file", only "item". This doc
explains that.

Should Group.Data support file instead?
2015-06-30 10:12:13 +09:00