- added comments and newlines.

This commit is contained in:
frese 2001-10-09 15:32:54 +00:00
parent 648252ba0d
commit bb1ee4a138
8 changed files with 241 additions and 68 deletions

View File

@ -1,3 +1,7 @@
;; iconfiy-window send a WM_CHANGE_STATE message (in an appropiate
;; format), to the root window of the specified screen. See
;; XIconifyWindow.
(define (iconify-window window screen-number)
(check-screen-number (window-display window) screen-number)
(if (not (%iconify-window (display-Xdisplay (window-display window))
@ -9,6 +13,10 @@
(import-lambda-definition %iconify-window (Xdisplay Xwindow scr-num)
"scx_Iconify_Window")
;; withdraw-window unmaps the specified window and sends a synthetic
;; UnmapNotify event to the root window of the specified screen. See
;; XWithdrawWindow.
(define (withdraw-window window screen-number)
(check-screen-number screen-number)
(if (not (%withdraw-window (display-Xdisplay (window-display window))
@ -20,6 +28,11 @@
(import-lambda-definition %withdraw-window (Xdisplay Xwindow scr-num)
"scx_Withdraw_Window")
;; reconfigure-wm-window change attributes of the specified window
;; similar to configure-window, or sends a ConfigureRequestEvent to
;; the root window if that fails. See XReconfigureWMWindow. See
;; configure-window.
(define (reconfigure-wm-window window screen-number . args)
(check-screen-number screen-number)
(if (not (%reconfigure-wm-window (display-Xdisplay (window-display window))
@ -32,6 +45,9 @@
(import-lambda-definition %reconfigure-wm-window (Xdisplay Xwindow scrnum alist)
"scx_Reconfigure_Wm_Window")
;; wm-command reads the WM_COMMAND property from the specified window
;; and returns is as a list of strings. See XGetCommand.
(define (wm-command window)
(vector->list (%wm-command (display-Xdisplay (window-display window))
(window-Xwindow window))))
@ -39,6 +55,25 @@
(import-lambda-definition %wm-command (Xdisplay Xwindow)
"scx_Wm_Command")
;; set-wm-command! sets the WM_COMMAND property (the command and
;; arguments used to invoke the application). The command has to be
;; specified as a list of string or symbols. See XSetCommand.
(define (set-wm-command! window command)
(%set-wm-command! (display-Xdisplay (window-display window))
(window-Xwindow window)
(list->vector (map (lambda (x)
(if (symbol? x)
(symbol->string x)
x))
command))))
(import-lambda-definition %set-wm-command (Xdisplay Xwindow command)
"scx_Set_Wm_Command")
;; get-text-property returns the property specified by atom of the
;; specified window as a list of strings. See XGetTextProperty.
(define (get-text-property window atom)
(let ((res (%get-text-property (display-Xdisplay (window-display window))
(window-Xwindow window)
@ -51,6 +86,9 @@
(import-lambda-definition %get-text-property (Xdisplay Xwindow Xatom)
"scx_Get_Text_Property")
;; set-text-property! sets the property specified by atom of the
;; specified window to value - a list of strings or symbols.
(define (set-text-property! window value atom)
(let ((res (%set-text-property! (display-Xdisplay (window-display window))
(window-Xwindow window)
@ -63,6 +101,11 @@
(import-lambda-definition %set-text-property! (Xdisplay Xwindow value XAtom)
"scx_Set_Text_Property")
;; wm-protocols function returns the list of atoms stored in the
;; WM_PROTOCOLS property on the specified window. These atoms describe
;; window manager protocols in which the owner of this window is
;; willing to participate. See XGetWMProtocols.
(define (wm-protocols window)
(let ((res (%wm-protocols (display-Xdisplay (window-display window))
(window-Xwindow window))))
@ -74,6 +117,9 @@
(import-lambda-definition %wm-protocols (Xdisplay Xwindow)
"scx_Wm_Protocols")
;; set-wm-protocols! sets the WM_PROTOCOLS property of the specified
;; window. protocols has to be a list of atoms. See XSetWMProtocols.
(define (set-wm-protocols! window protocols)
(let ((res (%set-wm-protocols! (display-Xdisplay (window-display window))
(window-Xwindow window)
@ -85,6 +131,9 @@
(import-lambda-definition %set-wm-protocols! (Xdisplay Xwindow protocols)
"scx_Set_Wm_Protocols")
;; wm-class returns the class hint for the specified window. See
;; XGetClassHint.
(define (wm-class window)
(let ((res (%wm-class (display-Xdisplay (window-display window))
(window-Xwindow window))))
@ -95,6 +144,9 @@
(import-lambda-definition %wm-class (Xdisplay Xwindow)
"scx_Wm_Class")
;; set-wm-class! sets the class hint for the specified window. See
;; XSetClassHint.
(define (set-wm-class! window name class)
(%set-wm-class! (display-Xdisplay (window-display window))
(window-Xwindow window)
@ -108,17 +160,10 @@
(import-lambda-definition %set-wm-class! (Xdisplay Xwindow name class)
"scx_Set_Wm_Class")
(define (set-wm-command! window command)
(%set-wm-command! (display-Xdisplay (window-display window))
(window-Xwindow window)
(list->vector (map (lambda (x)
(if (symbol? x)
(symbol->string x)
x))
command))))
(import-lambda-definition %set-wm-command (Xdisplay Xwindow command)
"scx_Set_Wm_Command")
;; wm-hints reads the window manager hints and returns them as an
;; alist mapping symbols to specific values. The hints are: 'input?
;; 'initial-state 'icon-pixmap 'icon-window 'icon-x 'icon-y 'icon-mask
;; 'window-group 'urgency. See XGetWMHints for a description.
(define (wm-hints window)
(let ((res (%wm-hints (display-Xdisplay (window-display window))
@ -145,6 +190,11 @@
(import-lambda-definition %wm-hints (Xdisplay Xwindow)
"scx_Wm_Hints")
;; set-wm-hints! sets the specified window manager hints. The hints
;; must be specified together with their names. Either by giving two
;; parameter 'name value, or the last argument may be an alist, as
;; returned by wm-hints. See XSetWMHints.
(define (set-wm-hints! window . args)
(%set-wm-hints! (display-Xdisplay (window-display window))
(window-Xwindow window)
@ -160,6 +210,10 @@
(import-lambda-definition %set-wm-hints! (Xdisplay Xwindow args)
"scx_Set_Wm_Hints")
;; transient-for returns the WM_TRANSIENT_FOR property for the
;; specified window. The value of that property is a window. See
;; XGetTransientForHint.
(define (transient-for window)
(make-window (%transient-for (display-Xdisplay (display-window window))
(window-Xwindow window))
@ -169,6 +223,10 @@
(import-lambda-definition %transient-for (Xdisplay Xwindow)
"scx_Transient_For")
;; set-transient-for! sets the WM_TRANSIENT_FOR property of the
;; specified window to the specified property-window. See
;; XSetTransientForHint.
(define (set-transient-for! window property-window)
(%set-transient-for (display-Xdisplay (window-display window))
(window-Xwindow window)
@ -178,6 +236,9 @@
Xpropertywindow)
"scx_Set_Transient_For")
;; The following function a wrappers for the get/set-text-property
;; function.
(define xa-wm-name (make-atom 39))
(define xa-wm-icon-name (make-atom 37))
(define xa-wm-client-machine (make-atom 36))
@ -200,6 +261,13 @@
(define (set-wm-client-machine! w s)
(set-text-property! w s xa-wm-client-machine))
;; wm-normal-hints/set-wm-normal-hints! get or set the size hints
;; stored in the WM_NORMAL_HINTS property on the specified window. The
;; hints are '(x y width height us-position us-size min-width
;; min-height max-width max-height width-inc height-inc min-aspect-x
;; min-aspect-y max-aspect-x max-aspect-y base-width base-height
;; gravity). See XGetWMNormalHints, XSetWMNormalHints.
(define (wm-normal-hints window)
(let* ((v (%wm-normal-hints (display-Xdisplay (window-display window))
(window-Xwindow window)))
@ -224,6 +292,12 @@
(import-lambda-definition %set-wm-normal-hints (Xdisplay Xwindow alist)
"scx_Set_Wm_Normal_Hints")
;; icon-sizes returns the icon sizes specified by a window manager as
;; a list. If no icon sizes are specified the list is empty. An icon
;; size itself is a list consisting of integers meaning '(min-width
;; min-height max-width max-height width-inc height-inc). See
;; XGetIconSizes.
(define (icon-sizes window)
(let ((r (%icon-sizes (display-Xdisplay (window-display window))
(window-Xwindow window))))
@ -233,6 +307,9 @@
(import-lambda-definition %icon-sizes (Xdisplay Xwindow)
"scx_Icon_Sizes")
;; set-icon-sizes! is used only by window managers to set the
;; supported icon sizes. See icon-sizes, XSetIconSizes.
(define (set-icon-sizes! window icon-sizes)
(%set-icon-sizes! (display-Xdisplay (window-display window))
(window-Xwindow window)

View File

@ -1,3 +1,7 @@
;; create-pixmap-cursor returns a cursor, that was build using the
;; pixmaps src and mask, and the colors foreground and background. x
;; and y specify the hotspot of the cursor. See XCreatePixmapCursor.
(define (create-pixmap-cursor src mask x y foreground background)
(let ((display (pixmap-display src)))
(make-cursor (%create-pixmap-cursor (display-Xdisplay display)
@ -14,6 +18,10 @@
(import-lambda-definition %create-pixmap-cursor (Xdisplay src mask x y f b)
"scx_Create_Pixmap_Cursor")
;; create-glyph-cursor returns a cursor, that was build using the font
;; src, an integer src-char, a font mask, an integer mask-char, and
;; the colors foreground and background. See XCreateGlyphCursor.
(define (create-glyph-cursor src src-char mask mask-char foreground background)
(let ((display (font-display src)))
(make-cursor (%create-glyph-cursor (display-Xdisplay display)
@ -30,6 +38,11 @@
(Xdisplay src srcc mask maskc f b)
"scx_Create_Glyph_Cursor")
;; create-font-cursor returns a cursor, that was build with
;; create-glyph-cursor using a font named "cursor", src-char, the
;; character following src-char as mask-char, and black and as
;; foreground and background.
(define (create-font-cursor display src-char)
(let ((font (load-font display "cursor")))
(create-glyph-cursor font src-char
@ -41,6 +54,8 @@
;;(unload-font font)
))
;; recolor-cursor resets the colors of an existing cursor. See XRecolorCursor.
(define (recolor-cursor cursor foreground background)
(%recolor-cursor (display-Xdisplay (cursor-display cursor))
(cursor-Xcursor cursor)

View File

@ -90,4 +90,4 @@
p)))
(import-lambda-definition %display-message-fd (Xdisplay)
"scx_Display_Message_fd")
"scx_Display_Message_fd")

View File

@ -14,6 +14,10 @@
(lambda (drawable)
(vector-ref (get-geometry drawable) num)))
;; the drawable-* functions return common information of a window or a
;; pixmap. drawable-root returns a window, all other functions return
;; an integer. See XGetGeometry.
(define drawable-root (make-geometry-getter 0))
(define drawable-x (make-geometry-getter 1))
(define drawable-y (make-geometry-getter 2))
@ -21,5 +25,3 @@
(define drawable-height (make-geometry-getter 4))
(define drawable-border-width (make-geometry-getter 5))
(define drawable-depth (make-geometry-getter 6))

View File

@ -1,8 +1,9 @@
; 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)
;; grab-pointer grabs control of a pointer for your client only.
;; It returns on of the symbols:
;; (success not-viewable already-grabbed frozen invalide-time)
;; See XGrabPointer.
(define (grab-pointer window owner? events ptr-sync? kbd-sync?
confine-to cursor time)
@ -14,14 +15,12 @@
(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.
;; ungrab-pointer releases the pointer. See XUngrabPointer.
(define (ungrab-pointer display time)
(%ungrab-pointer (display-Xdisplay display)
@ -31,7 +30,8 @@
"scx_Ungrab_Pointer")
; ---
;; grab-button performs a grab-pointer depending on a corresponding
;; button press event. See XGrabButton.
(define (grab-button window button mod owner? events ptr-sync? kbd-sync?
confine-to cursor)
@ -47,9 +47,8 @@
Xconfine-to Xcursor)
"scx_Grab_Button")
; ---
;; ungrab-button releases the passive grab, performed by
;; grab-button. See XUngrabButton.
(define (ungrab-button window button modifiers)
(%ungrab-button (display-Xdisplay (window-display window))
@ -60,8 +59,9 @@
button modifiers)
"scx_Ungrab_Button")
; ---
;; change-active-pointer-grab changes the specified dynamic parameters
;; if the pointer is actively grabbed by the client (by grab-pointer,
;; not by grab-button). See XChangeActivePointerGrab.
(define (change-active-pointer-grab display events cursor time)
(%change-active-p-g (display-Xdisplay display)
@ -71,8 +71,12 @@
cursor time)
"scx_Change_Active_Pointer_Grab")
; ---
;; grab-keyboard actively grabs control of the keyboard and generates
;; FocusIn and FocusOut events. Further key events are reported only
;; to the grabbing client.
;; ungrab-keyboard releases the keyboard and any queued events if this
;; client has it actively grabbed from either grab-keyboard or
;; grab-Key. See XGrabKeyboard and XUngrabKeyboard.
(define (grab-keyboard window owner? ptr-sync? kbd-sync? time)
(%grab-keyboard (display-Xdisplay (window-display window))
@ -84,10 +88,6 @@
time)
"scx_Grab_Keyboard")
; ---
(define (ungrab-keyboard display time)
(%ungrab-keyboard (display-Xdisplay display)
time))
@ -96,8 +96,10 @@
(import-lambda-definition %ungrab-keyboard (Xdisplay time)
"scx_Ungrab_Keyboard")
; ---
;; The grab-key function establishes a passive grab on the
;; keyboard. In the future, the keyboard is actively
;; grabbed.
;; ungrab-key releases this passive grab. See XGrabKey and XUngrabKey.
(define (grab-key window key mod owner? ptr-sync? kbd-sync?)
(%grab-key (display-Xdisplay (window-display window))
@ -108,9 +110,6 @@
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)
@ -120,8 +119,8 @@
flag)
"scx_Ungrab_Key")
; ---
;; allow-events function releases some queued events if the client has
;; caused a device to freeze. See XAllowEvents.
(define (allow-events display mode time)
(%allow-events (display-Xdisplay display)
@ -130,7 +129,10 @@
(import-lambda-definition %allow-events (Xdisplay mode time)
"scx_Allow_Events")
; ---
;; grab-server disables processing of requests and close downs on all
;; other connections than the one this request arrived on. You should
;; not grab the X server any more than is absolutely necessary. See
;; XGrabServer.
(define (grab-server display)
(%grab-server (display-Xdisplay display)))
@ -138,7 +140,9 @@
(import-lambda-definition %grab-server (Xdisplay)
"scx_Grab_Server")
; ---
;; ungrab-server restarts processing of requests and close downs on
;; other connections. You should avoid grabbing the X server as much
;; as possible. See XUngrabServer.
(define (ungrab-server display)
(%ungrab-server (display-Xdisplay display)))
@ -147,7 +151,6 @@
"scx_Ungrab_Server")
; Implementation of with-server-grabbed follows...
;; with-server-grabbed not implemented (yet).
;(define (with-server-grabbed display . body-forms)
;)
;;(define-syntax (with-server-grabbed display . body-forms))

View File

@ -2,7 +2,7 @@
;; creation date : 16/07/2001
;; last change : 16/07/2001
; ---
;; create a new pixmap.
(define (create-pixmap drawable width height depth)
(let* ((display (drawable-display drawable))
@ -14,7 +14,9 @@
(import-lambda-definition %create-pixmap (Xdisplay Xdrawable w h depth)
"scx_Create_Pixmap")
; ---
;; create-bitmap-from-data creates a new pixmap, consisting of the
;; image found in data, which has to be a string. Such an image can be
;; generated with write-bitmap-file. See XCreateBitmapFromData.
(define (create-bitmap-from-data window data width height)
(let* ((display (window-display window))
@ -26,7 +28,9 @@
(import-lambda-definition %create-bitmap-from-data (Xdisplay Xdrawable data w h)
"scx_Create_Bitmap_From_Data")
; ---
;; create-pixmap-from-bitmap-data creates a pixmap of the given depth
;; and then does a bitmap-format XPutImage of the data into it. See
;; XCreatePixmapFromBitmapData.
(define (create-pixmap-from-bitmap-data win data widht height
foregrnd backgrnd depth)
@ -42,7 +46,10 @@
(Xdisplay Xdrawabel data w h f b depth)
"scx_Create_Pixmap_From_Bitmap_Data")
; Returns a list of five elements: (pixmap widht heigth x y)
;; read-bitmap-file reads the bitmap data from the file, creates a new
;; pixmap and returns a list of five elements (pixmap widht heigth
;; x-hot y-hot). if x-hot and y-hot are not defined in the file then
;; they are set to -1,-1. See XReadBitmapFile;
(define (read-bitmap-file drawable filename)
(let ((res (%read-bitmap-file (display-Xdisplay (drawable-display drawable))
@ -55,19 +62,18 @@
(import-lambda-definition %read-bitmap-file (Xdisplay Xdrawable file)
"scx_Read_Bitmap_File")
;; write-bitmap-file writes a bitmap out to a file in the X Version 11
;; format. The optional argument hotspot specifies the hotspot as a
;; pair (x-hot . y-hot) which defaults to (-1 . -1). See
;; XWriteBitmapFile.
; --- coord is optional. It should be the empty list or (x-hot y-hot)
(define (write-bitmap-file filename pixmap width height . coord)
(define (write-bitmap-file filename pixmap width height . hotspot)
(let ((dpy (display-Xdisplay (pixmap-display pixmap)))
(xy-hot (cond
((null? coord) (list -1 -1))
((null? (cdr coord))
(error "zero or both coordinates must be defined"))
(else coord))))
((null? hotspot) (cons -1 -1))
(else (car hotspot)))))
(%write-bitmap-file dpy filename pixmap widht height
(car xy-hot) (cadr xy-hot))))
(car xy-hot) (cdr xy-hot))))
(import-lambda-definition %write-bitmap-file (Xdisplay file Xpixmap w h x y)
"scx_Write_Bitmap_File")
"scx_Write_Bitmap_File")

View File

@ -18,7 +18,10 @@
(import-lambda-definition xlib-release-6-or-later? ()
"scx_Xlib_Release_6_Or_Later")
; Get the user-default values of a specified program
;; get-default returns the user default values of a specified program
;; from the X-resource database. program and option should be
;; strings. On success a string is returned, otherwise #f. See
;; XGetDefault.
(define (get-default dpy program option)
(%get-default (display-Xdisplay dpy)
@ -28,8 +31,9 @@
(import-lambda-definition %get-default (Xdisplay program option)
"scx_Get_Default")
; ---
;; resource-manager-string returns the RESOURCE_MANAGER property from
;; the server's root window of screen 0, or #f if no such property
;; exists. See XResourceManagerString.
(define (resource-manager-string dpy)
(%resource-manager-string (display-Xdisplay dpy)))
@ -37,7 +41,12 @@
(import-lambda-definition %resource-manager-string (Xdisplay)
"scx_Resource_Manager_String")
; ---
;; parse-geometry parses a string for the standard X format for x, y,
;; width and height arguments. Definition:
;; [=][<width>{xX}<height>][{+-}<xoffset>{+-}<yoffset>]. The return
;; value is a list (x-negative? y-negative? x y width height), where
;; x, y, width, height can be #f if they were not specified in the
;; string. See XParseGeometry.
(define (parse-geometry string)
(reverse (%parse-geometry string)))
@ -45,13 +54,13 @@
(import-lambda-definition %parse-geometry (string)
"scx_Parse_Geometry")
; ---
;; these are some functions for clipboard handling.
(define (store-buffer) #f)
(define (store-bytes) #f)
(define (fetch-buffer) #f)
(define (fetch-bytes) #f)
(define (rotate-buffers) #f)
(define store-buffer #f)
(define store-bytes #f)
(define fetch-buffer #f)
(define fetch-bytes #f)
(define rotate-buffers #f)
(let ((xa-string (make-atom 31)) ; (31 is XA_STRING)
(xa-cut-buffers

View File

@ -1,3 +1,8 @@
;; If the specified window is mapped, reparent-window automatically
;; performs an UnmapWindow request on it, removes it from its current
;; position in the hierarchy, and inserts it as the child of the
;; specified parent. See XReparentWindow.
(define (reparent-window window parent-window x y)
(%reparent-window (display-Xdisplay (window-display window))
(window-Xwindow window)
@ -7,6 +12,9 @@
(import-lambda-definition %reparent-window (Xdisplay Xwindow Xwindow_parent x y)
"scx_Reparent_Window")
;; install-colormap function installs the specified colormap for
;; its associated screen. See XInstallColormap.
(define (install-colormap colormap)
(%install-colormap (display-Xdisplay (colormap-display colormap))
(colormap-Xcolormap colormap)))
@ -14,6 +22,9 @@
(import-lambda-definition %install-colormap (Xdisplay Xcolormap)
"scx_Install_Colormap")
;; uninstall-colormap removes the specified colormap from the required
;; list for its screen. See XUninstallColormap.
(define (uninstall-colormap colormap)
(%uninstall-colormap (display-Xdisplay (colormap-display colormap))
(colormap-Xcolormap colormap)))
@ -21,6 +32,10 @@
(import-lambda-definition %uninstall-colormap (Xdisplay Xcolormap)
"scx_Uninstall_Colormap")
;; list-installed-colormaps function returns a list of the currently
;; installed colormaps for the screen of the specified window. See
;; XListInstalledColormaps.
(define (list-installed-colormaps window)
(let* ((dpy (window-display window))
(ret (%list-installed-colormaps
@ -33,6 +48,9 @@
(import-lambda-definition %list-installed-colormaps (Xdisplay Xwindow)
"scx_List_Installed_Colormaps")
;; set-input-focus function changes the input focus and the
;; last-focus-change time. See XSetInputFocus.
(define (set-input-focus display window revert-to time)
(%set-input-focus (display-Xdisplay display)
(begin
@ -46,11 +64,20 @@
(import-lambda-definition %set-input-focus (Xdisplay Xwindow)
"scx_Set_Input_Focus")
;; input-focus returns the current focus window and the current focus
;; state as a pair. See XGetInputFocus.
(define (input-focus display)
(let ((ret (%input-focus (display-Xdisplay display))))
(cons (make-window (car ret) display #f)
(cdr ret))))
(import-lambda-definition %input-focus (Xdisplay)
"scx_Input_Focus")
;; general-warp-pointer moves the pointer in the specified way. See
;; XWarpPointer for a detailed description.
(define (general-warp-pointer display
dst-win dst-x dst-y
src-win src-x src-y src-width src-height)
@ -64,16 +91,27 @@
Xsrc-win src-x src-y src-width src-height)
"scx_General_Warp_Pointer")
;; warp-pointer calls general-warp-pointer with using 'none as the
;; src-win and 0 for the src-* coordinates. The display is taken from
;; dst-window.
(define (warp-pointer dst-window dst-x dst-y)
(general-warp-pointer (window-display dst-window)
dst-window dst-x dst-y
'none 0 0 0 0))
;; warp-pointer-relative uses general-warp-pointer to move the pointer
;; by x-offset and y-offset away from it's current position.
(define (warp-pointer-relative display x-offset y-offset)
(general-warp-pointer display
'none x-offset y-offset
'none 0 0 0 0))
;; bell rings the bell on the keyboard on the specified display, if
;; possible. The optional percent argument specifies the volume in a
;; range from -100 to 100. 0 is the default value. See XBell.
(define (bell display . percent)
(%bell (display-Xdisplay display)
(if (null? percent)
@ -83,6 +121,9 @@
(import-lambda-definition %bell (Xdisplay percent)
"scx_Bell")
;; set-access-control either enables or disables the use of the access
;; control list at each connection setup. See XSetAccessControl.
(define (set-access-control display enable?)
(%set-access-control (display-Xdisplay display)
enable?))
@ -90,6 +131,12 @@
(import-lambda-definition %set-access-control (Xdisplay on)
"scx_Set_Access_Control")
;; Depending on the specified mode, change-save-set either inserts or
;; deletes the specified window from the client's save-set. The
;; specified window must have been created by some other client, or a
;; BadMatch error results. mode is one of 'insert or 'delete. See
;; XChangeSaveSet.
(define (change-save-set window mode)
(%change-save-set (display-Xdisplay (window-display window))
(window-Xwindow window)
@ -98,6 +145,10 @@
(import-lambda-definition %change-save-set (Xdisplay Xwindow mode)
"scx_Change_Save_Set")
;; set-close-down-mode defines what will happen to the client's
;; resources at connection close. mode is one of 'destroy-all,
;; 'retain-permanent or 'retain-temporary. See XSetCloseDownMode.
(define (set-close-down-mode display mode)
(%set-close-down-mode (display-Xdisplay display)
mode))
@ -105,12 +156,22 @@
(import-lambda-definition %set-close-down-mode (Xdisplay mode)
"scx_Set_Close_Down_Mode")
;; get-pointer-mapping returns a vector, that specifies in the i-th
;; element the logical button number for the physical button i+1. See
;; XGetPointerMapping.
(define (get-pointer-mapping display)
(%get-pointer-mapping (display-Xdisplay display)))
(import-lambda-definition %get-pointer-mapping (Xdisplay)
"scx_Get_Pointer_Mapping")
;; set-pointer-mapping sets the mapping of the pointer. mapping must
;; be a vector of the same length that get-pointer-mapping would
;; return. If any of the buttons to be altered are logically in the
;; down state, then #f is returned. #t otherwise. See
;; XSetPointerMapping.
(define (set-pointer-mapping display mapping)
(%set-pointer-mapping (display-Xdisplay display)
mapping))