summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono/Eo.cs
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-02-06 17:50:28 -0200
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-03-01 23:04:08 -0300
commitdd89eb2fd1755c2816d97f28822639e03ed38608 (patch)
tree9931650c7db8f267e88b87103fe1c9cc85e0d594 /src/tests/efl_mono/Eo.cs
parent6d61ca915195a5ff4c5dc24c271d37fa22d64314 (diff)
efl-mono: Add support for Efl.Class
Efl.Class (in practice, the return from the *_class_get() functions) can be used as argument to functions, like in Efl.Object.provider_find and Efl.Ui.Widget_Factory.item_class(get/set). This commits adds support by representing Efl.Class instances as System.Type in the C# API, allowing someone to do things like: `factory.ItemClass == typeof(MyFramework.MyButton)` It also supports user-defined classes that inherit from efl classes.
Diffstat (limited to 'src/tests/efl_mono/Eo.cs')
-rw-r--r--src/tests/efl_mono/Eo.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index 9da7752e4b..c31c1ad219 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -400,4 +400,17 @@ class TestInterfaceConcrete
400 } 400 }
401} 401}
402 402
403class TestProvider
404{
405 public static void test_find_provider()
406 {
407 // Tests only the direction C# -> C
408 var tmp = new Dummy.Numberwrapper();
409 var obj = new Dummy.TestObject();
410 Dummy.Numberwrapper provider = Dummy.Numberwrapper.static_cast(obj.FindProvider(typeof(Dummy.Numberwrapper)));
411 Test.AssertEquals(provider.GetType(), typeof(Dummy.Numberwrapper));
412 Test.AssertEquals(provider.GetNumber(), 1999);
413 }
414}
415
403} 416}