use guile conses
[bpt/emacs.git] / src / w32console.c
index cb42bae..2fbc190 100644 (file)
@@ -1,5 +1,5 @@
 /* Terminal hooks for GNU Emacs on the Microsoft Windows API.
-   Copyright (C) 1992, 1999, 2001-2013 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1999, 2001-2014 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -36,8 +36,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "termhooks.h"
 #include "termchar.h"
 #include "dispextern.h"
+#include "menu.h"      /* for tty_menu_show */
 #include "w32term.h"
-#include "w32common.h" /* for os_subtype */
+#include "w32common.h" /* for os_subtype */
 #include "w32inevt.h"
 
 /* from window.c */
@@ -62,6 +63,7 @@ static HANDLE prev_screen, cur_screen;
 static WORD    char_attr_normal;
 static DWORD   prev_console_mode;
 
+static CONSOLE_CURSOR_INFO console_cursor_info;
 #ifndef USE_SEPARATE_SCREEN
 static CONSOLE_CURSOR_INFO prev_console_cursor;
 #endif
@@ -95,6 +97,22 @@ w32con_move_cursor (struct frame *f, int row, int col)
   SetConsoleCursorPosition (cur_screen, cursor_coords);
 }
 
+void
+w32con_hide_cursor (void)
+{
+  GetConsoleCursorInfo (cur_screen, &console_cursor_info);
+  console_cursor_info.bVisible = FALSE;
+  SetConsoleCursorInfo (cur_screen, &console_cursor_info);
+}
+
+void
+w32con_show_cursor (void)
+{
+  GetConsoleCursorInfo (cur_screen, &console_cursor_info);
+  console_cursor_info.bVisible = TRUE;
+  SetConsoleCursorInfo (cur_screen, &console_cursor_info);
+}
+
 /* Clear from cursor to end of screen.  */
 static void
 w32con_clear_to_end (struct frame *f)
@@ -613,7 +631,6 @@ void
 initialize_w32_display (struct terminal *term, int *width, int *height)
 {
   CONSOLE_SCREEN_BUFFER_INFO   info;
-  Mouse_HLInfo *hlinfo;
 
   term->rif = 0; /* No window based redisplay on the console.  */
   term->cursor_to_hook         = w32con_move_cursor;
@@ -634,6 +651,7 @@ initialize_w32_display (struct terminal *term, int *width, int *height)
 
   term->read_socket_hook = w32_console_read_socket;
   term->mouse_position_hook = w32_console_mouse_position;
+  term->menu_show_hook = tty_menu_show;
 
   /* The following are not used on the console.  */
   term->frame_rehighlight_hook = 0;