Re: signal_map_event()



Doug McLain wrote:

Newbie gtkmm'er here. Can someone tell me more about signal_map_event() ? What situation would produce this signal? Also, is it incomplete documentation when a member such as this one is blank, or is it found elsewhere?

http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Widget.html#a224

Doug


Hey Doug,

The prototype for the signal_map_event callback slot is Glib::SignalProxy1<bool, GdkEventAny*> (this means that your callback slot must return a boolean value and must accept a pointer to a GdkEventAny structure as its sole formal parameter.)

When you connect to this signal, your call back will be invoked for every event that has been mapped to your object. The following talks about the structure passed to your callback slot:

typedef struct {
GdkEventType type;
GdkWindow *window;
gint8 send_event;
} GdkEventAny;

Thre foregoing contains the fields which are common to all event structs. Any event pointer can safely be cast to a pointer to a GdkEventAny to access these fields.

For all the different mapped events to which you can connect, try this link:

http://www.gtk.org/api/2.6/gdk/gdk-Event-Structures.html


Bob Caryl





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]