eolian: rename event_prefix to event_c_prefix for consistency

This commit is contained in:
Daniel Kolesa 2019-09-26 16:39:56 +02:00
parent 7e10d96d27
commit 6d93dc4cbf
34 changed files with 42 additions and 42 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -7,7 +7,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 {

View File

@ -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.

View File

@ -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.]]

View File

@ -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.

View File

@ -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.

View File

@ -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]]

View File

@ -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.

View File

@ -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]]

View File

@ -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]]

View File

@ -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 {

View File

@ -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.

View File

@ -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.

View File

@ -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.]]

View File

@ -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.

View File

@ -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 {

View File

@ -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

View File

@ -25,7 +25,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 {

View File

@ -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 {

View File

@ -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

View File

@ -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;

View File

@ -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), \

View File

@ -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);

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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):

View File

@ -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,)

View File

@ -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], [])

View File

@ -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 */

View File

@ -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)));