/* Graphical user interface functions for the Microsoft Windows API.
-Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc.
+Copyright (C) 1989, 1992-2013 Free Software Foundation, Inc.
This file is part of GNU Emacs.
void globals_of_w32fns (void);
extern void free_frame_menubar (struct frame *);
-extern double atof (const char *);
extern int w32_console_toggle_lock_key (int, Lisp_Object);
extern void w32_menu_display_help (HWND, HMENU, UINT, UINT);
extern void w32_free_menu_strings (HWND);
/* This gives us version, build, and platform identification. */
OSVERSIONINFO osinfo_cache;
-unsigned long syspage_mask = 0;
+DWORD_PTR syspage_mask = 0;
/* The major and minor versions of NT. */
int w32_major_version;
static BOOL
w32_init_class (HINSTANCE hinst)
{
-
if (w32_unicode_gui)
{
WNDCLASSW uwc;
return retval;
}
+ case WM_EMACS_FILENOTIFY:
+ my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
+ return 1;
default:
/* Check for messages registered at runtime. */
return FRAME_PIXEL_HEIGHT (f);
}
-int
-x_char_width (register struct frame *f)
-{
- return FRAME_COLUMN_WIDTH (f);
-}
-
-int
-x_char_height (register struct frame *f)
-{
- return FRAME_LINE_HEIGHT (f);
-}
-
int
x_screen_planes (register struct frame *f)
{
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
/* Let redisplay know that we have made the frame visible already. */
- f->async_visible = 1;
+ SET_FRAME_VISIBLE (f, 1);
ShowWindow (FRAME_W32_WINDOW (f), SW_SHOWNOACTIVATE);
}
read-only when "Directories" is selected in the filter. This
allows us to work around the fact that the standard Open File
dialog does not support directories. */
-static UINT CALLBACK
+static UINT_PTR CALLBACK
file_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if (msg == WM_NOTIFY)
/* we get one of the two final 0 bytes for free. */
1 + sizeof (wchar_t) * wcslen (filename_buf)));
#else /* !NTGUI_UNICODE */
- dostounix_filename (filename_buf);
+ dostounix_filename (filename_buf, 0);
filename = DECODE_FILE (build_string (filename_buf));
#endif /* NTGUI_UNICODE */
CHECK_VECTOR (key);
- if (XFASTINT (Flength (key)) != 1)
+ if (ASIZE (key) != 1)
return Qnil;
GCPRO1 (key);
- c = Faref (key, make_number (0));
+ c = AREF (key, 0);
if (CONSP (c) && lucid_event_type_list_p (c))
c = Fevent_convert_list (c);
DWORD data;
} version;
+ /* Cache the module handle of Emacs itself. */
+ hinst = GetModuleHandle (NULL);
+
/* Cache the version of the operating system. */
version.data = GetVersion ();
w32_major_version = version.info.major;
/* Cache page size, allocation unit, processor type, etc. */
GetSystemInfo (&sysinfo_cache);
- syspage_mask = sysinfo_cache.dwPageSize - 1;
+ syspage_mask = (DWORD_PTR)sysinfo_cache.dwPageSize - 1;
/* Cache os info. */
osinfo_cache.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
/* stack[] gives the return addresses, whereas we want
the address of the call, so decrease each address
by approximate size of 1 CALL instruction. */
- sprintf (buf, "0x%p\r\n", stack[j] - sizeof(void *));
+ sprintf (buf, "0x%p\r\n", (char *)stack[j] - sizeof(void *));
if (stderr_fd >= 0)
write (stderr_fd, buf, strlen (buf));
if (errfile_fd >= 0)