Flutter Engine
The Flutter Engine
shell
platform
glfw
platform_handler.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_GLFW_PLATFORM_HANDLER_H_
6
#define FLUTTER_SHELL_PLATFORM_GLFW_PLATFORM_HANDLER_H_
7
8
#include <GLFW/glfw3.h>
9
10
#include "flutter/shell/platform/common/client_wrapper/include/flutter/binary_messenger.h"
11
#include "flutter/shell/platform/common/client_wrapper/include/flutter/method_channel.h"
12
#include "flutter/shell/platform/glfw/public/flutter_glfw.h"
13
#include "rapidjson/document.h"
14
15
namespace
flutter
{
16
17
// Handler for internal system channels.
18
class
PlatformHandler
{
19
public
:
20
explicit
PlatformHandler
(
flutter::BinaryMessenger
* messenger,
21
GLFWwindow*
window
);
22
23
private
:
24
// Called when a method is called on |channel_|;
25
void
HandleMethodCall(
26
const
flutter::MethodCall<rapidjson::Document>
&
method_call
,
27
std::unique_ptr<
flutter::MethodResult<rapidjson::Document>
>
result
);
28
29
// The MethodChannel used for communication with the Flutter engine.
30
std::unique_ptr<flutter::MethodChannel<rapidjson::Document>> channel_;
31
32
// A reference to the GLFW window, if any. Null in headless mode.
33
GLFWwindow* window_;
34
};
35
36
}
// namespace flutter
37
38
#endif
// FLUTTER_SHELL_PLATFORM_GLFW_PLATFORM_HANDLER_H_
flutter::BinaryMessenger
Definition:
binary_messenger.h:28
flutter::MethodCall
Definition:
method_call.h:18
flutter::MethodResult
Definition:
method_result.h:17
flutter::PlatformHandler
Definition:
platform_handler.h:18
flutter::PlatformHandler::PlatformHandler
PlatformHandler(flutter::BinaryMessenger *messenger, GLFWwindow *window)
Definition:
platform_handler.cc:26
window
GLFWwindow * window
Definition:
main.cc:45
method_call
G_BEGIN_DECLS G_MODULE_EXPORT FlMethodCall * method_call
Definition:
fl_method_channel.h:120
result
GAsyncResult * result
Definition:
fl_text_input_plugin.cc:106
flutter
Definition:
asset_manager.cc:10
Generated on Sun Jun 23 2024 21:55:18 for Flutter Engine by
1.9.4