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(BIT16), /* extension major-opcode */ 110 _FRAME(BIT16), /* extension minor-opcode */ 111 _FRAME(BIT16), /* length of extension name */ 112 _FRAME(BARRAY), /* extension name */ 113 _PAD4(2), 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 sync_fr[] = 515 { 516 _FRAME(BIT16), /* input-method-ID */ 517 _FRAME(BIT16), /* input-context-ID */ 518 _FRAME(EOL), 519 }; 520 521 xim_externaldef XimFrameRec sync_reply_fr[] = 522 { 523 _FRAME(BIT16), /* input-method-ID */ 524 _FRAME(BIT16), /* input-context-ID */ 525 _FRAME(EOL), 526 }; 527 528 #if 0 529 xim_externaldef XimFrameRec commit_fr[] = 530 { 531 _FRAME(BIT16), /* input-method-ID */ 532 _FRAME(BIT16), /* input-context-ID */ 533 _FRAME(BIT16), /* flag */ 534 _FRAME(BIT16), /* byte length of committed string */ 535 _FRAME(BARRAY), /* committed string */ 536 _PAD4(1), 537 _BYTE_COUNTER(BIT16, 1), /* byte length of keysym */ 538 _FRAME(ITER), /* keysym */ 539 _FRAME(BIT32), 540 _PAD4(1), 541 _FRAME(EOL), 542 }; 543 #endif 544 545 xim_externaldef XimFrameRec commit_chars_fr[] = 546 { 547 _FRAME(BIT16), /* input-method-ID */ 548 _FRAME(BIT16), /* input-context-ID */ 549 _FRAME(BIT16), /* flag */ 550 _FRAME(BIT16), /* byte length of committed string */ 551 _FRAME(BARRAY), /* committed string */ 552 _PAD4(1), 553 _FRAME(EOL), 554 }; 555 556 xim_externaldef XimFrameRec commit_both_fr[] = 557 { 558 _FRAME(BIT16), /* input-method-ID */ 559 _FRAME(BIT16), /* input-context-ID */ 560 _FRAME(BIT16), /* flag */ 561 _PAD4(1), /* unused */ 562 _FRAME(BIT32), /* keysym */ 563 _FRAME(BIT16), /* byte length of committed string */ 564 _FRAME(BARRAY), /* committed string */ 565 _PAD4(2), 566 _FRAME(EOL), 567 }; 568 569 xim_externaldef XimFrameRec reset_ic_fr[] = 570 { 571 _FRAME(BIT16), /* input-method-ID */ 572 _FRAME(BIT16), /* input-context-ID */ 573 _FRAME(EOL), 574 }; 575 576 xim_externaldef XimFrameRec reset_ic_reply_fr[] = 577 { 578 _FRAME(BIT16), /* input-method-ID */ 579 _FRAME(BIT16), /* input-context-ID */ 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 geometry_fr[] = 587 { 588 _FRAME(BIT16), /* input-method-ID */ 589 _FRAME(BIT16), /* input-context-ID */ 590 _FRAME(EOL), 591 }; 592 593 xim_externaldef XimFrameRec str_conversion_fr[] = 594 { 595 _FRAME(BIT16), /* input-method-ID */ 596 _FRAME(BIT16), /* input-context-ID */ 597 _FRAME(BIT32), /* XIMStringConversionPosition */ 598 _FRAME(BIT32), /* XIMStringConversionType */ 599 _FRAME(BIT32), /* XIMStringConversionOperation */ 600 _FRAME(BIT16), /* length to multiply the 601 XIMStringConversionType */ 602 _FRAME(BIT16), /* length of the string to be 603 substituted */ 604 #if 0 605 _FRAME(BARRAY), /* string */ 606 _PAD4(1), 607 #endif 608 _FRAME(EOL), 609 }; 610 611 xim_externaldef XimFrameRec str_conversion_reply_fr[] = 612 { 613 _FRAME(BIT16), /* input-method-ID */ 614 _FRAME(BIT16), /* input-context-ID */ 615 _FRAME(BIT32), /* XIMStringConversionFeedback */ 616 _FRAME(BIT16), /* length of the retrieved string */ 617 _FRAME(BARRAY), /* retrieved string */ 618 _PAD4(2), 619 _BYTE_COUNTER(BIT16, 2), /* number of feedback array */ 620 _PAD4(1), 621 _FRAME(ITER), /* feedback array */ 622 _FRAME(BIT32), 623 _FRAME(EOL), 624 }; 625 626 xim_externaldef XimFrameRec preedit_start_fr[] = 627 { 628 _FRAME(BIT16), /* input-method-ID */ 629 _FRAME(BIT16), /* input-context-ID */ 630 _FRAME(EOL), 631 }; 632 633 xim_externaldef XimFrameRec preedit_start_reply_fr[] = 634 { 635 _FRAME(BIT16), /* input-method-ID */ 636 _FRAME(BIT16), /* input-context-ID */ 637 _FRAME(BIT32), /* return value */ 638 _FRAME(EOL), 639 }; 640 641 xim_externaldef XimFrameRec preedit_draw_fr[] = 642 { 643 _FRAME(BIT16), /* input-method-ID */ 644 _FRAME(BIT16), /* input-context-ID */ 645 _FRAME(BIT32), /* caret */ 646 _FRAME(BIT32), /* chg_first */ 647 _FRAME(BIT32), /* chg_length */ 648 _FRAME(BIT32), /* status */ 649 _FRAME(BIT16), /* length of preedit string */ 650 _FRAME(BARRAY), /* preedit string */ 651 _PAD4(2), 652 _BYTE_COUNTER(BIT16, 2), /* number of feedback array */ 653 _PAD4(1), 654 _FRAME(ITER), /* feedback array */ 655 _FRAME(BIT32), 656 _FRAME(EOL), 657 }; 658 659 xim_externaldef XimFrameRec preedit_caret_fr[] = 660 { 661 _FRAME(BIT16), /* input-method-ID */ 662 _FRAME(BIT16), /* input-context-ID */ 663 _FRAME(BIT32), /* position */ 664 _FRAME(BIT32), /* direction */ 665 _FRAME(BIT32), /* style */ 666 _FRAME(EOL), 667 }; 668 669 xim_externaldef XimFrameRec preedit_caret_reply_fr[] = 670 { 671 _FRAME(BIT16), /* input-method-ID */ 672 _FRAME(BIT16), /* input-context-ID */ 673 _FRAME(BIT32), /* position */ 674 _FRAME(EOL), 675 }; 676 677 xim_externaldef XimFrameRec preedit_done_fr[] = 678 { 679 _FRAME(BIT16), /* input-method-ID */ 680 _FRAME(BIT16), /* input-context-ID */ 681 _FRAME(EOL), 682 }; 683 684 xim_externaldef XimFrameRec status_start_fr[] = 685 { 686 _FRAME(BIT16), /* input-method-ID */ 687 _FRAME(BIT16), /* input-context-ID */ 688 _FRAME(EOL), 689 }; 690 691 xim_externaldef XimFrameRec status_draw_text_fr[] = 692 { 693 _FRAME(BIT16), /* input-method-ID */ 694 _FRAME(BIT16), /* input-context-ID */ 695 _FRAME(BIT32), /* type */ 696 _FRAME(BIT32), /* status */ 697 _FRAME(BIT16), /* length of status string */ 698 _FRAME(BARRAY), /* status string */ 699 _PAD4(2), 700 _BYTE_COUNTER(BIT16, 2), /* number of feedback array */ 701 _PAD4(1), 702 _FRAME(ITER), /* feedback array */ 703 _FRAME(BIT32), 704 _FRAME(EOL), 705 }; 706 707 xim_externaldef XimFrameRec status_draw_bitmap_fr[] = 708 { 709 _FRAME(BIT16), /* input-method-ID */ 710 _FRAME(BIT16), /* input-context-ID */ 711 _FRAME(BIT32), /* type */ 712 _FRAME(BIT32), /* pixmap data */ 713 _FRAME(EOL), 714 }; 715 716 xim_externaldef XimFrameRec status_done_fr[] = 717 { 718 _FRAME(BIT16), /* input-method-ID */ 719 _FRAME(BIT16), /* input-context-ID */ 720 _FRAME(EOL), 721 }; 722 723 xim_externaldef XimFrameRec ext_set_event_mask_fr[] = 724 { 725 _FRAME(BIT16), /* input-method-ID */ 726 _FRAME(BIT16), /* input-context-ID */ 727 _FRAME(BIT32), /* filter-event-mask */ 728 _FRAME(BIT32), /* intercept-event-mask */ 729 _FRAME(BIT32), /* select-event-mask */ 730 _FRAME(BIT32), /* forward-event-mask */ 731 _FRAME(BIT32), /* synchronous-event-mask */ 732 _FRAME(EOL), 733 }; 734 735 xim_externaldef XimFrameRec ext_forward_keyevent_fr[] = 736 { 737 _FRAME(BIT16), /* input-method-ID */ 738 _FRAME(BIT16), /* input-context-ID */ 739 _FRAME(BIT16), /* flag */ 740 _FRAME(BIT16), /* sequence number */ 741 _FRAME(BIT8), /* xEvent.u.u.type */ 742 _FRAME(BIT8), /* keycode */ 743 _FRAME(BIT16), /* state */ 744 _FRAME(BIT32), /* time */ 745 _FRAME(BIT32), /* window */ 746 _FRAME(EOL), 747 }; 748 749 xim_externaldef XimFrameRec ext_move_fr[] = 750 { 751 _FRAME(BIT16), /* input-method-ID */ 752 _FRAME(BIT16), /* input-context-ID */ 753 _FRAME(BIT16), /* X */ 754 _FRAME(BIT16), /* Y */ 755 _FRAME(EOL), 756 }; 757