tdf#155414 win a11y: Honor system setting to disable animations

Use `SPI_GETCLIENTAREAANIMATION`, the "client area animation
parameter [that] indicates whether the user wants to disable
animations in UI elements" [1] to determine whether
animations should be disabled.

The parameter can be set in Windows, as documented in MDN docs
for the "prefers-reduced-motion" CSS media feature [2]:

> * In Windows 10: Settings > Ease of Access > Display > Show animations in Windows.
> * In Windows 11: Settings > Accessibility > Visual Effects > Animation Effects

On top of

    commit 9d68c794d67259a38de1465090f6f1e7fb588d62
    Author: Patrick Luby <plubius@neooffice.org>
    Date:   Fri Jul 21 19:55:02 2023 -0400

        tdf#155414 include system "reduce animation" preferences

, this implements the Windows equivalent of what that change does for macOS.

[1] https://learn.microsoft.com/en-us/windows/win32/winauto/client-area-animation
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion

Change-Id: I1485cd7dc97b7d93abdeab78ec330874f2a5cb98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154889
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 676c70c..564872e 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -141,6 +141,7 @@ public:
    virtual void                EndSetClipRegion() override;
    virtual void                UpdateDarkMode() override;
    virtual bool                GetUseDarkMode() const override;
    virtual bool                GetUseReducedAnimation() const override;

    constexpr vcl::WindowState state() const { return m_eState; }
    void UpdateFrameState();
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index c911fff..d68178e 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -3126,6 +3126,13 @@ bool WinSalFrame::GetUseDarkMode() const
    return UseDarkMode();
}

bool WinSalFrame::GetUseReducedAnimation() const
{
    BOOL bEnableAnimation = FALSE;
    SystemParametersInfoW(SPI_GETCLIENTAREAANIMATION, 0, &bEnableAnimation, 0);
    return !bEnableAnimation;
}

static bool ImplHandleMouseMsg( HWND hWnd, UINT nMsg,
                                WPARAM wParam, LPARAM lParam )
{