// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/defs.h"
+// ===========================================================================
+// declarations
+// ===========================================================================
+
+// ---------------------------------------------------------------------------
+// headers
+// ---------------------------------------------------------------------------
+
+#ifdef __GNUG__
+#pragma implementation "hid.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+ #include "wx/defs.h"
+#endif
+
//DARWIN _ONLY_
#ifdef __DARWIN__
#include "wx/string.h"
#include "wx/log.h"
+
+// ---------------------------------------------------------------------------
+// assertion macros
+// ---------------------------------------------------------------------------
+
#define wxFORCECHECK_MSG(arg, msg) \
{\
if (arg) \
// implementation
// ============================================================================
+// ---------------------------------------------------------------------------
+// wxHIDDevice
+// ---------------------------------------------------------------------------
bool wxHIDDevice::Create (const int& nClass, const int& nType)
{
kCFAllocatorDefault, kNilOptions) == KERN_SUCCESS);
//Just for sanity :)
- wxVERIFY(CFGetTypeID(CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey))) == CFStringGetTypeID());
+ wxASSERT(CFGetTypeID(CFDictionaryGetValue(pDictionary, CFSTR(kIOHIDProductKey))) == CFStringGetTypeID());
//Get [product] name
m_szName = CFStringGetCStringPtr (
}
}
}
-/*
-enum
-{
- kHIDUsage_KeyboardHyphen = 0x2D,
- kHIDUsage_KeyboardEqualSign = 0x2E,
- kHIDUsage_KeyboardOpenBracket = 0x2F,
- kHIDUsage_KeyboardCloseBracket = 0x30,
- kHIDUsage_KeyboardBackslash = 0x31, //* \ or | *
- kHIDUsage_KeyboardNonUSPound = 0x32, /* Non-US # or _ *
- kHIDUsage_KeyboardSemicolon = 0x33, /* ; or : *
- kHIDUsage_KeyboardQuote = 0x34, /* ' or " *
- kHIDUsage_KeyboardGraveAccentAndTilde = 0x35, /* Grave Accent and Tilde *
- kHIDUsage_KeyboardComma = 0x36, /* , or < *
- kHIDUsage_KeyboardPeriod = 0x37, /* . or > *
- kHIDUsage_KeyboardSlash = 0x38, /* / or ? *
- kHIDUsage_KeyboardCapsLock = 0x39, /* Caps Lock *
-
- kHIDUsage_KeyboardPrintScreen = 0x46, /* Print Screen *
- kHIDUsage_KeyboardScrollLock = 0x47, /* Scroll Lock *
- kHIDUsage_KeyboardPause = 0x48, /* Pause *
- kHIDUsage_KeyboardInsert = 0x49, /* Insert *
- kHIDUsage_KeyboardHome = 0x4A, /* Home *
- kHIDUsage_KeyboardDeleteForward = 0x4C, /* Delete Forward *
-
- kHIDUsage_KeyboardUpArrow
- kHIDUsage_KeypadNumLock
- kHIDUsage_KeypadSlash
- kHIDUsage_KeypadAsterisk
- kHIDUsage_KeypadHyphen
- kHIDUsage_KeypadPlus
- kHIDUsage_KeypadEnter
- kHIDUsage_KeypadPeriod
- kHIDUsage_KeyboardNonUSBackslash
- kHIDUsage_KeyboardApplication
- kHIDUsage_KeyboardPower
- kHIDUsage_KeypadEqualSign
-};
-/*
- enum wxKeyCode
- {
- WXK_START = 300,
- WXK_LBUTTON,
- WXK_RBUTTON,
- WXK_CANCEL,
- WXK_MBUTTON,
- WXK_CLEAR,
- WXK_SHIFT,
- WXK_ALT,
- WXK_CONTROL,
- WXK_MENU,
- WXK_PAUSE,
- WXK_PRIOR, * Page up *
- WXK_NEXT, * Page down *
- WXK_END,
- WXK_HOME,
- WXK_LEFT,
- WXK_UP,
- WXK_RIGHT,
- WXK_DOWN,
- WXK_SELECT,
- WXK_PRINT,
- WXK_EXECUTE,
- WXK_SNAPSHOT,
- WXK_INSERT,
- WXK_HELP,
- WXK_MULTIPLY,
- WXK_ADD,
- WXK_SEPARATOR,
- WXK_SUBTRACT,
- WXK_DECIMAL,
- WXK_DIVIDE,
- WXK_PAGEUP,
- WXK_PAGEDOWN,
-
- WXK_NUMPAD_SPACE,
- WXK_NUMPAD_TAB,
- WXK_NUMPAD_ENTER,
- WXK_NUMPAD_HOME,
- WXK_NUMPAD_LEFT,
- WXK_NUMPAD_UP,
- WXK_NUMPAD_RIGHT,
- WXK_NUMPAD_DOWN,
- WXK_NUMPAD_PRIOR,
- WXK_NUMPAD_PAGEUP,
- WXK_NUMPAD_NEXT,
- WXK_NUMPAD_PAGEDOWN,
- WXK_NUMPAD_END,
- WXK_NUMPAD_BEGIN,
- WXK_NUMPAD_INSERT,
- WXK_NUMPAD_DELETE,
- WXK_NUMPAD_EQUAL,
- WXK_NUMPAD_MULTIPLY,
- WXK_NUMPAD_ADD,
- WXK_NUMPAD_SEPARATOR,
- WXK_NUMPAD_SUBTRACT,
- WXK_NUMPAD_DECIMAL,
- WXK_NUMPAD_DIVIDE,
-
- WXK_WINDOWS_LEFT,
- WXK_WINDOWS_RIGHT,
- WXK_WINDOWS_MENU ,
- WXK_COMMAND
- };
-
- */
+// ---------------------------------------------------------------------------
+// wxHIDKeyboard
+// ---------------------------------------------------------------------------
+
enum
{
WXK_RSHIFT = 400,