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://tizen.org/privilege/dynamicbox.provider
52 * @feature http://tizen.org/feature/shell.appwidget
53 * @return void* Object type
54 * @retval Address Valid evas object
55 * @retval @c NULL failed to create, dynamicbox_last_status() will returns reason of failure
57 extern void *dynamicbox_get_evas_object(const char *id, int gbar);
60 * @brief Set extra information for updated content.
62 * If the provider should give some hints to the viewer,
63 * such as title, icon and name, this function can set them.
64 * provider will send those information to the viewer when the
67 * @remarks This function only works with the buffer type inhouse provider.
68 * @param[in] id Dynamic Box Instance Id
69 * @param[in] content Content string that will pass to a Dynamic Box via dynamicbox_create interface when it is re-created.
70 * @param[in] title Human readable text for accessitility, summarized text for representing the content of a box.
71 * @param[in] icon Path of icon image file - alternative image content
72 * @param[in] name Name of a box - alternative text content
74 * @feature http://tizen.org/feature/shell.appwidget
75 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
76 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
77 * @retval #DBOX_STATUS_ERROR_FAULT Unrecoverable error
78 * @retval #DBOX_STATUS_ERROR_NONE Successfully sent
80 extern int dynamicbox_set_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
83 * @brief Return values of dynamicbox programming interfaces: Operation is successfully done.
85 * @feature http://tizen.org/feature/shell.appwidget
87 extern const int DBOX_DONE;
90 * @brief Return values of dynamicbox programming interfaces: Contents are updated.
92 * @feature http://tizen.org/feature/shell.appwidget
94 extern const int DBOX_OUTPUT_UPDATED;
97 * @brief Return values of dynamicbox programming interfaces: Need to call the dynamicbox_need_to_update and dynamicbox_update_content.
99 * @feature http://tizen.org/feature/shell.appwidget
101 extern const int DBOX_NEED_TO_SCHEDULE;
105 * @brief Return values of dynamicbox programming interfaces: Need to create a new instance.
108 extern const int DBOX_NEED_TO_CREATE;
111 * @brief Return values of dynamicbox programming interfaces: Need to do force update.
113 * @feature http://tizen.org/feature/shell.appwidget
115 extern const int DBOX_FORCE_TO_SCHEDULE;
118 * @brief Return values of dynamicbox programming interfaces: Need to destroy this instance.
120 * @feature http://tizen.org/feature/shell.appwidget
122 extern const int DBOX_NEED_TO_DESTROY;
125 * @brief Return values of dynamicbox programming interfaces: Need to update.
127 * @feature http://tizen.org/feature/shell.appwidget
129 extern const int DBOX_NEED_TO_UPDATE;
132 * @brief System event type: System font is changed.
134 * @feature http://tizen.org/feature/shell.appwidget
136 extern const int DBOX_SYS_EVENT_FONT_CHANGED;
139 * @brief System event type: System language is changed.
141 * @feature http://tizen.org/feature/shell.appwidget
143 extern const int DBOX_SYS_EVENT_LANG_CHANGED;
146 * @brief System event type: System time is changed.
148 * @feature http://tizen.org/feature/shell.appwidget
150 extern const int DBOX_SYS_EVENT_TIME_CHANGED;
153 * @brief System event type: MMC Status change event.
155 * @feature http://tizen.org/feature/shell.appwidget
157 extern const int DBOX_SYS_EVENT_MMC_STATUS_CHANGED;
160 * @brief System event type: Region changed.
162 * @feature http://tizen.org/feature/shell.appwidget
164 extern const int DBOX_SYS_EVENT_REGION_CHANGED;
167 * @brief System event type: Accessibility mode changed.
169 * @feature http://tizen.org/feature/shell.appwidget
171 extern const int DBOX_SYS_EVENT_TTS_CHANGED;
174 * @brief System event type: Dynamic Box is paused.
176 * @feature http://tizen.org/feature/shell.appwidget
178 extern const int DBOX_SYS_EVENT_PAUSED;
181 * @brief System event type: Dynamic Box is resumed.
183 * @feature http://tizen.org/feature/shell.appwidget
185 extern const int DBOX_SYS_EVENT_RESUMED;
188 * @brief System event type: Dynamic Box instance is removed from a viewer.
190 * @feature http://tizen.org/feature/shell.appwidget
192 extern const int DBOX_SYS_EVENT_DELETED;
195 * @brief Requests to schedule the update operation to a provider.
196 * Your DBox will get the update request, if the @a id is specified, specific box only will get it.
198 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
199 * @feature http://tizen.org/feature/shell.appwidget
200 * @return If succes returns 0 or return less than 0
201 * @retval #DBOX_STATUS_ERROR_NONE Successfully triggered
202 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid argument
203 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Not enough memory
204 * @retval #DBOX_STATUS_ERROR_NOT_EXIST Given id instance is not exist
205 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
206 * @retval #DBOX_STATUS_ERROR_DISABLED in case of direct request for updating is disabled
208 extern int dynamicbox_request_update(const char *id);
211 * @brief Send a freeze request to the viewer (homescreen)
213 * The viewer will get this request via event callback.
214 * Then it should freeze its scroller or stop moving the dynamicbox.
216 * @remarks If the viewer doesn't care this request, this will has no effect.
217 * @param[in] dboxid Dynamic Box Package Id
218 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
220 * @privilege %http://tizen.org/privilege/dynamicbox.provider
221 * @feature http://tizen.org/feature/shell.appwidget
223 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
224 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
225 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
226 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
227 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
228 * @see dynamicbox_release_scroller()
230 extern int dynamicbox_freeze_scroller(const char *dboxid, const char *id);
233 * @brief Send a release request to the viewer (homescreen)
235 * The viewer will get this request via event callback.
236 * Then it should release its scroller or continue moving the dynamicbox.
238 * @remarks If the viewer doesn't care this request, this will has no effect.
239 * @param[in] dboxid Dynamic Box Package Id
240 * @param[in] id Instance Id which is passed to you via the first parameter of every dynamicbox_XXXX interface functions
242 * @privilege %http://tizen.org/privilege/dynamicbox.provider
243 * @feature http://tizen.org/feature/shell.appwidget
245 * @retval #DBOX_STATUS_ERROR_PERMISSION_DENIED Permission denied
246 * @retval #DBOX_STATUS_ERROR_INVALID_PARAMETER Invalid parameters
247 * @retval #DBOX_STATUS_ERROR_OUT_OF_MEMORY Out of memory
248 * @retval #DBOX_STATUS_ERROR_FAULT Failed to send requet
249 * @retval #DBOX_STATUS_ERROR_NONE Successfully requested
250 * @see dynamicbox_freeze_scroller()
252 extern int dynamicbox_thaw_scroller(const char *dboxid, const char *id);