This signal is emitted when a mouse button has been pressed down.

Useful event properties are:

Example 154. Using the key-press-event signal

$wnd = new GtkWindow();
$wnd->connect_simple('destroy', array('Gtk', 'main_quit'));

//we want to receive mouse button press events
$wnd->connect('button-press-event', 'onButtonPress');

//here we handle the mouse button press events
function onButtonPress($widget, $event) {
    $widget->set_title($event->button . ' - ' . $event->x . ':' . $event->y);


Callback function

bool callback(GtkWidget widget, GdkEvent event);