xref: /386bsd/usr/X386/include/X11/Xaw/RepeaterP.h (revision a2142627)
1 /*
2  * $XConsortium: RepeaterP.h,v 1.3 90/03/02 15:47:00 jim Exp $
3  *
4  * Copyright 1989 Massachusetts Institute of Technology
5  *
6  * Permission to use, copy, modify, distribute, and sell this software and its
7  * documentation for any purpose is hereby granted without fee, provided that
8  * the above copyright notice appear in all copies and that both that
9  * copyright notice and this permission notice appear in supporting
10  * documentation, and that the name of M.I.T. not be used in advertising or
11  * publicity pertaining to distribution of the software without specific,
12  * written prior permission.  M.I.T. makes no representations about the
13  * suitability of this software for any purpose.  It is provided "as is"
14  * without express or implied warranty.
15  *
16  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
18  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22  *
23  * Author:  Jim Fulton, MIT X Consortium
24  */
25 
26 #ifndef _XawRepeaterP_h
27 #define _XawRepeaterP_h
28 
29 #include <X11/Xaw/CommandP.h>
30 #include <X11/Xaw/Repeater.h>
31 
32 typedef struct {			/* new fields in widget class */
33     int dummy;
34 } RepeaterClassPart;
35 
36 typedef struct _RepeaterClassRec {	/* Repeater widget class */
37     CoreClassPart core_class;
38     SimpleClassPart simple_class;
39     LabelClassPart label_class;
40     CommandClassPart command_class;
41     RepeaterClassPart repeater_class;
42 } RepeaterClassRec;
43 
44 typedef struct {			/* new fields in widget */
45     /* resources... */
46     int initial_delay;			/* initialDelay/Delay */
47     int repeat_delay;			/* repeatDelay/Delay */
48     int minimum_delay;			/* minimumDelay/MinimumDelay */
49     int decay;				/* decay to minimum delay */
50     Boolean flash;			/* flash/Boolean */
51     XtCallbackList start_callbacks;	/* startCallback/StartCallback */
52     XtCallbackList stop_callbacks;	/* stopCallback/StopCallback */
53     /* private data... */
54     int next_delay;			/* next amount for timer */
55     XtIntervalId timer;			/* timer that will fire */
56 } RepeaterPart;
57 
58 typedef struct _RepeaterRec {
59     CorePart core;
60     SimplePart simple;
61     LabelPart label;
62     CommandPart command;
63     RepeaterPart repeater;
64 } RepeaterRec;
65 
66 #define REP_DEF_DECAY 5			/* milliseconds */
67 #define REP_DEF_INITIAL_DELAY 200	/* milliseconds */
68 #define REP_DEF_MINIMUM_DELAY 10	/* milliseconds */
69 #define REP_DEF_REPEAT_DELAY 50		/* milliseconds */
70 
71 /*
72  * external declarations
73  */
74 extern RepeaterClassRec repeaterClassRec;
75 
76 #endif /* _XawRepeaterP_h */
77