Changeset 32851 in project


Ignore:
Timestamp:
11/02/15 12:36:37 (5 years ago)
Author:
John Croisant
Message:

More sdl2 egg docs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/sdl2

    r32849 r32851  
    3333
    3434If you wish to help in any way, please contact the project maintainer.
     35
     36
     37== Requirements
     38
     39The sdl2 egg requires [[http://libsdl.org/|Simple DirectMedia Layer]]
     40version 2.0.0 or higher. It will not work with older versions of SDL.
     41
     42The unit tests depend on the [[/egg/test|test]] egg, and many demos
     43and examples depend on the [[/egg/miscmacros|miscmacros]] egg. Some
     44demos and examples have other dependencies as well.
    3545
    3646
     
    90100
    91101
    92 == Reference Documentation
     102== API
    93103
    94104=== Conventions
     
    111121* Procedures that allocate a new object often have two versions, one
    112122  without an asterisk and one with an asterisk, e.g.
    113   {{sdl-make-surface}} and {{sdl-make-surface*}}.
    114 ** The version without an asterisk returns an object whose memory will
    115    be automatically freed when the object is garbage collected. It is
    116    recommended to use this version for safety, unless you have a good
    117    reason to do manual memory management.
    118 ** The version with an asterisk returns an object that must be
    119    manually freed when you are done with it, using e.g.
    120    {{sdl-free-surface!}}. This is slightly more efficient (especially
    121    if you are allocating hundreds or thousands of objects), but if you
    122    forget to free it, your program will leak memory.
     123  {{sdl-make-surface}} and {{sdl-make-surface*}}. See the Struct
     124  Record Types section for more information.
    123125
    124126* Many procedures that return an enum symbol or a list of enum
     
    143145=== Struct Record Types
    144146
     147The sdl2 egg has many "struct record types", which are record types
     148that wrap a pointer to a certain kind of C structure from SDL. For
     149example, the sdl-surface record type wraps a pointer to ann SDL_Surface
     150struct.
     151
     152Each struct record type has some associated procedures, which get or
     153set the value of a certain field of the underlying C struct. Some
     154struct record types also have procedures for allocating or freeing an
     155instance of that type. Every type that can be allocated, has two
     156allocator procedures, one without an asterisk and one with an
     157asterisk:
     158
     159* The procedure without an asterisk (e.g. {{sdl-alloc-event}}) returns
     160  a record whose underlying struct will be automatically freed when
     161  the record is garbage collected. (This is accomplished using
     162  {{set-finalizer!}}.) Unless you have a good reason to do manual
     163  memory management, you should use this procedure, not the procedure
     164  with an asterisk.
     165
     166* The procedure with an asterisk (e.g. {{sdl-alloc-event*}}) returns a
     167  record that must be manually freed when you are done with it, e.g.
     168  using {{sdl-free-event!}}. This is slightly more efficient,
     169  especially if you are allocating hundreds or thousands of objects,
     170  but your program will leak memory if you forget to free it.
     171
     172Some struct record types, such as sdl-window, are not allocated or
     173freed. Instead, you use certain SDL functions to manage them, such as
     174{{sdl-create-window!}} and {{sdl-destroy-window!}}.
     175
     176
    145177<procedure>(sdl-struct-null? record)</procedure>
    146178
    147 Returns #t if the given record instance is wrapping a null pointer.
    148 {{record}} can be an instance of any of the struct record types
    149 provided by this library. Usually this indicates that the underlying
    150 struct has been manually freed (e.g. using {{sdl-free-surface!}}). It
    151 is an error to get or set any field of a record that is wrapping a
    152 null pointer. So, you can use this procedure to check whether it is
    153 safe to use the record.
     179Returns #t if the given record is wrapping a null pointer (i.e. a
     180pointer with memory address 0). This procedure can be used with any
     181struct record type provided by this library.
     182
     183There are two common reasons why a record might be wrapping a null
     184pointer:
     185
     186* After you manually free a record (e.g. using {{sdl-free-surface!}}),
     187  its pointer will be set to null.
     188* Certain procedures may return a record with a null pointer if an
     189  error occurs or the requested object does not exist.
     190
     191It is an error to get or set any field of a record that is wrapping a
     192null pointer. And, in is an error to pass null struct records to
     193certain procedures. So, you can use this procedure to check whether it
     194is safe to use the record.
    154195
    155196
     
    157198==== sdl-audio-cvt
    158199
    159 sdl-audio-cvt is a record type that wraps a pointer to a
     200sdl-audio-cvt is a record type that wraps a pointer to an
    160201[[https://wiki.libsdl.org/SDL_AudioCVT|SDL_AudioCVT]] struct.
    161202
     
    163204<procedure>(sdl-audio-cvt? obj) → boolean</procedure>
    164205
    165 Returns #t if {{obj}} is a sdl-audio-cvt.
     206Returns #t if {{obj}} is an sdl-audio-cvt.
    166207
    167208
     
    173214<procedure>(sdl-audio-cvt-src-format audio-cvt) → symbol</procedure>
    174215
    175 Get the value of the SDL_AudioCVT's "src_format" field, as a symbol.
     216Get the value of the SDL_AudioCVT's "src_format" field, as an [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#audio-formats|audio format symbol]].
    176217
    177218
     
    184225<procedure>(sdl-audio-cvt-dst-format audio-cvt) → symbol</procedure>
    185226
    186 Get the value of the SDL_AudioCVT's "dst_format" field, as a symbol.
     227Get the value of the SDL_AudioCVT's "dst_format" field, as an [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#audio-formats|audio format symbol]].
    187228
    188229
     
    199240
    200241
    201 <procedure>(sdl-audio-cvt-buf audio-cvt) → pointer</procedure>
    202 
    203 Get the value of the SDL_AudioCVT's "buf" field, as a pointer to an
     242<procedure>(sdl-audio-cvt-buf-raw audio-cvt) → pointer</procedure>
     243
     244Get the value of the SDL_AudioCVT's "buf" field, as a pointer to a C
    204245array of Uint8 numbers. Use sdl-audio-cvt-len to get the length of the
    205246array.
     
    209250
    210251Get the value of the SDL_AudioCVT's "len" field, as an integer. This
    211 is the length of the array returned by sdl-audio-cvt-buf.
     252is the length of the array returned by {{sdl-audio-cvt-buf-raw}}.
    212253
    213254
     
    231272==== sdl-audio-spec
    232273
    233 sdl-audio-spec is a record type that wraps a pointer to a
     274sdl-audio-spec is a record type that wraps a pointer to an
    234275[[https://wiki.libsdl.org/SDL_AudioSpec|SDL_AudioSpec]] struct.
    235276
     
    237278<procedure>(sdl-audio-spec? obj) → boolean</procedure>
    238279
    239 Returns #t if {{obj}} is a sdl-audio-spec.
     280Returns #t if {{obj}} is an sdl-audio-spec.
    240281
    241282
     
    252293<setter>(sdl-audio-spec-format-set! audio-spec format)</setter>
    253294
    254 Get or set the value of the SDL_AudioSpec's "format" field, as a
    255 symbol. When setting, either a symbol or an integer will be accepted.
     295Get or set the value of the SDL_AudioSpec's "format" field, as an [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#audio-formats|audio format symbol]]. When setting, either a symbol or an integer will be accepted.
    256296
    257297
     
    291331
    292332
    293 <procedure>(sdl-audio-spec-userdata audio-spec) → pointer</procedure>
    294 <setter>(set! (sdl-audio-spec-userdata audio-spec) val)</setter>
    295 <setter>(sdl-audio-spec-userdata-set! audio-spec userdata)</setter>
     333<procedure>(sdl-audio-spec-userdata-raw audio-spec) → pointer</procedure>
     334<setter>(set! (sdl-audio-spec-userdata-raw audio-spec) val)</setter>
     335<setter>(sdl-audio-spec-userdata-raw-set! audio-spec userdata)</setter>
    296336
    297337Get or set the value of the SDL_AudioSpec's "userdata" field, as a
     
    302342==== sdl-color
    303343
    304 sdl-color is a record type that wraps a pointer to a
     344sdl-color is a record type that wraps a pointer to an
    305345[[https://wiki.libsdl.org/SDL_Color|SDL_Color]] struct.
    306346
     
    313353<procedure>(sdl-colour? obj) → boolean</procedure>
    314354
    315 Returns #t if {{obj}} is a sdl-color.
     355Returns #t if {{obj}} is an sdl-color.
    316356
    317357
     
    427467==== sdl-cursor
    428468
    429 sdl-cursor is a record type that wraps a pointer to a
     469sdl-cursor is a record type that wraps a pointer to an
    430470[[https://wiki.libsdl.org/SDL_CreateCursor|SDL_Cursor]] struct.
    431471
     
    433473<procedure>(sdl-cursor? obj) → boolean</procedure>
    434474
    435 Returns #t if {{obj}} is a sdl-cursor.
     475Returns #t if {{obj}} is an sdl-cursor.
    436476
    437477
     
    439479==== sdl-display-mode
    440480
    441 sdl-display-mode is a record type that wraps a pointer to a
     481sdl-display-mode is a record type that wraps a pointer to an
    442482[[https://wiki.libsdl.org/SDL_DisplayMode|SDL_DisplayMode]] struct.
    443483
     
    445485<procedure>(sdl-display-mode? obj) → boolean</procedure>
    446486
    447 Returns #t if {{obj}} is a sdl-display-mode.
     487Returns #t if {{obj}} is an sdl-display-mode.
    448488
    449489
     
    482522
    483523TODO: Docs.
     524Returns a [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#pixel-formats|pixel format symbol]].
    484525
    485526
     
    515556==== sdl-event
    516557
    517 sdl-event is a record type that wraps a pointer to a
     558sdl-event is a record type that wraps a pointer to an
    518559[[https://wiki.libsdl.org/SDL_Event|SDL_Event]]. There are many
    519560specific event structs in SDL, and the sdl-event record type wraps
     
    642683    <td>sdl-user-event</td>
    643684    <td>[[https://wiki.libsdl.org/SDL_UserEvent|SDL_UserEvent]]</td>
    644     <td>user</td>
     685    <td>Call {{sdl-register-events!}} to register your own symbols</td>
    645686  </tr>
    646687  <tr>
     
    691732<procedure>(sdl-event-type event) → symbol</procedure>
    692733<setter>(set! (sdl-event-type event) val)</setter>
    693 <setter>(sdl-event-type-set! event)</setter>
     734<setter>(sdl-event-type-set! event val)</setter>
    694735
    695736Get or set the sdl-event's event type, as a
     
    697738You can use this procedure with any variant of sdl-event. Setting this
    698739will change what variant of sdl-event it is. E.g. if you set it to the
    699 symbol {{'key-down}}, the event will become a sdl-keyboard-event.
     740symbol {{'key-down}}, the event will become an sdl-keyboard-event.
    700741
    701742
    702743<procedure>(sdl-event-type-raw event) → fixnum</procedure>
    703744<setter>(set! (sdl-event-type-raw event) val)</setter>
    704 <setter>(sdl-event-type-raw-set! event)</setter>
     745<setter>(sdl-event-type-raw-set! event val)</setter>
    705746
    706747Get or set the sdl-event's event type, as a nonnegative integer. You
     
    711752<procedure>(sdl-event-timestamp event) → fixnum</procedure>
    712753<setter>(set! (sdl-event-timestamp event) val)</setter>
    713 <setter>(sdl-event-timestamp-set! event)</setter>
     754<setter>(sdl-event-timestamp-set! event val)</setter>
    714755
    715756Get or set the event timestamp, as a nonnegative integer representing
     
    722763===== sdl-controller-axis-event
    723764
    724 sdl-controller-axis-event is a variant of sdl-event that wraps a pointer to a
     765sdl-controller-axis-event is a variant of sdl-event that wraps a pointer to an
    725766[[https://wiki.libsdl.org/SDL_ControllerAxisEvent|SDL_ControllerAxisEvent]].
    726767
     
    728769<procedure>(sdl-controller-axis-event? obj) → boolean</procedure>
    729770
    730 Returns #t if {{obj}} is a sdl-controller-axis-event.
     771Returns #t if {{obj}} is an sdl-controller-axis-event.
    731772
    732773
    733774<procedure>(sdl-controller-axis-event-which event) → fixnum</procedure>
    734775<setter>(set! (sdl-controller-axis-event-which event) val)</setter>
    735 <setter>(sdl-controller-axis-event-which-set! event)</setter>
     776<setter>(sdl-controller-axis-event-which-set! event val)</setter>
    736777
    737778TODO: Docs.
     
    740781<procedure>(sdl-controller-axis-event-axis event) → fixnum</procedure>
    741782<setter>(set! (sdl-controller-axis-event-axis event) val)</setter>
    742 <setter>(sdl-controller-axis-event-axis-set! event)</setter>
     783<setter>(sdl-controller-axis-event-axis-set! event val)</setter>
    743784
    744785TODO: Docs.
     
    747788<procedure>(sdl-controller-axis-event-value event) → fixnum</procedure>
    748789<setter>(set! (sdl-controller-axis-event-value event) val)</setter>
    749 <setter>(sdl-controller-axis-event-value-set! event)</setter>
     790<setter>(sdl-controller-axis-event-value-set! event val)</setter>
    750791
    751792TODO: Docs.
     
    755796===== sdl-controller-button-event
    756797
    757 sdl-controller-button-event is a variant of sdl-event that wraps a pointer to a
     798sdl-controller-button-event is a variant of sdl-event that wraps a pointer to an
    758799[[https://wiki.libsdl.org/SDL_ControllerButtonEvent|SDL_ControllerButtonEvent]].
    759800
     
    766807<procedure>(sdl-controller-button-event-which event) → fixnum</procedure>
    767808<setter>(set! (sdl-controller-button-event-which event) val)</setter>
    768 <setter>(sdl-controller-button-event-which-set! event)</setter>
     809<setter>(sdl-controller-button-event-which-set! event val)</setter>
    769810
    770811TODO: Docs.
     
    773814<procedure>(sdl-controller-button-event-button event) → fixnum</procedure>
    774815<setter>(set! (sdl-controller-button-event-button event) val)</setter>
    775 <setter>(sdl-controller-button-event-button-set! event)</setter>
     816<setter>(sdl-controller-button-event-button-set! event val)</setter>
    776817
    777818TODO: Docs.
     
    780821<procedure>(sdl-controller-button-event-state event) → boolean</procedure>
    781822<setter>(set! (sdl-controller-button-event-state event) val)</setter>
    782 <setter>(sdl-controller-button-event-state-set! event)</setter>
     823<setter>(sdl-controller-button-event-state-set! event val)</setter>
    783824
    784825TODO: Docs.
     
    788829===== sdl-controller-device-event
    789830
    790 sdl-controller-device-event is a variant of sdl-event that wraps a pointer to a
     831sdl-controller-device-event is a variant of sdl-event that wraps a pointer to an
    791832[[https://wiki.libsdl.org/SDL_ControllerDeviceEvent|SDL_ControllerDeviceEvent]].
    792833
     
    794835<procedure>(sdl-controller-device-event? obj) → boolean</procedure>
    795836
    796 Returns #t if {{obj}} is a sdl-controller-device-event.
     837Returns #t if {{obj}} is an sdl-controller-device-event.
    797838
    798839
    799840<procedure>(sdl-controller-device-event-which event) → fixnum</procedure>
    800841<setter>(set! (sdl-controller-device-event-which event) val)</setter>
    801 <setter>(sdl-controller-device-event-which-set! event)</setter>
     842<setter>(sdl-controller-device-event-which-set! event val)</setter>
    802843
    803844TODO: Docs.
     
    807848===== sdl-dollar-gesture-event
    808849
    809 sdl-dollar-gesture-event is a variant of sdl-event that wraps a pointer to a
     850sdl-dollar-gesture-event is a variant of sdl-event that wraps a pointer to an
    810851[[https://wiki.libsdl.org/SDL_DollarGestureEvent|SDL_DollarGestureEvent]].
    811852
     
    813854<procedure>(sdl-dollar-gesture-event? obj) → boolean</procedure>
    814855
    815 Returns #t if {{obj}} is a sdl-dollar-gesture-event.
     856Returns #t if {{obj}} is an sdl-dollar-gesture-event.
    816857
    817858
    818859<procedure>(sdl-dollar-gesture-event-touch-id event) → fixnum</procedure>
    819860<setter>(set! (sdl-dollar-gesture-event-touch-id event) val)</setter>
    820 <setter>(sdl-dollar-gesture-event-touch-id-set! event)</setter>
     861<setter>(sdl-dollar-gesture-event-touch-id-set! event val)</setter>
    821862
    822863TODO: Docs.
     
    825866<procedure>(sdl-dollar-gesture-event-gesture-id event) → fixnum</procedure>
    826867<setter>(set! (sdl-dollar-gesture-event-gesture-id event) val)</setter>
    827 <setter>(sdl-dollar-gesture-event-gesture-id-set! event)</setter>
     868<setter>(sdl-dollar-gesture-event-gesture-id-set! event val)</setter>
    828869
    829870TODO: Docs.
     
    832873<procedure>(sdl-dollar-gesture-event-num-fingers event) → fixnum</procedure>
    833874<setter>(set! (sdl-dollar-gesture-event-num-fingers event) val)</setter>
    834 <setter>(sdl-dollar-gesture-event-num-fingers-set! event)</setter>
     875<setter>(sdl-dollar-gesture-event-num-fingers-set! event val)</setter>
    835876
    836877TODO: Docs.
     
    839880<procedure>(sdl-dollar-gesture-event-error event) → float</procedure>
    840881<setter>(set! (sdl-dollar-gesture-event-error event) val)</setter>
    841 <setter>(sdl-dollar-gesture-event-error-set! event)</setter>
     882<setter>(sdl-dollar-gesture-event-error-set! event val)</setter>
    842883
    843884TODO: Docs.
     
    846887<procedure>(sdl-dollar-gesture-event-x event) → float</procedure>
    847888<setter>(set! (sdl-dollar-gesture-event-x event) val)</setter>
    848 <setter>(sdl-dollar-gesture-event-x-set! event)</setter>
     889<setter>(sdl-dollar-gesture-event-x-set! event val)</setter>
    849890
    850891TODO: Docs.
     
    853894<procedure>(sdl-dollar-gesture-event-y event) → float</procedure>
    854895<setter>(set! (sdl-dollar-gesture-event-y event) val)</setter>
    855 <setter>(sdl-dollar-gesture-event-y-set! event)</setter>
     896<setter>(sdl-dollar-gesture-event-y-set! event val)</setter>
    856897
    857898TODO: Docs.
     
    861902===== sdl-drop-event
    862903
    863 sdl-drop-event is a variant of sdl-event that wraps a pointer to a
     904sdl-drop-event is a variant of sdl-event that wraps a pointer to an
    864905[[https://wiki.libsdl.org/SDL_DropEvent|SDL_DropEvent]].
    865906
     
    867908<procedure>(sdl-drop-event? obj) → boolean</procedure>
    868909
    869 Returns #t if {{obj}} is a sdl-drop-event.
     910Returns #t if {{obj}} is an sdl-drop-event.
    870911
    871912
    872913<procedure>(sdl-drop-event-file event) → string</procedure>
    873914<setter>(set! (sdl-drop-event-file event) val)</setter>
    874 <setter>(sdl-drop-event-file-set! event)</setter>
     915<setter>(sdl-drop-event-file-set! event val)</setter>
    875916
    876917TODO: Docs.
     
    880921===== sdl-joy-axis-event
    881922
    882 sdl-joy-axis-event is a variant of sdl-event that wraps a pointer to a
     923sdl-joy-axis-event is a variant of sdl-event that wraps a pointer to an
    883924[[https://wiki.libsdl.org/SDL_JoyAxisEvent|SDL_JoyAxisEvent]].
    884925
     
    886927<procedure>(sdl-joy-axis-event? obj) → boolean</procedure>
    887928
    888 Returns #t if {{obj}} is a sdl-joy-axis-event.
     929Returns #t if {{obj}} is an sdl-joy-axis-event.
    889930
    890931
    891932<procedure>(sdl-joy-axis-event-which event) → fixnum</procedure>
    892933<setter>(set! (sdl-joy-axis-event-which event) val)</setter>
    893 <setter>(sdl-joy-axis-event-which-set! event)</setter>
     934<setter>(sdl-joy-axis-event-which-set! event val)</setter>
    894935
    895936Returns the joystick ID number of the joystick that caused the event.
     
    898939<procedure>(sdl-joy-axis-event-axis event) → fixnum</procedure>
    899940<setter>(set! (sdl-joy-axis-event-axis event) val)</setter>
    900 <setter>(sdl-joy-axis-event-axis-set! event)</setter>
     941<setter>(sdl-joy-axis-event-axis-set! event val)</setter>
    901942
    902943Returns the number of the axis that was moved.
     
    905946<procedure>(sdl-joy-axis-event-value event) → fixnum</procedure>
    906947<setter>(set! (sdl-joy-axis-event-value event) val)</setter>
    907 <setter>(sdl-joy-axis-event-value-set! event)</setter>
     948<setter>(sdl-joy-axis-event-value-set! event val)</setter>
    908949
    909950Returns the new value of the axis, as an integer in the range -32768
     
    914955===== sdl-joy-ball-event
    915956
    916 sdl-joy-ball-event is a variant of sdl-event that wraps a pointer to a
     957sdl-joy-ball-event is a variant of sdl-event that wraps a pointer to an
    917958[[https://wiki.libsdl.org/SDL_JoyBallEvent|SDL_JoyBallEvent]].
    918959
     
    920961<procedure>(sdl-joy-ball-event? obj) → boolean</procedure>
    921962
    922 Returns #t if {{obj}} is a sdl-joy-ball-event.
     963Returns #t if {{obj}} is an sdl-joy-ball-event.
    923964
    924965
    925966<procedure>(sdl-joy-ball-event-which event) → fixnum</procedure>
    926967<setter>(set! (sdl-joy-ball-event-which event) val)</setter>
    927 <setter>(sdl-joy-ball-event-which-set! event)</setter>
     968<setter>(sdl-joy-ball-event-which-set! event val)</setter>
    928969
    929970Returns the joystick ID number of the joystick that caused the event.
     
    932973<procedure>(sdl-joy-ball-event-ball event) → fixnum</procedure>
    933974<setter>(set! (sdl-joy-ball-event-ball event) val)</setter>
    934 <setter>(sdl-joy-ball-event-ball-set! event)</setter>
     975<setter>(sdl-joy-ball-event-ball-set! event val)</setter>
    935976
    936977Returns the number of the trackball that was moved.
     
    939980<procedure>(sdl-joy-ball-event-xrel event) → fixnum</procedure>
    940981<setter>(set! (sdl-joy-ball-event-xrel event) val)</setter>
    941 <setter>(sdl-joy-ball-event-xrel-set! event)</setter>
     982<setter>(sdl-joy-ball-event-xrel-set! event val)</setter>
    942983
    943984Returns an integer (possibly negative) indicating how the trackball
     
    947988<procedure>(sdl-joy-ball-event-yrel event) → fixnum</procedure>
    948989<setter>(set! (sdl-joy-ball-event-yrel event) val)</setter>
    949 <setter>(sdl-joy-ball-event-yrel-set! event)</setter>
     990<setter>(sdl-joy-ball-event-yrel-set! event val)</setter>
    950991
    951992Returns an integer (possibly negative) indicating how the trackball
     
    956997===== sdl-joy-button-event
    957998
    958 sdl-joy-button-event is a variant of sdl-event that wraps a pointer to a
     999sdl-joy-button-event is a variant of sdl-event that wraps a pointer to an
    9591000[[https://wiki.libsdl.org/SDL_JoyButtonEvent|SDL_JoyButtonEvent]].
    9601001
     
    9621003<procedure>(sdl-joy-button-event? obj) → boolean</procedure>
    9631004
    964 Returns #t if {{obj}} is a sdl-joy-button-event.
     1005Returns #t if {{obj}} is an sdl-joy-button-event.
    9651006
    9661007
    9671008<procedure>(sdl-joy-button-event-which event) → fixnum</procedure>
    9681009<setter>(set! (sdl-joy-button-event-which event) val)</setter>
    969 <setter>(sdl-joy-button-event-which-set! event)</setter>
     1010<setter>(sdl-joy-button-event-which-set! event val)</setter>
    9701011
    9711012Returns the joystick ID number of the joystick that caused the event.
     
    9741015<procedure>(sdl-joy-button-event-button event) → fixnum</procedure>
    9751016<setter>(set! (sdl-joy-button-event-button event) val)</setter>
    976 <setter>(sdl-joy-button-event-button-set! event)</setter>
     1017<setter>(sdl-joy-button-event-button-set! event val)</setter>
    9771018
    9781019Returns the number of the button that was pressed or released.
     
    9811022<procedure>(sdl-joy-button-event-state event) → boolean</procedure>
    9821023<setter>(set! (sdl-joy-button-event-state event) val)</setter>
    983 <setter>(sdl-joy-button-event-state-set! event)</setter>
     1024<setter>(sdl-joy-button-event-state-set! event val)</setter>
    9841025
    9851026Returns #t if the button was pressed, or #f if the button was released.
     
    9911032===== sdl-joy-device-event
    9921033
    993 sdl-joy-device-event is a variant of sdl-event that wraps a pointer to a
     1034sdl-joy-device-event is a variant of sdl-event that wraps a pointer to an
    9941035[[https://wiki.libsdl.org/SDL_JoyDeviceEvent|SDL_JoyDeviceEvent]].
    9951036
     
    9971038<procedure>(sdl-joy-device-event? obj) → boolean</procedure>
    9981039
    999 Returns #t if {{obj}} is a sdl-joy-device-event.
     1040Returns #t if {{obj}} is an sdl-joy-device-event.
    10001041
    10011042
    10021043<procedure>(sdl-joy-device-event-which event) → fixnum</procedure>
    10031044<setter>(set! (sdl-joy-device-event-which event) val)</setter>
    1004 <setter>(sdl-joy-device-event-which-set! event)</setter>
     1045<setter>(sdl-joy-device-event-which-set! event val)</setter>
    10051046
    10061047Returns the joystick ID number of the joystick that caused the event.
     
    10101051===== sdl-joy-hat-event
    10111052
    1012 sdl-joy-hat-event is a variant of sdl-event that wraps a pointer to a
     1053sdl-joy-hat-event is a variant of sdl-event that wraps a pointer to an
    10131054[[https://wiki.libsdl.org/SDL_JoyHatEvent|SDL_JoyHatEvent]].
    10141055
     
    10161057<procedure>(sdl-joy-hat-event? obj) → boolean</procedure>
    10171058
    1018 Returns #t if {{obj}} is a sdl-joy-hat-event.
     1059Returns #t if {{obj}} is an sdl-joy-hat-event.
    10191060
    10201061
    10211062<procedure>(sdl-joy-hat-event-which event) → fixnum</procedure>
    10221063<setter>(set! (sdl-joy-hat-event-which event) val)</setter>
    1023 <setter>(sdl-joy-hat-event-which-set! event)</setter>
     1064<setter>(sdl-joy-hat-event-which-set! event val)</setter>
    10241065
    10251066Returns the joystick ID number of the joystick that caused the event.
     
    10281069<procedure>(sdl-joy-hat-event-hat event) → fixnum</procedure>
    10291070<setter>(set! (sdl-joy-hat-event-hat event) val)</setter>
    1030 <setter>(sdl-joy-hat-event-hat-set! event)</setter>
     1071<setter>(sdl-joy-hat-event-hat-set! event val)</setter>
    10311072
    10321073Returns the number of the hat that was moved.
     
    10351076<procedure>(sdl-joy-hat-event-value event) → symbol</procedure>
    10361077<setter>(set! (sdl-joy-hat-event-value event) val)</setter>
    1037 <setter>(sdl-joy-hat-event-value-set! event)</setter>
     1078<setter>(sdl-joy-hat-event-value-set! event val)</setter>
    10381079
    10391080Returns a [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#joystick-hat-position|joystick hat position symbol]] indicating the new joystick hat position.
     
    10421083<procedure>(sdl-joy-hat-event-value-raw event) → fixnum</procedure>
    10431084<setter>(set! (sdl-joy-hat-event-value-raw event) val)</setter>
    1044 <setter>(sdl-joy-hat-event-value-raw-set! event)</setter>
     1085<setter>(sdl-joy-hat-event-value-raw-set! event val)</setter>
    10451086
    10461087Returns an integer indicating the new joystick hat position.
     
    10501091===== sdl-keyboard-event
    10511092
    1052 sdl-keyboard-event is a variant of sdl-event that wraps a pointer to a
     1093sdl-keyboard-event is a variant of sdl-event that wraps a pointer to an
    10531094[[https://wiki.libsdl.org/SDL_KeyboardEvent|SDL_KeyboardEvent]].
    10541095
     
    10561097<procedure>(sdl-keyboard-event? obj) → boolean</procedure>
    10571098
    1058 Returns #t if {{obj}} is a sdl-keyboard-event.
     1099Returns #t if {{obj}} is an sdl-keyboard-event.
    10591100
    10601101
    10611102<procedure>(sdl-keyboard-event-window-id event) → fixnum</procedure>
    10621103<setter>(set! (sdl-keyboard-event-window-id event) val)</setter>
    1063 <setter>(sdl-keyboard-event-window-id-set! event)</setter>
     1104<setter>(sdl-keyboard-event-window-id-set! event val)</setter>
    10641105
    10651106Returns the ID number of the sdl-window that had keyboard focus at the
     
    10691110<procedure>(sdl-keyboard-event-state event) → boolean</procedure>
    10701111<setter>(set! (sdl-keyboard-event-state event) val)</setter>
    1071 <setter>(sdl-keyboard-event-state-set! event)</setter>
     1112<setter>(sdl-keyboard-event-state-set! event val)</setter>
    10721113
    10731114Returns #t if the key was pressed, or #f if the key was released. You
     
    10781119<procedure>(sdl-keyboard-event-repeat event) → fixnum</procedure>
    10791120<setter>(set! (sdl-keyboard-event-repeat event) val)</setter>
    1080 <setter>(sdl-keyboard-event-repeat-set! event)</setter>
     1121<setter>(sdl-keyboard-event-repeat-set! event val)</setter>
    10811122
    10821123Returns non-zero if this is a "key repeat" event (caused by the user
     
    10871128<procedure>(sdl-keyboard-event-keysym event) → sdl-keysym</procedure>
    10881129<setter>(set! (sdl-keyboard-event-keysym event) val)</setter>
    1089 <setter>(sdl-keyboard-event-keysym-set! event)</setter>
     1130<setter>(sdl-keyboard-event-keysym-set! event val)</setter>
    10901131
    10911132Returns a copy of the sdl-keysym representing the key that was pressed
     
    11051146<procedure>(sdl-keyboard-event-sym event) → symbol</procedure>
    11061147<setter>(set! (sdl-keyboard-event-sym event) val)</setter>
    1107 <setter>(sdl-keyboard-event-sym-set! event)</setter>
     1148<setter>(sdl-keyboard-event-sym-set! event val)</setter>
    11081149
    11091150Returns a [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#keyboard-keycodes|keyboard keycode symbol]]
     
    11141155<procedure>(sdl-keyboard-event-sym-raw event) → fixnum</procedure>
    11151156<setter>(set! (sdl-keyboard-event-sym-raw event) val)</setter>
    1116 <setter>(sdl-keyboard-event-sym-raw-set! event)</setter>
     1157<setter>(sdl-keyboard-event-sym-raw-set! event val)</setter>
    11171158
    11181159Returns an integer representing a keyboard keycode of the key that was
     
    11231164<procedure>(sdl-keyboard-event-scancode event) → symbol</procedure>
    11241165<setter>(set! (sdl-keyboard-event-scancode event) val)</setter>
    1125 <setter>(sdl-keyboard-event-scancode-set! event)</setter>
     1166<setter>(sdl-keyboard-event-scancode-set! event val)</setter>
    11261167
    11271168Returns a [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#keyboard-scancodes|keyboard scancode symbol]]
     
    11321173<procedure>(sdl-keyboard-event-scancode-raw event) → fixnum</procedure>
    11331174<setter>(set! (sdl-keyboard-event-scancode-raw event) val)</setter>
    1134 <setter>(sdl-keyboard-event-scancode-raw-set! event)</setter>
     1175<setter>(sdl-keyboard-event-scancode-raw-set! event val)</setter>
    11351176
    11361177Returns an integer representing a keyboard scancode of the key that
     
    11411182<procedure>(sdl-keyboard-event-mod event) → list of symbols</procedure>
    11421183<setter>(set! (sdl-keyboard-event-mod event) val)</setter>
    1143 <setter>(sdl-keyboard-event-mod-set! event)</setter>
     1184<setter>(sdl-keyboard-event-mod-set! event val)</setter>
    11441185
    11451186Returns a list of zero or more [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#keyboard-modifiers|keyboard modifier symbols]],
     
    11501191<procedure>(sdl-keyboard-event-mod-raw event) → fixnum</procedure>
    11511192<setter>(set! (sdl-keyboard-event-mod-raw event) val)</setter>
    1152 <setter>(sdl-keyboard-event-mod-raw-set! event)</setter>
     1193<setter>(sdl-keyboard-event-mod-raw-set! event val)</setter>
    11531194
    11541195Returns an integer representing a bitfield of keyboard modifiers,
     
    11601201===== sdl-mouse-button-event
    11611202
    1162 sdl-mouse-button-event is a variant of sdl-event that wraps a pointer to a
     1203sdl-mouse-button-event is a variant of sdl-event that wraps a pointer to an
    11631204[[https://wiki.libsdl.org/SDL_MouseButtonEvent|SDL_MouseButtonEvent]].
    11641205
     
    11661207<procedure>(sdl-mouse-button-event? obj) → boolean</procedure>
    11671208
    1168 Returns #t if {{obj}} is a sdl-mouse-button-event.
     1209Returns #t if {{obj}} is an sdl-mouse-button-event.
    11691210
    11701211
    11711212<procedure>(sdl-mouse-button-event-window-id event) → fixnum</procedure>
    11721213<setter>(set! (sdl-mouse-button-event-window-id event) val)</setter>
    1173 <setter>(sdl-mouse-button-event-window-id-set! event)</setter>
     1214<setter>(sdl-mouse-button-event-window-id-set! event val)</setter>
    11741215
    11751216Returns the ID number of the sdl-window that had mouse focus at the
     
    11791220<procedure>(sdl-mouse-button-event-which event) → fixnum</procedure>
    11801221<setter>(set! (sdl-mouse-button-event-which event) val)</setter>
    1181 <setter>(sdl-mouse-button-event-which-set! event)</setter>
     1222<setter>(sdl-mouse-button-event-which-set! event val)</setter>
    11821223
    11831224TODO: Docs.
     
    11861227<procedure>(sdl-mouse-button-event-button event) → symbol</procedure>
    11871228<setter>(set! (sdl-mouse-button-event-button event) val)</setter>
    1188 <setter>(sdl-mouse-button-event-button-set! event)</setter>
     1229<setter>(sdl-mouse-button-event-button-set! event val)</setter>
    11891230
    11901231Returns a [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#mouse-buttons|mouse button symbol]] indicating which button was pressed or released.
     
    11931234<procedure>(sdl-mouse-button-event-button-raw event) → fixnum</procedure>
    11941235<setter>(set! (sdl-mouse-button-event-button-raw event) val)</setter>
    1195 <setter>(sdl-mouse-button-event-button-raw-set! event)</setter>
     1236<setter>(sdl-mouse-button-event-button-raw-set! event val)</setter>
    11961237
    11971238Returns an integer indicating which button was pressed or released.
     
    12011242<procedure>(sdl-mouse-button-event-state event) → boolean</procedure>
    12021243<setter>(set! (sdl-mouse-button-event-state event) val)</setter>
    1203 <setter>(sdl-mouse-button-event-state-set! event)</setter>
     1244<setter>(sdl-mouse-button-event-state-set! event val)</setter>
    12041245
    12051246Returns #t if the button was pressed, or #f if the button was
     
    12111252<procedure>(sdl-mouse-button-event-x event) → fixnum</procedure>
    12121253<setter>(set! (sdl-mouse-button-event-x event) val)</setter>
    1213 <setter>(sdl-mouse-button-event-x-set! event)</setter>
     1254<setter>(sdl-mouse-button-event-x-set! event val)</setter>
    12141255
    12151256Returns the X position (in pixels) of the mouse cursor at the time the
     
    12191260<procedure>(sdl-mouse-button-event-y event) → fixnum</procedure>
    12201261<setter>(set! (sdl-mouse-button-event-y event) val)</setter>
    1221 <setter>(sdl-mouse-button-event-y-set! event)</setter>
     1262<setter>(sdl-mouse-button-event-y-set! event val)</setter>
    12221263
    12231264Returns the Y position (in pixels) of the mouse cursor at the time the
     
    12281269===== sdl-mouse-motion-event
    12291270
    1230 sdl-mouse-motion-event is a variant of sdl-event that wraps a pointer to a
     1271sdl-mouse-motion-event is a variant of sdl-event that wraps a pointer to an
    12311272[[https://wiki.libsdl.org/SDL_MouseMotionEvent|SDL_MouseMotionEvent]].
    12321273
     
    12341275<procedure>(sdl-mouse-motion-event? obj) → boolean</procedure>
    12351276
    1236 Returns #t if {{obj}} is a sdl-mouse-motion-event.
     1277Returns #t if {{obj}} is an sdl-mouse-motion-event.
    12371278
    12381279
    12391280<procedure>(sdl-mouse-motion-event-window-id event) → fixnum</procedure>
    12401281<setter>(set! (sdl-mouse-motion-event-window-id event) val)</setter>
    1241 <setter>(sdl-mouse-motion-event-window-id-set! event)</setter>
     1282<setter>(sdl-mouse-motion-event-window-id-set! event val)</setter>
    12421283
    12431284Returns the ID number of the sdl-window that had mouse focus at the
     
    12471288<procedure>(sdl-mouse-motion-event-which event) → fixnum</procedure>
    12481289<setter>(set! (sdl-mouse-motion-event-which event) val)</setter>
    1249 <setter>(sdl-mouse-motion-event-which-set! event)</setter>
     1290<setter>(sdl-mouse-motion-event-which-set! event val)</setter>
    12501291
    12511292TODO: Docs.
     
    12541295<procedure>(sdl-mouse-motion-event-state event) → list of symbols</procedure>
    12551296<setter>(set! (sdl-mouse-motion-event-state event) val)</setter>
    1256 <setter>(sdl-mouse-motion-event-state-set! event)</setter>
     1297<setter>(sdl-mouse-motion-event-state-set! event val)</setter>
    12571298
    12581299Returns a list of zero or more [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#mouse-button-masks|mouse button mask symbols]],
     
    12631304<procedure>(sdl-mouse-motion-event-state-raw event) → fixnum</procedure>
    12641305<setter>(set! (sdl-mouse-motion-event-state-raw event) val)</setter>
    1265 <setter>(sdl-mouse-motion-event-state-raw-set! event)</setter>
     1306<setter>(sdl-mouse-motion-event-state-raw-set! event val)</setter>
    12661307
    12671308Returns an integer representing the mouse buttons that were being
     
    12721313<procedure>(sdl-mouse-motion-event-x event) → fixnum</procedure>
    12731314<setter>(set! (sdl-mouse-motion-event-x event) val)</setter>
    1274 <setter>(sdl-mouse-motion-event-x-set! event)</setter>
     1315<setter>(sdl-mouse-motion-event-x-set! event val)</setter>
    12751316
    12761317Returns the X coordinate (in pixels) of the mouse cursor at the time
     
    12801321<procedure>(sdl-mouse-motion-event-y event) → fixnum</procedure>
    12811322<setter>(set! (sdl-mouse-motion-event-y event) val)</setter>
    1282 <setter>(sdl-mouse-motion-event-y-set! event)</setter>
     1323<setter>(sdl-mouse-motion-event-y-set! event val)</setter>
    12831324
    12841325Returns the Y coordinate (in pixels) of the mouse cursor at the time
     
    12881329<procedure>(sdl-mouse-motion-event-xrel event) → fixnum</procedure>
    12891330<setter>(set! (sdl-mouse-motion-event-xrel event) val)</setter>
    1290 <setter>(sdl-mouse-motion-event-xrel-set! event)</setter>
     1331<setter>(sdl-mouse-motion-event-xrel-set! event val)</setter>
    12911332
    12921333Returns how much the mouse cursor moved on the X axis (in pixels)
     
    12961337<procedure>(sdl-mouse-motion-event-yrel event) → fixnum</procedure>
    12971338<setter>(set! (sdl-mouse-motion-event-yrel event) val)</setter>
    1298 <setter>(sdl-mouse-motion-event-yrel-set! event)</setter>
     1339<setter>(sdl-mouse-motion-event-yrel-set! event val)</setter>
    12991340
    13001341Returns how much the mouse cursor moved on the Y axis (in pixels)
     
    13051346===== sdl-mouse-wheel-event
    13061347
    1307 sdl-mouse-wheel-event is a variant of sdl-event that wraps a pointer to a
     1348sdl-mouse-wheel-event is a variant of sdl-event that wraps a pointer to an
    13081349[[https://wiki.libsdl.org/SDL_MouseWheelEvent|SDL_MouseWheelEvent]].
    13091350
     
    13111352<procedure>(sdl-mouse-wheel-event? obj) → boolean</procedure>
    13121353
    1313 Returns #t if {{obj}} is a sdl-mouse-wheel-event.
     1354Returns #t if {{obj}} is an sdl-mouse-wheel-event.
    13141355
    13151356
    13161357<procedure>(sdl-mouse-wheel-event-window-id event) → fixnum</procedure>
    13171358<setter>(set! (sdl-mouse-wheel-event-window-id event) val)</setter>
    1318 <setter>(sdl-mouse-wheel-event-window-id-set! event)</setter>
     1359<setter>(sdl-mouse-wheel-event-window-id-set! event val)</setter>
    13191360
    13201361Returns the ID number of the sdl-window that had mouse focus at the
     
    13241365<procedure>(sdl-mouse-wheel-event-which event) → fixnum</procedure>
    13251366<setter>(set! (sdl-mouse-wheel-event-which event) val)</setter>
    1326 <setter>(sdl-mouse-wheel-event-which-set! event)</setter>
     1367<setter>(sdl-mouse-wheel-event-which-set! event val)</setter>
    13271368
    13281369TODO: Docs.
     
    13311372<procedure>(sdl-mouse-wheel-event-x event) → fixnum</procedure>
    13321373<setter>(set! (sdl-mouse-wheel-event-x event) val)</setter>
    1333 <setter>(sdl-mouse-wheel-event-x-set! event)</setter>
     1374<setter>(sdl-mouse-wheel-event-x-set! event val)</setter>
    13341375
    13351376TODO: Docs.
     
    13381379<procedure>(sdl-mouse-wheel-event-y event) → fixnum</procedure>
    13391380<setter>(set! (sdl-mouse-wheel-event-y event) val)</setter>
    1340 <setter>(sdl-mouse-wheel-event-y-set! event)</setter>
     1381<setter>(sdl-mouse-wheel-event-y-set! event val)</setter>
    13411382
    13421383TODO: Docs.
     
    13461387===== sdl-multi-gesture-event
    13471388
    1348 sdl-multi-gesture-event is a variant of sdl-event that wraps a pointer to a
     1389sdl-multi-gesture-event is a variant of sdl-event that wraps a pointer to an
    13491390[[https://wiki.libsdl.org/SDL_MultiGestureEvent|SDL_MultiGestureEvent]].
    13501391
     
    13521393<procedure>(sdl-multi-gesture-event? obj) → boolean</procedure>
    13531394
    1354 Returns #t if {{obj}} is a sdl-multi-gesture-event.
     1395Returns #t if {{obj}} is an sdl-multi-gesture-event.
    13551396
    13561397
    13571398<procedure>(sdl-multi-gesture-event-touch-id event) → fixnum</procedure>
    13581399<setter>(set! (sdl-multi-gesture-event-touch-id event) val)</setter>
    1359 <setter>(sdl-multi-gesture-event-touch-id-set! event)</setter>
     1400<setter>(sdl-multi-gesture-event-touch-id-set! event val)</setter>
    13601401
    13611402TODO: Docs.
     
    13641405<procedure>(sdl-multi-gesture-event-dtheta event) → float</procedure>
    13651406<setter>(set! (sdl-multi-gesture-event-dtheta event) val)</setter>
    1366 <setter>(sdl-multi-gesture-event-dtheta-set! event)</setter>
     1407<setter>(sdl-multi-gesture-event-dtheta-set! event val)</setter>
    13671408
    13681409TODO: Docs.
     
    13711412<procedure>(sdl-multi-gesture-event-ddist event) → float</procedure>
    13721413<setter>(set! (sdl-multi-gesture-event-ddist event) val)</setter>
    1373 <setter>(sdl-multi-gesture-event-ddist-set! event)</setter>
     1414<setter>(sdl-multi-gesture-event-ddist-set! event val)</setter>
    13741415
    13751416TODO: Docs.
     
    13781419<procedure>(sdl-multi-gesture-event-x event) → float</procedure>
    13791420<setter>(set! (sdl-multi-gesture-event-x event) val)</setter>
    1380 <setter>(sdl-multi-gesture-event-x-set! event)</setter>
     1421<setter>(sdl-multi-gesture-event-x-set! event val)</setter>
    13811422
    13821423TODO: Docs.
     
    13851426<procedure>(sdl-multi-gesture-event-y event) → float</procedure>
    13861427<setter>(set! (sdl-multi-gesture-event-y event) val)</setter>
    1387 <setter>(sdl-multi-gesture-event-y-set! event)</setter>
     1428<setter>(sdl-multi-gesture-event-y-set! event val)</setter>
    13881429
    13891430TODO: Docs.
     
    13921433<procedure>(sdl-multi-gesture-event-num-fingers event) → fixnum</procedure>
    13931434<setter>(set! (sdl-multi-gesture-event-num-fingers event) val)</setter>
    1394 <setter>(sdl-multi-gesture-event-num-fingers-set! event)</setter>
     1435<setter>(sdl-multi-gesture-event-num-fingers-set! event val)</setter>
    13951436
    13961437TODO: Docs.
     
    14001441===== sdl-quit-event
    14011442
    1402 sdl-quit-event is a variant of sdl-event that wraps a pointer to a
     1443sdl-quit-event is a variant of sdl-event that wraps a pointer to an
    14031444[[https://wiki.libsdl.org/SDL_QuitEvent|SDL_QuitEvent]].
    14041445
     
    14061447<procedure>(sdl-quit-event? obj) → boolean</procedure>
    14071448
    1408 Returns #t if {{obj}} is a sdl-quit-event.
     1449Returns #t if {{obj}} is an sdl-quit-event.
    14091450
    14101451
     
    14121453===== sdl-sys-wm-event
    14131454
    1414 sdl-sys-wm-event is a variant of sdl-event that wraps a pointer to a
     1455sdl-sys-wm-event is a variant of sdl-event that wraps a pointer to an
    14151456[[https://wiki.libsdl.org/SDL_SysWMEvent|SDL_SysWMEvent]].
    14161457
     
    14181459<procedure>(sdl-sys-wm-event? obj) → boolean</procedure>
    14191460
    1420 Returns #t if {{obj}} is a sdl-sys-wm-event.
     1461Returns #t if {{obj}} is an sdl-sys-wm-event.
    14211462
    14221463
    14231464<procedure>(sdl-sys-wm-event-msg event) → sdl-sys-wm-msg</procedure>
    14241465<setter>(set! (sdl-sys-wm-event-msg event) val)</setter>
    1425 <setter>(sdl-sys-wm-event-msg-set! event)</setter>
     1466<setter>(sdl-sys-wm-event-msg-set! event val)</setter>
    14261467
    14271468TODO: Docs.
     
    14311472===== sdl-text-editing-event
    14321473
    1433 sdl-text-editing-event is a variant of sdl-event that wraps a pointer to a
     1474sdl-text-editing-event is a variant of sdl-event that wraps a pointer to an
    14341475[[https://wiki.libsdl.org/SDL_TextEditingEvent|SDL_TextEditingEvent]].
    14351476
     
    14371478<procedure>(sdl-text-editing-event? obj) → boolean</procedure>
    14381479
    1439 Returns #t if {{obj}} is a sdl-text-editing-event.
     1480Returns #t if {{obj}} is an sdl-text-editing-event.
    14401481
    14411482
    14421483<procedure>(sdl-text-editing-event-window-id event) → fixnum</procedure>
    14431484<setter>(set! (sdl-text-editing-event-window-id event) val)</setter>
    1444 <setter>(sdl-text-editing-event-window-id-set! event)</setter>
     1485<setter>(sdl-text-editing-event-window-id-set! event val)</setter>
    14451486
    14461487TODO: Docs.
     
    14491490<procedure>(sdl-text-editing-event-text event) → string</procedure>
    14501491<setter>(set! (sdl-text-editing-event-text event) val)</setter>
    1451 <setter>(sdl-text-editing-event-text-set! event)</setter>
     1492<setter>(sdl-text-editing-event-text-set! event val)</setter>
    14521493
    14531494TODO: Docs.
     
    14561497<procedure>(sdl-text-editing-event-start event) → fixnum</procedure>
    14571498<setter>(set! (sdl-text-editing-event-start event) val)</setter>
    1458 <setter>(sdl-text-editing-event-start-set! event)</setter>
     1499<setter>(sdl-text-editing-event-start-set! event val)</setter>
    14591500
    14601501TODO: Docs.
     
    14631504<procedure>(sdl-text-editing-event-length event) → fixnum</procedure>
    14641505<setter>(set! (sdl-text-editing-event-length event) val)</setter>
    1465 <setter>(sdl-text-editing-event-length-set! event)</setter>
     1506<setter>(sdl-text-editing-event-length-set! event val)</setter>
    14661507
    14671508TODO: Docs.
     
    14711512===== sdl-text-input-event
    14721513
    1473 sdl-text-input-event is a variant of sdl-event that wraps a pointer to a
     1514sdl-text-input-event is a variant of sdl-event that wraps a pointer to an
    14741515[[https://wiki.libsdl.org/SDL_TextInputEvent|SDL_TextInputEvent]].
    14751516
     
    14771518<procedure>(sdl-text-input-event? obj) → boolean</procedure>
    14781519
    1479 Returns #t if {{obj}} is a sdl-text-input-event.
     1520Returns #t if {{obj}} is an sdl-text-input-event.
    14801521
    14811522
    14821523<procedure>(sdl-text-input-event-window-id event) → fixnum</procedure>
    14831524<setter>(set! (sdl-text-input-event-window-id event) val)</setter>
    1484 <setter>(sdl-text-input-event-window-id-set! event)</setter>
     1525<setter>(sdl-text-input-event-window-id-set! event val)</setter>
    14851526
    14861527TODO: Docs.
     
    14891530<procedure>(sdl-text-input-event-text event) → string</procedure>
    14901531<setter>(set! (sdl-text-input-event-text event) val)</setter>
    1491 <setter>(sdl-text-input-event-text-set! event)</setter>
     1532<setter>(sdl-text-input-event-text-set! event val)</setter>
    14921533
    14931534TODO: Docs.
     
    14971538===== sdl-touch-finger-event
    14981539
    1499 sdl-touch-finger-event is a variant of sdl-event that wraps a pointer to a
     1540sdl-touch-finger-event is a variant of sdl-event that wraps a pointer to an
    15001541[[https://wiki.libsdl.org/SDL_TouchFingerEvent|SDL_TouchFingerEvent]].
    15011542
     
    15031544<procedure>(sdl-touch-finger-event? obj) → boolean</procedure>
    15041545
    1505 Returns #t if {{obj}} is a sdl-touch-finger-event.
     1546Returns #t if {{obj}} is an sdl-touch-finger-event.
    15061547
    15071548
    15081549<procedure>(sdl-touch-finger-event-touch-id event) → fixnum</procedure>
    15091550<setter>(set! (sdl-touch-finger-event-touch-id event) val)</setter>
    1510 <setter>(sdl-touch-finger-event-touch-id-set! event)</setter>
     1551<setter>(sdl-touch-finger-event-touch-id-set! event val)</setter>
    15111552
    15121553TODO: Docs.
     
    15151556<procedure>(sdl-touch-finger-event-finger-id event) → fixnum</procedure>
    15161557<setter>(set! (sdl-touch-finger-event-finger-id event) val)</setter>
    1517 <setter>(sdl-touch-finger-event-finger-id-set! event)</setter>
     1558<setter>(sdl-touch-finger-event-finger-id-set! event val)</setter>
    15181559
    15191560TODO: Docs.
     
    15221563<procedure>(sdl-touch-finger-event-x event) → float</procedure>
    15231564<setter>(set! (sdl-touch-finger-event-x event) val)</setter>
    1524 <setter>(sdl-touch-finger-event-x-set! event)</setter>
     1565<setter>(sdl-touch-finger-event-x-set! event val)</setter>
    15251566
    15261567TODO: Docs.
     
    15291570<procedure>(sdl-touch-finger-event-y event) → float</procedure>
    15301571<setter>(set! (sdl-touch-finger-event-y event) val)</setter>
    1531 <setter>(sdl-touch-finger-event-y-set! event)</setter>
     1572<setter>(sdl-touch-finger-event-y-set! event val)</setter>
    15321573
    15331574TODO: Docs.
     
    15361577<procedure>(sdl-touch-finger-event-dx event) → float</procedure>
    15371578<setter>(set! (sdl-touch-finger-event-dx event) val)</setter>
    1538 <setter>(sdl-touch-finger-event-dx-set! event)</setter>
     1579<setter>(sdl-touch-finger-event-dx-set! event val)</setter>
    15391580
    15401581TODO: Docs.
     
    15431584<procedure>(sdl-touch-finger-event-dy event) → float</procedure>
    15441585<setter>(set! (sdl-touch-finger-event-dy event) val)</setter>
    1545 <setter>(sdl-touch-finger-event-dy-set! event)</setter>
     1586<setter>(sdl-touch-finger-event-dy-set! event val)</setter>
    15461587
    15471588TODO: Docs.
     
    15501591<procedure>(sdl-touch-finger-event-pressure event) → float</procedure>
    15511592<setter>(set! (sdl-touch-finger-event-pressure event) val)</setter>
    1552 <setter>(sdl-touch-finger-event-pressure-set! event)</setter>
     1593<setter>(sdl-touch-finger-event-pressure-set! event val)</setter>
    15531594
    15541595TODO: Docs.
     
    15581599===== sdl-user-event
    15591600
    1560 sdl-user-event is a variant of sdl-event that wraps a pointer to a
     1601sdl-user-event is a variant of sdl-event that wraps a pointer to an
    15611602[[https://wiki.libsdl.org/SDL_UserEvent|SDL_UserEvent]].
    15621603
     
    15641605<procedure>(sdl-user-event? obj) → boolean</procedure>
    15651606
    1566 Returns #t if {{obj}} is a sdl-user-event.
     1607Returns #t if {{obj}} is an sdl-user-event.
    15671608
    15681609
    15691610<procedure>(sdl-user-event-window-id event) → fixnum</procedure>
    15701611<setter>(set! (sdl-user-event-window-id event) val)</setter>
    1571 <setter>(sdl-user-event-window-id-set! event)</setter>
     1612<setter>(sdl-user-event-window-id-set! event val)</setter>
    15721613
    15731614TODO: Docs.
     
    15761617<procedure>(sdl-user-event-code event) → fixnum</procedure>
    15771618<setter>(set! (sdl-user-event-code event) val)</setter>
    1578 <setter>(sdl-user-event-code-set! event)</setter>
    1579 
    1580 TODO: Docs.
    1581 
    1582 
    1583 <procedure>(sdl-user-event-data1 event) → pointer</procedure>
    1584 <setter>(set! (sdl-user-event-data1 event) val)</setter>
    1585 <setter>(sdl-user-event-data1-set! event)</setter>
    1586 
    1587 TODO: Docs.
    1588 
    1589 
    1590 <procedure>(sdl-user-event-data2 event) → pointer</procedure>
    1591 <setter>(set! (sdl-user-event-data2 event) val)</setter>
    1592 <setter>(sdl-user-event-data2-set! event)</setter>
     1619<setter>(sdl-user-event-code-set! event val)</setter>
     1620
     1621TODO: Docs.
     1622
     1623
     1624<procedure>(sdl-user-event-data1-raw event) → pointer</procedure>
     1625<setter>(set! (sdl-user-event-data1-raw event) val)</setter>
     1626<setter>(sdl-user-event-data1-rawset! event val)</setter>
     1627
     1628TODO: Docs.
     1629
     1630
     1631<procedure>(sdl-user-event-data2-raw event) → pointer</procedure>
     1632<setter>(set! (sdl-user-event-data2-raw event) val)</setter>
     1633<setter>(sdl-user-event-data2-raw-set! event val)</setter>
    15931634
    15941635TODO: Docs.
     
    15981639===== sdl-window-event
    15991640
    1600 sdl-window-event is a variant of sdl-event that wraps a pointer to a
     1641sdl-window-event is a variant of sdl-event that wraps a pointer to an
    16011642[[https://wiki.libsdl.org/SDL_WindowEvent|SDL_WindowEvent]].
    16021643
     
    16041645<procedure>(sdl-window-event? obj) → boolean</procedure>
    16051646
    1606 Returns #t if {{obj}} is a sdl-window-event.
     1647Returns #t if {{obj}} is an sdl-window-event.
    16071648
    16081649
    16091650<procedure>(sdl-window-event-window-id event) → fixnum</procedure>
    16101651<setter>(set! (sdl-window-event-window-id event) val)</setter>
    1611 <setter>(sdl-window-event-window-id-set! event)</setter>
     1652<setter>(sdl-window-event-window-id-set! event val)</setter>
    16121653
    16131654TODO: Docs.
     
    16161657<procedure>(sdl-window-event-event event) → symbol</procedure>
    16171658<setter>(set! (sdl-window-event-event event) val)</setter>
    1618 <setter>(sdl-window-event-event-set! event)</setter>
     1659<setter>(sdl-window-event-event-set! event val)</setter>
    16191660
    16201661Returns a [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#window-event-types|window event type]] indicating what happened to the window.
     
    16231664<procedure>(sdl-window-event-event-raw event) → fixnum</procedure>
    16241665<setter>(set! (sdl-window-event-event-raw event) val)</setter>
    1625 <setter>(sdl-window-event-event-raw-set! event)</setter>
     1666<setter>(sdl-window-event-event-raw-set! event val)</setter>
    16261667
    16271668Returns an integer indicating what happened to the window.
     
    16311672<procedure>(sdl-window-event-data1 event) → fixnum</procedure>
    16321673<setter>(set! (sdl-window-event-data1 event) val)</setter>
    1633 <setter>(sdl-window-event-data1-set! event)</setter>
    1634 
    1635 TODO: Docs.
     1674<setter>(sdl-window-event-data1-set! event val)</setter>
     1675
     1676Get or set the sdl-window-event's "data1" field, as an integer. The
     1677meaning of this value depends on what kind of window event it was.
     1678E.g. if the window was resized, this will hold the new window width;
     1679if the window was moved, this will hold the new x position.
    16361680
    16371681
    16381682<procedure>(sdl-window-event-data2 event) → fixnum</procedure>
    16391683<setter>(set! (sdl-window-event-data2 event) val)</setter>
    1640 <setter>(sdl-window-event-data2-set! event)</setter>
    1641 
    1642 TODO: Docs.
     1684<setter>(sdl-window-event-data2-set! event val)</setter>
     1685
     1686Get or set the sdl-window-event's "data2" field, as an integer. The
     1687meaning of this value depends on what kind of window event it was.
     1688E.g. if the window was resized, this will hold the new window height;
     1689if the window was moved, this will hold the new y position.
    16431690
    16441691
     
    16461693==== sdl-finger
    16471694
    1648 sdl-finger is a record type that wraps a pointer to a
     1695sdl-finger is a record type that wraps a pointer to an
    16491696[[https://wiki.libsdl.org/SDL_Finger|SDL_Finger]] struct.
    16501697
     
    16521699<procedure>(sdl-finger? obj) → boolean</procedure>
    16531700
    1654 Returns #t if {{obj}} is a sdl-finger.
     1701Returns #t if {{obj}} is an sdl-finger.
    16551702
    16561703
     
    16781725==== sdl-joystick
    16791726
    1680 sdl-joystick is a record type that wraps a pointer to a
     1727sdl-joystick is a record type that wraps a pointer to an
    16811728[[https://wiki.libsdl.org/SDL_Joystick|SDL_Joystick]] struct.
    16821729
     
    16841731<procedure>(sdl-joystick? obj) → boolean</procedure>
    16851732
    1686 Returns #t if {{obj}} is a sdl-joystick.
     1733Returns #t if {{obj}} is an sdl-joystick.
    16871734
    16881735
     
    16901737==== sdl-joystick-guid?
    16911738
    1692 sdl-joystick-guid is a record type that wraps a pointer to a
     1739sdl-joystick-guid is a record type that wraps a pointer to an
    16931740[[https://wiki.libsdl.org/SDL_JoystickGetGUID|SDL_JoystickGUID]]
    16941741struct.
     
    16971744<procedure>(sdl-joystick-guid? obj) → boolean</procedure>
    16981745
    1699 Returns #t if {{obj}} is a sdl-joystick-guid.
     1746Returns #t if {{obj}} is an sdl-joystick-guid.
    17001747
    17011748
     
    17031750==== sdl-keysym
    17041751
    1705 sdl-keysym is a record type that wraps a pointer to a
     1752sdl-keysym is a record type that wraps a pointer to an
    17061753[[https://wiki.libsdl.org/SDL_Keysym|SDL_Keysym]] struct.
    17071754
     
    17091756<procedure>(sdl-keysym? obj) → boolean</procedure>
    17101757
    1711 Returns #t if {{obj}} is a sdl-keysym.
     1758Returns #t if {{obj}} is an sdl-keysym.
    17121759
    17131760
     
    17911838==== sdl-palette
    17921839
    1793 sdl-palette is a record type that wraps a pointer to a
     1840sdl-palette is a record type that wraps a pointer to an
    17941841[[https://wiki.libsdl.org/SDL_Palette|SDL_Palette]] struct.
    17951842
     
    17971844<procedure>(sdl-palette? obj) → boolean</procedure>
    17981845
    1799 Returns #t if {{obj}} is a sdl-palette.
     1846Returns #t if {{obj}} is an sdl-palette.
    18001847
    18011848
     
    18361883==== sdl-pixel-format
    18371884
    1838 sdl-pixel-format is a record type that wraps a pointer to a
     1885sdl-pixel-format is a record type that wraps a pointer to an
    18391886[[https://wiki.libsdl.org/SDL_PixelFormat|SDL_PixelFormat]] struct.
    18401887
     
    18421889<procedure>(sdl-pixel-format? obj) → boolean</procedure>
    18431890
    1844 Returns #t if {{obj}} is a sdl-pixel-format.
     1891Returns #t if {{obj}} is an sdl-pixel-format.
    18451892
    18461893
     
    18901937<setter>(sdl-pixel-format-palette-set! pixel-format palette)</setter>
    18911938
    1892 Returns the pixel format's palette (as a sdl-palette), or #f if it
     1939Returns the pixel format's palette (as an sdl-palette), or #f if it
    18931940does not have a palette. Only pixel formats with a bits-per-pixel of 8
    18941941or less can have a palette.
     
    19281975==== sdl-point
    19291976
    1930 sdl-point is a record type that wraps a pointer to a
     1977sdl-point is a record type that wraps a pointer to an
    19311978[[https://wiki.libsdl.org/SDL_Point|SDL_Point]] struct.
    19321979
     
    19341981<procedure>(sdl-point? obj) → boolean</procedure>
    19351982
    1936 Returns #t if {{obj}} is a sdl-point.
     1983Returns #t if {{obj}} is an sdl-point.
    19371984
    19381985
     
    20112058==== sdl-rect
    20122059
    2013 sdl-rect is a record type that wraps a pointer to a
     2060sdl-rect is a record type that wraps a pointer to an
    20142061[[https://wiki.libsdl.org/SDL_Rect|SDL_Rect]] struct.
    20152062
     
    20172064<procedure>(sdl-rect? obj) → boolean</procedure>
    20182065
    2019 Returns #t if {{obj}} is a sdl-rect.
     2066Returns #t if {{obj}} is an sdl-rect.
    20202067
    20212068
     
    21102157==== sdl-rwops
    21112158
    2112 sdl-rwops is a record type that wraps a pointer to a
     2159sdl-rwops is a record type that wraps a pointer to an
    21132160[[https://wiki.libsdl.org/SDL_RWops|SDL_RWops]] struct.
    21142161
     
    21162163<procedure>(sdl-rwops? obj) → boolean</procedure>
    21172164
    2118 Returns #t if {{obj}} is a sdl-rwops.
     2165Returns #t if {{obj}} is an sdl-rwops.
    21192166
    21202167
     
    21322179==== sdl-surface
    21332180
    2134 sdl-surface is a record type that wraps a pointer to a
     2181sdl-surface is a record type that wraps a pointer to an
    21352182[[https://wiki.libsdl.org/SDL_Surface|SDL_Surface]] struct.
    21362183
     
    21382185<procedure>(sdl-surface? obj) → boolean</procedure>
    21392186
    2140 Returns #t if {{obj}} is a sdl-surface.
     2187Returns #t if {{obj}} is an sdl-surface.
    21412188
    21422189
     
    21822229==== sdl-sys-wm-info
    21832230
    2184 sdl-sys-wm-info is a record type that wraps a pointer to a
     2231sdl-sys-wm-info is a record type that wraps a pointer to an
    21852232[[https://wiki.libsdl.org/SDL_SysWMinfo|SDL_SysWMinfo]] struct.
    21862233
     
    21882235<procedure>(sdl-sys-wm-info? obj) → boolean</procedure>
    21892236
    2190 Returns #t if {{obj}} is a sdl-sys-wm-info.
     2237Returns #t if {{obj}} is an sdl-sys-wm-info.
    21912238
    21922239
     
    21942241==== sdl-sys-wm-msg
    21952242
    2196 sdl-sys-wm-msg is a record type that wraps a pointer to a
     2243sdl-sys-wm-msg is a record type that wraps a pointer to an
    21972244[[https://wiki.libsdl.org/SDL_SysWMmsg|SDL_SysWMmsg]] struct.
    21982245
     
    22002247<procedure>(sdl-sys-wm-msg? obj) → boolean</procedure>
    22012248
    2202 Returns #t if {{obj}} is a sdl-sys-wm-msg.
     2249Returns #t if {{obj}} is an sdl-sys-wm-msg.
    22032250
    22042251
     
    22062253==== sdl-texture
    22072254
    2208 sdl-texture is a record type that wraps a pointer to a
     2255sdl-texture is a record type that wraps a pointer to an
    22092256[[https://wiki.libsdl.org/SDL_Texture|SDL_Texture]] struct.
    22102257
     
    22122259<procedure>(sdl-texture? obj) → boolean</procedure>
    22132260
    2214 Returns #t if {{obj}} is a sdl-texture.
     2261Returns #t if {{obj}} is an sdl-texture.
    22152262
    22162263
     
    22182265==== sdl-version
    22192266
    2220 sdl-version is a record type that wraps a pointer to a
     2267sdl-version is a record type that wraps a pointer to an
    22212268[[https://wiki.libsdl.org/SDL_version|SDL_version]] struct.
    22222269
     
    22242271<procedure>(sdl-version? obj) → boolean</procedure>
    22252272
    2226 Returns #t if {{obj}} is a sdl-version.
     2273Returns #t if {{obj}} is an sdl-version.
    22272274
    22282275
     
    23102357==== sdl-window
    23112358
    2312 sdl-window is a record type that wraps a pointer to a
     2359sdl-window is a record type that wraps a pointer to an
    23132360[[https://wiki.libsdl.org/SDL_CreateWindow|SDL_Window]] struct.
    23142361
     
    23162363<procedure>(sdl-window? obj) → boolean</procedure>
    23172364
    2318 Returns #t if {{obj}} is a sdl-window.
     2365Returns #t if {{obj}} is an sdl-window.
    23192366
    23202367
     
    23242371==== General / Miscellaneous
    23252372
    2326 <procedure>(sdl-init! flags-list) → fixnum</procedure>
     2373<procedure>(sdl-init! #!optional flags-list) → fixnum</procedure>
    23272374
    23282375See [[https://wiki.libsdl.org/SDL_Init|SDL_Init]].
    23292376Returns zero if successful.
    23302377
    2331 {{flags-list}} must be a list of one or more [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#init-flags|init flag symbols]]:
     2378{{flags-list}} defaults to {{'(everything)}}. It must be a list of one or more [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#init-flags|init flag symbols]]:
    23322379
    23332380* {{'timer}}
     
    23612408
    23622409
    2363 <procedure>(sdl-was-init flags-list) → list of symbols</procedure>
     2410<procedure>(sdl-was-init #!optional flags-list) → list of symbols</procedure>
    23642411
    23652412See [[https://wiki.libsdl.org/SDL_WasInit|SDL_WasInit]].
    23662413
    2367 {{flags-list}} must be a list of one or more [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#init-flags|init flag]] symbols.
     2414{{flags-list}} defaults to {{'(everything)}}. It must be a list of one or more [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#init-flags|init flag]] symbols.
    23682415
    23692416
     
    24312478See [[https://wiki.libsdl.org/SDL_GetVersion|SDL_GetVersion]].
    24322479
    2433 Returns a sdl-version instance containing the version number of SDL
     2480Returns an sdl-version instance containing the version number of SDL
    24342481that the sdl2 egg is currently using. (This may be different than the
    24352482version it was compiled with.)
     
    24402487See [[https://wiki.libsdl.org/SDL_VERSION|SDL_VERSION]].
    24412488
    2442 Returns a sdl-version instance containing the version number of SDL
     2489Returns an sdl-version instance containing the version number of SDL
    24432490that the sdl2 egg was compiled with. (This may be different than the
    24442491version it is currently using.)
     
    24732520See [[https://wiki.libsdl.org/SDL_GetRGB|SDL_GetRGB]].
    24742521
    2475 Returns multiple values.
     2522This procedure returns multiple values.
    24762523
    24772524
     
    24802527See [[https://wiki.libsdl.org/SDL_GetRGBA|SDL_GetRGBA]].
    24812528
    2482 Returns multiple values.
     2529This procedure returns multiple values.
    24832530
    24842531
     
    24962543<procedure>(sdl-palette-colors palette) → vector of sdl-colors </procedure>
    24972544
    2498 Return a vector of all the colors in the palette.
     2545Return all colors in the palette, as a Scheme vector of sdl-colors.
    24992546
    25002547
     
    25032550See [[https://wiki.libsdl.org/SDL_SetPaletteColors|SDL_SetPaletteColors]].
    25042551
    2505 Replace some or all of the colors in the palette.
     2552Set multiple colors in the palette. {{colors-vec}} must be a Scheme
     2553vector of sdl-colors.
    25062554
    25072555Returns zero if successful.
     
    25402588
    25412589
    2542 <procedure>(sdl-flush-events! min-type max-type)</procedure>
     2590<procedure>(sdl-flush-events! #!optional min-type max-type)</procedure>
    25432591
    25442592See [[https://wiki.libsdl.org/SDL_FlushEvents|SDL_FlushEvents]].
    25452593
    2546 {{min-type}} and {{max-type}} must be [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#event-types|event type symbols]] or corresponding integers.
     2594{{min-type}} and {{max-type}} must be [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#event-types|event type symbols]] or corresponding integers. If omitted, {{min-type}} defaults to {{'first}} and {{max-type}} defaults to {{'last}}.
    25472595
    25482596
     
    25542602
    25552603
    2556 <procedure>(sdl-has-events? min-type max-type) → boolean</procedure>
     2604<procedure>(sdl-has-events? #!optional min-type max-type) → boolean</procedure>
    25572605
    25582606See [[https://wiki.libsdl.org/SDL_HasEvents|SDL_HasEvents]].
    25592607
    2560 {{min-type}} and {{max-type}} must be [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#event-types|event type symbols]] or corresponding integers.
     2608{{min-type}} and {{max-type}} must be [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#event-types|event type symbols]] or corresponding integers. If omitted, {{min-type}} defaults to {{'first}} and {{max-type}} defaults to {{'last}}.
    25612609
    25622610
     
    25752623procedure removes the events from the SDL event queue.
    25762624
    2577 {{min-type}} and {{max-type}} must be [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#event-types|event type symbols]] or corresponding integers.
     2625{{min-type}} and {{max-type}} must be [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#event-types|event type symbols]] or corresponding integers. If omitted, {{min-type}} defaults to {{'first}} and {{max-type}} defaults to {{'last}}.
    25782626
    25792627
     
    25872635procedure does not remove the events from the SDL event queue.
    25882636
    2589 {{min-type}} and {{max-type}} must be an [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#event-types|event type symbol]] or corresponding integer.
     2637{{min-type}} and {{max-type}} must be an [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#event-types|event type symbol]] or corresponding integer. If omitted, {{min-type}} defaults to {{'first}} and {{max-type}} defaults to {{'last}}.
    25902638
    25912639
     
    26372685
    26382686
    2639 <procedure>(sdl-register-events! numevents) → fixnum</procedure>
    2640 
    2641 See [[https://wiki.libsdl.org/SDL_RegisterEvents|SDL_RegisterEvents]].
     2687<procedure>(sdl-register-events! event-symbols) → list of pairs</procedure>
     2688
     2689Register zero or more symbols as new user event types. After
     2690registration, the given symbols may be used as event types, e.g. with
     2691{{sdl-event-type-set!}}. The symbols will be associated with the
     2692sdl-user-event variant of sdl-event.
     2693
     2694{{event-symbols}} must be a list of symbols that are not already being
     2695used as event types. If any symbol is already being used, or if any
     2696member of the list is not a symbol, an error will be signalled and
     2697none of the new event types will be registered.
     2698
     2699There are 32767 user event type numbers available to register. Each
     2700given symbol will be automatically assigned a distinct number. If
     2701registering the given symbols would cause you to run out of available
     2702numbers, this procedure will signal an error, and none of the new
     2703event types will be registered.
     2704
     2705This procedure returns an association list (list of pairs) of each of
     2706the new event type symbols (as the pair car) with its assigned number
     2707(as the pair cdr).
     2708
     2709This procedure is based on [[https://wiki.libsdl.org/SDL_RegisterEvents|SDL_RegisterEvents]].
     2710
    26422711
    26432712
     
    27302799
    27312800
    2732 <procedure>(sdl-gl-get-drawable-size window) → [w h]</procedure>
     2801<procedure>(sdl-gl-get-drawable-size window) → [width height]</procedure>
    27332802
    27342803See [[https://wiki.libsdl.org/SDL_GL_GetDrawableSize|SDL_GL_GetDrawableSize]].
    2735 Returns multiple values.
     2804
     2805This procedure returns multiple values.
    27362806
    27372807Requires SDL 2.0.1 or higher. Signals an error if the compiled version
     
    27532823
    27542824See [[https://wiki.libsdl.org/SDL_GL_SetSwapInterval|SDL_GL_SetSwapInterval]].
     2825
    27552826Returns zero if successful
    27562827
     
    28332904See [[https://wiki.libsdl.org/SDL_JoystickGetBall|SDL_JoystickGetBall]].
    28342905
    2835 Returns multiple values.
     2906This procedure returns multiple values. Returns #f for both values if
     2907the ball values cannot be retrieved (e.g. because {{ball-num}} is
     2908invalid for the joystick).
    28362909
    28372910
     
    30613134See [[https://wiki.libsdl.org/SDL_EnclosePoints|SDL_EnclosePoints]].
    30623135
    3063 {{points}} must be a list of sdl-points. {{clip}} is either a sdl-rect
     3136{{points}} must be a list of sdl-points. {{clip}} is either an sdl-rect
    30643137(to ignore points outside the clip rect) or #f (to consider all
    3065 points). {{result-rect}} is either a sdl-rect (which will be modified
     3138points). {{result-rect}} is either an sdl-rect (which will be modified
    30663139and returned) or #f (a new sdl-rect will be returned).
    30673140
     
    30693142
    30703143; any-enclosed? : #t if any points were enclosed, or #f if all points were clipped
    3071 ; result-rect : a sdl-rect instance that encloses all matching points. If {{result-rect}} arg was given, that rect is modified and returned. Otherwise a newly allocated rect is returned.
     3144; result-rect : an sdl-rect instance that encloses all matching points. If {{result-rect}} arg was given, that rect is modified and returned. Otherwise a newly allocated rect is returned.
    30723145
    30733146
     
    33023375See [[https://wiki.libsdl.org/SDL_FillRect|SDL_FillRect]].
    33033376
    3304 {{rect}} may be a sdl-rect to fill part of the surface, or #f to fill
     3377{{rect}} may be an sdl-rect to fill part of the surface, or #f to fill
    33053378the entire surface.
    33063379
     
    33323405
    33333406Like {{sdl-surface-ref}}, but returns a mapped color (an integer)
    3334 instead of a sdl-color. You can use {{sdl-get-rgba}} to convert the
     3407instead of an sdl-color. You can use {{sdl-get-rgba}} to convert the
    33353408mapped color to color fields.
    33363409
     
    33413414Set the color of the specified pixel on the surface. Automatically
    33423415locks and unlocks the surface if needed. Signals an error if {{x}} or
    3343 {{y}} is out of bounds. {{color}} can be either a sdl-color or a
     3416{{y}} is out of bounds. {{color}} can be either an sdl-color or a
    33443417mapped color (an integer). Note: This procedure ignores the surface's
    33453418clip rect (if any).
     
    33733446
    33743447Like {{sdl-surface-color-key}}, but returns a mapped color (an
    3375 integer) instead of a sdl-color.
     3448integer) instead of an sdl-color.
    33763449
    33773450
     
    33813454See [[https://wiki.libsdl.org/SDL_SetColorKey|SDL_SetColorKey]].
    33823455
    3383 {{color}} can be a sdl-color, a mapped color (an integer), or #f to
     3456{{color}} can be an sdl-color, a mapped color (an integer), or #f to
    33843457disable color keying.
    33853458
     
    34293502See [[https://wiki.libsdl.org/SDL_GetSurfaceColorMod|SDL_GetSurfaceColorMod]].
    34303503
    3431 Returns multiple values.
     3504This procedure returns multiple values.
    34323505
    34333506
     
    34373510See [[https://wiki.libsdl.org/SDL_SetSurfaceColorMod|SDL_SetSurfaceColorMod]].
    34383511
    3439 {{rgb}} can be a list {{(r g b)}} of color values, or a sdl-color (the
     3512{{rgb}} can be a list {{(r g b)}} of color values, or an sdl-color (the
    34403513sdl-color's "a" field will be ignored).
    34413514
     
    34663539==== Timer
    34673540
    3468 <procedure>(sdl-delay milliseconds)</procedure>
     3541<procedure>(sdl-delay! milliseconds)</procedure>
    34693542
    34703543See [[https://wiki.libsdl.org/SDL_Delay|SDL_Delay]].
     3544
     3545'''NOTE:''' This will (probably) cause all CHICKEN threads to pause,
     3546not only the thread that this is called from.
    34713547
    34723548
     
    36613737See [[https://wiki.libsdl.org/SDL_GetWindowMaximumSize|SDL_GetWindowMaximumSize]].
    36623738
     3739This procedure returns multiple values.
     3740
    36633741
    36643742<setter>(set! (sdl-window-maximum-size window) size)</setter>
    36653743<setter>(sdl-window-maximum-size-set! window size)</setter>
    36663744
     3745See [[https://wiki.libsdl.org/SDL_SetWindowMaximumSize|SDL_SetWindowMaximumSize]].
     3746
    36673747{{size}} must be a list of integers {{(width height)}}.
    36683748
     
    36713751
    36723752See [[https://wiki.libsdl.org/SDL_GetWindowMinimumSize|SDL_GetWindowMinimumSize]].
     3753
     3754This procedure returns multiple values.
    36733755
    36743756
     
    36763758<setter>(sdl-window-minimum-size-set! window size)</setter>
    36773759
     3760See [[https://wiki.libsdl.org/SDL_SetWindowMinimumSize|SDL_SetWindowMinimumSize]].
     3761
    36783762{{size}} must be a list of integers {{(width height)}}.
    36793763
     
    36873771
    36883772See [[https://wiki.libsdl.org/SDL_GetWindowPosition|SDL_GetWindowPosition]].
     3773
     3774This procedure returns multiple values.
    36893775
    36903776
     
    36923778<setter>(sdl-window-position-set! window pos)</setter>
    36933779
     3780See [[https://wiki.libsdl.org/SDL_SetWindowPosition|SDL_SetWindowPosition]].
     3781
    36943782{{pos}} must be a list of integers {{(x y)}}.
    36953783
     
    36983786
    36993787See [[https://wiki.libsdl.org/SDL_GetWindowSize|SDL_GetWindowSize]].
     3788
     3789This procedure returns multiple values.
    37003790
    37013791
Note: See TracChangeset for help on using the changeset viewer.