Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.h	(revision 71654)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.h	(revision 71655)
@@ -1,10 +1,9 @@
 /* $Id$ */
 /** @file
- * VBox Qt GUI - Declarations of utility functions for handling Darwin Cocoa
- * specific event handling tasks.
+ * VBox Qt GUI - Declarations of utility functions for handling Darwin Cocoa specific event-handling tasks.
  */
 
 /*
- * Copyright (C) 2010-2017 Oracle Corporation
+ * Copyright (C) 2010-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -20,24 +19,31 @@
 #define ___CocoaEventHelper_h
 
+/* Other VBox includes: */
+#include <iprt/cdefs.h>
 #include <VBox/VBoxCocoa.h>
-#include <iprt/cdefs.h> /* for RT_C_DECLS_BEGIN/RT_C_DECLS_END & stuff */
 
+/* Cocoa declarations: */
 ADD_COCOA_NATIVE_REF(NSEvent);
+
 
 RT_C_DECLS_BEGIN
 
-/********************************************************************************
- *
- * Event/Keyboard helpers (OS System native)
- *
- ********************************************************************************/
-unsigned long darwinEventModifierFlags(ConstNativeNSEventRef pEvent);
+/** Calls the -(NSUInteger)modifierFlags method on @a pEvent object and converts the flags to carbon style. */
 uint32_t darwinEventModifierFlagsXlated(ConstNativeNSEventRef pEvent);
-const char *darwinEventTypeName(unsigned long eEvtType);
+
+/** Get the name for a Cocoa @a enmEventType. */
+const char *darwinEventTypeName(unsigned long enmEventType);
+
+/** Debug helper function for dumping a Cocoa event to stdout.
+  * @param   pszPrefix  Brings the message prefix.
+  * @param   pEvent     Brings the Cocoa event. */
 void darwinPrintEvent(const char *pszPrefix, ConstNativeNSEventRef pEvent);
+
+/** Posts stripped mouse event based on passed @a pEvent. */
 void darwinPostStrippedMouseEvent(ConstNativeNSEventRef pEvent);
 
 RT_C_DECLS_END
 
+
 #endif /* !___CocoaEventHelper_h */
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.mm
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.mm	(revision 71654)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/CocoaEventHelper.mm	(revision 71655)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2009-2017 Oracle Corporation
+ * Copyright (C) 2009-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -16,35 +16,18 @@
  */
 
-/* Local includes */
+/* GUI includes: */
 #include "CocoaEventHelper.h"
 #include "DarwinKeyboard.h"
 
-/* Global includes */
+/* External includes: */
 #import <Cocoa/Cocoa.h>
 #import <AppKit/NSEvent.h>
 #include <Carbon/Carbon.h>
 
-/**
- * Calls the -(NSUInteger)modifierFlags method on a NSEvent object.
- *
- * @return  The Cocoa event modifier mask.
- * @param   pEvent          The Cocoa event.
- */
-unsigned long darwinEventModifierFlags(ConstNativeNSEventRef pEvent)
-{
-    return [pEvent modifierFlags];
-}
-
-/**
- * Calls the -(NSUInteger)modifierFlags method on a NSEvent object and
- * converts the flags to carbon style.
- *
- * @return  The Carbon modifier mask.
- * @param   pEvent          The Cocoa event.
- */
+
 uint32_t darwinEventModifierFlagsXlated(ConstNativeNSEventRef pEvent)
 {
-    NSUInteger  fCocoa  = [pEvent modifierFlags];
-    uint32_t    fCarbon = 0;
+    NSUInteger fCocoa = [pEvent modifierFlags];
+    uint32_t fCarbon = 0;
     if (fCocoa)
     {
@@ -118,13 +101,7 @@
 }
 
-/**
- * Get the name for a Cocoa event type.
- *
- * @returns Read-only name string.
- * @param   eEvtType        The Cocoa event type.
- */
-const char *darwinEventTypeName(unsigned long eEvtType)
-{
-    switch (eEvtType)
+const char *darwinEventTypeName(unsigned long enmEventType)
+{
+    switch (enmEventType)
     {
 #define EVT_CASE(nm) case nm: return #nm
@@ -166,24 +143,18 @@
 }
 
-/**
- * Debug helper function for dumping a Cocoa event to stdout.
- *
- * @param   pszPrefix       Message prefix.
- * @param   pEvent          The Cocoa event.
- */
 void darwinPrintEvent(const char *pszPrefix, ConstNativeNSEventRef pEvent)
 {
-    NSEventType         eEvtType = [pEvent type];
-    NSUInteger          fEvtMask = [pEvent modifierFlags];
-    NSWindow           *pEvtWindow = [pEvent window];
-    NSInteger           iEvtWindow = [pEvent windowNumber];
-    NSGraphicsContext  *pEvtGraphCtx = [pEvent context];
+    NSEventType enmEventType = [pEvent type];
+    NSUInteger fEventMask = [pEvent modifierFlags];
+    NSWindow *pEventWindow = [pEvent window];
+    NSInteger iEventWindow = [pEvent windowNumber];
+    NSGraphicsContext *pEventGraphicsContext = [pEvent context];
 
     printf("%s%p: Type=%lu Modifiers=%08lx pWindow=%p #Wnd=%ld pGraphCtx=%p %s\n",
-           pszPrefix, (void*)pEvent, (unsigned long)eEvtType, (unsigned long)fEvtMask, (void*)pEvtWindow,
-           (long)iEvtWindow, (void*)pEvtGraphCtx, darwinEventTypeName(eEvtType));
-
-    /* dump type specific into. */
-    switch (eEvtType)
+           pszPrefix, (void*)pEvent, (unsigned long)enmEventType, (unsigned long)fEventMask, (void*)pEventWindow,
+           (long)iEventWindow, (void*)pEventGraphicsContext, darwinEventTypeName(enmEventType));
+
+    /* Dump type specific info: */
+    switch (enmEventType)
     {
         case NSLeftMouseDown:
@@ -240,5 +211,5 @@
 
             printf("    KeyCode=%04x", (int)[pEvent keyCode]);
-#define PRINT_MOD(cnst, nm) do { if (fEvtMask & (cnst)) printf(" %s", #nm); } while (0)
+#define PRINT_MOD(cnst, nm) do { if (fEventMask & (cnst)) printf(" %s", #nm); } while (0)
             /* device-independent: */
             PRINT_MOD(NSAlphaShiftKeyMask, "AlphaShift");
@@ -261,5 +232,5 @@
 #undef  PRINT_MOD
 
-            fOddBits = fEvtMask & ~fOddBits;
+            fOddBits = fEventMask & ~fOddBits;
             if (fOddBits)
                 printf(" fOddBits=%#08lx", (unsigned long)fOddBits);
