summaryrefslogtreecommitdiff
path: root/src/w32fns.c
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2015-08-19 08:49:41 +0200
committerMartin Rudalics <rudalics@gmx.at>2015-08-19 08:49:41 +0200
commit62661fe759dfc826f31b032e49f0f15b40a207d5 (patch)
treeb738020ade36f6e41742984b9bbf333b661d751b /src/w32fns.c
parentf814775b41ccbfc4777c5223704c44707328f404 (diff)
downloademacs-62661fe759dfc826f31b032e49f0f15b40a207d5.tar.gz
In w32fns.c condition TITLEBAR_INFO declaration on WINDOWS version.
* src/w32fns.c (TITLEBAR_INFO): Make it a typedef so MinGW64 builds can use the declaration from the system headers. (GetTitleBarInfo_Proc, Fx_frame_geometry): Adapt to new definition of TITLEBAR_INFO. Suggested by Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'src/w32fns.c')
-rw-r--r--src/w32fns.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 8f0bde70875..189a27c62f1 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -138,13 +138,18 @@ struct MONITOR_INFO
DWORD dwFlags;
};
+#if _WIN32_WINDOWS >= 0x0410
+#define C_CHILDREN_TITLEBAR CCHILDREN_TITLEBAR
+typedef TITLEBARINFO TITLEBAR_INFO;
+#else
#define C_CHILDREN_TITLEBAR 5
-struct TITLEBAR_INFO
+typedef struct
{
DWORD cbSize;
RECT rcTitleBar;
DWORD rgstate[C_CHILDREN_TITLEBAR+1];
-};
+} TITLEBAR_INFO, *PTITLEBAR_INFO;
+#endif
#ifndef CCHDEVICENAME
#define CCHDEVICENAME 32
@@ -181,7 +186,7 @@ typedef BOOL CALLBACK (* MonitorEnum_Proc)
typedef BOOL (WINAPI * EnumDisplayMonitors_Proc)
(IN HDC hdc, IN RECT *rcClip, IN MonitorEnum_Proc fnEnum, IN LPARAM dwData);
typedef BOOL (WINAPI * GetTitleBarInfo_Proc)
- (IN HWND hwnd, OUT struct TITLEBAR_INFO* info);
+ (IN HWND hwnd, OUT TITLEBAR_INFO* info);
TrackMouseEvent_Proc track_mouse_event_fn = NULL;
ImmGetCompositionString_Proc get_composition_string_fn = NULL;
@@ -8064,7 +8069,7 @@ and width values are in pixels.
{
if (get_title_bar_info_fn)
{
- struct TITLEBAR_INFO title_bar;
+ TITLEBAR_INFO title_bar;
title_bar.cbSize = sizeof (title_bar);
title_bar.rcTitleBar.left = title_bar.rcTitleBar.right = 0;