Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / DtWidget / ControlP.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 librararies 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: ControlP.h /main/6 1996/03/25 11:17:48 rswiston $ */
24 /**---------------------------------------------------------------------
25 ***     
26 ***     file:           ControlP.h
27 ***
28 ***     project:        MotifPlus Widgets
29 ***
30 ***     description:    Private include file for DtControl class.
31 ***     
32 ***     
33 ***                     (c) Copyright 1992 by Hewlett-Packard Company.
34 ***
35 ***
36 ***-------------------------------------------------------------------*/
37
38
39 #ifndef _DtControlP_h
40 #define _DtControlP_h
41
42 #include <Xm/XmP.h>
43 #include <Dt/IconP.h>
44 #include <Dt/Control.h>
45
46 typedef struct _DtControlCacheObjClassPart
47 {
48     XtPointer dummy;
49 } DtControlCacheObjClassPart;
50
51
52 typedef struct _DtControlCacheObjClassRec     /* label cache class record */
53 {
54     ObjectClassPart                     object_class;
55     XmExtClassPart                      ext_class;
56     DtControlCacheObjClassPart           control_class_cache;
57 } DtControlCacheObjClassRec;
58
59 externalref DtControlCacheObjClassRec dtControlCacheObjClassRec;
60
61
62 /*  The Control Gadget Cache instance record  */
63
64 typedef struct _DtControlCacheObjPart
65 {
66     XtPointer dummy;
67 } DtControlCacheObjPart;
68
69 typedef struct _DtControlCacheObjRec
70 {
71     ObjectPart               object;
72     XmExtPart                ext;
73     DtControlCacheObjPart   control_cache;
74 } DtControlCacheObjRec;
75
76 /*-------------------------------------------------------------
77 **      Class Structure
78 */
79
80 /*      Class Part
81 */
82 typedef struct _DtControlClassPart
83 {
84         XmCacheClassPartPtr     cache_part;
85         caddr_t                 extension;
86 } DtControlClassPart;
87
88 /*      Full Class Record
89 */
90 typedef struct _DtControlClassRec
91 {
92         RectObjClassPart        rect_class;
93         XmGadgetClassPart       gadget_class;
94         DtIconClassPart icon_class;
95         DtControlClassPart      control_class;
96 } DtControlClassRec;
97
98 /*      Actual Class
99 */
100 extern DtControlClassRec dtControlClassRec;
101
102
103 \f
104 /*-------------------------------------------------------------
105 **      Instance Structure
106 */
107
108 /*      Instance Part
109 */
110 typedef struct _DtControlPart
111 {
112         XtPointer       push_function;
113         XtPointer       push_argument;
114
115         String          push_action;
116         int             num_push_images;
117         int             max_push_images;
118         int             push_image_position;
119         int             *push_delays;
120         Pixmap          *push_pixmaps;
121         Pixmap          *push_masks;
122
123         String          drop_action;
124         int             num_drop_images;
125         int             max_drop_images;
126         int             drop_image_position;
127         int             *drop_delays;
128         Pixmap          *drop_pixmaps;
129         Pixmap          *drop_masks;
130
131         Widget          subpanel;
132
133         Pixmap          alt_pix;
134         Pixmap          alt_mask;
135         String          alt_image;
136
137         XmString        alt_string;
138         Dimension       alt_string_width;
139         Dimension       alt_string_height;
140
141         String          format;
142         String          format_jp;
143         String          file_name;
144         long            file_size;
145         XtIntervalId    monitor_timer;
146         int             monitor_time;
147         Boolean         chime;
148         Boolean         file_changed;
149
150         Boolean         _do_update;
151         Boolean         use_embossed_text;
152         Boolean         use_label_adj;
153
154         unsigned char   control_type;
155
156         GC              top_shadow_gc;
157         GC              bottom_shadow_gc;
158
159         XtIntervalId    click_timer;
160         int             click_time;
161
162         short           busy;
163         int             blink_elapsed;
164         int             max_blink_time;
165         int             blink_time;
166         XtIntervalId    blink_timer;
167
168         XtIntervalId    date_timer;
169         XtIntervalId    push_animation_timer;
170         XtIntervalId    drop_animation_timer;
171 } DtControlPart;
172
173 /*      Full Instance Record
174 */
175 typedef struct _DtControlRec
176 {
177         ObjectPart      object;
178         RectObjPart     rectangle;
179         XmGadgetPart    gadget;
180         DtIconPart      icon;
181         DtControlPart   control;
182 } DtControlRec;
183
184
185 /*-------------------------------------------------------------
186 **      Class and Instance Macros
187 */
188
189 /*      DtControl Class Macros
190 */      
191
192 /*      DtControl Instance Macros
193 */
194 #define G_Format(g)             (g -> control.format)
195 #define G_TopShadowGC(g)        (g -> control.top_shadow_gc)
196 #define G_BottomShadowGC(g)     (g -> control.bottom_shadow_gc)
197 #define G_Busy(g)               (g -> control.busy)
198 #define G_PushImagePosition(g)  (g -> control.push_image_position)
199 #define G_NumPushImages(g)      (g -> control.num_push_images)
200 #define G_MaxPushImages(g)      (g -> control.max_push_images)
201 #define G_PushDelays(g)         (g -> control.push_delays)
202 #define G_PushPixmaps(g)        (g -> control.push_pixmaps)
203 #define G_PushMasks(g)          (g -> control.push_masks)
204 #define G_DropImagePosition(g)  (g -> control.drop_image_position)
205 #define G_NumDropImages(g)      (g -> control.num_drop_images)
206 #define G_MaxDropImages(g)      (g -> control.max_drop_images)
207 #define G_DropDelays(g)         (g -> control.drop_delays)
208 #define G_DropPixmaps(g)        (g -> control.drop_pixmaps)
209 #define G_DropMasks(g)          (g -> control.drop_masks)
210 #define G_DropAction(g)         (g -> control.drop_action)
211 #define G_PushAction(g)         (g -> control.push_action)
212 #define G__DoUpdate(g)          (g -> control._do_update)
213 #define G_PushFunction(g)       (g -> control.push_function)
214 #define G_PushArgument(g)       (g -> control.push_argument)
215 #define G_Subpanel(g)           (g -> control.subpanel)
216 #define G_AltMask(g)            (g -> control.alt_mask)
217 #define G_AltPix(g)             (g -> control.alt_pix)
218 #define G_AltString(g)          (g -> control.alt_string)
219 #define G_AltStringWidth(g)     (g -> control.alt_string_width)
220 #define G_AltStringHeight(g)    (g -> control.alt_string_height)
221 #define G_ControlType(g)        (g -> control.control_type)
222 #define G_AltImage(g)           (g -> control.alt_image)
223 #define G_FileChanged(g)        (g -> control.file_changed)
224 #define G_FileName(g)           (g -> control.file_name)
225 #define G_FileSize(g)           (g -> control.file_size)
226 #define G_Chime(g)              (g -> control.chime)
227 #define G_MonitorTimer(g)       (g -> control.monitor_timer)
228 #define G_MonitorTime(g)        (g -> control.monitor_time)
229 #define G_ClickTime(g)          (g -> control.click_time)
230 #define G_ClickTimer(g)         (g -> control.click_timer)
231 #define G_DateTimer(g)          (g -> control.date_timer)
232 #define G_PushAnimationTimer(g) (g -> control.push_animation_timer)
233 #define G_DropAnimationTimer(g) (g -> control.drop_animation_timer)
234 #define G_BlinkCount(g)         (g -> control.blink_count)
235 #define G_BlinkElapsed(g)       (g -> control.blink_elapsed)
236 #define G_MaxBlinkTime(g)       (g -> control.max_blink_time)
237 #define G_BlinkTime(g)          (g -> control.blink_time)
238 #define G_BlinkTimer(g)         (g -> control.blink_timer)
239 #define G_BlinkTime(g)          (g -> control.blink_time)
240 #define G_UseEmbossedText(g)    (g -> control.use_embossed_text)
241 #define G_UseLabelAdjustment(g) (g -> control.use_label_adj)
242
243
244 #endif /* _DtControlP_h */
245 /* DON'T ADD ANYTHING AFTER THIS #endif */