forked from enlightenment/efl
min.max size properties now per edje collection can be specified in the edje
.edc file and can be accessed. the min_size_get has become a min_size_calc since it does actually calculate it. also swallowed edjes will be queried for their own min/max size and that will be used to further limit the part that swallows. also you can attach properties to any old evas object so it will have min/max size properties (maybe one day this can go into evas itself?). also swallowed objects if deleted before the parent edje will "unswallow" themselves properly :) SVN revision: 7195
This commit is contained in:
parent
7af9c3bf45
commit
3d128a9cdc
|
@ -126,6 +126,8 @@ images {
|
||||||
|
|
||||||
collections {
|
collections {
|
||||||
group {
|
group {
|
||||||
|
min, 32 32;
|
||||||
|
max, 1024 768;
|
||||||
name, "test";
|
name, "test";
|
||||||
parts {
|
parts {
|
||||||
part {
|
part {
|
||||||
|
|
|
@ -15,6 +15,8 @@ collections
|
||||||
group
|
group
|
||||||
{
|
{
|
||||||
name, "test";
|
name, "test";
|
||||||
|
// min, 0 0;
|
||||||
|
// max, 0 0;
|
||||||
parts
|
parts
|
||||||
{
|
{
|
||||||
part
|
part
|
||||||
|
|
|
@ -9,6 +9,8 @@ static void ob_collections(void);
|
||||||
|
|
||||||
static void ob_collections_group(void);
|
static void ob_collections_group(void);
|
||||||
static void st_collections_group_name(void);
|
static void st_collections_group_name(void);
|
||||||
|
static void st_collections_group_min(void);
|
||||||
|
static void st_collections_group_max(void);
|
||||||
|
|
||||||
static void ob_collections_group_parts(void);
|
static void ob_collections_group_parts(void);
|
||||||
|
|
||||||
|
@ -74,6 +76,8 @@ New_Statement_Handler statement_handlers[] =
|
||||||
{
|
{
|
||||||
{"images.image", st_images_image},
|
{"images.image", st_images_image},
|
||||||
{"collections.group.name", st_collections_group_name},
|
{"collections.group.name", st_collections_group_name},
|
||||||
|
{"collections.group.min", st_collections_group_min},
|
||||||
|
{"collections.group.max", st_collections_group_max},
|
||||||
{"collections.group.parts.part.name", st_collections_group_parts_part_name},
|
{"collections.group.parts.part.name", st_collections_group_parts_part_name},
|
||||||
{"collections.group.parts.part.type", st_collections_group_parts_part_type},
|
{"collections.group.parts.part.type", st_collections_group_parts_part_type},
|
||||||
{"collections.group.parts.part.effect", st_collections_group_parts_part_effect},
|
{"collections.group.parts.part.effect", st_collections_group_parts_part_effect},
|
||||||
|
@ -131,6 +135,8 @@ New_Object_Handler object_handlers[] =
|
||||||
{"collections", ob_collections},
|
{"collections", ob_collections},
|
||||||
{"collections.group", ob_collections_group},
|
{"collections.group", ob_collections_group},
|
||||||
{"collections.group.name", NULL},
|
{"collections.group.name", NULL},
|
||||||
|
{"collections.group.min", NULL},
|
||||||
|
{"collections.group.max", NULL},
|
||||||
{"collections.group.parts", ob_collections_group_parts},
|
{"collections.group.parts", ob_collections_group_parts},
|
||||||
{"collections.group.parts.part", ob_collections_group_parts_part},
|
{"collections.group.parts.part", ob_collections_group_parts_part},
|
||||||
{"collections.group.parts.part.name", NULL},
|
{"collections.group.parts.part.name", NULL},
|
||||||
|
@ -294,6 +300,26 @@ st_collections_group_name(void)
|
||||||
de->entry = parse_str(0);
|
de->entry = parse_str(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
st_collections_group_min(void)
|
||||||
|
{
|
||||||
|
Edje_Part_Collection *pc;
|
||||||
|
|
||||||
|
pc = evas_list_data(evas_list_last(edje_collections));
|
||||||
|
pc->prop.min.w = parse_int_range(0, 0, 0x7fffffff);
|
||||||
|
pc->prop.min.h = parse_int_range(1, 0, 0x7fffffff);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
st_collections_group_max(void)
|
||||||
|
{
|
||||||
|
Edje_Part_Collection *pc;
|
||||||
|
|
||||||
|
pc = evas_list_data(evas_list_last(edje_collections));
|
||||||
|
pc->prop.max.w = parse_int_range(0, 0, 0x7fffffff);
|
||||||
|
pc->prop.max.h = parse_int_range(1, 0, 0x7fffffff);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ob_collections_group_parts(void)
|
ob_collections_group_parts(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -331,10 +331,8 @@ bottom_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
y -= 20;
|
y -= 20;
|
||||||
w += 20;
|
w += 20;
|
||||||
h += 30;
|
h += 30;
|
||||||
// minw = 20 + de->minw;
|
minw = 20 + de->minw;
|
||||||
// minh = 30 + de->minh;
|
minh = 30 + de->minh;
|
||||||
minw = 20;
|
|
||||||
minh = 30;
|
|
||||||
if (hdir > 0)
|
if (hdir > 0)
|
||||||
{
|
{
|
||||||
w += ev->cur.canvas.x - ev->prev.canvas.x;
|
w += ev->cur.canvas.x - ev->prev.canvas.x;
|
||||||
|
|
|
@ -13,6 +13,9 @@ extern "C" {
|
||||||
void edje_freeze (void);
|
void edje_freeze (void);
|
||||||
void edje_thaw (void);
|
void edje_thaw (void);
|
||||||
|
|
||||||
|
void edje_extern_object_min_size_set (Evas_Object *obj, double minw, double minh);
|
||||||
|
void edje_extern_object_max_size_set (Evas_Object *obj, double maxw, double maxh);
|
||||||
|
|
||||||
Evas_Object *edje_object_add (Evas *evas);
|
Evas_Object *edje_object_add (Evas *evas);
|
||||||
void edje_object_file_set (Evas_Object *o, const char *file, const char *part);
|
void edje_object_file_set (Evas_Object *o, const char *file, const char *part);
|
||||||
void edje_object_file_get (Evas_Object *o, const char **file, const char **part);
|
void edje_object_file_get (Evas_Object *o, const char **file, const char **part);
|
||||||
|
@ -28,6 +31,8 @@ extern "C" {
|
||||||
void edje_object_color_class_set (Evas_Object *o, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
|
void edje_object_color_class_set (Evas_Object *o, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
|
||||||
void edje_object_text_class_set (Evas_Object *o, const char *text_class, const char *font, double size);
|
void edje_object_text_class_set (Evas_Object *o, const char *text_class, const char *font, double size);
|
||||||
void edje_object_size_min_get (Evas_Object *o, double *minw, double *minh);
|
void edje_object_size_min_get (Evas_Object *o, double *minw, double *minh);
|
||||||
|
void edje_object_size_max_get (Evas_Object *o, double *maxw, double *maxh);
|
||||||
|
void edje_object_size_min_calc (Evas_Object *o, double *minw, double *minh);
|
||||||
int edje_object_part_exists (Evas_Object *o, const char *part);
|
int edje_object_part_exists (Evas_Object *o, const char *part);
|
||||||
void edje_object_part_geometry_get (Evas_Object *o, const char *part, double *x, double *y, double *w, double *h);
|
void edje_object_part_geometry_get (Evas_Object *o, const char *part, double *x, double *y, double *w, double *h);
|
||||||
void edje_object_part_text_set (Evas_Object *o, const char *part, const char *text);
|
void edje_object_part_text_set (Evas_Object *o, const char *part, const char *text);
|
||||||
|
|
|
@ -201,7 +201,7 @@ _edje_part_recalc_single(Edje *ed,
|
||||||
Edje_Real_Part *confine_to,
|
Edje_Real_Part *confine_to,
|
||||||
Edje_Calc_Params *params)
|
Edje_Calc_Params *params)
|
||||||
{
|
{
|
||||||
int minw, minh;
|
int minw, minh, maxw, maxh;
|
||||||
|
|
||||||
/* relative coords of top left & bottom right */
|
/* relative coords of top left & bottom right */
|
||||||
if (rel1_to)
|
if (rel1_to)
|
||||||
|
@ -322,6 +322,8 @@ _edje_part_recalc_single(Edje *ed,
|
||||||
}
|
}
|
||||||
minw = desc->min.w;
|
minw = desc->min.w;
|
||||||
minh = desc->min.h;
|
minh = desc->min.h;
|
||||||
|
if (ep->swallow_params.min.w > desc->min.w) minw = ep->swallow_params.min.w;
|
||||||
|
if (ep->swallow_params.min.h > desc->min.h) minh = ep->swallow_params.min.h;
|
||||||
/* if we have text that wants to make the min size the text size... */
|
/* if we have text that wants to make the min size the text size... */
|
||||||
if ((chosen_desc) && (ep->part->type == EDJE_PART_TYPE_TEXT))
|
if ((chosen_desc) && (ep->part->type == EDJE_PART_TYPE_TEXT))
|
||||||
{
|
{
|
||||||
|
@ -385,23 +387,29 @@ _edje_part_recalc_single(Edje *ed,
|
||||||
params->h = minh;
|
params->h = minh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
maxw = desc->max.w;
|
||||||
|
maxh = desc->max.h;
|
||||||
|
if ((ep->swallow_params.max.w > 0) &&
|
||||||
|
(ep->swallow_params.max.w < maxw)) maxw = ep->swallow_params.max.w;
|
||||||
|
if ((ep->swallow_params.max.h > 0) &&
|
||||||
|
(ep->swallow_params.max.h < maxh)) maxh = ep->swallow_params.max.h;
|
||||||
/* adjust for max size */
|
/* adjust for max size */
|
||||||
if (desc->max.w >= 0)
|
if (maxw >= 0)
|
||||||
{
|
{
|
||||||
if (params->w > desc->max.w)
|
if (params->w > maxw)
|
||||||
{
|
{
|
||||||
params->x = params->x +
|
params->x = params->x +
|
||||||
((params->w - desc->max.w) * desc->align.x);
|
((params->w - maxw) * desc->align.x);
|
||||||
params->w = desc->max.w;
|
params->w = maxw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (desc->max.h >= 0)
|
if (maxh >= 0)
|
||||||
{
|
{
|
||||||
if (params->h > desc->max.h)
|
if (params->h > maxh)
|
||||||
{
|
{
|
||||||
params->y = params->y +
|
params->y = params->y +
|
||||||
((params->h - desc->max.h) * desc->align.y);
|
((params->h - maxh) * desc->align.y);
|
||||||
params->h = desc->max.h;
|
params->h = maxh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* confine */
|
/* confine */
|
||||||
|
|
|
@ -177,5 +177,9 @@ _edje_edd_setup(void)
|
||||||
Edje_Part_Collection);
|
Edje_Part_Collection);
|
||||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_collection, Edje_Part_Collection, "programs", programs, _edje_edd_edje_program);
|
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_collection, Edje_Part_Collection, "programs", programs, _edje_edd_edje_program);
|
||||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_collection, Edje_Part_Collection, "parts", parts, _edje_edd_edje_part);
|
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_collection, Edje_Part_Collection, "parts", parts, _edje_edd_edje_part);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.min.w", prop.min.w, EET_T_INT);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.min.h", prop.min.h, EET_T_INT);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.max.w", prop.max.w, EET_T_INT);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.max.h", prop.max.h, EET_T_INT);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "id", id, EET_T_INT);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "id", id, EET_T_INT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,7 +243,13 @@ _edje_file_del(Edje *ed)
|
||||||
rp = ed->parts->data;
|
rp = ed->parts->data;
|
||||||
_edje_text_part_on_del(ed, rp);
|
_edje_text_part_on_del(ed, rp);
|
||||||
evas_object_del(rp->object);
|
evas_object_del(rp->object);
|
||||||
if (rp->swallowed_object) evas_object_del(rp->swallowed_object);
|
if (rp->swallowed_object)
|
||||||
|
{
|
||||||
|
evas_object_event_callback_del(rp->swallowed_object,
|
||||||
|
EVAS_CALLBACK_FREE,
|
||||||
|
_edje_object_part_swallow_free_cb);
|
||||||
|
evas_object_del(rp->swallowed_object);
|
||||||
|
}
|
||||||
if (rp->text.text) free(rp->text.text);
|
if (rp->text.text) free(rp->text.text);
|
||||||
if (rp->text.font) free(rp->text.font);
|
if (rp->text.font) free(rp->text.font);
|
||||||
if (rp->text.cache.in_str) free(rp->text.cache.in_str);
|
if (rp->text.cache.in_str) free(rp->text.cache.in_str);
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
|
|
||||||
/* FIXME:
|
/* FIXME:
|
||||||
*
|
|
||||||
* free stuff - no more leaks
|
|
||||||
*
|
*
|
||||||
* dragables have to work
|
* dragables have to work
|
||||||
* drag start/top signals etc.
|
* drag start/top signals etc.
|
||||||
|
@ -26,8 +24,6 @@
|
||||||
* query dragable for its relative pos value
|
* query dragable for its relative pos value
|
||||||
* dragable needs to be able to affext rel/abs values of other parts
|
* dragable needs to be able to affext rel/abs values of other parts
|
||||||
*
|
*
|
||||||
* swallowed objects need to be able to advertise min/max size
|
|
||||||
*
|
|
||||||
* need to be able to list collections in an eet file
|
* need to be able to list collections in an eet file
|
||||||
*
|
*
|
||||||
* externally sourced images need to be supported in edje_cc and edje
|
* externally sourced images need to be supported in edje_cc and edje
|
||||||
|
@ -182,7 +178,14 @@ struct _Edje_Part_Collection
|
||||||
|
|
||||||
int id; /* the collection id */
|
int id; /* the collection id */
|
||||||
|
|
||||||
|
struct {
|
||||||
|
struct {
|
||||||
|
int w, h;
|
||||||
|
} min, max;
|
||||||
|
} prop;
|
||||||
|
|
||||||
int references;
|
int references;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
Evas_Hash *no_matches;
|
Evas_Hash *no_matches;
|
||||||
Evas_Hash *matches;
|
Evas_Hash *matches;
|
||||||
|
@ -362,6 +365,11 @@ struct _Edje_Real_Part
|
||||||
Evas_Object *object;
|
Evas_Object *object;
|
||||||
Evas_List *extra_objects;
|
Evas_List *extra_objects;
|
||||||
Evas_Object *swallowed_object;
|
Evas_Object *swallowed_object;
|
||||||
|
struct {
|
||||||
|
struct {
|
||||||
|
int w, h;
|
||||||
|
} min, max;
|
||||||
|
} swallow_params;
|
||||||
unsigned char calculated : 1;
|
unsigned char calculated : 1;
|
||||||
unsigned char still_in : 1;
|
unsigned char still_in : 1;
|
||||||
int clicked_button;
|
int clicked_button;
|
||||||
|
@ -519,6 +527,7 @@ Edje *_edje_fetch(Evas_Object *obj);
|
||||||
int _edje_glob_match(char *str, char *glob);
|
int _edje_glob_match(char *str, char *glob);
|
||||||
int _edje_freeze(Edje *ed);
|
int _edje_freeze(Edje *ed);
|
||||||
int _edje_thaw(Edje *ed);
|
int _edje_thaw(Edje *ed);
|
||||||
|
void _edje_object_part_swallow_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||||
|
|
||||||
|
|
||||||
extern Eet_Data_Descriptor *_edje_edd_edje_file;
|
extern Eet_Data_Descriptor *_edje_edd_edje_file;
|
||||||
|
|
|
@ -241,6 +241,7 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
char *type;
|
||||||
|
|
||||||
ed = _edje_fetch(obj);
|
ed = _edje_fetch(obj);
|
||||||
if ((!ed) || (!part)) return;
|
if ((!ed) || (!part)) return;
|
||||||
|
@ -248,6 +249,9 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
|
||||||
if (!rp) return;
|
if (!rp) return;
|
||||||
if (rp->swallowed_object)
|
if (rp->swallowed_object)
|
||||||
{
|
{
|
||||||
|
evas_object_event_callback_del(rp->swallowed_object,
|
||||||
|
EVAS_CALLBACK_FREE,
|
||||||
|
_edje_object_part_swallow_free_cb);
|
||||||
evas_object_clip_unset(rp->swallowed_object);
|
evas_object_clip_unset(rp->swallowed_object);
|
||||||
rp->swallowed_object = NULL;
|
rp->swallowed_object = NULL;
|
||||||
}
|
}
|
||||||
|
@ -255,10 +259,75 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw
|
||||||
rp->swallowed_object = obj_swallow;
|
rp->swallowed_object = obj_swallow;
|
||||||
evas_object_clip_set(rp->swallowed_object, ed->clipper);
|
evas_object_clip_set(rp->swallowed_object, ed->clipper);
|
||||||
evas_object_stack_above(rp->swallowed_object, rp->object);
|
evas_object_stack_above(rp->swallowed_object, rp->object);
|
||||||
|
evas_object_event_callback_add(rp->swallowed_object,
|
||||||
|
EVAS_CALLBACK_FREE,
|
||||||
|
_edje_object_part_swallow_free_cb,
|
||||||
|
obj);
|
||||||
|
type = (char *)evas_object_type_get(obj_swallow);
|
||||||
|
if ((type) && (!strcmp(type, "edje")))
|
||||||
|
{
|
||||||
|
double w, h;
|
||||||
|
|
||||||
|
edje_object_size_min_get(obj_swallow, &w, &h);
|
||||||
|
rp->swallow_params.min.w = w;
|
||||||
|
rp->swallow_params.min.h = h;
|
||||||
|
edje_object_size_max_get(obj_swallow, &w, &h);
|
||||||
|
rp->swallow_params.max.w = w;
|
||||||
|
rp->swallow_params.max.h = h;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rp->swallow_params.min.w =
|
||||||
|
(int)evas_object_data_get(obj_swallow, "\377 edje.minw");
|
||||||
|
rp->swallow_params.min.h =
|
||||||
|
(int)evas_object_data_get(obj_swallow, "\377 edje.minh");
|
||||||
|
rp->swallow_params.max.w =
|
||||||
|
(int)evas_object_data_get(obj_swallow, "\377 edje.maxw");
|
||||||
|
rp->swallow_params.max.h =
|
||||||
|
(int)evas_object_data_get(obj_swallow, "\377 edje.maxh");
|
||||||
|
}
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
edje_extern_object_min_size_set(Evas_Object *obj, double minw, double minh)
|
||||||
|
{
|
||||||
|
int mw, mh;
|
||||||
|
|
||||||
|
mw = minw;
|
||||||
|
if (mw < 0) mw = 0;
|
||||||
|
mh = minh;
|
||||||
|
if (mh < 0) mh = 0;
|
||||||
|
if (mw > 0)
|
||||||
|
evas_object_data_set(obj, "\377 edje.minw", (void *)mw);
|
||||||
|
else
|
||||||
|
evas_object_data_del(obj, "\377 edje.minw");
|
||||||
|
if (mh > 0)
|
||||||
|
evas_object_data_set(obj, "\377 edje.minh", (void *)mh);
|
||||||
|
else
|
||||||
|
evas_object_data_del(obj, "\377 edje.maxw");
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
edje_extern_object_max_size_set(Evas_Object *obj, double maxw, double maxh)
|
||||||
|
{
|
||||||
|
int mw, mh;
|
||||||
|
|
||||||
|
mw = maxw;
|
||||||
|
if (mw < 0) mw = 0;
|
||||||
|
mh = maxh;
|
||||||
|
if (mh < 0) mh = 0;
|
||||||
|
if (mw > 0)
|
||||||
|
evas_object_data_set(obj, "\377 edje.maxw", (void *)mw);
|
||||||
|
else
|
||||||
|
evas_object_data_del(obj, "\377 edje.maxw");
|
||||||
|
if (mh > 0)
|
||||||
|
evas_object_data_set(obj, "\377 edje.maxh", (void *)mh);
|
||||||
|
else
|
||||||
|
evas_object_data_del(obj, "\377 edje.maxh");
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
|
edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
|
||||||
{
|
{
|
||||||
|
@ -276,6 +345,10 @@ edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
|
||||||
{
|
{
|
||||||
evas_object_clip_unset(rp->swallowed_object);
|
evas_object_clip_unset(rp->swallowed_object);
|
||||||
rp->swallowed_object = NULL;
|
rp->swallowed_object = NULL;
|
||||||
|
rp->swallow_params.min.w = 0;
|
||||||
|
rp->swallow_params.min.h = 0;
|
||||||
|
rp->swallow_params.max.w = 0;
|
||||||
|
rp->swallow_params.max.h = 0;
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
return;
|
return;
|
||||||
|
@ -298,6 +371,52 @@ edje_object_part_swallow_get(Evas_Object *obj, const char *part)
|
||||||
|
|
||||||
void
|
void
|
||||||
edje_object_size_min_get(Evas_Object *obj, double *minw, double *minh)
|
edje_object_size_min_get(Evas_Object *obj, double *minw, double *minh)
|
||||||
|
{
|
||||||
|
Edje *ed;
|
||||||
|
|
||||||
|
ed = _edje_fetch(obj);
|
||||||
|
if (!ed)
|
||||||
|
{
|
||||||
|
if (minw) *minw = 0;
|
||||||
|
if (minh) *minh = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (minw) *minw = ed->collection->prop.min.w;
|
||||||
|
if (minh) *minh = ed->collection->prop.min.h;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
edje_object_size_max_get(Evas_Object *obj, double *maxw, double *maxh)
|
||||||
|
{
|
||||||
|
Edje *ed;
|
||||||
|
|
||||||
|
ed = _edje_fetch(obj);
|
||||||
|
if (!ed)
|
||||||
|
{
|
||||||
|
if (maxw) *maxw = 0;
|
||||||
|
if (maxh) *maxh = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ed->collection->prop.max.w == 0)
|
||||||
|
{
|
||||||
|
if (maxw) *maxw = 1e+37;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (maxw) *maxw = ed->collection->prop.max.w;
|
||||||
|
}
|
||||||
|
if (ed->collection->prop.max.h == 0)
|
||||||
|
{
|
||||||
|
if (maxh) *maxh = 1e+37;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (maxh) *maxh = ed->collection->prop.max.h;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
edje_object_size_min_calc(Evas_Object *obj, double *minw, double *minh)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
double pw, ph;
|
double pw, ph;
|
||||||
|
@ -305,6 +424,12 @@ edje_object_size_min_get(Evas_Object *obj, double *minw, double *minh)
|
||||||
int ok;
|
int ok;
|
||||||
|
|
||||||
ed = _edje_fetch(obj);
|
ed = _edje_fetch(obj);
|
||||||
|
if (!ed)
|
||||||
|
{
|
||||||
|
if (minw) *minw = 0;
|
||||||
|
if (minh) *minh = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
ed->calc_only = 1;
|
ed->calc_only = 1;
|
||||||
pw = ed->w;
|
pw = ed->w;
|
||||||
ph = ed->h;
|
ph = ed->h;
|
||||||
|
@ -485,3 +610,13 @@ _edje_thaw(Edje *ed)
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
return ed->freeze;
|
return ed->freeze;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_edje_object_part_swallow_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
|
{
|
||||||
|
Evas_Object *edje_obj;
|
||||||
|
|
||||||
|
edje_obj = data;
|
||||||
|
edje_object_part_unswallow(edje_obj, obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue