Eina_Bool v_itemsize_exists : 1;
Eina_Bool horizontal : 1;
Eina_Bool horizontal_exists : 1;
+ Eina_Bool align_x_exists;
+ double align_x;
+ Eina_Bool align_y_exists;
+ double align_y;
} Elm_Params_Gengrid;
static void
elm_gengrid_item_size_get(obj, &h_itemsize, &v_itemsize);
elm_gengrid_item_size_set(obj, p->h_itemsize, v_itemsize);
}
+ else if (p->align_x_exists || p->align_y_exists)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ if (p->align_x_exists)
+ elm_gengrid_align_set(obj, p->align_x, y);
+ else
+ elm_gengrid_align_set(obj, x, p->align_y);
+ }
if (p->horizontal_exists)
{
elm_gengrid_horizontal_set(obj, p->horizontal);
return EINA_TRUE;
}
}
-
+ else if (!strcmp(param->name, "align x")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ elm_gengrid_align_set(obj, param->d, y);
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align y")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ elm_gengrid_align_set(obj, x, param->d);
+ return EINA_TRUE;
+ }
ERR("unknown parameter '%s' of type '%s'",
param->name, edje_external_param_type_str(param->type));
return EINA_TRUE;
}
}
-
+ else if (!strcmp(param->name, "align x")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ param->d = x;
+ return EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align y")
+ && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+ {
+ double x, y;
+ elm_gengrid_align_get(obj, &x, &y);
+ param->d = y;
+ return EINA_TRUE;
+ }
ERR("unknown parameter '%s' of type '%s'",
param->name, edje_external_param_type_str(param->type));
mem->horizontal = !!param->i;
mem->horizontal_exists = EINA_TRUE;
}
+ else if (!strcmp(param->name, "align x"))
+ {
+ mem->align_x = param->d;
+ mem->align_x_exists = EINA_TRUE;
+ }
+ else if (!strcmp(param->name, "align y"))
+ {
+ mem->align_y = param->d;
+ mem->align_y_exists = EINA_TRUE;
+ }
}
return mem;
EDJE_EXTERNAL_PARAM_INFO_INT("horizontal item size"),
EDJE_EXTERNAL_PARAM_INFO_INT("vertical item size"),
EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align x"),
+ EDJE_EXTERNAL_PARAM_INFO_DOUBLE("align y"),
EDJE_EXTERNAL_PARAM_INFO_SENTINEL
};