[maemo-developers] how to capture mouse event for a GtkWindow in maemo?
From: Murray Cumming murrayc at murrayc.comDate: Mon Apr 20 16:43:39 EEST 2009
- Previous message: how to capture mouse event for a GtkWindow in maemo?
- Next message: Maemo Official Platform Bug Jar 2009.16
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 2009-04-19 at 13:00 +0800, 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) , There are no such default signal handler virtual functions in the maaemo version of gtkmm: http://maemomm.garage.maemo.org/docs/tutorial/html/ch04s02.html > and add such codes in the construction function: > singal_button_press_event.connect(...) and > singal_button_release_event.connect(....) You probably need to connect "after": http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-xeventsignals.html > or add such codes in the construction > function :add_events(Gdk::EventMask::.......). Note that you can only use add_events() after the widget has been realized. For instance, in a signal_realize signal handler. > Neither method can capture mouse event. how can i response mouse event > for a GtkWindow in maemo? -- murrayc at murrayc.com www.murrayc.com www.openismus.com
- Previous message: how to capture mouse event for a GtkWindow in maemo?
- Next message: Maemo Official Platform Bug Jar 2009.16
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]