2 * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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 #ifndef __SYSPOPUP_H__
19 #define __SYSPOPUP_H__
22 #include <Elementary.h>
27 * This is System Popup Library
28 * This library help to create system popup application & to launch/destroy system popup application
34 * @ingroup APPLICATION_FRAMEWORK
35 * @defgroup syspopup System Popup Library
41 * @brief System Popup UI Library
43 * Patched by Knhoon Baik <knhoon.baik@samsung.com>
44 * Patched by Noha Park <noha.park@samsung.com>
48 * @defgroup syspopup_ui Helper Library to create system popup application
50 * @brief Helper Library to create system popup application
54 * @addtogroup syspopup_ui
59 * @brief action handler supplied by user
60 * def_term_fn is called when event to destroy all system popup occur
61 * def_timeout_fn is called when the system popup's timeout is expired
63 struct _syspopup_handler {
64 int (*def_term_fn) (bundle *, void *);
65 /**< handler supplied by user to process termination request */
66 int (*def_timeout_fn) (bundle *, void *);
67 /**< handler supplied by user to process timeout */
70 typedef struct _syspopup_handler syspopup_handler;
73 * @brief This API make elm system popup window
75 * This API make elm system popup window.
76 * and then, make given elm system popup window as system popup type
77 * and set system popup properties based on system popup information DB.\n
78 * system popup properties to be set : timeout, default action type, ....
80 * @privilege %http://tizen.org/privilege/window.priority.set
81 * @param[in] b bundle received by app_reset handler (included system popup name)
82 * @param[in] handler user-supplied handler for handling system popup internal event.
83 * @param[in] parent parent window created with elm_win_add.
84 * @param[in] user_data user-supplied data
85 * @return 0 if success, -1 if fail
87 * @retval -1 - generic error
89 int syspopup_create(bundle *b, syspopup_handler *handler,
90 Evas_Object *parent, void *user_data);
93 * @brief This API reset created the elm system popup's properties
95 * This API reset created the elm system popup's properties based on system popup information DB after extracting popup name from given bundle
96 * system popup properties to be reset : timeout, default action type, ....
98 * @param[in] b bundle received by app_reset handler (included system popup name)
99 * @return 0 if success, negative value(<0) if fail
100 * @retval 0 - success
101 * @retval -1 - generic error
103 int syspopup_reset(bundle *b);
106 * @brief This API ask that the system popup is created and is running
108 * This API ask that the the system popup with popup name is created and is running after extracting popup name from given bundle.
110 * @param[in] b bundle received by app_reset handler (included system popup name)
111 * @return true / false
112 * @retval 1 app already has the system popup
113 * @retval 0 app has not the system popup
115 int syspopup_has_popup(bundle *b);
118 * @brief This API reset timeout value of system popup.
120 * This API reset timeout value of system popup.
122 * @param[in] b bundle received by app_reset handler (included system popup name)
123 * @param[in] time timeout time (sec)
124 * @return 0 if success, negative value(<0) if fail
126 * @retval -1 generic error
128 int syspopup_reset_timeout(bundle *b, unsigned int time);