ReactOS  0.4.15-dev-1171-gab82533
pager.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Console Utilities Library
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Console/terminal paging functionality.
5  * COPYRIGHT: Copyright 2017-2018 ReactOS Team
6  * Copyright 2017-2018 Hermes Belusca-Maito
7  */
8 
16 #ifndef __PAGER_H__
17 #define __PAGER_H__
18 
19 #pragma once
20 
21 #ifndef _UNICODE
22 #error The ConUtils library at the moment only supports compilation with _UNICODE defined!
23 #endif
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
30 // #include <wincon.h>
31 
32 
33 typedef struct _CON_PAGER
34 {
36 
37  // TODO: Add more properties. Maybe those extra parameters
38  // of PAGE_PROMPT could go there?
39 
40  /* Used to count number of lines since last pause */
43 
44 #define INIT_CON_PAGER(pScreen) {(pScreen), 0}
45 
46 #define InitializeConPager(pPager, pScreen) \
47 do { \
48  (pPager)->Screen = (pScreen); \
49  (pPager)->LineCount = 0; \
50 } while (0)
51 
52 
54  IN PCON_PAGER Pager,
55  IN DWORD Done,
56  IN DWORD Total);
57 
58 BOOL
60  IN PCON_PAGER Pager,
62  IN BOOL StartPaging,
63  IN PCTCH szStr,
64  IN DWORD len);
65 
66 BOOL
68  IN PCON_PAGER Pager,
70  IN BOOL StartPaging,
71  IN PCTSTR szStr);
72 
73 BOOL
75  IN PCON_PAGER Pager,
77  IN BOOL StartPaging,
79  IN UINT uID);
80 
81 BOOL
83  IN PCON_PAGER Pager,
85  IN BOOL StartPaging,
86  IN UINT uID);
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
92 #endif /* __PAGER_H__ */
93 
94 /* EOF */
#define IN
Definition: typedefs.h:39
static BOOL __stdcall PagePrompt(PCON_PAGER Pager, DWORD Done, DWORD Total)
Definition: more.c:52
LPCSTR PCTSTR
Definition: ntbasedef.h:489
#define BOOL
Definition: nt_native.h:43
LPCCH PCTCH
Definition: ntbasedef.h:487
PCON_SCREEN Screen
Definition: pager.h:35
HINSTANCE hInstance
Definition: charmap.c:20
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL ConPutsPaging(IN PCON_PAGER Pager, IN PAGE_PROMPT PagePrompt, IN BOOL StartPaging, IN PCTSTR szStr)
Definition: pager.c:120
BOOL(__stdcall * PAGE_PROMPT)(IN PCON_PAGER Pager, IN DWORD Done, IN DWORD Total)
Definition: pager.h:53
unsigned long DWORD
Definition: ntddk_ex.h:95
#define __stdcall
Definition: typedefs.h:25
GLenum GLsizei len
Definition: glext.h:6722
struct _CON_PAGER * PCON_PAGER
unsigned int UINT
Definition: ndis.h:50
DWORD LineCount
Definition: pager.h:41
BOOL ConWritePaging(IN PCON_PAGER Pager, IN PAGE_PROMPT PagePrompt, IN BOOL StartPaging, IN PCTCH szStr, IN DWORD len)
Definition: pager.c:38
BOOL ConResPagingEx(IN PCON_PAGER Pager, IN PAGE_PROMPT PagePrompt, IN BOOL StartPaging, IN HINSTANCE hInstance OPTIONAL, IN UINT uID)
Definition: pager.c:137
struct _CON_PAGER CON_PAGER
BOOL ConResPaging(IN PCON_PAGER Pager, IN PAGE_PROMPT PagePrompt, IN BOOL StartPaging, IN UINT uID)
Definition: pager.c:155
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68