fixed bug(P130730-6872)fixed bug(P130730-6872)
authorChulheon <ch.jeong47@samsung.com>
Mon, 12 Aug 2013 10:40:58 +0000 (19:40 +0900)
committerChulheon <ch.jeong47@samsung.com>
Mon, 12 Aug 2013 10:42:59 +0000 (19:42 +0900)
Change-Id: I41d4ba9ba7f06d6c5b9a7308b7d7d35a651f423a

src/ui/CMakeLists.txt
src/ui/FUi_InputConnectionImpl.cpp
src/ui/FUi_InputConnectionUtils.cpp [new file with mode: 0644]
src/ui/FUi_InputConnectionUtils.h [new file with mode: 0644]

index 0bf345d..bb0f61f 100644 (file)
@@ -225,6 +225,7 @@ SET (${this_target}_SOURCE_FILES
        FUi_CardLayoutImpl.cpp
        FUiInputConnection.cpp
        FUi_InputConnectionImpl.cpp
+       FUi_InputConnectionUtils.cpp
        FUi_Matrix3Df.cpp
        FUi_TouchEventManagerImpl.cpp
        FUiTouchEventManager.cpp
index 375fb45..9d49d1e 100644 (file)
@@ -33,6 +33,7 @@
 #include "FUi_EcoreEvas.h"
 #include "FUi_EcoreEvasMgr.h"
 #include "FUi_InputConnectionImpl.h"
+#include "FUi_InputConnectionUtils.h"
 #include "FUi_UiEventManager.h"
 #include "FUiAnim_EflNode.h"
 #include "FUiAnim_VisualElement.h"
@@ -1519,18 +1520,7 @@ _InputConnectionImpl::GetInstance(const InputConnection& inputConnection)
 int
 _InputConnectionImpl::CheckUSBKeyboardStatus(void)
 {
-       Ecore_X_Window rootWindow = ecore_x_window_root_first_get();
-       Ecore_X_Atom keyboardExist = 0;
-       unsigned int keyboardNumber = 0;
-       int ret = 0;
-
-       if (!keyboardExist)
-       {
-               keyboardExist = ecore_x_atom_get("X External Keyboard Exist");
-       }
-       ret = ecore_x_window_prop_card32_get(rootWindow, keyboardExist, &keyboardNumber, 1);
-
-       return keyboardNumber;
+       return _InputConnectionUtils::CheckUSBKeyboardStatus();
 }
 
 result
diff --git a/src/ui/FUi_InputConnectionUtils.cpp b/src/ui/FUi_InputConnectionUtils.cpp
new file mode 100644 (file)
index 0000000..ec96dc5
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// 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.
+//
+
+/**
+ * @file               FUi_InputConnectionUtils.cpp
+ * @brief              This is the implementation file for the _InputConnectionUtils class.
+ */
+#include <Ecore.h>
+#include "FUi_EcoreEvas.h"
+#include "FUi_EcoreEvasMgr.h"
+#include "FUi_InputConnectionUtils.h"
+
+namespace Tizen { namespace Ui
+{
+
+_InputConnectionUtils::_InputConnectionUtils(void)
+{
+}
+
+_InputConnectionUtils::~_InputConnectionUtils(void)
+{
+}
+
+int
+_InputConnectionUtils::CheckUSBKeyboardStatus(void)
+{
+       Ecore_X_Window rootWindow = ecore_x_window_root_first_get();
+       Ecore_X_Atom keyboardExist = 0;
+       unsigned int keyboardNumber = 0;
+       int ret = 0;
+
+       if (!keyboardExist)
+       {
+               keyboardExist = ecore_x_atom_get("X External Keyboard Exist");
+       }
+       ret = ecore_x_window_prop_card32_get(rootWindow, keyboardExist, &keyboardNumber, 1);
+
+       return keyboardNumber;
+}
+
+}} // Tizen::Ui
diff --git a/src/ui/FUi_InputConnectionUtils.h b/src/ui/FUi_InputConnectionUtils.h
new file mode 100644 (file)
index 0000000..2bc054d
--- /dev/null
@@ -0,0 +1,46 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// 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.
+//
+
+/**
+ * @file       FUi_InputConnectionUtils.h
+ * @brief      This is the header file for the _InputConnectionUtils class.
+ *
+ * This header file contains the declarations of the _InputConnectionUtils class.
+ */
+
+#ifndef _FUI_INTERNAL_INPUTCONNECTION_UTILS_H_
+#define _FUI_INTERNAL_INPUTCONNECTION_UTILS_H_
+
+namespace Tizen { namespace Ui
+{
+
+class _InputConnectionUtils
+{
+public:
+       static int CheckUSBKeyboardStatus(void);
+
+private:
+       _InputConnectionUtils(void);
+       ~_InputConnectionUtils(void);
+
+       _InputConnectionUtils(const _InputConnectionUtils& rhs);
+       _InputConnectionUtils& operator =(const _InputConnectionUtils& rhs);
+}; //_InputConnectionUtils
+
+}} // Tizen::Ui
+
+#endif //_FUI_INTERNAL_INPUTCONNECTION_UTILS_H_
\ No newline at end of file