Reactos
at master 92 lines 2.0 kB view raw
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 11#include "resource.h" 12 13#define SIZEOF(_v) (sizeof(_v) / sizeof(*_v)) 14 15#define MAX_GLYPHS 65536 16 17#define XCELLS 20 18#define YCELLS 10 19#define XLARGE 45 20#define YLARGE 25 21 22#define FM_SETFONT (WM_USER + 1) 23#define FM_GETCHAR (WM_USER + 2) 24#define FM_SETCHAR (WM_USER + 3) 25#define FM_GETHFONT (WM_USER + 4) 26#define FM_SETCHARMAP (WM_USER + 5) 27 28// the code pages to display in the advanced 'character set' combobox 29static const UINT codePages[] = { 30 864, 775, 863, 855, 737, 856, 862, 861, 852, 869, 850, 858, 865, 860, 866, 857, 437, // OEM code pages 31 1256, 1257, 1250, 1251, 1253, 1255, 932, 949, 1252, 936, 874, 950, 1254, 1258 // ANSI code pages 32}; 33 34extern HINSTANCE hInstance; 35 36typedef struct _CELL 37{ 38 RECT CellExt; 39 RECT CellInt; 40 WCHAR ch; 41} CELL, *PCELL; 42 43typedef struct _MAP 44{ 45 HWND hMapWnd; 46 HWND hParent; 47 HWND hLrgWnd; 48 SIZE ClientSize; 49 SIZE CellSize; 50 CELL Cells[YCELLS][XCELLS]; 51 PCELL pActiveCell; 52 HFONT hFont; 53 LOGFONTW CurrentFont; 54 INT CaretX, CaretY; 55 INT iYStart; 56 INT NumRows; 57 INT CharMap; 58 59 USHORT ValidGlyphs[MAX_GLYPHS]; 60 USHORT NumValidGlyphs; 61} MAP, *PMAP; 62 63typedef struct { 64 NMHDR hdr; 65 WCHAR ch; 66} MAPNOTIFY, *LPMAPNOTIFY; 67 68typedef struct { 69 BOOL IsAdvancedView; 70} SETTINGS; 71 72extern SETTINGS Settings; 73extern HWND hCharmapDlg; 74 75LRESULT CALLBACK LrgCellWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); 76 77VOID ShowAboutDlg(HWND hWndParent); 78 79BOOL RegisterMapClasses(HINSTANCE hInstance); 80VOID UnregisterMapClasses(HINSTANCE hInstance); 81 82int WINAPI GetUName(IN WORD wCharCode, OUT LPWSTR lpBuf); 83 84/* charmap.c */ 85VOID UpdateStatusBar(WCHAR wch); 86extern VOID ChangeMapFont(HWND hDlg); 87 88/* settings.c */ 89extern void LoadSettings(void); 90extern void SaveSettings(void); 91 92#endif /* __CHARMAP_PRECOMP_H */