forked from enlightenment/efl
efl_mono: Fix events after Event_Description rename.
This commit is contained in:
parent
e5ef9057b5
commit
c4572d3f79
|
@ -56,7 +56,7 @@ inline bool is_function_blacklisted(std::string const& c_name)
|
||||||
// Blacklist structs that require some kind of manual binding.
|
// Blacklist structs that require some kind of manual binding.
|
||||||
inline bool is_struct_blacklisted(std::string const& full_name)
|
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.Binbuf"
|
||||||
|| full_name == "Eina.Strbuf"
|
|| full_name == "Eina.Strbuf"
|
||||||
|| full_name == "Eina.Slice"
|
|| full_name == "Eina.Slice"
|
||||||
|
|
|
@ -500,7 +500,7 @@ struct klass
|
||||||
<< scope_tab << scope_tab << "if (!event_cb_count.TryGetValue(key, out event_count))\n"
|
<< 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 << scope_tab << "event_cb_count[key] = event_count;\n"
|
||||||
<< scope_tab << scope_tab << "if (event_count == 1) {\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 << "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 << "if (!result) {\n"
|
||||||
<< scope_tab << scope_tab << scope_tab << scope_tab << "eina.Log.Error($\"Failed to remove event proxy for event {key}\");\n"
|
<< scope_tab << scope_tab << scope_tab << scope_tab << "eina.Log.Error($\"Failed to remove event proxy for event {key}\");\n"
|
||||||
|
|
|
@ -368,7 +368,7 @@ struct struct_binding_conversion_functions_generator
|
||||||
// Open conversion class
|
// Open conversion class
|
||||||
if (!as_generator
|
if (!as_generator
|
||||||
(
|
(
|
||||||
"internal static class " << string << "_StructConversion\n{\n"
|
"public static class " << string << "_StructConversion\n{\n"
|
||||||
)
|
)
|
||||||
.generate(sink, struct_.cxx_name, context))
|
.generate(sink, struct_.cxx_name, context))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -53,16 +53,13 @@ public class Globals {
|
||||||
|
|
||||||
[DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_priority_add(
|
[DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_priority_add(
|
||||||
System.IntPtr obj,
|
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,
|
IntPtr desc,
|
||||||
short priority,
|
short priority,
|
||||||
efl.Event_Cb cb,
|
efl.Event_Cb cb,
|
||||||
System.IntPtr data);
|
System.IntPtr data);
|
||||||
[DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_del(
|
[DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_del(
|
||||||
System.IntPtr obj,
|
System.IntPtr obj,
|
||||||
efl.kw_event.Description desc,
|
efl.Event_Description desc,
|
||||||
efl.Event_Cb cb,
|
efl.Event_Cb cb,
|
||||||
System.IntPtr data);
|
System.IntPtr data);
|
||||||
[DllImport(efl.Libs.Eo)] public static extern IntPtr
|
[DllImport(efl.Libs.Eo)] public static extern IntPtr
|
||||||
|
|
|
@ -70,10 +70,10 @@ public struct Evas_Object_Box_Option {
|
||||||
};
|
};
|
||||||
#pragma warning restore 0169
|
#pragma warning restore 0169
|
||||||
|
|
||||||
namespace efl { namespace kw_event {
|
namespace efl {
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct Description {
|
public struct Event_Description {
|
||||||
public IntPtr Name;
|
public IntPtr Name;
|
||||||
[MarshalAs(UnmanagedType.U1)] public bool Unfreezable;
|
[MarshalAs(UnmanagedType.U1)] public bool Unfreezable;
|
||||||
[MarshalAs(UnmanagedType.U1)] public bool Legacy_is;
|
[MarshalAs(UnmanagedType.U1)] public bool Legacy_is;
|
||||||
|
@ -81,7 +81,7 @@ public struct Description {
|
||||||
|
|
||||||
private static Dictionary<string, IntPtr> descriptions = new Dictionary<string, IntPtr>();
|
private static Dictionary<string, IntPtr> descriptions = new Dictionary<string, IntPtr>();
|
||||||
|
|
||||||
public Description(string name)
|
public Event_Description(string name)
|
||||||
{
|
{
|
||||||
if (!descriptions.ContainsKey(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);
|
public delegate void Event_Cb(System.IntPtr data, ref Event evt);
|
||||||
#pragma warning disable 0169
|
#pragma warning disable 0169
|
||||||
|
|
Loading…
Reference in New Issue