[RXCE]
[reactos.git] / reactos / sdk / lib / conutils / pager.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Utilities Library
4 * FILE: sdk/lib/conutils/pager.h
5 * PURPOSE: Console/terminal paging functionality.
6 * PROGRAMMERS: - Hermes Belusca-Maito (for the library);
7 * - All programmers who wrote the different console applications
8 * from which I took those functions and improved them.
9 */
10
11 #ifndef __PAGER_H__
12 #define __PAGER_H__
13
14 #ifndef _UNICODE
15 #error The ConUtils library at the moment only supports compilation with _UNICODE defined!
16 #endif
17
18
19 // #include <wincon.h>
20
21
22 typedef struct _CON_PAGER
23 {
24 PCON_SCREEN Screen;
25
26 // TODO: Add more properties. Maybe those extra parameters
27 // of PAGE_PROMPT could go there?
28
29 /* Used to count number of lines since last pause */
30 DWORD LineCount;
31 } CON_PAGER, *PCON_PAGER;
32
33 // Pager, Done, Total
34 typedef BOOL (__stdcall *PAGE_PROMPT)(IN PCON_PAGER, IN DWORD, IN DWORD);
35
36 BOOL
37 ConWritePaging(
38 IN PCON_PAGER Pager,
39 IN PAGE_PROMPT PagePrompt,
40 IN BOOL StartPaging,
41 IN PTCHAR szStr,
42 IN DWORD len);
43
44 BOOL
45 ConPutsPaging(
46 IN PCON_PAGER Pager,
47 IN PAGE_PROMPT PagePrompt,
48 IN BOOL StartPaging,
49 IN LPTSTR szStr);
50
51 BOOL
52 ConResPaging(
53 IN PCON_PAGER Pager,
54 IN PAGE_PROMPT PagePrompt,
55 IN BOOL StartPaging,
56 IN UINT uID);
57
58 #endif /* __PAGER_H__ */