Commit Graph

121 Commits

Author SHA1 Message Date
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
Amitesh Singh 59681c3311 edje: fix edje RTL description in case of custom state of a part
Summary:
In case of RTL, the "custom" state properties does not apply. It happened because we don't copy the latest src to
dst in set_state(PART:.., "custom", 0.0); in case of dst is already populated.
We should copy the updated src to dst whenever we set the new custom description.

@fix

Reviewers: cedric, raster, jpeg, zmike, jaehwan

Subscribers: kimcinoo, seoz, jpeg

Differential Revision: https://phab.enlightenment.org/D3394
2015-12-03 11:26:10 +05:30
Carsten Haitzler b7d2f4f814 efl - edje - fix edje calc to avoid eo calls when object doesnt change
in many cases edje dumbly calls eo_do() or evas_object_xxxx on objects
to set up their porperties when the part never uses that thing at al -
eg filters. the obnject never had filters and will not have them n3ext
- why always set filter to null every time? skip when not needed for
speedups.

so this fixes over-zealous calling whihc adds overhead that is not
needed causing battery drain and cpu usage, heat creation etc. etc.

@fix
2015-10-21 20:16:06 +09:00
Carsten Haitzler e5e6c6b8eb edje - fix some horrible misleading indenting in edje calc.
just whitespace fixups
2015-10-20 18:07:21 +09:00
Shilpa Singh 924953591d edje: comparision with non-scaled min values issue fix.
Summary:
In a different scaling environment, wrong comparison of min values causes resize issue as original size is compared instead of scaled size.

Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
Signed-off-by: Subodh Kumar <s7158.kumar@samsung.com>

@fix

Test Plan:
Create a layout with some min size and swallow a resizable layout inside the layout.
the parent layout will not expand even when the height has crossed its min size.

Reviewers: cedric, tasn, raster

Subscribers: subodh6129

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 11:12:26 -07:00
Jean-Philippe Andre 1bb294ba1c Edje: Fix invalid loading of snapshot parts 2015-10-01 20:10:54 +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 a181c32cbe Edje: Fix IMAGE filters
Some invalid logic made filters work only in a rare situation.

@fix
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 c0f887b429 Edje: Move internal struct filter around (refactor) 2015-10-01 20:10:54 +09: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 6e29489054 Edje: Use bsearch() to find filters as fast as possible
edje_cc ensures that the filters are in order by name
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 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
Daniel Kolesa e4780d7b7d edje: fix shadow warning 2015-06-29 14:13:58 +01:00
Jean-Philippe Andre 0446619355 Evas filters: Mark API as @beta
Until we're happy with it, keep the API as beta.

The EDC support should not change, and the Lua either, but the
API could potentially still change to accomodate for new needs
(vector graphics, anyone?). If we're happy with the current
interface, then we can remove the @beta flags.
2015-06-25 14:36:10 +09:00
Jean-Philippe Andre d15308efef Evas filters: Add explicit exec flag in data_set
This flag should be set iif the string passed is to be executed
rather than assigned. This is used to pass complex arguments
as data, like tables (eg. color class).
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 15afea293f Edje & evas filters: Properly pass data from EDC to Lua
Also fix a few issues
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 0e8f890dfb Edje & evas filters: Add extra data from EDC to Lua program
This also supports color classes (really rough implementation for
now, but the API should remain stable).

@feature
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 84e3dd5c34 Evas filters: Add name to the filters
Deep down internally there was already a name, but no API could
really set it properly.
Here Edje will set the name of the filter based on the part name
or the data item name if relevant.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 64fd278c62 Evas filters: EO-ify the filters API
This creates the new interface
 Efl.Gfx.Filter

And the implementation is a mixin (evas_filter_mixin.c):
 Evas.Filter

All the filter rendering code has now been moved to this
new file. TODO: Merge image filtering.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre a18107309d Edje: Factorise filter code for TEXT and IMAGE
TODO: eo-ify the filter API properly and stabilize it.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 225c0f937a Evas filters: Pass edje state name & value to the filters
From Edje, pass the current state info (name and value) as well
as the next state and the transition position when applicable.
2015-06-25 14:36:08 +09:00
perepelits.m 3671506ad3 edje: add of edje-3d to edje_calc.c
Summary: Adding of Mesh_Node, Light and Camera to _edje_part_recalc.

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-22 11:17:29 +02:00
Jean-Philippe Andre 75ec3a7338 Edje: Add clip as a property of a part description
Since masking, for performance and themeing reasons, it becomes
interesting to be able to switch clippers on the fly. In particular,
switching from an IMAGE mask to a standard RECT clipper can save a
lot of power when masking is not required.

This new flag "description.clip_to" will behave a bit like a mix of
rel.to and visible:

- It points to a part by name, just like part.clip_to. This will
  override the clipper set by the part, or override the default clipper.

- Like "visible", it can not be interpolated between two values, so
  it will switch only at the end of a transition.

- By default there is no clip override, which means Edje will fallback
  to the part's clipper, if any, or the base (group's) clipper.

NOTE:
- Since a clipper that does not clip anything becomes a standard object,
  it is visible and rendered. This will in 99.999% cases not be the
  intended behaviour. Currently we can simply use a transparent RECT
  in order to always have something clipped by the clipper, but this is
  a hack and this will trigger rendering of masks in their surfaces even
  when they are not actually used.
  Ideally, there should be a flag indicating to Edje & Evas that an object
  should be considered a clipper in all situations, and never be rendered
  on screen.

TODO:
- Support Edje Edit
- Add Embryo & Lua functions
- Add support in edje_convert
- Add Edje/Evas flag to mark objects as "no_render"

@feature
2015-06-15 16:59:41 +09:00
Mike Blumenkrantz 172a0ccf0c edje: reformat all C files
this has been unreadable for years due to the french tabber.
2015-06-08 14:43:00 -04:00
Avi Levin b563efc52f edje: porting evas smart callbacks to eo
It's the first stage of replacing calls of evas_object_smart_callback_add/del/call
with eo_callback_add/del/call.
This will reduce the use of legacy events and callbacks lists in
smart_object which in turn will improve performance and reduce memory
use.
2015-06-07 09:55:41 +03:00
Sebastian Dransfeld 3433c1449e edje: rename variable
Give variable a name which better describes its purpose.
2015-05-11 13:34:10 +02:00
Cedric BAIL 7ba7ed4a1c efl: add Efl.Gfx.Fill and migrate Evas.Image to it. 2015-04-03 16:23:24 +02:00
Cedric BAIL 651436f410 efl: rename visibility to visible.
After discussion bindings and people in general prefer visible.

T2035
2015-04-03 16:23:19 +02:00
Cedric BAIL c08f8e26a6 efl: add Efl.Gfx.Base and fix inheritance for Evas_Object. 2015-04-03 16:23:17 +02:00
Andrii Kroitor 7271c99b3c edje_calc: fix SEGFAULT on new parts
Summary: new part added with edje_edit_part_add has NULL previous description

Reviewers: cedric, zmike, seoz, Hermet, raster

Subscribers: FurryMyad, cedric, reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D2272
2015-04-01 07:25:12 -04:00
Mike Blumenkrantz 89809bdf55 edje calc now more correctly forces recalc for child groups on state change
in the event of fixed size -> non-fixed size (eg. previous commit optimization),
this calc would no longer occur, so we need to queue it. also if fixed.w or
fixed.h changes value for a group part, we must recalc the group to ensure correct
sizing occurs
2015-03-31 23:31:11 -04:00
Mike Blumenkrantz 15f8d943aa edje calc no longer performs calculations for group parts of fixed size > 0
when I said > 0 in the last commit message, I was thinking ahead to this commit
which I knew I would later have to make, but had not yet written because I had not
spent the requisite number of hours debugging the code to know that I needed to
have the check in both the code and the commit message

ref 3a451650d2
2015-03-31 23:31:11 -04:00
Mike Blumenkrantz 20350a8006 edje calc no longer forces proxy part source calcs for currently-hidden proxies
this saves a bit of calc time when a proxy part is not currently visible
2015-03-31 19:16:54 -04:00
Mike Blumenkrantz 3a451650d2 edje calc no longer performs calculations for group parts of fixed size
if the min/max of a part are identical and > 0, the part's min size is guaranteed
to be this size. there is no need to perform expensive recursive calcs here
2015-03-31 19:16:54 -04:00
ChunEon Park df5f9f7c55 edje: apply scale prior to rotation
As my experience, this tranform is likely expected by user.
2015-03-02 20:19:49 +09:00
jiin.moon 4673dbeb4b edje: Adding the zoom effect of map to edje
Summary:
Support zoom effect of map in edje
@feature

Reviewers: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2068
2015-03-02 20:19:01 +09:00
ChunEon Park 382c41e42d edje: support anti_alias option
set anti_alias in part section.
default is enabled.

part { name: "test";
   type: XXX;
   anti_alias: 0;
   ...
}

@feature
2014-12-24 16:29:49 +09:00
ChunEon Park 956754ee57 edje/edje_calc: clean up code
remove duplicated.
2014-12-24 14:51:03 +09:00
Jaehwan Kim 8ea9bc7ba0 edje: Set the default image in image set.
If there's no suitable image in image set, set the first image among
the set.
2014-11-18 17:13:38 +09:00
Jaehwan Kim 9aba5eb346 edje_calc: fix image set bug.
When the image is changed, the border should be reseted.

@fix
2014-11-10 21:01:08 +09:00
Jaehwan Kim 495be8b294 edje_calc: add null check. 2014-10-31 15:15:39 +09:00
Jaehwan Kim 782c896f5a Edje_calc: set the image set border again after resize.
_edje_real_part_image_set can change the image of part,
if the part use the image that is set by image set.
If the image is changed, the border should be changed.

@fix
2014-10-28 15:50:41 +09:00
Jaehwan Kim c567f0ba9f edje: fix the image set bug.
Summary: Before using the parameter ep->param1.set, it should be set.

Test Plan:
 diff --git a/data/themes/edc/elm/button.edc b/data/themes/edc/elm/button.edc
 index 097ce85..34a2b98 100644
 --- a/data/themes/edc/elm/button.edc
 +++ b/data/themes/edc/elm/button.edc
@@ -3,6 +3,15 @@ group { name: "elm/button/base/default";
    alias: "elm/button/base/naviframe/back_btn/pager";
    images.image: "button_normal.png" COMP;
    images.image: "button_clicked.png" COMP;
+   images {
+      set {
+         name: "button_normal";
+         image {
+             image: "button_normal.png" COMP;
+             size: 0 0 9999 9999;
+         }
+      }
+   }
 #define ICON     1
 #define LABEL    2
 #define MASK     3
@@ -74,7 +83,7 @@ group { name: "elm/button/base/default";
    parts {
       image { "base"; nomouse;
          desc { "default";
-            image.normal: "button_normal.png";
+            image.normal: "button_normal";
             image.border: 4 4 3 5;
             image.middle: SOLID;
             rel1.offset: -1 0;

and print the value ep->param1.set about "base" part of "elm/button/base/default" group before it is used.
It has a NULL at first time.

Reviewers: raster, jinsol, herb, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-10-18 13:56:38 +02:00
Cedric BAIL 41fab84f83 edje: make edje map have the same behavior has visibility.
It is in fact more coherent to follow the logic of visibility for map to.
So you don't require a specific state to finish your animation before turning
map off.
2014-08-21 16:10:54 +02:00
Tom Hacohen 69219fe1e2 Efl interface: Add image interface and start using it. 2014-08-21 11:02:11 +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
Daniel Kolesa 43e2349203 eolian/generator: public api func name deduplication, spank tasn if it breaks 2014-06-20 17:09:03 +01:00