|
|
#include <X11/Xlibint.h> #include <X11/Xproto.h> #include <X11/Xprotostr.h> #include <stdio.h> #include "xsight.h"
int XsightQueryExtension (dpy) Display *dpy;
int XsightGrabDisplay (dpy) Display *dpy;
void XsightUnGrabDisplay (dpy) register Display *dpy;
int XsightGetDisplayDeviceInfo (dpy, major, minor, namebuf, nbytes) Display *dpy; int *major; int *minor; char *namebuf; int *nbytes;
int XsightGetEventDeviceInfo (dpy, major, minor, namebuf, nbytes) Display *dpy; int *major; int *minor; char *namebuf; int *nbytes;
int XsightGetServerHostname (dpy, name, nbytes) Display *dpy; char *name; int *nbytes;
void XsightSetSWSequence (dpy, string) Display *dpy; char *string;
int XsightGetSWSequence (dpy, keyname, nbytes) Display *dpy; char *keyname; int *nbytes;
void XsightSetAltSysReq (dpy, on) Display *dpy; Bool on;void XsightSetScreenSwitch (dpy, on) Display *dpy; Bool on;
A string with one blank character means an Fkey by itself will switch screens.
The XsightQueryExtension can generate a "BadImplementation" error.
XsightGrabDisplay grabs the display from the server. Further keyboard and mouse events are reported to the grabbing client and the server is prevented from writing to the display. The server will return the graphics adaptor to text mode and will continue to process requests.
XsightUnGrabDisplay function releases the display hardware to the server. The server will refresh the screen and begin processing events.
XsightGetDisplayDeviceInfo returns the name, major device number and minor device number of the keyboard. The filename of the tty associated with the keyboard (e.g., /dev/tty02) is indicated by namebuf. namebuf is nbytes in length.
XsightGetEventDeviceInfo returns the name, major device number and minor device number of the serial port or device associated with the mouse. namebuf contains the file name (e.g., /dev/tty1a). nbytes is the length of namebuf.
XsightGetServerHostname obtains the name of the host for the server. This should be compared to the current hostname to verify that the client and server are running on the same host. The name of the host is indicated by name. nbytes is the length of name.
XsightSetSWSequence set the key sequence to be used to switch screens.
XsightGetSWSequence obtains the key sequence used to switch screens. The key is indicated by keyname. keyname is nbytes in length.
XsightSetAltSysReq enable or disable the ability to exit the server.
XsightSetScreenSwitch enable or disable the ability to switch screens.