Mercurial > kinput2.yaz
comparison lib/imlib/imconv.c @ 9:1f9e9cb00c6c
imported patch 11_kinput2-v3.1-status-update-204892.patch
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 08 Mar 2010 20:07:06 +0900 |
parents | 92745d501b9a |
children |
comparison
equal
deleted
inserted
replaced
8:8b176cdf6319 | 9:1f9e9cb00c6c |
---|---|
907 } | 907 } |
908 #endif | 908 #endif |
909 ICClearConversion(input_obj); | 909 ICClearConversion(input_obj); |
910 TRACE(("\twas converting. %d bytes left\n", num_bytes)); | 910 TRACE(("\twas converting. %d bytes left\n", num_bytes)); |
911 | 911 |
912 #if 0 | |
913 /* | |
914 * IMStopConversion() seems to not work correctly while | |
915 * resetting IC. So this block was moved to ximResetICProc(). | |
916 * If calling IMResetIC() is required in other functions, | |
917 * the following block is also used in it. | |
918 */ | |
912 if (icp->common_attr.reset_state == XIMInitialState) { | 919 if (icp->common_attr.reset_state == XIMInitialState) { |
913 /* Force to end the conversion. */ | 920 /* Force to end the conversion. */ |
914 TRACE(("\tback to the initial state\n")); | 921 TRACE(("\tback to the initial state\n")); |
915 IMStopConversion(icp); | 922 IMStopConversion(icp); |
916 } | 923 } |
924 #endif | |
925 | |
917 } | 926 } |
918 return num_bytes; | 927 return num_bytes; |
919 } | 928 } |
920 | 929 |
921 void | 930 void |
959 { | 968 { |
960 TRACE(("IMStatusStart(ic%d)\n", icp->id)); | 969 TRACE(("IMStatusStart(ic%d)\n", icp->id)); |
961 if (!(icp->common_attr.input_style & XIMStatusCallbacks)) | 970 if (!(icp->common_attr.input_style & XIMStatusCallbacks)) |
962 return; | 971 return; |
963 statusStart(icp); | 972 statusStart(icp); |
973 } | |
974 | |
975 /* ARGSUSED */ | |
976 void | |
977 IMStatusDraw(icp) | |
978 IMIC *icp; | |
979 { | |
980 Widget input_obj; | |
981 OCCPreeditDrawArg arg; | |
982 | |
983 TRACE(("IMStatusDraw(ic%d)\n", icp->id)); | |
984 if (!(icp->common_attr.input_style & XIMStatusCallbacks)) | |
985 return; | |
986 | |
987 | |
988 arg.caret = 0; /* ignored */ | |
989 arg.chg_first = 0; /* ignored */ | |
990 arg.chg_length = 0; /* ignored */ | |
991 arg.encoding = IMCtextAtom(icp->im->connection->proto_widget); | |
992 arg.format = 0; /* set by ICGetStatusString */ | |
993 arg.text_length = 0; /* set by ICGetStatusString */ | |
994 arg.text = NULL; /* set by ICGetStatusString */ | |
995 arg.attrs_length = 0; /* ignored */ | |
996 arg.attrs = NULL; /* ignored */ | |
997 | |
998 if (icp->conversion) { | |
999 XtVaGetValues(icp->conversion, XtNinputObject, &input_obj, NULL); | |
1000 if (ICGetStatusString(input_obj, &arg.encoding, &arg.format, | |
1001 &arg.text_length, &arg.text, | |
1002 &arg.attrs_length) == -1) | |
1003 return; | |
1004 } | |
1005 | |
1006 statusDraw(icp, &arg); | |
1007 | |
1008 XtFree((char *)arg.text); | |
964 } | 1009 } |
965 | 1010 |
966 /* ARGSUSED */ | 1011 /* ARGSUSED */ |
967 void | 1012 void |
968 IMStatusDone(icp) | 1013 IMStatusDone(icp) |