home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 514a.lha / TplEdit_v1.00_alpha / Src / defs.h next >
C/C++ Source or Header  |  1991-06-08  |  4KB  |  187 lines

  1.  
  2. #define abs
  3. #include <exec/types.h>
  4. #include <exec/nodes.h>
  5. #include <exec/lists.h>
  6. #include <dos/dos.h>
  7. #include <intuition/screens.h>
  8. #include <intuition/intuition.h>
  9. #include <intuition/gadgetclass.h>
  10. #include <libraries/gadtools.h>
  11. #include <libraries/asl.h>
  12. #include <clib/exec_protos.h>
  13. #include <clib/intuition_protos.h>
  14. #include <clib/gadtools_protos.h>
  15. #include <clib/graphics_protos.h>
  16. #include <clib/asl_protos.h>
  17. #include <clib/alib_protos.h>
  18. #ifdef NOTDEF
  19. #include <db/dblib.h>
  20. #include <db/db.h>
  21. #include <db/dbm.h>
  22. #include <dbm/menu_dbm.h>
  23. #endif
  24. #include <stdio.h>
  25. #include <stdlib.h>
  26. #include <string.h>
  27.  
  28. #define Prototype extern
  29. #define Local
  30.  
  31. typedef struct Gadget    Gadget;
  32. typedef struct Menu    Menu;
  33. typedef struct MenuItem MenuItem;
  34. typedef struct Window    Window;
  35. typedef struct Screen    Screen;
  36. typedef struct NewGadget NewGadget;
  37. typedef struct NewMenu     NewMenu;
  38. typedef struct IntuiMessage IMsg;
  39. typedef struct List    MaxList;
  40. typedef struct Node    MaxNode;
  41. typedef struct TextFont TextFont;
  42. typedef struct TextAttr TextAttr;
  43. typedef struct MsgPort    MsgPort;
  44. typedef struct RastPort RastPort;
  45. typedef struct StringInfo   StringInfo;
  46. typedef struct FileRequester FileRequester;
  47.  
  48. typedef unsigned char    ubyte;
  49. typedef unsigned short    uword;
  50. typedef unsigned long    ulong;
  51.  
  52. typedef struct MinList    List;
  53. typedef struct MinNode    Node;
  54. typedef struct List    MaxList;
  55. typedef struct Node    MaxNode;
  56.  
  57. #define STATE_WANDER        0
  58. #define STATE_NEWREGION     1
  59. #define STATE_DELREGION     2
  60. #define STATE_MOVEREGION    3
  61. #define STATE_SIZEREGION    4
  62. #define STATE_LINKREGION    5    /*  link from region to region    */
  63.  
  64. #define MENU_PROJ_SAVE        1
  65. #define MENU_PROJ_SAVEAS    2
  66. #define MENU_PROJ_SAVESRC   3
  67. #define MENU_PROJ_SAVEASSRC 4
  68. #define MENU_PROJ_LOAD        5
  69. #define MENU_PROJ_MERGE     6
  70. #define MENU_PROJ_QUIT        7
  71.  
  72. #define MENU_LINK_LOCK        16
  73.  
  74. #define MENU_SNAP        64
  75.  
  76. #define EGAD_TYPES    1
  77. #define EGAD_LABPL    2
  78. #define EGAD_NEW    3
  79. #define EGAD_DEL    4
  80. #define EGAD_MOVE    5
  81. #define EGAD_SIZE    6
  82. #define EGAD_REGNAME    7
  83. #define EGAD_LABEL    8
  84. #define EGAD_DEFAULT    9
  85. #define EGAD_WANDER    10
  86.  
  87. #define EGAD_LADD    11
  88. #define EGAD_LDEL    12
  89. #define EGAD_ENUM    13
  90. #define EGAD_ENUMSTR    14
  91. #define EGAD_UPDATE    15
  92. #define EGAD_MAXBUFLEN    16
  93.  
  94. typedef struct Box {
  95.     short   bo_Xs;
  96.     short   bo_Ys;
  97.     short   bo_Xe;
  98.     short   bo_Ye;
  99. } Box;
  100.  
  101. typedef struct TplRegion {
  102.     MaxNode rg_Node;        /*  region link & name    */
  103.     Box     rg_Box;        /*  current size    */
  104.     Box     rg_MinMax;        /*  min size / max size */
  105.     uword   rg_Id;        /*  databse ID in file    */
  106.     Gadget  *rg_Gad;        /*  related gadget    */
  107.     struct TplRegion *rg_LinkLeft;
  108.     struct TplRegion *rg_LinkRight;
  109.     struct TplRegion *rg_LinkUp;
  110.     struct TplRegion *rg_LinkDown;
  111.     struct TplRegion *rg_LockedTo;
  112.     long    rg_Flags;
  113.     short   rg_Type;
  114.     short   rg_MaxBufLen;    /*  maximum buffer len    */
  115.     long    rg_ExclGroup;    /*  exclude ID 0=disab    */
  116.  
  117.     char    *rg_DataBase;    /*  one of        */
  118.     char    *rg_ListRef;
  119.     char    **rg_CycleAry;    /*  same as ListSet    */
  120.     List    rg_ListSet;
  121.  
  122.     char    *rg_DefText;        /*    default text/name   */
  123.     char    *rg_LabText;
  124.     TextAttr    rg_TextAttr;        /*    font to use        */
  125. } TplRegion;
  126.  
  127. #define RGF_DEFERED    0x0001
  128.  
  129. #define RGT_INVISIBLE    0    /*  corresponds to CycLabels    */
  130. #define RGT_BUTTON    1
  131. #define RGT_ENTRY    2
  132. #define RGT_SELLIST    3
  133. #define RGT_CYCLE    4
  134.  
  135.  
  136. typedef struct ProjEntry {
  137.     uword   pe_Type;
  138.     long    pe_Len;
  139. } ProjEntry;
  140.  
  141. typedef struct ProjHeader {
  142.     long    ph_Magic;
  143.     long    ph_HdrSize;
  144.     long    ph_Version;
  145.     Box     ph_WinDim;
  146.     Box     ph_MinMaxDim;
  147.     Box     ph_ZoomDim;
  148. } ProjHeader;
  149.  
  150. typedef struct PPNode {
  151.     Node    pp_Node;
  152.     long    pp_Pos;
  153. } PPNode;
  154.  
  155. #define PH_MAGIC    'TPLE'
  156.  
  157. #define PT_PROJECT    1        /*    heirarchy   */
  158. #define PT_HEADER    2
  159. #define PT_REGION    3        /*    heirarchy   */
  160. #define PT_NAME     4
  161. #define PT_BOX        5
  162. #define PT_MINMAX    6
  163. #define PT_ID        7
  164. #define PT_REGLL    8
  165. #define PT_REGLR    9
  166. #define PT_REGLU    10
  167. #define PT_REGLD    11
  168. #define PT_LOCKTO    12
  169. #define PT_FLAGS    13
  170. #define PT_TYPE     14
  171. #define PT_EXCLID    15
  172. #define PT_DATABASE    16        /*    heirarchy   */
  173. #define PT_LISTREF    17        /*    heirarchy   */
  174. #define PT_LISTSET    18        /*    heirarchy   */
  175. #define PT_DEFTEXT    19        /*    heirarchy   */
  176. #define PT_TEXTATTR    20        /*    heirarchy   */
  177. #define PT_YSIZE    21
  178. #define PT_LABTEXT    22        /*    heirarchy   */
  179. #define PT_MAXBUFLEN    23
  180. #define PT_END        0xFFFF
  181.  
  182. extern void *GetHead();
  183. extern void *GetSucc();
  184.  
  185. #include <tpl-protos.h>
  186.  
  187.