#ifndef INTUITION_INTUITION_H
#define INTUITION_INTUITION_H TRUE
#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_TIMER_H
#include "devices/timer.h"
#endif
#ifndef DEVICES_INPUTEVENT_H
#include "devices/inputevent.h"
#endif
struct Menu
{
struct Menu *NextMenu;
SHORT LeftEdge, TopEdge;
SHORT Width, Height;
USHORT Flags;
BYTE *MenuName;
struct MenuItem *FirstItem;
SHORT JazzX, JazzY, BeatX, BeatY;
};
#define MENUENABLED 0x0001L
#define MIDRAWN 0x0100L
struct MenuItem
{
struct MenuItem *NextItem;
SHORT LeftEdge, TopEdge;
SHORT Width, Height;
USHORT Flags;
LONG MutualExclude;
APTR ItemFill;
APTR SelectFill;
BYTE Command;
struct MenuItem *SubItem;
USHORT NextSelect;
};
#define CHECKIT 0x0001L
#define ITEMTEXT 0x0002L
#define COMMSEQ 0x0004L
#define MENUTOGGLE 0x0008L
#define ITEMENABLED 0x0010L
#define HIGHFLAGS 0x00C0L
#define HIGHIMAGE 0x0000L
#define HIGHCOMP 0x0040L
#define HIGHBOX 0x0080L
#define HIGHNONE 0x00C0L
#define CHECKED 0x0100L
#define ISDRAWN 0x1000L
#define HIGHITEM 0x2000L
#define MENUTOGGLED 0x4000L
struct Requester
{
struct Requester *OlderRequest;
SHORT LeftEdge, TopEdge;
SHORT Width, Height;
SHORT RelLeft, RelTop;
struct Gadget *ReqGadget;
struct Border *ReqBorder;
struct IntuiText *ReqText;
USHORT Flags;
UBYTE BackFill;
struct Layer *ReqLayer;
UBYTE ReqPad1[32];
struct BitMap *ImageBMap;
struct Window *RWindow;
UBYTE ReqPad2[36];
};
#define POINTREL 0x0001L
#define PREDRAWN 0x0002L
#define NOISYREQ 0x0004L
#define REQOFFWINDOW 0x1000L
#define REQACTIVE 0x2000L
#define SYSREQUEST 0x4000L
#define DEFERREFRESH 0x8000L
struct Gadget
{
struct Gadget *NextGadget;
SHORT LeftEdge, TopEdge;
SHORT Width, Height;
USHORT Flags;
USHORT Activation;
USHORT GadgetType;
APTR GadgetRender;
APTR SelectRender;
struct IntuiText *GadgetText;
LONG MutualExclude;
APTR SpecialInfo;
USHORT GadgetID;
APTR UserData;
};
#define GADGHIGHBITS 0x0003L
#define GADGHCOMP 0x0000L
#define GADGHBOX 0x0001L
#define GADGHIMAGE 0x0002L
#define GADGHNONE 0x0003L
#define GADGIMAGE 0x0004L
#define GRELBOTTOM 0x0008L
#define GRELRIGHT 0x0010L
#define GRELWIDTH 0x0020L
#define GRELHEIGHT 0x0040L
#define SELECTED 0x0080L
#define GADGDISABLED 0x0100L
#define RELVERIFY 0x0001L
#define GADGIMMEDIATE 0x0002L
#define ENDGADGET 0x0004L
#define FOLLOWMOUSE 0x0008L
#define RIGHTBORDER 0x0010L
#define LEFTBORDER 0x0020L
#define TOPBORDER 0x0040L
#define BOTTOMBORDER 0x0080L
#define TOGGLESELECT 0x0100L
#define STRINGCENTER 0x0200L
#define STRINGRIGHT 0x0400L
#define LONGINT 0x0800L
#define ALTKEYMAP 0x1000L
#define BOOLEXTEND 0x2000L
#define GADGETTYPE 0xFC00L
#define SYSGADGET 0x8000L
#define SCRGADGET 0x4000L
#define GZZGADGET 0x2000L
#define REQGADGET 0x1000L
#define SIZING 0x0010L
#define WDRAGGING 0x0020L
#define SDRAGGING 0x0030L
#define WUPFRONT 0x0040L
#define SUPFRONT 0x0050L
#define WDOWNBACK 0x0060L
#define SDOWNBACK 0x0070L
#define CLOSE 0x0080L
#define BOOLGADGET 0x0001L
#define GADGET0002 0x0002L
#define PROPGADGET 0x0003L
#define STRGADGET 0x0004L
struct BoolInfo
{
USHORT Flags;
UWORD *Mask;
ULONG Reserved;
};
#define BOOLMASK 0x0001L
struct PropInfo
{
USHORT Flags;
USHORT HorizPot;
USHORT VertPot;
USHORT HorizBody;
USHORT VertBody;
USHORT CWidth;
USHORT CHeight;
USHORT HPotRes, VPotRes;
USHORT LeftBorder;
USHORT TopBorder;
};
#define AUTOKNOB 0x0001L
#define FREEHORIZ 0x0002L
#define FREEVERT 0x0004L
#define PROPBORDERLESS 0x0008L
#define KNOBHIT 0x0100L
#define KNOBHMIN 6L
#define KNOBVMIN 4L
#define MAXBODY 0xFFFFL
#define MAXPOT 0xFFFFL
struct StringInfo
{
UBYTE *Buffer;
UBYTE *UndoBuffer;
SHORT BufferPos;
SHORT MaxChars;
SHORT DispPos;
SHORT UndoPos;
SHORT NumChars;
SHORT DispCount;
SHORT CLeft, CTop;
struct Layer *LayerPtr;
LONG LongInt;
struct KeyMap *AltKeyMap;
};
struct IntuiText
{
UBYTE FrontPen, BackPen;
UBYTE DrawMode;
SHORT LeftEdge;
SHORT TopEdge;
struct TextAttr *ITextFont;
UBYTE *IText;
struct IntuiText *NextText;
};
struct Border
{
SHORT LeftEdge, TopEdge;
UBYTE FrontPen, BackPen;
UBYTE DrawMode;
BYTE Count;
SHORT *XY;
struct Border *NextBorder;
};
struct Image
{
SHORT LeftEdge;
SHORT TopEdge;
SHORT Width;
SHORT Height, Depth;
USHORT *ImageData;
UBYTE PlanePick, PlaneOnOff;
struct Image *NextImage;
};
struct IntuiMessage
{
struct Message ExecMessage;
ULONG Class;
USHORT Code;
USHORT Qualifier;
APTR IAddress;
SHORT MouseX, MouseY;
ULONG Seconds, Micros;
struct Window *IDCMPWindow;
struct IntuiMessage *SpecialLink;
};
#define SIZEVERIFY 0x00000001L
#define NEWSIZE 0x00000002L
#define REFRESHWINDOW 0x00000004L
#define MOUSEBUTTONS 0x00000008L
#define MOUSEMOVE 0x00000010L
#define GADGETDOWN 0x00000020L
#define GADGETUP 0x00000040L
#define REQSET 0x00000080L
#define MENUPICK 0x00000100L
#define CLOSEWINDOW 0x00000200L
#define RAWKEY 0x00000400L
#define REQVERIFY 0x00000800L
#define REQCLEAR 0x00001000L
#define MENUVERIFY 0x00002000L
#define NEWPREFS 0x00004000L
#define DISKINSERTED 0x00008000L
#define DISKREMOVED 0x00010000L
#define WBENCHMESSAGE 0x00020000L
#define ACTIVEWINDOW 0x00040000L
#define INACTIVEWINDOW 0x00080000L
#define DELTAMOVE 0x00100000L
#define VANILLAKEY 0x00200000L
#define INTUITICKS 0x00400000L
#define LONELYMESSAGE 0x80000000L
#define MENUHOT 0x0001L
#define MENUCANCEL 0x0002L
#define MENUWAITING 0x0003L
#define OKOK MENUHOT
#define OKABORT 0x0004L
#define OKCANCEL MENUCANCEL
#define WBENCHOPEN 0x0001L
#define WBENCHCLOSE 0x0002L
struct Window
{
struct Window *NextWindow;
SHORT LeftEdge, TopEdge;
SHORT Width, Height;
SHORT MouseY, MouseX;
SHORT MinWidth, MinHeight;
USHORT MaxWidth, MaxHeight;
ULONG Flags;
struct Menu *MenuStrip;
UBYTE *Title;
struct Requester *FirstRequest;
struct Requester *DMRequest;
SHORT ReqCount;
struct Screen *WScreen;
struct RastPort *RPort;
BYTE BorderLeft, BorderTop, BorderRight, BorderBottom;
struct RastPort *BorderRPort;
struct Gadget *FirstGadget;
struct Window *Parent, *Descendant;
USHORT *Pointer;
BYTE PtrHeight;
BYTE PtrWidth;
BYTE XOffset, YOffset;
ULONG IDCMPFlags;
struct MsgPort *UserPort, *WindowPort;
struct IntuiMessage *MessageKey;
UBYTE DetailPen, BlockPen;
struct Image *CheckMark;
UBYTE *ScreenTitle;
SHORT GZZMouseX;
SHORT GZZMouseY;
SHORT GZZWidth;
SHORT GZZHeight;
UBYTE *ExtData;
BYTE *UserData;
struct Layer *WLayer;
struct TextFont *IFont;
};
#define WINDOWSIZING 0x0001L
#define WINDOWDRAG 0x0002L
#define WINDOWDEPTH 0x0004L
#define WINDOWCLOSE 0x0008L
#define SIZEBRIGHT 0x0010L
#define SIZEBBOTTOM 0x0020L
#define REFRESHBITS 0x00C0L
#define SMART_REFRESH 0x0000L
#define SIMPLE_REFRESH 0x0040L
#define SUPER_BITMAP 0x0080L
#define OTHER_REFRESH 0x00C0L
#define BACKDROP 0x0100L
#define REPORTMOUSE 0x0200L
#define GIMMEZEROZERO 0x0400L
#define BORDERLESS 0x0800L
#define ACTIVATE 0x1000L
#define WINDOWACTIVE 0x2000L
#define INREQUEST 0x4000L
#define MENUSTATE 0x8000L
#define RMBTRAP 0x00010000L
#define NOCAREREFRESH 0x00020000L
#define WINDOWREFRESH 0x01000000L
#define WBENCHWINDOW 0x02000000L
#define WINDOWTICKED 0x04000000L
#define SUPER_UNUSED 0xFCFC0000L
struct NewWindow
{
SHORT LeftEdge, TopEdge;
SHORT Width, Height;
UBYTE DetailPen, BlockPen;
ULONG IDCMPFlags;
ULONG Flags;
struct Gadget *FirstGadget;
struct Image *CheckMark;
UBYTE *Title;
struct Screen *Screen;
struct BitMap *BitMap;
SHORT MinWidth, MinHeight;
USHORT MaxWidth, MaxHeight;
USHORT Type;
};
#ifndef INTUITION_SCREENS_H
#include "intuition/screens.h"
#endif
#ifndef INTUITION_PREFERENCES_H
#include "intuition/preferences.h"
#endif
struct Remember
{
struct Remember *NextRemember;
ULONG RememberSize;
UBYTE *Memory;
};
#define MENUNUM(n) (n & 0x1F)
#define ITEMNUM(n) ((n >> 5) & 0x003F)
#define SUBNUM(n) ((n >> 11) & 0x001F)
#define SHIFTMENU(n) (n & 0x1F)
#define SHIFTITEM(n) ((n & 0x3F) << 5)
#define SHIFTSUB(n) ((n & 0x1F) << 11)
#define SRBNUM(n) (0x08 - (n >> 4))
#define SWBNUM(n) (0x08 - (n & 0x0F))
#define SSBNUM(n) (0x01 + (n >> 4))
#define SPARNUM(n) (n >> 4)
#define SHAKNUM(n) (n & 0x0F)
#define NOMENU 0x001FL
#define NOITEM 0x003FL
#define NOSUB 0x001FL
#define MENUNULL 0xFFFFL
#define FOREVER for(;;)
#define SIGN(x) ( ((x) > 0) - ((x) < 0) )
#define NOT !
#define CHECKWIDTH 19L
#define COMMWIDTH 27L
#define LOWCHECKWIDTH 13L
#define LOWCOMMWIDTH 16L
#define ALERT_TYPE 0x80000000L
#define RECOVERY_ALERT 0x00000000L
#define DEADEND_ALERT 0x80000000L
#define AUTOFRONTPEN 0L
#define AUTOBACKPEN 1L
#define AUTODRAWMODE JAM2
#define AUTOLEFTEDGE 6L
#define AUTOTOPEDGE 3L
#define AUTOITEXTFONT NULL
#define AUTONEXTTEXT NULL
#define SELECTUP (IECODE_LBUTTON | IECODE_UP_PREFIX)
#define SELECTDOWN (IECODE_LBUTTON)
#define MENUUP (IECODE_RBUTTON | IECODE_UP_PREFIX)
#define MENUDOWN (IECODE_RBUTTON)
#define ALTLEFT (IEQUALIFIER_LALT)
#define ALTRIGHT (IEQUALIFIER_RALT)
#define AMIGALEFT (IEQUALIFIER_LCOMMAND)
#define AMIGARIGHT (IEQUALIFIER_RCOMMAND)
#define AMIGAKEYS (AMIGALEFT | AMIGARIGHT)
#define CURSORUP 0x4CL
#define CURSORLEFT 0x4FL
#define CURSORRIGHT 0x4EL
#define CURSORDOWN 0x4DL
#define KEYCODE_Q 0x10L
#define KEYCODE_X 0x32L
#define KEYCODE_N 0x36L
#define KEYCODE_M 0x37L
#define KEYCODE_V 0x34L
#define KEYCODE_B 0x35L
#endif
