X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/adf2fc4a01efe77d73cd52bc9173914ed56ff531..9ab3ce4d2f1c6409d36072192bfce797ec189837:/src/w32console.c diff --git a/src/w32console.c b/src/w32console.c index 8da1ccf189..285abb310f 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -62,6 +62,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 +96,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) @@ -552,6 +569,21 @@ Wcm_clear (struct tty_display_info *tty) } +/* Report the current cursor position. The following two functions + are used in term.c's tty menu code, so they are not really + "stubs". */ +int +cursorX (struct tty_display_info *tty) +{ + return cursor_coords.X; +} + +int +cursorY (struct tty_display_info *tty) +{ + return cursor_coords.Y; +} + /*********************************************************************** Faces ***********************************************************************/ @@ -598,7 +630,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;