/* Terminal hooks for GNU Emacs on the Microsoft Windows API.
- Copyright (C) 1992, 1999, 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1999, 2001-2013 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include "termchar.h"
#include "dispextern.h"
#include "w32term.h"
-#include "w32heap.h" /* for os_subtype */
+#include "w32common.h" /* for os_subtype */
#include "w32inevt.h"
/* from window.c */
}
void
-initialize_w32_display (struct terminal *term)
+initialize_w32_display (struct terminal *term, int *width, int *height)
{
CONSOLE_SCREEN_BUFFER_INFO info;
Mouse_HLInfo *hlinfo;
|| info.srWindow.Right - info.srWindow.Left < 40
|| info.srWindow.Right - info.srWindow.Left > 100)))
{
- FRAME_LINES (SELECTED_FRAME ()) = 25;
- SET_FRAME_COLS (SELECTED_FRAME (), 80);
+ *height = 25;
+ *width = 80;
}
else if (w32_use_full_screen_buffer)
{
- FRAME_LINES (SELECTED_FRAME ()) = info.dwSize.Y; /* lines per page */
- SET_FRAME_COLS (SELECTED_FRAME (), info.dwSize.X); /* characters per line */
+ *height = info.dwSize.Y; /* lines per page */
+ *width = info.dwSize.X; /* characters per line */
}
else
{
/* Lines per page. Use buffer coords instead of buffer size. */
- FRAME_LINES (SELECTED_FRAME ()) = 1 + info.srWindow.Bottom -
- info.srWindow.Top;
+ *height = 1 + info.srWindow.Bottom - info.srWindow.Top;
/* Characters per line. Use buffer coords instead of buffer size. */
- SET_FRAME_COLS (SELECTED_FRAME (), 1 + info.srWindow.Right -
- info.srWindow.Left);
+ *width = 1 + info.srWindow.Right - info.srWindow.Left;
}
if (os_subtype == OS_NT)
else
w32_console_unicode_input = 0;
+ /* This is needed by w32notify.c:send_notifications. */
+ dwMainThreadId = GetCurrentThreadId ();
+
/* Setup w32_display_info structure for this frame. */
w32_initialize_display_info (build_string ("Console"));