2002-08-02 23:57:46 +04:00
|
|
|
/*
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
|
|
|
* Copyright (C) 2002 Chris Schoeneman
|
|
|
|
*
|
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* found in the file COPYING that should have accompanied this file.
|
|
|
|
*
|
|
|
|
* This package is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
2001-11-19 03:33:36 +03:00
|
|
|
#ifndef CSYNERGYHOOK_H
|
|
|
|
#define CSYNERGYHOOK_H
|
|
|
|
|
|
|
|
#include "BasicTypes.h"
|
2002-06-19 15:23:49 +04:00
|
|
|
|
|
|
|
#if WINDOWS_LIKE
|
2002-06-10 20:49:46 +04:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2001-11-19 03:33:36 +03:00
|
|
|
#include <windows.h>
|
2002-06-19 15:23:49 +04:00
|
|
|
#else
|
|
|
|
#error CSynergyHook is a win32 specific file
|
|
|
|
#endif
|
2001-11-19 03:33:36 +03:00
|
|
|
|
|
|
|
#if defined(SYNRGYHK_EXPORTS)
|
|
|
|
#define CSYNERGYHOOK_API __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define CSYNERGYHOOK_API __declspec(dllimport)
|
|
|
|
#endif
|
|
|
|
|
2001-11-25 21:32:41 +03:00
|
|
|
#define SYNERGY_MSG_MARK WM_APP + 0x0011 // mark id; <unused>
|
|
|
|
#define SYNERGY_MSG_KEY WM_APP + 0x0012 // vk code; key data
|
|
|
|
#define SYNERGY_MSG_MOUSE_BUTTON WM_APP + 0x0013 // button msg; <unused>
|
2002-07-17 21:27:41 +04:00
|
|
|
#define SYNERGY_MSG_MOUSE_WHEEL WM_APP + 0x0014 // delta; <unused>
|
|
|
|
#define SYNERGY_MSG_MOUSE_MOVE WM_APP + 0x0015 // x; y
|
|
|
|
#define SYNERGY_MSG_POST_WARP WM_APP + 0x0016 // <unused>; <unused>
|
|
|
|
#define SYNERGY_MSG_PRE_WARP WM_APP + 0x0017 // x; y
|
|
|
|
#define SYNERGY_MSG_SCREEN_SAVER WM_APP + 0x0018 // activated; <unused>
|
|
|
|
#define SYNERGY_MSG_INPUT_FIRST SYNERGY_MSG_KEY
|
|
|
|
#define SYNERGY_MSG_INPUT_LAST SYNERGY_MSG_PRE_WARP
|
2001-11-19 03:33:36 +03:00
|
|
|
|
2002-06-09 01:48:00 +04:00
|
|
|
extern "C" {
|
|
|
|
|
2003-05-03 16:54:22 +04:00
|
|
|
enum EHookResult {
|
|
|
|
kHOOK_FAILED,
|
|
|
|
kHOOK_OKAY,
|
|
|
|
kHOOK_OKAY_LL
|
|
|
|
};
|
|
|
|
|
2002-06-24 01:53:31 +04:00
|
|
|
typedef int (*InitFunc)(DWORD targetQueueThreadID);
|
|
|
|
typedef int (*CleanupFunc)(void);
|
2003-05-03 16:54:22 +04:00
|
|
|
typedef EHookResult (*InstallFunc)(void);
|
2001-11-19 03:33:36 +03:00
|
|
|
typedef int (*UninstallFunc)(void);
|
2002-06-24 01:53:31 +04:00
|
|
|
typedef int (*InstallScreenSaverFunc)(void);
|
|
|
|
typedef int (*UninstallScreenSaverFunc)(void);
|
2002-07-11 17:13:37 +04:00
|
|
|
typedef void (*SetSidesFunc)(UInt32);
|
|
|
|
typedef void (*SetZoneFunc)(SInt32, SInt32, SInt32, SInt32, SInt32);
|
|
|
|
typedef void (*SetRelayFunc)(int);
|
2001-11-19 03:33:36 +03:00
|
|
|
|
2002-06-24 01:53:31 +04:00
|
|
|
CSYNERGYHOOK_API int init(DWORD);
|
|
|
|
CSYNERGYHOOK_API int cleanup(void);
|
2003-05-03 16:54:22 +04:00
|
|
|
CSYNERGYHOOK_API EHookResult install(void);
|
2001-11-19 03:33:36 +03:00
|
|
|
CSYNERGYHOOK_API int uninstall(void);
|
2002-06-24 01:53:31 +04:00
|
|
|
CSYNERGYHOOK_API int installScreenSaver(void);
|
|
|
|
CSYNERGYHOOK_API int uninstallScreenSaver(void);
|
2002-07-11 17:13:37 +04:00
|
|
|
CSYNERGYHOOK_API void setSides(UInt32 sides);
|
|
|
|
CSYNERGYHOOK_API void setZone(SInt32 x, SInt32 y, SInt32 w, SInt32 h,
|
2002-06-19 21:03:29 +04:00
|
|
|
SInt32 jumpZoneSize);
|
2002-07-11 17:13:37 +04:00
|
|
|
CSYNERGYHOOK_API void setRelay(int enable); // relay iff enable != 0
|
2001-11-19 03:33:36 +03:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|