On Jan 14, 2008 12:50 AM, Luke J Crook <[EMAIL PROTECTED]> wrote:

> enable-key-repeat (delay interval &optional (defaults nil))
>  "Enables the keyboard repeat rate.
> DELAY specifies how long the key must be pressed before it begins
> repeating,
> it then repeats at the speed specified by INTERVAL.
> Setting :DEFAULTS to T will set delay and interval to the default values
> of SDL-DEFAULT-REPEAT-DELAY and SDL-DEFAULT-REPEAT-INTERVAL."
>

Where does SDL get the defaults it uses if passed t for :defaults? (Are
these system defaults for are the just arbitrarily chosen by SDL?)

Is there be any way to write the function such that you don't have to pass
dummy values when you want to use the defaults? Currently if you want to use
the default values you have to do something like (sdl:enable-key-repeat 0 0
t). Perhaps you could do something like the following:
(defun example (&optional repeat interval)
  (cond
    ((and repeat interval) (sdl:enable-key-repeat repeat interval))
    (repeat (sdl:enable-key-repeat repeat
sdl-cffi::sdl-default-repeat-interval))
    (t (sdl:enable-key-repeat 0 0 t))))

Thanks.

-- 
Elliott Slaughter

"Any road followed precisely to its end leads precisely nowhere." - Frank
Herbert
_______________________________________________
application-builder mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/application-builder

Reply via email to