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