1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
/*
* Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __TIZEN_SHARE_PANEL_SCROLLER_H__
#define __TIZEN_SHARE_PANEL_SCROLLER_H__
#include <Elementary.h>
/**
* @ingroup View
* @defgroup Scroller Scroller
* @addtogroup Scroller
* @{
*/
/**
* @brief Enumerations for share panel event error.
*/
typedef enum {
SCROLLER_EVENT_TYPE_INVALID = 0,
SCROLLER_EVENT_TYPE_SCROLL,
SCROLLER_EVENT_TYPE_APPEND_PAGE,
SCROLLER_EVENT_TYPE_REMOVE_PAGE,
SCROLLER_EVENT_TYPE_MAX,
} scroller_event_type_e;
/**
* @brief Creates application page scroller.
*
* @param ui_manager The main parent layout
* @param share_panel The share panel info structure
*
* @return created scroller
*/
extern Evas_Object *_scroller_create(Evas_Object *ui_manager, share_panel_s *share_panel);
/**
* @brief Destroys application page scroller.
*
* @param scroller The scroller to be destroyed
*/
extern void _scroller_destroy(Evas_Object *scroller);
/**
* @brief Appends new page to the scroller.
*
* @param scroller The scroller widget
* @param page The page to be appended
*/
extern void _scroller_append_page(Evas_Object *scroller, Evas_Object *page);
/**
* @brief Appends list items into the scroller.
*
* @param scroller The scroller widget
* @param list The list of applications to be appended
* @param page_width Width of the pages to be appended
* @param page_height Height of the pages to be appended
*/
extern void _scroller_append_list(Evas_Object *scroller, Eina_List *list, int page_width, int page_height);
/**
* @brief Removes list items from the scroller.
*
* @param scroller The scroller widget
* @param list The list of applications to be removed
*/
extern void _scroller_remove_list(Evas_Object *scroller, Eina_List *list);
/**
* @brief Gets region of the scroller's index.
*
* @param scroller The scroller widget
*
* @return index's region
*/
extern int _scroller_get_region_index(Evas_Object *scroller);
/**
* @brief Gets the number of pages in scroller's box.
*
* @param scroller The scroller widget
*
* @return number of pages
*/
extern unsigned int _scroller_count(Evas_Object *scroller);
/**
* @brief Registers scroller event callbacks.
*
* @param scroller The scroller widget
* @param event_type The type of the event
* @param event_cb The callback function to be called
* @param data The data to be passed to the event callback function
*
* @return share_panel_error_e enumeration value
*/
extern int _scroller_register_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *data), void *data);
/**
* @brief Unregister scroller event callbacks.
*
* @param scroller The scroller widget
* @param event_type The type of the event
* @param event_cb The scroller's event callback function to be unregistered
*
* @return share_panel_error_e enumeration value
*/
extern int _scroller_unregister_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *data));
/**
* @}
*/
#endif /* __TIZEN_SHARE_PANEL_SCROLLER_H__ */
|