VirtualBox

Ignore:
Timestamp:
Feb 10, 2009 12:32:12 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42576
Message:

Qt/Cocoa: Subclass NSApplication to catch keyboard events passing thru -[NSApplication sendEvent:(NSEvent *)theEvent]. Adopted QIHotKeyEdit to make use of this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/QIHotKeyEdit.h

    r16469 r16610  
    2828#include <QMap>
    2929#endif
    30 #if defined (Q_WS_MAC) && !defined (QT_MAC_USE_COCOA)
     30#if defined (Q_WS_MAC)
    3131# include <Carbon/Carbon.h>
    3232#endif
     
    8282#elif defined (Q_WS_X11)
    8383    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
    8790    bool darwinKeyboardEvent (EventRef inEvent);
    8891#endif
     
    106109#endif
    107110
    108 #if defined (Q_WS_MAC) && !defined (QT_MAC_USE_COCOA)
     111#if defined (Q_WS_MAC)
     112# ifndef QT_MAC_USE_COCOA
    109113    /** Event handler reference. NULL if the handler isn't installed. */
    110114    EventHandlerRef mDarwinEventHandlerRef;
     115# endif
    111116    /** The current modifier key mask. Used to figure out which modifier
    112117     *  key was pressed when we get a kEventRawKeyModifiersChanged event. */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette