1 #ifndef _SUPPORT_MESSAGES_H_
2 #define _SUPPORT_MESSAGES_H_
5 Copyright © 2003, The AROS Development Team. All rights reserved.
9 #include "workbench_intern.h"
11 /*** Macros and definitions *************************************************/
12 #define WBS_SIZE (sizeof(struct WBStartup))
13 #define WBS(msg) ((struct WBStartup *) (msg))
15 /*** Prototypes *************************************************************/
16 struct Message
*__AllocMessage_WB(ULONG size
, struct WorkbenchBase
*WorkbenchBase
);
17 VOID
__FreeMessage_WB(struct Message
*message
, struct WorkbenchBase
*WorkbenchBase
);
19 struct WBStartup
*__CreateWBS_WB(struct WorkbenchBase
*WorkbenchBase
);
20 VOID
__DestroyWBS_WB(struct WBStartup
*startup
, struct WorkbenchBase
*WorkbenchBase
);
21 struct IntWBHandlerMessage
*__CreateIWBHM_WB(enum WBHM_Type type
, struct MsgPort
*replyport
, struct WorkbenchBase
*WorkbenchBase
);
22 VOID
__DestroyIWBHM_WB(struct IntWBHandlerMessage
*message
, struct WorkbenchBase
*WorkbenchBase
);
24 /*** Function macros ********************************************************/
25 #define AllocMessage(size) __AllocMessage_WB((size), LB(WorkbenchBase))
26 #define FreeMessage(msg) __FreeMessage_WB((msg), LB(WorkbenchBase))
28 #define CreateWBS() __CreateWBS_WB(LB(WorkbenchBase))
29 #define DestroyWBS(msg) __DestroyWBS_WB((msg), LB(WorkbenchBase))
30 #define CreateIWBHM(type, rport) __CreateIWBHM_WB((type), (rport), (LB(WorkbenchBase)))
31 #define DestroyIWBHM(msg) __DestroyIWBHM_WB((msg), LB(WorkbenchBase))
32 #define CreateWBHM(type) (&CreateIWBHM((type), NULL)->iwbhm_wbhm)
33 #define DestroyWBHM(msg) DestroyIWBHM((struct IntWBHandlerMessage *)msg)
35 #endif /* _SUPPORT_MESSAGES_H_ */