summaryrefslogtreecommitdiff
path: root/docs/reference/gdk/tmpl/events.sgml
blob: 941c4e5ceabd095fc9f504a69c20316e4c863b68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!-- ##### SECTION Title ##### -->
Events

<!-- ##### SECTION Short_Description ##### -->
Functions for handling events from the window system

<!-- ##### SECTION Long_Description ##### -->
<para>
This section describes functions dealing with events from the window system.
</para>
<para>
In GTK+ applications the events are handled automatically in
gtk_main_do_event() and passed on to the appropriate widgets, so these
functions are rarely needed. Though some of the fields in the
<link linkend="gdk-Event-Structures">Event Structures</link> are useful.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term><link linkend="gdk-Event-Structures">Event Structures</link></term>
<listitem><para>
The structs used for each type of event.
</para></listitem>
</varlistentry>
</variablelist>
</para>

<!-- ##### ENUM GdkEventType ##### -->
<para>
Specifies the type of the event.
</para>
<para>
Do not confuse these events with the signals that GTK+ widgets emit.
Although many of these events result in corresponding signals being emitted,
the events are often transformed or filtered along the way.
</para>

@GDK_NOTHING: a special code to indicate a null event.
@GDK_DELETE: the window manager has requested that the toplevel window be
hidden or destroyed, usually when the user clicks on a special icon in the
title bar.
@GDK_DESTROY: the window has been destroyed.
@GDK_EXPOSE: all or part of the window has become visible and needs to be
redrawn.
@GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved.
@GDK_BUTTON_PRESS: a mouse button has been pressed.
@GDK_2BUTTON_PRESS: a mouse button has been double-clicked (clicked twice
within a short period of time). Note that each click also generates a
%GDK_BUTTON_PRESS event.
@GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period
of time. Note that each click also generates a %GDK_BUTTON_PRESS event.
@GDK_BUTTON_RELEASE: a mouse button has been released.
@GDK_KEY_PRESS: a key has been pressed.
@GDK_KEY_RELEASE: a key has been released.
@GDK_ENTER_NOTIFY: the pointer has entered the window.
@GDK_LEAVE_NOTIFY: the pointer has left the window.
@GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window.
@GDK_CONFIGURE: the size, position or stacking order of the window has changed.
Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
@GDK_MAP: the window has been mapped.
@GDK_UNMAP: the window has been unmapped.
@GDK_PROPERTY_NOTIFY: a property on the window has been changed or deleted.
@GDK_SELECTION_CLEAR: the application has lost ownership of a selection.
@GDK_SELECTION_REQUEST: another application has requested a selection.
@GDK_SELECTION_NOTIFY: a selection has been received.
@GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
surface (e.g. a touchscreen or graphics tablet).
@GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing
surface.
@GDK_DRAG_ENTER: the mouse has entered the window while a drag is in progress.
@GDK_DRAG_LEAVE: the mouse has left the window while a drag is in progress.
@GDK_DRAG_MOTION: the mouse has moved in the window while a drag is in
progress.
@GDK_DRAG_STATUS: the status of the drag operation initiated by the window
has changed.
@GDK_DROP_START: a drop operation onto the window has started.
@GDK_DROP_FINISHED: the drop operation initiated by the window has completed.
@GDK_CLIENT_EVENT: a message has been received from another application.
@GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
@GDK_NO_EXPOSE: indicates that the source region was completely available
when parts of a drawable were copied. This is not very useful.
@GDK_SCROLL: 
@GDK_WINDOW_STATE: 
@GDK_SETTING: 
@GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
  was added in 2.6

<!-- ##### ENUM GdkEventMask ##### -->
<para>
A set of bit-flags to indicate which events a window is to receive.
Most of these masks map onto one or more of the #GdkEventType event types
above.
</para>
<para>
%GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the
number of %GDK_MOTION_NOTIFY events received. Normally a %GDK_MOTION_NOTIFY
event is received each time the mouse moves. However, if the application
spends a lot of time processing the event (updating the display, for example),
it can easily lag behind the position of the mouse. When using the
%GDK_POINTER_MOTION_HINT_MASK the server will only send a single %GDK_MOTION_NOTIFY
event (which is marked as a hint) until the application asks for more, by calling 
gdk_window_get_pointer().
</para>

@GDK_EXPOSURE_MASK: 
@GDK_POINTER_MOTION_MASK: 
@GDK_POINTER_MOTION_HINT_MASK: 
@GDK_BUTTON_MOTION_MASK: 
@GDK_BUTTON1_MOTION_MASK: 
@GDK_BUTTON2_MOTION_MASK: 
@GDK_BUTTON3_MOTION_MASK: 
@GDK_BUTTON_PRESS_MASK: 
@GDK_BUTTON_RELEASE_MASK: 
@GDK_KEY_PRESS_MASK: 
@GDK_KEY_RELEASE_MASK: 
@GDK_ENTER_NOTIFY_MASK: 
@GDK_LEAVE_NOTIFY_MASK: 
@GDK_FOCUS_CHANGE_MASK: 
@GDK_STRUCTURE_MASK: 
@GDK_PROPERTY_CHANGE_MASK: 
@GDK_VISIBILITY_NOTIFY_MASK: 
@GDK_PROXIMITY_IN_MASK: 
@GDK_PROXIMITY_OUT_MASK: 
@GDK_SUBSTRUCTURE_MASK: 
@GDK_SCROLL_MASK: 
@GDK_ALL_EVENTS_MASK: the combination of all the above event masks.

<!-- ##### MACRO GDK_CURRENT_TIME ##### -->
<para>
Represents the current time, and can be used anywhere a time is expected.
</para>



<!-- ##### MACRO GDK_PRIORITY_EVENTS ##### -->
<para>
This is the priority that events from the X server are given in the
<link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
</para>



<!-- ##### MACRO GDK_PRIORITY_REDRAW ##### -->
<para>
This is the priority that the idle handler processing window updates
is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
</para>



<!-- ##### FUNCTION gdk_events_pending ##### -->
<para>
</para>

@Returns: 


<!-- ##### FUNCTION gdk_event_peek ##### -->
<para>
</para>

@Returns: 


<!-- ##### FUNCTION gdk_event_get ##### -->
<para>
</para>

@Returns: 


<!-- ##### FUNCTION gdk_event_get_graphics_expose ##### -->
<para>
</para>

@window: 
@Returns: 


<!-- ##### FUNCTION gdk_event_put ##### -->
<para>
</para>

@event: 


<!-- ##### FUNCTION gdk_event_new ##### -->
<para>

</para>

@type: 
@Returns: 


<!-- ##### FUNCTION gdk_event_copy ##### -->
<para>
</para>

@event: 
@Returns: 


<!-- ##### FUNCTION gdk_event_free ##### -->
<para>
</para>

@event: a #GdkEvent.


<!-- ##### FUNCTION gdk_event_get_time ##### -->
<para>
</para>

@event: 
@Returns: 


<!-- ##### FUNCTION gdk_event_get_state ##### -->
<para>

</para>

@event: 
@state: 
@Returns: 


<!-- ##### FUNCTION gdk_event_get_axis ##### -->
<para>

</para>

@event: 
@axis_use: 
@value: 
@Returns: 


<!-- ##### FUNCTION gdk_event_get_coords ##### -->
<para>

</para>

@event: 
@x_win: 
@y_win: 
@Returns: 


<!-- ##### FUNCTION gdk_event_get_root_coords ##### -->
<para>

</para>

@event: 
@x_root: 
@y_root: 
@Returns: 


<!-- ##### FUNCTION gdk_event_handler_set ##### -->
<para>
</para>

@func: 
@data: 
@notify: 


<!-- ##### USER_FUNCTION GdkEventFunc ##### -->
<para>
Specifies the type of function passed to gdk_event_handler_set() to handle
all GDK events.
</para>

@event: the #GdkEvent to process.
@data: user data set when the event handler was installed with
gdk_event_handler_set().


<!-- ##### FUNCTION gdk_event_send_client_message ##### -->
<para>
</para>

@event: 
@winid: 
@Returns: 
<!-- # Unused Parameters # -->
@xid: 


<!-- ##### FUNCTION gdk_event_send_client_message_for_display ##### -->
<para>

</para>

@display: 
@event: 
@winid: 
@Returns: 
<!-- # Unused Parameters # -->
@xid: 


<!-- ##### FUNCTION gdk_event_send_clientmessage_toall ##### -->
<para>
</para>

@event: 


<!-- ##### FUNCTION gdk_add_client_message_filter ##### -->
<para>
</para>

@message_type: 
@func: 
@data: 


<!-- ##### FUNCTION gdk_get_show_events ##### -->
<para>
</para>

@Returns: 


<!-- ##### FUNCTION gdk_set_show_events ##### -->
<para>
</para>

@show_events: 


<!-- ##### FUNCTION gdk_event_set_screen ##### -->
<para>

</para>

@event: 
@screen: 


<!-- ##### FUNCTION gdk_event_get_screen ##### -->
<para>

</para>

@event: 
@Returns: 


<!-- ##### FUNCTION gdk_setting_get ##### -->
<para>
</para>

@name: 
@value: 
@Returns: