added API doc for glutSetKeyRepeat and glutIgnoreKeyRepeat
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1514 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
00260311f3
commit
b1274e9078
@ -229,7 +229,7 @@ contained herein.
|
||||
</li>
|
||||
<li><a href="#Miscellaneous">Miscellaneous Functions</a>
|
||||
<ol>
|
||||
<li>glutIgnoreKeyRepeat, glutSetKeyRepeat</li>
|
||||
<li>glutSetKeyRepeat, glutIgnoreKeyRepeat</li>
|
||||
<li>glutForceJoystickFunc</li>
|
||||
<li>glutReportErrors</li>
|
||||
</ol>
|
||||
@ -2261,7 +2261,45 @@ the <a href="android.php">Android page</a>.</p>
|
||||
|
||||
<h1>19. <a name="Miscellaneous"></a>Miscellaneous Functions</h1>
|
||||
|
||||
<h2>19.1 glutIgnoreKeyRepeat, glutSetKeyRepeat</h2>
|
||||
<h2>19.1 glutSetKeyRepeat, glutIgnoreKeyRepeat</h2>
|
||||
|
||||
<p>
|
||||
The <tt>glutSetKeyRepeat</tt> and <tt>glutIgnoreKeyRepeat</tt> functions
|
||||
set whether repeated key presses (generated by keeping a key depressed)
|
||||
are passed on to the keyboard callbacks. <tt>glutSetKeyRepeat</tt>
|
||||
allows to globally switch off key repeat, while
|
||||
<tt>glutIgnoreKeyRepeat</tt> offers control over this behavior on a
|
||||
per-window basis.
|
||||
</p>
|
||||
|
||||
<p><b>Definition</b></p>
|
||||
|
||||
<p><tt>
|
||||
void glutSetKeyRepeat (int repeatMode);<br>
|
||||
void glutIgnoreKeyRepeat(int ignore);</tt></p>
|
||||
|
||||
<p><b>Arguments</b></p>
|
||||
<p><tt>glutSetKeyRepeat's repeatMode </tt>
|
||||
GLUT_KEY_REPEAT_OFF to globally switch key repeat off, or
|
||||
GLUT_KEY_REPEAT_ON and GLUT_KEY_REPEAT_DEFAULT to globally switch key
|
||||
repeat on.<br>
|
||||
<tt>glutIgnoreKeyRepeat's ignore </tt> if non-zero, key
|
||||
repeat is switched off for the current window.</p>
|
||||
|
||||
<p><b>Notes</b></p>
|
||||
|
||||
<p>If key repeat is globally switched off through
|
||||
<tt>glutSetKeyRepeat</tt>, it cannot be reenabled on a per-window basis
|
||||
with <tt>glutIgnoreKeyRepeat</tt>. If you want per-window control of key
|
||||
repeat, set <tt>glutSetKeyRepeat</tt> to <tt>GLUT_KEY_REPEAT_ON</tt> and
|
||||
use <tt>glutIgnoreKeyRepeat(GL_TRUE)</tt> to switch off key repeat for
|
||||
the windows for which you don't want it.</p>
|
||||
|
||||
<p><b>Changes From GLUT</b></p>
|
||||
|
||||
<p>Nate Robbins' port of GLUT to win32 did not implement
|
||||
<tt>glutSetKeyRepeat</tt>, but <i>FreeGLUT</i>'s behavior should conform on all
|
||||
platforms to GLUT's behavior on X11.</p>
|
||||
|
||||
<h2>19.2 glutForceJoystickFunc</h2>
|
||||
|
||||
|
Reference in New Issue
Block a user