Flutter macOS Embedder
FlutterTextureRegistrar.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_MACOS_FRAMEWORK_SOURCE_FLUTTERTEXTUREREGISTRAR_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERTEXTUREREGISTRAR_H_
7 
8 #import <Cocoa/Cocoa.h>
9 
12 
13 /*
14  * Delegate methods for FlutterTextureRegistrar.
15  */
17 
18 /*
19  * Called by the FlutterTextureRegistrar when a texture is registered.
20  */
21 - (nonnull FlutterExternalTexture*)onRegisterTexture:(nonnull id<FlutterTexture>)texture;
22 
23 @end
24 
25 /*
26  * Holds the external textures and implements the FlutterTextureRegistry.
27  */
29 
30 /*
31  * Use `initWithDelegate:engine:` instead.
32  */
33 - (nullable instancetype)init NS_UNAVAILABLE;
34 
35 /*
36  * Use `initWithDelegate:engine:` instead.
37  */
38 + (nullable instancetype)new NS_UNAVAILABLE;
39 
40 /*
41  * Initialzes the texture registrar.
42  */
43 - (nullable instancetype)initWithDelegate:(nonnull id<FlutterTextureRegistrarDelegate>)delegate
44  engine:(nonnull FlutterEngine*)engine NS_DESIGNATED_INITIALIZER;
45 
46 /*
47  * Returns the registered texture with the provided `textureID`.
48  */
49 - (nullable FlutterExternalTexture*)getTextureWithID:(int64_t)textureID;
50 
51 @end
52 
53 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERTEXTUREREGISTRAR_H_
FlutterEngine
Definition: FlutterEngine.h:31
FlutterTextureRegistrar
Definition: FlutterTextureRegistrar.h:28
FlutterEngine.h
FlutterTextureRegistry-p
Definition: FlutterTexture.h:45
FlutterExternalTexture.h
FlutterExternalTexture
Definition: FlutterExternalTexture.h:18
-[FlutterTextureRegistrar NS_UNAVAILABLE]
nullable instancetype NS_UNAVAILABLE()
FlutterTextureRegistrarDelegate-p
Definition: FlutterTextureRegistrar.h:16
FlutterTexture-p
Definition: FlutterTexture.h:21