wgui_inline_edit.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:887k
源码类别:
MTK
开发平台:
C/C++
- if (ii->input_type & INPUT_TYPE_PLUS_CHARACTER_HANDLING)
- {
- l += ENCODING_LENGTH;
- }
- size = INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + sizeof(S32) + l;
- }
- break;
- case INLINE_ITEM_TYPE_FULL_SCREEN_EDIT:
- {
- S32 l;
- wgui_inline_item_text_edit *ii = (wgui_inline_item_text_edit*) wgui_inline_items[i].item;
- l = ii->buffer_size * ENCODING_LENGTH;
- if (ii->input_type & INPUT_TYPE_PLUS_CHARACTER_HANDLING)
- {
- l += ENCODING_LENGTH;
- }
- size = INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + sizeof(U32) + sizeof(S32) + (l << 1);
- }
- break;
- case INLINE_ITEM_TYPE_SELECT:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 2;
- }
- break;
- /* Gurinder - 30/4/2004 - Att. Control History */
- case INLINE_ITEM_ATTACH_IMAGE:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 2;
- }
- break;
- case INLINE_ITEM_TYPE_DATE:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 5 * ENCODING_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH;
- }
- break;
- case INLINE_ITEM_TYPE_TIME:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH;
- }
- break;
- case INLINE_ITEM_TYPE_TIME_PERIOD:
- {
- size =
- INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH +
- 3 * ENCODING_LENGTH;
- }
- break;
- case INLINE_ITEM_TYPE_IP4_EDIT:
- {
- size =
- INLINE_ITEM_DATA_ID_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH +
- 4 * ENCODING_LENGTH;
- }
- break;
- case INLINE_ITEM_TYPE_DOW_SELECT:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 7;
- }
- break;
- #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) /* 4/5 */
- case INLINE_ITEM_TYPE_MULTI_LINE_EDIT:
- case INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + sizeof(multiline_inputbox_category_history);
- }
- break;
- #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */
- case INLINE_ITEM_TYPE_COLOR_SELECT:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 4;
- }
- break;
- }
- total_size += size;
- }
- return (total_size);
- }
- /* Gurinder - 14/5/2004- Added For Append Function InlineItemText */
- /*****************************************************************************
- * FUNCTION
- * get_inline_item_text_edit_offset
- * DESCRIPTION
- *
- * PARAMETERS
- * list_of_items [?]
- * last_item [IN]
- * flag [IN]
- * RETURNS
- *
- *****************************************************************************/
- S32 get_inline_item_text_edit_offset(InlineItem *list_of_items, S32 last_item, U8 flag)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, total_size = 0, size;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; i <= last_item - flag; i++)
- {
- size = 0;
- switch (list_of_items[i].flags & 0xff)
- {
- case INLINE_ITEM_TYPE_CAPTION:
- case INLINE_ITEM_TYPE_DISPLAY_ONLY:
- case INLINE_ITEM_TYPE_USER_DEFINED_SELECT:
- break;
- case INLINE_ITEM_TYPE_TEXT_EDIT:
- {
- S32 l;
- wgui_inline_item_text_edit *ii = (wgui_inline_item_text_edit*) list_of_items[i].item;
- l = ii->buffer_size * ENCODING_LENGTH;
- if (ii->input_type & INPUT_TYPE_PLUS_CHARACTER_HANDLING)
- {
- l += ENCODING_LENGTH;
- }
- if (i == last_item)
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + sizeof(S32);
- }
- else
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + sizeof(S32) + l;
- }
- }
- break;
- case INLINE_ITEM_TYPE_FULL_SCREEN_EDIT:
- {
- S32 l;
- wgui_inline_item_text_edit *ii = (wgui_inline_item_text_edit*) list_of_items[i].item;
- l = ii->buffer_size * ENCODING_LENGTH;
- if (ii->input_type & INPUT_TYPE_PLUS_CHARACTER_HANDLING)
- {
- l += ENCODING_LENGTH;
- }
- size = INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + sizeof(U32) + sizeof(S32) + (l << 1);
- }
- break;
- case INLINE_ITEM_TYPE_SELECT:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 2;
- }
- break;
- case INLINE_ITEM_ATTACH_IMAGE:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 2;
- }
- break;
- case INLINE_ITEM_TYPE_DATE:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 5 * ENCODING_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH;
- }
- break;
- case INLINE_ITEM_TYPE_TIME:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH;
- }
- break;
- case INLINE_ITEM_TYPE_TIME_PERIOD:
- {
- size =
- INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH +
- 3 * ENCODING_LENGTH;
- }
- break;
- case INLINE_ITEM_TYPE_IP4_EDIT:
- {
- size =
- INLINE_ITEM_DATA_ID_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH +
- 4 * ENCODING_LENGTH;
- }
- break;
- case INLINE_ITEM_TYPE_DOW_SELECT:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 7;
- }
- break;
- #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
- case INLINE_ITEM_TYPE_MULTI_LINE_EDIT:
- case INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + sizeof(multiline_inputbox_category_history);
- }
- break;
- #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */
- case INLINE_ITEM_TYPE_COLOR_SELECT:
- {
- size = INLINE_ITEM_DATA_ID_LENGTH + 4;
- }
- break;
- }
- total_size += size;
- }
- return (total_size);
- }
- /* Gurinder - 14/5/2004- Added For Append Function InlineItemText */
- /*****************************************************************************
- * FUNCTION
- * AppendInlineItemTextEditString
- * DESCRIPTION
- *
- * PARAMETERS
- * input_type [IN]
- * buffer [?]
- * list_of_items [?]
- * number_of_items [IN]
- * size [?]
- * history [?]
- * plus_handling [IN]
- * RETURNS
- *
- *****************************************************************************/
- S32 AppendInlineItemTextEditString(
- S16 input_type,
- U8 *buffer,
- InlineItem *list_of_items,
- S32 number_of_items,
- S32 *size,
- history *history,
- U8 plus_handling)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *gui_buffer;
- U8 *input_buffer;
- U8 *data_buffer;
- /* U32 *flags; */
- S32 s;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* byte list_menu_changed=1; */
- gui_buffer = history->guiBuffer;
- input_buffer = history->inputBuffer;
- if (!set_list_menu_category_history(MMI_CATEGORY57_ID, gui_buffer))
- {
- return -1;
- }
- if (MMI_fixed_list_menu.highlighted_item > number_of_items)
- {
- return -1;
- }
- s = sizeof(list_menu_category_history);
- s = (s + 3) / 4;
- s *= 4;
- /* Gurinder - 14/6/2004 - History Problem In Append. */
- gdi_layer_lock_frame_buffer();
- set_wgui_inline_list_menu_changed();
- gdi_layer_unlock_frame_buffer();
- memcpy(gui_buffer + s, &wgui_inline_list_menu_changed, sizeof(U32));
- /* End Gurinder 14/6/2004 */
- inline_text_edit_set_history(INLINE_TEXT_EDIT_HISTORY_ID, (gui_buffer + s + sizeof(U32)), &input_type);
- data_buffer =
- input_buffer + get_inline_item_text_edit_offset(list_of_items, MMI_fixed_list_menu.highlighted_item, 0);
- /* For Append String */
- if (plus_handling == 1)
- {
- if (MMI_inline_singleline_inputbox.text_length == 2)
- {
- if (buffer[0] != '+')
- {
- plus_handling = 0;
- }
- }
- else
- {
- if (data_buffer[0] != '+')
- {
- plus_handling = 0;
- }
- }
- }
- else
- {
- plus_handling = 0;
- }
- if ((MMI_inline_singleline_inputbox.allocated_length - MMI_inline_singleline_inputbox.text_length) >=
- (pfnUnicodeStrlen((PS8) buffer) - plus_handling) * ENCODING_LENGTH)
- {
- memcpy(
- data_buffer + MMI_inline_singleline_inputbox.text_length - ENCODING_LENGTH,
- buffer,
- (pfnUnicodeStrlen((PS8) buffer) + 1) * ENCODING_LENGTH);
- }
- else
- {
- memcpy(
- data_buffer + MMI_inline_singleline_inputbox.text_length - ENCODING_LENGTH,
- buffer,
- MMI_inline_singleline_inputbox.allocated_length - MMI_inline_singleline_inputbox.text_length - ENCODING_LENGTH);
- memcpy(data_buffer + MMI_inline_singleline_inputbox.allocated_length - ENCODING_LENGTH, ' ', ENCODING_LENGTH);
- }
- /*
- * For Set String
- * if(MMI_inline_singleline_inputbox.allocated_length-ENCODING_LENGTH>pfnUnicodeStrlen((PS8)buffer)*ENCODING_LENGTH)
- * {
- * memcpy(data_buffer, buffer, (pfnUnicodeStrlen((PS8)buffer)+1)*ENCODING_LENGTH);
- * }
- * else
- * {
- * memcpy(data_buffer,buffer,MMI_inline_singleline_inputbox.allocated_length-ENCODING_LENGTH);
- * memcpy(data_buffer+MMI_inline_singleline_inputbox.allocated_length-ENCODING_LENGTH,' ',ENCODING_LENGTH);
- * }
- */
- MMI_inline_singleline_inputbox.text_length = pfnUnicodeStrlen((PS8) data_buffer) * ENCODING_LENGTH + ENCODING_LENGTH;
- MMI_inline_singleline_inputbox.text = data_buffer;
- MMI_inline_singleline_inputbox.current_text_p = MMI_inline_singleline_inputbox.text; /* (UI_buffer_type)(MMI_inline_singleline_inputbox.text+(MMI_inline_singleline_inputbox.text_length-ENCODING_LENGTH)); */
- inline_text_edit_get_history((U8*) (gui_buffer + s + sizeof(U32)), MMI_current_input_type);
- *size = get_inline_item_text_edit_offset(list_of_items, number_of_items, 1);
- return 0;
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_get_inline_data
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- *
- *****************************************************************************/
- U8 *wgui_get_inline_data(U8 *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, offset = 0, size;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; i < wgui_n_inline_items; i++)
- {
- size = 0;
- switch (wgui_inline_items[i].flags & 0xff)
- {
- case INLINE_ITEM_TYPE_CAPTION:
- case INLINE_ITEM_TYPE_DISPLAY_ONLY:
- case INLINE_ITEM_TYPE_USER_DEFINED_SELECT:
- break;
- case INLINE_ITEM_TYPE_TEXT_EDIT:
- {
- S32 l;
- U16 ID = INLINE_ITEM_TEXT_EDIT_DATA_ID;
- wgui_inline_item_text_edit *ii = (wgui_inline_item_text_edit*) wgui_inline_items[i].item;
- l = ii->buffer_size * ENCODING_LENGTH;
- if (ii->input_type & INPUT_TYPE_PLUS_CHARACTER_HANDLING)
- {
- l += ENCODING_LENGTH;
- }
- size = INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + sizeof(S32) + l;
- gui_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- gui_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (U8*) & l,
- INLINE_ITEM_DATA_SIZE_LENGTH);
- gui_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH],
- (U8*) & (ii->UCS2_count),
- sizeof(S32));
- gui_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + sizeof(S32)],
- (U8*) ii->buffer,
- l);
- }
- break;
- case INLINE_ITEM_TYPE_FULL_SCREEN_EDIT:
- {
- S32 l;
- U16 ID = INLINE_ITEM_FULL_SCREEN_EDIT_DATA_ID;
- wgui_inline_item_text_edit *ii = (wgui_inline_item_text_edit*) wgui_inline_items[i].item;
- U32 flags = 0;
- S32 flags_size = sizeof(U32);
- flags = (U32) (wgui_inline_items[i].flags >> 8);
- l = ii->buffer_size * ENCODING_LENGTH;
- if (ii->input_type & INPUT_TYPE_PLUS_CHARACTER_HANDLING)
- {
- l += ENCODING_LENGTH;
- }
- size = INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + flags_size + (l << 1) + sizeof(S32);
- gui_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- gui_memcpy((U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH], (U8*) & flags, flags_size);
- gui_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + flags_size],
- (U8*) & l,
- INLINE_ITEM_DATA_SIZE_LENGTH);
- gui_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + flags_size + INLINE_ITEM_DATA_SIZE_LENGTH],
- (U8*) & (ii->UCS2_count),
- sizeof(S32));
- gui_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + flags_size + sizeof(S32)],
- (U8*) wgui_inline_full_screen_text_edit_buffer,
- l);
- gui_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + flags_size + sizeof(S32) + l],
- (U8*) ii->buffer,
- l);
- }
- break;
- case INLINE_ITEM_TYPE_SELECT:
- {
- U16 ID = INLINE_ITEM_SELECT_DATA_ID;
- S32 highlighted_item;
- wgui_inline_item_select *ii = (wgui_inline_item_select*) wgui_inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 2;
- highlighted_item = *ii->highlighted_item;
- gui_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- gui_memcpy((U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH], (U8*) & highlighted_item, 2);
- }
- break;
- /* Gurinder - 30/4/2004 - Att. Control History */
- case INLINE_ITEM_ATTACH_IMAGE:
- {
- U16 ID = INLINE_ITEM_ATTACH_IMAGE_DATA_ID;
- S32 higlighted_item;
- wgui_inline_image_attachment *ii = (wgui_inline_image_attachment*) wgui_inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 2;
- higlighted_item = ii->highlited_image;
- gui_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- gui_memcpy((U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH], (U8*) & higlighted_item, 2);
- }
- break;
- case INLINE_ITEM_TYPE_DATE:
- {
- U16 ID = INLINE_ITEM_DATE_DATA_ID;
- wgui_inline_item_date *ii = (wgui_inline_item_date*) wgui_inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 5 * ENCODING_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH;
- gui_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (UI_string_type) ii->year_buffer);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 5 * ENCODING_LENGTH],
- (UI_string_type) ii->month_buffer);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 5 * ENCODING_LENGTH + 3 * ENCODING_LENGTH],
- (UI_string_type) ii->day_buffer);
- }
- break;
- case INLINE_ITEM_TYPE_TIME:
- {
- U16 ID = INLINE_ITEM_TIME_DATA_ID;
- wgui_inline_item_time *ii = (wgui_inline_item_time*) wgui_inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH;
- gui_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (UI_string_type) ii->hours_buffer);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH],
- (UI_string_type) ii->minutes_buffer);
- }
- break;
- case INLINE_ITEM_TYPE_TIME_PERIOD:
- {
- U16 ID = INLINE_ITEM_TIME_PERIOD_DATA_ID;
- wgui_inline_item_time_period *ii = (wgui_inline_item_time_period*) wgui_inline_items[i].item;
- size =
- INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH +
- 3 * ENCODING_LENGTH;
- gui_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (UI_string_type) ii->hours_buffer1);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH],
- (UI_string_type) ii->minutes_buffer1);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH],
- (UI_string_type) ii->hours_buffer2);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH],
- (UI_string_type) ii->minutes_buffer2);
- }
- break;
- case INLINE_ITEM_TYPE_IP4_EDIT:
- {
- U16 ID = INLINE_ITEM_IP4_EDIT_DATA_ID;
- wgui_inline_item_IP4 *ii = (wgui_inline_item_IP4*) wgui_inline_items[i].item;
- size =
- INLINE_ITEM_DATA_ID_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH +
- 4 * ENCODING_LENGTH;
- gui_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- gui_strcpy((UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH], (UI_string_type) ii->b1);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 4 * ENCODING_LENGTH],
- (UI_string_type) ii->b2);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH],
- (UI_string_type) ii->b3);
- gui_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH],
- (UI_string_type) ii->b4);
- }
- break;
- case INLINE_ITEM_TYPE_DOW_SELECT:
- {
- U16 ID = INLINE_ITEM_DOW_SELECT_DATA_ID;
- wgui_inline_item_DOW_select *ii = (wgui_inline_item_DOW_select*) wgui_inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 7;
- gui_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- gui_memcpy((U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH], (U8*) ii->list_of_states, 7);
- }
- break;
- #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) /* 4/5 */
- case INLINE_ITEM_TYPE_MULTI_LINE_EDIT:
- case INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY:
- {
- /* U16 ID=INLINE_ITEM_TYPE_MULTI_LINE_DATA_ID; */
- size = INLINE_ITEM_DATA_ID_LENGTH + sizeof(multiline_inputbox_category_history);
- get_multiline_inputbox_category_history(
- MMI_INLINE_BOX_HISTORY_ID,
- &data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- MMI_current_input_type);
- }
- break;
- #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */
- case INLINE_ITEM_TYPE_COLOR_SELECT:
- {
- U16 ID = INLINE_ITEM_COLOR_SELECT_DATA_ID;
- S32 highlighted_index;
- S32 start_index;
- wgui_inline_item_color_select *ii = (wgui_inline_item_color_select*) wgui_inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 4;
- highlighted_index = ii->highlighted_index;
- start_index = ii->start_index;
- gui_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- gui_memcpy((U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH], (U8*) & highlighted_index, 2);
- gui_memcpy((U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 2], (U8*) & start_index, 2);
- }
- break;
- }
- offset += size;
- }
- return (data);
- }
- #define reverse_pixtel_UI_memcpy(b1,b2,n) gui_memcpy((b2),(b1),(n))
- #define reverse_pixtel_UI_strcpy(s1,s2) gui_strcpy(s2,s1)
- /*****************************************************************************
- * FUNCTION
- * wgui_set_inline_data
- * DESCRIPTION
- *
- * PARAMETERS
- * inline_items [?]
- * n_items [IN]
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_set_inline_data(wgui_inline_item *inline_items, S32 n_items, U8 *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, offset = 0, size;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (data == NULL)
- {
- return;
- }
- for (i = 0; i < n_items; i++)
- {
- size = 0;
- switch (inline_items[i].flags & 0xff)
- {
- case INLINE_ITEM_TYPE_CAPTION:
- case INLINE_ITEM_TYPE_DISPLAY_ONLY:
- case INLINE_ITEM_TYPE_USER_DEFINED_SELECT:
- break;
- case INLINE_ITEM_TYPE_TEXT_EDIT:
- {
- S32 l;
- U16 ID = INLINE_ITEM_TEXT_EDIT_DATA_ID;
- wgui_inline_item_text_edit *ii = (wgui_inline_item_text_edit*) inline_items[i].item;
- l = ii->buffer_size * ENCODING_LENGTH;
- if (ii->input_type & INPUT_TYPE_PLUS_CHARACTER_HANDLING)
- {
- l += ENCODING_LENGTH;
- }
- size = INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + sizeof(S32) + l;
- reverse_pixtel_UI_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (U8*) & l,
- INLINE_ITEM_DATA_SIZE_LENGTH);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH],
- (U8*) & (ii->UCS2_count),
- sizeof(S32));
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + sizeof(S32)],
- (U8*) ii->buffer,
- l);
- }
- break;
- case INLINE_ITEM_TYPE_FULL_SCREEN_EDIT:
- {
- S32 l;
- U16 ID = INLINE_ITEM_FULL_SCREEN_EDIT_DATA_ID;
- U32 flags;
- S32 flags_size = sizeof(U32);
- wgui_inline_item_text_edit *ii = (wgui_inline_item_text_edit*) inline_items[i].item;
- l = ii->buffer_size * ENCODING_LENGTH;
- if (ii->input_type & INPUT_TYPE_PLUS_CHARACTER_HANDLING)
- {
- l += ENCODING_LENGTH;
- }
- size = INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + flags_size + (l << 1) + sizeof(S32);
- reverse_pixtel_UI_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (U8*) & flags,
- flags_size);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + flags_size],
- (U8*) & l,
- INLINE_ITEM_DATA_SIZE_LENGTH);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + flags_size + INLINE_ITEM_DATA_SIZE_LENGTH],
- (U8*) & (ii->UCS2_count),
- sizeof(S32));
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + flags_size + sizeof(S32)],
- (U8*) wgui_inline_full_screen_text_edit_buffer,
- l);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + INLINE_ITEM_DATA_SIZE_LENGTH + flags_size + sizeof(S32) + l],
- (U8*) ii->buffer,
- l);
- inline_items[i].flags &= 0x000000ff;
- inline_items[i].flags |= flags << 8;
- ii->flags |= (inline_items[i].flags & 0xffffff00);
- }
- break;
- case INLINE_ITEM_TYPE_SELECT:
- {
- U16 ID = INLINE_ITEM_SELECT_DATA_ID;
- S32 highlighted_item = 0;
- wgui_inline_item_select *ii = (wgui_inline_item_select*) inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 2;
- reverse_pixtel_UI_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (U8*) & highlighted_item,
- 2);
- *ii->highlighted_item = highlighted_item;
- if ((highlighted_item >= 0) && (highlighted_item < ii->n_items))
- {
- inline_items[i].text_p = ii->list_of_strings[highlighted_item];
- }
- }
- break;
- /* Gurinder - 30/4/2004 - Att. Control History */
- case INLINE_ITEM_ATTACH_IMAGE:
- {
- U16 ID = INLINE_ITEM_ATTACH_IMAGE_DATA_ID;
- S32 highlighted_item = 0;
- //wgui_inline_image_attachment *ii = (wgui_inline_image_attachment*) inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 2;
- reverse_pixtel_UI_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (U8*) & highlighted_item,
- 2);
- /* do not apply history, application will set index */
- //ii->highlited_image = (S16) highlighted_item;
- }
- break;
- case INLINE_ITEM_TYPE_DATE:
- {
- U16 ID = INLINE_ITEM_DATE_DATA_ID;
- wgui_inline_item_date *ii = (wgui_inline_item_date*) inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 5 * ENCODING_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH;
- reverse_pixtel_UI_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (UI_string_type) ii->year_buffer);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 5 * ENCODING_LENGTH],
- (UI_string_type) ii->month_buffer);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 5 * ENCODING_LENGTH + 3 * ENCODING_LENGTH],
- (UI_string_type) ii->day_buffer);
- ii->string_construct_callback(
- inline_items[i].text_p,
- ii->day_buffer,
- ii->month_buffer,
- ii->year_buffer);
- }
- break;
- case INLINE_ITEM_TYPE_TIME:
- {
- U16 ID = INLINE_ITEM_TIME_DATA_ID;
- wgui_inline_item_time *ii = (wgui_inline_item_time*) inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH;
- reverse_pixtel_UI_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (UI_string_type) ii->hours_buffer);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH],
- (UI_string_type) ii->minutes_buffer);
- ii->string_construct_callback(
- inline_items[i].text_p,
- ii->hours_buffer,
- ii->minutes_buffer,
- ii->AM_PM_flag);
- }
- break;
- case INLINE_ITEM_TYPE_TIME_PERIOD:
- {
- U16 ID = INLINE_ITEM_TIME_PERIOD_DATA_ID;
- wgui_inline_item_time_period *ii = (wgui_inline_item_time_period*) inline_items[i].item;
- size =
- INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH +
- 3 * ENCODING_LENGTH;
- reverse_pixtel_UI_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (UI_string_type) ii->hours_buffer1);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH],
- (UI_string_type) ii->minutes_buffer1);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH],
- (UI_string_type) ii->hours_buffer2);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH + 3 * ENCODING_LENGTH],
- (UI_string_type) ii->minutes_buffer2);
- ii->string_construct_callback(
- inline_items[i].text_p,
- ii->hours_buffer1,
- ii->minutes_buffer1,
- ii->AM_PM_flag1,
- ii->hours_buffer2,
- ii->minutes_buffer2,
- ii->AM_PM_flag2);
- }
- break;
- case INLINE_ITEM_TYPE_IP4_EDIT:
- {
- U16 ID = INLINE_ITEM_IP4_EDIT_DATA_ID;
- wgui_inline_item_IP4 *ii = (wgui_inline_item_IP4*) inline_items[i].item;
- size =
- INLINE_ITEM_DATA_ID_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH +
- 4 * ENCODING_LENGTH;
- reverse_pixtel_UI_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (UI_string_type) ii->b1);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 4 * ENCODING_LENGTH],
- (UI_string_type) ii->b2);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH],
- (UI_string_type) ii->b3);
- reverse_pixtel_UI_strcpy(
- (UI_string_type) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH + 4 * ENCODING_LENGTH],
- (UI_string_type) ii->b4);
- ii->string_construct_callback(inline_items[i].text_p, ii->b1, ii->b2, ii->b3, ii->b4);
- }
- break;
- case INLINE_ITEM_TYPE_DOW_SELECT:
- {
- U16 ID = INLINE_ITEM_DOW_SELECT_DATA_ID;
- wgui_inline_item_DOW_select *ii = (wgui_inline_item_DOW_select*) inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 7;
- reverse_pixtel_UI_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (U8*) ii->list_of_states,
- 7);
- }
- break;
- #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) /* 4/5 */
- case INLINE_ITEM_TYPE_MULTI_LINE_EDIT:
- case INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY:
- {
- /* Start Yogesh 20040813 */
- wgui_inline_item_text_edit *ii = (wgui_inline_item_text_edit*) inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + sizeof(multiline_inputbox_category_history);
- set_multiline_inputbox_category_history(
- MMI_INLINE_BOX_HISTORY_ID,
- &data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (S16*) & MMI_current_input_type);
- ii->input_type = MMI_current_input_type;
- flag_use_current_input_type = TRUE;
- /* End Yogesh 20040813 */
- }
- break;
- #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */
- case INLINE_ITEM_TYPE_COLOR_SELECT:
- {
- U16 ID = INLINE_ITEM_SELECT_DATA_ID;
- S32 highlighted_index = 0;
- S32 start_index = 0;
- wgui_inline_item_color_select *ii = (wgui_inline_item_color_select*) inline_items[i].item;
- size = INLINE_ITEM_DATA_ID_LENGTH + 4;
- reverse_pixtel_UI_memcpy((U8*) & data[offset], (U8*) & ID, INLINE_ITEM_DATA_ID_LENGTH);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH],
- (U8*) & highlighted_index,
- 2);
- reverse_pixtel_UI_memcpy(
- (U8*) & data[offset + INLINE_ITEM_DATA_ID_LENGTH + 2],
- (U8*) & start_index,
- 2);
- ii->highlighted_index = (U16) (highlighted_index);
- ii->start_index = (U16) (start_index);
- }
- break;
- }
- offset += size;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_update_inline_data
- * DESCRIPTION
- * To update inline buffer to user buffer before complete the inline item
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_update_inline_data(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; i < wgui_n_inline_items; i++)
- {
- switch (wgui_inline_items[i].flags & 0xff)
- {
- case INLINE_ITEM_TYPE_CAPTION:
- case INLINE_ITEM_TYPE_DISPLAY_ONLY:
- case INLINE_ITEM_TYPE_USER_DEFINED_SELECT:
- break;
- case INLINE_ITEM_TYPE_TEXT_EDIT:
- gui_strcpy(
- (UI_string_type) current_wgui_inline_text_edit_item->buffer,
- (UI_string_type) wgui_inline_text_edit_buffer);
- break;
- case INLINE_ITEM_TYPE_FULL_SCREEN_EDIT:
- gui_strcpy(
- (UI_string_type) current_wgui_inline_text_edit_item->buffer,
- (UI_string_type) wgui_inline_full_screen_text_edit_buffer);
- break;
- case INLINE_ITEM_TYPE_SELECT:
- break;
- case INLINE_ITEM_ATTACH_IMAGE:
- break;
- case INLINE_ITEM_TYPE_DATE:
- gui_strcpy(
- (UI_string_type) current_wgui_inline_date_item->day_buffer,
- (UI_string_type) wgui_inline_date_edit_day_buffer);
- gui_strcpy(
- (UI_string_type) current_wgui_inline_date_item->month_buffer,
- (UI_string_type) wgui_inline_date_edit_month_buffer);
- gui_strcpy(
- (UI_string_type) current_wgui_inline_date_item->year_buffer,
- (UI_string_type) wgui_inline_date_edit_year_buffer);
- break;
- case INLINE_ITEM_TYPE_TIME:
- gui_strcpy(
- (UI_string_type) current_wgui_inline_time_item->hours_buffer,
- (UI_string_type) wgui_inline_time_edit_hours_buffer);
- gui_strcpy(
- (UI_string_type) current_wgui_inline_time_item->minutes_buffer,
- (UI_string_type) wgui_inline_time_edit_minutes_buffer);
- gui_strcpy(
- (UI_string_type) current_wgui_inline_time_item->seconds_buffer,
- (UI_string_type) wgui_inline_time_edit_seconds_buffer);
- break;
- case INLINE_ITEM_TYPE_TIME_PERIOD:
- gui_strcpy(
- (UI_string_type) current_wgui_inline_time_period_item->hours_buffer1,
- (UI_string_type) wgui_inline_time_period_edit_hours_buffer1);
- gui_strcpy(
- (UI_string_type) current_wgui_inline_time_period_item->minutes_buffer1,
- (UI_string_type) wgui_inline_time_period_edit_minutes_buffer1);
- gui_strcpy(
- (UI_string_type) current_wgui_inline_time_period_item->hours_buffer2,
- (UI_string_type) wgui_inline_time_period_edit_hours_buffer2);
- gui_strcpy(
- (UI_string_type) current_wgui_inline_time_period_item->minutes_buffer2,
- (UI_string_type) wgui_inline_time_period_edit_minutes_buffer2);
- break;
- case INLINE_ITEM_TYPE_IP4_EDIT:
- gui_strcpy(
- (UI_string_type) current_wgui_inline_IP4_item->b1,
- (UI_string_type) wgui_inline_IP4_edit_buffer1);
- gui_strcpy(
- (UI_string_type) current_wgui_inline_IP4_item->b2,
- (UI_string_type) wgui_inline_IP4_edit_buffer2);
- gui_strcpy(
- (UI_string_type) current_wgui_inline_IP4_item->b3,
- (UI_string_type) wgui_inline_IP4_edit_buffer3);
- gui_strcpy(
- (UI_string_type) current_wgui_inline_IP4_item->b4,
- (UI_string_type) wgui_inline_IP4_edit_buffer4);
- break;
- case INLINE_ITEM_TYPE_DOW_SELECT:
- break;
- #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
- case INLINE_ITEM_TYPE_MULTI_LINE_EDIT:
- gui_strcpy(
- (UI_string_type) current_wgui_inline_text_edit_item->buffer,
- (UI_string_type) wgui_inline_full_screen_text_edit_buffer);
- break;
- case INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY:
- break;
- #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */
- case INLINE_ITEM_TYPE_COLOR_SELECT:
- break;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * GetInlineEditUCS2Count
- * DESCRIPTION
- *
- * PARAMETERS
- * i [?]
- * RETURNS
- *
- *****************************************************************************/
- S32 GetInlineEditUCS2Count(wgui_inline_item *i)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 r = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (i->flags & 0xff)
- {
- case INLINE_ITEM_TYPE_TEXT_EDIT:
- case INLINE_ITEM_TYPE_FULL_SCREEN_EDIT:
- {
- wgui_inline_item_text_edit *p = (wgui_inline_item_text_edit*) i->item;
- r = p->UCS2_count;
- }
- break;
- }
- return (r);
- }
- /*----------------------------------------------------------------------------
- Default unhighlight handler used for inline editing menu
- ----------------------------------------------------------------------------*/
- /*****************************************************************************
- * FUNCTION
- * wgui_inline_edit_default_list_unhighlight_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * item_index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_inline_edit_default_list_unhighlight_handler(S32 item_index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* W05.33 Fix inline text edit history issue */
- wgui_current_inline_item_type = 0;
- if (item_index > 0 &&
- ((wgui_inline_items[item_index].flags & INLINE_ITEM_TYPE_MULTI_LINE_EDIT) == INLINE_ITEM_TYPE_MULTI_LINE_EDIT))
- {
- reset_multiline_inputbox_vertical_scroll();
- }
- }
- /*----------------------------------------------------------------------------
- Default highlight handler used for inline editing menu
- ----------------------------------------------------------------------------*/
- /*****************************************************************************
- * FUNCTION
- * wgui_inline_edit_default_list_highlight_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * item_index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_inline_edit_default_list_highlight_handler(S32 item_index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_menu_shortcut_number = item_index + 1;
- MMI_highlighted_item_text = get_item_text(item_index);
- wgui_inline_item_handled = 0;
- wgui_inline_item_highlighted_index = item_index;
- register_default_hide_softkeys();
- complete_inline_item_edit = UI_dummy_function;
- current_wgui_inline_item = &wgui_inline_items[item_index];
- if (wgui_inline_items[item_index].flags & INLINE_ITEM_DISABLED)
- {
- if (wgui_inline_edit_arrow_key_flag == CATEGORY57_UP_ARROW_KEY_FLAG)
- {
- gui_fixed_list_menu_goto_previous_item(&MMI_fixed_list_menu);
- }
- else if (wgui_inline_edit_arrow_key_flag == CATEGORY57_DOWN_ARROW_KEY_FLAG)
- {
- gui_fixed_list_menu_goto_next_item(&MMI_fixed_list_menu);
- }
- else
- {
- gui_fixed_list_menu_goto_next_item(&MMI_fixed_list_menu);
- }
- return;
- }
- else if (wgui_inline_items[item_index].flags & INLINE_ITEM_FOLLOW_DOWN)
- {
- void (*saved_highlight_handler) (S32) = MMI_fixed_list_menu.item_highlighted;
- S32 display_position = MMI_fixed_list_menu.highlighted_item - MMI_fixed_list_menu.first_displayed_item + 1;
- /* PMT HIMANSHU START 20051021 */
- /* correct the check so that the menuitem will be displayed which is just below
- (follow down) the current menuitem, when the display position of current
- menuitem is greater than equal to the no of displayed menuitems. */
- /* if(display_position==MMI_fixed_list_menu.displayed_items) */
- if (display_position >= MMI_fixed_list_menu.displayed_items)
- /* PMT HIMANSHU END 20051021 */
- {
- MMI_fixed_list_menu.item_highlighted = UI_dummy_function_s32;
- gui_fixed_list_menu_goto_next_item(&MMI_fixed_list_menu);
- gui_fixed_list_menu_goto_previous_item(&MMI_fixed_list_menu);
- MMI_fixed_list_menu.item_highlighted = saved_highlight_handler;
- }
- }
- else if (wgui_inline_items[item_index].flags & INLINE_ITEM_FOLLOW_UP)
- {
- void (*saved_highlight_handler) (S32) = MMI_fixed_list_menu.item_highlighted;
- if (MMI_fixed_list_menu.highlighted_item == MMI_fixed_list_menu.first_displayed_item)
- {
- MMI_fixed_list_menu.item_highlighted = UI_dummy_function_s32;
- gui_fixed_list_menu_goto_previous_item(&MMI_fixed_list_menu);
- gui_fixed_list_menu_goto_next_item(&MMI_fixed_list_menu);
- MMI_fixed_list_menu.item_highlighted = saved_highlight_handler;
- }
- }
- /* Change the softkey functions and labels */
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- if (!mmi_pen_editor_is_closecategory57 && mmi_pen_editor_get_list_menu_height())
- {
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY);
- resize_fixed_list(MMI_content_width, mmi_pen_editor_get_list_menu_height());
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- switch (wgui_inline_items[item_index].flags & 0xff)
- {
- case INLINE_ITEM_TYPE_CAPTION:
- {
- if (wgui_inline_edit_arrow_key_flag == CATEGORY57_UP_ARROW_KEY_FLAG)
- {
- gui_fixed_list_menu_goto_previous_item(&MMI_fixed_list_menu);
- }
- else if (wgui_inline_edit_arrow_key_flag == CATEGORY57_DOWN_ARROW_KEY_FLAG)
- {
- gui_fixed_list_menu_goto_next_item(&MMI_fixed_list_menu);
- }
- else
- {
- gui_fixed_list_menu_goto_next_item(&MMI_fixed_list_menu);
- }
- return;
- }
- case INLINE_ITEM_TYPE_DISPLAY_ONLY:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- clear_left_softkey_handler();
- set_left_softkey_label(NULL);
- set_left_softkey_icon(NULL);
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- }
- break;
- case INLINE_ITEM_TYPE_TEXT_EDIT:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- set_left_softkey_label(get_string(STR_GLOBAL_OK));
- set_left_softkey_icon(NULL);
- register_left_softkey_handler();
- /* Modified for LSK calling "Back" or "Done" functions based on dirty flag */
- /* set_left_softkey_function(execute_wgui_inline_edit_DONE_function,KEY_EVENT_UP); */
- /* set_left_softkey_function(execute_wgui_inline_edit_RSK_function,KEY_EVENT_UP); */
- /* MTK Terry Temp solution for in line LSK issue */
- if (wgui_inline_list_menu_disable_done)
- {
- set_left_softkey_function(execute_wgui_inline_edit_DONE_function, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- mmi_pen_editor_set_inputbox_LSK_Function(execute_wgui_inline_edit_DONE_function);
- #endif
- }
- else
- {
- set_left_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- mmi_pen_editor_set_inputbox_LSK_Function(execute_wgui_inline_edit_RSK_function);
- #endif
- }
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- if (!mmi_pen_editor_is_closecategory57)
- {
- /* W06.18 Check history id before setting the type of virtual keyboard */
- inline_text_edit_history *h = (inline_text_edit_history*) wgui_current_history_buffer;
- if (wgui_current_history_buffer && history_valid(h->history_ID, INLINE_TEXT_EDIT_HISTORY_ID))
- {
- wgui_setup_virtual_keyboard(h->vk_lang_type);
- }
- else
- {
- wgui_inline_item_text_edit *i = (wgui_inline_item_text_edit*) wgui_inline_items[item_index].item;
- U16 input_type_only = i->input_type & INPUT_TYPE_MASK;
- switch (input_type_only)
- {
- case INPUT_TYPE_ALPHANUMERIC_LOWERCASE:
- #ifdef __MMI_EDITOR_PEN_VK_UNFOLD__
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_ENGLISH);
- break;
- #endif
- case INPUT_TYPE_ALPHANUMERIC_UPPERCASE:
- #ifdef __MMI_EDITOR_PEN_VK_UNFOLD__
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_ENGLISH_UPPERCASE);
- break;
- #endif
- default:
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_TRAY);
- break;
- case INPUT_TYPE_PHONE_NUMBER:
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_PHONE_NUMBER);
- break;
- case INPUT_TYPE_SAT_NUMERIC_PASSWORD:
- case INPUT_TYPE_KEYPAD_NUMERIC:
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_PHONE_NUMBER);
- break;
- case INPUT_TYPE_DECIMAL_NUMERIC:
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_NUMBER_DOT_TRAY);
- break;
- case INPUT_TYPE_NUMERIC:
- case INPUT_TYPE_NUMERIC_PASSWORD:
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_NUMBER_TRAY);
- break;
- }
- }
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- }
- break;
- case INLINE_ITEM_TYPE_MULTI_LINE_EDIT:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- MMI_fixed_list_menu.first_displayed_item = MMI_fixed_list_menu.highlighted_item;
- #endif
- #if defined(__MMI_MULTITAP_FOR_STAR_AND_POUND__)
- set_left_softkey_label((UI_string_type) get_string(STR_GLOBAL_OPTIONS));
- set_left_softkey_icon(NULL);
- #else /* defined(__MMI_MULTITAP_FOR_STAR_AND_POUND__) */
- set_left_softkey_label(get_string(STR_GLOBAL_OK));
- set_left_softkey_icon(NULL);
- #endif /* defined(__MMI_MULTITAP_FOR_STAR_AND_POUND__) */
- register_left_softkey_handler();
- set_left_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- mmi_pen_editor_set_inputbox_LSK_Function(execute_wgui_inline_edit_RSK_function);
- #endif
- if (wgui_inline_list_menu_changed)
- {
- if (wgui_inline_list_menu_disable_done)
- {
- inline_text_edit_RSK_label_string = (UI_string_type) get_string(STR_GLOBAL_BACK);
- inline_text_edit_RSK_label_icon = NULL;
- }
- else
- {
- inline_text_edit_RSK_label_string = NULL;
- inline_text_edit_RSK_label_icon = NULL;
- }
- }
- else
- {
- inline_text_edit_RSK_label_string = wgui_inline_edit_get_RSK_string();
- inline_text_edit_RSK_label_icon = NULL;
- }
- set_right_softkey_label(inline_text_edit_RSK_label_string);
- set_right_softkey_icon(inline_text_edit_RSK_label_icon);
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- if (!mmi_pen_editor_is_closecategory57)
- {
- /* W06.18 Check history id before setting the type of virtual keyboard */
- multiline_inputbox_category_history *h =
- (multiline_inputbox_category_history*) wgui_current_history_buffer;
- if (wgui_current_history_buffer && history_valid(h->history_ID, INLINE_FULL_SCREEN_EDIT_HISTORY_ID))
- {
- wgui_setup_virtual_keyboard(h->vk_lang_type);
- }
- else
- {
- wgui_inline_item_text_edit *i = (wgui_inline_item_text_edit*) wgui_inline_items[item_index].item;
- U16 input_type_only = i->input_type & INPUT_TYPE_MASK;
- switch (input_type_only)
- {
- case INPUT_TYPE_ALPHANUMERIC_LOWERCASE:
- case INPUT_TYPE_ALPHANUMERIC_UPPERCASE:
- default:
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_TRAY);
- break;
- case INPUT_TYPE_PHONE_NUMBER:
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_PHONE_NUMBER);
- break;
- case INPUT_TYPE_SAT_NUMERIC_PASSWORD:
- case INPUT_TYPE_KEYPAD_NUMERIC:
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_PHONE_NUMBER);
- break;
- case INPUT_TYPE_DECIMAL_NUMERIC:
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_NUMBER_DOT_TRAY);
- break;
- case INPUT_TYPE_NUMERIC:
- case INPUT_TYPE_NUMERIC_PASSWORD:
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_NUMBER_TRAY);
- break;
- }
- }
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- }
- break;
- case INLINE_ITEM_TYPE_FULL_SCREEN_EDIT:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- set_left_softkey_label(get_string(WGUI_CATEGORY_EDIT_STRING_ID));
- set_left_softkey_icon(NULL);
- register_left_softkey_handler();
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.08 Reset wgui_current_history_buffer if !INLINE_ITEM_OPEN to avoid incorrect use */
- if (!(wgui_inline_items[item_index].flags & INLINE_ITEM_OPEN))
- {
- wgui_current_history_buffer = NULL;
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- }
- break;
- // #ifdef __MMI_PLUTO_GPRS__
- case INLINE_ITEM_IMAGE_TEXT_TYPE:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- set_left_softkey_label(get_string(WGUI_CATEGORY_EDIT_STRING_ID));
- set_left_softkey_icon(NULL);
- register_left_softkey_handler();
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- }
- break;
- case INLINE_ITEM_ATTACH_IMAGE:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- set_left_softkey_label(get_string(WGUI_CATEGORY_EDIT_STRING_ID));
- set_left_softkey_icon(NULL);
- register_left_softkey_handler();
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- }
- break;
- /* Issue 50, 55(External) : Gurinder - 23/4/2004 */
- case INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- }
- break;
- // #endif
- case INLINE_ITEM_TYPE_SELECT:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- clear_left_softkey_handler();
- set_left_softkey_label(NULL);
- set_left_softkey_icon(NULL);
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- }
- break;
- case INLINE_ITEM_TYPE_USER_DEFINED_SELECT:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- clear_left_softkey_handler();
- set_left_softkey_label(NULL);
- set_left_softkey_icon(NULL);
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- }
- break;
- case INLINE_ITEM_TYPE_DATE:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- set_left_softkey_label(NULL);
- set_left_softkey_icon(NULL);
- register_left_softkey_handler();
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_NUMBER_TRAY);
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- }
- break;
- case INLINE_ITEM_TYPE_TIME:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- set_left_softkey_label(NULL);
- set_left_softkey_icon(NULL);
- register_left_softkey_handler();
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_NUMBER_TRAY);
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- }
- break;
- case INLINE_ITEM_TYPE_TIME_PERIOD:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- set_left_softkey_label(NULL);
- set_left_softkey_icon(NULL);
- register_left_softkey_handler();
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_NUMBER_TRAY);
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- }
- break;
- case INLINE_ITEM_TYPE_DOW_SELECT:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- if (MMI_inline_DOW_select.states[MMI_inline_DOW_select.highlighted_cell])
- {
- set_left_softkey_label(get_string(WGUI_CATEGORY_OFF_STRING_ID));
- }
- else
- {
- set_left_softkey_label(get_string(WGUI_CATEGORY_ON_STRING_ID));
- }
- set_left_softkey_icon(NULL);
- register_left_softkey_handler();
- set_left_softkey_function(handle_inline_DOW_select_LSK_up, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- mmi_pen_editor_set_inputbox_LSK_Function(handle_inline_DOW_select_LSK_up);
- #endif
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- }
- break;
- case INLINE_ITEM_TYPE_IP4_EDIT:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- set_left_softkey_label(NULL);
- set_left_softkey_icon(NULL);
- register_left_softkey_handler();
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_NUMBER_TRAY);
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- }
- break;
- case INLINE_ITEM_TYPE_COLOR_SELECT:
- {
- if (MMI_fixed_list_menu.first_displayed_item == item_index &&
- (wgui_inline_items[item_index - 1].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index - 1;
- }
- clear_left_softkey_handler();
- set_left_softkey_label(NULL);
- set_left_softkey_icon(NULL);
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- }
- break;
- }
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- if (!mmi_pen_editor_is_closecategory57)
- {
- if ((GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY != MMI_virtual_keyboard.lang_type)
- && (!((current_wgui_inline_item->flags & INLINE_ITEM_TYPE_MASK) == INLINE_ITEM_TYPE_FULL_SCREEN_EDIT)))
- {
- mmi_pen_editor_list_menu_highlight_resize();
- }
- gui_fixed_list_menu_locate_highlighted_item(&MMI_fixed_list_menu);
- /* W06.08 Move INLINE_ITEM_TYPE_MULTI_LINE_EDIT to the first displayed item */
- if (INLINE_ITEM_TYPE_MULTI_LINE_EDIT == (wgui_inline_items[item_index].flags & 0xff))
- {
- MMI_fixed_list_menu.first_displayed_item = item_index;
- }
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- gdi_layer_lock_frame_buffer();
- MMI_list_highlight_handler(item_index);
- if (!(MMI_fixed_list_menu.n_items == 2 && wgui_inline_items[0].flags == INLINE_ITEM_TYPE_CAPTION))
- {
- /* MTK Terry don't redraw softkey if popup window show up */
- /* W05.36 Temp Solution for Pop Screen in Full Screen Editor */
- if (GetActiveScreenId() != POPUP_SCREENID
- && GetActiveScreenId() != WAP_SCREEN_MESSAGE_NOTIFICATION
- && GetActiveScreenId() != SCR_ID_POC_CM
- && GetActiveScreenId() != SCR_ID_SAT_WAITSCREEN
- && GetActiveScreenId() != SCR_POPUP_SCREEN && GetActiveScreenId() != SCR_ID_MSG_POPUP)
- {
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- show_softkey_background();
- #endif
- redraw_left_softkey();
- redraw_right_softkey();
- }
- }
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(0, UI_device_height - MMI_button_bar_height, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * category_inline_edit_menuitem_flags
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category_inline_edit_menuitem_flags(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; i < MAX_INLINE_ITEMS; i++)
- {
- MMI_fixed_icontext_menuitems[i].flags &= ~UI_MENUITEM_INLINE_EDIT_OBJECT;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_show_inline_edit_menuitem
- * DESCRIPTION
- *
- * PARAMETERS
- * x [IN]
- * y [IN]
- * width [IN]
- * height [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_show_inline_edit_menuitem(S32 x, S32 y, S32 width, S32 height)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((current_fixed_list_menuitem_display_index < 0) ||
- (current_fixed_list_menuitem_display_index > (MMI_fixed_list_menu.n_items - 1)))
- {
- return;
- }
- switch (wgui_inline_items[current_fixed_list_menuitem_display_index].flags & 0xff)
- {
- case INLINE_ITEM_TYPE_DOW_SELECT:
- wgui_show_DOW_list_menuitem(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- case INLINE_ITEM_TYPE_TEXT_EDIT:
- wgui_show_inline_text_edit_list_menuitem(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- case INLINE_ITEM_TYPE_DATE:
- wgui_show_inline_date_list_menuitem(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- case INLINE_ITEM_TYPE_TIME:
- wgui_show_inline_time_list_menuitem(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- case INLINE_ITEM_TYPE_TIME_PERIOD:
- wgui_show_inline_time_period_list_menuitem(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- case INLINE_ITEM_TYPE_IP4_EDIT:
- wgui_show_inline_IP4_list_menuitem(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- // #ifdef __MMI_PLUTO_GPRS__
- case INLINE_ITEM_IMAGE_TEXT_TYPE:
- wgui_show_image_text_item(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- case INLINE_ITEM_ATTACH_IMAGE:
- wgui_show_image_attachment_item(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- // #endif
- case INLINE_ITEM_TYPE_SELECT:
- wgui_show_inline_select_arrow(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
- case INLINE_ITEM_TYPE_MULTI_LINE_EDIT:
- wgui_show_inline_inscreen_multi_line_edit(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- case INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY:
- wgui_show_inline_multi_line_rd_only(
- x,
- y,
- width,
- height,
- &wgui_inline_items[current_fixed_list_menuitem_display_index]);
- break;
- #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */
- case INLINE_ITEM_TYPE_COLOR_SELECT:
- wgui_show_highlighted_inline_color_select_menuitemitem(
- x,
- y,
- width,
- height,
- &wgui_inline_items [current_fixed_list_menuitem_display_index]);
- break;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_setup_inline_edit_themes
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_setup_inline_edit_themes(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_set_date_time_input_focussed_theme();
- temp_inline_edit_background_filler = date_time_input_background_filler;
- temp_inline_edit_background_filler3 = date_time_input_background_filler;
- temp_inline_edit_background_filler3.flags &= 0x00000fff;
- wgui_inline_select_fixed_text_menuitem_theme.normal_filler =
- wgui_inline_fixed_icontext_menuitem_theme.normal_filler;
- wgui_inline_select_fixed_text_menuitem_theme.disabled_filler =
- wgui_inline_fixed_icontext_menuitem_theme.disabled_filler;
- wgui_inline_select_fixed_text_menuitem_theme.selected_filler =
- wgui_inline_fixed_icontext_menuitem_theme.selected_filler;
- wgui_inline_select_fixed_text_menuitem_theme.focussed_filler =
- wgui_inline_fixed_icontext_menuitem_theme.focussed_filler;
- wgui_inline_select_fixed_text_menuitem_theme.normal_text_color =
- wgui_inline_fixed_icontext_menuitem_theme.normal_text_color;
- wgui_inline_select_fixed_text_menuitem_theme.disabled_text_color =
- wgui_inline_fixed_icontext_menuitem_theme.disabled_text_color;
- wgui_inline_select_fixed_text_menuitem_theme.selected_text_color =
- wgui_inline_fixed_icontext_menuitem_theme.selected_text_color;
- wgui_inline_select_fixed_text_menuitem_theme.focussed_text_color =
- wgui_inline_fixed_icontext_menuitem_theme.focussed_text_color;
- current_UI_theme->fixed_text_menuitem_theme = &wgui_inline_select_fixed_text_menuitem_theme;
- }
- /*****************************************************************************
- * FUNCTION
- * DisableInlineInputMethodHints
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void DisableInlineInputMethodHints(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_disable_inline_input_method_hints = 1;
- }
- /*----------------------------------------------------------------------------
- Category 57 specific functions for inline editing
- ----------------------------------------------------------------------------*/
- #define CAT57_APPEND_NONE 0x00000000
- #define CAT57_APPEND_TOP_INFO_BOX 0x00000001
- #define CAT57_APPEND_BUTTOM_INFO_BOX 0x00000002 /* no implement */
- #define CAT57_APPEND_TOP_MULTILINE_BOX 0x00000003 /* no implement */
- #define CAT57_APPEND_BUTTOM_MULTILINE_BOX 0x00000004 /* no implement */
- /* parameter from caller */
- static U16 cat57_append_type = CAT57_APPEND_NONE;
- static void (*cat57_draw_info_callback) (S32 idx, S32 x1, S32 y1, S32 x2, S32 y2) = NULL;
- static void (*cat57_hide_info_callback) (S32 idx) = NULL;
- static BOOL cat57_is_draw_once; /* will one callback once */
- static U16 cat57_info_row_count;
- /* inner parameters */
- static S32 cat57_pos_x1;
- static S32 cat57_pos_y1;
- static S32 cat57_pos_x2;
- static S32 cat57_pos_y2;
- static BOOL cat57_is_need_draw;
- /*****************************************************************************
- * FUNCTION
- * InitializeCategory57Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void InitializeCategory57Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- n_inline_text_edit_items = 0;
- n_inline_select_items = 0;
- n_inline_date_items = 0;
- n_inline_time_items = 0;
- n_inline_user_defined_select_items = 0;
- n_inline_IP4_items = 0;
- n_inline_DOW_items = 0;
- n_inline_time_period_items = 0;
- wgui_n_inline_items = 0;
- // #ifdef __MMI_PLUTO_GPRS__
- n_inline_image_text = 0;
- n_inline_attach_items = 0;
- n_inline_color_select_items = 0;
- current_attach_control = NULL;
- attach_disable_flag = MMI_FALSE;
- // #endif
- wgui_inline_item_highlighted_index = -1;
- wgui_inline_edit_DONE_function = NULL;
- wgui_inline_edit_BACK_function = NULL;
- wgui_inline_list_menu_changed = 0;
- current_wgui_inline_item = NULL;
- wgui_inline_edit_arrow_key_flag = CATEGORY57_NO_KEY_FLAG;
- /* START TARUN PMT 20040930 Added to enable the scoll bar in sent or insent items */
- flag_scroll = FALSE;
- //END TARUN PMT 20040930
- //PMT VIKAS START 20050707
- #ifdef __MMI_UI_DALMATIAN_FIXEDLIST__
- /* To enable line display */
- gui_enable_inline_bottom_line_draw();
- gui_enable_fixed_list_line_draw();
- #endif /* __MMI_UI_DALMATIAN_FIXEDLIST__ */
- /* PMT VIKAS END 20050707 */
- wgui_disable_inline_input_method_hints = 1;
- /* 101104 MTK Calvin added to clean up wgui_inline_items */
- memset(wgui_inline_items, 0, sizeof(wgui_inline_item) * MAX_INLINE_ITEMS);
- /* MTK Calvin end */
- /* MTK Leo start 20051001, for sending inline items' change notify to application */
- inline_item_changed_handler = NULL;
- /* MTK Leo end */
- }
- /*****************************************************************************
- * FUNCTION
- * SetCategory57RightSoftkeyFunctions
- * DESCRIPTION
- *
- * PARAMETERS
- * done_function [IN]
- * back_function [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory57RightSoftkeyFunctions(void (*done_function) (void), void (*back_function) (void))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_inline_edit_DONE_function = done_function;
- wgui_inline_edit_BACK_function = back_function;
- inline_text_edit_set_RSK_function();
- }
- /*****************************************************************************
- * FUNCTION
- * SetCategory57LeftSoftkeyFunction
- * DESCRIPTION
- *
- * PARAMETERS
- * LSK_function [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory57LeftSoftkeyFunction(void (*LSK_function) (void))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- register_left_softkey_handler();
- set_left_softkey_function(execute_wgui_inline_edit_LSK_function, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- mmi_pen_editor_set_inputbox_LSK_Function(execute_wgui_inline_edit_LSK_function);
- #endif
- wgui_inline_edit_LSK_function = LSK_function;
- }
- /*****************************************************************************
- * FUNCTION
- * DisableCategory57ScreenDone
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void DisableCategory57ScreenDone(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_inline_list_menu_disable_done = 1;
- }
- /*****************************************************************************
- * FUNCTION
- * EnableCategory57ScreenDone
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EnableCategory57ScreenDone(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_inline_list_menu_disable_done = 0;
- }
- /* Max: set RSK to "Clear" */
- /*****************************************************************************
- * FUNCTION
- * SetCategory57ScreenRSKClear
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory57ScreenRSKClear(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_inline_list_menu_disable_done = 2; /* clear */
- }
- /*****************************************************************************
- * FUNCTION
- * cat257_virtual_keypad_callback
- * DESCRIPTION
- * Redraws the category57 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- /* MTK Leo add 040229 */
- UI_font_type cat57_f1;
- UI_font_type cat57_f2;
- //----------------------------------------------------------------------------
- //MTK Leo add 20040413, add category257 for currency convertor
- U16 cat57_img;
- void cat257_virtual_keypad_callback(void)
- {
- #if defined(__MMI_TOUCH_SCREEN__)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY != MMI_virtual_keyboard.lang_type)
- {
- mmi_pen_editor_clear_and_show_virtual_keyboard_area();
- }
- else
- {
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- }
- /* extern color wgui_transparent_color;//112205 transparent color Calvin */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory257Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * title [IN]
- * title_icon [IN]
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * ImgId [IN]
- * number_of_items [IN]
- * list_of_icons [?]
- * list_of_items [?]
- * highlighted_item [IN]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory257Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 ImgId,
- S32 number_of_items,
- U16 *list_of_icons,
- InlineItem *list_of_items,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- color c = {0, 0, 255, 100}; /* 112205 transparent color Calvin */
- #else
- color c = {255, 255, 255, 100};
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UI_DALMATIAN_FIXEDLIST__
- /* to avoid grid display on this cateory screen */
- gui_disable_fixed_list_line_draw();
- #endif /* __MMI_UI_DALMATIAN_FIXEDLIST__ */
- gdi_layer_lock_frame_buffer();
- #if defined(__MMI_TOUCH_SCREEN__)
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY);
- #endif
- ShowCommonCategoryInlineEdit(
- (UI_string_type) get_string(title),
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- list_of_icons,
- list_of_items,
- highlighted_item,
- history_buffer,
- wgui_inline_edit_default_list_highlight_handler,
- wgui_inline_edit_default_list_unhighlight_handler,
- MMI_CATEGORY57_ID);
- gdi_layer_unlock_frame_buffer();
- if (list_of_icons == NULL)
- {
- set_fixed_icontext_positions(4, 0, 1, 0);
- }
- else
- {
- set_fixed_icontext_positions(MMI_INLINE_EDIT_MENUITEM_HEIGHT + 2, 0, 1, 0);
- }
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_DISABLE_SCROLLBAR | UI_LIST_MENU_DISABLE_BACKGROUND;
- #ifdef __MMI_UI_LIST_CACHE_BACKGROUND__
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_DISABLE_BKGRND_IN_LAYER;
- #endif /* __MMI_UI_LIST_CACHE_BACKGROUND__ */
- SetCategory57ScreenRSKClear();
- SetCategory57RightSoftkeyFunctions(NULL, GoBackHistory);
- ExitCategoryFunction = ExitCategory57Screen;
- GetCategoryHistory = GetCategory57History;
- GetCategoryHistorySize = GetCategory57HistorySize;
- RedrawCategoryFunction = dm_redraw_category_screen;
- dm_add_image(get_image(ImgId), NULL, NULL);
- dm_add_rectangle(c, 1);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY257_ID;
- dm_data.s32flags = DM_SHOW_VKPAD;
- dm_setup_data(&dm_data);
- dm_register_vkpad_callback(cat57_virtual_keypad_callback);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- *
- * Category 57
- *
- *****************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * Cat57DrawTopInfoBox
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void Cat57DrawTopInfoBox(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_push_clip();
- gui_set_clip(cat57_pos_x1, cat57_pos_y1, cat57_pos_x2, cat57_pos_y2);
- gui_fill_rectangle(
- cat57_pos_x1,
- cat57_pos_y1,
- cat57_pos_x2,
- cat57_pos_y2,
- current_MMI_theme->list_selected_item_filler->c);
- gui_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory57Screen
- * DESCRIPTION
- * Category57 redraw function
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory57Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * dm_category57_controlled_area
- * DESCRIPTION
- * Category 57 controlled area callback called by draw manager
- * PARAMETERS
- * coordinate [IN/OUT] It specifies the area in which the category will start the drawing. Also modifies it.
- * RETURNS
- * void
- *****************************************************************************/
- void dm_category57_controlled_area(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (cat57_append_type == CAT57_APPEND_TOP_INFO_BOX)
- {
- cat57_is_need_draw = TRUE;
- coordinate->s16Height = MMI_menuitem_height * cat57_info_row_count;
- /* draw top info box */
- Cat57DrawTopInfoBox();
- if (cat57_draw_info_callback != NULL)
- {
- cat57_draw_info_callback(
- MMI_fixed_list_menu.highlighted_item,
- cat57_pos_x1,
- cat57_pos_y1,
- cat57_pos_x2,
- cat57_pos_y2);
- }
- }
- else
- {
- coordinate->s16Width = 0;
- coordinate->s16Height = 0;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * Cat57HighlightHandler
- * DESCRIPTION
- *
- * PARAMETERS
- * item_index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void Cat57HighlightHandler(S32 item_index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- wgui_inline_edit_default_list_highlight_handler(item_index);
- if (cat57_append_type == CAT57_APPEND_TOP_INFO_BOX)
- {
- if (!(wgui_inline_items[item_index].flags & INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT))
- {
- if (cat57_draw_info_callback != NULL && cat57_is_draw_once == FALSE)
- {
- Cat57DrawTopInfoBox();
- cat57_draw_info_callback(item_index, cat57_pos_x1, cat57_pos_y1, cat57_pos_x2, cat57_pos_y2);
- }
- }
- }
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * Cat57UnHighlightHandler
- * DESCRIPTION
- *
- * PARAMETERS
- * item_index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void Cat57UnHighlightHandler(S32 item_index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_inline_edit_default_list_unhighlight_handler(item_index);
- if (cat57_hide_info_callback != NULL && cat57_is_draw_once == FALSE)
- {
- cat57_hide_info_callback(item_index);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * cat57_virtual_keypad_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat57_virtual_keypad_callback(void)
- {
- #if defined(__MMI_TOUCH_SCREEN__)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //W06.05 Do not draw fixed list in category57 because of virtual keyboard
- //if (MMI_FALSE == dm_is_redraw_screen())
- //{
- // mmi_pen_editor_store_list_menu_height(MMI_fixed_list_menu.height - 1);
- //}
- //W05.35 For In Line Full Screen Editor Virtual Keyboard Issue
- if ((GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY != MMI_virtual_keyboard.lang_type)
- && (!((current_wgui_inline_item->flags & INLINE_ITEM_TYPE_MASK) == INLINE_ITEM_TYPE_FULL_SCREEN_EDIT)))
- {
- //W05.40 Resize the fixed list menu and adjust the highlighted item position by mmi_pen_editor_vk_list_menu_resize
- //resize_fixed_list(MMI_content_width,mmi_pen_editor_get_list_menu_height() - MMI_virtual_keyboard.height - 1);
- //mmi_pen_editor_vk_list_menu_resize();
- if ((current_wgui_inline_item->flags & INLINE_ITEM_TYPE_MASK) == INLINE_ITEM_TYPE_MULTI_LINE_EDIT)
- {
- mmi_pen_editor_resize_multiline_input_box_for_vk();
- }
- else
- {
- mmi_pen_editor_clear_and_show_virtual_keyboard_area();
- }
- }
- //else
- //{
- // resize_fixed_list(MMI_content_width,mmi_pen_editor_get_list_menu_height());
- // redraw_fixed_list();
- //}
- //redraw_current_inline_item();
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- }
- /* 101205 BMI Calvin Start */
- //#if defined (__MMI_WALLPAPER_ON_BOTTOM__) //KP Jerry disable on 2006-11-3
- static U8 cat357_scr_bg_opacity;
- static BOOL cat357_opacity_changed = FALSE;
- /*****************************************************************************
- * FUNCTION
- * ShowCategory357Screen
- * DESCRIPTION
- * Redraws the category357 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * ImgId [IN] Image shown on top of list
- * number_of_items [IN] Number of items
- * list_of_icons [IN] List of icons
- * list_of_items [IN] See InlineItem structure.
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory357Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 ImgId,
- S32 number_of_items,
- U16 *list_of_icons,
- InlineItem *list_of_items,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //U16 list_height;//111605 warning Calvin
- //U16 list_offset_y;
- #if defined(__MMI_UI_DALMATIAN_FIXEDLIST__)
- gui_disable_fixed_list_line_draw();
- #endif
- gdi_layer_lock_frame_buffer();
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY);
- #endif
- ShowCommonCategoryInlineEdit(
- (UI_string_type) get_string(title),
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- list_of_icons,
- list_of_items,
- highlighted_item,
- history_buffer,
- Cat57HighlightHandler,
- Cat57UnHighlightHandler,
- MMI_CATEGORY57_ID);
- if (flag_scroll)
- {
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_DISABLE_SCROLLBAR;
- }
- dm_add_image(get_image(ImgId), NULL, NULL);
- dm_get_scr_bg_opacity(&cat357_scr_bg_opacity);
- dm_set_scr_bg_opacity(0);
- cat357_opacity_changed = TRUE;
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory57Screen;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = GetCategory57History;
- GetCategoryHistorySize = GetCategory57HistorySize;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY357_ID;
- dm_data.s32flags = 0;
- dm_data.s32flags |= DM_SHOW_VKPAD;
- dm_setup_data(&dm_data);
- dm_register_category_controlled_callback(dm_category57_controlled_area);
- dm_register_vkpad_callback(cat57_virtual_keypad_callback);
- dm_redraw_category_screen();
- }
- //#endif /* defined (__MMI_WALLPAPER_ON_BOTTOM__) */ //KP Jerry disable on 2006-11-3
- /* 101205 BMI Calvin End */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory57Screen
- * DESCRIPTION
- * Redraws the category57 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN] Number of items
- * list_of_icons [IN] List of icons
- * list_of_items [IN] See InlineItem structure.
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory57Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U16 *list_of_icons,
- InlineItem *list_of_items,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- U16 list_height;
- U16 list_offset_y;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* init append related parameters */
- if (cat57_append_type == CAT57_APPEND_TOP_INFO_BOX)
- {
- list_height = MMI_content_height - MMI_menuitem_height * cat57_info_row_count;
- list_offset_y = MMI_title_y + MMI_title_height + MMI_menuitem_height * cat57_info_row_count;
- cat57_pos_x1 = 0;
- cat57_pos_y1 = MMI_title_y + MMI_title_height;
- cat57_pos_x2 = UI_device_width - 1;
- cat57_pos_y2 = MMI_title_y + MMI_title_height + MMI_menuitem_height * cat57_info_row_count - 1;
- cat57_is_need_draw = FALSE;
- }
- #if defined(__MMI_UI_DALMATIAN_FIXEDLIST__)
- gui_disable_fixed_list_line_draw();
- #endif
- gdi_layer_lock_frame_buffer();
- #if defined(__MMI_TOUCH_SCREEN__)
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY);
- #endif
- ShowCommonCategoryInlineEdit(
- (UI_string_type) get_string(title),
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- list_of_icons,
- list_of_items,
- highlighted_item,
- history_buffer,
- Cat57HighlightHandler,
- Cat57UnHighlightHandler,
- MMI_CATEGORY57_ID);
- if (flag_scroll)
- {
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_DISABLE_SCROLLBAR;
- }
- #ifdef __MMI_UI_LIST_CACHE_BACKGROUND__
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_DISABLE_BKGRND_IN_LAYER;
- #endif /* __MMI_UI_LIST_CACHE_BACKGROUND__ */
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory57Screen;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = GetCategory57History;
- GetCategoryHistorySize = GetCategory57HistorySize;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY57_ID;
- dm_data.s32flags = 0;
- dm_data.s32flags |= DM_SHOW_VKPAD;
- dm_setup_data(&dm_data);
- dm_register_category_controlled_callback(dm_category57_controlled_area);
- dm_register_vkpad_callback(cat57_virtual_keypad_callback);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * Category57AppendTopInfoBox
- * DESCRIPTION
- * Append top info box to Category screen 57.
- * [NOTIC!] call this function before calling ShowCategory57Screen
- * PARAMETERS
- * num_of_info_box_rows [IN]
- * draw_info_callback [IN]
- * hide_info_callback [IN]
- * is_draw_once [IN]
- * U16(?) [IN] Row count for info box
- * RETURNS
- * void
- *****************************************************************************/
- void Category57AppendTopInfoBox(
- U16 num_of_info_box_rows,
- void (*draw_info_callback) (S32 idx, S32 x1, S32 y1, S32 x2, S32 y2),
- void (*hide_info_callback) (S32 idx),
- BOOL is_draw_once)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- cat57_append_type = CAT57_APPEND_TOP_INFO_BOX;
- cat57_draw_info_callback = draw_info_callback;
- cat57_hide_info_callback = hide_info_callback;
- cat57_info_row_count = num_of_info_box_rows;
- cat57_is_draw_once = is_draw_once;
- }
- /*****************************************************************************
- * FUNCTION
- * CloseCategory57Screen
- * DESCRIPTION
- * Exits the category57 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- extern void reset_pop_up_descriptions(void);
- void CloseCategory57Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- #if defined(__MMI_TOUCH_SCREEN__)
- mmi_pen_editor_is_closecategory57 = MMI_TRUE;
- #endif
- complete_inline_item_edit();
- #if defined(__MMI_TOUCH_SCREEN__)
- mmi_pen_editor_is_closecategory57 = MMI_FALSE;
- #endif
- gdi_layer_unlock_frame_buffer();
- }
- extern void UI_dummy_menuitem_displayed_function(S32 index, S32 x1, S32 y1, S32 x2, S32 y2);
- /*****************************************************************************
- * FUNCTION
- * ExitCategory57Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory57Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
- MMI_multiline_inputbox.flags &= ~UI_MULTI_LINE_INPUT_BOX_INSIDE_INLINE_MENU;
- #endif
- #if(UI_BLINKING_CURSOR_SUPPORT)
- //gui_cancel_timer(UI_inputbox_blink_cursor);
- //MTK Elvis
- StopMyTimer(BLINKING_CURSOR);
- /* MTK end */
- #endif /* (UI_BLINKING_CURSOR_SUPPORT) */
- /* PMT MANISH START 20050722 */
- #if defined(__MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__) && defined(__MMI_UI_DALMATIAN_FIXEDLIST__)
- if (IsInlineItemDefaultTextEnable())
- {
- gui_enable_fixed_list_line_draw();
- }
- #endif /* defined(__MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__) && defined(__MMI_UI_DALMATIAN_FIXEDLIST__) */
- #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
- DisableInlineItemDefaultText();
- #endif
- /* PMT MANISH END 20050722 */
- MMI_disable_title_shortcut_display = 0;
- wgui_inline_edit_arrow_key_flag = CATEGORY57_NO_KEY_FLAG;
- gui_set_fixed_list_menu_current_theme(&MMI_fixed_list_menu);
- current_wgui_inline_item = NULL;
- wgui_n_inline_items = 0;
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_FIXEDLIST__
- /* reset the original settings for grid display */
- gui_disable_inline_bottom_line_draw();
- gui_enable_fixed_list_line_draw();
- #endif /* __MMI_UI_DALMATIAN_FIXEDLIST__ */
- //PMT VIKAS END 20050707
- //Start Yogesh 20040816
- flag_use_current_input_type = FALSE;
- /* End Yogesh 20040816 */
- wgui_inline_item_highlighted_index = -1;
- wgui_inline_list_menu_changed = 0;
- wgui_inline_list_menu_disable_done = 0;
- MMI_multi_line_inputbox_present = 0;
- /* Start Yogesh 20040820 */
- wgui_inputbox_information_flag = 0;
- /* End Yogesh 20040820 */
- wgui_inline_edit_DONE_function = NULL;
- wgui_inline_edit_BACK_function = NULL;
- complete_inline_item_edit = UI_dummy_function;
- category_inline_edit_menuitem_flags();
- clear_inline_item_keys();
- wgui_text_menuitem_reset_scrolling();
- /* ifdef __MMI_PLUTO_GPRS__ */
- clear_inline_image_text_item();
- clear_inline_image_attachment_item();
- //endif
- //Reset The Change Flag - Gurinder - 15/4/2004
- MMI_multiline_inputbox.editor_changed = 0;
- reset_pop_up_descriptions();
- redraw_current_inline_item = UI_dummy_function;
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_current_inline_item_pen_function = UI_dummy_inline_item_pen_function;
- #endif
- ClearHighlightHandler();
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_fixed_list();
- MMI_fixed_list_menu.item_displayed_callback = UI_dummy_menuitem_displayed_function;
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- inline_edit_current_highlight_handler = MMI_dummy_highlight_handler;
- MMI_fixed_icontext_menuitem.text_font = cat57_f1;
- MMI_fixed_text_menuitem.text_font = cat57_f2;
- /* reset append */
- cat57_append_type = CAT57_APPEND_NONE;
- cat57_draw_info_callback = NULL;
- cat57_hide_info_callback = NULL;
- cat57_info_row_count = 0;
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- if (cat357_opacity_changed)
- {
- dm_set_scr_bg_opacity(cat357_scr_bg_opacity);
- }
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- /* PMT VIKAS START 20050720 */
- #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
- gui_unblock_list_effect();
- #endif
- /* PMT VIKAS END 20050720 */
- /* PMT VIKAS START 20050630 */
- #ifdef __MMI_UI_TRANSPARENT_EFFECT__
- enable_fixed_icontext_menuitem_transparent_effect();
- #endif
- /* PMT VIKAS END 20050630 */
- /* MTK Leo start 20051001, for sending inline items' change notify to application */
- inline_item_changed_handler = NULL;
- /* MTK Leo end */
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory57HistorySize
- * DESCRIPTION
- * Gets the size of the history buffer for the category57 screen
- * PARAMETERS
- * void
- * RETURNS
- * size of history buffer in U8s
- *****************************************************************************/
- S32 GetCategory57HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (wgui_get_inline_history_size());
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory57History
- * DESCRIPTION
- * Gets the history buffer for the category57 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory57History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (wgui_get_inline_history(MMI_CATEGORY57_ID, history_buffer));
- }
- /*****************************************************************************
- * FUNCTION
- * Category57ChangeItemText
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * text [?]
- * RETURNS
- * void
- *****************************************************************************/
- void Category57ChangeItemText(S32 index, U8 *text)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_fixed_icontext_menuitems[index].item_text = (UI_string_type) text;
- }
- /*****************************************************************************
- * FUNCTION
- * Category57ChangeItemIcon
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * image_ID [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void Category57ChangeItemIcon(S32 index, U16 image_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* FIXME. There is potential problem that some inline items does not have icon. */
- MMI_fixed_icontext_menuitems[index].item_icon = wgui_get_list_menu_icon(index, image_ID);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory57DataSize
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- S32 GetCategory57DataSize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (wgui_get_inline_data_size());
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory57Data
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- *
- *****************************************************************************/
- U8 *GetCategory57Data(U8 *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (wgui_get_inline_data(data));
- }
- /*****************************************************************************
- * FUNCTION
- * SetCategory57Data
- * DESCRIPTION
- *
- * PARAMETERS
- * list_of_items [?]
- * number_of_items [IN]
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory57Data(InlineItem *list_of_items, S32 number_of_items, U8 *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_set_inline_data(list_of_items, number_of_items, data);
- }
- /*----------------------------------------------------------------------------
- Category 157 specific functions for inline editing
- ----------------------------------------------------------------------------*/
- /*****************************************************************************
- * FUNCTION
- * InitializeCategory157Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void InitializeCategory157Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- n_inline_text_edit_items = 0;
- n_inline_select_items = 0;
- n_inline_date_items = 0;
- n_inline_time_items = 0;
- n_inline_user_defined_select_items = 0;
- n_inline_IP4_items = 0;
- n_inline_DOW_items = 0;
- n_inline_time_period_items = 0;
- wgui_n_inline_items = 0;
- wgui_inline_item_highlighted_index = -1;
- wgui_inline_edit_DONE_function = NULL;
- wgui_inline_edit_BACK_function = NULL;
- wgui_inline_list_menu_changed = 0;
- current_wgui_inline_item = NULL;
- wgui_inline_edit_arrow_key_flag = CATEGORY57_NO_KEY_FLAG;
- wgui_disable_inline_input_method_hints = 1;
- /* MTK Leo start 20051001, for sending inline items' change notify to application */
- inline_item_changed_handler = NULL;
- /* MTK Leo end */
- }
- /*****************************************************************************
- * FUNCTION
- * SetCategory157RightSoftkeyFunctions
- * DESCRIPTION
- *
- * PARAMETERS
- * done_function [IN]
- * back_function [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory157RightSoftkeyFunctions(void (*done_function) (void), void (*back_function) (void))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_inline_edit_DONE_function = done_function;
- wgui_inline_edit_BACK_function = back_function;
- inline_text_edit_set_RSK_function();
- }
- /*****************************************************************************
- * FUNCTION
- * SetCategory157LeftSoftkeyFunction
- * DESCRIPTION
- *
- * PARAMETERS
- * LSK_function [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory157LeftSoftkeyFunction(void (*LSK_function) (void))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- register_left_softkey_handler();
- set_left_softkey_function(execute_wgui_inline_edit_LSK_function, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- mmi_pen_editor_set_inputbox_LSK_Function(execute_wgui_inline_edit_LSK_function);
- #endif
- wgui_inline_edit_LSK_function = LSK_function;
- }
- /*****************************************************************************
- * FUNCTION
- * DisableCategory157ScreenDone
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void DisableCategory157ScreenDone(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_inline_list_menu_disable_done = 1;
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory157Screen
- * DESCRIPTION
- * Redraws the category157 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN] Number of items
- * list_of_icons [IN] List of icons
- * list_of_items [IN] See InlineItem structure.
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory157Screen(
- U8 *title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U16 *list_of_icons,
- InlineItem *list_of_items,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ShowCommonCategoryInlineEdit(
- (UI_string_type) title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- list_of_icons,
- list_of_items,
- highlighted_item,
- history_buffer,
- wgui_inline_edit_default_list_highlight_handler,
- wgui_inline_edit_default_list_unhighlight_handler,
- MMI_CATEGORY57_ID);
- ExitCategoryFunction = ExitCategory157Screen;
- GetCategoryHistory = GetCategory57History;
- GetCategoryHistorySize = GetCategory57HistorySize;
- RedrawCategoryFunction = dm_redraw_category_screen;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY157_ID;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * CloseCategory157Screen
- * DESCRIPTION
- * Exits the category157 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- extern void reset_pop_up_descriptions(void);
- void CloseCategory157Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- complete_inline_item_edit();
- gdi_layer_unlock_frame_buffer();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory157Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory157Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */