Penguin
Blame: SDL_SetEventFilter(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of SDL_SetEventFilter(3) version 2 showing authors affecting page license. View with all changes included.
Rev Author # Line
1 perry 1 SDL_!SetEventFilter
2 !!!SDL_!SetEventFilter
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 SEE ALSO
7 ----
8 !!NAME
9
10
11 SDL_!SetEventFilter- Sets up a filter to process all events before they are posted to the event queue.
12 !!SYNOPSIS
13
14
15 __#include __
16
17
18 __void SDL_!SetEventFilter__(__SDL_!EventFilter
19 filter__);
20 !!DESCRIPTION
21
22
23 This function sets up a filter to process all events before
24 they are posted to the event queue. This is a very powerful
25 and flexible feature. The filter is prototyped
26 as:
27
28
29 typedef int (*SDL_!EventFilter)(const SDL_Event *event);
30 If the filter returns __1__, then the event will be added to the internal queue. If it returns __0__, then the event will be dropped from the queue. This allows selective filtering of dynamically.
31
32
33 There is one caveat when dealing with the
34 __SDL_QUITEVENT__ event type. The event filter is only
35 called when the window manager desires to close the
36 application window. If the event filter returns 1, then the
37 window will be closed, otherwise the window will remain open
38 if possible. If the quit event is generated by an interrupt
39 signal, it will bypass the internal queue and be delivered
40 to the application at the next event poll.
41
42
43 __Note:__
44
45
46 Events pushed onto the queue with __SDL_!PushEvent__ or
47 __SDL_!PeepEvents__ do not get passed through the event
48 filter.
49
50
51 __Note:__
52
53
54 ''Be Careful!'' The event filter function may run in a
55 different thread so be careful what you do within
56 it.
57 !!SEE ALSO
58
59
60 __SDL_Event__, __SDL_!GetEventFilter__,
61 __SDL_!PushEvent__
62 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.