+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class ChromiumEwk
- {
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_back_forward_list_item_url_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_back_forward_list_item_url_get(IntPtr obj);
- internal static string ewk_back_forward_list_item_url_get(IntPtr obj)
- {
- IntPtr ptr = _ewk_back_forward_list_item_url_get(obj);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_back_forward_list_item_title_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_back_forward_list_item_title_get(IntPtr obj);
- internal static string ewk_back_forward_list_item_title_get(IntPtr obj)
- {
- IntPtr ptr = _ewk_back_forward_list_item_title_get(obj);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_back_forward_list_item_original_url_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_back_forward_list_item_original_url_get(IntPtr obj);
- internal static string ewk_back_forward_list_item_original_url_get(IntPtr obj)
- {
- IntPtr ptr = _ewk_back_forward_list_item_original_url_get(obj);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern IntPtr ewk_back_forward_list_current_item_get(IntPtr backforwardlist);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern IntPtr ewk_back_forward_list_previous_item_get(IntPtr backforwardlist);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern uint ewk_back_forward_list_count(IntPtr backforwardlist);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern IntPtr ewk_back_forward_list_n_back_items_copy(IntPtr backforwardlist, int limit);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern IntPtr ewk_back_forward_list_n_forward_items_copy(IntPtr backforwardlist, int limit);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class ChromiumEwk
- {
- public enum CacheModel
- {
- DocumentViewer,
- DocumentBrowser,
- PrimaryWebBrowser
- }
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern IntPtr ewk_context_cookie_manager_get(IntPtr context);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_context_cache_model_set(IntPtr context, CacheModel model);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern CacheModel ewk_context_cache_model_get(IntPtr context);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_context_resource_cache_clear(IntPtr context);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_context_notify_low_memory(IntPtr context);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void DownloadStartCallback(string url, IntPtr userData);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_context_did_start_download_callback_set(IntPtr context, DownloadStartCallback callback, IntPtr userData);
-
- [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void InterceptRequestCallback(IntPtr context, IntPtr request, IntPtr userData);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_context_intercept_request_callback_set(IntPtr context, InterceptRequestCallback callback, IntPtr userData);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern uint ewk_context_inspector_server_start(IntPtr context, uint port);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_context_inspector_server_stop(IntPtr context);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen.WebView;
-
-internal static partial class Interop
-{
- internal static partial class ChromiumEwk
- {
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern int ewk_context_menu_item_tag_get(IntPtr contextMenuItem);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern int ewk_context_menu_item_count(IntPtr contextMenu);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern IntPtr ewk_context_menu_nth_item_get(IntPtr contextMenu, int n);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_context_menu_item_remove(IntPtr contextMenu, IntPtr contextMenuItem);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_context_menu_item_append_as_action(IntPtr contextMenu, ContextMenuItemTag tag, string title, bool enabled);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_context_menu_item_append(IntPtr contextMenu, ContextMenuItemTag tag, string title, string iconPath, bool enabled);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class ChromiumEwk
- {
- public enum CookieAcceptPolicy
- {
- Always,
- Never,
- NoThirdParty
- }
-
- public enum CookiePersistentStorage
- {
- Text,
- SqlLite
- }
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_cookie_manager_accept_policy_set(IntPtr manager, CookieAcceptPolicy policy);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_cookie_manager_cookies_clear(IntPtr manager);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_cookie_manager_persistent_storage_set(IntPtr manager, string path, CookiePersistentStorage storage);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class ChromiumEwk
- {
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_error_url_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_error_url_get(IntPtr error);
-
- internal static string ewk_error_url_get(IntPtr error)
- {
- IntPtr ptr = _ewk_error_url_get(error);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern int ewk_error_code_get(IntPtr error);
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_error_description_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_error_description_get(IntPtr error);
-
- internal static string ewk_error_description_get(IntPtr error)
- {
- IntPtr ptr = _ewk_error_description_get(error);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_error_cancellation_get(IntPtr error);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class ChromiumEwk
- {
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_intercept_request_ignore(IntPtr request);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal unsafe static extern bool ewk_intercept_request_response_set(IntPtr request, string headers, byte* body, uint length);
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_intercept_request_url_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_intercept_request_url_get(IntPtr request);
-
- internal static string ewk_intercept_request_url_get(IntPtr request)
- {
- IntPtr ptr = _ewk_intercept_request_url_get(request);
- return Marshal.PtrToStringAnsi(ptr);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen.WebView;
-
-internal static partial class Interop
-{
- internal static partial class ChromiumEwk
- {
- public enum PolicyDecisionType {
- Use,
- Download,
- Ignore
- };
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_policy_decision_url_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_policy_decision_url_get(IntPtr policydecision);
- internal static string ewk_policy_decision_url_get(IntPtr policydecision)
- {
- IntPtr ptr = _ewk_policy_decision_url_get(policydecision);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_policy_decision_scheme_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_policy_decision_scheme_get(IntPtr policydecision);
- internal static string ewk_policy_decision_scheme_get(IntPtr policydecision)
- {
- IntPtr ptr = _ewk_policy_decision_scheme_get(policydecision);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_policy_decision_cookie_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_policy_decision_cookie_get(IntPtr policydecision);
- internal static string ewk_policy_decision_cookie_get(IntPtr policydecision)
- {
- IntPtr ptr = _ewk_policy_decision_cookie_get(policydecision);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern NavigationType ewk_policy_decision_navigation_type_get(IntPtr policydecision);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern PolicyDecisionType ewk_policy_decision_type_get(IntPtr policydecision);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern int ewk_policy_decision_response_status_code_get(IntPtr policydecision);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_policy_decision_is_main_frame(IntPtr policydecision);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_policy_decision_ignore(IntPtr policydecision);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_policy_decision_use(IntPtr policydecision);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class ChromiumEwk
- {
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_javascript_enabled_set(IntPtr settings, bool enable);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_javascript_enabled_get(IntPtr settings);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_loads_images_automatically_set(IntPtr settings, bool enable);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_loads_images_automatically_get(IntPtr settings);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_default_text_encoding_name_set(IntPtr settings, string encoding);
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_settings_default_text_encoding_name_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_settings_default_text_encoding_name_get(IntPtr settings);
-
- internal static string ewk_settings_default_text_encoding_name_get(IntPtr settings)
- {
- IntPtr ptr = _ewk_settings_default_text_encoding_name_get(settings);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_default_font_size_set(IntPtr settings, int size);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern int ewk_settings_default_font_size_get(IntPtr settings);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_scripts_can_open_windows_set(IntPtr settings, bool enable);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_scripts_can_open_windows_get(IntPtr settings);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_force_zoom_set(IntPtr settings, bool enable);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_force_zoom_get(IntPtr settings);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_text_autosizing_enabled_set(IntPtr settings, bool enable);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_text_autosizing_enabled_get(IntPtr settings);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_text_zoom_enabled_set(IntPtr settings, bool enable);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_text_zoom_enabled_get(IntPtr settings);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_uses_keypad_without_user_action_set(IntPtr settings, bool enable);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_uses_keypad_without_user_action_get(IntPtr settings);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_extra_feature_set(IntPtr settings, string name, bool enable);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_settings_extra_feature_get(IntPtr settings, string name);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-using Tizen.Internals;
-using Tizen.WebView;
-
-internal static partial class Interop
-{
- internal static partial class ChromiumEwk
- {
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern IntPtr ewk_view_add(IntPtr evas);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern IntPtr ewk_view_context_get(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern IntPtr ewk_view_settings_get(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern IntPtr ewk_view_back_forward_list_get(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_view_back_forward_list_clear(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_url_set(IntPtr obj, string url);
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_view_url_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_view_url_get(IntPtr obj);
-
- internal static string ewk_view_url_get(IntPtr obj)
- {
- IntPtr ptr = _ewk_view_url_get(obj);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_html_string_load(IntPtr obj, string html, string baseUrl, string unreachableUrl);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_reload(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_stop(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_back(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_forward(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_back_possible(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_forward_possible(IntPtr obj);
-
- [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
- internal delegate void ScriptExcuteCallback(IntPtr obj, IntPtr returnValue, IntPtr userData);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_script_execute(IntPtr obj, string script, ScriptExcuteCallback callback, IntPtr userData);
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_view_title_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_view_title_get(IntPtr obj);
-
- internal static string ewk_view_title_get(IntPtr obj)
- {
- IntPtr ptr = _ewk_view_title_get(obj);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk, EntryPoint = "ewk_view_user_agent_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
- internal static extern IntPtr _ewk_view_user_agent_get(IntPtr obj);
-
- internal static string ewk_view_user_agent_get(IntPtr obj)
- {
- IntPtr ptr = _ewk_view_user_agent_get(obj);
- return Marshal.PtrToStringAnsi(ptr);
- }
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_user_agent_set(IntPtr obj, string userAgent);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_focus_set(IntPtr obj, bool focused);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_focus_get(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_contents_size_get(IntPtr obj, out int width, out int height);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_fullscreen_exit(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern double ewk_view_load_progress_get(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_view_orientation_send(IntPtr obj, Orientation orientation);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_view_suspend(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_view_resume(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern double ewk_view_scale_get(IntPtr obj);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_scale_set(IntPtr obj, double scaleFactor, int cX, int cY);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_visibility_set(IntPtr obj, bool enable);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_scroll_pos_get(IntPtr obj, out int X, out int Y);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_scroll_set(IntPtr obj, int X, int Y);
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern void ewk_view_scroll_by(IntPtr obj, int X, int Y);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_text_find(IntPtr obj, string text, FindOption option, int maxMatchCount);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_url_request_set(IntPtr obj, string url, HttpMethod method, IntPtr headers, string body);
-
- [NativeStruct("Ewk_Script_Message", Include="ewk_view.h", PkgConfig="chromium-efl")]
- [StructLayout(LayoutKind.Sequential, CharSet =CharSet.Ansi)]
- internal struct ScriptMessage
- {
- public IntPtr name;
- public IntPtr body;
- }
-
- internal delegate void ScriptMessageCallback(IntPtr obj, ScriptMessage message);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_javascript_message_handler_add(IntPtr obj, ScriptMessageCallback callback, string name);
-
- [DllImport(Libraries.ChromiumEwk)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool ewk_view_evaluate_javascript(IntPtr obj, string name, string result);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class ChromiumEwk
- {
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern int ewk_init();
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern int ewk_shutdown();
-
- [DllImport(Libraries.ChromiumEwk)]
- internal static extern int ewk_set_arguments(int argc, string[] argv);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class Eina
- {
- [DllImport(Libraries.Eina)]
- internal static extern IntPtr eina_hash_string_small_new(IntPtr dataFreeCb);
-
- [DllImport(Libraries.Eina)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool eina_hash_add(IntPtr hash, IntPtr Key, IntPtr Value);
-
- [DllImport(Libraries.Eina)]
- internal static extern IntPtr eina_list_iterator_new(IntPtr list);
-
- [DllImport(Libraries.Eina)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool eina_iterator_next(IntPtr iterator, out IntPtr data);
-
- [DllImport(Libraries.Eina)]
- internal static extern void eina_iterator_free(IntPtr list);
-
- [DllImport(Libraries.Eina)]
- internal static extern IntPtr eina_list_free(IntPtr list);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class Elementary
- {
- [DllImport(Libraries.Elementary)]
- internal static extern IntPtr elm_layout_add(IntPtr obj);
-
- [DllImport(Libraries.Elementary)]
- [return: MarshalAs(UnmanagedType.U1)]
- internal static extern bool elm_layout_theme_set(IntPtr obj, string klass, string group, string style);
-
- [DllImport(Libraries.Elementary)]
- internal static extern void elm_object_part_content_set(IntPtr obj, string part, IntPtr content);
-
- [DllImport(Libraries.Elementary)]
- internal static extern void elm_object_focus_allow_set(IntPtr obj, bool enable);
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
- internal static partial class Evas
- {
- [DllImport(Libraries.Evas)]
- internal static extern IntPtr evas_object_evas_get(IntPtr obj);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-internal static partial class Interop
-{
- private static class Libraries
- {
- internal const string ChromiumEwk = "libchromium-ewk.so";
- internal const string Elementary = "libelementary.so.1";
- internal const string Evas = "libevas.so.1";
- internal const string Eina = "libeina.so.1";
- }
-}
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
- </PropertyGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\ElmSharp\ElmSharp.csproj" />
- </ItemGroup>
-
-</Project>
\ No newline at end of file
+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26430.12
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.WebView", "Tizen.WebView.csproj", "{8A77A6CA-543D-48CB-BBD8-1706EC47D57A}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp", "..\ElmSharp\ElmSharp.csproj", "{2F66C9E2-BE24-4096-96DA-F86CCFBBB059}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen", "..\Tizen\Tizen.csproj", "{B1B8B7CA-5E39-42BA-90EF-4F4DDA51F37C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Log", "..\Tizen.Log\Tizen.Log.csproj", "{7C6A8E2F-7DF0-4994-8230-FB1234F3DF4C}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {8A77A6CA-543D-48CB-BBD8-1706EC47D57A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8A77A6CA-543D-48CB-BBD8-1706EC47D57A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8A77A6CA-543D-48CB-BBD8-1706EC47D57A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8A77A6CA-543D-48CB-BBD8-1706EC47D57A}.Release|Any CPU.Build.0 = Release|Any CPU
- {2F66C9E2-BE24-4096-96DA-F86CCFBBB059}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2F66C9E2-BE24-4096-96DA-F86CCFBBB059}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2F66C9E2-BE24-4096-96DA-F86CCFBBB059}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2F66C9E2-BE24-4096-96DA-F86CCFBBB059}.Release|Any CPU.Build.0 = Release|Any CPU
- {B1B8B7CA-5E39-42BA-90EF-4F4DDA51F37C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B1B8B7CA-5E39-42BA-90EF-4F4DDA51F37C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B1B8B7CA-5E39-42BA-90EF-4F4DDA51F37C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B1B8B7CA-5E39-42BA-90EF-4F4DDA51F37C}.Release|Any CPU.Build.0 = Release|Any CPU
- {7C6A8E2F-7DF0-4994-8230-FB1234F3DF4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7C6A8E2F-7DF0-4994-8230-FB1234F3DF4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7C6A8E2F-7DF0-4994-8230-FB1234F3DF4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7C6A8E2F-7DF0-4994-8230-FB1234F3DF4C}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {D2305D88-057A-4565-9162-906A79DEF26B}
- EndGlobalSection
-EndGlobal
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Collections.Generic;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// This class provides the properties of Back Forward list item of a specific WebView.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class BackForwardListItem
- {
- private IntPtr _item_handle;
-
- /// <summary>
- /// Creates a Back Forward List Item object.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- internal BackForwardListItem(IntPtr handle)
- {
- _item_handle = handle;
- }
-
- /// <summary>
- /// Url of the back forward list item.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Url
- {
- get
- {
- return Interop.ChromiumEwk.ewk_back_forward_list_item_url_get(_item_handle);
- }
- }
-
- /// <summary>
- /// Title of the back forward list item.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Title
- {
- get
- {
- return Interop.ChromiumEwk.ewk_back_forward_list_item_title_get(_item_handle);
- }
- }
-
- /// <summary>
- /// Original Url of the back forward list item.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string OriginalUrl
- {
- get
- {
- return Interop.ChromiumEwk.ewk_back_forward_list_item_original_url_get(_item_handle);
- }
- }
- }
-
- /// <summary>
- /// This class provides the properties of Back Forward list of a specific WebView.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class BackForwardList
- {
- private IntPtr _list_handle;
-
- internal BackForwardList(IntPtr handle)
- {
- _list_handle = handle;
- }
-
- /// <summary>
- /// Current item of the back forward list.
- /// </summary>
- /// <remarks>
- /// BackForward List can be null if there is no current item.
- /// </remarks>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public BackForwardListItem CurrentItem
- {
- get
- {
- IntPtr itemPtr = Interop.ChromiumEwk.ewk_back_forward_list_current_item_get(_list_handle);
- if(itemPtr != null) {
- BackForwardListItem item = new BackForwardListItem(itemPtr);
- return item;
- }
- else {
- return null;
- }
- }
- }
-
- /// <summary>
- /// Previous item of the back forward list and null if no previous item.
- /// </summary>
- /// <remarks>
- /// BackForward List can be null if there is no previous item.
- /// </remarks>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public BackForwardListItem PreviousItem
- {
- get
- {
- IntPtr itemPtr = Interop.ChromiumEwk.ewk_back_forward_list_previous_item_get(_list_handle);
- if(itemPtr != null) {
- BackForwardListItem item = new BackForwardListItem(itemPtr);
- return item;
- }
- else {
- return null;
- }
- }
- }
-
- /// <summary>
- /// Gets the back forward list count.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public uint Count
- {
- get
- {
- return Interop.ChromiumEwk.ewk_back_forward_list_count(_list_handle);
- }
- }
- /// <summary>
- /// Gets the list containing the items preceding the current item
- /// limited by limit.
- /// </summary>
- /// <param name="limit"> limit The number of items to retrieve, if limit -1 all items preceding current item are returned.</param>
- /// <returns>The list of the BackForwardListItem of back items.</returns>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public IList<BackForwardListItem> BackItems(int limit)
- {
- IntPtr list = Interop.ChromiumEwk.ewk_back_forward_list_n_back_items_copy(_list_handle, limit);
- List<BackForwardListItem> backItemsList = new List<BackForwardListItem>();
-
- var iter = Interop.Eina.eina_list_iterator_new(list);
- for (IntPtr data; Interop.Eina.eina_iterator_next(iter, out data);) {
- backItemsList.Add(new BackForwardListItem(data));
- }
-
- Interop.Eina.eina_iterator_free(iter);
- Interop.Eina.eina_list_free(list);
-
- return backItemsList;
- }
-
- /// <summary>
- /// Gets the list containing the items following the current item
- /// limited by limit.
- /// </summary>
- /// <param name="limit"> limit The number of items to retrieve, if limit is -1 all items following current item are returned.</param>
- /// <returns>The list of the BackForwardListItem of forward items.</returns>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public IList<BackForwardListItem> ForwardItems(int limit)
- {
- IntPtr list = Interop.ChromiumEwk.ewk_back_forward_list_n_forward_items_copy(_list_handle, limit);
- List<BackForwardListItem> forwardItemsList = new List<BackForwardListItem>();
-
- var iter = Interop.Eina.eina_list_iterator_new(list);
- for (IntPtr data; Interop.Eina.eina_iterator_next(iter, out data);) {
- forwardItemsList.Add(new BackForwardListItem(data));
- }
-
- Interop.Eina.eina_iterator_free(iter);
- Interop.Eina.eina_list_free(list);
-
- return forwardItemsList;
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.ComponentModel;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// This class provides the methods to initialize and shutdown the Chromium-efl.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public static class Chromium
- {
- /// <summary>
- /// Initializes the Chromium's instance.
- /// </summary>
- /// <returns>A reference count of the Chromium's instance.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public static int Initialize()
- {
- return Interop.ChromiumEwk.ewk_init();
- }
-
- /// <summary>
- /// Decreases a reference count of the WebKit's instance, possibly destroying it.
- /// </summary>
- /// <returns>A reference count of the Chromium's instance.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public static int Shutdown()
- {
- return Interop.ChromiumEwk.ewk_shutdown();
- }
-
- /// <summary>
- /// Sets argument count and argument array for Chromium.
- /// </summary>
- /// <param name="args">Argument array. The first value of array must be program's name.</param>
- /// <since_tizen> 6 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public static void SetArguments(string[] args)
- {
- Interop.ChromiumEwk.ewk_set_arguments(args.Length, args);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.ComponentModel;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// Enumeration for cache model options.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public enum CacheModel
- {
- /// <summary>
- /// Use the smallest cache capacity.
- /// </summary>
- DocumentViewer,
- /// <summary>
- /// Use the bigger cache capacity than DocumentBrowser.
- /// </summary>
- DocumentBrowser,
- /// <summary>
- /// Use the biggest cache capacity.
- /// </summary>
- PrimaryWebBrowser
- }
-
- /// <summary>
- /// This class encapsulates all the pages related to the specific use of the Chromium-efl.
- /// </summary>
- /// <remarks>
- /// Applications have the option of creating a context different from the default one and using it for a group of pages.
- /// All pages in the same context share the same preferences, visited link set, local storage, and so on.
- /// </remarks>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class Context
- {
- private IntPtr _handle;
- private CookieManager _cookieManager;
-
- private Interop.ChromiumEwk.DownloadStartCallback _downloadStartCallback;
- private Interop.ChromiumEwk.InterceptRequestCallback _interceptRequestCallback;
-
- /// <summary>
- /// The delegate for handling download request.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- /// <param name="url"> url of the download request. </param>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public delegate void DownloadRequestDelegate(string url);
-
- /// <summary>
- /// The delegate for intercepting and handling a resource request.
- /// </summary>
- /// <since_tizen> 8 </since_tizen>
- /// <param name="interceptor"> The object which can handle a intercepted request. </param>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public delegate void InterceptRequestDelegate(RequestInterceptor interceptor);
-
- internal Context(IntPtr handle)
- {
- _handle = handle;
- }
-
- /// <summary>
- /// The cache model.
- /// </summary>
- /// <remarks>
- /// The default cache model is DocumentViewer.
- /// </remarks>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public CacheModel CacheModel
- {
- get
- {
- return (CacheModel)Interop.ChromiumEwk.ewk_context_cache_model_get(_handle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_context_cache_model_set(_handle, (Interop.ChromiumEwk.CacheModel)value);
- }
- }
-
- /// <summary>
- /// Gets the CookieManager object for this context.
- /// </summary>
- /// <returns>The CookieManager object.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public CookieManager GetCookieManager()
- {
- if (_cookieManager == null)
- {
- IntPtr cookieManagerHandle = Interop.ChromiumEwk.ewk_context_cookie_manager_get(_handle);
- if (cookieManagerHandle == IntPtr.Zero)
- {
- return null;
- }
- _cookieManager = new CookieManager(cookieManagerHandle);
- }
- return _cookieManager;
- }
-
- /// <summary>
- /// Clears HTTP caches in the local storage and all resources cached in memory.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void ClearResourceCache()
- {
- Interop.ChromiumEwk.ewk_context_resource_cache_clear(_handle);
- }
-
- /// <summary>
- /// Informs the WebEngine low memory to release unused memory.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void NotifyLowMemory()
- {
- Interop.ChromiumEwk.ewk_context_notify_low_memory(_handle);
- }
-
- /// <summary>
- /// Sets the delegate function for download request.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetDownloadRequestDelegate(DownloadRequestDelegate startDownloadCb)
- {
- _downloadStartCallback = (string url, IntPtr userData) =>
- {
- startDownloadCb(url);
- };
- Interop.ChromiumEwk.ewk_context_did_start_download_callback_set(_handle, _downloadStartCallback, IntPtr.Zero);
- }
-
- /// <summary>
- /// Sets the delegate function for intercepting a resource request.
- /// </summary>
- /// <since_tizen> 8 </since_tizen>
- /// <param name="interceptRequestCb"> The delegate function for intercepting a resource request. </param>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetInterceptRequestDelegate(InterceptRequestDelegate interceptRequestCb)
- {
- _interceptRequestCallback = (IntPtr context, IntPtr request, IntPtr userData) =>
- {
- interceptRequestCb(new RequestInterceptor(request));
- };
- Interop.ChromiumEwk.ewk_context_intercept_request_callback_set(_handle, _interceptRequestCallback, IntPtr.Zero);
-
- }
-
- /// <summary>
- /// Starts the inspector server.
- /// </summary>
- /// <since_tizen> 8 </since_tizen>
- /// <param name="port"> The port number. </param>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public uint StartInspectorServer(uint port)
- {
- return Interop.ChromiumEwk.ewk_context_inspector_server_start(_handle, port);
- }
-
- /// <summary>
- /// Stops the inspector server.
- /// </summary>
- /// <since_tizen> 8 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void StopInspectorServer()
- {
- Interop.ChromiumEwk.ewk_context_inspector_server_stop(_handle);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.ComponentModel;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// Enumeration for Context Menu Item Tag.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public enum ContextMenuItemTag
- {
- /// <summary>
- /// No action
- /// </summary>
- NoAction = 0,
- /// <summary>
- /// Open link in new window.
- /// </summary>
- OpenInNewWindow,
- /// <summary>
- /// Download link to disk.
- /// </summary>
- DownloadLinkToDisk,
- /// <summary>
- /// Copy link to clipboard.
- /// </summary>
- CopyLinkToClipboard,
- /// <summary>
- /// Open image in new window.
- /// </summary>
- OpenImageInNewWindow,
- /// <summary>
- /// Open image in current window.
- /// </summary>
- OpenImageInCurrentWindow,
- /// <summary>
- /// Download image to disk.
- /// </summary>
- DownloadImageToDisk,
- /// <summary>
- /// Copy image to clipboard.
- /// </summary>
- CopyImageToClipboard,
- /// <summary>
- /// Open frame in new window.
- /// </summary>
- OpenFrameInNewWindow,
- /// <summary>
- /// Copy.
- /// </summary>
- Copy,
- /// <summary>
- /// Go back.
- /// </summary>
- GoBack,
- /// <summary>
- /// Go forward.
- /// </summary>
- GoForward,
- /// <summary>
- /// Stop.
- /// </summary>
- Stop,
- /// <summary>
- /// Share.
- /// </summary>
- Share,
- /// <summary>
- /// Reload.
- /// </summary>
- Reload,
- /// <summary>
- /// Cut.
- /// </summary>
- Cut,
- /// <summary>
- /// Paste.
- /// </summary>
- Paste,
- /// <summary>
- /// Spelling guess.
- /// </summary>
- SpellingGuess,
- /// <summary>
- /// Guess found.
- /// </summary>
- NoGuessFound,
- /// <summary>
- /// Ignore spelling.
- /// </summary>
- IgnoreSpelling,
- /// <summary>
- /// Learn spelling.
- /// </summary>
- LearnSpelling,
- /// <summary>
- /// Other.
- /// </summary>
- Other,
- /// <summary>
- /// Search in spotlight.
- /// </summary>
- SearchInSpotlight,
- /// <summary>
- /// Search web.
- /// </summary>
- SearchWeb,
- /// <summary>
- /// Look up in dictionary.
- /// </summary>
- LookUpInDictionary,
- /// <summary>
- /// Open with default application.
- /// </summary>
- OpenWithDefaultApplication,
- /// <summary>
- /// PDF actual size.
- /// </summary>
- PdfActualSize,
- /// <summary>
- /// PDF zoom in.
- /// </summary>
- PdfZoomIn,
- /// <summary>
- /// PDF zoom out.
- /// </summary>
- PdfZoomOut,
- /// <summary>
- /// PDF auto size.
- /// </summary>
- PdfAutoSize,
- /// <summary>
- /// PDF single page.
- /// </summary>
- PdfSinglePage,
- /// <summary>
- /// PDF facting page.
- /// </summary>
- PdfFactingPage,
- /// <summary>
- /// PDF continuous.
- /// </summary>
- PdfContinuous,
- /// <summary>
- /// PDF next page.
- /// </summary>
- PdfNextPage,
- /// <summary>
- /// PDF previous page.
- /// </summary>
- PdfPreviousPage,
- /// <summary>
- /// Open link.
- /// </summary>
- OpenLink,
- /// <summary>
- /// Ignore grammar.
- /// </summary>
- IgnoreGrammar,
- /// <summary>
- /// Spelling menu.
- /// </summary>
- SpellingMenu,
- /// <summary>
- /// Show spelling panel.
- /// </summary>
- ShowSpellingPanel,
- /// <summary>
- /// Check spelling.
- /// </summary>
- CheckSpelling,
- /// <summary>
- /// Check spelling white typing.
- /// </summary>
- CheckSpellingWhileTyping,
- /// <summary>
- /// Check grammar with spelling.
- /// </summary>
- CheckGrammarWithSpelling,
- /// <summary>
- /// Font menu.
- /// </summary>
- FontMenu,
- /// <summary>
- /// Show fonts.
- /// </summary>
- ShowFonts,
- /// <summary>
- /// Bold.
- /// </summary>
- Bold,
- /// <summary>
- /// Italic.
- /// </summary>
- Italic,
- /// <summary>
- /// Underline.
- /// </summary>
- Underline,
- /// <summary>
- /// Outline.
- /// </summary>
- Outline,
- /// <summary>
- /// Style.
- /// </summary>
- Style,
- /// <summary>
- /// Show colors.
- /// </summary>
- ShowColors,
- /// <summary>
- /// Speech menu.
- /// </summary>
- SpeechMenu,
- /// <summary>
- /// Start speaking.
- /// </summary>
- StartSpeaking,
- /// <summary>
- /// Stop speaking.
- /// </summary>
- StopSpeaking,
- /// <summary>
- /// Writing direction menu.
- /// </summary>
- WritingDirectionMenu,
- /// <summary>
- /// Default direction.
- /// </summary>
- DefaultDirection,
- /// <summary>
- /// Left to right.
- /// </summary>
- LeftToRight,
- /// <summary>
- /// Right to left.
- /// </summary>
- RightToLeft,
- /// <summary>
- /// PDF single page scrolling.
- /// </summary>
- PdfSinglePageScrolling,
- /// <summary>
- /// PDF facing page scrolling.
- /// </summary>
- PdfFacingPageScrolling,
- /// <summary>
- /// Inspect element.
- /// </summary>
- InspectElement,
- /// <summary>
- /// Text direction menu.
- /// </summary>
- TextDirectionMenu,
- /// <summary>
- /// Text direction default.
- /// </summary>
- TextDirectionDefault,
- /// <summary>
- /// Text direction left to right.
- /// </summary>
- TextDirectionLeftToRight,
- /// <summary>
- /// Text direction right to left.
- /// </summary>
- TextDirectionRightToLeft,
- /// <summary>
- /// Correct spelling automatically.
- /// </summary>
- CorrectSpellingAutomatically,
- /// <summary>
- /// Substitutions menu.
- /// </summary>
- SubstitutionsMenu,
- /// <summary>
- /// Show substitutions.
- /// </summary>
- ShowSubstitutions,
- /// <summary>
- /// Smart copy paste.
- /// </summary>
- SmartCopyPaste,
- /// <summary>
- /// Smart quotes.
- /// </summary>
- SmartQuotes,
- /// <summary>
- /// Smart dashes.
- /// </summary>
- SmartDashes,
- /// <summary>
- /// Smart links.
- /// </summary>
- SmartLinks,
- /// <summary>
- /// Text replacement.
- /// </summary>
- TextReplacement,
- /// <summary>
- /// Transformation menu.
- /// </summary>
- TransformationMenu,
- /// <summary>
- /// Make upper case.
- /// </summary>
- MakeUpperCase,
- /// <summary>
- /// Make lower case.
- /// </summary>
- MakeLowerCase,
- /// <summary>
- /// Capitalize.
- /// </summary>
- Capitalize,
- /// <summary>
- /// Change back.
- /// </summary>
- ChangeBack,
- /// <summary>
- /// Open media in new window.
- /// </summary>
- OpenMediaInNewWindow,
- /// <summary>
- /// Copy media link to clipboard.
- /// </summary>
- CopyMediaLinkToClipboard,
- /// <summary>
- /// Toggle media controls.
- /// </summary>
- ToggleMediaControls,
- /// <summary>
- /// Toggle media loop.
- /// </summary>
- ToggleMediaLoop,
- /// <summary>
- /// Enter video fullscreen.
- /// </summary>
- EnterVideoFullscreen,
- /// <summary>
- /// Media play pause.
- /// </summary>
- MediaPlayPause,
- /// <summary>
- /// Media mute.
- /// </summary>
- MediaMute,
- /// <summary>
- /// Dictation alternative.
- /// </summary>
- DictationAlternative,
- /// <summary>
- /// Select all.
- /// </summary>
- SelectAll,
- /// <summary>
- /// Select word.
- /// </summary>
- SelectWord,
- /// <summary>
- /// Text selection mode.
- /// </summary>
- TextSelectonMode,
- /// <summary>
- /// Clipboard.
- /// </summary>
- Clipboard,
- /// <summary>
- /// Drag.
- /// </summary>
- Drag,
- /// <summary>
- /// Translate.
- /// </summary>
- Translate,
- /// <summary>
- /// Copy link data.
- /// </summary>
- CopyLinkData,
- /// <summary>
- /// If app want to add customized item, use enum value after BaseApplicationTag.
- /// </summary>
- BaseApplicationTag = 10000
- }
-
- /// <summary>
- /// This class provides the properties of Context Menu item.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class ContextMenuItem
- {
- private IntPtr _handle;
-
- internal ContextMenuItem(IntPtr handle)
- {
- _handle = handle;
- }
-
- internal IntPtr GetHandle()
- {
- return _handle;
- }
-
- /// <summary>
- /// Gets Tag of the context menu item.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public ContextMenuItemTag ItemTag
- {
- get
- {
- return (ContextMenuItemTag) Interop.ChromiumEwk.ewk_context_menu_item_tag_get(_handle);
- }
- }
- }
-
- /// <summary>
- /// Arguments from the ContextMenuItem event.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class ContextMenuItemEventArgs : EventArgs
- {
- internal ContextMenuItemEventArgs(ContextMenuItem item)
- {
- Item = item;
- }
-
- /// <summary>
- /// Gets the context menu item.
- /// </summary>
- /// <returns>The context menu item.</returns>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public ContextMenuItem Item { get; }
-
- internal static ContextMenuItemEventArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
- {
- return new ContextMenuItemEventArgs(new ContextMenuItem(info));
- }
- }
-
- /// <summary>
- /// This class provides the properties of Context Menu.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class ContextMenu
- {
- private IntPtr _handle;
-
- internal ContextMenu(IntPtr handle)
- {
- _handle = handle;
- }
-
- /// <summary>
- /// Gets the context menu items count.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public int ItemCount
- {
- get
- {
- return Interop.ChromiumEwk.ewk_context_menu_item_count(_handle);
- }
- }
-
- /// <summary>
- /// Gets Nth item of the context menu.
- /// </summary>
- /// <param name="n"> To get item at index n.</param>
- /// <returns>The context menu item.</returns>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public ContextMenuItem GetItemAtIndex(int n)
- {
- IntPtr itemHandle = Interop.ChromiumEwk.ewk_context_menu_nth_item_get(_handle, n);
- return new ContextMenuItem(itemHandle);
- }
-
- /// <summary>
- /// Removes item from the context menu.
- /// </summary>
- /// <param name="item"> The context menu item to be removed.</param>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void RemoveItem(ContextMenuItem item)
- {
- IntPtr itemHandle = item.GetHandle();
- Interop.ChromiumEwk.ewk_context_menu_item_remove(_handle, itemHandle);
- }
-
- /// <summary>
- /// Appends item to the context menu.
- /// </summary>
- /// <param name="tag"> The tag of context menu item.</param>
- /// <param name="title"> The title of context menu item.</param>
- /// <param name="iconPath"> The path of icon to be set on context menu item.</param>
- /// <param name="enabled"> if true the context menu item is enabled else false.</param>
- /// <returns>Appended context menu item.</returns>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public ContextMenuItem AppendItem(ContextMenuItemTag tag, string title, string iconPath, bool enabled)
- {
- bool ret = false;
- if(string.IsNullOrEmpty(iconPath))
- ret = Interop.ChromiumEwk.ewk_context_menu_item_append_as_action(_handle, tag, title, enabled);
- else
- ret = Interop.ChromiumEwk.ewk_context_menu_item_append(_handle, tag, title, iconPath, enabled);
-
- return ret ? GetItemAtIndex(ItemCount - 1) : null;
- }
- }
-
- internal class ContextMenuCustomizeEventArgs : EventArgs
- {
- internal ContextMenuCustomizeEventArgs(ContextMenu menu)
- {
- Menu = menu;
- }
-
- internal ContextMenu Menu { get; }
-
- internal static ContextMenuCustomizeEventArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
- {
- return new ContextMenuCustomizeEventArgs(new ContextMenu(info));
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-using System;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// Enumeration for the cookies accept policies.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public enum CookieAcceptPolicy
- {
- /// <summary>
- /// Accepts every cookie sent from any page.
- /// </summary>
- Always,
- /// <summary>
- /// Rejects all the cookies.
- /// </summary>
- Never,
- /// <summary>
- /// Accepts only cookies set by the main document that is loaded.
- /// </summary>
- NoThirdParty
- }
-
- /// <summary>
- /// Enumeration for creating a type name for the storage of persistent cookies.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public enum CookiePersistentStorage
- {
- /// <summary>
- /// Cookies are stored in a text file in the Mozilla "cookies.txt" format.
- /// </summary>
- [Obsolete("Deprecated since API level 8.")]
- Text,
- /// <summary>
- /// Cookies are stored in a SQLite file in the current Mozilla format.
- /// </summary>
- SqlLite
- }
-
- /// <summary>
- /// This class provides methods for the cookie manager.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class CookieManager
- {
- private IntPtr _handle;
-
- internal CookieManager(IntPtr handle)
- {
- _handle = handle;
- }
-
- /// <summary>
- /// Sets the cookie acceptance policy.
- /// </summary>
- /// <remarks>
- /// By default, only cookies set by the main document that is loaded, are accepted.
- /// </remarks>
- /// <param name="policy">The cookie acceptance policy.</param>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetCookieAcceptPolicy(CookieAcceptPolicy policy)
- {
- Interop.ChromiumEwk.ewk_cookie_manager_accept_policy_set(_handle, (Interop.ChromiumEwk.CookieAcceptPolicy)policy);
- }
-
- /// <summary>
- /// Deletes all the cookies.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void ClearCookies()
- {
- Interop.ChromiumEwk.ewk_cookie_manager_cookies_clear(_handle);
- }
-
- /// <summary>
- /// Sets the storage where the non-session cookies are stored persistently, to read/write the cookies.
- /// </summary>
- /// <privilege>http://tizen.org/privilege/mediastorage</privilege>
- /// <privilege>http://tizen.org/privilege/externalstorage</privilege>
- /// <param name="path">The path where to read/write cookies.</param>
- /// <param name="storage">The type of storage.</param>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetPersistentStorage(string path, CookiePersistentStorage storage)
- {
- Interop.ChromiumEwk.ewk_cookie_manager_persistent_storage_set(_handle, path, (Interop.ChromiumEwk.CookiePersistentStorage)storage);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-using System.Text;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// The callback function that is invoked when the message is received from the script.
- /// </summary>
- /// <param name="message">The JavaScriptMessage returned by the script.</param>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public delegate void JavaScriptMessageHandler(JavaScriptMessage message);
-
- /// <summary>
- /// A script message contains information that is sent from the JavaScript runtime.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class JavaScriptMessage
- {
- private string _name;
- private IntPtr _body;
-
- internal JavaScriptMessage(Interop.ChromiumEwk.ScriptMessage message)
- {
- _name = Marshal.PtrToStringAnsi(message.name);
- _body = message.body;
- }
-
- /// <summary>
- /// The object name in JavaScript.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Name
- {
- get
- {
- return _name;
- }
- }
-
- /// <summary>
- /// Gets the value of the body as an integer type.
- /// </summary>
- /// <returns>The value of the body as an integer type.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public int GetBodyAsInteger()
- {
- if (_body == IntPtr.Zero)
- {
- return 0;
- }
- return Marshal.ReadInt32(_body, 0);
- }
-
- /// <summary>
- /// Gets the value of the body as a double type.
- /// </summary>
- /// <returns>The value of the body as a double type.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public double GetBodyAsDouble()
- {
- if (_body == IntPtr.Zero)
- {
- return 0d;
- }
- double[] ret = new double[1] ;
- Marshal.Copy(_body, ret, 0, 1);
- return ret[0];
- }
-
- /// <summary>
- /// Gets the value of the body as a boolean type.
- /// </summary>
- /// <returns>The value of the body as boolean type.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool GetBodyAsBoolean()
- {
- if (_body == IntPtr.Zero)
- {
- return false;
- }
- return Marshal.ReadByte(_body) != (byte)0;
- }
-
- /// <summary>
- /// Gets the value of the body as a string type.
- /// </summary>
- /// <returns>The value of the body as a string type.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string GetBodyAsString()
- {
- if (_body == IntPtr.Zero)
- {
- return string.Empty;
- }
- return Marshal.PtrToStringAnsi(_body);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.ComponentModel;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// Enumeration values used to specify Policy Navigation Type.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public enum NavigationType {
- /// <summary>
- /// Link Clicked.
- /// </summary>
- LinkClicked = 0,
- /// <summary>
- /// Form Submitted.
- /// </summary>
- FormSubmitted = 1,
- /// <summary>
- /// Back Forward.
- /// </summary>
- BackForward = 2,
- /// <summary>
- /// Reload.
- /// </summary>
- Reload = 3,
- /// <summary>
- /// Form Submitted.
- /// </summary>
- FormResubmitted = 4,
- /// <summary>
- /// Other.
- /// </summary>
- Other = 5
- };
-
- /// <summary>
- /// Arguments from the policy decision events.
- /// This class also provides the properties for Policy Decision of WebView.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public abstract class PolicyDecisionEventArgs : EventArgs
- {
- private IntPtr _handle;
-
- internal PolicyDecisionEventArgs(IntPtr handle)
- {
- _handle = handle;
- }
-
- /// <summary>
- /// Gets the Url.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Url
- {
- get
- {
- return Interop.ChromiumEwk.ewk_policy_decision_url_get(_handle);
- }
- }
-
- /// <summary>
- /// Gets the scheme.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Scheme
- {
- get
- {
- return Interop.ChromiumEwk.ewk_policy_decision_scheme_get(_handle);
- }
- }
-
- /// <summary>
- /// Ignores the action which triggers this decision.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void Ignore()
- {
- Interop.ChromiumEwk.ewk_policy_decision_ignore(_handle);
- }
-
- /// <summary>
- /// Accepts the action which triggers this decision.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void Use()
- {
- Interop.ChromiumEwk.ewk_policy_decision_use(_handle);
- }
-
- /// <summary>
- /// Checks if frame requested in policy decision is main frame.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool IsMainFrame()
- {
- return Interop.ChromiumEwk.ewk_policy_decision_is_main_frame(_handle);
- }
- }
-
- /// <summary>
- /// This class is derived from PolicyDecisionEventArgs.
- /// This class provides the properties for New Window Policy of WebView.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class NewWindowPolicyEventArgs : PolicyDecisionEventArgs
- {
- private IntPtr _handle;
- internal NewWindowPolicyEventArgs(IntPtr handle) : base(handle)
- {
- _handle = handle;
- }
-
- internal static NewWindowPolicyEventArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
- {
- return new NewWindowPolicyEventArgs(info);
- }
- }
-
-
- /// <summary>
- /// This class is derived from PolicyDecisionEventArgs.
- /// This class provides the properties for Navigation Policy of WebView.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class NavigationPolicyEventArgs : PolicyDecisionEventArgs
- {
- private IntPtr _handle;
- internal NavigationPolicyEventArgs(IntPtr handle) : base(handle)
- {
- _handle = handle;
- }
-
- /// <summary>
- /// Gets the Navigation Type of policy.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public NavigationType NavigationType
- {
- get
- {
- return Interop.ChromiumEwk.ewk_policy_decision_navigation_type_get(_handle);
- }
- }
-
- /// <summary>
- /// Gets the cookie.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Cookie
- {
- get
- {
- return Interop.ChromiumEwk.ewk_policy_decision_cookie_get(_handle);
- }
- }
-
- internal static NavigationPolicyEventArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
- {
- return new NavigationPolicyEventArgs(info);
- }
- }
-
- /// <summary>
- /// This class is derived from PolicyDecisionEventArgs.
- /// This class provides the properties for Response Policy of WebView.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class ResponsePolicyEventArgs : PolicyDecisionEventArgs
- {
- private IntPtr _handle;
- internal ResponsePolicyEventArgs(IntPtr handle) : base(handle)
- {
- _handle = handle;
- }
-
- /// <summary>
- /// Gets http response status code.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public int StatusCode
- {
- get
- {
- return Interop.ChromiumEwk.ewk_policy_decision_response_status_code_get(_handle);
- }
- }
-
- /// <summary>
- /// Gets the cookie.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Cookie
- {
- get
- {
- return Interop.ChromiumEwk.ewk_policy_decision_cookie_get(_handle);
- }
- }
-
- /// <summary>
- /// Checks policy decision type is Download.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool IsDownload
- {
- get
- {
- return Interop.ChromiumEwk.ewk_policy_decision_type_get(_handle) == Interop.ChromiumEwk.PolicyDecisionType.Download;
- }
- }
-
- internal static ResponsePolicyEventArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
- {
- return new ResponsePolicyEventArgs(info);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Text;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// This class provides methods and properties to handle a interpected request.
- /// </summary>
- /// <since_tizen> 8 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class RequestInterceptor {
- private const string ResponseHeaderTemplate =
- "HTTP/1.1 {0} {1}\r\n" +
- "Content-Type: {2}; charset={3}\r\n" +
- "Content-Length: {4}\r\n";
-
- private IntPtr _handle;
-
- internal RequestInterceptor(IntPtr handle)
- {
- _handle = handle;
- }
-
- /// <summary>
- /// The URL of the request.
- /// </summary>
- /// <since_tizen> 8 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public Uri Url
- {
- get
- {
- var url = Interop.ChromiumEwk.ewk_intercept_request_url_get(_handle);
- return string.IsNullOrEmpty(url) ? null : new Uri(url);
- }
- }
-
- /// <summary>
- /// Sets headers and data for the response.
- /// </summary>
- /// <since_tizen> 8 </since_tizen>
- /// <param name="mimeType"> Response's mime type. </param>
- /// <param name="encoding"> Response's character encoding. </param>
- /// <param name="statusCode"> HTTP response status code. </param>
- /// <param name="reasonPhrase"> HTTP response reason phrase. </param>
- /// <param name="responseHeaders"> Headers Map from HTTP header field names to field values. </param>
- /// <param name="data"> The streiam that provides the response's data. </param>
- /// <exception cref="ArgumentNullException">Thrown when <paramref name="data"/> is null.</exception>
- /// <exception cref="InvalidOperationException">Thrown when the native operation failed to set response.</exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetResponse(string mimeType, string encoding, int statusCode, string reasonPhrase, IDictionary<string, string> responseHeaders, Stream data)
- {
- if (data == null)
- {
- throw new ArgumentNullException(nameof(data));
- }
-
- byte[] body;
- using (MemoryStream ms = new MemoryStream())
- {
- data.CopyTo(ms);
- body = ms.ToArray();
-
- var headers = String.Format(ResponseHeaderTemplate, statusCode, reasonPhrase, mimeType, encoding, body.Length);
- if (responseHeaders != null)
- {
- foreach(var header in responseHeaders)
- {
- headers += $"{header.Key}: {header.Value}\r\n";
- }
- }
- headers += "\r\n";
-
- unsafe
- {
- fixed (byte* bodyPtr = body)
- {
- var ret = Interop.ChromiumEwk.ewk_intercept_request_response_set(_handle, headers, bodyPtr, (uint)body.Length);
- if (!ret)
- {
- throw new InvalidOperationException("Failed to set response.");
- }
- }
- }
- }
- }
-
- /// <summary>
- /// Ignores the request, so WebView will load it.
- /// </summary>
- /// <since_tizen> 8 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void Ignore()
- {
- Interop.ChromiumEwk.ewk_intercept_request_ignore(_handle);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.ComponentModel;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// This class provides the properties for setting the preference of a specific WebView.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class Settings
- {
- private IntPtr _handle;
-
- internal Settings(IntPtr handle)
- {
- _handle = handle;
- }
-
- /// <summary>
- /// Whether the JavaScript can be executed.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool JavaScriptEnabled
- {
- get
- {
- return Interop.ChromiumEwk.ewk_settings_javascript_enabled_get(_handle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_settings_javascript_enabled_set(_handle, value);
- }
- }
-
- /// <summary>
- /// Whether the images can be loaded automatically.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool LoadImageAutomatically
- {
- get
- {
- return Interop.ChromiumEwk.ewk_settings_loads_images_automatically_get(_handle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_settings_loads_images_automatically_set(_handle, value);
- }
- }
-
- /// <summary>
- /// The default text encoding name.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string DefaultTextEncodingName
- {
- get
- {
- return Interop.ChromiumEwk.ewk_settings_default_text_encoding_name_get(_handle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_settings_default_text_encoding_name_set(_handle, value);
- }
- }
-
- /// <summary>
- /// The default font size of a pixel.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public int DefaultFontSize
- {
- get
- {
- return Interop.ChromiumEwk.ewk_settings_default_font_size_get(_handle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_settings_default_font_size_set(_handle, value);
- }
- }
-
- /// <summary>
- /// Whether the scripts can open windows.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool ScriptsCanOpenWindows
- {
- get
- {
- return Interop.ChromiumEwk.ewk_settings_scripts_can_open_windows_get(_handle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_settings_scripts_can_open_windows_set(_handle, value);
- }
- }
-
- /// <summary>
- /// Enable or Disable force zoom.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool ForceZoom
- {
- get
- {
- return Interop.ChromiumEwk.ewk_settings_force_zoom_get(_handle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_settings_force_zoom_set(_handle, value);
- }
- }
-
- /// <summary>
- /// Enable or Disable text autosizing.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool TextAutosizing
- {
- get
- {
- return Interop.ChromiumEwk.ewk_settings_text_autosizing_enabled_get(_handle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_settings_text_autosizing_enabled_set(_handle, value);
- }
- }
-
- /// <summary>
- /// Enable or Disable text zoom.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool TextZoom
- {
- get
- {
- return Interop.ChromiumEwk.ewk_settings_text_zoom_enabled_get(_handle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_settings_text_zoom_enabled_set(_handle, value);
- }
- }
-
- /// <summary>
- /// Enable or Disable the usage of keypad without user action.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool UseKeypadWithoutUserAction
- {
- get
- {
- return Interop.ChromiumEwk.ewk_settings_uses_keypad_without_user_action_get(_handle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_settings_uses_keypad_without_user_action_set(_handle, value);
- }
- }
-
- /// <summary>
- /// Enable or Disable Extra feature such as "edge,enable", "zoom,enable", "longpress,enable"
- /// "doubletap,enable" and "selection,magnifier".
- /// </summary>
- /// <param name="name">The name of the feature user wants to set or reset.</param>
- /// <param name="enable">The boolean value to set or reset.</param>
- /// <since_tizen> 6 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetExtraFeature(string name, bool enable)
- {
- Interop.ChromiumEwk.ewk_settings_extra_feature_set(_handle, name, enable);
- }
-
- /// <summary>
- /// Get status of Extra feature such as "edge,enable", "zoom,enable", "longpress,enable"
- /// "doubletap,enable" and "selection,magnifier".
- /// </summary>
- /// <param name="name">The name of the feature user wants to know status.</param>
- /// <returns>Status true or false is returned.</returns>
- /// <since_tizen> 6 </since_tizen>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool GetExtraFeatureStatus(string name)
- {
- return Interop.ChromiumEwk.ewk_settings_extra_feature_get(_handle, name);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// The argument from the SmartCallback.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class SmartCallbackArgs : EventArgs
- {
- private IntPtr _arg;
-
- internal SmartCallbackArgs(IntPtr arg)
- {
- _arg = arg;
- }
-
- /// <summary>
- /// Gets the argument as an integer type.
- /// </summary>
- /// <returns>Argument as an integer type.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public int GetAsInteger()
- {
- if (_arg == IntPtr.Zero)
- {
- return 0;
- }
- return Marshal.ReadInt32(_arg, 0);
- }
-
- /// <summary>
- /// Gets the argument as a double type.
- /// </summary>
- /// <returns>Argument as a double type.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public double GetAsDouble()
- {
- if (_arg == IntPtr.Zero)
- {
- return 0d;
- }
- double[] ret = new double[1];
- Marshal.Copy(_arg, ret, 0, 1);
- return ret[0];
- }
-
- /// <summary>
- /// Gets the argument as a boolean type.
- /// </summary>
- /// <returns>Argument as a boolean type.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool GetAsBoolean()
- {
- if (_arg == IntPtr.Zero)
- {
- return false;
- }
- return Marshal.ReadByte(_arg) != (byte)0;
- }
-
- /// <summary>
- /// Gets the argument as a string type.
- /// </summary>
- /// <returns>Argument as a string type.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string GetAsString()
- {
- if (_arg == IntPtr.Zero)
- {
- return string.Empty;
- }
- return Marshal.PtrToStringAnsi(_arg);
- }
-
- internal static SmartCallbackArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
- {
- return new SmartCallbackArgs(info);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// Enumeration for providing an option to the error codes.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public enum LoadErrorCode
- {
- /// <summary>
- /// Unknown.
- /// </summary>
- Unknown = 0,
- /// <summary>
- /// User canceled.
- /// </summary>
- Canceled,
- /// <summary>
- /// Can't show the page for this MIME type.
- /// </summary>
- CantSupportMimetype,
- /// <summary>
- /// File IO error.
- /// </summary>
- FailedFileIo,
- /// <summary>
- /// Cannot connect to the network.
- /// </summary>
- CantConnect,
- /// <summary>
- /// Fail to look up host from the DNS.
- /// </summary>
- CantLookupHost,
- /// <summary>
- /// Fail to SSL/TLS handshake.
- /// </summary>
- FailedTlsHandshake,
- /// <summary>
- /// Received certificate is invalid.
- /// </summary>
- InvalidCertificate,
- /// <summary>
- /// Connection timeout.
- /// </summary>
- RequestTimeout,
- /// <summary>
- /// Too many redirects.
- /// </summary>
- TooManyRedirects,
- /// <summary>
- /// Too many requests during this load.
- /// </summary>
- TooManyRequests,
- /// <summary>
- /// Malformed URL.
- /// </summary>
- BadUrl,
- /// <summary>
- /// Unsupported scheme.
- /// </summary>
- UnsupportedScheme,
- /// <summary>
- /// User authentication failed on the server.
- /// </summary>
- Authentication,
- /// <summary>
- /// Web server has an internal server error.
- /// </summary>
- InternalServer,
- }
-
- /// <summary>
- /// Arguments from the LoadError SmartCallback.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public class SmartCallbackLoadErrorArgs : EventArgs
- {
- IntPtr _handle;
-
- internal SmartCallbackLoadErrorArgs(IntPtr handle)
- {
- _handle = handle;
- }
-
- /// <summary>
- /// Failing URL for the error.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Url
- {
- get
- {
- return Interop.ChromiumEwk.ewk_error_url_get(_handle);
- }
- }
-
- /// <summary>
- /// The error code.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public LoadErrorCode Code
- {
- get
- {
- return (LoadErrorCode)Interop.ChromiumEwk.ewk_error_code_get(_handle);
- }
- }
-
- /// <summary>
- /// The description for the error.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Description
- {
- get
- {
- return Interop.ChromiumEwk.ewk_error_description_get(_handle);
- }
- }
-
- /// <summary>
- /// Whether the error should be treated as a cancellation.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool Cancellation
- {
- get
- {
- return Interop.ChromiumEwk.ewk_error_cancellation_get(_handle);
- }
- }
-
- internal static SmartCallbackLoadErrorArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
- {
- return new SmartCallbackLoadErrorArgs(info);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using ElmSharp;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.InteropServices;
-using System.Threading.Tasks;
-
-namespace Tizen.WebView
-{
- /// <summary>
- /// Enumeration values used to specify search options.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Flags]
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public enum FindOption
- {
- /// <summary>
- /// No search flags, this means a case sensitive, no wrap, forward only search.
- /// </summary>
- None = 0,
- /// <summary>
- /// Case insensitive search.
- /// </summary>
- CaseInsensitive = 1 << 0,
- /// <summary>
- /// Search text only at the beginning of the words.
- /// </summary>
- AtWordStart = 1 << 1,
- /// <summary>
- /// Treat capital letters in the middle of words as word start.
- /// </summary>
- TreatMedialCapitalAsWordStart = 1 << 2,
- /// <summary>
- /// Search backwards.
- /// </summary>
- Backwards = 1 << 3,
- /// <summary>
- /// If not present the search stops at the end of the document.
- /// </summary>
- WrapAround = 1 << 4,
- /// <summary>
- /// Show overlay.
- /// </summary>
- ShowOverlay = 1 << 5,
- /// <summary>
- /// Show Indicator.
- /// </summary>
- ShowIndicator = 1 << 6,
- /// <summary>
- /// Show Highlight.
- /// </summary>
- ShowHighlight = 1 << 7,
- }
-
- /// <summary>
- /// Enumeration for Http Method.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public enum HttpMethod
- {
- /// <summary>
- /// Get.
- /// </summary>
- Get,
- /// <summary>
- /// Head.
- /// </summary>
- Head,
- /// <summary>
- /// Post.
- /// </summary>
- Post,
- /// <summary>
- /// Put.
- /// </summary>
- Put,
- /// <summary>
- /// Delete.
- /// </summary>
- Delete,
- }
-
- /// <summary>
- /// Enumeration for Orientation of the device.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public enum Orientation
- {
- /// <summary>
- /// 0 degrees when the device is oriented to natural position.
- /// </summary>
- Natural = 0,
- /// <summary>
- /// -90 degrees when it's left side is at the top.
- /// </summary>
- LeftAtTop = -90,
- /// <summary>
- /// 90 degrees when it's right side is at the top.
- /// </summary>
- RightAtTop = 90,
- /// <summary>
- /// 180 degrees when it is upside down.
- /// </summary>
- UpsideDown = 180,
- }
-
- /// <summary>
- /// A view used to render the web contents.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12. The WebView provided by .NET MAUI or Tizen.NUI can be used instead.")]
- public class WebView : EvasObject
- {
- private static IDictionary<string, JavaScriptMessageHandler> _javaScriptMessageHandlerMap = new Dictionary<string, JavaScriptMessageHandler>();
-
- private IntPtr _handle;
- private IntPtr _realHandle;
- private Context _context;
- private Settings _settings;
-
- private IDictionary<IntPtr, Interop.ChromiumEwk.ScriptExcuteCallback> _evalCallbacks = new Dictionary<IntPtr, Interop.ChromiumEwk.ScriptExcuteCallback>();
- private int _evalCallbackId = 0;
-
- // focus dummy
- private SmartEvent _focusIn;
- private SmartEvent _focusOut;
-
- // Smart events
- private SmartEvent _loadStarted;
- private SmartEvent _loadFinished;
- private SmartEvent<SmartCallbackLoadErrorArgs> _loadError;
- private SmartEvent<SmartCallbackArgs> _titleChanged;
- private SmartEvent<SmartCallbackArgs> _urlChanged;
- private SmartEvent<NavigationPolicyEventArgs> _policyNavigationDecide;
- private SmartEvent<NewWindowPolicyEventArgs> _policyNewWindowDecide;
- private SmartEvent<ResponsePolicyEventArgs> _policyResponseDecide;
-
- private SmartEvent<ContextMenuItemEventArgs> _contextMenuItemSelected;
- private SmartEvent<ContextMenuCustomizeEventArgs> _contextMenuCustomize;
-
- private ContextMenuCustomize _contextMenuCustomizeDelegate;
-
- /// <summary>
- /// Event that occurs when the load is started.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public event EventHandler LoadStarted;
-
- /// <summary>
- /// Event that occurs when the load is finished.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public event EventHandler LoadFinished;
-
- /// <summary>
- /// Event that occurs when the load throws an error.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public event EventHandler<SmartCallbackLoadErrorArgs> LoadError;
-
- /// <summary>
- /// Event that occurs when the title of the main frame is changed.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public event EventHandler<SmartCallbackArgs> TitleChanged;
-
- /// <summary>
- /// Event that occurs when the URL of the main frame is changed.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public event EventHandler<SmartCallbackArgs> UrlChanged;
-
- /// <summary>
- /// Event that occurs when the policy navigation is decided.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public event EventHandler<NavigationPolicyEventArgs> NavigationPolicyDecideRequested;
-
- /// <summary>
- /// Event that occurs when the policy new window is decided.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public event EventHandler<NewWindowPolicyEventArgs> NewWindowPolicyDecideRequested;
-
- /// <summary>
- /// Event that occurs when the policy response is decided.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public event EventHandler<ResponsePolicyEventArgs> ResponsePolicyDecideRequested;
-
- /// <summary>
- /// Event that occurs when the context menu item selected.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public event EventHandler<ContextMenuItemEventArgs> ContextMenuItemSelected;
-
- /// <summary>
- /// The delegate is invoked when context menu customization is needed.
- /// </summary>
- /// <param name="menu">The instance of ContextMenu.</param>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public delegate void ContextMenuCustomize(ContextMenu menu);
-
-
- /// <summary>
- /// Current URL of the main frame.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Url
- {
- get
- {
- return Interop.ChromiumEwk.ewk_view_url_get(_realHandle);
- }
- }
-
- /// <summary>
- /// Current title of the main frame.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string Title
- {
- get
- {
- return Interop.ChromiumEwk.ewk_view_title_get(_realHandle);
- }
- }
-
- /// <summary>
- /// Current user agent string of this view.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public string UserAgent
- {
- get
- {
- return Interop.ChromiumEwk.ewk_view_user_agent_get(_realHandle);
- }
-
- set
- {
- Interop.ChromiumEwk.ewk_view_user_agent_set(_realHandle, value);
- }
- }
-
- /// <summary>
- /// Whether a view has the focus.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool HasFocus
- {
- get
- {
- return Interop.ChromiumEwk.ewk_view_focus_get(_realHandle);
- }
- }
-
- /// <summary>
- /// Creates a WebView object.
- /// </summary>
- /// <param name="parent">Parent object of the WebView.</param>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public WebView(EvasObject parent) : base(parent)
- {
- InitializeSmartEvent();
- }
-
- /// <summary>
- /// Gets the context object of this view.
- /// </summary>
- /// <returns>The context object of this view.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public Context GetContext()
- {
- if (_context == null)
- {
- IntPtr contextHandle = Interop.ChromiumEwk.ewk_view_context_get(_realHandle);
- if (contextHandle == IntPtr.Zero)
- {
- return null;
- }
- _context = new Context(contextHandle);
- }
- return _context;
- }
-
- /// <summary>
- /// Gets the settings object of this view.
- /// </summary>
- /// <returns>The settings object of this view.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public Settings GetSettings()
- {
- if (_settings == null)
- {
- IntPtr settingsHandle = Interop.ChromiumEwk.ewk_view_settings_get(_realHandle);
- if (settingsHandle == IntPtr.Zero)
- {
- return null;
- }
- _settings = new Settings(settingsHandle);
- }
- return _settings;
- }
-
- /// <summary>
- /// Gets the back/forward list object of this view.
- /// </summary>
- /// <returns>The BackForward List object of this view.</returns>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public BackForwardList GetBackForwardList()
- {
- IntPtr backforwardlistHandle = Interop.ChromiumEwk.ewk_view_back_forward_list_get(_realHandle);
- if (backforwardlistHandle == IntPtr.Zero)
- {
- return null;
- }
- return new BackForwardList(backforwardlistHandle);
- }
-
- /// <summary>
- /// Clear the back/forward list object of this view.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void ClearBackForwardList()
- {
- Interop.ChromiumEwk.ewk_view_back_forward_list_clear(_realHandle);
- }
-
- /// <summary>
- /// Asks the object to load the given URL.
- /// </summary>
- /// <remarks>
- /// You can only be sure that the URL changes after UrlChanged event.
- /// </remarks>
- /// <param name="url">The uniform resource identifier to load.</param>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void LoadUrl(string url)
- {
- Interop.ChromiumEwk.ewk_view_url_set(_realHandle, url);
- }
-
- /// <summary>
- /// Loads the specified HTML string as the content of the view.
- /// </summary>
- /// <param name="html">HTML data to load.</param>
- /// <param name="baseUrl">Base URL used for relative paths to external objects.</param>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void LoadHtml(string html, string baseUrl)
- {
- Interop.ChromiumEwk.ewk_view_html_string_load(_realHandle, html, baseUrl, null);
- }
-
- /// <summary>
- /// Asks the main frame to stop loading.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void StopLoading()
- {
- Interop.ChromiumEwk.ewk_view_stop(_realHandle);
- }
-
- /// <summary>
- /// Asks the main frame to reload the current document.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void Reload()
- {
- Interop.ChromiumEwk.ewk_view_reload(_realHandle);
- }
-
- /// <summary>
- /// Asks the main frame to navigate back in history.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void GoBack()
- {
- Interop.ChromiumEwk.ewk_view_back(_realHandle);
- }
-
- /// <summary>
- /// Asks the main frame to navigate forward in history.
- /// </summary>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void GoForward()
- {
- Interop.ChromiumEwk.ewk_view_forward(_realHandle);
- }
-
- /// <summary>
- /// Checks whether it is possible to navigate backward one item in history.
- /// </summary>
- /// <returns>Whether it is possible to navigate backward one item in history.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool CanGoBack()
- {
- return Interop.ChromiumEwk.ewk_view_back_possible(_realHandle);
- }
-
- /// <summary>
- /// Checks whether it is possible to navigate forward one item in history.
- /// </summary>
- /// <returns>Whether it is possible to navigate forward one item in history.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool CanGoForward()
- {
- return Interop.ChromiumEwk.ewk_view_forward_possible(_realHandle);
- }
-
- /// <summary>
- /// Injects the supplied javascript message handler into the view.
- /// </summary>
- /// <param name="name"> The message callback.</param>
- /// <param name="handler">The name used to expose the object in JavaScript.</param>
- /// <returns>'true' on success, otherwise 'false'.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public bool AddJavaScriptMessageHandler(string name, JavaScriptMessageHandler handler)
- {
- lock (_javaScriptMessageHandlerMap)
- {
- if (_javaScriptMessageHandlerMap.ContainsKey(name))
- {
- return false;
- }
- _javaScriptMessageHandlerMap[name] = handler;
- }
- Interop.ChromiumEwk.ScriptMessageCallback callback = (handle, message) =>
- {
- JavaScriptMessage convertedMessage = new JavaScriptMessage(message);
- lock (_javaScriptMessageHandlerMap)
- {
- if (_javaScriptMessageHandlerMap.ContainsKey(convertedMessage.Name))
- {
- _javaScriptMessageHandlerMap[convertedMessage.Name](convertedMessage);
- }
- }
- };
- if (!Interop.ChromiumEwk.ewk_view_javascript_message_handler_add(_realHandle, callback, name))
- {
- lock (_javaScriptMessageHandlerMap)
- {
- _javaScriptMessageHandlerMap.Remove(name);
- return false;
- }
- }
- return true;
- }
-
- /// <summary>
- /// Requests the execution of a given name and the result to the JavaScript runtime.
- /// </summary>
- /// <param name="name">The name used to expose the object in JavaScript.</param>
- /// <param name="result">The result to the JavaScript runtime.</param>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void EvalWithResult(string name, string result)
- {
- Interop.ChromiumEwk.ewk_view_evaluate_javascript(_realHandle, name, result);
- }
-
- /// <summary>
- /// Requests the execution of the given script.
- /// </summary>
- /// <param name="script">The JavaScript code string to execute.</param>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void Eval(string script)
- {
- Interop.ChromiumEwk.ewk_view_script_execute(_realHandle, script, null, IntPtr.Zero);
- }
-
- /// <summary>
- /// Requests the evaluation of the given script.
- /// </summary>
- /// <param name="script">The JavaScript code string to evaluate.</param>
- /// <returns>A task that contains the result of the evaluation as a string.</returns>
- /// <since_tizen> 8 </since_tizen>
- /// <exception cref="ArgumentException">Thrown when a script is null or empty string.</exception>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public async Task<string> EvalAsync(string script)
- {
- if (string.IsNullOrEmpty(script))
- {
- throw new ArgumentException(nameof(script));
- }
-
- var tcs = new TaskCompletionSource<string>();
- IntPtr id = IntPtr.Zero;
-
- lock (_evalCallbacks)
- {
- id = (IntPtr)_evalCallbackId++;
- _evalCallbacks[id] = (obj, returnValue, userData) =>
- {
- tcs.SetResult(Marshal.PtrToStringAnsi(returnValue));
- lock (_evalCallbacks)
- {
- _evalCallbacks.Remove(userData);
- }
- };
- }
-
- Interop.ChromiumEwk.ewk_view_script_execute(_realHandle, script, _evalCallbacks[id], id);
- return await tcs.Task;
- }
-
- /// <summary>
- /// Requests to set or unset a view as the currently focused one.
- /// </summary>
- /// <param name="focused">'true' to set the focus on the view, 'false' to remove the focus from the view.</param>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetFocus(bool focused)
- {
- Interop.ChromiumEwk.ewk_view_focus_set(_realHandle, focused);
- }
-
- /// <summary>
- /// Gets size of the content.
- /// </summary>
- /// <returns> size of the coordinate.</returns>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public Size ContentsSize
- {
- get
- {
- int width, height;
- Interop.ChromiumEwk.ewk_view_contents_size_get(_realHandle, out width, out height);
- return new Size(width, height);
- }
- }
-
- /// <summary>
- /// Exit full screen.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void ExitFullscreen ()
- {
- Interop.ChromiumEwk.ewk_view_fullscreen_exit(_realHandle);
- }
-
- /// <summary>
- /// Gets the current load progress of the page.
- /// </summary>
- /// <returns>'value 0.0 to 1.0' on success, otherwise '-1.0'.</returns>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public double LoadProgress
- {
- get
- {
- return Interop.ChromiumEwk.ewk_view_load_progress_get(_realHandle);
- }
- }
-
- /// <summary>
- /// Sends the orientation of the device.
- /// </summary>
- /// <param name="orientation">The new orientation of the device in degree.</param>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SendOrientation (Orientation orientation)
- {
- Interop.ChromiumEwk.ewk_view_orientation_send(_realHandle, orientation);
- }
-
- /// <summary>
- /// Suspends the operation associated with the view.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void Suspend ()
- {
- Interop.ChromiumEwk.ewk_view_suspend(_realHandle);
- }
-
- /// <summary>
- /// Resumes the operation associated with the view.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void Resume ()
- {
- Interop.ChromiumEwk.ewk_view_resume(_realHandle);
- }
-
- /// <summary>
- /// Gets the current scale factor of the page.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public double Scale
- {
- get
- {
- return Interop.ChromiumEwk.ewk_view_scale_get(_realHandle);
- }
- }
-
- /// <summary>
- /// Sets the current scale factor of the page.
- /// </summary>
- /// <param name="scaleFactor">A new level to set.</param>
- /// <param name="scrollTo">The class Point object with X, Y coordinates.</param>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetScale (double scaleFactor, Point scrollTo)
- {
- Interop.ChromiumEwk.ewk_view_scale_set(_realHandle, scaleFactor, scrollTo.X, scrollTo.Y);
- }
-
- /// <summary>
- /// Sets the current page's visibility.
- /// </summary>
- /// <param name="enable">'true' to set on the visibility of the page, 'false' otherwise.</param>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetViewVisibility (bool enable)
- {
- Interop.ChromiumEwk.ewk_view_visibility_set(_realHandle, enable);
- }
-
- /// <summary>
- /// Get and Sets the scroll position of the page.
- /// </summary>
- /// <returns>The class Point object with X, Y coordinates.</returns>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public Point ScrollPosition
- {
- get
- {
- Point p;
- Interop.ChromiumEwk.ewk_view_scroll_pos_get(_realHandle, out p.X, out p.Y);
- return p;
- }
- set
- {
- Interop.ChromiumEwk.ewk_view_scroll_set(_realHandle, value.X, value.Y);
- }
- }
-
- /// <summary>
- /// Scrolls the webpage by the given amount.
- /// </summary>
- /// <param name="delta">The class Point object with X, Y coordinates.</param>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void ScrollBy (Point delta)
- {
- Interop.ChromiumEwk.ewk_view_scroll_by(_realHandle, delta.X, delta.Y);
- }
-
- /// <summary>
- /// Searches and highlights the given text string in the document.
- /// </summary>
- /// <param name="text">The text to find.</param>
- /// <param name="option">The options to find.</param>
- /// <param name="maxMatchCount">The maximum match count to find, unlimited if 0.</param>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void FindText (string text, FindOption option, int maxMatchCount)
- {
- Interop.ChromiumEwk.ewk_view_text_find(_realHandle, text, option, maxMatchCount);
- }
-
- /// <summary>
- /// Requests loading of the given request data.
- /// </summary>
- /// <param name="url">The uniform resource identifier to load.</param>
- /// <param name="httpMethod">The http method.</param>
- /// <param name="httpHeaders">The http headers.</param>
- /// <param name="httpBody">The http body data.</param>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetUrlRequest (string url, HttpMethod httpMethod, IDictionary<string, string> httpHeaders, string httpBody)
- {
- List<IntPtr> stringHandles = new List<IntPtr>();
- IntPtr hashHttpHeaders = Interop.Eina.eina_hash_string_small_new(IntPtr.Zero);
-
- foreach (KeyValuePair<string, string> entry in httpHeaders)
- {
- IntPtr keyHandle = Marshal.StringToHGlobalAnsi(entry.Key);
- IntPtr valueHandle = Marshal.StringToHGlobalAnsi(entry.Value);
- Interop.Eina.eina_hash_add(hashHttpHeaders, keyHandle, valueHandle);
- stringHandles.Add(keyHandle);
- stringHandles.Add(valueHandle);
- }
- Interop.ChromiumEwk.ewk_view_url_request_set(_realHandle, url, httpMethod, hashHttpHeaders, httpBody);
-
- foreach(IntPtr handle in stringHandles)
- {
- Marshal.FreeHGlobal(handle);
- }
- }
-
- /// <summary>
- /// Creates a widget handle.
- /// </summary>
- /// <param name="parent">Parent EvasObject.</param>
- /// <returns>IntPtr of the widget handle.</returns>
- /// <since_tizen> 4 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- protected override IntPtr CreateHandle(EvasObject parent)
- {
- // focus dummy
- _handle = Interop.Elementary.elm_layout_add((IntPtr)parent);
- Interop.Elementary.elm_layout_theme_set(_handle, "layout", "elm_widget", "default");
- Interop.Elementary.elm_object_focus_allow_set(_handle, true);
-
- IntPtr evas = Interop.Evas.evas_object_evas_get(parent);
- _realHandle = Interop.ChromiumEwk.ewk_view_add(evas);
- Interop.Elementary.elm_object_part_content_set(_handle, "elm.swallow.content", _realHandle);
-
- return _handle;
- }
-
- /// <summary>
- /// Sets the delegate for context menu customization.
- /// </summary>
- /// <param name="contextMenuCustomizeDelegate">The delegate for context menu customization.</param>
- /// <since_tizen> 6 </since_tizen>
- [Obsolete("Deprecated since API Level 10. Will be removed in API Level 12.")]
- public void SetContextMenuCustomizeDelegate(ContextMenuCustomize contextMenuCustomizeDelegate)
- {
- _contextMenuCustomizeDelegate = contextMenuCustomizeDelegate;
- }
-
- private void InitializeSmartEvent()
- {
- // focus dummy
- _focusIn = new SmartEvent(this, "focused");
- _focusOut = new SmartEvent(this, "unfocused");
-
- _focusIn.On += (s, e) => { ((WebView)s).SetFocus(true); };
- _focusOut.On += (s, e) => { ((WebView)s).SetFocus(false); };
-
- _loadStarted = new SmartEvent(this, _realHandle, "load,started");
- _loadFinished = new SmartEvent(this, _realHandle, "load,finished");
- _loadError = new SmartEvent<SmartCallbackLoadErrorArgs>(this, _realHandle, "load,error", SmartCallbackLoadErrorArgs.CreateFromSmartEvent);
- _titleChanged = new SmartEvent<SmartCallbackArgs>(this, _realHandle, "title,changed", SmartCallbackArgs.CreateFromSmartEvent);
- _urlChanged = new SmartEvent<SmartCallbackArgs>(this, _realHandle, "url,changed", SmartCallbackArgs.CreateFromSmartEvent);
- _contextMenuCustomize = new SmartEvent<ContextMenuCustomizeEventArgs>(this, _realHandle, "contextmenu,customize", ContextMenuCustomizeEventArgs.CreateFromSmartEvent);
- _contextMenuItemSelected = new SmartEvent<ContextMenuItemEventArgs>(this, _realHandle, "contextmenu,selected", ContextMenuItemEventArgs.CreateFromSmartEvent);
- _policyNavigationDecide = new SmartEvent<NavigationPolicyEventArgs>(this, _realHandle, "policy,navigation,decide", NavigationPolicyEventArgs.CreateFromSmartEvent);
- _policyNewWindowDecide = new SmartEvent<NewWindowPolicyEventArgs>(this, _realHandle, "policy,newwindow,decide", NewWindowPolicyEventArgs.CreateFromSmartEvent);
- _policyResponseDecide = new SmartEvent<ResponsePolicyEventArgs>(this, _realHandle, "policy,response,decide", ResponsePolicyEventArgs.CreateFromSmartEvent);
-
- _loadStarted.On += (s, e) => { LoadStarted?.Invoke(this, EventArgs.Empty); };
- _loadFinished.On += (s, e) => { LoadFinished?.Invoke(this, EventArgs.Empty); };
- _loadError.On += (s, e) => { LoadError?.Invoke(this, e); };
- _titleChanged.On += (s, e) => { TitleChanged?.Invoke(this, e); };
- _urlChanged.On += (s, e) => { UrlChanged?.Invoke(this, e); };
- _policyNavigationDecide.On += (s, e) => { NavigationPolicyDecideRequested?.Invoke(this, e); };
- _policyNewWindowDecide.On += (s, e) => { NewWindowPolicyDecideRequested?.Invoke(this, e); };
- _policyResponseDecide.On += (s, e) => { ResponsePolicyDecideRequested?.Invoke(this, e); };
- _contextMenuItemSelected.On += (s, e) => { ContextMenuItemSelected?.Invoke(this, e); };
- _contextMenuCustomize.On += (s, e) => { _contextMenuCustomizeDelegate?.Invoke(e.Menu); };
- }
-
- }
-}
+++ /dev/null
----
-# Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License
-
-uid: Tizen.WebView
-summary: The Tizen.WebView namespace provides classes for accessing web pages and web content in your application.
----
+++ /dev/null
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Tizen.WebView.Test")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Samsung Electronics")]
-[assembly: AssemblyProduct("Tizen.WebView.Test")]
-[assembly: AssemblyCopyright("Copyright © Samsung Electronics 2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("b57dafa3-b566-4ebf-a6f0-ecd2224a748d")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using ElmSharp;
-using Tizen.Applications;
-using Tizen.WebView;
-
-
-namespace Tizen.WebView.Test
-{
- public class SimpleWebviewApp : CoreUIApplication
- {
- private const string LogTag = "WebViewApp";
-
- private const string _windowName = "Simple WebView App";
- private const string _defaultUrl = "http://www.google.com";
- private WebView _webview;
- private Entry _addressEntry;
- private Button _reloadButton;
-
- public SimpleWebviewApp()
- {
-
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Chromium.Initialize();
- // Create webview and toolbox
- CreateUI();
- }
-
- protected override void OnTerminate()
- {
- Chromium.Shutdown();
- base.OnTerminate();
- }
-
- private void CreateUI()
- {
- // Create Window
- Window window = new Window(_windowName);
- window.Show();
-
- // Create Box for main window
- Box mainBox = CreateBaseUI(window);
-
- // Create top bar
- Box topBar = CreateTopBar(window);
-
- // Create Webview
- _webview = new WebView(window)
- {
- AlignmentX = -1,
- AlignmentY = -1,
- WeightX = 1,
- WeightY = 1
- };
- _webview.Show();
-
- // Create bottom bar
- Box bottomBar = CreateBottomBar(window);
-
- mainBox.PackEnd(topBar);
- mainBox.PackEnd(_webview);
- mainBox.PackEnd(bottomBar);
-
- InitializeWebView();
-
- // Load default URL
- _webview.LoadUrl(_defaultUrl);
- }
-
- private Box CreateBaseUI(Window window)
- {
- // Create Background
- Background background = new Background(window)
- {
- AlignmentX = -1,
- AlignmentY = -1,
- WeightX = 1,
- WeightY = 1,
- Color = Color.White
- };
- background.Show();
- window.AddResizeObject(background);
-
- // Create Conformant
- Conformant conformant = new Conformant(window);
- conformant.Show();
-
- // Create Box for all contents
- Box box = new Box(window)
- {
- AlignmentX = -1,
- AlignmentY = -1,
- WeightX = 1,
- WeightY = 1
- };
- box.Show();
- conformant.SetContent(box);
-
- return box;
- }
-
- private Box CreateTopBar(Window window)
- {
- // Create Box for address bar
- Box topBar = new Box(window)
- {
- AlignmentX = -1,
- AlignmentY = 0,
- WeightX = 1,
- WeightY = 0,
- IsHorizontal = true
- };
- topBar.Show();
-
- // Create address entry
- _addressEntry = new Entry(window)
- {
- AlignmentX = -1,
- AlignmentY = -1,
- WeightX = 1,
- WeightY = 1,
- IsSingleLine = true,
- Scrollable = true,
- Text = _defaultUrl
- };
- _addressEntry.SetInputPanelLayout(InputPanelLayout.Url);
- _addressEntry.Activated += (s, e) =>
- {
- _webview.LoadUrl(((Entry)s).Text);
- };
- _addressEntry.Show();
-
- // Create reload button
- _reloadButton = new Button(window)
- {
- AlignmentX = -1,
- AlignmentY = -1,
- WeightX = 0.3,
- WeightY = 1,
- Text = "Reload"
- };
- _reloadButton.Clicked += (s, e) =>
- {
- if (_reloadButton.Text.Equals("Reload"))
- {
- _webview.Reload();
- }
- else if (_reloadButton.Text.Equals("Stop"))
- {
- _webview.StopLoading();
- }
- };
- _reloadButton.Show();
-
- topBar.PackEnd(_addressEntry);
- topBar.PackEnd(_reloadButton);
-
- return topBar;
- }
-
- private Box CreateBottomBar(Window window)
- {
- // Create Box for bottom bar
- Box bottomBar = new Box(window)
- {
- AlignmentX = -1,
- AlignmentY = 1,
- WeightX = 1,
- WeightY = 0,
- IsHorizontal = true
- };
- bottomBar.Show();
-
- // Create back/forward buttons
- Button backButton = new Button(window)
- {
- AlignmentX = -1,
- AlignmentY = 0.5,
- WeightX = 1,
- WeightY = 1,
- Text = "Back"
-
- };
- backButton.Clicked += (s, e) =>
- {
- if (_webview.CanGoBack())
- _webview.GoBack();
- };
- backButton.Show();
-
- Button forwardButton = new Button(window)
- {
- AlignmentX = -1,
- AlignmentY = 0.5,
- WeightX = 1,
- WeightY = 1,
- Text = "Forward"
-
- };
- forwardButton.Clicked += (s, e) =>
- {
- if (_webview.CanGoForward())
- _webview.GoForward();
- };
- forwardButton.Show();
-
- bottomBar.PackEnd(backButton);
- bottomBar.PackEnd(forwardButton);
-
- return bottomBar;
- }
-
- private void InitializeWebView()
- {
- _webview.LoadStarted += (s, e) =>
- {
- Log.Info(LogTag, "Load started");
- _reloadButton.Text = "Stop";
- };
-
- _webview.LoadFinished += (s, e) =>
- {
- Log.Info(LogTag, "Load finished");
- _reloadButton.Text = "Reload";
- };
-
- _webview.LoadError += (s, e) =>
- {
- Log.Info(LogTag, "Load error(" + e.Code + "): " + e.Description);
- };
-
- _webview.UrlChanged += (s, e) =>
- {
- Log.Info(LogTag, "Url changed: " + e.GetAsString());
- _addressEntry.Text = e.GetAsString();
- };
-
- CookieManager cookieManager = _webview.GetContext().GetCookieManager();
- if (cookieManager != null)
- {
- cookieManager.SetCookieAcceptPolicy(CookieAcceptPolicy.Always);
- cookieManager.SetPersistentStorage(DirectoryInfo.Data, CookiePersistentStorage.SqlLite);
- }
- }
-
- static void Main(string[] args)
- {
- Elementary.Initialize();
- Elementary.ThemeOverlay();
-
- SimpleWebviewApp app = new Test.SimpleWebviewApp();
- app.Run(args);
- }
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectTypeGuids>{2F98DAC9-6F16-457B-AED7-D43CAC379341};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ProjectGuid>{B57DAFA3-B566-4EBF-A6F0-ECD2224A748D}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Tizen.WebView.Test</RootNamespace>
- <AssemblyName>Tizen.WebView.Test</AssemblyName>
- <FileAlignment>512</FileAlignment>
- <DefaultLanguage>en-US</DefaultLanguage>
- </PropertyGroup>
- <PropertyGroup>
- <TargetFrameworkIdentifier>DNXCore</TargetFrameworkIdentifier>
- <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
- <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
- <NuGetTargetMoniker>.NETCoreApp,Version=v1.0</NuGetTargetMoniker>
- <NoStdLib>true</NoStdLib>
- <NoWarn>$(NoWarn);1701</NoWarn>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoWarn>;1701;1702</NoWarn>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <NoWarn>;1701;1702</NoWarn>
- <DebugSymbols>true</DebugSymbols>
- </PropertyGroup>
- <ItemGroup>
- <None Include="Tizen.WebView.Test.project.json" />
- <None Include="tizen-manifest.xml" />
- <None Include="shared\res\Tizen.WebView.Test.png" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="SimpleWebviewApp.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="lib\" />
- <Folder Include="res\" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Tizen.WebView\Tizen.WebView.csproj">
- <Project>{8405e84f-b920-4aac-9ad5-001b9debc9ca}</Project>
- <Name>Tizen.WebView</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup>
- <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and
- https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild
- -->
- <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two
- properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and
- to prevent it from outputting a warning (MSB3644).
- -->
- <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>
- <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>
- <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
- </PropertyGroup>
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{2F98DAC9-6F16-457B-AED7-D43CAC379341}" Configuration="Debug|Any CPU">
- <ProjectCorporateFlavorCfg />
- </FlavorProperties>
- <FlavorProperties GUID="{2F98DAC9-6F16-457B-AED7-D43CAC379341}" Configuration="Release|Any CPU">
- <ProjectCorporateFlavorCfg />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
-</Project>
+++ /dev/null
-{
- "dependencies": {
- "ElmSharp": "1.2.0-*",
- "Microsoft.NETCore.App": "1.0.0",
- "Tizen": "1.0.3",
- "Tizen.Applications": "1.3.2"
- },
- "frameworks": {
- "netcoreapp1.0": {}
- },
- "runtimes": {
- "win": {}
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="Tizen.WebView.Test" version="1.0.0">
- <profile name="common" />
- <ui-application appid="org.tizen.Tizen.WebView.Test"
- exec="Tizen.WebView.Test.exe"
- type="dotnet"
- multiple="false"
- taskmanage="true"
- launch_mode="single">
- <icon>Tizen.WebView.Test.png</icon>
- <label>Tizen.WebView.Test</label>
- </ui-application>
- <privileges>
- <privilege>http://tizen.org/privilege/mediastorage</privilege>
- <privilege>http://tizen.org/privilege/externalstorage</privilege>
- <privilege>http://tizen.org/privilege/network.get</privilege>
- <privilege>http://tizen.org/privilege/internet</privilege>
- </privileges>
-</manifest>