Conflictings events won't be allowed anymore on eolian-based classes.
For manually subclassed C# classes that eventually have conflicts, this
should be dealt with in T7744.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8426
efl_mono_test_files = \
tests/efl_mono/dummy_test_object.eo \
tests/efl_mono/dummy_test_iface.eo \
- tests/efl_mono/dummy_another_iface.eo \
tests/efl_mono/dummy_child.eo \
tests/efl_mono/dummy_part_holder.eo \
tests/efl_mono/dummy_numberwrapper.eo \
tests/efl_mono/dummy_test_object.eo.c \
tests/efl_mono/dummy_test_iface.eo.h \
tests/efl_mono/dummy_test_iface.eo.c \
- tests/efl_mono/dummy_another_iface.eo.h \
- tests/efl_mono/dummy_another_iface.eo.c \
tests/efl_mono/dummy_child.eo.h \
tests/efl_mono/dummy_child.eo.c \
tests/efl_mono/dummy_part_holder.eo.h \
# Intermediate C Sharp test DLL
efl_mono_test_eolian_mono_files = tests/efl_mono/dummy_test_object.eo.cs \
tests/efl_mono/dummy_test_iface.eo.cs \
-tests/efl_mono/dummy_another_iface.eo.cs \
tests/efl_mono/dummy_child.eo.cs \
tests/efl_mono/dummy_part_holder.eo.cs \
tests/efl_mono/dummy_numberwrapper.eo.cs \
obj.EmitNonconflicted();
Test.Assert(called);
}
-
- public static void test_conflicting_events()
- {
- var obj = new Dummy.TestObject();
- var test_called = false;
- var another_called = false;
-
- EventHandler cb = (object sender, EventArgs e) => {
- test_called = true;
- };
-
- EventHandler another_cb = (object sender, EventArgs e) => {
- another_called = true;
- };
-
- ((Dummy.TestIface)obj).ConflictedEvt += cb;
- ((Dummy.AnotherIface)obj).ConflictedEvt += another_cb;
-
- obj.EmitTestConflicted();
- Test.Assert(test_called);
- Test.Assert(!another_called);
- test_called = false;
-
- obj.EmitAnotherConflicted();
- Test.Assert(!test_called);
- Test.Assert(another_called);
- }
}
class TestEventNaming
+++ /dev/null
-interface Dummy.Another_Iface
-{
- methods {
- emit_another_conflicted {
- }
- }
- events {
- conflicted: void;
- }
-}
interface Dummy.Test_Iface
{
methods {
- emit_test_conflicted {
- }
emit_nonconflicted {
}
@property iface_prop {
}
}
events {
- conflicted: void;
nonconflicted: void;
}
}
}
};
-class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface, Dummy.Another_Iface {
+class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface {
methods {
return_object {
return: Dummy.Test_Object;
class.destructor;
Efl.Object.constructor;
Efl.Object.provider_find;
- Dummy.Test_Iface.emit_test_conflicted;
Dummy.Test_Iface.emit_nonconflicted;
Dummy.Test_Iface.iface_prop { get; set; }
- Dummy.Another_Iface.emit_another_conflicted;
}
events {
evt,with,string @hot: string;
#include "dummy_test_object.eo.h"
#include "dummy_child.eo.h"
#include "dummy_test_iface.eo.h"
-#include "dummy_another_iface.eo.h"
#include "dummy_inherit_iface.eo.h"
#include "dummy_inherit_helper.eo.h"
#include "dummy_part_holder.eo.h"
return eina_list_accessor_new(pd->list_for_accessor);
}
-void _dummy_test_object_dummy_test_iface_emit_test_conflicted(Eo *obj, Dummy_Test_Object_Data *pd EINA_UNUSED)
-{
- efl_event_callback_legacy_call(obj, DUMMY_TEST_IFACE_EVENT_CONFLICTED, NULL);
-}
-
void _dummy_test_object_dummy_test_iface_emit_nonconflicted(Eo *obj, Dummy_Test_Object_Data *pd EINA_UNUSED)
{
efl_event_callback_legacy_call(obj, DUMMY_TEST_IFACE_EVENT_NONCONFLICTED, NULL);
}
-void _dummy_test_object_dummy_another_iface_emit_another_conflicted(Eo *obj, Dummy_Test_Object_Data *pd EINA_UNUSED)
-{
- efl_event_callback_legacy_call(obj, DUMMY_ANOTHER_IFACE_EVENT_CONFLICTED, NULL);
-}
-
void _dummy_test_object_setter_only_set(EINA_UNUSED Eo *obj, Dummy_Test_Object_Data *pd, int value)
{
pd->setter_only = value;
#include "dummy_numberwrapper.eo.c"
#include "dummy_child.eo.c"
#include "dummy_test_iface.eo.c"
-#include "dummy_another_iface.eo.c"
#include "dummy_inherit_helper.eo.c"
#include "dummy_inherit_iface.eo.c"
#include "dummy_part_holder.eo.c"
-eo_files = ['dummy_child.eo', 'dummy_numberwrapper.eo', 'dummy_test_object.eo', 'dummy_test_iface.eo', 'dummy_another_iface.eo', 'dummy_inherit_helper.eo', 'dummy_inherit_iface.eo', 'dummy_part_holder.eo']
+eo_files = ['dummy_child.eo', 'dummy_numberwrapper.eo', 'dummy_test_object.eo', 'dummy_test_iface.eo', 'dummy_inherit_helper.eo', 'dummy_inherit_iface.eo', 'dummy_part_holder.eo']
eo_file_targets = []