- Timestamp:
- May 26, 2010 11:46:22 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 62021
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r29808 r29812 523 523 VirtualBox_QT_MOCHDRS.darwin = \ 524 524 src/darwin/VBoxCocoaSpecialControls.h 525 else526 VirtualBox_SOURCES.darwin += \527 src/darwin/VBoxUtils-darwin-carbon.cpp528 525 endif 529 526 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/DockIconPreview.h
r29794 r29812 3 3 * 4 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * VBoxDockIconPreview class declaration5 * UIDockIconPreview class declaration 6 6 */ 7 7 8 8 /* 9 * Copyright (C) 20 09Oracle Corporation9 * Copyright (C) 2010 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 18 18 */ 19 19 20 #ifndef ___ VBoxDockIconPreview_h___21 #define ___ VBoxDockIconPreview_h___20 #ifndef ___UIDockIconPreview_h___ 21 #define ___UIDockIconPreview_h___ 22 22 23 23 #ifdef QT_MAC_USE_COCOA … … 33 33 #endif /* QT_MAC_USE_COCOA */ 34 34 35 #endif /* !___ VBoxDockIconPreview_h___ */35 #endif /* !___UIDockIconPreview_h___ */ 36 36 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.h
r28800 r29812 7 7 8 8 /* 9 * Copyright (C) 20 09Oracle Corporation9 * Copyright (C) 2010 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 37 37 38 38 # include <qglobal.h> /* for QT_MAC_USE_COCOA */ 39 40 39 # include <ApplicationServices/ApplicationServices.h> 41 40 … … 49 48 typedef void *NativeWindowRef; 50 49 typedef void *NativeViewRef; 51 # else /* QT_MAC_USE_COCOA */52 # include <Carbon/Carbon.h>53 typedef WindowRef NativeWindowRef;54 typedef HIViewRef NativeViewRef;55 50 # endif /* QT_MAC_USE_COCOA */ 56 51 #endif /* __OBJC__ */ … … 66 61 * 67 62 ********************************************************************************/ 68 NativeWindowRef darwinToNativeWindowImpl 69 NativeViewRef darwinToNativeViewImpl 63 NativeWindowRef darwinToNativeWindowImpl(NativeViewRef aView); 64 NativeViewRef darwinToNativeViewImpl(NativeWindowRef aWindow); 70 65 71 66 /******************************************************************************** … … 74 69 * 75 70 ********************************************************************************/ 76 void darwinSetShowsToolbarButtonImpl 77 void darwinSetShowsResizeIndicatorImpl 78 void darwinSetHidesAllTitleButtonsImpl 79 void darwinSetShowsWindowTransparentImpl 80 void darwinSetMouseCoalescingEnabled 71 void darwinSetShowsToolbarButtonImpl(NativeWindowRef aWindow, bool aEnabled); 72 void darwinSetShowsResizeIndicatorImpl(NativeWindowRef aWindow, bool aEnabled); 73 void darwinSetHidesAllTitleButtonsImpl(NativeWindowRef aWindow); 74 void darwinSetShowsWindowTransparentImpl(NativeWindowRef aWindow, bool aEnabled); 75 void darwinSetMouseCoalescingEnabled(bool aEnabled); 81 76 82 77 /******************************************************************************** … … 85 80 * 86 81 ********************************************************************************/ 87 void darwinWindowAnimateResizeImpl 88 void darwinWindowInvalidateShapeImpl 89 void darwinWindowInvalidateShadowImpl 90 int darwinWindowToolBarHeight 82 void darwinWindowAnimateResizeImpl(NativeWindowRef aWindow, int x, int y, int width, int height); 83 void darwinWindowInvalidateShapeImpl(NativeWindowRef aWindow); 84 void darwinWindowInvalidateShadowImpl(NativeWindowRef aWindow); 85 int darwinWindowToolBarHeight(NativeWindowRef aWindow); 91 86 bool darwinIsWindowMaximized(NativeWindowRef aWindow); 92 87 … … 97 92 RT_C_DECLS_END 98 93 99 DECLINLINE(CGRect) darwinToCGRect (const QRect& aRect) { return CGRectMake(aRect.x(), aRect.y(), aRect.width(), aRect.height()); }100 DECLINLINE(CGRect) darwinFlipCGRect 101 DECLINLINE(CGRect) darwinFlipCGRect (CGRect aRect, const CGRect &aTarget) { return darwinFlipCGRect(aRect, aTarget.size.height); }102 DECLINLINE(CGRect) darwinCenterRectTo 94 DECLINLINE(CGRect) darwinToCGRect(const QRect& aRect) { return CGRectMake(aRect.x(), aRect.y(), aRect.width(), aRect.height()); } 95 DECLINLINE(CGRect) darwinFlipCGRect(CGRect aRect, int aTargetHeight) { aRect.origin.y = aTargetHeight - aRect.origin.y - aRect.size.height; return aRect; } 96 DECLINLINE(CGRect) darwinFlipCGRect(CGRect aRect, const CGRect &aTarget) { return darwinFlipCGRect(aRect, aTarget.size.height); } 97 DECLINLINE(CGRect) darwinCenterRectTo(CGRect aRect, const CGRect& aToRect) 103 98 { 104 99 aRect.origin.x = aToRect.origin.x + (aToRect.size.width - aRect.size.width) / 2.0; … … 121 116 * @param aWidget Pointer to the QWidget 122 117 */ 123 NativeViewRef darwinToNativeView 118 NativeViewRef darwinToNativeView(QWidget *aWidget); 124 119 125 120 /** … … 129 124 * @param aWidget Pointer to the QWidget 130 125 */ 131 NativeWindowRef darwinToNativeWindow 126 NativeWindowRef darwinToNativeWindow(QWidget *aWidget); 132 127 133 128 /* This is necessary because of the C calling convention. Its a simple wrapper … … 140 135 * @param aWidget Pointer to the native View 141 136 */ 142 NativeWindowRef darwinToNativeWindow 137 NativeWindowRef darwinToNativeWindow(NativeViewRef aView); 143 138 144 139 /** … … 148 143 * @param aWidget Pointer to the native Window 149 144 */ 150 NativeViewRef darwinToNativeView 145 NativeViewRef darwinToNativeView(NativeWindowRef aWindow); 151 146 152 147 /******************************************************************************** … … 155 150 * 156 151 ********************************************************************************/ 157 void darwinSetShowsToolbarButton 158 void darwinSetShowsResizeIndicator 159 void darwinSetHidesAllTitleButtons 160 void darwinSetShowsWindowTransparent 161 void darwinDisableIconsInMenus 152 void darwinSetShowsToolbarButton(QToolBar *aToolBar, bool aEnabled); 153 void darwinSetShowsResizeIndicator(QWidget *aWidget, bool aEnabled); 154 void darwinSetHidesAllTitleButtons(QWidget *aWidget); 155 void darwinSetShowsWindowTransparent(QWidget *aWidget, bool aEnabled); 156 void darwinDisableIconsInMenus(void); 162 157 163 158 /******************************************************************************** … … 166 161 * 167 162 ********************************************************************************/ 168 void darwinWindowAnimateResize 169 void darwinWindowInvalidateShape 170 void darwinWindowInvalidateShadow 171 int darwinWindowToolBarHeight 163 void darwinWindowAnimateResize(QWidget *aWidget, const QRect &aTarget); 164 void darwinWindowInvalidateShape(QWidget *aWidget); 165 void darwinWindowInvalidateShadow(QWidget *aWidget); 166 int darwinWindowToolBarHeight(QWidget *aWidget); 172 167 bool darwinIsWindowMaximized(QWidget *aWidget); 173 QString darwinSystemLanguage 174 QPixmap darwinCreateDragPixmap 168 QString darwinSystemLanguage(void); 169 QPixmap darwinCreateDragPixmap(const QPixmap& aPixmap, const QString &aText); 175 170 176 171 … … 186 181 * @param aWidget Pointer to the QWidget 187 182 */ 188 CGContextRef darwinToCGContextRef 183 CGContextRef darwinToCGContextRef(QWidget *aWidget); 189 184 190 CGImageRef darwinToCGImageRef (const QImage *aImage); 191 CGImageRef darwinToCGImageRef (const QPixmap *aPixmap); 192 CGImageRef darwinToCGImageRef (const char *aSource); 193 194 195 196 197 198 /******************************************************************************** 199 * 200 * Old carbon stuff. Have to be converted soon! 201 * 202 ********************************************************************************/ 203 204 #include <QWidget> 205 206 # ifndef QT_MAC_USE_COCOA 207 208 /* Asserts if a != noErr and prints the error code */ 209 # ifdef RT_STRICT 210 # define AssertCarbonOSStatus(a) AssertMsg ((a) == noErr, ("Carbon OSStatus: %d\n", static_cast<int> (a))) 211 # else 212 # define AssertCarbonOSStatus(a) do { NOREF(a); } while (0) 213 # endif 214 215 216 /** 217 * Converts a QRect to a HIRect. 218 * 219 * @returns HIRect for the converted QRect. 220 * @param aRect the QRect to convert 221 */ 222 DECLINLINE(HIRect) darwinToHIRect (const QRect &aRect) 223 { 224 return CGRectMake (aRect.x(), aRect.y(), aRect.width(), aRect.height()); 225 } 226 227 /* Experimental region handler for the seamless mode */ 228 OSStatus darwinRegionHandler (EventHandlerCallRef aInHandlerCallRef, EventRef aInEvent, void *aInUserData); 229 230 /* Handler for the OpenGL overlay window stuff & the possible messages. */ 231 enum 232 { 233 /* Event classes */ 234 kEventClassVBox = 'vbox', 235 /* Event kinds */ 236 kEventVBoxShowWindow = 'swin', 237 kEventVBoxHideWindow = 'hwin', 238 kEventVBoxMoveWindow = 'mwin', 239 kEventVBoxResizeWindow = 'rwin', 240 kEventVBoxDisposeWindow = 'dwin', 241 kEventVBoxUpdateDock = 'udck', 242 kEventVBoxUpdateContext = 'uctx', 243 kEventVBoxBoundsChanged = 'bchg' 244 }; 245 246 void PostBoundsChanged (const QRect& rect); 247 OSStatus darwinOverlayWindowHandler (EventHandlerCallRef aInHandlerCallRef, EventRef aInEvent, void *aInUserData); 248 249 bool darwinIsMenuOpen (void); 250 251 # endif /* !QT_MAC_USE_COCOA */ 252 253 # ifdef DEBUG 254 void darwinDebugPrintEvent (const char *aPrefix, EventRef aEvent); 255 # endif 185 CGImageRef darwinToCGImageRef(const QImage *aImage); 186 CGImageRef darwinToCGImageRef(const QPixmap *aPixmap); 187 CGImageRef darwinToCGImageRef(const char *aSource); 256 188 257 189 #endif /* !__OBJC__ */
Note:
See TracChangeset
for help on using the changeset viewer.