- Timestamp:
- Feb 10, 2009 12:32:12 AM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r16469 r16610 206 206 # r=bird: what is -lz doing here? it belongs in LIBS. 207 207 VirtualBox_LDFLAGS.darwin = -lz \ 208 -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon -framework QuickTime\208 -framework IOKit -framework AppKit -framework ApplicationServices -framework Foundation -framework Carbon \ 209 209 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox.dylib) 210 VirtualBox_LDFLAGS.darwin.x86 = -framework QuickTime 210 211 ifdef VBOX_WITH_ICHAT_THEATER 211 212 VirtualBox_LDFLAGS.darwin += -framework InstantMessage -framework QuartzCore … … 391 392 ifdef VBOX_WITH_ICHAT_THEATER 392 393 VirtualBox_SOURCES.darwin += \ 393 src/darwin/VBoxIChatTheaterWrapper.m 394 endif 394 src/darwin/VBoxIChatTheaterWrapper.m 395 endif 396 397 VirtualBox_SOURCES.darwin.amd64 += \ 398 src/darwin/VBoxCocoaApplication.m 395 399 396 400 # The Qt modules we're using. -
trunk/src/VBox/Frontends/VirtualBox/include/QIHotKeyEdit.h
r16469 r16610 28 28 #include <QMap> 29 29 #endif 30 #if defined (Q_WS_MAC) && !defined (QT_MAC_USE_COCOA)30 #if defined (Q_WS_MAC) 31 31 # include <Carbon/Carbon.h> 32 32 #endif … … 82 82 #elif defined (Q_WS_X11) 83 83 bool x11Event (XEvent *event); 84 #elif defined (Q_WS_MAC) && !defined (QT_MAC_USE_COCOA) 85 static pascal OSStatus darwinEventHandlerProc (EventHandlerCallRef inHandlerCallRef, 86 EventRef inEvent, void *inUserData); 84 #elif defined (Q_WS_MAC) 85 # ifdef QT_MAC_USE_COCOA 86 static bool darwinEventHandlerProc (const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser); 87 # else 88 static pascal OSStatus darwinEventHandlerProc (EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData); 89 # endif 87 90 bool darwinKeyboardEvent (EventRef inEvent); 88 91 #endif … … 106 109 #endif 107 110 108 #if defined (Q_WS_MAC) && !defined (QT_MAC_USE_COCOA) 111 #if defined (Q_WS_MAC) 112 # ifndef QT_MAC_USE_COCOA 109 113 /** Event handler reference. NULL if the handler isn't installed. */ 110 114 EventHandlerRef mDarwinEventHandlerRef; 115 # endif 111 116 /** The current modifier key mask. Used to figure out which modifier 112 117 * key was pressed when we get a kEventRawKeyModifiersChanged event. */ -
trunk/src/VBox/Frontends/VirtualBox/src/QIHotKeyEdit.cpp
r16471 r16610 71 71 # include "DarwinKeyboard.h" 72 72 # include <Carbon/Carbon.h> 73 # ifdef QT_MAC_USE_COCOA 74 # include "darwin/VBoxCocoaApplication.h" 75 # endif 73 76 #endif 74 77 … … 133 136 134 137 #ifdef Q_WS_MAC 138 mDarwinKeyModifiers = GetCurrentEventKeyModifiers(); 135 139 # ifdef QT_MAC_USE_COCOA 136 /** @todo Carbon -> Cocoa */ 140 ::VBoxCocoaApplication_setCallback(UINT32_MAX, QIHotKeyEdit::darwinEventHandlerProc, this); 137 141 # else /* !QT_MAC_USE_COCOA */ 138 mDarwinKeyModifiers = GetCurrentEventKeyModifiers();139 140 142 EventTypeSpec eventTypes [4]; 141 143 eventTypes [0].eventClass = kEventClassKeyboard; … … 164 166 ::DarwinReleaseKeyboard(); 165 167 # ifdef QT_MAC_USE_COCOA 166 /** @todo Carbon -> Cocoa */168 ::VBoxCocoaApplication_unsetCallback(UINT32_MAX, QIHotKeyEdit::darwinEventHandlerProc, this); 167 169 # else 168 170 ::RemoveEventHandler (mDarwinEventHandlerRef); … … 667 669 #elif defined (Q_WS_MAC) 668 670 # ifdef QT_MAC_USE_COCOA 669 /** @todo Carbon -> Cocoa */ 670 # else /* !QT_MAC_USE_COCOA */ 671 671 /* static */ 672 bool QIHotKeyEdit::darwinEventHandlerProc (const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser) 673 { 674 QIHotKeyEdit *edit = (QIHotKeyEdit *) pvUser; 675 EventRef inEvent = (EventRef)pvCarbonEvent; 676 UInt32 EventClass = ::GetEventClass (inEvent); 677 if (EventClass == kEventClassKeyboard) 678 return edit->darwinKeyboardEvent (inEvent); 679 return false; 680 } 681 682 # else /* !QT_MAC_USE_COCOA */ 672 683 /* static */ 673 684 pascal OSStatus QIHotKeyEdit::darwinEventHandlerProc (EventHandlerCallRef inHandlerCallRef, … … 683 694 return CallNextEventHandler (inHandlerCallRef, inEvent); 684 695 } 696 # endif /* !QT_MAC_USE_COCOA */ 685 697 686 698 bool QIHotKeyEdit::darwinKeyboardEvent (EventRef inEvent) … … 725 737 return false; 726 738 } 727 # endif /* !QT_MAC_USE_COCOA */728 739 729 740 #else -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r15906 r16610 25 25 #include "VBoxSelectorWnd.h" 26 26 #include "VBoxConsoleWnd.h" 27 #ifdef Q_WS_MAC 27 #include "VBoxUtils.h" 28 #if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA) 28 29 # include "QIApplication.h" 29 # include "VBoxUtils.h"30 30 #else 31 31 # define QIApplication QApplication 32 #endif 33 #ifdef QT_MAC_USE_COCOA 34 # include "darwin/VBoxCocoaApplication.h" 32 35 #endif 33 36 … … 234 237 sigaction (SIGBUS, &sa, NULL); 235 238 sigaction (SIGUSR1, &sa, NULL); 239 #endif 240 241 #ifdef QT_MAC_USE_COCOA 242 /* Instantiate our NSApplication derivative before QApplication 243 * forces NSApplication to be instantiated. */ 244 VBoxCocoaApplication_sharedApplication(); 236 245 #endif 237 246
Note:
See TracChangeset
for help on using the changeset viewer.