Go to the documentation of this file.00001
00002
00003
00004 #ifndef __NEX_NEXCOMMON_H
00005 #define __NEX_NEXCOMMON_H
00006
00008 enum NexErrorCode
00009 {
00010 NEX_OK,
00011 NEX_DEVICEINUSE,
00012 NEX_DEVICEUNPLUGGED,
00013 NEX_DEVICELOST,
00014 NEX_OUTOFMEMORY,
00015 NEX_UNKNOWNERROR,
00016 NEX_INVALIDPARAM,
00017 NEX_INVALIDSTATE
00018 };
00019
00021 enum NexDeviceType
00022 {
00023 NEXDEV_MOUSE,
00024 NEXDEV_KEYBOARD,
00025 NEXDEV_MAX
00026 };
00027
00029 enum NexEventType
00030 {
00031 NEXEVENT_MOUSEMOVE,
00032 NEXEVENT_BUTTONDOWN,
00033 NEXEVENT_BUTTONUP,
00034 NEXEVENT_WHEEL,
00035 NEXEVENT_KEYDOWN,
00036 NEXEVENT_KEYUP,
00037 NEXEVENT_UNPLUGGED,
00038 NEXEVENT_REPLUGGED,
00039 NEXEVENT_MAX
00040 };
00041
00043 struct NexEvent
00044 {
00045 NexEventType type;
00046 int data[2];
00047 };
00048
00049 #define NEX_NAME_MAX 128 ///< Maximum size of a buffer containing a user-friendly, displayable name for a device.
00050
00052 struct NexMouseInfo
00053 {
00054 char displayName[NEX_NAME_MAX];
00055 int resolutionX;
00056 int resolutionY;
00057 int nrButtons;
00058 };
00059
00061 struct NexKeyboardInfo
00062 {
00063 char displayName[NEX_NAME_MAX];
00064 int nrKeycodes;
00065 };
00066
00067 #endif
00068