TizenRefApp-8424 [Gallery] Implement ProcessingPresenter 84/126684/1
authorIgor Nazarov <i.nazarov@samsung.com>
Mon, 24 Apr 2017 18:18:38 +0000 (21:18 +0300)
committerIgor Nazarov <i.nazarov@samsung.com>
Mon, 24 Apr 2017 18:18:38 +0000 (21:18 +0300)
- Implemented ProcessingPresenter class;
- Added PageContent::Part::OVERLAY part;
- UCL "common.h" include refactoring (minimizing of "..").

Change-Id: I634e874c22a451aa00abacf1d560dc6795a46bd8

20 files changed:
edc/images/check_18.png [new file with mode: 0644]
edc/layouts.edc
inc/presenters/ProcessingPresenter.h [new file with mode: 0644]
inc/presenters/types.h
inc/view/PageContent.h
res/edje/theme.edc
src/presenters/ProcessingPresenter.cpp [new file with mode: 0644]
src/view/PageContent.cpp
ucl/src/appfw/InstanceManagerBase.cpp
ucl/src/appfw/SysEventProvider.cpp
ucl/src/appfw/UIApp.cpp
ucl/src/appfw/common.h [new file with mode: 0644]
ucl/src/appfw/helpers.cpp
ucl/src/gui/Layout.cpp
ucl/src/gui/Naviframe.cpp
ucl/src/gui/Widget.cpp
ucl/src/gui/Window.cpp
ucl/src/gui/common.h [new file with mode: 0644]
ucl/src/misc/Variant.cpp
ucl/src/misc/common.h [new file with mode: 0644]

diff --git a/edc/images/check_18.png b/edc/images/check_18.png
new file mode 100644 (file)
index 0000000..0f149f4
Binary files /dev/null and b/edc/images/check_18.png differ
index 2502b07b5b6ba81a18d72d6f3606e92f0b1389fe..b574fba18967529bd5dd85f847e9a46a46c7e92d 100644 (file)
@@ -24,5 +24,158 @@ group { "elm/layout/gallery/more_options";
          desc { "default";
          }
       }
+      swallow { "gallery.swallow.overlay";
+         desc { "default";
+         }
+      }
+   }
+}
+
+group { "elm/layout/gallery/proccessing";
+   parts {
+      rect { "bg";
+         norepeat;
+         desc { "default";
+            color: 0 0 0 0;
+         }
+         desc { "visible";
+            color: 0 0 0 255;
+         }
+      }
+      swallow { "gallery.swallow.progress";
+         desc { "default";
+            hid;
+         }
+         desc { "visible";
+            inherit: "default";
+            vis;
+         }
+      }
+      textblock { name: "elm.text";
+         scale: 1;
+         desc { "default";
+            hid;
+            text.style: "popup_graphic_toast_style";
+            text.min: 0 1;
+            text.max: 0 1;
+         }
+         desc { "visible";
+            inherit: "default";
+            vis;
+         }
+      }
+   }
+   programs {
+      program { "gallery,show";
+         signal: "gallery,show";
+         source: "";
+         action: STATE_SET "visible";
+         target: "bg";
+         target: "gallery.swallow.progress";
+         target: "elm.text";
+      }
+      program { "gallery,hide";
+         signal: "gallery,hide";
+         source: "";
+         action: STATE_SET "default";
+         target: "bg";
+         target: "gallery.swallow.progress";
+         target: "elm.text";
+      }
+      program { "gallery,hide,progress";
+         signal: "gallery,hide,progress";
+         source: "";
+         action: STATE_SET "default";
+         target: "gallery.swallow.progress";
+         target: "elm.text";
+      }
+   }
+}
+
+group { "elm/layout/gallery/popup_icon";
+   images.image: "check_18.png" COMP;
+   parts {
+      image { "check";
+         scale;
+         desc { "default";
+            hid;
+            image.normal: "check_18.png";
+            aspect: 1 1;
+            aspect_preference: BOTH;
+         }
+         desc { "visible";
+            inherit: "default";
+            vis;
+            min: 82 82;
+            max: 82 82;
+         }
+         desc { "clipped";
+            inherit: "visible";
+            clip_to: "check_mask";
+         }
+      }
+      spacer { "check_left_pad";
+         scale;
+         desc { "default";
+            align: 0.0 0.5;
+            fixed: 1 1;
+            min: 8 0;
+            rel1.to: "check";
+            rel2.to: "check";
+            rel1.relative: 0.0 0.0;
+            rel2.relative: 0.0 1.0;
+         }
+      }
+      spacer { "check_right_pad";
+         scale;
+         desc { "default";
+            align: 1.0 0.5;
+            fixed: 1 1;
+            min: 6 0;
+            rel1.to: "check";
+            rel2.to: "check";
+            rel1.relative: 1.0 0.0;
+            rel2.relative: 1.0 1.0;
+         }
+      }
+      rect { "check_mask";
+         desc { "default";
+            hid;
+            fixed: 1 1;
+         }
+         desc { "anim_state_0";
+            vis;
+            rel1.to: "check_left_pad";
+            rel2.to: "check_left_pad";
+            rel1.relative: 1.0 0.0;
+            rel2.relative: 1.0 1.0;
+         }
+         desc { "anim_state_1";
+            inherit: "anim_state_0";
+            rel2.to: "check_right_pad";
+            rel2.relative: 0.0 1.0;
+         }
+      }
+   }
+   programs {
+      program { "gallery,animate,check";
+         signal: "gallery,animate,check";
+         source: "";
+         sequence {
+            action: STATE_SET "clipped";
+            target: "check";
+            action: STATE_SET "anim_state_0";
+            target: "check_mask";
+
+            action: STATE_SET "anim_state_1";
+            target: "check_mask";
+            transition: CUBIC_BEZIER 0.3 0.46 0.03 0.52 0.95;
+
+            action: STATE_SET "default";
+            target: "check_mask";
+            action: STATE_SET "visible";
+            target: "check";
+         }
+      }
    }
 }
diff --git a/inc/presenters/ProcessingPresenter.h b/inc/presenters/ProcessingPresenter.h
new file mode 100644 (file)
index 0000000..27e9f81
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#ifndef __GALLERY_PRESENTERS_PROCESSING_PRESENTER_H__
+#define __GALLERY_PRESENTERS_PROCESSING_PRESENTER_H__
+
+#include "ucl/gui/Layout.h"
+#include "ucl/gui/StyledWidget.h"
+
+#include "types.h"
+
+namespace gallery {
+
+       class ProcessingPresenter final : public ucl::RefCountAware {
+       public:
+               enum class IconType {
+                       NONE,
+                       CHECK
+               };
+
+               class Builder {
+               public:
+                       Builder();
+                       Builder &setProcessingText(ucl::TString text);
+                       Builder &setCompleteText(ucl::TString text);
+                       Builder &setIconType(IconType value);
+                       ProcessingPresenterSRef build(ucl::Widget &parent) const;
+               private:
+                       ucl::TString m_processingText;
+                       ucl::TString m_completeText;
+                       IconType m_iconType;
+               };
+
+               using DismissHandler = ucl::WeakDelegate<void()>;
+
+       public:
+               ucl::Widget &getWidget();
+
+               void complete(const DismissHandler &dismissHandler);
+
+       private:
+               friend class ucl::RefCountObj<ProcessingPresenter>;
+               ProcessingPresenter(ucl::RefCountObjBase &rc, IconType iconType);
+               virtual ~ProcessingPresenter();
+
+               ucl::Result prepare(ucl::Widget &parent,
+                               const ucl::TString &processingText,
+                               const ucl::TString &completeText);
+
+               ucl::Result createWidget(ucl::Widget &parent,
+                               const ucl::TString &processingText);
+               ucl::Result createProgress();
+               ucl::Result createPopup(const ucl::TString &completeText);
+               ucl::Result createIcon();
+
+               bool resetTimer(double timeout);
+               void stopTimer();
+
+               void tryShowPopup();
+               void dismissPopup(bool force = false);
+
+               void animateIcon();
+
+               Eina_Bool onTimer();
+
+               void onPopupDismissed(ucl::Widget &widget, void *eventInfo);
+               void onPopupHWBackKey(Evas_Object *obj, void *eventInfo);
+
+       private:
+               enum class State {
+                       WAITING,
+                       PROCESSING,
+                       POPUP_ANIMATION,
+                       COMPLETE
+               };
+
+       private:
+               const IconType m_iconType;
+               ucl::LayoutSRef m_widget;
+               ucl::StyledWidgetWRef m_popup;
+               ucl::LayoutWRef m_icon;
+               DismissHandler m_dismissHandler;
+               Ecore_Timer *m_timer;
+               State m_state;
+               bool m_mayComplete;
+               bool m_isComplete;
+       };
+}
+
+#endif // __GALLERY_PRESENTERS_PROCESSING_PRESENTER_H__
index 726bb13a591938d1042d849cffb96c6f20b2166e..9b79a455038fa91438c0beb50082e93dac6688b5 100644 (file)
@@ -40,6 +40,8 @@ namespace gallery {
        UCL_DECLARE_REF_ALIASES(ISelectModeListener);
        UCL_DECLARE_REF_ALIASES(SelectModePresenter);
 
+       UCL_DECLARE_REF_ALIASES(ProcessingPresenter);
+
        UCL_DECLARE_REF_ALIASES(AlertDialog);
 
        UCL_DECLARE_REF_ALIASES(Page);
index f2a860c1b118c1ff6f58ae6bc9b04cab12c4338a..371299e14a366a6a2ca9f696b34cc58e6c1b1080 100644 (file)
@@ -45,6 +45,7 @@ namespace gallery {
 
                enum class Part {
                        DEFAULT,
+                       OVERLAY,
                        MORE_OPTIONS,
                        SELECT_BUTTON,
                        BOTTOM_BUTTON
index 9b86c7b675e8a7a5af76751df3759859e05d4a40..ca6ae8a98a79eaba65bd52af33d52439bb06e4bc 100644 (file)
@@ -25,6 +25,12 @@ collections {
       }
    }
 
+   styles {
+      style { name: "popup_graphic_toast_style";
+         base: "font=Tizen:weight=Normal:width=Condensed font_size=32 color=#fafafaff linesize=42 wrap=mixed align=center ellipsis=1.0 text_class=tizen";
+      }
+   }
+
    #include "../../edc/colors.h"
    #include "../../edc/images.edc"
    #include "../../edc/image-grid.edc"
diff --git a/src/presenters/ProcessingPresenter.cpp b/src/presenters/ProcessingPresenter.cpp
new file mode 100644 (file)
index 0000000..85f1e4a
--- /dev/null
@@ -0,0 +1,326 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * 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 "presenters/ProcessingPresenter.h"
+
+#include "common.h"
+
+namespace gallery { namespace { namespace impl {
+
+       using namespace ucl;
+
+       constexpr auto IDLE_WAIT_TIME_SEC = 0.2;
+       constexpr auto PROCESSING_MIN_TIME_SEC = 1.0;
+
+       constexpr auto POPUP_SHOW_TIME_SEC = 0.3;
+       constexpr auto POPUP_DURATION_SEC = 2.0;
+       constexpr auto POPUP_TIMEOUT_SEC =
+                       (POPUP_DURATION_SEC - POPUP_SHOW_TIME_SEC);
+
+       constexpr LayoutTheme LAYOUT_PROCESSING_WIDGET
+                       {"layout", "gallery", "proccessing"};
+
+       constexpr EdjeSignal SIGNAL_SHOW {"gallery,show"};
+       constexpr EdjeSignal SIGNAL_HIDE {"gallery,hide"};
+       constexpr EdjeSignal SIGNAL_HIDE_PROGRESS {"gallery,hide,progress"};
+
+       constexpr LayoutTheme LAYOUT_POPUP_ICON
+                       {"layout", "gallery", "popup_icon"};
+
+       constexpr EdjeSignal SIGNAL_ANIMATE_CHECK {"gallery,animate,check"};
+
+       constexpr ElmStyle POPUP_STYLE {"toast/circle"};
+       constexpr EdjePart PART_TOAST_ICON {"toast,icon"};
+}}}
+
+namespace gallery {
+
+       using namespace ucl;
+
+       // ProcessingPresenter::Builder //
+
+       ProcessingPresenter::Builder::Builder() :
+               m_iconType(IconType::NONE)
+       {
+       }
+
+       ProcessingPresenter::Builder &ProcessingPresenter::Builder::
+                       setProcessingText(TString text)
+       {
+               m_processingText = std::move(text);
+               return *this;
+       }
+
+       ProcessingPresenter::Builder &ProcessingPresenter::Builder::
+                       setCompleteText(TString text)
+       {
+               m_completeText = std::move(text);
+               return *this;
+       }
+
+       ProcessingPresenter::Builder &ProcessingPresenter::Builder::
+                       setIconType(const IconType value)
+       {
+               m_iconType = value;
+               return *this;
+       }
+
+       ProcessingPresenterSRef ProcessingPresenter::Builder::
+                       build(Widget &parent) const
+       {
+               auto result = makeShared<ProcessingPresenter>(m_iconType);
+
+               FAIL_RETURN_VALUE(result->prepare(parent,
+                               m_processingText, m_completeText), {},
+                               "result->prepare() failed!");
+
+               return result;
+       }
+
+       // ProcessingPresenter //
+
+       ProcessingPresenter::ProcessingPresenter(RefCountObjBase &rc,
+                       const IconType iconType) :
+               RefCountAware(&rc),
+               m_iconType(iconType),
+               m_timer(nullptr),
+               m_state(State::WAITING),
+               m_mayComplete(true),
+               m_isComplete(false)
+       {
+       }
+
+       ProcessingPresenter::~ProcessingPresenter()
+       {
+               stopTimer();
+               dismissPopup(true);
+       }
+
+       Result ProcessingPresenter::prepare(Widget &parent,
+                       const TString &processingText,
+                       const TString &completeText)
+       {
+               FAIL_RETURN(createWidget(parent, processingText),
+                               "createWidget() failed!");
+
+               FAIL_RETURN(createProgress(), "createProgress() failed!");
+
+               FAIL_RETURN(createPopup(completeText), "createPopup() failed!");
+
+               if (m_iconType != IconType::NONE) {
+                       FAIL_RETURN(createIcon(), "createIcon() failed!");
+               }
+
+               if (!resetTimer(impl::IDLE_WAIT_TIME_SEC)) {
+                       LOG_RETURN(RES_FAIL, "resetTimer() failed!");
+               }
+
+               return RES_OK;
+       }
+
+       Result ProcessingPresenter::createWidget(Widget &parent,
+                       const TString &processingText)
+       {
+               m_widget = Layout::Builder().
+                               setTheme(impl::LAYOUT_PROCESSING_WIDGET).
+                               setIsOwner(true).
+                               build(parent);
+               if (!m_widget) {
+                       LOG_RETURN(RES_FAIL, "Layout::build() failed!");
+               }
+
+               m_widget->setText(processingText);
+
+               return RES_OK;
+       }
+
+       Result ProcessingPresenter::createProgress()
+       {
+               Evas_Object *const progressEo = elm_progressbar_add(*m_widget);
+               if (!progressEo) {
+                       LOG_RETURN(RES_FAIL, "elm_progressbar_add() failed!");
+               }
+
+               StyledWidget progress{progressEo};
+               progress.setStyle(ElmStyle("process"));
+               m_widget->setContent(progress, EdjePart("gallery.swallow.progress"));
+               elm_progressbar_pulse(progress, EINA_TRUE);
+               show(progress);
+
+               return RES_OK;
+       }
+
+       Result ProcessingPresenter::createPopup(const TString &completeText)
+       {
+               Evas_Object *const popupEo = elm_popup_add(*m_widget);
+               if (!popupEo) {
+                       LOG_RETURN(RES_FAIL, "elm_popup_add() failed!");
+               }
+
+               m_popup = makeShared<StyledWidget>(popupEo);
+               m_popup->setStyle(impl::POPUP_STYLE);
+               m_popup->setText(completeText, PART_TEXT);
+
+               m_popup->addEventHandler(POPUP_DISMISSED, WEAK_DELEGATE(
+                               ProcessingPresenter::onPopupDismissed, asWeak(*this)));
+
+               eext_object_event_callback_add(*m_popup, EEXT_CALLBACK_BACK,
+                               CALLBACK_A(ProcessingPresenter::onPopupHWBackKey), this);
+
+               return RES_OK;
+       }
+
+       Result ProcessingPresenter::createIcon()
+       {
+               m_icon = Layout::Builder().
+                               setTheme(impl::LAYOUT_POPUP_ICON).
+                               build(*m_popup);
+               if (!m_icon) {
+                       LOG_RETURN(RES_FAIL, "Layout::build() failed!");
+               }
+
+               m_popup->setContent(*m_icon, impl::PART_TOAST_ICON);
+
+               return RES_OK;
+       }
+
+       bool ProcessingPresenter::resetTimer(const double timeout)
+       {
+               stopTimer();
+
+               m_timer = ecore_timer_add(timeout, CALLBACK_A(
+                               ProcessingPresenter::onTimer), this);
+               if (!m_timer) {
+                       LOG_RETURN_VALUE(RES_FAIL, false, "ecore_timer_add() failed!");
+               }
+
+               return true;
+       }
+
+       void ProcessingPresenter::stopTimer()
+       {
+               if (m_timer) {
+                       ecore_timer_del(m_timer);
+                       m_timer = nullptr;
+               }
+       }
+
+       void ProcessingPresenter::tryShowPopup()
+       {
+               if (m_isComplete && m_mayComplete && m_popup) {
+                       m_widget->emit(impl::SIGNAL_HIDE_PROGRESS);
+
+                       show(*m_popup);
+
+                       m_state = State::POPUP_ANIMATION;
+                       resetTimer(impl::POPUP_SHOW_TIME_SEC);
+               }
+       }
+
+       void ProcessingPresenter::dismissPopup(const bool force)
+       {
+               if (m_popup) {
+                       eext_object_event_callback_del(*m_popup, EEXT_CALLBACK_BACK,
+                                       CALLBACK_A(ProcessingPresenter::onPopupHWBackKey));
+                       if (force) {
+                               m_popup->markForDeletion();
+                       } else {
+                               elm_popup_dismiss(*m_popup);
+                       }
+                       m_popup.reset();
+               }
+       }
+
+       void ProcessingPresenter::animateIcon()
+       {
+               if (m_icon) {
+                       if (m_iconType == IconType::CHECK) {
+                               m_icon->emit(impl::SIGNAL_ANIMATE_CHECK);
+                       }
+               }
+       }
+
+       Eina_Bool ProcessingPresenter::onTimer()
+       {
+               m_timer = nullptr;
+
+               switch (m_state) {
+               case State::WAITING:
+                       m_widget->emit(impl::SIGNAL_SHOW);
+                       m_state = State::PROCESSING;
+                       m_mayComplete = false;
+                       resetTimer(impl::PROCESSING_MIN_TIME_SEC);
+                       break;
+
+               case State::PROCESSING:
+                       m_mayComplete = true;
+                       tryShowPopup();
+                       break;
+
+               case State::POPUP_ANIMATION:
+                       animateIcon();
+                       m_widget->emit(impl::SIGNAL_HIDE);
+                       m_state = State::COMPLETE;
+                       resetTimer(impl::POPUP_TIMEOUT_SEC);
+                       break;
+
+               case State::COMPLETE:
+                       dismissPopup();
+                       break;
+               }
+
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       void ProcessingPresenter::onPopupDismissed(Widget &widget, void *eventInfo)
+       {
+               widget.markForDeletion();
+
+               if (m_dismissHandler) {
+                       m_dismissHandler();
+               }
+       }
+
+       void ProcessingPresenter::onPopupHWBackKey(
+                       Evas_Object *obj, void *eventInfo)
+       {
+               if (m_popup) {
+                       m_widget->emit(impl::SIGNAL_HIDE);
+                       stopTimer();
+                       dismissPopup();
+               }
+       }
+
+       Widget &ProcessingPresenter::getWidget()
+       {
+               return *m_widget;
+       }
+
+       void ProcessingPresenter::complete(const DismissHandler &dismissHandler)
+       {
+               if (!dismissHandler) {
+                       LOG_RETURN_VOID(RES_INVALID_ARGUMENTS, "dismissHandler is NULL");
+               }
+               if (m_isComplete) {
+                       LOG_RETURN_VOID(RES_ILLEGAL_STATE, "Already in complete state!");
+               }
+
+               m_dismissHandler = dismissHandler;
+               m_isComplete = true;
+
+               tryShowPopup();
+       }
+}
index 2fe5c97be805f1801992d2d0181581d406293acb..cf6ea5c9c29ac6f1f631676eafa833b2bb145a37 100644 (file)
@@ -32,6 +32,7 @@ namespace gallery { namespace { namespace impl {
                        {"layout", "bottom_button", "default"};
 
        constexpr EdjePart PART_MORE_OPTIONS {"gallery.swallow.more_options"};
+       constexpr EdjePart PART_OVERLAY {"gallery.swallow.overlay"};
 
        constexpr EdjeSignal SIGNAL_SHOW_SELECT_BUTTON {"select_mode,button,show"};
        constexpr EdjeSignal SIGNAL_HIDE_SELECT_BUTTON {"select_mode,button,hide"};
@@ -185,6 +186,9 @@ namespace gallery {
                switch (part) {
                case Part::DEFAULT:
                        return impl::callSafe(getTopLayout(), func, PART_CONTENT);
+               case Part::OVERLAY:
+                       return impl::callSafe(m_moreOptions.get(), func,
+                                       impl::PART_OVERLAY);
                case Part::MORE_OPTIONS:
                        return impl::callSafe(m_moreOptions.get(), func,
                                        impl::PART_MORE_OPTIONS);
index a643b380ac30bb5f1ef9b71a3b4ea5ca14cbde9c..2e90b24c29970bece2aeae6f497d73de5e316403 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "ucl/appfw/InstanceManagerBase.h"
 
-#include "../common.h"
+#include "common.h"
 
 namespace ucl {
 
index 3b8994e499f76f0b55744853b7de70ecc956617c..20ae94c6a4502abd19f1e75fb299e5050183e883 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "ucl/appfw/SysEventProvider.h"
 
-#include "../common.h"
+#include "common.h"
 
 namespace ucl {
 
index 49c5e67bec76036b0a3dc77ffe571f7253130eea..4012ecac3be2ceee8ee60ddbe705816a31d59abf 100644 (file)
@@ -19,7 +19,7 @@
 #include <app.h>
 
 #include "ucl/appfw/IInstanceAppControlExt.h"
-#include "../common.h"
+#include "common.h"
 
 namespace ucl {
 
diff --git a/ucl/src/appfw/common.h b/ucl/src/appfw/common.h
new file mode 100644 (file)
index 0000000..b612dfb
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#ifndef __UCL_APPFW_COMMON_H__
+#define __UCL_APPFW_COMMON_H__
+
+#include "../common.h"
+
+#endif // __UCL_APPFW_COMMON_H__
index a87e4acfc83b18760338320d78b07b407270cb8c..c547dce68ba556b6c02e4db0a6b618d7b255a6f2 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "ucl/appfw/helpers.h"
 
-#include "../common.h"
+#include "common.h"
 
 namespace ucl {
 
index 070a8d6048bde1b67f00116836d5707a4a47d37e..6cf0e1276a52a1cb0c4f9f22a9b3f7413f79cf7f 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "ucl/gui/stdTheme/layout.h"
 
-#include "../common.h"
+#include "common.h"
 
 namespace ucl {
 
index 1f8a589da9355078648fb8a8cea095123f19cd40..f7da68fad7b4187d7bbe54195d39a2c10cede7eb 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "ucl/gui/Naviframe.h"
 
-#include "../common.h"
+#include "common.h"
 
 namespace ucl {
 
index 5012a6a8127225e2fd7ff8f5da87844b46a5dc6d..5129f18be13d71212d6a650504103512f7406c4e 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "ucl/gui/Widget.h"
 
-#include "../common.h"
+#include "common.h"
 
 namespace ucl { namespace { namespace impl {
 
index e63a0e7fc2b0860808bff536c236024fe13d3ae1..3f74e9ec29b8526e734ba698a000b2820a670e6e 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "ucl/gui/Window.h"
 
-#include "../common.h"
+#include "common.h"
 
 namespace ucl {
 
diff --git a/ucl/src/gui/common.h b/ucl/src/gui/common.h
new file mode 100644 (file)
index 0000000..6b543d3
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#ifndef __UCL_GUI_COMMON_H__
+#define __UCL_GUI_COMMON_H__
+
+#include "../common.h"
+
+#endif // __UCL_GUI_COMMON_H__
index 6513076acf8bb37935a9607b16fce24d15000f2f..3859bc5f4e37edfed2a3372bd6aba65d086c3903 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "ucl/misc/Variant.h"
 
-#include "../common.h"
+#include "common.h"
 
 namespace ucl {
 
diff --git a/ucl/src/misc/common.h b/ucl/src/misc/common.h
new file mode 100644 (file)
index 0000000..372ad4d
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#ifndef __UCL_MISC_COMMON_H__
+#define __UCL_MISC_COMMON_H__
+
+#include "../common.h"
+
+#endif // __UCL_MISC_COMMON_H__