diff options
| author | Karl Heuer | 1994-09-20 05:07:53 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-09-20 05:07:53 +0000 |
| commit | 4701395c1a92773cf4444da714a1f64e6a9ee723 (patch) | |
| tree | c04e745597b54a7b9eee101dcadb2e7d945f740c /src | |
| parent | 480407eb720feca072c99128117ffa80fd46a9ba (diff) | |
| download | emacs-4701395c1a92773cf4444da714a1f64e6a9ee723.tar.gz emacs-4701395c1a92773cf4444da714a1f64e6a9ee723.zip | |
(x_set_scroll_bar_width): New function.
(x_frame_parms): Add that function to this table.
(Qscroll_bar_width): New symbol.
(syms_of_xfns): Initialize and staticpro it.
(Fx_create_frame): Set default scroll bar width.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/xfns.c b/src/xfns.c index 19ca98b3175..1a498a46d61 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -205,7 +205,6 @@ Lisp_Object Qcursor_type; | |||
| 205 | Lisp_Object Qfont; | 205 | Lisp_Object Qfont; |
| 206 | Lisp_Object Qforeground_color; | 206 | Lisp_Object Qforeground_color; |
| 207 | Lisp_Object Qgeometry; | 207 | Lisp_Object Qgeometry; |
| 208 | /* Lisp_Object Qicon; */ | ||
| 209 | Lisp_Object Qicon_left; | 208 | Lisp_Object Qicon_left; |
| 210 | Lisp_Object Qicon_top; | 209 | Lisp_Object Qicon_top; |
| 211 | Lisp_Object Qicon_type; | 210 | Lisp_Object Qicon_type; |
| @@ -214,6 +213,7 @@ Lisp_Object Qleft; | |||
| 214 | Lisp_Object Qmouse_color; | 213 | Lisp_Object Qmouse_color; |
| 215 | Lisp_Object Qnone; | 214 | Lisp_Object Qnone; |
| 216 | Lisp_Object Qparent_id; | 215 | Lisp_Object Qparent_id; |
| 216 | Lisp_Object Qscroll_bar_width; | ||
| 217 | Lisp_Object Qsuppress_icon; | 217 | Lisp_Object Qsuppress_icon; |
| 218 | Lisp_Object Qtop; | 218 | Lisp_Object Qtop; |
| 219 | Lisp_Object Qundefined_color; | 219 | Lisp_Object Qundefined_color; |
| @@ -401,6 +401,7 @@ void x_set_autolower (); | |||
| 401 | void x_set_vertical_scroll_bars (); | 401 | void x_set_vertical_scroll_bars (); |
| 402 | void x_set_visibility (); | 402 | void x_set_visibility (); |
| 403 | void x_set_menu_bar_lines (); | 403 | void x_set_menu_bar_lines (); |
| 404 | void x_set_scroll_bar_width (); | ||
| 404 | 405 | ||
| 405 | static struct x_frame_parm_table x_frame_parms[] = | 406 | static struct x_frame_parm_table x_frame_parms[] = |
| 406 | { | 407 | { |
| @@ -420,6 +421,7 @@ static struct x_frame_parm_table x_frame_parms[] = | |||
| 420 | "vertical-scroll-bars", x_set_vertical_scroll_bars, | 421 | "vertical-scroll-bars", x_set_vertical_scroll_bars, |
| 421 | "visibility", x_set_visibility, | 422 | "visibility", x_set_visibility, |
| 422 | "menu-bar-lines", x_set_menu_bar_lines, | 423 | "menu-bar-lines", x_set_menu_bar_lines, |
| 424 | "scroll-bar-width", x_set_scroll_bar_width, | ||
| 423 | }; | 425 | }; |
| 424 | 426 | ||
| 425 | /* Attach the `x-frame-parameter' properties to | 427 | /* Attach the `x-frame-parameter' properties to |
| @@ -1321,6 +1323,21 @@ x_set_vertical_scroll_bars (f, arg, oldval) | |||
| 1321 | x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f)); | 1323 | x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f)); |
| 1322 | } | 1324 | } |
| 1323 | } | 1325 | } |
| 1326 | |||
| 1327 | void | ||
| 1328 | x_set_scroll_bar_width (f, arg, oldval) | ||
| 1329 | struct frame *f; | ||
| 1330 | Lisp_Object arg, oldval; | ||
| 1331 | { | ||
| 1332 | if (XFASTINT (arg) != FRAME_SCROLL_BAR_PIXEL_WIDTH (f)) | ||
| 1333 | { | ||
| 1334 | int wid = FONT_WIDTH (f->display.x->font); | ||
| 1335 | FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = XFASTINT (arg); | ||
| 1336 | FRAME_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + wid-1) / wid; | ||
| 1337 | if (FRAME_X_WINDOW (f)) | ||
| 1338 | x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f)); | ||
| 1339 | } | ||
| 1340 | } | ||
| 1324 | 1341 | ||
| 1325 | /* Subroutines of creating an X frame. */ | 1342 | /* Subroutines of creating an X frame. */ |
| 1326 | 1343 | ||
| @@ -1674,7 +1691,7 @@ x_figure_window_size (f, parms) | |||
| 1674 | 1691 | ||
| 1675 | f->display.x->vertical_scroll_bar_extra | 1692 | f->display.x->vertical_scroll_bar_extra |
| 1676 | = (FRAME_HAS_VERTICAL_SCROLL_BARS (f) | 1693 | = (FRAME_HAS_VERTICAL_SCROLL_BARS (f) |
| 1677 | ? VERTICAL_SCROLL_BAR_PIXEL_WIDTH (f) | 1694 | ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f) |
| 1678 | : 0); | 1695 | : 0); |
| 1679 | f->display.x->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); | 1696 | f->display.x->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width); |
| 1680 | f->display.x->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); | 1697 | f->display.x->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height); |
| @@ -2288,6 +2305,8 @@ be shared by the new frame.") | |||
| 2288 | 2305 | ||
| 2289 | x_default_parameter (f, parms, Qmenu_bar_lines, make_number (1), | 2306 | x_default_parameter (f, parms, Qmenu_bar_lines, make_number (1), |
| 2290 | "menuBarLines", "MenuBarLines", number); | 2307 | "menuBarLines", "MenuBarLines", number); |
| 2308 | x_default_parameter (f, parms, Qscroll_bar_width, make_number (12), | ||
| 2309 | "scrollBarWidth", "ScrollBarWidth", number); | ||
| 2291 | 2310 | ||
| 2292 | f->display.x->parent_desc = ROOT_WINDOW; | 2311 | f->display.x->parent_desc = ROOT_WINDOW; |
| 2293 | window_prompting = x_figure_window_size (f, parms); | 2312 | window_prompting = x_figure_window_size (f, parms); |
| @@ -3944,6 +3963,8 @@ syms_of_xfns () | |||
| 3944 | staticpro (&Qnone); | 3963 | staticpro (&Qnone); |
| 3945 | Qparent_id = intern ("parent-id"); | 3964 | Qparent_id = intern ("parent-id"); |
| 3946 | staticpro (&Qparent_id); | 3965 | staticpro (&Qparent_id); |
| 3966 | Qscroll_bar_width = intern ("scroll-bar-width"); | ||
| 3967 | staticpro (&Qscroll_bar_width); | ||
| 3947 | Qsuppress_icon = intern ("suppress-icon"); | 3968 | Qsuppress_icon = intern ("suppress-icon"); |
| 3948 | staticpro (&Qsuppress_icon); | 3969 | staticpro (&Qsuppress_icon); |
| 3949 | Qtop = intern ("top"); | 3970 | Qtop = intern ("top"); |