Lines Matching refs:im
112 Xim im,
115 char *server_name = im->core.im_name;
150 Xim im,
277 Xim im,
280 Display *display = im->core.display;
294 if(!(lcd = im->core.lcd))
307 if(!_XimCheckServerName(im, str)) {
346 if((locale = _XimCheckLocaleName(im, address, strlen(address), locale_name,
351 im->private.proto.locale_name = locale;
374 if( _XimTransportRec[i].config(im, trans_addr) ) {
393 Xim im)
395 Display *display = im->core.display;
427 if(_XimPreConnectionIM(im, atoms[i]))
435 im->private.proto.im_window = im_window;
436 im->private.proto.fabricated_serial = 0;
437 im->private.proto.fabricated_time = 0;
438 im->private.proto.enable_fabricated_order = True;
443 im->private.proto.enable_fabricated_order = False;
451 Xim im,
456 if (!IS_USE_AUTHORIZATION_FUNC(im)) {
469 Xim im,
482 Xim im,
495 Xim im,
508 Xim im,
519 Xim im,
534 Xim im,
545 Xim im)
552 (void)_XimWrite(im, len, (XPointer)buf);
553 _XimFlush(im);
559 Xim im,
572 Xim im)
589 if(!(_XimConnect(im))) /* Transport Connect */
592 if(!_XimDispatchInit(im))
595 _XimRegProtoIntrCallback(im, XIM_ERROR, 0, _XimErrorCallback, (XPointer)im);
597 if(!_XimGetAuthProtocolNames(im, &buf_s[4], &num, &len))
600 im->private.proto.protocol_major_version = PROTOCOLMAJORVERSION;
601 im->private.proto.protocol_minor_version = PROTOCOLMINORVERSION;
615 wait_mode = (IS_USE_AUTHORIZATION_FUNC(im)) ? CLIENT_WAIT1 : CLIENT_WAIT2;
619 if (!(_XimWrite(im, len, (XPointer)buf)))
621 _XimFlush(im);
623 ret_code = _XimRead(im, &len, reply, buf_size, _XimAllRecv, 0);
632 ret_code = _XimRead(im, &len, preply, buf_size, _XimAllRecv, 0);
646 ret = _XimClientAuthCheck(im, (XPointer)buf_s);
650 if (!(_XimSetAuthReplyData(im,
652 _XimAuthNG(im);
658 if (!(_XimSetAuthNextData(im,
660 _XimAuthNG(im);
665 _XimAuthNG(im);
671 _XimAuthNG(im);
678 if (!(_XimCheckAuthSetupData(im, (XPointer)buf_s))) {
679 _XimAuthNG(im);
684 if (!(_XimSetAuthRequiredData(im,
686 _XimAuthNG(im);
691 if (!(_XimCheckAuthNextData(im, (XPointer)buf_s))) {
692 _XimAuthNG(im);
697 if (!(_XimSetAuthRequiredData(im,
699 _XimAuthNG(im);
708 _XimAuthNG(im);
716 if (!( buf_s[0] == im->private.proto.protocol_major_version
717 && buf_s[1] == im->private.proto.protocol_minor_version)) {
724 MARK_SERVER_CONNECTED(im);
726 _XimRegProtoIntrCallback(im, XIM_REGISTER_TRIGGERKEYS, 0,
727 _XimRegisterTriggerKeysCallback, (XPointer)im);
733 Xim im,
752 Xim im)
763 if (IS_SERVER_CONNECTED(im)) {
765 if (!(_XimWrite(im, len, (XPointer)buf)))
767 _XimFlush(im);
769 ret_code = _XimRead(im, &len, (XPointer)reply, buf_size,
775 ret_code = _XimRead(im, &len, preply, buf_size,
785 if (!(_XimShutdown(im))) /* Transport shutdown */
792 Xim im,
811 Xim im)
826 locale_name = im->private.proto.locale_name;
837 if (!(_XimWrite(im, len, (XPointer)buf)))
839 _XimFlush(im);
841 ret_code = _XimRead(im, &len, reply, buf_size,
851 ret_code = _XimRead(im, &len, preply, buf_size,
862 _XimProcError(im, 0, (XPointer)&buf_s[3]);
868 im->private.proto.imid = buf_s[0]; /* imid */
870 if (!(_XimGetAttributeID(im, &buf_s[1]))) {
878 if (!(_XimSetInnerIMResourceList(&(im->private.proto.im_inner_resources),
879 &(im->private.proto.im_num_inner_resources))))
882 if (!(_XimSetInnerICResourceList(&(im->private.proto.ic_inner_resources),
883 &(im->private.proto.ic_num_inner_resources))))
886 _XimSetIMMode(im->core.im_resources, im->core.im_num_resources);
887 _XimSetIMMode(im->private.proto.im_inner_resources,
888 im->private.proto.im_num_inner_resources);
891 _XimRegProtoIntrCallback(im, XIM_SET_EVENT_MASK, 0,
892 _XimSetEventMaskCallback, (XPointer)im);
893 _XimRegProtoIntrCallback(im, XIM_FORWARD_EVENT, 0,
894 _XimForwardEventCallback, (XPointer)im);
895 _XimRegProtoIntrCallback(im, XIM_COMMIT, 0,
896 _XimCommitCallback, (XPointer)im);
897 _XimRegProtoIntrCallback(im, XIM_SYNC, 0,
898 _XimSyncCallback, (XPointer)im);
900 if(!_XimExtension(im))
904 _XimRegisterDispatcher(im, _XimCbDispatch, (XPointer)im);
911 Xim im,
923 && (imid == im->private.proto.imid))
928 && (imid == im->private.proto.imid))
935 Xim im)
947 if (!IS_SERVER_CONNECTED(im))
950 buf_s[0] = im->private.proto.imid; /* imid */
956 if (!(_XimWrite(im, len, (XPointer)buf)))
958 _XimFlush(im);
960 ret_code = _XimRead(im, &len, (XPointer)reply, buf_size,
970 ret_code = _XimRead(im, &len, preply, buf_size, _XimCloseCheck, 0);
980 _XimProcError(im, 0, (XPointer)&buf_s[3]);
993 Xim im)
997 Xfree(im->private.proto.im_onkeylist);
998 im->private.proto.im_onkeylist = NULL;
1000 Xfree(im->private.proto.im_offkeylist);
1001 im->private.proto.im_offkeylist = NULL;
1003 if (im->private.proto.intrproto) {
1004 _XimFreeProtoIntrCallback(im);
1005 im->private.proto.intrproto = NULL;
1008 Xfree(im->private.proto.im_inner_resources);
1009 im->private.proto.im_inner_resources = NULL;
1011 Xfree(im->private.proto.ic_inner_resources);
1012 im->private.proto.ic_inner_resources = NULL;
1014 Xfree(im->private.proto.hold_data);
1015 im->private.proto.hold_data = NULL;
1017 Xfree(im->private.proto.locale_name);
1018 im->private.proto.locale_name = NULL;
1020 if (im->private.proto.ctom_conv) {
1021 _XlcCloseConverter(im->private.proto.ctom_conv);
1022 im->private.proto.ctom_conv = NULL;
1024 if (im->private.proto.ctow_conv) {
1025 _XlcCloseConverter(im->private.proto.ctow_conv);
1026 im->private.proto.ctow_conv = NULL;
1028 if (im->private.proto.ctoutf8_conv) {
1029 _XlcCloseConverter(im->private.proto.ctoutf8_conv);
1030 im->private.proto.ctoutf8_conv = NULL;
1032 if (im->private.proto.cstomb_conv) {
1033 _XlcCloseConverter(im->private.proto.cstomb_conv);
1034 im->private.proto.cstomb_conv = NULL;
1036 if (im->private.proto.cstowc_conv) {
1037 _XlcCloseConverter(im->private.proto.cstowc_conv);
1038 im->private.proto.cstowc_conv = NULL;
1040 if (im->private.proto.cstoutf8_conv) {
1041 _XlcCloseConverter(im->private.proto.cstoutf8_conv);
1042 im->private.proto.cstoutf8_conv = NULL;
1044 if (im->private.proto.ucstoc_conv) {
1045 _XlcCloseConverter(im->private.proto.ucstoc_conv);
1046 im->private.proto.ucstoc_conv = NULL;
1048 if (im->private.proto.ucstoutf8_conv) {
1049 _XlcCloseConverter(im->private.proto.ucstoutf8_conv);
1050 im->private.proto.ucstoutf8_conv = NULL;
1054 if (!IS_SERVER_CONNECTED(im) && IS_RECONNECTABLE(im)) {
1059 Xfree(im->private.proto.saved_imvalues);
1060 im->private.proto.saved_imvalues = NULL;
1062 Xfree(im->private.proto.default_styles);
1063 im->private.proto.default_styles = NULL;
1067 Xfree(im->core.res_name);
1068 im->core.res_name = NULL;
1070 Xfree(im->core.res_class);
1071 im->core.res_class = NULL;
1073 Xfree(im->core.im_values_list);
1074 im->core.im_values_list = NULL;
1076 Xfree(im->core.ic_values_list);
1077 im->core.ic_values_list = NULL;
1079 Xfree(im->core.im_name);
1080 im->core.im_name = NULL;
1082 Xfree(im->core.styles);
1083 im->core.styles = NULL;
1085 Xfree(im->core.im_resources);
1086 im->core.im_resources = NULL;
1088 Xfree(im->core.ic_resources);
1089 im->core.ic_resources = NULL;
1098 Xim im = (Xim)xim;
1103 ic = im->core.ic_chain;
1108 if (!(!IS_SERVER_CONNECTED(im) && IS_RECONNECTABLE(im))) {
1117 if (!(!IS_SERVER_CONNECTED(im) && IS_RECONNECTABLE(im)))
1118 im->core.ic_chain = NULL;
1120 im->core.ic_chain = NULL;
1123 _XimUnregisterServerFilter(im);
1124 _XimResetIMInstantiateCallback(im);
1125 status = (Status)_XimClose(im);
1126 status = (Status)_XimDisconnect(im) && status;
1127 _XimProtoIMFree(im);
1129 if (!IS_SERVER_CONNECTED(im) && IS_RECONNECTABLE(im)) {
1130 _XimReconnectModeSetAttr(im);
1131 for (ic = im->core.ic_chain; ic; ic = ic->core.next) {
1137 _XimDestroyIMStructureList(im);
1160 Xim im,
1170 if (quark_list = im->private.proto.saved_imvalues) {
1171 num_quark = im->private.proto.num_saved_imvalues;
1179 im->private.proto.saved_imvalues = quark_list;
1180 im->private.proto.num_saved_imvalues = num_quark;
1187 im->private.proto.saved_imvalues = quark_list;
1188 im->private.proto.num_saved_imvalues = num_quark;
1198 im->private.proto.saved_imvalues = quark_list;
1199 im->private.proto.num_saved_imvalues = n;
1209 Xim im,
1216 _XimGetCurrentIMValues(im, &im_values);
1217 name = _XimSetIMValueData(im, (XPointer)&im_values, values,
1218 im->core.im_resources, im->core.im_num_resources);
1219 _XimSetCurrentIMValues(im, &im_values);
1227 Xim im,
1239 && (imid == im->private.proto.imid))
1244 && (imid == im->private.proto.imid))
1254 Xim im = (Xim)xim;
1275 if (!IS_SERVER_CONNECTED(im))
1278 if (!_XimSaveIMValues(im, arg))
1281 if (!IS_SERVER_CONNECTED(im)) {
1282 if (IS_CONNECTABLE(im)) {
1283 if (!_XimConnectServer(im)) {
1284 return _XimDelayModeSetIMValues(im, arg);
1292 _XimGetCurrentIMValues(im, &im_values);
1301 if ((name = _XimEncodeIMATTRIBUTE(im, im->core.im_resources,
1302 im->core.im_num_resources, arg, &arg_ret, data, data_len,
1328 _XimSetCurrentIMValues(im, &im_values);
1337 buf_s[0] = im->private.proto.imid;
1342 if (!(_XimWrite(im, len, (XPointer)buf))) {
1347 _XimFlush(im);
1351 ret_code = _XimRead(im, &len, (XPointer)reply, buf_size,
1361 ret_code = _XimRead(im, &len, reply, buf_size,
1372 _XimProcError(im, 0, (XPointer)&buf_s[3]);
1386 Xim im,
1391 _XimGetCurrentIMValues(im, &im_values);
1392 return(_XimGetIMValueData(im, (XPointer)&im_values, arg,
1393 im->core.im_resources, im->core.im_num_resources));
1399 Xim im,
1411 && (imid == im->private.proto.imid))
1416 && (imid == im->private.proto.imid))
1426 Xim im = (Xim)xim;
1443 if (!IS_SERVER_CONNECTED(im))
1446 if (!IS_SERVER_CONNECTED(im)) {
1447 if (IS_CONNECTABLE(im)) {
1448 if (!_XimConnectServer(im)) {
1449 return _XimDelayModeGetIMValues(im, arg);
1473 makeid_name = _XimMakeIMAttrIDList(im, im->core.im_resources,
1474 im->core.im_num_resources, arg,
1478 buf_s[0] = im->private.proto.imid; /* imid */
1479 buf_s[1] = len; /* length of im-attr-id */
1485 if (!(_XimWrite(im, len, (XPointer)buf))) {
1489 _XimFlush(im);
1492 ret_code = _XimRead(im, &len, (XPointer)reply, buf_size,
1502 ret_code = _XimRead(im, &len, preply, buf_size,
1513 _XimProcError(im, 0, (XPointer)&buf_s[3]);
1521 decode_name = _XimDecodeIMATTRIBUTE(im, im->core.im_resources,
1522 im->core.im_num_resources, data, data_len,
1545 Xim im,
1554 _XGetLCValues(im->core.lcd, XlcNCodeset, &encoding, NULL);
1578 Xim im,
1589 Xim im,
1596 XLCd lcd = im->core.lcd;
1604 XimProtoPrivateRec *private = &im->private.proto;
1678 Xim im,
1690 && (imid == im->private.proto.imid))
1695 && (imid == im->private.proto.imid))
1702 Xim im)
1717 if (!(_XimSetEncodingByName(im, &name_ptr, &name_len)))
1720 if (!(_XimSetEncodingByDetail(im, &detail_ptr, &detail_len)))
1736 buf_s[0] = im->private.proto.imid;
1748 if (!(_XimWrite(im, len, (XPointer)buf))) {
1752 _XimFlush(im);
1755 ret_code = _XimRead(im, &len, (XPointer)reply, buf_size,
1765 ret_code = _XimRead(im, &len, preply, buf_size,
1774 _XimProcError(im, 0, (XPointer)&buf_s[3]);
1778 if (!(_XimGetEncoding(im, &buf_s[1], name_ptr, name_len,
1806 Xim im)
1826 _XimGetCurrentIMValues(im, &im_values);
1835 if (!_XimEncodeSavedIMATTRIBUTE(im, im->core.im_resources,
1836 im->core.im_num_resources, &idx, data, data_len,
1869 buf_s[0] = im->private.proto.imid;
1874 if (!(_XimWrite(im, len, (XPointer)buf))) {
1879 _XimFlush(im);
1883 ret_code = _XimRead(im, &len, (XPointer)reply, buf_size,
1893 ret_code = _XimRead(im, &len, reply, buf_size,
1905 _XimProcError(im, 0, (XPointer)&buf_s[3]);
1918 Xim im)
1920 if (im->core.im_resources) {
1921 Xfree(im->core.im_resources);
1922 im->core.im_resources = NULL;
1924 if (im->core.ic_resources) {
1925 Xfree(im->core.ic_resources);
1926 im->core.ic_resources = NULL;
1928 if (im->core.im_values_list) {
1929 Xfree(im->core.im_values_list);
1930 im->core.im_values_list = NULL;
1932 if (im->core.ic_values_list) {
1933 Xfree(im->core.ic_values_list);
1934 im->core.ic_values_list = NULL;
1941 Xim im)
1947 memcpy((char *)save_im, (char *)im, sizeof(XimRec));
1949 if (_XimPreConnect(im) && _XimConnection(im)
1950 && _XimOpen(im) && _XimEncodingNegotiation(im)) {
1951 if (_XimSendSavedIMValues(im)) {
1953 _XimRegisterServerFilter(im);
1958 memcpy((char *)im, (char *)save_im, sizeof(XimRec));
1965 Xim im)
1969 if(!_XimSetIMResourceList(&im->core.im_resources,
1970 &im->core.im_num_resources)) {
1973 if(!_XimSetICResourceList(&im->core.ic_resources,
1974 &im->core.ic_num_resources)) {
1978 _XimSetIMMode(im->core.im_resources, im->core.im_num_resources);
1980 _XimGetCurrentIMValues(im, &im_values);
1981 if(!_XimSetLocalIMDefaults(im, (XPointer)&im_values,
1982 im->core.im_resources, im->core.im_num_resources)) {
1985 _XimSetCurrentIMValues(im, &im_values);
1986 if (im->private.proto.default_styles) {
1987 if (im->core.styles)
1988 Xfree(im->core.styles);
1989 im->core.styles = im->private.proto.default_styles;
1997 Xim im)
2001 if(!_XimSetIMResourceList(&im->core.im_resources,
2002 &im->core.im_num_resources)) {
2005 if(!_XimSetICResourceList(&im->core.ic_resources,
2006 &im->core.ic_num_resources)) {
2010 _XimSetIMMode(im->core.im_resources, im->core.im_num_resources);
2012 if (im->private.proto.default_styles) {
2013 if (im->core.styles)
2014 Xfree(im->core.styles);
2015 im->core.styles = im->private.proto.default_styles;
2024 Xim im)
2028 im->methods = &im_methods;
2031 _XimSetProtoResource(im);
2034 if (_XimPreConnect(im)) {
2035 if (_XimConnection(im) && _XimOpen(im) && _XimEncodingNegotiation(im)) {
2036 _XimRegisterServerFilter(im);
2039 _XimShutdown(im);
2041 } else if (IS_DELAYBINDABLE(im)) {
2042 if (_XimDelayModeSetAttr(im))
2046 _XimProtoIMFree(im);