DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

nfbWinOps(D4nfb)


nfbWinOps -- no frame buffer window-private routines for the ddx layer

Synopsis

#include "nfbWinStr.h"

Description

The nfbWinOps structure in the nfb layer maintains pointers to nfb drawing primitives that handle rectangular regions. To handle the possibility of several visual types and depths on a single server, you can write routines that handle each visual type and depth, and switch them via the pointers in the nfbWinOps structure.

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.

Structure definition

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 ;

Structure members

Each member of the nfbWinOps structure defines a routine and prototype for a routine that is documented in Section D3nfb manual pages in Section D3nfb manual pages. The routines that are associated with the nfbWinOps structure are:

CopyRect(D3nfb) ReadImage(D3nfb)
DrawSolidRects(D3nfb) DrawPoints(D3nfb)
DrawImage(D3nfb) TileRects(D3nfb)
DrawMonoImage(D3nfb) DrawMonoGlyphs(D3nfb)
DrawOpaqueMonoImage(D3nfb) DrawFontText(D3nfb)

 CopyRect(D3nfb)              ReadImage(D3nfb)
 DrawSolidRects(D3nfb)        DrawPoints(D3nfb)
 DrawImage(D3nfb)             TileRects(D3nfb)
 DrawMonoImage(D3nfb)         DrawMonoGlyphs(D3nfb)
 DrawOpaqueMonoImage(D3nfb)   DrawFontText(D3nfb)

Usage

Each member of the nfbWinOps structure must be a valid routine for the server to draw to the screen. These primitives deal with simple, rectangular, non-replicated areas (except for TileRects(D3nfb)), and have to apply graphics context function (alu) and planemask.

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.

Version applicability

This structure is supported for NFB drivers on all releases of SCO OpenServer 5, SVR5, and AIX 5L.

Differences between versions

The prototypes for DrawMonoGlyphs(D3nfb) and DrawFontText(D3nfb) are different for Open Desktop 3.0:
   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 * ) ;

References

CopyRect(D3nfb), DrawSolidRects(D3nfb), DrawImage(D3nfb), DrawMonoImage(D3nfb), DrawOpaqueMonoImage(D3nfb), ReadImage(D3nfb), DrawPoints(D3nfb), TileRects(D3nfb), DrawMonoGlyphs(D3nfb), DrawFontText(D3nfb), SetClipRegions(D3nfb), ValidateWindowGC(D3nfb)

``Replace Window Private operations'' in Developing NFB graphics adapter drivers
``Terminal fonts'' in Developing NFB graphics adapter drivers


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005