diff options
| author | Kim F. Storm | 2001-12-01 01:33:30 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2001-12-01 01:33:30 +0000 |
| commit | 41c1bdd9bb12005260deaafb2c0f18a8e342fd4a (patch) | |
| tree | 3218394d381221489403f51a652a5c26c84c3ccb | |
| parent | a95499092a27aecbbb73e9ec9073bff9d2d00361 (diff) | |
| download | emacs-41c1bdd9bb12005260deaafb2c0f18a8e342fd4a.tar.gz emacs-41c1bdd9bb12005260deaafb2c0f18a8e342fd4a.zip | |
Merged fringe width related changes from xfns.c.
| -rw-r--r-- | mac/src/macfns.c | 30 | ||||
| -rw-r--r-- | src/w32fns.c | 34 |
2 files changed, 51 insertions, 13 deletions
diff --git a/mac/src/macfns.c b/mac/src/macfns.c index ce281535e5d..312c9e5c719 100644 --- a/mac/src/macfns.c +++ b/mac/src/macfns.c | |||
| @@ -74,6 +74,7 @@ static unsigned char gray_bits[] = { | |||
| 74 | #endif | 74 | #endif |
| 75 | 75 | ||
| 76 | /*extern void free_frame_menubar (); | 76 | /*extern void free_frame_menubar (); |
| 77 | extern void x_compute_fringe_widths (struct frame *, int); | ||
| 77 | extern double atof (); | 78 | extern double atof (); |
| 78 | extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state); | 79 | extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state); |
| 79 | extern int quit_char;*/ | 80 | extern int quit_char;*/ |
| @@ -604,6 +605,7 @@ void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); | |||
| 604 | void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 605 | void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 605 | void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 606 | void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 606 | void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 607 | void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 608 | static void x_set_fringe_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 607 | void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 609 | void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 608 | void x_set_internal_border_width P_ ((struct frame *, Lisp_Object, | 610 | void x_set_internal_border_width P_ ((struct frame *, Lisp_Object, |
| 609 | Lisp_Object)); | 611 | Lisp_Object)); |
| @@ -659,7 +661,9 @@ static struct x_frame_parm_table x_frame_parms[] = | |||
| 659 | "scroll-bar-background", x_set_scroll_bar_background, | 661 | "scroll-bar-background", x_set_scroll_bar_background, |
| 660 | #endif | 662 | #endif |
| 661 | "screen-gamma", x_set_screen_gamma, | 663 | "screen-gamma", x_set_screen_gamma, |
| 662 | "line-spacing", x_set_line_spacing | 664 | "line-spacing", x_set_line_spacing, |
| 665 | "left-fringe", x_set_fringe_width, | ||
| 666 | "right-fringe", x_set_fringe_width | ||
| 663 | }; | 667 | }; |
| 664 | 668 | ||
| 665 | /* Attach the `x-frame-parameter' properties to | 669 | /* Attach the `x-frame-parameter' properties to |
| @@ -751,13 +755,16 @@ x_set_frame_parameters (f, alist) | |||
| 751 | /* Process foreground_color and background_color before anything else. | 755 | /* Process foreground_color and background_color before anything else. |
| 752 | They are independent of other properties, but other properties (e.g., | 756 | They are independent of other properties, but other properties (e.g., |
| 753 | cursor_color) are dependent upon them. */ | 757 | cursor_color) are dependent upon them. */ |
| 758 | /* Process default font as well, since fringe widths depends on it. */ | ||
| 754 | for (p = 0; p < i; p++) | 759 | for (p = 0; p < i; p++) |
| 755 | { | 760 | { |
| 756 | Lisp_Object prop, val; | 761 | Lisp_Object prop, val; |
| 757 | 762 | ||
| 758 | prop = parms[p]; | 763 | prop = parms[p]; |
| 759 | val = values[p]; | 764 | val = values[p]; |
| 760 | if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color)) | 765 | if (EQ (prop, Qforeground_color) |
| 766 | || EQ (prop, Qbackground_color) | ||
| 767 | || EQ (prop, Qfont)) | ||
| 761 | { | 768 | { |
| 762 | register Lisp_Object param_index, old_value; | 769 | register Lisp_Object param_index, old_value; |
| 763 | 770 | ||
| @@ -791,7 +798,9 @@ x_set_frame_parameters (f, alist) | |||
| 791 | icon_top = val; | 798 | icon_top = val; |
| 792 | else if (EQ (prop, Qicon_left)) | 799 | else if (EQ (prop, Qicon_left)) |
| 793 | icon_left = val; | 800 | icon_left = val; |
| 794 | else if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color)) | 801 | else if (EQ (prop, Qforeground_color) |
| 802 | || EQ (prop, Qbackground_color) | ||
| 803 | || EQ (prop, Qfont)) | ||
| 795 | /* Processed above. */ | 804 | /* Processed above. */ |
| 796 | continue; | 805 | continue; |
| 797 | else | 806 | else |
| @@ -2548,6 +2557,14 @@ x_set_font (f, arg, oldval) | |||
| 2548 | } | 2557 | } |
| 2549 | } | 2558 | } |
| 2550 | 2559 | ||
| 2560 | static void | ||
| 2561 | x_set_fringe_width (f, new_value, old_value) | ||
| 2562 | struct frame *f; | ||
| 2563 | Lisp_Object new_value, old_value; | ||
| 2564 | { | ||
| 2565 | x_compute_fringe_widths (f, 1); | ||
| 2566 | } | ||
| 2567 | |||
| 2551 | void | 2568 | void |
| 2552 | x_set_border_width (f, arg, oldval) | 2569 | x_set_border_width (f, arg, oldval) |
| 2553 | struct frame *f; | 2570 | struct frame *f; |
| @@ -3386,8 +3403,7 @@ x_figure_window_size (f, parms) | |||
| 3386 | : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0 | 3403 | : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0 |
| 3387 | ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f) | 3404 | ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f) |
| 3388 | : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.mac->font))); | 3405 | : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.mac->font))); |
| 3389 | f->output_data.mac->fringes_extra | 3406 | x_compute_fringe_widths (f, 0); |
| 3390 | = FRAME_FRINGE_WIDTH (f); | ||
| 3391 | f->output_data.mac->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); | 3407 | f->output_data.mac->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); |
| 3392 | f->output_data.mac->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); | 3408 | f->output_data.mac->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); |
| 3393 | 3409 | ||
| @@ -3825,6 +3841,10 @@ This function is an internal primitive--use `make-frame' instead.") | |||
| 3825 | "screenGamma", "ScreenGamma", RES_TYPE_FLOAT); | 3841 | "screenGamma", "ScreenGamma", RES_TYPE_FLOAT); |
| 3826 | x_default_parameter (f, parms, Qline_spacing, Qnil, | 3842 | x_default_parameter (f, parms, Qline_spacing, Qnil, |
| 3827 | "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); | 3843 | "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); |
| 3844 | x_default_parameter (f, parms, Qleft_fringe, Qnil, | ||
| 3845 | "leftFringe", "LeftFringe", RES_TYPE_NUMBER); | ||
| 3846 | x_default_parameter (f, parms, Qright_fringe, Qnil, | ||
| 3847 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); | ||
| 3828 | 3848 | ||
| 3829 | /* Init faces before x_default_parameter is called for scroll-bar | 3849 | /* Init faces before x_default_parameter is called for scroll-bar |
| 3830 | parameters because that function calls x_set_scroll_bar_width, | 3850 | parameters because that function calls x_set_scroll_bar_width, |
diff --git a/src/w32fns.c b/src/w32fns.c index bad08848023..b6f94e499c4 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -53,6 +53,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 53 | #include <ctype.h> | 53 | #include <ctype.h> |
| 54 | 54 | ||
| 55 | extern void free_frame_menubar (); | 55 | extern void free_frame_menubar (); |
| 56 | extern void x_compute_fringe_widths (struct frame *, int); | ||
| 56 | extern double atof (); | 57 | extern double atof (); |
| 57 | extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state); | 58 | extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state); |
| 58 | extern void w32_menu_display_help (HWND owner, HMENU menu, UINT menu_item, UINT flags); | 59 | extern void w32_menu_display_help (HWND owner, HMENU menu, UINT menu_item, UINT flags); |
| @@ -676,6 +677,7 @@ void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); | |||
| 676 | void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 677 | void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 677 | void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 678 | void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 678 | void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 679 | void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 680 | static void x_set_fringe_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); | ||
| 679 | void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); | 681 | void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
| 680 | void x_set_internal_border_width P_ ((struct frame *, Lisp_Object, | 682 | void x_set_internal_border_width P_ ((struct frame *, Lisp_Object, |
| 681 | Lisp_Object)); | 683 | Lisp_Object)); |
| @@ -718,7 +720,10 @@ static struct x_frame_parm_table x_frame_parms[] = | |||
| 718 | "visibility", x_set_visibility, | 720 | "visibility", x_set_visibility, |
| 719 | "tool-bar-lines", x_set_tool_bar_lines, | 721 | "tool-bar-lines", x_set_tool_bar_lines, |
| 720 | "screen-gamma", x_set_screen_gamma, | 722 | "screen-gamma", x_set_screen_gamma, |
| 721 | "line-spacing", x_set_line_spacing | 723 | "line-spacing", x_set_line_spacing, |
| 724 | "left-fringe", x_set_fringe_width, | ||
| 725 | "right-fringe", x_set_fringe_width | ||
| 726 | |||
| 722 | }; | 727 | }; |
| 723 | 728 | ||
| 724 | /* Attach the `x-frame-parameter' properties to | 729 | /* Attach the `x-frame-parameter' properties to |
| @@ -810,13 +815,16 @@ x_set_frame_parameters (f, alist) | |||
| 810 | /* Process foreground_color and background_color before anything else. | 815 | /* Process foreground_color and background_color before anything else. |
| 811 | They are independent of other properties, but other properties (e.g., | 816 | They are independent of other properties, but other properties (e.g., |
| 812 | cursor_color) are dependent upon them. */ | 817 | cursor_color) are dependent upon them. */ |
| 818 | /* Process default font as well, since fringe widths depends on it. */ | ||
| 813 | for (p = 0; p < i; p++) | 819 | for (p = 0; p < i; p++) |
| 814 | { | 820 | { |
| 815 | Lisp_Object prop, val; | 821 | Lisp_Object prop, val; |
| 816 | 822 | ||
| 817 | prop = parms[p]; | 823 | prop = parms[p]; |
| 818 | val = values[p]; | 824 | val = values[p]; |
| 819 | if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color)) | 825 | if (EQ (prop, Qforeground_color) |
| 826 | || EQ (prop, Qbackground_color) | ||
| 827 | || EQ (prop, Qfont)) | ||
| 820 | { | 828 | { |
| 821 | register Lisp_Object param_index, old_value; | 829 | register Lisp_Object param_index, old_value; |
| 822 | 830 | ||
| @@ -855,7 +863,9 @@ x_set_frame_parameters (f, alist) | |||
| 855 | icon_top = val; | 863 | icon_top = val; |
| 856 | else if (EQ (prop, Qicon_left)) | 864 | else if (EQ (prop, Qicon_left)) |
| 857 | icon_left = val; | 865 | icon_left = val; |
| 858 | else if (EQ (prop, Qforeground_color) || EQ (prop, Qbackground_color)) | 866 | else if (EQ (prop, Qforeground_color) |
| 867 | || EQ (prop, Qbackground_color) | ||
| 868 | || EQ (prop, Qfont)) | ||
| 859 | /* Processed above. */ | 869 | /* Processed above. */ |
| 860 | continue; | 870 | continue; |
| 861 | else | 871 | else |
| @@ -2438,6 +2448,14 @@ x_set_font (f, arg, oldval) | |||
| 2438 | } | 2448 | } |
| 2439 | } | 2449 | } |
| 2440 | 2450 | ||
| 2451 | static void | ||
| 2452 | x_set_fringe_width (f, new_value, old_value) | ||
| 2453 | struct frame *f; | ||
| 2454 | Lisp_Object new_value, old_value; | ||
| 2455 | { | ||
| 2456 | x_compute_fringe_widths (f, 1); | ||
| 2457 | } | ||
| 2458 | |||
| 2441 | void | 2459 | void |
| 2442 | x_set_border_width (f, arg, oldval) | 2460 | x_set_border_width (f, arg, oldval) |
| 2443 | struct frame *f; | 2461 | struct frame *f; |
| @@ -3248,8 +3266,7 @@ x_figure_window_size (f, parms) | |||
| 3248 | : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0 | 3266 | : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0 |
| 3249 | ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f) | 3267 | ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f) |
| 3250 | : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.w32->font))); | 3268 | : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.w32->font))); |
| 3251 | f->output_data.w32->fringes_extra | 3269 | x_compute_fringe_widths (f, 0); |
| 3252 | = FRAME_FRINGE_WIDTH (f); | ||
| 3253 | f->output_data.w32->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); | 3270 | f->output_data.w32->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); |
| 3254 | f->output_data.w32->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); | 3271 | f->output_data.w32->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); |
| 3255 | 3272 | ||
| @@ -5449,6 +5466,10 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 5449 | "screenGamma", "ScreenGamma", RES_TYPE_FLOAT); | 5466 | "screenGamma", "ScreenGamma", RES_TYPE_FLOAT); |
| 5450 | x_default_parameter (f, parms, Qline_spacing, Qnil, | 5467 | x_default_parameter (f, parms, Qline_spacing, Qnil, |
| 5451 | "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); | 5468 | "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); |
| 5469 | x_default_parameter (f, parms, Qleft_fringe, Qnil, | ||
| 5470 | "leftFringe", "LeftFringe", RES_TYPE_NUMBER); | ||
| 5471 | x_default_parameter (f, parms, Qright_fringe, Qnil, | ||
| 5472 | "rightFringe", "RightFringe", RES_TYPE_NUMBER); | ||
| 5452 | 5473 | ||
| 5453 | 5474 | ||
| 5454 | /* Init faces before x_default_parameter is called for scroll-bar | 5475 | /* Init faces before x_default_parameter is called for scroll-bar |
| @@ -13237,9 +13258,6 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 13237 | f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; | 13258 | f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; |
| 13238 | window_prompting = x_figure_window_size (f, parms); | 13259 | window_prompting = x_figure_window_size (f, parms); |
| 13239 | 13260 | ||
| 13240 | /* No fringes on tip frame. */ | ||
| 13241 | f->output_data.w32->fringes_extra = 0; | ||
| 13242 | |||
| 13243 | if (window_prompting & XNegative) | 13261 | if (window_prompting & XNegative) |
| 13244 | { | 13262 | { |
| 13245 | if (window_prompting & YNegative) | 13263 | if (window_prompting & YNegative) |