Hello all,

I'm a newbie to EFL.  Here it goes...
How do I create a window and handle key down/up events?

Here is the snippet that I am using:
...
       win = elm_win_add(NULL, "hello", ELM_WIN_BASIC);
        elm_win_title_set(win, "Hello");
        evas_object_smart_callback_add(win, "delete-request", win_del, NULL);
...
                Evas_Object *o;

                o = evas_object_rectangle_add(evas_object_evas_get(win));
                evas_object_color_set(o, 0, 0, 0, 0);
                evas_object_resize(0, 320, 240);

                evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_UP, 
handle_key_up, NULL);
                evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
handle_key_down, NULL);
                evas_object_smart_member_add(o, win);

------------
However, 'o' is not getting any key down/up events.
Could anyone tell me what is wrong with the code?

By the way, I'm using Elementary on our device and I am quite amazed
about how Elementary simplifies the programming effort.  Kudoes E
developers!

Thanks in advance.


brian

-- 
brian
------------------

Cool-Karaoke - The smallest recording studio, in your palm, open-sourced
http://cool-idea.com.tw/

iMaGiNaTiOn iS mOrE iMpOrTaNt tHaN kNoWlEdGe

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to