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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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.
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.
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
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.
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.
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.
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.
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
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
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
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
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
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
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
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
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
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
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