2012년 11월 18일 일요일에 Andreas Volz님이 작성:

> Hello,
>
> I've just some problem to understand that event_info parameter in Evas
> callbacks. e.g.:
>
> http://docs.enlightenment.org/auto/elementary/fileselector_example_c.html
>
> ...
> /* 'selected' cb */
> static void
> _fs_selected(void        *data,
>              Evas_Object *obj,
>              void        *event_info)
> {
>    const char *selected = event_info;
>    /* event_info contains the full path of the selected file */
>
>    printf("There's been a selection: %s\n", selected);
> }
> ...
>  /* the 'done' cb is called when the user presses ok/cancel */
>    evas_object_smart_callback_add(fs, "done", _fs_done, win);
> ...
>
> In this example the event_info* is casted in sime magic way to a char*.
> My problem is that event_info* could always be anything and I don't
> know it without looking into the sources (here e.g. elm_fileselector).
> It's not written anywhere in the documentation that event_info* is a
> char*. (Or I didn't find it...)
>
> So is there any way to find out as API user the type of event_info*
> which I should cast?
>
> In my special case (Eflxx C++ wrapper) have the problem to design a
> type safe interface. I've really no idea to do it. But even using the C
> interface I don't like it. Or did I miss understood the API?
>
> I would really prefer that event_info* would be some structure with a
> data pointer and some magic identifiers. Then it would be possible to
> find out the type of an event.
>
> What do you think? Am I alone with this problem? Any ideas for a better
> event_info interface?


if event_info has a structure with magic number or type, magic number
could be conflicted after widget customization by end user if  widget
customization is allowed. but I don't know customization is allowed or not
now or for the future.







>
> regards
>         Andreas
>
> --
> Technical Blog <http://andreasvolz.wordpress.com/>
>
>
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net <javascript:;>
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>


-- 
BRs,
Kim.
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to