summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-12-20 19:45:07 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-12-20 19:57:17 -0200
commit481853e1edbba2536f0189335f564e6133644f84 (patch)
treef6572410bee12591c0917ddb04ce6f78d53de27c /src
parentc3beffb3cabee6710735c6067f33228dc3e7c015 (diff)
efl-mono: Fix using right description pointer in event registration
Diffstat (limited to 'src')
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh6
-rw-r--r--src/bindings/mono/eo_mono/iwrapper.cs8
2 files changed, 8 insertions, 6 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index d8bea22024..119cd73d12 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -562,7 +562,7 @@ struct klass
562 << scope_tab << scope_tab << "if (!event_cb_count.TryGetValue(key, out event_count))\n" 562 << scope_tab << scope_tab << "if (!event_cb_count.TryGetValue(key, out event_count))\n"
563 << scope_tab << scope_tab << scope_tab << "event_cb_count[key] = event_count;\n" 563 << scope_tab << scope_tab << scope_tab << "event_cb_count[key] = event_count;\n"
564 << scope_tab << scope_tab << "if (event_count == 0) {\n" 564 << scope_tab << scope_tab << "if (event_count == 0) {\n"
565 << scope_tab << scope_tab << scope_tab << "efl.kw_event.Description desc = new efl.kw_event.Description(key);\n" 565 << scope_tab << scope_tab << scope_tab << "IntPtr desc = efl.eo.Globals.dlsym(efl.eo.Globals.RTLD_DEFAULT, key);\n"
566 << scope_tab << scope_tab << scope_tab << "bool result = efl.eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evt_delegate, System.IntPtr.Zero);\n" 566 << scope_tab << scope_tab << scope_tab << "bool result = efl.eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evt_delegate, System.IntPtr.Zero);\n"
567 << scope_tab << scope_tab << scope_tab << "if (!result) {\n" 567 << scope_tab << scope_tab << scope_tab << "if (!result) {\n"
568 << scope_tab << scope_tab << scope_tab << scope_tab << "eina.Log.Error($\"Failed to add event proxy for event {key}\");\n" 568 << scope_tab << scope_tab << scope_tab << scope_tab << "eina.Log.Error($\"Failed to add event proxy for event {key}\");\n"
@@ -639,7 +639,7 @@ struct klass
639 << scope_tab << "}\n" 639 << scope_tab << "}\n"
640 << scope_tab << "private void on_" << event_name << "_NativeCallback(System.IntPtr data, ref efl.Event evt)\n" 640 << scope_tab << "private void on_" << event_name << "_NativeCallback(System.IntPtr data, ref efl.Event evt)\n"
641 << scope_tab << "{\n" 641 << scope_tab << "{\n"
642 << scope_tab << event_args 642 << scope_tab << scope_tab << event_args
643 << scope_tab << scope_tab << "try {\n" 643 << scope_tab << scope_tab << "try {\n"
644 << scope_tab << scope_tab << scope_tab << "On_" << event_name << "(args);\n" 644 << scope_tab << scope_tab << scope_tab << "On_" << event_name << "(args);\n"
645 << scope_tab << scope_tab << "} catch (Exception e) {\n" 645 << scope_tab << scope_tab << "} catch (Exception e) {\n"
@@ -730,7 +730,7 @@ struct klass
730 << scope_tab << "efl.Event_Cb evt_" << wrapper_evt_name << "_delegate;\n" 730 << scope_tab << "efl.Event_Cb evt_" << wrapper_evt_name << "_delegate;\n"
731 << scope_tab << "private void on_" << wrapper_evt_name << "_NativeCallback(System.IntPtr data, ref efl.Event evt)" 731 << scope_tab << "private void on_" << wrapper_evt_name << "_NativeCallback(System.IntPtr data, ref efl.Event evt)"
732 << scope_tab << "{\n" 732 << scope_tab << "{\n"
733 << scope_tab << event_args 733 << scope_tab << scope_tab << event_args
734 << scope_tab << scope_tab << "try {\n" 734 << scope_tab << scope_tab << "try {\n"
735 << scope_tab << scope_tab << scope_tab << "On_" << wrapper_evt_name << "(args);\n" 735 << scope_tab << scope_tab << scope_tab << "On_" << wrapper_evt_name << "(args);\n"
736 << scope_tab << scope_tab << "} catch (Exception e) {\n" 736 << scope_tab << scope_tab << "} catch (Exception e) {\n"
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs
index 98e8f953ba..7812e06367 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -52,8 +52,9 @@ public class Globals {
52 [DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_priority_add( 52 [DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_priority_add(
53 System.IntPtr obj, 53 System.IntPtr obj,
54 // FIXME commented to allow passing null stuff during test 54 // FIXME commented to allow passing null stuff during test
55 /* ref efl.kw_event.Description desc, */ 55 //ref efl.kw_event.Description desc,
56 efl.kw_event.Description desc, 56 //efl.kw_event.Description desc,
57 IntPtr desc,
57 short priority, 58 short priority,
58 efl.Event_Cb cb, 59 efl.Event_Cb cb,
59 System.IntPtr data); 60 System.IntPtr data);
@@ -62,7 +63,8 @@ public class Globals {
62 efl.kw_event.Description desc, 63 efl.kw_event.Description desc,
63 efl.Event_Cb cb, 64 efl.Event_Cb cb,
64 System.IntPtr data); 65 System.IntPtr data);
65 66 [DllImport(efl.Libs.Eo)] public static extern IntPtr
67 efl_object_legacy_only_event_description_get([MarshalAs(UnmanagedType.LPStr)] String name);
66 68
67 public const int RTLD_NOW = 2; 69 public const int RTLD_NOW = 2;
68 70