summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-01-17 13:59:56 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-01-17 13:59:57 -0500
commit1534f50be0cbbc00c50bf75c8ef7afba49455741 (patch)
treea6b40bb44b47767d75b68b88b23982bc9bf0b4af /src/lib/ecore
parent57ceb9b8ea8ac6f0502d473317e4c1e7017c4186 (diff)
Make Efl.Ui.Closer an interface instead of mixin
Summary: It is a mixin only because of the setter method for the "closed" property, otherwise, it would be a pure interface. Nobody is setting that property, so let's just remove the setter (leaving only the getter) and make this class an interface. This should clear the scenario for languages currently having issues with mixins (like C#). Related to T7601. Test Plan: Nothing changes. Make check and examples still work. Reviewers: zmike, bu5hm4n, cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7570
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/efl_io_buffered_stream.c2
-rw-r--r--src/lib/ecore/efl_io_copier.c28
2 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/ecore/efl_io_buffered_stream.c b/src/lib/ecore/efl_io_buffered_stream.c
index a02b6bbb3e..53b1edaf1d 100644
--- a/src/lib/ecore/efl_io_buffered_stream.c
+++ b/src/lib/ecore/efl_io_buffered_stream.c
@@ -351,7 +351,7 @@ _efl_io_buffered_stream_inner_io_set(Eo *o, Efl_Io_Buffered_Stream_Data *pd, Efl
351 EINA_SAFETY_ON_NULL_RETURN(io); 351 EINA_SAFETY_ON_NULL_RETURN(io);
352 EINA_SAFETY_ON_TRUE_RETURN(pd->inner_io != NULL); 352 EINA_SAFETY_ON_TRUE_RETURN(pd->inner_io != NULL);
353 353
354 pd->is_closer = efl_isa(io, EFL_IO_CLOSER_MIXIN); 354 pd->is_closer = efl_isa(io, EFL_IO_CLOSER_INTERFACE);
355 is_reader = efl_isa(io, EFL_IO_READER_INTERFACE); 355 is_reader = efl_isa(io, EFL_IO_READER_INTERFACE);
356 is_writer = efl_isa(io, EFL_IO_WRITER_INTERFACE); 356 is_writer = efl_isa(io, EFL_IO_WRITER_INTERFACE);
357 357
diff --git a/src/lib/ecore/efl_io_copier.c b/src/lib/ecore/efl_io_copier.c
index a03168807c..dbedfcf959 100644
--- a/src/lib/ecore/efl_io_copier.c
+++ b/src/lib/ecore/efl_io_copier.c
@@ -55,7 +55,7 @@ static void _efl_io_copier_read(Eo *o, Efl_Io_Copier_Data *pd);
55 efl_ref_count(pd->source), \ 55 efl_ref_count(pd->source), \
56 efl_io_reader_can_read_get(pd->source), \ 56 efl_io_reader_can_read_get(pd->source), \
57 efl_io_reader_eos_get(pd->source), \ 57 efl_io_reader_eos_get(pd->source), \
58 efl_isa(pd->source, EFL_IO_CLOSER_MIXIN) ? \ 58 efl_isa(pd->source, EFL_IO_CLOSER_INTERFACE) ? \
59 efl_io_closer_closed_get(pd->source) : 0); \ 59 efl_io_closer_closed_get(pd->source) : 0); \
60 if (!pd->destination) \ 60 if (!pd->destination) \
61 DBG("destination=NULL"); \ 61 DBG("destination=NULL"); \
@@ -65,7 +65,7 @@ static void _efl_io_copier_read(Eo *o, Efl_Io_Copier_Data *pd);
65 efl_class_name_get(efl_class_get(pd->destination)), \ 65 efl_class_name_get(efl_class_get(pd->destination)), \
66 efl_ref_count(pd->destination), \ 66 efl_ref_count(pd->destination), \
67 efl_io_writer_can_write_get(pd->destination), \ 67 efl_io_writer_can_write_get(pd->destination), \
68 efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN) ? \ 68 efl_isa(pd->destination, EFL_IO_CLOSER_INTERFACE) ? \
69 efl_io_closer_closed_get(pd->destination) : 0); \ 69 efl_io_closer_closed_get(pd->destination) : 0); \
70 } \ 70 } \
71 } \ 71 } \
@@ -418,7 +418,7 @@ _efl_io_copier_source_set(Eo *o, Efl_Io_Copier_Data *pd, Efl_Io_Reader *source)
418 _efl_io_copier_source_resized, o); 418 _efl_io_copier_source_resized, o);
419 pd->progress.total = 0; 419 pd->progress.total = 0;
420 } 420 }
421 if (efl_isa(pd->source, EFL_IO_CLOSER_MIXIN)) 421 if (efl_isa(pd->source, EFL_IO_CLOSER_INTERFACE))
422 { 422 {
423 efl_event_callback_del(pd->source, EFL_IO_CLOSER_EVENT_CLOSED, 423 efl_event_callback_del(pd->source, EFL_IO_CLOSER_EVENT_CLOSED,
424 _efl_io_copier_source_closed, o); 424 _efl_io_copier_source_closed, o);
@@ -441,7 +441,7 @@ _efl_io_copier_source_set(Eo *o, Efl_Io_Copier_Data *pd, Efl_Io_Reader *source)
441 _efl_io_copier_source_size_apply(o, pd); 441 _efl_io_copier_source_size_apply(o, pd);
442 } 442 }
443 443
444 if (efl_isa(pd->source, EFL_IO_CLOSER_MIXIN)) 444 if (efl_isa(pd->source, EFL_IO_CLOSER_INTERFACE))
445 { 445 {
446 efl_io_closer_close_on_exec_set(pd->source, efl_io_closer_close_on_exec_get(o)); 446 efl_io_closer_close_on_exec_set(pd->source, efl_io_closer_close_on_exec_get(o));
447 efl_io_closer_close_on_invalidate_set(pd->source, efl_io_closer_close_on_invalidate_get(o)); 447 efl_io_closer_close_on_invalidate_set(pd->source, efl_io_closer_close_on_invalidate_get(o));
@@ -505,7 +505,7 @@ _efl_io_copier_destination_set(Eo *o, Efl_Io_Copier_Data *pd, Efl_Io_Writer *des
505 if (pd->destination) 505 if (pd->destination)
506 { 506 {
507 efl_event_callback_array_del(pd->destination, destination_cbs(), o); 507 efl_event_callback_array_del(pd->destination, destination_cbs(), o);
508 if (efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN)) 508 if (efl_isa(pd->destination, EFL_IO_CLOSER_INTERFACE))
509 { 509 {
510 efl_event_callback_del(pd->destination, EFL_IO_CLOSER_EVENT_CLOSED, 510 efl_event_callback_del(pd->destination, EFL_IO_CLOSER_EVENT_CLOSED,
511 _efl_io_copier_destination_closed, o); 511 _efl_io_copier_destination_closed, o);
@@ -520,7 +520,7 @@ _efl_io_copier_destination_set(Eo *o, Efl_Io_Copier_Data *pd, Efl_Io_Writer *des
520 pd->destination = efl_ref(destination); 520 pd->destination = efl_ref(destination);
521 efl_event_callback_array_add(pd->destination, destination_cbs(), o); 521 efl_event_callback_array_add(pd->destination, destination_cbs(), o);
522 522
523 if (efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN)) 523 if (efl_isa(pd->destination, EFL_IO_CLOSER_INTERFACE))
524 { 524 {
525 efl_io_closer_close_on_exec_set(pd->destination, efl_io_closer_close_on_exec_get(o)); 525 efl_io_closer_close_on_exec_set(pd->destination, efl_io_closer_close_on_exec_get(o));
526 efl_io_closer_close_on_invalidate_set(pd->destination, efl_io_closer_close_on_invalidate_get(o)); 526 efl_io_closer_close_on_invalidate_set(pd->destination, efl_io_closer_close_on_invalidate_get(o));
@@ -656,7 +656,7 @@ _efl_io_copier_efl_io_closer_close(Eo *o, Efl_Io_Copier_Data *pd)
656 pd->progress.total = 0; 656 pd->progress.total = 0;
657 } 657 }
658 efl_event_callback_array_del(pd->source, source_cbs(), o); 658 efl_event_callback_array_del(pd->source, source_cbs(), o);
659 if (efl_isa(pd->source, EFL_IO_CLOSER_MIXIN) && 659 if (efl_isa(pd->source, EFL_IO_CLOSER_INTERFACE) &&
660 !efl_io_closer_closed_get(pd->source)) 660 !efl_io_closer_closed_get(pd->source))
661 { 661 {
662 efl_event_callback_del(pd->source, EFL_IO_CLOSER_EVENT_CLOSED, 662 efl_event_callback_del(pd->source, EFL_IO_CLOSER_EVENT_CLOSED,
@@ -668,7 +668,7 @@ _efl_io_copier_efl_io_closer_close(Eo *o, Efl_Io_Copier_Data *pd)
668 if (pd->destination) 668 if (pd->destination)
669 { 669 {
670 efl_event_callback_array_del(pd->destination, destination_cbs(), o); 670 efl_event_callback_array_del(pd->destination, destination_cbs(), o);
671 if (efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN) && 671 if (efl_isa(pd->destination, EFL_IO_CLOSER_INTERFACE) &&
672 !efl_io_closer_closed_get(pd->destination)) 672 !efl_io_closer_closed_get(pd->destination))
673 { 673 {
674 efl_event_callback_del(pd->destination, EFL_IO_CLOSER_EVENT_CLOSED, 674 efl_event_callback_del(pd->destination, EFL_IO_CLOSER_EVENT_CLOSED,
@@ -793,10 +793,10 @@ _efl_io_copier_done_get(const Eo *o, Efl_Io_Copier_Data *pd)
793 pd->source, 793 pd->source,
794 pd->source ? efl_class_name_get(pd->source) : "", 794 pd->source ? efl_class_name_get(pd->source) : "",
795 pd->source ? efl_io_reader_eos_get(pd->source) : 1, 795 pd->source ? efl_io_reader_eos_get(pd->source) : 1,
796 pd->source ? (efl_isa(pd->source, EFL_IO_CLOSER_MIXIN) ? efl_io_closer_closed_get(pd->source) : 0) : 1, 796 pd->source ? (efl_isa(pd->source, EFL_IO_CLOSER_INTERFACE) ? efl_io_closer_closed_get(pd->source) : 0) : 1,
797 pd->destination, 797 pd->destination,
798 pd->destination ? efl_class_name_get(pd->destination) : "", 798 pd->destination ? efl_class_name_get(pd->destination) : "",
799 pd->destination ? (efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN) ? efl_io_closer_closed_get(pd->destination) : 0) : 1); 799 pd->destination ? (efl_isa(pd->destination, EFL_IO_CLOSER_INTERFACE) ? efl_io_closer_closed_get(pd->destination) : 0) : 1);
800 800
801 return pd->done; 801 return pd->done;
802} 802}
@@ -896,10 +896,10 @@ _efl_io_copier_efl_io_closer_close_on_exec_set(Eo *o EINA_UNUSED, Efl_Io_Copier_
896 if (pd->close_on_exec == close_on_exec) return EINA_TRUE; 896 if (pd->close_on_exec == close_on_exec) return EINA_TRUE;
897 pd->close_on_exec = close_on_exec; 897 pd->close_on_exec = close_on_exec;
898 898
899 if (pd->source && efl_isa(pd->source, EFL_IO_CLOSER_MIXIN)) 899 if (pd->source && efl_isa(pd->source, EFL_IO_CLOSER_INTERFACE))
900 efl_io_closer_close_on_exec_set(pd->source, close_on_exec); 900 efl_io_closer_close_on_exec_set(pd->source, close_on_exec);
901 901
902 if (pd->destination && efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN)) 902 if (pd->destination && efl_isa(pd->destination, EFL_IO_CLOSER_INTERFACE))
903 efl_io_closer_close_on_exec_set(pd->destination, close_on_exec); 903 efl_io_closer_close_on_exec_set(pd->destination, close_on_exec);
904 904
905 return EINA_TRUE; 905 return EINA_TRUE;
@@ -917,10 +917,10 @@ _efl_io_copier_efl_io_closer_close_on_invalidate_set(Eo *o EINA_UNUSED, Efl_Io_C
917 if (pd->close_on_invalidate == close_on_invalidate) return; 917 if (pd->close_on_invalidate == close_on_invalidate) return;
918 pd->close_on_invalidate = close_on_invalidate; 918 pd->close_on_invalidate = close_on_invalidate;
919 919
920 if (pd->source && efl_isa(pd->source, EFL_IO_CLOSER_MIXIN)) 920 if (pd->source && efl_isa(pd->source, EFL_IO_CLOSER_INTERFACE))
921 efl_io_closer_close_on_invalidate_set(pd->source, close_on_invalidate); 921 efl_io_closer_close_on_invalidate_set(pd->source, close_on_invalidate);
922 922
923 if (pd->destination && efl_isa(pd->destination, EFL_IO_CLOSER_MIXIN)) 923 if (pd->destination && efl_isa(pd->destination, EFL_IO_CLOSER_INTERFACE))
924 efl_io_closer_close_on_invalidate_set(pd->destination, close_on_invalidate); 924 efl_io_closer_close_on_invalidate_set(pd->destination, close_on_invalidate);
925} 925}
926 926