|
|
int grafQuery ( grafData *g, char *query )Queries the function, string, and integer linked lists and returns one of G_FUNCTION, G_INTEGER, or G_STRING if the object is found. FAILURE is returned otherwise.
int grafGetFunction( grafData *g; char *id; codePnt** code )Returns SUCCESS or FAILURE depending on whether the function pointed to by id exists in the grafData structure pointed to by
g
.
int grafGetInt ( grafData *g; char *id; int *val )Returns SUCCESS if identifier is found, and returns an integer or FAILURE otherwise. For example, if PIXWIDTH is set to 640 in the grafinfo file, grafGetInt(g, ``PIXWIDTH`` &pixwidth, sets pixwidth to 640, and returns TRUE. To retrieve a parameter from a moninfo file, use the
MON_
prefix.
int grafGetString ( grafData *g; char *id; char **val )Returns a sting pointer in val and SUCCESS or FAILURE depending on whether it found the identifier. This string should be copied if the grafData structure is to be freed.
int grafExec ( grafData *g, char *function, int *result, int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9)Finds and executes the function and returns SUCCESS. FAILURE is returned if function was not found. If a non-NULL address is passed in as result, the value of R0 in the grafinfo file is returned in the pointer. R0 through R9 in the grafinfo procedure are initialized with the values that are passed into
a0
through a9
.
int grafGetMemInfo ( grafData *g; char *name; unsigned int *pbase, *psize, *pmapped)Retrieve memory information from the grafinfo file. Any display driver that needs to access memory on the adapter must use this routine. This replaces the MAP_CLASS ioctl used to access memory in earlier adapters.
The arguments are:
int grafPmemVmem ( grafData *g; unsigned int pmem )Returns a virtual memory address from a physical memory address. The return value is the virtual address of 0 if it fails. The physical address must have been specified in the grafinfo file using one of the MEMORY statements. The arguments are:
void grafRunFunction ( g, code, result, a0 a1 a2 a3 a4 a5 a6 a7 a8 a9) grafData *g; codePtr *code; int *result, a0 a1 a2 a3 a4 a5 a6 a7 a8 a9;Performs the same function as grafExec, but instead of searching for the function, runs the one passed in. Replaces the grafRunCode routine in the X11R4 Server Link Kit.
int grafVBRun(g, preg, nreg) grafData *g; int *preg; int nreg;Video BIOS execution.
g
preg
nreg
char *grafGetFullMode ) char *modename, char *ttyname )Determines the full mode name from the partial modename that is specified (in the format [[[[[vendor,]model,]class,]mode]]) as well as the ttyname. The mode information is derived from the grafdev file if ttyname is specified and is in grafdev. grafinfo.dev is used otherwise. NULL is returned if the information cannot be found. Both arguments are optional. (NULL should be passed if they are unspecified).
char *grafGetName ( char *modename )Returns a pointer to a string with a full filename for a grafinfo file of that mode. The mode must be a full mode (as returned by grafGetFullMode). Returns NULL if the mode is specified incorrectly.
int grafParseFile ( char *filename; char *modenam; grafData *g)Parses the grafinfo file and returns a pointer to the grafData structure corresponding to the mode in
g
.
The mode must be full. FAILURE is returned if the function fails.
The data from the DATA part of the grafinfo file for that mode is
placed in a couple of linked lists that are accessed easily by
grafGetInt and grafGetString.
Extensions to the DATA section are therefore automatic.
Similarly, the other procedures for that mode,
usually SetText and SetGraphics,
are in a linked list.
These can be called by grafExec.
Adding arbitrary functions to a
grafinfo file is automatic.
jgrafQuery can be used to check
if a function has been declared and can be used by the server
(for example ``blitting'' routines).
int grafFreeMode ( grafData *g )Frees all data associated with a mode. Returns SUCCESS if identifier was found and is an integer, or FAILURE otherwise. For example, grafGetInt(g, ``PIXWIDTH`` &pixwidth, sets pixwidth to 640 specified with a PIXWIDTH = 640 entry in the grafinfo file and return TRUE. In this example FAILURE is returned if PIXWIDTH is not present in the DATA section.
char *grafError ()
The grafGetFullMode( ), grafGetFunction( ), grafGetInt( ), grafGetName( ), and grafGetString( ) functions are supported on AIX 5L. The other functions listed on this page cannot be used in NFB drivers for AIX 5L.
void grafRunCode ( g, code, result, a0 a1 a2 a3 a4 a5 a6 a7 a8 a9) codePtr *code; int *result, a0 a1 a2 a3 a4 a5 a6 a7 a8 a9;New drivers should use grafRunFunction rather than grafRunCode.
``Setting up the grafinfo file (SVR5 and SCO OpenServer 5)'' in Developing NFB graphics adapter drivers.