// EXTERNAL INCLUDES
#include <Ecore.h>
#include <Evas.h>
-#ifdef WAYLAND
-#include <Ecore_Wayland.h>
-#else
+#ifndef WAYLAND
#include <Ecore_X.h>
#endif
#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/events/touch-point.h>
#include <dali/public-api/common/stage.h>
+#include <dali/public-api/actors/blending.h>
+#include <dali/public-api/shader-effects/shader-effect.h>
#include <dali/public-api/images/buffer-image.h>
#include <dali/integration-api/debug.h>
Debug::Filter* gIndicatorLogFilter = Debug::Filter::New(Debug::Concise, false, "LOG_INDICATOR");
#endif
+#ifndef WAYLAND
// Impl to hide EFL implementation.
-
struct Indicator::Impl
{
- enum // operation mode
- {
- INDICATOR_HIDE,
- INDICATOR_STAY_WITH_DURATION
- };
+ // Construction & Destruction
/**
* Constructor
: mIndicator(indicator),
mEcoreEventHandler(NULL)
{
-#if defined(DALI_PROFILE_MOBILE)
-#if defined(WAYLAND)
- mEcoreEventHandler = ecore_event_handler_add(ECORE_WL_EVENT_INDICATOR_FLICK, EcoreEventIndicator, this);
-#else
+ // Register Client message events for quick panel state.
mEcoreEventHandler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, EcoreEventClientMessage, this);
-#endif
-#endif // WAYLAND && DALI_PROFILE_MOBILE
}
/**
*/
~Impl()
{
- if ( mEcoreEventHandler )
- {
- ecore_event_handler_del(mEcoreEventHandler);
- }
+ ecore_event_handler_del(mEcoreEventHandler);
}
- static void SetIndicatorVisibility( void* data, int operation )
+ /**
+ * Called when the client messages (i.e. quick panel state) are received.
+ */
+ static Eina_Bool EcoreEventClientMessage( void* data, int type, void* event )
{
+ Ecore_X_Event_Client_Message* clientMessageEvent((Ecore_X_Event_Client_Message*)event);
Indicator::Impl* indicatorImpl((Indicator::Impl*)data);
- if ( indicatorImpl == NULL || indicatorImpl->mIndicator == NULL)
+ if (clientMessageEvent == NULL || indicatorImpl == NULL || indicatorImpl->mIndicator == NULL)
{
- return;
+ return ECORE_CALLBACK_PASS_ON;
}
- if ( operation == INDICATOR_STAY_WITH_DURATION )
+
+#ifndef DALI_PROFILE_UBUNTU
+ if (clientMessageEvent->message_type == ECORE_X_ATOM_E_INDICATOR_FLICK_DONE)
{
// if indicator is not showing, INDICATOR_FLICK_DONE is given
if( indicatorImpl->mIndicator->mVisible == Dali::Window::AUTO &&
indicatorImpl->mIndicator->ShowIndicator( AUTO_INDICATOR_STAY_DURATION );
}
}
- else if( operation == INDICATOR_HIDE )
+ else if( clientMessageEvent->message_type == ECORE_X_ATOM_E_MOVE_QUICKPANEL_STATE )
{
if( indicatorImpl->mIndicator->mVisible == Dali::Window::AUTO &&
indicatorImpl->mIndicator->mIsShowing )
indicatorImpl->mIndicator->ShowIndicator( HIDE_NOW );
}
}
- }
-#if defined(DALI_PROFILE_MOBILE)
-#if defined(WAYLAND)
- /**
- * Called when the Ecore indicator event is received.
- */
- static Eina_Bool EcoreEventIndicator( void* data, int type, void* event )
- {
- SetIndicatorVisibility( data, INDICATOR_STAY_WITH_DURATION );
- return ECORE_CALLBACK_PASS_ON;
- }
-#else
- /**
- * Called when the client messages (i.e. quick panel state) are received.
- */
- static Eina_Bool EcoreEventClientMessage( void* data, int type, void* event )
- {
- Ecore_X_Event_Client_Message* clientMessageEvent((Ecore_X_Event_Client_Message*)event);
+#endif
- if ( clientMessageEvent != NULL )
- {
- if (clientMessageEvent->message_type == ECORE_X_ATOM_E_INDICATOR_FLICK_DONE)
- {
- SetIndicatorVisibility( data, INDICATOR_STAY_WITH_DURATION );
- }
- else if ( clientMessageEvent->message_type == ECORE_X_ATOM_E_MOVE_QUICKPANEL_STATE )
- {
- SetIndicatorVisibility( data, INDICATOR_HIDE );
- }
- }
return ECORE_CALLBACK_PASS_ON;
}
-#endif
-#endif // WAYLAND && DALI_PROFILE_MOBILE
// Data
Indicator* mIndicator;
Ecore_Event_Handler* mEcoreEventHandler;
};
+#endif
Indicator::LockFile::LockFile(const std::string filename)
: mFilename(filename),
// hide the indicator by default
mIndicatorActor.SetVisible( false );
+#ifndef WAYLAND
// create impl to handle ecore event
mImpl = new Impl(this);
+#endif
}
Indicator::~Indicator()
{
+#ifndef WAYLAND
if(mImpl)
{
delete mImpl;
mImpl = NULL;
}
+#endif
if(mEventActor)
{
break;
case Dali::PointState::UP:
- case Dali::PointState::INTERRUPTED:
{
IpcDataEvMouseUp ipcUp( touchEvent.time );
mServerConnection->SendEvent( OP_EV_MOUSE_UP, &ipcUp, sizeof(ipcUp) );