*
*/
+#include <Ecore.h>
#include <unique_ptr.h>
#include "FUi_FocusManagerImpl.h"
#include "FUi_ControlImpl.h"
bool
_FocusManagerImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
+ Ecore_X_Window rootWindow = ecore_x_window_root_first_get();
+ Ecore_X_Atom keyboardExist = ecore_x_atom_get("X External Keyboard Exist");
+ unsigned int keyboardNumber = 0;
+ int ret = ecore_x_window_prop_card32_get(rootWindow, keyboardExist, &keyboardNumber, 1);
+ if (keyboardNumber == 0)
+ {
+ return false;
+ }
_KeyCode keyCode = keyInfo.GetKeyCode();
FocusDirection focusDirection = FOCUS_DIRECTION_DOWNWARD;
_Control* pControl = const_cast<_Control*> (&source);
_Frame::GetFocusControl(const _Control* pControl) const
{
const _Form* pForm = null;
- while(pControl)
+ _Frame* pFrame = null;
+ const _Control* pTempControl = pControl;
+ while(pTempControl)
{
- pForm = dynamic_cast<const _Form*>(pControl);
+ pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl));
if (pForm)
{
- break;
+ pFrame = dynamic_cast<_Frame*>(pForm->GetParent());
+ if (pFrame)
+ {
+ break;
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
}
else
{
- pControl = pControl->GetParent();
+ pTempControl = pTempControl->GetParent();
}
}
if (pForm)
_Frame::GetFocusTraversalControl(_Control* pControl) const
{
_Form* pForm = null;
- while(pControl)
+ _Control* pTempControl = pControl;
+ _Frame* pFrame = null;
+ while(pTempControl)
{
- pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pControl));
+ pForm = dynamic_cast<_Form*>(const_cast<_Control*>(pTempControl));
if (pForm)
{
- break;
+ pFrame = dynamic_cast<_Frame*>(pForm->GetParent());
+ if (pFrame)
+ {
+ break;
+ }
+ else
+ {
+ pTempControl = pTempControl->GetParent();
+ }
}
else
{
- pControl = pControl->GetParent();
+ pTempControl = pTempControl->GetParent();
}
}