home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / quot210s.zip / include / types.h < prev    next >
C/C++ Source or Header  |  1998-06-07  |  3KB  |  85 lines

  1. /*
  2.  * types.h
  3.  *
  4.  * Type definitions for use in the Quoteriser's GUI interface.
  5.  *
  6.  *      Created: 25th January, 1997
  7.  * Version 1.00: 9th April, 1997
  8.  * Version 2.00: 18th December, 1997
  9.  *
  10.  * (C) 1997 Nicholas Paul Sheppard
  11.  *
  12.  * This file is distributed under the GNU General Public License. See the
  13.  * file copying.txt for details.
  14.  */
  15.  
  16. #ifndef _QUOTERISER_TYPES_H
  17. #define _QUOTERISER_TYPES_H
  18.  
  19. #include <os2.h>
  20. #include "quotes.h"
  21. #include "authors.h"
  22.  
  23.  
  24. /* modes the program can be in */
  25. #define Q_NONE        0
  26. #define Q_QUOTE        1
  27. #define Q_AUTHOR    2
  28. #define Q_SEARCHING    3
  29.  
  30.  
  31. /* types of searches that can be performed */
  32. #define Q_FULL        0
  33. #define Q_KEY        1
  34. #define Q_TEXT        2
  35. #define Q_NAME        3
  36.  
  37.  
  38. /* type to contain program settings */
  39. typedef struct _PROFILE {
  40.     char    szEditor[CCHMAXPATH];                /* text editor */
  41.     char    szEditorParams[CCHMAXPATH];            /* parameters to pass to text editor */
  42.     char    szDataPath[CCHMAXPATH];                /* path to data files */
  43.     char    szDocPath[CCHMAXPATH];                /* path to documentation */
  44.     char    szQuoteDB1[CCHMAXPATH];                /* last quote database used */
  45.     char    szAuthorDB1[CCHMAXPATH];            /* last author database used */
  46.     char    szBrowser[CCHMAXPATH];                /* HTML browser */
  47.     char    szBrowserParams[CCHMAXPATH];            /* parameters to pass to HTML browser */
  48.     FATTRS    fattrs;                        /* font */
  49. } PROFILE;
  50.  
  51.  
  52. /* type to contain the current program state - basically, all the global variables */
  53. typedef struct _PROGSTATE {
  54.     int        iMode;                    /* current mode of the program */
  55.     AUTHORDB    adb;                    /* currently open author database */
  56.     char        szAuthorDB[CCHMAXPATH];            /* name of currently open author database */
  57.     int        iAdbMode;                /* mode that adb is open in */
  58.     char        szAuthorCode[AUTHOR_MAX_CODE + 1];    /* code of currently-selected author */
  59.     AUTHORINFO    *pai;                    /* information on currently-selected author */
  60.     char        *pszDesc;                /* description of currently-sleected author */
  61.     QUOTEDB        qdb;                    /* currently open quote database */
  62.     char        szQuoteDB[CCHMAXPATH];            /* name of the currently open quote database */
  63.     int        iQdbMode;                /* mode that qdb is open in */
  64.     char        szQuoteCode[QUOTE_MAX_CODE + 1];    /* code of currently-selected quote */
  65.     QUOTEINFO    *pqi;                    /* information on currently-selected quote */
  66.     char        *pszText;                /* text of currently-selected quote */
  67. } PROGSTATE;
  68.  
  69.  
  70. /* type to contain search information */
  71. typedef struct _SEARCHINFO {
  72.     int        iType;                    /* type of search to carry out */
  73.     char        *pszString;                /* search data */
  74. } SEARCHINFO;
  75.  
  76.  
  77. /* type for passing information to GetTextBox() */
  78. typedef struct _GETTEXT {
  79.        int        iMaxLength;                /* maximum length of string allowed */
  80.     char        *pszString;                /* buffer to receive string */
  81.     char        *pszTitle;                /* title of the get text box */
  82. } GETTEXT;
  83.  
  84. #endif
  85.