]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/hid.cpp
replaced wxLogDebugs() with wxLogTrace()S
[wxWidgets.git] / src / mac / carbon / hid.cpp
index 927341fff0e6962fd7f1fcc6c4aa968add76ffaa..3dec1a481e93d09f2ef15ab053d3f975433b22f9 100644 (file)
@@ -9,7 +9,24 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#include "wx/defs.h"
+// ===========================================================================
+// declarations
+// ===========================================================================
+
+// ---------------------------------------------------------------------------
+// headers
+// ---------------------------------------------------------------------------
+
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+#pragma implementation "hid.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
 
 //DARWIN _ONLY_
 #ifdef __DARWIN__
 #include "wx/string.h"
 #include "wx/log.h"
 
+
+// ---------------------------------------------------------------------------
+// assertion macros
+// ---------------------------------------------------------------------------
+
 #define wxFORCECHECK_MSG(arg, msg)  \
 {\
        if (arg) \
@@ -57,6 +79,9 @@ void CFShowTypeIDDescription(CFTypeRef pData)
 // implementation
 // ============================================================================
 
+// ---------------------------------------------------------------------------
+// wxHIDDevice
+// ---------------------------------------------------------------------------
 
 bool wxHIDDevice::Create (const int& nClass, const int& nType)
 {
@@ -93,11 +118,11 @@ bool wxHIDDevice::Create (const int& nClass, const int& nType)
        //Now get the maching services
        io_iterator_t pIterator;
        wxIOCHECK(IOServiceGetMatchingServices(m_pPort, pDictionary, &pIterator), "No Matching HID Services");
-       wxASSERT(pIterator != NULL);
+       wxASSERT(pIterator != 0);
 
        //Now we iterate through them
        io_object_t pObject;
-       while ( (pObject = IOIteratorNext(pIterator)) != NULL)
+       while ( (pObject = IOIteratorNext(pIterator)) != 0)
        {
                wxVERIFY(IORegistryEntryCreateCFProperties(pObject, &pDictionary,
                                                                                        kCFAllocatorDefault, kNilOptions) == KERN_SUCCESS);
@@ -208,6 +233,10 @@ wxHIDDevice::~wxHIDDevice()
        }
 }
 
+// ---------------------------------------------------------------------------
+// wxHIDKeyboard
+// ---------------------------------------------------------------------------
+
 enum
 {
        WXK_RSHIFT = 400,