+2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
+ All of them are replaced with FRAME_DISPLAY_INFO, defined in
+ each port to reference the port-specific window system data.
+ * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
+ (FRAME_DISPLAY_INFO): Define.
+ * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
+ (FRAME_DISPLAY_INFO): Define. Adjust users.
+ * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
+ (FRAME_DISPLAY_INFO): Define. Adjust users.
+ * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
+ * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
+ * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
+ * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
+ * xselect.c, xterm.c: All related users changed.
+
2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
* xterm.h (x_window_to_frame, x_any_window_to_frame)
: 1);
height = (font->height ? font->height : 1);
#ifdef HAVE_WINDOW_SYSTEM
- FRAME_X_DISPLAY_INFO (f)->n_fonts++;
- if (FRAME_X_DISPLAY_INFO (f)->n_fonts == 1)
+ FRAME_DISPLAY_INFO (f)->n_fonts++;
+ if (FRAME_DISPLAY_INFO (f)->n_fonts == 1)
{
FRAME_SMALLEST_CHAR_WIDTH (f) = min_width;
FRAME_SMALLEST_FONT_HEIGHT (f) = height;
FONT_ADD_LOG ("close", font_object, Qnil);
font->driver->close (f, font);
#ifdef HAVE_WINDOW_SYSTEM
- eassert (FRAME_X_DISPLAY_INFO (f)->n_fonts);
- FRAME_X_DISPLAY_INFO (f)->n_fonts--;
+ eassert (FRAME_DISPLAY_INFO (f)->n_fonts);
+ FRAME_DISPLAY_INFO (f)->n_fonts--;
#endif
}
value = f->name;
#ifdef HAVE_X_WINDOWS
else if (EQ (parameter, Qdisplay) && FRAME_X_P (f))
- value = XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element);
+ value = XCAR (FRAME_DISPLAY_INFO (f)->name_list_element);
#endif /* HAVE_X_WINDOWS */
else if (EQ (parameter, Qbackground_color)
|| EQ (parameter, Qforeground_color))
{
int newwidth = FRAME_COLS (f);
int newheight = FRAME_LINES (f);
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
*top_pos = f->top_pos;
*left_pos = f->left_pos;
(FRAME_VISIBLE_P (f) ? Qt
: FRAME_ICONIFIED_P (f) ? Qicon : Qnil));
store_in_alist (alistptr, Qdisplay,
- XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element));
+ XCAR (FRAME_DISPLAY_INFO (f)->name_list_element));
- if (FRAME_X_OUTPUT (f)->parent_desc == FRAME_X_DISPLAY_INFO (f)->root_window)
+ if (FRAME_X_OUTPUT (f)->parent_desc == FRAME_DISPLAY_INFO (f)->root_window)
tem = Qnil;
else
tem = make_natnum ((uintptr_t) FRAME_X_OUTPUT (f)->parent_desc);
esprintf (name_key, "%s.%s", SSDATA (Vinvocation_name), attribute);
sprintf (class_key, "%s.%s", EMACS_CLASS, class);
- result = x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb,
+ result = x_get_string_resource (FRAME_DISPLAY_INFO (sf)->xrdb,
name_key, class_key);
SAFE_FREE ();
return result;
const char *attribute, const char *class,
enum resource_types type)
{
- return x_get_arg (FRAME_X_DISPLAY_INFO (f),
+ return x_get_arg (FRAME_DISPLAY_INFO (f),
alist, param, attribute, class, type);
}
{
Lisp_Object value;
- value = x_get_arg (FRAME_X_DISPLAY_INFO (f), alist, param,
+ value = x_get_arg (FRAME_DISPLAY_INFO (f), alist, param,
attribute, class, type);
if (! NILP (value) && ! EQ (value, Qunbound))
store_frame_param (f, param, value);
{
register Lisp_Object tem0, tem1, tem2;
long window_prompting = 0;
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
/* Default values if we fall through.
Actually, if that happens we should get
#define FRAME_NS_P(f) ((f)->output_method == output_ns)
#endif
-/* Dots per inch of the screen the frame F is on. */
-
-#ifdef HAVE_X_WINDOWS
-#define FRAME_RES_X(f) \
- (eassert (FRAME_X_P (f)), FRAME_X_DISPLAY_INFO (f)->resx)
-#define FRAME_RES_Y(f) \
- (eassert (FRAME_X_P (f)), FRAME_X_DISPLAY_INFO (f)->resy)
-#endif
-
-#ifdef HAVE_NTGUI
-#define FRAME_RES_X(f) \
- (eassert (FRAME_W32_P (f)), FRAME_W32_DISPLAY_INFO (f)->resx)
-#define FRAME_RES_Y(f) \
- (eassert (FRAME_W32_P (f)), FRAME_W32_DISPLAY_INFO (f)->resy)
-#endif
-
-#ifdef HAVE_NS
-#define FRAME_RES_X(f) \
- (eassert (FRAME_NS_P (f)), FRAME_NS_DISPLAY_INFO (f)->resx)
-#define FRAME_RES_Y(f) \
- (eassert (FRAME_NS_P (f)), FRAME_NS_DISPLAY_INFO (f)->resy)
-#endif
-
-/* Defaults when no window system available. */
-
-#ifndef FRAME_RES_X
-#define FRAME_RES_X(f) default_pixels_per_inch_x ()
-#define FRAME_RES_Y(f) default_pixels_per_inch_y ()
-#endif
-
/* FRAME_WINDOW_P tests whether the frame is a window, and is
defined to be the predicate for the window system being used. */
#define FRAME_WINDOW_P(f) ((void) (f), 0)
#endif
+/* Dots per inch of the screen the frame F is on. */
+
+#ifdef HAVE_WINDOW_SYSTEM
+
+#define FRAME_RES_X(f) \
+ (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resx)
+#define FRAME_RES_Y(f) \
+ (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resy)
+
+#else /* !HAVE_WINDOW_SYSTEM */
+
+/* Defaults when no window system available. */
+
+#define FRAME_RES_X(f) default_pixels_per_inch_x ()
+#define FRAME_RES_Y(f) default_pixels_per_inch_y ()
+
+#endif /* HAVE_WINDOW_SYSTEM */
+
/* Return a pointer to the structure holding information about the
region of text, if any, that is currently shown in mouse-face on
frame F. We need to define two versions because a TTY-only build
- does not have FRAME_X_DISPLAY_INFO. */
+ does not have FRAME_DISPLAY_INFO. */
#ifdef HAVE_WINDOW_SYSTEM
# define MOUSE_HL_INFO(F) \
(FRAME_WINDOW_P(F) \
- ? &FRAME_X_DISPLAY_INFO(F)->mouse_highlight \
+ ? &FRAME_DISPLAY_INFO(F)->mouse_highlight \
: &(F)->output_data.tty->display_info->mouse_highlight)
#else
# define MOUSE_HL_INFO(F) \
{
/* Must realize so the GdkWindow inside the widget is created. */
gtk_widget_realize (w);
- xg_set_cursor (w, FRAME_X_DISPLAY_INFO (f)->xg_cursor);
+ xg_set_cursor (w, FRAME_DISPLAY_INFO (f)->xg_cursor);
}
}
else
/* Set the cursor to an arrow. */
- xg_set_cursor (webox, FRAME_X_DISPLAY_INFO (f)->xg_cursor);
+ xg_set_cursor (webox, FRAME_DISPLAY_INFO (f)->xg_cursor);
bar->x_window = scroll_id;
}
/* Convert between the modifier bits GDK uses and the modifier bits
Emacs uses. This assumes GDK and X masks are the same, which they are when
this is written. */
- event.modifiers = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), mod);
+ event.modifiers = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), mod);
kbd_buffer_store_event (&event);
/* Return focus to the frame after we have clicked on a detached
int
x_bitmap_height (struct frame *f, ptrdiff_t id)
{
- return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height;
+ return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].height;
}
int
x_bitmap_width (struct frame *f, ptrdiff_t id)
{
- return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width;
+ return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width;
}
#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
x_bitmap_pixmap (struct frame *f, ptrdiff_t id)
{
/* HAVE_NTGUI needs the explicit cast here. */
- return (ptrdiff_t) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
+ return (ptrdiff_t) FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
}
#endif
int
x_bitmap_mask (struct frame *f, ptrdiff_t id)
{
- return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask;
+ return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].mask;
}
#endif
static ptrdiff_t
x_allocate_bitmap_record (struct frame *f)
{
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
ptrdiff_t i;
if (dpyinfo->bitmaps_last < dpyinfo->bitmaps_size)
void
x_reference_bitmap (struct frame *f, ptrdiff_t id)
{
- ++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount;
+ ++FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].refcount;
}
/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */
ptrdiff_t
x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsigned int height)
{
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
ptrdiff_t id;
#ifdef HAVE_X_WINDOWS
#ifdef HAVE_NTGUI
Pixmap bitmap;
bitmap = CreateBitmap (width, height,
- FRAME_X_DISPLAY_INFO (XFRAME (frame))->n_planes,
- FRAME_X_DISPLAY_INFO (XFRAME (frame))->n_cbits,
+ FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes,
+ FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits,
bits);
if (! bitmap)
return -1;
ptrdiff_t
x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
{
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
#ifdef HAVE_NTGUI
return -1; /* W32_TODO : bitmap support */
void
x_destroy_bitmap (struct frame *f, ptrdiff_t id)
{
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
if (id > 0)
{
unsigned long x, y, xp, xm, yp, ym;
GC gc;
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
if (!(id > 0))
return;
ptrdiff_t
x_create_bitmap_from_xpm_data (struct frame *f, const char **bits)
{
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
ptrdiff_t id;
int rc;
XpmAttributes attrs;
two orders of magnitude. Freeing colors on TrueColor visuals is
a nop, and pixel colors specify RGB values directly. See also
the Xlib spec, chapter 3.1. */
- dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ dpyinfo = FRAME_DISPLAY_INFO (f);
if (dpyinfo->red_bits > 0)
{
unsigned long pr, pg, pb;
static void
x_disable_image (struct frame *f, struct image *img)
{
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
#ifdef HAVE_NTGUI
int n_planes = dpyinfo->n_planes * dpyinfo->n_cbits;
#else
if (current_popup_menu)
{
discard_menu_items ();
- FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
+ FRAME_DISPLAY_INFO (f)->grabbed = 0;
UNGCPRO;
return Qnil;
}
#endif
#ifdef HAVE_NTGUI /* FIXME: Is it really w32-specific? --Stef */
- FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
+ FRAME_DISPLAY_INFO (f)->grabbed = 0;
#endif
#endif /* HAVE_MENUS */
static void
IT_update_begin (struct frame *f)
{
- struct tty_display_info *display_info = FRAME_X_DISPLAY_INFO (f);
+ struct tty_display_info *display_info = FRAME_DISPLAY_INFO (f);
Mouse_HLInfo *hlinfo = &display_info->mouse_highlight;
struct frame *mouse_face_frame = hlinfo->mouse_face_mouse_frame;
static void
IT_update_end (struct frame *f)
{
- struct tty_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct tty_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
if (dpyinfo->termscript)
fprintf (dpyinfo->termscript, "\n<UPDATE_END\n");
#define FRAME_X_DISPLAY(f) ((Display *) 0)
#define FRAME_FONT(f) ((f)->output_data.tty->font)
-#define FRAME_X_DISPLAY_INFO(f) (&the_only_display_info)
+#define FRAME_DISPLAY_INFO(f) (&the_only_display_info)
/* Prototypes. */
struct frame *sf = XFRAME (selected_frame);
if (FRAME_NS_P (sf) && FRAME_LIVE_P (sf))
- dpyinfo = FRAME_NS_DISPLAY_INFO (sf);
+ dpyinfo = FRAME_DISPLAY_INFO (sf);
else if (x_display_list != 0)
dpyinfo = x_display_list;
else
else
{
struct frame *f = decode_window_system_frame (object);
- dpyinfo = FRAME_NS_DISPLAY_INFO (f);
+ dpyinfo = FRAME_DISPLAY_INFO (f);
}
return dpyinfo;
if (NILP (Fmemq (frame, Vframe_list)))
{
#if defined GLYPH_DEBUG && defined ENABLE_CHECKING
- struct ns_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
#endif
x_free_frame_resources (f);
if (! STRINGP (f->icon_name))
fset_icon_name (f, Qnil);
- FRAME_NS_DISPLAY_INFO (f) = dpyinfo;
+ FRAME_DISPLAY_INFO (f) = dpyinfo;
- /* With FRAME_NS_DISPLAY_INFO set up, this unwind-protect is safe. */
+ /* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */
record_unwind_protect (unwind_create_frame, frame);
f->output_data.ns->window_desc = desc_ctr++;
}
else
{
- f->output_data.ns->parent_desc = FRAME_NS_DISPLAY_INFO (f)->root_window;
+ f->output_data.ns->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
f->output_data.ns->explicit_parent = 0;
}
f->output_data.ns->hand_cursor = [NSCursor pointingHandCursor];
f->output_data.ns->hourglass_cursor = [NSCursor disappearingItemCursor];
f->output_data.ns->horizontal_drag_cursor = [NSCursor resizeLeftRightCursor];
- FRAME_NS_DISPLAY_INFO (f)->vertical_scroll_bar_cursor
+ FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor
= [NSCursor arrowCursor];
f->output_data.ns->current_pointer = f->output_data.ns->text_cursor;
(Lisp_Object frame)
{
struct frame *f = decode_window_system_frame (frame);
- struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
if (dpyinfo->x_focus_frame != f)
{
Lisp_Object
x_get_focus_frame (struct frame *frame)
{
- struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame);
Lisp_Object nsfocus;
if (!dpyinfo->x_focus_frame)
{
/* Absolute coordinates. */
pt.x = XINT (left);
- pt.y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - XINT (top)
+ pt.y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - XINT (top)
- height;
}
else if (pt.x + XINT (dx) <= 0)
*root_x = 0; /* Can happen for negative dx */
else if (pt.x + XINT (dx) + width
- <= x_display_pixel_width (FRAME_NS_DISPLAY_INFO (f)))
+ <= x_display_pixel_width (FRAME_DISPLAY_INFO (f)))
/* It fits to the right of the pointer. */
*root_x = pt.x + XINT (dx);
else if (width + XINT (dx) <= pt.x)
/* It fits below the pointer. */
*root_y = pt.y - height - XINT (dy);
else if (pt.y + XINT (dy) + height
- <= x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)))
+ <= x_display_pixel_height (FRAME_DISPLAY_INFO (f)))
/* It fits above the pointer */
*root_y = pt.y + XINT (dy);
else
/* Put it on the top. */
- *root_y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - height;
+ *root_y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - height;
}
static Lisp_Object
nsfont_get_cache (struct frame *frame)
{
- Display_Info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (frame);
return (dpyinfo->name_list_element);
}
: FRAME_BACKGROUND_COLOR (s->f)) set];
else
{
- struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (s->f);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (s->f);
[[dpyinfo->bitmaps[face->stipple-1].img stippleMask] set];
}
NSRectFill (br);
/* This gives the ns_display_info structure for the display F is on. */
-#define FRAME_NS_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
-/* the primacy of X must be constantly worked with... */
-#define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
+#define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
#define FRAME_X_OUTPUT(f) ((f)->output_data.ns)
#define FRAME_NS_WINDOW(f) ((f)->output_data.ns->window_desc)
#define FRAME_X_WINDOW(f) ((f)->output_data.ns->window_desc)
#define FRAME_NS_DISPLAY(f) (0)
#define FRAME_X_DISPLAY(f) (0)
#define FRAME_X_SCREEN(f) (0)
-#define FRAME_X_VISUAL(f) FRAME_NS_DISPLAY_INFO(f)->visual
+#define FRAME_X_VISUAL(f) FRAME_DISPLAY_INFO(f)->visual
#define FRAME_FOREGROUND_COLOR(f) ((f)->output_data.ns->foreground_color)
#define FRAME_BACKGROUND_COLOR(f) ((f)->output_data.ns->background_color)
-#define FRAME_X_IMAGE_CACHE(F) FRAME_NS_DISPLAY_INFO ((F))->image_cache
+#define FRAME_X_IMAGE_CACHE(F) FRAME_DISPLAY_INFO ((F))->image_cache
#define NS_FACE_FOREGROUND(f) ((f)->foreground)
#define NS_FACE_BACKGROUND(f) ((f)->background)
#define NS_TOP_POS(f) ((f)->top_pos)
#endif
-#define FRAME_NS_FONT_TABLE(f) (FRAME_NS_DISPLAY_INFO (f)->font_table)
+#define FRAME_NS_FONT_TABLE(f) (FRAME_DISPLAY_INFO (f)->font_table)
#define FRAME_FONTSET(f) ((f)->output_data.ns->fontset)
#define FRAME_SMALLEST_CHAR_WIDTH(f) \
- (FRAME_NS_DISPLAY_INFO (f)->smallest_char_width)
+ (FRAME_DISPLAY_INFO (f)->smallest_char_width)
#define FRAME_SMALLEST_FONT_HEIGHT(f) \
- (FRAME_NS_DISPLAY_INFO (f)->smallest_font_height)
+ (FRAME_DISPLAY_INFO (f)->smallest_font_height)
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.ns->baseline_offset)
#define BLACK_PIX_DEFAULT(f) 0x000000
#define WHITE_PIX_DEFAULT(f) 0xFFFFFF
External (hook): called on things like window switching within frame
-------------------------------------------------------------------------- */
{
- struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame);
struct frame *old_highlight = dpyinfo->x_highlight_frame;
NSTRACE (ns_frame_rehighlight);
NSTRACE (x_iconify_frame);
check_window_system (f);
view = FRAME_NS_VIEW (f);
- dpyinfo = FRAME_NS_DISPLAY_INFO (f);
+ dpyinfo = FRAME_DISPLAY_INFO (f);
if (dpyinfo->x_highlight_frame == f)
dpyinfo->x_highlight_frame = 0;
NSTRACE (x_free_frame_resources);
check_window_system (f);
view = FRAME_NS_VIEW (f);
- dpyinfo = FRAME_NS_DISPLAY_INFO (f);
+ dpyinfo = FRAME_DISPLAY_INFO (f);
hlinfo = MOUSE_HL_INFO (f);
[(EmacsView *)view setWindowClosing: YES]; /* may not have been informed */
NSColor *
ns_lookup_indexed_color (unsigned long idx, struct frame *f)
{
- struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
+ struct ns_color_table *color_table = FRAME_DISPLAY_INFO (f)->color_table;
if (idx < 1 || idx >= color_table->avail)
return nil;
return color_table->colors[idx];
unsigned long
ns_index_color (NSColor *color, struct frame *f)
{
- struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
+ struct ns_color_table *color_table = FRAME_DISPLAY_INFO (f)->color_table;
ptrdiff_t idx;
ptrdiff_t i;
if (!f)
return;
- color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
+ color_table = FRAME_DISPLAY_INFO (f)->color_table;
if (idx <= 0 || idx >= color_table->size) {
message1 ("ns_free_indexed_color: Color index out of range.\n");
change the entire-frame transparency
-------------------------------------------------------------------------- */
{
- struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
double alpha = 1.0;
double alpha_min = 1.0;
return;
}
- dpyinfo = FRAME_NS_DISPLAY_INFO (*fp);
+ dpyinfo = FRAME_DISPLAY_INFO (*fp);
block_input ();
: FRAME_BACKGROUND_COLOR (s->f)) set];
else
{
- struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (s->f);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (s->f);
[[dpyinfo->bitmaps[face->stipple-1].img stippleMask] set];
}
- (void)windowDidBecomeKey: (NSNotification *)notification
/* cf. x_detect_focus_change(), x_focus_changed(), x_new_focus_frame() */
{
- struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (emacsframe);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe);
struct frame *old_focus = dpyinfo->x_focus_frame;
NSTRACE (windowDidBecomeKey);
- (void)windowDidResignKey: (NSNotification *)notification
/* cf. x_detect_focus_change(), x_focus_changed(), x_new_focus_frame() */
{
- struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (emacsframe);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe);
BOOL is_focus_frame = dpyinfo->x_focus_frame == emacsframe;
NSTRACE (windowDidResignKey);
struct frame *sf = XFRAME (selected_frame);
if (FRAME_W32_P (sf) && FRAME_LIVE_P (sf))
- return FRAME_W32_DISPLAY_INFO (sf);
+ return FRAME_DISPLAY_INFO (sf);
else
return &one_w32_display_info;
}
f = XFRAME (frame);
if (! FRAME_W32_P (f))
error ("Non-W32 frame used");
- return FRAME_W32_DISPLAY_INFO (f);
+ return FRAME_DISPLAY_INFO (f);
}
}
\f
FOR_EACH_FRAME (tail, frame)
{
f = XFRAME (frame);
- if (!FRAME_W32_P (f) || FRAME_W32_DISPLAY_INFO (f) != dpyinfo)
+ if (!FRAME_W32_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo)
continue;
if (FRAME_W32_WINDOW (f) == wdesc)
int i;
/* don't bother trying to create palette if not supported */
- if (! FRAME_W32_DISPLAY_INFO (f)->has_palette)
+ if (! FRAME_DISPLAY_INFO (f)->has_palette)
return;
log_palette = (LOGPALETTE *)
alloca (sizeof (LOGPALETTE) +
- FRAME_W32_DISPLAY_INFO (f)->num_colors * sizeof (PALETTEENTRY));
+ FRAME_DISPLAY_INFO (f)->num_colors * sizeof (PALETTEENTRY));
log_palette->palVersion = 0x300;
- log_palette->palNumEntries = FRAME_W32_DISPLAY_INFO (f)->num_colors;
+ log_palette->palNumEntries = FRAME_DISPLAY_INFO (f)->num_colors;
- list = FRAME_W32_DISPLAY_INFO (f)->color_list;
+ list = FRAME_DISPLAY_INFO (f)->color_list;
for (i = 0;
- i < FRAME_W32_DISPLAY_INFO (f)->num_colors;
+ i < FRAME_DISPLAY_INFO (f)->num_colors;
i++, list = list->next)
log_palette->palPalEntry[i] = list->entry;
enter_crit ();
- if (FRAME_W32_DISPLAY_INFO (f)->palette)
- DeleteObject (FRAME_W32_DISPLAY_INFO (f)->palette);
- FRAME_W32_DISPLAY_INFO (f)->palette = new_palette;
+ if (FRAME_DISPLAY_INFO (f)->palette)
+ DeleteObject (FRAME_DISPLAY_INFO (f)->palette);
+ FRAME_DISPLAY_INFO (f)->palette = new_palette;
/* Realize display palette and garbage all frames. */
release_frame_dc (f, get_frame_dc (f));
void
w32_map_color (struct frame *f, COLORREF color)
{
- struct w32_palette_entry * list = FRAME_W32_DISPLAY_INFO (f)->color_list;
+ struct w32_palette_entry * list = FRAME_DISPLAY_INFO (f)->color_list;
if (NILP (Vw32_enable_palette))
return;
list = xmalloc (sizeof (struct w32_palette_entry));
SET_W32_COLOR (list->entry, color);
list->refcount = 1;
- list->next = FRAME_W32_DISPLAY_INFO (f)->color_list;
- FRAME_W32_DISPLAY_INFO (f)->color_list = list;
- FRAME_W32_DISPLAY_INFO (f)->num_colors++;
+ list->next = FRAME_DISPLAY_INFO (f)->color_list;
+ FRAME_DISPLAY_INFO (f)->color_list = list;
+ FRAME_DISPLAY_INFO (f)->num_colors++;
/* set flag that palette must be regenerated */
- FRAME_W32_DISPLAY_INFO (f)->regen_palette = TRUE;
+ FRAME_DISPLAY_INFO (f)->regen_palette = TRUE;
}
void
w32_unmap_color (struct frame *f, COLORREF color)
{
- struct w32_palette_entry * list = FRAME_W32_DISPLAY_INFO (f)->color_list;
- struct w32_palette_entry **prev = &FRAME_W32_DISPLAY_INFO (f)->color_list;
+ struct w32_palette_entry * list = FRAME_DISPLAY_INFO (f)->color_list;
+ struct w32_palette_entry **prev = &FRAME_DISPLAY_INFO (f)->color_list;
if (NILP (Vw32_enable_palette))
return;
{
*prev = list->next;
xfree (list);
- FRAME_W32_DISPLAY_INFO (f)->num_colors--;
+ FRAME_DISPLAY_INFO (f)->num_colors--;
break;
}
else
}
/* set flag that palette must be regenerated */
- FRAME_W32_DISPLAY_INFO (f)->regen_palette = TRUE;
+ FRAME_DISPLAY_INFO (f)->regen_palette = TRUE;
}
#endif
else if (strcmp (SDATA (arg), "white") == 0)
return WHITE_PIX_DEFAULT (f);
- if ((FRAME_W32_DISPLAY_INFO (f)->n_planes * FRAME_W32_DISPLAY_INFO (f)->n_cbits) == 1)
+ if ((FRAME_DISPLAY_INFO (f)->n_planes * FRAME_DISPLAY_INFO (f)->n_cbits) == 1)
return def;
/* w32_defined_color is responsible for coping with failures
{
/* Check for no change needed in this very common case
before we do any consing. */
- if (!strcmp (FRAME_W32_DISPLAY_INFO (f)->w32_id_name,
+ if (!strcmp (FRAME_DISPLAY_INFO (f)->w32_id_name,
SDATA (f->name)))
return;
- name = build_string (FRAME_W32_DISPLAY_INFO (f)->w32_id_name);
+ name = build_string (FRAME_DISPLAY_INFO (f)->w32_id_name);
}
else
CHECK_STRING (name);
if (NILP (Fmemq (frame, Vframe_list)))
{
#ifdef GLYPH_DEBUG
- struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
+ struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
#endif
x_free_frame_resources (f);
static void
x_default_font_parameter (struct frame *f, Lisp_Object parms)
{
- struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
+ struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
RES_TYPE_STRING);
Lisp_Object font;
if (! STRINGP (f->icon_name))
fset_icon_name (f, Qnil);
-/* FRAME_W32_DISPLAY_INFO (f) = dpyinfo; */
+/* FRAME_DISPLAY_INFO (f) = dpyinfo; */
- /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
+ /* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */
record_unwind_protect (do_unwind_create_frame, frame);
#ifdef GLYPH_DEBUG
image_cache_refcount =
}
else
{
- f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
+ f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
f->output_data.w32->explicit_parent = 0;
}
"fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
f->output_data.w32->dwStyle = WS_OVERLAPPEDWINDOW;
- f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
+ f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
f->output_data.w32->text_cursor = w32_load_cursor (IDC_IBEAM);
f->output_data.w32->nontext_cursor = w32_load_cursor (IDC_ARROW);
/* Now consider the frame official. */
f->terminal->reference_count++;
- FRAME_W32_DISPLAY_INFO (f)->reference_count++;
+ FRAME_DISPLAY_INFO (f)->reference_count++;
Vframe_list = Fcons (frame, Vframe_list);
/* We need to do this after creating the window, so that the
Lisp_Object
x_get_focus_frame (struct frame *frame)
{
- struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (frame);
+ struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame);
Lisp_Object xfocus;
if (! dpyinfo->w32_focus_frame)
return Qnil;
int
x_screen_planes (register struct frame *f)
{
- return FRAME_W32_DISPLAY_INFO (f)->n_planes;
+ return FRAME_DISPLAY_INFO (f)->n_planes;
}
\f
/* Return the display structure for the display named NAME.
dpyinfo_refcount = dpyinfo->reference_count;
#endif /* GLYPH_DEBUG */
FRAME_KBOARD (f) = kb;
- f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
+ f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
f->output_data.w32->explicit_parent = 0;
/* Set the name; the functions to which we pass f expect the name to
init_frame_faces (f);
f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED;
- f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window;
+ f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
window_prompting = x_figure_window_size (f, parms, 0);
/* Now that the frame is official, it counts as a reference to
its display. */
- FRAME_W32_DISPLAY_INFO (f)->reference_count++;
+ FRAME_DISPLAY_INFO (f)->reference_count++;
f->terminal->reference_count++;
/* It is now ok to make the frame official even if we get an error
/* Default min and max values. */
min_x = 0;
min_y = 0;
- max_x = x_display_pixel_width (FRAME_W32_DISPLAY_INFO (f));
- max_y = x_display_pixel_height (FRAME_W32_DISPLAY_INFO (f));
+ max_x = x_display_pixel_width (FRAME_DISPLAY_INFO (f));
+ max_y = x_display_pixel_height (FRAME_DISPLAY_INFO (f));
block_input ();
GetCursorPos (&pt);
/* Create a frame for the tooltip, and record it in the global
variable tip_frame. */
- frame = x_create_tip_frame (FRAME_W32_DISPLAY_INFO (f), parms, string);
+ frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms, string);
f = XFRAME (frame);
/* Set up the frame's root window. */
Lisp_Object
w32font_get_cache (struct frame *f)
{
- struct w32_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
return (dpyinfo->name_list_element);
}
unblock_input ();
discard_menu_items ();
- FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
+ FRAME_DISPLAY_INFO (f)->grabbed = 0;
if (error_name) error (error_name);
return selection;
/* Clean up extraneous mouse events which might have been generated
during the call. */
discard_mouse_events ();
- FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
+ FRAME_DISPLAY_INFO (f)->grabbed = 0;
/* Free the widget_value objects we used to specify the contents. */
free_menubar_widget_value_tree (first_wv);
lw_pop_up_all_widgets (dialog_id);
/* Process events that apply to the menu. */
- popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id);
+ popup_get_selection ((XEvent *) 0, FRAME_DISPLAY_INFO (f), dialog_id);
lw_destroy_all_widgets (dialog_id);
void
x_set_frame_alpha (struct frame *f)
{
- struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
+ struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
double alpha = 1.0;
double alpha_min = 1.0;
BYTE opac;
static void
x_update_begin (struct frame *f)
{
- struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f);
+ struct w32_display_info *display_info = FRAME_DISPLAY_INFO (f);
if (! FRAME_W32_P (f))
return;
xgcv.font = s->font;
mask = GCForeground | GCBackground | GCFont;
- if (FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc)
- XChangeGC (NULL, FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc,
+ if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc)
+ XChangeGC (NULL, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc,
mask, &xgcv);
else
- FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc
+ FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
= XCreateGC (NULL, s->window, mask, &xgcv);
- s->gc = FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc;
+ s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
}
}
xgcv.font = s->font;
mask = GCForeground | GCBackground | GCFont;
- if (FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc)
- XChangeGC (NULL, FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc,
+ if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc)
+ XChangeGC (NULL, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc,
mask, &xgcv);
else
- FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc
+ FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
= XCreateGC (NULL, s->window, mask, &xgcv);
- s->gc = FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc;
+ s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
}
eassert (s->gc != 0);
unsigned long mask = GCForeground;
COLORREF pixel;
COLORREF background = di->relief_background;
- struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
+ struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
/* TODO: Free colors (if using palette)? */
{
if (! FRAME_W32_P (frame))
return;
- x_frame_rehighlight (FRAME_W32_DISPLAY_INFO (frame));
+ x_frame_rehighlight (FRAME_DISPLAY_INFO (frame));
}
static void
/* Now we have a position on the root; find the innermost window
containing the pointer. */
{
- if (FRAME_W32_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
+ if (FRAME_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
&& FRAME_LIVE_P (last_mouse_frame))
{
/* If mouse was grabbed on a frame, give coords for that frame
else
{
/* Is window under mouse one of our frames? */
- f1 = x_any_window_to_frame (FRAME_W32_DISPLAY_INFO (*fp),
+ f1 = x_any_window_to_frame (FRAME_DISPLAY_INFO (*fp),
WindowFromPoint (pt));
}
/* Treat negative positions as relative to the rightmost bottommost
position that fits on the screen. */
if (flags & XNegative)
- f->left_pos = (x_display_pixel_width (FRAME_W32_DISPLAY_INFO (f))
+ f->left_pos = (x_display_pixel_width (FRAME_DISPLAY_INFO (f))
- FRAME_PIXEL_WIDTH (f)
+ f->left_pos
- (left_right_borders_width - 1));
if (flags & YNegative)
- f->top_pos = (x_display_pixel_height (FRAME_W32_DISPLAY_INFO (f))
+ f->top_pos = (x_display_pixel_height (FRAME_DISPLAY_INFO (f))
- FRAME_PIXEL_HEIGHT (f)
+ f->top_pos
- (top_bottom_borders_height - 1));
x_make_frame_invisible (struct frame *f)
{
/* Don't keep the highlight on an invisible frame. */
- if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f)
- FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame = 0;
+ if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
+ FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
block_input ();
Lisp_Object type;
/* Don't keep the highlight on an invisible frame. */
- if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f)
- FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame = 0;
+ if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
+ FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
if (FRAME_ICONIFIED_P (f))
return;
void
x_free_frame_resources (struct frame *f)
{
- struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
+ struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
block_input ();
void
x_destroy_window (struct frame *f)
{
- struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
+ struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
x_free_frame_resources (f);
dpyinfo->reference_count--;
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset)
/* This gives the w32_display_info structure for the display F is on. */
-#define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info)
-#define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info)
+#define FRAME_DISPLAY_INFO(f) (&one_w32_display_info)
/* This is the `Display *' which frame F is on. */
#define FRAME_X_DISPLAY(f) (0)
/* Value is the smallest width of any character in any font on frame F. */
#define FRAME_SMALLEST_CHAR_WIDTH(F) \
- FRAME_W32_DISPLAY_INFO(F)->smallest_char_width
+ FRAME_DISPLAY_INFO(F)->smallest_char_width
/* Value is the smallest height of any font on frame F. */
#define FRAME_SMALLEST_FONT_HEIGHT(F) \
- FRAME_W32_DISPLAY_INFO(F)->smallest_font_height
+ FRAME_DISPLAY_INFO(F)->smallest_font_height
#define FRAME_NORMAL_PLACEMENT(F) ((F)->output_data.w32->normal_placement)
#define FRAME_PREV_FSMODE(F) ((F)->output_data.w32->prev_fsmode)
void
select_palette (struct frame *f, HDC hdc)
{
- struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f);
+ struct w32_display_info *display_info = FRAME_DISPLAY_INFO (f);
if (!display_info->has_palette)
return;
font = Ffont_xlfd_name (font, Qnil);
if (STRINGP (font))
{
- XFontStruct *xfont = XLoadQueryFont (FRAME_X_DISPLAY_INFO (s)->display,
+ XFontStruct *xfont = XLoadQueryFont (FRAME_DISPLAY_INFO (s)->display,
SSDATA (font));
if (xfont)
{
{
Lisp_Object window = f->tool_bar_window;
struct window *w = XWINDOW (window);
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
int hpos, vpos;
struct glyph *glyph;
/* Detect a nonselected window or nonselected frame. */
else if (w != XWINDOW (f->selected_window)
- || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame)
+ || f != FRAME_DISPLAY_INFO (f)->x_highlight_frame)
{
*active_cursor = 0;
cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
#ifdef HAVE_X_WINDOWS
else if (EQ (pointer, intern ("vdrag")))
- cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
+ cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
#endif
else if (EQ (pointer, intern ("hourglass")))
cursor = FRAME_X_OUTPUT (f)->hourglass_cursor;
/* Change the mouse pointer according to what is under it. */
if (FRAME_WINDOW_P (f))
{
- dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ dpyinfo = FRAME_DISPLAY_INFO (f);
if (STRINGP (string))
{
cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
}
else
/* Default mode-line pointer. */
- cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
+ cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
}
#endif
}
#include TERM_HEADER
#include "fontset.h"
#ifdef HAVE_NTGUI
-#undef FRAME_X_DISPLAY_INFO
-#define FRAME_X_DISPLAY_INFO FRAME_W32_DISPLAY_INFO
#define x_display_info w32_display_info
#define GCGraphicsExposures 0
#endif /* HAVE_NTGUI */
#ifdef HAVE_NS
-#undef FRAME_X_DISPLAY_INFO
-#define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO
#define GCGraphicsExposures 0
#endif /* HAVE_NS */
void
x_free_colors (struct frame *f, long unsigned int *pixels, int npixels)
{
- int class = FRAME_X_DISPLAY_INFO (f)->visual->class;
+ int class = FRAME_DISPLAY_INFO (f)->visual->class;
/* If display has an immutable color map, freeing colors is not
necessary and some servers don't allow it. So don't do it. */
{
struct frame *f = XFRAME (frame);
if (FRAME_WINDOW_P (f)
- && FRAME_X_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS)
+ && FRAME_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS)
{
clear_font_cache (f);
free_all_realized_faces (frame);
CHECK_STRING (class);
f = decode_live_frame (frame);
block_input ();
- value = display_x_get_resource (FRAME_X_DISPLAY_INFO (f),
+ value = display_x_get_resource (FRAME_DISPLAY_INFO (f),
resource, class, Qnil, Qnil);
unblock_input ();
return value;
static void
x_update_menu_appearance (struct frame *f)
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
XrmDatabase rdb;
if (dpyinfo
struct frame *sf = XFRAME (selected_frame);
if (FRAME_X_P (sf) && FRAME_LIVE_P (sf))
- dpyinfo = FRAME_X_DISPLAY_INFO (sf);
+ dpyinfo = FRAME_DISPLAY_INFO (sf);
else if (x_display_list != 0)
dpyinfo = x_display_list;
else
else
{
struct frame *f = decode_window_system_frame (object);
- dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ dpyinfo = FRAME_DISPLAY_INFO (f);
}
return dpyinfo;
Atom actual_type;
unsigned long actual_size, bytes_remaining;
int rc, actual_format;
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
long max_len = 400;
Display *dpy = FRAME_X_DISPLAY (f);
unsigned char *tmp_data = NULL;
XTranslateCoordinates (FRAME_X_DISPLAY (f),
/* From-window, to-window. */
- FRAME_X_DISPLAY_INFO (f)->root_window,
+ FRAME_DISPLAY_INFO (f)->root_window,
FRAME_X_WINDOW (f),
/* From-position, to-position. */
XTranslateCoordinates (FRAME_X_DISPLAY (f),
/* From-window, to-window. */
- FRAME_X_DISPLAY_INFO (f)->root_window,
+ FRAME_DISPLAY_INFO (f)->root_window,
FRAME_OUTER_WINDOW (f),
/* From-position, to-position. */
#endif
/* Return MONO_COLOR for monochrome frames. */
- if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1)
+ if (FRAME_DISPLAY_INFO (f)->n_planes == 1)
return mono_color;
/* x_defined_color is responsible for coping with failures
Cursor c = 0;
x_catch_errors (dpy);
- pix = XCreateBitmapFromData (dpy, FRAME_X_DISPLAY_INFO (f)->root_window,
+ pix = XCreateBitmapFromData (dpy, FRAME_DISPLAY_INFO (f)->root_window,
no_data, 1, 1);
if (! x_had_errors_p (dpy) && pix != None)
{
XDefineCursor (dpy, FRAME_X_WINDOW (f),
f->output_data.x->current_cursor = cursor);
- if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor == 0)
- FRAME_X_DISPLAY_INFO (f)->invisible_cursor = make_invisible_cursor (f);
+ if (FRAME_DISPLAY_INFO (f)->invisible_cursor == 0)
+ FRAME_DISPLAY_INFO (f)->invisible_cursor = make_invisible_cursor (f);
if (cursor != x->text_cursor
&& x->text_cursor != 0)
text.value = x_encode_text (name, coding_system, 0, &bytes, &stringp,
&do_free_text_value);
text.encoding = (stringp ? XA_STRING
- : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
+ : FRAME_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
text.format = 8;
text.nitems = bytes;
if (text.nitems != bytes)
icon.value = x_encode_text (f->icon_name, coding_system, 0,
&bytes, &stringp, &do_free_icon_value);
icon.encoding = (stringp ? XA_STRING
- : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
+ : FRAME_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
icon.format = 8;
icon.nitems = bytes;
if (icon.nitems != bytes)
#else /* not USE_GTK */
XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
- FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name,
- FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
+ FRAME_DISPLAY_INFO (f)->Xatom_net_wm_name,
+ FRAME_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
8, PropModeReplace,
SDATA (encoded_name),
SBYTES (encoded_name));
XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &icon);
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
- FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name,
- FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
+ FRAME_DISPLAY_INFO (f)->Xatom_net_wm_icon_name,
+ FRAME_DISPLAY_INFO (f)->Xatom_UTF8_STRING,
8, PropModeReplace,
SDATA (encoded_icon_name),
SBYTES (encoded_icon_name));
{
/* Check for no change needed in this very common case
before we do any consing. */
- if (!strcmp (FRAME_X_DISPLAY_INFO (f)->x_id_name,
+ if (!strcmp (FRAME_DISPLAY_INFO (f)->x_id_name,
SSDATA (f->name)))
return;
- name = build_string (FRAME_X_DISPLAY_INFO (f)->x_id_name);
+ name = build_string (FRAME_DISPLAY_INFO (f)->x_id_name);
}
else
CHECK_STRING (name);
const char *xprop, const char *xclass,
int foreground_p)
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Lisp_Object tem;
tem = x_get_arg (dpyinfo, alist, prop, xprop, xclass, RES_TYPE_STRING);
unsigned long bytes_after;
if ((XGetWindowProperty (dpy, w,
- FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols,
+ FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols,
(long)0, (long)100, False, XA_ATOM,
&type, &format, &nitems, &bytes_after,
&catoms)
{
nitems--;
if (atoms[nitems]
- == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window)
+ == FRAME_DISPLAY_INFO (f)->Xatom_wm_delete_window)
need_delete = 0;
else if (atoms[nitems]
- == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_take_focus)
+ == FRAME_DISPLAY_INFO (f)->Xatom_wm_take_focus)
need_focus = 0;
else if (atoms[nitems]
- == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself)
+ == FRAME_DISPLAY_INFO (f)->Xatom_wm_save_yourself)
need_save = 0;
}
}
Atom props [10];
int count = 0;
if (need_delete)
- props[count++] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window;
+ props[count++] = FRAME_DISPLAY_INFO (f)->Xatom_wm_delete_window;
if (need_focus)
- props[count++] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_take_focus;
+ props[count++] = FRAME_DISPLAY_INFO (f)->Xatom_wm_take_focus;
if (need_save)
- props[count++] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself;
+ props[count++] = FRAME_DISPLAY_INFO (f)->Xatom_wm_save_yourself;
if (count)
- XChangeProperty (dpy, w, FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols,
+ XChangeProperty (dpy, w, FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols,
XA_ATOM, 32, PropModeAppend,
(unsigned char *) props, count);
}
struct frame *cf = XFRAME (frame);
if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf)
- && FRAME_X_DISPLAY_INFO (cf) == FRAME_X_DISPLAY_INFO (f)
+ && FRAME_DISPLAY_INFO (cf) == FRAME_DISPLAY_INFO (f)
&& FRAME_FONT (f)
&& FRAME_FONT (f)->pixel_size == pixel_size)
{
{
struct frame *cf = XFRAME (frame);
if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf)
- && FRAME_X_DISPLAY_INFO (cf) == FRAME_X_DISPLAY_INFO (f)
+ && FRAME_DISPLAY_INFO (cf) == FRAME_DISPLAY_INFO (f)
&& FRAME_XIC_FONTSET (cf) == FRAME_XIC_FONTSET (f))
{
shared_p = 1;
XtSetArg (al[ac], XtNmappedWhenManaged, 0); ac++;
XtSetArg (al[ac], XtNborderWidth, f->border_width); ac++;
XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++;
- XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++;
+ XtSetArg (al[ac], XtNdepth, FRAME_DISPLAY_INFO (f)->n_planes); ac++;
XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++;
shell_widget = XtAppCreateShell (f->namebuf, EMACS_CLASS,
applicationShellWidgetClass,
ac = 0;
XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++;
- XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++;
+ XtSetArg (al[ac], XtNdepth, FRAME_DISPLAY_INFO (f)->n_planes); ac++;
XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++;
XtSetArg (al[ac], XtNborderWidth, 0); ac++;
XtSetValues (pane_widget, al, ac);
XtSetArg (al[ac], XtNresizeToPreferred, 1); ac++;
XtSetArg (al[ac], XtNemacsFrame, f); ac++;
XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++;
- XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++;
+ XtSetArg (al[ac], XtNdepth, FRAME_DISPLAY_INFO (f)->n_planes); ac++;
XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++;
XtSetArg (al[ac], XtNborderWidth, 0); ac++;
frame_widget = XtCreateWidget (f->namebuf, emacsFrameClass, pane_widget,
be initialized to something relevant to the time we created the window.
*/
XChangeProperty (XtDisplay (frame_widget), XtWindow (frame_widget),
- FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols,
+ FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols,
XA_ATOM, 32, PropModeAppend, NULL, 0);
/* Make all the standard events reach the Emacs frame. */
/* Request "save yourself" and "delete window" commands from wm. */
{
Atom protocols[2];
- protocols[0] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window;
- protocols[1] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself;
+ protocols[0] = FRAME_DISPLAY_INFO (f)->Xatom_wm_delete_window;
+ protocols[1] = FRAME_DISPLAY_INFO (f)->Xatom_wm_save_yourself;
XSetWMProtocols (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), protocols, 2);
}
{
Lisp_Object icon_x, icon_y;
#if 0
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
#endif
/* Set the position of the icon. Note that twm groups all
this must be done on a per-frame basis. */
f->output_data.x->border_tile
= (XCreatePixmapFromBitmapData
- (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window,
+ (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window,
gray_bits, gray_width, gray_height,
FRAME_FOREGROUND_PIXEL (f),
FRAME_BACKGROUND_PIXEL (f),
if (NILP (Fmemq (frame, Vframe_list)))
{
#if defined GLYPH_DEBUG && defined ENABLE_CHECKING
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
#endif
x_free_frame_resources (f);
static void
x_default_font_parameter (struct frame *f, Lisp_Object parms)
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
RES_TYPE_STRING);
Lisp_Object font = Qnil;
if (! STRINGP (f->icon_name))
fset_icon_name (f, Qnil);
- FRAME_X_DISPLAY_INFO (f) = dpyinfo;
+ FRAME_DISPLAY_INFO (f) = dpyinfo;
- /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
+ /* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */
record_unwind_protect (do_unwind_create_frame, frame);
/* These colors will be set anyway later, but it's important
}
else
{
- f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
+ f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
f->output_data.x->explicit_parent = 0;
}
/* Now consider the frame official. */
f->terminal->reference_count++;
- FRAME_X_DISPLAY_INFO (f)->reference_count++;
+ FRAME_DISPLAY_INFO (f)->reference_count++;
Vframe_list = Fcons (frame, Vframe_list);
/* We need to do this after creating the X window, so that the
Lisp_Object
x_get_focus_frame (struct frame *frame)
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (frame);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame);
Lisp_Object xfocus;
if (! dpyinfo->x_focus_frame)
return Qnil;
{
struct frame *f = XFRAME (frame);
- if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo
+ if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo
&& !EQ (frame, tip_frame))
{
int i = x_get_monitor_for_frame (f, monitors, n_monitors);
{
struct frame *f = XFRAME (frame);
- if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo
+ if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo
&& !EQ (frame, tip_frame))
{
GdkWindow *gwin = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
{
CONS_TO_INTEGER (source, Window, target_window);
if (! target_window)
- target_window = FRAME_X_DISPLAY_INFO (f)->root_window;
+ target_window = FRAME_DISPLAY_INFO (f)->root_window;
}
block_input ();
f->output_data.x->scroll_bar_bottom_shadow_pixel = -1;
#endif /* USE_TOOLKIT_SCROLL_BARS */
fset_icon_name (f, Qnil);
- FRAME_X_DISPLAY_INFO (f) = dpyinfo;
- f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
+ FRAME_DISPLAY_INFO (f) = dpyinfo;
+ f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
f->output_data.x->explicit_parent = 0;
/* These colors will be set anyway later, but it's important
happen. */
init_frame_faces (f);
- f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
+ f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
x_figure_window_size (f, parms, 0);
{
XSetWindowAttributes attrs;
unsigned long mask;
- Atom type = FRAME_X_DISPLAY_INFO (f)->Xatom_net_window_type_tooltip;
+ Atom type = FRAME_DISPLAY_INFO (f)->Xatom_net_window_type_tooltip;
block_input ();
mask = CWBackPixel | CWOverrideRedirect | CWEventMask;
tip_window
= FRAME_X_WINDOW (f)
= XCreateWindow (FRAME_X_DISPLAY (f),
- FRAME_X_DISPLAY_INFO (f)->root_window,
+ FRAME_DISPLAY_INFO (f)->root_window,
/* x, y, width, height */
0, 0, 1, 1,
/* Border. */
CopyFromParent, InputOutput, CopyFromParent,
mask, &attrs);
XChangeProperty (FRAME_X_DISPLAY (f), tip_window,
- FRAME_X_DISPLAY_INFO (f)->Xatom_net_window_type,
+ FRAME_DISPLAY_INFO (f)->Xatom_net_window_type,
XA_ATOM, 32, PropModeReplace,
(unsigned char *)&type, 1);
unblock_input ();
{
Lisp_Object disptype;
- if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1)
+ if (FRAME_DISPLAY_INFO (f)->n_planes == 1)
disptype = intern ("mono");
- else if (FRAME_X_DISPLAY_INFO (f)->visual->class == GrayScale
- || FRAME_X_DISPLAY_INFO (f)->visual->class == StaticGray)
+ else if (FRAME_DISPLAY_INFO (f)->visual->class == GrayScale
+ || FRAME_DISPLAY_INFO (f)->visual->class == StaticGray)
disptype = intern ("grayscale");
else
disptype = intern ("color");
/* Now that the frame will be official, it counts as a reference to
its display and terminal. */
- FRAME_X_DISPLAY_INFO (f)->reference_count++;
+ FRAME_DISPLAY_INFO (f)->reference_count++;
f->terminal->reference_count++;
/* It is now ok to make the frame official even if we get an error
if (!INTEGERP (left) || !INTEGERP (top))
{
block_input ();
- XQueryPointer (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window,
+ XQueryPointer (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window,
&root, &child, root_x, root_y, &win_x, &win_y, &pmask);
unblock_input ();
}
else if (*root_y + XINT (dy) <= 0)
*root_y = 0; /* Can happen for negative dy */
else if (*root_y + XINT (dy) + height
- <= x_display_pixel_height (FRAME_X_DISPLAY_INFO (f)))
+ <= x_display_pixel_height (FRAME_DISPLAY_INFO (f)))
/* It fits below the pointer */
*root_y += XINT (dy);
else if (height + XINT (dy) <= *root_y)
else if (*root_x + XINT (dx) <= 0)
*root_x = 0; /* Can happen for negative dx */
else if (*root_x + XINT (dx) + width
- <= x_display_pixel_width (FRAME_X_DISPLAY_INFO (f)))
+ <= x_display_pixel_width (FRAME_DISPLAY_INFO (f)))
/* It fits to the right of the pointer. */
*root_x += XINT (dx);
else if (width + XINT (dx) <= *root_x)
/* Create a frame for the tooltip, and record it in the global
variable tip_frame. */
- frame = x_create_tip_frame (FRAME_X_DISPLAY_INFO (f), parms, string);
+ frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms, string);
f = XFRAME (frame);
/* Set up the frame's root window. */
struct frame *f = SELECTED_FRAME ();
w = f->output_data.x->menubar_widget;
- if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen)
+ if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen)
&& w != NULL)
{
block_input ();
static Lisp_Object
xfont_get_cache (struct frame *f)
{
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
return (dpyinfo->name_list_element);
}
static Lisp_Object
xfont_list (struct frame *f, Lisp_Object spec)
{
- Display *display = FRAME_X_DISPLAY_INFO (f)->display;
+ Display *display = FRAME_DISPLAY_INFO (f)->display;
Lisp_Object registry, list, val, extra, script;
int len;
/* Large enough to contain the longest XLFD (255 bytes) in UTF-8. */
static Lisp_Object
xfont_match (struct frame *f, Lisp_Object spec)
{
- Display *display = FRAME_X_DISPLAY_INFO (f)->display;
+ Display *display = FRAME_DISPLAY_INFO (f)->display;
Lisp_Object extra, val, entity;
char name[512];
XFontStruct *xfont;
static Lisp_Object
xfont_list_family (struct frame *f)
{
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
char **names;
int num_fonts, i;
Lisp_Object list;
static Lisp_Object
xfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
{
- Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
Display *display = dpyinfo->display;
char name[512];
int len;
memset (&ev, 0, sizeof ev);
ev.xbutton.display = FRAME_X_DISPLAY (f);
ev.xbutton.window = XtWindow (menubar);
- ev.xbutton.root = FRAME_X_DISPLAY_INFO (f)->root_window;
+ ev.xbutton.root = FRAME_DISPLAY_INFO (f)->root_window;
ev.xbutton.time = XtLastTimestampProcessed (FRAME_X_DISPLAY (f));
ev.xbutton.button = Button1;
ev.xbutton.x = ev.xbutton.y = FRAME_MENUBAR_HEIGHT (f) / 2;
{
struct next_popup_x_y *data = user_data;
GtkRequisition req;
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (data->f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (data->f);
int disp_width = x_display_pixel_width (dpyinfo);
int disp_height = x_display_pixel_height (dpyinfo);
if (for_click)
{
for (i = 0; i < 5; i++)
- if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
+ if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i))
break;
}
/* Must reset this manually because the button release event is not passed
to Emacs event loop. */
- FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
+ FRAME_DISPLAY_INFO (f)->grabbed = 0;
}
#else /* not USE_GTK */
event->send_event = 0;
event->display = FRAME_X_DISPLAY (f);
event->time = CurrentTime;
- event->root = FRAME_X_DISPLAY_INFO (f)->root_window;
+ event->root = FRAME_DISPLAY_INFO (f)->root_window;
event->window = event->subwindow = event->root;
event->x = x;
event->y = y;
event->state = 0;
event->button = 0;
for (i = 0; i < 5; i++)
- if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
+ if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i))
event->button = i;
/* Don't allow any geometry request from the user. */
make_number (menu_id & ~(-1 << (fact)))));
/* Process events that apply to the menu. */
- popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), menu_id, 1);
+ popup_get_selection (0, FRAME_DISPLAY_INFO (f), menu_id, 1);
unbind_to (specpdl_count, Qnil);
}
Fcons (make_number (dialog_id >> (fact)),
make_number (dialog_id & ~(-1 << (fact)))));
- popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), dialog_id, 1);
+ popup_get_selection (0, FRAME_DISPLAY_INFO (f), dialog_id, 1);
unbind_to (count, Qnil);
}
#ifdef HAVE_X_WINDOWS
/* Assume the mouse has moved out of the X window.
If it has actually moved in, we will get an EnterNotify. */
- x_mouse_leave (FRAME_X_DISPLAY_INFO (f));
+ x_mouse_leave (FRAME_DISPLAY_INFO (f));
/* State that no mouse buttons are now held.
(The oldXMenu code doesn't track this info for us.)
That is not necessarily true, but the fiction leads to reasonable
results, and it is a pain to ask which are actually held now. */
- FRAME_X_DISPLAY_INFO (f)->grabbed = 0;
+ FRAME_DISPLAY_INFO (f)->grabbed = 0;
#endif /* HAVE_X_WINDOWS */
{
struct frame *f = XFRAME (frame);
Window selecting_window = FRAME_X_WINDOW (f);
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Display *display = dpyinfo->display;
Time timestamp = last_event_timestamp;
Atom selection_atom = symbol_to_x_atom (dpyinfo, selection_name);
{
Lisp_Object frame;
Lisp_Object rest;
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
struct terminal *t = dpyinfo->terminal;
XSETFRAME (frame, f);
Lisp_Object time_stamp, Lisp_Object frame)
{
struct frame *f = XFRAME (frame);
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Display *display = dpyinfo->display;
Window requestor_window = FRAME_X_WINDOW (f);
Time requestor_time = last_event_timestamp;
error ("X selection unavailable for this frame");
val = x_get_local_selection (selection_symbol, target_type, 1,
- FRAME_X_DISPLAY_INFO (f));
+ FRAME_DISPLAY_INFO (f));
if (NILP (val) && FRAME_LIVE_P (f))
{
if (!f)
return Qnil;
- dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ dpyinfo = FRAME_DISPLAY_INFO (f);
CHECK_SYMBOL (selection);
/* Don't disown the selection when we're not the owner. */
if (EQ (selection, Qnil)) selection = QPRIMARY;
if (EQ (selection, Qt)) selection = QSECONDARY;
- if (f && !NILP (LOCAL_SELECTION (selection, FRAME_X_DISPLAY_INFO (f))))
+ if (f && !NILP (LOCAL_SELECTION (selection, FRAME_DISPLAY_INFO (f))))
return Qt;
else
return Qnil;
if (!f)
return Qnil;
- dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ dpyinfo = FRAME_DISPLAY_INFO (f);
if (!NILP (LOCAL_SELECTION (selection, dpyinfo)))
return Qt;
x_clipboard_manager_save (Lisp_Object frame)
{
struct frame *f = XFRAME (frame);
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Atom data = dpyinfo->Xatom_UTF8_STRING;
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
&& (f = XFRAME (frame), FRAME_X_P (f))
&& FRAME_LIVE_P (f))
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Lisp_Object local_selection
= LOCAL_SELECTION (QCLIPBOARD, dpyinfo);
Atom x_atom;
struct frame *f = decode_window_system_frame (frame);
ptrdiff_t i;
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
if (SYMBOLP (atom))
Window win = None, wi = x->parent_desc;
Display *dpy = FRAME_X_DISPLAY (f);
- while (wi != FRAME_X_DISPLAY_INFO (f)->root_window)
+ while (wi != FRAME_DISPLAY_INFO (f)->root_window)
{
Window root;
Window *children;
void
x_set_frame_alpha (struct frame *f)
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Display *dpy = FRAME_X_DISPLAY (f);
Window win = FRAME_OUTER_WINDOW (f);
double alpha = 1.0;
if (p->overlay_p)
{
clipmask = XCreatePixmapFromBitmapData (display,
- FRAME_X_DISPLAY_INFO (f)->root_window,
+ FRAME_DISPLAY_INFO (f)->root_window,
bits, p->wd, p->h,
1, 0, 1);
gcv.clip_mask = clipmask;
xgcv.graphics_exposures = False;
mask = GCForeground | GCBackground | GCGraphicsExposures;
- if (FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc)
- XChangeGC (s->display, FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc,
+ if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc)
+ XChangeGC (s->display, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc,
mask, &xgcv);
else
- FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc
+ FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
= XCreateGC (s->display, s->window, mask, &xgcv);
- s->gc = FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc;
+ s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
}
}
xgcv.graphics_exposures = False;
mask = GCForeground | GCBackground | GCGraphicsExposures;
- if (FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc)
- XChangeGC (s->display, FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc,
+ if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc)
+ XChangeGC (s->display, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc,
mask, &xgcv);
else
- FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc
+ FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc
= XCreateGC (s->display, s->window, mask, &xgcv);
- s->gc = FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc;
+ s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc;
}
eassert (s->gc != 0);
f = XFRAME (frame);
if (FRAME_X_P (f)
&& f->output_data.nothing != 1
- && FRAME_X_DISPLAY_INFO (f) == dpyinfo
+ && FRAME_DISPLAY_INFO (f) == dpyinfo
&& f->output_data.x->widget == widget)
return f;
}
void
x_query_colors (struct frame *f, XColor *colors, int ncolors)
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
if (dpyinfo->color_cells)
{
unsigned long pixel;
unsigned long background = di->relief_background;
Colormap cmap = FRAME_X_COLORMAP (f);
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Display *dpy = FRAME_X_DISPLAY (f);
xgcv.graphics_exposures = False;
block_input ();
if (invisible)
{
- if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor != 0)
+ if (FRAME_DISPLAY_INFO (f)->invisible_cursor != 0)
XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- FRAME_X_DISPLAY_INFO (f)->invisible_cursor);
+ FRAME_DISPLAY_INFO (f)->invisible_cursor);
}
else
XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
FOR_EACH_FRAME (tail, frame)
{
f = XFRAME (frame);
- if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
+ if (!FRAME_X_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo)
continue;
if (f->output_data.x->hourglass_window == wdesc)
return f;
if (found)
break;
f = XFRAME (frame);
- if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo)
+ if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo)
{
/* This frame matches if the window is any of its widgets. */
x = f->output_data.x;
FOR_EACH_FRAME (tail, frame)
{
f = XFRAME (frame);
- if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
+ if (!FRAME_X_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo)
continue;
x = f->output_data.x;
#ifdef USE_GTK
FOR_EACH_FRAME (tail, frame)
{
f = XFRAME (frame);
- if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
+ if (!FRAME_X_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo)
continue;
x = f->output_data.x;
static void
XTframe_rehighlight (struct frame *frame)
{
- x_frame_rehighlight (FRAME_X_DISPLAY_INFO (frame));
+ x_frame_rehighlight (FRAME_DISPLAY_INFO (frame));
}
static void
result->kind = MOUSE_CLICK_EVENT;
result->code = event->button - Button1;
result->timestamp = event->time;
- result->modifiers = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f),
+ result->modifiers = (x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f),
event->state)
| (event->type == ButtonRelease
? up_modifier
x_catch_errors (FRAME_X_DISPLAY (*fp));
- if (FRAME_X_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
+ if (FRAME_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame
&& FRAME_LIVE_P (last_mouse_frame))
{
/* If mouse was grabbed on a frame, give coords for that frame
want the edit window. For non-Gtk+ the innermost
window is the edit window. For Gtk+ it might not
be. It might be the tool bar for example. */
- if (x_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win))
+ if (x_window_to_frame (FRAME_DISPLAY_INFO (*fp), win))
break;
#endif
win = child;
#ifdef USE_GTK
/* We don't wan't to know the innermost window. We
want the edit window. */
- f1 = x_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win);
+ f1 = x_window_to_frame (FRAME_DISPLAY_INFO (*fp), win);
#else
/* Is win one of our frames? */
- f1 = x_any_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win);
+ f1 = x_any_window_to_frame (FRAME_DISPLAY_INFO (*fp), win);
#endif
#ifdef USE_X_TOOLKIT
/* Construct a ClientMessage event to send to the frame. */
ev->type = ClientMessage;
- ev->message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_Scrollbar;
+ ev->message_type = FRAME_DISPLAY_INFO (f)->Xatom_Scrollbar;
ev->display = FRAME_X_DISPLAY (f);
ev->window = FRAME_X_WINDOW (f);
ev->format = 32;
{
case GTK_SCROLL_JUMP:
/* Buttons 1 2 or 3 must be grabbed. */
- if (FRAME_X_DISPLAY_INFO (f)->grabbed != 0
- && FRAME_X_DISPLAY_INFO (f)->grabbed < (1 << 4))
+ if (FRAME_DISPLAY_INFO (f)->grabbed != 0
+ && FRAME_DISPLAY_INFO (f)->grabbed < (1 << 4))
{
part = scroll_bar_handle;
whole = gtk_adjustment_get_upper (adj) -
a.event_mask = (ButtonPressMask | ButtonReleaseMask
| ButtonMotionMask | PointerMotionHintMask
| ExposureMask);
- a.cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
+ a.cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
mask = (CWBackPixel | CWEventMask | CWCursor);
emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
emacs_event->code = event->xbutton.button - Button1;
emacs_event->modifiers
- = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO
+ = (x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO
(XFRAME (WINDOW_FRAME (XWINDOW (bar->window)))),
event->xbutton.state)
| (event->type == ButtonRelease
f->top_pos = y;
/* Perhaps reparented due to a WM restart. Reset this. */
- FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN;
- FRAME_X_DISPLAY_INFO (f)->net_supported_window = 0;
+ FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN;
+ FRAME_DISPLAY_INFO (f)->net_supported_window = 0;
x_set_frame_alpha (f);
}
#endif
event.xkey.state
- |= x_emacs_to_x_modifiers (FRAME_X_DISPLAY_INFO (f),
+ |= x_emacs_to_x_modifiers (FRAME_DISPLAY_INFO (f),
extra_keyboard_modifiers);
modifiers = event.xkey.state;
/* Common for all keysym input events. */
XSETFRAME (inev.ie.frame_or_window, f);
inev.ie.modifiers
- = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), modifiers);
+ = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), modifiers);
inev.ie.timestamp = event.xkey.time;
/* First deal with keysyms which have defined
x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Display *dpy = FRAME_X_DISPLAY (f);
int x, y, wd, h;
XGCValues xgcv;
{
Display *dpy = FRAME_X_DISPLAY (f);
Window window = FRAME_X_WINDOW (f);
- GC gc = FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc;
+ GC gc = FRAME_DISPLAY_INFO (f)->scratch_cursor_gc;
unsigned long mask = GCForeground | GCBackground | GCGraphicsExposures;
struct face *face = FACE_FROM_ID (f, cursor_glyph->face_id);
XGCValues xgcv;
else
{
gc = XCreateGC (dpy, window, mask, &xgcv);
- FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc = gc;
+ FRAME_DISPLAY_INFO (f)->scratch_cursor_gc = gc;
}
x_clip_to_row (w, row, TEXT_AREA, gc);
else
{
/* Create the GNU bitmap and mask if necessary. */
- if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0)
+ if (FRAME_DISPLAY_INFO (f)->icon_bitmap_id < 0)
{
ptrdiff_t rc = -1;
rc = x_create_bitmap_from_xpm_data (f, gnu_xpm_bits);
if (rc != -1)
- FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = rc;
+ FRAME_DISPLAY_INFO (f)->icon_bitmap_id = rc;
#endif
if (rc == -1)
return 1;
- FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = rc;
- x_create_bitmap_mask (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id);
+ FRAME_DISPLAY_INFO (f)->icon_bitmap_id = rc;
+ x_create_bitmap_mask (f, FRAME_DISPLAY_INFO (f)->icon_bitmap_id);
}
}
this increments the ref-count one extra time.
As a result, the GNU bitmap and mask are never freed.
That way, we don't have to worry about allocating it again. */
- x_reference_bitmap (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id);
+ x_reference_bitmap (f, FRAME_DISPLAY_INFO (f)->icon_bitmap_id);
- bitmap_id = FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id;
+ bitmap_id = FRAME_DISPLAY_INFO (f)->icon_bitmap_id;
}
x_wm_set_icon_pixmap (f, bitmap_id);
if (FRAME_X_P (XFRAME (frame))
&& FRAME_X_P (XFRAME (minibuf_frame))
&& ! EQ (frame, minibuf_frame)
- && FRAME_X_DISPLAY_INFO (XFRAME (minibuf_frame)) == dpyinfo)
+ && FRAME_DISPLAY_INFO (XFRAME (minibuf_frame)) == dpyinfo)
delete_frame (frame, Qnoelisp);
}
for another frame that we need to delete. */
FOR_EACH_FRAME (tail, frame)
if (FRAME_X_P (XFRAME (frame))
- && FRAME_X_DISPLAY_INFO (XFRAME (frame)) == dpyinfo)
+ && FRAME_DISPLAY_INFO (XFRAME (frame)) == dpyinfo)
{
/* Set this to t so that delete_frame won't get confused
trying to find a replacement. */
FOR_EACH_FRAME (tail, frame)
{
struct frame *f = XFRAME (frame);
- if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo)
+ if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo)
{
FRAME_XIC (f) = NULL;
xic_free_xfontset (f);
struct frame *f = XFRAME (frame);
if (FRAME_X_P (f)
- && FRAME_X_DISPLAY_INFO (f) == xim_inst->dpyinfo)
+ && FRAME_DISPLAY_INFO (f) == xim_inst->dpyinfo)
if (FRAME_XIC (f) == NULL)
{
create_frame_xic (f);
/* Treat negative positions as relative to the leftmost bottommost
position that fits on the screen. */
if (flags & XNegative)
- f->left_pos = x_display_pixel_width (FRAME_X_DISPLAY_INFO (f))
+ f->left_pos = x_display_pixel_width (FRAME_DISPLAY_INFO (f))
- FRAME_PIXEL_WIDTH (f) + f->left_pos;
{
#endif
if (flags & YNegative)
- f->top_pos = x_display_pixel_height (FRAME_X_DISPLAY_INFO (f))
+ f->top_pos = x_display_pixel_height (FRAME_DISPLAY_INFO (f))
- height + f->top_pos;
}
modified_left = f->left_pos;
modified_top = f->top_pos;
- if (change_gravity != 0 && FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A)
+ if (change_gravity != 0 && FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A)
{
/* Some WMs (twm, wmaker at least) has an offset that is smaller
than the WM decorations. So we use the calculated offset instead
modified_left, modified_top);
x_sync_with_move (f, f->left_pos, f->top_pos,
- FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN
+ FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN
? 1 : 0);
/* change_gravity is non-zero when this function is called from Lisp to
need to compute the top/left offset adjustment for this frame. */
if (change_gravity != 0 &&
- (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN
- || (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A
+ (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN
+ || (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A
&& (FRAME_X_OUTPUT (f)->move_offset_left == 0
&& FRAME_X_OUTPUT (f)->move_offset_top == 0))))
x_check_expected_move (f, modified_left, modified_top);
unsigned long actual_size, bytes_remaining;
int i, rc, actual_format;
Window wmcheck_window;
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Window target_window = dpyinfo->root_window;
long max_len = 65536;
Display *dpy = FRAME_X_DISPLAY (f);
static void
set_wm_state (Lisp_Object frame, int add, Atom atom, Atom value)
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (frame));
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (XFRAME (frame));
x_send_client_event (frame, make_number (0), frame,
dpyinfo->Xatom_net_wm_state,
x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
{
Lisp_Object frame;
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
XSETFRAME (frame, f);
Atom actual_type;
unsigned long actual_size, bytes_remaining;
int i, rc, actual_format, is_hidden = 0;
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
long max_len = 65536;
Display *dpy = FRAME_X_DISPLAY (f);
unsigned char *tmp_data = NULL;
static int
do_ewmh_fullscreen (struct frame *f)
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state);
int cur, dummy;
if (do_ewmh_fullscreen (f))
return;
- if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window)
+ if (f->output_data.x->parent_desc != FRAME_DISPLAY_INFO (f)->root_window)
return; /* Only fullscreen without WM or with EWM hints (above). */
/* Setting fullscreen to nil doesn't do anything. We could save the
if (f->want_fullscreen != FULLSCREEN_NONE)
{
int width = FRAME_PIXEL_WIDTH (f), height = FRAME_PIXEL_HEIGHT (f);
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
switch (f->want_fullscreen)
{
int adjusted_left;
int adjusted_top;
- FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A;
+ FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A;
FRAME_X_OUTPUT (f)->move_offset_left = expected_left - current_left;
FRAME_X_OUTPUT (f)->move_offset_top = expected_top - current_top;
/* It's a "Type B" window manager. We don't have to adjust the
frame's position. */
- FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B;
+ FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B;
}
/* See Window Manager Specification/Extended Window Manager Hints at
http://freedesktop.org/wiki/Specifications/wm-spec */
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
if (FRAME_VISIBLE_P (f) && wm_supports (f, dpyinfo->Xatom_net_active_window))
{
xembed_set_info (struct frame *f, enum xembed_info flags)
{
unsigned long data[2];
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
data[0] = XEMBED_VERSION;
data[1] = flags;
event.xclient.type = ClientMessage;
event.xclient.window = FRAME_X_OUTPUT (f)->parent_desc;
- event.xclient.message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_XEMBED;
+ event.xclient.message_type = FRAME_DISPLAY_INFO (f)->Xatom_XEMBED;
event.xclient.format = 32;
event.xclient.data.l[0] = t;
event.xclient.data.l[1] = msg;
window = FRAME_OUTER_WINDOW (f);
/* Don't keep the highlight on an invisible frame. */
- if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f)
- FRAME_X_DISPLAY_INFO (f)->x_highlight_frame = 0;
+ if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
+ FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
block_input ();
Lisp_Object type;
/* Don't keep the highlight on an invisible frame. */
- if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f)
- FRAME_X_DISPLAY_INFO (f)->x_highlight_frame = 0;
+ if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
+ FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
if (FRAME_ICONIFIED_P (f))
return;
msg.xclient.window = FRAME_X_WINDOW (f);
msg.xclient.type = ClientMessage;
- msg.xclient.message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_change_state;
+ msg.xclient.message_type = FRAME_DISPLAY_INFO (f)->Xatom_wm_change_state;
msg.xclient.format = 32;
msg.xclient.data.l[0] = IconicState;
void
x_free_frame_resources (struct frame *f)
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight;
#ifdef USE_X_TOOLKIT
Lisp_Object bar;
static void
x_destroy_window (struct frame *f)
{
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
/* If a display connection is dead, don't try sending more
commands to the X server. */
size_hints.width_inc = FRAME_COLUMN_WIDTH (f);
size_hints.height_inc = FRAME_LINE_HEIGHT (f);
- size_hints.max_width = x_display_pixel_width (FRAME_X_DISPLAY_INFO (f))
+ size_hints.max_width = x_display_pixel_width (FRAME_DISPLAY_INFO (f))
- FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
- size_hints.max_height = x_display_pixel_height (FRAME_X_DISPLAY_INFO (f))
+ size_hints.max_height = x_display_pixel_height (FRAME_DISPLAY_INFO (f))
- FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0);
/* Calculate the base and minimum sizes. */
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset)
/* This gives the x_display_info structure for the display F is on. */
-#define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info)
+#define FRAME_DISPLAY_INFO(f) ((f)->output_data.x->display_info)
/* This is the `Display *' which frame F is on. */
-#define FRAME_X_DISPLAY(f) (FRAME_X_DISPLAY_INFO (f)->display)
+#define FRAME_X_DISPLAY(f) (FRAME_DISPLAY_INFO (f)->display)
/* This is the `Screen *' which frame F is on. */
-#define FRAME_X_SCREEN(f) (FRAME_X_DISPLAY_INFO (f)->screen)
+#define FRAME_X_SCREEN(f) (FRAME_DISPLAY_INFO (f)->screen)
#define FRAME_X_SCREEN_NUMBER(f) XScreenNumberOfScreen (FRAME_X_SCREEN (f))
/* This is the Visual which frame F is on. */
-#define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual
+#define FRAME_X_VISUAL(f) FRAME_DISPLAY_INFO (f)->visual
/* This is the Colormap which frame F uses. */
-#define FRAME_X_COLORMAP(f) FRAME_X_DISPLAY_INFO (f)->cmap
+#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)
#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_X_XIM(f) (FRAME_DISPLAY_INFO (f)->xim)
+#define FRAME_X_XIM_STYLES(f) (FRAME_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. */
#define FRAME_SMALLEST_CHAR_WIDTH(F) \
- FRAME_X_DISPLAY_INFO(F)->smallest_char_width
+ FRAME_DISPLAY_INFO(F)->smallest_char_width
/* Value is the smallest height of any font on frame F. */
#define FRAME_SMALLEST_FONT_HEIGHT(F) \
- FRAME_X_DISPLAY_INFO(F)->smallest_font_height
+ FRAME_DISPLAY_INFO(F)->smallest_font_height
\f
/* X-specific scroll bar stuff. */