summaryrefslogtreecommitdiff
path: root/sdl2/bindings.scm
Commit message (Collapse)AuthorAgeFilesLines
* Add SDL_GetScancodeFromKey binding.David Thompson2021-10-241-0/+3
|
* Add support for SDL_SetWindowIcon.Leo Prikler2021-06-301-0/+3
| | | | | | * sdl/bindings.scm (sdl-set-window-icon): New variable. * sdl/video.scm (set-window-icon!): New variable. * doc/api.texi (Windows): Document it.
* Add support for texture blend modes.Leo Prikler2021-06-151-0/+3
| | | | | * sdl2/bindings.scm (sdl-set-texture-blend-mode): New variable. * sdl2/render.scm (set-texture-blend-mode!): New variable.
* input: mouse: Add bindings for showing/hiding/moving the mouse cursor.David Thompson2021-05-131-1/+15
|
* bindings: Add SDL_MOUSEWHEEL_* constants.David Thompson2021-05-131-0/+3
|
* Add fallback method for loading shared libraries.David Thompson2021-04-301-1/+1
|
* Add support for hints.Leo Prikler2021-01-161-0/+14
| | | | | | | * sdl2/bindings.scm (SDL_HINT_DEFAULT, SDL_HINT_NORMAL, SDL_HINT_OVERRIDE) (sdl-set-hint-with-priority, sdl-get-hint): New variables. * sdl2/hints.scm: New file. * doc/api.texi: Add Hints.
* Add SDL_GetPerformanceCounter and SDL_GetPerformanceFrequency bindings.David Thompson2020-12-151-0/+6
|
* render: Add SDL_QueryTexture binding.Leo Prikler2020-12-151-0/+3
| | | | | | * sdl2/bindings.scm (sdl-query-texture): New variable. * sdl2/render.scm (query-texture): New variable. * doc/api.texi: Document it here.
* video: Add more bindings.Leo Prikler2020-12-021-0/+15
| | | | | | | | | | | * sdl2/bindings.scm (sdl-window-get-minimum-size) (sdl-window-get-maximum-size, sdl-window-set-minimum-size) (sdl-window-set-maximum-size, sdl-window-set-resizable): New procedures. * sdl2/video.scm (window-minimum-size, window-maximum-size) (set-window-minimum-size!, set-window-maximum-size!) (set-window-resizable!): New procedures. * doc/api.texi: Document new (sdl2 video) bindings.
* render: Add more bindings.Leo Prikler2020-12-021-0/+24
| | | | | | | | | | | | * sdl2/bindings.scm (sdl-render-get-integer-scale, sdl-render-get-scale) (sdl-render-get-logical-size, sdl-render-get-viewport) (sdl-render-set-integer-scale, sdl-render-set-scale) (sdl-render-set-logical-size, sdl-render-set-viewport): New procedures. * sdl2/render.scm (render-get-integer-scale, render-get-logical-size) (render-get-scale, render-get-viewport, render-set-integer-scale) (render-set-logical-size, render-set-scale, render-set-viewport): New procedures. * doc/api.texi: Document new (sdl2 render) bindings.
* Add blend mode bindings.Leo Prikler2020-09-301-0/+35
|
* render: Add texture color/alpha mod bindings.Hugo Hörnquist2019-06-091-0/+12
| | | | | | | | | * sdl2/bindings.scm (sdl-set-texture-color-mod, sdl-get-texture-color-mod, sdl-set-texture-alpha-mod, sdl-get-texture-alpha-mood): New procedures. * sdl2/render.scm (set-texture-color-mod!, set-texture-alpha-mod!, get-texture-color-mod, get-texture-alpha-mod): New procedures. * doc/api.texi: Document new procedures.
* render: Add SDL_SetRenderTarget bindings.Hugo Hörnquist2019-06-061-0/+13
| | | | | | | | | | | * sdl2/bindings.scm (SDL_TEXTUREACCESS_STATIC, SDL_TEXTUREACCESS_STREAMING, SDL_TEXTUREACCESS_TARGET): New variables. (sdl-create-texture, sdl-set-render-target, sdl-get-render-target): New procedures. * sdl2/render.scm (symbol->sdl-access-format, make-texture, set-render-target!, get-render-target): New procedures. * doc/api.texi: Document new procedures.
* render: Add SDL_RenderDrawRect and SDL_RenderFillRect bindings.Hugo Hörnquist2019-06-041-0/+12
| | | | | | | | * sdl2/bindings.scm (sdl-render-draw-rect, sdl-render-draw-rects, sdl-render-fill-rect, sdl-render-fill-rects): New procedures. * sdl2/render.scm (render-draw-rect, render-draw-rects, render-fill-rect, render-fill-rects): New procedures. * doc/api.texi: Document new procedures.
* render: Add SDL_RenderDrawLines binding.Pierre-Antoine Rouby2019-05-311-0/+3
| | | | | | * sdl2/bindings.scm (sdl-render-draw-lines): New procedure. * sdl2/render.scm (render-draw-lines): New procedure. * doc/api.texi: Document it.
* render: Add SDL_RenderDrawPoints binding.Pierre-Antoine Rouby2019-05-311-0/+3
| | | | | | * sdl2/bindings.scm (sdl-render-draw-points): New procedure. * sdl2/render.scm (render-draw-points): New procedure. * doc/api.texi (Rendering): Document it.
* render: Add SDL_DestroyTexture binding.Pierre-Antoine Rouby2019-05-271-0/+3
| | | | | | * sdl2/bindings.scm (sdl-destroy-texture): New procedure. * sdl2/render.scm (delete-texture!): New procedure. * doc/api.texi (Renderer): Document it.
* render: Add SDL_RenderDrawPoint binding.Pierre-Antoine Rouby2019-05-271-0/+4
| | | | | | * sdl2/bindings.scm (sdl-render-draw-line): New procedure. * sdl2/render.scm (render-draw-line): New procedure. * doc/api.texi (Rendering): Document it.
* render: Add SDL_RenderDrawLine binding.Pierre-Antoine Rouby2019-05-231-0/+3
| | | | | | * sdl2/bindings.scm (sdl-render-draw-line): New procedure. * sdl2/render.scm (render-draw-line): New procedure. * doc/api.texi: Document it.
* render: Add SDL_RenderCopyEx binding.Pierre-Antoine Rouby2019-05-211-0/+6
| | | | | | | | * sdl2/bindings.scm (sdl-point): New variable. (sdl-render-copy-ex): New procedure. * sdl2/render.scm (render-copy): Add optional arguments, angle and center. * doc/api.texi (Rendering): Document it.
* surface: Add SDL_FillRect binding.David Thompson2019-01-081-0/+3
| | | | | | * sdl2/bindings.scm (sdl-fill-rect): New procedure. * sdl2/surface.scm (fill-rect): New procedure. * doc/api.texi (Surfaces): Document it.
* surface: Add SDL_BlitScaled binding.David Thompson2019-01-081-0/+3
| | | | | | * sdl2/bindings.scm (sdl-blit-scaled): New procedure. * sdl2/surface.scm (blit-scaled): New procedure. * doc/api.texi (Surfaces): Document it.
* surface: Add SDL_BlitSurface binding.David Thompson2019-01-071-0/+3
| | | | | * sdl2/bindings.scm (sdl-blit-surface): New procedure. * sdl2/surface.scm (blit-surface): New procedure.
* Add binding for SDL_SetRenderDrawColor.Eero Leno2018-08-211-0/+4
| | | | | * sdl2/bindings.scm (sdl-set-render-draw-color): New procedure. * sdl2/render.scm (set-render-draw-color): New procedure.
* Add binding for SDL_GetMouseState.David Thompson2017-11-101-0/+2
| | | | | | No high-level wrapper yet, though. * sdl2/bindings.scm (sdl-get-mouse-state): New procedure.
* Add clipboard bindings.David Thompson2017-11-101-0/+14
| | | | | | | * sdl2/bindings.scm (sdl-get-clipboard-text, sdl-set-clipboard-text, sdl-has-clipboard-text): New procedures. * sdl2/clipboard.scm: New file. * Makefile.am (SOURCES): Add it.
* Add SDL_GameControllerAddMappingsFromRW binding.David Thompson2017-11-101-0/+3
| | | | | | | * sdl2/bindings.scm (sdl-game-controller-add-mappings-from-file): New procedure. * sdl2/input/game-controller.scm (load-game-controller-mappings!): New procedure.
* render: Add srcrect and dstrect arguments to render-copy.Jona2017-06-061-0/+3
| | | | | * sdl2/bindings.scm (sdl-rect): New variable. * sdl2/render.scm (render-copy): Add srcrect and dstrect arguments.
* input: Add keyboard module.David Thompson2017-04-011-0/+3
| | | | | | * sdl2/bindings.scm (sdl-get-keyboard-state): New procedure. * sdl2/input/keyboard.scm: New file. * Makefile.am (SOURCES): Add it.
* Add bindings for game controller input.David Thompson2016-12-311-0/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sdl2.scm (%default-init-flags): Add 'joystick' to default flags. (sdl-init): Translate to 'joystick' to SDL2 init bit flag. * sdl2/bindings.scm (SDL_INIT_JOYSTICK, SDL_JOYSTICK_POWER_UNKNOWN, SDL_JOYSTICK_POWER_EMPTY, SDL_JOYSTICK_POWER_LOW, SDL_JOYSTICK_POWER_MEDIUM, SDL_JOYSTICK_POWER_FULL, SDL_JOYSTICK_POWER_WIRED, SDL_JOYSTICK_POWER_MAX, SDL_CONTROLLER_AXIS_INVALID, SDL_CONTROLLER_AXIS_LEFTX, SDL_CONTROLLER_AXIS_LEFTY, SDL_CONTROLLER_AXIS_RIGHTX, SDL_CONTROLLER_AXIS_RIGHTY, SDL_CONTROLLER_AXIS_TRIGGERLEFT, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, SDL_CONTROLLER_AXIS_MAX, SDL_CONTROLLER_BUTTON_INVALID, SDL_CONTROLLER_BUTTON_A, SDL_CONTROLLER_BUTTON_B, SDL_CONTROLLER_BUTTON_X, SDL_CONTROLLER_BUTTON_Y, SDL_CONTROLLER_BUTTON_BACK, SDL_CONTROLLER_BUTTON_GUIDE, SDL_CONTROLLER_BUTTON_START, SDL_CONTROLLER_BUTTON_LEFTSTICK, SDL_CONTROLLER_BUTTON_RIGHTSTICK, SDL_CONTROLLER_BUTTON_LEFTSHOULDER, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, SDL_CONTROLLER_BUTTON_DPAD_UP, SDL_CONTROLLER_BUTTON_DPAD_DOWN, SDL_CONTROLLER_BUTTON_DPAD_LEFT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT, SDL_CONTROLLER_BUTTON_MAX): New variables. (sdl-joystick-open, sdl-joystick-close, sdl-joystick-current-power-level, sdl-joystick-event-state, sdl-joystick-from-instance-id, sdl-joystick-get-attached, sdl-joystick-get-axis, sdl-joystick-get-ball, sdl-joystick-get-button, sdl-joystick-get-device-guid, sdl-joystick-get-guide, sdl-joystick-get-guid-from-string, sdl-joystick-get-guid-string, sdl-joystick-get-hat, sdl-joystick-instance-id, sdl-joystick-name, sdl-joystick-name-for-index, sdl-joystick-num-axes, sdl-joystick-num-balls, sdl-joystick-num-buttons, sdl-joystick-num-hats, sdl-num-joysticks, sdl-joystick-update, sdl-game-controller-add-mapping, sdl-game-controller-open, sdl-game-controller-close, sdl-game-controller-event-state, sdl-game-controller-from-instance-id, sdl-game-controller-get-attached, sdl-game-controller-get-axis, sdl-game-controller-get-axis-from-string, sdl-game-controller-get-string-from-axis, sdl-game-controller-get-string-for-axis, sdl-game-controller-get-button, sdl-game-controller-get-button-from-string, sdl-game-controller-get-string-from-button, sdl-game-controller-get-joystick, sdl-game-controller-mapping, sdl-game-controller-mapping-for-guid, sdl-game-controller-name, sdl-game-controller-name-for-index, sdl-game-controller-update, sdl-is-game-controller): New procedures. * sdl2/events.scm (make-joystick-ball-event, joystick-ball-event?, joystick-ball-event-timestamp, joystick-ball-event-which, joystick-ball-event-ball, joystick-ball-event-x-rel, joystick-ball-event-y-rel, make-joystick-hat-event, joystick-hat-event?, joystick-hat-event-timestamp, joystick-hat-event-which, joystick-hat-event-hat, joystick-hat-event-value, make-joystick-device-event, joystick-device-event?, joystick-device-event-timestamp, joystick-device-event-which, joystick-device-event-action, make-controller-axis-event, controller-axis-event?, controller-axis-event-timestamp, controller-axis-event-which, controller-axis-event-axis, controller-axis-event-value, make-controller-button-event, controller-button-event?, controller-button-down-event?, controller-button-up-event?, controller-button-event-timestamp, controller-button-event-which, controller-button-event-button, controller-button-event-pressed?, make-controller-device-event, controller-device-event?, controller-device-event-timestamp, controller-device-event-which, controller-device-event-action, parse-joystick-ball-event, parse-joystick-hat-event, parse-joystick-device-event, parse-controller-axis-event, parse-controller-button-event, parse-controller-device-event): New procedures. (poll-event): Parse joystick/controller events. * sdl2/input/joystick.scm: New file. * sdl2/input/game-controller.scm: New file. * Makefile.am (SOURCES): Add them
* Add bindings for text input event handling.David Thompson2016-12-301-1/+15
| | | | | | | | | | | * sdl2/bindings.scm (sdl-start-text-input, sdl-stop-text-input, sdl-is-text-input-active): New procedures. * sdl2/events.scm (<text-input-event>): New record type. (make-text-input-event, text-input-event?, text-input-event-timestamp, text-input-event-window-id, text-input-event-text, parse-text-input-event): New procedures. * sdl2/input/text.scm: New file. * Makefile.am (SOURCES): Add it.
* surface: Add SDL_CreateRGBSurfaceFrom binding.David Thompson2016-12-161-0/+4
|
* surface: Add SDL_CreateRGBSurface binding.David Thompson2016-12-161-0/+4
|
* video: Add SDL_SetWindowFullscreen binding.David Thompson2016-01-091-0/+3
| | | | | * sdl2/bindings.scm (sdl-set-window-fullscreen): New procedure. * sdl2/video.scm (set-window-fullscreen!): New procedure.
* video: Add SDL_GL_SetSwapInterval binding.David Thompson2016-01-081-0/+3
| | | | | * sdl2/bindings.scm (sdl-gl-set-swap-interval): New procedure. * sdl2/video.scm (set-gl-swap-interval!): New procedure.
* video: Add SDL_GL_SetAttribute binding.David Thompson2016-01-021-0/+28
| | | | | * sdl2/bindings.scm (sdl-get-set-attribute): New procedure. * sdl2/video.scm (set-gl-attribute!): New procedure.
* bindings: Use define-public instead of #:export.David Thompson2015-12-221-57/+27
|
* window: Allow unspecified and centered window positions.David Thompson2015-12-221-0/+3
| | | | | | | | * sdl2/bindings.scm (SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_UNDEFINED): New variables. * sdl2/video.scm (make-window): Accept #f and 'center' as valid coordinates for undefined and centered positioning, respectively. Use an undefined position by default.
* surface: Add binding for SDL_ConvertSurfaceFormat.David Thompson2015-12-221-0/+45
| | | | | | * sdl2/bindings.scm: Add a ton of pixel format constants. * sdl2/surface.scm: (symbol->sdl-pixel-format, convert-surface-format): New procedures.
* Add SDL2_mixer bindings.David Thompson2015-12-201-0/+20
| | | | | | | * sdl2/bindings.scm: Add "AUDIO_*" constants. * sdl2/bindings/mixer.scm: New file. * sdl2/mixer.scm: New file. * Makefile.am (SOURCES): Add new files.
* Add color type.David Thompson2015-12-171-0/+3
| | | | | | | * sdl2/bindings.scm (sdl-color): New variable. * sdl2.scm (<color>): New record type. (make-color, color?, color-r, color-g, color-b, color-a, color->struct): New procedures.
* events: mouse: Add motion event bindings.David Thompson2015-12-161-0/+10
| | | | | | | | | | | | * sdl2/bindings.scm (button-mask): New procedure. (SDL_BUTTON_LMASK, SDL_BUTTON_RMASK, SDL_BUTTON_MMASK, SDL_BUTTON_X1MASK, SDL_BUTTON_X2MASK): New variables. * sdl2/events.scm (<mouse-motion-event>): New record type. (make-mouse-motion-event mouse-motion-event?, mouse-motion-event-timestamp, mouse-motion-event-window-id, mouse-motion-event-which, mouse-motion-event-buttons, mouse-motion-event-x, mouse-motion-event-y, mouse-motion-event-x-rel, mouse-motion-event-y-rel, parse-mouse-motion-event): New procedures.
* events: Add mouse button event bindings.David Thompson2015-12-161-0/+11
| | | | | | | | | | | | | * sdl2/bindings.scm (SDL_BUTTON_LEFT, SDL_BUTTON_RIGHT, SDL_BUTTON_MIDDLE, SDL_BUTTON_X1, SDL_BUTTON_X2): New variables. * sdl2/events.scm (<mouse-button-event>): New record type. (make-mouse-button-event, mouse-button-event?, mouse-button-down-event?, mouse-button-up-event?, mouse-button-event-timestamp, mouse-button-event-window-id, mouse-button-event-which, mouse-button-event-button, mouse-button-event-pressed?, mouse-button-event-clicks, mouse-button-event-x, parse-mouse-button-event): New procedures. (poll-event): Add support for mouse button events.
* Add event bindings.David Thompson2015-12-161-0/+584
| | | | | | | | | | | | So far, only window and keyboard events are handled. More to come in future patches. This patch adds a *ton* of constants that I'm not going to mention in this log because it would be too damn long. * sdl2/bindings.scm (sdl-poll-event): New procedure. * sdl2/events.scm: New file. * Makefile.am (SOURCES): Add it.
* Add a few surface bindings.David Thompson2015-12-131-0/+19
| | | | | | | * sdl2/bindings.scm (sdl-rw-from-file, sdl-free-surface, sdl-load-bmp-rw): New procedures. * sdl2/surface.scm: New file. * Makefile.am (SOURCES): Add it.
* Add renderer bindings.David Thompson2015-12-131-1/+29
| | | | | | | | | | * sdl2/bindings.scm (SDL_RENDERER_SOFTWARE, SDL_RENDERER_ACCELERATED, SDL_RENDERER_PRESENTVSYNC, SDL_RENDERER_TARGETTEXTURE): New variables. (sdl-create-renderer, sdl-destroy-renderer, sdl-render-clear, sdl-render-present, sdl-render-copy, sdl-create-texture-from-surface): New procedures. * sdl2/render.scm: New file. * Makefile.am (SOURCES): Add it.
* Add SDL_GetTicks binding.David Thompson2015-12-121-0/+8
| | | | | * sdl2/bindings.scm (sdl-get-ticks): New procedure. * sdl2.scm (sdl-ticks): New procedure.
* Initial commit.David Thompson2015-10-061-0/+194
Let's do this!