Mercurial > hg > xemacs-beta
comparison src/redisplay-msw.c @ 282:c42ec1d1cded r21-0b39
Import from CVS: tag r21-0b39
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:33:18 +0200 |
parents | 7df0dd720c89 |
children | 558f606b08ae |
comparison
equal
deleted
inserted
replaced
281:090b52736db2 | 282:c42ec1d1cded |
---|---|
522 XSetClipRectangles (dpy, gc, x, y, clip_box, 1, Unsorted); | 522 XSetClipRectangles (dpy, gc, x, y, clip_box, 1, Unsorted); |
523 #endif | 523 #endif |
524 } | 524 } |
525 | 525 |
526 /* Select the bitmaps into the compatible DC. */ | 526 /* Select the bitmaps into the compatible DC. */ |
527 if ((old=SelectObject(FRAME_MSWINDOWS_CDC(f), | 527 if ((old=SelectObject(FRAME_MSWINDOWS_CDC (f), |
528 IMAGE_INSTANCE_MSWINDOWS_BITMAP(p)))) | 528 IMAGE_INSTANCE_MSWINDOWS_BITMAP (p)))) |
529 { | 529 { |
530 BitBlt(hdc, | 530 if (!IMAGE_INSTANCE_MSWINDOWS_MASK (p)) |
531 x,y, | 531 { |
532 width, height, | 532 BitBlt(hdc, |
533 FRAME_MSWINDOWS_CDC(f), | 533 x,y, |
534 0,0, | 534 width, height, |
535 SRCCOPY); | 535 FRAME_MSWINDOWS_CDC (f), |
536 SelectObject(FRAME_MSWINDOWS_CDC(f),old); | 536 0,0, |
537 SRCCOPY); | |
538 } | |
539 else | |
540 { | |
541 MaskBlt(hdc, | |
542 x,y, | |
543 width, height, | |
544 FRAME_MSWINDOWS_CDC (f), | |
545 0,0, | |
546 IMAGE_INSTANCE_MSWINDOWS_MASK (p), | |
547 0,0, | |
548 MAKEROP4(SRCINVERT,SRCCOPY)); | |
549 } | |
550 SelectObject (FRAME_MSWINDOWS_CDC (f),old); | |
537 } | 551 } |
538 else | 552 else |
539 { | 553 { |
540 /* error */ | 554 /* error */ |
541 } | 555 } |
676 mswindows_redisplay_deadbox_maybe (struct window *w, CONST RECT* prc) | 690 mswindows_redisplay_deadbox_maybe (struct window *w, CONST RECT* prc) |
677 { | 691 { |
678 int sbh = window_scrollbar_height (w); | 692 int sbh = window_scrollbar_height (w); |
679 int sbw = window_scrollbar_width (w); | 693 int sbw = window_scrollbar_width (w); |
680 RECT rect_dead, rect_paint; | 694 RECT rect_dead, rect_paint; |
681 struct frame *f; | |
682 if (sbh == 0 || sbw == 0) | 695 if (sbh == 0 || sbw == 0) |
683 return; | 696 return; |
684 | 697 |
685 f = XFRAME (WINDOW_FRAME (w)); | 698 if (!NILP (w->scrollbar_on_left_p)) |
686 if (f->scrollbar_on_left) | |
687 { | 699 { |
688 rect_dead.left = WINDOW_LEFT (w); | 700 rect_dead.left = WINDOW_LEFT (w); |
689 rect_dead.right = WINDOW_LEFT (w) + sbw; | 701 rect_dead.right = WINDOW_LEFT (w) + sbw; |
690 } | 702 } |
691 else | 703 else |
692 { | 704 { |
693 rect_dead.left = WINDOW_RIGHT (w) - sbw; | 705 rect_dead.left = WINDOW_RIGHT (w) - sbw; |
694 rect_dead.right = WINDOW_RIGHT (w); | 706 rect_dead.right = WINDOW_RIGHT (w); |
695 } | 707 } |
696 | 708 |
697 if (f->scrollbar_on_top) | 709 if (!NILP (w->scrollbar_on_top_p)) |
698 { | 710 { |
699 rect_dead.top = WINDOW_TOP (w); | 711 rect_dead.top = WINDOW_TOP (w); |
700 rect_dead.bottom = WINDOW_TOP (w) + sbh; | 712 rect_dead.bottom = WINDOW_TOP (w) + sbh; |
701 } | 713 } |
702 else | 714 else |
705 rect_dead.top = WINDOW_BOTTOM (w) - modh - sbh; | 717 rect_dead.top = WINDOW_BOTTOM (w) - modh - sbh; |
706 rect_dead.bottom = WINDOW_BOTTOM (w) - modh; | 718 rect_dead.bottom = WINDOW_BOTTOM (w) - modh; |
707 } | 719 } |
708 | 720 |
709 if (IntersectRect (&rect_paint, &rect_dead, prc)) | 721 if (IntersectRect (&rect_paint, &rect_dead, prc)) |
710 FillRect (FRAME_MSWINDOWS_DC (f), &rect_paint, | 722 { |
711 (HBRUSH) (COLOR_BTNFACE+1)); | 723 struct frame *f = XFRAME (WINDOW_FRAME (w)); |
724 FillRect (FRAME_MSWINDOWS_DC (f), &rect_paint, | |
725 (HBRUSH) (COLOR_BTNFACE+1)); | |
726 } | |
712 } | 727 } |
713 | 728 |
714 #endif /* HAVE_SCROLLBARS */ | 729 #endif /* HAVE_SCROLLBARS */ |
715 | 730 |
716 /***************************************************************************** | 731 /***************************************************************************** |
1189 | 1204 |
1190 assert(!MSWINDOWS_DIVIDER_SPACING); /* This code doesn't handle this */ | 1205 assert(!MSWINDOWS_DIVIDER_SPACING); /* This code doesn't handle this */ |
1191 | 1206 |
1192 /* XXX Not sure about this */ | 1207 /* XXX Not sure about this */ |
1193 #ifdef HAVE_SCROLLBARS | 1208 #ifdef HAVE_SCROLLBARS |
1194 if (f->scrollbar_on_left) | 1209 if (!NILP (w->scrollbar_on_left_p)) |
1195 rect.left = WINDOW_LEFT (w); | 1210 rect.left = WINDOW_LEFT (w); |
1196 else | 1211 else |
1197 rect.left = WINDOW_RIGHT (w) - MSWINDOWS_DIVIDER_WIDTH; | 1212 rect.left = WINDOW_RIGHT (w) - MSWINDOWS_DIVIDER_WIDTH; |
1198 #else | 1213 #else |
1199 rect.left = WINDOW_LEFT (w); | 1214 rect.left = WINDOW_LEFT (w); |
1200 #endif | 1215 #endif |
1201 rect.right = rect.left + MSWINDOWS_DIVIDER_WIDTH; | 1216 rect.right = rect.left + MSWINDOWS_DIVIDER_WIDTH; |
1202 | 1217 |
1203 #ifdef HAVE_SCROLLBARS | 1218 #ifdef HAVE_SCROLLBARS |
1204 if (f->scrollbar_on_top) | 1219 if (!NILP (w->scrollbar_on_top_p)) |
1205 rect.top = WINDOW_TOP (w); | 1220 rect.top = WINDOW_TOP (w); |
1206 else | 1221 else |
1207 #endif | 1222 #endif |
1208 rect.top = WINDOW_TEXT_TOP (w); | 1223 rect.top = WINDOW_TEXT_TOP (w); |
1209 rect.bottom = WINDOW_BOTTOM (w) - modeline_height; | 1224 rect.bottom = WINDOW_BOTTOM (w) - modeline_height; |