Refactor and add Wayland support. 14/23414/11
authorYan Wang <yan.wang@linux.intel.com>
Wed, 25 Jun 2014 07:21:52 +0000 (15:21 +0800)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 14 Jul 2014 14:27:02 +0000 (15:27 +0100)
Change-Id: I9c949a684dc8a3aa9c4cec0249f80be899492213
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
268 files changed:
adaptors/base/interfaces/adaptor-internal-services.h
adaptors/base/render-thread.h
adaptors/common/abort-handler.cpp [moved from adaptors/tizen/internal/abort-handler.cpp with 100% similarity]
adaptors/common/abort-handler.h [moved from adaptors/tizen/internal/abort-handler.h with 97% similarity]
adaptors/common/accessibility-gesture-detector.cpp [moved from adaptors/tizen/internal/common/accessibility-gesture-detector.cpp with 96% similarity]
adaptors/common/accessibility-gesture-detector.h [moved from adaptors/tizen/internal/common/accessibility-gesture-detector.h with 92% similarity]
adaptors/common/accessibility-manager-impl.cpp [new file with mode: 0644]
adaptors/common/accessibility-manager-impl.h [moved from adaptors/tizen/internal/common/accessibility-manager-impl.h with 96% similarity]
adaptors/common/accessibility-manager.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/accessibility-manager.cpp with 98% similarity]
adaptors/common/adaptor-impl.cpp [moved from adaptors/tizen/internal/common/adaptor-impl.cpp with 95% similarity]
adaptors/common/adaptor-impl.h [moved from adaptors/tizen/internal/common/adaptor-impl.h with 96% similarity]
adaptors/common/adaptor.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/adaptor.cpp with 83% similarity]
adaptors/common/application-impl.cpp [moved from adaptors/tizen/internal/application-impl.cpp with 97% similarity]
adaptors/common/application-impl.h [moved from adaptors/tizen/internal/application-impl.h with 98% similarity]
adaptors/common/application.cpp [moved from adaptors/tizen/public-api/adaptor-framework/application.cpp with 96% similarity]
adaptors/common/callback-manager.h [moved from adaptors/tizen/internal/common/callback-manager.h with 100% similarity]
adaptors/common/clipboard-event-notifier-impl.cpp [moved from adaptors/tizen/internal/common/clipboard-event-notifier-impl.cpp with 98% similarity]
adaptors/common/clipboard-event-notifier-impl.h [moved from adaptors/tizen/internal/common/clipboard-event-notifier-impl.h with 97% similarity]
adaptors/common/clipboard-event-notifier.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/clipboard-event-notifier.cpp with 93% similarity]
adaptors/common/clipboard.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/clipboard.cpp with 92% similarity]
adaptors/common/color-controller-impl.cpp [moved from adaptors/tizen/internal/common/color-controller-impl.cpp with 100% similarity]
adaptors/common/color-controller-impl.h [moved from adaptors/tizen/internal/common/color-controller-impl.h with 97% similarity]
adaptors/common/color-controller.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/color-controller.cpp with 92% similarity]
adaptors/common/command-line-options.cpp [moved from adaptors/tizen/internal/command-line-options.cpp with 100% similarity]
adaptors/common/command-line-options.h [moved from adaptors/tizen/internal/command-line-options.h with 100% similarity]
adaptors/common/damage-observer.h [moved from adaptors/tizen/internal/common/damage-observer.h with 100% similarity]
adaptors/common/device-layout.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/device-layout.cpp with 94% similarity]
adaptors/common/drag-and-drop-detector-impl.cpp [moved from adaptors/tizen/internal/common/drag-and-drop-detector-impl.cpp with 100% similarity]
adaptors/common/drag-and-drop-detector-impl.h [moved from adaptors/tizen/internal/common/drag-and-drop-detector-impl.h with 98% similarity]
adaptors/common/drag-and-drop-detector.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/drag-and-drop-detector.cpp with 93% similarity]
adaptors/common/ecore-callback-manager.cpp [moved from adaptors/tizen/internal/common/ecore-callback-manager.cpp with 100% similarity]
adaptors/common/ecore-callback-manager.h [moved from adaptors/tizen/internal/common/ecore-callback-manager.h with 98% similarity]
adaptors/common/event-feeder.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/event-feeder.cpp with 92% similarity]
adaptors/common/events/event-handler.h [moved from adaptors/tizen/internal/common/events/event-handler.h with 93% similarity]
adaptors/common/events/gesture-detector.h [moved from adaptors/tizen/internal/common/events/gesture-detector.h with 100% similarity]
adaptors/common/events/gesture-manager.cpp [moved from adaptors/tizen/internal/common/events/gesture-manager.cpp with 95% similarity]
adaptors/common/events/gesture-manager.h [moved from adaptors/tizen/internal/common/events/gesture-manager.h with 98% similarity]
adaptors/common/events/long-press-gesture-detector.cpp [moved from adaptors/tizen/internal/common/events/long-press-gesture-detector.cpp with 99% similarity]
adaptors/common/events/long-press-gesture-detector.h [moved from adaptors/tizen/internal/common/events/long-press-gesture-detector.h with 97% similarity]
adaptors/common/events/pan-gesture-detector-base.cpp [moved from adaptors/tizen/internal/common/events/pan-gesture-detector-base.cpp with 100% similarity]
adaptors/common/events/pan-gesture-detector-base.h [moved from adaptors/tizen/internal/common/events/pan-gesture-detector-base.h with 98% similarity]
adaptors/common/events/pan-gesture-detector.cpp [moved from adaptors/tizen/internal/common/events/pan-gesture-detector.cpp with 100% similarity]
adaptors/common/events/pan-gesture-detector.h [moved from adaptors/tizen/internal/common/events/pan-gesture-detector.h with 97% similarity]
adaptors/common/events/pinch-gesture-detector.cpp [moved from adaptors/tizen/internal/common/events/pinch-gesture-detector.cpp with 100% similarity]
adaptors/common/events/pinch-gesture-detector.h [moved from adaptors/tizen/internal/common/events/pinch-gesture-detector.h with 98% similarity]
adaptors/common/events/tap-gesture-detector.cpp [moved from adaptors/tizen/internal/common/events/tap-gesture-detector.cpp with 100% similarity]
adaptors/common/events/tap-gesture-detector.h [moved from adaptors/tizen/internal/common/events/tap-gesture-detector.h with 96% similarity]
adaptors/common/feedback/default-feedback-theme.json [moved from adaptors/tizen/internal/common/feedback/default-feedback-theme.json with 100% similarity]
adaptors/common/feedback/feedback-controller.cpp [moved from adaptors/tizen/internal/common/feedback/feedback-controller.cpp with 99% similarity]
adaptors/common/feedback/feedback-controller.h [moved from adaptors/tizen/internal/common/feedback/feedback-controller.h with 96% similarity]
adaptors/common/feedback/feedback-ids.h [moved from adaptors/tizen/internal/common/feedback/feedback-ids.h with 100% similarity]
adaptors/common/feedback/feedback-plugin-proxy.cpp [moved from adaptors/tizen/internal/common/feedback/feedback-plugin-proxy.cpp with 98% similarity]
adaptors/common/feedback/feedback-plugin-proxy.h [moved from adaptors/tizen/internal/common/feedback/feedback-plugin-proxy.h with 97% similarity]
adaptors/common/file-descriptor-monitor.cpp [moved from adaptors/tizen/internal/common/file-descriptor-monitor.cpp with 100% similarity]
adaptors/common/file-descriptor-monitor.h [moved from adaptors/tizen/internal/common/file-descriptor-monitor.h with 100% similarity]
adaptors/common/file.list [new file with mode: 0644]
adaptors/common/framework.cpp [moved from adaptors/tizen/internal/framework.cpp with 98% similarity]
adaptors/common/framework.h [moved from adaptors/tizen/internal/framework.h with 97% similarity]
adaptors/common/gl/egl-factory.cpp [moved from adaptors/tizen/internal/common/gl/egl-factory.cpp with 91% similarity]
adaptors/common/gl/egl-factory.h [moved from adaptors/tizen/internal/common/gl/egl-factory.h with 100% similarity]
adaptors/common/gl/egl-image-extensions.cpp [moved from adaptors/tizen/internal/common/gl/egl-image-extensions.cpp with 99% similarity]
adaptors/common/gl/egl-image-extensions.h [moved from adaptors/tizen/internal/common/gl/egl-image-extensions.h with 100% similarity]
adaptors/common/gl/egl-implementation.h [moved from adaptors/tizen/internal/common/gl/egl-implementation.h with 100% similarity]
adaptors/common/gl/egl-sync-implementation.cpp [moved from adaptors/tizen/internal/common/gl/egl-sync-implementation.cpp with 98% similarity]
adaptors/common/gl/egl-sync-implementation.h [moved from adaptors/tizen/internal/common/gl/egl-sync-implementation.h with 100% similarity]
adaptors/common/gl/gl-extensions.cpp [moved from adaptors/tizen/internal/common/gl/gl-extensions.cpp with 100% similarity]
adaptors/common/gl/gl-extensions.h [moved from adaptors/tizen/internal/common/gl/gl-extensions.h with 100% similarity]
adaptors/common/gl/gl-implementation.h [moved from adaptors/tizen/internal/common/gl/gl-implementation.h with 99% similarity]
adaptors/common/gl/gl-proxy-implementation.cpp [moved from adaptors/tizen/internal/common/gl/gl-proxy-implementation.cpp with 100% similarity]
adaptors/common/gl/gl-proxy-implementation.h [moved from adaptors/tizen/internal/common/gl/gl-proxy-implementation.h with 98% similarity]
adaptors/common/haptic-player-impl.cpp [moved from adaptors/tizen/internal/common/haptic-player-impl.cpp with 96% similarity]
adaptors/common/haptic-player-impl.h [moved from adaptors/tizen/internal/common/haptic-player-impl.h with 95% similarity]
adaptors/common/haptic-player.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/haptic-player.cpp with 91% similarity]
adaptors/common/imf-manager.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/imf-manager.cpp with 94% similarity]
adaptors/common/indicator-buffer.cpp [moved from adaptors/tizen/internal/common/indicator-buffer.cpp with 100% similarity]
adaptors/common/indicator-buffer.h [moved from adaptors/tizen/internal/common/indicator-buffer.h with 96% similarity]
adaptors/common/indicator-impl.cpp [moved from adaptors/tizen/internal/common/indicator-impl.cpp with 99% similarity]
adaptors/common/indicator-impl.h [moved from adaptors/tizen/internal/common/indicator-impl.h with 98% similarity]
adaptors/common/kernel-trace.cpp [moved from adaptors/tizen/internal/common/kernel-trace.cpp with 100% similarity]
adaptors/common/kernel-trace.h [moved from adaptors/tizen/internal/common/kernel-trace.h with 100% similarity]
adaptors/common/key-impl.h [moved from adaptors/tizen/internal/common/key-impl.h with 95% similarity]
adaptors/common/key.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/key.cpp with 89% similarity]
adaptors/common/livebox-plugin.cpp [moved from adaptors/tizen/public-api/adaptor-framework/livebox-plugin.cpp with 98% similarity]
adaptors/common/locale-utils.cpp [moved from adaptors/tizen/internal/common/locale-utils.cpp with 100% similarity]
adaptors/common/locale-utils.h [moved from adaptors/tizen/internal/common/locale-utils.h with 93% similarity]
adaptors/common/native-bitmap-buffer-impl.cpp [moved from adaptors/tizen/internal/common/native-bitmap-buffer-impl.cpp with 100% similarity]
adaptors/common/native-bitmap-buffer-impl.h [moved from adaptors/tizen/internal/common/native-bitmap-buffer-impl.h with 98% similarity]
adaptors/common/object-profiler.cpp [moved from adaptors/tizen/internal/common/object-profiler.cpp with 100% similarity]
adaptors/common/object-profiler.h [moved from adaptors/tizen/internal/common/object-profiler.h with 97% similarity]
adaptors/common/orientation-impl.cpp [moved from adaptors/tizen/internal/common/orientation-impl.cpp with 96% similarity]
adaptors/common/orientation-impl.h [moved from adaptors/tizen/internal/common/orientation-impl.h with 96% similarity]
adaptors/common/orientation.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/orientation.cpp with 91% similarity]
adaptors/common/physical-keyboard-impl.cpp [moved from adaptors/tizen/internal/common/physical-keyboard-impl.cpp with 95% similarity]
adaptors/common/physical-keyboard-impl.h [moved from adaptors/tizen/internal/common/physical-keyboard-impl.h with 97% similarity]
adaptors/common/physical-keyboard.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/physical-keyboard.cpp with 92% similarity]
adaptors/common/pixmap-image.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/pixmap-image.cpp with 95% similarity]
adaptors/common/render-surface-impl.cpp [moved from adaptors/tizen/internal/common/render-surface-impl.cpp with 100% similarity]
adaptors/common/render-surface-impl.h [moved from adaptors/tizen/internal/common/render-surface-impl.h with 98% similarity]
adaptors/common/render-surface.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/render-surface.cpp with 64% similarity]
adaptors/common/rotation-observer.h [moved from adaptors/tizen/internal/common/rotation-observer.h with 100% similarity]
adaptors/common/server-connection.cpp [moved from adaptors/tizen/internal/common/server-connection.cpp with 71% similarity]
adaptors/common/server-connection.h [moved from adaptors/tizen/internal/common/server-connection.h with 100% similarity]
adaptors/common/shared-file.cpp [moved from adaptors/tizen/internal/common/shared-file.cpp with 100% similarity]
adaptors/common/shared-file.h [moved from adaptors/tizen/internal/common/shared-file.h with 100% similarity]
adaptors/common/sound-player-impl.cpp [moved from adaptors/tizen/internal/common/sound-player-impl.cpp with 97% similarity]
adaptors/common/sound-player-impl.h [moved from adaptors/tizen/internal/common/sound-player-impl.h with 96% similarity]
adaptors/common/sound-player.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/sound-player.cpp with 92% similarity]
adaptors/common/style-monitor-impl.cpp [moved from adaptors/tizen/internal/common/style-monitor-impl.cpp with 98% similarity]
adaptors/common/style-monitor-impl.h [moved from adaptors/tizen/internal/common/style-monitor-impl.h with 98% similarity]
adaptors/common/style-monitor.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/style-monitor.cpp with 93% similarity]
adaptors/common/system-settings.cpp [new file with mode: 0644]
adaptors/common/system-settings.h [moved from adaptors/tizen/internal/common/system-settings.h with 100% similarity]
adaptors/common/tilt-sensor-impl.cpp [moved from adaptors/tizen/internal/common/tilt-sensor-impl.cpp with 99% similarity]
adaptors/common/tilt-sensor-impl.h [moved from adaptors/tizen/internal/common/tilt-sensor-impl.h with 97% similarity]
adaptors/common/tilt-sensor.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/tilt-sensor.cpp with 96% similarity]
adaptors/common/timer-impl.cpp [moved from adaptors/tizen/internal/common/timer-impl.cpp with 100% similarity]
adaptors/common/timer-impl.h [moved from adaptors/tizen/internal/common/timer-impl.h with 97% similarity]
adaptors/common/timer.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/timer.cpp with 94% similarity]
adaptors/common/trigger-event-factory.cpp [moved from adaptors/tizen/internal/common/trigger-event-factory.cpp with 96% similarity]
adaptors/common/trigger-event-factory.h [moved from adaptors/tizen/internal/common/trigger-event-factory.h with 100% similarity]
adaptors/common/trigger-event.cpp [moved from adaptors/tizen/internal/common/trigger-event.cpp with 98% similarity]
adaptors/common/trigger-event.h [moved from adaptors/tizen/internal/common/trigger-event.h with 100% similarity]
adaptors/common/tts-player-impl.cpp [moved from adaptors/tizen/internal/common/tts-player-impl.cpp with 100% similarity]
adaptors/common/tts-player-impl.h [moved from adaptors/tizen/internal/common/tts-player-impl.h with 98% similarity]
adaptors/common/tts-player.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/tts-player.cpp with 90% similarity]
adaptors/common/virtual-keyboard-impl.cpp [moved from adaptors/tizen/internal/common/virtual-keyboard-impl.cpp with 92% similarity]
adaptors/common/virtual-keyboard-impl.h [moved from adaptors/tizen/internal/common/virtual-keyboard-impl.h with 97% similarity]
adaptors/common/virtual-keyboard.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/virtual-keyboard.cpp with 94% similarity]
adaptors/common/vsync-monitor.cpp [moved from adaptors/tizen/internal/common/vsync-monitor.cpp with 100% similarity]
adaptors/common/vsync-monitor.h [moved from adaptors/tizen/internal/common/vsync-monitor.h with 100% similarity]
adaptors/common/window-impl.cpp [moved from adaptors/tizen/internal/common/window-impl.cpp with 95% similarity]
adaptors/common/window-impl.h [moved from adaptors/tizen/internal/common/window-impl.h with 95% similarity]
adaptors/common/window-visibility-observer.h [moved from adaptors/tizen/internal/common/window-visibility-observer.h with 100% similarity]
adaptors/common/window.cpp [moved from adaptors/tizen/public-api/adaptor-framework/common/window.cpp with 95% similarity]
adaptors/mobile/application-file.list [new file with mode: 0644]
adaptors/mobile/evas-plugin-impl.cpp [moved from adaptors/tizen/internal/mobile/evas-plugin-impl.cpp with 98% similarity]
adaptors/mobile/evas-plugin-impl.h [moved from adaptors/tizen/internal/mobile/evas-plugin-impl.h with 96% similarity]
adaptors/mobile/evas-plugin.cpp [moved from adaptors/tizen/public-api/adaptor-framework/mobile/evas-plugin.cpp with 96% similarity]
adaptors/mobile/file.list [new file with mode: 0644]
adaptors/mobile/mobile-color-controller-impl.cpp [moved from adaptors/tizen/internal/mobile/mobile-color-controller-impl.cpp with 97% similarity]
adaptors/mobile/mobile-native-buffer-render-surface.cpp [moved from adaptors/tizen/internal/mobile/mobile-native-buffer-render-surface.cpp with 97% similarity]
adaptors/mobile/mobile-native-buffer-render-surface.h [moved from adaptors/tizen/internal/mobile/mobile-native-buffer-render-surface.h with 93% similarity]
adaptors/mobile/mobile-render-surface-factory.cpp [moved from adaptors/tizen/internal/mobile/mobile-render-surface-factory.cpp with 95% similarity]
adaptors/mobile/mobile-render-surface-factory.h [moved from adaptors/tizen/internal/mobile/mobile-render-surface-factory.h with 99% similarity]
adaptors/mobile/mobile-system-settings.cpp [moved from adaptors/tizen/internal/mobile/mobile-system-settings.cpp with 96% similarity]
adaptors/mobile/native-buffer-plugin-impl.cpp [moved from adaptors/tizen/internal/mobile/native-buffer-plugin-impl.cpp with 90% similarity]
adaptors/mobile/native-buffer-plugin-impl.h [moved from adaptors/tizen/internal/mobile/native-buffer-plugin-impl.h with 94% similarity]
adaptors/mobile/native-buffer-plugin.cpp [moved from adaptors/tizen/public-api/adaptor-framework/mobile/native-buffer-plugin.cpp with 95% similarity]
adaptors/public-api/accessibility-action-handler.h [moved from adaptors/tizen/public-api/adaptor-framework/common/accessibility-action-handler.h with 100% similarity]
adaptors/public-api/accessibility-gesture-handler.h [moved from adaptors/tizen/public-api/adaptor-framework/common/accessibility-gesture-handler.h with 100% similarity]
adaptors/public-api/accessibility-manager.h [moved from capi/dali/public-api/adaptor-framework/common/accessibility-manager.h with 100% similarity]
adaptors/public-api/adaptor.h [moved from capi/dali/public-api/adaptor-framework/common/adaptor.h with 98% similarity]
adaptors/public-api/application.h [moved from adaptors/tizen/public-api/adaptor-framework/application.h with 97% similarity]
adaptors/public-api/clipboard-event-notifier.h [moved from capi/dali/public-api/adaptor-framework/common/clipboard-event-notifier.h with 100% similarity]
adaptors/public-api/clipboard.h [moved from capi/dali/public-api/adaptor-framework/common/clipboard.h with 100% similarity]
adaptors/public-api/color-controller.h [moved from adaptors/tizen/public-api/adaptor-framework/common/color-controller.h with 100% similarity]
adaptors/public-api/dali-adaptor-doc.h [moved from capi/dali-adaptor-doc.h with 100% similarity]
adaptors/public-api/dali.h [new file with mode: 0644]
adaptors/public-api/device-layout.h [moved from capi/dali/public-api/adaptor-framework/common/device-layout.h with 100% similarity]
adaptors/public-api/drag-and-drop-detector.h [moved from capi/dali/public-api/adaptor-framework/common/drag-and-drop-detector.h with 100% similarity]
adaptors/public-api/evas-plugin.h [moved from capi/dali/public-api/adaptor-framework/evas-plugin.h with 100% similarity]
adaptors/public-api/event-feeder.h [moved from adaptors/tizen/public-api/adaptor-framework/common/event-feeder.h with 100% similarity]
adaptors/public-api/feedback-plugin.h [moved from adaptors/tizen/public-api/adaptor-framework/common/feedback-plugin.h with 100% similarity]
adaptors/public-api/file.list [new file with mode: 0644]
adaptors/public-api/haptic-player.h [moved from capi/dali/public-api/adaptor-framework/common/haptic-player.h with 100% similarity]
adaptors/public-api/imf-manager.h [moved from capi/dali/public-api/adaptor-framework/common/imf-manager.h with 100% similarity]
adaptors/public-api/key.h [moved from capi/dali/public-api/adaptor-framework/common/key.h with 100% similarity]
adaptors/public-api/livebox-plugin.h [moved from adaptors/tizen/public-api/adaptor-framework/livebox-plugin.h with 99% similarity]
adaptors/public-api/native-buffer-plugin.h [moved from capi/dali/public-api/adaptor-framework/native-buffer-plugin.h with 98% similarity]
adaptors/public-api/orientation.h [moved from capi/dali/public-api/adaptor-framework/common/orientation.h with 100% similarity]
adaptors/public-api/physical-keyboard.h [moved from adaptors/tizen/public-api/adaptor-framework/common/physical-keyboard.h with 100% similarity]
adaptors/public-api/pixmap-image.h [moved from capi/dali/public-api/adaptor-framework/common/pixmap-image.h with 100% similarity]
adaptors/public-api/render-surface.h [moved from capi/dali/public-api/adaptor-framework/common/render-surface.h with 100% similarity]
adaptors/public-api/sound-player.h [moved from capi/dali/public-api/adaptor-framework/common/sound-player.h with 100% similarity]
adaptors/public-api/style-change.h [moved from capi/dali/public-api/adaptor-framework/common/style-change.h with 100% similarity]
adaptors/public-api/style-monitor.h [moved from capi/dali/public-api/adaptor-framework/common/style-monitor.h with 98% similarity]
adaptors/public-api/tilt-sensor.h [moved from adaptors/tizen/public-api/adaptor-framework/common/tilt-sensor.h with 100% similarity]
adaptors/public-api/timer.h [moved from capi/dali/public-api/adaptor-framework/common/timer.h with 100% similarity]
adaptors/public-api/tts-player.h [moved from capi/dali/public-api/adaptor-framework/common/tts-player.h with 100% similarity]
adaptors/public-api/virtual-keyboard.h [moved from capi/dali/public-api/adaptor-framework/common/virtual-keyboard.h with 100% similarity]
adaptors/public-api/window.h [moved from capi/dali/public-api/adaptor-framework/common/window.h with 100% similarity]
adaptors/scripts/dalireslog.sh [moved from adaptors/tizen/scripts/dalireslog.sh with 100% similarity]
adaptors/scripts/dalireslog.txt [moved from adaptors/tizen/scripts/dalireslog.txt with 100% similarity]
adaptors/scripts/parse.rb [moved from adaptors/tizen/scripts/parse.rb with 100% similarity]
adaptors/tizen/internal/application-file.list [deleted file]
adaptors/tizen/internal/common/file.list [deleted file]
adaptors/tizen/internal/livebox-plugin-impl.cpp [deleted file]
adaptors/tizen/internal/livebox-plugin-impl.h [deleted file]
adaptors/tizen/internal/mobile/application-file.list [deleted file]
adaptors/tizen/internal/mobile/file.list [deleted file]
adaptors/tizen/internal/tv/file.list [deleted file]
adaptors/tizen/public-api/adaptor-framework/application-file.list [deleted file]
adaptors/tizen/public-api/adaptor-framework/mobile/application-file.list [deleted file]
adaptors/tizen/public-api/dali.h [deleted file]
adaptors/tizen/public-api/file.list [deleted file]
adaptors/tv/file.list [new file with mode: 0644]
adaptors/tv/tv-color-controller-impl.cpp [moved from adaptors/tizen/internal/tv/tv-color-controller-impl.cpp with 96% similarity]
adaptors/tv/tv-key-impl.cpp [moved from adaptors/tizen/internal/tv/tv-key-impl.cpp with 99% similarity]
adaptors/tv/tv-render-surface-factory.cpp [moved from adaptors/tizen/internal/tv/tv-render-surface-factory.cpp with 93% similarity]
adaptors/tv/tv-system-settings.cpp [moved from adaptors/tizen/internal/tv/tv-system-settings.cpp with 95% similarity]
adaptors/wayland/accessibility-manager-impl-wl.cpp [new file with mode: 0644]
adaptors/wayland/clipboard-impl-wl.cpp [new file with mode: 0644]
adaptors/wayland/clipboard-impl.h [new file with mode: 0644]
adaptors/wayland/ecore-wl-render-surface-factory.cpp [new file with mode: 0644]
adaptors/wayland/ecore-wl-render-surface-factory.h [new file with mode: 0644]
adaptors/wayland/ecore-wl-render-surface.cpp [new file with mode: 0644]
adaptors/wayland/ecore-wl-render-surface.h [new file with mode: 0644]
adaptors/wayland/ecore-wl-types.h [new file with mode: 0644]
adaptors/wayland/egl-implementation-wl.cpp [moved from adaptors/tizen/internal/common/gl/egl-implementation.cpp with 99% similarity]
adaptors/wayland/event-handler-wl.cpp [new file with mode: 0644]
adaptors/wayland/file.list [new file with mode: 0644]
adaptors/wayland/framework-wl.cpp [new file with mode: 0644]
adaptors/wayland/imf-manager-impl-wl.cpp [new file with mode: 0644]
adaptors/wayland/imf-manager-impl.h [new file with mode: 0644]
adaptors/wayland/key-impl-wl.cpp [new file with mode: 0644]
adaptors/wayland/pixmap-image-impl-wl.cpp [new file with mode: 0644]
adaptors/wayland/pixmap-image-impl.h [new file with mode: 0644]
adaptors/wayland/pixmap-render-surface-wl.cpp [new file with mode: 0644]
adaptors/wayland/pixmap-render-surface.h [new file with mode: 0644]
adaptors/wayland/server-connection-wl.cpp [new file with mode: 0644]
adaptors/wayland/system-settings-wl.cpp [new file with mode: 0644]
adaptors/wayland/virtual-keyboard-impl-wl.cpp [new file with mode: 0644]
adaptors/wayland/window-impl-wl.cpp [new file with mode: 0644]
adaptors/wayland/window-render-surface-wl.cpp [new file with mode: 0644]
adaptors/wayland/window-render-surface.h [new file with mode: 0644]
adaptors/x11/accessibility-manager-impl-x.cpp [moved from adaptors/tizen/internal/common/accessibility-manager-impl.cpp with 64% similarity]
adaptors/x11/clipboard-impl-x.cpp [moved from adaptors/tizen/internal/common/clipboard-impl.cpp with 85% similarity]
adaptors/x11/clipboard-impl.h [moved from adaptors/tizen/internal/common/clipboard-impl.h with 97% similarity]
adaptors/x11/ecore-x-render-surface-factory.cpp [moved from adaptors/tizen/internal/common/ecore-x/ecore-x-render-surface-factory.cpp with 96% similarity]
adaptors/x11/ecore-x-render-surface-factory.h [moved from adaptors/tizen/internal/common/ecore-x/ecore-x-render-surface-factory.h with 97% similarity]
adaptors/x11/ecore-x-render-surface.cpp [moved from adaptors/tizen/internal/common/ecore-x/ecore-x-render-surface.cpp with 98% similarity]
adaptors/x11/ecore-x-render-surface.h [moved from adaptors/tizen/internal/common/ecore-x/ecore-x-render-surface.h with 97% similarity]
adaptors/x11/ecore-x-types.h [moved from adaptors/tizen/internal/common/ecore-x/ecore-x-types.h with 100% similarity]
adaptors/x11/ecore-x-window-interface.cpp [moved from adaptors/tizen/internal/common/ecore-x/ecore-x-window-interface.cpp with 98% similarity]
adaptors/x11/ecore-x-window-interface.h [moved from adaptors/tizen/internal/common/ecore-x/ecore-x-window-interface.h with 98% similarity]
adaptors/x11/egl-implementation-x.cpp [new file with mode: 0644]
adaptors/x11/event-handler-x.cpp [moved from adaptors/tizen/internal/common/events/event-handler.cpp with 99% similarity]
adaptors/x11/file.list [new file with mode: 0644]
adaptors/x11/framework-x.cpp [new file with mode: 0644]
adaptors/x11/imf-manager-impl-x.cpp [moved from adaptors/tizen/internal/common/imf-manager-impl.cpp with 98% similarity]
adaptors/x11/imf-manager-impl.h [moved from adaptors/tizen/internal/common/imf-manager-impl.h with 98% similarity]
adaptors/x11/key-impl-x.cpp [moved from adaptors/tizen/internal/common/key-impl.cpp with 100% similarity]
adaptors/x11/pixmap-image-impl-x.cpp [moved from adaptors/tizen/internal/common/pixmap-image-impl.cpp with 98% similarity]
adaptors/x11/pixmap-image-impl.h [moved from adaptors/tizen/internal/common/pixmap-image-impl.h with 98% similarity]
adaptors/x11/pixmap-render-surface-x.cpp [moved from adaptors/tizen/internal/common/ecore-x/pixmap-render-surface.cpp with 97% similarity]
adaptors/x11/pixmap-render-surface.h [moved from adaptors/tizen/internal/common/ecore-x/pixmap-render-surface.h with 91% similarity]
adaptors/x11/server-connection-x.cpp [new file with mode: 0644]
adaptors/x11/system-settings-x.cpp [moved from adaptors/tizen/internal/common/system-settings.cpp with 93% similarity]
adaptors/x11/virtual-keyboard-impl-x.cpp [new file with mode: 0644]
adaptors/x11/window-impl-x.cpp [new file with mode: 0644]
adaptors/x11/window-render-surface-x.cpp [moved from adaptors/tizen/internal/common/ecore-x/window-render-surface.cpp with 98% similarity]
adaptors/x11/window-render-surface.h [moved from adaptors/tizen/internal/common/ecore-x/window-render-surface.h with 92% similarity]
build/tizen/common/Makefile.am
build/tizen/configure.ac
build/tizen/dali-adaptor/Makefile.am
build/tizen/dali-adaptor/linker-test.cpp
build/tizen/dali-application/Makefile.am
build/tizen/dali-application/linker-test.cpp
build/tizen/dali-evas/Makefile.am
build/tizen/dali-evas/linker-test.cpp
build/tizen/dali-native-buffer/Makefile.am
build/tizen/dali-native-buffer/linker-test.cpp
build/tizen/plugins/Makefile.am
capi/dali/public-api/dali-adaptor-capi-internal.h [deleted file]
capi/dali/public-api/file.list [deleted file]
dali-adaptor.manifest
packaging/dali-adaptor.spec
plugins/dali-feedback.h

index 145983c..5ed86a6 100644 (file)
@@ -27,7 +27,7 @@
 #include <base/interfaces/performance-interface.h>
 #include <base/interfaces/vsync-monitor-interface.h>
 #include <base/interfaces/kernel-trace-interface.h>
-#include <internal/common/render-surface-impl.h> // @todo move to base/interfaces
+#include <render-surface-impl.h> // @todo move to base/interfaces
 
 
 namespace Dali
index bedad6d..9e706c2 100644 (file)
@@ -23,7 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <base/interfaces/egl-interface.h>
-#include <internal/common/render-surface-impl.h> // needed for Dali::Internal::Adaptor::RenderSurface
+#include <render-surface-impl.h> // needed for Dali::Internal::Adaptor::RenderSurface
 
 
 namespace Dali
similarity index 97%
rename from adaptors/tizen/internal/abort-handler.h
rename to adaptors/common/abort-handler.h
index 072aa88..64bd035 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #include <signal.h>
-#include "public-api/adaptor-framework/application.h"
+#include "application.h"
 
 namespace Dali
 {
@@ -22,7 +22,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/events/gesture-requests.h>
-#include <internal/common/accessibility-manager-impl.h>
+#include <accessibility-manager-impl.h>
 
 namespace Dali
 {
@@ -21,9 +21,9 @@
 // EXTERNAL INCLUDES
 
 // INTERNAL INCLUDES
-#include <internal/common/events/pan-gesture-detector-base.h>
-#include <internal/common/adaptor-impl.h>
-#include <public-api/adaptor-framework/common/accessibility-gesture-handler.h>
+#include <events/pan-gesture-detector-base.h>
+#include <adaptor-impl.h>
+#include <accessibility-gesture-handler.h>
 
 namespace Dali
 {
diff --git a/adaptors/common/accessibility-manager-impl.cpp b/adaptors/common/accessibility-manager-impl.cpp
new file mode 100644 (file)
index 0000000..9cd164f
--- /dev/null
@@ -0,0 +1,313 @@
+/*
+ * 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 "accessibility-manager-impl.h"
+
+// EXTERNAL INCLUDES
+#include <vconf.h>
+
+#include <dali/public-api/dali-core.h>
+#include <dali/integration-api/debug.h>
+#include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/events/gesture-requests.h>
+#include "system-settings.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gAccessibilityManagerLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_ACCESSIBILITY_MANAGER");
+#endif
+
+void AccessibilityOnOffNotification(keynode_t* node, void* data)
+{
+  AccessibilityManager* manager = static_cast<AccessibilityManager*>(data);
+  int isEnabled = 0;
+  vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled);
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled?"ENABLED":"DISABLED");
+
+  if(isEnabled == 1)
+  {
+    manager->EnableAccessibility();
+  }
+  else
+  {
+    manager->DisableAccessibility();
+  }
+}
+
+BaseHandle Create()
+{
+  BaseHandle handle( AccessibilityManager::Get() );
+
+  if ( !handle && Adaptor::IsAvailable() )
+  {
+    Adaptor& adaptorImpl( Adaptor::GetImplementation( Adaptor::Get() ) );
+    Dali::AccessibilityManager manager = Dali::AccessibilityManager( new AccessibilityManager() );
+    adaptorImpl.RegisterSingleton( typeid( manager ), manager );
+    handle = manager;
+  }
+
+  return handle;
+}
+TypeRegistration ACCESSIBILITY_MANAGER_TYPE( typeid(Dali::AccessibilityManager), typeid(Dali::BaseHandle), Create, true /* Create Instance At Startup */ );
+
+} // unnamed namespace
+
+Dali::AccessibilityManager AccessibilityManager::Get()
+{
+  Dali::AccessibilityManager manager;
+
+  if ( Adaptor::IsAvailable() )
+  {
+    // Check whether the singleton is already created
+    Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Dali::AccessibilityManager ) );
+    if(handle)
+    {
+      // If so, downcast the handle
+      manager = Dali::AccessibilityManager( dynamic_cast< AccessibilityManager* >( handle.GetObjectPtr() ) );
+    }
+  }
+
+  return manager;
+}
+
+Vector2 AccessibilityManager::GetReadPosition() const
+{
+  return mReadPosition;
+}
+
+void AccessibilityManager::SetActionHandler(AccessibilityActionHandler& handler)
+{
+  mActionHandler = &handler;
+}
+
+void AccessibilityManager::SetGestureHandler(AccessibilityGestureHandler& handler)
+{
+  if( mAccessibilityGestureDetector )
+  {
+    mAccessibilityGestureDetector->SetGestureHandler(handler);
+  }
+}
+
+bool AccessibilityManager::HandleActionClearFocusEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionClearFocus signal in first, ClearAccessibilityFocus for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionClearFocusSignalV2.Empty() )
+    {
+      mActionClearFocusSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->ClearAccessibilityFocus();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  Dali::TouchEvent touchEvent(timeStamp);
+  touchEvent.points.push_back(point);
+
+  /*
+   * In order to application decide touch action first,
+   * emit ActionScroll signal in first, AccessibilityActionScroll  for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionScrollSignalV2.Empty() )
+    {
+      mActionScrollSignalV2.Emit( handle, touchEvent );
+    }
+  }
+
+  Integration::TouchEvent event;
+  if (mCombiner.GetNextTouchEvent(point, timeStamp, event))
+  {
+    // Process the touch event in accessibility gesture detector
+    if( mAccessibilityGestureDetector )
+    {
+      mAccessibilityGestureDetector->SendEvent(event);
+      ret = true;
+    }
+  }
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
+{
+  bool ret = false;
+
+  Dali::TouchEvent touchEvent(timeStamp);
+  touchEvent.points.push_back(point);
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionTouch(touchEvent);
+  }
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionBackEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionBack signal in first, AccessibilityActionBack for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionBackSignalV2.Empty() )
+    {
+      mActionBackSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionBack();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+void AccessibilityManager::HandleActionEnableEvent()
+{
+  EnableAccessibility();
+}
+
+void AccessibilityManager::HandleActionDisableEvent()
+{
+  DisableAccessibility();
+}
+
+void AccessibilityManager::EnableAccessibility()
+{
+  if(mIsEnabled == false)
+  {
+    mIsEnabled = true;
+
+    if( mActionHandler )
+    {
+      mActionHandler->ChangeAccessibilityStatus();
+    }
+
+    //emit status changed signal
+    Dali::AccessibilityManager handle( this );
+    mStatusChangedSignalV2.Emit( handle );
+  }
+}
+
+void AccessibilityManager::DisableAccessibility()
+{
+  if(mIsEnabled == true)
+  {
+    mIsEnabled = false;
+
+    if( mActionHandler )
+    {
+      mActionHandler->ChangeAccessibilityStatus();
+    }
+
+    //emit status changed signal
+    Dali::AccessibilityManager handle( this );
+    mStatusChangedSignalV2.Emit( handle );
+
+    // Destroy the TtsPlayer if exists.
+    Dali::Adaptor& adaptor = Dali::Adaptor::Get();
+    Adaptor::GetImplementation(adaptor).DestroyTtsPlayer(Dali::TtsPlayer::SCREEN_READER);
+  }
+}
+
+bool AccessibilityManager::IsEnabled() const
+{
+  return mIsEnabled;
+}
+
+void AccessibilityManager::SetIndicator(Indicator* indicator)
+{
+  mIndicator = indicator;
+}
+
+AccessibilityManager::AccessibilityManager()
+: mIsEnabled(false),
+  mActionHandler(NULL),
+  mIndicator(NULL),
+  mIndicatorFocused(false)
+{
+  int isEnabled = 0;
+  vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled);
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled?"ENABLED":"DISABLED");
+
+  if(isEnabled == 1)
+  {
+    mIsEnabled = true;
+  }
+  else
+  {
+    mIsEnabled = false;
+  }
+
+  vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification, this );
+
+  mAccessibilityGestureDetector = new AccessibilityGestureDetector();
+}
+
+AccessibilityManager::~AccessibilityManager()
+{
+  vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification );
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/events/touch-point.h>
 #include <dali/integration-api/events/touch-event-combiner.h>
-#include <dali/public-api/adaptor-framework/common/accessibility-manager.h>
+#include <accessibility-manager.h>
 
 // INTERNAL INCLUDES
-#include <public-api/adaptor-framework/common/accessibility-action-handler.h>
-#include <public-api/adaptor-framework/common/accessibility-gesture-handler.h>
-#include <internal/common/indicator-impl.h>
-#include <internal/common/accessibility-gesture-detector.h>
+#include <accessibility-action-handler.h>
+#include <accessibility-gesture-handler.h>
+#include <indicator-impl.h>
+#include <accessibility-gesture-detector.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/accessibility-manager.h>
+#include <accessibility-manager.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/accessibility-manager-impl.h>
+#include <accessibility-manager-impl.h>
 
 namespace Dali
 {
similarity index 95%
rename from adaptors/tizen/internal/common/adaptor-impl.cpp
rename to adaptors/common/adaptor-impl.cpp
index ad5f4b3..8701c81 100644 (file)
 #include <base/performance-logging/performance-interface-factory.h>
 #include <base/lifecycle-observer.h>
 
-#include <internal/common/callback-manager.h>
-#include <internal/common/trigger-event.h>
-#include <internal/common/render-surface-impl.h>
-#include <internal/common/tts-player-impl.h>
-#include <internal/common/accessibility-manager-impl.h>
-#include <internal/common/timer-impl.h>
-#include <internal/common/events/gesture-manager.h>
-#include <internal/common/events/event-handler.h>
-#include <internal/common/feedback/feedback-controller.h>
-#include <internal/common/feedback/feedback-plugin-proxy.h>
-#include <internal/common/gl/gl-implementation.h>
-#include <internal/common/gl/gl-proxy-implementation.h>
-#include <internal/common/gl/egl-sync-implementation.h>
-#include <internal/common/gl/egl-image-extensions.h>
-#include <internal/common/gl/egl-factory.h>
-#include <internal/common/imf-manager-impl.h>
-#include <internal/common/clipboard-impl.h>
-#include <internal/common/vsync-monitor.h>
-#include <internal/common/object-profiler.h>
+#include <callback-manager.h>
+#include <trigger-event.h>
+#include <render-surface-impl.h>
+#include <tts-player-impl.h>
+#include <accessibility-manager-impl.h>
+#include <timer-impl.h>
+#include <events/gesture-manager.h>
+#include <events/event-handler.h>
+#include <feedback/feedback-controller.h>
+#include <feedback/feedback-plugin-proxy.h>
+#include <gl/gl-proxy-implementation.h>
+#include <gl/gl-implementation.h>
+#include <gl/egl-sync-implementation.h>
+#include <gl/egl-image-extensions.h>
+#include <gl/egl-factory.h>
+#include <imf-manager-impl.h>
+#include <clipboard-impl.h>
+#include <vsync-monitor.h>
+#include <object-profiler.h>
 
 #include <slp-logging.h>
 
similarity index 96%
rename from adaptors/tizen/internal/common/adaptor-impl.h
rename to adaptors/common/adaptor-impl.h
index da71746..fa068e2 100644 (file)
 #include <dali/public-api/math/rect.h>
 #include <dali/integration-api/render-controller.h>
 
-#include <dali/public-api/adaptor-framework/common/adaptor.h>
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
-#include <dali/public-api/adaptor-framework/common/tts-player.h>
-#include <dali/public-api/adaptor-framework/common/imf-manager.h>
-#include <dali/public-api/adaptor-framework/common/device-layout.h>
-#include <dali/public-api/adaptor-framework/common/clipboard.h>
+#include <adaptor.h>
+#include <render-surface.h>
+#include <tts-player.h>
+#include <imf-manager.h>
+#include <device-layout.h>
+#include <clipboard.h>
 
 #include <slp-platform-abstraction.h>
 #include <base/interfaces/adaptor-internal-services.h>
 #include <base/environment-options.h>
 #include <base/core-event-interface.h>
-#include <internal/common/drag-and-drop-detector-impl.h>
-#include <internal/common/damage-observer.h>
-#include <internal/common/window-visibility-observer.h>
-#include <internal/common/kernel-trace.h>
-#include <internal/common/trigger-event-factory.h>
+#include <drag-and-drop-detector-impl.h>
+#include <damage-observer.h>
+#include <window-visibility-observer.h>
+#include <kernel-trace.h>
+#include <trigger-event-factory.h>
 
 namespace Dali
 {
similarity index 83%
rename from adaptors/tizen/public-api/adaptor-framework/common/adaptor.cpp
rename to adaptors/common/adaptor.cpp
index 37ce204..1f54f67 100644 (file)
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/adaptor.h>
+#include <adaptor.h>
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
-#include <dali/public-api/adaptor-framework/common/accessibility-manager.h>
-#include <dali/public-api/adaptor-framework/common/imf-manager.h>
-#include <dali/public-api/adaptor-framework/common/style-monitor.h>
-#include <dali/public-api/adaptor-framework/common/window.h>
+#include <accessibility-manager.h>
+#include <imf-manager.h>
+#include <style-monitor.h>
+#include <window.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/adaptor-impl.h>
-#include <internal/common/render-surface-impl.h>
-#include <internal/common/window-impl.h>
+#include <adaptor-impl.h>
+#include <render-surface-impl.h>
+#include <window-impl.h>
 
 namespace Dali
 {
similarity index 97%
rename from adaptors/tizen/internal/application-impl.cpp
rename to adaptors/common/application-impl.cpp
index 38bd83a..79a666a 100644 (file)
 #include "application-impl.h"
 
 // EXTERNAL INCLUDES
-#include <Ecore_X.h>
 #include <dali/integration-api/debug.h>
-#include <dali/public-api/adaptor-framework/common/style-monitor.h>
+#include <style-monitor.h>
 
 // INTERNAL INCLUDES
-#include <internal/command-line-options.h>
-#include <internal/common/adaptor-impl.h>
-#include <internal/common/ecore-x/ecore-x-render-surface.h>
+#include <command-line-options.h>
+#include <common/adaptor-impl.h>
 
 namespace Dali
 {
similarity index 98%
rename from adaptors/tizen/internal/application-impl.h
rename to adaptors/common/application-impl.h
index 191af05..44d4362 100644 (file)
 #include <dali/public-api/object/base-object.h>
 
 // INTERNAL INCLUDES
-#include <public-api/adaptor-framework/application.h>
+#include <application.h>
 
-#include <internal/framework.h>
-#include <internal/common/window-impl.h>
+#include <framework.h>
+#include <window-impl.h>
 
 namespace Dali
 {
 #include "application.h"
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/common/orientation.h>
+#include <orientation.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/application-impl.h>
-#include <internal/common/orientation-impl.h>
+#include <application-impl.h>
+#include <orientation-impl.h>
 
 namespace Dali
 {
@@ -22,7 +22,7 @@
 #include <dali/public-api/dali-core.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/adaptor-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
@@ -22,7 +22,7 @@
 #include <string>
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/public-api/adaptor-framework/common/clipboard-event-notifier.h>
+#include <clipboard-event-notifier.h>
 
 // INTERNAL INCLUDES
 
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/clipboard-event-notifier.h>
+#include <clipboard-event-notifier.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/clipboard-event-notifier-impl.h>
+#include <clipboard-event-notifier-impl.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/clipboard.h>
+#include <clipboard.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/clipboard-impl.h>
+#include <clipboard-impl.h>
 
 namespace Dali
 {
@@ -19,7 +19,7 @@
  */
 
 #include <dali/public-api/object/base-object.h>
-#include <public-api/adaptor-framework/common/color-controller.h>
+#include <color-controller.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <public-api/adaptor-framework/common/color-controller.h>
+#include <color-controller.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/color-controller-impl.h>
+#include <color-controller-impl.h>
 
 namespace Dali
 {
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/device-layout.h>
+#include <device-layout.h>
 
 namespace Dali
 {
@@ -23,7 +23,7 @@
 
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/public-api/adaptor-framework/common/drag-and-drop-detector.h>
+#include <drag-and-drop-detector.h>
 
 // INTERNAL INCLUDES
 
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/drag-and-drop-detector.h>
+#include <drag-and-drop-detector.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/drag-and-drop-detector-impl.h>
+#include <drag-and-drop-detector-impl.h>
 
 namespace Dali
 {
@@ -23,7 +23,7 @@
 #include <list>
 
 // INTERNAL INCLUDES
-#include <internal/common/callback-manager.h>
+#include <callback-manager.h>
 
 
 namespace Dali
  */
 
 // HEADER
-#include <public-api/adaptor-framework/common/event-feeder.h>
+#include <event-feeder.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/adaptor-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/events/touch-event-combiner.h>
-#include <dali/public-api/adaptor-framework/common/style-monitor.h>
+#include <style-monitor.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/damage-observer.h>
-#include <internal/common/drag-and-drop-detector-impl.h>
-#include <internal/common/accessibility-manager-impl.h>
-#include <internal/common/clipboard-event-notifier-impl.h>
-#include <internal/common/imf-manager-impl.h>
-#include <internal/common/rotation-observer.h>
+#include <damage-observer.h>
+#include <drag-and-drop-detector-impl.h>
+#include <accessibility-manager-impl.h>
+#include <clipboard-event-notifier-impl.h>
+#include <imf-manager-impl.h>
+#include <rotation-observer.h>
 
 namespace Dali
 {
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/events/gesture-detector.h>
-#include <internal/common/events/long-press-gesture-detector.h>
-#include <internal/common/events/pan-gesture-detector.h>
-#include <internal/common/events/pinch-gesture-detector.h>
-#include <internal/common/events/tap-gesture-detector.h>
+#include <events/gesture-detector.h>
+#include <events/long-press-gesture-detector.h>
+#include <events/pan-gesture-detector.h>
+#include <events/pinch-gesture-detector.h>
+#include <events/tap-gesture-detector.h>
 #include <base/core-event-interface.h>
 
 namespace Dali
@@ -24,7 +24,7 @@
 #include <dali/integration-api/gesture-manager.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/events/gesture-detector.h>
+#include <events/gesture-detector.h>
 
 namespace Dali
 {
@@ -28,7 +28,7 @@
 #include <dali/integration-api/events/long-press-gesture-event.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 
-#include <internal/common/system-settings.h>
+#include <system-settings.h>
 
 // INTERNAL INCLUDES
 #include <base/core-event-interface.h>
 
 // EXTERNAL INCLUDES
 #include <map>
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <timer.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/events/gesture-detector.h>
+#include <events/gesture-detector.h>
 
 namespace Dali
 {
@@ -24,7 +24,7 @@
 #include <dali/integration-api/events/pan-gesture-event.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/events/gesture-detector.h>
+#include <events/gesture-detector.h>
 
 namespace Dali
 {
@@ -23,7 +23,7 @@
 #include <dali/public-api/math/vector2.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/events/pan-gesture-detector-base.h>
+#include <events/pan-gesture-detector-base.h>
 #include <dali/integration-api/events/pan-gesture-event.h>
 
 namespace Dali
@@ -22,7 +22,7 @@
 #include <dali/public-api/common/vector-wrapper.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/events/gesture-detector.h>
+#include <events/gesture-detector.h>
 
 namespace Dali
 {
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <timer.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/events/gesture-detector.h>
+#include <events/gesture-detector.h>
 
 namespace Dali
 {
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include <internal/common/feedback/feedback-controller.h>
+#include <feedback/feedback-controller.h>
 
 // EXTERNAL INCLUDES
 #include <sstream>
@@ -27,8 +27,8 @@
 #include <dali/public-api/object/object-registry.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/feedback/feedback-ids.h>
-#include <internal/common/feedback/feedback-plugin-proxy.h>
+#include <feedback/feedback-ids.h>
+#include <feedback/feedback-plugin-proxy.h>
 
 using std::string;
 using boost::property_tree::ptree;
 // EXTERNAL INCLUDES
 #include <map>
 #include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/adaptor-framework/common/style-monitor.h>
+#include <style-monitor.h>
 
 // INTERNAL INCLUDES
-#include <public-api/adaptor-framework/common/feedback-plugin.h>
-#include <internal/common/feedback/feedback-ids.h>
+#include <feedback-plugin.h>
+#include <feedback/feedback-ids.h>
 
 namespace Dali
 {
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include <internal/common/feedback/feedback-plugin-proxy.h>
+#include <feedback/feedback-plugin-proxy.h>
 
 // EXTERNAL INCLUDES
 #include <dlfcn.h>
@@ -19,7 +19,7 @@
  */
 
 // INTERNAL INCLUDES
-#include <public-api/adaptor-framework/common/feedback-plugin.h>
+#include <feedback-plugin.h>
 
 namespace Dali
 {
diff --git a/adaptors/common/file.list b/adaptors/common/file.list
new file mode 100644 (file)
index 0000000..0e8243a
--- /dev/null
@@ -0,0 +1,85 @@
+# Common
+
+adaptor_common_src_files = \
+  $(adaptor_common_dir)/accessibility-manager.cpp \
+  $(adaptor_common_dir)/adaptor.cpp \
+  $(adaptor_common_dir)/color-controller.cpp \
+  $(adaptor_common_dir)/clipboard.cpp \
+  $(adaptor_common_dir)/clipboard-event-notifier.cpp \
+  $(adaptor_common_dir)/device-layout.cpp \
+  $(adaptor_common_dir)/drag-and-drop-detector.cpp \
+  $(adaptor_common_dir)/event-feeder.cpp \
+  $(adaptor_common_dir)/haptic-player.cpp \
+  $(adaptor_common_dir)/imf-manager.cpp \
+  $(adaptor_common_dir)/key.cpp \
+  $(adaptor_common_dir)/orientation.cpp \
+  $(adaptor_common_dir)/physical-keyboard.cpp \
+  $(adaptor_common_dir)/pixmap-image.cpp \
+  $(adaptor_common_dir)/render-surface.cpp \
+  $(adaptor_common_dir)/sound-player.cpp \
+  $(adaptor_common_dir)/style-monitor.cpp \
+  $(adaptor_common_dir)/tilt-sensor.cpp \
+  $(adaptor_common_dir)/timer.cpp \
+  $(adaptor_common_dir)/tts-player.cpp \
+  $(adaptor_common_dir)/virtual-keyboard.cpp \
+  $(adaptor_common_dir)/window.cpp
+
+adaptor_application_src_files = \
+  $(adaptor_common_dir)/application.cpp
+
+adaptor_application_internal_src_files = \
+  $(adaptor_common_dir)/application-impl.cpp \
+  $(adaptor_common_dir)/framework.cpp \
+  $(adaptor_common_dir)/command-line-options.cpp \
+  $(adaptor_common_dir)/abort-handler.cpp
+
+adaptor_common_internal_src_files = \
+  $(adaptor_common_dir)/accessibility-gesture-detector.cpp \
+  $(adaptor_common_dir)/accessibility-manager-impl.cpp \
+  $(adaptor_common_dir)/adaptor-impl.cpp \
+  $(adaptor_common_dir)/clipboard-event-notifier-impl.cpp \
+  $(adaptor_common_dir)/drag-and-drop-detector-impl.cpp \
+  $(adaptor_common_dir)/ecore-callback-manager.cpp \
+  $(adaptor_common_dir)/file-descriptor-monitor.cpp \
+  $(adaptor_common_dir)/haptic-player-impl.cpp \
+  $(adaptor_common_dir)/indicator-impl.cpp  \
+  $(adaptor_common_dir)/indicator-buffer.cpp  \
+  $(adaptor_common_dir)/kernel-trace.cpp  \
+  $(adaptor_common_dir)/locale-utils.cpp  \
+  $(adaptor_common_dir)/native-bitmap-buffer-impl.cpp \
+  $(adaptor_common_dir)/object-profiler.cpp \
+  $(adaptor_common_dir)/orientation-impl.cpp  \
+  $(adaptor_common_dir)/physical-keyboard-impl.cpp \
+  $(adaptor_common_dir)/render-surface-impl.cpp \
+  $(adaptor_common_dir)/server-connection.cpp \
+  $(adaptor_common_dir)/shared-file.cpp \
+  $(adaptor_common_dir)/sound-player-impl.cpp \
+  $(adaptor_common_dir)/style-monitor-impl.cpp \
+  $(adaptor_common_dir)/tilt-sensor-impl.cpp  \
+  $(adaptor_common_dir)/timer-impl.cpp \
+  $(adaptor_common_dir)/trigger-event.cpp \
+  $(adaptor_common_dir)/trigger-event-factory.cpp \
+  $(adaptor_common_dir)/tts-player-impl.cpp \
+  $(adaptor_common_dir)/virtual-keyboard-impl.cpp \
+  $(adaptor_common_dir)/vsync-monitor.cpp \
+  \
+  $(adaptor_common_dir)/events/gesture-manager.cpp \
+  $(adaptor_common_dir)/events/long-press-gesture-detector.cpp \
+  $(adaptor_common_dir)/events/pan-gesture-detector-base.cpp \
+  $(adaptor_common_dir)/events/pan-gesture-detector.cpp \
+  $(adaptor_common_dir)/events/pinch-gesture-detector.cpp \
+  $(adaptor_common_dir)/events/tap-gesture-detector.cpp \
+  \
+  $(adaptor_common_dir)/feedback/feedback-controller.cpp \
+  $(adaptor_common_dir)/feedback/feedback-plugin-proxy.cpp \
+  \
+  $(adaptor_common_dir)/gl/egl-factory.cpp \
+  $(adaptor_common_dir)/gl/egl-image-extensions.cpp \
+  $(adaptor_common_dir)/gl/egl-sync-implementation.cpp \
+  $(adaptor_common_dir)/gl/gl-proxy-implementation.cpp \
+  $(adaptor_common_dir)/gl/gl-extensions.cpp
+
+adaptor_common_internal_profile_src_files = \
+  $(adaptor_common_dir)/color-controller-impl.cpp \
+  $(adaptor_common_dir)/system-settings.cpp
+
similarity index 98%
rename from adaptors/tizen/internal/framework.cpp
rename to adaptors/common/framework.cpp
index 6209515..c3687b0 100644 (file)
@@ -19,7 +19,6 @@
 #include "framework.h"
 
 // EXTERNAL INCLUDES
-#include <X11/Xlib.h>
 #include <app.h>
 #include <bundle.h>
 #include <Ecore.h>
@@ -28,7 +27,7 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/callback-manager.h>
+#include <callback-manager.h>
 
 namespace Dali
 {
@@ -195,7 +194,7 @@ Framework::Framework(Framework::Observer& observer, int *argc, char ***argv, con
   mAbortHandler(boost::bind(&Framework::AbortCallback, this)),
   mImpl(NULL)
 {
-  XInitThreads();
+  InitThreads();
   mImpl = new Impl(this);
 }
 
similarity index 97%
rename from adaptors/tizen/internal/framework.h
rename to adaptors/common/framework.h
index 74486c7..fe714c7 100644 (file)
@@ -159,6 +159,11 @@ private:
    */
   void AbortCallback();
 
+  /**
+   * Called for initializing on specified backend. (X11 or Wayland)
+   */
+  void InitThreads();
+
 private:
   Observer&          mObserver;
   bool               mInitialised;
similarity index 91%
rename from adaptors/tizen/internal/common/gl/egl-factory.cpp
rename to adaptors/common/gl/egl-factory.cpp
index d4c8730..1301016 100644 (file)
@@ -19,9 +19,9 @@
 #include "egl-factory.h"
 
 // INTERNAL INCLUDES
-#include <internal/common/gl/egl-implementation.h>
-#include <internal/common/gl/egl-image-extensions.h>
-#include <internal/common/gl/egl-sync-implementation.h>
+#include <gl/egl-implementation.h>
+#include <gl/egl-image-extensions.h>
+#include <gl/egl-sync-implementation.h>
 
 namespace Dali
 {
@@ -35,7 +35,7 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/gl/egl-implementation.h>
+#include <gl/egl-implementation.h>
 
 
 namespace
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include <internal/common/gl/egl-sync-implementation.h>
+#include <gl/egl-sync-implementation.h>
 
 // EXTERNAL INCLUDES
 
@@ -31,7 +31,7 @@
 #include <boost/thread/mutex.hpp>
 
 // INTERNAL INCLUDES
-#include <internal/common/gl/egl-implementation.h>
+#include <gl/egl-implementation.h>
 #include <dali/integration-api/debug.h>
 
 #ifdef _ARCH_ARM_
@@ -33,7 +33,7 @@
 #include <dali/integration-api/gl-abstraction.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/gl/gl-extensions.h>
+#include <gl/gl-extensions.h>
 
 namespace Dali
 {
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 
-#include <internal/common/gl/gl-implementation.h>
+#include <gl/gl-implementation.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <internal/common/haptic-player-impl.h>
+#include <haptic-player-impl.h>
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/adaptor-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
similarity index 95%
rename from adaptors/tizen/internal/common/haptic-player-impl.h
rename to adaptors/common/haptic-player-impl.h
index 8d46942..1ed7d7b 100644 (file)
 // EXTERNAL INCLUDES
 #include <string>
 #include <dali/public-api/object/base-object.h>
-#include <dali/public-api/adaptor-framework/common/haptic-player.h>
+#include <haptic-player.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/feedback/feedback-plugin-proxy.h>
+#include <feedback/feedback-plugin-proxy.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/haptic-player.h>
+#include <haptic-player.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/haptic-player-impl.h>
+#include <haptic-player-impl.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/imf-manager.h>
+#include <imf-manager.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/imf-manager-impl.h>
-#include <internal/common/adaptor-impl.h>
+#include <imf-manager-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
similarity index 96%
rename from adaptors/tizen/internal/common/indicator-buffer.h
rename to adaptors/common/indicator-buffer.h
index f62352c..0bb1203 100644 (file)
@@ -22,8 +22,8 @@
 #include <dali/public-api/object/ref-object.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/native-bitmap-buffer-impl.h>
-#include <internal/common/adaptor-impl.h>
+#include <native-bitmap-buffer-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
similarity index 99%
rename from adaptors/tizen/internal/common/indicator-impl.cpp
rename to adaptors/common/indicator-impl.cpp
index 8a481a1..2e42465 100644 (file)
@@ -29,7 +29,7 @@
 #include <errno.h>
 
 #include <dali/public-api/images/bitmap-image.h>
-#include <dali/public-api/adaptor-framework/common/pixmap-image.h>
+#include <pixmap-image.h>
 #include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/events/touch-point.h>
@@ -40,8 +40,8 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/adaptor-impl.h>
-#include <internal/common/accessibility-manager-impl.h>
+#include <adaptor-impl.h>
+#include <accessibility-manager-impl.h>
 
 using Dali::Vector4;
 
similarity index 98%
rename from adaptors/tizen/internal/common/indicator-impl.h
rename to adaptors/common/indicator-impl.h
index f624de4..f5305ec 100644 (file)
 #include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/actors/mesh-actor.h>
 #include <dali/public-api/geometry/animatable-mesh.h>
-#include <dali/public-api/adaptor-framework/common/window.h>
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <window.h>
+#include <timer.h>
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/events/pan-gesture.h>
 #include <dali/public-api/events/pan-gesture-detector.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/indicator-buffer.h>
-#include <internal/common/server-connection.h>
-#include <internal/common/shared-file.h>
+#include <indicator-buffer.h>
+#include <server-connection.h>
+#include <shared-file.h>
 
 namespace Dali
 {
similarity index 95%
rename from adaptors/tizen/internal/common/key-impl.h
rename to adaptors/common/key-impl.h
index adb7943..d78e852 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/common/key.h>
+#include <key.h>
 
 namespace Dali
 {
similarity index 89%
rename from adaptors/tizen/public-api/adaptor-framework/common/key.cpp
rename to adaptors/common/key.cpp
index c543311..55e2467 100644 (file)
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/key.h>
+#include <key.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/key-impl.h>
+#include <key-impl.h>
 
 namespace Dali
 {
@@ -21,7 +21,7 @@
 // EXTERNAL INCLUDES
 
 // INTERNAL INCLUDES
-#include <internal/livebox-plugin-impl.h>
+#include <livebox-plugin-impl.h>
 
 namespace Dali
 {
similarity index 93%
rename from adaptors/tizen/internal/common/locale-utils.h
rename to adaptors/common/locale-utils.h
index 51d1e23..136abb7 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <string>
-#include <dali/public-api/adaptor-framework/common/virtual-keyboard.h>
+#include <virtual-keyboard.h>
 
 // INTERNAL INCLUDES
 
@@ -26,7 +26,7 @@
 #include <dali/public-api/common/dali-vector.h>
 
 // INTERNAL HEADERS
-#include <internal/common/adaptor-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
similarity index 97%
rename from adaptors/tizen/internal/common/object-profiler.h
rename to adaptors/common/object-profiler.h
index 3224f22..63235d2 100644 (file)
@@ -22,7 +22,7 @@
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/common/map-wrapper.h>
 #include <dali/public-api/signals/connection-tracker.h>
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <timer.h>
 
 namespace Dali
 {
similarity index 96%
rename from adaptors/tizen/internal/common/orientation-impl.cpp
rename to adaptors/common/orientation-impl.cpp
index cbcac05..57379b5 100644 (file)
@@ -23,8 +23,8 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/window-impl.h>
-#include <internal/common/adaptor-impl.h>
+#include <window-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
similarity index 96%
rename from adaptors/tizen/internal/common/orientation-impl.h
rename to adaptors/common/orientation-impl.h
index 8e68cc8..d00da39 100644 (file)
 #include <cmath>
 #include <dali/public-api/common/constants.h>
 #include <dali/public-api/object/base-object.h>
-#include <dali/public-api/adaptor-framework/common/orientation.h>
+#include <orientation.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/rotation-observer.h>
+#include <rotation-observer.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/orientation.h>
+#include <orientation.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/orientation-impl.h>
+#include <orientation-impl.h>
 
 namespace Dali
 {
 // EXTERNAL INCLUDES
 
 // CLASS HEADER
-#include <internal/common/physical-keyboard-impl.h>
+#include <physical-keyboard-impl.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/adaptor-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
@@ -22,7 +22,7 @@
 #include <dali/public-api/object/base-object.h>
 
 // INTERNAL INCLUDES
-#include <public-api/adaptor-framework/common/physical-keyboard.h>
+#include <physical-keyboard.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <public-api/adaptor-framework/common/physical-keyboard.h>
+#include <physical-keyboard.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/physical-keyboard-impl.h>
+#include <physical-keyboard-impl.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/pixmap-image.h>
+#include <pixmap-image.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/pixmap-image-impl.h>
+#include <pixmap-image-impl.h>
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/any.h>
similarity index 98%
rename from adaptors/tizen/internal/common/render-surface-impl.h
rename to adaptors/common/render-surface-impl.h
index 72d3f56..ef71e86 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
+#include <render-surface.h>
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/common/view-mode.h>
 
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
+#include <render-surface.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/render-surface-impl.h>
-#include <internal/common/ecore-x/pixmap-render-surface.h>
-#include <internal/common/ecore-x/window-render-surface.h>
+#include <render-surface-impl.h>
+#include <pixmap-render-surface.h>
+#include <window-render-surface.h>
 
 namespace Dali
 {
@@ -36,18 +36,18 @@ RenderSurface::~RenderSurface()
 
 RenderSurface* CreateDefaultSurface( RenderSurface::SurfaceType type, PositionSize positionSize, const std::string& name )
 {
-  // create a Ecore X11 window by default
+  // create a Ecore window by default
   Any surface;
   Any display;
 
-  Internal::Adaptor::ECoreX::RenderSurface* renderSurface(NULL);
+  Internal::Adaptor::ECore::RenderSurface* renderSurface(NULL);
   if( RenderSurface::WINDOW == type )
   {
-    renderSurface = new Internal::Adaptor::ECoreX::WindowRenderSurface( positionSize, surface, display, name );
+    renderSurface = new Internal::Adaptor::ECore::WindowRenderSurface( positionSize, surface, display, name );
   }
   else
   {
-    renderSurface = new Internal::Adaptor::ECoreX::PixmapRenderSurface( positionSize, surface, display, name );
+    renderSurface = new Internal::Adaptor::ECore::PixmapRenderSurface( positionSize, surface, display, name );
   }
 
   return renderSurface;
similarity index 71%
rename from adaptors/tizen/internal/common/server-connection.cpp
rename to adaptors/common/server-connection.cpp
index 45a2248..db29c1e 100644 (file)
@@ -43,54 +43,6 @@ namespace Adaptor
 extern Debug::Filter* gIndicatorLogFilter;
 #endif
 
-
-ServerConnection::ServerConnection(
-  const char*                 serviceName,
-  int                         serviceNumber,
-  bool                        isSystem,
-  ServerConnection::Observer* observer)
-
-: mConnected(false),
-  mObserver(observer)
-{
-  Ecore_Ipc_Type ipctype = ECORE_IPC_LOCAL_USER;
-
-  ecore_ipc_init();
-  mService.name = eina_stringshare_add(serviceName);
-  mService.num = serviceNumber;
-  mService.isSystem = isSystem;
-
-  if (mService.isSystem)
-  {
-    ipctype = ECORE_IPC_LOCAL_SYSTEM;
-  }
-
-  DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "ServerConnection: Connecting to %s %d\n", mService.name, mService.num );
-
-  mIpcServer = ecore_ipc_server_connect( ipctype, (char *)mService.name, mService.num, this );
-
-  if( !mIpcServer )
-  {
-    ecore_ipc_shutdown();
-  }
-  else
-  {
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_ADD,
-                                                     &ServerConnection::IpcServerAdd,
-                                                     this ) );
-
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL,
-                                                     &ServerConnection::IpcServerDel,
-                                                     this ) );
-
-    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DATA,
-                                                     &ServerConnection::IpcServerData,
-                                                     this));
-
-    mConnected = true;
-  }
-}
-
 ServerConnection::~ServerConnection()
 {
   CloseConnection();
similarity index 97%
rename from adaptors/tizen/internal/common/sound-player-impl.cpp
rename to adaptors/common/sound-player-impl.cpp
index 3cee658..83654f0 100644 (file)
  */
 
 // CLASS HEADER
-#include <internal/common/sound-player-impl.h>
+#include <sound-player-impl.h>
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/adaptor-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
similarity index 96%
rename from adaptors/tizen/internal/common/sound-player-impl.h
rename to adaptors/common/sound-player-impl.h
index 60caa49..eafc84a 100644 (file)
@@ -23,8 +23,8 @@
 #include <dali/public-api/object/base-object.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/common/sound-player.h>
-#include <internal/common/feedback/feedback-plugin-proxy.h>
+#include <sound-player.h>
+#include <feedback/feedback-plugin-proxy.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/sound-player.h>
+#include <sound-player.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/sound-player-impl.h>
+#include <sound-player-impl.h>
 
 namespace Dali
 {
@@ -23,7 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
-#include <internal/common/adaptor-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
similarity index 98%
rename from adaptors/tizen/internal/common/style-monitor-impl.h
rename to adaptors/common/style-monitor-impl.h
index d5f78d7..17d79e9 100644 (file)
@@ -21,7 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/object/base-object.h>
-#include <dali/public-api/adaptor-framework/common/style-monitor.h>
+#include <style-monitor.h>
 #include <dali/integration-api/platform-abstraction.h>
 
 // INTERNAL INCLUDES
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/style-monitor.h>
+#include <style-monitor.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/style-monitor-impl.h>
+#include <style-monitor-impl.h>
 
 namespace Dali
 {
diff --git a/adaptors/common/system-settings.cpp b/adaptors/common/system-settings.cpp
new file mode 100644 (file)
index 0000000..164cae0
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <system_settings.h>
+#include <Elementary.h>
+
+// INTERNAL INCLUDES
+#include "system-settings.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+int GetLongPressTime( int defaultTime )
+{
+  return defaultTime;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
similarity index 99%
rename from adaptors/tizen/internal/common/tilt-sensor-impl.cpp
rename to adaptors/common/tilt-sensor-impl.cpp
index ca26892..64d452a 100644 (file)
@@ -26,7 +26,7 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/adaptor-impl.h>
+#include <adaptor-impl.h>
 
 #ifdef __arm__
 #define SENSOR_ENABLED
similarity index 97%
rename from adaptors/tizen/internal/common/tilt-sensor-impl.h
rename to adaptors/common/tilt-sensor-impl.h
index 265221a..20c68d9 100644 (file)
 // EXTERNAL INCLUDES
 #include <deque>
 #include <dali/public-api/object/base-object.h>
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <timer.h>
 
 // INTERNAL INCLUDES
-#include <public-api/adaptor-framework/common/tilt-sensor.h>
+#include <tilt-sensor.h>
 
 namespace Dali
 {
@@ -19,8 +19,8 @@
 #include "tilt-sensor.h"
 
 // INTERNAL INCLUDES
-#include <internal/common/tilt-sensor-impl.h>
-#include <internal/common/adaptor-impl.h>
+#include <tilt-sensor-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
similarity index 97%
rename from adaptors/tizen/internal/common/timer-impl.h
rename to adaptors/common/timer-impl.h
index a0c76da..91f649d 100644 (file)
@@ -21,7 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/object/base-object.h>
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <timer.h>
 
 // INTERNAL INCLUDES
 #include <base/interfaces/timer-interface.h>
similarity index 94%
rename from adaptors/tizen/public-api/adaptor-framework/common/timer.cpp
rename to adaptors/common/timer.cpp
index aef8fea..02c0c92 100644 (file)
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <timer.h>
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/timer-impl.h>
+#include <timer-impl.h>
 
 namespace Dali
 {
@@ -19,7 +19,7 @@
 #include "trigger-event-factory.h"
 
 // INTERNAL INCLUDES
-#include <internal/common/trigger-event.h>
+#include <trigger-event.h>
 
 
 namespace Dali
similarity index 98%
rename from adaptors/tizen/internal/common/trigger-event.cpp
rename to adaptors/common/trigger-event.cpp
index 577c3f5..3de929d 100644 (file)
@@ -26,7 +26,7 @@
 
 // INTERNAL INCLUDES
 
-#include <internal/common/file-descriptor-monitor.h>
+#include <file-descriptor-monitor.h>
 
 namespace Dali
 {
similarity index 98%
rename from adaptors/tizen/internal/common/tts-player-impl.h
rename to adaptors/common/tts-player-impl.h
index 1429da7..ffc3bec 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/object/base-object.h>
-#include <dali/public-api/adaptor-framework/common/tts-player.h>
+#include <tts-player.h>
 
 // INTERNAL INCLUDES
 
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/tts-player.h>
+#include <tts-player.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/tts-player-impl.h>
-#include <internal/common/adaptor-impl.h>
+#include <tts-player-impl.h>
+#include <adaptor-impl.h>
 
 namespace Dali
 {
 #include "virtual-keyboard-impl.h"
 
 // EXTERNAL INCLUDES
-#include <X11/Xlib.h>
-#include <Ecore_X.h>
 #include <algorithm>
 
 #include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/adaptor-framework/common/adaptor.h>
+#include <adaptor.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/locale-utils.h>
-#include <internal/common/imf-manager-impl.h>
+#include <locale-utils.h>
+#include <imf-manager-impl.h>
 
 
 namespace Dali
@@ -264,24 +262,6 @@ Rect<int> GetSizeAndPosition()
   return Rect<int>(xPos,yPos,width,height);
 }
 
-void RotateTo(int angle)
-{
-  // Get focus window used by Keyboard and rotate it
-  Display* display = XOpenDisplay(0);
-  if (display)
-  {
-    ::Window focusWindow;
-    int revert;
-    // Get Focus window
-    XGetInputFocus(display, &focusWindow, &revert);
-
-    ecore_x_window_prop_property_set(focusWindow,
-                                      ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
-                                      ECORE_X_ATOM_CARDINAL, 32, &angle, 1);
-    XCloseDisplay(display);
-  }
-}
-
 Dali::VirtualKeyboard::StatusSignalV2& StatusChangedSignal()
 {
   return gKeyboardStatusSignalV2;
@@ -22,7 +22,7 @@
 #include <Ecore_IMF.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/common/virtual-keyboard.h>
+#include <virtual-keyboard.h>
 
 namespace Dali
 {
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/virtual-keyboard.h>
+#include <virtual-keyboard.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/virtual-keyboard-impl.h>
+#include <virtual-keyboard-impl.h>
 
 namespace Dali
 {
similarity index 95%
rename from adaptors/tizen/internal/common/window-impl.cpp
rename to adaptors/common/window-impl.cpp
index 6bc40ca..c8910b6 100644 (file)
 
 // EXTERNAL HEADERS
 #include <Ecore.h>
+#ifdef WAYLAND
+#include <Ecore_Wayland.h>
+#else
 #include <Ecore_X.h>
+#endif
 
 #include <dali/integration-api/core.h>
 #include <dali/integration-api/system-overlay.h>
 #include <dali/public-api/render-tasks/render-task.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
-#include <dali/public-api/adaptor-framework/common/orientation.h>
+#include <orientation.h>
 
 // INTERNAL HEADERS
-#include <internal/common/ecore-x/window-render-surface.h>
-#include <internal/common/drag-and-drop-detector-impl.h>
-#include <internal/common/indicator-impl.h>
-#include <internal/common/window-visibility-observer.h>
-#include <internal/common/orientation-impl.h>
+#ifdef WAYLAND
+#include <ecore-wl/wl-window-render-surface.h>
+#else
+#include <ecore-x/window-render-surface.h>
+#endif
+#include <drag-and-drop-detector-impl.h>
+#include <indicator-impl.h>
+#include <window-visibility-observer.h>
+#include <orientation-impl.h>
 
 namespace
 {
@@ -63,10 +71,13 @@ struct Window::EventHandler
    */
   EventHandler( Window* window )
   : mWindow( window ),
+#ifndef WAYLAND
     mWindowPropertyHandler( ecore_event_handler_add( ECORE_X_EVENT_WINDOW_PROPERTY,  EcoreEventWindowPropertyChanged, this ) ),
     mClientMessagehandler( ecore_event_handler_add( ECORE_X_EVENT_CLIENT_MESSAGE,  EcoreEventClientMessage, this ) ),
+#endif
     mEcoreWindow( 0 )
   {
+#ifndef WAYLAND
     // store ecore window handle
     ECoreX::WindowRenderSurface* x11Window( dynamic_cast< ECoreX::WindowRenderSurface * >( mWindow->mSurface ) );
     if( x11Window )
@@ -80,6 +91,7 @@ struct Window::EventHandler
     ecore_x_window_prop_card32_set(mEcoreWindow,
                              ECORE_X_ATOM_E_DEICONIFY_APPROVE,
                              &tmp, 1);
+#endif
   }
 
   /**
@@ -102,6 +114,9 @@ struct Window::EventHandler
   /// Called when the window properties are changed.
   static Eina_Bool EcoreEventWindowPropertyChanged( void* data, int type, void* event )
   {
+#ifdef WAYLAND
+    return EINA_FALSE;
+#else
     Ecore_X_Event_Window_Property* propertyChangedEvent( (Ecore_X_Event_Window_Property*)event );
     EventHandler* handler( (EventHandler*)data );
     Eina_Bool handled( ECORE_CALLBACK_PASS_ON );
@@ -150,11 +165,15 @@ struct Window::EventHandler
     }
 
     return handled;
+#endif
   }
 
   /// Called when the window properties are changed.
   static Eina_Bool EcoreEventClientMessage( void* data, int type, void* event )
   {
+#ifdef WAYLAND
+    return EINA_FALSE;
+#else
     Eina_Bool handled( ECORE_CALLBACK_PASS_ON );
     Ecore_X_Event_Client_Message* clientMessageEvent( (Ecore_X_Event_Client_Message*)event );
     EventHandler* handler( (EventHandler*)data );
@@ -182,13 +201,18 @@ struct Window::EventHandler
     }
 
     return handled;
+#endif
   }
 
   // Data
   Window* mWindow;
   Ecore_Event_Handler* mWindowPropertyHandler;
   Ecore_Event_Handler* mClientMessagehandler;
+#ifdef WAYLAND
+  Ecore_Wl_Window* mEcoreWindow;
+#else
   Ecore_X_Window mEcoreWindow;
+#endif
 };
 
 
@@ -263,6 +287,7 @@ void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
   DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "visible : %d\n", visibleMode );
   DALI_ASSERT_DEBUG(mOverlay);
 
+#ifndef WAYLAND
   ECoreX::WindowRenderSurface* x11Window = dynamic_cast< ECoreX::WindowRenderSurface * >( mSurface );
   DALI_ASSERT_DEBUG(x11Window);
   Ecore_X_Window xWinId = x11Window->GetXWindow();
@@ -292,6 +317,7 @@ void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
     // when the indicator is not visible, set TRANSPARENT mode for indicator server
     ecore_x_e_illume_indicator_opacity_set(xWinId, ECORE_X_ILLUME_INDICATOR_TRANSPARENT); // it means hidden indicator
   }
+#endif
 
   DoShowIndicator( mIndicatorOrientation );
 }
@@ -318,11 +344,13 @@ void Window::SetClass(std::string name, std::string klass)
   // Get render surface's x11 window
   if( mSurface )
   {
+#ifndef WAYLAND
     ECoreX::WindowRenderSurface* x11Window = dynamic_cast< ECoreX::WindowRenderSurface * >( mSurface );
     if( x11Window )
     {
       ecore_x_icccm_name_class_set( x11Window->GetXWindow(), name.c_str(), klass.c_str() );
     }
+#endif
   }
 }
 
@@ -363,7 +391,11 @@ void Window::Initialize(const PositionSize& windowPosition, const std::string& n
   // create an X11 window by default
   Any surface;
   Any display;
+#ifdef WAYLAND
+  mSurface = new ECoreWayland::WindowRenderSurface( windowPosition, surface, display, name, mIsTransparent );
+#else
   mSurface = new ECoreX::WindowRenderSurface( windowPosition, surface, display, name, mIsTransparent );
+#endif
   mOrientation = Orientation::New(this);
 
   // create event handler for X11 window
@@ -428,6 +460,7 @@ void Window::DoRotateIndicator( Dali::Window::WindowOrientation orientation )
 
 void Window::SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation )
 {
+#ifndef WAYLAND
   ECoreX::WindowRenderSurface* x11Window = dynamic_cast< ECoreX::WindowRenderSurface * >( mSurface );
   if( x11Window )
   {
@@ -447,10 +480,12 @@ void Window::SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientatio
       ecore_x_e_illume_indicator_state_set(win, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
     }
   }
+#endif
 }
 
 void Window::IndicatorTypeChanged(Indicator::Type type)
 {
+#ifndef WAYLAND
   ECoreX::WindowRenderSurface* x11Window = dynamic_cast< ECoreX::WindowRenderSurface * >( mSurface );
   if( x11Window )
   {
@@ -470,6 +505,7 @@ void Window::IndicatorTypeChanged(Indicator::Type type)
         break;
     }
   }
+#endif
 }
 
 void Window::IndicatorClosed( Indicator* indicator )
@@ -519,32 +555,38 @@ void Window::SetIndicatorActorRotation()
 
 void Window::Raise()
 {
+#ifndef WAYLAND
   ECoreX::WindowRenderSurface* x11Window = dynamic_cast< ECoreX::WindowRenderSurface * >( mSurface );
   if( x11Window )
   {
     Ecore_X_Window win = x11Window->GetXWindow();
     ecore_x_window_raise(win);
   }
+#endif
 }
 
 void Window::Lower()
 {
+#ifndef WAYLAND
   ECoreX::WindowRenderSurface* x11Window = dynamic_cast< ECoreX::WindowRenderSurface * >( mSurface );
   if( x11Window )
   {
     Ecore_X_Window win = x11Window->GetXWindow();
     ecore_x_window_lower(win);
   }
+#endif
 }
 
 void Window::Activate()
 {
+#ifndef WAYLAND
   ECoreX::WindowRenderSurface* x11Window = dynamic_cast< ECoreX::WindowRenderSurface * >( mSurface );
   if( x11Window )
   {
     Ecore_X_Window win = x11Window->GetXWindow();
     ecore_x_netwm_client_active_request(ecore_x_window_root_get(win), win, 1 /* request type, 1:application, 2:pager */, 0);
   }
+#endif
 }
 
 Dali::DragAndDropDetector Window::GetDragAndDropDetector() const
@@ -631,6 +673,7 @@ void Window::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrie
 {
   DALI_ASSERT_ALWAYS( mAvailableOrientations.size() <= 4 && "Incorrect number of available orientations" );
 
+#ifndef WAYLAND
   mAvailableOrientations = orientations;
   ECoreX::WindowRenderSurface* x11Window = dynamic_cast< ECoreX::WindowRenderSurface * >( mSurface );
   if( x11Window )
@@ -650,6 +693,7 @@ void Window::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrie
     ecore_x_e_window_rotation_available_rotations_set(ecoreWindow, rotations, mAvailableOrientations.size() );
 
   }
+#endif
 }
 
 const std::vector<Dali::Window::WindowOrientation>& Window::GetAvailableOrientations()
@@ -661,6 +705,7 @@ void Window::SetPreferredOrientation(Dali::Window::WindowOrientation orientation
 {
   mPreferredOrientation = orientation;
 
+#ifndef WAYLAND
   ECoreX::WindowRenderSurface* x11Window = dynamic_cast< ECoreX::WindowRenderSurface * >( mSurface );
   if( x11Window )
   {
@@ -674,6 +719,7 @@ void Window::SetPreferredOrientation(Dali::Window::WindowOrientation orientation
 
     ecore_x_e_window_rotation_preferred_rotation_set(ecoreWindow, orientation);
   }
+#endif
 }
 
 Dali::Window::WindowOrientation Window::GetPreferredOrientation()
@@ -683,6 +729,7 @@ Dali::Window::WindowOrientation Window::GetPreferredOrientation()
 
 void Window::RotationDone( int orientation, int width, int height )
 {
+#ifndef WAYLAND
   // Tell window manager we're done
   ECoreX::WindowRenderSurface* x11Window = dynamic_cast< ECoreX::WindowRenderSurface * >( mSurface );
   if( x11Window )
@@ -705,6 +752,7 @@ void Window::RotationDone( int orientation, int width, int height )
                                      ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
                                      ECORE_X_ATOM_CARDINAL, 32, &angles, 2 );
   }
+#endif
 }
 
 
similarity index 95%
rename from adaptors/tizen/internal/common/window-impl.h
rename to adaptors/common/window-impl.h
index a1f33fd..428244c 100644 (file)
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/object/base-object.h>
-#include <dali/public-api/adaptor-framework/common/window.h>
-#include <dali/public-api/adaptor-framework/common/orientation.h>
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
-#include <dali/public-api/adaptor-framework/common/drag-and-drop-detector.h>
+#include <window.h>
+#include <orientation.h>
+#include <render-surface.h>
+#include <drag-and-drop-detector.h>
 
 // INTERNAL INCLUDES
 #include <base/lifecycle-observer.h>
-#include <internal/common/adaptor-impl.h>
-#include <internal/common/indicator-impl.h>
+#include <adaptor-impl.h>
+#include <indicator-impl.h>
 
 
 namespace Dali
similarity index 95%
rename from adaptors/tizen/public-api/adaptor-framework/common/window.cpp
rename to adaptors/common/window.cpp
index b2f7086..4883b8d 100644 (file)
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/common/window.h>
+#include <window.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/window-impl.h>
-#include <internal/common/orientation-impl.h>
+#include <window-impl.h>
+#include <orientation-impl.h>
 
 namespace Dali
 {
diff --git a/adaptors/mobile/application-file.list b/adaptors/mobile/application-file.list
new file mode 100644 (file)
index 0000000..abb44d9
--- /dev/null
@@ -0,0 +1,15 @@
+# Application
+
+tizen_evas_plugin_internal_src_files = \
+  $(tizen_evas_plugin_internal_src_dir)/evas-plugin-impl.cpp
+
+tizen_native_buffer_plugin_internal_src_files = \
+  $(tizen_native_buffer_plugin_internal_src_dir)/native-buffer-plugin-impl.cpp
+
+# Public source files
+tizen_evas_plugin_public_api_src_files = \
+  $(tizen_evas_plugin_public_api_src_dir)/evas-plugin.cpp
+
+tizen_native_buffer_plugin_public_api_src_files = \
+  $(tizen_native_buffer_plugin_public_api_src_dir)/native-buffer-plugin.cpp
+
similarity index 98%
rename from adaptors/tizen/internal/mobile/evas-plugin-impl.cpp
rename to adaptors/mobile/evas-plugin-impl.cpp
index 0ed1368..9382dbd 100644 (file)
 #include <Ecore_IMF_Evas.h>
 
 // INTERNAL HEADERS
-#include <dali/public-api/adaptor-framework/common/accessibility-manager.h>
-#include <dali/public-api/adaptor-framework/common/clipboard-event-notifier.h>
-#include <dali/public-api/adaptor-framework/common/imf-manager.h>
+#include <accessibility-manager.h>
+#include <clipboard-event-notifier.h>
+#include <imf-manager.h>
 
-#include <internal/common/adaptor-impl.h>
+#include <adaptor-impl.h>
 #include "mobile-render-surface-factory.h"
-#include <internal/common/ecore-x/pixmap-render-surface.h>
-#include <internal/common/trigger-event.h>
+#include <pixmap-render-surface.h>
+#include <trigger-event.h>
 
 namespace Dali
 {
@@ -1000,7 +1000,7 @@ void EvasPlugin::CreateAdaptor(unsigned int initialWidth, unsigned int initialHe
   evas_object_image_native_surface_set(mEvasImageObject, &ns);
 }
 
-ECoreX::RenderSurface* EvasPlugin::CreateSurface( int width, int height )
+ECore::RenderSurface* EvasPlugin::CreateSurface( int width, int height )
 {
   PositionSize pixmapSize( 0, 0, width, height );
   Any surface;
@@ -1012,7 +1012,7 @@ ECoreX::RenderSurface* EvasPlugin::CreateSurface( int width, int height )
   }
 
   // create a X11 pixmap
-  ECoreX::RenderSurface* daliSurface = ECoreX::CreatePixmapSurface( pixmapSize, surface, display, "no name", mIsTransparent );
+  ECore::RenderSurface* daliSurface = ECore::CreatePixmapSurface( pixmapSize, surface, display, "no name", mIsTransparent );
 
   daliSurface->SetRenderNotification( mRenderNotification );
 
similarity index 96%
rename from adaptors/tizen/internal/mobile/evas-plugin-impl.h
rename to adaptors/mobile/evas-plugin-impl.h
index eb68799..edcf997 100644 (file)
 #include <dali/integration-api/events/key-event-integ.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/common/imf-manager.h>
-#include <dali/public-api/adaptor-framework/evas-plugin.h>
+#include <imf-manager.h>
+#include <evas-plugin.h>
 
-#include <internal/common/virtual-keyboard-impl.h>
-#include <internal/common/clipboard-impl.h>
+#include <virtual-keyboard-impl.h>
+#include <clipboard-impl.h>
 
 namespace Dali
 {
@@ -59,7 +59,7 @@ class TriggerEvent;
 
 typedef Dali::Rect<int> PositionSize;
 
-namespace ECoreX
+namespace ECore
 {
 class RenderSurface;
 }
@@ -339,7 +339,7 @@ private:
    * @param height of the surface
    * @return the new surface
    */
-  ECoreX::RenderSurface* CreateSurface( int width, int height );
+  ECore::RenderSurface* CreateSurface( int width, int height );
 
   /**
    * Resize the surface
@@ -380,7 +380,7 @@ public:
   Evas_Object*                                mEvasImageObject;
   Evas_Object*                                mElmAccessObject;
   Evas_Object*                                mElmFocusObject;
-  ECoreX::RenderSurface*                      mSurface;
+  ECore::RenderSurface*                       mSurface;
   bool                                        mFirstRenderCompleteNotified;
 
 private:
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/evas-plugin.h>
+#include <public-api/evas-plugin.h>
 
 // EXTERNAL INCLUDES
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 
-#include <internal/mobile/evas-plugin-impl.h>
+#include <mobile/evas-plugin-impl.h>
 
 namespace Dali
 {
diff --git a/adaptors/mobile/file.list b/adaptors/mobile/file.list
new file mode 100644 (file)
index 0000000..d147f5f
--- /dev/null
@@ -0,0 +1,6 @@
+# mobile profile internal files
+adaptor_common_internal_src_files += \
+  $(adaptor_common_dir)/../mobile/mobile-render-surface-factory.cpp \
+  $(adaptor_common_dir)/../mobile/mobile-native-buffer-render-surface.cpp \
+  $(adaptor_common_dir)/../mobile/mobile-system-settings.cpp \
+  $(adaptor_common_dir)/../mobile/mobile-color-controller-impl.cpp
\ No newline at end of file
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include <internal/common/color-controller-impl.h>
+#include <common/color-controller-impl.h>
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
@@ -24,7 +24,7 @@
 #include <efl_assist_theme.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/adaptor-impl.h>
+#include <common/adaptor-impl.h>
 
 namespace Dali
 {
@@ -24,8 +24,8 @@
 #include <native-buffer-pool.h>
 
 // INTERANL INCLUDES
-#include <internal/common/gl/egl-implementation.h>
-#include <internal/common/trigger-event.h>
+#include <gl/egl-implementation.h>
+#include <trigger-event.h>
 
 namespace Dali
 {
@@ -40,7 +40,7 @@ namespace Adaptor
 extern Debug::Filter* gRenderSurfaceLogFilter;
 #endif
 
-namespace ECoreX
+namespace ECore
 {
 
 NativeBufferRenderSurface::NativeBufferRenderSurface( native_buffer_provider* provider,
@@ -215,7 +215,7 @@ void NativeBufferRenderSurface::UseExistingRenderable( unsigned int surfaceId )
   // nothing to do
 }
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
@@ -23,7 +23,7 @@
 #include <dali/public-api/common/vector-wrapper.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/ecore-x/ecore-x-render-surface.h>
+#include <ecore-x-render-surface.h>
 
 using namespace std;
 
@@ -36,7 +36,7 @@ namespace Internal
 namespace Adaptor
 {
 
-namespace ECoreX
+namespace ECore
 {
 
 /**
@@ -66,7 +66,7 @@ public:
 public: // API
 
   /**
-   * @copydoc Dali::Internal::Adaptor::ECoreX::RenderSurface::GetDrawable()
+   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::GetDrawable()
    */
   virtual Ecore_X_Drawable GetDrawable();
 
@@ -110,7 +110,7 @@ protected:
   virtual void CreateXRenderable();
 
   /**
-   * @copydoc Dali::Internal::Adaptor::ECoreX::RenderSurface::UseExistingRenderable
+   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::UseExistingRenderable
    */
   virtual void UseExistingRenderable( unsigned int surfaceId );
 
@@ -131,7 +131,7 @@ private: // Data
   bool                                 mIsAcquired;
 }; // class NativeBufferRenderSurface
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
@@ -15,7 +15,7 @@
  *
  */
 
-#include <internal/common/ecore-x/pixmap-render-surface.h>
+#include <pixmap-render-surface.h>
 #include "mobile-native-buffer-render-surface.h"
 
 namespace Dali
@@ -27,7 +27,7 @@ namespace Internal
 namespace Adaptor
 {
 
-namespace ECoreX
+namespace ECore
 {
 
 DALI_EXPORT_API RenderSurface* CreatePixmapSurface(
@@ -20,7 +20,7 @@
 #include <Elementary.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/system-settings.h>
+#include <system-settings.h>
 
 namespace Dali
 {
 #include <dali/integration-api/debug.h>
 
 // INTERNAL HEADERS
-#include <internal/common/accessibility-manager-impl.h>
-#include <internal/common/adaptor-impl.h>
+#include <accessibility-manager-impl.h>
+#include <adaptor-impl.h>
 #include "mobile-render-surface-factory.h"
-#include <internal/common/ecore-x/ecore-x-render-surface.h>
-#include <internal/common/trigger-event.h>
+#include <ecore-x-render-surface.h>
+#include <trigger-event.h>
 
 namespace Dali
 {
@@ -109,14 +109,14 @@ NativeBufferPlugin::~NativeBufferPlugin()
   }
 }
 
-void NativeBufferPlugin::CreateAdaptor( ECoreX::RenderSurface &surface, const DeviceLayout& baseLayout )
+void NativeBufferPlugin::CreateAdaptor( ECore::RenderSurface &surface, const DeviceLayout& baseLayout )
 {
   DALI_LOG_TRACE_METHOD( gLogFilter );
 
   mAdaptor = Internal::Adaptor::Adaptor::New( &surface, baseLayout );
 }
 
-ECoreX::RenderSurface* NativeBufferPlugin::CreateSurface( int width, int height, bool isTransparent, unsigned int maxBufferCount )
+ECore::RenderSurface* NativeBufferPlugin::CreateSurface( int width, int height, bool isTransparent, unsigned int maxBufferCount )
 {
   DALI_LOG_TRACE_METHOD( gLogFilter );
 
@@ -130,7 +130,7 @@ ECoreX::RenderSurface* NativeBufferPlugin::CreateSurface( int width, int height,
     display = mSurface->GetMainDisplay();
   }
 
-  ECoreX::RenderSurface* nbSurface = ECoreX::CreateNativeBufferSurface( mProvider, mPool, maxBufferCount, positionSize, surface, display, "no name", isTransparent );
+  ECore::RenderSurface* nbSurface = ECore::CreateNativeBufferSurface( mProvider, mPool, maxBufferCount, positionSize, surface, display, "no name", isTransparent );
 
   return nbSurface;
 }
@@ -28,7 +28,7 @@
 
 // INTERNAL INCLUDES
 
-#include <dali/public-api/adaptor-framework/native-buffer-plugin.h>
+#include <native-buffer-plugin.h>
 
 namespace Dali
 {
@@ -45,7 +45,7 @@ class TriggerEvent;
 
 typedef Dali::Rect<int> PositionSize;
 
-namespace ECoreX
+namespace ECore
 {
 
 class RenderSurface;
@@ -218,7 +218,7 @@ private:
   /**
    * Create the adaptor
    */
-  void CreateAdaptor( ECoreX::RenderSurface &surface, const DeviceLayout& baseLayout );
+  void CreateAdaptor( ECore::RenderSurface &surface, const DeviceLayout& baseLayout );
 
   /**
    * Creates a render surface
@@ -227,7 +227,7 @@ private:
    * @param[in] isTransparent Whether the surface is transparent
    * @return A pointer to the new surface
    */
-  ECoreX::RenderSurface* CreateSurface( int width, int height, bool isTransparent, unsigned int maxBufferCount );
+  ECore::RenderSurface* CreateSurface( int width, int height, bool isTransparent, unsigned int maxBufferCount );
 
 public:
 
@@ -255,7 +255,7 @@ private:
   native_buffer_provider* mProvider;
   native_buffer_pool*       mPool;
   Dali::Adaptor*            mAdaptor;
-  ECoreX::RenderSurface*    mSurface;
+  ECore::RenderSurface*     mSurface;
   TriggerEvent*             mRenderNotification; ///< Render Notification trigger
   State                     mState;
   bool                      mInitialized;
  */
 
 // CLASS HEADER
-#include <dali/public-api/adaptor-framework/native-buffer-plugin.h>
+#include <public-api/native-buffer-plugin.h>
 
 // EXTERNAL INCLUDES
 
 // INTERNAL INCLUDES
-#include <internal/mobile/native-buffer-plugin-impl.h>
+#include <mobile/native-buffer-plugin-impl.h>
 
 namespace Dali
 {
similarity index 98%
rename from capi/dali/public-api/adaptor-framework/common/adaptor.h
rename to adaptors/public-api/adaptor.h
index 83c0aa8..a9cdca4 100644 (file)
@@ -25,8 +25,8 @@
 
 // EXTERNAL INCLUDES
 #include <boost/function.hpp>
-#include <dali/public-api/adaptor-framework/common/window.h>
-#include <dali/public-api/adaptor-framework/common/tts-player.h>
+#include "window.h"
+#include "tts-player.h"
 #include <dali/public-api/signals/dali-signal-v2.h>
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/events/touch-event.h>
@@ -24,9 +24,9 @@
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/common/view-mode.h>
 
-#include <dali/public-api/adaptor-framework/common/style-monitor.h>
-#include <dali/public-api/adaptor-framework/common/device-layout.h>
-#include <dali/public-api/adaptor-framework/common/window.h>
+#include "style-monitor.h"
+#include "device-layout.h"
+#include "window.h"
 
 namespace Dali DALI_IMPORT_API
 {
diff --git a/adaptors/public-api/dali.h b/adaptors/public-api/dali.h
new file mode 100644 (file)
index 0000000..b02ca11
--- /dev/null
@@ -0,0 +1,71 @@
+#ifndef __DALI_H__
+#define __DALI_H__
+
+/*
+ * 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.
+ *
+ */
+
+#include <dali/public-api/dali-core.h>
+
+// Application / UI Framework adaption
+
+// These defines come from running pkg-config --cflags with the correct package config file
+
+#if defined(DALI_LIVEBOX_PLUGIN)
+#include <dali/public-api/livebox-plugin.h>
+#endif
+
+#if defined(DALI_EVAS_PLUGIN)
+#include <dali/public-api/evas-plugin.h>
+#endif
+
+#if defined(DALI_NATIVE_BUFFER_PLUGIN)
+#include <dali/public-api/native-buffer-plugin.h>
+#endif
+
+#if defined(DALI_APPLICATION)
+#include <dali/public-api/application.h>
+#endif
+
+#include <dali/public-api/accessibility-manager.h>
+#include <dali/public-api/adaptor.h>
+#include <dali/public-api/clipboard.h>
+#include <dali/public-api/clipboard-event-notifier.h>
+#include <dali/public-api/color-controller.h>
+#include <dali/public-api/device-layout.h>
+#include <dali/public-api/drag-and-drop-detector.h>
+#include <dali/public-api/haptic-player.h>
+#include <dali/public-api/imf-manager.h>
+#include <dali/public-api/key.h>
+#include <dali/public-api/orientation.h>
+#include <dali/public-api/pixmap-image.h>
+#include <dali/public-api/render-surface.h>
+#include <dali/public-api/sound-player.h>
+#include <dali/public-api/style-change.h>
+#include <dali/public-api/style-monitor.h>
+#include <dali/public-api/timer.h>
+#include <dali/public-api/tts-player.h>
+#include <dali/public-api/virtual-keyboard.h>
+#include <dali/public-api/window.h>
+
+#include <dali/public-api/accessibility-action-handler.h>
+#include <dali/public-api/accessibility-gesture-handler.h>
+#include <dali/public-api/event-feeder.h>
+#include <dali/public-api/feedback-plugin.h>
+#include <dali/public-api/physical-keyboard.h>
+#include <dali/public-api/tilt-sensor.h>
+
+#endif //__DALI_H__
diff --git a/adaptors/public-api/file.list b/adaptors/public-api/file.list
new file mode 100644 (file)
index 0000000..0cd7474
--- /dev/null
@@ -0,0 +1,42 @@
+evas_plugin_public_api_header_files = \
+  $(adaptor_public_api_dir)/evas-plugin.h
+
+native_buffer_plugin_public_api_header_files = \
+  $(adaptor_public_api_dir)/native-buffer-plugin.h
+
+livebox_plugin_public_api_header_files = \
+  $(adaptor_public_api_dir)/livebox-plugin.h
+
+public_api_header_files = \
+  $(adaptor_public_api_dir)/accessibility-manager.h \
+  $(adaptor_public_api_dir)/adaptor.h \
+  $(adaptor_public_api_dir)/clipboard-event-notifier.h \
+  $(adaptor_public_api_dir)/clipboard.h \
+  $(adaptor_public_api_dir)/color-controller.h \
+  $(adaptor_public_api_dir)/device-layout.h \
+  $(adaptor_public_api_dir)/drag-and-drop-detector.h \
+  $(adaptor_public_api_dir)/haptic-player.h \
+  $(adaptor_public_api_dir)/imf-manager.h \
+  $(adaptor_public_api_dir)/key.h \
+  $(adaptor_public_api_dir)/orientation.h \
+  $(adaptor_public_api_dir)/pixmap-image.h \
+  $(adaptor_public_api_dir)/render-surface.h \
+  $(adaptor_public_api_dir)/sound-player.h \
+  $(adaptor_public_api_dir)/style-change.h \
+  $(adaptor_public_api_dir)/style-monitor.h \
+  $(adaptor_public_api_dir)/timer.h \
+  $(adaptor_public_api_dir)/tts-player.h \
+  $(adaptor_public_api_dir)/virtual-keyboard.h \
+  $(adaptor_public_api_dir)/window.h \
+  $(adaptor_public_api_dir)/accessibility-action-handler.h \
+  $(adaptor_public_api_dir)/accessibility-gesture-handler.h \
+  $(adaptor_public_api_dir)/event-feeder.h \
+  $(adaptor_public_api_dir)/feedback-plugin.h \
+  $(adaptor_public_api_dir)/physical-keyboard.h \
+  $(adaptor_public_api_dir)/tilt-sensor.h
+
+public_api_application_header_files = \
+  $(adaptor_public_api_dir)/application.h 
+
+adaptor_dali_header_file = \
+  $(adaptor_public_api_dir)/dali.h
@@ -24,8 +24,8 @@
 #include <dali/public-api/math/rect.h>
 
 // INTERNAL INCLUDES
-#include "common/device-layout.h"
-#include "common/style-monitor.h"
+#include "device-layout.h"
+#include "style-monitor.h"
 
 
 namespace Dali DALI_IMPORT_API
@@ -29,8 +29,8 @@
 
 #include <dali/public-api/signals/dali-signal-v2.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
-#include <dali/public-api/adaptor-framework/common/device-layout.h>
+#include "render-surface.h"
+#include "device-layout.h"
 
 namespace Dali DALI_IMPORT_API
 {
@@ -31,7 +31,7 @@
 #include <dali/public-api/signals/dali-signal-v2.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/common/style-change.h>
+#include "style-change.h"
 
 namespace Dali DALI_IMPORT_API
 {
diff --git a/adaptors/tizen/internal/application-file.list b/adaptors/tizen/internal/application-file.list
deleted file mode 100644 (file)
index 2e5c7fd..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# Application
-
-tizen_application_internal_src_files = \
-  $(tizen_application_internal_src_dir)/application-impl.cpp \
-  $(tizen_application_internal_src_dir)/framework.cpp \
-  $(tizen_application_internal_src_dir)/command-line-options.cpp \
-  $(tizen_application_internal_src_dir)/abort-handler.cpp
diff --git a/adaptors/tizen/internal/common/file.list b/adaptors/tizen/internal/common/file.list
deleted file mode 100644 (file)
index a21e629..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-# Add local source files here
-
-tizen_adaptor_internal_common_src_files = \
-  $(tizen_adaptor_internal_src_dir)/accessibility-gesture-detector.cpp \
-  $(tizen_adaptor_internal_src_dir)/accessibility-manager-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/adaptor-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/clipboard-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/clipboard-event-notifier-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/drag-and-drop-detector-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/ecore-callback-manager.cpp \
-  $(tizen_adaptor_internal_src_dir)/file-descriptor-monitor.cpp \
-  $(tizen_adaptor_internal_src_dir)/haptic-player-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/imf-manager-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/indicator-impl.cpp  \
-  $(tizen_adaptor_internal_src_dir)/indicator-buffer.cpp  \
-  $(tizen_adaptor_internal_src_dir)/kernel-trace.cpp  \
-  $(tizen_adaptor_internal_src_dir)/locale-utils.cpp  \
-  $(tizen_adaptor_internal_src_dir)/native-bitmap-buffer-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/object-profiler.cpp \
-  $(tizen_adaptor_internal_src_dir)/orientation-impl.cpp  \
-  $(tizen_adaptor_internal_src_dir)/physical-keyboard-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/pixmap-image-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/render-surface-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/server-connection.cpp \
-  $(tizen_adaptor_internal_src_dir)/shared-file.cpp \
-  $(tizen_adaptor_internal_src_dir)/sound-player-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/style-monitor-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/tilt-sensor-impl.cpp  \
-  $(tizen_adaptor_internal_src_dir)/timer-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/trigger-event.cpp \
-  $(tizen_adaptor_internal_src_dir)/trigger-event-factory.cpp \
-  $(tizen_adaptor_internal_src_dir)/tts-player-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/virtual-keyboard-impl.cpp \
-  $(tizen_adaptor_internal_src_dir)/vsync-monitor.cpp \
-  $(tizen_adaptor_internal_src_dir)/window-impl.cpp \
-  \
-  $(tizen_adaptor_internal_src_dir)/events/event-handler.cpp \
-  $(tizen_adaptor_internal_src_dir)/events/gesture-manager.cpp \
-  $(tizen_adaptor_internal_src_dir)/events/long-press-gesture-detector.cpp \
-  $(tizen_adaptor_internal_src_dir)/events/pan-gesture-detector-base.cpp \
-  $(tizen_adaptor_internal_src_dir)/events/pan-gesture-detector.cpp \
-  $(tizen_adaptor_internal_src_dir)/events/pinch-gesture-detector.cpp \
-  $(tizen_adaptor_internal_src_dir)/events/tap-gesture-detector.cpp \
-  \
-  $(tizen_adaptor_internal_src_dir)/feedback/feedback-controller.cpp \
-  $(tizen_adaptor_internal_src_dir)/feedback/feedback-plugin-proxy.cpp \
-  \
-  $(tizen_adaptor_internal_src_dir)/gl/egl-factory.cpp \
-  $(tizen_adaptor_internal_src_dir)/gl/egl-image-extensions.cpp \
-  $(tizen_adaptor_internal_src_dir)/gl/egl-implementation.cpp \
-  $(tizen_adaptor_internal_src_dir)/gl/egl-sync-implementation.cpp \
-  $(tizen_adaptor_internal_src_dir)/gl/gl-proxy-implementation.cpp \
-  $(tizen_adaptor_internal_src_dir)/gl/gl-extensions.cpp \
-  \
-  $(tizen_adaptor_internal_src_dir)/ecore-x/pixmap-render-surface.cpp \
-  $(tizen_adaptor_internal_src_dir)/ecore-x/ecore-x-render-surface.cpp \
-  $(tizen_adaptor_internal_src_dir)/ecore-x/window-render-surface.cpp \
-  $(tizen_adaptor_internal_src_dir)/ecore-x/ecore-x-window-interface.cpp
-
-tizen_adaptor_internal_common_profile_src_files = \
-  $(tizen_adaptor_internal_src_dir)/key-impl.cpp  \
-  $(tizen_adaptor_internal_src_dir)/system-settings.cpp \
-  $(tizen_adaptor_internal_src_dir)/color-controller-impl.cpp \
-  \
-  $(tizen_adaptor_internal_src_dir)/ecore-x/ecore-x-render-surface-factory.cpp
diff --git a/adaptors/tizen/internal/livebox-plugin-impl.cpp b/adaptors/tizen/internal/livebox-plugin-impl.cpp
deleted file mode 100644 (file)
index a271bae..0000000
+++ /dev/null
@@ -1,659 +0,0 @@
-/*
- * 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 "livebox-plugin-impl.h"
-
-// EXTERNAL_HEADERS
-#include <dali/integration-api/debug.h>
-
-#include <Ecore_X.h>
-#include <livebox-service.h>
-
-// INTERNAL HEADERS
-#include <internal/command-line-options.h>
-#include <internal/common/adaptor-impl.h>
-#include <internal/common/ecore-x/ecore-x-render-surface-factory.h>
-#include <internal/common/ecore-x/pixmap-render-surface.h>
-#include <slp-logging.h>
-
-
-namespace Dali
-{
-
-namespace SlpPlatform
-{
-class SlpPlatformAbstraction;
-}
-
-namespace Integration
-{
-class Core;
-}
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-#if defined(DEBUG_ENABLED)
-namespace
-{
-Integration::Log::Filter* gLiveboxPluginLogFilter  = Integration::Log::Filter::New(Debug::Verbose, false);
-} // unnamed namespace
-
-#endif
-
-namespace
-{
-boost::thread_specific_ptr<LiveboxPlugin> gThreadLocalLivebox;
-}
-
-
-// Static methods
-
-/////////////////////////////////////////////////////////////////////////////////////////////////
-// Client Callbacks
-/////////////////////////////////////////////////////////////////////////////////////////////////
-
-/**
- * LiveboxCreated will be called when the livebox instance was created on viewer
- * It is called once.
- */
-static int LiveboxCreated(const char *content_info, int w, int h, double period, void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-
-  DALI_LOG_INFO(gLiveboxPluginLogFilter, Debug::General, "[%s] buffer %d x %d\n", __FUNCTION__, w, h);
-
-  // error handling for buffer size
-  if(w < 1 || h < 1)
-  {
-    livebox_service_get_size(LB_SIZE_TYPE_1x1, &w, &h); // default size
-  }
-
-  liveboxPlugin->OnLiveboxCreated(content_info, w, h, period);
-
-  return 0;
-}
-
-static int LiveboxDestroyed(void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-  liveboxPlugin->OnLiveboxDestroyed();
-
-  return 0;
-
-}
-
-static int LiveboxEventCallback(enum livebox_event_type event, double timestamp, double x, double y, void *data)
-{
-  //3 feed event to adaptor for livebox
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-  PositionSize pixmapSize = liveboxPlugin->mSurface->GetPositionSize();
-
-  // calculate pixel value from relative value[0.0~1.0f] of position
-  int boxX = pixmapSize.width * x;
-  int boxY = pixmapSize.height * y;
-
-  switch (event)
-  {
-    case LIVEBOX_EVENT_MOUSE_IN:
-    {
-      TouchPoint point(0, TouchPoint::Motion, boxX, boxY);
-      // the timestamp was calculated by ( tv_sec + tv_usec / 1000000 )
-      liveboxPlugin->OnLiveboxTouchEvent(point, static_cast<unsigned int>(timestamp * 1000 * 1000));
-      break;
-    }
-    case LIVEBOX_EVENT_MOUSE_OUT:
-    {
-      TouchPoint point(0, TouchPoint::Leave, boxX, boxY);
-      liveboxPlugin->OnLiveboxTouchEvent(point, static_cast<unsigned int>(timestamp * 1000 * 1000));
-      break;
-    }
-    case LIVEBOX_EVENT_MOUSE_DOWN:
-    {
-      TouchPoint point(0, TouchPoint::Down, boxX, boxY);
-      liveboxPlugin->OnLiveboxTouchEvent(point, static_cast<unsigned int>(timestamp * 1000 * 1000));
-      break;
-    }
-    case LIVEBOX_EVENT_MOUSE_MOVE:
-    {
-      TouchPoint point(0, TouchPoint::Motion, boxX, boxY);
-      liveboxPlugin->OnLiveboxTouchEvent(point, static_cast<unsigned int>(timestamp * 1000 * 1000));
-      break;
-    }
-    case LIVEBOX_EVENT_MOUSE_UP:
-    {
-      TouchPoint point(0, TouchPoint::Up, boxX, boxY);
-      liveboxPlugin->OnLiveboxTouchEvent(point, static_cast<unsigned int>(timestamp * 1000 * 1000));
-      break;
-    }
-    case LIVEBOX_EVENT_KEY_DOWN:
-    case LIVEBOX_EVENT_KEY_UP:
-
-    default:
-      break;
-  }
-
-  return 0;
-}
-
-static int LiveboxResized(int w, int h, void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-
-  liveboxPlugin->OnLiveboxResized(w, h);
-
-  return 0;
-}
-
-static int LiveboxClientSetPeriod(double period, void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-  liveboxPlugin->OnPeriodUpdated(period);
-
-  return 0;
-}
-
-static int LiveboxClientUpdated(void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-  liveboxPlugin->OnUpdateRequested();
-
-  return 0;
-}
-
-static int LiveboxClientPaused(void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-  liveboxPlugin->OnPause();
-
-  return 0;
-}
-static int LiveboxClientResumed(void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-  liveboxPlugin->OnResume();
-
-  return 0;
-}
-
-static int GlanceCreated(double x, double y, int w, int h, void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-
-  // calculate pixel value from relative value[0.0~1.0f] of position
-  int arrowX = w * x;
-  int arrowY = h * y;
-
-  liveboxPlugin->OnGlanceCreated(arrowX, arrowY, w, h);
-
-  return 0;
-}
-
-static int GlanceDestroyed(void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-  liveboxPlugin->OnGlanceDestroyed();
-
-  return 0;
-}
-
-static int GlanceEventCallback(enum livebox_event_type event, double timestamp, double x, double y, void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-  liveboxPlugin->OnGlanceTouchEvent();
-
-  return 0;
-}
-static int GlanceMoved(double x, double y, int w, int h, void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-
-  // calculate pixel value from relative value[0.0~1.0f] of position
-  int arrowX = w * x;
-  int arrowY = h * y;
-  liveboxPlugin->OnGlanceMoved(arrowX, arrowY, w, h);
-
-  return 0;
-}
-
-static int GlanceScriptEventCalback(const char *emission, const char *source, struct livebox_event_info *info, void *data)
-{
-  LiveboxPlugin* liveboxPlugin( (LiveboxPlugin*)data );
-  liveboxPlugin->OnGlanceScriptEventCallback(emission, source, info);
-
-  return 0;
-}
-
-static Eina_Bool LiveboxDamageCallback(void *data, int type, void *event)
-{
-  LiveboxPlugin* liveboxPlugin = (LiveboxPlugin*)data;
-  Ecore_X_Event_Damage *ev = (Ecore_X_Event_Damage *)event;
-
-  // get the EFL type for the surface
-  Any surface = liveboxPlugin->mSurface->GetSurface();
-
-  Ecore_X_Pixmap pixmap = AnyCast<Ecore_X_Pixmap>(surface);
-
-  if (!ev || !liveboxPlugin->mDamage)
-  {
-    return ECORE_CALLBACK_PASS_ON;
-  }
-  if ((Ecore_X_Drawable)pixmap != ev->drawable)
-  {
-    return ECORE_CALLBACK_PASS_ON;
-  }
-
-  // handle with damage area : we need it to get damage notify continuously
-  Ecore_X_Region parts;
-  parts = ecore_x_region_new(NULL, 0);
-  ecore_x_damage_subtract(liveboxPlugin->mDamage, 0, parts);
-  ecore_x_region_free(parts);
-
-  // send update signal to provider
-  liveboxPlugin->OnDamaged();
-
-  return EINA_TRUE;
-}
-
-LiveboxPlugin::LiveboxPlugin(Dali::LiveboxPlugin& liveboxPlugin, int* argc, char **argv[], const std::string& name, const DeviceLayout& baseLayout)
-: mLiveboxPlugin(liveboxPlugin),
-  mFramework(NULL),
-  mCommandLineOptions(NULL),
-  mAdaptor(NULL),
-  mName(name),
-  mInitialized(false),
-  mBaseLayout(baseLayout),
-  mLiveboxHandle(NULL),
-  mTitle(""),
-  mContent(""),
-  mPeriod(0.0f),
-  mGlanceGeometry(-1, -1, -1, -1),
-  mDamageEventHandler(NULL),
-  mDamage(0),
-  mSurface(NULL)
-{
-  // make sure we don't create the local thread liveboxPlugin instance twice
-  DALI_ASSERT_ALWAYS(gThreadLocalLivebox.get() == NULL && "Cannot create more than one LiveboxPlugin per thread" );
-
-  // reset is used to store a new value associated with this thread
-  gThreadLocalLivebox.reset(this);
-
-  // get log settings
-  const char* resourceLogOption = std::getenv(DALI_ENV_ENABLE_LOG);
-  unsigned int logOpts = Integration::Log::ParseLogOptions(resourceLogOption);
-
-  // livebox plugin thread will send its logs to SLP Platform's LogMessage handler.
-  Dali::Integration::Log::InstallLogFunction(Dali::SlpPlatform::LogMessage, logOpts);
-
-  mCommandLineOptions = new CommandLineOptions(*argc, *argv);
-
-  mFramework = new Framework(*this, argc, argv, name);
-}
-
-LiveboxPlugin::~LiveboxPlugin()
-{
-  delete mFramework;
-  delete mCommandLineOptions;
-  delete mAdaptor;
-
-  // uninstall it on this thread.
-  Dali::Integration::Log::UninstallLogFunction();
-
-  gThreadLocalLivebox.release();
-}
-
-void LiveboxPlugin::Run()
-{
-  // Run the liveboxPlugin
-  mFramework->Run();
-}
-
-void LiveboxPlugin::Quit()
-{
-  AddIdle(boost::bind(&LiveboxPlugin::QuitFromMainLoop, this));
-}
-
-void LiveboxPlugin::QuitFromMainLoop()
-{
-  if(mAdaptor)
-  {
-    mAdaptor->Stop();
-  }
-
-  mTerminatedSignalV2.Emit( mLiveboxPlugin );
-  mTerminatedSignal(mLiveboxPlugin); // deprecated
-
-  mFramework->Quit();
-
-  mInitialized = false;
-}
-
-
-void LiveboxPlugin::OnInit()
-{
-  mFramework->AddAbortCallback(boost::bind(&LiveboxPlugin::QuitFromMainLoop, this));
-
-  // real initialize process should be done in OnReset()
-}
-
-
-void LiveboxPlugin::CreateSurface(Ecore_X_Pixmap pixmap)
-{
-  Any display;
-
-  if(mSurface)
-  {
-    display = mSurface->GetMainDisplay();
-  }
-
-  PositionSize pixmapSize;
-  int depth = ecore_x_pixmap_depth_get(pixmap);
-
-  ecore_x_pixmap_geometry_get(pixmap, &pixmapSize.x, &pixmapSize.y, &pixmapSize.width, &pixmapSize.height);
-
-  mSurface = ECoreX::CreatePixmapSurface( pixmapSize, pixmap, display, "", depth == 32 ? true : false );
-
-  DALI_LOG_INFO(gLiveboxPluginLogFilter, Debug::General, "[%s] pixmap[%x] %d x %d (%d)\n", __FUNCTION__, pixmap, pixmapSize.width, pixmapSize.height, depth);
-
-  // limit 30 fps
-  mSurface->SetRenderMode(Dali::RenderSurface::RENDER_30FPS);
-
-  // callback damage notify : in damanage callback it should call 'livebox_client_update_box'
-  if(mDamage)
-  {
-    ecore_x_damage_free(mDamage);
-  }
-  else
-  {
-    // register damage notify callback
-    mDamageEventHandler = ecore_event_handler_add(ECORE_X_EVENT_DAMAGE_NOTIFY, LiveboxDamageCallback, this);
-  }
-  mDamage = ecore_x_damage_new (pixmap, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES);
-}
-
-void LiveboxPlugin::OnLiveboxCreated(const std::string& content, int width, int height, double period)
-{
-  DALI_ASSERT_ALWAYS( NULL == mAdaptor && "OnLiveboxCreated must only be called once" );
-
-  Ecore_X_Pixmap pixmap;
-
-  mLiveboxHandle = livebox_client_create(false, width, height);
-
-  if(mLiveboxHandle == NULL)
-  {
-    // error
-    DALI_LOG_WARNING("failed to create livebox handle\n");
-    return;
-  }
-
-  pixmap = static_cast<Ecore_X_Pixmap>(livebox_client_get_pixmap(mLiveboxHandle));
-
-  if (pixmap == 0)
-  {
-    // error
-    DALI_LOG_WARNING("invalid pixmap\n");
-    return;
-  }
-
-  // create pixmap surface
-  CreateSurface(pixmap);
-
-  mContent = content;
-  mPeriod = period;
-
-  // create adaptor
-  mAdaptor = new Dali::Adaptor(*mSurface);
-
-  DALI_LOG_INFO(gLiveboxPluginLogFilter, Debug::General, "[%s] pixmap[%x] content(%s)\n", __FUNCTION__, pixmap, content.c_str());
-
-  // adaptor start
-  mAdaptor->Start();
-
-  // get size type
-  mBoxSizeType = static_cast<LiveboxSizeType>(livebox_service_size_type(width, height));
-
-  // signal init to livebox
-  mInitializedSignalV2.Emit( mLiveboxPlugin );
-  mInitializedSignal(mLiveboxPlugin); // deprecated
-}
-
-void LiveboxPlugin::OnLiveboxDestroyed()
-{
-  livebox_client_destroy(mLiveboxHandle);
-  mLiveboxHandle = NULL;
-
-  // disconnect pixmap damage notify
-  ecore_event_handler_del(mDamageEventHandler);
-  QuitFromMainLoop();
-}
-
-void LiveboxPlugin::OnLiveboxResized(int resizedWidth, int resizedHeight)
-{
-  Ecore_X_Pixmap pixmap;
-
-  livebox_client_destroy(mLiveboxHandle);
-
-  mLiveboxHandle = livebox_client_create(false, resizedWidth, resizedHeight);
-
-  // get new livebox buffer
-  pixmap = static_cast<Ecore_X_Pixmap>(livebox_client_get_pixmap(mLiveboxHandle));
-
-  if (pixmap == 0)
-  {
-    // error
-    DALI_LOG_WARNING("invalid pixmap\n");
-    return;
-  }
-
-  //2 replace surface for adaptor
-  // remember old surface
-  Dali::RenderSurface* oldSurface = mSurface;
-
-  CreateSurface(pixmap);
-
-  // the surface will be replaced the next time Dali draws
-  mAdaptor->ReplaceSurface( *mSurface ); // this method is synchronous
-  // its now safe to delete the old surface
-  delete oldSurface;
-
-  // get size type
-  mBoxSizeType = static_cast<LiveboxSizeType>(livebox_service_size_type(resizedWidth, resizedHeight));
-
-  // Emit resized signal to application
-  mResizedSignalV2.Emit( mLiveboxPlugin );
-  mResizedSignal(mLiveboxPlugin); // deprecated
-}
-
-void LiveboxPlugin::OnLiveboxTouchEvent(TouchPoint& point, unsigned int timeStamp)
-{
-  mAdaptor->FeedTouchPoint( point, timeStamp );
-}
-
-void LiveboxPlugin::OnPeriodUpdated(double period)
-{
-  mPeriod = period;
-
-  // Emit period updated signal to application
-  mPeriodUpdatedSignal(mLiveboxPlugin);
-}
-
-void LiveboxPlugin::OnUpdateRequested()
-{
-  // Emit update requested signal to application
-  mUpdateRequestedSignal(mLiveboxPlugin);
-}
-
-void LiveboxPlugin::OnGlanceCreated(int arrowX, int arrowY, int width, int height)
-{
-  // store pd information
-  mGlanceGeometry = PositionSize(arrowX, arrowY, width, height);
-  mGlanceCreatedSignalV2.Emit( mLiveboxPlugin );
-  mGlanceCreatedSignal(mLiveboxPlugin); // deprecated
-}
-
-void LiveboxPlugin::OnGlanceDestroyed()
-{
-  // make pd information as invalid
-  mGlanceGeometry = PositionSize(-1, -1, -1, -1);
-  mGlanceDestroyedSignalV2.Emit( mLiveboxPlugin );
-  mGlanceDestroyedSignal(mLiveboxPlugin); // deprecated
-}
-
-void LiveboxPlugin::OnGlanceTouchEvent()
-{
-  // TODO: handle the touch point
-
-  mGlanceTouchedSignalV2.Emit( mLiveboxPlugin );
-  mGlanceTouchedSignal(mLiveboxPlugin); // deprecated
-}
-
-void LiveboxPlugin::OnGlanceMoved(int arrowX, int arrowY, int width, int height)
-{
-  // TODO: need to do something here?
-  mGlanceGeometry = PositionSize(arrowX, arrowY, width, height);
-  mGlanceMovedSignalV2.Emit( mLiveboxPlugin );
-  mGlanceMovedSignal(mLiveboxPlugin); // deprecated
-}
-
-void LiveboxPlugin::OnGlanceScriptEventCallback(std::string emission, std::string source, struct livebox_event_info *info)
-{
-  mGlanceBarEventInfo.emission = emission;
-  mGlanceBarEventInfo.source = source;
-
-  mGlanceBarEventInfo.pointer.x = info->pointer.x;
-  mGlanceBarEventInfo.pointer.y = info->pointer.y;
-  mGlanceBarEventInfo.pointer.down = info->pointer.down;
-
-  mGlanceBarEventInfo.part.sx = info->part.sx;
-  mGlanceBarEventInfo.part.sy = info->part.sy;
-  mGlanceBarEventInfo.part.ex = info->part.ex;
-  mGlanceBarEventInfo.part.ey = info->part.ey;
-
-  mGlanceScriptEventSignalV2.Emit( mLiveboxPlugin );
-  mGlanceScriptEventSignal(mLiveboxPlugin); // deprecated
-}
-
-void LiveboxPlugin::OnDamaged()
-{
-  PositionSize pixmapSize = mSurface->GetPositionSize();
-
-  if(!mTitle.empty())
-  {
-    livebox_client_update_box(pixmapSize.width, pixmapSize.height, mContent.c_str(), mTitle.c_str());
-  }
-  else
-  {
-    livebox_client_update_box(pixmapSize.width, pixmapSize.height, mContent.c_str(), mName.c_str());
-  }
-}
-
-void LiveboxPlugin::OnTerminate()
-{
-  // we've been told to quit by AppCore, ecore_x_destroy has been called, need to quit synchronously
-  QuitFromMainLoop();
-}
-
-void LiveboxPlugin::OnPause()
-{
-  mAdaptor->Pause();
-  mPausedSignalV2.Emit( mLiveboxPlugin );
-  mPausedSignal(mLiveboxPlugin); // deprecated
-}
-
-void LiveboxPlugin::OnResume()
-{
-  mResumedSignalV2.Emit( mLiveboxPlugin );
-  mResumedSignal(mLiveboxPlugin); // deprecated
-  mAdaptor->Resume();
-}
-
-void LiveboxPlugin::OnReset()
-{
-  // initialize liblivebox-client
-  int ret;
-
-  // callback functions which will be called from liblivebox-client
-  struct livebox_event_table table;
-
-  /**
-   * For Livebox
-   */
-  table.create = LiveboxCreated; // called once the livebox instance is created
-  table.destroy = LiveboxDestroyed; // called when the livebox instance was deleted
-  table.event = LiveboxEventCallback;
-  table.resize = LiveboxResized; // called whenever the livebox instance is resized
-
-  /**
-   * For Glance bar
-   */
-  table.create_glance = GlanceCreated; // called when pd should be opened
-  table.destroy_glance = GlanceDestroyed; // called when pd should be closed
-  table.event_glance = GlanceEventCallback;
-  table.move_glance = GlanceMoved;
-  table.script_event = GlanceScriptEventCalback;
-
-  /**
-   * For Client
-   */
-  table.pause = LiveboxClientPaused; // called when the livebox is invisible
-  table.resume = LiveboxClientResumed; // called when the livebox is visible again
-  table.update = LiveboxClientUpdated;
-  table.set_period = LiveboxClientSetPeriod;
-
-  table.data = this;
-
-  ret = livebox_client_initialize(mFramework->GetBundleId().c_str(), &table);
-
-  DALI_LOG_INFO(gLiveboxPluginLogFilter, Debug::General, "[%s] livebox_client_initialize with bundle id(%s) returns %d\n", __FUNCTION__, mFramework->GetBundleId().c_str(), ret);
-
-  if(ret < 0)
-  {
-    OnTerminate();
-    return;
-  }
-
-  mInitialized = true;
-}
-
-void LiveboxPlugin::OnLanguageChanged()
-{
-  mLanguageChangedSignalV2.Emit( mLiveboxPlugin );
-  mLanguageChangedSignal(mLiveboxPlugin); // deprecated
-}
-
-bool LiveboxPlugin::AddIdle(boost::function<void(void)> callBack)
-{
-  return mAdaptor->AddIdle(callBack);
-}
-
-Dali::LiveboxPlugin& LiveboxPlugin::Get()
-{
-  DALI_ASSERT_ALWAYS( gThreadLocalLivebox.get() != NULL && "LiveboxPlugin not instantiated" );
-
-  return gThreadLocalLivebox->mLiveboxPlugin;
-}
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
-
diff --git a/adaptors/tizen/internal/livebox-plugin-impl.h b/adaptors/tizen/internal/livebox-plugin-impl.h
deleted file mode 100644 (file)
index 54960fb..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-#ifndef __DALI_INTERNAL_LIVEBOX_H__
-#define __DALI_INTERNAL_LIVEBOX_H__
-
-/*
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <boost/bind.hpp>
-#include <boost/function.hpp>
-#include <boost/thread.hpp>
-
-#include <dali/public-api/math/rect.h>
-#include <dali/integration-api/events/touch-event-integ.h>
-
-#include <Ecore_X.h>
-#include <Ecore.h>
-
-#include <livebox-client.h>
-
-// INTERNAL INCLUDES
-#include <public-api/adaptor-framework/livebox-plugin.h>
-#include <internal/framework.h>
-
-namespace Dali
-{
-
-class Adaptor;
-
-namespace Internal
-{
-
-namespace Adaptor
-{
-
-class CommandLineOptions;
-class EventLoop;
-
-typedef Dali::Rect<int> PositionSize;
-
-namespace ECoreX
-{
-class RenderSurface;
-}
-
-/**
- * Implementation of the LiveboxPlugin class.
- */
-class LiveboxPlugin : public Framework::Observer
-{
-public:
-
-  typedef Dali::LiveboxPlugin::LiveboxPluginSignalV2 LiveboxPluginSignalV2;
-
-  /**
-   * Constructor
-   * @param[in]  livebox         The public instance of the LiveboxPlugin
-   * @param[in]  argc        A pointer to the number of arguments
-   * @param[in]  argv        A pointer to the argument list
-   * @param[in]  name        A name of livebox
-   * @param[in]  baseLayout  The base layout that the livebox has been written for
-   */
-  LiveboxPlugin(Dali::LiveboxPlugin& livebox, int* argc, char **argv[], const std::string& name, const DeviceLayout& baseLayout);
-
-  /**
-   * Destructor
-   */
-  virtual ~LiveboxPlugin();
-
-public:
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::SetTitle()
-   */
-  void SetTitle(const std::string& title) {mTitle = title; };
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::SetContent()
-   */
-  void SetContent(const std::string& content) {mContent = content; };
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::GetGlanceBarGeometry()
-   */
-  const PositionSize& GetGlanceBarGeometry() const { return mGlanceGeometry; };
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::GetGlanceBarEventInfo()
-   */
-  const GlanceBarEventInfo& GetGlanceBarEventInfo() const { return mGlanceBarEventInfo; };
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::GetLiveboxSizeType()
-   */
-  LiveboxSizeType GetLiveboxSizeType() const { return mBoxSizeType; };
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::Run()
-   */
-  void Run();
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::Quit()
-   */
-  void Quit();
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::AddIdle()
-   */
-  bool AddIdle(boost::function<void(void)> callBack);
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::Get();
-   */
-  static Dali::LiveboxPlugin& Get();
-
-
-public: // From Framework::Observer
-
-  /**
-   * Called when the framework is initialised.
-   */
-  virtual void OnInit();
-
-  /**
-   * Called when the framework is terminated.
-   */
-  virtual void OnTerminate();
-
-  /**
-   * Called when the framework is paused.
-   */
-  virtual void OnPause();
-
-  /**
-   * Called when the framework resumes from a paused state.
-   */
-  virtual void OnResume();
-
-  /**
-   * Called when the framework informs the livebox that it should reset itself.
-   */
-  virtual void OnReset();
-
-  /**
-   * Called when the framework informs the livebox that the language of the device has changed.
-   */
-  virtual void OnLanguageChanged();
-
-public:
-  /**
-   * Client handlers
-   */
-
-  /**
-   * Notify the livebox was created.
-   *
-   * @param[in] pkgname package name
-   * @param[in] id livebox id string
-   * @param[in] content content string of livebox
-   * @param[in] width width of livebox
-   * @param[in] height height of livebox
-   */
-  void OnLiveboxCreated(const std::string& content, int width, int height, double period);
-
-  /**
-   * Notify the livebox should be destroyed.
-   */
-  void OnLiveboxDestroyed();
-
-  /**
-   * Notify the client should be resized.
-   *
-   * @param[in] resizedWidth new width of livebox
-   * @param[in] resizedHeight new height of livebox
-   */
-  void OnLiveboxResized(int resizedWidth, int resizedHeight);
-
-  /**
-   * Send event to livebox.
-   *
-   * @param[in] point touch point
-   * @param[in] timeStamp time value of event
-   */
-  void OnLiveboxTouchEvent(TouchPoint& point, unsigned int timeStamp);
-
-  void OnPeriodUpdated(double period);
-  void OnUpdateRequested();
-
-  /**
-   * Notify the glance was created.
-   *
-   * @param[in] pdWidth width of pd
-   * @param[in] pdHeight height of pd
-   * @param[in] arrowX x position of pd's arrow
-   * @param[in] arrowY y position of pd's arrow
-   */
-  void OnGlanceCreated(int width, int height, int arrowX, int arrowY);
-
-  /**
-   * Notify the glance should be destroyed.
-   */
-  void OnGlanceDestroyed();
-
-  void OnGlanceTouchEvent();
-  void OnGlanceMoved(int arrowX, int arrowY, int width, int height);
-  void OnGlanceScriptEventCallback(std::string emission, std::string source, struct livebox_event_info *info);
-
-  /**
-   * Notify the surface was damaged.
-   * When it was damager, this client should send update to master
-   */
-  void OnDamaged();
-
-public:  // Signals
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::InitializedSignal()
-   */
-  LiveboxPluginSignalV2& InitializedSignal() { return mInitializedSignalV2; }
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::TerminatedSignal()
-   */
-  LiveboxPluginSignalV2& TerminatedSignal() { return mTerminatedSignalV2; }
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::PausedSignal()
-   */
-  LiveboxPluginSignalV2& PausedSignal() { return mPausedSignalV2; }
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::ResumedSignal()
-   */
-  LiveboxPluginSignalV2& ResumedSignal() { return mResumedSignalV2; }
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::ResizedSignal()
-   */
-  LiveboxPluginSignalV2& ResizedSignal() { return mResizedSignalV2; }
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::GlanceCreatedSignal()
-   */
-  LiveboxPluginSignalV2& GlanceCreatedSignal() { return mGlanceCreatedSignalV2; }
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::GlanceDestroyedSignal()
-   */
-  LiveboxPluginSignalV2& GlanceDestroyedSignal() { return mGlanceDestroyedSignalV2; }
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::GlanceTouchedSignal()
-   */
-  LiveboxPluginSignalV2& GlanceTouchedSignal() { return mGlanceTouchedSignalV2; }
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::GlanceMovedSignal()
-   */
-  LiveboxPluginSignalV2& GlanceMovedSignal() { return mGlanceMovedSignalV2; }
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::GlanceScriptEventSignal()
-   */
-  LiveboxPluginSignalV2& GlanceScriptEventSignal() { return mGlanceScriptEventSignalV2; }
-
-  /**
-   * @copydoc Dali::LiveboxPlugin::LanguageChangedSignal()
-   */
-  LiveboxPluginSignalV2& LanguageChangedSignal() { return mLanguageChangedSignalV2; }
-
-private:
-
-  // Undefined
-  LiveboxPlugin(const LiveboxPlugin&);
-  LiveboxPlugin& operator=(LiveboxPlugin&);
-
-private:
-
-  /**
-   * Create pixmap surface for mSurface.
-   * If there is no mSurface, it will create mSurface with new display.
-   * If mSurface is existed already, then it uses existed display but overwrite mSurface by new one
-   * It make a callback for damage notify automatically
-   */
-  void CreateSurface(Ecore_X_Pixmap pixmap);
-
-  /**
-   * Quits from the main loop
-   */
-  void QuitFromMainLoop();
-
-private:
-
-  LiveboxPluginSignalV2      mInitializedSignalV2;
-  LiveboxPluginSignalV2      mTerminatedSignalV2;
-  LiveboxPluginSignalV2      mPausedSignalV2;
-  LiveboxPluginSignalV2      mResumedSignalV2;
-  LiveboxPluginSignalV2      mResizedSignalV2;
-  LiveboxPluginSignalV2      mGlanceCreatedSignalV2;
-  LiveboxPluginSignalV2      mGlanceDestroyedSignalV2;
-  LiveboxPluginSignalV2      mGlanceTouchedSignalV2;
-  LiveboxPluginSignalV2      mGlanceMovedSignalV2;
-  LiveboxPluginSignalV2      mGlanceScriptEventSignalV2;
-  LiveboxPluginSignalV2      mLanguageChangedSignalV2;
-
-  Dali::LiveboxPlugin&                    mLiveboxPlugin;
-
-  Framework*                            mFramework;
-
-  CommandLineOptions*                   mCommandLineOptions;
-
-  Dali::Adaptor*                        mAdaptor;
-  std::string                           mName;
-
-  bool                                  mInitialized;
-  DeviceLayout                          mBaseLayout;
-
-  // client properties
-  livebox_h mLiveboxHandle;
-  std::string mTitle;
-  std::string mContent;
-  double mPeriod;
-
-  PositionSize mGlanceGeometry;
-  GlanceBarEventInfo mGlanceBarEventInfo;
-
-  LiveboxSizeType mBoxSizeType;
-
-public:
-  /* for rendering control : these public members will be used in static function */
-  Ecore_Event_Handler*                        mDamageEventHandler;
-  Ecore_X_Damage                              mDamage;
-  ECoreX::RenderSurface*                      mSurface;
-
-public:
-  inline static LiveboxPlugin& GetImplementation(Dali::LiveboxPlugin& livebox) { return *livebox.mImpl; }
-};
-
-} // namespace Adaptor
-
-} // namespace Internal
-
-} // namespace Dali
-
-#endif // __DALI_INTERNAL_LIVEBOX_H__
-
diff --git a/adaptors/tizen/internal/mobile/application-file.list b/adaptors/tizen/internal/mobile/application-file.list
deleted file mode 100644 (file)
index 91acd8f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# Application
-
-tizen_evas_plugin_internal_src_files = \
-  $(tizen_evas_plugin_internal_src_dir)/evas-plugin-impl.cpp
-
-tizen_native_buffer_plugin_internal_src_files = \
-  $(tizen_native_buffer_plugin_internal_src_dir)/native-buffer-plugin-impl.cpp
diff --git a/adaptors/tizen/internal/mobile/file.list b/adaptors/tizen/internal/mobile/file.list
deleted file mode 100644 (file)
index 800acdc..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# mobile profile internal files
-tizen_adaptor_internal_common_src_files += \
-  $(tizen_adaptor_internal_src_dir)/key-impl.cpp  \
-  $(tizen_adaptor_internal_src_dir)/../mobile/mobile-render-surface-factory.cpp \
-  $(tizen_adaptor_internal_src_dir)/../mobile/mobile-native-buffer-render-surface.cpp \
-  $(tizen_adaptor_internal_src_dir)/../mobile/mobile-system-settings.cpp \
-  $(tizen_adaptor_internal_src_dir)/../mobile/mobile-color-controller-impl.cpp
diff --git a/adaptors/tizen/internal/tv/file.list b/adaptors/tizen/internal/tv/file.list
deleted file mode 100644 (file)
index 6bde20f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# tv profile internal files
-tizen_adaptor_internal_common_src_files += \
-  $(tizen_adaptor_internal_src_dir)/../tv/tv-key-impl.cpp  \
-  $(tizen_adaptor_internal_src_dir)/../tv/tv-render-surface-factory.cpp \
-  $(tizen_adaptor_internal_src_dir)/../tv/tv-system-settings.cpp \
-  $(tizen_adaptor_internal_src_dir)/../tv/tv-color-controller-impl.cpp
diff --git a/adaptors/tizen/public-api/adaptor-framework/application-file.list b/adaptors/tizen/public-api/adaptor-framework/application-file.list
deleted file mode 100644 (file)
index be2bac5..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# Public source files
-tizen_application_public_api_src_files = \
-  $(tizen_application_public_api_src_dir)/adaptor-framework/application.cpp
-
-# Exported header files
-tizen_application_public_api_header_files = \
-  $(tizen_application_public_api_src_dir)/adaptor-framework/application.h
-
diff --git a/adaptors/tizen/public-api/adaptor-framework/mobile/application-file.list b/adaptors/tizen/public-api/adaptor-framework/mobile/application-file.list
deleted file mode 100644 (file)
index b9ace55..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# Public source files
-tizen_evas_plugin_public_api_src_files = \
-  $(tizen_evas_plugin_public_api_src_dir)/adaptor-framework/mobile/evas-plugin.cpp
-
-tizen_native_buffer_plugin_public_api_src_files = \
-  $(tizen_native_buffer_plugin_public_api_src_dir)/adaptor-framework/mobile/native-buffer-plugin.cpp
-
-#tizen_evas_plugin_public_api_header_files =
-#  EXPORTED IN CAPI
-#  $(tizen_evas_plugin_public_api_src_dir)/adaptor-framework/evas-plugin.h
-
-#tizen_native_buffer_plugin_public_api_header_files =
-#  EXPORTED IN CAPI
-#  $(tizen_native_buffer_plugin_public_api_src_dir)/adaptor-framework/native-buffer-plugin.h
-
diff --git a/adaptors/tizen/public-api/dali.h b/adaptors/tizen/public-api/dali.h
deleted file mode 100644 (file)
index 2808a1f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef __DALI_H__
-#define __DALI_H__
-
-/*
- * 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.
- *
- */
-
-#include <dali/public-api/dali-core.h>
-#include <dali/public-api/dali-adaptor-capi-internal.h>
-
-// Application / UI Framework adaption
-
-// These defines come from running pkg-config --cflags with the correct package config file
-
-#if defined(DALI_LIVEBOX_PLUGIN)
-#include <dali/public-api/adaptor-framework/livebox-plugin.h>
-#endif
-
-#if defined(DALI_APPLICATION)
-#include <dali/public-api/adaptor-framework/application.h>
-#endif
-
-#include <dali/public-api/adaptor-framework/common/accessibility-action-handler.h>
-#include <dali/public-api/adaptor-framework/common/accessibility-gesture-handler.h>
-#include <dali/public-api/adaptor-framework/common/event-feeder.h>
-#include <dali/public-api/adaptor-framework/common/color-controller.h>
-#include <dali/public-api/adaptor-framework/common/feedback-plugin.h>
-#include <dali/public-api/adaptor-framework/common/physical-keyboard.h>
-#include <dali/public-api/adaptor-framework/common/tilt-sensor.h>
-
-#endif //__DALI_H__
diff --git a/adaptors/tizen/public-api/file.list b/adaptors/tizen/public-api/file.list
deleted file mode 100644 (file)
index 581568f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# Add local source files here
-
-tizen_adaptor_public_api_src_files = \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/accessibility-manager.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/adaptor.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/clipboard.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/clipboard-event-notifier.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/color-controller.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/device-layout.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/drag-and-drop-detector.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/event-feeder.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/haptic-player.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/imf-manager.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/key.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/orientation.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/physical-keyboard.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/pixmap-image.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/render-surface.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/sound-player.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/style-monitor.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/tilt-sensor.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/timer.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/tts-player.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/virtual-keyboard.cpp \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/window.cpp
-
-tizen_adaptor_public_api_common_header_files = \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/accessibility-action-handler.h \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/accessibility-gesture-handler.h \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/color-controller.h \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/event-feeder.h \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/feedback-plugin.h \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/physical-keyboard.h \
-  $(tizen_adaptor_public_api_src_dir)/adaptor-framework/common/tilt-sensor.h
-
-tizen_adaptor_dali_header_file = \
-  $(tizen_adaptor_public_api_src_dir)/dali.h
diff --git a/adaptors/tv/file.list b/adaptors/tv/file.list
new file mode 100644 (file)
index 0000000..4b511a7
--- /dev/null
@@ -0,0 +1,6 @@
+# tv profile internal files
+adaptor_common_internal_src_files += \
+  $(adaptor_common_dir)/../tv/tv-key-impl.cpp  \
+  $(adaptor_common_dir)/../tv/tv-render-surface-factory.cpp \
+  $(adaptor_common_dir)/../tv/tv-system-settings.cpp \
+  $(adaptor_common_dir)/../tv/tv-color-controller-impl.cpp
\ No newline at end of file
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include <internal/common/color-controller-impl.h>
+#include <common/color-controller-impl.h>
 
 namespace Dali
 {
similarity index 99%
rename from adaptors/tizen/internal/tv/tv-key-impl.cpp
rename to adaptors/tv/tv-key-impl.cpp
index 2fcc86c..a643571 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include <internal/common/key-impl.h>
+#include <key-impl.h>
 
 // EXTERNAL INCLUDES
 #include <utilX.h>
@@ -15,7 +15,7 @@
  *
  */
 
-#include <internal/common/ecore-x/pixmap-render-surface.h>
+#include <pixmap-render-surface.h>
 
 namespace Dali
 {
@@ -26,7 +26,7 @@ namespace Internal
 namespace Adaptor
 {
 
-namespace ECoreX
+namespace ECore
 {
 
 DALI_EXPORT_API RenderSurface* CreatePixmapSurface(
similarity index 95%
rename from adaptors/tizen/internal/tv/tv-system-settings.cpp
rename to adaptors/tv/tv-system-settings.cpp
index 0e70d3d..53501cf 100644 (file)
@@ -20,7 +20,7 @@
 #include <Elementary.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/system-settings.h>
+#include <system-settings.h>
 
 namespace Dali
 {
diff --git a/adaptors/wayland/accessibility-manager-impl-wl.cpp b/adaptors/wayland/accessibility-manager-impl-wl.cpp
new file mode 100644 (file)
index 0000000..b57bc54
--- /dev/null
@@ -0,0 +1,334 @@
+/*
+ * 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 "accessibility-manager-impl.h"
+
+// EXTERNAL INCLUDES
+#include <vconf.h>
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+#include <Elementary.h>
+
+#include <dali/public-api/dali-core.h>
+#include <dali/integration-api/debug.h>
+#include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/events/gesture-requests.h>
+#include "system-settings.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+bool AccessibilityManager::HandleActionNextEvent(bool allowEndFeedback)
+{
+  bool ret = false;
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionNext signal in first, AccessibilityActionNext for handler in next
+   */
+  if( !mIndicatorFocused )
+  {
+    if( !mActionNextSignalV2.Empty() )
+    {
+      mActionNextSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionNext(allowEndFeedback);
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionPreviousEvent(bool allowEndFeedback)
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+   /*
+   * In order to application decide reading action first,
+   * emit ActionPrevious signal in first, AccessibilityActionPrevious for handler in next
+   */
+ if ( !mIndicatorFocused )
+  {
+    if( !mActionPreviousSignalV2.Empty() )
+    {
+      mActionPreviousSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionPrevious(allowEndFeedback);
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionActivateEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionActivate signal in first, AccessibilityActionActivate for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionActivateSignalV2.Empty() )
+    {
+      mActionActivateSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionActivate();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain)
+{
+  bool ret = false;
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %d , %d\n", __FUNCTION__, __LINE__, x, y);
+
+  mReadPosition.x = x;
+  mReadPosition.y = y;
+
+  Dali::AccessibilityManager handle( this );
+
+  bool indicatorFocused = false;
+
+  // Check whether the Indicator is focused
+  if( mIndicator && mIndicator->IsConnected() )
+  {
+    // Check the position and size of Indicator actor
+    Dali::Actor indicatorActor = mIndicator->GetActor();
+    Vector3 position = Vector3(0.0f, 0.0f, 0.0f);
+    Vector3 size = indicatorActor.GetCurrentSize();
+
+    if(mReadPosition.x >= position.x &&
+       mReadPosition.x <= position.x + size.width &&
+       mReadPosition.y >= position.y &&
+       mReadPosition.y <= position.y + size.height)
+    {
+      indicatorFocused = true;
+      DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] Indicator area!!!!\n", __FUNCTION__, __LINE__);
+    }
+  }
+
+  if( mIndicator )
+  {
+    if( !mIndicatorFocused && indicatorFocused )
+    {
+      // If Indicator is focused, the focus should be cleared in Dali focus chain.
+      if( mActionHandler )
+      {
+        mActionHandler->ClearAccessibilityFocus();
+      }
+    }
+    else if( mIndicatorFocused && !indicatorFocused )
+    {
+    }
+
+    mIndicatorFocused = indicatorFocused;
+
+    // Send accessibility READ action information to Indicator
+    if( mIndicatorFocused )
+    {
+    }
+  }
+
+  if(allowReadAgain)
+  {
+    /*
+     * In order to application decide reading action first,
+     * emit ActionRead signal in first, AccessibilityActionRead for handler in next
+     */
+    if( !mIndicatorFocused )
+    {
+      if ( !mActionReadSignalV2.Empty() )
+      {
+        mActionReadSignalV2.Emit( handle );
+      }
+    }
+  }
+  else
+  {
+    /*
+     * In order to application decide reading action first,
+     * emit ActionRead signal in first, AccessibilityActionRead for handler in next
+     */
+    if( !mIndicatorFocused )
+    {
+      if ( !mActionOverSignalV2.Empty() )
+      {
+        mActionOverSignalV2.Emit( handle );
+      }
+    }
+  }
+
+  if( mActionHandler && !mIndicatorFocused)
+  {
+    // If Indicator is not focused, the accessibility actions should be handled by the registered
+    // accessibility action handler (e.g. focus manager)
+    ret = mActionHandler->AccessibilityActionRead(allowReadAgain);
+    DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+  }
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionReadNextEvent(bool allowEndFeedback)
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionReadNext signal in first, AccessibilityActionReadNext for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionReadNextSignalV2.Empty() )
+    {
+      mActionReadNextSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionReadNext(allowEndFeedback);
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionReadPreviousEvent(bool allowEndFeedback)
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionReadPrevious signal in first, AccessibilityActionReadPrevious for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionReadPreviousSignalV2.Empty() )
+    {
+      mActionReadPreviousSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionReadPrevious(allowEndFeedback);
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionUpEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionUp signal in first, AccessibilityActionUp for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionUpSignalV2.Empty() )
+    {
+      mActionUpSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionUp();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+bool AccessibilityManager::HandleActionDownEvent()
+{
+  bool ret = false;
+
+  Dali::AccessibilityManager handle( this );
+
+  /*
+   * In order to application decide reading action first,
+   * emit ActionDown signal in first, AccessibilityActionDown for handler in next
+   */
+  if ( !mIndicatorFocused )
+  {
+    if( !mActionDownSignalV2.Empty() )
+    {
+      mActionDownSignalV2.Emit( handle );
+    }
+  }
+
+  if( mActionHandler )
+  {
+    ret = mActionHandler->AccessibilityActionDown();
+  }
+
+  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+  return ret;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/clipboard-impl-wl.cpp b/adaptors/wayland/clipboard-impl-wl.cpp
new file mode 100644 (file)
index 0000000..987530e
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * 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 "clipboard-impl.h"
+
+// EXTERNAL INCLUDES
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+#include <dali/public-api/dali-core.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <adaptor.h>
+#include <dali/public-api/object/any.h>
+#include <adaptor-impl.h>
+
+namespace //unnamed namespace
+{
+const char* const CBHM_WINDOW = "CBHM_XWIN";
+const char* const CBHM_MSG = "CBHM_MSG";
+const char* const CBHM_ITEM = "CBHM_ITEM";
+const char* const CBHM_cCOUNT = "CBHM_cCOUNT";
+const char* const CBHM_ERROR = "CBHM_ERROR";
+const char* const SET_ITEM = "SET_ITEM";
+const char* const SHOW = "show0";
+const char* const HIDE = "cbhm_hide";
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Clipboard
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+BaseHandle Create()
+{
+  BaseHandle handle( Clipboard::Get() );
+
+  return handle;
+}
+TypeRegistration CLIPBOARD_TYPE( typeid(Dali::Clipboard), typeid(Dali::BaseHandle), Create, true /* Create Instance At Startup */ );
+
+} // unnamed namespace
+
+Clipboard::~Clipboard()
+{
+}
+
+Dali::Clipboard Clipboard::Get()
+{
+  Dali::Clipboard clipboard;
+
+  if ( Adaptor::IsAvailable() )
+  {
+    // Check whether the singleton is already created
+    Dali::BaseHandle handle = Adaptor::Get().GetSingleton( typeid( Dali::Clipboard ) );
+    if(handle)
+    {
+      // If so, downcast the handle
+      clipboard = Dali::Clipboard( dynamic_cast< Clipboard* >( handle.GetObjectPtr() ) );
+    }
+  }
+
+  return clipboard;
+}
+bool Clipboard::SetItem(const std::string &itemData )
+{
+  return true;
+}
+
+/*
+ * Get string at given index of clipboard
+ */
+std::string Clipboard::GetItem( unsigned int index )  // change string to a Dali::Text object.
+{
+  if ( index >= NumberOfItems() )
+  {
+    return "";
+  }
+
+  std::string emptyString( "" );
+  char sendBuf[20];
+
+  snprintf( sendBuf, 20,  "%s%d", CBHM_ITEM, index );
+  return emptyString;
+}
+
+/*
+ * Get number of items in clipboard
+ */
+unsigned int Clipboard::NumberOfItems()
+{
+  int count = -1;
+
+  return count;
+}
+
+/**
+ * Show clipboard window
+ * Function to send message to show the Clipboard (cbhm) as no direct API available
+ * Reference elementary/src/modules/ctxpopup_copypasteUI/cbhm_helper.c
+ */
+void Clipboard::ShowClipboard()
+{
+}
+
+void Clipboard::HideClipboard()
+{
+}
+
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/clipboard-impl.h b/adaptors/wayland/clipboard-impl.h
new file mode 100644 (file)
index 0000000..e09ce42
--- /dev/null
@@ -0,0 +1,106 @@
+#ifndef __DALI_INTERNAL_CLIPBOARD_H__
+#define __DALI_INTERNAL_CLIPBOARD_H__
+
+/*
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <clipboard.h>
+#include <dali/public-api/object/base-object.h>
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+
+
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+/**
+ * Implementation of the Clip Board
+ */
+
+class Clipboard :  public Dali::BaseObject
+{
+public:
+
+  /**
+   * @copydoc Dali::ClipboardEventNotifier::Get()
+   */
+  static Dali::Clipboard Get();
+
+  virtual ~Clipboard();
+
+  /**
+   * @copydoc Dali::Clipboard::SetItem()
+   */
+  bool SetItem(const std::string &itemData);
+
+  /**
+   * @copydoc Dali::Clipboard::GetItem()
+   */
+  std::string GetItem( unsigned int index );
+
+  /**
+   * @copydoc Dali::Clipboard::NumberOfClipboardItems()
+   */
+  unsigned int NumberOfItems();
+
+  /**
+   * @copydoc Dali::Clipboard::ShowClipboard()
+   */
+  void ShowClipboard();
+
+  /**
+   * @copydoc Dali::Clipboard::HideClipboard()
+   */
+  void HideClipboard();
+
+  
+private:
+  Clipboard( const Clipboard& );
+  Clipboard& operator=( Clipboard& );
+
+}; // class clipboard
+
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+  inline static Internal::Adaptor::Clipboard& GetImplementation(Dali::Clipboard& clipboard)
+  {
+    DALI_ASSERT_ALWAYS( clipboard && "Clipboard handle is empty" );
+    BaseObject& handle = clipboard.GetBaseObject();
+    return static_cast<Internal::Adaptor::Clipboard&>(handle);
+  }
+
+  inline static const  Internal::Adaptor::Clipboard& GetImplementation(const Dali::Clipboard& clipboard)
+  {
+    DALI_ASSERT_ALWAYS( clipboard && "Clipboard handle is empty" );
+    const BaseObject& handle = clipboard.GetBaseObject();
+    return static_cast<const Internal::Adaptor::Clipboard&>(handle);
+  }
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_CLIPBOARD_H__
diff --git a/adaptors/wayland/ecore-wl-render-surface-factory.cpp b/adaptors/wayland/ecore-wl-render-surface-factory.cpp
new file mode 100644 (file)
index 0000000..0541747
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ *
+ */
+
+#include <ecore-wl-render-surface.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace ECore
+{
+
+DALI_EXPORT_API RenderSurface* CreatePixmapSurface(
+  PositionSize       positionSize,
+  Any                surface,
+  Any                display,
+  const std::string& name,
+  bool               isTransparent )
+{
+  return NULL;
+}
+
+} // namespace ECore
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+
+
diff --git a/adaptors/wayland/ecore-wl-render-surface-factory.h b/adaptors/wayland/ecore-wl-render-surface-factory.h
new file mode 100644 (file)
index 0000000..5406dcd
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef __DALI_INTERNAL_ADAPTOR_ECORE_WL_RENDER_SURFACE_FACTORY_H__
+#define __DALI_INTERNAL_ADAPTOR_ECORE_WL_RENDER_SURFACE_FACTORY_H__
+
+/*
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <boost/any.hpp>
+#include <string>
+#include <dali/public-api/math/rect.h>
+#include <dali/public-api/common/dali-common.h>
+
+// INTERNAL INCLUDES
+#include <native-buffer-pool.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace ECore
+{
+
+class RenderSurface;
+
+/**
+ * Surface factory function for pixmap
+ * A pixmap surface is created.
+ *
+ * @param [in] type the type of surface to create
+ * @param [in] positionSize the position and size of the surface to create
+ * @param [in] display Wayland Pixmap to use, or null for default.
+ * @param [in] display Wayland Display to use, or null for default.
+ * @param [in] name Name of surface passed in
+ * @param [in] isTransparent Whether the surface has an alpha channel
+ */
+DALI_IMPORT_API RenderSurface* CreatePixmapSurface(
+  PositionSize       positionSize,
+  Any         surface,
+  Any         display,
+  const std::string& name,
+  bool               isTransparent );
+
+} // namespace ECore
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif //  __DALI_INTERNAL_ADAPTOR_ECORE_X_RENDER_SURFACE_FACTORY_H__
diff --git a/adaptors/wayland/ecore-wl-render-surface.cpp b/adaptors/wayland/ecore-wl-render-surface.cpp
new file mode 100644 (file)
index 0000000..0345024
--- /dev/null
@@ -0,0 +1,308 @@
+/*
+ * 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 "ecore-wl-render-surface.h"
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/gl-abstraction.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <ecore-wl-types.h>
+#include <trigger-event.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gRenderSurfaceLogFilter = Debug::Filter::New(Debug::Verbose, false, "LOG_ECORE_X_RENDER_SURFACE");
+#endif
+
+namespace ECore
+{
+
+namespace
+{
+
+const float MINIMUM_DIMENSION_CHANGE = 1.0f; ///< Minimum change for window to be considered to have moved
+static bool gWlInitThreadsCalled = false;     ///< global to say whether WlInitThreads has been called in this process
+const unsigned int MICROSECONDS_PER_SECOND = 1000000;
+const unsigned int MILLISECONDS_PER_SECOND = 1000;
+
+} // unnamed namespace
+
+RenderSurface::RenderSurface( SurfaceType type,
+                              Dali::PositionSize positionSize,
+                              Any surface,
+                              Any display,
+                              const std::string& name,
+                              bool isTransparent)
+: mMainDisplay(NULL),
+  mType(type),
+  mPosition(positionSize),
+  mTitle(name),
+  mColorDepth(isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24),
+  mRenderMode((type == PIXMAP) ? RENDER_SYNC : RENDER_DEFAULT),
+  mRenderNotification( NULL ),
+  mSyncReceived( false ),
+  mOwnSurface(false),
+  mOwnDisplay(false),
+  mIsStopped( false )
+{
+  // see if there is a display in Any display
+  SetDisplay( display );
+}
+
+void RenderSurface::Init( Any surface )
+{
+  // see if there is a surface in Any surface
+  unsigned int surfaceId  = GetSurfaceId( surface );
+
+  // if the surface is empty, create a new one.
+  if ( surfaceId == 0 )
+  {
+    if ( !gWlInitThreadsCalled )
+    {
+      ecore_wl_init(NULL);
+      mMainDisplay = ecore_wl_display_get();
+      mOwnDisplay = true;
+      gWlInitThreadsCalled = true;
+    }
+
+    // we own the surface about to created
+    mOwnSurface = true;
+    CreateWlRenderable();
+  }
+  else
+  {
+    // XLib should already be initialized so no point in calling XInitThreads
+    UseExistingRenderable( surfaceId );
+  }
+
+#ifdef DEBUG_ENABLED
+  // prints out 'INFO: DALI: new RenderSurface, created display xx, used existing surface xx
+  // we can not use LOG_INFO because the surface can be created before Dali Core is created.
+  printf(  "INFO: DALI: new RenderSurface, %s display %p, %s %s surface %X \n",
+             mOwnDisplay?"created":"used existing",mMainDisplay,
+             mOwnSurface?"created":"used existing",
+             Dali::RenderSurface::PIXMAP==mType?" pixmap" :"window",
+             GetDrawable() );
+#endif
+}
+
+RenderSurface::~RenderSurface()
+{
+  // release the display connection if we use our own
+  if( mOwnDisplay )
+  {
+    if( mMainDisplay )
+    {
+      // NOTE, on 64bit desktop with some NVidia driver versions this crashes
+    }
+  }
+}
+
+Ecore_Wl_Window* RenderSurface::GetWlWindow()
+{
+  return 0;
+}
+
+WlDisplay* RenderSurface::GetMainDisplay()
+{
+  return mMainDisplay;
+}
+
+void RenderSurface::SetRenderNotification( TriggerEvent* renderNotification )
+{
+  mRenderNotification = renderNotification;
+}
+
+Ecore_Wl_Window* RenderSurface::GetDrawable()
+{
+  return 0;
+}
+
+Any RenderSurface::GetDisplay()
+{
+  // this getter is used by main thread so we need to return the main thread version of the display
+  return Any( ecore_wl_display_get() );
+}
+
+PositionSize RenderSurface::GetPositionSize() const
+{
+  return mPosition;
+}
+
+void RenderSurface::SetRenderMode(RenderMode mode)
+{
+  mRenderMode = mode;
+}
+
+Dali::RenderSurface::RenderMode RenderSurface::GetRenderMode() const
+{
+  return mRenderMode;
+}
+
+void RenderSurface::MoveResize( Dali::PositionSize positionSize )
+{
+  // nothing to do in base class
+}
+
+void RenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) const
+{
+  // calculate DPI
+  float xres, yres;
+
+  // 1 inch = 25.4 millimeters
+  xres = ecore_wl_dpi_get();
+  yres = ecore_wl_dpi_get();
+
+  dpiHorizontal = int(xres + 0.5f);  // rounding
+  dpiVertical   = int(yres + 0.5f);
+}
+
+void RenderSurface::Map()
+{
+}
+
+void RenderSurface::TransferDisplayOwner( Internal::Adaptor::RenderSurface& newSurface )
+{
+  // if we don't own the display return
+  if( mOwnDisplay == false )
+  {
+    return;
+  }
+
+  RenderSurface* other = dynamic_cast< RenderSurface* >( &newSurface );
+  if( other )
+  {
+    // if both surfaces share the same display, and this surface owns it,
+    // then transfer the ownership to the new surface
+    if( other->mMainDisplay == mMainDisplay )
+    {
+      mOwnDisplay = false;
+      other->mOwnDisplay = true;
+    }
+  }
+}
+
+void RenderSurface::ConsumeEvents()
+{
+}
+
+void RenderSurface::StopRender()
+{
+  // Stop blocking waiting for sync
+  SetSyncMode( RenderSurface::SYNC_MODE_NONE );
+  // Simulate a RenderSync in case render-thread is currently blocked
+  RenderSync();
+
+  mIsStopped = true;
+}
+
+void RenderSurface::SetViewMode( ViewMode )
+{
+}
+
+void RenderSurface::SetDisplay( Any display )
+{
+  // the render surface can be passed either EFL e-core types, or x11 types
+  // we use boost any to determine at run time which type
+
+  if ( display.Empty() == false )
+  {
+    // check we have a valid type
+    DALI_ASSERT_ALWAYS( ( ( display.GetType() == typeid (Ecore_Wl_Display *)) ||
+                          ( display.GetType() == typeid (WlDisplay *) ) )
+                        &&
+                        "Display type is invalid" );
+
+    mOwnDisplay = false;
+
+    // display may point to EcoreXDisplay so may need to cast
+    if( display.GetType() == typeid (Ecore_Wl_Display*) )
+    {
+      mMainDisplay = static_cast< WlDisplay* >( ecore_wl_display_get() );
+    }
+    else
+    {
+      mMainDisplay = AnyCast< WlDisplay* >( display );
+    }
+  }
+}
+
+unsigned int RenderSurface::GetSurfaceId( Any surface ) const
+{
+  unsigned int surfaceId = 0;
+
+  if ( surface.Empty() == false )
+  {
+    // check we have a valid type
+    DALI_ASSERT_ALWAYS( ( (surface.GetType() == typeid (Ecore_Wl_Window *) ) )
+                        && "Surface type is invalid" );
+
+    surfaceId = AnyCast<unsigned int>( surface );
+  }
+  return surfaceId;
+}
+
+void RenderSurface::RenderSync()
+{
+  // nothing to do
+}
+
+void RenderSurface::DoRenderSync( unsigned int timeDelta, SyncMode syncMode )
+{
+  // Should block waiting for RenderSync?
+  if( mRenderMode == Dali::RenderSurface::RENDER_SYNC )
+  {
+    boost::unique_lock< boost::mutex > lock( mSyncMutex );
+
+    // wait for sync
+    if( syncMode != SYNC_MODE_NONE &&
+        mSyncMode != SYNC_MODE_NONE &&
+        !mSyncReceived )
+    {
+      mSyncNotify.wait( lock );
+    }
+    mSyncReceived = false;
+  }
+  // Software sync based on a timed delay?
+  else if( mRenderMode > Dali::RenderSurface::RENDER_SYNC )
+  {
+    unsigned int syncPeriod( MICROSECONDS_PER_SECOND / static_cast< unsigned int >( mRenderMode ) - MILLISECONDS_PER_SECOND );
+    if( timeDelta < syncPeriod )
+    {
+      usleep( syncPeriod - timeDelta );
+    }
+  }
+}
+
+} // namespace ECore
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/ecore-wl-render-surface.h b/adaptors/wayland/ecore-wl-render-surface.h
new file mode 100644 (file)
index 0000000..6467ad8
--- /dev/null
@@ -0,0 +1,272 @@
+#ifndef __DALI_INTERNAL_ECORE_WL_RENDER_SURFACE_H__
+#define __DALI_INTERNAL_ECORE_WL_RENDER_SURFACE_H__
+
+/*
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+#include <boost/thread.hpp>
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+#include <dali/public-api/common/dali-common.h>
+
+// INTERNAL INCLUDES
+#include <render-surface-impl.h>
+#include <ecore-wl-types.h>
+#include <gl/egl-implementation.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+class TriggerEvent;
+
+namespace ECore
+{
+
+/**
+ * Ecore Wayland implementation of render surface.
+ * @todo change namespace to ECore_Wayland as the class
+ * is no longer pure Wayland.
+ */
+class DALI_IMPORT_API RenderSurface : public Internal::Adaptor::RenderSurface
+{
+public:
+  /**
+    * Uses an Wayland surface to render to.
+    * @param [in] type the type of surface passed in
+    * @param [in] positionSize the position and size of the surface
+    * @param [in] surface can be a X-window or X-pixmap (type must be unsigned int).
+    * @param [in] display connection to X-server if the surface is a X window or pixmap (type must be void * to X display struct)
+    * @param [in] name optional name of surface passed in
+    * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
+    */
+  RenderSurface( SurfaceType type,
+                 Dali::PositionSize positionSize,
+                 Any surface,
+                 Any display,
+                 const std::string& name,
+                 bool isTransparent = false);
+
+  /**
+   * Destructor.
+   * Will delete the display, if it has ownership.
+   * Will delete the window/pixmap if it has owner ship
+   */
+  virtual ~RenderSurface();
+
+protected:
+  /**
+   * Second stage construction
+   * Creates the surface (window, pixmap or native buffer)
+   */
+  void Init( Any surface );
+
+public: // API
+
+  /**
+   * @return the Ecore X window handle
+   */
+  Ecore_Wl_Window* GetWlWindow();
+
+  /**
+   * @return the Main X display
+   */
+  WlDisplay* GetMainDisplay();
+
+  /**
+   * Sets the render notification trigger to call when render thread is completed a frame
+   * @param renderNotification to use
+   */
+  void SetRenderNotification( TriggerEvent* renderNotification );
+
+  /**
+   * Get the surface as an Ecore_X_drawable
+   */
+  virtual Ecore_Wl_Window* GetDrawable();
+
+public: // from Dali::RenderSurface
+
+  /**
+   * @copydoc Dali::RenderSurface::GetType()
+   */
+  virtual Dali::RenderSurface::SurfaceType GetType() = 0;
+
+  /**
+   * @copydoc Dali::RenderSurface::GetSurface()
+   */
+  virtual Any GetSurface() = 0;
+
+  /**
+   * @copydoc Dali::RenderSurface::GetDisplay()
+   */
+  virtual Any GetDisplay();
+
+  /**
+   * @copydoc Dali::RenderSurface::GetPositionSize()
+   */
+  virtual PositionSize GetPositionSize() const;
+
+  /**
+   * @copydoc Dali::RenderSurface::SetRenderMode()
+   */
+  virtual void SetRenderMode(RenderMode mode);
+
+  /**
+   * @copydoc Dali::RenderSurface::GetRenderMode()
+   */
+  virtual RenderMode GetRenderMode() const;
+
+public:  // from Internal::Adaptor::RenderSurface
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::CreateEglSurface()
+   */
+  virtual void CreateEglSurface( EglInterface& egl ) = 0;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::DestroyEglSurface()
+   */
+  virtual void DestroyEglSurface( EglInterface& egl ) = 0;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::ReplaceEGLSurface()
+   */
+  virtual bool ReplaceEGLSurface( EglInterface& egl ) = 0;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::MoveResize()
+   */
+  virtual void MoveResize( Dali::PositionSize positionSize);
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::GetDpi()
+   */
+  virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) const;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::Map()
+   */
+  virtual void Map();
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::TransferDisplayOwner()
+   */
+  virtual void TransferDisplayOwner( Internal::Adaptor::RenderSurface& newSurface );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::ConsumeEvents()
+   */
+  virtual void ConsumeEvents();
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::RenderSync()
+   */
+  virtual void RenderSync();
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::SetViewMode()
+   */
+  void SetViewMode( ViewMode );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::PreRender()
+   */
+  virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction ) = 0;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::PostRender()
+   */
+  virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, unsigned int timeDelta, SyncMode syncMode ) = 0;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::StopRender()
+   */
+  virtual void StopRender();
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::SetSyncMode()
+   */
+  virtual void SetSyncMode( SyncMode syncMode ) { mSyncMode = syncMode; }
+
+private:
+
+  /**
+   * Sets the display, if display parameter is empty it opens a new display
+   * @param display
+   */
+  void SetDisplay( Any display );
+
+  /**
+   * Get the surface id if the surface parameter is not empty
+   * @param surface Any containing a surface id, or can be empty
+   * @return surface id, or zero if surface is empty
+   */
+  unsigned int GetSurfaceId( Any surface ) const;
+
+protected:
+
+  /**
+   * Create XRenderable
+   */
+  virtual void CreateWlRenderable() = 0;
+
+  /**
+   * Use an existing render surface
+   * @param surfaceId the id of the surface
+   */
+  virtual void UseExistingRenderable( unsigned int surfaceId ) = 0;
+
+  /**
+   * Perform render sync
+   * @param[in] currentTime Current time in microseconds
+   * @param[in] syncMode Wait for RenderSync (from Adaptor) flag. A member of SyncMode
+   */
+  void DoRenderSync( unsigned int timeDelta, SyncMode syncMode );
+
+protected: // Data
+
+  WlDisplay*                  mMainDisplay;        ///< Wayland-connection for rendering
+  SurfaceType                 mType;               ///< type of renderable
+  PositionSize                mPosition;           ///< Position
+  std::string                 mTitle;              ///< Title of window which shows from "xinfo -topvwins" command
+  ColorDepth                  mColorDepth;         ///< Color depth of surface (32 bit or 24 bit)
+  RenderMode                  mRenderMode;         ///< Render mode for pixmap surface type
+  TriggerEvent*               mRenderNotification; ///< Render notificatin trigger
+  boost::mutex                mSyncMutex;          ///< mutex to lock during waiting sync
+  boost::condition_variable   mSyncNotify;         ///< condition to notify main thread that pixmap was flushed to onscreen
+  SyncMode                    mSyncMode;
+  bool                        mSyncReceived;       ///< true, when a pixmap sync has occurred, (cleared after reading)
+  bool                        mOwnSurface;         ///< Whether we own the surface (responsible for deleting it)
+  bool                        mOwnDisplay;         ///< Whether we own the display (responsible for deleting it)
+  bool                        mIsStopped;          ///< Render should be stopped
+};
+
+} // namespace ECore
+
+} // namespace Adaptor
+
+} // namespace internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_ECORE_WL_RENDER_SURFACE_H__
diff --git a/adaptors/wayland/ecore-wl-types.h b/adaptors/wayland/ecore-wl-types.h
new file mode 100644 (file)
index 0000000..7dba22b
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __DALI_INTERNAL_X11_TYPES_H__
+#define __DALI_INTERNAL_X11_TYPES_H__
+
+/*
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <wayland-client.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+typedef ::wl_display WlDisplay;
+typedef ::wl_surface WlSurface;
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif /* __DALI_INTERNAL_X11_TYPES_H__ */
@@ -17,7 +17,7 @@
 
 
 // CLASS HEADER
-#include "egl-implementation.h"
+#include <gl/egl-implementation.h>
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
@@ -25,7 +25,7 @@
 #include <dali/public-api/common/dali-vector.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/ecore-x/ecore-x-render-surface.h>
+#include <ecore-wl-render-surface.h>
 
 namespace Dali
 {
diff --git a/adaptors/wayland/event-handler-wl.cpp b/adaptors/wayland/event-handler-wl.cpp
new file mode 100644 (file)
index 0000000..19dfa1c
--- /dev/null
@@ -0,0 +1,835 @@
+/*
+ * 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 <Ecore.h>
+#include <Ecore_Input.h>
+#include <ecore-wl-render-surface.h>
+#include <cstring>
+
+#include <sys/time.h>
+
+#include <vconf.h>
+#include <vconf-keys.h>
+
+#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/mouse-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/mouse-wheel-event-integ.h>
+
+// INTERNAL INCLUDES
+#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>
+
+using namespace std;
+
+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");
+Integration::Log::Filter* gClientMessageLogFilter  = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_CLIENT_MESSAGE");
+Integration::Log::Filter* gDragAndDropLogFilter = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_DND");
+Integration::Log::Filter* gImfLogging  = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_IMF");
+Integration::Log::Filter* gSelectionEventLogFilter = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_SELECTION");
+} // unnamed namespace
+#endif
+
+
+namespace
+{
+// Currently this code is internal to dali/dali/internal/event/text/utf8.h but should be made Public and used from there instead.
+size_t Utf8SequenceLength(const unsigned char leadByte)
+{
+  size_t length = 0;
+
+  if ((leadByte & 0x80) == 0 )          //ASCII character (lead bit zero)
+  {
+    length = 1;
+  }
+  else if (( leadByte & 0xe0 ) == 0xc0 ) //110x xxxx
+  {
+    length = 2;
+  }
+  else if (( leadByte & 0xf0 ) == 0xe0 ) //1110 xxxx
+  {
+    length = 3;
+  }
+  else if (( leadByte & 0xf8 ) == 0xf0 ) //1111 0xxx
+  {
+    length = 4;
+  }
+  else
+  {
+    DALI_LOG_WARNING("Unrecognized lead byte  %c\n", leadByte);
+  }
+
+  return length;
+}
+
+const unsigned int PRIMARY_TOUCH_BUTTON_ID( 1 );
+
+const unsigned int BYTES_PER_CHARACTER_FOR_ATTRIBUTES = 3;
+
+/**
+ * Ecore_Event_Modifier enums in Ecore_Input.h do not match Ecore_IMF_Keyboard_Modifiers in Ecore_IMF.h.
+ * This function converts from Ecore_Event_Modifier to Ecore_IMF_Keyboard_Modifiers enums.
+ * @param[in] ecoreModifier the Ecore_Event_Modifier input.
+ * @return the Ecore_IMF_Keyboard_Modifiers output.
+ */
+Ecore_IMF_Keyboard_Modifiers EcoreInputModifierToEcoreIMFModifier(unsigned int ecoreModifier)
+{
+   int modifier( ECORE_IMF_KEYBOARD_MODIFIER_NONE );  // If no other matches returns NONE.
+
+
+   if ( ecoreModifier & ECORE_EVENT_MODIFIER_SHIFT )  // enums from ecore_input/Ecore_Input.h
+   {
+     modifier |= ECORE_IMF_KEYBOARD_MODIFIER_SHIFT;  // enums from ecore_imf/ecore_imf.h
+   }
+
+   if ( ecoreModifier & ECORE_EVENT_MODIFIER_ALT )
+   {
+     modifier |= ECORE_IMF_KEYBOARD_MODIFIER_ALT;
+   }
+
+   if ( ecoreModifier & ECORE_EVENT_MODIFIER_CTRL )
+   {
+     modifier |= ECORE_IMF_KEYBOARD_MODIFIER_CTRL;
+   }
+
+   if ( ecoreModifier & ECORE_EVENT_MODIFIER_WIN )
+   {
+     modifier |= ECORE_IMF_KEYBOARD_MODIFIER_WIN;
+   }
+
+   if ( ecoreModifier & ECORE_EVENT_MODIFIER_ALTGR )
+   {
+     modifier |= ECORE_IMF_KEYBOARD_MODIFIER_ALTGR;
+   }
+
+   return static_cast<Ecore_IMF_Keyboard_Modifiers>( modifier );
+}
+
+
+// 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);
+}
+
+const char * DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE = "db/setting/accessibility/font_name";  // It will be update at vconf-key.h and replaced.
+
+} // unnamed namespace
+
+// Impl to hide EFL implementation.
+struct EventHandler::Impl
+{
+  // Construction & Destruction
+
+  /**
+   * Constructor
+   */
+  Impl( EventHandler* handler, Ecore_Wl_Window* window )
+  : mHandler( handler ),
+    mEcoreEventHandler(),
+    mWindow( window )
+  {
+    // Only register for touch and key events if we have a window
+    if ( window != 0 )
+    {
+      // Register Touch events
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_MOUSE_BUTTON_DOWN,  EcoreEventMouseButtonDown, handler ) );
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_MOUSE_BUTTON_UP,    EcoreEventMouseButtonUp,   handler ) );
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_MOUSE_MOVE,         EcoreEventMouseButtonMove, handler ) );
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_MOUSE_OUT,          EcoreEventMouseButtonUp,   handler ) ); // process mouse out event like up event
+
+      // Register Mouse wheel events
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_MOUSE_WHEEL,        EcoreEventMouseWheel,      handler ) );
+
+      // Register Key events
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_KEY_DOWN,           EcoreEventKeyDown,         handler ) );
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_KEY_UP,             EcoreEventKeyUp,           handler ) );
+
+      // Register Vconf notify - font name and size
+      vconf_notify_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontNameChanged, handler );
+      vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged, handler );
+    }
+  }
+
+  /**
+   * Destructor
+   */
+  ~Impl()
+  {
+    vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged );
+    vconf_ignore_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontNameChanged );
+
+    for( std::vector<Ecore_Event_Handler*>::iterator iter = mEcoreEventHandler.begin(), endIter = mEcoreEventHandler.end(); iter != endIter; ++iter )
+    {
+      ecore_event_handler_del( *iter );
+    }
+  }
+
+  // Static methods
+
+  /////////////////////////////////////////////////////////////////////////////////////////////////
+  // Touch Callbacks
+  /////////////////////////////////////////////////////////////////////////////////////////////////
+
+  /**
+   * Called when a touch down is received.
+   */
+  static Eina_Bool EcoreEventMouseButtonDown( void* data, int type, void* event )
+  {
+    Ecore_Event_Mouse_Button *touchEvent( (Ecore_Event_Mouse_Button*)event );
+    EventHandler* handler( (EventHandler*)data );
+
+    if ( touchEvent->window == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
+    {
+      TouchPoint::State state ( TouchPoint::Down );
+
+      // Check if the buttons field is set and ensure it's the primary touch button.
+      // If this event was triggered by buttons other than the primary button (used for touch), then
+      // just send an interrupted event to Core.
+      if ( touchEvent->buttons && (touchEvent->buttons != PRIMARY_TOUCH_BUTTON_ID ) )
+      {
+        state = TouchPoint::Interrupted;
+      }
+
+      TouchPoint point( touchEvent->multi.device, state, touchEvent->x, touchEvent->y );
+      handler->SendEvent( point, touchEvent->timestamp );
+    }
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when a touch up is received.
+   */
+  static Eina_Bool EcoreEventMouseButtonUp( void* data, int type, void* event )
+  {
+    Ecore_Event_Mouse_Button *touchEvent( (Ecore_Event_Mouse_Button*)event );
+    EventHandler* handler( (EventHandler*)data );
+
+    if ( touchEvent->window == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
+    {
+      TouchPoint point( touchEvent->multi.device, TouchPoint::Up, touchEvent->x, touchEvent->y );
+      handler->SendEvent( point, touchEvent->timestamp );
+    }
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when a touch up is received.
+   */
+  static Eina_Bool EcoreEventMouseWheel( void* data, int type, void* event )
+  {
+    Ecore_Event_Mouse_Wheel *mouseWheelEvent( (Ecore_Event_Mouse_Wheel*)event );
+
+    DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT Ecore_Event_Mouse_Wheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
+
+    EventHandler* handler( (EventHandler*)data );
+    if ( mouseWheelEvent->window == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
+    {
+      MouseWheelEvent wheelEvent(mouseWheelEvent->direction, mouseWheelEvent->modifiers, Vector2(mouseWheelEvent->x, mouseWheelEvent->y), mouseWheelEvent->z, mouseWheelEvent->timestamp);
+      handler->SendMouseWheelEvent( wheelEvent );
+    }
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when a touch motion is received.
+   */
+  static Eina_Bool EcoreEventMouseButtonMove( void* data, int type, void* event )
+  {
+    Ecore_Event_Mouse_Move *touchEvent( (Ecore_Event_Mouse_Move*)event );
+    EventHandler* handler( (EventHandler*)data );
+
+    if ( touchEvent->window == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
+    {
+      TouchPoint point( touchEvent->multi.device, TouchPoint::Motion, touchEvent->x, touchEvent->y );
+      handler->SendEvent( point, touchEvent->timestamp );
+    }
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////////////////////
+  // Key Callbacks
+  /////////////////////////////////////////////////////////////////////////////////////////////////
+
+  /**
+   * Called when a key down is received.
+   */
+  static Eina_Bool EcoreEventKeyDown( void* data, int type, void* event )
+  {
+    DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT >>EcoreEventKeyDown \n" );
+
+    EventHandler* handler( (EventHandler*)data );
+    Ecore_Event_Key *keyEvent( (Ecore_Event_Key*)event );
+    bool eventHandled( false );
+
+    Ecore_IMF_Context* imfContext = NULL;
+    if ( Dali::Adaptor::IsAvailable() && handler->mImfManager )
+    {
+      imfContext = reinterpret_cast<Ecore_IMF_Context*>( handler->mImfManager.GetContext() );
+    }
+
+    // If a device key then skip ecore_imf_context_filter_event.
+    if ( imfContext && !( KeyLookup::IsDeviceButton( keyEvent->keyname ) ) )
+    {
+      // We're consuming key down event so we have to pass to IMF so that it can parse it as well.
+      Ecore_IMF_Event_Key_Down ecoreKeyDownEvent;
+      ecoreKeyDownEvent.keyname   = keyEvent->keyname;
+      ecoreKeyDownEvent.key       = keyEvent->key;
+      ecoreKeyDownEvent.string    = keyEvent->string;
+      ecoreKeyDownEvent.compose   = keyEvent->compose;
+      ecoreKeyDownEvent.timestamp = keyEvent->timestamp;
+      ecoreKeyDownEvent.modifiers = EcoreInputModifierToEcoreIMFModifier ( keyEvent->modifiers );
+      ecoreKeyDownEvent.locks     = (Ecore_IMF_Keyboard_Locks) ECORE_IMF_KEYBOARD_LOCK_NONE;
+
+      eventHandled = ecore_imf_context_filter_event( imfContext,
+                                                     ECORE_IMF_EVENT_KEY_DOWN,
+                                                     (Ecore_IMF_Event *) &ecoreKeyDownEvent );
+
+      // If the event has not been handled by IMF then check if we should reset our IMF context
+      if( !eventHandled )
+      {
+        if ( !strcmp( keyEvent->keyname, "Escape"   ) ||
+             !strcmp( keyEvent->keyname, "Return"   ) ||
+             !strcmp( keyEvent->keyname, "KP_Enter" ) )
+        {
+          ecore_imf_context_reset( imfContext );
+        }
+      }
+    }
+
+    // If the event wasn't handled then we should send a key event.
+    if ( !eventHandled )
+    {
+      if ( keyEvent->window == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
+      {
+        std::string keyName( keyEvent->keyname );
+        std::string keyString( "" );
+        int keyCode = 0/*ecore_x_keysym_keycode_get(keyEvent->keyname)*/;
+        int modifier( keyEvent->modifiers );
+        unsigned long time = keyEvent->timestamp;
+
+        if (!strncmp(keyEvent->keyname, "Keycode-", 8))
+          keyCode = atoi(keyEvent->keyname + 8);
+
+        // Ensure key event string is not NULL as keys like SHIFT have a null string.
+        if ( keyEvent->string )
+        {
+          keyString = keyEvent->string;
+        }
+
+        KeyEvent keyEvent(keyName, keyString, keyCode, modifier, time, KeyEvent::Down);
+        handler->SendEvent( keyEvent );
+      }
+    }
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when a key up is received.
+   */
+  static Eina_Bool EcoreEventKeyUp( void* data, int type, void* event )
+  {
+    DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT >>EcoreEventKeyUp \n" );
+
+    EventHandler* handler( (EventHandler*)data );
+    Ecore_Event_Key *keyEvent( (Ecore_Event_Key*)event );
+    bool eventHandled( false );
+
+    Ecore_IMF_Context* imfContext = NULL;
+    if ( Dali::Adaptor::IsAvailable() && handler->mImfManager )
+    {
+      imfContext = reinterpret_cast<Ecore_IMF_Context*>( handler->mImfManager.GetContext() );
+    }
+
+    // XF86Stop and XF86Send must skip ecore_imf_context_filter_event.
+    if ( imfContext && strcmp( keyEvent->keyname, "XF86Send" ) && strcmp( keyEvent->keyname, "XF86Phone" ) && strcmp( keyEvent->keyname, "XF86Stop" ) )
+
+    {
+      // We're consuming key up event so we have to pass to IMF so that it can parse it as well.
+      Ecore_IMF_Event_Key_Up ecoreKeyUpEvent;
+      ecoreKeyUpEvent.keyname   = keyEvent->keyname;
+      ecoreKeyUpEvent.key       = keyEvent->key;
+      ecoreKeyUpEvent.string    = keyEvent->string;
+      ecoreKeyUpEvent.compose   = keyEvent->compose;
+      ecoreKeyUpEvent.timestamp = keyEvent->timestamp;
+      ecoreKeyUpEvent.modifiers = EcoreInputModifierToEcoreIMFModifier ( keyEvent->modifiers );
+      ecoreKeyUpEvent.locks     = (Ecore_IMF_Keyboard_Locks) ECORE_IMF_KEYBOARD_LOCK_NONE;
+
+      eventHandled = ecore_imf_context_filter_event( imfContext,
+                                                     ECORE_IMF_EVENT_KEY_UP,
+                                                     (Ecore_IMF_Event *) &ecoreKeyUpEvent );
+    }
+
+    // If the event wasn't handled then we should send a key event.
+    if ( !eventHandled )
+    {
+      if ( keyEvent->window == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
+      {
+        std::string keyName( keyEvent->keyname );
+        std::string keyString( "" );
+        int keyCode = 0/*ecore_x_keysym_keycode_get(keyEvent->keyname)*/;
+        int modifier( keyEvent->modifiers );
+        unsigned long time( keyEvent->timestamp );
+
+        if (!strncmp(keyEvent->keyname, "Keycode-", 8))
+          keyCode = atoi(keyEvent->keyname + 8);
+
+        // Ensure key event string is not NULL as keys like SHIFT have a null string.
+        if ( keyEvent->string )
+        {
+          keyString = keyEvent->string;
+        }
+
+        KeyEvent keyEvent(keyName, keyString, keyCode, modifier, time, KeyEvent::Up);
+        handler->SendEvent( keyEvent );
+      }
+    }
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////////////////////
+  // Window Callbacks
+  /////////////////////////////////////////////////////////////////////////////////////////////////
+
+  /**
+   * Called when the window gains focus.
+   */
+  static Eina_Bool EcoreEventWindowFocusIn( void* data, int type, void* event )
+  {
+    Ecore_Wl_Event_Focus_In* focusInEvent( (Ecore_Wl_Event_Focus_In*)event );
+    EventHandler* handler( (EventHandler*)data );
+
+    DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT >>EcoreEventWindowFocusIn \n" );
+
+    // If the window gains focus and we hid the keyboard then show it again.
+    if ( focusInEvent->win == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
+    {
+      DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT EcoreEventWindowFocusIn - >>WindowFocusGained \n" );
+
+      if ( handler->mImfManager )
+      {
+        ImfManager& imfManager( ImfManager::GetImplementation( handler->mImfManager ) );
+        if( imfManager.RestoreAfterFocusLost() )
+        {
+          imfManager.Activate();
+        }
+      }
+      // No need to connect callbacks as KeyboardStatusChanged will be called.
+    }
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when the window loses focus.
+   */
+  static Eina_Bool EcoreEventWindowFocusOut( void* data, int type, void* event )
+  {
+    Ecore_Wl_Event_Focus_Out* focusOutEvent( (Ecore_Wl_Event_Focus_Out*)event );
+    EventHandler* handler( (EventHandler*)data );
+
+    DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT >>EcoreEventWindowFocusOut \n" );
+
+    // If the window loses focus then hide the keyboard.
+    if ( focusOutEvent->win == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
+    {
+      if ( handler->mImfManager )
+      {
+        ImfManager& imfManager( ImfManager::GetImplementation( handler->mImfManager ) );
+        if( imfManager.RestoreAfterFocusLost() )
+        {
+          imfManager.Deactivate();
+        }
+      }
+
+      // Clipboard don't support that whether clipboard is shown or not. Hide clipboard.
+      Dali::Clipboard clipboard = Clipboard::Get();
+      clipboard.HideClipboard();
+    }
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when the window is damaged.
+   */
+  static Eina_Bool EcoreEventWindowDamaged(void *data, int type, void *event)
+  {
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when the window properties are changed.
+   * We are only interested in the font change.
+   */
+
+
+  /////////////////////////////////////////////////////////////////////////////////////////////////
+  // Drag & Drop Callbacks
+  /////////////////////////////////////////////////////////////////////////////////////////////////
+
+  /**
+   * Called when a dragged item enters our window's bounds.
+   * This is when items are dragged INTO our window.
+   */
+  static Eina_Bool EcoreEventDndEnter( void* data, int type, void* event )
+  {
+    DALI_LOG_INFO( gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndEnter\n" );
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when a dragged item is moved within our window.
+   * This is when items are dragged INTO our window.
+   */
+  static Eina_Bool EcoreEventDndPosition( void* data, int type, void* event )
+  {
+    DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndPosition\n" );
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when a dragged item leaves our window's bounds.
+   * This is when items are dragged INTO our window.
+   */
+  static Eina_Bool EcoreEventDndLeave( void* data, int type, void* event )
+  {
+    DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndLeave\n" );
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when the dragged item is dropped within our window's bounds.
+   * This is when items are dragged INTO our window.
+   */
+  static Eina_Bool EcoreEventDndDrop( void* data, int type, void* event )
+  {
+    DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndDrop\n" );
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when a dragged item is moved from our window and the target window has done processing it.
+   * This is when items are dragged FROM our window.
+   */
+  static Eina_Bool EcoreEventDndFinished( void* data, int type, void* event )
+  {
+    DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndFinished\n" );
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when a dragged item is moved from our window and the target window has sent us a status.
+   * This is when items are dragged FROM our window.
+   */
+  static Eina_Bool EcoreEventDndStatus( void* data, int type, void* event )
+  {
+    DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndStatus\n" );
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when the client messages (i.e. the accessibility events) are received.
+   */
+  static Eina_Bool EcoreEventClientMessage( void* data, int type, void* event )
+  {
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when the source window notifies us the content in clipboard is selected.
+   */
+  static Eina_Bool EcoreEventSelectionClear( void* data, int type, void* event )
+  {
+    DALI_LOG_INFO(gSelectionEventLogFilter, Debug::Concise, "EcoreEventSelectionClear\n" );
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /**
+   * Called when the source window sends us about the selected content.
+   * For example, when dragged items are dragged INTO our window or when items are selected in the clipboard.
+   */
+  static Eina_Bool EcoreEventSelectionNotify( void* data, int type, void* event )
+  {
+    DALI_LOG_INFO(gSelectionEventLogFilter, Debug::Concise, "EcoreEventSelectionNotify\n" );
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /////////////////////////////////////////////////////////////////////////////////////////////////
+  // Font Callbacks
+  /////////////////////////////////////////////////////////////////////////////////////////////////
+  /**
+   * Called when a font name is changed.
+   */
+  static void VconfNotifyFontNameChanged( keynode_t* node, void* data )
+  {
+    EventHandler* handler = static_cast<EventHandler*>( data );
+
+    StyleChange fontChange;
+    fontChange.defaultFontChange = true;
+
+    handler->SendEvent( fontChange );
+  }
+
+  /**
+   * Called when a font size is changed.
+   */
+  static void VconfNotifyFontSizeChanged( keynode_t* node, void* data )
+  {
+    EventHandler* handler = static_cast<EventHandler*>( data );
+
+    StyleChange fontChange;
+    fontChange.defaultFontSizeChange = true;
+
+    handler->SendEvent( fontChange );
+  }
+
+  // Data
+  EventHandler* mHandler;
+  std::vector<Ecore_Event_Handler*> mEcoreEventHandler;
+  Ecore_Wl_Window* mWindow;
+};
+
+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 ),
+  mAccessibilityManager( AccessibilityManager::Get() ),
+  mClipboardEventNotifier( ClipboardEventNotifier::Get() ),
+  mClipboard(Clipboard::Get()),
+  mImfManager( ImfManager::Get() ),
+  mImpl( NULL )
+{
+  Ecore_Wl_Window* window = 0;
+
+  if( surface->GetType() == Dali::RenderSurface::WINDOW )
+  {
+    // this code only works with the Ecore RenderSurface so need to downcast
+    ECore::WindowRenderSurface* ecoreSurface = dynamic_cast< ECore::WindowRenderSurface* >( surface );
+    if( ecoreSurface )
+    {
+      window = ecoreSurface->GetWlWindow();
+    }
+  }
+
+  mImpl = new Impl(this, window);
+}
+
+EventHandler::~EventHandler()
+{
+  if(mImpl)
+  {
+    delete mImpl;
+  }
+
+  mGestureManager.Stop();
+}
+
+void EventHandler::SendEvent(TouchPoint& point, unsigned long timeStamp)
+{
+  if(timeStamp < 1)
+  {
+    timeStamp = GetCurrentMilliSeconds();
+  }
+
+  Integration::TouchEvent event;
+  if (mCombiner.GetNextTouchEvent(point, timeStamp, event))
+  {
+    DALI_LOG_INFO(gTouchEventLogFilter, Debug::General, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.deviceId, point.state, point.local.x, point.local.y);
+
+    // 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::SendEvent(KeyEvent& keyEvent)
+{
+  Dali::PhysicalKeyboard physicalKeyboard = PhysicalKeyboard::Get();
+  if ( physicalKeyboard )
+  {
+    if ( ! KeyLookup::IsDeviceButton( keyEvent.keyPressedName.c_str() ) )
+    {
+      GetImplementation( physicalKeyboard ).KeyReceived( keyEvent.time > 1 );
+    }
+  }
+
+  // Create KeyEvent and send to Core.
+  Integration::KeyEvent event(keyEvent.keyPressedName, keyEvent.keyPressed, keyEvent.keyCode,
+  keyEvent.keyModifier, keyEvent.time, static_cast<Integration::KeyEvent::State>(keyEvent.state));
+  mCoreEventInterface.QueueCoreEvent( event );
+  mCoreEventInterface.ProcessCoreEvents();
+}
+
+void EventHandler::SendMouseWheelEvent( MouseWheelEvent& wheelEvent )
+{
+  // Create MouseWheelEvent and send to Core.
+  Integration::MouseWheelEvent event(wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp);
+  mCoreEventInterface.QueueCoreEvent( event );
+  mCoreEventInterface.ProcessCoreEvents();
+}
+
+void EventHandler::SendEvent(StyleChange 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)
+{
+  SendEvent(point, timeStamp);
+}
+
+void EventHandler::FeedWheelEvent( MouseWheelEvent& wheelEvent )
+{
+  SendMouseWheelEvent( wheelEvent );
+}
+
+void EventHandler::FeedKeyEvent( KeyEvent& event )
+{
+  SendEvent( event );
+}
+
+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;
+  TouchPoint point(0, TouchPoint::Interrupted, 0, 0);
+  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::SetDragAndDropDetector( DragAndDropDetectorPtr detector )
+{
+  mDragAndDropDetector = detector;
+}
+
+void EventHandler::SetRotationObserver( RotationObserver* observer )
+{
+  mRotationObserver = observer;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/file.list b/adaptors/wayland/file.list
new file mode 100644 (file)
index 0000000..565eb9b
--- /dev/null
@@ -0,0 +1,29 @@
+# wayland
+
+adaptor_wayland_internal_header_files = \
+  $(adaptor_wayland_dir)/clipboard-impl.h \
+  $(adaptor_wayland_dir)/imf-manager-impl.h \
+  $(adaptor_wayland_dir)/pixmap-image-impl.h \
+  $(adaptor_wayland_dir)/pixmap-render-surface.h 
+
+adaptor_wayland_application_src_files = \
+  $(adaptor_wayland_dir)/framework-wl.cpp
+
+adaptor_wayland_internal_src_files = \
+  $(adaptor_wayland_dir)/accessibility-manager-impl-wl.cpp \
+  $(adaptor_wayland_dir)/clipboard-impl-wl.cpp \
+  $(adaptor_wayland_dir)/imf-manager-impl-wl.cpp \
+  $(adaptor_wayland_dir)/pixmap-image-impl-wl.cpp \
+  $(adaptor_wayland_dir)/server-connection-wl.cpp \
+  $(adaptor_wayland_dir)/system-settings-wl.cpp \
+  $(adaptor_wayland_dir)/virtual-keyboard-impl-wl.cpp \
+  $(adaptor_wayland_dir)/window-impl-wl.cpp \
+  $(adaptor_wayland_dir)/event-handler-wl.cpp \
+  $(adaptor_wayland_dir)/egl-implementation-wl.cpp \
+  $(adaptor_wayland_dir)/ecore-wl-render-surface.cpp \
+  $(adaptor_wayland_dir)/pixmap-render-surface-wl.cpp \
+  $(adaptor_wayland_dir)/window-render-surface-wl.cpp
+  
+adaptor_wayland_profile_src_files = \
+  $(adaptor_wayland_dir)/key-impl-wl.cpp \
+  $(adaptor_wayland_dir)/ecore-wl-render-surface-factory.cpp
diff --git a/adaptors/wayland/framework-wl.cpp b/adaptors/wayland/framework-wl.cpp
new file mode 100644 (file)
index 0000000..bad2eb0
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * 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 "framework.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+void Framework::InitThreads()
+{
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/imf-manager-impl-wl.cpp b/adaptors/wayland/imf-manager-impl-wl.cpp
new file mode 100644 (file)
index 0000000..5a6c3f4
--- /dev/null
@@ -0,0 +1,462 @@
+/*
+ * 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 <imf-manager-impl.h>
+
+// EXTERNAL INCLUDES
+#include <boost/bind.hpp>
+#include <dali/public-api/events/key-event.h>
+#include <dali/public-api/object/type-registry.h>
+#include <adaptor.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <window-render-surface.h>
+#include <adaptor-impl.h>
+#include <virtual-keyboard-impl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_IMF_MANAGER");
+#endif
+
+// Currently this code is internal to dali/dali/internal/event/text/utf8.h but should be made Public and used from there instead.
+size_t Utf8SequenceLength(const unsigned char leadByte)
+{
+  size_t length = 0;
+
+  if ((leadByte & 0x80) == 0 )          //ASCII character (lead bit zero)
+  {
+    length = 1;
+  }
+  else if (( leadByte & 0xe0 ) == 0xc0 ) //110x xxxx
+  {
+    length = 2;
+  }
+  else if (( leadByte & 0xf0 ) == 0xe0 ) //1110 xxxx
+  {
+    length = 3;
+  }
+  else if (( leadByte & 0xf8 ) == 0xf0 ) //1111 0xxx
+  {
+    length = 4;
+  }
+
+  return length;
+}
+
+// Static function calls used by ecore 'c' style callback registration
+void Commit( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+{
+  if ( data )
+  {
+    ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
+    imfManager->CommitReceived( data, imfContext, event_info );
+  }
+}
+
+void PreEdit( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+{
+  if ( data )
+  {
+    ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
+    imfManager->PreEditChanged( data, imfContext, event_info );
+  }
+}
+
+Eina_Bool ImfRetrieveSurrounding(void *data, Ecore_IMF_Context *imfContext, char** text, int* cursorPosition )
+{
+  if ( data )
+  {
+    ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
+    return imfManager->RetrieveSurrounding( data, imfContext, text, cursorPosition );
+  }
+  else
+  {
+    return false;
+  }
+}
+
+/**
+ * Called when an IMF delete surrounding event is received.
+ * Here we tell the application that it should delete a certain range.
+ */
+void ImfDeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+{
+  if ( data )
+  {
+    ImfManager* imfManager = reinterpret_cast< ImfManager* > ( data );
+    imfManager->DeleteSurrounding( data, imfContext, event_info );
+  }
+}
+
+BaseHandle Create()
+{
+  BaseHandle handle( ImfManager::Get() );
+
+  return handle;
+}
+
+TypeRegistration IMF_MANAGER_TYPE( typeid(Dali::ImfManager), typeid(Dali::BaseHandle), Create, true /* Create Instance At Startup */ );
+
+} // unnamed namespace
+
+Dali::ImfManager ImfManager::Get()
+{
+  Dali::ImfManager manager;
+
+  if ( Adaptor::IsAvailable() )
+  {
+    // Check whether the singleton is already created
+    Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Dali::ImfManager ) );
+    if(handle)
+    {
+      // If so, downcast the handle
+      manager = Dali::ImfManager( dynamic_cast< ImfManager* >( handle.GetObjectPtr() ) );
+    }
+  }
+
+  return manager;
+}
+
+ImfManager::~ImfManager()
+{
+  VirtualKeyboard::DisconnectCallbacks( mIMFContext );
+  DisconnectCallbacks();
+
+  DeleteContext();
+  ecore_imf_shutdown();
+}
+
+void ImfManager::DeleteContext()
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::DeleteContext\n" );
+
+  if ( mIMFContext )
+  {
+    mIMFContext = NULL;
+  }
+}
+
+// Callbacks for predicitive text support.
+void ImfManager::ConnectCallbacks()
+{
+  if ( mIMFContext )
+  {
+    DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::ConnectCallbacks\n" );
+
+    ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_PREEDIT_CHANGED,    PreEdit,    this );
+    ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_COMMIT,             Commit,     this );
+    ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, ImfDeleteSurrounding, this );
+
+    ecore_imf_context_retrieve_surrounding_callback_set( mIMFContext, ImfRetrieveSurrounding, this);
+  }
+}
+
+void ImfManager::DisconnectCallbacks()
+{
+  if ( mIMFContext )
+  {
+    DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::DisconnectCallbacks\n" );
+
+    ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_PREEDIT_CHANGED,    PreEdit );
+    ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_COMMIT,             Commit );
+    ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, ImfDeleteSurrounding );
+
+    // We do not need to unset the retrieve surrounding callback.
+  }
+}
+
+void ImfManager::Activate()
+{
+  // Reset mIdleCallbackConnected
+  mIdleCallbackConnected = false;
+
+  if ( mIMFContext )
+  {
+    DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::Activate\n" );
+
+    ecore_imf_context_focus_in( mIMFContext );
+
+    // emit keyboard activated signal
+    Dali::ImfManager handle( this );
+    mActivatedSignalV2.Emit( handle );
+  }
+}
+
+void ImfManager::Deactivate()
+{
+  if( mIMFContext )
+  {
+    DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::Deactivate\n" );
+
+    Reset();
+    ecore_imf_context_focus_out( mIMFContext );
+  }
+
+  // Reset mIdleCallbackConnected
+  mIdleCallbackConnected = false;
+}
+
+void ImfManager::Reset()
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::Reset\n" );
+
+  if ( mIMFContext )
+  {
+    ecore_imf_context_reset( mIMFContext );
+  }
+}
+
+Ecore_IMF_Context* ImfManager::GetContext()
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetContext\n" );
+
+  return mIMFContext;
+}
+
+bool ImfManager::RestoreAfterFocusLost() const
+{
+  return mRestoreAfterFocusLost;
+}
+
+void ImfManager::SetRestoreAferFocusLost( bool toggle )
+{
+  mRestoreAfterFocusLost = toggle;
+}
+
+/**
+ * Called when an IMF Pre-Edit changed event is received.
+ * We are still predicting what the user is typing.  The latest string is what the IMF module thinks
+ * the user wants to type.
+ */
+void ImfManager::PreEditChanged( void *, Ecore_IMF_Context *imfContext, void *event_info )
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::PreEditChanged\n" );
+
+  char *preEditString( NULL );
+  int cursorPosition( 0 );
+  Eina_List *attrs = NULL;
+  Eina_List *l = NULL;
+
+  Ecore_IMF_Preedit_Attr *attr;
+
+  // Retrieves attributes as well as the string the cursor position offset from start of pre-edit string.
+  // the attributes (attrs) is used in languages that use the soft arrows keys to insert characters into a current pre-edit string.
+  ecore_imf_context_preedit_string_with_attributes_get( imfContext, &preEditString, &attrs, &cursorPosition );
+
+  if ( attrs )
+  {
+    // iterate through the list of attributes getting the type, start and end position.
+    for ( l = attrs, (attr =  (Ecore_IMF_Preedit_Attr*)eina_list_data_get(l) ); l; l = eina_list_next(l), ( attr = (Ecore_IMF_Preedit_Attr*)eina_list_data_get(l) ))
+    {
+      if ( attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB4 ) // (Ecore_IMF)
+      {
+        // check first byte so know how many bytes a character is represented by as keyboard returns cursor position in bytes. Which is different for some languages.
+
+        size_t visualCharacterIndex = 0;
+        size_t byteIndex = 0;
+
+        // iterate through null terminated string checking each character's position against the given byte position ( attr->end_index ).
+        while ( preEditString[byteIndex] != '\0' )
+        {
+          // attr->end_index is provided as a byte position not character and we need to know the character position.
+          size_t currentSequenceLength = Utf8SequenceLength(preEditString[byteIndex]); // returns number of bytes used to represent character.
+          if ( byteIndex == attr->end_index )
+          {
+            cursorPosition = visualCharacterIndex;
+            break;
+            // end loop as found cursor position that matches byte position
+          }
+          else
+          {
+            byteIndex += currentSequenceLength; // jump to next character
+            visualCharacterIndex++;  // increment character count so we know our position for when we get a match
+          }
+
+          DALI_ASSERT_DEBUG( visualCharacterIndex < strlen( preEditString ));
+        }
+      }
+    }
+  }
+
+  if ( Dali::Adaptor::IsAvailable() )
+  {
+    std::string keyString ( preEditString );
+    int numberOfChars( 0 );
+
+    Dali::ImfManager handle( this );
+    Dali::ImfManager::ImfEventData imfEventData ( Dali::ImfManager::PREEDIT, keyString, cursorPosition, numberOfChars );
+    Dali::ImfManager::ImfCallbackData callbackData = mEventSignalV2.Emit( handle, imfEventData );
+
+    if ( callbackData.update )
+    {
+      SetCursorPosition( callbackData.cursorPosition );
+      SetSurroundingText( callbackData.currentText );
+
+      NotifyCursorPosition();
+    }
+
+    if ( callbackData.preeditResetRequired )
+    {
+      Reset();
+    }
+  }
+  free( preEditString );
+}
+
+void ImfManager::CommitReceived( void *, Ecore_IMF_Context *imfContext, void *event_info )
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::CommitReceived\n" );
+
+  if ( Dali::Adaptor::IsAvailable() )
+  {
+    const std::string keyString( (char *)event_info );
+    const int cursorOffset( 0 );
+    const int numberOfChars( 0 );
+
+    Dali::ImfManager handle( this );
+    Dali::ImfManager::ImfEventData imfEventData ( Dali::ImfManager::COMMIT, keyString, cursorOffset, numberOfChars );
+    Dali::ImfManager::ImfCallbackData callbackData = mEventSignalV2.Emit( handle, imfEventData );
+
+    if ( callbackData.update )
+    {
+      SetCursorPosition( callbackData.cursorPosition );
+      SetSurroundingText( callbackData.currentText );
+
+      NotifyCursorPosition();
+    }
+  }
+}
+
+/**
+ * Called when an IMF retrieve surround event is received.
+ * Here the IMF module wishes to know the string we are working with and where within the string the cursor is
+ * We need to signal the application to tell us this information.
+ */
+Eina_Bool ImfManager::RetrieveSurrounding( void *data, Ecore_IMF_Context *imfContext, char** text, int* cursorPosition )
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::RetrieveSurrounding\n" );
+
+  std::string keyString ( "" );
+  int cursorOffset( 0 );
+  int numberOfChars( 0 );
+
+  Dali::ImfManager::ImfEventData imfData ( Dali::ImfManager::GETSURROUNDING , keyString, cursorOffset, numberOfChars );
+  Dali::ImfManager handle( this );
+  mEventSignalV2.Emit( handle, imfData );
+
+  if ( text )
+  {
+    std::string surroundingText( GetSurroundingText() );
+
+    if ( !surroundingText.empty() )
+    {
+      *text = strdup( surroundingText.c_str() );
+    }
+    else
+    {
+      *text = strdup( "" );
+    }
+  }
+
+  if ( cursorPosition )
+  {
+    *cursorPosition = GetCursorPosition();
+  }
+
+
+  return EINA_TRUE;
+}
+
+/**
+ * Called when an IMF delete surrounding event is received.
+ * Here we tell the application that it should delete a certain range.
+ */
+void ImfManager::DeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::DeleteSurrounding\n" );
+
+  if ( Dali::Adaptor::IsAvailable() )
+  {
+    Ecore_IMF_Event_Delete_Surrounding* deleteSurroundingEvent = (Ecore_IMF_Event_Delete_Surrounding*) event_info;
+
+    const std::string keyString( "" );
+    const int cursorOffset( deleteSurroundingEvent->offset );
+    const int numberOfChars( deleteSurroundingEvent->n_chars );
+
+    Dali::ImfManager::ImfEventData imfData ( Dali::ImfManager::DELETESURROUNDING , keyString, cursorOffset, numberOfChars );
+    Dali::ImfManager handle( this );
+    mEventSignalV2.Emit( handle, imfData );
+  }
+}
+
+void ImfManager::NotifyCursorPosition()
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::NotifyCursorPosition\n" );
+
+  if ( mIMFContext )
+  {
+    ecore_imf_context_cursor_position_set( mIMFContext, mIMFCursorPosition );
+  }
+}
+
+int ImfManager::GetCursorPosition()
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetCursorPosition\n" );
+
+  return mIMFCursorPosition;
+}
+
+void ImfManager::SetCursorPosition( unsigned int cursorPosition )
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SetCursorPosition\n" );
+
+  mIMFCursorPosition = ( int )cursorPosition;
+}
+
+void ImfManager::SetSurroundingText( std::string text )
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::SetSurroundingText\n" );
+
+  mSurroundingText = text;
+}
+
+std::string ImfManager::GetSurroundingText()
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "ImfManager::GetSurroundingText\n" );
+
+  return mSurroundingText;
+}
+
+} // Adaptor
+
+} // Internal
+
+} // Dali
diff --git a/adaptors/wayland/imf-manager-impl.h b/adaptors/wayland/imf-manager-impl.h
new file mode 100644 (file)
index 0000000..fe6e477
--- /dev/null
@@ -0,0 +1,217 @@
+#ifndef __DALI_INTERNAL_IMF_MANAGER_H
+#define __DALI_INTERNAL_IMF_MANAGER_H
+
+/*
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <Ecore_IMF.h>
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+
+#include <dali/public-api/object/base-object.h>
+#include <imf-manager.h>
+#include <dali/integration-api/events/key-event-integ.h>
+
+// INTERNAL INCLUDES
+
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+class RenderSurface;
+
+class ImfManager : public Dali::BaseObject
+{
+public:
+  typedef Dali::ImfManager::ImfManagerSignalV2 ImfManagerSignalV2;
+  typedef Dali::ImfManager::ImfEventSignalV2 ImfEventSignalV2;
+
+public:
+
+  /**
+   * Create the IMF manager.
+   */
+  static Dali::ImfManager Get();
+
+  /**
+   * Connect Callbacks required for IMF.
+   * If you don't connect imf callbacks, you can't get the key events.
+   * The events are PreeditChanged, Commit and DeleteSurrounding.
+   */
+  void ConnectCallbacks();
+
+  /**
+   * Disconnect Callbacks attached to imf context.
+   */
+  void DisconnectCallbacks();
+
+  /**
+   * @copydoc Dali::ImfManager::Activate()
+   */
+  void Activate();
+
+  /**
+   * @copydoc Dali::ImfManager::Deactivate()
+   */
+  void Deactivate();
+
+  /**
+   * @copydoc Dali::ImfManager::Reset()
+   */
+  void Reset();
+
+  /**
+   * @copydoc Dali::ImfManager::GetContext()
+   */
+  Ecore_IMF_Context* GetContext();
+
+  /**
+   * @copydoc Dali::ImfManager::RestoreAfterFocusLost()
+   */
+  bool RestoreAfterFocusLost() const;
+
+  /**
+   * @copydoc Dali::ImfManager::SetRestoreAferFocusLost()
+   */
+  void SetRestoreAferFocusLost( bool toggle );
+
+  /**
+   * @copydoc Dali::ImfManager::PreEditChanged()
+   */
+  void PreEditChanged( void *data, Ecore_IMF_Context *imfContext, void *event_info );
+
+  /**
+   * @copydoc Dali::ImfManager::NotifyCursorPosition()
+   */
+  void CommitReceived( void *data, Ecore_IMF_Context *imfContext, void *event_info );
+
+  /**
+   * @copydoc Dali::ImfManager::NotifyCursorPosition()
+   */
+  Eina_Bool RetrieveSurrounding( void *data, Ecore_IMF_Context *imfContext, char** text, int* cursorPosition );
+
+  /**
+   * @copydoc Dali::ImfManager::DeleteSurrounding()
+   */
+  void DeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *event_info );
+
+  // Cursor related
+  /**
+   * @copydoc Dali::ImfManager::NotifyCursorPosition()
+   */
+  void NotifyCursorPosition();
+
+  /**
+   * @copydoc Dali::ImfManager::GetCursorPosition()
+   */
+  int GetCursorPosition();
+
+  /**
+   * @copydoc Dali::ImfManager::SetCursorPosition()
+   */
+  void SetCursorPosition( unsigned int cursorPosition );
+
+  /**
+   * @copydoc Dali::ImfManager::SetSurroundingText()
+   */
+  void SetSurroundingText( std::string text );
+
+  /**
+   * @copydoc Dali::ImfManager::GetSurroundingText()
+   */
+  std::string GetSurroundingText();
+
+public:  // Signals
+
+  /**
+   * @copydoc Dali::ImfManager::ActivatedSignal()
+   */
+  ImfManagerSignalV2& ActivatedSignal() { return mActivatedSignalV2; }
+
+  /**
+   * @copydoc Dali::ImfManager::EventReceivedSignal()
+   */
+  ImfEventSignalV2& EventReceivedSignal() { return mEventSignalV2; }
+
+protected:
+
+  /**
+   * Destructor.
+   */
+  virtual ~ImfManager();
+
+private:
+  /**
+   * @copydoc Dali::ImfManager::DeleteContext()
+   */
+  void DeleteContext();
+
+private:
+  // Undefined
+  ImfManager( const ImfManager& );
+  ImfManager& operator=( ImfManager& );
+
+private:
+  Ecore_IMF_Context* mIMFContext;
+  int mIMFCursorPosition;
+  std::string mSurroundingText;
+
+  bool mRestoreAfterFocusLost:1;             ///< Whether the keyboard needs to be restored (activated ) after focus regained.
+  bool mIdleCallbackConnected:1;             ///< Whether the idle callback is already connected.
+
+  std::vector<Dali::Integration::KeyEvent> mKeyEvents; ///< Stores key events to be sent from idle call-back.
+
+  ImfManagerSignalV2      mActivatedSignalV2;
+  ImfEventSignalV2        mEventSignalV2;
+
+public:
+
+inline static Internal::Adaptor::ImfManager& GetImplementation(Dali::ImfManager& imfManager)
+{
+  DALI_ASSERT_ALWAYS( imfManager && "ImfManager handle is empty" );
+
+  BaseObject& handle = imfManager.GetBaseObject();
+
+  return static_cast<Internal::Adaptor::ImfManager&>(handle);
+}
+
+inline static const  Internal::Adaptor::ImfManager& GetImplementation(const Dali::ImfManager& imfManager)
+{
+  DALI_ASSERT_ALWAYS( imfManager && "ImfManager handle is empty" );
+
+  const BaseObject& handle = imfManager.GetBaseObject();
+
+  return static_cast<const Internal::Adaptor::ImfManager&>(handle);
+}
+
+};
+
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_IMF_MANAGER_H
diff --git a/adaptors/wayland/key-impl-wl.cpp b/adaptors/wayland/key-impl-wl.cpp
new file mode 100644 (file)
index 0000000..c2c938a
--- /dev/null
@@ -0,0 +1,177 @@
+/*
+ * 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 "key-impl.h"
+
+// EXTERNAL INCLUDES
+#include <map>
+#include <string.h>
+#include <iostream>
+
+
+#include <dali/integration-api/debug.h>
+
+
+namespace Dali
+{
+
+const KEY DALI_KEY_INVALID          = -1;
+const KEY DALI_KEY_ESCAPE           = 9;
+const KEY DALI_KEY_BACK             = 166;
+const KEY DALI_KEY_CAMERA           = 167;
+const KEY DALI_KEY_CONFIG           = 168;
+const KEY DALI_KEY_POWER            = 169;
+const KEY DALI_KEY_PAUSE            = 170;
+const KEY DALI_KEY_CANCEL           = 171;
+const KEY DALI_KEY_PLAY_CD          = 172;
+const KEY DALI_KEY_STOP_CD          = 173;
+const KEY DALI_KEY_PAUSE_CD         = 174;
+const KEY DALI_KEY_NEXT_SONG        = 175;
+const KEY DALI_KEY_PREVIOUS_SONG    = 176;
+const KEY DALI_KEY_REWIND           = 177;
+const KEY DALI_KEY_FASTFORWARD      = 178;
+const KEY DALI_KEY_MEDIA            = 179;
+const KEY DALI_KEY_PLAY_PAUSE       = 180;
+const KEY DALI_KEY_MUTE             = 181;
+const KEY DALI_KEY_SEND             = 182;
+const KEY DALI_KEY_SELECT           = 183;
+const KEY DALI_KEY_END              = DALI_KEY_BACK;
+const KEY DALI_KEY_MENU             = DALI_KEY_SEND;
+const KEY DALI_KEY_HOME             = DALI_KEY_SELECT;
+const KEY DALI_KEY_HOMEPAGE         = 187;
+const KEY DALI_KEY_WEBPAGE          = 188;
+const KEY DALI_KEY_MAIL             = 189;
+const KEY DALI_KEY_SCREENSAVER      = 190;
+const KEY DALI_KEY_BRIGHTNESS_UP    = 191;
+const KEY DALI_KEY_BRIGHTNESS_DOWN  = 192;
+const KEY DALI_KEY_SOFT_KBD         = 193;
+const KEY DALI_KEY_QUICK_PANEL      = 194;
+const KEY DALI_KEY_TASK_SWITCH      = 195;
+const KEY DALI_KEY_APPS             = 196;
+const KEY DALI_KEY_SEARCH           = 197;
+const KEY DALI_KEY_VOICE            = 198;
+const KEY DALI_KEY_LANGUAGE         = 199;
+const KEY DALI_KEY_VOLUME_UP        = 200;
+const KEY DALI_KEY_VOLUME_DOWN      = 201;
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace KeyLookup
+{
+
+namespace
+{
+
+struct KeyLookup
+{
+  const char* keyName;      ///< X string representation
+  const int   daliKeyCode;  ///< Dali Enum Representation
+  const bool  deviceButton; ///< Whether the key is from a button on the device
+};
+
+// matches a DALI_KEY enum, to a X key name
+KeyLookup KeyLookupTable[]=
+{
+  // more than one key name can be assigned to a single dali-key code
+  // e.g. Menu and KEY_MENU("FS86KeyMenu") are both assigned to  DALI_KEY_MENU
+
+  { "Escape",               DALI_KEY_ESCAPE,          false },  // item not defined in utilX
+  { "Menu",                 DALI_KEY_MENU,            false },  // item not defined in utilX
+};
+
+const std::size_t KEY_LOOKUP_COUNT = (sizeof( KeyLookupTable))/ (sizeof(KeyLookup));
+
+class KeyMap
+{
+  public:
+
+  KeyMap():
+  mLookup( cmpString )
+  {
+    // create the lookup
+    for( size_t i = 0; i < KEY_LOOKUP_COUNT ; ++i )
+    {
+      const KeyLookup&  keyLookup( KeyLookupTable[i] );
+      mLookup[ keyLookup.keyName  ] = DaliKeyType( keyLookup.daliKeyCode, keyLookup.deviceButton );
+    }
+  }
+
+  int GetDaliKeyEnum( const char* keyName ) const
+  {
+    Lookup::const_iterator i = mLookup.find( keyName );
+    if( i == mLookup.end() )
+    {
+      return -1;
+    }
+    else
+    {
+      return (*i).second.first;
+    }
+  }
+
+  bool IsDeviceButton( const char* keyName ) const
+  {
+    Lookup::const_iterator i = mLookup.find( keyName );
+    if ( i != mLookup.end() )
+    {
+      return (*i).second.second;
+    }
+    return false;
+  }
+
+  private:
+
+  /**
+   * compare function, to compare string by pointer
+   */
+  static bool cmpString( const char* a, const char* b)
+  {
+    return strcmp(a, b) < 0;
+  }
+
+  typedef std::pair< int, bool > DaliKeyType;
+  typedef std::map<const char* /* key name */, DaliKeyType /* key code */, bool(*) ( char const* a, char const* b) > Lookup;
+  Lookup mLookup;
+
+};
+const KeyMap globalKeyLookup;
+
+} // un-named name space
+
+bool IsKey( const Dali::KeyEvent& keyEvent, Dali::KEY daliKey)
+{
+  int key = globalKeyLookup.GetDaliKeyEnum( keyEvent.keyPressedName.c_str() );
+  return daliKey == key;
+}
+
+bool IsDeviceButton( const char* keyName )
+{
+  return globalKeyLookup.IsDeviceButton( keyName );
+}
+
+} // namespace KeyLookup
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/pixmap-image-impl-wl.cpp b/adaptors/wayland/pixmap-image-impl-wl.cpp
new file mode 100644 (file)
index 0000000..5c4aeec
--- /dev/null
@@ -0,0 +1,305 @@
+/*
+ * 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 "pixmap-image-impl.h"
+
+// EXTERNAL INCLUDES
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+#include <dali/integration-api/debug.h>
+#include <render-surface.h>
+
+// INTERNAL INCLUDES
+#include <gl/egl-image-extensions.h>
+#include <gl/egl-factory.h>
+#include <adaptor-impl.h>
+
+// Allow this to be encoded and saved:
+#include <platform-abstractions/slp/resource-loader/resource-loader.h>
+#include <platform-abstractions/slp/resource-loader/loader-jpeg.h>
+#include <platform-abstractions/slp/resource-loader/loader-png.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+using Dali::Integration::PixelBuffer;
+
+// Pieces needed to save compressed images (temporary location while plumbing):
+namespace
+{
+
+  /**
+   * Simple function to tell intended image file format from filename
+   */
+  FileFormat GetFormatFromFileName( const std::string& filename )
+  {
+    if (filename.length() < 5)
+    {
+      DALI_LOG_WARNING("Invalid (short) filename.");
+    }
+    FileFormat format(INVALID_FORMAT);
+
+    const std::size_t filenameSize = filename.length();
+
+    if(filenameSize >= 4){ // Avoid throwing out_of_range or failing silently if exceptions are turned-off on the compare(). (http://www.cplusplus.com/reference/string/string/compare/)
+      if( !filename.compare( filenameSize - 4, 4, ".jpg" )
+       || !filename.compare( filenameSize - 4, 4, ".JPG" ) )
+      {
+        format = JPG_FORMAT;
+      }
+      else if( !filename.compare( filenameSize - 4, 4, ".png" )
+            || !filename.compare( filenameSize - 4, 4, ".PNG" ) )
+      {
+        format = PNG_FORMAT;
+      }
+      else if( !filename.compare( filenameSize - 4, 4, ".bmp" )
+            || !filename.compare( filenameSize - 4, 4, ".BMP" ) )
+      {
+        format = BMP_FORMAT;
+      }
+      else if( !filename.compare( filenameSize - 4, 4, ".gif" )
+            || !filename.compare( filenameSize - 4, 4, ".GIF" ) )
+      {
+        format = GIF_FORMAT;
+      }
+      else if( !filename.compare( filenameSize - 4, 4, ".ico" )
+            || !filename.compare( filenameSize - 4, 4, ".ICO" ) )
+      {
+        format = ICO_FORMAT;
+      }
+      else if(filenameSize >= 5){
+        if( !filename.compare( filenameSize - 5, 5, ".jpeg" )
+         || !filename.compare( filenameSize - 5, 5, ".JPEG" ) )
+        {
+          format = JPG_FORMAT;
+        }
+      }
+    }
+
+    return format;
+  }
+
+  bool EncodeToFormat( const PixelBuffer* pixelBuffer, std::vector< unsigned char >& encodedPixels, FileFormat formatEncoding, std::size_t width, std::size_t height, Pixel::Format pixelFormat )
+  {
+    switch( formatEncoding )
+    {
+      case JPG_FORMAT:
+      {
+        return SlpPlatform::EncodeToJpeg( pixelBuffer, encodedPixels, width, height, pixelFormat );
+        break;
+      }
+      case PNG_FORMAT:
+      {
+        return SlpPlatform::EncodeToPng( pixelBuffer, encodedPixels, width, height, pixelFormat );
+        break;
+      }
+      default:
+      {
+        DALI_LOG_ERROR("Format not supported for image encoding (supported formats are PNG and JPEG)");
+        break;
+      }
+    }
+    return false;
+  }
+
+  bool EncodeToFile(const PixelBuffer * const pixelBuffer, const std::string& filename, const Pixel::Format pixelFormat, const std::size_t width, const std::size_t height)
+  {
+    DALI_ASSERT_DEBUG(pixelBuffer != 0 && filename.size() > 4 && width > 0 && height > 0);
+    std::vector< unsigned char > pixbufEncoded;
+    const FileFormat format = GetFormatFromFileName( filename );
+    const bool encodeResult = EncodeToFormat( pixelBuffer, pixbufEncoded, format, width, height, pixelFormat );
+    if(!encodeResult)
+    {
+      DALI_LOG_ERROR("Encoding pixels failed");
+      return false;
+    }
+    return SlpPlatform::ResourceLoader::SaveFile( filename, pixbufEncoded );
+  }
+}
+
+PixmapImage* PixmapImage::New(unsigned int width, unsigned int height, Dali::PixmapImage::ColorDepth depth, Dali::Adaptor& adaptor,  Any pixmap )
+{
+  PixmapImage* image = new PixmapImage( width, height, depth, adaptor, pixmap );
+  DALI_ASSERT_DEBUG( image && "PixmapImage allocation failed." );
+
+  // 2nd phase construction
+  if(image) //< Defensive in case we ever compile without exceptions.
+  {
+    image->Initialize();
+  }
+
+  return image;
+}
+
+PixmapImage::PixmapImage(unsigned int width, unsigned int height, Dali::PixmapImage::ColorDepth depth, Dali::Adaptor& adaptor, Any pixmap)
+: mWidth(width),
+  mHeight(height),
+  mOwnPixmap(true),
+  mPixelFormat(Pixel::RGB888),
+  mColorDepth(depth),
+  mAdaptor(Internal::Adaptor::Adaptor::GetImplementation(adaptor)),
+  mEglImageKHR(NULL)
+{
+}
+
+void PixmapImage::Initialize()
+{
+}
+
+PixmapImage::~PixmapImage()
+{
+  // Lost the opportunity to call GlExtensionDestroy() if Adaptor is destroyed first
+  if( Adaptor::IsAvailable() )
+  {
+    // GlExtensionDestroy() called from GLCleanup on the render thread. Checking this is done here.
+    // (mEglImageKHR is now read/written from different threads although ref counted destruction
+    //  should mean this isnt concurrent)
+    DALI_ASSERT_ALWAYS( NULL == mEglImageKHR && "NativeImage GL resources have not been properly cleaned up" );
+  }
+}
+
+Any PixmapImage::GetPixmap(Dali::PixmapImage::PixmapAPI api) const
+{
+    return NULL;
+}
+
+Any PixmapImage::GetDisplay() const
+{
+    return NULL;
+}
+
+bool PixmapImage::GetPixels(std::vector<unsigned char>& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const
+{
+    return false;
+}
+
+bool PixmapImage::EncodeToFile(const std::string& filename) const
+{
+  std::vector< unsigned char > pixbuf;
+  unsigned int width(0), height(0);
+  Pixel::Format pixelFormat;
+
+  if(GetPixels(pixbuf, width, height, pixelFormat))
+  {
+    return Dali::Internal::Adaptor::EncodeToFile(&pixbuf[0], filename, pixelFormat, width, height);
+  }
+  return false;
+}
+
+bool PixmapImage::GlExtensionCreate()
+{
+    return false;
+}
+
+void PixmapImage::GlExtensionDestroy()
+{
+  EglImageExtensions* eglImageExtensions = GetEglImageExtensions();
+
+  eglImageExtensions->DestroyImageKHR(mEglImageKHR);
+
+  mEglImageKHR = NULL;
+}
+
+unsigned int PixmapImage::TargetTexture()
+{
+  EglImageExtensions* eglImageExtensions = GetEglImageExtensions();
+
+  eglImageExtensions->TargetTextureKHR(mEglImageKHR);
+
+  return 0;
+}
+
+int PixmapImage::GetPixelDepth(Dali::PixmapImage::ColorDepth depth) const
+{
+  switch (depth)
+  {
+    case Dali::PixmapImage::COLOR_DEPTH_8:
+    {
+      return 8;
+    }
+    case Dali::PixmapImage::COLOR_DEPTH_16:
+    {
+      return 16;
+    }
+    case Dali::PixmapImage::COLOR_DEPTH_24:
+    {
+      return 24;
+    }
+    case Dali::PixmapImage::COLOR_DEPTH_32:
+    {
+      return 32;
+    }
+    default:
+    {
+      DALI_ASSERT_DEBUG(0 && "unknown color enum");
+      return 0;
+    }
+  }
+}
+
+void PixmapImage::SetPixelFormat(int depth)
+{
+  // store the pixel format based on the depth
+  switch (depth)
+  {
+    case 8:
+    {
+      mPixelFormat = Pixel::A8;
+      break;
+    }
+    case 16:
+    {
+      mPixelFormat = Pixel::RGB565;
+      break;
+    }
+    case 32:
+    {
+      mPixelFormat = Pixel::RGBA8888;
+      break;
+    }
+    case 24:
+    default:
+    {
+      mPixelFormat = Pixel::RGB888;
+      break;
+    }
+  }
+}
+
+void PixmapImage::GetPixmapDetails()
+{
+}
+
+EglImageExtensions* PixmapImage::GetEglImageExtensions() const
+{
+  EglFactory& factory = mAdaptor.GetEGLFactory();
+  EglImageExtensions* egl = factory.GetImageExtensions();
+  DALI_ASSERT_DEBUG( egl && "EGL Image Extensions not initialized" );
+  return egl;
+}
+
+} // namespace Adaptor
+
+} // namespace internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/pixmap-image-impl.h b/adaptors/wayland/pixmap-image-impl.h
new file mode 100644 (file)
index 0000000..12f3498
--- /dev/null
@@ -0,0 +1,189 @@
+#ifndef __DALI_INTERNAL_PIXMAP_IMAGE_H__
+#define __DALI_INTERNAL_PIXMAP_IMAGE_H__
+
+/*
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+#include <pixmap-image.h>
+
+// INTERNAL INCLUDES
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+class Adaptor;
+class EglImageExtensions;
+
+/**
+ * Dali internal PixmapImage.
+ */
+class PixmapImage
+{
+public:
+
+  /**
+   * Create a new PixmapImage internally.
+   * Depending on hardware the width and height may have to be a power of two.
+   * @param[in] width The width of the image.
+   * @param[in] height The height of the image.
+   * @param[in] depth color depth of the pixmap
+   * @param[in] adaptor reference to dali adaptor
+   * @param[in] pixmap contains either: pixmap of type X11 Pixmap , a Ecore_X_Pixmap or is empty
+   * @return A smart-pointer to a newly allocated image.
+   */
+  static PixmapImage* New(unsigned int width,
+                          unsigned int height,
+                          Dali::PixmapImage::ColorDepth depth,
+                          Dali::Adaptor& adaptor,
+                          Any pixmap);
+
+   /**
+    * @copydoc Dali::PixmapImage::GetPixmap()
+    */
+  Any GetPixmap(Dali::PixmapImage::PixmapAPI api) const;
+
+  /**
+   * @copydoc Dali::PixmapImage::GetDisplay()
+   */
+  Any GetDisplay() const;
+
+  /**
+   * @copydoc Dali::PixmapImage::GetPixels()
+   */
+  bool GetPixels(std::vector<unsigned char> &pixbuf, unsigned int &width, unsigned int &height, Pixel::Format& pixelFormat ) const;
+
+  /**
+   * @copydoc Dali::PixmapImage::EncodeToFile(const std::string& )
+   */
+  bool EncodeToFile(const std::string& filename) const;
+
+  /**
+   * destructor
+   */
+  ~PixmapImage();
+
+  /**
+   * @copydoc Dali::PixmapImage::GlExtensionCreate()
+   */
+  bool GlExtensionCreate();
+
+  /**
+   * @copydoc Dali::PixmapImage::GlExtensionDestroy()
+   */
+  void GlExtensionDestroy();
+
+  /**
+   * @copydoc Dali::PixmapImage::TargetTexture()
+   */
+  unsigned int TargetTexture();
+
+  /**
+   * @copydoc Dali::PixmapImage::GetWidth()
+   */
+  unsigned int GetWidth() const
+  {
+    return mWidth;
+  }
+
+  /**
+   * @copydoc Dali::PixmapImage::GetHeight()
+   */
+  unsigned int GetHeight() const
+  {
+    return mHeight;
+  }
+
+  /**
+   * @copydoc Dali::PixmapImage::GetPixelFormat()
+   */
+  Pixel::Format GetPixelFormat() const
+  {
+    return mPixelFormat;
+  }
+
+private:
+
+  /**
+   * Private constructor; @see PixmapImage::New()
+   * @param[in] width The width of the image.
+   * @param[in] height The height of the image.
+   * @param[in] colour depth of the pixmap
+   * @param[in] adaptor a reference to Dali adaptor
+   * @param[in] pixmap contains either: pixmap of type X11 Pixmap , a Ecore_X_Pixmap or is empty
+   */
+  PixmapImage(unsigned int width,
+              unsigned  int height,
+              Dali::PixmapImage::ColorDepth depth,
+              Dali::Adaptor &adaptor,
+              Any pixmap);
+
+  /**
+   * 2nd phase construction.
+   */
+  void Initialize();
+
+  /**
+   * Uses X11 to get the default depth.
+   * @param depth the PixelImage depth enum
+   * @return default x11 pixel depth
+   */
+  int GetPixelDepth(Dali::PixmapImage::ColorDepth depth) const;
+
+  /**
+   * Sets the pixel format based on the bit depth
+   * @param depth depth in bytes
+   */
+  void SetPixelFormat(int depth);
+
+  /**
+   * Given an existing pixmap, the function uses X to find out
+   * the width, heigth and depth of that pixmap.
+   */
+  void GetPixmapDetails();
+
+  /**
+   * Returns the egl image extensions class from the adaptor
+   * @return reference to egl image extensionsa
+   */
+  EglImageExtensions* GetEglImageExtensions() const;
+
+private:
+
+  unsigned int mWidth;                        ///< pixmap width
+  unsigned int mHeight;                       ///< pixmap heights
+  bool mOwnPixmap;                            ///< Whether we created pixmap or not
+  Pixel::Format mPixelFormat;                 ///< pixmap pixel format
+  Dali::PixmapImage::ColorDepth mColorDepth;  ///< color depth of pixmap
+  Adaptor& mAdaptor;                          ///< adaptor
+  void* mEglImageKHR;                         ///< From EGL extension
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_PIXMAP_IMAGE_H__
diff --git a/adaptors/wayland/pixmap-render-surface-wl.cpp b/adaptors/wayland/pixmap-render-surface-wl.cpp
new file mode 100644 (file)
index 0000000..b2b5378
--- /dev/null
@@ -0,0 +1,175 @@
+/*
+ * 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 "pixmap-render-surface.h"
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/gl-abstraction.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <ecore-wl-types.h>
+#include <trigger-event.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+#if defined(DEBUG_ENABLED)
+extern Debug::Filter* gRenderSurfaceLogFilter;
+#endif
+
+namespace ECore
+{
+
+PixmapRenderSurface::PixmapRenderSurface( Dali::PositionSize positionSize,
+                              Any surface,
+                              Any display,
+                              const std::string& name,
+                              bool isTransparent)
+: RenderSurface( Dali::RenderSurface::PIXMAP, positionSize, surface, display, name, isTransparent )
+{
+  Init( surface );
+}
+
+PixmapRenderSurface::~PixmapRenderSurface()
+{
+  // release the surface if we own one
+  if( mOwnSurface )
+  {
+    // if we did create the pixmap, delete the pixmap
+    DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::General, "Own pixmap (%x) freed\n", mX11Pixmap );
+  }
+}
+
+Dali::RenderSurface::SurfaceType PixmapRenderSurface::GetType()
+{
+  return Dali::RenderSurface::PIXMAP;
+}
+
+Any PixmapRenderSurface::GetSurface()
+{
+  return Any( NULL );
+}
+
+void PixmapRenderSurface::InitializeEgl( EglInterface& eglIf )
+{
+  DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
+
+  EglImplementation& eglImpl = static_cast<EglImplementation&>( eglIf );
+  eglImpl.InitializeGles( reinterpret_cast< EGLNativeDisplayType >( mMainDisplay ) );
+
+  eglImpl.ChooseConfig(false, mColorDepth);
+}
+
+void PixmapRenderSurface::CreateEglSurface( EglInterface& eglIf )
+{
+  DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
+
+  //EglImplementation& eglImpl = static_cast<EglImplementation&>( eglIf );
+
+  // create the EGL surface
+  // need to cast to X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
+  // FIXME
+}
+
+void PixmapRenderSurface::DestroyEglSurface( EglInterface& eglIf )
+{
+  DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
+
+  EglImplementation& eglImpl = static_cast<EglImplementation&>( eglIf );
+  eglImpl.DestroySurface();
+}
+
+bool PixmapRenderSurface::ReplaceEGLSurface( EglInterface& eglIf )
+{
+  DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
+
+  EglImplementation& eglImpl = static_cast<EglImplementation&>( eglIf );
+  eglImpl.InitializeGles( reinterpret_cast< EGLNativeDisplayType >( mMainDisplay ) );
+
+  // a new surface for the new pixmap
+  // need to cast to X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
+  // FIXME
+  return false;
+}
+
+bool PixmapRenderSurface::PreRender( EglInterface&, Integration::GlAbstraction& )
+{
+  // nothing to do for pixmaps
+  return true;
+}
+
+void PixmapRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, unsigned int timeDelta, SyncMode syncMode )
+{
+  // flush gl instruction queue
+  glAbstraction.Flush();
+
+  // create damage for client applications which wish to know the update timing
+  if( mRenderNotification )
+  {
+    // use notification trigger
+    // Tell the event-thread to render the pixmap
+    mRenderNotification->Trigger();
+  }
+  else
+  {
+    // as a fallback, send damage event. This is needed until livebox is fixed to
+    // stop using damage events for render
+    // FIXME
+  }
+
+  // Do render synchronisation
+  DoRenderSync( timeDelta, syncMode );
+}
+
+void PixmapRenderSurface::CreateWlRenderable()
+{
+  // check we're creating one with a valid size
+  DALI_ASSERT_ALWAYS( mPosition.width > 0 && mPosition.height > 0 && "Pixmap size is invalid" );
+
+  // FIXME
+}
+
+void PixmapRenderSurface::UseExistingRenderable( unsigned int surfaceId )
+{
+}
+
+void PixmapRenderSurface::RenderSync()
+{
+  {
+    boost::unique_lock< boost::mutex > lock( mSyncMutex );
+    mSyncReceived = true;
+  }
+
+  // wake render thread if it was waiting for the notify
+  mSyncNotify.notify_all();
+}
+
+} // namespace ECore
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/pixmap-render-surface.h b/adaptors/wayland/pixmap-render-surface.h
new file mode 100644 (file)
index 0000000..ce8cb5c
--- /dev/null
@@ -0,0 +1,138 @@
+#ifndef __DALI_INTERNAL_ECORE_X_PIXMAP_RENDER_SURFACE_H__
+#define __DALI_INTERNAL_ECORE_X_PIXMAP_RENDER_SURFACE_H__
+
+/*
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <ecore-wl-render-surface.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+class TriggerEvent;
+
+namespace ECore
+{
+
+/**
+ * Ecore X11 implementation of render surface.
+ */
+class PixmapRenderSurface : public RenderSurface
+{
+public:
+
+  /**
+    * Uses an Wayland surface to render to.
+    * @param [in] positionSize the position and size of the surface
+    * @param [in] surface can be a Wayland-window (type must be unsigned int).
+    * @param [in] display connection to Wayland-server if the surface is a X window or pixmap (type must be void * to X display struct)
+    * @param [in] name optional name of surface passed in
+    * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
+    */
+  PixmapRenderSurface( Dali::PositionSize positionSize,
+                       Any surface,
+                       Any display,
+                       const std::string& name,
+                       bool isTransparent = false);
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::~RenderSurface
+   */
+  virtual ~PixmapRenderSurface();
+
+public: // API
+
+public: // from Dali::RenderSurface
+
+  /**
+   * @copydoc Dali::RenderSurface::GetType()
+   */
+  virtual Dali::RenderSurface::SurfaceType GetType();
+
+  /**
+   * @copydoc Dali::RenderSurface::GetSurface()
+   */
+  virtual Any GetSurface();
+
+public: // from Internal::Adaptor::RenderSurface
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::InitializeEgl()
+   */
+  virtual void InitializeEgl( EglInterface& egl );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::CreateEglSurface()
+   */
+  virtual void CreateEglSurface( EglInterface& egl );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::DestroyEglSurface()
+   */
+  virtual void DestroyEglSurface( EglInterface& egl );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::ReplaceEGLSurface()
+   */
+  virtual bool ReplaceEGLSurface( EglInterface& egl );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::RenderSync()
+   */
+  virtual void RenderSync();
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::PreRender()
+   */
+  virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::PostRender()
+   */
+  virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, unsigned int timeDelta, SyncMode syncMode );
+
+private:
+
+  /**
+   * Create XPixmap
+   */
+  virtual void CreateWlRenderable();
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::UseExistingRenderable
+   */
+  virtual void UseExistingRenderable( unsigned int surfaceId );
+
+private: // Data
+
+};
+
+} // namespace ECore
+
+} // namespace Adaptor
+
+} // namespace internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_ECORE_X_PIXMAP_RENDER_SURFACE_H__
diff --git a/adaptors/wayland/server-connection-wl.cpp b/adaptors/wayland/server-connection-wl.cpp
new file mode 100644 (file)
index 0000000..76376c3
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * 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 "server-connection.h"
+
+// EXTERNAL INCLUDES
+#include <Ecore.h>
+
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+#if defined(DEBUG_ENABLED)
+extern Debug::Filter* gIndicatorLogFilter;
+#endif
+
+
+ServerConnection::ServerConnection(
+  const char*                 serviceName,
+  int                         serviceNumber,
+  bool                        isSystem,
+  ServerConnection::Observer* observer)
+
+: mConnected(false),
+  mObserver(observer)
+{
+  ecore_ipc_init();
+  mService.name = eina_stringshare_add(serviceName);
+  mService.num = serviceNumber;
+  mService.isSystem = isSystem;
+
+  DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "ServerConnection: Connecting to %s %d\n", mService.name, mService.num );
+
+  mIpcServer = NULL;
+
+  if( !mIpcServer )
+  {
+    ecore_ipc_shutdown();
+  }
+  else
+  {
+    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_ADD,
+                                                     &ServerConnection::IpcServerAdd,
+                                                     this ) );
+
+    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL,
+                                                     &ServerConnection::IpcServerDel,
+                                                     this ) );
+
+    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DATA,
+                                                     &ServerConnection::IpcServerData,
+                                                     this));
+
+    mConnected = true;
+  }
+}
+
+} // Adaptor
+} // Internal
+} // Dali
diff --git a/adaptors/wayland/system-settings-wl.cpp b/adaptors/wayland/system-settings-wl.cpp
new file mode 100644 (file)
index 0000000..679964e
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <system_settings.h>
+#include <Elementary.h>
+
+// INTERNAL INCLUDES
+#include "system-settings.h"
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+int GetElmAccessActionOver()
+{
+  return 0;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/virtual-keyboard-impl-wl.cpp b/adaptors/wayland/virtual-keyboard-impl-wl.cpp
new file mode 100644 (file)
index 0000000..0d9b790
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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 "virtual-keyboard-impl.h"
+
+// EXTERNAL INCLUDES
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+#include <algorithm>
+
+#include <dali/public-api/common/vector-wrapper.h>
+#include <adaptor.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <locale-utils.h>
+#include <imf-manager-impl.h>
+
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace VirtualKeyboard
+{
+
+void RotateTo(int angle)
+{
+}
+
+} // namespace VirtualKeyboard
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/window-impl-wl.cpp b/adaptors/wayland/window-impl-wl.cpp
new file mode 100644 (file)
index 0000000..808ae52
--- /dev/null
@@ -0,0 +1,474 @@
+/*
+ * 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 "window-impl.h"
+
+// EXTERNAL HEADERS
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+
+#include <dali/integration-api/core.h>
+#include <dali/integration-api/system-overlay.h>
+#include <dali/public-api/render-tasks/render-task.h>
+#include <dali/public-api/render-tasks/render-task-list.h>
+#include <orientation.h>
+
+// INTERNAL HEADERS
+#include <window-render-surface.h>
+#include <drag-and-drop-detector-impl.h>
+#include <indicator-impl.h>
+#include <window-visibility-observer.h>
+#include <orientation-impl.h>
+
+namespace
+{
+const float INDICATOR_ANIMATION_DURATION( 0.18f ); // 180 milli seconds
+const float INDICATOR_SHOW_Y_POSITION( 0.0f );
+const float INDICATOR_HIDE_Y_POSITION( -52.0f );
+}
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gWindowLogFilter = Debug::Filter::New(Debug::Concise, false, "LOG_WINDOW");
+#endif
+
+/**
+ * TODO: Abstract Window class out and move this into a window implementation for Ecore
+ */
+struct Window::EventHandler
+{
+  /**
+   * Constructor
+   * @param[in]  window  A pointer to the window class.
+   */
+  EventHandler( Window* window )
+  : mWindow( window ),
+    mEcoreWindow( 0 )
+  {
+  }
+
+  /**
+   * Destructor
+   */
+  ~EventHandler()
+  {
+    if ( mWindowPropertyHandler )
+    {
+      ecore_event_handler_del( mWindowPropertyHandler );
+    }
+    if ( mClientMessagehandler )
+    {
+      ecore_event_handler_del( mClientMessagehandler );
+    }
+  }
+
+  // Static methods
+
+  /// Called when the window properties are changed.
+  static Eina_Bool EcoreEventWindowPropertyChanged( void* data, int type, void* event )
+  {
+    return EINA_FALSE;
+  }
+
+  /// Called when the window properties are changed.
+  static Eina_Bool EcoreEventClientMessage( void* data, int type, void* event )
+  {
+    return EINA_FALSE;
+  }
+
+  // Data
+  Window* mWindow;
+  Ecore_Event_Handler* mWindowPropertyHandler;
+  Ecore_Event_Handler* mClientMessagehandler;
+  Ecore_Wl_Window* mEcoreWindow;
+};
+
+
+Window* Window::New(const PositionSize& posSize, const std::string& name, bool isTransparent)
+{
+  Window* window = new Window();
+  window->mIsTransparent = isTransparent;
+  window->Initialize(posSize, name);
+  return window;
+}
+
+void Window::SetAdaptor(Dali::Adaptor& adaptor)
+{
+  DALI_ASSERT_ALWAYS( !mStarted && "Adaptor already started" );
+  mStarted = true;
+
+  // Only create one overlay per window
+  Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation(adaptor);
+  Integration::Core& core = adaptorImpl.GetCore();
+  mOverlay = &core.GetSystemOverlay();
+
+  Dali::RenderTaskList taskList = mOverlay->GetOverlayRenderTasks();
+  taskList.CreateTask();
+
+  mAdaptor = &adaptorImpl;
+  mAdaptor->AddObserver( *this );
+
+  // Can only create the detector when we know the Core has been instantiated.
+  mDragAndDropDetector = DragAndDropDetector::New();
+  mAdaptor->SetDragAndDropDetector( &GetImplementation( mDragAndDropDetector ) );
+
+  if( mOrientation )
+  {
+    mOrientation->SetAdaptor(adaptor);
+  }
+
+  if( mIndicator != NULL )
+  {
+    mIndicator->SetAdaptor(mAdaptor);
+  }
+}
+
+RenderSurface* Window::GetSurface()
+{
+  return mSurface;
+}
+
+void Window::SetIndicatorStyle( Dali::Window::IndicatorStyle style )
+{
+  mIndicatorStyle = style;
+}
+
+void Window::ShowIndicator( bool show )
+{
+  DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "%s\n", show?"SHOW":"HIDE" );
+  DALI_ASSERT_DEBUG(mOverlay);
+
+  if(show)
+  {
+    mIndicatorVisible = Dali::Window::VISIBLE;
+  }
+  else
+  {
+    mIndicatorVisible = Dali::Window::INVISIBLE;
+  }
+
+  DoShowIndicator( mIndicatorOrientation );
+}
+
+void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
+{
+  DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "visible : %d\n", visibleMode );
+  DALI_ASSERT_DEBUG(mOverlay);
+
+  DoShowIndicator( mIndicatorOrientation );
+}
+
+void Window::RotateIndicator(Dali::Window::WindowOrientation orientation)
+{
+  DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "Orientation: %d\n", orientation );
+
+  DoRotateIndicator( orientation );
+}
+
+void Window::SetIndicatorBgOpacity( Dali::Window::IndicatorBgOpacity opacityMode )
+{
+  mIndicatorOpacityMode = opacityMode;
+
+  if( mIndicator != NULL )
+  {
+    mIndicator->SetOpacityMode( opacityMode );
+  }
+}
+
+void Window::SetClass(std::string name, std::string klass)
+{
+}
+
+Window::Window()
+: mSurface(NULL),
+  mIndicatorStyle(Dali::Window::CHANGEABLE_COLOR),
+  mIndicatorVisible(Dali::Window::VISIBLE),
+  mIndicatorIsShown(false),
+  mShowRotatedIndicatorOnClose(false),
+  mStarted(false),
+  mIsTransparent(false),
+  mWMRotationAppSet(false),
+  mIndicator(NULL),
+  mIndicatorOrientation(Dali::Window::PORTRAIT),
+  mNextIndicatorOrientation(Dali::Window::PORTRAIT),
+  mIndicatorOpacityMode(Dali::Window::OPAQUE),
+  mOverlay(NULL),
+  mAdaptor(NULL)
+{
+}
+
+Window::~Window()
+{
+  delete mEventHandler;
+
+  if ( mAdaptor )
+  {
+    mAdaptor->RemoveObserver( *this );
+    mAdaptor->SetDragAndDropDetector( NULL );
+    mAdaptor = NULL;
+  }
+
+  delete mSurface;
+}
+
+void Window::Initialize(const PositionSize& windowPosition, const std::string& name)
+{
+  // create an Wayland window by default
+  Any surface;
+  Any display;
+  mSurface = new ECore::WindowRenderSurface( windowPosition, surface, display, name, mIsTransparent );
+  mOrientation = Orientation::New(this);
+
+  // create event handler for Wayland window
+  mEventHandler = new EventHandler( this );
+}
+
+void Window::DoShowIndicator( Dali::Window::WindowOrientation lastOrientation )
+{
+  if( mIndicator == NULL )
+  {
+    if( mIndicatorVisible != Dali::Window::INVISIBLE )
+    {
+      mIndicator = new Indicator( mAdaptor, mIndicatorOrientation, mIndicatorStyle, this );
+      mIndicator->SetOpacityMode( mIndicatorOpacityMode );
+      Dali::Actor actor = mIndicator->GetActor();
+      SetIndicatorActorRotation();
+      mOverlay->Add(actor);
+    }
+    // else don't create a hidden indicator
+  }
+  else // Already have indicator
+  {
+    if( mIndicatorVisible == Dali::Window::VISIBLE )
+    {
+      // If we are resuming, and rotation has changed,
+      if( mIndicatorIsShown == false && mIndicatorOrientation != mNextIndicatorOrientation )
+      {
+        // then close current indicator and open new one
+        mShowRotatedIndicatorOnClose = true;
+        mIndicator->Close(); // May synchronously call IndicatorClosed() callback & 1 level of recursion
+        // Don't show actor - will contain indicator for old orientation.
+      }
+    }
+  }
+
+  // set indicator visible mode
+  if( mIndicator != NULL )
+  {
+    mIndicator->SetVisible( mIndicatorVisible );
+  }
+
+  bool show = (mIndicatorVisible != Dali::Window::INVISIBLE );
+  SetIndicatorProperties( show, lastOrientation );
+  mIndicatorIsShown = show;
+}
+
+void Window::DoRotateIndicator( Dali::Window::WindowOrientation orientation )
+{
+  if( mIndicatorIsShown )
+  {
+    mShowRotatedIndicatorOnClose = true;
+    mNextIndicatorOrientation = orientation;
+    mIndicator->Close(); // May synchronously call IndicatorClosed() callback
+  }
+  else
+  {
+    // Save orientation for when the indicator is next shown
+    mShowRotatedIndicatorOnClose = false;
+    mNextIndicatorOrientation = orientation;
+  }
+}
+
+void Window::SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation )
+{
+}
+
+void Window::IndicatorTypeChanged(Indicator::Type type)
+{
+}
+
+void Window::IndicatorClosed( Indicator* indicator )
+{
+  DALI_LOG_TRACE_METHOD( gWindowLogFilter );
+
+  if( mShowRotatedIndicatorOnClose )
+  {
+    Dali::Window::WindowOrientation currentOrientation = mIndicatorOrientation;
+    mIndicator->Open(mNextIndicatorOrientation);
+    mIndicatorOrientation = mNextIndicatorOrientation;
+    SetIndicatorActorRotation();
+    DoShowIndicator(currentOrientation);
+  }
+}
+
+void Window::SetIndicatorActorRotation()
+{
+  DALI_LOG_TRACE_METHOD( gWindowLogFilter );
+  DALI_ASSERT_DEBUG( mIndicator != NULL );
+
+  Dali::Actor actor = mIndicator->GetActor();
+  switch( mIndicatorOrientation )
+  {
+    case Dali::Window::PORTRAIT:
+      actor.SetParentOrigin( ParentOrigin::TOP_CENTER );
+      actor.SetAnchorPoint(  AnchorPoint::TOP_CENTER );
+      actor.SetRotation( Degree(0), Vector3::ZAXIS );
+      break;
+    case Dali::Window::PORTRAIT_INVERSE:
+      actor.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+      actor.SetAnchorPoint(  AnchorPoint::TOP_CENTER );
+      actor.SetRotation( Degree(180), Vector3::ZAXIS );
+      break;
+    case Dali::Window::LANDSCAPE:
+      actor.SetParentOrigin( ParentOrigin::CENTER_LEFT );
+      actor.SetAnchorPoint(  AnchorPoint::TOP_CENTER );
+      actor.SetRotation( Degree(270), Vector3::ZAXIS );
+      break;
+    case Dali::Window::LANDSCAPE_INVERSE:
+      actor.SetParentOrigin( ParentOrigin::CENTER_RIGHT );
+      actor.SetAnchorPoint(  AnchorPoint::TOP_CENTER );
+      actor.SetRotation( Degree(90), Vector3::ZAXIS );
+      break;
+  }
+}
+
+void Window::Raise()
+{
+}
+
+void Window::Lower()
+{
+}
+
+void Window::Activate()
+{
+}
+
+Dali::DragAndDropDetector Window::GetDragAndDropDetector() const
+{
+  return mDragAndDropDetector;
+}
+
+void Window::OnStart()
+{
+  DoShowIndicator( mIndicatorOrientation );
+}
+
+void Window::OnPause()
+{
+}
+
+void Window::OnResume()
+{
+  // resume indicator status
+  if( mIndicator != NULL )
+  {
+    // Restore own indicator opacity
+    // Send opacity mode to indicator service when app resumed
+    mIndicator->SetOpacityMode( mIndicatorOpacityMode );
+  }
+}
+
+void Window::OnStop()
+{
+  if( mIndicator )
+  {
+    mIndicator->Close();
+  }
+
+  delete mIndicator;
+  mIndicator = NULL;
+}
+
+void Window::OnDestroy()
+{
+  mAdaptor = NULL;
+}
+
+OrientationPtr Window::GetOrientation()
+{
+  return mOrientation;
+}
+
+void Window::AddAvailableOrientation(Dali::Window::WindowOrientation orientation)
+{
+  bool found = false;
+
+  for( std::size_t i=0; i<mAvailableOrientations.size(); i++ )
+  {
+    if(mAvailableOrientations[i] == orientation)
+    {
+      found = true;
+      break;
+    }
+  }
+
+  if( ! found )
+  {
+    mAvailableOrientations.push_back(orientation);
+    SetAvailableOrientations( mAvailableOrientations );
+  }
+}
+
+void Window::RemoveAvailableOrientation(Dali::Window::WindowOrientation orientation)
+{
+  for( std::vector<Dali::Window::WindowOrientation>::iterator iter = mAvailableOrientations.begin();
+       iter != mAvailableOrientations.end(); ++iter )
+  {
+    if( *iter == orientation )
+    {
+      mAvailableOrientations.erase( iter );
+      break;
+    }
+  }
+  SetAvailableOrientations( mAvailableOrientations );
+}
+
+void Window::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrientation>& orientations)
+{
+  DALI_ASSERT_ALWAYS( mAvailableOrientations.size() <= 4 && "Incorrect number of available orientations" );
+}
+
+const std::vector<Dali::Window::WindowOrientation>& Window::GetAvailableOrientations()
+{
+  return mAvailableOrientations;
+}
+
+void Window::SetPreferredOrientation(Dali::Window::WindowOrientation orientation)
+{
+  mPreferredOrientation = orientation;
+}
+
+Dali::Window::WindowOrientation Window::GetPreferredOrientation()
+{
+  return mPreferredOrientation;
+}
+
+void Window::RotationDone( int orientation, int width, int height )
+{
+}
+
+
+} // Adaptor
+} // Internal
+} // Dali
diff --git a/adaptors/wayland/window-render-surface-wl.cpp b/adaptors/wayland/window-render-surface-wl.cpp
new file mode 100644 (file)
index 0000000..fcd2725
--- /dev/null
@@ -0,0 +1,237 @@
+/*
+ * 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 "window-render-surface.h"
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/gl-abstraction.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <ecore-wl-types.h>
+#include <trigger-event.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+#if defined(DEBUG_ENABLED)
+extern Debug::Filter* gRenderSurfaceLogFilter;
+#endif
+
+namespace ECore
+{
+
+namespace
+{
+
+const int MINIMUM_DIMENSION_CHANGE( 1 ); ///< Minimum change for window to be considered to have moved
+
+} // unnamed namespace
+
+WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize,
+                                          Any surface,
+                                          Any display,
+                                          const std::string& name,
+                                          bool isTransparent)
+: RenderSurface( Dali::RenderSurface::WINDOW, positionSize, surface, display, name, isTransparent ),
+  mNeedToApproveDeiconify(false)
+{
+  DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "Creating Window\n" );
+  Init( surface );
+}
+
+WindowRenderSurface::~WindowRenderSurface()
+{
+  if( mOwnSurface )
+  {
+    ecore_wl_window_free( mWlWindow );
+  }
+}
+
+Ecore_Wl_Window* WindowRenderSurface::GetDrawable()
+{
+  // already an e-core type
+  return mWlWindow;
+}
+
+Dali::RenderSurface::SurfaceType WindowRenderSurface::GetType()
+{
+  return Dali::RenderSurface::WINDOW;
+}
+
+Any WindowRenderSurface::GetSurface()
+{
+  // already an e-core type
+  return Any( mWlWindow );
+}
+
+Ecore_Wl_Window* WindowRenderSurface::GetWlWindow()
+{
+  return mWlWindow;
+}
+
+void WindowRenderSurface::RequestToApproveDeiconify()
+{
+  mNeedToApproveDeiconify = true;
+}
+
+void WindowRenderSurface::InitializeEgl( EglInterface& eglIf )
+{
+  DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
+
+  EglImplementation& eglImpl = static_cast<EglImplementation&>( eglIf );
+  eglImpl.InitializeGles( reinterpret_cast< EGLNativeDisplayType >( mMainDisplay ) );
+
+  eglImpl.ChooseConfig(true, mColorDepth);
+}
+
+void WindowRenderSurface::CreateEglSurface( EglInterface& eglIf )
+{
+  DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
+
+  EglImplementation& eglImpl = static_cast<EglImplementation&>( eglIf );
+
+  // create the EGL surface
+  ecore_wl_window_surface_create(mWlWindow);
+  mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height);
+  eglImpl.CreateSurfaceWindow( (EGLNativeWindowType)mEglWindow, mColorDepth ); // reinterpret_cast does not compile
+}
+
+void WindowRenderSurface::DestroyEglSurface( EglInterface& eglIf )
+{
+  DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
+
+  EglImplementation& eglImpl = static_cast<EglImplementation&>( eglIf );
+  eglImpl.DestroySurface();
+  wl_egl_window_destroy(mEglWindow);
+  mEglWindow = NULL;
+}
+
+bool WindowRenderSurface::ReplaceEGLSurface( EglInterface& eglIf )
+{
+  DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
+
+  EglImplementation& egl = static_cast<EglImplementation&>( eglIf );
+  egl.InitializeGles( reinterpret_cast< EGLNativeDisplayType >( mMainDisplay ) );
+
+  wl_egl_window_destroy(mEglWindow);
+  mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height);
+  return egl.ReplaceSurfaceWindow( (EGLNativeWindowType)mEglWindow, // reinterpret_cast does not compile
+                                   reinterpret_cast< EGLNativeDisplayType >( mMainDisplay ) );
+}
+
+void WindowRenderSurface::MoveResize( Dali::PositionSize positionSize )
+{
+  bool needToMove = false;
+  bool needToResize = false;
+
+  // check moving
+  if( (fabs(positionSize.x - mPosition.x) > MINIMUM_DIMENSION_CHANGE) ||
+      (fabs(positionSize.y - mPosition.y) > MINIMUM_DIMENSION_CHANGE) )
+  {
+    needToMove = true;
+  }
+
+  // check resizing
+  if( (fabs(positionSize.width - mPosition.width) > MINIMUM_DIMENSION_CHANGE) ||
+      (fabs(positionSize.height - mPosition.height) > MINIMUM_DIMENSION_CHANGE) )
+  {
+    needToResize = true;
+  }
+
+  if(needToMove)
+  {
+    ecore_wl_window_move(mWlWindow, positionSize.x, positionSize.y);
+    mPosition = positionSize;
+  }
+  if (needToResize)
+  {
+    ecore_wl_window_resize(mWlWindow, positionSize.width, positionSize.height, 0);
+    mPosition = positionSize;
+  }
+
+}
+
+void WindowRenderSurface::Map()
+{
+  ecore_wl_window_show(mWlWindow);
+}
+
+bool WindowRenderSurface::PreRender( EglInterface&, Integration::GlAbstraction& )
+{
+  // nothing to do for windows
+  return true;
+}
+
+void WindowRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, unsigned int, SyncMode )
+{
+  EglImplementation& eglImpl = static_cast<EglImplementation&>( egl );
+  eglImpl.SwapBuffers();
+
+  // When the window is deiconified, it approves the deiconify operation to window manager after rendering
+  if(mNeedToApproveDeiconify)
+  {
+    // SwapBuffer is desychronized. So make sure to sychronize when window is deiconified.
+    glAbstraction.Finish();
+
+    mNeedToApproveDeiconify = false;
+  }
+}
+
+void WindowRenderSurface::SetViewMode( ViewMode viewMode )
+{
+}
+
+void WindowRenderSurface::CreateWlRenderable()
+{
+   // if width or height are zero, go full screen.
+  if ( (mPosition.width == 0) || (mPosition.height == 0) )
+  {
+    // Default window size == screen size
+    mPosition.x = 0;
+    mPosition.y = 0;
+
+    ecore_wl_screen_size_get( &mPosition.width, &mPosition.height );
+  }
+
+  mWlWindow = ecore_wl_window_new( 0, mPosition.x, mPosition.y, mPosition.width, mPosition.height, ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW );
+
+  if ( mWlWindow == 0 )
+  {
+      DALI_ASSERT_ALWAYS(0 && "Failed to create X window");
+  }
+}
+
+void WindowRenderSurface::UseExistingRenderable( unsigned int surfaceId )
+{
+  mWlWindow = AnyCast< Ecore_Wl_Window* >( surfaceId );
+}
+
+} // namespace ECore
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/wayland/window-render-surface.h b/adaptors/wayland/window-render-surface.h
new file mode 100644 (file)
index 0000000..980e273
--- /dev/null
@@ -0,0 +1,169 @@
+#ifndef __DALI_INTERNAL_ECORE_WL_WINDOW_RENDER_SURFACE_H__
+#define __DALI_INTERNAL_ECORE_WL_WINDOW_RENDER_SURFACE_H__
+
+/*
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <ecore-wl-render-surface.h>
+#include <wayland-egl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace ECore
+{
+
+/**
+ * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface.
+ * Window specialization.
+ */
+class WindowRenderSurface : public RenderSurface
+{
+public:
+
+  /**
+    * Uses an Wayland surface to render to.
+    * @param [in] positionSize the position and size of the surface
+    * @param [in] surface can be a Wayland-window or Wayland-pixmap (type must be unsigned int).
+    * @param [in] display connection to Wayland-server if the surface is a X window or pixmap (type must be void * to X display struct)
+    * @param [in] name optional name of surface passed in
+    * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
+    */
+  WindowRenderSurface( Dali::PositionSize positionSize,
+                       Any surface,
+                       Any display,
+                       const std::string& name,
+                       bool isTransparent = false );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::~RenderSurface
+   */
+  virtual ~WindowRenderSurface();
+
+public: // API
+
+  /**
+   * @copydoc Dali::RenderSurface::GetDrawable()
+   */
+  virtual Ecore_Wl_Window* GetDrawable();
+
+  /**
+   * Request to approve deiconify operation
+   * If it is requested, it will send ECORE_X_ATOM_E_DEICONIFY_APPROVE event to window manager after rendering
+   */
+  void RequestToApproveDeiconify();
+
+public: // from Dali::RenderSurface
+
+  /**
+   * @copydoc Dali::RenderSurface::GetType()
+   */
+  virtual Dali::RenderSurface::SurfaceType GetType();
+
+  /**
+   * @copydoc Dali::RenderSurface::GetSurface()
+   */
+  virtual Any GetSurface();
+
+  /**
+   * @copydoc Dali::RenderSurface::GetDrawable()
+   */
+  virtual Ecore_Wl_Window* GetWlWindow();
+
+public:  // from Internal::Adaptor::RenderSurface
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::InitializeEgl()
+   */
+  virtual void InitializeEgl( EglInterface& egl );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::CreateEglSurface()
+   */
+  virtual void CreateEglSurface( EglInterface& egl );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::DestroyEglSurface()
+   */
+  virtual void DestroyEglSurface( EglInterface& egl );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::ReplaceEGLSurface()
+   */
+  virtual bool ReplaceEGLSurface( EglInterface& egl );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::MoveResize()
+   */
+  virtual void MoveResize( Dali::PositionSize positionSize);
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::Map()
+   */
+  virtual void Map();
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::PreRender()
+   */
+  virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::PostRender()
+   */
+  virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, unsigned int timeDelta, SyncMode syncMode );
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::RenderSurface::SetViewMode()
+   */
+  void SetViewMode( ViewMode viewMode );
+
+protected:
+
+  /**
+   * Create WlWindow
+   */
+  virtual void CreateWlRenderable();
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::ECoreX::RenderSurface::UseExistingRenderable
+   */
+  virtual void UseExistingRenderable( unsigned int surfaceId );
+
+private: // Data
+
+  Ecore_Wl_Window*   mWlWindow; ///< Wayland-Window
+  wl_egl_window*     mEglWindow;
+  bool             mNeedToApproveDeiconify; ///< Whether need to send ECORE_X_ATOM_E_DEICONIFY_APPROVE event
+
+}; // class WindowRenderSurface
+
+} // namespace ECore
+
+} // namespace Adaptor
+
+} // namespace internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_ECORE_X_WINDOW_RENDER_SURFACE_H__
@@ -38,84 +38,12 @@ namespace Internal
 namespace Adaptor
 {
 
-namespace
-{
+namespace {
 #if defined(DEBUG_ENABLED)
 Debug::Filter* gAccessibilityManagerLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_ACCESSIBILITY_MANAGER");
 #endif
-
-void AccessibilityOnOffNotification(keynode_t* node, void* data)
-{
-  AccessibilityManager* manager = static_cast<AccessibilityManager*>(data);
-  int isEnabled = 0;
-  vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled);
-
-  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled?"ENABLED":"DISABLED");
-
-  if(isEnabled == 1)
-  {
-    manager->EnableAccessibility();
-  }
-  else
-  {
-    manager->DisableAccessibility();
-  }
-}
-
-BaseHandle Create()
-{
-  BaseHandle handle( AccessibilityManager::Get() );
-
-  if ( !handle && Adaptor::IsAvailable() )
-  {
-    Adaptor& adaptorImpl( Adaptor::GetImplementation( Adaptor::Get() ) );
-    Dali::AccessibilityManager manager = Dali::AccessibilityManager( new AccessibilityManager() );
-    adaptorImpl.RegisterSingleton( typeid( manager ), manager );
-    handle = manager;
-  }
-
-  return handle;
-}
-TypeRegistration ACCESSIBILITY_MANAGER_TYPE( typeid(Dali::AccessibilityManager), typeid(Dali::BaseHandle), Create, true /* Create Instance At Startup */ );
-
 } // unnamed namespace
 
-Dali::AccessibilityManager AccessibilityManager::Get()
-{
-  Dali::AccessibilityManager manager;
-
-  if ( Adaptor::IsAvailable() )
-  {
-    // Check whether the singleton is already created
-    Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Dali::AccessibilityManager ) );
-    if(handle)
-    {
-      // If so, downcast the handle
-      manager = Dali::AccessibilityManager( dynamic_cast< AccessibilityManager* >( handle.GetObjectPtr() ) );
-    }
-  }
-
-  return manager;
-}
-
-Vector2 AccessibilityManager::GetReadPosition() const
-{
-  return mReadPosition;
-}
-
-void AccessibilityManager::SetActionHandler(AccessibilityActionHandler& handler)
-{
-  mActionHandler = &handler;
-}
-
-void AccessibilityManager::SetGestureHandler(AccessibilityGestureHandler& handler)
-{
-  if( mAccessibilityGestureDetector )
-  {
-    mAccessibilityGestureDetector->SetGestureHandler(handler);
-  }
-}
-
 bool AccessibilityManager::HandleActionNextEvent(bool allowEndFeedback)
 {
   bool ret = false;
@@ -475,198 +403,6 @@ bool AccessibilityManager::HandleActionDownEvent()
   return ret;
 }
 
-bool AccessibilityManager::HandleActionClearFocusEvent()
-{
-  bool ret = false;
-
-  Dali::AccessibilityManager handle( this );
-
-  /*
-   * In order to application decide reading action first,
-   * emit ActionClearFocus signal in first, ClearAccessibilityFocus for handler in next
-   */
-  if ( !mIndicatorFocused )
-  {
-    if( !mActionClearFocusSignalV2.Empty() )
-    {
-      mActionClearFocusSignalV2.Emit( handle );
-    }
-  }
-
-  if( mActionHandler )
-  {
-    ret = mActionHandler->ClearAccessibilityFocus();
-  }
-
-  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
-  return ret;
-}
-
-bool AccessibilityManager::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
-{
-  bool ret = false;
-
-  Dali::AccessibilityManager handle( this );
-
-  Dali::TouchEvent touchEvent(timeStamp);
-  touchEvent.points.push_back(point);
-
-  /*
-   * In order to application decide touch action first,
-   * emit ActionScroll signal in first, AccessibilityActionScroll  for handler in next
-   */
-  if ( !mIndicatorFocused )
-  {
-    if( !mActionScrollSignalV2.Empty() )
-    {
-      mActionScrollSignalV2.Emit( handle, touchEvent );
-    }
-  }
-
-  Integration::TouchEvent event;
-  if (mCombiner.GetNextTouchEvent(point, timeStamp, event))
-  {
-    // Process the touch event in accessibility gesture detector
-    if( mAccessibilityGestureDetector )
-    {
-      mAccessibilityGestureDetector->SendEvent(event);
-      ret = true;
-    }
-  }
-
-  return ret;
-}
-
-bool AccessibilityManager::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
-{
-  bool ret = false;
-
-  Dali::TouchEvent touchEvent(timeStamp);
-  touchEvent.points.push_back(point);
-
-  if( mActionHandler )
-  {
-    ret = mActionHandler->AccessibilityActionTouch(touchEvent);
-  }
-  return ret;
-}
-
-bool AccessibilityManager::HandleActionBackEvent()
-{
-  bool ret = false;
-
-  Dali::AccessibilityManager handle( this );
-
-  /*
-   * In order to application decide reading action first,
-   * emit ActionBack signal in first, AccessibilityActionBack for handler in next
-   */
-  if ( !mIndicatorFocused )
-  {
-    if( !mActionBackSignalV2.Empty() )
-    {
-      mActionBackSignalV2.Emit( handle );
-    }
-  }
-
-  if( mActionHandler )
-  {
-    ret = mActionHandler->AccessibilityActionBack();
-  }
-
-  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
-  return ret;
-}
-
-void AccessibilityManager::HandleActionEnableEvent()
-{
-  EnableAccessibility();
-}
-
-void AccessibilityManager::HandleActionDisableEvent()
-{
-  DisableAccessibility();
-}
-
-void AccessibilityManager::EnableAccessibility()
-{
-  if(mIsEnabled == false)
-  {
-    mIsEnabled = true;
-
-    if( mActionHandler )
-    {
-      mActionHandler->ChangeAccessibilityStatus();
-    }
-
-    //emit status changed signal
-    Dali::AccessibilityManager handle( this );
-    mStatusChangedSignalV2.Emit( handle );
-  }
-}
-
-void AccessibilityManager::DisableAccessibility()
-{
-  if(mIsEnabled == true)
-  {
-    mIsEnabled = false;
-
-    if( mActionHandler )
-    {
-      mActionHandler->ChangeAccessibilityStatus();
-    }
-
-    //emit status changed signal
-    Dali::AccessibilityManager handle( this );
-    mStatusChangedSignalV2.Emit( handle );
-
-    // Destroy the TtsPlayer if exists.
-    Dali::Adaptor& adaptor = Dali::Adaptor::Get();
-    Adaptor::GetImplementation(adaptor).DestroyTtsPlayer(Dali::TtsPlayer::SCREEN_READER);
-  }
-}
-
-bool AccessibilityManager::IsEnabled() const
-{
-  return mIsEnabled;
-}
-
-void AccessibilityManager::SetIndicator(Indicator* indicator)
-{
-  mIndicator = indicator;
-}
-
-AccessibilityManager::AccessibilityManager()
-: mIsEnabled(false),
-  mActionHandler(NULL),
-  mIndicator(NULL),
-  mIndicatorFocused(false)
-{
-  int isEnabled = 0;
-  vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled);
-  DALI_LOG_INFO(gAccessibilityManagerLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled?"ENABLED":"DISABLED");
-
-  if(isEnabled == 1)
-  {
-    mIsEnabled = true;
-  }
-  else
-  {
-    mIsEnabled = false;
-  }
-
-  vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification, this );
-
-  mAccessibilityGestureDetector = new AccessibilityGestureDetector();
-}
-
-AccessibilityManager::~AccessibilityManager()
-{
-  vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification );
-}
-
 } // namespace Adaptor
 
 } // namespace Internal
similarity index 85%
rename from adaptors/tizen/internal/common/clipboard-impl.cpp
rename to adaptors/x11/clipboard-impl-x.cpp
index b541156..dfa2786 100644 (file)
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/common/adaptor.h>
+#include <adaptor.h>
 #include <dali/public-api/object/any.h>
-#include <internal/common/adaptor-impl.h>
-#include <internal/common/ecore-x/ecore-x-window-interface.h>
+#include <adaptor-impl.h>
+#include <ecore-x-window-interface.h>
 
 namespace //unnamed namespace
 {
@@ -91,6 +91,7 @@ Clipboard::Clipboard( Ecore_X_Window ecoreXwin)
 {
   mApplicationWindow = ecoreXwin;
 }
+
 Clipboard::~Clipboard()
 {
 }
@@ -114,7 +115,7 @@ Dali::Clipboard Clipboard::Get()
 }
 bool Clipboard::SetItem(const std::string &itemData )
 {
-  Ecore_X_Window cbhmWin = ECoreX::WindowInterface::GetWindow();
+  Ecore_X_Window cbhmWin = ECore::WindowInterface::GetWindow();
   Ecore_X_Atom atomCbhmItem = ecore_x_atom_get( CBHM_ITEM );
   Ecore_X_Atom dataType = ECORE_X_ATOM_STRING;
 
@@ -124,8 +125,7 @@ bool Clipboard::SetItem(const std::string &itemData )
 
   // Trigger sending of item (property)
   Ecore_X_Atom atomCbhmMsg = ecore_x_atom_get( CBHM_MSG );
-  ECoreX::WindowInterface::SendXEvent(ecore_x_display_get(), cbhmWin, False, NoEventMask, atomCbhmMsg, 8, SET_ITEM );
-
+  ECore::WindowInterface::SendXEvent(ecore_x_display_get(), cbhmWin, False, NoEventMask, atomCbhmMsg, 8, SET_ITEM );
   return true;
 }
 
@@ -146,7 +146,7 @@ std::string Clipboard::GetItem( unsigned int index )  // change string to a Dali
   Ecore_X_Atom xAtomCbhmItem = ecore_x_atom_get( sendBuf );
   Ecore_X_Atom xAtomItemType = 0;
 
-  std::string clipboardString( ECoreX::WindowInterface::GetWindowProperty(xAtomCbhmItem, &xAtomItemType, index ) );
+  std::string clipboardString( ECore::WindowInterface::GetWindowProperty(xAtomCbhmItem, &xAtomItemType, index ) );
   if ( !clipboardString.empty() )
   {
     Ecore_X_Atom xAtomCbhmError = ecore_x_atom_get( CBHM_ERROR );
@@ -155,7 +155,6 @@ std::string Clipboard::GetItem( unsigned int index )  // change string to a Dali
       return clipboardString;
     }
    }
-
    return emptyString;
 }
 
@@ -166,8 +165,7 @@ unsigned int Clipboard::NumberOfItems()
 {
   Ecore_X_Atom xAtomCbhmCountGet = ecore_x_atom_get( CBHM_cCOUNT );
 
-  std::string ret( ECoreX::WindowInterface::GetWindowProperty( xAtomCbhmCountGet, NULL, 0 ) );
-
+  std::string ret( ECore::WindowInterface::GetWindowProperty( xAtomCbhmCountGet, NULL, 0 ) );
   int count = -1;
 
   if ( !ret.empty() )
@@ -187,19 +185,19 @@ void Clipboard::ShowClipboard()
 {
   // Claim the ownership of the SECONDARY selection.
   ecore_x_selection_secondary_set(mApplicationWindow, "", 1);
-  Ecore_X_Window cbhmWin = ECoreX::WindowInterface::GetWindow();
+  Ecore_X_Window cbhmWin = ECore::WindowInterface::GetWindow();
 
   // Launch the clipboard window
   Ecore_X_Atom atomCbhmMsg = ecore_x_atom_get( CBHM_MSG );
-  ECoreX::WindowInterface::SendXEvent( ecore_x_display_get(), cbhmWin, False, NoEventMask, atomCbhmMsg, 8, SHOW );
+  ECore::WindowInterface::SendXEvent( ecore_x_display_get(), cbhmWin, False, NoEventMask, atomCbhmMsg, 8, SHOW );
 }
 
 void Clipboard::HideClipboard()
 {
-  Ecore_X_Window cbhmWin = ECoreX::WindowInterface::GetWindow();
+  Ecore_X_Window cbhmWin = ECore::WindowInterface::GetWindow();
   // Launch the clipboard window
   Ecore_X_Atom atomCbhmMsg = ecore_x_atom_get( CBHM_MSG );
-  ECoreX::WindowInterface::SendXEvent( ecore_x_display_get(), cbhmWin, False, NoEventMask, atomCbhmMsg, 8, HIDE );
+  ECore::WindowInterface::SendXEvent( ecore_x_display_get(), cbhmWin, False, NoEventMask, atomCbhmMsg, 8, HIDE );
 
   // release the ownership of SECONDARY selection
   ecore_x_selection_secondary_clear();
similarity index 97%
rename from adaptors/tizen/internal/common/clipboard-impl.h
rename to adaptors/x11/clipboard-impl.h
index fffb8dc..0d76ceb 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/adaptor-framework/common/clipboard.h>
+#include <clipboard.h>
 #include <dali/public-api/object/base-object.h>
 #include <Ecore_X.h>
 
@@ -51,8 +51,8 @@ public:
    * Constructor
    * @param[in] ecoreXwin, The window is created by application.
    */
-
   Clipboard(Ecore_X_Window ecoreXwin);
+
   virtual ~Clipboard();
 
   /**
@@ -26,7 +26,7 @@ namespace Internal
 namespace Adaptor
 {
 
-namespace ECoreX
+namespace ECore
 {
 
 DALI_EXPORT_API RenderSurface* CreatePixmapSurface(
@@ -39,7 +39,7 @@ DALI_EXPORT_API RenderSurface* CreatePixmapSurface(
   return new PixmapRenderSurface( positionSize, surface, display, name, isTransparent );
 }
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
@@ -36,7 +36,7 @@ namespace Internal
 namespace Adaptor
 {
 
-namespace ECoreX
+namespace ECore
 {
 
 class RenderSurface;
@@ -59,7 +59,7 @@ DALI_IMPORT_API RenderSurface* CreatePixmapSurface(
   const std::string& name,
   bool               isTransparent );
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
@@ -30,8 +30,8 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/ecore-x/ecore-x-types.h>
-#include <internal/common/trigger-event.h>
+#include <ecore-x-types.h>
+#include <trigger-event.h>
 
 namespace Dali
 {
@@ -46,7 +46,7 @@ namespace Adaptor
 Debug::Filter* gRenderSurfaceLogFilter = Debug::Filter::New(Debug::Verbose, false, "LOG_ECORE_X_RENDER_SURFACE");
 #endif
 
-namespace ECoreX
+namespace ECore
 {
 
 namespace
@@ -345,7 +345,7 @@ void RenderSurface::DoRenderSync( unsigned int timeDelta, SyncMode syncMode )
   }
 }
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
@@ -25,9 +25,9 @@
 #include <dali/public-api/common/dali-common.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/render-surface-impl.h>
-#include <internal/common/ecore-x/ecore-x-types.h>
-#include <internal/common/gl/egl-implementation.h>
+#include <render-surface-impl.h>
+#include <ecore-x-types.h>
+#include <gl/egl-implementation.h>
 
 namespace Dali
 {
@@ -39,7 +39,7 @@ namespace Adaptor
 {
 class TriggerEvent;
 
-namespace ECoreX
+namespace ECore
 {
 
 /**
@@ -261,7 +261,7 @@ protected: // Data
   bool                        mIsStopped;          ///< Render should be stopped
 };
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
@@ -26,7 +26,7 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/ecore-x/ecore-x-types.h>
+#include <ecore-x-types.h>
 
 namespace Dali
 {
@@ -37,7 +37,7 @@ namespace Internal
 namespace Adaptor
 {
 
-namespace ECoreX
+namespace ECore
 {
 
 namespace WindowInterface
@@ -168,7 +168,7 @@ void SendXEvent(Ecore_X_Display* display, Ecore_X_Window window, bool propagate,
 } // namespace WindowInterface
 
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
@@ -35,7 +35,7 @@ namespace Internal
 namespace Adaptor
 {
 
-namespace ECoreX
+namespace ECore
 {
 
 namespace WindowInterface
@@ -75,7 +75,7 @@ namespace WindowInterface
 } // namespace WindowInterface
 
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
diff --git a/adaptors/x11/egl-implementation-x.cpp b/adaptors/x11/egl-implementation-x.cpp
new file mode 100644 (file)
index 0000000..5077d17
--- /dev/null
@@ -0,0 +1,579 @@
+/*
+ * 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 <gl/egl-implementation.h>
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+#include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/common/dali-vector.h>
+
+// INTERNAL INCLUDES
+#include <ecore-x-render-surface.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+#define TEST_EGL_ERROR(lastCommand) \
+{ \
+  EGLint err = eglGetError(); \
+  if (err != EGL_SUCCESS) \
+  { \
+    DALI_LOG_ERROR("EGL error after %s code=%d\n", lastCommand,err); \
+    DALI_ASSERT_ALWAYS(0 && "EGL error");                            \
+  } \
+}
+
+EglImplementation::EglImplementation()
+  : mEglNativeDisplay(0),
+    mEglNativeWindow(0),
+    mEglNativePixmap(0),
+    mEglDisplay(0),
+    mEglConfig(0),
+    mEglContext(0),
+    mEglSurface(0),
+    mGlesInitialized(false),
+    mIsOwnSurface(true),
+    mSyncMode(FULL_SYNC),
+    mContextCurrent(false),
+    mIsWindow(true),
+    mColorDepth(COLOR_DEPTH_24)
+{
+}
+
+EglImplementation::~EglImplementation()
+{
+  TerminateGles();
+}
+
+bool EglImplementation::InitializeGles( EGLNativeDisplayType display, bool isOwnSurface )
+{
+  if ( !mGlesInitialized )
+  {
+    mEglNativeDisplay = display;
+
+    //@todo see if we can just EGL_DEFAULT_DISPLAY instead
+    mEglDisplay = eglGetDisplay(mEglNativeDisplay);
+
+    EGLint majorVersion = 0;
+    EGLint minorVersion = 0;
+    if ( !eglInitialize( mEglDisplay, &majorVersion, &minorVersion ) )
+    {
+      return false;
+    }
+    eglBindAPI(EGL_OPENGL_ES_API);
+
+    mContextAttribs.Clear();
+
+#if DALI_GLES_VERSION >= 30
+
+    mContextAttribs.Reserve(5);
+    mContextAttribs.PushBack( EGL_CONTEXT_MAJOR_VERSION_KHR );
+    mContextAttribs.PushBack( 3 );
+    mContextAttribs.PushBack( EGL_CONTEXT_MINOR_VERSION_KHR );
+    mContextAttribs.PushBack( 0 );
+
+#else // DALI_GLES_VERSION >= 30
+
+    mContextAttribs.Reserve(3);
+    mContextAttribs.PushBack( EGL_CONTEXT_CLIENT_VERSION );
+    mContextAttribs.PushBack( 2 );
+
+#endif // DALI_GLES_VERSION >= 30
+
+    mContextAttribs.PushBack( EGL_NONE );
+
+    mGlesInitialized = true;
+    mIsOwnSurface = isOwnSurface;
+  }
+
+  return mGlesInitialized;
+}
+
+bool EglImplementation::CreateContext()
+{
+  // make sure a context isn't created twice
+  DALI_ASSERT_ALWAYS( (mEglContext == 0) && "EGL context recreated" );
+
+  mEglContext = eglCreateContext(mEglDisplay, mEglConfig, NULL, &(mContextAttribs[0]));
+  TEST_EGL_ERROR("eglCreateContext render thread");
+
+  DALI_ASSERT_ALWAYS( EGL_NO_CONTEXT != mEglContext && "EGL context not created" );
+
+  return true;
+}
+
+void EglImplementation::DestroyContext()
+{
+  DALI_ASSERT_ALWAYS( mEglContext && "no EGL context" );
+
+  eglDestroyContext( mEglDisplay, mEglContext );
+  mEglContext = 0;
+}
+
+void EglImplementation::DestroySurface()
+{
+  if(mIsOwnSurface && mEglSurface)
+  {
+    eglDestroySurface( mEglDisplay, mEglSurface );
+    mEglSurface = 0;
+  }
+}
+
+void EglImplementation::MakeContextCurrent()
+{
+  mContextCurrent = true;
+
+  if(mIsOwnSurface)
+  {
+    eglMakeCurrent( mEglDisplay, mEglSurface, mEglSurface, mEglContext );
+  }
+
+  EGLint error = eglGetError();
+
+  if ( error != EGL_SUCCESS )
+  {
+    switch (error)
+    {
+      case EGL_BAD_DISPLAY:
+      {
+        DALI_LOG_ERROR("EGL_BAD_DISPLAY : Display is not an EGL display connection");
+        break;
+      }
+      case EGL_NOT_INITIALIZED:
+      {
+        DALI_LOG_ERROR("EGL_NOT_INITIALIZED : Display has not been initialized");
+        break;
+      }
+      case EGL_BAD_SURFACE:
+      {
+        DALI_LOG_ERROR("EGL_BAD_SURFACE : Draw or read is not an EGL surface");
+        break;
+      }
+      case EGL_BAD_CONTEXT:
+      {
+        DALI_LOG_ERROR("EGL_BAD_CONTEXT : Context is not an EGL rendering context");
+        break;
+      }
+      case EGL_BAD_MATCH:
+      {
+        DALI_LOG_ERROR("EGL_BAD_MATCH : Draw or read are not compatible with context, or if context is set to EGL_NO_CONTEXT and draw or read are not set to EGL_NO_SURFACE, or if draw or read are set to EGL_NO_SURFACE and context is not set to EGL_NO_CONTEXT");
+        break;
+      }
+      case EGL_BAD_ACCESS:
+      {
+        DALI_LOG_ERROR("EGL_BAD_ACCESS : Context is current to some other thread");
+        break;
+      }
+      case EGL_BAD_NATIVE_PIXMAP:
+      {
+        DALI_LOG_ERROR("EGL_BAD_NATIVE_PIXMAP : A native pixmap underlying either draw or read is no longer valid.");
+        break;
+      }
+      case EGL_BAD_NATIVE_WINDOW:
+      {
+        DALI_LOG_ERROR("EGL_BAD_NATIVE_WINDOW : A native window underlying either draw or read is no longer valid.");
+        break;
+      }
+      case EGL_BAD_CURRENT_SURFACE:
+      {
+        DALI_LOG_ERROR("EGL_BAD_CURRENT_SURFACE : The previous context has unflushed commands and the previous surface is no longer valid.");
+        break;
+      }
+      case EGL_BAD_ALLOC:
+      {
+        DALI_LOG_ERROR("EGL_BAD_ALLOC : Allocation of ancillary buffers for draw or read were delayed until eglMakeCurrent is called, and there are not enough resources to allocate them");
+        break;
+      }
+      case EGL_CONTEXT_LOST:
+      {
+        DALI_LOG_ERROR("EGL_CONTEXT_LOST : If a power management event has occurred. The application must destroy all contexts and reinitialise OpenGL ES state and objects to continue rendering");
+        break;
+      }
+      default:
+      {
+        DALI_LOG_ERROR("Unknown error");
+        break;
+      }
+    }
+    DALI_ASSERT_ALWAYS(false && "MakeContextCurrent failed!");
+  }
+
+  // We want to display this information all the time, so use the LogMessage directly
+  Integration::Log::LogMessage(Integration::Log::DebugInfo, "EGL Information\n"
+      "            Vendor:        %s\n"
+      "            Version:       %s\n"
+      "            Client APIs:   %s\n"
+      "            Extensions:    %s\n",
+      eglQueryString(mEglDisplay, EGL_VENDOR),
+      eglQueryString(mEglDisplay, EGL_VERSION),
+      eglQueryString(mEglDisplay, EGL_CLIENT_APIS),
+      eglQueryString(mEglDisplay, EGL_EXTENSIONS));
+
+  if ( mIsWindow )
+  {
+    SetRefreshSync( mSyncMode );
+  }
+}
+
+void EglImplementation::MakeContextNull()
+{
+  mContextCurrent = false;
+  // clear the current context
+  eglMakeCurrent( mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
+}
+
+void EglImplementation::TerminateGles()
+{
+  if ( mGlesInitialized )
+  {
+    // in latest Mali DDK (r2p3 ~ r3p0 in April, 2012),
+    // MakeContextNull should be called before eglDestroy surface
+    // to prevent crash in _mali_surface_destroy_callback
+    MakeContextNull();
+
+    if(mIsOwnSurface && mEglSurface)
+    {
+      eglDestroySurface(mEglDisplay, mEglSurface);
+    }
+    eglDestroyContext(mEglDisplay, mEglContext);
+
+    eglTerminate(mEglDisplay);
+
+    mEglDisplay = NULL;
+    mEglConfig  = NULL;
+    mEglContext = NULL;
+    mEglSurface = NULL;
+
+    mGlesInitialized = false;
+  }
+}
+
+bool EglImplementation::IsGlesInitialized() const
+{
+  return mGlesInitialized;
+}
+
+bool EglImplementation::SetRefreshSync( SyncMode mode )
+{
+  if ( mIsWindow == false )
+  {
+    return false;
+  }
+  mSyncMode = mode;
+
+  // eglSwapInterval specifies the minimum number of video frame periods
+  // per buffer swap for the window associated with the current context.
+
+  if ( !mContextCurrent )
+  {
+    return true;
+  }
+
+  EGLBoolean ok = eglSwapInterval( mEglDisplay, mode );
+  if ( !ok )
+  {
+    TEST_EGL_ERROR("eglSwapInterval");
+    return false;
+  }
+
+  return true;
+}
+
+void EglImplementation::SwapBuffers()
+{
+  eglSwapBuffers( mEglDisplay, mEglSurface );
+}
+
+void EglImplementation::CopyBuffers()
+{
+  eglCopyBuffers( mEglDisplay, mEglSurface, mEglNativePixmap );
+}
+
+void EglImplementation::WaitGL()
+{
+  eglWaitGL();
+}
+
+void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
+{
+  if(mEglConfig && isWindowType == mIsWindow && mColorDepth == depth)
+  {
+    return;
+  }
+
+  mIsWindow = isWindowType;
+
+  EGLint numConfigs;
+  Vector<EGLint> configAttribs;
+  configAttribs.Reserve(31);
+
+  if(isWindowType)
+  {
+    configAttribs.PushBack( EGL_SURFACE_TYPE );
+    configAttribs.PushBack( EGL_WINDOW_BIT );
+  }
+  else
+  {
+    configAttribs.PushBack( EGL_SURFACE_TYPE );
+    configAttribs.PushBack( EGL_PIXMAP_BIT );
+  }
+
+  configAttribs.PushBack( EGL_RENDERABLE_TYPE );
+
+#if DALI_GLES_VERSION >= 30
+
+#ifdef _ARCH_ARM_
+  configAttribs.PushBack( EGL_OPENGL_ES3_BIT_KHR );
+#else
+  // There is a bug in the desktop emulator
+  // Requesting for ES3 causes eglCreateContext even though it allows to ask
+  // for a configuration that supports GLES 3.0
+  configAttribs.PushBack( EGL_OPENGL_ES2_BIT );
+#endif // _ARCH_ARM_
+
+#else // DALI_GLES_VERSION >= 30
+
+  configAttribs.PushBack( EGL_OPENGL_ES2_BIT );
+
+#endif //DALI_GLES_VERSION >= 30
+
+#if DALI_GLES_VERSION >= 30
+// TODO: enable this flag when it becomes supported
+//  configAttribs.PushBack( EGL_CONTEXT_FLAGS_KHR );
+//  configAttribs.PushBack( EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR );
+#endif //DALI_GLES_VERSION >= 30
+
+  configAttribs.PushBack( EGL_RED_SIZE );
+  configAttribs.PushBack( 8 );
+  configAttribs.PushBack( EGL_GREEN_SIZE );
+  configAttribs.PushBack( 8 );
+  configAttribs.PushBack( EGL_BLUE_SIZE );
+  configAttribs.PushBack( 8 );
+
+  configAttribs.PushBack( EGL_ALPHA_SIZE );
+#ifdef _ARCH_ARM_
+  configAttribs.PushBack( (depth == COLOR_DEPTH_32) ? 8 : 0 );
+#else
+  // There is a bug in the desktop emulator
+  // setting EGL_ALPHA_SIZE to 8 results in eglChooseConfig failing
+  configAttribs.PushBack( 0 );
+#endif // _ARCH_ARM_
+
+  configAttribs.PushBack( EGL_DEPTH_SIZE );
+  configAttribs.PushBack( 24 );
+  configAttribs.PushBack( EGL_STENCIL_SIZE );
+  configAttribs.PushBack( 8 );
+  configAttribs.PushBack( EGL_SAMPLES );
+  configAttribs.PushBack( 4 );
+  configAttribs.PushBack( EGL_SAMPLE_BUFFERS );
+  configAttribs.PushBack( 1 );
+  configAttribs.PushBack( EGL_NONE );
+
+  if ( eglChooseConfig( mEglDisplay, &(configAttribs[0]), &mEglConfig, 1, &numConfigs ) != EGL_TRUE )
+  {
+    EGLint error = eglGetError();
+    switch (error)
+    {
+      case EGL_BAD_DISPLAY:
+      {
+        DALI_LOG_ERROR("Display is not an EGL display connection");
+        break;
+      }
+      case EGL_BAD_ATTRIBUTE:
+      {
+        DALI_LOG_ERROR("The parameter confirAttribs contains an invalid frame buffer configuration attribute or an attribute value that is unrecognized or out of range");
+        break;
+      }
+      case EGL_NOT_INITIALIZED:
+      {
+        DALI_LOG_ERROR("Display has not been initialized");
+        break;
+      }
+      case EGL_BAD_PARAMETER:
+      {
+        DALI_LOG_ERROR("The parameter numConfig is NULL");
+        break;
+      }
+      default:
+      {
+        DALI_LOG_ERROR("Unknown error");
+      }
+    }
+    DALI_ASSERT_ALWAYS(false && "eglChooseConfig failed!");
+  }
+
+  if ( numConfigs != 1 )
+  {
+    DALI_LOG_ERROR("No configurations found.");
+
+    TEST_EGL_ERROR("eglChooseConfig");
+  }
+}
+
+
+void EglImplementation::CreateSurfaceWindow( EGLNativeWindowType window, ColorDepth depth )
+{
+  DALI_ASSERT_ALWAYS( ( mEglSurface == 0 ) && "EGL surface already exists" );
+
+  mEglNativeWindow = window;
+  mColorDepth = depth;
+  mIsWindow = true;
+
+  // egl choose config
+  ChooseConfig(mIsWindow, mColorDepth);
+
+  mEglSurface = eglCreateWindowSurface( mEglDisplay, mEglConfig, mEglNativeWindow, NULL );
+  TEST_EGL_ERROR("eglCreateWindowSurface");
+
+  DALI_ASSERT_ALWAYS( mEglSurface && "Create window surface failed" );
+}
+
+void EglImplementation::CreateSurfacePixmap( EGLNativePixmapType pixmap, ColorDepth depth )
+{
+  DALI_ASSERT_ALWAYS( mEglSurface == 0 && "Cannot create more than one instance of surface pixmap" );
+
+  mEglNativePixmap = pixmap;
+  mColorDepth = depth;
+  mIsWindow = false;
+
+  // egl choose config
+  ChooseConfig(mIsWindow, mColorDepth);
+
+  mEglSurface = eglCreatePixmapSurface( mEglDisplay, mEglConfig, mEglNativePixmap, NULL );
+  TEST_EGL_ERROR("eglCreatePixmapSurface");
+
+  DALI_ASSERT_ALWAYS( mEglSurface && "Create pixmap surface failed" );
+}
+
+bool EglImplementation::ReplaceSurfaceWindow( EGLNativeWindowType window, EGLNativeDisplayType display )
+{
+  bool contextLost = false;
+
+  //  the surface is bound to the context, so set the context to null
+  MakeContextNull();
+
+  // destroy the surface
+  DestroySurface();
+
+  // If the display has not changed, then we can just create a new surface
+  if ( display == mEglNativeDisplay )
+  {
+    // create the EGL surface
+    CreateSurfaceWindow( window, mColorDepth );
+
+    // set the context to be current with the new surface
+    MakeContextCurrent();
+  }
+  else  // the display has changed, we need to start egl with a new x-connection
+  {
+    // Note! this code path is untested
+
+    // this will release all EGL specific resources
+    eglTerminate( mEglDisplay );
+
+    mGlesInitialized = false;
+
+    // let the adaptor know that all resources have been lost
+    contextLost = true;
+
+    // re-initialise GLES with the new connection
+    InitializeGles( display );
+
+    // create the EGL surface
+    CreateSurfaceWindow( window, mColorDepth );
+
+    // create the OpenGL context
+    CreateContext();
+
+    // Make it current
+    MakeContextCurrent();
+  }
+
+  return contextLost;
+}
+
+bool EglImplementation::ReplaceSurfacePixmap( EGLNativePixmapType pixmap, EGLNativeDisplayType display )
+{
+  bool contextLost = false;
+
+  //  the surface is bound to the context, so set the context to null
+  MakeContextNull();
+
+  // destroy the surface
+  DestroySurface();
+
+  // If the display has not changed, then we can just create a new surface
+  if ( display == mEglNativeDisplay )
+  {
+    // create the EGL surface
+    CreateSurfacePixmap( pixmap, mColorDepth );
+
+    // set the context to be current with the new surface
+    MakeContextCurrent();
+  }
+  else  // the display has changed, we need to start egl with a new x-connection
+  {
+    // Note! this code path is untested
+
+    // this will release all EGL specific resources
+    eglTerminate( mEglDisplay );
+
+    mGlesInitialized = false;
+
+    // let the adaptor know that all resources have been lost
+    contextLost = true;
+
+    // re-initialise GLES with the new connection
+    InitializeGles( display );
+
+    // create the EGL surface
+    CreateSurfacePixmap( pixmap, mColorDepth );
+
+    // create the OpenGL context
+    CreateContext();
+
+    // Make it current
+    MakeContextCurrent();
+  }
+  return contextLost;
+}
+
+EGLDisplay EglImplementation::GetDisplay() const
+{
+  return mEglDisplay;
+}
+
+EGLDisplay EglImplementation::GetContext() const
+{
+  return mEglContext;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
similarity index 99%
rename from adaptors/tizen/internal/common/events/event-handler.cpp
rename to adaptors/x11/event-handler-x.cpp
index 329d6fb..bd89e51 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include "event-handler.h"
+#include <events/event-handler.h>
 
 // EXTERNAL INCLUDES
 #include <Ecore.h>
 #include <dali/integration-api/events/mouse-wheel-event-integ.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/events/gesture-manager.h>
-#include <internal/common/ecore-x/window-render-surface.h>
-#include <internal/common/clipboard-impl.h>
-#include <internal/common/key-impl.h>
-#include <internal/common/physical-keyboard-impl.h>
-#include <internal/common/style-monitor-impl.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>
 
 using namespace std;
@@ -669,6 +669,7 @@ struct EventHandler::Impl
         dndDetector->EmitMovedSignal();
       }
     }
+
     return ECORE_CALLBACK_PASS_ON;
   }
 
@@ -698,6 +699,7 @@ struct EventHandler::Impl
         DALI_LOG_INFO( gDragAndDropLogFilter, Debug::General, "EcoreEventDndLeave: Finished\n" );
       }
     }
+
     return ECORE_CALLBACK_PASS_ON;
   }
 
@@ -1120,7 +1122,7 @@ EventHandler::EventHandler( RenderSurface* surface, CoreEventInterface& coreEven
   if( surface->GetType() == Dali::RenderSurface::WINDOW )
   {
     // this code only works with the EcoreX11 RenderSurface so need to downcast
-    ECoreX::WindowRenderSurface* ecoreSurface = dynamic_cast< ECoreX::WindowRenderSurface* >( surface );
+    ECore::WindowRenderSurface* ecoreSurface = dynamic_cast< ECore::WindowRenderSurface* >( surface );
     if( ecoreSurface )
     {
       // enable multi touch
diff --git a/adaptors/x11/file.list b/adaptors/x11/file.list
new file mode 100644 (file)
index 0000000..59de4c3
--- /dev/null
@@ -0,0 +1,32 @@
+# x11
+
+adaptor_x11_internal_header_files = \
+  $(adaptor_x11_dir)/clipboard-impl.h \
+  $(adaptor_x11_dir)/imf-manager-impl.h \
+  $(adaptor_x11_dir)/pixmap-image-impl.h \
+  $(adaptor_x11_dir)/pixmap-render-surface.h 
+
+adaptor_x11_application_src_files = \
+  $(adaptor_x11_dir)/framework-x.cpp
+
+adaptor_x11_internal_src_files = \
+  $(adaptor_x11_dir)/accessibility-manager-impl-x.cpp \
+  $(adaptor_x11_dir)/clipboard-impl-x.cpp \
+  $(adaptor_x11_dir)/imf-manager-impl-x.cpp \
+  $(adaptor_x11_dir)/pixmap-image-impl-x.cpp \
+  $(adaptor_x11_dir)/server-connection-x.cpp \
+  $(adaptor_x11_dir)/virtual-keyboard-impl-x.cpp \
+  $(adaptor_x11_dir)/window-impl-x.cpp \
+  $(adaptor_x11_dir)/event-handler-x.cpp \
+  $(adaptor_x11_dir)/egl-implementation-x.cpp \
+  $(adaptor_x11_dir)/pixmap-render-surface-x.cpp \
+  $(adaptor_x11_dir)/ecore-x-render-surface.cpp \
+  $(adaptor_x11_dir)/window-render-surface-x.cpp \
+  $(adaptor_x11_dir)/ecore-x-window-interface.cpp
+
+adaptor_x11_profile_src_files = \
+  $(adaptor_x11_dir)/key-impl-x.cpp
+  
+adaptor_x11_common_internal_profile_src_files = \
+  $(adaptor_x11_dir)/ecore-x-render-surface-factory.cpp \
+  $(adaptor_x11_dir)/system-settings-x.cpp
diff --git a/adaptors/x11/framework-x.cpp b/adaptors/x11/framework-x.cpp
new file mode 100644 (file)
index 0000000..c8a8455
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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 "framework.h"
+
+// EXTERNAL INCLUDES
+#include <X11/Xlib.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+void Framework::InitThreads()
+{
+  XInitThreads();
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
similarity index 98%
rename from adaptors/tizen/internal/common/imf-manager-impl.cpp
rename to adaptors/x11/imf-manager-impl-x.cpp
index 85e143e..01d8365 100644 (file)
  */
 
 // CLASS HEADER
-#include <internal/common/imf-manager-impl.h>
+#include <imf-manager-impl.h>
 
 // EXTERNAL INCLUDES
 #include <boost/bind.hpp>
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/object/type-registry.h>
-#include <dali/public-api/adaptor-framework/common/adaptor.h>
+#include <adaptor.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/ecore-x/window-render-surface.h>
-#include <internal/common/adaptor-impl.h>
-#include <internal/common/virtual-keyboard-impl.h>
+#include <window-render-surface.h>
+#include <adaptor-impl.h>
+#include <virtual-keyboard-impl.h>
 
 namespace Dali
 {
similarity index 98%
rename from adaptors/tizen/internal/common/imf-manager-impl.h
rename to adaptors/x11/imf-manager-impl.h
index e0ced50..60d7c7d 100644 (file)
@@ -23,7 +23,7 @@
 #include <Ecore_X.h>
 
 #include <dali/public-api/object/base-object.h>
-#include <dali/public-api/adaptor-framework/common/imf-manager.h>
+#include <imf-manager.h>
 #include <dali/integration-api/events/key-event-integ.h>
 
 // INTERNAL INCLUDES
similarity index 98%
rename from adaptors/tizen/internal/common/pixmap-image-impl.cpp
rename to adaptors/x11/pixmap-image-impl-x.cpp
index 5c37092..7c81395 100644 (file)
 #include <Ecore_X.h>
 #include <X11/Xutil.h>
 #include <dali/integration-api/debug.h>
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
+#include <render-surface.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/gl/egl-image-extensions.h>
-#include <internal/common/gl/egl-factory.h>
-#include <internal/common/adaptor-impl.h>
+#include <gl/egl-image-extensions.h>
+#include <gl/egl-factory.h>
+#include <adaptor-impl.h>
 
 // Allow this to be encoded and saved:
 #include <platform-abstractions/slp/resource-loader/resource-loader.h>
@@ -252,7 +252,6 @@ PixmapImage::~PixmapImage()
 
 Any PixmapImage::GetPixmap(Dali::PixmapImage::PixmapAPI api) const
 {
-
   if (api == Dali::PixmapImage::ECORE_X11)
   {
     // return ecore x11 type
similarity index 98%
rename from adaptors/tizen/internal/common/pixmap-image-impl.h
rename to adaptors/x11/pixmap-image-impl.h
index fa6fc55..464081c 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <Ecore_X.h>
-#include <dali/public-api/adaptor-framework/common/pixmap-image.h>
+#include <pixmap-image.h>
 
 // INTERNAL INCLUDES
 
@@ -30,8 +30,8 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/ecore-x/ecore-x-types.h>
-#include <internal/common/trigger-event.h>
+#include <ecore-x-types.h>
+#include <trigger-event.h>
 
 namespace Dali
 {
@@ -46,7 +46,7 @@ namespace Adaptor
 extern Debug::Filter* gRenderSurfaceLogFilter;
 #endif
 
-namespace ECoreX
+namespace ECore
 {
 
 PixmapRenderSurface::PixmapRenderSurface( Dali::PositionSize positionSize,
@@ -218,7 +218,7 @@ void PixmapRenderSurface::RenderSync()
   mSyncNotify.notify_all();
 }
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
@@ -19,7 +19,7 @@
  */
 
 // INTERNAL INCLUDES
-#include <internal/common/ecore-x/ecore-x-render-surface.h>
+#include <ecore-x-render-surface.h>
 
 namespace Dali
 {
@@ -31,7 +31,7 @@ namespace Adaptor
 {
 class TriggerEvent;
 
-namespace ECoreX
+namespace ECore
 {
 
 /**
@@ -56,14 +56,14 @@ public:
                        bool isTransparent = false);
 
   /**
-   * @copydoc Dali::Internal::Adaptor::ECoreX::RenderSurface::~RenderSurface
+   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::~RenderSurface
    */
   virtual ~PixmapRenderSurface();
 
 public: // API
 
   /**
-   * @copydoc Dali::Internal::Adaptor::ECoreX::RenderSurface::GetDrawable()
+   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::GetDrawable()
    */
   virtual Ecore_X_Drawable GetDrawable();
 
@@ -124,7 +124,7 @@ private:
   virtual void CreateXRenderable();
 
   /**
-   * @copydoc Dali::Internal::Adaptor::ECoreX::RenderSurface::UseExistingRenderable
+   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::UseExistingRenderable
    */
   virtual void UseExistingRenderable( unsigned int surfaceId );
 
@@ -134,7 +134,7 @@ private: // Data
 
 };
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
diff --git a/adaptors/x11/server-connection-x.cpp b/adaptors/x11/server-connection-x.cpp
new file mode 100644 (file)
index 0000000..22d469c
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * 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 "server-connection.h"
+
+// EXTERNAL INCLUDES
+#include <Ecore.h>
+
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+#if defined(DEBUG_ENABLED)
+extern Debug::Filter* gIndicatorLogFilter;
+#endif
+
+
+ServerConnection::ServerConnection(
+  const char*                 serviceName,
+  int                         serviceNumber,
+  bool                        isSystem,
+  ServerConnection::Observer* observer)
+
+: mConnected(false),
+  mObserver(observer)
+{
+  Ecore_Ipc_Type ipctype = ECORE_IPC_LOCAL_USER;
+
+  ecore_ipc_init();
+  mService.name = eina_stringshare_add(serviceName);
+  mService.num = serviceNumber;
+  mService.isSystem = isSystem;
+
+  if (mService.isSystem)
+  {
+    ipctype = ECORE_IPC_LOCAL_SYSTEM;
+  }
+
+  DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "ServerConnection: Connecting to %s %d\n", mService.name, mService.num );
+
+  mIpcServer = ecore_ipc_server_connect( ipctype, (char *)mService.name, mService.num, this );
+
+  if( !mIpcServer )
+  {
+    ecore_ipc_shutdown();
+  }
+  else
+  {
+    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_ADD,
+                                                     &ServerConnection::IpcServerAdd,
+                                                     this ) );
+
+    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DEL,
+                                                     &ServerConnection::IpcServerDel,
+                                                     this ) );
+
+    mIpcHandlers.push_back( ecore_event_handler_add( ECORE_IPC_EVENT_SERVER_DATA,
+                                                     &ServerConnection::IpcServerData,
+                                                     this));
+
+    mConnected = true;
+  }
+}
+
+} // Adaptor
+} // Internal
+} // Dali
similarity index 93%
rename from adaptors/tizen/internal/common/system-settings.cpp
rename to adaptors/x11/system-settings-x.cpp
index 6d81b80..4cb2f6f 100644 (file)
@@ -31,18 +31,12 @@ namespace Internal
 namespace Adaptor
 {
 
-int GetLongPressTime( int defaultTime )
-{
-  return defaultTime;
-}
-
 int GetElmAccessActionOver()
 {
   // ELM_ACCESS_ACTION_OVER not available in common profile
   return ELM_ACCESS_ACTION_LAST;
 }
 
-
 } // namespace Adaptor
 
 } // namespace Internal
diff --git a/adaptors/x11/virtual-keyboard-impl-x.cpp b/adaptors/x11/virtual-keyboard-impl-x.cpp
new file mode 100644 (file)
index 0000000..6e9474a
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * 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 "virtual-keyboard-impl.h"
+
+// EXTERNAL INCLUDES
+#include <X11/Xlib.h>
+#include <Ecore_X.h>
+#include <algorithm>
+
+#include <dali/public-api/common/vector-wrapper.h>
+#include <adaptor.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <locale-utils.h>
+#include <imf-manager-impl.h>
+
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace VirtualKeyboard
+{
+
+void RotateTo(int angle)
+{
+  // Get focus window used by Keyboard and rotate it
+  Display* display = XOpenDisplay(0);
+  if (display)
+  {
+    ::Window focusWindow;
+    int revert;
+    // Get Focus window
+    XGetInputFocus(display, &focusWindow, &revert);
+
+    ecore_x_window_prop_property_set(focusWindow,
+                                      ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+                                      ECORE_X_ATOM_CARDINAL, 32, &angle, 1);
+    XCloseDisplay(display);
+  }
+}
+
+} // namespace VirtualKeyboard
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/adaptors/x11/window-impl-x.cpp b/adaptors/x11/window-impl-x.cpp
new file mode 100644 (file)
index 0000000..aac604c
--- /dev/null
@@ -0,0 +1,713 @@
+/*
+ * 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 "window-impl.h"
+
+// EXTERNAL HEADERS
+#include <Ecore.h>
+#include <Ecore_X.h>
+
+#include <dali/integration-api/core.h>
+#include <dali/integration-api/system-overlay.h>
+#include <dali/public-api/render-tasks/render-task.h>
+#include <dali/public-api/render-tasks/render-task-list.h>
+#include <orientation.h>
+
+// INTERNAL HEADERS
+#include <window-render-surface.h>
+#include <drag-and-drop-detector-impl.h>
+#include <indicator-impl.h>
+#include <window-visibility-observer.h>
+#include <orientation-impl.h>
+
+namespace
+{
+const float INDICATOR_ANIMATION_DURATION( 0.18f ); // 180 milli seconds
+const float INDICATOR_SHOW_Y_POSITION( 0.0f );
+const float INDICATOR_HIDE_Y_POSITION( -52.0f );
+}
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gWindowLogFilter = Debug::Filter::New(Debug::Concise, false, "LOG_WINDOW");
+#endif
+
+/**
+ * TODO: Abstract Window class out and move this into a window implementation for Ecore
+ */
+struct Window::EventHandler
+{
+  /**
+   * Constructor
+   * @param[in]  window  A pointer to the window class.
+   */
+  EventHandler( Window* window )
+  : mWindow( window ),
+    mWindowPropertyHandler( ecore_event_handler_add( ECORE_X_EVENT_WINDOW_PROPERTY,  EcoreEventWindowPropertyChanged, this ) ),
+    mClientMessagehandler( ecore_event_handler_add( ECORE_X_EVENT_CLIENT_MESSAGE,  EcoreEventClientMessage, this ) ),
+    mEcoreWindow( 0 )
+  {
+    // store ecore window handle
+    ECore::WindowRenderSurface* x11Window( dynamic_cast< ECore::WindowRenderSurface * >( mWindow->mSurface ) );
+    if( x11Window )
+    {
+      mEcoreWindow = x11Window->GetXWindow();
+    }
+    DALI_ASSERT_ALWAYS( mEcoreWindow != 0 && "There is no ecore x window");
+
+    // set property on window to get deiconify approve client message
+    unsigned int tmp = 1;
+    ecore_x_window_prop_card32_set(mEcoreWindow,
+                             ECORE_X_ATOM_E_DEICONIFY_APPROVE,
+                             &tmp, 1);
+  }
+
+  /**
+   * Destructor
+   */
+  ~EventHandler()
+  {
+    if ( mWindowPropertyHandler )
+    {
+      ecore_event_handler_del( mWindowPropertyHandler );
+    }
+    if ( mClientMessagehandler )
+    {
+      ecore_event_handler_del( mClientMessagehandler );
+    }
+  }
+
+  // Static methods
+
+  /// Called when the window properties are changed.
+  static Eina_Bool EcoreEventWindowPropertyChanged( void* data, int type, void* event )
+  {
+    Ecore_X_Event_Window_Property* propertyChangedEvent( (Ecore_X_Event_Window_Property*)event );
+    EventHandler* handler( (EventHandler*)data );
+    Eina_Bool handled( ECORE_CALLBACK_PASS_ON );
+
+    if ( handler && handler->mWindow )
+    {
+      WindowVisibilityObserver* observer( handler->mWindow->mAdaptor );
+      if ( observer && ( propertyChangedEvent->win == handler->mEcoreWindow ) )
+      {
+        Ecore_X_Window_State_Hint state( ecore_x_icccm_state_get( propertyChangedEvent->win ) );
+
+        switch ( state )
+        {
+          case ECORE_X_WINDOW_STATE_HINT_WITHDRAWN:
+          {
+            // Window was hidden.
+            observer->OnWindowHidden();
+            DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Withdrawn\n", handler->mEcoreWindow );
+            handled = ECORE_CALLBACK_DONE;
+          }
+          break;
+
+          case ECORE_X_WINDOW_STATE_HINT_ICONIC:
+          {
+            // Window was iconified (minimised).
+            observer->OnWindowHidden();
+            DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Iconfied\n", handler->mEcoreWindow );
+            handled = ECORE_CALLBACK_DONE;
+          }
+          break;
+
+          case ECORE_X_WINDOW_STATE_HINT_NORMAL:
+          {
+            // Window was shown.
+            observer->OnWindowShown();
+            DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Shown\n", handler->mEcoreWindow );
+            handled = ECORE_CALLBACK_DONE;
+          }
+          break;
+
+          default:
+            // Ignore
+            break;
+        }
+      }
+    }
+
+    return handled;
+  }
+
+  /// Called when the window properties are changed.
+  static Eina_Bool EcoreEventClientMessage( void* data, int type, void* event )
+  {
+    Eina_Bool handled( ECORE_CALLBACK_PASS_ON );
+    Ecore_X_Event_Client_Message* clientMessageEvent( (Ecore_X_Event_Client_Message*)event );
+    EventHandler* handler( (EventHandler*)data );
+
+    if (clientMessageEvent->message_type == ECORE_X_ATOM_E_DEICONIFY_APPROVE)
+    {
+      ECore::WindowRenderSurface* x11Window( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
+      WindowVisibilityObserver* observer( handler->mWindow->mAdaptor );
+
+      if ( observer && ( (unsigned int)clientMessageEvent->data.l[0] == handler->mEcoreWindow ) )
+      {
+        if (clientMessageEvent->data.l[1] == 0) //wm sends request message using value 0
+        {
+          observer->OnWindowShown();
+
+          // request to approve the deiconify. render-surface should send proper event after real rendering
+          if(x11Window)
+          {
+            x11Window->RequestToApproveDeiconify();
+          }
+
+          handled = ECORE_CALLBACK_DONE;
+        }
+      }
+    }
+
+    return handled;
+  }
+
+  // Data
+  Window* mWindow;
+  Ecore_Event_Handler* mWindowPropertyHandler;
+  Ecore_Event_Handler* mClientMessagehandler;
+  Ecore_X_Window mEcoreWindow;
+};
+
+
+Window* Window::New(const PositionSize& posSize, const std::string& name, bool isTransparent)
+{
+  Window* window = new Window();
+  window->mIsTransparent = isTransparent;
+  window->Initialize(posSize, name);
+  return window;
+}
+
+void Window::SetAdaptor(Dali::Adaptor& adaptor)
+{
+  DALI_ASSERT_ALWAYS( !mStarted && "Adaptor already started" );
+  mStarted = true;
+
+  // Only create one overlay per window
+  Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation(adaptor);
+  Integration::Core& core = adaptorImpl.GetCore();
+  mOverlay = &core.GetSystemOverlay();
+
+  Dali::RenderTaskList taskList = mOverlay->GetOverlayRenderTasks();
+  taskList.CreateTask();
+
+  mAdaptor = &adaptorImpl;
+  mAdaptor->AddObserver( *this );
+
+  // Can only create the detector when we know the Core has been instantiated.
+  mDragAndDropDetector = DragAndDropDetector::New();
+  mAdaptor->SetDragAndDropDetector( &GetImplementation( mDragAndDropDetector ) );
+
+  if( mOrientation )
+  {
+    mOrientation->SetAdaptor(adaptor);
+  }
+
+  if( mIndicator != NULL )
+  {
+    mIndicator->SetAdaptor(mAdaptor);
+  }
+}
+
+RenderSurface* Window::GetSurface()
+{
+  return mSurface;
+}
+
+void Window::SetIndicatorStyle( Dali::Window::IndicatorStyle style )
+{
+  mIndicatorStyle = style;
+}
+
+void Window::ShowIndicator( bool show )
+{
+  DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "%s\n", show?"SHOW":"HIDE" );
+  DALI_ASSERT_DEBUG(mOverlay);
+
+  if(show)
+  {
+    mIndicatorVisible = Dali::Window::VISIBLE;
+  }
+  else
+  {
+    mIndicatorVisible = Dali::Window::INVISIBLE;
+  }
+
+  DoShowIndicator( mIndicatorOrientation );
+}
+
+void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
+{
+  DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "visible : %d\n", visibleMode );
+  DALI_ASSERT_DEBUG(mOverlay);
+
+  ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+  DALI_ASSERT_DEBUG(x11Window);
+  Ecore_X_Window xWinId = x11Window->GetXWindow();
+
+  mIndicatorVisible = visibleMode;
+
+  if ( mIndicatorVisible == Dali::Window::VISIBLE )
+  {
+    // when the indicator is visible, set proper mode for indicator server according to bg mode
+    if ( mIndicatorOpacityMode == Dali::Window::OPAQUE )
+    {
+      ecore_x_e_illume_indicator_opacity_set(xWinId, ECORE_X_ILLUME_INDICATOR_OPAQUE);
+    }
+    else if ( mIndicatorOpacityMode == Dali::Window::TRANSLUCENT )
+    {
+      ecore_x_e_illume_indicator_opacity_set(xWinId, ECORE_X_ILLUME_INDICATOR_TRANSLUCENT);
+    }
+#if defined(DALI_PROFILE_MOBILE)
+    else if ( mIndicatorOpacityMode == Dali::Window::TRANSPARENT )
+    {
+      ecore_x_e_illume_indicator_opacity_set(xWinId, ECORE_X_ILLUME_INDICATOR_BG_TRANSPARENT);
+    }
+#endif
+  }
+  else
+  {
+    // when the indicator is not visible, set TRANSPARENT mode for indicator server
+    ecore_x_e_illume_indicator_opacity_set(xWinId, ECORE_X_ILLUME_INDICATOR_TRANSPARENT); // it means hidden indicator
+  }
+
+  DoShowIndicator( mIndicatorOrientation );
+}
+
+void Window::RotateIndicator(Dali::Window::WindowOrientation orientation)
+{
+  DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "Orientation: %d\n", orientation );
+
+  DoRotateIndicator( orientation );
+}
+
+void Window::SetIndicatorBgOpacity( Dali::Window::IndicatorBgOpacity opacityMode )
+{
+  mIndicatorOpacityMode = opacityMode;
+
+  if( mIndicator != NULL )
+  {
+    mIndicator->SetOpacityMode( opacityMode );
+  }
+}
+
+void Window::SetClass(std::string name, std::string klass)
+{
+  // Get render surface's x11 window
+  if( mSurface )
+  {
+    ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+    if( x11Window )
+    {
+      ecore_x_icccm_name_class_set( x11Window->GetXWindow(), name.c_str(), klass.c_str() );
+    }
+  }
+}
+
+Window::Window()
+: mSurface(NULL),
+  mIndicatorStyle(Dali::Window::CHANGEABLE_COLOR),
+  mIndicatorVisible(Dali::Window::VISIBLE),
+  mIndicatorIsShown(false),
+  mShowRotatedIndicatorOnClose(false),
+  mStarted(false),
+  mIsTransparent(false),
+  mWMRotationAppSet(false),
+  mIndicator(NULL),
+  mIndicatorOrientation(Dali::Window::PORTRAIT),
+  mNextIndicatorOrientation(Dali::Window::PORTRAIT),
+  mIndicatorOpacityMode(Dali::Window::OPAQUE),
+  mOverlay(NULL),
+  mAdaptor(NULL)
+{
+}
+
+Window::~Window()
+{
+  delete mEventHandler;
+
+  if ( mAdaptor )
+  {
+    mAdaptor->RemoveObserver( *this );
+    mAdaptor->SetDragAndDropDetector( NULL );
+    mAdaptor = NULL;
+  }
+
+  delete mSurface;
+}
+
+void Window::Initialize(const PositionSize& windowPosition, const std::string& name)
+{
+  // create an X11 window by default
+  Any surface;
+  Any display;
+  mSurface = new ECore::WindowRenderSurface( windowPosition, surface, display, name, mIsTransparent );
+  mOrientation = Orientation::New(this);
+
+  // create event handler for X11 window
+  mEventHandler = new EventHandler( this );
+}
+
+void Window::DoShowIndicator( Dali::Window::WindowOrientation lastOrientation )
+{
+  if( mIndicator == NULL )
+  {
+    if( mIndicatorVisible != Dali::Window::INVISIBLE )
+    {
+      mIndicator = new Indicator( mAdaptor, mIndicatorOrientation, mIndicatorStyle, this );
+      mIndicator->SetOpacityMode( mIndicatorOpacityMode );
+      Dali::Actor actor = mIndicator->GetActor();
+      SetIndicatorActorRotation();
+      mOverlay->Add(actor);
+    }
+    // else don't create a hidden indicator
+  }
+  else // Already have indicator
+  {
+    if( mIndicatorVisible == Dali::Window::VISIBLE )
+    {
+      // If we are resuming, and rotation has changed,
+      if( mIndicatorIsShown == false && mIndicatorOrientation != mNextIndicatorOrientation )
+      {
+        // then close current indicator and open new one
+        mShowRotatedIndicatorOnClose = true;
+        mIndicator->Close(); // May synchronously call IndicatorClosed() callback & 1 level of recursion
+        // Don't show actor - will contain indicator for old orientation.
+      }
+    }
+  }
+
+  // set indicator visible mode
+  if( mIndicator != NULL )
+  {
+    mIndicator->SetVisible( mIndicatorVisible );
+  }
+
+  bool show = (mIndicatorVisible != Dali::Window::INVISIBLE );
+  SetIndicatorProperties( show, lastOrientation );
+  mIndicatorIsShown = show;
+}
+
+void Window::DoRotateIndicator( Dali::Window::WindowOrientation orientation )
+{
+  if( mIndicatorIsShown )
+  {
+    mShowRotatedIndicatorOnClose = true;
+    mNextIndicatorOrientation = orientation;
+    mIndicator->Close(); // May synchronously call IndicatorClosed() callback
+  }
+  else
+  {
+    // Save orientation for when the indicator is next shown
+    mShowRotatedIndicatorOnClose = false;
+    mNextIndicatorOrientation = orientation;
+  }
+}
+
+void Window::SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation )
+{
+  ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+  if( x11Window )
+  {
+    Ecore_X_Window win = x11Window->GetXWindow();
+
+    int show_state = static_cast<int>( isShow );
+    ecore_x_window_prop_property_set( win,
+                                      ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
+                                      ECORE_X_ATOM_CARDINAL, 32, &show_state, 1);
+
+    if ( isShow )
+    {
+      ecore_x_e_illume_indicator_state_set(win, ECORE_X_ILLUME_INDICATOR_STATE_ON);
+    }
+    else
+    {
+      ecore_x_e_illume_indicator_state_set(win, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
+    }
+  }
+}
+
+void Window::IndicatorTypeChanged(Indicator::Type type)
+{
+  ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+  if( x11Window )
+  {
+    Ecore_X_Window win = x11Window->GetXWindow();
+    switch(type)
+    {
+      case Indicator::INDICATOR_TYPE_1:
+        ecore_x_e_illume_indicator_type_set( win, ECORE_X_ILLUME_INDICATOR_TYPE_1 );
+        break;
+
+      case Indicator::INDICATOR_TYPE_2:
+        ecore_x_e_illume_indicator_type_set( win, ECORE_X_ILLUME_INDICATOR_TYPE_2 );
+        break;
+
+      case Indicator::INDICATOR_TYPE_UNKNOWN:
+      default:
+        break;
+    }
+  }
+}
+
+void Window::IndicatorClosed( Indicator* indicator )
+{
+  DALI_LOG_TRACE_METHOD( gWindowLogFilter );
+
+  if( mShowRotatedIndicatorOnClose )
+  {
+    Dali::Window::WindowOrientation currentOrientation = mIndicatorOrientation;
+    mIndicator->Open(mNextIndicatorOrientation);
+    mIndicatorOrientation = mNextIndicatorOrientation;
+    SetIndicatorActorRotation();
+    DoShowIndicator(currentOrientation);
+  }
+}
+
+void Window::SetIndicatorActorRotation()
+{
+  DALI_LOG_TRACE_METHOD( gWindowLogFilter );
+  DALI_ASSERT_DEBUG( mIndicator != NULL );
+
+  Dali::Actor actor = mIndicator->GetActor();
+  switch( mIndicatorOrientation )
+  {
+    case Dali::Window::PORTRAIT:
+      actor.SetParentOrigin( ParentOrigin::TOP_CENTER );
+      actor.SetAnchorPoint(  AnchorPoint::TOP_CENTER );
+      actor.SetRotation( Degree(0), Vector3::ZAXIS );
+      break;
+    case Dali::Window::PORTRAIT_INVERSE:
+      actor.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+      actor.SetAnchorPoint(  AnchorPoint::TOP_CENTER );
+      actor.SetRotation( Degree(180), Vector3::ZAXIS );
+      break;
+    case Dali::Window::LANDSCAPE:
+      actor.SetParentOrigin( ParentOrigin::CENTER_LEFT );
+      actor.SetAnchorPoint(  AnchorPoint::TOP_CENTER );
+      actor.SetRotation( Degree(270), Vector3::ZAXIS );
+      break;
+    case Dali::Window::LANDSCAPE_INVERSE:
+      actor.SetParentOrigin( ParentOrigin::CENTER_RIGHT );
+      actor.SetAnchorPoint(  AnchorPoint::TOP_CENTER );
+      actor.SetRotation( Degree(90), Vector3::ZAXIS );
+      break;
+  }
+}
+
+void Window::Raise()
+{
+  ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+  if( x11Window )
+  {
+    Ecore_X_Window win = x11Window->GetXWindow();
+    ecore_x_window_raise(win);
+  }
+}
+
+void Window::Lower()
+{
+  ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+  if( x11Window )
+  {
+    Ecore_X_Window win = x11Window->GetXWindow();
+    ecore_x_window_lower(win);
+  }
+}
+
+void Window::Activate()
+{
+  ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+  if( x11Window )
+  {
+    Ecore_X_Window win = x11Window->GetXWindow();
+    ecore_x_netwm_client_active_request(ecore_x_window_root_get(win), win, 1 /* request type, 1:application, 2:pager */, 0);
+  }
+}
+
+Dali::DragAndDropDetector Window::GetDragAndDropDetector() const
+{
+  return mDragAndDropDetector;
+}
+
+void Window::OnStart()
+{
+  DoShowIndicator( mIndicatorOrientation );
+}
+
+void Window::OnPause()
+{
+}
+
+void Window::OnResume()
+{
+  // resume indicator status
+  if( mIndicator != NULL )
+  {
+    // Restore own indicator opacity
+    // Send opacity mode to indicator service when app resumed
+    mIndicator->SetOpacityMode( mIndicatorOpacityMode );
+  }
+}
+
+void Window::OnStop()
+{
+  if( mIndicator )
+  {
+    mIndicator->Close();
+  }
+
+  delete mIndicator;
+  mIndicator = NULL;
+}
+
+void Window::OnDestroy()
+{
+  mAdaptor = NULL;
+}
+
+OrientationPtr Window::GetOrientation()
+{
+  return mOrientation;
+}
+
+void Window::AddAvailableOrientation(Dali::Window::WindowOrientation orientation)
+{
+  bool found = false;
+
+  for( std::size_t i=0; i<mAvailableOrientations.size(); i++ )
+  {
+    if(mAvailableOrientations[i] == orientation)
+    {
+      found = true;
+      break;
+    }
+  }
+
+  if( ! found )
+  {
+    mAvailableOrientations.push_back(orientation);
+    SetAvailableOrientations( mAvailableOrientations );
+  }
+}
+
+void Window::RemoveAvailableOrientation(Dali::Window::WindowOrientation orientation)
+{
+  for( std::vector<Dali::Window::WindowOrientation>::iterator iter = mAvailableOrientations.begin();
+       iter != mAvailableOrientations.end(); ++iter )
+  {
+    if( *iter == orientation )
+    {
+      mAvailableOrientations.erase( iter );
+      break;
+    }
+  }
+  SetAvailableOrientations( mAvailableOrientations );
+}
+
+void Window::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrientation>& orientations)
+{
+  DALI_ASSERT_ALWAYS( mAvailableOrientations.size() <= 4 && "Incorrect number of available orientations" );
+
+  mAvailableOrientations = orientations;
+  ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+  if( x11Window )
+  {
+    Ecore_X_Window ecoreWindow = x11Window->GetXWindow();
+    if( ! mWMRotationAppSet )
+    {
+      mWMRotationAppSet = true;
+      ecore_x_e_window_rotation_app_set(ecoreWindow, EINA_TRUE);
+    }
+
+    int rotations[4];
+    for( std::size_t i=0; i<mAvailableOrientations.size(); i++ )
+    {
+      rotations[i] = static_cast<int>(mAvailableOrientations[i]);
+    }
+    ecore_x_e_window_rotation_available_rotations_set(ecoreWindow, rotations, mAvailableOrientations.size() );
+
+  }
+}
+
+const std::vector<Dali::Window::WindowOrientation>& Window::GetAvailableOrientations()
+{
+  return mAvailableOrientations;
+}
+
+void Window::SetPreferredOrientation(Dali::Window::WindowOrientation orientation)
+{
+  mPreferredOrientation = orientation;
+
+  ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+  if( x11Window )
+  {
+    Ecore_X_Window ecoreWindow = x11Window->GetXWindow();
+
+    if( ! mWMRotationAppSet )
+    {
+      mWMRotationAppSet = true;
+      ecore_x_e_window_rotation_app_set(ecoreWindow, EINA_TRUE);
+    }
+
+    ecore_x_e_window_rotation_preferred_rotation_set(ecoreWindow, orientation);
+  }
+}
+
+Dali::Window::WindowOrientation Window::GetPreferredOrientation()
+{
+  return mPreferredOrientation;
+}
+
+void Window::RotationDone( int orientation, int width, int height )
+{
+  // Tell window manager we're done
+  ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+  if( x11Window )
+  {
+    Ecore_X_Window ecoreWindow = x11Window->GetXWindow();
+    Ecore_X_Window root = ecore_x_window_root_get(ecoreWindow);
+
+    /**
+     * send rotation done message to wm, even if window is already rotated.
+     * that's why wm must be wait for comming rotation done message
+     * after sending rotation request.
+     */
+    ecore_x_e_window_rotation_change_done_send(root, ecoreWindow, orientation, width, height);
+
+    /**
+     * set rotate window property
+     */
+    int angles[2] = { orientation, orientation };
+    ecore_x_window_prop_property_set( ecoreWindow,
+                                     ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+                                     ECORE_X_ATOM_CARDINAL, 32, &angles, 2 );
+  }
+}
+
+
+} // Adaptor
+} // Internal
+} // Dali
@@ -30,8 +30,8 @@
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
-#include <internal/common/ecore-x/ecore-x-types.h>
-#include <internal/common/trigger-event.h>
+#include <ecore-x-types.h>
+#include <trigger-event.h>
 
 namespace Dali
 {
@@ -46,7 +46,7 @@ namespace Adaptor
 extern Debug::Filter* gRenderSurfaceLogFilter;
 #endif
 
-namespace ECoreX
+namespace ECore
 {
 
 namespace
@@ -286,7 +286,7 @@ void WindowRenderSurface::UseExistingRenderable( unsigned int surfaceId )
   mX11Window = static_cast< Ecore_X_Window >( surfaceId );
 }
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
@@ -19,7 +19,7 @@
  */
 
 // INTERNAL INCLUDES
-#include <internal/common/ecore-x/ecore-x-render-surface.h>
+#include <ecore-x-render-surface.h>
 
 namespace Dali
 {
@@ -30,11 +30,11 @@ namespace Internal
 namespace Adaptor
 {
 
-namespace ECoreX
+namespace ECore
 {
 
 /**
- * @copydoc Dali::Internal::Adaptor::ECoreX::RenderSurface.
+ * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface.
  * Window specialization.
  */
 class WindowRenderSurface : public RenderSurface
@@ -56,7 +56,7 @@ public:
                        bool isTransparent = false );
 
   /**
-   * @copydoc Dali::Internal::Adaptor::ECoreX::RenderSurface::~RenderSurface
+   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::~RenderSurface
    */
   virtual ~WindowRenderSurface();
 
@@ -145,7 +145,7 @@ protected:
   virtual void CreateXRenderable();
 
   /**
-   * @copydoc Dali::Internal::Adaptor::ECoreX::RenderSurface::UseExistingRenderable
+   * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::UseExistingRenderable
    */
   virtual void UseExistingRenderable( unsigned int surfaceId );
 
@@ -156,7 +156,7 @@ private: // Data
 
 }; // class WindowRenderSurface
 
-} // namespace ECoreX
+} // namespace ECore
 
 } // namespace Adaptor
 
index ef752d8..f08a74b 100644 (file)
@@ -25,45 +25,67 @@ slp_platform_abstraction_src_dir = ../../../platform-abstractions/slp
 include ../../../platform-abstractions/slp/file.list
 
 # Internal Common
-tizen_adaptor_internal_src_dir = ../../../adaptors/tizen/internal/common
-include ../../../adaptors/tizen/internal/common/file.list
+adaptor_common_dir = ../../../adaptors/common
+include ../../../adaptors/common/file.list
+
+if WAYLAND
+adaptor_wayland_dir = ../../../adaptors/wayland
+include ../../../adaptors/wayland/file.list
+else
+adaptor_x11_dir = ../../../adaptors/x11
+include ../../../adaptors/x11/file.list
+endif
 
 if COMMON_PROFILE
-tizen_adaptor_internal_common_src_files += $(tizen_adaptor_internal_common_profile_src_files)
+adaptor_common_internal_src_files += $(adaptor_common_internal_profile_src_files)
 slp_platform_abstraction_src_files += $(slp_assimp_stubs_src_files)
+if ! WAYLAND
+adaptor_common_internal_src_files += $(adaptor_x11_common_internal_profile_src_files)
+endif
+endif
+
+if WAYLAND
+adaptor_common_internal_src_files += $(adaptor_wayland_internal_src_files)
+adaptor_common_internal_profile_src_files += $(adaptor_wayland_profile_src_files)
+else
+adaptor_common_internal_src_files += $(adaptor_x11_internal_src_files)
+adaptor_common_internal_profile_src_files += $(adaptor_x11_profile_src_files)
 endif
 
 if MOBILE_PROFILE
+adaptor_common_internal_src_files += $(adaptor_x11_profile_src_files)
 slp_platform_abstraction_src_files += $(slp_assimp_src_files)
-include ../../../adaptors/tizen/internal/mobile/file.list
+include ../../../adaptors/mobile/file.list
 endif
 
 if LITE_PROFILE
-tizen_adaptor_internal_common_src_files += $(tizen_adaptor_internal_common_profile_src_files)
+adaptor_common_internal_src_files += $(adaptor_common_internal_profile_src_files)
 slp_platform_abstraction_src_files += $(slp_assimp_stubs_src_files)
+if ! WAYLAND
+adaptor_common_internal_src_files += $(adaptor_x11_common_internal_profile_src_files)
+endif
 endif
 
 if WEARABLE_PROFILE
-tizen_adaptor_internal_common_src_files += $(tizen_adaptor_internal_common_profile_src_files)
+adaptor_common_internal_src_files += $(adaptor_common_internal_profile_src_files)
 slp_platform_abstraction_src_files += $(slp_assimp_stubs_src_files)
+if ! WAYLAND
+adaptor_common_internal_src_files += $(adaptor_x11_common_internal_profile_src_files)
+endif
 endif
 
 if TV_PROFILE
 slp_platform_abstraction_src_files += $(slp_assimp_src_files)
-include ../../../adaptors/tizen/internal/tv/file.list
+include ../../../adaptors/tv/file.list
 endif
 
 # Public API
-tizen_adaptor_public_api_src_dir = ../../../adaptors/tizen/public-api
-include ../../../adaptors/tizen/public-api/file.list
-
-# CAPI API
-capi_src_dir = ../../../capi/dali/public-api
-include ../../../capi/dali/public-api/file.list
+adaptor_public_api_dir = ../../../adaptors/public-api
+include ../../../adaptors/public-api/file.list
 
 # Feedback Plugin
 if ! LITE_PROFILE
-plugin_themes_dir = ../../../adaptors/tizen/internal/common/feedback
+plugin_themes_dir = ../../../adaptors/common/feedback
 dali_plugin_theme_files = $(plugin_themes_dir)/default-feedback-theme.json
 
 dalifeedbackthemedir = ${dataReadOnlyDir}/themes/feedback-themes/
@@ -81,8 +103,8 @@ lib_LTLIBRARIES = libdali-adaptor-common.la
 libdali_adaptor_common_la_SOURCES = \
                      $(base_adaptor_src_files) \
                      $(slp_platform_abstraction_src_files) \
-                     $(tizen_adaptor_public_api_src_files) \
-                     $(tizen_adaptor_internal_common_src_files)
+                     $(adaptor_common_src_files) \
+                     $(adaptor_common_internal_src_files)
 
 libdali_adaptor_common_la_DEPENDENCIES =
 
@@ -93,9 +115,16 @@ libdali_adaptor_common_la_includes = \
                       -I../../../platform-abstractions/slp/resource-loader \
                       -I../../../platform-abstractions/portable \
                       -I../../../platform-abstractions/ \
-                      -I../../../adaptors/tizen \
-                      -I../../../adaptors/ \
-                      -I../../../capi/
+                      -I../../../adaptors/public-api \
+                      -I../../../adaptors/common \
+                      -I../../../adaptors/ 
+if WAYLAND
+libdali_adaptor_common_la_includes += \
+                      -I../../../adaptors/wayland
+else
+libdali_adaptor_common_la_includes += \
+                      -I../../../adaptors/x11
+endif
 
 daliDefaultFontCacheDir = ${dataReadOnlyDir}/glyphcache/
 daliUserFontCacheDir = ${dataReadWriteDir}/glyphcache/
@@ -119,7 +148,6 @@ libdali_adaptor_common_la_CXXFLAGS = \
                       $(DALI_ADAPTOR_CFLAGS) \
                       $(DALICORE_CFLAGS) \
                       $(OPENGLES20_CFLAGS) \
-                      $(X11_CFLAGS) \
                       $(FREETYPE_CFLAGS) \
                       $(FONTCONFIG_CFLAGS) \
                       $(PNG_CFLAGS) \
@@ -141,13 +169,11 @@ libdali_adaptor_common_la_CXXFLAGS = \
 
 libdali_adaptor_common_la_LIBADD = \
                       $(DALICORE_LIBS) \
-                      $(X11_LIBS) \
                       $(OPENGLES20_LIBS) \
                       $(FREETYPE_LIBS) \
                       $(FONTCONFIG_LIBS) \
                       $(PNG_LIBS) \
                       $(ELEMENTARY_LIBS) \
-                      $(ECORE_X_LIBS) \
                       $(ECORE_IPC_LIBS) \
                       $(DLOG_LIBS) \
                       $(XML_LIBS) \
@@ -161,6 +187,15 @@ libdali_adaptor_common_la_LIBADD = \
                       -lgif \
                       -lboost_thread
 
+if WAYLAND
+libdali_adaptor_common_la_CXXFLAGS += $(WAYLAND_CFLAGS)
+libdali_adaptor_common_la_LIBADD += $(WAYLAND_LIBS)
+else
+libdali_adaptor_common_la_CXXFLAGS += $(X11_CFLAGS)
+libdali_adaptor_common_la_LIBADD += $(X11_LIBS)
+libdali_adaptor_common_la_LIBADD += $(ECORE_X_LIBS)
+endif
+
 if COMMON_PROFILE
 libdali_adaptor_common_la_CXXFLAGS += $(HAPTIC_CFLAGS)
 endif
@@ -200,14 +235,14 @@ else
 libdali_adaptor_common_la_LIBADD += -ljpeg
 endif
 
-tizenadaptorcommonpublicapidir = $(devincludepath)/dali/public-api/adaptor-framework/common
-tizenadaptorcommonpublicapi_HEADERS = $(tizen_adaptor_public_api_common_header_files)
+tizenadaptorcommonpublicapidir = $(devincludepath)/dali/public-api/
+tizenadaptorcommonpublicapi_HEADERS = $(public_api_header_files)
 
 tizenadaptordaliheaderdir = $(devincludepath)/dali
-tizenadaptordaliheader_HEADERS = $(tizen_adaptor_dali_header_file)
+tizenadaptordaliheader_HEADERS = $(adaptor_dali_header_file)
 
-capicommonpublicapidir = $(devincludepath)/dali/public-api/adaptor-framework/common
-capicommonpublicapi_HEADERS = $(capi_adaptor_framework_common_header_files)
+capicommonpublicapidir = $(devincludepath)/dali/public-api/
+capicommonpublicapi_HEADERS = $(public_api_header_files)
 
 capiheaderdir = $(devincludepath)/dali/public-api/
-capiheader_HEADERS = $(capi_header_file)
+capiheader_HEADERS = $(adaptor_dali_header_file)
index 74a5725..d3d1842 100644 (file)
@@ -36,7 +36,6 @@ PKG_CHECK_MODULES(DALICORE, dali-core)
 PKG_CHECK_MODULES(DLOG, dlog)
 PKG_CHECK_MODULES(ELEMENTARY, elementary)
 PKG_CHECK_MODULES(ECORE, ecore)
-PKG_CHECK_MODULES(ECORE_X, ecore-x)
 PKG_CHECK_MODULES(ECORE_IPC, ecore-ipc)
 PKG_CHECK_MODULES(EXIF, libexif)
 PKG_CHECK_MODULES(FREETYPE, [freetype2 >= $FREETYPE_REQUIRED])
@@ -47,7 +46,6 @@ PKG_CHECK_MODULES(PNG, libpng)
 PKG_CHECK_MODULES(SENSOR, sensor)
 PKG_CHECK_MODULES(TTS, tts)
 PKG_CHECK_MODULES(VCONF, vconf)
-PKG_CHECK_MODULES(X11, x11)
 PKG_CHECK_MODULES(XML, libxml-2.0)
 PKG_CHECK_MODULES(LIBDRM, libdrm)
 PKG_CHECK_MODULES(LIBEXIF, libexif)
@@ -112,26 +110,29 @@ AM_CONDITIONAL(TURBO_JPEG_IS_ON, test $with_jpeg_turbo = yes)
 AC_ARG_ENABLE([profile],
               [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,LITE,WEARABLE,TV],
                             [Select the variant of tizen])],
-              [dali_profile=$enableval],
-              [dali_profile=COMMON])
-
-if test "x$enable_profile" = "xyes"; then
-  dali_profile=COMMON
-fi
-if test "x$enable_profile" = "x"; then
-  dali_profile=COMMON
-fi
-
-DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DDALI_PROFILE_${dali_profile}"
-DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${dali_profile}"
-AM_CONDITIONAL([COMMON_PROFILE], [test x$dali_profile = xCOMMON])
-AM_CONDITIONAL([MOBILE_PROFILE], [test x$dali_profile = xMOBILE])
-AM_CONDITIONAL([LITE_PROFILE], [test x$dali_profile = xLITE])
-AM_CONDITIONAL([WEARABLE_PROFILE], [test x$dali_profile = xWEARABLE])
-AM_CONDITIONAL([TV_PROFILE], [test x$dali_profile = xTV])
+              [enable_profile=$enableval],
+              [enable_profile=COMMON])
+
+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([LITE_PROFILE], [test x$enable_profile = xLITE])
+AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
+AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
+AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
 
 if test "x$enable_profile" = "xCOMMON"; then
+if test "x$enable_wayland" = "xyes"; then
+PKG_CHECK_MODULES(OPENGLES20, glesv2)
+else
 PKG_CHECK_MODULES(OPENGLES20, gles20)
+fi
 PKG_CHECK_MODULES(HAPTIC, haptic)
 fi
 
@@ -158,6 +159,19 @@ PKG_CHECK_MODULES(ASSIMP, assimp)
 PKG_CHECK_MODULES(HAPTIC, haptic)
 fi
 
+if test "x$enable_wayland" = "xyes"; then
+PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
+                  [DALI_HAS_ECOREWL=yes],
+                  [DALI_HAS_ECOREWL=no])
+else
+PKG_CHECK_MODULES(ECORE_X, [ecore-x],
+                  [DALI_HAS_ECOREX=yes],
+                  [DALI_HAS_ECOREX=no])
+PKG_CHECK_MODULES(X11, [x11],
+                  [DALI_HAS_X11=yes],
+                  [DALI_HAS_X11=no])
+fi
+
 if test x$DALI_DATA_RW_DIR != x; then
   dataReadWriteDir=$DALI_DATA_RW_DIR
 else
@@ -235,7 +249,7 @@ Configuration
   Debug Build:                      $enable_debug
   Compile flags                     $DALI_ADAPTOR_CFLAGS
   Using JPEG Turbo Library:         $with_jpeg_turbo
-  Profile:                          $dali_profile
+  Profile:                          $enable_profile
   Data Dir (Read/Write):            $dataReadWriteDir
   Data Dir (Read Only):             $dataReadOnlyDir
   Font Path (Preloaded):            $fontPreloadedPath
index ec1183d..73cfa18 100644 (file)
 
 # Builds the Dali Adaptor + all applications library
 
-tizen_application_internal_src_dir = ../../../adaptors/tizen/internal
-include ../../../adaptors/tizen/internal/application-file.list
-
-tizen_application_public_api_src_dir = ../../../adaptors/tizen/public-api
-include ../../../adaptors/tizen/public-api/adaptor-framework/application-file.list
+# Common
+adaptor_common_dir = ../../../adaptors/common
+include ../../../adaptors/common/file.list
+
+# Public API
+adaptor_public_api_dir = ../../../adaptors/public-api
+include ../../../adaptors/public-api/file.list
+
+if WAYLAND
+adaptor_wayland_dir = ../../../adaptors/wayland
+include ../../../adaptors/wayland/file.list
+else
+adaptor_x11_dir = ../../../adaptors/x11
+include ../../../adaptors/x11/file.list
+endif
 
 if MOBILE_PROFILE
-tizen_evas_plugin_internal_src_dir = ../../../adaptors/tizen/internal/mobile
-tizen_native_buffer_plugin_internal_src_dir = ../../../adaptors/tizen/internal/mobile
-include ../../../adaptors/tizen/internal/mobile/application-file.list
-
-tizen_evas_plugin_public_api_src_dir = ../../../adaptors/tizen/public-api
-tizen_native_buffer_plugin_public_api_src_dir = ../../../adaptors/tizen/public-api
-include ../../../adaptors/tizen/public-api/adaptor-framework/mobile/application-file.list
+tizen_evas_plugin_internal_src_dir = ../../../adaptors/mobile
+tizen_native_buffer_plugin_internal_src_dir = ../../../adaptors/mobile
+tizen_evas_plugin_public_api_src_dir = ../../../adaptors/mobile
+tizen_native_buffer_plugin_public_api_src_dir = ../../../adaptors/mobile
+include ../../../adaptors/mobile/application-file.list
 endif
 
-capi_public_api_src_dir = ../../../capi/dali/public-api
-include ../../../capi/dali/public-api/file.list
-
 lib_LTLIBRARIES = libdali-adaptor.la
 
-libdali_adaptor_la_SOURCES = $(tizen_application_public_api_src_files)
+libdali_adaptor_la_SOURCES = $(adaptor_application_src_files)
 
 if MOBILE_PROFILE
 libdali_adaptor_la_SOURCES += $(tizen_evas_plugin_public_api_src_files) \
                               $(tizen_native_buffer_plugin_public_api_src_files)
 endif
 
-libdali_adaptor_la_SOURCES += $(tizen_application_internal_src_files)
+libdali_adaptor_la_SOURCES += $(adaptor_application_internal_src_files)
+
+if WAYLAND
+libdali_adaptor_la_SOURCES += $(adaptor_wayland_application_src_files)
+else
+libdali_adaptor_la_SOURCES += $(adaptor_x11_application_src_files)
+endif
 
 if MOBILE_PROFILE
 libdali_adaptor_la_SOURCES += $(tizen_evas_plugin_internal_src_files) \
@@ -61,9 +72,17 @@ libdali_adaptor_includes = \
                       -I../../../platform-abstractions/slp \
                       -I../../../platform-abstractions/slp/resource-loader \
                       -I../../../platform-abstractions/portable \
-                      -I../../../adaptors/ \
-                      -I../../../adaptors/tizen \
-                      -I../../../capi
+                      -I../../../adaptors/public-api \
+                      -I../../../adaptors/common \
+                      -I../../../adaptors/ 
+
+if WAYLAND
+libdali_adaptor_includes += \
+                      -I../../../adaptors/wayland
+else
+libdali_adaptor_includes += \
+                      -I../../../adaptors/x11
+endif
 
 daliUserFontCacheDir = ${dataReadWriteDir}/glyphcache/
 daliDefaultThemeDir  = ${dataReadWriteDir}/theme/
@@ -89,6 +108,7 @@ libdali_adaptor_la_CXXFLAGS = \
                       $(PNG_CFLAGS) \
                       $(CAPI_APPFW_APPLICATION_CFLAGS) \
                       $(ELEMENTARY_CFLAGS) \
+                      $(ECORE_IPC_CFLAGS) \
                       $(DLOG_CFLAGS) \
                       $(XML_CFLAGS) \
                       $(VCONF_CFLAGS) \
@@ -118,12 +138,12 @@ install-data-local:
        $(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir}
 
 # Install resource log analyzer script
-bin_SCRIPTS = ../../../adaptors/tizen/scripts/dalireslog.sh
+bin_SCRIPTS = ../../../adaptors/scripts/dalireslog.sh
 
 # Install headers
 
-tizenadaptorpublicapidir = $(devincludepath)/dali/public-api/adaptor-framework
-tizenadaptorpublicapi_HEADERS = $(tizen_application_public_api_header_files)
+tizenadaptorpublicapidir = $(devincludepath)/dali/public-api/
+tizenadaptorpublicapi_HEADERS = $(public_api_application_header_files)
 
 # linking test
 
@@ -132,8 +152,8 @@ noinst_PROGRAMS = linker.test
 linker_test_SOURCES = linker-test.cpp
 
 linker_test_CXXFLAGS = \
-  -I../../../adaptors/tizen \
-  -I../../../capi \
+  -I../../../adaptors/common \
+  -I../../../adaptors/public-api \
   $(DALI_ADAPTOR_CFLAGS) \
   $(DALICORE_CFLAGS) \
   $(DALIX11_CFLAGS) \
index 2e8355e..58c2b0f 100644 (file)
 
 #include <dali/public-api/dali-core.h>
 
-#include "public-api/adaptor-framework/application.h"
+#include "application.h"
 
-#include <dali/public-api/adaptor-framework/common/adaptor.h>
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
-#include <dali/public-api/adaptor-framework/common/orientation.h>
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <adaptor.h>
+#include <render-surface.h>
+#include <orientation.h>
+#include <timer.h>
 
 using namespace Dali;
 
index 425ad8b..70afe23 100644 (file)
 
 # Build the Dali Adaptor + Application library
 
-tizen_application_internal_src_dir = ../../../adaptors/tizen/internal
-include ../../../adaptors/tizen/internal/application-file.list
-
-tizen_application_public_api_src_dir = ../../../adaptors/tizen/public-api
-include ../../../adaptors/tizen/public-api/adaptor-framework/application-file.list
-
-capi_public_api_src_dir = ../../../capi/dali/public-api
-include ../../../capi/dali/public-api/file.list
+# Common
+adaptor_common_dir = ../../../adaptors/common
+include ../../../adaptors/common/file.list
+
+# Public API
+adaptor_public_api_dir = ../../../adaptors/public-api
+include ../../../adaptors/public-api/file.list
+
+if WAYLAND
+adaptor_wayland_dir = ../../../adaptors/wayland
+include ../../../adaptors/wayland/file.list
+else
+adaptor_x11_dir = ../../../adaptors/x11
+include ../../../adaptors/x11/file.list
+endif
 
 lib_LTLIBRARIES = libdali-application.la
 
 libdali_application_la_SOURCES = \
-                     $(tizen_application_public_api_src_files) \
-                     $(tizen_application_internal_src_files)
+                     $(adaptor_application_src_files) \
+                     $(adaptor_application_internal_src_files)
+
+if WAYLAND
+libdali_application_la_SOURCES += $(adaptor_wayland_application_src_files)
+else
+libdali_application_la_SOURCES += $(adaptor_x11_application_src_files)
+endif
 
 libdali_application_la_DEPENDENCIES =
 
@@ -39,9 +52,17 @@ libdali_application_includes = \
                       -I../../../platform-abstractions/slp \
                       -I../../../platform-abstractions/slp/resource-loader \
                       -I../../../platform-abstractions/portable \
-                      -I../../../adaptors/ \
-                      -I../../../adaptors/tizen \
-                      -I../../../capi
+                      -I../../../adaptors/public-api \
+                      -I../../../adaptors/common \
+                      -I../../../adaptors/
+
+if WAYLAND
+libdali_application_includes += \
+                      -I../../../adaptors/wayland
+else
+libdali_application_includes += \
+                      -I../../../adaptors/x11
+endif
 
 daliUserFontCacheDir = ${dataReadWriteDir}/glyphcache/
 daliDefaultThemeDir  = ${dataReadWriteDir}/theme/
@@ -69,6 +90,7 @@ libdali_application_la_CXXFLAGS = \
                       $(ASSIMP_CFLAGS) \
                       $(CAPI_APPFW_APPLICATION_CFLAGS) \
                       $(ELEMENTARY_CFLAGS) \
+                      $(ECORE_IPC_CFLAGS) \
                       $(DLOG_CFLAGS) \
                       $(XML_CFLAGS) \
                       $(VCONF_CFLAGS) \
@@ -82,12 +104,12 @@ install-data-local:
        $(MKDIR_P) ${DESTDIR}/${daliUserFontCacheDir} ${DESTDIR}/${daliUserShaderCacheDir}
 
 # Install resource log analyzer script
-bin_SCRIPTS = ../../../adaptors/tizen/scripts/dalireslog.sh
+bin_SCRIPTS = ../../../adaptors/scripts/dalireslog.sh
 
 # Install headers
 
-tizenadaptorpublicapidir = $(devincludepath)/dali/public-api/adaptor-framework
-tizenadaptorpublicapi_HEADERS = $(tizen_application_public_api_header_files)
+tizenadaptorpublicapidir = $(devincludepath)/dali/public-api/
+tizenadaptorpublicapi_HEADERS = $(public_api_application_header_files)
 
 
 # linking test
@@ -97,8 +119,8 @@ noinst_PROGRAMS = linker.test
 linker_test_SOURCES = linker-test.cpp
 
 linker_test_CXXFLAGS = \
-  -I../../../adaptors/tizen \
-  -I../../../capi \
+  -I../../../adaptors/common \
+  -I../../../adaptors/public-api \
   $(DALI_ADAPTOR_CFLAGS) \
   $(DALICORE_CFLAGS) \
   $(DALIX11_CFLAGS) \
index b23a276..e6bb24b 100644 (file)
 
 #include <dali/public-api/dali-core.h>
 
-#include <public-api/adaptor-framework/application.h>
-#include <dali/public-api/adaptor-framework/common/adaptor.h>
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
-#include <dali/public-api/adaptor-framework/common/orientation.h>
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <application.h>
+#include <adaptor.h>
+#include <render-surface.h>
+#include <orientation.h>
+#include <timer.h>
 
 using namespace Dali;
 
index 5529f6e..4f88c7f 100644 (file)
 
 # Build the Dali Adaptor + Evas Plugin library
 
-tizen_evas_plugin_internal_src_dir = ../../../adaptors/tizen/internal/mobile
-include ../../../adaptors/tizen/internal/mobile/application-file.list
+tizen_evas_plugin_internal_src_dir = ../../../adaptors/mobile
+tizen_evas_plugin_public_api_src_dir = ../../../adaptors/mobile
+include ../../../adaptors/mobile/application-file.list
 
-tizen_evas_plugin_public_api_src_dir = ../../../adaptors/tizen/public-api
-include ../../../adaptors/tizen/public-api/adaptor-framework/mobile/application-file.list
-
-capi_public_api_src_dir = ../../../capi/dali/public-api
-include ../../../capi/dali/public-api/file.list
+# Public API
+adaptor_public_api_dir = ../../../adaptors/public-api
+include ../../../adaptors/public-api/file.list
 
 lib_LTLIBRARIES = libdali-evas-plugin.la
 
@@ -39,9 +38,17 @@ libdali_evas_plugin_includes = \
                       -I../../../platform-abstractions/slp \
                       -I../../../platform-abstractions/slp/resource-loader \
                       -I../../../platform-abstractions/portable \
-                      -I../../../adaptors/ \
-                      -I../../../adaptors/tizen \
-                      -I../../../capi/
+                      -I../../../adaptors/public-api \
+                      -I../../../adaptors/common \
+                      -I../../../adaptors/ 
+
+if WAYLAND
+libdali_evas_plugin_includes += \
+                      -I../../../adaptors/wayland
+else
+libdali_evas_plugin_includes += \
+                      -I../../../adaptors/x11
+endif
 
 daliDefaultFontCacheDir = ${dataReadOnlyDir}/glyphcache/
 daliUserFontCacheDir = ${dataReadWriteDir}/glyphcache/
@@ -84,9 +91,9 @@ libdali_evas_plugin_la_LIBADD = \
                       $(ELEMENTARY_LIBS) \
                       $(EVAS_LIBS)
 
-tizenadaptordaliheaderdir = $(devincludepath)/dali/public-api/adaptor-framework
+tizenadaptordaliheaderdir = $(devincludepath)/dali/public-api/
 tizenadaptordaliheader_HEADERS = $(tizen_evas_plugin_public_api_header_files) \
-                                 $(capi_evas_plugin_public_api_header_files)
+                                 $(evas_plugin_public_api_header_files)
 
 # linking test
 
@@ -95,8 +102,8 @@ noinst_PROGRAMS = linker.test
 linker_test_SOURCES = linker-test.cpp
 
 linker_test_CXXFLAGS = \
-  -I../../../adaptors/tizen \
-  -I../../../capi \
+  -I../../../adaptors/common \
+  -I../../../adaptors/public-api \
   $(DALI_ADAPTOR_CFLAGS) \
   $(DALICORE_CFLAGS) \
   $(DALIX11_CFLAGS) \
index 3fdd8c5..03dde2f 100644 (file)
 
 #include <dali/public-api/dali-core.h>
 
-#include <dali/public-api/adaptor-framework/evas-plugin.h>
-#include <dali/public-api/adaptor-framework/common/adaptor.h>
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
-#include <dali/public-api/adaptor-framework/common/orientation.h>
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <evas-plugin.h>
+#include <adaptor.h>
+#include <render-surface.h>
+#include <orientation.h>
+#include <timer.h>
 
 using namespace Dali;
 
index 55e4c93..dfd2aed 100644 (file)
 
 # Build the Dali Adaptor + Native Buffer Plugin library
 
-tizen_native_buffer_plugin_internal_src_dir = ../../../adaptors/tizen/internal/mobile
-include ../../../adaptors/tizen/internal/mobile/application-file.list
+tizen_native_buffer_plugin_internal_src_dir = ../../../adaptors/mobile
+tizen_native_buffer_plugin_public_api_src_dir = ../../../adaptors/mobile
+include ../../../adaptors/mobile/application-file.list
 
-tizen_native_buffer_plugin_public_api_src_dir = ../../../adaptors/tizen/public-api
-include ../../../adaptors/tizen/public-api/adaptor-framework/mobile/application-file.list
-
-capi_public_api_src_dir = ../../../capi/dali/public-api
-include ../../../capi/dali/public-api/file.list
+# Public API
+adaptor_public_api_dir = ../../../adaptors/public-api
+include ../../../adaptors/public-api/file.list
 
 lib_LTLIBRARIES = libdali-native-buffer-plugin.la
 
@@ -39,9 +38,17 @@ libdali_native_buffer_plugin_includes = \
                       -I../../../platform-abstractions/slp \
                       -I../../../platform-abstractions/slp/resource-loader \
                       -I../../../platform-abstractions/portable \
-                      -I../../../adaptors/ \
-                      -I../../../adaptors/tizen \
-                      -I../../../capi
+                      -I../../../adaptors/public-api \
+                      -I../../../adaptors/common \
+                      -I../../../adaptors/ 
+
+if WAYLAND
+libdali_native_buffer_plugin_includes += \
+                      -I../../../adaptors/wayland
+else
+libdali_native_buffer_plugin_includes += \
+                      -I../../../adaptors/x11
+endif
 
 daliDefaultFontCacheDir = ${dataReadOnlyDir}/glyphcache/
 daliUserFontCacheDir = ${dataReadWriteDir}/glyphcache/
@@ -88,7 +95,7 @@ libdali_native_buffer_plugin_la_LIBADD = \
 
 tizenadaptordaliheaderdir = $(devincludepath)/dali/public-api/adaptor-framework
 tizenadaptordaliheader_HEADERS = $(tizen_native_buffer_plugin_public_api_header_files) \
-                                 $(capi_native_buffer_plugin_public_api_header_files)
+                                 $(native_buffer_plugin_public_api_header_files)
 
 # linking test
 
@@ -97,8 +104,8 @@ noinst_PROGRAMS = linker.test
 linker_test_SOURCES = linker-test.cpp
 
 linker_test_CXXFLAGS = \
-  -I../../../adaptors/tizen \
-  -I../../../capi \
+  -I../../../adaptors/common \
+  -I../../../adaptors/public-api \
   $(DALI_ADAPTOR_CFLAGS) \
   $(DALICORE_CFLAGS) \
   $(DALIX11_CFLAGS) \
index d0fc353..3533494 100644 (file)
 
 #include <dali/public-api/dali-core.h>
 
-#include <dali/public-api/adaptor-framework/native-buffer-plugin.h>
-#include <dali/public-api/adaptor-framework/common/adaptor.h>
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
-#include <dali/public-api/adaptor-framework/common/orientation.h>
-#include <dali/public-api/adaptor-framework/common/timer.h>
+#include <native-buffer-plugin.h>
+#include <adaptor.h>
+#include <render-surface.h>
+#include <orientation.h>
+#include <timer.h>
 
 using namespace Dali;
 
index 44746e1..e3e9c83 100644 (file)
@@ -45,7 +45,7 @@ libdali_feedback_plugin_la_CXXFLAGS = -DDALI_COMPILATION \
                       $(MMFSOUND_CFLAGS) \
                       $(FEEDBACK_CFLAGS) \
                       $(DALI_PROFILE_CFLAGS) \
-                      -I../../../adaptors/tizen \
+                      -I../../../adaptors/public-api \
                       -Werror -Wall
 
 libdali_feedback_plugin_la_LIBADD = \
diff --git a/capi/dali/public-api/dali-adaptor-capi-internal.h b/capi/dali/public-api/dali-adaptor-capi-internal.h
deleted file mode 100644 (file)
index b5ad61e..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef __DALI_ADAPTOR_CAPI_INTERNAL_H__
-#define __DALI_ADAPTOR_CAPI_INTERNAL_H__
-
-/*
- * 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.
- *
- */
-
-// These defines come from running pkg-config --cflags with the correct package config file
-
-#if defined(DALI_EVAS_PLUGIN)
-#include <dali/public-api/adaptor-framework/evas-plugin.h>
-#endif
-
-#if defined(DALI_NATIVE_BUFFER_PLUGIN)
-#include <dali/public-api/adaptor-framework/native-buffer-plugin.h>
-#endif
-
-#include <dali/public-api/adaptor-framework/common/accessibility-manager.h>
-#include <dali/public-api/adaptor-framework/common/adaptor.h>
-#include <dali/public-api/adaptor-framework/common/clipboard.h>
-#include <dali/public-api/adaptor-framework/common/clipboard-event-notifier.h>
-#include <dali/public-api/adaptor-framework/common/device-layout.h>
-#include <dali/public-api/adaptor-framework/common/drag-and-drop-detector.h>
-#include <dali/public-api/adaptor-framework/common/haptic-player.h>
-#include <dali/public-api/adaptor-framework/common/imf-manager.h>
-#include <dali/public-api/adaptor-framework/common/key.h>
-#include <dali/public-api/adaptor-framework/common/orientation.h>
-#include <dali/public-api/adaptor-framework/common/pixmap-image.h>
-#include <dali/public-api/adaptor-framework/common/render-surface.h>
-#include <dali/public-api/adaptor-framework/common/sound-player.h>
-#include <dali/public-api/adaptor-framework/common/style-change.h>
-#include <dali/public-api/adaptor-framework/common/style-monitor.h>
-#include <dali/public-api/adaptor-framework/common/timer.h>
-#include <dali/public-api/adaptor-framework/common/tts-player.h>
-#include <dali/public-api/adaptor-framework/common/virtual-keyboard.h>
-#include <dali/public-api/adaptor-framework/common/window.h>
-
-#endif //__DALI_ADAPTOR_CAPI_INTERNAL_H__
diff --git a/capi/dali/public-api/file.list b/capi/dali/public-api/file.list
deleted file mode 100644 (file)
index 833ec58..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-capi_evas_plugin_public_api_header_files = \
-  $(capi_public_api_src_dir)/adaptor-framework/evas-plugin.h
-
-capi_native_buffer_plugin_public_api_header_files = \
-  $(capi_public_api_src_dir)/adaptor-framework/native-buffer-plugin.h
-
-capi_adaptor_framework_common_header_files = \
-  $(capi_src_dir)/adaptor-framework/common/accessibility-manager.h \
-  $(capi_src_dir)/adaptor-framework/common/adaptor.h \
-  $(capi_src_dir)/adaptor-framework/common/clipboard-event-notifier.h \
-  $(capi_src_dir)/adaptor-framework/common/clipboard.h \
-  $(capi_src_dir)/adaptor-framework/common/device-layout.h \
-  $(capi_src_dir)/adaptor-framework/common/drag-and-drop-detector.h \
-  $(capi_src_dir)/adaptor-framework/common/haptic-player.h \
-  $(capi_src_dir)/adaptor-framework/common/imf-manager.h \
-  $(capi_src_dir)/adaptor-framework/common/key.h \
-  $(capi_src_dir)/adaptor-framework/common/orientation.h \
-  $(capi_src_dir)/adaptor-framework/common/pixmap-image.h \
-  $(capi_src_dir)/adaptor-framework/common/render-surface.h \
-  $(capi_src_dir)/adaptor-framework/common/sound-player.h \
-  $(capi_src_dir)/adaptor-framework/common/style-change.h \
-  $(capi_src_dir)/adaptor-framework/common/style-monitor.h \
-  $(capi_src_dir)/adaptor-framework/common/timer.h \
-  $(capi_src_dir)/adaptor-framework/common/tts-player.h \
-  $(capi_src_dir)/adaptor-framework/common/virtual-keyboard.h \
-  $(capi_src_dir)/adaptor-framework/common/window.h
-
-capi_header_file = \
-  $(capi_src_dir)/dali-adaptor-capi-internal.h
index 4acf930..97e8c31 100644 (file)
@@ -1,9 +1,5 @@
 <manifest>
-       <assign>
-               <filesystem path="/usr/lib/*" label="_" />
-               <filesystem path="/opt/usr/share/dali/glyphcache" label="dali" type="transmutable" />
-       </assign>
        <request>
-               <domain name="dali"/>
+               <domain name="_"/>
        </request>
 </manifest>
index 1e95fe5..47753ce 100644 (file)
@@ -1,3 +1,5 @@
+%bcond_with wayland
+
 Name:       dali-adaptor
 Summary:    The DALi Tizen Adaptor
 Version:    1.0.0
@@ -17,15 +19,11 @@ BuildRequires:  pkgconfig(sensor)
 BuildRequires:  pkgconfig(aul)
 BuildRequires:  boost-devel
 BuildRequires:  giflib-devel
-BuildRequires:  pkgconfig(xi)
 BuildRequires:  pkgconfig(fontconfig)
 BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  libjpeg-turbo-devel
 BuildRequires:  pkgconfig(evas)
-BuildRequires:  pkgconfig(xfixes)
-BuildRequires:  pkgconfig(xdamage)
-BuildRequires:  pkgconfig(utilX)
 BuildRequires:  dali-devel
 BuildRequires:  dali-integration-devel
 BuildRequires:  libxml2-devel
@@ -35,9 +33,21 @@ BuildRequires:  pkgconfig(dlog)
 BuildRequires:  libdrm-devel
 BuildRequires:  pkgconfig(libexif)
 BuildRequires:  pkgconfig(capi-system-system-settings)
-BuildRequires:  pkgconfig(gles20)
 BuildRequires:  pkgconfig(efl-assist)
 BuildRequires:  pkgconfig(libpng)
+%if %{with wayland}
+BuildRequires:  pkgconfig(glesv2)
+BuildRequires:  pkgconfig(egl)
+BuildRequires:  pkgconfig(ecore-wayland)
+BuildRequires:  pkgconfig(wayland-egl)
+BuildRequires:  pkgconfig(wayland-client)
+%else
+BuildRequires:  pkgconfig(xi)
+BuildRequires:  pkgconfig(xfixes)
+BuildRequires:  pkgconfig(xdamage)
+BuildRequires:  pkgconfig(utilX)
+BuildRequires:  pkgconfig(gles20)
+%endif
 
 %description
 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
@@ -115,10 +125,18 @@ export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
 %endif
 
+%if %{with wayland}
+CFLAGS+=" -DWAYLAND"
+CXXFLAGS+=" -DWAYLAND"
+%endif
+
 libtoolize --force
 cd %{_builddir}/%{name}-%{version}/build/tizen && autoreconf --install
+%if %{with wayland}
+cd %{_builddir}/%{name}-%{version}/build/tizen && CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}" FONT_PRELOADED_PATH="%{font_preloaded_path}" FONT_DOWNLOADED_PATH="%{font_downloaded_path}" FONT_APPLICATION_PATH="%{font_application_path}" FONT_CONFIGURATION_FILE="%{font_configuration_file}" ./configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-profile=COMMON --enable-wayland
+%else
 cd %{_builddir}/%{name}-%{version}/build/tizen && CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}" FONT_PRELOADED_PATH="%{font_preloaded_path}" FONT_DOWNLOADED_PATH="%{font_downloaded_path}" FONT_APPLICATION_PATH="%{font_application_path}" FONT_CONFIGURATION_FILE="%{font_configuration_file}" ./configure --prefix=$PREFIX --with-jpeg-turbo --enable-gles=20 --enable-profile=COMMON
-
+%endif
 
 make %{?jobs:-j%jobs}
 
index e02297e..c9967ec 100644 (file)
@@ -26,7 +26,7 @@
 #endif
 
 // INTERNAL INCLUDES
-#include <public-api/adaptor-framework/common/feedback-plugin.h>
+#include <feedback-plugin.h>
 
 namespace Dali
 {