static int any_help_event_p;
-/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
-static Lisp_Object last_window;
-
extern unsigned int msh_mousewheel;
extern void free_frame_menubar (struct frame *);
static void w32_initialize (void);
static void x_update_end (struct frame *);
static void w32_frame_up_to_date (struct frame *);
-static void w32_set_terminal_modes (struct terminal *);
-static void w32_reset_terminal_modes (struct terminal *);
static void x_clear_frame (struct frame *);
static void frame_highlight (struct frame *);
static void frame_unhighlight (struct frame *);
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;
fringe_bmp[which] = 0;
}
-
-\f
-/* This is called when starting Emacs and when restarting after
- suspend. When starting Emacs, no window is mapped. And nothing
- must be done to Emacs's own window if it is suspended (though that
- rarely happens). */
-
-static void
-w32_set_terminal_modes (struct terminal *term)
-{
-}
-
-/* This is called when exiting or suspending Emacs. Exiting will make
- the W32 windows go away, and suspending requires no action. */
-
-static void
-w32_reset_terminal_modes (struct terminal *term)
-{
-}
-
-
-\f
/***********************************************************************
Display Iterator
***********************************************************************/
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)? */
unblock_input ();
}
-\f
-/* Specify how many text lines, from the top of the window,
- should be affected by insert-lines and delete-lines operations.
- This, and those operations, are used only within an update
- that is bounded by calls to x_update_begin and x_update_end. */
-
-static void
-w32_set_terminal_window (struct frame *f, int n)
-{
- /* This function intentionally left blank. */
-}
-
-\f
/***********************************************************************
Line Dance
***********************************************************************/
{
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));
}
/* Generate SELECT_WINDOW_EVENTs when needed. */
if (!NILP (Vmouse_autoselect_window))
{
- Lisp_Object window;
- int x = LOWORD (msg.msg.lParam);
- int y = HIWORD (msg.msg.lParam);
-
- window = window_from_coordinates (f, x, y, 0, 0);
+ static Lisp_Object last_mouse_window;
+ Lisp_Object window = window_from_coordinates
+ (f, LOWORD (msg.msg.lParam), HIWORD (msg.msg.lParam), 0, 0);
/* Window will be selected only when it is not
selected now and last mouse movement event was
not in it. Minibuffer window will be selected
only when it is active. */
if (WINDOWP (window)
- && !EQ (window, last_window)
+ && !EQ (window, last_mouse_window)
&& !EQ (window, selected_window)
/* For click-to-focus window managers
create event iff we don't leave the
inev.kind = SELECT_WINDOW_EVENT;
inev.frame_or_window = window;
}
-
- last_window = window;
+ /* Remember the last window where we saw the mouse. */
+ last_mouse_window = window;
}
if (!note_mouse_movement (f, &msg.msg))
help_echo_string = previous_help_echo_string;
/* 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--;
return buffer;
}
-void
-x_flush (struct frame * f)
-{ /* Nothing to do */ }
-
-
extern frame_parm_handler w32_frame_parm_handlers[];
static struct redisplay_interface w32_redisplay_interface =
x_after_update_window_line,
x_update_window_begin,
x_update_window_end,
- x_flush,
- 0, /* flush_display_optional */
+ 0, /* flush_display */
x_clear_window_mouse_face,
x_get_glyph_overhangs,
x_fix_overlapping_area,
terminal->ins_del_lines_hook = x_ins_del_lines;
terminal->delete_glyphs_hook = x_delete_glyphs;
terminal->ring_bell_hook = w32_ring_bell;
- terminal->reset_terminal_modes_hook = w32_reset_terminal_modes;
- terminal->set_terminal_modes_hook = w32_set_terminal_modes;
+ terminal->reset_terminal_modes_hook = NULL;
+ terminal->set_terminal_modes_hook = NULL;
terminal->update_begin_hook = x_update_begin;
terminal->update_end_hook = x_update_end;
- terminal->set_terminal_window_hook = w32_set_terminal_window;
+ terminal->set_terminal_window_hook = NULL;
terminal->read_socket_hook = w32_read_socket;
terminal->frame_up_to_date_hook = w32_frame_up_to_date;
terminal->mouse_position_hook = w32_mouse_position;
terminal like X does. */
terminal->kboard = xmalloc (sizeof (KBOARD));
init_kboard (terminal->kboard);
- kset_window_system (terminal->kboard, intern ("w32"));
+ kset_window_system (terminal->kboard, Qw32);
terminal->kboard->next_kboard = all_kboards;
all_kboards = terminal->kboard;
/* Don't let the initial kboard remain current longer than necessary.
staticpro (&last_mouse_motion_frame);
last_mouse_motion_frame = Qnil;
- Fprovide (intern_c_string ("w32"), Qnil);
+ /* Tell Emacs about this window system. */
+ Fprovide (Qw32, Qnil);
}