RE : mouse control
- From: AvA <a v a home nl>
- To: gtk-perl-list gnome org
- Subject: RE : mouse control
- Date: 19 Oct 2002 18:57:39 +0200
That works great, thanks
Hi AvA,
AvA wrote:
Hi all,
Is there a way that I can get some values from the mouse so I can crop
an ImLibImage with it.
The idea is how The Gimp does it.
Can you use a signal handler connected to 'button_press_event' and then
use the event structure passed to the handler (structure below)?
$VAR1 = bless( {
'state' => 0,
'xtilt' => '0',
'button' => 3,
'send_event' => 0,
'_ptr' => 143691524,
'window' => bless( {
'_gtk' => 143790040
}, 'Gtk::Gdk::Window' ),
'ytilt' => '0',
'x_root' => '103',
'source' => 'mouse',
'time' => -199762998,
'pressure' => '0.5',
'x' => 97,
'y_root' => '238',
'y' => 136,
'deviceid' => 65244,
'type' => 'button_press'
}, 'Gtk::Gdk::Event' );
Do $event->{'x'} and $event->{'y'} give you the coords you want?
Regards, Dermot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]