2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
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.
20 #include <dali/dali.h>
21 #include <dali-toolkit/dali-toolkit.h>
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/integration-api/debug.h>
24 #include <dali/devel-api/adaptor-framework/keyboard.h>
32 #include <Ecore_Wl2.h>
34 #include <Ecore_Wayland.h>
39 //#define LOG DALI_LOG_ERROR
47 SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Keyboard_SetRepeatInfo(float rate, float delay)
51 LOG("CSharp_Dali_Keyboard_SetRepeatInfo() [DP1] rate=%f, delay=%f", rate, delay);
55 ret = Dali::Keyboard::SetRepeatInfo(rate, delay);
56 } catch (std::out_of_range& e) {
58 SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return false;
60 } catch (std::exception& e) {
62 SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return false;
64 } catch (Dali::DaliException e) {
66 SWIG_CSharpException(SWIG_UnknownError, e.condition); return 0;
70 SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
76 LOG("CSharp_Dali_Keyboard_SetRepeatInfo() [DP2] ret=%d", ret);
81 SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Keyboard_GetRepeatInfo(float& rate, float& delay)
85 LOG("CSharp_Dali_Keyboard_GetRepeatInfo() [DP1] rate=%f, delay=%f", rate, delay);
89 ret = Dali::Keyboard::GetRepeatInfo(rate, delay);
90 } catch (std::out_of_range& e) {
92 SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return false;
94 } catch (std::exception& e) {
96 SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return false;
98 } catch (Dali::DaliException e) {
100 SWIG_CSharpException(SWIG_UnknownError, e.condition); return 0;
104 SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
110 LOG("CSharp_Dali_Keyboard_GetRepeatInfo() [DP2] ret=%d", ret);