/* * ClipTool (Udklipsværktøj) - A Commodities Exchange Application * Copyright (C) 1994 Torsten Poulin * * cliptool.h - include file for ClipTool. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * The author can be contacted by mail at * Torsten Poulin * Banebrinken 99, 2, 77 * DK-2400 Copenhagen NV * Denmark * or via email: torsten@diku.dk * * $Log: cliptool.h,v $ * Revision 1.1 94/02/20 21:33:01 Torsten * Initial revision * */ #define INTUI_V36_NAMES_ONLY #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(LATTICE_50) | defined(__SASC_510) | defined (__SASC_60) #include #include #include #include #include #include #include #include #include #include #include #include #include #endif #include #include #include #include #define GUI_WIDTH 8*39+3*4+2*2+22 #define GUI_HEIGHT 18+30 #define EVENT_HOTKEY 1L #define BBGD_OPEN (0) #define BBGD_SAVE (1) #define BBGD_CUT (2) #define BBGD_COPY (3) #define BBGD_PASTE (4) #define BBGD_PREV (5) #define BBGD_NEXT (6) #define BBGD_KILL (7) #define CTM_OPENTEXT (1) #define CTM_OPENFTXT (2) #define CTM_SAVE (-1) /* so we can find it for enabling/disabling */ #define CTM_SAVETEXT (3) #define CTM_SAVEFTXT (4) #define CTM_ABOUT (5) #define CTM_HIDE (6) #define CTM_QUIT (7) #define CTM_CUT (8) #define CTM_COPY (9) #define CTM_PASTE (10) #define CTM_KILL (11) #define CTM_PREV (12) #define CTM_NEXT (13) #define CTM_ICONS (14) #define CTM_APPICON (15) #define CTM_AUTO (16) #define CTM_UNIT (17) #define RBUFSZ 512 /* Buffer size when reading clips */ extern UBYTE *verstring, *portname, *hotkey; extern struct Library *DOSBase; extern struct Library *IntuitionBase; extern struct Library *CxBase; extern struct Library *IconBase; extern struct Library *WorkbenchBase; extern struct Library *GadToolsBase; extern struct Library *GfxBase; extern struct Library *IFFParseBase; extern struct Library *LayersBase; extern struct Library *AslBase; extern struct Library *RexxSysBase; extern struct Library *LocaleBase; extern struct Window *guiwin; /* The GUI window */ extern struct AppWindow *appwin; /* ... as an AppWin */ extern struct AppIcon *appicon; extern long xoffset, yoffset; /* Size of left and top borders */ extern struct MsgPort *broker_mp; extern struct MsgPort *appwin_mp; extern struct MsgPort *appicon_mp; extern struct MsgPort *arexx_mp; extern CxObj *broker; extern ULONG cxsigflag, awsigflag, aisigflag, rxsigflag; extern struct FileRequester *filereq; /* ASL requester */ /* Text is stored in linked lists of buffers */ struct textbuffer { struct textbuffer *next; ULONG length; UBYTE data[1]; }; /* The text buffer list are stored in a doubly linked list. */ struct bufferlisthead { struct bufferlisthead *next; struct bufferlisthead *prev; struct textbuffer *tb; }; /* Global pointer to the current text buffer list header. */ extern struct bufferlisthead *currentbuffer; extern long ntotal, ncurrent; extern BOOL nothidden; /* Do not open GUI if FALSE */ extern BOOL guiminimized; /* not used */ extern BOOL simplebuttons; /* Force use of simple imagery */ extern BOOL createicons; /* Create icon when saving a file */ extern BOOL usedropicon; /* Use AppIcon */ extern long unitnumber; /* Clipboard unit number (0-255) */ extern struct Menu *ctmenustrip; void handleevents(void); void loadtext(BOOL); void loaddropped(UBYTE *, BPTR); void rxload(UBYTE *, UBYTE *); void rxsave(UBYTE *, UBYTE *, BOOL); void savetext(BOOL); void about(void); void cut(void); void copy(void); void paste(void); void freetext(void); void prevtext(void); void nexttext(void); void getunitnumber(void); BOOL opengui(void); void closegui(void); void opendropicon(void); void closedropicon(void); void ghosting(void); struct Gadget *createbuttonbar(struct Gadget **, void *, BOOL); BOOL newsize(void); void showtext(void); void updatetitlebar(void); struct MenuItem *findmenuitem(struct Menu *, long); void synchronizechecked(void); void msgreq(UBYTE *, UBYTE *); STRPTR ls(LONG); void initnewmenustruct(void);