]> code.delx.au - gnu-emacs/blobdiff - src/xterm.h
Merge from origin/emacs-24
[gnu-emacs] / src / xterm.h
index 23dd43678d6b5a76f58a3ffe249ced048f9a6d91..16868f114e8c88810f8fcba46bb1a4de72040b8e 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions and headers for communication with X protocol.
-   Copyright (C) 1989, 1993-1994, 1998-2014 Free Software Foundation,
+   Copyright (C) 1989, 1993-1994, 1998-2015 Free Software Foundation,
    Inc.
 
 This file is part of GNU Emacs.
@@ -628,15 +628,6 @@ struct x_output
      They are changed only when a different background is involved.  */
   unsigned long relief_background;
 
-  /* As x_pixels_diff, but to FRAME_OUTER_WINDOW.  For some reason the
-     two might differ by a pixel, depending on WM */
-  int x_pixels_outer_diff;
-
-  /* As y_pixels_diff, but to FRAME_OUTER_WINDOW.  In the toolkit version,
-     these may differ because this does not take into account possible
-     menubar.  y_pixels_diff is with menubar height included */
-  int y_pixels_outer_diff;
-
   /* Keep track of focus.  May be EXPLICIT if we received a FocusIn for this
      frame, or IMPLICIT if we received an EnterNotify.
      FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
@@ -759,16 +750,6 @@ enum
 /* This is the Colormap which frame F uses.  */
 #define FRAME_X_COLORMAP(f) FRAME_DISPLAY_INFO (f)->cmap
 
-/* The difference in pixels between the top left corner of the
-   Emacs window (including possible window manager decorations)
-   and FRAME_X_WINDOW (f).  */
-#define FRAME_OUTER_TO_INNER_DIFF_X(f) \
-     ((f)->output_data.x->x_pixels_outer_diff)
-#define FRAME_OUTER_TO_INNER_DIFF_Y(f)          \
-     ((f)->output_data.x->y_pixels_outer_diff   \
-      + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
-
-
 #define FRAME_XIC(f) ((f)->output_data.x->xic)
 #define FRAME_X_XIM(f) (FRAME_DISPLAY_INFO (f)->xim)
 #define FRAME_X_XIM_STYLES(f) (FRAME_DISPLAY_INFO (f)->xim_styles)
@@ -834,7 +815,7 @@ struct scroll_bar
   int whole;
 #endif
 
-  /* 1 if the scroll bar is horizontal.  */
+  /* True if the scroll bar is horizontal.  */
   bool horizontal;
 };
 
@@ -971,6 +952,15 @@ SELECTION_EVENT_DISPLAY (struct input_event *ev)
 
 extern void x_free_gcs (struct frame *);
 extern void x_relative_mouse_position (struct frame *, int *, int *);
+extern void x_real_pos_and_offsets (struct frame *f,
+                                    int *left_offset_x,
+                                    int *right_offset_x,
+                                    int *top_offset_y,
+                                    int *bottom_offset_y,
+                                    int *x_pixels_diff,
+                                    int *y_pixels_diff,
+                                    int *xptr,
+                                    int *yptr);
 
 /* From xrdb.c.  */
 
@@ -979,7 +969,7 @@ XrmDatabase x_load_resources (Display *, const char *, const char *,
 
 /* Defined in xterm.c */
 
-extern int x_text_icon (struct frame *, const char *);
+extern bool x_text_icon (struct frame *, const char *);
 extern void x_catch_errors (Display *);
 extern void x_check_errors (Display *, const char *)
   ATTRIBUTE_FORMAT_PRINTF (2, 0);
@@ -1049,10 +1039,10 @@ extern void x_send_client_event (Lisp_Object display,
                                  Lisp_Object format,
                                  Lisp_Object values);
 
-extern int x_handle_dnd_message (struct frame *,
-                                 const XClientMessageEvent *,
-                                 struct x_display_info *,
-                                 struct input_event *);
+extern bool x_handle_dnd_message (struct frame *,
+                                 const XClientMessageEvent *,
+                                 struct x_display_info *,
+                                 struct input_event *);
 extern int x_check_property_data (Lisp_Object);
 extern void x_fill_property_data (Display *,
                                   Lisp_Object,
@@ -1067,8 +1057,8 @@ extern void x_clipboard_manager_save_frame (Lisp_Object);
 extern void x_clipboard_manager_save_all (void);
 
 #ifdef USE_GTK
-extern int xg_set_icon (struct frame *, Lisp_Object);
-extern int xg_set_icon_from_xpm_data (struct frame *, const char **);
+extern bool xg_set_icon (struct frame *, Lisp_Object);
+extern bool xg_set_icon_from_xpm_data (struct frame *, const char **);
 #endif /* USE_GTK */
 
 extern void xic_free_xfontset (struct frame *);
@@ -1081,7 +1071,7 @@ extern bool x_defined_color (struct frame *, const char *, XColor *, bool);
 #ifdef HAVE_X_I18N
 extern void free_frame_xic (struct frame *);
 # if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
-extern char * xic_create_fontsetname (const char *base_fontname, int motif);
+extern char *xic_create_fontsetname (const char *, bool);
 # endif
 #endif
 
@@ -1099,7 +1089,7 @@ extern Lisp_Object xw_popup_dialog (struct frame *, Lisp_Object, Lisp_Object);
 #endif
 
 #if defined USE_GTK || defined USE_MOTIF
-extern void x_menu_set_in_use (int);
+extern void x_menu_set_in_use (bool);
 #endif
 extern void x_menu_wait_for_event (void *data);
 extern void initialize_frame_menubar (struct frame *);
@@ -1107,13 +1097,10 @@ extern void initialize_frame_menubar (struct frame *);
 /* Defined in xsmfns.c */
 #ifdef HAVE_X_SM
 extern void x_session_initialize (struct x_display_info *dpyinfo);
-extern int x_session_have_connection (void);
+extern bool x_session_have_connection (void);
 extern void x_session_close (void);
 #endif
 
-/* Defined in xterm.c */
-
-extern Lisp_Object Qx_gtk_map_stock;
 
 /* Is the frame embedded into another application? */