home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue4 / SDL / gcc346 / !SDL / man / SDL_UserEvent.3 < prev    next >
Encoding:
Text File  |  2006-09-20  |  2.1 KB  |  82 lines

  1. <!-- manual page source format generated by PolyglotMan v3.0.8+X.Org, -->
  2. <!-- available at http://polyglotman.sourceforge.net/ -->
  3.  
  4. <html>
  5. <head>
  6. <title>"SDL_UserEvent"("3") manual page</title>
  7. </head>
  8. <body bgcolor='#efefef' text='black' link='blue' vlink='#551A8B' alink='red'>
  9. <a href='#toc'>Table of Contents</a><p>
  10.  
  11. <h2><a name='sect0' href='#toc0'>Name</a></h2>
  12. SDL_UserEvent- A user-defined event type 
  13. <h2><a name='sect1' href='#toc1'>Structure Definition</a></h2>
  14. <p>
  15. <br>
  16. <pre>CWtypedef struct{
  17.   Uint8 type;
  18.   int code;
  19.   void *data1;
  20.   void *data2;
  21. } SDL_UserEvent;
  22. </pre><p>
  23.  
  24. <h2><a name='sect2' href='#toc2'>Structure Data</a></h2>
  25.  
  26. <dl>
  27.  
  28. <dt><b>type</b> </dt>
  29. <dd><b>SDL_USEREVENT</b> through to <b>SDL_NUMEVENTS-1</b> </dd>
  30.  
  31. <dt><b>code</b> </dt>
  32. <dd>User defined
  33. event code </dd>
  34.  
  35. <dt><b>data1</b> </dt>
  36. <dd>User defined data pointer </dd>
  37.  
  38. <dt><b>data2</b> </dt>
  39. <dd>User defined data pointer
  40. </dd>
  41. </dl>
  42.  
  43. <h2><a name='sect3' href='#toc3'>Description</a></h2>
  44. <p>
  45. <b>SDL_UserEvent</b> is in the <b>user</b> member of the structure <i><b>SDL_Event</b></i>.
  46. This event is unique, it is never created by SDL but only by the user. The
  47. event can be pushed onto the event queue using <i><b>SDL_PushEvent</b></i>. The contents
  48. of the structure members or completely up to the programmer, the only requirement
  49. is that <b>type</b> is a value from <b>SDL_USEREVENT</b> to <b>SDL_NUMEVENTS-1</b> (inclusive).
  50.  
  51. <h2><a name='sect4' href='#toc4'>Examples</a></h2>
  52. <p>
  53. <p>
  54. <br>
  55. <pre>CWSDL_Event event;
  56. event.type = SDL_USEREVENT;
  57. event.user.code = my_event_code;
  58. event.user.data1 = significant_data;
  59. event.user.data2 = 0;
  60. SDL_PushEvent(&event);
  61. </pre><p>
  62.  
  63. <h2><a name='sect5' href='#toc5'>See Also</a></h2>
  64. <p>
  65. <i><b>SDL_Event</b></i>, <i><b>SDL_PushEvent</b></i> 
  66. <!--
  67.   
  68.  <p>
  69.  
  70. <hr><p>
  71. <a name='toc'><b>Table of Contents</b></a><p>
  72. <ul>
  73. <li><a name='toc0' href='#sect0'>Name</a></li>
  74. <li><a name='toc1' href='#sect1'>Structure Definition</a></li>
  75. <li><a name='toc2' href='#sect2'>Structure Data</a></li>
  76. <li><a name='toc3' href='#sect3'>Description</a></li>
  77. <li><a name='toc4' href='#sect4'>Examples</a></li>
  78. <li><a name='toc5' href='#sect5'>See Also</a></li>
  79. </ul>
  80. </body>
  81. </html>
  82.