home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d152
/
blk.lha
/
Blk
/
pro.c
< prev
next >
Wrap
C/C++ Source or Header
|
1987-06-15
|
1KB
|
71 lines
#include <stdio.h>
#include <functions.h>
#include <exec/types.h>
#include <intuition/intuition.h>
#define OK_ID 0x80
#define CAN_ID 0x81
#define STR_ID 0x82
#define NUMCHR 20
struct TextAttr ta = { (UBYTE*)"topaz.font",8,0,0 };
UBYTE undo[NUMCHR];
#define REQ mot_req
#include "prototype.h"
struct NewWindow nwin = {
0,0,300,150,
-1,-1,GADGETUP|GADGETDOWN|REQCLEAR|MOUSEMOVE,
WINDOWDEPTH|WINDOWDRAG|SMART_REFRESH,
NULL,NULL,(UBYTE*)"Blocks",NULL,
NULL,0,0,0,0,WBENCHSCREEN
};
struct IntuitionBase *IntuitionBase;
main(argc,argv)
int argc;
char *argv[];
{
struct Window *win;
IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library",0L);
if (IntuitionBase) {
nwin.Width = REQ.Width + 10;
nwin.Height = REQ.Height + 14;
win = OpenWindow (&nwin);
if (win) {
Body (win);
CloseWindow (win);
}
CloseLibrary (IntuitionBase);
}
}
Body(win)
struct Window *win;
{
struct IntuiMessage *im;
BOOL looping=TRUE;
ULONG class;
REQ.LeftEdge = 5;
REQ.TopEdge = 12;
Request (&REQ,win);
while (looping) {
im = (struct IntuiMessage *) GetMsg(win->UserPort);
if (!im) WaitPort (win->UserPort);
else {
printf ("Message: %lx\n", im);
class = im->Class;
ReplyMsg (im);
if (class == REQCLEAR) looping = FALSE;
}
}
}