]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/events.sgml
Minor documentation fixes. (#80021, Yao Zhang; #75567, #75279, Vitaly
[~andy/gtk] / docs / reference / gdk / tmpl / events.sgml
1 <!-- ##### SECTION Title ##### -->
2 Events
3
4 <!-- ##### SECTION Short_Description ##### -->
5 functions for handling events from the window system.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 This section describes functions dealing with events from the window system.
10 </para>
11 <para>
12 In GTK+ applications the events are handled automatically in
13 gtk_main_do_event() and passed on to the appropriate widgets, so these
14 functions are rarely needed. Though some of the fields in the
15 <link linkend="gdk-Event-Structures">Event Structures</link> are useful.
16 </para>
17
18 <!-- ##### SECTION See_Also ##### -->
19 <para>
20 <variablelist>
21 <varlistentry>
22 <term><link linkend="gdk-Event-Structures">Event Structures</link></term>
23 <listitem><para>
24 The structs used for each type of event.
25 </para></listitem>
26 </varlistentry>
27 </variablelist>
28 </para>
29
30 <!-- ##### ENUM GdkEventType ##### -->
31 <para>
32 Specifies the type of the event.
33 </para>
34 <para>
35 Do not confuse these events with the signals that GTK+ widgets emit.
36 Although many of these events result in corresponding signals being emitted,
37 the events are often transformed or filtered along the way.
38 </para>
39
40 @GDK_NOTHING: a special code to indicate a null event.
41 @GDK_DELETE: the window manager has requested that the toplevel window be
42 hidden or destroyed, usually when the user clicks on a special icon in the
43 title bar.
44 @GDK_DESTROY: the window has been destroyed.
45 @GDK_EXPOSE: all or part of the window has become visible and needs to be
46 redrawn.
47 @GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved.
48 @GDK_BUTTON_PRESS: a mouse button has been pressed.
49 @GDK_2BUTTON_PRESS: a mouse button has been double-clicked (clicked twice
50 within a short period of time). Note that each click also generates a
51 %GDK_BUTTON_PRESS event.
52 @GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period
53 of time. Note that each click also generates a %GDK_BUTTON_PRESS event.
54 @GDK_BUTTON_RELEASE: a mouse button has been released.
55 @GDK_KEY_PRESS: a key has been pressed.
56 @GDK_KEY_RELEASE: a key has been released.
57 @GDK_ENTER_NOTIFY: the pointer has entered the window.
58 @GDK_LEAVE_NOTIFY: the pointer has left the window.
59 @GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window.
60 @GDK_CONFIGURE: the size, position or stacking order of the window has changed.
61 Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
62 @GDK_MAP: the window has been mapped.
63 @GDK_UNMAP: the window has been unmapped.
64 @GDK_PROPERTY_NOTIFY: a property on the window has been changed or deleted.
65 @GDK_SELECTION_CLEAR: the application has lost ownership of a selection.
66 @GDK_SELECTION_REQUEST: another application has requested a selection.
67 @GDK_SELECTION_NOTIFY: a selection has been received.
68 @GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
69 surface (e.g. a touchscreen or graphics tablet).
70 @GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing
71 surface.
72 @GDK_DRAG_ENTER: the mouse has entered the window while a drag is in progress.
73 @GDK_DRAG_LEAVE: the mouse has left the window while a drag is in progress.
74 @GDK_DRAG_MOTION: the mouse has moved in the window while a drag is in
75 progress.
76 @GDK_DRAG_STATUS: the status of the drag operation initiated by the window
77 has changed.
78 @GDK_DROP_START: a drop operation onto the window has started.
79 @GDK_DROP_FINISHED: the drop operation initiated by the window has completed.
80 @GDK_CLIENT_EVENT: a message has been received from another application.
81 @GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
82 @GDK_NO_EXPOSE: indicates that the source region was completely available
83 when parts of a drawable were copied. This is not very useful.
84 @GDK_SCROLL: 
85 @GDK_WINDOW_STATE: 
86 @GDK_SETTING: 
87
88 <!-- ##### ENUM GdkEventMask ##### -->
89 <para>
90 A set of bit-flags to indicate which events a window is to receive.
91 Most of these masks map onto one or more of the #GdkEventType event types
92 above.
93 </para>
94 <para>
95 %GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the
96 number of %GDK_MOTION_NOTIFY events received. Normally a %GDK_MOTION_NOTIFY
97 event is received each time the mouse moves. However, if the application
98 spends a lot of time processing the event (updating the display, for example),
99 it can easily lag behind the position of the mouse. When using the
100 %GDK_POINTER_MOTION_HINT_MASK the server will only send %GDK_MOTION_NOTIFY
101 events when the application asks for them, by calling gdk_window_get_pointer().
102 </para>
103
104 @GDK_EXPOSURE_MASK: 
105 @GDK_POINTER_MOTION_MASK: 
106 @GDK_POINTER_MOTION_HINT_MASK: 
107 @GDK_BUTTON_MOTION_MASK: 
108 @GDK_BUTTON1_MOTION_MASK: 
109 @GDK_BUTTON2_MOTION_MASK: 
110 @GDK_BUTTON3_MOTION_MASK: 
111 @GDK_BUTTON_PRESS_MASK: 
112 @GDK_BUTTON_RELEASE_MASK: 
113 @GDK_KEY_PRESS_MASK: 
114 @GDK_KEY_RELEASE_MASK: 
115 @GDK_ENTER_NOTIFY_MASK: 
116 @GDK_LEAVE_NOTIFY_MASK: 
117 @GDK_FOCUS_CHANGE_MASK: 
118 @GDK_STRUCTURE_MASK: 
119 @GDK_PROPERTY_CHANGE_MASK: 
120 @GDK_VISIBILITY_NOTIFY_MASK: 
121 @GDK_PROXIMITY_IN_MASK: 
122 @GDK_PROXIMITY_OUT_MASK: 
123 @GDK_SUBSTRUCTURE_MASK: 
124 @GDK_SCROLL_MASK: 
125 @GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
126
127 <!-- ##### MACRO GDK_CURRENT_TIME ##### -->
128 <para>
129 Represents the current time, and can be used anywhere a time is expected.
130 </para>
131
132
133
134 <!-- ##### MACRO GDK_PRIORITY_EVENTS ##### -->
135 <para>
136 This is the priority that events from the X server are given in the
137 <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
138 </para>
139
140
141
142 <!-- ##### MACRO GDK_PRIORITY_REDRAW ##### -->
143 <para>
144 This is the priority that the idle handler processing window updates
145 is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
146 </para>
147
148
149
150 <!-- ##### FUNCTION gdk_events_pending ##### -->
151 <para>
152 </para>
153
154 @Returns: 
155
156
157 <!-- ##### FUNCTION gdk_event_peek ##### -->
158 <para>
159 </para>
160
161 @Returns: 
162
163
164 <!-- ##### FUNCTION gdk_event_get ##### -->
165 <para>
166 </para>
167
168 @Returns: 
169
170
171 <!-- ##### FUNCTION gdk_event_get_graphics_expose ##### -->
172 <para>
173 </para>
174
175 @window: 
176 @Returns: 
177
178
179 <!-- ##### FUNCTION gdk_event_put ##### -->
180 <para>
181 </para>
182
183 @event: 
184
185
186 <!-- ##### FUNCTION gdk_event_copy ##### -->
187 <para>
188 </para>
189
190 @event: 
191 @Returns: 
192
193
194 <!-- ##### FUNCTION gdk_event_free ##### -->
195 <para>
196 </para>
197
198 @event: a #GdkEvent.
199
200
201 <!-- ##### FUNCTION gdk_event_get_time ##### -->
202 <para>
203 </para>
204
205 @event: 
206 @Returns: 
207
208
209 <!-- ##### FUNCTION gdk_event_get_state ##### -->
210 <para>
211
212 </para>
213
214 @event: 
215 @state: 
216 @Returns: 
217
218
219 <!-- ##### FUNCTION gdk_event_get_axis ##### -->
220 <para>
221
222 </para>
223
224 @event: 
225 @axis_use: 
226 @value: 
227 @Returns: 
228
229
230 <!-- ##### FUNCTION gdk_event_get_coords ##### -->
231 <para>
232
233 </para>
234
235 @event: 
236 @x_win: 
237 @y_win: 
238 @Returns: 
239
240
241 <!-- ##### FUNCTION gdk_event_get_root_coords ##### -->
242 <para>
243
244 </para>
245
246 @event: 
247 @x_root: 
248 @y_root: 
249 @Returns: 
250
251
252 <!-- ##### FUNCTION gdk_event_handler_set ##### -->
253 <para>
254 </para>
255
256 @func: 
257 @data: 
258 @notify: 
259
260
261 <!-- ##### USER_FUNCTION GdkEventFunc ##### -->
262 <para>
263 Specifies the type of function passed to gdk_event_handler_set() to handle
264 all GDK events.
265 </para>
266
267 @event: the #GdkEvent to process.
268 @data: user data set when the event handler was installed with
269 gdk_event_handler_set().
270
271
272 <!-- ##### FUNCTION gdk_event_send_client_message ##### -->
273 <para>
274 </para>
275
276 @event: 
277 @winid: 
278 @Returns: 
279 <!-- # Unused Parameters # -->
280 @xid: 
281
282
283 <!-- ##### FUNCTION gdk_event_send_client_message_for_display ##### -->
284 <para>
285
286 </para>
287
288 @display: 
289 @event: 
290 @winid: 
291 @Returns: 
292 <!-- # Unused Parameters # -->
293 @xid: 
294
295
296 <!-- ##### FUNCTION gdk_event_send_clientmessage_toall ##### -->
297 <para>
298 </para>
299
300 @event: 
301
302
303 <!-- ##### FUNCTION gdk_add_client_message_filter ##### -->
304 <para>
305 </para>
306
307 @message_type: 
308 @func: 
309 @data: 
310
311
312 <!-- ##### FUNCTION gdk_get_show_events ##### -->
313 <para>
314 </para>
315
316 @Returns: 
317
318
319 <!-- ##### FUNCTION gdk_set_show_events ##### -->
320 <para>
321 </para>
322
323 @show_events: 
324
325
326 <!-- ##### FUNCTION gdk_setting_get ##### -->
327 <para>
328 </para>
329
330 @name: 
331 @value: 
332 @Returns: 
333
334