{"id":21187575,"url":"https://github.com/pb82/sdl4racket","last_synced_at":"2026-02-04T03:06:07.130Z","repository":{"id":3602929,"uuid":"4667461","full_name":"pb82/sdl4racket","owner":"pb82","description":"SDL 1.2 bindings for the Racket language.","archived":false,"fork":false,"pushed_at":"2014-03-08T10:58:58.000Z","size":2893,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T13:08:28.452Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Racket","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pb82.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-14T19:19:08.000Z","updated_at":"2016-04-15T14:56:31.000Z","dependencies_parsed_at":"2022-09-10T22:12:39.798Z","dependency_job_id":null,"html_url":"https://github.com/pb82/sdl4racket","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb82%2Fsdl4racket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb82%2Fsdl4racket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb82%2Fsdl4racket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb82%2Fsdl4racket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pb82","download_url":"https://codeload.github.com/pb82/sdl4racket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243640275,"owners_count":20323635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T18:38:13.683Z","updated_at":"2026-02-04T03:06:07.090Z","avatar_url":"https://github.com/pb82.png","language":"Racket","funding_links":[],"categories":[],"sub_categories":[],"readme":"sdl4racket\n==========\n\nAn attempt to create libSDL 1.2 and libSDL_image bindings for the Racket programming language. I've tried to keep the sdl4racket API as close to the C API as possible, so you can use the SDL Wiki and all the tutorials out there. Of course the functions have more lispy names, for example:\n\n**sdl-set-video-mode** instead of **SDL_SetVideoMode**\n\nIntegration with racket/draw is possible via the **bitmap-\u003esdl-surface** function.\n\nC Structures (e.g. all the SDL event structures) are converted to function closures. For example, a property like:\n\n```c\nevent.key.keysym.sym\n```\n\ncan be accesed in Racket this way:\n\n```scheme\n(((event 'EVENT) 'KEYSYM) 'SYM)\n```\n\nThe main C event structure is actually a union. In sdl4racket a call to\n\n```scheme\n(event 'EVENT)\n```\n\n\nwill return the correct event closure, according to the current event type.\n\n\nThis binding is not complete, however most of SDL_Video\nand the event handling is already working.\n\n\nVariations from libSDL:\n\n  * SDL_CDStatus is not available as sdl-cd-status but as sdl-cd-state in order to prevent a collision with the sdl-cd struct getter for 'status'\n  * sdl-wait-event will internally use a polling loop to prevent the main thread from blocking.\n    If blocking the main thread is ok for you (in sdl4racket timer callbacks are executed on the main thread)\n    then you may use **sdl-wait-event-native** which gives you the original behavior.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpb82%2Fsdl4racket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpb82%2Fsdl4racket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpb82%2Fsdl4racket/lists"}