#include <cassert>#include <chrono>#include <iostream>#include "GLFW/glfw3.h"#include "embedder.h"Go to the source code of this file.
Functions | |
| void | GLFWcursorPositionCallbackAtPhase (GLFWwindow *window, FlutterPointerPhase phase, double x, double y) |
| void | GLFWcursorPositionCallback (GLFWwindow *window, double x, double y) |
| void | GLFWmouseButtonCallback (GLFWwindow *window, int key, int action, int mods) |
| static void | GLFWKeyCallback (GLFWwindow *window, int key, int scancode, int action, int mods) |
| void | GLFWwindowSizeCallback (GLFWwindow *window, int width, int height) |
| bool | RunFlutter (GLFWwindow *window, const std::string &project_path, const std::string &icudtl_path) |
| void | printUsage () |
| void | GLFW_ErrorCallback (int error, const char *description) |
| int | main (int argc, const char *argv[]) |
Variables | |
| static double | g_pixelRatio = 1.0 |
| static const size_t | kInitialWindowWidth = 800 |
| static const size_t | kInitialWindowHeight = 600 |
| static constexpr FlutterViewId | kImplicitViewId = 0 |
| void GLFW_ErrorCallback | ( | int | error, |
| const char * | description | ||
| ) |
Definition at line 145 of file FlutterEmbedderGLFW.cc.
References error.
Referenced by main().
| void GLFWcursorPositionCallback | ( | GLFWwindow * | window, |
| double | x, | ||
| double | y | ||
| ) |
Definition at line 45 of file FlutterEmbedderGLFW.cc.
References GLFWcursorPositionCallbackAtPhase(), kMove, window, x, and y.
Referenced by GLFWmouseButtonCallback().
| void GLFWcursorPositionCallbackAtPhase | ( | GLFWwindow * | window, |
| FlutterPointerPhase | phase, | ||
| double | x, | ||
| double | y | ||
| ) |
Definition at line 24 of file FlutterEmbedderGLFW.cc.
References FlutterEngineSendPointerEvent(), g_pixelRatio, kImplicitViewId, FlutterPointerEvent::struct_size, window, x, and y.
Referenced by GLFWcursorPositionCallback(), and GLFWmouseButtonCallback().
|
static |
| void GLFWmouseButtonCallback | ( | GLFWwindow * | window, |
| int | key, | ||
| int | action, | ||
| int | mods | ||
| ) |
Definition at line 49 of file FlutterEmbedderGLFW.cc.
References action, GLFWcursorPositionCallback(), GLFWcursorPositionCallbackAtPhase(), kDown, key, kUp, window, x, and y.
Referenced by main().
| void GLFWwindowSizeCallback | ( | GLFWwindow * | window, |
| int | width, | ||
| int | height | ||
| ) |
Definition at line 78 of file FlutterEmbedderGLFW.cc.
References FlutterEngineSendWindowMetricsEvent(), g_pixelRatio, height, kImplicitViewId, FlutterWindowMetricsEvent::struct_size, width, and window.
Referenced by main(), and RunFlutter().
| int main | ( | int | argc, |
| const char * | argv[] | ||
| ) |
Definition at line 149 of file FlutterEmbedderGLFW.cc.
References argv, g_pixelRatio, GLFW_ErrorCallback(), GLFW_TRUE, GLFWKeyCallback(), GLFWmouseButtonCallback(), GLFWwindowSizeCallback(), kInitialWindowHeight, kInitialWindowWidth, printUsage(), RunFlutter(), and window.
| void printUsage | ( | ) |
Definition at line 140 of file FlutterEmbedderGLFW.cc.
Referenced by main().
| bool RunFlutter | ( | GLFWwindow * | window, |
| const std::string & | project_path, | ||
| const std::string & | icudtl_path | ||
| ) |
Definition at line 92 of file FlutterEmbedderGLFW.cc.
References args, FlutterOpenGLRendererConfig::clear_current, engine, FlutterOpenGLRendererConfig::fbo_callback, FLUTTER_ENGINE_VERSION, FlutterEngineRun(), FlutterOpenGLRendererConfig::gl_proc_resolver, GLFWwindowSizeCallback(), kInitialWindowHeight, kInitialWindowWidth, kOpenGL, kSuccess, FlutterOpenGLRendererConfig::make_current, name, FlutterRendererConfig::open_gl, FlutterOpenGLRendererConfig::present, FlutterOpenGLRendererConfig::struct_size, FlutterProjectArgs::struct_size, FlutterRendererConfig::type, and window.
Referenced by main().
|
static |
Definition at line 13 of file FlutterEmbedderGLFW.cc.
Referenced by GLFWcursorPositionCallbackAtPhase(), GLFWwindowSizeCallback(), and main().
|
staticconstexpr |
Definition at line 16 of file FlutterEmbedderGLFW.cc.
Referenced by GLFWcursorPositionCallbackAtPhase(), GLFWwindowSizeCallback(), flutter::FlutterWindowsEngine::RemoveView(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().
|
static |
Definition at line 15 of file FlutterEmbedderGLFW.cc.
Referenced by main(), and RunFlutter().
|
static |
Definition at line 14 of file FlutterEmbedderGLFW.cc.
Referenced by main(), and RunFlutter().