Commit Graph

652 Commits

Author SHA1 Message Date
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08: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
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
Mykyta Biliavskyi 5fb595e714 Edje_cc: update images.set.image names when write edj file.
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
2016-12-29 16:14:23 +02:00
Carsten Haitzler 4b18b472ba edje_cc - fix warning about freeing a const char ptr
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.
2016-12-28 19:01:38 +09:00
Jaehwan Kim 65b7ab95bc edje_pick: add vector resources into the output file. 2016-12-23 13:10:14 +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
Vyacheslav Reutskiy e30a197a92 edje_pick: fix calculation of index for parent and depended groups 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
Jaehwan Kim 5f95a15bc1 edje_pick: include the resources that is only used.
When it pick any groups, it just includes the resources that is used
in those groups.
2016-12-22 10:22:18 +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
Cedric BAIL 4cbca7c357 edje: fix float comparison warning in edje_external_inspector. 2016-12-20 16:39:30 -08:00
Cedric BAIL f89cc21ef0 edje: fix float comparison warning in edje SVG loader. 2016-12-20 16:39:30 -08:00
Cedric BAIL 6e40fd890b edje: fix float comparison warning in edje_pick. 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
Vyacheslav Reutskiy 6f41b7a690 edje_pick: copy images from image sets
@fix
2016-12-16 15:32:48 +02:00
Vyacheslav Reutskiy ca11f5d678 edje_pick: use separate Eina_List vars for different EINA_LIST_FOREACH 2016-12-16 15:32:20 +02:00
Vitalii Vorobiov df9128c3e3 edje_pick: fix memory leak while on group dependency build
@fix
2016-12-13 14:17:39 +02:00
Daniel Zaoui 946aa945b3 Fix compilation warning due to redeclared variable 2016-12-13 07:48:11 +02:00
Vitalii Vorobiov 4a5e9421e6 edje_pick: export aliases and entire dependency list
A lot of cases were missed, cases that are making resulting edj file
useless.
> Now export all aliases
> If group "1" source of group "2" which is source of group "3", it will
> be imported as well!

@fix
2016-12-09 11:52:33 +02:00
Vitalii Vorobiov 39e67b500c edje_pick: use correct id's for exported groups
@fix
2016-12-09 11:50:43 +02:00
Jaehyun Cho 6262cbfb62 cpphash: Fix not to access freed pointer. 2016-12-06 14:48:20 +09:00
Stefan Schmidt 6cf11650c4 edje: svg_loader: make sure we check the return from all _parser_number calls
Instead of nesting this make a bit more sense (at least to me). Also return in
case one of these is not a number.

CID: 1356610
2016-12-05 17:07:39 +01: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
Jaehwan Kim b5e9818c02 edje_pick: add base_scale value to target edj from origin edj 2016-11-25 14:27:37 +09: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
Carsten Haitzler 14aca77bfc fix edje_cc segv when compiling bling bling theme
accessed parts out of range for the part table. check part count first
before checking. fixes segv. @fix

blinblng: http://enform.haxlab.org/files/blingbling_e21.tgz
2016-10-15 11:28:01 +09:00
Jean Guyomarc'h 6687e8b0c0 epp: fix memory corruption when using #warning and #error
The epp instructions #warning and #error would led to a segmentation
fault (invalid free) because the malloced buffer's base pointer was
moved.

@fix
2016-10-05 21:16:06 +02:00
Youngbok Shin ceb63bb202 edje_cc: don't warn when image attributes are missing in inherit_only group
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
2016-09-28 16:02:12 +09: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
Carsten Haitzler f4606d54eb Revert "edje edje_cc_out: use strncpy()."
This reverts commit 6de3b2c5d3.

just dismiss in coverity if the code is not actually wrong
2016-09-22 08:30:37 +09:00
Hermet Park 6de3b2c5d3 edje edje_cc_out: use strncpy().
This change is not much meaningful but avoids an annoying coverity detection.
2016-09-21 15:19:19 +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
junsu choi 8f66497aca edje_decc: modified fclose location
modified fclose location. because of file pointer can become NULL.

Signed-off-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
2016-09-21 09:41:48 +09:00
Jaehyun Cho 42b3bc1e8a edje_svg_loader: Initialize char array.
Initialize char array before calling strcmp().
2016-09-19 19:50:37 +09:00
Jaehyun Cho 0ee0baf94e edje: Fix memory overflow on svg loader.
Initialize temporary index not to cause memory overflow on svg loader.
2016-09-13 17:49:36 +09:00
Carsten Haitzler f37a0398c3 epp - document that fallthrough is intended 2016-09-08 17:30:59 +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
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
Vyacheslav Reutskiy a3236f943d edje_pick:set the correct compression for sample
@fix
Fixes T4314
2016-08-09 14:27:47 +03:00
Vyacheslav Reutskiy f2e1cf4261 edje_pick: set the correct file name for copied sample
@fix
2016-08-09 14:27:47 +03:00
Vyacheslav Reutskiy 164d81f124 edje_pick: don't copy dependencies group if they in the import list
If a dependence group in the import list - don't copy it as dependence,
it make group duplicate and make a recurcive load.

@fix
Fixes T4313
2016-08-09 10:17:31 +03:00
Jean-Philippe Andre 4f98d6a007 edje_cc: Remove unused variable 'got_hash'
got_hash will always be zero at the point where it's read.

Fixes CID 1261439
2016-08-09 11:05:50 +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 7af272d93c edje: Fix handling of polygon and polyline node.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4203
2016-08-01 13:23:44 +09:00
Vyacheslav Reutskiy 5d9cb39911 edje_pick: copy block 'data'
Copy global data from files. Main resoan for it - elementary.
Elementary needs data "version" for load widget styles.

@fix
2016-07-26 15:30:15 +03: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
Vyacheslav Reutskiy 026b7cc495 edje_pick: reset alias flag for copied group
edje_pick make copy of whole group, even if group is alias. So if
group was alias need to reset this flag.

@fix
2016-07-21 14:02:46 +03: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
Vyacheslav Reutskiy 711288b2ea edje_pick: copy dependent group
Parts can use enother groups as source, for example textblock. If source
groups does not exist - group is not valid. This patch extend the group
copy process and copy dependend group too.

@fix
2016-07-19 18:31:01 +03: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
Carsten Haitzler 9f77c5ab55 Revert "edje_cc: Fix minor coverity defect"
This reverts commit 0106455588.

breaks edje_cc.... :( spin 100% cpu building terminology themes
2016-07-13 20:54:04 +09:00
Jean-Philippe Andre 0106455588 edje_cc: Fix minor coverity defect
CID 1261439

An assigned value that is never used may represent unnecessary computation,
an incorrect algorithm, or possibly the need for cleanup or refactoring.

In source_fetch_file: A value assigned to a variable is never used. (CWE-563)

Tested compilation of a few EDC files with no breakage.
2016-07-13 11:57:07 +09:00
Jean-Philippe Andre 82f546fc1f edje_pick: Fix use after free
Fixes CID 1267458 (trying again)
2016-07-13 11:16:33 +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 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
Carsten Haitzler f7ea9373f6 edje_cc - fix new coverity issue
fix CID 1357395
2016-07-09 11:44:35 +09:00
perepelits.m 52df6171e9 edje_player: create scene in the edje_player if there are some 3D-components
Summary: check if the size of scene is bigger than 0x0 and build 3D scene in the edje_player in this case and use "opengl_x11"

Reviewers: Hermet, jpeg, cedric

Subscribers: NikaWhite, Oleksander, artem.popov, cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-07-08 10:49:49 -07:00
Carsten Haitzler b1d9cf8d8d edje cc mo encoding leak - ensure data is freed when setting up encoding
this should fix CID 1306604
2016-07-08 18:53:11 +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
Subhransu Mohanty 9be9da17bf edje/svg: added _edje_svg_node_free() function
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4143
2016-07-07 16:29:21 +09:00
Subhransu Mohanty 80413dda8c svg/loader: use stringshare instead of malloc for storing string.
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4142
2016-07-07 16:27:17 +09:00
Jaehwan Kim 0906506470 edje_pick: realloc bug fix
@fix
2016-07-07 14:30:20 +09:00
Subhransu Mohanty 9d6582413a svg/loader: parse the style attribute in doc node
Reviewers: cedric, Hermet, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4138
2016-07-07 11:52:37 +09:00
Subhransu Mohanty 18fd4453d0 svg/loader: refactored the copy of structure.
Reviewers: cedric, jpeg, Hermet

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4137
2016-07-07 10:42:03 +09:00
Subhransu Mohanty 522b82b026 edje: fix parsing and and visualizing gradients.
Reviewers: jpeg, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-07-06 12:55:44 -07:00
Jean-Philippe Andre 4ee015f755 edje: Remove shadow variable 2016-07-04 20:25:17 +09:00
Jaehwan Kim 3b349e9d71 edje_pick: load just used images.
If the edj is made by partial groups, the images that groups use
should be included.

@fix
2016-07-01 11:33:21 +09:00
Shuhrat Dehkanov 9c69afd535 Fix 'maybe used uninitialized' warning
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
2016-06-27 16:19:43 +09:00
Subhransu Mohanty 96fc367a44 edje: handle named color in svg.
Reviewers: jpeg, cedric

Reviewed By: jpeg, cedric

Subscribers: conr2d, cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-23 10:17:32 -07:00
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 c2fbac0f1f svg/loader : Added parsing support for use and def node.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4078
2016-06-23 17:44:37 +09:00
Subhransu Mohanty d876027564 svg_loader: Fixed the parsing of style attribute in g node as well as inheriting style attribute from parent.
Reviewers: jpeg, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4070
2016-06-23 10:20:44 +09:00
Subhransu Mohanty 3ab15990d3 svg: added support for parsing and showing of polyline data.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4064
2016-06-21 14:42:44 +09:00
Subhransu Mohanty 901e8a0cfc edje: creation of gradient node from data parsing of color property and refactoring of fill and stroke attribute.
Reviewers: jpeg, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-16 16:50:08 -07:00
Subhransu Mohanty 285c387ae2 svg_loader: fixed parsing of transformation attribute
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4048
2016-06-16 15:32:43 +09: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
Subhransu Mohanty 67e400a3c9 svg_loader: Fixed color attribute parser
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4049
2016-06-16 15:26:28 +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 e9802506a0 edje_cc - new vector svg loader - fix bunch of incorrect code that segvs
passing in wrond data type as a void * (no typechecking) like
node->style instead of node as the function EXPECTED node not
node->style

also why malloc strlen of string then strcpy when strdup will do? why?

fix!

still doesn't work. i can't display an svg vector at all.
2016-06-13 20:19:13 +09: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
Jean-Philippe Andre 1f943f29e4 Edje: Fix some compilation warnings 2016-06-09 16:17:43 +09:00
Subhransu Mohanty ef84367fa9 edje : fix the typo in svg loader.
Reviewers: SanghyeonLee, cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4027
2016-06-09 13:26:33 +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
Cedric BAIL 4961586ddd edje: little bit of refactoring, more needed. 2016-06-08 11:18:26 -07:00
Subhransu Mohanty 698135b8e4 edje: add svg support to parse and store a svg file as a vector object in .edj.
Summary:
This is the svg loader which will parse the svg file and store it in a intermediate structure.
It provides the helper function to get EET descriptor to save the structure into eet file.

NOTE: Not all svg attributes are handled yet. but most common attributes are handled .

Reviewers: Hermet, cedric

Subscribers: Hermet, cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-08 11:18:20 -07:00
Jee-Yong Um 69ea4145c9 edje_cc: improve code readability when parsing external params
Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4009
2016-06-02 20:55:10 +09:00
Jee-Yong Um 7265ca0374 edje_cc: fix SIGNAL_EMIT action inheritance error
Summary:
When edje group inherits edje program whose action type is SIGNAL_EMIT
with target, unnecessary parse error occurs.

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-01 10:22:25 -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 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
perepelits.m d200d483ef edje: attaching viewport of camera to the image part
Summary:
According to D3710 new field "camera" in edc was added for IMAGE parts.
It is the name of the CAMERA part to set its viewport as a source of image if no image name is given.

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, artem.popov

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-05-17 05:21:45 -07: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
Jee-Yong Um fff984c96b edje_cc: update reference about LazEDC syntax
Summary:
add programs block to the sample code of LazEDC,
and add comment about possibility to omit "default"
when part description inherits from "default".

Reviewers: Hermet, zmike

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3915
2016-04-25 11:55:18 -04: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
Jean-Philippe Andre ffede186c8 edje_cc: Fix filters inheritance
This was broken in c0f887b429 (2015/10/01).
What happened was: ted->filter is not part of tex->text anymore,
so it didn't get copied over from the parent.

Thanks @zmike for the report and pointing out the bad commit.

Fixes T3467.

@fix
2016-04-19 14:48:35 +09: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
Oleksandr Shcherbina 172cfa0f04 evas.canvas3d: Change shade_mode to shader_mode
Summary:
enum Evas.Canvas3D.Shade_Mode are using for choose relevant shader source code.
So renaming have a sence.
Rename evas_canvas3d_shade_mode_set/get property to evas_canvas3d_shader_mode_set/get
Rename internal fields and functions

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3882
2016-04-14 20:28:20 +09: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
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
Cedric Bail e8bbb29499 Revert "edje: seems like preloading is fixed and we can now run edje_cc in //"
This reverts commit e6a27e13b5.

While preloading itself is fixed, we forgot a little detail there is limit to
the amount of files we can open on any system. This is high enough on Linux that
we never see the issue, but on MacOS X, we can't even build elementary theme.

Reverting this for now and until we have a proper fix for this.
2016-03-21 19:46:30 -07:00
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
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
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
Cedric BAIL e6a27e13b5 edje: seems like preloading is fixed and we can now run edje_cc in // 2016-03-14 15:12:52 -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
Carsten Haitzler 4e29db73c9 edje epp - fix gcc warning about possible unused var usage
gcc now is complaining about out ancient cpp code possibly using
newlines as undefined. this should keep this warning quiet - there
isnt a real performance issue here.

bin/edje/epp/cpplib.c: In function ‘cpp_get_token’:
bin/edje/epp/cpplib.c:4602:15: warning: ‘newlines’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
       else if (newlines > 0)

@fix
2016-03-01 13:25:35 +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
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
Tom Hacohen d9b5ce0192 Edje cc: Fix shadow warnings. 2016-02-16 09:38:36 +00: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
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
Tom Hacohen 28f00a117a Edje cc: Fix use of uninitialised value.
Slash should be initialised to NULL, as if slash was not found in case
we don't even look for it.

Also, further restrict slash's scope.

@fix
2015-12-08 11:44:31 +00: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
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
Vincent Torri 3b44645363 efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:04:36 +01: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
Stefan Schmidt e683a53f92 edje_decc: use void to force empty function parameters
We have to use void in a function declaration if we want no function
parameters. Using just empty parenthesis means the function takes an
unspecified number of parameters.

We had it correct for most declarations and this series fixes it for
the rest.
2015-11-26 17:20:14 +01: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 7974f674aa Evas: Allow edje_decc to work with ETC images
This reuses the internal function data_get, data_put, image_save
respecting the border information and adding support for ETC
formats.

@fix
2015-11-10 16:12:21 +09: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 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
Vincent Torri 0d4942f4e5 edje: use eina_environment_tmp_get() instead of the TMPDIR env variable
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07: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 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 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
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
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
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
Vincent Torri e494c225f7 Edje_Player: disable code unused on Windows. 2015-07-03 16:23:06 +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
Jean-Philippe Andre b676dcf998 Edje: Use array instead of hash for filters data
Yeah that was totally overkill and pure laziness on my side.

Despite having the EO API for the filters still in beta,
I want to the EDC API and EDJ binary formats to stay compatible,
so let's get it right before the release :)
2015-06-30 10:12:13 +09: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
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