Commit Graph

792 Commits

Author SHA1 Message Date
Daniel Kolesa 31658e6e14 efl: replace usage of ptr() in all stable APIs 2019-09-10 14:29:06 +02:00
Daniel Kolesa 4f4b58bf4c efl: change all occurences of @owned to @move 2019-09-06 17:01:05 +02:00
Hermet Park 690dd5d33a ector: code refactoring.
Current vector drawing requires several methods for compositing,
it's shouldnt have only masking but other blending functions
such as matte in lottie, porter&duff in android, etc.

Previously we didn't specify this method name,
just reserved the options and now we started to define the methods
with ector_renderer_composite_method() with Efl.Gfx.VG_Composite_Method
instead of mask_set().
2019-09-06 17:56:02 +09:00
Mike Blumenkrantz 121a437c4d api: remove Efl.Ui.Scroll_Block
Summary:
this now uses layout orient enum everywhere

fix T7921

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7921

Differential Revision: https://phab.enlightenment.org/D9804
2019-09-03 09:15:31 +02:00
Xavi Artigas dc05cbbee8 docs: Fix typos and wrap EO files to 120 chars
As per our style guide:
https://www.enlightenment.org/contrib/docs/eo-guide.md
2019-09-02 16:24:26 +02:00
Xavi Artigas c7c535cee8 docs: Switch remaining #doxygen-style refs to @eo-style 2019-09-02 11:57:27 +02:00
Daniel Kolesa fdc85f895d eolian: properly handle non-beta restriction of __undefined_type 2019-08-31 14:02:20 +02:00
Daniel Kolesa 9c018613ee eolian: drop @cref
In the end this was just a failed experiment that didn't turn
out to be practical. For now, revert back to ptr(const(T)) until
a proper replacement for pointer syntax is added.
2019-08-29 13:58:16 +02:00
Xavi Artigas d98c2a5c3e Efl.Pack.Layout docs: remove refs to protected methods from public methods 2019-08-28 11:18:06 +02:00
Xavi Artigas 47547ff088 efl_ui_range_display: Update docs 2019-08-27 16:38:12 +02:00
Yeongjong Lee 9c52484caf efl_pack_table: rename table_position to cell_column, cell_row
Summary:
Rename ambiguous `table_position` property. it is actually related to child
column, row.

ref T7900

Reviewers: segfaultxavi, zmike

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7900

Differential Revision: https://phab.enlightenment.org/D9611
2019-08-27 12:57:35 +02:00
Xavi Artigas ce2fcda1e2 Efl.Gfx.Image docs: whitespace and wording. 2019-08-26 17:25:10 +02:00
Yeongjong Lee 6b3d430f12 efl_ui_scrollbar_direction: replace with efl_ui_layout_orientation
Summary: ref T7924, T7884

Reviewers: segfaultxavi, bu5hm4n

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7924, T7884

Differential Revision: https://phab.enlightenment.org/D9612
2019-08-23 13:38:32 -04:00
Mike Blumenkrantz d50fdce4d3 efl/gfx.image: add can_upscale and can_downscale properties
these are more granular properties which allow blocking of image
upscaling and/or downscaling regardless of scale hint

ref T7875

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9703
2019-08-23 07:33:57 +02:00
Mike Blumenkrantz ad0c805545 efl/gfx: redo image scale_type enum
this is ideally a bit more clear and flexible than the previous enum names

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9691
2019-08-23 07:33:56 +02:00
Hermet Park 31d0d1ffd3 efl shape: add missing interpolation of miterlimit property. 2019-08-22 13:12:19 +09:00
junsu choi fa8f20338d efl_gfx_shape: Add stroke_miterlimit property
Summary:
Sets limit on ratio of miter value of the stroke join.
If a miter join exists, it must be supported.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9657
2019-08-22 12:45:09 +09:00
Carsten Haitzler e15d9c86df eina file refs in edje/evas - audit them and plug holes where refs stay
in 1 situation at least we delete the eina file (close it) but keep
the ptr around (during destruction) which could cause issues with
callbaks and events on del and so on.... which may lead to multiple
closes where only one should happen ... which would explain my invalid
eina file ref problems i'm seeing. i carefully matched eina file
handle stores/opens/dups to closes in edje/evas and they seemed to all
match up so this audit with comments and fixes seems to have plugged
that now.

@fix
2019-08-21 20:02:24 +01:00
Cedric BAIL 00d58640e5 efl: mark Efl.Ui.Factory.create a protected method.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9606
2019-08-21 11:18:46 -07:00
Cedric BAIL fcaec29be7 efl: use a @static function so that binding can pick it up.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9604
2019-08-21 11:18:44 -07:00
Cedric BAIL f6cdbc2d43 elementary: allow Efl.Ui.Factory to have a chance to call constructor function.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9599
2019-08-21 11:18:36 -07:00
Cedric BAIL 0248d504b3 elementary: switch Efl.Ui.Factory API to a batch API and update all class using it.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Differential Revision: https://phab.enlightenment.org/D9579
2019-08-21 11:18:34 -07:00
Daniel Kolesa 8a8a833837 eolian: rename @class on methods to @static
Ref https://phab.enlightenment.org/T8118
Ref https://phab.enlightenment.org/T7675
2019-08-16 16:27:00 +02:00
Mike Blumenkrantz e1fda2cbdb efl/hints: add restricted and combined max size hints
these function the same as the min size hint versions and enable
distinction between internally-set max size hints and user-set max size
hints

@feature

ref T8122

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9553
2019-08-14 12:08:13 -07:00
Mike Blumenkrantz c375bbcfa7 efl/hint: add doc note about max size hint
ref T8122

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9551
2019-08-14 12:08:09 -07:00
Marcel Hollerbach 54c524f7f6 introduce efl_ui_multi_selectable and efl_ui_single_selectable
right now they are just thin wrappers from what have been in
efl_ui_collection. This is just a first effort, the interfaces have to
be equipped with more and better API, more events, and tests.

ref T8057

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9515
2019-08-07 14:48:41 +02:00
Marcel Hollerbach fc12e7721f efl_ui_selectable: split this up
i dont know why, but something got badly mixed up, the selection APIs
for text and item ended up in the same interface, which seems ... weird
?
This commit splits that up into container_selectable and
text_selectable, there is no future plan on my list for text_selection.
The rest of this series is working towards removing
container_selectable, replacing it with a new interface. However, the
interface will stay until list_view is replaced.

The changes in the legacy code are removing the efl.ui.selection
interface from it, item emission is not depending on the inherited
interfaces, additionally, this interface does not provide any API, so
this should not be an issue.

ref T7766

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9498
2019-08-05 19:49:12 +02:00
Lauro Moura 40def3eac9 efl-mono: Add Model manual implementation to C# and MVVM factories
Summary: Depends on D9273, D9270

Test Plan: Run added testcases.

Reviewers: cedric, bu5hm4n, zmike, SanghyeonLee, felipealmeida, segfaultxavi

Reviewed By: cedric

Subscribers: cedric

Tags: #expertise_solutions, #efl_language_bindings

Differential Revision: https://phab.enlightenment.org/D8080
2019-08-05 10:18:18 -04:00
Marcel Hollerbach 010f813572 efl_ui_range_interactive: add a new event
the steady event from slider now moved here. A spec test suite and the
corresponding implementations will follow.

ref T7894

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9458
2019-08-01 14:36:45 -07:00
Daniel Kolesa 1bcca58d82 eolian: disallow ptr() in containers in stable API 2019-08-01 16:55:31 +02:00
Ali Alzyod 32cffb4494 evas_textblock: change font-size/font-family only using EFL.Text.Font Interface
Currently:
User cannot change font size only, he needs to set both font and font size with (**efl_text_font_font_set**)
To change size only, you need to make two calls, one to get font (**efl_text_font_font_get**) , then pass it again with new size to (**efl_text_font_font_set**).

New Behaviour:
If user want to change size only, then he passes NULL as font argument to keep same font.
If user want to change font only, then he passes 0 as font-size argument, to keep same font-size.

Notes:
This is not best solution, but it better than current behaviour.
I think best solution to have separate function to set font size, but It might break current api or duplicate functions.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9158
2019-07-31 10:54:55 -07:00
Marcel Hollerbach c0082b1c71 efl_ui_range_display: move events from spin
we concluded min,reached and max,reached should be on every widget that
implements range_display. This here is the start of that work, the
events are moved, next commit fixes all widgets, the last commits
enables tests in the spec unit test.

ref T7897
ref T7895

Differential Revision: https://phab.enlightenment.org/D9371
2019-07-31 10:18:20 +02:00
Xavi Artigas ef235c43c8 Fix build break
Caused by 1c0a459293
I should have been more careful before approving, my bad.
2019-07-29 12:23:18 +02:00
Ali Alzyod 1c0a459293 efl_gfx_color: fix color_code_set
Summary:
There are two parts for this patch:
1- Fix sigmentation fault when using (efl_gfx_color_color_code_set).  // It try to modify const variable
2- Remove unnecessary code. // why would user pass slash or back slash as color code format.

Test Plan:
```
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1

#include <Eina.h>
#include <Elementary.h>
#include <Efl_Ui.h>

static void
_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
   efl_exit(0);
}

static void
_gui_setup()
{
   Eo *win, *rect;

   win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
                 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
                 efl_text_set(efl_added, "Hello World"),
                 efl_ui_win_autodel_set(efl_added, EINA_TRUE));

   // when the user clicks "close" on a window there is a request to delete
   efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);
   rect = efl_add(EFL_CANVAS_RECTANGLE_CLASS,win);
   const char *color = "#FF0000FF";
   efl_gfx_color_code_set(rect,color);
   evas_object_resize(rect,250,250);
   evas_object_resize(win,250,250);
   evas_object_move(rect,0,0);
   evas_object_show(rect);
   evas_object_show(win);
}

EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
   _gui_setup();
}
EFL_MAIN()
```

Reviewers: zmike, cedric, segfaultxavi, woohyun

Reviewed By: segfaultxavi

Subscribers: singh.amitesh, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9422
2019-07-29 12:10:25 +02:00
Xavi Artigas bc955f35bb Rename Efl.Gfx.Image.Stretch_Region -> Efl.Gfx.Image_Stretch_Region
Otherwise we have a symbol <-> namespace clash. Again.
2019-07-26 22:35:40 +02:00
Taehyub Kim e1e4f90446 Efl.Gfx.Hint_Align: add define values for Efl.Gfx.Hint_Align
Summary:
Add define values for Efl.Gfx.Hint_Align
 - Efl.Gfx.Hint_Align_Left
 - Efl.Gfx.Hint_Align_Right
 - Efl.Gfx.Hint_Align_Top
 - Efl.Gfx.Hint_Align_Bottom
 - Efl.Gfx.Hint_Align_Center

Reviewers: bu5hm4n, Jaehyun_Cho, woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9413
2019-07-26 09:07:41 +02:00
Cedric BAIL 2d481d8593 efl: add a Efl.Model_Provider that every widget will look up for in their parent tree.
This is done to simplify code as you only need to set the model on the
provider and all the widget that are using it as a provider will automatically be
updated. The child will find a provider during at the time the first property binding
is set on the widget by checking if the parent have an Efl.Model_Provider set. It is
not necessary to set a model to have a valid lookup on a Efl.Model_Provider. To disable
a widget lookup, you can just force set a model on it (even NULL) and it will disable
the lookup.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9290
2019-07-17 21:57:51 +02:00
Cedric BAIL 4d071ff1cb efl: implement notification for when the model is changed on a widget.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9288
2019-07-17 21:57:49 +02:00
Vitor Sousa ab26579cab Revert "Revert "efl: prevent usage of some Eina.* stub types in stable APIs""
EFL# support for slice and rw_slice was added in a previous commit.
So now it is safe to undo the reversion of this commit.

This reverts commit 25ef604467.
2019-07-15 15:45:13 -03:00
Cedric BAIL b2cb77ca9c evas: take stretch region into account when content region is requested.
Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9097
2019-07-12 09:54:06 -07:00
Cedric BAIL 9fbc5dfc66 evas: add support for stretchable region.
This is the first step into introducing support for Android 9 patch
format (extension: .9.png). The principle is to expose a new property
on image object that define a complete behavior incompatible with other
border and fill logic. The reason is that 9 patch allow for any number
of stretchable area inside an image, not just for each corner. The way
to define this is by giving a pointer to an array of the proper type
that define stretchable region relative to each other.

The logic being slightly more complex than the border and fill logic,
it is slightly slower. If you are just defining corner on your image
for something like a button, you would still get better performance
using border. I will try to make edje_cc detect those case and fallback
to border when possible.

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9096
2019-07-12 09:54:03 -07:00
Cedric BAIL 23a2820121 evas: add an API to know where inside an object content can be layout over.
The first step with this API is to use the information provided when setting
the border on an image to define the content area inside it. Improvement will
be to use more flexible stretch region area to make it more customizable and
finally read the information from a 9patch file (.9.png).

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9093
2019-07-12 09:53:59 -07:00
Hosang Kim 7d33cf977f Rename orientation -> image_orientation.
Summary:
Efl.Gfx.Image_Orientable and Efl.Ui.Layout_Orientable have same property name.
So when class extends both interfaces, it makes conflict.

Relates to T7924

Reviewers: woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9299
2019-07-12 10:32:20 +02:00
Marcel Hollerbach 1c8f6132af declare a few classes stable
this is the first wave of stablization declarations

fixes T7562
fixes T7846
fixes T7848
fixes T7859
fixes T7860
fixes T7861
fixes T7863
fixes T7878
fixes T7899
fixes T7918
fixes T7919
fixes T7963
fixes T7964
fixes T7965
fixes T7967
fixes T7969
fixes T7970

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9264
2019-07-11 17:15:43 +02:00
junsu choi 228b91e36f efl_gfx_shape: Stroke color use a premultiplied color.
Summary: R, G, and B must not be higher than alpha.

Test Plan:
//test code
Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 600, 600, NULL);
ecore_evas_show(ee);

Evas *evas = ecore_evas_get(ee);
Evas_Object *vg,*bg;

bg = evas_object_rectangle_add(evas);
evas_object_color_set(bg, 0, 0, 255, 255);
evas_object_focus_set(bg, 1);
evas_object_show(bg);
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
evas_object_resize(bg, w, h);

vg = evas_object_vg_add(evas);
evas_object_focus_set(vg, 1);
evas_object_show(vg);
evas_object_resize(vg, w, h);

Efl_VG *shape, *container;
container = evas_vg_container_add(vg);
shape = evas_vg_shape_add(container);

evas_vg_shape_append_rect(shape, 0, 0, 200 , 200, 10, 10);
evas_vg_shape_stroke_color_set(shape, 255, 255, 255, 10);
evas_vg_shape_stroke_width_set(shape, 20);
evas_vg_node_origin_set(shape, 200, 200);

evas_object_vg_root_node_set(vg, container);
ecore_main_loop_begin();
ecore_evas_shutdown();

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9217
2019-07-09 14:21:20 +09:00
Xavi Artigas 10acaa67d9 docs: Fill last missing docs from EO files
Some docs have been filled with placeholder text ("TBD") or with preliminary
text (marked with //TODO).
Having 0 doc warning we can now enable Warnings as Errors in mono, and in Eolian later on.
2019-07-08 17:48:57 +02:00
Vitor Sousa 25ef604467 Revert "efl: prevent usage of some Eina.* stub types in stable APIs"
C# does not support `slice` and `rw_slice` yet.
Reverting until proper support lands.

This reverts commit ec7bc0eddd.
2019-07-08 12:46:37 -03:00
Daniel Kolesa ec7bc0eddd efl: prevent usage of some Eina.* stub types in stable APIs 2019-07-08 17:01:40 +02:00
Xavi Artigas e776f5f0d7 Efl.Ui.Format revamp
This class helps widgets which contain a numerical value and must display it,
like Progressbar (units label), Spin, Spin_Button, Slider (both units and popup
labels, in legacy), Tags (when in shrunk mode) or Calendar (year_month label).

Previously this was a mix of interface and mixin: widgets had to support setting a
formatting func, and the mixin offered support for formatting strings, by setting
an internal formatting func. On top of that, the spinner widget supported "special
values", a list of values that should be shown as certain strings instead.

This has now been simplified and unified:
Widgets including this mixin can use the formatted_value_get() method which accepts
an Eina_Value and returns a string. Thats's it.
The mixin adds three properties to the widget (format_values, format_func and
format_string) which users can use to tailor formatting. The widget does not need
to know which method has been used, it just retrieves the resulting string.
This removes a lot of duplicated widget code, and adds functionality which was
missing before. For example, all widgets support passing a list of values now.

Widgets must implement the apply_formatted_value() method so they are notified
of changes in the format and they can redraw anything they need.

Tests have been added to the Elementary Spec suite for all cases.

Legacy widgets behavior has not been modified, although a few needed some code
changes.
2019-07-04 19:38:20 +02:00
Marcel Hollerbach b0c29edd78 efl_input_device: split up has_pointer_cap
it was somehow confusing that this function was used for two different
things. Now we have 2 functions for checking is it is of pointer_type or
how many pointer devices are in a seat.

ref T7963

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9142
2019-06-20 17:25:42 +02:00