set-error-handler in x.factor

darcs
wayo.cavazos 2006-02-25 06:01:51 +00:00
parent d65a748042
commit 2479ef1d5d
1 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,6 @@
USING: namespaces kernel compiler math arrays strings alien sequences
xlib rectangle ;
USING: namespaces kernel math arrays strings alien sequences xlib rectangle ;
IN: x
SYMBOL: dpy
@ -238,6 +239,16 @@ dpy get "XEvent" <c-object> dup >r XNextEvent drop r> ;
: events-queued ( mode -- n ) >r dpy get r> XEventsQueued ;
! 11.8 - Handling Protocol Errors
SYMBOL: error-handler-quot
: error-handler-callback ( -- xt ) "void" { "Display*" "XErrorEvent*" }
[ error-handler-quot get call ] alien-callback ; compiled
: set-error-handler ( quot -- )
error-handler-quot set error-handler-callback XSetErrorHandler drop ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! 12 - Input Device Functions
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!