*/
EAPI Eina_Stringshare *eolian_event_c_name_get(const Eolian_Event *event);
+/*
+ * @brief Get an event in a class by its name
+ *
+ * @param[in] klass the class
+ * @param[in] event_name name of the event
+ * @return the Eolian_Event if found, NULL otherwise.
+ *
+ * @ingroup Eolian
+ */
+EAPI const Eolian_Event *eolian_class_event_get_by_name(const Eolian_Class *klass, const char *event_name);
+
/*
* @brief Indicates if the class constructor has to invoke
* a non-generated class constructor function.
while ((tmp = strpbrk(tmp, ".,"))) *tmp = '_';
return eina_stringshare_add(buf);
}
+
+EAPI const Eolian_Event *
+eolian_class_event_get_by_name(const Eolian_Class *klass, const char *event_name)
+{
+ Eina_List *itr;
+ Eolian_Event *event = NULL;
+ if (!klass) return NULL;
+ Eina_Stringshare *shr_ev = eina_stringshare_add(event_name);
+
+ EINA_LIST_FOREACH(klass->events, itr, event)
+ {
+ if (event->name == shr_ev)
+ goto end;
+ }
+
+ event = NULL;
+end:
+ eina_stringshare_del(shr_ev);
+ return event;
+}
fail_if(strcmp(type_name, "Evas_Event_Clicked_Double_Info"));
fail_if(eina_iterator_next(iter, &dummy));
eina_iterator_free(iter);
+ /* Check eolian_class_event_get_by_name */
+ fail_if(!eolian_class_event_get_by_name(class, "clicked,double"));
+ fail_if(eolian_class_event_get_by_name(class, "clicked,triple"));
eolian_shutdown();
}