286 |
/* Original palette (used to deselect real palette after drawing) */ |
/* Original palette (used to deselect real palette after drawing) */ |
287 |
HPALETTE old_palette; |
HPALETTE old_palette; |
288 |
|
|
|
/* Position of the W32 window (x and y offsets in root window). */ |
|
|
int left_pos; |
|
|
int top_pos; |
|
|
|
|
|
/* Border width of the W32 window as known by the window system. */ |
|
|
int border_width; |
|
|
|
|
|
/* Size of the W32 window in pixels. */ |
|
|
int pixel_height, pixel_width; |
|
|
|
|
|
/* Height of a line, in pixels. */ |
|
|
int line_height; |
|
|
|
|
289 |
/* Here are the Graphics Contexts for the default font. */ |
/* Here are the Graphics Contexts for the default font. */ |
290 |
XGCValues *cursor_gc; /* cursor drawing */ |
XGCValues *cursor_gc; /* cursor drawing */ |
291 |
|
|
|
/* Width of the internal border. This is a line of background color |
|
|
just inside the window's border. When the frame is selected, |
|
|
a highlighting is displayed inside the internal border. */ |
|
|
int internal_border_width; |
|
|
|
|
292 |
/* The window used for this frame. |
/* The window used for this frame. |
293 |
May be zero while the frame object is being created |
May be zero while the frame object is being created |
294 |
and the window has not yet been created. */ |
and the window has not yet been created. */ |
346 |
|
|
347 |
DWORD dwStyle; |
DWORD dwStyle; |
348 |
|
|
|
/* The size of the extra width currently allotted for vertical |
|
|
scroll bars, in pixels. */ |
|
|
int vertical_scroll_bar_extra; |
|
|
|
|
|
/* The extra width currently allotted for the areas in which |
|
|
truncation marks, continuation marks, and overlay arrows are |
|
|
displayed. */ |
|
|
int left_fringe_width, right_fringe_width; |
|
|
int fringe_cols, fringes_extra; |
|
|
|
|
|
/* This is the gravity value for the specified window position. */ |
|
|
int win_gravity; |
|
|
|
|
|
/* The geometry flags for this window. */ |
|
|
int size_hint_flags; |
|
|
|
|
349 |
/* This is the Emacs structure for the display this frame is on. */ |
/* This is the Emacs structure for the display this frame is on. */ |
350 |
/* struct w32_display_info *display_info; */ |
/* struct w32_display_info *display_info; */ |
351 |
|
|
378 |
/* The background for which the above relief GCs were set up. |
/* The background for which the above relief GCs were set up. |
379 |
They are changed only when a different background is involved. */ |
They are changed only when a different background is involved. */ |
380 |
unsigned long relief_background; |
unsigned long relief_background; |
|
|
|
|
/* See enum below */ |
|
|
int want_fullscreen; |
|
|
|
|
|
/* This many pixels are the difference between the outer window (i.e. the |
|
|
left of the window manager decoration) and FRAME_W32_WINDOW. */ |
|
|
int x_pixels_diff; |
|
|
|
|
|
/* This many pixels are the difference between the outer window (i.e. the |
|
|
top of the window manager titlebar) and FRAME_W32_WINDOW. */ |
|
|
int y_pixels_diff; |
|
381 |
}; |
}; |
382 |
|
|
383 |
extern struct w32_output w32term_display; |
extern struct w32_output w32term_display; |
393 |
#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel) |
#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel) |
394 |
#define FRAME_FONT(f) ((f)->output_data.w32->font) |
#define FRAME_FONT(f) ((f)->output_data.w32->font) |
395 |
#define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) |
#define FRAME_FONTSET(f) ((f)->output_data.w32->fontset) |
|
#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.w32->internal_border_width) |
|
|
#define FRAME_LINE_HEIGHT(f) ((f)->output_data.w32->line_height) |
|
|
/* Width of the default font of frame F. Must be defined by each |
|
|
terminal specific header. */ |
|
|
#define FRAME_DEFAULT_FONT_WIDTH(F) FONT_WIDTH (FRAME_FONT (F)) |
|
396 |
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset) |
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset) |
397 |
|
|
398 |
/* This gives the w32_display_info structure for the display F is on. */ |
/* This gives the w32_display_info structure for the display F is on. */ |
405 |
/* This is the 'font_info *' which frame F has. */ |
/* This is the 'font_info *' which frame F has. */ |
406 |
#define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table) |
#define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table) |
407 |
|
|
|
/* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */ |
|
|
#define PIXEL_WIDTH(f) ((f)->output_data.w32->pixel_width) |
|
|
#define PIXEL_HEIGHT(f) ((f)->output_data.w32->pixel_height) |
|
|
|
|
408 |
/* Value is the smallest width of any character in any font on frame F. */ |
/* Value is the smallest width of any character in any font on frame F. */ |
409 |
|
|
410 |
#define FRAME_SMALLEST_CHAR_WIDTH(F) \ |
#define FRAME_SMALLEST_CHAR_WIDTH(F) \ |
420 |
#define FRAME_X_IMAGE_CACHE(F) FRAME_W32_DISPLAY_INFO ((F))->image_cache |
#define FRAME_X_IMAGE_CACHE(F) FRAME_W32_DISPLAY_INFO ((F))->image_cache |
421 |
|
|
422 |
|
|
|
/* Total width of fringes reserved for drawing truncation bitmaps, |
|
|
continuation bitmaps and alike. The width is in canonical char |
|
|
units of the frame. This must currently be the case because window |
|
|
sizes aren't pixel values. If it weren't the case, we wouldn't be |
|
|
able to split windows horizontally nicely. */ |
|
|
|
|
|
#define FRAME_X_FRINGE_COLS(F) ((F)->output_data.w32->fringe_cols) |
|
|
|
|
|
/* Total width of fringes in pixels. */ |
|
|
|
|
|
#define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.w32->fringes_extra) |
|
|
|
|
|
/* Pixel-width of the left and right fringe. */ |
|
|
|
|
|
#define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.w32->left_fringe_width) |
|
|
#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.w32->right_fringe_width) |
|
|
|
|
|
|
|
|
|
|
423 |
/* W32-specific scroll bar stuff. */ |
/* W32-specific scroll bar stuff. */ |
424 |
|
|
425 |
/* We represent scroll bars as lisp vectors. This allows us to place |
/* We represent scroll bars as lisp vectors. This allows us to place |
556 |
#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) |
#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) |
557 |
|
|
558 |
|
|
|
/* Manipulating pixel sizes and character sizes. |
|
|
Knowledge of which factors affect the overall size of the window should |
|
|
be hidden in these macros, if that's possible. |
|
|
|
|
|
Return the upper/left pixel position of the character cell on frame F |
|
|
at ROW/COL. */ |
|
|
#define CHAR_TO_PIXEL_ROW(f, row) \ |
|
|
((f)->output_data.w32->internal_border_width \ |
|
|
+ (row) * (f)->output_data.w32->line_height) |
|
|
#define CHAR_TO_PIXEL_COL(f, col) \ |
|
|
((f)->output_data.w32->internal_border_width \ |
|
|
+ (col) * FONT_WIDTH ((f)->output_data.w32->font)) |
|
|
|
|
|
/* Return the pixel width/height of frame F if it has |
|
|
WIDTH columns/HEIGHT rows. */ |
|
|
#define CHAR_TO_PIXEL_WIDTH(f, width) \ |
|
|
(CHAR_TO_PIXEL_COL (f, width) \ |
|
|
+ (f)->output_data.w32->vertical_scroll_bar_extra \ |
|
|
+ (f)->output_data.w32->fringes_extra \ |
|
|
+ (f)->output_data.w32->internal_border_width) |
|
|
#define CHAR_TO_PIXEL_HEIGHT(f, height) \ |
|
|
(CHAR_TO_PIXEL_ROW (f, height) \ |
|
|
+ (f)->output_data.w32->internal_border_width) |
|
|
|
|
|
|
|
|
/* Return the row/column (zero-based) of the character cell containing |
|
|
the pixel on FRAME at ROW/COL. */ |
|
|
#define PIXEL_TO_CHAR_ROW(f, row) \ |
|
|
(((row) - (f)->output_data.w32->internal_border_width) \ |
|
|
/ (f)->output_data.w32->line_height) |
|
|
#define PIXEL_TO_CHAR_COL(f, col) \ |
|
|
(((col) - (f)->output_data.w32->internal_border_width) \ |
|
|
/ FONT_WIDTH ((f)->output_data.w32->font)) |
|
|
|
|
|
/* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on |
|
|
frame F? */ |
|
|
#define PIXEL_TO_CHAR_WIDTH(f, width) \ |
|
|
(PIXEL_TO_CHAR_COL (f, ((width) \ |
|
|
- (f)->output_data.w32->internal_border_width \ |
|
|
- (f)->output_data.w32->fringes_extra \ |
|
|
- (f)->output_data.w32->vertical_scroll_bar_extra))) |
|
|
#define PIXEL_TO_CHAR_HEIGHT(f, height) \ |
|
|
(PIXEL_TO_CHAR_ROW (f, ((height) \ |
|
|
- (f)->output_data.w32->internal_border_width))) |
|
|
|
|
|
|
|
559 |
extern void w32_fill_rect (); |
extern void w32_fill_rect (); |
560 |
extern void w32_clear_window (); |
extern void w32_clear_window (); |
561 |
|
|
731 |
? UNICODE_FONT \ |
? UNICODE_FONT \ |
732 |
: ((CHARSET_DIMENSION (CHAR_CHARSET ((ch))) == 1) \ |
: ((CHARSET_DIMENSION (CHAR_CHARSET ((ch))) == 1) \ |
733 |
? BDF_1D_FONT : BDF_2D_FONT)) |
? BDF_1D_FONT : BDF_2D_FONT)) |
734 |
|
|
735 |
|
typedef DWORD (WINAPI * ClipboardSequence_Proc) (); |
736 |
|
|
737 |
|
/* arch-tag: f201d05a-1240-4fc5-8ea4-ca24d4ee5671 |
738 |
|
(do not change this comment) */ |