[Inputmethod] Remove Option window apis 82/150982/1
authorsungwook79.park <sungwook79.park@samsung.com>
Tue, 19 Sep 2017 08:30:10 +0000 (17:30 +0900)
committersungwook79.park <sungwook79.park@samsung.com>
Tue, 19 Sep 2017 08:30:10 +0000 (17:30 +0900)
Change-Id: Ic9b5b911c8cd7ac86cf5a2fcf17e203b93d7f63c
Signed-off-by: sungwook79.park <sungwook79.park@samsung.com>
src/Tizen.Uix.InputMethod/Interop/Interop.InputMethod.cs
src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/InputMethodEditor.cs
src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/OptionWindow.cs [deleted file]
src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/OptionWindowCreatedEventArgs.cs [deleted file]
src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/OptionWindowDestroyedEventArgs.cs [deleted file]

index ba421a0..4b5ccb3 100755 (executable)
@@ -158,12 +158,6 @@ internal static partial class Interop
         [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_accessibility_state_changed_cb")]
         internal static extern ErrorCode ImeEventSetAccessibilityStateChangedCb(ImeAccessibilityStateChangedCb callbackFunction, IntPtr userData);
 
-        [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_option_window_created_cb")]
-        internal static extern ErrorCode ImeEventSetOptionWindowCreatedCb(ImeOptionWindowCreatedCb callbackFunction, IntPtr userData);
-
-        [DllImport(Libraries.InputMethod, EntryPoint = "ime_event_set_option_window_destroyed_cb")]
-        internal static extern ErrorCode ImeEventSetOptionWindowDestroyedCb(ImeOptionWindowDestroyedCb callbackFunction, IntPtr userData);
-
         [DllImport(Libraries.InputMethod, EntryPoint = "ime_send_key_event")]
         internal static extern ErrorCode ImeSendKeyEvent(KeyCode keycode, KeyMask keymask, bool forwardKey);
 
@@ -206,12 +200,6 @@ internal static partial class Interop
         [DllImport(Libraries.InputMethod, EntryPoint = "ime_set_size")]
         internal static extern ErrorCode ImeSetSize(int portraitWidth, int portraitHeight, int landscapeWidth, int landscapeHeight);
 
-        [DllImport(Libraries.InputMethod, EntryPoint = "ime_create_option_window")]
-        internal static extern ErrorCode ImeCreateOptionWindow();
-
-        [DllImport(Libraries.InputMethod, EntryPoint = "ime_destroy_option_window")]
-        internal static extern ErrorCode ImeDestroyOptionWindow(IntPtr window);
-
         [DllImport(Libraries.InputMethod, EntryPoint = "ime_context_get_layout")]
         internal static extern ErrorCode ImeContextGetLayout(IntPtr context, out InputPanelLayout layout);
 
@@ -317,11 +305,5 @@ internal static partial class Interop
 
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
         internal delegate void ImeAccessibilityStateChangedCb(bool state, IntPtr userData);
-
-        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        internal delegate void ImeOptionWindowCreatedCb(IntPtr window, OptionWindowType type, IntPtr userData);
-
-        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        internal delegate void ImeOptionWindowDestroyedCb(IntPtr window, IntPtr userData);
     }
 }
index 1473c8c..1d0967b 100755 (executable)
@@ -985,10 +985,6 @@ namespace Tizen.Uix.InputMethod
         private static ImeRotationChangedCb _imeRotationChangedDelegate;
         private static event EventHandler<AccessibilityStateChangedEventArgs> _accessibilityStateChanged;
         private static ImeAccessibilityStateChangedCb _imeAccessibilityStateChangedDelegate;
-        private static event EventHandler<OptionWindowCreatedEventArgs> _optionWindowCreated;
-        private static ImeOptionWindowCreatedCb _imeOptionWindowCreatedDelegate;
-        private static event EventHandler<OptionWindowDestroyedEventArgs> _optionWindowDestroyed;
-        private static ImeOptionWindowDestroyedCb _imeOptionWindowDestroyedDelegate;
         private static ImeLanguageRequestedCb _imeLanguageRequestedDelegate;
         private static OutAction<string> _languageRequestedDelegate;
         private static BoolAction<KeyCode, KeyMask, VoiceControlDeviceInformation> _processKeyDelagate;
@@ -1543,80 +1539,6 @@ namespace Tizen.Uix.InputMethod
         }
 
         /// <summary>
-        /// Called to create the option window.
-        /// </summary>
-        /// <remarks>
-        /// if Input panel requests to open the option window, type will be OptionWindowType.Keyboard.
-        /// And if Settings application requests to open it, type will be OptionWindowType.SettingApplication.
-        /// </remarks>
-        public static event EventHandler<OptionWindowCreatedEventArgs> OptionWindowCreated
-        {
-            add
-            {
-                lock (thisLock)
-                {
-                    _imeOptionWindowCreatedDelegate = (IntPtr window, OptionWindowType type, IntPtr userData) =>
-                    {
-                        OptionWindow._handle = window;
-                        OptionWindowCreatedEventArgs args = new OptionWindowCreatedEventArgs(new OptionWindow(), type);
-                        _optionWindowCreated?.Invoke(null, args);
-                    };
-                    ErrorCode error = ImeEventSetOptionWindowCreatedCb(_imeOptionWindowCreatedDelegate, IntPtr.Zero);
-                    if (error != ErrorCode.None)
-                    {
-                        Log.Error(LogTag, "Add OptionWindowCreated Failed with error " + error);
-                    }
-                    else
-                    {
-                        _optionWindowCreated += value;
-                    }
-                }
-            }
-            remove
-            {
-                lock (thisLock)
-                {
-                    _optionWindowCreated -= value;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Called to destroy the option window.
-        /// </summary>
-        public static event EventHandler<OptionWindowDestroyedEventArgs> OptionWindowDestroyed
-        {
-            add
-            {
-                lock (thisLock)
-                {
-                    _imeOptionWindowDestroyedDelegate = (IntPtr window, IntPtr userData) =>
-                    {
-                        OptionWindow._handle = window;
-                        OptionWindowDestroyedEventArgs args = new OptionWindowDestroyedEventArgs(new OptionWindow());
-                        _optionWindowDestroyed?.Invoke(null, args);
-                    };
-                    ErrorCode error = ImeEventSetOptionWindowDestroyedCb(_imeOptionWindowDestroyedDelegate, IntPtr.Zero);
-                    if (error != ErrorCode.None)
-                    {
-                        Log.Error(LogTag, "Add OptionWindowDestroyed Failed with error " + error);
-                    }
-                    else
-                    {
-                        _optionWindowDestroyed += value;
-                    }
-                }
-            }
-            remove
-            {
-                lock (thisLock)
-                {
-                    _optionWindowDestroyed -= value;
-                }
-            }
-        }
-
-        /// <summary>
         /// Sets the languageRequested Action
         /// </summary>
         /// <param name="languageRequested">
@@ -2072,62 +1994,5 @@ namespace Tizen.Uix.InputMethod
                 throw InputMethodExceptionFactory.CreateException(error);
             }
         }
-
-        /// <summary>
-        /// Requests to create an option window from the input panel.
-        /// The input panel can call this function to open the option window. This function calls OptionWindowCreated Event with OptionWindowType.Keyboard.
-        /// </summary>
-        /// <privilege>
-        /// http://tizen.org/privilege/ime
-        /// </privilege>
-        /// <exception cref="InvalidOperationException">
-        /// This can occur due to the following reasons:
-        /// 1) The application does not have the privilege to call this function
-        /// 2) Operation failed
-        /// 3) IME main loop isn't started yet
-        /// 4) OptionWindowCreated event has not been set
-        /// </exception>
-        /// <precondition>
-        /// OptionWindowCreated and OptionWindowDestroyed event should be set
-        /// </precondition>
-        public static void CreateOptionWindow()
-        {
-            ErrorCode error = ImeCreateOptionWindow();
-            if (error != ErrorCode.None)
-            {
-                Log.Error(LogTag, "CreapteOptionWindow Failed with error " + error);
-                throw InputMethodExceptionFactory.CreateException(error);
-            }
-        }
-
-        /// <summary>
-        /// Requests to destroy an option window.
-        /// The input panel can call this function to close the option window which is created from either the input panel or Settings application.
-        /// </summary>
-        /// <privilege>
-        /// http://tizen.org/privilege/ime
-        /// </privilege>
-        /// <param name="window">The option window to destroy</param>
-        /// <exception cref="InvalidOperationException">
-        /// This can occur due to the following reasons:
-        /// 1) The application does not have the privilege to call this function
-        /// 2) Invalid Parameter
-        /// 3) IME main loop isn't started yet
-        /// </exception>
-        /// <precondition>
-        /// OptionWindowDestroyed Event must be set.
-        /// </precondition>
-        /// <postcondition>
-        /// This function triggers the OptionWindowDestroyed Event if it is set.
-        /// </postcondition>
-        public static void DestroyOptionWindow(OptionWindow window)
-        {
-            ErrorCode error = ImeDestroyOptionWindow(window);
-            if (error != ErrorCode.None)
-            {
-                Log.Error(LogTag, "DestroyOptionWindow Failed with error " + error);
-                throw InputMethodExceptionFactory.CreateException(error);
-            }
-        }
     }
 }
diff --git a/src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/OptionWindow.cs b/src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/OptionWindow.cs
deleted file mode 100755 (executable)
index ca7510e..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2016 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 Tizen;
-using System;
-using ElmSharp;
-using static Interop.InputMethod;
-
-namespace Tizen.Uix.InputMethod
-{
-    /// <summary>
-    /// Option window Class
-    /// </summary>
-    public class OptionWindow : Window
-    {
-        internal static IntPtr _handle = IntPtr.Zero;
-        private IntPtr _realHandle = IntPtr.Zero;
-
-        internal OptionWindow():base("Option")
-        {
-            _realHandle = _handle;
-        }
-
-        protected override IntPtr CreateHandle(EvasObject parent)
-        {
-            return _handle;
-        }
-
-        /// <summary>
-        /// The type of option window
-        /// </summary>
-        public OptionWindowType Type
-        {
-            get;
-            internal set;
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/OptionWindowCreatedEventArgs.cs b/src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/OptionWindowCreatedEventArgs.cs
deleted file mode 100755 (executable)
index 0a32723..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2016 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.
-*/
-
-namespace Tizen.Uix.InputMethod
-{
-    /// <summary>
-    /// Enumeration of the option window type.
-    /// </summary>
-    public enum OptionWindowType
-    {
-        /// <summary>
-        /// Open from Keyboard
-        /// </summary>
-        Keyboard,
-        /// <summary>
-        /// Open from Setting application
-        /// </summary>
-        SettingApplication
-    };
-
-    /// <summary>
-    /// This class contains information related to OptionWindowCreated event
-    /// </summary>
-    public class OptionWindowCreatedEventArgs
-    {
-        internal OptionWindowCreatedEventArgs(OptionWindow window, OptionWindowType type)
-        {
-            Window = window;
-            Window.Type = type;
-        }
-
-        /// <summary>
-        /// The created window object
-        /// </summary>
-        public OptionWindow Window
-        {
-            get;
-            internal set;
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/OptionWindowDestroyedEventArgs.cs b/src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/OptionWindowDestroyedEventArgs.cs
deleted file mode 100755 (executable)
index 975f661..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2016 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.
-*/
-
-namespace Tizen.Uix.InputMethod
-{
-    /// <summary>
-    /// This class contains information related to the OptionWindowDestroyed event
-    /// </summary>
-    public class OptionWindowDestroyedEventArgs
-    {
-        internal OptionWindowDestroyedEventArgs(OptionWindow window)
-        {
-            Window = window;
-        }
-
-        /// <summary>
-        /// The window object to destroy
-        /// </summary>
-        public OptionWindow Window
-        {
-            get;
-            internal set;
-        }
-    }
-}
\ No newline at end of file