From 6ed5ef3d830d646e449b5fbf55cad93f201e47e7 Mon Sep 17 00:00:00 2001 From: frese Date: Mon, 15 Mar 2004 19:31:50 +0000 Subject: [PATCH] - added screen-number-of-screen function --- c/xlib/display.c | 7 +++++++ scheme/xlib/display.scm | 3 +++ scheme/xlib/xlib-interfaces.scm | 2 ++ 3 files changed, 12 insertions(+) diff --git a/c/xlib/display.c b/c/xlib/display.c index 777ecfe..b70bf7e 100644 --- a/c/xlib/display.c +++ b/c/xlib/display.c @@ -49,6 +49,12 @@ s48_value scx_enter_screen(Screen* scr) { return s; } +s48_value scx_Screen_Number_Of_Screen(s48_value screen) { + Screen* sp = (Screen*)s48_extract_integer(S48_RECORD_REF(screen, 0)); + int num = XScreenNumberOfScreen(sp); + return s48_enter_integer(num); +} + s48_value scx_display_list = S48_NULL; s48_value scx_general_after_function_binding = S48_FALSE; @@ -160,6 +166,7 @@ void scx_init_display(void) { S48_GC_PROTECT_GLOBAL(scx_display_list); S48_GC_PROTECT_GLOBAL(scx_screen_list); + S48_EXPORT_FUNCTION(scx_Screen_Number_Of_Screen); S48_EXPORT_FUNCTION(scx_Open_Display); S48_EXPORT_FUNCTION(scx_Close_Display); S48_EXPORT_FUNCTION(scx_Display_Last_Request_Read); diff --git a/scheme/xlib/display.scm b/scheme/xlib/display.scm index 7713553..5fded7d 100644 --- a/scheme/xlib/display.scm +++ b/scheme/xlib/display.scm @@ -148,6 +148,9 @@ ;(define (screen:cells screen) ; (visual:map-entries (screen:default-visual screen))) +(import-lambda-definition screen-number-of-screen (screen) + "scx_Screen_Number_Of_Screen") + ;; *** connect or disconnect to X server ***************************** (import-lambda-definition %open-display (display-name) diff --git a/scheme/xlib/xlib-interfaces.scm b/scheme/xlib/xlib-interfaces.scm index 50734d1..5f0dbcd 100644 --- a/scheme/xlib/xlib-interfaces.scm +++ b/scheme/xlib/xlib-interfaces.scm @@ -37,6 +37,8 @@ screen:min-maps screen:does-backing-store screen:does-save-unders? screen:event-mask + screen-number-of-screen + open-display close-display