https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2d5bb5ffbfc05499151cb…
commit 2d5bb5ffbfc05499151cb28f31cbea29ae237504
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri Nov 24 10:25:47 2023 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Fri Nov 24 10:25:47 2023 +0900
[MSPAINT] Delete common.h and move code to precomp.h
Refactoring. CORE-19094
---
base/applications/mspaint/common.h | 60 -------------------------------------
base/applications/mspaint/precomp.h | 57 ++++++++++++++++++++++++++++++++++-
2 files changed, 56 insertions(+), 61 deletions(-)
diff --git a/base/applications/mspaint/common.h b/base/applications/mspaint/common.h
deleted file mode 100644
index cc3795c1eca..00000000000
--- a/base/applications/mspaint/common.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * PROJECT: PAINT for ReactOS
- * LICENSE: LGPL-2.0-or-later (
https://spdx.org/licenses/LGPL-2.0-or-later)
- * PURPOSE: Commonly used functions and definitions
- * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen(a)gmx.net>
- * Copyright 2018 Stanislav Motylkov <x86corez(a)gmail.com>
- * Copyright 2021-2023 Katayama Hirofumi MZ
<katayama.hirofumi.mz(a)gmail.com>
- */
-
-#pragma once
-
-#define GRIP_SIZE 3
-#define MIN_ZOOM 125
-#define MAX_ZOOM 8000
-
-#define MAX_LONG_PATH 512
-
-#define WM_TOOLSMODELTOOLCHANGED (WM_APP + 0)
-#define WM_TOOLSMODELSETTINGSCHANGED (WM_APP + 1)
-#define WM_TOOLSMODELZOOMCHANGED (WM_APP + 2)
-#define WM_PALETTEMODELCOLORCHANGED (WM_APP + 3)
-
-/* this simplifies checking and unchecking menu items */
-#define CHECKED_IF(a) ((a) ? (MF_CHECKED | MF_BYCOMMAND) : (MF_UNCHECKED |
MF_BYCOMMAND))
-
-/* this simplifies enabling or graying menu items */
-#define ENABLED_IF(a) ((a) ? (MF_ENABLED | MF_BYCOMMAND) : (MF_GRAYED | MF_BYCOMMAND))
-
-enum HITTEST // hit
-{
- HIT_NONE = 0, // Nothing hit or outside
- HIT_UPPER_LEFT,
- HIT_UPPER_CENTER,
- HIT_UPPER_RIGHT,
- HIT_MIDDLE_LEFT,
- HIT_MIDDLE_RIGHT,
- HIT_LOWER_LEFT,
- HIT_LOWER_CENTER,
- HIT_LOWER_RIGHT,
- HIT_BORDER,
- HIT_INNER,
-};
-
-/* FUNCTIONS ********************************************************/
-
-void ShowOutOfMemory(void);
-BOOL nearlyEqualPoints(INT x0, INT y0, INT x1, INT y1);
-BOOL OpenMailer(HWND hWnd, LPCWSTR pszPathName);
-void getBoundaryOfPtStack(RECT& rcBoundary, INT cPoints, const POINT *pPoints);
-
-#define DEG2RAD(degree) (((degree) * M_PI) / 180)
-#define RAD2DEG(radian) ((LONG)(((radian) * 180) / M_PI))
-
-template <typename T>
-inline void Swap(T& a, T& b)
-{
- T tmp = a;
- a = b;
- b = tmp;
-}
diff --git a/base/applications/mspaint/precomp.h b/base/applications/mspaint/precomp.h
index 346c7bda846..b98f40a11e6 100644
--- a/base/applications/mspaint/precomp.h
+++ b/base/applications/mspaint/precomp.h
@@ -3,6 +3,8 @@
* LICENSE: LGPL-2.0-or-later (
https://spdx.org/licenses/LGPL-2.0-or-later)
* PURPOSE: The precompiled header
* COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen(a)gmx.net>
+ * Copyright 2018 Stanislav Motylkov <x86corez(a)gmail.com>
+ * Copyright 2021-2023 Katayama Hirofumi MZ
<katayama.hirofumi.mz(a)gmail.com>
*/
#pragma once
@@ -36,8 +38,61 @@
#include <debug.h>
+/* CONSTANTS *******************************************************/
+
+#define GRIP_SIZE 3
+#define MIN_ZOOM 125
+#define MAX_ZOOM 8000
+
+#define MAX_LONG_PATH 512
+
+#define WM_TOOLSMODELTOOLCHANGED (WM_APP + 0)
+#define WM_TOOLSMODELSETTINGSCHANGED (WM_APP + 1)
+#define WM_TOOLSMODELZOOMCHANGED (WM_APP + 2)
+#define WM_PALETTEMODELCOLORCHANGED (WM_APP + 3)
+
+/* this simplifies checking and unchecking menu items */
+#define CHECKED_IF(a) ((a) ? (MF_CHECKED | MF_BYCOMMAND) : (MF_UNCHECKED |
MF_BYCOMMAND))
+
+/* this simplifies enabling or graying menu items */
+#define ENABLED_IF(a) ((a) ? (MF_ENABLED | MF_BYCOMMAND) : (MF_GRAYED | MF_BYCOMMAND))
+
+enum HITTEST // hit
+{
+ HIT_NONE = 0, // Nothing hit or outside
+ HIT_UPPER_LEFT,
+ HIT_UPPER_CENTER,
+ HIT_UPPER_RIGHT,
+ HIT_MIDDLE_LEFT,
+ HIT_MIDDLE_RIGHT,
+ HIT_LOWER_LEFT,
+ HIT_LOWER_CENTER,
+ HIT_LOWER_RIGHT,
+ HIT_BORDER,
+ HIT_INNER,
+};
+
+/* COMMON FUNCTIONS *************************************************/
+
+void ShowOutOfMemory(void);
+BOOL nearlyEqualPoints(INT x0, INT y0, INT x1, INT y1);
+BOOL OpenMailer(HWND hWnd, LPCWSTR pszPathName);
+void getBoundaryOfPtStack(RECT& rcBoundary, INT cPoints, const POINT *pPoints);
+
+#define DEG2RAD(degree) (((degree) * M_PI) / 180)
+#define RAD2DEG(radian) ((LONG)(((radian) * 180) / M_PI))
+
+template <typename T>
+inline void Swap(T& a, T& b)
+{
+ T tmp = a;
+ a = b;
+ b = tmp;
+}
+
+/* LOCAL INCLUDES ***************************************************/
+
#include "resource.h"
-#include "common.h"
#include "drawing.h"
#include "dib.h"
#include "fullscreen.h"