Brian Mattern wrote:
> Hey everyone,
> I've attached a patch that implements a new edje part type: EXTERNAL.
> The basic idea is as follows:
>
> An application (or library) can implement swallowable widgets that are
> keyed by a type name. By implementing a few callbacks and registering
> with edje, the app can allow a themer to include a part of this type
> by simply doing:
>
> part {
> name: "external_part";
> type: EXTERNAL;
> source: "type_name";
> description {
> ...
> params { int: "foo" 10; string: "bar" "str_val"; ... }
> }
> }
>
>
> The current callbacks are:
>
> Evas_Object *add(void *data, Evas *e, Evas_Object *parent, const
> Eina_List *params)
> gets called when edje loads and finds an external part of this type
> the parent object is passed in so that it can be sent signals/messages
>
> void signal_emit(void *data, Evas_Object *obj, const char *emission,
> const char *source)
> probably should be called 'signal_recv' or so, but gets called when
> a signal like 'external_part:signal_name' is sent to the parent edj
> (like GROUP objects, the part name and colon gets stripped off).
>
> void state_set(void *data, Evas_Object *obj, const Eina_List
> *from_params, const Eina_List *to_params, float pos)
> called whenever the state changes (including repeatedly while
> tweening between states)
> use pos to linearly interpolate params between states
>
> I also attached a really basic test program (nothing fancy, left or
> right click on the bg to trigger state changes or press 's' to switch
> themes) to illustrate the usage.
>
> It would be interesting to register all of elementary's widgets with
> edje in this fashion. (We'd still need some way for the theme to
> specify which app data should be associated with the widget).
>
> Anyway, before committing this, I'd like to get some feedback on the
> API and ideas for how to extend this concept.
>
> Brian
>
Hey Brian :)
I think it could take some time for people to find and build ways
to use this creatively. It would be interesting to see some initial
attempts at that.
One 'simple' way to use it would be via custom smart classes that
do some things that evas currently can't directly do... eg. various
kinds of custom rendering.
Lots that could be done with just that, even some very complex
stuff like svg or html rendering or just some basic things like custom
kinds of thumbnail generation, borders or decoration effects, etc.
Such new custom objects could then be incorporated into an edje for
whatever reason an app/lib might want to use that for.. eg. one could
define new kinds of widgets (for ewl or etk or elem) which would use
such custom things as part of the widget's theme.
Or in a kind of converse to that, as you suggested, use existing elem
widgets as new external parts say to define some creative kinds of layout
mechanisms for compound types and use that in defining the notion of
'theme' for such a layout-oriented widget, or scene, or whatever else.
However, I'm not sure if it would 'replace' something like a separate
lib that could 'extend' edje say in that it would allow for a declarative
means to define eg. elementary widget types or other evas object types
and their particular properties more explicitly, along with possibly
inlined or referenced edje groups... ie. something like Hisham's evolve/edc,
or some such. That approach would likely seem more 'natural' to many
people as a means to add basic widgets into a declarative format.
As to the api.. seems fine to me, though I'm not sure why you feel
the 'add' constructor would benefit by having the 'data' argument?
As to possible extensions of the concept...
____________________________________________________________
Research interior design degree programs offered by top schools. Click Here.
http://thirdpartyoffers.juno.com/TGL2141/fc/BLSrjpTIfrbPAUteJeqRooR2UvY5RcbWYdmJiwNaVidvzSSLwCaMW5Q1BiI/
------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel