comparison src/input-method-xlib.c @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents d883f39b8495
children 74fd4e045ea6
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
185 XtOffsetOf(xic_vars_t, field), XtRString, default_value } 185 XtOffsetOf(xic_vars_t, field), XtRString, default_value }
186 186
187 static XtResource resources[] = 187 static XtResource resources[] =
188 { 188 {
189 /* name class represent'n field default value */ 189 /* name class represent'n field default value */
190 res(XtNximStyles, XtCXimStyles, XtRXimStyles, styles, DefaultXIMStyles), 190 res(XtNximStyles, XtCXimStyles, XtRXimStyles, styles, (XtPointer) DefaultXIMStyles),
191 res(XtNfontSet, XtCFontSet, XtRFontSet, fontset, XtDefaultFontSet), 191 res(XtNfontSet, XtCFontSet, XtRFontSet, fontset, (XtPointer) XtDefaultFontSet),
192 res(XtNximForeground, XtCForeground, XtRPixel, fg, XtDefaultForeground), 192 res(XtNximForeground, XtCForeground, XtRPixel, fg, (XtPointer) XtDefaultForeground),
193 res(XtNximBackground, XtCBackground, XtRPixel, bg, XtDefaultBackground) 193 res(XtNximBackground, XtCBackground, XtRPixel, bg, (XtPointer) XtDefaultBackground)
194 }; 194 };
195 195
196 assert (win != 0 && w != NULL && d != NULL); 196 assert (win != 0 && w != NULL && d != NULL);
197 197
198 if (!xim) 198 if (!xim)
383 Status status; 383 Status status;
384 int len; 384 int len;
385 int i; 385 int i;
386 XClientMessageEvent new_event; 386 XClientMessageEvent new_event;
387 387
388 try_again: 388 retry:
389 len = XwcLookupString (ic, x_key_event, composed_input_buf.data, 389 len = XwcLookupString (ic, x_key_event, composed_input_buf.data,
390 composed_input_buf.size, &keysym, &status); 390 composed_input_buf.size, &keysym, &status);
391 switch (status) 391 switch (status)
392 { 392 {
393 case XBufferOverflow: 393 case XBufferOverflow:
394 /* GROW_WC_STRING (&composed_input_buf, 32); mrb */ 394 /* GROW_WC_STRING (&composed_input_buf, 32); mrb */
395 goto try_again; 395 goto retry;
396 case XLookupChars: 396 case XLookupChars:
397 break; 397 break;
398 default: 398 default:
399 abort (); 399 abort ();
400 } 400 }