Merge from emacs-24; up to 2012-04-22T13:58:00Z!cyd@gnu.org
[bpt/emacs.git] / src / xterm.h
index c44978d..86daa7b 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions and headers for communication with X protocol.
-   Copyright (C) 1989, 1993-1994, 1998-2011 Free Software Foundation, Inc.
+   Copyright (C) 1989, 1993-1994, 1998-2012 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -158,7 +158,7 @@ struct x_display_info
 
   /* Emacs bitmap-id of the default icon bitmap for this frame.
      Or -1 if none has been allocated yet.  */
-  int icon_bitmap_id;
+  ptrdiff_t icon_bitmap_id;
 
   /* The root window of this screen.  */
   Window root_window;
@@ -202,10 +202,10 @@ struct x_display_info
   struct x_bitmap_record *bitmaps;
 
   /* Allocated size of bitmaps field.  */
-  int bitmaps_size;
+  ptrdiff_t bitmaps_size;
 
   /* Last used bitmap index.  */
-  int bitmaps_last;
+  ptrdiff_t bitmaps_last;
 
   /* Which modifier keys are on which modifier bits?
 
@@ -326,11 +326,11 @@ struct x_display_info
 
   /* Atoms that are drag and drop atoms */
   Atom *x_dnd_atoms;
-  size_t x_dnd_atoms_size;
-  size_t x_dnd_atoms_length;
+  ptrdiff_t x_dnd_atoms_size;
+  ptrdiff_t x_dnd_atoms_length;
 
   /* Extended window manager hints, Atoms supported by the window manager and
-     atoms for settig the window type.  */
+     atoms for setting the window type.  */
   Atom Xatom_net_supported, Xatom_net_supporting_wm_check;
   Atom *net_supported_atoms;
   int nr_net_supported_atoms;
@@ -341,7 +341,8 @@ struct x_display_info
   /* Atoms dealing with EWMH (i.e. _NET_...) */
   Atom Xatom_net_wm_state, Xatom_net_wm_state_fullscreen,
     Xatom_net_wm_state_maximized_horz, Xatom_net_wm_state_maximized_vert,
-    Xatom_net_wm_state_sticky, Xatom_net_frame_extents;
+    Xatom_net_wm_state_sticky, Xatom_net_wm_state_hidden,
+    Xatom_net_frame_extents;
 
   /* XSettings atoms and windows.  */
   Atom Xatom_xsettings_sel, Xatom_xsettings_prop, Xatom_xsettings_mgr;
@@ -490,7 +491,7 @@ struct x_output
 
   /* If >=0, a bitmap index.  The indicated bitmap is used for the
      icon. */
-  int icon_bitmap;
+  ptrdiff_t icon_bitmap;
 
   /* Default ASCII font of this frame.  */
   struct font *font;
@@ -631,6 +632,9 @@ struct x_output
      x_check_expected_move.  */
   int left_before_move;
   int top_before_move;
+
+  /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame.  */
+  int net_wm_state_hidden_seen;
 };
 
 #define No_Cursor (None)
@@ -639,7 +643,7 @@ enum
 {
   /* Values for focus_state, used as bit mask.
      EXPLICIT means we received a FocusIn for the frame and know it has
-     the focus.  IMPLICIT means we recevied an EnterNotify and the frame
+     the focus.  IMPLICIT means we received an EnterNotify and the frame
      may have the focus if no window manager is running.
      FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
   FOCUS_NONE     = 0,
@@ -682,7 +686,7 @@ enum
 #define GDK_WINDOW_XID(w) GDK_WINDOW_XWINDOW (w)
 #define DEFAULT_GDK_DISPLAY() GDK_DISPLAY ()
 #define gtk_widget_get_preferred_size(a, ign, b) \
-  gtk_widget_size_request(a, b)
+  gtk_widget_size_request (a, b)
 #endif
 
 #define GTK_WIDGET_TO_X_WIN(w) \
@@ -955,14 +959,15 @@ XrmDatabase x_load_resources (Display *, const char *, const char *,
 extern int x_text_icon (struct frame *, const char *);
 extern int x_bitmap_icon (struct frame *, Lisp_Object);
 extern void x_catch_errors (Display *);
-extern void x_check_errors (Display *, const char *);
+extern void x_check_errors (Display *, const char *)
+  ATTRIBUTE_FORMAT_PRINTF (2, 0);
 extern int x_had_errors_p (Display *);
-extern int x_catching_errors (void);
 extern void x_uncatch_errors (void);
 extern void x_clear_errors (Display *);
 extern void x_set_window_size (struct frame *, int, int, int);
 extern void x_set_mouse_position (struct frame *, int, int);
 extern void x_set_mouse_pixel_position (struct frame *, int, int);
+extern void xembed_request_focus (struct frame *);
 extern void x_ewmh_activate_frame (struct frame *);
 extern void x_make_frame_visible (struct frame *);
 extern void x_make_frame_invisible (struct frame *);
@@ -973,10 +978,12 @@ extern void x_delete_terminal (struct terminal *terminal);
 extern unsigned long x_copy_color (struct frame *, unsigned long);
 #ifdef USE_X_TOOLKIT
 extern XtAppContext Xt_app_con;
+extern void x_activate_timeout_atimer (void);
+#endif
+#ifdef USE_LUCID
 extern int x_alloc_lighter_color_for_widget (Widget, Display *, Colormap,
                                              unsigned long *,
                                              double, int);
-extern void x_activate_timeout_atimer (void);
 #endif
 extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *);
 extern void x_query_colors (struct frame *f, XColor *, int);
@@ -1024,6 +1031,8 @@ extern Lisp_Object x_property_data_to_lisp (struct frame *,
                                             Atom,
                                             int,
                                             unsigned long);
+extern void x_clipboard_manager_save_frame (Lisp_Object);
+extern void x_clipboard_manager_save_all (void);
 
 /* Defined in xfns.c */
 
@@ -1067,7 +1076,9 @@ extern void x_free_dpy_colors (Display *, Screen *, Colormap,
 
 /* Defined in xmenu.c */
 
+#if defined USE_GTK || defined USE_MOTIF
 extern void x_menu_set_in_use (int);
+#endif
 #ifdef USE_MOTIF
 extern void x_menu_wait_for_event (void *data);
 #endif