Flutter Engine
The Flutter Engine
FlutterMacros.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_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERMACROS_H_
6#define FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERMACROS_H_
7
8#if defined(FLUTTER_FRAMEWORK)
9
10#define FLUTTER_DARWIN_EXPORT __attribute__((visibility("default")))
11
12#else // defined(FLUTTER_SDK)
13
14#define FLUTTER_DARWIN_EXPORT
15
16#endif // defined(FLUTTER_SDK)
17
18#ifndef NS_ASSUME_NONNULL_BEGIN
19#define NS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
20#define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
21#endif // defined(NS_ASSUME_NONNULL_BEGIN)
22
23/**
24 * Indicates that the API has been deprecated for the specified reason. Code
25 * that uses the deprecated API will continue to work as before. However, the
26 * API will soon become unavailable and users are encouraged to immediately take
27 * the appropriate action mentioned in the deprecation message and the BREAKING
28 * CHANGES section present in the Flutter.h umbrella header.
29 */
30#define FLUTTER_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
31
32/**
33 * Indicates that the previously deprecated API is now unavailable. Code that
34 * uses the API will not work and the declaration of the API is only a stub
35 * meant to display the given message detailing the actions for the user to take
36 * immediately.
37 */
38#define FLUTTER_UNAVAILABLE(msg) __attribute__((__unavailable__(msg)))
39
40#if __has_feature(objc_arc)
41#define FLUTTER_ASSERT_ARC
42#define FLUTTER_ASSERT_NOT_ARC #error ARC must be disabled !
43#else
44#define FLUTTER_ASSERT_ARC #error ARC must be enabled !
45#define FLUTTER_ASSERT_NOT_ARC
46#endif
47
48#endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERMACROS_H_