static void
efl_ui_popup_alert_clicked_cb(void *data EINA_UNUSED, const Efl_Event *ev)
{
- Efl_Ui_Popup_Alert_Button type = (Efl_Ui_Popup_Alert_Button)ev->info;
- if (type == EFL_UI_POPUP_ALERT_BUTTON_POSITIVE)
- printf("Positive Button is clicked\n");
- else if(type == EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE)
- printf("Negative Button is clicked\n");
- else if(type == EFL_UI_POPUP_ALERT_BUTTON_USER)
- printf("User Button is clicked\n");
+ Efl_Ui_Popup_Alert_Clicked_Event *event = ev->info;
+
+ if (event->button_type == EFL_UI_POPUP_ALERT_BUTTON_POSITIVE)
+ printf("Positive Button is clicked\n");
+ else if(event->button_type == EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE)
+ printf("Negative Button is clicked\n");
+ else if(event->button_type == EFL_UI_POPUP_ALERT_BUTTON_USER)
+ printf("User Button is clicked\n");
}
void
void *event_info EINA_UNUSED)
{
Eo *popup_obj = data;
- efl_event_callback_call(popup_obj, EFL_UI_POPUP_ALERT_EVENT_CLICKED, (void *)(uintptr_t)EFL_UI_POPUP_ALERT_BUTTON_POSITIVE);
+
+ Efl_Ui_Popup_Alert_Clicked_Event event;
+ event.button_type = EFL_UI_POPUP_ALERT_BUTTON_POSITIVE;
+
+ efl_event_callback_call(popup_obj, EFL_UI_POPUP_ALERT_EVENT_CLICKED, &event);
}
static void
void *event_info EINA_UNUSED)
{
Eo *popup_obj = data;
- efl_event_callback_call(popup_obj, EFL_UI_POPUP_ALERT_EVENT_CLICKED, (void *)(uintptr_t)EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE);
+
+ Efl_Ui_Popup_Alert_Clicked_Event event;
+ event.button_type = EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE;
+
+ efl_event_callback_call(popup_obj, EFL_UI_POPUP_ALERT_EVENT_CLICKED, &event);
}
static void
void *event_info EINA_UNUSED)
{
Eo *popup_obj = data;
- efl_event_callback_call(popup_obj, EFL_UI_POPUP_ALERT_EVENT_CLICKED, (void *)(uintptr_t)EFL_UI_POPUP_ALERT_BUTTON_USER);
+
+ Efl_Ui_Popup_Alert_Clicked_Event event;
+ event.button_type = EFL_UI_POPUP_ALERT_BUTTON_USER;
+
+ efl_event_callback_call(popup_obj, EFL_UI_POPUP_ALERT_EVENT_CLICKED, &event);
}
EOLIAN static void
user [[Button having user-defined meaning. e.g. "Cancel"]]
}
+struct Efl.Ui.Popup.Alert.Clicked_Event {
+ [[Information of clicked event]]
+ button_type: Efl.Ui.Popup.Alert.Button; [[Clicked button type]]
+}
+
class Efl.Ui.Popup.Alert(Efl.Ui.Popup)
{
methods {
Efl.Part.part;
}
events {
- clicked;
+ clicked: Efl.Ui.Popup.Alert.Clicked_Event;
}
}