mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Adds APIs for runners to delegate WindowProc handlers into the Flutter engine, and for plugins to register as possible delegates. This allows for plugins to alter top-level window behavior in ways that can only be done from the WindowProc, such as resize control. This functionality remains entirely on the native side, so is synchronous. Part of https://github.com/flutter/flutter/issues/53168
26 lines
739 B
C++
26 lines
739 B
C++
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "flutter/shell/platform/windows/testing/win32_flutter_window_test.h"
|
|
#include "gtest/gtest.h"
|
|
|
|
namespace flutter {
|
|
namespace testing {
|
|
|
|
TEST(Win32FlutterWindowTest, CreateDestroy) {
|
|
Win32FlutterWindowTest window(800, 600);
|
|
ASSERT_TRUE(TRUE);
|
|
}
|
|
|
|
TEST(Win32FlutterWindowTest, CanFontChange) {
|
|
Win32FlutterWindowTest window(800, 600);
|
|
HWND hwnd = window.GetWindowHandle();
|
|
LRESULT result = SendMessage(hwnd, WM_FONTCHANGE, NULL, NULL);
|
|
ASSERT_EQ(result, 0);
|
|
ASSERT_TRUE(window.OnFontChangeWasCalled());
|
|
}
|
|
|
|
} // namespace testing
|
|
} // namespace flutter
|