home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue4 / SDL / gcc346 / !SDL / man / SDL_MouseButtonEvent.3 < prev    next >
Encoding:
Text File  |  2006-09-20  |  2.2 KB  |  74 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_MouseButtonEvent"("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_MouseButtonEvent- Mouse button event structure 
  13. <h2><a name='sect1' href='#toc1'>Structure Definition</a></h2>
  14. <p>
  15. <br>
  16. <pre>CWtypedef struct{
  17.   Uint8 type;
  18.   Uint8 button;
  19.   Uint8 state;
  20.   Uint16 x, y;
  21. } SDL_MouseButtonEvent;
  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_MOUSEBUTTONDOWN</b> or <b>SDL_MOUSEBUTTONUP</b> </dd>
  30.  
  31. <dt><b>button</b> </dt>
  32. <dd>The
  33. mouse button index (SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE, SDL_BUTTON_RIGHT)
  34. </dd>
  35.  
  36. <dt><b>state</b> </dt>
  37. <dd><b>SDL_PRESSED</b> or <b>SDL_RELEASED</b> </dd>
  38.  
  39. <dt><b>x</b>, <b>y</b> </dt>
  40. <dd>The X/Y coordinates of the mouse
  41. at press/release time </dd>
  42. </dl>
  43.  
  44. <h2><a name='sect3' href='#toc3'>Description</a></h2>
  45. <p>
  46. <b>SDL_MouseButtonEvent</b> is a member of the
  47. <i><b>SDL_Event</b></i> union and is used when an event of type <b>SDL_MOUSEBUTTONDOWN</b> or
  48. <b>SDL_MOUSEBUTTONUP</b> is reported. <p>
  49. When a mouse button press or release is detected
  50. then number of the button pressed (from 1 to 255, with 1 usually being
  51. the left button and 2 the right) is placed into <b>button</b>, the position of
  52. the mouse when this event occured is stored in the <b>x</b> and the <b>y</b> fields. Like
  53. <i><b>SDL_KeyboardEvent</b></i>, information on whether the event was a press or a release
  54. event is stored in both the <b>type</b> and <b>state</b> fields, but this should be obvious.
  55.  
  56. <h2><a name='sect4' href='#toc4'>See Also</a></h2>
  57. <p>
  58. <i><b>SDL_Event</b></i>, <i><b>SDL_MouseMotionEvent</b></i> 
  59. <!--
  60.   
  61.  <p>
  62.  
  63. <hr><p>
  64. <a name='toc'><b>Table of Contents</b></a><p>
  65. <ul>
  66. <li><a name='toc0' href='#sect0'>Name</a></li>
  67. <li><a name='toc1' href='#sect1'>Structure Definition</a></li>
  68. <li><a name='toc2' href='#sect2'>Structure Data</a></li>
  69. <li><a name='toc3' href='#sect3'>Description</a></li>
  70. <li><a name='toc4' href='#sect4'>See Also</a></li>
  71. </ul>
  72. </body>
  73. </html>
  74.