summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono (follow)
AgeCommit message (Collapse)Author
5 dayseina_mono: replace eina_list and eina_array with IListYeongjong Lee
Summary: Eina.List<T> => System.Collections.Generic.IList<T> Eina.Array<T> => System.Collections.Generic.IList<T> ref T8486 Depends On D10785 Test Plan: meson build -Dbindings=mono,cxx -Dmono-beta=true Reviewers: felipealmeida, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8486, T8488 Differential Revision: https://phab.enlightenment.org/D10902
2019-12-23eo_mono: make BindingEntityAttribute internalYeongjong Lee
`BindingEntityAttribute` is used internally to check whether the object is generated binding classes or not. API user should use protected `IsGeneratedBindingClass` instead. Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br> Differential Revision: https://phab.enlightenment.org/D10937
2019-12-23eo_mono: make Eo.Globals internalYeongjong Lee
All members of `Eo.Globals` are already `internal`. It is unnecessary for `Eo.Globals` to be `public`. Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br> Differential Revision: https://phab.enlightenment.org/D10938
2019-12-20csharp: add documentation of class Efl.Eo.Config in iwrapperJaehyun Cho
Summary: Description and since efl version of the class Efl.Eo.Config is added. Reviewers: YOhoho, lauromoura, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10933
2019-12-19csharp: remove unused code in workaroundYeongjong Lee
Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10914
2019-12-18csharp: Fix passing acessor with ownershipLauro Moura
Summary: When passing an owned acessor from a converted collection we need a way to unpin the passed data when the accessor is freed. This commits adds a thin wrapper around the CArray accessor that unpins the data when freed. Depends on D10900 Reviewers: YOhoho, felipealmeida Reviewed By: YOhoho Subscribers: cedric, #reviewers, #committers, jptiz, brunobelo Tags: #efl Maniphest Tasks: T8486 Differential Revision: https://phab.enlightenment.org/D10901
2019-12-17csharp : add move tag info to EinaAccessor, EinaIterator converterYeongjong Lee
Summary: Included commits in devs/lauromoura/remove_eina_mono-rebased ``` commit ed6679db1901c710cc6ddb50e7001cfd20caa77a 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
2019-12-17eina_mono: replace EinaAccessor and EinaIerator with IEnumerableYeongjong Lee
Summary: Eina.Accessor<T> => System.Collections.IEnumerable<T> Eina.Iterator<T> => System.Collections.IEnumerable<T> Unit test will work with D10879. ref T8486 Test Plan: meson build -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8486 Differential Revision: https://phab.enlightenment.org/D10878
2019-12-17csharp:Suppressing Warning and Add suffix collection.Bruno da Silva Belo
Summary: ref T8408 Reviewers: lauromoura, felipealmeida, YOhoho, jptiz Reviewed By: jptiz Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8408 Differential Revision: https://phab.enlightenment.org/D10669
2019-12-17csharp: apply same form of "Since EFL" to all manual bindings .cs filesJaehyun Cho
The following form of "Since EFL" is applied to descriptions of all manual bindings .cs files. /// <para>Since EFL 1.XX.</para>
2019-12-09eolian_mono: reduce duplicated code in OnXXXEventYeongjong Lee
Summary: `CallNativeEventCallback` is used to reduce duplicated code. E.g. Before ``` protected virtual void OnFullscreenChangedEvent(Efl.Ui.WinFullscreenChangedEventArgs e) { var key = "_EFL_UI_WIN_EVENT_FULLSCREEN_CHANGED"; IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Elementary, key); if (desc == IntPtr.Zero) { Eina.Log.Error($"Failed to get native event {key}"); return; } IntPtr info = Eina.PrimitiveConversion.ManagedToPointerAlloc(e.arg ? (byte) 1 : (byte) 0); try { Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info); } finally { Marshal.FreeHGlobal(info); } } ``` After ``` protected virtual void OnFullscreenChangedEvent(Efl.Ui.WinFullscreenChangedEventArgs e) { IntPtr info = Eina.PrimitiveConversion.ManagedToPointerAlloc(e.arg ? (byte) 1 : (byte) 0); CallNativeEventCallback("elementary", "_EFL_UI_WIN_EVENT_FULLSCREEN_CHANGED", info, (p) => Marshal.FreeHGlobal(p)); } ``` Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10661
2019-11-20csharp: Specifying StringComparison.Bruno da Silva Belo
Summary: ref T8405 Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi Reviewed By: lauromoura Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8405 Differential Revision: https://phab.enlightenment.org/D10650
2019-11-19csharp: Add IEquatable on classes.Lauro Moura
Summary: ref T8418 Reviewers: lauromoura, felipealmeida, segfaultxavi, YOhoho Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8418 Differential Revision: https://phab.enlightenment.org/D10647
2019-11-12mono: reduce duplicated event codeYeongjong Lee
Summary: Introduction GetInternalEventCallback function to reduce duplicated event code. Test Plan: ninja test Reviewers: lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10638
2019-11-06csharp: Revamp dotnet supportLauro Moura
Summary: Instead of building with a patched meson version, make use of custom targets and generated csproj files so we can used upstream meson normally. This avoids digging into "non official" dotnet stuff like calling the CSC.dll directly that the patched meson tried to do. To enable, run meson with `-Ddotnet=true`. Regarding source file dependencies, Meson has a limitation[1] about generated artifacts being placed in subdirectories. In order to correctly track these generated artifacts for dotnet, we generated them in the same folder as the csproj file through `dotnet build -o`. Instead of installing the dll like we do for mono, a nupkg is generated and installed in the same folder as the dll would be (<prefix>/lib/x86_64-linux-gnu/efl-mono-1) To avoid messing around with Nupkg caches, we reference the source project for the library directly instead of the nupkg when building the test suite. [1] https://github.com/mesonbuild/meson/issues/2320 Fixes T8168 Reviewers: bu5hm4n, woohyun, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, brunobelo, felipealmeida, segfaultxavi Tags: #efl, #do_not_merge Maniphest Tasks: T8168 Differential Revision: https://phab.enlightenment.org/D9717
2019-11-04csharp: Changing visibility of nested class/structBruno da Silva Belo
Reviewers: felipealmeida, lauromoura, YOhoho Reviewed By: YOhoho Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8393 Differential Revision: https://phab.enlightenment.org/D10588
2019-11-01eo_mono: make Efl.EventDescription, Efl.Event, Efl.EventCb internalYeongjong Lee
Summary: Hide struct and delegate related to `IntPtr`. Depends on D10585 Depends on D10586 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/D10587
2019-11-01csharp: Refactor MarshalOwnLauro Moura
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
2019-10-31mono: blacklist efl_ui_text_context_menu_item_addYeongjong Lee
Summary: Blacklist a method which has `IntPtr` parameters. Reviewers: woohyun, segfaultxavi, YOhoho, felipealmeida Reviewed By: felipealmeida Subscribers: segfaultxavi, zmike, q66, bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10579
2019-10-31mono: remove duplicated EinaFreeCb delegateYeongjong Lee
Summary: Use Eina.Claabacks.EinaFreeCb instead. Reviewers: lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10577
2019-10-30csharp: FunctionWrapper doc fixesLauro Moura
Reviewers: felipealmeida, brunobelo, segfaultxavi, woohyun Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10430
2019-10-29mono: encapsulate internal workaround membersLauro Moura
Summary: Depends on D10345 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: segfaultxavi, Jaehyun_Cho, YOhoho Reviewed By: YOhoho Subscribers: cedric, #reviewers, woohyun, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10346
2019-10-29mono: encapsulate internal iwrapper membersLauro Moura
Summary: Depends on D10339 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: segfaultxavi, Jaehyun_Cho, YOhoho Reviewed By: YOhoho Subscribers: cedric, #reviewers, #committers, woohyun Tags: #efl Differential Revision: https://phab.enlightenment.org/D10345
2019-10-28mono: encapsulate internal NativeModuleLauro Moura
Summary: Depends on D10342 Depends on D10338 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers, woohyun Tags: #efl Differential Revision: https://phab.enlightenment.org/D10343
2019-10-28mono: encapsulate internal FunctionWrapperLauro Moura
Summary: Depends on D10340 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, woohyun, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10342
2019-10-28mono: encapsulate internal nativemethodsLauro Moura
Summary: Depends on D10337 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, woohyun, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10340
2019-10-28mono: encapsulate internal Add/RemoveNativeEventHandlerYeongjong Lee
Summary: Depends on D10337 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, woohyun, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10341
2019-10-28mono: encapsulate internal CustomMarshalerYeongjong Lee
Summary: Depends on D10337 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers, woohyun Tags: #efl Differential Revision: https://phab.enlightenment.org/D10344
2019-10-28csharp: Add missing exception ctr from iwrapper.Bruno da Silva Belo
Summary: ref T8392 Reviewers: felipealmeida, lauromoura, segfaultxavi, YOhoho Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8392 Differential Revision: https://phab.enlightenment.org/D10454
2019-10-25mono: implement dispose method based on dispose patternYeongjong Lee
Summary: Fix CA1063, CA1816 ref T8400, T8419 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true ninja test Reviewers: felipealmeida, brunobelo, YOhoho Reviewed By: YOhoho Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8419, T8400 Differential Revision: https://phab.enlightenment.org/D10460
2019-10-24csharp: Returning only method name iwrapper.Bruno da Silva Belo
Summary: GetUserMethods returning only strings, not the whole method informations. Reviewers: lauromoura, felipealmeida Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10503
2019-10-24csharp: Add since information to EoWrapper.csLauro Moura
Reviewers: brunobelo, segfaultxavi, felipealmeida, woohyun Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10429
2019-10-24mono: merge namespaces in manual bindingsYeongjong Lee
Summary: It will enhance readability. Before ``` namespace Efl { namespace Eo { ``` After ``` namespace Efl.Eo { ``` Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, Jaehyun_Cho, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10466
2019-10-24csharp: Add licensing information.Lauro Moura
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
2019-10-17mono: encapsulate invoke methodYeongjong Lee
Summary: This patch will fix compiler warning CA1401. Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, woohyun, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10338
2019-10-17mono: add static modifier to static holder types.Yeongjong Lee
Summary: This patch will fix CA1052 compiler warnings. 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/D10434
2019-10-17mono: remove underscores of Efl_Op_Description, Efl_Object_OpsYeongjong Lee
Summary: C# does not use underscore in type name. ref T8333 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8333 Differential Revision: https://phab.enlightenment.org/D10422
2019-10-16mono: make public static field const or readonlyYeongjong Lee
Summary: This patch will fix CA2211 compiler warnings. 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/D10423
2019-10-15csharp: Avoid direct usage of some dllimport funcsLauro Moura
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
2019-10-04csharp: Move locks inside AddRemove native handlersLauro Moura
Summary: Instead of using a lock block in every method definition, we just need them inside the actual methods adding/removing the handlers. Kudos to @herb for the suggestion. Reviewers: felipealmeida, herb, brunobelo Reviewed By: brunobelo Subscribers: cedric, #reviewers, herb, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9758
2019-10-01csharp: Load library in permanent way for static members and not rely on leaksFelipe Magno de Almeida
Summary: The LoadFunctionPointer relied on leaks of NativeModules by not disposing them. Instead do direct loading without instantiating unnecessary objects. Reviewers: lauromoura, woohyun, brunobelo Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10258
2019-09-30csharp: Allow improved cbs in eina comparatorsLauro Moura
Summary: Instead of receiving a callback that compares two intptrs (which is still used internally), expose a more C#-friendly delegate which is wrapped into the native one. Test Plan: run test suite Reviewers: felipealmeida, segfaultxavi, brunobelo Reviewed By: felipealmeida Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10253
2019-09-30mono-docs: Add some missing docs for workaround.csXavi Artigas
Test Plan: Only docs changed. Reviewers: lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10249
2019-09-24csharp: Fix wrapping of private classesLauro Moura
Summary: Sometimes, valid Eo objects of private classes can be returned from methods. Currently we try to wrap in a minimal `Efl.Object` instance, but as it is an abstract class, we can't instantiate directly. This commits adds a dummy `Efl.ObjectRealized` to be instantiated when wrapping such classes alongside a test case. Fixes: T8258 Reviewers: felipealmeida, brunobelo, segfaultxavi, Jaehyun_Cho Reviewed By: brunobelo Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10101
2019-09-10csharp: remove unused delegate and structYeongjong Lee
Summary: cleanup workaround.cs Test Plan: ninja test Reviewers: lauromoura, felipealmeida Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9895
2019-09-08eolian_mono: remove redundant code in NativeMethodsYeongjong Lee
Summary: Duplicated interface's NativeMethods code will be removed. they are called in `GetInterfaces`. Size of efl_mono.dll 6,587,392 bytes(6.6MB) -> 4,112,384 bytes (4.1MB) Test Plan: ninja test Reviewers: felipealmeida, lauromoura, vitor.sousa Reviewed By: lauromoura Subscribers: cedric, #reviewers, woohyun, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9752
2019-09-02csharp: add SetKeyValue and GetKeyValue to EoWrapperJaehyun Cho
Summary: SetKeyValue adds a value object associated with a key object to hash table. GetKeyValue returns a value object associated with a key object from hash table. Reviewers: felipealmeida, lauromoura, vitor.sousa, woohyun, cedric Subscribers: zmike, bu5hm4n, segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9622
2019-08-05efl-mono: Add Model manual implementation to C# and MVVM factoriesLauro Moura
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-07-26efl_mono: update docs of CreateWrapperForYeongjong Lee
Reviewers: lauromoura, felipealmeida, segfaultxavi, vitor.sousa Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9084
2019-07-26csharp: fix EFL# by updating it to reflect the newest changes in EolianVitor Sousa
Summary: `Efl.Event` became a builtin type that is no longer declared in `efl_object.eo`, and therefore it is no longer automatically generated in EFL#. Given that, we define a struct manually to reflect the memory layout of the native struct. Containers of value types are now allowed in eolian, so tests that were disabled because of the restriction on `ptr` were re-enabled using the plain type. But since these containers have just arrived, handling of ownership for value types is currently undefined in bindings. Hence, tests that used `ptr(int) @owned` as elements were left disable. This will be solved in a future patch. `void_pr` is now deprecated, so we remove it from tests also. Reviewers: q66, segfaultxavi, lauromoura, felipealmeida Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9417