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)
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 6b899ae..17ea4df 100644
--- a/src/examples/efl_mono/EoInherit01.cs
+++ b/src/examples/efl_mono/EoInherit01.cs
@@ -30,7 +30,7 @@ public class ExampleEoInherit01
30 int given = 111; 30 int given = 111;
31 31
32 // Call the C# override from the C method 32 // Call the C# override from the C method
33 example.NumberwrapperConcrete.example_numberwrapper_number_set(inheritObj.raw_handle, given); 33 inheritObj.CallNumberSet(given);
34 34
35 WriteLine($"Override successfully called? {inheritObj.derivedCalled}!\n"); 35 WriteLine($"Override successfully called? {inheritObj.derivedCalled}!\n");
36 36
diff --git a/src/examples/efl_mono/example_numberwrapper.c b/src/examples/efl_mono/example_numberwrapper.c
index f80dee6..4ec0f72 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
52 pd->number = n; 52 pd->number = n;
53} 53}
54 54
55void _example_numberwrapper_number_set_call(Eo *obj, EINA_UNUSED Example_Numberwrapper_Data *pd, int n)
56{
57 example_numberwrapper_number_set(obj, n);
58}
59
55int _example_numberwrapper_number_get(EINA_UNUSED Eo *obj, Example_Numberwrapper_Data *pd) 60int _example_numberwrapper_number_get(EINA_UNUSED Eo *obj, Example_Numberwrapper_Data *pd)
56{ 61{
57 return pd->number; 62 return pd->number;
diff --git a/src/examples/efl_mono/example_numberwrapper.eo b/src/examples/efl_mono/example_numberwrapper.eo
index 85f2ce4..4e0279e 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) {
17 } 17 }
18 } 18 }
19 19
20 number_set_call {
21 params {
22 n: int;
23 }
24 }
25
20 number_callback_set { 26 number_callback_set {
21 params { 27 params {
22 cb: NumberCb; 28 cb: NumberCb;