aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-04-24 13:56:04 +0000
committerGerd Moellmann2000-04-24 13:56:04 +0000
commit563b67aafd1cdfa239c5ce1f6d3d6fc5567dee39 (patch)
treed00c4d682ab9b47205351defdb44b59ebffcd5d6 /src
parentecb5709c703b20faf619a58c4da67f81c2142052 (diff)
downloademacs-563b67aafd1cdfa239c5ce1f6d3d6fc5567dee39.tar.gz
emacs-563b67aafd1cdfa239c5ce1f6d3d6fc5567dee39.zip
(x_set_line_spacing): New function.
(Fx_create_frame): Set line spacing from resources. (Qline_spacing): New variable. (syms_of_xfns): Initialize Qline_spacing.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c76
1 files changed, 51 insertions, 25 deletions
diff --git a/src/xfns.c b/src/xfns.c
index edd718b6b89..7cbe2a3d6f9 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -236,7 +236,7 @@ Lisp_Object Quser_position;
236Lisp_Object Quser_size; 236Lisp_Object Quser_size;
237extern Lisp_Object Qdisplay; 237extern Lisp_Object Qdisplay;
238Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background; 238Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background;
239Lisp_Object Qscreen_gamma; 239Lisp_Object Qscreen_gamma, Qline_spacing;
240 240
241/* The below are defined in frame.c. */ 241/* The below are defined in frame.c. */
242 242
@@ -740,6 +740,7 @@ struct x_frame_parm_table
740 740
741static void x_create_im P_ ((struct frame *)); 741static void x_create_im P_ ((struct frame *));
742void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); 742void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
743static void x_set_line_spacing P_ ((struct frame *, Lisp_Object, Lisp_Object));
743void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); 744void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
744void x_set_mouse_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); 745void x_set_mouse_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
745void x_set_cursor_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); 746void x_set_cursor_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
@@ -775,30 +776,31 @@ static void x_set_screen_gamma P_ ((struct frame *, Lisp_Object, Lisp_Object));
775 776
776static struct x_frame_parm_table x_frame_parms[] = 777static struct x_frame_parm_table x_frame_parms[] =
777{ 778{
778 "auto-raise", x_set_autoraise, 779 "auto-raise", x_set_autoraise,
779 "auto-lower", x_set_autolower, 780 "auto-lower", x_set_autolower,
780 "background-color", x_set_background_color, 781 "background-color", x_set_background_color,
781 "border-color", x_set_border_color, 782 "border-color", x_set_border_color,
782 "border-width", x_set_border_width, 783 "border-width", x_set_border_width,
783 "cursor-color", x_set_cursor_color, 784 "cursor-color", x_set_cursor_color,
784 "cursor-type", x_set_cursor_type, 785 "cursor-type", x_set_cursor_type,
785 "font", x_set_font, 786 "font", x_set_font,
786 "foreground-color", x_set_foreground_color, 787 "foreground-color", x_set_foreground_color,
787 "icon-name", x_set_icon_name, 788 "icon-name", x_set_icon_name,
788 "icon-type", x_set_icon_type, 789 "icon-type", x_set_icon_type,
789 "internal-border-width", x_set_internal_border_width, 790 "internal-border-width", x_set_internal_border_width,
790 "menu-bar-lines", x_set_menu_bar_lines, 791 "menu-bar-lines", x_set_menu_bar_lines,
791 "mouse-color", x_set_mouse_color, 792 "mouse-color", x_set_mouse_color,
792 "name", x_explicitly_set_name, 793 "name", x_explicitly_set_name,
793 "scroll-bar-width", x_set_scroll_bar_width, 794 "scroll-bar-width", x_set_scroll_bar_width,
794 "title", x_set_title, 795 "title", x_set_title,
795 "unsplittable", x_set_unsplittable, 796 "unsplittable", x_set_unsplittable,
796 "vertical-scroll-bars", x_set_vertical_scroll_bars, 797 "vertical-scroll-bars", x_set_vertical_scroll_bars,
797 "visibility", x_set_visibility, 798 "visibility", x_set_visibility,
798 "tool-bar-lines", x_set_tool_bar_lines, 799 "tool-bar-lines", x_set_tool_bar_lines,
799 "scroll-bar-foreground", x_set_scroll_bar_foreground, 800 "scroll-bar-foreground", x_set_scroll_bar_foreground,
800 "scroll-bar-background", x_set_scroll_bar_background, 801 "scroll-bar-background", x_set_scroll_bar_background,
801 "screen-gamma", x_set_screen_gamma 802 "screen-gamma", x_set_screen_gamma,
803 "line-spacing", x_set_line_spacing
802}; 804};
803 805
804/* Attach the `x-frame-parameter' properties to 806/* Attach the `x-frame-parameter' properties to
@@ -1288,6 +1290,26 @@ x_decode_color (f, color_name, mono_color)
1288 1290
1289 1291
1290 1292
1293/* Change the `line-spacing' frame parameter of frame F. OLD_VALUE is
1294 the previous value of that parameter, NEW_VALUE is the new value. */
1295
1296static void
1297x_set_line_spacing (f, new_value, old_value)
1298 struct frame *f;
1299 Lisp_Object new_value, old_value;
1300{
1301 if (NILP (new_value))
1302 f->extra_line_spacing = 0;
1303 else if (NATNUMP (new_value))
1304 f->extra_line_spacing = XFASTINT (new_value);
1305 else
1306 Fsignal (Qerror, Fcons (build_string ("Illegal line-spacing"),
1307 Fcons (new_value, Qnil)));
1308 if (FRAME_VISIBLE_P (f))
1309 redraw_frame (f);
1310}
1311
1312
1291/* Change the `screen-gamma' frame parameter of frame F. OLD_VALUE is 1313/* Change the `screen-gamma' frame parameter of frame F. OLD_VALUE is
1292 the previous value of that parameter, NEW_VALUE is the new value. */ 1314 the previous value of that parameter, NEW_VALUE is the new value. */
1293 1315
@@ -4022,6 +4044,8 @@ This function is an internal primitive--use `make-frame' instead.")
4022 "borderColor", "BorderColor", RES_TYPE_STRING); 4044 "borderColor", "BorderColor", RES_TYPE_STRING);
4023 x_default_parameter (f, parms, Qscreen_gamma, Qnil, 4045 x_default_parameter (f, parms, Qscreen_gamma, Qnil,
4024 "screenGamma", "ScreenGamma", RES_TYPE_FLOAT); 4046 "screenGamma", "ScreenGamma", RES_TYPE_FLOAT);
4047 x_default_parameter (f, parms, Qline_spacing, Qnil,
4048 "lineSpacing", "LineSpacing", RES_TYPE_NUMBER);
4025 4049
4026 x_default_scroll_bar_color_parameter (f, parms, Qscroll_bar_foreground, 4050 x_default_scroll_bar_color_parameter (f, parms, Qscroll_bar_foreground,
4027 "scrollBarForeground", 4051 "scrollBarForeground",
@@ -10127,6 +10151,8 @@ syms_of_xfns ()
10127 staticpro (&Qscroll_bar_background); 10151 staticpro (&Qscroll_bar_background);
10128 Qscreen_gamma = intern ("screen-gamma"); 10152 Qscreen_gamma = intern ("screen-gamma");
10129 staticpro (&Qscreen_gamma); 10153 staticpro (&Qscreen_gamma);
10154 Qline_spacing = intern ("line-spacing");
10155 staticpro (&Qline_spacing);
10130 /* This is the end of symbol initialization. */ 10156 /* This is the end of symbol initialization. */
10131 10157
10132 /* Text property `display' should be nonsticky by default. */ 10158 /* Text property `display' should be nonsticky by default. */