2005/12/1, Brian Mattern <[EMAIL PROTECTED]>:
I just committed some code to simplify desktop module creation a little bit.
Currently, every single module that draws to the desktop is pretty much
just a copy/paste/edit of one of the original few modules.

I personally can vouch for that (^_^)

To avoid this
mess of duplicated code, I pooled a good portion of it together into
E_Gadget.
Basically, you just have to create an E_Gadget, and provide a few
callback functions.
What I have so far is by no means complete, and has a few issues (i set
gadman defaults AFTER the init callback, so there is no easy way to
override them. this will be fixed shortly).

You can take a look at src/modules/gadget_test/e_mod_main.c for an
example module (just displays an edje and sets up some dummy menus that
do nothing).

Anyway, this should make things much simpler. Any input is welcome, and
the API is by no means fixed.

On that point I have a question:
I imagine 3rd party modules are also intended to be able to use this.
The API includes a e_gadget_face_theme_set function, which uses e_theme. Correct me if I am wrong, but 3rd part modules won't be able to use this will they? All the 3rd party modules that I have looked at use edje_object_file_set to set the modules' .edj file.


I'm thinking about passing in a struct of function pointers to the
_new() function instead of each individually. That way we could add new
callbacks without API breakage.

Take a look, and let me know what you think.
--
rephorm

:-) ...Yet another thing to play with!

Regards!
David

Reply via email to