Mercurial > mplayer.hg
comparison gui/ui/actions.c @ 34697:ac6b38cd0d45
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.
author | ib |
---|---|
date | Sat, 03 Mar 2012 16:45:15 +0000 |
parents | eeb74ce15120 |
children | 80fe9ad7f318 |
comparison
equal
deleted
inserted
replaced
34696:f2c90c9dd61c | 34697:ac6b38cd0d45 |
---|---|
43 void uiFullScreen(void) | 43 void uiFullScreen(void) |
44 { | 44 { |
45 if (!guiInfo.VideoWindow) | 45 if (!guiInfo.VideoWindow) |
46 return; | 46 return; |
47 | 47 |
48 wsFullScreen(&guiApp.subWindow); | 48 wsFullScreen(&guiApp.videoWindow); |
49 | 49 |
50 vo_fs = guiApp.subWindow.isFullScreen; | 50 vo_fs = guiApp.videoWindow.isFullScreen; |
51 | 51 |
52 wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.subWindow.isFullScreen); | 52 wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.videoWindow.isFullScreen); |
53 | 53 |
54 if (guiApp.menuIsPresent) | 54 if (guiApp.menuIsPresent) |
55 wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.subWindow.isFullScreen); | 55 wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen); |
56 | 56 |
57 if (guiInfo.Playing) | 57 if (guiInfo.Playing) |
58 wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0); | 58 wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0); |
59 else | 59 else |
60 wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B); | 60 wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B); |
61 } | 61 } |
62 | 62 |
63 void uiPlay(void) | 63 void uiPlay(void) |
64 { | 64 { |
65 if (guiInfo.Playing == GUI_PLAY) | 65 if (guiInfo.Playing == GUI_PLAY) |
75 uiPause(); | 75 uiPause(); |
76 return; | 76 return; |
77 } | 77 } |
78 | 78 |
79 gui(GUI_SET_STATE, (void *)GUI_PLAY); | 79 gui(GUI_SET_STATE, (void *)GUI_PLAY); |
80 uiSubRender = 0; | 80 uiVideoRender = 0; |
81 wsSetBackgroundRGB(&guiApp.subWindow, 0, 0, 0); | 81 wsSetBackgroundRGB(&guiApp.videoWindow, 0, 0, 0); |
82 wsClearWindow(guiApp.subWindow); | 82 wsClearWindow(guiApp.videoWindow); |
83 } | 83 } |
84 | 84 |
85 void uiPause(void) | 85 void uiPause(void) |
86 { | 86 { |
87 if (!guiInfo.Playing) | 87 if (!guiInfo.Playing) |
151 wsSetShape(&guiApp.menuWindow, guiApp.menu.Mask.Image); | 151 wsSetShape(&guiApp.menuWindow, guiApp.menu.Mask.Image); |
152 wsVisibleWindow(&guiApp.menuWindow, wsHideWindow); | 152 wsVisibleWindow(&guiApp.menuWindow, wsHideWindow); |
153 } else | 153 } else |
154 uiMenuInit(); | 154 uiMenuInit(); |
155 | 155 |
156 /* reload sub window */ | 156 /* reload video window */ |
157 | 157 |
158 if (guiApp.sub.Bitmap.Image) | 158 if (guiApp.video.Bitmap.Image) |
159 wsResizeImage(&guiApp.subWindow, guiApp.sub.Bitmap.Width, guiApp.sub.Bitmap.Height); | 159 wsResizeImage(&guiApp.videoWindow, guiApp.video.Bitmap.Width, guiApp.video.Bitmap.Height); |
160 | 160 |
161 if (!guiApp.subWindow.isFullScreen && !guiInfo.Playing) { | 161 if (!guiApp.videoWindow.isFullScreen && !guiInfo.Playing) { |
162 wsResizeWindow(&guiApp.subWindow, guiApp.sub.width, guiApp.sub.height); | 162 wsResizeWindow(&guiApp.videoWindow, guiApp.video.width, guiApp.video.height); |
163 wsMoveWindow(&guiApp.subWindow, False, guiApp.sub.x, guiApp.sub.y); | 163 wsMoveWindow(&guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y); |
164 } | 164 } |
165 | 165 |
166 if (guiApp.sub.Bitmap.Image) | 166 if (guiApp.video.Bitmap.Image) |
167 wsConvert(&guiApp.subWindow, guiApp.sub.Bitmap.Image); | 167 wsConvert(&guiApp.videoWindow, guiApp.video.Bitmap.Image); |
168 | 168 |
169 if (!guiInfo.Playing) { | 169 if (!guiInfo.Playing) { |
170 uiSubRender = 1; | 170 uiVideoRender = 1; |
171 wsSetBackgroundRGB(&guiApp.subWindow, guiApp.sub.R, guiApp.sub.G, guiApp.sub.B); | 171 wsSetBackgroundRGB(&guiApp.videoWindow, guiApp.video.R, guiApp.video.G, guiApp.video.B); |
172 wsClearWindow(guiApp.subWindow); | 172 wsClearWindow(guiApp.videoWindow); |
173 wsPostRedisplay(&guiApp.subWindow); | 173 wsPostRedisplay(&guiApp.videoWindow); |
174 } | 174 } |
175 | 175 |
176 /* reload playbar */ | 176 /* reload playbar */ |
177 | 177 |
178 if (bprev) | 178 if (bprev) |
211 mainVisible = 1; | 211 mainVisible = 1; |
212 | 212 |
213 btnModify(evSetVolume, guiInfo.Volume); | 213 btnModify(evSetVolume, guiInfo.Volume); |
214 btnModify(evSetBalance, guiInfo.Balance); | 214 btnModify(evSetBalance, guiInfo.Balance); |
215 btnModify(evSetMoviePosition, guiInfo.Position); | 215 btnModify(evSetMoviePosition, guiInfo.Position); |
216 btnSet(evFullScreen, (guiApp.subWindow.isFullScreen ? btnPressed : btnReleased)); | 216 btnSet(evFullScreen, (guiApp.videoWindow.isFullScreen ? btnPressed : btnReleased)); |
217 | 217 |
218 wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.subWindow.isFullScreen); | 218 wsSetLayer(wsDisplay, guiApp.mainWindow.WindowID, guiApp.videoWindow.isFullScreen); |
219 wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.subWindow.isFullScreen); | 219 wsSetLayer(wsDisplay, guiApp.menuWindow.WindowID, guiApp.videoWindow.isFullScreen); |
220 } | 220 } |
221 | 221 |
222 void uiSetFileName(char *dir, char *name, int type) | 222 void uiSetFileName(char *dir, char *name, int type) |
223 { | 223 { |
224 if (!name) | 224 if (!name) |