home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / Includes_and_Autodocs_3.5 / include / classes / window.h < prev   
Encoding:
C/C++ Source or Header  |  1999-10-29  |  9.8 KB  |  260 lines

  1. #ifndef CLASSES_WINDOW_H
  2. #define CLASSES_WINDOW_H
  3. /*
  4. **    $VER: window.h 44.1 (19.10.1999)
  5. **    Includes Release 44.1
  6. **
  7. **    window.class definitions
  8. **
  9. **    (C) Copyright 1987-1999 Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. /****************************************************************************/
  14.  
  15. #ifndef REACTION_REACTION_H
  16. #include <reaction/reaction.h>
  17. #endif
  18.  
  19. /****************************************************************************/
  20.  
  21. /*
  22. ** Attributes specific to window.class
  23. */
  24.  
  25. #define WINDOW_Dummy            (REACTION_Dummy + 0x25000)
  26.  
  27. #define WINDOW_Window        (WINDOW_Dummy + 1)
  28.     /* (struct Window *) Return the pointer to the real      */
  29.     /*                   Intuition window structure.         */
  30.  
  31. #define WINDOW_SigMask       (WINDOW_Dummy + 2)
  32.     /* (ULONG) Return the signal bit that you must wait for  */
  33.     /*         this window to know if the window as received */
  34.     /*         any input.                                    */
  35.     /* Defaults to 0.                                        */
  36.  
  37. #define WINDOW_MenuStrip     (WINDOW_Dummy + 4)
  38.     /* (struct MenuStrip *) A list of Menu structure that will */
  39.     /*                 be used as the menu of this window    */
  40.     /*                 when open.                            */
  41.     /* Defaults to NULL.                                     */
  42.  
  43. #define WINDOW_Layout    (WINDOW_Dummy + 5)
  44. #define WINDOW_ParentLayout       WINDOW_Layout
  45. #define WINDOW_ParentGroup        WINDOW_Layout
  46.     /* (Object *)        Layout group object for the window  */
  47.     /* Defaults to NULL.                                     */
  48.  
  49. #define WINDOW_UserData      (WINDOW_Dummy + 6)
  50.     /* (APTR) A value that will be stored in the Window      */
  51.     /*        Object structure.                              */
  52.     /* Defaults to NULL.                                     */
  53.  
  54. #define WINDOW_SharedPort    (WINDOW_Dummy + 7)
  55.     /* (struct MsgPort *) A port that will be used for this  */
  56.     /*                    window.  The port will not be      */
  57.     /*                    closed at dispose time.            */
  58.     /* Defaults to NULL.                                     */
  59.  
  60. #define WINDOW_Zoom          (WINDOW_Dummy + 8)
  61.     /* When TRUE, it will act as a click on the zoom button. */
  62.  
  63. #define WINDOW_FrontBack     (WINDOW_Dummy + 9)
  64.     /* (UWORD) Only WT_FRONT and WT_BACK can be used here.   */
  65.     /*         This put the window in front or in back of    */
  66.     /*         others windows                                */
  67.  
  68. #define WINDOW_Activate      (WINDOW_Dummy +10)
  69.     /* (BOOL) Activate the window (and its master group) if  */
  70.     /*        set to TRUE and the                            */
  71.     /*        window is open.                                */
  72.  
  73. #define WINDOW_LockWidth     (WINDOW_Dummy +11)
  74.     /* (BOOL) Lock the window from resize in width.          */
  75.     /* Defaults to FALSE.                                    */
  76.  
  77. #define WINDOW_LockHeight    (WINDOW_Dummy +12)
  78.     /* (BOOL) Lock the window from resize in height.         */
  79.     /* Defaults to FALSE.                                    */
  80.  
  81. #define WINDOW_AppPort       (WINDOW_Dummy +13)
  82.     /* (struct MsgPort *) A shared message port for appmessages */
  83.     /*     You must pass this to be able to iconify the window. */
  84.     /* Defaults to NULL.                                     */
  85.  
  86. #define WINDOW_Position         (WINDOW_Dummy +14)
  87.     /* (ULONG) The initial position to open at.                 */
  88.  
  89. #define WINDOW_IDCMPHook     (WINDOW_Dummy +15)
  90.     /* (struct Hook *) Defaults to NULL.                     */
  91.  
  92. #define WINDOW_IDCMPHookBits (WINDOW_Dummy +16)
  93.     /* (ULONG) Defaults to 0L.                               */
  94.  
  95. #define WINDOW_GadgetUserData    (WINDOW_Dummy +17)
  96. #define WINDOW_InterpretUserData    WINDOW_GadgetUserData
  97.     /* (UWORD) How Gadget.UserData is interpreted.           */
  98.     /* Defaults to WGUD_IGNORE */
  99.  
  100. #define WINDOW_MenuUserData    (WINDOW_Dummy +25)
  101.     /* (UWORD) How GTMENUITEM_USERDATA is interpreted.        */
  102.  
  103. #define WGUD_HOOK 0        /* Gadget/MenuItem UserData points to a Hook */
  104. #define WGUD_FUNC 1        /* Points to a function */
  105. #define WGUD_IGNORE 2    /* App private, don't touch it */
  106.  
  107. #define WINDOW_IconTitle     (WINDOW_Dummy +18)
  108.     /* (STRPTR) Title of the iconified window.               */
  109.  
  110. #define WINDOW_AppMsgHook     (WINDOW_Dummy +19)
  111.     /* (struct Hook *) Defaults to NULL.                     */
  112.  
  113. #define WINDOW_Icon             (WINDOW_Dummy +20)
  114.     /* (struct DiskObject *) Custom icon for the window.     */
  115.  
  116. #define WINDOW_AppWindow     (WINDOW_Dummy +21)
  117.     /* (BOOL) Make the window a Workbench AppWindow. */
  118.  
  119. #define WINDOW_GadgetHelp     (WINDOW_Dummy +22)
  120.     /* (BOOL) Set gadget-help on/off. */
  121.  
  122. #define WINDOW_IconifyGadget (WINDOW_Dummy +23)
  123.     /* (BOOL) Add an iconification gadget to window title bar. */
  124.  
  125. #define WINDOW_TextAttr         (WINDOW_Dummy +24)
  126.     /* (struct TextAttr *)Default font for window. If not set, use screen font. */
  127.  
  128. #define WINDOW_BackFillName     (WINDOW_Dummy +26)
  129.     /* (STRPTR) replaces the default backfill pattern with this file,
  130.      * loaded through datatypes.
  131.      */
  132.  
  133. #define WINDOW_RefWindow     (WINDOW_Dummy +41)
  134.     /* (struct Window *) Causes WINDOW_Position to be relative to
  135.      * to this window vs the screen. (V42)
  136.      */
  137.  
  138. #define WINDOW_InputEvent     (WINDOW_Dummy +42)
  139.     /* (struct InputEvent *) returns a pointer to an inputevent
  140.      * which will be current *ONLY* after a WHMI_RAWKEY. (V42)
  141.      */
  142.  
  143. #define WINDOW_HintInfo         (WINDOW_Dummy +43)
  144.     /* (struct HintInfo *) Static Array of help hints. (V43 BETA)
  145.      */
  146.  
  147. #define WINDOW_KillWindow        (WINDOW_Dummy +44)
  148. #define WINDOW_Application        (WINDOW_Dummy +45)
  149.     /* ** PRIVATE TAGS SET/GET BY APPLICATION CLASS! ** (V43 BETA)
  150.      */
  151.  
  152. #define WINDOW_InterpretIDCMPHook    (WINDOW_Dummy +46)
  153.     /* Interpret IDCMPHook results. (V43 BETA)
  154.      */
  155.  
  156. #define WINDOW_Parent            (WINDOW_Dummy +47)
  157.     /* ** PRIVATE TAGS SET/GET BY APPLICATION CLASS! ** (V43 BETA)
  158.      */
  159.  
  160. #define WINDOW_PreRefreshHook    (WINDOW_Dummy +48)
  161.     /* (struct Hook *) window.class calls this hook BEFORE RefreshGList() */
  162.  
  163. #define WINDOW_PostRefreshHook    (WINDOW_Dummy +49)
  164.     /* (struct Hook *) window.class calls this hook AFTER RefreshGList() */
  165.  
  166. #define WINDOW_AppWindowPtr    (WINDOW_Dummy +50)
  167.     /* (struct AppWindow *) GetAttr()'able pointer to AddAppWindow() result.*/
  168.  
  169.  
  170. /*** PRIVATE ***/
  171.  
  172. #define WINDOW_VertProp        (WINDOW_Dummy +27)
  173.     /* (BOOL) Enable vertical border scroller if true. */
  174.  
  175. #define WINDOW_VertObject    (WINDOW_Dummy +28)
  176.     /* (Object *) OM_GET the vertical scroller object pointer. */
  177.  
  178. #define WINDOW_HorizProp    (WINDOW_Dummy +29)
  179.     /* (BOOL) Enable horizontal border scroller if true. */
  180.  
  181. #define WINDOW_HorizObject    (WINDOW_Dummy +30)
  182.     /* (Object *) OM_GET the horizontal scroller object pointer. */
  183.  
  184.  
  185. /****************************************************************************/
  186.  
  187. /* Pre-defined WM_HANDLEINPUT return codes.
  188.  */
  189. #define WMHI_LASTMSG               (0L)    /* No more messages                 */
  190. #define WMHI_IGNORE               (~0L)    /* Ignore                           */
  191. #define WMHI_GADGETMASK           (0xffff) /* Gadget ID mask value             */
  192. #define WMHI_MENUMASK           (0xffff)    /* Menu ID mask value               */
  193. #define WMHI_KEYMASK               (0xff)   /* Key code mask value              */
  194. #define WMHI_CLASSMASK        (0xffff0000)    /* Event class mask value            */
  195. #define WMHI_CLOSEWINDOW        (1<<16) /* The close gadget was clicked     */
  196.                                         /* or a hook function trigged close */
  197. #define WMHI_GADGETUP            (2<<16)    /* A gadget was released            */
  198. #define WMHI_INACTIVE           (3<<16) /* The window was de-activated      */
  199. #define WMHI_ACTIVE             (4<<16) /* The window was activated         */
  200. #define WMHI_NEWSIZE            (5<<16) /* The window was resized           */
  201. #define WMHI_MENUPICK            (6<<16)    /* A menu item was picked            */
  202. #define WMHI_MENUHELP            (7<<16) /* Help was hit in a menu            */
  203. #define WMHI_GADGETHELP            (8<<16)    /* A gadget returns a help code        */
  204. #define WMHI_ICONIFY            (9<<16) /* Window requests to be iconified  */
  205. #define WMHI_UNICONIFY           (10<<16)    /* Window was uniconified           */
  206. #define WMHI_RAWKEY            (11<<16) /* Raw key codes                    */
  207. #define WMHI_VANILLAKEY        (12<<16) /* Vanilla key codes                */
  208. #define WMHI_CHANGEWINDOW       (13<<16) /* Window moved (or depth arranged) */
  209. #define WMHI_INTUITICK         (14<<16) /* IDCMP intuitick (maximum 10 per second) */
  210. #define WMHI_MOUSEMOVE         (15<<16) /* IDCMP mouse move */
  211. #define WMHI_MOUSEBUTTONS      (16<<16) /* IDCMP mouse buttons */
  212. #define WMHI_DISPOSEDWINDOW       (17<<16) /* hook function triggered disposal */
  213.  
  214. /****************************************************************************/
  215.  
  216. #define WMF_ZOOMED               (0x0001) /* Window is in zoomed state        */
  217. #define WMF_ZIPWINDOW           (0x0002) /* This resize toggled zoom state    */
  218.  
  219. /****************************************************************************/
  220.  
  221. /* Possible WINDOW_FrontBack values
  222.  */
  223. #define WT_FRONT   TRUE
  224. #define WT_BACK    FALSE
  225.  
  226. /* Possible WINDOW_Position values
  227.  */
  228. #define WPOS_CENTERSCREEN        (1L)   /* Center on the screen             */
  229. #define WPOS_CENTERMOUSE         (2L)   /* Center under the mouse           */
  230. #define WPOS_TOPLEFT             (3L)   /* Top-left of the screen           */
  231. #define WPOS_CENTERWINDOW        (4L)   /* Center in another window         */
  232. #define WPOS_FULLSCREEN          (5L)   /* Top-left of, and fill the screen */
  233.  
  234. /****************************************************************************/
  235.  
  236. /*
  237.  * Window Methods
  238.  */
  239. #define WM_HANDLEINPUT    (0x570001L)
  240.  
  241. /* The WM_HANDLEINPUT method should be called by for each received
  242.  * IDCMP message.
  243.  * If the message could be linked to a gadget in the window, the WORD
  244.  * pointed to by wmh_Code will be set to the gadget's return code.
  245.  */
  246.  
  247. struct wmHandle
  248. {
  249.     ULONG MethodID;                        /* WM_HANDLEINPUT */
  250.     WORD *wmh_Code;                        /* The code from the gadget */
  251. };
  252.  
  253. #define WM_OPEN            (0x570002L)
  254. #define WM_CLOSE        (0x570003L)
  255. #define WM_NEWPREFS        (0x570004L)
  256. #define WM_ICONIFY        (0x570005L)
  257. #define WM_RETHINK        (0x570006L)
  258.  
  259. #endif /* CLASSES_WINDOW_H */
  260.