aboutsummaryrefslogtreecommitdiffstats
path: root/src/macterm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/macterm.h')
-rw-r--r--src/macterm.h84
1 files changed, 14 insertions, 70 deletions
diff --git a/src/macterm.h b/src/macterm.h
index b3855f142c6..e7a5fc2450e 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -39,8 +39,8 @@ Boston, MA 02110-1301, USA. */
39#define BLACK_PIX_DEFAULT(f) RGB_TO_ULONG(0,0,0) 39#define BLACK_PIX_DEFAULT(f) RGB_TO_ULONG(0,0,0)
40#define WHITE_PIX_DEFAULT(f) RGB_TO_ULONG(255,255,255) 40#define WHITE_PIX_DEFAULT(f) RGB_TO_ULONG(255,255,255)
41 41
42#define FONT_WIDTH(f) ((f)->max_bounds.width) 42#define FONT_WIDTH(f) ((f)->max_bounds.width)
43#define FONT_HEIGHT(f) ((f)->ascent + (f)->descent) 43#define FONT_HEIGHT(f) ((f)->ascent + (f)->descent)
44#define FONT_BASE(f) ((f)->ascent) 44#define FONT_BASE(f) ((f)->ascent)
45#define FONT_DESCENT(f) ((f)->descent) 45#define FONT_DESCENT(f) ((f)->descent)
46 46
@@ -82,16 +82,8 @@ struct mac_display_info
82 /* Whether the screen supports color */ 82 /* Whether the screen supports color */
83 int color_p; 83 int color_p;
84 84
85#if 0
86 /* Number of bits per pixel on this screen. */
87 int n_cbits;
88#endif
89
90 /* Dimensions of this screen. */ 85 /* Dimensions of this screen. */
91 int height, width; 86 int height, width;
92#if 0
93 int height_in,width_in;
94#endif
95 87
96 /* Mask of things that cause the mouse to be grabbed. */ 88 /* Mask of things that cause the mouse to be grabbed. */
97 int grabbed; 89 int grabbed;
@@ -111,33 +103,12 @@ struct mac_display_info
111 /* Resource data base */ 103 /* Resource data base */
112 XrmDatabase xrdb; 104 XrmDatabase xrdb;
113 105
114#if 0
115 /* color palette information. */
116 int has_palette;
117 struct w32_palette_entry * color_list;
118 unsigned num_colors;
119 HPALETTE palette;
120
121 /* deferred action flags checked when starting frame update. */
122 int regen_palette;
123
124 /* Keystroke that has been faked by Emacs and will be ignored when
125 received; value is reset after key is received. */
126 int faked_key;
127
128#endif
129
130 /* A table of all the fonts we have already loaded. */ 106 /* A table of all the fonts we have already loaded. */
131 struct font_info *font_table; 107 struct font_info *font_table;
132 108
133 /* The current capacity of font_table. */ 109 /* The current capacity of font_table. */
134 int font_table_size; 110 int font_table_size;
135 111
136 /* The number of fonts actually stored in the font table.
137 font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <=
138 n_fonts <= font_table_size. and font_table[i].name != 0. */
139 int n_fonts;
140
141 /* Minimum width over all characters in all fonts in font_table. */ 112 /* Minimum width over all characters in all fonts in font_table. */
142 int smallest_char_width; 113 int smallest_char_width;
143 114
@@ -148,7 +119,7 @@ struct mac_display_info
148 GC scratch_cursor_gc; 119 GC scratch_cursor_gc;
149 120
150 /* These variables describe the range of text currently shown in its 121 /* These variables describe the range of text currently shown in its
151 mouse-face, together with the window they apply to. As long as 122 mouse-face, together with the window they apply to. As long as
152 the mouse stays within this range, we need not redraw anything on 123 the mouse stays within this range, we need not redraw anything on
153 its account. Rows and columns are glyph matrix positions in 124 its account. Rows and columns are glyph matrix positions in
154 MOUSE_FACE_WINDOW. */ 125 MOUSE_FACE_WINDOW. */
@@ -168,7 +139,6 @@ struct mac_display_info
168 /* FRAME and X, Y position of mouse when last checked for 139 /* FRAME and X, Y position of mouse when last checked for
169 highlighting. X and Y can be negative or out of range for the frame. */ 140 highlighting. X and Y can be negative or out of range for the frame. */
170 struct frame *mouse_face_mouse_frame; 141 struct frame *mouse_face_mouse_frame;
171
172 int mouse_face_mouse_x, mouse_face_mouse_y; 142 int mouse_face_mouse_x, mouse_face_mouse_y;
173 143
174 /* Nonzero means defer mouse-motion highlighting. */ 144 /* Nonzero means defer mouse-motion highlighting. */
@@ -181,6 +151,11 @@ struct mac_display_info
181 151
182 char *mac_id_name; 152 char *mac_id_name;
183 153
154 /* The number of fonts actually stored in the font table.
155 font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <=
156 n_fonts <= font_table_size and font_table[i].name != 0. */
157 int n_fonts;
158
184 /* Pointer to bitmap records. */ 159 /* Pointer to bitmap records. */
185 struct mac_bitmap_record *bitmaps; 160 struct mac_bitmap_record *bitmaps;
186 161
@@ -237,7 +212,7 @@ extern int unibyte_display_via_language_environment;
237extern struct x_display_info *x_display_info_for_display P_ ((Display *)); 212extern struct x_display_info *x_display_info_for_display P_ ((Display *));
238extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object)); 213extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
239 214
240extern struct mac_display_info *mac_term_init (); 215extern struct mac_display_info *mac_term_init P_ ((Lisp_Object, char *, char *));
241 216
242extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int)); 217extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
243extern struct font_info *x_get_font_info P_ ((struct frame *f, int)); 218extern struct font_info *x_get_font_info P_ ((struct frame *f, int));
@@ -262,33 +237,8 @@ struct mac_output {
262 /* Menubar "widget" handle. */ 237 /* Menubar "widget" handle. */
263 int menubar_widget; 238 int menubar_widget;
264 239
265 Window mWP; /* pointer to QuickDraw window */
266 FRAME_PTR mFP; /* points back to the frame struct */ 240 FRAME_PTR mFP; /* points back to the frame struct */
267 241
268#if 0
269 int mNumCols; /* number of characters per column */
270 int mNumRows; /* number of characters per row */
271 int mLineHeight; /* height of one line of text in pixels */
272 int mCharWidth; /* width of one character in pixels */
273 int mHomeX; /* X pixel coordinate of lower left
274 corner of character at (0, 0) */
275 int mHomeY; /* Y pixel coordinate of lower left
276 corner of character at (0, 0) */
277 int mHighlight; /* current highlight state (0 = off). */
278 int mTermWinSize; /* num of lines from top of window
279 affected by ins_del_lines; set by
280 set_terminal_window. */
281#endif /* 0 */
282
283#if 0
284 /* stuffs used by xfaces.c */
285 struct face **param_faces;
286 int n_param_faces;
287 struct face **computed_faces;
288 int n_computed_faces;
289 int size_computed_faces;
290#endif
291
292 /* Here are the Graphics Contexts for the default font. */ 242 /* Here are the Graphics Contexts for the default font. */
293 GC normal_gc; /* Normal video */ 243 GC normal_gc; /* Normal video */
294 GC reverse_gc; /* Reverse video */ 244 GC reverse_gc; /* Reverse video */
@@ -322,6 +272,7 @@ struct mac_output {
322 unsigned long mouse_pixel; 272 unsigned long mouse_pixel;
323 unsigned long cursor_foreground_pixel; 273 unsigned long cursor_foreground_pixel;
324 274
275#if 0
325 /* Foreground color for scroll bars. A value of -1 means use the 276 /* Foreground color for scroll bars. A value of -1 means use the
326 default (black for non-toolkit scroll bars). */ 277 default (black for non-toolkit scroll bars). */
327 unsigned long scroll_bar_foreground_pixel; 278 unsigned long scroll_bar_foreground_pixel;
@@ -330,6 +281,7 @@ struct mac_output {
330 default (background color of the frame for non-toolkit scroll 281 default (background color of the frame for non-toolkit scroll
331 bars). */ 282 bars). */
332 unsigned long scroll_bar_background_pixel; 283 unsigned long scroll_bar_background_pixel;
284#endif
333 285
334 /* Descriptor for the cursor in use for this window. */ 286 /* Descriptor for the cursor in use for this window. */
335 Cursor text_cursor; 287 Cursor text_cursor;
@@ -357,10 +309,6 @@ struct mac_output {
357 ControlRef hourglass_control; 309 ControlRef hourglass_control;
358#endif 310#endif
359 311
360#if 0
361 DWORD dwStyle;
362#endif
363
364 /* This is the Emacs structure for the display this frame is on. */ 312 /* This is the Emacs structure for the display this frame is on. */
365 /* struct w32_display_info *display_info; */ 313 /* struct w32_display_info *display_info; */
366 314
@@ -377,10 +325,6 @@ struct mac_output {
377 /* Nonzero means a menu command is being processed. */ 325 /* Nonzero means a menu command is being processed. */
378 char menu_command_in_progress; 326 char menu_command_in_progress;
379 327
380 /* Nonzero means menubar is about to become active, but should be
381 brought up to date first. */
382 volatile char pending_menu_activation;
383
384 /* Relief GCs, colors etc. */ 328 /* Relief GCs, colors etc. */
385 struct relief 329 struct relief
386 { 330 {
@@ -404,8 +348,8 @@ typedef struct mac_output mac_output;
404#define FRAME_X_OUTPUT(f) ((f)->output_data.mac) 348#define FRAME_X_OUTPUT(f) ((f)->output_data.mac)
405 349
406/* Return the Mac window used for displaying data in frame F. */ 350/* Return the Mac window used for displaying data in frame F. */
407#define FRAME_MAC_WINDOW(f) ((f)->output_data.mac->mWP) 351#define FRAME_MAC_WINDOW(f) ((f)->output_data.mac->window_desc)
408#define FRAME_X_WINDOW(f) ((f)->output_data.mac->mWP) 352#define FRAME_X_WINDOW(f) ((f)->output_data.mac->window_desc)
409 353
410#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel) 354#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
411#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel) 355#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
@@ -531,7 +475,7 @@ struct scroll_bar {
531 475
532/* Return the inside width of a vertical scroll bar, given the outside 476/* Return the inside width of a vertical scroll bar, given the outside
533 width. */ 477 width. */
534#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f,width) \ 478#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f, width) \
535 ((width) \ 479 ((width) \
536 - VERTICAL_SCROLL_BAR_LEFT_BORDER \ 480 - VERTICAL_SCROLL_BAR_LEFT_BORDER \
537 - VERTICAL_SCROLL_BAR_RIGHT_BORDER \ 481 - VERTICAL_SCROLL_BAR_RIGHT_BORDER \