home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
bbs
/
cbm
/
nduk-v37.lha
/
V37
/
include
/
intuition
/
intuition.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-11-27
|
53KB
|
1,365 lines
#ifndef INTUITION_INTUITION_H
#define INTUITION_INTUITION_H TRUE
/*
** $Filename: intuition/intuition.h $
** $Release: 2.04 Includes, V37.4 $
** $Revision: 36.51 $
** $Date: 91/03/28 $
**
** Interface definitions for Intuition applications.
**
** (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 GRAPHICS_TEXT_H
#include <graphics/text.h>
#endif
#ifndef EXEC_PORTS_H
#include <exec/ports.h>
#endif
#ifndef DEVICES_INPUTEVENT_H
#include <devices/inputevent.h>
#endif
#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif
/*
* NOTE: intuition/iobsolete.h is included at the END of this file!
*/
/* ======================================================================== */
/* === Menu =============================================================== */
/* ======================================================================== */
struct Menu
{
struct Menu *NextMenu; /* same level */
WORD LeftEdge, TopEdge; /* position of the select box */
WORD Width, Height; /* dimensions of the select box */
UWORD Flags; /* see flag definitions below */
BYTE *MenuName; /* text for this Menu Header */
struct MenuItem *FirstItem; /* pointer to first in chain */
/* these mysteriously-named variables are for internal use only */
WORD JazzX, JazzY, BeatX, BeatY;
};
/* FLAGS SET BY BOTH THE APPLIPROG AND INTUITION */
#define MENUENABLED 0x0001 /* whether or not this menu is enabled */
/* FLAGS SET BY INTUITION */
#define MIDRAWN 0x0100 /* this menu's items are currently drawn */
/* ======================================================================== */
/* === MenuItem =========================================================== */
/* ======================================================================== */
struct MenuItem
{
struct MenuItem *NextItem; /* pointer to next in chained list */
WORD LeftEdge, TopEdge; /* position of the select box */
WORD Width, Height; /* dimensions of the select box */
UWORD Flags; /* see the defines below */
LONG MutualExclude; /* set bits mean this item excludes that */
APTR ItemFill; /* points to Image, IntuiText, or NULL */
/* when this item is pointed to by the cursor and the items highlight
* mode HIGHIMAGE is selected, this alternate image will be displayed
*/
APTR SelectFill; /* points to Image, IntuiText, or NULL */
BYTE Command; /* only if appliprog sets the COMMSEQ flag */
struct MenuItem *SubItem; /* if non-zero, points to MenuItem for submenu */
/* The NextSelect field represents the menu number of next selected
* item (when user has drag-selected several items)
*/
UWORD NextSelect;
};
/* FLAGS SET BY THE APPLIPROG */
#define CHECKIT 0x0001 /* set to indicate checkmarkable item */
#define ITEMTEXT 0x0002 /* set if textual, clear if graphical item */
#define COMMSEQ 0x0004 /* set if there's an command sequence */
#define MENUTOGGLE 0x0008 /* set for toggling checks (else mut. exclude) */
#define ITEMENABLED 0x0010 /* set if this item is enabled */
/* these are the SPECIAL HIGHLIGHT FLAG state meanings */
#define HIGHFLAGS 0x00C0 /* see definitions below for these bits */
#define HIGHIMAGE 0x0000 /* use the user's "select image" */
#define HIGHCOMP 0x0040 /* highlight by complementing the selectbox */
#define HIGHBOX 0x0080 /* highlight by "boxing" the selectbox */
#define HIGHNONE 0x00C0 /* don't highlight */
/* FLAGS SET BY BOTH APPLIPROG AND INTUITION */
#define CHECKED 0x0100 /* state of the checkmark */
/* FLAGS SET BY INTUITION */
#define ISDRAWN 0x1000 /* this item's subs are currently drawn */
#define HIGHITEM 0x2000 /* this item is currently highlighted */
#define MENUTOGGLED 0x4000 /* this item was already toggled */
/* ======================================================================== */
/* === Requester ========================================================== */
/* ======================================================================== */
struct Requester
{
struct Requester *OlderRequest;
WORD LeftEdge, TopEdge; /* dimensions of the entire box */
WORD Width, Height; /* dimensions of the entire box */
WORD RelLeft, RelTop; /* for Pointer relativity offsets */
struct Gadget *ReqGadget; /* pointer to a list of Gadgets */
struct Border *ReqBorder; /* the box's border */
struct IntuiText *ReqText; /* the box's text */
UWORD Flags; /* see definitions below */
/* pen number for back-plane fill before draws */
UBYTE BackFill;
/* Layer in place of clip rect */
struct Layer *ReqLayer;
UBYTE ReqPad1[32];
/* If the BitMap plane pointers are non-zero, this tells the system
* that the image comes pre-drawn (if the appliprog wants to define
* its own box, in any shape or size it wants!); this is OK by
* Intuition as long as there's a good correspondence between
* the image and the specified Gadgets
*/
struct BitMap *ImageBMap; /* points to the BitMap of PREDRAWN imagery */
struct Window *RWindow; /* added. points back to Window */
struct Image *ReqImage; /* new for V36: drawn if USEREQIMAGE set */
UBYTE ReqPad2[32];
};
/* FLAGS SET BY THE APPLIPROG */
#define POINTREL 0x0001
/* if POINTREL set, TopLeft is relative to pointer
* for DMRequester, relative to window center
* for Request().
*/
#define PREDRAWN 0x0002
/* set if Requester.ImageBMap points to predrawn Requester imagery */
#define NOISYREQ 0x0004
/* if you don't want requester to filter input */
#define SIMPLEREQ 0x0010
/* to use SIMPLEREFRESH layer (recommended) */
/* New for V36 */
#define USEREQIMAGE 0x0020
/* render linked list ReqImage after BackFill
* but before gadgets and text
*/
#define NOREQBACKFILL 0x0040
/* don't bother filling requester with Requester.BackFill pen */
/* FLAGS SET BY INTUITION */
#define REQOFFWINDOW 0x1000 /* part of one of the Gadgets was offwindow */
#define REQACTIVE 0x2000 /* this requester is active */
#define SYSREQUEST 0x4000 /* (unused) this requester caused by system */
#define DEFERREFRESH 0x8000 /* this Requester stops a Refresh broadcast */
/* ======================================================================== */
/* === Gadget ============================================================= */
/* ======================================================================== */
struct Gadget
{
struct Gadget *NextGadget; /* next gadget in the list */
WORD LeftEdge, TopEdge; /* "hit box" of gadget */
WORD Width, Height; /* "hit box" of gadget */
UWORD Flags; /* see below for list of defines */
UWORD Activation; /* see below for list of defines */
UWORD GadgetType; /* see below for defines */
/* appliprog can specify that the Gadget be rendered as either as Border
* or an Image. This variable points to which (or equals NULL if there's
* nothing to be rendered about this Gadget)
*/
APTR GadgetRender;
/* appliprog can specify "highlighted" imagery rather than algorithmic
* this can point to either Border or Image data
*/
APTR SelectRender;
struct IntuiText *GadgetText; /* text for this gadget */
/* MutualExclude, never implemented, is now declared obsolete.
* There are published examples of implementing a more general
* and practical exclusion in your applications.
*
* Starting with V36, this field is used to point to a hook
* for a custom gadget.
*
* Programs using this field for their own processing will
* continue to work, as long as they don't try the
* trick with custom gadgets.
*/
LONG MutualExclude; /* obsolete */
/* pointer to a structure of special data required by Proport