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") +