/********************************************************************/ /**** ****/ /**** ****/ /**** Program : Intui-Funktionen ****/ /**** ****/ /**** Version : 02.06 ****/ /**** ****/ /**** Erstversion : 21.05.1988 ****/ /**** ****/ /**** Letzte Änderung : 03.08.1990 ****/ /**** ****/ /**** Compiliert mit : siehe MAKE ****/ /**** ****/ /**** Gelinkt mit : Für Tool.Library ****/ /**** ****/ /********************************************************************/ /**** ****/ /**** ****/ /**** Copyright by Rüdiger Dreier ****/ /**** ****/ /**** ****/ /********************************************************************/ #include "ToolProto.h" #include #include #include #include #include #include #include #include #include #include #include #define ACTIVE_SCREEN IntuitionBase->ActiveScreen #define ACTIVE_WINDOW IntuitionBase->ActiveWindow #define CODE ((Message!=0) ? Message->Code : 0) #define CLASS ((Message!=0) ? Message->Class : 0) #define CircleFill(RP,x,y,r) EllFill(RP,x,y,r,r); extern struct IntuitionBase *IntuitionBase; extern struct GfxBase *GfxBase; VOID __asm Print(register __a1 struct RastPort *RP, register __a0 char *text, register __d0 LONG col, register __d1 LONG xpos, register __d2 LONG ypos) { SetAPen(RP,col); Move(RP,xpos,ypos); Text(RP,text,strlen(text)); } /* Funktion, die die Events abfragt */ /* Parameter : Zeiger auf Fenster und auf Struktur zum Zwischenspeichern */ ULONG __asm EventAbfrage(register __a0 struct Window *Window, register __a1 struct info *MsgInfo) { struct Message *GetMsg(); /* Struktur leeren */ /* MsgInfo->Nachricht=0; */ MsgInfo->NachrichtenArt=0; /* MsgInfo->code=0; */ /* Wenn Events, dann Struktur entsprechend füllen */ if(MsgInfo->Nachricht=(struct IntuiMessage *)GetMsg(Window->UserPort)) { MsgInfo->NachrichtenArt=MsgInfo->Nachricht->Class; MsgInfo->code=MsgInfo->Nachricht->Code; MsgInfo->IAddress=MsgInfo->Nachricht->IAddress; MsgInfo->MouseX=MsgInfo->Nachricht->MouseX; MsgInfo->MouseY=MsgInfo->Nachricht->MouseY; ReplyMsg((struct Message *)MsgInfo->Nachricht); } /* Zusätzlich Class zurückgeben, für while-Schleife */ return(MsgInfo->NachrichtenArt); }