Changeset 6645 in vbox for trunk/src/VBox/Frontends/VirtualBox/include
- Timestamp:
- Jan 31, 2008 10:02:59 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27711
- Location:
- trunk/src/VBox/Frontends/VirtualBox/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h
r5999 r6645 115 115 enum RenderMode 116 116 { 117 InvalidRenderMode, TimerMode, QImageMode, SDLMode, DDRAWMode 117 InvalidRenderMode, TimerMode, QImageMode, SDLMode, DDRAWMode, Quartz2DMode 118 118 }; 119 119 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r5999 r6645 459 459 #endif 460 460 461 ///////////////////////////////////////////////////////////////////////////// 462 463 #if defined(Q_WS_MAC) && defined (VBOX_GUI_USE_QUARTZ2D) 464 465 #include <Carbon/Carbon.h> 466 class VBoxQuartz2DFrameBuffer : public VBoxFrameBuffer 467 { 468 public: 469 470 VBoxQuartz2DFrameBuffer (VBoxConsoleView *aView); 471 virtual ~VBoxQuartz2DFrameBuffer (); 472 473 STDMETHOD (NotifyUpdate) (ULONG aX, ULONG aY, 474 ULONG aW, ULONG aH, 475 BOOL *aFinished); 476 STDMETHOD (SetVisibleRegion) (BYTE *aRectangles, ULONG aCount); 477 478 uchar *address () { return mDataAddress; } 479 ulong bitsPerPixel () { return CGImageGetBitsPerPixel (mImage); } 480 ulong bytesPerLine () { return CGImageGetBytesPerRow (mImage); } 481 ulong pixelFormat () { return mPixelFormat; }; 482 bool usesGuestVRAM () { return mBitmapData == NULL; } 483 484 const CGImageRef imageRef () const { return mImage; } 485 486 void paintEvent (QPaintEvent *pe); 487 void resizeEvent (VBoxResizeEvent *re); 488 489 private: 490 inline CGRect QRectToCGRect (const QRect &aRect) const 491 { 492 return CGRectMake (aRect.x (), aRect.y (), aRect.width (), aRect.height ()); 493 } 494 inline QRect mapYOrigin (const QRect &aRect, int aHeight) const 495 { 496 /* The cgcontext has a fliped y-coord relative to the 497 * qt coord system. So we need some mapping here */ 498 return QRect (aRect.x (), aHeight - (aRect.y () + aRect.height ()), aRect.width (), aRect.height ()); 499 } 500 void clean (); 501 502 uchar *mDataAddress; 503 void *mBitmapData; 504 ulong mPixelFormat; 505 CGImageRef mImage; 506 CGRect *mRegionRects; 507 ULONG mRegionCount; 508 }; 509 510 #endif 511 461 512 #endif // __VBoxFrameBuffer_h__ -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxUtils.h
r6482 r6645 255 255 CGImageRef DarwinQPixmapFromMimeSourceToCGImage (const char *aSource); 256 256 CGImageRef DarwinCreateDockBadge (const char *aSource); 257 CGImageRef DarwinCreateDockPreview (CGImageRef aVMImage, CGImageRef aOverlayImage); 257 258 CGImageRef DarwinCreateDockPreview (VBoxFrameBuffer *aFrameBuffer, CGImageRef aOverlayImage); 258 259 OSStatus DarwinRegionHandler (EventHandlerCallRef aInHandlerCallRef, EventRef aInEvent, void *aInUserData);
Note:
See TracChangeset
for help on using the changeset viewer.