Details
GrReqShmCmds ()
void GrReqShmCmds (long shmsize); |
Requests a shared memory area of the specified size to use for transferring
command arguments. This is faster but less portable than the standard BSD
sockets method of communication (and of course will only work if the client
and server are on the same machine). Apart from the initial allocation of
the area using this call, the use of shared memory is completely
transparent. Additionally, if the allocation fails we silently and
automatically fall back on socket communication. It is safe to call this
function even if shared memory support is not compiled in; it will simply
do nothing.
FIXME: how does the user decide what size of shared memory area to allocate?
GrInjectKeyboardEvent ()
void GrInjectKeyboardEvent (GR_WINDOW_ID wid,
GR_UNICODE uch,
GR_CHAR ch,
int modif,
int special,
unsigned char content); |
Sends a keyboard event to the specified window, or to the window with the
current keyboard focus if 0 is used as the ID. The other arguments
correspond directly to the fields of the same names in the keyboard event
structure.
GrRegisterInput ()
void GrRegisterInput (int fd); |
Register an extra file descriptor to monitor in the main select() call.
An event will be returned when the fd has data waiting to be read if that
event has been selected for.
GrPrepareSelect ()
void GrPrepareSelect (int *maxfd,
void *rfdset); |
Prepare for a GrServiceSelect function by asking the server to send the next
event but not waiting around for it to arrive and initialising the
specified fd_set structure with the client/server socket descriptor and any
previously registered external file descriptors. Also compares the current
contents of maxfd, the client/server socket descriptor, and the previously
registered external file descriptors, and returns the highest of them in
maxfd.
GrServiceSelect ()
void GrServiceSelect (void *rfdset,
GR_FNCALLBACKEVENT fncb); |
Used by GrMainLoop() to call the specified callback function when an
event arrives or there is data waiting on an external fd specified by
GrRegisterInput().
GrBell ()
Asks the server to ring the console bell on behalf of the client (intended
for terminal apps to be able to ring the bell on the server even if they
are running remotely).
GrSetScreenSaverTimeout ()
void GrSetScreenSaverTimeout (GR_TIMEOUT timeout); |
Sets the number of seconds of inactivity before a screen saver activate
event is sent to the root window ID. A value of 0 activates the
screen saver immediately, and a value of -1 disables the screen saver
function.