et_rplevnt()

Adds, replaces, or deletes an entry in an event table

Call
#include <vv_sys.h>
EVENTFP et_rplevnt(eventcode, event_fp, etp)

USHORT eventcode

Event code to add to or modify in an event table

EVENTFP event_fp Pointer to event function to install in an event table
ETPTR etp Pointer to the event table to modify
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  
POINTER The pointer to the event function previously associated with this event code
NULLFP One of the following has occurred: (1) the event code passed is 0, (2) the event table pointer passed was NULLP, or (3) no function was previously associated with this event code. In the development libraries, NULLFP may signify that there is no empty entry to place the event code-event function combination. In this case, VV_ERR is set to FULLTABLE
Description

If the event code is 0 or the event table pointer is NULLP, et_rplevnt() immediately returns NULLFP.

If the passed parameters are not NULL, et_rplevnt() searches the event table for the specified event code. If the event code is found and the specified function pointer is not NULLFP, the old function pointer is replaced. The old event function pointer is returned.

If the event code is found and the specified event function pointer is NULLFP, the entry in the event table is cleared. The old event function pointer is returned.

If the event code is not found and the specified event function pointer is not NULLFP, the event code and its associated event function are placed in one of the empty entries in the table.

Related Functions

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


Home Contents Previous Next