2019 |
mateusz.vi |
1 |
/****************************************************************************
|
|
|
2 |
|
|
|
3 |
Win32 For DOS compatibility API, console functions.
|
|
|
4 |
|
|
|
5 |
Written by: Kenneth J. Davis
|
|
|
6 |
Date: May, 2004
|
|
|
7 |
Contact: jeremyd@computer.org
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
Copyright (c): Public Domain [United States Definition]
|
|
|
11 |
|
|
|
12 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
13 |
of this software and associated documentation files (the "Software"), to deal
|
|
|
14 |
in the Software without restriction, including without limitation the rights
|
|
|
15 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
16 |
copies of the Software, and to permit persons to whom the Software is
|
|
|
17 |
furnished to do so, subject to the following conditions:
|
|
|
18 |
|
|
|
19 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
20 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
|
21 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
22 |
NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR AUTHORS BE
|
|
|
23 |
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
24 |
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
|
|
|
25 |
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
26 |
DEALINGS IN THE SOFTWARE.
|
|
|
27 |
|
|
|
28 |
****************************************************************************/
|
|
|
29 |
|
|
|
30 |
#ifndef WINCON_H
|
|
|
31 |
#define WINCON_H
|
|
|
32 |
|
|
|
33 |
typedef struct SMALL_RECT
|
|
|
34 |
{
|
|
|
35 |
short Left, Top, Right, Bottom;
|
|
|
36 |
} SMALL_RECT;
|
|
|
37 |
|
|
|
38 |
typedef struct COORD
|
|
|
39 |
{
|
|
|
40 |
short X,Y;
|
|
|
41 |
} COORD;
|
|
|
42 |
|
|
|
43 |
typedef struct CONSOLE_SCREEN_BUFFER_INFO
|
|
|
44 |
{
|
|
|
45 |
COORD dwSize;
|
|
|
46 |
COORD dwCursorPosition;
|
|
|
47 |
WORD wAttributes;
|
|
|
48 |
SMALL_RECT srWindow;
|
|
|
49 |
COORD dwMaximumWindowSize;
|
|
|
50 |
} CONSOLE_SCREEN_BUFFER_INFO;
|
|
|
51 |
typedef CONSOLE_SCREEN_BUFFER_INFO * PCONSOLE_SCREEN_BUFFER_INFO;
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
/*
|
|
|
55 |
Returns information about the console.
|
|
|
56 |
Input:
|
|
|
57 |
hCon is the HANDLE (such as returned by GetStdHandle()) to the console buffer to obtain info about
|
|
|
58 |
pConScrBufInfo is a pointer to a CONSOLE_SCREEN_BUFFER_INFO struct that is filled in.
|
|
|
59 |
*/
|
|
|
60 |
BOOL GetConsoleScreenBufferInfo(HANDLE hCon, PCONSOLE_SCREEN_BUFFER_INFO pConScrBufInfo);
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
#endif /* WINCON_H */
|