4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7 * Jaeho Lee <jaeho81.lee@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
24 #ifndef __SYSPOPUP_H__
25 #define __SYSPOPUP_H__
29 #include <Elementary.h>
34 * This is System Popup Library
35 * This library help to create system popup application & to launch/destroy system popup application
40 * @addtogroup APPLICATION_FRAMEWORK
43 * @defgroup syspopup System Popup Library
49 * @brief System Popup UI Library
51 * Patched by Knhoon Baik <knhoon.baik@samsung.com>
52 * Patched by Noha Park <noha.park@samsung.com>
56 * @defgroup syspopup_ui Helper Library to create system popup application
58 * @brief Helper Library to create system popup application
62 * @addtogroup syspopup_ui
67 *@brief action handler supplied by user
68 * def_term_fn is called when event to destroy all system popup occur
69 * def_timeout_fn is called when the system popup's timeout is expired
71 struct _syspopup_handler {
72 int (*def_term_fn) (bundle *, void *);
73 /**< handler supplied by user to process termination request */
74 int (*def_timeout_fn) (bundle *, void *);
75 /**< handler supplied by user to process timeout */
78 typedef struct _syspopup_handler syspopup_handler;
81 * @brief This API make elm system popup window
83 * This API make elm system popup window.
84 * and then, make given elm system popup window as system popup type
85 * and set system popup properties based on system popup information DB.\n
86 * system popup properties to be set : timeout, default action type, ....
88 * @param[in] b bundle received by app_reset handler (included system popup name)
89 * @param[in] handler user-supplied handler for handling system popup internal event.
90 * @param[in] parent parent window created with elm_win_add.
91 * @param[in] user_data user-supplied data
92 * @return 0 if success, -1 if fail
94 * @retval -1 - generic error
96 int syspopup_create(bundle *b, syspopup_handler *handler,
97 Evas_Object *parent, void *user_data);
100 * @brief This API reset created the elm system popup's properties
102 * This API reset created the elm system popup's properties based on system popup information DB after extracting popup name from given bundle
103 * system popup properties to be reset : timeout, default action type, ....
105 * @param[in] b bundle received by app_reset handler (included system popup name)
106 * @return 0 if success, negative value(<0) if fail
107 * @retval 0 - success
108 * @retval -1 - generic error
110 int syspopup_reset(bundle *b);
113 * @brief This API ask that the system popup is created and is running
115 * This API ask that the the system popup with popup name is created and is running after extracting popup name from given bundle.
117 * @param[in] b bundle received by app_reset handler (included system popup name)
118 * @return true / false
119 * @retval 1 app already has the system popup
120 * @retval 0 app has not the system popup
122 int syspopup_has_popup(bundle *b);
125 * @brief This API reset timeout value of system popup.
127 * This API reset timeout value of system popup.
129 * @param[in] b bundle received by app_reset handler (included system popup name)
130 * @param[in] time timeout time (sec)
131 * @return 0 if success, negative value(<0) if fail
133 * @retval -1 generic error
135 int syspopup_reset_timeout(bundle *b, unsigned int time);