- Revert 47615. Please fix actual sysreg instead of adding inconsistency between...
[reactos.git] / rosapps / templates / imagesoft / imgedwnd.h
1 #define MONOCHROMEBITS 1
2 #define GREYSCALEBITS 8
3 #define PALLETEBITS 8
4 #define TRUECOLORBITS 24
5
6 #define PIXELS 0
7 #define CENTIMETERS 1
8 #define INCHES 2
9
10
11 /* generic definitions and forward declarations */
12 struct _MAIN_WND_INFO;
13 struct _EDIT_WND_INFO;
14
15
16 typedef enum _MDI_EDITOR_TYPE {
17 metUnknown = 0,
18 metImageEditor,
19 } MDI_EDITOR_TYPE, *PMDI_EDITOR_TYPE;
20
21 typedef enum
22 {
23 tSelect = 0,
24 tMove,
25 tLasso,
26 tZoom,
27 tMagicWand,
28 tBrush,
29 tEraser,
30 tPencil,
31 tColorPick,
32 tStamp,
33 tFill,
34 tLine,
35 tPolyline,
36 tRectangle,
37 tRoundRectangle,
38 tPolygon,
39 tElipse,
40 } TOOL;
41
42 typedef struct _OPEN_IMAGE_EDIT_INFO
43 {
44 BOOL CreateNew;
45 union
46 {
47 struct
48 {
49 LONG Width;
50 LONG Height;
51 } New;
52 struct
53 {
54 LPTSTR lpImagePath;
55 } Open;
56 };
57 LPTSTR lpImageName;
58 USHORT Type;
59 LONG Resolution;
60 } OPEN_IMAGE_EDIT_INFO, *POPEN_IMAGE_EDIT_INFO;
61
62 typedef struct _EDIT_WND_INFO
63 {
64 MDI_EDITOR_TYPE MdiEditorType; /* Must be first member! */
65
66 HWND hSelf;
67 HBITMAP hBitmap;
68 HDC hDCMem;
69 PBITMAPINFO pbmi;
70 PBYTE pBits;
71 struct _MAIN_WND_INFO *MainWnd;
72 struct _EDIT_WND_INFO *Next;
73 POINT ScrollPos;
74 USHORT Zoom;
75 DWORD Tool;
76
77 POPEN_IMAGE_EDIT_INFO OpenInfo; /* Only valid during initialization */
78
79 /* Canvas properties */
80 USHORT Type;
81 LONG Resolution;
82 /* size of drawing area */
83 LONG Width;
84 LONG Height;
85
86 } EDIT_WND_INFO, *PEDIT_WND_INFO;
87
88
89 BOOL CreateImageEditWindow(struct _MAIN_WND_INFO *MainWnd,
90 POPEN_IMAGE_EDIT_INFO OpenInfo);
91 VOID SetImageEditorEnvironment(PEDIT_WND_INFO Info,
92 BOOL Setup);
93 BOOL InitImageEditWindowImpl(VOID);
94 VOID UninitImageEditWindowImpl(VOID);