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