Split up in qt.core.
Annotate for file /src/msg-handler.lisp
2010-01-10 tobias 1 (in-package :cl-smoke.qt.core)
2009-04-05 tobias 2
2009-09-09 tobias 3 ;; FIXME Determine the actual size of the QtMsgType enum.
13:18:08 ' 4 (cffi:defctype qt-msg-type :int)
2009-04-05 tobias 5
2009-08-02 tobias 6 ;; QtMsgHandler is a typedef for a pointer.
11:15:21 ' 7 (define-pointer-typedef "QtMsgHandler" foreign-pointer)
2009-09-09 tobias 8
2009-08-27 tobias 9 (define-pointer-typedef "void(*)(QtMsgType,const char*)" foreign-pointer)
08:37:36 ' 10 (define-pointer-typedef "unsigned char*" foreign-pointer)
2009-08-02 tobias 11
2009-04-05 tobias 12 (defcallback qt-msg-handler :void
17:56:16 ' 13 ((type qt-msg-type)
' 14 (message :string))
' 15 (ecase type
2009-09-09 tobias 16 (#.(value qt:+qt-debug-msg+)
13:18:08 ' 17 (write-string "qDebug: " *debug-io*)
' 18 (write-line message *debug-io*))
' 19 (#.(value qt:+qt-warning-msg+) (warn message))
' 20 (#.(value qt:+qt-critical-msg+) (cerror "Ignore" "~A" message))
' 21 (#.(value qt:+qt-fatal-msg+) (error message))))
2009-04-05 tobias 22
2009-12-13 tobias 23 (eval-startup (:load-toplevel)
2009-09-09 tobias 24 (qt:q-install-msg-handler (callback qt-msg-handler)))