Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtwm / ButtonP.h
1 /* $XConsortium: ButtonP.h /main/5 1995/11/01 11:22:47 rswiston $ */
2 #ifdef REV_INFO
3 #ifndef lint
4 static char SCCSID[] = "OSF/Motif: @(#)ButtonP.h        1.14 95/05/01";
5 #endif /* lint */
6 #endif /* REV_INFO */
7 /******************************************************************************
8 *******************************************************************************
9 *
10 *  (c) Copyright 1992 HEWLETT-PACKARD COMPANY
11 *  ALL RIGHTS RESERVED
12 *
13 *******************************************************************************
14 ******************************************************************************/
15 #ifndef _DtButtonP_h
16 #define _DtButtonP_h
17
18 #include <Xm/XmP.h>
19 #include "Button.h"
20 #include <Xm/GadgetP.h>
21 #include <Xm/ManagerP.h>
22
23 #if defined(__cplusplus) || defined(c_plusplus)
24 extern "C" {
25 #endif
26
27 /*  Arrow class structure  */
28
29 typedef struct _DtButtonGadgetClassPart
30 {
31    caddr_t extension;
32 } DtButtonGadgetClassPart;
33
34
35 /*  Full class record declaration for Arrow class  */
36
37 typedef struct _DtButtonGadgetClassRec
38 {
39    RectObjClassPart             rect_class;
40    XmGadgetClassPart            gadget_class;
41    DtButtonGadgetClassPart      button_class;
42 } DtButtonGadgetClassRec;
43
44 externalref DtButtonGadgetClassRec dtButtonGadgetClassRec;
45
46
47 /*  The button instance record  */
48
49 typedef struct _DtButtonGadgetPart
50 {
51    XtCallbackList callback;
52
53    Boolean armed;
54
55    GC      gc_normal;
56    GC      gc_clip;
57    GC      gc_background;
58    GC      gc_armed_bg;
59
60    XtIntervalId     timer;      
61    unsigned char    multiClick;         /* KEEP/DISCARD resource */
62    int              click_count;
63    Time             armTimeStamp;
64    Time             activateTimeStamp;
65
66         Widget          subpanel;
67         XtPointer       push_function;
68         XtPointer       push_argument;
69
70         String          image_name;
71         Pixmap          pixmap;
72         Pixmap          mask;
73         Dimension       pixmap_width;
74         Dimension       pixmap_height;
75
76         int             cursor_font;
77         Pixel           arm_color;
78 } DtButtonGadgetPart;
79
80
81 /*  Full instance record declaration  */
82
83 typedef struct _DtButtonGadgetRec
84 {
85    ObjectPart            object;
86    RectObjPart           rectangle;
87    XmGadgetPart          gadget;
88    DtButtonGadgetPart    button;
89 } DtButtonGadgetRec;
90
91 #define B_Expose(w,e,r) \
92         (w -> core.widget_class->core_class.expose)(w,e,r)
93 #define B_ArmColor(w)           (w -> button.arm_color)
94 #define B_CursorFont(w)         (w -> button.cursor_font)
95 #define B_Armed(w)              (w -> button.armed)
96 #define B_PushFunction(w)       (w -> button.push_function)
97 #define B_PushArgument(w)       (w -> button.push_argument)
98 #define B_Subpanel(w)           (w -> button.subpanel)
99 #define B_Callback(w)           (w -> button.callback)
100 #define B_PixmapWidth(w)        (w -> button.pixmap_width)
101 #define B_PixmapHeight(w)       (w -> button.pixmap_height)
102 #define B_ImageName(w)          (w -> button.image_name)
103 #define B_Mask(w)               (w -> button.mask)
104 #define B_Pixmap(w)             (w -> button.pixmap)
105 #define M_TopShadowColor(w)     (w -> manager.top_shadow_color)
106 #define M_BottomShadowColor(w)  (w -> manager.bottom_shadow_color)
107
108 #if defined(__cplusplus) || defined(c_plusplus)
109 }  /* Close scope of 'extern "C"' declaration which encloses file. */
110 #endif
111
112 #endif /* _DtButtonP_h */
113 /* DON'T ADD ANYTHING AFTER THIS #endif */