* fhandler.h: Update copyright.

(cltype): New enum.
(dev_console::console_attrs): Define struct name.
(dev_console::console_attrs::set_cl_x): New function.
(dev_console::console_attrs::set_cl_y): New function.
(fhandler_console::clear_screen): Redefine input params.
* fhandler_console.cc: Update copyright.  Throughout, reflect change in
arguments to fhandler_console::clear_screeen.
(fhandler_console::mouse_aware): Simplify logic slightly.
(fhandler_console::scroll_screen): Remove hopefully obsolete win95 code.
(dev_console::console_attrs::set_cl_x): New function.
(dev_console::console_attrs::set_cl_y): New function.
(fhandler_console::clear_screen): Redefine input params.  Calculate position
based on enum value.
(region_split): Change arguments.  Simplify.
(ReadConsoleOutputWrapper): Remove coord argument since we now always use 0, 0.
Send extra arguments to region_split.
This commit is contained in:
Christopher Faylor
2014-01-04 23:58:32 +00:00
parent 1affdef86f
commit 36383c6f6e
5 changed files with 2214 additions and 2185 deletions

View File

@@ -1,7 +1,7 @@
/* fhandler.h
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
This file is part of Cygwin.
@@ -1246,6 +1246,13 @@ enum ansi_intensity
#define gotrparen 9
#define MAXARGS 10
enum cltype
{
cl_curr_pos = 1,
cl_disp_beg,
cl_disp_end
};
class dev_console
{
WORD default_color, underline_color, dim_color;
@@ -1286,7 +1293,7 @@ class dev_console
{
short Top, Bottom;
} scroll_region;
struct
struct console_attrs
{
SHORT winTop;
SHORT winBottom;
@@ -1294,6 +1301,8 @@ class dev_console
COORD dwBufferSize;
COORD dwCursorPosition;
WORD wAttributes;
int set_cl_x (cltype);
int set_cl_y (cltype);
} info;
COORD dwLastCursorPosition;
@@ -1346,7 +1355,7 @@ private:
/* Output calls */
void set_default_attr ();
void clear_screen (int, int, int, int);
void clear_screen (cltype, cltype, cltype, cltype);
void scroll_screen (int, int, int, int, int, int);
void cursor_set (bool, int, int);
void cursor_get (int *, int *);