[NUI] Introduce CollectionView and related classes. (#2525)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Controls / RecyclerView / ICollectionChangedNotifier.cs
1 /* Copyright (c) 2021 Samsung Electronics Co., Ltd.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15  */
16
17 using System.ComponentModel;
18
19 namespace Tizen.NUI.Components
20 {
21     /// <summary>
22     /// Notify observers about dataset changes of observable items.
23     /// </summary>
24     [EditorBrowsable(EditorBrowsableState.Never)]
25     public interface ICollectionChangedNotifier
26     {
27
28         /// <summary>
29         /// Notify the dataset is Changed.
30         /// </summary>
31         [EditorBrowsable(EditorBrowsableState.Never)]
32         void NotifyDataSetChanged();
33
34         /// <summary>
35         /// Notify the observable item in startIndex is changed.
36         /// </summary>
37         /// <param name="source">dataset source</param>
38         /// <param name="startIndex">changed item index</param>
39         [EditorBrowsable(EditorBrowsableState.Never)]
40         void NotifyItemChanged(IItemSource source, int startIndex);
41
42         /// <summary>
43         /// Notify the observable item is inserted in dataset.
44         /// </summary>
45         /// <param name="source">dataset source</param>
46         /// <param name="startIndex">Inserted item index</param>
47         [EditorBrowsable(EditorBrowsableState.Never)]
48         void NotifyItemInserted(IItemSource source, int startIndex);
49
50         /// <summary>
51         /// Notify the observable item is moved from fromPosition to ToPosition.
52         /// </summary>
53         /// <param name="source"></param>
54         /// <param name="fromPosition"></param>
55         /// <param name="toPosition"></param>
56         [EditorBrowsable(EditorBrowsableState.Never)]
57         void NotifyItemMoved(IItemSource source, int fromPosition, int toPosition);
58
59         /// <summary>
60         /// Notify the range of observable items from start to end are changed.
61         /// </summary>
62         /// <param name="source"></param>
63         /// <param name="startIndex"></param>
64         /// <param name="endIndex"></param>
65         [EditorBrowsable(EditorBrowsableState.Never)]
66         void NotifyItemRangeChanged(IItemSource source, int startIndex, int endIndex);
67
68         /// <summary>
69         /// Notify the count range of observable items are inserted in startIndex.
70         /// </summary>
71         /// <param name="source"></param>
72         /// <param name="startIndex"></param>
73         /// <param name="count"></param>
74         [EditorBrowsable(EditorBrowsableState.Never)]
75         void NotifyItemRangeInserted(IItemSource source, int startIndex, int count);
76
77         /// <summary>
78         /// Notify the count range of observable items from the startIndex are removed.
79         /// </summary>
80         /// <param name="source"></param>
81         /// <param name="startIndex"></param>
82         /// <param name="count"></param>
83         [EditorBrowsable(EditorBrowsableState.Never)]
84         void NotifyItemRangeRemoved(IItemSource source, int startIndex, int count);
85
86         /// <summary>
87         /// Notify the observable item in startIndex is removed.
88         /// </summary>
89         /// <param name="source"></param>
90         /// <param name="startIndex"></param>
91         [EditorBrowsable(EditorBrowsableState.Never)]
92         void NotifyItemRemoved(IItemSource source, int startIndex);
93     }
94 }