Re: Get mouse clicks on the map
- From: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
- To: Keith Sharp <keith sharp gmail com>
- Cc: libchamplain-list gnome org
- Subject: Re: Get mouse clicks on the map
- Date: Sat, 9 Jan 2010 11:32:35 +0100
On Sat, Jan 9, 2010 at 11:06 AM, Keith Sharp
<keith sharp gmail com> wrote:
I've been tinkering with the launcher-gtk.c program in the demos, and I was trying to add the abilty to catch mouse clicks on the map and print them to the console (with the ultimate aim of creating a marker or popup menu on a mouse click).
The demo laucher.c shows how to do it. You first have to set the view as 'reactive' with clutter_actor_set_reactive().
clutter_actor_set_reactive (actor, TRUE);
g_signal_connect (actor, "button-release-event",
G_CALLBACK (mouse_click_cb),
NULL);
The rest of the code should be the same as you wrote it.
Note: I think that version 0.4.3 has a regression because the callback doesn't seem to be called. I will wait a bit until Pierre-Luc confirms this.
--
Emmanuel Rodriguez
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]