Previous: , Up: Miscellaneous Functions   [Contents][Index]

20.7 Other Functions

Function: sync-server

Flush all pending X requests, don’t wait for them to finish.

Function: send-client-message window type data format

Send an X ClientMessage event to window (a window object, the symbol root or a numeric xid).

The event will be of the type type (a symbol), contain the array of integers data (i.e. a vector or a string), and will be transferred as format sized quantities (8, 16 or 32).

Function: create-window parent x y width height

Create an unmapped window that is a child of parent (a window object, an integer window id, or the symbol root), with the specified dimensions.

Returns the window id of the new window.

Function: x-atom symbol

Return the integer identifying the X atom with the same name as symbol.

Function: x-atom-name integer

Return the symbol with the same name as the X atom identified by the integer integer.

Variable: canonical-display-name

A string containing the canonical name of the X display. This includes the full host name and the screen number. For example: "".

Variable: display-name

A string containing the name of the X display, exactly as passed to Sawfish. For example: ":0", or "foo:0.0".

Variable: saved-command-line-args

Holds a list of all of the command line arguments (including the executable name), except options related to session mangement.

Function: call-with-error-handler thunk

Call the zero-parameter function thunk. If an error occurs, trap it and pass its car and cdr to error-handler-function.

Function: load-module name

Ensure that module name has been loaded. This does not import its bindings or make them accessible.

Function: eval-in form struct-name

Evaluates form in the structure named by struct-name. Compare this with eval, which takes a structure object as its second parameter, not a structure name.

Variable: *user-module*

*user-module* is the default module for human interaction with Sawfish.

Function: user-eval form
Function: user-require feature

user-eval evaluates form in *user-module*. user-require evaluates (require feature) in *user-module*.

Function: quote-menu-item string

Escape any ‘_’ characters in string such that the result can be used as the label of a menu item.

Function: make-directory-recursively dir

Create directory dir. Any missing parent directories will also be created.

Function: locate-file filename dirs

Search for a file filename in any of the directories named by the list of strings dirs.

Function: clamp x lower upper

Return x clamped between lower and upper. If x is less than lower, return lower; if it is larger than upper return upper. Otherwise return x.

Function: clamp* x w lower upper

Return the interval (x, x+w) clamped between lower and upper. If x is less than lower, return lower. If x+w is larger than upper, return upper-w; this is a value of x that satisfies the upper bound, although it may violate the lower bound. Otherwise return x.

Function: uniquify-list lst

Remove all duplicates values from lst, using eq. The order of elements is not preserved.

Command: run-shell-command

Executes a shell command. This is a wrapper for system function, so in lisp code, use it instead. (see (librep)Shell Commands.)

Command: no-operation

Does nothing.

Previous: , Up: Miscellaneous Functions   [Contents][Index]