Hello Mandar,

On Wed, 2010-09-08 at 23:54 +0100, Mandar Dhonsale wrote:
> Hello All,
> 
> I am using JSON Script to create UI. When I define signal handler
> definition in JSON script as below and implemention in C code, I get
> the following error:
> 
> Could not find a signal handler 'on_key_press' for signal
> 'ClutterTexture::button-press-event'

It might be useful to have a look at this section of one of the
ClutterScript recipes:

http://docs.clutter-project.org/docs/clutter-cookbook/unstable/script-signals.html#script-signals-discussion-writing-handlers

In particular, you need to use the -export-dynamic flag when compiling
with gcc (or whatever the equivalent is in your build environment) so
that GModule can see your functions.

Hope this helps.
Elliot

> 
> //JSON Definition
> "id" : "image1", "name" : "image1", "type" : "ClutterTexture", 
>                             "x" : 18, "y" : 22, 
>                             "filename" : "image1.png",
>                             "signals" : [
>                                       { "name" : "button-press-event",
> "handler" : "on_key_press" }
>                                 ]
> 
> //on_key_press Implementation in C
> gboolean on_key_press(ClutterActor       *actor,
>                    ClutterButtonEvent *event,
>                    gpointer            data)
> {
>     int key = 2;
>     static int test=0;
>     
>     {
>         g_warning("Entered Button Press Event");
> 
>         
>         
>     }
> }
> 
> Can somebody help me with this implementation? I am using Clutter
> 1.2.12. If I change "on_key_press" with "clutter_main_quit", I get the
> window destroyed(as expected).
> 
> Thanks a lot in advance for help.
> 
> Regards,
> 
> Mandar Dhonsale
> 
> 
> 
> 

-- 
Elliot Smith
Intel Open Source Technology Centre

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to