home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
204.lha
/
Wicon
/
wicon.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-02-14
|
4KB
|
163 lines
/**************************************************************************
*
* WICON.H for wicon.c a *Window iconifier
*
* 1.7 08-May-88 Copyright (c) 1987,1988 Steven Sweeting 26-Mar-87
*
**************************************************************************/
/* #define SMALLWICON /* for a smaller executable */
#include "intuition/intuitionbase.h"
#include "devices/inputevent.h"
#include "devices/input.h"
#include "stdio.h"
#define MAXWINFO 20
#define DBG(s) fputs(s,stderr)
struct BoxInfo
{
SHORT LeftEdge, TopEdge;
SHORT Width, Height;
};
/* must be a longword multiple */
struct sWinfo
{
struct Window *Window; /* address of Window structure */
struct Window *IconWindow; /* address of the special Icon Window */
WORD Flags; /* Our own Flags */
WORD filler;
};
/* These are for sWinfo.Flags */
#define WINFO_USED 1 /* This element is being used */
#define WINFO_CLOSING 2 /* This window is being closed */
#define WINFO_WAIT 4 /* This element is being modified */
WORD Winfos;
struct sWinfo Winfo[ MAXWINFO ];
struct Screen *WiconScreen;
struct Screen *WorkBenchScreen;
struct MsgPort IconPort;
LONG IconMask;
void (*OWVector)();
void (*CWVector)();
#ifdef WICON__C
struct NewWindow NewBackdrop =
{
0,11, 0, 0,
-1,-1, 0,
BORDERLESS | BACKDROP | SIMPLE_REFRESH,
NULL, NULL, NULL, NULL, NULL,
90,40, -1, -1,
CUSTOMSCREEN
};
struct Window *BackdropWindow=NULL;
struct Window *WiconOpenW();
void WiconCloseW();
struct IntuitionBase *IntuitionBase = NULL;
struct IconBase *IconBase = NULL;
struct GfxBase *GfxBase = NULL;
struct LayersBase *LayersBase = NULL;
struct Window *PushedWindow = NULL;
struct MsgPort *DeathPort = NULL;
LONG SuicideMask = 0;
struct Task *WiconTask = NULL;
LONG PushMask = 0;
LONG PushSignal = 0;
struct IOStdReq *InputRequestBlock = NULL;
BOOL InputDeviceOpen = FALSE;
struct Interrupt WiconInterrupt = { 0 };
struct MsgPort *InputDevPort = NULL;
#endif
extern struct Library *OpenLibrary();
extern struct Task *FindTask();
extern LONG AllocSignal();
extern VOID FreeSignal();
extern struct MsgPort *CreatePort();
extern struct MsgPort *FindPort();
extern long Wait();
extern struct IOStdReq *CreateStdIO();
extern APTR AllocMem();
extern struct Task *FindTask();
extern struct InputEvent *WiconHandler();
#define WINDOW(layer) ((struct Window *)((layer)->Window))
#define SCREENTOP\
(theScreen->TopEdge << ((theScreen->ViewPort.Modes & LACE)? 0: 1))
extern struct Layer *WhichLayer();
extern struct Window *OpenWindow();
extern struct Window *OldOpenWindow();
extern void WiconHandlerStub();
extern void (*GetFunction())();
extern void (*SetFunction())();
extern void UnSetFunction();
#define LVOOpenWindow (-0xCCL)
#define LVOCloseWindow (-0x48L)
extern void SizeRec();
#ifndef SMALLWICON
/* Arguments, explained in the .doc file */
BOOL Arg_AllScreens;
WORD Arg_Boxes;
WORD Arg_Chars;
BOOL Arg_Depth;
BOOL Arg_Execute;
WORD Arg_FirstScreen;
BOOL Arg_Iconify;
WORD Arg_Lines;
WORD Arg_Priority;
BOOL Arg_Quiet;
BOOL Arg_RMBTRAP;
BOOL Arg_Sticky;
BOOL Arg_Testing;
BOOL Arg_WBWs;
char *Arg_Window;
/* I don't know whether this is Manx dependant or not */
extern struct WBStartup *WBenchMsg;
#else SMALLWICON
#define Arg_Boxes (20)
#define Arg_Chars (12)
#define Arg_Depth (TRUE)
#define Arg_Execute (TRUE)
#define Arg_Testing (FALSE)
#define Arg_AllScreens (TRUE)
#define Arg_FirstScreen (FALSE)
#define Arg_Iconify (TRUE)
#define Arg_Lines (1)
#define Arg_Priority (0)
#define Arg_Quiet (FALSE)
#define Arg_RMBTRAP (FALSE)
#define Arg_Sticky (FALSE)
#define Arg_WBWs (FALSE)
#define Arg_Window
#endif SMALLWICON