comparison src/xterm.h @ 49600:23a1cea22d13

Trailing whitespace deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 04 Feb 2003 14:56:31 +0000
parents a4d0ee33dcce
children 8b7db04f3672 d7ddb3e565de
comparison
equal deleted inserted replaced
49599:5ade352e8d1c 49600:23a1cea22d13
28 28
29 #ifdef USE_X_TOOLKIT 29 #ifdef USE_X_TOOLKIT
30 #include <X11/StringDefs.h> 30 #include <X11/StringDefs.h>
31 #include <X11/IntrinsicP.h> /* CoreP.h needs this */ 31 #include <X11/IntrinsicP.h> /* CoreP.h needs this */
32 #include <X11/CoreP.h> /* foul, but we need this to use our own 32 #include <X11/CoreP.h> /* foul, but we need this to use our own
33 window inside a widget instead of one 33 window inside a widget instead of one
34 that Xt creates... */ 34 that Xt creates... */
35 #include <X11/StringDefs.h> 35 #include <X11/StringDefs.h>
36 36
37 typedef Widget xt_or_gtk_widget; 37 typedef Widget xt_or_gtk_widget;
38 #endif 38 #endif
75 with X11R3 or X11R4 by looking for the flag macros for R4 structure 75 with X11R3 or X11R4 by looking for the flag macros for R4 structure
76 members that R3 doesn't have. */ 76 members that R3 doesn't have. */
77 #ifdef PBaseSize 77 #ifdef PBaseSize
78 /* AIX 3.1's X is somewhere between X11R3 and X11R4. It has 78 /* AIX 3.1's X is somewhere between X11R3 and X11R4. It has
79 PBaseSize, but not XWithdrawWindow, XSetWMName, XSetWMNormalHints, 79 PBaseSize, but not XWithdrawWindow, XSetWMName, XSetWMNormalHints,
80 XSetWMIconName. 80 XSetWMIconName.
81 AIX 3.2 is at least X11R4. */ 81 AIX 3.2 is at least X11R4. */
82 #if (!defined AIX) || (defined AIX3_2) 82 #if (!defined AIX) || (defined AIX3_2)
83 #define HAVE_X11R4 83 #define HAVE_X11R4
84 #endif 84 #endif
85 #endif 85 #endif
136 136
137 struct x_display_info 137 struct x_display_info
138 { 138 {
139 /* Chain of all x_display_info structures. */ 139 /* Chain of all x_display_info structures. */
140 struct x_display_info *next; 140 struct x_display_info *next;
141 141
142 /* Connection number (normally a file descriptor number). */ 142 /* Connection number (normally a file descriptor number). */
143 int connection; 143 int connection;
144 144
145 /* This says how to access this display in Xlib. */ 145 /* This says how to access this display in Xlib. */
146 Display *display; 146 Display *display;
147 147
148 /* This is a cons cell of the form (NAME . FONT-LIST-CACHE). 148 /* This is a cons cell of the form (NAME . FONT-LIST-CACHE).
149 The same cons cell also appears in x_display_name_list. */ 149 The same cons cell also appears in x_display_name_list. */
150 Lisp_Object name_list_element; 150 Lisp_Object name_list_element;
151 151
152 /* Number of frames that are on this display. */ 152 /* Number of frames that are on this display. */
153 int reference_count; 153 int reference_count;
154 154
155 /* The Screen this connection is connected to. */ 155 /* The Screen this connection is connected to. */
156 Screen *screen; 156 Screen *screen;
157 157
158 /* Dots per inch of the screen. */ 158 /* Dots per inch of the screen. */
159 double resx, resy; 159 double resx, resy;
160 160
161 /* The Visual being used for this display. */ 161 /* The Visual being used for this display. */
162 Visual *visual; 162 Visual *visual;
163 163
164 /* The colormap being used. */ 164 /* The colormap being used. */
165 Colormap cmap; 165 Colormap cmap;
166 166
167 /* Number of panes on this screen. */ 167 /* Number of panes on this screen. */
168 int n_planes; 168 int n_planes;
169 169
170 /* Dimensions of this screen. */ 170 /* Dimensions of this screen. */
171 int height, width; 171 int height, width;
172 172
173 /* Mask of things that cause the mouse to be grabbed. */ 173 /* Mask of things that cause the mouse to be grabbed. */
174 int grabbed; 174 int grabbed;
175 175
176 /* Emacs bitmap-id of the default icon bitmap for this frame. 176 /* Emacs bitmap-id of the default icon bitmap for this frame.
177 Or -1 if none has been allocated yet. */ 177 Or -1 if none has been allocated yet. */
178 int icon_bitmap_id; 178 int icon_bitmap_id;
179 179
180 /* The root window of this screen. */ 180 /* The root window of this screen. */
181 Window root_window; 181 Window root_window;
182 182
183 /* The cursor to use for vertical scroll bars. */ 183 /* The cursor to use for vertical scroll bars. */
184 Cursor vertical_scroll_bar_cursor; 184 Cursor vertical_scroll_bar_cursor;
185 185
186 /* X Resource data base */ 186 /* X Resource data base */
187 XrmDatabase xrdb; 187 XrmDatabase xrdb;
188 188
189 /* A table of all the fonts we have already loaded. */ 189 /* A table of all the fonts we have already loaded. */
190 struct font_info *font_table; 190 struct font_info *font_table;
272 /* These are like meta_mod_mask, but for different modifiers. */ 272 /* These are like meta_mod_mask, but for different modifiers. */
273 int alt_mod_mask, super_mod_mask, hyper_mod_mask; 273 int alt_mod_mask, super_mod_mask, hyper_mod_mask;
274 274
275 /* Communication with window managers. */ 275 /* Communication with window managers. */
276 Atom Xatom_wm_protocols; 276 Atom Xatom_wm_protocols;
277 277
278 /* Kinds of protocol things we may receive. */ 278 /* Kinds of protocol things we may receive. */
279 Atom Xatom_wm_take_focus; 279 Atom Xatom_wm_take_focus;
280 Atom Xatom_wm_save_yourself; 280 Atom Xatom_wm_save_yourself;
281 Atom Xatom_wm_delete_window; 281 Atom Xatom_wm_delete_window;
282 282
283 /* Atom for indicating window state to the window manager. */ 283 /* Atom for indicating window state to the window manager. */
284 Atom Xatom_wm_change_state; 284 Atom Xatom_wm_change_state;
285 285
286 /* Other WM communication */ 286 /* Other WM communication */
287 Atom Xatom_wm_configure_denied; /* When our config request is denied */ 287 Atom Xatom_wm_configure_denied; /* When our config request is denied */
288 Atom Xatom_wm_window_moved; /* When the WM moves us. */ 288 Atom Xatom_wm_window_moved; /* When the WM moves us. */
289 289
290 /* EditRes protocol */ 290 /* EditRes protocol */
291 Atom Xatom_editres; 291 Atom Xatom_editres;
292 292
293 /* More atoms, which are selection types. */ 293 /* More atoms, which are selection types. */
294 Atom Xatom_CLIPBOARD, Xatom_TIMESTAMP, Xatom_TEXT, Xatom_DELETE, 294 Atom Xatom_CLIPBOARD, Xatom_TIMESTAMP, Xatom_TEXT, Xatom_DELETE,
474 GtkWidget *menubar_widget; 474 GtkWidget *menubar_widget;
475 /* The tool bar in this frame */ 475 /* The tool bar in this frame */
476 GtkWidget *toolbar_widget; 476 GtkWidget *toolbar_widget;
477 /* The handle box that makes the tool bar detachable. */ 477 /* The handle box that makes the tool bar detachable. */
478 GtkWidget *handlebox_widget; 478 GtkWidget *handlebox_widget;
479 479
480 /* The last size hints set. */ 480 /* The last size hints set. */
481 GdkGeometry size_hints; 481 GdkGeometry size_hints;
482 long hint_flags; 482 long hint_flags;
483 #endif 483 #endif
484 484
506 unsigned long cursor_foreground_pixel; 506 unsigned long cursor_foreground_pixel;
507 507
508 /* Foreground color for scroll bars. A value of -1 means use the 508 /* Foreground color for scroll bars. A value of -1 means use the
509 default (black for non-toolkit scroll bars). */ 509 default (black for non-toolkit scroll bars). */
510 unsigned long scroll_bar_foreground_pixel; 510 unsigned long scroll_bar_foreground_pixel;
511 511
512 /* Background color for scroll bars. A value of -1 means use the 512 /* Background color for scroll bars. A value of -1 means use the
513 default (background color of the frame for non-toolkit scroll 513 default (background color of the frame for non-toolkit scroll
514 bars). */ 514 bars). */
515 unsigned long scroll_bar_background_pixel; 515 unsigned long scroll_bar_background_pixel;
516 516
528 Cursor horizontal_drag_cursor; 528 Cursor horizontal_drag_cursor;
529 529
530 /* Window whose cursor is hourglass_cursor. This window is temporarily 530 /* Window whose cursor is hourglass_cursor. This window is temporarily
531 mapped to display an hourglass cursor. */ 531 mapped to display an hourglass cursor. */
532 Window hourglass_window; 532 Window hourglass_window;
533 533
534 /* Non-zero means hourglass cursor is currently displayed. */ 534 /* Non-zero means hourglass cursor is currently displayed. */
535 unsigned hourglass_p : 1; 535 unsigned hourglass_p : 1;
536 536
537 /* Flag to set when the X window needs to be completely repainted. */ 537 /* Flag to set when the X window needs to be completely repainted. */
538 int needs_exposure; 538 int needs_exposure;
627 int y_pixels_diff; 627 int y_pixels_diff;
628 628
629 /* As x_pixels_diff, but to FRAME_OUTER_WINDOW. For some reason the 629 /* As x_pixels_diff, but to FRAME_OUTER_WINDOW. For some reason the
630 two might differ by a pixel, depending on WM */ 630 two might differ by a pixel, depending on WM */
631 int x_pixels_outer_diff; 631 int x_pixels_outer_diff;
632 632
633 /* As y_pixels_diff, but to FRAME_OUTER_WINDOW. In the toolkit version, 633 /* As y_pixels_diff, but to FRAME_OUTER_WINDOW. In the toolkit version,
634 these may differ because this does not take into account possible 634 these may differ because this does not take into account possible
635 menubar. y_pixels_diff is with menubar height included */ 635 menubar. y_pixels_diff is with menubar height included */
636 int y_pixels_outer_diff; 636 int y_pixels_outer_diff;
637 637
876 - VERTICAL_SCROLL_BAR_RIGHT_BORDER \ 876 - VERTICAL_SCROLL_BAR_RIGHT_BORDER \
877 - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2) 877 - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2)
878 878
879 /* Return the length of the rectangle within which the top of the 879 /* Return the length of the rectangle within which the top of the
880 handle must stay. This isn't equivalent to the inside height, 880 handle must stay. This isn't equivalent to the inside height,
881 because the scroll bar handle has a minimum height. 881 because the scroll bar handle has a minimum height.
882 882
883 This is the real range of motion for the scroll bar, so when we're 883 This is the real range of motion for the scroll bar, so when we're
884 scaling buffer positions to scroll bar positions, we use this, not 884 scaling buffer positions to scroll bar positions, we use this, not
885 VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */ 885 VERTICAL_SCROLL_BAR_INSIDE_HEIGHT. */
886 #define VERTICAL_SCROLL_BAR_TOP_RANGE(f, height) \ 886 #define VERTICAL_SCROLL_BAR_TOP_RANGE(f, height) \
939 #define CHAR_TO_PIXEL_HEIGHT(f, height) \ 939 #define CHAR_TO_PIXEL_HEIGHT(f, height) \
940 (CHAR_TO_PIXEL_ROW (f, height) \ 940 (CHAR_TO_PIXEL_ROW (f, height) \
941 + (f)->output_data.x->internal_border_width) 941 + (f)->output_data.x->internal_border_width)
942 942
943 943
944 /* Return the row/column (zero-based) of the character cell containing 944 /* Return the row/column (zero-based) of the character cell containing
945 the pixel on FRAME at ROW/COL. */ 945 the pixel on FRAME at ROW/COL. */
946 #define PIXEL_TO_CHAR_ROW(f, row) \ 946 #define PIXEL_TO_CHAR_ROW(f, row) \
947 (((row) - (f)->output_data.x->internal_border_width) \ 947 (((row) - (f)->output_data.x->internal_border_width) \
948 / (f)->output_data.x->line_height) 948 / (f)->output_data.x->line_height)
949 #define PIXEL_TO_CHAR_COL(f, col) \ 949 #define PIXEL_TO_CHAR_COL(f, col) \