Edje style used in elementary actually define the API you can use. It is theme specific, but for ease of use and improve developers experience, we should document the minimum expectation that a developer should have from any theme. Additionnaly, this would generate helpers automatically for dev that hide edje call to them. Bindings would use the C generated function to improve there own usage.
An examples for a button :
style { rounded { @message radius { [[ Allow to set how much rounded are the corner of the button ]] params { rx: uint; [[ Number of pixels horizontally taken for rounded corner ]] ry: uint; [[ Number of pixels vertially taken for rounded corner ]] } @text label; [[ Set button label ]] @content icon; [[ Set an object for icon ]] } } }
This would generate the following helper I guess :
bool efl_ui_property_rounded_radius_set(obj, rx, ry); // Which would call edje_object_message_send with an INT_SET message bool efl_ui_property_rounded_label_set(obj, "label"); bool efl_ui_property_rounded_icon_set(obj, efl_add(...));
The generated function would check that the style has been set on the object correctly to the right name, return false and failed if it hasn't. Return true and send the information properly to edje. Ideally we would be able to extract this style definition from the .eo, maybe generate the code somehow, that would make it possible to check that when we set a style, it does properly provide what the API said it should and fail if it doesn't.