Changeset 32917 in project


Ignore:
Timestamp:
11/18/15 02:49:16 (5 years ago)
Author:
John Croisant
Message:

Summary: sdl2: Many procedures now signal exceptions. Added pixel-format-enum-to-masks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/sdl2

    r32911 r32917  
    171171   Usually both forms are equivalent, although in some cases (e.g. {{palette-colors-set!}}) the {{___-set!}} form accepts additional optional arguments that are not possible with the {{(set! ...)}} form.
    172172
     173* Some procedures signal an exception of kind {{(exn sdl2)}} if an error occurs or the operation fails.
     174  This is instead of returning an integer error code or null pointer.
     175
    173176* Some procedures return multiple values.
    174177  For example, {{window-size}} returns two values, the width and height.
     
    213216
    214217
    215 <procedure>(init! #!optional flags-list) â†’ fixnum</procedure>
     218<procedure>(init! #!optional flags-list)</procedure>
    216219
    217220Initialize SDL.
     
    231234
    232235See [[https://wiki.libsdl.org/SDL_Init|SDL_Init]].
    233 Returns zero if successful.
    234 
    235 
    236 <procedure>(init-subsystem! flags-list) → fixnum</procedure>
     236
     237Signals an exception of kind {{(exn sdl2)}} if initialization fails.
     238
     239
     240<procedure>(init-subsystem! flags-list)</procedure>
    237241
    238242See [[https://wiki.libsdl.org/SDL_InitSubSystem|SDL_InitSubSystem]].
    239 Returns zero if successful.
    240243
    241244{{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.
     245
     246Signals an exception of kind {{(exn sdl2)}} if initialization fails.
    242247
    243248
     
    339344{{min-type}} defaults to {{'first}} and {{max-type}} defaults to {{'last}}, which means all event types match by default.
    340345
     346Both procedures signal an exception of kind {{(exn sdl2)}} if an error occurs.
     347
    341348
    342349<procedure>(poll-event! #!optional result-event) → sdl2:event</procedure>
     
    357364
    358365
    359 <procedure>(push-event! event) → fixnum</procedure>
     366<procedure>(push-event! event) → boolean</procedure>
    360367
    361368See [[https://wiki.libsdl.org/SDL_PushEvent|SDL_PushEvent]].
    362369
    363 Returns 1 if successful.
     370Returns #t if the event was pushed onto the event queue, or #f if the event was discarded,
     371e.g. because the event type is disabled (see {{event-state}}).
     372
     373Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    364374
    365375
     
    402412
    403413There are 32767 user event type numbers available to register.
    404 Each symbol in {{event-symbols}} will be assigned a distinct, sequential number.
     414Each symbol in {{event-symbols}} will be assigned a sequential number.
    405415If there are not enough remaining numbers to register all the symbols in {{event-symbols}},
    406 this procedure will signal an error, and none of the new event types will be registered.
    407 
    408 This procedure returns an association list (list of pairs) of each of the new event type symbols (as the pair car) with its assigned number (as the pair cdr).
     416this procedure will signal an exception of kind {{(exn sdl2)}}, and none of the new event types will be registered.
     417
     418This procedure returns a list of pairs, with the car of each pair being a new event type symbol, and the cdr of each pair being that symbol's assigned number.
    409419
    410420This procedure is based on [[https://wiki.libsdl.org/SDL_RegisterEvents|SDL_RegisterEvents]].
     
    425435See [[https://wiki.libsdl.org/SDL_GetTouchDevice|SDL_GetTouchDevice]].
    426436
     437Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     438
    427439
    428440<procedure>(get-touch-finger touch-id index) → sdl2:finger</procedure>
     
    430442See [[https://wiki.libsdl.org/SDL_GetTouchFinger|SDL_GetTouchFinger]].
    431443
     444Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     445
    432446
    433447
     
    438452See [[https://wiki.libsdl.org/SDL_NumJoysticks|SDL_NumJoysticks]].
    439453
     454Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     455
    440456
    441457<procedure>(joystick-open! index) → sdl2:joystick</procedure>
    442458
    443459See [[https://wiki.libsdl.org/SDL_JoystickOpen|SDL_JoystickOpen]].
     460
     461Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    444462
    445463
     
    461479
    462480The setters enable (if {{state}} is #t) or disable (if {{state}} is #f) joytsick events.
     481'''WARNING:''' Calling the setters may delete all events currently in the event queue.
     482
     483These procedures signal an exception of kind {{(exn sdl2)}} if an error occurs.
    463484
    464485See [[https://wiki.libsdl.org/SDL_JoystickEventState|SDL_JoystickEventState]].
     
    474495See [[https://wiki.libsdl.org/SDL_JoystickNumAxes|SDL_JoystickNumAxes]].
    475496
     497Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     498
    476499
    477500<procedure>(joystick-num-balls joystick) → fixnum</procedure>
     
    479502See [[https://wiki.libsdl.org/SDL_JoystickNumBalls|SDL_JoystickNumBalls]].
    480503
     504Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     505
    481506
    482507<procedure>(joystick-num-buttons joystick) → fixnum</procedure>
     
    484509See [[https://wiki.libsdl.org/SDL_JoystickNumButtons|SDL_JoystickNumButtons]].
    485510
     511Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     512
    486513
    487514<procedure>(joystick-num-hats joystick) → fixnum</procedure>
     
    489516See [[https://wiki.libsdl.org/SDL_JoystickNumHats|SDL_JoystickNumHats]].
    490517
     518Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     519
    491520
    492521<procedure>(joystick-get-axis joystick axis-num) → fixnum</procedure>
     
    494523See [[https://wiki.libsdl.org/SDL_JoystickGetAxis|SDL_JoystickGetAxis]].
    495524
     525Signals an exception of kind {{(exn bounds)}} if {{axis-num}} is less than 0 or greater than the last axis on the joystick (see {{joystick-num-axiss}}).
     526
    496527
    497528<procedure>(joystick-get-ball joystick ball-num) → [dx dy]</procedure>
     
    499530See [[https://wiki.libsdl.org/SDL_JoystickGetBall|SDL_JoystickGetBall]].
    500531
    501 This procedure returns multiple values. Returns #f for both values if
    502 the ball values cannot be retrieved (e.g. because {{ball-num}} is
    503 invalid for the joystick).
     532This procedure returns multiple values.
     533
     534Signals an exception of kind {{(exn bounds)}} if {{ball-num}} is less than 0 or greater than the last trackball on the joystick (see {{joystick-num-balls}}).
     535Signals an exception of kind {{(exn sdl2)}} if some other error occurs.
    504536
    505537
     
    508540See [[https://wiki.libsdl.org/SDL_JoystickGetButton|SDL_JoystickGetButton]].
    509541
     542Signals an exception of kind {{(exn bounds)}} if {{button-num}} is less than 0 or greater than the last button on the joystick (see {{joystick-num-buttons}}).
    510543
    511544<procedure>(joystick-get-hat joystick hat-num) → symbol</procedure>
     
    517550* {{joystick-get-hat-raw}} returns an integer.
    518551
     552Both procedures signal an exception of kind {{(exn bounds)}} if {{hat-num}} is less than 0 or greater than the last hat switch on the joystick (see {{joystick-num-hats}}).
     553
    519554
    520555<procedure>(joystick-instance-id joystick) → fixnum</procedure>
     
    522557See [[https://wiki.libsdl.org/SDL_JoystickInstanceID|SDL_JoystickInstanceID]].
    523558
    524 
    525 <procedure>(joystick-name joystick) → string</procedure>
     559Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     560
     561
     562<procedure>(joystick-name joystick) → string or #f</procedure>
    526563
    527564See [[https://wiki.libsdl.org/SDL_JoystickName|SDL_JoystickName]].
    528565
    529 
    530 <procedure>(joystick-name-for-index device-index) → string</procedure>
     566Returns #f if no name can be found.
     567
     568
     569<procedure>(joystick-name-for-index device-index) → string or #f</procedure>
    531570
    532571See [[https://wiki.libsdl.org/SDL_JoystickNameForIndex|SDL_JoystickNameForIndex]].
     572
     573Returns #f if no name can be found.
    533574
    534575
     
    686727See [[https://wiki.libsdl.org/SDL_GL_CreateContext|SDL_GL_CreateContext]].
    687728
     729Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     730
    688731
    689732<procedure>(gl-delete-context! gl-context)</procedure>
     
    692735
    693736
    694 <procedure>(gl-make-current! window gl-context) â†’ fixnum</procedure>
     737<procedure>(gl-make-current! window gl-context)</procedure>
    695738
    696739See [[https://wiki.libsdl.org/SDL_GL_MakeCurrent|SDL_GL_MakeCurrent]].
    697740
     741Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     742
    698743
    699744<procedure>(gl-get-current-window) → sdl2:window</procedure>
     
    701746See [[https://wiki.libsdl.org/SDL_GL_GetCurrentWindow|SDL_GL_GetCurrentWindow]].
    702747
     748Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     749
    703750
    704751<procedure>(gl-get-current-context) → sdl2:gl-context</procedure>
     
    706753See [[https://wiki.libsdl.org/SDL_GL_GetCurrentContext|SDL_GL_GetCurrentContext]].
    707754
     755Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     756
    708757
    709758<procedure>(gl-attribute attr) → value</procedure>
    710 <setter>(set! (gl-attribute attr) value) â†’ fixnum</setter>
    711 <setter>(gl-attribute-set! attr value) â†’ fixnum</setter>
     759<setter>(set! (gl-attribute attr) value)</setter>
     760<setter>(gl-attribute-set! attr value)</setter>
    712761
    713762See [[https://wiki.libsdl.org/SDL_GL_GetAttribute|SDL_GL_GetAttribute]]
     
    724773* Otherwise, the value is an integer.
    725774
    726 The setters return zero if successful.
     775The getter and the setters signal an exception of kind {{(exn sdl2)}} if an error occurs.
    727776
    728777
     
    759808and [[https://wiki.libsdl.org/SDL_GL_SetSwapInterval|SDL_GL_SetSwapInterval]].
    760809
    761 The setters return zero if successful.
     810The setters signal an exception of kind {{(exn sdl2)}} if an error occurs.
    762811
    763812
     
    778827The setters set the given index of the palette to a copy of the given sdl2:color.
    779828
     829These procedures signal an exception of kind {{(exn bounds)}} if the given index is out of bounds.
     830
    780831
    781832<procedure>(palette-colors palette) → vector of sdl2:colors </procedure>
    782833<procedure>(palette-colours palette) → vector of sdl2:colors </procedure>
    783 <setter>(set! (palette-colors palette) colors-vec) → fixnum</setter>
    784 <setter>(set! (palette-colours palette) colors-vec) → fixnum</setter>
    785 <setter>(palette-colors-set! colors-vec #!optional start) → fixnum</setter>
    786 <setter>(palette-colours-set! colors-vec #!optional start) → fixnum</setter>
     834<setter>(set! (palette-colors palette) colors-vec) → boolean</setter>
     835<setter>(set! (palette-colours palette) colors-vec) → boolean</setter>
     836<setter>(palette-colors-set! colors-vec #!optional firstcolor) → boolean</setter>
     837<setter>(palette-colours-set! colors-vec #!optional firstcolor) → boolean</setter>
    787838
    788839{{palette-colors}} and {{palette-colours}} return copies of all colors in the palette, as a Scheme vector of managed sdl2:colors.
    789840
    790841The setters set multiple colors in the palette to copies of the given colors.
     842See [[https://wiki.libsdl.org/SDL_SetPaletteColors|SDL_SetPaletteColors]].
     843
    791844{{colors-vec}} must be a Scheme vector of sdl2:colors.
    792845
    793 {{palette-colors-set!}} and {{palette-colours-set!}} accept an optional start index, which defaults to 0. The {{set!}} form cannot accept the start index.
    794 
    795 See [[https://wiki.libsdl.org/SDL_SetPaletteColors|SDL_SetPaletteColors]].
    796 
    797 The setters return zero if successful.
     846{{firstcolor}} specifies the first index of the palette to set.
     847I.e., palette index {{firstcolor}} will be set to the first color in {{colors-vec}},
     848palette index {{firstcolor + 1}} will be set to the second color, and so on.
     849{{firstcolor}} defaults to 0.
     850Signals an exception of kind {{(exn bounds)}} if {{firstcolor}} is out of bounds.
     851
     852The {{set!}} form cannot accept the {{firstcolor}} arguments.
     853
     854The setters return #t if every color in {{colors-vec}} was used, or #f if some colors were not used,
     855e.g. because there were more colors in the vector than could fit in the palette.
    798856
    799857
     
    815873
    816874These procedures return multiple values.
     875
     876
     877<procedure>(pixel-format-enum-to-masks format-enum) → [bpp rmask gmask bmask amask]</procedure>
     878
     879See [[https://wiki.libsdl.org/SDL_PixelFormatEnumToMasks|SDL_PixelFormatEnumToMasks]].
     880
     881{{format-enum}} must be a [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#pixel-formats|pixel format symbol]] or equivalent integer.
     882
     883This procedure returns multiple values:
     884
     885; bpp   : The color depth (bits per pixel) of the format.
     886; rmask : The red mask of the format.
     887; gmask : The green mask of the format.
     888; bmask : The blue mask of the format.
     889; amask : The alpha mask of the format.
     890
     891Signals an exception of kind {{(exn sdl2)}} if conversion was not possible.
     892
    817893
    818894
     
    898974the sdl2:rwops, such as {{load-bmp-rw}}.
    899975
     976Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     977
    900978
    901979<procedure>(rw-from-const-mem pointer) → sdl2:rwops</procedure>
     
    907985the sdl2:rwops, such as {{load-bmp-rw}}.
    908986
     987Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     988
    909989
    910990<procedure>(rw-from-mem pointer) → sdl2:rwops</procedure>
     
    915995{{rw-close!}} or one of the procedures that can automatically close
    916996the sdl2:rwops, such as {{load-bmp-rw}}.
     997
     998Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    917999
    9181000
     
    9241006{{rw-close!}} or one of the procedures that can automatically close
    9251007the sdl2:rwops, such as {{load-bmp-rw}}.
     1008
     1009Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    9261010
    9271011You can also use this procedure to create a sdl2:rwops from a
     
    9531037automatically close the sdl2:rwops, such as {{load-bmp-rw}}.
    9541038
     1039Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     1040
    9551041'''CAUTION:''' Creating a sdl2:rwops from a string in CHICKEN-managed
    9561042memory is unstable: the string might be garbage collected or moved in
     
    9701056
    9711057
    972 <procedure>(rw-close! rwops) â†’ fixnum</procedure>
     1058<procedure>(rw-close! rwops)</procedure>
    9731059
    9741060See [[https://wiki.libsdl.org/SDL_RWclose|SDL_RWclose]].
     
    9791065close files opened with {{rw-from-file}}, though.)
    9801066
    981 Returns zero if successful.
     1067Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    9821068
    9831069
     
    9931079
    9941080See {{make-surface}} for a more convenient interface.
     1081
     1082Signals an exception of kind {{(exn sdl2)}} if the surface cannot be created.
    9951083
    9961084
     
    10031091See [[https://wiki.libsdl.org/SDL_CreateRGBSurfaceFrom|SDL_CreateRGBSurfaceFrom]].
    10041092
     1093Signals an exception of kind {{(exn sdl2)}} if the surface cannot be created.
     1094
    10051095
    10061096<procedure>(convert-surface surface pixel-format) → sdl2:surface</procedure>
     
    10131103* {{convert-surface}} returns a managed sdl2:surface.
    10141104* {{convert-surface*}} returns an unmanaged sdl2:surface, which must be freed with {{free-surface!}} when you are done with it.
     1105
     1106Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    10151107
    10161108
     
    10301122* {{load-bmp*}} returns an unmanaged sdl2:surface, which must be freed with {{free-surface!}} when you are done with it.
    10311123
     1124Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     1125
    10321126
    10331127<procedure>(load-bmp-rw rwops #!optional close?) → sdl2:surface</procedure>
     
    10511145* {{load-bmp-rw*}} returns an unmanaged sdl2:surface, which must be freed with {{free-surface!}} when you are done with it.
    10521146
     1147Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     1148
    10531149
    10541150<procedure>(save-bmp! surface filepath) → fixnum</procedure>
     
    10561152See [[https://wiki.libsdl.org/SDL_SaveBMP|SDL_SaveBMP]].
    10571153
    1058 Returns zero if successful.
     1154Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    10591155
    10601156
     
    10671163omitted, {{rwops}} will not be closed.
    10681164
    1069 Returns zero if successful.
     1165Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    10701166
    10711167
     
    10761172and [[https://wiki.libsdl.org/SDL_UnlockSurface|SDL_UnlockSurface]].
    10771173
    1078 {{lock-surface!}} returns zero if successful.
     1174{{lock-surface!}} signals an exception of kind {{(exn sdl2)}} if an error occurs.
    10791175
    10801176
     
    10881184See [[https://wiki.libsdl.org/SDL_BlitSurface|SDL_BlitSurface]].
    10891185
    1090 Returns zero if successful. May modify dest-rect.
     1186May modify dest-rect.
     1187
     1188Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    10911189
    10921190
     
    10951193See [[https://wiki.libsdl.org/SDL_BlitScaled|SDL_BlitScaled]].
    10961194
    1097 Returns zero if successful. May modify dest-rect.
     1195May modify dest-rect.
     1196
     1197Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    10981198
    10991199
     
    11081208returned by {{map-rgba}}).
    11091209
    1110 Returns zero if successful.
     1210Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    11111211
    11121212
     
    11201220returned by {{map-rgba}}).
    11211221
    1122 Returns zero if successful.
     1222Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    11231223
    11241224
     
    11291229
    11301230Get or set the color of the specified pixel on the surface.
    1131 Signals an error if {{x}} or {{y}} is out of bounds.
    11321231
    11331232* {{surface-ref}} returns an sdl2:color.
     
    11351234* The setters accept either an sdl2:color or a mapped color.
    11361235
    1137 The setters automatically lock and unlock the surface if needed.
    1138 They ignore the surface's clip rect.
     1236These procedures automatically lock and unlock the surface if needed.
     1237They signal an exception of kind {{(exn sdl2)}} if the surface cannot be locked.
     1238
     1239These procedures signal an exception of kind {{(exn bounds)}} if {{x}} or {{y}} is out of bounds.
     1240
     1241The setters ignore the surface's clip rect.
    11391242
    11401243
     
    11571260<procedure>(surface-color-key-raw surface) → fixnum or #f</procedure>
    11581261<procedure>(surface-colour-key-raw surface) → fixnum or #f</procedure>
    1159 <setter>(set! (surface-color-key surface) color) â†’ boolean</setter>
    1160 <setter>(set! (surface-colour-key surface) color) â†’ boolean</setter>
    1161 <setter>(surface-color-key-set! surface color) â†’ boolean</setter>
    1162 <setter>(surface-colour-key-set! surface color) â†’ boolean</setter>
     1262<setter>(set! (surface-color-key surface) color)</setter>
     1263<setter>(set! (surface-colour-key surface) color)</setter>
     1264<setter>(surface-color-key-set! surface color)</setter>
     1265<setter>(surface-colour-key-set! surface color)</setter>
    11631266
    11641267Get or set the sdl2:surface's color key.
     
    11691272* {{surface-color-key}} and {{surface-colour-key}} return an sdl2:color if the surface has a color key, or #f if the surface does not have a color key.
    11701273* {{surface-color-key-raw}} and {{surface-colour-key-raw}} return a mapped color (an integer) if the surface has a color key, or #f if the surface does not have a color key.
    1171 * The setters accept either an sdl2:color, a mapped color (an integer), or #f to disable color keying. The setters return zero if successful.
     1274* The setters accept either an sdl2:color, a mapped color (an integer), or #f to disable color keying.
     1275
     1276These procedures signal an exception of kind {{(exn sdl2)}} if an error occurs.
    11721277
    11731278
     
    11791284and [[https://wiki.libsdl.org/SDL_SetSurfaceAlphaMod|SDL_SetSurfaceAlphaMod]].
    11801285
    1181 The setters return zero if successful.
     1286These procedures signal an exception of kind {{(exn sdl2)}} if an error occurs.
    11821287
    11831288
    11841289<procedure>(surface-blend-mode surface) → symbol</procedure>
    11851290<procedure>(surface-blend-mode-raw surface) → fixnum</procedure>
    1186 <setter>(set! (surface-blend-mode surface) mode) â†’ fixnum</setter>
    1187 <setter>(surface-blend-mode-set! surface mode) â†’ fixnum</setter>
     1291<setter>(set! (surface-blend-mode surface) mode)</setter>
     1292<setter>(surface-blend-mode-set! surface mode)</setter>
    11881293
    11891294See [[https://wiki.libsdl.org/SDL_GetSurfaceBlendMode|SDL_GetSurfaceBlendMode]]
     
    11971302* {{surface-blend-mode-raw}} returns an integer.
    11981303* The setters accept either a symbol or integer.
    1199   The setters return zero if successful.
     1304
     1305These procedures signal an exception of kind {{(exn sdl2)}} if an error occurs.
     1306
    12001307
    12011308
     
    12141321The setters accept either a list {{(r g b)}} of color values, or an sdl2:color (the sdl2:color's "a" field will be ignored).
    12151322
     1323These procedures signal an exception of kind {{(exn sdl2)}} if an error occurs.
     1324
    12161325
    12171326<procedure>(surface-palette surface) → sdl2:palette or #f</procedure>
     
    12221331It is equivalent to {{(compose pixel-format-palette surface-format)}}.
    12231332
     1333The setters signal an exception of kind {{(exn sdl2)}} if an error occurs.
     1334
    12241335See [[https://wiki.libsdl.org/SDL_SetSurfacePalette|SDL_SetSurfacePalette]].
    12251336
    12261337
    1227 <setter>(surface-rle-set! surface enable)</setter>
    1228 
     1338<setter>(surface-rle-set! surface enable?)</setter>
     1339
     1340Enable RLE acceleration if {{enable?}} is #t, or disable RLE acceleration if {{enable?}} is #f.
    12291341See [[https://wiki.libsdl.org/SDL_SetSurfaceRLE|SDL_SetSurfaceRLE]].
    12301342
    1231 {{enable}} is #t to enable RLE acceleration or #f to disable it.
     1343Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    12321344
    12331345
     
    13281440
    13291441
    1330 <procedure>(update-window-surface! window) â†’ fixnum</procedure>
     1442<procedure>(update-window-surface! window)</procedure>
    13311443
    13321444See [[https://wiki.libsdl.org/SDL_UpdateWindowSurface|SDL_UpdateWindowSurface]].
    13331445
    1334 Returns zero if successful.
    1335 
    1336 
    1337 <procedure>(update-window-surface-rects! window rects) â†’ fixnum</procedure>
     1446Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     1447
     1448
     1449<procedure>(update-window-surface-rects! window rects)</procedure>
    13381450
    13391451See [[https://wiki.libsdl.org/SDL_UpdateWindowSurfaceRects|SDL_UpdateWindowSurfaceRects]].
     
    13411453{{rects}} must be a list of sdl2:rects.
    13421454
    1343 Returns zero if successful.
     1455Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    13441456
    13451457
     
    13871499
    13881500<procedure>(window-brightness window) → float</procedure>
    1389 <setter>(set! (window-brightness window) brightness) â†’ fixnum</setter>
    1390 <setter>(window-brightness-set! window brightness) â†’ fixnum</setter>
     1501<setter>(set! (window-brightness window) brightness)</setter>
     1502<setter>(window-brightness-set! window brightness)</setter>
    13911503
    13921504See [[https://wiki.libsdl.org/SDL_GetWindowBrightness|SDL_GetWindowBrightness]]
    13931505and [[https://wiki.libsdl.org/SDL_SetWindowBrightness|SDL_SetWindowBrightness]].
    13941506
    1395 The setters return zero if successful.
     1507The setters signal an exception of kind {{(exn sdl2)}} if an error occurs.
    13961508
    13971509
     
    14001512See [[https://wiki.libsdl.org/SDL_GetWindowDisplayIndex|SDL_GetWindowDisplayIndex]].
    14011513
     1514Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     1515
    14021516
    14031517<procedure>(window-display-mode window) → sdl2:display-mode</procedure>
    1404 <setter>(set! (window-display-mode window) display-mode) â†’ fixnum</setter>
    1405 <setter>(window-display-mode-set! window display-mode) â†’ fixnum</setter>
     1518<setter>(set! (window-display-mode window) display-mode)</setter>
     1519<setter>(window-display-mode-set! window display-mode)</setter>
    14061520
    14071521See [[https://wiki.libsdl.org/SDL_GetWindowDisplayMode|SDL_GetWindowDisplayMode]]
    14081522and [[https://wiki.libsdl.org/SDL_SetWindowDisplayMode|SDL_SetWindowDisplayMode]].
    14091523
    1410 The setters return zero if successful.
     1524These procedures signal an exception of kind {{(exn sdl2)}} if an error occurs.
    14111525
    14121526
     
    14251539
    14261540Get or set the sdl2:window's fullscreen mode.
     1541See [[https://wiki.libsdl.org/SDL_SetWindowFullscreen|SDL_SetWindowFullscreen]].
    14271542
    14281543{{window-fullscreen}} returns one of the following values:
     
    14341549The setters accept any of the above values, or #t (which means the same as {{'fullscreen}}), or an equivalent integer value.
    14351550
    1436 See [[https://wiki.libsdl.org/SDL_SetWindowFullscreen|SDL_SetWindowFullscreen]].
     1551The setters signal an exception of kind {{(exn sdl2)}} if an error occurs.
    14371552
    14381553
     
    15121627See [[https://wiki.libsdl.org/SDL_GetWindowSurface|SDL_GetWindowSurface]].
    15131628
     1629Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     1630
    15141631
    15151632<procedure>(window-title window) → string</procedure>
     
    15651682See [[https://wiki.libsdl.org/SDL_GetClipboardText|SDL_GetClipboardText]].
    15661683
    1567 
    1568 <procedure>(set-clipboard-text! text) → fixnum</procedure>
     1684Signals an exception of kind {{(exn sdl2)}} if an error occurs.
     1685
     1686
     1687<procedure>(set-clipboard-text! text)</procedure>
    15691688
    15701689See [[https://wiki.libsdl.org/SDL_SetClipboardText|SDL_SetClipboardText]].
    1571 Returns zero if successful.
     1690
     1691Signals an exception of kind {{(exn sdl2)}} if an error occurs.
    15721692
    15731693
     
    34293549* {{make-palette*}} returns an unmanaged sdl2:palette, which must be freed with {{free-palette!}} when you are done with it.
    34303550
     3551Both procedures signal an exception of kind {{(exn sdl2)}} if an error occurs.
     3552
    34313553
    34323554<procedure>(free-palette! palette)</procedure>
     
    34693591* {{make-pixel-format}} returns a managed sdl2:pixel-format.
    34703592* {{make-pixel-format*}} returns an unmanaged sdl2:pixel-format, which must be freed with {{free-pixel-format!}} when you are done with it.
     3593
     3594Both procedures signal an exception of kind {{(exn sdl2)}} if an error occurs.
    34713595
    34723596
     
    34993623
    35003624See [[https://wiki.libsdl.org/SDL_SetPixelFormatPalette|SDL_SetPixelFormatPalette]].
     3625
     3626The setters signal an exception of kind {{(exn sdl2)}} if an error occurs.
    35013627
    35023628
Note: See TracChangeset for help on using the changeset viewer.