Ejemplo n.º 1
0
void appFreeStruct(void)
{
    int i;

    appClearItem(&appMPlayer.main);
    appMPlayer.mainDecoration = 0;

    appClearItem(&appMPlayer.sub);

    appClearItem(&appMPlayer.bar);
    appMPlayer.barIsPresent = 0;

    appClearItem(&appMPlayer.menuBase);
    appClearItem(&appMPlayer.menuSelected);
    appMPlayer.menuIsPresent = 0;

    for (i = 0; i <= appMPlayer.IndexOfMainItems; i++)
        appClearItem(&appMPlayer.mainItems[i]);
    for (i = 0; i <= appMPlayer.IndexOfBarItems; i++)
        appClearItem(&appMPlayer.barItems[i]);
    for (i = 0; i <= appMPlayer.IndexOfMenuItems; i++)
        appClearItem(&appMPlayer.menuItems[i]);

    appResetStruct();
    fntFreeFont();
}
Ejemplo n.º 2
0
/**
 * @brief Free all memory allocated to all GUI items and reset all item counters.
 */
void appFreeStruct(void)
{
    int i;

    appClearItem(&guiApp.main);
    guiApp.mainDecoration = 0;

    appClearItem(&guiApp.video);

    appClearItem(&guiApp.playbar);
    guiApp.playbarIsPresent = 0;

    appClearItem(&guiApp.menu);
    appClearItem(&guiApp.menuSelected);
    guiApp.menuIsPresent = 0;

    for (i = 0; i <= guiApp.IndexOfMainItems; i++)
        appClearItem(&guiApp.mainItems[i]);
    for (i = 0; i <= guiApp.IndexOfPlaybarItems; i++)
        appClearItem(&guiApp.playbarItems[i]);
    for (i = 0; i <= guiApp.IndexOfMenuItems; i++)
        appClearItem(&guiApp.menuItems[i]);

    guiApp.IndexOfMainItems    = -1;
    guiApp.IndexOfPlaybarItems = -1;
    guiApp.IndexOfMenuItems    = -1;

    fntFreeFont();
}
Ejemplo n.º 3
0
void appInitStruct( listItems * item )
{
 int i;
 for ( i=0;i<item->NumberOfItems;i++ )
  appClearItem( &item->Items[i] );
 for ( i=0;i<item->NumberOfMenuItems;i++ )
  appClearItem( &item->MenuItems[i] );
 for ( i=0;i<item->NumberOfBarItems;i++ )
  appClearItem( &item->barItems[i] );

 item->NumberOfItems=-1;
 memset( item->Items,0,256 * sizeof( wItem ) );
 item->NumberOfMenuItems=-1;
 memset( item->MenuItems,0,64 * sizeof( wItem ) );
 item->NumberOfBarItems=-1;
 memset( item->barItems,0,256 * sizeof( wItem ) );

 appClearItem( &item->main );
 item->mainDecoration=0;
 appClearItem( &item->sub );
 item->sub.width=0; item->sub.height=0;
 item->sub.x=-1; item->sub.y=-1;
 appClearItem( &item->menuBase );
 appClearItem( &item->menuSelected );
 item->sub.R=item->sub.G=item->sub.B=0;
 item->bar.R=item->bar.G=item->bar.B=0;
 item->main.R=item->main.G=item->main.B=0;
 item->barIsPresent=0;
 item->menuIsPresent=0;
}