The source code moved from the SPIN with license changed to Flora 1.1
[apps/native/home/homescreen-efl.git] / inc / dynamic_index.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://floralicense.org/license/
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef DYNAMIC_INDEX_H_
18 #define DYNAMIC_INDEX_H_
19
20 #include <Evas.h>
21 #include <Eina.h>
22
23 #include "page_scroller.h"
24 #include "conf.h"
25
26 typedef struct {
27         Evas_Object *scroller;
28         Evas_Object *box;
29         Evas_Object *indices[INDEX_MAX_PAGE_COUNT];
30         int page_count;
31         int page_width;
32         int page_current;
33         int x_current;
34 } dynamic_index_t;
35
36 /**
37  * @brief Creates new dynamic index object
38  * @param page_scroller Evas_Object pointer to elm_scroller widget
39  */
40 dynamic_index_t *dynamic_index_new(Evas_Object *page_scroller);
41
42 /**
43  * @brief Removes dynamic inxed object
44  * @param dynamic_index Pointer to dynamic_index_t type.
45  */
46 void dynamic_index_del(dynamic_index_t *dynamic_index);
47
48 /**
49  * @brief Clears content and set current index.
50  * @details [long description]
51  *
52  * @param dynamic_index [description]
53  */
54 void dynamic_index_reload(dynamic_index_t *dynamic_index, int idx, int page_count);
55
56 #endif /* DYNAMIC_INDEX_H_ */