2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
17 #ifndef _FUI_CTRL_INTERNAL_IGALLERY_RENDERER_H_
18 #define _FUI_CTRL_INTERNAL_IGALLERY_RENDERER_H_
20 #include <FBaseString.h>
21 #include <FGrpRectangle.h>
22 #include "FUiCtrl_GalleryTypes.h"
24 namespace Tizen { namespace Ui { namespace Controls {
26 enum _GalleryTransitionType
28 GALLERY_TRANSITION_DISSOLVE = 0,
29 GALLERY_TRANSITION_ZOOM,
30 GALLERY_TRANSITION_PAGE
34 class _IGalleryRendererNotiListener;
36 class _IGalleryRenderer
39 virtual ~_IGalleryRenderer(void) {}
41 virtual result AddNotiListener(const _IGalleryRendererNotiListener& notiListener) = 0;
42 virtual result RemoveNotiListener(const _IGalleryRendererNotiListener& notiListener) = 0;
43 virtual result SetCanvasMaxCount(int maxCount) = 0;
44 virtual int GetCanvasMaxCount(void) const = 0;
45 virtual result SetCanvasVisibility(int canvasIndex, bool visibility) = 0;
46 virtual result SetCanvasShowState(int canvasIndex, bool showState) = 0;
47 virtual bool IsCanvasVisibility(int canvasIndex) const = 0;
48 virtual Tizen::Graphics::FloatRectangle GetViewRect(void) const = 0;
49 virtual result SetEmptyImage(const _GalleryBitmap* pImage) = 0;
50 virtual result SetEmptyText(const Tizen::Base::String& pText) = 0;
51 virtual result EnableEmptyView(void) = 0;
52 virtual result DisableEmptyView(void) = 0;
53 virtual result SetCanvasImage(int canvasIndex, const _GalleryBitmap* pImage
54 , _GalleryVerticalAlignment imageVerticalAlignment, _GalleryHorizontalAlignment imageHorizontalAlignment
55 , _GalleryFittingType fittingType) = 0;
56 virtual result SetCanvasBounds(int canvasIndex, const Tizen::Graphics::FloatRectangle& bounds,
57 const _GalleryAnimationTiming* pAnimation = null) = 0;
58 virtual Tizen::Graphics::FloatRectangle GetCanvasBounds(int canvasIndex) const = 0;
59 virtual Tizen::Graphics::FloatRectangle GetCanvasAlignBoundary(int canvasIndex) const = 0;
60 virtual result SetCanvasImageBounds(int canvasIndex, const Tizen::Graphics::FloatRectangle& bounds) = 0;
61 virtual Tizen::Graphics::FloatRectangle GetCanvasImageBounds(int canvasIndex) const = 0;
62 virtual result RunCanvasTransition(int startCanvasIndex, int endCanvasIndex, _GalleryTransitionType transition,
63 const _GalleryAnimationTiming* pAnimation = null) = 0;
64 virtual void StopAllCanvasAnimation(void) = 0;
65 virtual bool IsRunningCanvasTransition(void) const = 0;
66 virtual bool IsRunningCanvasAnimation(void) const = 0;
67 virtual bool IsExposed(void) const = 0;
68 virtual result RefreshView(void) = 0;
69 virtual result ReleaseAllCanvasResource(void) = 0;
70 virtual result ResetAllCanvas(void) = 0;
71 virtual result InitializeCanvasBounds(void) = 0;
72 virtual result Draw(void) = 0;
73 virtual void GalleryBoundsChanged(int currentCanvasIndex) = 0;
74 }; // _IGalleryRenderer
76 }}} // Tizen::Ui::Controls
78 #endif //_FUI_CTRL_INTERNAL_IGALLERY_RENDERER_H_