diff options
| author | Richard M. Stallman | 1994-10-25 10:42:02 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-10-25 10:42:02 +0000 |
| commit | e964ed223e77e85cb77e3ff374a1b3ec5c02847d (patch) | |
| tree | ec69187d48bedf28bf3c03d9895dd6daa86ed105 | |
| parent | c6423dc1ace36c9f26781cb80995bca27e4b7225 (diff) | |
| download | emacs-e964ed223e77e85cb77e3ff374a1b3ec5c02847d.tar.gz emacs-e964ed223e77e85cb77e3ff374a1b3ec5c02847d.zip | |
Delete X10 code.
(struct x_display_info): New fields bitmaps, bitmaps_size, bitmaps_last.
(struct x_bitmap_record): Structure moved here.
(struct font_info): New type.
(struct x_display_info): New fields font_table, font_table_size and n_fonts.
(struct x_display_info): New field scratch_cursor_gc.
(mouse_face_*): New fields.
(struct x_display_info): New field x_id_name.
(struct x_display_info): Replace elements `name'
and `face_list_cache' with one cons cell `name_list_element'.
(x_display_name_list): Variable declared.
| -rw-r--r-- | src/xterm.h | 97 |
1 files changed, 81 insertions, 16 deletions
diff --git a/src/xterm.h b/src/xterm.h index 17dbfc817f7..32dab48cd1b 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -17,16 +17,12 @@ You should have received a copy of the GNU General Public License | |||
| 17 | along with GNU Emacs; see the file COPYING. If not, write to | 17 | along with GNU Emacs; see the file COPYING. If not, write to |
| 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 19 | 19 | ||
| 20 | #ifdef HAVE_X11 | ||
| 21 | #include <X11/Xlib.h> | 20 | #include <X11/Xlib.h> |
| 22 | #include <X11/cursorfont.h> | 21 | #include <X11/cursorfont.h> |
| 23 | #include <X11/Xutil.h> | 22 | #include <X11/Xutil.h> |
| 24 | #include <X11/keysym.h> | 23 | #include <X11/keysym.h> |
| 25 | #include <X11/Xatom.h> | 24 | #include <X11/Xatom.h> |
| 26 | #include <X11/Xresource.h> | 25 | #include <X11/Xresource.h> |
| 27 | #else | ||
| 28 | #include <X/Xlib.h> | ||
| 29 | #endif /* HAVE_X11 */ | ||
| 30 | 26 | ||
| 31 | #ifdef USE_X_TOOLKIT | 27 | #ifdef USE_X_TOOLKIT |
| 32 | #include <X11/StringDefs.h> | 28 | #include <X11/StringDefs.h> |
| @@ -145,22 +141,43 @@ extern Visual *select_visual (); | |||
| 145 | enum text_cursor_kinds { | 141 | enum text_cursor_kinds { |
| 146 | filled_box_cursor, hollow_box_cursor, bar_cursor | 142 | filled_box_cursor, hollow_box_cursor, bar_cursor |
| 147 | }; | 143 | }; |
| 144 | |||
| 145 | /* This data type is used for the font_table field | ||
| 146 | of struct x_display_info. */ | ||
| 147 | |||
| 148 | struct font_info | ||
| 149 | { | ||
| 150 | XFontStruct *font; | ||
| 151 | char *name; | ||
| 152 | char *full_name; | ||
| 153 | }; | ||
| 154 | |||
| 155 | /* Structure recording X pixmap and reference count. | ||
| 156 | If REFCOUNT is 0 then this record is free to be reused. */ | ||
| 157 | |||
| 158 | struct x_bitmap_record | ||
| 159 | { | ||
| 160 | Pixmap pixmap; | ||
| 161 | char *file; | ||
| 162 | int refcount; | ||
| 163 | /* Record some info about this pixmap. */ | ||
| 164 | int height, width, depth; | ||
| 165 | }; | ||
| 148 | 166 | ||
| 149 | /* For each X display, we have a structure that records | 167 | /* For each X display, we have a structure that records |
| 150 | information about it. */ | 168 | information about it. */ |
| 151 | 169 | ||
| 152 | struct x_display_info | 170 | struct x_display_info |
| 153 | { | 171 | { |
| 154 | /* Chain of all x_display structures. */ | 172 | /* Chain of all x_display_info structures. */ |
| 155 | struct x_display_info *next; | 173 | struct x_display_info *next; |
| 156 | /* Connection number (normally a file descriptor number). */ | 174 | /* Connection number (normally a file descriptor number). */ |
| 157 | int connection; | 175 | int connection; |
| 158 | /* This says how to access this display in Xlib. */ | 176 | /* This says how to access this display in Xlib. */ |
| 159 | Display *display; | 177 | Display *display; |
| 160 | /* This records previous values returned by x-list-fonts. */ | 178 | /* This is a cons cell of the form (NAME . FONT-LIST-CACHE). |
| 161 | Lisp_Object font_list_cache; | 179 | The same cons cell also appears in x_display_name_list. */ |
| 162 | /* The name of this display. */ | 180 | Lisp_Object name_list_element; |
| 163 | Lisp_Object name; | ||
| 164 | /* Number of frames that are on this display. */ | 181 | /* Number of frames that are on this display. */ |
| 165 | int reference_count; | 182 | int reference_count; |
| 166 | /* The Screen this connection is connected to. */ | 183 | /* The Screen this connection is connected to. */ |
| @@ -178,10 +195,58 @@ struct x_display_info | |||
| 178 | int icon_bitmap_id; | 195 | int icon_bitmap_id; |
| 179 | /* The root window of this screen. */ | 196 | /* The root window of this screen. */ |
| 180 | Window root_window; | 197 | Window root_window; |
| 181 | 198 | /* The cursor to use for vertical scroll bars. */ | |
| 199 | Cursor vertical_scroll_bar_cursor; | ||
| 182 | /* X Resource data base */ | 200 | /* X Resource data base */ |
| 183 | XrmDatabase xrdb; | 201 | XrmDatabase xrdb; |
| 184 | 202 | ||
| 203 | /* A table of all the fonts we have already loaded. */ | ||
| 204 | struct font_info *font_table; | ||
| 205 | |||
| 206 | /* The current capacity of x_font_table. */ | ||
| 207 | int font_table_size; | ||
| 208 | |||
| 209 | /* Reusable Graphics Context for drawing a cursor in a non-default face. */ | ||
| 210 | GC scratch_cursor_gc; | ||
| 211 | |||
| 212 | /* These variables describe the range of text currently shown | ||
| 213 | in its mouse-face, together with the window they apply to. | ||
| 214 | As long as the mouse stays within this range, we need not | ||
| 215 | redraw anything on its account. */ | ||
| 216 | int mouse_face_beg_row, mouse_face_beg_col; | ||
| 217 | int mouse_face_end_row, mouse_face_end_col; | ||
| 218 | int mouse_face_past_end; | ||
| 219 | Lisp_Object mouse_face_window; | ||
| 220 | int mouse_face_face_id; | ||
| 221 | |||
| 222 | /* 1 if a mouse motion event came and we didn't handle it right away because | ||
| 223 | gc was in progress. */ | ||
| 224 | int mouse_face_deferred_gc; | ||
| 225 | |||
| 226 | /* FRAME and X, Y position of mouse when last checked for | ||
| 227 | highlighting. X and Y can be negative or out of range for the frame. */ | ||
| 228 | struct frame *mouse_face_mouse_frame; | ||
| 229 | int mouse_face_mouse_x, mouse_face_mouse_y; | ||
| 230 | |||
| 231 | /* Nonzero means defer mouse-motion highlighting. */ | ||
| 232 | int mouse_face_defer; | ||
| 233 | |||
| 234 | char *x_id_name; | ||
| 235 | |||
| 236 | /* The number of fonts actually stored in x_font_table. | ||
| 237 | font_table[n] is used and valid iff 0 <= n < n_fonts. | ||
| 238 | 0 <= n_fonts <= font_table_size. */ | ||
| 239 | int n_fonts; | ||
| 240 | |||
| 241 | /* Pointer to bitmap records. */ | ||
| 242 | struct x_bitmap_record *bitmaps; | ||
| 243 | |||
| 244 | /* Allocated size of bitmaps field. */ | ||
| 245 | int bitmaps_size; | ||
| 246 | |||
| 247 | /* Last used bitmap index. */ | ||
| 248 | int bitmaps_last; | ||
| 249 | |||
| 185 | /* Which modifier keys are on which modifier bits? | 250 | /* Which modifier keys are on which modifier bits? |
| 186 | 251 | ||
| 187 | With each keystroke, X returns eight bits indicating which modifier | 252 | With each keystroke, X returns eight bits indicating which modifier |
| @@ -229,6 +294,12 @@ struct x_display_info | |||
| 229 | /* This is a chain of structures for all the X displays currently in use. */ | 294 | /* This is a chain of structures for all the X displays currently in use. */ |
| 230 | extern struct x_display_info *x_display_list; | 295 | extern struct x_display_info *x_display_list; |
| 231 | 296 | ||
| 297 | /* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE), | ||
| 298 | one for each element of x_display_list and in the same order. | ||
| 299 | NAME is the name of the frame. | ||
| 300 | FONT-LIST-CACHE records previous values returned by x-list-fonts. */ | ||
| 301 | extern Lisp_Object x_display_name_list; | ||
| 302 | |||
| 232 | extern struct x_display_info *x_display_info_for_display (); | 303 | extern struct x_display_info *x_display_info_for_display (); |
| 233 | extern struct x_display_info *x_display_info_for_name (); | 304 | extern struct x_display_info *x_display_info_for_name (); |
| 234 | 305 | ||
| @@ -253,7 +324,6 @@ struct x_display | |||
| 253 | /* Height of a line, in pixels. */ | 324 | /* Height of a line, in pixels. */ |
| 254 | int line_height; | 325 | int line_height; |
| 255 | 326 | ||
| 256 | #ifdef HAVE_X11 | ||
| 257 | /* The tiled border used when the mouse is out of the frame. */ | 327 | /* The tiled border used when the mouse is out of the frame. */ |
| 258 | Pixmap border_tile; | 328 | Pixmap border_tile; |
| 259 | 329 | ||
| @@ -261,7 +331,6 @@ struct x_display | |||
| 261 | GC normal_gc; /* Normal video */ | 331 | GC normal_gc; /* Normal video */ |
| 262 | GC reverse_gc; /* Reverse video */ | 332 | GC reverse_gc; /* Reverse video */ |
| 263 | GC cursor_gc; /* cursor drawing */ | 333 | GC cursor_gc; /* cursor drawing */ |
| 264 | #endif /* HAVE_X11 */ | ||
| 265 | 334 | ||
| 266 | /* Width of the internal border. This is a line of background color | 335 | /* Width of the internal border. This is a line of background color |
| 267 | just inside the window's border. When the frame is selected, | 336 | just inside the window's border. When the frame is selected, |
| @@ -309,14 +378,10 @@ struct x_display | |||
| 309 | unsigned long cursor_foreground_pixel; | 378 | unsigned long cursor_foreground_pixel; |
| 310 | 379 | ||
| 311 | /* Descriptor for the cursor in use for this window. */ | 380 | /* Descriptor for the cursor in use for this window. */ |
| 312 | #ifdef HAVE_X11 | ||
| 313 | Cursor text_cursor; | 381 | Cursor text_cursor; |
| 314 | Cursor nontext_cursor; | 382 | Cursor nontext_cursor; |
| 315 | Cursor modeline_cursor; | 383 | Cursor modeline_cursor; |
| 316 | Cursor cross_cursor; | 384 | Cursor cross_cursor; |
| 317 | #else | ||
| 318 | Cursor cursor; | ||
| 319 | #endif | ||
| 320 | 385 | ||
| 321 | /* The name that was associated with the icon, the last time | 386 | /* The name that was associated with the icon, the last time |
| 322 | it was refreshed. Usually the same as the name of the | 387 | it was refreshed. Usually the same as the name of the |