Commit Graph

581 Commits

Author SHA1 Message Date
Daniel Hirt 4a905a22a4 Canvas image: add Efl.Canvas.Text.Factory + use in Ui.Text
This interface has a simple 'create' method to create Efl.Canvas.Object
given a key.
This is used higher-up in Ui.Text in the next commit.

Ui text: add ability to set item factories

Added API to set an item factory object.
This is similar to the previous item providers (that worked with
callbacks).

You instantiate a factory object and set it on the Ui.Text object.
Each factory implements the "create" method from
Efl.Canvas.Text.Item_Factory.

This also includes 3 public factories (Image, Emoticon and Fallback):
  - Image factory: creates images from added entries (key strings)
  - Emoticon factory: creates emoticons by querying the theme
  - Fallback: creates image, then falls back to emoticon

If no factory is set, then the fallback (internal) factory is used.

See the added "Ui.text Item Factory" test in elementary_test for an
example of usage.

@feature
2018-01-18 10:20:28 -08:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Jean-Philippe Andre 71ee800521 efl: Merge Flipable and Orientation
No need to split: those two are used in all the same classes, since the
split between Orientation and Ui.Dir.

Note that the enum types remain in the main namespace.
2018-01-18 17:29:28 +09:00
Jean-Philippe Andre 6296d3815f vg: Fix warning (unused function) 2018-01-18 17:25:15 +09:00
subhransu mohanty 2a31883f5a efl/vg: Refactor the svg path handling and interpolation.
Summary:
This patch is taken from the tizen branch

1. Take care when the locale is different than POSIX.
See: strtod, strtol

2. Interpolate  all the property of a shape.

Reviewers: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5740
2018-01-17 14:54:18 +09:00
Daniel Kolesa dd2e579fec eolian: do not require unit for expr eval APIs
The necessary information is now stored directly in the expr
during database validation.

Also enable expr validation for params.
2018-01-16 16:37:52 +01:00
Sungtaek Hong 588995da31 efl_playable: split Efl.Player interface to Efl.Playable interface
Summary:
Efl.Player interface simply provides play functions,
but another interface which indicates Efl.Player will play is also
needed.

Test Plan: Run elementary_test->Efl.Animation tests

Reviewers: woohyun, conr2d, Jaehyun_Cho, jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5662
2018-01-16 22:04:55 +09:00
Amitesh Singh 44b6aa16c1 Efl.Gfx.Color: add color_class_code.set/get{} method 2018-01-02 15:41:34 +09:00
Andy Williams 77dd065c52 docs: Update efl interface eo files for grammar and readability
Author: Nate Drake
2017-12-22 10:41:18 +00:00
Amitesh Singh e2cb16c78b Efl.Gfx.Color: add color_code{}
color_code allows user to pass/get the color hex string
(e.g. efl_gfx_color_code_set(o, "#FFAA22CC"))

Also make this interface as mixin class.
2017-12-22 13:29:20 +09:00
Amitesh Singh 9db0ec554b interface: add Efl.Gfx.Color interface for color related APIs
This would eventually turn into mixin class later after adding
more color related helper functions.
2017-12-22 13:29:20 +09:00
SangHyeon Lee 0f16a06710 interface : change efl_pack_grid and efl_ui_grid to efl_pack_table and efl_ui_table
Summary:
Change name of 'grid' to 'table' for matching on common ui naming
and avoiding confusion with 'gengrid' and 'grid view'.
grid will be introduced as grid image view after.

Test Plan:
checked make & make install
checked make check - there are errors but not related with these changes.
checked make examples - there are errors in cxx but not related with these changes.
checked make discheck - failed
test in elementary_test with Efl.Ui.Table and Table_static.

Reviewers: raster, cedric, jpeg, felipealmeida

Differential Revision: https://phab.enlightenment.org/D5668
2017-12-19 14:25:08 +09:00
Wonki Kim 47bf356435 scroller: Introducing Efl.Ui.Scroller
Summary:
scrollable widgets had a interface_scrollable as a mixin so that the
widgets had a 'is-a' relation with interface_scrollabe.  however, new
scroller concept don't have 'is-a' relationship, but 'has-a'
relationship.  scrollable widgets should have a scroll manager inside
them, then scroll manager handles event from user and api
implementations.  and also we cut the features such as paging because
there will be aka 'elm_pager'.

we are expecting that the new concept make us to maintain the scroller
easier.  please excuse for many unorganized code and logics. : (

[contained commit]
scrollable: add efl_ui_scroller example
scrollable: refactoring for behavior in case of multiple scroller
scrollable: remove repetitive scrollbar code.
scrollable: combine calculating bounce distance code.
scroll_manager: mouse up function refactoring
scroll_manager: mouse move function refactoring
scroll_manager: warp animator wip
scroll_manager: fix denominator value when calculating flicking behavior.
Fix to disconnect bounce animator once animation is done
gather duplicated animator drop logics
gather duplicated conditions
Rearrange prototypes and append comment
Add manipulate functions for animators
scroll_manager: change member_add function.
scroll_manger: apply mirroring logic
scroll_manager: apply scrollbar
apply API to scroller widget
scroll_manager: apply scroll event callback
Change logics for all about scroll animating
efl_ui_pan: add efl_ui_pan
scrollable:  change content_min_limit to match_content
scroll theme: apply overlapped scrollbar
+ many others!

Reviewers: akanad, woohyun, cedric, jpeg

Subscribers: jenkins, cedric, jpeg

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

Note by @jpeg:
Unfortunately this patch comes in a massive single blob, after too many
rebase operations. It has now come to a point where I think the API is
nice and it works as I'd expect.
Now I only wonder how applicable this will be for Efl.Ui.List. As we can
see Photocam (legacy and unified API) could be transformed to use this
new API.
2017-12-19 10:26:25 +09:00
Sungtaek Hong 25136ddf8c efl_ui_bg: add Efl.Ui.Bg interface
Summary:
- Previous class efl_ui_bg moved to efl_ui_bg_widget.
- Scale_type moved to efl_image from efl_ui_image.
- Previous enum Efl_Ui_Image_Scale_Type moved to Efl_Image_Scale_Type.

Test Plan:
Run elementary_test
1.Image Scale Type
2.Efl.Ui.Bg
3.Efl.Ui.Win
4.Part Background

Reviewers: jpeg, woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D5616
2017-12-18 20:49:45 +09:00
Jean-Philippe Andre 00bb3bd3c7 efl: Add simple API for "blur" effects
This will use the Efl.Gfx.Filter interface internally, but makes it
usable by normal people.
2017-12-14 18:03:49 +09:00
Amitesh Singh 3726af8313 efl.image.load: fix eolian redefine warnings for load_error{}
load_error{} was defined in efl.file as well.
remove load_error{} from efl.image.load intf and implement
Efl.File.load_error{} instead.

Ref T6514
2017-12-14 14:16:13 +09:00
Jean-Philippe Andre 315c4f761e text: Merge changed,user events
Efl.Ui.Text and Efl.Ui.Text.Interactive were both defining it.
2017-12-13 15:36: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
Andy Williams 03ea9ff79c docs: Fix referencing format
All except references to Efl.Ui.Win_Inline
2017-12-12 17:50:13 +00:00
Jaehyun Cho 4f40d476aa efl_interfaces_main: Fix NULL API of Efl.Canvas pointer_iterate
The Efl.Canvas beta API, pointer_iterate, was not found correctly due
to the absence of EFL_CANVAS_BETA macro.
2017-12-12 19:15:13 +09:00
Amitesh Singh 72b96bc4c5 Efl.Canvas: make pointer_iterate a beta API
Gesture framework should implement it.
2017-12-12 15:52:33 +09:00
Jean-Philippe Andre 832e12e8c4 format: Fixup the string format implementation
Use eina value convert and to_string. Do not fail.
This removes unreachable code by making it active (to_string).

Fixes T6204
2017-12-12 11:38:35 +09:00
Amitesh Singh 196b6f1ba4 interface: rename Efl.Dup to Efl.Duplicate.
dup is considered too short and maybe confusing,
hence rename it to duplicate instead.
2017-12-11 15:25:31 +09:00
Stefan Schmidt 2cd8c4adb4 docs: add the last missing items for eo files in efl/interfaces 2017-12-08 17:08:56 +01:00
Stefan Schmidt 44f18909ca docs: add missing items for efl_gfx* eo classes 2017-12-08 17:06:50 +01:00
Amitesh Singh 80463f0e2e interface: add Efl.Canvas.Pointer intf for pointer related functions.
and remove pointer_inside function from Efl.Canvas{}
2017-12-08 20:13:31 +09:00
Jean-Philippe Andre 207a0cf3e3 eo: Move hacky API auto_unref to C only
This API is meant to be used by parts only, and by bindings dealing with
part objects. This patch fixes make check which got broken in the after
the previous one (cxx).
2017-12-05 15:06:34 +09:00
Jean-Philippe Andre 09cf282741 cxx: Use per-function guards in efl object
This prevents generation of del().
I also removed constructor, finalize and destructor as I believe this
requires special work with eo_inherit (where did this work go??).
2017-12-05 15:01:45 +09:00
Jean-Philippe Andre 63725d71fd cxx: Implement proper part support (wrt. refs)
It's VERY hacky, but works as expected: no leak, no extra unref. This is
a lucky case of simply overriding efl_part() implementation in C++,
without having to modify the declaration.
2017-12-05 10:14:03 +09:00
Jean-Philippe Andre 22919b2050 format: Use strbuf builtin type instead of ptr() 2017-12-05 10:09:58 +09:00
Amitesh Singh 10103b9b45 efl.gfx: move scale{} from efl.ui.base to efl.gfx 2017-12-04 14:38:39 +09:00
Amitesh Singh 2ddea7065f Efl.Ui.Base: remove base_scale.get{} from interface.
base_scale for edje would be legacy now.
2017-11-30 19:27:04 +09:00
Amitesh Singh 5f3e0d62a4 Efl.Gfx.Shape: fix efl_super() call. 2017-11-30 16:23:19 +09:00
Amitesh Singh 774a01a28b Efl.Gfx.Path: add missing EOLIAN prefixes to eolian functions. 2017-11-30 16:09:37 +09:00
Amitesh Singh 77d730627e Efl.Gfx.Shape: add missing EOLIAN prefixes to eolian functions. 2017-11-30 16:09:37 +09:00
Amitesh Singh ad28bdfb5a Efl.Gfx.Shape: implement Gfx.Path.interpolate{}
This fixes the Eolian 'interpolate' redefine warning.
2017-11-30 16:09:37 +09:00
Jean-Philippe Andre bd5b76508b efl: Introduce interface Efl.Dup
A few classes allow their objects to be duplicated, so they should all
use the same interface.

Also, rename VG's dup to copy_from as it's not conforming to the
definition of dup.
2017-11-30 10:48:24 +09:00
Jean-Philippe Andre 6c53992668 edje: Implement Efl.File.load_error
Don't create a new function with the same name, it's absurd.
2017-11-29 15:36:44 +09:00
Amitesh Singh e8ae4178d8 Efl.Ui.Format: do format check once only. 2017-11-28 17:05:31 +09:00
Amitesh Singh e97d00d598 Efl.Ui.Format: do proper checking for string template.
Add support to take action based on string format specifier.

If string template is '%d' and value type is double, do safe
conversion to int from double.
2017-11-28 12:16:48 +09:00
Woochan Lee eefcb49419 efl_ui_spin: Add new spin and spin_button widgets
Summary:
https://phab.enlightenment.org/T5900

Creating base class(efl_ui_spin) to support various shape of spinner.

Added button interaction widget efl_ui_spin_button inherited from efl_ui_spin.

Test Plan: Add tests in elementary_test.

Reviewers: Jaehyun_Cho, woohyun, jpeg, singh.amitesh

Subscribers: jenkins, id213sin, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5424
2017-11-27 19:40:31 +09:00
Amitesh Singh 952593eef2 Efl.Ui.Format: remove the dupicalte code
struct tm check is already done at the beginning of the function.
2017-11-27 16:55:04 +09:00
Amitesh Singh 475ae7ef1b Efl.Ui.Format: add string format checking for user input 2017-11-24 14:58:15 +09:00
Jean-Philippe Andre dda18948ae efl: Split Efl.Container and Efl.Content
When I first implemented the Efl.Container interface I made a mistake of
mixing "single slot" content API's with "multiple children" content
API's.  This should fix that, by separating API's that are for a single
part and those that deal with a list of children.

  Efl.Content: Single slot. This will be used a lot by efl_part()
objects, and for the default content of widgets (eg. the window
content).

  Efl.Container: Multiple children. Used by lists, boxes, layouts
(edje/elm), etc...

I didn't see any class that implemented both interfaces (note: Layout
implements Container and Button implements Content, so technically
Button implements both through inheritance).

For now the eo_prefix is not changed in Efl.Container. I wonder if it
should be reset (to efl_container) or not. This would only affect the C
API.

Ref T5328
2017-11-20 19:02:09 +09:00
Amitesh Singh 302cc259ff Efl.Ui.Format: Add support for "struct tm" in string format. 2017-11-14 10:54:41 +09:00
Daniel Hirt 58ce1d654b Canvas text: change halign/valign to use doubles
There are use cases where you would want to align by a value.

The wordy alignment values are thus removed.
This commit also separates auto-modes (none, normal, locale) for
horizontal alignment to its own API.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-11-10 10:30:00 -08:00
Jee-Yong Um 2f838acd4e Efl: add class interfaces (color/text/size)
Summary: implement Efl.Gfx.Class interface

Reviewers: jpeg, cedric

Subscribers: taxi2se, herdsman

Differential Revision: https://phab.enlightenment.org/D4403
2017-11-08 19:17:59 +09:00
Amitesh Singh d6c9b37925 Efl.Ui.Slider: implement Slider.part & Ui.format functions
indicator_format_set/get & indicator_format_function_set are
now legacy APIs.
indicator format can be set by using generic Ui.Format function
e.g.
efl_ui_format_string_set(efl_part(sliderObj, "indicator"), "1.0%f");
2017-11-07 17:13:44 +09:00
Vitalii Vorobiov 73bfd4f04d efl_gfx_path: fix typo in _path_bounds_get
Wrong position was used while going through the array of
points

@fix
2017-11-07 11:54:09 +09:00
Jean-Philippe Andre 5f5325ea33 cxx: Fix binding temporarily (efl/interfaces)
This uses the new cref keyword instead of inout, as the c++ code has no
access to the internals of struct Efl.Text.Cursor.Cursor

Something tells me cref may not be the perfect solution here (we lose
information on whether this is in, out or inout).
2017-11-07 09:57:24 +09:00