1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
17 using Tizen.NUI.BaseComponents;
21 internal class KeyInputFocusManager : BaseHandle
23 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
25 internal KeyInputFocusManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.KeyInputFocusManager_SWIGUpcast(cPtr), cMemoryOwn)
27 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyInputFocusManager obj)
32 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35 protected override void Dispose(DisposeTypes type)
42 if (type == DisposeTypes.Explicit)
45 //Release your own managed resources here.
46 //You should release all of your own disposable objects here.
50 //Release your own unmanaged resources here.
51 //You should not access any managed member here except static instance.
52 //because the execution order of Finalizes is non-deterministic.
55 if (swigCPtr.Handle != global::System.IntPtr.Zero)
60 NDalicPINVOKE.delete_KeyInputFocusManager(swigCPtr);
62 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
68 private KeyInputFocusManager() : this(NDalicPINVOKE.new_KeyInputFocusManager(), true)
70 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
73 public static KeyInputFocusManager Get()
75 KeyInputFocusManager ret = new KeyInputFocusManager(NDalicPINVOKE.KeyInputFocusManager_Get(), true);
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 public void SetFocus(View control)
82 NDalicPINVOKE.KeyInputFocusManager_SetFocus(swigCPtr, View.getCPtr(control));
83 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86 public View GetCurrentFocusControl()
88 View ret = new View(NDalicPINVOKE.KeyInputFocusManager_GetCurrentFocusControl(swigCPtr), true);
89 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
93 public void RemoveFocus(View control)
95 NDalicPINVOKE.KeyInputFocusManager_RemoveFocus(swigCPtr, View.getCPtr(control));
96 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99 internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t KeyInputFocusChangedSignal()
101 SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t(NDalicPINVOKE.KeyInputFocusManager_KeyInputFocusChangedSignal(swigCPtr), false);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();