XJS Extension for WeirdX
------------------------

README		This file
Imakefile	for xmkmf'ing Makefile to build the extension
XJS.h		extension header file
XJS.c		extension implementation
xjsstr.h	private extension header file
test/*		sample programs "jeval" and "jcall"
XJS.o		Linux GLIBC object of the extension for testing


The extension provides the following four procedures:

	Boolean XJSQueryExtension(Display *display)

Tests if the XJS extension is available in the X server, returning True
or False.

	Boolean XJSAYT(Display *display)

Tests if the XJS extension can communicate with the web browser the X
server is running on, returns True or False.

	int XJSEval(Display *display, char *expr,
		    char **data_return, int *length_return)

Evaluates the JavaScript expression described by expr and returns
the result in data_return and length_return. Return code is -1 on
error, 0 if the X protocol request failed, and 1 if the evaluation
produced a result.

	int XJSCall(Display *display, char *proc, char **args, int nargs,
		    char **data_return, int *length_return)

Calls the JavaScript procedure proc with arguments described by args and
nargs, and returns the result in data_return and length_return. Return
codes as in XJSEval().

For further information refer to the sample programs in the test directory.


Christian Werner
2000-03-08
