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

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.