Hello,

On Fri, Apr 18, 2014 at 4:58 AM, Olivier Nougarede
<[email protected]> wrote:
> In an edc file, i have the following:
>
> group { name: "ok_img";
>    min: 20  20;
>    parts {
>       part { name: "okimg";
>          type: IMAGE;
>           mouse_events: 1;
>          description { state: "default" 0.0;
>             image.normal: "ic_ok.png";
>          }
>       }
>    }
>    programs {
>       program {
>             name:"ok_img_clicked";
>             signal: "mouse,clicked,1";
>             source:"okimg";
>             action: SIGNAL_EMIT "mclick" "okimg";
>          }
>    }
> }
>
> in a source file:
> o, hbox are * Evas_Object,
>
> o = elm_image_add(hbox);
> elm_image_file_set(o, APP_THEME,"ok_img");
> elm_image_no_scale_set(o, EINA_TRUE);
> elm_image_resizable_set(o, EINA_TRUE, EINA_TRUE);
> elm_box_pack_end(hbox, o);
> evas_object_show(o);
> edje_object_signal_callback_add(o, "mclick","okimg", cb, target);
>
> In main.c
> elm_theme_overlay_add(NULL, APP_THEME);
>
> The image is displayed on my widget, but clicking it does not trigger the 
> callback!
> I must be missing something important... but what???

o is an elm_image, not an Edje object (internally it will use edje,
but the top object is not). You should either use edje directly or use
elm_layout and its API. The former make your life easier by doing the
integration job of edje with surrounding elementary object.
-- 
Cedric BAIL

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
enlightenment-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

Reply via email to