Create a branch for console restructuration work.
[reactos.git] / base / applications / charmap / precomp.h
1 #ifndef __CHARMAP_PRECOMP_H
2 #define __CHARMAP_PRECOMP_H
3
4 #include <stdarg.h>
5 #include <windef.h>
6 #include <winbase.h>
7 #include <winuser.h>
8 #include <wingdi.h>
9
10 #include "resource.h"
11
12 #define SIZEOF(_v) (sizeof(_v) / sizeof(*_v))
13
14 #define XCELLS 20
15 #define YCELLS 10
16 #define XLARGE 45
17 #define YLARGE 25
18
19 #define FM_SETFONT (WM_USER + 1)
20 #define FM_GETCHAR (WM_USER + 2)
21 #define FM_SETCHAR (WM_USER + 3)
22 #define FM_GETHFONT (WM_USER + 4)
23
24 extern HINSTANCE hInstance;
25
26 typedef struct _CELL
27 {
28 RECT CellExt;
29 RECT CellInt;
30 BOOL bActive;
31 BOOL bLarge;
32 WCHAR ch;
33 } CELL, *PCELL;
34
35 typedef struct _MAP
36 {
37 HWND hMapWnd;
38 HWND hParent;
39 HWND hLrgWnd;
40 SIZE ClientSize;
41 SIZE CellSize;
42 CELL Cells[YCELLS][XCELLS];
43 PCELL pActiveCell;
44 HFONT hFont;
45 LOGFONTW CurrentFont;
46 INT iYStart;
47 } MAP, *PMAP;
48
49 typedef struct {
50 NMHDR hdr;
51 WCHAR ch;
52 } MAPNOTIFY, *LPMAPNOTIFY;
53
54 typedef struct {
55 BOOL IsAdvancedView;
56 } SETTINGS;
57
58 extern SETTINGS Settings;
59 extern HWND hCharmapDlg;
60
61 LRESULT CALLBACK LrgCellWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
62
63 VOID ShowAboutDlg(HWND hWndParent);
64
65 BOOL RegisterMapClasses(HINSTANCE hInstance);
66 VOID UnregisterMapClasses(HINSTANCE hInstance);
67
68 /* charmap.c */
69 extern VOID ChangeMapFont(HWND hDlg);
70
71 /* settings.c */
72 extern void LoadSettings(void);
73 extern void SaveSettings(void);
74
75 #endif /* __CHARMAP_PRECOMP_H */