TranslateI.h revision 2265a131
1444c061aSmrg/* $Xorg: TranslateI.h,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */
2444c061aSmrg
3444c061aSmrg/***********************************************************
4444c061aSmrg
5444c061aSmrgCopyright 1987, 1988, 1998  The Open Group
6444c061aSmrg
7444c061aSmrgPermission to use, copy, modify, distribute, and sell this software and its
8444c061aSmrgdocumentation for any purpose is hereby granted without fee, provided that
9444c061aSmrgthe above copyright notice appear in all copies and that both that
10444c061aSmrgcopyright notice and this permission notice appear in supporting
11444c061aSmrgdocumentation.
12444c061aSmrg
13444c061aSmrgThe above copyright notice and this permission notice shall be included in
14444c061aSmrgall copies or substantial portions of the Software.
15444c061aSmrg
16444c061aSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17444c061aSmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18444c061aSmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
19444c061aSmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20444c061aSmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21444c061aSmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22444c061aSmrg
23444c061aSmrgExcept as contained in this notice, the name of The Open Group shall not be
24444c061aSmrgused in advertising or otherwise to promote the sale, use or other dealings
25444c061aSmrgin this Software without prior written authorization from The Open Group.
26444c061aSmrg
27444c061aSmrg
28444c061aSmrgCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
29444c061aSmrg
30444c061aSmrg                        All Rights Reserved
31444c061aSmrg
32444c061aSmrgPermission to use, copy, modify, and distribute this software and its
33444c061aSmrgdocumentation for any purpose and without fee is hereby granted,
34444c061aSmrgprovided that the above copyright notice appear in all copies and that
35444c061aSmrgboth that copyright notice and this permission notice appear in
36444c061aSmrgsupporting documentation, and that the name of Digital not be
37444c061aSmrgused in advertising or publicity pertaining to distribution of the
38444c061aSmrgsoftware without specific, written prior permission.
39444c061aSmrg
40444c061aSmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
41444c061aSmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
42444c061aSmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
43444c061aSmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
44444c061aSmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45444c061aSmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
46444c061aSmrgSOFTWARE.
47444c061aSmrg
48444c061aSmrg******************************************************************/
49444c061aSmrg/* $XFree86: xc/lib/Xt/TranslateI.h,v 1.3 2001/12/14 19:56:32 dawes Exp $ */
50444c061aSmrg
51444c061aSmrg/*
52444c061aSmrg * TranslateI.h - Header file private to translation management
53444c061aSmrg *
54444c061aSmrg * Author:	Gabe Beged-Dov, HP
55444c061aSmrg *
56444c061aSmrg * Former Author:	Charles Haynes
57444c061aSmrg * 		Digital Equipment Corporation
58444c061aSmrg * 		Western Research Laboratory
59444c061aSmrg * Date:	Sat Aug 29 1987
60444c061aSmrg */
61444c061aSmrg
62444c061aSmrg/*#define REFCNT_TRANSLATIONS*/
63444c061aSmrg#define CACHE_TRANSLATIONS
64444c061aSmrg
65444c061aSmrg#define TM_NO_MATCH (-2)
66444c061aSmrg
67444c061aSmrg#define _XtRStateTablePair "_XtStateTablePair"
68444c061aSmrg
69444c061aSmrgtypedef unsigned char TMByteCard;
70444c061aSmrgtypedef unsigned short TMShortCard;
71444c061aSmrgtypedef unsigned long TMLongCard;
72444c061aSmrgtypedef short TMShortInt;
73444c061aSmrg
74444c061aSmrgtypedef struct _TMTypeMatchRec *TMTypeMatch;
75444c061aSmrgtypedef struct _TMModifierMatchRec *TMModifierMatch;
76444c061aSmrgtypedef struct _TMEventRec *TMEventPtr;
77444c061aSmrg
78444c061aSmrgtypedef Boolean (*MatchProc)(TMTypeMatch typeMatch,
79444c061aSmrg			     TMModifierMatch modMatch,
80444c061aSmrg			     TMEventPtr eventSeq);
81444c061aSmrg
82444c061aSmrgtypedef struct _ModToKeysymTable {
83444c061aSmrg    Modifiers mask;
84444c061aSmrg    int count;
85444c061aSmrg    int idx;
86444c061aSmrg} ModToKeysymTable;
87444c061aSmrg
88444c061aSmrgtypedef struct _LateBindings {
89444c061aSmrg    unsigned int knot:1;
90444c061aSmrg    unsigned int pair:1;
91444c061aSmrg    unsigned short ref_count;	/* garbage collection */
92444c061aSmrg    KeySym keysym;
93444c061aSmrg} LateBindings, *LateBindingsPtr;
94444c061aSmrg
95444c061aSmrgtypedef short ModifierMask;
96444c061aSmrg
97444c061aSmrgtypedef struct _ActionsRec *ActionPtr;
98444c061aSmrgtypedef struct _ActionsRec {
99444c061aSmrg    int idx;			/* index into quarkTable to find proc */
100444c061aSmrg    String *params;		/* pointer to array of params */
101444c061aSmrg    Cardinal num_params;	/* number of params */
102444c061aSmrg    ActionPtr next;		/* next action to perform */
103444c061aSmrg} ActionRec;
104444c061aSmrg
105444c061aSmrgtypedef struct _XtStateRec *StatePtr;
106444c061aSmrgtypedef struct _XtStateRec {
107444c061aSmrg    unsigned int	isCycleStart:1;
108444c061aSmrg    unsigned int	isCycleEnd:1;
109444c061aSmrg    TMShortCard		typeIndex;
110444c061aSmrg    TMShortCard		modIndex;
111444c061aSmrg    ActionPtr		actions;	/* rhs list of actions to perform */
112444c061aSmrg    StatePtr 		nextLevel;
113444c061aSmrg}StateRec;
114444c061aSmrg
115444c061aSmrg
116444c061aSmrg#define XtTableReplace	0
117444c061aSmrg#define XtTableAugment	1
118444c061aSmrg#define XtTableOverride	2
119444c061aSmrg#define XtTableUnmerge  3
120444c061aSmrg
121444c061aSmrgtypedef unsigned int _XtTranslateOp;
122444c061aSmrg
123444c061aSmrg/*
124444c061aSmrg * New Definitions
125444c061aSmrg */
126444c061aSmrgtypedef struct _TMModifierMatchRec{
127444c061aSmrg    TMLongCard	 modifiers;
128444c061aSmrg    TMLongCard	 modifierMask;
129444c061aSmrg    LateBindingsPtr lateModifiers;
130444c061aSmrg    Boolean	 standard;
131444c061aSmrg}TMModifierMatchRec;
132444c061aSmrg
133444c061aSmrgtypedef struct _TMTypeMatchRec{
134444c061aSmrg    TMLongCard	 eventType;
135444c061aSmrg    TMLongCard	 eventCode;
136444c061aSmrg    TMLongCard	 eventCodeMask;
137444c061aSmrg    MatchProc	 matchEvent;
138444c061aSmrg}TMTypeMatchRec;
139444c061aSmrg
140444c061aSmrgtypedef struct _TMBranchHeadRec {
141444c061aSmrg    unsigned int	isSimple:1;
142444c061aSmrg    unsigned int	hasActions:1;
143444c061aSmrg    unsigned int	hasCycles:1;
144444c061aSmrg    unsigned int	more:13;
145444c061aSmrg    TMShortCard		typeIndex;
146444c061aSmrg    TMShortCard		modIndex;
147444c061aSmrg}TMBranchHeadRec, *TMBranchHead;
148444c061aSmrg
149444c061aSmrg/* NOTE: elements of this structure must match those of
150444c061aSmrg * TMComplexStateTreeRec and TMParseStateTreeRec.
151444c061aSmrg */
152444c061aSmrgtypedef struct _TMSimpleStateTreeRec{
153444c061aSmrg    unsigned int	isSimple:1;
154444c061aSmrg    unsigned int	isAccelerator:1;
155444c061aSmrg    unsigned int	mappingNotifyInterest:1;
156444c061aSmrg    unsigned int	refCount:13;
157444c061aSmrg    TMShortCard		numBranchHeads;
158444c061aSmrg    TMShortCard		numQuarks;   /* # of entries in quarkTbl */
159444c061aSmrg    TMShortCard		unused;	     /* to ensure same alignment */
160444c061aSmrg    TMBranchHeadRec	*branchHeadTbl;
161444c061aSmrg    XrmQuark		*quarkTbl;  /* table of quarkified rhs*/
162444c061aSmrg}TMSimpleStateTreeRec, *TMSimpleStateTree;
163444c061aSmrg
164444c061aSmrg/* NOTE: elements of this structure must match those of
165444c061aSmrg * TMSimpleStateTreeRec and TMParseStateTreeRec.
166444c061aSmrg */
167444c061aSmrgtypedef struct _TMComplexStateTreeRec{
168444c061aSmrg    unsigned int	isSimple:1;
169444c061aSmrg    unsigned int	isAccelerator:1;
170444c061aSmrg    unsigned int	mappingNotifyInterest:1;
171444c061aSmrg    unsigned int	refCount:13;
172444c061aSmrg    TMShortCard		numBranchHeads;
173444c061aSmrg    TMShortCard		numQuarks;   /* # of entries in quarkTbl */
174444c061aSmrg    TMShortCard		numComplexBranchHeads;
175444c061aSmrg    TMBranchHeadRec	*branchHeadTbl;
176444c061aSmrg    XrmQuark		*quarkTbl;  /* table of quarkified rhs*/
177444c061aSmrg    StatePtr		*complexBranchHeadTbl;
178444c061aSmrg}TMComplexStateTreeRec, *TMComplexStateTree;
179444c061aSmrg
180444c061aSmrg/* NOTE: elements of this structure must match those of
181444c061aSmrg * TMSimpleStateTreeRec and TMComplexStateTreeRec.
182444c061aSmrg */
183444c061aSmrgtypedef struct _TMParseStateTreeRec{
184444c061aSmrg    unsigned int	isSimple:1;
185444c061aSmrg    unsigned int	isAccelerator:1;
186444c061aSmrg    unsigned int	mappingNotifyInterest:1;
187444c061aSmrg    unsigned int	isStackQuarks:1;
188444c061aSmrg    unsigned int	isStackBranchHeads:1;
189444c061aSmrg    unsigned int	isStackComplexBranchHeads:1;
190444c061aSmrg    unsigned int	unused:10; /* to ensure correct alignment */
191444c061aSmrg    TMShortCard		numBranchHeads;
192444c061aSmrg    TMShortCard		numQuarks;   /* # of entries in quarkTbl */
193444c061aSmrg    TMShortCard		numComplexBranchHeads;
194444c061aSmrg    TMBranchHeadRec	*branchHeadTbl;
195444c061aSmrg    XrmQuark		*quarkTbl;  /* table of quarkified rhs*/
196444c061aSmrg    StatePtr		*complexBranchHeadTbl;
197444c061aSmrg    TMShortCard		branchHeadTblSize;
198444c061aSmrg    TMShortCard		quarkTblSize; /*total size of quarkTbl */
199444c061aSmrg    TMShortCard		complexBranchHeadTblSize;
200444c061aSmrg    StatePtr		head;
201444c061aSmrg}TMParseStateTreeRec, *TMParseStateTree;
202444c061aSmrg
203444c061aSmrgtypedef union _TMStateTreeRec{
204444c061aSmrg    TMSimpleStateTreeRec	simple;
205444c061aSmrg    TMParseStateTreeRec		parse;
206444c061aSmrg    TMComplexStateTreeRec	complex;
207444c061aSmrg}*TMStateTree, **TMStateTreePtr, **TMStateTreeList;
208444c061aSmrg
209444c061aSmrgtypedef struct _TMSimpleBindProcsRec {
210444c061aSmrg    XtActionProc	*procs;
211444c061aSmrg}TMSimpleBindProcsRec, *TMSimpleBindProcs;
212444c061aSmrg
213444c061aSmrgtypedef struct _TMComplexBindProcsRec {
214444c061aSmrg    Widget	 	widget;		/*widgetID to pass to action Proc*/
215444c061aSmrg    XtTranslations	aXlations;
216444c061aSmrg    XtActionProc	*procs;
217444c061aSmrg}TMComplexBindProcsRec, *TMComplexBindProcs;
218444c061aSmrg
219444c061aSmrgtypedef struct _TMSimpleBindDataRec {
220444c061aSmrg    unsigned int		isComplex:1;	/* must be first */
221444c061aSmrg    TMSimpleBindProcsRec	bindTbl[1];	/* variable length */
222444c061aSmrg}TMSimpleBindDataRec, *TMSimpleBindData;
223444c061aSmrg
224444c061aSmrgtypedef struct _TMComplexBindDataRec {
225444c061aSmrg    unsigned int		isComplex:1;	/* must be first */
226444c061aSmrg    struct _ATranslationData	*accel_context;	/* for GetValues */
227444c061aSmrg    TMComplexBindProcsRec	bindTbl[1]; 	/* variable length */
228444c061aSmrg}TMComplexBindDataRec, *TMComplexBindData;
229444c061aSmrg
230444c061aSmrgtypedef union _TMBindDataRec{
231444c061aSmrg    TMSimpleBindDataRec		simple;
232444c061aSmrg    TMComplexBindDataRec	complex;
233444c061aSmrg}*TMBindData;
234444c061aSmrg
235444c061aSmrgtypedef struct _TranslationData{
236444c061aSmrg    unsigned char		hasBindings;	/* must be first */
237444c061aSmrg    unsigned char		operation; /*replace,augment,override*/
238444c061aSmrg    TMShortCard			numStateTrees;
239444c061aSmrg    struct _TranslationData    	*composers[2];
240444c061aSmrg    EventMask			eventMask;
241444c061aSmrg    TMStateTree			stateTreeTbl[1]; /* variable length */
242444c061aSmrg}TranslationData;
243444c061aSmrg
244444c061aSmrg/*
245444c061aSmrg * ATranslations is returned by GetValues for translations that contain
246444c061aSmrg * accelerators.  The TM can differentiate between this and TranslationData
247444c061aSmrg * (that don't have a bindTbl) by looking at the first field (hasBindings)
248444c061aSmrg * of either structure.  All ATranslationData structures associated with a
249444c061aSmrg * widget are chained off the BindData record of the widget.
250444c061aSmrg */
251444c061aSmrgtypedef struct _ATranslationData{
252444c061aSmrg    unsigned char		hasBindings;	/* must be first */
253444c061aSmrg    unsigned char		operation;
254444c061aSmrg    struct _TranslationData	*xlations;  /* actual translations */
255444c061aSmrg    struct _ATranslationData	*next;      /* chain the contexts together */
256444c061aSmrg    TMComplexBindProcsRec	bindTbl[1]; /* accelerator bindings */
257444c061aSmrg}ATranslationData, *ATranslations;
258444c061aSmrg
259444c061aSmrgtypedef struct _TMConvertRec {
260444c061aSmrg    XtTranslations	old; /* table to merge into */
261444c061aSmrg    XtTranslations	new; /* table to merge from */
262444c061aSmrg} TMConvertRec;
263444c061aSmrg
264444c061aSmrg#define _XtEventTimerEventType ((TMLongCard)~0L)
265444c061aSmrg#define KeysymModMask		(1L<<27) /* private to TM */
266444c061aSmrg#define AnyButtonMask		(1L<<28) /* private to TM */
267444c061aSmrg
268444c061aSmrgtypedef struct _EventRec {
269444c061aSmrg    TMLongCard modifiers;
270444c061aSmrg    TMLongCard modifierMask;
271444c061aSmrg    LateBindingsPtr lateModifiers;
272444c061aSmrg    TMLongCard eventType;
273444c061aSmrg    TMLongCard eventCode;
274444c061aSmrg    TMLongCard eventCodeMask;
275444c061aSmrg    MatchProc matchEvent;
276444c061aSmrg    Boolean standard;
277444c061aSmrg} Event;
278444c061aSmrg
279444c061aSmrgtypedef struct _EventSeqRec *EventSeqPtr;
280444c061aSmrgtypedef struct _EventSeqRec {
281444c061aSmrg    Event event;	/* X event description */
282444c061aSmrg    StatePtr state;	/* private to state table builder */
283444c061aSmrg    EventSeqPtr next;	/* next event on line */
284444c061aSmrg    ActionPtr actions;	/* r.h.s.   list of actions to perform */
285444c061aSmrg} EventSeqRec;
286444c061aSmrg
287444c061aSmrgtypedef EventSeqRec EventRec;
288444c061aSmrgtypedef EventSeqPtr EventPtr;
289444c061aSmrg
290444c061aSmrgtypedef struct _TMEventRec {
291444c061aSmrg    XEvent *xev;
292444c061aSmrg    Event event;
293444c061aSmrg}TMEventRec;
294444c061aSmrg
295444c061aSmrgtypedef struct _ActionHookRec {
296444c061aSmrg    struct _ActionHookRec* next; /* must remain first */
297444c061aSmrg    XtAppContext app;
298444c061aSmrg    XtActionHookProc proc;
299444c061aSmrg    XtPointer closure;
300444c061aSmrg} ActionHookRec, *ActionHook;
301444c061aSmrg
302444c061aSmrg/* choose a number between 2 and 8 */
303444c061aSmrg#define TMKEYCACHELOG2 6
304444c061aSmrg#define TMKEYCACHESIZE (1<<TMKEYCACHELOG2)
305444c061aSmrg
306444c061aSmrgtypedef struct _KeyCacheRec {
307444c061aSmrg    unsigned char modifiers_return[256]; /* constant per KeyCode, key proc */
308444c061aSmrg    KeyCode keycode[TMKEYCACHESIZE];
309444c061aSmrg    unsigned char modifiers[TMKEYCACHESIZE];
310444c061aSmrg    KeySym keysym[TMKEYCACHESIZE];
311444c061aSmrg} TMKeyCache;
312444c061aSmrg
313444c061aSmrgtypedef struct _TMKeyContextRec {
314444c061aSmrg    XEvent *event;
315444c061aSmrg    unsigned long serial;
316444c061aSmrg    KeySym keysym;
317444c061aSmrg    Modifiers modifiers;
318444c061aSmrg    TMKeyCache keycache;  /* keep this last, to keep offsets to others small */
319444c061aSmrg} TMKeyContextRec, *TMKeyContext;
320444c061aSmrg
321444c061aSmrgtypedef struct _TMGlobalRec{
322444c061aSmrg    TMTypeMatchRec 		**typeMatchSegmentTbl;
323444c061aSmrg    TMShortCard			numTypeMatches;
324444c061aSmrg    TMShortCard			numTypeMatchSegments;
325444c061aSmrg    TMShortCard			typeMatchSegmentTblSize;
326444c061aSmrg    TMModifierMatchRec 		**modMatchSegmentTbl;
327444c061aSmrg    TMShortCard			numModMatches;
328444c061aSmrg    TMShortCard			numModMatchSegments;
329444c061aSmrg    TMShortCard			modMatchSegmentTblSize;
330444c061aSmrg    Boolean			newMatchSemantics;
331444c061aSmrg#ifdef TRACE_TM
332444c061aSmrg    XtTranslations		*tmTbl;
333444c061aSmrg    TMShortCard			numTms;
334444c061aSmrg    TMShortCard			tmTblSize;
335444c061aSmrg    struct _TMBindCacheRec	**bindCacheTbl;
336444c061aSmrg    TMShortCard			numBindCache;
337444c061aSmrg    TMShortCard			bindCacheTblSize;
338444c061aSmrg    TMShortCard			numLateBindings;
339444c061aSmrg    TMShortCard			numBranchHeads;
340444c061aSmrg    TMShortCard			numComplexStates;
341444c061aSmrg    TMShortCard			numComplexActions;
342444c061aSmrg#endif /* TRACE_TM */
343444c061aSmrg}TMGlobalRec;
344444c061aSmrg
3452265a131Smrg_XFUNCPROTOBEGIN
3462265a131Smrg
347444c061aSmrgextern TMGlobalRec _XtGlobalTM;
348444c061aSmrg
349444c061aSmrg#define TM_MOD_SEGMENT_SIZE 	16
350444c061aSmrg#define TM_TYPE_SEGMENT_SIZE 	16
351444c061aSmrg
352444c061aSmrg#define TMGetTypeMatch(idx) \
353444c061aSmrg  ((TMTypeMatch) \
354444c061aSmrg   &((_XtGlobalTM.typeMatchSegmentTbl[((idx) >> 4)])[(idx) & 15]))
355444c061aSmrg#define TMGetModifierMatch(idx) \
356444c061aSmrg  ((TMModifierMatch) \
357444c061aSmrg   &((_XtGlobalTM.modMatchSegmentTbl[(idx) >> 4])[(idx) & 15]))
358444c061aSmrg
359444c061aSmrg/* Useful Access Macros */
360444c061aSmrg#define TMNewMatchSemantics() (_XtGlobalTM.newMatchSemantics)
361444c061aSmrg#define TMBranchMore(branch) (branch->more)
362444c061aSmrg#define TMComplexBranchHead(tree, br) \
363444c061aSmrg  (((TMComplexStateTree)tree)->complexBranchHeadTbl[TMBranchMore(br)])
364444c061aSmrg
365444c061aSmrg#define TMGetComplexBindEntry(bindData, idx) \
366444c061aSmrg  ((TMComplexBindProcs)&(((TMComplexBindData)bindData)->bindTbl[idx]))
367444c061aSmrg
368444c061aSmrg#define TMGetSimpleBindEntry(bindData, idx) \
369444c061aSmrg  ((TMSimpleBindProcs)&(((TMSimpleBindData)bindData)->bindTbl[idx]))
370444c061aSmrg
371444c061aSmrg
372444c061aSmrg#define _InitializeKeysymTables(dpy, pd) \
373444c061aSmrg    if (pd->keysyms == NULL) \
374444c061aSmrg        _XtBuildKeysymTables(dpy, pd)
375444c061aSmrg
376444c061aSmrg/*
377444c061aSmrg * Internal Functions
378444c061aSmrg */
379444c061aSmrg
380444c061aSmrgextern void _XtPopup(
381444c061aSmrg    Widget      /* widget */,
382444c061aSmrg    XtGrabKind  /* grab_kind */,
383444c061aSmrg    _XtBoolean	/* spring_loaded */
384444c061aSmrg);
385444c061aSmrg
386444c061aSmrgextern String _XtPrintXlations(
387444c061aSmrg    Widget		/* w */,
388444c061aSmrg    XtTranslations 	/* xlations */,
389444c061aSmrg    Widget		/* accelWidget */,
390444c061aSmrg    _XtBoolean		/* includeRHS */
391444c061aSmrg);
392444c061aSmrg
393444c061aSmrgextern void _XtRegisterGrabs(
394444c061aSmrg    Widget	/* widget */
395444c061aSmrg);
396444c061aSmrg
397444c061aSmrgextern XtPointer _XtInitializeActionData(
398444c061aSmrg    struct _XtActionsRec *	/* actions */,
399444c061aSmrg    Cardinal 			/* count */,
400444c061aSmrg    _XtBoolean			/* inPlace */
401444c061aSmrg);
402444c061aSmrg
403444c061aSmrgextern void _XtAddEventSeqToStateTree(
404444c061aSmrg    EventSeqPtr		/* eventSeq */,
405444c061aSmrg    TMParseStateTree	/* stateTree */
406444c061aSmrg);
407444c061aSmrg
408444c061aSmrgextern Boolean _XtMatchUsingStandardMods(
409444c061aSmrg    TMTypeMatch		/* typeMatch */,
410444c061aSmrg    TMModifierMatch	/* modMatch */,
411444c061aSmrg    TMEventPtr		/* eventSeq */
412444c061aSmrg);
413444c061aSmrg
414444c061aSmrgextern Boolean _XtMatchUsingDontCareMods(
415444c061aSmrg    TMTypeMatch		/* typeMatch */,
416444c061aSmrg    TMModifierMatch	/* modMatch */,
417444c061aSmrg    TMEventPtr		/* eventSeq */
418444c061aSmrg);
419444c061aSmrg
420444c061aSmrgextern Boolean _XtRegularMatch(
421444c061aSmrg    TMTypeMatch		/* typeMatch */,
422444c061aSmrg    TMModifierMatch	/* modMatch */,
423444c061aSmrg    TMEventPtr		/* eventSeq */
424444c061aSmrg);
425444c061aSmrg
426444c061aSmrgextern Boolean _XtMatchAtom(
427444c061aSmrg    TMTypeMatch		/* typeMatch */,
428444c061aSmrg    TMModifierMatch	/* modMatch */,
429444c061aSmrg    TMEventPtr		/* eventSeq */
430444c061aSmrg);
431444c061aSmrg
432444c061aSmrgextern void _XtTranslateEvent(
433444c061aSmrg    Widget		/* widget */,
434444c061aSmrg    XEvent*		/* event */
435444c061aSmrg);
436444c061aSmrg
437444c061aSmrg#include "CallbackI.h"
438444c061aSmrg#include "EventI.h"
439444c061aSmrg#include "HookObjI.h"
440444c061aSmrg#include "PassivGraI.h"
441444c061aSmrg#include "ThreadsI.h"
442444c061aSmrg#include "InitialI.h"
443444c061aSmrg#include "ResourceI.h"
444444c061aSmrg#include "StringDefs.h"
445444c061aSmrg
446444c061aSmrgextern void _XtBuildKeysymTables(Display *dpy, XtPerDisplay pd);
447444c061aSmrg
448444c061aSmrg#ifndef NO_MIT_HACKS
449444c061aSmrgextern void  _XtDisplayTranslations(
450444c061aSmrg    Widget		/* widget */,
451444c061aSmrg    XEvent*		/* event */,
452444c061aSmrg    String*		/* params */,
453444c061aSmrg    Cardinal*		/* num_params */
454444c061aSmrg);
455444c061aSmrg
456444c061aSmrgextern void  _XtDisplayAccelerators(
457444c061aSmrg    Widget		/* widget */,
458444c061aSmrg    XEvent*		/* event */,
459444c061aSmrg    String*		/* params */,
460444c061aSmrg    Cardinal*		/* num_params */
461444c061aSmrg);
462444c061aSmrg
463444c061aSmrgextern void _XtDisplayInstalledAccelerators(
464444c061aSmrg    Widget		/* widget */,
465444c061aSmrg    XEvent*		/* event */,
466444c061aSmrg    String*		/* params */,
467444c061aSmrg    Cardinal*		/* num_params */
468444c061aSmrg);
469444c061aSmrg#endif /* ifndef NO_MIT_HACKS */
470444c061aSmrg
471444c061aSmrgextern void _XtPopupInitialize(
472444c061aSmrg    XtAppContext	/* app_context */
473444c061aSmrg);
474444c061aSmrg
475444c061aSmrgextern void _XtBindActions(
476444c061aSmrg    Widget	/* widget */,
477444c061aSmrg    XtTM 	/* tm_rec */
478444c061aSmrg);
479444c061aSmrg
480444c061aSmrgextern Boolean _XtComputeLateBindings(
481444c061aSmrg    Display*		/* dpy */,
482444c061aSmrg    LateBindingsPtr	/* lateModifiers */,
483444c061aSmrg    Modifiers*		/* computed */,
484444c061aSmrg    Modifiers*		/* computedMask */
485444c061aSmrg);
486444c061aSmrg
487444c061aSmrgextern XtTranslations _XtCreateXlations(
488444c061aSmrg    TMStateTree *	/* stateTrees */,
489444c061aSmrg    TMShortCard		/* numStateTrees */,
490444c061aSmrg    XtTranslations 	/* first */,
491444c061aSmrg    XtTranslations	/* second */
492444c061aSmrg);
493444c061aSmrg
494444c061aSmrgextern Boolean _XtCvtMergeTranslations(
495444c061aSmrg    Display*	/* dpy */,
496444c061aSmrg    XrmValuePtr	/* args */,
497444c061aSmrg    Cardinal*	/* num_args */,
498444c061aSmrg    XrmValuePtr	/* from */,
499444c061aSmrg    XrmValuePtr	/* to */,
500444c061aSmrg    XtPointer*	/* closure_ret */
501444c061aSmrg);
502444c061aSmrg
503444c061aSmrgvoid _XtRemoveStateTreeByIndex(
504444c061aSmrg    XtTranslations	/* xlations */,
505444c061aSmrg    TMShortCard	/* i */);
506444c061aSmrg
507444c061aSmrgvoid _XtFreeTranslations(
508444c061aSmrg    XtAppContext	/* app */,
509444c061aSmrg    XrmValuePtr		/* toVal */,
510444c061aSmrg    XtPointer		/* closure */,
511444c061aSmrg    XrmValuePtr		/* args */,
512444c061aSmrg    Cardinal*		/* num_args */
513444c061aSmrg);
514444c061aSmrg
515444c061aSmrgextern TMShortCard _XtGetModifierIndex(
516444c061aSmrg    Event*	/* event */
517444c061aSmrg);
518444c061aSmrg
519444c061aSmrgextern TMShortCard _XtGetQuarkIndex(
520444c061aSmrg    TMParseStateTree	/* stateTreePtr */,
521444c061aSmrg    XrmQuark		/* quark */
522444c061aSmrg);
523444c061aSmrg
524444c061aSmrgextern XtTranslations _XtGetTranslationValue(
525444c061aSmrg    Widget		/* widget */
526444c061aSmrg);
527444c061aSmrg
528444c061aSmrgextern TMShortCard _XtGetTypeIndex(
529444c061aSmrg    Event*	/* event */
530444c061aSmrg);
531444c061aSmrg
532444c061aSmrgextern void _XtGrabInitialize(
533444c061aSmrg    XtAppContext	/* app */
534444c061aSmrg);
535444c061aSmrg
536444c061aSmrgextern void _XtInstallTranslations(
537444c061aSmrg    Widget		/* widget */
538444c061aSmrg);
539444c061aSmrg
540444c061aSmrgextern void _XtRemoveTranslations(
541444c061aSmrg    Widget		/* widget */
542444c061aSmrg);
543444c061aSmrg
544444c061aSmrgextern void _XtDestroyTMData(
545444c061aSmrg    Widget		/* widget */
546444c061aSmrg);
547444c061aSmrg
548444c061aSmrgextern void _XtMergeTranslations(
549444c061aSmrg    Widget		/* widget */,
550444c061aSmrg    XtTranslations	/* newXlations */,
551444c061aSmrg    _XtTranslateOp	/* operation */
552444c061aSmrg);
553444c061aSmrg
554444c061aSmrgextern void _XtActionInitialize(
555444c061aSmrg    XtAppContext	/* app */
556444c061aSmrg);
557444c061aSmrg
558444c061aSmrgextern TMStateTree _XtParseTreeToStateTree(
559444c061aSmrg    TMParseStateTree 	/* parseTree */
560444c061aSmrg);
561444c061aSmrg
562444c061aSmrgextern String _XtPrintActions(
563444c061aSmrg    ActionRec*	/* actions */,
564444c061aSmrg    XrmQuark*	/* quarkTbl */
565444c061aSmrg);
566444c061aSmrg
567444c061aSmrgextern String _XtPrintState(
568444c061aSmrg    TMStateTree	/* stateTree */,
569444c061aSmrg    TMBranchHead /* branchHead */);
570444c061aSmrg
571444c061aSmrgextern String _XtPrintEventSeq(
572444c061aSmrg    EventSeqPtr	/* eventSeq */,
573444c061aSmrg    Display*	/* dpy */
574444c061aSmrg);
575444c061aSmrg
576444c061aSmrgtypedef Boolean (*_XtTraversalProc)(
577444c061aSmrg    StatePtr	/* state */,
578444c061aSmrg    XtPointer	/* data */
579444c061aSmrg);
580444c061aSmrg
581444c061aSmrgextern void _XtTraverseStateTree(
582444c061aSmrg    TMStateTree		/* tree */,
583444c061aSmrg    _XtTraversalProc	/* func */,
584444c061aSmrg    XtPointer		/* data */
585444c061aSmrg);
586444c061aSmrg
587444c061aSmrgextern void _XtTranslateInitialize(
588444c061aSmrg    void
589444c061aSmrg);
590444c061aSmrg
591444c061aSmrgextern void _XtAddTMConverters(
592444c061aSmrg    ConverterTable	/* table */
593444c061aSmrg);
594444c061aSmrg
595444c061aSmrgextern void _XtUnbindActions(
596444c061aSmrg    Widget		/* widget */,
597444c061aSmrg    XtTranslations	/* xlations */,
598444c061aSmrg    TMBindData		/* bindData */
599444c061aSmrg);
600444c061aSmrg
601444c061aSmrgextern void _XtUnmergeTranslations(
602444c061aSmrg    Widget		/* widget */,
603444c061aSmrg    XtTranslations 	/* xlations */
604444c061aSmrg);
605444c061aSmrg
606444c061aSmrg/* TMKey.c */
607444c061aSmrgextern void _XtAllocTMContext(XtPerDisplay pd);
608444c061aSmrg
6092265a131Smrg_XFUNCPROTOEND
610