Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / Agents / create_macros.hh
1 // $XConsortium: create_macros.hh /main/3 1996/06/11 16:17:20 cde-hal $
2 #ifndef _create_macros_hh
3 #define _create_macros_hh
4
5 #define DECL(TYPE,VAR,PARENT,NAME) TYPE VAR (PARENT, NAME)
6 #define DECLM(TYPE,VAR,PARENT,NAME) TYPE VAR (PARENT, NAME, WAutoManage)
7 #define ASSN(TYPE,VAR,PARENT,NAME) VAR = TYPE (PARENT, NAME)
8 #define ASSNM(TYPE,VAR,PARENT,NAME) VAR = TYPE (PARENT, NAME, WAutoManage)
9
10 #define SET_CALLBACK(WOBJ,CBACK,FUNC) \
11   (WOBJ).CONCAT3(Set,CBACK,Callback) (this, (WWL_FUN) &CLASS::FUNC)
12 #define SET_CALLBACK_D(WOBJ,CBACK,FUNC,DATA) \
13   (WOBJ).CONCAT3(Set,CBACK,Callback) (this, (WWL_FUN) &CLASS::FUNC, \
14                                       (void *) DATA)
15
16 #define ON_ACTIVATE(WOBJ,FUNC) SET_CALLBACK(WOBJ,Activate,FUNC)
17 #define ON_ACTIVATE_D(WOBJ,FUNC,DATA) SET_CALLBACK_D(WOBJ,Activate,FUNC,DATA)
18
19 #define CALL_DATA(TYPE,NAME) \
20   TYPE *NAME = (TYPE *) wcb->CallData()
21
22 #ifndef CLASS
23   #error "CLASS macro must be defined!"
24 #endif
25
26 #endif /* _create_macros_hh */
27 /* DO NOT ADD ANY LINES AFTER THIS #endif */