summaryrefslogtreecommitdiff
path: root/src/edje_externals/elm.c
diff options
context:
space:
mode:
authorJonathan Atton <jonathan.atton@gmail.com>2010-08-01 17:29:20 +0000
committerJonathan Atton <jonathan.atton@gmail.com>2010-08-01 17:29:20 +0000
commitd5931d33e08361a3231f1eb7c864d133819539c9 (patch)
tree06555f538290e2b0efefcc039f1acb112e721601 /src/edje_externals/elm.c
parentb58b37de111445348c3a6ff699d4601e1a1e4f9a (diff)
Elementary:
- we can get the content of a external object - a signal can be send to the content of a external object SVN revision: 50731
Diffstat (limited to '')
-rw-r--r--src/edje_externals/elm.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/edje_externals/elm.c b/src/edje_externals/elm.c
index b2a815e5f..af91e604f 100644
--- a/src/edje_externals/elm.c
+++ b/src/edje_externals/elm.c
@@ -4,9 +4,39 @@
4int _elm_log_dom = -1; 4int _elm_log_dom = -1;
5 5
6void 6void
7external_signal(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *signal, const char *source) 7external_signal(void *data __UNUSED__, Evas_Object *obj, const char *signal, const char *source)
8{ 8{
9 printf("External Signal received: '%s' '%s'\n", signal, source); 9 char *_signal = strdup(signal);
10 char *p = _signal;
11 Evas_Object *content;
12
13 while((*p!='\0') && (*p!=']'))
14 p++;
15
16
17 if((*p=='\0') || (*(p+1)!=':'))
18 {
19 ERR("Invalid External Signal received: '%s' '%s'\n", signal, source);
20 free(_signal);
21 return ;
22 }
23
24 *p = '\0';
25 p+=2; //jump ']' and ':'
26
27 Edje_External_Type *type = evas_object_data_get(obj, "Edje_External_Type");
28 if (!type->content_get)
29 {
30 ERR("external type '%s' from module '%s' does not provide content_get()",
31 type->module_name, type->module);
32 free(_signal);
33 return ;
34 }
35
36 content = type->content_get(type->data, obj, _signal);
37 free(_signal);
38 if(content)
39 edje_object_signal_emit(content, signal + (p - _signal), source);
10} 40}
11 41
12const char * 42const char *