2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Collections.Generic;
20 using static Interop.InputMethod;
22 namespace Tizen.Uix.InputMethod
25 /// Enumeration for Device Class
27 public enum DeviceClass
68 /// Enumeration for Device SubClass
70 public enum DeviceSubclass
123 /// this class gives the device information, like the name, class and subclass
125 public class InputMethodDeviceInformation
127 private IntPtr _handle;
128 internal InputMethodDeviceInformation(IntPtr handle)
134 /// Gets the device name of the key event.
141 ErrorCode error = ImeDeviceInfoGetName(_handle, out name);
142 if (error != ErrorCode.None)
144 Log.Error(LogTag, "GetName Failed with error " + error);
152 /// Gets the device class of the key event.
154 public DeviceClass DeviceClass
158 DeviceClass devClass;
159 ErrorCode error = ImeDeviceInfoGetClass(_handle, out devClass);
160 if (error != ErrorCode.None)
162 Log.Error(LogTag, "GetClass Failed with error " + error);
163 return DeviceClass.Undefined;
170 /// Gets the device subclass of the key event.
172 public DeviceSubclass DeviceSubclass
176 DeviceSubclass subclass;
177 ErrorCode error = ImeDeviceInfoGetSubclass(_handle, out subclass);
178 if (error != ErrorCode.None)
180 Log.Error(LogTag, "GetSubclass Failed with error " + error);
181 return DeviceSubclass.Undefined;