405 |
|
|
406 |
struct x_output |
struct x_output |
407 |
{ |
{ |
|
/* Position of the X window (x and y offsets in root window). */ |
|
|
int left_pos; |
|
|
int top_pos; |
|
|
|
|
|
/* Border width of the X window as known by the X window system. */ |
|
|
int border_width; |
|
|
|
|
|
/* Size of the X window in pixels. */ |
|
|
int pixel_height, pixel_width; |
|
|
|
|
408 |
/* Height of menu bar widget, in pixels. |
/* Height of menu bar widget, in pixels. |
409 |
Zero if not using the X toolkit. |
Zero if not using the X toolkit. |
410 |
When using the toolkit, this value is not meaningful |
When using the toolkit, this value is not meaningful |
415 |
Zero if not using an external tool bar. */ |
Zero if not using an external tool bar. */ |
416 |
int toolbar_height; |
int toolbar_height; |
417 |
|
|
|
/* Height of a line, in pixels. */ |
|
|
int line_height; |
|
|
|
|
418 |
/* The tiled border used when the mouse is out of the frame. */ |
/* The tiled border used when the mouse is out of the frame. */ |
419 |
Pixmap border_tile; |
Pixmap border_tile; |
420 |
|
|
423 |
GC reverse_gc; /* Reverse video */ |
GC reverse_gc; /* Reverse video */ |
424 |
GC cursor_gc; /* cursor drawing */ |
GC cursor_gc; /* cursor drawing */ |
425 |
|
|
|
/* 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; |
|
|
|
|
426 |
/* The X window used for this frame. |
/* The X window used for this frame. |
427 |
May be zero while the frame object is being created |
May be zero while the frame object is being created |
428 |
and the X window has not yet been created. */ |
and the X window has not yet been created. */ |
538 |
to the mask as we go. */ |
to the mask as we go. */ |
539 |
XWMHints wm_hints; |
XWMHints wm_hints; |
540 |
|
|
|
/* 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; |
|
|
|
|
541 |
/* This is the Emacs structure for the X display this frame is on. */ |
/* This is the Emacs structure for the X display this frame is on. */ |
542 |
struct x_display_info *display_info; |
struct x_display_info *display_info; |
543 |
|
|
587 |
zero, tell Xt not to wait. */ |
zero, tell Xt not to wait. */ |
588 |
int wait_for_wm; |
int wait_for_wm; |
589 |
|
|
|
/* 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_X_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_X_WINDOW. */ |
|
|
int y_pixels_diff; |
|
|
|
|
590 |
/* As x_pixels_diff, but to FRAME_OUTER_WINDOW. For some reason the |
/* As x_pixels_diff, but to FRAME_OUTER_WINDOW. For some reason the |
591 |
two might differ by a pixel, depending on WM */ |
two might differ by a pixel, depending on WM */ |
592 |
int x_pixels_outer_diff; |
int x_pixels_outer_diff; |
648 |
|
|
649 |
#define FRAME_FONT(f) ((f)->output_data.x->font) |
#define FRAME_FONT(f) ((f)->output_data.x->font) |
650 |
#define FRAME_FONTSET(f) ((f)->output_data.x->fontset) |
#define FRAME_FONTSET(f) ((f)->output_data.x->fontset) |
|
#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width) |
|
651 |
#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height) |
#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height) |
652 |
#define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.x->toolbar_height) |
#define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.x->toolbar_height) |
|
#define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->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)) |
|
653 |
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset) |
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset) |
654 |
|
|
655 |
/* This gives the x_display_info structure for the display F is on. */ |
/* This gives the x_display_info structure for the display F is on. */ |
671 |
/* This is the 'font_info *' which frame F has. */ |
/* This is the 'font_info *' which frame F has. */ |
672 |
#define FRAME_X_FONT_TABLE(f) (FRAME_X_DISPLAY_INFO (f)->font_table) |
#define FRAME_X_FONT_TABLE(f) (FRAME_X_DISPLAY_INFO (f)->font_table) |
673 |
|
|
|
/* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */ |
|
|
#define PIXEL_WIDTH(f) ((f)->output_data.x->pixel_width) |
|
|
#define PIXEL_HEIGHT(f) ((f)->output_data.x->pixel_height) |
|
|
|
|
674 |
/* The difference in pixels between the top left corner of the |
/* The difference in pixels between the top left corner of the |
675 |
Emacs window (including possible window manager decorations) |
Emacs window (including possible window manager decorations) |
676 |
and FRAME_X_WINDOW (f). */ |
and FRAME_X_WINDOW (f). */ |
702 |
#define FRAME_X_IMAGE_CACHE(F) FRAME_X_DISPLAY_INFO ((F))->image_cache |
#define FRAME_X_IMAGE_CACHE(F) FRAME_X_DISPLAY_INFO ((F))->image_cache |
703 |
|
|
704 |
|
|
|
/* 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.x->fringe_cols) |
|
|
|
|
|
/* Total width of fringes in pixels. */ |
|
|
|
|
|
#define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.x->fringes_extra) |
|
|
|
|
|
/* Pixel-width of the left and right fringe. */ |
|
|
|
|
|
#define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.x->left_fringe_width) |
|
|
#define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.x->right_fringe_width) |
|
|
|
|
|
|
|
|
|
|
705 |
/* X-specific scroll bar stuff. */ |
/* X-specific scroll bar stuff. */ |
706 |
|
|
707 |
/* We represent scroll bars as lisp vectors. This allows us to place |
/* We represent scroll bars as lisp vectors. This allows us to place |
843 |
#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) |
#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) |
844 |
|
|
845 |
|
|
|
/* 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.x->internal_border_width \ |
|
|
+ (row) * (f)->output_data.x->line_height) |
|
|
#define CHAR_TO_PIXEL_COL(f, col) \ |
|
|
((f)->output_data.x->internal_border_width \ |
|
|
+ (col) * FONT_WIDTH ((f)->output_data.x->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.x->vertical_scroll_bar_extra \ |
|
|
+ (f)->output_data.x->fringes_extra \ |
|
|
+ (f)->output_data.x->internal_border_width) |
|
|
#define CHAR_TO_PIXEL_HEIGHT(f, height) \ |
|
|
(CHAR_TO_PIXEL_ROW (f, height) \ |
|
|
+ (f)->output_data.x->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.x->internal_border_width) \ |
|
|
/ (f)->output_data.x->line_height) |
|
|
#define PIXEL_TO_CHAR_COL(f, col) \ |
|
|
(((col) - (f)->output_data.x->internal_border_width) \ |
|
|
/ FONT_WIDTH ((f)->output_data.x->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.x->internal_border_width \ |
|
|
- (f)->output_data.x->fringes_extra \ |
|
|
- (f)->output_data.x->vertical_scroll_bar_extra))) |
|
|
#define PIXEL_TO_CHAR_HEIGHT(f, height) \ |
|
|
(PIXEL_TO_CHAR_ROW (f, ((height) \ |
|
|
- (f)->output_data.x->internal_border_width))) |
|
|
|
|
|
|
|
846 |
/* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT |
/* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT |
847 |
or SELECTION_CLEAR_EVENT, then its contents are really described |
or SELECTION_CLEAR_EVENT, then its contents are really described |
848 |
by this structure. */ |
by this structure. */ |
1002 |
|
|
1003 |
/* Defined in xfaces.c */ |
/* Defined in xfaces.c */ |
1004 |
|
|
|
extern int frame_update_line_height P_ ((struct frame *)); |
|
1005 |
extern int compute_glyph_face P_ ((struct frame *, int, int)); |
extern int compute_glyph_face P_ ((struct frame *, int, int)); |
1006 |
extern int compute_glyph_face_1 P_ ((struct frame *, Lisp_Object, int)); |
extern int compute_glyph_face_1 P_ ((struct frame *, Lisp_Object, int)); |
1007 |
extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap, |
extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap, |