home *** CD-ROM | disk | FTP | other *** search
- /* > $.CLIB.C.defns
- *
- * HASWIN Graphics Library
- * =========================
- *
- * Copyright (C) H.A.Shaw 1990.
- * Howard A. Shaw.
- * The Unit for Space Sciences,
- * Room 165,
- * Physics Building,
- * University of Kent at Canterbury.
- * Canterbury.
- * Kent. CT2 7NJ
- * You may use and distribute this code freely, however please leave
- * it alone. If you find bugs (and there will be many) please contact
- * me and the master source can be modified. If you keep me informed
- * of who you give copies of this to then I can get release upgrades
- * to them.
- *
- * standard definitions file.
- */
- #include "includes.h"
-
- /*
- * internal static global data for temp. use. Not safe across
- * functions calls between components of the library except error.
- * routines and message display routines
- */
- char haswintemp[256];
-
- /*
- * internal static global data.
- */
-
- /* internal data list gloabals */
- window *haswin_topwindow=0; /* pointer to list of windows */
- icon *haswin_baricons=0; /* pointer to icons on icon bar */
- int haswin_activewindowmax = 0; /* number of items in activewindow[] */
- int haswin_activewindow[HASWIN_ACTIVEMAX];
- /* list of active windows handles */
- /* ie: those that the library will */
- /* respond to. The last item in the */
- /* list is handle 0. The iconbars */
- /* cannot be in the list. */
- /* general things we have to remember */
- int haswin_version=HASWIN_UNKNOWN;
- /* WIMP version number */
- int haswin_flags=0; /* Global WIMP flags */
- char *haswin_commline=0; /* pointer to command line tail */
- int *haswin_starttime=0; /* pointer to program start real-time */
-
- /* sprite control variables */
- int *haswin_usersprites=0; /* user sprite buffer */
- int *haswin_haswinsprites=0; /* haswin internal sprite buffer */
-
- /* template control globals */
- int haswin_templatefsize=0; /* size of template file */
- char *haswin_templatewspace=0; /* WIMP template indirected data area */
- char *haswin_templateptr=0; /* current place in 'templatewspace' */
- char *haswin_templateend=0; /* end of 'templatewspace' */
- char haswin_fontarray[256]; /* font reference count array */
-
- /* menu variables */
- menu haswin_menu; /* current menu (actual==0 if none) */
-
- /* window dragging globals */
- window *haswin_dragwindow=0; /* window drag started from */
- icon *haswin_dragicon=0; /* icon drag started from */
- pointer haswin_dragmouse; /* pointer state at drag start */
-
- /* automatic file handling globals - loading files */
- int (*haswin_loadfileroutine)(char *, buffer *)=0;
- /* user load file routine */
- char haswin_defaultloadfile[256] = "";
- /* default load filename */
- window *haswin_loadingwindow=0; /* window to ask loading in. */
- icon *haswin_loadicon=0; /* icon for filetype picture. */
- icon *haswin_loadiconname=0; /* icon for filename string. */
- icon *haswin_loadicontype=0; /* icon for filetype string. */
- int haswin_loadfiletype=0; /* filetype of load file */
-
- /* automatic file handling globals - saving files */
- int (*haswin_savefileroutine)(char *, buffer *)=0;
- /* user save file routine */
- char haswin_defaultsavefile[256] = "";
- /* default save filename */
- window *haswin_saveingwindow=0; /* window to ask saving in. */
- icon *haswin_saveicon=0; /* icon for filetype picture. */
- icon *haswin_saveiconname=0; /* icon for filename string. */
- icon *haswin_saveicontype=0; /* icon for filetype string. */
- int haswin_savefiletype=0; /* filetype of save file */
- int haswin_fileoptions=0; /* global file control options */
-
- /* automatic file handling globals - auto loading of files */
- int (*haswin_autoloadroutine)(char *, buffer *)=0;
- /* user autoload routine */
- int haswin_autoloadtype=0; /* filetype of autoload file */
-
- /* automatic file handling globals - ram transfer of files */
- int (*haswin_ramtxroutine)(void *, int, int, buffer *)=0;
- /* user RAM transmit routine */
- void *haswin_ramtxbuffer=0; /* address of TX transfer buffer */
- int haswin_ramtxlength=0; /* length of haswin_ramtxbuffer */
- int haswin_ramtxbytes=0; /* number of bytes transferred */
- int (*haswin_ramrxroutine)(void *, int, int, buffer *)=0;
- /* user RAM receive routine */
- void *haswin_ramrxbuffer=0; /* address of RX transfer buffer */
- int haswin_ramrxlength=0; /* length of haswin_ramrxbuffer */
- int haswin_ramrxbytes=0; /* number of bytes transferred */
-
- /* task variables */
- int haswin_taskid = 0; /* this task id number */
- char haswin_taskname[TASK_MAXNAME];
- /* this task name */
- /* task name searching variables */
- char *haswin_tasknameis; /* pointer to taskname */
-
- /* task quit control variables */
- window *haswin_quitwin=0; /* window quit is prompted in */
- int haswin_quitfrom=0; /* id of task quit request came from */
- int (*haswin_exittrap)(int) = 0;
- /* routine to call on clean exit */
-
- /* memory management variables */
- int haswin_programtop=0; /* top of program memory */
-
- /* special variable to store sprite information for switching VDU driver
- output to a sprite. This is used to put window contents in a sprite. */
- spritejob haswin_spritejob = { 0, 0, 0, 0, 0, 0, 0};
-
- /* special variable to store printer driver information for switching VDU
- driver output to a printer driver job. This is used to print window
- contents. */
-
- int (*haswin_printfileroutine)(char *, buffer *)=0;
- /* user print file routine */
-
-