Apply sip back key concept in composer
[apps/home/message-app.git] / composer / include / msg-ui-composer-common.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
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
7  *
8  *    http://floralicense.org/license
9  *
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.
15  */
16
17
18 #ifndef __MSG_COMPOSER_COMMON_H__
19 #define __MSG_COMPOSER_COMMON_H__
20
21 #include "msg-ui-composer-data.h"
22
23 typedef enum {
24         COMPOSER_TICKERNOTI_UNKNOWN             = 0,
25         COMPOSER_TICKERNOTI_COUNT_MAX,
26         COMPOSER_TICKERNOTI_DUP_RECP,
27         COMPOSER_TICKERNOTI_INVALID_RECP,
28         COMPOSER_TICKERNOTI_CHANGED_SMS,
29         COMPOSER_TICKERNOTI_CHANGED_MMS,
30         COMPOSER_TICKERNOTI_AUTO_SAVED,
31         COMPOSER_TICKERNOTI_NO_RECIPIENT,
32         COMPOSER_TICKERNOTI_MAXLENGHT_CHAR
33 } COMPOSER_TICKERNOTI_TYPE_E;
34
35 /*layout*/
36 char *msg_ui_composer_edj_get(MSG_COMPOSER_VIEW_DATA_S *cd);
37 Evas_Object *msg_ui_composer_load_edj(Evas_Object *parent, const char *edj_file, const char *group);
38 Evas_Object *msg_ui_composer_layout_create(Evas_Object *parent, bool indicator);
39 Evas_Object *msg_ui_composer_bg_create(Evas_Object *parent);
40
41 /*file*/
42 int64 msg_composer_get_file_size(const char *path);
43 char *msg_composer_get_file_ext(const char *a_pszfile_name);
44
45 COMPOSER_RETURN_TYPE_E msg_composer_common_get_media_duration(const char *file_path, int *duration);
46 COMPOSER_MEDIA_TYPE_E msg_composer_get_media_type(const char *a_pszfile_path);
47 COMPOSER_MEDIA_TRACK_TYPE_E msg_composer_get_media_track_type(const char *a_pszfile_name);
48 void msg_ui_composer_clear(MSG_COMPOSER_VIEW_DATA_S *cd);
49
50 /*focus*/
51 Eina_Bool msg_ui_composer_last_focus_load(void *data);
52 Eina_Bool msg_ui_composer_last_body_page_focus_load(void *data);
53 void msg_ui_composer_last_focused_entry_set(void *data, Evas_Object *entry);
54 Evas_Object *msg_ui_composer_last_focused_entry_get(void *data);
55 Evas_Object *msg_ui_composer_last_body_entry_get(void *data);
56 void msg_ui_composer_set_body_keypad_layout(void *data, int mode);
57 bool msg_ui_composer_last_focus_is_recipient(void *data);
58
59
60 void bundle_send_to_result(void *data, char *key, char *val);
61 COMPOSER_RETURN_TYPE_E msg_ui_composer_change_message_type(MSG_COMPOSER_VIEW_DATA_S *cd, COMPOSER_MSG_TYPE_E msg_type);
62 bool msg_ui_composer_common_is_send_possible(MSG_COMPOSER_VIEW_DATA_S *cd);
63
64 COMPOSER_MSG_TYPE_E msg_ui_composer_check_message_type(MSG_COMPOSER_VIEW_DATA_S *cd);
65 void msg_ui_composer_message_type_check_and_change(MSG_COMPOSER_VIEW_DATA_S *cd);
66
67 COMPOSER_RETURN_TYPE_E msg_composer_common_get_thumbnail(MSG_COMPOSER_VIEW_DATA_S *cd, const char *src_file_path, char *thumb_file_path, int size_thumb_file_path);
68 COMPOSER_RETURN_TYPE_E msg_composer_common_get_image_in_video(const char *video_file_path, char *image_file_path);
69 COMPOSER_RETURN_TYPE_E msg_ui_composer_common_get_file(MSG_COMPOSER_VIEW_DATA_S *cd, const char *src_file_path, char *dst_file_path, int size_dst_file_path);
70
71 void msg_composer_entry_filter_remove_markup(void *data, Evas_Object *entry, char **text);
72 void msg_ui_composer_common_tickernoti(MSG_COMPOSER_VIEW_DATA_S *cd, COMPOSER_TICKERNOTI_TYPE_E tickertype);
73 void msg_composer_entry_filter_addimage(void *data, Evas_Object *entry, char **text);
74 void msg_ui_composer_entry_imf_state_cb(void * data, Ecore_IMF_Context *ctx, int value);
75 void msg_ui_composer_entry_imf_resize_cb(void * data, Ecore_IMF_Context *ctx, int value);
76 int msg_ui_composer_get_keypad_height(Evas_Object *entry);
77 void msg_ui_composer_change_body_scroll_size(MSG_COMPOSER_VIEW_DATA_S *cd, int keypad_height);
78 void msg_ui_composer_make_default_body_size(MSG_COMPOSER_VIEW_DATA_S *cd);
79
80 int msg_ui_composer_get_font_size(int type);
81 void msg_ui_composer_apply_font_size(MSG_COMPOSER_VIEW_DATA_S *cd, bool update_subject);
82 void msg_ui_composer_naviframe_size_hints_changed(void *data, Evas *e, Evas_Object *obj, void *event_info);
83
84 #endif/*__MSG_COMPOSER_COMMON_H__*/