aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-05-24 22:00:57 +0000
committerKim F. Storm2003-05-24 22:00:57 +0000
commitf744acf15b0aa0f75b51ca916889739a6e49685a (patch)
tree9e816d608118062bedd95f9e3a53c0d272e0e413 /src
parentf1a83aabaaae4b22393fad978c6b4caf6287c78b (diff)
downloademacs-f744acf15b0aa0f75b51ca916889739a6e49685a.tar.gz
emacs-f744acf15b0aa0f75b51ca916889739a6e49685a.zip
(struct mac_output): Move members left_pos, top_pos,
border_width, pixel_height, pixel_width, line_height, internal_border_width, vertical_scroll_bar_extra, left_fringe_width, right_fringe_width, fringe_cols, fringes_extra, win_gravity, size_hint_flags, want_fullscreen, x_pixels_diff, y_pixels_diff to struct frame (frame.h). (FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): Move to frame.h. (FRAME_DEFAULT_FONT_WIDTH): Remove macro. (PIXEL_WIDTH, PIXEL_HEIGHT) (FRAME_X_FRINGE_COLS, FRAME_X_FRINGE_WIDTH) (FRAME_X_LEFT_FRINGE_WIDTH, FRAME_X_RIGHT_FRINGE_WIDTH): Moved to frame.h and renamed [see frame.h changes]. (CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, CHAR_TO_PIXEL_WIDTH) (CHAR_TO_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW, PIXEL_TO_CHAR_COL) (PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Moved to frame.h and renamed [see frame.h changes].
Diffstat (limited to 'src')
-rw-r--r--src/macterm.h120
1 files changed, 0 insertions, 120 deletions
diff --git a/src/macterm.h b/src/macterm.h
index f57008b8b7a..65925334623 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -297,29 +297,11 @@ struct mac_output {
297 int size_computed_faces; 297 int size_computed_faces;
298#endif 298#endif
299 299
300 /* Position of the Mac window (x and y offsets in global coordinates). */
301 int left_pos;
302 int top_pos;
303
304 /* Border width of the W32 window as known by the window system. */
305 int border_width;
306
307 /* Size of the W32 window in pixels. */
308 int pixel_height, pixel_width;
309
310 /* Height of a line, in pixels. */
311 int line_height;
312
313 /* Here are the Graphics Contexts for the default font. */ 300 /* Here are the Graphics Contexts for the default font. */
314 GC normal_gc; /* Normal video */ 301 GC normal_gc; /* Normal video */
315 GC reverse_gc; /* Reverse video */ 302 GC reverse_gc; /* Reverse video */
316 GC cursor_gc; /* cursor drawing */ 303 GC cursor_gc; /* cursor drawing */
317 304
318 /* Width of the internal border. This is a line of background color
319 just inside the window's border. When the frame is selected,
320 a highlighting is displayed inside the internal border. */
321 int internal_border_width;
322
323 /* The window used for this frame. 305 /* The window used for this frame.
324 May be zero while the frame object is being created 306 May be zero while the frame object is being created
325 and the window has not yet been created. */ 307 and the window has not yet been created. */
@@ -381,22 +363,6 @@ struct mac_output {
381 DWORD dwStyle; 363 DWORD dwStyle;
382#endif 364#endif
383 365
384 /* The size of the extra width currently allotted for vertical
385 scroll bars, in pixels. */
386 int vertical_scroll_bar_extra;
387
388 /* The extra width currently allotted for the areas in which
389 truncation marks, continuation marks, and overlay arrows are
390 displayed. */
391 int left_fringe_width, right_fringe_width;
392 int fringe_cols, fringes_extra;
393
394 /* This is the gravity value for the specified window position. */
395 int win_gravity;
396
397 /* The geometry flags for this window. */
398 int size_hint_flags;
399
400 /* This is the Emacs structure for the display this frame is on. */ 366 /* This is the Emacs structure for the display this frame is on. */
401 /* struct w32_display_info *display_info; */ 367 /* struct w32_display_info *display_info; */
402 368
@@ -429,17 +395,6 @@ struct mac_output {
429 /* The background for which the above relief GCs were set up. 395 /* The background for which the above relief GCs were set up.
430 They are changed only when a different background is involved. */ 396 They are changed only when a different background is involved. */
431 unsigned long relief_background; 397 unsigned long relief_background;
432
433 /* See enum below */
434 int want_fullscreen;
435
436 /* This many pixels are the difference between the outer window (i.e. the
437 left of the window manager decoration) and FRAME_X_WINDOW. */
438 int x_pixels_diff;
439
440 /* This many pixels are the difference between the outer window (i.e. the
441 top of the window manager titlebar) and FRAME_X_WINDOW. */
442 int y_pixels_diff;
443}; 398};
444 399
445typedef struct mac_output mac_output; 400typedef struct mac_output mac_output;
@@ -457,13 +412,6 @@ typedef struct mac_output mac_output;
457#define FRAME_FONT(f) ((f)->output_data.mac->font) 412#define FRAME_FONT(f) ((f)->output_data.mac->font)
458#define FRAME_FONTSET(f) ((f)->output_data.mac->fontset) 413#define FRAME_FONTSET(f) ((f)->output_data.mac->fontset)
459 414
460#undef FRAME_INTERNAL_BORDER_WIDTH
461#define FRAME_INTERNAL_BORDER_WIDTH(f) \
462 ((f)->output_data.mac->internal_border_width)
463#define FRAME_LINE_HEIGHT(f) ((f)->output_data.mac->line_height)
464/* Width of the default font of frame F. Must be defined by each
465 terminal specific header. */
466#define FRAME_DEFAULT_FONT_WIDTH(F) FONT_WIDTH (FRAME_FONT (F))
467#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.mac->baseline_offset) 415#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.mac->baseline_offset)
468 416
469/* This gives the w32_display_info structure for the display F is on. */ 417/* This gives the w32_display_info structure for the display F is on. */
@@ -477,10 +425,6 @@ typedef struct mac_output mac_output;
477/* This is the 'font_info *' which frame F has. */ 425/* This is the 'font_info *' which frame F has. */
478#define FRAME_MAC_FONT_TABLE(f) (FRAME_MAC_DISPLAY_INFO (f)->font_table) 426#define FRAME_MAC_FONT_TABLE(f) (FRAME_MAC_DISPLAY_INFO (f)->font_table)
479 427
480/* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */
481#define PIXEL_WIDTH(f) ((f)->output_data.mac->pixel_width)
482#define PIXEL_HEIGHT(f) ((f)->output_data.mac->pixel_height)
483
484/* Value is the smallest width of any character in any font on frame F. */ 428/* Value is the smallest width of any character in any font on frame F. */
485 429
486#define FRAME_SMALLEST_CHAR_WIDTH(F) \ 430#define FRAME_SMALLEST_CHAR_WIDTH(F) \
@@ -496,25 +440,6 @@ typedef struct mac_output mac_output;
496#define FRAME_X_IMAGE_CACHE(F) FRAME_MAC_DISPLAY_INFO ((F))->image_cache 440#define FRAME_X_IMAGE_CACHE(F) FRAME_MAC_DISPLAY_INFO ((F))->image_cache
497 441
498 442
499/* Total width of fringes reserved for drawing truncation bitmaps,
500 continuation bitmaps and alike. The width is in canonical char
501 units of the frame. This must currently be the case because window
502 sizes aren't pixel values. If it weren't the case, we wouldn't be
503 able to split windows horizontally nicely. */
504
505#define FRAME_X_FRINGE_COLS(F) ((F)->output_data.mac->fringe_cols)
506
507/* Total width of fringes in pixels. */
508
509#define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.mac->fringes_extra)
510
511/* Pixel-width of the left and right fringe. */
512
513#define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.mac->left_fringe_width)
514#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.mac->right_fringe_width)
515
516
517
518/* Mac-specific scroll bar stuff. */ 443/* Mac-specific scroll bar stuff. */
519 444
520/* We represent scroll bars as lisp vectors. This allows us to place 445/* We represent scroll bars as lisp vectors. This allows us to place
@@ -647,51 +572,6 @@ struct scroll_bar {
647 text from glomming up against the scroll bar */ 572 text from glomming up against the scroll bar */
648#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) 573#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
649 574
650
651/* Manipulating pixel sizes and character sizes.
652 Knowledge of which factors affect the overall size of the window should
653 be hidden in these macros, if that's possible.
654
655 Return the upper/left pixel position of the character cell on frame F
656 at ROW/COL. */
657#define CHAR_TO_PIXEL_ROW(f, row) \
658 ((f)->output_data.mac->internal_border_width \
659 + (row) * (f)->output_data.mac->line_height)
660#define CHAR_TO_PIXEL_COL(f, col) \
661 ((f)->output_data.mac->internal_border_width \
662 + (col) * FONT_WIDTH ((f)->output_data.mac->font))
663
664/* Return the pixel width/height of frame F if it has
665 WIDTH columns/HEIGHT rows. */
666#define CHAR_TO_PIXEL_WIDTH(f, width) \
667 (CHAR_TO_PIXEL_COL (f, width) \
668 + (f)->output_data.mac->vertical_scroll_bar_extra \
669 + (f)->output_data.mac->fringes_extra \
670 + (f)->output_data.mac->internal_border_width)
671#define CHAR_TO_PIXEL_HEIGHT(f, height) \
672 (CHAR_TO_PIXEL_ROW (f, height) \
673 + (f)->output_data.mac->internal_border_width)
674
675
676/* Return the row/column (zero-based) of the character cell containing
677 the pixel on FRAME at ROW/COL. */
678#define PIXEL_TO_CHAR_ROW(f, row) \
679 (((row) - (f)->output_data.mac->internal_border_width) \
680 / (f)->output_data.mac->line_height)
681#define PIXEL_TO_CHAR_COL(f, col) \
682 (((col) - (f)->output_data.mac->internal_border_width) \
683 / FONT_WIDTH ((f)->output_data.mac->font))
684
685/* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on
686 frame F? */
687#define PIXEL_TO_CHAR_WIDTH(f, width) \
688 (PIXEL_TO_CHAR_COL (f, ((width) \
689 - (f)->output_data.mac->internal_border_width \
690 - (f)->output_data.mac->fringes_extra \
691 - (f)->output_data.mac->vertical_scroll_bar_extra)))
692#define PIXEL_TO_CHAR_HEIGHT(f, height) \
693 (PIXEL_TO_CHAR_ROW (f, ((height) \
694 - (f)->output_data.mac->internal_border_width)))
695 575
696struct frame * check_x_frame (Lisp_Object); 576struct frame * check_x_frame (Lisp_Object);
697 577