Support
Contribute
Contact
Tracker
Navigation
Personal tools
 

Evas Object Size Hints


Size hints are properties of object that are useful to third party components, like Edje groups and parts, widget sets, layout managers and everything that would try to negotiate a size. Having these in Evas_Object makes sense as a common API, possible enabling widgets from different toolkits to be mixed together (at least visually).

This is a proposal for adding some size hints (not enforcements!) to Evas_Object, these would be:

evas_object_size_min_{get,set}()
minimum size the object should have.
evas_object_size_max_{get,set}()
maximum size the object should have.
evas_object_size_request_{get,set}()
the size the object should have.
evas_object_aspect_{get,set}()
object's aspect policy. (unset, none/neither, horizontal, vertical, both)

These would be stored inside Evas_Object and when changed they would callback with EVAS_CALLBACK_CHANGED_SIZE_MIN, EVAS_CALLBACK_CHANGED_SIZE_MAX, EVAS_CALLBACK_CHANGED_SIZE_REQUEST, and EVAS_CALLBACK_CHANGED_ASPECT so interested peers could react to modifications.

In order to enforce these hints one can use evas_object_intercept_resize_callback_add() that would check apply value constraints. We could provide a default interceptor so its use will be easier and avoid duplicate code. (Maybe provide evas_object_size_auto_enforce() that sets this callback?)

Contents

Further Integration

Edje

  • Change edje_extern_object_*() to use Evas_Object counterparts.
  • Change edje_object_size_{min,max}_{get,set}() to use Evas_Object counterparts.
  • Have Edje to listen to listen to EVAS_CALLBACK_CHANGED_* and update its state.

ETK

list here integration suggestions

EWL

list here integration suggestions