giving an extra void *user_data to layout function is now easy to
write bindings, just give the callback to be a generic function that
will call the language/binding specific function handled as user_data.
Example, for python we can use:
void _layout_dispatcher(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) {
PyObject *pyobj = data, *args;
args = PyTyple_New(1);
PyTuple_SET_ITEM(args, 0, Evas_object_from_instance(o));
PyObject_Call(pyobj, args, NULL);
Py_DECREF(args);
}
evas_object_box_layout_set(o, _layout_dispatcher, pyobj, Py_DecRef);
SVN revision: 37640
Table code is still *incomplete*, it just do homogeneous layouts as
I'm still trying to figure out how to make it great.
I'm not expecting to make layout configurable, as we did for box, but
if you think it's required we can do that later.
Now that the public API of both BOX and TABLE are in, we can add these
as parts of Edje.
SVN revision: 37359
Box is a smart object to help with the common task of laying out lots
of objects. It's very flexibile and one can customize the layout
function on a per-object basis dynamically, just set a new layout
function (the most common are provided). By default layouts use size
hints from children to do their work, but one can also add new
properties, just subclass with evas_object_smart_smart_set() and then
define your own option_* callbacks.
This code was ported from Guarana (widgets/sequence_box.c) with
permission of ProFUSION embedded systems so it can be relicensed from
LGPL to Evas license.
Original author: Gustavo Lima Chaves <glima@profusion.mobi>
Port: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
SVN revision: 37188