ReactOS  0.4.13-dev-249-gcba1a2f
precomp.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS VGA Font Editor
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Main header
5  * COPYRIGHT: Copyright 2008 Colin Finck (colin@reactos.org)
6  */
7 
8 #ifndef __PRECOMP_H
9 #define __PRECOMP_H
10 
11 #include <windows.h>
12 #include <windowsx.h>
13 #include <commctrl.h>
14 #include <strsafe.h>
15 #include "resource.h"
16 #include "customwndclasses.h"
17 
18 #include "raw.h"
19 #include "cpi.h"
20 #include "psf.h"
21 
22 typedef enum
23 {
24  RAW,
25  CPI,
27 } VGAFONT_TYPE;
28 
29 typedef struct _VGAFONT
30 {
33 } VGAFONT, *PVGAFONT;
34 
35 // Forward declarations
38 
39 // Structure declarations
40 typedef struct _MAIN_WND_INFO
41 {
42  HWND hMainWnd;
47 
51 
55 
56 typedef struct _FONT_OPEN_INFO
57 {
63 
65 {
69 
73 
76 
79 };
80 
82 {
84 
87 
92 
95 };
96 
97 #define ID_MDI_FIRSTCHILD 50000
98 
99 // Dimensions of the visual elements
100 #define CHARACTER_INFO_BOX_WIDTH 55
101 #define CHARACTER_INFO_BOX_HEIGHT 16
102 #define CHARACTER_BITMAP_BOX_HEIGHT 14
103 #define CHARACTER_BOX_WIDTH (CHARACTER_INFO_BOX_WIDTH)
104 #define CHARACTER_BOX_HEIGHT (CHARACTER_INFO_BOX_HEIGHT + CHARACTER_BITMAP_BOX_HEIGHT)
105 #define CHARACTER_BOX_PADDING 5
106 #define FONT_BOXES_WND_WIDTH (CHARACTER_BOX_WIDTH * 16 + CHARACTER_BOX_PADDING * 15)
107 #define FONT_BOXES_WND_HEIGHT (CHARACTER_BOX_HEIGHT * 16 + CHARACTER_BOX_PADDING * 15)
108 #define FONT_WND_MIN_WIDTH (FONT_BOXES_WND_WIDTH + 25)
109 #define FONT_WND_MIN_HEIGHT (FONT_BOXES_WND_HEIGHT + GetSystemMetrics(SM_CYCAPTION) + 25)
110 
111 // Custom return values
112 #define HITTEST_SEPARATOR -1
113 
114 // Custom window messages
115 #define WM_USER_APPCLOSE (WM_USER + 1)
116 
117 // Bitmap numbers
118 #define TOOLBAR_EDIT_GLYPH 0
119 #define TOOLBOX_PEN 0
120 
121 
122 //
123 // Function prototypes
124 //
125 
126 // aboutdlg.c
128 
129 // editglyphdlg.c
133 
134 // fontboxeswnd.c
138 VOID GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect);
139 __inline VOID GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn);
141 
142 // fontwnd.c
143 BOOL CreateFontWindow(PMAIN_WND_INFO MainWndInfo, PFONT_OPEN_INFO OpenInfo);
146 
147 // main.c
148 extern PWSTR szAppName;
149 extern HINSTANCE hInstance;
150 extern HANDLE hProcessHeap;
152 
153 // mainwnd.c
160 
161 // misc.c
162 INT AllocAndLoadString(OUT PWSTR *lpTarget, IN UINT uID);
163 DWORD LoadAndFormatString(IN UINT uID, OUT PWSTR *lpTarget, ...);
164 VOID LocalizedError(IN UINT uID, ...);
165 
166 // opensave.c
170 
171 #endif
HINSTANCE hInstance
Definition: charmap.c:20
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
VOID SetPasteButtonState(IN PMAIN_WND_INFO Info)
Definition: mainwnd.c:389
BOOL InitEditGlyphWndClasses(VOID)
Definition: editglyphdlg.c:283
#define IN
Definition: typedefs.h:38
BOOL InitFontBoxesWndClass(VOID)
Definition: fontboxeswnd.c:337
BOOL DoSaveFile(IN PWSTR pszFileName)
VOID UnInitFontWndClass(VOID)
Definition: fontwnd.c:436
struct _EDIT_GLYPH_INFO * PEDIT_GLYPH_INFO
Definition: precomp.h:37
VOID EditCurrentGlyph(PFONT_WND_INFO FontWndInfo)
Definition: fontboxeswnd.c:189
PFONT_WND_INFO PrevFontWnd
Definition: precomp.h:74
uint16_t * PWSTR
Definition: typedefs.h:54
VOID GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect)
Definition: fontboxeswnd.c:25
HANDLE hProcessHeap
Definition: kbswitch.c:25
HWND CreateMainWindow(LPCTSTR lpCaption, int nCmdShow)
Definition: mainwnd.c:920
PFONT_WND_INFO LastFontWnd
Definition: precomp.h:53
#define CALLBACK
Definition: compat.h:27
VOID LocalizedError(IN UINT uID,...)
Definition: misc.c:103
UINT_PTR WPARAM
Definition: windef.h:207
HMENU hMenu
Definition: precomp.h:44
Definition: precomp.h:24
PEDIT_GLYPH_INFO LastEditGlyphWnd
Definition: precomp.h:78
int32_t INT_PTR
Definition: typedefs.h:62
PMAIN_WND_INFO MainWndInfo
Definition: precomp.h:66
int32_t INT
Definition: typedefs.h:56
WPARAM wParam
Definition: combotst.c:138
struct _FONT_OPEN_INFO * PFONT_OPEN_INFO
struct TraceInfo Info
PEDIT_GLYPH_INFO NextEditGlyphWnd
Definition: precomp.h:94
HWND hMdiClient
Definition: precomp.h:43
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
VGAFONT_TYPE
Definition: precomp.h:22
BOOL DoOpenFile(OUT PWSTR pszFileName)
Definition: opensave.c:36
INT AllocAndLoadString(OUT LPWSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:50
PWSTR szAppName
Definition: solitaire.cpp:16
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:41
PWSTR pszFileName
Definition: precomp.h:61
PEDIT_GLYPH_INFO PrevEditGlyphWnd
Definition: precomp.h:93
UINT uSelectedCharacter
Definition: precomp.h:72
LONG_PTR LPARAM
Definition: windef.h:208
UINT uCharacter
Definition: precomp.h:85
LONG lEditSpacing
Definition: precomp.h:91
PEDIT_GLYPH_INFO FirstEditGlyphWnd
Definition: precomp.h:77
VOID UnInitEditGlyphWndClasses(VOID)
Definition: editglyphdlg.c:302
PFONT_OPEN_INFO OpenInfo
Definition: precomp.h:67
VOID SetToolbarFileButtonState(IN PMAIN_WND_INFO Info, BOOL bEnabled)
Definition: mainwnd.c:92
ULONG uDocumentCounter
Definition: precomp.h:50
BOOL bCreateNew
Definition: precomp.h:58
UCHAR CharacterBits[8]
Definition: precomp.h:86
INT_PTR CALLBACK EditGlyphDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: editglyphdlg.c:119
struct _VGAFONT * PVGAFONT
struct _MAIN_WND_INFO * PMAIN_WND_INFO
VOID FileInitialize(HWND hwnd)
Definition: opensave.c:8
BOOL InitMainWndClass(VOID)
Definition: mainwnd.c:641
unsigned long DWORD
Definition: ntddk_ex.h:95
HWND hSelf
Definition: precomp.h:70
PFONT_WND_INFO FontWndInfo
Definition: precomp.h:83
PFONT_WND_INFO CurrentFontWnd
Definition: precomp.h:49
__inline VOID GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn)
Definition: fontboxeswnd.c:34
Definition: precomp.h:25
INT nCmdShow
Definition: precomp.h:46
unsigned char UCHAR
Definition: xmlstorage.h:181
DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, OUT LPTSTR *lpTarget,...)
Definition: misc.c:86
VOID UnInitMainWndClass(VOID)
Definition: mainwnd.c:656
HWND hFontBoxesWnd
Definition: precomp.h:71
PBITMAP_FONT Font
Definition: precomp.h:68
PFONT_WND_INFO FirstFontWnd
Definition: precomp.h:52
Definition: precomp.h:26
PVOID FontPtr
Definition: precomp.h:32
VGAFONT_TYPE FontType
Definition: precomp.h:31
struct _FONT_WND_INFO * PFONT_WND_INFO
Definition: precomp.h:36
HWND hMainWnd
Definition: precomp.h:48
unsigned int UINT
Definition: ndis.h:50
VOID DoFileSave(IN PMAIN_WND_INFO Info, IN BOOL bSaveAs)
Definition: mainwnd.c:289
struct _VGAFONT VGAFONT
struct _MAIN_WND_INFO MAIN_WND_INFO
VOID CreateFontBoxesWindow(PFONT_WND_INFO FontWndInfo)
BOOL bModified
Definition: precomp.h:60
BOOL bBinaryFileOpened
Definition: precomp.h:59
VOID UnInitFontBoxesWndClass(VOID)
Definition: fontboxeswnd.c:352
BOOL InitFontWndClass(VOID)
Definition: fontwnd.c:421
#define OUT
Definition: typedefs.h:39
BOOL CreateFontWindow(PMAIN_WND_INFO MainWndInfo, PFONT_OPEN_INFO OpenInfo)
unsigned int ULONG
Definition: retypes.h:1
HBITMAP hBoxBmp
Definition: precomp.h:48
PFONT_WND_INFO NextFontWnd
Definition: precomp.h:75
static HBITMAP
Definition: button.c:44
INT_PTR CALLBACK AboutDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: sndrec32.cpp:83
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
unsigned int * PUINT
Definition: ndis.h:50
HWND hToolbar
Definition: precomp.h:45
UINT uCharacterClipboardFormat
Definition: main.c:15
struct _FONT_OPEN_INFO FONT_OPEN_INFO