Commit Graph

36 Commits

Author SHA1 Message Date
Mike Blumenkrantz f886941b11 api: efl.gfx.size_hints -> efl.gfx.hints
Summary:
these hints are not strictly size-related, so renaming them is more consistent
with their actual function

ref T7563

Depends on D7968

Reviewers: segfaultxavi, cedric, bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7563

Differential Revision: https://phab.enlightenment.org/D7977
2019-02-21 18:43:12 +01:00
Hermet Park d2ec3ce170 efl gfx_path: remove EFL_GFX_PATH_EVENT_CHANGED
Summary:
Here is an additional optmization patch for removing
unnecessary updation of path,

For instance, let's assume this scenario:

If one vg object has 20 path nodes(shapes),
and every single nodes would have 50 path changes.
(like, append_cubic, append_rect, append_xxx ...);
There would 1000 events triggering.

Furthermore, if there are 20 vector objects in one view,
hese events would be triggered 20000 in one frame.

It's insane, actually I could figured out that happens.
and it took a lot of cpu consumption in some vector usages.

efl_gfx_path_commit() is my idea to avoid this.
When path is ready, the path need to get this api call in the last
 to make object changed properly.

@feature

Reviewers: #committers, cedric

Reviewed By: #committers, cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7494
2018-12-28 12:20:15 +09:00
Hermet Park 0e278d1de8 Revert "efl gfx_path: remove EFL_GFX_PATH_EVENT_CHANGED"
This reverts commit 7c38c0c915.

Oops, didn't intend this patch.
2018-12-26 19:32:42 +09:00
Hermet Park 7c38c0c915 efl gfx_path: remove EFL_GFX_PATH_EVENT_CHANGED
Summary:
Here is an additional optmization patch for removing
unnecessary updation of path,

For instance, let's assume this scenario:

If one vg object has 20 path nodes(shapes),
and every single nodes would have 50 path changes.
(like, append_cubic, append_rect, append_xxx ...);
There would 1000 events triggering.

Furthermore, if there are 20 vector objects in one view,
hese events would be triggered 20000 in one frame.

It's insane, actually I could figured out that happens.
and it took a lot of cpu consumption in some vector usages.

efl_gfx_path_commit() is my idea to avoid this.
When path is ready, the path need to get this api call in the last
 to make object changed properly.

@feature

Reviewers: #committers, cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7494
2018-12-26 19:29:10 +09:00
Jaehyun Cho 4f9c8d524c efl_ui_theme: Introduce Efl.Ui.Theme class
Summary:
Efl.Ui.Theme class is required to support language bindings.
Efl.Ui.Theme works based on current elm_theme features.

This patch fixes T7357.

Reviewers: segfaultxavi, cedric, lauromoura, woohyun, zmike, SanghyeonLee

Reviewed By: segfaultxavi, SanghyeonLee

Subscribers: SanghyeonLee, herdsman, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7357

Differential Revision: https://phab.enlightenment.org/D7244
2018-11-20 13:56:37 +09:00
Youngbok Shin 32504a8cfa elementary textpath: support legacy APIs
Summary:
Efl.Ui.Textpath was added when we were developing new interfaces.
So, basically, it does not support 'legacy' APIs. ex) elm_textpath_add
But, in Tizen, the legacy APIs had been delivered in old version of EFL.
To reduce maintainning cost between the platforms, this patch will be helpful.
@feature

Test Plan: N/A

Reviewers: Hermet, woohyun, zmike, cedric, herdsman

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7033
2018-10-12 15:42:31 +09:00
Hermet Park bd3298dead elementary textpath: code refactoring.
Don't twist code unnecessarily.
logically same, round() is enough.
Differential Revision: https://phab.enlightenment.org/D6501
2018-07-05 23:01:00 +02:00
Hermet Park 9a25bad5bf elementary textpath: use job for deferred drawing task.
textpath performed drawing task multiple times unnecesarily.
It should be performed only one time after all setting up.
2018-05-28 15:39:23 +09:00
Hermet Park d1cce82565 elementary ui_textpath: remove autofit api.
Toggling this option is unlikely happened by user because with autofit=false,
it doesn't gurantee readable visual text.

We don't need this stupid api yet. So remove it.
2018-05-28 15:23:57 +09:00
Youngbok Shin 8d249c9445 elementary textpath: update Evas map when text is updated
Summary:
Evas map was not updated when text was updated.
@fix

Test Plan:
1. Run the following test case.
  elementary_test -to "efl.ui.textpath"
2. Toggle short text.
3. See a long line from the end of text which is wrong.
  If you change angle, Evas map will be updated properly.
  But, it should be updated when text is updated.

Reviewers: raster, cedric, thiepha, Hermet

Reviewed By: Hermet

Subscribers: Hermet, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6216
2018-05-28 14:48:41 +09:00
Youngbok Shin 455775c2e3 elementary textpath: improves text rendering quality of curved text
Summary:
There was wrong logic for calculating # of slices, dt, dist of each segment.
It caused bad rendering quality by putting too much slices on small text.

In addition, textpath didn't care about smoothness of curve's slope changing.
The patch fixes to check differences of previous points and next points for Evas Map.
So, textpath can show more smoothly curved text.

Also, it fixes "autofit" bug when text is much huge than given circle's size.

@tix

Test Plan:
- I'll attach screenshots for comparing rendering quality.
- To see "autofit" bug.
1. Run the following command.
   ELM_ACCEL=gl ELM_SCALE=2.0 elementary_test -to "efl.ui.textpath"

2. Toggle "autofit" check box.
3. See the bug case. Textpath can't show all text properly.

Reviewers: raster, cedric, thiepha

Subscribers: #committers, zmike

Tags: #efl

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

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-25 09:59:04 -07:00
Cedric BAIL 8a513a522e efl: major rewrite of efl_part.
The interface efl_part_get should not be directly called from C, but the efl_part
wrapper should. It rely on efl_noref to properly destroy the object. Binding can
control the lifecycle of the reference the way they want by either calling the
wrapper or efl_part_get directly. It also means that the ugly ___efl_auto_unref_set
doesn't need to be exposed outside of EFL anymore.

Differential Revision: https://phab.enlightenment.org/D6098
2018-05-24 16:02:18 -07:00
Taehyub Kim 6e49db0739 efl theme: remove the elm legacy name of efl ui theme
Summary: remove the elm legacy name of efl ui theme

Test Plan: run elementary_test and test efl ui widget cases

Reviewers: Jaehyun_Cho, woohyun, cedric, raster, jpeg

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5934
2018-04-26 19:41:03 +09:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Jean-Philippe Andre 1fdbb00e22 efl: Move VG-specific change event to efl.gfx.path 2017-12-13 13:47:48 +09:00
Jean-Philippe Andre 2f465e1fbb widget: Rename EO APIs to efl_ui_widget_xxx
This only changes the eo_prefix for APIs.

Ref T5363
2017-10-24 14:30:21 +09:00
Thiep Ha 65a87eb575 textpath: get the right size of text object
Recent change to use EINA_SIZE2D made the size be gotten incorrectly.
This corrects it.
2017-10-18 10:51:04 +09:00
Carsten Haitzler 66cd5cf2d5 efl ui textpath - remove more unused vars 2017-09-29 14:52:04 +09:00
Carsten Haitzler 522488eed9 efl ui textpath - remove unused vars due to dead code removal
fix warning
2017-09-29 12:32:10 +09:00
Carsten Haitzler 35b65e0643 efl ui text - remove logically dead code
it is indeed pointless code. fix coverity CID 1380544
2017-09-28 15:28:00 +09:00
Carsten Haitzler bee7bf5767 efl ui text - fix resource leak of strbuf and pointless buffer code
edje_object_part_text_style_user_push() doesnt need you to
stringshare_add a string... some other code did it because it "gets"
the string from an obj that might free/delete the string on push etc.
or before so it keeps a copy but then it stringshare_del's it
anyway... the _textpath_ellipsis_set() code creates a trsbuf that
wasn't freed if enabled was false and it never stringshare_del'd the
string is stringshare_added... all of this was pointless code anyway.
you could just pass the constant string directly.

fixes CID 1380543
2017-09-28 15:28:00 +09:00
Jean-Philippe Andre 0339ad7740 elm: Move base implementation for efl_part in widget
This means that ALL part handles inherit from the base part class
Efl.Ui.Widget.Part. Layout is the only exception where Efl.Part is
specially overridden.

This is a first step towards generic part APIs, including background in
all widgets.
2017-09-21 12:27:33 +09:00
Jean-Philippe Andre 3bff7363b5 efl: Use Eina.Size2D for size hint min 2017-09-18 14:42:52 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Jean-Philippe Andre f3eff6eb3e efl: Introduce Eina.Rect and switch EO APIs to it
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.

But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.

Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).

@feature
2017-09-18 13:22:52 +09:00
Jean-Philippe Andre 13da5e980e efl_gfx: Use Eina.Rectangle for geometry (EO)
This saves a few lines already (without even having the proper helpers
for stack rectangles).
2017-09-13 18:03:34 +09:00
Jean-Philippe Andre d5a31f3f30 edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.

As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.

Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.

Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.

This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)

Ref T5315
Ref T5306
2017-09-13 13:53:49 +09:00
Thiep Ha 6a8cf155a3 textpath: correct map point number
The last map point is not counted if seg is too small.
Test: change start angle to 3, the last segment is missed.
2017-09-05 14:19:59 +09:00
Thiep Ha 54d1cc38a1 textpath: remove legacy api support 2017-09-05 12:09:08 +09:00
Thiep Ha 967e94dc6b textpath: do not process line if failed to allocate segment 2017-09-05 12:02:01 +09:00
Thiep Ha b55cb4feb1 textpath: correct data gets from path
values of px0, py0 should be stored from previous command.
2017-09-05 11:55:07 +09:00
Jean Guyomarc'h 172cf67d16 elm: fix uninitialized variables 2017-08-29 20:41:40 +02:00
Thiep Ha b0d185ac12 Introduce text on path widget
Text on path (textpath) allows application to make text follow a path.
The path can be a efl_gfx_path or a circle.

Thank hermet for initializing this work.

@feature
2017-08-29 19:07:01 +09:00