home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
bbs
/
cbm
/
nduk-v37.lha
/
V37
/
include
/
intuition
/
screens.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-11-27
|
14KB
|
410 lines
#ifndef INTUITION_SCREENS_H
#define INTUITION_SCREENS_H TRUE
/*
** $Filename: intuition/screens.h $
** $Release: 2.04 Includes, V37.4 $
** $Revision: 36.36 $
** $Date: 91/10/07 $
**
** The Screen and NewScreen structures and attributes
**
** (C) Copyright 1985-1991 Commodore-Amiga, Inc.
** All Rights Reserved
*/
#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif
#ifndef GRAPHICS_GFX_H
#include <graphics/gfx.h>
#endif
#ifndef GRAPHICS_CLIP_H
#include <graphics/clip.h>
#endif
#ifndef GRAPHICS_VIEW_H
#include <graphics/view.h>
#endif
#ifndef GRAPHICS_RASTPORT_H
#include <graphics/rastport.h>
#endif
#ifndef GRAPHICS_LAYERS_H
#include <graphics/layers.h>
#endif
#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif
/*
* NOTE: intuition/iobsolete.h is included at the END of this file!
*/
/* ======================================================================== */
/* === DrawInfo ========================================================= */
/* ======================================================================== */
/* This is a packet of information for graphics rendering. It originates
* with a Screen, and is gotten using GetScreenDrawInfo( screen );
*/
/* If you find dri_Version >= DRI_VERSION, you know this structure
* has at least the fields defined in this version of the include file
*/
#define RI_VERSION (1) /* obsolete, will be removed */
#define DRI_VERSION (1)
struct DrawInfo
{
UWORD dri_Version; /* will be DRI_VERSION */
UWORD dri_NumPens; /* guaranteed to be >= numDrIPens */
UWORD *dri_Pens; /* pointer to pen array */
struct TextFont *dri_Font; /* screen default font */
UWORD dri_Depth; /* (initial) depth of screen bitmap */
struct { /* from DisplayInfo database for initial display mode */
UWORD X;
UWORD Y;
} dri_Resolution;
ULONG dri_Flags; /* defined below */
ULONG dri_Reserved[7]; /* avoid recompilation ;^) */
};
#define DRIF_NEWLOOK 0x00000001 /* specified SA_Pens, full treatment */
/* rendering pen number indexes into DrawInfo.dri_Pens[] */
#define DETAILPEN (0x0000) /* compatible Intuition rendering pens */
#define BLOCKPEN (0x0001) /* compatible Intuition rendering pens */
#define TEXTPEN (0x0002) /* text on background */
#define SHINEPEN (0x0003) /* bright edge on 3D objects */
#define SHADOWPEN (0x0004) /* dark edge on 3D objects */
#define FILLPEN (0x0005) /* active-window/selected-gadget fill */
#define FILLTEXTPEN (0x0006) /* text over FILLPEN */
#define BACKGROUNDPEN (0x0007) /* always color 0 */
#define HIGHLIGHTTEXTPEN (0x0008) /* special color text, on background */
#define NUMDRIPENS (0x0009)
/* ======================================================================== */
/* === Screen ============================================================= */
/* ======================================================================== */
struct Screen
{
struct Screen *NextScreen; /* linked list of screens */
struct Window *FirstWindow; /* linked list Screen's Windows */
WORD LeftEdge, TopEdge; /* parameters of the screen */
WORD Width, Height; /* parameters of the screen */
WORD MouseY, MouseX; /* position relative to upper-left */
UWORD Flags; /* see definitions below */
UBYTE *Title; /* null-terminated Title text */
UBYTE *DefaultTitle; /* for Windows without ScreenTitle */
/* Bar sizes for this Screen and all Window's in this Screen */
/* Note that BarHeight is one less than the actual menu bar
* height. We're going to keep this in V36 for compatibility,
* although V36 artwork might use that extra pixel
*
* Also, the title bar height of a window is calculated from the
* screen's WBorTop field, plus the font height, plus one.
*/
BYTE BarHeight, BarVBorder, BarHBorder, MenuVBorder, MenuHBorder;
BYTE WBorTop, WBorLeft, WBorRight, WBorBottom;
struct TextAttr *Font; /* this screen's default font */
/* the display data structures for this Screen */
struct ViewPort ViewPort; /* describing the Screen's display */
struct RastPort RastPort; /* describing Screen rendering */
struct BitMap BitMap; /* extra copy of RastPort BitMap */
struct Layer_Info LayerInfo; /* each screen gets a LayerInfo */
/* Only system gadgets may be attached to a screen.
* You get the standard system Screen Gadgets automatically
*/
struct Gadget *FirstGadget;
UBYTE DetailPen, BlockPen; /* for bar/border/gadget rendering */
/* the following variable(s) are maintained by Intuition to support the
* DisplayBeep() color flashing technique
*/
UWORD SaveColor0;
/* This layer is for the Screen and Menu bars */
struct Layer *BarLayer;
UBYTE *ExtData;
UBYTE *UserData; /* general-purpose pointer to User data extension */
/**** Data below this point are SYSTEM PRIVATE ****/
};
/* --- FLAGS SET BY INTUITION --------------------------------------------- */
/* The SCREENTYPE bits are reserved for describing various Screen types
* available under Intuition.
*/
#define SCREENTYPE 0x000F /* all the screens types available */
/* --- the definitions for the Screen Type ------------------------------- */
#define WBENCHSCREEN 0x0001 /* identifies the Workbench screen */
#define PUBLICSCREEN 0x0002 /* public shared (custom) screen */
#define CUSTOMSCREEN 0x000F /* original custom screens */
#define SHOWTITLE 0x0010 /* this gets set by a call to ShowTitle() */
#define BEEPING 0x0020 /* set when Screen is beeping (private) */
#define CUSTOMBITMAP 0x0040 /* if you are supplying your own BitMap */
#define SCREENBEHIND 0x0080 /* if you want your screen to open behind
* already open screens
*/
#define SCREENQUIET 0x0100 /* if you do not want Intuition to render
* into your screen (gadgets, title)
*/
#define SCREENHIRES 0x0200 /* do not use lowres gadgets (private) */
#define NS_EXTENDED 0x1000 /* ExtNewScreen.Extension is valid */
/* V36 applications can use OpenScreenTagList() instead of NS_EXTENDED */
#define AUTOSCROLL 0x4000 /* screen is to autoscoll */
#define STDSCREENHEIGHT -1 /* supply in NewScreen.Height */
#define STDSCREENWIDTH -1 /* supply in NewScreen.Width */
/*
* Screen attribute tag ID's. These are used in the ti_Tag field of
* TagItem arrays passed to OpenScreenTagList() (or in the
* ExtNewScreen.Extension field).
*/
/* Screen attribute tags. Please use these versions, not those in
* iobsolete.h.
*/
#define SA_Dummy (TAG_USER + 32)
/*
* these items specify items equivalent to fields in NewScreen
*/
#define SA_Left (SA_Dummy + 0x0001)
#define SA_Top (SA_Dummy + 0x0002)
#define SA_Width (SA_Dummy + 0x0003)
#define SA_Height (SA_Dummy + 0x0004)
/* traditional screen positions and dimensions */
#define SA_Depth (SA_Dummy + 0x0005)
/* screen bitmap depth */
#define SA_DetailPen (SA_Dummy + 0x0006)
/* serves as default for windows, too */
#define SA_BlockPen (SA_Dummy + 0x0007)
#define SA_Title (SA_Dummy + 0x0008)
/* default screen title */
#define SA_Colors (SA_Dummy + 0x0009)
/* ti_Data is an array of struct ColorSpec,
* terminated by ColorIndex = -1. Specifies
* initial screen palette colors.
*/
#define SA_ErrorCode (SA_Dummy + 0x000A)
/* ti_Data points to LONG error code (values below)*/
#define SA_Font (SA_Dummy + 0x000B)
/* equiv. to NewScreen.Font */
#define SA_SysFont (SA_Dummy + 0x000C)
/* Selects one of the preferences system fonts:
* 0 - old DefaultFont, fixed-width
* 1 - WB Screen preferred font
*/
#define SA_Type (SA_Dummy + 0x000D)
/* equiv. to NewScreen.Type */
#define SA_BitMap (SA_Dummy + 0x000E)
/* ti_Data is pointer to custom BitMap. This
* implies type of CUSTOMBITMAP
*/
#define SA_PubName (SA_Dummy + 0x000F)
/* presence of this tag means that the screen
* is to be a public screen. Please specify
* BEFORE the two tags below
*/
#define SA_PubSig (SA_Dummy + 0x0010)
#define SA_PubTask (SA_Dummy + 0x0011)
/* Task ID and signal for being notified that
* the last window has closed on a public screen