Ejemplo n.º 1
0
Evas_Object *GenlistItemAlbumHeader::getPartItem(Evas_Object *obj, string part)
{
        Evas_Object *o = NULL;

        if (part == "calaos.button.play")
        {
                o = elm_button_add(parent);
                Evas_Object *icon = elm_icon_add(o);
                elm_image_file_set(icon, ApplicationMain::getTheme(), "calaos/icons/action_button/play");
                elm_object_style_set(o, "calaos/action_button/blue");
                elm_object_content_set(o, icon);
                evas_object_smart_callback_add(o, "clicked", _item_button_Play, this);
        }
        else if (part == "calaos.button.add")
        {
                o = elm_button_add(parent);
                elm_object_style_set(o, "calaos/action_button/label");
                elm_object_text_set(o, "Ajouter");
                evas_object_smart_callback_add(o, "clicked", _item_button_Add, this);
        }
        else if (part == "calaos.cover")
        {
                if (cover_downloaded &&
                    ecore_file_exists(cover_fname.c_str()))
                {
                        o = elm_icon_add(parent);
                        elm_image_file_set(o, cover_fname.c_str(), NULL);
                        elm_image_preload_disabled_set(o, false);

                        elm_object_item_signal_emit(item, "show,cover", "calaos");
                }
                else
                {
                        if (!dltimer)
                        {
                                dltimer = new EcoreTimer(0.2, (sigc::slot<void>)
                                                 sigc::bind(sigc::mem_fun(*player, &AudioPlayer::getDBAlbumCoverItem),
                                                            album_infos, sigc::mem_fun(*this, &GenlistItemAlbumHeader::albumItemCoverGet_cb), AudioPlayer::AUDIO_COVER_SIZE_MEDIUM));
                        }
                }
        }

        return o;
}
Ejemplo n.º 2
0
void __gl_realized_cb(void *data , Evas_Object *obj , void *event_info)
{
    Elm_Object_Item *item = event_info;
    elm_object_item_signal_emit(item , "elm,state,normal" , "");
}
Ejemplo n.º 3
0
void GenlistItemBase::itemEmitSignal(string signal, string source)
{
    if (!item) return;

    elm_object_item_signal_emit(item, signal.c_str(), source.c_str());
}