From b1274e90782e279f9711ca26a1c4a4e04bc0f858 Mon Sep 17 00:00:00 2001 From: dcnieho Date: Wed, 27 Feb 2013 04:58:23 +0000 Subject: [PATCH] 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 --- freeglut/web-src/docs/api.php | 42 +++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/freeglut/web-src/docs/api.php b/freeglut/web-src/docs/api.php index f8c4585..ecdc6d3 100644 --- a/freeglut/web-src/docs/api.php +++ b/freeglut/web-src/docs/api.php @@ -229,7 +229,7 @@ contained herein.
  • Miscellaneous Functions
      -
    1. glutIgnoreKeyRepeat, glutSetKeyRepeat
    2. +
    3. glutSetKeyRepeat, glutIgnoreKeyRepeat
    4. glutForceJoystickFunc
    5. glutReportErrors
    @@ -2261,7 +2261,45 @@ the Android page.

    19. Miscellaneous Functions

    -

    19.1 glutIgnoreKeyRepeat, glutSetKeyRepeat

    +

    19.1 glutSetKeyRepeat, glutIgnoreKeyRepeat

    + +

    +The glutSetKeyRepeat and glutIgnoreKeyRepeat functions +set whether repeated key presses (generated by keeping a key depressed) +are passed on to the keyboard callbacks. glutSetKeyRepeat +allows to globally switch off key repeat, while +glutIgnoreKeyRepeat offers control over this behavior on a +per-window basis. +

    + +

    Definition

    + +

    +void glutSetKeyRepeat   (int repeatMode);
    +void glutIgnoreKeyRepeat(int ignore);

    + +

    Arguments

    +

    glutSetKeyRepeat's repeatMode   +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.
    +glutIgnoreKeyRepeat's ignore    if non-zero, key +repeat is switched off for the current window.

    + +

    Notes

    + +

    If key repeat is globally switched off through +glutSetKeyRepeat, it cannot be reenabled on a per-window basis +with glutIgnoreKeyRepeat. If you want per-window control of key +repeat, set glutSetKeyRepeat to GLUT_KEY_REPEAT_ON and +use glutIgnoreKeyRepeat(GL_TRUE) to switch off key repeat for +the windows for which you don't want it.

    + +

    Changes From GLUT

    + +

    Nate Robbins' port of GLUT to win32 did not implement +glutSetKeyRepeat, but FreeGLUT's behavior should conform on all +platforms to GLUT's behavior on X11.

    19.2 glutForceJoystickFunc