Changeset 33122 in project


Ignore:
Timestamp:
01/23/16 22:56:51 (4 years ago)
Author:
John Croisant
Message:

sdl2: More 0.2.0 docs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/sdl2

    r33110 r33122  
    15161516
    15171517Get or set the event's "x" field, as an integer (possibly negative) indicating the amount the wheel scrolled horizontally.
    1518 Positive numbers indicate scrolling to the right, negative numbers indicate scrolling to the left.
     1518Positive numbers normally indicate scrolling to the right,
     1519negative numbers indicate scrolling to the left.
     1520But if the "direction" field is set to {{'flipped}} in SDL 2.0.4 or higher,
     1521the meaning of this field is reversed.
    15191522
    15201523
     
    15241527
    15251528Get or set the event's "y" field, as an integer (possibly negative) indicating the amount the wheel scrolled vertically.
    1526 Positive numbers indicate scrolling away from the user, negative numbers indicate scrolling toward the user.
    1527 
     1529Positive numbers normally indicate scrolling away from the user,
     1530negative numbers indicate scrolling toward the user.
     1531But if the "direction" field is set to {{'flipped}} in SDL 2.0.4 or higher,
     1532the meaning of this field is reversed.
     1533
     1534
     1535<procedure>(mouse-wheel-event-direction event) → symbol</procedure>
     1536<setter>(set! (mouse-wheel-event-direction event) val)</setter>
     1537<setter>(mouse-wheel-event-direction-set! event val)</setter>
     1538
     1539Get or set the event's "direction" field, as one of the following symbols:
     1540
     1541; {{'normal}} : "Normal" scrolling mode.
     1542; {{'flipped}} : "Flipped" or "natural" scrolling mode. You can multiple the "x" and "y" field values by -1 to get the "normal" values.
     1543
     1544This procedure is available in '''sdl2 egg version 0.2.0 and higher'''.
     1545It requires '''SDL 2.0.4 or higher'''.
     1546It signals an error if the compiled version of SDL is not high enough.
     1547Use the [[#version-feature-identifiers|{{libSDL-2.0.4+}} feature identifier]]
     1548to check before calling this procedure.
    15281549
    15291550
     
    22132234
    22142235
     2236<procedure>(joystick-from-instance-id id) → sdl2:joystick</procedure>
     2237
     2238See [[https://wiki.libsdl.org/SDL_JoystickFromInstanceID|SDL_JoystickFromInstanceID]].
     2239
     2240'''NOTE:''' The returned joystick will be a new sdl2:joystick record pointing to the address of the existing joystick.
     2241It will be {{equal?}} to other sdl2:joystick records for the same joystick, but not {{eq?}}.
     2242
     2243This procedure is available in '''sdl2 egg version 0.2.0 and higher'''.
     2244It requires '''SDL 2.0.4 or higher'''.
     2245It signals an error if the compiled version of SDL is not high enough.
     2246Use the [[#version-feature-identifiers|{{libSDL-2.0.4+}} feature identifier]]
     2247to check before calling this procedure.
     2248
     2249
    22152250<procedure>(joystick-update!)</procedure>
    22162251
     
    22812316
    22822317See [[https://wiki.libsdl.org/SDL_JoystickGetAttached|SDL_JoystickGetAttached]].
     2318
     2319
     2320<procedure>(joystick-current-power-level joystick) → symbol</procedure>
     2321
     2322See [[https://wiki.libsdl.org/SDL_JoystickCurrentPowerLevel|SDL_JoystickCurrentPowerLevel]].
     2323
     2324Returns a [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#joystick-power-level|joystick power level enum symbol]]:
     2325
     2326* {{'unknown}}
     2327* {{'empty}}
     2328* {{'low}}
     2329* {{'medium}}
     2330* {{'full}}
     2331* {{'wired}}
     2332* {{'max}}
     2333
     2334This procedure is available in '''sdl2 egg version 0.2.0 and higher'''.
     2335It requires '''SDL 2.0.4 or higher'''.
     2336It signals an error if the compiled version of SDL is not high enough.
     2337Use the [[#version-feature-identifiers|{{libSDL-2.0.4+}} feature identifier]]
     2338to check before calling this procedure.
    22832339
    22842340
     
    26242680
    26252681* If {{attr}} is {{'context-flags}}, the value will be a list of zero or more [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#opengl-context-flags|OpenGL context flag symbols]] will be returned. (The setter also accepts an equivalent integer bitfield.)
     2682
     2683* If {{attr}} is {{'context-release-flags}}, the value will be an [[https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/docs/enums.md#opengl-context-release-flags|OpenGL context release flag symbol]]: {{'none}} or {{'flush}}. (This attribute requires '''SDL 2.0.4 and higher''' and '''sdl2 egg version 0.2.0 or higher'''.)
    26262684
    26272685* Otherwise, the value is an integer.
     
    45874645See [[https://wiki.libsdl.org/SDL_GetWindowFromID|SDL_GetWindowFromID]].
    45884646
     4647'''NOTE:''' The returned window will be a new sdl2:window record pointing to the address of the existing window.
     4648It will be {{equal?}} to other sdl2:window records for the same window, but not {{eq?}}.
     4649
     4650In '''sdl2 egg version 0.2.0 and higher''', this procedure signals an exception
     4651of kind {{(exn sdl2)}} if there is no window with the given ID.
     4652In earlier egg versions, this procedure returned a null sdl2:window.
     4653
    45894654
    45904655<procedure>(update-window-surface! window)</procedure>
     
    47184783See [[https://wiki.libsdl.org/SDL_GetWindowGrab|SDL_GetWindowGrab]]
    47194784and [[https://wiki.libsdl.org/SDL_SetWindowGrab|SDL_SetWindowGrab]].
     4785
     4786
     4787<procedure>(grabbed-window) → sdl2:window or #f</procedure>
     4788
     4789Returns the sdl2:window that currently has input grab, or #f if no window has input grab.
     4790See [[https://wiki.libsdl.org/SDL_GetGrabbedWindow|SDL_GetGrabbedWindow]].
     4791
     4792'''NOTE:''' The returned window will be a new sdl2:window record pointing to the address of the existing window.
     4793It will be {{equal?}} to other sdl2:window records for the same window, but not {{eq?}}.
     4794
     4795This procedure is available in '''sdl2 egg version 0.2.0 and higher'''.
     4796It requires '''SDL 2.0.4 or higher'''.
     4797It signals an error if the compiled version of SDL is not high enough.
     4798Use the [[#version-feature-identifiers|{{libSDL-2.0.4+}} feature identifier]]
     4799to check before calling this procedure.
    47204800
    47214801
Note: See TracChangeset for help on using the changeset viewer.