* @brief Sends a signal to edje-object.
* @param[in] emission The signal's name.
* @param[in] source The signal's source.
+ * @param[in] async true - process an object's message queue in job/timer, false - process immediately.
*/
- void emitSignal(const char *emission, const char *source);
+ void emitSignal(const char *emission, const char *source, bool async = false);
+
+ /**
+ * @brief Sends a signal to edje-object.
+ * @param[in] obj Target object
+ * @param[in] emission The signal's name.
+ * @param[in] source The signal's source.
+ * @param[in] async true - process the signal postponed, false - process immediately.
+ */
+ static void emitSignal(Evas_Object *obj, const char *emission, const char *source, bool async = false);
+
+ /**
+ * @brief Process all edje signals for object
+ * @param[in] obj Target object
+ */
+ static void processSignal(Evas_Object *obj);
+
+ /**
+ * @brief Process all edje signals for object
+ */
+ void processSignal();
/**
* @brief Sets user-data associated with specified key-string.
elm_object_domain_part_text_translatable_set(m_pEo, part, domain, translatable);
}
- inline void View::emitSignal(const char *emission, const char *source)
+ inline void View::emitSignal(const char *emission, const char *source, bool async)
+ {
+ emitSignal(m_pEo, emission, source, async);
+ }
+
+ inline void View::processSignal()
{
- elm_object_signal_emit(m_pEo, emission, source);
+ processSignal(m_pEo);
}
inline void View::setText(const char *text, const char *part)
switch(titleColor)
{
case NaviBlueColorId:
- elm_object_signal_emit(m_ButtonList[id].button, "button,color,white", "*");
+ emitSignal(m_ButtonList[id].button, "button,color,white", "*");
break;
case NaviWhiteColorId:
- elm_object_signal_emit(m_ButtonList[id].button, "button,color,blue", "*");
+ emitSignal(m_ButtonList[id].button, "button,color,blue", "*");
break;
default:
void NaviFrameItem::NaviBar::setDownButtonState(bool expand)
{
const char *sig = expand ? "button,expand" : "button,collapse";
- elm_object_signal_emit(m_ButtonList[NaviExpandButtonId].button, sig, "*");
+ emitSignal(m_ButtonList[NaviExpandButtonId].button, sig, "*");
}
evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
}
+void View::processSignal(Evas_Object *obj)
+{
+ Evas_Object *edj = elm_layout_edje_get(obj);
+ edje_object_message_signal_process(edj);
+}
+
+void View::emitSignal(Evas_Object *obj, const char *emission, const char *source, bool async)
+{
+ elm_object_signal_emit(obj, emission, source);
+ if(!async)
+ processSignal(obj);
+}
+
Evas_Object *View::addLayout(Evas_Object *parent, const std::string &edjePath, const std::string &group)
{
Evas_Object *layout = elm_layout_add(parent);
void ImagePageViewItem::showPlayIcon()
{
- elm_object_signal_emit(m_pImageLayout, showPlayIconSig, "");
+ emitSignal(m_pImageLayout, showPlayIconSig, "");
}
const std::string &ImagePageViewItem::getImagePath() const
void ImagePageViewItem::highlight(bool value)
{
const char *sig = value ? "focused" : "unfocused";
- elm_object_signal_emit(m_pImageLayout, sig, "*");
+ emitSignal(m_pImageLayout, sig, "*");
}
std::string ImagePageViewItem::getFileName() const
iconHeight = (int)ELM_SCALE_SIZE(thumbEqual);
sig = mediaImageEqualSig;
}
- elm_object_signal_emit(getMediaLayout(), sig, "*");
+ emitSignal(getMediaLayout(), sig, "*");
// Create and load icon image:
Evas_Object *icon = elm_icon_add(parent);
{
Evas_Object *layout = elm_layout_add(parent);
elm_layout_file_set(layout, getEdjPath().c_str(), itemLayoutGroup);
- elm_object_signal_emit(layout, "show.normal.mode", "*");
+ emitSignal(layout, "show.normal.mode", "*");
expand(layout);
evas_object_show(layout);
return layout;
[](void *data, Evas *e, Evas_Object *obj, void *event_info)
{
if(!elm_object_disabled_get(obj))
- elm_object_signal_emit(elm_object_content_get(obj), "pressed", "*");
+ View::emitSignal(elm_object_content_get(obj), "pressed", "*");
},
this
);
[](void *data, Evas *e, Evas_Object *obj, void *event_info)
{
if(!elm_object_disabled_get(obj))
- elm_object_signal_emit(elm_object_content_get(obj), "unpressed", "*");
+ View::emitSignal(elm_object_content_get(obj), "unpressed", "*");
},
this
);
elm_object_style_set(button, "transparent");
Evas_Object *icon = nullptr;
- evas_object_show(icon);
if(type == Draft)
{
void ConversationLayout::showContactList(bool value)
{
const char *sig = value ? "show.predictsearch" : "hide.predictsearch";
- elm_object_signal_emit(m_pLayout, sig, "*");
+ emitSignal(m_pLayout, sig, "*");
}
void ConversationLayout::setRecipientRect(Evas_Object *layout)
else
sig = show ? "show_to_mbe" : "hide_to_mbe";
- elm_object_signal_emit(m_pLayout, sig, "*");
+ emitSignal(m_pLayout, sig, "*");
}
void ConvRecipientsPanelView::showEntry(bool show)
if(show)
getEntry();
const char *sig = show ? "show_entry" : "hide_entry";
- elm_object_signal_emit(m_pLayout, sig, "*");
+ emitSignal(m_pLayout, sig, "*");
show ? evas_object_show(m_pEntry) : evas_object_hide(m_pEntry);
}
evas_object_show(m_pEntry);
evas_object_size_hint_weight_set(m_pEntry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(m_pEntry, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_signal_emit(m_pEntry, "elm,action,hide,search_icon", "");
+ emitSignal(m_pEntry, "elm,action,hide,search_icon", "");
elm_entry_editable_set(m_pEntry, EINA_TRUE);
elm_entry_single_line_set(m_pEntry, EINA_TRUE);
elm_entry_scrollable_set(m_pEntry, EINA_TRUE);
void ConvRecipientsPanelView::showInvalidIcon(bool show)
{
const char *sig = show ? "show_invalid_icon" : "hide_invalid_icon";
- elm_object_signal_emit(m_pLayout, sig, "*");
+ emitSignal(m_pLayout, sig, "*");
}
void ConvRecipientsPanelView::onEntryChanged(Evas_Object *obj, void *event_info)
void MsgThreadSearchPanel::showClearButton(bool visible)
{
const char *sig = visible ? "elm,action,show,button" : "elm,action,hide,button";
- elm_object_signal_emit(getEo(), sig, "");
+ emitSignal(sig, "");
}
void MsgThreadSearchPanel::setGuideText(const std::string &text)
elm_check_state_pointer_set(check, &m_CheckButtonState);
evas_object_propagate_events_set(check, EINA_FALSE);
evas_object_smart_callback_add(check, "changed", SMART_CALLBACK(SettingsListViewItem, onCheckButtonChanged), this);
+ View::processSignal(check);
}
return check;
}