1Gtk2::Gdk::Event(3)   User Contributed Perl Documentation  Gtk2::Gdk::Event(3)
2
3
4

NAME

6       Gtk2::Gdk::Event - wrapper for GdkEvent
7

HIERARCHY

9         Glib::Boxed
10         +----Gtk2::Gdk::Event
11

EVENT TYPES

13       •   Gtk2::Gdk::Event::Button
14
15       •   Gtk2::Gdk::Event::Client
16
17       •   Gtk2::Gdk::Event::Configure
18
19       •   Gtk2::Gdk::Event::Crossing
20
21       •   Gtk2::Gdk::Event::DND
22
23       •   Gtk2::Gdk::Event::Expose
24
25       •   Gtk2::Gdk::Event::Focus
26
27       •   Gtk2::Gdk::Event::Key
28
29       •   Gtk2::Gdk::Event::Motion
30
31       •   Gtk2::Gdk::Event::NoExpose
32
33       •   Gtk2::Gdk::Event::Property
34
35       •   Gtk2::Gdk::Event::Proximity
36
37       •   Gtk2::Gdk::Event::Scroll
38
39       •   Gtk2::Gdk::Event::Selection
40
41       •   Gtk2::Gdk::Event::Setting
42
43       •   Gtk2::Gdk::Event::Visibility
44
45       •   Gtk2::Gdk::Event::WindowState
46
47       •   Gtk2::Gdk::Event::OwnerChange (since gtk+ 2.6)
48
49       •   Gtk2::Gdk::Event::GrabBroken (since gtk+ 2.8)
50

METHODS

52   event = Gtk2::Gdk::Event->new ($type)
53       •   $type (Gtk2::Gdk::EventType)
54
55   double = $event->axis ($axis_use)
56       •   $axis_use (Gtk2::Gdk::AxisUse)
57
58   double = $event->get_axis ($axis_use)
59       •   $axis_use (Gtk2::Gdk::AxisUse)
60
61   ($x, $y) = $event->coords
62   ($x, $y) = $event->get_coords
63   event = $event->copy
64   event or undef = Gtk2::Gdk::Event->get
65   event or undef = Gtk2::Gdk::Event->get_graphics_expose ($window)
66       •   $window (Gtk2::Gdk::Window)
67
68   Gtk2::Gdk::Event->handler_set ($func, $data=undef)
69       •   $func (subroutine) function to get called for each event.
70
71       •   $data (scalar)
72
73       Set the function that handles all events from GDK.  GTK+ uses this to
74       dispatch events, and as such this is rarely of use to applications,
75       unless you are implementing completely custom event dispatching
76       (unlikely) or preprocess events somehow and then pass them on to
77       "Gtk2::main_do_event".  As a special case, if func is undef, we "reset"
78       the handler by passing the actual C function gtk_main_do_event to GDK,
79       to bypass the Perl marshaling (and take things back up to full speed).
80
81   event or undef = Gtk2::Gdk::Event->peek
82   Gtk2::Gdk::Event->put ($event)
83       •   $event (Gtk2::Gdk::Event)
84
85   ($x_root, $y_root) = $event->root_coords
86   ($x_root, $y_root) = $event->get_root_coords
87   screen = $event->get_screen
88       Since: gtk+ 2.2
89
90   $event->set_screen ($screen)
91       •   $screen (Gtk2::Gdk::Screen)
92
93       Since: gtk+ 2.2
94
95   boolean = Gtk2::Gdk::Event->send_client_message ($event, $winid)
96       •   $event (Gtk2::Gdk::Event)
97
98       •   $winid (Gtk2::Gdk::NativeWindow)
99
100   boolean = Gtk2::Gdk::Event->send_client_message_for_display ($display,
101       $event, $winid)
102       •   $display (Gtk2::Gdk::Display)
103
104       •   $event (Gtk2::Gdk::Event)
105
106       •   $winid (Gtk2::Gdk::NativeWindow)
107
108       Since: gtk+ 2.2
109
110   Gtk2::Gdk::Event->send_clientmessage_toall ($event)
111       •   $event (Gtk2::Gdk::Event)
112
113   integer = $event->send_event ($newvalue=0)
114       •   $newvalue (integer)
115
116   $modifiertype = $event->get_state
117   $modifiertype = $event->state
118       Get $event's state.  Croaks if that event type doesn't have a state.
119
120   $event->set_state ($newstate)
121       •   $newstate (Gtk2::Gdk::ModifierType)
122
123   $timestamp = $event->get_time
124   $timestamp = $event->time
125       Get $event's time.  If that event type doesn't have a time, or if
126       $event is undef, returns GDK_CURRENT_TIME, which is 0.
127
128   $event->set_time ($newtime)
129       •   $newtime (integer) timestamp
130
131   eventtype = $event->type
132   window or undef = $event->window ($newvalue=undef)
133       •   $newvalue (Gtk2::Gdk::Window or undef)
134
135   integer = $event->x_root
136   integer = $event->y_root

ENUMS AND FLAGS

138   enum Gtk2::Gdk::AxisUse
139       •   'ignore' / 'GDK_AXIS_IGNORE'
140
141       •   'x' / 'GDK_AXIS_X'
142
143       •   'y' / 'GDK_AXIS_Y'
144
145       •   'pressure' / 'GDK_AXIS_PRESSURE'
146
147       •   'xtilt' / 'GDK_AXIS_XTILT'
148
149       •   'ytilt' / 'GDK_AXIS_YTILT'
150
151       •   'wheel' / 'GDK_AXIS_WHEEL'
152
153       •   'last' / 'GDK_AXIS_LAST'
154
155   enum Gtk2::Gdk::EventType
156       •   'nothing' / 'GDK_NOTHING'
157
158       •   'delete' / 'GDK_DELETE'
159
160       •   'destroy' / 'GDK_DESTROY'
161
162       •   'expose' / 'GDK_EXPOSE'
163
164       •   'motion-notify' / 'GDK_MOTION_NOTIFY'
165
166       •   'button-press' / 'GDK_BUTTON_PRESS'
167
168       •   '2button-press' / 'GDK_2BUTTON_PRESS'
169
170       •   '3button-press' / 'GDK_3BUTTON_PRESS'
171
172       •   'button-release' / 'GDK_BUTTON_RELEASE'
173
174       •   'key-press' / 'GDK_KEY_PRESS'
175
176       •   'key-release' / 'GDK_KEY_RELEASE'
177
178       •   'enter-notify' / 'GDK_ENTER_NOTIFY'
179
180       •   'leave-notify' / 'GDK_LEAVE_NOTIFY'
181
182       •   'focus-change' / 'GDK_FOCUS_CHANGE'
183
184       •   'configure' / 'GDK_CONFIGURE'
185
186       •   'map' / 'GDK_MAP'
187
188       •   'unmap' / 'GDK_UNMAP'
189
190       •   'property-notify' / 'GDK_PROPERTY_NOTIFY'
191
192       •   'selection-clear' / 'GDK_SELECTION_CLEAR'
193
194       •   'selection-request' / 'GDK_SELECTION_REQUEST'
195
196       •   'selection-notify' / 'GDK_SELECTION_NOTIFY'
197
198       •   'proximity-in' / 'GDK_PROXIMITY_IN'
199
200       •   'proximity-out' / 'GDK_PROXIMITY_OUT'
201
202       •   'drag-enter' / 'GDK_DRAG_ENTER'
203
204       •   'drag-leave' / 'GDK_DRAG_LEAVE'
205
206       •   'drag-motion' / 'GDK_DRAG_MOTION'
207
208       •   'drag-status' / 'GDK_DRAG_STATUS'
209
210       •   'drop-start' / 'GDK_DROP_START'
211
212       •   'drop-finished' / 'GDK_DROP_FINISHED'
213
214       •   'client-event' / 'GDK_CLIENT_EVENT'
215
216       •   'visibility-notify' / 'GDK_VISIBILITY_NOTIFY'
217
218       •   'no-expose' / 'GDK_NO_EXPOSE'
219
220       •   'scroll' / 'GDK_SCROLL'
221
222       •   'window-state' / 'GDK_WINDOW_STATE'
223
224       •   'setting' / 'GDK_SETTING'
225
226       •   'owner-change' / 'GDK_OWNER_CHANGE'
227
228       •   'grab-broken' / 'GDK_GRAB_BROKEN'
229
230       •   'damage' / 'GDK_DAMAGE'
231
232       •   'event-last' / 'GDK_EVENT_LAST'
233
234   flags Gtk2::Gdk::ModifierType
235       •   'shift-mask' / 'GDK_SHIFT_MASK'
236
237       •   'lock-mask' / 'GDK_LOCK_MASK'
238
239       •   'control-mask' / 'GDK_CONTROL_MASK'
240
241       •   'mod1-mask' / 'GDK_MOD1_MASK'
242
243       •   'mod2-mask' / 'GDK_MOD2_MASK'
244
245       •   'mod3-mask' / 'GDK_MOD3_MASK'
246
247       •   'mod4-mask' / 'GDK_MOD4_MASK'
248
249       •   'mod5-mask' / 'GDK_MOD5_MASK'
250
251       •   'button1-mask' / 'GDK_BUTTON1_MASK'
252
253       •   'button2-mask' / 'GDK_BUTTON2_MASK'
254
255       •   'button3-mask' / 'GDK_BUTTON3_MASK'
256
257       •   'button4-mask' / 'GDK_BUTTON4_MASK'
258
259       •   'button5-mask' / 'GDK_BUTTON5_MASK'
260
261       •   'super-mask' / 'GDK_SUPER_MASK'
262
263       •   'hyper-mask' / 'GDK_HYPER_MASK'
264
265       •   'meta-mask' / 'GDK_META_MASK'
266
267       •   'release-mask' / 'GDK_RELEASE_MASK'
268
269       •   'modifier-mask' / 'GDK_MODIFIER_MASK'
270

SEE ALSO

272       Gtk2, Glib::Boxed
273
275       Copyright (C) 2003-2011 by the gtk2-perl team.
276
277       This software is licensed under the LGPL.  See Gtk2 for a full notice.
278
279
280
281perl v5.36.0                      2022-07-22               Gtk2::Gdk::Event(3)
Impressum