Flutter Engine
The Flutter Engine
flutter_macros.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_SHELL_PLATFORM_COMMON_PUBLIC_FLUTTER_MACROS_H_
6#define FLUTTER_SHELL_PLATFORM_COMMON_PUBLIC_FLUTTER_MACROS_H_
7
8#ifdef FLUTTER_DESKTOP_LIBRARY
9
10// Do not add deprecation annotations when building the library.
11#define FLUTTER_DEPRECATED(message)
12
13#else // FLUTTER_DESKTOP_LIBRARY
14
15// Add deprecation warning for users of the library.
16#ifdef _WIN32
17#define FLUTTER_DEPRECATED(message) __declspec(deprecated(message))
18#else
19#define FLUTTER_DEPRECATED(message) __attribute__((deprecated(message)))
20#endif
21
22#endif // FLUTTER_DESKTOP_LIBRARY
23
24#endif // FLUTTER_SHELL_PLATFORM_COMMON_PUBLIC_FLUTTER_MACROS_H_