Luís Oliveira wrote:
(defcenum event :no-event :active-event :key-down :key-up)
(defmacro define-event-mask (name keyword) `(defconstant ,name (ash 1 (foreign-enum-value 'event ',keyword))))
(define-event-mask +active-event-mask+ :active-event) (define-event-mask +key-down-mask+ :key-down) (define-event-mask +key-up-mask+ :key-up)
ok, this is a good translation, if you do it by hand. My problem is that I want to automate it with SWIG or Verrazano, without the need to do manual editing of the generated bindings, and this frameworks can't invent the named enum "event", because it is an anonymous enum in the header source.