Merget form tizen_2.1 branch.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Wed, 5 Jun 2013 04:28:35 +0000 (13:28 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Wed, 5 Jun 2013 04:28:35 +0000 (13:28 +0900)
Change-Id: Idd08630c5c21aa7326d9e8f82f172faecce3c98a

13 files changed:
inc/FUiCtrlForm.h
res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting_h.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting.png [deleted file]
res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting_h.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting_h.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting_h.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting.png [deleted file]
res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting_h.png [deleted file]
src/ui/FUi_DimmingLayer.cpp
src/ui/inc/FUi_DimmingLayer.h

index 17a39da..2efe7a3 100644 (file)
@@ -174,10 +174,10 @@ public:
         *                                                                      Multiple form styles can be combined using bitwise OR.
         * @exception   E_SUCCESS           The method is successful.
         * @exception   E_INVALID_ARG           The specified input parameter is invalid.
-        *                                                                      - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time.
-        *                                                                      - ::FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_0 are specified at the same time.
-        *                                                                      - @c FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_1 are specified at the same time.
-        *                                                                      - @c FORM_STYLE_FOOTER and ::FORM_STYLE_OPTIONKEY are specified at the same time.
+        *      @if OSPDEPREC           - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time.
+        *                                                                                      - ::FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_0 are specified at the same time.
+        *                                                                                      - @c FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_1 are specified at the same time.
+        *                                                                                      - @c FORM_STYLE_FOOTER and ::FORM_STYLE_OPTIONKEY are specified at the same time. @endif
         * @exception   E_MAX_EXCEEDED      The total number of Frames and Forms exceeds the system limitation.
         * @exception   E_SYSTEM            A system error has occurred.
         * @remarks     The maximum number of Forms that an application can construct is limited by available memory.
@@ -590,14 +590,14 @@ public:
         *                                                              This parameter can be a combination of Tizen::Ui::Controls::FormStyle.
         * @exception   E_SUCCESS               The method is successful @if OSPCOMPAT @b Since: @b 2.0 @endif.
         * @exception   E_INVALID_ARG   A specified input parameter is invalid.
-        *                                                              - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time.
-        *                                                              - ::FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_0 are specified at the same time.
-        *                                                              - @c FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_1 are specified at the same time.
-        *                                                              - @c FORM_STYLE_FOOTER and ::FORM_STYLE_OPTIONKEY are specified at the same time.
+        *      @if OSPDEPREC           - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time.
+        *                                                                                      - ::FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_0 are specified at the same time.
+        *                                                                                      - @c FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_1 are specified at the same time.
+        *                                                                                      - @c FORM_STYLE_FOOTER and ::FORM_STYLE_OPTIONKEY are specified at the same time. @endif
         * @remarks
         *                              - The specific error code can be accessed using the GetLastResult() method.
-        *                              - Note that you must not change the style of %Form control that is constructed with ::FORM_STYLE_TEXT_TAB
-        *                              or ::FORM_STYLE_ICON_TAB style.
+        * @if OSPDEPREC                - Note that you must not change the style of %Form control that is constructed with ::FORM_STYLE_TEXT_TAB
+        *                              or ::FORM_STYLE_ICON_TAB style. @endif
         *                              - A Form which is added to a container except Frame cannot have the style of ::FORM_STYLE_INDICATOR.
         */
        void SetFormStyle(unsigned long formStyle);
diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting.png
deleted file mode 100644 (file)
index 093288a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting_h.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting_h.png
deleted file mode 100644 (file)
index 4b5606a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_dim_lighting_h.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting.png
deleted file mode 100644 (file)
index 093288a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting_h.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting_h.png
deleted file mode 100644 (file)
index 4b5606a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_dim_lighting_h.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting.png
deleted file mode 100644 (file)
index a44fad6..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting_h.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting_h.png
deleted file mode 100644 (file)
index 6171ad7..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_dim_lighting_h.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting.png
deleted file mode 100644 (file)
index a44fad6..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting_h.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting_h.png
deleted file mode 100644 (file)
index 4b5606a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_dim_lighting_h.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting.png
deleted file mode 100644 (file)
index a44fad6..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting.png and /dev/null differ
diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting_h.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting_h.png
deleted file mode 100644 (file)
index 4b5606a..0000000
Binary files a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_dim_lighting_h.png and /dev/null differ
index a09def9..2775574 100644 (file)
@@ -178,30 +178,7 @@ _DimmingLayer::SetDimmingEnabled(bool enabled)
 
                r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4);
 
-               Canvas* pCanvas = __pDimmingElement->GetCanvasN();
-
-               Bitmap* pPortraitBitmap = null;
-               Bitmap* pLandscapeBitmap = null;
-               r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_PORTRAIT, BITMAP_PIXEL_FORMAT_ARGB8888, pPortraitBitmap);
-               r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_LANDSCAPE, BITMAP_PIXEL_FORMAT_ARGB8888, pLandscapeBitmap);
-
-               if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
-               {
-                       if (pCanvas)
-                       {
-                               r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.width, size.height), *pPortraitBitmap);
-                       }
-               }
-               else
-               {
-                       if (pCanvas)
-                       {
-                               r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.width, size.height), *pLandscapeBitmap);
-                       }
-               }
-
-               delete pCanvas;
-
+               DrawBackgroundBitmap();
        }
        else
        {
@@ -244,9 +221,50 @@ _DimmingLayer::Rearrange(void)
        {
                __pDimmingElement->SetBounds(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, size.height, size.width));
        }
+
+       DrawBackgroundBitmap();
+
        __pDimmingElement->SetImplicitAnimationEnabled(oldValue);
 
        return r;
 }
 
+result
+_DimmingLayer::DrawBackgroundBitmap(void)
+{
+       result r = E_SUCCESS;
+
+       const FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF();
+
+       Bitmap* pPortraitBitmap = null;
+       Bitmap* pLandscapeBitmap = null;
+       r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_PORTRAIT, BITMAP_PIXEL_FORMAT_ARGB8888, pPortraitBitmap);
+       r = GET_BITMAP_CONFIG_N(DIMMINGLAYER::BG_LANDSCAPE, BITMAP_PIXEL_FORMAT_ARGB8888, pLandscapeBitmap);
+       SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       Canvas* pCanvas = __pDimmingElement->GetCanvasN();
+       r = GetLastResult();
+       SysTryReturnResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r));
+       pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+       pCanvas->Clear();
+
+       if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT)
+       {
+               if (pPortraitBitmap)
+               {
+                       r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.width, size.height), *pPortraitBitmap);
+               }
+       }
+       else
+       {
+               if (pLandscapeBitmap)
+               {
+                       r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, size.height, size.width), *pLandscapeBitmap);
+               }
+       }
+       delete pCanvas;
+
+       return r;
+}
+
 }}   // Tizen::Ui
index a6cfa09..23901ed 100644 (file)
@@ -48,6 +48,7 @@ public:
        result SetDimmingEnabled(bool enabled);
        bool IsDimmingEnabled(void) const;
        result Rearrange(void);
+       result DrawBackgroundBitmap(void);
 
 private:
        _DimmingLayer(const _DimmingLayer& rhs);                /* no impl. */