Fix typo in license headers
[oweals/cde.git] / cde / programs / dtwm / ButtonP.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: ButtonP.h /main/5 1995/11/01 11:22:47 rswiston $ */
24 #ifdef REV_INFO
25 #ifndef lint
26 static char SCCSID[] = "OSF/Motif: @(#)ButtonP.h        1.14 95/05/01";
27 #endif /* lint */
28 #endif /* REV_INFO */
29 /******************************************************************************
30 *******************************************************************************
31 *
32 *  (c) Copyright 1992 HEWLETT-PACKARD COMPANY
33 *  ALL RIGHTS RESERVED
34 *
35 *******************************************************************************
36 ******************************************************************************/
37 #ifndef _DtButtonP_h
38 #define _DtButtonP_h
39
40 #include <Xm/XmP.h>
41 #include "Button.h"
42 #include <Xm/GadgetP.h>
43 #include <Xm/ManagerP.h>
44
45 #if defined(__cplusplus) || defined(c_plusplus)
46 extern "C" {
47 #endif
48
49 /*  Arrow class structure  */
50
51 typedef struct _DtButtonGadgetClassPart
52 {
53    caddr_t extension;
54 } DtButtonGadgetClassPart;
55
56
57 /*  Full class record declaration for Arrow class  */
58
59 typedef struct _DtButtonGadgetClassRec
60 {
61    RectObjClassPart             rect_class;
62    XmGadgetClassPart            gadget_class;
63    DtButtonGadgetClassPart      button_class;
64 } DtButtonGadgetClassRec;
65
66 externalref DtButtonGadgetClassRec dtButtonGadgetClassRec;
67
68
69 /*  The button instance record  */
70
71 typedef struct _DtButtonGadgetPart
72 {
73    XtCallbackList callback;
74
75    Boolean armed;
76
77    GC      gc_normal;
78    GC      gc_clip;
79    GC      gc_background;
80    GC      gc_armed_bg;
81
82    XtIntervalId     timer;      
83    unsigned char    multiClick;         /* KEEP/DISCARD resource */
84    int              click_count;
85    Time             armTimeStamp;
86    Time             activateTimeStamp;
87
88         Widget          subpanel;
89         XtPointer       push_function;
90         XtPointer       push_argument;
91
92         String          image_name;
93         Pixmap          pixmap;
94         Pixmap          mask;
95         Dimension       pixmap_width;
96         Dimension       pixmap_height;
97
98         int             cursor_font;
99         Pixel           arm_color;
100 } DtButtonGadgetPart;
101
102
103 /*  Full instance record declaration  */
104
105 typedef struct _DtButtonGadgetRec
106 {
107    ObjectPart            object;
108    RectObjPart           rectangle;
109    XmGadgetPart          gadget;
110    DtButtonGadgetPart    button;
111 } DtButtonGadgetRec;
112
113 #define B_Expose(w,e,r) \
114         (w -> core.widget_class->core_class.expose)(w,e,r)
115 #define B_ArmColor(w)           (w -> button.arm_color)
116 #define B_CursorFont(w)         (w -> button.cursor_font)
117 #define B_Armed(w)              (w -> button.armed)
118 #define B_PushFunction(w)       (w -> button.push_function)
119 #define B_PushArgument(w)       (w -> button.push_argument)
120 #define B_Subpanel(w)           (w -> button.subpanel)
121 #define B_Callback(w)           (w -> button.callback)
122 #define B_PixmapWidth(w)        (w -> button.pixmap_width)
123 #define B_PixmapHeight(w)       (w -> button.pixmap_height)
124 #define B_ImageName(w)          (w -> button.image_name)
125 #define B_Mask(w)               (w -> button.mask)
126 #define B_Pixmap(w)             (w -> button.pixmap)
127 #define M_TopShadowColor(w)     (w -> manager.top_shadow_color)
128 #define M_BottomShadowColor(w)  (w -> manager.bottom_shadow_color)
129
130 #if defined(__cplusplus) || defined(c_plusplus)
131 }  /* Close scope of 'extern "C"' declaration which encloses file. */
132 #endif
133
134 #endif /* _DtButtonP_h */
135 /* DON'T ADD ANYTHING AFTER THIS #endif */