GtkWidget::get_pointer

array get_pointer();

Obtains the location of the mouse pointer in widget coordinates.

Widget coordinates are a bit odd; for historical reasons, they are defined as widget->window coordinates for widgets that are not Gtk::NO_WINDOW widgets, and are relative to widget->allocation.x, widget->allocation.y for widgets that are Gtk::NO_WINDOW widgets.