source: trunk/synergy/doc/developer.html@ 3232

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

synergy v1.3.1 sources (zip).

File size: 3.7 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2<html>
3<head>
4 <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
5 <meta name="keywords" content="Virtual Screen, Open Source, Software" />
6 <meta name="description" content="Mouse and Keyboard Sharing" />
7 <link rel="stylesheet" type="text/css" href="synergy.css" media="screen" />
8 <title>Synergy Developer Documentation</title>
9</head>
10<body class="main">
11<p>
12Synergy is reasonably well commented so reading the source code
13should be enough to understand particular pieces. See the
14<span class="code">doc/PORTING</span>
15file in the synergy source code for more high-level information.
16</p><p>
17</p><h4>How it works</h4><p>
18</p><p>
19The theory behind synergy is simple: the server captures mouse,
20keyboard, clipboard, and screen saver events and forwards them to
21one or more clients. If input is directed to the server itself
22then the input is delivered normally. In practice, however, many
23complications arise.
24</p><p>
25First, different keyboard mappings can produce different characters.
26Synergy attempts to generate the same character on the client as
27would've been generated on the server, including appropriate modifier
28keys (like Control and Alt). Non-character keys like Shift are also
29synthesized if possible. Sometimes the client simply cannot create
30the character or doesn't have a corresponding non-character key and
31synergy must discard the event. Note that synergy won't necessarily
32synthesize an event for the corresponding key on the client's
33keyboard. For example, if the client or server can't distinguish
34between the left and right shift keys then synergy can't be certain
35to synthesize the shift on the same side of the keyboard as the user
36pressed.
37</p><p>
38Second, different systems have different clipboards and clipboard
39formats. The X window system has a system-wide selection and
40clipboard (and yet other buffers) while Microsoft Windows has only
41a system-wide clipboard. Synergy has to choose which of these
42buffers correspond to one another. Furthermore, different systems
43use different text encodings and line breaks. Synergy mediates and
44converts between them.
45</p><p>
46Finally, there are no standards across operating systems for some
47operations that synergy requires. Among these are: intercepting
48and synthesizing events; enabling, disabling, starting and stopping
49the screen saver; detecting when the screen saver starts; reading
50and writing the clipboard(s).
51</p><p>
52All this means that synergy must be customized to each operating
53system (or windowing system in the case of X windows). Synergy
54breaks platform differences into two groups. The first includes
55the mundane platform dependent things: file system stuff,
56multithreading, network I/O, multi-byte and wide character
57conversion, time and sleeping, message display and logging, and
58running a process detached from a terminal. This code lives in
59<span class="code">lib/arch</span>.
60</p><p>
61The second includes screen and window management handling, user
62event handling, event synthesis, the clipboards, and the screen
63saver. This code lives in <span class="code">lib/platform</span>.
64</p><p>
65For both groups, there are particular classes or interfaces that
66must be inherited and implemented for each platform. See the
67<span class="code">doc/PORTING</span> file in the synergy source
68code for more information.
69</p><p>
70</p><h4>Auto-generated Documentation</h4><p>
71</p><p>
72Synergy can automatically generate documentation from the comments
73in the code using <a target="_top" href="http://www.doxygen.org/">doxygen</a>.
74Use <span class="command">make doxygen</span> to build it yourself
75from the source code into the <span class="code">doc/doxygen/html</span>
76directory.
77</p>
78</p>
79</body>
80
81</html>
Note: See TracBrowser for help on using the repository browser.