Change GUIX window via UART

Hi guys,

 

I´m running a litte application based on the GUIX "Hello World" example.

Now I want to change between my windows via messages from UART. Is that possible?

So for example, I´m sending 0x01 via UART -> Display changes to my window 1, sending 0x02 -> Display changes to window 2.

UART and everything else is already working. Furthermore I´m able to change between my windows via touch input.

But I don´t know how I can trigger the right GUIX event to change the windows via UART.

Can someone tell me the trick?

 

Thanks in advance!

 

Timo

  • Hi Timo-
    Have you looked over the GUIX documentation? It is available from the SSP Download section here: www.renesas.com/.../ssp.html

    in the X-Ware Components zip file...

     

    Take a look at the gx_widget_event API functions to see if they will do what you want....

  • In reply to WarrenM:

    Hi Warren,

    thanks for the information.
    I have tried to do it maybe similar to the guiapp_eventhandlers.c

    So I call: show_window((GX_WINDOW*)&DISPLAY_PERSONAL2, (GX_WIDGET*)widget, true);

    (DISPLAY_PERSONAL2 is my window I want navigate to)

    But I´m getting an error from bulding the project.

    Because the " (GX_WIDGET*)widget" is wrong and I do not really know what I have to do there.....




    static UINT show_window(GX_WINDOW * p_new, GX_WIDGET * p_widget, bool detach_old)
    {
    UINT err = GX_SUCCESS;

    if (!p_new->gx_widget_parent)
    {
    err = gx_widget_attach(p_window_root, p_new);
    }
    else
    {
    err = gx_widget_show(p_new);
    }

    gx_system_focus_claim(p_new);

    GX_WIDGET * p_old = p_widget;
    if (p_old && detach_old)
    {
    if (p_old != (GX_WIDGET*)p_new)
    {
    gx_widget_detach(p_old);
    }
    }

    return err;
    }
  • In reply to Timo:

    Hi Timo-
    Can you provide a screen capture of the error?

    Thanx,
    Warren