Esempio n. 1
0
/*****************************************************************************
 * FUNCTION
 *  wgui_show_horizontal_tab_bar
 * DESCRIPTION
 *  Show the horizontal tab bar
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void wgui_show_horizontal_tab_bar(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    gui_lock_double_buffer();
    gui_show_horizontal_tab_bar(&MMI_horizontal_tab_bar, MMI_FALSE, MMI_FALSE);
    gui_unlock_double_buffer();
    gui_BLT_double_buffer(
        MMI_horizontal_tab_bar.x,
        MMI_horizontal_tab_bar.y,
        MMI_horizontal_tab_bar.x + MMI_horizontal_tab_bar.width - 1,
        MMI_horizontal_tab_bar.y + MMI_horizontal_tab_bar.height - 1);

    if (MMI_horizontal_tab_bar.theme->hint_bg_image && title_bg_id == 0)
    {
        title_bg_id = MMI_horizontal_tab_bar.theme->hint_bg_image;
        gui_add_cleanup_hook(wgui_horizontal_tab_bar_reset_title_bg_id);
    }

    gui_horizontal_tab_bar_start_blinking(&MMI_horizontal_tab_bar);
}
Esempio n. 2
0
/*****************************************************************************
 * FUNCTION
 *  gui_panel_show
 * DESCRIPTION
 *  Show a panel component
 * PARAMETERS
 *  panel           [IN/OUT]        panel
 * RETURNS
 *  void
 *****************************************************************************/
void gui_panel_show(gui_panel_struct *panel)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S32 x1, y1, x2, y2;
    S32 elem_idx;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    x1 = panel->x;
    y1 = panel->y;
    x2 = panel->x + panel->width - 1;
    y2 = panel->y + panel->height - 1;
    
    gui_lock_double_buffer();
    
    gui_util_painter_show(&panel->background, x1, y1, x2, y2);

    for (elem_idx = 0; elem_idx < panel->element_count; elem_idx++)
    {
        gui_panel_element_struct *e = &panel->elements[elem_idx];
        gui_panel_elem_state_enum state;
        if (e->disabled_state)
        {
            state = GUI_PANEL_ELEM_STATE_DISABLED;
        }
        else if (e->down_state)
        {
            state = GUI_PANEL_ELEM_STATE_DOWN;
        }
        else if (panel->display_focus && elem_idx == panel->element_focus_index)
        {
            state = GUI_PANEL_ELEM_STATE_FOCUSSED;
        }
        else
        {
            state = GUI_PANEL_ELEM_STATE_NORMAL;
        }
        
        gui_util_painter_show(&e->painters[state], e->x1, e->y1, e->x2, e->y2);
    }

    gui_unlock_double_buffer();
    gui_BLT_double_buffer(x1, y1, x2, y2);

    /* Add cleanup handler */
    gui_add_cleanup_hook(gui_panel_reset_state);
}
Esempio n. 3
0
/*****************************************************************************
 * FUNCTION
 *  wgui_horizontal_tab_bar_start_restore_offset_timer
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
static void wgui_horizontal_tab_bar_start_restore_offset_timer(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (MMI_horizontal_tab_bar_first_displayed_before_pen_down >= 0)
    {
        gui_start_timer(WGUI_TAB_BAR_RESTORE_DISPLAY_TIME, wgui_horizontal_tab_bar_restore_offset_timer_hdlr);
        gui_add_cleanup_hook(wgui_horizontal_tab_bar_abort_restore_offset_timer);
    }
}