Mercurial > hg > xemacs-beta
comparison src/redisplay-msw.c @ 263:727739f917cb r20-5b30
Import from CVS: tag r20-5b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:24:41 +0200 |
parents | 157b30c96d03 |
children | 8efd647ea9ca |
comparison
equal
deleted
inserted
replaced
262:9d8607af9e13 | 263:727739f917cb |
---|---|
322 struct face_cachel *cachel; | 322 struct face_cachel *cachel; |
323 Lisp_Object font = Qnil; | 323 Lisp_Object font = Qnil; |
324 int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d)); | 324 int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d)); |
325 HDC hdc = FRAME_MSWINDOWS_DC (f); | 325 HDC hdc = FRAME_MSWINDOWS_DC (f); |
326 int real_char_p = (rb->type == RUNE_CHAR && rb->object.chr.ch != '\n'); | 326 int real_char_p = (rb->type == RUNE_CHAR && rb->object.chr.ch != '\n'); |
327 unsigned int face_index=0; | |
327 char *p_char = NULL; | 328 char *p_char = NULL; |
328 int n_char = 0; | 329 int n_char = 0; |
329 RECT rect = { xpos, | 330 RECT rect = { xpos, |
330 dl->ypos - dl->ascent, | 331 dl->ypos - dl->ascent, |
331 xpos + width, | 332 xpos + width, |
350 n_char = 1; | 351 n_char = 1; |
351 } | 352 } |
352 | 353 |
353 /* Use cursor fg/bg for block cursor, or character fg/bg for the bar. | 354 /* Use cursor fg/bg for block cursor, or character fg/bg for the bar. |
354 Output nothing at eol if bar cursor */ | 355 Output nothing at eol if bar cursor */ |
355 cachel = WINDOW_FACE_CACHEL (w, | 356 face_index = get_builtin_face_cache_index (w, Vtext_cursor_face); |
356 (bar_p | 357 cachel = WINDOW_FACE_CACHEL (w, (bar_p ? rb->findex : face_index)); |
357 ? rb->findex | |
358 : get_builtin_face_cache_index (w, Vtext_cursor_face))); | |
359 mswindows_update_dc (hdc, font, cachel->foreground, | 358 mswindows_update_dc (hdc, font, cachel->foreground, |
360 cachel->background, Qnil); | 359 cachel->background, Qnil); |
361 ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE|ETO_CLIPPED, &rect, p_char, n_char, NULL); | 360 ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE|ETO_CLIPPED, &rect, p_char, n_char, NULL); |
362 | 361 |
363 if (focus && bar_p) | 362 if (focus && bar_p) |
364 { | 363 { |
365 rect.right = rect.left + (EQ (bar, Qt) ? 1 : 2); | 364 rect.right = rect.left + (EQ (bar, Qt) ? 1 : 2); |
366 cachel = WINDOW_FACE_CACHEL (w, | 365 face_index = get_builtin_face_cache_index (w, Vtext_cursor_face); |
367 get_builtin_face_cache_index (w, Vtext_cursor_face)); | 366 cachel = WINDOW_FACE_CACHEL (w, face_index); |
368 mswindows_update_dc (hdc, Qnil, Qnil, cachel->background, Qnil); | 367 mswindows_update_dc (hdc, Qnil, Qnil, cachel->background, Qnil); |
369 ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE, &rect, NULL, 0, NULL); | 368 ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE, &rect, NULL, 0, NULL); |
370 } | 369 } |
371 else if (!focus) | 370 else if (!focus) |
372 { | 371 { |
379 { | 378 { |
380 p_char = (char*) &rb->object.chr.ch; | 379 p_char = (char*) &rb->object.chr.ch; |
381 n_char = 1; | 380 n_char = 1; |
382 } | 381 } |
383 | 382 |
384 cachel = WINDOW_FACE_CACHEL (w, (real_char_p ? rb->findex | 383 face_index = get_builtin_face_cache_index (w, Vdefault_face); |
385 : get_builtin_face_cache_index (w, Vdefault_face))); | 384 cachel = WINDOW_FACE_CACHEL (w, (real_char_p ? rb->findex : face_index)); |
386 mswindows_update_dc (hdc, Qnil, cachel->foreground, | 385 mswindows_update_dc (hdc, Qnil, cachel->foreground, |
387 cachel->background, Qnil); | 386 cachel->background, Qnil); |
388 ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE | ETO_CLIPPED, | 387 ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE | ETO_CLIPPED, |
389 &rect, p_char, n_char, NULL); | 388 &rect, p_char, n_char, NULL); |
390 } | 389 } |