Sorry, the call to g_signal_emit_by_name() is wrong.
The button-press-event signal has a return value.
gboolean handled = false;
GdkEventButton* event_button = .............;
Gtk::Widget* widget = ..................; // or a pointer to a
class derived from Gtk::Widget
g_signal_emit_by_name(widget->gobj(), "button-press-event",
event_button, &handled);
Kjell
Den 2014-12-16 08:29,
Kjell Ahlstedt skrev:
I searched for a call to one of the
g_signal_emit*() functions in glibmm and gtkmm. I found none.
You will probably have to call the glib function
g_signal_emit_by_name() directly. Something like
GdkEventButton* event_button = .............;
Gtk::Widget* widget = ..................; // or a pointer to a
class derived from Gtk::Widget
g_signal_emit_by_name(widget->gobj(), "button-press-event",
event_button);
Kjell
Den 2014-12-15 09:37,
Klaus Rudolph skrev:
Hi all,
I simply want to create a signal like GDK_BUTTON_PRESS and want to send it to a window or widget.
I found the union GdkEvent and the GdkEventButton. I can fill the needed information and now the
last step: How can I send the event to a window/widget. I need not only the function name but also the context.
is it something like
window->emit??? ( event );
or must I fill the target window somewhere in the event and is there a
app->send_event(event).
Sorry, I can not find any example.
Thanks
Klaus
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
|