儲存庫 vbox 的更動 17201
- 時間撮記:
- 2009-2-27 下午12:51:37 (16 年 以前)
- 位置:
- trunk/src/VBox/Frontends/VirtualBox
- 檔案:
-
- 修改 8 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r17175 r17201 153 153 VirtualBox_DEFS.darwin = VBOX_GUI_USE_QUARTZ2D VBOX_GUI_USE_QIMAGE VBOX_WITHOUT_QHTTP 154 154 ifndef VBOX_WITH_COCOA_QT 155 VirtualBox_DEFS.darwin.x86= VBOX_GUI_USE_QUARTZ2DUSE_HID_FOR_MODIFIERS155 VirtualBox_DEFS.darwin.x86= USE_HID_FOR_MODIFIERS 156 156 endif 157 157 VirtualBox_DEFS.freebsd = VBOX_GUI_USE_QIMAGE VBOX_GUI_USE_SDL -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r16589 r17201 41 41 #endif 42 42 #ifdef Q_WS_MAC 43 # ifdef QT_MAC_USE_COCOA 44 /** @todo Carbon -> Cocoa */ 45 # else 46 # undef PAGE_SIZE 47 # undef PAGE_SHIFT 48 # include <Carbon/Carbon.h> 49 # endif 43 # include <ApplicationServices/ApplicationServices.h> 50 44 #endif 51 45 … … 396 390 QRect mNormalGeometry; 397 391 Qt::WindowFlags mSavedFlags; 398 # ifdef QT_MAC_USE_COCOA399 /** @todo Carbon -> Cocoa */400 # else401 392 /* For the fade effect if the the window goes fullscreen */ 402 393 CGDisplayFadeReservationToken mFadeToken; 403 # endif404 394 #endif 405 395 }; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxUtils-darwin.h
r17175 r17201 41 41 # include <iprt/cdefs.h> /* for __BEGIN_DECLS/__END_DECLS & stuff */ 42 42 # include <qglobal.h> /* for QT_MAC_USE_COCOA */ 43 44 # include <ApplicationServices/ApplicationServices.h> 43 45 class QWidget; 44 46 class QToolBar; … … 65 67 ********************************************************************************/ 66 68 NativeWindowRef darwinToNativeWindowImpl (NativeViewRef aView); 69 NativeViewRef darwinToNativeViewImpl (NativeWindowRef aWindow); 67 70 68 71 /******************************************************************************** … … 74 77 void darwinSetShowsResizeIndicatorImpl (NativeWindowRef aWindow, bool aEnabled); 75 78 void darwinSetHidesAllTitleButtonsImpl (NativeWindowRef aWindow); 79 void darwinSetShowsWindowTransparentImpl (NativeWindowRef aWindow, bool aEnabled); 76 80 void darwinSetMouseCoalescingEnabled (bool aEnabled); 77 81 … … 82 86 ********************************************************************************/ 83 87 void darwinWindowAnimateResizeImpl (NativeWindowRef aWindow, int x, int y, int width, int height); 88 void darwinWindowInvalidateShapeImpl (NativeWindowRef aWindow); 89 void darwinWindowInvalidateShadowImpl (NativeWindowRef aWindow); 90 84 91 85 92 __END_DECLS … … 119 126 NativeWindowRef darwinToNativeWindow (NativeViewRef aView); 120 127 128 /** 129 * Returns a reference to the native View of the Window. 130 * 131 * @returns either HIViewRef or NSView* of the Window. 132 * @param aWidget Pointer to the native Window 133 */ 134 NativeViewRef darwinToNativeView (NativeWindowRef aWindow); 135 121 136 /******************************************************************************** 122 137 * … … 127 142 void darwinSetShowsResizeIndicator (QWidget *aWidget, bool aEnabled); 128 143 void darwinSetHidesAllTitleButtons (QWidget *aWidget); 144 void darwinSetShowsWindowTransparent (QWidget *aWidget, bool aEnabled); 129 145 void darwinDisableIconsInMenus (void); 130 146 … … 135 151 ********************************************************************************/ 136 152 void darwinWindowAnimateResize (QWidget *aWidget, const QRect &aTarget); 153 void darwinWindowInvalidateShape (QWidget *aWidget); 154 void darwinWindowInvalidateShadow (QWidget *aWidget); 137 155 QString darwinSystemLanguage (void); 138 156 QPixmap darwinCreateDragPixmap (const QPixmap& aPixmap, const QString &aText); 139 140 141 157 142 158 … … 166 182 return static_cast<CGContext *> (aWidget->macCGHandle()); 167 183 } 184 185 DECLINLINE(CGRect) darwinToCGRect (const QRect& aRect) { return CGRectMake (aRect.x(), aRect.y(), aRect.width(), aRect.height()); } 186 DECLINLINE(CGRect) darwinFlipCGRect (CGRect aRect, int aTargetHeight) { aRect.origin.y = aTargetHeight - aRect.origin.y - aRect.size.height; return aRect; } 168 187 169 188 # ifndef QT_MAC_USE_COCOA … … 202 221 bool darwinIsMenuOpen (void); 203 222 204 void darwinWindowAnimateResize (QWidget *aWidget, const QRect &aTarget);205 223 # endif /* !QT_MAC_USE_COCOA */ 206 224 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r17200 r17201 1167 1167 { 1168 1168 /* Fade back to the normal gamma */ 1169 # ifdef QT_MAC_USE_COCOA1170 /** @todo Carbon -> Cocoa */1171 # else1172 1169 CGDisplayFade (mFadeToken, 0.5, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0.0, 0.0, 0.0, false); 1173 1170 CGReleaseDisplayFadeReservation (mFadeToken); 1174 # endif1175 1171 } 1176 1172 console->setMouseCoalescingEnabled (true); … … 1266 1262 { 1267 1263 /* Clear the background */ 1268 # ifdef QT_MAC_USE_COCOA 1269 /** @todo Carbon -> Cocoa */ 1270 # else 1271 HIRect viewRect; 1272 HIViewGetBounds (::darwinToNativeView (this), &viewRect); 1273 CGContextClearRect (::darwinToCGContextRef (this), viewRect); 1274 # endif 1264 CGContextClearRect (::darwinToCGContextRef (this), ::darwinToCGRect (frameGeometry())); 1275 1265 } 1276 1266 break; … … 2250 2240 { 2251 2241 /* Fade to black */ 2252 # ifdef QT_MAC_USE_COCOA2253 /** @todo Carbon -> Cocoa */2254 # else2255 2242 CGAcquireDisplayFadeReservation (kCGMaxDisplayReservationInterval, &mFadeToken); 2256 2243 CGDisplayFade (mFadeToken, 0.3, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0.0, 0.0, 0.0, true); 2257 # endif2258 2244 } 2259 2245 #endif … … 2381 2367 * calls. */ 2382 2368 /* Undo all mac specific installations */ 2383 # ifdef QT_MAC_USE_COCOA 2384 /** @todo Carbon -> Cocoa */ 2385 # else /* !QT_MAC_USE_COCOA */ 2386 OSStatus status; 2387 WindowRef windowRef = ::darwinToNativeWindow (this); 2388 Assert (VALID_PTR (windowRef)); 2389 /* See above. 2390 status = RemoveEventHandler (mDarwinRegionEventHandlerRef); 2391 AssertCarbonOSStatus (status); 2392 */ 2393 status = ReshapeCustomWindow (windowRef); 2394 AssertCarbonOSStatus (status); 2395 status = SetWindowAlpha (windowRef, 1.0); 2396 AssertCarbonOSStatus (status); 2397 # endif /* !QT_MAC_USE_COCOA */ 2369 ::darwinSetShowsWindowTransparent (this, false); 2398 2370 } 2399 2371 #endif … … 2428 2400 * switch and make this stuff useless with the old winId. So please be 2429 2401 * careful on rearrangement of the method calls. */ 2430 # ifdef QT_MAC_USE_COCOA 2431 /** @todo Carbon -> Cocoa */ 2432 # else /* !QT_MAC_USE_COCOA */ 2433 OSStatus status; 2434 HIViewRef viewRef = ::darwinToNativeView (console->viewport()); 2435 Assert (VALID_PTR (viewRef)); 2436 WindowRef windowRef = ::darwinToNativeWindow (viewRef); 2437 Assert (VALID_PTR (windowRef)); 2438 /* @todo=poetzsch: Currently this isn't necessary. I should 2439 * investigate if we can/should use this. */ 2440 /* 2441 EventTypeSpec wCompositingEvent = { kEventClassWindow, kEventWindowGetRegion }; 2442 status = InstallWindowEventHandler ((WindowPtr)winId(), DarwinRegionHandler, GetEventTypeCount (wCompositingEvent), &wCompositingEvent, &mCurrRegion, &mDarwinRegionEventHandlerRef); 2443 AssertCarbonOSStatus (status); 2444 HIViewRef contentView = 0; 2445 status = HIViewFindByID(HIViewGetRoot(windowRef), kHIViewWindowContentID, &contentView); 2446 AssertCarbonOSStatus (status); 2447 EventTypeSpec drawEvent = { kEventClassControl, kEventControlDraw }; 2448 status = InstallControlEventHandler (contentView, DarwinRegionHandler, GetEventTypeCount (drawEvent), &drawEvent, &contentView, NULL); 2449 AssertCarbonOSStatus (status); 2450 */ 2451 UInt32 features; 2452 status = GetWindowFeatures (windowRef, &features); 2453 AssertCarbonOSStatus (status); 2454 if (( features & kWindowIsOpaque ) != 0) 2455 { 2456 status = HIWindowChangeFeatures (windowRef, 0, kWindowIsOpaque); 2457 AssertCarbonOSStatus (status); 2458 } 2459 status = HIViewReshapeStructure (viewRef); 2460 AssertCarbonOSStatus (status); 2461 status = SetWindowAlpha(windowRef, 0.999); 2462 AssertCarbonOSStatus (status); 2463 /* For now disable the shadow of the window. This feature cause errors 2464 * if a window in vbox looses focus, is reselected and than moved. */ 2465 /** @todo Search for an option to enable this again. A shadow on every 2466 * window has a big coolness factor. */ 2467 status = ChangeWindowAttributes (windowRef, kWindowNoShadowAttribute, 0); 2468 AssertCarbonOSStatus (status); 2469 # endif /* !QT_MAC_USE_COCOA */ 2402 ::darwinSetShowsWindowTransparent (this, true); 2470 2403 } 2471 2404 #endif … … 2513 2446 { 2514 2447 #ifdef Q_WS_MAC 2515 # ifdef QT_MAC_USE_COCOA 2516 /** @todo Carbon -> Cocoa */ 2517 # else /* !QT_MAC_USE_COCOA */ 2448 # ifndef QT_MAC_USE_COCOA 2518 2449 /* setWindowState removes the window group connection somehow. So save it 2519 2450 * temporary. */ 2520 2451 WindowGroupRef g = GetWindowGroup (::darwinToNativeWindow (this)); 2452 # endif /* !QT_MAC_USE_COCOA */ 2521 2453 if (aSeamless) 2522 2454 if (aOn) … … 2526 2458 mSavedFlags = windowFlags(); 2527 2459 /* Remove the frame from the window */ 2460 const QRect fullscreen (qApp->desktop()->screenGeometry (qApp->desktop()->screenNumber (this))); 2528 2461 setParent (0, Qt::Window | Qt::FramelessWindowHint | (windowFlags() & 0xffff0000)); 2462 setGeometry (fullscreen); 2529 2463 /* Set it maximized */ 2530 2464 setWindowState (windowState() ^ Qt::WindowMaximized); … … 2539 2473 /* Here we are going really fullscreen */ 2540 2474 setWindowState (windowState() ^ Qt::WindowFullScreen); 2475 # ifndef QT_MAC_USE_COCOA 2541 2476 /* Reassign the correct window group. */ 2542 2477 SetWindowGroup (::darwinToNativeWindow (this), g); … … 3031 2966 * an repaint only. All the magic clipping stuff is done 3032 2967 * in the paint engine. */ 3033 #ifndef QT_MAC_USE_COCOA 3034 HIViewReshapeStructure (::darwinToNativeView (console->viewport())); 3035 #endif /* QT_MAC_USE_COCOA */ 3036 // HIWindowInvalidateShadow (::darwinToWindowRef (console->viewport())); 3037 // ReshapeCustomWindow (::darwinToWindowRef (this)); 2968 ::darwinWindowInvalidateShape (console->viewport()); 3038 2969 } 3039 2970 else -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBQuartz2D.cpp
r17175 r17201 133 133 CGRect *cgRct = &rgnRcts->rcts[rgnRcts->used]; 134 134 cgRct->origin.x = rect.x(); 135 cgRct->origin.y = rect.y();135 cgRct->origin.y = height() - rect.y() - rect.height(); 136 136 cgRct->size.width = rect.width(); 137 137 cgRct->size.height = rect.height(); … … 159 159 Assert (mImage); 160 160 161 #ifndef QT_MAC_USE_COCOA162 161 VBoxConsoleWnd *main = qobject_cast <VBoxConsoleWnd *> (vboxGlobal().mainWindow()); 163 162 Assert (VALID_PTR (main)); 164 163 QWidget* viewport = mView->viewport(); 165 164 Assert (VALID_PTR (viewport)); 166 167 HIViewRef viewRef = ::darwinToNativeView (viewport); 168 Assert (VALID_PTR (viewRef)); 169 /* Get the dimensions of this HIView */ 170 HIRect viewRect; 171 HIViewGetBounds (viewRef, &viewRect); 172 /* Get the context of this window from qt */ 165 /* Get the dimensions of the viewport */ 166 CGRect viewRect = ::darwinToCGRect (viewport->geometry()); 167 /* Get the context of this window from Qt */ 173 168 CGContextRef ctx = ::darwinToCGContextRef (viewport); 174 169 Assert (VALID_PTR (ctx)); 170 171 /* Flip the context */ 172 CGContextTranslateCTM (ctx, 0, viewRect.size.height); 173 CGContextScaleCTM (ctx, 1.0, -1.0); 174 175 175 /* We handle the seamless mode as a special case. */ 176 176 if (main->isTrueSeamless()) … … 215 215 CGContextClipToRect (ctx, viewRect); 216 216 /* At this point draw the real vm image */ 217 HIViewDrawCGImage (ctx, &viewRect, subImage);217 CGContextDrawImage (ctx, ::darwinFlipCGRect (viewRect, viewRect.size.height), subImage); 218 218 #ifdef COMP_WITH_SHADOW 219 219 CGContextEndTransparencyLayer (ctx); … … 230 230 CGImageRef subImage; 231 231 if (!mView->pauseShot().isNull()) 232 subImage = CGImageCreateWithImageInRect (::darwinToCGImageRef (&mView->pauseShot()), ::darwinTo HIRect (is));232 subImage = CGImageCreateWithImageInRect (::darwinToCGImageRef (&mView->pauseShot()), ::darwinToCGRect (is)); 233 233 else 234 subImage = CGImageCreateWithImageInRect (mImage, ::darwinTo HIRect (is));234 subImage = CGImageCreateWithImageInRect (mImage, ::darwinToCGRect (is)); 235 235 Assert (VALID_PTR (subImage)); 236 236 /* Ok, for more performance we set a clipping path of the … … 242 242 /* Add all region rects to the current context as path components */ 243 243 for (int i = 0; i < a.size(); ++i) 244 CGContextAddRect (ctx, ::darwin ToHIRect (a[i]));244 CGContextAddRect (ctx, ::darwinFlipCGRect (::darwinToCGRect (a[i]), viewRect.size.height)); 245 245 /* Now convert the path to a clipping path. */ 246 246 CGContextClip (ctx); … … 250 250 CGContextClipToRect (ctx, viewRect); 251 251 /* At this point draw the real vm image */ 252 HIRect destRect = ::darwinToHIRect (ir); 253 HIViewDrawCGImage (ctx, &destRect, subImage); 254 } 255 #endif /* QT_MAC_USE_COCOA */ 252 CGContextDrawImage (ctx, ::darwinFlipCGRect (::darwinToCGRect (ir), viewRect.size.height), subImage); 253 } 256 254 } 257 255 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin-carbon.cpp
r17175 r17201 35 35 } 36 36 37 NativeViewRef darwinToNativeViewImpl (NativeWindowRef aWindow) 38 { 39 NativeViewRef view = NULL; 40 if (aWindow) 41 { 42 OSStatus result = GetRootControl (aWindow, &view); 43 AssertCarbonOSStatus (result); 44 } 45 return view; 46 } 47 37 48 void darwinSetShowsToolbarButtonImpl (NativeWindowRef aWindow, bool aEnabled) 38 49 { 39 int err= ::ChangeWindowAttributes (aWindow, aEnabled ? kWindowToolbarButtonAttribute : kWindowNoAttributes,40 aEnabled ? kWindowNoAttributes : kWindowToolbarButtonAttribute);41 AssertCarbonOSStatus ( err);50 OSStatus result = ::ChangeWindowAttributes (aWindow, aEnabled ? kWindowToolbarButtonAttribute : kWindowNoAttributes, 51 aEnabled ? kWindowNoAttributes : kWindowToolbarButtonAttribute); 52 AssertCarbonOSStatus (result); 42 53 } 43 54 44 55 void darwinSetShowsResizeIndicatorImpl (NativeWindowRef aWindow, bool aEnabled) 45 56 { 46 int err = ::ChangeWindowAttributes (aWindow, aEnabled ? kWindowResizableAttribute : kWindowNoAttributes, 47 aEnabled ? kWindowNoAttributes : kWindowResizableAttribute); 48 AssertCarbonOSStatus (err); 57 OSStatus result = ::ChangeWindowAttributes (aWindow, aEnabled ? kWindowResizableAttribute : kWindowNoAttributes, 58 aEnabled ? kWindowNoAttributes : kWindowResizableAttribute); 59 AssertCarbonOSStatus (result); 60 } 61 62 void darwinSetShowsWindowTransparentImpl (NativeWindowRef aWindow, bool aEnabled) 63 { 64 Assert (VALID_PTR (aWindow)); 65 OSStatus result; 66 if (aEnabled) 67 { 68 HIViewRef viewRef = ::darwinToNativeViewImpl (aWindow); 69 Assert (VALID_PTR (viewRef)); 70 /* @todo=poetzsch: Currently this isn't necessary. I should 71 * investigate if we can/should use this. */ 72 /* 73 EventTypeSpec wCompositingEvent = { kEventClassWindow, kEventWindowGetRegion }; 74 status = InstallWindowEventHandler ((WindowPtr)winId(), DarwinRegionHandler, GetEventTypeCount (wCompositingEvent), &wCompositingEvent, &mCurrRegion, &mDarwinRegionEventHandlerRef); 75 AssertCarbonOSStatus (status); 76 HIViewRef contentView = 0; 77 status = HIViewFindByID(HIViewGetRoot(windowRef), kHIViewWindowContentID, &contentView); 78 AssertCarbonOSStatus (status); 79 EventTypeSpec drawEvent = { kEventClassControl, kEventControlDraw }; 80 status = InstallControlEventHandler (contentView, DarwinRegionHandler, GetEventTypeCount (drawEvent), &drawEvent, &contentView, NULL); 81 AssertCarbonOSStatus (status); 82 */ 83 UInt32 features; 84 result = ::GetWindowFeatures (aWindow, &features); 85 AssertCarbonOSStatus (result); 86 if (( features & kWindowIsOpaque ) != 0) 87 { 88 result = ::HIWindowChangeFeatures (aWindow, 0, kWindowIsOpaque); 89 AssertCarbonOSStatus (result); 90 } 91 result = ::HIViewReshapeStructure (viewRef); 92 AssertCarbonOSStatus (result); 93 result = ::SetWindowAlpha (aWindow, 0.999); 94 AssertCarbonOSStatus (result); 95 /* For now disable the shadow of the window. This feature cause errors 96 * if a window in vbox looses focus, is reselected and than moved. */ 97 /** @todo Search for an option to enable this again. A shadow on every 98 * window has a big coolness factor. */ 99 result = ::ChangeWindowAttributes (aWindow, kWindowNoShadowAttribute, 0); 100 AssertCarbonOSStatus (result); 101 } 102 else 103 { 104 /* See above. 105 status = RemoveEventHandler (mDarwinRegionEventHandlerRef); 106 AssertCarbonOSStatus (status); 107 */ 108 result = ::ReshapeCustomWindow (aWindow); 109 AssertCarbonOSStatus (result); 110 result = ::SetWindowAlpha (aWindow, 1.0); 111 AssertCarbonOSStatus (result); 112 } 49 113 } 50 114 51 115 void darwinSetMouseCoalescingEnabled (bool aEnabled) 52 116 { 53 int err= ::SetMouseCoalescingEnabled (aEnabled, NULL);54 AssertCarbonOSStatus ( err);117 OSStatus result = ::SetMouseCoalescingEnabled (aEnabled, NULL); 118 AssertCarbonOSStatus (result); 55 119 } 56 120 … … 58 122 { 59 123 HIRect r = CGRectMake (x, y, width, height); 60 int err = ::TransitionWindowWithOptions (aWidget, 61 kWindowSlideTransitionEffect, 62 kWindowResizeTransitionAction, 63 &r, 64 false, 65 NULL); 66 AssertCarbonOSStatus (err); 67 } 68 124 OSStatus result = ::TransitionWindowWithOptions (aWidget, 125 kWindowSlideTransitionEffect, 126 kWindowResizeTransitionAction, 127 &r, 128 false, 129 NULL); 130 AssertCarbonOSStatus (result); 131 } 132 133 void darwinWindowInvalidateShapeImpl (NativeWindowRef aWindow) 134 { 135 OSStatus result = HIViewReshapeStructure (::darwinToNativeViewImpl (aWindow)); 136 AssertCarbonOSStatus (result); 137 // HIWindowInvalidateShadow (::darwinToWindowRef (console->viewport())); 138 // ReshapeCustomWindow (::darwinToWindowRef (this)); 139 } 69 140 70 141 /******************************************************************************** … … 74 145 ********************************************************************************/ 75 146 #include "VBoxConsoleView.h" 76 77 /**78 * Callback for deleting the QImage object when CGImageCreate is done79 * with it (which is probably not until the returned CFGImageRef is released).80 *81 * @param info Pointer to the QImage.82 */83 static void darwinDataProviderReleaseQImage (void *info, const void *, size_t)84 {85 QImage *qimg = (QImage *)info;86 delete qimg;87 }88 147 89 148 bool darwinIsMenuOpen (void) -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin-cocoa.m
r17150 r17201 28 28 #import <AppKit/NSEvent.h> 29 29 #import <AppKit/NSToolbar.h> 30 #import <AppKit/NSColor.h> 30 31 31 32 NativeWindowRef darwinToNativeWindowImpl (NativeViewRef aView) … … 33 34 if (aView) 34 35 return [aView window]; 36 return NULL; 37 } 38 39 NativeViewRef darwinToNativeViewImpl (NativeWindowRef aWindow) 40 { 41 if (aWindow) 42 return [aWindow contentView]; 35 43 return NULL; 36 44 } … … 60 68 if (iconButton != Nil) 61 69 [iconButton setHidden:YES]; 70 } 71 72 void darwinSetShowsWindowTransparentImpl (NativeWindowRef aWindow, bool aEnabled) 73 { 74 if (aEnabled) 75 { 76 [aWindow setOpaque:NO]; 77 [aWindow setBackgroundColor:[NSColor clearColor]]; 78 [aWindow setHasShadow:NO]; 79 } 80 else 81 { 82 [aWindow setOpaque:YES]; 83 [aWindow setBackgroundColor:[NSColor windowBackgroundColor]]; 84 [aWindow setHasShadow:YES]; 85 } 62 86 } 63 87 … … 90 114 } 91 115 116 void darwinWindowInvalidateShadowImpl (NativeWindowRef aWindow) 117 { 118 [aWindow invalidateShadow]; 119 } 120 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.cpp
r17175 r17201 51 51 } 52 52 53 NativeViewRef darwinToNativeView (NativeWindowRef aWindow) 54 { 55 return ::darwinToNativeViewImpl (aWindow); 56 } 57 53 58 void darwinSetShowsToolbarButton (QToolBar *aToolBar, bool aEnabled) 54 59 { … … 56 61 if (parent) 57 62 ::darwinSetShowsToolbarButtonImpl (::darwinToNativeWindow (parent), aEnabled); 58 }59 60 void darwinWindowAnimateResize (QWidget *aWidget, const QRect &aTarget)61 {62 ::darwinWindowAnimateResizeImpl (::darwinToNativeWindow (aWidget), aTarget.x(), aTarget.y(), aTarget.width(), aTarget.height());63 63 } 64 64 … … 71 71 NOREF (aWidget); 72 72 #endif /* !QT_MAC_USE_COCOA */ 73 } 74 75 void darwinSetShowsWindowTransparent (QWidget *aWidget, bool aEnabled) 76 { 77 ::darwinSetShowsWindowTransparentImpl (::darwinToNativeWindow (aWidget), aEnabled); 78 } 79 80 void darwinWindowAnimateResize (QWidget *aWidget, const QRect &aTarget) 81 { 82 ::darwinWindowAnimateResizeImpl (::darwinToNativeWindow (aWidget), aTarget.x(), aTarget.y(), aTarget.width(), aTarget.height()); 83 } 84 85 void darwinWindowInvalidateShape (QWidget *aWidget) 86 { 87 #ifdef QT_MAC_USE_COCOA 88 /* Here a simple update is enough! */ 89 aWidget->update(); 90 #else /* QT_MAC_USE_COCOA */ 91 ::darwinWindowInvalidateShapeImpl (::darwinToNativeWindow (aWidget)); 92 #endif /* QT_MAC_USE_COCOA */ 93 } 94 ; 95 void darwinWindowInvalidateShadow (QWidget *aWidget) 96 { 97 #ifdef QT_MAC_USE_COCOA 98 ::darwinWindowInvalidateShadowImpl (::darwinToNativeWindow (aWidget)); 99 #else /* QT_MAC_USE_COCOA */ 100 NOREF (aWidget); 101 #endif /* QT_MAC_USE_COCOA */ 73 102 } 74 103 … … 110 139 #endif /* QT_VERSION >= 0x040400 */ 111 140 } 141 112 142 113 143 /* Proxy icon creation */
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器