]> code.delx.au - gnu-emacs/blobdiff - src/xterm.h
(x_create_tip_frame): Initialize frame's colors like
[gnu-emacs] / src / xterm.h
index 39606492b082fa44af3ed35e849188ef229928c0..81d1a7c66348182ef7cd158ce1518432a2b54bb8 100644 (file)
@@ -77,8 +77,7 @@ Boston, MA 02111-1307, USA.  */
 #define HAVE_X11R4
 #endif
 
-#ifdef HAVE_X11R5
-#define HAVE_X_I18N
+#ifdef HAVE_X_I18N
 #include <X11/Xlocale.h>
 #endif
 \f
@@ -118,8 +117,6 @@ extern struct frame *x_non_menubar_window_to_frame ();
 extern struct frame *x_top_window_to_frame ();
 #endif
 
-extern Visual *select_visual ();
-
 enum text_cursor_kinds
 {
   NO_CURSOR = -1,
@@ -169,6 +166,9 @@ struct x_display_info
   
   /* The Visual being used for this display.  */
   Visual *visual;
+
+  /* THe colormap being used.  */
+  Colormap cmap;
   
   /* Number of panes on this screen.  */
   int n_planes;
@@ -344,6 +344,12 @@ struct x_display_info
 
   /* Cache of images.  */
   struct image_cache *image_cache;
+
+#ifdef HAVE_X_I18N
+  /* XIM (X Input method).  */
+  XIM xim;
+  XIMStyles *xim_styles;
+#endif
 };
 
 /* This is a chain of structures for all the X displays currently in use.  */
@@ -367,7 +373,7 @@ struct x_display_info *x_display_info_for_name ();
 extern struct x_display_info *x_term_init ();
 
 extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
-
+extern void select_visual P_ ((struct x_display_info *));
 extern struct font_info *x_get_font_info(), *x_load_font (), *x_query_font ();
 extern void x_find_ccl_program();
 \f
@@ -443,8 +449,8 @@ struct x_output
   /* Default ASCII font of this frame.  */
   XFontStruct *font;
 
-  /* The baseline position of the default ASCII font.  */
-  int font_baseline;
+  /* The baseline offset of the default ASCII font.  */
+  int baseline_offset;
 
   /* If a fontset is specified for this frame instead of font, this
      value contains an ID of the fontset, else -1.  */
@@ -547,10 +553,10 @@ struct x_output
   char has_been_visible;
 
 #ifdef HAVE_X_I18N
-  /* Input method. */
-  XIM xim;
   /* Input context (currently, this means Compose key handler setup).  */
   XIC xic;
+  XIMStyle xic_style;
+  XFontSet xic_xfs;
 #endif
 
   /* Relief GCs, colors etc.  */
@@ -577,11 +583,10 @@ struct x_output
 #define FRAME_OUTER_WINDOW(f) (FRAME_X_WINDOW (f))
 #endif
 
-#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
-#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
 #define FRAME_FONT(f) ((f)->output_data.x->font)
 #define FRAME_FONTSET(f) ((f)->output_data.x->fontset)
 #define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width)
+#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height)
 #define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height)
 
 /* Width of the default font of frame F.  Must be defined by each
@@ -597,6 +602,12 @@ struct x_output
 /* This is the `Screen *' which frame F is on.  */
 #define FRAME_X_SCREEN(f) (FRAME_X_DISPLAY_INFO (f)->screen)
 
+/* This is the Visual which frame F is on.  */
+#define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual
+
+/* This is the Colormap which frame F uses.  */
+#define FRAME_X_COLORMAP(f) FRAME_X_DISPLAY_INFO (f)->cmap
+
 /* This is the 'font_info *' which frame F has.  */
 #define FRAME_X_FONT_TABLE(f) (FRAME_X_DISPLAY_INFO (f)->font_table)
 
@@ -606,8 +617,11 @@ struct x_output
 
 #define FRAME_DESIRED_CURSOR(f) ((f)->output_data.x->desired_cursor)
 
-#define FRAME_XIM(f) ((f)->output_data.x->xim)
 #define FRAME_XIC(f) ((f)->output_data.x->xic)
+#define FRAME_X_XIM(f) (FRAME_X_DISPLAY_INFO (f)->xim)
+#define FRAME_X_XIM_STYLES(f) (FRAME_X_DISPLAY_INFO (f)->xim_styles)
+#define FRAME_XIC_STYLE(f) ((f)->output_data.x->xic_style)
+#define FRAME_XIC_FONTSET(f) ((f)->output_data.x->xic_xfs)
 
 /* Value is the smallest width of any character in any font on frame F.  */
 
@@ -793,7 +807,7 @@ struct scroll_bar {
 
 /* Trimming off a few pixels from each side prevents
    text from glomming up against the scroll bar */
-#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (2)
+#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
 
 \f
 /* Manipulating pixel sizes and character sizes.
@@ -880,6 +894,8 @@ struct window;
 struct glyph_matrix;
 struct frame;
 struct input_event;
+struct face;
+struct image;
 
 /* From xselect.c.  */
 
@@ -888,24 +904,13 @@ void x_handle_property_notify P_ ((XPropertyEvent *));
 
 /* From xfns.c.  */
 
-void x_real_positions P_ ((struct frame *, int *, int *));
-void x_destroy_bitmap P_ ((struct frame *, int));
-int x_create_bitmap_from_file P_ ((struct frame *, Lisp_Object));
-int x_create_bitmap_from_data P_ ((struct frame *, char *, unsigned,
-                                  unsigned));
-void x_reference_bitmap P_ ((struct frame *, int));
-void x_sync P_ ((struct frame *));
-int x_bitmap_pixmap P_ ((struct frame *, int));
-void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
-int x_bitmap_height P_ ((struct frame *, int));
-int x_bitmap_width P_ ((struct frame *, int));
-int defined_color P_ ((struct frame *, char *, XColor *, int));
 Lisp_Object display_x_get_resource P_ ((struct x_display_info *,
                                        Lisp_Object, Lisp_Object,
                                        Lisp_Object, Lisp_Object));
 struct frame *check_x_frame P_ ((Lisp_Object));
 EXFUN (Fx_display_color_p, 1);
 EXFUN (Fx_display_grayscale_p, 1);
+int image_ascent P_ ((struct image *, struct face *));
 
 /* From xrdb.c.  */
 
@@ -928,7 +933,7 @@ int x_text_icon P_ ((struct frame *, char *));
 int x_bitmap_icon P_ ((struct frame *, Lisp_Object));
 void x_set_window_size P_ ((struct frame *, int, int, int));
 void x_wm_set_window_state P_ ((struct frame *, int));
-int x_alloc_nearest_color P_ ((Display *, Screen *, Colormap, XColor *));
+int x_alloc_nearest_color P_ ((struct frame *, Colormap, XColor *));
 
 extern void pixel_to_glyph_coords P_ ((struct frame *, int, int,
                                       int *, int *, XRectangle *, int));
@@ -965,8 +970,12 @@ extern void x_wm_set_icon_pixmap P_ ((struct frame *, int));
 extern void x_wm_set_icon_position P_ ((struct frame *, int, int));
 extern void x_delete_display P_ ((struct x_display_info *));
 extern void x_initialize P_ ((void));
-void x_display_cursor P_ ((struct window *, int, int, int, int, int));
-void x_update_cursor P_ ((struct frame *, int));
+extern void x_display_cursor P_ ((struct window *, int, int, int, int, int));
+extern void x_update_cursor P_ ((struct frame *, int));
+extern unsigned long x_copy_color P_ ((struct frame *, unsigned long));
+#ifdef USE_X_TOOLKIT
+extern XtAppContext Xt_app_con;
+#endif
 
 /* Defined in xselect.c */
 
@@ -994,12 +1003,23 @@ extern int defined_color P_ ((struct frame *, char *, XColor *, int));
 extern void x_set_border_pixel P_ ((struct frame *, int));
 extern void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
 extern void x_implicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
+extern void create_frame_xic P_ ((struct frame *));
+extern void destroy_frame_xic P_ ((struct frame *));
+extern void xic_set_preeditarea P_ ((struct window *, int, int));
+extern void xic_set_statusarea P_ ((struct frame *));
+extern void xic_set_xfontset P_ ((struct frame *, char *));
 extern int x_pixel_width P_ ((struct frame *));
 extern int x_pixel_height P_ ((struct frame *));
 extern int x_char_width P_ ((struct frame *));
 extern int x_char_height P_ ((struct frame *));
 extern int x_screen_planes P_ ((struct frame *));
 extern void x_sync P_ ((struct frame *));
+extern enum text_cursor_kinds x_specified_cursor_type P_ ((Lisp_Object, int *));
+extern int x_defined_color P_ ((struct frame *, char *, XColor *, int));
+#ifdef HAVE_X_I18N
+extern void free_frame_xic P_ ((struct frame *));
+#endif
+extern void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
 
 /* Defined in xfaces.c */