DESIGN (xvwidgets) functions
LIBRARY ROUTINE
xvw_add_detectfile - add a (file) detect handler to an object
LIBRARY CALL
void xvw_add_detectfile(
xvobject object,
char *filename,
double argtime,
int (*routine)(xvobject, char *, kaddr),
kaddr client_data)
INPUT
- object - object on which to place the detect handler.
Pass NULL if the detect handler is to be invoked
in general, and not associated with any
particular object.
- filename - the name of the file to be monitored.
- argtime - the interval (in seconds) at which the file
should be checked for changes.
- routine - the detect handler routine to be called when
change to the file is detected.
- - object on which to place the detect handler.
Pass NULL if the detect handler is to be invoked
in general, and not associated with any
particular object.
- client_data - pointer to client data that
will be passed to detect handler
OUTPUT
none
RETURN VALUE
none
DESCRIPTION
Causes a detection mechanism to be installed on the
specified file. After the specified interval of time
has elapsed, the file will be checked for any modification.
If a modification to the file is detected, then the specified
detect handler is called.
The detect handler can be associated with an object, so that
file detection is automatically discontinued when the object is
destroyed. If NULL is passed for the object, then the detect
handler is added to the global file detection list.
The detect file callback must be declared in the following
form:
int detect_handler(
xvobject object,
char *filename,
kaddr client_data)
object -
If xvw_add_detectfile() is called with a particular
xvobject, that object will be passed into the detect handler.
filename -
This is the name of the file being monitored for change.
client_data -
The pointer to the client data, used to pass parameters
from the application to the detect handler.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$DESIGN/objects/library/xvwidgets/src/file.c
SEE ALSO
xvwidgets(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.