Empty ExtensionMethods class won't be generated.
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D10954
Use Indexers to use brackets, eg [i], syntax.
Keys now can be used as following:
var someVal = obj.SomeProperty[key];
obj.SomeProperty[key] = someNewVal;
And for multiple keys:
var someVal = obj.SomeProperty[(key1, key2)];
obj.SomeProperty[(key1, key2)] = someNewVal;
T8384
Reviewed-by: WooHyun Jung <wh0705.jung@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10791
Summary:
currently select is verb and mono name is exposed SelectAll
but unselect is non-verb and mono name is exposed AllUnselect.
to fix this differencies, add unselect in the verb list.
Reviewers: segfaultxavi, Jaehyun_Cho
Reviewed By: Jaehyun_Cho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10952
Summary:
Since Constants class contains static readonly values only, the
Constants class is actually a static class.
Therefore, Constants class is changed from public partial class to
public static partial class.
ref T8398
Reviewers: YOhoho, lauromoura
Reviewed By: YOhoho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10929
Summary:
Included commits in devs/lauromoura/remove_eina_mono-rebased
```
commit ed6679db19
Author: Lauro Moura <lauromoura@expertisesolutions.com.br>
Date: Mon Dec 2 13:58:04 2019 -0300
csharp: add move information to EnumerableToAccessor
Still need to fix the converted accessor ownership, maybe by creating a
custom accessor class that released the pinned memory when is freed.
```
ref T8486
Depends On D10878
Co-authored-by: Lauro Moura <lauromoura@expertisesolutions.com.br>
Test Plan: meson build -Dbindings=mono,cxx -Dmono-beta=true
Reviewers: YOhoho
Reviewed By: YOhoho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8486
Differential Revision: https://phab.enlightenment.org/D10879
Summary:
The documentation tokenizer relies on proper separation of paragraphs,
and we were not doing that. This fixes detection of Note:, Warning:,
Remark: and TODO: tags.
Additionally, we were removing the blank line between the summary and
the description, artificially joining them.
Test Plan: Everything builds and passes tests, and docs with `Note:` tags are correctly rendered (like `Efl.Loop_Consumer.new_promise`, for example)
Reviewers: lauromoura
Reviewed By: lauromoura
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10868
Summary:
Usage example:
```
var (x, y) = somePos2D;
```
Not available on Mono environment due to [`mcs` not implementing
it](a3de0304a1/mcs/mcs/tuples.cs (L590)).
To keep tests from breaking because of it, a `MONO` preprocessor variable is
defined and checked during test compilation.
Ref T8489.
Reviewers: brunobelo, lauromoura, segfaultxavi
Reviewed By: lauromoura
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8489
Differential Revision: https://phab.enlightenment.org/D10809
Summary:
Also generates implicit conversion for 1-field structs.
Usage examples:
```
// With tuples
Point2D p = (1, 2);
obj.SetPoint((1, 2));
// With 1-field structs
StringWrapper sw = "Must be handled by wrapper.";
```
Due to limitations of MSC compiler, implicit conversions are generated
only if struct has 4 fields or less.
Ref T8489.
Reviewers: brunobelo, cedric, lauromoura, segfaultxavi
Reviewed By: lauromoura
Subscribers: #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8489
Differential Revision: https://phab.enlightenment.org/D10801
This has never been tested because so far EO "Note:" tags are only recognized
when they appear at the beginning of a comment block.
It turns out the note already includes the "Note:" prefix so we were adding it
twice.
This patch removes one of the prefixes and used a nicer formatting.
Also works for "Warning:", "Remark:" and "TODO:".
When an EO property had multiple values or keys the C# generator
didn't generate a wrapping C# property. Therefore property references
in the documentation were changed to references to the getter.
Now multiple values are handled through tuples so the wrapping properties
ARE generated.
This patch removes the restriction for multiple values to doc refs
can more naturally reference the property instead of the getter method.
Properties with keys still reference the getter, since these are not wrapped.
Summary:
Container can have three configuration over `Own` and `OwnContent`:
`Own = true` and `OwnContent = true`;
`Own = true` and `OwnContent = false`;
`Own = false`and `OwnContent = false;
If someone try to instanciate the container with `Own = false` and `OwnContent = true`, a exception raises.
There is two Ownerships' behaviours in c#, where `IsReadOnly` is responsible and `IsReadOnly = !OwnContent`:
Full Ownership: User can use modify/Add/Remove operations over the container, this is implemented with `OwnContent = true`.
No Ownership: User **cannot** use modify/Add/Remove operations, this is implemented with `OwnContent = false`.
For the memory, `Own` frees the node, while `OwnContent` frees the data portion.
ref T8487
Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi, jptiz
Reviewed By: lauromoura
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8487
Differential Revision: https://phab.enlightenment.org/D10742
Summary:
Small refactor. Keep it in a single header that other files could use.
Ref T8515
Reviewers: brunobelo, felipealmeida, jptiz
Reviewed By: jptiz
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8515
Differential Revision: https://phab.enlightenment.org/D10852
Summary:
Better names to convey their intent and formatting.
Removing the hardcoded `return` from them will also free the return list
to be used for `@out` parameters as they have similar semantics to
`return`, different from regular `@in` parameters. This change in
behavior will come in a future commit, and explains why are are keeping
both lists for now despite being essentially the same.
Ref T8515
Test Plan: Run existing tests
Reviewers: felipealmeida, brunobelo, jptiz, YOhoho
Reviewed By: jptiz
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8515
Differential Revision: https://phab.enlightenment.org/D10827
Summary:
Using the naive approach of checking if the name ends with `Flags`.
Ref T8411
Depends on D10708
Reviewers: brunobelo, segfaultxavi, felipealmeida, YOhoho
Reviewed By: felipealmeida
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8411
Differential Revision: https://phab.enlightenment.org/D10709
Summary: Was failing if the suffix were equal to the source string
Reviewers: felipealmeida, segfaultxavi, YOhoho, brunobelo
Reviewed By: brunobelo
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10708
Summary:
They don't actually store unmanaged memory and we already rely on the GC
to free them (not calling Dispose() directly through the managedCb
closure, so we don't need IDisposable.
Just making sure we release the Function Pointer data in the main loop
as the GC runs in a different thread.
Ref T8423
Depends on D10672
Reviewers: brunobelo, felipealmeida, YOhoho
Reviewed By: brunobelo
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8423
Differential Revision: https://phab.enlightenment.org/D10673
Summary:
These methods may instantiate `IDisposable` classes like `Array`,
`Iterator` to pass to user-overriden C# methods. As we can't
guarantee the user stored the object or not, we can't call Dispose
directly on them.
Ref T8423
Depends on D10670
Reviewers: brunobelo, felipealmeida, YOhoho
Reviewed By: brunobelo
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8423
Differential Revision: https://phab.enlightenment.org/D10671
Summary:
This also adds a helper method to convert from a value type name to the
reference type name. (e.g. int to Int32).
Ref T8430
Reviewers: felipealmeida, brunobelo, YOhoho
Reviewed By: brunobelo
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8430
Differential Revision: https://phab.enlightenment.org/D10653
Summary:
```
private static void relation_left_get(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IEntity child, out Efl.Gfx.IEntity kw_base, out Efl.Gfx.Align relative_position)
{
Eina.Log.Debug("function efl_ui_relative_container_relation_left_get was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
base = default(Efl.Gfx.IEntity);relative_position = default(Efl.Gfx.Align);
```
Parameter name is replaced with `kw_base` but `base` is not changed in assignment expression (`base = default(Efl.Gfx.IEntity...`).
This patch will fix following compiler error.
```
src/bindings/mono/efl_ui_relative_container.eo.cs(544,21): error CS1525: Unexpected symbol `=', expecting `.' or `['
```
Test Plan: ninja with D10640
Reviewers: lauromoura
Reviewed By: lauromoura
Subscribers: segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10639
Summary:
`efl_part_get` is protected in C due to the presence of `efl_part`,
which does automatic refcount management in single method calls.
The C# binding has no limitation on this as it already handles the
lifetime for all objects.
Fixes T8462
Reviewers: brunobelo, segfaultxavi, SanghyeonLee
Reviewed By: SanghyeonLee
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8462
Differential Revision: https://phab.enlightenment.org/D10594
Summary:
`efl_event_callback_forwarder_priority_del`
=> It can be replaced with `obj.XXXEvent -= callback;`.
Furthermore, `efl_event_callback_forwarder_priority_add` is already in blacklist.
`efl_ui_widget_input_event_handler`
=> It can be replaced with `obj.DownEvent`, `obj.UpEvent` and `obj.PointerWhellEvent`.
`efl_access_object_event_handler_add`
`efl_access_object_event_handler_del`
`efl_access_object_event_emit`
=> They are functions to handle global event related to access(E.g. `elm_atspi_bridge`).
It should be generated to `static event` in C#.
Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true
Reviewers: lauromoura, Jaehyun_Cho
Reviewed By: lauromoura
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10585
Summary:
Instead of using the empty interface as tag, split MarshalOwn into two
marshalers that can be used directly.
Fixes T8395 (CA1040)
Test Plan: no new functionality. Use existing tests
Reviewers: felipealmeida, brunobelo, segfaultxavi, YOhoho
Reviewed By: YOhoho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8395
Differential Revision: https://phab.enlightenment.org/D10457
Summary:
C# bindings will be lincensed under Apache Sofware License 2.0.
This commit adds the license text to the licenses folder and a copyright
notice to the binding files.
Fixes T8039
Reviewers: woohyun, felipealmeida, vitor.sousa
Reviewed By: felipealmeida
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8039
Differential Revision: https://phab.enlightenment.org/D9414
Summary:
Instead of accessing them directly, generated code should access them
only through proper managed wrappers.
JIT should take care of inline them.
This would allow D10338 without depending on the friendly assembly feature.
Reviewers: YOhoho, felipealmeida, brunobelo, woohyun, segfaultxavi
Reviewed By: YOhoho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10366