From b4fb3ffd9f35f8dd8285d7fcc22c3e2a8d0a4086 Mon Sep 17 00:00:00 2001 From: frese Date: Tue, 9 Oct 2001 15:33:45 +0000 Subject: [PATCH] - added display-select-input, resp. scx_Display_Select_Input. --- c/xlib/display.c | 8 ++++++++ scheme/xlib/display.scm | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/c/xlib/display.c b/c/xlib/display.c index a150e48..e84dd30 100644 --- a/c/xlib/display.c +++ b/c/xlib/display.c @@ -233,6 +233,13 @@ s48_value scx_List_Pixmap_Formats (s48_value Xdisplay) { return ret; } +s48_value scx_Display_Select_Input(s48_value Xdisplay, s48_value Xwindow, + s48_value event_mask) { + XSelectInput(SCX_EXTRACT_DISPLAY(Xdisplay), + SCX_EXTRACT_WINDOW(Xwindow), + Symbols_To_Bits(event_mask, Event_Mask_Syms)); +} + void scx_init_display(void) { S48_GC_PROTECT_GLOBAL(internal_after_function_binding); internal_after_function_binding = @@ -268,4 +275,5 @@ void scx_init_display(void) { S48_EXPORT_FUNCTION(scx_No_Op); S48_EXPORT_FUNCTION(scx_List_Depths); S48_EXPORT_FUNCTION(scx_List_Pixmap_Formats); + S48_EXPORT_FUNCTION(scx_Display_Select_Input); } diff --git a/scheme/xlib/display.scm b/scheme/xlib/display.scm index 95863b0..7f1b83c 100644 --- a/scheme/xlib/display.scm +++ b/scheme/xlib/display.scm @@ -299,3 +299,14 @@ (lambda (display) (display-wait-output display #f)))) +;; display-select-input requests that the X server report the events +;; associated with the specified event mask. See XSelectInput. + +(define (display-select-input window event-mask) + (%display-select-input (display-Xdisplay (window-display window)) + (window-Xwindow window) + event-mask)) + +(import-lambda-definition %display-select-input (Xdisplay Xwindow Xevent-mask) + "scx_Display_Select_Input") +