Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_IGalleryRenderer.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17 #ifndef _FUI_CTRL_INTERNAL_IGALLERY_RENDERER_H_
18 #define _FUI_CTRL_INTERNAL_IGALLERY_RENDERER_H_
19
20 #include <FBaseString.h>
21 #include <FGrpRectangle.h>
22 #include "FUiCtrl_GalleryTypes.h"
23
24 namespace Tizen { namespace Ui { namespace Controls {
25
26 enum _GalleryTransitionType
27 {
28         GALLERY_TRANSITION_DISSOLVE = 0,
29         GALLERY_TRANSITION_ZOOM,
30         GALLERY_TRANSITION_PAGE
31 };
32
33 class _GalleryBitmap;
34 class _IGalleryRendererNotiListener;
35
36 class _IGalleryRenderer
37 {
38 public:
39         virtual ~_IGalleryRenderer(void) {}
40
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::Rectangle 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::Rectangle& bounds,
57                                                                         const _GalleryAnimationTiming* pAnimation = null) = 0;
58         virtual Tizen::Graphics::Rectangle GetCanvasBounds(int canvasIndex) const = 0;
59         virtual Tizen::Graphics::Rectangle GetCanvasAlignBoundary(int canvasIndex) const = 0;
60         virtual result SetCanvasImageBounds(int canvasIndex, const Tizen::Graphics::Rectangle& bounds) = 0;
61         virtual Tizen::Graphics::Rectangle 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
75
76 }}} // Tizen::Ui::Controls
77
78 #endif //_FUI_CTRL_INTERNAL_IGALLERY_RENDERER_H_