X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/5421c488ca8a70349ada47b1ac32f724d722513a..b77536094bb40f40245c30ddff7e65ce0a581d2a:/gdk/gdkevents.lisp diff --git a/gdk/gdkevents.lisp b/gdk/gdkevents.lisp index f486bfa..aadfb2a 100644 --- a/gdk/gdkevents.lisp +++ b/gdk/gdkevents.lisp @@ -20,7 +20,7 @@ ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;; $Id: gdkevents.lisp,v 1.13 2008-01-07 16:02:23 espen Exp $ +;; $Id: gdkevents.lisp,v 1.15 2008-03-18 15:08:08 espen Exp $ (in-package "GDK") @@ -47,7 +47,9 @@ (let ((reader (reader-function 'event-type))) (defun %event-class (location) - (gethash (funcall reader location 0) *event-classes*))) + (or + (gethash (funcall reader location 0) *event-classes*) + (error "No class defined for event type: ~S" (funcall reader location 0))))) (defmethod make-proxy-instance :around ((class event-class) location &rest initargs) @@ -559,3 +561,21 @@ (:metaclass event-class) (:event-type :owner-change)) +(defclass grab-broken-event (event) + ((keyboard + :allocation :alien + :accessor event-keyboard + :initarg :keyboard + :type boolean) + (implicit + :allocation :alien + :accessor event-implicit + :initarg :implicit + :type boolean) + (grab-window + :allocation :alien + :accessor event-grab-window + :initarg :grab-window + :type window)) + (:metaclass event-class) + (:event-type :grab-broken))