|
|
#include "nfbWinStr.h"
For convenience, the nfb source
includes the NFB_WINDOW_PRIV macro
that takes a WindowPtr
as an argument
and returns a pointer to the corresponding
nfbWinOps structure.
typedef struct _nfbWinOps { void (* CopyRect) ( struct _Box *, struct _DDXPoint *, unsigned char, unsigned long, struct _Drawable * ) ; void (* DrawSolidRects) ( struct _Box *, unsigned int, unsigned long, unsigned char, unsigned long, struct _Drawable * ) ; void (* DrawImage) ( struct _Box *, void *, unsigned int, unsigned char, unsigned long, struct _Drawable * ) ; void (* DrawMonoImage) ( struct _Box *, void *, unsigned int, unsigned int, unsigned long, unsigned char, unsigned long, struct _Drawable * ) ; void (* DrawOpaqueMonoImage) ( struct _Box *, void *, unsigned int, unsigned int, unsigned long, unsigned long, unsigned char, unsigned long, struct _Drawable * ) ; void (* ReadImage) ( struct _Box *, void *, unsigned int, struct _Drawable * ) ; void (* DrawPoints) ( struct _DDXPoint *, unsigned int, unsigned long, unsigned char, unsigned long, struct _Drawable * ) ; void (* TileRects) ( struct _Box *, unsigned int, void *, unsigned int, unsigned int, unsigned int, struct _DDXPoint *, unsigned char,
void (* DrawMonoGlyphs) ( struct _nfbGlyphInfo *, unsigned int, unsigned long, unsigned char, unsigned long, struct _nfbFontPS *, struct _Drawable * ) ; void (* DrawFontText) ( struct _Box *, unsigned char *chars, unsigned int, struct _nfbFontPS *, unsigned long, unsigned long, unsigned char, unsigned long, unsigned char, struct _Drawable * ) ; /* S003 */ void (* SetClipRegions) ( struct _Box *, int, struct _Drawable * ) ; void (* ValidateWindowGC) ( struct _GC *, unsigned long, struct _Drawable * ) ; } nfbWinOps, *nfbWinOpsPtr ;
CopyRect(D3nfb) | ReadImage(D3nfb) |
DrawSolidRects(D3nfb) | DrawPoints(D3nfb) |
DrawImage(D3nfb) | TileRects(D3nfb) |
DrawMonoImage(D3nfb) | DrawMonoGlyphs(D3nfb) |
DrawOpaqueMonoImage(D3nfb) | DrawFontText(D3nfb) |
All the routines in the nfbWinOps structure take a DrawablePtr argument that is a pointer to a drawable structure as their last argument. Initial implementations of the primitives may not support multiple screens and visual types, in which case they can safely ignore the DrawablePtr argument. Once support for multiple screens and different depths is added, these routines can use information in the window structure to determine the screen to which to write, the depth of the window, and so forth.
void (* DrawMonoGlyphs) ( struct _nfbGlyphInfo *, unsigned int, unsigned long, unsigned char, unsigned long, unsigned long, struct _Drawable * ) ; void (* DrawFontText) ( struct _Box *, unsigned char *chars, unsigned int, unsigned short, int, unsigned long, unsigned long, unsigned char, unsigned long, unsigned char, struct _Drawable * ) ;
``Replace Window Private operations'' in Developing NFB graphics adapter drivers
``Terminal fonts'' in Developing NFB graphics adapter drivers