comparison src/xterm.h @ 50152:a3befb42ffd3

(FONT_DESCENT, FRAME_X_OUTPUT, FRAME_BASELINE_OFFSET) (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE) (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): New macros for consolidated code.
author Kim F. Storm <storm@cua.dk>
date Sun, 16 Mar 2003 20:47:08 +0000
parents a62497b91c74
children 20e4ebf5399d
comparison
equal deleted inserted replaced
50151:0e12b5894d99 50152:a3befb42ffd3
102 XScreenNumberOfScreen (FRAME_X_SCREEN (f))) 102 XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
103 103
104 #define FONT_WIDTH(f) ((f)->max_bounds.width) 104 #define FONT_WIDTH(f) ((f)->max_bounds.width)
105 #define FONT_HEIGHT(f) ((f)->ascent + (f)->descent) 105 #define FONT_HEIGHT(f) ((f)->ascent + (f)->descent)
106 #define FONT_BASE(f) ((f)->ascent) 106 #define FONT_BASE(f) ((f)->ascent)
107 #define FONT_DESCENT(f) ((f)->descent)
107 108
108 /* The mask of events that text windows always want to receive. This 109 /* The mask of events that text windows always want to receive. This
109 includes mouse movement events, since handling the mouse-font text property 110 includes mouse movement events, since handling the mouse-font text property
110 means that we must track mouse motion all the time. */ 111 means that we must track mouse motion all the time. */
111 112
665 FOCUS_IMPLICIT = 1, 666 FOCUS_IMPLICIT = 1,
666 FOCUS_EXPLICIT = 2 667 FOCUS_EXPLICIT = 2
667 }; 668 };
668 669
669 670
671 /* Return the X output data for frame F. */
672 #define FRAME_X_OUTPUT(f) ((f)->output_data.x)
673
670 /* Return the X window used for displaying data in frame F. */ 674 /* Return the X window used for displaying data in frame F. */
671 #define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc) 675 #define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc)
672 676
673 /* Return the outermost X window associated with the frame F. */ 677 /* Return the outermost X window associated with the frame F. */
674 #ifdef USE_X_TOOLKIT 678 #ifdef USE_X_TOOLKIT
701 #define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height) 705 #define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height)
702 706
703 /* Width of the default font of frame F. Must be defined by each 707 /* Width of the default font of frame F. Must be defined by each
704 terminal specific header. */ 708 terminal specific header. */
705 #define FRAME_DEFAULT_FONT_WIDTH(F) FONT_WIDTH (FRAME_FONT (F)) 709 #define FRAME_DEFAULT_FONT_WIDTH(F) FONT_WIDTH (FRAME_FONT (F))
710 #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset)
706 711
707 /* This gives the x_display_info structure for the display F is on. */ 712 /* This gives the x_display_info structure for the display F is on. */
708 #define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info) 713 #define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info)
709 714
710 /* This is the `Display *' which frame F is on. */ 715 /* This is the `Display *' which frame F is on. */
1163 extern void x_session_initialize P_ ((void)); 1168 extern void x_session_initialize P_ ((void));
1164 extern int x_session_check_input P_ ((struct input_event *bufp, 1169 extern int x_session_check_input P_ ((struct input_event *bufp,
1165 int *numchars)); 1170 int *numchars));
1166 extern int x_session_have_connection P_ ((void)); 1171 extern int x_session_have_connection P_ ((void));
1167 #endif 1172 #endif
1173
1174 #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0
1175 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0
1176
1177 #define STORE_XCHAR2B(chp, b1, b2) \
1178 ((chp)->byte1 = (b1), (chp)->byte2 = (b2))
1179
1180 #define XCHAR2B_BYTE1(chp) \
1181 ((chp)->byte1)
1182
1183 #define XCHAR2B_BYTE2(chp) \
1184 ((chp)->byte2)
1185