Commit Graph

62571 Commits

Author SHA1 Message Date
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
Vitor Sousa 4496022a3c csharp: fix Eina_Stringshare support in containers for manual and generated API
Summary:
Both C strings and eina stringshares are bound as regular strings in EFL#, as
working directly with these types would demand unnecessary hassle from the user
viewpoint.
But for eina containers this distinction is important, and since C# generics
do not provide a convenient way of dealing with the same type requiring a
different management based on some other condition (at least not without
compromising the usability for other types), we added a simple `System.String`
wrapper named `Eina.Stringshare` that works as a placeholder for signaling
this distinction.

Working with this class should be transparent in most use cases because it
converts to and from `System.String` implicitly.
It also implements equality/inequality methods for easier comparison with
strings and other stringshare objects.

Add new methods and a new container element trait for dealing specifically
with `Eina_Stringshare` elements.

Adapt eolian_mono to identify and generate the proper placeholder in methods
that require stringshare containers.

Remove some direct uses of DllImport-ed functions in favor of more flexible
manual binding methods.

Move `Eina.Stringshare` DllImport directives to a static class named
`NativeMethods`, in accordance with the code design warning CA1060.
Also add a TODO comment to move all other DllImport directives to this class.

Change parameter of the method `Efl.Csharp.Application.OnInitialize` from
`Eina.Array<System.String>` to `string[]`.
This will make this API more similar with the default C# way of receiving
command line arguments.

Add tests for containers storing stringshare elements.

Reviewers: felipealmeida, lauromoura, segfaultxavi, bu5hm4n

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9178
2019-06-28 10:44:52 -03:00
Vitor Sousa b7fa7d48ac csharp: make inherited C# classes constructible from native C
Summary:
With this commit it is now possible for a class that inherits from a C# binding
class to be instantiated from native C code. It only has to provide a
constructor that receives an `Efl.Eo.EoWrapper.ConstructingHandle` struct,
and which calls the base binding constructor passing it.
For example:

`private Type(ConstructingHandle ch) : base(ch) {}`.

Add some test files to validate the proper behavior of this feature.

Add some small fixes in generation contexts in order to properly
generate base constructors.

Depends on D9070

Test Plan: `meson test` and `make check`

Reviewers: lauromoura, felipealmeida, segfaultxavi, woohyun, YOhoho

Reviewed By: YOhoho

Subscribers: YOhoho, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9071
2019-06-28 10:38:57 -03:00
Marcel Hollerbach 549c417853 efl_ui: include here efl_ui_item
Summary: this is actually a new class, it should be included here.

Reviewers: zmike, stefan_schmidt

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9200
2019-06-28 08:47:41 -04:00
Jaehyun Cho b892fa3ce7 view_manager_scroll: fix not to move view position by click
Summary:
Previously, view position was moved by click because transition
information was initialized in mouse move instead of mouse down.

Now, transition information is initialized in mouse down so view
position is not moved by click.

Test Plan:
1. Run Efl.Ui.Active_View Scroll
2. Click Next button 2 times
3. Click Button Page
Or
3. Drag Button Page a bit to the left and click multiple times

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9173
2019-06-28 18:15:42 +09:00
Marcel Hollerbach d3dbd5a5cd evas_events: fix wrong event listening
EFL_EVENT_FOCUS_IN is wrong here, EFL_EVENT_FOCUS_IN is called on object
that received object focus. Not canvas focus, however, the code in the
callback there seems to be mainly for canvas focus handling.

Additionally, in evas_events, the event handler that was listening for
the canvas focus in / out events expected a event type, which is also
not correct, because the canvas focus in / out does not have one. In
order to catch such errors later more easily, there is now a safety
check, so we really fetched the correct seat.

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9191
2019-06-28 09:03:14 +02:00
Wonki Kim 7b8766698a meson: remove autotools checking stuffs
autotools has been removed. so that the autotools checking logic is not needed.
this patch removes them.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9198
2019-06-28 09:03:13 +02:00
Lauro Moura ef185e5e28 efl-mono: Fix value forwarding in promises/async
Summary:
Values returned from C# Then callbacks must release ownership of the
underlying native value, so Eina code can clean it up nicely and avoid
the Wrapper flushing it early.

The same issue applied to the Async wrappers. In this case the value
passed as the Task parameter could be released by an `using` block
awaiting the value.

Also Future creation was then-ing the wrong handle.

Also add better exception messages.

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9197
2019-06-27 19:31:55 -03:00
Lauro Moura 0f514b484b csharp: Rename test util parameters
Summary:
Instead of 'expected' and 'actual', use 'lhs' and 'rhs', as it allows
the actually expected value to be in any position.

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl, #expertise_solutions

Differential Revision: https://phab.enlightenment.org/D9196
2019-06-27 19:28:53 -03:00
Lauro Moura accaaa1ff7 csharp: Add missing prefix to enable interpolation
Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl, #expertise_solutions

Differential Revision: https://phab.enlightenment.org/D9195
2019-06-27 19:24:41 -03:00
Jaehyun Cho 03936c0513 eolian_mono: fix to support event info which is a type defined in eo
Summary:
Previously, if event info was not structure and it was a type defined in
eo, then the type value was not passed to the event info correctly.

e.g. if event info was Efl.Ui.AlertPopupButton enum type, then
     default(Efl.Ui.AlertPopupButton) was always passed to event info.

Now, the given type value is passed to the event info correctly.

Reviewers: felipealmeida, lauromoura, vitor.sousa, bu5hm4n

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, herb, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9159
2019-06-27 14:35:43 -03:00
Vitor Sousa e4a5374d3e eolian_mono: small correction when checking for iterator and accessor parameters 2019-06-27 14:27:34 -03:00
Lauro Moura 967e32d27a csharp: Update after iterator changes
Summary:
Iterator and Accessors are views only, not owning the data they point
to.

Also updated the tests by handling some test data that were leaking.

Fixes T8036

Reviewers: vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

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

Tags: #efl

Maniphest Tasks: T8036

Differential Revision: https://phab.enlightenment.org/D9189
2019-06-27 14:07:33 -03:00
Marcel Hollerbach 920a1b4a52 meson: disable xattr on macos
macos has a different implementation than linux for xattr. This commit
disables XATTR again for macos.
2019-06-27 17:18:54 +02:00
Marcel Hollerbach 5e54ad67ec efl_input_interface: verify check cancel event
this verifies that EFL_EVENT_POINTER_CANCEL is emitted correctly.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9171
2019-06-27 16:51:20 +02:00
Mike Blumenkrantz e399bdd6ec evas_events: implement POINTER_CANCEL event
it looks like this was left out during initial writing of eo-based eventing,
but based on the description, the intent was to have a separate cancel event
which was emitted just prior to the 'up' event using the existing state

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9184
2019-06-27 16:51:19 +02:00
Jongmin Lee 3edf75c319 meson: add some config definitions
Some config definitions used in source code could not be defined during build config process.
  - HAVE_XATTR
  - HAVE_CIPHER
  - HAVE_SIGNATURE
  - BUILD_ECORE_EVAS_EWS

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9192
2019-06-27 15:51:25 +02:00
Stefan Schmidt f8aa44eef7 ci: travis: update last jobs from Fedora 29 to 30 docker image
With the specsuite tests fixed now we can see that the build also works
with Fedora 30, so we can update the last missing jobs not having it.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9193
2019-06-27 13:59:20 +02:00
Mike Blumenkrantz 4c15ef65dd tests/elm: replace bespoke win/loop fast-forwarding with helper function
now we can consistently do event emissions inline in tests using much
simpler code

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9188
2019-06-27 09:45:12 +02:00
Mike Blumenkrantz 39833fe168 tests/efl_ui: add suite_helpers.h to efl_ui_suite.h
no need to manually include this for every file

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9187
2019-06-27 09:45:11 +02:00
Mike Blumenkrantz 14ac6a9e9e tests/elm: add helper function for simplifying getting to event triggering
the usual method is calc -> post render -> job to ensure everything is
set up. this simplifies getting to that job.

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9186
2019-06-27 09:45:10 +02:00