[macos] windows & macos should share same cpp code base

This commit is contained in:
Prome
2022-09-12 17:52:19 +08:00
parent f232043ab1
commit aba962527b
9 changed files with 15 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
webview_cef: 1c58878c88cb921c6060d6df87d9fe26990a16a2
webview_cef: 60cb104c4f5d7454500fa260cfbaeb1da3d45292
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c

View File

@@ -161,6 +161,9 @@ class WebviewState extends State<Webview> {
-signal.scrollDelta.dy.round());
}
},
onPointerPanZoomUpdate: (event) {
print(event.panDelta);
},
child: Texture(textureId: _controller._textureId),
)));
}

View File

@@ -9,7 +9,8 @@
#import <Foundation/Foundation.h>
#import "include/wrapper/cef_library_loader.h"
#import "include/cef_app.h"
#import "simple_app.h"
#import "../../common/simple_app.h"
#import "../../common/simple_handler.h"
#include <thread>

View File

@@ -0,0 +1,8 @@
// Relative import to be able to reuse the C sources.
#ifndef CefBridge_h
#define CefBridge_h
#include "../../common/simple_app.cc"
#include "../../common/simple_handler.cc"
#endif

View File

@@ -22,7 +22,7 @@ Flutter webview backed by CEF (Chromium Embedded Framework)
$dir = File.dirname(__FILE__)
$dir = $dir + "/third/cef/**"
s.xcconfig = { "HEADER_SEARCH_PATHS" => $dir}
s.private_header_files = 'Classes/simple_app.h', 'Classes/simple_handler.h'
# s.private_header_files = '../common/simple_app.h', '../common/simple_handler.h'
s.platform = :osx, '10.11'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }