forked from enlightenment/efl
edje_object_file_set() now returns 1 on success and 0 on failure.
SVN revision: 7493
This commit is contained in:
parent
a566961983
commit
7e7a3e88b4
|
@ -27,7 +27,7 @@ extern "C" {
|
||||||
|
|
||||||
Evas_Object *edje_object_add (Evas *evas);
|
Evas_Object *edje_object_add (Evas *evas);
|
||||||
const char *edje_object_data_get (Evas_Object *obj, const char *key);
|
const char *edje_object_data_get (Evas_Object *obj, const char *key);
|
||||||
void edje_object_file_set (Evas_Object *o, const char *file, const char *part);
|
int 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);
|
||||||
void edje_object_signal_callback_add (Evas_Object *o, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
|
void edje_object_signal_callback_add (Evas_Object *o, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
|
||||||
void *edje_object_signal_callback_del (Evas_Object *o, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source));
|
void *edje_object_signal_callback_del (Evas_Object *o, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source));
|
||||||
|
|
|
@ -7,18 +7,18 @@ static void _edje_collection_free_part_description_free(Edje_Part_Description *d
|
||||||
static int _edje_collection_free_prog_cache_matches_free_cb(Evas_Hash *hash, const char *key, void *data, void *fdata);
|
static int _edje_collection_free_prog_cache_matches_free_cb(Evas_Hash *hash, const char *key, void *data, void *fdata);
|
||||||
|
|
||||||
/* API Routines */
|
/* API Routines */
|
||||||
void
|
int
|
||||||
edje_object_file_set(Evas_Object *obj, const char *file, const char *part)
|
edje_object_file_set(Evas_Object *obj, const char *file, const char *part)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
ed = _edje_fetch(obj);
|
ed = _edje_fetch(obj);
|
||||||
if (!ed) return;
|
if (!ed) return 0;
|
||||||
if (!file) file = "";
|
if (!file) file = "";
|
||||||
if (!part) part = "";
|
if (!part) part = "";
|
||||||
if (((ed->path) && (!strcmp(file, ed->path))) &&
|
if (((ed->path) && (!strcmp(file, ed->path))) &&
|
||||||
(ed->part) && (!strcmp(part, ed->part)))
|
(ed->part) && (!strcmp(part, ed->part)))
|
||||||
return;
|
return 0;
|
||||||
|
|
||||||
_edje_file_del(ed);
|
_edje_file_del(ed);
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ edje_object_file_set(Evas_Object *obj, const char *file, const char *part)
|
||||||
|
|
||||||
ep = l->data;
|
ep = l->data;
|
||||||
rp = calloc(1, sizeof(Edje_Real_Part));
|
rp = calloc(1, sizeof(Edje_Real_Part));
|
||||||
if (!rp) return;
|
if (!rp) return 0;
|
||||||
rp->part = ep;
|
rp->part = ep;
|
||||||
ed->parts = evas_list_append(ed->parts, rp);
|
ed->parts = evas_list_append(ed->parts, rp);
|
||||||
rp->param1.description = ep->default_desc;
|
rp->param1.description = ep->default_desc;
|
||||||
|
@ -189,7 +189,11 @@ edje_object_file_set(Evas_Object *obj, const char *file, const char *part)
|
||||||
_edje_thaw(ed);
|
_edje_thaw(ed);
|
||||||
_edje_unblock(ed);
|
_edje_unblock(ed);
|
||||||
_edje_unref(ed);
|
_edje_unref(ed);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
else return 0;
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue