# HG changeset patch
# User ib
# Date 1330793115 0
# Node ID ac6b38cd0d459e102eda357b927cbd1c098dc036
# Parent f2c90c9dd61cb88cc23acd229be512244c436110
Rename sub window video window.
It was a bad idea to name the video window "sub window" at the time
the GUI was written. The term "sub window" does make sense from the
programmer's point of view, but it doesn't make any sense at all from
the user's point of view, because the sub window simply is the window
where the video will be displayed.
Moreover, since the term "sub" is generally short for "subtitles",
the renaming makes the code much easier to understand.
diff -r f2c90c9dd61c -r ac6b38cd0d45 DOCS/xml/de/skin.xml
--- a/DOCS/xml/de/skin.xml Sat Mar 03 14:03:18 2012 +0000
+++ b/DOCS/xml/de/skin.xml Sat Mar 03 16:45:15 2012 +0000
@@ -71,7 +71,7 @@
Zur Zeit sind vier Fenster zu dekorieren: das
Hauptfenster, das
- Unterfenster, die
+ Videofenster, die
Abspielleiste und das
Skin-Menü.
@@ -129,7 +129,7 @@
- Im Unterfenster erscheint das Video.
+ Im Videofenster erscheint das Video.
Es kann eine festgelegte Grafik anzeigen, wenn kein Film geladen
ist (es ist ziemlich langweilig, ein leeres Fenster vor sich zu haben :-))
Beachte: Transparenz ist hier
@@ -194,7 +194,7 @@
- Die Grafik, die im Unterfenster angezeigt werden soll (optional).
+ Die Grafik, die im Videofenster angezeigt werden soll (optional).
@@ -255,15 +255,15 @@
wobei Fenstername einer dieser Zeichenketten sein kann:
main - für das Hauptfenster
- sub - für das Unterfenster
+ video - für das Videofenster
playbar - für die Abspielleiste
menu - für das Skin-Menü
- (Die sub-, playbar- und menu-Blöcke sind optional - es ist nicht
- nötig, das Unterfenster zu dekorieren, eine Abspielleiste zu haben
+ (Die video-, playbar- und menu-Blöcke sind optional - es ist nicht
+ nötig, das Videofenster zu dekorieren, eine Abspielleiste zu haben
oder ein Menü zu erzeugen. Ein Standard-Menü steht immer über die
rechte Maustaste zur Verfügung.)
@@ -285,8 +285,8 @@
; ... Elemente für das Hauptfenster ...
end
-window = sub
-; ... Elemente für das Unterfenster ...
+window = video
+; ... Elemente für das Videofenster ...
end
window = menu
@@ -314,7 +314,7 @@
Zum Schluss einige Worte zur Positionierung.
- Hauptfenster und Unterfenster können in verschiedenen Ecken des Bilschirms
+ Hauptfenster und Videofenster können in verschiedenen Ecken des Bilschirms
über die X- und Y-Koordinaten
platziert werden. 0 ist oben oder links,
-1 bedeutet zentriert und -2 ist
@@ -748,10 +748,10 @@
- Unterfenster
+ Videofenster
Die folgenden Einträge können in diesem Block verwendet werden
- 'window = sub' . . . 'end'.
+ 'window = video' . . . 'end'.
diff -r f2c90c9dd61c -r ac6b38cd0d45 DOCS/xml/en/skin.xml
--- a/DOCS/xml/en/skin.xml Sat Mar 03 14:03:18 2012 +0000
+++ b/DOCS/xml/en/skin.xml Sat Mar 03 16:45:15 2012 +0000
@@ -20,7 +20,7 @@
Currently there are four windows to be decorated: the
main window, the
-subwindow, the
+video window, the
playbar, and the
skin menu.
@@ -73,7 +73,7 @@
- The subwindow is where the video appears. It
+ The video window is where the video appears. It
can display a specified image if there is no movie loaded (it is quite boring
to have an empty window :-)) Note:
transparency is not allowed here.
@@ -142,7 +142,7 @@
description files needed to draw labels).
- The image to be displayed in the subwindow (optional).
+ The image to be displayed in the video window (optional).
Two images for the skin menu (they are needed only if you want to create
@@ -206,7 +206,7 @@
main - for the main window
- sub - for the subwindow
+ video - for the video window
playbar - for the playbar
@@ -218,8 +218,8 @@
-(The sub, playbar and menu blocks are optional - you do not need to decorate
-the subwindow, have a playbar or create a menu. A default menu is always
+(The video, playbar and menu blocks are optional - you do not need to decorate
+the video window, have a playbar or create a menu. A default menu is always
available by a right mouse button click.)
@@ -240,8 +240,8 @@
; ... items for main window ...
end
- window = sub
- ; ... items for subwindow ...
+ window = video
+ ; ... items for video window ...
end
window = menu
@@ -266,7 +266,7 @@
-Finally some words about positioning. The main window and the subwindow can be
+Finally some words about positioning. The main window and the video window can be
placed in the different corners of the screen by giving X
and Y coordinates. 0 is top or left,
-1 is center and -2 is right or bottom, as
@@ -625,11 +625,11 @@
-Subwindow
+Video window
The following entries can be used in the
-'window = sub' . . . 'end' block.
+'window = video' . . . 'end' block.
diff -r f2c90c9dd61c -r ac6b38cd0d45 Makefile
--- a/Makefile Sat Mar 03 14:03:18 2012 +0000
+++ b/Makefile Sat Mar 03 16:45:15 2012 +0000
@@ -545,7 +545,7 @@
gui/ui/menu.c \
gui/ui/playbar.c \
gui/ui/render.c \
- gui/ui/sub.c \
+ gui/ui/video.c \
gui/ui/widgets.c \
gui/util/cut.c \
gui/wm/ws.c \
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/app.c
--- a/gui/app.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/app.c Sat Mar 03 16:45:15 2012 +0000
@@ -108,7 +108,7 @@
appClearItem(&guiApp.main);
guiApp.mainDecoration = 0;
- appClearItem(&guiApp.sub);
+ appClearItem(&guiApp.video);
appClearItem(&guiApp.playbar);
guiApp.playbarIsPresent = 0;
@@ -161,7 +161,7 @@
wItem *item;
int i, n;
- if (guiApp.subWindow.isFullScreen && guiApp.playbarIsPresent) {
+ if (guiApp.videoWindow.isFullScreen && guiApp.playbarIsPresent) {
item = guiApp.playbarItems;
n = guiApp.IndexOfPlaybarItems;
} else {
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/app.h
--- a/gui/app.h Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/app.h Sat Mar 03 16:45:15 2012 +0000
@@ -155,8 +155,8 @@
wsTWindow mainWindow;
int mainDecoration;
- wItem sub;
- wsTWindow subWindow;
+ wItem video;
+ wsTWindow videoWindow;
wItem playbar;
wsTWindow playbarWindow;
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/cfg.c
--- a/gui/cfg.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/cfg.c Sat Mar 03 16:45:15 2012 +0000
@@ -89,8 +89,8 @@
int gui_save_pos = 1;
int gui_main_pos_x = -3;
int gui_main_pos_y = -3;
-int gui_sub_pos_x = -3;
-int gui_sub_pos_y = -3;
+int gui_video_pos_x = -3;
+int gui_video_pos_y = -3;
int guiWinID = -1;
@@ -168,8 +168,8 @@
{ "gui_save_pos", &gui_save_pos, CONF_TYPE_FLAG, 0, 0, 1, NULL },
{ "gui_main_pos_x", &gui_main_pos_x, CONF_TYPE_INT, 0, 0, 0, NULL },
{ "gui_main_pos_y", &gui_main_pos_y, CONF_TYPE_INT, 0, 0, 0, NULL },
- { "gui_video_out_pos_x", &gui_sub_pos_x, CONF_TYPE_INT, 0, 0, 0, NULL },
- { "gui_video_out_pos_y", &gui_sub_pos_y, CONF_TYPE_INT, 0, 0, 0, NULL },
+ { "gui_video_out_pos_x", &gui_video_pos_x, CONF_TYPE_INT, 0, 0, 0, NULL },
+ { "gui_video_out_pos_y", &gui_video_pos_y, CONF_TYPE_INT, 0, 0, 0, NULL },
{ "idle", &player_idle_mode, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL },
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/cfg.h
--- a/gui/cfg.h Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/cfg.h Sat Mar 03 16:45:15 2012 +0000
@@ -80,8 +80,8 @@
extern int gui_save_pos;
extern int gui_main_pos_x;
extern int gui_main_pos_y;
-extern int gui_sub_pos_x;
-extern int gui_sub_pos_y;
+extern int gui_video_pos_x;
+extern int gui_video_pos_y;
extern int guiWinID;
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/interface.c
--- a/gui/interface.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/interface.c Sat Mar 03 16:45:15 2012 +0000
@@ -144,27 +144,27 @@
guiApp.main.x = gui_main_pos_x;
if (gui_main_pos_y != -3)
guiApp.main.y = gui_main_pos_y;
- if (gui_sub_pos_x != -3)
- guiApp.sub.x = gui_sub_pos_x;
- if (gui_sub_pos_y != -3)
- guiApp.sub.y = gui_sub_pos_y;
+ if (gui_video_pos_x != -3)
+ guiApp.video.x = gui_video_pos_x;
+ if (gui_video_pos_y != -3)
+ guiApp.video.y = gui_video_pos_y;
}
if (WinID > 0) {
- guiApp.subWindow.Parent = WinID;
- guiApp.sub.x = 0;
- guiApp.sub.y = 0;
+ guiApp.videoWindow.Parent = WinID;
+ guiApp.video.x = 0;
+ guiApp.video.y = 0;
}
if (guiWinID >= 0)
guiApp.mainWindow.Parent = guiWinID;
- 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);
+ wsCreateWindow(&guiApp.videoWindow, guiApp.video.x, guiApp.video.y, guiApp.video.width, guiApp.video.height, wsNoBorder, wsShowMouseCursor | wsHandleMouseButton | wsHandleMouseMove, wsShowFrame | wsHideWindow, "MPlayer - Video");
+ wsDestroyImage(&guiApp.videoWindow);
+ wsCreateImage(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
+ wsXDNDMakeAwareness(&guiApp.videoWindow);
- WinID = guiApp.subWindow.WindowID;
+ WinID = guiApp.videoWindow.WindowID;
uiMenuInit();
uiPlaybarInit();
@@ -178,30 +178,30 @@
mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] screen depth: %d\n", wsDepthOnScreen);
mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] mainWindow ID: 0x%x\n", (int)guiApp.mainWindow.WindowID);
- mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] subWindow ID: 0x%x\n", (int)guiApp.subWindow.WindowID);
+ mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] videoWindow ID: 0x%x\n", (int)guiApp.videoWindow.WindowID);
guiApp.mainWindow.ReDraw = (void *)uiMainDraw;
guiApp.mainWindow.MouseHandler = uiMainMouseHandle;
guiApp.mainWindow.KeyHandler = uiMainKeyHandle;
guiApp.mainWindow.DandDHandler = uiDandDHandler;
- guiApp.subWindow.ReDraw = (void *)uiSubDraw;
- guiApp.subWindow.MouseHandler = uiSubMouseHandle;
- guiApp.subWindow.KeyHandler = uiMainKeyHandle;
- guiApp.subWindow.DandDHandler = uiDandDHandler;
+ guiApp.videoWindow.ReDraw = (void *)uiVideoDraw;
+ guiApp.videoWindow.MouseHandler = uiVideoMouseHandle;
+ guiApp.videoWindow.KeyHandler = uiMainKeyHandle;
+ guiApp.videoWindow.DandDHandler = uiDandDHandler;
- wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
- wsClearWindow(guiApp.subWindow);
+ wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
+ wsClearWindow(guiApp.videoWindow);
- if (guiApp.sub.Bitmap.Image)
- wsConvert(&guiApp.subWindow, guiApp.sub.Bitmap.Image);
+ if (guiApp.video.Bitmap.Image)
+ wsConvert(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
btnModify(evSetVolume, guiInfo.Volume);
btnModify(evSetBalance, guiInfo.Balance);
btnModify(evSetMoviePosition, guiInfo.Position);
wsSetIcon(wsDisplay, guiApp.mainWindow.WindowID, &guiIcon);
- wsSetIcon(wsDisplay, guiApp.subWindow.WindowID, &guiIcon);
+ wsSetIcon(wsDisplay, guiApp.videoWindow.WindowID, &guiIcon);
if (!guiApp.mainDecoration)
wsWindowDecoration(&guiApp.mainWindow, 0);
@@ -209,30 +209,30 @@
wsVisibleWindow(&guiApp.mainWindow, wsShowWindow);
if (gtkShowVideoWindow) {
- wsVisibleWindow(&guiApp.subWindow, wsShowWindow);
+ wsVisibleWindow(&guiApp.videoWindow, wsShowWindow);
{
XEvent xev;
do
XNextEvent(wsDisplay, &xev);
- while (xev.type != MapNotify || xev.xmap.event != guiApp.subWindow.WindowID);
+ while (xev.type != MapNotify || xev.xmap.event != guiApp.videoWindow.WindowID);
- guiApp.subWindow.Mapped = wsMapped;
+ guiApp.videoWindow.Mapped = wsMapped;
guiInfo.VideoWindow = True;
}
if (gtkLoadFullscreen)
uiFullScreen();
} else
- wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0);
+ wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0);
if (gtkLoadFullscreen)
btnSet(evFullScreen, btnPressed);
guiInfo.Playing = GUI_STOP;
- uiSubRender = 1;
+ uiVideoRender = 1;
playlist = listMgr(PLAYLIST_ITEM_GET_CURR, 0);
@@ -257,8 +257,8 @@
if (gui_save_pos) {
gui_main_pos_x = guiApp.mainWindow.X;
gui_main_pos_y = guiApp.mainWindow.Y;
- gui_sub_pos_x = guiApp.sub.x;
- gui_sub_pos_y = guiApp.sub.y;
+ gui_video_pos_x = guiApp.video.x;
+ gui_video_pos_y = guiApp.video.y;
}
ass_enabled = gtkASS.enabled;
@@ -341,7 +341,7 @@
switch ((int)data) {
case GUI_STOP:
case GUI_PLAY:
-// if ( !gtkShowVideoWindow ) wsVisibleWindow( &guiApp.subWindow,wsHideWindow );
+// if ( !gtkShowVideoWindow ) wsVisibleWindow( &guiApp.videoWindow,wsHideWindow );
case GUI_PAUSE:
guiInfo.Playing = (int)data;
break;
@@ -394,7 +394,7 @@
case GUI_PREPARE:
- wsVisibleMouse(&guiApp.subWindow, wsHideMouseCursor);
+ wsVisibleMouse(&guiApp.videoWindow, wsHideMouseCursor);
if (guiInfo.NewPlay == GUI_FILE_NEW) {
dvd_title = 0;
@@ -689,7 +689,7 @@
// ...without video there will be no call to GUI_SETUP_VIDEO_WINDOW
if (!guiInfo.VideoWindow) {
- wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
+ wsVisibleWindow(&guiApp.videoWindow, wsHideWindow);
btnSet(evFullScreen, (gtkLoadFullscreen ? btnPressed : btnReleased));
}
@@ -731,17 +731,17 @@
guiInfo.VideoWidth = vo_dwidth;
guiInfo.VideoHeight = vo_dheight;
- if (!guiApp.subWindow.isFullScreen || !guiApp.subWindow.Mapped) {
- if (!guiApp.subWindow.isFullScreen)
- wsResizeWindow(&guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight);
+ if (!guiApp.videoWindow.isFullScreen || !guiApp.videoWindow.Mapped) {
+ if (!guiApp.videoWindow.isFullScreen)
+ wsResizeWindow(&guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight);
- wsMoveWindow(&guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y);
+ wsMoveWindow(&guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y);
- if (!guiApp.subWindow.Mapped)
- wsVisibleWindow(&guiApp.subWindow, wsShowWindow);
+ if (!guiApp.videoWindow.Mapped)
+ wsVisibleWindow(&guiApp.videoWindow, wsShowWindow);
}
- if (gtkLoadFullscreen ^ guiApp.subWindow.isFullScreen)
+ if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen)
uiEventHandling(evFullScreen, 0);
if (guiWinID >= 0)
@@ -794,21 +794,21 @@
if (gtkShowVideoWindow) {
guiInfo.VideoWindow = True;
- guiInfo.VideoWidth = guiApp.sub.width;
- guiInfo.VideoHeight = guiApp.sub.height;
+ guiInfo.VideoWidth = guiApp.video.width;
+ guiInfo.VideoHeight = guiApp.video.height;
- if (!guiApp.subWindow.isFullScreen) {
- wsResizeWindow(&guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight);
- wsMoveWindow(&guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y);
+ if (!guiApp.videoWindow.isFullScreen) {
+ wsResizeWindow(&guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight);
+ wsMoveWindow(&guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y);
}
- if (!guiApp.subWindow.Mapped)
- wsVisibleWindow(&guiApp.subWindow, wsShowWindow);
+ if (!guiApp.videoWindow.Mapped)
+ wsVisibleWindow(&guiApp.videoWindow, wsShowWindow);
- if (gtkLoadFullscreen ^ guiApp.subWindow.isFullScreen)
+ if (gtkLoadFullscreen ^ guiApp.videoWindow.isFullScreen)
uiEventHandling(evFullScreen, 0);
} else {
- wsVisibleWindow(&guiApp.subWindow, wsHideWindow);
+ wsVisibleWindow(&guiApp.videoWindow, wsHideWindow);
guiInfo.VideoWindow = False;
btnSet(evFullScreen, (gtkLoadFullscreen ? btnPressed : btnReleased));
}
@@ -816,11 +816,11 @@
gui(GUI_SET_STATE, (void *)GUI_STOP);
wsHandleEvents();
- uiSubRender = 1;
- wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
- wsClearWindow(guiApp.subWindow);
- wsPostRedisplay(&guiApp.subWindow);
- wsVisibleMouse(&guiApp.subWindow, wsShowMouseCursor);
+ uiVideoRender = 1;
+ wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
+ wsClearWindow(guiApp.videoWindow);
+ wsPostRedisplay(&guiApp.videoWindow);
+ wsVisibleMouse(&guiApp.videoWindow, wsShowMouseCursor);
}
break;
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/skin/skin.c
--- a/gui/skin/skin.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/skin/skin.c Sat Mar 03 16:45:15 2012 +0000
@@ -246,7 +246,7 @@
/**
* @brief Parse a @a window definition.
*
- * Syntax: window=main|sub|playbar|menu
+ * Syntax: window=main|video|playbar|menu
*
* @param in definition to be analyzed
*
@@ -264,12 +264,15 @@
strlower(in);
+ if (strcmp(in, "sub") == 0)
+ strcpy(in, "video"); // legacy
+
if (strcmp(in, "main") == 0) {
currWin = &skin->main;
currWinItemIdx = &skin->IndexOfMainItems;
currWinItems = skin->mainItems;
- } else if (strcmp(in, "sub") == 0) {
- currWin = &skin->sub;
+ } else if (strcmp(in, "video") == 0) {
+ currWin = &skin->video;
currWinItemIdx = NULL;
currWinItems = NULL;
} else if (strcmp(in, "playbar") == 0) {
@@ -307,12 +310,12 @@
unsigned char file[512];
int x, y;
int w = 0, h = 0;
- int is_sub, is_bar, is_menu;
+ int is_video, is_bar, is_menu;
if (!window_item("base"))
return 1;
- is_sub = (strcmp(currWinName, "sub") == 0);
+ is_video = (strcmp(currWinName, "video") == 0);
is_bar = (strcmp(currWinName, "playbar") == 0);
is_menu = (strcmp(currWinName, "menu") == 0);
@@ -344,7 +347,7 @@
currWin->width = currWin->Bitmap.Width;
currWin->height = currWin->Bitmap.Height;
- if (is_sub) {
+ if (is_video) {
if (w && h) {
currWin->width = w;
currWin->height = h;
@@ -353,7 +356,7 @@
mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[skin] bitmap: %dx%d\n", currWin->width, currWin->height);
- if (!is_sub) {
+ if (!is_video) {
if (!bpRenderMask(&currWin->Bitmap, &currWin->Mask)) {
skin_error(MSGTR_SKIN_NotEnoughMemory);
return 1;
@@ -419,7 +422,7 @@
if (!window_item("button"))
return 1;
- if (in_window("sub"))
+ if (in_window("video"))
return 1;
if (in_window("menu"))
return 1;
@@ -492,7 +495,7 @@
if (in_window("main"))
return 1;
- if (in_window("sub"))
+ if (in_window("video"))
return 1;
if (in_window("playbar"))
return 1;
@@ -536,7 +539,7 @@
if (in_window("main"))
return 1;
- if (in_window("sub"))
+ if (in_window("video"))
return 1;
if (in_window("playbar"))
return 1;
@@ -594,7 +597,7 @@
if (!window_item("h/v potmeter"))
return 1;
- if (in_window("sub"))
+ if (in_window("video"))
return 1;
if (in_window("menu"))
return 1;
@@ -710,7 +713,7 @@
if (!window_item("potmeter"))
return 1;
- if (in_window("sub"))
+ if (in_window("video"))
return 1;
if (in_window("menu"))
return 1;
@@ -780,7 +783,7 @@
if (!window_item("font"))
return 1;
- if (in_window("sub"))
+ if (in_window("video"))
return 1;
if (in_window("menu"))
return 1;
@@ -829,7 +832,7 @@
if (!window_item("slabel"))
return 1;
- if (in_window("sub"))
+ if (in_window("video"))
return 1;
if (in_window("menu"))
return 1;
@@ -892,7 +895,7 @@
if (!window_item("dlabel"))
return 1;
- if (in_window("sub"))
+ if (in_window("video"))
return 1;
if (in_window("menu"))
return 1;
@@ -954,7 +957,7 @@
if (!window_item("decoration"))
return 1;
- if (in_window("sub"))
+ if (in_window("video"))
return 1;
if (in_window("playbar"))
return 1;
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/ui/actions.c
--- a/gui/ui/actions.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/ui/actions.c Sat Mar 03 16:45:15 2012 +0000
@@ -45,19 +45,19 @@
if (!guiInfo.VideoWindow)
return;
- wsFullScreen(&guiApp.subWindow);
+ wsFullScreen(&guiApp.videoWindow);
- vo_fs = guiApp.subWindow.isFullScreen;
+ vo_fs = guiApp.videoWindow.isFullScreen;
- wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.subWindow.isFullScreen);
+ wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.videoWindow.isFullScreen);
if (guiApp.menuIsPresent)
- wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.subWindow.isFullScreen);
+ wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen);
if (guiInfo.Playing)
- wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0);
+ wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0);
else
- wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
+ wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
}
void uiPlay(void)
@@ -77,9 +77,9 @@
}
gui(GUI_SET_STATE, (void *)GUI_PLAY);
- uiSubRender = 0;
- wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0);
- wsClearWindow(guiApp.subWindow);
+ uiVideoRender = 0;
+ wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0);
+ wsClearWindow(guiApp.videoWindow);
}
void uiPause(void)
@@ -153,24 +153,24 @@
} else
uiMenuInit();
- /* reload sub window */
+ /* reload video window */
- if (guiApp.sub.Bitmap.Image)
- wsResizeImage(&guiApp.subWindow, guiApp.sub.Bitmap.Width, guiApp.sub.Bitmap.Height);
+ if (guiApp.video.Bitmap.Image)
+ wsResizeImage(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height);
- if (!guiApp.subWindow.isFullScreen && !guiInfo.Playing) {
- wsResizeWindow(&guiApp.subWindow, guiApp.sub.width, guiApp.sub.height);
- wsMoveWindow(&guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y);
+ if (!guiApp.videoWindow.isFullScreen && !guiInfo.Playing) {
+ wsResizeWindow(&guiApp.videoWindow, guiApp.video.width, guiApp.video.height);
+ wsMoveWindow(&guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y);
}
- if (guiApp.sub.Bitmap.Image)
- wsConvert(&guiApp.subWindow, guiApp.sub.Bitmap.Image);
+ if (guiApp.video.Bitmap.Image)
+ wsConvert(&guiApp.videoWindow, guiApp.video.Bitmap.Image);
if (!guiInfo.Playing) {
- uiSubRender = 1;
- wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B);
- wsClearWindow(guiApp.subWindow);
- wsPostRedisplay(&guiApp.subWindow);
+ uiVideoRender = 1;
+ wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B);
+ wsClearWindow(guiApp.videoWindow);
+ wsPostRedisplay(&guiApp.videoWindow);
}
/* reload playbar */
@@ -213,10 +213,10 @@
btnModify(evSetVolume, guiInfo.Volume);
btnModify(evSetBalance, guiInfo.Balance);
btnModify(evSetMoviePosition, guiInfo.Position);
- btnSet(evFullScreen, (guiApp.subWindow.isFullScreen ? btnPressed : btnReleased));
+ btnSet(evFullScreen, (guiApp.videoWindow.isFullScreen ? btnPressed : btnReleased));
- wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.subWindow.isFullScreen);
- wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.subWindow.isFullScreen);
+ wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.videoWindow.isFullScreen);
+ wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen);
}
void uiSetFileName(char *dir, char *name, int type)
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/ui/gmplayer.h
--- a/gui/ui/gmplayer.h Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/ui/gmplayer.h Sat Mar 03 16:45:15 2012 +0000
@@ -19,7 +19,7 @@
#ifndef MPLAYER_GUI_GMPLAYER_H
#define MPLAYER_GUI_GMPLAYER_H
-extern int uiSubRender;
+extern int uiVideoRender;
extern int uiMainRender;
extern unsigned char * mainDrawBuffer;
@@ -40,8 +40,8 @@
void uiMainKeyHandle( int KeyCode, int Type, int Key );
void uiDandDHandler(int num, char** files);
-void uiSubDraw( void );
-void uiSubMouseHandle( int Button, int X, int Y, int RX, int RY );
+void uiVideoDraw( void );
+void uiVideoMouseHandle( int Button, int X, int Y, int RX, int RY );
void uiMenuInit( void );
void uiHideMenu( int mx, int my, int w );
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/ui/gtk/menu.c
--- a/gui/ui/gtk/menu.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/ui/gtk/menu.c Sat Mar 03 16:45:15 2012 +0000
@@ -645,18 +645,18 @@
{
int b1 = 0, b2 = 0, b_half = 0;
AddSeparator( Menu );
- if ( !guiApp.subWindow.isFullScreen && guiInfo.Playing )
+ if ( !guiApp.videoWindow.isFullScreen && guiInfo.Playing )
{
- if ( ( guiApp.subWindow.Width == guiInfo.VideoWidth * 2 )&&
- ( guiApp.subWindow.Height == guiInfo.VideoHeight * 2 ) ) b2=1;
- else if ( ( guiApp.subWindow.Width == guiInfo.VideoWidth / 2 ) &&
- ( guiApp.subWindow.Height == guiInfo.VideoHeight / 2 ) ) b_half=1;
+ if ( ( guiApp.videoWindow.Width == guiInfo.VideoWidth * 2 )&&
+ ( guiApp.videoWindow.Height == guiInfo.VideoHeight * 2 ) ) b2=1;
+ else if ( ( guiApp.videoWindow.Width == guiInfo.VideoWidth / 2 ) &&
+ ( guiApp.videoWindow.Height == guiInfo.VideoHeight / 2 ) ) b_half=1;
else b1=1;
- } else b1=!guiApp.subWindow.isFullScreen;
+ } else b1=!guiApp.videoWindow.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*)full_xpm, Menu,MSGTR_MENU_FullScreen,guiApp.subWindow.isFullScreen,evFullScreen );
+ F=AddMenuCheckItem( window1, (const char*)full_xpm, Menu,MSGTR_MENU_FullScreen,guiApp.videoWindow.isFullScreen,evFullScreen );
if ( !guiInfo.Playing )
{
gtk_widget_set_sensitive( H,FALSE );
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/ui/gtk/preferences.c
--- a/gui/ui/gtk/preferences.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/ui/gtk/preferences.c Sat Mar 03 16:45:15 2012 +0000
@@ -726,7 +726,7 @@
gtkActive( Preferences );
} else window=wsHideWindow;
// NOTE TO MYSELF: doesn't work with a fullscreen window
- if ( !guiInfo.Playing ) wsVisibleWindow( &guiApp.subWindow,window );
+ if ( !guiInfo.Playing ) wsVisibleWindow( &guiApp.videoWindow,window );
break;
case 4:
case 5:
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/ui/main.c
--- a/gui/ui/main.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/ui/main.c Sat Mar 03 16:45:15 2012 +0000
@@ -337,56 +337,56 @@
switch ( iparam )
{
case 0: wsIconify( guiApp.mainWindow ); break;
- case 1: wsIconify( guiApp.subWindow ); break;
+ case 1: wsIconify( guiApp.videoWindow ); break;
}
break;
case evHalfSize:
if ( guiInfo.VideoWindow && guiInfo.Playing )
{
- if ( guiApp.subWindow.isFullScreen )
+ if ( guiApp.videoWindow.isFullScreen )
{
uiFullScreen();
}
- wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 );
- wsMoveWindow( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y );
+ wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 );
+ wsMoveWindow( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
btnSet( evFullScreen,btnReleased );
}
break;
case evDoubleSize:
if ( guiInfo.VideoWindow && guiInfo.Playing )
{
- if ( guiApp.subWindow.isFullScreen )
+ if ( guiApp.videoWindow.isFullScreen )
{
uiFullScreen();
}
- wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 );
- wsMoveWindowWithin( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y );
+ wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 );
+ wsMoveWindowWithin( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
btnSet( evFullScreen,btnReleased );
}
break;
case evNormalSize:
if ( guiInfo.VideoWindow && guiInfo.Playing )
{
- if ( guiApp.subWindow.isFullScreen )
+ if ( guiApp.videoWindow.isFullScreen )
{
uiFullScreen();
}
- wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
- wsMoveWindow( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y );
+ wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
+ wsMoveWindow( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
btnSet( evFullScreen,btnReleased );
break;
- } else if ( !guiApp.subWindow.isFullScreen ) break;
+ } else if ( !guiApp.videoWindow.isFullScreen ) break;
case evFullScreen:
if ( guiInfo.VideoWindow && guiInfo.Playing )
{
uiFullScreen();
- if ( !guiApp.subWindow.isFullScreen )
+ if ( !guiApp.videoWindow.isFullScreen )
{
- wsResizeWindow( &guiApp.subWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
- wsMoveWindow( &guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y );
+ wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
+ wsMoveWindow( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
}
}
- if ( guiApp.subWindow.isFullScreen ) btnSet( evFullScreen,btnPressed );
+ if ( guiApp.videoWindow.isFullScreen ) btnSet( evFullScreen,btnPressed );
else btnSet( evFullScreen,btnReleased );
break;
@@ -399,7 +399,7 @@
case 1:
default: movie_aspect=-1;
}
- wsClearWindow( guiApp.subWindow );
+ wsClearWindow( guiApp.videoWindow );
if ( guiInfo.StreamType == STREAMTYPE_VCD ) uiEventHandling( evPlayVCD, 0 );
else if ( guiInfo.StreamType == STREAMTYPE_DVD ) uiEventHandling( ivPlayDVD, 0 );
else
@@ -587,7 +587,7 @@
case wsXF86Next: msg=evNext; break;
case wsXF86Media: msg=evLoad; break;
case wsEscape:
- if ( guiInfo.VideoWindow && guiInfo.Playing && guiApp.subWindow.isFullScreen )
+ if ( guiInfo.VideoWindow && guiInfo.Playing && guiApp.videoWindow.isFullScreen )
{
uiEventHandling( evNormalSize,0 );
return;
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/ui/playbar.c
--- a/gui/ui/playbar.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/ui/playbar.c Sat Mar 03 16:45:15 2012 +0000
@@ -62,14 +62,14 @@
{
int x;
- if ( !guiApp.subWindow.isFullScreen ) return;
+ if ( !guiApp.videoWindow.isFullScreen ) return;
if ( !playbarVisible || !guiApp.playbarIsPresent ) return;
-// guiApp.playbar.x=( guiApp.subWindow.Width - guiApp.playbar.width ) / 2;
+// guiApp.playbar.x=( guiApp.videoWindow.Width - guiApp.playbar.width ) / 2;
switch( guiApp.playbar.x )
{
- case -1: x=( guiApp.subWindow.Width - guiApp.playbar.width ) / 2; break;
- case -2: x=( guiApp.subWindow.Width - guiApp.playbar.width ); break;
+ case -1: x=( guiApp.videoWindow.Width - guiApp.playbar.width ) / 2; break;
+ case -2: x=( guiApp.videoWindow.Width - guiApp.playbar.width ); break;
default: x=guiApp.playbar.x;
}
@@ -77,9 +77,9 @@
{
case 1: // fade in
playbarLength--;
- if ( guiApp.subWindow.Height - guiApp.playbar.height >= playbarLength )
+ if ( guiApp.videoWindow.Height - guiApp.playbar.height >= playbarLength )
{
- playbarLength=guiApp.subWindow.Height - guiApp.playbar.height;
+ playbarLength=guiApp.videoWindow.Height - guiApp.playbar.height;
uiPlaybarFade=0;
vo_mouse_autohide=0;
}
@@ -87,9 +87,9 @@
break;
case 2: // fade out
playbarLength+=10;
- if ( playbarLength > guiApp.subWindow.Height )
+ if ( playbarLength > guiApp.videoWindow.Height )
{
- playbarLength=guiApp.subWindow.Height;
+ playbarLength=guiApp.videoWindow.Height;
uiPlaybarFade=playbarVisible=0;
vo_mouse_autohide=1;
wsVisibleWindow( &guiApp.playbarWindow,wsHideWindow );
@@ -230,9 +230,9 @@
void uiPlaybarShow( int y )
{
if ( !guiApp.playbarIsPresent || !gtkEnablePlayBar ) return;
- if ( !guiApp.subWindow.isFullScreen ) return;
+ if ( !guiApp.videoWindow.isFullScreen ) return;
- if ( y > guiApp.subWindow.Height - guiApp.playbar.height )
+ if ( y > guiApp.videoWindow.Height - guiApp.playbar.height )
{
if ( !uiPlaybarFade ) wsVisibleWindow( &guiApp.playbarWindow,wsShowWindow );
uiPlaybarFade=1; playbarVisible=1; wsPostRedisplay( &guiApp.playbarWindow );
@@ -252,7 +252,7 @@
mplayer( MPLAYER_EXIT_GUI, EXIT_ERROR, 0 );
}
- guiApp.playbarWindow.Parent=guiApp.subWindow.WindowID;
+ guiApp.playbarWindow.Parent=guiApp.videoWindow.WindowID;
wsCreateWindow( &guiApp.playbarWindow,
guiApp.playbar.x,guiApp.playbar.y,guiApp.playbar.width,guiApp.playbar.height,
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsHideWindow,"PlayBar" );
@@ -263,5 +263,5 @@
guiApp.playbarWindow.MouseHandler=uiPlaybarMouseHandle;
guiApp.playbarWindow.KeyHandler=uiMainKeyHandle;
- playbarLength=guiApp.subWindow.Height;
+ playbarLength=guiApp.videoWindow.Height;
}
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/ui/sub.c
--- a/gui/ui/sub.c Sat Mar 03 14:03:18 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * sub window
- *
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include
-
-#include "config.h"
-#include "libvo/x11_common.h"
-#include "help_mp.h"
-#include "mp_core.h"
-
-#include "gmplayer.h"
-#include "gui/app.h"
-#include "gui/interface.h"
-#include "widgets.h"
-
-int uiSubRender = 0;
-int subVisible = 0;
-
-void uiSubDraw( void )
-{
- if ( guiApp.subWindow.State == wsWindowClosed ) mplayer( MPLAYER_EXIT_GUI, EXIT_QUIT, 0 );
-
- if ( guiApp.subWindow.State == wsWindowFocusIn ) subVisible++;
- if ( guiApp.subWindow.State == wsWindowFocusOut && metacity_hack != 3 ) subVisible--;
-
- if ( !guiApp.subWindow.Mapped ||
- guiApp.subWindow.Visible == wsWindowNotVisible ) return;
-
- if ( guiInfo.Playing ) uiSubRender=0;
-
- if ( uiSubRender && guiApp.subWindow.State == wsWindowExpose )
- {
- if ( guiApp.sub.Bitmap.Image ) wsPutImage( &guiApp.subWindow );
- }
- guiApp.subWindow.State=0;
-}
-
-void uiSubMouseHandle( int Button,int X,int Y,int RX,int RY )
-{
- static int mplSubMoved = 0;
- static int msButton = 0;
-
- uiPlaybarShow( Y );
-
- switch( Button )
- {
- case wsRRMouseButton:
- gtkShow( ivShowPopUpMenu,NULL );
- break;
- case wsPMMouseButton:
- gtkShow( ivHidePopUpMenu,NULL );
- uiShowMenu( RX,RY );
- msButton=wsPMMouseButton;
- break;
- case wsRMMouseButton:
- uiHideMenu( RX,RY,1 );
- msButton=0;
- break;
-/* --- */
- case wsPLMouseButton:
- gtkShow( ivHidePopUpMenu,NULL );
- sx=X; sy=Y;
- msButton=wsPLMouseButton;
- mplSubMoved=0;
- break;
- case wsMoveMouse:
- switch ( msButton )
- {
- case wsPLMouseButton:
- mplSubMoved=1;
- if ( !guiApp.subWindow.isFullScreen )
- {
- wsMoveWindow( &guiApp.subWindow,True,RX - sx,RY - sy );
- guiApp.sub.x = guiApp.subWindow.X;
- guiApp.sub.y = guiApp.subWindow.Y;
- // NOTE TO MYSELF: dragging the title bar goes unnoticed?
- }
- break;
- case wsPMMouseButton:
- uiMenuMouseHandle( RX,RY );
- break;
- default: uiPlaybarShow( Y ); break;
- }
- break;
- case wsRLMouseButton:
- if ( ( !mplSubMoved )&&( guiApp.subWindow.isFullScreen ) )
- {
- if( subVisible++%2 ) wsRaiseWindowTop( wsDisplay,guiApp.mainWindow.WindowID );
- else wsRaiseWindowTop( wsDisplay,guiApp.subWindow.WindowID );
- }
- msButton=0;
- mplSubMoved=0;
- break;
- }
-}
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/ui/video.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gui/ui/video.c Sat Mar 03 16:45:15 2012 +0000
@@ -0,0 +1,112 @@
+/*
+ * video window
+ *
+ * This file is part of MPlayer.
+ *
+ * MPlayer is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * MPlayer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with MPlayer; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include
+
+#include "config.h"
+#include "libvo/x11_common.h"
+#include "help_mp.h"
+#include "mp_core.h"
+
+#include "gmplayer.h"
+#include "gui/app.h"
+#include "gui/interface.h"
+#include "widgets.h"
+
+int uiVideoRender = 0;
+int videoVisible = 0;
+
+void uiVideoDraw( void )
+{
+ if ( guiApp.videoWindow.State == wsWindowClosed ) mplayer( MPLAYER_EXIT_GUI, EXIT_QUIT, 0 );
+
+ if ( guiApp.videoWindow.State == wsWindowFocusIn ) videoVisible++;
+ if ( guiApp.videoWindow.State == wsWindowFocusOut && metacity_hack != 3 ) videoVisible--;
+
+ if ( !guiApp.videoWindow.Mapped ||
+ guiApp.videoWindow.Visible == wsWindowNotVisible ) return;
+
+ if ( guiInfo.Playing ) uiVideoRender=0;
+
+ if ( uiVideoRender && guiApp.videoWindow.State == wsWindowExpose )
+ {
+ if ( guiApp.video.Bitmap.Image ) wsPutImage( &guiApp.videoWindow );
+ }
+ guiApp.videoWindow.State=0;
+}
+
+void uiVideoMouseHandle( int Button,int X,int Y,int RX,int RY )
+{
+ static int mplVideoMoved = 0;
+ static int msButton = 0;
+
+ uiPlaybarShow( Y );
+
+ switch( Button )
+ {
+ case wsRRMouseButton:
+ gtkShow( ivShowPopUpMenu,NULL );
+ break;
+ case wsPMMouseButton:
+ gtkShow( ivHidePopUpMenu,NULL );
+ uiShowMenu( RX,RY );
+ msButton=wsPMMouseButton;
+ break;
+ case wsRMMouseButton:
+ uiHideMenu( RX,RY,1 );
+ msButton=0;
+ break;
+/* --- */
+ case wsPLMouseButton:
+ gtkShow( ivHidePopUpMenu,NULL );
+ sx=X; sy=Y;
+ msButton=wsPLMouseButton;
+ mplVideoMoved=0;
+ break;
+ case wsMoveMouse:
+ switch ( msButton )
+ {
+ case wsPLMouseButton:
+ mplVideoMoved=1;
+ if ( !guiApp.videoWindow.isFullScreen )
+ {
+ wsMoveWindow( &guiApp.videoWindow,True,RX - sx,RY - sy );
+ guiApp.video.x = guiApp.videoWindow.X;
+ guiApp.video.y = guiApp.videoWindow.Y;
+ // NOTE TO MYSELF: dragging the title bar goes unnoticed?
+ }
+ break;
+ case wsPMMouseButton:
+ uiMenuMouseHandle( RX,RY );
+ break;
+ default: uiPlaybarShow( Y ); break;
+ }
+ break;
+ case wsRLMouseButton:
+ if ( ( !mplVideoMoved )&&( guiApp.videoWindow.isFullScreen ) )
+ {
+ if( videoVisible++%2 ) wsRaiseWindowTop( wsDisplay,guiApp.mainWindow.WindowID );
+ else wsRaiseWindowTop( wsDisplay,guiApp.videoWindow.WindowID );
+ }
+ msButton=0;
+ mplVideoMoved=0;
+ break;
+ }
+}
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/ui/widgets.c
--- a/gui/ui/widgets.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/ui/widgets.c Sat Mar 03 16:45:15 2012 +0000
@@ -237,7 +237,7 @@
void gtkSetLayer(GtkWidget *wdg)
{
- wsSetLayer(gdk_display, GDK_WINDOW_XWINDOW(wdg->window), guiApp.subWindow.isFullScreen);
+ wsSetLayer(gdk_display, GDK_WINDOW_XWINDOW(wdg->window), guiApp.videoWindow.isFullScreen);
gtkActive(wdg);
}
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/win32/dialogs.c
--- a/gui/win32/dialogs.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/win32/dialogs.c Sat Mar 03 16:45:15 2012 +0000
@@ -721,7 +721,7 @@
Shell_NotifyIcon(NIM_DELETE, &nid);
destroy_window(mygui);
create_window(mygui, skinspath);
- create_subwindow(mygui);
+ create_videowindow(mygui);
SendMessage(hwnd, WM_CLOSE, 0, 0); /* Avoid crashing when switching skin */
}
}
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/win32/dialogs.h
--- a/gui/win32/dialogs.h Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/win32/dialogs.h Sat Mar 03 16:45:15 2012 +0000
@@ -116,7 +116,7 @@
#define ID_ASPECT2 84
#define ID_ASPECT3 85
#define ID_ASPECT4 86
-#define ID_SUBWINDOW 87
+#define ID_VIDEOWINDOW 87
#define ID_TIMER 88
#define ID_MUTE 89
#define ID_FULLSCREEN 90
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/win32/gui.c
--- a/gui/win32/gui.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/win32/gui.c Sat Mar 03 16:45:15 2012 +0000
@@ -59,7 +59,7 @@
#endif
/* Globals / Externs */
-float sub_aspect;
+float video_aspect;
DWORD oldtime;
NOTIFYICONDATA nid;
@@ -344,10 +344,10 @@
RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE);
}
-static LRESULT CALLBACK SubProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+static LRESULT CALLBACK VideoProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
gui_t *gui = (gui_t *) GetWindowLongPtr(hWnd, GWLP_USERDATA);
- if (gui && (gui->subwindow != hWnd)) return FALSE;
+ if (gui && (gui->videowindow != hWnd)) return FALSE;
switch (message)
{
@@ -507,7 +507,7 @@
gui->playlist->add_track(gui->playlist, (const char *) wParam, NULL, NULL, 0);
gui->playercontrol(evLoadPlay);
}
- SetForegroundWindow(gui->subwindow);
+ SetForegroundWindow(gui->videowindow);
return 0;
}
case WM_LBUTTONDOWN:
@@ -530,7 +530,7 @@
ClientToScreen(hWnd, &point);
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);
+ TrackPopupMenu(gui->videomenu, 0, point.x, point.y, 0, hWnd, NULL);
return 0;
}
case WM_LBUTTONDBLCLK:
@@ -610,11 +610,11 @@
rect_height = rd.bottom - rd.top;
/* maintain our aspect ratio */
- tmpheight = ((float)rect_width/sub_aspect);
+ tmpheight = ((float)rect_width/video_aspect);
tmpheight += tmpheight % 2;
if(tmpheight > rect_height)
{
- rect_width = ((float)rect_height*sub_aspect);
+ rect_width = ((float)rect_height*video_aspect);
rect_width += rect_width % 2;
}
else rect_height = tmpheight;
@@ -656,7 +656,7 @@
window *desc = NULL;
for (i=0; iskin->windowcount; i++)
- if(gui->skin->windows[i]->type == wiSub)
+ if(gui->skin->windows[i]->type == wiVideo)
desc = gui->skin->windows[i];
SelectObject(hMemDC, get_bitmap(hWnd));
@@ -1140,12 +1140,12 @@
gui_main_pos_x = rd.left;
gui_main_pos_y = rd.top;
- /* sub window position */
- if(IsIconic(gui->subwindow))
- ShowWindow(gui->subwindow, SW_SHOWNORMAL);
- GetWindowRect(gui->subwindow, &rd);
- gui_sub_pos_x = rd.left;
- gui_sub_pos_y = rd.top;
+ /* video window position */
+ if(IsIconic(gui->videowindow))
+ ShowWindow(gui->videowindow, SW_SHOWNORMAL);
+ GetWindowRect(gui->videowindow, &rd);
+ gui_video_pos_x = rd.left;
+ gui_video_pos_y = rd.top;
for(i=0; iwindow_priv_count; i++)
{
@@ -1161,10 +1161,10 @@
DestroyWindow(gui->mainwindow);
gui->mainwindow = NULL;
- /* destroy the sub window */
- if(gui->subwindow)
- DestroyWindow(gui->subwindow);
- gui->subwindow = NULL;
+ /* destroy the video window */
+ if(gui->videowindow)
+ DestroyWindow(gui->videowindow);
+ gui->videowindow = NULL;
UnregisterClass(gui->classname, 0);
DestroyIcon(gui->icon);
@@ -1226,28 +1226,28 @@
AppendMenu(gui->traymenu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit));
}
-static void create_submenu(gui_t *gui)
+static void create_videomenu(gui_t *gui)
{
- gui->submenu = CreatePopupMenu();
+ gui->videomenu = CreatePopupMenu();
gui->dvdmenu = CreatePopupMenu();
gui->aspectmenu = CreatePopupMenu();
gui->subtitlemenu = CreatePopupMenu();
- AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open));
- AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
- AppendMenu(gui->submenu, MF_STRING, ID_SEEKB, acp(MSGTR_MENU_SeekBack));
- AppendMenu(gui->submenu, MF_STRING, ID_PTRACK, acp(MSGTR_MENU_PrevStream));
- AppendMenu(gui->submenu, MF_STRING, ID_PLAY, acp(MSGTR_MENU_Play "/" MSGTR_MENU_Pause));
- AppendMenu(gui->submenu, MF_STRING, ID_STOP, acp(MSGTR_MENU_Stop));
- AppendMenu(gui->submenu, MF_STRING, ID_NTRACK, acp(MSGTR_MENU_NextStream));
- AppendMenu(gui->submenu, MF_STRING, ID_SEEKF, acp(MSGTR_MENU_SeekForw));
- AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
- AppendMenu(gui->submenu, MF_STRING, ID_FULLSCREEN, acp(MSGTR_MENU_FullScreen));
- AppendMenu(gui->submenu, MF_STRING, ID_MUTE, acp(MSGTR_MENU_Mute));
- AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
- AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->aspectmenu, acp(MSGTR_MENU_AspectRatio));
- AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->subtitlemenu, acp(MSGTR_MENU_Subtitles));
+ AppendMenu(gui->videomenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open));
+ AppendMenu(gui->videomenu, MF_SEPARATOR, 0, 0);
+ AppendMenu(gui->videomenu, MF_STRING, ID_SEEKB, acp(MSGTR_MENU_SeekBack));
+ AppendMenu(gui->videomenu, MF_STRING, ID_PTRACK, acp(MSGTR_MENU_PrevStream));
+ AppendMenu(gui->videomenu, MF_STRING, ID_PLAY, acp(MSGTR_MENU_Play "/" MSGTR_MENU_Pause));
+ AppendMenu(gui->videomenu, MF_STRING, ID_STOP, acp(MSGTR_MENU_Stop));
+ AppendMenu(gui->videomenu, MF_STRING, ID_NTRACK, acp(MSGTR_MENU_NextStream));
+ AppendMenu(gui->videomenu, MF_STRING, ID_SEEKF, acp(MSGTR_MENU_SeekForw));
+ AppendMenu(gui->videomenu, MF_SEPARATOR, 0, 0);
+ AppendMenu(gui->videomenu, MF_STRING, ID_FULLSCREEN, acp(MSGTR_MENU_FullScreen));
+ AppendMenu(gui->videomenu, MF_STRING, ID_MUTE, acp(MSGTR_MENU_Mute));
+ AppendMenu(gui->videomenu, MF_SEPARATOR, 0, 0);
+ AppendMenu(gui->videomenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->aspectmenu, acp(MSGTR_MENU_AspectRatio));
+ AppendMenu(gui->videomenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->subtitlemenu, acp(MSGTR_MENU_Subtitles));
#ifdef CONFIG_DVDREAD
- AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->dvdmenu, acp(MSGTR_MENU_DVD));
+ AppendMenu(gui->videomenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->dvdmenu, acp(MSGTR_MENU_DVD));
AppendMenu(gui->dvdmenu, MF_STRING | MF_GRAYED, ID_CHAPTERSEL, acp(MSGTR_SelectTitleChapter));
#endif
AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_TOGGLE, acp(MSGTR_MENU_SubtitlesOnOff));
@@ -1257,8 +1257,8 @@
AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT3, "2.35");
AppendMenu(gui->aspectmenu, MF_SEPARATOR, 0, 0);
AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT4, acp(MSGTR_MENU_Original));
- AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
- AppendMenu(gui->submenu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit));
+ AppendMenu(gui->videomenu, MF_SEPARATOR, 0, 0);
+ AppendMenu(gui->videomenu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit));
}
static void maketransparent(HWND hwnd, COLORREF crTransparent)
@@ -1369,8 +1369,8 @@
return 0;
}
-/* creates the sub (AKA video) window,*/
-int create_subwindow(gui_t *gui)
+/* creates the video window */
+int create_videowindow(gui_t *gui)
{
HINSTANCE instance = GetModuleHandle(NULL);
WNDCLASS wc;
@@ -1385,7 +1385,7 @@
vo_colorkey = 0xff00ff;
for (i=0; iskin->windowcount; i++)
- if(gui->skin->windows[i]->type == wiSub)
+ if(gui->skin->windows[i]->type == wiVideo)
desc = gui->skin->windows[i];
if(!desc)
@@ -1397,7 +1397,7 @@
windowcolor = vo_colorkey;
colorbrush = CreateSolidBrush(windowcolor);
wc.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
- wc.lpfnWndProc = SubProc;
+ wc.lpfnWndProc = VideoProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = instance;
@@ -1408,23 +1408,23 @@
wc.lpszMenuName = NULL;
RegisterClass(&wc);
- /* create the sub window menu */
- create_submenu(gui);
+ /* create the video window menu */
+ create_videomenu(gui);
rect.top = rect.left = 100;
rect.bottom = rect.top+desc->base->bitmap[0]->height;
rect.right = rect.left+desc->base->bitmap[0]->width;
/* our window aspect */
- sub_aspect = (float)(rect.right-rect.left)/(rect.bottom-rect.top);
+ video_aspect = (float)(rect.right-rect.left)/(rect.bottom-rect.top);
style = fullscreen?WS_VISIBLE | WS_POPUP:WS_OVERLAPPEDWINDOW | WS_SYSMENU | WS_MINIMIZEBOX;
AdjustWindowRect(&rect, style, 0);
- if (gui_sub_pos_x >= 0)
- x = gui_sub_pos_x;
- if (gui_sub_pos_y >= 0)
- y = gui_sub_pos_y;
+ if (gui_video_pos_x >= 0)
+ x = gui_video_pos_x;
+ if (gui_video_pos_y >= 0)
+ y = gui_video_pos_y;
/* out of bounds check */
if (x <= -1 || (x+(rect.right-rect.left) > GetSystemMetrics(SM_CXSCREEN)))
@@ -1434,7 +1434,7 @@
hWnd = CreateWindowEx(0, "MPlayer - Video", "MPlayer - Video", style,
x, y, rect.right-rect.left, rect.bottom-rect.top,
- gui->subwindow, NULL, instance, NULL);
+ gui->videowindow, NULL, instance, NULL);
/* load all the window images */
window_render(gui, hWnd, hdc, priv, desc, binfo);
@@ -1442,11 +1442,11 @@
/* enable drag and drop support */
DragAcceptFiles(hWnd, TRUE);
- gui->subwindow = hWnd;
- if(sub_window)
- WinID = gui->subwindow;
- ShowWindow(gui->subwindow, SW_SHOW);
- UpdateWindow(gui->subwindow);
+ gui->videowindow = hWnd;
+ if(video_window)
+ WinID = gui->videowindow;
+ ShowWindow(gui->videowindow, SW_SHOW);
+ UpdateWindow(gui->videowindow);
return 0;
}
@@ -1601,7 +1601,7 @@
sprintf(temp, "%s/%s", skindir, skinName);
if(create_window(gui, temp)) return NULL;
- if(create_subwindow(gui)) return NULL;
+ if(create_videowindow(gui)) return NULL;
if(console) console_toggle();
return gui;
}
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/win32/gui.h
--- a/gui/win32/gui.h Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/win32/gui.h Sat Mar 03 16:45:15 2012 +0000
@@ -31,9 +31,9 @@
#include "skinload.h"
#include "playlist.h"
-extern float sub_aspect;
+extern float video_aspect;
extern play_tree_t* playtree;
-extern int sub_window;
+extern int video_window;
extern int console;
extern NOTIFYICONDATA nid;
extern char *codecname;
@@ -60,7 +60,7 @@
window_priv_t **window_priv;
HWND mainwindow;
- HWND subwindow;
+ HWND videowindow;
/* for event handling */
widget *activewidget;
@@ -73,7 +73,7 @@
HMENU traymenu;
HMENU trayplaymenu;
HMENU trayplaybackmenu;
- HMENU submenu;
+ HMENU videomenu;
HMENU subtitlemenu;
HMENU aspectmenu;
HMENU dvdmenu;
@@ -101,7 +101,7 @@
gui_t *create_gui(char *skindir, void (*playercontrol)(int event));
int destroy_window(gui_t *gui);
int create_window(gui_t *gui, char *skindir);
-int create_subwindow(gui_t *gui);
+int create_videowindow(gui_t *gui);
int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear);
void capitalize(char *filename);
LPSTR acp(LPCSTR utf8);
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/win32/interface.c
--- a/gui/win32/interface.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/win32/interface.c Sat Mar 03 16:45:15 2012 +0000
@@ -79,7 +79,7 @@
char *codecname = NULL;
int uiGotoTheNext = 1;
static gui_t *mygui = NULL;
-static int update_subwindow(void);
+static int update_videowindow(void);
static RECT old_rect;
static DWORD style;
static HANDLE hThread;
@@ -477,10 +477,10 @@
{
if(!guiInfo.sh_video) return;
- if(sub_window)
+ if(video_window)
{
- if(!fullscreen && IsWindowVisible(mygui->subwindow) && !IsIconic(mygui->subwindow))
- GetWindowRect(mygui->subwindow, &old_rect);
+ if(!fullscreen && IsWindowVisible(mygui->videowindow) && !IsIconic(mygui->videowindow))
+ GetWindowRect(mygui->videowindow, &old_rect);
if(fullscreen)
{
@@ -490,11 +490,11 @@
fullscreen = 1;
style = WS_VISIBLE | WS_POPUP;
}
- SetWindowLong(mygui->subwindow, GWL_STYLE, style);
- update_subwindow();
+ SetWindowLong(mygui->videowindow, GWL_STYLE, style);
+ update_videowindow();
}
video_out->control(VOCTRL_FULLSCREEN, 0);
- if(sub_window) ShowWindow(mygui->subwindow, SW_SHOW);
+ if(video_window) ShowWindow(mygui->videowindow, SW_SHOW);
}
static unsigned __stdcall GuiThread(void* param)
@@ -618,8 +618,8 @@
case GUI_SET_AUDIO:
{
if (data && !guiInfo.sh_video) guiInfo.VideoWindow = 0;
- if(IsWindowVisible(mygui->subwindow) && !guiInfo.VideoWindow)
- ShowWindow(mygui->subwindow, SW_HIDE);
+ if(IsWindowVisible(mygui->videowindow) && !guiInfo.VideoWindow)
+ ShowWindow(mygui->videowindow, SW_HIDE);
break;
}
case GUI_SET_CONTEXT:
@@ -633,11 +633,11 @@
sh_video_t *sh = data;
codecname = sh->codec->name;
- /* we have video, show the subwindow */
- if(!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow))
- ShowWindow(mygui->subwindow, SW_SHOWNORMAL);
+ /* we have video, show the video window */
+ if(!IsWindowVisible(mygui->videowindow) || IsIconic(mygui->videowindow))
+ ShowWindow(mygui->videowindow, SW_SHOWNORMAL);
if(WinID == -1)
- update_subwindow();
+ update_videowindow();
}
break;
@@ -647,9 +647,9 @@
guiInfo.VideoWidth = vo_dwidth;
guiInfo.VideoHeight = vo_dheight;
- sub_aspect = (float)guiInfo.VideoWidth/guiInfo.VideoHeight;
+ video_aspect = (float)guiInfo.VideoWidth/guiInfo.VideoHeight;
if(WinID != -1)
- update_subwindow();
+ update_videowindow();
break;
}
case GUI_SET_STREAM:
@@ -699,7 +699,7 @@
guiInfo.Playing = GUI_STOP;
if(movie_aspect >= 0)
movie_aspect = -1;
- update_subwindow();
+ update_videowindow();
break;
}
case GUI_PAUSE:
@@ -799,7 +799,7 @@
if(style == WS_VISIBLE | WS_POPUP)
{
style = WS_OVERLAPPEDWINDOW | WS_SIZEBOX;
- SetWindowLong(mygui->subwindow, GWL_STYLE, style);
+ SetWindowLong(mygui->videowindow, GWL_STYLE, style);
}
gui(GUI_SET_STATE, (void *) GUI_STOP);
break;
@@ -890,37 +890,37 @@
return result;
}
-static int update_subwindow(void)
+static int update_videowindow(void)
{
int x,y;
RECT rd;
WINDOWPOS wp;
- if(!sub_window)
+ if(!video_window)
{
WinID = -1;
- if(IsWindowVisible(mygui->subwindow) && guiInfo.sh_video && guiInfo.Playing)
+ if(IsWindowVisible(mygui->videowindow) && guiInfo.sh_video && guiInfo.Playing)
{
- ShowWindow(mygui->subwindow, SW_HIDE);
+ ShowWindow(mygui->videowindow, SW_HIDE);
return 0;
}
else if(!guiInfo.VideoWindow)
return 0;
- else ShowWindow(mygui->subwindow, SW_SHOW);
+ else ShowWindow(mygui->videowindow, SW_SHOW);
}
/* we've come out of fullscreen at the end of file */
- if((!IsWindowVisible(mygui->subwindow) || IsIconic(mygui->subwindow)) && guiInfo.VideoWindow)
- ShowWindow(mygui->subwindow, SW_SHOWNORMAL);
+ if((!IsWindowVisible(mygui->videowindow) || IsIconic(mygui->videowindow)) && guiInfo.VideoWindow)
+ ShowWindow(mygui->videowindow, SW_SHOWNORMAL);
/* get our current window coordinates */
- GetWindowRect(mygui->subwindow, &rd);
+ GetWindowRect(mygui->videowindow, &rd);
x = rd.left;
y = rd.top;
- /* restore sub window position when coming out of fullscreen */
+ /* restore video window position when coming out of fullscreen */
if(x <= 0) x = old_rect.left;
if(y <= 0) y = old_rect.top;
@@ -930,12 +930,12 @@
int i;
for (i=0; iskin->windowcount; i++)
- if(mygui->skin->windows[i]->type == wiSub)
+ if(mygui->skin->windows[i]->type == wiVideo)
desc = mygui->skin->windows[i];
rd.right = rd.left+desc->base->bitmap[0]->width;
rd.bottom = rd.top+desc->base->bitmap[0]->height;
- sub_aspect = (float)(rd.right-rd.left)/(rd.bottom-rd.top);
+ video_aspect = (float)(rd.right-rd.left)/(rd.bottom-rd.top);
}
else
{
@@ -943,14 +943,14 @@
rd.bottom = rd.top+guiInfo.VideoHeight;
if (movie_aspect > 0.0) // forced aspect from the cmdline
- sub_aspect = movie_aspect;
+ video_aspect = movie_aspect;
}
AdjustWindowRect(&rd, WS_OVERLAPPEDWINDOW | WS_SIZEBOX, 0);
- SetWindowPos(mygui->subwindow, 0, x, y, rd.right-rd.left, rd.bottom-rd.top, SWP_NOOWNERZORDER);
+ SetWindowPos(mygui->videowindow, 0, x, y, rd.right-rd.left, rd.bottom-rd.top, SWP_NOOWNERZORDER);
- wp.hwnd = mygui->subwindow;
+ wp.hwnd = mygui->videowindow;
wp.x = rd.left;
wp.y = rd.top;
wp.cx = rd.right-rd.left;
@@ -959,9 +959,9 @@
/* erase the bitmap image if there's video */
if(guiInfo.Playing != GUI_STOP && guiInfo.sh_video)
- SendMessage(mygui->subwindow, WM_ERASEBKGND, (WPARAM)GetDC(mygui->subwindow), 0);
+ SendMessage(mygui->videowindow, WM_ERASEBKGND, (WPARAM)GetDC(mygui->videowindow), 0);
/* reset the window aspect */
- SendMessage(mygui->subwindow, WM_WINDOWPOSCHANGED, 0, (LPARAM)&wp);
+ SendMessage(mygui->videowindow, WM_WINDOWPOSCHANGED, 0, (LPARAM)&wp);
return 0;
}
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/win32/preferences.c
--- a/gui/win32/preferences.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/win32/preferences.c Sat Mar 03 16:45:15 2012 +0000
@@ -51,7 +51,7 @@
gtkAOExtraStereo = 0;
gtkAOExtraStereoMul = 1.0;
audio_delay = 0.0;
- sub_window = 1;
+ video_window = 1;
gtkCacheOn = 0;
gtkCacheSize = 2048;
gtkAutoSyncOn = 0;
@@ -219,10 +219,10 @@
NULL);
SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
- btn = CreateWindow("button", acp(MSGTR_PREFERENCES_VideoInSubwin),
+ btn = CreateWindow("button", acp(MSGTR_PREFERENCES_ShowInVideoWin),
WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
10, 249, 250, 25,
- hwnd, (HMENU) ID_SUBWINDOW,
+ hwnd, (HMENU) ID_VIDEOWINDOW,
((LPCREATESTRUCT) lParam) -> hInstance,
NULL);
SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
@@ -429,8 +429,8 @@
else gtkAutoSync = 0;
SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETPOS32, 0, (LPARAM)gtkAutoSync);
- if(sub_window)
- SendDlgItemMessage(hwnd, ID_SUBWINDOW, BM_SETCHECK, 1, 0);
+ if(video_window)
+ SendDlgItemMessage(hwnd, ID_VIDEOWINDOW, BM_SETCHECK, 1, 0);
if(!osd_level)
SendDlgItemMessage(hwnd, ID_NONE, BM_SETCHECK, 1, 0);
@@ -529,7 +529,7 @@
SendDlgItemMessage(hwnd, ID_EXTRASTEREO, BM_SETCHECK, 0, 0);
SendDlgItemMessage(hwnd, ID_CACHE, BM_SETCHECK, 0, 0);
SendDlgItemMessage(hwnd, ID_AUTOSYNC, BM_SETCHECK, 0, 0);
- SendDlgItemMessage(hwnd, ID_SUBWINDOW, BM_SETCHECK, 1, 0);
+ SendDlgItemMessage(hwnd, ID_VIDEOWINDOW, BM_SETCHECK, 1, 0);
SendDlgItemMessage(hwnd, ID_NONE, BM_SETCHECK, 0, 0);
SendDlgItemMessage(hwnd, ID_OSD1, BM_SETCHECK, 1, 0);
SendDlgItemMessage(hwnd, ID_OSD2, BM_SETCHECK, 0, 0);
@@ -617,10 +617,10 @@
else gtkAutoSyncOn = 0;
gtkAutoSync = SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_GETPOS32, 0, 0);
- /* sub window */
- if(SendDlgItemMessage(hwnd, ID_SUBWINDOW, BM_GETCHECK, 0, 0) == BST_CHECKED)
- sub_window = 1;
- else sub_window = 0;
+ /* video window */
+ if(SendDlgItemMessage(hwnd, ID_VIDEOWINDOW, BM_GETCHECK, 0, 0) == BST_CHECKED)
+ video_window = 1;
+ else video_window = 0;
/* osd level */
if(SendDlgItemMessage(hwnd, ID_NONE, BM_GETCHECK, 0, 0) == BST_CHECKED)
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/win32/skinload.c
--- a/gui/win32/skinload.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/win32/skinload.c Sat Mar 03 16:45:15 2012 +0000
@@ -618,9 +618,9 @@
mywindow = skin->windows[(skin->windowcount) - 1] = calloc(1, sizeof(window));
mywindow->name = strdup(desc + 7);
if(!strncmp(desc + 7, "main", 4)) mywindow->type = wiMain;
- else if(!strncmp(desc+7, "sub", 3))
+ else if(!strncmp(desc+7, "video", 5) || !strncmp(desc+7, "sub", 3)) // legacy
{
- mywindow->type = wiSub;
+ mywindow->type = wiVideo;
mywindow->decoration = 1;
}
else if(!strncmp(desc + 7, "menu", 4)) mywindow->type = wiMenu;
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/win32/skinload.h
--- a/gui/win32/skinload.h Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/win32/skinload.h Sat Mar 03 16:45:15 2012 +0000
@@ -126,7 +126,7 @@
/* --- Window types --- */
#define wiMain 1
-#define wiSub 2
+#define wiVideo 2
#define wiMenu 3
#define wiPlaybar 4
diff -r f2c90c9dd61c -r ac6b38cd0d45 gui/win32/wincfg.c
--- a/gui/win32/wincfg.c Sat Mar 03 14:03:18 2012 +0000
+++ b/gui/win32/wincfg.c Sat Mar 03 16:45:15 2012 +0000
@@ -49,14 +49,14 @@
int gtkAutoSyncOn = 0;
int gtkAutoSync = 0;
-int sub_window = 1;
+int video_window = 1;
int console = 0;
int gui_save_pos = 1;
int gui_main_pos_x = -2;
int gui_main_pos_y = -2;
-int gui_sub_pos_x = -1;
-int gui_sub_pos_y = -1;
+int gui_video_pos_x = -1;
+int gui_video_pos_y = -1;
m_config_t *gui_conf;
static const m_option_t gui_opts[] =
@@ -80,9 +80,9 @@
{ "gui_skin", &skinName, CONF_TYPE_STRING, 0, 0, 0, NULL },
{ "gui_main_pos_x", &gui_main_pos_x, CONF_TYPE_INT, 0, 0, 0, NULL },
{ "gui_main_pos_y", &gui_main_pos_y, CONF_TYPE_INT, 0, 0, 0, NULL },
- { "gui_sub_pos_x", &gui_sub_pos_x, CONF_TYPE_INT, 0, 0, 0, NULL },
- { "gui_sub_pos_y", &gui_sub_pos_y, CONF_TYPE_INT, 0, 0, 0, NULL },
- { "sub_window", &sub_window, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+ { "gui_sub_pos_x", &gui_video_pos_x, CONF_TYPE_INT, 0, 0, 0, NULL },
+ { "gui_sub_pos_y", &gui_video_pos_y, CONF_TYPE_INT, 0, 0, 0, NULL },
+ { "sub_window", &video_window, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{ "console", &console, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{ "idle", &player_idle_mode, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{ NULL, NULL, 0, 0, 0, 0, NULL }
diff -r f2c90c9dd61c -r ac6b38cd0d45 help/help_mp-de.h
--- a/help/help_mp-de.h Sat Mar 03 14:03:18 2012 +0000
+++ b/help/help_mp-de.h Sat Mar 03 16:45:15 2012 +0000
@@ -1055,7 +1055,7 @@
#define MSGTR_PREFERENCES_PriorityNormal "normal"
#define MSGTR_PREFERENCES_PriorityNormalAbove "höher als normal"
#define MSGTR_PREFERENCES_PriorityNormalBelow "niedriger als normal"
-#define MSGTR_PREFERENCES_VideoInSubwin "Video in Unterfenster anzeigen (nur DirectX)"
+#define MSGTR_PREFERENCES_ShowInVideoWin "Im Videofenster anzeigen (nur DirectX)"
// ======================= Videoausgabetreiber ========================
diff -r f2c90c9dd61c -r ac6b38cd0d45 help/help_mp-en.h
--- a/help/help_mp-en.h Sat Mar 03 14:03:18 2012 +0000
+++ b/help/help_mp-en.h Sat Mar 03 16:45:15 2012 +0000
@@ -849,7 +849,7 @@
#define MSGTR_PREFERENCES_PriorityNormal "normal"
#define MSGTR_PREFERENCES_PriorityNormalAbove "above normal"
#define MSGTR_PREFERENCES_PriorityNormalBelow "below normal"
-#define MSGTR_PREFERENCES_VideoInSubwin "Display videos in the sub window (DirectX only)"
+#define MSGTR_PREFERENCES_ShowInVideoWin "Display in the video window (DirectX only)"
// ======================= video output drivers ========================
diff -r f2c90c9dd61c -r ac6b38cd0d45 help/help_mp-zh_CN.h
--- a/help/help_mp-zh_CN.h Sat Mar 03 14:03:18 2012 +0000
+++ b/help/help_mp-zh_CN.h Sat Mar 03 16:45:15 2012 +0000
@@ -849,7 +849,6 @@
#define MSGTR_PREFERENCES_PriorityNormal "标准"
#define MSGTR_PREFERENCES_PriorityNormalAbove "高于标准"
#define MSGTR_PREFERENCES_PriorityNormalBelow "低于标准"
-#define MSGTR_PREFERENCES_VideoInSubwin "在子窗口中显示视频(仅用于 DirectX)"
// ======================= video output drivers ========================