Re: [e-users] edje_object_signal_callback_add not triggering

2014-04-18 Thread The Rasterman
On Fri, 18 Apr 2014 04:58:33 +0200 Olivier Nougarede onougar...@hotmail.fr
said:

 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???

elm images are images. images are not interactive elements. they display
images. if you want it to be interactive use elm layout.


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
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
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users


[e-users] edje_object_signal_callback_add not triggering

2014-04-17 Thread Olivier Nougarede
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???

Regards.
Olivier
  
--
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
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users


Re: [e-users] edje_object_signal_callback_add not triggering

2014-04-17 Thread Cedric BAIL
Hello,

On Fri, Apr 18, 2014 at 4:58 AM, Olivier Nougarede
onougar...@hotmail.fr 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
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users