File: gdk-Events.html

package info (click to toggle)
gtk%2B2.0 2.20.1-2%2Bdeb6u2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 136,284 kB
  • ctags: 66,487
  • sloc: ansic: 590,318; sh: 10,559; makefile: 5,573; xml: 1,357; python: 866; perl: 776; asm: 457; awk: 72; cpp: 34
file content (1299 lines) | stat: -rw-r--r-- 77,784 bytes parent folder | download | duplicates (2)
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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Events</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GDK Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-Windows.html" title="Windows">
<link rel="next" href="gdk-Event-Structures.html" title="Event Structures">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-Windows.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK Reference Manual</th>
<td><a accesskey="n" href="gdk-Event-Structures.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gdk-Events.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gdk-Events.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="Events">
<a name="gdk-Events"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk-Events.top_of_page"></a>Events</span></h2>
<p>Events — Functions for handling events from the window system</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="gdk-Events.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gdk/gdk.h&gt;

enum                <a class="link" href="gdk-Events.html#GdkEventType" title="enum GdkEventType">GdkEventType</a>;
enum                <a class="link" href="gdk-Events.html#GdkEventMask" title="enum GdkEventMask">GdkEventMask</a>;
#define             <a class="link" href="gdk-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME">GDK_CURRENT_TIME</a>
#define             <a class="link" href="gdk-Events.html#GDK-PRIORITY-EVENTS:CAPS" title="GDK_PRIORITY_EVENTS">GDK_PRIORITY_EVENTS</a>
#define             <a class="link" href="gdk-Events.html#GDK-PRIORITY-REDRAW:CAPS" title="GDK_PRIORITY_REDRAW">GDK_PRIORITY_REDRAW</a>

<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-Events.html#gdk-events-pending" title="gdk_events_pending ()">gdk_events_pending</a>                  (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a>*           <a class="link" href="gdk-Events.html#gdk-event-peek" title="gdk_event_peek ()">gdk_event_peek</a>                      (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a>*           <a class="link" href="gdk-Events.html#gdk-event-get" title="gdk_event_get ()">gdk_event_get</a>                       (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a>*           <a class="link" href="gdk-Events.html#gdk-event-get-graphics-expose" title="gdk_event_get_graphics_expose ()">gdk_event_get_graphics_expose</a>       (<em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Events.html#gdk-event-put" title="gdk_event_put ()">gdk_event_put</a>                       (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a>*           <a class="link" href="gdk-Events.html#gdk-event-new" title="gdk_event_new ()">gdk_event_new</a>                       (<em class="parameter"><code><a class="link" href="gdk-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a> type</code></em>);
<a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a>*           <a class="link" href="gdk-Events.html#gdk-event-copy" title="gdk_event_copy ()">gdk_event_copy</a>                      (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Events.html#gdk-event-free" title="gdk_event_free ()">gdk_event_free</a>                      (<em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>             <a class="link" href="gdk-Events.html#gdk-event-get-time" title="gdk_event_get_time ()">gdk_event_get_time</a>                  (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-Events.html#gdk-event-get-state" title="gdk_event_get_state ()">gdk_event_get_state</a>                 (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> *state</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-Events.html#gdk-event-get-axis" title="gdk_event_get_axis ()">gdk_event_get_axis</a>                  (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Input-Devices.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> axis_use</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *value</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-Events.html#gdk-event-get-coords" title="gdk_event_get_coords ()">gdk_event_get_coords</a>                (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_win</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_win</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-Events.html#gdk-event-get-root-coords" title="gdk_event_get_root_coords ()">gdk_event_get_root_coords</a>           (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_root</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_root</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Events.html#gdk-event-request-motions" title="gdk_event_request_motions ()">gdk_event_request_motions</a>           (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEventMotion" title="GdkEventMotion"><span class="type">GdkEventMotion</span></a> *event</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="gdk-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()">gdk_event_handler_set</a>               (<em class="parameter"><code><a class="link" href="gdk-Events.html#GdkEventFunc" title="GdkEventFunc ()"><span class="type">GdkEventFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="gdk-Events.html#GdkEventFunc" title="GdkEventFunc ()">*GdkEventFunc</a>)                     (<em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);

<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-Events.html#gdk-event-send-client-message" title="gdk_event_send_client_message ()">gdk_event_send_client_message</a>       (<em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> winid</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-Events.html#gdk-event-send-client-message-for-display" title="gdk_event_send_client_message_for_display ()">gdk_event_send_client_message_for_display</a>
                                                        (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> winid</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Events.html#gdk-event-send-clientmessage-toall" title="gdk_event_send_clientmessage_toall ()">gdk_event_send_clientmessage_toall</a>  (<em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Events.html#gdk-add-client-message-filter" title="gdk_add_client_message_filter ()">gdk_add_client_message_filter</a>       (<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> message_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkFilterFunc" title="GdkFilterFunc ()"><span class="type">GdkFilterFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);

<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-Events.html#gdk-get-show-events" title="gdk_get_show_events ()">gdk_get_show_events</a>                 (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Events.html#gdk-set-show-events" title="gdk_set_show_events ()">gdk_set_show_events</a>                 (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_events</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gdk-Events.html#gdk-event-set-screen" title="gdk_event_set_screen ()">gdk_event_set_screen</a>                (<em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>);
<a class="link" href="GdkScreen.html" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *         <a class="link" href="gdk-Events.html#gdk-event-get-screen" title="gdk_event_get_screen ()">gdk_event_get_screen</a>                (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);

<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gdk-Events.html#gdk-setting-get" title="gdk_setting_get ()">gdk_setting_get</a>                     (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="gdk-Events.description"></a><h2>Description</h2>
<p>
This section describes functions dealing with events from the window system.
</p>
<p>
In GTK+ applications the events are handled automatically in
<a href="http://library.gnome.org/devel/gtk/unstable/gtk-General.html#gtk-main-do-event"><code class="function">gtk_main_do_event()</code></a> and passed on to the appropriate widgets, so these
functions are rarely needed. Though some of the fields in the
<a class="link" href="gdk-Event-Structures.html" title="Event Structures">Event Structures</a> are useful.
</p>
</div>
<div class="refsect1" title="Details">
<a name="gdk-Events.details"></a><h2>Details</h2>
<div class="refsect2" title="enum GdkEventType">
<a name="GdkEventType"></a><h3>enum GdkEventType</h3>
<pre class="programlisting">typedef enum
{
  GDK_NOTHING		= -1,
  GDK_DELETE		= 0,
  GDK_DESTROY		= 1,
  GDK_EXPOSE		= 2,
  GDK_MOTION_NOTIFY = 3,
  GDK_BUTTON_PRESS = 4,
  GDK_2BUTTON_PRESS = 5,
  GDK_3BUTTON_PRESS = 6,
  GDK_BUTTON_RELEASE = 7,
  GDK_KEY_PRESS		= 8,
  GDK_KEY_RELEASE = 9,
  GDK_ENTER_NOTIFY = 10,
  GDK_LEAVE_NOTIFY = 11,
  GDK_FOCUS_CHANGE = 12,
  GDK_CONFIGURE		= 13,
  GDK_MAP		= 14,
  GDK_UNMAP		= 15,
  GDK_PROPERTY_NOTIFY = 16,
  GDK_SELECTION_CLEAR = 17,
  GDK_SELECTION_REQUEST = 18,
  GDK_SELECTION_NOTIFY = 19,
  GDK_PROXIMITY_IN = 20,
  GDK_PROXIMITY_OUT = 21,
  GDK_DRAG_ENTER        = 22,
  GDK_DRAG_LEAVE        = 23,
  GDK_DRAG_MOTION       = 24,
  GDK_DRAG_STATUS       = 25,
  GDK_DROP_START        = 26,
  GDK_DROP_FINISHED     = 27,
  GDK_CLIENT_EVENT = 28,
  GDK_VISIBILITY_NOTIFY = 29,
  GDK_NO_EXPOSE		= 30,
  GDK_SCROLL            = 31,
  GDK_WINDOW_STATE      = 32,
  GDK_SETTING           = 33,
  GDK_OWNER_CHANGE      = 34,
  GDK_GRAB_BROKEN       = 35,
  GDK_DAMAGE            = 36,
  GDK_EVENT_LAST        /* helper variable for decls */
} GdkEventType;
</pre>
<p>
Specifies the type of the event.
</p>
<p>
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.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-NOTHING:CAPS"></a><span class="term"><code class="literal">GDK_NOTHING</code></span></p></td>
<td>a special code to indicate a null event.
</td>
</tr>
<tr>
<td><p><a name="GDK-DELETE:CAPS"></a><span class="term"><code class="literal">GDK_DELETE</code></span></p></td>
<td>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.
</td>
</tr>
<tr>
<td><p><a name="GDK-DESTROY:CAPS"></a><span class="term"><code class="literal">GDK_DESTROY</code></span></p></td>
<td>the window has been destroyed.
</td>
</tr>
<tr>
<td><p><a name="GDK-EXPOSE:CAPS"></a><span class="term"><code class="literal">GDK_EXPOSE</code></span></p></td>
<td>all or part of the window has become visible and needs to be
redrawn.
</td>
</tr>
<tr>
<td><p><a name="GDK-MOTION-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_MOTION_NOTIFY</code></span></p></td>
<td>the pointer (usually a mouse) has moved.
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_PRESS</code></span></p></td>
<td>a mouse button has been pressed.
</td>
</tr>
<tr>
<td><p><a name="GDK-2BUTTON-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_2BUTTON_PRESS</code></span></p></td>
<td>a mouse button has been double-clicked (clicked twice
within a short period of time). Note that each click also generates a
<a class="link" href="gdk-Events.html#GDK-BUTTON-PRESS:CAPS"><code class="literal">GDK_BUTTON_PRESS</code></a> event.
</td>
</tr>
<tr>
<td><p><a name="GDK-3BUTTON-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_3BUTTON_PRESS</code></span></p></td>
<td>a mouse button has been clicked 3 times in a short period
of time. Note that each click also generates a <a class="link" href="gdk-Events.html#GDK-BUTTON-PRESS:CAPS"><code class="literal">GDK_BUTTON_PRESS</code></a> event.
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-RELEASE:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_RELEASE</code></span></p></td>
<td>a mouse button has been released.
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-PRESS:CAPS"></a><span class="term"><code class="literal">GDK_KEY_PRESS</code></span></p></td>
<td>a key has been pressed.
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-RELEASE:CAPS"></a><span class="term"><code class="literal">GDK_KEY_RELEASE</code></span></p></td>
<td>a key has been released.
</td>
</tr>
<tr>
<td><p><a name="GDK-ENTER-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_ENTER_NOTIFY</code></span></p></td>
<td>the pointer has entered the window.
</td>
</tr>
<tr>
<td><p><a name="GDK-LEAVE-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_LEAVE_NOTIFY</code></span></p></td>
<td>the pointer has left the window.
</td>
</tr>
<tr>
<td><p><a name="GDK-FOCUS-CHANGE:CAPS"></a><span class="term"><code class="literal">GDK_FOCUS_CHANGE</code></span></p></td>
<td>the keyboard focus has entered or left the window.
</td>
</tr>
<tr>
<td><p><a name="GDK-CONFIGURE:CAPS"></a><span class="term"><code class="literal">GDK_CONFIGURE</code></span></p></td>
<td>the size, position or stacking order of the window has changed.
Note that GTK+ discards these events for <a class="link" href="gdk-Windows.html#GDK-WINDOW-CHILD:CAPS"><code class="literal">GDK_WINDOW_CHILD</code></a> windows.
</td>
</tr>
<tr>
<td><p><a name="GDK-MAP:CAPS"></a><span class="term"><code class="literal">GDK_MAP</code></span></p></td>
<td>the window has been mapped.
</td>
</tr>
<tr>
<td><p><a name="GDK-UNMAP:CAPS"></a><span class="term"><code class="literal">GDK_UNMAP</code></span></p></td>
<td>the window has been unmapped.
</td>
</tr>
<tr>
<td><p><a name="GDK-PROPERTY-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_PROPERTY_NOTIFY</code></span></p></td>
<td>a property on the window has been changed or deleted.
</td>
</tr>
<tr>
<td><p><a name="GDK-SELECTION-CLEAR:CAPS"></a><span class="term"><code class="literal">GDK_SELECTION_CLEAR</code></span></p></td>
<td>the application has lost ownership of a selection.
</td>
</tr>
<tr>
<td><p><a name="GDK-SELECTION-REQUEST:CAPS"></a><span class="term"><code class="literal">GDK_SELECTION_REQUEST</code></span></p></td>
<td>another application has requested a selection.
</td>
</tr>
<tr>
<td><p><a name="GDK-SELECTION-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_SELECTION_NOTIFY</code></span></p></td>
<td>a selection has been received.
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-IN:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_IN</code></span></p></td>
<td>an input device has moved into contact with a sensing
surface (e.g. a touchscreen or graphics tablet).
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-OUT:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_OUT</code></span></p></td>
<td>an input device has moved out of contact with a sensing
surface.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-ENTER:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_ENTER</code></span></p></td>
<td>the mouse has entered the window while a drag is in progress.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-LEAVE:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_LEAVE</code></span></p></td>
<td>the mouse has left the window while a drag is in progress.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-MOTION:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_MOTION</code></span></p></td>
<td>the mouse has moved in the window while a drag is in
progress.
</td>
</tr>
<tr>
<td><p><a name="GDK-DRAG-STATUS:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_STATUS</code></span></p></td>
<td>the status of the drag operation initiated by the window
has changed.
</td>
</tr>
<tr>
<td><p><a name="GDK-DROP-START:CAPS"></a><span class="term"><code class="literal">GDK_DROP_START</code></span></p></td>
<td>a drop operation onto the window has started.
</td>
</tr>
<tr>
<td><p><a name="GDK-DROP-FINISHED:CAPS"></a><span class="term"><code class="literal">GDK_DROP_FINISHED</code></span></p></td>
<td>the drop operation initiated by the window has completed.
</td>
</tr>
<tr>
<td><p><a name="GDK-CLIENT-EVENT:CAPS"></a><span class="term"><code class="literal">GDK_CLIENT_EVENT</code></span></p></td>
<td>a message has been received from another application.
</td>
</tr>
<tr>
<td><p><a name="GDK-VISIBILITY-NOTIFY:CAPS"></a><span class="term"><code class="literal">GDK_VISIBILITY_NOTIFY</code></span></p></td>
<td>the window visibility status has changed.
</td>
</tr>
<tr>
<td><p><a name="GDK-NO-EXPOSE:CAPS"></a><span class="term"><code class="literal">GDK_NO_EXPOSE</code></span></p></td>
<td>indicates that the source region was completely available
when parts of a drawable were copied. This is not very useful.
</td>
</tr>
<tr>
<td><p><a name="GDK-SCROLL:CAPS"></a><span class="term"><code class="literal">GDK_SCROLL</code></span></p></td>
<td>the scroll wheel was turned
</td>
</tr>
<tr>
<td><p><a name="GDK-WINDOW-STATE:CAPS"></a><span class="term"><code class="literal">GDK_WINDOW_STATE</code></span></p></td>
<td>the state of a window has changed. See <a class="link" href="gdk-Event-Structures.html#GdkWindowState" title="enum GdkWindowState"><span class="type">GdkWindowState</span></a>
for the possible window states
</td>
</tr>
<tr>
<td><p><a name="GDK-SETTING:CAPS"></a><span class="term"><code class="literal">GDK_SETTING</code></span></p></td>
<td>a setting has been modified.
</td>
</tr>
<tr>
<td><p><a name="GDK-OWNER-CHANGE:CAPS"></a><span class="term"><code class="literal">GDK_OWNER_CHANGE</code></span></p></td>
<td>the owner of a selection has changed. This event type
  was added in 2.6
</td>
</tr>
<tr>
<td><p><a name="GDK-GRAB-BROKEN:CAPS"></a><span class="term"><code class="literal">GDK_GRAB_BROKEN</code></span></p></td>
<td>a pointer or keyboard grab was broken. This event type
  was added in 2.8.
</td>
</tr>
<tr>
<td><p><a name="GDK-DAMAGE:CAPS"></a><span class="term"><code class="literal">GDK_DAMAGE</code></span></p></td>
<td>the content of the window has been changed. This event type
  was added in 2.14.
</td>
</tr>
<tr>
<td><p><a name="GDK-EVENT-LAST:CAPS"></a><span class="term"><code class="literal">GDK_EVENT_LAST</code></span></p></td>
<td>marks the end of the GdkEventType enumeration. Added in 2.18
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum GdkEventMask">
<a name="GdkEventMask"></a><h3>enum GdkEventMask</h3>
<pre class="programlisting">typedef enum
{
  GDK_EXPOSURE_MASK		= 1 &lt;&lt; 1,
  GDK_POINTER_MOTION_MASK = 1 &lt;&lt; 2,
  GDK_POINTER_MOTION_HINT_MASK = 1 &lt;&lt; 3,
  GDK_BUTTON_MOTION_MASK = 1 &lt;&lt; 4,
  GDK_BUTTON1_MOTION_MASK = 1 &lt;&lt; 5,
  GDK_BUTTON2_MOTION_MASK = 1 &lt;&lt; 6,
  GDK_BUTTON3_MOTION_MASK = 1 &lt;&lt; 7,
  GDK_BUTTON_PRESS_MASK		= 1 &lt;&lt; 8,
  GDK_BUTTON_RELEASE_MASK = 1 &lt;&lt; 9,
  GDK_KEY_PRESS_MASK		= 1 &lt;&lt; 10,
  GDK_KEY_RELEASE_MASK		= 1 &lt;&lt; 11,
  GDK_ENTER_NOTIFY_MASK		= 1 &lt;&lt; 12,
  GDK_LEAVE_NOTIFY_MASK		= 1 &lt;&lt; 13,
  GDK_FOCUS_CHANGE_MASK		= 1 &lt;&lt; 14,
  GDK_STRUCTURE_MASK		= 1 &lt;&lt; 15,
  GDK_PROPERTY_CHANGE_MASK = 1 &lt;&lt; 16,
  GDK_VISIBILITY_NOTIFY_MASK = 1 &lt;&lt; 17,
  GDK_PROXIMITY_IN_MASK		= 1 &lt;&lt; 18,
  GDK_PROXIMITY_OUT_MASK = 1 &lt;&lt; 19,
  GDK_SUBSTRUCTURE_MASK		= 1 &lt;&lt; 20,
  GDK_SCROLL_MASK               = 1 &lt;&lt; 21,
  GDK_ALL_EVENTS_MASK		= 0x3FFFFE
} GdkEventMask;
</pre>
<p>
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 <a class="link" href="gdk-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a> event types
above.
</p>
<p>
<a class="link" href="gdk-Events.html#GDK-POINTER-MOTION-HINT-MASK:CAPS"><code class="literal">GDK_POINTER_MOTION_HINT_MASK</code></a> is a special mask which is used to reduce the
number of <a class="link" href="gdk-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a> events received. Normally a <a class="link" href="gdk-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a>
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 lag behind the position of the mouse. When using
<a class="link" href="gdk-Events.html#GDK-POINTER-MOTION-HINT-MASK:CAPS"><code class="literal">GDK_POINTER_MOTION_HINT_MASK</code></a>, fewer <a class="link" href="gdk-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a> events will be sent,
some of which are marked as a hint (the is_hint member is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
To receive more motion events after a motion hint event, the application
needs to asks for more, by calling <a class="link" href="gdk-Events.html#gdk-event-request-motions" title="gdk_event_request_motions ()"><code class="function">gdk_event_request_motions()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GDK-EXPOSURE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_EXPOSURE_MASK</code></span></p></td>
<td>receive expose events
</td>
</tr>
<tr>
<td><p><a name="GDK-POINTER-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_POINTER_MOTION_MASK</code></span></p></td>
<td>receive all pointer motion events
</td>
</tr>
<tr>
<td><p><a name="GDK-POINTER-MOTION-HINT-MASK:CAPS"></a><span class="term"><code class="literal">GDK_POINTER_MOTION_HINT_MASK</code></span></p></td>
<td>see the explanation above
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while any button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON1-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON1_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while 1 button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON2-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON2_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while 2 button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON3-MOTION-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON3_MOTION_MASK</code></span></p></td>
<td>receive pointer motion events while 3 button is pressed
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-PRESS-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_PRESS_MASK</code></span></p></td>
<td>receive button press events
</td>
</tr>
<tr>
<td><p><a name="GDK-BUTTON-RELEASE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_BUTTON_RELEASE_MASK</code></span></p></td>
<td>receive button release events
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-PRESS-MASK:CAPS"></a><span class="term"><code class="literal">GDK_KEY_PRESS_MASK</code></span></p></td>
<td>receive key press events
</td>
</tr>
<tr>
<td><p><a name="GDK-KEY-RELEASE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_KEY_RELEASE_MASK</code></span></p></td>
<td>receive key release events
</td>
</tr>
<tr>
<td><p><a name="GDK-ENTER-NOTIFY-MASK:CAPS"></a><span class="term"><code class="literal">GDK_ENTER_NOTIFY_MASK</code></span></p></td>
<td>receive window enter events
</td>
</tr>
<tr>
<td><p><a name="GDK-LEAVE-NOTIFY-MASK:CAPS"></a><span class="term"><code class="literal">GDK_LEAVE_NOTIFY_MASK</code></span></p></td>
<td>receive window leave events
</td>
</tr>
<tr>
<td><p><a name="GDK-FOCUS-CHANGE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_FOCUS_CHANGE_MASK</code></span></p></td>
<td>receive focus change events
</td>
</tr>
<tr>
<td><p><a name="GDK-STRUCTURE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_STRUCTURE_MASK</code></span></p></td>
<td>receive events about window configuration change
</td>
</tr>
<tr>
<td><p><a name="GDK-PROPERTY-CHANGE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PROPERTY_CHANGE_MASK</code></span></p></td>
<td>receive property change events
</td>
</tr>
<tr>
<td><p><a name="GDK-VISIBILITY-NOTIFY-MASK:CAPS"></a><span class="term"><code class="literal">GDK_VISIBILITY_NOTIFY_MASK</code></span></p></td>
<td>receive visibility change events
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-IN-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_IN_MASK</code></span></p></td>
<td>receive proximity in events
</td>
</tr>
<tr>
<td><p><a name="GDK-PROXIMITY-OUT-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PROXIMITY_OUT_MASK</code></span></p></td>
<td>receive proximity out events
</td>
</tr>
<tr>
<td><p><a name="GDK-SUBSTRUCTURE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_SUBSTRUCTURE_MASK</code></span></p></td>
<td>receive events about window configuration changes of 
  child windows
</td>
</tr>
<tr>
<td><p><a name="GDK-SCROLL-MASK:CAPS"></a><span class="term"><code class="literal">GDK_SCROLL_MASK</code></span></p></td>
<td>receive scroll events
</td>
</tr>
<tr>
<td><p><a name="GDK-ALL-EVENTS-MASK:CAPS"></a><span class="term"><code class="literal">GDK_ALL_EVENTS_MASK</code></span></p></td>
<td>the combination of all the above event masks.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GDK_CURRENT_TIME">
<a name="GDK-CURRENT-TIME:CAPS"></a><h3>GDK_CURRENT_TIME</h3>
<pre class="programlisting">#define GDK_CURRENT_TIME     0L
</pre>
<p>
Represents the current time, and can be used anywhere a time is expected.
</p>
</div>
<hr>
<div class="refsect2" title="GDK_PRIORITY_EVENTS">
<a name="GDK-PRIORITY-EVENTS:CAPS"></a><h3>GDK_PRIORITY_EVENTS</h3>
<pre class="programlisting">#define             GDK_PRIORITY_EVENTS</pre>
<p>
This is the priority that events from the X server are given in the
<a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html">GLib Main Loop</a>.
</p>
</div>
<hr>
<div class="refsect2" title="GDK_PRIORITY_REDRAW">
<a name="GDK-PRIORITY-REDRAW:CAPS"></a><h3>GDK_PRIORITY_REDRAW</h3>
<pre class="programlisting">#define GDK_PRIORITY_REDRAW     (G_PRIORITY_HIGH_IDLE + 20)
</pre>
<p>
This is the priority that the idle handler processing window updates
is given in the <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html">GLib Main Loop</a>.
</p>
</div>
<hr>
<div class="refsect2" title="gdk_events_pending ()">
<a name="gdk-events-pending"></a><h3>gdk_events_pending ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_events_pending                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Checks if any events are ready to be processed for any display.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>  <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if any events are pending.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_peek ()">
<a name="gdk-event-peek"></a><h3>gdk_event_peek ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a>*           gdk_event_peek                      (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
If there is an event waiting in the event queue of some open
display, returns a copy of it. See <a class="link" href="GdkDisplay.html#gdk-display-peek-event" title="gdk_display_peek_event ()"><code class="function">gdk_display_peek_event()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a copy of the first <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> on some event queue, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no
events are in any queues. The returned <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> should be freed with
<a class="link" href="gdk-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_get ()">
<a name="gdk-event-get"></a><h3>gdk_event_get ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a>*           gdk_event_get                       (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Checks all open displays for a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to process,to be processed
on, fetching events from the windowing system if necessary.
See <a class="link" href="GdkDisplay.html#gdk-display-get-event" title="gdk_display_get_event ()"><code class="function">gdk_display_get_event()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the next <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to be processed, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no events
are pending. The returned <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> should be freed with <a class="link" href="gdk-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_get_graphics_expose ()">
<a name="gdk-event-get-graphics-expose"></a><h3>gdk_event_get_graphics_expose ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a>*           gdk_event_get_graphics_expose       (<em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>);</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gdk_event_get_graphics_expose</code> has been deprecated since version 2.18 and should not be used in newly-written code. </p>
</div>
<p>
Waits for a GraphicsExpose or NoExpose event from the X server.
This is used in the <a href="http://library.gnome.org/devel/gtk/unstable/GtkText.html"><span class="type">GtkText</span></a> and <a href="http://library.gnome.org/devel/gtk/unstable/GtkCList.html"><span class="type">GtkCList</span></a> widgets in GTK+ to make sure any
GraphicsExpose events are handled before the widget is scrolled.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
<td>the <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> to wait for the events for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>  a <a class="link" href="gdk-Event-Structures.html#GdkEventExpose" title="GdkEventExpose"><span class="type">GdkEventExpose</span></a> if a GraphicsExpose was received, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if a
NoExpose event was received.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_put ()">
<a name="gdk-event-put"></a><h3>gdk_event_put ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_put                       (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Appends a copy of the given event onto the front of the event
queue for event-&gt;any.window's display, or the default event
queue if event-&gt;any.window is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. See <a class="link" href="GdkDisplay.html#gdk-display-put-event" title="gdk_display_put_event ()"><code class="function">gdk_display_put_event()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_new ()">
<a name="gdk-event-new"></a><h3>gdk_event_new ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a>*           gdk_event_new                       (<em class="parameter"><code><a class="link" href="gdk-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a> type</code></em>);</pre>
<p>
Creates a new event of the given type. All fields are set to 0.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Events.html#GdkEventType" title="enum GdkEventType"><span class="type">GdkEventType</span></a> 
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly-allocated <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>. The returned <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> 
should be freed with <a class="link" href="gdk-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2" title="gdk_event_copy ()">
<a name="gdk-event-copy"></a><h3>gdk_event_copy ()</h3>
<pre class="programlisting"><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="returnvalue">GdkEvent</span></a>*           gdk_event_copy                      (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Copies a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>, copying or incrementing the reference count of the
resources associated with it (e.g. <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>'s and strings).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a copy of <em class="parameter"><code>event</code></em>. The returned <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> should be freed with
<a class="link" href="gdk-Events.html#gdk-event-free" title="gdk_event_free ()"><code class="function">gdk_event_free()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_free ()">
<a name="gdk-event-free"></a><h3>gdk_event_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_free                      (<em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Frees a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>, freeing or decrementing any resources associated with it.
Note that this function should only be called with events returned from
functions such as <a class="link" href="gdk-Events.html#gdk-event-peek" title="gdk_event_peek ()"><code class="function">gdk_event_peek()</code></a>, <a class="link" href="gdk-Events.html#gdk-event-get" title="gdk_event_get ()"><code class="function">gdk_event_get()</code></a>,
<a class="link" href="gdk-Events.html#gdk-event-get-graphics-expose" title="gdk_event_get_graphics_expose ()"><code class="function">gdk_event_get_graphics_expose()</code></a> and <a class="link" href="gdk-Events.html#gdk-event-copy" title="gdk_event_copy ()"><code class="function">gdk_event_copy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_get_time ()">
<a name="gdk-event-get-time"></a><h3>gdk_event_get_time ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a>             gdk_event_get_time                  (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Returns the time stamp from <em class="parameter"><code>event</code></em>, if there is one; otherwise
returns <a class="link" href="gdk-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><span class="type">GDK_CURRENT_TIME</span></a>. If <em class="parameter"><code>event</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, returns <a class="link" href="gdk-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><span class="type">GDK_CURRENT_TIME</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> time stamp field from <em class="parameter"><code>event</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_get_state ()">
<a name="gdk-event-get-state"></a><h3>gdk_event_get_state ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_state                 (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkModifierType" title="enum GdkModifierType"><span class="type">GdkModifierType</span></a> *state</code></em>);</pre>
<p>
If the event contains a "state" field, puts that field in <em class="parameter"><code>state</code></em>. Otherwise
stores an empty state (0). Returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there was a state field
in the event. <em class="parameter"><code>event</code></em> may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, in which case it's treated
as if the event had no state field.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> or NULL
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
<td>return location for state
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there was a state field in the event 
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_get_axis ()">
<a name="gdk-event-get-axis"></a><h3>gdk_event_get_axis ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_axis                  (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Input-Devices.html#GdkAxisUse" title="enum GdkAxisUse"><span class="type">GdkAxisUse</span></a> axis_use</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *value</code></em>);</pre>
<p>
Extract the axis value for a particular axis use from
an event structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>axis_use</code></em> :</span></p></td>
<td>the axis use to look for
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>location to store the value found
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the specified axis was found, otherwise <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_get_coords ()">
<a name="gdk-event-get-coords"></a><h3>gdk_event_get_coords ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_coords                (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_win</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_win</code></em>);</pre>
<p>
Extract the event window relative x/y coordinates from an event.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_win</code></em> :</span></p></td>
<td>location to put event window x coordinate
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_win</code></em> :</span></p></td>
<td>location to put event window y coordinate
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event delivered event window coordinates
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_get_root_coords ()">
<a name="gdk-event-get-root-coords"></a><h3>gdk_event_get_root_coords ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_get_root_coords           (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x_root</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y_root</code></em>);</pre>
<p>
Extract the root window relative x/y coordinates from an event.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x_root</code></em> :</span></p></td>
<td>location to put root window x coordinate
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y_root</code></em> :</span></p></td>
<td>location to put root window y coordinate
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the event delivered root window coordinates
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_request_motions ()">
<a name="gdk-event-request-motions"></a><h3>gdk_event_request_motions ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_request_motions           (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEventMotion" title="GdkEventMotion"><span class="type">GdkEventMotion</span></a> *event</code></em>);</pre>
<p>
Request more motion notifies if <em class="parameter"><code>event</code></em> is a motion notify hint event.
This function should be used instead of <a class="link" href="gdk-Windows.html#gdk-window-get-pointer" title="gdk_window_get_pointer ()"><code class="function">gdk_window_get_pointer()</code></a> to
request further motion notifies, because it also works for extension
events where motion notifies are provided for devices other than the
core pointer. Coordinate extraction, processing and requesting more
motion events from a <a class="link" href="gdk-Events.html#GDK-MOTION-NOTIFY:CAPS"><code class="literal">GDK_MOTION_NOTIFY</code></a> event usually works like this:
</p>
<p>
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="cbracket">{</span><span class="normal"> </span>
<span class="normal">  </span><span class="comment">/* motion_event handler */</span>
<span class="normal">  x </span><span class="symbol">=</span><span class="normal"> motion_event</span><span class="symbol">-&gt;</span><span class="normal">x</span><span class="symbol">;</span>
<span class="normal">  y </span><span class="symbol">=</span><span class="normal"> motion_event</span><span class="symbol">-&gt;</span><span class="normal">y</span><span class="symbol">;</span>
<span class="normal">  </span><span class="comment">/* handle (x,y) motion */</span>
<span class="normal">  </span><span class="function"><a href="gdk-Events.html#gdk-event-request-motions">gdk_event_request_motions</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">motion_event</span><span class="symbol">);</span><span class="normal"> </span><span class="comment">/* handles is_hint events */</span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a valid <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2" title="gdk_event_handler_set ()">
<a name="gdk-event-handler-set"></a><h3>gdk_event_handler_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_handler_set               (<em class="parameter"><code><a class="link" href="gdk-Events.html#GdkEventFunc" title="GdkEventFunc ()"><span class="type">GdkEventFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
<p>
Sets the function to call to handle all events from GDK.
</p>
<p>
Note that GTK+ uses this to install its own event handler, so it is
usually not useful for GTK+ applications. (Although an application
can call this function then call <a href="http://library.gnome.org/devel/gtk/unstable/gtk-General.html#gtk-main-do-event"><code class="function">gtk_main_do_event()</code></a> to pass
events to GTK+.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to call to handle events from GDK.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data to pass to the function. 
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
<td>the function to call when the handler function is removed, i.e. when
         <a class="link" href="gdk-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()"><code class="function">gdk_event_handler_set()</code></a> is called with another event handler.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GdkEventFunc ()">
<a name="GdkEventFunc"></a><h3>GdkEventFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GdkEventFunc)                     (<em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Specifies the type of function passed to <a class="link" href="gdk-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()"><code class="function">gdk_event_handler_set()</code></a> to handle
all GDK events.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to process.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data set when the event handler was installed with
<a class="link" href="gdk-Events.html#gdk-event-handler-set" title="gdk_event_handler_set ()"><code class="function">gdk_event_handler_set()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_send_client_message ()">
<a name="gdk-event-send-client-message"></a><h3>gdk_event_send_client_message ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_send_client_message       (<em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> winid</code></em>);</pre>
<p>
Sends an X ClientMessage event to a given window (which must be
on the default <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a>.)
This could be used for communicating between different applications,
though the amount of data is limited to 20 bytes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to send, which should be a <a class="link" href="gdk-Event-Structures.html#GdkEventClient" title="GdkEventClient"><span class="type">GdkEventClient</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>winid</code></em> :</span></p></td>
<td>the window to send the X ClientMessage event to.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non-zero on success.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_send_client_message_for_display ()">
<a name="gdk-event-send-client-message-for-display"></a><h3>gdk_event_send_client_message_for_display ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_event_send_client_message_for_display
                                                        (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> winid</code></em>);</pre>
<p>
On X11, sends an X ClientMessage event to a given window. On
Windows, sends a message registered with the name
GDK_WIN32_CLIENT_MESSAGE.
</p>
<p>
This could be used for communicating between different
applications, though the amount of data is limited to 20 bytes on
X11, and to just four bytes on Windows.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
<td>the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> for the window where the message is to be sent.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to send, which should be a <a class="link" href="gdk-Event-Structures.html#GdkEventClient" title="GdkEventClient"><span class="type">GdkEventClient</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>winid</code></em> :</span></p></td>
<td>the window to send the client message to.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> non-zero on success.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2" title="gdk_event_send_clientmessage_toall ()">
<a name="gdk-event-send-clientmessage-toall"></a><h3>gdk_event_send_clientmessage_toall ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_send_clientmessage_toall  (<em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Sends an X ClientMessage event to all toplevel windows on the default
<a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a>.
</p>
<p>
Toplevel windows are determined by checking for the WM_STATE property, as
described in the Inter-Client Communication Conventions Manual (ICCCM).
If no windows are found with the WM_STATE property set, the message is sent
to all children of the root window.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> to send, which should be a <a class="link" href="gdk-Event-Structures.html#GdkEventClient" title="GdkEventClient"><span class="type">GdkEventClient</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_add_client_message_filter ()">
<a name="gdk-add-client-message-filter"></a><h3>gdk_add_client_message_filter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_add_client_message_filter       (<em class="parameter"><code><a class="link" href="gdk-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a> message_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gdk-Windows.html#GdkFilterFunc" title="GdkFilterFunc ()"><span class="type">GdkFilterFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Adds a filter to the default display to be called when X ClientMessage events
are received. See <a class="link" href="GdkDisplay.html#gdk-display-add-client-message-filter" title="gdk_display_add_client_message_filter ()"><code class="function">gdk_display_add_client_message_filter()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>message_type</code></em> :</span></p></td>
<td>the type of ClientMessage events to receive. This will be
    checked against the <em class="structfield"><code>message_type</code></em> field of the
    XClientMessage event struct.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>the function to call to process the event.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data to pass to <em class="parameter"><code>func</code></em>. 
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_get_show_events ()">
<a name="gdk-get-show-events"></a><h3>gdk_get_show_events ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_get_show_events                 (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Gets whether event debugging output is enabled.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if event debugging output is enabled.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_set_show_events ()">
<a name="gdk-set-show-events"></a><h3>gdk_set_show_events ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_set_show_events                 (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_events</code></em>);</pre>
<p>
Sets whether a trace of received events is output.
Note that GTK+ must be compiled with debugging (that is,
configured using the <code class="option">--enable-debug</code> option)
to use this option.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>show_events</code></em> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to output event debugging information.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gdk_event_set_screen ()">
<a name="gdk-event-set-screen"></a><h3>gdk_event_set_screen ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_event_set_screen                (<em class="parameter"><code><a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>);</pre>
<p>
Sets the screen for <em class="parameter"><code>event</code></em> to <em class="parameter"><code>screen</code></em>. The event must
have been allocated by GTK+, for instance, by
<a class="link" href="gdk-Events.html#gdk-event-copy" title="gdk_event_copy ()"><code class="function">gdk_event_copy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
<td>a <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2" title="gdk_event_get_screen ()">
<a name="gdk-event-get-screen"></a><h3>gdk_event_get_screen ()</h3>
<pre class="programlisting"><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *         gdk_event_get_screen                (<em class="parameter"><code>const <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a> *event</code></em>);</pre>
<p>
Returns the screen for the event. The screen is
typically the screen for <code class="literal">event-&gt;any.window</code>, but
for events such as mouse events, it is the screen
where the pointer was when the event occurs -
that is, the screen which has the root window 
to which <code class="literal">event-&gt;motion.x_root</code> and
<code class="literal">event-&gt;motion.y_root</code> are relative.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>a <a class="link" href="gdk-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the screen for the event

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2" title="gdk_setting_get ()">
<a name="gdk-setting-get"></a><h3>gdk_setting_get ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_setting_get                     (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Obtains a desktop-wide setting, such as the double-click time,
for the default screen. See <a class="link" href="GdkScreen.html#gdk-screen-get-setting" title="gdk_screen_get_setting ()"><code class="function">gdk_screen_get_setting()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the setting.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>location to store the value of the setting.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the setting existed and a value was stored
  in <em class="parameter"><code>value</code></em>, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="See Also">
<a name="gdk-Events.see-also"></a><h2>See Also</h2>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><a class="link" href="gdk-Event-Structures.html" title="Event Structures">Event Structures</a></span></p></td>
<td><p>
The structs used for each type of event.
</p></td>
</tr></tbody>
</table></div>
<p>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.14</div>
</body>
</html>