aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-05-24 22:06:40 +0000
committerKim F. Storm2003-05-24 22:06:40 +0000
commit03e4639645519fba65b1413339f741705bb79078 (patch)
tree3158fbafa0d6d7788de87efa82a93d930b736b7b /src
parent62e50ec61732d350ecd55cf179e49fa4d87fcd39 (diff)
downloademacs-03e4639645519fba65b1413339f741705bb79078.tar.gz
emacs-03e4639645519fba65b1413339f741705bb79078.zip
(struct w32_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, and 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/w32term.h119
1 files changed, 0 insertions, 119 deletions
diff --git a/src/w32term.h b/src/w32term.h
index f8b194acd63..5bc94c832fc 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -286,27 +286,9 @@ struct w32_output
286 /* Original palette (used to deselect real palette after drawing) */ 286 /* Original palette (used to deselect real palette after drawing) */
287 HPALETTE old_palette; 287 HPALETTE old_palette;
288 288
289 /* Position of the W32 window (x and y offsets in root window). */
290 int left_pos;
291 int top_pos;
292
293 /* Border width of the W32 window as known by the window system. */
294 int border_width;
295
296 /* Size of the W32 window in pixels. */
297 int pixel_height, pixel_width;
298
299 /* Height of a line, in pixels. */
300 int line_height;
301
302 /* Here are the Graphics Contexts for the default font. */ 289 /* Here are the Graphics Contexts for the default font. */
303 XGCValues *cursor_gc; /* cursor drawing */ 290 XGCValues *cursor_gc; /* cursor drawing */
304 291
305 /* Width of the internal border. This is a line of background color
306 just inside the window's border. When the frame is selected,
307 a highlighting is displayed inside the internal border. */
308 int internal_border_width;
309
310 /* The window used for this frame. 292 /* The window used for this frame.
311 May be zero while the frame object is being created 293 May be zero while the frame object is being created
312 and the window has not yet been created. */ 294 and the window has not yet been created. */
@@ -364,22 +346,6 @@ struct w32_output
364 346
365 DWORD dwStyle; 347 DWORD dwStyle;
366 348
367 /* The size of the extra width currently allotted for vertical
368 scroll bars, in pixels. */
369 int vertical_scroll_bar_extra;
370
371 /* The extra width currently allotted for the areas in which
372 truncation marks, continuation marks, and overlay arrows are
373 displayed. */
374 int left_fringe_width, right_fringe_width;
375 int fringe_cols, fringes_extra;
376
377 /* This is the gravity value for the specified window position. */
378 int win_gravity;
379
380 /* The geometry flags for this window. */
381 int size_hint_flags;
382
383 /* This is the Emacs structure for the display this frame is on. */ 349 /* This is the Emacs structure for the display this frame is on. */
384 /* struct w32_display_info *display_info; */ 350 /* struct w32_display_info *display_info; */
385 351
@@ -412,17 +378,6 @@ struct w32_output
412 /* The background for which the above relief GCs were set up. 378 /* The background for which the above relief GCs were set up.
413 They are changed only when a different background is involved. */ 379 They are changed only when a different background is involved. */
414 unsigned long relief_background; 380 unsigned long relief_background;
415
416 /* See enum below */
417 int want_fullscreen;
418
419 /* This many pixels are the difference between the outer window (i.e. the
420 left of the window manager decoration) and FRAME_W32_WINDOW. */
421 int x_pixels_diff;
422
423 /* This many pixels are the difference between the outer window (i.e. the
424 top of the window manager titlebar) and FRAME_W32_WINDOW. */
425 int y_pixels_diff;
426}; 381};
427 382
428extern struct w32_output w32term_display; 383extern struct w32_output w32term_display;
@@ -438,11 +393,6 @@ extern struct w32_output w32term_display;
438#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel) 393#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
439#define FRAME_FONT(f) ((f)->output_data.w32->font) 394#define FRAME_FONT(f) ((f)->output_data.w32->font)
440#define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) 395#define FRAME_FONTSET(f) ((f)->output_data.w32->fontset)
441#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.w32->internal_border_width)
442#define FRAME_LINE_HEIGHT(f) ((f)->output_data.w32->line_height)
443/* Width of the default font of frame F. Must be defined by each
444 terminal specific header. */
445#define FRAME_DEFAULT_FONT_WIDTH(F) FONT_WIDTH (FRAME_FONT (F))
446#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset) 396#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset)
447 397
448/* This gives the w32_display_info structure for the display F is on. */ 398/* This gives the w32_display_info structure for the display F is on. */
@@ -455,10 +405,6 @@ extern struct w32_output w32term_display;
455/* This is the 'font_info *' which frame F has. */ 405/* This is the 'font_info *' which frame F has. */
456#define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table) 406#define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table)
457 407
458/* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */
459#define PIXEL_WIDTH(f) ((f)->output_data.w32->pixel_width)
460#define PIXEL_HEIGHT(f) ((f)->output_data.w32->pixel_height)
461
462/* Value is the smallest width of any character in any font on frame F. */ 408/* Value is the smallest width of any character in any font on frame F. */
463 409
464#define FRAME_SMALLEST_CHAR_WIDTH(F) \ 410#define FRAME_SMALLEST_CHAR_WIDTH(F) \
@@ -474,25 +420,6 @@ extern struct w32_output w32term_display;
474#define FRAME_X_IMAGE_CACHE(F) FRAME_W32_DISPLAY_INFO ((F))->image_cache 420#define FRAME_X_IMAGE_CACHE(F) FRAME_W32_DISPLAY_INFO ((F))->image_cache
475 421
476 422
477/* Total width of fringes reserved for drawing truncation bitmaps,
478 continuation bitmaps and alike. The width is in canonical char
479 units of the frame. This must currently be the case because window
480 sizes aren't pixel values. If it weren't the case, we wouldn't be
481 able to split windows horizontally nicely. */
482
483#define FRAME_X_FRINGE_COLS(F) ((F)->output_data.w32->fringe_cols)
484
485/* Total width of fringes in pixels. */
486
487#define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.w32->fringes_extra)
488
489/* Pixel-width of the left and right fringe. */
490
491#define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.w32->left_fringe_width)
492#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.w32->right_fringe_width)
493
494
495
496/* W32-specific scroll bar stuff. */ 423/* W32-specific scroll bar stuff. */
497 424
498/* We represent scroll bars as lisp vectors. This allows us to place 425/* We represent scroll bars as lisp vectors. This allows us to place
@@ -629,52 +556,6 @@ struct scroll_bar {
629#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) 556#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
630 557
631 558
632/* Manipulating pixel sizes and character sizes.
633 Knowledge of which factors affect the overall size of the window should
634 be hidden in these macros, if that's possible.
635
636 Return the upper/left pixel position of the character cell on frame F
637 at ROW/COL. */
638#define CHAR_TO_PIXEL_ROW(f, row) \
639 ((f)->output_data.w32->internal_border_width \
640 + (row) * (f)->output_data.w32->line_height)
641#define CHAR_TO_PIXEL_COL(f, col) \
642 ((f)->output_data.w32->internal_border_width \
643 + (col) * FONT_WIDTH ((f)->output_data.w32->font))
644
645/* Return the pixel width/height of frame F if it has
646 WIDTH columns/HEIGHT rows. */
647#define CHAR_TO_PIXEL_WIDTH(f, width) \
648 (CHAR_TO_PIXEL_COL (f, width) \
649 + (f)->output_data.w32->vertical_scroll_bar_extra \
650 + (f)->output_data.w32->fringes_extra \
651 + (f)->output_data.w32->internal_border_width)
652#define CHAR_TO_PIXEL_HEIGHT(f, height) \
653 (CHAR_TO_PIXEL_ROW (f, height) \
654 + (f)->output_data.w32->internal_border_width)
655
656
657/* Return the row/column (zero-based) of the character cell containing
658 the pixel on FRAME at ROW/COL. */
659#define PIXEL_TO_CHAR_ROW(f, row) \
660 (((row) - (f)->output_data.w32->internal_border_width) \
661 / (f)->output_data.w32->line_height)
662#define PIXEL_TO_CHAR_COL(f, col) \
663 (((col) - (f)->output_data.w32->internal_border_width) \
664 / FONT_WIDTH ((f)->output_data.w32->font))
665
666/* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on
667 frame F? */
668#define PIXEL_TO_CHAR_WIDTH(f, width) \
669 (PIXEL_TO_CHAR_COL (f, ((width) \
670 - (f)->output_data.w32->internal_border_width \
671 - (f)->output_data.w32->fringes_extra \
672 - (f)->output_data.w32->vertical_scroll_bar_extra)))
673#define PIXEL_TO_CHAR_HEIGHT(f, height) \
674 (PIXEL_TO_CHAR_ROW (f, ((height) \
675 - (f)->output_data.w32->internal_border_width)))
676
677
678extern void w32_fill_rect (); 559extern void w32_fill_rect ();
679extern void w32_clear_window (); 560extern void w32_clear_window ();
680 561