diff options
author | Christian A. Weber <chris@gna.ch> | 1993-11-02 18:53:33 +0000 |
---|---|---|
committer | Christian A. Weber <chris@gna.ch> | 1993-11-02 18:53:33 +0000 |
commit | 62e509e9c90d728c9f65145947276f79112ab48c (patch) | |
tree | 4c508e011be0c0bb386a7c4685c7c71c40611a82 /Stubs.c | |
download | bobi-62e509e9c90d728c9f65145947276f79112ab48c.tar.gz bobi-62e509e9c90d728c9f65145947276f79112ab48c.tar.bz2 bobi-62e509e9c90d728c9f65145947276f79112ab48c.zip |
Initial revision
Diffstat (limited to 'Stubs.c')
-rw-r--r-- | Stubs.c | 93 |
1 files changed, 93 insertions, 0 deletions
@@ -0,0 +1,93 @@ +#include <proto/exec.h> +#include <proto/intuition.h> +#include <proto/dos.h> + +#include "Bobi.h" + +extern struct NewWindow ToolNW; +extern struct Screen *mainscreen; +extern struct Window *mainwindow,*toolwindow; +extern struct RastPort *toolrastport; +extern WORD mainpalette[]; +extern struct MenuItem ToolWindowMenuItem; + +/*************************************************************************/ + +void ClearAllFunc() +{ + if(ShowRequest2("Do you really want to\ndelete all bobs?","OF COURSE!")) + ClearAll(); +} + +/*************************************************************************/ + +void QuitFunc() +{ + if(ShowRequest2("Do you really want to quit ?","JAJA!")) + Cleanup(TRUE); + else ShowMonoReq2("Da hast du nochmals Glück gehabt!"); +} + +/*************************************************************************/ + +void GrabDPaintFunc() +{ + ShowMonoReq2("Can't find the DPaint screen :-)"); +} + +/*************************************************************************/ + +void GrabScreenFunc() +{ + ShowMonoReq2("Sorry, this function will\nnever be implemented!"); +} + +/*************************************************************************/ + +void SaveIFFAnimFunc() +{ + ShowMonoReq2("Sorry, this function is not\nyet implemented!"); +} + +/*************************************************************************/ + +void EditPaletteFunc() +{ + Snooze(mainwindow); /* nicht LockWindows() wegen Farbpalette! */ + if(toolwindow) Snooze(toolwindow); + CopyMem(RequestColor(mainscreen),mainpalette,2*32); + if(toolwindow) UnSnooze(toolwindow); + UnSnooze(mainwindow); +} + +/*************************************************************************/ + +void ToolWindowFunc() +{ + if(ToolWindowMenuItem.Flags & CHECKED) + { + if(!toolwindow) + { + ToolNW.Screen = mainscreen; + if(ToolNW.TopEdge>mainscreen->Height-ToolNW.Height) + ToolNW.TopEdge=mainscreen->Height-ToolNW.Height; + if(!(toolwindow = OpenWindow(&ToolNW))) + { + ShowMonoReq2("Can't open tool window!\n"); + } + toolrastport = toolwindow->RPort; + } + } + else + { + if(toolwindow) + { + ToolNW.TopEdge=toolwindow->TopEdge; + ClearMenuStrip(toolwindow); + CloseWindow(toolwindow); + toolwindow=0; toolrastport=0; + ActivateWindow(mainwindow); + } + } +} + |