summaryrefslogtreecommitdiff
path: root/src/xterm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xterm.h')
-rw-r--r--src/xterm.h86
1 files changed, 20 insertions, 66 deletions
diff --git a/src/xterm.h b/src/xterm.h
index 9aac9f6a898..246a10ee671 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -59,43 +59,6 @@ typedef GtkWidget *xt_or_gtk_widget;
/* Bookkeeping to distinguish X versions. */
-/* HAVE_X11R4 is defined if we have the features of X11R4. It should
- be defined when we're using X11R5, since X11R5 has the features of
- X11R4. If, in the future, we find we need more of these flags
- (HAVE_X11R5, for example), code should always be written to test
- the most recent flag first:
-
- #ifdef HAVE_X11R5
- ...
- #elif HAVE_X11R4
- ...
- #elif HAVE_X11
- ...
- #endif
-
- If you ever find yourself writing a "#ifdef HAVE_FOO" clause that
- looks a lot like another one, consider moving the text into a macro
- whose definition is configuration-dependent, but whose usage is
- universal - like the stuff in systime.h.
-
- It turns out that we can auto-detect whether we're being compiled
- with X11R3 or X11R4 by looking for the flag macros for R4 structure
- members that R3 doesn't have. */
-#ifdef PBaseSize
-/* AIX 3.1's X is somewhere between X11R3 and X11R4. It has
- PBaseSize, but not XWithdrawWindow, XSetWMName, XSetWMNormalHints,
- XSetWMIconName.
- AIX 3.2 is at least X11R4. */
-#if (!defined AIX) || (defined AIX3_2)
-#define HAVE_X11R4
-#endif
-#endif
-
-#ifdef HAVE_X11R5
-/* In case someone has X11R5 on AIX 3.1,
- make sure HAVE_X11R4 is defined as well as HAVE_X11R5. */
-#define HAVE_X11R4
-#endif
#ifdef HAVE_X_I18N
#include <X11/Xlocale.h>
@@ -149,6 +112,9 @@ struct x_display_info
/* Chain of all x_display_info structures. */
struct x_display_info *next;
+ /* The generic display parameters corresponding to this X display. */
+ struct terminal *terminal;
+
/* Connection number (normally a file descriptor number). */
int connection;
@@ -327,9 +293,6 @@ struct x_display_info
/* Atom used in toolkit scroll bar client messages. */
Atom Xatom_Scrollbar;
-#ifdef MULTI_KBOARD
- struct kboard *kboard;
-#endif
int cut_buffers_initialized; /* Whether we're sure they all exist */
/* The frame (if any) which has the X window that has keyboard focus.
@@ -532,8 +495,10 @@ struct x_output
/* Pixel values used for various purposes.
border_pixel may be -1 meaning use a gray tile. */
+#if 0 /* These are also defined in struct frame. Use that instead. */
unsigned long background_pixel;
unsigned long foreground_pixel;
+#endif
unsigned long cursor_pixel;
unsigned long border_pixel;
unsigned long mouse_pixel;
@@ -781,13 +746,14 @@ struct scroll_bar
/* The next and previous in the chain of scroll bars in this frame. */
Lisp_Object next, prev;
- /* The X window representing this scroll bar. Since this is a full
- 32-bit quantity, we store it split into two 32-bit values. */
- Lisp_Object x_window_low, x_window_high;
+ /* Fields from `x_window' down will not be traced by the GC. */
+
+ /* The X window representing this scroll bar. */
+ Window x_window;
/* The position and size of the scroll bar in pixels, relative to the
frame. */
- Lisp_Object top, left, width, height;
+ int top, left, width, height;
/* The starting and ending positions of the handle, relative to the
handle area (i.e. zero is the top position, not
@@ -800,13 +766,17 @@ struct scroll_bar
drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below
where they would be normally; the bottom and top are in a
different co-ordinate system. */
- Lisp_Object start, end;
+ int start, end;
/* If the scroll bar handle is currently being dragged by the user,
this is the number of pixels from the top of the handle to the
place where the user grabbed it. If the handle isn't currently
being dragged, this is Qnil. */
Lisp_Object dragging;
+
+ /* 1 if the background of the fringe that is adjacent to a scroll
+ bar is extended to the gap between the fringe and the bar. */
+ unsigned int fringe_extended_p : 1;
};
/* The number of elements a vector holding a struct scroll_bar needs. */
@@ -819,36 +789,19 @@ struct scroll_bar
#define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec))
-/* Building a 32-bit C integer from two 16-bit lisp integers. */
-#define SCROLL_BAR_PACK(low, high) (XINT (high) << 16 | XINT (low))
-
-/* Setting two lisp integers to the low and high words of a 32-bit C int. */
-#define SCROLL_BAR_UNPACK(low, high, int32) \
- (XSETINT ((low), (int32) & 0xffff), \
- XSETINT ((high), ((int32) >> 16) & 0xffff))
-
-
-/* Extract the X window id of the scroll bar from a struct scroll_bar. */
-#define SCROLL_BAR_X_WINDOW(ptr) \
- ((Window) SCROLL_BAR_PACK ((ptr)->x_window_low, (ptr)->x_window_high))
-
-/* Store a window id in a struct scroll_bar. */
-#define SET_SCROLL_BAR_X_WINDOW(ptr, id) \
- (SCROLL_BAR_UNPACK ((ptr)->x_window_low, (ptr)->x_window_high, (int) id))
-
/* Extract the X widget of the scroll bar from a struct scroll_bar.
XtWindowToWidget should be fast enough since Xt uses a hash table
to map windows to widgets. */
#define SCROLL_BAR_X_WIDGET(dpy, ptr) \
- XtWindowToWidget (dpy, SCROLL_BAR_X_WINDOW (ptr))
+ XtWindowToWidget (dpy, ptr->x_window)
/* Store a widget id in a struct scroll_bar. */
#define SET_SCROLL_BAR_X_WIDGET(ptr, w) \
do { \
Window window = XtWindow (w); \
- SET_SCROLL_BAR_X_WINDOW (ptr, window); \
+ ptr->x_window = window; \
} while (0)
@@ -984,10 +937,10 @@ extern int x_had_errors_p P_ ((Display *));
extern int x_catching_errors P_ ((void));
extern void x_uncatch_errors P_ ((void));
extern void x_clear_errors P_ ((Display *));
-extern void x_fully_uncatch_errors P_ ((void));
extern void x_set_window_size P_ ((struct frame *, int, int, int));
extern void x_set_mouse_position P_ ((struct frame *, int, int));
extern void x_set_mouse_pixel_position P_ ((struct frame *, int, int));
+extern void x_ewmh_activate_frame P_ ((struct frame *));
extern void x_raise_frame P_ ((struct frame *));
extern void x_lower_frame P_ ((struct frame *));
extern void x_make_frame_visible P_ ((struct frame *));
@@ -999,6 +952,7 @@ extern void x_wm_set_size_hint P_ ((struct frame *, long, int));
extern void x_wm_set_window_state P_ ((struct frame *, int));
extern void x_wm_set_icon_pixmap P_ ((struct frame *, int));
extern void x_delete_display P_ ((struct x_display_info *));
+extern void x_delete_terminal P_ ((struct terminal *terminal));
extern void x_initialize P_ ((void));
extern unsigned long x_copy_color P_ ((struct frame *, unsigned long));
#ifdef USE_X_TOOLKIT
@@ -1042,7 +996,6 @@ extern Lisp_Object x_property_data_to_lisp P_ ((struct frame *,
/* Defined in xfns.c */
extern struct x_display_info * check_x_display_info P_ ((Lisp_Object frame));
-extern int have_menus_p P_ ((void));
#ifdef USE_GTK
extern int xg_set_icon P_ ((struct frame *, Lisp_Object));
@@ -1099,6 +1052,7 @@ extern void widget_store_internal_border P_ ((Widget));
extern void x_session_initialize P_ ((struct x_display_info *dpyinfo));
extern int x_session_check_input P_ ((struct input_event *bufp));
extern int x_session_have_connection P_ ((void));
+extern void x_session_close P_ ((void));
#endif
#define FONT_TYPE_FOR_UNIBYTE(font, ch) 0