1 /*
2  * $Id: TraversalP.h,v 1.2 2000/10/12 14:55:20 ulric Exp $
3  */
4 
5 /*
6 
7 Copyright (c) 1999  X Consortium
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
22 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 
26 Except as contained in this notice, the name of the X Consortium shall not be
27 used in advertising or otherwise to promote the sale, use or other dealings
28 in this Software without prior written authorization from the X Consortium.
29 
30 */
31 
32 #ifndef	XawTraversalP_h
33 #define	XawTraversalP_h
34 
35 #include "Traversal.h"
36 
37 
38 
39 	/* Class method which may be added to any widget class that
40 	 * will accept focus.  Accepts focus any time the widget
41 	 * is sensitive and otherwise eligible.
42 	 */
43 
44 extern	Boolean	XawAcceptFocus(
45 #if NeedFunctionPrototypes
46     Widget, Time *
47 #endif
48 );
49 
50 
51 
52 	/* Action procedures which should be called by any class which
53 	 * wishes to participate in the keyboard traversal protocol.
54 	 *
55 	 * Procedures are:
56 	 *
57 	 *	Next		transfer focus to next eligible widget
58 	 *	Previous	transfer focus to previous eligible widget
59 	 *	Home		transfer focus to first eligible widget
60 	 *	End		transfer focus to last eligible widget
61 	 *	Take		transfer focus to this widget.
62 	 *	NextGroup	transfer focus to next in this local group
63 	 *	PreviousGroup	transfer focus to previous in this local group
64 	 *	HomeGroup	transfer focus to first in this local group
65 	 *	EndGroup	transfer focus to last in this local group
66 	 *	EnterWindow	react to enter-window
67 	 *	LeaveWindow	react to leave-window
68 	 *
69 	 * A "local group" is similar to the Motif "tab group".  Local
70 	 * groups are all widgets under a single manager widget.  Typically,
71 	 * arrow keys would navigate within a local group, whereas tab keys
72 	 * would navigate globally.
73 	 *
74 	 * If XawFocusPolicy is XawFocusPointer, this action proc ignores
75 	 * all keyboard traversal operations; thus creating the old
76 	 * behavior.
77 	 *
78 	 * Actions taken by EnterWindow and LeaveWindow depend on the
79 	 * XawFocusPolicy resource:
80 	 *	XawFocusPointer:	Sets focus window to PointerRoot
81 	 *	XawFocusKey:		Sets focus window to PointerRoot
82 	 *	XawFocusSet:		leaves focus unchanged.
83 	 */
84 
85 extern	void	XawFocusNextAction(
86 #if NeedFunctionPrototypes
87     Widget w,
88     XEvent *event,
89     String *params,
90     Cardinal *num_params
91 #endif
92 );
93 
94 extern	void	XawFocusPreviousAction(
95 #if NeedFunctionPrototypes
96     Widget w,
97     XEvent *event,
98     String *params,
99     Cardinal *num_params
100 #endif
101 );
102 
103 extern	void	XawFocusHomeAction(
104 #if NeedFunctionPrototypes
105     Widget w,
106     XEvent *event,
107     String *params,
108     Cardinal *num_params
109 #endif
110 );
111 
112 extern	void	XawFocusEndAction(
113 #if NeedFunctionPrototypes
114     Widget w,
115     XEvent *event,
116     String *params,
117     Cardinal *num_params
118 #endif
119 );
120 
121 extern	void	XawFocusTakeAction(
122 #if NeedFunctionPrototypes
123     Widget w,
124     XEvent *event,
125     String *params,
126     Cardinal *num_params
127 #endif
128 );
129 
130 extern	void	XawFocusNextGroupAction(
131 #if NeedFunctionPrototypes
132     Widget w,
133     XEvent *event,
134     String *params,
135     Cardinal *num_params
136 #endif
137 );
138 
139 extern	void	XawFocusPreviousGroupAction(
140 #if NeedFunctionPrototypes
141     Widget w,
142     XEvent *event,
143     String *params,
144     Cardinal *num_params
145 #endif
146 );
147 
148 extern	void	XawFocusHomeGroupAction(
149 #if NeedFunctionPrototypes
150     Widget w,
151     XEvent *event,
152     String *params,
153     Cardinal *num_params
154 #endif
155 );
156 
157 extern	void	XawFocusEndGroupAction(
158 #if NeedFunctionPrototypes
159     Widget w,
160     XEvent *event,
161     String *params,
162     Cardinal *num_params
163 #endif
164 );
165 
166 extern	void	XawFocusEnterWindowAction(
167 #if NeedFunctionPrototypes
168     Widget w,
169     XEvent *event,
170     String *params,
171     Cardinal *num_params
172 #endif
173 );
174 
175 extern	void	XawFocusLeaveWindowAction(
176 #if NeedFunctionPrototypes
177     Widget w,
178     XEvent *event,
179     String *params,
180     Cardinal *num_params
181 #endif
182 );
183 
184 
185 	/* internal only; called by XawInitializeWidgetSet: */
186 
187 extern	void	XawRegisterFocusConverter() ;
188 
189 #endif	/* XawTraversalP_h */
190