#ifndef __DALI_INTEGRATION_KEY_EVENT_H__
#define __DALI_INTEGRATION_KEY_EVENT_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.
+ *
+ */
// EXTERNAL INCLUDES
#include <string>
// INTERNAL INCLUDES
#include <dali/integration-api/events/event.h>
+#include <dali/public-api/events/key-event.h>
namespace Dali DALI_IMPORT_API
{
* @param[in] keyString A string of input characters or key pressed
* @param[in] keyCode The unique key code for the key pressed.
* @param[in] keyModifier The key modifier for special keys like shift and alt
- * @param[in] timeStamp The time (in ms) that the key event occurred.
- * @param[in] keyState The state of the key event.
+ * @param[in] timeStamp The time (in ms) that the key event occurred.
+ * @param[in] keyState The state of the key event.
+ * @param[in] deviceName Name of device KeyEvent originated from
*/
KeyEvent(const std::string& keyName,
const std::string& keyString,
int keyCode,
int keyModifier,
unsigned long timeStamp,
- const State& keyState);
+ const State& keyState,
+ const std::string deviceName );
+
+ /*
+ * Constructor, creates a Integration::KeyEvent from a Dali::KeyEvent
+ * @param[in] event Dali::KeyEvent to convert from
+ */
+ explicit KeyEvent( const Dali::KeyEvent& event );
/**
* Virtual destructor
*/
State state;
+ /**
+ * Name of device KeyEvent originated from
+ */
+ std::string deviceName;
+
};
} // namespace Integration