?? i18nimproto.c
字號:
/******************************************************************Copyright 1993, 1994 by Digital Equipment Corporation, Maynard, Massachusetts,Copyright 1993, 1994 by Hewlett-Packard Company Copyright 1994, 1995 by Sun Microsystems, Inc. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and thatboth that copyright notice and this permission notice appear in supporting documentation, and that the names of Digital or MIT not beused in advertising or publicity pertaining to distribution of thesoftware without specific, written prior permission. DIGITAL AND HEWLETT-PACKARD COMPANY DISCLAIMS ALL WARRANTIES WITH REGARDTO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY ANDFITNESS, IN NO EVENT SHALL DIGITAL AND HEWLETT-PACKARD COMPANY BE LIABLEFOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVERRESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OFCONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR INCONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Author: Hiroyuki Miyamoto Digital Equipment Corporation miyamoto@jrd.dec.com Hidetoshi Tajima(tajima@Eng.Sun.COM) Sun Microsystems, Inc. This version tidied and debugged by Steve Underwood May 1999 ******************************************************************//* Protocol Packet frames */#include "FrameMgr.h"/* Data type definitions */static XimFrameRec ximattr_fr[] ={ _FRAME(BIT16), /* attribute ID */ _FRAME(BIT16), /* type of the value */ _FRAME(BIT16), /* length of im-attribute */ _FRAME(BARRAY), /* im-attribute */ _PAD4(2), _FRAME(EOL),};static XimFrameRec xicattr_fr[] ={ _FRAME(BIT16), /* attribute ID */ _FRAME(BIT16), /* type of the value */ _FRAME(BIT16), /* length of ic-attribute */ _FRAME(BARRAY), /* ic-attribute */ _PAD4(2), _FRAME(EOL),};static XimFrameRec ximattribute_fr[] ={ _FRAME(BIT16), /* attribute ID */ _FRAME(BIT16), /* value length */ _FRAME(BARRAY), /* value */ _PAD4(1), _FRAME(EOL),};static XimFrameRec xicattribute_fr[] ={ _FRAME(BIT16), /* attribute ID */ _FRAME(BIT16), /* value length */ _FRAME(BARRAY), /* value */ _PAD4(1), _FRAME(EOL),};static XimFrameRec ximtriggerkey_fr[] ={ _FRAME(BIT32), /* keysym */ _FRAME(BIT32), /* modifier */ _FRAME(BIT32), /* modifier mask */ _FRAME(EOL),};static XimFrameRec encodinginfo_fr[] ={ _FRAME(BIT16), /* length of encoding info */ _FRAME(BARRAY), /* encoding info */ _PAD4(2), _FRAME(EOL),};static XimFrameRec str_fr[] ={ _FRAME(BIT8), /* number of byte */ _FRAME(BARRAY), /* string */ _FRAME(EOL),};static XimFrameRec xpcs_fr[] ={ _FRAME(BIT16), /* length of string in bytes */ _FRAME(BARRAY), /* string */ _PAD4(2),};static XimFrameRec ext_fr[] ={ _FRAME(BIT16), /* extension major-opcode */ _FRAME(BIT16), /* extension minor-opcode */ _FRAME(BIT16), /* length of extension name */ _FRAME(BARRAY), /* extension name */ _PAD4(2), _FRAME(EOL),};static XimFrameRec inputstyle_fr[] ={ _FRAME(BIT32), /* inputstyle */ _FRAME(EOL),};/* Protocol definitions */xim_externaldef XimFrameRec attr_head_fr[] ={ _FRAME(BIT16), /* attribute id */ _FRAME(BIT16), /* attribute length */ _FRAME(EOL),};xim_externaldef XimFrameRec short_fr[] ={ _FRAME(BIT16), /* value */ _FRAME(EOL),};xim_externaldef XimFrameRec long_fr[] ={ _FRAME(BIT32), /* value */ _FRAME(EOL),};xim_externaldef XimFrameRec xrectangle_fr[] ={ _FRAME(BIT16), /* x */ _FRAME(BIT16), /* y */ _FRAME(BIT16), /* width */ _FRAME(BIT16), /* height */ _FRAME(EOL),};xim_externaldef XimFrameRec xpoint_fr[] ={ _FRAME(BIT16), /* x */ _FRAME(BIT16), /* y */ _FRAME(EOL),};xim_externaldef XimFrameRec fontset_fr[] ={ _FRAME(BIT16), /* length of base font name */ _FRAME(BARRAY), /* base font name list */ _PAD4(2), /* unused */ _FRAME(EOL),};xim_externaldef XimFrameRec input_styles_fr[] ={ _FRAME(BIT16), /* number of list */ _PAD4(1), /* unused */ _FRAME(ITER), /* XIMStyle list */ _FRAME(POINTER), _PTR(inputstyle_fr), _FRAME(EOL),};xim_externaldef XimFrameRec packet_header_fr[] ={ _FRAME(BIT8), /* major-opcode */ _FRAME(BIT8), /* minor-opcode */ _FRAME(BIT16), /* length */ _FRAME(EOL),};xim_externaldef XimFrameRec error_fr[] ={ _FRAME(BIT16), /* input-method-ID */ _FRAME(BIT16), /* input-context-ID */ _FRAME(BIT16), /* flag */ _FRAME(BIT16), /* Error Code */ _FRAME(BIT16), /* length of error detail */ _FRAME(BIT16), /* type of error detail */ _FRAME(BARRAY), /* error detail */ _PAD4(1), _FRAME(EOL),};xim_externaldef XimFrameRec connect_fr[] ={ _FRAME(BIT8), /* byte order */ _PAD2(1), /* unused */ _FRAME(BIT16), /* client-major-protocol-version */ _FRAME(BIT16), /* client-minor-protocol-version */ _BYTE_COUNTER(BIT16, 1), /* length of client-auth-protocol-names */ _FRAME(ITER), /* client-auth-protocol-names */ _FRAME(POINTER), _PTR(xpcs_fr), _FRAME(EOL),};xim_externaldef XimFrameRec connect_reply_fr[] ={ _FRAME(BIT16), /* server-major-protocol-version */ _FRAME(BIT16), /* server-minor-protocol-version */ _FRAME(EOL),};xim_externaldef XimFrameRec auth_required_fr[] ={ _FRAME(BIT8), /* auth-protocol-index */ _FRAME(BIT8), /* auth-data1 */ _FRAME(BARRAY), /* auth-data2 */ _PAD4(3), _FRAME(EOL),};xim_externaldef XimFrameRec auth_reply_fr[] ={ _FRAME(BIT8), _FRAME(BARRAY), _PAD4(2), _FRAME(EOL),};xim_externaldef XimFrameRec auth_next_fr[] ={ _FRAME(BIT8), /* auth-data1 */ _FRAME(BARRAY), /* auth-data2 */ _PAD4(2), _FRAME(EOL),};xim_externaldef XimFrameRec auth_setup_fr[] ={ _BYTE_COUNTER(BIT16, 2), /* number of client-auth-protocol-names */ _PAD4(1), /* unused */ _FRAME(ITER), /* server-auth-protocol-names */ _FRAME(POINTER), _PTR(xpcs_fr), _FRAME(EOL),};xim_externaldef XimFrameRec auth_ng_fr[] ={ _FRAME(EOL),};xim_externaldef XimFrameRec disconnect_fr[] ={ _FRAME(EOL),};xim_externaldef XimFrameRec disconnect_reply_fr[] ={ _FRAME(EOL),};xim_externaldef XimFrameRec open_fr[] ={ _FRAME(POINTER), /* locale name */ _PTR(str_fr), _PAD4(1), _FRAME(EOL),};xim_externaldef XimFrameRec open_reply_fr[] ={ _FRAME(BIT16), /* input-method-ID */ _BYTE_COUNTER(BIT16, 1), /* byte length of IM attributes supported */ _FRAME(ITER), /* IM attribute supported */ _FRAME(POINTER), _PTR(ximattr_fr), _BYTE_COUNTER(BIT16, 2), /* number of IC attribute supported */ _PAD4(1), /* unused */ _FRAME(ITER), /* IC attribute supported */ _FRAME(POINTER), _PTR(xicattr_fr), _FRAME(EOL),};xim_externaldef XimFrameRec close_fr[] ={ _FRAME(BIT16), /* input-method-ID */ _PAD4(1), /* unused */ _FRAME(EOL),};xim_externaldef XimFrameRec close_reply_fr[] ={ _FRAME(BIT16), /* input-method-ID */ _PAD4(1), /* unused */ _FRAME(EOL),};xim_externaldef XimFrameRec register_triggerkeys_fr[] ={ _FRAME(BIT16), /* input-method-ID */ _PAD4(1), /* unused */ _BYTE_COUNTER(BIT32, 1), /* byte length of on-keys */ _FRAME(ITER), /* on-keys list */ _FRAME(POINTER), _PTR(ximtriggerkey_fr), _BYTE_COUNTER(BIT32, 1), /* byte length of off-keys */ _FRAME(ITER), /* off-keys list */ _FRAME(POINTER), _PTR(ximtriggerkey_fr), _FRAME(EOL),};xim_externaldef XimFrameRec trigger_notify_fr[] ={ _FRAME(BIT16), /* input-mehotd-ID */ _FRAME(BIT16), /* input-context-ID */ _FRAME(BIT32), /* flag */ _FRAME(BIT32), /* index of keys list */ _FRAME(BIT32), /* client-select-event-mask */ _FRAME(EOL),};xim_externaldef XimFrameRec trigger_notify_reply_fr[] ={ _FRAME(BIT16), /* input-method-ID */ _FRAME(BIT16), /* input-context-ID */ _FRAME(EOL),};xim_externaldef XimFrameRec set_event_mask_fr[] ={ _FRAME(BIT16), /* input-method-ID */ _FRAME(BIT16), /* input-context-ID */ _FRAME(BIT32), /* forward-event-mask */ _FRAME(BIT32), /* synchronous-event-mask */ _FRAME(EOL),};xim_externaldef XimFrameRec encoding_negotiation_fr[] ={ _FRAME(BIT16), /* input-method-ID */ _BYTE_COUNTER(BIT16, 1), /* byte length of encodings listed by name */ _FRAME(ITER), /* supported list of encoding in IM library */ _FRAME(POINTER), _PTR(str_fr), _PAD4(1), _BYTE_COUNTER(BIT16, 2), /* byte length of encodings listed by detailed data */ _PAD4(1), _FRAME(ITER), /* list of encodings supported in the IM library */ _FRAME(POINTER), _PTR(encodinginfo_fr), _FRAME(EOL),};xim_externaldef XimFrameRec encoding_negotiation_reply_fr[] ={ _FRAME(BIT16), /* input-method-ID */ _FRAME(BIT16), /* category of the encoding determined */ _FRAME(BIT16), /* index of the encoding dterminated */ _PAD4(1), _FRAME(EOL),};xim_externaldef XimFrameRec query_extension_fr[] ={ _FRAME(BIT16), /* input-method-ID */ _BYTE_COUNTER(BIT16, 1), /* byte length of extensions supported by the IM library */ _FRAME(ITER), /* extensions supported by the IM library */
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -