DISP_ADD_FUNC()

Add an entry to a function table

Synopsis:

#include <graphics/display.h>

#define DISP_ADD_FUNC(tabletype, table, entry, func, limit) …

Description:

When the graphics framework calls your driver's primary entry points:

use the DISP_ADD_FUNC() macro to add your driver's functions to the appropriate table:

The DISP_ADD_FUNC() macro adds the function only if there's room for it in the table. If you use this macro, newer drivers that supply more functions will run properly with older versions of the graphics framework that supply smaller function tables.

The arguments are:

tabletype
The data type for the table (e.g. disp_draw_contextfuncs_t).
table
A pointer to the instance of the table that you want to add the function to.
entry
The name of the entry you want to set in the table (e.g. draw_span).
func
A pointer to the function that your driver provides.
limit
The size of the table, in bytes.

Examples:

DISP_ADD_FUNC (disp_draw_corefuncs_t,
               &my_contextfuncs, blit1,
               &my_blit1_fn, tabsize);

Classification:

Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

devg_get_contextfuncs(), devg_get_corefuncs(), devg_get_memfuncs(), devg_get_miscfuncs(), devg_get_modefuncs(), devg_get_vcapfuncs(), disp_draw_contextfuncs_t, disp_draw_corefuncs_t, disp_draw_miscfuncs_t, disp_memfuncs_t, disp_modefuncs_t, disp_vcapfuncs_t,