Skip to content

Commit 4437aa5

Browse files
swift-kimxiaowei-guanwanchao-xubbrto21bwikbs
committed
[Tizen] Initial implementation of Tizen platform shell
Co-authored-by: Swift Kim <[email protected]> Co-authored-by: Xiaowei Guan <[email protected]> Co-authored-by: Wanchao Xu <[email protected]> Co-authored-by: Boram Bae <[email protected]> Co-authored-by: MuHong Byun <[email protected]> Co-authored-by: Seungsoo Lee <[email protected]>
1 parent 4654fc6 commit 4437aa5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+3933
-9
lines changed

DEPS

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ allowed_hosts = [
107107
deps = {
108108
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'a6c0959d1ac8cdfe6f9ff87892bc4905a73699fe',
109109

110+
'src/third_party/tizen_tools': '[email protected]:flutter-tizen/tizen_tools.git',
111+
110112
# Fuchsia compatibility
111113
#
112114
# The dependencies in this section should match the layout in the Fuchsia gn

shell/platform/linux/BUILD.gn

+24-8
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,26 @@
55
assert(is_linux)
66

77
import("//flutter/shell/platform/glfw/config.gni")
8+
import("//flutter/shell/platform/tizen/config.gni")
89
import("//flutter/testing/testing.gni")
910

1011
group("linux") {
11-
deps = [
12-
":flutter_linux_gtk",
13-
":publish_headers_linux",
14-
]
12+
deps = []
13+
1514
if (build_glfw_shell) {
1615
deps += [
1716
":flutter_linux_glfw",
1817
"//flutter/shell/platform/glfw:publish_headers_glfw",
1918
"//flutter/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
2019
]
2120
}
21+
22+
if (build_tizen_shell) {
23+
deps += [
24+
":flutter_linux_tizen",
25+
"//flutter/shell/platform/tizen:publish_headers_tizen",
26+
]
27+
}
2228
}
2329

2430
# Temporary workaround for the issue describe in
@@ -41,6 +47,16 @@ if (build_glfw_shell) {
4147
}
4248
}
4349

50+
if (build_tizen_shell) {
51+
shared_library("flutter_linux_tizen") {
52+
deps = [ "//flutter/shell/platform/tizen:flutter_tizen" ]
53+
54+
configs += [ ":disable_fatal_link_warnings" ]
55+
56+
public_configs = [ "//flutter:config" ]
57+
}
58+
}
59+
4460
_public_headers = [
4561
"public/flutter_linux/fl_basic_message_channel.h",
4662
"public/flutter_linux/fl_binary_codec.h",
@@ -71,7 +87,7 @@ config("relative_flutter_linux_headers") {
7187
source_set("flutter_linux_sources") {
7288
public = _public_headers
7389

74-
configs += [ "//flutter/shell/platform/linux/config:gtk" ]
90+
# configs += [ "//flutter/shell/platform/linux/config:gtk" ]
7591

7692
sources = [
7793
"egl_utils.cc",
@@ -115,8 +131,8 @@ source_set("flutter_linux_sources") {
115131

116132
source_set("flutter_linux") {
117133
configs += [
118-
"//flutter/shell/platform/linux/config:gtk",
119-
"//flutter/shell/platform/linux/config:egl",
134+
# "//flutter/shell/platform/linux/config:gtk",
135+
# "//flutter/shell/platform/linux/config:egl",
120136
"//third_party/khronos:khronos_headers",
121137
]
122138

@@ -156,7 +172,7 @@ executable("flutter_linux_unittests") {
156172

157173
public_configs = [ "//flutter:config" ]
158174

159-
configs += [ "//flutter/shell/platform/linux/config:gtk" ]
175+
# configs += [ "//flutter/shell/platform/linux/config:gtk" ]
160176

161177
# Set flag to allow public headers to be directly included (library users should not do this)
162178
defines = [ "FLUTTER_LINUX_COMPILATION" ]

shell/platform/tizen/BUILD.gn

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
2+
# Copyright 2013 The Flutter Authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
6+
_public_headers = [ "public/flutter_tizen.h" ]
7+
8+
# Any files that are built by clients (client_wrapper code, library headers for
9+
# implementations using this shared code, etc.) include the public headers
10+
# assuming they are in the include path. This configuration should be added to
11+
# any such code that is also built by GN to make the includes work.
12+
config("relative_flutter_tizen_headers") {
13+
include_dirs = [ "public" ]
14+
}
15+
16+
# The headers are a separate source set since the client wrapper is allowed
17+
# to depend on the public headers, but none of the rest of the code.
18+
source_set("flutter_tizen_headers") {
19+
public = _public_headers
20+
21+
public_deps =
22+
[ "//flutter/shell/platform/common/cpp:common_cpp_library_headers" ]
23+
24+
configs +=
25+
[ "//flutter/shell/platform/common/cpp:desktop_library_implementation" ]
26+
27+
public_configs =
28+
[ "//flutter/shell/platform/common/cpp:relative_flutter_library_headers" ]
29+
}
30+
31+
source_set("flutter_tizen") {
32+
sources = [
33+
"channels/key_event_channel.cc",
34+
"channels/lifecycle_channel.cc",
35+
"channels/localization_channel.cc",
36+
"channels/navigation_channel.cc",
37+
"channels/platform_channel.cc",
38+
"channels/platform_view_channel.cc",
39+
"channels/settings_channel.cc",
40+
"channels/text_input_channel.cc",
41+
"external_texture_gl.cc",
42+
"flutter_tizen.cc",
43+
"key_event_handler.cc",
44+
"tizen_embedder_engine.cc",
45+
"tizen_event_loop.cc",
46+
"tizen_surface.cc",
47+
"tizen_surface_gl.cc",
48+
"tizen_vsync_waiter.cc",
49+
"touch_event_handler.cc",
50+
]
51+
52+
configs +=
53+
[ "//flutter/shell/platform/common/cpp:desktop_library_implementation" ]
54+
55+
deps = [
56+
":flutter_tizen_headers",
57+
"//flutter/shell/platform/common/cpp:common_cpp",
58+
"//flutter/shell/platform/common/cpp:common_cpp_input",
59+
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper",
60+
"//flutter/shell/platform/embedder:embedder_as_internal_library",
61+
"//third_party/rapidjson",
62+
]
63+
64+
include_dirs = [
65+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include",
66+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/base",
67+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/dlog",
68+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-1",
69+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-evas-1",
70+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-imf-1",
71+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-imf-evas-1",
72+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-input-1",
73+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-wl2-1",
74+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/efl-1",
75+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/eina-1",
76+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/eina-1/eina",
77+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/emile-1",
78+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/eo-1",
79+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/evas-1",
80+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/system",
81+
]
82+
83+
lib_dirs = [ "//third_party/tizen_tools/sysroot/$target_cpu/usr/lib" ]
84+
85+
cflags_cc = [
86+
"-Wno-newline-eof",
87+
"-Wno-macro-redefined",
88+
]
89+
90+
libs = [
91+
"base-utils-i18n",
92+
"capi-system-info",
93+
"capi-system-system-settings",
94+
"dlog",
95+
"ecore",
96+
"ecore_imf",
97+
"ecore_input",
98+
"ecore_wl2",
99+
"EGL",
100+
"evas",
101+
"GLESv2",
102+
"tbm",
103+
"tdm-client",
104+
"wayland-client",
105+
]
106+
}
107+
108+
copy("publish_headers_tizen") {
109+
sources = _public_headers
110+
outputs = [ "$root_out_dir/{{source_file_part}}" ]
111+
112+
# The Tizen header assumes the presence of the common headers.
113+
deps = [ "//flutter/shell/platform/common/cpp:publish_headers" ]
114+
}

shell/platform/tizen/LICENSE

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
2+
Copyright (c) 2013 The Flutter Authors. All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above
10+
copyright notice, this list of conditions and the following
11+
disclaimer in the documentation and/or other materials provided
12+
with the distribution.
13+
* Neither the names of the copyright holders nor the names of the
14+
contributors may be used to endorse or promote products derived
15+
from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)