1<HTML 2><HEAD 3><TITLE 4>SDL_QuitEvent</TITLE 5><META 6NAME="GENERATOR" 7CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ 8"><LINK 9REL="HOME" 10TITLE="SDL Library Documentation" 11HREF="index.html"><LINK 12REL="UP" 13TITLE="SDL Event Structures." 14HREF="eventstructures.html"><LINK 15REL="PREVIOUS" 16TITLE="SDL_UserEvent" 17HREF="sdluserevent.html"><LINK 18REL="NEXT" 19TITLE="SDL_keysym" 20HREF="sdlkeysym.html"></HEAD 21><BODY 22CLASS="REFENTRY" 23BGCOLOR="#FFF8DC" 24TEXT="#000000" 25LINK="#0000ee" 26VLINK="#551a8b" 27ALINK="#ff0000" 28><DIV 29CLASS="NAVHEADER" 30><TABLE 31SUMMARY="Header navigation table" 32WIDTH="100%" 33BORDER="0" 34CELLPADDING="0" 35CELLSPACING="0" 36><TR 37><TH 38COLSPAN="3" 39ALIGN="center" 40>SDL Library Documentation</TH 41></TR 42><TR 43><TD 44WIDTH="10%" 45ALIGN="left" 46VALIGN="bottom" 47><A 48HREF="sdluserevent.html" 49ACCESSKEY="P" 50>Prev</A 51></TD 52><TD 53WIDTH="80%" 54ALIGN="center" 55VALIGN="bottom" 56></TD 57><TD 58WIDTH="10%" 59ALIGN="right" 60VALIGN="bottom" 61><A 62HREF="sdlkeysym.html" 63ACCESSKEY="N" 64>Next</A 65></TD 66></TR 67></TABLE 68><HR 69ALIGN="LEFT" 70WIDTH="100%"></DIV 71><H1 72><A 73NAME="SDLQUITEVENT" 74></A 75>SDL_QuitEvent</H1 76><DIV 77CLASS="REFNAMEDIV" 78><A 79NAME="AEN4621" 80></A 81><H2 82>Name</H2 83>SDL_QuitEvent -- Quit requested event</DIV 84><DIV 85CLASS="REFSECT1" 86><A 87NAME="AEN4624" 88></A 89><H2 90>Structure Definition</H2 91><PRE 92CLASS="PROGRAMLISTING" 93>typedef struct{ 94 Uint8 type 95} SDL_QuitEvent;</PRE 96></DIV 97><DIV 98CLASS="REFSECT1" 99><A 100NAME="AEN4627" 101></A 102><H2 103>Structure Data</H2 104><DIV 105CLASS="INFORMALTABLE" 106><A 107NAME="AEN4629" 108></A 109><P 110></P 111><TABLE 112BORDER="0" 113CLASS="CALSTABLE" 114><TBODY 115><TR 116><TD 117ALIGN="LEFT" 118VALIGN="TOP" 119><TT 120CLASS="STRUCTFIELD" 121><I 122>type</I 123></TT 124></TD 125><TD 126ALIGN="LEFT" 127VALIGN="TOP" 128><TT 129CLASS="LITERAL" 130>SDL_QUIT</TT 131></TD 132></TR 133></TBODY 134></TABLE 135><P 136></P 137></DIV 138></DIV 139><DIV 140CLASS="REFSECT1" 141><A 142NAME="AEN4637" 143></A 144><H2 145>Description</H2 146><P 147><SPAN 148CLASS="STRUCTNAME" 149>SDL_QuitEvent</SPAN 150> is a member of the <A 151HREF="sdlevent.html" 152><SPAN 153CLASS="STRUCTNAME" 154>SDL_Event</SPAN 155></A 156> union and is used whan an event of type <TT 157CLASS="LITERAL" 158>SDL_QUIT</TT 159> is reported.</P 160><P 161>As can be seen, the SDL_QuitEvent structure serves no useful purpose. The event itself, on the other hand, is very important. If you filter out or ignore a quit event then it is impossible for the user to close the window. On the other hand, if you do accept a quit event then the application window will be closed, and screen updates will still report success event though the application will no longer be visible.</P 162><DIV 163CLASS="NOTE" 164><BLOCKQUOTE 165CLASS="NOTE" 166><P 167><B 168>Note: </B 169>The macro <TT 170CLASS="FUNCTION" 171>SDL_QuitRequested</TT 172> will return non-zero if a quit event is pending</P 173></BLOCKQUOTE 174></DIV 175></DIV 176><DIV 177CLASS="REFSECT1" 178><A 179NAME="AEN4648" 180></A 181><H2 182>See Also</H2 183><P 184><A 185HREF="sdlevent.html" 186><SPAN 187CLASS="STRUCTNAME" 188>SDL_Event</SPAN 189></A 190>, 191<A 192HREF="sdlseteventfilter.html" 193><TT 194CLASS="FUNCTION" 195>SDL_SetEventFilter</TT 196></A 197></P 198></DIV 199><DIV 200CLASS="NAVFOOTER" 201><HR 202ALIGN="LEFT" 203WIDTH="100%"><TABLE 204SUMMARY="Footer navigation table" 205WIDTH="100%" 206BORDER="0" 207CELLPADDING="0" 208CELLSPACING="0" 209><TR 210><TD 211WIDTH="33%" 212ALIGN="left" 213VALIGN="top" 214><A 215HREF="sdluserevent.html" 216ACCESSKEY="P" 217>Prev</A 218></TD 219><TD 220WIDTH="34%" 221ALIGN="center" 222VALIGN="top" 223><A 224HREF="index.html" 225ACCESSKEY="H" 226>Home</A 227></TD 228><TD 229WIDTH="33%" 230ALIGN="right" 231VALIGN="top" 232><A 233HREF="sdlkeysym.html" 234ACCESSKEY="N" 235>Next</A 236></TD 237></TR 238><TR 239><TD 240WIDTH="33%" 241ALIGN="left" 242VALIGN="top" 243>SDL_UserEvent</TD 244><TD 245WIDTH="34%" 246ALIGN="center" 247VALIGN="top" 248><A 249HREF="eventstructures.html" 250ACCESSKEY="U" 251>Up</A 252></TD 253><TD 254WIDTH="33%" 255ALIGN="right" 256VALIGN="top" 257>SDL_keysym</TD 258></TR 259></TABLE 260></DIV 261></BODY 262></HTML 263>