clock: rewrite unicode using i18n API.
[apps/core/preloaded/indicator-win.git] / inc / util.h
1 /*
2  *  Indicator
3  *
4  * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20
21
22 #ifndef __INDICATOR_UTIL_H__
23 #define __INDICATOR_UTIL_H__
24 #include <Ecore.h>
25 //#include <Ecore_X.h>
26
27 typedef enum {
28         INDICATOR_ERROR_NONE = 0,
29         INDICATOR_ERROR_FAIL = -1,
30         INDICATOR_ERROR_DB_FAILED = -2,
31         INDICATOR_ERROR_OUT_OF_MEMORY = -3,
32         INDICATOR_ERROR_INVALID_PARAMETER = -4,
33         INDICATOR_ERROR_NO_DATA = -5,
34 } indicator_error_e;
35
36 typedef struct _Indicator_Data_Animation Indicator_Data_Animation;
37
38 struct _Indicator_Data_Animation
39 {
40    Ecore_X_Window xwin;
41    double         duration;
42 };
43
44 extern char *util_set_label_text_color(const char *txt);
45 extern const char *util_get_icon_dir(void);
46 extern void util_signal_emit(void* data, const char *emission, const char *source);
47 extern void util_part_text_emit(void* data, const char *part, const char *text);
48 extern void util_signal_emit_by_win(void* data, const char *emission, const char *source);
49 extern void util_part_text_emit_by_win(void* data, const char *part, const char *text);
50 extern void util_battery_percentage_part_content_set(void* data, const char *part, const char *img_path);
51 extern void util_launch_search(void* data);
52 extern int util_check_system_status(void);
53 extern char* util_get_timezone_str(void);
54 extern Eina_Bool util_win_prop_angle_get(Ecore_X_Window win, int *curr);
55 extern int util_is_orf(void);
56 extern int util_check_noti_ani(const char* path);
57 extern void util_start_noti_ani(void* data);
58 extern void util_stop_noti_ani(void* data);
59 extern void util_send_status_message_start(void* data,double duration);
60 extern void util_char_replace(char *text, char s, char t);
61 extern int util_dynamic_state_get(void);
62
63 extern Ecore_File_Monitor* util_file_monitor_add(const char* file_path, Ecore_File_Monitor_Cb callback_func, void *ad);
64 extern void util_file_monitor_remove(Ecore_File_Monitor* pFileMonitor);
65 extern char *util_safe_str(const char *str, const char *strSearch);
66
67 #ifdef _SUPPORT_SCREEN_READER
68 extern Evas_Object *util_access_object_register(Evas_Object *object, Evas_Object *layout);
69 extern void util_access_object_unregister(Evas_Object *object);
70 extern void util_access_object_info_set(Evas_Object *object, int info_type, char *info_text);
71 extern void util_icon_access_register(icon_s *icon);
72 extern void util_icon_access_unregister(icon_s *icon);
73 #endif /* _SUPPORT_SCREEN_READER */
74
75 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
76
77 #endif /* __INDICATOR_UTIL_H__ */