Commit Graph

283 Commits

Author SHA1 Message Date
Carsten Haitzler 0feb34927b edje_cc - use mem_alloc to fail and exit if alloc fails and fix err out
PVS sudio thought this was odd and it was a bit. not a real issue as a
mem alloc failure herw would still be fatal and simply a crash... as
opposed to a clean "out of mem" and fatal exit then...

error out eally was not finding originally allocated color and the
malloc should have been a mem_alloc() that guarantees a valid memory
return (or termintion of the process).

@fix
2017-05-17 15:04:01 +09:00
Carsten Haitzler d6d8d84b80 edje_cc docs - fix docs for vector images as it is wrong
it's images { vector: "x.svg"; } not vector { vector: "x.svg"; } ...

@fix
2017-05-17 15:04:01 +09:00
Jeeyong Um 26d728be01 edje_cc: Fix warning caused by conflict between local & global variable 2017-04-28 11:54:11 +09:00
Chris Michael d312f94857 edje: Fix resource leak
The function parse_str returns allocated memory which should be freed
before we exit this function.

Fix Coverity CID1374644

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-04-27 11:05:30 -04:00
Chris Michael 70cb03711d edje: Fix resource leak
The function parse_str returns allocated memory which should be freed
before we exit this function.

Fix Coverity CID1374647

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-04-27 11:02:51 -04:00
Jeeyong Um 56bbb7467a edje_cc: Convert anchors to beta feature (require -beta when compiled) 2017-04-26 11:33:47 +09:00
Jeeyong Um 56b8d1f908 edje_cc: Allow to set float position for anchors 2017-04-26 11:23:06 +09:00
Jeeyong Um 7a712411ee edje_cc: Allow part to be anchored to GROUP and the part named as "GROUP" 2017-04-26 11:22:58 +09:00
Jeeyong Um 1a04bd3e3d edje_cc: Fix warning caused by missing const modifier 2017-04-26 11:22:55 +09:00
Jeeyong Um e105646041 edje_cc: introduce "Anchors" - easy way to set parts relationship
Test Plan: compile src/examples/edc-anchors.c and run

Reviewers: zmike, raster, cedric, jpeg

Reviewed By: raster, jpeg

Subscribers: raster, barbieri, zmike, SanghyeonLee, taxi2se, Jaehyun_Cho

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-04-25 16:25:15 -07:00
Jeeyong Um d5e724697a edje_cc: Fix external param smart parser 2017-04-25 09:41:46 +09:00
Jeeyong Um 2cd1326c8d edje_cc: Keep script block during group inheritance
Currently, script block is removed when an edje group inherits from other group
after defining its own script block.
  group { "somegroup";
    script {
       ...
    }
    parts {
       ...
    }
    inherit: "othergroup"; // <= previous script block is removed here.
  }

If parent group doesn't have script block, it doesn't need to overwrite previous
one. This will keep script block and print warning when script block is overwritten.
2017-04-20 21:09:59 +09:00
Jeeyong Um e8711baec3 edje_cc: Clean up repeated code in color setter
Summary: Remove duplicated code

Reviewers: jpeg, cedric

Reviewed By: jpeg

Subscribers: bu5hm4n

Differential Revision: https://phab.enlightenment.org/D4769
2017-04-18 18:42:51 +09:00
Sungtaek Hong aaefd66d0c edje_cc: add short state handler for part.description.clip_to
Summary:
part.clip_to statement has short handler named "part.clip"
while part.description.clip_to does not.

Its short handler name should be "part.description.clip"
in order to have same experience with "part.clip".

Reviewers: cedric, Hermet, jpeg, conr2d

Reviewed By: conr2d

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4789
2017-04-18 16:48:04 +09:00
JEONGHYUN YUN 5fe350d2f7 edje: fix name check matching correctly
Reviewers: jpeg, jypark

This could lead to a crash as we were checking against NULL on
the wrong pointer.

@fix

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-04-06 15:20:49 -07:00
Jee-Yong Um a6c1c2d08f edje_cc: Keep lookups for removed program
Summary:
Program lookups triggered by removed edje program should be removed when removing
edje program, but program lookups for removed program should be kept to check
exitence of removed program.
This patch keeps lookups for removed program.

Reviewers: cedric, jpeg

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D4544
2017-01-04 15:30:21 +09:00
Vyacheslav Reutskiy f12a08ab15 edje_cc: add svg file name '.png' if it use as image
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'
2016-12-22 18:16:48 +02:00
Vyacheslav Reutskiy 715a66ed11 edje_cc: calculate and save the parts count in "edje/file" 2016-12-22 18:00:17 +02: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
Jean-Philippe Andre a7c50179d3 edje_cc: Redefine STRDUP with eina 2016-12-22 10:51:05 +09:00
Bruno Dilly 9308410479 edje: support filtering allowed seats per part
collections.group.parts.part.allowed_seats keeps a list
of seat names to be used for events filter.

So when evas devices of seat type are added, filters
may be applied for each part.

If no seat is listed, every seat may interact with such
part.
2016-12-21 23:03:33 -02:00
Cedric BAIL 9730eb1f47 edje: fix float comparison warning in edje_cc. 2016-12-20 16:39:30 -08:00
Bruno Dilly 287486e920 edje: add flag to choose between evas or edje seat naming
collections.group.use_custom_seat_names should be set to '1'
to use seat names on signals as provided by Evas.

By default just follow Edje naming approach
("seat1", "seat2", ...)
2016-12-19 14:58:35 -02:00
Bruno Dilly 0ab6567b3e edje: accept optional seat parameter on FOCUS_OBJECT
If not provided, FOCUS_OBJECT action will keep acting
over default seat.

Also include a usage on edje-multiseat test
(actually no example was exercising this action).
2016-12-19 14:58:35 -02:00
Bruno Dilly 5cfdf3ec3a edje: support seat on focus action and signals
Seat goes as an optional parameter for FOCUS_SET (if not
provided, act over default seat), and emit signals
with seat suffix:
 * focus,in,$SEAT
 * focus,out,$SEAT
 * focus,part,in,$SEAT
 * focus,part,out,$SEAT
2016-12-19 14:58:35 -02:00
Bruno Dilly 6f3f514e4f edje_cc: add FOCUS_OBJECT reference on doc
It was missing on actions list.
2016-12-02 16:41:01 -02:00
Vyacheslav Reutskiy 313b449ab4 edje_cc: set correct value for attr set for MESH_NODE
On parce the image.normal token set attribute 'set' only for part type
EDJE_PART_TYPE_MESH_NODE.

@fix
2016-10-18 08:17:05 +03: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
Jee-Yong Um 293e251f55 edje_cc: remove after programs lookup when removing program
Summary:
When removing program, program lookups for its after programs
should be removed.

@fix

Reviewers: cedric, jpeg, Hermet

Reviewed By: Hermet

Subscribers: taxi2se

Differential Revision: https://phab.enlightenment.org/D4286
2016-09-08 11:00:40 +09:00
Andrii Kroitor 16a3509906 edje_cc: fix group inherit
Summary: item spread property was not copied.

Reviewers: NikaWhite, Hermet, raster, cedric

Subscribers: jpeg, reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D4285
2016-09-07 15:16:47 +03:00
Jaehwan Kim 59bdf3461c edje: add missed break in the switch construction. 2016-09-07 14:01:51 +09:00
Jee-Yong Um 1d2be3fc4c edje_cc: add lookup for inherited after program
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
2016-09-01 20:08:56 +09:00
Tom Hacohen 1198dd4efb Edje cc: Rename and move around shadowing variable. 2016-08-30 13:36:41 +01:00
Marcel Hollerbach ce89c06cb0 edje_cc: add snapshot to the lazedc symbols
there where comments and documentation about it, but no code.

This is some kind on follow up on a7fd98f8f6.

@fix
2016-08-22 09:24:18 +02:00
Jean-Philippe Andre ae3ac0cd25 edje: Allow no_render in description
Previously, it was limited to the part block. It was a mistake
and should have been put in the description instead, as this
allows it to change during state transition (like visible, or
proxy_src_visible).

@feature
2016-08-16 20:08:32 +09:00
Carsten Haitzler 0779adcf0b edje - remove unused fields from part desc and calc params
fill spread and angle have never been used - resevred intitially for
gradient objects, but never put into use, so remove to get rid of
junk/memory footprint etc.

@optimize
2016-08-14 13:51:52 +09:00
Carsten Haitzler a71f0ed24b edje_cc - fix inheritance of programs and store channel too in copy
this fixes programs that inherit and play audio on specific channels.
i found that sound worked on single line entries but not multipline
beause single line inherit from multi but didnt copy this program
param - the channel number. this fixes this

@fix
2016-08-06 19:10:24 +09:00
Subhransu Mohanty d458101a41 edje: updated the start index of vector resource from 1 to 0
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-08-03 17:34:57 -07:00
Subhransu Mohanty e077e92372 edje: throw error when vector resource not found.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4202
2016-08-01 13:24:34 +09:00
Subhransu Mohanty 12e09d2d2a edje: fixed issue with vector part state inheritance.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4190
2016-07-26 14:19:59 +09:00
perepelits.m 82f62b6234 edje: fix specular color
Summary: We use int from 0 to 255 for color, not float

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-07-21 12:28:21 -07:00
Cedric BAIL f7af802f4f edje: allow inheritance from an aliased group. 2016-07-21 11:19:44 -07:00
perepelits.m 91314b64e2 edje: fix ambient color
Summary: change specular color to ambient int the function of ambient color

Reviewers: cedric, raster, Hermet

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D4169
2016-07-20 10:42:22 +09:00
Jee-Yong Um 5a3c015e9e edje: add required attribute in Edje_Part
Summary:
When using EDC written by another person, developer usually
does not need to know all specified parts in EDC but editable
like swallow, text or textblock parts.
The required flag tells whether the part is intended to be used outside EDC.

Reviewers: jpeg, cedric, raster, Hermet

Reviewed By: jpeg, raster

Subscribers: raster, NikaWhite, kimcinoo, jpeg

Differential Revision: https://phab.enlightenment.org/D3579
2016-07-15 16:34:34 +09:00
Youngbok Shin 982ef0b9d0 Edje calc: Fix Evas Text width calculation with ellipsis
Summary:
To keep consistency with Evas Textblock part in edje,
text.min has to work logically even if ellipsis is enabled.
If a Text part has minimum width, maximum width and "text.min: 1 X;",
Text part should be expanded until its width reaches to the maximum width.
Then, ellipsis will work. Singleline Textblock is also working like this.
@fix

Reviewers: cedric, herdsman, raster, tasn

Subscribers: Blackmole, z-wony, jpeg

Differential Revision: https://phab.enlightenment.org/D3587
2016-07-12 10:48:17 +09:00
Carsten Haitzler f7ea9373f6 edje_cc - fix new coverity issue
fix CID 1357395
2016-07-09 11:44:35 +09:00
Carsten Haitzler 2ef7d310d0 edje cc - fix leake found by coverity
fixes CID 1355586
2016-07-08 16:00:29 +09:00
Carsten Haitzler 2fdb465934 edje cc - fix leak of name string on edje compilation time
fixes CID 1355587
2016-07-08 16:00:29 +09:00
Cedric BAIL 088043e77a edje: unamed part are completely legit as long as no program try to interact with them. 2016-06-08 15:00:30 -07: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