• Main Page
  • Classes
  • Files
  • File List

winmmjoy.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2012 Bolton Software Ltd.
00004  * Copyright (C) 2012 Nick Bolton
00005  * 
00006  * This package is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * found in the file COPYING that should have accompanied this file.
00009  * 
00010  * This package is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  */
00018 
00019 #pragma once
00020 
00021 #define WIN32_LEAN_AND_MEAN
00022 #include <Windows.h>
00023 
00024 #if defined(winmmjoy_EXPORTS)
00025 #define WINMMJOY_API __declspec(dllexport)
00026 #else
00027 #define WINMMJOY_API __declspec(dllimport)
00028 #endif
00029 
00030 extern "C" {
00031 
00032 WINMMJOY_API int        init(void (*sendEvent)(const char*, void*), void (*log)(const char*));
00033 WINMMJOY_API int        cleanup();
00034 
00035 }
00036 
00037 DWORD WINAPI mainLoop(void* data);
00038 
00039 typedef unsigned char GameDeviceID;
00040 typedef unsigned short GameDeviceButton;
00041 
00042 class CGameDeviceButtonInfo {
00043 public:
00044     CGameDeviceButtonInfo(GameDeviceID id, GameDeviceButton buttons) :
00045       m_id(id), m_buttons(buttons) { }
00046 public:
00047     GameDeviceID m_id;
00048     GameDeviceButton m_buttons;
00049 };
00050 
00051 class CGameDeviceStickInfo {
00052 public:
00053     CGameDeviceStickInfo(GameDeviceID id, short x1, short y1, short x2, short y2) :
00054       m_id(id), m_x1(x1), m_x2(x2), m_y1(y1), m_y2(y2) { }
00055 public:
00056     GameDeviceID m_id;
00057     short m_x1;
00058     short m_x2;
00059     short m_y1;
00060     short m_y2;
00061 };
00062 
00063 class CGameDeviceTriggerInfo {
00064 public:
00065     CGameDeviceTriggerInfo(GameDeviceID id, unsigned char t1, unsigned char t2) :
00066       m_id(id), m_t1(t1), m_t2(t2) { }
00067 public:
00068     GameDeviceID m_id;
00069     unsigned char m_t1;
00070     unsigned char m_t2;
00071 };

Generated on Wed May 22 2013 00:00:05 for Synergy by  doxygen 1.7.1