[3.0] Modify iconify part for wayland
[platform/core/uifw/dali-adaptor.git] / adaptors / common / framework.h
index 3704431..4dacf5f 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_FRAMEWORK_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // EXTERNAL INCLUDES
 #include <string>
 #include <dali/public-api/signals/callback.h>
+#ifdef APPCORE_WATCH_AVAILABLE
+#include "wearable/watch/watch-application.h"
+#endif
 
 // INTERNAL INCLUDES
-#include "abort-handler.h"
+#include <abort-handler.h>
 
 namespace Dali
 {
@@ -42,6 +45,11 @@ namespace Adaptor
 class Framework
 {
 public:
+  enum Type
+  {
+    NORMAL,       ///<  normal appFramework
+    WATCH     ///< watch appFramework
+  };
 
   /**
    * Observer class for the framework.
@@ -81,6 +89,23 @@ public:
     */
     virtual void OnAppControl(void *) {}
 
+#ifdef APPCORE_WATCH_AVAILABLE
+    /**
+     * Invoked at every second
+     */
+    virtual void OnTimeTick(WatchTime&) {}
+
+    /**
+     * Invoked at every second in ambient mode
+     */
+    virtual void OnAmbientTick(WatchTime&) {}
+
+    /**
+     * Invoked when the device enters or exits ambient mode
+     */
+    virtual void OnAmbientChanged(bool ambient) {}
+#endif
+
     /**
      * Invoked when the language of the device is changed.
      */
@@ -109,8 +134,9 @@ public:
    * @param[in]  observer  The observer of the Framework.
    * @param[in]  argc      A pointer to the number of arguments.
    * @param[in]  argv      A pointer the the argument list.
+   * @param[in]  type      The type of application
    */
-  Framework( Observer& observer, int* argc, char ***argv );
+  Framework( Observer& observer, int* argc, char ***argv, Type type = NORMAL );
 
   /**
    * Destructor
@@ -160,6 +186,12 @@ private:
   Framework& operator=(Framework&);
 
 private:
+
+  /**
+   * Called when the application is created.
+   */
+  bool Create();
+
   /**
    * Called by the App framework when an application lifecycle event occurs.
    * @param[in] type The type of event occurred.
@@ -201,7 +233,6 @@ private: // impl members
 
   struct Impl;
   Impl* mImpl;
-
 };
 
 } // namespace Adaptor