Changeset 4150
- Timestamp:
- 08/22/06 22:12:03 (2 years ago)
- Files:
-
- trunk/src/ChangeLog.Meadow (modified) (1 diff)
- trunk/src/image.c (modified) (2 diffs)
- trunk/src/mw32fns.c (modified) (10 diffs)
- trunk/src/mw32term.c (modified) (3 diffs)
- trunk/src/mw32term.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/ChangeLog.Meadow
r4149 r4150 1 2006-08-22 MIYOSHI Masanori <miyoshi@meadowy.org> 2 3 * mw32term.c: Use FRAME_FOREGROUND_PIXEL and 4 FRAME_BACKGROUND_PIXEL to get the frame colors. Refer to 5 ticket:334. 6 7 * mw32fns.c (mw32_set_foreground_color): Ditto. 8 9 * image.c (get_image_data_from_icon): Ditto. 10 11 * mw32term.h (struct mw32_output): New member `x_compatible'. 12 (struct mw32_output): Removed members `background_pixel' and 13 `foreground_pixel'. Refer to ticket:334. 14 1 15 2006-08-22 YAMAZAKI Katsuhiro <yamazaki-k@mwe.biglobe.ne.jp> 2 16 trunk/src/image.c
r4137 r4150 9899 9899 RGBQUAD *prgb) 9900 9900 { 9901 unsigned long foreground = f->output_data.mw32->foreground_pixel;9902 unsigned long background = f->output_data.mw32->background_pixel;9901 unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); 9902 unsigned long background = FRAME_BACKGROUND_PIXEL (f); 9903 9903 Lisp_Object value; 9904 9904 RGBQUAD *pfg = prgb; … … 10307 10307 hobj_orig = SelectObject (cdc, hbmp); 10308 10308 10309 brush = CreateSolidBrush ( f->output_data.mw32->background_pixel);10309 brush = CreateSolidBrush (FRAME_BACKGROUND_PIXEL (f)); 10310 10310 rect.right = width; 10311 10311 rect.bottom = height; trunk/src/mw32fns.c
r4149 r4150 650 650 651 651 fg = mw32_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); 652 old_fg = x->foreground_pixel;653 x->foreground_pixel= fg;652 old_fg = FRAME_FOREGROUND_PIXEL (f); 653 FRAME_FOREGROUND_PIXEL (f) = fg; 654 654 655 655 if (FRAME_MW32_WINDOW (f) != 0) … … 674 674 bg = mw32_decode_color (f, arg, WHITE_PIX_DEFAULT (f)); 675 675 #if 0 /* TODO: color */ 676 unload_color (f, x->background_pixel);676 unload_color (f, FRAME_BACKGROUND_PIXEL (f)); 677 677 #endif 678 x->background_pixel= bg;678 FRAME_BACKGROUND_PIXEL (f) = bg; 679 679 680 680 if (FRAME_MW32_WINDOW (f) != 0) … … 696 696 f->output_data.mw32->mouse_pixel 697 697 = mw32_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); 698 mask_color = f->output_data.mw32->background_pixel;698 mask_color = FRAME_BACKGROUND_PIXEL (f); 699 699 /* No invisible pointers. */ 700 700 if (mask_color == f->output_data.mw32->mouse_pixel 701 && mask_color == f->output_data.mw32->background_pixel)702 f->output_data.mw32->mouse_pixel = f->output_data.mw32->foreground_pixel;701 && mask_color == FRAME_BACKGROUND_PIXEL (f)) 702 f->output_data.mw32->mouse_pixel = FRAME_FOREGROUND_PIXEL (f); 703 703 704 704 #else … … 708 708 int count; 709 709 unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); 710 unsigned long mask_color = x->background_pixel;710 unsigned long mask_color = FRAME_BACKGROUND_PIXEL (f); 711 711 712 712 /* Don't let pointers be invisible. */ … … 714 714 { 715 715 x_free_colors (f, &pixel, 1); 716 pixel = x_copy_color (f, x->foreground_pixel);716 pixel = x_copy_color (f, FRAME_FOREGROUND_PIXEL (f)) 717 717 } 718 718 … … 869 869 WHITE_PIX_DEFAULT (f)); 870 870 else 871 fore_pixel = out->background_pixel;871 fore_pixel = FRAME_BACKGROUND_PIXEL (f); 872 872 out->cursor_pixel = mw32_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); 873 873 874 874 /* Make sure that the cursor color differs from the background color. */ 875 if (out->cursor_pixel == out->background_pixel)875 if (out->cursor_pixel == FRAME_BACKGROUND_PIXEL (f)) 876 876 { 877 877 out->cursor_pixel = out->mouse_pixel; 878 878 if (out->cursor_pixel == fore_pixel) 879 fore_pixel = out->background_pixel;879 fore_pixel = FRAME_BACKGROUND_PIXEL (f); 880 880 } 881 881 out->cursor_foreground_pixel = fore_pixel; … … 901 901 } 902 902 else 903 fore_pixel = x->background_pixel;903 fore_pixel = FRAME_BACKGROUND_PIXEL (f); 904 904 905 905 pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); … … 907 907 908 908 /* Make sure that the cursor color differs from the background color. */ 909 if (pixel == x->background_pixel)909 if (pixel == FRAME_BACKGROUND_PIXEL (f)) 910 910 { 911 911 if (pixel_allocated_p) … … 923 923 fore_pixel_allocated_p = 0; 924 924 } 925 fore_pixel = x->background_pixel;925 fore_pixel = FRAME_BACKGROUND_PIXEL (f); 926 926 } 927 927 } … … 1717 1717 mw32m_flash_window (struct frame *f) 1718 1718 { 1719 PIX_TYPE pixel = f->output_data.mw32->foreground_pixel ^ 1720 f->output_data.mw32->background_pixel; 1719 PIX_TYPE pixel = FRAME_FOREGROUND_PIXEL (f) ^ FRAME_BACKGROUND_PIXEL (f); 1721 1720 HDC hdc = GetDC (FRAME_MW32_WINDOW (f)); 1722 1721 HBRUSH hbrush = CreateSolidBrush (pixel); trunk/src/mw32term.c
r4149 r4150 700 700 mw32_fill_area (struct frame *f, int x0, int y0, int x1, int y1) 701 701 { 702 mw32_fill_area_pix (f, f->output_data.mw32->foreground_pixel, 703 x0, y0, x1, y1); 702 mw32_fill_area_pix (f, FRAME_FOREGROUND_PIXEL (f), x0, y0, x1, y1); 704 703 } 705 704 … … 707 706 mw32_clear_native_frame_area (struct frame *f, int x0, int y0, int x1, int y1) 708 707 { 709 mw32_fill_area_pix (f, f->output_data.mw32->background_pixel, 710 x0, y0, x1, y1); 708 mw32_fill_area_pix (f, FRAME_BACKGROUND_PIXEL (f), x0, y0, x1, y1); 711 709 } 712 710 … … 714 712 mw32_clear_frame_area (struct frame *f, int x, int y, int width, int height) 715 713 { 716 mw32_fill_area_pix (f, f->output_data.mw32->background_pixel,714 mw32_fill_area_pix (f, FRAME_BACKGROUND_PIXEL (f), 717 715 x, y, x + width, y + height); 718 716 } trunk/src/mw32term.h
r4119 r4150 361 361 struct mw32_output 362 362 { 363 /* Placeholder for things accessed through output_data.x. */ 364 struct x_output x_compatible; 365 363 366 /* caret bitmap handle */ 364 367 HBITMAP caret_bitmap; … … 441 444 /* Pixel values used for various purposes. 442 445 border_pixel may be -1 meaning use a gray tile. */ 443 PIX_TYPE background_pixel;444 PIX_TYPE foreground_pixel;445 446 PIX_TYPE cursor_pixel; 446 447 PIX_TYPE border_pixel; … … 593 594 Refer make_terminal_frame()@frame.c for the detail. These 594 595 are only for a terminal frame! */ 596 /* Now it's safe to use these macros. Miyoshi */ 595 597 #define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel) 596 598 #define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
