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 /mac/src | |
| parent | a95499092a27aecbbb73e9ec9073bff9d2d00361 (diff) | |
| download | emacs-41c1bdd9bb12005260deaafb2c0f18a8e342fd4a.tar.gz emacs-41c1bdd9bb12005260deaafb2c0f18a8e342fd4a.zip | |
Merged fringe width related changes from xfns.c.
Diffstat (limited to 'mac/src')
| -rw-r--r-- | mac/src/macfns.c | 30 |
1 files changed, 25 insertions, 5 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, |