Changeset 42248 in vbox
- Timestamp:
- Jul 20, 2012 8:39:45 AM (13 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r40282 r42248 827 827 } 828 828 829 void Display::SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel, ULONG aDisplay) 829 void Display::SetVideoModeHint(ULONG aDisplay, BOOL aEnabled, 830 BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY, 831 ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel) 830 832 { 831 833 PPDMIVMMDEVPORT pVMMDevPort = gVMMDev->getVMMDevPort (); 834 NOREF(aEnabled); 835 NOREF(aChangeOrigin); 836 NOREF(aOriginX); 837 NOREF(aOriginY); 832 838 833 839 if (pVMMDevPort) -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h
r35346 r42248 43 43 44 44 void updatePointerShape(bool fVisible, bool fAlpha, uint32_t xHot, uint32_t yHot, uint32_t width, uint32_t height, void *pShape); 45 void SetVideoModeHint(ULONG a Width, ULONG aHeight, ULONG aBitsPerPixel, ULONG aDisplay);45 void SetVideoModeHint(ULONG aDisplay, BOOL aEnabled, BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY, ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel); 46 46 47 47 static const PDMDRVREG DrvReg; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r42176 r42248 243 243 int handleCloseMedium(HandlerArg *a); 244 244 int parseDiskType(const char *psz, MediumType_T *pDiskType); 245 int parseBool(const char *psz, bool *pb); 245 246 246 247 /* VBoxManageStorageController.cpp */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r41925 r42248 882 882 else if (!strcmp(a->argv[1], "setvideomodehint")) 883 883 { 884 if (a->argc != 5 && a->argc != 6 )884 if (a->argc != 5 && a->argc != 6 && a->argc != 7 && a->argc != 9) 885 885 { 886 886 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters"); … … 888 888 break; 889 889 } 890 uint32_t xres = RTStrToUInt32(a->argv[2]); 891 uint32_t yres = RTStrToUInt32(a->argv[3]); 892 uint32_t bpp = RTStrToUInt32(a->argv[4]); 893 uint32_t displayIdx = 0; 894 if (a->argc == 6) 895 displayIdx = RTStrToUInt32(a->argv[5]); 890 bool fEnabled = true; 891 uint32_t uXRes = RTStrToUInt32(a->argv[2]); 892 uint32_t uYRes = RTStrToUInt32(a->argv[3]); 893 uint32_t uBpp = RTStrToUInt32(a->argv[4]); 894 uint32_t uDisplayIdx = 0; 895 bool fChangeOrigin = false; 896 int32_t iOriginX = 0; 897 int32_t iOriginY = 0; 898 if (a->argc >= 6) 899 uDisplayIdx = RTStrToUInt32(a->argv[5]); 900 if (a->argc >= 7) 901 { 902 int vrc = parseBool(a->argv[6], &fEnabled); 903 if (RT_FAILURE(vrc)) 904 { 905 errorSyntax(USAGE_CONTROLVM, "Either \"yes\" or \"no\" is expected"); 906 rc = E_FAIL; 907 break; 908 } 909 fEnabled = !RTStrICmp(a->argv[6], "yes"); 910 } 911 if (a->argc == 9) 912 { 913 iOriginX = RTStrToInt32(a->argv[7]); 914 iOriginY = RTStrToInt32(a->argv[8]); 915 fChangeOrigin = true; 916 } 896 917 897 918 ComPtr<IDisplay> display; 898 919 CHECK_ERROR_BREAK(console, COMGETTER(Display)(display.asOutParam())); 899 CHECK_ERROR_BREAK(display, SetVideoModeHint(xres, yres, bpp, displayIdx)); 920 CHECK_ERROR_BREAK(display, SetVideoModeHint(uDisplayIdx, fEnabled, 921 fChangeOrigin, iOriginX, iOriginY, 922 uXRes, uYRes, uBpp)); 900 923 } 901 924 else if (!strcmp(a->argv[1], "setcredentials")) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r41348 r42248 122 122 123 123 /** @todo move this into getopt, as getting bool values is generic */ 124 staticint parseBool(const char *psz, bool *pb)124 int parseBool(const char *psz, bool *pb) 125 125 { 126 126 int rc = VINF_SUCCESS; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r42236 r42248 433 433 " vrdeproperty <name=[value]> |\n" 434 434 " vrdevideochannelquality <percent>\n" 435 " setvideomodehint <xres> <yres> <bpp> [display] |\n" 435 " setvideomodehint <xres> <yres> <bpp>\n" 436 " [[<display>] [<enabled:yes|no>\n" 437 " [<xorigin> <yorigin>]]] |\n" 436 438 " screenshotpng <file> [display] |\n" 437 439 " setcredentials <username> <password> <domain>\n" -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r41216 r42248 2623 2623 */ 2624 2624 /* communicate the resize event to the guest */ 2625 gpDisplay->SetVideoModeHint(uResizeWidth, uResizeHeight, 0, 0); 2625 gpDisplay->SetVideoModeHint(0 /*=display*/, true /*=enabled*/, false /*=changeOrigin*/, 2626 0 /*=originX*/, 0 /*=originY*/, 2627 uResizeWidth, uResizeHeight, 0 /*=don't change bpp*/); 2626 2628 break; 2627 2629 … … 4946 4948 gpFramebuffer[0]->setFullscreen(enable); 4947 4949 gfIgnoreNextResize = TRUE; 4948 gpDisplay->SetVideoModeHint(NewWidth, NewHeight, 0, 0); 4950 gpDisplay->SetVideoModeHint(0 /*=display*/, true /*=enabled*/, 4951 false /*=changeOrigin*/, 0 /*=originX*/, 0 /*=originY*/, 4952 NewWidth, NewHeight, 0 /*don't change bpp*/); 4949 4953 } 4950 4954 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r41689 r42248 176 176 177 177 /* Send new size-hint to the guest: */ 178 session().GetConsole().GetDisplay().SetVideoModeHint( newSize.width(), newSize.height(), 0, screenId());178 session().GetConsole().GetDisplay().SetVideoModeHint(screenId(), true, false, 0, 0, newSize.width(), newSize.height(), 0); 179 179 /* And track whether we have had a "normal" resize since the last 180 180 * fullscreen resize hint was sent: */ -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r42194 r42248 14214 14214 <interface 14215 14215 name="IDisplay" extends="$unknown" 14216 uuid=" 4b75c45c-e22e-4b75-b7cd-7ce9a83bb36e"14216 uuid="b83ee395-8679-40ca-8d60-1a0cbe724930" 14217 14217 wsmap="managed" 14218 14218 > … … 14278 14278 14279 14279 </desc> 14280 <param name="display" type="unsigned long" dir="in"> 14281 <desc> 14282 The number of the guest display to send the hint to. 14283 </desc> 14284 </param> 14285 <param name="enabled" type="boolean" dir="in"> 14286 <desc> 14287 @c True, if this guest screen is enabled, 14288 @c False otherwise. 14289 </desc> 14290 </param> 14291 <param name="changeOrigin" type="boolean" dir="in"> 14292 <desc> 14293 @c True, if the origin of the guest screen should be changed, 14294 @c False otherwise. 14295 </desc> 14296 </param> 14297 <param name="originX" type="long" dir="in"> 14298 <desc> 14299 The X origin of the guest screen. 14300 </desc> 14301 </param> 14302 <param name="originY" type="long" dir="in"> 14303 <desc> 14304 The Y origin of the guest screen. 14305 </desc> 14306 </param> 14280 14307 <param name="width" type="unsigned long" dir="in"/> 14281 14308 <param name="height" type="unsigned long" dir="in"/> 14282 14309 <param name="bitsPerPixel" type="unsigned long" dir="in"/> 14283 <param name="display" type="unsigned long" dir="in"/>14284 14310 </method> 14285 14311 -
trunk/src/VBox/Main/include/DisplayImpl.h
r41404 r42248 161 161 STDMETHOD(SetFramebuffer)(ULONG aScreenId, IFramebuffer *aFramebuffer); 162 162 STDMETHOD(GetFramebuffer)(ULONG aScreenId, IFramebuffer **aFramebuffer, LONG *aXOrigin, LONG *aYOrigin); 163 STDMETHOD(SetVideoModeHint)(ULONG width, ULONG height, ULONG bitsPerPixel, ULONG display);163 STDMETHOD(SetVideoModeHint)(ULONG aDisplay, BOOL aEnabled, BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY, ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel); 164 164 STDMETHOD(TakeScreenShot)(ULONG aScreenId, BYTE *address, ULONG width, ULONG height); 165 165 STDMETHOD(TakeScreenShotToArray)(ULONG aScreenId, ULONG width, ULONG height, ComSafeArrayOut(BYTE, aScreenData)); -
trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
r41352 r42248 1265 1265 ConsoleVRDPServer *server = static_cast<ConsoleVRDPServer*>(pvCallback); 1266 1266 1267 server->mConsole->getDisplay()->SetVideoModeHint(cWidth, cHeight, cBitsPerPixel, uScreenId); 1267 server->mConsole->getDisplay()->SetVideoModeHint(uScreenId, TRUE /*=enabled*/, 1268 FALSE /*=changeOrigin*/, 0/*=OriginX*/, 0/*=OriginY*/, 1269 cWidth, cHeight, cBitsPerPixel); 1268 1270 } 1269 1271 -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r41597 r42248 2127 2127 } 2128 2128 2129 STDMETHODIMP Display::SetVideoModeHint(ULONG aWidth, ULONG aHeight, 2130 ULONG aBitsPerPixel, ULONG aDisplay) 2129 STDMETHODIMP Display::SetVideoModeHint(ULONG aDisplay, BOOL aEnabled, 2130 BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY, 2131 ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel) 2131 2132 { 2132 2133 AutoCaller autoCaller(this); … … 2136 2137 2137 2138 CHECK_CONSOLE_DRV (mpDrv); 2139 2140 /* XXX Ignore these parameters for now: */ 2141 NOREF(aChangeOrigin); 2142 NOREF(aOriginX); 2143 NOREF(aOriginY); 2144 NOREF(aEnabled); 2138 2145 2139 2146 /*
Note:
See TracChangeset
for help on using the changeset viewer.