1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef HGSCROLLBUFFEROBSERVERIFACE_H_ |
|
20 #define HGSCROLLBUFFEROBSERVERIFACE_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <ganes/HgBufferOwnerIface.h> |
|
24 |
|
25 /** |
|
26 * Buffer observer interface. |
|
27 */ |
|
28 class MHgScrollBufferObserver : public MHgBufferOwner |
|
29 { |
|
30 public: |
|
31 /** |
|
32 * The direction of request. |
|
33 */ |
|
34 enum THgScrollDirection |
|
35 { |
|
36 EHgBufferNoMove, // Request initiated by adding or removing an item |
|
37 EHgBufferReset, // Full buffer reset |
|
38 EHgBufferScrollUp, // Request items before the buffer |
|
39 EHgBufferScrollDown // Request items after the buffer |
|
40 }; |
|
41 |
|
42 public: |
|
43 /** |
|
44 * Buffer position changed. |
|
45 * The items between the aBufferStart and aBufferEnd should be loaded as soon as possible. |
|
46 * |
|
47 * @param aBufferStart The index of the first item in buffer. |
|
48 * @param aBufferEnd The index of the last item in buffer. |
|
49 * @param aDirection Scroll direction. |
|
50 */ |
|
51 virtual void Request(TInt aRequestStart, TInt aRequestEnd, THgScrollDirection aDirection) = 0 ; |
|
52 |
|
53 }; |
|
54 |
|
55 #endif // HGSCROLLBUFFEROBSERVERIFACE_H_ |
|