summaryrefslogtreecommitdiff
path: root/src/examples/efl_mono
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2017-12-06 21:03:55 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-12-20 19:57:17 -0200
commit46b202b86ce1912653bfcae2db2dac045af9bb2b (patch)
tree37e0256e4d3046bb24c555b472791f81b4f6d28f /src/examples/efl_mono
parent0609c68e34940e40e0caae1bb9dfc48d4eaa306e (diff)
downloadefl-46b202b86ce1912653bfcae2db2dac045af9bb2b.tar.gz
eolian-mono: Add documentation generation support
This commit adds the "documentation" generator, which gets the documentation_def attribute of the given item and generates xml comments to be exported by MCS. For items requiring some customization of the generated comments (e.g. functions and its parameters), the helpers to generate the preamble (summary), body (paragraphs) and epilogue (currently just the @since tag) were added. Currently we do not support converting Eolian references into xmldoc references. As we explicitly generate Get/Set methods for properties, for now the generator tries to get the get/set specific documentation first. If it is not present, fallback to the common docs. Later this could be changed to generate the common one as paragraphs of the Get/Set. Also some generated code like the wrappers for calling C# methods from C can be private. This will cleanup the introspection results and warnings when generating documentation. Due to this visibility change, the binbuf tests had to be changed to add redirect calls to the native methods instead of directly calling the DllImport'd methods.
Diffstat (limited to 'src/examples/efl_mono')
-rw-r--r--src/examples/efl_mono/EoInherit01.cs2
-rw-r--r--src/examples/efl_mono/example_numberwrapper.c5
-rw-r--r--src/examples/efl_mono/example_numberwrapper.eo6
3 files changed, 12 insertions, 1 deletions
diff --git a/src/examples/efl_mono/EoInherit01.cs b/src/examples/efl_mono/EoInherit01.cs
index 6b899aeca1..17ea4df27e 100644
--- a/src/examples/efl_mono/EoInherit01.cs
+++ b/src/examples/efl_mono/EoInherit01.cs
@@ -30,7 +30,7 @@ public class ExampleEoInherit01
int given = 111;
// Call the C# override from the C method
- example.NumberwrapperConcrete.example_numberwrapper_number_set(inheritObj.raw_handle, given);
+ inheritObj.CallNumberSet(given);
WriteLine($"Override successfully called? {inheritObj.derivedCalled}!\n");
diff --git a/src/examples/efl_mono/example_numberwrapper.c b/src/examples/efl_mono/example_numberwrapper.c
index f80dee616a..4ec0f72df1 100644
--- a/src/examples/efl_mono/example_numberwrapper.c
+++ b/src/examples/efl_mono/example_numberwrapper.c
@@ -52,6 +52,11 @@ void _example_numberwrapper_number_set(EINA_UNUSED Eo *obj, Example_Numberwrappe
pd->number = n;
}
+void _example_numberwrapper_number_set_call(Eo *obj, EINA_UNUSED Example_Numberwrapper_Data *pd, int n)
+{
+ example_numberwrapper_number_set(obj, n);
+}
+
int _example_numberwrapper_number_get(EINA_UNUSED Eo *obj, Example_Numberwrapper_Data *pd)
{
return pd->number;
diff --git a/src/examples/efl_mono/example_numberwrapper.eo b/src/examples/efl_mono/example_numberwrapper.eo
index 85f2ce4a4d..4e0279e867 100644
--- a/src/examples/efl_mono/example_numberwrapper.eo
+++ b/src/examples/efl_mono/example_numberwrapper.eo
@@ -17,6 +17,12 @@ class Example.Numberwrapper (Efl.Object) {
}
}
+ number_set_call {
+ params {
+ n: int;
+ }
+ }
+
number_callback_set {
params {
cb: NumberCb;