On Sun, Aug 1, 2010 at 2:29 PM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > Elementary: > - we can get the content of a external object > - a signal can be send to the content of a external object > +external_signal(void *data __UNUSED__, Evas_Object *obj, const char *signal, > const char *source) > { > - printf("External Signal received: '%s' '%s'\n", signal, source); > + char *_signal = strdup(signal); > + char *p = _signal; > + Evas_Object *content; > + > + while((*p!='\0') && (*p!=']')) > + p++; > + > + > + if((*p=='\0') || (*(p+1)!=':')) > + { > + ERR("Invalid External Signal received: '%s' '%s'\n", signal, > source); > + free(_signal); > + return ; > + } > + > + *p = '\0'; > + p+=2; //jump ']' and ':' > + > + Edje_External_Type *type = evas_object_data_get(obj, > "Edje_External_Type"); > + if (!type->content_get) > + { > + ERR("external type '%s' from module '%s' does not provide > content_get()", > + type->module_name, type->module); > + free(_signal); > + return ; > + } > + > + content = type->content_get(type->data, obj, _signal); > + free(_signal); > + if(content) > + edje_object_signal_emit(content, signal + (p - _signal), > source); > }
wow, pay attention to coding style! also, maybe you could use sscanf() to parse it? much easier and less error prone? > +static Evas_Object *external_anchorblock_content_get(void *data __UNUSED__, > + const Evas_Object *obj, const char *content) > +{ > + ERR("so content"); ROTFL, this is the best error message if you read this typo in pt_BR: "so contente" = "only happy" -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel