+++ /dev/null
-/*
- * Copyright (c) 2016 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include "uv-callback-manager.h"
-
-// EXTERNAL INCLUDES
-#include <uv.h>
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-
-static void FreeHandleCallback(uv_handle_t* handle )
-{
- delete handle;
-}
-
-}
-/**
- * Structure contains the callback function and control options
- */
-struct CallbackData
-{
- typedef void (*CallbackFunction)(uv_idle_t*);
-
- /**
- * Constructor
- */
- CallbackData( CallbackBase* callback )
- : mCallback(callback),
- mRemoveFromContainerFunction(NULL),
- mIdleHandle( NULL),
- mExecute(true)
- {
- }
-
- /**
- * Add the idle callback
- */
- void AddIdle( CallbackFunction callback)
- {
- // heap allocate a handle as it will be alive after the CallbackData object is deleted.
- mIdleHandle = new uv_idle_t;
-
- // Node.JS uses uv_default_loop
- uv_idle_init( uv_default_loop() , mIdleHandle );
-
- mIdleHandle->data = this;
-
- uv_idle_start( mIdleHandle, callback);
- }
-
- /**
- * Destructor
- */
- ~CallbackData()
- {
- // the handle will still be alive for a short period after calling uv_close
- // set the data to NULL to avoid a dangling pointer
- mIdleHandle->data = NULL;
-
- uv_idle_stop( mIdleHandle );
-
- uv_close( reinterpret_cast< uv_handle_t*>( mIdleHandle ) , FreeHandleCallback );
-
- delete mCallback;
- delete mRemoveFromContainerFunction;
- }
-
- // Data
- CallbackBase* mCallback; ///< call back
- CallbackBase* mRemoveFromContainerFunction; ///< Called to remove the callbackdata from the callback container
- uv_idle_t* mIdleHandle; ///< idle handle
- bool mExecute; ///< whether to run the callback
-
-};
-
-namespace
-{
-void IdleCallback( uv_idle_t* handle )
-{
- CallbackData *callbackData = static_cast<CallbackData *>(handle->data);
-
- // remove callback data from the container first in case our callback tries to modify the container
- CallbackBase::Execute( *callbackData->mRemoveFromContainerFunction, callbackData );
-
- // run the function
- CallbackBase::Execute( *callbackData->mCallback );
-
- // will clear up the handle
- delete callbackData;
-
-}
-}
-
-UvCallbackManager::UvCallbackManager()
-:mRunning(false)
-{
-}
-
-void UvCallbackManager::Start()
-{
- DALI_ASSERT_DEBUG( mRunning == false );
- mRunning = true;
-}
-
-void UvCallbackManager::Stop()
-{
- // make sure we're not called twice
- DALI_ASSERT_DEBUG( mRunning == true );
-
- mRunning = false;
-
- for( CallbackList::iterator iter = mCallbackContainer.begin(); iter != mCallbackContainer.end(); ++iter)
- {
- CallbackData* data = (*iter);
-
- delete data;
- }
- mCallbackContainer.clear();
-}
-
-bool UvCallbackManager::AddIdleCallback( CallbackBase* callback )
-{
- if( !mRunning )
- {
- return false;
- }
-
- CallbackData *callbackData = new CallbackData( callback );
-
- // To inform the manager a callback has finished, we get it to call RemoveCallbackFromContainer
- callbackData->mRemoveFromContainerFunction = MakeCallback( this, &UvCallbackManager::RemoveCallbackFromContainer );
-
- // add the call back to the container
- mCallbackContainer.push_front(callbackData);
-
- // init the callback
- callbackData->AddIdle( &IdleCallback );
-
- return true;
-}
-
-void UvCallbackManager::RemoveIdleCallback( CallbackBase* callback )
-{
- for( CallbackList::iterator it = mCallbackContainer.begin(),
- endIt = mCallbackContainer.end();
- it != endIt;
- ++it )
- {
- CallbackData* data = *it;
-
- if( data->mCallback == callback )
- {
- // remove callback data from the container.
- CallbackBase::Execute( *data->mRemoveFromContainerFunction, data );
-
- delete data;
- }
- }
-}
-
-void UvCallbackManager::RemoveCallbackFromContainer(CallbackData *callbackData)
-{
- mCallbackContainer.remove(callbackData);
-}
-
-// Creates a concrete interface for CallbackManager
-CallbackManager* CallbackManager::New()
-{
- return new UvCallbackManager;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_UV_CALLBACK_MANAGER_H__
-#define __DALI_UV_CALLBACK_MANAGER_H__
-
-/*
- * Copyright (c) 2016 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <list>
-
-// INTERNAL INCLUDES
-#include <callback-manager.h>
-
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-struct CallbackData;
-
-/**
- * @brief LibUV callback manager used to install call backs in the applications main loop.
- * The manager keeps track of all callbacks, so that if Stop() is called it can remove them.
- */
-class UvCallbackManager : public CallbackManager
-{
-
-public:
-
- /**
- * @brief constructor
- */
- UvCallbackManager();
-
- /**
- * @brief destructor
- */
- ~UvCallbackManager(){}
-
- /**
- * @copydoc CallbackManager::AddIdleCallback()
- */
- virtual bool AddIdleCallback( CallbackBase* callback );
-
- /**
- * @copydoc CallbackManager::RemoveIdleCallback()
- */
- virtual void RemoveIdleCallback( CallbackBase* callback );
-
- /**
- * @copydoc CallbackManager::Start()
- */
- virtual void Start();
-
- /**
- * @copydoc CallbackManager::Stop()
- */
- virtual void Stop();
-
-private:
-
- /**
- * @brief Removes a single call back from the container
- * Always called from main thread
- * @param callbackData callback data
- */
- void RemoveCallbackFromContainer(CallbackData *callbackData);
-
-
- typedef std::list<CallbackData *> CallbackList; ///< list of callbacks installed
-
- bool mRunning; ///< flag is set to true if when running
- CallbackList mCallbackContainer; ///< container of live callbacks
-};
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
-
-#endif // __DALI_UV_CALLBACK_MANAGER_H__
+++ /dev/null
-/*
- * Copyright (c) 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include "file-descriptor-monitor.h"
-
-// EXTERNAL INCLUDES
-#include <dali/integration-api/debug.h>
-#include <uv.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-void FreeHandleCallback(uv_handle_t* handle )
-{
- delete handle;
-}
-
-}
-
-/**
- * Using Impl to hide away UV specific members
- */
-struct FileDescriptorMonitor::Impl
-{
-public:
-
- // Constructor
- Impl( int fileDescriptor, CallbackBase* callback, uv_poll_event eventsToMonitor )
- : mFileDescriptor( fileDescriptor ),
- mEventsToMonitor( eventsToMonitor ),
- mCallback( callback ),
- pollHandle( NULL )
- {
-
- // heap allocate a handle as it will be alive after the FileDescriptorMonitor::Impl object is deleted.
- pollHandle = new uv_poll_t;
-
- // Node.JS uses uv_default_loop
- uv_poll_init( uv_default_loop(), pollHandle, fileDescriptor);
-
- pollHandle->data = this;
-
- uv_poll_start( pollHandle, mEventsToMonitor, PollCabllack);
- }
-
- ~Impl()
- {
- uv_poll_stop( pollHandle );
-
- // the handle will still be alive for a short period after calling uv_close
- // set the data to NULL to avoid a dangling pointer
- pollHandle->data = NULL;
-
- uv_close(reinterpret_cast<uv_handle_t*> ( pollHandle ) , FreeHandleCallback );
-
- delete mCallback;
- }
-
- static void PollCabllack(uv_poll_t* handle, int status, int events)
- {
- if( handle->data )
- {
- FileDescriptorMonitor::Impl* impl= static_cast<FileDescriptorMonitor::Impl* >(handle->data);
-
- if( status < 0)
- {
- DALI_LOG_ERROR("LibUV FD_ERROR occurred on %d\n", impl->mFileDescriptor);
- CallbackBase::Execute( *impl->mCallback, FileDescriptorMonitor::FD_ERROR );
- return;
- }
- // filter the events that have occured based on what we are monitoring
-
- int eventType = FileDescriptorMonitor::FD_NO_EVENT;
-
- if (( impl->mEventsToMonitor & UV_READABLE ) && ( events & UV_READABLE ))
- {
- eventType = FileDescriptorMonitor::FD_READABLE;
- }
- if (( impl->mEventsToMonitor & UV_WRITABLE ) && ( events & UV_WRITABLE ))
- {
- eventType |= FileDescriptorMonitor::FD_WRITABLE;
- }
-
- // if there is an event, execute the callback
- if( eventType != FileDescriptorMonitor::FD_NO_EVENT )
- {
- CallbackBase::Execute( *impl->mCallback, static_cast< FileDescriptorMonitor::EventType >(eventType) );
- }
- }
- }
- // Data
- int mFileDescriptor;
- uv_poll_event mEventsToMonitor;
- CallbackBase* mCallback;
- uv_poll_t* pollHandle;
-
-};
-
-
-FileDescriptorMonitor::FileDescriptorMonitor( int fileDescriptor, CallbackBase* callback, int eventBitmask )
-{
- if (fileDescriptor < 1)
- {
- DALI_ASSERT_ALWAYS( 0 && "Invalid File descriptor");
- return;
- }
- int events = 0;
- if( eventBitmask & FD_READABLE)
- {
- events = UV_READABLE;
- }
- if( eventBitmask & FD_WRITABLE)
- {
- events |= UV_WRITABLE;
- }
-
- DALI_ASSERT_ALWAYS( events && "Invalid FileDescriptorMonitor event type ");
-
- // waiting for a write event on a file descriptor
- mImpl = new Impl( fileDescriptor, callback, static_cast< uv_poll_event >( events ) );
-}
-
-FileDescriptorMonitor::~FileDescriptorMonitor()
-{
- delete mImpl;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
+++ /dev/null
-/*
- * Copyright (c) 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include "timer-impl.h"
-#include <dali/integration-api/debug.h>
-
-// EXTERNAL INCLUDES
-#include <uv.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-void TimerSourceFunc (uv_timer_t* handle)
-{
- Timer* timer = static_cast<Timer*>(handle->data);
-
- bool keepRunning = timer->Tick();
- if( !keepRunning )
- {
- timer->Stop();
- }
-}
-void FreeHandleCallback(uv_handle_t* handle )
-{
- delete handle;
-}
-
-} // unnamed namespace
-
-/**
- * Struct to hide away Ecore implementation details
- */
-struct Timer::Impl
-{
- Impl( unsigned int milliSec )
- : mTimerHandle( NULL ),
- mInterval( milliSec ),
- mRunning( false )
- {
- }
-
- ~Impl()
- {
- // the handle will still be alive for a short period after calling uv_close
- // set the data to NULL to avoid a dangling pointer
- mTimerHandle->data = NULL;
-
- uv_close( reinterpret_cast< uv_handle_t* >( mTimerHandle ), FreeHandleCallback );
- }
-
- bool Running()
- {
- return mRunning;
- }
-
- void Start( void* internalTimerPtr )
- {
- Stop(); // make sure we stop first if its currently running
-
- if( !mTimerHandle )
- {
- // heap allocate the handle as its lifetime will be longer than TimerImpl
- mTimerHandle = new uv_timer_t;
-
- // initialize the handle
- uv_timer_init( uv_default_loop(), mTimerHandle);
- }
-
- mRunning = true;
-
- mTimerHandle->data = internalTimerPtr;
-
- uv_timer_start( mTimerHandle, TimerSourceFunc, mInterval, mInterval);
- }
-
- void Stop()
- {
- if( mRunning )
- {
- mTimerHandle->data = NULL;
- uv_timer_stop( mTimerHandle );
- mRunning = false;
- }
- }
-
- uv_timer_t* mTimerHandle;
- unsigned int mInterval;
- bool mRunning;
-};
-
-TimerPtr Timer::New( unsigned int milliSec )
-{
- DALI_LOG_ERROR(" new timer\n");
- TimerPtr timer( new Timer( milliSec ) );
- return timer;
-}
-
-Timer::Timer( unsigned int milliSec )
-: mImpl(new Impl(milliSec))
-{
-}
-
-Timer::~Timer()
-{
- // stop timers
- Stop();
-
- delete mImpl;
-}
-
-void Timer::Start()
-{
- mImpl->Start( this );
-}
-
-void Timer::Stop()
-{
- mImpl->Stop();
-}
-
-void Timer::SetInterval( unsigned int interval )
-{
- // stop existing timer
- Stop();
-
- mImpl->mInterval = interval;
-
- // start new tick
- Start();
-}
-
-unsigned int Timer::GetInterval() const
-{
- return mImpl->mInterval;
-}
-
-bool Timer::Tick()
-{
- // Guard against destruction during signal emission
- Dali::Timer handle( this );
-
- bool retVal( false );
-
- // Override with new signal if used
- if( !mTickSignal.Empty() )
- {
- retVal = mTickSignal.Emit();
-
- // Timer stops if return value is false
- if (retVal == false)
- {
- Stop();
- }
- else
- {
- retVal = true; // continue emission
- }
- }
- else // no callbacks registered
- {
- // periodic timer is started but nobody listens, continue
- retVal = true;
- }
-
- return retVal;
-}
-
-Dali::Timer::TimerSignalType& Timer::TickSignal()
-{
- return mTickSignal;
-}
-
-bool Timer::IsRunning() const
-{
- return mImpl->mRunning;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
$(adaptor_common_dir)/event-loop/ecore/ecore-file-descriptor-monitor.cpp \
$(adaptor_common_dir)/event-loop/ecore/ecore-timer-impl.cpp
-adaptor_common_internal_uv_src_files = \
- $(adaptor_common_dir)/event-loop/lib-uv/uv-callback-manager.cpp \
- $(adaptor_common_dir)/event-loop/lib-uv/uv-file-descriptor-monitor.cpp \
- $(adaptor_common_dir)/event-loop/lib-uv/uv-timer-impl.cpp
-
adaptor_common_internal_default_profile_src_files = \
$(adaptor_common_dir)/color-controller-impl.cpp \
$(adaptor_common_dir)/system-settings.cpp
+++ /dev/null
-# libuv
-adaptor_tizen_framework_libuv_src_files = $(adaptor_libuv_dir)/framework-libuv.cpp
+++ /dev/null
-/*
- * Copyright (c) 2015 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include "framework.h"
-
-// EXTERNAL INCLUDES
-#include <uv.h>
-
-
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <callback-manager.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-
-/**
- * Impl to hide LibUV data members
- */
-struct Framework::Impl
-{
- // Constructor
-
- Impl(void* data)
- : mAbortCallBack( NULL ),
- mCallbackManager( NULL )
- {
- mCallbackManager = CallbackManager::New();
- mMainLoop = new uv_loop_t;
- uv_loop_init( mMainLoop );
-
- }
-
- ~Impl()
- {
- delete mAbortCallBack;
-
- // we're quiting the main loop so
- // mCallbackManager->RemoveAllCallBacks() does not need to be called
- // to delete our abort handler
- delete mCallbackManager;
-
- delete mMainLoop;
- }
-
- void Run()
- {
- uv_run( mMainLoop , UV_RUN_DEFAULT);
-
- uv_loop_close( mMainLoop );
-
- }
-
- void Quit()
- {
- uv_stop( mMainLoop );
- }
-
- // Data
-
- CallbackBase* mAbortCallBack;
- CallbackManager *mCallbackManager;
- uv_loop_t* mMainLoop;
-
-
-private:
- // Undefined
- Impl( const Impl& impl );
-
- // Undefined
- Impl& operator=( const Impl& impl );
-};
-
-Framework::Framework( Framework::Observer& observer, int *argc, char ***argv, Type type )
-: mObserver(observer),
- mInitialised(false),
- mRunning(false),
- mArgc(argc),
- mArgv(argv),
- mBundleName(""),
- mBundleId(""),
- mAbortHandler( MakeCallback( this, &Framework::AbortCallback ) ),
- mImpl(NULL)
-{
-
- mImpl = new Impl(this);
-}
-
-Framework::~Framework()
-{
- if (mRunning)
- {
- Quit();
- }
-
- delete mImpl;
-}
-
-void Framework::Run()
-{
- mRunning = true;
-
- mImpl->Run();
-
-
- mRunning = false;
-}
-
-void Framework::Quit()
-{
- mImpl->Quit();
-}
-
-bool Framework::IsMainLoopRunning()
-{
- return mRunning;
-}
-
-void Framework::AddAbortCallback( CallbackBase* callback )
-{
- mImpl->mAbortCallBack = callback;
-}
-
-std::string Framework::GetBundleName() const
-{
- return mBundleName;
-}
-
-void Framework::SetBundleName(const std::string& name)
-{
-}
-
-std::string Framework::GetBundleId() const
-{
- return "";
-}
-
-std::string Framework::GetResourcePath()
-{
- // TIZEN_PLATFORM_CONFIG_SUPPORTED not defined for libuv so path not available.
- return "";
-}
-
-void Framework::SetBundleId(const std::string& id)
-{
-}
-
-void Framework::AbortCallback( )
-{
- // if an abort call back has been installed run it.
- if (mImpl->mAbortCallBack)
- {
- CallbackBase::Execute( *mImpl->mAbortCallBack );
- }
- else
- {
- Quit();
- }
-}
-
-bool Framework::AppStatusHandler(int type, void *bundleData)
-{
- return true;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
mResizedSignal(),
mDeleteRequestSignal()
{
-
- // Detect if we're not running in a ecore main loop (e.g. libuv).
- // Typically ecore_x_init is called by app_efl_main->elm_init
- // but if we're not using app_efl_main then we have to call it ourselves
- // This is a hack until we create a pure X Window class
- if( ecore_x_display_get() == NULL )
- {
- mEcoreEventHander = false;
- ecore_x_init (NULL); // internally calls _ecore_x_input_init
- }
-
}
Window::~Window()
+++ /dev/null
-/*
- * Copyright (c) 2014 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <events/event-handler.h>
-
-// EXTERNAL INCLUDES
-#include <uv.h>
-#include <Ecore_X.h>
-
-#include <X11/Xlib.h>
-#include <X11/extensions/XInput2.h>
-#include <X11/extensions/XI2.h>
-
-#include <cstring>
-
-#include <sys/time.h>
-
-#ifndef DALI_PROFILE_UBUNTU
-#include <vconf.h>
-#include <vconf-keys.h>
-#endif // DALI_PROFILE_UBUNTU
-
-#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/events/touch-point.h>
-#include <dali/public-api/events/key-event.h>
-#include <dali/public-api/events/wheel-event.h>
-#include <dali/integration-api/debug.h>
-#include <dali/integration-api/events/key-event-integ.h>
-#include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/hover-event-integ.h>
-#include <dali/integration-api/events/wheel-event-integ.h>
-
-// INTERNAL INCLUDES
-#include <x-events/x-event-manager.h>
-#include <events/gesture-manager.h>
-#include <window-render-surface.h>
-#include <clipboard-impl.h>
-#include <key-impl.h>
-#include <physical-keyboard-impl.h>
-#include <style-monitor-impl.h>
-#include <base/core-event-interface.h>
-#include <base/interfaces/window-event-interface.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-#if defined(DEBUG_ENABLED)
-namespace
-{
-Integration::Log::Filter* gTouchEventLogFilter = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_TOUCH");
-} // unnamed namespace
-#endif
-
-
-namespace
-{
-
-const unsigned int PRIMARY_TOUCH_BUTTON_ID( 1 );
-
-const unsigned int BYTES_PER_CHARACTER_FOR_ATTRIBUTES = 3;
-
-
-// Copied from x server
-static unsigned int GetCurrentMilliSeconds(void)
-{
- struct timeval tv;
-
- struct timespec tp;
- static clockid_t clockid;
-
- if (!clockid)
- {
-#ifdef CLOCK_MONOTONIC_COARSE
- if (clock_getres(CLOCK_MONOTONIC_COARSE, &tp) == 0 &&
- (tp.tv_nsec / 1000) <= 1000 && clock_gettime(CLOCK_MONOTONIC_COARSE, &tp) == 0)
- {
- clockid = CLOCK_MONOTONIC_COARSE;
- }
- else
-#endif
- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
- {
- clockid = CLOCK_MONOTONIC;
- }
- else
- {
- clockid = ~0L;
- }
- }
- if (clockid != ~0L && clock_gettime(clockid, &tp) == 0)
- {
- return (tp.tv_sec * 1000) + (tp.tv_nsec / 1000000L);
- }
-
- gettimeofday(&tv, NULL);
- return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
-}
-
-} // unnamed namespace
-
-
-struct EventHandler::Impl : public WindowEventInterface
-{
- // Construction & Destruction
-
- /**
- * Constructor
- */
- Impl( EventHandler* handler, XID window, Display* display )
- : mXEventManager(window, display, this),
- mHandler( handler ),
- mPaused( false )
- {
- mXEventManager.Initialize();
- }
- /**
- * Destructor
- */
- ~Impl()
- {
- }
- // @todo Consider allowing the EventHandler class to inherit from WindowEventInterface directly
- virtual void TouchEvent( Dali::Integration::Point& point, unsigned long timeStamp )
- {
- mHandler->SendEvent( point, timeStamp );
- }
- virtual void KeyEvent( Integration::KeyEvent& keyEvent )
- {
- mHandler->SendEvent( keyEvent );
- }
- virtual void WheelEvent( Dali::WheelEvent& wheelEvent )
- {
- mHandler->SendWheelEvent( wheelEvent );
- }
- virtual void DamageEvent( Rect<int>& damageArea )
- {
- mHandler->SendEvent( damageArea );
- }
- virtual void WindowFocusOut( )
- {
- // used to do some work with ime
- }
- virtual void WindowFocusIn()
- {
- // used to do some work with ime
- }
-
- // Data
- XEventManager mXEventManager;
- EventHandler* mHandler;
- bool mPaused;
-};
-
-EventHandler::EventHandler( RenderSurface* surface, CoreEventInterface& coreEventInterface, GestureManager& gestureManager, DamageObserver& damageObserver, DragAndDropDetectorPtr dndDetector )
-: mCoreEventInterface(coreEventInterface),
- mGestureManager( gestureManager ),
- mStyleMonitor( StyleMonitor::Get() ),
- mDamageObserver( damageObserver ),
- mRotationObserver( NULL ),
- mDragAndDropDetector( dndDetector ),
- mClipboardEventNotifier( ClipboardEventNotifier::Get() ),
- mClipboard(Clipboard::Get()),
- mImpl( NULL )
-{
- Ecore_X_Window window = 0;
-
- // this code only works with the EcoreX11 RenderSurface so need to downcast
- ECore::WindowRenderSurface* ecoreSurface = dynamic_cast< ECore::WindowRenderSurface* >( surface );
- if( ecoreSurface )
- {
- window = ecoreSurface->GetXWindow();
- Display* display = static_cast< Display* >(ecore_x_display_get());
-
- mImpl = new Impl(this, window, display );
-
- }
-
-}
-
-EventHandler::~EventHandler()
-{
- if(mImpl)
- {
- delete mImpl;
- }
-
- mGestureManager.Stop();
-}
-
-void EventHandler::SendEvent(Dali::Integration::Point& point, unsigned long timeStamp)
-{
- if(timeStamp < 1)
- {
- timeStamp = GetCurrentMilliSeconds();
- }
-
- Integration::TouchEvent touchEvent;
- Integration::HoverEvent hoverEvent;
- Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent);
- if(type != Integration::TouchEventCombiner::DispatchNone )
- {
- DALI_LOG_INFO(gTouchEventLogFilter, Debug::General, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.GetDeviceId(), point.GetState(), point.GetLocalPosition().x, point.GetLocalPosition().y);
-
- // First the touch and/or hover event & related gesture events are queued
- if(type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth)
- {
- mCoreEventInterface.QueueCoreEvent( touchEvent );
- mGestureManager.SendEvent(touchEvent);
- }
-
- if(type == Integration::TouchEventCombiner::DispatchHover || type == Integration::TouchEventCombiner::DispatchBoth)
- {
- mCoreEventInterface.QueueCoreEvent( hoverEvent );
- }
-
- // Next the events are processed with a single call into Core
- mCoreEventInterface.ProcessCoreEvents();
- }
-}
-
-void EventHandler::SendEvent(Integration::KeyEvent& keyEvent)
-{
- Dali::PhysicalKeyboard physicalKeyboard = PhysicalKeyboard::Get();
- if ( physicalKeyboard )
- {
- if ( ! KeyLookup::IsDeviceButton( keyEvent.keyName.c_str() ) )
- {
- GetImplementation( physicalKeyboard ).KeyReceived( keyEvent.time > 1 );
- }
- }
-
- // Create send KeyEvent to Core.
- mCoreEventInterface.QueueCoreEvent( keyEvent );
- mCoreEventInterface.ProcessCoreEvents();
-}
-
-void EventHandler::SendWheelEvent( WheelEvent& wheelEvent )
-{
- // Create WheelEvent and send to Core.
- Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >(wheelEvent.type), wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp );
- mCoreEventInterface.QueueCoreEvent( event );
- mCoreEventInterface.ProcessCoreEvents();
-}
-
-void EventHandler::SendEvent( StyleChange::Type styleChange )
-{
- DALI_ASSERT_DEBUG( mStyleMonitor && "StyleMonitor Not Available" );
- GetImplementation( mStyleMonitor ).StyleChanged(styleChange);
-}
-
-void EventHandler::SendEvent( const DamageArea& area )
-{
- mDamageObserver.OnDamaged( area );
-}
-
-void EventHandler::SendRotationPrepareEvent( const RotationEvent& event )
-{
- if( mRotationObserver != NULL )
- {
- mRotationObserver->OnRotationPrepare( event );
- }
-}
-
-void EventHandler::SendRotationRequestEvent( )
-{
- if( mRotationObserver != NULL )
- {
- mRotationObserver->OnRotationRequest( );
- }
-}
-
-void EventHandler::FeedTouchPoint( TouchPoint& point, int timeStamp)
-{
- Integration::Point convertedPoint( point );
- SendEvent( convertedPoint, timeStamp );
-}
-
-void EventHandler::FeedWheelEvent( WheelEvent& wheelEvent )
-{
- SendWheelEvent( wheelEvent );
-}
-
-void EventHandler::FeedKeyEvent( KeyEvent& event )
-{
- Integration::KeyEvent convertedEvent( event );
- SendEvent( convertedEvent );
-}
-
-void EventHandler::FeedEvent( Integration::Event& event )
-{
- mCoreEventInterface.QueueCoreEvent( event );
- mCoreEventInterface.ProcessCoreEvents();
-}
-
-void EventHandler::Reset()
-{
- mCombiner.Reset();
-
- // Any touch listeners should be told of the interruption.
- Integration::TouchEvent event;
- Integration::Point point;
- point.SetState( PointState::INTERRUPTED );
- event.AddPoint( point );
-
- // First the touch event & related gesture events are queued
- mCoreEventInterface.QueueCoreEvent( event );
- mGestureManager.SendEvent( event );
-
- // Next the events are processed with a single call into Core
- mCoreEventInterface.ProcessCoreEvents();
-}
-
-void EventHandler::Pause()
-{
- mPaused = true;
- Reset();
-}
-
-void EventHandler::Resume()
-{
- mPaused = false;
- Reset();
-}
-
-void EventHandler::SetDragAndDropDetector( DragAndDropDetectorPtr detector )
-{
- mDragAndDropDetector = detector;
-}
-
-void EventHandler::SetRotationObserver( RotationObserver* observer )
-{
- mRotationObserver = observer;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
+++ /dev/null
- // EXTERNAL INCLUDES
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/XInput2.h>
-#include <X11/extensions/XI2.h>
-
-#ifdef DEBUG_ENABLED
-#include <dali/integration-api/debug.h>
-#include <dali/public-api/common/dali-vector.h>
-#include <ostream>
-#include <iomanip>
-#endif
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace X11Debug
-{
-
-#ifdef DEBUG_ENABLED
-
-namespace
-{
-
-
-Integration::Log::Filter* gInputDeviceLogFilter = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_X_INPUT_DEVICES");
-Integration::Log::Filter* gInputEventLogFilter = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_X_INPUT_EVENTS");
-
-struct XNameId
-{
- const char* const name;
- int id;
-};
-
-const XNameId eventTable[]=
-{
- { "XI_KeyPress" ,XI_KeyPress },
- { "XI_KeyRelease" ,XI_KeyRelease },
- { "XI_ButtonPress" ,XI_ButtonPress },
- { "XI_ButtonRelease" ,XI_ButtonRelease },
- { "XI_Motion" ,XI_Motion },
- { "XI_Enter" ,XI_Enter },
- { "XI_Leave" ,XI_Leave },
- { "XI_FocusIn" ,XI_FocusIn },
- { "XI_FocusOut" ,XI_FocusOut },
- { "XI_HierarchyChanged",XI_HierarchyChanged },
- { "XI_PropertyEvent" ,XI_PropertyEvent },
- { "XI_RawKeyPress" ,XI_RawKeyPress },
- { "XI_RawKeyRelease" ,XI_RawKeyRelease },
- { "XI_RawButtonPress" ,XI_RawButtonPress },
- { "XI_RawButtonRelease",XI_RawButtonRelease },
- { "XI_RawMotion" ,XI_RawMotion },
- { "XI_TouchBegin" ,XI_TouchBegin },
- { "XI_TouchUpdate" ,XI_TouchUpdate },
- { "XI_TouchEnd" ,XI_TouchEnd },
- { "XI_TouchOwnership" ,XI_TouchOwnership },
- { "XI_RawTouchBegin" ,XI_RawTouchBegin },
- { "XI_RawTouchUpdate" ,XI_RawTouchUpdate },
- { "XI_RawTouchEnd" ,XI_RawTouchEnd }
-};
-
-const XNameId deviceTypeTable[]=
-{
- { "Master Pointer " ,XIMasterPointer },
- { "Master Keyboard" ,XIMasterKeyboard },
- { "Slave Pointer " ,XISlavePointer },
- { "Slave Keyboard " ,XISlaveKeyboard },
- { "Floating Slave " ,XIFloatingSlave }
-};
-
-const XNameId inputClassTable[]=
-{
- { "Key" ,XIKeyClass },
- { "Button" ,XIButtonClass },
- { "Valuator" ,XIValuatorClass },
- { "Scroll" ,XIScrollClass },
- { "Touch" ,XITouchClass }
-};
-
-const unsigned int numberEvents = sizeof( eventTable ) / sizeof( eventTable[0] );
-const unsigned int numberDevices = sizeof( deviceTypeTable ) / sizeof( deviceTypeTable[0] );
-const unsigned int numberInputClasses = sizeof( inputClassTable ) / sizeof( inputClassTable[0] );
-
-const char* GetEventName( int eventId )
-{
- for( unsigned int i = 0; i < numberEvents; ++i )
- {
- if( eventTable[i].id == eventId )
- {
- return eventTable[i].name;
- }
- }
- return "unknown event";
-}
-const char* GetDeviceHierachyName( int deviceType )
-{
- for( unsigned int i = 0; i < numberDevices; ++i )
- {
- if( deviceTypeTable[i].id == deviceType )
- {
- return deviceTypeTable[i].name;
- }
- }
- return "unknown device";
-}
-const char* GetInputClassName( int classId )
-{
- for( unsigned int i = 0; i < numberInputClasses; ++i )
- {
- if( inputClassTable[i].id == classId )
- {
- return inputClassTable[i].name;
- }
- }
- return "unknown input class name";
-}
-
-std::string GetInputDeviceInfo( const XIDeviceInfo* device, bool master )
-{
- // formatted output similar to xinput -list except it includes class + source information
- int startWidth = 45;
-
- std::string slavePadding=" ↳ ";
- if( master )
- {
- // slave entries are shifted to the right
- startWidth += 4;
- slavePadding="";
- }
-
- std::ostringstream oss;
- oss << "⎜" << slavePadding << std::setw(startWidth) << std::left << device->name ;
- oss << std::setw(1) << " id= " << std::setw(1) << device->deviceid ;
- oss << "\t[" << GetDeviceHierachyName( device->use ) << " ("<< device->attachment << ") ]";
- oss << std::setw(1) << "\t Classes: ";
-
- for( int n = 0; n < device->num_classes; ++n )
- {
- XIAnyClassInfo *classInfo = device->classes[n];
- oss << GetInputClassName( classInfo->type ) << ", source ( "<< classInfo->sourceid << ")";
- }
- oss << "\n";
-
- return oss.str();
-}
-
-
-}// unanmed namespace
-
-void LogInputDeviceInfo( const XIDeviceInfo* devices, unsigned int numberOfDevices )
-{
- // early exit if the filter is not enabled in debug mode
- if( ! gInputDeviceLogFilter->IsEnabledFor( Debug::General ) )
- {
- return;
- }
-
- const XIDeviceInfo* device = devices;
- const XIDeviceInfo* masterKeyboard = NULL;
- const XIDeviceInfo* masterPointer = NULL;
- Dali::Vector< const XIDeviceInfo* > slaveKeyboards;
- Dali::Vector< const XIDeviceInfo* > slavePointers;
- Dali::Vector< const XIDeviceInfo* > floatingSlaves;
-
- // go through the device list and sort by type
- for( unsigned int i = 0; i < numberOfDevices; ++i, ++device )
- {
- switch( device->use )
- {
- case XIMasterPointer:
- {
- masterPointer = device;
- break;
- }
- case XIMasterKeyboard:
- {
- masterKeyboard = device;
- break;
- }
- case XISlavePointer:
- {
- slavePointers.PushBack( device );
- break;
- }
- case XISlaveKeyboard:
- {
- slaveKeyboards.PushBack( device );
- break;
- }
- case XIFloatingSlave:
- {
- floatingSlaves.PushBack( device );
- break;
- }
- default:
- {
- break;
- }
- }
- }
-
- std::ostringstream oss;
-
- oss << "\n" << GetInputDeviceInfo( masterKeyboard , true);
- for( VectorBase::SizeType i = 0; i < slaveKeyboards.Count(); ++i )
- {
- oss << GetInputDeviceInfo( slaveKeyboards[i], false );
- }
- oss << "\n" << GetInputDeviceInfo( masterPointer, true );
- for( VectorBase::SizeType i = 0; i < slavePointers.Count(); ++i )
- {
- oss << GetInputDeviceInfo( slavePointers[i], false);
- }
- for( VectorBase::SizeType i = 0; i < floatingSlaves.Count(); ++i )
- {
- oss << GetInputDeviceInfo( floatingSlaves[i], false );
- }
-
- // DALI_LOG_ERROR_NOFN( "%s \n",oss.str().c_str() );
- DALI_LOG_INFO( gInputDeviceLogFilter, Debug::General, "%s\n", oss.str().c_str() );
-}
-
-void LogXI2Event( XGenericEventCookie* cookie )
-{
- // early exit if the filter is not enabled
- if( ! gInputEventLogFilter->IsEnabledFor( Debug::General ) )
- {
- return;
- }
-
- std::ostringstream oss;
- oss << "XI2 event:" << GetEventName( cookie->evtype );
-
- XIDeviceEvent *event = static_cast< XIDeviceEvent* >(cookie->data);
-
- oss << ", device_id("<< event->deviceid << ") source_id( "<< event->sourceid << ")" << ", flags: " << event->flags;
- oss << ", root-window: " << event->root << ", event-window: "<< event->event << ", child-window:" << event->child;
- if( cookie->evtype == XI_KeyPress)
- {
- oss << "base " << event->mods.base << "latched " << event->mods.latched;
- oss << "locked " << event->mods.locked << "effective " << event->mods.effective;
-
- if( event->mods.effective & ShiftMask) oss << "Shift";
- if( event->mods.effective & LockMask) oss << "LockMask"; // caps lock
- if( event->mods.effective & ControlMask) oss << "ControlMask";
- if( event->mods.effective & Mod1Mask) oss << "Mod1Mask"; // alt
- if( event->mods.effective & Mod2Mask) oss << "Mod2Mask"; // num lock
- if( event->mods.effective & Mod3Mask) oss << "Mod3Mask";
- if( event->mods.effective & Mod4Mask) oss << "Mod4Mask"; // WINDOWS
- if( event->mods.effective & Mod5Mask) oss << "Mod5Mask"; // Alt gr
-
- }
-
- // Mouse button state
- oss << " button state\n";
- for( int i =0; i< event->buttons.mask_len ; i++)
- {
- oss << "," << int(event->buttons.mask[i]);
- }
-
- // DALI_LOG_ERROR_NOFN( "%s \n",oss.str().c_str() );
- DALI_LOG_INFO( gInputEventLogFilter, Debug::General, "%s\n", oss.str().c_str() );
-
-}
-
-
-
-#else
-
-void LogInputDeviceInfo( const XIDeviceInfo* devices, unsigned int numberOfDevices)
-{
-}
-void LogXI2Event( XGenericEventCookie* cookie )
-{
-}
-
-#endif
-
-
-} // X11 Debug
-} // namespace Adaptor
-} // namespace Internal
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_INTERNAL_X_INPUT_2_DEBUG_H__
-#define __DALI_INTERNAL_X_INPUT_2_DEBUG_H__
-
-/*
- * Copyright (c) 2015 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace X11Debug
-{
-
-/**
- * To log input devices found on the system buid DALi in debug mode.
- * Then on the command line:
- *
- * export LOG_X_INPUT_DEVICES=2
- * dali-demo
- *
- *
- * To log XInput events
- *
- * export LOG_X_INPUT_EVENTS=2
- * dali-demo
- *
- * 2 = LogLevel::General
- */
-
-
-/**
- * @brief Debug log input device information.
- * Similar output to command line tool 'xinput -list' except it includes class + source information
- * Useful if the device doesn't have xinput tool installed
- * @param devices array of XIDeviceInfo
- * @param numberOfDevices number of devices
- */
-void LogInputDeviceInfo( const XIDeviceInfo* devices, unsigned int numberOfDevices );
-
-/**
- * @brief Debug log input event information.
- * @param cookie input event cookie
- */
-void LogXI2Event( XGenericEventCookie* cookie );
-
-} // X11 Debug
-} // namespace Adaptor
-} // namespace Internal
-} // namespace Dali
-
-#endif
+++ /dev/null
-// CLASS HEADER
-#include "x-event-manager.h"
-
-// EXTERNAL INCLUDES
-#include <stdio.h>
-#include <cstring>
-#include <dali/integration-api/debug.h>
-#include <dali/public-api/signals/callback.h>
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-
-#if defined(DEBUG_ENABLED)
-//Dali::Integration::Log::Filter* gInputDeviceLogFilter = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_X_EVENT");
-#endif
-
-}
-
-XEventManager::XEventManager( XID window, Display* display, WindowEventInterface* eventInterface )
-: mXInput2( window, display, eventInterface ),
- mFileDescriptorMonitor( NULL ),
- mDisplay( display ),
- mWindow( window ),
- mInitialized( false )
-{
-
-}
-XEventManager::~XEventManager()
-{
- delete mFileDescriptorMonitor;
-}
-
-void XEventManager::Initialize()
-{
- if( mInitialized )
- {
- return;
- }
-
- XSelectInput( mDisplay, mWindow, StructureNotifyMask | ExposureMask | KeyPressMask | KeyReleaseMask );
-
- mXInput2.Initialize();
-
- // Start monitoring for X events on a file descriptor return via ConnectionNumber.
- int fileDescriptor = ConnectionNumber( mDisplay );
-
- CallbackBase* callback = MakeCallback( this, &XEventManager::XEventReceived);
-
- mFileDescriptorMonitor = new FileDescriptorMonitor( fileDescriptor, callback, FileDescriptorMonitor::FD_READABLE );
-
- mInitialized = true;
-}
-
-
-void XEventManager::XEventReceived( FileDescriptorMonitor::EventType eventMask )
-{
- if( ! ( eventMask & FileDescriptorMonitor::FD_READABLE ) )
- {
- DALI_ASSERT_ALWAYS( 0 && "X File descriptor error");
- return;
- }
-
- while( XPending( mDisplay) )
- {
- XEvent xEvent;
- XNextEvent( mDisplay, &xEvent );
-
- // cookie data pointer is undefined until XGetEventData is called.
- XGenericEventCookie* cookie = &xEvent.xcookie;
-
- // Tizen 2.4 TV current uses client messages for key presses instead of KeyPress type
- if( xEvent.type == ClientMessage)
- {
- // Process Client Message
- mXInput2.ProcessClientMessage( &xEvent );
- }
- else if( xEvent.type == KeyPress )
- {
- mXInput2.ProcessKeyEvent( (XKeyEvent*)&xEvent );
- }
- else if( xEvent.type == GenericEvent )
- {
- if( XGetEventData( mDisplay, cookie ) )
- {
- if( cookie->extension == mXInput2.GetExtensionId() )
- {
- mXInput2.ProcessGenericEvent( cookie );
- }
- XFreeEventData( mDisplay, cookie );
- }
- }
- }
-}
-
-
-} // namespace internal
-} // namespace adaptor
-} // namespace dali
+++ /dev/null
-#ifndef __DALI_INTERNAL_X_EVENT_MANAGER_H__
-#define __DALI_INTERNAL_X_EVENT_MANAGER_H__
-
-/*
- * Copyright (c) 2015 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-// EXTERNAL INCLUDES
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <file-descriptor-monitor.h>
-
-// INTERNAL INCLUDES
-#include <base/interfaces/window-event-interface.h>
-#include "x-input2.h"
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-/**
- *
- * @brief Used to handle X events.
- * The code is mainloop agnostic, so the monitoring of the X event file descriptor
- * for X events is external to this class.
- *
- */
-class XEventManager
-{
-
-public:
-
- /**
- * Constructor
- * @param[in] window ID
- * @param[in] display x-connection
- * @param[in] eventInterface window event interface
- */
- XEventManager( XID window, Display* display, WindowEventInterface* eventInterface );
-
- /**
- * @brief non virtual destructor
- */
- ~XEventManager();
-
- /**
- * @brief Initialize
- */
- void Initialize();
-
-private:
-
- /**
- * @brief Should be called when the Event file descriptor signals data is available
- */
- void XEventReceived( FileDescriptorMonitor::EventType eventMask );
-
- // Undefined copy constructor.
- XEventManager( const XEventManager& );
-
- // Undefined assignment operator.
- XEventManager& operator=( const XEventManager& );
-
-private:
-
- XInput2 mXInput2; ///< XInput2 handler
- FileDescriptorMonitor* mFileDescriptorMonitor; ///< File descriptor monitor for X events
- Display* mDisplay; ///< X connection
- XID mWindow; ///< Window to receive events for
- bool mInitialized:1;
-
-};
-
-} // namespace Adaptor
-} // namespace Internal
-} // namespace Dali
-
-#endif // __DALI_INTERNAL_X_EVENT_MANAGER_H__
+++ /dev/null
-//CLASS HEADER
-#include "x-input2-device.h"
-
-// EXTERNAL INCLUDES
-
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-void XInput2Device::AssignDeviceInfo( const XIDeviceInfo* device )
-{
- deviceId = device->deviceid;
- attachment = device->attachment;
- use = device->use;
-
- for( int n = 0; n < device->num_classes; ++n )
- {
- XIAnyClassInfo *classInfo = device->classes[n];
- switch( classInfo->type )
- {
- case XITouchClass:
- {
- touchClass = true;
- break;
- }
- case XIButtonClass:
- {
- buttonClass = true;
- break;
- }
- case XIValuatorClass:
- {
- valuatorClass = true;
- break;
- }
- case XIScrollClass:
- {
- scrollClass = true;
- break;
- }
- case XIKeyClass:
- {
- keyClass = true;
- break;
- }
- default:
- {
- // unknown
- break;
- }
- }
- }
-
-
-}
-
-
-} // namespace Adaptor
-} // namespace Internal
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_INTERNAL_X_INPUT2_DEVICE_H__
-#define __DALI_INTERNAL_X_INPUT2_DEVICE_H__
-
-/*
- * Copyright (c) 2015 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <X11/extensions/XInput2.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace Adaptor
-{
-
-/**
- * @brief struct used to encpasulate XIDeviceInfo information.
- * Kept as a POD so it can be used in a Dali::Vector
- */
-struct XInput2Device
-{
- /**
- * @brief constructor
- */
- XInput2Device()
- : deviceId(0),
- attachment(0),
- use(0),
- keyClass(false),
- touchClass(false),
- buttonClass(false),
- valuatorClass(false),
- scrollClass(false)
- {}
-
- /**
- * Assign device information to the object
- */
- void AssignDeviceInfo( const XIDeviceInfo* device );
-
- int deviceId; ///< X device ID
- int attachment; ///< see XI2 DEVICEINFO struct for details
- int use; ///< see XI2 DEVICEINFO struct for details
- bool keyClass:1; ///< device supports key input
- bool touchClass:1; ///< device supports touch input
- bool buttonClass:1; ///< device supports button input
- bool valuatorClass:1; ///< device supports an axis, e.g. mouse axis, tablet pen tilt angle..
- bool scrollClass:1; ///< device supports scroll
-
-};
-
-} // namespace Adaptor
-} // namespace Internal
-} // namespace Dali
-
-#endif
+++ /dev/null
-// CLASS HEADER
-#include "x-input2.h"
-
-// EXTERNAL INCLUDES
-#include <X11/XKBlib.h>
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include "debug/x-input2-debug.h"
-
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-namespace
-{
-// For multi-touch we need XI2 version 2.2
-int XI2MinorVersionRequired = 2;
-int XI2MajorVersionRequired = 2;
-}
-
-XInput2::XInput2( XID window, Display* display, WindowEventInterface* eventInterface )
-: mEventInterface( eventInterface ),
- mDisplay( display ),
- mWindow( window ),
- mXI2ExtensionId(-1),
- mMultiTouchSupport( false )
-{
-
-}
-XInput2::~XInput2()
-{
-}
-
-void XInput2::Initialize()
-{
- // Check if X supports the multi-touch protocol
- QueryMultiTouchSupport();
-
- // Query what input devices are available on the system.
- QueryDevices();
-
- // Select the input events we want to receive from the input devices available
- SelectInputEvents();
-
-}
-
-int XInput2::GetExtensionId() const
-{
- return mXI2ExtensionId;
-}
-
-bool XInput2::FilteredDevice( int deviceId ) const
-{
- for( VectorBase::SizeType i = 0; i < mInputDeviceInfo.Count(); ++i )
- {
- if( mInputDeviceInfo[i].deviceId == deviceId )
- {
- return true;
- }
- }
- return false;
-}
-
-bool XInput2::PreProcessEvent( XIDeviceEvent *deviceEvent ) const
-{
- // @todo need to do some testing to see if this check is actually required
- // E.g. if IME window is sending events, this check may fail
- if( deviceEvent->event != mWindow )
- {
- return false;
- }
- // emulated flags means that the event has been emulated from another XI 2.x event for legacy client support
- // We don't call XISelectEvents on these events so hopefully shouldn't get them.
- if( ( deviceEvent->flags & XIPointerEmulated ) || ( deviceEvent->flags & XITouchEmulatingPointer ) )
- {
- return false;
- }
-
- if( !FilteredDevice( deviceEvent->deviceid ))
- {
- return false;
- }
- return true;
-}
-
-void XInput2::CreateKeyEvent( const XIDeviceEvent* deviceEvent, KeyEvent& keyEvent ) const
-{
- // get the physical key code ( range 8..255)
- KeyCode keycode = deviceEvent->detail;
-
- keyEvent.keyCode = keycode;
- keyEvent.state = KeyEvent::Down;
- keyEvent.keyModifier = deviceEvent->mods.effective;
-
- // extract key symbol. The symbol is typically the name visible on the key
- // e.g. key code 201 might = Brightness increase, or a Korean character depending on the keyboard mapping.
- // @todo For XKbKeycodeToKeysym to work correctly we need the group and level.
- // investigate using XkbGetState to get initial state then start monitoring for XkbStateNotify events
- KeySym sym = XkbKeycodeToKeysym( mDisplay, keycode, 0 /* group */ , keyEvent.IsShiftModifier() );
- char* keyname = XKeysymToString( sym );
-
- keyEvent.keyPressedName = keyname;
- keyEvent.time = deviceEvent->time;
-
-}
-
-// prototyping implementation
-void XInput2::ProcessKeyEvent( XKeyEvent* xEvent )
-{
- KeyEvent keyEvent;
- keyEvent.keyCode = xEvent->keycode;
- keyEvent.state = KeyEvent::Down;
-
- KeySym sym = XkbKeycodeToKeysym( mDisplay, xEvent->keycode, 0 /* group */ , keyEvent.IsShiftModifier() );
- char* keyname = XKeysymToString( sym );
- keyEvent.keyPressedName = keyname;
- keyEvent.time = xEvent->time;
-
- Integration::KeyEvent convertedEvent( keyEvent );
-
- mEventInterface->KeyEvent( convertedEvent );
-}
-void XInput2::ProcessClientMessage( XEvent* event )
-{
- // Format for client message for key event
- // XEvent xev;
- // xev.xclient.type = ClientMessage;
- // xev.xclient.display = keyrouter.disp;
- // xev.xclient.window = window;
- // xev.xclient.format = 32;
- // xev.xclient.message_type = ecore_x_atom_get("VDINPUT_KEYEVENT");
- // xev.xclient.data.l[0] = ev->time; /* time */
- // xev.xclient.data.l[1] = ev->state; /* modifier */
- // xev.xclient.data.l[2] = ev->code; /* keycode */
- // xev.xclient.data.l[3] = ev->value; /* press/release */
- // xev.xclient.data.l[4] = ev->device_id; /* deviceId */
-
- Atom input_atom = XInternAtom( mDisplay, "VDINPUT_KEYEVENT", false);
- KeyEvent keyEvent;
-
- keyEvent.state = KeyEvent::Down;
-
- // if atom is "VDINPUT_KEYEVENT"
- if( input_atom == event->xclient.message_type )
- {
-
- keyEvent.keyModifier = event->xclient.data.l[1];
- keyEvent.keyCode = event->xclient.data.l[2];
-
- // only transmit keydown events
- if( event->xclient.data.l[3] != 2)
- {
- return; // 2 = key down, 3 = key release
- }
-
- KeySym sym = XkbKeycodeToKeysym( mDisplay, keyEvent.keyCode, 0 /* group */ , keyEvent.IsShiftModifier() );
- char* keyname = XKeysymToString( sym );
- keyEvent.keyPressedName = keyname;
- keyEvent.time = event->xclient.data.l[0];
-
- Integration::KeyEvent convertedEvent( keyEvent );
-
- mEventInterface->KeyEvent( convertedEvent );
- }
-}
-
-void XInput2::ProcessGenericEvent( XGenericEventCookie* cookie )
-{
- XIDeviceEvent* deviceEvent = static_cast< XIDeviceEvent* >(cookie->data);
-
- X11Debug::LogXI2Event( cookie );
-
- bool requiresProcessing = PreProcessEvent( deviceEvent );
-
- if( ! requiresProcessing )
- {
- return;
- }
-
- Integration::Point point;
- point.SetDeviceId( deviceEvent->deviceid );
- point.SetScreenPosition( Vector2( deviceEvent->event_x, deviceEvent->event_y ) );
- Time time( deviceEvent->time ); // X is using uint32 for time field ( see XI2proto.h )
-
- switch( cookie->evtype)
- {
- case XI_TouchUpdate:
- case XI_Motion:
- {
- point.SetState( PointState::MOTION );
- mEventInterface->TouchEvent( point, time );
- break;
- }
- case XI_TouchBegin:
- case XI_ButtonPress:
- {
- point.SetState( PointState::DOWN );
- mEventInterface->TouchEvent( point, time );
- break;
- }
- case XI_TouchEnd:
- case XI_ButtonRelease:
- {
- point.SetState( PointState::UP );
- mEventInterface->TouchEvent( point, time );
- break;
- }
- case XI_FocusIn:
- {
- mEventInterface->WindowFocusIn();
- break;
- }
- case XI_FocusOut:
- {
- mEventInterface->WindowFocusOut();
- break;
- }
- case XI_KeyPress:
- {
- KeyEvent keyEvent;
- CreateKeyEvent( deviceEvent, keyEvent );
- Integration::KeyEvent convertedEvent( keyEvent );
- mEventInterface->KeyEvent( convertedEvent );
- break;
- }
- default:
- {
- break;
- }
- }
-}
-
-void XInput2::QueryMultiTouchSupport()
-{
- int minor = XI2MinorVersionRequired;
- int major = XI2MajorVersionRequired;
- int firstEventCode, firstErrorCode;
-
- // Check if the extension is available and get the extension id
- if( !XQueryExtension(mDisplay, "XInputExtension", &mXI2ExtensionId, &firstEventCode, &firstErrorCode) )
- {
- DALI_LOG_ERROR(" XInputExtension not available \n");
- return;
- }
-
- // inform X that DALi ( the client ) supports XI2 version 2.2
- // it will assign the X servers supported version to the parameters
- int ret = XIQueryVersion( mDisplay, &major, &minor);
- if( ret == BadValue )
- {
- DALI_LOG_ERROR(" XIQueryVersion %d,%d failed \n", major, minor );
- return;
- }
-
- // check the version is supports multi-touch
- if( ( major * 1000 + minor ) >= ( XI2MajorVersionRequired * 1000 + XI2MinorVersionRequired ) )
- {
- mMultiTouchSupport = true;
- }
- else
- {
- DALI_LOG_ERROR( "XInput 2.2 or greater required for multi-touch\n");
- }
-
-}
-void XInput2::QueryDevices()
- {
- int numberOfDevices( 0 );
-
- // QueryDevice returns information about one or more input devices
- XIDeviceInfo* deviceInfoArray = XIQueryDevice( mDisplay, XIAllDevices, &numberOfDevices);
- XIDeviceInfo* device = deviceInfoArray;
-
- X11Debug::LogInputDeviceInfo( deviceInfoArray, numberOfDevices );
-
- mInputDeviceInfo.Resize( numberOfDevices );
-
- for( int i = 0; i < numberOfDevices; ++i, ++device )
- {
- XInput2Device info;
-
- info.AssignDeviceInfo( device );
-
- mInputDeviceInfo.PushBack( info );
- }
-
- XIFreeDeviceInfo( deviceInfoArray );
- }
-
-void XInput2::SelectEvents( int deviceId, const Dali::Vector< unsigned int >& filter )
-{
- if( filter.Size() == 0)
- {
- return;
- }
-
- // each event like XI_ButtonPress is stored as unique bit, so if there's 32 events we need 4 bytes
- // the XIMaskLen macro provides the length for us at compile time.
- unsigned char mask[ XIMaskLen( XI_LASTEVENT ) ] = {};
- XIEventMask eventMask;
-
- eventMask.deviceid = deviceId;
- eventMask.mask_len = sizeof( mask);
- eventMask.mask = mask;
-
- for( VectorBase::SizeType i = 0; i< filter.Count(); ++i )
- {
- XISetMask( mask, filter[i] );
- }
-
- XISelectEvents( mDisplay, mWindow, &eventMask, 1);
-
-}
-void XInput2::SelectInputEvents()
-{
- /*
- * From the X documentation:
- * "A master pointer is a virtual pointer device that does not represent a physical device.
- * If a slave device generates an event, the event is also generated by the respective master device.
- * Multiple slave devices can be attached to a single master device."
- * master = cursor / keyboard focus,
- * slave = physical device
- *
- * For motion events, we currently just listen to the slave devices. This allows us the ability to
- * perform a XIGrabDevice on the slave if we need to, which will temporarily detach it from the master.
- * In DALi we currently don't perform a grab as typically we just have a single x-window displayed.
- * Where as other toolkits may have a window for a popup and want do know when the mouse is clicked outside
- * of the popup, to close it.
- */
- Dali::Vector< unsigned int > eventFilter;
- eventFilter.Reserve( 6 ); // typically filter no more than 6 events
-
- for( VectorBase::SizeType i = 0; i < mInputDeviceInfo.Count(); ++i )
- {
- const XInput2Device& device( mInputDeviceInfo[ i ] );
-
- eventFilter.Clear();
-
- // Floating slave devices also can generate key events. For example, TV remote controllers.
- if( ( device.use == XIFloatingSlave ) || ( device.use == XISlavePointer ) || ( device.use == XISlaveKeyboard ) )
- {
- if( device.buttonClass )
- {
- eventFilter.PushBack( XI_ButtonPress );
- eventFilter.PushBack( XI_ButtonRelease );
- eventFilter.PushBack( XI_Motion );
- }
- if( device.touchClass )
- {
- eventFilter.PushBack( XI_TouchUpdate );
- eventFilter.PushBack( XI_TouchBegin );
- eventFilter.PushBack( XI_TouchEnd );
- }
- if( device.keyClass )
- {
- eventFilter.PushBack( XI_KeyPress );
- eventFilter.PushBack( XI_KeyRelease );
- }
- }
-
- if( eventFilter.Count() > 0 )
- {
- SelectEvents( device.deviceId, eventFilter );
- }
- }
-}
-} // namespace internal
-} // namespace adaptor
-} // namespace dali
+++ /dev/null
-#ifndef __DALI_INTERNAL_X_INPUT_2_MANAGER_H__
-#define __DALI_INTERNAL_X_INPUT_2_MANAGER_H__
-
-/*
- * Copyright (c) 2015 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/XInput2.h>
-#include <X11/extensions/XI2.h>
-#include <dali/public-api/common/dali-vector.h>
-
-// INTERNAL INCLUDES
-#include <base/interfaces/window-event-interface.h>
-#include "x-input2-device.h"
-
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-/**
- *
- * @brief Used to setup and process XInput2 events.
- *
- * For help with debugging, build DALi in debug mode then set the environment variables
- * export LOG_X_INPUT_EVENTS=2
- * export LOG_X_INPUT_DEVICES=2
- */
-class XInput2
-{
-
-public:
-
- /**
- * @brief Constructor
- */
- XInput2( XID window, Display* display, WindowEventInterface* eventInterface );
-
- /**
- * @brief destructor
- */
- ~XInput2();
-
- /**
- * @brief enumerates input devices using XIQueryDevice then sets up event filtering using XISelectEvents
- */
- void Initialize();
-
- /**
- * @brief get X the extension id
- * @return the Id
- */
- int GetExtensionId() const;
-
- /**
- * @brief process a generic X event
- * @param[in] cookie X cookie
- */
- void ProcessGenericEvent( XGenericEventCookie* cookie );
-
- /**
- * @brief process XKeyEvent
- * @param[in] XKeyEvent key event
- */
- void ProcessKeyEvent( XKeyEvent* xKeyEvent );
-
- /**
- * @brief process XKeyEvent
- * @param[in] event x-event
- */
- void ProcessClientMessage( XEvent* event );
-
-private:
-
- /**
- * @brief query x input devices
- */
- void QueryDevices();
-
- /**
- * @brief query multi-touch support
- */
- void QueryMultiTouchSupport();
-
- /**
- * Uses XISelectEvents to select the events we want to recieve from each input device
- */
- void SelectInputEvents();
-
- /**
- * @brief checks if we are filtering events from a specific device
- * @param[in] deviceId device id
- * @return true if the device is being filtered
- */
- bool FilteredDevice( int deviceId ) const;
-
- /**
- * @brief Select specific events to be filtered on a device
- * @param[in] device id
- * @param[in] filter vector of X input events like XI_ButtonPress
- */
- void SelectEvents( int deviceId, const Dali::Vector< unsigned int >& filter );
-
- /**
- * @brief checks if the event should be processed
- * @param[in] deviceEvent device event
- * @return true if should be processed
- */
- bool PreProcessEvent( XIDeviceEvent *deviceEvent ) const;
-
- /**
- * @brief creates a DALi key event given a XIDeviceEvent for a key press
- * @param[in] deviceEvent device event
- * @param[out] keyEvent DALi key event
- */
- void CreateKeyEvent( const XIDeviceEvent* deviceEvent, KeyEvent& keyEvent ) const;
-
-private:
-
- Dali::Vector< XInput2Device > mInputDeviceInfo; ///< list of input devices
- WindowEventInterface* mEventInterface; ///< window event interface
- Display* mDisplay; ///< X display
- XID mWindow; ///< X window
- int mXI2ExtensionId; ///< XI2 extension id
- bool mMultiTouchSupport:1; ///< whether multi-touch is supported
-};
-
-} // namespace Adaptor
-} // namespace Internal
-} // namespace Dali
-
-#endif
+++ /dev/null
-/doc
-/.cov
-/aclocal.m4
-/autom4te.cache
-/ar-lib
-/compile
-/config.guess
-/config.log
-/config.status
-/config.sub
-/configure
-/depcomp
-/documentation.list
-/install-sh
-/libtool
-/ltmain.sh
-/m4
-/missing
-*.pc
-/documentation.list
+++ /dev/null
-#
-# Copyright (c) 2014 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.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# Build the Dali Adaptor library
-
-
-############# INCLUDE FILE LISTS #############
-
-# Base Adaptor
-base_adaptor_src_dir = ../../../adaptors/base
-include ../../../adaptors/base/file.list
-
-# Platform Abstraction
-tizen_platform_abstraction_src_dir = ../../../platform-abstractions/tizen
-portable_platform_abstraction_src_dir = ../../../platform-abstractions/portable
-include ../../../platform-abstractions/tizen/file.list
-
-# Text Abstraction
-text_src_dir = ../../../text
-include ../../../text/file.list
-
-# Integration
-adaptor_integration_api_dir = ../../../adaptors/integration-api
-include ../../../adaptors/integration-api/file.list
-
-# Internal Common
-adaptor_common_dir = ../../../adaptors/common
-include ../../../adaptors/common/file.list
-
-if USE_EFL
-# ECore Common
-adaptor_ecore_common_dir = ../../../adaptors/ecore/common
-include ../../../adaptors/ecore/common/file.list
-else
-# If we're not using any EFL, then we need to use libuv mainloop
-# for the frame work
-adaptor_libuv_dir = ../../../adaptors/libuv
-include ../../../adaptors/libuv/file.list
-endif
-
-# Wayland
-if WAYLAND
-if USE_EFL
-## Use ecore_wayland
-adaptor_ecore_wayland_dir = ../../../adaptors/ecore/wayland
-include ../../../adaptors/ecore/wayland/file.list
-else
-## Use wayland
-adaptor_wayland_dir = ../../../adaptors/wayland
-include ../../../adaptors/wayland/file.list
-endif
-else
-# X11
-adaptor_x11_dir = ../../../adaptors/x11
-include ../../../adaptors/x11/file.list
-endif
-
-# Ubuntu
-if UBUNTU_PROFILE
-adaptor_ubuntu_dir = ../../../adaptors/ubuntu
-include ../../../adaptors/ubuntu/file.list
-else
-
-# Tizen
-adaptor_tizen_dir = ../../../adaptors/tizen
-if USE_APPFW_EFL_BASE
-include ../../../adaptors/tizen/file-3.list
-else
-include ../../../adaptors/tizen/file.list
-endif
-endif
-
-# Mobile
-adaptor_mobile_dir = ../../../adaptors/mobile
-include ../../../adaptors/mobile/file.list
-
-# TV
-if TV_PROFILE
-adaptor_tv_dir = ../../../adaptors/tv
-include ../../../adaptors/tv/file.list
-endif
-
-# Public API
-adaptor_public_api_dir = ../../../adaptors/public-api
-include ../../../adaptors/public-api/file.list
-
-# Devel API ( for use by Toolkit)
-adaptor_devel_api_dir = ../../../adaptors/devel-api
-include ../../../adaptors/devel-api/file.list
-
-
-# Static libraries
-static_libraries_libunibreak_src_dir = ../../../text/dali/internal/libunibreak
-include ../../../text/dali/internal/libunibreak/file.list
-
-static_libraries_image_resampler_src_dir = ../../../third-party/image-resampler
-include ../../../third-party/image-resampler/file.list
-
-# Package doc
-package_doxy_dir = ../../../doc
-include ../../../doc/file.list
-
-############# source files #############
-
-# FRAMEWORK FILES for adaptor
-# Either use ecore mainloop + appcore / uiman
-# Or libuv main loop with no appcore / uimain
-if USE_EFL
-adaptor_internal_src_files = $(adaptor_tizen_framework_efl_src_files) \
- $(adaptor_ecore_common_internal_src_files)
-else
-adaptor_internal_src_files = $(adaptor_tizen_framework_libuv_src_files)
-endif
-
-# COMMON
-if COMMON_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
- $(adaptor_common_internal_default_profile_src_files) \
- $(adaptor_tizen_internal_src_files) \
- $(adaptor_tizen_internal_non_mobile_src_files) \
- $(static_libraries_libunibreak_src_files)
-
-if WAYLAND
-if USE_ECORE_WAYLAND
-adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files) \
- $(adaptor_ecore_wayland_internal_default_profile_src_files)
-else
-adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
-endif # USE_ECORE_WAYLAND
-
-adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files)\
- $(adaptor_tizen_internal_native_image_src_files)
-else
-adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
- $(adaptor_common_internal_egl_extension_src_files) \
- $(adaptor_x11_internal_default_profile_src_files)
-endif # WAYLAND
-endif # COMMON_PROFILE
-
-
-# UBUNTU
-if UBUNTU_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
- $(adaptor_common_internal_default_profile_src_files) \
- $(adaptor_ubuntu_internal_src_files) \
- $(adaptor_x11_ubuntu_internal_src_files) \
- $(adaptor_x11_internal_default_profile_src_files) \
- $(static_libraries_libunibreak_src_files) \
- $(adaptor_common_internal_egl_extension_src_files)
-
-endif # UBUNTU_PROFILE
-
-
-# MOBILE
-if MOBILE_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
- $(adaptor_common_internal_mobile_profile_src_files) \
- $(adaptor_tizen_internal_src_files) \
- $(static_libraries_libunibreak_src_files)
-
-if WAYLAND
-if USE_ECORE_WAYLAND
-adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
-else
-adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
-endif # USE_ECORE_WAYLAND
-
-adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files)\
- $(adaptor_tizen_internal_native_image_src_files)
-
-else
-adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
- $(adaptor_common_internal_egl_extension_src_files)
-endif # WAYLAND
-
-endif # MOBILE_PROFILE
-
-# WEARABLE
-if WEARABLE_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
- $(adaptor_common_internal_mobile_profile_src_files) \
- $(adaptor_tizen_internal_src_files) \
- $(static_libraries_libunibreak_src_files)
-if WAYLAND
-if USE_ECORE_WAYLAND
-adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
-else
-adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
-endif # USE_ECORE_WAYLAND
-
-adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files)\
- $(adaptor_tizen_internal_native_image_src_files)
-
-else
-adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
- $(adaptor_common_internal_egl_extension_src_files)
-endif # WAYLAND
-
-endif # WEARABLE
-
-
-# TV
-if TV_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
- $(adaptor_common_internal_tv_profile_src_files) \
- $(adaptor_tizen_internal_src_files) \
- $(adaptor_tizen_internal_non_mobile_src_files) \
- $(static_libraries_libunibreak_src_files)
-if WAYLAND
-if USE_ECORE_WAYLAND
-adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
-else
-adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
-endif # USE_ECORE_WAYLAND
-
-adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files)\
- $(adaptor_tizen_internal_native_image_src_files)
-
-else
-adaptor_internal_src_files += $(adaptor_x11_tv_internal_src_files) \
- $(adaptor_x11_internal_tv_profile_key_src_files) \
- $(adaptor_common_internal_egl_extension_src_files)
-endif # WAYLAND
-
-endif
-
-# IVI
-if IVI_PROFILE
-
-adaptor_internal_src_files += $(adaptor_common_internal_src_files) \
- $(adaptor_common_internal_mobile_profile_src_files) \
- $(adaptor_tizen_internal_src_files) \
- $(static_libraries_libunibreak_src_files)
-
-if WAYLAND
-if USE_ECORE_WAYLAND
-adaptor_internal_src_files += $(adaptor_ecore_wayland_tizen_internal_src_files)
-else
-adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)
-endif # USE_ECORE_WAYLAND
-
-adaptor_internal_src_files += $(adaptor_tizen_internal_egl_extension_src_files)\
- $(adaptor_tizen_internal_native_image_src_files)
-
-else
-adaptor_internal_src_files += $(adaptor_x11_tizen_internal_src_files) \
- $(adaptor_common_internal_egl_extension_src_files)
-endif # WAYLAND
-
-endif # IVI_PROFILE
-
-
-# Node JS support for using an external libuv main loop. If not enabled then just use e-core as normal
-# Used for things like callbacks, file-monintors, x input handling
-if LIB_UV_EVENT_LOOP
-main_loop_integration_src_files = $(adaptor_common_internal_uv_src_files)
-input_event_handler_src_files = $(adaptor_uv_x_event_handler_internal_src_files)
-else
-main_loop_integration_src_files = $(adaptor_common_internal_ecore_src_files)
-input_event_handler_src_files = $(adaptor_ecore_x_event_handler_internal_src_files)
-endif
-
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = dali-adaptor-uv.pc
-
-lib_LTLIBRARIES = libdali-adaptor-uv.la
-
-libdali_adaptor_uv_la_SOURCES = \
- $(base_adaptor_src_files) \
- $(main_loop_integration_src_files) \
- $(tizen_platform_abstraction_src_files) \
- $(text_abstraction_src_files) \
- $(devel_api_src_files) \
- $(public_api_src_files) \
- $(adaptor_internal_src_files) \
- $(input_event_handler_src_files) \
- $(image_resampler_src_files)
-
-
-if ENABLE_NETWORK_LOGGING
-libdali_adaptor_uv_la_SOURCES += \
- $(base_adaptor_networking_src_files)
-endif
-
-libdali_adaptor_uv_la_DEPENDENCIES =
-
-# List include directories with more platform-specific (tizen) before portable root:
-libdali_adaptor_uv_la_includes = \
- -I../../.. \
- -I../../../platform-abstractions/tizen \
- -I../../../platform-abstractions/tizen/resource-loader \
- -I../../../platform-abstractions/portable \
- -I../../../platform-abstractions/ \
- -I../../../adaptors/public-api \
- -I../../../adaptors/integration-api \
- -I../../../adaptors/public-api/adaptor-framework \
- -I../../../adaptors/devel-api/adaptor-framework \
- -I../../../adaptors/common \
- -I../../../adaptors/base/interfaces \
- -I../../../adaptors/ \
- -I../../../text \
- -I../../../text/dali/internal/libunibreak \
- -I../../../third-party/image-resampler
-
-if WAYLAND
-libdali_adaptor_uv_la_includes += -I../../../adaptors/integration-api/wayland
-if USE_ECORE_WAYLAND
-libdali_adaptor_uv_la_includes += \
- -I../../../adaptors/ecore/common \
- -I../../../adaptors/ecore/wayland
-else
-libdali_adaptor_uv_la_includes += -I../../../adaptors/wayland \
- -I../../../adaptors/wayland/input/text/imf \
- -I../../../adaptors/wayland/clipboard \
- -I../../../adaptors/wayland/native-image
-endif # USE_ECORE_WAYLAND
-
-libdali_adaptor_uv_la_includes += \
- -I../../../adaptors/tizen
-
-else
-libdali_adaptor_uv_la_includes += \
- -I../../../adaptors/ecore/common \
- -I../../../adaptors/x11 \
- -I../../../adaptors/integration-api/x11
-endif # WAYLAND
-
-if UBUNTU_PROFILE
-libdali_adaptor_uv_la_includes += \
- -I../../../adaptors/ubuntu
-else
-libdali_adaptor_uv_la_includes += \
- -I../../../adaptors/tizen
-endif
-
-daliDefaultThemeDir = ${dataReadWriteDir}/theme/
-daliShaderbinCacheDir = ${dataReadOnlyDir}/core/shaderbin/
-
-libdali_adaptor_uv_la_CXXFLAGS = \
- -DDALI_DATA_RW_DIR="\"${daliReadWriteDir}\"" \
- -DDALI_DATA_RO_DIR="\"${daliReadOnlyDir}\"" \
- -DDALI_DEFAULT_FONT_CACHE_DIR="\"${daliDefaultFontCacheDir}\"" \
- -DDALI_USER_FONT_CACHE_DIR="\"${daliUserFontCacheDir}\"" \
- -DDALI_SHADERBIN_DIR="\"${daliShaderbinCacheDir}\"" \
- -DDALI_DEFAULT_THEME_DIR="\"${daliDefaultThemeDir}\"" \
- -DFONT_PRELOADED_PATH="\"${fontPreloadedPath}\"" \
- -DFONT_DOWNLOADED_PATH="\"${fontDownloadedPath}\"" \
- -DFONT_APPLICATION_PATH="\"${fontApplicationPath}\"" \
- -DFONT_CONFIGURATION_FILE="\"${fontConfigurationFile}\"" \
- -DTIZEN_PLATFORM_CONFIG_SUPPORTED=${tizenPlatformConfigSupported} \
- -DNON_POWER_OF_TWO_TEXTURES \
- -DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
- -DWAYLAND_EXTENSIONS_SUPPORTED \
- -Werror -Wall -lgcc \
- $(libdali_adaptor_uv_la_includes) \
- $(DALI_ADAPTOR_CFLAGS) \
- $(DALICORE_CFLAGS) \
- $(OPENGLES20_CFLAGS) \
- $(FREETYPE_CFLAGS) \
- $(FONTCONFIG_CFLAGS) \
- $(PNG_CFLAGS) \
- $(DLOG_CFLAGS) \
- $(VCONF_CFLAGS) \
- $(EXIF_CFLAGS) \
- $(MMFSOUND_CFLAGS) \
- $(TTS_CFLAGS) \
- $(LIBDRM_CFLAGS) \
- $(LIBEXIF_CFLAGS) \
- $(LIBCURL_CFLAGS) \
- $(TPKP_CURL_CFLAGS)
-
-# Todo, as soon as common repos are updated on build server remove this.
-if !COMMON_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += -DWAYLAND_EXTENSIONS_SUPPORTED
-endif
-
-libdali_adaptor_uv_la_CFLAGS = \
- -Werror -Wall \
- -DDALI_COMPILATION -DDALI_ADAPTOR_COMPILATION \
- $(DALI_ADAPTOR_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD = \
- $(DALICORE_LIBS) \
- $(OPENGLES20_LIBS) \
- $(FREETYPE_LIBS) \
- $(FONTCONFIG_LIBS) \
- $(PNG_LIBS) \
- $(DLOG_LIBS) \
- $(VCONF_LIBS) \
- $(EXIF_LIBS) \
- $(TTS_LIBS) \
- $(LIBDRM_LIBS) \
- $(LIBEXIF_LIBS) \
- $(LIBCURL_LIBS) \
- $(HARFBUZZ_LIBS) \
- $(TPKP_CURL_LIBS) \
- -lgif \
- -lpthread \
- -lturbojpeg
-
-if USE_EFL
-# EVAS used indicator
-libdali_adaptor_uv_la_CXXFLAGS += $(ELEMENTARY_CFLAGS) \
- $(EVAS_CFLAGS) \
- $(ECORE_CFLAGS) \
- $(ECORE_IPC_CFLAGS) \
- $(ELDBUS_CFLAGS) \
- -DUSE_EFL
-
-
-libdali_adaptor_uv_la_LIBADD += $(ELEMENTARY_LIBS) \
- $(ECORE_IPC_LIBS) \
- $(ELDBUS_LIBS)
-
-else
-
-if !UBUNTU_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += $(ECORE_WAYLAND_CFLAGS)
-libdali_adaptor_uv_la_LIBADD += $(ECORE_WAYLAND_LIBS)
-endif # !UBUNTU_PROFILE
-
-endif # USE_EFL
-
-if USE_APPFW
-
-libdali_adaptor_uv_la_CXXFLAGS += $(CAPI_APPFW_APPLICATION_CFLAGS) \
- $(CAPI_SYSTEM_SYSTEM_SETTINGS_CFLAGS) \
- $(CAPI_SYSTEM_INFO_CFLAGS) \
- $(TTS_CFLAGS) \
- $(CAPI_SYSTEM_SENSOR_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD += $(CAPI_APPFW_APPLICATION_LIBS) \
- $(CAPI_SYSTEM_SYSTEM_SETTINGS_LIBS) \
- $(CAPI_SYSTEM_INFO_LIBS) \
- $(TTS_LIBS) \
- $(CAPI_SYSTEM_SENSOR_LIBS)
-if USE_APPFW_EFL_BASE
-else
-libdali_adaptor_uv_la_CXXFLAGS += $(CAPI_APPFW_COMMON_CFLAGS) \
- $(CAPI_APPFW_CONTROL_CFLAGS) \
- $(FRIBIDI_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD += $(CAPI_APPFW_COMMON_LIBSS) \
- $(CAPI_APPFW_CONTROL_LIBSS) \
- $(FRIBIDI_LIBS)
-endif
-endif
-
-if WAYLAND
-# This is to avoid having to include wayland-egl.h everywhere
-libdali_adaptor_uv_la_CXXFLAGS += -DWL_EGL_PLATFORM
-libdali_adaptor_uv_la_CXXFLAGS += $(WAYLAND_CFLAGS)
-libdali_adaptor_uv_la_CXXFLAGS += $(WAYLAND_EXTENSION_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD += $(WAYLAND_LIBS)
-libdali_adaptor_uv_la_LIBADD += $(WAYLAND_EXTENSION_LIBS)
-
-else
-libdali_adaptor_uv_la_CXXFLAGS += $(X11_CFLAGS)
-libdali_adaptor_uv_la_LIBADD += $(X11_LIBS)
-libdali_adaptor_uv_la_LIBADD += $(ECORE_X_LIBS)
-endif
-
-if COMMON_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += $(HAPTIC_CFLAGS)
-endif
-
-if MOBILE_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += \
- $(DEVICED_CFLAGS) \
- $(EFL_ASSIST_CFLAGS) \
- $(NATIVE_BUFFER_CFLAGS) \
- $(NATIVE_BUFFER_POOL_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD += \
- $(EFL_ASSIST_LIBS) \
- $(NATIVE_BUFFER_LIBS) \
- $(NATIVE_BUFFER_POOL_LIBS)
-endif
-
-if WEARABLE_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += \
- $(HAPTIC_CFLAGS) \
- $(EFL_ASSIST_CFLAGS)
-endif
-
-if TV_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += $(HAPTIC_CFLAGS)
-libdali_adaptor_uv_la_LIBADD +=
-endif
-
-if IVI_PROFILE
-libdali_adaptor_uv_la_CXXFLAGS += \
- $(DEVICED_CFLAGS) \
- $(EFL_ASSIST_CFLAGS) \
- $(NATIVE_BUFFER_CFLAGS) \
- $(NATIVE_BUFFER_POOL_CFLAGS)
-
-libdali_adaptor_uv_la_LIBADD += \
- $(EFL_ASSIST_LIBS) \
- $(NATIVE_BUFFER_LIBS) \
- $(NATIVE_BUFFER_POOL_LIBS)
-endif
-
-if UBUNTU_PROFILE
-libdali_adaptor_uv_la_LIBADD += -ljpeg
-CFLAGS += -fPIC
-endif
-
-tizenadaptorpublicapidir = $(devincludepath)/dali/public-api
-tizenadaptorpublicapi_HEADERS = $(public_api_header_files)
-
-tizenadaptordevelapidir= $(devincludepath)/dali/devel-api
-
-tizenadaptorintegrationapidir = $(devincludepath)/dali/integration-api/adaptors
-tizenadaptorintegrationapi_HEADERS = $(adaptor_integration_api_header_files)
-
-if WAYLAND
-tizenadaptorintegrationwaylandapidir = $(devincludepath)/dali/integration-api/adaptors
-tizenadaptorintegrationwaylandapi_HEADERS = $(adaptor_integration_wayland_api_header_files)
-else
-tizenadaptorintegrationx11apidir = $(devincludepath)/dali/integration-api/adaptors
-tizenadaptorintegrationx11api_HEADERS = $(adaptor_integration_x11_api_header_files)
-endif
-
-tizenadaptorframeworkpublicapidir = $(tizenadaptorpublicapidir)/adaptor-framework
-tizenadaptorframeworkpublicapi_HEADERS = $(public_api_adaptor_framework_header_files)
-
-tizenadaptorframeworkdevelapidir = $(tizenadaptordevelapidir)/adaptor-framework
-tizenadaptorframeworkdevelapi_HEADERS = $(devel_api_adaptor_framework_header_files)
-
-tizentextabstractiondevelapidir = $(tizenadaptordevelapidir)/text-abstraction
-tizentextabstractiondevelapi_HEADERS = $(text_abstraction_header_files)
-
-if !UBUNTU_PROFILE
-
-if !WAYLAND
-tizenadaptorframeworkdevelapi_HEADERS += $(devel_api_adaptor_tizen_x11_header_files)
-endif # NOT WAYLAND
-
-endif # NOT UBUNTU_PROFILE
-
-tizenadaptordaliheaderdir = $(devincludepath)/dali
-tizenadaptordaliheader_HEADERS = $(adaptor_dali_header_file)
-
-install-data-local:
- $(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir} ${DESTDIR}/${daliShaderbinCacheDir}
-
-# Install resource log analyzer script
-bin_SCRIPTS = ../../../adaptors/scripts/dalireslog.sh
-
-# package doxygen file (contains doxygen grouping information)
-packagedoxydir = $(devincludepath)/dali/doc
-packagedoxy_HEADERS = $(package_doxy_files)
-
-# linking test
-
-# turn off the linker test if were building for libuv
-# We can't link to LibUV becase it is statically linked to Node.JS (by default)
-if !LIB_UV_EVENT_LOOP
-noinst_PROGRAMS = linker.test
-endif # NOT LIB_UV_EVENT_LOOP
-
-linker_test_SOURCES = linker-test.cpp
-
-linker_test_CXXFLAGS = \
- -DDALI_ADAPTOR_COMPILATION \
- -I../../../adaptors/common \
- -I../../../adaptors/public-api \
- -I../../../adaptors/integration-api \
- -I../../../adaptors/base/interfaces \
- -I../../../adaptors/public-api/adaptor-framework \
- -I../../../adaptors/devel-api/adaptor-framework \
- $(DALI_ADAPTOR_CFLAGS) \
- $(DALICORE_CFLAGS) \
- $(VCONF_CFLAGS) \
- $(DALIX11_CFLAGS) \
- -Werror -Wall
-
-if WAYLAND
-linker_test_CXXFLAGS += \
- -I../../../adaptors/integration-api/wayland
-else
-
-linker_test_CXXFLAGS += \
- -I../../../adaptors/integration-api/x11
-endif
-
-
-linker_test_DEPENDENCIES = libdali-adaptor-uv.la
-linker_test_LDADD = \
- $(DALICORE_LIBS) \
- $(VCONF_LIBS) \
- libdali-adaptor-uv.la \
- $(HARFBUZZ_LIBS) \
- -L${prefix}/lib
+++ /dev/null
-#
-# Copyright (c) 2015 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.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-m4_define([dali_version],[0.1.0])
-AC_INIT([dali], [dali_version])
-AM_INIT_AUTOMAKE([-Wall foreign])
-
-AC_CONFIG_MACRO_DIR([m4])
-
-AC_PROG_CXX
-AC_PROG_LIBTOOL
-AC_PROG_MKDIR_P
-
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
-LT_INIT
-
-DALI_ADAPTOR_VERSION=dali_version
-AC_SUBST(DALI_ADAPTOR_VERSION)
-
-FREETYPE_REQUIRED=9.16.3
-# 17.1.11 = Freetype version 2.5.2
-FREETYPE_BITMAP_SUPPORT_VERSION=17.1.11
-
-PKG_CHECK_MODULES(DALICORE, dali-core)
-PKG_CHECK_MODULES(EXIF, libexif)
-PKG_CHECK_MODULES(FREETYPE, [freetype2 >= $FREETYPE_REQUIRED])
-PKG_CHECK_MODULES(FREETYPE_BITMAP_SUPPORT, [freetype2 >= $FREETYPE_BITMAP_SUPPORT_VERSION], [ freetype_bitmap_support=yes ], [ freetype_bitmap_support=no ] )
-PKG_CHECK_MODULES(FONTCONFIG, fontconfig)
-PKG_CHECK_MODULES(PNG, libpng)
-PKG_CHECK_MODULES(LIBEXIF, libexif)
-PKG_CHECK_MODULES(LIBDRM, libdrm)
-PKG_CHECK_MODULES(LIBCURL, libcurl)
-PKG_CHECK_MODULES(HARFBUZZ, harfbuzz)
-PKG_CHECK_MODULES(FRIBIDI, fribidi)
-PKG_CHECK_MODULES(TTRACE, ttrace, AC_DEFINE(ENABLE_TTRACE, 1, [ttrace available]),
- [ AC_MSG_NOTICE([Tizen Trace not avaiable]) ]
- )
-
-
-# Currently, dali-adaptor-uv requires EFL on X11 (e.g. Ubuntu PC)
-# and does not require it on Wayland (e.g. Tizen 3.0 devices).
-# So we should be able to enable/disable this option for dali-adaptor-uv.
-AC_ARG_ENABLE([efl],
- [AC_HELP_STRING([--enable-efl],
- [Builds with EFL libraries, On by default])],
- [enable_efl=$enableval],
- [enable_efl=yes])
-
-
-
-# Check if we need EFL Libraries ( on by default, disabled with --use-efl=no )
-# When running on Node.JS with Wayland no EFL libraries are required.
-if test "x$enable_efl" = "xyes"; then
-PKG_CHECK_MODULES(ECORE, ecore)
-PKG_CHECK_MODULES(ECORE_IPC, ecore-ipc)
-PKG_CHECK_MODULES(ECORE_IMF, [ecore-imf >= 1.13], [ecore_imf_1_13=yes], [ecore_imf_1_13=no])
-PKG_CHECK_MODULES(ELEMENTARY, elementary)
-# Check for EldBus.h in ECore
-PKG_CHECK_MODULES(ELDBUS, eldbus, [ eldbus_available=yes ], [ eldbus_available=no ] )
-fi
-
-
-DALI_ELDBUS_AVAILABLE=
-if test "x$eldbus_available" = "xyes"; then
- DALI_ELDBUS_AVAILABLE=true
- DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_ELDBUS_AVAILABLE "
-fi
-AC_SUBST(DALI_ELDBUS_AVAILABLE)
-
-
-PKG_CHECK_MODULES(TPKP_CURL, tpkp-curl, [ tpkp_curl_available=yes ], [ tpkp_curl_available=no ] )
-
-if test "x$tpkp_curl_available" = "xyes"; then
- DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DTPK_CURL_ENABLED "
-fi
-
-PKG_CHECK_MODULES(UTILX, utilX, [ utilx_available=yes ], [ utilx_available=no ] )
-
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DPLATFORM_TIZEN"
-
-AC_ARG_ENABLE(exportall,
- [AC_HELP_STRING([--enable-exportall],
- [enables the exporting of all the symbols in the library])],
- [enable_exportall=yes],
- [enable_exportall=no])
-
-AC_ARG_ENABLE([debug],
- [AC_HELP_STRING([--enable-debug],
- [Turns on debugging])],
- [enable_debug=$enableval],
- [enable_debug=no])
-
-AC_ARG_ENABLE(shaderbincache,
- [AC_HELP_STRING([--enable-shaderbincache],
- [enables shader binary cache])],
- [enable_shaderbincache=$enableval],
- [enable_shaderbincache=DISABLE])
-
-AC_ARG_ENABLE(networklogging,
- [AC_HELP_STRING([--enable-networklogging],
- [enables network for debug tool])],
- [enable_networklogging=$enableval],
- [enable_networklogging=no])
-
-
-if test "x$enable_debug" = "xyes"; then
- DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDEBUG_ENABLED"
-fi
-
-if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then
- DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS"
-fi
-
-if test "x$enable_shaderbincache" = "xENABLE"; then
- DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DSHADERBIN_CACHE_ENABLED"
-fi
-
-if test "x$enable_networklogging" = "xyes"; then
- DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DNETWORK_LOGGING_ENABLED"
-fi
-
-# If Ecore IMF version is greater than 1.13, then some structures are different
-if test "x$ecore_imf_1_13" = "xyes"; then
- DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DECORE_IMF_1_13"
-fi
-
-AC_ARG_ENABLE([gles],
- [AC_HELP_STRING([--enable-gles],
- [Specify the OpenGL ES version for backwards compatibility])],
- [enable_gles=$enableval],
- [enable_gles=20])
-
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
-
-# node.js by default statically links against libuv, so it doesn't need to install
-# a libuv headers/ shared library. So we can't use pkg-config to access any headers.
-# As a work around we pass the node deps path so we can access the libuv headers inside nodes
-# directory
-AC_ARG_WITH([libuv],
- [AC_HELP_STRING([--with-libuv],
- [Path that contains libuv headers. Setting this configures DALi to work with LibUV mainloop used in Node.JS.
- For example /usr/tmp/downloads/node/deps/uv/include/ ])],
- [with_libuv=$withval],
- [with_libuv=no])
-
-# Node.JS already has a libuv main loop running,so we have to integrate with it
-AM_CONDITIONAL(LIB_UV_EVENT_LOOP, test x$with_libuv != xno)
-
-
-build_for_libuv=no
-if test "x$with_libuv" != "xno"; then
- AC_MSG_NOTICE("build with libuv mainloop (Node.JS support) == yes");
- [build_for_libuv=yes]
- DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DNODE_JS_SUPPORT -I${with_libuv}"
-else
- #not using libuv build
- AC_MSG_NOTICE("build with libuv mainloop == no (Node.JS not supported)");
-fi
-
-# Currently, dali-adaptor-uv requires appfw on Tizen
-# and does not require it on Ubuntu.
-# So we should be able to enable/disable this option for dali-adaptor-uv.
-AC_ARG_ENABLE([appfw],
- [AC_HELP_STRING([--enable-appfw],
- [Builds with Tizen App framework libraries, off by default])],
- [enable_appfw=$enableval],
- [enable_appfw=no])
-
-# Option to allow building with Tizen SDK 2.2
-AC_ARG_WITH([tizen-2-2-compatibility],
- [AC_HELP_STRING([--with-tizen-2-2-compatibility],
- [Use Tizen SDK 2.2 compatibility])],
- [with_tizen_2_2_compatibility=$withval],
- [with_tizen_2_2_compatibility=no])
-
-# Tizen Profile options
-AC_ARG_ENABLE([profile],
- [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV,IVI,UBUNTU],
- [Select the variant of tizen])],
- [enable_profile=$enableval],
- [enable_profile=UBUNTU])
-
-# Tizen Major version
-AC_ARG_ENABLE([tizen-major-version],
- [AC_HELP_STRING([--enable-tizen-major-version],
- [Specify the Tizen Major version for backwards compatibility])],
- [enable-tizen-major-version=$enableval],
- [enable-tizen-major-version=0])
-
-# Ensure valid profile selected
-if test "x$enable_profile" != "xCOMMON" -a "x$enable_profile" != "xMOBILE" -a "x$enable_profile" != "xWEARABLE" -a "x$enable_profile" != "xTV" -a "x$enable_profile" != "xIVI" -a "x$enable_profile" != "xUBUNTU"; then
- AC_MSG_ERROR([$enable_profile is an invalid profile])
-fi
-
-AC_ARG_ENABLE(wayland,
- [ --enable-wayland Build on Wayland],
- enable_wayland=yes,
- enable_wayland=no)
-
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${enable_profile}"
-DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
-AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
-AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
-AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
-AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
-AM_CONDITIONAL([IVI_PROFILE], [test x$enable_profile = xIVI])
-AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
-AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
-AM_CONDITIONAL([USE_EFL], [test x$enable_efl = xyes])
-AM_CONDITIONAL([USE_APPFW], [test x$enable_appfw = xyes])
-AM_CONDITIONAL([USE_APPFW_EFL_BASE], [test x$enable_tizen_major_version = x3])
-
-AM_CONDITIONAL([ENABLE_NETWORK_LOGGING], [test x$enable_networklogging = xyes])
-
-# Platforms should either enable features or remove them, they
-# should not disable features. This allows the developer to override
-# features through the command line.
-
-if test "x$enable_profile" = "xCOMMON"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
-fi
-
-if test "x$enable_profile" = "xMOBILE"; then
-PKG_CHECK_MODULES(OPENGLES20, gles20)
-enable_assimp=no
-fi
-
-if test "x$enable_profile" = "xLITE"; then
-PKG_CHECK_MODULES(OPENGLES20, gles20)
-fi
-
-if test "x$enable_profile" = "xWEARABLE"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2)
-fi
-
-if test "x$enable_profile" = "xTV"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2)
-fi
-
-if test "x$enable_profile" = "xIVI"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2)
-fi
-
-if test "x$enable_profile" = "xUBUNTU"; then
-PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
-else
-
-
-
-PKG_CHECK_MODULES(DLOG, dlog)
-PKG_CHECK_MODULES(TTS, tts)
-PKG_CHECK_MODULES(VCONF, vconf)
-
-if test "x$enable_efl" = "xyes"; then
-if test "x$with_tizen_2_2_compatibility" = "xno"; then
-PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
-PKG_CHECK_MODULES(CAPI_SYSTEM_SENSOR, capi-system-sensor)
-fi
-fi
-
-fi # ubuntu profile test
-
-if test "x$enable_appfw" = "xyes"; then
-PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
-if test "x$enable_tizen_major_version" = "x3"; then
-PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, capi-appfw-application)
-else
-PKG_CHECK_MODULES(CAPI_APPFW_APPLICATION, appcore-ui)
-PKG_CHECK_MODULES(CAPI_APPFW_COMMON, capi-appfw-app-common)
-PKG_CHECK_MODULES(CAPI_APPFW_CONTROL, capi-appfw-app-control)
-fi
-fi
-
-# Using EFL api's for WAYLAND AND X11 to run on ecore mainloop
-if test "x$enable_efl" = "xyes"; then
-if test "x$enable_wayland" = "xyes"; then
-PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon libtbm],
- [DALI_USE_ECORE_WAYLAND=1],
- [DALI_USE_ECORE_WAYLAND=0])
-
-else
-PKG_CHECK_MODULES(ECORE_X, [ecore-x],
- [DALI_USE_ECORE_X11=1],
- [DALI_USE_ECORE_X11=0])
-PKG_CHECK_MODULES(X11, [x11],
- [DALI_USE_X11=1],
- [DALI_USE_X11=0])
-fi
-
-else
-
-# dali-adaptor-uv needs ecore-wayland even if enable_efl==no
-# because NativeRenderSurface uses it.
-if test "x$enable_profile" != "xUBUNTU"; then
-PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
-fi
-
-fi
-# Using Wayland API directly ( main loop agnostic, typically for running on libuv)
-# wayland-extension-client include xdg-shell-client
-if test "x$enable_efl" = "xno"; then
-if test "x$enable_wayland" = "xyes"; then
-PKG_CHECK_MODULES(WAYLAND, [ egl wayland-egl wayland-client >= 1.2.0 xkbcommon libtbm],
- [DALI_USE_WAYLAND=1],
- [DALI_USE_WAYLAND=0])
-fi
-fi
-
-AM_CONDITIONAL([USE_ECORE_WAYLAND], [test "$DALI_USE_ECORE_WAYLAND" -eq 1])
-
-if test x$DALI_DATA_RW_DIR != x; then
- dataReadWriteDir=$DALI_DATA_RW_DIR
-else
- dataReadWriteDir=${prefix}/share/dali/
-fi
-
-if test x$DALI_DATA_RO_DIR != x; then
- dataReadOnlyDir=$DALI_DATA_RO_DIR
-else
- dataReadOnlyDir=${prefix}/share/dali/
-fi
-
-if test x$FONT_CONFIGURATION_FILE != x; then
- fontConfigurationFile=$FONT_CONFIGURATION_FILE
-fi
-
-if test x$TIZEN_PLATFORM_CONFIG_SUPPORTED != x; then
- tizenPlatformConfigSupported=$TIZEN_PLATFORM_CONFIG_SUPPORTED
-else
- tizenPlatformConfigSupported=0
-fi
-
-AC_SUBST(dataReadWriteDir)
-AC_SUBST(dataReadOnlyDir)
-AC_SUBST(DALI_ADAPTOR_CFLAGS)
-AC_SUBST(DALI_PROFILE_CFLAGS)
-AC_SUBST(fontConfigurationFile)
-AC_SUBST(tizenPlatformConfigSupported)
-
-# Specify the include directory for development headers
-#devincludepath=${includedir}/dali/internal
-devincludepath=${includedir}
-AC_SUBST(devincludepath)
-
-AC_CONFIG_FILES([
- Makefile
- dali-adaptor-uv.pc
-])
-
-if test "x$freetype_bitmap_support" = "xyes"; then
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DFREETYPE_BITMAP_SUPPORT"
-fi
-
-AC_OUTPUT
-
-
-echo "
-Configuration
--------------
- Prefix: $prefix
- Debug Build: $enable_debug
- Compile flags: $DALI_ADAPTOR_CFLAGS
- Freetype bitmap support (Emoji): $freetype_bitmap_support
- Profile: $enable_profile
- Data Dir (Read/Write): $dataReadWriteDir
- Data Dir (Read Only): $dataReadOnlyDir
- Tizen SDK 2.2 compatibility: $with_tizen_2_2_compatibility
- EldBus: $eldbus_available
- Shader Binary Cache: $enable_shaderbincache
- Using LibUV mainloop (Node.JS) $build_for_libuv
- Ecore Version At Least 1.13.0 $ecore_imf_1_13
- Network logging enabled: $enable_networklogging
- Font config file: $fontConfigurationFile
- Building with EFL Libraries: $enable_efl
- Using Tizen APP FW libraries: $enable_appfw
- OpenGL ES version: $enable_gles
- Tizen Platform Config supported: $tizenPlatformConfigSupported
-"
-# optional output of node.js source path if we're building with libuv
-if test "x$build_for_libuv" != "xno"; then
-echo " LibUV header path $with_libuv"
-fi
-echo ""
+++ /dev/null
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-apiversion=@DALI_ADAPTOR_VERSION@
-libdir=@libdir@
-includedir=@devincludepath@
-
-Name: dali-adaptor-uv
-Description: DALi adaptor using libuv
-Version: ${apiversion}
-Requires: dali-core
-Libs: -L${libdir} -ldali-adaptor-uv
-Cflags: -I${includedir}/dali
#
-# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+# Copyright (c) 2017 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.
adaptor_common_dir = ../../../adaptors/common
include ../../../adaptors/common/file.list
-if USE_EFL
# ECore Common
adaptor_ecore_common_dir = ../../../adaptors/ecore/common
include ../../../adaptors/ecore/common/file.list
-else
-# If we're not using any EFL, then we need to use libuv mainloop
-# for the frame work
-adaptor_libuv_dir = ../../../adaptors/libuv
-include ../../../adaptors/libuv/file.list
-endif
# Wayland
if WAYLAND
-if USE_EFL
## Use ecore_wayland
adaptor_ecore_wayland_dir = ../../../adaptors/ecore/wayland
include ../../../adaptors/ecore/wayland/file.list
else
-## Use wayland
-adaptor_wayland_dir = ../../../adaptors/wayland
-include ../../../adaptors/wayland/file.list
-endif
-else
# X11
adaptor_x11_dir = ../../../adaptors/x11
include ../../../adaptors/x11/file.list
include ../../../doc/file.list
############# source files #############
-
-# FRAMEWORK FILES for adaptor
-# Either use ecore mainloop + appcore / uiman
-# Or libuv main loop with no appcore / uimain
-if USE_EFL
adaptor_internal_src_files = $(adaptor_tizen_framework_efl_src_files) \
$(adaptor_ecore_common_internal_src_files)
-else
-adaptor_internal_src_files = $(adaptor_tizen_framework_libuv_src_files)
-endif
# COMMON
if COMMON_PROFILE
endif # IVI_PROFILE
-
-
-# Node JS support for using an external libuv main loop. If not enabled then just use e-core as normal
-# Used for things like callbacks, file-monintors, x input handling
-if LIB_UV_EVENT_LOOP
-main_loop_integration_src_files = $(adaptor_common_internal_uv_src_files)
-input_event_handler_src_files = $(adaptor_uv_x_event_handler_internal_src_files)
-else
main_loop_integration_src_files = $(adaptor_common_internal_ecore_src_files)
input_event_handler_src_files = $(adaptor_ecore_x_event_handler_internal_src_files)
-endif
if ENABLE_VECTOR_BASED_TEXT_RENDERING
adaptor_internal_src_files += $(static_libraries_glyphy_src_files)
-lturbojpeg \
-ljpeg
-if USE_EFL
# EVAS used indicator
libdali_adaptor_la_CXXFLAGS += $(ELEMENTARY_CFLAGS) \
$(EVAS_CFLAGS) \
$(ECORE_CFLAGS) \
$(ECORE_IPC_CFLAGS) \
- $(ELDBUS_CFLAGS) \
- -DUSE_EFL
+ $(ELDBUS_CFLAGS)
libdali_adaptor_la_LIBADD += $(ELEMENTARY_LIBS) \
$(ECORE_IPC_LIBS) \
$(ELDBUS_LIBS)
-endif
-
if USE_APPFW
libdali_adaptor_la_CXXFLAGS += $(CAPI_APPFW_APPLICATION_CFLAGS) \
packagedoxy_HEADERS = $(package_doxy_files)
# linking test
-
-# turn off the linker test if were building for libuv
-# We can't link to LibUV becase it is statically linked to Node.JS (by default)
-if !LIB_UV_EVENT_LOOP
noinst_PROGRAMS = linker.test
-endif # NOT LIB_UV_EVENT_LOOP
linker_test_SOURCES = linker-test.cpp
#
-# Copyright (c) 2015 Samsung Electronics Co., Ltd.
+# Copyright (c) 2017 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.
# Currently, dali-adaptor always requires EFL on all platforms.
# (on Wayland & X11, on Tizen devices & Ubuntu PC).
-enable_efl=yes
-if test "x$enable_efl" = "xyes"; then
PKG_CHECK_MODULES(ECORE, ecore)
PKG_CHECK_MODULES(ECORE_IPC, ecore-ipc)
PKG_CHECK_MODULES(ECORE_IMF, [ecore-imf >= 1.13], [ecore_imf_1_13=yes], [ecore_imf_1_13=no])
PKG_CHECK_MODULES(ELEMENTARY, elementary)
# Check for EldBus.h in ECore
PKG_CHECK_MODULES(ELDBUS, eldbus, [ eldbus_available=yes ], [ eldbus_available=no ] )
-fi
-
DALI_ELDBUS_AVAILABLE=
if test "x$eldbus_available" = "xyes"; then
DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_GLES_VERSION=${enable_gles}"
-# Currently, dali-adaptor always does not require libuv because it runs on ecore on all platforms.
-# (on Wayland & X11, on Tizen devices & Ubuntu PC).
-with_libuv=no
-
-# Node.JS already has a libuv main loop running,so we have to integrate with it
-AM_CONDITIONAL(LIB_UV_EVENT_LOOP, test x$with_libuv != xno)
-
-
-build_for_libuv=no
-if test "x$with_libuv" != "xno"; then
- AC_MSG_NOTICE("build with libuv mainloop (Node.JS support) == yes");
- [build_for_libuv=yes]
- DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DNODE_JS_SUPPORT -I${with_libuv}"
-else
- #not using libuv build
- AC_MSG_NOTICE("build with libuv mainloop == no (Node.JS not supported)");
-fi
-
# Currently, dali-adaptor requires appfw on Tizen
# and does not require it on Ubuntu.
# So we should be able to enable/disable this option for dali-adaptor.
AM_CONDITIONAL([IVI_PROFILE], [test x$enable_profile = xIVI])
AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
-AM_CONDITIONAL([USE_EFL], [test x$enable_efl = xyes])
AM_CONDITIONAL([USE_APPFW], [test x$enable_appfw = xyes])
AM_CONDITIONAL([USE_APPFW_EFL_BASE], [test x$enable_tizen_major_version = x3])
PKG_CHECK_MODULES(OPENGLES20, glesv2 egl)
else
-
-
PKG_CHECK_MODULES(DLOG, dlog)
PKG_CHECK_MODULES(TTS, tts)
PKG_CHECK_MODULES(VCONF, vconf)
-if test "x$enable_efl" = "xyes"; then
if test "x$with_tizen_2_2_compatibility" = "xno"; then
PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
PKG_CHECK_MODULES(CAPI_SYSTEM_SENSOR, capi-system-sensor, [ capi_system_sensor_support=yes ], [ capi_system_sensor_support=no ] )
fi
fi
-fi
fi # ubuntu profile test
fi
# Using EFL api's for WAYLAND AND X11 to run on ecore mainloop
-if test "x$enable_efl" = "xyes"; then
if test "x$enable_wayland" = "xyes"; then
PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon libtbm],
[DALI_USE_ECORE_WAYLAND=1],
[DALI_USE_X11=1],
[DALI_USE_X11=0])
fi
-fi
-# Using Wayland API directly ( main loop agnostic, typically for running on libuv)
-# wayland-extension-client include xdg-shell-client
-if test "x$enable_efl" = "xno"; then
-if test "x$enable_wayland" = "xyes"; then
-PKG_CHECK_MODULES(WAYLAND, [ egl wayland-egl wayland-client >= 1.2.0 xkbcommon libtbm],
- [DALI_USE_WAYLAND=1],
- [DALI_USE_WAYLAND=0])
-fi
-fi
# remove this when we update common repos
# common profile currently does not have wayland extensions like xdg-shell
Tizen SDK 2.2 compatibility: $with_tizen_2_2_compatibility
EldBus: $eldbus_available
Shader Binary Cache: $enable_shaderbincache
- Using LibUV mainloop (Node.JS) $build_for_libuv
Ecore Version At Least 1.13.0 $ecore_imf_1_13
Network logging enabled: $enable_networklogging
Font config file: $fontConfigurationFile
- Building with EFL Libraries: $enable_efl
Using Tizen APP FW libraries: $enable_appfw
OpenGL ES version: $enable_gles
Tizen Platform Config supported $tizenPlatformConfigSupported
"
-# optional output of node.js source path if we're building with libuv
-if test "x$build_for_libuv" != "xno"; then
-echo " LibUV header path $with_libuv"
-fi
#
-# Copyright (c) 2015 Samsung Electronics Co., Ltd.
+# Copyright (c) 2017 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.
AC_INIT([dali], [dali_version])
AM_INIT_AUTOMAKE([-Wall foreign])
-AC_ARG_WITH([libuv],
- [AC_HELP_STRING([--with-libuv],
- [Path that contains libuv headers. Setting this configures DALi to work with LibUV mainloop used in Node.JS.
- For example /usr/tmp/downloads/node/deps/uv/include/ ])],
- [with_libuv=$withval],
- [with_libuv=no])
-
AC_ARG_ENABLE([feedback],
[AC_HELP_STRING([ --enable-feedback],
[Enable feedback plugin])],
[enable_videoplayer=no])
AC_CONFIG_SUBDIRS(adaptor)
-if test "x$with_libuv" != "xno"; then
- # build dali-adaptor & dali-adaptor-uv
- AC_CONFIG_SUBDIRS(adaptor-uv)
-fi
if test "x$enable_feedback" = "xyes" || test "x$enable_videoplayer" = "xyes"; then
- # build dali-adaptor & dali-adaptor-uv & plugins
+ # build dali-adaptor & plugins
AC_CONFIG_SUBDIRS(plugins)
fi
#else
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(capi-system-sensor)
-# Tizen currently does not have libuv as a separate libuv package
-# So we have to look into the uv headers bundled inside node-js
-BuildRequires: nodejs-devel
-
-
%if %{with wayland}
####### BUILDING FOR WAYLAND #######
BuildRequires: wayland-devel
BuildRequires: wayland-extension-client-devel
-# dali-adaptor-uv uses libuv mainloop and has its own wayland client (it needs wayland-client headers).
-BuildRequires: libxkbcommon-devel
-
# dali-adaptor uses ecore mainloop
BuildRequires: pkgconfig(ecore-wayland)
# Default to GLES 2.0 if not specified.
%{!?target_gles_version: %define target_gles_version 20}
-#--enable-efl=no \ # only affects dali-adaptor-uv
-#--enable-appfw=yes \ # affects both dali-adaptor & dali-adaptor-uv
-#--with-libuv=/usr/include/node/ \ # only affects dali-adaptor-uv
-
-
# Set up the build via configure.
#######################################################################
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
--enable-debug \
%endif
--enable-appfw=yes \
- --with-libuv=/usr/include/node/ \
$configure_flags --libdir=%{_libdir}
# Build.
--enable-debug \
%endif
--enable-appfw=yes \
- --with-libuv=/usr/include/node/ \
$configure_flags --libdir=%{_libdir}
# Build.
--enable-debug \
%endif
--enable-appfw=yes \
- --with-libuv=/usr/include/node/ \
$configure_flags --libdir=%{_libdir}
# Build.
--enable-debug \
%endif
--enable-appfw=yes \
- --with-libuv=/usr/include/node/ \
$configure_flags --libdir=%{_libdir}
# Build.
--enable-debug \
%endif
--enable-appfw=yes \
- --with-libuv=/usr/include/node/ \
$configure_flags --libdir=%{_libdir}
# Build.
%{dev_include_path}/dali/devel-api/*
%{dev_include_path}/dali/doc/*
%{_libdir}/pkgconfig/dali-adaptor.pc
-%{_libdir}/pkgconfig/dali-adaptor-uv.pc
%files integration-devel
%defattr(-,root,root,-)