#include "hmiworks.h"
#pragma GCC diagnostic ignored "-Wunused-variable"

static tWidget *thisCanvas = (tWidget *)&CanvasFrame2;
static tContext globalContext;
static tContext *thisContext = &globalContext;

#pragma GCC diagnostic warning "-Wunused-variable"


static void ConnectWidgetVariable();
static void DisconnectWidgetVariable();

#include "__frame2.h"



Canvas(CanvasFrame2, WIDGET_ROOT, 0, 0, HMI_DISPLAY_DRIVER_PTR, 0, 0,
       240, 320, CANVAS_STYLE_APP_DRAWN, 0, 0, 0, 0, 0, 0, OnFrame25Paint);


void renderFrame25Vector(tContext *pContext, int ox, int oy) {
}
void OnFrame25Paint(tWidget *pWidget, tContext *pContext)
{
hmi_SetForeground(pContext, 0xFFFFFF);
hmi_FillRect(pContext, 0, 0, 240, 320);
renderFrame25Vector(pContext, 0, 0);
}


static void InitGlobalContext()
{
  GrContextInit(thisContext, thisCanvas->pDisplay);
  GrContextClipRegionSet(thisContext, &(thisCanvas->sPosition));
}
void InitWidget2()
{
    WidgetAdd(WIDGET_ROOT, (tWidget *)(&CanvasFrame2));
    InitGlobalContext();
    WidgetPaint(WIDGET_ROOT);
    ConnectWidgetVariable();
 Frame25OnShow();
}

void FreeWidget2()
{
    DisconnectWidgetVariable();
    WidgetRemove((tWidget *)(&CanvasFrame2));
}


static void ConnectWidgetVariable()
{
  WidgetMessageQueueProcessEx(WIDGET_MSG_PAINT);
  if (_CurrentFrame != 2) return;
}

static void DisconnectWidgetVariable()
{
}

void _frame2()
{
  var_table_init();
  FreeCurrentFrame();
  _CurrentFrame = 2;
  InitWidget2();
}

