aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rumney2001-01-13 00:01:51 +0000
committerJason Rumney2001-01-13 00:01:51 +0000
commitd6ff54d52ff06a8bf18fa1e26261449ecb12ca0f (patch)
treee5489909f7f0de78540e408f46f1cc8c25346836
parent253574a62d17028ada7e86c13317975d940b1eba (diff)
downloademacs-d6ff54d52ff06a8bf18fa1e26261449ecb12ca0f.tar.gz
emacs-d6ff54d52ff06a8bf18fa1e26261449ecb12ca0f.zip
(x_produce_image_glyph, x_draw_image_foreground)
(x_draw_image_relief, x_draw_image_foreground_1) (x_draw_image_glyph_string): Adapt to change of image margins. (w32_fill_rect, w32_read_socket, x_bitmap_icon) (x_new_fontset, x_calc_absolute_position, x_iconify_frame): Add parentheses.
-rw-r--r--src/w32term.c63
1 files changed, 22 insertions, 41 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 7ad6eaeb194..4f233ef4736 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -510,7 +510,6 @@ w32_fill_rect (f, hdc, pix, lprect)
510 RECT * lprect; 510 RECT * lprect;
511{ 511{
512 HBRUSH hb; 512 HBRUSH hb;
513 RECT rect;
514 513
515 hb = CreateSolidBrush (pix); 514 hb = CreateSolidBrush (pix);
516 FillRect (hdc, lprect, hb); 515 FillRect (hdc, lprect, hb);
@@ -1353,6 +1352,16 @@ int w32_font_is_double_byte (XFontStruct *font)
1353} 1352}
1354 1353
1355 1354
1355static BOOL
1356w32_use_unicode_for_codepage (codepage)
1357 int codepage;
1358{
1359 /* If the current codepage is supported, use Unicode for output. */
1360 return (w32_enable_unicode_output
1361 && codepage != CP_8BIT
1362 && (codepage == CP_UNICODE || IsValidCodePage (codepage)));
1363}
1364
1356/* Encode CHAR2B using encoding information from FONT_INFO. CHAR2B is 1365/* Encode CHAR2B using encoding information from FONT_INFO. CHAR2B is
1357 the two-byte form of C. Encoding is returned in *CHAR2B. */ 1366 the two-byte form of C. Encoding is returned in *CHAR2B. */
1358 1367
@@ -1694,8 +1703,8 @@ x_produce_image_glyph (it)
1694 prepare_image_for_display (it->f, img); 1703 prepare_image_for_display (it->f, img);
1695 1704
1696 it->ascent = it->phys_ascent = image_ascent (img, face); 1705 it->ascent = it->phys_ascent = image_ascent (img, face);
1697 it->descent = it->phys_descent = img->height + 2 * img->margin - it->ascent; 1706 it->descent = it->phys_descent = img->height + 2 * img->vmargin - it->ascent;
1698 it->pixel_width = img->width + 2 * img->margin; 1707 it->pixel_width = img->width + 2 * img->hmargin;
1699 1708
1700 it->nglyphs = 1; 1709 it->nglyphs = 1;
1701 1710
@@ -2547,17 +2556,6 @@ x_estimate_mode_line_height (f, face_id)
2547 2556
2548 2557
2549 2558
2550BOOL
2551w32_use_unicode_for_codepage (codepage)
2552 int codepage;
2553{
2554 /* If the current codepage is supported, use Unicode for output. */
2555 return (w32_enable_unicode_output
2556 && codepage != CP_8BIT
2557 && (codepage == CP_UNICODE || IsValidCodePage (codepage)));
2558}
2559
2560
2561/*********************************************************************** 2559/***********************************************************************
2562 Glyph display 2560 Glyph display
2563 ***********************************************************************/ 2561 ***********************************************************************/
@@ -3137,8 +3135,6 @@ w32_get_glyph_overhangs (hdc, glyph, f, left, right)
3137 struct frame *f; 3135 struct frame *f;
3138 int *left, *right; 3136 int *left, *right;
3139{ 3137{
3140 int c;
3141
3142 *left = *right = 0; 3138 *left = *right = 0;
3143 3139
3144 if (glyph->type == CHAR_GLYPH) 3140 if (glyph->type == CHAR_GLYPH)
@@ -3819,11 +3815,8 @@ x_draw_image_foreground (s)
3819 3815
3820 /* If there is a margin around the image, adjust x- and y-position 3816 /* If there is a margin around the image, adjust x- and y-position
3821 by that margin. */ 3817 by that margin. */
3822 if (s->img->margin) 3818 x += s->img->hmargin;
3823 { 3819 y += s->img->vmargin;
3824 x += s->img->margin;
3825 y += s->img->margin;
3826 }
3827 3820
3828 SaveDC (s->hdc); 3821 SaveDC (s->hdc);
3829 3822
@@ -3924,11 +3917,8 @@ x_draw_image_relief (s)
3924 3917
3925 /* If there is a margin around the image, adjust x- and y-position 3918 /* If there is a margin around the image, adjust x- and y-position
3926 by that margin. */ 3919 by that margin. */
3927 if (s->img->margin) 3920 x += s->img->hmargin;
3928 { 3921 y += s->img->vmargin;
3929 x += s->img->margin;
3930 y += s->img->margin;
3931 }
3932 3922
3933 if (s->hl == DRAW_IMAGE_SUNKEN 3923 if (s->hl == DRAW_IMAGE_SUNKEN
3934 || s->hl == DRAW_IMAGE_RAISED) 3924 || s->hl == DRAW_IMAGE_RAISED)
@@ -3975,11 +3965,8 @@ w32_draw_image_foreground_1 (s, pixmap)
3975 3965
3976 /* If there is a margin around the image, adjust x- and y-position 3966 /* If there is a margin around the image, adjust x- and y-position
3977 by that margin. */ 3967 by that margin. */
3978 if (s->img->margin) 3968 x += s->img->hmargin;
3979 { 3969 y += s->img->vmargin;
3980 x += s->img->margin;
3981 y += s->img->margin;
3982 }
3983 3970
3984 if (s->img->pixmap) 3971 if (s->img->pixmap)
3985 { 3972 {
@@ -4078,7 +4065,7 @@ x_draw_glyph_string_bg_rect (s, x, y, w, h)
4078 | s->face->box 4065 | s->face->box
4079 | 4066 |
4080 | +------------------------- 4067 | +-------------------------
4081 | | s->img->margin 4068 | | s->img->vmargin
4082 | | 4069 | |
4083 | | +------------------- 4070 | | +-------------------
4084 | | | the image 4071 | | | the image
@@ -4091,7 +4078,6 @@ x_draw_image_glyph_string (s)
4091{ 4078{
4092 int x, y; 4079 int x, y;
4093 int box_line_width = s->face->box_line_width; 4080 int box_line_width = s->face->box_line_width;
4094 int margin = s->img->margin;
4095 int height; 4081 int height;
4096 HBITMAP pixmap = 0; 4082 HBITMAP pixmap = 0;
4097 4083
@@ -4102,7 +4088,8 @@ x_draw_image_glyph_string (s)
4102 flickering. */ 4088 flickering. */
4103 s->stippled_p = s->face->stipple != 0; 4089 s->stippled_p = s->face->stipple != 0;
4104 if (height > s->img->height 4090 if (height > s->img->height
4105 || margin 4091 || s->img->vmargin
4092 || s->img->hmargin
4106#if 0 /* TODO: image mask */ 4093#if 0 /* TODO: image mask */
4107 || s->img->mask 4094 || s->img->mask
4108#endif 4095#endif
@@ -5816,7 +5803,6 @@ w32_frame_rehighlight (frame)
5816{ 5803{
5817 if (! FRAME_W32_P (frame)) 5804 if (! FRAME_W32_P (frame))
5818 return; 5805 return;
5819
5820 x_frame_rehighlight (FRAME_W32_DISPLAY_INFO (frame)); 5806 x_frame_rehighlight (FRAME_W32_DISPLAY_INFO (frame));
5821} 5807}
5822 5808
@@ -8263,7 +8249,7 @@ w32_read_socket (sd, bufp, numchars, expected)
8263 && XFASTINT (XWINDOW (f->tool_bar_window)->height)) 8249 && XFASTINT (XWINDOW (f->tool_bar_window)->height))
8264 { 8250 {
8265 Lisp_Object window; 8251 Lisp_Object window;
8266 int p, x, y; 8252 int p;
8267 8253
8268 /* Set x and y. */ 8254 /* Set x and y. */
8269 window = window_from_coordinates (f, 8255 window = window_from_coordinates (f,
@@ -9247,8 +9233,6 @@ x_bitmap_icon (f, icon)
9247 struct frame *f; 9233 struct frame *f;
9248 Lisp_Object icon; 9234 Lisp_Object icon;
9249{ 9235{
9250 int mask, bitmap_id;
9251 Window icon_window;
9252 HANDLE hicon; 9236 HANDLE hicon;
9253 9237
9254 if (FRAME_W32_WINDOW (f) == 0) 9238 if (FRAME_W32_WINDOW (f) == 0)
@@ -9353,7 +9337,6 @@ x_new_fontset (f, fontsetname)
9353{ 9337{
9354 int fontset = fs_query_fontset (build_string (fontsetname), 0); 9338 int fontset = fs_query_fontset (build_string (fontsetname), 0);
9355 Lisp_Object result; 9339 Lisp_Object result;
9356 char *fontname;
9357 9340
9358 if (fontset < 0) 9341 if (fontset < 0)
9359 return Qnil; 9342 return Qnil;
@@ -9470,7 +9453,6 @@ void
9470x_calc_absolute_position (f) 9453x_calc_absolute_position (f)
9471 struct frame *f; 9454 struct frame *f;
9472{ 9455{
9473 Window child;
9474 POINT pt; 9456 POINT pt;
9475 int flags = f->output_data.w32->size_hint_flags; 9457 int flags = f->output_data.w32->size_hint_flags;
9476 9458
@@ -9908,7 +9890,6 @@ void
9908x_iconify_frame (f) 9890x_iconify_frame (f)
9909 struct frame *f; 9891 struct frame *f;
9910{ 9892{
9911 int result;
9912 Lisp_Object type; 9893 Lisp_Object type;
9913 9894
9914 /* Don't keep the highlight on an invisible frame. */ 9895 /* Don't keep the highlight on an invisible frame. */