*/
EAPI Eina_Bool edje_edit_part_item_align_y_set(Evas_Object *obj, const char *part, const char *item, double align_y);
+/** Get the horizontal weight value of a part item.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain item.
+ * @param item The name of the item to get horizontal weight value.
+ *
+ * @return The horizontal weight value for the given item (value is between -1.0 and 1.0)
+ * @since 1.11
+ */
+EAPI double edje_edit_part_item_weight_x_get(Evas_Object *obj, const char *part, const char *item);
+
+/** Set the horizontal we value of a part item.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain itemf
+ * @param item The name of the item to set horizontal weight value.
+ * @param weight_x New value of the horizontal weight.
+ *
+ * @return @c EINA_TRUE If successfull, @c EINA_FALSE otherwise.
+ * @since 1.11
+ */
+EAPI Eina_Bool edje_edit_part_item_weight_x_set(Evas_Object *obj, const char *part, const char *item, double weight_x);
+
+/** Get the vertical weight value of a part item.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain item.
+ * @param item The name of the item to get vertical weight value.
+ *
+ * @return The vertical weight value for the given item (value is between -1.0 and 1.0)
+ * @since 1.11
+ */
+EAPI double edje_edit_part_item_weight_y_get(Evas_Object *obj, const char *part, const char *item);
+
+/** Set the vertical weight value of a part item.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain item.
+ * @param item The name of the item to set vertical weight value.
+ * @param weight_y New value of the vertical weight.
+ *
+ * @return @c EINA_TRUE If successfull, @c EINA_FALSE otherwise.
+ * @since 1.11
+ */
+EAPI Eina_Bool edje_edit_part_item_weight_y_set(Evas_Object *obj, const char *part, const char *item, double weight_y);
+
/** Get column/row position of the part's item.
*
* @param obj Object being edited.
return EINA_TRUE;
}
-#define FUNC_PART_ITEM_DOUBLE(Name, Value) \
+#define FUNC_PART_ITEM_DOUBLE(Name, Value, Min, Max) \
EAPI double \
edje_edit_part_item_##Name##_get(Evas_Object *obj, const char *part, const char *item_name) \
{ \
Edje_Pack_Element *item = NULL; \
if ((!obj) || (!part) || (!item_name)) \
return EINA_FALSE; \
- if ((v < -1.0) || (v > 1.0)) \
+ if ((v < Min) || (v > Max)) \
return EINA_FALSE; \
GET_RP_OR_RETURN(EINA_FALSE); \
ep = rp->part; \
return EINA_TRUE; \
}
-FUNC_PART_ITEM_DOUBLE(align_x, align.x);
-FUNC_PART_ITEM_DOUBLE(align_y, align.y);
+FUNC_PART_ITEM_DOUBLE(align_x, align.x, -1.0, 1.0);
+FUNC_PART_ITEM_DOUBLE(align_y, align.y, -1.0, 1.0);
+FUNC_PART_ITEM_DOUBLE(weight_x, weight.x, 0.0, 99999.990);
+FUNC_PART_ITEM_DOUBLE(weight_y, weight.y, 0.0, 99999.990);
#undef FUNC_PART_ITEM_DOUBLE