aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2003-05-24 21:59:47 +0000
committerKim F. Storm2003-05-24 21:59:47 +0000
commita3168f58f02b355386ee42203517ba8e5b65591c (patch)
treed0fb82b34954018a6223eaa3f1e1c4e0f7628d4d
parent2cdbe73edfe73c1d21eefa3f7a32628e1345da4e (diff)
downloademacs-a3168f58f02b355386ee42203517ba8e5b65591c.tar.gz
emacs-a3168f58f02b355386ee42203517ba8e5b65591c.zip
Make (several) trivial substitutions for renamed and
new macros in dispextern.h, frame.h and window.h. (x_real_positions): Set f->x_pixels_diff and f->y_pixels_diff to 0.
-rw-r--r--src/macfns.c80
1 files changed, 42 insertions, 38 deletions
diff --git a/src/macfns.c b/src/macfns.c
index ebaf2ee49e1..003ae084c2c 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -610,6 +610,10 @@ x_real_positions (f, xptr, yptr)
610 LocalToGlobal (&pt); 610 LocalToGlobal (&pt);
611 SetPort (oldport); 611 SetPort (oldport);
612 612
613 /* MAC has no frame pixel diff. */
614 f->x_pixels_diff = 0;
615 f->y_pixels_diff = 0;
616
613 *xptr = pt.h; 617 *xptr = pt.h;
614 *yptr = pt.v; 618 *yptr = pt.v;
615} 619}
@@ -1896,7 +1900,7 @@ x_set_border_pixel (f, pix)
1896{ 1900{
1897 f->output_data.mac->border_pixel = pix; 1901 f->output_data.mac->border_pixel = pix;
1898 1902
1899 if (FRAME_MAC_WINDOW (f) != 0 && f->output_data.mac->border_width > 0) 1903 if (FRAME_MAC_WINDOW (f) != 0 && f->border_width > 0)
1900 { 1904 {
1901 if (FRAME_VISIBLE_P (f)) 1905 if (FRAME_VISIBLE_P (f))
1902 redraw_frame (f); 1906 redraw_frame (f);
@@ -2049,7 +2053,7 @@ x_set_menu_bar_lines (f, value, oldval)
2049 /* Adjust the frame size so that the client (text) dimensions 2053 /* Adjust the frame size so that the client (text) dimensions
2050 remain the same. This depends on FRAME_EXTERNAL_MENU_BAR being 2054 remain the same. This depends on FRAME_EXTERNAL_MENU_BAR being
2051 set correctly. */ 2055 set correctly. */
2052 x_set_window_size (f, 0, FRAME_WIDTH (f), FRAME_HEIGHT (f)); 2056 x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
2053 do_pending_window_change (0); 2057 do_pending_window_change (0);
2054 } 2058 }
2055 adjust_glyphs (f); 2059 adjust_glyphs (f);
@@ -2087,7 +2091,7 @@ x_set_tool_bar_lines (f, value, oldval)
2087 2091
2088 /* Don't resize the tool-bar to more than we have room for. */ 2092 /* Don't resize the tool-bar to more than we have room for. */
2089 root_window = FRAME_ROOT_WINDOW (f); 2093 root_window = FRAME_ROOT_WINDOW (f);
2090 root_height = XINT (XWINDOW (root_window)->height); 2094 root_height = WINDOW_TOTAL_LINES (XWINDOW (root_window));
2091 if (root_height - delta < 1) 2095 if (root_height - delta < 1)
2092 { 2096 {
2093 delta = root_height - 1; 2097 delta = root_height - 1;
@@ -2118,8 +2122,8 @@ x_set_tool_bar_lines (f, value, oldval)
2118 if (delta < 0) 2122 if (delta < 0)
2119 { 2123 {
2120 int height = FRAME_INTERNAL_BORDER_WIDTH (f); 2124 int height = FRAME_INTERNAL_BORDER_WIDTH (f);
2121 int width = PIXEL_WIDTH (f); 2125 int width = FRAME_PIXEL_WIDTH (f);
2122 int y = nlines * CANON_Y_UNIT (f); 2126 int y = nlines * FRAME_LINE_HEIGHT (f);
2123 2127
2124 BLOCK_INPUT; 2128 BLOCK_INPUT;
2125 XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), 2129 XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
@@ -2292,20 +2296,20 @@ x_set_scroll_bar_default_width (f)
2292{ 2296{
2293 /* Imitate X without X Toolkit */ 2297 /* Imitate X without X Toolkit */
2294 2298
2295 int wid = FONT_WIDTH (f->output_data.mac->font); 2299 int wid = FRAME_COLUMN_WIDTH (f);
2296 2300
2297#ifdef MAC_OSX 2301#ifdef MAC_OSX
2298 FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = 16; /* Aqua scroll bars. */ 2302 FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = 16; /* Aqua scroll bars. */
2299 FRAME_SCROLL_BAR_COLS (f) = (FRAME_SCROLL_BAR_PIXEL_WIDTH (f) + 2303 FRAME_CONFIG_SCROLL_BAR_COLS (f) = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) +
2300 wid - 1) / wid; 2304 wid - 1) / wid;
2301#else /* not MAC_OSX */ 2305#else /* not MAC_OSX */
2302 /* Make the actual width at least 14 pixels and a multiple of a 2306 /* Make the actual width at least 14 pixels and a multiple of a
2303 character width. */ 2307 character width. */
2304 FRAME_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid; 2308 FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
2305 2309
2306 /* Use all of that space (aside from required margins) for the 2310 /* Use all of that space (aside from required margins) for the
2307 scroll bar. */ 2311 scroll bar. */
2308 FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = 0; 2312 FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = 0;
2309#endif /* not MAC_OSX */ 2313#endif /* not MAC_OSX */
2310} 2314}
2311 2315
@@ -2507,9 +2511,9 @@ mac_window (f, window_prompting, minibuffer_only)
2507 strcpy (f->namebuf, str); 2511 strcpy (f->namebuf, str);
2508 } 2512 }
2509 2513
2510 SetRect (&r, f->output_data.mac->left_pos, f->output_data.mac->top_pos, 2514 SetRect (&r, f->left_pos, f->top_pos,
2511 f->output_data.mac->left_pos + PIXEL_WIDTH (f), 2515 f->left_pos + FRAME_PIXEL_WIDTH (f),
2512 f->output_data.mac->top_pos + PIXEL_HEIGHT (f)); 2516 f->top_pos + FRAME_PIXEL_HEIGHT (f));
2513 FRAME_MAC_WINDOW (f) 2517 FRAME_MAC_WINDOW (f)
2514 = NewCWindow (NULL, &r, "\p", 1, zoomDocProc, (WindowPtr) -1, 1, (long) f->output_data.mac); 2518 = NewCWindow (NULL, &r, "\p", 1, zoomDocProc, (WindowPtr) -1, 1, (long) f->output_data.mac);
2515 2519
@@ -2597,7 +2601,7 @@ x_make_gc (f)
2597 Note that many default values are used. */ 2601 Note that many default values are used. */
2598 2602
2599 /* Normal video */ 2603 /* Normal video */
2600 gc_values.font = f->output_data.mac->font; 2604 gc_values.font = FRAME_FONT (f);
2601 gc_values.foreground = FRAME_FOREGROUND_PIXEL (f); 2605 gc_values.foreground = FRAME_FOREGROUND_PIXEL (f);
2602 gc_values.background = FRAME_BACKGROUND_PIXEL (f); 2606 gc_values.background = FRAME_BACKGROUND_PIXEL (f);
2603 f->output_data.mac->normal_gc = XCreateGC (FRAME_MAC_DISPLAY (f), 2607 f->output_data.mac->normal_gc = XCreateGC (FRAME_MAC_DISPLAY (f),
@@ -2881,7 +2885,7 @@ This function is an internal primitive--use `make-frame' instead. */)
2881 tool-bar height don't change the frame size. This is done so that 2885 tool-bar height don't change the frame size. This is done so that
2882 users can create tall Emacs frames without having to guess how 2886 users can create tall Emacs frames without having to guess how
2883 tall the tool-bar will get. */ 2887 tall the tool-bar will get. */
2884 f->height += FRAME_TOOL_BAR_LINES (f); 2888 FRAME_LINES (f) += FRAME_TOOL_BAR_LINES (f);
2885 2889
2886 /* mac_window (f, window_prompting, minibuffer_only); */ 2890 /* mac_window (f, window_prompting, minibuffer_only); */
2887 make_mac_frame (f); 2891 make_mac_frame (f);
@@ -2908,14 +2912,14 @@ This function is an internal primitive--use `make-frame' instead. */)
2908 x_default_parameter (f, parms, Qscroll_bar_width, Qnil, 2912 x_default_parameter (f, parms, Qscroll_bar_width, Qnil,
2909 "scrollBarWidth", "ScrollBarWidth", RES_TYPE_NUMBER); 2913 "scrollBarWidth", "ScrollBarWidth", RES_TYPE_NUMBER);
2910 2914
2911 /* Dimensions, especially f->height, must be done via change_frame_size. 2915 /* Dimensions, especially FRAME_LINES (f), must be done via change_frame_size.
2912 Change will not be effected unless different from the current 2916 Change will not be effected unless different from the current
2913 f->height. */ 2917 FRAME_LINES (f). */
2914 width = f->width; 2918 width = FRAME_COLS (f);
2915 height = f->height; 2919 height = FRAME_LINES (f);
2916 2920
2917 f->height = 0; 2921 FRAME_LINES (f) = 0;
2918 SET_FRAME_WIDTH (f, 0); 2922 SET_FRAME_COLS (f, 0);
2919 change_frame_size (f, height, width, 1, 0, 0); 2923 change_frame_size (f, height, width, 1, 0, 0);
2920 2924
2921 /* Set up faces after all frame parameters are known. */ 2925 /* Set up faces after all frame parameters are known. */
@@ -3265,28 +3269,28 @@ int
3265x_pixel_width (f) 3269x_pixel_width (f)
3266 register struct frame *f; 3270 register struct frame *f;
3267{ 3271{
3268 return PIXEL_WIDTH (f); 3272 return FRAME_PIXEL_WIDTH (f);
3269} 3273}
3270 3274
3271int 3275int
3272x_pixel_height (f) 3276x_pixel_height (f)
3273 register struct frame *f; 3277 register struct frame *f;
3274{ 3278{
3275 return PIXEL_HEIGHT (f); 3279 return FRAME_PIXEL_HEIGHT (f);
3276} 3280}
3277 3281
3278int 3282int
3279x_char_width (f) 3283x_char_width (f)
3280 register struct frame *f; 3284 register struct frame *f;
3281{ 3285{
3282 return FONT_WIDTH (f->output_data.mac->font); 3286 return FRAME_COLUMN_WIDTH (f);
3283} 3287}
3284 3288
3285int 3289int
3286x_char_height (f) 3290x_char_height (f)
3287 register struct frame *f; 3291 register struct frame *f;
3288{ 3292{
3289 return f->output_data.mac->line_height; 3293 return FRAME_LINE_HEIGHT (f);
3290} 3294}
3291 3295
3292int 3296int
@@ -8150,7 +8154,7 @@ x_create_tip_frame (dpyinfo, parms)
8150#if 0 8154#if 0
8151 f->output_data.w32->icon_bitmap = -1; 8155 f->output_data.w32->icon_bitmap = -1;
8152#endif 8156#endif
8153 f->output_data.w32->fontset = -1; 8157 FRAME_FONTSET (f) = -1;
8154 f->icon_name = Qnil; 8158 f->icon_name = Qnil;
8155 8159
8156#ifdef MULTI_KBOARD 8160#ifdef MULTI_KBOARD
@@ -8295,13 +8299,13 @@ x_create_tip_frame (dpyinfo, parms)
8295 x_default_parameter (f, parms, Qcursor_type, Qbox, 8299 x_default_parameter (f, parms, Qcursor_type, Qbox,
8296 "cursorType", "CursorType", RES_TYPE_SYMBOL); 8300 "cursorType", "CursorType", RES_TYPE_SYMBOL);
8297 8301
8298 /* Dimensions, especially f->height, must be done via change_frame_size. 8302 /* Dimensions, especially FRAME_LINES (f), must be done via change_frame_size.
8299 Change will not be effected unless different from the current 8303 Change will not be effected unless different from the current
8300 f->height. */ 8304 FRAME_LINES (f). */
8301 width = f->width; 8305 width = FRAME_COLS (f);
8302 height = f->height; 8306 height = FRAME_LINES (f);
8303 f->height = 0; 8307 FRAME_LINES (f) = 0;
8304 SET_FRAME_WIDTH (f, 0); 8308 SET_FRAME_COLS (f, 0);
8305 change_frame_size (f, height, width, 1, 0, 0); 8309 change_frame_size (f, height, width, 1, 0, 0);
8306 8310
8307 /* Add `tooltip' frame parameter's default value. */ 8311 /* Add `tooltip' frame parameter's default value. */
@@ -8411,7 +8415,7 @@ DY added (default is 10). */)
8411 BLOCK_INPUT; 8415 BLOCK_INPUT;
8412 compute_tip_xy (f, parms, dx, dy, &root_x, &root_y); 8416 compute_tip_xy (f, parms, dx, dy, &root_x, &root_y);
8413 XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 8417 XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
8414 root_x, root_y - PIXEL_HEIGHT (f)); 8418 root_x, root_y - FRAME_PIXEL_HEIGHT (f));
8415 UNBLOCK_INPUT; 8419 UNBLOCK_INPUT;
8416#endif /* MAC_TODO */ 8420#endif /* MAC_TODO */
8417 goto start_timer; 8421 goto start_timer;
@@ -8447,15 +8451,15 @@ DY added (default is 10). */)
8447 columns x 40 lines. If someone wants to show a larger tip, he 8451 columns x 40 lines. If someone wants to show a larger tip, he
8448 will loose. I don't think this is a realistic case. */ 8452 will loose. I don't think this is a realistic case. */
8449 w = XWINDOW (FRAME_ROOT_WINDOW (f)); 8453 w = XWINDOW (FRAME_ROOT_WINDOW (f));
8450 w->left = w->top = make_number (0); 8454 w->left_col = w->top_line = make_number (0);
8451 w->width = make_number (80); 8455 w->total_cols = make_number (80);
8452 w->height = make_number (40); 8456 w->total_lines = make_number (40);
8453 adjust_glyphs (f); 8457 adjust_glyphs (f);
8454 w->pseudo_window_p = 1; 8458 w->pseudo_window_p = 1;
8455 8459
8456 /* Display the tooltip text in a temporary buffer. */ 8460 /* Display the tooltip text in a temporary buffer. */
8457 buffer = Fget_buffer_create (build_string (" *tip*")); 8461 buffer = Fget_buffer_create (build_string (" *tip*"));
8458 Fset_window_buffer (FRAME_ROOT_WINDOW (f), buffer); 8462 Fset_window_buffer (FRAME_ROOT_WINDOW (f), buffer, Qnil);
8459 old_buffer = current_buffer; 8463 old_buffer = current_buffer;
8460 set_buffer_internal_1 (XBUFFER (buffer)); 8464 set_buffer_internal_1 (XBUFFER (buffer));
8461 Ferase_buffer (); 8465 Ferase_buffer ();