Using additional macros in reference codes was not a good idea.
This will make codes more inconsistent and confusing.
#endif
#include <Elementary.h>
-#define WEIGHT evas_object_size_hint_weight_set
-#define ALIGN_ evas_object_size_hint_align_set
-#define EXPAND(X) WEIGHT((X), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND)
-#define FILL(X) ALIGN_((X), EVAS_HINT_FILL, EVAS_HINT_FILL)
-
static Elm_Gengrid_Item_Class *gic, *ggic;
Evas_Object *grid_content_get(void *data, Evas_Object *obj, const char *part);
elm_gengrid_item_size_set(grid,
elm_config_scale_get() * 150,
elm_config_scale_get() * 150);
- EXPAND(grid); FILL(grid);
+ evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
}
ic = elm_gengrid_item_class_new();
Evas_Object *list;
list = elm_list_add(parent);
- EXPAND(list); FILL(list);
+ evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_list_item_append(list, "default", NULL, NULL,
_item_style_sel_cb, "default");
elm_list_item_append(list, "default_style", NULL, NULL,
rect = evas_object_rectangle_add(evas_object_evas_get(table));
evas_object_size_hint_min_set(rect, w, h);
- EXPAND(rect); FILL(rect);
+ evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(table, rect, 0, 0, 1, 1);
- EXPAND(obj); FILL(obj);
+ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(table, obj, 0, 0, 1, 1);
return table;
box = elm_box_add(win);
elm_box_horizontal_set(box, EINA_TRUE);
- EXPAND(box);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, box);
evas_object_show(box);
evas_object_show(list);
table = _elm_min_set(list, box, 100, 0);
- WEIGHT(table, 0, EVAS_HINT_EXPAND);
- FILL(table);
+ evas_object_size_hint_weight_set(table, 0.0, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, table);
evas_object_show(table);
#endif
#include <Elementary.h>
-#define WEIGHT evas_object_size_hint_weight_set
-#define ALIGN_ evas_object_size_hint_align_set
-#define EXPAND(X) WEIGHT((X), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND)
-#define FILL(X) ALIGN_((X), EVAS_HINT_FILL, EVAS_HINT_FILL)
-
Evas_Object * _elm_min_set(Evas_Object *obj, Evas_Object *parent,
Evas_Coord w, Evas_Coord h);
int i = 0;
list = elm_list_add(parent);
- EXPAND(list); FILL(list);
+ evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
while (_genlist_styles[i])
{
box = elm_box_add(win);
elm_box_horizontal_set(box, EINA_TRUE);
- EXPAND(box);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, box);
evas_object_show(box);
evas_object_show(list);
table = _elm_min_set(list, box, 200, 0);
- WEIGHT(table, 0, EVAS_HINT_EXPAND);
- FILL(table);
+ evas_object_size_hint_weight_set(table, 0.0, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, table);
evas_object_show(table);
gl = elm_genlist_add(box);
- EXPAND(gl); FILL(gl);
+ evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
_genlist_renew(gl, "default");
elm_box_pack_end(box, gl);
evas_object_show(gl);
#endif
#include <Elementary.h>
-#define WEIGHT evas_object_size_hint_weight_set
-#define ALIGN_ evas_object_size_hint_align_set
-#define EXPAND(X) WEIGHT((X), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND)
-#define FILL(X) ALIGN_((X), EVAS_HINT_FILL, EVAS_HINT_FILL)
-
#define BUTTON_TEXT_SET(BT, TEXT) \
elm_object_text_set((BT), (TEXT)); \
elm_object_tooltip_text_set((BT), (TEXT)); \
elm_win_autodel_set(win, EINA_TRUE);
box = elm_box_add(win);
- EXPAND(box);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_horizontal_set(box, EINA_TRUE);
elm_win_resize_object_add(win, box);
evas_object_show(box);
tb = elm_toolbar_add(win);
- WEIGHT(tb, 0, EVAS_HINT_EXPAND);
- FILL(tb);
+ evas_object_size_hint_weight_set(tb, 0.0, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_toolbar_horizontal_set(tb, EINA_FALSE);
elm_toolbar_select_mode_set(tb, ELM_OBJECT_SELECT_MODE_ALWAYS);
elm_box_pack_end(box, tb);
evas_object_show(tb);
nf = elm_naviframe_add(win);
- EXPAND(nf);
- FILL(nf);
+ evas_object_size_hint_weight_set(nf, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(nf, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(box, nf);
evas_object_show(nf);
{
const char *label[] = { "View 1", "View 2", "View 3", "View 4" };
o = elm_naviframe_add(win);
- EXPAND(o);
+ evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
btn = elm_button_add(o);
evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);