home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 1 / Mecomp-CD.iso / amiga / tools / boot / powerwindows / developper / include / pwdevelopper.h next >
C/C++ Source or Header  |  1997-04-25  |  5KB  |  219 lines

  1. /* PWDevelopper.h */
  2.  
  3. #ifndef EXEC_TYPES_H
  4. #include <exec/types.h>
  5. #endif
  6.  
  7. #ifndef INTUITION_INTUITION_H
  8. #include <intuition/intuition.h>
  9. #endif
  10.  
  11. #ifndef INTUITION_CLASSUSR_H
  12. #include <intuition/classusr.h>
  13. #endif
  14.  
  15. /*=======================================================*/
  16. /*                     Screen-Checker                    */
  17. /*=======================================================*/
  18.  
  19.  
  20.  
  21.   /* Return-Codes */
  22.   
  23. #define CSR_OK 1
  24. #define CSR_FAIL 0
  25.     
  26.   /* Methods */
  27.   
  28. #define CS_INIT 1
  29. #define CS_EXIT 2
  30. #define CS_CHECK 3
  31.    
  32.   /* Messages */
  33.   
  34. struct csInit
  35. {
  36.     ULONG MethodID;
  37.     BYTE  PWVersion;        /* Version of PowerWindows */
  38.     BYTE    PWRevision;        /* Revision of PowerWindows */
  39.     BYTE    PWSubRevision;    /* SubRevision of PowerWindows */
  40.     BYTE    pad;
  41. };
  42.  
  43. struct csExit
  44. {
  45.     ULONG MethodID;    
  46. };
  47.  
  48. struct csCheck
  49. {
  50.     ULONG MethodID;
  51.     struct Screen *Scr;        /* Screen to check */
  52. };
  53.  
  54.  
  55.  
  56.  
  57. /*=======================================================*/
  58. /*                     Window-Checker                    */
  59. /*=======================================================*/
  60.  
  61.  
  62.  
  63.   /* Return-Codes */
  64.   
  65. #define CWR_OK 1
  66. #define CWR_ICONIFYGAD 2
  67. #define CWR_ICONIFYPOS 4
  68. #define CWR_FAIL 0
  69.     
  70.   /* Methods */
  71.   
  72. #define CW_INIT 1
  73. #define CW_EXIT 2
  74. #define CW_CHECK 3
  75. #define CW_RENDERIG 4
  76.  
  77.   /* Messages */
  78.   
  79. struct cwInit
  80. {
  81.     ULONG MethodID;
  82.     BYTE  PWVersion;                /* Version of PowerWindows */
  83.     BYTE    PWRevision;                /* Revision of PowerWindows */
  84.     BYTE    PWSubRevision;            /* SubRevision of PowerWindows */
  85.     BYTE    pad;
  86. };
  87.  
  88. struct cwExit
  89. {
  90.     ULONG MethodID;    
  91. };
  92.  
  93. struct cwCheck
  94. {
  95.     ULONG MethodID;
  96.     struct Window *Win;            /* Window to check */
  97.     WORD    Gad_LeftEdge;            /* LeftEdge of Iconify-Gadget WRITE ONLY! */
  98.     WORD    Gad_TopEdge;            /* TopEdge of Iconify-Gadget  WRITE ONLY! */
  99.     WORD    Gad_Width;                /* Width of Iconify-Gadget    WRITE ONLY! */
  100.     WORD    Gad_Height;                /* Height of Iconify-Gadget   WRITE ONLY! */
  101.     WORD    Gad_Flags;                /* Flags for Gadget: only GFLG_RELRIGHT and GFLG_RELBOTTOM supported upto now! WRITE ONLY */
  102.     WORD    Gad_Position;            /* Position of Gadget in Window's GagetList WRITE ONLY! */
  103. };
  104.  
  105. struct cwRenderIG
  106. {
  107.     ULONG MethodID;
  108.     struct Image *GadImage;            /* Pointer to the Image */
  109.     struct impDraw *DrawImageMsg;    /* Pointer to a a IM_DRAW-Message */
  110. };
  111.  
  112.  
  113.  
  114. /*=======================================================*/
  115. /*                     Icon-Renderer                     */
  116. /*=======================================================*/
  117.  
  118.  
  119.  
  120.   /* Return-Codes */
  121.   
  122. #define RIR_OK 1
  123. #define RIR_FAIL 0
  124.     
  125.   /* Methods */
  126.   
  127. #define RI_INIT 1
  128. #define RI_EXIT 2
  129. #define RI_INITICON 3
  130. #define RI_RENDERICON 4
  131. #define RI_EXITICON 5
  132.  
  133.   /* Messages */
  134.   
  135. struct riInit
  136. {
  137.     ULONG MethodID;
  138.     BYTE  PWVersion;                /* Version of PowerWindows */
  139.     BYTE    PWRevision;                /* Revision of PowerWindows */
  140.     BYTE    PWSubRevision;            /* SubRevision of PowerWindows */
  141.     BYTE    pad;
  142. };
  143.  
  144. struct riExit
  145. {
  146.     ULONG MethodID;    
  147. };
  148.  
  149. struct riInitIcon
  150. {
  151.     ULONG MethodID;
  152.     struct Window *ParentWin;    /* Window which is being iconified */
  153.     struct Task *WinTask;         /* Task that opened Window */
  154.     WORD    IconWidth;                /* Don't change this */
  155.     WORD    IconHeight;                /* You can change this */
  156.     APTR    UserData;                /* You can store something "local" to the Icon here */
  157. };
  158.  
  159. struct riRenderIcon
  160. {
  161.     ULONG MethodID;
  162.     struct Window *ParentWin;    /* Window this Icons belongs to */
  163.     struct Window *Icon;            /* The Icon is a Window! */
  164.     APTR    UserData;                /* Will be set to what you have stored here during RI_INITICON */
  165. };
  166.  
  167. struct riExitIcon
  168. {
  169.     ULONG MethodID;
  170.     APTR    UserData;                /* Will be set to what you have stored here during RI_INITICON */
  171. };
  172.  
  173.  
  174. /*======================================================*/
  175.  
  176. /*==== All Messages in one ====*/
  177.  
  178. union PWMessage
  179. {
  180.     struct csInit pcsInit;
  181.     struct csExit pcsExit;
  182.     struct csCheck pcsCheck;
  183.     
  184.     struct cwInit pcwInit;
  185.     struct cwExit pcwExit;
  186.     struct cwCheck pcwCheck;
  187.     struct cwRenderIG pcwRenderIG;
  188.  
  189.     struct riInit priInit;
  190.     struct riExit priExit;
  191.     struct riInitIcon priInitIcon;
  192.     struct riRenderIcon priRenderIcon;
  193.     struct riExitIcon priExitIcon;
  194. };
  195.  
  196. /* Macros for easy Type-Casting */
  197.  
  198. #define CSINIT_Msg        ((struct csInit *)msg)
  199. #define CSEXIT_Msg        ((struct csExit *)msg)
  200. #define CSCHECK_Msg        ((struct csCheck *)msg)
  201.  
  202. #define CWINIT_Msg        ((struct cwInit *)msg)
  203. #define CWEXIT_Msg        ((struct cwExit *)msg)
  204. #define CWCHECK_Msg        ((struct cwCheck *)msg)
  205. #define CWRENDERIG_Msg    ((struct cwRenderIG *)msg)
  206.  
  207. #define RIINIT_Msg        ((struct riInit *)msg)
  208. #define RIEXIT_Msg        ((struct riExit *)msg)
  209. #define RIINITICON_Msg    ((struct riInitIcon *)msg)
  210. #define RIRENDERICON_Msg ((struct riRenderIcon *)msg)
  211. #define RIEXITICON_Msg    ((struct riExitIcon *)msg)
  212.  
  213. /*==== Prototypes ====*/
  214.  
  215. LONG CheckScreen(Msg msg);
  216. LONG CheckWindow(Msg msg);
  217. LONG RenderIcon(Msg msg);
  218.  
  219.