home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / gui / visualarts1_1.lha / VisualArts / Install / VisualArts.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-02  |  4.6 KB  |  125 lines

  1. /*
  2. **  $Filename: VisualArts.h $
  3. **  $Includes, V1.1 $
  4. **  $Date: 94/07/01 $
  5. **
  6. **
  7. **  (C) 1994 Danny Y. Wong              
  8. **  All Rights Reserved
  9. **
  10. **  DO NOT MODIFY
  11. */
  12.  
  13. #include <exec/types.h>
  14. #include <exec/memory.h>
  15. #include <exec/lists.h>
  16. #include <exec/nodes.h>
  17. #include <intuition/intuition.h>
  18. #include <intuition/intuitionbase.h>
  19. #include <intuition/gadgetclass.h>
  20. #include <intuition/classes.h>
  21. #include <graphics/displayinfo.h>
  22. #include <graphics/gfxbase.h>
  23. #include <graphics/gfxmacros.h>
  24. #include <libraries/gadtools.h>
  25. #include <libraries/dos.h>
  26. #include <workbench/workbench.h>
  27. #include <workbench/startup.h>
  28.  
  29. #include <clib/wb_protos.h>
  30. #include <clib/exec_protos.h>
  31. #include <clib/intuition_protos.h>
  32. #include <clib/gadtools_protos.h>
  33. #include <clib/graphics_protos.h>
  34. #include <clib/utility_protos.h>
  35. #include <clib/alib_protos.h>
  36. #include <clib/dos_protos.h>
  37.  
  38. #include "string.h" 
  39. #include "stdio.h"
  40. #include "stdlib.h"
  41. #include "PopUpMenuClass.h" 
  42.  
  43. /* macros for easy access to Gadget data */
  44.  
  45. #define GetString(gad)            (((struct StringInfo *)gad->SpecialInfo)->Buffer)
  46. #define GetUndoString(gad)    (((struct StringInfo *)gad->SpecialInfo)->UndoBuffer)
  47. #define GetNumber(gad)            (((struct StringInfo *)gad->SpecialInfo)->LongInt)
  48.  
  49. /* List node name.  Each node have the following */
  50.   
  51. struct NameNode
  52. {
  53.   struct Node nn_Node;  //linked list node to previous or next node
  54.   UBYTE nn_Data[255];   //name of the node, this is the same as
  55.                         //nn_Node.ln_Name
  56. };
  57.  
  58. /* Visual Arts message object.  Every GADGETUP event, the object is
  59.    sent to the attached function.  For Menus, the va_Gadget field is
  60.    always NULL.
  61. */
  62.  
  63. struct VAobject {
  64.   struct Window *va_Window;             //window the object originated
  65.   struct Gadget *va_Gadget;             //the gadget that sent this object
  66.   struct IntuiMessage *va_IntuiMsg;     //the IntuiMessage
  67.   ULONG va_Flags;                       //user flags 
  68.   APTR va_UserData;                     //user data, function pointer etc..
  69. };
  70.  
  71. /* Every AREXX command have the following */
  72.  
  73. struct rexxCommandList
  74. {
  75.   char *name;       //name of the AREXX command, note its case sensitive
  76.   APTR userdata;    //user data, in this case it's a function pointer    
  77. };
  78.  
  79. /* Structure for Multi-Processing windows.  This structure is a linked
  80.    List for every window opened as Multi-Processing
  81. */
  82.  
  83. struct WindowNode
  84. {
  85.     struct Node nn_Node;            //linked list to prev or next window
  86.     UBYTE nn_Data[80];              //window name
  87.     struct Window *nn_Window;       //window pointer
  88.     struct AppWindow *nn_AppWindow; //AppWindow pointer if window is a AppWindow
  89.     struct MsgPort *nn_AppWindPort; //AppWindow Port
  90.     short ID;                       //WindowNode ID
  91.     APTR UserData;                  //window Handler for this window
  92. };
  93.  
  94. /*  Visual Arts function prototypes. All are in the VisualArts.lib 
  95. */
  96.  
  97. extern void DrawBox(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern );
  98. extern void DrawFBox(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern, UBYTE Outline, short Fill );
  99. extern void DrawLine(struct Window *Wind, int Left, int Top, int Wid, int Hi, UBYTE APen, short Pattern );
  100. extern void DrawNCircle(struct Window *Wind, int Left, int Top, int Right, int Bottom, UBYTE APen);
  101. extern void DrawFCircle(struct Window *Wind, int Left, int Top, int Right, int Bottom, UBYTE APen, short Pattern, UBYTE Outline, short Fill );
  102. extern void SetRPortFill(struct Window *Wind, short Type);
  103. extern void ButtonSelected(struct Window *wind, struct Gadget *gad);
  104. extern int AddNewNode(struct List *list, char name[255]);
  105. extern int DeleteNewNode(struct List *list, char name[255]);
  106. extern struct List *GetNewList(void);
  107. extern struct NameNode *FindNodeName(struct List *list, char name[255]);
  108. extern void FreeList(struct List *list);
  109. extern APTR   VisualInfo;
  110. extern struct Screen *Scr;
  111. extern struct WindowNode *AddWindowNode(struct List *list, char name[80], APTR handler);
  112. extern int DelWindowNode(struct List *list, char name[80]);
  113. extern struct WindowNode *FindWindowNode(struct List *list, char name[80]);
  114. extern void FreeWindowList(struct List *list);
  115. extern void ReMakeWindowID(struct List *list);
  116. extern void closeRexxPort(void);
  117. extern void handlerRexxPort(void);
  118. extern struct RexxMsg *asyncRexxCmd(char *s);
  119. extern void replyRexxCmd(register struct RexxMsg *msg, register long primary,
  120.                   register long secondary, register char *string);
  121. extern long InitRexxPort(char *s, struct rexxCommandList *rcl,
  122.                   char *exten, int (*uf)());
  123. extern int dispatchRexx(register struct RexxMsg *msg, register struct rexxCommandList *dat, char *p);
  124.  
  125.