longlene / cl-raylib

Common Lisp binding of raylib
MIT License
145 stars 21 forks source link

Use keywords instead of constants for C enums #35

Closed kiran-kp closed 1 year ago

kiran-kp commented 1 year ago

Using cffi:defbitfield makes writing flag combinations simpler. With this change you can just write

  (raylib:set-config-flags '(:flag-window-highdpi :flag-window-undecorated))

I think all enums should be converted to keywords since it is the lisp convention. If you're good with this change, I'll open up a few more PRs to convert the other enums.

kiran-kp commented 1 year ago

One advantage of using keywords is that you don't have to manually export each enum value (keys enum is good example).

longlene commented 1 year ago

@kiran-kp Thank you and sorry for the late reply, I was too busy these two months.