Apply latest codes migration
[apps/core/preloaded/message-app.git] / viewer / include / msg-ui-viewer-play-view.h
index 4104614..a4966c2 100755 (executable)
  *==================================================================================================*/
 #define VIEWER_BUFFER_SIZE_64 64
 #define VIEWER_TITLE_MENU_GENLIST_MAX_ITEM 3
-#define VIEWER_TITLE_MENU_LINE_HEIGHT 129
-#define VIEWER_ATTACH_GL_ITEM_HEIGHT 112
+#define VIEWER_TITLE_MENU_1TEXT_HEIGHT 112
+#define VIEWER_TITLE_MENU_2TEXT_HEIGHT 129
+#define VIEWER_ATTACH_GL_ITEM_HEIGHT 100
 #define VIEWER_TITLE_FONT_LEN 100
 #define VIEWER_NAVI_FRAME_HEIGHT 98
 #define VIEWER_NAVIFRAME_BOTTOM_H 114
 
-
 #define VIEWER_PLAY_CONTROLLER_LIFETIME (3.0)
 #define VIEWER_PLAY_CONTROLLER_PROGRESSBAR_TIME (1.0)
 #define VIEWER_PLAY_CONTROLLER_HEIGHT 218
@@ -137,17 +137,29 @@ typedef enum {
        MSG_VIEWER_VOLUME_EVENT_DRAG_STOP,
 } MSG_VIEWER_VOLUME_BAR_EVENT_E;
 
+typedef enum {
+       VIEWER_HELP_PAGE_FONT_SMALL = 24,
+       VIEWER_HELP_PAGE_FONT_NORMAL= 30,
+       VIEWER_HELP_PAGE_FONT_LARGE = 44,
+       VIEWER_HELP_PAGE_FONT_HUGE = 60,
+       VIEWER_HELP_PAGE_FONT_GIANT = 76,
+       VIEWER_HELP_PAGE_FONT_MAX
+
+} MSG_VIEWER_HELP_PAGE_FONT_SIZE_E;
+
+
 typedef void (*MSG_VIEWER_VOLUMEBAR_CB)(void *user_data, Evas_Object *obj, MSG_VIEWER_VOLUME_BAR_EVENT_E event);
+
 /*==================================================================================================
  *                                                                             STRUCTURES
  *==================================================================================================*/
-typedef struct _MSG_VIEWER_ADDR_INFO_S{
+typedef struct _MSG_VIEWER_ADDR_INFO_S {
        int contact_id;
        char address[MAX_ADDRESS_VAL_LEN+1];
        char name[MAX_DISPLAY_NAME_LEN+1];
 } MSG_VIEWER_ADDR_INFO;
 
-typedef struct _MSG_VIEWER_ADDR_LIST_S{
+typedef struct _MSG_VIEWER_ADDR_LIST_S {
        int addr_cnt;
        MSG_VIEWER_ADDR_INFO addr_info[MAX_TO_ADDRESS_CNT];
 } MSG_VIEWER_ADDR_LIST;
@@ -169,7 +181,6 @@ typedef struct _MSG_PLAY_DATA_S {
        Evas_Object *volumebar;                         /* volumebar */
        Evas_Object *volume_slider;             /* volumebar_slider */
 
-       Evas_Object *help_page_gl;                      /* help page genlist */
        Evas_Object *save_attachment_gl;                /* save attachments genlist(controlbar menu) */
        Evas_Object *render_entry;                      /* entry handle of SMIL render */
 
@@ -205,7 +216,6 @@ typedef struct _MSG_PLAY_DATA_S {
        Ecore_Timer *play_controller_timer;
        Ecore_Timer *play_controller_progressbar_timer;
        Ecore_Timer *volumebar_timer;
-
        MSG_VIEWER_VOLUMEBAR_CB volumebar_event_cb;
 
        int ctrl_start_x;               /* play controller mouse pointer */
@@ -224,6 +234,8 @@ typedef struct _MSG_PLAY_DATA_S {
        bool auto_resume_state;         /* check state of auto resume availablity */
        bool msg_box_viewer;    /* TRUE is viewer is launched from message box */
        bool drag_volume_slider; /* check do not navigate multiple page when volume bar is displayed */
+       bool is_rotated;                /* TRUE if horizontal or reverse horizontal */
+       bool drm_ro_check;              /* whether showing drm cotents popup or not - before SMIL START*/
 
        int totalProgressTime;          /* total progress time for all slide*/
        int elapsedProgressTime;                /*progress time from 1st slide to current slide*/
@@ -254,7 +266,6 @@ typedef struct {
        char pfile_name[MSG_VIEWER_FILENAME_MAX_LEN + 1];
        char pfile_path[MSG_VIEWER_FILEPATH_MAX_LEN + 1];
        int pfile_size;
-       bool isSaveAll;                 /* for select all item */
        Eina_Bool isChecked;            /* check object status of save attachment genlist */
        Evas_Object *check_item;        /* check object for save attachments genlist */
        MSG_VIEWER_MEDIA_TYPE_E media_type;
@@ -262,99 +273,85 @@ typedef struct {
 } MSG_VIEWER_ATTACH_MEDIA_INFO_S;
 /*==================================================================================================
  *                                                                     FUNCTION DECLARATIONS
- *==================================================================================================*/
-MSG_BOOL msg_ui_viewer_create_player_view(MSG_PLAY_DATA_S *data);
+ *=================================================================================================*/
 
-/*
- *@fn          msg_ui_viewer_show_player_view(MSG_PLAY_DATA_S *data);
- *@brief               This function is used to show player view again when player view is already ready.
- * @param[in] data MSG_PLAY_DATA_S structure
- * @return     return TRUE if player view is playing, else FALSE
- */
+/* main */
+MSG_BOOL msg_ui_viewer_create_player_view(MSG_PLAY_DATA_S *data);
 MSG_BOOL msg_ui_viewer_show_player_view(MSG_PLAY_DATA_S *data);
-
 void msg_ui_viewer_play_view_init(void *data);
 void msg_ui_viewer_destroy_play_view(void *data);
 void msg_ui_viewer_connect_handler(void *data);
 void msg_ui_viewer_disconnect_handler(void *data);
-
-/*
- *@fn          msg_ui_viewer_update_play_controller(void *data, MSG_VIEWER_PLAY_STATUS_E status);
- *@brief               This function is used to enable/disable prev & next button
- * @param[in] data MSG_PLAY_DATA_S structure
- * @param[in] status viewer play status.
- */
-void msg_ui_viewer_update_play_controller(void *data, MSG_VIEWER_PLAY_STATUS_E status);
-Evas_Object *msg_ui_viewer_create_navigation_layout(Evas_Object *parent);
-Evas_Object    *msg_ui_viewer_create_navi_title_layout(MSG_PLAY_DATA_S *data);
+void msg_ui_viewer_apply_font_size(void *data);
+Evas_Object *msg_ui_viewer_create_navigation_layout(MSG_PLAY_DATA_S *viewer_play_data, Evas_Object *parent);
+Evas_Object *msg_ui_viewer_create_navi_title_layout(MSG_PLAY_DATA_S *data);
 void msg_ui_viewer_set_navi_title_layout(MSG_PLAY_DATA_S *data);
-void msg_ui_viewer_open_title_menu_genlist(void *data);
-void msg_ui_viewer_close_title_menu_genlist(void *data);
 void msg_ui_viewer_show_popup(void *data, Evas_Object *parent, char *pcontent);
-void msg_ui_viewer_create_msg_detail_popup(MSG_PLAY_DATA_S *data);
-void msg_ui_viewer_create_play_controller_timer(MSG_PLAY_DATA_S *data);
-void msg_ui_viewer_create_progressbar(MSG_PLAY_DATA_S *data, int slideIdx);
-void msg_ui_viewer_destroy_play_controller_progressbar_timer(MSG_PLAY_DATA_S *data);
-void msg_ui_viewer_destroy_play_controller_timer(MSG_PLAY_DATA_S *data);
 void msg_ui_viewer_copy_message_text_to_clipboard(MSG_PLAY_DATA_S *data);
-void msg_ui_viewer_create_volume_bar(void *data);
-void msg_ui_viewer_destroy_volume_bar(void *data);
-
-/* ========================VIEWER  CALLBACK========================*/
-/*
- *@fn          msg_ui_viewer_smil_cb(SMIL_SLIDE_EVENT_PARAM_S *eventStatus, void *appUserData);
- *@brief               This function is SMIL callback function
- * @param[in] eventStatus  this is the slide info to be used by the application.
- * @param[in] appUserData appdata structure
- * @return MSG_SMIL_ERROR_E
- */
+MSG_BOOL msg_ui_viewer_command_play_pause(void *data, MSG_VIEWER_ACTION_TYPE_E action_type);
 MSG_SMIL_ERROR_E msg_ui_viewer_smil_cb(SMIL_SLIDE_CLIENT_CB_PARAM_S *eventStatus, void *appUserData);
-MSG_SMIL_ERROR_E msg_ui_viewer_set_entry_handle_cb(MSG_PLAY_DATA_S *data, void *entry);
 Eina_Bool msg_ui_viewer_focused_in_cb(void *data, int type, void *event);
 Eina_Bool msg_ui_viewer_focused_out_cb(void *data, int type, void *event);
+MSG_SMIL_ERROR_E msg_ui_viewer_set_entry_handle_cb(MSG_PLAY_DATA_S *data, void *entry);
 Eina_Bool msg_ui_viewer_mouse_down_cb(void *data, int type, void *event);
 Eina_Bool msg_ui_viewer_mouse_up_cb(void *data, int type, void *event);
 void msg_ui_viewer_play_layout_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
 void msg_ui_viewer_play_layout_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
 void msg_ui_viewer_play_layout_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
 void msg_ui_viewer_title_button_clicked_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_save_button_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_delete_button_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_forward_button_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_resend_button_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_reply_button_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_more_button_cb(void *data, Evas_Object *obj, void *event_info);
 void msg_ui_viewer_back_button_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_toolbar_email_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_toolbar_call_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_toolbar_vcall_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_toolbar_add_to_contact_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_toolbar_view_contact_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_toolbar_block_address_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_toolbar_unblock_address_cb(void *data, Evas_Object *obj, void *event_info);
+int msg_ui_viewer_get_thread_address_count(MSG_PLAY_DATA_S *data);
+void msg_ui_viewer_get_thread_address_nth_address(MSG_PLAY_DATA_S *data, int number, char **address, int *contact_id);
+void msg_ui_viewer_title_update(MSG_PLAY_DATA_S *data, MSG_VIEWER_OPTION_CHANGE_TYPE_E option_type);
+void msg_ui_viewer_set_font_size(MSG_PLAY_DATA_S *data, MSG_VIEWER_ENTRY_TYPE_E entry_type, MSG_VIEWER_FONT_CHANGE_TYPE_E change_type);
+void msg_ui_viewer_popup_block_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_popup_timeout_cb(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_display_drm_list_popup(MSG_PLAY_DATA_S *data);
+
+/* options */
+void msg_ui_viewer_option_create_title_menu(void *data);
+void msg_ui_viewer_option_destroy_title_menu(void *data);
+void msg_ui_viewer_option_save_attachment_menu(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_create_more_popup(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_create_delete_popup(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_forward_menu_cb(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_resend_menu_cb(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_create_msg_detail_popup(MSG_PLAY_DATA_S *data);
+void msg_ui_viewer_option_email_menu(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_call_menu(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_vcall_menu(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_add_to_contact_menu(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_view_contact_menu(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_block_address_menu(void *data, Evas_Object *obj, void *event_info);
+void msg_ui_viewer_option_unblock_address_menu(void *data, Evas_Object *obj, void *event_info);
 
 /* Play controller */
-void msg_ui_viewer_volume_button_cb(void *data, Evas_Object *o, const char *emission, const char *source);
-void msg_ui_viewer_prev_button_cb(void *data, Evas_Object *o, const char *emission, const char *source);
-void msg_ui_viewer_play_pause_button_cb(void *data, Evas_Object *o, const char *emission, const char *source);
-void msg_ui_viewer_next_button_cb(void *data, Evas_Object *o, const char *emission, const char *source);
-Eina_Bool  msg_ui_viewer_play_controller_progressbar_timer_cb(void *data);
+void msg_ui_viewer_play_controller_create(MSG_PLAY_DATA_S *data);
+void msg_ui_viewer_play_controller_update(void *data, MSG_VIEWER_PLAY_STATUS_E status);
+void msg_ui_viewer_play_controller_volume_clicked_cb(void *data, Evas_Object *o, const char *emission, const char *source);
+void msg_ui_viewer_play_controller_prev_clicked_cb(void *data, Evas_Object *o, const char *emission, const char *source);
+void msg_ui_viewer_play_controller_play_pause_clicked_cb(void *data, Evas_Object *o, const char *emission, const char *source);
+void msg_ui_viewer_play_controller_next_clicked_cb(void *data, Evas_Object *o, const char *emission, const char *source);
+void msg_ui_viewer_play_controller_create_timer(MSG_PLAY_DATA_S *data);
 Eina_Bool msg_ui_viewer_play_controller_timer_cb(void *data);
-MSG_BOOL msg_ui_viewer_command_play_pause(void *data, MSG_VIEWER_ACTION_TYPE_E action_type);
+void msg_ui_viewer_play_controller_destroy_timer(MSG_PLAY_DATA_S *data);
+void msg_ui_viewer_play_controller_create_progressbar(MSG_PLAY_DATA_S *data, int slideIdx);
+Eina_Bool  msg_ui_viewer_play_controller_progressbar_timer_cb(void *data);
 
-/* help page create cb - called from SMIL renderer */
-MSG_SMIL_ERROR_E msg_ui_viewer_help_page_smilrenderer_cb(MSG_PLAY_DATA_S *data, void **attach_list, void *box);
+/* volume bar */
+void msg_ui_viewer_grab_volume_key(void *data);
+void msg_ui_viewer_ungrab_volume_key(void *data);
+Eina_Bool msg_ui_viewer_volume_key_release_cb(void *data, int type, void *event);
+Eina_Bool msg_ui_viewer_volume_key_press_cb(void *data, int type, void *event);
+void msg_ui_viewer_create_volume_bar(void *data);
+void msg_ui_viewer_destroy_volume_bar(void *data);
+
+/* help page */
+MSG_SMIL_ERROR_E msg_ui_viewer_help_page_create_list(MSG_PLAY_DATA_S *data, void **attach_list, void *box);
+void msg_ui_viewer_help_page_save_all_button_clicked_cb(void *data, Evas_Object *obj, void *event_info);
 void msg_ui_viewer_help_page_save_button_clicked_cb(void *data, Evas_Object *obj, void *event_info);
 
-/* popup */
+/* attachment */
 void msg_ui_viewer_create_save_attachments_popup(MSG_PLAY_DATA_S *data);
-void msg_ui_viewer_popup_block_clicked_cb(void *data, Evas_Object *obj, void *event_info);
-void msg_ui_viewer_popup_timeout_cb(void *data, Evas_Object *obj, void *event_info);
 
-/* message info */
-int msg_ui_viewer_get_thread_address_count(MSG_PLAY_DATA_S *data);
-void msg_ui_viewer_get_thread_address_nth_address(MSG_PLAY_DATA_S *data, int number, char **address, int *contact_id);
-void msg_ui_viewer_title_update(MSG_PLAY_DATA_S *data, MSG_VIEWER_OPTION_CHANGE_TYPE_E option_type);
-MSG_BOOL msg_ui_viewer_check_address_is_blocked(void *data, char *address, int *filter_id);
-void msg_ui_viewer_set_font_size(MSG_PLAY_DATA_S *data, MSG_VIEWER_ENTRY_TYPE_E entry_type, MSG_VIEWER_FONT_CHANGE_TYPE_E change_type);
 #endif /* __MSG_UI_VIEWER_PLAY_VIEW_H__*/