Changeset 17349 in vbox
- Timestamp:
- Mar 4, 2009 3:40:25 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 6 edited
-
include/VBoxConsoleView.h (modified) (1 diff)
-
include/VBoxConsoleWnd.h (modified) (1 diff)
-
include/VBoxIChatTheaterWrapper.h (modified) (1 diff)
-
include/VBoxToolBar.h (modified) (1 diff)
-
src/VBoxVMListView.cpp (modified) (1 diff)
-
src/darwin/VBoxUtils-darwin-cocoa.m (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h
r16953 r17349 39 39 40 40 #if defined (Q_WS_MAC) 41 # ifdef QT_MAC_USE_COCOA 42 /** @todo include something chocolatety... */ 43 # else 44 # include <Carbon/Carbon.h> 45 # endif 41 # include <ApplicationServices/ApplicationServices.h> 46 42 #endif 47 43 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r17201 r17349 356 356 #ifdef Q_WS_MAC 357 357 QRegion mCurrRegion; 358 # ifdef QT_MAC_USE_COCOA 359 /** @todo Carbon -> Cocoa */ 360 # else 358 # ifndef QT_MAC_USE_COCOA 361 359 EventHandlerRef mDarwinRegionEventHandlerRef; 362 360 # endif -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxIChatTheaterWrapper.h
r16469 r17349 25 25 #if defined (Q_WS_MAC) && defined (VBOX_WITH_ICHAT_THEATER) 26 26 27 #ifdef QT_MAC_USE_COCOA 28 /** @todo Carbon -> Cocoa */ 29 #else 30 # include <Carbon/Carbon.h> 31 #endif 27 # include <ApplicationServices/ApplicationServices.h> 32 28 33 29 __BEGIN_DECLS 34 30 35 31 void initSharedAVManager(); 36 #ifdef QT_MAC_USE_COCOA37 /** @todo Carbon -> Cocoa */38 #else39 32 void setImageRef (CGImageRef aImage); 40 #endif41 33 42 34 __END_DECLS -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxToolBar.h
r17126 r17349 78 78 { 79 79 mMainWindow->setUnifiedTitleAndToolBarOnMac (true); 80 # ifdef QT_MAC_USE_COCOA 81 /** @todo Carbon -> Cocoa */ 82 # else /* !QT_MAC_USE_COCOA */ 80 # ifndef QT_MAC_USE_COCOA 83 81 WindowRef window = ::darwinToNativeWindow (this); 84 82 EventHandlerUPP eventHandler = ::NewEventHandlerUPP (VBoxToolBar::macEventFilter); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMListView.cpp
r16473 r17349 31 31 #if defined (Q_WS_MAC) 32 32 # include <ApplicationServices/ApplicationServices.h> 33 # ifdef QT_MAC_USE_COCOA34 /** @todo Carbon -> Cocoa */35 # else36 # include <Carbon/Carbon.h>37 # endif38 33 #endif 39 34 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin-cocoa.m
r17340 r17349 26 26 #include <iprt/assert.h> 27 27 28 #import <AppKit/NSWindow.h>29 #import <AppKit/NSView.h>30 28 #import <AppKit/NSEvent.h> 31 #import <AppKit/NSToolbar.h>32 29 #import <AppKit/NSColor.h> 33 #import <AppKit/NSGraphicsContext.h>34 #import <AppKit/NSApplication.h>35 #import <AppKit/NSImageView.h>36 30 37 31 NativeWindowRef darwinToNativeWindowImpl (NativeViewRef aView) 38 32 { 33 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 34 35 NativeWindowRef window = NULL; 39 36 if (aView) 40 return [aView window]; 41 return NULL; 37 window = [aView window]; 38 39 [pool release]; 40 return window; 42 41 } 43 42 44 43 NativeViewRef darwinToNativeViewImpl (NativeWindowRef aWindow) 45 44 { 45 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 46 47 NativeViewRef view = NULL; 46 48 if (aWindow) 47 return [aWindow contentView]; 48 return NULL; 49 view = [aWindow contentView]; 50 51 [pool release]; 52 return view; 49 53 } 50 54 51 55 void darwinSetShowsToolbarButtonImpl (NativeWindowRef aWindow, bool aEnabled) 52 56 { 57 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 58 53 59 [aWindow setShowsToolbarButton:aEnabled]; 60 61 [pool release]; 54 62 } 55 63 56 64 void darwinSetShowsResizeIndicatorImpl (NativeWindowRef aWindow, bool aEnabled) 57 65 { 66 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 67 58 68 [aWindow setShowsResizeIndicator:aEnabled]; 69 70 [pool release]; 59 71 } 60 72 61 73 void darwinSetHidesAllTitleButtonsImpl (NativeWindowRef aWindow) 62 74 { 75 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 76 63 77 NSButton *closeButton = [aWindow standardWindowButton:NSWindowCloseButton]; 64 78 if (closeButton != Nil) … … 73 87 if (iconButton != Nil) 74 88 [iconButton setHidden:YES]; 89 90 [pool release]; 75 91 } 76 92 77 93 void darwinSetShowsWindowTransparentImpl (NativeWindowRef aWindow, bool aEnabled) 78 94 { 95 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 96 79 97 if (aEnabled) 80 98 { … … 89 107 [aWindow setHasShadow:YES]; 90 108 } 109 110 [pool release]; 91 111 } 92 112 … … 98 118 void darwinSetMouseCoalescingEnabled (bool aEnabled) 99 119 { 120 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 121 100 122 [NSEvent setMouseCoalescingEnabled:aEnabled]; 123 124 [pool release]; 101 125 } 102 126 103 127 void darwinWindowAnimateResizeImpl (NativeWindowRef aWindow, int x, int y, int width, int height) 104 128 { 129 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 130 105 131 /* It seems that Qt doesn't return the height of the window with the 106 132 * toolbar height included. So add this size manually. Could easily be that … … 117 143 118 144 [aWindow setFrame:windowFrame display:YES animate:YES]; 145 146 [pool release]; 119 147 } 120 148 121 149 void darwinWindowInvalidateShadowImpl (NativeWindowRef aWindow) 122 150 { 151 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 152 123 153 [aWindow invalidateShadow]; 154 155 [pool release]; 124 156 } 125 157
Note:
See TracChangeset
for help on using the changeset viewer.

