source: trunk/synergy/lib/platform/CSynergyHook.h

Last change on this file was 2749, checked in by bird, 19 years ago

synergy v1.3.1 sources (zip).

File size: 2.6 KB
Line 
1/*
2 * synergy -- mouse and keyboard sharing utility
3 * Copyright (C) 2002 Chris Schoeneman
4 *
5 * This package is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * found in the file COPYING that should have accompanied this file.
8 *
9 * This package is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef CSYNERGYHOOK_H
16#define CSYNERGYHOOK_H
17
18#include "BasicTypes.h"
19#define WIN32_LEAN_AND_MEAN
20#include <windows.h>
21
22#if defined(SYNRGYHK_EXPORTS)
23#define CSYNERGYHOOK_API __declspec(dllexport)
24#else
25#define CSYNERGYHOOK_API __declspec(dllimport)
26#endif
27
28#define SYNERGY_MSG_MARK WM_APP + 0x0011 // mark id; <unused>
29#define SYNERGY_MSG_KEY WM_APP + 0x0012 // vk code; key data
30#define SYNERGY_MSG_MOUSE_BUTTON WM_APP + 0x0013 // button msg; <unused>
31#define SYNERGY_MSG_MOUSE_WHEEL WM_APP + 0x0014 // delta; <unused>
32#define SYNERGY_MSG_MOUSE_MOVE WM_APP + 0x0015 // x; y
33#define SYNERGY_MSG_POST_WARP WM_APP + 0x0016 // <unused>; <unused>
34#define SYNERGY_MSG_PRE_WARP WM_APP + 0x0017 // x; y
35#define SYNERGY_MSG_SCREEN_SAVER WM_APP + 0x0018 // activated; <unused>
36#define SYNERGY_MSG_DEBUG WM_APP + 0x0019 // data, data
37#define SYNERGY_MSG_INPUT_FIRST SYNERGY_MSG_KEY
38#define SYNERGY_MSG_INPUT_LAST SYNERGY_MSG_PRE_WARP
39#define SYNERGY_HOOK_LAST_MSG SYNERGY_MSG_DEBUG
40
41#define SYNERGY_HOOK_FAKE_INPUT_VIRTUAL_KEY VK_CANCEL
42#define SYNERGY_HOOK_FAKE_INPUT_SCANCODE 0
43
44extern "C" {
45
46enum EHookResult {
47 kHOOK_FAILED,
48 kHOOK_OKAY,
49 kHOOK_OKAY_LL
50};
51
52enum EHookMode {
53 kHOOK_DISABLE,
54 kHOOK_WATCH_JUMP_ZONE,
55 kHOOK_RELAY_EVENTS
56};
57
58typedef int (*InitFunc)(DWORD targetQueueThreadID);
59typedef int (*CleanupFunc)(void);
60typedef EHookResult (*InstallFunc)(void);
61typedef int (*UninstallFunc)(void);
62typedef int (*InstallScreenSaverFunc)(void);
63typedef int (*UninstallScreenSaverFunc)(void);
64typedef void (*SetSidesFunc)(UInt32);
65typedef void (*SetZoneFunc)(SInt32, SInt32, SInt32, SInt32, SInt32);
66typedef void (*SetModeFunc)(int);
67
68CSYNERGYHOOK_API int init(DWORD);
69CSYNERGYHOOK_API int cleanup(void);
70CSYNERGYHOOK_API EHookResult install(void);
71CSYNERGYHOOK_API int uninstall(void);
72CSYNERGYHOOK_API int installScreenSaver(void);
73CSYNERGYHOOK_API int uninstallScreenSaver(void);
74CSYNERGYHOOK_API void setSides(UInt32 sides);
75CSYNERGYHOOK_API void setZone(SInt32 x, SInt32 y, SInt32 w, SInt32 h,
76 SInt32 jumpZoneSize);
77CSYNERGYHOOK_API void setMode(EHookMode mode);
78
79}
80
81#endif
Note: See TracBrowser for help on using the repository browser.