summaryrefslogtreecommitdiffstats
path: root/src/gui_w32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-17 22:17:03 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-17 22:17:03 +0200
commit945c857844b74866f90be20714aefc3149d2a991 (patch)
tree7b0d8d1bf36e27fe5cdfdfb0b1082a66f8f93e42 /src/gui_w32.c
parent68d130c618f363821761f231c4122a0b9b764b71 (diff)
patch 8.2.1231: MS-Windows: GUI code can be cleaned upv8.2.1231
Problem: MS-Windows: GUI code can be cleaned up. Solution: Do a bit of cleaning up. (Ken Takata, closes #6465)
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r--src/gui_w32.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 30ce3eab03..46358dc131 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -240,6 +240,7 @@ gui_mch_set_rendering_options(char_u *s)
# define CONST
# define FAR
# define NEAR
+# define WINAPI
# undef _cdecl
# define _cdecl
typedef int BOOL;
@@ -320,9 +321,6 @@ static int s_findrep_is_find; // TRUE for find dialog, FALSE
// for find/replace dialog
#endif
-#if !defined(FEAT_GUI)
-static
-#endif
HWND s_hwnd = NULL;
static HDC s_hdc = NULL;
static HBRUSH s_brush = NULL;
@@ -389,7 +387,7 @@ directx_binddc(void)
#endif
// use of WindowProc depends on Global IME
-#define MyWindowProc vim_WindowProc
+static LRESULT WINAPI MyWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
extern int current_font_height; // this is in os_mswin.c
@@ -1259,12 +1257,8 @@ _TextAreaWndProc(
}
}
-#ifdef PROTO
-typedef int WINAPI;
-#endif
-
- LRESULT WINAPI
-vim_WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+ static LRESULT WINAPI
+MyWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
#ifdef GLOBAL_IME
return global_ime_DefWindowProc(hwnd, message, wParam, lParam);
@@ -3824,10 +3818,6 @@ _OnScroll(
# include "xpm_w32.h"
#endif
-#ifdef PROTO
-# define WINAPI
-#endif
-
#ifdef __MINGW32__
/*
* Add a lot of missing defines.