summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2014-03-09 22:49:56 +0000
committerChristopher Faylor <me@cgf.cx>2014-03-09 22:49:56 +0000
commitdc5694dc883799b7b28a5fbe8b0ab3439a124e94 (patch)
tree170f375a8a5f36f5edb138d36fcd5add6277fa34 /winsup/cygwin/fhandler.h
parentbc7c78b225a2b0195c02135d75d5f014b70c9426 (diff)
downloadcygnal-dc5694dc883799b7b28a5fbe8b0ab3439a124e94.tar.gz
cygnal-dc5694dc883799b7b28a5fbe8b0ab3439a124e94.tar.bz2
cygnal-dc5694dc883799b7b28a5fbe8b0ab3439a124e94.zip
* fhandler.h (fhandler_console::dwBufferSize): Delete.
(fhandler_console::dwCursorPosition): Ditto. (fhandler_console::wAttributes): Ditto. (fhandler_console::b): New field encompassing previously disparate screen buffer info. (fhandler_console::save_bufsize): Rename from savebufsiz (fhandler_console::save_buf): Rename sfrom savebuf. (fhandler_console::save_cursor): New field. (fhandler_console::save_restore): New function. (fhandler_console::con): Rename from dev_state. (fhandler_console::focus_aware): Accommodate name change. * fhandler_console.cc: Use 'b' field of dev_console throughout instead of disparate names. Accommodate dev_state -> con rename. (dev_state:save_restore): New function. Attempt to save the entire screen buffer rather than just the visible part. Clear the buffer when saving, like Linux. (fhandler_console::char_command): Use con.save_restore() for Save/restore screen sequence.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r--winsup/cygwin/fhandler.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index f908ddb50..6d9a1b7e7 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -1287,23 +1287,22 @@ class dev_console
/* saved cursor coordinates */
int savex, savey;
- /* saved screen */
- COORD savebufsiz;
- PCHAR_INFO savebuf;
struct
{
- short Top, Bottom;
+ short Top;
+ short Bottom;
} scroll_region;
- SHORT winTop;
- SHORT winBottom;
+ CONSOLE_SCREEN_BUFFER_INFOEX b;
COORD dwWinSize;
- COORD dwBufferSize;
- COORD dwCursorPosition;
- WORD wAttributes;
COORD dwEnd;
+ /* saved screen */
+ COORD save_bufsize;
+ PCHAR_INFO save_buf;
+ COORD save_cursor;
+
COORD dwLastCursorPosition;
COORD dwMousePosition; /* scroll-adjusted coord of mouse event */
COORD dwLastMousePosition; /* scroll-adjusted coord of previous mouse event */
@@ -1330,6 +1329,7 @@ class dev_console
bool __reg3 scroll_window (HANDLE, int, int, int, int);
void __reg3 scroll_buffer (HANDLE, int, int, int, int, int, int);
void __reg3 clear_screen (HANDLE, int, int, int, int);
+ void __reg3 save_restore (HANDLE, char);
friend class fhandler_console;
};
@@ -1341,7 +1341,7 @@ public:
struct console_state
{
tty_min tty_min_state;
- dev_console dev_state;
+ dev_console con;
};
private:
static const unsigned MAX_WRITE_CHARS;
@@ -1413,7 +1413,7 @@ private:
int ioctl (unsigned int cmd, void *);
int init (HANDLE, DWORD, mode_t);
bool mouse_aware (MOUSE_EVENT_RECORD& mouse_event);
- bool focus_aware () {return shared_console_info->dev_state.use_focus;}
+ bool focus_aware () {return shared_console_info->con.use_focus;}
select_record *select_read (select_stuff *);
select_record *select_write (select_stuff *);