53 |
#include <ctype.h> |
#include <ctype.h> |
54 |
|
|
55 |
extern void free_frame_menubar (); |
extern void free_frame_menubar (); |
56 |
extern void x_compute_fringe_widths (struct frame *, int); |
extern void x_compute_fringe_widths P_ ((struct frame *, int)); |
57 |
extern double atof (); |
extern double atof (); |
58 |
extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state); |
extern int w32_console_toggle_lock_key P_ ((int, Lisp_Object)); |
59 |
extern void w32_menu_display_help (HWND owner, HMENU menu, UINT menu_item, UINT flags); |
extern void w32_menu_display_help P_ ((HWND, HMENU, UINT, UINT)); |
60 |
|
extern void w32_free_menu_strings P_ ((HWND)); |
61 |
|
|
62 |
extern int quit_char; |
extern int quit_char; |
63 |
|
|
64 |
/* A definition of XColor for non-X frames. */ |
/* A definition of XColor for non-X frames. */ |
282 |
static W32Msg saved_mouse_move_msg; |
static W32Msg saved_mouse_move_msg; |
283 |
static unsigned mouse_move_timer; |
static unsigned mouse_move_timer; |
284 |
|
|
285 |
|
/* Window that is tracking the mouse. */ |
286 |
|
static HWND track_mouse_window; |
287 |
|
FARPROC track_mouse_event_fn; |
288 |
|
|
289 |
/* W95 mousewheel handler */ |
/* W95 mousewheel handler */ |
290 |
unsigned int msh_mousewheel = 0; |
unsigned int msh_mousewheel = 0; |
291 |
|
|
4587 |
my_post_msg (&wmsg, hwnd, msg, wParam, lParam); |
my_post_msg (&wmsg, hwnd, msg, wParam, lParam); |
4588 |
return 0; |
return 0; |
4589 |
|
|
|
case WM_VSCROLL: |
|
4590 |
case WM_MOUSEMOVE: |
case WM_MOUSEMOVE: |
4591 |
|
/* If the mouse has just moved into the frame, start tracking |
4592 |
|
it, so we will be notified when it leaves the frame. Mouse |
4593 |
|
tracking only works under W98 and NT4 and later. On earlier |
4594 |
|
versions, there is no way of telling when the mouse leaves the |
4595 |
|
frame, so we just have to put up with help-echo and mouse |
4596 |
|
highlighting remaining while the frame is not active. */ |
4597 |
|
if (track_mouse_event_fn && !track_mouse_window) |
4598 |
|
{ |
4599 |
|
TRACKMOUSEEVENT tme; |
4600 |
|
tme.cbSize = sizeof (tme); |
4601 |
|
tme.dwFlags = TME_LEAVE; |
4602 |
|
tme.hwndTrack = hwnd; |
4603 |
|
|
4604 |
|
track_mouse_event_fn (&tme); |
4605 |
|
track_mouse_window = hwnd; |
4606 |
|
} |
4607 |
|
case WM_VSCROLL: |
4608 |
if (XINT (Vw32_mouse_move_interval) <= 0 |
if (XINT (Vw32_mouse_move_interval) <= 0 |
4609 |
|| (msg == WM_MOUSEMOVE && button_state == 0)) |
|| (msg == WM_MOUSEMOVE && button_state == 0)) |
4610 |
{ |
{ |
4720 |
case WM_EXITMENULOOP: |
case WM_EXITMENULOOP: |
4721 |
f = x_window_to_frame (dpyinfo, hwnd); |
f = x_window_to_frame (dpyinfo, hwnd); |
4722 |
|
|
4723 |
|
/* Free memory used by owner-drawn and help-echo strings. */ |
4724 |
|
w32_free_menu_strings (hwnd); |
4725 |
|
|
4726 |
/* Indicate that menubar can be modified again. */ |
/* Indicate that menubar can be modified again. */ |
4727 |
if (f) |
if (f) |
4728 |
f->output_data.w32->menubar_active = 0; |
f->output_data.w32->menubar_active = 0; |
4833 |
goto dflt; |
goto dflt; |
4834 |
#endif |
#endif |
4835 |
|
|
4836 |
|
case WM_MOUSELEAVE: |
4837 |
|
/* No longer tracking mouse. */ |
4838 |
|
track_mouse_window = NULL; |
4839 |
|
|
4840 |
case WM_ACTIVATEAPP: |
case WM_ACTIVATEAPP: |
4841 |
case WM_ACTIVATE: |
case WM_ACTIVATE: |
4842 |
case WM_WINDOWPOSCHANGED: |
case WM_WINDOWPOSCHANGED: |
8427 |
struct image *img; |
struct image *img; |
8428 |
int pixmap_p, mask_p, colors_p; |
int pixmap_p, mask_p, colors_p; |
8429 |
{ |
{ |
8430 |
#if 0 |
#if 0 /* TODO: W32 image support */ |
8431 |
if (pixmap_p && img->pixmap) |
if (pixmap_p && img->pixmap) |
8432 |
{ |
{ |
8433 |
XFreePixmap (FRAME_X_DISPLAY (f), img->pixmap); |
XFreePixmap (FRAME_X_DISPLAY (f), img->pixmap); |
13158 |
|
|
13159 |
frame = Qnil; |
frame = Qnil; |
13160 |
GCPRO3 (parms, name, frame); |
GCPRO3 (parms, name, frame); |
13161 |
f = make_frame (1); |
/* Make a frame without minibuffer nor mode-line. */ |
13162 |
|
f = make_frame (0); |
13163 |
|
f->wants_modeline = 0; |
13164 |
XSETFRAME (frame, f); |
XSETFRAME (frame, f); |
13165 |
|
|
13166 |
buffer = Fget_buffer_create (build_string (" *tip*")); |
buffer = Fget_buffer_create (build_string (" *tip*")); |
13287 |
|
|
13288 |
f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED; |
f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED; |
13289 |
f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; |
f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; |
13290 |
|
|
13291 |
window_prompting = x_figure_window_size (f, parms); |
window_prompting = x_figure_window_size (f, parms); |
13292 |
|
|
13293 |
|
/* No fringes on tip frame. */ |
13294 |
|
f->output_data.w32->fringes_extra = 0; |
13295 |
|
f->output_data.w32->fringe_cols = 0; |
13296 |
|
f->output_data.w32->left_fringe_width = 0; |
13297 |
|
f->output_data.w32->right_fringe_width = 0; |
13298 |
|
|
13299 |
if (window_prompting & XNegative) |
if (window_prompting & XNegative) |
13300 |
{ |
{ |
13301 |
if (window_prompting & YNegative) |
if (window_prompting & YNegative) |
14256 |
void |
void |
14257 |
syms_of_w32fns () |
syms_of_w32fns () |
14258 |
{ |
{ |
14259 |
|
HMODULE user32_lib = GetModuleHandle ("user32.dll"); |
14260 |
|
|
14261 |
/* This is zero if not using MS-Windows. */ |
/* This is zero if not using MS-Windows. */ |
14262 |
w32_in_use = 0; |
w32_in_use = 0; |
14263 |
|
|
14264 |
|
/* TrackMouseEvent not available in all versions of Windows, so must load |
14265 |
|
it dynamically. Do it once, here, instead of every time it is used. */ |
14266 |
|
track_mouse_event_fn = GetProcAddress (user32_lib, "TrackMouseEvent"); |
14267 |
|
track_mouse_window = NULL; |
14268 |
|
|
14269 |
/* The section below is built by the lisp expression at the top of the file, |
/* The section below is built by the lisp expression at the top of the file, |
14270 |
just above where these variables are declared. */ |
just above where these variables are declared. */ |
14271 |
/*&&& init symbols here &&&*/ |
/*&&& init symbols here &&&*/ |