{"id":15010680,"url":"https://github.com/igjoshua/glfw-clj","last_synced_at":"2025-10-07T01:27:49.424Z","repository":{"id":62434048,"uuid":"412125729","full_name":"IGJoshua/glfw-clj","owner":"IGJoshua","description":"A Clojure wrapper for GLFW on JDK 22 and later.","archived":false,"fork":false,"pushed_at":"2024-10-05T14:50:20.000Z","size":176,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T20:37:14.994Z","etag":null,"topics":["clojure","glfw","glfw-bindings","glfw-library","glfw3","native-wrapper","opengl"],"latest_commit_sha":null,"homepage":"https://igjoshua.github.io/glfw-clj/","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IGJoshua.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-30T15:45:43.000Z","updated_at":"2024-10-30T16:13:06.000Z","dependencies_parsed_at":"2024-09-28T17:40:44.305Z","dependency_job_id":"291c9643-5382-4f62-85fc-1fbd77ad704a","html_url":"https://github.com/IGJoshua/glfw-clj","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGJoshua%2Fglfw-clj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGJoshua%2Fglfw-clj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGJoshua%2Fglfw-clj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGJoshua%2Fglfw-clj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IGJoshua","download_url":"https://codeload.github.com/IGJoshua/glfw-clj/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248088270,"owners_count":21045674,"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":["clojure","glfw","glfw-bindings","glfw-library","glfw3","native-wrapper","opengl"],"created_at":"2024-09-24T19:35:21.197Z","updated_at":"2025-10-07T01:27:49.347Z","avatar_url":"https://github.com/IGJoshua.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glfw-clj\n[![Clojars Project](https://img.shields.io/clojars/v/org.suskalo/glfw-clj.svg)](https://clojars.org/org.suskalo/glfw-clj)\n\nA wrapper for the excellent [GLFW](https://www.glfw.org/) library, on top of the\n[coffi](https://github.com/IGJoshua/coffi) foreign function interface library\nfor Clojure.\n\n## Installation\nThis library is available on Clojars, and as a git dependency. You can add a\ndependency on it with the following configuration in your `deps.edn` file.\n\n```clojure\norg.suskalo/glfw-clj {:mvn/version \"1.0.86\"}\nio.github.IGJoshua/glfw-clj {:git/tag \"v1.0.86\" :git/sha \"911496a\"}\n```\n\nIn addition to the module management [needed by\ncoffi](https://github.com/IGJoshua/coffi#installation), glfw-clj depends on the\nGLFW library being present on the `LD_LIBRARY_PATH`.\n\n## Usage\nGeneral usage of the library follows the usage of GLFW, as the library matches\nthat one closely. See [this\npage](https://www.glfw.org/docs/latest/quick_guide.html) if you want help\ngetting started.\n\nFunctions are provided in the `glfw-clj.core` namespace, which is intended to be\naliased as `glfw`.\n\n```clojure\nuser=\u003e (require '[glfw-clj.core :as glfw])\n```\n\nThen functions will follow the same names as are in the original library, but\nwithout the `glfw` prefix, and in kebab case. For example the function\n`glfwGetError` is provided as `glfw-clj.core/get-error`.\n\n```clojure\nuser=\u003e (glfw/get-error)\nnil\n```\n\nIn order to be able to use most functionality in the library, it must first be\ninitialized.\n\n```clojure\nuser=\u003e (glfw/init)\ntrue\n```\n\nThis returns `true` when it succeeds, and `false` when it fails for whatever\nreason.\n\nIn general, integers that map to `GLFW_TRUE` or `GLFW_FALSE` are replaced with\nbooleans, and integers which map to a given `GLFW_SOME_ENUM` like `GLFW_PRESS`\nare replaced with keywords in the `glfw-clj.core` namespace. So `GLFW_PRESS` is\nmapped to the keyword `::glfw/press`.\n\nThe set-callback functions take an optional `arena` parameter, which is a\nresource arena from coffi. This ensures that the callback is kept around for as\nlong as it will be used. If you don't pass a arena, the global arena will be\nused. This is generally advisable if you set the callback once at the beginning\nof your program and don't change it. It's recommended to use this arena even\nwhen developing at the REPL to prevent JVM crashes.\n\nCallbacks will catch exceptions that are thrown in them and log them using\n[clojure.tools.logging](https://github.com/clojure/tools.logging), before\nreturning an appropriate do-nothing value (at the time of writing, all callbacks\nreturn void and therefore nil is used as the return value).\n\nOpaque objects like the window, monitor, and cursor objects are represented as\npointers.\n\nDocstrings are provided for all functions, but are there as reminder text, not a\nreplacement for the main GLFW documentation. When in doubt, check the GLFW docs.\n\n## Future Plans\nThese features/changes are being considered for future versions of the library.\n\n- An alternate way of loading the library\n\n## License\n\nCopyright © 2021 Joshua Suskalo\n\nDistributed under the zlib/libpng license, the same as GLFW.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figjoshua%2Fglfw-clj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figjoshua%2Fglfw-clj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figjoshua%2Fglfw-clj/lists"}