home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Otherware
/
Otherware_1_SB_Development.iso
/
amiga
/
comms
/
network
/
grn1asrc.lha
/
system.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-20
|
3KB
|
114 lines
#include <exec/types.h>
#include <intuition/intuitionbase.h>
#include <libraries/gadtools.h>
#include <intuition/gadgetclass.h>
#include <graphics/displayinfo.h>
#include <exec/types.h>
#include <exec/nodes.h>
#include <exec/lists.h>
#include <dos/dos.h>
#include <dos/dosextens.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include <clib/exec_protos.h>
#include <clib/dos_protos.h>
#include <clib/intuition_protos.h>
#include <clib/diskfont_protos.h>
#include <clib/graphics_protos.h>
#include <clib/gadtools_protos.h>
#include <clib/asl_protos.h>
#include <clib/alib_protos.h>
#define O_READ (O_RDONLY)
#define O_WRITE (O_WRONLY|O_CREAT|O_TRUNC)
typedef struct Library LIBRARY;
typedef struct TagItem TAGS;
typedef struct List LIST;
typedef struct Node NODE;
typedef struct VisualInfo VINFO;
typedef struct Gadget GADGET;
typedef struct NewGadget NEWGAD;
typedef struct Screen SCREEN;
typedef struct Window WINDOW;
typedef struct ViewPort VPORT;
typedef struct RastPort RPORT;
typedef struct IntuiMessage IMSG;
typedef struct TextAttr TATTR;
typedef struct StringInfo STRINGINFO;
typedef struct Rectangle RECT;
typedef struct TextFont FONT;
typedef struct FileInfoBlock FIB;
typedef BPTR LOCK;
typedef struct Process PROCESS;
typedef struct FontRequester FONTREQ;
typedef struct FileRequester FILEREQ;
typedef struct MsgPort MPORT;
typedef struct IntuitionBase IBASE;
/*
* By making an Array of these, you can write a short routine to open
* and close the libraries. This saves memory and makes it easy to
* open an additional library/base. I tried to use LIBRARY ** intead
* of APTR *, but the compiler complained.
*/
typedef struct {
char *name;
APTR *base;
} LIBDEFS;
/*
* By making an Array of these, you can use a simple/short routine to
* create GadTools gadgets. These fields are copied into the NewGadget
* structure.
*/
typedef struct GADDEF {
TAGS *tags;
ULONG kind;
UWORD left,top,width,height;
ULONG flags;
char *text;
} GADDEF;
/*
* IDCMP flags. GADIDCMP are those for GadTools, MYIDCMP are the ones I personally want.
*/
#define GADIDCMP (SLIDERIDCMP|STRINGIDCMP|BUTTONIDCMP|CYCLEIDCMP|LISTVIEWIDCMP)
#define MYIDCMP (IDCMP_VANILLAKEY|IDCMP_RAWKEY|IDCMP_REFRESHWINDOW)|GADIDCMP|CLOSEWINDOW
extern char prefFontName[]; // name of preference font (defaults to grn.font)
extern UWORD prefFontSize; // defaults to 8
extern UWORD prefWidth, prefHeight; // 640x400 or whatever is in tooltypes
extern UWORD prefTop, prefLeft; // defaults to right edge of screen!
extern short screenHeight, screenWidth, screenTop;
extern RECT oscanRect;
extern IBASE *IntuitionBase;
extern LIBRARY *GfxBase;
extern LIBRARY *DiskfontBase;
extern LIBRARY *AslBase;
extern LIBRARY *GadToolsBase;
extern LIBRARY *WorkbenchBase;
extern LIBRARY *IconBase;
extern LIBRARY *CxBase;
extern VINFO *vi;
extern SCREEN *screen;
extern VPORT *vp;
extern RPORT *rp;
extern FONT *defaultFont, *topaz80Font;
extern RPORT *topazRP;
GADGET *CreateGadgets();
short TextLen();
void t_printf();
void InitSystem(), CloseSystem();
WINDOW *CreateWindow();
void EventHandler();