efl_mono: Fix events after Event_Description rename.

This commit is contained in:
Lauro Moura 2018-05-23 10:07:05 -03:00 committed by Daniel Kolesa
parent e5ef9057b5
commit c4572d3f79
5 changed files with 7 additions and 12 deletions

View File

@ -56,7 +56,7 @@ inline bool is_function_blacklisted(std::string const& c_name)
// Blacklist structs that require some kind of manual binding.
inline bool is_struct_blacklisted(std::string const& full_name)
{
return full_name == "Efl.Event.Description"
return full_name == "Efl.Event_Description"
|| full_name == "Eina.Binbuf"
|| full_name == "Eina.Strbuf"
|| full_name == "Eina.Slice"

View File

@ -500,7 +500,7 @@ struct klass
<< scope_tab << scope_tab << "if (!event_cb_count.TryGetValue(key, out event_count))\n"
<< scope_tab << scope_tab << scope_tab << "event_cb_count[key] = event_count;\n"
<< scope_tab << scope_tab << "if (event_count == 1) {\n"
<< scope_tab << scope_tab << scope_tab << "efl.kw_event.Description desc = new efl.kw_event.Description(key);\n"
<< scope_tab << scope_tab << scope_tab << "efl.Event_Description desc = new efl.Event_Description(key);\n"
<< scope_tab << scope_tab << scope_tab << "bool result = efl.eo.Globals.efl_event_callback_del(handle, desc, evt_delegate, System.IntPtr.Zero);\n"
<< scope_tab << scope_tab << scope_tab << "if (!result) {\n"
<< scope_tab << scope_tab << scope_tab << scope_tab << "eina.Log.Error($\"Failed to remove event proxy for event {key}\");\n"

View File

@ -368,7 +368,7 @@ struct struct_binding_conversion_functions_generator
// Open conversion class
if (!as_generator
(
"internal static class " << string << "_StructConversion\n{\n"
"public static class " << string << "_StructConversion\n{\n"
)
.generate(sink, struct_.cxx_name, context))
return false;

View File

@ -53,16 +53,13 @@ public class Globals {
[DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_priority_add(
System.IntPtr obj,
// FIXME commented to allow passing null stuff during test
//ref efl.kw_event.Description desc,
//efl.kw_event.Description desc,
IntPtr desc,
short priority,
efl.Event_Cb cb,
System.IntPtr data);
[DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_del(
System.IntPtr obj,
efl.kw_event.Description desc,
efl.Event_Description desc,
efl.Event_Cb cb,
System.IntPtr data);
[DllImport(efl.Libs.Eo)] public static extern IntPtr

View File

@ -70,10 +70,10 @@ public struct Evas_Object_Box_Option {
};
#pragma warning restore 0169
namespace efl { namespace kw_event {
namespace efl {
[StructLayout(LayoutKind.Sequential)]
public struct Description {
public struct Event_Description {
public IntPtr Name;
[MarshalAs(UnmanagedType.U1)] public bool Unfreezable;
[MarshalAs(UnmanagedType.U1)] public bool Legacy_is;
@ -81,7 +81,7 @@ public struct Description {
private static Dictionary<string, IntPtr> descriptions = new Dictionary<string, IntPtr>();
public Description(string name)
public Event_Description(string name)
{
if (!descriptions.ContainsKey(name))
{
@ -101,8 +101,6 @@ public struct Description {
}
};
} // namespace kw_event
public delegate void Event_Cb(System.IntPtr data, ref Event evt);
#pragma warning disable 0169