On Wed, Oct 6, 2010 at 3:09 AM, CZhe Yang <[email protected]> wrote: > Hi, I have some questions. I create new event types. > For example, using > evas_object_event_callback_add(evas_object,"MY DEFINE EVENT > TYPE",callback_function,NULL); > Basicly, it work. > If the evas_object is created from EDJ files, the evas_object can't receive > "MY DEFINE EVENT TYPE" event and call the callback function. > The evas object may be like this: > evas_object = edje_edit_object_add(evas);
Why are you using edje_edit_object_add() instead of edje_object_add()? > On the other hand, if the event type is EVAS_CALLBACK_MOUSE_DOWN, the > evas_object can work well. > So how can I do to fix the problems? > Please help me :) About the events, you need to understand the difference between normal object events, smart callbacks and edje signals. For evas_object_event_callback_add() you can only use the events defined by Evas. It's not possible to create new ones. Using smart objects however, you can emit any callback you want from it, but that will also depend on what you are trying to do. With Edje, what you want is signals, and for those you don't use Evas callbacks. Look at edje_object_signal_callback_add() and edje_object_signal_emit(). Those will let you listen to signals emitted from the edje object and send signals from your application to the edje. Now, if you give more details on what you want to achieve, maybe we can tell you exactly how to do it. And again, why edje_edit_object_add()? Unless you are writing and Edje editor, you should never even look at the edje_edit API. > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
