ReactOS 0.4.16-dev-197-g92996da
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
22typedef enum
23{
26 PSF
28
29typedef struct _VGAFONT
30{
34
35// Forward declarations
38
39// Structure declarations
40typedef struct _MAIN_WND_INFO
41{
47
51
55
56typedef 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
138VOID GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect);
140
141static __inline VOID
142GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn)
143{
144 *uFontRow = uCharacter / 16;
145 *uFontColumn = uCharacter % 16;
146}
147
148// fontwnd.c
152
153// main.c
154extern PWSTR szAppName;
155extern HINSTANCE hInstance;
156extern HANDLE hProcessHeap;
158
159// mainwnd.c
166
167// misc.c
169DWORD LoadAndFormatString(IN UINT uID, OUT PWSTR *lpTarget, ...);
170VOID LocalizedError(IN UINT uID, ...);
171
172// opensave.c
176
177#endif
HINSTANCE hInstance
Definition: charmap.c:19
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, OUT LPTSTR *lpTarget,...)
Definition: misc.c:85
struct _MAIN_WND_INFO MAIN_WND_INFO
struct _MAIN_WND_INFO * PMAIN_WND_INFO
HWND CreateMainWindow()
Definition: biditext.c:330
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _VGAFONT VGAFONT
VOID UnInitFontWndClass(VOID)
Definition: fontwnd.c:441
BOOL DoSaveFile(IN PWSTR pszFileName)
INT_PTR CALLBACK EditGlyphDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: editglyphdlg.c:119
VOID UnInitEditGlyphWndClasses(VOID)
Definition: editglyphdlg.c:302
struct _FONT_WND_INFO * PFONT_WND_INFO
Definition: precomp.h:36
static __inline VOID GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn)
Definition: precomp.h:142
BOOL InitFontWndClass(VOID)
Definition: fontwnd.c:426
VOID UnInitFontBoxesWndClass(VOID)
Definition: fontboxeswnd.c:345
BOOL InitFontBoxesWndClass(VOID)
Definition: fontboxeswnd.c:330
BOOL DoOpenFile(OUT PWSTR pszFileName)
Definition: opensave.c:36
struct _FONT_OPEN_INFO * PFONT_OPEN_INFO
BOOL CreateFontWindow(PMAIN_WND_INFO MainWndInfo, PFONT_OPEN_INFO OpenInfo)
VOID GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect)
Definition: fontboxeswnd.c:25
struct _EDIT_GLYPH_INFO * PEDIT_GLYPH_INFO
Definition: precomp.h:37
VOID SetPasteButtonState(IN PMAIN_WND_INFO Info)
Definition: mainwnd.c:389
VGAFONT_TYPE
Definition: precomp.h:23
@ CPI
Definition: precomp.h:25
@ PSF
Definition: precomp.h:26
@ RAW
Definition: precomp.h:24
UINT uCharacterClipboardFormat
Definition: main.c:15
struct _VGAFONT * PVGAFONT
VOID LocalizedError(IN UINT uID,...)
Definition: misc.c:103
VOID CreateFontBoxesWindow(PFONT_WND_INFO FontWndInfo)
struct _FONT_OPEN_INFO FONT_OPEN_INFO
VOID EditCurrentGlyph(PFONT_WND_INFO FontWndInfo)
Definition: fontboxeswnd.c:182
VOID FileInitialize(HWND hwnd)
Definition: opensave.c:8
INT_PTR CALLBACK AboutDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: aboutdlg.c:11
BOOL InitMainWndClass(VOID)
Definition: mainwnd.c:641
HANDLE hProcessHeap
Definition: kbswitch.c:37
VOID DoFileSave(IN PMAIN_WND_INFO Info, IN BOOL bSaveAs)
Definition: mainwnd.c:289
BOOL InitEditGlyphWndClasses(VOID)
Definition: editglyphdlg.c:283
VOID SetToolbarFileButtonState(IN PMAIN_WND_INFO Info, BOOL bEnabled)
Definition: mainwnd.c:92
VOID UnInitMainWndClass(VOID)
Definition: mainwnd.c:656
static HBITMAP
Definition: button.c:44
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
TCHAR szAppName[128]
Definition: solitaire.cpp:18
PFONT_WND_INFO FontWndInfo
Definition: precomp.h:83
PEDIT_GLYPH_INFO PrevEditGlyphWnd
Definition: precomp.h:93
PEDIT_GLYPH_INFO NextEditGlyphWnd
Definition: precomp.h:94
UINT uCharacter
Definition: precomp.h:85
LONG lEditSpacing
Definition: precomp.h:91
UCHAR CharacterBits[8]
Definition: precomp.h:86
BOOL bBinaryFileOpened
Definition: precomp.h:59
PWSTR pszFileName
Definition: precomp.h:61
BOOL bModified
Definition: precomp.h:60
BOOL bCreateNew
Definition: precomp.h:58
PFONT_WND_INFO NextFontWnd
Definition: precomp.h:75
UINT uSelectedCharacter
Definition: precomp.h:72
PFONT_WND_INFO PrevFontWnd
Definition: precomp.h:74
HWND hFontBoxesWnd
Definition: precomp.h:71
PFONT_OPEN_INFO OpenInfo
Definition: precomp.h:67
PBITMAP_FONT Font
Definition: precomp.h:68
PEDIT_GLYPH_INFO FirstEditGlyphWnd
Definition: precomp.h:77
PMAIN_WND_INFO MainWndInfo
Definition: precomp.h:66
PEDIT_GLYPH_INFO LastEditGlyphWnd
Definition: precomp.h:78
HWND hSelf
Definition: precomp.h:70
HWND hToolbar
Definition: precomp.h:45
PFONT_WND_INFO LastFontWnd
Definition: precomp.h:53
INT nCmdShow
Definition: precomp.h:46
PFONT_WND_INFO FirstFontWnd
Definition: precomp.h:52
PFONT_WND_INFO CurrentFontWnd
Definition: precomp.h:49
HWND hMainWnd
Definition: precomp.h:51
HWND hMdiClient
Definition: precomp.h:43
HMENU hMenu
Definition: precomp.h:44
ULONG uDocumentCounter
Definition: precomp.h:50
HBITMAP hBoxBmp
Definition: precomp.h:48
VGAFONT_TYPE FontType
Definition: precomp.h:31
PVOID FontPtr
Definition: precomp.h:32
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:44
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
unsigned char UCHAR
Definition: xmlstorage.h:181