home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 160.lha / StructureBrowser_v1.3 / Sources / header / twm.h < prev   
Encoding:
C/C++ Source or Header  |  1988-04-27  |  1.6 KB  |  53 lines

  1. /* header/twm.h
  2.  
  3.    This is the same header file for both twm.c and twmClient.c. However, the
  4.    intuition include is not needed for twmClient, and can be omitted to
  5.    reduce compilation time.
  6. */
  7.  
  8. #include <intuition/intuitionbase.h>
  9. #include <exec/types.h>
  10. #include <exec/memory.h>
  11. #include <exec/ports.h>
  12. #include <exec/lists.h>
  13.  
  14. #define PORTNAME ("TinyWindowManager")
  15.  
  16. #define GADGNAMESIZE   17
  17.  
  18. #define GADGHGUTTER        18
  19. #define GADGVGUTTER        10
  20. #define GADGWIDTH         (GADGNAMESIZE << 3)
  21. #define GADGHEIGHT         10
  22.  
  23. /* commands passed in twm_action field of a twmMessage */
  24. #define TWM_ACTION_ADD      0
  25. #define TWM_ACTION_DELETE   1
  26.  
  27. /* return codes passed back in same field */
  28. #define E_OK                0
  29. #define E_OPEN_INTUI      501
  30. #define E_ALREADY_UP      502
  31. #define E_OPEN_PORT       503
  32. #define E_OPEN_WINDOW     504
  33. #define E_ACTION_UNKNOWN  505
  34. #define E_TASK_UNKNOWN    506
  35. #define E_NO_MEM          507
  36. #define E_ABANDON_SHIP    508
  37.  
  38.  
  39. struct twmMessage {
  40.    struct Message tmMessage;     /* Exec message structure     */
  41.    char *tmName;                 /* the client's gadget name   */
  42.    int tmAction;                 /* add or delete gadget       */
  43. };
  44.  
  45. struct twmGadget {
  46.    struct Gadget      tgGadget;                 /* the gadget for a client */
  47.    struct Border      tgBorder;                 /* box around gadget       */
  48.    struct IntuiText   tgIText;                  /* text in gadget          */
  49.    char               tgName[GADGNAMESIZE];     /* string for Intuitext    */
  50.    struct twmMessage *tgMessage;                /* msg to reply on click   */
  51.    struct twmGadget  *tgMynext;                 /* my link to next gadget  */
  52. };
  53.