home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
bbs
/
cbm
/
os-include.lha
/
os-include
/
intuition
/
screens.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-15
|
23KB
|
662 lines
#ifndef INTUITION_SCREENS_H
#define INTUITION_SCREENS_H TRUE
/*
** $VER: screens.h 38.25 (15.2.93)
** Includes Release 40.15
**
** The Screen and NewScreen structures and attributes
**
** (C) Copyright 1985-1993 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 );
*/
/* You can use the Intuition version number to tell which fields are
* present in this structure.
*
* DRI_VERSION of 1 corresponds to V37 release.
* DRI_VERSION of 2 corresponds to V39, and includes three new pens
* and the dri_CheckMark and dri_AmigaKey fields.
*
* Note that sometimes applications need to create their own DrawInfo
* structures, in which case the DRI_VERSION won't correspond exactly
* to the OS version!!!
*/
#define DRI_VERSION (2)
struct DrawInfo
{
UWORD dri_Version; /* will be DRI_VERSION */
UWORD dri_NumPens; /* guaranteed to be >= 9 */
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 */
/* New for V39: dri_CheckMark, dri_AmigaKey. */
struct Image *dri_CheckMark; /* pointer to scaled checkmark image
* Will be NULL if DRI_VERSION < 2
*/
struct Image *dri_AmigaKey; /* pointer to scaled Amiga-key image
* Will be NULL if DRI_VERSION < 2
*/
ULONG dri_Reserved[5]; /* 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 */
/* New for V39, only present if DRI_VERSION >= 2: */
#define BARDETAILPEN (0x0009) /* text/detail in screen-bar/menus */
#define BARBLOCKPEN (0x000A) /* screen-bar/menus fill */
#define BARTRIMPEN (0x000B) /* trim under screen-bar */
#define NUMDRIPENS (0x000C)
/* New for V39: It is sometimes useful to specify that a pen value
* is to be the complement of color zero to three. The "magic" numbers
* serve that purpose:
*/
#define PEN_C3 0xFEFC /* Complement of color 3 */
#define PEN_C2 0xFEFD /* Complement of color 2 */
#define PEN_C1 0xFEFE /* Complement of color 1 */
#define PEN_C0 0xFEFF /* Complement of color 0 */
/* ======================================================================== */
/* === Screen ============================================================= */
/* ======================================================================== */
/* VERY IMPORTANT NOTE ABOUT Screen->BitMap. In the future, bitmaps
* will need to grow. The embedded instance of a bitmap in the screen
* will no longer be large enough to hold the whole description of
* the bitmap.
*
* YOU ARE STRONGLY URGED to use Screen->RastPort.BitMap in place of
* &Screen->BitMap whenever and whereever possible.
*/
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; /* SEE WARNING ABOVE! */
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 */
/* New for V39: */
#define PENSHARED 0x0400 /* Screen opener set {SA_SharePens,TRUE} */
#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 +