This is an event signal, fired when the connected widget picks up a
GDK_BUTTON_PRESS event. Button press events are
generated by any of the mouse buttons being pressed. You can distinguish
between the mouse buttons in the callback by using an
if or switch statement:
<?php
function on_click($widget, $event, $data)
{
switch($event->button) {
case 1:
/* do something appropriate to a left click */
break;
case 2:
/* do something appropriate to a middle click */
break;
case 3:
/* do something appropriate to a right click */
break;
}
}
$widget->connect('button-press-event', 'on_click', $data);
?>