Flutter Engine
The Flutter Engine
|
#include "flutter/shell/platform/glfw/public/flutter_glfw.h"
#include <GLFW/glfw3.h>
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cstdlib>
#include <filesystem>
#include <iostream>
#include <string>
#include "flutter/common/constants.h"
#include "flutter/shell/platform/common/client_wrapper/include/flutter/plugin_registrar.h"
#include "flutter/shell/platform/common/incoming_message_dispatcher.h"
#include "flutter/shell/platform/common/path_utils.h"
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/glfw/glfw_event_loop.h"
#include "flutter/shell/platform/glfw/headless_event_loop.h"
#include "flutter/shell/platform/glfw/key_event_handler.h"
#include "flutter/shell/platform/glfw/keyboard_hook_handler.h"
#include "flutter/shell/platform/glfw/platform_handler.h"
#include "flutter/shell/platform/glfw/system_utils.h"
#include "flutter/shell/platform/glfw/text_input_plugin.h"
Go to the source code of this file.
Classes | |
struct | FlutterDesktopWindowControllerState |
struct | FlutterDesktopWindow |
struct | AOTDataDeleter |
struct | FlutterDesktopEngineState |
struct | FlutterDesktopPluginRegistrar |
struct | FlutterDesktopMessenger |
Macros | |
#define | GLFW_TRUE 1 |
#define | GLFW_FALSE 0 |
Typedefs | |
using | UniqueGLFWwindowPtr = std::unique_ptr< GLFWwindow, void(*)(GLFWwindow *)> |
using | UniqueAotDataPtr = std::unique_ptr< _FlutterEngineAOTData, AOTDataDeleter > |
using | FlutterDesktopMessengerReferenceOwner = std::unique_ptr< FlutterDesktopMessenger, decltype(&FlutterDesktopMessengerRelease)> |
Maintains one ref on the FlutterDesktopMessenger's internal reference count. More... | |
Variables | |
const int | kFlutterDesktopDontCare = GLFW_DONT_CARE |
static constexpr double | kDpPerInch = 160.0 |
#define GLFW_FALSE 0 |
Definition at line 36 of file flutter_glfw.cc.
#define GLFW_TRUE 1 |
Definition at line 33 of file flutter_glfw.cc.
using FlutterDesktopMessengerReferenceOwner = std::unique_ptr<FlutterDesktopMessenger, decltype(&FlutterDesktopMessengerRelease)> |
Maintains one ref on the FlutterDesktopMessenger's internal reference count.
Definition at line 112 of file flutter_glfw.cc.
using UniqueAotDataPtr = std::unique_ptr<_FlutterEngineAOTData, AOTDataDeleter> |
Definition at line 110 of file flutter_glfw.cc.
using UniqueGLFWwindowPtr = std::unique_ptr<GLFWwindow, void (*)(GLFWwindow*)> |
Definition at line 39 of file flutter_glfw.cc.
|
static |
Definition at line 309 of file flutter_glfw.cc.
|
static |
Definition at line 251 of file flutter_glfw.cc.
|
static |
Definition at line 237 of file flutter_glfw.cc.
|
static |
Definition at line 621 of file flutter_glfw.cc.
|
static |
Definition at line 645 of file flutter_glfw.cc.
|
static |
Definition at line 597 of file flutter_glfw.cc.
|
static |
Definition at line 609 of file flutter_glfw.cc.
|
static |
Definition at line 566 of file flutter_glfw.cc.
|
static |
Definition at line 633 of file flutter_glfw.cc.
|
static |
Definition at line 651 of file flutter_glfw.cc.
FlutterDesktopWindowControllerRef FlutterDesktopCreateWindow | ( | const FlutterDesktopWindowProperties & | window_properties, |
const FlutterDesktopEngineProperties & | engine_properties | ||
) |
Definition at line 859 of file flutter_glfw.cc.
void FlutterDesktopDestroyWindow | ( | FlutterDesktopWindowControllerRef | controller | ) |
Definition at line 932 of file flutter_glfw.cc.
FlutterDesktopEngineRef FlutterDesktopGetEngine | ( | FlutterDesktopWindowControllerRef | controller | ) |
Definition at line 1046 of file flutter_glfw.cc.
FlutterDesktopPluginRegistrarRef FlutterDesktopGetPluginRegistrar | ( | FlutterDesktopEngineRef | engine, |
const char * | plugin_name | ||
) |
Definition at line 1051 of file flutter_glfw.cc.
FlutterDesktopWindowRef FlutterDesktopGetWindow | ( | FlutterDesktopWindowControllerRef | controller | ) |
Definition at line 1038 of file flutter_glfw.cc.
bool FlutterDesktopInit | ( | ) |
Definition at line 849 of file flutter_glfw.cc.
FlutterDesktopMessengerRef FlutterDesktopMessengerAddRef | ( | FlutterDesktopMessengerRef | messenger | ) |
Definition at line 204 of file flutter_glfw.cc.
bool FlutterDesktopMessengerIsAvailable | ( | FlutterDesktopMessengerRef | messenger | ) |
Definition at line 214 of file flutter_glfw.cc.
FlutterDesktopMessengerRef FlutterDesktopMessengerLock | ( | FlutterDesktopMessengerRef | messenger | ) |
Definition at line 218 of file flutter_glfw.cc.
void FlutterDesktopMessengerRelease | ( | FlutterDesktopMessengerRef | messenger | ) |
Definition at line 210 of file flutter_glfw.cc.
bool FlutterDesktopMessengerSend | ( | FlutterDesktopMessengerRef | messenger, |
const char * | channel, | ||
const uint8_t * | message, | ||
const size_t | message_size | ||
) |
Definition at line 1160 of file flutter_glfw.cc.
void FlutterDesktopMessengerSendResponse | ( | FlutterDesktopMessengerRef | messenger, |
const FlutterDesktopMessageResponseHandle * | handle, | ||
const uint8_t * | data, | ||
size_t | data_length | ||
) |
Definition at line 1168 of file flutter_glfw.cc.
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 1124 of file flutter_glfw.cc.
void FlutterDesktopMessengerSetCallback | ( | FlutterDesktopMessengerRef | messenger, |
const char * | channel, | ||
FlutterDesktopMessageCallback | callback, | ||
void * | user_data | ||
) |
Definition at line 1177 of file flutter_glfw.cc.
void FlutterDesktopMessengerUnlock | ( | FlutterDesktopMessengerRef | messenger | ) |
Definition at line 224 of file flutter_glfw.cc.
void FlutterDesktopPluginRegistrarEnableInputBlocking | ( | FlutterDesktopPluginRegistrarRef | registrar, |
const char * | channel | ||
) |
Definition at line 1097 of file flutter_glfw.cc.
FlutterDesktopMessengerRef FlutterDesktopPluginRegistrarGetMessenger | ( | FlutterDesktopPluginRegistrarRef | registrar | ) |
Definition at line 1103 of file flutter_glfw.cc.
FlutterDesktopWindowRef FlutterDesktopPluginRegistrarGetWindow | ( | FlutterDesktopPluginRegistrarRef | registrar | ) |
Definition at line 1114 of file flutter_glfw.cc.
void FlutterDesktopPluginRegistrarSetDestructionHandler | ( | FlutterDesktopPluginRegistrarRef | registrar, |
FlutterDesktopOnPluginRegistrarDestroyed | callback | ||
) |
Definition at line 1108 of file flutter_glfw.cc.
FlutterDesktopTextureRegistrarRef FlutterDesktopRegistrarGetTextureRegistrar | ( | FlutterDesktopPluginRegistrarRef | registrar | ) |
Definition at line 1185 of file flutter_glfw.cc.
FlutterDesktopEngineRef FlutterDesktopRunEngine | ( | const FlutterDesktopEngineProperties & | properties | ) |
Definition at line 1060 of file flutter_glfw.cc.
void FlutterDesktopRunEngineEventLoopWithTimeout | ( | FlutterDesktopEngineRef | engine, |
uint32_t | timeout_milliseconds | ||
) |
Definition at line 1081 of file flutter_glfw.cc.
bool FlutterDesktopRunWindowEventLoopWithTimeout | ( | FlutterDesktopWindowControllerRef | controller, |
uint32_t | timeout_milliseconds | ||
) |
Definition at line 1030 of file flutter_glfw.cc.
bool FlutterDesktopShutDownEngine | ( | FlutterDesktopEngineRef | engine | ) |
Definition at line 1091 of file flutter_glfw.cc.
void FlutterDesktopTerminate | ( | ) |
Definition at line 855 of file flutter_glfw.cc.
bool FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable | ( | FlutterDesktopTextureRegistrarRef | texture_registrar, |
int64_t | texture_id | ||
) |
Definition at line 1206 of file flutter_glfw.cc.
int64_t FlutterDesktopTextureRegistrarRegisterExternalTexture | ( | FlutterDesktopTextureRegistrarRef | texture_registrar, |
const FlutterDesktopTextureInfo * | texture_info | ||
) |
Definition at line 1191 of file flutter_glfw.cc.
void FlutterDesktopTextureRegistrarUnregisterExternalTexture | ( | FlutterDesktopTextureRegistrarRef | texture_registrar, |
int64_t | texture_id, | ||
void(*)(void *user_data) | callback, | ||
void * | user_data | ||
) |
Definition at line 1198 of file flutter_glfw.cc.
void FlutterDesktopWindowGetFrame | ( | FlutterDesktopWindowRef | flutter_window, |
int * | x, | ||
int * | y, | ||
int * | width, | ||
int * | height | ||
) |
Definition at line 963 of file flutter_glfw.cc.
double FlutterDesktopWindowGetScaleFactor | ( | FlutterDesktopWindowRef | flutter_window | ) |
Definition at line 1004 of file flutter_glfw.cc.
void FlutterDesktopWindowSetFrame | ( | FlutterDesktopWindowRef | flutter_window, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
Definition at line 989 of file flutter_glfw.cc.
void FlutterDesktopWindowSetHoverEnabled | ( | FlutterDesktopWindowRef | flutter_window, |
bool | enabled | ||
) |
Definition at line 943 of file flutter_glfw.cc.
void FlutterDesktopWindowSetIcon | ( | FlutterDesktopWindowRef | flutter_window, |
uint8_t * | pixel_data, | ||
int | width, | ||
int | height | ||
) |
Definition at line 955 of file flutter_glfw.cc.
void FlutterDesktopWindowSetPixelRatioOverride | ( | FlutterDesktopWindowRef | flutter_window, |
double | pixel_ratio | ||
) |
Definition at line 1009 of file flutter_glfw.cc.
void FlutterDesktopWindowSetSizeLimits | ( | FlutterDesktopWindowRef | flutter_window, |
FlutterDesktopSize | minimum_size, | ||
FlutterDesktopSize | maximum_size | ||
) |
Definition at line 1022 of file flutter_glfw.cc.
void FlutterDesktopWindowSetTitle | ( | FlutterDesktopWindowRef | flutter_window, |
const char * | title | ||
) |
Definition at line 949 of file flutter_glfw.cc.
|
static |
Definition at line 265 of file flutter_glfw.cc.
|
static |
Definition at line 229 of file flutter_glfw.cc.
|
static |
Definition at line 544 of file flutter_glfw.cc.
|
static |
Definition at line 516 of file flutter_glfw.cc.
|
static |
Definition at line 663 of file flutter_glfw.cc.
|
static |
Definition at line 556 of file flutter_glfw.cc.
|
static |
Definition at line 439 of file flutter_glfw.cc.
|
static |
Definition at line 448 of file flutter_glfw.cc.
|
static |
Definition at line 673 of file flutter_glfw.cc.
Definition at line 327 of file flutter_glfw.cc.
|
static |
Definition at line 524 of file flutter_glfw.cc.
Definition at line 458 of file flutter_glfw.cc.
|
static |
Definition at line 499 of file flutter_glfw.cc.
void GLFWWindowRefreshCallback | ( | GLFWwindow * | window | ) |
Definition at line 341 of file flutter_glfw.cc.
UniqueAotDataPtr LoadAotData | ( | const std::filesystem::path & | aot_data_path | ) |
Definition at line 679 of file flutter_glfw.cc.
|
static |
Definition at line 711 of file flutter_glfw.cc.
|
static |
Definition at line 360 of file flutter_glfw.cc.
|
static |
Definition at line 282 of file flutter_glfw.cc.
|
static |
Definition at line 416 of file flutter_glfw.cc.
|
static |
Definition at line 426 of file flutter_glfw.cc.
|
static |
Definition at line 536 of file flutter_glfw.cc.
|
static |
Definition at line 825 of file flutter_glfw.cc.
|
static |
Definition at line 801 of file flutter_glfw.cc.
|
staticconstexpr |
Definition at line 45 of file flutter_glfw.cc.
const int kFlutterDesktopDontCare = GLFW_DONT_CARE |
Definition at line 43 of file flutter_glfw.cc.