Im trying to change some text on the screen when an image is clicked. This is my image in the EDC file:
part { name: "image";
type: IMAGE;
description { state: "default" 0.0;
max: 63 63;
min: 63 63;
image {
normal: "image.png";
}
rel1.relative: 1 1;
rel2.relative: 0 0.0;
}
program
{
name: "imageClick";
source: "image";
signal: "mouse,clicked,*";
action: SIGNAL_EMIT "imageClicked" "image";
}
}
Adding callback in code:
edje_object_signal_callback_add(ad->layout, "imageClicked" ,"image",imageClicked_cb, ad);
imageClicked_cb callback:
static void imageClicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
{
appdata_s *ad = data;
elm_object_part_text_set(ad->layout, "text", "Clicked");
}
edje_object_signal_callback_add is called inside create_base_gui and imageClicked_cb is declared outside any other functions.
I'm aware it's possible to change the text solely inside the EDC file however i'd like to know how to do it through c aswell.
Thanks in advance for any help provided