// EXTERNAL_HEADERS
#include <dali/public-api/object/any.h>
+#include <dali/public-api/events/mouse-button.h>
#include <dali/integration-api/debug.h>
#include <Ecore_Input.h>
: mEcoreEventHandler(),
mEcoreWindow( 0 ),
mOwnSurface( false ),
+ mIsTransparent( false ), // Should only be set to true once we actually create a transparent window regardless of what isTransparent is.
mRotationAppSet( false )
{
Initialize( positionSize, surface, isTransparent );
{
PointState::Type state ( PointState::DOWN );
- // Check if the buttons field is set and ensure it's the primary touch button.
- // If this event was triggered by buttons other than the primary button (used for touch), then
- // just send an interrupted event to Core.
- if( touchEvent->buttons && ( touchEvent->buttons != PRIMARY_TOUCH_BUTTON_ID ) )
- {
- state = PointState::INTERRUPTED;
- }
-
Integration::Point point;
point.SetDeviceId( touchEvent->multi.device );
point.SetState( state );
point.SetRadius( touchEvent->multi.radius, Vector2( touchEvent->multi.radius_x, touchEvent->multi.radius_y ) );
point.SetPressure( touchEvent->multi.pressure );
point.SetAngle( Degree( touchEvent->multi.angle ) );
+ if( touchEvent->buttons)
+ {
+ point.SetMouseButton( static_cast< MouseButton::Type >( touchEvent->buttons) );
+ }
mTouchEventSignal.Emit( point, touchEvent->timestamp );
}
point.SetRadius( touchEvent->multi.radius, Vector2( touchEvent->multi.radius_x, touchEvent->multi.radius_y ) );
point.SetPressure( touchEvent->multi.pressure );
point.SetAngle( Degree( touchEvent->multi.angle ) );
+ if( touchEvent->buttons)
+ {
+ point.SetMouseButton( static_cast< MouseButton::Type >( touchEvent->buttons) );
+ }
mTouchEventSignal.Emit( point, touchEvent->timestamp );
}
DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreX::OnKeyDown\n" );
std::string keyName( keyEvent->keyname );
+ std::string key( "" );
std::string keyString( "" );
std::string compose( "" );
compose = keyEvent->compose;
}
+ // Ensure key symbol is not NULL as keys like SHIFT have a null string.
+ if( keyEvent->key )
+ {
+ key = keyEvent->key;
+ }
+
int keyCode = ecore_x_keysym_keycode_get( keyEvent->keyname );
int modifier( keyEvent->modifiers );
unsigned long time = keyEvent->timestamp;
keyString = keyEvent->string;
}
- Integration::KeyEvent keyEvent( keyName, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
+ Integration::KeyEvent keyEvent( keyName, key, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
mKeyEventSignal.Emit( keyEvent );
}
DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, " WindowBaseEcoreX::OnKeyUp\n" );
std::string keyName( keyEvent->keyname );
+ std::string key( "" );
std::string keyString( "" );
std::string compose( "" );
{
compose = keyEvent->compose;
}
+ // Ensure key symbol is not NULL as keys like SHIFT have a null string.
+ if( keyEvent->key )
+ {
+ key = keyEvent->key;
+ }
+
int keyCode = ecore_x_keysym_keycode_get( keyEvent->keyname );
int modifier( keyEvent->modifiers );
unsigned long time( keyEvent->timestamp );
keyString = keyEvent->string;
}
- Integration::KeyEvent keyEvent( keyName, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
+ Integration::KeyEvent keyEvent( keyName, key, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
mKeyEventSignal.Emit( keyEvent );
}
{
// create 32 bit window
mEcoreWindow = ecore_x_window_argb_new( 0, positionSize.x, positionSize.y, positionSize.width, positionSize.height );
+ mIsTransparent = true;
}
else
{