/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1992 by Xerox Corporation. All rights reserved. */ /* time: May 1, 1992 11:24:02 am PDT */ /* C2C version: October 16, 1990 (native) */ /* ref-counting: off */ /* file: XTkInputFocusImpl, module: XTkInputFocusImpl */ /* switches: bcfhklnouw */ #include <cedar/InstallationSupport.h> #include <cedar/CedarExtra.h> static char versionStamp[] = "@(#)mob←version [990409401,827808397] XTkInputFocusImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef word (*fPt)(); typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8; typedef struct {word f0, f1;} W2; typedef struct {W8 f; W2 r;} W10; #define SOURCE(p, l) /* source p, l */ static void NoName←Q1500(); static void XTkInputFocusImpl←P0(); static void SetFocus←P60(); static void GiveUpFocus←P120(); static word FocusFor←P300(); static word FirstFocusTarget←P360(); static word EachChild←P852(); static word NextFocusTarget←P420(); static word EachSibling←P1056(); static void SetNext←P480(); static void Implement←P540(); static void Delegate←P600(); static struct {unsigned f; char r[4];} string1 = {131076, "\216\251\000"}; static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"}; static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\033\115\307\000\300\214\060\055\310\100\244\000\000"}; static struct {unsigned f; char r[40];} string4 = {2555943, "\011\000\004\106\000\040\006\011\020\004\101\201\100\174\001\100\200\001\100\204\001\100\210\001\100\220\001\100\264\001\100\270\001\100\274\001\100\304\001"}; static struct {unsigned f; char r[8];} string5 = {262152, "Next\000\000\000"}; static struct {unsigned f; char r[16];} string6 = {983056, "FocusDelegation"}; static struct {unsigned f; char r[16];} string7 = {851984, "\257\300\073\010\162\271\300\061\127\132\215\100\164\000\000"}; static struct {unsigned f; char r[4];} string8 = {196611, "\004p\000"}; static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\351\276\264\273\300\115\104\320\264\100\164\000\000"}; static struct {unsigned f; char r[16];} string10 = {851984, "\257\300\033\115\307\000\300\214\060\055\310\100\150\000\000"}; static struct {unsigned f; char r[16];} string11 = {851984, "\257\300\255\065\245\005\300\213\277\037\112\100\150\000\000"}; static struct {unsigned f; char r[16];} string12 = {851984, "\257\300\054\174\025\242\300\120\014\117\154\100\150\000\000"}; static struct {unsigned f; char r[16];} string13 = {851984, "\257\300\241\212\365\147\300\210\002\141\100\100\150\000\000"}; static struct { word f0[14]; word f14; word f15; word f16; word f17; word f18; word f19; word f20; word f21; word f22; word f23; word f24; word f25; word f26; word f27; word f28; word f29; word f30; word f31[6]; } globalframe = { {0}, (word) Delegate←P600, 0, (word) Implement←P540, 0, (word) SetNext←P480, 0, (word) NextFocusTarget←P420, 0, (word) FirstFocusTarget←P360, 0, (word) FocusFor←P300, 0, (word) GiveUpFocus←P120, 0, (word) SetFocus←P60, 0, (word) XTkInputFocusImpl←P0, {0} }; static void NoName←Q1500() { register ptr gf←c071 = (ptr) &globalframe; word var←c13424; (* (( (ptr) gf←c071)+8) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2); (* (( (ptr) gf←c071)+11) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4); (* (ptr) (( (bPt) gf←c071)+48) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c071)+8) ), (word) &string5); (* (ptr) (( (bPt) gf←c071)+52) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c071)+8) ), (word) &string6); (void) XR←DeclareGlobalFrame((word) "XTkInputFocusImpl", &globalframe, (word) XR←GetTypeIndex((word) &string7, 0, (word) &string8) , (word) (( (bPt) gf←c071)+120)/* var←c12912 */ ); var←c13424 = (word) XR←ImportInterface((word) "Xl", (word) XR←GetTypeIndexS((word) (&string9)), 218); (* (( (ptr) gf←c071)+35)/* var←c13040 */ ) = var←c13424; (void) XR←ImportProcS(var←c13424, 1344773); var←c13424 = (word) XR←ImportInterface((word) "XTk", (word) XR←GetTypeIndexS((word) (&string10)), 50); (* (( (ptr) gf←c071)+32)/* var←c12944 */ ) = var←c13424; (void) XR←ImportProcS(var←c13424, 786947); (void) XR←ImportProcS(var←c13424, 788227); (void) XR←ImportProcS(var←c13424, 798979); (void) XR←ImportProcS(var←c13424, 67634690); (void) XR←ImportProcS(var←c13424, 67378433); var←c13424 = (word) XR←ImportInterface((word) "XTkPrivate", (word) XR←GetTypeIndexS((word) (&string11)), 4); (* (( (ptr) gf←c071)+34)/* var←c13008 */ ) = var←c13424; var←c13424 = (word) XR←ImportInterface((word) "XTkShellWidgets", (word) XR←GetTypeIndexS((word) (&string12)), 26); (* (( (ptr) gf←c071)+33)/* var←c12976 */ ) = var←c13424; (void) XR←ImportProcS(var←c13424, 789763); (void) XR←ImportProcS(var←c13424, 67371009); var←c13424 = (word) XR←ExportInterface((word) "XTkInputFocus", (word) XR←GetTypeIndexS((word) (&string13)), 7); (* (( (ptr) gf←c071)+36)/* var←c13456 */ ) = var←c13424; (void) XR←ExportProcS(var←c13424, (word) (( (bPt) gf←c071)+112)/* var←c12880 */ , 524290); (void) XR←ExportProcS(var←c13424, (word) (( (bPt) gf←c071)+104)/* var←c12848 */ , 524546); (void) XR←ExportProcS(var←c13424, (word) (( (bPt) gf←c071)+88)/* var←c12784 */ , 67633666); (void) XR←ExportProcS(var←c13424, (word) (( (bPt) gf←c071)+80)/* var←c12752 */ , 67633922); (void) XR←ExportProcS(var←c13424, (word) (( (bPt) gf←c071)+64)/* var←c12688 */ , 525314); (void) XR←ExportProcS(var←c13424, (word) (( (bPt) gf←c071)+56)/* var←c12656 */ , 525570); (void) XR←ExportProcS(var←c13424, (word) (( (bPt) gf←c071)+72)/* var←c12720 */ , 525826); } static void XTkInputFocusImpl←P0(formal←c020, formal←c019) word formal←c020; word formal←c019; { /* XTkInputFocusImpl: */ } static void SetFocus←P60(w←v3080, time←v3108) word w←v3080; word time←v3108; { register ptr gf←c13488 = (ptr) &globalframe; /* SetFocus: */ SOURCE(319, 449) SOURCE(398, 370) if ( ( (w←v3080 != 0) ? ((* (( (ptr) w←v3080)+37) ) == 0) : 0 ) ) { SOURCE(439, 334) { word c←v4064; SOURCE(441, 31) c←v4064 = (* (( (ptr) w←v3080)+34) ); SOURCE(474, 294) if ( ( (c←v4064 != 0) ? (0 != (* (( (ptr) c←v4064)+15) )) : 0 ) ) { SOURCE(494, 276) { word root←v4108; SOURCE(496, 36) { word pd14; pd14 = (* (( (ptr) (* (( (ptr) gf←c13488)+32)/* var←c12944 */ ))+33) ); root←v4108 = (word) ( *( (fPt) ((* (ptr) pd14 ))))(w←v3080, pd14); }; SOURCE(534, 49) if ((time←v3108 == 0)) { SOURCE(562, 21) time←v3108 = (* (( (ptr) c←v4064)+21) ); }; SOURCE(585, 183) { word pd15; pd15 = (* (( (ptr) (* (( (ptr) gf←c13488)+33)/* var←c12976 */ ))+4) ); if ((0 != (word) ( *( (fPt) ((* (ptr) pd15 ))))(root←v4108, pd15))) { SOURCE(624, 65) { word pd16; pd16 = (* (( (ptr) (* (( (ptr) gf←c13488)+33)/* var←c12976 */ ))+17) ); (void) ( *( (fPt) ((* (ptr) pd16 ))))(root←v4108, time←v3108, w←v3080, pd16); }; } else { SOURCE(689, 79) { word pd17; pd17 = (* (( (ptr) (* (( (ptr) gf←c13488)+35)/* var←c13040 */ ))+137) ); (void) ( *( (fPt) ((* (ptr) pd17 ))))(c←v4064, (* (( (ptr) w←v3080)+35) ), 2, time←v3108, (* (ptr) (* (( (ptr) (* (( (ptr) gf←c13488)+34) /*1*/ /* var←c13008 */ ))+6) ) ), pd17); }; }; }; }; }; }; }; } static void GiveUpFocus←P120(w←v3168, time←v3196) word w←v3168; word time←v3196; { register ptr gf←c13520 = (ptr) &globalframe; /* GiveUpFocus: */ SOURCE(780, 317) SOURCE(862, 235) if ((w←v3168 != 0)) { SOURCE(876, 226) { word c←v4152; SOURCE(878, 31) c←v4152 = (* (( (ptr) w←v3168)+34) ); SOURCE(911, 186) if ( ( (c←v4152 != 0) ? (0 != (* (( (ptr) c←v4152)+15) )) : 0 ) ) { SOURCE(933, 49) if ((time←v3196 == 0)) { SOURCE(961, 21) time←v3196 = (* (( (ptr) c←v4152)+21) ); }; SOURCE(984, 113) { word pd18; pd18 = (* (( (ptr) (* (( (ptr) gf←c13520)+35)/* var←c13040 */ ))+137) ); (void) ( *( (fPt) ((* (ptr) pd18 ))))(c←v4152, 1, 2, time←v3196, (* (ptr) (* (( (ptr) (* (( (ptr) gf←c13520)+34)/* var←c13008 */ ))+6) ) ), pd18); }; }; }; }; } static word FocusFor←P300(w←v3464) word w←v3464; { register ptr gf←c13552 = (ptr) &globalframe; word var←c3508; /* FocusFor: */ SOURCE(1466, 390) SOURCE(1466, 390) var←c3508 = 0; SOURCE(1528, 328) { register word noName←c13072 = 0; if ((noName←c13072 > 100)) { goto lab←L100000; }; lab←L100003: ; { word var←c13104; word var←c12560; word var←c13168; word var←c12512; SOURCE(1603, 52) if ((w←v3464 == 0) || ((* (( (ptr) w←v3464)+37) ) != 0)) { SOURCE(1643, 12) return(0); }; SOURCE(1657, 120) SOURCE(1322, 138) var←c12560 = 0; SOURCE(1404, 56) var←c13104 = (((unsigned)(* (( (bPt) w←v3464)+120) ) << 28) >> 31); if ((0 != var←c13104)) { SOURCE(1696, 81) { word var←c13136; { word pd19; pd19 = (* (( (ptr) (* (( (ptr) gf←c13552)+32)/* var←c12944 */ ))+10) ); var←c13136 = (word) ( *( (fPt) ((* (ptr) pd19 ))))(w←v3464, (* (( (ptr) gf←c13552)+13) ), pd19); }; if ((var←c13136 == 0)) { goto lab←L100005; }; if (((* (( (ptr) gf←c13552)+11) ) == XR←GetReferentType(var←c13136))) { { word ww←v4196; ww←v4196 = var←c13136; SOURCE(1771, 6) w←v3464 = ww←v4196; SOURCE(1779, 4) goto lab←L100002; }; } else { lab←L100005: ; }; }; }; SOURCE(1805, 37) { word x20; SOURCE(1109, 207) var←c12512 = 0; { word var←c13200; word class←v12608; SOURCE(1181, 62) if ((* (( (bPt) w←v3464)+120) ) & 04) { SOURCE(1230, 13) var←c13168 = 1; goto lab←L100006; }; SOURCE(1245, 71) class←v12608 = (* (( (ptr) w←v3464)+4) ); var←c13200 = (((unsigned)(* (( (bPt) class←v12608)+24) ) << 25) >> 31); if ((0 != var←c13200)) { SOURCE(1303, 13) var←c13168 = 1; goto lab←L100006; }; }; SOURCE(1109, 207) var←c13168 = var←c12512; lab←L100006: ; x20 = (word) (0 != var←c13168); if (x20) { SOURCE(1832, 10) return(w←v3464); }; }; SOURCE(1844, 12) return(0); }; lab←L100002: ; if ((noName←c13072 >= 100)) { goto lab←L100000; }; noName←c13072 = (noName←c13072 + 1); goto lab←L100003; lab←L100000: ; }; SOURCE(1466, 390) return(var←c3508); } static word FirstFocusTarget←P360(w←v3568, formal←c086) word w←v3568; word formal←c086; { W8 var←c13584; /* declaration of searchLimit←v3596 skipped */ register ptr gf←c13616 = (ptr) &globalframe; /* declaration of found←v3640 skipped */ /* declaration of var←c13232 skipped */ var←c13584.f4/* searchLimit←v3596 */ = formal←c086; /* FirstFocusTarget: */ SOURCE(1871, 450) { word tmpAddr21; tmpAddr21 = (word) (( (ptr) &var←c13584)+6)/* var←c13232 */ ; (* (ptr) tmpAddr21 ) = ( ((word) (fPt) EachChild←P852) ); (* (( (ptr) tmpAddr21) + 1) ) = 1; }; SOURCE(1871, 450) var←c13584.f5/* found←v3640 */ = 0; SOURCE(2138, 183) if ( ( (w←v3568 != 0) ? ((* (( (ptr) w←v3568)+37) ) == 0) : 0 ) ) { SOURCE(2179, 144) { word try←v4284; SOURCE(2181, 29) try←v4284 = (word) FocusFor←P300(w←v3568); SOURCE(2213, 28) if ((try←v4284 != 0)) { SOURCE(2229, 12) return(try←v4284); }; SOURCE(2243, 78) if (( (int)var←c13584.f4/* searchLimit←v3596 */ >= (int)0)) { SOURCE(2266, 55) { word pd22; pd22 = (* (( (ptr) (* (( (ptr) gf←c13616)+32)/* var←c12944 */ ))+53) ); (void) ( *( (fPt) ((* (ptr) pd22 ))))(w←v3568, (word) (( (bPt) &var←c13584)+24)/* var←c13232 */ , 0, pd22); }; }; }; }; SOURCE(1871, 450) return(var←c13584.f5/* found←v3640 */ ); } static word EachChild←P852(parent←v11592, child←v11620, data←v11648, formal←c13648) word parent←v11592; word child←v11620; word data←v11648; word formal←c13648; { word stop←v11692; word try←v4328; formal←c13648 = (formal←c13648 - 24); /* EachChild: */ SOURCE(1976, 157) SOURCE(1976, 157) stop←v11692 = 0; SOURCE(2005, 56) try←v4328 = (word) FirstFocusTarget←P360(child←v11620, ((* (( (ptr) formal←c13648)+4) ) - 1)); SOURCE(2063, 70) if ( ( (try←v4328 != 0) ? ((* (( (ptr) try←v4328)+37) ) == 0) : 0 ) ) { SOURCE(2109, 11) (* (( (ptr) formal←c13648)+5) ) = try←v4328; SOURCE(2122, 11) stop←v11692 = 1; }; SOURCE(1976, 157) return(stop←v11692); } static word NextFocusTarget←P420(w←v3700, formal←c087) word w←v3700; word formal←c087; { W10 var←c13680; /* declaration of searchLimit←v3728 skipped */ register ptr gf←c13712 = (ptr) &globalframe; word var←c3772; /* declaration of var←c13264 skipped */ word parent←v4372; /* declaration of parentsChild←v4400 skipped */ (* (( (ptr) &var←c13680)+4)/* searchLimit←v3728 */ ) = formal←c087; /* NextFocusTarget: */ SOURCE(2329, 760) { word tmpAddr23; tmpAddr23 = (word) (( (ptr) &var←c13680)+5)/* var←c13264 */ ; (* (ptr) tmpAddr23 ) = ( ((word) (fPt) EachSibling←P1056) ); (* (( (ptr) tmpAddr23) + 1) ) = 1; }; SOURCE(2329, 760) var←c3772 = 0; SOURCE(2427, 29) parent←v4372 = (* (( (ptr) w←v3700)+31) ); SOURCE(2458, 28) (* (( (ptr) &var←c13680)+7)/* parentsChild←v4400 */ ) = w←v3700; SOURCE(2488, 103) { word var←c13296; { word pd24; pd24 = (* (( (ptr) (* (( (ptr) gf←c13712)+32)/* var←c12944 */ ))+10) ); var←c13296 = (word) ( *( (fPt) ((* (ptr) pd24 ))))(w←v3700, (* (( (ptr) gf←c13712)+12) ), pd24); }; if ((var←c13296 == 0)) { goto lab←L100008; }; if (((* (( (ptr) gf←c13712)+11) ) == XR←GetReferentType(var←c13296))) { { word w←v4444; w←v4444 = var←c13296; SOURCE(2550, 41) return((word) FirstFocusTarget←P360(w←v4444, (* (( (ptr) &var←c13680)+4)/* searchLimit←v3728 */ ))); }; } else { lab←L100008: ; }; }; SOURCE(2608, 481) { register word noName←c13360 = 0; register word noName←c13392; noName←c13392 = (* (( (ptr) &var←c13680)+4)/* searchLimit←v3728 */ ); if (( (int)noName←c13360 > (int)noName←c13392)) { goto lab←L100009; }; lab←L100012: ; { /* declaration of foundSelf←v4516 skipped */ /* declaration of goal←v4544 skipped */ SOURCE(2823, 23) (* (( (ptr) &var←c13680)+8)/* foundSelf←v4516 */ ) = 0; SOURCE(2848, 22) (* (( (ptr) &var←c13680)+9)/* goal←v4544 */ ) = 0; SOURCE(2872, 31) if ((parent←v4372 == 0)) { SOURCE(2891, 12) return(0); }; SOURCE(2905, 125) if (((word) FocusFor←P300(parent←v4372) == 0)) { SOURCE(2936, 62) { word pd25; pd25 = (* (( (ptr) (* (( (ptr) gf←c13712)+32)/* var←c12944 */ ))+53) ); (void) ( *( (fPt) ((* (ptr) pd25 ))))(parent←v4372, (word) (( (bPt) &var←c13680)+20)/* var←c13264 */ , 0, pd25); }; SOURCE(3000, 30) if (((* (( (ptr) &var←c13680)+9)/* goal←v4544 */ ) != 0)) { SOURCE(3017, 13) return((* (( (ptr) &var←c13680)+9)/* goal←v4544 */ )); }; }; SOURCE(3035, 21) (* (( (ptr) &var←c13680)+7)/* parentsChild←v4400 */ ) = parent←v4372; SOURCE(3058, 31) parent←v4372 = (* (( (ptr) parent←v4372)+31) ); }; if (( (int)noName←c13360 >= (int)noName←c13392)) { goto lab←L100009; }; noName←c13360 = (noName←c13360 + 1); goto lab←L100012; lab←L100009: ; }; SOURCE(2329, 760) return(var←c3772); } static word EachSibling←P1056(parent←v11912, child←v11940, data←v11968, formal←c13744) word parent←v11912; word child←v11940; word data←v11968; word formal←c13744; { word stop←v12012; formal←c13744 = (formal←c13744 - 20); /* EachSibling: */ SOURCE(2636, 29) SOURCE(2636, 29) stop←v12012 = 0; SOURCE(2667, 150) if ((0 != (* (( (ptr) formal←c13744)+8) ))) { SOURCE(2688, 45) (* (( (ptr) formal←c13744)+9) ) = (word) FirstFocusTarget←P360(child←v11940, ((* (( (ptr) formal←c13744)+4) ) - 1)); SOURCE(2735, 29) if (((* (( (ptr) formal←c13744)+9) ) != 0)) { SOURCE(2752, 12) stop←v12012 = 1; }; } else { SOURCE(2773, 44) if ((child←v11940 == (* (( (ptr) formal←c13744)+7) ))) { SOURCE(2800, 17) (* (( (ptr) formal←c13744)+8) ) = 1; }; }; SOURCE(2636, 29) return(stop←v12012); } static void SetNext←P480(w←v3832, using←v3860) word w←v3832; word using←v3860; { register ptr gf←c13776 = (ptr) &globalframe; /* SetNext: */ SOURCE(3094, 116) SOURCE(3160, 50) if ((w←v3832 != 0)) { SOURCE(3176, 34) { word pd26; pd26 = (* (( (ptr) (* (( (ptr) gf←c13776)+32)/* var←c12944 */ ))+11) ); (void) ( *( (fPt) ((* (ptr) pd26 ))))(w←v3832, (* (( (ptr) gf←c13776)+12) ), using←v3860, pd26); }; }; } static void Implement←P540(w←v3920, bool←v3948) word w←v3920; word bool←v3948; { register ptr gf←c13808 = (ptr) &globalframe; /* Implement: */ SOURCE(3220, 122) SOURCE(3282, 60) if ((w←v3920 != 0)) { SOURCE(3296, 46) { word pd27; pd27 = (* (( (ptr) (* (( (ptr) gf←c13808)+32)/* var←c12944 */ ))+6) ); (void) ( *( (fPt) ((* (ptr) pd27 ))))(w←v3920, 5, bool←v3948, pd27); }; }; } static void Delegate←P600(w←v4008, using←v4036) word w←v4008; word using←v4036; { register ptr gf←c13840 = (ptr) &globalframe; /* Delegate: */ SOURCE(3349, 295) if ((w←v4008 == 0)) { SOURCE(3442, 6) return; } else { if ((w←v4008 == using←v4036) || (using←v4036 == 0)) { SOURCE(3476, 52) { word pd28; pd28 = (* (( (ptr) (* (( (ptr) gf←c13840)+32)/* var←c12944 */ ))+6) ); (void) ( *( (fPt) ((* (ptr) pd28 ))))(w←v4008, 4, 0, pd28); }; } else { SOURCE(3546, 45) { word pd29; pd29 = (* (( (ptr) (* (( (ptr) gf←c13840)+32)/* var←c12944 */ ))+11) ); (void) ( *( (fPt) ((* (ptr) pd29 ))))(w←v4008, (* (( (ptr) gf←c13840)+13) ), using←v4036, pd29); }; SOURCE(3593, 51) { word pd30; pd30 = (* (( (ptr) (* (( (ptr) gf←c13840)+32)/* var←c12944 */ ))+6) ); (void) ( *( (fPt) ((* (ptr) pd30 ))))(w←v4008, 4, 1, pd30); }; }; }; } /* file: XTkInputFocusImpl, module: XTkInputFocusImpl, compiled at: May 1, 1992 11:24:01 am PDT */ extern void XR←install←XTkInputFocusImpl() { NoName←Q1500(); } extern void XR←run←XTkInputFocusImpl() { XR←Start(&globalframe); }