⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sguser.h

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * 	@(#)sguser.h	4.1	(ULTRIX)	7/2/90 *//************************************************************************ *									* *			Copyright (c) 1986, 87 by			* *		Digital Equipment Corporation, Maynard, MA		* *			All rights reserved.				* *									* *   This software is furnished under a license and may be used and	* *   copied  only  in accordance with the terms of such license and	* *   with the  inclusion  of  the  above  copyright  notice.   This	* *   software  or  any  other copies thereof may not be provided or	* *   otherwise made available to any other person.  No title to and	* *   ownership of the software is hereby transferred.			* *									* *   The information in this software is subject to change  without	* *   notice  and should not be construed as a commitment by Digital	* *   Equipment Corporation.						* *									* *   Digital assumes no responsibility for the use  or  reliability	* *   of its software on equipment which is not supplied by Digital.	* *									* ************************************************************************//*********************************************************************** * * Modification History: * * 08-May-89 -- rafiey (Ali Rafieymehr) *	Fixed a bug in color_buf structure. The problem was only happening *	on eight plane machines. * * 07-Mar-87 -- vasudev (Vasudev K. Bhandarkar) *      Moved declarations of sg_next_fifo, sg_int_flag and change_section *      into shared memory (FIFOreq_header) so that these could be accessible  *      to user processes such as X. * * 18-Oct-87 -- tim (Tim Burke) *	Extended number of printable characters to 190 from 95.  This is being *	done for 8-bit support. * * 04-Aug-87 -- rafiey (Ali Rafieymehr) *	Moved sg_next_fifo declaration from "../qdddx/globals.h" to *	this file. * * 19-Mar-87 -- fred (Fred Canter for Ali Rafieymehr) *	X in the kernel changes. * * 11-Feb-87 -- rafiey (Ali Rafieymehr) *	Moved color_cursor structure from sgreg.h to this file. * * 07-Jan-87  -- rafiey (Ali Rafieymehr) *	Modified some of the constants used for cursor. * * 18-Jun-86  -- rafiey (Ali Rafieymehr) *	Created this header file for the VAXstar color driver. *	Derived from qduser.h. * **********************************************************************/#ifdef KERNEL#include "../io/uba/qevent.h"		/* include event struct defs */#else#include <io/uba/qevent.h>#endif/* * VAXstar device map */	struct sgmap {			/* map of register blocks in VAXstar */	    char *adder;	    char *fcc;	    char *vdac;	    char *cur;	    char *vrback;	    char *fiforam;	    char *red;	    char *blue;	    char *green;	};/* * constants used in font operations */#define CHARS		190			/* # of chars in the font */#define CHAR_HEIGHT	15			/* char height in pixels */#define CHAR_WIDTH	8			/* char width in pixels*/#define FONT_WIDTH	(CHAR_WIDTH * CHARS)	/* font width in pixels */#define FONT_HEIGHT	32#define FONT_X		0			/* font's off screen adrs */#define FONT_Y		(2048 - CHAR_HEIGHT)#define ROWS		CHAR_HEIGHT/* * constants used for cursor */#define	MAX_CUR_X	1024		/* max cursor x position */#define	MAX_CUR_Y	864		/* max cursor y position */#define ACC_OFF 	0x01		/* acceleration is inactive */#define	CURS_ENB	0x0001		/* cursor on *//* * VAXstar interrupt controller register bits * */#define SINT_VS		0x0004#define SINT_VF		0x0008/* * Cursor Command Register bits * */#define	ENPA	0000001#define	FOPA	0000002#define	ENPB	0000004#define	FOPB	0000010#define	XHAIR 	0000020#define	XHCLP	0000040#define	XHCL1	0000100#define	XHWID	0000200#define	ENRG1	0000400#define	FORG1	0001000#define	ENRG2	0002000#define	FORG2	0004000#define	LODSA	0010000#define	VBHI	0020000#define	HSHI	0040000#define	TEST	0100000/* * Line Prameter Register bits * */#define	SER_KBD      000000#define	SER_POINTER  000001#define	SER_COMLINE  000002#define	SER_PRINTER  000003#define	SER_CHARW    000030#define	SER_STOP     000040#define	SER_PARENB   000100#define	SER_ODDPAR   000200#define	SER_SPEED    006000#define	SER_RXENAB   010000/* * FCC register and bit definitions */#define	IIDLE		0x0001	/* status of "Pixel transfer idle" interrupt */#define ENIDLE		0x0002  /* enable "Pixel transfer idle" interrupt */#define	ENTHRSH		0x0040  /* enable FIFO threshold interrupt */#define	ITHRESH		0x0080	/* status of "FIFO pass threshold" interrupt *//* * Color board general CSR bit definitions */#define IDLE		0x8000      /* FIFO has data or not */#define FLUSH		0x4000      /* FIFO complete current operation */#define	ADDREQ		0x2000      /* ADDER requesting I/O */#define	PTB_DECOM_ENB	0x1F00      /* host-to-bitmap (use decompression) */#define PTB_UNPACK_ENB	0x0700      /* host-to-bitmap (unpack bytes) */#define PTB_ENB		0x0600      /* host-to-bitmap xfer */#define	BTP_COM_ENB	0x1D00      /* bitmap-to-host (use compression) */#define BTP_PACK_ENB	0x0500      /* bitmap-to-host (pack bytes) */#define BTP_ENB		0x0400      /* bitmap-to-host xfer */#define DL_ENB		0x0200      /* display list to ADDER */#define HALT		0x0000      /* halt */#define	DIAG		0x0080	    /* diagnostic mode */#define	CTESTH		0x0040	    /* TEST bit from the cursor chip */#define	INTMPH		0x0020	    /* status bit */#define	FADR16		0x0002	    /* fifo address bit 16 */#define	FADR15		0x0001	    /* fifo address bit 15 *//* VAXstar memcsr bit definitions */#define	UNBLANK			0x0020#define SYNC_ON			0x0008	struct fcc {	    unsigned short cbcsr;	/* color board general CSR */	    unsigned short icsr;	/* interrupt control and status reg. */	    unsigned short fcsr;	/* fifo control and status register */	    unsigned short fwused;	/* fifo words used */	    unsigned short thresh;	/* threshold for comparing with fwused*/	    unsigned short zoo;		/* not used */	    unsigned short put;		/* put pointer for fifo control */	    unsigned short get;		/* get pointer for fifo control */	    unsigned short diag;	/* data for diagnostics modes */	    unsigned short cmpa;	    unsigned short cmpb;	    unsigned short cmpc;	/* pla address bits */	    unsigned short pad[116];	};/* cursor registers */	struct	color_cursor {	    u_short cmdr;		/* command register */	    u_short xpos;		/* x position Register */	    u_short ypos;		/* y position register */	    u_short xmin1;		/* xmin1 active region register */	    u_short xmax1;		/* xmax1 active region register */	    u_short ymin1;		/* ymin1 active region register */	    u_short ymax1;		/* ymax1 active region register */	    u_short pad[4];	    u_short xmin2;		/* xmin2 active region register */	    u_short xmax2;		/* xmax2 active region register */	    u_short ymin2;		/* ymin2 active region register */	    u_short ymax2;		/* ymax2 active region register */	    u_short cmem;		/* cursor memory register */	};/* * macros to transform device coordinates to hardware cursor coordinates */#define CURS_MIN_X 	216	/* device coordinate x = 0 */#define CURS_MIN_Y 	38	/* device coordinate y = 0 *//********************************************************************* * *	EVENT QUEUE DEFINITIONS * ********************************************************************* * most of the event queue definitions are found in "qevent.h".  But a * few things not found there are here. */ 	/* The event queue header */	typedef struct sginput {	    struct _vs_eventqueue header;  /* event queue ring handling *//* for VS100 and QVSS compatability reasons, additions to this * structure must be made below this point. */	    struct _vs_cursor curs_pos;	/* current mouse position */	    struct _vs_box curs_box;	/* cursor reporting box */	};	/* vse_key field.  definitions for mouse buttons */#define VSE_LEFT_BUTTON		0#define VSE_MIDDLE_BUTTON	1#define VSE_RIGHT_BUTTON	2/* vse_key field.  definitions for mouse buttons */#define VSE_T_LEFT_BUTTON	0#define VSE_T_FRONT_BUTTON	1#define VSE_T_RIGHT_BUTTON	2#define VSE_T_BACK_BUTTON	4#define VSE_T_BARREL_BUTTON	VSE_T_LEFT_BUTTON#define VSE_T_TIP_BUTTON	VSE_T_FRONT_BUTTON/* * These are the macros to be used for loading and extracting from the event * queue.  It is presumed that the macro user will only use the access macros * if the event queue is non-empty ( ISEMPTY(eq) == FALSE ), and that the * driver will only load the event queue after checking that it is not full * ( ISFULL(eq) == FALSE ).  ("eq" is a pointer to the event queue header.) * *   Before an event access session for a particular event, the macro users * must use the xxxBEGIN macro, and the xxxEND macro after an event is through * with.  As seen below, the xxxBEGIN and xxxEND macros maintain the event * queue access mechanism. * * First, the macros to be used by the event queue reader  */#define ISEMPTY(eq)	  ((eq)->header.head == (eq)->header.tail)#define GETBEGIN(eq)	  (&(eq)->header.events[(eq)->header.head]) #define GET_X(event)	  ((event)->vse_x)  	     /* get x position */#define GET_Y(event)	  ((event)->vse_y)  	     /* get y position */#define GET_TIME(event)	  ((event)->vse_time) 	     /* get time */#define GET_TYPE(event)	  ((event)->vse_type)	     /* get entry type */#define GET_KEY(event)	  ((event)->vse_key)  	     /* get keycode */#define GET_DIR(event)	  ((event)->vse_direction)     /* get direction */#define GET_DEVICE(event) ((event)->vse_device)        /* get device */#define GETEND(eq)        (++(eq)->header.head >= (eq)->header.size ? \			   (eq)->header.head = 0 : 0 )/* * macros to be used by the event queue loader *//* ISFULL yields TRUE if queue is full */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -