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