[CONSOLE.CPL]: Rewrite the way we deal with console font samples in the console prope...
[reactos.git] / reactos / dll / cpl / console / console.h
1 #ifndef CONSOLE_H__
2 #define CONSOLE_H__
3
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <wchar.h>
7
8 #define WIN32_NO_STATUS
9
10 #include <windef.h>
11 #include <winbase.h>
12
13 #include <wincon.h>
14 #include <wingdi.h>
15 #include <winnls.h>
16 #include <winreg.h>
17
18 #include <winuser.h>
19 #include <commctrl.h>
20 #include <cpl.h>
21
22 #include <strsafe.h>
23
24 #include "resource.h"
25
26 #define EnableDlgItem(hDlg, nID, bEnable) \
27 EnableWindow(GetDlgItem((hDlg), (nID)), (bEnable))
28
29 /* Shared header with the GUI Terminal Front-End from consrv.dll */
30 #include "concfg.h" // in /winsrv/concfg/
31
32 typedef enum _TEXT_TYPE
33 {
34 Screen,
35 Popup
36 } TEXT_TYPE;
37
38 /* Globals */
39 extern HINSTANCE hApplet;
40 extern PCONSOLE_STATE_INFO ConInfo;
41 extern HFONT hCurrentFont;
42
43 VOID ApplyConsoleInfo(HWND hwndDlg);
44
45 VOID
46 PaintConsole(
47 IN LPDRAWITEMSTRUCT drawItem,
48 IN PCONSOLE_STATE_INFO pConInfo);
49
50 BOOL
51 PaintText(
52 IN LPDRAWITEMSTRUCT drawItem,
53 IN PCONSOLE_STATE_INFO pConInfo,
54 IN TEXT_TYPE TextMode);
55
56
57 struct _LIST_CTL;
58
59 typedef INT (*PLIST_GETCOUNT)(IN struct _LIST_CTL* ListCtl);
60 typedef ULONG_PTR (*PLIST_GETDATA)(IN struct _LIST_CTL* ListCtl, IN INT Index);
61
62 typedef struct _LIST_CTL
63 {
64 HWND hWndList;
65 PLIST_GETCOUNT GetCount;
66 PLIST_GETDATA GetData;
67 } LIST_CTL, *PLIST_CTL;
68
69 UINT
70 BisectListSortedByValueEx(
71 IN PLIST_CTL ListCtl,
72 IN ULONG_PTR Value,
73 IN UINT itemStart,
74 IN UINT itemEnd,
75 OUT PUINT pValueItem OPTIONAL,
76 IN BOOL BisectRightOrLeft);
77
78 UINT
79 BisectListSortedByValue(
80 IN PLIST_CTL ListCtl,
81 IN ULONG_PTR Value,
82 OUT PUINT pValueItem OPTIONAL,
83 IN BOOL BisectRightOrLeft);
84
85 #endif /* CONSOLE_H__ */