~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/lib/Xt/TranslateI.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Xorg: TranslateI.h,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */
 
2
 
 
3
/***********************************************************
 
4
 
 
5
Copyright 1987, 1988, 1998  The Open Group
 
6
 
 
7
Permission to use, copy, modify, distribute, and sell this software and its
 
8
documentation for any purpose is hereby granted without fee, provided that
 
9
the above copyright notice appear in all copies and that both that
 
10
copyright notice and this permission notice appear in supporting
 
11
documentation.
 
12
 
 
13
The above copyright notice and this permission notice shall be included in
 
14
all copies or substantial portions of the Software.
 
15
 
 
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
 
19
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 
20
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 
21
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
22
 
 
23
Except as contained in this notice, the name of The Open Group shall not be
 
24
used in advertising or otherwise to promote the sale, use or other dealings
 
25
in this Software without prior written authorization from The Open Group.
 
26
 
 
27
 
 
28
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
 
29
 
 
30
                        All Rights Reserved
 
31
 
 
32
Permission to use, copy, modify, and distribute this software and its 
 
33
documentation for any purpose and without fee is hereby granted, 
 
34
provided that the above copyright notice appear in all copies and that
 
35
both that copyright notice and this permission notice appear in 
 
36
supporting documentation, and that the name of Digital not be
 
37
used in advertising or publicity pertaining to distribution of the
 
38
software without specific, written prior permission.  
 
39
 
 
40
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 
41
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
 
42
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
 
43
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 
44
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 
45
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 
46
SOFTWARE.
 
47
 
 
48
******************************************************************/
 
49
/* $XFree86: xc/lib/Xt/TranslateI.h,v 1.3 2001/12/14 19:56:32 dawes Exp $ */
 
50
 
 
51
/* 
 
52
 * TranslateI.h - Header file private to translation management
 
53
 * 
 
54
 * Author:      Gabe Beged-Dov, HP
 
55
 *
 
56
 * Former Author:       Charles Haynes
 
57
 *              Digital Equipment Corporation
 
58
 *              Western Research Laboratory
 
59
 * Date:        Sat Aug 29 1987
 
60
 */
 
61
 
 
62
/*#define REFCNT_TRANSLATIONS*/
 
63
#define CACHE_TRANSLATIONS
 
64
 
 
65
#define TM_NO_MATCH (-2)
 
66
 
 
67
#define _XtRStateTablePair "_XtStateTablePair"
 
68
 
 
69
typedef unsigned char TMByteCard;
 
70
typedef unsigned short TMShortCard;
 
71
typedef unsigned long TMLongCard;
 
72
typedef short TMShortInt;
 
73
 
 
74
typedef struct _TMTypeMatchRec *TMTypeMatch;
 
75
typedef struct _TMModifierMatchRec *TMModifierMatch;
 
76
typedef struct _TMEventRec *TMEventPtr;
 
77
 
 
78
typedef Boolean (*MatchProc)(TMTypeMatch typeMatch,
 
79
                             TMModifierMatch modMatch,
 
80
                             TMEventPtr eventSeq);
 
81
 
 
82
typedef struct _ModToKeysymTable {
 
83
    Modifiers mask;
 
84
    int count;
 
85
    int idx;
 
86
} ModToKeysymTable;
 
87
 
 
88
typedef struct _LateBindings {
 
89
    unsigned int knot:1;
 
90
    unsigned int pair:1;
 
91
    unsigned short ref_count;   /* garbage collection */
 
92
    KeySym keysym;
 
93
} LateBindings, *LateBindingsPtr;
 
94
 
 
95
typedef short ModifierMask;
 
96
 
 
97
typedef struct _ActionsRec *ActionPtr;
 
98
typedef struct _ActionsRec {
 
99
    int idx;                    /* index into quarkTable to find proc */
 
100
    String *params;             /* pointer to array of params */
 
101
    Cardinal num_params;        /* number of params */
 
102
    ActionPtr next;             /* next action to perform */
 
103
} ActionRec;
 
104
 
 
105
typedef struct _XtStateRec *StatePtr;
 
106
typedef struct _XtStateRec {
 
107
    unsigned int        isCycleStart:1;
 
108
    unsigned int        isCycleEnd:1;
 
109
    TMShortCard         typeIndex;
 
110
    TMShortCard         modIndex;
 
111
    ActionPtr           actions;        /* rhs list of actions to perform */
 
112
    StatePtr            nextLevel;
 
113
}StateRec;
 
114
 
 
115
 
 
116
#define XtTableReplace  0
 
117
#define XtTableAugment  1
 
118
#define XtTableOverride 2
 
119
#define XtTableUnmerge  3
 
120
 
 
121
typedef unsigned int _XtTranslateOp;
 
122
 
 
123
/*
 
124
 * New Definitions
 
125
 */
 
126
typedef struct _TMModifierMatchRec{
 
127
    TMLongCard   modifiers;
 
128
    TMLongCard   modifierMask;
 
129
    LateBindingsPtr lateModifiers;
 
130
    Boolean      standard;
 
131
}TMModifierMatchRec;
 
132
 
 
133
typedef struct _TMTypeMatchRec{
 
134
    TMLongCard   eventType;
 
135
    TMLongCard   eventCode;
 
136
    TMLongCard   eventCodeMask;
 
137
    MatchProc    matchEvent;
 
138
}TMTypeMatchRec;
 
139
 
 
140
typedef struct _TMBranchHeadRec {
 
141
    unsigned int        isSimple:1;
 
142
    unsigned int        hasActions:1;
 
143
    unsigned int        hasCycles:1;
 
144
    unsigned int        more:13;
 
145
    TMShortCard         typeIndex;
 
146
    TMShortCard         modIndex;
 
147
}TMBranchHeadRec, *TMBranchHead;
 
148
 
 
149
/* NOTE: elements of this structure must match those of
 
150
 * TMComplexStateTreeRec and TMParseStateTreeRec.
 
151
 */
 
152
typedef struct _TMSimpleStateTreeRec{
 
153
    unsigned int        isSimple:1;
 
154
    unsigned int        isAccelerator:1;
 
155
    unsigned int        mappingNotifyInterest:1;
 
156
    unsigned int        refCount:13;
 
157
    TMShortCard         numBranchHeads;
 
158
    TMShortCard         numQuarks;   /* # of entries in quarkTbl */
 
159
    TMShortCard         unused;      /* to ensure same alignment */
 
160
    TMBranchHeadRec     *branchHeadTbl;
 
161
    XrmQuark            *quarkTbl;  /* table of quarkified rhs*/
 
162
}TMSimpleStateTreeRec, *TMSimpleStateTree;    
 
163
 
 
164
/* NOTE: elements of this structure must match those of
 
165
 * TMSimpleStateTreeRec and TMParseStateTreeRec.
 
166
 */
 
167
typedef struct _TMComplexStateTreeRec{
 
168
    unsigned int        isSimple:1;
 
169
    unsigned int        isAccelerator:1;
 
170
    unsigned int        mappingNotifyInterest:1;
 
171
    unsigned int        refCount:13;
 
172
    TMShortCard         numBranchHeads;
 
173
    TMShortCard         numQuarks;   /* # of entries in quarkTbl */
 
174
    TMShortCard         numComplexBranchHeads;
 
175
    TMBranchHeadRec     *branchHeadTbl;
 
176
    XrmQuark            *quarkTbl;  /* table of quarkified rhs*/
 
177
    StatePtr            *complexBranchHeadTbl;
 
178
}TMComplexStateTreeRec, *TMComplexStateTree;    
 
179
 
 
180
/* NOTE: elements of this structure must match those of
 
181
 * TMSimpleStateTreeRec and TMComplexStateTreeRec.
 
182
 */
 
183
typedef struct _TMParseStateTreeRec{
 
184
    unsigned int        isSimple:1;
 
185
    unsigned int        isAccelerator:1;
 
186
    unsigned int        mappingNotifyInterest:1;
 
187
    unsigned int        isStackQuarks:1;
 
188
    unsigned int        isStackBranchHeads:1;
 
189
    unsigned int        isStackComplexBranchHeads:1;
 
190
    unsigned int        unused:10; /* to ensure correct alignment */
 
191
    TMShortCard         numBranchHeads;
 
192
    TMShortCard         numQuarks;   /* # of entries in quarkTbl */
 
193
    TMShortCard         numComplexBranchHeads;
 
194
    TMBranchHeadRec     *branchHeadTbl;
 
195
    XrmQuark            *quarkTbl;  /* table of quarkified rhs*/
 
196
    StatePtr            *complexBranchHeadTbl;
 
197
    TMShortCard         branchHeadTblSize;
 
198
    TMShortCard         quarkTblSize; /*total size of quarkTbl */
 
199
    TMShortCard         complexBranchHeadTblSize;
 
200
    StatePtr            head;
 
201
}TMParseStateTreeRec, *TMParseStateTree;    
 
202
 
 
203
typedef union _TMStateTreeRec{
 
204
    TMSimpleStateTreeRec        simple;
 
205
    TMParseStateTreeRec         parse;
 
206
    TMComplexStateTreeRec       complex;
 
207
}*TMStateTree, **TMStateTreePtr, **TMStateTreeList;
 
208
 
 
209
typedef struct _TMSimpleBindProcsRec {
 
210
    XtActionProc        *procs;
 
211
}TMSimpleBindProcsRec, *TMSimpleBindProcs;
 
212
 
 
213
typedef struct _TMComplexBindProcsRec {
 
214
    Widget              widget;         /*widgetID to pass to action Proc*/
 
215
    XtTranslations      aXlations;
 
216
    XtActionProc        *procs;
 
217
}TMComplexBindProcsRec, *TMComplexBindProcs;
 
218
 
 
219
typedef struct _TMSimpleBindDataRec {
 
220
    unsigned int                isComplex:1;    /* must be first */
 
221
    TMSimpleBindProcsRec        bindTbl[1];     /* variable length */
 
222
}TMSimpleBindDataRec, *TMSimpleBindData;
 
223
 
 
224
typedef struct _TMComplexBindDataRec {
 
225
    unsigned int                isComplex:1;    /* must be first */
 
226
    struct _ATranslationData    *accel_context; /* for GetValues */
 
227
    TMComplexBindProcsRec       bindTbl[1];     /* variable length */
 
228
}TMComplexBindDataRec, *TMComplexBindData;
 
229
 
 
230
typedef union _TMBindDataRec{
 
231
    TMSimpleBindDataRec         simple;
 
232
    TMComplexBindDataRec        complex;
 
233
}*TMBindData;
 
234
 
 
235
typedef struct _TranslationData{
 
236
    unsigned char               hasBindings;    /* must be first */
 
237
    unsigned char               operation; /*replace,augment,override*/
 
238
    TMShortCard                 numStateTrees;
 
239
    struct _TranslationData     *composers[2];
 
240
    EventMask                   eventMask;
 
241
    TMStateTree                 stateTreeTbl[1]; /* variable length */
 
242
}TranslationData;
 
243
 
 
244
/*
 
245
 * ATranslations is returned by GetValues for translations that contain 
 
246
 * accelerators.  The TM can differentiate between this and TranslationData
 
247
 * (that don't have a bindTbl) by looking at the first field (hasBindings)
 
248
 * of either structure.  All ATranslationData structures associated with a 
 
249
 * widget are chained off the BindData record of the widget. 
 
250
 */
 
251
typedef struct _ATranslationData{ 
 
252
    unsigned char               hasBindings;    /* must be first */
 
253
    unsigned char               operation;
 
254
    struct _TranslationData     *xlations;  /* actual translations */
 
255
    struct _ATranslationData    *next;      /* chain the contexts together */
 
256
    TMComplexBindProcsRec       bindTbl[1]; /* accelerator bindings */
 
257
}ATranslationData, *ATranslations;
 
258
 
 
259
typedef struct _TMConvertRec {
 
260
    XtTranslations      old; /* table to merge into */
 
261
    XtTranslations      new; /* table to merge from */
 
262
} TMConvertRec;
 
263
 
 
264
#define _XtEventTimerEventType ((TMLongCard)~0L)
 
265
#define KeysymModMask           (1L<<27) /* private to TM */
 
266
#define AnyButtonMask           (1L<<28) /* private to TM */
 
267
 
 
268
typedef struct _EventRec {
 
269
    TMLongCard modifiers;
 
270
    TMLongCard modifierMask;
 
271
    LateBindingsPtr lateModifiers;
 
272
    TMLongCard eventType;
 
273
    TMLongCard eventCode;
 
274
    TMLongCard eventCodeMask;
 
275
    MatchProc matchEvent;
 
276
    Boolean standard;
 
277
} Event;
 
278
 
 
279
typedef struct _EventSeqRec *EventSeqPtr;
 
280
typedef struct _EventSeqRec {
 
281
    Event event;        /* X event description */
 
282
    StatePtr state;     /* private to state table builder */
 
283
    EventSeqPtr next;   /* next event on line */
 
284
    ActionPtr actions;  /* r.h.s.   list of actions to perform */
 
285
} EventSeqRec;
 
286
 
 
287
typedef EventSeqRec EventRec;
 
288
typedef EventSeqPtr EventPtr;
 
289
 
 
290
typedef struct _TMEventRec {
 
291
    XEvent *xev;
 
292
    Event event;
 
293
}TMEventRec;
 
294
 
 
295
typedef struct _ActionHookRec {
 
296
    struct _ActionHookRec* next; /* must remain first */
 
297
    XtAppContext app;
 
298
    XtActionHookProc proc;
 
299
    XtPointer closure;
 
300
} ActionHookRec, *ActionHook;
 
301
 
 
302
/* choose a number between 2 and 8 */
 
303
#define TMKEYCACHELOG2 6
 
304
#define TMKEYCACHESIZE (1<<TMKEYCACHELOG2)
 
305
 
 
306
typedef struct _KeyCacheRec {
 
307
    unsigned char modifiers_return[256]; /* constant per KeyCode, key proc */
 
308
    KeyCode keycode[TMKEYCACHESIZE];
 
309
    unsigned char modifiers[TMKEYCACHESIZE];
 
310
    KeySym keysym[TMKEYCACHESIZE];
 
311
} TMKeyCache;
 
312
 
 
313
typedef struct _TMKeyContextRec {
 
314
    XEvent *event;
 
315
    unsigned long serial;
 
316
    KeySym keysym;
 
317
    Modifiers modifiers;
 
318
    TMKeyCache keycache;  /* keep this last, to keep offsets to others small */
 
319
} TMKeyContextRec, *TMKeyContext;
 
320
 
 
321
typedef struct _TMGlobalRec{
 
322
    TMTypeMatchRec              **typeMatchSegmentTbl;
 
323
    TMShortCard                 numTypeMatches;
 
324
    TMShortCard                 numTypeMatchSegments;
 
325
    TMShortCard                 typeMatchSegmentTblSize;
 
326
    TMModifierMatchRec          **modMatchSegmentTbl;
 
327
    TMShortCard                 numModMatches;
 
328
    TMShortCard                 numModMatchSegments;
 
329
    TMShortCard                 modMatchSegmentTblSize;
 
330
    Boolean                     newMatchSemantics;
 
331
#ifdef TRACE_TM
 
332
    XtTranslations              *tmTbl;
 
333
    TMShortCard                 numTms;
 
334
    TMShortCard                 tmTblSize;
 
335
    struct _TMBindCacheRec      **bindCacheTbl;
 
336
    TMShortCard                 numBindCache;
 
337
    TMShortCard                 bindCacheTblSize;
 
338
    TMShortCard                 numLateBindings;
 
339
    TMShortCard                 numBranchHeads;
 
340
    TMShortCard                 numComplexStates;
 
341
    TMShortCard                 numComplexActions;
 
342
#endif /* TRACE_TM */
 
343
}TMGlobalRec;
 
344
 
 
345
extern TMGlobalRec _XtGlobalTM;
 
346
 
 
347
#define TM_MOD_SEGMENT_SIZE     16
 
348
#define TM_TYPE_SEGMENT_SIZE    16
 
349
 
 
350
#define TMGetTypeMatch(idx) \
 
351
  ((TMTypeMatch) \
 
352
   &((_XtGlobalTM.typeMatchSegmentTbl[((idx) >> 4)])[(idx) & 15]))
 
353
#define TMGetModifierMatch(idx) \
 
354
  ((TMModifierMatch) \
 
355
   &((_XtGlobalTM.modMatchSegmentTbl[(idx) >> 4])[(idx) & 15]))
 
356
 
 
357
/* Useful Access Macros */
 
358
#define TMNewMatchSemantics() (_XtGlobalTM.newMatchSemantics)
 
359
#define TMBranchMore(branch) (branch->more)
 
360
#define TMComplexBranchHead(tree, br) \
 
361
  (((TMComplexStateTree)tree)->complexBranchHeadTbl[TMBranchMore(br)])
 
362
 
 
363
#define TMGetComplexBindEntry(bindData, idx) \
 
364
  ((TMComplexBindProcs)&(((TMComplexBindData)bindData)->bindTbl[idx]))
 
365
 
 
366
#define TMGetSimpleBindEntry(bindData, idx) \
 
367
  ((TMSimpleBindProcs)&(((TMSimpleBindData)bindData)->bindTbl[idx]))
 
368
 
 
369
 
 
370
#define _InitializeKeysymTables(dpy, pd) \
 
371
    if (pd->keysyms == NULL) \
 
372
        _XtBuildKeysymTables(dpy, pd)
 
373
 
 
374
/* 
 
375
 * Internal Functions
 
376
 */
 
377
 
 
378
extern void _XtPopup(
 
379
#if NeedFunctionPrototypes
 
380
    Widget      /* widget */,
 
381
    XtGrabKind  /* grab_kind */,
 
382
    _XtBoolean  /* spring_loaded */
 
383
#endif
 
384
);
 
385
 
 
386
extern String _XtPrintXlations(
 
387
#if NeedFunctionPrototypes
 
388
    Widget              /* w */,
 
389
    XtTranslations      /* xlations */,
 
390
    Widget              /* accelWidget */,
 
391
    _XtBoolean          /* includeRHS */
 
392
#endif
 
393
);
 
394
 
 
395
extern void _XtRegisterGrabs(
 
396
#if NeedFunctionPrototypes
 
397
    Widget      /* widget */
 
398
#endif
 
399
);
 
400
 
 
401
extern XtPointer _XtInitializeActionData(
 
402
#if NeedFunctionPrototypes
 
403
    struct _XtActionsRec *      /* actions */,
 
404
    Cardinal                    /* count */,
 
405
    _XtBoolean                  /* inPlace */
 
406
#endif
 
407
);
 
408
 
 
409
extern void _XtAddEventSeqToStateTree(
 
410
#if NeedFunctionPrototypes
 
411
    EventSeqPtr         /* eventSeq */,
 
412
    TMParseStateTree    /* stateTree */
 
413
#endif 
 
414
);
 
415
 
 
416
extern Boolean _XtMatchUsingStandardMods(
 
417
#if NeedFunctionPrototypes
 
418
    TMTypeMatch         /* typeMatch */,
 
419
    TMModifierMatch     /* modMatch */,
 
420
    TMEventPtr          /* eventSeq */
 
421
#endif
 
422
);
 
423
 
 
424
extern Boolean _XtMatchUsingDontCareMods(
 
425
#if NeedFunctionPrototypes
 
426
    TMTypeMatch         /* typeMatch */,
 
427
    TMModifierMatch     /* modMatch */,
 
428
    TMEventPtr          /* eventSeq */
 
429
#endif
 
430
);
 
431
 
 
432
extern Boolean _XtRegularMatch(
 
433
#if NeedFunctionPrototypes
 
434
    TMTypeMatch         /* typeMatch */,
 
435
    TMModifierMatch     /* modMatch */,
 
436
    TMEventPtr          /* eventSeq */
 
437
#endif
 
438
);
 
439
 
 
440
extern Boolean _XtMatchAtom(
 
441
#if NeedFunctionPrototypes
 
442
    TMTypeMatch         /* typeMatch */,
 
443
    TMModifierMatch     /* modMatch */,
 
444
    TMEventPtr          /* eventSeq */
 
445
#endif
 
446
);
 
447
 
 
448
extern void _XtTranslateEvent(
 
449
#if NeedFunctionPrototypes
 
450
    Widget              /* widget */,
 
451
    XEvent*             /* event */
 
452
#endif
 
453
);
 
454
 
 
455
#include "CallbackI.h"
 
456
#include "EventI.h"
 
457
#include "HookObjI.h"
 
458
#include "PassivGraI.h"
 
459
#include "ThreadsI.h"
 
460
#include "InitialI.h"
 
461
#include "ResourceI.h"
 
462
#include "StringDefs.h"
 
463
 
 
464
extern void _XtBuildKeysymTables(Display *dpy, XtPerDisplay pd);
 
465
 
 
466
#ifndef NO_MIT_HACKS
 
467
extern void  _XtDisplayTranslations(
 
468
#if NeedFunctionPrototypes
 
469
    Widget              /* widget */,
 
470
    XEvent*             /* event */,
 
471
    String*             /* params */,
 
472
    Cardinal*           /* num_params */
 
473
#endif 
 
474
);
 
475
 
 
476
extern void  _XtDisplayAccelerators(
 
477
#if NeedFunctionPrototypes
 
478
    Widget              /* widget */,
 
479
    XEvent*             /* event */,
 
480
    String*             /* params */,
 
481
    Cardinal*           /* num_params */
 
482
#endif
 
483
);
 
484
 
 
485
extern void _XtDisplayInstalledAccelerators(
 
486
#if NeedFunctionPrototypes
 
487
    Widget              /* widget */,
 
488
    XEvent*             /* event */,
 
489
    String*             /* params */,
 
490
    Cardinal*           /* num_params */
 
491
#endif
 
492
);
 
493
#endif /* ifndef NO_MIT_HACKS */
 
494
 
 
495
extern void _XtPopupInitialize(
 
496
#if NeedFunctionPrototypes
 
497
    XtAppContext        /* app_context */
 
498
#endif
 
499
);
 
500
 
 
501
extern void _XtBindActions(
 
502
#if NeedFunctionPrototypes
 
503
    Widget      /* widget */,
 
504
    XtTM        /* tm_rec */
 
505
#endif
 
506
);
 
507
 
 
508
extern Boolean _XtComputeLateBindings(
 
509
#if NeedFunctionPrototypes
 
510
    Display*            /* dpy */,
 
511
    LateBindingsPtr     /* lateModifiers */,
 
512
    Modifiers*          /* computed */,
 
513
    Modifiers*          /* computedMask */
 
514
#endif
 
515
);
 
516
 
 
517
extern XtTranslations _XtCreateXlations(
 
518
#if NeedFunctionPrototypes
 
519
    TMStateTree *       /* stateTrees */,
 
520
    TMShortCard         /* numStateTrees */,
 
521
    XtTranslations      /* first */,
 
522
    XtTranslations      /* second */
 
523
#endif
 
524
);
 
525
 
 
526
extern Boolean _XtCvtMergeTranslations(
 
527
#if NeedFunctionPrototypes
 
528
    Display*    /* dpy */,
 
529
    XrmValuePtr /* args */,
 
530
    Cardinal*   /* num_args */,
 
531
    XrmValuePtr /* from */,
 
532
    XrmValuePtr /* to */,
 
533
    XtPointer*  /* closure_ret */
 
534
#endif
 
535
);
 
536
 
 
537
void _XtFreeTranslations(
 
538
#if NeedFunctionPrototypes
 
539
    XtAppContext        /* app */,
 
540
    XrmValuePtr         /* toVal */,
 
541
    XtPointer           /* closure */,
 
542
    XrmValuePtr         /* args */,
 
543
    Cardinal*           /* num_args */
 
544
#endif
 
545
);
 
546
 
 
547
extern TMShortCard _XtGetModifierIndex(
 
548
#if NeedFunctionPrototypes
 
549
    Event*      /* event */
 
550
#endif
 
551
);
 
552
   
 
553
extern TMShortCard _XtGetQuarkIndex(
 
554
#if NeedFunctionPrototypes
 
555
    TMParseStateTree    /* stateTreePtr */,
 
556
    XrmQuark            /* quark */
 
557
#endif
 
558
);
 
559
 
 
560
extern XtTranslations _XtGetTranslationValue(
 
561
#if NeedFunctionPrototypes
 
562
    Widget              /* widget */
 
563
#endif
 
564
);
 
565
 
 
566
extern TMShortCard _XtGetTypeIndex(
 
567
#if NeedFunctionPrototypes
 
568
    Event*      /* event */
 
569
#endif
 
570
);
 
571
 
 
572
extern void _XtGrabInitialize(
 
573
#if NeedFunctionPrototypes
 
574
    XtAppContext        /* app */
 
575
#endif
 
576
);
 
577
 
 
578
extern void _XtInstallTranslations(
 
579
#if NeedFunctionPrototypes
 
580
    Widget              /* widget */
 
581
#endif
 
582
);
 
583
 
 
584
extern void _XtRemoveTranslations(
 
585
#if NeedFunctionPrototypes
 
586
    Widget              /* widget */
 
587
#endif
 
588
);
 
589
 
 
590
extern void _XtDestroyTMData(
 
591
#if NeedFunctionPrototypes
 
592
    Widget              /* widget */
 
593
#endif
 
594
);
 
595
 
 
596
extern void _XtMergeTranslations(
 
597
#if NeedFunctionPrototypes
 
598
    Widget              /* widget */,
 
599
    XtTranslations      /* newXlations */,
 
600
    _XtTranslateOp      /* operation */
 
601
#endif
 
602
);
 
603
 
 
604
extern void _XtActionInitialize(
 
605
#if NeedFunctionPrototypes
 
606
    XtAppContext        /* app */
 
607
#endif
 
608
);
 
609
 
 
610
extern TMStateTree _XtParseTreeToStateTree(
 
611
#if NeedFunctionPrototypes
 
612
    TMParseStateTree    /* parseTree */
 
613
#endif
 
614
);
 
615
 
 
616
extern String _XtPrintActions(
 
617
#if NeedFunctionPrototypes
 
618
    ActionRec*  /* actions */,
 
619
    XrmQuark*   /* quarkTbl */
 
620
#endif
 
621
);
 
622
 
 
623
extern String _XtPrintEventSeq(
 
624
#if NeedFunctionPrototypes
 
625
    EventSeqPtr /* eventSeq */,
 
626
    Display*    /* dpy */
 
627
#endif
 
628
);
 
629
 
 
630
typedef Boolean (*_XtTraversalProc)(
 
631
#if NeedFunctionPrototypes
 
632
    StatePtr    /* state */,
 
633
    XtPointer   /* data */
 
634
#endif
 
635
);
 
636
                                    
 
637
extern void _XtTraverseStateTree(
 
638
#if NeedFunctionPrototypes
 
639
    TMStateTree         /* tree */,
 
640
    _XtTraversalProc    /* func */,                              
 
641
    XtPointer           /* data */
 
642
#endif
 
643
);
 
644
 
 
645
extern void _XtTranslateInitialize(
 
646
#if NeedFunctionPrototypes
 
647
    void
 
648
#endif
 
649
);
 
650
 
 
651
extern void _XtAddTMConverters(
 
652
#if NeedFunctionPrototypes
 
653
    ConverterTable      /* table */
 
654
#endif
 
655
);
 
656
 
 
657
extern void _XtUnbindActions(
 
658
#if NeedFunctionPrototypes
 
659
    Widget              /* widget */,
 
660
    XtTranslations      /* xlations */,
 
661
    TMBindData          /* bindData */
 
662
#endif
 
663
);
 
664
 
 
665
extern void _XtUnmergeTranslations(
 
666
#if NeedFunctionPrototypes
 
667
    Widget              /* widget */,
 
668
    XtTranslations      /* xlations */
 
669
#endif
 
670
);
 
671
 
 
672
/* TMKey.c */
 
673
extern void _XtAllocTMContext(XtPerDisplay pd);
 
674