et_proc()

Searches the event table for the specified event code and calls its corresponding function

Call
#include <vv_sys.h>
int et_proc(eventp, etp, userp)

EVENTPTR eventp

Pointer to event to process

ETPTR etp Pointer to the event table to use
PTR userp Pointer to data to pass to key function
Description of Parameters

etp:Specify a pointer to an event table. The Vermont Views event tables are as follows:

CLETP Choice list event table
FLDETP Field event table
FMETP Form event table
DRAGETP Draw and drag event table
HELPETP Help event table
MEMOETP Memo event table
MNETP Menu event table
PUSHETP Pushbutton event table
RADIOETP Radio button event table
SRETP Scrollable region event table
SYSETP System event table
TTMEMOETP Tickertape memo event table
VIEWETP Viewing event table
LBOXETP List box event table
Returns  
>= 0 The specified event code is found
1 The specified event code is found, but its corresponding event function is a NULLFP. No event function is called.
-1 Either (1) the event code passed is 0, or (2) there is no entry in the event table for the event code and no default event function is installed
Description

If the event code is 0, et_proc() immediately returns -1.

If the event code is not 0, et_proc() searches the event table for the event code. If there is an entry in the table for the event code, the corresponding event function is called. The pointer to the data specified in the et_proc() call is passed to this function. et_proc() returns the value returned by the called event function.

If there is no entry in the event table for the event code, but there is a default event function installed, the default event function is called instead. The value returned by the called default event function is returned by et_proc().

If there is no entry in the event table for the event code, and there is no default event function installed, -1 is returned.

Related Functions

et_def(), et_delfp(), et_free(), et_getfp(), et_rplevnt()

Cautions

Because et_proc() returns -1 in the event of an error, functions installed in a event table should not return -1 unless an error occurs.


Home Contents Previous Next