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. 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 ;) Thanks Dave ------------------------------------------------------------------------- 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=100&url=/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel