summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-08 14:37:02 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-08 14:37:02 +0100
commita5ce9e5d7516ca9da4ed9a8410abd27825762e54 (patch)
tree97b270ba6c00d61e869676a8cf66e6e562114de4
parentfbf622db0ca0507540ba5a4d2a96966e1798becb (diff)
eolian: API and tests for beta events
-rw-r--r--src/lib/eolian/Eolian.h10
-rw-r--r--src/lib/eolian/database_event_api.c7
-rw-r--r--src/tests/eolian/data/events.eo2
-rw-r--r--src/tests/eolian/eolian_parsing.c2
4 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 6223000484..77b26b0ea9 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -1327,6 +1327,16 @@ EAPI Eina_Stringshare *eolian_event_description_get(const Eolian_Event *event);
1327EAPI Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event); 1327EAPI Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event);
1328 1328
1329/* 1329/*
1330 * @brief Get whether an event is beta.
1331 *
1332 * @param[in] event the event handle
1333 * @return EINA_TRUE and EINA_FALSE respectively
1334 *
1335 * @ingroup Eolian
1336 */
1337EAPI Eina_Bool eolian_event_is_beta(const Eolian_Event *event);
1338
1339/*
1330 * @brief Returns the C name of an event 1340 * @brief Returns the C name of an event
1331 * 1341 *
1332 * @param[in] event the event handle 1342 * @param[in] event the event handle
diff --git a/src/lib/eolian/database_event_api.c b/src/lib/eolian/database_event_api.c
index 0a6b22dcff..26a516753a 100644
--- a/src/lib/eolian/database_event_api.c
+++ b/src/lib/eolian/database_event_api.c
@@ -33,6 +33,13 @@ eolian_event_scope_get(const Eolian_Event *event)
33 return event->scope; 33 return event->scope;
34} 34}
35 35
36EAPI Eina_Bool
37eolian_event_is_beta(const Eolian_Event *event)
38{
39 EINA_SAFETY_ON_NULL_RETURN_VAL(event, EINA_FALSE);
40 return event->is_beta;
41}
42
36EAPI Eina_Stringshare * 43EAPI Eina_Stringshare *
37eolian_event_c_name_get(const Eolian_Event *event) 44eolian_event_c_name_get(const Eolian_Event *event)
38{ 45{
diff --git a/src/tests/eolian/data/events.eo b/src/tests/eolian/data/events.eo
index 30572225d8..76a18db4de 100644
--- a/src/tests/eolian/data/events.eo
+++ b/src/tests/eolian/data/events.eo
@@ -1,6 +1,6 @@
1class Events { 1class Events {
2 events { 2 events {
3 clicked; /*@ Comment for clicked */ 3 clicked @beta; /*@ Comment for clicked */
4 clicked,double: Evas_Event_Clicked_Double_Info; /* No comment */ 4 clicked,double: Evas_Event_Clicked_Double_Info; /* No comment */
5 } 5 }
6} 6}
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index e9d35d25b9..99113efc93 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -119,6 +119,7 @@ START_TEST(eolian_events)
119 fail_if(!(comment = eolian_event_description_get(ev))); 119 fail_if(!(comment = eolian_event_description_get(ev)));
120 fail_if(strcmp(name, "clicked")); 120 fail_if(strcmp(name, "clicked"));
121 fail_if(strcmp(comment, "Comment for clicked")); 121 fail_if(strcmp(comment, "Comment for clicked"));
122 fail_if(!eolian_event_is_beta(ev));
122 /* Clicked,double */ 123 /* Clicked,double */
123 fail_if(!(eina_iterator_next(iter, (void**)&ev))); 124 fail_if(!(eina_iterator_next(iter, (void**)&ev)));
124 fail_if(!(name = eolian_event_name_get(ev))); 125 fail_if(!(name = eolian_event_name_get(ev)));
@@ -127,6 +128,7 @@ START_TEST(eolian_events)
127 fail_if(strcmp(name, "clicked,double")); 128 fail_if(strcmp(name, "clicked,double"));
128 type_name = eolian_type_name_get(type); 129 type_name = eolian_type_name_get(type);
129 fail_if(strcmp(type_name, "Evas_Event_Clicked_Double_Info")); 130 fail_if(strcmp(type_name, "Evas_Event_Clicked_Double_Info"));
131 fail_if(eolian_event_is_beta(ev));
130 fail_if(eina_iterator_next(iter, &dummy)); 132 fail_if(eina_iterator_next(iter, &dummy));
131 eina_iterator_free(iter); 133 eina_iterator_free(iter);
132 /* Check eolian_class_event_get_by_name */ 134 /* Check eolian_class_event_get_by_name */