/* 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.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef XTERM_H
+#define XTERM_H
+
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
extern void check_x (void);
extern struct frame *x_window_to_frame (struct x_display_info *, int);
-
extern struct frame *x_any_window_to_frame (struct x_display_info *, int);
extern struct frame *x_menubar_window_to_frame (struct x_display_info *,
XEvent *);
-
extern struct frame *x_top_window_to_frame (struct x_display_info *, int);
+extern struct frame *x_menubar_window_to_frame (struct x_display_info *,
+ XEvent *);
+
#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
#define x_any_window_to_frame x_window_to_frame
#define x_top_window_to_frame x_window_to_frame
extern Lisp_Object x_display_name_list;
extern struct x_display_info *x_display_info_for_display (Display *);
-extern void x_set_frame_alpha (struct frame *);
extern struct x_display_info *x_term_init (Lisp_Object, char *, char *);
extern int x_display_ok (const char *);
GtkWidget *toolbar_widget;
/* The handle box that makes the tool bar detachable. */
GtkWidget *handlebox_widget;
- /* Non-zero if the tool bar is detached. */
- int toolbar_detached;
/* Non-zero if tool bar is packed into the hbox widget (i.e. vertical). */
int toolbar_in_hbox;
value contains an ID of the fontset, else -1. */
int fontset;
- /* 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;
/* Non-zero means hourglass cursor is currently displayed. */
unsigned hourglass_p : 1;
- /* Flag to set when the X window needs to be completely repainted. */
- int needs_exposure;
-
/* These are the current window manager hints. It seems that
XSetWMHints, when presented with an unset bit in the `flags'
member of the hints structure, does not leave the corresponding
/* Nonzero means our parent is another application's window
and was explicitly specified. */
- char explicit_parent;
+ unsigned explicit_parent : 1;
/* Nonzero means tried already to make this frame visible. */
- char asked_for_visible;
+ unsigned asked_for_visible : 1;
/* Nonzero if this frame was ever previously visible. */
- char has_been_visible;
+ unsigned has_been_visible : 1;
#ifdef HAVE_X_I18N
/* Input context (currently, this means Compose key handler setup). */
x_check_expected_move. */
int left_before_move;
int top_before_move;
+
+ /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame. */
+ unsigned net_wm_state_hidden_seen : 1;
};
#define No_Cursor (None)
{
/* 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,
/* 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)
-
/* The difference in pixels between the top left corner of the
Emacs window (including possible window manager decorations)
and FRAME_X_WINDOW (f). */
by this structure. */
/* For an event of kind SELECTION_REQUEST_EVENT,
- this structure really describes the contents.
- **Don't make this struct longer!**
- If it overlaps the frame_or_window field of struct input_event,
- that will cause GC to crash. */
+ this structure really describes the contents. */
+
struct selection_input_event
{
int kind;
/* From xfns.c. */
struct frame *check_x_frame (Lisp_Object);
-EXFUN (Fx_display_grayscale_p, 1);
extern void x_free_gcs (struct frame *);
-extern int gray_bitmap_width, gray_bitmap_height;
-extern char *gray_bitmap_bits;
/* From xrdb.c. */
/* Defined in xterm.c */
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 *)
ATTRIBUTE_FORMAT_PRINTF (2, 0);
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 *);
-extern void x_iconify_frame (struct frame *);
-extern void x_free_frame_resources (struct frame *);
-extern void x_wm_set_size_hint (struct frame *, long, int);
extern void x_delete_terminal (struct terminal *terminal);
extern unsigned long x_copy_color (struct frame *, unsigned long);
#ifdef USE_X_TOOLKIT
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 bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap,
+ unsigned long *,
+ double, int);
#endif
-extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *);
-extern void x_query_colors (struct frame *f, XColor *, int);
+extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *);
extern void x_query_color (struct frame *f, XColor *);
extern void x_clear_area (Display *, Window, int, int, int, int, int);
#if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK
extern struct x_display_info * check_x_display_info (Lisp_Object);
extern Lisp_Object x_get_focus_frame (struct frame *);
+extern int x_in_use;
#ifdef USE_GTK
extern int xg_set_icon (struct frame *, Lisp_Object);
extern int xg_set_icon_from_xpm_data (struct frame *, const char**);
#endif /* USE_GTK */
-extern void x_real_positions (struct frame *, int *, int *);
-extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
extern void xic_free_xfontset (struct frame *);
extern void create_frame_xic (struct frame *);
extern void xic_set_xfontset (struct frame *, const char *);
extern int x_pixel_width (struct frame *);
extern int x_pixel_height (struct frame *);
-extern int x_char_width (struct frame *);
-extern int x_char_height (struct frame *);
-extern void x_sync (struct frame *);
-extern int x_defined_color (struct frame *, const char *, XColor *, int);
+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);
# endif
#endif
-extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
/* Defined in xfaces.c */
#ifdef USE_MOTIF
extern void x_menu_wait_for_event (void *data);
#endif
-extern void x_activate_menubar (struct frame *);
extern int popup_activated (void);
extern void initialize_frame_menubar (struct frame *);
-extern void free_frame_menubar (struct frame *);
/* Defined in widget.c */
(nr).y = (ry), \
(nr).width = (rwidth), \
(nr).height = (rheight))
+
+#endif /* XTERM_H */