Commit Graph

186 Commits

Author SHA1 Message Date
Davide Andreoli 6653ce2306 edcref: be consistent wrt params 2014-08-08 10:27:26 +02:00
Davide Andreoli 34c75a29f6 Edcref: and finally apply a cool style
Now the edc ref is decently readable
2014-08-08 02:30:33 +02:00
Davide Andreoli a8a7158801 edcref: fix the base_scale property docs
base_scale is a property, so document it propertly
Also added missing @since
2014-08-08 02:30:33 +02:00
Davide Andreoli ba7ea64d97 edcref: review all the @since usage
* put them inside the @property block they belongs
* do not show micro version (1.7 instead of 1.7.0)
2014-08-07 14:41:25 +02:00
Davide Andreoli 25ce050920 edcref: quick access list: fix a link and make it more compact 2014-08-07 13:21:31 +02:00
Davide Andreoli 657d973858 edcref: unbreak formatting of the page
Every @block need a @context, or the table will broken up and formatting will be bad.

Also be a bit less redundant
2014-08-07 12:28:46 +02:00
Davide Andreoli 4e5d70511a edcref: small typo in doc 2014-08-07 11:01:36 +02: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
Daniel Kolesa 23761ed627 edje_cc_handlers: fix coverity defects
Fixes CID 1193224, 1193225, 1193226, 1193227, 1193230 (resource leak)
2014-08-04 10:26:06 +01:00
Jaehwan Kim 7e5d2606cc edje: Add dpi feature.
Summary:
This dpi is used to get the scale for each collection.
If each collection has a described dpi, it calculates a proper scale
based on the dpi and dpi which is described in the collection.

@feature

Test Plan:
If add dpi to collection of edc, the edje will save the value as the dpi of the collection.
For example, if the dpi of your device is 100, you just set dpi: 100 in the collection of edc.
If the edj is loaded in another device(dpi is 200), it will scaled 2 times.
It is possible that the described dpi of application and theme are different.
In that case, application and theme have a different scale.
It makes the edj that made in different environment works in one device.

Reviewers: seoz, zmike, JackDanielZ, Hermet, woohyun, cedric, raster

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1190
2014-07-24 14:50:25 +09:00
Jean-Philippe Andre 8ce52c2380 Edje: Add support for ETC1+Alpha
If the image is not opaque and etc1 is selected, choose
ETC1_ALPHA as encoding format.
2014-07-11 16:40:34 +09:00
Vorobiov Vitalii 49344287ac Documentation: adding missed documentation to edcref (map.color param)
Summary:
There is param (of the map block in part's description) that allows user to
set a color for specified vertex/point of that part.
That param was undocumented so actually no one know that this param is exist and can be used in edj file.

Two main fixes:
- adding documentation for map.color param in edc reference.
- adding .edc source code example for seeing how map.color param works.

@fix

Reviewers: cedric, Hermet, raster, seoz

Reviewed By: cedric

CC: cedric, reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D1083
2014-06-24 17:11:09 +03:00
Jean-Philippe Andre b06af7ace0 Edje: Add LOSSY_ETC2 to Edje_Edit
Found out using edje_inspector...
2014-06-18 16:28:37 +09:00
Jean-Philippe Andre e8d7c46253 Edje: Add support for ETC2 through LOSSY_ETC2 images
Declare your images as LOSSY_ETC2 to encode them as ETC2.
Add options to edje_cc to disable etc2.
Use ETC2 support from Eet.

@feature
2014-06-13 17:58:08 +09:00
ChunEon Park dc945ccb55 edje/epp - clean up memory allocated. 2014-05-27 22:17:01 +09:00
ChunEon Park b2841c0db6 edje/edje_cc - intensive null check. 2014-05-27 22:00:59 +09:00
Mike Blumenkrantz 894c36ff11 de-elipsis edje
the word is "ellipsis". it's bad enough that we have released misspelled api, but we can at least spell things correctly internally.
2014-05-13 16:20:41 -04:00
Mike Blumenkrantz 03edef876f edje_cc now prints helpful warning messages when it compiles broken text parts 2014-05-13 16:05:39 -04:00
Mike Blumenkrantz 800bcde9d7 edje_cc should throw errors when inheriting a part from the same part 2014-05-13 11:15:02 -04:00
Mike Blumenkrantz a84f19beb7 redo lazEDC parsing a bit to fix desc.state omission 2014-05-09 15:58:25 -04:00
Mike Blumenkrantz 6a7b0af847 lazEDC missing keywords for scale/noscale 2014-05-09 12:33:47 -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 14fc7d2a36 lazEDC syntax update: imprecise -> noprecise 2014-05-09 12:21:45 -04:00
Mike Blumenkrantz c911ac2fb9 call edje_cc link combining when popping the group so the last group doesn't not get linked 2014-05-08 21:04:28 -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
Mike Blumenkrantz f482aeb43f fix edje_cc multiple link usage on same description 2014-04-26 02:16:55 -04:00
Mike Blumenkrantz b35dfc5f05 edje_cc now (more) correctly handles text filter inheriting/resetting 2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 5f376fde36 edje now correctly supports text.source and text.text_source for swallowed parts
fix T1186
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz d498f6f723 edje_cc no longer has "slave" lookups
these appear to have been replaced many centuries ago with copied_X lookups
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz bce864b8dd edc parts.alias documentation is now comprehensible and useful 2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 939f2eea7f edje now has the group.script_recursion flag for permitting unsafe embryo recursion
this is enabled for all scripts within a group, and it should only be used if you:

1) know what you are doing

2) know why this is unsafe (T905)

@feature
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz c5b1598e6e edje_cc now supports part.description.link for single line state changes
@feature
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 83832d6b1d edje_cc now supports group.program_source for specifying a default source in programs
this allows for program.source to be omitted 99% of the time since most sources in an application/library will be the same within a single group

@feature
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz fd8c9532a1 edje_cc now has the program.groups and X.target_group keywords for target grouping
this allows any number of parts/programs to be added by name into a logical grouping which can then be referenced inside a program.

eg.

before
------

program { signal: XYZ; source: 123;
   action: STATE_SET "default";
   targets: "sup" "dawg" "parts" "up" "in" "dis" "progrizzle";
}

program { signal: ABC; source: 123;
   action: STATE_SET "notdefault";
   targets: "sup" "dawg" "parts" "up" "in" "dis" "progrizzle" "tooizzle";
}

======
after
------

target_group: "default" "sup" "dawg" "parts" "up" "in" "dis" "progrizzle";

program { signal: XYZ; source: 123;
   action: STATE_SET "default";
   group: "default";
}

program { signal: ABC; source: 123;
   action: STATE_SET "notdefault";
   group: "default";
   target: "tooizzle";
}

@feature
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz be9b27ac99 edje_cc now errors immediately on syntax errors triggered by lack of parameters 2014-04-25 10:52:15 -04:00
Mike Blumenkrantz c8cc776fb1 edje_cc now supports targets for SIGNAL_EMIT actions
this is much more intuitive than somehow knowing you're supposed to add a ':' between part:signal

@feature
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 6b712f6f02 edje_cc now supports the group.inherit_only attribute
use this for flagging a group as a "virtual" group which is only used for inheriting

@feature
2014-04-25 10:52:14 -04:00
Mike Blumenkrantz 7eb703fdde edje_cc now supports "lazEDC", a more concise version of EDC
in today's modern world of fast-paced, HTML5-driven, C++-riddled
development, nobody wants to spend hours typing out long words like
"description" or "mouse_events" or "name". there's no time for it
and certainly nobody is going to allocate budget for this sort of
keyboard-related nonsense.
enter lazEDC: the solution for edje-loving keyboard jockeys everywhere.
by breaking the parser of edje_cc with the strength of 10 frenchmen,
new, shorter keywords such as "nomouse" can be used in place of lengthy,
rambling statements like "mouse_events: 0", and things like

part { name: "clip"; type: RECT; description { state: "default" 0.0; }}

can now be written as

rect { "clip"; }

with the exact same effect.

initial tests show that complex and terrible edc files such as the infamous
"genlist.edc" can be reduced in size by over 15% using these new features.

see edcref for docs, and genlist.edc for examples

@feature

@awesome
2014-04-25 10:52:14 -04:00
bluezery 785cdcf689 edje: Remove build warnning by clang
Summary:
This can fix below warning:
bin/edje/edje_cc_handlers.c:9839:42: warning: equality comparison with
extraneous parentheses [-Wparentheses-equality]

Reviewers: raster, cedric, seoz

Reviewed By: seoz

CC: cedric

Differential Revision: https://phab.enlightenment.org/D792
2014-04-25 14:27:15 +09:00
Mike Blumenkrantz 7355f67c1f revert edje ellipsis doc changes
if we're reverting functional changes, then it's probably a good idea to revert the accompanying documentation
2014-04-23 09:28:23 -04:00
Carsten Haitzler f442c21c04 partly revert mike's ellipsis changes as they break edje
partly revert adcc323291 as the default
ellipsis value was 0 as per the document, and must stay, as changing
this breaks edc descirptions as now text is no longer ellipsised by
default. this ACTUALLY broke titlebars on the default theme - just
have a title that is too long and see how it no longer goes:

This is a title he...

it instead covers the screen for as long as the title is.

if you want -1 for ellipsis... then set it. :)
2014-04-23 19:57:15 +09:00
Mike Blumenkrantz adcc323291 edje: the ellipsis fuckup preservation commit.
what a huge, colossal cock-up of a clusterfuck. it's a good thing nobody ever uses ellipses or edje. otherwise we'd probably get complaints about this kind of thing.
2014-04-22 20:21:46 -04:00
Jean-Philippe Andre f6eae69eb2 Edje: Use LOSSY_ETC1 instead of LOSSY
Add a new flag in EDC files to specify ETC1 compression
should be enabled. It follows the same rules as the
current LOSSY flag for JPEG compression.

@feature
2014-04-18 16:50:01 +09:00
Jean-Philippe Andre 7ff410b9f6 Edje: Fix ETC1 encoding with EET and Edje
There were a few critical issues:
- Invalid pointer arithmetics on the input data (char vs. int)
- Invalid logic in the pixel duplication code

All of these due to bad copy and paste :(

Also, use LZ4HC instead of LZ4 when compression is enabled.
ETC1 encoding is so damn slow you won't see the difference between
LZ4 and LZ4HC compression times.
2014-04-18 15:43:07 +09:00
Jean-Philippe Andre d531816b12 Edje: Add support for ETC1 encoding
Edje will compress images as ETC1 provided that they don't
contain any alpha AND the command line includes -etc1.
2014-04-18 15:43:04 +09:00
zmike 2373269ad7 reformat edje_player
ffs these tabs
2014-04-07 13:15:40 -04:00
Vorobiov Vitalii 85f8661f45 edje_cc: fix group inheriting with scripts. (group.script and .program.script)
After doing some edje_edit manipulations there was a problem that
after edje_decc of changed EDJ file it wasnt able to compile again, because some of scripts
weren't inherited.
The problem was in Code and Code_Script structure.
There is "shared" ("script") field and "original" field that contained a string with embryo script code.
After inheriting whole group, "original" field wasn't copied, so it wasn't able to write
the script into resulted EDJ file (look at edje_cc_out:1407).
@fix

Reviewers: cedric, seoz, raster

Reviewed By: cedric

CC: reutskiy.v.v, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@free.fr>
2014-04-01 22:00:13 +09:00
Mike Blumenkrantz c5564213ea edje_cc should probably handle sequenced scripts successfully 2014-03-31 16:45:05 -04:00
Mike Blumenkrantz 01b54c75f1 edje_cc part description state name error clarification 2014-03-31 16:02:41 -04:00
Mike Blumenkrantz 5ffef1e853 edje_cc no longer allows buggy/unexpected behavior when inheriting parts
previously we allowed users to not specify the state names for non-default description states. this guaranteed crazy behavior during inheritance since it was impossible to properly reference such states.
2014-03-31 15:30:48 -04:00