; Norbert Freudemann ; grab-pointer grabs control of a pointer for your client only. ; It returns on of the symbols: ; (success not-viewable already-grabbed frozen invlalide-time) (define (grab-pointer window owner? events ptr-sync? kbd-sync? confine-to cursor time) (%grab-pointer (display-Xdisplay (window-display window)) (window-Xwindow window) owner? events ptr-sync? kbd-sync? (window-Xwindow confine-to) (cursor-Xcursor cursor) time)) (import-lambda-definition %grab-pointer (Xdisplay Xwindow owner? events ptr-sync? kbd-sync? Xconfine-to Xcursor time) "scx_Grab_Pointer") ; ungrab-pointer releases the pointer. (define (ungrab-pointer display time) (%ungrab-pointer (display-Xdisplay display) time)) (import-lambda-definition %ungrab-pointer (Xdisplay time) "scx_Ungrab_Pointer") ; --- (define (grab-button window button mod owner? events ptr-sync? kbd-sync? confine-to cursor) (%grab-button (display-Xdisplay (window-display window)) (window-Xwindow window) button mod owner? events ptr-sync? kbd-sync? (window-Xwindow confine-to) (cursor-Xcursor cursor))) (import-lambda-definition %grab-button (Xdisplay Xwindow button mods ownerp events ptr-sync? kbd-sync? Xconfine-to Xcursor) "scx_Grab_Button") ; --- (define (ungrab-button window button modifiers) (%ungrab-button (display-Xdisplay (window-display window)) (window-Xwindow window) button modifiers)) (import-lambda-definition %ungrab-button (Xdisplay Xwindow button modifiers) "scx_Ungrab_Button") ; --- (define (change-active-pointer-grab display events cursor time) (%change-active-p-g (display-Xdisplay display) events cursor time)) (import-lambda-definition %change-active-p-g (Xdislay events cursor time) "scx_Change_Active_Pointer_Grab") ; --- (define (grab-keyboard window owner? ptr-sync? kbd-sync? time) (%grab-keyboard (display-Xdisplay (window-display window)) (window-Xwindow window) owner? ptr-sync? kbd-sync? time)) (import-lambda-definition %grab-keyboard (Xdisplay Xwindow owner? ptr-sync? kbd-sync? time) "scx_Grab_Keyboard") ; --- (define (ungrab-keyboard display time) (%ungrab-keyboard (display-Xdisplay display) time)) (import-lambda-definition %ungrab-keyboard (Xdisplay time) "scx_Ungrab_Keyboard") ; --- (define (grab-key window key mod owner? ptr-sync? kbd-sync?) (%grab-key (display-Xdisplay (window-display window)) (window-Xwindow window) key mod owner? ptr-sync? kbd-sync? (symbol? key))) (import-lambda-definition %grab-key (Xdisplay xwindow key mod owner ptr-sync? kbd-sync? flag) "scx_Grab_Key") ; --- (define (ungrab-key window key mod) (%ungrab-key (display-Xdisplay (window-display window)) (window-Xwindow window) key mod (symbol? key))) (import-lambda-definition %ungrag-key (Xdisplay Xwindow key mod flag) "scx_Ungrab_Key") ; --- (define (allow-events display mode time) (%allow-events (display-Xdisplay display) mode time)) (import-lambda-definition %allow-events (Xdisplay mode time) "scx_Allow_Events") ; --- (define (grab-server display) (%grab-server (display-Xdisplay display))) (import-lambda-definition %grab-server (Xdisplay) "scx_Grab_Server") ; --- (define (ungrab-server display) (%ungrab-server (display-Xdisplay display))) (import-lambda-definition %ungrab-server (Xdisplay) "scx_Ungrab_Server") ; Implementation of with-server-grabbed follows... ;(define (with-server-grabbed display . body-forms) ;)