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.
18 * Export by widget_service
20 #include <widget_buffer.h>
21 #include <widget_script.h>
23 #ifndef __WIDGET_UILITY_INTERNAL_H
24 #define __WIDGET_UILITY_INTERNAL_H
31 * @file widget_internal.h
32 * @brief This file declares API of libwidget library
37 * @addtogroup CAPI_WIDGET_UTILITY_MODULE
43 * @brief Definition for COLOR BLOCK.
46 #define WIDGET_DESC_TYPE_COLOR "color"
50 * @brief Definition for TEXT BLOCK.
53 #define WIDGET_DESC_TYPE_TEXT "text"
57 * @brief Definition for IMAGE BLOCK.
60 #define WIDGET_DESC_TYPE_IMAGE "image"
64 * @brief Definition for SIGNAL BLOCK.
67 #define WIDGET_DESC_TYPE_SIGNAL "signal"
71 * @brief Definition for INFO BLOCK.
74 #define WIDGET_DESC_TYPE_INFO "info"
78 * @brief Definition for DRAG BLOCK.
81 #define WIDGET_DESC_TYPE_DRAG "drag"
85 * @brief Definition for SCRIPT SCRIPT.
88 #define WIDGET_DESC_TYPE_SCRIPT "script"
92 * @brief Definition for ACCESSIBILITY INFORMATION BLOCK.
95 #define WIDGET_DESC_TYPE_ACCESS "access"
99 * @brief Definition for accessibility operation.
102 #define WIDGET_DESC_TYPE_ACCESS_OPERATION "access,operation"
106 * @brief Definition for set highlight on specified part.
109 #define WIDGET_DESC_DATA_ACCESS_OPERATION_HL_SET "set,hl"
113 * @brief Definition for remove highlight from specified part.
116 #define WIDGET_DESC_DATA_ACCESS_OPERATION_HL_UNSET "unset,hl"
120 * @brief Definition for move the highlight to next part.
123 #define WIDGET_DESC_DATA_ACCESS_OPERATION_HL_NEXT "next,hl"
127 * @brief Definition for move the highlight to previous part.
130 #define WIDGET_DESC_DATA_ACCESS_OPERATION_HL_PREV "prev,hl"
134 * @brief Definition for reset the chain of accessibility highlight list.
137 #define WIDGET_DESC_DATA_ACCESS_OPERATION_RESET "reset,focus"
141 * @brief Definition for specify the highlight move option.
142 * @details If the highlight list reaches to the last object, move back to the first object.
145 #define WIDGET_DESC_OPTION_ACCESS_HL_LOOP "cycle"
149 * @brief Definition for specify the highlight move option.
150 * @details If the highlight list reaches to the last object(or the first object),
151 * the "prev,hl", "next,hl" will be failed.
154 #define WIDGET_DESC_OPTION_ACCESS_HL_NOLOOP "no,cycle"
158 * @brief Return values of widget programming interfaces for the plug-in type widgets
161 typedef enum widget_api_result {
162 WIDGET_DONE = 0x00, /**< Operation is successfully done. */
163 WIDGET_OUTPUT_UPDATED = 0x01, /**< Contents are updated. */
164 WIDGET_NEED_TO_SCHEDULE = 0x02, /**< Need to call the widget_need_to_update and widget_update_content. */
165 WIDGET_NEED_TO_CREATE = 0x04, /**< Need to create a new instance. */
166 WIDGET_NEED_TO_DESTROY = 0x08, /**< Need to destroy this instance. */
167 WIDGET_FORCE_TO_SCHEDULE = 0x10, /**< Need to do force update. */
168 } widget_api_result_e;
172 * @brief System event type for the plug-in type widgets
175 typedef enum widget_system_event {
176 WIDGET_SYS_EVENT_FONT_CHANGED = 0x01, /**< System font is changed. */
177 WIDGET_SYS_EVENT_LANG_CHANGED = 0x02, /**< System language is changed. */
178 WIDGET_SYS_EVENT_TIME_CHANGED = 0x04, /**< System time is changed. */
179 WIDGET_SYS_EVENT_REGION_CHANGED = 0x08, /**< Region changed. */
180 WIDGET_SYS_EVENT_TTS_CHANGED = 0x10, /**< Accessibility mode changed. */
181 WIDGET_SYS_EVENT_PAUSED = 0x0100, /**< widget is paused. */
182 WIDGET_SYS_EVENT_RESUMED = 0x0200, /**< widget is resumed. */
183 WIDGET_SYS_EVENT_MMC_STATUS_CHANGED = 0x0400, /**< MMC Status change event. */
184 WIDGET_SYS_EVENT_DELETED = 0x0800, /**< widget instance is removed from a viewer. */
185 WIDGET_SYS_EVENT_ORIENTATION_CHANGED = 0x01000, /**< Orientation is changed */
186 } widget_system_event_e;
190 * @brief widget description data handle.
193 typedef struct widget_desc *widget_desc_h;
197 * @brief Flush Callback for snapshot window
200 typedef void (*widget_flush_cb)(void *snapshot_window, const char *id, int status, void *data);
204 * @brief Updates a description file.
206 * @remarks Must be used only by Inhouse widget.
207 * @param[in] id widget Instance Id
208 * @param[in] gbar 1 for Glance Bar or 0
210 * @return Handle of desc instance
211 * @retval @c NULL Failed to create a desc instance, get_last_result() will returns reason of failure
212 * @pre Should be loaded by data-provider-slave.
213 * @post Should be destroyed(flushed) using widget_desc_close() API.
214 * @see widget_desc_close()
216 extern widget_desc_h widget_desc_open(const char *id, int gbar);
220 * @brief Completes the description file update.
221 * @details Only if this API is called, the description data will be applied to the content of widget (or GBar).
223 * @remarks Must be used only by Inhouse widget.
224 * @param[in] handle Handle which is created by widget_desc_open() function
226 * @return 0 on success, otherwise a negative error value
227 * @retval #WIDGET_ERROR_NONE If the flushing description data is successfully done
228 * @retval #WIDGET_ERROR_INVALID_PARAMETER If the given handle is not valid
229 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
230 * @pre Handle must be created by widget_desc_open()
231 * @post Handle must not be used after return from this function.
232 * @see widget_desc_open()
234 extern int widget_desc_close(widget_desc_h handle);
238 * @brief Sets the category information of current description data.
239 * @details Creates a new description block for updating category information of layout object.
241 * @param[in] handle Handle which is created by widget_desc_open() function
242 * @param[in] id Id string of target object
243 * @param[in] category Category string that will be used by layout object
244 * @return 0 on success, otherwise a negative error value
245 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid handle
246 * @retval #WIDGET_ERROR_OUT_OF_MEMORY Memory is not enough to add this block
247 * @retval index Index(>=0) of added block, which can be used by widget_desc_set_id()
248 * @pre Must be called after create a handle using widget_desc_open()
249 * @see widget_desc_set_id()
251 extern int widget_desc_set_category(widget_desc_h handle, const char *id, const char *category);
255 * @brief Sets the content size.
256 * @details Sets the content size of layout.
258 * @param[in] handle Handle which is created by widget_desc_open() function
259 * @param[in] id Id string of target object
260 * @param[in] w Width in pixel
261 * @param[in] h Height in pixel
262 * @return 0 on success, otherwise a negative error value
263 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
264 * @retval #WIDGET_ERROR_OUT_OF_MEMORY Not enough memory to add a new block
265 * @retval index Index(>=0) of added block Successfully added
266 * @see widget_desc_open()
267 * @see widget_desc_set_id()
269 extern int widget_desc_set_size(widget_desc_h handle, const char *id, int w, int h);
273 * @brief Sets the target id of the given block.
274 * @details Only available for the script block.
276 * @param[in] handle Handle which is created by widget_desc_open() function
277 * @param[in] idx Index of target block
278 * @param[in] id Id String which will be used by other widget_desc_XXX functions
279 * @return 0 on success, otherwise a negative error value
280 * @retval #WIDGET_ERROR_NONE Id is successfully updated for given idx of desc block
281 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
282 * @retval #WIDGET_ERROR_NOT_EXIST Given index of desc block is not exists
283 * @pre Desc block should be exists which has given index "idx".
284 * @post Specified Id string("id") can be used by other widget_desc_XXXX functions.
285 * @see widget_desc_open()
286 * @see widget_desc_set_id()
288 extern int widget_desc_set_id(widget_desc_h handle, int idx, const char *id);
292 * @brief Adds a new block.
294 * @param[in] handle Handle which is created by the widget_desc_open() function
295 * @param[in] id ID of source script object
296 * @param[in] type Type (image|text|script|signal|.. etc)
297 * @param[in] part Target part to update with given content(data)
298 * @param[in] data Content for specified part
299 * @param[in] option Option for the block. (script: group, image: option, ...)
300 * @return Index of current description block
301 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
302 * @retval #WIDGET_ERROR_OUT_OF_MEMORY Not enough memory to add a new desc block
303 * @retval index Index(>=0) of added desc block
304 * @pre Handle must be created using widget_desc_open.
305 * @see widget_desc_set_id()
306 * @see widget_desc_del_block()
308 extern int widget_desc_add_block(widget_desc_h handle, const char *id, const char *type, const char *part, const char *data, const char *option);
312 * @brief Deletes an added block.
314 * @details If you discard the added desc block, use this API and the index of the created desc block.
315 * @param[in] handle Handle which is created by widget_desc_open() function
316 * @param[in] idx Index of added block, returned from widget_desc_add_block(), widget_desc_set_size(), widget_desc_set_category(), etc
317 * @return 0 on success, otherwise a negative error value
318 * @retval #WIDGET_ERROR_NONE Successfully deleted
319 * @retval #WIDGET_ERROR_NOT_EXIST Given index of desc block is not exists
320 * @pre Index must be exists.
321 * @see widget_desc_add_block()
322 * @see widget_desc_open()
324 extern int widget_desc_del_block(widget_desc_h handle, int idx);
328 * @brief Structure for a widget buffer defined by a provider.
331 typedef struct widget_buffer *widget_buffer_h;
335 * @brief Return values of widget programming interfaces: Using network.
338 extern const int WIDGET_USE_NET;
342 * @brief Notifies the updated content to the provider.
343 * @details Forcedly notifies the updated contents.
344 * This function can be used from async callback function to notify the updated content.
346 * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
347 * @param[in] gbar 1 for updating content of Glance Bar or 0(for content of widget)
348 * @return 0 on success, otherwise a negative error value
349 * @retval #WIDGET_ERROR_OUT_OF_MEMORY Not enough memory
350 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
351 * @retval #WIDGET_ERROR_IO_ERROR I/O failed, Cannot access given resource file(id)
352 * @retval #WIDGET_ERROR_NONE Successfully notified
353 * @pre This API only can be used after loaded into the data-provider-slave process.
355 extern int widget_content_is_updated(const char *id, int gbar);
359 * @brief Acquires a buffer for GBar or widget, currently only the GBar is supported.
361 * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
362 * @param[in] gbar 1 for Glance Bar or 0 for widget
363 * @param[in] width Width in pixel
364 * @param[in] height Height in pixel
365 * @param[in] pixels Size of a pixel in bytes
366 * @param[in] handler Event handling callback
367 * @param[in] data User data for event handling callback
369 * @return Buffer handle
370 * @retval @c NULL Failed to acquire buffer, get_last_result() will returns reason of failure.
371 * @retval handler Handle object
372 * @pre Given instance must be specify its type as buffer. or this API will be fail.
373 * @post Allocated buffer object must be released via widget_release_buffer().
374 * @see widget_release_buffer()
376 extern widget_buffer_h widget_create_buffer(const char *id, int gbar, int auto_align, int (*handler)(widget_buffer_h, widget_buffer_event_data_t, void *), void *data);
380 * @brief Acquire a buffer for GBar or widget.
382 * @param[in] handle Buffer handle
383 * @param[in] idx Index of a buffer, WIDGET_PRIMARY_BUFFER is used for accessing primary buffer
384 * @param[in] width Width of a buffer
385 * @param[in] height Height of a buffer
386 * @param[in] pixels Pixel size in byte
388 * @return 0 on success, otherwise a negative error value
389 * @retval #WIDGET_ERROR_NONE Successfully allocated
390 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameter
391 * @retval #WIDGET_ERROR_FAULT Unrecoverable error occurred
392 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
393 * @pre widget_create_buffer() must be called
394 * @see widget_create_buffer()
395 * @see widget_release_buffer()
397 extern int widget_viewer_acquire_buffer(widget_buffer_h handle, int idx, int width, int height, int pixels);
401 * @brief Acquires the Id of Resource (window system).
402 * @details Only if the provider uses Resource for providing render buffer.
404 * @remarks Pixmap Id can be destroyed if you call the widget_release_buffer(). Then this Resource Id is not guaranteed to use.
405 * @param[in] handle Buffer handle
406 * @param[in] idx Index of a buffer, #c WIDGET_PRIMARY_BUFFER is used for accessing the primary buffer
407 * @return unsigned int Resource Id
408 * @retval >0 Resource Id
409 * @retval 0 Failed to get Resource Id
410 * @pre The system must be set to use the Resource Id method for content sharing.
411 * @see widget_acquire_buffer()
413 extern unsigned int widget_viewer_get_resource_id(widget_buffer_h handle, int idx);
417 * @brief Releases the buffer of widget.
419 * @param[in] handle Buffer handle
420 * @param[in] idx Index of a buffer, #c WIDGET_PRIMARY_BUFFER is used for accessing the primary buffer
422 * @return 0 on success, otherwise a negative error value
423 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
424 * @retval #WIDGET_ERROR_NONE Successfully released
425 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
426 * @pre Handle must be created using widget_acquire_buffer().
427 * @see widget_acquire_buffer()
429 extern int widget_viewer_release_buffer(widget_buffer_h handle, int idx);
433 * @brief Destroy a buffer of widget
435 * @param[in] handle buffer handle
437 * @return 0 on success, otherwise a negative error value
438 * @retval #WIDGET_ERROR_INVALID_PARAMTER Invalid argument
439 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
440 * @retval #WIDGET_ERROR_NONE Successfully destroyed
441 * @see widget_create_buffer()
443 extern int widget_destroy_buffer(widget_buffer_h handle);
447 * @brief Gets the address of buffer for S/W rendering.
448 * @details If you try to use this, after widget_create_hw_buffer(), you will get @c NULL.
449 * This API only be used for primary buffer. you cannot access the extra buffer
451 * @param[in] handle Buffer handle
453 * @retval @c NULL If it falis to get buffer address, get_last_result() will returns reason of failure.
454 * @retval address If it succeed to get the buffer address
455 * @see widget_unref_buffer()
457 extern void *widget_ref_buffer(widget_buffer_h handle);
461 * @brief Releases the S/W render buffer.
463 * @param[in] buffer Address of render buffer
465 * @return 0 on success, otherwise a negative error value
466 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid handle
467 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
468 * @retval #WIDGET_ERROR_NONE Successfully unreference
469 * @pre widget_ref_buffer() must be called.
470 * @see widget_ref_buffer()
472 extern int widget_unref_buffer(void *buffer);
476 * @brief Synchronizes the updated buffer.
477 * @details This is only needed for non-H/W accelerated buffer.
478 * This API is only supported for primary buffer (#c WIDGET_PRIMARY_BUFFER)
480 * @param[in] handle Buffer handle
482 * @return 0 on success, otherwise a negative error value
483 * @retval #WIDGET_ERROR_NONE Successfully sync'd
484 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
485 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
486 * @see widget_acquire_buffer()
488 extern int widget_viewer_sync_buffer(widget_buffer_h handle);
492 * @brief Checks whether the widget supports H/W acceleration or not.
493 * This API is only supported for primary buffer (#c WIDGET_PRIMARY_BUFFER)
495 * @param[in] handle Buffer handle
497 * @retval 1 If the buffer handle support the H/W acceleration buffer
498 * @retval 0 If it doesn not supported
499 * @see widget_acquire_buffer()
501 extern int widget_support_hw_buffer(widget_buffer_h handle);
505 * @brief Creates the H/W accelerated buffer.
506 * This API is only supported for primary buffer (#c WIDGET_PRIMARY_BUFFER)
508 * @param[in] handle Buffer handle
510 * @return 0 on success, otherwise a negative error value
511 * @retval #WIDGET_ERROR_ALREADY_EXIST H/W buffer is already created
512 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
513 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
514 * @retval #WIDGET_ERROR_NONE Successfully created
515 * @pre Must be checked whether the H/W buffer is supported or not.
516 * @post Must be destroyed if it is not necessary.
517 * @see widget_support_hw_buffer()
519 extern int widget_create_hw_buffer(widget_buffer_h handle);
523 * @brief Destroys the H/W accelerated buffer.
524 * This API is only supported for primary buffer (#c WIDGET_PRIMARY_BUFFER)
526 * @param[in] handle Buffer handle
528 * @return 0 on success, otherwise a negative error value
529 * @retval #WIDGET_ERROR_NONE Successfully destroyed
530 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
531 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
532 * @pre Must be created h/w buffer using widget_create_hw_buffer.
533 * @see widget_create_hw_buffer()
535 extern int widget_destroy_hw_buffer(widget_buffer_h handle);
539 * @brief Gets the address of the accelerated H/W buffer.
540 * This API is only supported for primary buffer (#c WIDGET_PRIMARY_BUFFER)
542 * @param[in] handle Buffer handle
544 * @retval @c NULL Failed to get H/W accelerated buffer address, get_last_result() will returns reason of failure.
545 * @retval addr H/W accelerated buffer address
546 * @see widget_create_hw_buffer()
548 extern void *widget_buffer_hw_buffer(widget_buffer_h handle);
552 * @brief Get the stride information from the buffer info
553 * This API is only supported for primary buffer (#c WIDGET_PRIMARY_BUFFER)
555 * @param[in] handle Buffer handle
556 * @return int stride size
557 * @retval positive_value length of stride
558 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameter
559 * @retval #WIDGET_ERROR_FAULT Unrecoverable error
560 * @see widget_create_hw_buffer()
562 extern int widget_buffer_stride(widget_buffer_h handle);
566 * @brief Pre-processes for rendering content.
567 * @details This is only needed for accessing H/W accelerated buffer.
569 * @param[in] handle Buffer handle
571 * @return 0 on success, otherwise a negative error value
572 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid handle
573 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
574 * @retval #WIDGET_ERROR_NONE Successfully done
575 * @post widget_buffer_post_render must be called after the rendering (accessing buffer) is completed.
576 * @see widget_support_hw_buffer()
577 * @see widget_buffer_post_render()
579 extern int widget_buffer_pre_render(widget_buffer_h handle);
583 * @brief Post-processes for rendering content.
585 * @param[in] handle Buffer handle
587 * @return 0 on success, otherwise a negative error value
588 * @retval #WIDGET_ERROR_NONE If succeed
589 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
590 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid argument
591 * @pre widget_buffer_pre_render must be called.
592 * @see widget_support_hw_buffer()
593 * @see widget_buffer_pre_render()
595 extern int widget_buffer_post_render(widget_buffer_h handle);
599 * @brief Sends a request to the viewer (homescreen) to close the GBar.
600 * @details Even though you call this function. the homescreen can ignore it.
602 * @param[in] widgetid widget Package Id
603 * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
604 * @param[in] reason #WIDGET_ERROR_NONE(0)
606 * @return 0 on success, otherwise a negative error value
607 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
608 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameters
609 * @retval #WIDGET_ERROR_OUT_OF_MEMORY Out of memory
610 * @retval #WIDGET_ERROR_FAULT Failed to send a request
611 * @retval #WIDGET_ERROR_NONE Successfully requested
613 extern int widget_request_close_glance_bar(const char *widgetid, const char *id, int reason);
617 * @brief Create a snapshot window
619 * If you want create a snapshot image of contents, create this snapshot window
620 * But it will not renders object asynchronously,
621 * So you have to render the objects immediately, the delayed rendering object will not be on the canvas
622 * After flush it to a file.
625 * @param[in] size_type
626 * @retval @c NULL failed to create a snapshot window, get_last_result() will returns reason of failure.
627 * @retval Object window object (ex, elementary window)
628 * @see widget_snapshot_window_flush()
630 extern void *widget_snapshot_window_add(const char *id, int size_type);
634 * @brief Flush to a file for snapshot window
636 * @param[in] snapshot_win Snapshot window
637 * @param[in] timeout After this, the image file will be created
638 * @param[in] flush_cb Right after flush an image file, this callback will be called
639 * @param[in] data Callback data for flush_cb
640 * @return 0 on success, otherwise a negative error value
641 * @retval #WIDGET_ERROR_NONE Successfully flushed (flush timer added)
642 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid paramter
643 * @retval #WIDGET_ERROR_FAULT Failed to create a flush timer
644 * @see widget_snapshot_window_add()
646 extern int widget_snapshot_window_flush(void *snapshot_win, double timeout, widget_flush_cb flush_cb, void *data);
650 * @brief Sending the updated event to the viewer
652 * @param[in] handle widget Buffer Handle
653 * @param[in] idx Index of a buffer
655 * @return 0 on success, otherwise a negative error value
656 * @retval #WIDGET_ERROR_NONE Successfully sent
658 extern int widget_send_updated_by_idx(widget_buffer_h handle, int idx);
662 * @brief Set extra information for updated content.
664 * If the provider should give some hints to the viewer,
665 * such as title, icon and name, this function can set them.
666 * provider will send those information to the viewer when the
667 * content is updated.
669 * * @remarks This function only works with the buffer type inhouse provider.
670 * @param[in] id widget Instance Id
671 * @param[in] content Content string that will pass to a widget via widget_create interface when it is re-created.
672 * @param[in] title Human readable text for accessibility, summarized text for representing the content of a box.
673 * @param[in] icon Path of icon image file - alternative image content
674 * @param[in] name Name of a box - alternative text content
675 * @return 0 on success, otherwise a negative error value
676 * @retval #WIDGET_ERROR_OUT_OF_MEMORY Out of memory
677 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameters
678 * @retval #WIDGET_ERROR_FAULT Unrecoverable error
679 * @retval #WIDGET_ERROR_NONE Successfully sent
682 extern int widget_set_extra_info(const char *id, const char *content, const char *title, const char *icon, const char *name);
686 * @brief Send a freeze request to the viewer (homescreen)
688 * The viewer will get this request via event callback.
689 * Then it should freeze its scroller or stop moving the widget.
691 * @remarks If the viewer doesn't care this request, this will has no effect.
692 * @param[in] widgetid widget Package Id
693 * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
695 * @return 0 on success, otherwise a negative error value
696 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameters
697 * @retval #WIDGET_ERROR_OUT_OF_MEMORY Out of memory
698 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
699 * @retval #WIDGET_ERROR_FAULT Failed to send requet
700 * @retval #WIDGET_ERROR_NONE Successfully requested
701 * @see widget_release_scroller()
704 extern int widget_freeze_scroller(const char *widgetid, const char *id);
708 * @brief Send a release request to the viewer (homescreen)
710 * The viewer will get this request via event callback.
711 * Then it should release its scroller or continue moving the widget.
713 * @remarks If the viewer doesn't care this request, this will has no effect.
714 * @param[in] widgetid widget Package Id
715 * @param[in] id Instance Id which is passed to you via the first parameter of every widget_XXXX interface functions
717 * @return 0 on success, otherwise a negative error value
718 * @retval #WIDGET_ERROR_PERMISSION_DENIED Permission denied
719 * @retval #WIDGET_ERROR_INVALID_PARAMETER Invalid parameters
720 * @retval #WIDGET_ERROR_OUT_OF_MEMORY Out of memory
721 * @retval #WIDGET_ERROR_FAULT Failed to send requet
722 * @retval #WIDGET_ERROR_NONE Successfully requested
723 * @see widget_freeze_scroller()
726 extern int widget_thaw_scroller(const char *widgetid, const char *id);
730 extern int widget_del_pre_callback(widget_pre_callback_e type, widget_pre_callback_t cb, void *data);
734 extern int widget_add_pre_callback(widget_pre_callback_e type, widget_pre_callback_t cb, void *data);
738 extern int widget_get_orientation(const char *id);