/****
 *
 * Copyright (c) 1988 by Sun Microsystems, Inc.
 * @(#)sh_main.h 22.1 89/08/10 Copyright 1988 Sun Micro
 *
 * SH_MAIN.H - Main Shapes header
 * Includes headers needed by all other headers
 * Defines object types and classes
 * 
 * Compile time flags:
 *
 *   -DSH_SMALL	configures out things not used by X11/NeWS (including)
 *	-DNO_VIEW_CLIP	view clipping
 *	-DNO_CLOSE_MOVE	close on move
 *	-DNO_RTM	path render transform
 *	-DNO_PATH_IMM	immediate paths
 *	-DNO_COL_DIR	direct color
 *
 *   -DSH_NO_CURSOR configures out cursor support
 *   -DSH_NO_GLYPHS configures out glyph support
 *
 ****/
#ifndef	_SH_MAIN
#include "config.h"

#define	SH_DD_SLOTS	4

#ifdef	SH_SMALL
#define	NO_VIEW_CLIP
#define	NO_CLOSE_MOVE
#define	NO_PATH_IMM
#define	NO_PATH_ANALYSIS
#define	NO_RTM
#define	NO_COL_DIR
#define	NO_MODEL
#define	NO_VDC
#define NO_3D_TRANS
#endif	/* SH_SMALL */

#ifdef	SH_USER
/* #define	SH_NO_GLYPHS 	/* REMIND: when released */
#endif	/* SH_USER */

#ifdef	i386
#define	LITTLEENDIAN	1
#endif	/* i386 */

typedef	unsigned int OBJ_KEY;
typedef	struct class_PATH	*PATH;
typedef	struct class_LIGHT	*LIGHT;
typedef	struct class_PAT	*PATTERN;
typedef	struct class_CMAP	*CMAP;
typedef	struct class_CURSER	*CURSER;
typedef	struct class_CTX	*CONTEXT;
typedef struct class_TRANS	*TRANSFORM;
typedef	struct class_RAS	*RASTER;
typedef	struct class_SHAPE	*SHAPE;
typedef	struct class_SCR	*SCREEN;
typedef struct class_ET		*ET;

/*
 * Shapes object classes
 */
#define	CLASS_SCR	1
#define	CLASS_RAS	2
#define	CLASS_CMAP	3
#define	CLASS_CURS	4
#define	CLASS_TRANS	5
#define	CLASS_CTX	6
#define	CLASS_PATH	7
#define	CLASS_RAS_DATA	8
#define	CLASS_CMAP_DATA	9
#define	CLASS_PATH_DATA	10

#define	CLASS_LIGHT	11
#define	CLASS_PAT	12
#define	CLASS_SHAPE	13
#define CLASS_ET	14
#define CLASS_ET_DATA	15
#define	CLASS_SRAS	16
#define	CLASS_FPATH	17
#define	CLASS_LAST	17

/*
 * External error read macro
 */
extern	Unsgn8	sh_error_get();
extern	Unsgn8	sh_error_print();

#define	Get_Error()	sh_error_get()
#define	Print_Error()	sh_error_print()

#include "sh_class.h"
#include "sh_fract.h"
#include "sh_point.h"
#include "sh_color.h"

#define	sh_version	8

#define	_SH_MAIN
#endif	/* _SH_MAIN */
