Mercurial > emacs
comparison src/macterm.c @ 45890:afcf154bf656
2002-06-17 Andrew Choi <akochoi@shaw.ca>
* macterm.c (mac_scroll_area): Set foreground and backcolor to
black and white before scrolling. Restore frame background and
foreground color after scrolling.
(do_window_update): Call XClearWindow before calling expose_frame.
(make_mac_frame): Don't set FRAME_BACKGROUND_PIXEL and
FRAME_FOREGROUND_PIXEL of frame.
author | Andrew Choi <akochoi@shaw.ca> |
---|---|
date | Tue, 18 Jun 2002 05:33:25 +0000 |
parents | 61b39d1554ee |
children | 2198a6632b2b |
comparison
equal
deleted
inserted
replaced
45889:0d2a977d3d32 | 45890:afcf154bf656 |
---|---|
968 | 968 |
969 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); | 969 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); |
970 SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height); | 970 SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height); |
971 | 971 |
972 SetPort (GetWindowPort (w)); | 972 SetPort (GetWindowPort (w)); |
973 mac_set_colors (gc); | 973 |
974 ForeColor (blackColor); | |
975 BackColor (whiteColor); | |
974 | 976 |
975 LockPortBits (GetWindowPort (w)); | 977 LockPortBits (GetWindowPort (w)); |
976 pmh = GetPortPixMap (GetWindowPort (w)); | 978 pmh = GetPortPixMap (GetWindowPort (w)); |
977 CopyBits ((BitMap *) *pmh, (BitMap *) *pmh, &src_r, &dest_r, srcCopy, 0); | 979 CopyBits ((BitMap *) *pmh, (BitMap *) *pmh, &src_r, &dest_r, srcCopy, 0); |
978 UnlockPortBits (GetWindowPort (w)); | 980 UnlockPortBits (GetWindowPort (w)); |
981 | |
982 mac_set_colors (gc); | |
979 #else /* not TARGET_API_MAC_CARBON */ | 983 #else /* not TARGET_API_MAC_CARBON */ |
980 Rect src_r, dest_r; | 984 Rect src_r, dest_r; |
981 | 985 |
982 SetPort (w); | 986 SetPort (w); |
983 #if 0 | 987 #if 0 |
11647 else | 11651 else |
11648 { | 11652 { |
11649 BeginUpdate (win); | 11653 BeginUpdate (win); |
11650 handling_window_update = 1; | 11654 handling_window_update = 1; |
11651 | 11655 |
11656 XClearWindow (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f)); | |
11657 | |
11652 expose_frame (f, 0, 0, 0, 0); | 11658 expose_frame (f, 0, 0, 0, 0); |
11653 | 11659 |
11654 handling_window_update = 0; | 11660 handling_window_update = 0; |
11655 EndUpdate (win); | 11661 EndUpdate (win); |
11656 } | 11662 } |
12827 { | 12833 { |
12828 FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; | 12834 FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; |
12829 FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_right; | 12835 FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_right; |
12830 | 12836 |
12831 NewMacWindow(f); | 12837 NewMacWindow(f); |
12832 FRAME_BACKGROUND_PIXEL (f) = 0xffffff; | |
12833 FRAME_FOREGROUND_PIXEL (f) = 0; | |
12834 | 12838 |
12835 f->output_data.mac->cursor_pixel = 0; | 12839 f->output_data.mac->cursor_pixel = 0; |
12836 f->output_data.mac->border_pixel = 0x00ff00; | 12840 f->output_data.mac->border_pixel = 0x00ff00; |
12837 f->output_data.mac->mouse_pixel = 0xff00ff; | 12841 f->output_data.mac->mouse_pixel = 0xff00ff; |
12838 f->output_data.mac->cursor_foreground_pixel = 0x0000ff; | 12842 f->output_data.mac->cursor_foreground_pixel = 0x0000ff; |