Change-Id: I072408e718712dce63e1fe8bdc9ecc2894a05299
return GetImplementation( *this ).mFocusChangeSignal;
}
return GetImplementation( *this ).mFocusChangeSignal;
}
+Window::KeyEventSignalType& Window::KeyEventSignal()
+{
+ return GetImplementation( *this ).KeyEventSignal();
+}
+
+Window::TouchSignalType& Window::TouchSignal()
+{
+ return GetImplementation( *this ).TouchSignal();
+}
+
return GetImplementation( window ).GetScene().EventProcessingFinishedSignal();
}
return GetImplementation( window ).GetScene().EventProcessingFinishedSignal();
}
-KeyEventSignalType& KeyEventSignal( Window window )
-{
- return GetImplementation( window ).KeyEventSignal();
-}
-
KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window )
{
return GetImplementation( window ).KeyEventGeneratedSignal();
}
KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window )
{
return GetImplementation( window ).KeyEventGeneratedSignal();
}
-TouchSignalType& TouchSignal( Window window )
-{
- return GetImplementation( window ).TouchSignal();
-}
-
WheelEventSignalType& WheelEventSignal( Window window )
{
return GetImplementation( window ).WheelEventSignal();
WheelEventSignalType& WheelEventSignal( Window window )
{
return GetImplementation( window ).WheelEventSignal();
class Window : public BaseHandle
{
public:
class Window : public BaseHandle
{
public:
+ using KeyEventSignalType = Signal< void (const KeyEvent&) >;
+ using TouchSignalType = Signal< void (const TouchData&) >;
static Window New(PositionSize windowPosition, const std::string& name, bool isTransparent = false);
static Window New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent = false);
static Window New(PositionSize windowPosition, const std::string& name, bool isTransparent = false);
static Window New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent = false);
void Raise();
void Hide();
FocusChangeSignalType& FocusChangeSignal();
void Raise();
void Hide();
FocusChangeSignalType& FocusChangeSignal();
+ KeyEventSignalType& KeyEventSignal();
+ TouchSignalType& TouchSignal();
public:
explicit Window( Internal::Adaptor::Window* window );
public:
explicit Window( Internal::Adaptor::Window* window );
namespace DevelWindow
{
typedef Signal< void () > EventProcessingFinishedSignalType;
namespace DevelWindow
{
typedef Signal< void () > EventProcessingFinishedSignalType;
-typedef Signal< void (const KeyEvent&) > KeyEventSignalType;
typedef Signal< bool (const KeyEvent&) > KeyEventGeneratedSignalType;
typedef Signal< bool (const KeyEvent&) > KeyEventGeneratedSignalType;
-typedef Signal< void (const TouchData&) > TouchSignalType;
typedef Signal< void (const WheelEvent&) > WheelEventSignalType;
typedef Signal< void ( Window, bool ) > VisibilityChangedSignalType;
typedef Signal< void (const WheelEvent&) > WheelEventSignalType;
typedef Signal< void ( Window, bool ) > VisibilityChangedSignalType;
Dali::Window DownCast( BaseHandle handle );
EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window );
Dali::Window DownCast( BaseHandle handle );
EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window );
-KeyEventSignalType& KeyEventSignal( Dali::Window window );
KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Dali::Window window );
KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Dali::Window window );
-TouchSignalType& TouchSignal( Dali::Window window );
WheelEventSignalType& WheelEventSignal( Window window );
VisibilityChangedSignalType& VisibilityChangedSignal( Window window );
}
WheelEventSignalType& WheelEventSignal( Window window );
VisibilityChangedSignalType& VisibilityChangedSignal( Window window );
}
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// C++ EXAMPLE
void Create( Application& application )
{
// C++ EXAMPLE
void Create( Application& application )
{
- // Get the stage handle
- Stage stage = Stage::GetCurrent();
+ // Get the window handle
+ Window window = application.GetWindow();
mImageView = ImageView::New();
mImageView = ImageView::New();
imageMap[ ImageVisual::Property::DESIRED_HEIGHT ] = 100;
mImageView.SetProperty( ImageView::Property::IMAGE, imageMap );
imageMap[ ImageVisual::Property::DESIRED_HEIGHT ] = 100;
mImageView.SetProperty( ImageView::Property::IMAGE, imageMap );
- // Add the image view to the stage
- stage.Add( mImageView );
+ // Add the image view to the window
+ window.Add( mImageView );
// Register a custom float property on mImageView and use it to store the number of times we are tapped
mTagPropertyIndex = mImageView.RegisterProperty( TAG_PROPERTY_NAME, 0, Property::READ_WRITE /* Event-side only, i.e. not animatable */ );
// Register a custom float property on mImageView and use it to store the number of times we are tapped
mTagPropertyIndex = mImageView.RegisterProperty( TAG_PROPERTY_NAME, 0, Property::READ_WRITE /* Event-side only, i.e. not animatable */ );
mTagText.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
mTagText.SetProperty( TextLabel::Property::TEXT_COLOR, Color::WHITE );
mTagText.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
mTagText.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
mTagText.SetProperty( TextLabel::Property::TEXT_COLOR, Color::WHITE );
mTagText.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
+ window.Add( mTagText );