multi-device work by Chuck Thompson).
*/
-#ifndef _XEMACS_CONSOLE_X_H_
-#define _XEMACS_CONSOLE_X_H_
+#ifndef INCLUDED_console_x_h_
+#define INCLUDED_console_x_h_
#ifdef HAVE_X_WINDOWS
#include "console.h"
+/* must come before Xutil.h, which is included indirectly from xintrinsic.h,
+ to avoid breakage in keysym-parsing macros from X11R6, at least X.org as
+ of 2005-01-17, and probably XFree86 too from reports on c.e.x */
+#include <X11/keysym.h>
#include "xintrinsic.h"
#include <X11/cursorfont.h>
-#include <X11/keysym.h>
#include <X11/Xatom.h>
-
-#if 0 /* mrb - Xos sux. */
-#ifdef USG
-#undef USG /* ####KLUDGE for Solaris 2.2 and up */
-#include <X11/Xos.h>
-#define USG
-#else
-#include <X11/Xos.h>
-#endif
-#endif /* 0 */
-
#include <X11/StringDefs.h>
#ifdef HAVE_XPM
/* Xt application info. */
Widget Xt_app_shell;
- /* Cache of GC's for frame's on this device. */
+ /* Cache of GC's for frames on this device. */
struct gc_cache *gc_cache;
/* Selected visual, depth and colormap for this device */
Pixmap gray_pixmap;
/* Atoms associated with this device. */
- /* allocated in Xatoms_of_xfns in xfns.c */
+ /* allocated in Xatoms_of_device_x */
Atom Xatom_WM_PROTOCOLS;
Atom Xatom_WM_DELETE_WINDOW;
Atom Xatom_WM_SAVE_YOURSELF;
Atom Xatom_WM_TAKE_FOCUS;
Atom Xatom_WM_STATE;
- /* allocated in Xatoms_of_xselect in xselect.c */
+ /* allocated in Xatoms_of_select_x */
Atom Xatom_CLIPBOARD;
Atom Xatom_TIMESTAMP;
Atom Xatom_TEXT;
Atom Xatom_ATOM_PAIR;
Atom Xatom_COMPOUND_TEXT;
- /* allocated in Xatoms_of_objects_x in objects-x.c */
+ /* allocated in Xatoms_of_objects_x */
Atom Xatom_FOUNDRY;
Atom Xatom_FAMILY_NAME;
Atom Xatom_WEIGHT_NAME;
unsigned int need_to_add_mask, down_mask;
KeyCode last_downkey;
Time release_time;
+ Time modifier_release_time;
};
#define DEVICE_X_DATA(d) DEVICE_TYPE_DATA (d, x)
#define DEVICE_X_FONTSET(d) (DEVICE_X_DATA (d)->fontset)
#endif /* HAVE_XIM */
-/* allocated in Xatoms_of_xfns in xfns.c */
+/* allocated in Xatoms_of_device_x */
#define DEVICE_XATOM_WM_PROTOCOLS(d) (DEVICE_X_DATA (d)->Xatom_WM_PROTOCOLS)
#define DEVICE_XATOM_WM_DELETE_WINDOW(d) (DEVICE_X_DATA (d)->Xatom_WM_DELETE_WINDOW)
#define DEVICE_XATOM_WM_SAVE_YOURSELF(d) (DEVICE_X_DATA (d)->Xatom_WM_SAVE_YOURSELF)
#define DEVICE_XATOM_WM_TAKE_FOCUS(d) (DEVICE_X_DATA (d)->Xatom_WM_TAKE_FOCUS)
#define DEVICE_XATOM_WM_STATE(d) (DEVICE_X_DATA (d)->Xatom_WM_STATE)
-/* allocated in Xatoms_of_xselect in xselect.c */
+/* allocated in Xatoms_of_select_x */
#define DEVICE_XATOM_CLIPBOARD(d) (DEVICE_X_DATA (d)->Xatom_CLIPBOARD)
#define DEVICE_XATOM_TIMESTAMP(d) (DEVICE_X_DATA (d)->Xatom_TIMESTAMP)
#define DEVICE_XATOM_TEXT(d) (DEVICE_X_DATA (d)->Xatom_TEXT)
#define DEVICE_XATOM_ATOM_PAIR(d) (DEVICE_X_DATA (d)->Xatom_ATOM_PAIR)
#define DEVICE_XATOM_COMPOUND_TEXT(d) (DEVICE_X_DATA (d)->Xatom_COMPOUND_TEXT)
-/* allocated in Xatoms_of_objects_x in objects-x.c */
+/* allocated in Xatoms_of_objects_x */
#define DEVICE_XATOM_FOUNDRY(d) (DEVICE_X_DATA (d)->Xatom_FOUNDRY)
#define DEVICE_XATOM_FAMILY_NAME(d) (DEVICE_X_DATA (d)->Xatom_FAMILY_NAME)
#define DEVICE_XATOM_WEIGHT_NAME(d) (DEVICE_X_DATA (d)->Xatom_WEIGHT_NAME)
/* Number of pixels below each line. */
extern int x_interline_space; /* #### implement me */
-extern int x_selection_timeout;
+extern Fixnum x_selection_timeout;
struct frame *x_any_window_to_frame (struct device *d, Window);
struct frame *x_any_widget_or_parent_to_frame (struct device *d,
void x_handle_selection_clear (XSelectionClearEvent *event);
void x_handle_property_notify (XPropertyEvent *event);
-void Xatoms_of_xselect (struct device *d);
+void Xatoms_of_select_x (struct device *d);
void Xatoms_of_objects_x (struct device *d);
void x_wm_set_shell_iconic_p (Widget shell, int iconic_p);
void x_wm_set_cell_size (Widget wmshell, int cw, int ch);
void x_wm_set_variable_size (Widget wmshell, int width, int height);
-CONST char *x_event_name (int event_type);
+const char *x_event_name (int event_type);
int x_error_handler (Display *disp, XErrorEvent *event);
void expect_x_error (Display *dpy);
int x_error_occurred_p (Display *dpy);
void x_redraw_exposed_area (struct frame *f, int x, int y,
int width, int height);
void x_output_string (struct window *w, struct display_line *dl,
- Emchar_dynarr *buf, int xpos, int xoffset,
+ Charc_dynarr *buf, int xpos, int xoffset,
int start_pixpos, int width, face_index findex,
int cursor, int cursor_start, int cursor_width,
int cursor_height);
-void x_output_x_pixmap (struct frame *f, struct Lisp_Image_Instance *p,
+void x_output_x_pixmap (struct frame *f, Lisp_Image_Instance *p,
int x, int y, int xoffset, int yoffset,
int width, int height,
unsigned long fg, unsigned long bg,
extern Lisp_Object Vx_initial_argv_list; /* #### ugh! */
+/* Standins for various X encodings, until we know them better */
+
+/* !!#### Need to verify the encoding used in lwlib -- Qnative or Qctext?
+ Almost certainly the former. Use a standin for now. */
+#define Qlwlib_encoding Qnative
+
+#define Qx_atom_name_encoding Qctext
+/* font names are often stored in atoms, so it gets sticky if we set this
+ to something different from atom-name encoding */
+#define Qx_font_name_encoding Qctext
+
+#define Qx_color_name_encoding Qctext
+
+/* the following probably must agree with Qcommand_argument_encoding and
+ Qenvironment_variable_encoding */
+#define Qx_display_name_encoding Qnative
+
#endif /* HAVE_X_WINDOWS */
-#endif /* _XEMACS_DEVICE_X_H_ */
+
+#endif /* INCLUDED_console_x_h_ */