Silverfrost Logo About Us | Contact Us

Standard call-back functions

Standard call-back functions are used with ClearWin+  format (winio@) windows.  They are functions with no arguments and return an integer result. A returned zero or negative value causes the parent window to close. The corresponding call to winio@ will return the same value made positive. A returned value of 1 leaves the window open and updates the whole display area to reflect any changes in the data. This is not normally the most suitable return value because frequent returns can cause the screen to flicker. A returned value of 2 leaves the window open but does not update it. This value is best for repetitive display updates but you must update the parts of a window that have changed by calling window_update@ (see Updating windows). The call-back function used with %mg may also return the value 3 (see %mg - Message Callback).

A number of frequently used call-back functions can be specified as character strings that denote standard call-back functions. (Note that there is never any confusion between a pointer to one of these character strings and a genuine function pointer, because all functions start with a distinctive sequence of machine instructions. The system decides whether the supplied pointer points to a function or to one of the special strings described below. If the supplied pointer points to an illegal address, this will cause an immediate program fault to be reported.)

Standard call-back functions usually appear within the argument list that follows the format string in a call to winio@. Some standard call-back functions require additional arguments that are placed in the winio@ argument list immediately after the string that denotes the standard call-back. The following functions are available.



Copyright © 1999-2020 Silverfrost Limited