diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/evas/src/lib/canvas/evas_name.c | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/evas/src/lib/canvas/evas_name.c')
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_name.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/canvas/evas_name.c b/libraries/evas/src/lib/canvas/evas_name.c index c42f941..1a9d20f 100644 --- a/libraries/evas/src/lib/canvas/evas_name.c +++ b/libraries/evas/src/lib/canvas/evas_name.c | |||
@@ -38,3 +38,35 @@ evas_object_name_find(const Evas *e, const char *name) | |||
38 | if (!name) return NULL; | 38 | if (!name) return NULL; |
39 | return (Evas_Object *)eina_hash_find(e->name_hash, name); | 39 | return (Evas_Object *)eina_hash_find(e->name_hash, name); |
40 | } | 40 | } |
41 | |||
42 | static Evas_Object * | ||
43 | _evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) | ||
44 | { | ||
45 | const Eina_Inlist *lst; | ||
46 | Evas_Object *child; | ||
47 | |||
48 | if (!obj->smart.smart) return NULL; | ||
49 | lst = evas_object_smart_members_get_direct(obj); | ||
50 | EINA_INLIST_FOREACH(lst, child) | ||
51 | { | ||
52 | if (child->delete_me) continue; | ||
53 | if (!child->name) continue; | ||
54 | if (!strcmp(name, child->name)) return child; | ||
55 | if (recurse != 0) | ||
56 | { | ||
57 | if ((obj = _evas_object_name_child_find(child, name, recurse - 1))) | ||
58 | return (Evas_Object *)obj; | ||
59 | } | ||
60 | } | ||
61 | return NULL; | ||
62 | } | ||
63 | |||
64 | EAPI Evas_Object * | ||
65 | evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) | ||
66 | { | ||
67 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
68 | return NULL; | ||
69 | MAGIC_CHECK_END(); | ||
70 | if (!name) return NULL; | ||
71 | return _evas_object_name_child_find(obj, name, recurse); | ||
72 | } | ||