Widget's new keyEvent only work over tizen 7.0.
For avoid build error, i added this patch
Change-Id: I3ee52451e75ef1e6ca6fd64abd2c4b134d864dd2
* In this API, widget framework create a new keyEvent, find the proper widget and send this event.
* Finally widget framework receive feedback from widget.
*/
* In this API, widget framework create a new keyEvent, find the proper widget and send this event.
* Finally widget framework receive feedback from widget.
*/
+#ifdef OVER_TIZEN_VERSION_7
bool OnKeyEventCallback(const char *id, screen_connector_event_type_e eventType, int keyCode, const char *keyName, long long cls, long long subcls, const char* identifier, long long timestamp, void *userData)
{
Dali::Internal::Adaptor::WidgetApplicationTizen* application = static_cast<Dali::Internal::Adaptor::WidgetApplicationTizen*>(userData);
bool OnKeyEventCallback(const char *id, screen_connector_event_type_e eventType, int keyCode, const char *keyName, long long cls, long long subcls, const char* identifier, long long timestamp, void *userData)
{
Dali::Internal::Adaptor::WidgetApplicationTizen* application = static_cast<Dali::Internal::Adaptor::WidgetApplicationTizen*>(userData);
int OnInstanceInit(widget_base_instance_h instanceHandle, bundle* content, int w, int h, void* classData)
{
int OnInstanceInit(widget_base_instance_h instanceHandle, bundle* content, int w, int h, void* classData)
{
Internal::Adaptor::GetImplementation(widgetInstance).OnCreate(encodedContentString, window);
// connect keyEvent for widget
Internal::Adaptor::GetImplementation(widgetInstance).OnCreate(encodedContentString, window);
// connect keyEvent for widget
+#ifdef OVER_TIZEN_VERSION_7
application->ConnectKeyEvent(window);
application->ConnectKeyEvent(window);
{
if(!mConnectedKeyEvent)
{
{
if(!mConnectedKeyEvent)
{
+#ifdef OVER_TIZEN_VERSION_7
screen_connector_provider_set_key_event_cb(OnKeyEventCallback, this);
screen_connector_provider_set_key_event_cb(OnKeyEventCallback, this);
mConnectedKeyEvent = true;
}
window.KeyEventSignal().Connect(this, &WidgetApplicationTizen::OnWindowKeyEvent);
mConnectedKeyEvent = true;
}
window.KeyEventSignal().Connect(this, &WidgetApplicationTizen::OnWindowKeyEvent);