2 * Copyright 2013 Samsung Electronics Co., Ltd
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
8 * http://floralicense.org/license/
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.
17 #include <dynamicbox_service.h>
19 #ifndef __DYNAMICBOX_UILITY_H
20 #define __DYNAMICBOX_UILITY_H
28 * @brief This file declares API of libdynamicbox library
33 * @addtogroup CAPI_DYNAMICBOX_UTILITY_MODULE
38 * @brief Event information type for dynamicbox_content_event()
39 * @details definition is in dynamicbox_service.h file
42 typedef struct dynamicbox_event_info *dynamicbox_event_info_t;
45 * @brief Creates an Object to create an elm_win object.
46 * @details Creating a new Object using Dynamic Box frame buffer.
48 * @param[in] id Instance Id
49 * @param[in] gbar 1 if this object is created for Glance Bar or 0 (for Dynamic Box)
51 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
52 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
53 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
54 * @return void* Object type
55 * @retval Address Valid evas object
56 * @retval @c NULL failed to create, dynamicbox_last_status() will returns reason of failure
58 extern void *dynamicbox_get_evas_object(const char *id, int gbar);
61 * @brief Set extra information for updated content.
63 * If the provider should give some hints to the viewer,
64 * such as title, icon and name, this function can set them.
65 * provider will send those information to the viewer when the
68 * @remarks This function only works with the buffer type inhouse provider.
69 * @param[in] id Dynamic Box Instance Id
70 * @param[in] content Content string that will pass to a Dynamic Box via dynamicbox_create interface when it is re-created.
71 * @param[in] title Human readable text for accessitility, summarized text for representing the content of a box.
72 * @param[in] icon Path of icon image file - alternative image content
73 * @param[in] name Name of a box - alternative text content
75 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
76 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
77 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
78 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
79 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error
80 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
82 extern int dynamicbox_set_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
85 * @brief Return values of dynamicbox programming interfaces: Operation is successfully done.
87 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
88 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
90 extern const int DBOX_DONE;
93 * @brief Return values of dynamicbox programming interfaces: Contents are updated.
95 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
96 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
98 extern const int DBOX_OUTPUT_UPDATED;
101 * @brief Return values of dynamicbox programming interfaces: Need to call the dynamicbox_need_to_update and dynamicbox_update_content.
103 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
104 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
106 extern const int DBOX_NEED_TO_SCHEDULE;
110 * @brief Return values of dynamicbox programming interfaces: Need to create a new instance.
113 extern const int DBOX_NEED_TO_CREATE;
116 * @brief Return values of dynamicbox programming interfaces: Need to do force update.
118 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
119 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
121 extern const int DBOX_FORCE_TO_SCHEDULE;
124 * @brief Return values of dynamicbox programming interfaces: Need to destroy this instance.
126 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
127 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
129 extern const int DBOX_NEED_TO_DESTROY;
132 * @brief Return values of dynamicbox programming interfaces: Need to update.
134 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
135 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
137 extern const int DBOX_NEED_TO_UPDATE;
140 * @brief System event type: System font is changed.
142 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
143 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
145 extern const int DBOX_SYS_EVENT_FONT_CHANGED;
148 * @brief System event type: System language is changed.
150 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
151 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
153 extern const int DBOX_SYS_EVENT_LANG_CHANGED;
156 * @brief System event type: System time is changed.
158 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
159 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
161 extern const int DBOX_SYS_EVENT_TIME_CHANGED;
164 * @brief System event type: MMC Status change event.
166 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
167 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
169 extern const int DBOX_SYS_EVENT_MMC_STATUS_CHANGED;
172 * @brief System event type: Region changed.
174 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
175 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
177 extern const int DBOX_SYS_EVENT_REGION_CHANGED;
180 * @brief System event type: Accessibility mode changed.
182 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
183 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
185 extern const int DBOX_SYS_EVENT_TTS_CHANGED;
188 * @brief System event type: Dynamic Box is paused.
190 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
191 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
193 extern const int DBOX_SYS_EVENT_PAUSED;
196 * @brief System event type: Dynamic Box is resumed.
198 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
199 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
201 extern const int DBOX_SYS_EVENT_RESUMED;
204 * @brief System event type: Dynamic Box instance is removed from a viewer.
206 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
207 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
209 extern const int DBOX_SYS_EVENT_DELETED;
212 * @brief Requests to schedule the update operation to a provider.
213 * Your DBox will get the update request, if the @a id is specified, specific box only will get it.
215 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
216 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
217 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
218 * @return If succes returns 0 or return less than 0
219 * @retval #DBOX_STATUS_ERROR_NONE Successfully triggered
220 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
221 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
222 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given id instance is not exist
223 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
224 * @retval #DBOX_STATUS_ERROR_DISABLED in case of direct request for updating is disabled
226 extern int dynamicbox_request_update(const char *id);
229 * @brief Send a freeze request to the viewer (homescreen)
231 * The viewer will get this request via event callback.
232 * Then it should freeze its scroller or stop moving the dynamicbox.
234 * @remarks If the viewer doesn't care this request, this will has no effect.
235 * @param[in] dboxid Dynamic Box Package Id
236 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
238 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
239 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
240 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
242 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
243 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
244 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
245 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
246 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
247 * @see dynamicbox_release_scroller()
249 extern int dynamicbox_freeze_scroller(const char *dboxid, const char *id);
252 * @brief Send a release request to the viewer (homescreen)
254 * The viewer will get this request via event callback.
255 * Then it should release its scroller or continue moving the dynamicbox.
257 * @remarks If the viewer doesn't care this request, this will has no effect.
258 * @param[in] dboxid Dynamic Box Package Id
259 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
261 * @privilege %http://developer.samsung.com/tizen/privilege/dynamicbox.provider
262 * @feature http://developer.samsung.com/tizen/feature/samsung_extension
263 * @feature http://developer.samsung.com/tizen/feature/in_house/shell.appwidget
265 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
266 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
267 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
268 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
269 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
270 * @see dynamicbox_freeze_scroller()
272 extern int dynamicbox_thaw_scroller(const char *dboxid, const char *id);