1 /*
2  *
3 Copyright 1989, 1998  The Open Group
4 
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation.
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
24  *
25  * Author:  Jim Fulton, MIT X Consortium
26  */
27 
28 #ifndef _XawRepeaterP_h
29 #define _XawRepeaterP_h
30 
31 #include <X11/Xaw/CommandP.h>
32 #include <X11/Xaw/Repeater.h>
33 
34 /* new fields in widget class */
35 typedef struct {
36     XtPointer extension;
37 } RepeaterClassPart;
38 
39 /* repeater widget class */
40 typedef struct _RepeaterClassRec {
41     CoreClassPart core_class;
42     SimpleClassPart simple_class;
43     LabelClassPart label_class;
44     CommandClassPart command_class;
45     RepeaterClassPart repeater_class;
46 } RepeaterClassRec;
47 
48 typedef struct {
49     /* resources */
50     int initial_delay;			/* initialDelay/Delay */
51     int repeat_delay;			/* repeatDelay/Delay */
52     int minimum_delay;			/* minimumDelay/MinimumDelay */
53     int decay;				/* decay to minimum delay */
54     Boolean flash;			/* flash/Boolean */
55     XtCallbackList start_callbacks;	/* startCallback/StartCallback */
56     XtCallbackList stop_callbacks;	/* stopCallback/StopCallback */
57 
58     /* private */
59     int next_delay;			/* next amount for timer */
60     XtIntervalId timer;			/* timer that will fire */
61 #ifndef OLDXAW
62     XtPointer pad[4];	/* for future use and keep binary compatability */
63 #endif
64 } RepeaterPart;
65 
66 typedef struct _RepeaterRec {
67     CorePart core;
68     SimplePart simple;
69     LabelPart label;
70     CommandPart command;
71     RepeaterPart repeater;
72 } RepeaterRec;
73 
74 					/* milliseconds */
75 #define REP_DEF_DECAY			5
76 #define REP_DEF_INITIAL_DELAY		200
77 #define REP_DEF_MINIMUM_DELAY		10
78 #define REP_DEF_REPEAT_DELAY		50
79 
80 extern RepeaterClassRec repeaterClassRec;
81 
82 #endif /* _XawRepeaterP_h */
83