1 /****************************************************************** 2 Copyright 1993, 1994 by Digital Equipment Corporation, Maynard, Massachusetts, 3 Copyright 1993, 1994 by Hewlett-Packard Company 4 5 Copyright 1994, 1995 by Sun Microsystems, Inc. 6 7 All Rights Reserved 8 9 Permission to use, copy, modify, and distribute this software and its 10 documentation for any purpose and without fee is hereby granted, 11 provided that the above copyright notice appear in all copies and that 12 both that copyright notice and this permission notice appear in 13 supporting documentation, and that the names of Digital or MIT not be 14 used in advertising or publicity pertaining to distribution of the 15 software without specific, written prior permission. 16 17 DIGITAL AND HEWLETT-PACKARD COMPANY DISCLAIMS ALL WARRANTIES WITH REGARD 18 TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 19 FITNESS, IN NO EVENT SHALL DIGITAL AND HEWLETT-PACKARD COMPANY BE LIABLE 20 FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER 21 RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF 22 CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 23 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 24 25 Author: Hiroyuki Miyamoto Digital Equipment Corporation 26 miyamoto@jrd.dec.com 27 Hidetoshi Tajima(tajima@Eng.Sun.COM) Sun Microsystems, Inc. 28 29 This version tidied and debugged by Steve Underwood May 1999 30 31 ******************************************************************/ 32 33 /* Protocol Packet frames */ 34 35 #include "FrameMgr.h" 36 37 /* Data type definitions */ 38 39 static XimFrameRec ximattr_fr[] = 40 { 41 _FRAME(BIT16), /* attribute ID */ 42 _FRAME(BIT16), /* type of the value */ 43 _FRAME(BIT16), /* length of im-attribute */ 44 _FRAME(BARRAY), /* im-attribute */ 45 _PAD4(2), 46 _FRAME(EOL), 47 }; 48 49 static XimFrameRec xicattr_fr[] = 50 { 51 _FRAME(BIT16), /* attribute ID */ 52 _FRAME(BIT16), /* type of the value */ 53 _FRAME(BIT16), /* length of ic-attribute */ 54 _FRAME(BARRAY), /* ic-attribute */ 55 _PAD4(2), 56 _FRAME(EOL), 57 }; 58 59 static XimFrameRec ximattribute_fr[] = 60 { 61 _FRAME(BIT16), /* attribute ID */ 62 _FRAME(BIT16), /* value length */ 63 _FRAME(BARRAY), /* value */ 64 _PAD4(1), 65 _FRAME(EOL), 66 }; 67 68 static XimFrameRec xicattribute_fr[] = 69 { 70 _FRAME(BIT16), /* attribute ID */ 71 _FRAME(BIT16), /* value length */ 72 _FRAME(BARRAY), /* value */ 73 _PAD4(1), 74 _FRAME(EOL), 75 }; 76 77 static XimFrameRec ximtriggerkey_fr[] = 78 { 79 _FRAME(BIT32), /* keysym */ 80 _FRAME(BIT32), /* modifier */ 81 _FRAME(BIT32), /* modifier mask */ 82 _FRAME(EOL), 83 }; 84 85 static XimFrameRec encodinginfo_fr[] = 86 { 87 _FRAME(BIT16), /* length of encoding info */ 88 _FRAME(BARRAY), /* encoding info */ 89 _PAD4(2), 90 _FRAME(EOL), 91 }; 92 93 static XimFrameRec str_fr[] = 94 { 95 _FRAME(BIT8), /* number of byte */ 96 _FRAME(BARRAY), /* string */ 97 _FRAME(EOL), 98 }; 99 100 static XimFrameRec xpcs_fr[] = 101 { 102 _FRAME(BIT16), /* length of string in bytes */ 103 _FRAME(BARRAY), /* string */ 104 _PAD4(2), 105 }; 106 107 static XimFrameRec ext_fr[] = 108 { 109 _FRAME(BIT8), /* extension major-opcode */ 110 _FRAME(BIT8), /* extension minor-opcode */ 111 _FRAME(BIT16), /* length of extension name */ 112 _FRAME(BARRAY), /* extension name */ 113 _PAD4(1), 114 _FRAME(EOL), 115 }; 116 117 static XimFrameRec inputstyle_fr[] = 118 { 119 _FRAME(BIT32), /* inputstyle */ 120 _FRAME(EOL), 121 }; 122 /* Protocol definitions */ 123 124 xim_externaldef XimFrameRec attr_head_fr[] = 125 { 126 _FRAME(BIT16), /* attribute id */ 127 _FRAME(BIT16), /* attribute length */ 128 _FRAME(EOL), 129 }; 130 131 xim_externaldef XimFrameRec short_fr[] = 132 { 133 _FRAME(BIT16), /* value */ 134 _FRAME(EOL), 135 }; 136 137 xim_externaldef XimFrameRec long_fr[] = 138 { 139 _FRAME(BIT32), /* value */ 140 _FRAME(EOL), 141 }; 142 143 xim_externaldef XimFrameRec xrectangle_fr[] = 144 { 145 _FRAME(BIT16), /* x */ 146 _FRAME(BIT16), /* y */ 147 _FRAME(BIT16), /* width */ 148 _FRAME(BIT16), /* height */ 149 _FRAME(EOL), 150 }; 151 152 xim_externaldef XimFrameRec xpoint_fr[] = 153 { 154 _FRAME(BIT16), /* x */ 155 _FRAME(BIT16), /* y */ 156 _FRAME(EOL), 157 }; 158 159 xim_externaldef XimFrameRec fontset_fr[] = 160 { 161 _FRAME(BIT16), /* length of base font name */ 162 _FRAME(BARRAY), /* base font name list */ 163 _PAD4(2), /* unused */ 164 _FRAME(EOL), 165 }; 166 167 xim_externaldef XimFrameRec input_styles_fr[] = 168 { 169 _FRAME(BIT16), /* number of list */ 170 _PAD4(1), /* unused */ 171 _FRAME(ITER), /* XIMStyle list */ 172 _FRAME(POINTER), 173 _PTR(inputstyle_fr), 174 _FRAME(EOL), 175 }; 176 177 xim_externaldef XimFrameRec packet_header_fr[] = 178 { 179 _FRAME(BIT8), /* major-opcode */ 180 _FRAME(BIT8), /* minor-opcode */ 181 _FRAME(BIT16), /* length */ 182 _FRAME(EOL), 183 }; 184 185 xim_externaldef XimFrameRec error_fr[] = 186 { 187 _FRAME(BIT16), /* input-method-ID */ 188 _FRAME(BIT16), /* input-context-ID */ 189 _FRAME(BIT16), /* flag */ 190 _FRAME(BIT16), /* Error Code */ 191 _FRAME(BIT16), /* length of error detail */ 192 _FRAME(BIT16), /* type of error detail */ 193 _FRAME(BARRAY), /* error detail */ 194 _PAD4(1), 195 _FRAME(EOL), 196 }; 197 198 xim_externaldef XimFrameRec connect_fr[] = 199 { 200 _FRAME(BIT8), /* byte order */ 201 _PAD2(1), /* unused */ 202 _FRAME(BIT16), /* client-major-protocol-version */ 203 _FRAME(BIT16), /* client-minor-protocol-version */ 204 _BYTE_COUNTER(BIT16, 1), /* length of client-auth-protocol-names */ 205 _FRAME(ITER), /* client-auth-protocol-names */ 206 _FRAME(POINTER), 207 _PTR(xpcs_fr), 208 _FRAME(EOL), 209 }; 210 211 xim_externaldef XimFrameRec connect_reply_fr[] = 212 { 213 _FRAME(BIT16), /* server-major-protocol-version */ 214 _FRAME(BIT16), /* server-minor-protocol-version */ 215 _FRAME(EOL), 216 }; 217 218 xim_externaldef XimFrameRec auth_required_fr[] = 219 { 220 _FRAME(BIT8), /* auth-protocol-index */ 221 _FRAME(BIT8), /* auth-data1 */ 222 _FRAME(BARRAY), /* auth-data2 */ 223 _PAD4(3), 224 _FRAME(EOL), 225 }; 226 227 228 xim_externaldef XimFrameRec auth_reply_fr[] = 229 { 230 _FRAME(BIT8), 231 _FRAME(BARRAY), 232 _PAD4(2), 233 _FRAME(EOL), 234 }; 235 236 xim_externaldef XimFrameRec auth_next_fr[] = 237 { 238 _FRAME(BIT8), /* auth-data1 */ 239 _FRAME(BARRAY), /* auth-data2 */ 240 _PAD4(2), 241 _FRAME(EOL), 242 }; 243 244 xim_externaldef XimFrameRec auth_setup_fr[] = 245 { 246 _BYTE_COUNTER(BIT16, 2), /* number of client-auth-protocol-names */ 247 _PAD4(1), /* unused */ 248 _FRAME(ITER), /* server-auth-protocol-names */ 249 _FRAME(POINTER), 250 _PTR(xpcs_fr), 251 _FRAME(EOL), 252 }; 253 254 xim_externaldef XimFrameRec auth_ng_fr[] = 255 { 256 _FRAME(EOL), 257 }; 258 259 xim_externaldef XimFrameRec disconnect_fr[] = 260 { 261 _FRAME(EOL), 262 }; 263 264 xim_externaldef XimFrameRec disconnect_reply_fr[] = 265 { 266 _FRAME(EOL), 267 }; 268 269 xim_externaldef XimFrameRec open_fr[] = 270 { 271 _FRAME(POINTER), /* locale name */ 272 _PTR(str_fr), 273 _PAD4(1), 274 _FRAME(EOL), 275 }; 276 277 xim_externaldef XimFrameRec open_reply_fr[] = 278 { 279 _FRAME(BIT16), /* input-method-ID */ 280 _BYTE_COUNTER(BIT16, 1), /* byte length of IM attributes supported */ 281 _FRAME(ITER), /* IM attribute supported */ 282 _FRAME(POINTER), 283 _PTR(ximattr_fr), 284 _BYTE_COUNTER(BIT16, 2), /* number of IC attribute supported */ 285 _PAD4(1), /* unused */ 286 _FRAME(ITER), /* IC attribute supported */ 287 _FRAME(POINTER), 288 _PTR(xicattr_fr), 289 _FRAME(EOL), 290 }; 291 292 xim_externaldef XimFrameRec close_fr[] = 293 { 294 _FRAME(BIT16), /* input-method-ID */ 295 _PAD4(1), /* unused */ 296 _FRAME(EOL), 297 }; 298 299 xim_externaldef XimFrameRec close_reply_fr[] = 300 { 301 _FRAME(BIT16), /* input-method-ID */ 302 _PAD4(1), /* unused */ 303 _FRAME(EOL), 304 }; 305 306 xim_externaldef XimFrameRec register_triggerkeys_fr[] = 307 { 308 _FRAME(BIT16), /* input-method-ID */ 309 _PAD4(1), /* unused */ 310 _BYTE_COUNTER(BIT32, 1), /* byte length of on-keys */ 311 _FRAME(ITER), /* on-keys list */ 312 _FRAME(POINTER), 313 _PTR(ximtriggerkey_fr), 314 _BYTE_COUNTER(BIT32, 1), /* byte length of off-keys */ 315 _FRAME(ITER), /* off-keys list */ 316 _FRAME(POINTER), 317 _PTR(ximtriggerkey_fr), 318 _FRAME(EOL), 319 }; 320 321 xim_externaldef XimFrameRec trigger_notify_fr[] = 322 { 323 _FRAME(BIT16), /* input-mehotd-ID */ 324 _FRAME(BIT16), /* input-context-ID */ 325 _FRAME(BIT32), /* flag */ 326 _FRAME(BIT32), /* index of keys list */ 327 _FRAME(BIT32), /* client-select-event-mask */ 328 _FRAME(EOL), 329 }; 330 331 xim_externaldef XimFrameRec trigger_notify_reply_fr[] = 332 { 333 _FRAME(BIT16), /* input-method-ID */ 334 _FRAME(BIT16), /* input-context-ID */ 335 _FRAME(EOL), 336 }; 337 338 xim_externaldef XimFrameRec set_event_mask_fr[] = 339 { 340 _FRAME(BIT16), /* input-method-ID */ 341 _FRAME(BIT16), /* input-context-ID */ 342 _FRAME(BIT32), /* forward-event-mask */ 343 _FRAME(BIT32), /* synchronous-event-mask */ 344 _FRAME(EOL), 345 }; 346 347 xim_externaldef XimFrameRec encoding_negotiation_fr[] = 348 { 349 _FRAME(BIT16), /* input-method-ID */ 350 _BYTE_COUNTER(BIT16, 1), /* byte length of encodings listed by name */ 351 _FRAME(ITER), /* supported list of encoding in IM library */ 352 _FRAME(POINTER), 353 _PTR(str_fr), 354 _PAD4(1), 355 _BYTE_COUNTER(BIT16, 2), /* byte length of encodings listed by 356 detailed data */ 357 _PAD4(1), 358 _FRAME(ITER), /* list of encodings supported in the 359 IM library */ 360 _FRAME(POINTER), 361 _PTR(encodinginfo_fr), 362 _FRAME(EOL), 363 }; 364 365 xim_externaldef XimFrameRec encoding_negotiation_reply_fr[] = 366 { 367 _FRAME(BIT16), /* input-method-ID */ 368 _FRAME(BIT16), /* category of the encoding determined */ 369 _FRAME(BIT16), /* index of the encoding dterminated */ 370 _PAD4(1), 371 _FRAME(EOL), 372 }; 373 374 xim_externaldef XimFrameRec query_extension_fr[] = 375 { 376 _FRAME(BIT16), /* input-method-ID */ 377 _BYTE_COUNTER(BIT16, 1), /* byte length of extensions supported 378 by the IM library */ 379 _FRAME(ITER), /* extensions supported by the IM library */ 380 _FRAME(POINTER), 381 _PTR(str_fr), 382 _PAD4(1), 383 _FRAME(EOL), 384 }; 385 386 xim_externaldef XimFrameRec query_extension_reply_fr[] = 387 { 388 _FRAME(BIT16), /* input-method-ID */ 389 _BYTE_COUNTER(BIT16, 1), /* byte length of extensions supported 390 by the IM server */ 391 _FRAME(ITER), /* list of extensions supported by the 392 IM server */ 393 _FRAME(POINTER), 394 _PTR(ext_fr), 395 _FRAME(EOL), 396 }; 397 398 xim_externaldef XimFrameRec get_im_values_fr[] = 399 { 400 _FRAME(BIT16), /* input-method-ID */ 401 _BYTE_COUNTER(BIT16, 1), /* byte length of im-attribute-id */ 402 _FRAME(ITER), /* im-attribute-id */ 403 _FRAME(BIT16), 404 _PAD4(1), 405 _FRAME(EOL), 406 }; 407 408 xim_externaldef XimFrameRec get_im_values_reply_fr[] = 409 { 410 _FRAME(BIT16), /* input-method-ID */ 411 _BYTE_COUNTER(BIT16, 1), /* byte length of im-attribute returned */ 412 _FRAME(ITER), /* im-attribute returned */ 413 _FRAME(POINTER), 414 _PTR(ximattribute_fr), 415 _FRAME(EOL), 416 }; 417 418 xim_externaldef XimFrameRec create_ic_fr[] = 419 { 420 _FRAME(BIT16), /* input-method-ID */ 421 _BYTE_COUNTER(BIT16, 1), /* byte length of ic-attributes */ 422 _FRAME(ITER), /* ic-attributes */ 423 _FRAME(POINTER), 424 _PTR(xicattribute_fr), 425 _FRAME(EOL), 426 }; 427 428 xim_externaldef XimFrameRec create_ic_reply_fr[] = 429 { 430 _FRAME(BIT16), /* input-method-ID */ 431 _FRAME(BIT16), /* input-context-ID */ 432 _FRAME(EOL), 433 }; 434 435 xim_externaldef XimFrameRec destroy_ic_fr[] = 436 { 437 _FRAME(BIT16), /* input-method-ID */ 438 _FRAME(BIT16), /* input-context-ID */ 439 _FRAME(EOL), 440 }; 441 442 xim_externaldef XimFrameRec destroy_ic_reply_fr[] = 443 { 444 _FRAME(BIT16), /* input-method-ID */ 445 _FRAME(BIT16), /* input-context-ID */ 446 _FRAME(EOL), 447 }; 448 449 xim_externaldef XimFrameRec set_ic_values_fr[] = 450 { 451 _FRAME(BIT16), /* input-method-ID */ 452 _FRAME(BIT16), /* input-context-ID */ 453 _BYTE_COUNTER(BIT16, 2), /* byte length of ic-attributes */ 454 _PAD4(1), 455 _FRAME(ITER), /* ic-attribute */ 456 _FRAME(POINTER), 457 _PTR(xicattribute_fr), 458 _FRAME(EOL), 459 }; 460 461 xim_externaldef XimFrameRec set_ic_values_reply_fr[] = 462 { 463 _FRAME(BIT16), /* input-method-ID */ 464 _FRAME(BIT16), /* input-context-ID */ 465 _FRAME(EOL), 466 }; 467 468 xim_externaldef XimFrameRec get_ic_values_fr[] = 469 { 470 _FRAME(BIT16), /* input-method-ID */ 471 _FRAME(BIT16), /* input-context-ID */ 472 _BYTE_COUNTER(BIT16, 1), /* byte length of ic-attribute-id */ 473 _FRAME(ITER), /* ic-attribute */ 474 _FRAME(BIT16), 475 _PAD4(2), 476 _FRAME(EOL), 477 }; 478 479 xim_externaldef XimFrameRec get_ic_values_reply_fr[] = 480 { 481 _FRAME(BIT16), /* input-method-ID */ 482 _FRAME(BIT16), /* input-context-ID */ 483 _BYTE_COUNTER(BIT16, 2), /* byte length of ic-attribute */ 484 _PAD4(1), 485 _FRAME(ITER), /* ic-attribute */ 486 _FRAME(POINTER), 487 _PTR(xicattribute_fr), 488 _FRAME(EOL), 489 }; 490 491 xim_externaldef XimFrameRec set_ic_focus_fr[] = 492 { 493 _FRAME(BIT16), /* input-method-ID */ 494 _FRAME(BIT16), /* input-context-ID */ 495 _FRAME(EOL), 496 }; 497 498 xim_externaldef XimFrameRec unset_ic_focus_fr[] = 499 { 500 _FRAME(BIT16), /* input-method-ID */ 501 _FRAME(BIT16), /* input-context-ID */ 502 _FRAME(EOL), 503 }; 504 505 xim_externaldef XimFrameRec forward_event_fr[] = 506 { 507 _FRAME(BIT16), /* input-method-ID */ 508 _FRAME(BIT16), /* input-context-ID */ 509 _FRAME(BIT16), /* flag */ 510 _FRAME(BIT16), /* sequence number */ 511 _FRAME(EOL), 512 }; 513 514 xim_externaldef XimFrameRec wire_keyevent_fr[] = { 515 _FRAME(BIT8), /* type */ 516 _FRAME(BIT8), /* detail */ 517 _FRAME(BIT16), /* serial number */ 518 _FRAME(BIT32), /* time */ 519 _FRAME(BIT32), /* root */ 520 _FRAME(BIT32), /* window */ 521 _FRAME(BIT32), /* subwindow */ 522 _FRAME(BIT16), /* rootX */ 523 _FRAME(BIT16), /* rootY */ 524 _FRAME(BIT16), /* X */ 525 _FRAME(BIT16), /* Y */ 526 _FRAME(BIT16), /* state */ 527 _FRAME(BIT8), /* sameScreen */ 528 _FRAME(EOL), 529 }; 530 531 xim_externaldef XimFrameRec sync_fr[] = 532 { 533 _FRAME(BIT16), /* input-method-ID */ 534 _FRAME(BIT16), /* input-context-ID */ 535 _FRAME(EOL), 536 }; 537 538 xim_externaldef XimFrameRec sync_reply_fr[] = 539 { 540 _FRAME(BIT16), /* input-method-ID */ 541 _FRAME(BIT16), /* input-context-ID */ 542 _FRAME(EOL), 543 }; 544 545 #if 0 546 xim_externaldef XimFrameRec commit_fr[] = 547 { 548 _FRAME(BIT16), /* input-method-ID */ 549 _FRAME(BIT16), /* input-context-ID */ 550 _FRAME(BIT16), /* flag */ 551 _FRAME(BIT16), /* byte length of committed string */ 552 _FRAME(BARRAY), /* committed string */ 553 _PAD4(1), 554 _BYTE_COUNTER(BIT16, 1), /* byte length of keysym */ 555 _FRAME(ITER), /* keysym */ 556 _FRAME(BIT32), 557 _PAD4(1), 558 _FRAME(EOL), 559 }; 560 #endif 561 562 xim_externaldef XimFrameRec commit_chars_fr[] = 563 { 564 _FRAME(BIT16), /* input-method-ID */ 565 _FRAME(BIT16), /* input-context-ID */ 566 _FRAME(BIT16), /* flag */ 567 _FRAME(BIT16), /* byte length of committed string */ 568 _FRAME(BARRAY), /* committed string */ 569 _PAD4(1), 570 _FRAME(EOL), 571 }; 572 573 xim_externaldef XimFrameRec commit_both_fr[] = 574 { 575 _FRAME(BIT16), /* input-method-ID */ 576 _FRAME(BIT16), /* input-context-ID */ 577 _FRAME(BIT16), /* flag */ 578 _PAD4(1), /* unused */ 579 _FRAME(BIT32), /* keysym */ 580 _FRAME(BIT16), /* byte length of committed string */ 581 _FRAME(BARRAY), /* committed string */ 582 _PAD4(2), 583 _FRAME(EOL), 584 }; 585 586 xim_externaldef XimFrameRec reset_ic_fr[] = 587 { 588 _FRAME(BIT16), /* input-method-ID */ 589 _FRAME(BIT16), /* input-context-ID */ 590 _FRAME(EOL), 591 }; 592 593 xim_externaldef XimFrameRec reset_ic_reply_fr[] = 594 { 595 _FRAME(BIT16), /* input-method-ID */ 596 _FRAME(BIT16), /* input-context-ID */ 597 _FRAME(BIT16), /* byte length of committed string */ 598 _FRAME(BARRAY), /* committed string */ 599 _PAD4(2), 600 _FRAME(EOL), 601 }; 602 603 xim_externaldef XimFrameRec geometry_fr[] = 604 { 605 _FRAME(BIT16), /* input-method-ID */ 606 _FRAME(BIT16), /* input-context-ID */ 607 _FRAME(EOL), 608 }; 609 610 xim_externaldef XimFrameRec str_conversion_fr[] = 611 { 612 _FRAME(BIT16), /* input-method-ID */ 613 _FRAME(BIT16), /* input-context-ID */ 614 _FRAME(BIT32), /* XIMStringConversionPosition */ 615 _FRAME(BIT32), /* XIMStringConversionType */ 616 _FRAME(BIT32), /* XIMStringConversionOperation */ 617 _FRAME(BIT16), /* length to multiply the 618 XIMStringConversionType */ 619 _FRAME(BIT16), /* length of the string to be 620 substituted */ 621 #if 0 622 _FRAME(BARRAY), /* string */ 623 _PAD4(1), 624 #endif 625 _FRAME(EOL), 626 }; 627 628 xim_externaldef XimFrameRec str_conversion_reply_fr[] = 629 { 630 _FRAME(BIT16), /* input-method-ID */ 631 _FRAME(BIT16), /* input-context-ID */ 632 _FRAME(BIT32), /* XIMStringConversionFeedback */ 633 _FRAME(BIT16), /* length of the retrieved string */ 634 _FRAME(BARRAY), /* retrieved string */ 635 _PAD4(2), 636 _BYTE_COUNTER(BIT16, 2), /* number of feedback array */ 637 _PAD4(1), 638 _FRAME(ITER), /* feedback array */ 639 _FRAME(BIT32), 640 _FRAME(EOL), 641 }; 642 643 xim_externaldef XimFrameRec preedit_start_fr[] = 644 { 645 _FRAME(BIT16), /* input-method-ID */ 646 _FRAME(BIT16), /* input-context-ID */ 647 _FRAME(EOL), 648 }; 649 650 xim_externaldef XimFrameRec preedit_start_reply_fr[] = 651 { 652 _FRAME(BIT16), /* input-method-ID */ 653 _FRAME(BIT16), /* input-context-ID */ 654 _FRAME(BIT32), /* return value */ 655 _FRAME(EOL), 656 }; 657 658 xim_externaldef XimFrameRec preedit_draw_fr[] = 659 { 660 _FRAME(BIT16), /* input-method-ID */ 661 _FRAME(BIT16), /* input-context-ID */ 662 _FRAME(BIT32), /* caret */ 663 _FRAME(BIT32), /* chg_first */ 664 _FRAME(BIT32), /* chg_length */ 665 _FRAME(BIT32), /* status */ 666 _FRAME(BIT16), /* length of preedit string */ 667 _FRAME(BARRAY), /* preedit string */ 668 _PAD4(2), 669 _BYTE_COUNTER(BIT16, 2), /* number of feedback array */ 670 _PAD4(1), 671 _FRAME(ITER), /* feedback array */ 672 _FRAME(BIT32), 673 _FRAME(EOL), 674 }; 675 676 xim_externaldef XimFrameRec preedit_caret_fr[] = 677 { 678 _FRAME(BIT16), /* input-method-ID */ 679 _FRAME(BIT16), /* input-context-ID */ 680 _FRAME(BIT32), /* position */ 681 _FRAME(BIT32), /* direction */ 682 _FRAME(BIT32), /* style */ 683 _FRAME(EOL), 684 }; 685 686 xim_externaldef XimFrameRec preedit_caret_reply_fr[] = 687 { 688 _FRAME(BIT16), /* input-method-ID */ 689 _FRAME(BIT16), /* input-context-ID */ 690 _FRAME(BIT32), /* position */ 691 _FRAME(EOL), 692 }; 693 694 xim_externaldef XimFrameRec preedit_done_fr[] = 695 { 696 _FRAME(BIT16), /* input-method-ID */ 697 _FRAME(BIT16), /* input-context-ID */ 698 _FRAME(EOL), 699 }; 700 701 xim_externaldef XimFrameRec status_start_fr[] = 702 { 703 _FRAME(BIT16), /* input-method-ID */ 704 _FRAME(BIT16), /* input-context-ID */ 705 _FRAME(EOL), 706 }; 707 708 xim_externaldef XimFrameRec status_draw_text_fr[] = 709 { 710 _FRAME(BIT16), /* input-method-ID */ 711 _FRAME(BIT16), /* input-context-ID */ 712 _FRAME(BIT32), /* type */ 713 _FRAME(BIT32), /* status */ 714 _FRAME(BIT16), /* length of status string */ 715 _FRAME(BARRAY), /* status string */ 716 _PAD4(2), 717 _BYTE_COUNTER(BIT16, 2), /* number of feedback array */ 718 _PAD4(1), 719 _FRAME(ITER), /* feedback array */ 720 _FRAME(BIT32), 721 _FRAME(EOL), 722 }; 723 724 xim_externaldef XimFrameRec status_draw_bitmap_fr[] = 725 { 726 _FRAME(BIT16), /* input-method-ID */ 727 _FRAME(BIT16), /* input-context-ID */ 728 _FRAME(BIT32), /* type */ 729 _FRAME(BIT32), /* pixmap data */ 730 _FRAME(EOL), 731 }; 732 733 xim_externaldef XimFrameRec status_done_fr[] = 734 { 735 _FRAME(BIT16), /* input-method-ID */ 736 _FRAME(BIT16), /* input-context-ID */ 737 _FRAME(EOL), 738 }; 739 740 xim_externaldef XimFrameRec ext_set_event_mask_fr[] = 741 { 742 _FRAME(BIT16), /* input-method-ID */ 743 _FRAME(BIT16), /* input-context-ID */ 744 _FRAME(BIT32), /* filter-event-mask */ 745 _FRAME(BIT32), /* intercept-event-mask */ 746 _FRAME(BIT32), /* select-event-mask */ 747 _FRAME(BIT32), /* forward-event-mask */ 748 _FRAME(BIT32), /* synchronous-event-mask */ 749 _FRAME(EOL), 750 }; 751 752 xim_externaldef XimFrameRec ext_forward_keyevent_fr[] = 753 { 754 _FRAME(BIT16), /* input-method-ID */ 755 _FRAME(BIT16), /* input-context-ID */ 756 _FRAME(BIT16), /* flag */ 757 _FRAME(BIT16), /* sequence number */ 758 _FRAME(BIT8), /* xEvent.u.u.type */ 759 _FRAME(BIT8), /* keycode */ 760 _FRAME(BIT16), /* state */ 761 _FRAME(BIT32), /* time */ 762 _FRAME(BIT32), /* window */ 763 _FRAME(EOL), 764 }; 765 766 xim_externaldef XimFrameRec ext_move_fr[] = 767 { 768 _FRAME(BIT16), /* input-method-ID */ 769 _FRAME(BIT16), /* input-context-ID */ 770 _FRAME(BIT16), /* X */ 771 _FRAME(BIT16), /* Y */ 772 _FRAME(EOL), 773 }; 774