[maemo-developers] how to capture mouse event for a GtkWindow in maemo?
From: Kimmo Hämäläinen kimmo.hamalainen at nokia.comDate: Mon Apr 20 09:23:04 EEST 2009
- Previous message: how to capture mouse event for a GtkWindow in maemo?
- Next message: how to capture mouse event for a GtkWindow in maemo?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 2009-04-19 at 07:00 +0200, ext chunlong yu wrote: > I inherit the Gtk::Window ,overwrite it's virtual member function > on_button_press_event (GdkEventButton* event) and > on_button_release_event (GdkEventButton* event) , > and add such codes in the construction function: > singal_button_press_event.connect(...) and > singal_button_release_event.connect(....) > or add such codes in the construction function :add_events > (Gdk::EventMask::.......). > > Neither method can capture mouse event. how can i response mouse event > for a GtkWindow in maemo? Maybe the Gtk tutorial helps. See e.g. the Scribble example program: http://library.gnome.org/devel/gtk-tutorial/stable/x2433.html You connect to the "button_press_event" signal to get the mouse button press. BR; Kimmo
- Previous message: how to capture mouse event for a GtkWindow in maemo?
- Next message: how to capture mouse event for a GtkWindow in maemo?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]