(type egg)
(signature "glfw egg")
(timestamp 1612269487)
(sxml ((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/glfw" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.")) (section 2 "GLFW" (toc) (p (link "https://www.glfw.org/" "GLFW") " bindings for Chicken Scheme.") (p "The source for this extension is available " (link "https://git.foldling.org/chicken-glfw.git" "here") ".") (p "Note that this extension applies to Version 2 of the GLFW library. For an interface to GLFW Version 3, see the " (int-link "glfw3") " egg.")) (section 2 "API" (p "Constant & function names & signatures match those of GLFW.")) (section 2 "Example" (highlight scheme "(use gl glfw extras data-structures)\n\n(define *width* 640)\n(define *height* 480)\n(define *colors* '(.2 .4 .6 .8))\n\n(define-external (window_resize (integer width) (integer height)) void\n  (gl:Viewport 0 0 *width* *height*))\n\n(define-external (window_charpress (char c) (integer t)) void\n  (when (eq? c #\\q)\n    (exit))) \n\n(glfwInit)\n(glfwOpenWindow *width* *height* 8 8 8 8 8 8 GLFW_WINDOW)\n(glfwSetWindowSizeCallback (location window_resize))\n(glfwSetCharCallback (location window_charpress))\n(glfwSetWindowTitle \"Chicken Party!\")\n\n(let COLORS!!! ()\n  (apply gl:ClearColor (shuffle *colors* random))\n  (gl:Clear gl:COLOR_BUFFER_BIT)\n  (glfwSwapBuffers)\n  (glfwWaitEvents)\n  (COLORS!!!))")) (section 2 "See Also" (ul (li (int-link "glfw3")))) (section 2 "Author" (p (int-link "/users/evan-hanson" "Evan Hanson")) (p "The heavy lifting was done by Felix Winkelman's " (int-link "bind") " egg, I just fiddled with the header file and fixed up the output a bit. Bug reports should still go to me, though.")) (section 2 "License" (p "Public Domain"))))
