diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/lib/canvas/evas_name.c | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/evas/src/lib/canvas/evas_name.c')
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_name.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/canvas/evas_name.c b/libraries/evas/src/lib/canvas/evas_name.c new file mode 100644 index 0000000..c42f941 --- /dev/null +++ b/libraries/evas/src/lib/canvas/evas_name.c | |||
@@ -0,0 +1,40 @@ | |||
1 | #include "evas_common.h" | ||
2 | #include "evas_private.h" | ||
3 | |||
4 | EAPI void | ||
5 | evas_object_name_set(Evas_Object *obj, const char *name) | ||
6 | { | ||
7 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
8 | return; | ||
9 | MAGIC_CHECK_END(); | ||
10 | if (obj->name) | ||
11 | { | ||
12 | eina_hash_del(obj->layer->evas->name_hash, obj->name, obj); | ||
13 | free(obj->name); | ||
14 | } | ||
15 | if (!name) obj->name = NULL; | ||
16 | else | ||
17 | { | ||
18 | obj->name = strdup(name); | ||
19 | eina_hash_add(obj->layer->evas->name_hash, obj->name, obj); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | EAPI const char * | ||
24 | evas_object_name_get(const Evas_Object *obj) | ||
25 | { | ||
26 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
27 | return NULL; | ||
28 | MAGIC_CHECK_END(); | ||
29 | return obj->name; | ||
30 | } | ||
31 | |||
32 | EAPI Evas_Object * | ||
33 | evas_object_name_find(const Evas *e, const char *name) | ||
34 | { | ||
35 | MAGIC_CHECK(e, Evas, MAGIC_EVAS); | ||
36 | return NULL; | ||
37 | MAGIC_CHECK_END(); | ||
38 | if (!name) return NULL; | ||
39 | return (Evas_Object *)eina_hash_find(e->name_hash, name); | ||
40 | } | ||