#ifndef __DALI_TOOLKIT_KEYINPUT_FOCUS_MANAGER_H__
#define __DALI_TOOLKIT_KEYINPUT_FOCUS_MANAGER_H__
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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.
-//
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
// INTERNAL INCLUDES
-#include <dali/dali.h>
#include <dali-toolkit/public-api/controls/control.h>
-namespace Dali DALI_IMPORT_API
+namespace Dali
{
namespace Toolkit
* all the keyboard events first. And if the conrol doesn't consume the event it is passed to
* the next control in the stack. If none of the controls in the stack consume the key event then
* UnhandledKeyEventSignal() is emitted.
+ *
+ * Signals
+ * | %Signal Name | Method |
+ * |-------------------------|-----------------------------------|
+ * | key-input-focus-changed | @ref KeyInputFocusChangedSignal() |
+ * | unhandled-key-event | @ref UnhandledKeyEventSignal() |
*/
-
- class KeyInputFocusManager : public BaseHandle
- {
- public:
- //Signal Names
- static const char* const SIGNAL_KEY_INPUT_FOCUS_CHANGED;
- static const char* const SIGNAL_UNHANDLED_KEY_EVENT;
+class DALI_IMPORT_API KeyInputFocusManager : public BaseHandle
+{
+public:
// KeyInputFocusChanged
- typedef SignalV2< void (Control, Control) > KeyInputFocusChangedSignalV2;
+ typedef Signal< void (Control, Control) > KeyInputFocusChangedSignalType;
// Unhandled Key Event
- typedef SignalV2< void (const KeyEvent&) > UnhandledKeyEventSignalV2;
+ typedef Signal< void (const KeyEvent&) > UnhandledKeyEventSignalType;
- public:
+public:
/**
* Create a KeyInputFocusManager handle; this can be initialised with KeyInputFocusManager::Get()
KeyInputFocusManager();
/**
- * Virtual destructor.
+ * @brief Destructor
+ *
+ * This is non-virtual since derived Handle types must not contain data or virtual methods.
*/
- virtual ~KeyInputFocusManager();
+ ~KeyInputFocusManager();
/**
* Get the singleton of KeyInputFocusManager object.
*/
bool IsKeyboardListener(Control control);
- public: // Signals
+public: // Signals
/**
* This signal is emitted when the key input focus control changes.
* @endcode
* @return The signal to connect to.
*/
- KeyInputFocusChangedSignalV2& KeyInputFocusChangedSignal();
+ KeyInputFocusChangedSignalType& KeyInputFocusChangedSignal();
/**
* This signal is emitted when a key event was received, and none of the focused controls on the stage have consumed it.
* @endcode
* @return The signal to connect to.
*/
- UnhandledKeyEventSignalV2& UnhandledKeyEventSignal();
+ UnhandledKeyEventSignalType& UnhandledKeyEventSignal();
private:
- KeyInputFocusManager(Internal::KeyInputFocusManager *impl);
+ explicit DALI_INTERNAL KeyInputFocusManager(Internal::KeyInputFocusManager *impl);
}; // class KeyInputFocusManager