aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xterm.h306
1 files changed, 205 insertions, 101 deletions
diff --git a/src/xterm.h b/src/xterm.h
index b6803aa3cae..2ba12680a7a 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1,5 +1,5 @@
1/* Definitions and headers for communication with X protocol. 1/* Definitions and headers for communication with X protocol.
2 Copyright (C) 1989, 1993, 1994 Free Software Foundation, Inc. 2 Copyright (C) 1989, 1993, 1994, 1998, 1999 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -120,8 +120,12 @@ extern struct frame *x_top_window_to_frame ();
120 120
121extern Visual *select_visual (); 121extern Visual *select_visual ();
122 122
123enum text_cursor_kinds { 123enum text_cursor_kinds
124 filled_box_cursor, hollow_box_cursor, bar_cursor 124{
125 NO_CURSOR = -1,
126 FILLED_BOX_CURSOR,
127 HOLLOW_BOX_CURSOR,
128 BAR_CURSOR
125}; 129};
126 130
127/* Structure recording X pixmap and reference count. 131/* Structure recording X pixmap and reference count.
@@ -143,32 +147,48 @@ struct x_display_info
143{ 147{
144 /* Chain of all x_display_info structures. */ 148 /* Chain of all x_display_info structures. */
145 struct x_display_info *next; 149 struct x_display_info *next;
150
146 /* Connection number (normally a file descriptor number). */ 151 /* Connection number (normally a file descriptor number). */
147 int connection; 152 int connection;
153
148 /* This says how to access this display in Xlib. */ 154 /* This says how to access this display in Xlib. */
149 Display *display; 155 Display *display;
156
150 /* This is a cons cell of the form (NAME . FONT-LIST-CACHE). 157 /* This is a cons cell of the form (NAME . FONT-LIST-CACHE).
151 The same cons cell also appears in x_display_name_list. */ 158 The same cons cell also appears in x_display_name_list. */
152 Lisp_Object name_list_element; 159 Lisp_Object name_list_element;
160
153 /* Number of frames that are on this display. */ 161 /* Number of frames that are on this display. */
154 int reference_count; 162 int reference_count;
163
155 /* The Screen this connection is connected to. */ 164 /* The Screen this connection is connected to. */
156 Screen *screen; 165 Screen *screen;
166
167 /* Dots per inch of the screen. */
168 double resx, resy;
169
157 /* The Visual being used for this display. */ 170 /* The Visual being used for this display. */
158 Visual *visual; 171 Visual *visual;
172
159 /* Number of panes on this screen. */ 173 /* Number of panes on this screen. */
160 int n_planes; 174 int n_planes;
175
161 /* Dimensions of this screen. */ 176 /* Dimensions of this screen. */
162 int height, width; 177 int height, width;
178
163 /* Mask of things that cause the mouse to be grabbed. */ 179 /* Mask of things that cause the mouse to be grabbed. */
164 int grabbed; 180 int grabbed;
181
165 /* Emacs bitmap-id of the default icon bitmap for this frame. 182 /* Emacs bitmap-id of the default icon bitmap for this frame.
166 Or -1 if none has been allocated yet. */ 183 Or -1 if none has been allocated yet. */
167 int icon_bitmap_id; 184 int icon_bitmap_id;
185
168 /* The root window of this screen. */ 186 /* The root window of this screen. */
169 Window root_window; 187 Window root_window;
188
170 /* The cursor to use for vertical scroll bars. */ 189 /* The cursor to use for vertical scroll bars. */
171 Cursor vertical_scroll_bar_cursor; 190 Cursor vertical_scroll_bar_cursor;
191
172 /* X Resource data base */ 192 /* X Resource data base */
173 XrmDatabase xrdb; 193 XrmDatabase xrdb;
174 194
@@ -178,15 +198,24 @@ struct x_display_info
178 /* The current capacity of x_font_table. */ 198 /* The current capacity of x_font_table. */
179 int font_table_size; 199 int font_table_size;
180 200
201 /* Minimum width over all characters in all fonts in font_table. */
202 int smallest_char_width;
203
204 /* Minimum font height over all fonts in font_table. */
205 int smallest_font_height;
206
181 /* Reusable Graphics Context for drawing a cursor in a non-default face. */ 207 /* Reusable Graphics Context for drawing a cursor in a non-default face. */
182 GC scratch_cursor_gc; 208 GC scratch_cursor_gc;
183 209
184 /* These variables describe the range of text currently shown 210 /* These variables describe the range of text currently shown in its
185 in its mouse-face, together with the window they apply to. 211 mouse-face, together with the window they apply to. As long as
186 As long as the mouse stays within this range, we need not 212 the mouse stays within this range, we need not redraw anything on
187 redraw anything on its account. */ 213 its account. Rows and columns are glyph matrix positions in
214 MOUSE_FACE_WINDOW. */
188 int mouse_face_beg_row, mouse_face_beg_col; 215 int mouse_face_beg_row, mouse_face_beg_col;
216 int mouse_face_beg_x, mouse_face_beg_y;
189 int mouse_face_end_row, mouse_face_end_col; 217 int mouse_face_end_row, mouse_face_end_col;
218 int mouse_face_end_x, mouse_face_end_y;
190 int mouse_face_past_end; 219 int mouse_face_past_end;
191 Lisp_Object mouse_face_window; 220 Lisp_Object mouse_face_window;
192 int mouse_face_face_id; 221 int mouse_face_face_id;
@@ -203,11 +232,13 @@ struct x_display_info
203 /* Nonzero means defer mouse-motion highlighting. */ 232 /* Nonzero means defer mouse-motion highlighting. */
204 int mouse_face_defer; 233 int mouse_face_defer;
205 234
235 int mouse_face_image_state;
236
206 char *x_id_name; 237 char *x_id_name;
207 238
208 /* The number of fonts actually stored in x_font_table. 239 /* The number of fonts actually stored in x_font_table.
209 font_table[n] is used and valid iff 0 <= n < n_fonts. 240 font_table[n] is used and valid iff 0 <= n < n_fonts. 0 <=
210 0 <= n_fonts <= font_table_size. */ 241 n_fonts <= font_table_size and font_table[i].name != 0. */
211 int n_fonts; 242 int n_fonts;
212 243
213 /* Pointer to bitmap records. */ 244 /* Pointer to bitmap records. */
@@ -245,15 +276,19 @@ struct x_display_info
245 276
246 /* Communication with window managers. */ 277 /* Communication with window managers. */
247 Atom Xatom_wm_protocols; 278 Atom Xatom_wm_protocols;
279
248 /* Kinds of protocol things we may receive. */ 280 /* Kinds of protocol things we may receive. */
249 Atom Xatom_wm_take_focus; 281 Atom Xatom_wm_take_focus;
250 Atom Xatom_wm_save_yourself; 282 Atom Xatom_wm_save_yourself;
251 Atom Xatom_wm_delete_window; 283 Atom Xatom_wm_delete_window;
284
252 /* Atom for indicating window state to the window manager. */ 285 /* Atom for indicating window state to the window manager. */
253 Atom Xatom_wm_change_state; 286 Atom Xatom_wm_change_state;
287
254 /* Other WM communication */ 288 /* Other WM communication */
255 Atom Xatom_wm_configure_denied; /* When our config request is denied */ 289 Atom Xatom_wm_configure_denied; /* When our config request is denied */
256 Atom Xatom_wm_window_moved; /* When the WM moves us. */ 290 Atom Xatom_wm_window_moved; /* When the WM moves us. */
291
257 /* EditRes protocol */ 292 /* EditRes protocol */
258 Atom Xatom_editres; 293 Atom Xatom_editres;
259 294
@@ -269,6 +304,12 @@ struct x_display_info
269 Xatom_MULE_BASELINE_OFFSET, Xatom_MULE_RELATIVE_COMPOSE, 304 Xatom_MULE_BASELINE_OFFSET, Xatom_MULE_RELATIVE_COMPOSE,
270 Xatom_MULE_DEFAULT_ASCENT; 305 Xatom_MULE_DEFAULT_ASCENT;
271 306
307 /* More atoms for Ghostscript support. */
308 Atom Xatom_DONE, Xatom_PAGE;
309
310 /* Atom used in toolkit scroll bar client messages. */
311 Atom Xatom_Scrollbar;
312
272#ifdef MULTI_KBOARD 313#ifdef MULTI_KBOARD
273 struct kboard *kboard; 314 struct kboard *kboard;
274#endif 315#endif
@@ -297,6 +338,12 @@ struct x_display_info
297 /* The null pixel used for filling a character background with 338 /* The null pixel used for filling a character background with
298 background color of a gc. */ 339 background color of a gc. */
299 Pixmap null_pixel; 340 Pixmap null_pixel;
341
342 /* The gray pixmap. */
343 Pixmap gray;
344
345 /* Cache of images. */
346 struct image_cache *image_cache;
300}; 347};
301 348
302/* This is a chain of structures for all the X displays currently in use. */ 349/* This is a chain of structures for all the X displays currently in use. */
@@ -314,12 +361,13 @@ extern Lisp_Object Vx_pixel_size_width_font_regexp;
314/* A flag to control how to display unibyte 8-bit character. */ 361/* A flag to control how to display unibyte 8-bit character. */
315extern int unibyte_display_via_language_environment; 362extern int unibyte_display_via_language_environment;
316 363
317extern struct x_display_info *x_display_info_for_display (); 364struct x_display_info *x_display_info_for_display P_ ((Display *));
318extern struct x_display_info *x_display_info_for_name (); 365struct x_display_info *x_display_info_for_name ();
319 366
320extern struct x_display_info *x_term_init (); 367extern struct x_display_info *x_term_init ();
321 368
322extern Lisp_Object x_list_fonts (); 369extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
370
323extern struct font_info *x_get_font_info(), *x_load_font (), *x_query_font (); 371extern struct font_info *x_get_font_info(), *x_load_font (), *x_query_font ();
324extern void x_find_ccl_program(); 372extern void x_find_ccl_program();
325 373
@@ -411,11 +459,28 @@ struct x_output
411 unsigned long mouse_pixel; 459 unsigned long mouse_pixel;
412 unsigned long cursor_foreground_pixel; 460 unsigned long cursor_foreground_pixel;
413 461
462 /* Foreground color for scroll bars. A value of -1 means use the
463 default (black for non-toolkit scroll bars). */
464 unsigned long scroll_bar_foreground_pixel;
465
466 /* Background color for scroll bars. A value of -1 means use the
467 default (background color of the frame for non-toolkit scroll
468 bars). */
469 unsigned long scroll_bar_background_pixel;
470
414 /* Descriptor for the cursor in use for this window. */ 471 /* Descriptor for the cursor in use for this window. */
415 Cursor text_cursor; 472 Cursor text_cursor;
416 Cursor nontext_cursor; 473 Cursor nontext_cursor;
417 Cursor modeline_cursor; 474 Cursor modeline_cursor;
418 Cursor cross_cursor; 475 Cursor cross_cursor;
476 Cursor busy_cursor;
477
478 /* Window whose cursor is busy_cursor. This window is temporarily
479 mapped to display a busy-cursor. */
480 Window busy_window;
481
482 /* Non-zero means busy cursor is currently displayed. */
483 unsigned busy_p : 1;
419 484
420 /* Flag to set when the X window needs to be completely repainted. */ 485 /* Flag to set when the X window needs to be completely repainted. */
421 int needs_exposure; 486 int needs_exposure;
@@ -448,20 +513,10 @@ struct x_output
448 scroll bars, in pixels. */ 513 scroll bars, in pixels. */
449 int vertical_scroll_bar_extra; 514 int vertical_scroll_bar_extra;
450 515
451 /* Table of parameter faces for this frame. Any X resources (pixel 516 /* The extra width currently allotted for the areas in which
452 values, fonts) referred to here have been allocated explicitly 517 truncation marks, continuation marks, and overlay arrows are
453 for this face, and should be freed if we change the face. */ 518 displayed. */
454 struct face **param_faces; 519 int flags_areas_extra;
455 int n_param_faces;
456
457 /* Table of computed faces for this frame. These are the faces
458 whose indexes go into the upper bits of a glyph, computed by
459 combining the parameter faces specified by overlays, text
460 properties, and what have you. The X resources mentioned here
461 are all shared with parameter faces. */
462 struct face **computed_faces;
463 int n_computed_faces; /* How many are valid */
464 int size_computed_faces; /* How many are allocated */
465 520
466 /* This is the gravity value for the specified window position. */ 521 /* This is the gravity value for the specified window position. */
467 int win_gravity; 522 int win_gravity;
@@ -497,19 +552,20 @@ struct x_output
497 /* Input context (currently, this means Compose key handler setup). */ 552 /* Input context (currently, this means Compose key handler setup). */
498 XIC xic; 553 XIC xic;
499#endif 554#endif
500};
501
502/* Get at the computed faces of an X window frame. */
503#define FRAME_PARAM_FACES(f) ((f)->output_data.x->param_faces)
504#define FRAME_N_PARAM_FACES(f) ((f)->output_data.x->n_param_faces)
505#define FRAME_DEFAULT_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[0])
506#define FRAME_MODE_LINE_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[1])
507 555
508#define FRAME_COMPUTED_FACES(f) ((f)->output_data.x->computed_faces) 556 /* Relief GCs, colors etc. */
509#define FRAME_N_COMPUTED_FACES(f) ((f)->output_data.x->n_computed_faces) 557 struct relief
510#define FRAME_SIZE_COMPUTED_FACES(f) ((f)->output_data.x->size_computed_faces) 558 {
511#define FRAME_DEFAULT_FACE(f) ((f)->output_data.x->computed_faces[0]) 559 GC gc;
512#define FRAME_MODE_LINE_FACE(f) ((f)->output_data.x->computed_faces[1]) 560 unsigned long pixel;
561 int allocated_p;
562 }
563 black_relief, white_relief;
564
565 /* The background for which the above relief GCs were set up.
566 They are changed only when a different background is involved. */
567 unsigned long relief_background;
568};
513 569
514/* Return the X window used for displaying data in frame F. */ 570/* Return the X window used for displaying data in frame F. */
515#define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc) 571#define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc)
@@ -528,6 +584,10 @@ struct x_output
528#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width) 584#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width)
529#define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height) 585#define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height)
530 586
587/* Width of the default font of frame F. Must be defined by each
588 terminal specific header. */
589#define FRAME_DEFAULT_FONT_WIDTH(F) FONT_WIDTH (FRAME_FONT (F))
590
531/* This gives the x_display_info structure for the display F is on. */ 591/* This gives the x_display_info structure for the display F is on. */
532#define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info) 592#define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info)
533 593
@@ -548,6 +608,41 @@ struct x_output
548 608
549#define FRAME_XIM(f) ((f)->output_data.x->xim) 609#define FRAME_XIM(f) ((f)->output_data.x->xim)
550#define FRAME_XIC(f) ((f)->output_data.x->xic) 610#define FRAME_XIC(f) ((f)->output_data.x->xic)
611
612/* Value is the smallest width of any character in any font on frame F. */
613
614#define FRAME_SMALLEST_CHAR_WIDTH(F) \
615 FRAME_X_DISPLAY_INFO(F)->smallest_char_width
616
617/* Value is the smallest height of any font on frame F. */
618
619#define FRAME_SMALLEST_FONT_HEIGHT(F) \
620 FRAME_X_DISPLAY_INFO(F)->smallest_font_height
621
622/* Return a pointer to the image cache of frame F. */
623
624#define FRAME_X_IMAGE_CACHE(F) FRAME_X_DISPLAY_INFO ((F))->image_cache
625
626
627/* Pixel width of the bitmaps drawn to indicate truncation,
628 continuation etc. */
629
630#define FRAME_FLAGS_BITMAP_WIDTH(f) 8
631#define FRAME_FLAGS_BITMAP_HEIGHT(f) 8
632
633/* Width of a single area reserved for drawing truncation bitmaps,
634 continuation bitmaps and alike. The width is in canonical char
635 units of the frame. This must currently be the case because window
636 sizes aren't pixel values. If it weren't the case, we wouldn't be
637 able to split windows horizontally nicely. */
638
639#define FRAME_X_FLAGS_AREA_COLS(F) \
640 ((FRAME_FLAGS_BITMAP_WIDTH ((F)) + CANON_X_UNIT ((F)) - 1) \
641 / CANON_X_UNIT ((F)))
642
643#define FRAME_X_FLAGS_AREA_WIDTH(F) \
644 (FRAME_X_FLAGS_AREA_COLS ((F)) * CANON_X_UNIT ((F)))
645
551 646
552/* X-specific scroll bar stuff. */ 647/* X-specific scroll bar stuff. */
553 648
@@ -575,6 +670,9 @@ struct scroll_bar {
575 32-bit quantity, we store it split into two 32-bit values. */ 670 32-bit quantity, we store it split into two 32-bit values. */
576 Lisp_Object x_window_low, x_window_high; 671 Lisp_Object x_window_low, x_window_high;
577 672
673 /* Same as above for the widget. */
674 Lisp_Object x_widget_low, x_widget_high;
675
578 /* The position and size of the scroll bar in pixels, relative to the 676 /* The position and size of the scroll bar in pixels, relative to the
579 frame. */ 677 frame. */
580 Lisp_Object top, left, width, height; 678 Lisp_Object top, left, width, height;
@@ -626,11 +724,14 @@ struct scroll_bar {
626#define SET_SCROLL_BAR_X_WINDOW(ptr, id) \ 724#define SET_SCROLL_BAR_X_WINDOW(ptr, id) \
627 (SCROLL_BAR_UNPACK ((ptr)->x_window_low, (ptr)->x_window_high, (int) id)) 725 (SCROLL_BAR_UNPACK ((ptr)->x_window_low, (ptr)->x_window_high, (int) id))
628 726
727/* Extract the X widget of the scroll bar from a struct scroll_bar. */
728#define SCROLL_BAR_X_WIDGET(ptr) \
729 ((Widget) SCROLL_BAR_PACK ((ptr)->x_widget_low, (ptr)->x_widget_high))
730
731/* Store a widget id in a struct scroll_bar. */
732#define SET_SCROLL_BAR_X_WIDGET(ptr, w) \
733 (SCROLL_BAR_UNPACK ((ptr)->x_widget_low, (ptr)->x_widget_high, (int) w))
629 734
630/* Return the outside pixel height for a vertical scroll bar HEIGHT
631 rows high on frame F. */
632#define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \
633 ((height) * (f)->output_data.x->line_height)
634 735
635/* Return the inside width of a vertical scroll bar, given the outside 736/* Return the inside width of a vertical scroll bar, given the outside
636 width. */ 737 width. */
@@ -698,6 +799,7 @@ struct scroll_bar {
698#define CHAR_TO_PIXEL_WIDTH(f, width) \ 799#define CHAR_TO_PIXEL_WIDTH(f, width) \
699 (CHAR_TO_PIXEL_COL (f, width) \ 800 (CHAR_TO_PIXEL_COL (f, width) \
700 + (f)->output_data.x->vertical_scroll_bar_extra \ 801 + (f)->output_data.x->vertical_scroll_bar_extra \
802 + (f)->output_data.x->flags_areas_extra \
701 + (f)->output_data.x->internal_border_width) 803 + (f)->output_data.x->internal_border_width)
702#define CHAR_TO_PIXEL_HEIGHT(f, height) \ 804#define CHAR_TO_PIXEL_HEIGHT(f, height) \
703 (CHAR_TO_PIXEL_ROW (f, height) \ 805 (CHAR_TO_PIXEL_ROW (f, height) \
@@ -718,10 +820,12 @@ struct scroll_bar {
718#define PIXEL_TO_CHAR_WIDTH(f, width) \ 820#define PIXEL_TO_CHAR_WIDTH(f, width) \
719 (PIXEL_TO_CHAR_COL (f, ((width) \ 821 (PIXEL_TO_CHAR_COL (f, ((width) \
720 - (f)->output_data.x->internal_border_width \ 822 - (f)->output_data.x->internal_border_width \
823 - (f)->output_data.x->flags_areas_extra \
721 - (f)->output_data.x->vertical_scroll_bar_extra))) 824 - (f)->output_data.x->vertical_scroll_bar_extra)))
722#define PIXEL_TO_CHAR_HEIGHT(f, height) \ 825#define PIXEL_TO_CHAR_HEIGHT(f, height) \
723 (PIXEL_TO_CHAR_ROW (f, ((height) \ 826 (PIXEL_TO_CHAR_ROW (f, ((height) \
724 - (f)->output_data.x->internal_border_width))) 827 - (f)->output_data.x->internal_border_width)))
828
725 829
726/* If a struct input_event has a kind which is selection_request_event 830/* If a struct input_event has a kind which is selection_request_event
727 or selection_clear_event, then its contents are really described 831 or selection_clear_event, then its contents are really described
@@ -757,74 +861,70 @@ struct selection_input_event
757 (((struct selection_input_event *) (eventp))->time) 861 (((struct selection_input_event *) (eventp))->time)
758 862
759 863
760/* Interface to the face code functions. */
761
762/* Forward declarations for prototypes. */
763struct frame;
764struct window; 864struct window;
865struct glyph_matrix;
866struct frame;
765struct input_event; 867struct input_event;
766 868
767/* Create the first two computed faces for a frame -- the ones that 869/* From xselect.c. */
768 have GC's. */ 870
769extern void init_frame_faces P_ ((struct frame *)); 871void x_handle_selection_notify P_ ((XSelectionEvent *));
770 872void x_handle_property_notify P_ ((XPropertyEvent *));
771/* Free the resources for the faces associated with a frame. */ 873
772extern void free_frame_faces P_ ((struct frame *)); 874/* From xfns.c. */
773 875
774/* Given a computed face, find or make an equivalent display face 876void x_real_positions P_ ((struct frame *, int *, int *));
775 in face_vector, and return a pointer to it. */ 877void x_destroy_bitmap P_ ((struct frame *, int));
776extern struct face *intern_face P_ ((struct frame *, struct face *)); 878int x_create_bitmap_from_file P_ ((struct frame *, Lisp_Object));
777 879int x_create_bitmap_from_data P_ ((struct frame *, char *, unsigned,
778/* Given a frame and a face name, return the face's ID number, or 880 unsigned));
779 zero if it isn't a recognized face name. */ 881void x_reference_bitmap P_ ((struct frame *, int));
780extern int face_name_id_number P_ ((struct frame *, Lisp_Object)); 882void x_sync P_ ((struct frame *));
781 883int x_bitmap_pixmap P_ ((struct frame *, int));
782/* Return non-zero if FONT1 and FONT2 have the same size bounding box. 884void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
783 We assume that they're both character-cell fonts. */ 885int x_bitmap_height P_ ((struct frame *, int));
784extern int same_size_fonts P_ ((XFontStruct *, XFontStruct *)); 886int x_bitmap_width P_ ((struct frame *, int));
785 887int defined_color P_ ((struct frame *, char *, XColor *, int));
786/* Recompute the GC's for the default and modeline faces. 888Lisp_Object display_x_get_resource P_ ((struct x_display_info *,
787 We call this after changing frame parameters on which those GC's 889 Lisp_Object, Lisp_Object,
788 depend. */ 890 Lisp_Object, Lisp_Object));
789extern void recompute_basic_faces P_ ((struct frame *)); 891struct frame *check_x_frame P_ ((Lisp_Object));
790 892EXFUN (Fx_display_color_p, 1);
791/* Return the face ID associated with a buffer position POS. Store 893EXFUN (Fx_display_grayscale_p, 1);
792 into *ENDPTR the next position at which a different face is 894
793 needed. This does not take account of glyphs that specify their 895/* From xrdb.c. */
794 own face codes. F is the frame in use for display, and W is a 896
795 window displaying the current buffer. 897char *x_get_string_resource P_ ((XrmDatabase, char *, char *));
796 898char *x_get_customization_string P_ ((XrmDatabase, char *, char *));
797 REGION_BEG, REGION_END delimit the region, so it can be highlighted. */ 899XrmDatabase x_load_resources P_ ((Display *, char *, char *, char *));
798extern int compute_char_face P_ ((struct frame *frame, 900int x_get_resource P_ ((XrmDatabase, char *, char *,
799 struct window *w, 901 XrmRepresentation, XrmValue *));
800 int pos, 902void x_delete_display P_ ((struct x_display_info *));
801 int region_beg, int region_end, 903void x_make_frame_visible P_ ((struct frame *));
802 int *endptr, 904void x_iconify_frame P_ ((struct frame *));
803 int limit, int mouse)); 905void x_wm_set_size_hint P_ ((struct frame *, long, int));
804/* Return the face ID to use to display a special glyph which selects 906void x_set_offset P_ ((struct frame *, int, int, int));
805 FACE_CODE as the face ID, assuming that ordinarily the face would 907void x_wm_set_icon_position P_ ((struct frame *, int, int));
806 be BASIC_FACE. F is the frame. */ 908int x_catch_errors P_ ((Display *));
807extern int compute_glyph_face P_ ((struct frame *, int, int)); 909int x_had_errors_p P_ ((Display *));
808 910void x_uncatch_errors P_ ((Display *, int));
809/* Given a pixel position (PIX_X, PIX_Y) on the frame F, return 911void x_check_errors P_ ((Display *, char *));
810 glyph co-ordinates in (*X, *Y). Set *BOUNDS to the rectangle 912int x_text_icon P_ ((struct frame *, char *));
811 that the glyph at X, Y occupies, if BOUNDS != 0. 913int x_bitmap_icon P_ ((struct frame *, Lisp_Object));
812 If NOCLIP is nonzero, do not force the value into range. */ 914void x_set_window_size P_ ((struct frame *, int, int, int));
813 915void x_wm_set_window_state P_ ((struct frame *, int));
814extern void pixel_to_glyph_coords P_ ((struct frame *f, int pix_x, int pix_y, 916int x_alloc_nearest_color P_ ((Display *, Screen *, Colormap, XColor *));
815 int *x, int *y, XRectangle *bounds, 917
816 int noclip)); 918extern void pixel_to_glyph_coords P_ ((struct frame *, int, int,
817 919 int *, int *, XRectangle *, int));
818extern void glyph_to_pixel_coords P_ ((struct frame *f, int x, int y,
819 int *pix_x, int *pix_y));
820 920
821/* Defined in xterm.c */ 921/* Defined in xterm.c */
822 922
923extern void clear_mouse_face P_ ((struct x_display_info *));
823extern void cancel_mouse_face P_ ((struct frame *)); 924extern void cancel_mouse_face P_ ((struct frame *));
824extern void x_scroll_bar_clear P_ ((struct frame *)); 925extern void x_scroll_bar_clear P_ ((struct frame *));
825extern void x_start_queuing_selection_requests P_ ((Display *)); 926extern void x_start_queuing_selection_requests P_ ((Display *));
826extern void x_stop_queuing_selection_requests P_ ((Display *)); 927extern void x_stop_queuing_selection_requests P_ ((Display *));
827extern void x_display_cursor P_ ((struct frame *, int, int, int));
828extern void x_update_cursor P_ ((struct frame *, int)); 928extern void x_update_cursor P_ ((struct frame *, int));
829extern int x_text_icon P_ ((struct frame *, char *)); 929extern int x_text_icon P_ ((struct frame *, char *));
830extern int x_bitmap_icon P_ ((struct frame *, Lisp_Object)); 930extern int x_bitmap_icon P_ ((struct frame *, Lisp_Object));
@@ -850,6 +950,8 @@ extern void x_wm_set_icon_pixmap P_ ((struct frame *, int));
850extern void x_wm_set_icon_position P_ ((struct frame *, int, int)); 950extern void x_wm_set_icon_position P_ ((struct frame *, int, int));
851extern void x_delete_display P_ ((struct x_display_info *)); 951extern void x_delete_display P_ ((struct x_display_info *));
852extern void x_initialize P_ ((void)); 952extern void x_initialize P_ ((void));
953void x_display_cursor P_ ((struct window *, int, int, int, int, int));
954void x_update_cursor P_ ((struct frame *, int));
853 955
854/* Defined in xselect.c */ 956/* Defined in xselect.c */
855 957
@@ -885,17 +987,19 @@ extern int x_screen_planes P_ ((struct frame *));
885extern void x_sync P_ ((struct frame *)); 987extern void x_sync P_ ((struct frame *));
886 988
887/* Defined in xfaces.c */ 989/* Defined in xfaces.c */
990
888extern int frame_update_line_height P_ ((struct frame *)); 991extern int frame_update_line_height P_ ((struct frame *));
889extern void clear_face_cache P_ ((void));
890extern int compute_glyph_face P_ ((struct frame *, int, int)); 992extern int compute_glyph_face P_ ((struct frame *, int, int));
891extern int compute_glyph_face_1 P_ ((struct frame *, Lisp_Object, int)); 993extern int compute_glyph_face_1 P_ ((struct frame *, Lisp_Object, int));
892 994
893/* Defined in xmenu.c */ 995/* Defined in xmenu.c */
996
894extern void x_activate_menubar P_ ((struct frame *)); 997extern void x_activate_menubar P_ ((struct frame *));
895extern int popup_activated P_ ((void)); 998extern int popup_activated P_ ((void));
896extern void initialize_frame_menubar P_ ((struct frame *)); 999extern void initialize_frame_menubar P_ ((struct frame *));
897 1000
898/* Defined in widget.c */ 1001/* Defined in widget.c */
1002
899#ifdef USE_X_TOOLKIT 1003#ifdef USE_X_TOOLKIT
900extern void widget_store_internal_border P_ ((Widget)); 1004extern void widget_store_internal_border P_ ((Widget));
901#endif 1005#endif