Commit Graph

62541 Commits

Author SHA1 Message Date
Jaehyun Cho b7801edbe4 efl_ui_clickable: fix not to be clicked if pointer is processed
If pointer is processed by a container in its POINTER_MOVE event
callback, then clickable calls efl_ui_clickable_button_state_reset not
to be clicked by efl_ui_clickable_unpress.

e.g. Efl.Ui.Active_View.View_Manager_Scroll sets pointer processed in
POINTER_MOVE event callback not to click button during scrolling.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9204
2019-07-09 10:34:39 +02:00
Vitor Sousa 7c23ba7c93 cxx: fix some compilation warnings in C++ examples
Summary:
Fix some warnings in the C++ examples for elementary. These examples are build
by default in the normal meson compilation.

Only accidental warnings were fixed, explicit warnings using the `#warning`
preprocessor directive were maintained.

Test Plan: Compile with C++ binding.

Reviewers: lauromoura, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9244
2019-07-09 10:13:27 +02:00
Vitor Sousa 288f645e3c csharp: update and disable tests that use deprecated eolian type notations
Summary:
Avoid the usage of deprecated Eolian type notations like `ptr()` in C# unit
tests.

In places where an alternative type could be used, tests were changed to use
a valid type, e.g. containers that stored `ptr(int)` were changed to store
`string`.

Tests for types that require a pointer notation were commented out and
disabled. They can be re-enabled when a new notation to the type is defined.

Depends on D9238

Test Plan: `meson test`

Reviewers: lauromoura, felipealmeida, q66, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, bu5hm4n, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9247
2019-07-09 10:05:23 +02:00
Vitor Sousa 7769779a4d eolian_mono: fix non-beta build and support for slice/rw_slice keywords
Summary:
Add support for `slice` and `rw_slice` keywords in eolian_mono.
Now it generates the proper manual binding type for these native types.
Make unit tests use these keywords instead of native names.

Remove some unnecessary `@beta` tags from eolian types in unit tests so now
tests correctly compile without the `mono-beta` compilation flag.

Also make tests that use `Eina.Binbuf` "beta only".
In a future update, the external type `Eina.Binbuf` will be marked as beta, so
we shield the binding in anticipation.

Test Plan: `meson -Dbindings=mono -Dmono-beta=true` and `meson -Dbindings=mono -Dmono-beta=false`

Reviewers: lauromoura, felipealmeida, q66, segfaultxavi, bu5hm4n

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9238
2019-07-09 10:00:06 +02:00
Vitor Sousa 1193e1a757 csharp: fix build warning related with an unused field in an unit test
Test Plan: `meson test`

Reviewers: lauromoura, felipealmeida, segfaultxavi

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9240
2019-07-09 09:59:24 +02:00
Hermet Park d01a121aa9 efl_canvas_vg: prevent dangling pointers. 2019-07-09 15:50:26 +09:00
junsu choi be419d64d2 Ector.Renderer: Prevent too many unref.
Summary:
pd-> surface will try efl_xref whenever surface_set is called.
desturctor is called from a subclass, ref and unref do not match.
So, Add this condition temporarily.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9235
2019-07-09 15:46:41 +09:00
junsu choi 9a55abef30 vg_common_json: Always set the alpha color of the container.
Summary: Fixes the problem that alpha color is not set when alpha will be 255.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9216
2019-07-09 14:21:55 +09: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
Shinwoo Kim c8827c0dcc evas_render: add restacked mapped obj to redraws rect
Summary:
We are adding A object area to the redraws rect when object stack is changed
from (1) to (2) if A object is not mapped.

(1)
 ┌────────┐
 │Object A│┐
 └────────┘│
  └────────┘

(2)
 ┌────────┐
 │┌────────┐
 └│Object B│
  └────────┘

But if A object is mapped, then we are adding only part of A object area.

(part of A)
 ┌───────┐
 │┌──────┘
 └┘

So the result of stack change is (1) not (2).
This patch set is adding restacked mapped object to the restack_objects array,
after changing the stack of mapped object to add correct redraws rect.

Test Plan:
{F3727281}

{F3727280}

{F3727279}

(1) Build and Run attached example on software_x11 engine
(2) Mouse down on upper image - the image starts to use map.
(3) Then mouse up - upper image should go under the below image.
But, the changed result is NOT rendered.

Reviewers: Hermet, jsuya, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9183
2019-07-09 12:05:36 +09:00
maxerba 9b1152b0cc Updating french translation 2019-07-08 21:17:32 +02:00
Marcel Hollerbach 52adb65aea efl_ui_spin_button: add test suite
this adds a testsuite to emulate and check the usage of buttons in the
spin button widget. This also verifies that the correct events are
emitted. (For now, the testcases from spin are also copied over, since
they inherit from each other)

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9232
2019-07-08 19:56:42 +02:00
Marcel Hollerbach d5df7e459d efl_ui_spin_button: fix event calling in spin_button
before the spin event for changing the value was called twice if you
changed the value by the entry. Additionally, the changed,delay event is
not emitted when the value was changed via the arrow buttons.
This corrects this, additionally, this enables the delay timer when
focus is gone, this is expected and should be supported by the API.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9231
2019-07-08 19:56:41 +02:00
Marcel Hollerbach d8f32042c4 efl_ui_spin_button: make theme consistent
this reduces the amount of code needed in the widget itself,
additionally, the theme now follows a scheme.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9230
2019-07-08 19:56:40 +02:00
Marcel Hollerbach 7ddd286f7b efl_ui_spin_button: cleanup internal data
there is no reason to store those two times in the internal data, as
they do not change at all. Additionally, saving the direction in the
internal data has also no reason, since it is *always* used in the call
after the setting, so this makes this a parameter.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9229
2019-07-08 19:56:39 +02:00
Marcel Hollerbach 1414b8a921 efl_ui_spin_button: this can also be done with the focus callback
this makes the code more readable, and reduces the amount of events we
are subscribing to.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9227
2019-07-08 19:56:38 +02:00
Marcel Hollerbach eaeb67e571 efl_ui_spin_button: change entry to button before changing value
doing this in pressed is kind of weird, if you are on a touchscreen,
missclick, and move the finger away, the entry is already transformed,
which is weird, this fixes that.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9226
2019-07-08 19:56:37 +02:00
Marcel Hollerbach c72ccdadfd efl_ui_spin_button: this function is 1:1 like this in efl_ui_spin
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9225
2019-07-08 19:56:36 +02:00
Marcel Hollerbach f4f4856758 efl_ui_spin_button: replace timers with autorepeat of button
this was just reimplementing existing behaviour. This can be done more
easily

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9224
2019-07-08 19:56:34 +02:00
Marcel Hollerbach e922a23ddf efl_ui_spec_suite: introduce two new test suites
this checks that the expected errors are in place, and the state does
not get changed when there is an errornous call.

ref T7895
ref T7894
2019-07-08 19:56:33 +02:00
Marcel Hollerbach 5efb4b374e efl_ui_*: get range users onto the same semantics
this commits introduces unified behaviour for the users of the range
interfaces. This includes:
- The same errors for limit_set errors
- The same errors for value setting outside the range

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9241
2019-07-08 19:56:33 +02:00
Marcel Hollerbach 1e73201169 efl_ui_spin: add tests for basic spin features
this tests for the correct event emission. And checks the wheel
interaction.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9221
2019-07-08 19:56:32 +02: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
Vitor Sousa ec501a6623 csharp: fix some build warnings related with incorrect and missing documentation
Summary:
Some parameter names, tag names and cref identifiers in the documentation were
incorrect and causing warnings during compilation.
There were also warnings related with missing documentation in publicly
visible elements in the manual binding.

This commit fixes these incorrections and adds documentation to the manual
binding in order to solve these compilation warnings.

Warnings related with missing documentation in `.eo` files are still present.

Test Plan: Just compile with mono binding.

Reviewers: lauromoura, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9243
2019-07-08 17:20:08 +02:00
Daniel Kolesa ec7bc0eddd efl: prevent usage of some Eina.* stub types in stable APIs 2019-07-08 17:01:40 +02:00
Mike Blumenkrantz 3853f75696 eolian: fix leak in eolian_state_file_path_parse
Summary:
this fixes a trivial leak where a string is leaked at the end of the function.
it is not significant, but it still appears in leak detections.

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9124
2019-07-08 16:17:58 +02:00
Vitor Sousa 5ae9e04e4d eolian_cxx: update eolian_cxx to recognize slice and rw_slice
Summary:
Update eolian_cxx to recognize the new keywords `slice` and `rw_slice`, so it
can generate the corresponding types `Eina_Slice` and `Eina_Rw_Slice`.

Reviewers: lauromoura, felipealmeida, q66

Reviewed By: q66

Subscribers: cedric, bu5hm4n, #reviewers, segfaultxavi, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9237
2019-07-08 16:16:07 +02:00
Vitor Sousa 2775534fda eolian_cxx: update tests to no longer use forbidden eolian notations
Summary:
Update eolian_cxx tests in order to remove forbidden eolian notations.

For tests with containers that support non-pointer types,
change `ptr(int)` to `int`.
For tests with containers that only support pointer types,
change `ptr(int)` to `string`.

Remove tests for features that are no longer meaningful with eolian new
restrictions.

Add a FIXME note to eina::range_array when used with eina::string_view.

Reviewers: lauromoura, felipealmeida, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers, bu5hm4n, segfaultxavi

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9236
2019-07-08 16:15:41 +02:00
Daniel Kolesa 61f39eef49 eolian: remove API to get freefunc of type
This is not supported anymore. For now, the syntax is kept
around because of broken C++ tests, but afterwards it will
also be removed.
2019-07-08 16:06:42 +02:00
Daniel Kolesa 2bfa55582c eolian: remove builtin freefuncs
For now this does not alter API behavior, so freefuncs are still
transitive to aliases etc., this will get removed later.
2019-07-08 16:06:42 +02:00
Daniel Kolesa 38223ed693 eolian_gen: remove reliance on builtin freefuncs 2019-07-08 16:06:42 +02:00
Daniel Kolesa 9c249d0467 elua: add error api into eolian bindings 2019-07-08 16:06:42 +02:00
Daniel Kolesa 2a1fa5d2aa eolian_gen: introduce C generation support for error types
ref T6890
2019-07-08 16:06:42 +02:00
Cedric BAIL 47c5736ef9 elementary: rename Activew_View to Spotlight.
View is something that is expected in the context of MVVM, so using it somewhere else is
going to lead to some confusion. Spotlight does descrive the objective of all of this
widget in actually a more explicit way as they all give the spotlight to one sub widget
at a time.

I have also renamed the View_Manager to be just Manager as the View there wasn't useful.
2019-07-05 19:18:22 +02:00
Xavi Artigas faaba156ab docfx: Remove collapsible sections
They didn't render correctly in all cases.
2019-07-05 17:06:39 +02:00
Lauro Moura 00a1a203a5 csharp: Fix Future callback lifetime
Assigning a method directly to a field expecting a delegate creates a
delegate on the fly. This delegate can be collected normally as any
collectable object. In dotnet the GC is more aggressive, causing this
delegate to be collected and C trying to call an invalid function.

To avoid this, we create a static delegate that will be passed to C. Its
lifetime will be tied to the static method it wraps.
2019-07-05 09:57:23 +09:00
Vitor Sousa 73df0d47ff csharp: encapsulate some internal code of EoWrapper
Summary:
Encapsulate some parts of EoWrapper making them less accessible to lib users.
This can avoid unnecessary and risky usage of code that is only intended for
internal usage.

`inherited` field was made private and renamed to `generated`. Now its value
can only be obtained through the `IsGeneratedBindingClass` property.

`handle` field was made private.

`eventLock` was renamed to `eflBindingEventLock`

`ConstructingHandle` property set was made private.

Constructors that are used to create new EFL# managed objects by wrapping a
preexisting eo handle now receive a specific struct wrapping the handle pointer.
This can avoid faulty interactions with the Reflection engine used only for
generated classes that implement this constructor.

Test Plan: meson test

Reviewers: lauromoura, felipealmeida, YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9212
2019-07-05 09:57:23 +09:00
Marcel Hollerbach a94c72f4de efl_ui_widget: optimize focus
this commit ensures 2 things:
1. This ensures that the parent is not evaluated when there was no state
changed, this cuts down roughly 30% of the calls to full_eval
2. This ensures that we only listen to parent manager changes when we
are actaully registered. This reduces the amount spend in event emission
a lot.
2019-07-04 20:41:23 +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
Stefan Schmidt 87cfde51d3 ci: finally enable examples for mingw build
With the gnutls build problem fixed we can now enable these as well.
2019-07-04 11:09:57 +02:00
Stefan Schmidt f19189a54f ci: cross: make sure we use the mingw pkg-config to detect cross deps
This only came up when we had gnutls native but not cross to find out
that we used the system pkg-config all the time to detect cross.
Making sure we use the correct tool to detect the cross dependencies.
2019-07-04 11:09:57 +02:00
Stefan Schmidt bdc6987067 ci: enable more build options for mingw job
Withj an updated ewpi in the docker image we can now enable more build
options. Examples are still disabled as there is a build break that
needs to get fixed first.
2019-07-04 11:09:57 +02:00
Mike Blumenkrantz b5e65ed993 tests/radio: add explicit test for verifying legacy radio callback triggering
the 'changed' callback should never be triggered when programmatically
changing a radio's state

ref T8042
2019-07-03 12:22:17 -04:00
Mike Blumenkrantz f619ad88a4 tests: add functional unit tests for radio widgets
this adds some basic testing to verify that callbacks occur and values
are set as expected

Differential Revision: https://phab.enlightenment.org/D9091
2019-07-03 12:22:17 -04:00
Marcel Hollerbach ebf39e9fd7 efl_ui_check/radio: restore legacy behaviour
from now on, the "changed" signal is only emitted on radio/check buttons when
the user interacted with this object. NOT due to the API change.
However, in the eo-api the event is emitted all the time, due to user
interaction, AND due to API interaction.

ref T8042
2019-07-03 12:22:17 -04:00
Xavi Artigas 8a0cad6435 Efl.Ui.Progressbar: Add explicit display control of progress label
Summary:
Add a property (show_progress_label) to allow controlling whether the progress
label displaying the exact progress is shown or not.
This was possible in Legacy but the functionality was lost in Unified.

Updated elementary_test to showcase this property, and also the other label
formatting options, which where not tested anywhere.

Added a simple progressbar unit test. It only checks that retrieved value is the
same as the set value, so it is more of a placeholder for future tests.

**This is needed by a future patch which will introduce more formatting options that clash with the current implementation.**
The presence of a formatting function was used to decide if the progress label was shown or not. This explicit property simplifies things.

Test Plan:
Everything builds and passes tests.
`elementary_test -to Efl.Ui.Progressbar` should show a few more bars with different formatting labels, and a checkbox to toggle rendering of one of them.

Reviewers: bu5hm4n, zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9202
2019-07-03 08:34:03 +02:00
Marcel Hollerbach 223a433be8 eina: add accessors for c arrays
This adds a new API which can be used to get access to a carray via the eina_accessor API.
2019-07-03 07:41:05 +02:00
Jaehyun Cho 132520bc7b elementary: remove unused elm_widget header files
elm_widget_bg.h and elm_widget_clipper.h are not used any more.
So those header files are removed.
2019-07-02 15:52:01 +02:00
Vitor Sousa 229b363f01 csharp: fix some compilation warnings
Fix unused variable warnings in eina_mono and unit test files.
2019-06-28 10:58:24 -03:00