diff options
| author | Richard M. Stallman | 1996-09-21 01:14:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-21 01:14:57 +0000 |
| commit | 1ab3d87e2fa3e5f0258d94feeb75ce2bbc9f619a (patch) | |
| tree | 5d7dc8a6b709c59eba2e72545a0bb18070ef2e44 /src | |
| parent | c8738c33c586a3b99adb3184bf2879c8d5fa325a (diff) | |
| download | emacs-1ab3d87e2fa3e5f0258d94feeb75ce2bbc9f619a.tar.gz emacs-1ab3d87e2fa3e5f0258d94feeb75ce2bbc9f619a.zip | |
(Fx_create_frame): Default Qvertical_scroll_bars to `left'.
Add the symbol `right'; this symbol is used to indicate
that a right-side scroll bar is wanted.
(x_set_vertical_scroll_bars): Check for left<->right<->none
scroll bar changes, and modify the vertical scroll bar type as appropriate.
(x_figure_window_size): Use new SET_FRAME_WIDTH macro.
(Fx_create_frame): Likewise.
(Fx_horizontal_line): Use new macro WINDOW_LEFT_MARGIN.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/xfns.c b/src/xfns.c index 6908d3c4c51..235081fa3fc 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -179,6 +179,7 @@ Lisp_Object Qicon_type; | |||
| 179 | Lisp_Object Qicon_name; | 179 | Lisp_Object Qicon_name; |
| 180 | Lisp_Object Qinternal_border_width; | 180 | Lisp_Object Qinternal_border_width; |
| 181 | Lisp_Object Qleft; | 181 | Lisp_Object Qleft; |
| 182 | Lisp_Object Qright; | ||
| 182 | Lisp_Object Qmouse_color; | 183 | Lisp_Object Qmouse_color; |
| 183 | Lisp_Object Qnone; | 184 | Lisp_Object Qnone; |
| 184 | Lisp_Object Qparent_id; | 185 | Lisp_Object Qparent_id; |
| @@ -1939,9 +1940,17 @@ x_set_vertical_scroll_bars (f, arg, oldval) | |||
| 1939 | struct frame *f; | 1940 | struct frame *f; |
| 1940 | Lisp_Object arg, oldval; | 1941 | Lisp_Object arg, oldval; |
| 1941 | { | 1942 | { |
| 1942 | if (NILP (arg) != ! FRAME_HAS_VERTICAL_SCROLL_BARS (f)) | 1943 | if ((EQ (arg, Qleft) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f)) |
| 1944 | || (EQ (arg, Qright) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) | ||
| 1945 | || (NILP (arg) && FRAME_HAS_VERTICAL_SCROLL_BARS (f)) | ||
| 1946 | || (!NILP (arg) && ! FRAME_HAS_VERTICAL_SCROLL_BARS (f))) | ||
| 1943 | { | 1947 | { |
| 1944 | FRAME_HAS_VERTICAL_SCROLL_BARS (f) = ! NILP (arg); | 1948 | FRAME_VERTICAL_SCROLL_BAR_TYPE (f) |
| 1949 | = (NILP (arg) | ||
| 1950 | ? vertical_scroll_bar_none | ||
| 1951 | : EQ (Qright, arg) | ||
| 1952 | ? vertical_scroll_bar_right | ||
| 1953 | : vertical_scroll_bar_left); | ||
| 1945 | 1954 | ||
| 1946 | /* We set this parameter before creating the X window for the | 1955 | /* We set this parameter before creating the X window for the |
| 1947 | frame, so we can get the geometry right from the start. | 1956 | frame, so we can get the geometry right from the start. |
| @@ -2354,7 +2363,7 @@ x_figure_window_size (f, parms) | |||
| 2354 | /* Default values if we fall through. | 2363 | /* Default values if we fall through. |
| 2355 | Actually, if that happens we should get | 2364 | Actually, if that happens we should get |
| 2356 | window manager prompting. */ | 2365 | window manager prompting. */ |
| 2357 | f->width = DEFAULT_COLS; | 2366 | SET_FRAME_WIDTH (f, DEFAULT_COLS); |
| 2358 | f->height = DEFAULT_ROWS; | 2367 | f->height = DEFAULT_ROWS; |
| 2359 | /* Window managers expect that if program-specified | 2368 | /* Window managers expect that if program-specified |
| 2360 | positions are not (0,0), they're intentional, not defaults. */ | 2369 | positions are not (0,0), they're intentional, not defaults. */ |
| @@ -2374,7 +2383,7 @@ x_figure_window_size (f, parms) | |||
| 2374 | if (!EQ (tem1, Qunbound)) | 2383 | if (!EQ (tem1, Qunbound)) |
| 2375 | { | 2384 | { |
| 2376 | CHECK_NUMBER (tem1, 0); | 2385 | CHECK_NUMBER (tem1, 0); |
| 2377 | f->width = XINT (tem1); | 2386 | SET_FRAME_WIDTH (f, XINT (tem1)); |
| 2378 | } | 2387 | } |
| 2379 | if (!NILP (tem2) && !EQ (tem2, Qunbound)) | 2388 | if (!NILP (tem2) && !EQ (tem2, Qunbound)) |
| 2380 | window_prompting |= USSize; | 2389 | window_prompting |= USSize; |
| @@ -3195,7 +3204,7 @@ This function is an internal primitive--use `make-frame' instead.") | |||
| 3195 | } | 3204 | } |
| 3196 | x_default_parameter (f, parms, Qinternal_border_width, make_number (2), | 3205 | x_default_parameter (f, parms, Qinternal_border_width, make_number (2), |
| 3197 | "internalBorderWidth", "BorderWidth", number); | 3206 | "internalBorderWidth", "BorderWidth", number); |
| 3198 | x_default_parameter (f, parms, Qvertical_scroll_bars, Qt, | 3207 | x_default_parameter (f, parms, Qvertical_scroll_bars, Qleft, |
| 3199 | "verticalScrollBars", "ScrollBars", boolean); | 3208 | "verticalScrollBars", "ScrollBars", boolean); |
| 3200 | 3209 | ||
| 3201 | /* Also do the stuff which must be set before the window exists. */ | 3210 | /* Also do the stuff which must be set before the window exists. */ |
| @@ -3265,7 +3274,8 @@ This function is an internal primitive--use `make-frame' instead.") | |||
| 3265 | f->height. */ | 3274 | f->height. */ |
| 3266 | width = f->width; | 3275 | width = f->width; |
| 3267 | height = f->height; | 3276 | height = f->height; |
| 3268 | f->height = f->width = 0; | 3277 | f->height = 0; |
| 3278 | SET_FRAME_WIDTH (f, 0); | ||
| 3269 | change_frame_size (f, height, width, 1, 0); | 3279 | change_frame_size (f, height, width, 1, 0); |
| 3270 | 3280 | ||
| 3271 | /* Tell the server what size and position, etc, we want, | 3281 | /* Tell the server what size and position, etc, we want, |
| @@ -4374,7 +4384,7 @@ DEFUN ("x-horizontal-line", Fx_horizontal_line, Sx_horizontal_line, 1, 1, "e", | |||
| 4374 | register int line = (x_mouse_y + 1) * f->output_data.x->line_height | 4384 | register int line = (x_mouse_y + 1) * f->output_data.x->line_height |
| 4375 | + f->output_data.x->internal_border_width; | 4385 | + f->output_data.x->internal_border_width; |
| 4376 | register int left = f->output_data.x->internal_border_width | 4386 | register int left = f->output_data.x->internal_border_width |
| 4377 | + (w->left | 4387 | + (WINDOW_LEFT_MARGIN (w) |
| 4378 | * FONT_WIDTH (f->output_data.x->font)); | 4388 | * FONT_WIDTH (f->output_data.x->font)); |
| 4379 | register int right = left + (w->width | 4389 | register int right = left + (w->width |
| 4380 | * FONT_WIDTH (f->output_data.x->font)) | 4390 | * FONT_WIDTH (f->output_data.x->font)) |
| @@ -5074,6 +5084,8 @@ syms_of_xfns () | |||
| 5074 | staticpro (&Qinternal_border_width); | 5084 | staticpro (&Qinternal_border_width); |
| 5075 | Qleft = intern ("left"); | 5085 | Qleft = intern ("left"); |
| 5076 | staticpro (&Qleft); | 5086 | staticpro (&Qleft); |
| 5087 | Qright = intern ("right"); | ||
| 5088 | staticpro (&Qright); | ||
| 5077 | Qmouse_color = intern ("mouse-color"); | 5089 | Qmouse_color = intern ("mouse-color"); |
| 5078 | staticpro (&Qmouse_color); | 5090 | staticpro (&Qmouse_color); |
| 5079 | Qnone = intern ("none"); | 5091 | Qnone = intern ("none"); |