Mercurial > emacs
comparison src/dispnew.c @ 83544:58cf725f5330
Merged from emacs@sv.gnu.org.
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-474
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-475
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-476
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-477
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-478
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-150
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-151
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-152
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-584
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 03 Dec 2006 12:15:03 +0000 |
parents | 2d56e13fd23d c76709b3cbc0 |
children | b8d9a391daf3 |
comparison
equal
deleted
inserted
replaced
83543:6b25ef5cc276 | 83544:58cf725f5330 |
---|---|
1784 /* Allocate glyph matrices over a window tree for a frame-based | 1784 /* Allocate glyph matrices over a window tree for a frame-based |
1785 redisplay | 1785 redisplay |
1786 | 1786 |
1787 X and Y are column/row within the frame glyph matrix where | 1787 X and Y are column/row within the frame glyph matrix where |
1788 sub-matrices for the window tree rooted at WINDOW must be | 1788 sub-matrices for the window tree rooted at WINDOW must be |
1789 allocated. CH_DIM contains the dimensions of the smallest | 1789 allocated. DIM_ONLY_P non-zero means that the caller of this |
1790 character that could be used during display. DIM_ONLY_P non-zero | 1790 function is only interested in the result matrix dimension, and |
1791 means that the caller of this function is only interested in the | 1791 matrix adjustments should not be performed. |
1792 result matrix dimension, and matrix adjustments should not be | |
1793 performed. | |
1794 | 1792 |
1795 The function returns the total width/height of the sub-matrices of | 1793 The function returns the total width/height of the sub-matrices of |
1796 the window tree. If called on a frame root window, the computation | 1794 the window tree. If called on a frame root window, the computation |
1797 will take the mini-buffer window into account. | 1795 will take the mini-buffer window into account. |
1798 | 1796 |
2036 return XINT (w->total_cols); | 2034 return XINT (w->total_cols); |
2037 } | 2035 } |
2038 | 2036 |
2039 | 2037 |
2040 /* Allocate window matrices for window-based redisplay. W is the | 2038 /* Allocate window matrices for window-based redisplay. W is the |
2041 window whose matrices must be allocated/reallocated. CH_DIM is the | 2039 window whose matrices must be allocated/reallocated. */ |
2042 size of the smallest character that could potentially be used on W. */ | |
2043 | 2040 |
2044 static void | 2041 static void |
2045 allocate_matrices_for_window_redisplay (w) | 2042 allocate_matrices_for_window_redisplay (w) |
2046 struct window *w; | 2043 struct window *w; |
2047 { | 2044 { |
2270 | 2267 |
2271 static void | 2268 static void |
2272 adjust_frame_glyphs_for_frame_redisplay (f) | 2269 adjust_frame_glyphs_for_frame_redisplay (f) |
2273 struct frame *f; | 2270 struct frame *f; |
2274 { | 2271 { |
2275 struct dim ch_dim; | |
2276 struct dim matrix_dim; | 2272 struct dim matrix_dim; |
2277 int pool_changed_p; | 2273 int pool_changed_p; |
2278 int window_change_flags; | 2274 int window_change_flags; |
2279 int top_window_y; | 2275 int top_window_y; |
2280 | 2276 |
2281 if (!FRAME_LIVE_P (f)) | 2277 if (!FRAME_LIVE_P (f)) |
2282 return; | 2278 return; |
2283 | |
2284 /* Determine the smallest character in any font for F. On | |
2285 console windows, all characters have dimension (1, 1). */ | |
2286 ch_dim.width = ch_dim.height = 1; | |
2287 | 2279 |
2288 top_window_y = FRAME_TOP_MARGIN (f); | 2280 top_window_y = FRAME_TOP_MARGIN (f); |
2289 | 2281 |
2290 /* Allocate glyph pool structures if not already done. */ | 2282 /* Allocate glyph pool structures if not already done. */ |
2291 if (f->desired_pool == NULL) | 2283 if (f->desired_pool == NULL) |
2371 | 2363 |
2372 static void | 2364 static void |
2373 adjust_frame_glyphs_for_window_redisplay (f) | 2365 adjust_frame_glyphs_for_window_redisplay (f) |
2374 struct frame *f; | 2366 struct frame *f; |
2375 { | 2367 { |
2376 struct dim ch_dim; | |
2377 struct window *w; | 2368 struct window *w; |
2378 | 2369 |
2379 xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f)); | 2370 xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f)); |
2380 | |
2381 /* Get minimum sizes. */ | |
2382 #ifdef HAVE_WINDOW_SYSTEM | |
2383 ch_dim.width = FRAME_SMALLEST_CHAR_WIDTH (f); | |
2384 ch_dim.height = FRAME_SMALLEST_FONT_HEIGHT (f); | |
2385 #else | |
2386 ch_dim.width = ch_dim.height = 1; | |
2387 #endif | |
2388 | 2371 |
2389 /* Allocate/reallocate window matrices. */ | 2372 /* Allocate/reallocate window matrices. */ |
2390 allocate_matrices_for_window_redisplay (XWINDOW (FRAME_ROOT_WINDOW (f))); | 2373 allocate_matrices_for_window_redisplay (XWINDOW (FRAME_ROOT_WINDOW (f))); |
2391 | 2374 |
2375 #ifdef HAVE_X_WINDOWS | |
2392 /* Allocate/ reallocate matrices of the dummy window used to display | 2376 /* Allocate/ reallocate matrices of the dummy window used to display |
2393 the menu bar under X when no X toolkit support is available. */ | 2377 the menu bar under X when no X toolkit support is available. */ |
2394 #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) | 2378 #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) |
2395 { | 2379 { |
2396 /* Allocate a dummy window if not already done. */ | 2380 /* Allocate a dummy window if not already done. */ |
2410 XSETFASTINT (w->left_col, 0); | 2394 XSETFASTINT (w->left_col, 0); |
2411 XSETFASTINT (w->total_lines, FRAME_MENU_BAR_LINES (f)); | 2395 XSETFASTINT (w->total_lines, FRAME_MENU_BAR_LINES (f)); |
2412 XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); | 2396 XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); |
2413 allocate_matrices_for_window_redisplay (w); | 2397 allocate_matrices_for_window_redisplay (w); |
2414 } | 2398 } |
2415 #endif /* not USE_X_TOOLKIT */ | 2399 #endif /* not USE_X_TOOLKIT && not USE_GTK */ |
2400 #endif /* HAVE_X_WINDOWS */ | |
2416 | 2401 |
2417 #ifndef USE_GTK | 2402 #ifndef USE_GTK |
2418 /* Allocate/ reallocate matrices of the tool bar window. If we | 2403 /* Allocate/ reallocate matrices of the tool bar window. If we |
2419 don't have a tool bar window yet, make one. */ | 2404 don't have a tool bar window yet, make one. */ |
2420 if (NILP (f->tool_bar_window)) | 2405 if (NILP (f->tool_bar_window)) |