guile-sdl2.git
12 days agottf: Fix incorrect function name in error message. master
Hugo Hörnquist [Wed, 12 Jun 2019 22:09:03 +0000 (00:09 +0200)] 
ttf: Fix incorrect function name in error message.

* sdl2/ttf.scm (render-font-blended): Fix function name in error message.

2 weeks agorender: Add texture color/alpha mod bindings.
Hugo Hörnquist [Sun, 9 Jun 2019 18:48:21 +0000 (20:48 +0200)] 
render: Add texture color/alpha mod bindings.

* 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.

2 weeks agodoc: Add missing argument to make-texture procedure.
Hugo Hörnquist [Sun, 9 Jun 2019 18:47:46 +0000 (20:47 +0200)] 
doc: Add missing argument to make-texture procedure.

* doc/api.texi: Add 'renderer' argument to 'make-texture'
  documentation.

2 weeks agorender: Add SDL_SetRenderTarget bindings.
Hugo Hörnquist [Thu, 6 Jun 2019 02:43:38 +0000 (04:43 +0200)] 
render: Add SDL_SetRenderTarget bindings.

* 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.

2 weeks agorender: Add SDL_RenderDrawRect and SDL_RenderFillRect bindings.
Hugo Hörnquist [Tue, 4 Jun 2019 18:16:08 +0000 (20:16 +0200)] 
render: Add SDL_RenderDrawRect and SDL_RenderFillRect bindings.

* 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.

2 weeks agoDocument set-render-draw-color procedure.
Hugo Hörnquist [Tue, 4 Jun 2019 18:14:43 +0000 (20:14 +0200)] 
Document set-render-draw-color procedure.

* doc/api.texi: Document 'set-render-draw-color'.

2 weeks agodoc: Add direntry info.
David Thompson [Tue, 4 Jun 2019 12:00:51 +0000 (08:00 -0400)] 
doc: Add direntry info.

Thanks to Hugo Hörnquist <hugo@lysator.liu.se> for submitting this
change.

2 weeks agodoc: Update copyright years.
David Thompson [Tue, 4 Jun 2019 12:00:44 +0000 (08:00 -0400)] 
doc: Update copyright years.

3 weeks agodoc: Use pretty CSS for HTML version.
David Thompson [Mon, 3 Jun 2019 00:48:58 +0000 (20:48 -0400)] 
doc: Use pretty CSS for HTML version.

3 weeks agoFix signature generation in 'make publish'. v0.4.0
David Thompson [Mon, 3 Jun 2019 00:13:39 +0000 (20:13 -0400)] 
Fix signature generation in 'make publish'.

I wasn't generating detached signatures! Oops!

3 weeks agoBump to version 0.4.0.
David Thompson [Mon, 3 Jun 2019 00:06:34 +0000 (20:06 -0400)] 
Bump to version 0.4.0.

3 weeks agoUpdate AUTHORS file.
David Thompson [Fri, 31 May 2019 15:27:42 +0000 (11:27 -0400)] 
Update AUTHORS file.

3 weeks agorender: Add SDL_RenderDrawLines binding.
Pierre-Antoine Rouby [Wed, 29 May 2019 20:53:44 +0000 (22:53 +0200)] 
render: Add SDL_RenderDrawLines binding.

* sdl2/bindings.scm (sdl-render-draw-lines): New procedure.
* sdl2/render.scm (render-draw-lines): New procedure.
* doc/api.texi: Document it.

3 weeks agorender: Add SDL_RenderDrawPoints binding.
Pierre-Antoine Rouby [Wed, 29 May 2019 20:43:27 +0000 (22:43 +0200)] 
render: Add SDL_RenderDrawPoints binding.

* sdl2/bindings.scm (sdl-render-draw-points): New procedure.
* sdl2/render.scm (render-draw-points): New procedure.
* doc/api.texi (Rendering): Document it.

3 weeks agorender: Fix delete-texture! exporting.
Pierre-Antoine Rouby [Wed, 29 May 2019 20:40:39 +0000 (22:40 +0200)] 
render: Fix delete-texture! exporting.

* sdl2/render.scm: Fix function name.

4 weeks agorender: Add SDL_DestroyTexture binding.
Pierre-Antoine Rouby [Sun, 26 May 2019 11:45:00 +0000 (13:45 +0200)] 
render: Add SDL_DestroyTexture binding.

* sdl2/bindings.scm (sdl-destroy-texture): New procedure.
* sdl2/render.scm (delete-texture!): New procedure.
* doc/api.texi (Renderer): Document it.

4 weeks agorender: Add SDL_RenderDrawPoint binding.
Pierre-Antoine Rouby [Fri, 24 May 2019 20:22:45 +0000 (22:22 +0200)] 
render: Add SDL_RenderDrawPoint binding.

* sdl2/bindings.scm (sdl-render-draw-line): New procedure.
* sdl2/render.scm (render-draw-line): New procedure.
* doc/api.texi (Rendering): Document it.

4 weeks agoMakefile: Fix texinfo include file declaration.
David Thompson [Thu, 23 May 2019 13:20:03 +0000 (09:20 -0400)] 
Makefile: Fix texinfo include file declaration.

Now 'make' will automatically rebuild the docs when, say, doc/api.texi
is modified.

4 weeks agorender: Add SDL_RenderDrawLine binding.
Pierre-Antoine Rouby [Wed, 22 May 2019 06:27:55 +0000 (08:27 +0200)] 
render: Add SDL_RenderDrawLine binding.

* sdl2/bindings.scm (sdl-render-draw-line): New procedure.
* sdl2/render.scm (render-draw-line): New procedure.
* doc/api.texi: Document it.

4 weeks agorender: Add SDL_RenderCopyEx binding.
Pierre-Antoine Rouby [Mon, 20 May 2019 16:03:18 +0000 (18:03 +0200)] 
render: Add SDL_RenderCopyEx binding.

* 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.

5 months agosurface: Add SDL_FillRect binding.
David Thompson [Wed, 9 Jan 2019 02:29:58 +0000 (21:29 -0500)] 
surface: Add SDL_FillRect binding.

* sdl2/bindings.scm (sdl-fill-rect): New procedure.
* sdl2/surface.scm (fill-rect): New procedure.
* doc/api.texi (Surfaces): Document it.

5 months agosurface: Add SDL_BlitScaled binding.
David Thompson [Wed, 9 Jan 2019 02:19:52 +0000 (21:19 -0500)] 
surface: Add SDL_BlitScaled binding.

* sdl2/bindings.scm (sdl-blit-scaled): New procedure.
* sdl2/surface.scm (blit-scaled): New procedure.
* doc/api.texi (Surfaces): Document it.

5 months agodoc: Replace 'Scheme Procedure' with just 'Procedure'.
David Thompson [Wed, 9 Jan 2019 02:04:27 +0000 (21:04 -0500)] 
doc: Replace 'Scheme Procedure' with just 'Procedure'.

5 months agodoc: Document (sdl2 rect) module.
David Thompson [Tue, 8 Jan 2019 15:29:31 +0000 (10:29 -0500)] 
doc: Document (sdl2 rect) module.

* doc/api.texi (Rects): New section.

5 months agodoc: Document blit-surface.
David Thompson [Tue, 8 Jan 2019 15:25:54 +0000 (10:25 -0500)] 
doc: Document blit-surface.

* doc/api.texi (Surfaces): Document blit-surface procedure.

5 months agosurface: Add SDL_BlitSurface binding.
David Thompson [Tue, 8 Jan 2019 03:53:13 +0000 (22:53 -0500)] 
surface: Add SDL_BlitSurface binding.

* sdl2/bindings.scm (sdl-blit-surface): New procedure.
* sdl2/surface.scm (blit-surface): New procedure.

5 months agoAdd rect module.
David Thompson [Tue, 8 Jan 2019 03:51:58 +0000 (22:51 -0500)] 
Add rect module.

* sdl2/rect.scm: New file.
* Makefile.am (SOURCES): Add it.

5 months agoinput: game-controller: Fix bug where right-y axis is invalid.
David Thompson [Sun, 6 Jan 2019 04:28:29 +0000 (23:28 -0500)] 
input: game-controller: Fix bug where right-y axis is invalid.

* sdl2/input/game-controller.scm (axis-symbol->int): Fix typo!

8 months agoBump to version 0.3.1. v0.3.1
David Thompson [Tue, 16 Oct 2018 11:53:16 +0000 (07:53 -0400)] 
Bump to version 0.3.1.

8 months agoconfigure: Accept Guile 3.0.
David Thompson [Wed, 3 Oct 2018 19:13:06 +0000 (15:13 -0400)] 
configure: Accept Guile 3.0.

10 months agoAdd binding for SDL_SetRenderDrawColor.
Eero Leno [Tue, 21 Aug 2018 12:20:08 +0000 (15:20 +0300)] 
Add binding for SDL_SetRenderDrawColor.

* sdl2/bindings.scm (sdl-set-render-draw-color): New procedure.
* sdl2/render.scm (set-render-draw-color): New procedure.

10 months agoAdd AUTHORS file. v0.3.0
David Thompson [Wed, 1 Aug 2018 13:01:28 +0000 (09:01 -0400)] 
Add AUTHORS file.

10 months agodoc: Fill out some of the API documentation.
Kei Kebreau [Wed, 1 Aug 2018 01:22:34 +0000 (21:22 -0400)] 
doc: Fill out some of the API documentation.

11 months agoBump to version 0.3.0.
David Thompson [Wed, 11 Jul 2018 01:38:08 +0000 (21:38 -0400)] 
Bump to version 0.3.0.

11 months agoMakfile: Fix publish task.
David Thompson [Wed, 11 Jul 2018 01:38:00 +0000 (21:38 -0400)] 
Makfile: Fix publish task.

11 months agoMakefile: Fix compiled guile module installation location.
David Thompson [Tue, 10 Jul 2018 16:16:24 +0000 (12:16 -0400)] 
Makefile: Fix compiled guile module installation location.

19 months agoinput: mouse: Add mouse-button-released?
David Thompson [Sat, 11 Nov 2017 02:29:40 +0000 (21:29 -0500)] 
input: mouse: Add mouse-button-released?

* sdl2/input/mouse.scm (mouse-button-released?): New procedure.

19 months agoAdd mouse input module.
David Thompson [Sat, 11 Nov 2017 02:23:58 +0000 (21:23 -0500)] 
Add mouse input module.

* sdl2/input/mouse.scm: New file.
* Makefile.am (SOURCES): Add it.

19 months agorender: Fix broken render-copy procedure.
David Thompson [Sat, 11 Nov 2017 02:23:01 +0000 (21:23 -0500)] 
render: Fix broken render-copy procedure.

* sdl2/render.scm (render-copy): Make srcrect and dstrect optional and
do not use nil? to check them.

19 months agoAdd binding for SDL_GetMouseState.
David Thompson [Fri, 10 Nov 2017 19:56:50 +0000 (14:56 -0500)] 
Add binding for SDL_GetMouseState.

No high-level wrapper yet, though.

* sdl2/bindings.scm (sdl-get-mouse-state): New procedure.

19 months agoAdd clipboard bindings.
David Thompson [Fri, 10 Nov 2017 19:37:37 +0000 (14:37 -0500)] 
Add clipboard bindings.

* 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.

19 months agoREADME: Update Guix build instructions.
David Thompson [Fri, 10 Nov 2017 18:54:07 +0000 (13:54 -0500)] 
README: Update Guix build instructions.

19 months agoAdd SDL_GameControllerAddMappingsFromRW binding.
David Thompson [Fri, 10 Nov 2017 17:12:07 +0000 (12:12 -0500)] 
Add SDL_GameControllerAddMappingsFromRW binding.

* sdl2/bindings.scm (sdl-game-controller-add-mappings-from-file): New
procedure.
* sdl2/input/game-controller.scm (load-game-controller-mappings!): New
procedure.

2 years agorender: Add srcrect and dstrect arguments to render-copy.
Jona [Fri, 5 May 2017 08:36:07 +0000 (10:36 +0200)] 
render: Add srcrect and dstrect arguments to render-copy.

* sdl2/bindings.scm (sdl-rect): New variable.
* sdl2/render.scm (render-copy): Add srcrect and dstrect arguments.

2 years agoinput: Add keyboard module.
David Thompson [Sat, 1 Apr 2017 13:51:05 +0000 (09:51 -0400)] 
input: Add keyboard module.

* sdl2/bindings.scm (sdl-get-keyboard-state): New procedure.
* sdl2/input/keyboard.scm: New file.
* Makefile.am (SOURCES): Add it.

2 years agosurface: Export pixel-format-name.
David Thompson [Wed, 29 Mar 2017 21:55:52 +0000 (17:55 -0400)] 
surface: Export pixel-format-name.

* sdl2/surface.scm: Export pixel-format-name.

2 years agosurface: Parse SDL_PixelFormat, SDL_Palette, and SDL_Color structs.
David Thompson [Wed, 29 Mar 2017 00:45:11 +0000 (20:45 -0400)] 
surface: Parse SDL_PixelFormat, SDL_Palette, and SDL_Color structs.

* sdl2/surface.scm (color?, make-color, color-r, color-g, color-b,
color-a, palette?, palette-length, palette-colors, pixel-format?,
pixel-format-bits-per-pixel, pixel-format-bytes-per-pixel,
pixel-format-red-mask, pixel-format-green-mask, pixel-format-blue-mask,
pixel-format-alpha-mask, surface-pixel-format, wrap-palette,
unwrap-palette, wrap-pixel-format, unwrap-pixel-format): New procedures.
(<color>, <palette>, <pixel-format>): New types.
(%palette-types, %pixel-format-types): New variables.
(palette-parse-match, pixel-format-parse-match): New syntax.
* .dir-locals.el: Add indent rules for new macros.

2 years agoguix: Default to Guile 2.2.
David Thompson [Wed, 29 Mar 2017 00:44:39 +0000 (20:44 -0400)] 
guix: Default to Guile 2.2.

2 years agoFix 'make publish'.
David Thompson [Sat, 21 Jan 2017 02:06:07 +0000 (21:06 -0500)] 
Fix 'make publish'.

2 years agoDon't build dvi docs.
David Thompson [Sat, 21 Jan 2017 01:19:05 +0000 (20:19 -0500)] 
Don't build dvi docs.

2 years agoAdd game controller example.
David Thompson [Sat, 21 Jan 2017 01:14:11 +0000 (20:14 -0500)] 
Add game controller example.

2 years agoevents: Parse the "repeat" field of a keyboard event as a boolean.
David Thompson [Sun, 1 Jan 2017 20:10:02 +0000 (15:10 -0500)] 
events: Parse the "repeat" field of a keyboard event as a boolean.

* sdl2/events.scm (<keyboard-event>): Rename "repeat" field to
"repeat?"
(keyboard-event-repeat): Replace with...
(keyboard-event-repeat?): ... this.
(parse-keyboard-event): Parse "repeat" field as a boolean.

2 years agoREADME: Mention the Texinfo dependency.
David Thompson [Sun, 1 Jan 2017 20:09:33 +0000 (15:09 -0500)] 
README: Mention the Texinfo dependency.

2 years agoevents: Add predicates for different controller device events.
David Thompson [Sun, 1 Jan 2017 20:08:44 +0000 (15:08 -0500)] 
events: Add predicates for different controller device events.

* sdl2/events.scm (controller-added-event?, controller-removed-event?,
controller-remapped-event?): New procedures.

2 years agoAdd the beginning of a manual.
David Thompson [Sat, 31 Dec 2016 20:02:02 +0000 (15:02 -0500)] 
Add the beginning of a manual.

2 years agoUpdate docstring for sdl-ticks.
David Thompson [Sat, 31 Dec 2016 19:59:53 +0000 (14:59 -0500)] 
Update docstring for sdl-ticks.

* sdl2.scm (sdl-ticks): Update docstring.

2 years agoevents: Reduce allocation in poll-event.
David Thompson [Sat, 31 Dec 2016 18:30:14 +0000 (13:30 -0500)] 
events: Reduce allocation in poll-event.

* sdl2/events.scm (poll-event): Reuse the same event structure for each
call.

2 years agoUpdate README. v0.2.0
David Thompson [Sat, 31 Dec 2016 18:30:00 +0000 (13:30 -0500)] 
Update README.

2 years agoBump to version 0.2.0.
David Thompson [Sat, 31 Dec 2016 18:24:50 +0000 (13:24 -0500)] 
Bump to version 0.2.0.

2 years agoAdd bindings for game controller input.
David Thompson [Fri, 30 Dec 2016 16:55:44 +0000 (11:55 -0500)] 
Add bindings for game controller input.

* 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

2 years agoAdd bindings for text input event handling.
David Thompson [Fri, 30 Dec 2016 16:19:48 +0000 (11:19 -0500)] 
Add bindings for text input event handling.

* 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.

2 years agosurface: Add SDL_CreateRGBSurfaceFrom binding.
David Thompson [Sat, 17 Dec 2016 02:49:11 +0000 (21:49 -0500)] 
surface: Add SDL_CreateRGBSurfaceFrom binding.

2 years agosurface: Add SDL_CreateRGBSurface binding.
David Thompson [Fri, 16 Dec 2016 20:52:39 +0000 (15:52 -0500)] 
surface: Add SDL_CreateRGBSurface binding.

2 years agoimage: Add IMG_SavePNG binding.
David Thompson [Fri, 16 Dec 2016 20:49:58 +0000 (15:49 -0500)] 
image: Add IMG_SavePNG binding.

2 years agoguix: Fix build. v0.1.2
David Thompson [Wed, 10 Aug 2016 23:06:20 +0000 (19:06 -0400)] 
guix: Fix build.

Include only Git files in the build.

2 years agoguix: Use local-file for source field.
David Thompson [Wed, 10 Aug 2016 01:52:48 +0000 (21:52 -0400)] 
guix: Use local-file for source field.

3 years agoREADME: Add more Guix-specific instructions.
David Thompson [Thu, 2 Jun 2016 00:42:30 +0000 (20:42 -0400)] 
README: Add more Guix-specific instructions.

3 years agoguix: Update development snapshot.
David Thompson [Thu, 2 Jun 2016 00:37:52 +0000 (20:37 -0400)] 
guix: Update development snapshot.

3 years agoBump version to 0.1.2.
David Thompson [Thu, 2 Jun 2016 00:33:07 +0000 (20:33 -0400)] 
Bump version to 0.1.2.

3 years agoInstall modules to correct directory based on Guile version.
David Thompson [Thu, 11 Feb 2016 00:40:33 +0000 (19:40 -0500)] 
Install modules to correct directory based on Guile version.

3 years agoAllow building with Guile 2.2.
David Thompson [Thu, 11 Feb 2016 00:16:05 +0000 (19:16 -0500)] 
Allow building with Guile 2.2.

3 years agovideo: Add SDL_SetWindowFullscreen binding.
David Thompson [Sat, 9 Jan 2016 13:47:39 +0000 (08:47 -0500)] 
video: Add SDL_SetWindowFullscreen binding.

* sdl2/bindings.scm (sdl-set-window-fullscreen): New procedure.
* sdl2/video.scm (set-window-fullscreen!): New procedure.

3 years agovideo: Fix typo in set-gl-attribute!
David Thompson [Sat, 9 Jan 2016 13:46:29 +0000 (08:46 -0500)] 
video: Fix typo in set-gl-attribute!

* sdl2/video.scm (set-gl-attribute!):
  s/contet-minor-version/context-minor-version/

3 years agovideo: Add SDL_GL_SetSwapInterval binding.
David Thompson [Sat, 9 Jan 2016 02:38:32 +0000 (21:38 -0500)] 
video: Add SDL_GL_SetSwapInterval binding.

* sdl2/bindings.scm (sdl-gl-set-swap-interval): New procedure.
* sdl2/video.scm (set-gl-swap-interval!): New procedure.

3 years agovideo: Add SDL_GL_SetAttribute binding.
David Thompson [Sun, 3 Jan 2016 01:08:48 +0000 (20:08 -0500)] 
video: Add SDL_GL_SetAttribute binding.

* sdl2/bindings.scm (sdl-get-set-attribute): New procedure.
* sdl2/video.scm (set-gl-attribute!): New procedure.

3 years agobuild: Add 'publish' make target.
David Thompson [Fri, 1 Jan 2016 21:14:44 +0000 (16:14 -0500)] 
build: Add 'publish' make target.

No more remembering how I sign and upload things. ;)

3 years agoBump to v0.1.1. v0.1.1
David Thompson [Fri, 1 Jan 2016 20:55:28 +0000 (15:55 -0500)] 
Bump to v0.1.1.

3 years agosurface: Fix SDL_Surface struct parsing.
David Thompson [Fri, 1 Jan 2016 16:06:29 +0000 (11:06 -0500)] 
surface: Fix SDL_Surface struct parsing.

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.

3 years agoUpdate Guix package recipe. v0.1.0
David Thompson [Tue, 22 Dec 2015 19:29:54 +0000 (14:29 -0500)] 
Update Guix package recipe.

3 years agobuild: Distribute example files.
David Thompson [Tue, 22 Dec 2015 19:12:05 +0000 (14:12 -0500)] 
build: Distribute example files.

3 years agobindings: Use define-public instead of #:export.
David Thompson [Tue, 22 Dec 2015 19:11:36 +0000 (14:11 -0500)] 
bindings: Use define-public instead of #:export.

3 years agowindow: Allow unspecified and centered window positions.
David Thompson [Tue, 22 Dec 2015 19:05:58 +0000 (14:05 -0500)] 
window: Allow unspecified and centered window positions.

* 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.

3 years agoChange version to 0.1.0.
David Thompson [Tue, 22 Dec 2015 18:04:31 +0000 (13:04 -0500)] 
Change version to 0.1.0.

3 years agoAdd blank TODO file.
David Thompson [Tue, 22 Dec 2015 18:04:09 +0000 (13:04 -0500)] 
Add blank TODO file.

3 years agoUpdate README.
David Thompson [Tue, 22 Dec 2015 17:39:35 +0000 (12:39 -0500)] 
Update README.

3 years agoUpdate Guix package recipe.
David Thompson [Tue, 22 Dec 2015 15:33:54 +0000 (10:33 -0500)] 
Update Guix package recipe.

3 years agosurface: Fix convert-surface-format.
David Thompson [Tue, 22 Dec 2015 14:12:07 +0000 (09:12 -0500)] 
surface: Fix convert-surface-format.

Was trying to wrap the wrong thing. -_-

* sdl2/surface.scm (convert-surface-format): Wrap the new pointer, not
the old surface object.  Oops.

3 years agosurface: Add binding for SDL_ConvertSurfaceFormat.
David Thompson [Tue, 22 Dec 2015 14:00:20 +0000 (09:00 -0500)] 
surface: Add binding for SDL_ConvertSurfaceFormat.

* sdl2/bindings.scm: Add a ton of pixel format constants.
* sdl2/surface.scm: (symbol->sdl-pixel-format, convert-surface-format):
  New procedures.

3 years agoUpdate Guix package recipe.
David Thompson [Mon, 21 Dec 2015 21:42:44 +0000 (16:42 -0500)] 
Update Guix package recipe.

3 years agoevents: window: Change vector from pair to list.
David Thompson [Mon, 21 Dec 2015 20:53:58 +0000 (15:53 -0500)] 
events: window: Change vector from pair to list.

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.

3 years agoevents: window: Add additional predicates.
David Thompson [Mon, 21 Dec 2015 20:53:01 +0000 (15:53 -0500)] 
events: window: Add additional predicates.

* 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.

3 years agoevents: Add quit event.
David Thompson [Mon, 21 Dec 2015 16:40:38 +0000 (11:40 -0500)] 
events: Add quit event.

* 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.

3 years agoevents: keyboard: Correct exported symbols.
David Thompson [Mon, 21 Dec 2015 16:38:45 +0000 (11:38 -0500)] 
events: keyboard: Correct exported symbols.

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.

3 years agoUpdate README.
David Thompson [Sun, 20 Dec 2015 21:16:29 +0000 (16:16 -0500)] 
Update README.

3 years agosurface: Add useful selectors.
David Thompson [Sun, 20 Dec 2015 21:03:03 +0000 (16:03 -0500)] 
surface: Add useful selectors.

* 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.

3 years agoUpdate Guix package.
David Thompson [Sun, 20 Dec 2015 17:25:36 +0000 (12:25 -0500)] 
Update Guix package.

3 years agoAdd SDL2_mixer bindings.
David Thompson [Sun, 20 Dec 2015 17:15:44 +0000 (12:15 -0500)] 
Add SDL2_mixer bindings.

* sdl2/bindings.scm: Add "AUDIO_*" constants.
* sdl2/bindings/mixer.scm: New file.
* sdl2/mixer.scm: New file.
* Makefile.am (SOURCES): Add new files.

3 years agobuild: Add SDL2_mixer detection.
David Thompson [Fri, 18 Dec 2015 03:54:33 +0000 (22:54 -0500)] 
build: Add SDL2_mixer detection.

3 years agoAdd SDL2_ttf bindings.
David Thompson [Thu, 17 Dec 2015 14:09:10 +0000 (09:09 -0500)] 
Add SDL2_ttf bindings.

* sdl2/bindings/ttf.scm: New file.
* sdl2/ttf.scm: New file.
* Makefile.am (SOURCES): Add them.

3 years agosurface: Fix argument name in record type printer.
David Thompson [Thu, 17 Dec 2015 14:08:21 +0000 (09:08 -0500)] 
surface: Fix argument name in record type printer.

* sdl2/surface.scm (<surface>): s/context/surface/ in record type
  printer.