mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WL_EVENT_DATA_SOURCE_SEND, EcoreEventDataSend, handler ) );
mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WL_EVENT_SELECTION_DATA_READY, EcoreEventDataReceive, handler ) );
+ // Register Rotate event
+ mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WL_EVENT_WINDOW_ROTATE, EcoreEventRotate, handler) );
+
// Register Detent event
mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_DETENT_ROTATE, EcoreEventDetent, handler) );
}
/*
+ * Called when rotate event is recevied
+ */
+ static Eina_Bool EcoreEventRotate( void* data, int type, void* event )
+ {
+ DALI_LOG_INFO( gSelectionEventLogFilter, Debug::Concise, "EcoreEventRotate\n" );
+
+ EventHandler* handler( (EventHandler*)data );
+ Ecore_Wl_Event_Window_Rotate* ev( (Ecore_Wl_Event_Window_Rotate*)event );
+
+ if( ev->win != (unsigned int)ecore_wl_window_id_get( handler->mImpl->mWindow ) )
+ {
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ RotationEvent rotationEvent;
+ rotationEvent.angle = ev->angle;
+ rotationEvent.winResize = 0;
+ rotationEvent.width = ev->w;
+ rotationEvent.height = ev->h;
+ handler->SendRotationPrepareEvent( rotationEvent );
+
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ /*
* Called when detent event is recevied
*/
static Eina_Bool EcoreEventDetent( void* data, int type, void* event )
if( mRotationObserver != NULL )
{
mRotationObserver->OnRotationPrepare( event );
+ mRotationObserver->OnRotationRequest();
}
}
void EventHandler::SendRotationRequestEvent( )
{
- if( mRotationObserver != NULL )
- {
- mRotationObserver->OnRotationRequest( );
- }
+ // No need to separate event into prepare and request in wayland
}
void EventHandler::FeedTouchPoint( TouchPoint& point, int timeStamp)
void Window::Raise()
{
+ ecore_wl_window_raise( mEventHandler->mEcoreWindow );
}
void Window::Lower()
{
+ ecore_wl_window_lower( mEventHandler->mEcoreWindow );
}
void Window::Activate()
{
+ ecore_wl_window_activate( mEventHandler->mEcoreWindow );
}
Dali::DragAndDropDetector Window::GetDragAndDropDetector() const
void Window::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrientation>& orientations)
{
- DALI_ASSERT_ALWAYS( mAvailableOrientations.size() <= 4 && "Incorrect number of available orientations" );
+ int rotations[4];
+ for( std::size_t i = 0; i < mAvailableOrientations.size(); ++i )
+ {
+ rotations[i] = static_cast< int >( mAvailableOrientations[i] );
+ }
+ ecore_wl_window_rotation_available_rotations_set( mEventHandler->mEcoreWindow, rotations, mAvailableOrientations.size() );
}
const std::vector<Dali::Window::WindowOrientation>& Window::GetAvailableOrientations()
void Window::SetPreferredOrientation(Dali::Window::WindowOrientation orientation)
{
mPreferredOrientation = orientation;
+
+ ecore_wl_window_rotation_preferred_rotation_set( mEventHandler->mEcoreWindow, orientation );
}
Dali::Window::WindowOrientation Window::GetPreferredOrientation()
void Window::RotationDone( int orientation, int width, int height )
{
+ ecore_wl_window_rotation_change_done_send( mEventHandler->mEcoreWindow );
}
/**
* @PLATFORM
- * @brief Grabs the list of keys specfied by @Dali::Vector of keys for @a window in @Vector of grabModes.
+ * @brief Grabs the list of keys specfied by Dali::Vector of keys for @a window in Vector of grabModes.
*
* @details This function can be used for following example scenarios:
* - TV - A user might want to change the volume or channel of the background TV contents while focusing on the foregrund app.
/**
* @PLATFORM
- * @brief Ungrabs the list of keys specfied by @Dali::Vector of keys for @a window.
+ * @brief Ungrabs the list of keys specfied by Dali::Vector of keys for @a window.
*
* @SINCE_1_2.0
* @PRIVLEVEL_PLATFORM
/**
* @brief This is the constructor for applications without an argument list.
* @SINCE_1_1.37
+ * @return A handle to the WatchApplication
*/
static WatchApplication New();
* @SINCE_1_1.37
* @param[in,out] argc A pointer to the number of arguments
* @param[in,out] argv A pointer the the argument list
+ * @return A handle to the WatchApplication
*/
static WatchApplication New( int* argc, char **argv[] );
* @param[in,out] argc A pointer to the number of arguments
* @param[in,out] argv A pointer the the argument list
* @param[in] stylesheet The path to user defined theme file
+ * @return A handle to the WatchApplication
*/
static WatchApplication New( int* argc, char **argv[], const std::string& stylesheet );
/**
* @brief Copy Constructor
* @SINCE_1_1.37
+ * @param[in] implementation The WatchApplication implementation
*/
WatchApplication( const WatchApplication& implementation );
/**
* @brief Assignment operator
* @SINCE_1_1.37
+ * @param[in] handle Handle to an object
+ * @return A reference to this
*/
WatchApplication& operator=( const WatchApplication& applicaton );
* @endcode
* time(watch time handle) will not be available after returning this callback. It will be freed by the framework.
* @SINCE_1_1.37
+ * @return The signal to connect to
*/
WatchTimeSignal& TimeTickSignal();
* @SINCE_1_1.37
* @remarks http://tizen.org/privilege/alarm.set privilege is needed to receive ambient ticks at each minute.
* The AmbientTickSignal() will be ignored if your app doesn't have the privilege
+ * @return The signal to connect to
*/
WatchTimeSignal& AmbientTickSignal();
* @endcode
* ambient_mode If true the device enters the ambient mode, otherwise false
* @SINCE_1_1.37
+ * @return The signal to connect to
*/
WatchBoolSignal& AmbientChangedSignal();
* @brief return current hour
*
* @SINCE_1_1.37
+ * @return the current hour
* @pre The WatchTime needs to be initialized.
*/
int GetHour() const;
* @brief return current hour24
*
* @SINCE_1_1.37
+ * @return the current hour(the 24-hour clock)
* @pre The WatchTime needs to be initialized.
*/
int GetHour24() const;
* @brief return current minute
*
* @SINCE_1_1.37
+ * @return the current minute
* @pre The WatchTime needs to be initialized.
*/
int GetMinute() const;
* @brief return current second
*
* @SINCE_1_1.37
+ * @return the current second
* @pre The WatchTime needs to be initialized.
*/
int GetSecond() const;