1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
/*
* Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
*
* Licensed under the Flora License, Version 1.1 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://floralicense.org/license/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "sat-ui-debug.h"
#include "sat-ui.h"
#include "winset.h"
#include <Elementary.h>
#include <Evas.h>
#include "common_string.h"
#include <notification.h>
Evas_Object *create_waiting_notify(Evas_Object *parent)
{
Evas_Object *selectioninfo;
Evas_Object *selectioninfo_layout;
Evas_Object *layout;
selectioninfo = elm_notify_add(parent);
elm_notify_align_set(selectioninfo, ELM_NOTIFY_ALIGN_FILL, 1.0);
// selectioninfo layout add
selectioninfo_layout = elm_layout_add(parent);
elm_layout_theme_set(selectioninfo_layout, "standard", "selectioninfo", "default");
elm_object_content_set(selectioninfo, selectioninfo_layout);
layout=elm_layout_edje_get(selectioninfo_layout);
edje_object_part_text_set(layout, "elm.text", SAT_STR_PLEASE_WAIT);
evas_object_show(selectioninfo);
evas_object_data_set(parent, "selectioninfo",selectioninfo);
return selectioninfo;
}
void _satui_geinlist_item_class_new(void *data)
{
ret_if(data == NULL);
SatUiAppData_t *ad = (SatUiAppData_t *)data;
ad->itc_text_icon = elm_genlist_item_class_new();
ad->itc_no_edit_text = elm_genlist_item_class_new();
ad->itc_editfield_icon = elm_genlist_item_class_new();
ad->itc_ok_icon = elm_genlist_item_class_new();
ad->itc_help_icon = elm_genlist_item_class_new();
ad->itc_2icon = elm_genlist_item_class_new();
}
void _satui_geinlist_item_class_free(void *data)
{
ret_if(data == NULL);
SatUiAppData_t *ad = (SatUiAppData_t *)data;
if (ad->itc_text_icon)
elm_genlist_item_class_free(ad->itc_text_icon);
if (ad->itc_no_edit_text)
elm_genlist_item_class_free(ad->itc_no_edit_text);
if (ad->itc_editfield_icon)
elm_genlist_item_class_free(ad->itc_editfield_icon);
if (ad->itc_ok_icon)
elm_genlist_item_class_free(ad->itc_ok_icon);
if (ad->itc_help_icon)
elm_genlist_item_class_free(ad->itc_help_icon);
if (ad->itc_2icon)
elm_genlist_item_class_free(ad->itc_2icon);
}
int _satui_create_notification(const char *string)
{
int ret = -1;
notification_h noti = NULL;
notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
noti = notification_new(NOTIFICATION_TYPE_ONGOING, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE);
if (noti == NULL) {
DBG("notification_new error");
} else {
noti_err = notification_set_title(noti, string, NULL);
if (noti_err != NOTIFICATION_ERROR_NONE) {
DBG("Fail to notification_set_title : %d", noti_err);
} else {
noti_err = notification_insert(noti, NULL);
if (noti_err != NOTIFICATION_ERROR_NONE) {
DBG("Fail to notification_insert : %d", noti_err);
} else {
ret = 0;
}
noti_err = notification_set_property(noti, NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
if(noti_err != NOTIFICATION_ERROR_NONE) {
DBG("Fail to notification_set_property : %d", noti_err);
ret = -1;
}
}
noti_err = notification_free(noti);
if (noti_err != NOTIFICATION_ERROR_NONE) {
DBG("Fail to notification_free : %d", noti_err);
ret = -1;
}
}
return ret;
}
int _satui_delete_notification(void)
{
int ret = -1;
notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
noti_err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_ONGOING);
if (noti_err != NOTIFICATION_ERROR_NONE) {
DBG("Fail to nofication_delete_all_by_type : %d", noti_err);
} else {
ret = 0;
}
return ret;
}
|