Flutter Engine
The Flutter Engine
Namespaces | Functions | Variables
stub_flutter_api.cc File Reference
#include "flutter/shell/platform/common/client_wrapper/testing/stub_flutter_api.h"
#include <cassert>

Go to the source code of this file.

Namespaces

namespace  flutter
 
namespace  flutter::testing
 

Functions

FlutterDesktopMessengerRef FlutterDesktopPluginRegistrarGetMessenger (FlutterDesktopPluginRegistrarRef registrar)
 
void FlutterDesktopPluginRegistrarSetDestructionHandler (FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopOnPluginRegistrarDestroyed callback)
 
bool FlutterDesktopMessengerSend (FlutterDesktopMessengerRef messenger, const char *channel, const uint8_t *message, const size_t message_size)
 
bool FlutterDesktopMessengerSendWithReply (FlutterDesktopMessengerRef messenger, const char *channel, const uint8_t *message, const size_t message_size, const FlutterDesktopBinaryReply reply, void *user_data)
 
void FlutterDesktopMessengerSendResponse (FlutterDesktopMessengerRef messenger, const FlutterDesktopMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
 
void FlutterDesktopMessengerSetCallback (FlutterDesktopMessengerRef messenger, const char *channel, FlutterDesktopMessageCallback callback, void *user_data)
 
FlutterDesktopMessengerRef FlutterDesktopMessengerAddRef (FlutterDesktopMessengerRef messenger)
 
void FlutterDesktopMessengerRelease (FlutterDesktopMessengerRef messenger)
 
bool FlutterDesktopMessengerIsAvailable (FlutterDesktopMessengerRef messenger)
 
FlutterDesktopMessengerRef FlutterDesktopMessengerLock (FlutterDesktopMessengerRef messenger)
 
void FlutterDesktopMessengerUnlock (FlutterDesktopMessengerRef messenger)
 
FlutterDesktopTextureRegistrarRef FlutterDesktopRegistrarGetTextureRegistrar (FlutterDesktopPluginRegistrarRef registrar)
 
int64_t FlutterDesktopTextureRegistrarRegisterExternalTexture (FlutterDesktopTextureRegistrarRef texture_registrar, const FlutterDesktopTextureInfo *info)
 
void FlutterDesktopTextureRegistrarUnregisterExternalTexture (FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id, void(*callback)(void *user_data), void *user_data)
 
bool FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable (FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id)
 

Variables

static flutter::testing::StubFlutterApis_stub_implementation
 

Function Documentation

◆ FlutterDesktopMessengerAddRef()

FlutterDesktopMessengerRef FlutterDesktopMessengerAddRef ( FlutterDesktopMessengerRef  messenger)

Definition at line 98 of file stub_flutter_api.cc.

99 {
100 assert(false); // not implemented
101 return nullptr;
102}

◆ FlutterDesktopMessengerIsAvailable()

bool FlutterDesktopMessengerIsAvailable ( FlutterDesktopMessengerRef  messenger)

Definition at line 108 of file stub_flutter_api.cc.

108 {
109 assert(false); // not implemented
110 return false;
111}

◆ FlutterDesktopMessengerLock()

FlutterDesktopMessengerRef FlutterDesktopMessengerLock ( FlutterDesktopMessengerRef  messenger)

Definition at line 113 of file stub_flutter_api.cc.

114 {
115 assert(false); // not implemented
116 return nullptr;
117}

◆ FlutterDesktopMessengerRelease()

void FlutterDesktopMessengerRelease ( FlutterDesktopMessengerRef  messenger)

Definition at line 104 of file stub_flutter_api.cc.

104 {
105 assert(false); // not implemented
106}

◆ FlutterDesktopMessengerSend()

bool FlutterDesktopMessengerSend ( FlutterDesktopMessengerRef  messenger,
const char *  channel,
const uint8_t *  message,
const size_t  message_size 
)

Definition at line 53 of file stub_flutter_api.cc.

56 {
57 bool result = false;
59 result =
60 s_stub_implementation->MessengerSend(channel, message, message_size);
61 }
62 return result;
63}
virtual bool MessengerSend(const char *channel, const uint8_t *message, const size_t message_size)
GAsyncResult * result
Win32Message message
static flutter::testing::StubFlutterApi * s_stub_implementation

◆ FlutterDesktopMessengerSendResponse()

void FlutterDesktopMessengerSendResponse ( FlutterDesktopMessengerRef  messenger,
const FlutterDesktopMessageResponseHandle handle,
const uint8_t *  data,
size_t  data_length 
)

Definition at line 79 of file stub_flutter_api.cc.

83 {
86 }
87}
virtual void MessengerSendResponse(const FlutterDesktopMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

◆ FlutterDesktopMessengerSendWithReply()

bool FlutterDesktopMessengerSendWithReply ( FlutterDesktopMessengerRef  messenger,
const char *  channel,
const uint8_t *  message,
const size_t  message_size,
const FlutterDesktopBinaryReply  reply,
void *  user_data 
)

Definition at line 65 of file stub_flutter_api.cc.

70 {
71 bool result = false;
74 channel, message, message_size, reply, user_data);
75 }
76 return result;
77}
virtual bool MessengerSendWithReply(const char *channel, const uint8_t *message, const size_t message_size, const FlutterDesktopBinaryReply reply, void *user_data)
void * user_data

◆ FlutterDesktopMessengerSetCallback()

void FlutterDesktopMessengerSetCallback ( FlutterDesktopMessengerRef  messenger,
const char *  channel,
FlutterDesktopMessageCallback  callback,
void *  user_data 
)

Definition at line 89 of file stub_flutter_api.cc.

92 {
95 }
96}
virtual void MessengerSetCallback(const char *channel, FlutterDesktopMessageCallback callback, void *user_data)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback

◆ FlutterDesktopMessengerUnlock()

void FlutterDesktopMessengerUnlock ( FlutterDesktopMessengerRef  messenger)

Definition at line 119 of file stub_flutter_api.cc.

119 {
120 assert(false); // not implemented
121}

◆ FlutterDesktopPluginRegistrarGetMessenger()

FlutterDesktopMessengerRef FlutterDesktopPluginRegistrarGetMessenger ( FlutterDesktopPluginRegistrarRef  registrar)

Definition at line 39 of file stub_flutter_api.cc.

40 {
41 // The stub ignores this, so just return an arbitrary non-zero value.
42 return reinterpret_cast<FlutterDesktopMessengerRef>(1);
43}

◆ FlutterDesktopPluginRegistrarSetDestructionHandler()

void FlutterDesktopPluginRegistrarSetDestructionHandler ( FlutterDesktopPluginRegistrarRef  registrar,
FlutterDesktopOnPluginRegistrarDestroyed  callback 
)

Definition at line 45 of file stub_flutter_api.cc.

47 {
50 }
51}
virtual void PluginRegistrarSetDestructionHandler(FlutterDesktopOnPluginRegistrarDestroyed callback)

◆ FlutterDesktopRegistrarGetTextureRegistrar()

FlutterDesktopTextureRegistrarRef FlutterDesktopRegistrarGetTextureRegistrar ( FlutterDesktopPluginRegistrarRef  registrar)

Definition at line 123 of file stub_flutter_api.cc.

124 {
125 return reinterpret_cast<FlutterDesktopTextureRegistrarRef>(1);
126}
struct FlutterDesktopTextureRegistrar * FlutterDesktopTextureRegistrarRef

◆ FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable()

bool FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable ( FlutterDesktopTextureRegistrarRef  texture_registrar,
int64_t  texture_id 
)

Definition at line 152 of file stub_flutter_api.cc.

154 {
155 bool result = false;
158 texture_id);
159 }
160 return result;
161}
virtual bool TextureRegistrarMarkTextureFrameAvailable(int64_t texture_id)
int64_t texture_id

◆ FlutterDesktopTextureRegistrarRegisterExternalTexture()

int64_t FlutterDesktopTextureRegistrarRegisterExternalTexture ( FlutterDesktopTextureRegistrarRef  texture_registrar,
const FlutterDesktopTextureInfo info 
)

Definition at line 128 of file stub_flutter_api.cc.

130 {
131 uint64_t result = -1;
133 result =
135 }
136 return result;
137}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
virtual int64_t TextureRegistrarRegisterExternalTexture(const FlutterDesktopTextureInfo *info)

◆ FlutterDesktopTextureRegistrarUnregisterExternalTexture()

void FlutterDesktopTextureRegistrarUnregisterExternalTexture ( FlutterDesktopTextureRegistrarRef  texture_registrar,
int64_t  texture_id,
void(*)(void *user_data callback,
void *  user_data 
)

Definition at line 139 of file stub_flutter_api.cc.

143 {
147 } else if (callback) {
149 }
150}
virtual void TextureRegistrarUnregisterExternalTexture(int64_t texture_id, void(*callback)(void *user_data), void *user_data)

Variable Documentation

◆ s_stub_implementation

flutter::testing::StubFlutterApi* s_stub_implementation
static

Definition at line 9 of file stub_flutter_api.cc.