AlexCharlton / cl-glfw3

Common Lisp bindings to GLFW version 3.x
BSD 2-Clause "Simplified" License
89 stars 32 forks source link

Adding bindings. Arguments added to initialize & with-init. #39

Open togekawa5 opened 2 years ago

togekawa5 commented 2 years ago
  1. Adding bindings set-window-attribute set-monitor-user-pointer get-monitor-user-pointer set-window-icon get-window-frame-size maximize-window focus-window request-window-attention set-window-maximize-callback set-window-content-scale-callback wait-events-timeout raw-mouse-motion-supported-p get-key-name get-key-scancode create-cursor create-standard-cursor destroy-cursor set-cursor set-char-mods-callback set-drop-callback get-joystick-hats get-joystick-guid set-joystick-user-pointer get-joystick-user-pointer joystick-is-gamepad-p set-joystick-callback update-gamepad-mappings get-gamepad-name get-gamepad-state get-timer-value get-timer-frequency *-userpointer are not exported from cl-glfw3.
  2. Initialize gets arguments (initialize)->(initialize &key atts...) (with-init &body body)->(with-init (&rest keys...) &body body) In this PR, with-init-window's argument didn't change because of complexity of adding init-hint, such as whether (w-i-w init-hints window-hints body) or (w-i-w window-hints init-hints body) is better when adding init-hints, etc.
  3. Additional example icons-test is added cl-glfw3-examples. it uses images.
  4. Renaming work-area->workarea get-monitor-work-area is renamed get-monitor-work-area. I matched with binding-name rules. Now get-monitor-work-area calls get-monitor-workarea and warns not recommended.
togekawa5 commented 2 years ago

I tested create-cursor, set-cursor on windows sbcl and there is no problem, but when tested on ubuntu sbcl the colors may not display properly. For example, *colocr-check*cursor shows all colors correctly, but *yellow* and *blue* created in the same way show different colors than intended. set-window-icon handles image-structure as well, but it worked fine on both windows and ubuntu.