changeset 33555:c5a19bbeac2b

Cosmetic: Rename some GUI variables and functions. The new names are more intelligible and consistent. List of changes: guiIntfStruct -> guiInfo appMPlayer -> guiApp txSample -> guiImage (and member BPP -> Bpp) mplDrawBuffer -> mainDrawBuffer mplPBDrawBuffer -> playbarDrawBuffer mplMenuDrawBuffer -> menuDrawBuffer mpl.* -> ui.* (or mpl dropped) .*bar.* -> .*playbar.* URLItem -> urlItem ChangeSkin -> uiChangeSkin Convert32to1 -> bpRenderMask
author ib
date Sat, 18 Jun 2011 14:33:41 +0000
parents 02d94048970e
children 520fb0f7544c
files command.c gui/app.c gui/app.h gui/cfg.c gui/interface.c gui/interface.h gui/mplayer/gmplayer.h gui/mplayer/gtk/eq.c gui/mplayer/gtk/fs.c gui/mplayer/gtk/gtk_menu.c gui/mplayer/gtk/gtk_url.c gui/mplayer/gtk/opts.c gui/mplayer/gtk/pl.c gui/mplayer/gtk/sb.c gui/mplayer/gui_common.c gui/mplayer/menu.c gui/mplayer/mw.c gui/mplayer/pb.c gui/mplayer/play.c gui/mplayer/play.h gui/mplayer/sw.c gui/mplayer/widgets.c gui/skin/font.c gui/skin/font.h gui/skin/skin.c gui/skin/skin.h gui/util/bitmap.c gui/util/bitmap.h gui/win32/dialogs.c gui/win32/gui.c gui/win32/interface.c gui/win32/preferences.c gui/win32/skinload.c gui/win32/widgetrender.c mplayer.c
diffstat 35 files changed, 1143 insertions(+), 1143 deletions(-) [+]
line wrap: on
line diff
--- a/command.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/command.c	Sat Jun 18 14:33:41 2011 +0000
@@ -2801,10 +2801,10 @@
                     int i = 0;
                     if (n > 0)
                         for (i = 0; i < n; i++)
-                            mplNext();
+                            uiNext();
                     else
                         for (i = 0; i < -1 * n; i++)
-                            mplPrev();
+                            uiPrev();
                 } else
 #endif
                 {
@@ -2966,7 +2966,7 @@
 #ifdef CONFIG_GUI
             // playtree_iter isn't used by the GUI
             if (use_gui)
-                mplStop();
+                uiStop();
             else
 #endif
             // Go back to the starting point.
--- a/gui/app.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/app.c	Sat Jun 18 14:33:41 2011 +0000
@@ -23,10 +23,10 @@
 
 #include "libavutil/common.h"
 
-guiItems appMPlayer = {
-    .IndexOfMainItems = -1,
-    .IndexOfBarItems  = -1,
-    .IndexOfMenuItems = -1
+guiItems guiApp = {
+    .IndexOfMainItems    = -1,
+    .IndexOfPlaybarItems = -1,
+    .IndexOfMenuItems    = -1
 };
 
 static const evName evNames[] = {
@@ -92,28 +92,28 @@
 {
     int i;
 
-    appClearItem(&appMPlayer.main);
-    appMPlayer.mainDecoration = 0;
+    appClearItem(&guiApp.main);
+    guiApp.mainDecoration = 0;
 
-    appClearItem(&appMPlayer.sub);
+    appClearItem(&guiApp.sub);
 
-    appClearItem(&appMPlayer.bar);
-    appMPlayer.barIsPresent = 0;
+    appClearItem(&guiApp.playbar);
+    guiApp.playbarIsPresent = 0;
 
-    appClearItem(&appMPlayer.menu);
-    appClearItem(&appMPlayer.menuSelected);
-    appMPlayer.menuIsPresent = 0;
+    appClearItem(&guiApp.menu);
+    appClearItem(&guiApp.menuSelected);
+    guiApp.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]);
+    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]);
 
-    appMPlayer.IndexOfMainItems = -1;
-    appMPlayer.IndexOfBarItems  = -1;
-    appMPlayer.IndexOfMenuItems = -1;
+    guiApp.IndexOfMainItems    = -1;
+    guiApp.IndexOfPlaybarItems = -1;
+    guiApp.IndexOfMenuItems    = -1;
 
     fntFreeFont();
 }
@@ -133,11 +133,11 @@
 {
     int i;
 
-    for (i = 0; i <= appMPlayer.IndexOfMainItems; i++) {
-        if (appMPlayer.mainItems[i].message == event) {
-            switch (appMPlayer.mainItems[i].type) {
+    for (i = 0; i <= guiApp.IndexOfMainItems; i++) {
+        if (guiApp.mainItems[i].message == event) {
+            switch (guiApp.mainItems[i].type) {
             case itButton:
-                appMPlayer.mainItems[i].pressed = (int)state;
+                guiApp.mainItems[i].pressed = (int)state;
                 break;
 
             case itPotmeter:
@@ -147,17 +147,17 @@
                     state = 0.0f;
                 if (state > 100.0f)
                     state = 100.0f;
-                appMPlayer.mainItems[i].value = state;
+                guiApp.mainItems[i].value = state;
                 break;
             }
         }
     }
 
-    for (i = 0; i <= appMPlayer.IndexOfBarItems; i++) {
-        if (appMPlayer.barItems[i].message == event) {
-            switch (appMPlayer.barItems[i].type) {
+    for (i = 0; i <= guiApp.IndexOfPlaybarItems; i++) {
+        if (guiApp.playbarItems[i].message == event) {
+            switch (guiApp.playbarItems[i].type) {
             case itButton:
-                appMPlayer.barItems[i].pressed = (int)state;
+                guiApp.playbarItems[i].pressed = (int)state;
                 break;
 
             case itPotmeter:
@@ -167,7 +167,7 @@
                     state = 0.0f;
                 if (state > 100.0f)
                     state = 100.0f;
-                appMPlayer.barItems[i].value = state;
+                guiApp.playbarItems[i].value = state;
                 break;
             }
         }
@@ -178,11 +178,11 @@
 {
     int i;
 
-    for (i = 0; i <= appMPlayer.IndexOfMainItems; i++)
-        if (appMPlayer.mainItems[i].message == event)
-            appMPlayer.mainItems[i].pressed = set;
+    for (i = 0; i <= guiApp.IndexOfMainItems; i++)
+        if (guiApp.mainItems[i].message == event)
+            guiApp.mainItems[i].pressed = set;
 
-    for (i = 0; i <= appMPlayer.IndexOfBarItems; i++)
-        if (appMPlayer.barItems[i].message == event)
-            appMPlayer.barItems[i].pressed = set;
+    for (i = 0; i <= guiApp.IndexOfPlaybarItems; i++)
+        if (guiApp.playbarItems[i].message == event)
+            guiApp.playbarItems[i].pressed = set;
 }
--- a/gui/app.h	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/app.h	Sat Jun 18 14:33:41 2011 +0000
@@ -140,8 +140,8 @@
     int x, y;
     int width, height;
 
-    txSample Bitmap;
-    txSample Mask;
+    guiImage Bitmap;
+    guiImage Mask;
 
     int fontid;
     int align;
@@ -171,9 +171,9 @@
     wItem sub;
     wsTWindow subWindow;
 
-    wItem bar;
-    wsTWindow barWindow;
-    int barIsPresent;
+    wItem playbar;
+    wsTWindow playbarWindow;
+    int playbarIsPresent;
 
     wItem menu;
     wItem menuSelected;
@@ -183,14 +183,14 @@
     int IndexOfMainItems;
     wItem mainItems[MAX_ITEMS];
 
-    int IndexOfBarItems;
-    wItem barItems[MAX_ITEMS];
+    int IndexOfPlaybarItems;
+    wItem playbarItems[MAX_ITEMS];
 
     int IndexOfMenuItems;
     wItem menuItems[MAX_ITEMS];
 } guiItems;
 
-extern guiItems appMPlayer;
+extern guiItems guiApp;
 
 int appFindMessage(unsigned char *str);
 void appFreeStruct(void);
--- a/gui/cfg.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/cfg.c	Sat Jun 18 14:33:41 2011 +0000
@@ -315,12 +315,12 @@
     if (f) {
         while (!feof(f)) {
             char tmp[512];
-            URLItem *item;
+            urlItem *item;
 
             if (gfgets(tmp, 512, f) == NULL)
                 continue;
 
-            item      = calloc(1, sizeof(URLItem));
+            item      = calloc(1, sizeof(urlItem));
             item->url = strdup(tmp);
             gtkSet(gtkAddURLItem, 0, (void *)item);
         }
--- a/gui/interface.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/interface.c	Sat Jun 18 14:33:41 2011 +0000
@@ -50,7 +50,7 @@
 #include "stream/stream_dvd.h"
 #endif
 
-guiInterface_t guiIntfStruct;
+guiInterface_t guiInfo;
 
 int guiWinID = -1;
 
@@ -62,7 +62,7 @@
 plItem *plList       = NULL;
 plItem *plLastPlayed = NULL;
 
-URLItem *URLList = NULL;
+urlItem *URLList = NULL;
 
 char *fsHistory[fsPersistant_MaxPos] = { NULL, NULL, NULL, NULL, NULL };
 
@@ -163,9 +163,9 @@
 
     mp_msg(MSGT_GPLAYER, MSGL_V, "GUI init.\n");
 
-    memset(&guiIntfStruct, 0, sizeof(guiIntfStruct));
-    guiIntfStruct.Balance    = 50.0f;
-    guiIntfStruct.StreamType = -1;
+    memset(&guiInfo, 0, sizeof(guiInfo));
+    guiInfo.Balance    = 50.0f;
+    guiInfo.StreamType = -1;
 
     memset(&gtkEquChannels, 0, sizeof(gtkEquChannels));
 
@@ -229,99 +229,99 @@
 
     // initialize windows
 
-    mplDrawBuffer = malloc(appMPlayer.main.Bitmap.ImageSize);
+    mainDrawBuffer = malloc(guiApp.main.Bitmap.ImageSize);
 
-    if (!mplDrawBuffer) {
+    if (!mainDrawBuffer) {
         gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB);
         guiExit(EXIT_ERROR);
     }
 
     if (gui_save_pos) {
         if (gui_main_pos_x != -3)
-            appMPlayer.main.x = gui_main_pos_x;
+            guiApp.main.x = gui_main_pos_x;
         if (gui_main_pos_y != -3)
-            appMPlayer.main.y = gui_main_pos_y;
+            guiApp.main.y = gui_main_pos_y;
         if (gui_sub_pos_x != -3)
-            appMPlayer.sub.x = gui_sub_pos_x;
+            guiApp.sub.x = gui_sub_pos_x;
         if (gui_sub_pos_y != -3)
-            appMPlayer.sub.y = gui_sub_pos_y;
+            guiApp.sub.y = gui_sub_pos_y;
     }
 
     if (WinID > 0) {
-        appMPlayer.subWindow.Parent = WinID;
-        appMPlayer.sub.x = 0;
-        appMPlayer.sub.y = 0;
+        guiApp.subWindow.Parent = WinID;
+        guiApp.sub.x = 0;
+        guiApp.sub.y = 0;
     }
 
     if (guiWinID >= 0)
-        appMPlayer.mainWindow.Parent = guiWinID;
+        guiApp.mainWindow.Parent = guiWinID;
 
-    wsCreateWindow(&appMPlayer.subWindow, appMPlayer.sub.x, appMPlayer.sub.y, appMPlayer.sub.width, appMPlayer.sub.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsHideWindow, "MPlayer - Video");
-    wsDestroyImage(&appMPlayer.subWindow);
-    wsCreateImage(&appMPlayer.subWindow, appMPlayer.sub.Bitmap.Width, appMPlayer.sub.Bitmap.Height);
-    wsXDNDMakeAwareness(&appMPlayer.subWindow);
+    wsCreateWindow(&guiApp.subWindow, guiApp.sub.x, guiApp.sub.y, guiApp.sub.width, guiApp.sub.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsHideWindow, "MPlayer - Video");
+    wsDestroyImage(&guiApp.subWindow);
+    wsCreateImage(&guiApp.subWindow, guiApp.sub.Bitmap.Width, guiApp.sub.Bitmap.Height);
+    wsXDNDMakeAwareness(&guiApp.subWindow);
 
-    mplMenuInit();
-    mplPBInit();
+    uiMenuInit();
+    uiPlaybarInit();
 
 // i=wsHideFrame|wsMaxSize|wsHideWindow;
-// if ( appMPlayer.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow;
+// if ( guiApp.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow;
     i = wsShowFrame | wsMaxSize | wsHideWindow;
-    wsCreateWindow(&appMPlayer.mainWindow, appMPlayer.main.x, appMPlayer.main.y, appMPlayer.main.width, appMPlayer.main.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, i, "MPlayer");
-    wsSetShape(&appMPlayer.mainWindow, appMPlayer.main.Mask.Image);
-    wsXDNDMakeAwareness(&appMPlayer.mainWindow);
+    wsCreateWindow(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, i, "MPlayer");
+    wsSetShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
+    wsXDNDMakeAwareness(&guiApp.mainWindow);
 
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] screen depth: %d\n", wsDepthOnScreen);
-    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] mainWindow ID: 0x%x\n", (int)appMPlayer.mainWindow.WindowID);
-    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] subWindow ID: 0x%x\n", (int)appMPlayer.subWindow.WindowID);
+    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] mainWindow ID: 0x%x\n", (int)guiApp.mainWindow.WindowID);
+    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[interface] subWindow ID: 0x%x\n", (int)guiApp.subWindow.WindowID);
 
-    appMPlayer.mainWindow.ReDraw       = (void *)mplMainDraw;
-    appMPlayer.mainWindow.MouseHandler = mplMainMouseHandle;
-    appMPlayer.mainWindow.KeyHandler   = mplMainKeyHandle;
-    appMPlayer.mainWindow.DandDHandler = mplDandDHandler;
+    guiApp.mainWindow.ReDraw       = (void *)uiMainDraw;
+    guiApp.mainWindow.MouseHandler = uiMainMouseHandle;
+    guiApp.mainWindow.KeyHandler   = uiMainKeyHandle;
+    guiApp.mainWindow.DandDHandler = uiDandDHandler;
 
-    appMPlayer.subWindow.ReDraw       = (void *)mplSubDraw;
-    appMPlayer.subWindow.MouseHandler = mplSubMouseHandle;
-    appMPlayer.subWindow.KeyHandler   = mplMainKeyHandle;
-    appMPlayer.subWindow.DandDHandler = mplDandDHandler;
+    guiApp.subWindow.ReDraw       = (void *)uiSubDraw;
+    guiApp.subWindow.MouseHandler = uiSubMouseHandle;
+    guiApp.subWindow.KeyHandler   = uiMainKeyHandle;
+    guiApp.subWindow.DandDHandler = uiDandDHandler;
 
-    wsSetBackgroundRGB(&appMPlayer.subWindow, appMPlayer.sub.R, appMPlayer.sub.G, appMPlayer.sub.B);
-    wsClearWindow(appMPlayer.subWindow);
+    wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
+    wsClearWindow(guiApp.subWindow);
 
-    if (appMPlayer.sub.Bitmap.Image)
-        wsConvert(&appMPlayer.subWindow, appMPlayer.sub.Bitmap.Image);
+    if (guiApp.sub.Bitmap.Image)
+        wsConvert(&guiApp.subWindow, guiApp.sub.Bitmap.Image);
 
-    btnModify(evSetVolume, guiIntfStruct.Volume);
-    btnModify(evSetBalance, guiIntfStruct.Balance);
-    btnModify(evSetMoviePosition, guiIntfStruct.Position);
+    btnModify(evSetVolume, guiInfo.Volume);
+    btnModify(evSetBalance, guiInfo.Balance);
+    btnModify(evSetMoviePosition, guiInfo.Position);
 
-    wsSetIcon(wsDisplay, appMPlayer.mainWindow.WindowID, &guiIcon);
-    wsSetIcon(wsDisplay, appMPlayer.subWindow.WindowID, &guiIcon);
+    wsSetIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon);
+    wsSetIcon(wsDisplay, guiApp.subWindow.WindowID, &guiIcon);
 
-    guiIntfStruct.Playing = 0;
+    guiInfo.Playing = 0;
 
-    if (!appMPlayer.mainDecoration)
-        wsWindowDecoration(&appMPlayer.mainWindow, 0);
+    if (!guiApp.mainDecoration)
+        wsWindowDecoration(&guiApp.mainWindow, 0);
 
-    wsVisibleWindow(&appMPlayer.mainWindow, wsShowWindow);
+    wsVisibleWindow(&guiApp.mainWindow, wsShowWindow);
 
 #if 0
-    wsVisibleWindow(&appMPlayer.subWindow, wsShowWindow);
+    wsVisibleWindow(&guiApp.subWindow, wsShowWindow);
     {
         XEvent xev;
 
         do
             XNextEvent(wsDisplay, &xev);
-        while (xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID);
+        while (xev.type != MapNotify || xev.xmap.event != guiApp.subWindow.WindowID);
 
-        appMPlayer.subWindow.Mapped = wsMapped;
+        guiApp.subWindow.Mapped = wsMapped;
     }
 
     if (!fullscreen)
         fullscreen = gtkLoadFullscreen;
 
     if (fullscreen) {
-        mplFullScreen();
+        uiFullScreen();
         btnModify(evFullScreen, btnPressed);
     }
 #else
@@ -329,50 +329,50 @@
         fullscreen = gtkLoadFullscreen;
 
     if (gtkShowVideoWindow) {
-        wsVisibleWindow(&appMPlayer.subWindow, wsShowWindow);
+        wsVisibleWindow(&guiApp.subWindow, wsShowWindow);
         {
             XEvent xev;
 
             do
                 XNextEvent(wsDisplay, &xev);
-            while (xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID);
+            while (xev.type != MapNotify || xev.xmap.event != guiApp.subWindow.WindowID);
 
-            appMPlayer.subWindow.Mapped = wsMapped;
+            guiApp.subWindow.Mapped = wsMapped;
         }
 
         if (fullscreen) {
-            mplFullScreen();
+            uiFullScreen();
             btnModify(evFullScreen, btnPressed);
         }
     } else {
         if (fullscreen) {
-            wsVisibleWindow(&appMPlayer.subWindow, wsShowWindow);
+            wsVisibleWindow(&guiApp.subWindow, wsShowWindow);
             {
                 XEvent xev;
 
                 do
                     XNextEvent(wsDisplay, &xev);
-                while (xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID);
+                while (xev.type != MapNotify || xev.xmap.event != guiApp.subWindow.WindowID);
 
-                appMPlayer.subWindow.Mapped = wsMapped;
+                guiApp.subWindow.Mapped = wsMapped;
             }
-            wsVisibleWindow(&appMPlayer.subWindow, wsShowWindow);
-            mplFullScreen();
+            wsVisibleWindow(&guiApp.subWindow, wsShowWindow);
+            uiFullScreen();
             btnModify(evFullScreen, btnPressed);
         }
     }
 #endif
 
-    mplSubRender = 1;
+    uiSubRender = 1;
 
     if (filename)
-        mplSetFileName(NULL, filename, STREAMTYPE_FILE);
+        uiSetFileName(NULL, filename, STREAMTYPE_FILE);
 
     if (plCurrent && !filename)
-        mplSetFileName(plCurrent->path, plCurrent->name, STREAMTYPE_FILE);
+        uiSetFileName(plCurrent->path, plCurrent->name, STREAMTYPE_FILE);
 
     if (subdata)
-        guiSetFilename(guiIntfStruct.Subtitlename, subdata->filename);
+        guiSetFilename(guiInfo.Subtitlename, subdata->filename);
 
     guiLoadFont();
 
@@ -382,13 +382,13 @@
 void guiDone(void)
 {
     if (initialized) {
-        mplMainRender = 0;
+        uiMainRender = 0;
 
         if (gui_save_pos) {
-            gui_main_pos_x = appMPlayer.mainWindow.X;
-            gui_main_pos_y = appMPlayer.mainWindow.Y;
-            gui_sub_pos_x  = appMPlayer.subWindow.X;
-            gui_sub_pos_y  = appMPlayer.subWindow.Y;
+            gui_main_pos_x = guiApp.mainWindow.X;
+            gui_main_pos_y = guiApp.mainWindow.Y;
+            gui_sub_pos_x  = guiApp.subWindow.X;
+            gui_sub_pos_y  = guiApp.subWindow.Y;
         }
 
 #ifdef CONFIG_ASS
@@ -467,8 +467,8 @@
 
 void guiLoadSubtitle(char *name)
 {
-    if (guiIntfStruct.Playing == 0) {
-        guiIntfStruct.SubtitleChanged = 1; // what is this for? (mw)
+    if (guiInfo.Playing == 0) {
+        guiInfo.SubtitleChanged = 1; // what is this for? (mw)
         return;
     }
 
@@ -503,7 +503,7 @@
     if (name) {
         mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_LoadingSubtitles, name);
 
-        subdata = sub_read_file(name, guiIntfStruct.FPS);
+        subdata = sub_read_file(name, guiInfo.FPS);
 
         if (!subdata)
             gmp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub, name);
@@ -561,12 +561,12 @@
     dvd_priv_t *dvdp = arg;
 #endif
 
-    if (guiIntfStruct.mpcontext)
-        mixer = mpctx_get_mixer(guiIntfStruct.mpcontext);
+    if (guiInfo.mpcontext)
+        mixer = mpctx_get_mixer(guiInfo.mpcontext);
 
     switch (type) {
     case guiXEvent:
-        guiIntfStruct.event_struct = arg;
+        guiInfo.event_struct = arg;
         wsEvents(wsDisplay, arg);
         gtkEventHandling();
         break;
@@ -575,91 +575,91 @@
 
         switch ((int)arg) {
         case guiSetPlay:
-            guiIntfStruct.Playing = 1;
-// if ( !gtkShowVideoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
+            guiInfo.Playing = 1;
+// if ( !gtkShowVideoWindow ) wsVisibleWindow( &guiApp.subWindow,wsHideWindow );
             break;
 
         case guiSetStop:
-            guiIntfStruct.Playing = 0;
-// if ( !gtkShowVideoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
+            guiInfo.Playing = 0;
+// if ( !gtkShowVideoWindow ) wsVisibleWindow( &guiApp.subWindow,wsHideWindow );
             break;
 
         case guiSetPause:
-            guiIntfStruct.Playing = 2;
+            guiInfo.Playing = 2;
             break;
         }
 
-        mplState();
+        uiState();
         break;
 
     case guiSetState:
-        mplState();
+        uiState();
         break;
 
     case guiSetFileName:
         if (arg)
-            guiSetFilename(guiIntfStruct.Filename, arg);
+            guiSetFilename(guiInfo.Filename, arg);
         break;
 
     case guiSetAudioOnly:
 
-        guiIntfStruct.AudioOnly = (int)arg;
+        guiInfo.AudioOnly = (int)arg;
 
         if ((int)arg) {
-            guiIntfStruct.NoWindow = True;
-            wsVisibleWindow(&appMPlayer.subWindow, wsHideWindow);
+            guiInfo.NoWindow = True;
+            wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
         } else
-            wsVisibleWindow(&appMPlayer.subWindow, wsShowWindow);
+            wsVisibleWindow(&guiApp.subWindow, wsShowWindow);
 
         break;
 
     case guiSetContext:
-        guiIntfStruct.mpcontext = arg;
+        guiInfo.mpcontext = arg;
     // NOTE TO MYSELF: is break missing?
 
     case guiSetDemuxer:
-        guiIntfStruct.demuxer = arg;
+        guiInfo.demuxer = arg;
         break;
 
     case guiSetAfilter:
-        guiIntfStruct.afilter = arg;
+        guiInfo.afilter = arg;
         break;
 
     case guiSetShVideo:
 
-        if (!appMPlayer.subWindow.isFullScreen) {
-            wsResizeWindow(&appMPlayer.subWindow, vo_dwidth, vo_dheight);
-            wsMoveWindow(&appMPlayer.subWindow, True, appMPlayer.sub.x, appMPlayer.sub.y);
+        if (!guiApp.subWindow.isFullScreen) {
+            wsResizeWindow(&guiApp.subWindow, vo_dwidth, vo_dheight);
+            wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y);
         }
 
-        guiIntfStruct.MovieWidth  = vo_dwidth;
-        guiIntfStruct.MovieHeight = vo_dheight;
+        guiInfo.MovieWidth  = vo_dwidth;
+        guiInfo.MovieHeight = vo_dheight;
 
         if (guiWinID >= 0)
-            wsMoveWindow(&appMPlayer.mainWindow, 0, 0, vo_dheight);
+            wsMoveWindow(&guiApp.mainWindow, 0, 0, vo_dheight);
 
-        WinID = appMPlayer.subWindow.WindowID;
+        WinID = guiApp.subWindow.WindowID;
         break;
 
 #ifdef CONFIG_DVDREAD
     case guiSetDVD:
-        guiIntfStruct.DVD.titles   = dvdp->vmg_file->tt_srpt->nr_of_srpts;
-        guiIntfStruct.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
-        guiIntfStruct.DVD.angles   = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
-        guiIntfStruct.DVD.nr_of_audio_channels = dvdp->nr_of_channels;
-        memcpy(guiIntfStruct.DVD.audio_streams, dvdp->audio_streams, sizeof(dvdp->audio_streams));
-        guiIntfStruct.DVD.nr_of_subtitles = dvdp->nr_of_subtitles;
-        memcpy(guiIntfStruct.DVD.subtitles, dvdp->subtitles, sizeof(dvdp->subtitles));
-        guiIntfStruct.DVD.current_title   = dvd_title + 1;
-        guiIntfStruct.DVD.current_chapter = dvd_chapter + 1;
-        guiIntfStruct.DVD.current_angle   = dvd_angle + 1;
-        guiIntfStruct.Track = dvd_title + 1;
+        guiInfo.DVD.titles   = dvdp->vmg_file->tt_srpt->nr_of_srpts;
+        guiInfo.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
+        guiInfo.DVD.angles   = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
+        guiInfo.DVD.nr_of_audio_channels = dvdp->nr_of_channels;
+        memcpy(guiInfo.DVD.audio_streams, dvdp->audio_streams, sizeof(dvdp->audio_streams));
+        guiInfo.DVD.nr_of_subtitles = dvdp->nr_of_subtitles;
+        memcpy(guiInfo.DVD.subtitles, dvdp->subtitles, sizeof(dvdp->subtitles));
+        guiInfo.DVD.current_title   = dvd_title + 1;
+        guiInfo.DVD.current_chapter = dvd_chapter + 1;
+        guiInfo.DVD.current_angle   = dvd_angle + 1;
+        guiInfo.Track = dvd_title + 1;
         break;
 #endif
 
     case guiSetStream:
 
-        guiIntfStruct.StreamType = stream->type;
+        guiInfo.StreamType = stream->type;
 
         switch (stream->type) {
 #ifdef CONFIG_DVDREAD
@@ -670,8 +670,8 @@
 
 #ifdef CONFIG_VCD
         case STREAMTYPE_VCD:
-            guiIntfStruct.VCDTracks = 0;
-            stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiIntfStruct.VCDTracks);
+            guiInfo.VCDTracks = 0;
+            stream_control(stream, STREAM_CTRL_GET_NUM_CHAPTERS, &guiInfo.VCDTracks);
             break;
 #endif
 
@@ -687,18 +687,18 @@
 
         switch ((int)arg) {
         case MP_CMD_QUIT:
-            mplEventHandling(evExit, 0);
+            uiEventHandling(evExit, 0);
             break;
 
         case MP_CMD_VO_FULLSCREEN:
-            mplEventHandling(evFullScreen, 0);
+            uiEventHandling(evFullScreen, 0);
             break;
         }
 
         break;
 
     case guiReDraw:
-        mplEventHandling(evRedraw, 0);
+        uiEventHandling(evRedraw, 0);
         break;
 
     case guiSetVolume:
@@ -706,37 +706,37 @@
             float l, r;
 
             mixer_getvolume(mixer, &l, &r);
-            guiIntfStruct.Volume = (r > l ? r : l);
+            guiInfo.Volume = (r > l ? r : l);
 
             if (r != l)
-                guiIntfStruct.Balance = ((r - l) + 100) * 0.5f;
+                guiInfo.Balance = ((r - l) + 100) * 0.5f;
             else
-                guiIntfStruct.Balance = 50.0f;
+                guiInfo.Balance = 50.0f;
 
-            btnModify(evSetVolume, guiIntfStruct.Volume);
-            btnModify(evSetBalance, guiIntfStruct.Balance);
+            btnModify(evSetVolume, guiInfo.Volume);
+            btnModify(evSetBalance, guiInfo.Balance);
         }
         break;
 
     case guiSetFileFormat:
-        guiIntfStruct.FileFormat = (int)arg;
+        guiInfo.FileFormat = (int)arg;
         break;
 
     case guiSetValues:
 
         // video
 
-        guiIntfStruct.sh_video = arg;
+        guiInfo.sh_video = arg;
 
         if (arg) {
             sh_video_t *sh = arg;
-            guiIntfStruct.FPS = sh->fps;
+            guiInfo.FPS = sh->fps;
         }
 
-        if (guiIntfStruct.NoWindow)
-            wsVisibleWindow(&appMPlayer.subWindow, wsHideWindow);
+        if (guiInfo.NoWindow)
+            wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
 
-        if (guiIntfStruct.StreamType == STREAMTYPE_STREAM)
+        if (guiInfo.StreamType == STREAMTYPE_STREAM)
             btnSet(evSetMoviePosition, btnDisabled);
         else
             btnSet(evSetMoviePosition, btnReleased);
@@ -747,15 +747,15 @@
             float l, r;
 
             mixer_getvolume(mixer, &l, &r);
-            guiIntfStruct.Volume = (r > l ? r : l);
+            guiInfo.Volume = (r > l ? r : l);
 
             if (r != l)
-                guiIntfStruct.Balance = ((r - l) + 100) * 0.5f;
+                guiInfo.Balance = ((r - l) + 100) * 0.5f;
             else
-                guiIntfStruct.Balance = 50.0f;
+                guiInfo.Balance = 50.0f;
 
-            btnModify(evSetVolume, guiIntfStruct.Volume);
-            btnModify(evSetBalance, guiIntfStruct.Balance);
+            btnModify(evSetVolume, guiInfo.Volume);
+            btnModify(evSetBalance, guiInfo.Balance);
         }
 
         if (gtkEnableAudioEqualizer) {
@@ -775,9 +775,9 @@
         // subtitle
 
 #ifdef CONFIG_DXR3
-        if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3") && (guiIntfStruct.FileFormat != DEMUXER_TYPE_MPEG_PS) && !gtkVfLAVC) {
+        if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3") && (guiInfo.FileFormat != DEMUXER_TYPE_MPEG_PS) && !gtkVfLAVC) {
             gtkMessageBox(GTK_MB_FATAL, MSGTR_NEEDLAVC);
-            guiIntfStruct.Playing = 0;
+            guiInfo.Playing = 0;
             return True;
         }
 #endif
@@ -786,8 +786,8 @@
 
     case guiSetDefaults:
 
-// if ( guiIntfStruct.Playing == 1 && guiIntfStruct.FilenameChanged )
-        if (guiIntfStruct.FilenameChanged) {
+// if ( guiInfo.Playing == 1 && guiInfo.FilenameChanged )
+        if (guiInfo.FilenameChanged) {
             audio_id  = -1;
             video_id  = -1;
             dvdsub_id = -1;
@@ -798,9 +798,9 @@
             force_fps = 0;
         }
 
-        guiIntfStruct.demuxer  = NULL;
-        guiIntfStruct.sh_video = NULL;
-        wsPostRedisplay(&appMPlayer.subWindow);
+        guiInfo.demuxer  = NULL;
+        guiInfo.sh_video = NULL;
+        wsPostRedisplay(&guiApp.subWindow);
 
         break;
 
@@ -808,7 +808,7 @@
 
         guiGetEvent(guiSetDefaults, NULL);
 
-        switch (guiIntfStruct.StreamType) {
+        switch (guiInfo.StreamType) {
         case STREAMTYPE_PLAYLIST:
             break;
 
@@ -817,8 +817,8 @@
         {
             char tmp[512];
 
-            sprintf(tmp, "vcd://%d", guiIntfStruct.Track + 1);
-            guiSetFilename(guiIntfStruct.Filename, tmp);
+            sprintf(tmp, "vcd://%d", guiInfo.Track + 1);
+            guiSetFilename(guiInfo.Filename, tmp);
         }
         break;
 #endif
@@ -828,23 +828,23 @@
         {
             char tmp[512];
 
-            sprintf(tmp, "dvd://%d", guiIntfStruct.Title);
-            guiSetFilename(guiIntfStruct.Filename, tmp);
+            sprintf(tmp, "dvd://%d", guiInfo.Title);
+            guiSetFilename(guiInfo.Filename, tmp);
         }
 
-            dvd_chapter = guiIntfStruct.Chapter;
-            dvd_angle   = guiIntfStruct.Angle;
+            dvd_chapter = guiInfo.Chapter;
+            dvd_angle   = guiInfo.Angle;
 
             break;
 #endif
         }
 
-// if ( guiIntfStruct.StreamType != STREAMTYPE_PLAYLIST ) // Does not make problems anymore!
+// if ( guiInfo.StreamType != STREAMTYPE_PLAYLIST ) // Does not make problems anymore!
         {
-            if (guiIntfStruct.Filename)
-                filename = gstrdup(guiIntfStruct.Filename);
+            if (guiInfo.Filename)
+                filename = gstrdup(guiInfo.Filename);
             else if (filename)
-                guiSetFilename(guiIntfStruct.Filename, filename);
+                guiSetFilename(guiInfo.Filename, filename);
         }
 
         // video opts
@@ -868,12 +868,12 @@
         {
             int i = 0;
 
-            guiIntfStruct.NoWindow = False;
+            guiInfo.NoWindow = False;
 
             while (video_out_drivers[i++]) {
                 if (video_out_drivers[i - 1]->control(VOCTRL_GUISUPPORT, NULL) == VO_TRUE) {
                     if ((video_driver_list && !gstrcmp(video_driver_list[0], (char *)video_out_drivers[i - 1]->info->short_name)) && (video_out_drivers[i - 1]->control(VOCTRL_GUI_NOWINDOW, NULL) == VO_TRUE)) {
-                        guiIntfStruct.NoWindow = True;
+                        guiInfo.NoWindow = True;
                         break;
                     }
                 }
@@ -882,7 +882,7 @@
 
 #ifdef CONFIG_DXR3
         if (video_driver_list && !gstrcmp(video_driver_list[0], "dxr3"))
-            if (guiIntfStruct.StreamType != STREAMTYPE_DVD && guiIntfStruct.StreamType != STREAMTYPE_VCD)
+            if (guiInfo.StreamType != STREAMTYPE_DVD && guiInfo.StreamType != STREAMTYPE_VCD)
                 if (gtkVfLAVC)
                     add_vf("lavc");
 #endif
@@ -977,7 +977,7 @@
 
         // subtitle
 
-// subdata->filename=gstrdup( guiIntfStruct.Subtitlename );
+// subdata->filename=gstrdup( guiInfo.Subtitlename );
         stream_dump_type = 0;
 
         if (gtkSubDumpMPSub)
@@ -997,16 +997,16 @@
         if (gtkAutoSyncOn)
             autosync = gtkAutoSync;
 
-        if (guiIntfStruct.AudioFile)
-            audio_stream = gstrdup(guiIntfStruct.AudioFile);
-        else if (guiIntfStruct.FilenameChanged)
+        if (guiInfo.AudioFile)
+            audio_stream = gstrdup(guiInfo.AudioFile);
+        else if (guiInfo.FilenameChanged)
             gfree((void **)&audio_stream);
 
 // audio_stream = NULL;
 
-        guiIntfStruct.DiskChanged     = 0;
-        guiIntfStruct.FilenameChanged = 0;
-        guiIntfStruct.NewPlay = 0;
+        guiInfo.DiskChanged     = 0;
+        guiInfo.FilenameChanged = 0;
+        guiInfo.NewPlay = 0;
 
 #ifdef CONFIG_ASS
         ass_enabled       = gtkASS.enabled;
@@ -1023,7 +1023,7 @@
 
 void guiEventHandling(void)
 {
-    if (!guiIntfStruct.Playing || guiIntfStruct.NoWindow)
+    if (!guiInfo.Playing || guiInfo.NoWindow)
         wsHandleEvents();
 
     gtkEventHandling();
@@ -1056,7 +1056,7 @@
 {
     equalizer_t *eq   = (equalizer_t *)vparam;
     plItem *item      = (plItem *)vparam;
-    URLItem *url_item = (URLItem *)vparam;
+    urlItem *url_item = (urlItem *)vparam;
     int is_added      = True;
 
     switch (cmd) {
@@ -1167,7 +1167,7 @@
         free(curr);
     }
 
-        mplCurr();   // instead of using mplNext && mplPrev
+        uiCurr();   // instead of using uiNext && uiPrev
 
         return plCurrent;
 
@@ -1203,7 +1203,7 @@
     // handle url
     case gtkAddURLItem:
         if (URLList) {
-            URLItem *next_url = URLList;
+            urlItem *next_url = URLList;
             is_added = False;
 
             while (next_url->next) {
@@ -1276,28 +1276,28 @@
     case gtkClearStruct:
 
         if ((unsigned int)vparam & guiFilenames) {
-            gfree((void **)&guiIntfStruct.Filename);
-            gfree((void **)&guiIntfStruct.Subtitlename);
-            gfree((void **)&guiIntfStruct.AudioFile);
+            gfree((void **)&guiInfo.Filename);
+            gfree((void **)&guiInfo.Subtitlename);
+            gfree((void **)&guiInfo.AudioFile);
             gtkSet(gtkDelPl, 0, NULL);
         }
 
 #ifdef CONFIG_DVDREAD
         if ((unsigned int)vparam & guiDVD)
-            memset(&guiIntfStruct.DVD, 0, sizeof(guiDVDStruct));
+            memset(&guiInfo.DVD, 0, sizeof(guiDVDStruct));
 #endif
 
 #ifdef CONFIG_VCD
         if ((unsigned int)vparam & guiVCD)
-            guiIntfStruct.VCDTracks = 0;
+            guiInfo.VCDTracks = 0;
 #endif
 
         return NULL;
 
     case gtkSetExtraStereo:
         gtkAOExtraStereoMul = fparam;
-        if (guiIntfStruct.afilter)
-            af_control_any_rev(guiIntfStruct.afilter, AF_CONTROL_ES_MUL | AF_CONTROL_SET, &gtkAOExtraStereoMul);
+        if (guiInfo.afilter)
+            af_control_any_rev(guiInfo.afilter, AF_CONTROL_ES_MUL | AF_CONTROL_SET, &gtkAOExtraStereoMul);
         return NULL;
 
     case gtkSetPanscan:
@@ -1321,23 +1321,23 @@
     // set equalizers
 
     case gtkSetContrast:
-        if (guiIntfStruct.sh_video)
-            set_video_colors(guiIntfStruct.sh_video, "contrast", (int)fparam);
+        if (guiInfo.sh_video)
+            set_video_colors(guiInfo.sh_video, "contrast", (int)fparam);
         return NULL;
 
     case gtkSetBrightness:
-        if (guiIntfStruct.sh_video)
-            set_video_colors(guiIntfStruct.sh_video, "brightness", (int)fparam);
+        if (guiInfo.sh_video)
+            set_video_colors(guiInfo.sh_video, "brightness", (int)fparam);
         return NULL;
 
     case gtkSetHue:
-        if (guiIntfStruct.sh_video)
-            set_video_colors(guiIntfStruct.sh_video, "hue", (int)fparam);
+        if (guiInfo.sh_video)
+            set_video_colors(guiInfo.sh_video, "hue", (int)fparam);
         return NULL;
 
     case gtkSetSaturation:
-        if (guiIntfStruct.sh_video)
-            set_video_colors(guiIntfStruct.sh_video, "saturation", (int)fparam);
+        if (guiInfo.sh_video)
+            set_video_colors(guiInfo.sh_video, "saturation", (int)fparam);
         return NULL;
 
     case gtkSetEqualizer:
@@ -1349,18 +1349,18 @@
             tmp.ch  = eq->channel;
             tmp.arg = gtkEquChannels[eq->channel];
 
-            if (guiIntfStruct.afilter)
-                af_control_any_rev(guiIntfStruct.afilter, AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp);
+            if (guiInfo.afilter)
+                af_control_any_rev(guiInfo.afilter, AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp);
         } else {
             int i;
 
             memset(gtkEquChannels, 0, sizeof(gtkEquChannels));
 
-            if (guiIntfStruct.afilter) {
+            if (guiInfo.afilter) {
                 for (i = 0; i < 6; i++) {
                     tmp.ch  = i;
                     tmp.arg = gtkEquChannels[i];
-                    af_control_any_rev(guiIntfStruct.afilter, AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp);
+                    af_control_any_rev(guiInfo.afilter, AF_CONTROL_EQUALIZER_GAIN | AF_CONTROL_SET, &tmp);
                 }
             }
         }
@@ -1423,12 +1423,12 @@
                 result = 1;
     }
 
-    mplCurr();   // update filename
-    mplGotoTheNext = 1;
+    uiCurr();   // update filename
+    uiGotoTheNext = 1;
 
     if (!enqueue)
-        filename = guiIntfStruct.Filename;             // Backward compatibility; if file is specified on commandline,
-                                                       // gmplayer does directly start in Play-Mode.
+        filename = guiInfo.Filename;             // Backward compatibility; if file is specified on commandline,
+                                                 // gmplayer does directly start in Play-Mode.
     else
         filename = NULL;
 
@@ -1464,7 +1464,7 @@
     if (save && result)
         gtkSet(gtkDelCurrPlItem, 0, 0);
 
-    mplCurr();   // update filename
+    uiCurr();   // update filename
     filename = NULL;
 
     return result;
--- a/gui/interface.h	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/interface.h	Sat Jun 18 14:33:41 2011 +0000
@@ -212,9 +212,9 @@
 typedef struct urlItem {
     struct urlItem *next;
     char *url;
-} URLItem;
+} urlItem;
 
-extern guiInterface_t guiIntfStruct;
+extern guiInterface_t guiInfo;
 
 extern int guiWinID;
 
@@ -226,7 +226,7 @@
 extern plItem *plCurrent;
 extern plItem *plLastPlayed;
 
-extern URLItem *URLList;
+extern urlItem *URLList;
 
 extern char *fsHistory[fsPersistant_MaxPos];
 
--- a/gui/mplayer/gmplayer.h	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/gmplayer.h	Sat Jun 18 14:33:41 2011 +0000
@@ -19,36 +19,36 @@
 #ifndef MPLAYER_GUI_GMPLAYER_H
 #define MPLAYER_GUI_GMPLAYER_H
 
-extern int             mplSubRender;
-extern int             mplMainRender;
+extern int             uiSubRender;
+extern int             uiMainRender;
 
-extern unsigned char * mplDrawBuffer;
-extern unsigned char * mplMenuDrawBuffer;
+extern unsigned char * mainDrawBuffer;
+extern unsigned char * menuDrawBuffer;
 extern int             mainVisible;
 
-extern int             mplMainAutoPlay;
-extern int             mplMiddleMenu;
-extern int             mplPBFade;
+extern int             uiMainAutoPlay;
+extern int             uiMiddleMenu;
+extern int             uiPlaybarFade;
 
 extern int             sx, sy;
 
-void mplInit( void * disp );
+void uiInit( void * disp );
 
-void mplMainDraw( void );
-void mplEventHandling( int msg, float param );
-void mplMainMouseHandle( int Button, int X, int Y, int RX, int RY );
-void mplMainKeyHandle( int KeyCode, int Type, int Key );
-void mplDandDHandler(int num, char** files);
+void uiMainDraw( void );
+void uiEventHandling( int msg, float param );
+void uiMainMouseHandle( int Button, int X, int Y, int RX, int RY );
+void uiMainKeyHandle( int KeyCode, int Type, int Key );
+void uiDandDHandler(int num, char** files);
 
-void mplSubDraw( void );
-void mplSubMouseHandle( int Button, int X, int Y, int RX, int RY );
+void uiSubDraw( void );
+void uiSubMouseHandle( int Button, int X, int Y, int RX, int RY );
 
-void mplMenuInit( void );
-void mplHideMenu( int mx, int my, int w );
-void mplShowMenu( int mx, int my );
-void mplMenuMouseHandle( int X, int Y, int RX, int RY );
+void uiMenuInit( void );
+void uiHideMenu( int mx, int my, int w );
+void uiShowMenu( int mx, int my );
+void uiMenuMouseHandle( int X, int Y, int RX, int RY );
 
-void mplPBInit( void );
-void mplPBShow( int x, int y );
+void uiPlaybarInit( void );
+void uiPlaybarShow( int x, int y );
 
 #endif /* MPLAYER_GUI_GMPLAYER_H */
--- a/gui/mplayer/gtk/eq.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/gtk/eq.c	Sat Jun 18 14:33:41 2011 +0000
@@ -84,12 +84,12 @@
  gtk_adjustment_set_value( A8000adj,0.0f - gtkEquChannels[channel][8] );
  gtk_adjustment_set_value( A16000adj,0.0f - gtkEquChannels[channel][9] );
 
- if ( guiIntfStruct.sh_video )
+ if ( guiInfo.sh_video )
   {
-   get_video_colors( guiIntfStruct.sh_video,"brightness",&vo_gamma_brightness );
-   get_video_colors( guiIntfStruct.sh_video,"contrast",&vo_gamma_contrast );
-   get_video_colors( guiIntfStruct.sh_video,"hue",&vo_gamma_hue );
-   get_video_colors( guiIntfStruct.sh_video,"saturation",&vo_gamma_saturation );
+   get_video_colors( guiInfo.sh_video,"brightness",&vo_gamma_brightness );
+   get_video_colors( guiInfo.sh_video,"contrast",&vo_gamma_contrast );
+   get_video_colors( guiInfo.sh_video,"hue",&vo_gamma_hue );
+   get_video_colors( guiInfo.sh_video,"saturation",&vo_gamma_saturation );
   }
 
  gtk_adjustment_set_value( VContrastadj,(float)vo_gamma_contrast );
@@ -105,17 +105,17 @@
  str[1]="";
  str[0]=MSGTR_EQU_All;
  gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
- if ( guiIntfStruct.AudioType > 1 )
+ if ( guiInfo.AudioType > 1 )
   {
    str[0]=gtkEquChannel1; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
    str[0]=gtkEquChannel2; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
   }
- if ( guiIntfStruct.AudioType > 2 )
+ if ( guiInfo.AudioType > 2 )
   {
    str[0]=gtkEquChannel3; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
    str[0]=gtkEquChannel4; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
   }
- if ( guiIntfStruct.AudioType > 4 )
+ if ( guiInfo.AudioType > 4 )
   {
    str[0]=gtkEquChannel5; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
    str[0]=gtkEquChannel6; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
@@ -137,7 +137,7 @@
 
  eqSetChannelNames();
 
- if ( !guiIntfStruct.Playing || !guiIntfStruct.sh_video )
+ if ( !guiInfo.Playing || !guiInfo.sh_video )
   {
    gtk_widget_set_sensitive( VContrast,FALSE );
    gtk_widget_set_sensitive( VBrightness,FALSE );
@@ -146,7 +146,7 @@
   }
  Channel=-1;
  eqSetBands( 0 );
- if ( !guiIntfStruct.Playing || !gtkEnableAudioEqualizer )
+ if ( !guiInfo.Playing || !gtkEnableAudioEqualizer )
   {
    gtk_widget_set_sensitive( ChannelsList,FALSE );
    gtk_widget_set_sensitive( A3125,FALSE );
@@ -225,13 +225,13 @@
    case 1:
 	if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 )
 	 {
-	  if ( !guiIntfStruct.Playing || !gtkEnableAudioEqualizer ) break;
+	  if ( !guiInfo.Playing || !gtkEnableAudioEqualizer ) break;
 	  gtkSet( gtkSetEqualizer,0,NULL );
 	  eqSetBands( Channel );
 	 }
 	 else
 	  {
-	   if ( !guiIntfStruct.Playing ) break;
+	   if ( !guiInfo.Playing ) break;
 	   gtkSet( gtkSetContrast,0.0f,NULL );
 	   gtkSet( gtkSetBrightness,0.0f,NULL );
 	   gtkSet( gtkSetHue,0.0f,NULL );
--- a/gui/mplayer/gtk/fs.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/gtk/fs.c	Sat Jun 18 14:33:41 2011 +0000
@@ -263,7 +263,7 @@
         gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
         g_list_free( fsList_items );
         gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsVideoFilterNames[k >= 0 ? k : i-2][0] );
-	tmp=guiIntfStruct.Filename;
+	tmp=guiInfo.Filename;
         break;
    case fsSubtitleSelector:
         gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_SubtitleSelect );
@@ -274,7 +274,7 @@
         gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
         g_list_free( fsList_items );
         gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsSubtitleFilterNames[k >= 0 ? k : i-2][0] );
-	tmp=guiIntfStruct.Subtitlename;
+	tmp=guiInfo.Subtitlename;
         break;
    case fsOtherSelector:
         gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_OtherSelect );
@@ -284,7 +284,7 @@
         gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
         g_list_free( fsList_items );
         gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsOtherFilterNames[0][0] );
-	tmp=guiIntfStruct.Othername;
+	tmp=guiInfo.Othername;
         break;
    case fsAudioSelector:
 	gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_AudioFileSelect );
@@ -295,7 +295,7 @@
 	gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
 	g_list_free( fsList_items );
 	gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsAudioFileNames[k >= 0 ? k : i-2][0] );
-	tmp=guiIntfStruct.AudioFile;
+	tmp=guiInfo.AudioFile;
 	break;
    case fsFontSelector:
         gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FontSelect );
@@ -476,22 +476,22 @@
  switch ( fsType )
   {
    case fsVideoSelector:
-          guiSetDF( guiIntfStruct.Filename,fsSelectedDirectory,fsSelectedFile );
-          guiIntfStruct.StreamType=STREAMTYPE_FILE;
-          guiIntfStruct.FilenameChanged=1; sub_fps=0;
-	  gfree( (void **)&guiIntfStruct.AudioFile );
-	  gfree( (void **)&guiIntfStruct.Subtitlename );
+          guiSetDF( guiInfo.Filename,fsSelectedDirectory,fsSelectedFile );
+          guiInfo.StreamType=STREAMTYPE_FILE;
+          guiInfo.FilenameChanged=1; sub_fps=0;
+	  gfree( (void **)&guiInfo.AudioFile );
+	  gfree( (void **)&guiInfo.Subtitlename );
           fs_PersistantHistory( get_current_dir_name_utf8() );      //totem, write into history
           break;
    case fsSubtitleSelector:
-          guiSetDF( guiIntfStruct.Subtitlename,fsSelectedDirectory,fsSelectedFile );
-	  guiLoadSubtitle( guiIntfStruct.Subtitlename );
+          guiSetDF( guiInfo.Subtitlename,fsSelectedDirectory,fsSelectedFile );
+	  guiLoadSubtitle( guiInfo.Subtitlename );
           break;
    case fsOtherSelector:
-          guiSetDF( guiIntfStruct.Othername,fsSelectedDirectory,fsSelectedFile );
+          guiSetDF( guiInfo.Othername,fsSelectedDirectory,fsSelectedFile );
           break;
    case fsAudioSelector:
-          guiSetDF( guiIntfStruct.AudioFile,fsSelectedDirectory,fsSelectedFile );
+          guiSetDF( guiInfo.AudioFile,fsSelectedDirectory,fsSelectedFile );
           break;
    case fsFontSelector:
           guiSetDF( font_name,fsSelectedDirectory,fsSelectedFile );
@@ -509,7 +509,7 @@
    item=item->next;
   }
  if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name_utf8() );
- if ( mplMainAutoPlay ) { mplMainAutoPlay=0; mplEventHandling( evPlay,0 ); }
+ if ( uiMainAutoPlay ) { uiMainAutoPlay=0; uiEventHandling( evPlay,0 ); }
   else guiGetEvent( guiCEvent,guiSetStop );
 }
 
--- a/gui/mplayer/gtk/gtk_menu.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/gtk/gtk_menu.c	Sat Jun 18 14:33:41 2011 +0000
@@ -84,7 +84,7 @@
 // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 );
  gtkPopupMenu=Item & 0x0000ffff;
  gtkPopupMenuParam=Item >> 16;
- mplEventHandling( Item & 0x0000ffff,Item >> 16 );
+ uiEventHandling( Item & 0x0000ffff,Item >> 16 );
 }
 
 static GtkWidget * AddMenuCheckItem(GtkWidget *window1, const char * immagine_xpm, GtkWidget* Menu,const char* label, gboolean state, int Number)
@@ -411,8 +411,8 @@
  GtkWidget * SubMenu = NULL;
  GtkWidget * MenuItem = NULL;
  GtkWidget * H, * N, * D, * F;
- mixer_t *mixer = mpctx_get_mixer(guiIntfStruct.mpcontext);
- int global_sub_size = mpctx_get_global_sub_size(guiIntfStruct.mpcontext);
+ mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext);
+ int global_sub_size = mpctx_get_global_sub_size(guiInfo.mpcontext);
 
  Menu=gtk_menu_new();
  gtk_widget_realize (Menu);
@@ -453,10 +453,10 @@
     AddMenuItem( window1, (const char*)playvcd_xpm, VCDSubMenu,MSGTR_MENU_PlayDisc,evPlayVCD );
     AddSeparator( VCDSubMenu );
     VCDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, VCDSubMenu,MSGTR_MENU_Titles );
-    if ( guiIntfStruct.VCDTracks )
+    if ( guiInfo.VCDTracks )
      {
       char tmp[32]; int i;
-      for ( i=1;i < guiIntfStruct.VCDTracks;i++ )
+      for ( i=1;i < guiInfo.VCDTracks;i++ )
        {
         snprintf( tmp,32,MSGTR_MENU_Title,i );
     //AddMenuItem( VCDTitleMenu,tmp,( i << 16 ) + evSetVCDTrack );
@@ -475,14 +475,14 @@
 //    AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone );
     AddSeparator( DVDSubMenu );
     DVDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, DVDSubMenu,MSGTR_MENU_Titles );
-     if ( guiIntfStruct.DVD.titles )
+     if ( guiInfo.DVD.titles )
       {
        char tmp[32]; int i;
-       for ( i=1 ; i<= guiIntfStruct.DVD.titles;i++ )
+       for ( i=1 ; i<= guiInfo.DVD.titles;i++ )
         {
          snprintf( tmp,32,MSGTR_MENU_Title,i);
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,tmp,
-			   guiIntfStruct.DVD.current_title == i,
+			   guiInfo.DVD.current_title == i,
 			   (i << 16) + evSetDVDTitle );
         }
       }
@@ -492,13 +492,13 @@
         gtk_widget_set_sensitive( MenuItem,FALSE );
        }
     DVDChapterMenu=AddSubMenu( window1, (const char*)chapter_xpm, DVDSubMenu,MSGTR_MENU_Chapters );
-     if ( guiIntfStruct.DVD.chapters )
+     if ( guiInfo.DVD.chapters )
       {
        char tmp[32]; int i;
-       for ( i=1;i <= guiIntfStruct.DVD.chapters;i++ )
+       for ( i=1;i <= guiInfo.DVD.chapters;i++ )
         {
          snprintf( tmp,32,MSGTR_MENU_Chapter,i );
-         AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiIntfStruct.DVD.current_chapter == i,
+         AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiInfo.DVD.current_chapter == i,
 			   ( i << 16 ) + evSetDVDChapter );
         }
       }
@@ -508,18 +508,18 @@
         gtk_widget_set_sensitive( MenuItem,FALSE );
        }
     DVDAudioLanguageMenu=AddSubMenu( window1, (const char*)tongue_xpm, DVDSubMenu,MSGTR_MENU_AudioLanguages );
-     if ( guiIntfStruct.DVD.nr_of_audio_channels )
+     if ( guiInfo.DVD.nr_of_audio_channels )
       {
-       char tmp[64]; int i, id = guiIntfStruct.demuxer ? ((demuxer_t *)guiIntfStruct.demuxer)->audio->id : audio_id;
-       for ( i=0;i < guiIntfStruct.DVD.nr_of_audio_channels;i++ )
+       char tmp[64]; int i, id = guiInfo.demuxer ? ((demuxer_t *)guiInfo.demuxer)->audio->id : audio_id;
+       for ( i=0;i < guiInfo.DVD.nr_of_audio_channels;i++ )
         {
-	 snprintf( tmp,64,"%s - %s %s",GetLanguage( guiIntfStruct.DVD.audio_streams[i].language ),
-	   ChannelTypes[ guiIntfStruct.DVD.audio_streams[i].type ],
-	   ChannelNumbers[ guiIntfStruct.DVD.audio_streams[i].channels ] );
-//	 if ( id == -1 ) id=audio_id; //guiIntfStruct.DVD.audio_streams[i].id;
+	 snprintf( tmp,64,"%s - %s %s",GetLanguage( guiInfo.DVD.audio_streams[i].language ),
+	   ChannelTypes[ guiInfo.DVD.audio_streams[i].type ],
+	   ChannelNumbers[ guiInfo.DVD.audio_streams[i].channels ] );
+//	 if ( id == -1 ) id=audio_id; //guiInfo.DVD.audio_streams[i].id;
          AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp,
-			   id == guiIntfStruct.DVD.audio_streams[i].id,
-			   ( guiIntfStruct.DVD.audio_streams[i].id << 16 ) + evSetDVDAudio );
+			   id == guiInfo.DVD.audio_streams[i].id,
+			   ( guiInfo.DVD.audio_streams[i].id << 16 ) + evSetDVDAudio );
         }
       }
       else
@@ -528,16 +528,16 @@
         gtk_widget_set_sensitive( MenuItem,FALSE );
        }
     DVDSubtitleLanguageMenu=AddSubMenu( window1, (const char*)tonguebla_xpm, DVDSubMenu,MSGTR_MENU_SubtitleLanguages );
-     if ( guiIntfStruct.DVD.nr_of_subtitles )
+     if ( guiInfo.DVD.nr_of_subtitles )
       {
        char tmp[64]; int i;
        AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + evSetDVDSubtitle );
-       for ( i=0;i < guiIntfStruct.DVD.nr_of_subtitles;i++ )
+       for ( i=0;i < guiInfo.DVD.nr_of_subtitles;i++ )
         {
-         av_strlcpy( tmp,GetLanguage( guiIntfStruct.DVD.subtitles[i].language ),sizeof(tmp) );
+         av_strlcpy( tmp,GetLanguage( guiInfo.DVD.subtitles[i].language ),sizeof(tmp) );
          AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp,
-			   dvdsub_id == guiIntfStruct.DVD.subtitles[i].id,
-			   ( guiIntfStruct.DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle );
+			   dvdsub_id == guiInfo.DVD.subtitles[i].id,
+			   ( guiInfo.DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle );
         }
       }
       else
@@ -547,7 +547,7 @@
        }
 #endif
 
-//  if ( guiIntfStruct.Playing )
+//  if ( guiInfo.Playing )
    {
     AspectMenu=AddSubMenu( window1, (const char*)aspect_xpm, Menu,MSGTR_MENU_AspectRatio );
     AddMenuItem( window1, (const char*)a11_xpm, AspectMenu,MSGTR_MENU_Original,( 1 << 16 ) + evSetAspect );
@@ -556,20 +556,20 @@
     AddMenuItem( window1, (const char*)a235_xpm, AspectMenu,"2.35",( 4 << 16 ) + evSetAspect );
    }
 
-  if ( guiIntfStruct.Playing && guiIntfStruct.demuxer && guiIntfStruct.StreamType != STREAMTYPE_DVD )
+  if ( guiInfo.Playing && guiInfo.demuxer && guiInfo.StreamType != STREAMTYPE_DVD )
    {
     int i,c = 0;
 
     for ( i=0;i < MAX_A_STREAMS;i++ )
-     if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] ) c++;
+     if ( ((demuxer_t *)guiInfo.demuxer)->a_streams[i] ) c++;
 
     if ( c > 1 )
      {
       SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_AudioTrack );
       for ( i=0;i < MAX_A_STREAMS;i++ )
-       if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] )
+       if ( ((demuxer_t *)guiInfo.demuxer)->a_streams[i] )
         {
-         int aid = ((sh_audio_t *)((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i])->aid;
+         int aid = ((sh_audio_t *)((demuxer_t *)guiInfo.demuxer)->a_streams[i])->aid;
          char tmp[32];
          snprintf( tmp,32,MSGTR_MENU_Track,aid );
          AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( aid << 16 ) + evSetAudio );
@@ -577,15 +577,15 @@
      }
 
     for ( c=0,i=0;i < MAX_V_STREAMS;i++ )
-     if ( ((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i] ) c++;
+     if ( ((demuxer_t *)guiInfo.demuxer)->v_streams[i] ) c++;
 
     if ( c > 1 )
      {
       SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_VideoTrack );
       for ( i=0;i < MAX_V_STREAMS;i++ )
-       if ( ((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i] )
+       if ( ((demuxer_t *)guiInfo.demuxer)->v_streams[i] )
         {
-         int vid = ((sh_video_t *)((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i])->vid;
+         int vid = ((sh_video_t *)((demuxer_t *)guiInfo.demuxer)->v_streams[i])->vid;
          char tmp[32];
          snprintf( tmp,32,MSGTR_MENU_Track,vid );
          AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( vid << 16 ) + evSetVideo );
@@ -594,7 +594,7 @@
    }
 
   /* cheap subtitle switching for non-DVD streams */
-  if ( global_sub_size && guiIntfStruct.StreamType != STREAMTYPE_DVD )
+  if ( global_sub_size && guiInfo.StreamType != STREAMTYPE_DVD )
    {
     int i;
     SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu, MSGTR_MENU_Subtitles );
@@ -609,29 +609,29 @@
 
   AddSeparator( Menu );
   MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer->muted,evMute );
-  if ( !guiIntfStruct.AudioType ) gtk_widget_set_sensitive( MenuItem,FALSE );
+  if ( !guiInfo.AudioType ) gtk_widget_set_sensitive( MenuItem,FALSE );
   AddMenuItem( window1, (const char*)pl_xpm, Menu,MSGTR_MENU_PlayList, evPlayList );
   AddMenuItem( window1, (const char*)skin_xpm, Menu,MSGTR_MENU_SkinBrowser, evSkinBrowser );
   AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_MENU_Preferences, evPreferences );
   AddMenuItem( window1, (const char*)eq_xpm, Menu,MSGTR_Equalizer, evEqualizer );
 
-  if ( guiIntfStruct.NoWindow == False )
+  if ( guiInfo.NoWindow == False )
    {
     int b1 = 0, b2 = 0, b_half = 0;
     AddSeparator( Menu );
-    if ( !appMPlayer.subWindow.isFullScreen && guiIntfStruct.Playing )
+    if ( !guiApp.subWindow.isFullScreen && guiInfo.Playing )
      {
-      if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth * 2 )&&
-           ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight * 2 ) ) b2=1;
-      else if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth / 2 ) &&
-                ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight / 2 ) ) b_half=1;
+      if ( ( guiApp.subWindow.Width == guiInfo.MovieWidth * 2 )&&
+           ( guiApp.subWindow.Height == guiInfo.MovieHeight * 2 ) ) b2=1;
+      else if ( ( guiApp.subWindow.Width == guiInfo.MovieWidth / 2 ) &&
+                ( guiApp.subWindow.Height == guiInfo.MovieHeight / 2 ) ) b_half=1;
       else b1=1;
-     } else b1=!appMPlayer.subWindow.isFullScreen;
+     } else b1=!guiApp.subWindow.isFullScreen;
     H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize );
     N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize"      ",b1,evNormalSize );
     D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize );
-    F=AddMenuCheckItem( window1, (const char*)fs_xpm, Menu,MSGTR_MENU_FullScreen,appMPlayer.subWindow.isFullScreen,evFullScreen );
-  if ( !gtkShowVideoWindow && !guiIntfStruct.Playing )
+    F=AddMenuCheckItem( window1, (const char*)fs_xpm, Menu,MSGTR_MENU_FullScreen,guiApp.subWindow.isFullScreen,evFullScreen );
+  if ( !gtkShowVideoWindow && !guiInfo.Playing )
    {
     gtk_widget_set_sensitive( H,FALSE );
     gtk_widget_set_sensitive( N,FALSE );
--- a/gui/mplayer/gtk/gtk_url.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/gtk/gtk_url.c	Sat Jun 18 14:33:41 2011 +0000
@@ -47,7 +47,7 @@
 
  if ( URLList )
   {
-   URLItem * item = URLList;
+   urlItem * item = URLList;
    g_list_free( URLComboEntrys );
    URLComboEntrys=NULL;
    while( item )
@@ -76,7 +76,7 @@
 
 static void on_Button_pressed( GtkButton * button,gpointer user_data )
 {
- URLItem * item;
+ urlItem * item;
 
  if ( (int)user_data )
   {
@@ -97,12 +97,12 @@
       }
      URLComboEntrys=g_list_prepend( URLComboEntrys,(gchar *)str );
 
-     item=calloc( 1,sizeof( URLItem ) );
+     item=calloc( 1,sizeof( urlItem ) );
      item->url=gstrdup( str );
      gtkSet( gtkAddURLItem,0,(void *)item );
 
-     guiSetFilename( guiIntfStruct.Filename,str ); guiIntfStruct.FilenameChanged=1;
-     mplEventHandling( evPlayNetwork,0 );
+     guiSetFilename( guiInfo.Filename,str ); guiInfo.FilenameChanged=1;
+     uiEventHandling( evPlayNetwork,0 );
     }
   }
  HideURLDialogBox();
--- a/gui/mplayer/gtk/opts.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/gtk/opts.c	Sat Jun 18 14:33:41 2011 +0000
@@ -312,7 +312,7 @@
    case 3: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ),TRUE ); break;
   }
 #if 0
- if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename );
+ if ( guiInfo.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiInfo.Subtitlename );
 #endif
 
 #ifdef CONFIG_ICONV
@@ -402,7 +402,7 @@
  gtk_adjustment_set_value( HSPPQualityadj,auto_quality );
 
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPlayBar ),gtkEnablePlayBar );
- if ( !appMPlayer.barIsPresent )
+ if ( !guiApp.playbarIsPresent )
   {
    gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPlayBar ),0 );
    gtk_widget_set_sensitive( CBPlayBar,FALSE );
@@ -674,7 +674,7 @@
  switch ( (int)user_data )
   {
    case 0: // extra stereo coefficient
-	if ( !guiIntfStruct.Playing ) break;
+	if ( !guiInfo.Playing ) break;
 	gtkSet( gtkSetExtraStereo,HSExtraStereoMuladj->value,NULL );
 	break;
    case 1: // audio delay
@@ -720,12 +720,12 @@
  switch ( (int)user_data )
   {
    case 0: // extra stereo coefficient
-	if ( guiIntfStruct.Playing )
+	if ( guiInfo.Playing )
 	gtk_widget_set_sensitive( HSExtraStereoMul,gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ) );
 	break;
 //   case 1: // normalize
 //   case 2: // equalizer
-//	if ( guiIntfStruct.Playing ) gtkMessageBox( GTK_MB_WARNING,"Please remember, this function need restart the playing." );
+//	if ( guiInfo.Playing ) gtkMessageBox( GTK_MB_WARNING,"Please remember, this function need restart the playing." );
 //	break;
    case 3:
 	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) gtk_widget_set_sensitive( CBLoadFullscreen,TRUE );
@@ -740,7 +740,7 @@
 	  gtkActive( Preferences );
 	 } else window=wsHideWindow;
 
-	if ( !guiIntfStruct.Playing ) wsVisibleWindow( &appMPlayer.subWindow,window );
+	if ( !guiInfo.Playing ) wsVisibleWindow( &guiApp.subWindow,window );
 	break;
    case 4:
    case 5:
@@ -1248,7 +1248,7 @@
 
   AddLabel( MSGTR_PREFERENCES_AutoQuality,hbox5 );
 
-  if ( guiIntfStruct.sh_video && guiIntfStruct.Playing ) HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,get_video_quality_max( guiIntfStruct.sh_video ),0,0,0 ) );
+  if ( guiInfo.sh_video && guiInfo.Playing ) HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,get_video_quality_max( guiInfo.sh_video ),0,0,0 ) );
    else HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0,0,0 ) );
   HSPPQuality=AddHScaler( HSPPQualityadj,hbox5,0 );
 
--- a/gui/mplayer/gtk/pl.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/gtk/pl.c	Sat Jun 18 14:33:41 2011 +0000
@@ -250,10 +250,10 @@
 	 }
 	if ( plCurrent )
 	 {
-	  mplSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE );
-//	  guiSetDF( guiIntfStruct.Filename,plCurrent->path,plCurrent->name );
-//	  guiIntfStruct.FilenameChanged=1;
-//	  guiIntfStruct.StreamType=STREAMTYPE_FILE;
+	  uiSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE );
+//	  guiSetDF( guiInfo.Filename,plCurrent->path,plCurrent->name );
+//	  guiInfo.FilenameChanged=1;
+//	  guiInfo.StreamType=STREAMTYPE_FILE;
 	 }
        }
   case 0: // cancel
--- a/gui/mplayer/gtk/sb.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/gtk/sb.c	Sat Jun 18 14:33:41 2011 +0000
@@ -95,10 +95,10 @@
   switch ( (int)user_data )
    {
     case 0: // cancel
-	if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) ChangeSkin( gtkOldSkin );
+	if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) uiChangeSkin( gtkOldSkin );
 	break;
    case 1: // ok
-	ChangeSkin( sbSelectedSkin );   // NOTE TO MYSELF: skin already changed!
+	uiChangeSkin( sbSelectedSkin );   // NOTE TO MYSELF: skin already changed!
 	free( skinName );
 	skinName=strdup( sbSelectedSkin );
 	break;
@@ -113,7 +113,7 @@
  if ( strcmp( prev,sbSelectedSkin ) )
   {
    prev=sbSelectedSkin;
-   ChangeSkin( sbSelectedSkin );
+   uiChangeSkin( sbSelectedSkin );
    gtkActive( SkinBrowser );
   }
  if( !bevent ) return;
--- a/gui/mplayer/gui_common.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/gui_common.c	Sat Jun 18 14:33:41 2011 +0000
@@ -46,19 +46,19 @@
     char *p;
     size_t len;
 
-    switch (guiIntfStruct.StreamType) {
+    switch (guiInfo.StreamType) {
     case STREAMTYPE_STREAM:
-        av_strlcpy(tmp, guiIntfStruct.Filename, tmplen);
+        av_strlcpy(tmp, guiInfo.Filename, tmplen);
         break;
 
     case STREAMTYPE_FILE:
-        if (guiIntfStruct.Filename && guiIntfStruct.Filename[0]) {
-            p = strrchr(guiIntfStruct.Filename, '/');
+        if (guiInfo.Filename && guiInfo.Filename[0]) {
+            p = strrchr(guiInfo.Filename, '/');
 
             if (p)
                 av_strlcpy(tmp, p + 1, tmplen);
             else
-                av_strlcpy(tmp, guiIntfStruct.Filename, tmplen);
+                av_strlcpy(tmp, guiInfo.Filename, tmplen);
 
             len = strlen(tmp);
 
@@ -74,8 +74,8 @@
 
 #ifdef CONFIG_DVDREAD
     case STREAMTYPE_DVD:
-        if (guiIntfStruct.DVD.current_chapter)
-            snprintf(tmp, tmplen, MSGTR_Chapter, guiIntfStruct.DVD.current_chapter);
+        if (guiInfo.DVD.current_chapter)
+            snprintf(tmp, tmplen, MSGTR_Chapter, guiInfo.DVD.current_chapter);
         else
             av_strlcat(tmp, MSGTR_NoChapter, tmplen);
         break;
@@ -83,7 +83,7 @@
 
 #ifdef CONFIG_VCD
     case STREAMTYPE_VCD:
-        snprintf(tmp, tmplen, MSGTR_VCDTrack, guiIntfStruct.Track);
+        snprintf(tmp, tmplen, MSGTR_VCDTrack, guiInfo.Track);
         break;
 #endif
 
@@ -128,7 +128,7 @@
         } else {
             switch (str[++i]) {
             case 't':
-                snprintf(tmp, sizeof(tmp), "%02d", guiIntfStruct.Track);
+                snprintf(tmp, sizeof(tmp), "%02d", guiInfo.Track);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
@@ -148,112 +148,112 @@
                 break;
 
             case '6':
-                t = guiIntfStruct.LengthInSec;
+                t = guiInfo.LengthInSec;
                 goto calclengthhhmmss;
 
             case '1':
-                t = guiIntfStruct.TimeSec;
+                t = guiInfo.TimeSec;
 calclengthhhmmss:
                 snprintf(tmp, sizeof(tmp), "%02d:%02d:%02d", t / 3600, t / 60 % 60, t % 60);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case '7':
-                t = guiIntfStruct.LengthInSec;
+                t = guiInfo.LengthInSec;
                 goto calclengthmmmmss;
 
             case '2':
-                t = guiIntfStruct.TimeSec;
+                t = guiInfo.TimeSec;
 calclengthmmmmss:
                 snprintf(tmp, sizeof(tmp), "%04d:%02d", t / 60, t % 60);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case '3':
-                snprintf(tmp, sizeof(tmp), "%02d", guiIntfStruct.TimeSec / 3600);
+                snprintf(tmp, sizeof(tmp), "%02d", guiInfo.TimeSec / 3600);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case '4':
-                snprintf(tmp, sizeof(tmp), "%02d", (guiIntfStruct.TimeSec / 60) % 60);
+                snprintf(tmp, sizeof(tmp), "%02d", (guiInfo.TimeSec / 60) % 60);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case '5':
-                snprintf(tmp, sizeof(tmp), "%02d", guiIntfStruct.TimeSec % 60);
+                snprintf(tmp, sizeof(tmp), "%02d", guiInfo.TimeSec % 60);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case '8':
-                snprintf(tmp, sizeof(tmp), "%01d:%02d:%02d", guiIntfStruct.TimeSec / 3600, (guiIntfStruct.TimeSec / 60) % 60, guiIntfStruct.TimeSec % 60);
+                snprintf(tmp, sizeof(tmp), "%01d:%02d:%02d", guiInfo.TimeSec / 3600, (guiInfo.TimeSec / 60) % 60, guiInfo.TimeSec % 60);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case 'v':
-                snprintf(tmp, sizeof(tmp), "%3.2f%%", guiIntfStruct.Volume);
+                snprintf(tmp, sizeof(tmp), "%3.2f%%", guiInfo.Volume);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case 'V':
-                snprintf(tmp, sizeof(tmp), "%3.1f", guiIntfStruct.Volume);
+                snprintf(tmp, sizeof(tmp), "%3.1f", guiInfo.Volume);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case 'b':
-                snprintf(tmp, sizeof(tmp), "%3.2f%%", guiIntfStruct.Balance);
+                snprintf(tmp, sizeof(tmp), "%3.2f%%", guiInfo.Balance);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case 'B':
-                snprintf(tmp, sizeof(tmp), "%3.1f", guiIntfStruct.Balance);
+                snprintf(tmp, sizeof(tmp), "%3.1f", guiInfo.Balance);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case 'd':
-                snprintf(tmp, sizeof(tmp), "%d", guiIntfStruct.FrameDrop);
+                snprintf(tmp, sizeof(tmp), "%d", guiInfo.FrameDrop);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case 'x':
-                snprintf(tmp, sizeof(tmp), "%d", guiIntfStruct.MovieWidth);
+                snprintf(tmp, sizeof(tmp), "%d", guiInfo.MovieWidth);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case 'y':
-                snprintf(tmp, sizeof(tmp), "%d", guiIntfStruct.MovieHeight);
+                snprintf(tmp, sizeof(tmp), "%d", guiInfo.MovieHeight);
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case 'C':
-                snprintf(tmp, sizeof(tmp), "%s", guiIntfStruct.sh_video ? ((sh_video_t *)guiIntfStruct.sh_video)->codec->name : "");
+                snprintf(tmp, sizeof(tmp), "%s", guiInfo.sh_video ? ((sh_video_t *)guiInfo.sh_video)->codec->name : "");
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 
             case 's':
-                if (guiIntfStruct.Playing == 0)
+                if (guiInfo.Playing == 0)
                     av_strlcat(trbuf, "s", sizeof(trbuf));
                 break;
 
             case 'l':
-                if (guiIntfStruct.Playing == 1)
+                if (guiInfo.Playing == 1)
                     av_strlcat(trbuf, "p", sizeof(trbuf));
                 break;
 
             case 'e':
-                if (guiIntfStruct.Playing == 2)
+                if (guiInfo.Playing == 2)
                     av_strlcat(trbuf, "e", sizeof(trbuf));
                 break;
 
             case 'a':
 
-                mixer = mpctx_get_mixer(guiIntfStruct.mpcontext);
+                mixer = mpctx_get_mixer(guiInfo.mpcontext);
 
                 if (mixer->muted) {
                     av_strlcat(trbuf, "n", sizeof(trbuf));
                     break;
                 }
 
-                switch (guiIntfStruct.AudioType) {
+                switch (guiInfo.AudioType) {
                 case 0:
                     av_strlcat(trbuf, "n", sizeof(trbuf));
                     break;
@@ -270,7 +270,7 @@
                 break;
 
             case 'T':
-                switch (guiIntfStruct.StreamType) {
+                switch (guiInfo.StreamType) {
                 case STREAMTYPE_FILE:
                     av_strlcat(trbuf, "f", sizeof(trbuf));
                     break;
@@ -312,7 +312,7 @@
     return trbuf;
 }
 
-static void PutImage(txSample *bf, int x, int y, int max, int ofs)
+static void PutImage(guiImage *bf, int x, int y, int max, int ofs)
 {
     int i = 0, ix, iy;
     uint32_t *buf = NULL;
@@ -352,7 +352,7 @@
 #endif
 }
 
-static void SimplePotmeterPutImage(txSample *bf, int x, int y, float frac)
+static void SimplePotmeterPutImage(guiImage *bf, int x, int y, float frac)
 {
     int i = 0, w, r, ix, iy;
     uint32_t *buf = NULL;
@@ -382,7 +382,7 @@
 void RenderAll(wsTWindow *window, wItem *Items, int nrItems, char *db)
 {
     wItem *item;
-    txSample *image = NULL;
+    guiImage *image = NULL;
     int i, ofs;
 
     image_buffer = db;
--- a/gui/mplayer/menu.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/menu.c	Sat Jun 18 14:33:41 2011 +0000
@@ -28,127 +28,127 @@
 
 #include "widgets.h"
 
-unsigned char * mplMenuDrawBuffer = NULL;
-int             mplMenuRender = 1;
-int             mplMenuItem = -1;
-int             mplOldMenuItem = -1;
-int             mplMenuX,mplMenuY;
-static int      mplMenuIsInitialized = 0;
+unsigned char * menuDrawBuffer = NULL;
+int             menuRender = 1;
+int             menuItem = -1;
+int             oldMenuItem = -1;
+int             menuX,menuY;
+static int      menuIsInitialized = 0;
 
-static void mplMenuDraw( void )
+static void uiMenuDraw( void )
 {
  uint32_t * buf = NULL;
  uint32_t * drw = NULL;
  int             x,y,tmp;
 
- if ( !appMPlayer.menuIsPresent || !appMPlayer.menu.Bitmap.Image ) return;
- if ( !mplMenuRender && !appMPlayer.menuWindow.Visible ) return;
+ if ( !guiApp.menuIsPresent || !guiApp.menu.Bitmap.Image ) return;
+ if ( !menuRender && !guiApp.menuWindow.Visible ) return;
 
- if ( mplMenuRender || mplMenuItem != mplOldMenuItem )
+ if ( menuRender || menuItem != oldMenuItem )
   {
-   memcpy( mplMenuDrawBuffer,appMPlayer.menu.Bitmap.Image,appMPlayer.menu.Bitmap.ImageSize );
+   memcpy( menuDrawBuffer,guiApp.menu.Bitmap.Image,guiApp.menu.Bitmap.ImageSize );
 // ---
-   if ( mplMenuItem != -1 )
+   if ( menuItem != -1 )
     {
-     buf=(uint32_t *)mplMenuDrawBuffer;
-     drw=(uint32_t *)appMPlayer.menuSelected.Bitmap.Image;
-     for ( y=appMPlayer.menuItems[ mplMenuItem ].y; y < appMPlayer.menuItems[ mplMenuItem ].y + appMPlayer.menuItems[ mplMenuItem ].height; y++ )
-       for ( x=appMPlayer.menuItems[ mplMenuItem ].x; x < appMPlayer.menuItems[ mplMenuItem ].x + appMPlayer.menuItems[ mplMenuItem ].width; x++ )
+     buf=(uint32_t *)menuDrawBuffer;
+     drw=(uint32_t *)guiApp.menuSelected.Bitmap.Image;
+     for ( y=guiApp.menuItems[ menuItem ].y; y < guiApp.menuItems[ menuItem ].y + guiApp.menuItems[ menuItem ].height; y++ )
+       for ( x=guiApp.menuItems[ menuItem ].x; x < guiApp.menuItems[ menuItem ].x + guiApp.menuItems[ menuItem ].width; x++ )
          {
-          tmp=drw[ y * appMPlayer.menuSelected.width + x ];
-          if ( !IS_TRANSPARENT ( tmp ) ) buf[ y * appMPlayer.menu.width + x ]=tmp;
+          tmp=drw[ y * guiApp.menuSelected.width + x ];
+          if ( !IS_TRANSPARENT ( tmp ) ) buf[ y * guiApp.menu.width + x ]=tmp;
          }
     }
-   mplOldMenuItem=mplMenuItem;
+   oldMenuItem=menuItem;
 // ---
-   wsConvert( &appMPlayer.menuWindow,mplMenuDrawBuffer );
-   mplMenuRender=0;
+   wsConvert( &guiApp.menuWindow,menuDrawBuffer );
+   menuRender=0;
   }
- wsPutImage( &appMPlayer.menuWindow );
+ wsPutImage( &guiApp.menuWindow );
 }
 
-void mplMenuMouseHandle( int X,int Y,int RX,int RY )
+void uiMenuMouseHandle( int X,int Y,int RX,int RY )
 {
  int x,y,i;
 
- if ( !appMPlayer.menu.Bitmap.Image ) return;
+ if ( !guiApp.menu.Bitmap.Image ) return;
 
- mplMenuItem=-1;
- x=RX - appMPlayer.menuWindow.X;
- y=RY - appMPlayer.menuWindow.Y;
- if ( ( x < 0 ) || ( y < 0  ) || ( x > appMPlayer.menu.width ) || ( y > appMPlayer.menu.height ) )
+ menuItem=-1;
+ x=RX - guiApp.menuWindow.X;
+ y=RY - guiApp.menuWindow.Y;
+ if ( ( x < 0 ) || ( y < 0  ) || ( x > guiApp.menu.width ) || ( y > guiApp.menu.height ) )
   {
-   wsPostRedisplay( &appMPlayer.menuWindow );
+   wsPostRedisplay( &guiApp.menuWindow );
    return;
   }
 
- for( i=0;i<=appMPlayer.IndexOfMenuItems;i++ )
+ for( i=0;i<=guiApp.IndexOfMenuItems;i++ )
   {
    if ( wgIsRect( x,y,
-         appMPlayer.menuItems[i].x,appMPlayer.menuItems[i].y,
-         appMPlayer.menuItems[i].x+appMPlayer.menuItems[i].width,appMPlayer.menuItems[i].y+appMPlayer.menuItems[i].height ) ) { mplMenuItem=i; break; }
+         guiApp.menuItems[i].x,guiApp.menuItems[i].y,
+         guiApp.menuItems[i].x+guiApp.menuItems[i].width,guiApp.menuItems[i].y+guiApp.menuItems[i].height ) ) { menuItem=i; break; }
   }
- wsPostRedisplay( &appMPlayer.menuWindow );
+ wsPostRedisplay( &guiApp.menuWindow );
 }
 
-void mplShowMenu( int mx,int my )
+void uiShowMenu( int mx,int my )
 {
  int x,y;
 
- if ( !appMPlayer.menuIsPresent || !appMPlayer.menu.Bitmap.Image ) return;
+ if ( !guiApp.menuIsPresent || !guiApp.menu.Bitmap.Image ) return;
 
  x=mx;
- if ( x + appMPlayer.menuWindow.Width > wsMaxX ) x=wsMaxX - appMPlayer.menuWindow.Width - 1 + wsOrgX;
+ if ( x + guiApp.menuWindow.Width > wsMaxX ) x=wsMaxX - guiApp.menuWindow.Width - 1 + wsOrgX;
  y=my;
- if ( y + appMPlayer.menuWindow.Height > wsMaxY ) y=wsMaxY - appMPlayer.menuWindow.Height - 1 + wsOrgY;
+ if ( y + guiApp.menuWindow.Height > wsMaxY ) y=wsMaxY - guiApp.menuWindow.Height - 1 + wsOrgY;
 
- mplMenuX=x; mplMenuY=y;
+ menuX=x; menuY=y;
 
- mplMenuItem = 0;
+ menuItem = 0;
 
- wsMoveWindow( &appMPlayer.menuWindow,False,x,y );
- wsMoveTopWindow( wsDisplay,appMPlayer.menuWindow.WindowID );
- wsSetLayer( wsDisplay,appMPlayer.menuWindow.WindowID,1 );
- mplMenuRender=1;
- wsVisibleWindow( &appMPlayer.menuWindow,wsShowWindow );
- wsPostRedisplay( &appMPlayer.menuWindow );
+ wsMoveWindow( &guiApp.menuWindow,False,x,y );
+ wsMoveTopWindow( wsDisplay,guiApp.menuWindow.WindowID );
+ wsSetLayer( wsDisplay,guiApp.menuWindow.WindowID,1 );
+ menuRender=1;
+ wsVisibleWindow( &guiApp.menuWindow,wsShowWindow );
+ wsPostRedisplay( &guiApp.menuWindow );
 }
 
-void mplHideMenu( int mx,int my,int w )
+void uiHideMenu( int mx,int my,int w )
 {
- int x,y,i=mplMenuItem;
+ int x,y,i=menuItem;
 
- if ( !appMPlayer.menuIsPresent || !appMPlayer.menu.Bitmap.Image ) return;
+ if ( !guiApp.menuIsPresent || !guiApp.menu.Bitmap.Image ) return;
 
- x=mx-mplMenuX;
- y=my-mplMenuY;
-// x=RX - appMPlayer.menuWindow.X;
-// y=RY - appMPlayer.menuWindow.Y;
+ x=mx-menuX;
+ y=my-menuY;
+// x=RX - guiApp.menuWindow.X;
+// y=RY - guiApp.menuWindow.Y;
 
- wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow );
+ wsVisibleWindow( &guiApp.menuWindow,wsHideWindow );
 
  if ( ( x < 0 ) || ( y < 0 ) ) return;
 
 // printf( "---------> %d %d,%d\n",i,x,y );
-// printf( "--------> mi: %d,%d %dx%d\n",appMPlayer.menuItems[i].x,appMPlayer.menuItems[i].y,appMPlayer.menuItems[i].width,appMPlayer.menuItems[i].height );
+// printf( "--------> mi: %d,%d %dx%d\n",guiApp.menuItems[i].x,guiApp.menuItems[i].y,guiApp.menuItems[i].width,guiApp.menuItems[i].height );
  if ( wgIsRect( x,y,
-        appMPlayer.menuItems[i].x,appMPlayer.menuItems[i].y,
-        appMPlayer.menuItems[i].x+appMPlayer.menuItems[i].width,
-        appMPlayer.menuItems[i].y+appMPlayer.menuItems[i].height ) )
+        guiApp.menuItems[i].x,guiApp.menuItems[i].y,
+        guiApp.menuItems[i].x+guiApp.menuItems[i].width,
+        guiApp.menuItems[i].y+guiApp.menuItems[i].height ) )
    {
-    mplEventHandling( appMPlayer.menuItems[i].message,(float)w );
+    uiEventHandling( guiApp.menuItems[i].message,(float)w );
    }
 }
 
-void mplMenuInit( void )
+void uiMenuInit( void )
 {
 
- if ( mplMenuIsInitialized || !appMPlayer.menuIsPresent || !appMPlayer.menu.Bitmap.Image ) return;
+ if ( menuIsInitialized || !guiApp.menuIsPresent || !guiApp.menu.Bitmap.Image ) return;
 
- appMPlayer.menu.x=0;
- appMPlayer.menu.y=0;
+ guiApp.menu.x=0;
+ guiApp.menu.y=0;
 
- if ( ( mplMenuDrawBuffer = calloc( 1,appMPlayer.menu.Bitmap.ImageSize ) ) == NULL )
+ if ( ( menuDrawBuffer = calloc( 1,guiApp.menu.Bitmap.ImageSize ) ) == NULL )
   {
 #ifdef DEBUG
     mp_msg( MSGT_GPLAYER,MSGL_DBG2,MSGTR_NEMFMR );
@@ -157,19 +157,19 @@
    return;
   }
 
- wsCreateWindow( &appMPlayer.menuWindow,
- appMPlayer.menu.x,appMPlayer.menu.y,appMPlayer.menu.width,appMPlayer.menu.height,
+ wsCreateWindow( &guiApp.menuWindow,
+ guiApp.menu.x,guiApp.menu.y,guiApp.menu.width,guiApp.menu.height,
  wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsOverredirect|wsHideFrame|wsMaxSize|wsMinSize|wsHideWindow,"MPlayer menu" );
 
- wsSetShape( &appMPlayer.menuWindow,appMPlayer.menu.Mask.Image );
+ wsSetShape( &guiApp.menuWindow,guiApp.menu.Mask.Image );
 
 #ifdef DEBUG
-  mp_msg( MSGT_GPLAYER,MSGL_DBG2,"menu: 0x%x\n",(int)appMPlayer.menuWindow.WindowID );
+  mp_msg( MSGT_GPLAYER,MSGL_DBG2,"menu: 0x%x\n",(int)guiApp.menuWindow.WindowID );
 #endif
 
- mplMenuIsInitialized=1;
- appMPlayer.menuWindow.ReDraw=mplMenuDraw;
-// appMPlayer.menuWindow.MouseHandler=mplMenuMouseHandle;
-// appMPlayer.menuWindow.KeyHandler=mplMainKeyHandle;
- mplMenuRender=1; wsPostRedisplay( &appMPlayer.menuWindow );
+ menuIsInitialized=1;
+ guiApp.menuWindow.ReDraw=uiMenuDraw;
+// guiApp.menuWindow.MouseHandler=uiMenuMouseHandle;
+// guiApp.menuWindow.KeyHandler=uiMainKeyHandle;
+ menuRender=1; wsPostRedisplay( &guiApp.menuWindow );
 }
--- a/gui/mplayer/mw.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/mw.c	Sat Jun 18 14:33:41 2011 +0000
@@ -58,11 +58,11 @@
 
 unsigned int GetTimerMS( void );
 
-unsigned char * mplDrawBuffer = NULL;
-int             mplMainRender = 1;
+unsigned char * mainDrawBuffer = NULL;
+int             uiMainRender = 1;
 
-int             mplMainAutoPlay = 0;
-int             mplMiddleMenu = 0;
+int             uiMainAutoPlay = 0;
+int             uiMiddleMenu = 0;
 
 int             mainVisible = 1;
 
@@ -72,34 +72,34 @@
 
 #include "gui_common.h"
 
-void mplMainDraw( void )
+void uiMainDraw( void )
 {
 
- if ( appMPlayer.mainWindow.State == wsWindowClosed ) guiExit( EXIT_QUIT );
+ if ( guiApp.mainWindow.State == wsWindowClosed ) guiExit( EXIT_QUIT );
 
- if ( appMPlayer.mainWindow.Visible == wsWindowNotVisible ||
+ if ( guiApp.mainWindow.Visible == wsWindowNotVisible ||
       !mainVisible ) return;
-//      !appMPlayer.mainWindow.Mapped ) return;
+//      !guiApp.mainWindow.Mapped ) return;
 
- if ( mplMainRender && appMPlayer.mainWindow.State == wsWindowExpose )
+ if ( uiMainRender && guiApp.mainWindow.State == wsWindowExpose )
   {
-   btnModify( evSetMoviePosition,guiIntfStruct.Position );
-   btnModify( evSetVolume,guiIntfStruct.Volume );
+   btnModify( evSetMoviePosition,guiInfo.Position );
+   btnModify( evSetVolume,guiInfo.Volume );
 
-   fast_memcpy( mplDrawBuffer,appMPlayer.main.Bitmap.Image,appMPlayer.main.Bitmap.ImageSize );
-   RenderAll( &appMPlayer.mainWindow,appMPlayer.mainItems,appMPlayer.IndexOfMainItems,mplDrawBuffer );
-   mplMainRender=0;
+   fast_memcpy( mainDrawBuffer,guiApp.main.Bitmap.Image,guiApp.main.Bitmap.ImageSize );
+   RenderAll( &guiApp.mainWindow,guiApp.mainItems,guiApp.IndexOfMainItems,mainDrawBuffer );
+   uiMainRender=0;
   }
- wsPutImage( &appMPlayer.mainWindow );
+ wsPutImage( &guiApp.mainWindow );
 // XFlush( wsDisplay );
 }
 
 static unsigned last_redraw_time = 0;
 
-void mplEventHandling( int msg,float param )
+void uiEventHandling( int msg,float param )
 {
  int iparam = (int)param;
- mixer_t *mixer = mpctx_get_mixer(guiIntfStruct.mpcontext);
+ mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext);
 
  switch( msg )
   {
@@ -109,60 +109,60 @@
         break;
 
    case evPlayNetwork:
-        gfree( (void **)&guiIntfStruct.Subtitlename );
-	gfree( (void **)&guiIntfStruct.AudioFile );
-	guiIntfStruct.StreamType=STREAMTYPE_STREAM;
+        gfree( (void **)&guiInfo.Subtitlename );
+	gfree( (void **)&guiInfo.AudioFile );
+	guiInfo.StreamType=STREAMTYPE_STREAM;
         goto play;
    case evSetURL:
         gtkShow( evPlayNetwork,NULL );
 	break;
 
    case evSetAudio:
-        if ( !guiIntfStruct.demuxer || audio_id == iparam ) break;
+        if ( !guiInfo.demuxer || audio_id == iparam ) break;
 	audio_id=iparam;
 	goto play;
 
    case evSetVideo:
-        if ( !guiIntfStruct.demuxer || video_id == iparam ) break;
+        if ( !guiInfo.demuxer || video_id == iparam ) break;
 	video_id=iparam;
 	goto play;
 
    case evSetSubtitle:
-        mp_property_do("sub",M_PROPERTY_SET,&iparam,guiIntfStruct.mpcontext);
+        mp_property_do("sub",M_PROPERTY_SET,&iparam,guiInfo.mpcontext);
 	break;
 
 #ifdef CONFIG_VCD
    case evSetVCDTrack:
-        guiIntfStruct.Track=iparam;
+        guiInfo.Track=iparam;
    case evPlayVCD:
  	gtkSet( gtkClearStruct,0,(void *)guiALL );
-	guiIntfStruct.StreamType=STREAMTYPE_VCD;
+	guiInfo.StreamType=STREAMTYPE_VCD;
 	goto play;
 #endif
 #ifdef CONFIG_DVDREAD
    case evPlayDVD:
-        guiIntfStruct.DVD.current_title=1;
-        guiIntfStruct.DVD.current_chapter=1;
-        guiIntfStruct.DVD.current_angle=1;
+        guiInfo.DVD.current_title=1;
+        guiInfo.DVD.current_chapter=1;
+        guiInfo.DVD.current_angle=1;
 play_dvd_2:
  	gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD) );
-        guiIntfStruct.StreamType=STREAMTYPE_DVD;
+        guiInfo.StreamType=STREAMTYPE_DVD;
 	goto play;
 #endif
    case evPlay:
    case evPlaySwitchToPause:
 play:
 
-        if ( ( msg == evPlaySwitchToPause )&&( guiIntfStruct.Playing == 2 ) ) goto NoPause;
+        if ( ( msg == evPlaySwitchToPause )&&( guiInfo.Playing == 2 ) ) goto NoPause;
 
-	if ( gtkSet( gtkGetCurrPlItem,0,NULL ) &&( guiIntfStruct.StreamType == STREAMTYPE_FILE ) )
+	if ( gtkSet( gtkGetCurrPlItem,0,NULL ) &&( guiInfo.StreamType == STREAMTYPE_FILE ) )
 	 {
 	  plItem * next = gtkSet( gtkGetCurrPlItem,0,NULL );
 	  plLastPlayed=next;
-	  mplSetFileName( next->path,next->name,STREAMTYPE_FILE );
+	  uiSetFileName( next->path,next->name,STREAMTYPE_FILE );
 	 }
 
-        switch ( guiIntfStruct.StreamType )
+        switch ( guiInfo.StreamType )
          {
 	  case STREAMTYPE_STREAM:
 	  case STREAMTYPE_FILE:
@@ -172,12 +172,12 @@
           case STREAMTYPE_VCD:
 	       gtkSet( gtkClearStruct,0,(void *)(guiALL - guiVCD - guiFilenames) );
 	       if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE );
-	       mplSetFileName( NULL,cdrom_device,STREAMTYPE_VCD );
-	       if ( guiIntfStruct.Playing != 2 )
+	       uiSetFileName( NULL,cdrom_device,STREAMTYPE_VCD );
+	       if ( guiInfo.Playing != 2 )
 	        {
-		 if ( !guiIntfStruct.Track )
-                   guiIntfStruct.Track=1;
-                 guiIntfStruct.DiskChanged=1;
+		 if ( !guiInfo.Track )
+                   guiInfo.Track=1;
+                 guiInfo.DiskChanged=1;
 		}
 	       break;
 #endif
@@ -185,19 +185,19 @@
           case STREAMTYPE_DVD:
 	       gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD - guiFilenames) );
 	       if ( !dvd_device ) dvd_device=gstrdup( DEFAULT_DVD_DEVICE );
-	       mplSetFileName( NULL,dvd_device,STREAMTYPE_DVD );
-	       if ( guiIntfStruct.Playing != 2 )
+	       uiSetFileName( NULL,dvd_device,STREAMTYPE_DVD );
+	       if ( guiInfo.Playing != 2 )
 	        {
-		 guiIntfStruct.Title=guiIntfStruct.DVD.current_title;
-		 guiIntfStruct.Chapter=guiIntfStruct.DVD.current_chapter;
-		 guiIntfStruct.Angle=guiIntfStruct.DVD.current_angle;
-                 guiIntfStruct.DiskChanged=1;
+		 guiInfo.Title=guiInfo.DVD.current_title;
+		 guiInfo.Chapter=guiInfo.DVD.current_chapter;
+		 guiInfo.Angle=guiInfo.DVD.current_angle;
+                 guiInfo.DiskChanged=1;
 		}
                break;
 #endif
          }
-	guiIntfStruct.NewPlay=1;
-        mplPlay();
+	guiInfo.NewPlay=1;
+        uiPlay();
         break;
 #ifdef CONFIG_DVDREAD
    case evSetDVDSubtitle:
@@ -209,13 +209,13 @@
         goto play_dvd_2;
         break;
    case evSetDVDChapter:
-        guiIntfStruct.DVD.current_chapter=iparam;
+        guiInfo.DVD.current_chapter=iparam;
         goto play_dvd_2;
         break;
    case evSetDVDTitle:
-        guiIntfStruct.DVD.current_title=iparam;
-	guiIntfStruct.DVD.current_chapter=1;
-	guiIntfStruct.DVD.current_angle=1;
+        guiInfo.DVD.current_title=iparam;
+	guiInfo.DVD.current_chapter=1;
+	guiInfo.DVD.current_angle=1;
         goto play_dvd_2;
         break;
 #endif
@@ -223,30 +223,30 @@
    case evPause:
    case evPauseSwitchToPlay:
 NoPause:
-        mplPause();
+        uiPause();
         break;
 
    case evStop:
-	guiIntfStruct.Playing=guiSetStop;
-	mplState();
-	guiIntfStruct.NoWindow=False;
+	guiInfo.Playing=guiSetStop;
+	uiState();
+	guiInfo.NoWindow=False;
 	break;
 
    case evLoadPlay:
-        mplMainAutoPlay=1;
-//	guiIntfStruct.StreamType=STREAMTYPE_FILE;
+        uiMainAutoPlay=1;
+//	guiInfo.StreamType=STREAMTYPE_FILE;
    case evLoad:
 	gtkSet( gtkDelPl,0,NULL );
         gtkShow( evLoad,NULL );
         break;
    case evLoadSubtitle:  gtkShow( evLoadSubtitle,NULL );  break;
    case evDropSubtitle:
-	gfree( (void **)&guiIntfStruct.Subtitlename );
+	gfree( (void **)&guiInfo.Subtitlename );
 	guiLoadSubtitle( NULL );
 	break;
    case evLoadAudioFile: gtkShow( evLoadAudioFile,NULL ); break;
-   case evPrev: mplPrev(); break;
-   case evNext: mplNext(); break;
+   case evPrev: uiPrev(); break;
+   case evNext: uiNext(); break;
 
    case evPlayList:    gtkShow( evPlayList,NULL );        break;
    case evSkinBrowser: gtkShow( evSkinBrowser,skinName ); break;
@@ -254,37 +254,37 @@
    case evPreferences: gtkShow( evPreferences,NULL );     break;
    case evEqualizer:   gtkShow( evEqualizer,NULL );       break;
 
-   case evForward10min:	    mplRelSeek( 600 ); break;
-   case evBackward10min:    mplRelSeek( -600 );break;
-   case evForward1min:      mplRelSeek( 60 );  break;
-   case evBackward1min:     mplRelSeek( -60 ); break;
-   case evForward10sec:     mplRelSeek( 10 );  break;
-   case evBackward10sec:    mplRelSeek( -10 ); break;
-   case evSetMoviePosition: mplAbsSeek( param ); break;
+   case evForward10min:	    uiRelSeek( 600 ); break;
+   case evBackward10min:    uiRelSeek( -600 );break;
+   case evForward1min:      uiRelSeek( 60 );  break;
+   case evBackward1min:     uiRelSeek( -60 ); break;
+   case evForward10sec:     uiRelSeek( 10 );  break;
+   case evBackward10sec:    uiRelSeek( -10 ); break;
+   case evSetMoviePosition: uiAbsSeek( param ); break;
 
    case evIncVolume:  vo_x11_putkey( wsGrayMul ); break;
    case evDecVolume:  vo_x11_putkey( wsGrayDiv ); break;
    case evMute:       mixer_mute( mixer ); break;
 
    case evSetVolume:
-        guiIntfStruct.Volume=param;
+        guiInfo.Volume=param;
 	goto set_volume;
    case evSetBalance:
-        guiIntfStruct.Balance=param;
+        guiInfo.Balance=param;
 set_volume:
         {
-	 float l = guiIntfStruct.Volume * ( ( 100.0 - guiIntfStruct.Balance ) / 50.0 );
-	 float r = guiIntfStruct.Volume * ( ( guiIntfStruct.Balance ) / 50.0 );
-	 if ( l > guiIntfStruct.Volume ) l=guiIntfStruct.Volume;
-	 if ( r > guiIntfStruct.Volume ) r=guiIntfStruct.Volume;
-//	 printf( "!!! v: %.2f b: %.2f -> %.2f x %.2f\n",guiIntfStruct.Volume,guiIntfStruct.Balance,l,r );
+	 float l = guiInfo.Volume * ( ( 100.0 - guiInfo.Balance ) / 50.0 );
+	 float r = guiInfo.Volume * ( ( guiInfo.Balance ) / 50.0 );
+	 if ( l > guiInfo.Volume ) l=guiInfo.Volume;
+	 if ( r > guiInfo.Volume ) r=guiInfo.Volume;
+//	 printf( "!!! v: %.2f b: %.2f -> %.2f x %.2f\n",guiInfo.Volume,guiInfo.Balance,l,r );
          mixer_setvolume( mixer,l,r );
 	}
 	if ( osd_level )
 	 {
 	  osd_visible=(GetTimerMS() + 1000) | 1;
 	  vo_osd_progbar_type=OSD_VOLUME;
-	  vo_osd_progbar_value=( ( guiIntfStruct.Volume ) * 256.0 ) / 100.0;
+	  vo_osd_progbar_value=( ( guiInfo.Volume ) * 256.0 ) / 100.0;
 	  vo_osd_changed( OSDTYPE_PROGBAR );
 	 }
         break;
@@ -293,56 +293,56 @@
    case evIconify:
         switch ( iparam )
          {
-          case 0: wsIconify( appMPlayer.mainWindow ); break;
-          case 1: wsIconify( appMPlayer.subWindow ); break;
+          case 0: wsIconify( guiApp.mainWindow ); break;
+          case 1: wsIconify( guiApp.subWindow ); break;
          }
         break;
    case evHalfSize:
         btnSet( evFullScreen,btnReleased );
-        if ( guiIntfStruct.Playing )
+        if ( guiInfo.Playing )
          {
-          if ( appMPlayer.subWindow.isFullScreen )
+          if ( guiApp.subWindow.isFullScreen )
            {
-            mplFullScreen();
+            uiFullScreen();
            }
-          wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth / 2, guiIntfStruct.MovieHeight / 2 );
-          wsMoveWindow( &appMPlayer.subWindow, 0,
-                        ( wsMaxX - guiIntfStruct.MovieWidth/2  )/2 + wsOrgX,
-                        ( wsMaxY - guiIntfStruct.MovieHeight/2 )/2 + wsOrgY  );
+          wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth / 2, guiInfo.MovieHeight / 2 );
+          wsMoveWindow( &guiApp.subWindow, 0,
+                        ( wsMaxX - guiInfo.MovieWidth/2  )/2 + wsOrgX,
+                        ( wsMaxY - guiInfo.MovieHeight/2 )/2 + wsOrgY  );
          }
         break;
    case evDoubleSize:
     	btnSet( evFullScreen,btnReleased );
-        if ( guiIntfStruct.Playing )
+        if ( guiInfo.Playing )
          {
-          if ( appMPlayer.subWindow.isFullScreen )
+          if ( guiApp.subWindow.isFullScreen )
            {
-            mplFullScreen();
+            uiFullScreen();
            }
-          wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth * 2, guiIntfStruct.MovieHeight * 2 );
-          wsMoveWindow( &appMPlayer.subWindow, 0,
-                        ( wsMaxX - guiIntfStruct.MovieWidth*2  )/2 + wsOrgX,
-                        ( wsMaxY - guiIntfStruct.MovieHeight*2 )/2 + wsOrgY  );
+          wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth * 2, guiInfo.MovieHeight * 2 );
+          wsMoveWindow( &guiApp.subWindow, 0,
+                        ( wsMaxX - guiInfo.MovieWidth*2  )/2 + wsOrgX,
+                        ( wsMaxY - guiInfo.MovieHeight*2 )/2 + wsOrgY  );
          }
         break;
    case evNormalSize:
 	btnSet( evFullScreen,btnReleased );
-        if ( guiIntfStruct.Playing )
+        if ( guiInfo.Playing )
          {
-          if ( appMPlayer.subWindow.isFullScreen )
+          if ( guiApp.subWindow.isFullScreen )
            {
-            mplFullScreen();
+            uiFullScreen();
            }
-          wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth, guiIntfStruct.MovieHeight );
-          wsMoveWindow( &appMPlayer.subWindow, 0,
-                        ( wsMaxX - guiIntfStruct.MovieWidth  )/2 + wsOrgX,
-                        ( wsMaxY - guiIntfStruct.MovieHeight )/2 + wsOrgY  );
+          wsResizeWindow( &guiApp.subWindow, guiInfo.MovieWidth, guiInfo.MovieHeight );
+          wsMoveWindow( &guiApp.subWindow, 0,
+                        ( wsMaxX - guiInfo.MovieWidth  )/2 + wsOrgX,
+                        ( wsMaxY - guiInfo.MovieHeight )/2 + wsOrgY  );
 	  break;
-         } else if ( !appMPlayer.subWindow.isFullScreen ) break;
+         } else if ( !guiApp.subWindow.isFullScreen ) break;
    case evFullScreen:
-        if ( !guiIntfStruct.Playing && !gtkShowVideoWindow ) break;
-        mplFullScreen();
-	if ( appMPlayer.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed );
+        if ( !guiInfo.Playing && !gtkShowVideoWindow ) break;
+        uiFullScreen();
+	if ( guiApp.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed );
 	 else btnSet( evFullScreen,btnReleased );
         break;
 
@@ -355,12 +355,12 @@
 	  case 1:
 	  default: movie_aspect=-1;
 	 }
-	wsClearWindow( appMPlayer.subWindow );
+	wsClearWindow( guiApp.subWindow );
 #ifdef CONFIG_DVDREAD
-	if ( guiIntfStruct.StreamType == STREAMTYPE_DVD || guiIntfStruct.StreamType == STREAMTYPE_VCD ) goto play_dvd_2;
+	if ( guiInfo.StreamType == STREAMTYPE_DVD || guiInfo.StreamType == STREAMTYPE_VCD ) goto play_dvd_2;
 	 else
 #endif
-	 guiIntfStruct.NewPlay=1;
+	 guiInfo.NewPlay=1;
 	break;
 
 // --- timer events
@@ -369,13 +369,13 @@
           unsigned now = GetTimerMS();
           if ((now > last_redraw_time) &&
               (now < last_redraw_time + GUI_REDRAW_WAIT) &&
-              !mplPBFade)
+              !uiPlaybarFade)
             break;
           last_redraw_time = now;
         }
-        mplMainRender=1;
-        wsPostRedisplay( &appMPlayer.mainWindow );
-	wsPostRedisplay( &appMPlayer.barWindow );
+        uiMainRender=1;
+        wsPostRedisplay( &guiApp.mainWindow );
+	wsPostRedisplay( &guiApp.playbarWindow );
         break;
 // --- system events
 #ifdef MP_DEBUG
@@ -389,7 +389,7 @@
   }
 }
 
-void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY )
+void uiMainMouseHandle( int Button,int X,int Y,int RX,int RY )
 {
  static int     itemtype = 0;
         int     i;
@@ -399,20 +399,20 @@
  static int     SelectedItem = -1;
         int     currentselected = -1;
 
- for ( i=0;i <= appMPlayer.IndexOfMainItems;i++ )
-  if ( ( appMPlayer.mainItems[i].pressed != btnDisabled )&&
-       ( wgIsRect( X,Y,appMPlayer.mainItems[i].x,appMPlayer.mainItems[i].y,appMPlayer.mainItems[i].x+appMPlayer.mainItems[i].width,appMPlayer.mainItems[i].y+appMPlayer.mainItems[i].height ) ) )
+ for ( i=0;i <= guiApp.IndexOfMainItems;i++ )
+  if ( ( guiApp.mainItems[i].pressed != btnDisabled )&&
+       ( wgIsRect( X,Y,guiApp.mainItems[i].x,guiApp.mainItems[i].y,guiApp.mainItems[i].x+guiApp.mainItems[i].width,guiApp.mainItems[i].y+guiApp.mainItems[i].height ) ) )
    { currentselected=i; break; }
 
  switch ( Button )
   {
    case wsPMMouseButton:
 	  gtkShow( evHidePopUpMenu,NULL );
-          mplShowMenu( RX,RY );
+          uiShowMenu( RX,RY );
           itemtype=itPRMButton;
           break;
    case wsRMMouseButton:
-          mplHideMenu( RX,RY,0 );
+          uiHideMenu( RX,RY,0 );
           break;
 
    case wsPLMouseButton:
@@ -421,7 +421,7 @@
           SelectedItem=currentselected;
           if ( SelectedItem == -1 ) break;
           boxMoved=0;
-          item=&appMPlayer.mainItems[SelectedItem];
+          item=&guiApp.mainItems[SelectedItem];
           itemtype=item->type;
           item->pressed=btnPressed;
           switch( item->type )
@@ -438,7 +438,7 @@
           boxMoved=0;
           if ( SelectedItem != -1 )   // NOTE TO MYSELF: only if itButton, itHPotmeter or itVPotmeter
            {
-            item=&appMPlayer.mainItems[SelectedItem];
+            item=&guiApp.mainItems[SelectedItem];
             item->pressed=btnReleased;
            }
           SelectedItem=-1;
@@ -449,16 +449,16 @@
             case itPotmeter:
             case itHPotmeter:
                  btnModify( item->message,(float)( X - item->x ) / item->width * 100.0f );
-		 mplEventHandling( item->message,item->value );
+		 uiEventHandling( item->message,item->value );
                  value=item->value;
                  break;
 	    case itVPotmeter:
                  btnModify( item->message, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f );
-		 mplEventHandling( item->message,item->value );
+		 uiEventHandling( item->message,item->value );
                  value=item->value;
                  break;
            }
-          mplEventHandling( item->message,value );
+          uiEventHandling( item->message,value );
           itemtype=0;
           break;
 
@@ -470,26 +470,26 @@
    case wsP5MouseButton: value=-2.5f; goto rollerhandled;
    case wsP4MouseButton: value= 2.5f;
 rollerhandled:
-          item=&appMPlayer.mainItems[currentselected];
+          item=&guiApp.mainItems[currentselected];
           if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itPotmeter ) )
            {
             item->value+=value;
             btnModify( item->message,item->value );
-            mplEventHandling( item->message,item->value );
+            uiEventHandling( item->message,item->value );
            }
           break;
 
 // --- moving
    case wsMoveMouse:
-          item=&appMPlayer.mainItems[SelectedItem];
+          item=&guiApp.mainItems[SelectedItem];
           switch ( itemtype )
            {
             case itPLMButton:
-                 wsMoveWindow( &appMPlayer.mainWindow,False,RX - abs( sx ),RY - abs( sy ) );
-                 mplMainRender=0;
+                 wsMoveWindow( &guiApp.mainWindow,False,RX - abs( sx ),RY - abs( sy ) );
+                 uiMainRender=0;
                  break;
             case itPRMButton:
-                 mplMenuMouseHandle( X,Y,RX,RY );
+                 uiMenuMouseHandle( X,Y,RX,RY );
                  break;
             case itPotmeter:
                  item->value=(float)( X - item->x ) / item->width * 100.0f;
@@ -502,7 +502,7 @@
 potihandled:
                  if ( item->value > 100.0f ) item->value=100.0f;
                  if ( item->value < 0.0f ) item->value=0.0f;
-                 mplEventHandling( item->message,item->value );
+                 uiEventHandling( item->message,item->value );
                  break;
            }
           break;
@@ -511,7 +511,7 @@
 
 int keyPressed = 0;
 
-void mplMainKeyHandle( int KeyCode,int Type,int Key )
+void uiMainKeyHandle( int KeyCode,int Type,int Key )
 {
  int msg = evNone;
 
@@ -546,20 +546,20 @@
       case wsXF86Next:         msg=evNext; break;
       case wsXF86Media:        msg=evLoad; break;
       case wsEscape:
-    	    if ( appMPlayer.subWindow.isFullScreen )
+    	    if ( guiApp.subWindow.isFullScreen )
 	     {
-	      if ( guiIntfStruct.event_struct ) ((XEvent *)guiIntfStruct.event_struct)->type=None;
-	      mplEventHandling( evNormalSize,0 );
+	      if ( guiInfo.event_struct ) ((XEvent *)guiInfo.event_struct)->type=None;
+	      uiEventHandling( evNormalSize,0 );
 	      return;
 	     }
       default:          vo_x11_putkey( Key ); return;
      }
    }
- if ( msg != evNone ) mplEventHandling( msg,0 );
+ if ( msg != evNone ) uiEventHandling( msg,0 );
 }
 
 /* this will be used to handle Drag&Drop files */
-void mplDandDHandler(int num,char** files)
+void uiDandDHandler(int num,char** files)
 {
   struct stat buf;
   int f = 0;
@@ -625,13 +625,13 @@
   }
 
   if (filename) {
-    mplSetFileName( NULL,filename,STREAMTYPE_FILE );
-    if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evStop,0 );
-    mplEventHandling( evPlay,0 );
+    uiSetFileName( NULL,filename,STREAMTYPE_FILE );
+    if ( guiInfo.Playing == 1 ) uiEventHandling( evStop,0 );
+    uiEventHandling( evPlay,0 );
   }
   if (subtitles) {
-    gfree((void**)&guiIntfStruct.Subtitlename);
-    guiIntfStruct.Subtitlename = subtitles;
-    guiLoadSubtitle(guiIntfStruct.Subtitlename);
+    gfree((void**)&guiInfo.Subtitlename);
+    guiInfo.Subtitlename = subtitles;
+    guiLoadSubtitle(guiInfo.Subtitlename);
   }
 }
--- a/gui/mplayer/pb.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/pb.c	Sat Jun 18 14:33:41 2011 +0000
@@ -51,68 +51,68 @@
 unsigned int GetTimerMS( void );
 unsigned int GetTimer( void );
 
-unsigned char * mplPBDrawBuffer = NULL;
-int		mplPBVisible = 0;
-int  		mplPBLength = 0;
-int		mplPBFade = 0;
+unsigned char * playbarDrawBuffer = NULL;
+int		playbarVisible = 0;
+int  		playbarLength = 0;
+int		uiPlaybarFade = 0;
 
-static void mplPBDraw( void )
+static void uiPlaybarDraw( void )
 {
  int x;
 
- if ( !appMPlayer.subWindow.isFullScreen ) return;
- if ( !mplPBVisible || !appMPlayer.barIsPresent ) return;
+ if ( !guiApp.subWindow.isFullScreen ) return;
+ if ( !playbarVisible || !guiApp.playbarIsPresent ) return;
 
-// appMPlayer.bar.x=( appMPlayer.subWindow.Width - appMPlayer.bar.width ) / 2;
- switch( appMPlayer.bar.x )
+// guiApp.playbar.x=( guiApp.subWindow.Width - guiApp.playbar.width ) / 2;
+ switch( guiApp.playbar.x )
   {
-   case -1: x=( appMPlayer.subWindow.Width - appMPlayer.bar.width ) / 2; break;
-   case -2: x=( appMPlayer.subWindow.Width - appMPlayer.bar.width ); break;
-   default: x=appMPlayer.bar.x;
+   case -1: x=( guiApp.subWindow.Width - guiApp.playbar.width ) / 2; break;
+   case -2: x=( guiApp.subWindow.Width - guiApp.playbar.width ); break;
+   default: x=guiApp.playbar.x;
   }
 
- switch ( mplPBFade )
+ switch ( uiPlaybarFade )
   {
    case 1: // fade in
-        mplPBLength--;
-        if ( appMPlayer.subWindow.Height - appMPlayer.bar.height >= mplPBLength )
+        playbarLength--;
+        if ( guiApp.subWindow.Height - guiApp.playbar.height >= playbarLength )
 	 {
-	  mplPBLength=appMPlayer.subWindow.Height - appMPlayer.bar.height;
-	  mplPBFade=0;
+	  playbarLength=guiApp.subWindow.Height - guiApp.playbar.height;
+	  uiPlaybarFade=0;
 	  vo_mouse_autohide=0;
 	 }
-        wsMoveWindow( &appMPlayer.barWindow,0,x,mplPBLength );
+        wsMoveWindow( &guiApp.playbarWindow,0,x,playbarLength );
 	break;
    case 2: // fade out
-	mplPBLength+=10;
-	if ( mplPBLength > appMPlayer.subWindow.Height )
+	playbarLength+=10;
+	if ( playbarLength > guiApp.subWindow.Height )
 	 {
-	  mplPBLength=appMPlayer.subWindow.Height;
-	  mplPBFade=mplPBVisible=0;
+	  playbarLength=guiApp.subWindow.Height;
+	  uiPlaybarFade=playbarVisible=0;
           vo_mouse_autohide=1;
-          wsVisibleWindow( &appMPlayer.barWindow,wsHideWindow );
+          wsVisibleWindow( &guiApp.playbarWindow,wsHideWindow );
 	  return;
 	 }
-        wsMoveWindow( &appMPlayer.barWindow,0,x,mplPBLength );
+        wsMoveWindow( &guiApp.playbarWindow,0,x,playbarLength );
 	break;
   }
 
 // --- render
- if ( appMPlayer.barWindow.State == wsWindowExpose )
+ if ( guiApp.playbarWindow.State == wsWindowExpose )
   {
-   btnModify( evSetMoviePosition,guiIntfStruct.Position );
-   btnModify( evSetVolume,guiIntfStruct.Volume );
+   btnModify( evSetMoviePosition,guiInfo.Position );
+   btnModify( evSetVolume,guiInfo.Volume );
 
    vo_mouse_autohide=0;
 
-   fast_memcpy( mplPBDrawBuffer,appMPlayer.bar.Bitmap.Image,appMPlayer.bar.Bitmap.ImageSize );
-   RenderAll( &appMPlayer.barWindow,appMPlayer.barItems,appMPlayer.IndexOfBarItems,mplPBDrawBuffer );
-   wsConvert( &appMPlayer.barWindow,mplPBDrawBuffer );
+   fast_memcpy( playbarDrawBuffer,guiApp.playbar.Bitmap.Image,guiApp.playbar.Bitmap.ImageSize );
+   RenderAll( &guiApp.playbarWindow,guiApp.playbarItems,guiApp.IndexOfPlaybarItems,playbarDrawBuffer );
+   wsConvert( &guiApp.playbarWindow,playbarDrawBuffer );
   }
- wsPutImage( &appMPlayer.barWindow );
+ wsPutImage( &guiApp.playbarWindow );
 }
 
-static void mplPBMouseHandle( int Button, int X, int Y, int RX, int RY )
+static void uiPlaybarMouseHandle( int Button, int X, int Y, int RX, int RY )
 {
  static int     itemtype = 0;
         int     i;
@@ -122,19 +122,19 @@
  static int     SelectedItem = -1;
 	int     currentselected = -1;
 
- for ( i=0;i <= appMPlayer.IndexOfBarItems;i++ )
-   if ( ( appMPlayer.barItems[i].pressed != btnDisabled )&&
-      ( wgIsRect( X,Y,appMPlayer.barItems[i].x,appMPlayer.barItems[i].y,appMPlayer.barItems[i].x+appMPlayer.barItems[i].width,appMPlayer.barItems[i].y+appMPlayer.barItems[i].height ) ) )
+ for ( i=0;i <= guiApp.IndexOfPlaybarItems;i++ )
+   if ( ( guiApp.playbarItems[i].pressed != btnDisabled )&&
+      ( wgIsRect( X,Y,guiApp.playbarItems[i].x,guiApp.playbarItems[i].y,guiApp.playbarItems[i].x+guiApp.playbarItems[i].width,guiApp.playbarItems[i].y+guiApp.playbarItems[i].height ) ) )
     { currentselected=i; break; }
 
  switch ( Button )
   {
    case wsPMMouseButton:
         gtkShow( evHidePopUpMenu,NULL );
-        mplShowMenu( RX,RY );
+        uiShowMenu( RX,RY );
         break;
    case wsRMMouseButton:
-        mplHideMenu( RX,RY,0 );
+        uiHideMenu( RX,RY,0 );
         break;
    case wsRRMouseButton:
         gtkShow( evShowPopUpMenu,NULL );
@@ -144,7 +144,7 @@
 	gtkShow( evHidePopUpMenu,NULL );
         SelectedItem=currentselected;
         if ( SelectedItem == -1 ) break; // yeees, i'm move the fucking window
-        item=&appMPlayer.barItems[SelectedItem];
+        item=&guiApp.playbarItems[SelectedItem];
 	itemtype=item->type;
 	item->pressed=btnPressed;
 
@@ -162,7 +162,7 @@
    case wsRLMouseButton:
         if ( SelectedItem != -1 )   // NOTE TO MYSELF: only if itButton, itHPotmeter or itVPotmeter
          {
-          item=&appMPlayer.barItems[SelectedItem];
+          item=&guiApp.playbarItems[SelectedItem];
           item->pressed=btnReleased;
          }
 	SelectedItem=-1;
@@ -174,16 +174,16 @@
 	  case itPotmeter:
 	  case itHPotmeter:
 	       btnModify( item->message,(float)( X - item->x ) / item->width * 100.0f );
-	       mplEventHandling( item->message,item->value );
+	       uiEventHandling( item->message,item->value );
 	       value=item->value;
 	       break;
 	  case itVPotmeter:
 	       btnModify( item->message, ( 1. - (float)( Y - item->y ) / item->height) * 100.0f );
-	       mplEventHandling( item->message,item->value );
+	       uiEventHandling( item->message,item->value );
 	       value=item->value;
 	       break;
 	 }
-	mplEventHandling( item->message,value );
+	uiEventHandling( item->message,value );
 
 	itemtype=0;
 	break;
@@ -191,21 +191,21 @@
    case wsP5MouseButton: value=-2.5f; goto rollerhandled;
    case wsP4MouseButton: value= 2.5f;
 rollerhandled:
-        item=&appMPlayer.barItems[currentselected];
+        item=&guiApp.playbarItems[currentselected];
         if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itPotmeter ) )
 	 {
 	  item->value+=value;
 	  btnModify( item->message,item->value );
-	  mplEventHandling( item->message,item->value );
+	  uiEventHandling( item->message,item->value );
 	 }
 	break;
 // ---
    case wsMoveMouse:
-        item=&appMPlayer.barItems[SelectedItem];
+        item=&guiApp.playbarItems[SelectedItem];
 	switch ( itemtype )
 	 {
 	  case itPRMButton:
-	       mplMenuMouseHandle( X,Y,RX,RY );
+	       uiMenuMouseHandle( X,Y,RX,RY );
 	       break;
 	  case itPotmeter:
 	       item->value=(float)( X - item->x ) / item->width * 100.0f;
@@ -218,48 +218,48 @@
 potihandled:
 	       if ( item->value > 100.0f ) item->value=100.0f;
 	       if ( item->value < 0.0f ) item->value=0.0f;
-	       mplEventHandling( item->message,item->value );
+	       uiEventHandling( item->message,item->value );
 	       break;
 	 }
         break;
   }
 }
 
-void mplPBShow( int x, int y )
+void uiPlaybarShow( int x, int y )
 {
- if ( !appMPlayer.barIsPresent || !gtkEnablePlayBar ) return;
- if ( !appMPlayer.subWindow.isFullScreen ) return;
+ if ( !guiApp.playbarIsPresent || !gtkEnablePlayBar ) return;
+ if ( !guiApp.subWindow.isFullScreen ) return;
 
- if ( y > appMPlayer.subWindow.Height - appMPlayer.bar.height )
+ if ( y > guiApp.subWindow.Height - guiApp.playbar.height )
   {
-   if ( !mplPBFade ) wsVisibleWindow( &appMPlayer.barWindow,wsShowWindow );
-   mplPBFade=1; mplPBVisible=1; wsPostRedisplay( &appMPlayer.barWindow );
+   if ( !uiPlaybarFade ) wsVisibleWindow( &guiApp.playbarWindow,wsShowWindow );
+   uiPlaybarFade=1; playbarVisible=1; wsPostRedisplay( &guiApp.playbarWindow );
   }
-  else if ( !mplPBFade ) mplPBFade=2;
+  else if ( !uiPlaybarFade ) uiPlaybarFade=2;
 }
 
-void mplPBInit( void )
+void uiPlaybarInit( void )
 {
- if ( !appMPlayer.barIsPresent ) return;
+ if ( !guiApp.playbarIsPresent ) return;
 
- gfree( (void**)&mplPBDrawBuffer );
+ gfree( (void**)&playbarDrawBuffer );
 
- if ( ( mplPBDrawBuffer = malloc( appMPlayer.bar.Bitmap.ImageSize ) ) == NULL )
+ if ( ( playbarDrawBuffer = malloc( guiApp.playbar.Bitmap.ImageSize ) ) == NULL )
   {
    gmp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_NEMDB );
    guiExit( EXIT_ERROR );
   }
 
- appMPlayer.barWindow.Parent=appMPlayer.subWindow.WindowID;
- wsCreateWindow( &appMPlayer.barWindow,
-   appMPlayer.bar.x,appMPlayer.bar.y,appMPlayer.bar.width,appMPlayer.bar.height,
+ guiApp.playbarWindow.Parent=guiApp.subWindow.WindowID;
+ wsCreateWindow( &guiApp.playbarWindow,
+   guiApp.playbar.x,guiApp.playbar.y,guiApp.playbar.width,guiApp.playbar.height,
    wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsHideWindow,"PlayBar" );
 
- wsSetShape( &appMPlayer.barWindow,appMPlayer.bar.Mask.Image );
+ wsSetShape( &guiApp.playbarWindow,guiApp.playbar.Mask.Image );
 
- appMPlayer.barWindow.ReDraw=(void *)mplPBDraw;
- appMPlayer.barWindow.MouseHandler=mplPBMouseHandle;
- appMPlayer.barWindow.KeyHandler=mplMainKeyHandle;
+ guiApp.playbarWindow.ReDraw=(void *)uiPlaybarDraw;
+ guiApp.playbarWindow.MouseHandler=uiPlaybarMouseHandle;
+ guiApp.playbarWindow.KeyHandler=uiMainKeyHandle;
 
- mplPBLength=appMPlayer.subWindow.Height;
+ playbarLength=guiApp.subWindow.Height;
 }
--- a/gui/mplayer/play.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/play.c	Sat Jun 18 14:33:41 2011 +0000
@@ -36,141 +36,141 @@
 #include "mp_core.h"
 #include "stream/stream.h"
 
-int mplGotoTheNext = 1;
+int uiGotoTheNext = 1;
 
-void mplFullScreen(void)
+void uiFullScreen(void)
 {
-    if (guiIntfStruct.NoWindow && guiIntfStruct.Playing)
+    if (guiInfo.NoWindow && guiInfo.Playing)
         return;
 
-    if (guiIntfStruct.Playing && appMPlayer.subWindow.isFullScreen) {
-        appMPlayer.subWindow.OldWidth  = guiIntfStruct.MovieWidth;
-        appMPlayer.subWindow.OldHeight = guiIntfStruct.MovieHeight;
+    if (guiInfo.Playing && guiApp.subWindow.isFullScreen) {
+        guiApp.subWindow.OldWidth  = guiInfo.MovieWidth;
+        guiApp.subWindow.OldHeight = guiInfo.MovieHeight;
 
-        switch (appMPlayer.sub.x) {
+        switch (guiApp.sub.x) {
         case -1:
-            appMPlayer.subWindow.OldX = wsMaxX / 2 - appMPlayer.subWindow.OldWidth / 2 + wsOrgX;
+            guiApp.subWindow.OldX = wsMaxX / 2 - guiApp.subWindow.OldWidth / 2 + wsOrgX;
             break;
 
         case -2:
-            appMPlayer.subWindow.OldX = wsMaxX - appMPlayer.subWindow.OldWidth + wsOrgX;
+            guiApp.subWindow.OldX = wsMaxX - guiApp.subWindow.OldWidth + wsOrgX;
             break;
 
         default:
-            appMPlayer.subWindow.OldX = appMPlayer.sub.x;
+            guiApp.subWindow.OldX = guiApp.sub.x;
             break;
         }
 
-        switch (appMPlayer.sub.y) {
+        switch (guiApp.sub.y) {
         case -1:
-            appMPlayer.subWindow.OldY = wsMaxY / 2 - appMPlayer.subWindow.OldHeight / 2 + wsOrgY;
+            guiApp.subWindow.OldY = wsMaxY / 2 - guiApp.subWindow.OldHeight / 2 + wsOrgY;
             break;
 
         case -2:
-            appMPlayer.subWindow.OldY = wsMaxY - appMPlayer.subWindow.OldHeight + wsOrgY;
+            guiApp.subWindow.OldY = wsMaxY - guiApp.subWindow.OldHeight + wsOrgY;
             break;
 
         default:
-            appMPlayer.subWindow.OldY = appMPlayer.sub.y;
+            guiApp.subWindow.OldY = guiApp.sub.y;
             break;
         }
     }
 
-    if (guiIntfStruct.Playing || gtkShowVideoWindow)
-        wsFullScreen(&appMPlayer.subWindow);
+    if (guiInfo.Playing || gtkShowVideoWindow)
+        wsFullScreen(&guiApp.subWindow);
 
-    fullscreen = vo_fs = appMPlayer.subWindow.isFullScreen;
-    wsSetLayer(wsDisplay, appMPlayer.mainWindow.WindowID, appMPlayer.subWindow.isFullScreen);
+    fullscreen = vo_fs = guiApp.subWindow.isFullScreen;
+    wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.subWindow.isFullScreen);
 
-    if (appMPlayer.menuIsPresent)
-        wsSetLayer(wsDisplay, appMPlayer.menuWindow.WindowID, appMPlayer.subWindow.isFullScreen);
+    if (guiApp.menuIsPresent)
+        wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.subWindow.isFullScreen);
 
-    if (guiIntfStruct.Playing)
-        wsSetBackgroundRGB(&appMPlayer.subWindow, 0, 0, 0);
+    if (guiInfo.Playing)
+        wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0);
     else
-        wsSetBackgroundRGB(&appMPlayer.subWindow, appMPlayer.sub.R, appMPlayer.sub.G, appMPlayer.sub.B);
+        wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
 }
 
-void mplEnd(void)
+void uiEnd(void)
 {
     plItem *next;
 
-    if (!mplGotoTheNext && guiIntfStruct.Playing) {
-        mplGotoTheNext = 1;
+    if (!uiGotoTheNext && guiInfo.Playing) {
+        uiGotoTheNext = 1;
         return;
     }
 
-    if (guiIntfStruct.Playing && (next = gtkSet(gtkGetNextPlItem, 0, NULL)) && (plLastPlayed != next)) {
+    if (guiInfo.Playing && (next = gtkSet(gtkGetNextPlItem, 0, NULL)) && (plLastPlayed != next)) {
         plLastPlayed = next;
-        guiSetDF(guiIntfStruct.Filename, next->path, next->name);
-        guiIntfStruct.StreamType      = STREAMTYPE_FILE;
-        guiIntfStruct.FilenameChanged = guiIntfStruct.NewPlay = 1;
-        gfree((void **)&guiIntfStruct.AudioFile);
-        gfree((void **)&guiIntfStruct.Subtitlename);
+        guiSetDF(guiInfo.Filename, next->path, next->name);
+        guiInfo.StreamType      = STREAMTYPE_FILE;
+        guiInfo.FilenameChanged = guiInfo.NewPlay = 1;
+        gfree((void **)&guiInfo.AudioFile);
+        gfree((void **)&guiInfo.Subtitlename);
     } else {
-        if (guiIntfStruct.FilenameChanged || guiIntfStruct.NewPlay)
+        if (guiInfo.FilenameChanged || guiInfo.NewPlay)
             return;
 
-        guiIntfStruct.TimeSec   = 0;
-        guiIntfStruct.Position  = 0;
-        guiIntfStruct.AudioType = 0;
-        guiIntfStruct.NoWindow  = False;
+        guiInfo.TimeSec   = 0;
+        guiInfo.Position  = 0;
+        guiInfo.AudioType = 0;
+        guiInfo.NoWindow  = False;
 
 #ifdef CONFIG_DVDREAD
-        guiIntfStruct.DVD.current_title   = 1;
-        guiIntfStruct.DVD.current_chapter = 1;
-        guiIntfStruct.DVD.current_angle   = 1;
+        guiInfo.DVD.current_title   = 1;
+        guiInfo.DVD.current_chapter = 1;
+        guiInfo.DVD.current_angle   = 1;
 #endif
 
-        if (!appMPlayer.subWindow.isFullScreen && gtkShowVideoWindow) {
-            wsResizeWindow(&appMPlayer.subWindow, appMPlayer.sub.width, appMPlayer.sub.height);
-            wsMoveWindow(&appMPlayer.subWindow, True, appMPlayer.sub.x, appMPlayer.sub.y);
+        if (!guiApp.subWindow.isFullScreen && gtkShowVideoWindow) {
+            wsResizeWindow(&guiApp.subWindow, guiApp.sub.width, guiApp.sub.height);
+            wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y);
         } else
-            wsVisibleWindow(&appMPlayer.subWindow, wsHideWindow);
+            wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
 
         guiGetEvent(guiCEvent, guiSetStop);
-        mplSubRender = 1;
-        wsSetBackgroundRGB(&appMPlayer.subWindow, appMPlayer.sub.R, appMPlayer.sub.G, appMPlayer.sub.B);
-        wsClearWindow(appMPlayer.subWindow);
-        wsPostRedisplay(&appMPlayer.subWindow);
+        uiSubRender = 1;
+        wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
+        wsClearWindow(guiApp.subWindow);
+        wsPostRedisplay(&guiApp.subWindow);
     }
 }
 
-void mplPlay(void)
+void uiPlay(void)
 {
-    if (!guiIntfStruct.Filename ||
-        (guiIntfStruct.Filename[0] == 0) ||
-        (guiIntfStruct.Playing == 1))
+    if (!guiInfo.Filename ||
+        (guiInfo.Filename[0] == 0) ||
+        (guiInfo.Playing == 1))
         return;
 
-    if (guiIntfStruct.Playing == 2) {
-        mplPause();
+    if (guiInfo.Playing == 2) {
+        uiPause();
         return;
     }
 
     guiGetEvent(guiCEvent, (void *)guiSetPlay);
-    mplSubRender = 0;
-    wsSetBackgroundRGB(&appMPlayer.subWindow, 0, 0, 0);
-    wsClearWindow(appMPlayer.subWindow);
+    uiSubRender = 0;
+    wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0);
+    wsClearWindow(guiApp.subWindow);
 }
 
-void mplPause(void)
+void uiPause(void)
 {
-    if (!guiIntfStruct.Playing)
+    if (!guiInfo.Playing)
         return;
 
-    if (guiIntfStruct.Playing == 1) {
+    if (guiInfo.Playing == 1) {
         mp_cmd_t *cmd = calloc(1, sizeof(*cmd));
         cmd->id   = MP_CMD_PAUSE;
         cmd->name = strdup("pause");
         mp_input_queue_cmd(cmd);
     } else
-        guiIntfStruct.Playing = 1;
+        guiInfo.Playing = 1;
 }
 
-void mplState(void)
+void uiState(void)
 {
-    if (guiIntfStruct.Playing == 0 || guiIntfStruct.Playing == 2) {
+    if (guiInfo.Playing == 0 || guiInfo.Playing == 2) {
         btnModify(evPlaySwitchToPause, btnReleased);
         btnModify(evPauseSwitchToPlay, btnDisabled);
     } else {
@@ -179,27 +179,27 @@
     }
 }
 
-void mplRelSeek(float sec)
+void uiRelSeek(float sec)
 {
     rel_seek_secs = sec;
     abs_seek_pos  = 0;
 }
 
-void mplAbsSeek(float percent)
+void uiAbsSeek(float percent)
 {
-    if (guiIntfStruct.StreamType == STREAMTYPE_STREAM)
+    if (guiInfo.StreamType == STREAMTYPE_STREAM)
         return;
 
     rel_seek_secs = percent / 100.0;
     abs_seek_pos  = 3;
 }
 
-void ChangeSkin(char *name)
+void uiChangeSkin(char *name)
 {
     int prev, bprev;
 
-    prev  = appMPlayer.menuIsPresent;
-    bprev = appMPlayer.barIsPresent;
+    prev  = guiApp.menuIsPresent;
+    bprev = guiApp.playbarIsPresent;
 
     mainVisible = 0;
 
@@ -212,112 +212,112 @@
 
     // reload menu window
 
-    if (prev && appMPlayer.menuIsPresent) {
-        free(mplMenuDrawBuffer);
-        mplMenuDrawBuffer = calloc(1, appMPlayer.menu.Bitmap.ImageSize);
+    if (prev && guiApp.menuIsPresent) {
+        free(menuDrawBuffer);
+        menuDrawBuffer = calloc(1, guiApp.menu.Bitmap.ImageSize);
 
-        if (!mplMenuDrawBuffer) {
+        if (!menuDrawBuffer) {
             gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB);
             guiExit(EXIT_ERROR);
         }
 
-        wsResizeWindow(&appMPlayer.menuWindow, appMPlayer.menu.width, appMPlayer.menu.height);
-        wsResizeImage(&appMPlayer.menuWindow, appMPlayer.menu.width, appMPlayer.menu.height);
-        wsSetShape(&appMPlayer.menuWindow, appMPlayer.menu.Mask.Image);
-        wsVisibleWindow(&appMPlayer.menuWindow, wsHideWindow);
+        wsResizeWindow(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height);
+        wsResizeImage(&guiApp.menuWindow, guiApp.menu.width, guiApp.menu.height);
+        wsSetShape(&guiApp.menuWindow, guiApp.menu.Mask.Image);
+        wsVisibleWindow(&guiApp.menuWindow, wsHideWindow);
     } else
-        mplMenuInit();
+        uiMenuInit();
 
     // reload sub window
 
-    if (appMPlayer.sub.Bitmap.Image)
-        wsResizeImage(&appMPlayer.subWindow, appMPlayer.sub.Bitmap.Width, appMPlayer.sub.Bitmap.Height);
+    if (guiApp.sub.Bitmap.Image)
+        wsResizeImage(&guiApp.subWindow, guiApp.sub.Bitmap.Width, guiApp.sub.Bitmap.Height);
 
-    if (!appMPlayer.subWindow.isFullScreen && !guiIntfStruct.Playing) {
-        wsResizeWindow(&appMPlayer.subWindow, appMPlayer.sub.width, appMPlayer.sub.height);
-        wsMoveWindow(&appMPlayer.subWindow, True, appMPlayer.sub.x, appMPlayer.sub.y);
+    if (!guiApp.subWindow.isFullScreen && !guiInfo.Playing) {
+        wsResizeWindow(&guiApp.subWindow, guiApp.sub.width, guiApp.sub.height);
+        wsMoveWindow(&guiApp.subWindow, True, guiApp.sub.x, guiApp.sub.y);
     }
 
-    if (appMPlayer.sub.Bitmap.Image)
-        wsConvert(&appMPlayer.subWindow, appMPlayer.sub.Bitmap.Image);
+    if (guiApp.sub.Bitmap.Image)
+        wsConvert(&guiApp.subWindow, guiApp.sub.Bitmap.Image);
 
-    if (!guiIntfStruct.Playing) {
-        mplSubRender = 1;
-        wsSetBackgroundRGB(&appMPlayer.subWindow, appMPlayer.sub.R, appMPlayer.sub.G, appMPlayer.sub.B);
-        wsClearWindow(appMPlayer.subWindow);
-        wsPostRedisplay(&appMPlayer.subWindow);
+    if (!guiInfo.Playing) {
+        uiSubRender = 1;
+        wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
+        wsClearWindow(guiApp.subWindow);
+        wsPostRedisplay(&guiApp.subWindow);
     }
 
-    // reload play bar
+    // reload playbar
 
     if (bprev)
-        wsDestroyWindow(&appMPlayer.barWindow);
+        wsDestroyWindow(&guiApp.playbarWindow);
 
-    mplPBInit();
+    uiPlaybarInit();
 
     // reload main window
 
-    free(mplDrawBuffer);
-    mplDrawBuffer = calloc(1, appMPlayer.main.Bitmap.ImageSize);
+    free(mainDrawBuffer);
+    mainDrawBuffer = calloc(1, guiApp.main.Bitmap.ImageSize);
 
-    if (!mplDrawBuffer) {
+    if (!mainDrawBuffer) {
         gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB);
         guiExit(EXIT_ERROR);
     }
 
-    wsDestroyWindow(&appMPlayer.mainWindow);
+    wsDestroyWindow(&guiApp.mainWindow);
 
-    wsCreateWindow(&appMPlayer.mainWindow, appMPlayer.main.x, appMPlayer.main.y, appMPlayer.main.width, appMPlayer.main.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsMaxSize | wsHideWindow, "MPlayer");
-    wsCreateImage(&appMPlayer.mainWindow, appMPlayer.main.Bitmap.Width, appMPlayer.main.Bitmap.Height);
-    wsSetShape(&appMPlayer.mainWindow, appMPlayer.main.Mask.Image);
-    wsSetIcon(wsDisplay, appMPlayer.mainWindow.WindowID, &guiIcon);
+    wsCreateWindow(&guiApp.mainWindow, guiApp.main.x, guiApp.main.y, guiApp.main.width, guiApp.main.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsMaxSize | wsHideWindow, "MPlayer");
+    wsCreateImage(&guiApp.mainWindow, guiApp.main.Bitmap.Width, guiApp.main.Bitmap.Height);
+    wsSetShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
+    wsSetIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon);
 
-    appMPlayer.mainWindow.ReDraw       = (void *)mplMainDraw;
-    appMPlayer.mainWindow.MouseHandler = mplMainMouseHandle;
-    appMPlayer.mainWindow.KeyHandler   = mplMainKeyHandle;
-    appMPlayer.mainWindow.DandDHandler = mplDandDHandler;
+    guiApp.mainWindow.ReDraw       = (void *)uiMainDraw;
+    guiApp.mainWindow.MouseHandler = uiMainMouseHandle;
+    guiApp.mainWindow.KeyHandler   = uiMainKeyHandle;
+    guiApp.mainWindow.DandDHandler = uiDandDHandler;
 
-    wsXDNDMakeAwareness(&appMPlayer.mainWindow);
+    wsXDNDMakeAwareness(&guiApp.mainWindow);
 
-    if (!appMPlayer.mainDecoration)
-        wsWindowDecoration(&appMPlayer.mainWindow, 0);
+    if (!guiApp.mainDecoration)
+        wsWindowDecoration(&guiApp.mainWindow, 0);
 
-    wsVisibleWindow(&appMPlayer.mainWindow, wsShowWindow);
+    wsVisibleWindow(&guiApp.mainWindow, wsShowWindow);
     mainVisible = 1;
 
-    btnModify(evSetVolume, guiIntfStruct.Volume);
-    btnModify(evSetBalance, guiIntfStruct.Balance);
-    btnModify(evSetMoviePosition, guiIntfStruct.Position);
-    btnModify(evFullScreen, !appMPlayer.subWindow.isFullScreen);
+    btnModify(evSetVolume, guiInfo.Volume);
+    btnModify(evSetBalance, guiInfo.Balance);
+    btnModify(evSetMoviePosition, guiInfo.Position);
+    btnModify(evFullScreen, !guiApp.subWindow.isFullScreen);
 
-    wsSetLayer(wsDisplay, appMPlayer.mainWindow.WindowID, appMPlayer.subWindow.isFullScreen);
-    wsSetLayer(wsDisplay, appMPlayer.menuWindow.WindowID, appMPlayer.subWindow.isFullScreen);
+    wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.subWindow.isFullScreen);
+    wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.subWindow.isFullScreen);
 }
 
-void mplSetFileName(char *dir, char *name, int type)
+void uiSetFileName(char *dir, char *name, int type)
 {
     if (!name)
         return;
 
     if (!dir)
-        guiSetFilename(guiIntfStruct.Filename, name)
+        guiSetFilename(guiInfo.Filename, name)
     else
-        guiSetDF(guiIntfStruct.Filename, dir, name)
+        guiSetDF(guiInfo.Filename, dir, name)
 
-    guiIntfStruct.StreamType = type;
-    gfree((void **)&guiIntfStruct.AudioFile);
-    gfree((void **)&guiIntfStruct.Subtitlename);
+    guiInfo.StreamType = type;
+    gfree((void **)&guiInfo.AudioFile);
+    gfree((void **)&guiInfo.Subtitlename);
 }
 
-void mplCurr(void)
+void uiCurr(void)
 {
     plItem *curr;
     int stop = 0;
 
-    if (guiIntfStruct.Playing == 2)
+    if (guiInfo.Playing == 2)
         return;
 
-    switch (guiIntfStruct.StreamType) {
+    switch (guiInfo.StreamType) {
 #ifdef CONFIG_DVDREAD
     case STREAMTYPE_DVD:
         break;
@@ -333,8 +333,8 @@
         curr = gtkSet(gtkGetCurrPlItem, 0, NULL);
 
         if (curr) {
-            mplSetFileName(curr->path, curr->name, STREAMTYPE_FILE);
-            mplGotoTheNext = 0;
+            uiSetFileName(curr->path, curr->name, STREAMTYPE_FILE);
+            uiGotoTheNext = 0;
             break;
         }
 
@@ -342,41 +342,41 @@
     }
 
     if (stop)
-        mplEventHandling(evStop, 0);
+        uiEventHandling(evStop, 0);
 
-    if (guiIntfStruct.Playing == 1)
-        mplEventHandling(evPlay, 0);
+    if (guiInfo.Playing == 1)
+        uiEventHandling(evPlay, 0);
 }
 
-void mplPrev(void)
+void uiPrev(void)
 {
     plItem *prev;
     int stop = 0;
 
-    if (guiIntfStruct.Playing == 2)
+    if (guiInfo.Playing == 2)
         return;
 
-    switch (guiIntfStruct.StreamType) {
+    switch (guiInfo.StreamType) {
 #ifdef CONFIG_DVDREAD
     case STREAMTYPE_DVD:
 
-        if (--guiIntfStruct.DVD.current_chapter == 0) {
-            guiIntfStruct.DVD.current_chapter = 1;
+        if (--guiInfo.DVD.current_chapter == 0) {
+            guiInfo.DVD.current_chapter = 1;
 
-            if (--guiIntfStruct.DVD.current_title <= 0) {
-                guiIntfStruct.DVD.current_title = 1;
+            if (--guiInfo.DVD.current_title <= 0) {
+                guiInfo.DVD.current_title = 1;
                 stop = 1;
             }
         }
 
-        guiIntfStruct.Track = guiIntfStruct.DVD.current_title;
+        guiInfo.Track = guiInfo.DVD.current_title;
         break;
 #endif
 
 #ifdef CONFIG_VCD
     case STREAMTYPE_VCD:
-        if (--guiIntfStruct.Track == 0) {
-            guiIntfStruct.Track = 1;
+        if (--guiInfo.Track == 0) {
+            guiInfo.Track = 1;
             stop = 1;
         }
         break;
@@ -387,8 +387,8 @@
         prev = gtkSet(gtkGetPrevPlItem, 0, NULL);
 
         if (prev) {
-            mplSetFileName(prev->path, prev->name, STREAMTYPE_FILE);
-            mplGotoTheNext = 0;
+            uiSetFileName(prev->path, prev->name, STREAMTYPE_FILE);
+            uiGotoTheNext = 0;
             break;
         }
 
@@ -396,45 +396,45 @@
     }
 
     if (stop)
-        mplEventHandling(evStop, 0);
+        uiEventHandling(evStop, 0);
 
-    if (guiIntfStruct.Playing == 1)
-        mplEventHandling(evPlay, 0);
+    if (guiInfo.Playing == 1)
+        uiEventHandling(evPlay, 0);
 }
 
-void mplNext(void)
+void uiNext(void)
 {
     int stop = 0;
     plItem *next;
 
-    if (guiIntfStruct.Playing == 2)
+    if (guiInfo.Playing == 2)
         return;
 
-    switch (guiIntfStruct.StreamType) {
+    switch (guiInfo.StreamType) {
 #ifdef CONFIG_DVDREAD
     case STREAMTYPE_DVD:
 
-        if (guiIntfStruct.DVD.current_chapter++ == guiIntfStruct.DVD.chapters) {
-            guiIntfStruct.DVD.current_chapter = 1;
+        if (guiInfo.DVD.current_chapter++ == guiInfo.DVD.chapters) {
+            guiInfo.DVD.current_chapter = 1;
 
-            if (++guiIntfStruct.DVD.current_title > guiIntfStruct.DVD.titles) {
-                guiIntfStruct.DVD.current_title = guiIntfStruct.DVD.titles;
+            if (++guiInfo.DVD.current_title > guiInfo.DVD.titles) {
+                guiInfo.DVD.current_title = guiInfo.DVD.titles;
                 stop = 1;
             }
         }
 
-        guiIntfStruct.Track = guiIntfStruct.DVD.current_title;
+        guiInfo.Track = guiInfo.DVD.current_title;
         break;
 #endif
 
 #ifdef CONFIG_VCD
     case STREAMTYPE_VCD:
 
-        if (++guiIntfStruct.Track >= guiIntfStruct.VCDTracks) {
-            guiIntfStruct.Track = guiIntfStruct.VCDTracks;
+        if (++guiInfo.Track >= guiInfo.VCDTracks) {
+            guiInfo.Track = guiInfo.VCDTracks;
 
-            if (guiIntfStruct.VCDTracks > 1)
-                guiIntfStruct.Track--;
+            if (guiInfo.VCDTracks > 1)
+                guiInfo.Track--;
 
             stop = 1;
         }
@@ -447,8 +447,8 @@
         next = gtkSet(gtkGetNextPlItem, 0, NULL);
 
         if (next) {
-            mplSetFileName(next->path, next->name, STREAMTYPE_FILE);
-            mplGotoTheNext = 0;
+            uiSetFileName(next->path, next->name, STREAMTYPE_FILE);
+            uiGotoTheNext = 0;
             break;
         }
 
@@ -456,13 +456,13 @@
     }
 
     if (stop)
-        mplEventHandling(evStop, 0);
+        uiEventHandling(evStop, 0);
 
-    if (guiIntfStruct.Playing == 1)
-        mplEventHandling(evPlay, 0);
+    if (guiInfo.Playing == 1)
+        uiEventHandling(evPlay, 0);
 }
 
-void mplStop(void)
+void uiStop(void)
 {
-    mplEventHandling(evStop, 0);
+    uiEventHandling(evStop, 0);
 }
--- a/gui/mplayer/play.h	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/play.h	Sat Jun 18 14:33:41 2011 +0000
@@ -19,20 +19,20 @@
 #ifndef MPLAYER_GUI_PLAY_H
 #define MPLAYER_GUI_PLAY_H
 
-extern int mplGotoTheNext;
+extern int uiGotoTheNext;
 
-void ChangeSkin(char *name);
-void mplAbsSeek(float sec);
-void mplCurr(void);
-void mplEnd(void);
-void mplFullScreen(void);
-void mplNext(void);
-void mplPause(void);
-void mplPlay(void);
-void mplPrev(void);
-void mplRelSeek(float percent);
-void mplSetFileName(char *dir, char *name, int type);
-void mplState(void);
-void mplStop(void);
+void uiAbsSeek(float sec);
+void uiChangeSkin(char *name);
+void uiCurr(void);
+void uiEnd(void);
+void uiFullScreen(void);
+void uiNext(void);
+void uiPause(void);
+void uiPlay(void);
+void uiPrev(void);
+void uiRelSeek(float percent);
+void uiSetFileName(char *dir, char *name, int type);
+void uiState(void);
+void uiStop(void);
 
 #endif /* MPLAYER_GUI_PLAY_H */
--- a/gui/mplayer/sw.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/sw.c	Sat Jun 18 14:33:41 2011 +0000
@@ -30,34 +30,34 @@
 #include "gui/interface.h"
 #include "widgets.h"
 
-int             mplSubRender = 0;
-int             SubVisible = 0;
+int             uiSubRender = 0;
+int             subVisible = 0;
 
-void mplSubDraw( void )
+void uiSubDraw( void )
 {
- if ( appMPlayer.subWindow.State == wsWindowClosed ) guiExit( EXIT_QUIT );
+ if ( guiApp.subWindow.State == wsWindowClosed ) guiExit( EXIT_QUIT );
 
- if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++;
- if ( appMPlayer.subWindow.State == wsWindowFocusOut && metacity_hack != 3 ) SubVisible--;
+ if ( guiApp.subWindow.State == wsWindowFocusIn ) subVisible++;
+ if ( guiApp.subWindow.State == wsWindowFocusOut && metacity_hack != 3 ) subVisible--;
 
- if ( !appMPlayer.subWindow.Mapped ||
-      appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
+ if ( !guiApp.subWindow.Mapped ||
+      guiApp.subWindow.Visible == wsWindowNotVisible ) return;
 
- if ( guiIntfStruct.Playing ) mplSubRender=0;
+ if ( guiInfo.Playing ) uiSubRender=0;
 
- if ( mplSubRender && appMPlayer.subWindow.State == wsWindowExpose )
+ if ( uiSubRender && guiApp.subWindow.State == wsWindowExpose )
   {
-   if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
+   if ( guiApp.sub.Bitmap.Image ) wsPutImage( &guiApp.subWindow );
   }
- appMPlayer.subWindow.State=0;
+ guiApp.subWindow.State=0;
 }
 
-void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY )
+void uiSubMouseHandle( int Button,int X,int Y,int RX,int RY )
 {
  static int mplSubMoved = 0;
  static int msButton = 0;
 
- mplPBShow( X,Y );
+ uiPlaybarShow( X,Y );
 
  switch( Button )
   {
@@ -66,11 +66,11 @@
           break;
    case wsPMMouseButton:
           gtkShow( evHidePopUpMenu,NULL );
-          mplShowMenu( RX,RY );
+          uiShowMenu( RX,RY );
           msButton=wsPMMouseButton;
           break;
    case wsRMMouseButton:
-          mplHideMenu( RX,RY,1 );
+          uiHideMenu( RX,RY,1 );
           msButton=0;
           break;
 // ---
@@ -85,19 +85,19 @@
            {
             case wsPLMouseButton:
                    mplSubMoved=1;
-                   if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy );
+                   if ( !guiApp.subWindow.isFullScreen ) wsMoveWindow( &guiApp.subWindow,False,RX - sx,RY - sy );
                    break;
             case wsPMMouseButton:
-                   mplMenuMouseHandle( X,Y,RX,RY );
+                   uiMenuMouseHandle( X,Y,RX,RY );
                    break;
-	    default: mplPBShow( X,Y ); break;
+	    default: uiPlaybarShow( X,Y ); break;
            }
           break;
    case wsRLMouseButton:
-          if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) )
+          if ( ( !mplSubMoved )&&( guiApp.subWindow.isFullScreen ) )
            {
-            if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID );
-             else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID );
+            if( subVisible++%2 ) wsMoveTopWindow( wsDisplay,guiApp.mainWindow.WindowID );
+             else wsMoveTopWindow( wsDisplay,guiApp.subWindow.WindowID );
 	   }
           msButton=0;
           mplSubMoved=0;
--- a/gui/mplayer/widgets.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/mplayer/widgets.c	Sat Jun 18 14:33:41 2011 +0000
@@ -218,7 +218,7 @@
 
 void gtkSetLayer(GtkWidget *wdg)
 {
-    wsSetLayer(gdk_display, GDK_WINDOW_XWINDOW(wdg->window), appMPlayer.subWindow.isFullScreen);
+    wsSetLayer(gdk_display, GDK_WINDOW_XWINDOW(wdg->window), guiApp.subWindow.isFullScreen);
     gtkActive(wdg);
 }
 
--- a/gui/skin/font.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/skin/font.c	Sat Jun 18 14:33:41 2011 +0000
@@ -270,7 +270,7 @@
     return max;
 }
 
-txSample *fntRender(wItem *item, int px, char *txt)
+guiImage *fntRender(wItem *item, int px, char *txt)
 {
     unsigned char *u;
     unsigned int i;
@@ -301,7 +301,7 @@
         if (!item->Bitmap.ImageSize)
             return NULL;
 
-        item->Bitmap.BPP   = 32;
+        item->Bitmap.Bpp   = 32;
         item->Bitmap.Image = malloc(item->Bitmap.ImageSize);
 
         if (!item->Bitmap.Image)
--- a/gui/skin/font.h	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/skin/font.h	Sat Jun 18 14:33:41 2011 +0000
@@ -36,14 +36,14 @@
 typedef struct {
     fntChar Fnt[ASCII_CHRS + EXTRA_CHRS];
     unsigned char nonASCIIidx[EXTRA_CHRS][UTF8LENGTH];
-    txSample Bitmap;
+    guiImage Bitmap;
     char name[MAX_FONT_NAME];
 } bmpFont;
 
 int fntFindID(char *name);
 void fntFreeFont(void);
 int fntRead(char *path, char *fname);
-txSample *fntRender(wItem *item, int px, char *txt);
+guiImage *fntRender(wItem *item, int px, char *txt);
 int fntTextWidth(int id, char *str);
 
 #endif /* MPLAYER_GUI_FONT_H */
--- a/gui/skin/skin.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/skin/skin.c	Sat Jun 18 14:33:41 2011 +0000
@@ -90,7 +90,7 @@
     return 0;
 }
 
-int skinBPRead(char *fname, txSample *bf)
+int skinBPRead(char *fname, guiImage *bf)
 {
     int i = bpRead(fname, bf);
 
@@ -137,7 +137,7 @@
     }
 
     if (!strcmp(strlower(in), "movieplayer"))
-        skin = &appMPlayer;
+        skin = &guiApp;
     else {
         skin_error(MSGTR_SKIN_UNKNOWN_NAME, in);
         return 1;
@@ -203,9 +203,9 @@
         currWinItemIdx = NULL;
         currWinItems   = NULL;
     } else if (strcmp(in, "playbar") == 0) {
-        currWin = &skin->bar;
-        currWinItemIdx = &skin->IndexOfBarItems;
-        currWinItems   = skin->barItems;
+        currWin = &skin->playbar;
+        currWinItemIdx = &skin->IndexOfPlaybarItems;
+        currWinItems   = skin->playbarItems;
     } else if (strcmp(in, "menu") == 0) {
         currWin = &skin->menu;
         currWinItemIdx = &skin->IndexOfMenuItems;
@@ -277,7 +277,7 @@
 
     if (!is_sub) {
 #ifdef CONFIG_XSHAPE
-        if (!Convert32to1(&currWin->Bitmap, &currWin->Mask)) {
+        if (!bpRenderMask(&currWin->Bitmap, &currWin->Mask)) {
             skin_error(MSGTR_SKIN_NotEnoughMemory);
             return 1;
         }
@@ -288,7 +288,7 @@
     }
 
     if (is_bar)
-        skin->barIsPresent = 1;
+        skin->playbarIsPresent = 1;
     if (is_menu)
         skin->menuIsPresent = 1;
 
--- a/gui/skin/skin.h	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/skin/skin.h	Sat Jun 18 14:33:41 2011 +0000
@@ -21,7 +21,7 @@
 
 #include "gui/util/bitmap.h"
 
-int skinBPRead(char *fname, txSample *bf);
+int skinBPRead(char *fname, guiImage *bf);
 int skinRead(char *dname);
 
 #endif /* MPLAYER_GUI_SKIN_H */
--- a/gui/util/bitmap.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/util/bitmap.c	Sat Jun 18 14:33:41 2011 +0000
@@ -29,7 +29,7 @@
 #include "libvo/fastmemcpy.h"
 #include "mp_msg.h"
 
-static int pngRead(unsigned char *fname, txSample *bf)
+static int pngRead(unsigned char *fname, guiImage *bf)
 {
     FILE *file;
     long len;
@@ -88,35 +88,35 @@
 
     switch (avctx->pix_fmt) {
     case PIX_FMT_GRAY8:
-        bf->BPP = 8;
+        bf->Bpp = 8;
         break;
 
     case PIX_FMT_GRAY16BE:
-        bf->BPP = 16;
+        bf->Bpp = 16;
         break;
 
     case PIX_FMT_RGB24:
-        bf->BPP = 24;
+        bf->Bpp = 24;
         break;
 
     case PIX_FMT_BGRA:
     case PIX_FMT_ARGB:
-        bf->BPP = 32;
+        bf->Bpp = 32;
         break;
 
     default:
-        bf->BPP = 0;
+        bf->Bpp = 0;
         break;
     }
 
-    if (decode_ok && bf->BPP) {
+    if (decode_ok && bf->Bpp) {
         bf->Width  = avctx->width;
         bf->Height = avctx->height;
-        bpl = bf->Width * (bf->BPP / 8);
+        bpl = bf->Width * (bf->Bpp / 8);
         bf->ImageSize = bpl * bf->Height;
 
         mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] file: %s\n", fname);
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  size: %lux%lu, color depth: %u\n", bf->Width, bf->Height, bf->BPP);
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  size: %lux%lu, color depth: %u\n", bf->Width, bf->Height, bf->Bpp);
         mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  image size: %lu\n", bf->ImageSize);
 
         bf->Image = malloc(bf->ImageSize);
@@ -132,18 +132,18 @@
     av_free(avctx);
     av_free(data);
 
-    return !(decode_ok && bf->BPP);
+    return !(decode_ok && bf->Bpp);
 }
 
-static int Convert24to32(txSample *bf)
+static int Convert24to32(guiImage *bf)
 {
     char *orgImage;
     unsigned long i, c;
 
-    if (bf->BPP == 24) {
+    if (bf->Bpp == 24) {
         orgImage = bf->Image;
 
-        bf->BPP       = 32;
+        bf->Bpp       = 32;
         bf->ImageSize = bf->Width * bf->Height * 4;
         bf->Image     = calloc(1, bf->ImageSize);
 
@@ -183,7 +183,7 @@
     return NULL;
 }
 
-int bpRead(char *fname, txSample *bf)
+int bpRead(char *fname, guiImage *bf)
 {
     int r;
 
@@ -199,8 +199,8 @@
         return -5;
     }
 
-    if (bf->BPP < 24) {
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] bpp too low: %u\n", bf->BPP);
+    if (bf->Bpp < 24) {
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] bpp too low: %u\n", bf->Bpp);
         return -1;
     }
 
@@ -210,13 +210,13 @@
     return 0;
 }
 
-void bpFree(txSample *bf)
+void bpFree(guiImage *bf)
 {
     free(bf->Image);
     memset(bf, 0, sizeof(*bf));
 }
 
-int Convert32to1(txSample *in, txSample *out)
+int bpRenderMask(guiImage *in, guiImage *out)
 {
     uint32_t *buf;
     unsigned long i;
@@ -226,7 +226,7 @@
 
     out->Width     = in->Width;
     out->Height    = in->Height;
-    out->BPP       = 1;
+    out->Bpp       = 1;
     out->ImageSize = (out->Width * out->Height + 7) / 8;
     out->Image     = calloc(1, out->ImageSize);
 
--- a/gui/util/bitmap.h	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/util/bitmap.h	Sat Jun 18 14:33:41 2011 +0000
@@ -28,13 +28,13 @@
 typedef struct {
     unsigned long Width;
     unsigned long Height;
-    unsigned int BPP;
+    unsigned int Bpp;
     unsigned long ImageSize;
     char *Image;
-} txSample;
+} guiImage;
 
-void bpFree(txSample *bf);
-int bpRead(char *fname, txSample *bf);
-int Convert32to1(txSample *in, txSample *out);
+void bpFree(guiImage *bf);
+int bpRead(char *fname, guiImage *bf);
+int bpRenderMask(guiImage *in, guiImage *out);
 
 #endif /* MPLAYER_GUI_BITMAP_H */
--- a/gui/win32/dialogs.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/win32/dialogs.c	Sat Jun 18 14:33:41 2011 +0000
@@ -41,14 +41,14 @@
 int set_video_colors(sh_video_t *sh_video, const char *item, int value);
 int get_video_colors(sh_video_t *sh_video, const char *item, int *value);
 
-guiInterface_t guiIntfStruct;
+guiInterface_t guiInfo;
 int addurl = 0;
 
 void guiLoadSubtitle(char *name)
 {
-    if (!guiIntfStruct.Playing)
+    if (!guiInfo.Playing)
     {
-        guiIntfStruct.SubtitleChanged = 1;
+        guiInfo.SubtitleChanged = 1;
         return;
     }
     if (subdata)
@@ -78,7 +78,7 @@
     if (name)
     {
         mp_msg(MSGT_GPLAYER, MSGL_INFO, MSGTR_LoadingSubtitles, name);
-        subdata = sub_read_file(strdup(name), guiIntfStruct.FPS);
+        subdata = sub_read_file(strdup(name), guiInfo.FPS);
         if (!subdata) mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_CantLoadSub,name);
         sub_name = (malloc(2 * sizeof(char*))); /* when mplayer will be restarted */
         sub_name[0] = strdup(name);               /* sub_name[0] will be read */
@@ -140,7 +140,7 @@
             {
                 if (GetFullPathName(filename, MAX_PATH, filename, &filepart))
                 {
-                    mplSetFileName(NULL, filename, STREAMTYPE_FILE);
+                    uiSetFileName(NULL, filename, STREAMTYPE_FILE);
                     if(!parse_filename(filename, playtree, mconfig, 0))
                         gui->playlist->add_track(gui->playlist, filename, NULL, filepart, 0);
                     mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Adding file: %s - path %s\n", filespec, filename);
@@ -159,7 +159,7 @@
     char subtitlefile[MAX_PATH];
 
     /* Safety check */
-    if (guiIntfStruct.Playing == 0 || !guiIntfStruct.sh_video) return;
+    if (guiInfo.Playing == 0 || !guiInfo.sh_video) return;
 
     memset(&subtitleopen, 0, sizeof(OPENFILENAME));
     memset(subtitlefile, 0, sizeof(subtitlefile));
@@ -325,7 +325,7 @@
                 {
                     char file[MAX_PATH];
                     SendMessage(url, WM_GETTEXT, MAX_PATH, (LPARAM) file);
-                    mplSetFileName(NULL, file, STREAMTYPE_STREAM);
+                    uiSetFileName(NULL, file, STREAMTYPE_STREAM);
                     if((f = fopen(history, "wt+")))
                     {
                         fprintf(f, file);
@@ -525,7 +525,7 @@
                     {
                 case ID_PLAY:
                         if(selected) pl->current = selected - 1;
-                        mplSetFileName(NULL, pl->tracks[pl->current]->filename, STREAMTYPE_STREAM);
+                        uiSetFileName(NULL, pl->tracks[pl->current]->filename, STREAMTYPE_STREAM);
                         gui->startplay(gui);
                     }
                     return 0;
@@ -546,15 +546,15 @@
                     break;
                 case ID_ADDFILE:
                 {
-                    if(guiIntfStruct.StreamType == STREAMTYPE_DVD ||
-                       guiIntfStruct.StreamType == STREAMTYPE_DVDNAV) return 0;
+                    if(guiInfo.StreamType == STREAMTYPE_DVD ||
+                       guiInfo.StreamType == STREAMTYPE_DVDNAV) return 0;
                     display_openfilewindow(gui, 1);
                     break;
                 }
                 case ID_ADDURL:
                 {
-                    if(guiIntfStruct.StreamType == STREAMTYPE_DVD ||
-                       guiIntfStruct.StreamType == STREAMTYPE_DVDNAV) return 0;
+                    if(guiInfo.StreamType == STREAMTYPE_DVD ||
+                       guiInfo.StreamType == STREAMTYPE_DVDNAV) return 0;
                     display_openurlwindow(gui, 1);
                     break;
                 }
@@ -566,8 +566,8 @@
                 }
                 case ID_PLAYLISTLOAD:
                 {
-                    if(guiIntfStruct.StreamType == STREAMTYPE_DVD ||
-                       guiIntfStruct.StreamType == STREAMTYPE_DVDNAV) return 0;
+                    if(guiInfo.StreamType == STREAMTYPE_DVD ||
+                       guiInfo.StreamType == STREAMTYPE_DVDNAV) return 0;
                     display_loadplaylistwindow(gui);
                     break;
                 }
@@ -575,8 +575,8 @@
                 {
                     /* no point saving an empty playlist */
                     if(!gui->playlist->trackcount ||
-                        guiIntfStruct.StreamType == STREAMTYPE_DVD ||
-                        guiIntfStruct.StreamType == STREAMTYPE_DVDNAV)
+                        guiInfo.StreamType == STREAMTYPE_DVD ||
+                        guiInfo.StreamType == STREAMTYPE_DVDNAV)
                         return 0;
                     display_saveplaylistwindow(gui);
                     break;
@@ -708,7 +708,7 @@
                     int len = SendMessage(listbox, LB_GETTEXTLEN, index, 0);
                     if (len)
                     {
-                        if (guiIntfStruct.Playing) guiGetEvent(guiCEvent, (void *) guiSetStop);
+                        if (guiInfo.Playing) guiGetEvent(guiCEvent, (void *) guiSetStop);
                         free(skinName);
                         skinName = malloc(len + 1);
                         SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName);
@@ -821,17 +821,17 @@
                                  NULL);
             SendMessage(chapter, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            for (i=0; i<guiIntfStruct.DVD.titles; i++)
+            for (i=0; i<guiInfo.DVD.titles; i++)
             {
                 /* we have to reverse the order here because of the way CB_INSERTSTRING adds items */
-                sprintf(&titles[i], "%d", guiIntfStruct.DVD.titles - i);
+                sprintf(&titles[i], "%d", guiInfo.DVD.titles - i);
                 SendDlgItemMessage(hwnd, ID_TITLESEL, CB_INSERTSTRING, 0, (LPARAM) &titles[i]);
             }
             SendDlgItemMessage(hwnd, ID_TITLESEL, CB_SETCURSEL, dvd_title, 0);
 
-            for (j=0; j<guiIntfStruct.DVD.chapters; j++)
+            for (j=0; j<guiInfo.DVD.chapters; j++)
             {
-                sprintf(&chapters[j], "%d", guiIntfStruct.DVD.chapters - j);
+                sprintf(&chapters[j], "%d", guiInfo.DVD.chapters - j);
                 SendDlgItemMessage(hwnd, ID_CHAPTERSEL, CB_INSERTSTRING, 0, (LPARAM) &chapters[j]);
             }
             SendDlgItemMessage(hwnd, ID_CHAPTERSEL, CB_SETCURSEL, dvd_chapter, 0);
@@ -846,10 +846,10 @@
                     return 0;
                 case ID_OK:
                 {
-                    guiIntfStruct.DVD.current_title = SendMessage(title, CB_GETCURSEL, 0, 0) + 1;
-                    guiIntfStruct.DVD.current_chapter = SendMessage(chapter, CB_GETCURSEL, 0, 0) + 1;
+                    guiInfo.DVD.current_title = SendMessage(title, CB_GETCURSEL, 0, 0) + 1;
+                    guiInfo.DVD.current_chapter = SendMessage(chapter, CB_GETCURSEL, 0, 0) + 1;
 
-                    if((guiIntfStruct.DVD.current_title != 0 || guiIntfStruct.DVD.current_chapter != 0))
+                    if((guiInfo.DVD.current_title != 0 || guiInfo.DVD.current_chapter != 0))
                     {
                         gui->startplay(gui);
                         DestroyWindow(hwnd);
@@ -870,7 +870,7 @@
     WNDCLASS wc;
     int x, y;
 
-    if (guiIntfStruct.StreamType != STREAMTYPE_DVD) return;
+    if (guiInfo.StreamType != STREAMTYPE_DVD) return;
     if (FindWindow(NULL, "Select Title/Chapter...")) return;
 
     wc.style         = CS_HREDRAW | CS_VREDRAW;
@@ -993,13 +993,13 @@
                                ((LPCREATESTRUCT) lParam) -> hInstance, NULL);
             SendDlgItemMessage(hwnd, ID_EQ3, TBM_SETRANGE, 1, MAKELONG(0, 200));
 
-            if(guiIntfStruct.sh_video && guiIntfStruct.Playing)
+            if(guiInfo.sh_video && guiInfo.Playing)
             {
                 EnableWindow(eq0, 1); EnableWindow(eq1, 1); EnableWindow(eq2, 1); EnableWindow(eq3, 1);
-                get_video_colors(guiIntfStruct.sh_video, "brightness", &vo_gamma_brightness);
-                get_video_colors(guiIntfStruct.sh_video, "contrast", &vo_gamma_contrast);
-                get_video_colors(guiIntfStruct.sh_video, "hue", &vo_gamma_hue);
-                get_video_colors(guiIntfStruct.sh_video, "saturation", &vo_gamma_saturation);
+                get_video_colors(guiInfo.sh_video, "brightness", &vo_gamma_brightness);
+                get_video_colors(guiInfo.sh_video, "contrast", &vo_gamma_contrast);
+                get_video_colors(guiInfo.sh_video, "hue", &vo_gamma_hue);
+                get_video_colors(guiInfo.sh_video, "saturation", &vo_gamma_saturation);
             }
             SendDlgItemMessage(hwnd, ID_EQ0, TBM_SETPOS, 1, (LPARAM)100 - vo_gamma_brightness);
             SendDlgItemMessage(hwnd, ID_EQ1, TBM_SETPOS, 1, (LPARAM)100 - vo_gamma_contrast);
@@ -1012,19 +1012,19 @@
             switch (LOWORD(wParam))
             {
                 case TB_THUMBTRACK:
-                    if(guiIntfStruct.sh_video && guiIntfStruct.Playing)
+                    if(guiInfo.sh_video && guiInfo.Playing)
                     {
                         vo_gamma_brightness = 100 - SendDlgItemMessage(hwnd, ID_EQ0, TBM_GETPOS, 0, 0);
-                        set_video_colors(guiIntfStruct.sh_video, "brightness", vo_gamma_brightness);
+                        set_video_colors(guiInfo.sh_video, "brightness", vo_gamma_brightness);
 
                         vo_gamma_contrast = 100 - SendDlgItemMessage(hwnd, ID_EQ1, TBM_GETPOS, 0, 0);
-                        set_video_colors(guiIntfStruct.sh_video, "contrast", vo_gamma_contrast);
+                        set_video_colors(guiInfo.sh_video, "contrast", vo_gamma_contrast);
 
                         vo_gamma_hue = 100 - SendDlgItemMessage(hwnd, ID_EQ2, TBM_GETPOS, 0, 0);
-                        set_video_colors(guiIntfStruct.sh_video, "hue", vo_gamma_hue);
+                        set_video_colors(guiInfo.sh_video, "hue", vo_gamma_hue);
 
                         vo_gamma_saturation = 100 - SendDlgItemMessage(hwnd, ID_EQ3, TBM_GETPOS, 0, 0);
-                        set_video_colors(guiIntfStruct.sh_video, "saturation", vo_gamma_saturation);
+                        set_video_colors(guiInfo.sh_video, "saturation", vo_gamma_saturation);
                     }
                     else
                     {
@@ -1052,23 +1052,23 @@
                     DestroyWindow(hwnd);
                     return 0;
                 case ID_DEFAULTS:
-                    if(guiIntfStruct.sh_video && guiIntfStruct.Playing)
+                    if(guiInfo.sh_video && guiInfo.Playing)
                     {
                         vo_gamma_brightness=0;
                         SendDlgItemMessage(hwnd, ID_EQ0, TBM_SETPOS, 1, (LPARAM)100);
-                        set_video_colors(guiIntfStruct.sh_video, "brightness", vo_gamma_brightness);
+                        set_video_colors(guiInfo.sh_video, "brightness", vo_gamma_brightness);
 
                         vo_gamma_contrast=0;
                         SendDlgItemMessage(hwnd, ID_EQ1, TBM_SETPOS, 1, (LPARAM)100);
-                        set_video_colors(guiIntfStruct.sh_video, "contrast", vo_gamma_contrast);
+                        set_video_colors(guiInfo.sh_video, "contrast", vo_gamma_contrast);
 
                         vo_gamma_hue=0;
                         SendDlgItemMessage(hwnd, ID_EQ2, TBM_SETPOS, 1, (LPARAM)100);
-                        set_video_colors(guiIntfStruct.sh_video, "hue", vo_gamma_hue);
+                        set_video_colors(guiInfo.sh_video, "hue", vo_gamma_hue);
 
                         vo_gamma_saturation=0;
                         SendDlgItemMessage(hwnd, ID_EQ3, TBM_SETPOS, 1, (LPARAM)100);
-                        set_video_colors(guiIntfStruct.sh_video, "saturation", vo_gamma_saturation);
+                        set_video_colors(guiInfo.sh_video, "saturation", vo_gamma_saturation);
                     }
                     break;
             }
@@ -1085,7 +1085,7 @@
     WNDCLASS wc;
     int x, y;
 
-    if(!guiIntfStruct.sh_video) return;
+    if(!guiInfo.sh_video) return;
     if(FindWindow(NULL, "MPlayer - Equalizer")) return;
     wc.style         = CS_HREDRAW | CS_VREDRAW;
     wc.lpfnWndProc   = EqWndProc;
--- a/gui/win32/gui.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/win32/gui.c	Sat Jun 18 14:33:41 2011 +0000
@@ -249,11 +249,11 @@
         if(gui->skin->widgets[i]->type == tyHpotmeter || gui->skin->widgets[i]->type == tyPotmeter)
         {
             if(gui->skin->widgets[i]->msg == evSetVolume)
-                gui->skin->widgets[i]->value = guiIntfStruct.Volume;
+                gui->skin->widgets[i]->value = guiInfo.Volume;
             else if(gui->skin->widgets[i]->msg == evSetMoviePosition)
-                gui->skin->widgets[i]->value = guiIntfStruct.Position;
+                gui->skin->widgets[i]->value = guiInfo.Position;
             else if(gui->skin->widgets[i]->msg == evSetBalance)
-                gui->skin->widgets[i]->value = guiIntfStruct.Balance;
+                gui->skin->widgets[i]->value = guiInfo.Balance;
             if(gui->skin->widgets[i]->window == get_windowtype(hwnd))
                 renderwidget(gui->skin, get_drawground(hwnd), gui->skin->widgets[i],
                              gui->skin->widgets[i]->pressed ? 0 : 1);
@@ -263,15 +263,15 @@
         {
             if(gui->skin->widgets[i]->msg == evPlaySwitchToPause)
             {
-                gui->skin->widgets[i]->value = guiIntfStruct.Playing;
+                gui->skin->widgets[i]->value = guiInfo.Playing;
                     renderwidget(gui->skin, get_drawground(hwnd), gui->skin->widgets[i],
-                                 guiIntfStruct.Playing == 1 ? 0 : 1);
+                                 guiInfo.Playing == 1 ? 0 : 1);
             }
             if(gui->skin->widgets[i]->msg == evMute)
             {
-                gui->skin->widgets[i]->value = guiIntfStruct.Volume;
+                gui->skin->widgets[i]->value = guiInfo.Volume;
                     renderwidget(gui->skin, get_drawground(hwnd), gui->skin->widgets[i],
-                                 guiIntfStruct.Volume == 0.0f ? 0 : 1);
+                                 guiInfo.Volume == 0.0f ? 0 : 1);
             }
         }
     }
@@ -453,7 +453,7 @@
                 for(i=0; i<filecount; i++)
                 {
                     DragQueryFile((HDROP) wParam, i, file, MAX_PATH);
-                    mplSetFileName(NULL, file, STREAMTYPE_FILE);
+                    uiSetFileName(NULL, file, STREAMTYPE_FILE);
                     if(!parse_filename(file, playtree, mconfig, 1))
                         gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0);
                 }
@@ -487,7 +487,7 @@
             point.x = GET_X_LPARAM(lParam);
             point.y = GET_Y_LPARAM(lParam);
             ClientToScreen(hWnd, &point);
-            if(guiIntfStruct.StreamType == STREAMTYPE_DVD)
+            if(guiInfo.StreamType == STREAMTYPE_DVD)
                 EnableMenuItem(gui->dvdmenu, ID_CHAPTERSEL, MF_BYCOMMAND | MF_ENABLED);
             TrackPopupMenu(gui->submenu, 0, point.x, point.y, 0, hWnd, NULL);
             return 0;
@@ -609,7 +609,7 @@
             GetClientRect(hWnd, &rect);
             width = rect.right - rect.left;
             height = rect.bottom - rect.top;
-            if(guiIntfStruct.Playing == 0)
+            if(guiInfo.Playing == 0)
             {
                 int i;
                 window *desc = NULL;
@@ -725,7 +725,7 @@
             {
                 PCOPYDATASTRUCT cdData;
                 cdData = (PCOPYDATASTRUCT) lParam;
-                mplSetFileName(NULL, cdData->lpData, STREAMTYPE_FILE);
+                uiSetFileName(NULL, cdData->lpData, STREAMTYPE_FILE);
                 if(!parse_filename(cdData->lpData, playtree, mconfig, 1))
                     gui->playlist->add_track(gui->playlist, cdData->lpData, NULL, NULL, 0);
                 gui->startplay(gui);
@@ -742,7 +742,7 @@
                 for(i=0; i<filecount; i++)
                 {
                     DragQueryFile((HDROP) wParam, i, file, MAX_PATH);
-                    mplSetFileName(NULL, file, STREAMTYPE_FILE);
+                    uiSetFileName(NULL, file, STREAMTYPE_FILE);
                     if(!parse_filename(file, playtree, mconfig, 1))
                         gui->playlist->add_track(gui->playlist, file, NULL, NULL, 0);
                 }
@@ -889,15 +889,15 @@
                             item->value = 0.0f;
 
                         if(item->msg == evSetVolume)
-                            guiIntfStruct.Volume = (float) item->value;
+                            guiInfo.Volume = (float) item->value;
                         else if(item->msg == evSetMoviePosition)
-                            guiIntfStruct.Position = (float) item->value;
+                            guiInfo.Position = (float) item->value;
                         else if(item->msg == evSetBalance)
                         {
                             /* make the range for 50% a bit bigger, because the sliders for balance usually suck */
                             if((item->value - 50.0f < 1.5f) && (item->value - 50.0f > -1.5f))
                                 item->value = 50.0f;
-                            guiIntfStruct.Balance = (float) item->value;
+                            guiInfo.Balance = (float) item->value;
                         }
                         updatedisplay(gui, hWnd);
                         handlemsg(hWnd, item->msg);
--- a/gui/win32/interface.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/win32/interface.c	Sat Jun 18 14:33:41 2011 +0000
@@ -61,7 +61,7 @@
 
 char *skinName = NULL;
 char *codecname = NULL;
-int mplGotoTheNext = 1;
+int uiGotoTheNext = 1;
 static gui_t *mygui = NULL;
 static int update_subwindow(void);
 static RECT old_rect;
@@ -146,29 +146,29 @@
 /* this function gets called by the gui to update mplayer */
 static void guiSetEvent(int event)
 {
-    if(guiIntfStruct.mpcontext)
-        mixer = mpctx_get_mixer(guiIntfStruct.mpcontext);
+    if(guiInfo.mpcontext)
+        mixer = mpctx_get_mixer(guiInfo.mpcontext);
 
     switch(event)
     {
         case evPlay:
         case evPlaySwitchToPause:
         case evPauseSwitchToPlay:
-            mplPlay();
+            uiPlay();
             break;
         case evPause:
-            mplPause();
+            uiPause();
             break;
 #ifdef CONFIG_DVDREAD
         case evPlayDVD:
         {
             static char dvdname[MAX_PATH];
-            guiIntfStruct.DVD.current_title = dvd_title;
-            guiIntfStruct.DVD.current_chapter = dvd_chapter;
-            guiIntfStruct.DVD.current_angle = dvd_angle;
-            guiIntfStruct.DiskChanged = 1;
+            guiInfo.DVD.current_title = dvd_title;
+            guiInfo.DVD.current_chapter = dvd_chapter;
+            guiInfo.DVD.current_angle = dvd_angle;
+            guiInfo.DiskChanged = 1;
 
-            mplSetFileName(NULL, dvd_device, STREAMTYPE_DVD);
+            uiSetFileName(NULL, dvd_device, STREAMTYPE_DVD);
             dvdname[0] = 0;
             strcat(dvdname, "DVD Movie");
             GetVolumeInformation(dvd_device, dvdname, MAX_PATH, NULL, NULL, NULL, NULL, 0);
@@ -217,12 +217,12 @@
             break;
         }
         case evStop:
-            if(guiIntfStruct.Playing)
+            if(guiInfo.Playing)
                 guiGetEvent(guiCEvent, (void *) guiSetStop);
             break;
         case evSetMoviePosition:
         {
-            rel_seek_secs = guiIntfStruct.Position / 100.0f;
+            rel_seek_secs = guiInfo.Position / 100.0f;
             abs_seek_pos = 3;
             break;
         }
@@ -243,17 +243,17 @@
         {
             float l,r;
 
-            if (guiIntfStruct.Playing == 0)
+            if (guiInfo.Playing == 0)
                 break;
 
-            if (guiIntfStruct.Balance == 50.0f)
-                mixer_setvolume(mixer, guiIntfStruct.Volume, guiIntfStruct.Volume);
+            if (guiInfo.Balance == 50.0f)
+                mixer_setvolume(mixer, guiInfo.Volume, guiInfo.Volume);
 
-            l = guiIntfStruct.Volume * ((100.0f - guiIntfStruct.Balance) / 50.0f);
-            r = guiIntfStruct.Volume * ((guiIntfStruct.Balance) / 50.0f);
+            l = guiInfo.Volume * ((100.0f - guiInfo.Balance) / 50.0f);
+            r = guiInfo.Volume * ((guiInfo.Balance) / 50.0f);
 
-            if (l > guiIntfStruct.Volume) l=guiIntfStruct.Volume;
-            if (r > guiIntfStruct.Volume) r=guiIntfStruct.Volume;
+            if (l > guiInfo.Volume) l=guiInfo.Volume;
+            if (r > guiInfo.Volume) r=guiInfo.Volume;
             mixer_setvolume(mixer, l, r);
             /* Check for balance support on mixer - there is a better way ?? */
             if (r != l)
@@ -262,8 +262,8 @@
                 if (r == l)
                 {
                     mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Mixer doesn't support balanced audio\n");
-                    mixer_setvolume(mixer, guiIntfStruct.Volume, guiIntfStruct.Volume);
-                    guiIntfStruct.Balance = 50.0f;
+                    mixer_setvolume(mixer, guiInfo.Volume, guiInfo.Volume);
+                    guiInfo.Balance = 50.0f;
                 }
             }
             break;
@@ -279,24 +279,24 @@
         case evDropFile:
         case evLoadPlay:
         {
-            switch(guiIntfStruct.StreamType)
+            switch(guiInfo.StreamType)
             {
 #ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
                 {
-                    guiIntfStruct.Title = guiIntfStruct.DVD.current_title;
-                    guiIntfStruct.Chapter = guiIntfStruct.DVD.current_chapter;
-                    guiIntfStruct.Angle = guiIntfStruct.DVD.current_angle;
-                    guiIntfStruct.DiskChanged = 1;
+                    guiInfo.Title = guiInfo.DVD.current_title;
+                    guiInfo.Chapter = guiInfo.DVD.current_chapter;
+                    guiInfo.Angle = guiInfo.DVD.current_angle;
+                    guiInfo.DiskChanged = 1;
                     guiGetEvent(guiCEvent, (void *) guiSetPlay);
                     break;
                 }
 #endif
                 default:
                 {
-                    guiIntfStruct.FilenameChanged = guiIntfStruct.NewPlay = 1;
+                    guiInfo.FilenameChanged = guiInfo.NewPlay = 1;
                     update_playlistwindow();
-                    mplGotoTheNext = guiIntfStruct.Playing? 0 : 1;
+                    uiGotoTheNext = guiInfo.Playing? 0 : 1;
                     guiGetEvent(guiCEvent, (void *) guiSetStop);
                     guiGetEvent(guiCEvent, (void *) guiSetPlay);
                     break;
@@ -305,118 +305,118 @@
            break;
         }
         case evNext:
-            mplNext();
+            uiNext();
             break;
         case evPrev:
-            mplPrev();
+            uiPrev();
             break;
     }
 }
 
-void mplPlay( void )
+void uiPlay( void )
 {
-   if((!guiIntfStruct.Filename ) || (guiIntfStruct.Filename[0] == 0))
+   if((!guiInfo.Filename ) || (guiInfo.Filename[0] == 0))
      return;
 
-   if(guiIntfStruct.Playing > 0)
+   if(guiInfo.Playing > 0)
    {
-       mplPause();
+       uiPause();
        return;
    }
-   guiIntfStruct.NewPlay = 1;
+   guiInfo.NewPlay = 1;
    guiGetEvent(guiCEvent, (void *) guiSetPlay);
 }
 
-void mplPause( void )
+void uiPause( void )
 {
-   if(!guiIntfStruct.Playing) return;
+   if(!guiInfo.Playing) return;
 
-   if(guiIntfStruct.Playing == 1)
+   if(guiInfo.Playing == 1)
    {
        mp_cmd_t * cmd = calloc(1, sizeof(*cmd));
        cmd->id=MP_CMD_PAUSE;
        cmd->name=strdup("pause");
        mp_input_queue_cmd(cmd);
-   } else guiIntfStruct.Playing = 1;
+   } else guiInfo.Playing = 1;
 }
 
-void mplNext(void)
+void uiNext(void)
 {
-    if(guiIntfStruct.Playing == 2) return;
-    switch(guiIntfStruct.StreamType)
+    if(guiInfo.Playing == 2) return;
+    switch(guiInfo.StreamType)
     {
 #ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
-            if(guiIntfStruct.DVD.current_chapter == (guiIntfStruct.DVD.chapters - 1))
+            if(guiInfo.DVD.current_chapter == (guiInfo.DVD.chapters - 1))
                 return;
-            guiIntfStruct.DVD.current_chapter++;
+            guiInfo.DVD.current_chapter++;
             break;
 #endif
         default:
             if(mygui->playlist->current == (mygui->playlist->trackcount - 1))
                 return;
-            mplSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename,
+            uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename,
                            STREAMTYPE_STREAM);
             break;
     }
     mygui->startplay(mygui);
 }
 
-void mplPrev(void)
+void uiPrev(void)
 {
-    if(guiIntfStruct.Playing == 2) return;
-    switch(guiIntfStruct.StreamType)
+    if(guiInfo.Playing == 2) return;
+    switch(guiInfo.StreamType)
     {
 #ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
-            if(guiIntfStruct.DVD.current_chapter == 1)
+            if(guiInfo.DVD.current_chapter == 1)
                 return;
-            guiIntfStruct.DVD.current_chapter--;
+            guiInfo.DVD.current_chapter--;
             break;
 #endif
         default:
             if(mygui->playlist->current == 0)
                 return;
-            mplSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)--]->filename,
+            uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)--]->filename,
                            STREAMTYPE_STREAM);
             break;
     }
     mygui->startplay(mygui);
 }
 
-void mplEnd( void )
+void uiEnd( void )
 {
-    if(!mplGotoTheNext && guiIntfStruct.Playing)
+    if(!uiGotoTheNext && guiInfo.Playing)
     {
-        mplGotoTheNext = 1;
+        uiGotoTheNext = 1;
         return;
     }
 
-    if(mplGotoTheNext && guiIntfStruct.Playing &&
+    if(uiGotoTheNext && guiInfo.Playing &&
       (mygui->playlist->current < (mygui->playlist->trackcount - 1)) &&
-      guiIntfStruct.StreamType != STREAMTYPE_DVD &&
-      guiIntfStruct.StreamType != STREAMTYPE_DVDNAV)
+      guiInfo.StreamType != STREAMTYPE_DVD &&
+      guiInfo.StreamType != STREAMTYPE_DVDNAV)
     {
         /* we've finished this file, reset the aspect */
         if(movie_aspect >= 0)
             movie_aspect = -1;
 
-        mplGotoTheNext = guiIntfStruct.FilenameChanged = guiIntfStruct.NewPlay = 1;
-        mplSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_STREAM);
-        //sprintf(guiIntfStruct.Filename, mygui->playlist->tracks[(mygui->playlist->current)++]->filename);
+        uiGotoTheNext = guiInfo.FilenameChanged = guiInfo.NewPlay = 1;
+        uiSetFileName(NULL, mygui->playlist->tracks[(mygui->playlist->current)++]->filename, STREAMTYPE_STREAM);
+        //sprintf(guiInfo.Filename, mygui->playlist->tracks[(mygui->playlist->current)++]->filename);
     }
 
-    if(guiIntfStruct.FilenameChanged && guiIntfStruct.NewPlay)
+    if(guiInfo.FilenameChanged && guiInfo.NewPlay)
         return;
 
-    guiIntfStruct.TimeSec = 0;
-    guiIntfStruct.Position = 0;
-    guiIntfStruct.AudioType = 0;
+    guiInfo.TimeSec = 0;
+    guiInfo.Position = 0;
+    guiInfo.AudioType = 0;
 
 #ifdef CONFIG_DVDREAD
-    guiIntfStruct.DVD.current_title = 1;
-    guiIntfStruct.DVD.current_chapter = 1;
-    guiIntfStruct.DVD.current_angle = 1;
+    guiInfo.DVD.current_title = 1;
+    guiInfo.DVD.current_chapter = 1;
+    guiInfo.DVD.current_angle = 1;
 #endif
 
     if (mygui->playlist->current == (mygui->playlist->trackcount - 1))
@@ -431,24 +431,24 @@
     guiGetEvent(guiCEvent, (void *) guiSetStop);
 }
 
-void mplSetFileName(char *dir, char *name, int type)
+void uiSetFileName(char *dir, char *name, int type)
 {
     if(!name) return;
     if(!dir)
-        guiSetFilename(guiIntfStruct.Filename, name)
+        guiSetFilename(guiInfo.Filename, name)
     else
-        guiSetDF(guiIntfStruct.Filename, dir, name);
+        guiSetDF(guiInfo.Filename, dir, name);
 
-    guiIntfStruct.StreamType = type;
-    free(guiIntfStruct.AudioFile);
-    guiIntfStruct.AudioFile = NULL;
-    free(guiIntfStruct.Subtitlename);
-    guiIntfStruct.Subtitlename = NULL;
+    guiInfo.StreamType = type;
+    free(guiInfo.AudioFile);
+    guiInfo.AudioFile = NULL;
+    free(guiInfo.Subtitlename);
+    guiInfo.Subtitlename = NULL;
 }
 
-void mplFullScreen( void )
+void uiFullScreen( void )
 {
-    if(!guiIntfStruct.sh_video) return;
+    if(!guiInfo.sh_video) return;
 
     if(sub_window)
     {
@@ -496,7 +496,7 @@
 
 void guiInit(void)
 {
-    memset(&guiIntfStruct, 0, sizeof(guiIntfStruct));
+    memset(&guiInfo, 0, sizeof(guiInfo));
     /* Create The gui thread */
     if (!mygui)
     {
@@ -536,26 +536,26 @@
 #endif
     if(!mygui || !mygui->skin) return 0;
 
-    if(guiIntfStruct.mpcontext)
+    if(guiInfo.mpcontext)
     {
-        audio_out = mpctx_get_audio_out(guiIntfStruct.mpcontext);
-        video_out = mpctx_get_video_out(guiIntfStruct.mpcontext);
-        mixer = mpctx_get_mixer(guiIntfStruct.mpcontext);
-        playtree = mpctx_get_playtree_iter(guiIntfStruct.mpcontext);
+        audio_out = mpctx_get_audio_out(guiInfo.mpcontext);
+        video_out = mpctx_get_video_out(guiInfo.mpcontext);
+        mixer = mpctx_get_mixer(guiInfo.mpcontext);
+        playtree = mpctx_get_playtree_iter(guiInfo.mpcontext);
     }
 
     switch (type)
     {
         case guiSetFileFormat:
-            guiIntfStruct.FileFormat = (int) arg;
+            guiInfo.FileFormat = (int) arg;
             break;
         case guiSetParameters:
         {
             guiGetEvent(guiSetDefaults, NULL);
-            guiIntfStruct.DiskChanged = 0;
-            guiIntfStruct.FilenameChanged = 0;
-            guiIntfStruct.NewPlay = 0;
-            switch(guiIntfStruct.StreamType)
+            guiInfo.DiskChanged = 0;
+            guiInfo.FilenameChanged = 0;
+            guiInfo.NewPlay = 0;
+            switch(guiInfo.StreamType)
             {
                 case STREAMTYPE_PLAYLIST:
                     break;
@@ -563,42 +563,42 @@
                 case STREAMTYPE_DVD:
                 {
                     char tmp[512];
-                    dvd_title = guiIntfStruct.DVD.current_title;
-                    dvd_chapter = guiIntfStruct.DVD.current_chapter;
-                    dvd_angle = guiIntfStruct.DVD.current_angle;
-                    sprintf(tmp,"dvd://%d", guiIntfStruct.Title);
-                    guiSetFilename(guiIntfStruct.Filename, tmp);
+                    dvd_title = guiInfo.DVD.current_title;
+                    dvd_chapter = guiInfo.DVD.current_chapter;
+                    dvd_angle = guiInfo.DVD.current_angle;
+                    sprintf(tmp,"dvd://%d", guiInfo.Title);
+                    guiSetFilename(guiInfo.Filename, tmp);
                     break;
                 }
 #endif
             }
-            if(guiIntfStruct.Filename)
-                filename = strdup(guiIntfStruct.Filename);
+            if(guiInfo.Filename)
+                filename = strdup(guiInfo.Filename);
             else if(filename)
-                strcpy(guiIntfStruct.Filename, filename);
+                strcpy(guiInfo.Filename, filename);
             break;
         }
         case guiSetAudioOnly:
         {
-            guiIntfStruct.AudioOnly = (int) arg;
+            guiInfo.AudioOnly = (int) arg;
             if(IsWindowVisible(mygui->subwindow))
                 ShowWindow(mygui->subwindow, SW_HIDE);
             break;
         }
         case guiSetContext:
-            guiIntfStruct.mpcontext = arg;
+            guiInfo.mpcontext = arg;
             break;
         case guiSetDemuxer:
-            guiIntfStruct.demuxer = arg;
+            guiInfo.demuxer = arg;
             break;
         case guiSetValues:
         {
-            guiIntfStruct.sh_video = arg;
+            guiInfo.sh_video = arg;
             if (arg)
             {
                 sh_video_t *sh = arg;
                 codecname = sh->codec->name;
-                guiIntfStruct.FPS = sh->fps;
+                guiInfo.FPS = sh->fps;
 
                 /* we have video, show the subwindow */
                 if(!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow))
@@ -611,17 +611,17 @@
         }
         case guiSetShVideo:
         {
-            guiIntfStruct.MovieWidth = vo_dwidth;
-            guiIntfStruct.MovieHeight = vo_dheight;
+            guiInfo.MovieWidth = vo_dwidth;
+            guiInfo.MovieHeight = vo_dheight;
 
-            sub_aspect = (float)guiIntfStruct.MovieWidth/guiIntfStruct.MovieHeight;
+            sub_aspect = (float)guiInfo.MovieWidth/guiInfo.MovieHeight;
             if(WinID != -1)
                update_subwindow();
             break;
         }
         case guiSetStream:
         {
-            guiIntfStruct.StreamType = stream->type;
+            guiInfo.StreamType = stream->type;
             switch(stream->type)
             {
 #ifdef CONFIG_DVDREAD
@@ -635,17 +635,17 @@
 #ifdef CONFIG_DVDREAD
         case guiSetDVD:
         {
-            guiIntfStruct.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts;
-            guiIntfStruct.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
-            guiIntfStruct.DVD.angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
-            guiIntfStruct.DVD.nr_of_audio_channels = dvdp->nr_of_channels;
-            memcpy(guiIntfStruct.DVD.audio_streams, dvdp->audio_streams, sizeof(dvdp->audio_streams));
-            guiIntfStruct.DVD.nr_of_subtitles = dvdp->nr_of_subtitles;
-            memcpy(guiIntfStruct.DVD.subtitles, dvdp->subtitles, sizeof(dvdp->subtitles));
-            guiIntfStruct.DVD.current_title = dvd_title + 1;
-            guiIntfStruct.DVD.current_chapter = dvd_chapter + 1;
-            guiIntfStruct.DVD.current_angle = dvd_angle + 1;
-            guiIntfStruct.Track = dvd_title + 1;
+            guiInfo.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts;
+            guiInfo.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
+            guiInfo.DVD.angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
+            guiInfo.DVD.nr_of_audio_channels = dvdp->nr_of_channels;
+            memcpy(guiInfo.DVD.audio_streams, dvdp->audio_streams, sizeof(dvdp->audio_streams));
+            guiInfo.DVD.nr_of_subtitles = dvdp->nr_of_subtitles;
+            memcpy(guiInfo.DVD.subtitles, dvdp->subtitles, sizeof(dvdp->subtitles));
+            guiInfo.DVD.current_title = dvd_title + 1;
+            guiInfo.DVD.current_chapter = dvd_chapter + 1;
+            guiInfo.DVD.current_angle = dvd_angle + 1;
+            guiInfo.Track = dvd_title + 1;
             break;
         }
 #endif
@@ -653,28 +653,28 @@
             mygui->updatedisplay(mygui, mygui->mainwindow);
             break;
         case guiSetAfilter:
-            guiIntfStruct.afilter = arg;
+            guiInfo.afilter = arg;
             break;
         case guiCEvent:
         {
-            guiIntfStruct.Playing = (int) arg;
-            switch (guiIntfStruct.Playing)
+            guiInfo.Playing = (int) arg;
+            switch (guiInfo.Playing)
             {
                 case guiSetPlay:
                 {
-                    guiIntfStruct.Playing = 1;
+                    guiInfo.Playing = 1;
                     break;
                 }
                 case guiSetStop:
                 {
-                    guiIntfStruct.Playing = 0;
+                    guiInfo.Playing = 0;
                     if(movie_aspect >= 0)
                         movie_aspect = -1;
                     update_subwindow();
                     break;
                 }
                 case guiSetPause:
-                    guiIntfStruct.Playing = 2;
+                    guiInfo.Playing = 2;
                     break;
             }
             break;
@@ -686,7 +686,7 @@
             switch((int) arg)
             {
                 case MP_CMD_VO_FULLSCREEN:
-                    mplFullScreen();
+                    uiFullScreen();
                     break;
                 case MP_CMD_QUIT:
                 {
@@ -702,7 +702,7 @@
             break;
         }
         case guiSetFileName:
-            if (arg) guiIntfStruct.Filename = arg;
+            if (arg) guiInfo.Filename = arg;
             break;
         case guiSetDefaults:
         {
@@ -715,8 +715,8 @@
             dvd_title = 0;
             force_fps = 0;
             if(!mygui->playlist->tracks) return 0;
-            filename = guiIntfStruct.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename;
-            guiIntfStruct.Track = mygui->playlist->current + 1;
+            filename = guiInfo.Filename = mygui->playlist->tracks[mygui->playlist->current]->filename;
+            guiInfo.Track = mygui->playlist->current + 1;
             if(gtkAONorm) greplace(&af_cfg.list, "volnorm", "volnorm");
             if(gtkAOExtraStereo)
             {
@@ -738,11 +738,11 @@
                 /* FIXME this algo is not correct */
                 float l, r;
                 mixer_getvolume(mixer, &l, &r);
-                guiIntfStruct.Volume = (r > l ? r : l); /* max(r,l) */
+                guiInfo.Volume = (r > l ? r : l); /* max(r,l) */
                 if (r != l)
-                    guiIntfStruct.Balance = ((r-l) + 100.0f) * 0.5f;
+                    guiInfo.Balance = ((r-l) + 100.0f) * 0.5f;
                 else
-                    guiIntfStruct.Balance = 50.0f;
+                    guiInfo.Balance = 50.0f;
             }
             break;
         }
@@ -800,7 +800,7 @@
                 result = 1;
         }
     }
-    mplGotoTheNext = 1;
+    uiGotoTheNext = 1;
 
     if (result)
     {
@@ -862,18 +862,18 @@
     {
         WinID = -1; // so far only directx supports WinID in windows
 
-        if(IsWindowVisible(mygui->subwindow) && guiIntfStruct.sh_video && guiIntfStruct.Playing)
+        if(IsWindowVisible(mygui->subwindow) && guiInfo.sh_video && guiInfo.Playing)
         {
             ShowWindow(mygui->subwindow, SW_HIDE);
             return 0;
         }
-        else if(guiIntfStruct.AudioOnly)
+        else if(guiInfo.AudioOnly)
             return 0;
         else ShowWindow(mygui->subwindow, SW_SHOW);
     }
 
     /* we've come out of fullscreen at the end of file */
-    if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && !guiIntfStruct.AudioOnly)
+    if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && !guiInfo.AudioOnly)
         ShowWindow(mygui->subwindow, SW_SHOWNORMAL);
 
     /* get our current window coordinates */
@@ -886,7 +886,7 @@
     if(x <= 0) x = old_rect.left;
     if(y <= 0) y = old_rect.top;
 
-    if(!guiIntfStruct.Playing)
+    if(!guiInfo.Playing)
     {
         window *desc = NULL;
         int i;
@@ -901,8 +901,8 @@
     }
     else
     {
-        rd.right = rd.left+guiIntfStruct.MovieWidth;
-        rd.bottom = rd.top+guiIntfStruct.MovieHeight;
+        rd.right = rd.left+guiInfo.MovieWidth;
+        rd.bottom = rd.top+guiInfo.MovieHeight;
 
         if (movie_aspect > 0.0)       // forced aspect from the cmdline
             sub_aspect = movie_aspect;
@@ -920,7 +920,7 @@
     wp.flags = SWP_NOOWNERZORDER | SWP_SHOWWINDOW;
 
     /* erase the bitmap image if there's video */
-    if(guiIntfStruct.Playing != 0 && guiIntfStruct.sh_video)
+    if(guiInfo.Playing != 0 && guiInfo.sh_video)
         SendMessage(mygui->subwindow, WM_ERASEBKGND, (WPARAM)GetDC(mygui->subwindow), 0);
 
     /* reset the window aspect */
--- a/gui/win32/preferences.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/win32/preferences.c	Sat Jun 18 14:33:41 2011 +0000
@@ -407,7 +407,7 @@
             if(gtkAOExtraStereo)
             {
                 SendDlgItemMessage(hwnd, ID_EXTRASTEREO, BM_SETCHECK, 1, 0);
-                if(!guiIntfStruct.Playing)
+                if(!guiInfo.Playing)
                 {
                     EnableWindow(track1, 1);
                     EnableWindow(track2, 1);
@@ -558,7 +558,7 @@
                 case ID_APPLY:
                 {
                     int strl;
-                    if(guiIntfStruct.Playing) guiGetEvent(guiCEvent, (void *)guiSetStop);
+                    if(guiInfo.Playing) guiGetEvent(guiCEvent, (void *)guiSetStop);
 
                     /* Set the video driver */
                     free(video_driver_list[0]);
--- a/gui/win32/skinload.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/win32/skinload.c	Sat Jun 18 14:33:41 2011 +0000
@@ -107,7 +107,7 @@
 static image *pngRead(skin_t *skin, unsigned char *fname)
 {
     int i;
-    txSample bmp;
+    guiImage bmp;
     image *bf;
     char *filename = NULL;
     FILE *fp;
--- a/gui/win32/widgetrender.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/gui/win32/widgetrender.c	Sat Jun 18 14:33:41 2011 +0000
@@ -126,55 +126,55 @@
     }
     strcpy(text, item->label);
     if(item->type == tySlabel) return text;
-    stringreplace(text, "$1", "%.2i:%.2i:%.2i", guiIntfStruct.TimeSec / 3600,
-                 (guiIntfStruct.TimeSec / 60) % 60, guiIntfStruct.TimeSec % 60);
-    stringreplace(text, "$2", "%.4i:%.2i", guiIntfStruct.TimeSec / 60, guiIntfStruct.TimeSec % 60);
-    stringreplace(text, "$3", "%.2i", guiIntfStruct.TimeSec / 3600);
-    stringreplace(text, "$4", "%.2i", (guiIntfStruct.TimeSec / 60) % 60);
-    stringreplace(text, "$5", "%.2i", guiIntfStruct.TimeSec % 60);
-    stringreplace(text, "$6", "%.2i:%.2i:%.2i", guiIntfStruct.LengthInSec / 3600,
-                 (guiIntfStruct.LengthInSec / 60) % 60, guiIntfStruct.LengthInSec % 60);
-    stringreplace(text, "$7", "%.4i:%.2i", guiIntfStruct.LengthInSec / 60, guiIntfStruct.LengthInSec % 60);
-    stringreplace(text, "$8", "%i:%.2i:%.2i", guiIntfStruct.TimeSec / 3600,
-                 (guiIntfStruct.TimeSec / 60) % 60, guiIntfStruct.TimeSec % 60);
-    stringreplace(text, "$v", "%3.2f", guiIntfStruct.Volume);
-    stringreplace(text, "$V", "%3.1f", guiIntfStruct.Volume);
-    stringreplace(text, "$b", "%3.2f", guiIntfStruct.Balance);
-    stringreplace(text, "$B", "%3.1f", guiIntfStruct.Balance);
-    stringreplace(text, "$t", "%.2i", guiIntfStruct.Track);
-    stringreplace(text, "$o", "%s", guiIntfStruct.Filename);
-    stringreplace(text, "$x", "%i", guiIntfStruct.MovieWidth);
-    stringreplace(text, "$y", "%i", guiIntfStruct.MovieHeight);
-    stringreplace(text, "$C", "%s", guiIntfStruct.sh_video ? codecname : "");
+    stringreplace(text, "$1", "%.2i:%.2i:%.2i", guiInfo.TimeSec / 3600,
+                 (guiInfo.TimeSec / 60) % 60, guiInfo.TimeSec % 60);
+    stringreplace(text, "$2", "%.4i:%.2i", guiInfo.TimeSec / 60, guiInfo.TimeSec % 60);
+    stringreplace(text, "$3", "%.2i", guiInfo.TimeSec / 3600);
+    stringreplace(text, "$4", "%.2i", (guiInfo.TimeSec / 60) % 60);
+    stringreplace(text, "$5", "%.2i", guiInfo.TimeSec % 60);
+    stringreplace(text, "$6", "%.2i:%.2i:%.2i", guiInfo.LengthInSec / 3600,
+                 (guiInfo.LengthInSec / 60) % 60, guiInfo.LengthInSec % 60);
+    stringreplace(text, "$7", "%.4i:%.2i", guiInfo.LengthInSec / 60, guiInfo.LengthInSec % 60);
+    stringreplace(text, "$8", "%i:%.2i:%.2i", guiInfo.TimeSec / 3600,
+                 (guiInfo.TimeSec / 60) % 60, guiInfo.TimeSec % 60);
+    stringreplace(text, "$v", "%3.2f", guiInfo.Volume);
+    stringreplace(text, "$V", "%3.1f", guiInfo.Volume);
+    stringreplace(text, "$b", "%3.2f", guiInfo.Balance);
+    stringreplace(text, "$B", "%3.1f", guiInfo.Balance);
+    stringreplace(text, "$t", "%.2i", guiInfo.Track);
+    stringreplace(text, "$o", "%s", guiInfo.Filename);
+    stringreplace(text, "$x", "%i", guiInfo.MovieWidth);
+    stringreplace(text, "$y", "%i", guiInfo.MovieHeight);
+    stringreplace(text, "$C", "%s", guiInfo.sh_video ? codecname : "");
     stringreplace(text, "$$", "$");
 
     if(!strcmp(text, "$p") || !strcmp(text, "$s") || !strcmp(text, "$e"))
     {
-        if(guiIntfStruct.Playing == 0) stringreplace(text, NULL, "s");
-        else if(guiIntfStruct.Playing == 1) stringreplace(text, NULL, "p");
-        else if(guiIntfStruct.Playing == 2) stringreplace(text, NULL, "e");
+        if(guiInfo.Playing == 0) stringreplace(text, NULL, "s");
+        else if(guiInfo.Playing == 1) stringreplace(text, NULL, "p");
+        else if(guiInfo.Playing == 2) stringreplace(text, NULL, "e");
     }
 
-    if(guiIntfStruct.AudioType == 0) stringreplace(text, "$a", "n");
-    else if(guiIntfStruct.AudioType == 1) stringreplace(text, "$a", "m");
+    if(guiInfo.AudioType == 0) stringreplace(text, "$a", "n");
+    else if(guiInfo.AudioType == 1) stringreplace(text, "$a", "m");
     else stringreplace(text, "$a", "t");
 
-    if(guiIntfStruct.StreamType == 0)
+    if(guiInfo.StreamType == 0)
         stringreplace(text, "$T", "f");
 #ifdef CONFIG_DVDREAD
-    else if(guiIntfStruct.StreamType == STREAMTYPE_DVD || guiIntfStruct.StreamType == STREAMTYPE_DVDNAV)
+    else if(guiInfo.StreamType == STREAMTYPE_DVD || guiInfo.StreamType == STREAMTYPE_DVDNAV)
         stringreplace(text, "$T", "d");
 #endif
     else stringreplace(text, "$T", "u");
 
-    if(guiIntfStruct.Filename)
+    if(guiInfo.Filename)
     {
-        for (i=0; i<strlen(guiIntfStruct.Filename); i++)
-            tmp[i] = tolower(guiIntfStruct.Filename[i]);
+        for (i=0; i<strlen(guiInfo.Filename); i++)
+            tmp[i] = tolower(guiInfo.Filename[i]);
         stringreplace(text, "$f", tmp);
 
-        for (i=0; i<strlen(guiIntfStruct.Filename); i++)
-            tmp[i] = toupper(guiIntfStruct.Filename[i]);
+        for (i=0; i<strlen(guiInfo.Filename); i++)
+            tmp[i] = toupper(guiInfo.Filename[i]);
         stringreplace(text, "$F", tmp);
     }
 
--- a/mplayer.c	Sat Jun 18 10:33:30 2011 +0000
+++ b/mplayer.c	Sat Jun 18 14:33:41 2011 +0000
@@ -2605,7 +2605,7 @@
         if (use_gui) {
             guiEventHandling();
             guiGetEvent(guiReDraw, NULL);
-            if (guiIntfStruct.Playing != 2 || (rel_seek_secs || abs_seek_pos))
+            if (guiInfo.Playing != 2 || (rel_seek_secs || abs_seek_pos))
                 break;
         }
 #endif
@@ -2648,7 +2648,7 @@
     (void)GetRelativeTime(); // ignore time that passed during pause
 #ifdef CONFIG_GUI
     if (use_gui) {
-        if (guiIntfStruct.Playing == guiSetStop)
+        if (guiInfo.Playing == guiSetStop)
             mpctx->eof = 1;
         else
             guiGetEvent(guiCEvent, (char *)guiSetPlay);
@@ -3138,7 +3138,7 @@
     if (use_gui) {
         mpctx->file_format = DEMUXER_TYPE_UNKNOWN;
         guiGetEvent(guiSetDefaults, 0);
-        while (guiIntfStruct.Playing != 1) {
+        while (guiInfo.Playing != 1) {
             mp_cmd_t *cmd;
             usec_sleep(20000);
             guiEventHandling();
@@ -3149,9 +3149,9 @@
             }
         }
         guiGetEvent(guiSetParameters, NULL);
-        if (guiIntfStruct.StreamType == STREAMTYPE_STREAM) {
+        if (guiInfo.StreamType == STREAMTYPE_STREAM) {
             play_tree_t *entry = play_tree_new();
-            play_tree_add_file(entry, guiIntfStruct.Filename);
+            play_tree_add_file(entry, guiInfo.Filename);
             if (mpctx->playtree)
                 play_tree_free_list(mpctx->playtree->child, 1);
             else
@@ -3725,9 +3725,9 @@
 #ifdef CONFIG_GUI
         if (use_gui) {
             if (mpctx->sh_audio)
-                guiIntfStruct.AudioType = mpctx->sh_audio->channels;
+                guiInfo.AudioType = mpctx->sh_audio->channels;
             else
-                guiIntfStruct.AudioType = 0;
+                guiInfo.AudioType = 0;
             if (!mpctx->sh_video && mpctx->sh_audio)
                 guiGetEvent(guiSetAudioOnly, (char *)1);
             else
@@ -4042,27 +4042,27 @@
                 guiEventHandling();
                 if (mpctx->demuxer->file_format == DEMUXER_TYPE_AVI && mpctx->sh_video && mpctx->sh_video->video.dwLength > 2) {
                     // get pos from frame number / total frames
-                    guiIntfStruct.Position = (float)mpctx->d_video->pack_no * 100.0f / mpctx->sh_video->video.dwLength;
+                    guiInfo.Position = (float)mpctx->d_video->pack_no * 100.0f / mpctx->sh_video->video.dwLength;
                 } else {
-                    guiIntfStruct.Position = demuxer_get_percent_pos(mpctx->demuxer);
+                    guiInfo.Position = demuxer_get_percent_pos(mpctx->demuxer);
                 }
                 if (mpctx->sh_video)
-                    guiIntfStruct.TimeSec = mpctx->sh_video->pts;
+                    guiInfo.TimeSec = mpctx->sh_video->pts;
                 else if (mpctx->sh_audio)
-                    guiIntfStruct.TimeSec = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out);
-                guiIntfStruct.LengthInSec = demuxer_get_time_length(mpctx->demuxer);
+                    guiInfo.TimeSec = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out);
+                guiInfo.LengthInSec = demuxer_get_time_length(mpctx->demuxer);
                 guiGetEvent(guiReDraw, NULL);
                 guiGetEvent(guiSetVolume, NULL);
-                if (guiIntfStruct.Playing == 0)
+                if (guiInfo.Playing == 0)
                     break;                  // STOP
-                if (guiIntfStruct.Playing == 2)
+                if (guiInfo.Playing == 2)
                     mpctx->osd_function = OSD_PAUSE;
-                if (guiIntfStruct.DiskChanged || guiIntfStruct.NewPlay)
+                if (guiInfo.DiskChanged || guiInfo.NewPlay)
                     goto goto_next_file;
 #ifdef CONFIG_DVDREAD
                 if (mpctx->stream->type == STREAMTYPE_DVD) {
                     dvd_priv_t *dvdp = mpctx->stream->priv;
-                    guiIntfStruct.DVD.current_chapter = dvd_chapter_from_cell(dvdp, guiIntfStruct.DVD.current_title - 1, dvdp->cur_cell) + 1;
+                    guiInfo.DVD.current_chapter = dvd_chapter_from_cell(dvdp, guiInfo.DVD.current_title - 1, dvdp->cur_cell) + 1;
                 }
 #endif
             }
@@ -4157,15 +4157,15 @@
 #ifdef CONFIG_GUI
     if (use_gui && !mpctx->playtree_iter) {
 #ifdef CONFIG_DVDREAD
-        if (!guiIntfStruct.DiskChanged)
+        if (!guiInfo.DiskChanged)
 #endif
-        mplEnd();
+        uiEnd();
     }
 #endif
 
     if (
 #ifdef CONFIG_GUI
-        (use_gui && guiIntfStruct.Playing) ||
+        (use_gui && guiInfo.Playing) ||
 #endif
                                               mpctx->playtree_iter != NULL || player_idle_mode) {
         if (!mpctx->playtree_iter)