1 /* Copyright (c) 2021 Samsung Electronics Co., Ltd.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 using System.ComponentModel;
19 namespace Tizen.NUI.Components
22 /// Notify observers about dataset changes of observable items.
24 [EditorBrowsable(EditorBrowsableState.Never)]
25 public interface ICollectionChangedNotifier
29 /// Notify the dataset is Changed.
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 void NotifyDataSetChanged();
35 /// Notify the observable item in startIndex is changed.
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);
43 /// Notify the observable item is inserted in dataset.
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);
51 /// Notify the observable item is moved from fromPosition to ToPosition.
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);
60 /// Notify the range of observable items from start to end are changed.
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);
69 /// Notify the count range of observable items are inserted in startIndex.
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);
78 /// Notify the count range of observable items from the startIndex are removed.
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);
87 /// Notify the observable item in startIndex is removed.
89 /// <param name="source"></param>
90 /// <param name="startIndex"></param>
91 [EditorBrowsable(EditorBrowsableState.Never)]
92 void NotifyItemRemoved(IItemSource source, int startIndex);