summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update README.v0.2.0David Thompson2016-12-311-3/+8
|
* Bump to version 0.2.0.David Thompson2016-12-311-1/+1
|
* Add bindings for game controller input.David Thompson2016-12-316-1/+684
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-304-4/+92
| | | | | | | | | | | * 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-162-0/+24
|
* surface: Add SDL_CreateRGBSurface binding.David Thompson2016-12-162-1/+22
|
* image: Add IMG_SavePNG binding.David Thompson2016-12-162-1/+11
|
* guix: Fix build.v0.1.2David Thompson2016-08-101-2/+27
| | | | Include only Git files in the build.
* guix: Use local-file for source field.David Thompson2016-08-091-43/+36
|
* README: Add more Guix-specific instructions.David Thompson2016-06-011-0/+9
|
* guix: Update development snapshot.David Thompson2016-06-011-41/+42
|
* Bump version to 0.1.2.David Thompson2016-06-011-1/+1
|
* Install modules to correct directory based on Guile version.David Thompson2016-02-101-2/+2
|
* Allow building with Guile 2.2.David Thompson2016-02-101-1/+2
|
* video: Add SDL_SetWindowFullscreen binding.David Thompson2016-01-092-0/+18
| | | | | * sdl2/bindings.scm (sdl-set-window-fullscreen): New procedure. * sdl2/video.scm (set-window-fullscreen!): New procedure.
* video: Fix typo in set-gl-attribute!David Thompson2016-01-091-1/+1
| | | | | * sdl2/video.scm (set-gl-attribute!): s/contet-minor-version/context-minor-version/
* video: Add SDL_GL_SetSwapInterval binding.David Thompson2016-01-082-1/+24
| | | | | * 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-022-1/+83
| | | | | * sdl2/bindings.scm (sdl-get-set-attribute): New procedure. * sdl2/video.scm (set-gl-attribute!): New procedure.
* build: Add 'publish' make target.David Thompson2016-01-011-0/+7
| | | | No more remembering how I sign and upload things. ;)
* Bump to v0.1.1.v0.1.1David Thompson2016-01-011-1/+1
|
* surface: Fix SDL_Surface struct parsing.David Thompson2016-01-012-20/+24
| | | | | | | | | | | | | | | | The code worked fine on Guile 2.0.11, but Guile master revealed how bad it was to use 'sizeof' to calculate byte offsets into structs due to the padding calculations it does. On Guile master, the offset for surface height and pitch were the same, and that lead to bad news when trying to use that incorrectly parsed data to inspect the pixel buffer. * sdl2/surface.scm (%width-offset, %height-offset, %pitch-offset) (%pixels-offset): Delete. (%surface-types): New variable. (surface-parse-match): New syntax. (surface-width, surface-height, surface-pitch, surface-pixels): Use new struct parsing method. * .dirlocals.el: Add new indenting rule.
* Update Guix package recipe.v0.1.0David Thompson2015-12-221-2/+2
|
* build: Distribute example files.David Thompson2015-12-221-1/+3
|
* bindings: Use define-public instead of #:export.David Thompson2015-12-221-57/+27
|
* window: Allow unspecified and centered window positions.David Thompson2015-12-222-4/+19
| | | | | | | | * 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.
* Change version to 0.1.0.David Thompson2015-12-222-2/+2
|
* Add blank TODO file.David Thompson2015-12-221-0/+0
|
* Update README.David Thompson2015-12-221-16/+50
|
* Update Guix package recipe.David Thompson2015-12-221-2/+2
|
* surface: Fix convert-surface-format.David Thompson2015-12-221-1/+1
| | | | | | | Was trying to wrap the wrong thing. -_- * sdl2/surface.scm (convert-surface-format): Wrap the new pointer, not the old surface object. Oops.
* surface: Add binding for SDL_ConvertSurfaceFormat.David Thompson2015-12-222-1/+134
| | | | | | * sdl2/bindings.scm: Add a ton of pixel format constants. * sdl2/surface.scm: (symbol->sdl-pixel-format, convert-surface-format): New procedures.
* Update Guix package recipe.David Thompson2015-12-211-2/+2
|
* events: window: Change vector from pair to list.David Thompson2015-12-211-2/+2
| | | | | | | This is consistent with representing coordinate pairs as lists elsewhere in the library. * sdl2/events.scm (parse-window-event): Change vector from pair to list.
* events: window: Add additional predicates.David Thompson2015-12-211-0/+84
| | | | | | | | | * sdl2/events.scm (window-shown-event?, window-hidden-event?, window-exposed-event?, window-moved-event?, window-resized-event?, window-size-changed-event?, window-minimized-event?, window-maximized-event?, window-restored-event?, window-enter-event?, window-leave-event?, window-focus-gained-event?, window-focus-lost-event?, window-closed-event?): New procedures.
* events: Add quit event.David Thompson2015-12-211-1/+22
| | | | | | | * sdl2/events.scm (<quit-event>): New record type. (make-quit-event, quit-event?, quit-event-timestamp, parse-quit-event): New procedures. (poll-event): Add support for SDL_QUIT events.
* events: keyboard: Correct exported symbols.David Thompson2015-12-211-1/+3
| | | | | | | | | Exported the wrong symbol for the key symbol, and forgot to export symbols for selecting scancode and modifiers. * sdl2/events.scm: Remove export to nonexistent keyboard-event-keysym. Export keyboard-event-key, keyboard-event-scancode, and keyboard-event-modifiers.
* Update README.David Thompson2015-12-201-2/+21
|
* surface: Add useful selectors.David Thompson2015-12-201-1/+45
| | | | | | | * sdl2/surface.scm (pointer-int-ref, surface-width, surface-height) (surface-pitch, surface-pixels): New procedures. (%int-size, %pointer-size, %width-offset, %height-offset, %pitch-offset) (%pixels-offset): New variables.
* Update Guix package.David Thompson2015-12-201-4/+13
|
* Add SDL2_mixer bindings.David Thompson2015-12-204-0/+478
| | | | | | | * sdl2/bindings.scm: Add "AUDIO_*" constants. * sdl2/bindings/mixer.scm: New file. * sdl2/mixer.scm: New file. * Makefile.am (SOURCES): Add new files.
* build: Add SDL2_mixer detection.David Thompson2015-12-172-1/+43
|
* Add SDL2_ttf bindings.David Thompson2015-12-173-0/+177
| | | | | | * sdl2/bindings/ttf.scm: New file. * sdl2/ttf.scm: New file. * Makefile.am (SOURCES): Add them.
* surface: Fix argument name in record type printer.David Thompson2015-12-171-2/+2
| | | | | * sdl2/surface.scm (<surface>): s/context/surface/ in record type printer.
* Add color type.David Thompson2015-12-172-1/+28
| | | | | | | * 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.
* build: Add SDL2_ttf detection.David Thompson2015-12-162-1/+43
|
* Add SDL2_image bindings.David Thompson2015-12-163-0/+115
| | | | | | * sdl2/bindings/image.scm: New file. * sdl2/image.scm: New file. * Makefile.am (SOURCES): Add them.
* build: Add SDL2_image detection.David Thompson2015-12-162-1/+46
|
* events: joystick: Add button bindings.David Thompson2015-12-161-0/+45
| | | | | | | | | | * sdl2/events.scm (<joystick-button-event>): New record type. (make-joystick-button-event, joystick-button-event?, joystick-button-down-event?, joystick-button-up-event?, joystick-button-event-timestamp, joystick-button-event-which, joystick-button-event-button, joystick-button-event-pressed?, parse-joystick-button-event): New procedures. (poll-event): Add support for joystick button events.
* events: joystick: Add axis motion bindings.David Thompson2015-12-161-0/+38
| | | | | | | | | * sdl2/events.scm (<joystick-axis-event>): New record type. (make-joystick-axis-event, joystick-axis-event?, joystick-axis-event-timestamp, joystick-axis-event-which, joystick-axis-event-axis, joystick-axis-event-value, parse-joystick-axis-event): New procedures. (poll-event): Add support for joystick axis motion events.
* events: mouse: Add motion event bindings.David Thompson2015-12-162-0/+69
| | | | | | | | | | | | * 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.