2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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://floralicense.org
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 #include "quickpanel-ui.h"
20 HAPI void quickpanel_util_char_replace(char *text, char s, char t) {
21 retif(text == NULL, , "invalid argument");
23 int i = 0, text_len = 0;
25 text_len = strlen(text);
27 for (i = 0; i < text_len; i++) {
28 if (*(text + i) == s) {
34 static void _current_popup_deleted_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
36 retif(obj == NULL, , "obj is NULL");
38 struct appdata *ad = quickpanel_get_app_data();
39 retif(ad == NULL, , "invalid argument");
41 if (ad->popup == obj) {
44 ERR("popup is created over the popup");
48 HAPI void quickpanel_ui_set_current_popup(Evas_Object *popup) {
49 retif(popup == NULL, , "invalid argument");
51 struct appdata *ad = quickpanel_get_app_data();
52 retif(ad == NULL, , "invalid argument");
55 evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _current_popup_deleted_cb, NULL);
58 HAPI void quickpanel_ui_del_current_popup(void) {
59 struct appdata *ad = quickpanel_get_app_data();
60 retif(ad == NULL, , "invalid argument");
62 if (ad->popup != NULL) {
63 evas_object_del(ad->popup);