widget/windows/winrt/mozwrlbase.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/windows/winrt/mozwrlbase.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,77 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#pragma once
    1.10 +
    1.11 +/*
    1.12 + * Includes <wrl.h> and it's children. Defines imports needed by
    1.13 + * corewrappers.h in the case where windows.h has already been
    1.14 + * included w/WINVER < 0x600. Also ups WINVER/_WIN32_WINNT prior
    1.15 + * to including wrl.h. Mozilla's build currently has WINVER set to
    1.16 + * 0x502 for XP support.
    1.17 + */
    1.18 +
    1.19 +#if _WIN32_WINNT < 0x600
    1.20 +
    1.21 +#include <windows.h>
    1.22 +
    1.23 +VOID
    1.24 +WINAPI
    1.25 +ReleaseSRWLockExclusive(
    1.26 +    _Inout_ PSRWLOCK SRWLock
    1.27 +    );
    1.28 +
    1.29 +VOID
    1.30 +WINAPI
    1.31 +ReleaseSRWLockShared(
    1.32 +    _Inout_ PSRWLOCK SRWLock
    1.33 +    );
    1.34 +
    1.35 +BOOL
    1.36 +WINAPI
    1.37 +InitializeCriticalSectionEx(
    1.38 +    _Out_ LPCRITICAL_SECTION lpCriticalSection,
    1.39 +    _In_ DWORD dwSpinCount,
    1.40 +    _In_ DWORD Flags
    1.41 +    );
    1.42 +
    1.43 +VOID
    1.44 +WINAPI
    1.45 +InitializeSRWLock(
    1.46 +    _Out_ PSRWLOCK SRWLock
    1.47 +    );
    1.48 +
    1.49 +VOID
    1.50 +WINAPI
    1.51 +AcquireSRWLockExclusive(
    1.52 +    _Inout_ PSRWLOCK SRWLock
    1.53 +    );
    1.54 +
    1.55 +BOOLEAN
    1.56 +WINAPI
    1.57 +TryAcquireSRWLockExclusive(
    1.58 +    _Inout_ PSRWLOCK SRWLock
    1.59 +    );
    1.60 +
    1.61 +BOOLEAN
    1.62 +WINAPI
    1.63 +TryAcquireSRWLockShared(
    1.64 +    _Inout_ PSRWLOCK SRWLock
    1.65 +    );
    1.66 +
    1.67 +VOID
    1.68 +WINAPI
    1.69 +AcquireSRWLockShared(
    1.70 +    _Inout_ PSRWLOCK SRWLock
    1.71 +    );
    1.72 +
    1.73 +#undef WINVER
    1.74 +#undef _WIN32_WINNT
    1.75 +#define WINVER 0x600
    1.76 +#define _WIN32_WINNT 0x600
    1.77 +
    1.78 +#endif // _WIN32_WINNT < 0x600
    1.79 +
    1.80 +#include <wrl.h>

mercurial