Re: [E-devel] E moudule API BREAK proposal
On Sat, 11 Oct 2008 20:48:04 +0200 (CEST) Dave Andreoli [EMAIL PROTECTED] babbled: Hi all, I want to make an e17 module that expose simple edje objects as gadgets. The idea is that people can download edje file from the net(calculator, clocks and whatever next), put it in the right directory and then my module can expose this objects as they was gadgets (they must appear in the available gadgets list of the shelf or the gadman). So that the user can use the object where they want. This can be a really easy way to create and distribute simple gadgets as you don't have to compile the edje object for different arch (thinking about exchange can also host gadgets, without platform problem!). In the future my module can also make some advanced stuff, for example execute a bash, python (or what you like) script that is contained in the edje file, making the simple gadgets more functional... but this is another story... This was the good part of the post, now comes the bad :( I can't find a way to do this module without changing the E GADCON API. From the module I create an E_Gadcon_Client_Class for each 'simple widget' found in the right directory, and I call e_gadcon_provider_register() as many times as needed. But then when E ask me for the label, the icon and the id I can't know for witch 'simple widget' he need the information. This is how it is done now: struct _E_Gadcon_Client_Class { int version; const char *name; struct { E_Gadcon_Client *(*init) (E_Gadcon *gc, const char *name, const char *id, const char *style); void (*shutdown) (E_Gadcon_Client *gcc); void (*orient) (E_Gadcon_Client *gcc); char *(*label) (void); Evas_Object *(*icon) (Evas *evas); const char *(*id_new) (void); void (*id_del) (const char *id); } func; char *default_style; }; As you can see the function label(void) don't have params and my module is lost on this (for witch widget you want the label??). The same apply to the icon and id_new functions. So this is my proposed API struct _E_Gadcon_Client_Class { int version; const char *name; struct { E_Gadcon_Client *(*init) (E_Gadcon *gc, const char *name, const char *id, const char *style); void (*shutdown) (E_Gadcon_Client *gcc); void (*orient) (E_Gadcon_Client *gcc); char *(*label) (E_Gadcon_Client_Class *class); Evas_Object *(*icon) (Evas *evas, E_Gadcon_Client_Class *class); const char *(*id_new) (E_Gadcon_Client_Class *class); void (*id_del) (const char *id); } func; char *default_style; }; I simple add the E_Gadcon_Client_Class *class params to some functions. ok one thng. for consistency make E_Gadcon_Client_Class the first param for icon () and also for id_del() even if we don't use it - at least it's consistent :) I think that this kind of functionality (a single module that expose more than one gadgets) could be useful in future, for example we can then make a module that handle gadgets from different source (think of google_gadgets, OSX dashbord widget...and so on) like KDE4 seems to do. WE then access a really HUGE set of just done gadgets :) What do you think about all this? It make sense? maybe someone know how to do this without the break? Hope you like my idea, and also hope that this mail is clear enough... as always my English is not so good ;) hmm - it makes sense. i guess if we break - break before e17 is released. so lets do it. i'm in. do your stuff! :) - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/
Re: [E-devel] E moudule API BREAK proposal
- Carsten Haitzler (The Rasterman) [EMAIL PROTECTED] ha scritto: On Sat, 11 Oct 2008 20:48:04 +0200 (CEST) Dave Andreoli [EMAIL PROTECTED] babbled: Hi all, I want to make an e17 module that expose simple edje objects as gadgets. The idea is that people can download edje file from the net(calculator, clocks and whatever next), put it in the right directory and then my module can expose this objects as they was gadgets (they must appear in the available gadgets list of the shelf or the gadman). So that the user can use the object where they want. This can be a really easy way to create and distribute simple gadgets as you don't have to compile the edje object for different arch (thinking about exchange can also host gadgets, without platform problem!). In the future my module can also make some advanced stuff, for example execute a bash, python (or what you like) script that is contained in the edje file, making the simple gadgets more functional... but this is another story... This was the good part of the post, now comes the bad :( I can't find a way to do this module without changing the E GADCON API. From the module I create an E_Gadcon_Client_Class for each 'simple widget' found in the right directory, and I call e_gadcon_provider_register() as many times as needed. But then when E ask me for the label, the icon and the id I can't know for witch 'simple widget' he need the information. This is how it is done now: struct _E_Gadcon_Client_Class { int version; const char *name; struct { E_Gadcon_Client *(*init) (E_Gadcon *gc, const char *name, const char *id, const char *style); void (*shutdown) (E_Gadcon_Client *gcc); void (*orient) (E_Gadcon_Client *gcc); char *(*label) (void); Evas_Object *(*icon) (Evas *evas); const char *(*id_new) (void); void (*id_del) (const char *id); } func; char *default_style; }; As you can see the function label(void) don't have params and my module is lost on this (for witch widget you want the label??). The same apply to the icon and id_new functions. So this is my proposed API struct _E_Gadcon_Client_Class { int version; const char *name; struct { E_Gadcon_Client *(*init) (E_Gadcon *gc, const char *name, const char *id, const char *style); void (*shutdown) (E_Gadcon_Client *gcc); void (*orient) (E_Gadcon_Client *gcc); char *(*label) (E_Gadcon_Client_Class *class); Evas_Object *(*icon) (Evas *evas, E_Gadcon_Client_Class *class); const char *(*id_new) (E_Gadcon_Client_Class *class); void (*id_del) (const char *id); } func; char *default_style; }; I simple add the E_Gadcon_Client_Class *class params to some functions. ok one thng. for consistency make E_Gadcon_Client_Class the first param for icon () and also for id_del() even if we don't use it - at least it's consistent :) Ok and I will also add the param orientation to the function orient(). So we also can orient gadgets on the desktop :) Dave I think that this kind of functionality (a single module that expose more than one gadgets) could be useful in future, for example we can then make a module that handle gadgets from different source (think of google_gadgets, OSX dashbord widget...and so on) like KDE4 seems to do. WE then access a really HUGE set of just done gadgets :) What do you think about all this? It make sense? maybe someone know how to do this without the break? Hope you like my idea, and also hope that this mail is clear enough... as always my English is not so good ;) hmm - it makes sense. i guess if we break - break before e17 is released. so lets do it. i'm in. do your stuff! :) - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
Re: [E-devel] E moudule API BREAK proposal
I missed this thread earlier, so let me reply separately.. Dave wrote: I want to make an e17 module that expose simple edje objects as gadgets. The idea is that people can download edje file from the net(calculator, clocks and whatever next), put it in the right directory and then my module can expose this objects as they was gadgets (they must appear in the available gadgets list of the shelf or the gadman). So that the user can use the object where they want. This can be a really easy way to create and distribute simple gadgets as you don't have to compile the edje object for different arch (thinking about exchange can also host gadgets, without platform problem!). In the future my module can also make some advanced stuff, for example execute a bash, python (or what you like) script that is contained in the edje file, making the simple gadgets more functional... but this is another story... ... ... This is a nice idea - greater flexibility of gdagets/widgets/whatnots. Whether or not the e17 gadcon-client module api should be modified or not is debatable I suppose.. But note that many kinds of widgets/gadgets need not ne placed in such a gadcon. They could just as easily be 'free' desktop things, or part of some other kind of container element. I've actually suggested at some point that it would be nice to divorce the basic aspects of such 'gadgets' from any e17 specific requirements so that they could be realized in various other ways.. eg. as part of other kinds of containers, as free objs on an underlying evas, as separate apps, whatever. One could create compound gadgets from given ones, with an overall theming that extends that of the parts, etc. Basically, provide such 'gadgets' as loadable modules which have a func to 'add' the gadget as an object of a given evas (and some other funcs), ie. much like various evas/edje based approaches to gui widgetry. In any case, there's a lot here one can do to provide far more flexible, easily created, custom 'gadgetry'. :) Security Camera for your small business. Click Now! http://thirdpartyoffers.juno.com/TGL2141/fc/Ioyw6i3mYHqeqh6wR9VdLkfK01hVGFK36yx7ID8oN98g9ZNK9wphQ8/ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel