From: Daniel Kolesa Date: Thu, 26 Sep 2019 14:39:56 +0000 (+0200) Subject: eolian: rename event_prefix to event_c_prefix for consistency X-Git-Tag: submit/tizen/20190926.223052~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=215a70e203fe41b5405462a95c7f4fdc1b8ce407;p=platform%2Fupstream%2Fefl.git eolian: rename event_prefix to event_c_prefix for consistency --- diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 1c2f6e3..bcb71d7 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -340,7 +340,7 @@ ffi.cdef [[ Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass); const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Class *klass); const char *eolian_class_c_prefix_get(const Eolian_Class *klass); - const char *eolian_class_event_prefix_get(const Eolian_Class *klass); + const char *eolian_class_event_c_prefix_get(const Eolian_Class *klass); const char *eolian_class_data_type_get(const Eolian_Class *klass); const Eolian_Class *eolian_class_parent_get(const Eolian_Class *klass); Eina_Iterator *eolian_class_requires_get(const Eolian_Class *klass); @@ -1445,8 +1445,8 @@ M.Class = ffi.metatype("Eolian_Class", { return ffi.string(v) end, - event_prefix_get = function(self) - local v = eolian.eolian_class_event_prefix_get(self) + event_c_prefix_get = function(self) + local v = eolian.eolian_class_event_c_prefix_get(self) if v == nil then return self:c_prefix_get() end diff --git a/src/lib/ecore_audio/ecore_audio_in.eo b/src/lib/ecore_audio/ecore_audio_in.eo index f8c1fdb..d65ffba 100644 --- a/src/lib/ecore_audio/ecore_audio_in.eo +++ b/src/lib/ecore_audio/ecore_audio_in.eo @@ -2,7 +2,7 @@ class @beta Ecore.Audio.In extends Ecore.Audio { [[Ecore Audio input object.]] c_prefix: ecore_audio_obj_in; - event_prefix: ecore_audio_in; + event_c_prefix: ecore_audio_in; data: Ecore_Audio_Input; methods { @property speed { diff --git a/src/lib/ecore_audio/ecore_audio_out_pulse.eo b/src/lib/ecore_audio/ecore_audio_out_pulse.eo index d065d2d..c794375 100644 --- a/src/lib/ecore_audio/ecore_audio_out_pulse.eo +++ b/src/lib/ecore_audio/ecore_audio_out_pulse.eo @@ -2,7 +2,7 @@ class @beta Ecore.Audio.Out.Pulse extends Ecore.Audio.Out { [[Ecore audio ouput for PulseAudio.]] c_prefix: ecore_audio_obj_out_pulse; - event_prefix: ecore_audio_out_pulse; + event_c_prefix: ecore_audio_out_pulse; implements { Efl.Object.constructor; Efl.Object.destructor; diff --git a/src/lib/ecore_audio/ecore_audio_out_wasapi.eo b/src/lib/ecore_audio/ecore_audio_out_wasapi.eo index 2f19880..8b560be 100644 --- a/src/lib/ecore_audio/ecore_audio_out_wasapi.eo +++ b/src/lib/ecore_audio/ecore_audio_out_wasapi.eo @@ -2,7 +2,7 @@ class @beta Ecore.Audio.Out.Wasapi extends Ecore.Audio.Out { [[Ecore audio ouput for WasapiAudio.]] c_prefix: ecore_audio_obj_out_wasapi; - event_prefix: ecore_audio_out_wasapi; + event_c_prefix: ecore_audio_out_wasapi; implements { Efl.Object.constructor; Efl.Object.destructor; diff --git a/src/lib/edje/efl_canvas_layout.eo b/src/lib/edje/efl_canvas_layout.eo index ea09e09..2cf5aa6 100644 --- a/src/lib/edje/efl_canvas_layout.eo +++ b/src/lib/edje/efl_canvas_layout.eo @@ -9,7 +9,7 @@ class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl. Efl.Gfx.Size_Class { [[Edje object class]] - event_prefix: efl_layout; + event_c_prefix: efl_layout; data: Edje; methods { @property animation { diff --git a/src/lib/edje/efl_layout_calc.eo b/src/lib/edje/efl_layout_calc.eo index c022dca..0417629 100644 --- a/src/lib/edje/efl_layout_calc.eo +++ b/src/lib/edje/efl_layout_calc.eo @@ -10,7 +10,7 @@ interface Efl.Layout.Calc @since 1.22 ]] - event_prefix: efl_layout; + event_c_prefix: efl_layout; methods { @property calc_auto_update_hints { [[Whether this object updates its size hints automatically. diff --git a/src/lib/efl/interfaces/efl_container.eo b/src/lib/efl/interfaces/efl_container.eo index 992e9f9..58f4c18 100644 --- a/src/lib/efl/interfaces/efl_container.eo +++ b/src/lib/efl/interfaces/efl_container.eo @@ -8,7 +8,7 @@ interface Efl.Container @since 1.22 ]] c_prefix: efl_content; - event_prefix: efl_container; + event_c_prefix: efl_container; methods { content_iterate { [[Begin iterating over this object's contents.]] diff --git a/src/lib/efl/interfaces/efl_gfx_hint.eo b/src/lib/efl/interfaces/efl_gfx_hint.eo index 14ff815..5906b25 100644 --- a/src/lib/efl/interfaces/efl_gfx_hint.eo +++ b/src/lib/efl/interfaces/efl_gfx_hint.eo @@ -21,7 +21,7 @@ interface Efl.Gfx.Hint @since 1.22 ]] - event_prefix: efl_gfx_entity; + event_c_prefix: efl_gfx_entity; methods { @property hint_aspect { [[Defines the aspect ratio to respect when scaling this object. diff --git a/src/lib/efl/interfaces/efl_gfx_stack.eo b/src/lib/efl/interfaces/efl_gfx_stack.eo index 7eddb01..30df73a 100644 --- a/src/lib/efl/interfaces/efl_gfx_stack.eo +++ b/src/lib/efl/interfaces/efl_gfx_stack.eo @@ -7,7 +7,7 @@ interface Efl.Gfx.Stack @since 1.22 ]] - event_prefix: efl_gfx_entity; + event_c_prefix: efl_gfx_entity; methods { @property layer { [[The layer of its canvas that the given object will be part of. diff --git a/src/lib/efl/interfaces/efl_ui_container_selectable.eo b/src/lib/efl/interfaces/efl_ui_container_selectable.eo index 0d7fda5..84a0d07 100644 --- a/src/lib/efl/interfaces/efl_ui_container_selectable.eo +++ b/src/lib/efl/interfaces/efl_ui_container_selectable.eo @@ -1,7 +1,7 @@ interface @beta Efl.Ui.Container_Selectable { [[Temporare interface, this is here until collection_view lands]] - event_prefix: efl_ui; + event_c_prefix: efl_ui; events { /* FIXME: Called with multiple types of event_info! */ item,selected: Efl.Object; [[Called when selected]] diff --git a/src/lib/efl/interfaces/efl_ui_draggable.eo b/src/lib/efl/interfaces/efl_ui_draggable.eo index 3cd9396..91c7420 100644 --- a/src/lib/efl/interfaces/efl_ui_draggable.eo +++ b/src/lib/efl/interfaces/efl_ui_draggable.eo @@ -2,7 +2,7 @@ interface @beta Efl.Ui.Draggable { [[Efl UI draggable interface]] - event_prefix: efl_ui; + event_c_prefix: efl_ui; methods { @property drag_target { [[Control whether the object's content is changed by drag and drop. diff --git a/src/lib/efl/interfaces/efl_ui_scrollable.eo b/src/lib/efl/interfaces/efl_ui_scrollable.eo index 8baf832..1201d26 100644 --- a/src/lib/efl/interfaces/efl_ui_scrollable.eo +++ b/src/lib/efl/interfaces/efl_ui_scrollable.eo @@ -4,7 +4,7 @@ import efl_ui_layout_orientable; interface Efl.Ui.Scrollable { [[Efl UI scrollable interface]] - event_prefix: efl_ui; + event_c_prefix: efl_ui; methods { @property content_pos { [[The content position]] diff --git a/src/lib/efl/interfaces/efl_ui_text_selectable.eo b/src/lib/efl/interfaces/efl_ui_text_selectable.eo index b5ad3bd..13dda60 100644 --- a/src/lib/efl/interfaces/efl_ui_text_selectable.eo +++ b/src/lib/efl/interfaces/efl_ui_text_selectable.eo @@ -1,7 +1,7 @@ interface @beta Efl.Ui.Text_Selectable { [[Efl UI text selectable interface]] - event_prefix: efl_ui; + event_c_prefix: efl_ui; events { selection,paste: void; [[Called when selection is pasted]] selection,copy: void; [[Called when selection is copied]] diff --git a/src/lib/efl/interfaces/efl_ui_zoom.eo b/src/lib/efl/interfaces/efl_ui_zoom.eo index ab8d100..a2f4d1f 100644 --- a/src/lib/efl/interfaces/efl_ui_zoom.eo +++ b/src/lib/efl/interfaces/efl_ui_zoom.eo @@ -11,7 +11,7 @@ enum @beta Efl.Ui.Zoom_Mode interface @beta Efl.Ui.Zoom { [[Efl UI zoom interface]] - event_prefix: efl_ui; + event_c_prefix: efl_ui; c_prefix: efl_ui; methods { diff --git a/src/lib/elementary/efl_ui_animation_view.eo b/src/lib/elementary/efl_ui_animation_view.eo index 4cd02b9..474bd76 100644 --- a/src/lib/elementary/efl_ui_animation_view.eo +++ b/src/lib/elementary/efl_ui_animation_view.eo @@ -24,7 +24,7 @@ class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View, @Efl.Ui.Animation_View currently only supports the animation information contained in JSON (known as Lottie file as well) and EET files. ]] - event_prefix: efl_ui_animation_view; + event_c_prefix: efl_ui_animation_view; methods { @property auto_play { [[Animation will be started automatically when it's possible. diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index f4a8dbc..84cdb35 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -28,7 +28,7 @@ class Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Input.Clickable, Efl.Ui. When loading images from a file, the @Efl.File.key property can be used to access different streams. For example, when accessing Evas image caches. ]] - event_prefix: efl_ui_image; + event_c_prefix: efl_ui_image; methods { @property icon { [[The image name, using icon standards names. diff --git a/src/lib/elementary/efl_ui_item_clickable.eo b/src/lib/elementary/efl_ui_item_clickable.eo index fbe680a..db73d79 100644 --- a/src/lib/elementary/efl_ui_item_clickable.eo +++ b/src/lib/elementary/efl_ui_item_clickable.eo @@ -15,7 +15,7 @@ struct Efl.Ui.Item_Clickable_Pressed { interface Efl.Ui.Item_Clickable { [[Shared sets of events between @Efl.Ui.Collection and @Efl.Ui.Collection_View.]] - event_prefix: efl_ui; + event_c_prefix: efl_ui; events { item,pressed : Efl.Ui.Item_Clickable_Pressed; [[A $pressed event occurred over an item.]] item,unpressed : Efl.Ui.Item_Clickable_Pressed; [[An $unpressed event occurred over an item.]] diff --git a/src/lib/elementary/efl_ui_panes.eo b/src/lib/elementary/efl_ui_panes.eo index 3ea4cc1..15b0b11 100644 --- a/src/lib/elementary/efl_ui_panes.eo +++ b/src/lib/elementary/efl_ui_panes.eo @@ -2,7 +2,7 @@ class @beta Efl.Ui.Panes extends Efl.Ui.Layout_Base implements Efl.Ui.Layout_Ori Efl.Input.Clickable { [[Elementary panes class]] - event_prefix: elm_panes; + event_c_prefix: elm_panes; methods { @property split_ratio { [[Set the split ratio between panes widget first and second parts. diff --git a/src/lib/elementary/efl_ui_scroll_manager.eo b/src/lib/elementary/efl_ui_scroll_manager.eo index 63a0e71..2a05083 100644 --- a/src/lib/elementary/efl_ui_scroll_manager.eo +++ b/src/lib/elementary/efl_ui_scroll_manager.eo @@ -4,7 +4,7 @@ class @beta Efl.Ui.Scroll.Manager extends Efl.Object implements Efl.Ui.Scrollbar { [[Efl ui scroll manager class]] - event_prefix: efl_ui; + event_c_prefix: efl_ui; c_prefix: efl_ui_scroll_manager; methods { @property pan @protected { diff --git a/src/lib/elementary/efl_ui_selectable.eo b/src/lib/elementary/efl_ui_selectable.eo index fe9468e..f06cb04 100644 --- a/src/lib/elementary/efl_ui_selectable.eo +++ b/src/lib/elementary/efl_ui_selectable.eo @@ -4,7 +4,7 @@ interface Efl.Ui.Selectable { An object implementing this interface can be selected. When the selected property of this object changes, the @[Efl.Ui.Selectable.selected,changed] event is emitted. ]] - event_prefix: efl_ui; + event_c_prefix: efl_ui; methods { @property selected { [[The selected state of this object diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo index a8d5b9c..97437d0 100644 --- a/src/lib/elementary/efl_ui_widget.eo +++ b/src/lib/elementary/efl_ui_widget.eo @@ -34,7 +34,7 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object, implements section. @since 1.22 ]] - event_prefix: efl_ui_widget; + event_c_prefix: efl_ui_widget; data: Efl_Ui_Widget_Data; methods { @property cursor @beta { diff --git a/src/lib/elementary/efl_ui_widget_scrollable_content.eo b/src/lib/elementary/efl_ui_widget_scrollable_content.eo index 2b0c24b..90bed21 100644 --- a/src/lib/elementary/efl_ui_widget_scrollable_content.eo +++ b/src/lib/elementary/efl_ui_widget_scrollable_content.eo @@ -15,7 +15,7 @@ mixin @beta Efl.Ui.Widget_Scrollable_Content requires Efl.Object @since 1.23 ]] c_prefix: efl_ui_widget; - event_prefix: efl_ui_widget_scrollable_content; + event_c_prefix: efl_ui_widget_scrollable_content; data: Efl_Ui_Widget_Scrollable_Content_Data; methods { @property scrollable_content_did_group_calc @protected @beta { diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 311ea90..4594f4b 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -1510,14 +1510,14 @@ EAPI const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Cla EAPI Eina_Stringshare* eolian_class_c_prefix_get(const Eolian_Class *klass); /* - * @brief Returns the event prefix of a class + * @brief Returns the C event prefix of a class * * @param[in] klass the class * @return the event prefix * * @ingroup Eolian */ -EAPI Eina_Stringshare* eolian_class_event_prefix_get(const Eolian_Class *klass); +EAPI Eina_Stringshare* eolian_class_event_c_prefix_get(const Eolian_Class *klass); /* * @brief Returns the data type of a class diff --git a/src/lib/eolian/database_class_api.c b/src/lib/eolian/database_class_api.c index 74cff1b..943f561 100644 --- a/src/lib/eolian/database_class_api.c +++ b/src/lib/eolian/database_class_api.c @@ -28,7 +28,7 @@ eolian_class_c_prefix_get(const Eolian_Class *cl) } EAPI Eina_Stringshare* -eolian_class_event_prefix_get(const Eolian_Class *cl) +eolian_class_event_c_prefix_get(const Eolian_Class *cl) { EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL); return cl->ev_prefix; diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index e7f61a7..697f946 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -28,7 +28,7 @@ enum Tokens #define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \ \ KW(abstract), KW(c_prefix), KW(composites), KW(constructor), KW(constructors), \ - KW(data), KW(destructor), KW(error), KW(event_prefix), KW(events), KW(extends), \ + KW(data), KW(destructor), KW(error), KW(event_c_prefix), KW(events), KW(extends), \ KW(free), KW(get), KW(implements), KW(import), KW(interface), \ KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \ KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(requires), \ diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index a721e73..519841a 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -2013,7 +2013,7 @@ static void parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type) { Eina_Bool has_c_prefix = EINA_FALSE, - has_event_prefix = EINA_FALSE, + has_event_c_prefix = EINA_FALSE, has_data = EINA_FALSE, has_methods = EINA_FALSE, has_parts = EINA_FALSE, @@ -2036,8 +2036,8 @@ parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type) eo_lexer_get(ls); check_next(ls, ';'); break; - case KW_event_prefix: - CASE_LOCK(ls, event_prefix, "event prefix definition") + case KW_event_c_prefix: + CASE_LOCK(ls, event_c_prefix, "event prefix definition") eo_lexer_get(ls); check_next(ls, ':'); _validate_pfx(ls); diff --git a/src/lib/evas/canvas/efl_input_clickable.eo b/src/lib/evas/canvas/efl_input_clickable.eo index a108035..3167ffe 100644 --- a/src/lib/evas/canvas/efl_input_clickable.eo +++ b/src/lib/evas/canvas/efl_input_clickable.eo @@ -7,7 +7,7 @@ struct Efl.Input.Clickable_Clicked { mixin Efl.Input.Clickable { [[Efl input clickable interface]] - event_prefix: efl_input; + event_c_prefix: efl_input; methods { press @protected { [[Change internal states that a button got pressed. diff --git a/src/lib/evas/canvas/efl_input_interface.eo b/src/lib/evas/canvas/efl_input_interface.eo index b899d06..fde39c1 100644 --- a/src/lib/evas/canvas/efl_input_interface.eo +++ b/src/lib/evas/canvas/efl_input_interface.eo @@ -20,7 +20,7 @@ interface Efl.Input.Interface down...up,down...up,down...up (not down...up or down...down...down...up). ]] c_prefix: efl_input; - event_prefix: efl; + event_c_prefix: efl; methods { @property seat_event_filter @beta { [[Whether input events from a given seat are enabled. diff --git a/src/lib/evas/gesture/efl_gesture_events.eo b/src/lib/evas/gesture/efl_gesture_events.eo index da67ccc..d80c0bb 100644 --- a/src/lib/evas/gesture/efl_gesture_events.eo +++ b/src/lib/evas/gesture/efl_gesture_events.eo @@ -1,6 +1,6 @@ interface @beta Efl.Gesture.Events { - event_prefix: efl; + event_c_prefix: efl; events { gesture,tap: Efl.Canvas.Gesture_Tap; [[Emitted when a Tap gesture has been detected. A Tap gesture consists of a touch of the screen (or click of the mouse) quickly followed by diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index 04d2dcb..e18fbf6 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py @@ -648,8 +648,8 @@ class Class(Object): return _str_to_py(lib.eolian_class_c_prefix_get(self)) @cached_property - def event_prefix(self): - return _str_to_py(lib.eolian_class_event_prefix_get(self)) + def event_c_prefix(self): + return _str_to_py(lib.eolian_class_event_c_prefix_get(self)) @cached_property def documentation(self): diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py index 36e0341..09f88c3 100644 --- a/src/scripts/pyolian/eolian_lib.py +++ b/src/scripts/pyolian/eolian_lib.py @@ -238,9 +238,9 @@ lib.eolian_class_documentation_get.restype = c_void_p lib.eolian_class_c_prefix_get.argtypes = (c_void_p,) lib.eolian_class_c_prefix_get.restype = c_char_p -# EAPI Eina_Stringshare* eolian_class_event_prefix_get(const Eolian_Class *klass); -lib.eolian_class_event_prefix_get.argtypes = (c_void_p,) -lib.eolian_class_event_prefix_get.restype = c_char_p +# EAPI Eina_Stringshare* eolian_class_event_c_prefix_get(const Eolian_Class *klass); +lib.eolian_class_event_c_prefix_get.argtypes = (c_void_p,) +lib.eolian_class_event_c_prefix_get.restype = c_char_p # EAPI Eina_Stringshare *eolian_class_data_type_get(const Eolian_Class *klass); lib.eolian_class_data_type_get.argtypes = (c_void_p,) diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py index 01e916b..2a45c57 100755 --- a/src/scripts/pyolian/test_eolian.py +++ b/src/scripts/pyolian/test_eolian.py @@ -334,7 +334,7 @@ class TestEolianClass(unittest.TestCase): self.assertEqual(cls.type, eolian.Eolian_Class_Type.REGULAR) self.assertIsInstance(cls.documentation, eolian.Documentation) self.assertIsNone(cls.c_prefix) # TODO fin a class with a value - self.assertIsNone(cls.event_prefix) # TODO same as above + self.assertIsNone(cls.event_c_prefix) # TODO same as above self.assertIsNone(cls.data_type) # TODO same as above self.assertEqual(cls.parent.name, 'Efl.Loop_Consumer') self.assertEqual([c.name for c in cls.extensions], []) diff --git a/src/tests/eolian/data/events.eo b/src/tests/eolian/data/events.eo index a7aa2ef..95b6a8f 100644 --- a/src/tests/eolian/data/events.eo +++ b/src/tests/eolian/data/events.eo @@ -3,7 +3,7 @@ struct Evas_Event_Clicked_Double_Info { } class Events { - event_prefix: totally_not_events; + event_c_prefix: totally_not_events; events { clicked @beta: void; [[Comment for clicked]] clicked,double: Evas_Event_Clicked_Double_Info; /* No comment */ diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 2e61fb9..fac90f4 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -113,7 +113,7 @@ EFL_START_TEST(eolian_events) /* Class */ fail_if(!(class = eolian_unit_class_by_name_get(unit, "Events"))); - fail_if(strcmp(eolian_class_event_prefix_get(class), "totally_not_events")); + fail_if(strcmp(eolian_class_event_c_prefix_get(class), "totally_not_events")); /* Events */ fail_if(!(iter = eolian_class_events_get(class)));