From 143c4cd2975988cc122654eb7dde11d07c1c6a96 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 25 Apr 2011 21:09:32 +0000 Subject: [PATCH] restructured source code, put CMakeLists.txt in more conventional locations, and split the libraries up --- CMakeLists.txt | 321 ++- cmake/CMakeLists_config.txt | 214 -- cmake/CMakeLists_cpack.txt | 107 - cmake/CMakeLists_launcher.txt | 84 - cmake/CMakeLists_lib.txt | 417 ---- cmake/CMakeLists_synergyc.txt | 84 - cmake/CMakeLists_synergys.txt | 84 - cmd/launcher/CAddScreen.cpp | 430 ---- cmd/launcher/CAddScreen.h | 77 - cmd/launcher/CAdvancedOptions.cpp | 272 --- cmd/launcher/CAdvancedOptions.h | 83 - cmd/launcher/CAutoStart.cpp | 364 --- cmd/launcher/CAutoStart.h | 93 - cmd/launcher/CGlobalOptions.cpp | 317 --- cmd/launcher/CGlobalOptions.h | 70 - cmd/launcher/CHotkeyOptions.cpp | 1955 ----------------- cmd/launcher/CHotkeyOptions.h | 230 -- cmd/launcher/CInfo.cpp | 114 - cmd/launcher/CInfo.h | 60 - cmd/launcher/CScreensLinks.cpp | 858 -------- cmd/launcher/CScreensLinks.h | 141 -- cmd/launcher/LaunchUtil.cpp | 264 --- cmd/launcher/LaunchUtil.h | 64 - cmd/launcher/launcher.cpp | 759 ------- cmd/launcher/launcher.rc | 626 ------ cmd/launcher/resource.h | 189 -- cmd/launcher/synergy.ico | Bin 287934 -> 0 bytes {cmake => res}/Installer.nsi.in | 0 {cmake => res}/License.rtf | 0 {cmake => res}/License.tex | 0 {cmake => res}/Readme.txt | 0 {cmake => res}/config.h.in | 0 {cmake => res}/doxygen.cfg.in | 0 {cmake => res}/synergy.desktop | 0 src/CMakeLists.txt | 25 + .../cmd/CMakeLists.txt | 9 +- {cmd => src/cmd}/synergyc/.gitignore | 0 .../CMSWindowsClientTaskBarReceiver.cpp | 0 .../CMSWindowsClientTaskBarReceiver.h | 0 src/cmd/synergyc/CMakeLists.txt | 56 + .../synergyc/COSXClientTaskBarReceiver.cpp | 0 .../cmd}/synergyc/COSXClientTaskBarReceiver.h | 0 .../CXWindowsClientTaskBarReceiver.cpp | 0 .../synergyc/CXWindowsClientTaskBarReceiver.h | 0 {cmd => src/cmd}/synergyc/resource.h | 0 {cmd => src/cmd}/synergyc/synergyc.cpp | 0 {cmd => src/cmd}/synergyc/synergyc.ico | Bin {cmd => src/cmd}/synergyc/synergyc.rc | 0 {cmd => src/cmd}/synergyc/tb_error.ico | Bin {cmd => src/cmd}/synergyc/tb_idle.ico | Bin {cmd => src/cmd}/synergyc/tb_run.ico | Bin {cmd => src/cmd}/synergyc/tb_wait.ico | Bin {cmd => src/cmd}/synergys/.gitignore | 0 .../CMSWindowsServerTaskBarReceiver.cpp | 0 .../CMSWindowsServerTaskBarReceiver.h | 0 src/cmd/synergys/CMakeLists.txt | 58 + .../synergys/COSXServerTaskBarReceiver.cpp | 0 .../cmd}/synergys/COSXServerTaskBarReceiver.h | 0 .../CXWindowsServerTaskBarReceiver.cpp | 0 .../synergys/CXWindowsServerTaskBarReceiver.h | 0 {cmd => src/cmd}/synergys/resource.h | 0 {cmd => src/cmd}/synergys/synergys.cpp | 0 {cmd => src/cmd}/synergys/synergys.ico | Bin {cmd => src/cmd}/synergys/synergys.rc | 0 {cmd => src/cmd}/synergys/tb_error.ico | Bin {cmd => src/cmd}/synergys/tb_idle.ico | Bin {cmd => src/cmd}/synergys/tb_run.ico | Bin {cmd => src/cmd}/synergys/tb_wait.ico | Bin {gui => src/gui}/COPYING | 0 {gui => src/gui}/INSTALL | 0 {gui => src/gui}/README | 0 {gui => src/gui}/qsynergy.pro | 0 {gui => src/gui}/res/AboutDialogBase.ui | 0 {gui => src/gui}/res/ActionDialogBase.ui | 0 {gui => src/gui}/res/HotkeyDialogBase.ui | 0 {gui => src/gui}/res/LogDialogBase.ui | 0 {gui => src/gui}/res/MainWindowBase.ui | 0 {gui => src/gui}/res/QSynergy.qrc | 0 .../gui}/res/ScreenSettingsDialogBase.ui | 0 .../gui}/res/ServerConfigDialogBase.ui | 0 {gui => src/gui}/res/SettingsDialogBase.ui | 0 {gui => src/gui}/res/WindowsServicesBase.ui | 0 .../res/icons/16x16/synergy-connected.png | Bin .../res/icons/16x16/synergy-disconnected.png | Bin .../gui}/res/icons/64x64/user-trash.png | Bin .../gui}/res/icons/64x64/video-display.png | Bin {gui => src/gui}/res/mac/QSynergy.icns | Bin {gui => src/gui}/res/mac/QSynergy.plist | 0 {gui => src/gui}/res/win/QSynergy.ico | Bin {gui => src/gui}/res/win/QSynergy.rc | 0 {gui => src/gui}/src/AboutDialog.cpp | 0 {gui => src/gui}/src/AboutDialog.h | 0 {gui => src/gui}/src/Action.cpp | 0 {gui => src/gui}/src/Action.h | 0 {gui => src/gui}/src/ActionDialog.cpp | 0 {gui => src/gui}/src/ActionDialog.h | 0 {gui => src/gui}/src/AppConfig.cpp | 0 {gui => src/gui}/src/AppConfig.h | 0 {gui => src/gui}/src/BaseConfig.cpp | 0 {gui => src/gui}/src/BaseConfig.h | 0 {gui => src/gui}/src/Hotkey.cpp | 0 {gui => src/gui}/src/Hotkey.h | 0 {gui => src/gui}/src/HotkeyDialog.cpp | 0 {gui => src/gui}/src/HotkeyDialog.h | 0 {gui => src/gui}/src/KeySequence.cpp | 0 {gui => src/gui}/src/KeySequence.h | 0 {gui => src/gui}/src/KeySequenceWidget.cpp | 0 {gui => src/gui}/src/KeySequenceWidget.h | 0 {gui => src/gui}/src/LogDialog.cpp | 0 {gui => src/gui}/src/LogDialog.h | 0 {gui => src/gui}/src/MainWindow.cpp | 0 {gui => src/gui}/src/MainWindow.h | 0 {gui => src/gui}/src/NewScreenWidget.cpp | 0 {gui => src/gui}/src/NewScreenWidget.h | 0 {gui => src/gui}/src/QSynergyApplication.cpp | 0 {gui => src/gui}/src/QSynergyApplication.h | 0 {gui => src/gui}/src/Screen.cpp | 0 {gui => src/gui}/src/Screen.h | 0 {gui => src/gui}/src/ScreenSettingsDialog.cpp | 0 {gui => src/gui}/src/ScreenSettingsDialog.h | 0 {gui => src/gui}/src/ScreenSetupModel.cpp | 0 {gui => src/gui}/src/ScreenSetupModel.h | 0 {gui => src/gui}/src/ScreenSetupView.cpp | 0 {gui => src/gui}/src/ScreenSetupView.h | 0 {gui => src/gui}/src/ServerConfig.cpp | 0 {gui => src/gui}/src/ServerConfig.h | 0 {gui => src/gui}/src/ServerConfigDialog.cpp | 0 {gui => src/gui}/src/ServerConfigDialog.h | 0 {gui => src/gui}/src/SettingsDialog.cpp | 0 {gui => src/gui}/src/SettingsDialog.h | 0 {gui => src/gui}/src/TrashScreenWidget.cpp | 0 {gui => src/gui}/src/TrashScreenWidget.h | 0 {gui => src/gui}/src/WindowsServices.cpp | 0 {gui => src/gui}/src/WindowsServices.h | 0 {gui => src/gui}/src/main.cpp | 0 .../integtests/CMakeLists.txt | 64 +- src/{integtest => integtests}/Main.cpp | 0 .../platform/CMSWindowsClipboardTests.cpp | 0 .../platform/COSXClipboardTests.cpp | 0 .../platform/CXWindowsClipboardTests.cpp | 0 src/lib/CMakeLists.txt | 25 + {lib => src/lib}/arch/CArch.cpp | 0 {lib => src/lib}/arch/CArch.h | 0 {lib => src/lib}/arch/CArchAppUtil.cpp | 0 {lib => src/lib}/arch/CArchAppUtil.h | 0 {lib => src/lib}/arch/CArchAppUtilUnix.cpp | 0 {lib => src/lib}/arch/CArchAppUtilUnix.h | 0 {lib => src/lib}/arch/CArchAppUtilWindows.cpp | 0 {lib => src/lib}/arch/CArchAppUtilWindows.h | 0 {lib => src/lib}/arch/CArchConsoleStd.cpp | 0 {lib => src/lib}/arch/CArchConsoleStd.h | 0 {lib => src/lib}/arch/CArchConsoleUnix.cpp | 0 {lib => src/lib}/arch/CArchConsoleUnix.h | 0 {lib => src/lib}/arch/CArchConsoleWindows.cpp | 0 {lib => src/lib}/arch/CArchConsoleWindows.h | 0 {lib => src/lib}/arch/CArchDaemonNone.cpp | 0 {lib => src/lib}/arch/CArchDaemonNone.h | 0 {lib => src/lib}/arch/CArchDaemonUnix.cpp | 0 {lib => src/lib}/arch/CArchDaemonUnix.h | 0 {lib => src/lib}/arch/CArchDaemonWindows.cpp | 0 {lib => src/lib}/arch/CArchDaemonWindows.h | 0 {lib => src/lib}/arch/CArchFileUnix.cpp | 0 {lib => src/lib}/arch/CArchFileUnix.h | 0 {lib => src/lib}/arch/CArchFileWindows.cpp | 0 {lib => src/lib}/arch/CArchFileWindows.h | 0 {lib => src/lib}/arch/CArchLogUnix.cpp | 0 {lib => src/lib}/arch/CArchLogUnix.h | 0 {lib => src/lib}/arch/CArchLogWindows.cpp | 0 {lib => src/lib}/arch/CArchLogWindows.h | 0 {lib => src/lib}/arch/CArchMiscWindows.cpp | 0 {lib => src/lib}/arch/CArchMiscWindows.h | 0 .../lib}/arch/CArchMultithreadPosix.cpp | 0 {lib => src/lib}/arch/CArchMultithreadPosix.h | 0 .../lib}/arch/CArchMultithreadWindows.cpp | 0 .../lib}/arch/CArchMultithreadWindows.h | 0 {lib => src/lib}/arch/CArchNetworkBSD.cpp | 0 {lib => src/lib}/arch/CArchNetworkBSD.h | 0 {lib => src/lib}/arch/CArchNetworkWinsock.cpp | 0 {lib => src/lib}/arch/CArchNetworkWinsock.h | 0 {lib => src/lib}/arch/CArchSleepUnix.cpp | 0 {lib => src/lib}/arch/CArchSleepUnix.h | 0 {lib => src/lib}/arch/CArchSleepWindows.cpp | 0 {lib => src/lib}/arch/CArchSleepWindows.h | 0 {lib => src/lib}/arch/CArchStringUnix.cpp | 0 {lib => src/lib}/arch/CArchStringUnix.h | 0 {lib => src/lib}/arch/CArchStringWindows.cpp | 0 {lib => src/lib}/arch/CArchStringWindows.h | 0 {lib => src/lib}/arch/CArchSystemUnix.cpp | 0 {lib => src/lib}/arch/CArchSystemUnix.h | 0 {lib => src/lib}/arch/CArchSystemWindows.cpp | 0 {lib => src/lib}/arch/CArchSystemWindows.h | 0 {lib => src/lib}/arch/CArchTaskBarWindows.cpp | 0 {lib => src/lib}/arch/CArchTaskBarWindows.h | 0 .../lib}/arch/CArchTaskBarXWindows.cpp | 0 {lib => src/lib}/arch/CArchTaskBarXWindows.h | 0 {lib => src/lib}/arch/CArchTimeUnix.cpp | 0 {lib => src/lib}/arch/CArchTimeUnix.h | 0 {lib => src/lib}/arch/CArchTimeWindows.cpp | 0 {lib => src/lib}/arch/CArchTimeWindows.h | 0 src/lib/arch/CMakeLists.txt | 93 + {lib => src/lib}/arch/CMultibyte.cpp | 0 {lib => src/lib}/arch/IArchAppUtil.h | 0 {lib => src/lib}/arch/IArchConsole.h | 0 {lib => src/lib}/arch/IArchDaemon.h | 0 {lib => src/lib}/arch/IArchFile.h | 0 {lib => src/lib}/arch/IArchLog.h | 0 {lib => src/lib}/arch/IArchMultithread.h | 0 {lib => src/lib}/arch/IArchNetwork.h | 0 {lib => src/lib}/arch/IArchSleep.h | 0 {lib => src/lib}/arch/IArchString.h | 0 {lib => src/lib}/arch/IArchSystem.h | 0 {lib => src/lib}/arch/IArchTaskBar.h | 0 {lib => src/lib}/arch/IArchTaskBarReceiver.h | 0 {lib => src/lib}/arch/IArchTime.h | 0 {lib => src/lib}/arch/XArch.cpp | 0 {lib => src/lib}/arch/XArch.h | 0 {lib => src/lib}/arch/XArchUnix.cpp | 0 {lib => src/lib}/arch/XArchUnix.h | 0 {lib => src/lib}/arch/XArchWindows.cpp | 0 {lib => src/lib}/arch/XArchWindows.h | 0 {lib => src/lib}/arch/vsnprintf.cpp | 0 {lib => src/lib}/base/CEvent.cpp | 0 {lib => src/lib}/base/CEvent.h | 0 {lib => src/lib}/base/CEventQueue.cpp | 0 {lib => src/lib}/base/CEventQueue.h | 0 {lib => src/lib}/base/CFunctionEventJob.cpp | 0 {lib => src/lib}/base/CFunctionEventJob.h | 0 {lib => src/lib}/base/CFunctionJob.cpp | 0 {lib => src/lib}/base/CFunctionJob.h | 0 {lib => src/lib}/base/CLog.cpp | 0 {lib => src/lib}/base/CLog.h | 0 src/lib/base/CMakeLists.txt | 66 + {lib => src/lib}/base/CPriorityQueue.h | 0 .../lib}/base/CSimpleEventQueueBuffer.cpp | 0 .../lib}/base/CSimpleEventQueueBuffer.h | 0 {lib => src/lib}/base/CStopwatch.cpp | 0 {lib => src/lib}/base/CStopwatch.h | 0 {lib => src/lib}/base/CString.h | 0 {lib => src/lib}/base/CStringUtil.cpp | 0 {lib => src/lib}/base/CStringUtil.h | 0 {lib => src/lib}/base/CUnicode.cpp | 0 {lib => src/lib}/base/CUnicode.h | 0 {lib => src/lib}/base/IEventJob.h | 0 {lib => src/lib}/base/IEventQueue.cpp | 0 {lib => src/lib}/base/IEventQueue.h | 0 {lib => src/lib}/base/IEventQueueBuffer.h | 0 {lib => src/lib}/base/IJob.h | 0 {lib => src/lib}/base/ILogOutputter.h | 0 {lib => src/lib}/base/LogOutputters.cpp | 0 {lib => src/lib}/base/LogOutputters.h | 0 {lib => src/lib}/base/TMethodEventJob.h | 0 {lib => src/lib}/base/TMethodJob.h | 0 {lib => src/lib}/base/XBase.cpp | 0 {lib => src/lib}/base/XBase.h | 0 {lib => src/lib}/client/CClient.cpp | 0 {lib => src/lib}/client/CClient.h | 0 src/lib/client/CMakeLists.txt | 41 + {lib => src/lib}/client/CServerProxy.cpp | 0 {lib => src/lib}/client/CServerProxy.h | 0 {lib => src/lib}/common/BasicTypes.h | 0 .../lib/common/CMakeLists.txt | 15 +- {lib => src/lib}/common/IInterface.h | 0 {lib => src/lib}/common/MacOSXPrecomp.h | 0 {lib => src/lib}/common/Version.cpp | 0 {lib => src/lib}/common/Version.h | 0 {lib => src/lib}/common/common.h | 0 {lib => src/lib}/common/stdbitset.h | 0 {lib => src/lib}/common/stddeque.h | 0 {lib => src/lib}/common/stdfstream.h | 0 {lib => src/lib}/common/stdistream.h | 0 {lib => src/lib}/common/stdlist.h | 0 {lib => src/lib}/common/stdmap.h | 0 {lib => src/lib}/common/stdostream.h | 0 {lib => src/lib}/common/stdpost.h | 0 {lib => src/lib}/common/stdpre.h | 0 {lib => src/lib}/common/stdset.h | 0 {lib => src/lib}/common/stdsstream.h | 0 {lib => src/lib}/common/stdstring.h | 0 {lib => src/lib}/common/stdvector.h | 0 src/lib/io/CMakeLists.txt | 41 + {lib => src/lib}/io/CStreamBuffer.cpp | 0 {lib => src/lib}/io/CStreamBuffer.h | 0 {lib => src/lib}/io/CStreamFilter.cpp | 0 {lib => src/lib}/io/CStreamFilter.h | 0 {lib => src/lib}/io/IStream.cpp | 0 {lib => src/lib}/io/IStream.h | 0 {lib => src/lib}/io/IStreamFilterFactory.h | 0 {lib => src/lib}/io/XIO.cpp | 0 {lib => src/lib}/io/XIO.h | 0 {lib => src/lib}/mt/CCondVar.cpp | 0 {lib => src/lib}/mt/CCondVar.h | 0 {lib => src/lib}/mt/CLock.cpp | 0 {lib => src/lib}/mt/CLock.h | 0 src/lib/mt/CMakeLists.txt | 45 + {lib => src/lib}/mt/CMutex.cpp | 0 {lib => src/lib}/mt/CMutex.h | 0 {lib => src/lib}/mt/CThread.cpp | 0 {lib => src/lib}/mt/CThread.h | 0 {lib => src/lib}/mt/XMT.cpp | 0 {lib => src/lib}/mt/XMT.h | 0 {lib => src/lib}/mt/XThread.h | 0 src/lib/net/CMakeLists.txt | 57 + {lib => src/lib}/net/CNetworkAddress.cpp | 0 {lib => src/lib}/net/CNetworkAddress.h | 0 {lib => src/lib}/net/CSocketMultiplexer.cpp | 0 {lib => src/lib}/net/CSocketMultiplexer.h | 0 {lib => src/lib}/net/CTCPListenSocket.cpp | 0 {lib => src/lib}/net/CTCPListenSocket.h | 0 {lib => src/lib}/net/CTCPSocket.cpp | 0 {lib => src/lib}/net/CTCPSocket.h | 0 {lib => src/lib}/net/CTCPSocketFactory.cpp | 0 {lib => src/lib}/net/CTCPSocketFactory.h | 0 {lib => src/lib}/net/IDataSocket.cpp | 0 {lib => src/lib}/net/IDataSocket.h | 0 {lib => src/lib}/net/IListenSocket.cpp | 0 {lib => src/lib}/net/IListenSocket.h | 0 {lib => src/lib}/net/ISocket.cpp | 0 {lib => src/lib}/net/ISocket.h | 0 {lib => src/lib}/net/ISocketFactory.h | 0 {lib => src/lib}/net/ISocketMultiplexerJob.h | 0 .../lib}/net/TSocketMultiplexerMethodJob.h | 0 {lib => src/lib}/net/XSocket.cpp | 0 {lib => src/lib}/net/XSocket.h | 0 .../lib}/platform/CMSWindowsClipboard.cpp | 0 .../lib}/platform/CMSWindowsClipboard.h | 0 .../CMSWindowsClipboardAnyTextConverter.cpp | 0 .../CMSWindowsClipboardAnyTextConverter.h | 0 .../CMSWindowsClipboardBitmapConverter.cpp | 0 .../CMSWindowsClipboardBitmapConverter.h | 0 .../CMSWindowsClipboardHTMLConverter.cpp | 0 .../CMSWindowsClipboardHTMLConverter.h | 0 .../CMSWindowsClipboardTextConverter.cpp | 0 .../CMSWindowsClipboardTextConverter.h | 0 .../CMSWindowsClipboardUTF16Converter.cpp | 0 .../CMSWindowsClipboardUTF16Converter.h | 0 {lib => src/lib}/platform/CMSWindowsDesks.cpp | 0 {lib => src/lib}/platform/CMSWindowsDesks.h | 0 .../platform/CMSWindowsEventQueueBuffer.cpp | 0 .../platform/CMSWindowsEventQueueBuffer.h | 0 .../lib}/platform/CMSWindowsKeyState.cpp | 0 .../lib}/platform/CMSWindowsKeyState.h | 0 .../lib}/platform/CMSWindowsRelauncher.cpp | 0 .../lib}/platform/CMSWindowsRelauncher.h | 0 .../lib}/platform/CMSWindowsScreen.cpp | 0 {lib => src/lib}/platform/CMSWindowsScreen.h | 0 .../lib}/platform/CMSWindowsScreenSaver.cpp | 0 .../lib}/platform/CMSWindowsScreenSaver.h | 0 {lib => src/lib}/platform/CMSWindowsUtil.cpp | 0 {lib => src/lib}/platform/CMSWindowsUtil.h | 0 src/lib/platform/CMakeLists.txt | 105 + {lib => src/lib}/platform/COSXClipboard.cpp | 0 {lib => src/lib}/platform/COSXClipboard.h | 0 .../COSXClipboardAnyTextConverter.cpp | 0 .../platform/COSXClipboardAnyTextConverter.h | 0 .../platform/COSXClipboardTextConverter.cpp | 0 .../platform/COSXClipboardTextConverter.h | 0 .../platform/COSXClipboardUTF16Converter.cpp | 0 .../platform/COSXClipboardUTF16Converter.h | 0 .../lib}/platform/COSXEventQueueBuffer.cpp | 0 .../lib}/platform/COSXEventQueueBuffer.h | 0 {lib => src/lib}/platform/COSXKeyState.cpp | 0 {lib => src/lib}/platform/COSXKeyState.h | 0 {lib => src/lib}/platform/COSXScreen.cpp | 0 {lib => src/lib}/platform/COSXScreen.h | 0 {lib => src/lib}/platform/COSXScreenSaver.cpp | 0 {lib => src/lib}/platform/COSXScreenSaver.h | 0 .../lib}/platform/COSXScreenSaverUtil.h | 0 .../lib}/platform/COSXScreenSaverUtil.m | 0 {lib => src/lib}/platform/CSynergyHook.cpp | 0 {lib => src/lib}/platform/CSynergyHook.h | 0 .../lib}/platform/CXWindowsClipboard.cpp | 0 .../lib}/platform/CXWindowsClipboard.h | 0 .../CXWindowsClipboardAnyBitmapConverter.cpp | 0 .../CXWindowsClipboardAnyBitmapConverter.h | 0 .../CXWindowsClipboardBMPConverter.cpp | 0 .../platform/CXWindowsClipboardBMPConverter.h | 0 .../CXWindowsClipboardHTMLConverter.cpp | 0 .../CXWindowsClipboardHTMLConverter.h | 0 .../CXWindowsClipboardTextConverter.cpp | 0 .../CXWindowsClipboardTextConverter.h | 0 .../CXWindowsClipboardUCS2Converter.cpp | 0 .../CXWindowsClipboardUCS2Converter.h | 0 .../CXWindowsClipboardUTF8Converter.cpp | 0 .../CXWindowsClipboardUTF8Converter.h | 0 .../platform/CXWindowsEventQueueBuffer.cpp | 0 .../lib}/platform/CXWindowsEventQueueBuffer.h | 0 .../lib}/platform/CXWindowsKeyState.cpp | 0 {lib => src/lib}/platform/CXWindowsKeyState.h | 0 {lib => src/lib}/platform/CXWindowsScreen.cpp | 0 {lib => src/lib}/platform/CXWindowsScreen.h | 0 .../lib}/platform/CXWindowsScreenSaver.cpp | 0 .../lib}/platform/CXWindowsScreenSaver.h | 0 {lib => src/lib}/platform/CXWindowsUtil.cpp | 0 {lib => src/lib}/platform/CXWindowsUtil.h | 0 .../lib}/platform/OSXScreenSaverControl.h | 0 {lib => src/lib}/server/CBaseClientProxy.cpp | 0 {lib => src/lib}/server/CBaseClientProxy.h | 0 {lib => src/lib}/server/CClientListener.cpp | 0 {lib => src/lib}/server/CClientListener.h | 0 {lib => src/lib}/server/CClientProxy.cpp | 0 {lib => src/lib}/server/CClientProxy.h | 0 {lib => src/lib}/server/CClientProxy1_0.cpp | 0 {lib => src/lib}/server/CClientProxy1_0.h | 0 {lib => src/lib}/server/CClientProxy1_1.cpp | 0 {lib => src/lib}/server/CClientProxy1_1.h | 0 {lib => src/lib}/server/CClientProxy1_2.cpp | 0 {lib => src/lib}/server/CClientProxy1_2.h | 0 {lib => src/lib}/server/CClientProxy1_3.cpp | 0 {lib => src/lib}/server/CClientProxy1_3.h | 0 .../lib}/server/CClientProxyUnknown.cpp | 0 {lib => src/lib}/server/CClientProxyUnknown.h | 0 {lib => src/lib}/server/CConfig.cpp | 0 {lib => src/lib}/server/CConfig.h | 0 {lib => src/lib}/server/CInputFilter.cpp | 0 {lib => src/lib}/server/CInputFilter.h | 0 src/lib/server/CMakeLists.txt | 61 + {lib => src/lib}/server/CPrimaryClient.cpp | 0 {lib => src/lib}/server/CPrimaryClient.h | 0 {lib => src/lib}/server/CServer.cpp | 0 {lib => src/lib}/server/CServer.h | 0 {lib => src/lib}/synergy/CApp.cpp | 0 {lib => src/lib}/synergy/CApp.h | 0 {lib => src/lib}/synergy/CClientApp.cpp | 0 {lib => src/lib}/synergy/CClientApp.h | 0 .../lib}/synergy/CClientTaskBarReceiver.cpp | 0 .../lib}/synergy/CClientTaskBarReceiver.h | 0 {lib => src/lib}/synergy/CClipboard.cpp | 0 {lib => src/lib}/synergy/CClipboard.h | 0 {lib => src/lib}/synergy/CKeyMap.cpp | 0 {lib => src/lib}/synergy/CKeyMap.h | 0 {lib => src/lib}/synergy/CKeyState.cpp | 0 {lib => src/lib}/synergy/CKeyState.h | 0 src/lib/synergy/CMakeLists.txt | 87 + .../lib}/synergy/CPacketStreamFilter.cpp | 0 .../lib}/synergy/CPacketStreamFilter.h | 0 {lib => src/lib}/synergy/CPlatformScreen.cpp | 0 {lib => src/lib}/synergy/CPlatformScreen.h | 0 {lib => src/lib}/synergy/CProtocolUtil.cpp | 0 {lib => src/lib}/synergy/CProtocolUtil.h | 0 {lib => src/lib}/synergy/CScreen.cpp | 0 {lib => src/lib}/synergy/CScreen.h | 0 {lib => src/lib}/synergy/CServerApp.cpp | 0 {lib => src/lib}/synergy/CServerApp.h | 0 .../lib}/synergy/CServerTaskBarReceiver.cpp | 0 .../lib}/synergy/CServerTaskBarReceiver.h | 0 {lib => src/lib}/synergy/ClipboardTypes.h | 0 {lib => src/lib}/synergy/IClient.h | 0 {lib => src/lib}/synergy/IClipboard.cpp | 0 {lib => src/lib}/synergy/IClipboard.h | 0 {lib => src/lib}/synergy/IKeyState.cpp | 0 {lib => src/lib}/synergy/IKeyState.h | 0 {lib => src/lib}/synergy/INode.h | 0 {lib => src/lib}/synergy/IPlatformScreen.h | 0 {lib => src/lib}/synergy/IPrimaryScreen.cpp | 0 {lib => src/lib}/synergy/IPrimaryScreen.h | 0 {lib => src/lib}/synergy/IScreen.cpp | 0 {lib => src/lib}/synergy/IScreen.h | 0 {lib => src/lib}/synergy/IScreenSaver.h | 0 {lib => src/lib}/synergy/ISecondaryScreen.h | 0 {lib => src/lib}/synergy/KeyTypes.cpp | 0 {lib => src/lib}/synergy/KeyTypes.h | 0 {lib => src/lib}/synergy/MouseTypes.h | 0 {lib => src/lib}/synergy/OptionTypes.h | 0 {lib => src/lib}/synergy/ProtocolTypes.cpp | 0 {lib => src/lib}/synergy/ProtocolTypes.h | 0 {lib => src/lib}/synergy/XScreen.cpp | 0 {lib => src/lib}/synergy/XScreen.h | 0 {lib => src/lib}/synergy/XSynergy.cpp | 0 {lib => src/lib}/synergy/XSynergy.h | 0 src/unittests/CMakeLists.txt | 38 + .../synergy/CClipboardTests.cpp | 0 471 files changed, 1152 insertions(+), 8011 deletions(-) delete mode 100644 cmake/CMakeLists_config.txt delete mode 100644 cmake/CMakeLists_cpack.txt delete mode 100644 cmake/CMakeLists_launcher.txt delete mode 100644 cmake/CMakeLists_lib.txt delete mode 100644 cmake/CMakeLists_synergyc.txt delete mode 100644 cmake/CMakeLists_synergys.txt delete mode 100644 cmd/launcher/CAddScreen.cpp delete mode 100644 cmd/launcher/CAddScreen.h delete mode 100644 cmd/launcher/CAdvancedOptions.cpp delete mode 100644 cmd/launcher/CAdvancedOptions.h delete mode 100644 cmd/launcher/CAutoStart.cpp delete mode 100644 cmd/launcher/CAutoStart.h delete mode 100644 cmd/launcher/CGlobalOptions.cpp delete mode 100644 cmd/launcher/CGlobalOptions.h delete mode 100644 cmd/launcher/CHotkeyOptions.cpp delete mode 100644 cmd/launcher/CHotkeyOptions.h delete mode 100644 cmd/launcher/CInfo.cpp delete mode 100644 cmd/launcher/CInfo.h delete mode 100644 cmd/launcher/CScreensLinks.cpp delete mode 100644 cmd/launcher/CScreensLinks.h delete mode 100644 cmd/launcher/LaunchUtil.cpp delete mode 100644 cmd/launcher/LaunchUtil.h delete mode 100644 cmd/launcher/launcher.cpp delete mode 100644 cmd/launcher/launcher.rc delete mode 100644 cmd/launcher/resource.h delete mode 100644 cmd/launcher/synergy.ico rename {cmake => res}/Installer.nsi.in (100%) rename {cmake => res}/License.rtf (100%) rename {cmake => res}/License.tex (100%) rename {cmake => res}/Readme.txt (100%) rename {cmake => res}/config.h.in (100%) rename {cmake => res}/doxygen.cfg.in (100%) rename {cmake => res}/synergy.desktop (100%) create mode 100644 src/CMakeLists.txt rename cmake/CMakeLists_gtest.txt => src/cmd/CMakeLists.txt (78%) rename {cmd => src/cmd}/synergyc/.gitignore (100%) rename {cmd => src/cmd}/synergyc/CMSWindowsClientTaskBarReceiver.cpp (100%) rename {cmd => src/cmd}/synergyc/CMSWindowsClientTaskBarReceiver.h (100%) create mode 100644 src/cmd/synergyc/CMakeLists.txt rename {cmd => src/cmd}/synergyc/COSXClientTaskBarReceiver.cpp (100%) rename {cmd => src/cmd}/synergyc/COSXClientTaskBarReceiver.h (100%) rename {cmd => src/cmd}/synergyc/CXWindowsClientTaskBarReceiver.cpp (100%) rename {cmd => src/cmd}/synergyc/CXWindowsClientTaskBarReceiver.h (100%) rename {cmd => src/cmd}/synergyc/resource.h (100%) rename {cmd => src/cmd}/synergyc/synergyc.cpp (100%) rename {cmd => src/cmd}/synergyc/synergyc.ico (100%) rename {cmd => src/cmd}/synergyc/synergyc.rc (100%) rename {cmd => src/cmd}/synergyc/tb_error.ico (100%) rename {cmd => src/cmd}/synergyc/tb_idle.ico (100%) rename {cmd => src/cmd}/synergyc/tb_run.ico (100%) rename {cmd => src/cmd}/synergyc/tb_wait.ico (100%) rename {cmd => src/cmd}/synergys/.gitignore (100%) rename {cmd => src/cmd}/synergys/CMSWindowsServerTaskBarReceiver.cpp (100%) rename {cmd => src/cmd}/synergys/CMSWindowsServerTaskBarReceiver.h (100%) create mode 100644 src/cmd/synergys/CMakeLists.txt rename {cmd => src/cmd}/synergys/COSXServerTaskBarReceiver.cpp (100%) rename {cmd => src/cmd}/synergys/COSXServerTaskBarReceiver.h (100%) rename {cmd => src/cmd}/synergys/CXWindowsServerTaskBarReceiver.cpp (100%) rename {cmd => src/cmd}/synergys/CXWindowsServerTaskBarReceiver.h (100%) rename {cmd => src/cmd}/synergys/resource.h (100%) rename {cmd => src/cmd}/synergys/synergys.cpp (100%) rename {cmd => src/cmd}/synergys/synergys.ico (100%) rename {cmd => src/cmd}/synergys/synergys.rc (100%) rename {cmd => src/cmd}/synergys/tb_error.ico (100%) rename {cmd => src/cmd}/synergys/tb_idle.ico (100%) rename {cmd => src/cmd}/synergys/tb_run.ico (100%) rename {cmd => src/cmd}/synergys/tb_wait.ico (100%) rename {gui => src/gui}/COPYING (100%) rename {gui => src/gui}/INSTALL (100%) rename {gui => src/gui}/README (100%) rename {gui => src/gui}/qsynergy.pro (100%) rename {gui => src/gui}/res/AboutDialogBase.ui (100%) rename {gui => src/gui}/res/ActionDialogBase.ui (100%) rename {gui => src/gui}/res/HotkeyDialogBase.ui (100%) rename {gui => src/gui}/res/LogDialogBase.ui (100%) rename {gui => src/gui}/res/MainWindowBase.ui (100%) rename {gui => src/gui}/res/QSynergy.qrc (100%) rename {gui => src/gui}/res/ScreenSettingsDialogBase.ui (100%) rename {gui => src/gui}/res/ServerConfigDialogBase.ui (100%) rename {gui => src/gui}/res/SettingsDialogBase.ui (100%) rename {gui => src/gui}/res/WindowsServicesBase.ui (100%) rename {gui => src/gui}/res/icons/16x16/synergy-connected.png (100%) rename {gui => src/gui}/res/icons/16x16/synergy-disconnected.png (100%) rename {gui => src/gui}/res/icons/64x64/user-trash.png (100%) rename {gui => src/gui}/res/icons/64x64/video-display.png (100%) rename {gui => src/gui}/res/mac/QSynergy.icns (100%) rename {gui => src/gui}/res/mac/QSynergy.plist (100%) rename {gui => src/gui}/res/win/QSynergy.ico (100%) rename {gui => src/gui}/res/win/QSynergy.rc (100%) rename {gui => src/gui}/src/AboutDialog.cpp (100%) rename {gui => src/gui}/src/AboutDialog.h (100%) rename {gui => src/gui}/src/Action.cpp (100%) rename {gui => src/gui}/src/Action.h (100%) rename {gui => src/gui}/src/ActionDialog.cpp (100%) rename {gui => src/gui}/src/ActionDialog.h (100%) rename {gui => src/gui}/src/AppConfig.cpp (100%) rename {gui => src/gui}/src/AppConfig.h (100%) rename {gui => src/gui}/src/BaseConfig.cpp (100%) rename {gui => src/gui}/src/BaseConfig.h (100%) rename {gui => src/gui}/src/Hotkey.cpp (100%) rename {gui => src/gui}/src/Hotkey.h (100%) rename {gui => src/gui}/src/HotkeyDialog.cpp (100%) rename {gui => src/gui}/src/HotkeyDialog.h (100%) rename {gui => src/gui}/src/KeySequence.cpp (100%) rename {gui => src/gui}/src/KeySequence.h (100%) rename {gui => src/gui}/src/KeySequenceWidget.cpp (100%) rename {gui => src/gui}/src/KeySequenceWidget.h (100%) rename {gui => src/gui}/src/LogDialog.cpp (100%) rename {gui => src/gui}/src/LogDialog.h (100%) rename {gui => src/gui}/src/MainWindow.cpp (100%) rename {gui => src/gui}/src/MainWindow.h (100%) rename {gui => src/gui}/src/NewScreenWidget.cpp (100%) rename {gui => src/gui}/src/NewScreenWidget.h (100%) rename {gui => src/gui}/src/QSynergyApplication.cpp (100%) rename {gui => src/gui}/src/QSynergyApplication.h (100%) rename {gui => src/gui}/src/Screen.cpp (100%) rename {gui => src/gui}/src/Screen.h (100%) rename {gui => src/gui}/src/ScreenSettingsDialog.cpp (100%) rename {gui => src/gui}/src/ScreenSettingsDialog.h (100%) rename {gui => src/gui}/src/ScreenSetupModel.cpp (100%) rename {gui => src/gui}/src/ScreenSetupModel.h (100%) rename {gui => src/gui}/src/ScreenSetupView.cpp (100%) rename {gui => src/gui}/src/ScreenSetupView.h (100%) rename {gui => src/gui}/src/ServerConfig.cpp (100%) rename {gui => src/gui}/src/ServerConfig.h (100%) rename {gui => src/gui}/src/ServerConfigDialog.cpp (100%) rename {gui => src/gui}/src/ServerConfigDialog.h (100%) rename {gui => src/gui}/src/SettingsDialog.cpp (100%) rename {gui => src/gui}/src/SettingsDialog.h (100%) rename {gui => src/gui}/src/TrashScreenWidget.cpp (100%) rename {gui => src/gui}/src/TrashScreenWidget.h (100%) rename {gui => src/gui}/src/WindowsServices.cpp (100%) rename {gui => src/gui}/src/WindowsServices.h (100%) rename {gui => src/gui}/src/main.cpp (100%) rename cmake/CMakeLists_test.txt => src/integtests/CMakeLists.txt (50%) rename src/{integtest => integtests}/Main.cpp (100%) rename src/{integtest => integtests}/platform/CMSWindowsClipboardTests.cpp (100%) rename src/{integtest => integtests}/platform/COSXClipboardTests.cpp (100%) rename src/{integtest => integtests}/platform/CXWindowsClipboardTests.cpp (100%) create mode 100644 src/lib/CMakeLists.txt rename {lib => src/lib}/arch/CArch.cpp (100%) rename {lib => src/lib}/arch/CArch.h (100%) rename {lib => src/lib}/arch/CArchAppUtil.cpp (100%) rename {lib => src/lib}/arch/CArchAppUtil.h (100%) rename {lib => src/lib}/arch/CArchAppUtilUnix.cpp (100%) rename {lib => src/lib}/arch/CArchAppUtilUnix.h (100%) rename {lib => src/lib}/arch/CArchAppUtilWindows.cpp (100%) rename {lib => src/lib}/arch/CArchAppUtilWindows.h (100%) rename {lib => src/lib}/arch/CArchConsoleStd.cpp (100%) rename {lib => src/lib}/arch/CArchConsoleStd.h (100%) rename {lib => src/lib}/arch/CArchConsoleUnix.cpp (100%) rename {lib => src/lib}/arch/CArchConsoleUnix.h (100%) rename {lib => src/lib}/arch/CArchConsoleWindows.cpp (100%) rename {lib => src/lib}/arch/CArchConsoleWindows.h (100%) rename {lib => src/lib}/arch/CArchDaemonNone.cpp (100%) rename {lib => src/lib}/arch/CArchDaemonNone.h (100%) rename {lib => src/lib}/arch/CArchDaemonUnix.cpp (100%) rename {lib => src/lib}/arch/CArchDaemonUnix.h (100%) rename {lib => src/lib}/arch/CArchDaemonWindows.cpp (100%) rename {lib => src/lib}/arch/CArchDaemonWindows.h (100%) rename {lib => src/lib}/arch/CArchFileUnix.cpp (100%) rename {lib => src/lib}/arch/CArchFileUnix.h (100%) rename {lib => src/lib}/arch/CArchFileWindows.cpp (100%) rename {lib => src/lib}/arch/CArchFileWindows.h (100%) rename {lib => src/lib}/arch/CArchLogUnix.cpp (100%) rename {lib => src/lib}/arch/CArchLogUnix.h (100%) rename {lib => src/lib}/arch/CArchLogWindows.cpp (100%) rename {lib => src/lib}/arch/CArchLogWindows.h (100%) rename {lib => src/lib}/arch/CArchMiscWindows.cpp (100%) rename {lib => src/lib}/arch/CArchMiscWindows.h (100%) rename {lib => src/lib}/arch/CArchMultithreadPosix.cpp (100%) rename {lib => src/lib}/arch/CArchMultithreadPosix.h (100%) rename {lib => src/lib}/arch/CArchMultithreadWindows.cpp (100%) rename {lib => src/lib}/arch/CArchMultithreadWindows.h (100%) rename {lib => src/lib}/arch/CArchNetworkBSD.cpp (100%) rename {lib => src/lib}/arch/CArchNetworkBSD.h (100%) rename {lib => src/lib}/arch/CArchNetworkWinsock.cpp (100%) rename {lib => src/lib}/arch/CArchNetworkWinsock.h (100%) rename {lib => src/lib}/arch/CArchSleepUnix.cpp (100%) rename {lib => src/lib}/arch/CArchSleepUnix.h (100%) rename {lib => src/lib}/arch/CArchSleepWindows.cpp (100%) rename {lib => src/lib}/arch/CArchSleepWindows.h (100%) rename {lib => src/lib}/arch/CArchStringUnix.cpp (100%) rename {lib => src/lib}/arch/CArchStringUnix.h (100%) rename {lib => src/lib}/arch/CArchStringWindows.cpp (100%) rename {lib => src/lib}/arch/CArchStringWindows.h (100%) rename {lib => src/lib}/arch/CArchSystemUnix.cpp (100%) rename {lib => src/lib}/arch/CArchSystemUnix.h (100%) rename {lib => src/lib}/arch/CArchSystemWindows.cpp (100%) rename {lib => src/lib}/arch/CArchSystemWindows.h (100%) rename {lib => src/lib}/arch/CArchTaskBarWindows.cpp (100%) rename {lib => src/lib}/arch/CArchTaskBarWindows.h (100%) rename {lib => src/lib}/arch/CArchTaskBarXWindows.cpp (100%) rename {lib => src/lib}/arch/CArchTaskBarXWindows.h (100%) rename {lib => src/lib}/arch/CArchTimeUnix.cpp (100%) rename {lib => src/lib}/arch/CArchTimeUnix.h (100%) rename {lib => src/lib}/arch/CArchTimeWindows.cpp (100%) rename {lib => src/lib}/arch/CArchTimeWindows.h (100%) create mode 100644 src/lib/arch/CMakeLists.txt rename {lib => src/lib}/arch/CMultibyte.cpp (100%) rename {lib => src/lib}/arch/IArchAppUtil.h (100%) rename {lib => src/lib}/arch/IArchConsole.h (100%) rename {lib => src/lib}/arch/IArchDaemon.h (100%) rename {lib => src/lib}/arch/IArchFile.h (100%) rename {lib => src/lib}/arch/IArchLog.h (100%) rename {lib => src/lib}/arch/IArchMultithread.h (100%) rename {lib => src/lib}/arch/IArchNetwork.h (100%) rename {lib => src/lib}/arch/IArchSleep.h (100%) rename {lib => src/lib}/arch/IArchString.h (100%) rename {lib => src/lib}/arch/IArchSystem.h (100%) rename {lib => src/lib}/arch/IArchTaskBar.h (100%) rename {lib => src/lib}/arch/IArchTaskBarReceiver.h (100%) rename {lib => src/lib}/arch/IArchTime.h (100%) rename {lib => src/lib}/arch/XArch.cpp (100%) rename {lib => src/lib}/arch/XArch.h (100%) rename {lib => src/lib}/arch/XArchUnix.cpp (100%) rename {lib => src/lib}/arch/XArchUnix.h (100%) rename {lib => src/lib}/arch/XArchWindows.cpp (100%) rename {lib => src/lib}/arch/XArchWindows.h (100%) rename {lib => src/lib}/arch/vsnprintf.cpp (100%) rename {lib => src/lib}/base/CEvent.cpp (100%) rename {lib => src/lib}/base/CEvent.h (100%) rename {lib => src/lib}/base/CEventQueue.cpp (100%) rename {lib => src/lib}/base/CEventQueue.h (100%) rename {lib => src/lib}/base/CFunctionEventJob.cpp (100%) rename {lib => src/lib}/base/CFunctionEventJob.h (100%) rename {lib => src/lib}/base/CFunctionJob.cpp (100%) rename {lib => src/lib}/base/CFunctionJob.h (100%) rename {lib => src/lib}/base/CLog.cpp (100%) rename {lib => src/lib}/base/CLog.h (100%) create mode 100644 src/lib/base/CMakeLists.txt rename {lib => src/lib}/base/CPriorityQueue.h (100%) rename {lib => src/lib}/base/CSimpleEventQueueBuffer.cpp (100%) rename {lib => src/lib}/base/CSimpleEventQueueBuffer.h (100%) rename {lib => src/lib}/base/CStopwatch.cpp (100%) rename {lib => src/lib}/base/CStopwatch.h (100%) rename {lib => src/lib}/base/CString.h (100%) rename {lib => src/lib}/base/CStringUtil.cpp (100%) rename {lib => src/lib}/base/CStringUtil.h (100%) rename {lib => src/lib}/base/CUnicode.cpp (100%) rename {lib => src/lib}/base/CUnicode.h (100%) rename {lib => src/lib}/base/IEventJob.h (100%) rename {lib => src/lib}/base/IEventQueue.cpp (100%) rename {lib => src/lib}/base/IEventQueue.h (100%) rename {lib => src/lib}/base/IEventQueueBuffer.h (100%) rename {lib => src/lib}/base/IJob.h (100%) rename {lib => src/lib}/base/ILogOutputter.h (100%) rename {lib => src/lib}/base/LogOutputters.cpp (100%) rename {lib => src/lib}/base/LogOutputters.h (100%) rename {lib => src/lib}/base/TMethodEventJob.h (100%) rename {lib => src/lib}/base/TMethodJob.h (100%) rename {lib => src/lib}/base/XBase.cpp (100%) rename {lib => src/lib}/base/XBase.h (100%) rename {lib => src/lib}/client/CClient.cpp (100%) rename {lib => src/lib}/client/CClient.h (100%) create mode 100644 src/lib/client/CMakeLists.txt rename {lib => src/lib}/client/CServerProxy.cpp (100%) rename {lib => src/lib}/client/CServerProxy.h (100%) rename {lib => src/lib}/common/BasicTypes.h (100%) rename cmake/CMakeLists_doxygen.txt => src/lib/common/CMakeLists.txt (80%) rename {lib => src/lib}/common/IInterface.h (100%) rename {lib => src/lib}/common/MacOSXPrecomp.h (100%) rename {lib => src/lib}/common/Version.cpp (100%) rename {lib => src/lib}/common/Version.h (100%) rename {lib => src/lib}/common/common.h (100%) rename {lib => src/lib}/common/stdbitset.h (100%) rename {lib => src/lib}/common/stddeque.h (100%) rename {lib => src/lib}/common/stdfstream.h (100%) rename {lib => src/lib}/common/stdistream.h (100%) rename {lib => src/lib}/common/stdlist.h (100%) rename {lib => src/lib}/common/stdmap.h (100%) rename {lib => src/lib}/common/stdostream.h (100%) rename {lib => src/lib}/common/stdpost.h (100%) rename {lib => src/lib}/common/stdpre.h (100%) rename {lib => src/lib}/common/stdset.h (100%) rename {lib => src/lib}/common/stdsstream.h (100%) rename {lib => src/lib}/common/stdstring.h (100%) rename {lib => src/lib}/common/stdvector.h (100%) create mode 100644 src/lib/io/CMakeLists.txt rename {lib => src/lib}/io/CStreamBuffer.cpp (100%) rename {lib => src/lib}/io/CStreamBuffer.h (100%) rename {lib => src/lib}/io/CStreamFilter.cpp (100%) rename {lib => src/lib}/io/CStreamFilter.h (100%) rename {lib => src/lib}/io/IStream.cpp (100%) rename {lib => src/lib}/io/IStream.h (100%) rename {lib => src/lib}/io/IStreamFilterFactory.h (100%) rename {lib => src/lib}/io/XIO.cpp (100%) rename {lib => src/lib}/io/XIO.h (100%) rename {lib => src/lib}/mt/CCondVar.cpp (100%) rename {lib => src/lib}/mt/CCondVar.h (100%) rename {lib => src/lib}/mt/CLock.cpp (100%) rename {lib => src/lib}/mt/CLock.h (100%) create mode 100644 src/lib/mt/CMakeLists.txt rename {lib => src/lib}/mt/CMutex.cpp (100%) rename {lib => src/lib}/mt/CMutex.h (100%) rename {lib => src/lib}/mt/CThread.cpp (100%) rename {lib => src/lib}/mt/CThread.h (100%) rename {lib => src/lib}/mt/XMT.cpp (100%) rename {lib => src/lib}/mt/XMT.h (100%) rename {lib => src/lib}/mt/XThread.h (100%) create mode 100644 src/lib/net/CMakeLists.txt rename {lib => src/lib}/net/CNetworkAddress.cpp (100%) rename {lib => src/lib}/net/CNetworkAddress.h (100%) rename {lib => src/lib}/net/CSocketMultiplexer.cpp (100%) rename {lib => src/lib}/net/CSocketMultiplexer.h (100%) rename {lib => src/lib}/net/CTCPListenSocket.cpp (100%) rename {lib => src/lib}/net/CTCPListenSocket.h (100%) rename {lib => src/lib}/net/CTCPSocket.cpp (100%) rename {lib => src/lib}/net/CTCPSocket.h (100%) rename {lib => src/lib}/net/CTCPSocketFactory.cpp (100%) rename {lib => src/lib}/net/CTCPSocketFactory.h (100%) rename {lib => src/lib}/net/IDataSocket.cpp (100%) rename {lib => src/lib}/net/IDataSocket.h (100%) rename {lib => src/lib}/net/IListenSocket.cpp (100%) rename {lib => src/lib}/net/IListenSocket.h (100%) rename {lib => src/lib}/net/ISocket.cpp (100%) rename {lib => src/lib}/net/ISocket.h (100%) rename {lib => src/lib}/net/ISocketFactory.h (100%) rename {lib => src/lib}/net/ISocketMultiplexerJob.h (100%) rename {lib => src/lib}/net/TSocketMultiplexerMethodJob.h (100%) rename {lib => src/lib}/net/XSocket.cpp (100%) rename {lib => src/lib}/net/XSocket.h (100%) rename {lib => src/lib}/platform/CMSWindowsClipboard.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsClipboard.h (100%) rename {lib => src/lib}/platform/CMSWindowsClipboardAnyTextConverter.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsClipboardAnyTextConverter.h (100%) rename {lib => src/lib}/platform/CMSWindowsClipboardBitmapConverter.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsClipboardBitmapConverter.h (100%) rename {lib => src/lib}/platform/CMSWindowsClipboardHTMLConverter.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsClipboardHTMLConverter.h (100%) rename {lib => src/lib}/platform/CMSWindowsClipboardTextConverter.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsClipboardTextConverter.h (100%) rename {lib => src/lib}/platform/CMSWindowsClipboardUTF16Converter.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsClipboardUTF16Converter.h (100%) rename {lib => src/lib}/platform/CMSWindowsDesks.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsDesks.h (100%) rename {lib => src/lib}/platform/CMSWindowsEventQueueBuffer.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsEventQueueBuffer.h (100%) rename {lib => src/lib}/platform/CMSWindowsKeyState.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsKeyState.h (100%) rename {lib => src/lib}/platform/CMSWindowsRelauncher.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsRelauncher.h (100%) rename {lib => src/lib}/platform/CMSWindowsScreen.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsScreen.h (100%) rename {lib => src/lib}/platform/CMSWindowsScreenSaver.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsScreenSaver.h (100%) rename {lib => src/lib}/platform/CMSWindowsUtil.cpp (100%) rename {lib => src/lib}/platform/CMSWindowsUtil.h (100%) create mode 100644 src/lib/platform/CMakeLists.txt rename {lib => src/lib}/platform/COSXClipboard.cpp (100%) rename {lib => src/lib}/platform/COSXClipboard.h (100%) rename {lib => src/lib}/platform/COSXClipboardAnyTextConverter.cpp (100%) rename {lib => src/lib}/platform/COSXClipboardAnyTextConverter.h (100%) rename {lib => src/lib}/platform/COSXClipboardTextConverter.cpp (100%) rename {lib => src/lib}/platform/COSXClipboardTextConverter.h (100%) rename {lib => src/lib}/platform/COSXClipboardUTF16Converter.cpp (100%) rename {lib => src/lib}/platform/COSXClipboardUTF16Converter.h (100%) rename {lib => src/lib}/platform/COSXEventQueueBuffer.cpp (100%) rename {lib => src/lib}/platform/COSXEventQueueBuffer.h (100%) rename {lib => src/lib}/platform/COSXKeyState.cpp (100%) rename {lib => src/lib}/platform/COSXKeyState.h (100%) rename {lib => src/lib}/platform/COSXScreen.cpp (100%) rename {lib => src/lib}/platform/COSXScreen.h (100%) rename {lib => src/lib}/platform/COSXScreenSaver.cpp (100%) rename {lib => src/lib}/platform/COSXScreenSaver.h (100%) rename {lib => src/lib}/platform/COSXScreenSaverUtil.h (100%) rename {lib => src/lib}/platform/COSXScreenSaverUtil.m (100%) rename {lib => src/lib}/platform/CSynergyHook.cpp (100%) rename {lib => src/lib}/platform/CSynergyHook.h (100%) rename {lib => src/lib}/platform/CXWindowsClipboard.cpp (100%) rename {lib => src/lib}/platform/CXWindowsClipboard.h (100%) rename {lib => src/lib}/platform/CXWindowsClipboardAnyBitmapConverter.cpp (100%) rename {lib => src/lib}/platform/CXWindowsClipboardAnyBitmapConverter.h (100%) rename {lib => src/lib}/platform/CXWindowsClipboardBMPConverter.cpp (100%) rename {lib => src/lib}/platform/CXWindowsClipboardBMPConverter.h (100%) rename {lib => src/lib}/platform/CXWindowsClipboardHTMLConverter.cpp (100%) rename {lib => src/lib}/platform/CXWindowsClipboardHTMLConverter.h (100%) rename {lib => src/lib}/platform/CXWindowsClipboardTextConverter.cpp (100%) rename {lib => src/lib}/platform/CXWindowsClipboardTextConverter.h (100%) rename {lib => src/lib}/platform/CXWindowsClipboardUCS2Converter.cpp (100%) rename {lib => src/lib}/platform/CXWindowsClipboardUCS2Converter.h (100%) rename {lib => src/lib}/platform/CXWindowsClipboardUTF8Converter.cpp (100%) rename {lib => src/lib}/platform/CXWindowsClipboardUTF8Converter.h (100%) rename {lib => src/lib}/platform/CXWindowsEventQueueBuffer.cpp (100%) rename {lib => src/lib}/platform/CXWindowsEventQueueBuffer.h (100%) rename {lib => src/lib}/platform/CXWindowsKeyState.cpp (100%) rename {lib => src/lib}/platform/CXWindowsKeyState.h (100%) rename {lib => src/lib}/platform/CXWindowsScreen.cpp (100%) rename {lib => src/lib}/platform/CXWindowsScreen.h (100%) rename {lib => src/lib}/platform/CXWindowsScreenSaver.cpp (100%) rename {lib => src/lib}/platform/CXWindowsScreenSaver.h (100%) rename {lib => src/lib}/platform/CXWindowsUtil.cpp (100%) rename {lib => src/lib}/platform/CXWindowsUtil.h (100%) rename {lib => src/lib}/platform/OSXScreenSaverControl.h (100%) rename {lib => src/lib}/server/CBaseClientProxy.cpp (100%) rename {lib => src/lib}/server/CBaseClientProxy.h (100%) rename {lib => src/lib}/server/CClientListener.cpp (100%) rename {lib => src/lib}/server/CClientListener.h (100%) rename {lib => src/lib}/server/CClientProxy.cpp (100%) rename {lib => src/lib}/server/CClientProxy.h (100%) rename {lib => src/lib}/server/CClientProxy1_0.cpp (100%) rename {lib => src/lib}/server/CClientProxy1_0.h (100%) rename {lib => src/lib}/server/CClientProxy1_1.cpp (100%) rename {lib => src/lib}/server/CClientProxy1_1.h (100%) rename {lib => src/lib}/server/CClientProxy1_2.cpp (100%) rename {lib => src/lib}/server/CClientProxy1_2.h (100%) rename {lib => src/lib}/server/CClientProxy1_3.cpp (100%) rename {lib => src/lib}/server/CClientProxy1_3.h (100%) rename {lib => src/lib}/server/CClientProxyUnknown.cpp (100%) rename {lib => src/lib}/server/CClientProxyUnknown.h (100%) rename {lib => src/lib}/server/CConfig.cpp (100%) rename {lib => src/lib}/server/CConfig.h (100%) rename {lib => src/lib}/server/CInputFilter.cpp (100%) rename {lib => src/lib}/server/CInputFilter.h (100%) create mode 100644 src/lib/server/CMakeLists.txt rename {lib => src/lib}/server/CPrimaryClient.cpp (100%) rename {lib => src/lib}/server/CPrimaryClient.h (100%) rename {lib => src/lib}/server/CServer.cpp (100%) rename {lib => src/lib}/server/CServer.h (100%) rename {lib => src/lib}/synergy/CApp.cpp (100%) rename {lib => src/lib}/synergy/CApp.h (100%) rename {lib => src/lib}/synergy/CClientApp.cpp (100%) rename {lib => src/lib}/synergy/CClientApp.h (100%) rename {lib => src/lib}/synergy/CClientTaskBarReceiver.cpp (100%) rename {lib => src/lib}/synergy/CClientTaskBarReceiver.h (100%) rename {lib => src/lib}/synergy/CClipboard.cpp (100%) rename {lib => src/lib}/synergy/CClipboard.h (100%) rename {lib => src/lib}/synergy/CKeyMap.cpp (100%) rename {lib => src/lib}/synergy/CKeyMap.h (100%) rename {lib => src/lib}/synergy/CKeyState.cpp (100%) rename {lib => src/lib}/synergy/CKeyState.h (100%) create mode 100644 src/lib/synergy/CMakeLists.txt rename {lib => src/lib}/synergy/CPacketStreamFilter.cpp (100%) rename {lib => src/lib}/synergy/CPacketStreamFilter.h (100%) rename {lib => src/lib}/synergy/CPlatformScreen.cpp (100%) rename {lib => src/lib}/synergy/CPlatformScreen.h (100%) rename {lib => src/lib}/synergy/CProtocolUtil.cpp (100%) rename {lib => src/lib}/synergy/CProtocolUtil.h (100%) rename {lib => src/lib}/synergy/CScreen.cpp (100%) rename {lib => src/lib}/synergy/CScreen.h (100%) rename {lib => src/lib}/synergy/CServerApp.cpp (100%) rename {lib => src/lib}/synergy/CServerApp.h (100%) rename {lib => src/lib}/synergy/CServerTaskBarReceiver.cpp (100%) rename {lib => src/lib}/synergy/CServerTaskBarReceiver.h (100%) rename {lib => src/lib}/synergy/ClipboardTypes.h (100%) rename {lib => src/lib}/synergy/IClient.h (100%) rename {lib => src/lib}/synergy/IClipboard.cpp (100%) rename {lib => src/lib}/synergy/IClipboard.h (100%) rename {lib => src/lib}/synergy/IKeyState.cpp (100%) rename {lib => src/lib}/synergy/IKeyState.h (100%) rename {lib => src/lib}/synergy/INode.h (100%) rename {lib => src/lib}/synergy/IPlatformScreen.h (100%) rename {lib => src/lib}/synergy/IPrimaryScreen.cpp (100%) rename {lib => src/lib}/synergy/IPrimaryScreen.h (100%) rename {lib => src/lib}/synergy/IScreen.cpp (100%) rename {lib => src/lib}/synergy/IScreen.h (100%) rename {lib => src/lib}/synergy/IScreenSaver.h (100%) rename {lib => src/lib}/synergy/ISecondaryScreen.h (100%) rename {lib => src/lib}/synergy/KeyTypes.cpp (100%) rename {lib => src/lib}/synergy/KeyTypes.h (100%) rename {lib => src/lib}/synergy/MouseTypes.h (100%) rename {lib => src/lib}/synergy/OptionTypes.h (100%) rename {lib => src/lib}/synergy/ProtocolTypes.cpp (100%) rename {lib => src/lib}/synergy/ProtocolTypes.h (100%) rename {lib => src/lib}/synergy/XScreen.cpp (100%) rename {lib => src/lib}/synergy/XScreen.h (100%) rename {lib => src/lib}/synergy/XSynergy.cpp (100%) rename {lib => src/lib}/synergy/XSynergy.h (100%) create mode 100644 src/unittests/CMakeLists.txt rename src/{unittest => unittests}/synergy/CClipboardTests.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b687f47..3a5a7058 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,13 +19,12 @@ set(VERSION_MINOR 5) set(VERSION_REV 0) set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}") - # The check for 2.6 may be too strict (consider lowering). cmake_minimum_required(VERSION 2.4.7) # CMake complains if we don't have this. if (COMMAND cmake_policy) - CMAKE_POLICY(SET CMP0003 NEW) + cmake_policy(SET CMP0003 NEW) endif() # We're escaping quotes in the Windows version number, because @@ -33,7 +32,7 @@ endif() # It seems that this restores the newer behaviour where define # args are not auto-escaped. if (COMMAND cmake_policy) - CMAKE_POLICY(SET CMP0005 NEW) + cmake_policy(SET CMP0005 NEW) endif() # First, declare project (important for prerequisite checks). @@ -46,26 +45,207 @@ set(bin_dir ${root_dir}/bin) set(doc_dir ${root_dir}/doc) set(doc_dir ${root_dir}/doc) -# Now for the stuff to generate config.h (and setup defines). -include(${cmake_dir}/CMakeLists_config.txt) +# Declare libs, so we can use list in linker later. There's probably +# a more elegant way of doing this; with SCons, when you check for the +# lib, it is automatically passed to the linker. +set(libs) -# Now for all the executables and libraries. -include(${cmake_dir}/CMakeLists_lib.txt) -include(${cmake_dir}/CMakeLists_synergyc.txt) -include(${cmake_dir}/CMakeLists_synergys.txt) -include(${cmake_dir}/CMakeLists_launcher.txt) -include(${cmake_dir}/CMakeLists_gtest.txt) -include(${cmake_dir}/CMakeLists_test.txt) +# Depending on the platform, pass in the required defines. +if (UNIX) + + # For config.h, detect the libraries, functions, etc. + include(CheckIncludeFiles) + include(CheckLibraryExists) + include(CheckFunctionExists) + include(CheckTypeSize) + include(CheckIncludeFileCXX) + include(CheckSymbolExists) + include(CheckCSourceCompiles) + + check_include_file_cxx(istream HAVE_ISTREAM) + check_include_file_cxx(ostream HAVE_OSTREAM) + check_include_file_cxx(sstream HAVE_SSTREAM) + + check_include_files(inttypes.h HAVE_INTTYPES_H) + check_include_files(locale.h HAVE_LOCALE_H) + check_include_files(memory.h HAVE_MEMORY_H) + check_include_files(stdlib.h HAVE_STDLIB_H) + check_include_files(strings.h HAVE_STRINGS_H) + check_include_files(string.h HAVE_STRING_H) + check_include_files(sys/select.h HAVE_SYS_SELECT_H) + check_include_files(sys/socket.h HAVE_SYS_SOCKET_H) + check_include_files(sys/stat.h HAVE_SYS_STAT_H) + check_include_files(sys/time.h HAVE_SYS_TIME_H) + check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H) + check_include_files(unistd.h HAVE_UNISTD_H) + check_include_files(wchar.h HAVE_WCHAR_H) + + check_function_exists(getpwuid_r HAVE_GETPWUID_R) + check_function_exists(gmtime_r HAVE_GMTIME_R) + check_function_exists(nanosleep HAVE_NANOSLEEP) + check_function_exists(poll HAVE_POLL) + check_function_exists(sigwait HAVE_POSIX_SIGWAIT) + check_function_exists(strftime HAVE_STRFTIME) + check_function_exists(vsnprintf HAVE_VSNPRINTF) + check_function_exists(inet_aton HAVE_INET_ATON) + + # For some reason, the check_function_exists macro doesn't detect + # the inet_aton on some pure Unix platforms (e.g. sunos5). So we + # need to do a more detailed check and also include some extra libs. + if (NOT HAVE_INET_ATON) + + set(CMAKE_REQUIRED_LIBRARIES nsl) + check_c_source_compiles( + "#include \n int main() { inet_aton(0, 0); }" + HAVE_INET_ATON_ADV) + set(CMAKE_REQUIRED_LIBRARIES) + + if (HAVE_INET_ATON_ADV) + + # Override the previous fail. + set(HAVE_INET_ATON 1) + + # Assume that both nsl and socket will be needed, + # it seems safe to add socket on the back of nsl, + # since socket only ever needed when nsl is needed. + list(APPEND libs nsl socket) + + endif() + + endif() + + check_type_size(char SIZEOF_CHAR) + check_type_size(int SIZEOF_INT) + check_type_size(long SIZEOF_LONG) + check_type_size(short SIZEOF_SHORT) + + # pthread is used on both Linux and Mac + check_library_exists("pthread" pthread_create "" HAVE_PTHREAD) + if (HAVE_PTHREAD) + list(APPEND libs pthread) + else (HAVE_PTHREAD) + message(FATAL_ERROR "Missing library: pthread") + endif() + + if (APPLE) + + # build mac os x universal + set(CMAKE_OSX_ARCHITECTURES "ppc;i386" + CACHE STRING "Build architectures for OSX" FORCE) + + find_library(lib_ScreenSaver ScreenSaver) + find_library(lib_IOKit IOKit) + find_library(lib_ApplicationServices ApplicationServices) + find_library(lib_Foundation Foundation) + find_library(lib_Carbon Carbon) + + list(APPEND libs + ${lib_ScreenSaver} + ${lib_IOKit} + ${lib_ApplicationServices} + ${lib_Foundation} + ${lib_Carbon} + ) + + else (APPLE) + + set(XKBlib "X11/XKBlib.h") + check_include_files("${XKBlib};X11/extensions/dpms.h" HAVE_X11_EXTENSIONS_DPMS_H) + check_include_files("X11/extensions/Xinerama.h" HAVE_X11_EXTENSIONS_XINERAMA_H) + check_include_files("${XKBlib};X11/extensions/XKBstr.h" HAVE_X11_EXTENSIONS_XKBSTR_H) + check_include_files("X11/extensions/XKB.h" HAVE_XKB_EXTENSION) + check_include_files("X11/extensions/XTest.h" HAVE_X11_EXTENSIONS_XTEST_H) + check_include_files(${XKBlib} HAVE_X11_XKBLIB_H) + + if (HAVE_X11_EXTENSIONS_DPMS_H) + # Assume that function prototypes declared, when include exists. + set(HAVE_DPMS_PROTOTYPES 1) + endif() + + if (NOT HAVE_X11_XKBLIB_H) + message(FATAL_ERROR "Missing header: " ${XKBlib}) + endif() + + check_library_exists("SM;ICE" IceConnectionNumber "" HAVE_ICE) + check_library_exists("X11;Xext" DPMSQueryExtension "" HAVE_Xext) + check_library_exists("X11;Xext;Xtst" XTestQueryExtension "" HAVE_Xtst) + check_library_exists("Xinerama" XineramaQueryExtension "" HAVE_Xinerama) + + if (HAVE_ICE) + + # Assume we have SM if we have ICE. + set(HAVE_SM 1) + list(APPEND libs SM ICE) + + endif() + + if (HAVE_Xtst) + + # Xtxt depends on X11. + set(HAVE_X11) + list(APPEND libs X11 Xtst) + + else (HAVE_Xtst) + + message(FATAL_ERROR "Missing library: Xtst") + + endif() + + if (HAVE_Xext) + list(APPEND libs Xext) + endif() + + if (HAVE_Xinerama) + list(APPEND libs Xinerama) + else (HAVE_Xinerama) + if (HAVE_X11_EXTENSIONS_XINERAMA_H) + message(FATAL_ERROR "Missing library: Xinerama") + endif() + endif() + + endif() + + # For config.h, set some static values; it may be a good idea to make + # these values dynamic for non-standard UNIX compilers. + set(ACCEPT_TYPE_ARG3 socklen_t) + set(HAVE_CXX_BOOL 1) + set(HAVE_CXX_CASTS 1) + set(HAVE_CXX_EXCEPTIONS 1) + set(HAVE_CXX_MUTABLE 1) + set(HAVE_CXX_STDLIB 1) + set(HAVE_PTHREAD_SIGNAL 1) + set(SELECT_TYPE_ARG1 int) + set(SELECT_TYPE_ARG234 "(fd_set *)") + set(SELECT_TYPE_ARG5 "(struct timeval *)") + set(STDC_HEADERS 1) + set(TIME_WITH_SYS_TIME 1) + set(HAVE_SOCKLEN_T 1) + + # For config.h, save the results based on a template (config.h.in). + configure_file(${cmake_dir}/config.h.in ${root_dir}/config.h) + + add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H) + + if (APPLE) + add_definitions(-DWINAPI_CARBON=1 -D_THREAD_SAFE -DMACOSX_DEPLOYMENT_TARGET=10.4) + else (APPLE) + add_definitions(-DWINAPI_XWINDOWS=1) + endif() + +else (UNIX) + + list(APPEND libs Wtsapi32 Userenv) + + add_definitions( + /DWIN32 + /D_WINDOWS + /D_CRT_SECURE_NO_WARNINGS + /DVERSION=\"${VERSION}\" + ) -if (CONF_CPACK) - # Setup the CPack config. - include(${cmake_dir}/CMakeLists_cpack.txt) endif() -if (CONF_DOXYGEN) - # Setup doxygen - include(${cmake_dir}/CMakeLists_doxygen.txt) -endif() +add_subdirectory(src) if (WIN32) # add /analyze in order to unconver potential bugs in the source code @@ -96,3 +276,106 @@ if (WIN32) set(CMAKE_CXX_FLAGS_RELEASE "/MD /O2 /Ob2") endif() + +if (CONF_CPACK) + + if (WIN32) + message(FATAL_ERROR "CPack support for Windows has been removed.") + endif() + + install(TARGETS + synergys + synergyc + COMPONENT core + DESTINATION bin) + + if (UNIX) + if (APPLE) + # no cpack support for apple + else () + install(FILES bin/qsynergy + DESTINATION bin + PERMISSIONS + OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE) + + # install gnome menu item + install(FILES cmake/synergy.desktop + DESTINATION share/applications) + install(FILES cmd/launcher/synergy.ico + DESTINATION share/icons) + endif() + endif() + + # The default CPack behaviour is not to append the system processor + # type, which is undesirable in our case, since we want to support + # both 32-bit and 64-bit processors. + set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) + + # For source code, use .tar.gz on Unix, and .zip on Windows + if (UNIX) + set(CPACK_SOURCE_GENERATOR TGZ) + else (UNIX) + set(CPACK_SOURCE_GENERATOR ZIP) + endif() + + if (APPLE) + set(CPACK_SYSTEM_NAME "MacOSX-Universal") + endif() + + set(CPACK_PACKAGE_NAME "synergy") + set(CPACK_PACKAGE_VENDOR "The Synergy Project") + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Synergy server and client") + set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_REV}) + set(CPACK_PACKAGE_VERSION ${VERSION}) + set(CPACK_PACKAGE_CONTACT http://synergy-foss.org/) + set(CPACK_RESOURCE_FILE_LICENSE "${cmake_dir}/License.rtf") + set(CPACK_RESOURCE_FILE_README "${cmake_dir}/Readme.txt") + + # files to exclude from src package (regex patterns) + # to escape, use 4 backslashes (\\\\) -- yuck! + set(CPACK_SOURCE_IGNORE_FILES + # temp output dir in root + "/bin/" + + # generated config.h file + "/config\\\\.h$" + + # buildbot stuff + "\\\\.buildbot\\\\-sourcedata$" + + # qt temp build dir + "/gui/tmp/.*" + + # qt make file + "/gui/Makefile$" + + # qt generated ui headers + "/gui/ui_.*\\\\.h$" + + # compiled python files + ".*\\\\.pyc$" + + # subversion caches (all dirs) + ".*/\\\\.svn/.*" + + # emacs temporary files + ".*~$" + ) + + # Must be last (since it relies of CPACK_ vars). + include(CPack) + +endif() + +if (CONF_DOXYGEN) + + set(VERSION, "${VERSION}") + + # For doxygen.cfg, save the results based on a template (doxygen.cfg.in). + configure_file(${cmake_dir}/doxygen.cfg.in ${doc_dir}/doxygen.cfg) + +endif() \ No newline at end of file diff --git a/cmake/CMakeLists_config.txt b/cmake/CMakeLists_config.txt deleted file mode 100644 index 4fff9e0a..00000000 --- a/cmake/CMakeLists_config.txt +++ /dev/null @@ -1,214 +0,0 @@ -# synergy -- mouse and keyboard sharing utility -# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Declare libs, so we can use list in linker later. There's probably -# a more elegant way of doing this; with SCons, when you check for the -# lib, it is automatically passed to the linker. -set(libs) - -# Depending on the platform, pass in the required defines. -if (UNIX) - - # For config.h, detect the libraries, functions, etc. - include(CheckIncludeFiles) - include(CheckLibraryExists) - include(CheckFunctionExists) - include(CheckTypeSize) - include(CheckIncludeFileCXX) - include(CheckSymbolExists) - include(CheckCSourceCompiles) - - check_include_file_cxx(istream HAVE_ISTREAM) - check_include_file_cxx(ostream HAVE_OSTREAM) - check_include_file_cxx(sstream HAVE_SSTREAM) - - check_include_files(inttypes.h HAVE_INTTYPES_H) - check_include_files(locale.h HAVE_LOCALE_H) - check_include_files(memory.h HAVE_MEMORY_H) - check_include_files(stdlib.h HAVE_STDLIB_H) - check_include_files(strings.h HAVE_STRINGS_H) - check_include_files(string.h HAVE_STRING_H) - check_include_files(sys/select.h HAVE_SYS_SELECT_H) - check_include_files(sys/socket.h HAVE_SYS_SOCKET_H) - check_include_files(sys/stat.h HAVE_SYS_STAT_H) - check_include_files(sys/time.h HAVE_SYS_TIME_H) - check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H) - check_include_files(unistd.h HAVE_UNISTD_H) - check_include_files(wchar.h HAVE_WCHAR_H) - - check_function_exists(getpwuid_r HAVE_GETPWUID_R) - check_function_exists(gmtime_r HAVE_GMTIME_R) - check_function_exists(nanosleep HAVE_NANOSLEEP) - check_function_exists(poll HAVE_POLL) - check_function_exists(sigwait HAVE_POSIX_SIGWAIT) - check_function_exists(strftime HAVE_STRFTIME) - check_function_exists(vsnprintf HAVE_VSNPRINTF) - check_function_exists(inet_aton HAVE_INET_ATON) - - # For some reason, the check_function_exists macro doesn't detect - # the inet_aton on some pure Unix platforms (e.g. sunos5). So we - # need to do a more detailed check and also include some extra libs. - if (NOT HAVE_INET_ATON) - - set(CMAKE_REQUIRED_LIBRARIES nsl) - check_c_source_compiles( - "#include \n int main() { inet_aton(0, 0); }" - HAVE_INET_ATON_ADV) - set(CMAKE_REQUIRED_LIBRARIES) - - if (HAVE_INET_ATON_ADV) - - # Override the previous fail. - set(HAVE_INET_ATON 1) - - # Assume that both nsl and socket will be needed, - # it seems safe to add socket on the back of nsl, - # since socket only ever needed when nsl is needed. - list(APPEND libs nsl socket) - - endif() - - endif() - - check_type_size(char SIZEOF_CHAR) - check_type_size(int SIZEOF_INT) - check_type_size(long SIZEOF_LONG) - check_type_size(short SIZEOF_SHORT) - - # pthread is used on both Linux and Mac - check_library_exists("pthread" pthread_create "" HAVE_PTHREAD) - if (HAVE_PTHREAD) - list(APPEND libs pthread) - else (HAVE_PTHREAD) - message(FATAL_ERROR "Missing library: pthread") - endif() - - if (APPLE) - - # build mac os x universal - set(CMAKE_OSX_ARCHITECTURES "ppc;i386" - CACHE STRING "Build architectures for OSX" FORCE) - - find_library(lib_ScreenSaver ScreenSaver) - find_library(lib_IOKit IOKit) - find_library(lib_ApplicationServices ApplicationServices) - find_library(lib_Foundation Foundation) - find_library(lib_Carbon Carbon) - - list(APPEND libs - ${lib_ScreenSaver} - ${lib_IOKit} - ${lib_ApplicationServices} - ${lib_Foundation} - ${lib_Carbon} - ) - - else (APPLE) - - set(XKBlib "X11/XKBlib.h") - check_include_files("${XKBlib};X11/extensions/dpms.h" HAVE_X11_EXTENSIONS_DPMS_H) - check_include_files("X11/extensions/Xinerama.h" HAVE_X11_EXTENSIONS_XINERAMA_H) - check_include_files("${XKBlib};X11/extensions/XKBstr.h" HAVE_X11_EXTENSIONS_XKBSTR_H) - check_include_files("X11/extensions/XKB.h" HAVE_XKB_EXTENSION) - check_include_files("X11/extensions/XTest.h" HAVE_X11_EXTENSIONS_XTEST_H) - check_include_files(${XKBlib} HAVE_X11_XKBLIB_H) - - if (HAVE_X11_EXTENSIONS_DPMS_H) - # Assume that function prototypes declared, when include exists. - set(HAVE_DPMS_PROTOTYPES 1) - endif() - - if (NOT HAVE_X11_XKBLIB_H) - message(FATAL_ERROR "Missing header: " ${XKBlib}) - endif() - - check_library_exists("SM;ICE" IceConnectionNumber "" HAVE_ICE) - check_library_exists("X11;Xext" DPMSQueryExtension "" HAVE_Xext) - check_library_exists("X11;Xext;Xtst" XTestQueryExtension "" HAVE_Xtst) - check_library_exists("Xinerama" XineramaQueryExtension "" HAVE_Xinerama) - - if (HAVE_ICE) - - # Assume we have SM if we have ICE. - set(HAVE_SM 1) - list(APPEND libs SM ICE) - - endif() - - if (HAVE_Xtst) - - # Xtxt depends on X11. - set(HAVE_X11) - list(APPEND libs X11 Xtst) - - else (HAVE_Xtst) - - message(FATAL_ERROR "Missing library: Xtst") - - endif() - - if (HAVE_Xext) - list(APPEND libs Xext) - endif() - - if (HAVE_Xinerama) - list(APPEND libs Xinerama) - else (HAVE_Xinerama) - if (HAVE_X11_EXTENSIONS_XINERAMA_H) - message(FATAL_ERROR "Missing library: Xinerama") - endif() - endif() - - endif() - - # For config.h, set some static values; it may be a good idea to make - # these values dynamic for non-standard UNIX compilers. - set(ACCEPT_TYPE_ARG3 socklen_t) - set(HAVE_CXX_BOOL 1) - set(HAVE_CXX_CASTS 1) - set(HAVE_CXX_EXCEPTIONS 1) - set(HAVE_CXX_MUTABLE 1) - set(HAVE_CXX_STDLIB 1) - set(HAVE_PTHREAD_SIGNAL 1) - set(SELECT_TYPE_ARG1 int) - set(SELECT_TYPE_ARG234 "(fd_set *)") - set(SELECT_TYPE_ARG5 "(struct timeval *)") - set(STDC_HEADERS 1) - set(TIME_WITH_SYS_TIME 1) - set(HAVE_SOCKLEN_T 1) - - # For config.h, save the results based on a template (config.h.in). - configure_file(${cmake_dir}/config.h.in ${root_dir}/config.h) - - add_definitions(-DSYSAPI_UNIX=1 -DHAVE_CONFIG_H) - - if (APPLE) - add_definitions(-DWINAPI_CARBON=1 -D_THREAD_SAFE -DMACOSX_DEPLOYMENT_TARGET=10.4) - else (APPLE) - add_definitions(-DWINAPI_XWINDOWS=1) - endif() - -else (UNIX) - - list(APPEND libs Wtsapi32 Userenv) - - add_definitions( - /DWIN32 - /D_WINDOWS - /D_CRT_SECURE_NO_WARNINGS - /DVERSION=\"${VERSION}\" - ) - -endif() diff --git a/cmake/CMakeLists_cpack.txt b/cmake/CMakeLists_cpack.txt deleted file mode 100644 index ad722836..00000000 --- a/cmake/CMakeLists_cpack.txt +++ /dev/null @@ -1,107 +0,0 @@ -# synergy -- mouse and keyboard sharing utility -# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# List of CPack variables: -# http://www.vtk.org/Wiki/CMake:CPackConfiguration - -if (WIN32) - message(FATAL_ERROR "CPack support for Windows has been removed.") -endif() - -install(TARGETS - synergys - synergyc - COMPONENT core - DESTINATION bin) - -if (UNIX) - if (APPLE) - # no cpack support for apple - else () - install(FILES bin/qsynergy - DESTINATION bin - PERMISSIONS - OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE - WORLD_READ WORLD_EXECUTE) - - # install gnome menu item - install(FILES cmake/synergy.desktop - DESTINATION share/applications) - install(FILES cmd/launcher/synergy.ico - DESTINATION share/icons) - endif() -endif() - -# The default CPack behaviour is not to append the system processor -# type, which is undesirable in our case, since we want to support -# both 32-bit and 64-bit processors. -set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) - -# For source code, use .tar.gz on Unix, and .zip on Windows -if (UNIX) - set(CPACK_SOURCE_GENERATOR TGZ) -else (UNIX) - set(CPACK_SOURCE_GENERATOR ZIP) -endif() - -if (APPLE) - set(CPACK_SYSTEM_NAME "MacOSX-Universal") -endif() - -set(CPACK_PACKAGE_NAME "synergy") -set(CPACK_PACKAGE_VENDOR "The Synergy Project") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Synergy server and client") -set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) -set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) -set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_REV}) -set(CPACK_PACKAGE_VERSION ${VERSION}) -set(CPACK_PACKAGE_CONTACT http://synergy-foss.org/) -set(CPACK_RESOURCE_FILE_LICENSE "${cmake_dir}/License.rtf") -set(CPACK_RESOURCE_FILE_README "${cmake_dir}/Readme.txt") - -# files to exclude from src package (regex patterns) -# to escape, use 4 backslashes (\\\\) -- yuck! -set(CPACK_SOURCE_IGNORE_FILES - # temp output dir in root - "/bin/" - - # generated config.h file - "/config\\\\.h$" - - # buildbot stuff - "\\\\.buildbot\\\\-sourcedata$" - - # qt temp build dir - "/gui/tmp/.*" - - # qt make file - "/gui/Makefile$" - - # qt generated ui headers - "/gui/ui_.*\\\\.h$" - - # compiled python files - ".*\\\\.pyc$" - - # subversion caches (all dirs) - ".*/\\\\.svn/.*" - - # emacs temporary files - ".*~$" -) - -# Must be last (since it relies of CPACK_ vars). -include(CPack) diff --git a/cmake/CMakeLists_launcher.txt b/cmake/CMakeLists_launcher.txt deleted file mode 100644 index 9dc9d5d9..00000000 --- a/cmake/CMakeLists_launcher.txt +++ /dev/null @@ -1,84 +0,0 @@ -# synergy -- mouse and keyboard sharing utility -# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -if (WIN32) - set(root_cmd_launcher ${root_dir}/cmd/launcher) - - set(src_cmd_launcher_mswindows - ${root_cmd_launcher}/CAddScreen.cpp - ${root_cmd_launcher}/CAdvancedOptions.cpp - ${root_cmd_launcher}/CAutoStart.cpp - ${root_cmd_launcher}/CGlobalOptions.cpp - ${root_cmd_launcher}/CHotkeyOptions.cpp - ${root_cmd_launcher}/CInfo.cpp - ${root_cmd_launcher}/CScreensLinks.cpp - ${root_cmd_launcher}/LaunchUtil.cpp - ${root_cmd_launcher}/launcher.cpp - ) - - set(inc_cmd_launcher_mswindows - ${root_cmd_launcher}/CAddScreen.h - ${root_cmd_launcher}/CAdvancedOptions.h - ${root_cmd_launcher}/CAutoStart.h - ${root_cmd_launcher}/CGlobalOptions.h - ${root_cmd_launcher}/CHotkeyOptions.h - ${root_cmd_launcher}/CInfo.h - ${root_cmd_launcher}/CScreensLinks.h - ${root_cmd_launcher}/LaunchUtil.h - ${root_cmd_launcher}/resource.h - ) - - set(res_cmd_launcher_mswindows - ${root_cmd_launcher}/launcher.rc - ${root_cmd_launcher}/synergy.ico - ) - - set(src_cmd_launcher) - - if (UNIX) - if (APPLE) - list(APPEND src_cmd_launcher ${src_cmd_launcher_carbon}) - else (APPLE) - list(APPEND src_cmd_launcher ${src_cmd_launcher_xwindows}) - endif() - endif() - - if (WIN32) - list(APPEND src_cmd_launcher - ${inc_cmd_launcher_mswindows} - ${res_cmd_launcher_mswindows} - ${src_cmd_launcher_mswindows} - ) - endif() - - set(inc_dirs_cmd_launcher - ${root_dir} - ${root_dir}/lib - ${root_dir}/lib/arch - ${root_dir}/lib/base - ${root_dir}/lib/common - ${root_dir}/lib/io - ${root_dir}/lib/mt - ${root_dir}/lib/net - ${root_dir}/lib/platform - ${root_dir}/lib/synergy - ${root_dir}/lib/server - ) - - include_directories(${inc_dirs_cmd_launcher}) - add_executable(launcher WIN32 ${src_cmd_launcher}) - target_link_libraries(launcher synergy ${libs}) - -endif() diff --git a/cmake/CMakeLists_lib.txt b/cmake/CMakeLists_lib.txt deleted file mode 100644 index 4bdeb904..00000000 --- a/cmake/CMakeLists_lib.txt +++ /dev/null @@ -1,417 +0,0 @@ -# synergy -- mouse and keyboard sharing utility -# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -set(root_lib ${root_dir}/lib) - -set(src_lib_arch - ${root_lib}/arch/CArchAppUtil.cpp - ${root_lib}/arch/CArch.cpp - ${root_lib}/arch/CArchDaemonNone.cpp - ${root_lib}/arch/XArch.cpp - ${root_lib}/arch/CArchConsoleStd.cpp -) - -set(src_lib_arch_unix - ${root_lib}/arch/CArchAppUtilUnix.cpp - ${root_lib}/arch/CArchConsoleUnix.cpp - ${root_lib}/arch/CArchDaemonUnix.cpp - ${root_lib}/arch/CArchFileUnix.cpp - ${root_lib}/arch/CArchLogUnix.cpp - ${root_lib}/arch/CArchMultithreadPosix.cpp - ${root_lib}/arch/CArchNetworkBSD.cpp - ${root_lib}/arch/CArchSleepUnix.cpp - ${root_lib}/arch/CArchStringUnix.cpp - ${root_lib}/arch/CArchSystemUnix.cpp - ${root_lib}/arch/CArchTaskBarXWindows.cpp - ${root_lib}/arch/CArchTimeUnix.cpp - ${root_lib}/arch/XArchUnix.cpp -) - -set(src_lib_arch_windows - ${root_lib}/arch/CArchAppUtilWindows.cpp - ${root_lib}/arch/CArchConsoleWindows.cpp - ${root_lib}/arch/CArchDaemonWindows.cpp - ${root_lib}/arch/CArchFileWindows.cpp - ${root_lib}/arch/CArchLogWindows.cpp - ${root_lib}/arch/CArchMiscWindows.cpp - ${root_lib}/arch/CArchMultithreadWindows.cpp - ${root_lib}/arch/CArchNetworkWinsock.cpp - ${root_lib}/arch/CArchSleepWindows.cpp - ${root_lib}/arch/CArchStringWindows.cpp - ${root_lib}/arch/CArchSystemWindows.cpp - ${root_lib}/arch/CArchTaskBarWindows.cpp - ${root_lib}/arch/CArchTimeWindows.cpp - ${root_lib}/arch/XArchWindows.cpp -) - -set(inc_lib_arch_windows - ${root_lib}/arch/CArchAppUtil.h - ${root_lib}/arch/CArchAppUtilWindows.h - ${root_lib}/arch/CArchConsoleWindows.h - ${root_lib}/arch/CArchDaemonWindows.h - ${root_lib}/arch/CArchFileWindows.h - ${root_lib}/arch/CArchLogWindows.h - ${root_lib}/arch/CArchMiscWindows.h - ${root_lib}/arch/CArchMultithreadWindows.h - ${root_lib}/arch/CArchNetworkWinsock.h - ${root_lib}/arch/CArchSleepWindows.h - ${root_lib}/arch/CArchStringWindows.h - ${root_lib}/arch/CArchSystemWindows.h - ${root_lib}/arch/CArchTaskBarWindows.h - ${root_lib}/arch/CArchTimeWindows.h - ${root_lib}/arch/CArchConsoleStd.h - ${root_lib}/arch/IArchAppUtil.h - ${root_lib}/arch/XArchWindows.h -) - -set(src_lib_base - ${root_lib}/base/CEvent.cpp - ${root_lib}/base/CEventQueue.cpp - ${root_lib}/base/CFunctionEventJob.cpp - ${root_lib}/base/CFunctionJob.cpp - ${root_lib}/base/CLog.cpp - ${root_lib}/base/CSimpleEventQueueBuffer.cpp - ${root_lib}/base/CStopwatch.cpp - ${root_lib}/base/CStringUtil.cpp - ${root_lib}/base/CUnicode.cpp - ${root_lib}/base/IEventQueue.cpp - ${root_lib}/base/LogOutputters.cpp - ${root_lib}/base/XBase.cpp -) - -set(inc_lib_base - ${root_lib}/base/CEvent.h - ${root_lib}/base/CEventQueue.h - ${root_lib}/base/CFunctionEventJob.h - ${root_lib}/base/CFunctionJob.h - ${root_lib}/base/CLog.h - ${root_lib}/base/CPriorityQueue.h - ${root_lib}/base/CSimpleEventQueueBuffer.h - ${root_lib}/base/CStopwatch.h - ${root_lib}/base/CString.h - ${root_lib}/base/CStringUtil.h - ${root_lib}/base/CUnicode.h - ${root_lib}/base/IEventJob.h - ${root_lib}/base/IEventQueue.h - ${root_lib}/base/IEventQueueBuffer.h - ${root_lib}/base/IJob.h - ${root_lib}/base/ILogOutputter.h - ${root_lib}/base/LogOutputters.h - ${root_lib}/base/TMethodEventJob.h - ${root_lib}/base/TMethodJob.h - ${root_lib}/base/XBase.h -) - -set(src_lib_client - ${root_lib}/client/CClient.cpp - ${root_lib}/client/CServerProxy.cpp -) - -set(inc_lib_client - ${root_lib}/client/CClient.h - ${root_lib}/client/CServerProxy.h -) - -set(src_lib_common - ${root_lib}/common/Version.cpp -) - -set(inc_lib_common - ${root_lib}/common/Version.h -) - -set(src_lib_io - ${root_lib}/io/CStreamBuffer.cpp - ${root_lib}/io/CStreamFilter.cpp - ${root_lib}/io/IStream.cpp - ${root_lib}/io/XIO.cpp -) - -set(inc_lib_io - ${root_lib}/io/CStreamBuffer.h - ${root_lib}/io/CStreamFilter.h - ${root_lib}/io/IStream.h - ${root_lib}/io/IStreamFilterFactory.h - ${root_lib}/io/XIO.h -) - -set(src_lib_mt - ${root_lib}/mt/CCondVar.cpp - ${root_lib}/mt/CLock.cpp - ${root_lib}/mt/CMutex.cpp - ${root_lib}/mt/CThread.cpp - ${root_lib}/mt/XMT.cpp -) - -set(inc_lib_mt - ${root_lib}/mt/CCondVar.h - ${root_lib}/mt/CLock.h - ${root_lib}/mt/CMutex.h - ${root_lib}/mt/CThread.h - ${root_lib}/mt/XMT.h - ${root_lib}/mt/XThread.h -) - -set(src_lib_net - ${root_lib}/net/CNetworkAddress.cpp - ${root_lib}/net/CSocketMultiplexer.cpp - ${root_lib}/net/CTCPListenSocket.cpp - ${root_lib}/net/CTCPSocket.cpp - ${root_lib}/net/CTCPSocketFactory.cpp - ${root_lib}/net/IDataSocket.cpp - ${root_lib}/net/IListenSocket.cpp - ${root_lib}/net/ISocket.cpp - ${root_lib}/net/XSocket.cpp -) - -set(inc_lib_net - ${root_lib}/net/CNetworkAddress.h - ${root_lib}/net/CSocketMultiplexer.h - ${root_lib}/net/CTCPListenSocket.h - ${root_lib}/net/CTCPSocket.h - ${root_lib}/net/CTCPSocketFactory.h - ${root_lib}/net/IDataSocket.h - ${root_lib}/net/IListenSocket.h - ${root_lib}/net/ISocket.h - ${root_lib}/net/ISocketFactory.h - ${root_lib}/net/ISocketMultiplexerJob.h - ${root_lib}/net/TSocketMultiplexerMethodJob.h - ${root_lib}/net/XSocket.h -) - -set(src_lib_platform_xwindows - ${root_lib}/platform/CXWindowsClipboard.cpp - ${root_lib}/platform/CXWindowsClipboardAnyBitmapConverter.cpp - ${root_lib}/platform/CXWindowsClipboardBMPConverter.cpp - ${root_lib}/platform/CXWindowsClipboardHTMLConverter.cpp - ${root_lib}/platform/CXWindowsClipboardTextConverter.cpp - ${root_lib}/platform/CXWindowsClipboardUCS2Converter.cpp - ${root_lib}/platform/CXWindowsClipboardUTF8Converter.cpp - ${root_lib}/platform/CXWindowsEventQueueBuffer.cpp - ${root_lib}/platform/CXWindowsKeyState.cpp - ${root_lib}/platform/CXWindowsScreen.cpp - ${root_lib}/platform/CXWindowsScreenSaver.cpp - ${root_lib}/platform/CXWindowsUtil.cpp -) - -set(src_lib_platform_mswindows - ${root_lib}/platform/CMSWindowsClipboard.cpp - ${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.cpp - ${root_lib}/platform/CMSWindowsClipboardBitmapConverter.cpp - ${root_lib}/platform/CMSWindowsClipboardHTMLConverter.cpp - ${root_lib}/platform/CMSWindowsClipboardTextConverter.cpp - ${root_lib}/platform/CMSWindowsClipboardUTF16Converter.cpp - ${root_lib}/platform/CMSWindowsDesks.cpp - ${root_lib}/platform/CMSWindowsEventQueueBuffer.cpp - ${root_lib}/platform/CMSWindowsKeyState.cpp - ${root_lib}/platform/CMSWindowsScreen.cpp - ${root_lib}/platform/CMSWindowsScreenSaver.cpp - ${root_lib}/platform/CMSWindowsUtil.cpp - ${root_lib}/platform/CMSWindowsRelauncher.cpp -) - -set(inc_lib_platform_mswindows - ${root_lib}/platform/CMSWindowsClipboard.h - ${root_lib}/platform/CMSWindowsClipboardAnyTextConverter.h - ${root_lib}/platform/CMSWindowsClipboardBitmapConverter.h - ${root_lib}/platform/CMSWindowsClipboardHTMLConverter.h - ${root_lib}/platform/CMSWindowsClipboardTextConverter.h - ${root_lib}/platform/CMSWindowsClipboardUTF16Converter.h - ${root_lib}/platform/CMSWindowsDesks.h - ${root_lib}/platform/CMSWindowsEventQueueBuffer.h - ${root_lib}/platform/CMSWindowsKeyState.h - ${root_lib}/platform/CMSWindowsScreen.h - ${root_lib}/platform/CMSWindowsScreenSaver.h - ${root_lib}/platform/CMSWindowsUtil.h - ${root_lib}/platform/CMSWindowsRelauncher.h -) - -set(src_lib_platform_hook - ${root_lib}/platform/CSynergyHook.cpp -) - -set(inc_lib_platform_hook - ${root_lib}/platform/CSynergyHook.h -) - -set(src_lib_platform_carbon - ${root_lib}/platform/COSXClipboard.cpp - ${root_lib}/platform/COSXClipboardAnyTextConverter.cpp - ${root_lib}/platform/COSXClipboardTextConverter.cpp - ${root_lib}/platform/COSXClipboardUTF16Converter.cpp - ${root_lib}/platform/COSXEventQueueBuffer.cpp - ${root_lib}/platform/COSXKeyState.cpp - ${root_lib}/platform/COSXScreen.cpp - ${root_lib}/platform/COSXScreenSaver.cpp - ${root_lib}/platform/COSXScreenSaverUtil.m -) - -set(src_lib_server - ${root_lib}/server/CBaseClientProxy.cpp - ${root_lib}/server/CClientListener.cpp - ${root_lib}/server/CClientProxy.cpp - ${root_lib}/server/CClientProxy1_0.cpp - ${root_lib}/server/CClientProxy1_1.cpp - ${root_lib}/server/CClientProxy1_2.cpp - ${root_lib}/server/CClientProxy1_3.cpp - ${root_lib}/server/CClientProxyUnknown.cpp - ${root_lib}/server/CConfig.cpp - ${root_lib}/server/CInputFilter.cpp - ${root_lib}/server/CPrimaryClient.cpp - ${root_lib}/server/CServer.cpp -) - -set(inc_lib_server - ${root_lib}/server/CBaseClientProxy.h - ${root_lib}/server/CClientListener.h - ${root_lib}/server/CClientProxy.h - ${root_lib}/server/CClientProxy1_0.h - ${root_lib}/server/CClientProxy1_1.h - ${root_lib}/server/CClientProxy1_2.h - ${root_lib}/server/CClientProxy1_3.h - ${root_lib}/server/CClientProxyUnknown.h - ${root_lib}/server/CConfig.h - ${root_lib}/server/CInputFilter.h - ${root_lib}/server/CPrimaryClient.h - ${root_lib}/server/CServer.h -) - -set(src_lib_synergy - ${root_lib}/synergy/CClientTaskBarReceiver.cpp - ${root_lib}/synergy/CServerTaskBarReceiver.cpp - ${root_lib}/synergy/CApp.cpp - ${root_lib}/synergy/CClientApp.cpp - ${root_lib}/synergy/CServerApp.cpp - ${root_lib}/synergy/CClipboard.cpp - ${root_lib}/synergy/CKeyMap.cpp - ${root_lib}/synergy/CKeyState.cpp - ${root_lib}/synergy/CPacketStreamFilter.cpp - ${root_lib}/synergy/CPlatformScreen.cpp - ${root_lib}/synergy/CProtocolUtil.cpp - ${root_lib}/synergy/CScreen.cpp - ${root_lib}/synergy/IClipboard.cpp - ${root_lib}/synergy/IKeyState.cpp - ${root_lib}/synergy/IPrimaryScreen.cpp - ${root_lib}/synergy/IScreen.cpp - ${root_lib}/synergy/KeyTypes.cpp - ${root_lib}/synergy/ProtocolTypes.cpp - ${root_lib}/synergy/XScreen.cpp - ${root_lib}/synergy/XSynergy.cpp -) - -set(inc_lib_synergy - ${root_lib}/synergy/CClientTaskBarReceiver.h - ${root_lib}/synergy/CServerTaskBarReceiver.h - ${root_lib}/synergy/CApp.h - ${root_lib}/synergy/CClientApp.h - ${root_lib}/synergy/CServerApp.h - ${root_lib}/synergy/CClipboard.h - ${root_lib}/synergy/CKeyMap.h - ${root_lib}/synergy/CKeyState.h - ${root_lib}/synergy/CPacketStreamFilter.h - ${root_lib}/synergy/CPlatformScreen.h - ${root_lib}/synergy/CProtocolUtil.h - ${root_lib}/synergy/CScreen.h - ${root_lib}/synergy/ClipboardTypes.h - ${root_lib}/synergy/IClient.h - ${root_lib}/synergy/IClipboard.h - ${root_lib}/synergy/IKeyState.h - ${root_lib}/synergy/IPlatformScreen.h - ${root_lib}/synergy/IPrimaryScreen.h - ${root_lib}/synergy/IScreen.h - ${root_lib}/synergy/IScreenSaver.h - ${root_lib}/synergy/ISecondaryScreen.h - ${root_lib}/synergy/KeyTypes.h - ${root_lib}/synergy/MouseTypes.h - ${root_lib}/synergy/OptionTypes.h - ${root_lib}/synergy/ProtocolTypes.h - ${root_lib}/synergy/XScreen.h - ${root_lib}/synergy/XSynergy.h -) - -# Create default `src`, with cross-platform sources. -set(src_lib - ${src_lib_arch} - ${src_lib_base} - ${src_lib_client} - ${src_lib_common} - ${src_lib_io} - ${src_lib_mt} - ${src_lib_net} - ${src_lib_server} - ${src_lib_synergy} -) - -# Append to `src_lib`, the platform specific sources. -if (UNIX) - list(APPEND src_lib ${src_lib_arch_unix}) - - if (APPLE) - list(APPEND src_lib - ${src_lib_platform_carbon} - ${inc_lib_synergy_carbon} - ${src_lib_synergy_carbon} - ) - else (APPLE) - list(APPEND src_lib - ${src_lib_platform_xwindows} - ${inc_lib_synergy_xwindows} - ${src_lib_synergy_xwindows} - ) - endif() - -endif() - -if (WIN32) - list(APPEND src_lib - ${inc_lib_base} - ${inc_lib_client} - ${inc_lib_common} - ${inc_lib_io} - ${inc_lib_mt} - ${inc_lib_net} - ${inc_lib_server} - ${inc_lib_synergy} - ${inc_lib_arch_windows} - ${src_lib_arch_windows} - ${inc_lib_platform_mswindows} - ${src_lib_platform_mswindows} - ${inc_lib_synergy_mswindows} - ${src_lib_synergy_mswindows} - ) -endif() - -set(inc_lib_dirs - ${root_dir} - ${root_dir}/lib/arch - ${root_dir}/lib/base - ${root_dir}/lib/client - ${root_dir}/lib/common - ${root_dir}/lib/io - ${root_dir}/lib/mt - ${root_dir}/lib/net - ${root_dir}/lib/platform - ${root_dir}/lib/server - ${root_dir}/lib/synergy - ${root_dir}/third_party/gtest - ${root_dir}/third_party/gtest/include -) - -include_directories(${inc_lib_dirs}) -add_library(synergy STATIC ${src_lib}) - -if (WIN32) - add_library(synrgyhk SHARED ${inc_lib_platform_hook} ${src_lib_platform_hook}) -endif() diff --git a/cmake/CMakeLists_synergyc.txt b/cmake/CMakeLists_synergyc.txt deleted file mode 100644 index 9ce94d52..00000000 --- a/cmake/CMakeLists_synergyc.txt +++ /dev/null @@ -1,84 +0,0 @@ -# synergy -- mouse and keyboard sharing utility -# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -set(root_cmd_synergyc ${root_dir}/cmd/synergyc) - -set(src_cmd_synergyc_common - ${root_cmd_synergyc}/synergyc.cpp -) - -set(src_cmd_synergyc_xwindows - ${root_cmd_synergyc}/CXWindowsClientTaskBarReceiver.cpp -) - -set(src_cmd_synergyc_mswindows - ${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.cpp -) - -set(inc_cmd_synergyc_mswindows - ${root_cmd_synergyc}/CMSWindowsClientTaskBarReceiver.h - ${root_cmd_synergyc}/resource.h -) - -set(res_cmd_synergyc_mswindows - ${root_cmd_synergyc}/synergyc.ico - ${root_cmd_synergyc}/synergyc.rc - ${root_cmd_synergyc}/tb_error.ico - ${root_cmd_synergyc}/tb_idle.ico - ${root_cmd_synergyc}/tb_run.ico - ${root_cmd_synergyc}/tb_wait.ico -) - -set(src_cmd_synergyc_carbon - ${root_cmd_synergyc}/COSXClientTaskBarReceiver.cpp -) - -set(src_cmd_synergyc ${src_cmd_synergyc_common}) - -if (UNIX) - - if (APPLE) - list(APPEND src_cmd_synergyc ${src_cmd_synergyc_carbon}) - else (APPLE) - list(APPEND src_cmd_synergyc ${src_cmd_synergyc_xwindows}) - endif() - -else (UNIX) - - list(APPEND src_cmd_synergyc - ${inc_cmd_synergyc_mswindows} - ${res_cmd_synergyc_mswindows} - ${src_cmd_synergyc_mswindows} - ) - -endif() - -set(inc_dirs_cmd_synergyc - ${root_dir} - ${root_dir}/lib - ${root_dir}/lib/arch - ${root_dir}/lib/base - ${root_dir}/lib/client - ${root_dir}/lib/common - ${root_dir}/lib/io - ${root_dir}/lib/mt - ${root_dir}/lib/net - ${root_dir}/lib/platform - ${root_dir}/lib/synergy -) - -include_directories(${inc_dirs_cmd_synergyc}) -add_executable(synergyc ${src_cmd_synergyc}) -target_link_libraries(synergyc synergy ${libs}) diff --git a/cmake/CMakeLists_synergys.txt b/cmake/CMakeLists_synergys.txt deleted file mode 100644 index 87e465ab..00000000 --- a/cmake/CMakeLists_synergys.txt +++ /dev/null @@ -1,84 +0,0 @@ -# synergy -- mouse and keyboard sharing utility -# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -set(root_cmd_synergys ${root_dir}/cmd/synergys) - -set(src_cmd_synergys_common - ${root_cmd_synergys}/synergys.cpp -) - -set(src_cmd_synergys_xwindows - ${root_cmd_synergys}/CXWindowsServerTaskBarReceiver.cpp -) - -set(src_cmd_synergys_mswindows - ${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.cpp -) - -set(inc_cmd_synergys_mswindows - ${root_cmd_synergys}/CMSWindowsServerTaskBarReceiver.h - ${root_cmd_synergys}/resource.h -) - -set(res_cmd_synergys_mswindows - ${root_cmd_synergys}/synergys.ico - ${root_cmd_synergys}/synergys.rc - ${root_cmd_synergys}/tb_error.ico - ${root_cmd_synergys}/tb_idle.ico - ${root_cmd_synergys}/tb_run.ico - ${root_cmd_synergys}/tb_wait.ico -) - -set(src_cmd_synergys_carbon - ${root_cmd_synergys}/COSXServerTaskBarReceiver.cpp -) - -set(src_cmd_synergys ${src_cmd_synergys_common}) - -if (UNIX) - - if (APPLE) - list(APPEND src_cmd_synergys ${src_cmd_synergys_carbon}) - else (APPLE) - list(APPEND src_cmd_synergys ${src_cmd_synergys_xwindows}) - endif() - -else (UNIX) - - list(APPEND src_cmd_synergys - ${inc_cmd_synergys_mswindows} - ${res_cmd_synergys_mswindows} - ${src_cmd_synergys_mswindows} - ) - -endif() - -set(inc_dirs_cmd_synergys - ${root_dir} - ${root_dir}/lib - ${root_dir}/lib/arch - ${root_dir}/lib/base - ${root_dir}/lib/common - ${root_dir}/lib/io - ${root_dir}/lib/mt - ${root_dir}/lib/net - ${root_dir}/lib/platform - ${root_dir}/lib/synergy - ${root_dir}/lib/server -) - -include_directories(${inc_dirs_cmd_synergys}) -add_executable(synergys ${src_cmd_synergys}) -target_link_libraries(synergys synergy ${libs}) diff --git a/cmd/launcher/CAddScreen.cpp b/cmd/launcher/CAddScreen.cpp deleted file mode 100644 index 01494f08..00000000 --- a/cmd/launcher/CAddScreen.cpp +++ /dev/null @@ -1,430 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2002 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "CConfig.h" -#include "KeyTypes.h" -#include "OptionTypes.h" -#include "ProtocolTypes.h" -#include "CStringUtil.h" -#include "CArch.h" -#include "CAddScreen.h" -#include "LaunchUtil.h" -#include "resource.h" - -struct CModifierInfo { -public: - int m_ctrlID; - const char* m_name; - KeyModifierID m_modifierID; - OptionID m_optionID; -}; - -static const CModifierInfo s_modifiers[] = { - { IDC_ADD_MOD_SHIFT, "Shift", - kKeyModifierIDShift, kOptionModifierMapForShift }, - { IDC_ADD_MOD_CTRL, "Ctrl", - kKeyModifierIDControl, kOptionModifierMapForControl }, - { IDC_ADD_MOD_ALT, "Alt", - kKeyModifierIDAlt, kOptionModifierMapForAlt }, - { IDC_ADD_MOD_META, "Meta", - kKeyModifierIDMeta, kOptionModifierMapForMeta }, - { IDC_ADD_MOD_SUPER, "Super", - kKeyModifierIDSuper, kOptionModifierMapForSuper } -}; - -static const KeyModifierID baseModifier = kKeyModifierIDShift; - -// -// CAddScreen -// - -CAddScreen* CAddScreen::s_singleton = NULL; - -CAddScreen::CAddScreen(HWND parent, CConfig* config, const CString& name) : - m_parent(parent), - m_config(config), - m_name(name) -{ - assert(s_singleton == NULL); - s_singleton = this; -} - -CAddScreen::~CAddScreen() -{ - s_singleton = NULL; -} - -bool -CAddScreen::doModal() -{ - // do dialog - return (DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_ADD), - m_parent, (DLGPROC)dlgProc, (LPARAM)this) != 0); -} - -CString -CAddScreen::getName() const -{ - return m_name; -} - -void -CAddScreen::init(HWND hwnd) -{ - // set title - CString title; - if (m_name.empty()) { - title = getString(IDS_ADD_SCREEN); - } - else { - title = CStringUtil::format( - getString(IDS_EDIT_SCREEN).c_str(), - m_name.c_str()); - } - SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM)title.c_str()); - - // fill in screen name - HWND child = getItem(hwnd, IDC_ADD_SCREEN_NAME_EDIT); - SendMessage(child, WM_SETTEXT, 0, (LPARAM)m_name.c_str()); - - // fill in aliases - CString aliases; - for (CConfig::all_const_iterator index = m_config->beginAll(); - index != m_config->endAll(); ++index) { - if (CStringUtil::CaselessCmp::equal(index->second, m_name) && - !CStringUtil::CaselessCmp::equal(index->second, index->first)) { - if (!aliases.empty()) { - aliases += "\r\n"; - } - aliases += index->first; - } - } - child = getItem(hwnd, IDC_ADD_ALIASES_EDIT); - SendMessage(child, WM_SETTEXT, 0, (LPARAM)aliases.c_str()); - - // set options - CConfig::CScreenOptions options; - getOptions(options); - CConfig::CScreenOptions::const_iterator index; - child = getItem(hwnd, IDC_ADD_HD_CAPS_CHECK); - index = options.find(kOptionHalfDuplexCapsLock); - setItemChecked(child, (index != options.end() && index->second != 0)); - child = getItem(hwnd, IDC_ADD_HD_NUM_CHECK); - index = options.find(kOptionHalfDuplexNumLock); - setItemChecked(child, (index != options.end() && index->second != 0)); - child = getItem(hwnd, IDC_ADD_HD_SCROLL_CHECK); - index = options.find(kOptionHalfDuplexScrollLock); - setItemChecked(child, (index != options.end() && index->second != 0)); - - // modifier options - for (UInt32 i = 0; i < sizeof(s_modifiers) / - sizeof(s_modifiers[0]); ++i) { - child = getItem(hwnd, s_modifiers[i].m_ctrlID); - - // fill in options - for (UInt32 j = 0; j < sizeof(s_modifiers) / - sizeof(s_modifiers[0]); ++j) { - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)s_modifiers[j].m_name); - } - - // choose current value - index = options.find(s_modifiers[i].m_optionID); - KeyModifierID id = s_modifiers[i].m_modifierID; - if (index != options.end()) { - id = index->second; - } - SendMessage(child, CB_SETCURSEL, id - baseModifier, 0); - } - - // dead corners - UInt32 corners = 0; - index = options.find(kOptionScreenSwitchCorners); - if (index != options.end()) { - corners = index->second; - } - child = getItem(hwnd, IDC_ADD_DC_TOP_LEFT); - setItemChecked(child, (corners & kTopLeftMask) != 0); - child = getItem(hwnd, IDC_ADD_DC_TOP_RIGHT); - setItemChecked(child, (corners & kTopRightMask) != 0); - child = getItem(hwnd, IDC_ADD_DC_BOTTOM_LEFT); - setItemChecked(child, (corners & kBottomLeftMask) != 0); - child = getItem(hwnd, IDC_ADD_DC_BOTTOM_RIGHT); - setItemChecked(child, (corners & kBottomRightMask) != 0); - index = options.find(kOptionScreenSwitchCornerSize); - SInt32 size = 0; - if (index != options.end()) { - size = index->second; - } - char buffer[20]; - sprintf(buffer, "%d", size); - child = getItem(hwnd, IDC_ADD_DC_SIZE); - SendMessage(child, WM_SETTEXT, 0, (LPARAM)buffer); -} - -bool -CAddScreen::save(HWND hwnd) -{ - // get the old aliases and options - CStringList oldAliases; - getAliases(oldAliases); - CConfig::CScreenOptions options; - getOptions(options); - - // extract name and aliases - CString newName; - HWND child = getItem(hwnd, IDC_ADD_SCREEN_NAME_EDIT); - newName = getWindowText(child); - CStringList newAliases; - child = getItem(hwnd, IDC_ADD_ALIASES_EDIT); - tokenize(newAliases, getWindowText(child)); - - // name must be valid - if (!m_config->isValidScreenName(newName)) { - showError(hwnd, CStringUtil::format( - getString(IDS_INVALID_SCREEN_NAME).c_str(), - newName.c_str())); - return false; - } - - // aliases must be valid - for (CStringList::const_iterator index = newAliases.begin(); - index != newAliases.end(); ++index) { - if (!m_config->isValidScreenName(*index)) { - showError(hwnd, CStringUtil::format( - getString(IDS_INVALID_SCREEN_NAME).c_str(), - index->c_str())); - return false; - } - } - - // new name may not be in the new alias list - if (isNameInList(newAliases, newName)) { - showError(hwnd, CStringUtil::format( - getString(IDS_SCREEN_NAME_IS_ALIAS).c_str(), - newName.c_str())); - return false; - } - - // name must not exist in config but allow same name. also - // allow name if it exists in the old alias list but not the - // new one. - if (m_config->isScreen(newName) && - !CStringUtil::CaselessCmp::equal(newName, m_name) && - !isNameInList(oldAliases, newName)) { - showError(hwnd, CStringUtil::format( - getString(IDS_DUPLICATE_SCREEN_NAME).c_str(), - newName.c_str())); - return false; - } - - // aliases must not exist in config but allow same aliases and - // allow an alias to be the old name. - for (CStringList::const_iterator index = newAliases.begin(); - index != newAliases.end(); ++index) { - if (m_config->isScreen(*index) && - !CStringUtil::CaselessCmp::equal(*index, m_name) && - !isNameInList(oldAliases, *index)) { - showError(hwnd, CStringUtil::format( - getString(IDS_DUPLICATE_SCREEN_NAME).c_str(), - index->c_str())); - return false; - } - } - - // dead corner size must be non-negative - child = getItem(hwnd, IDC_ADD_DC_SIZE); - CString valueString = getWindowText(child); - int cornerSize = atoi(valueString.c_str()); - if (cornerSize < 0) { - showError(hwnd, CStringUtil::format( - getString(IDS_INVALID_CORNER_SIZE).c_str(), - valueString.c_str())); - SetFocus(child); - return false; - } - - // collect options - child = getItem(hwnd, IDC_ADD_HD_CAPS_CHECK); - if (isItemChecked(child)) { - options[kOptionHalfDuplexCapsLock] = 1; - } - else { - options.erase(kOptionHalfDuplexCapsLock); - } - child = getItem(hwnd, IDC_ADD_HD_NUM_CHECK); - if (isItemChecked(child)) { - options[kOptionHalfDuplexNumLock] = 1; - } - else { - options.erase(kOptionHalfDuplexNumLock); - } - child = getItem(hwnd, IDC_ADD_HD_SCROLL_CHECK); - if (isItemChecked(child)) { - options[kOptionHalfDuplexScrollLock] = 1; - } - else { - options.erase(kOptionHalfDuplexScrollLock); - } - - // save modifier options - for (UInt32 i = 0; i < sizeof(s_modifiers) / - sizeof(s_modifiers[0]); ++i) { - child = getItem(hwnd, s_modifiers[i].m_ctrlID); - KeyModifierID id = static_cast( - SendMessage(child, CB_GETCURSEL, 0, 0) + - baseModifier); - if (id != s_modifiers[i].m_modifierID) { - options[s_modifiers[i].m_optionID] = id; - } - else { - options.erase(s_modifiers[i].m_optionID); - } - } - - // save dead corner options - UInt32 corners = 0; - if (isItemChecked(getItem(hwnd, IDC_ADD_DC_TOP_LEFT))) { - corners |= kTopLeftMask; - } - if (isItemChecked(getItem(hwnd, IDC_ADD_DC_TOP_RIGHT))) { - corners |= kTopRightMask; - } - if (isItemChecked(getItem(hwnd, IDC_ADD_DC_BOTTOM_LEFT))) { - corners |= kBottomLeftMask; - } - if (isItemChecked(getItem(hwnd, IDC_ADD_DC_BOTTOM_RIGHT))) { - corners |= kBottomRightMask; - } - options[kOptionScreenSwitchCorners] = corners; - options[kOptionScreenSwitchCornerSize] = cornerSize; - - // save new data to config - if (m_name.empty()) { - // added screen - m_config->addScreen(newName); - } - else { - // edited screen - m_config->removeAliases(m_name); - m_config->removeOptions(m_name); - m_config->renameScreen(m_name, newName); - } - m_name = newName; - for (CStringList::const_iterator index = newAliases.begin(); - index != newAliases.end(); ++index) { - m_config->addAlias(m_name, *index); - } - for (CConfig::CScreenOptions::const_iterator - index = options.begin(); - index != options.end(); ++index) { - m_config->addOption(m_name, index->first, index->second); - } - - return true; -} - -BOOL -CAddScreen::doDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM) -{ - switch (message) { - case WM_INITDIALOG: - init(hwnd); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: - if (save(hwnd)) { - EndDialog(hwnd, 1); - } - return TRUE; - - case IDCANCEL: - EndDialog(hwnd, 0); - return TRUE; - } - break; - - default: - break; - } - - return FALSE; -} - -BOOL CALLBACK -CAddScreen::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - return s_singleton->doDlgProc(hwnd, message, wParam, lParam); -} - -void -CAddScreen::getAliases(CStringList& aliases) const -{ - for (CConfig::all_const_iterator index = m_config->beginAll(); - index != m_config->endAll(); ++index) { - if (CStringUtil::CaselessCmp::equal(index->second, m_name) && - !CStringUtil::CaselessCmp::equal(index->second, index->first)) { - aliases.push_back(index->first); - } - } -} - -void -CAddScreen::getOptions(CConfig::CScreenOptions& optionsOut) const -{ - const CConfig::CScreenOptions* options = m_config->getOptions(m_name); - if (options == NULL) { - optionsOut = CConfig::CScreenOptions(); - } - else { - optionsOut = *options; - } -} - -void -CAddScreen::tokenize(CStringList& tokens, const CString& src) -{ - // find first non-whitespace - CString::size_type x = src.find_first_not_of(" \t\r\n"); - if (x == CString::npos) { - return; - } - - // find next whitespace - do { - CString::size_type y = src.find_first_of(" \t\r\n", x); - if (y == CString::npos) { - y = src.size(); - } - tokens.push_back(src.substr(x, y - x)); - x = src.find_first_not_of(" \t\r\n", y); - } while (x != CString::npos); -} - -bool -CAddScreen::isNameInList(const CStringList& names, const CString& name) -{ - for (CStringList::const_iterator index = names.begin(); - index != names.end(); ++index) { - if (CStringUtil::CaselessCmp::equal(name, *index)) { - return true; - } - } - return false; -} diff --git a/cmd/launcher/CAddScreen.h b/cmd/launcher/CAddScreen.h deleted file mode 100644 index 4ab19ed0..00000000 --- a/cmd/launcher/CAddScreen.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2003 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef CADDSCREEN_H -#define CADDSCREEN_H - -#include "CString.h" - -#define WINDOWS_LEAN_AND_MEAN -#include - -class CConfig; - -//! Add screen dialog for Microsoft Windows launcher -class CAddScreen { -public: - CAddScreen(HWND parent, CConfig*, const CString& name); - ~CAddScreen(); - - //! @name manipulators - //@{ - - //! Run dialog - /*! - Display and handle the dialog until closed by the user. Return - \c true if the user accepted the changes, false otherwise. - */ - bool doModal(); - - //@} - //! @name accessors - //@{ - - CString getName() const; - - //@} - -private: - typedef std::vector CStringList; - - void getAliases(CStringList&) const; - void getOptions(CConfig::CScreenOptions&) const; - - static void tokenize(CStringList& tokens, const CString& src); - static bool isNameInList(const CStringList& tokens, - const CString& src); - - void init(HWND hwnd); - bool save(HWND hwnd); - - // message handling - BOOL doDlgProc(HWND, UINT, WPARAM, LPARAM); - static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM); - -private: - static CAddScreen* s_singleton; - - HWND m_parent; - CConfig* m_config; - CString m_name; -}; - -#endif diff --git a/cmd/launcher/CAdvancedOptions.cpp b/cmd/launcher/CAdvancedOptions.cpp deleted file mode 100644 index ccb6b4ad..00000000 --- a/cmd/launcher/CAdvancedOptions.cpp +++ /dev/null @@ -1,272 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2002 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "CConfig.h" -#include "ProtocolTypes.h" -#include "CStringUtil.h" -#include "CArch.h" -#include "CArchMiscWindows.h" -#include "CAdvancedOptions.h" -#include "LaunchUtil.h" -#include "XArch.h" -#include "resource.h" - -// -// CAdvancedOptions -// - -CAdvancedOptions* CAdvancedOptions::s_singleton = NULL; - -CAdvancedOptions::CAdvancedOptions(HWND parent, CConfig* config) : - m_parent(parent), - m_config(config), - m_isClient(false), - m_screenName(ARCH->getHostName()), - m_port(kDefaultPort), - m_interface() -{ - assert(s_singleton == NULL); - s_singleton = this; - init(); -} - -CAdvancedOptions::~CAdvancedOptions() -{ - s_singleton = NULL; -} - -void -CAdvancedOptions::doModal(bool isClient) -{ - // save state - m_isClient = isClient; - - // do dialog - DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_ADVANCED_OPTIONS), - m_parent, (DLGPROC)dlgProc, (LPARAM)this); -} - -CString -CAdvancedOptions::getScreenName() const -{ - return m_screenName; -} - -int -CAdvancedOptions::getPort() const -{ - return m_port; -} - -CString -CAdvancedOptions::getInterface() const -{ - return m_interface; -} - -CString -CAdvancedOptions::getCommandLine(bool isClient, const CString& serverName) const -{ - CString cmdLine; - - // screen name - if (!m_screenName.empty()) { - cmdLine += " --name "; - cmdLine += m_screenName; - } - - // port - char portString[20]; - sprintf(portString, "%d", m_port); - if (isClient) { - cmdLine += " "; - cmdLine += serverName; - cmdLine += ":"; - cmdLine += portString; - } - else { - cmdLine += " --address "; - if (!m_interface.empty()) { - cmdLine += m_interface; - } - cmdLine += ":"; - cmdLine += portString; - } - - return cmdLine; -} - -void -CAdvancedOptions::init() -{ - // get values from registry - HKEY key = CArchMiscWindows::openKey(HKEY_CURRENT_USER, getSettingsPath()); - if (key != NULL) { - DWORD newPort = CArchMiscWindows::readValueInt(key, "port"); - CString newName = CArchMiscWindows::readValueString(key, "name"); - CString newInterface = - CArchMiscWindows::readValueString(key, "interface"); - if (newPort != 0) { - m_port = static_cast(newPort); - } - if (!newName.empty()) { - m_screenName = newName; - } - if (!newInterface.empty()) { - m_interface = newInterface; - } - CArchMiscWindows::closeKey(key); - } -} - -void -CAdvancedOptions::doInit(HWND hwnd) -{ - // set values in GUI - HWND child; - char buffer[20]; - sprintf(buffer, "%d", m_port); - child = getItem(hwnd, IDC_ADVANCED_PORT_EDIT); - SendMessage(child, WM_SETTEXT, 0, (LPARAM)buffer); - - child = getItem(hwnd, IDC_ADVANCED_NAME_EDIT); - SendMessage(child, WM_SETTEXT, 0, (LPARAM)m_screenName.c_str()); - - child = getItem(hwnd, IDC_ADVANCED_INTERFACE_EDIT); - SendMessage(child, WM_SETTEXT, 0, (LPARAM)m_interface.c_str()); -} - -bool -CAdvancedOptions::save(HWND hwnd) -{ - SetCursor(LoadCursor(NULL, IDC_WAIT)); - - HWND child = getItem(hwnd, IDC_ADVANCED_NAME_EDIT); - CString name = getWindowText(child); - if (!m_config->isValidScreenName(name)) { - showError(hwnd, CStringUtil::format( - getString(IDS_INVALID_SCREEN_NAME).c_str(), - name.c_str())); - SetFocus(child); - return false; - } - if (!m_isClient && !m_config->isScreen(name)) { - showError(hwnd, CStringUtil::format( - getString(IDS_UNKNOWN_SCREEN_NAME).c_str(), - name.c_str())); - SetFocus(child); - return false; - } - - child = getItem(hwnd, IDC_ADVANCED_INTERFACE_EDIT); - CString iface = getWindowText(child); - if (!m_isClient) { - try { - if (!iface.empty()) { - ARCH->nameToAddr(iface); - } - } - catch (XArchNetworkName& e) { - showError(hwnd, CStringUtil::format( - getString(IDS_INVALID_INTERFACE_NAME).c_str(), - iface.c_str(), e.what().c_str())); - SetFocus(child); - return false; - } - } - - // get and verify port - child = getItem(hwnd, IDC_ADVANCED_PORT_EDIT); - CString portString = getWindowText(child); - int port = atoi(portString.c_str()); - if (port < 1 || port > 65535) { - CString defaultPortString = CStringUtil::print("%d", kDefaultPort); - showError(hwnd, CStringUtil::format( - getString(IDS_INVALID_PORT).c_str(), - portString.c_str(), - defaultPortString.c_str())); - SetFocus(child); - return false; - } - - // save state - m_screenName = name; - m_port = port; - m_interface = iface; - - // save values to registry - HKEY key = CArchMiscWindows::addKey(HKEY_CURRENT_USER, getSettingsPath()); - if (key != NULL) { - CArchMiscWindows::setValue(key, "port", m_port); - CArchMiscWindows::setValue(key, "name", m_screenName); - CArchMiscWindows::setValue(key, "interface", m_interface); - CArchMiscWindows::closeKey(key); - } - - return true; -} - -void -CAdvancedOptions::setDefaults(HWND hwnd) -{ - // restore defaults - m_screenName = ARCH->getHostName(); - m_port = kDefaultPort; - m_interface = ""; - - // update GUI - doInit(hwnd); -} - -BOOL -CAdvancedOptions::doDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM) -{ - switch (message) { - case WM_INITDIALOG: - doInit(hwnd); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: - if (save(hwnd)) { - EndDialog(hwnd, 0); - } - return TRUE; - - case IDCANCEL: - EndDialog(hwnd, 0); - return TRUE; - - case IDC_ADVANCED_DEFAULTS: - setDefaults(hwnd); - return TRUE; - } - break; - - default: - break; - } - - return FALSE; -} - -BOOL CALLBACK -CAdvancedOptions::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - return s_singleton->doDlgProc(hwnd, message, wParam, lParam); -} diff --git a/cmd/launcher/CAdvancedOptions.h b/cmd/launcher/CAdvancedOptions.h deleted file mode 100644 index 504fb733..00000000 --- a/cmd/launcher/CAdvancedOptions.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2003 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef CADVANCEDOPTIONS_H -#define CADVANCEDOPTIONS_H - -#include "CString.h" - -#define WINDOWS_LEAN_AND_MEAN -#include - -class CConfig; - -//! Advanced options dialog for Microsoft Windows launcher -class CAdvancedOptions { -public: - CAdvancedOptions(HWND parent, CConfig*); - ~CAdvancedOptions(); - - //! @name manipulators - //@{ - - //! Run dialog - /*! - Display and handle the dialog until closed by the user. - */ - void doModal(bool isClient); - - //@} - //! @name accessors - //@{ - - //! Get the screen name - CString getScreenName() const; - - //! Get the port - int getPort() const; - - //! Get the interface - CString getInterface() const; - - //! Convert options to command line string - CString getCommandLine(bool isClient, - const CString& serverName) const; - - //@} - -private: - void init(); - void doInit(HWND hwnd); - bool save(HWND hwnd); - void setDefaults(HWND hwnd); - - // message handling - BOOL doDlgProc(HWND, UINT, WPARAM, LPARAM); - static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM); - -private: - static CAdvancedOptions* s_singleton; - - HWND m_parent; - CConfig* m_config; - bool m_isClient; - CString m_screenName; - int m_port; - CString m_interface; -}; - -#endif diff --git a/cmd/launcher/CAutoStart.cpp b/cmd/launcher/CAutoStart.cpp deleted file mode 100644 index e13521f3..00000000 --- a/cmd/launcher/CAutoStart.cpp +++ /dev/null @@ -1,364 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2002 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "CLog.h" -#include "ILogOutputter.h" -#include "CArch.h" -#include "CStringUtil.h" -#include "XArch.h" -#include "CAutoStart.h" -#include "LaunchUtil.h" -#include "resource.h" - -static const char* CLIENT_DAEMON_NAME = "Synergy Client"; -static const char* SERVER_DAEMON_NAME = "Synergy Server"; -static const char* CLIENT_DAEMON_INFO = "Uses a shared mouse and keyboard."; -static const char* SERVER_DAEMON_INFO = "Shares this system's mouse and keyboard with others."; - -// -// CAutoStartOutputter -// -// This class detects a message above a certain level and saves it -// - -class CAutoStartOutputter : public ILogOutputter { -public: - CAutoStartOutputter(CString* msg) : m_msg(msg) { } - virtual ~CAutoStartOutputter() { } - - // ILogOutputter overrides - virtual void open(const char*) { } - virtual void close() { } - virtual void show(bool) { } - virtual bool write(ELevel level, const char* message); - virtual const char* getNewline() const { return ""; } - -private: - CString* m_msg; -}; - -bool -CAutoStartOutputter::write(ELevel level, const char* message) -{ - if (level <= CLog::kERROR) { - *m_msg = message; - } - return false; -} - - -// -// CAutoStart -// - -CAutoStart* CAutoStart::s_singleton = NULL; - -CAutoStart::CAutoStart(HWND parent, bool isServer, const CString& cmdLine) : - m_parent(parent), - m_isServer(isServer), - m_cmdLine(cmdLine), - m_name(isServer ? SERVER_DAEMON_NAME : CLIENT_DAEMON_NAME) -{ - assert(s_singleton == NULL); - s_singleton = this; -} - -CAutoStart::~CAutoStart() -{ - s_singleton = NULL; -} - -void -CAutoStart::doModal() -{ - // install our log outputter - CLOG->insert(new CAutoStartOutputter(&m_errorMessage)); - - // do dialog - DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_AUTOSTART), - m_parent, (DLGPROC)dlgProc, (LPARAM)this); - - // remove log outputter - CLOG->pop_front(); -} - -void -CAutoStart::reinstallDaemon(bool isClient, const CString& cmdLine) -{ - // get installation state - const char* name = (isClient ? CLIENT_DAEMON_NAME : SERVER_DAEMON_NAME); - bool installedSystem = ARCH->isDaemonInstalled(name, true); - bool installedUser = ARCH->isDaemonInstalled(name, false); - - // reinstall if anything is installed - if (installedSystem || installedUser) { - ARCH->installDaemon(name, - isClient ? CLIENT_DAEMON_INFO : SERVER_DAEMON_INFO, - getAppPath(isClient ? CLIENT_APP : SERVER_APP).c_str(), - cmdLine.c_str(), - NULL, - installedSystem); - } -} - -void -CAutoStart::uninstallDaemons(bool client) -{ - if (client) { - try { - ARCH->uninstallDaemon(CLIENT_DAEMON_NAME, true); - } - catch (...) { - } - try { - ARCH->uninstallDaemon(CLIENT_DAEMON_NAME, false); - } - catch (...) { - } - } - else { - try { - ARCH->uninstallDaemon(SERVER_DAEMON_NAME, true); - } - catch (...) { - } - try { - ARCH->uninstallDaemon(SERVER_DAEMON_NAME, false); - } - catch (...) { - } - } -} - -bool -CAutoStart::startDaemon() -{ - const char* name = NULL; - if (ARCH->isDaemonInstalled(CLIENT_DAEMON_NAME, true)) { - name = CLIENT_DAEMON_NAME; - } - else if (ARCH->isDaemonInstalled(SERVER_DAEMON_NAME, true)) { - name = SERVER_DAEMON_NAME; - } - if (name == NULL) { - return false; - } - - // open service manager - SC_HANDLE mgr = OpenSCManager(NULL, NULL, GENERIC_READ); - if (mgr == NULL) { - return false; - } - - // open the service - SC_HANDLE service = OpenService(mgr, name, SERVICE_START); - if (service == NULL) { - CloseServiceHandle(mgr); - return false; - } - - // start the service - BOOL okay = StartService(service, 0, NULL); - - // clean up - CloseServiceHandle(service); - CloseServiceHandle(mgr); - - return (okay != 0); -} - -bool -CAutoStart::isDaemonInstalled() -{ - return (ARCH->isDaemonInstalled(CLIENT_DAEMON_NAME, false) || - ARCH->isDaemonInstalled(CLIENT_DAEMON_NAME, true) || - ARCH->isDaemonInstalled(SERVER_DAEMON_NAME, false) || - ARCH->isDaemonInstalled(SERVER_DAEMON_NAME, true)); -} - -void -CAutoStart::update() -{ - // get installation state - const bool installedSystem = ARCH->isDaemonInstalled( - m_name.c_str(), true); - const bool installedUser = ARCH->isDaemonInstalled( - m_name.c_str(), false); - - // get user's permissions - const bool canInstallSystem = ARCH->canInstallDaemon( - m_name.c_str(), true); - const bool canInstallUser = ARCH->canInstallDaemon( - m_name.c_str(), false); - - // update messages - CString msg, label; - if (canInstallSystem) { - if (canInstallUser) { - msg = getString(IDS_AUTOSTART_PERMISSION_ALL); - } - else { - msg = getString(IDS_AUTOSTART_PERMISSION_SYSTEM); - } - } - else if (canInstallUser) { - msg = getString(IDS_AUTOSTART_PERMISSION_USER); - } - else { - msg = getString(IDS_AUTOSTART_PERMISSION_NONE); - } - setWindowText(getItem(m_hwnd, IDC_AUTOSTART_PERMISSION_MSG), msg); - if (installedSystem) { - msg = getString(IDS_AUTOSTART_INSTALLED_SYSTEM); - label = getString(IDS_UNINSTALL_LABEL); - } - else if (installedUser) { - msg = getString(IDS_AUTOSTART_INSTALLED_USER); - label = getString(IDS_UNINSTALL_LABEL); - } - else { - msg = getString(IDS_AUTOSTART_INSTALLED_NONE); - label = getString(IDS_INSTALL_LABEL); - } - setWindowText(getItem(m_hwnd, IDC_AUTOSTART_INSTALLED_MSG), msg); - - // update buttons - setWindowText(getItem(m_hwnd, IDC_AUTOSTART_INSTALL_SYSTEM), label); - setWindowText(getItem(m_hwnd, IDC_AUTOSTART_INSTALL_USER), label); - if (installedSystem) { - enableItem(m_hwnd, IDC_AUTOSTART_INSTALL_SYSTEM, canInstallSystem); - enableItem(m_hwnd, IDC_AUTOSTART_INSTALL_USER, false); - m_install = false; - } - else if (installedUser) { - enableItem(m_hwnd, IDC_AUTOSTART_INSTALL_SYSTEM, false); - enableItem(m_hwnd, IDC_AUTOSTART_INSTALL_USER, canInstallUser); - m_install = false; - } - else { - enableItem(m_hwnd, IDC_AUTOSTART_INSTALL_SYSTEM, canInstallSystem); - enableItem(m_hwnd, IDC_AUTOSTART_INSTALL_USER, canInstallUser); - m_install = true; - } -} - -bool -CAutoStart::onInstall(bool allUsers) -{ - if (!m_install) { - return onUninstall(allUsers); - } - - // get the app path - CString appPath = getAppPath(m_isServer ? SERVER_APP : CLIENT_APP); - - // clear error message - m_errorMessage = ""; - - // install - try { - ARCH->installDaemon(m_name.c_str(), - m_isServer ? SERVER_DAEMON_INFO : CLIENT_DAEMON_INFO, - appPath.c_str(), m_cmdLine.c_str(), - NULL, allUsers); - askOkay(m_hwnd, getString(IDS_INSTALL_TITLE), - getString(allUsers ? - IDS_INSTALLED_SYSTEM : - IDS_INSTALLED_USER)); - return true; - } - catch (XArchDaemon& e) { - if (m_errorMessage.empty()) { - m_errorMessage = CStringUtil::format( - getString(IDS_INSTALL_GENERIC_ERROR).c_str(), - e.what().c_str()); - } - showError(m_hwnd, m_errorMessage); - return false; - } -} - -bool -CAutoStart::onUninstall(bool allUsers) -{ - // clear error message - m_errorMessage = ""; - - // uninstall - try { - ARCH->uninstallDaemon(m_name.c_str(), allUsers); - askOkay(m_hwnd, getString(IDS_UNINSTALL_TITLE), - getString(allUsers ? - IDS_UNINSTALLED_SYSTEM : - IDS_UNINSTALLED_USER)); - return true; - } - catch (XArchDaemon& e) { - if (m_errorMessage.empty()) { - m_errorMessage = CStringUtil::format( - getString(IDS_UNINSTALL_GENERIC_ERROR).c_str(), - e.what().c_str()); - } - showError(m_hwnd, m_errorMessage); - return false; - } -} - -BOOL -CAutoStart::doDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM) -{ - switch (message) { - case WM_INITDIALOG: - // save our hwnd - m_hwnd = hwnd; - - // update the controls - update(); - - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDC_AUTOSTART_INSTALL_SYSTEM: - onInstall(true); - update(); - return TRUE; - - case IDC_AUTOSTART_INSTALL_USER: - onInstall(false); - update(); - return TRUE; - - case IDCANCEL: - EndDialog(hwnd, 0); - m_hwnd = NULL; - return TRUE; - } - break; - - default: - break; - } - - return FALSE; -} - -BOOL CALLBACK -CAutoStart::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - return s_singleton->doDlgProc(hwnd, message, wParam, lParam); -} diff --git a/cmd/launcher/CAutoStart.h b/cmd/launcher/CAutoStart.h deleted file mode 100644 index fc192016..00000000 --- a/cmd/launcher/CAutoStart.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2002 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef CAUTOSTART_H -#define CAUTOSTART_H - -#include "CString.h" - -#define WINDOWS_LEAN_AND_MEAN -#include - -//! Auto start dialog for Microsoft Windows launcher -class CAutoStart { -public: - CAutoStart(HWND parent, bool isServer, const CString& cmdLine); - ~CAutoStart(); - - //! @name manipulators - //@{ - - //! Run dialog - /*! - Display and handle the dialog until closed by the user. - */ - void doModal(); - - //! Reinstall daemon - /*! - Reinstalls the currently installed daemon. - */ - static void reinstallDaemon(bool isClient, const CString& cmdLine); - - //! Uninstalls daemon - /*! - Uninstalls all installed client (\p client is \c true) or server daemons. - */ - static void uninstallDaemons(bool client); - - //! Starts an installed daemon - /*! - Returns \c true iff a daemon was started. This will only start daemons - installed for all users. - */ - static bool startDaemon(); - - //@} - //! @name accessors - //@{ - - //! Tests if any daemons are installed - /*! - Returns \c true if any daemons are installed. - */ - static bool isDaemonInstalled(); - - //@} - -private: - void update(); - bool onInstall(bool allUsers); - bool onUninstall(bool allUsers); - - // message handling - BOOL doDlgProc(HWND, UINT, WPARAM, LPARAM); - static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM); - -private: - static CAutoStart* s_singleton; - - HWND m_parent; - bool m_isServer; - CString m_cmdLine; - CString m_name; - HWND m_hwnd; - bool m_install; - CString m_errorMessage; -}; - -#endif diff --git a/cmd/launcher/CGlobalOptions.cpp b/cmd/launcher/CGlobalOptions.cpp deleted file mode 100644 index 2e007884..00000000 --- a/cmd/launcher/CGlobalOptions.cpp +++ /dev/null @@ -1,317 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2002 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "CConfig.h" -#include "ProtocolTypes.h" -#include "CStringUtil.h" -#include "CArch.h" -#include "CGlobalOptions.h" -#include "LaunchUtil.h" -#include "resource.h" - -static const int s_defaultDelay = 250; -static const int s_defaultHeartbeat = 5000; - -// -// CGlobalOptions -// - -CGlobalOptions* CGlobalOptions::s_singleton = NULL; - -CGlobalOptions::CGlobalOptions(HWND parent, CConfig* config) : - m_parent(parent), - m_config(config), - m_delayTime(s_defaultDelay), - m_twoTapTime(s_defaultDelay), - m_heartbeatTime(s_defaultHeartbeat) -{ - assert(s_singleton == NULL); - s_singleton = this; -} - -CGlobalOptions::~CGlobalOptions() -{ - s_singleton = NULL; -} - -void -CGlobalOptions::doModal() -{ - // do dialog - DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_GLOBAL_OPTIONS), - m_parent, (DLGPROC)dlgProc, (LPARAM)this); -} - -void -CGlobalOptions::init(HWND hwnd) -{ - HWND child; - char buffer[30]; - - // reset options - sprintf(buffer, "%d", m_delayTime); - child = getItem(hwnd, IDC_GLOBAL_DELAY_CHECK); - setItemChecked(child, false); - child = getItem(hwnd, IDC_GLOBAL_DELAY_TIME); - setWindowText(child, buffer); - sprintf(buffer, "%d", m_twoTapTime); - child = getItem(hwnd, IDC_GLOBAL_TWO_TAP_CHECK); - setItemChecked(child, false); - child = getItem(hwnd, IDC_GLOBAL_TWO_TAP_TIME); - setWindowText(child, buffer); - child = getItem(hwnd, IDC_GLOBAL_NEEDS_SHIFT); - setItemChecked(child, false); - child = getItem(hwnd, IDC_GLOBAL_NEEDS_CONTROL); - setItemChecked(child, false); - child = getItem(hwnd, IDC_GLOBAL_NEEDS_ALT); - setItemChecked(child, false); - sprintf(buffer, "%d", m_heartbeatTime); - child = getItem(hwnd, IDC_GLOBAL_HEARTBEAT_CHECK); - setItemChecked(child, false); - child = getItem(hwnd, IDC_GLOBAL_HEARTBEAT_TIME); - setWindowText(child, buffer); - child = getItem(hwnd, IDC_GLOBAL_SCREENSAVER_SYNC); - setItemChecked(child, true); - child = getItem(hwnd, IDC_GLOBAL_RELATIVE_MOVES); - setItemChecked(child, false); - child = getItem(hwnd, IDC_GLOBAL_LEAVE_FOREGROUND); - setItemChecked(child, false); - - // get the global options - const CConfig::CScreenOptions* options = m_config->getOptions(""); - if (options != NULL) { - for (CConfig::CScreenOptions::const_iterator index = options->begin(); - index != options->end(); ++index) { - const OptionID id = index->first; - const OptionValue value = index->second; - if (id == kOptionScreenSwitchDelay) { - if (value > 0) { - sprintf(buffer, "%d", value); - child = getItem(hwnd, IDC_GLOBAL_DELAY_CHECK); - setItemChecked(child, true); - child = getItem(hwnd, IDC_GLOBAL_DELAY_TIME); - setWindowText(child, buffer); - } - } - else if (id == kOptionScreenSwitchTwoTap) { - if (value > 0) { - sprintf(buffer, "%d", value); - child = getItem(hwnd, IDC_GLOBAL_TWO_TAP_CHECK); - setItemChecked(child, true); - child = getItem(hwnd, IDC_GLOBAL_TWO_TAP_TIME); - setWindowText(child, buffer); - } - } - else if (id == kOptionScreenSwitchNeedsShift) { - child = getItem(hwnd, IDC_GLOBAL_NEEDS_SHIFT); - setItemChecked(child, (value != 0)); - } - else if (id == kOptionScreenSwitchNeedsControl) { - child = getItem(hwnd, IDC_GLOBAL_NEEDS_CONTROL); - setItemChecked(child, (value != 0)); - } - else if (id == kOptionScreenSwitchNeedsAlt) { - child = getItem(hwnd, IDC_GLOBAL_NEEDS_ALT); - setItemChecked(child, (value != 0)); - } - else if (id == kOptionHeartbeat) { - if (value > 0) { - sprintf(buffer, "%d", value); - child = getItem(hwnd, IDC_GLOBAL_HEARTBEAT_CHECK); - setItemChecked(child, true); - child = getItem(hwnd, IDC_GLOBAL_HEARTBEAT_TIME); - setWindowText(child, buffer); - } - } - else if (id == kOptionScreenSaverSync) { - child = getItem(hwnd, IDC_GLOBAL_SCREENSAVER_SYNC); - setItemChecked(child, (value != 0)); - } - else if (id == kOptionRelativeMouseMoves) { - child = getItem(hwnd, IDC_GLOBAL_RELATIVE_MOVES); - setItemChecked(child, (value != 0)); - } - else if (id == kOptionWin32KeepForeground) { - child = getItem(hwnd, IDC_GLOBAL_LEAVE_FOREGROUND); - setItemChecked(child, (value != 0)); - } - } - } -} - -bool -CGlobalOptions::save(HWND hwnd) -{ - HWND child; - int newDelayTime = 0; - int newTwoTapTime = 0; - int newHeartbeatTime = 0; - - // get requested options - child = getItem(hwnd, IDC_GLOBAL_DELAY_CHECK); - if (isItemChecked(child)) { - child = getItem(hwnd, IDC_GLOBAL_DELAY_TIME); - newDelayTime = getTime(hwnd, child, true); - if (newDelayTime == 0) { - return false; - } - } - else { - child = getItem(hwnd, IDC_GLOBAL_DELAY_TIME); - newDelayTime = getTime(hwnd, child, false); - if (newDelayTime == 0) { - newDelayTime = s_defaultDelay; - } - } - child = getItem(hwnd, IDC_GLOBAL_TWO_TAP_CHECK); - if (isItemChecked(child)) { - child = getItem(hwnd, IDC_GLOBAL_TWO_TAP_TIME); - newTwoTapTime = getTime(hwnd, child, true); - if (newTwoTapTime == 0) { - return false; - } - } - else { - child = getItem(hwnd, IDC_GLOBAL_TWO_TAP_TIME); - newTwoTapTime = getTime(hwnd, child, false); - if (newTwoTapTime == 0) { - newTwoTapTime = s_defaultDelay; - } - } - child = getItem(hwnd, IDC_GLOBAL_HEARTBEAT_CHECK); - if (isItemChecked(child)) { - child = getItem(hwnd, IDC_GLOBAL_HEARTBEAT_TIME); - newHeartbeatTime = getTime(hwnd, child, true); - if (newHeartbeatTime == 0) { - return false; - } - } - else { - child = getItem(hwnd, IDC_GLOBAL_HEARTBEAT_TIME); - newHeartbeatTime = getTime(hwnd, child, false); - if (newHeartbeatTime == 0) { - newHeartbeatTime = s_defaultHeartbeat; - } - } - - // remove existing config options - m_config->removeOption("", kOptionScreenSwitchDelay); - m_config->removeOption("", kOptionScreenSwitchTwoTap); - m_config->removeOption("", kOptionHeartbeat); - m_config->removeOption("", kOptionScreenSaverSync); - m_config->removeOption("", kOptionRelativeMouseMoves); - m_config->removeOption("", kOptionWin32KeepForeground); - m_config->removeOption("", kOptionScreenSwitchNeedsAlt); - m_config->removeOption("", kOptionScreenSwitchNeedsShift); - m_config->removeOption("", kOptionScreenSwitchNeedsControl); - - // add requested options - child = getItem(hwnd, IDC_GLOBAL_DELAY_CHECK); - if (isItemChecked(child)) { - m_config->addOption("", kOptionScreenSwitchDelay, newDelayTime); - } - child = getItem(hwnd, IDC_GLOBAL_TWO_TAP_CHECK); - if (isItemChecked(child)) { - m_config->addOption("", kOptionScreenSwitchTwoTap, newTwoTapTime); - } - child = getItem(hwnd, IDC_GLOBAL_NEEDS_SHIFT); - if (isItemChecked(child)) { - m_config->addOption("", kOptionScreenSwitchNeedsShift, 1); - } - child = getItem(hwnd, IDC_GLOBAL_NEEDS_CONTROL); - if (isItemChecked(child)) { - m_config->addOption("", kOptionScreenSwitchNeedsControl, 1); - } - child = getItem(hwnd, IDC_GLOBAL_NEEDS_ALT); - if (isItemChecked(child)) { - m_config->addOption("", kOptionScreenSwitchNeedsAlt, 1); - } - child = getItem(hwnd, IDC_GLOBAL_HEARTBEAT_CHECK); - if (isItemChecked(child)) { - m_config->addOption("", kOptionHeartbeat, newHeartbeatTime); - } - child = getItem(hwnd, IDC_GLOBAL_SCREENSAVER_SYNC); - if (!isItemChecked(child)) { - m_config->addOption("", kOptionScreenSaverSync, 0); - } - child = getItem(hwnd, IDC_GLOBAL_RELATIVE_MOVES); - if (isItemChecked(child)) { - m_config->addOption("", kOptionRelativeMouseMoves, 1); - } - child = getItem(hwnd, IDC_GLOBAL_LEAVE_FOREGROUND); - if (isItemChecked(child)) { - m_config->addOption("", kOptionWin32KeepForeground, 1); - } - - // save last values - m_delayTime = newDelayTime; - m_twoTapTime = newTwoTapTime; - m_heartbeatTime = newHeartbeatTime; - return true; -} - -int -CGlobalOptions::getTime(HWND hwnd, HWND child, bool reportError) -{ - CString valueString = getWindowText(child); - int value = atoi(valueString.c_str()); - if (value < 1) { - if (reportError) { - showError(hwnd, CStringUtil::format( - getString(IDS_INVALID_TIME).c_str(), - valueString.c_str())); - SetFocus(child); - } - return 0; - } - return value; -} - -BOOL -CGlobalOptions::doDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM) -{ - switch (message) { - case WM_INITDIALOG: - init(hwnd); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: - if (save(hwnd)) { - EndDialog(hwnd, 0); - } - return TRUE; - - case IDCANCEL: - EndDialog(hwnd, 0); - return TRUE; - } - break; - - default: - break; - } - - return FALSE; -} - -BOOL CALLBACK -CGlobalOptions::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - return s_singleton->doDlgProc(hwnd, message, wParam, lParam); -} diff --git a/cmd/launcher/CGlobalOptions.h b/cmd/launcher/CGlobalOptions.h deleted file mode 100644 index f1423353..00000000 --- a/cmd/launcher/CGlobalOptions.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2003 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef CGLOBALOPTIONS_H -#define CGLOBALOPTIONS_H - -#include "CString.h" - -#define WINDOWS_LEAN_AND_MEAN -#include - -class CConfig; - -//! Global options dialog for Microsoft Windows launcher -class CGlobalOptions { -public: - CGlobalOptions(HWND parent, CConfig*); - ~CGlobalOptions(); - - //! @name manipulators - //@{ - - //! Run dialog - /*! - Display and handle the dialog until closed by the user. - */ - void doModal(); - - //@} - //! @name accessors - //@{ - - - //@} - -private: - void init(HWND hwnd); - bool save(HWND hwnd); - - int getTime(HWND hwnd, HWND child, bool reportError); - - // message handling - BOOL doDlgProc(HWND, UINT, WPARAM, LPARAM); - static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM); - -private: - static CGlobalOptions* s_singleton; - - HWND m_parent; - CConfig* m_config; - int m_delayTime; - int m_twoTapTime; - int m_heartbeatTime; -}; - -#endif diff --git a/cmd/launcher/CHotkeyOptions.cpp b/cmd/launcher/CHotkeyOptions.cpp deleted file mode 100644 index ea0c1f4c..00000000 --- a/cmd/launcher/CHotkeyOptions.cpp +++ /dev/null @@ -1,1955 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2006 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "CArchMiscWindows.h" -#include "CMSWindowsKeyState.h" -#include "CConfig.h" -#include "CHotkeyOptions.h" -#include "CStringUtil.h" -#include "CLog.h" -#include "LaunchUtil.h" -#include "resource.h" - -#if !defined(WM_XBUTTONDOWN) -#define WM_XBUTTONDOWN 0x020B -#define WM_XBUTTONUP 0x020C -#define WM_XBUTTONDBLCLK 0x020D -#define XBUTTON1 0x0001 -#define XBUTTON2 0x0002 -#endif - -// -// CAdvancedOptions -// - -CHotkeyOptions* CHotkeyOptions::s_singleton = NULL; - -CHotkeyOptions::CHotkeyOptions(HWND parent, CConfig* config) : - m_parent(parent), - m_config(config) -{ - assert(s_singleton == NULL); - s_singleton = this; -} - -CHotkeyOptions::~CHotkeyOptions() -{ - s_singleton = NULL; -} - -void -CHotkeyOptions::doModal() -{ - // do dialog - m_inputFilter = m_config->getInputFilter(); - DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_HOTKEY_OPTIONS), - m_parent, (DLGPROC)dlgProc, (LPARAM)this); -} - -void -CHotkeyOptions::doInit(HWND hwnd) -{ - m_activeRuleIndex = (UInt32)-1; - fillHotkeys(hwnd); - openRule(hwnd); -} - -void -CHotkeyOptions::fillHotkeys(HWND hwnd, UInt32 select) -{ - HWND rules = getItem(hwnd, IDC_HOTKEY_HOTKEYS); - - SendMessage(rules, LB_RESETCONTENT, 0, 0); - for (UInt32 i = 0, n = m_inputFilter->getNumRules(); i < n; ++i) { - CInputFilter::CRule& rule = m_inputFilter->getRule(i); - SendMessage(rules, LB_INSERTSTRING, (WPARAM)-1, - (LPARAM)rule.getCondition()->format().c_str()); - } - - if (select < m_inputFilter->getNumRules()) { - SendMessage(rules, LB_SETCURSEL, select, 0); - } - - updateHotkeysControls(hwnd); -} - -void -CHotkeyOptions::updateHotkeysControls(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_HOTKEYS); - bool selected = (SendMessage(child, LB_GETCURSEL, 0, 0) != LB_ERR); - - enableItem(hwnd, IDC_HOTKEY_ADD_HOTKEY, TRUE); - enableItem(hwnd, IDC_HOTKEY_EDIT_HOTKEY, selected); - enableItem(hwnd, IDC_HOTKEY_REMOVE_HOTKEY, selected); -} - -void -CHotkeyOptions::addHotkey(HWND hwnd) -{ - closeRule(hwnd); - CInputFilter::CCondition* condition = NULL; - if (editCondition(hwnd, condition)) { - m_inputFilter->addFilterRule(CInputFilter::CRule(condition)); - fillHotkeys(hwnd, m_inputFilter->getNumRules() - 1); - } - else { - delete condition; - } - openRule(hwnd); -} - -void -CHotkeyOptions::removeHotkey(HWND hwnd) -{ - UInt32 ruleIndex = m_activeRuleIndex; - closeRule(hwnd); - - m_inputFilter->removeFilterRule(ruleIndex); - UInt32 n = m_inputFilter->getNumRules(); - if (n > 0 && ruleIndex >= n) { - ruleIndex = n - 1; - } - fillHotkeys(hwnd, ruleIndex); - - openRule(hwnd); -} - -void -CHotkeyOptions::editHotkey(HWND hwnd) -{ - // save selected item in action list - HWND actions = getItem(hwnd, IDC_HOTKEY_ACTIONS); - LRESULT aIndex = SendMessage(actions, LB_GETCURSEL, 0, 0); - - UInt32 index = m_activeRuleIndex; - closeRule(hwnd); - - CInputFilter::CRule& rule = m_inputFilter->getRule(index); - CInputFilter::CCondition* condition = rule.getCondition()->clone(); - if (editCondition(hwnd, condition)) { - rule.setCondition(condition); - fillHotkeys(hwnd, index); - } - else { - delete condition; - } - - openRule(hwnd); - - // restore selected item in action list - if (aIndex != LB_ERR) { - SendMessage(actions, LB_SETCURSEL, aIndex, 0); - } -} - -void -CHotkeyOptions::fillActions(HWND hwnd, UInt32 select) -{ - HWND actions = getItem(hwnd, IDC_HOTKEY_ACTIONS); - SendMessage(actions, LB_RESETCONTENT, 0, 0); - if (m_activeRuleIndex != (UInt32)-1) { - UInt32 n = m_activeRule.getNumActions(true); - UInt32 n2 = m_activeRule.getNumActions(false); - for (UInt32 i = 0; i < n; ++i) { - const CInputFilter::CAction& action = - m_activeRule.getAction(true, i); - CString line("A "); - line += action.format(); - SendMessage(actions, LB_INSERTSTRING, (WPARAM)-1, - (LPARAM)line.c_str()); - SendMessage(actions, LB_SETITEMDATA, (WPARAM)i, (LPARAM)i); - } - for (UInt32 i = 0; i < n2; ++i) { - const CInputFilter::CAction& action = - m_activeRule.getAction(false, i); - CString line("D "); - line += action.format(); - SendMessage(actions, LB_INSERTSTRING, (WPARAM)-1, - (LPARAM)line.c_str()); - SendMessage(actions, LB_SETITEMDATA, (WPARAM)i + n, - (LPARAM)(i | 0x80000000u)); - } - - if (select < n + n2) { - SendMessage(actions, LB_SETCURSEL, select, 0); - } - } - - updateActionsControls(hwnd); -} - -void -CHotkeyOptions::updateActionsControls(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_HOTKEYS); - bool active = (m_activeRuleIndex != (UInt32)-1); - - child = getItem(hwnd, IDC_HOTKEY_ACTIONS); - bool selected = - (active && (SendMessage(child, LB_GETCURSEL, 0, 0) != LB_ERR)); - - enableItem(hwnd, IDC_HOTKEY_ADD_ACTION, active); - enableItem(hwnd, IDC_HOTKEY_EDIT_ACTION, selected); - enableItem(hwnd, IDC_HOTKEY_REMOVE_ACTION, selected); -} - -void -CHotkeyOptions::addAction(HWND hwnd) -{ - CInputFilter::CAction* action = NULL; - bool onActivate = true; - if (editAction(hwnd, action, onActivate)) { - m_activeRule.adoptAction(action, onActivate); - - UInt32 actionIndex = m_activeRule.getNumActions(true) - 1; - if (!onActivate) { - actionIndex += m_activeRule.getNumActions(false); - } - fillActions(hwnd, actionIndex); - } - else { - delete action; - } -} - -void -CHotkeyOptions::removeAction(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_ACTIONS); - LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0); - if (index != LB_ERR) { - UInt32 actionIndex = - (UInt32)SendMessage(child, LB_GETITEMDATA, index, 0); - bool onActivate = ((actionIndex & 0x80000000u) == 0); - actionIndex &= ~0x80000000u; - - m_activeRule.removeAction(onActivate, actionIndex); - - actionIndex = static_cast(index); - UInt32 n = m_activeRule.getNumActions(true) + - m_activeRule.getNumActions(false); - if (n > 0 && actionIndex >= n) { - actionIndex = n - 1; - } - fillActions(hwnd, actionIndex); - } -} - -void -CHotkeyOptions::editAction(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_ACTIONS); - LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0); - if (index != LB_ERR) { - UInt32 actionIndex = - (UInt32)SendMessage(child, LB_GETITEMDATA, index, 0); - bool onActivate = ((actionIndex & 0x80000000u) == 0); - actionIndex &= ~0x80000000u; - - CInputFilter::CAction* action = - m_activeRule.getAction(onActivate, actionIndex).clone(); - bool newOnActivate = onActivate; - if (editAction(hwnd, action, newOnActivate)) { - if (onActivate == newOnActivate) { - m_activeRule.replaceAction(action, onActivate, actionIndex); - actionIndex = static_cast(index); - } - else { - m_activeRule.removeAction(onActivate, actionIndex); - m_activeRule.adoptAction(action, newOnActivate); - actionIndex = m_activeRule.getNumActions(true) - 1; - if (!newOnActivate) { - actionIndex += m_activeRule.getNumActions(false); - } - } - fillActions(hwnd, actionIndex); - } - else { - delete action; - } - } -} - -bool -CHotkeyOptions::editCondition(HWND hwnd, CInputFilter::CCondition*& condition) -{ - return CConditionDialog::doModal(hwnd, condition); -} - -bool -CHotkeyOptions::editAction(HWND hwnd, CInputFilter::CAction*& action, - bool& onActivate) -{ - return CActionDialog::doModal(hwnd, m_config, action, onActivate); -} - -void -CHotkeyOptions::openRule(HWND hwnd) -{ - // get the active rule and copy it, merging down/up pairs of keystroke - // and mouse button actions into single actions for the convenience of - // of the user. - HWND rules = getItem(hwnd, IDC_HOTKEY_HOTKEYS); - LRESULT index = SendMessage(rules, LB_GETCURSEL, 0, 0); - if (index != LB_ERR) { - // copy the rule as is - m_activeRuleIndex = (SInt32)index; - m_activeRule = m_inputFilter->getRule(m_activeRuleIndex); - - // look for actions to combine - for (UInt32 i = 0, n = m_activeRule.getNumActions(true); i < n; ++i) { - // get next activate action - const CInputFilter::CAction* action = - &m_activeRule.getAction(true, i); - - // check if it's a key or mouse action - const CInputFilter::CKeystrokeAction* keyAction = - dynamic_cast(action); - const CInputFilter::CMouseButtonAction* mouseAction = - dynamic_cast(action); - if (keyAction == NULL && mouseAction == NULL) { - continue; - } - - // check for matching deactivate action - UInt32 j = (UInt32)-1; - CInputFilter::CAction* newAction = NULL; - if (keyAction != NULL) { - j = findMatchingAction(keyAction); - if (j != (UInt32)-1) { - // found a match - const IPlatformScreen::CKeyInfo* oldInfo = - keyAction->getInfo(); - IPlatformScreen::CKeyInfo* newInfo = - IKeyState::CKeyInfo::alloc(*oldInfo); - newAction = new CKeystrokeDownUpAction(newInfo); - } - } - else if (mouseAction != NULL) { - j = findMatchingAction(mouseAction); - if (j != (UInt32)-1) { - // found a match - const IPlatformScreen::CButtonInfo* oldInfo = - mouseAction->getInfo(); - IPlatformScreen::CButtonInfo* newInfo = - IPrimaryScreen::CButtonInfo::alloc(*oldInfo); - newAction = new CMouseButtonDownUpAction(newInfo); - } - } - - // perform merge - if (newAction != NULL) { - m_activeRule.replaceAction(newAction, true, i); - m_activeRule.removeAction(false, j); - } - } - } - else { - m_activeRuleIndex = (UInt32)-1; - } - fillActions(hwnd); -} - -void -CHotkeyOptions::closeRule(HWND) -{ - // copy rule back to input filter, expanding merged actions into the - // two component actions. - if (m_activeRuleIndex != (UInt32)-1) { - // expand merged rules - for (UInt32 i = 0, n = m_activeRule.getNumActions(true); i < n; ++i) { - // get action - const CInputFilter::CAction* action = - &m_activeRule.getAction(true, i); - - // check if it's a merged key or mouse action - const CKeystrokeDownUpAction* keyAction = - dynamic_cast(action); - const CMouseButtonDownUpAction* mouseAction = - dynamic_cast(action); - if (keyAction == NULL && mouseAction == NULL) { - continue; - } - - // expand - if (keyAction != NULL) { - const IPlatformScreen::CKeyInfo* oldInfo = - keyAction->getInfo(); - IPlatformScreen::CKeyInfo* newInfo = - IKeyState::CKeyInfo::alloc(*oldInfo); - CInputFilter::CKeystrokeAction* downAction = - new CInputFilter::CKeystrokeAction(newInfo, true); - newInfo = IKeyState::CKeyInfo::alloc(*oldInfo); - CInputFilter::CKeystrokeAction* upAction = - new CInputFilter::CKeystrokeAction(newInfo, false); - m_activeRule.replaceAction(downAction, true, i); - m_activeRule.adoptAction(upAction, false); - } - else if (mouseAction != NULL) { - const IPlatformScreen::CButtonInfo* oldInfo = - mouseAction->getInfo(); - IPlatformScreen::CButtonInfo* newInfo = - IPrimaryScreen::CButtonInfo::alloc(*oldInfo); - CInputFilter::CMouseButtonAction* downAction = - new CInputFilter::CMouseButtonAction(newInfo, true); - newInfo = IPrimaryScreen::CButtonInfo::alloc(*oldInfo); - CInputFilter::CMouseButtonAction* upAction = - new CInputFilter::CMouseButtonAction(newInfo, false); - m_activeRule.replaceAction(downAction, true, i); - m_activeRule.adoptAction(upAction, false); - } - } - - // copy it back - m_inputFilter->getRule(m_activeRuleIndex) = m_activeRule; - } - m_activeRuleIndex = (UInt32)-1; -} - -UInt32 -CHotkeyOptions::findMatchingAction( - const CInputFilter::CKeystrokeAction* src) const -{ - for (UInt32 i = 0, n = m_activeRule.getNumActions(false); i < n; ++i) { - const CInputFilter::CKeystrokeAction* dst = - dynamic_cast( - &m_activeRule.getAction(false, i)); - if (dst != NULL && - IKeyState::CKeyInfo::equal(src->getInfo(), dst->getInfo())) { - return i; - } - } - return (UInt32)-1; -} - -UInt32 -CHotkeyOptions::findMatchingAction( - const CInputFilter::CMouseButtonAction* src) const -{ - for (UInt32 i = 0, n = m_activeRule.getNumActions(false); i < n; ++i) { - const CInputFilter::CMouseButtonAction* dst = - dynamic_cast( - &m_activeRule.getAction(false, i)); - if (dst != NULL && - IPrimaryScreen::CButtonInfo::equal( - src->getInfo(), dst->getInfo())) { - return i; - } - } - return (UInt32)-1; -} - -BOOL -CHotkeyOptions::doDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM) -{ - switch (message) { - case WM_INITDIALOG: - doInit(hwnd); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: - case IDCANCEL: - closeRule(hwnd); - EndDialog(hwnd, 0); - return TRUE; - - case IDC_HOTKEY_HOTKEYS: - switch (HIWORD(wParam)) { - case LBN_DBLCLK: - editHotkey(hwnd); - return TRUE; - - case LBN_SELCHANGE: { - HWND rules = getItem(hwnd, IDC_HOTKEY_HOTKEYS); - LRESULT index = SendMessage(rules, LB_GETCURSEL, 0, 0); - if (m_activeRuleIndex != (UInt32)index) { - closeRule(hwnd); - updateHotkeysControls(hwnd); - openRule(hwnd); - } - return TRUE; - } - } - break; - - case IDC_HOTKEY_ADD_HOTKEY: - addHotkey(hwnd); - return TRUE; - - case IDC_HOTKEY_REMOVE_HOTKEY: - removeHotkey(hwnd); - return TRUE; - - case IDC_HOTKEY_EDIT_HOTKEY: - editHotkey(hwnd); - return TRUE; - - case IDC_HOTKEY_ACTIONS: - switch (HIWORD(wParam)) { - case LBN_DBLCLK: - editAction(hwnd); - return TRUE; - - case LBN_SELCHANGE: - updateActionsControls(hwnd); - return TRUE; - } - break; - - case IDC_HOTKEY_ADD_ACTION: - addAction(hwnd); - return TRUE; - - case IDC_HOTKEY_REMOVE_ACTION: - removeAction(hwnd); - return TRUE; - - case IDC_HOTKEY_EDIT_ACTION: - editAction(hwnd); - return TRUE; - } - break; - - default: - break; - } - - return FALSE; -} - -BOOL CALLBACK -CHotkeyOptions::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - return s_singleton->doDlgProc(hwnd, message, wParam, lParam); -} - - -// -// CHotkeyOptions::CConditionDialog -// - -CInputFilter::CCondition* - CHotkeyOptions::CConditionDialog::s_condition = NULL; -CInputFilter::CCondition* - CHotkeyOptions::CConditionDialog::s_lastGoodCondition = NULL; -WNDPROC CHotkeyOptions::CConditionDialog::s_editWndProc = NULL; - -bool -CHotkeyOptions::CConditionDialog::doModal(HWND parent, - CInputFilter::CCondition*& condition) -{ - s_condition = condition; - if (s_condition != NULL) { - s_lastGoodCondition = s_condition->clone(); - } - else { - s_lastGoodCondition = NULL; - } - int n = (int)DialogBox(s_instance, MAKEINTRESOURCE(IDD_HOTKEY_CONDITION), - parent, (DLGPROC) dlgProc); - - condition = s_condition; - delete s_lastGoodCondition; - s_condition = NULL; - s_lastGoodCondition = NULL; - - // user effectively cancelled if the condition is NULL - if (condition == NULL) { - n = 0; - } - - return (n == 1); -} - -void -CHotkeyOptions::CConditionDialog::doInit(HWND hwnd) -{ - // subclass edit control - HWND child = getItem(hwnd, IDC_HOTKEY_CONDITION_HOTKEY); - s_editWndProc = (WNDPROC)GetWindowLongPtr(child, GWLP_WNDPROC); - SetWindowLongPtr(child, GWLP_WNDPROC, (LONG_PTR) editProc); - - // fill control - fillHotkey(hwnd); -} - -void -CHotkeyOptions::CConditionDialog::fillHotkey(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_CONDITION_HOTKEY); - if (s_condition != NULL) { - setWindowText(child, s_condition->format().c_str()); - } - else { - setWindowText(child, ""); - } -} - -void -CHotkeyOptions::CConditionDialog::onButton(HWND hwnd, ButtonID button) -{ - delete s_condition; - s_condition = - new CInputFilter::CMouseButtonCondition(button, getModifiers()); - - fillHotkey(GetParent(hwnd)); -} - -void -CHotkeyOptions::CConditionDialog::onKey(HWND hwnd, WPARAM wParam, LPARAM lParam) -{ - // ignore key repeats - if ((lParam & 0xc0000000u) == 0x40000000u) { - return; - } - - // ignore key releases if the condition is complete and for the tab - // key (in case we were just tabbed to) - if ((lParam & 0x80000000u) != 0) { - if (isGoodCondition() || wParam == VK_TAB) { - return; - } - } - - KeyID key = kKeyNone; - KeyModifierMask mask = getModifiers(); - switch (wParam) { - case VK_SHIFT: - case VK_LSHIFT: - case VK_RSHIFT: - case VK_CONTROL: - case VK_LCONTROL: - case VK_RCONTROL: - case VK_MENU: - case VK_LMENU: - case VK_RMENU: - case VK_LWIN: - case VK_RWIN: - break; - - case VK_TAB: - // allow tabbing out of control - if ((mask & (KeyModifierControl | - KeyModifierAlt | KeyModifierSuper)) == 0) { - HWND next = hwnd; - if ((mask & KeyModifierShift) == 0) { - do { - next = GetWindow(next, GW_HWNDNEXT); - if (next == NULL) { - next = GetWindow(hwnd, GW_HWNDFIRST); - } - } while (next != hwnd && - (!IsWindowVisible(next) || - (GetWindowLong(next, GWL_STYLE) & WS_TABSTOP) == 0)); - } - else { - do { - next = GetWindow(next, GW_HWNDPREV); - if (next == NULL) { - next = GetWindow(hwnd, GW_HWNDLAST); - } - } while (next != hwnd && - (!IsWindowVisible(next) || - (GetWindowLong(next, GWL_STYLE) & WS_TABSTOP) == 0)); - } - SetFocus(next); - return; - } - // fall through - - default: - key = CMSWindowsKeyState::getKeyID((UINT)wParam, - static_cast((lParam & 0x1ff0000u) >> 16)); - switch (key) { - case kKeyNone: - // could be a character - key = getChar(wParam, lParam); - if (key == kKeyNone) { - return; - } - break; - - case kKeyShift_L: - case kKeyShift_R: - case kKeyControl_L: - case kKeyControl_R: - case kKeyAlt_L: - case kKeyAlt_R: - case kKeyMeta_L: - case kKeyMeta_R: - case kKeySuper_L: - case kKeySuper_R: - case kKeyCapsLock: - case kKeyNumLock: - case kKeyScrollLock: - // bogus - return; - } - break; - } - - delete s_condition; - s_condition = new CInputFilter::CKeystrokeCondition(key, mask); - - fillHotkey(GetParent(hwnd)); -} - -KeyID -CHotkeyOptions::CConditionDialog::getChar(WPARAM wParam, LPARAM lParam) -{ - BYTE keyState[256]; - UINT virtualKey = (UINT)wParam; - UINT scanCode = (UINT)((lParam & 0x0ff0000u) >> 16); - if (!GetKeyboardState(keyState)) { - LOG((CLOG_WARN "GetKeyboardState failed on CHotkeyOptions::CConditionDialog::getChar")); - return kKeyNone; - } - - // reset modifier state - keyState[VK_SHIFT] = 0; - keyState[VK_LSHIFT] = 0; - keyState[VK_RSHIFT] = 0; - keyState[VK_CONTROL] = 0; - keyState[VK_LCONTROL] = 0; - keyState[VK_RCONTROL] = 0; - keyState[VK_MENU] = 0; - keyState[VK_LMENU] = 0; - keyState[VK_RMENU] = 0; - keyState[VK_LWIN] = 0; - keyState[VK_RWIN] = 0; - - // translate virtual key to character - int n; - KeyID id = kKeyNone; - if (CArchMiscWindows::isWindows95Family()) { - // XXX -- how do we get characters not in Latin-1? - WORD ascii; - n = ToAscii(virtualKey, scanCode, keyState, &ascii, 0); - id = static_cast(ascii & 0xffu); - } - else { - typedef int (WINAPI *ToUnicode_t)(UINT wVirtKey, - UINT wScanCode, - PBYTE lpKeyState, - LPWSTR pwszBuff, - int cchBuff, - UINT wFlags); - ToUnicode_t s_ToUnicode = NULL; - if (s_ToUnicode == NULL) { - HMODULE userModule = GetModuleHandle("user32.dll"); - if(userModule == NULL) { - LOG((CLOG_ERR "GetModuleHandle(\"user32.dll\") returned NULL")); - return kKeyNone; - } - s_ToUnicode = - (ToUnicode_t)GetProcAddress(userModule, "ToUnicode"); - } - - WCHAR unicode[2]; - n = s_ToUnicode(virtualKey, scanCode, keyState, - unicode, sizeof(unicode) / sizeof(unicode[0]), - 0); - id = static_cast(unicode[0]); - } - switch (n) { - case -1: - // no hot keys on dead keys - return kKeyNone; - - default: - case 0: - // unmapped - return kKeyNone; - - case 1: - return id; - } -} - -KeyModifierMask -CHotkeyOptions::CConditionDialog::getModifiers() -{ - KeyModifierMask mask = 0; - if ((GetKeyState(VK_SHIFT) & 0x8000) != 0) { - mask |= KeyModifierShift; - } - if ((GetKeyState(VK_CONTROL) & 0x8000) != 0) { - mask |= KeyModifierControl; - } - if ((GetKeyState(VK_MENU) & 0x8000) != 0) { - mask |= KeyModifierAlt; - } - if ((GetKeyState(VK_LWIN) & 0x8000) != 0 || - (GetKeyState(VK_RWIN) & 0x8000) != 0) { - mask |= KeyModifierSuper; - } - return mask; -} - -bool -CHotkeyOptions::CConditionDialog::isGoodCondition() -{ - CInputFilter::CKeystrokeCondition* keyCondition = - dynamic_cast(s_condition); - return (keyCondition == NULL || keyCondition->getKey() != kKeyNone); -} - -BOOL CALLBACK -CHotkeyOptions::CConditionDialog::dlgProc(HWND hwnd, - UINT message, WPARAM wParam, LPARAM) -{ - switch (message) { - case WM_INITDIALOG: - doInit(hwnd); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: - EndDialog(hwnd, 1); - return TRUE; - - case IDCANCEL: - EndDialog(hwnd, 0); - return TRUE; - } - break; - - default: - break; - } - - return FALSE; -} - -LRESULT CALLBACK -CHotkeyOptions::CConditionDialog::editProc(HWND hwnd, - UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) { - case WM_LBUTTONDOWN: - if (GetFocus() == hwnd) { - onButton(hwnd, kButtonLeft); - } - else { - SetFocus(hwnd); - } - return 0; - - case WM_MBUTTONDOWN: - if (GetFocus() == hwnd) { - onButton(hwnd, kButtonMiddle); - } - return 0; - - case WM_RBUTTONDOWN: - if (GetFocus() == hwnd) { - onButton(hwnd, kButtonRight); - } - return 0; - - case WM_XBUTTONDOWN: - if (GetFocus() == hwnd) { - switch (HIWORD(wParam)) { - case XBUTTON1: - onButton(hwnd, kButtonExtra0 + 0); - break; - - case XBUTTON2: - onButton(hwnd, kButtonExtra0 + 1); - break; - } - } - return 0; - - case WM_KEYDOWN: - case WM_SYSKEYDOWN: - case WM_KEYUP: - case WM_SYSKEYUP: - onKey(hwnd, wParam, lParam); - return 0; - - case WM_LBUTTONUP: - case WM_MBUTTONUP: - case WM_RBUTTONUP: - case WM_XBUTTONUP: - case WM_CHAR: - case WM_SYSCHAR: - case WM_DEADCHAR: - case WM_SYSDEADCHAR: - return 0; - - case WM_SETFOCUS: - if (s_condition != NULL) { - delete s_lastGoodCondition; - s_lastGoodCondition = s_condition->clone(); - } - break; - - case WM_KILLFOCUS: - if (!isGoodCondition()) { - delete s_condition; - if (s_lastGoodCondition != NULL) { - s_condition = s_lastGoodCondition->clone(); - } - else { - s_condition = NULL; - } - } - fillHotkey(GetParent(hwnd)); - break; - - case WM_GETDLGCODE: - return DLGC_WANTALLKEYS; - - default: - break; - } - return CallWindowProc(s_editWndProc, hwnd, message, wParam, lParam); -} - - -// -// CHotkeyOptions::CActionDialog -// - -CConfig* CHotkeyOptions::CActionDialog::s_config = NULL; -bool CHotkeyOptions::CActionDialog::s_onActivate = false; -CInputFilter::CAction* - CHotkeyOptions::CActionDialog::s_action = NULL; -CInputFilter::CAction* - CHotkeyOptions::CActionDialog::s_lastGoodAction = NULL; -std::set - CHotkeyOptions::CActionDialog::s_screens; -WNDPROC CHotkeyOptions::CActionDialog::s_editWndProc = NULL; - -bool -CHotkeyOptions::CActionDialog::doModal(HWND parent, CConfig* config, - CInputFilter::CAction*& action, bool& onActivate) -{ - s_config = config; - s_onActivate = onActivate; - s_action = action; - if (s_action != NULL) { - s_lastGoodAction = s_action->clone(); - } - else { - s_lastGoodAction = NULL; - } - - int n = (int)DialogBox(s_instance, MAKEINTRESOURCE(IDD_HOTKEY_ACTION), - parent, (DLGPROC) dlgProc); - - onActivate = s_onActivate; - action = s_action; - delete s_lastGoodAction; - s_action = NULL; - s_lastGoodAction = NULL; - - return (n == 1); -} - -void -CHotkeyOptions::CActionDialog::doInit(HWND hwnd) -{ - // subclass edit control - HWND child = getItem(hwnd, IDC_HOTKEY_ACTION_HOTKEY); - s_editWndProc = (WNDPROC)GetWindowLongPtr(child, GWLP_WNDPROC); - SetWindowLongPtr(child, GWLP_WNDPROC, (LONG_PTR)editProc); - setWindowText(getItem(hwnd, IDC_HOTKEY_ACTION_HOTKEY), ""); - fillHotkey(hwnd); - - // fill screens - child = getItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_TO_LIST); - SendMessage(child, CB_RESETCONTENT, 0, 0); - for (CConfig::const_iterator index = s_config->begin(); - index != s_config->end(); ) { - const CString& name = *index; - ++index; - if (index != s_config->end()) { - SendMessage(child, CB_INSERTSTRING, - (WPARAM)-1, (LPARAM)name.c_str()); - } - else { - SendMessage(child, CB_ADDSTRING, 0, (LPARAM)name.c_str()); - } - } - SendMessage(child, CB_SETCURSEL, 0, 0); - - // fill directions - child = getItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_IN_LIST); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_EDGE_LEFT).c_str()); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_EDGE_RIGHT).c_str()); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_EDGE_TOP).c_str()); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_EDGE_BOTTOM).c_str()); - SendMessage(child, CB_SETCURSEL, 0, 0); - - // fill lock modes - child = getItem(hwnd, IDC_HOTKEY_ACTION_LOCK_LIST); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_MODE_OFF).c_str()); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_MODE_ON).c_str()); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_MODE_TOGGLE).c_str()); - SendMessage(child, CB_SETCURSEL, 0, 0); - - // fill keyboard broadcast modes - child = getItem(hwnd, IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_LIST); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_MODE_OFF).c_str()); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_MODE_ON).c_str()); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_MODE_TOGGLE).c_str()); - SendMessage(child, CB_SETCURSEL, 0, 0); - - // select when - if (s_onActivate) { - child = getItem(hwnd, IDC_HOTKEY_ACTION_ON_ACTIVATE); - } - else { - child = getItem(hwnd, IDC_HOTKEY_ACTION_ON_DEACTIVATE); - } - setItemChecked(child, true); - - // no screens by default - s_screens.clear(); - - // select mode - child = NULL; - CInputFilter::CKeystrokeAction* keyAction = - dynamic_cast(s_action); - CInputFilter::CMouseButtonAction* mouseAction = - dynamic_cast(s_action); - CInputFilter::CLockCursorToScreenAction* lockAction = - dynamic_cast(s_action); - CInputFilter::CSwitchToScreenAction* switchToAction = - dynamic_cast(s_action); - CInputFilter::CSwitchInDirectionAction* switchInAction = - dynamic_cast(s_action); - CInputFilter::CKeyboardBroadcastAction* keyboardBroadcastAction= - dynamic_cast(s_action); - if (keyAction != NULL) { - if (dynamic_cast(s_action) != NULL) { - child = getItem(hwnd, IDC_HOTKEY_ACTION_DOWNUP); - } - else if (keyAction->isOnPress()) { - child = getItem(hwnd, IDC_HOTKEY_ACTION_DOWN); - } - else { - child = getItem(hwnd, IDC_HOTKEY_ACTION_UP); - } - } - else if (mouseAction != NULL) { - if (dynamic_cast(s_action) != NULL) { - child = getItem(hwnd, IDC_HOTKEY_ACTION_DOWNUP); - } - else if (keyAction->isOnPress()) { - child = getItem(hwnd, IDC_HOTKEY_ACTION_DOWN); - } - else { - child = getItem(hwnd, IDC_HOTKEY_ACTION_UP); - } - } - else if (lockAction != NULL) { - child = getItem(hwnd, IDC_HOTKEY_ACTION_LOCK_LIST); - SendMessage(child, CB_SETCURSEL, lockAction->getMode(), 0); - child = getItem(hwnd, IDC_HOTKEY_ACTION_LOCK); - } - else if (switchToAction != NULL) { - child = getItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_TO_LIST); - DWORD i = (DWORD)SendMessage(child, CB_FINDSTRINGEXACT, (WPARAM)-1, - (LPARAM)switchToAction->getScreen().c_str()); - if (i == CB_ERR) { - i = 0; - } - SendMessage(child, CB_SETCURSEL, i, 0); - child = getItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_TO); - } - else if (switchInAction != NULL) { - child = getItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_IN_LIST); - SendMessage(child, CB_SETCURSEL, - switchInAction->getDirection() - kLeft, 0); - child = getItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_IN); - } - else if (keyboardBroadcastAction != NULL) { - // Save the screens we're broadcasting to - s_screens = keyboardBroadcastAction->getScreens(); - - child = getItem(hwnd, IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_LIST); - SendMessage(child, CB_SETCURSEL, keyboardBroadcastAction->getMode(), 0); - child = getItem(hwnd, IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST); - } - if (child != NULL) { - setItemChecked(child, true); - } - - updateControls(hwnd); -} - -void -CHotkeyOptions::CActionDialog::fillHotkey(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_ACTION_HOTKEY); - CInputFilter::CKeystrokeAction* keyAction = - dynamic_cast(s_action); - CInputFilter::CMouseButtonAction* mouseAction = - dynamic_cast(s_action); - if (keyAction != NULL || mouseAction != NULL) { - setWindowText(child, s_action->format().c_str()); - } - else { - setWindowText(child, ""); - } - - // can only set screens in key actions - enableItem(hwnd, IDC_HOTKEY_ACTION_SCREENS, keyAction != NULL); -} - -void -CHotkeyOptions::CActionDialog::updateControls(HWND hwnd) -{ - // determine which mode we're in - UInt32 mode = 0; - if (isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_DOWNUP)) || - isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_DOWN)) || - isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_UP))) { - mode = 1; - } - else if (isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_TO))) { - mode = 2; - } - else if (isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_IN))) { - mode = 3; - } - else if (isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_LOCK))) { - mode = 4; - } - else if (isItemChecked(getItem(hwnd, - IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST))) { - mode = 5; - } - - // enable/disable all mode specific controls - enableItem(hwnd, IDC_HOTKEY_ACTION_HOTKEY, mode == 1); - enableItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_TO_LIST, mode == 2); - enableItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_IN_LIST, mode == 3); - enableItem(hwnd, IDC_HOTKEY_ACTION_LOCK_LIST, mode == 4); - enableItem(hwnd, IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_LIST, mode == 5); - enableItem(hwnd, IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_SCREENS, mode == 5); - - // can only set screens in key actions - CInputFilter::CKeystrokeAction* keyAction = - dynamic_cast(s_action); - enableItem(hwnd, IDC_HOTKEY_ACTION_SCREENS, keyAction != NULL); -} - -void -CHotkeyOptions::CActionDialog::onButton(HWND hwnd, ButtonID button) -{ - IPlatformScreen::CButtonInfo* info = - IPrimaryScreen::CButtonInfo::alloc(button, getModifiers()); - delete s_action; - HWND parent = GetParent(hwnd); - if (isItemChecked(getItem(parent, IDC_HOTKEY_ACTION_DOWNUP))) { - s_action = new CMouseButtonDownUpAction(info); - } - else if (isItemChecked(getItem(parent, IDC_HOTKEY_ACTION_DOWN))) { - s_action = new CInputFilter::CMouseButtonAction(info, true); - } - else if (isItemChecked(getItem(parent, IDC_HOTKEY_ACTION_UP))) { - s_action = new CInputFilter::CMouseButtonAction(info, false); - } - else { - s_action = NULL; - } - - fillHotkey(parent); -} - -void -CHotkeyOptions::CActionDialog::onKey(HWND hwnd, WPARAM wParam, LPARAM lParam) -{ - // ignore key repeats - if ((lParam & 0xc0000000u) == 0x40000000u) { - return; - } - - // ignore key releases if the action is complete and for the tab - // key (in case we were just tabbed to) - if ((lParam & 0x80000000u) != 0) { - if (isGoodAction() || wParam == VK_TAB) { - return; - } - } - - KeyID key = kKeyNone; - KeyModifierMask mask = getModifiers(); - switch (wParam) { - case VK_SHIFT: - case VK_LSHIFT: - case VK_RSHIFT: - case VK_CONTROL: - case VK_LCONTROL: - case VK_RCONTROL: - case VK_MENU: - case VK_LMENU: - case VK_RMENU: - case VK_LWIN: - case VK_RWIN: - break; - - case VK_TAB: - // allow tabbing out of control - if ((mask & (KeyModifierControl | - KeyModifierAlt | KeyModifierSuper)) == 0) { - HWND next = hwnd; - if ((mask & KeyModifierShift) == 0) { - do { - next = GetWindow(next, GW_HWNDNEXT); - if (next == NULL) { - next = GetWindow(hwnd, GW_HWNDFIRST); - } - } while (next != hwnd && - (!IsWindowVisible(next) || - (GetWindowLong(next, GWL_STYLE) & WS_TABSTOP) == 0)); - } - else { - do { - next = GetWindow(next, GW_HWNDPREV); - if (next == NULL) { - next = GetWindow(hwnd, GW_HWNDLAST); - } - } while (next != hwnd && - (!IsWindowVisible(next) || - (GetWindowLong(next, GWL_STYLE) & WS_TABSTOP) == 0)); - } - SetFocus(next); - return; - } - // fall through - - default: - key = CMSWindowsKeyState::getKeyID((UINT)wParam, - static_cast((lParam & 0x1ff0000u) >> 16)); - switch (key) { - case kKeyNone: - // could be a character - key = getChar(wParam, lParam); - if (key == kKeyNone) { - return; - } - break; - - case kKeyShift_L: - case kKeyShift_R: - case kKeyControl_L: - case kKeyControl_R: - case kKeyAlt_L: - case kKeyAlt_R: - case kKeyMeta_L: - case kKeyMeta_R: - case kKeySuper_L: - case kKeySuper_R: - case kKeyCapsLock: - case kKeyNumLock: - case kKeyScrollLock: - // bogus - return; - } - break; - } - - // get old screen list - std::set screens; - CInputFilter::CKeystrokeAction* keyAction = - dynamic_cast(s_action); - if (keyAction == NULL) { - keyAction = - dynamic_cast(s_lastGoodAction); - } - if (keyAction != NULL) { - IKeyState::CKeyInfo::split(keyAction->getInfo()->m_screens, screens); - } - - // create new action - IPlatformScreen::CKeyInfo* info = - IKeyState::CKeyInfo::alloc(key, mask, 0, 0, screens); - delete s_action; - HWND parent = GetParent(hwnd); - if (isItemChecked(getItem(parent, IDC_HOTKEY_ACTION_DOWNUP))) { - s_action = new CKeystrokeDownUpAction(info); - } - else if (isItemChecked(getItem(parent, IDC_HOTKEY_ACTION_DOWN))) { - s_action = new CInputFilter::CKeystrokeAction(info, true); - } - else if (isItemChecked(getItem(parent, IDC_HOTKEY_ACTION_UP))) { - s_action = new CInputFilter::CKeystrokeAction(info, false); - } - else { - s_action = NULL; - } - - fillHotkey(parent); -} - -void -CHotkeyOptions::CActionDialog::onLockAction(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_ACTION_LOCK_LIST); - LRESULT index = SendMessage(child, CB_GETCURSEL, 0, 0); - if (index != CB_ERR) { - delete s_action; - s_action = new CInputFilter::CLockCursorToScreenAction( - (CInputFilter::CLockCursorToScreenAction::Mode)index); - } -} - -void -CHotkeyOptions::CActionDialog::onSwitchToAction(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_TO_LIST); - CString screen = getWindowText(child); - delete s_action; - s_action = new CInputFilter::CSwitchToScreenAction(screen); -} - -void -CHotkeyOptions::CActionDialog::onSwitchInAction(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_ACTION_SWITCH_IN_LIST); - LRESULT index = SendMessage(child, CB_GETCURSEL, 0, 0); - if (index != CB_ERR) { - delete s_action; - s_action = new CInputFilter::CSwitchInDirectionAction( - (EDirection)(index + kLeft)); - } -} - -void -CHotkeyOptions::CActionDialog::onKeyboardBroadcastAction(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_LIST); - LRESULT index = SendMessage(child, CB_GETCURSEL, 0, 0); - if (index != CB_ERR) { - delete s_action; - s_action = new CInputFilter::CKeyboardBroadcastAction( - (CInputFilter::CKeyboardBroadcastAction::Mode)index, s_screens); - } -} - -KeyID -CHotkeyOptions::CActionDialog::getChar(WPARAM wParam, LPARAM lParam) -{ - BYTE keyState[256]; - UINT virtualKey = (UINT)wParam; - UINT scanCode = (UINT)((lParam & 0x0ff0000u) >> 16); - if (!GetKeyboardState(keyState)) { - LOG((CLOG_WARN "GetKeyboardState failed on CHotkeyOptions::CActionDialog::getChar")); - return kKeyNone; - } - // reset modifier state - keyState[VK_SHIFT] = 0; - keyState[VK_LSHIFT] = 0; - keyState[VK_RSHIFT] = 0; - keyState[VK_CONTROL] = 0; - keyState[VK_LCONTROL] = 0; - keyState[VK_RCONTROL] = 0; - keyState[VK_MENU] = 0; - keyState[VK_LMENU] = 0; - keyState[VK_RMENU] = 0; - keyState[VK_LWIN] = 0; - keyState[VK_RWIN] = 0; - - // translate virtual key to character - int n; - KeyID id; - if (CArchMiscWindows::isWindows95Family()) { - // XXX -- how do we get characters not in Latin-1? - WORD ascii; - n = ToAscii(virtualKey, scanCode, keyState, &ascii, 0); - id = static_cast(ascii & 0xffu); - } - else { - typedef int (WINAPI *ToUnicode_t)(UINT wVirtKey, - UINT wScanCode, - PBYTE lpKeyState, - LPWSTR pwszBuff, - int cchBuff, - UINT wFlags); - ToUnicode_t s_ToUnicode = NULL; - if (s_ToUnicode == NULL) { - HMODULE userModule = GetModuleHandle("user32.dll"); - if(userModule==NULL) { - LOG((CLOG_ERR "GetModuleHandle(\"user32.dll\") returned NULL")); - return kKeyNone; - } - s_ToUnicode = - (ToUnicode_t)GetProcAddress(userModule, "ToUnicode"); - } - - WCHAR unicode[2]; - n = s_ToUnicode(virtualKey, scanCode, keyState, - unicode, sizeof(unicode) / sizeof(unicode[0]), - 0); - id = static_cast(unicode[0]); - } - switch (n) { - case -1: - // no hot keys on dead keys - return kKeyNone; - - default: - case 0: - // unmapped - return kKeyNone; - - case 1: - return id; - } -} - -KeyModifierMask -CHotkeyOptions::CActionDialog::getModifiers() -{ - KeyModifierMask mask = 0; - if ((GetKeyState(VK_SHIFT) & 0x8000) != 0) { - mask |= KeyModifierShift; - } - if ((GetKeyState(VK_CONTROL) & 0x8000) != 0) { - mask |= KeyModifierControl; - } - if ((GetKeyState(VK_MENU) & 0x8000) != 0) { - mask |= KeyModifierAlt; - } - if ((GetKeyState(VK_LWIN) & 0x8000) != 0 || - (GetKeyState(VK_RWIN) & 0x8000) != 0) { - mask |= KeyModifierSuper; - } - return mask; -} - -bool -CHotkeyOptions::CActionDialog::isGoodAction() -{ - CInputFilter::CMouseButtonAction* mouseAction = - dynamic_cast(s_action); - CInputFilter::CKeystrokeAction* keyAction = - dynamic_cast(s_action); - return (mouseAction == NULL || keyAction == NULL || - keyAction->getInfo()->m_key != kKeyNone); -} - -void -CHotkeyOptions::CActionDialog::convertAction(HWND hwnd) -{ - if (s_lastGoodAction != NULL) { - CInputFilter::CMouseButtonAction* mouseAction = - dynamic_cast(s_lastGoodAction); - CInputFilter::CKeystrokeAction* keyAction = - dynamic_cast(s_lastGoodAction); - if (mouseAction != NULL) { - IPlatformScreen::CButtonInfo* info = - IPrimaryScreen::CButtonInfo::alloc(*mouseAction->getInfo()); - delete s_action; - if (isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_DOWNUP))) { - s_action = new CMouseButtonDownUpAction(info); - } - else if (isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_DOWN))) { - s_action = new CInputFilter::CMouseButtonAction(info, true); - } - else if (isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_UP))) { - s_action = new CInputFilter::CMouseButtonAction(info, false); - } - else { - free(info); - s_action = NULL; - } - } - else if (keyAction != NULL) { - IPlatformScreen::CKeyInfo* info = - IKeyState::CKeyInfo::alloc(*keyAction->getInfo()); - delete s_action; - if (isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_DOWNUP))) { - s_action = new CKeystrokeDownUpAction(info); - } - else if (isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_DOWN))) { - s_action = new CInputFilter::CKeystrokeAction(info, true); - } - else if (isItemChecked(getItem(hwnd, IDC_HOTKEY_ACTION_UP))) { - s_action = new CInputFilter::CKeystrokeAction(info, false); - } - else { - free(info); - s_action = NULL; - } - } - } -} - -bool -CHotkeyOptions::CActionDialog::isDownUpAction() -{ - return (dynamic_cast(s_action) != NULL || - dynamic_cast(s_action) != NULL); -} - -BOOL CALLBACK -CHotkeyOptions::CActionDialog::dlgProc(HWND hwnd, - UINT message, WPARAM wParam, LPARAM) -{ - switch (message) { - case WM_INITDIALOG: - doInit(hwnd); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: - if (isDownUpAction()) { - s_onActivate = true; - } - EndDialog(hwnd, 1); - return TRUE; - - case IDCANCEL: - EndDialog(hwnd, 0); - return TRUE; - - case IDC_HOTKEY_ACTION_ON_ACTIVATE: - s_onActivate = true; - return TRUE; - - case IDC_HOTKEY_ACTION_ON_DEACTIVATE: - s_onActivate = false; - return TRUE; - - case IDC_HOTKEY_ACTION_DOWNUP: - case IDC_HOTKEY_ACTION_DOWN: - case IDC_HOTKEY_ACTION_UP: - convertAction(hwnd); - fillHotkey(hwnd); - updateControls(hwnd); - return TRUE; - - case IDC_HOTKEY_ACTION_LOCK: - onLockAction(hwnd); - updateControls(hwnd); - return TRUE; - - case IDC_HOTKEY_ACTION_SWITCH_TO: - onSwitchToAction(hwnd); - updateControls(hwnd); - return TRUE; - - case IDC_HOTKEY_ACTION_SWITCH_IN: - onSwitchInAction(hwnd); - updateControls(hwnd); - return TRUE; - - case IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST: - onKeyboardBroadcastAction(hwnd); - updateControls(hwnd); - return TRUE; - - case IDC_HOTKEY_ACTION_LOCK_LIST: - switch (HIWORD(wParam)) { - case LBN_SELCHANGE: - onLockAction(hwnd); - return TRUE; - } - break; - - case IDC_HOTKEY_ACTION_SWITCH_TO_LIST: - switch (HIWORD(wParam)) { - case LBN_SELCHANGE: - onSwitchToAction(hwnd); - return TRUE; - } - break; - - case IDC_HOTKEY_ACTION_SWITCH_IN_LIST: - switch (HIWORD(wParam)) { - case LBN_SELCHANGE: - onSwitchInAction(hwnd); - return TRUE; - } - break; - - case IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_LIST: - switch (HIWORD(wParam)) { - case LBN_SELCHANGE: - onKeyboardBroadcastAction(hwnd); - return TRUE; - } - break; - - case IDC_HOTKEY_ACTION_SCREENS: - CScreensDialog::doModal(hwnd, s_config, - dynamic_cast(s_action)); - fillHotkey(hwnd); - return TRUE; - - case IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_SCREENS: { - // convert screens to form that CScreenDialog::doModal() wants - IPlatformScreen::CKeyInfo* tmpInfo = - IPlatformScreen::CKeyInfo::alloc(0, 0, 0, 1, s_screens); - CInputFilter::CKeystrokeAction tmpAction(tmpInfo, true); - - // get the screens - CScreensDialog::doModal(hwnd, s_config, &tmpAction); - - // convert screens back - IPlatformScreen::CKeyInfo::split( - tmpAction.getInfo()->m_screens, s_screens); - - // update - onKeyboardBroadcastAction(hwnd); - return TRUE; - } - } - break; - - default: - break; - } - - return FALSE; -} - -LRESULT CALLBACK -CHotkeyOptions::CActionDialog::editProc(HWND hwnd, - UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) { - case WM_LBUTTONDOWN: - if (GetFocus() == hwnd) { - onButton(hwnd, kButtonLeft); - } - else { - SetFocus(hwnd); - } - return 0; - - case WM_MBUTTONDOWN: - if (GetFocus() == hwnd) { - onButton(hwnd, kButtonMiddle); - } - return 0; - - case WM_RBUTTONDOWN: - if (GetFocus() == hwnd) { - onButton(hwnd, kButtonRight); - } - return 0; - - case WM_XBUTTONDOWN: - if (GetFocus() == hwnd) { - switch (HIWORD(wParam)) { - case XBUTTON1: - onButton(hwnd, kButtonExtra0 + 0); - break; - - case XBUTTON2: - onButton(hwnd, kButtonExtra0 + 1); - break; - } - } - return 0; - - case WM_KEYDOWN: - case WM_SYSKEYDOWN: - case WM_KEYUP: - case WM_SYSKEYUP: - onKey(hwnd, wParam, lParam); - return 0; - - case WM_LBUTTONUP: - case WM_MBUTTONUP: - case WM_RBUTTONUP: - case WM_XBUTTONUP: - case WM_CHAR: - case WM_SYSCHAR: - case WM_DEADCHAR: - case WM_SYSDEADCHAR: - return 0; - - case WM_SETFOCUS: - if (s_action != NULL) { - delete s_lastGoodAction; - s_lastGoodAction = s_action->clone(); - } - break; - - case WM_KILLFOCUS: - if (!isGoodAction()) { - delete s_action; - if (s_lastGoodAction != NULL) { - s_action = s_lastGoodAction->clone(); - } - else { - s_action = NULL; - } - } - else if (s_action != NULL) { - delete s_lastGoodAction; - s_lastGoodAction = s_action->clone(); - } - fillHotkey(GetParent(hwnd)); - break; - - case WM_GETDLGCODE: - return DLGC_WANTALLKEYS; - - default: - break; - } - return CallWindowProc(s_editWndProc, hwnd, message, wParam, lParam); -} - - -// -// CHotkeyOptions::CScreensDialog -// - -CConfig* CHotkeyOptions::CScreensDialog::s_config = NULL; -CInputFilter::CKeystrokeAction* - CHotkeyOptions::CScreensDialog::s_action = NULL; -CHotkeyOptions::CScreensDialog::CScreens - CHotkeyOptions::CScreensDialog::s_nonTargets; -CHotkeyOptions::CScreensDialog::CScreens - CHotkeyOptions::CScreensDialog::s_targets; -CString CHotkeyOptions::CScreensDialog::s_allScreens; - -void -CHotkeyOptions::CScreensDialog::doModal(HWND parent, CConfig* config, - CInputFilter::CKeystrokeAction* action) -{ - s_allScreens = getString(IDS_ALL_SCREENS); - s_config = config; - s_action = action; - DialogBox(s_instance, MAKEINTRESOURCE(IDD_HOTKEY_SCREENS), - parent, (DLGPROC) dlgProc); - s_config = NULL; - s_action = NULL; -} - -void -CHotkeyOptions::CScreensDialog::doInit(HWND hwnd) -{ - s_nonTargets.clear(); - s_targets.clear(); - - // get screens from config - s_nonTargets.insert("*"); - for (CConfig::const_iterator i = s_config->begin(); - i != s_config->end(); ++i) { - s_nonTargets.insert(*i); - } - - // get screens in action - IKeyState::CKeyInfo::split(s_action->getInfo()->m_screens, s_targets); - - // remove screens in action from screens in config - for (CScreens::const_iterator i = s_targets.begin(); - i != s_targets.end(); ++i) { - s_nonTargets.erase(*i); - } - - // fill dialog - fillScreens(hwnd); - updateControls(hwnd); -} - -void -CHotkeyOptions::CScreensDialog::doFini(HWND) -{ - // put screens into action - const IPlatformScreen::CKeyInfo* oldInfo = s_action->getInfo(); - IPlatformScreen::CKeyInfo* newInfo = - IKeyState::CKeyInfo::alloc(oldInfo->m_key, - oldInfo->m_mask, 0, 0, s_targets); - s_action->adoptInfo(newInfo); -} - -void -CHotkeyOptions::CScreensDialog::fillScreens(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_SCREENS_SRC); - SendMessage(child, LB_RESETCONTENT, 0, 0); - for (CScreens::const_iterator i = s_nonTargets.begin(); - i != s_nonTargets.end(); ++i) { - CString name = *i; - if (name == "*") { - name = s_allScreens; - } - SendMessage(child, LB_INSERTSTRING, (WPARAM)-1, - (LPARAM)name.c_str()); - } - - child = getItem(hwnd, IDC_HOTKEY_SCREENS_DST); - SendMessage(child, LB_RESETCONTENT, 0, 0); - for (CScreens::const_iterator i = s_targets.begin(); - i != s_targets.end(); ++i) { - CString name = *i; - if (name == "*") { - name = s_allScreens; - } - SendMessage(child, LB_INSERTSTRING, (WPARAM)-1, - (LPARAM)name.c_str()); - } - if (s_targets.empty()) { - // if no targets then add a special item so the user knows - // what'll happen - CString activeScreenLabel = getString(IDS_ACTIVE_SCREEN); - SendMessage(child, LB_INSERTSTRING, (WPARAM)-1, - (LPARAM)activeScreenLabel.c_str()); - } -} - -void -CHotkeyOptions::CScreensDialog::updateControls(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_HOTKEY_SCREENS_SRC); - bool canAdd = (SendMessage(child, LB_GETSELCOUNT, 0, 0) != 0); - child = getItem(hwnd, IDC_HOTKEY_SCREENS_DST); - bool canRemove = (!s_targets.empty() && - (SendMessage(child, LB_GETSELCOUNT, 0, 0) != 0)); - - enableItem(hwnd, IDC_HOTKEY_SCREENS_ADD, canAdd); - enableItem(hwnd, IDC_HOTKEY_SCREENS_REMOVE, canRemove); -} - -void -CHotkeyOptions::CScreensDialog::add(HWND hwnd) -{ - CScreens selected; - getSelected(hwnd, IDC_HOTKEY_SCREENS_SRC, s_nonTargets, selected); - for (CScreens::const_iterator i = selected.begin(); - i != selected.end(); ++i) { - s_targets.insert(*i); - s_nonTargets.erase(*i); - } - fillScreens(hwnd); - updateControls(hwnd); -} - -void -CHotkeyOptions::CScreensDialog::remove(HWND hwnd) -{ - CScreens selected; - getSelected(hwnd, IDC_HOTKEY_SCREENS_DST, s_targets, selected); - for (CScreens::const_iterator i = selected.begin(); - i != selected.end(); ++i) { - s_nonTargets.insert(*i); - s_targets.erase(*i); - } - fillScreens(hwnd); - updateControls(hwnd); -} - -void -CHotkeyOptions::CScreensDialog::getSelected(HWND hwnd, UINT id, - const CScreens& inScreens, CScreens& outScreens) -{ - // get the selected item indices - HWND child = getItem(hwnd, id); - UInt32 n = (UInt32)SendMessage(child, LB_GETSELCOUNT, 0, 0); - int* index = new int[n]; - SendMessage(child, LB_GETSELITEMS, (WPARAM)n, (LPARAM)index); - - // get the items in a vector - std::vector tmpList; - for (CScreens::const_iterator i = inScreens.begin(); - i != inScreens.end(); ++i) { - tmpList.push_back(*i); - } - - // get selected items into the output set - outScreens.clear(); - for (UInt32 i = 0; i < n; ++i) { - outScreens.insert(tmpList[index[i]]); - } - - // clean up - delete[] index; -} - -BOOL CALLBACK -CHotkeyOptions::CScreensDialog::dlgProc(HWND hwnd, - UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) { - case WM_INITDIALOG: - doInit(hwnd); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: - doFini(hwnd); - EndDialog(hwnd, 0); - return TRUE; - - case IDCANCEL: - EndDialog(hwnd, 0); - return TRUE; - - case IDC_HOTKEY_SCREENS_ADD: - add(hwnd); - return TRUE; - - case IDC_HOTKEY_SCREENS_REMOVE: - remove(hwnd); - return TRUE; - - case IDC_HOTKEY_SCREENS_SRC: - case IDC_HOTKEY_SCREENS_DST: - switch (HIWORD(wParam)) { - case LBN_SELCANCEL: - case LBN_SELCHANGE: - updateControls(hwnd); - return TRUE; - } - break; - } - break; - - case WM_CTLCOLORLISTBOX: - if (s_targets.empty() && - (HWND)lParam == getItem(hwnd, IDC_HOTKEY_SCREENS_DST)) { - // override colors - HDC dc = (HDC)wParam; - SetTextColor(dc, GetSysColor(COLOR_GRAYTEXT)); - return (BOOL)GetSysColorBrush(COLOR_WINDOW); - } - break; - - default: - break; - } - - return FALSE; -} diff --git a/cmd/launcher/CHotkeyOptions.h b/cmd/launcher/CHotkeyOptions.h deleted file mode 100644 index 5e8b88ce..00000000 --- a/cmd/launcher/CHotkeyOptions.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2006 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef CHOTKEYOPTIONS_H -#define CHOTKEYOPTIONS_H - -#include "CString.h" -#include "KeyTypes.h" -#include "MouseTypes.h" -#include "CInputFilter.h" - -#define WINDOWS_LEAN_AND_MEAN -#include - -class CConfig; - -//! Hotkey options dialog for Microsoft Windows launcher -class CHotkeyOptions { -public: - CHotkeyOptions(HWND parent, CConfig*); - ~CHotkeyOptions(); - - //! @name manipulators - //@{ - - //! Run dialog - /*! - Display and handle the dialog until closed by the user. - */ - void doModal(); - - //@} - //! @name accessors - //@{ - - //@} - -private: - void doInit(HWND hwnd); - - void fillHotkeys(HWND hwnd, UInt32 select = (UInt32)-1); - void updateHotkeysControls(HWND hwnd); - - void addHotkey(HWND hwnd); - void removeHotkey(HWND hwnd); - void editHotkey(HWND hwnd); - - void fillActions(HWND hwnd, UInt32 select = (UInt32)-1); - void updateActionsControls(HWND hwnd); - - void addAction(HWND hwnd); - void removeAction(HWND hwnd); - void editAction(HWND hwnd); - - bool editCondition(HWND hwnd, CInputFilter::CCondition*&); - bool editAction(HWND hwnd, CInputFilter::CAction*&, - bool& onActivate); - - void openRule(HWND hwnd); - void closeRule(HWND hwnd); - UInt32 findMatchingAction( - const CInputFilter::CKeystrokeAction*) const; - UInt32 findMatchingAction( - const CInputFilter::CMouseButtonAction*) const; - - // message handling - BOOL doDlgProc(HWND, UINT, WPARAM, LPARAM); - static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM); - - // special actions we use to combine matching down/up actions into a - // single action for the convenience of the user. - class CKeystrokeDownUpAction : public CInputFilter::CKeystrokeAction { - public: - CKeystrokeDownUpAction(IPlatformScreen::CKeyInfo* adoptedInfo) : - CInputFilter::CKeystrokeAction(adoptedInfo, true) { } - - // CAction overrides - virtual CInputFilter::CAction* clone() const - { - IKeyState::CKeyInfo* info = IKeyState::CKeyInfo::alloc(*getInfo()); - return new CKeystrokeDownUpAction(info); - } - - protected: - // CKeystrokeAction overrides - virtual const char* formatName() const { return "keystroke"; } - }; - class CMouseButtonDownUpAction : public CInputFilter::CMouseButtonAction { - public: - CMouseButtonDownUpAction(IPrimaryScreen::CButtonInfo* adoptedInfo) : - CInputFilter::CMouseButtonAction(adoptedInfo, true) { } - - // CAction overrides - virtual CInputFilter::CAction* clone() const - { - IPlatformScreen::CButtonInfo* info = - IPrimaryScreen::CButtonInfo::alloc(*getInfo()); - return new CMouseButtonDownUpAction(info); - } - - protected: - // CMouseButtonAction overrides - virtual const char* formatName() const { return "mousebutton"; } - }; - - class CConditionDialog { - public: - static bool doModal(HWND parent, CInputFilter::CCondition*&); - - private: - static void doInit(HWND hwnd); - static void fillHotkey(HWND hwnd); - - static void onButton(HWND hwnd, ButtonID button); - static void onKey(HWND hwnd, WPARAM wParam, LPARAM lParam); - static KeyID getChar(WPARAM wParam, LPARAM lParam); - static KeyModifierMask - getModifiers(); - - static bool isGoodCondition(); - - static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM); - static LRESULT CALLBACK editProc(HWND hwnd, UINT, WPARAM, LPARAM); - - private: - static CInputFilter::CCondition* - s_condition; - static CInputFilter::CCondition* - s_lastGoodCondition; - static WNDPROC s_editWndProc; - }; - - class CActionDialog { - public: - static bool doModal(HWND parent, CConfig* config, - CInputFilter::CAction*&, bool& onActivate); - - private: - static void doInit(HWND hwnd); - static void fillHotkey(HWND hwnd); - static void updateControls(HWND hwnd); - - static void onButton(HWND hwnd, ButtonID button); - static void onKey(HWND hwnd, WPARAM wParam, LPARAM lParam); - static void onLockAction(HWND hwnd); - static void onSwitchToAction(HWND hwnd); - static void onSwitchInAction(HWND hwnd); - static void onKeyboardBroadcastAction(HWND hwnd); - - static KeyID getChar(WPARAM wParam, LPARAM lParam); - static KeyModifierMask - getModifiers(); - - static bool isGoodAction(); - static void convertAction(HWND hwnd); - - static bool isDownUpAction(); - - static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM); - static LRESULT CALLBACK editProc(HWND hwnd, UINT, WPARAM, LPARAM); - - private: - static CConfig* s_config; - static bool s_onActivate; - static CInputFilter::CAction* - s_action; - static CInputFilter::CAction* - s_lastGoodAction; - static std::set s_screens; - static WNDPROC s_editWndProc; - }; - -// public to allow CActionDialog to use it -public: - class CScreensDialog { - public: - static void doModal(HWND parent, CConfig* config, - CInputFilter::CKeystrokeAction*); - - // public due to compiler brokenness - typedef std::set CScreens; - - private: - - static void doInit(HWND hwnd); - static void doFini(HWND hwnd); - static void fillScreens(HWND hwnd); - static void updateControls(HWND hwnd); - - static void add(HWND hwnd); - static void remove(HWND hwnd); - - static void getSelected(HWND hwnd, UINT id, - const CScreens& inScreens, CScreens& outScreens); - - static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM); - - private: - static CConfig* s_config; - static CInputFilter::CKeystrokeAction* s_action; - static CScreens s_nonTargets; - static CScreens s_targets; - static CString s_allScreens; - }; - -private: - static CHotkeyOptions* s_singleton; - - HWND m_parent; - CConfig* m_config; - CInputFilter* m_inputFilter; - CInputFilter::CRule m_activeRule; - UInt32 m_activeRuleIndex; -}; - -#endif diff --git a/cmd/launcher/CInfo.cpp b/cmd/launcher/CInfo.cpp deleted file mode 100644 index b4a24457..00000000 --- a/cmd/launcher/CInfo.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2006 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "ProtocolTypes.h" -#include "CStringUtil.h" -#include "Version.h" -#include "CArch.h" -#include "CInfo.h" -#include "LaunchUtil.h" -#include "resource.h" - -// -// CInfo -// - -CInfo* CInfo::s_singleton = NULL; - -CInfo::CInfo(HWND parent) : - m_parent(parent) -{ - assert(s_singleton == NULL); - s_singleton = this; -} - -CInfo::~CInfo() -{ - s_singleton = NULL; -} - -void -CInfo::doModal() -{ - // do dialog - DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_INFO), - m_parent, (DLGPROC)dlgProc, (LPARAM)this); -} - -void -CInfo::init(HWND hwnd) -{ - // collect info - CString version = - CStringUtil::format(getString(IDS_TITLE).c_str(), kApplication, kVersion); - CString hostname = ARCH->getHostName(); - CString address = ARCH->addrToString(ARCH->nameToAddr(hostname)); - CString userConfig = ARCH->getUserDirectory(); - if (!userConfig.empty()) { - userConfig = ARCH->concatPath(userConfig, CONFIG_NAME); - } - CString sysConfig = ARCH->getSystemDirectory(); - if (!sysConfig.empty()) { - sysConfig = ARCH->concatPath(sysConfig, CONFIG_NAME); - } - - // set info - HWND child; - child = getItem(hwnd, IDC_INFO_VERSION); - setWindowText(child, version); - child = getItem(hwnd, IDC_INFO_HOSTNAME); - setWindowText(child, hostname); - child = getItem(hwnd, IDC_INFO_IP_ADDRESS); - setWindowText(child, address); - child = getItem(hwnd, IDC_INFO_USER_CONFIG); - setWindowText(child, userConfig); - child = getItem(hwnd, IDC_INFO_SYS_CONFIG); - setWindowText(child, sysConfig); - - // focus on okay button - SetFocus(getItem(hwnd, IDOK)); -} - -BOOL -CInfo::doDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM) -{ - switch (message) { - case WM_INITDIALOG: - init(hwnd); - return FALSE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: - case IDCANCEL: - EndDialog(hwnd, 0); - return TRUE; - } - break; - - default: - break; - } - - return FALSE; -} - -BOOL CALLBACK -CInfo::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - return s_singleton->doDlgProc(hwnd, message, wParam, lParam); -} diff --git a/cmd/launcher/CInfo.h b/cmd/launcher/CInfo.h deleted file mode 100644 index cf2d6862..00000000 --- a/cmd/launcher/CInfo.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2006 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef CINFO_H -#define CINFO_H - -#include "CString.h" - -#define WINDOWS_LEAN_AND_MEAN -#include - -//! Info dialog for Microsoft Windows launcher -class CInfo { -public: - CInfo(HWND parent); - ~CInfo(); - - //! @name manipulators - //@{ - - //! Run dialog - /*! - Display and handle the dialog until closed by the user. - */ - void doModal(); - - //@} - //! @name accessors - //@{ - - //@} - -private: - void init(HWND hwnd); - - // message handling - BOOL doDlgProc(HWND, UINT, WPARAM, LPARAM); - static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM); - -private: - static CInfo* s_singleton; - - HWND m_parent; -}; - -#endif diff --git a/cmd/launcher/CScreensLinks.cpp b/cmd/launcher/CScreensLinks.cpp deleted file mode 100644 index 28cf3308..00000000 --- a/cmd/launcher/CScreensLinks.cpp +++ /dev/null @@ -1,858 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2002 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "CConfig.h" -#include "ProtocolTypes.h" -#include "CStringUtil.h" -#include "CArch.h" -#include "CScreensLinks.h" -#include "CAddScreen.h" -#include "LaunchUtil.h" -#include "resource.h" - -// -// CScreensLinks -// - -CScreensLinks* CScreensLinks::s_singleton = NULL; - -CScreensLinks::CScreensLinks(HWND parent, CConfig* config) : - m_parent(parent), - m_mainConfig(config), - m_config(&m_scratchConfig) -{ - assert(s_singleton == NULL); - s_singleton = this; - - // get formatting strings - m_linkFormat = getString(IDS_LINK_FORMAT); - m_intervalFormat = getString(IDS_LINK_INTERVAL_FORMAT); - m_newLinkLabel = getString(IDS_NEW_LINK); - m_sideLabel[kLeft - kFirstDirection] = getString(IDS_SIDE_LEFT); - m_sideLabel[kRight - kFirstDirection] = getString(IDS_SIDE_RIGHT); - m_sideLabel[kTop - kFirstDirection] = getString(IDS_SIDE_TOP); - m_sideLabel[kBottom - kFirstDirection] = getString(IDS_SIDE_BOTTOM); - - // GDI objects - m_redPen = CreatePen(PS_INSIDEFRAME, 1, RGB(255, 0, 0)); -} - -CScreensLinks::~CScreensLinks() -{ - DeleteObject(m_redPen); - s_singleton = NULL; -} - -void -CScreensLinks::doModal() -{ - // do dialog - DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_SCREENS_LINKS), - m_parent, (DLGPROC)dlgProc, (LPARAM)this); -} - -void -CScreensLinks::init(HWND hwnd) -{ - // get initial config - m_scratchConfig = *m_mainConfig; - - // fill side list box (in EDirection order) - HWND child = getItem(hwnd, IDC_SCREENS_SRC_SIDE); - SendMessage(child, CB_ADDSTRING, 0, (LPARAM)TEXT("---")); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_EDGE_LEFT).c_str()); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_EDGE_RIGHT).c_str()); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_EDGE_TOP).c_str()); - SendMessage(child, CB_ADDSTRING, 0, - (LPARAM)getString(IDS_EDGE_BOTTOM).c_str()); - - // create error boxes - m_srcSideError = createErrorBox(hwnd); - m_srcScreenError = createErrorBox(hwnd); - m_dstScreenError = createErrorBox(hwnd); - resizeErrorBoxes(); - - m_selectedLink = -1; - m_editedLink = CEdgeLink(); - m_edgeLinks.clear(); - updateScreens(hwnd, ""); - updateScreensControls(hwnd); - updateLinks(hwnd); - updateLinksControls(hwnd); -} - -bool -CScreensLinks::save(HWND /*hwnd*/) -{ - *m_mainConfig = m_scratchConfig; - return true; -} - -BOOL -CScreensLinks::doDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) { - case WM_INITDIALOG: - init(hwnd); - return TRUE; - - case WM_SIZE: - resizeErrorBoxes(); - break; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: - SetFocus(getItem(hwnd, IDOK)); - if (save(hwnd)) { - EndDialog(hwnd, 0); - } - return TRUE; - - case IDCANCEL: - EndDialog(hwnd, 0); - return TRUE; - - case IDC_SCREENS_SCREENS: - switch (HIWORD(wParam)) { - case LBN_DBLCLK: - editScreen(hwnd); - return TRUE; - - case LBN_SELCHANGE: - updateScreensControls(hwnd); - updateLinkView(hwnd); - return TRUE; - - case LBN_SELCANCEL: - updateScreensControls(hwnd); - updateLinkView(hwnd); - return TRUE; - } - break; - - case IDC_SCREENS_ADD_SCREEN: - addScreen(hwnd); - return TRUE; - - case IDC_SCREENS_REMOVE_SCREEN: - removeScreen(hwnd); - return TRUE; - - case IDC_SCREENS_EDIT_SCREEN: - editScreen(hwnd); - return TRUE; - - case IDC_SCREENS_LINKS: - switch (HIWORD(wParam)) { - case LBN_SELCHANGE: - editLink(hwnd); - return TRUE; - - case LBN_SELCANCEL: - editLink(hwnd); - return TRUE; - } - break; - - case IDC_SCREENS_ADD_LINK: - addLink(hwnd); - return TRUE; - - case IDC_SCREENS_REMOVE_LINK: - removeLink(hwnd); - return TRUE; - - case IDC_SCREENS_SRC_SIDE: - switch (HIWORD(wParam)) { - case CBN_SELCHANGE: - changeSrcSide(hwnd); - break; - } - break; - - case IDC_SCREENS_SRC_SCREEN: - switch (HIWORD(wParam)) { - case CBN_SELCHANGE: - changeSrcScreen(hwnd); - break; - } - break; - - case IDC_SCREENS_DST_SCREEN: - switch (HIWORD(wParam)) { - case CBN_SELCHANGE: - changeDstScreen(hwnd); - break; - } - break; - - case IDC_SCREENS_SRC_START: - switch (HIWORD(wParam)) { - case EN_KILLFOCUS: - changeIntervalStart(hwnd, LOWORD(wParam), - m_editedLink.m_srcInterval); - break; - } - break; - - case IDC_SCREENS_SRC_END: - switch (HIWORD(wParam)) { - case EN_KILLFOCUS: - changeIntervalEnd(hwnd, LOWORD(wParam), - m_editedLink.m_srcInterval); - break; - } - break; - - case IDC_SCREENS_DST_START: - switch (HIWORD(wParam)) { - case EN_KILLFOCUS: - changeIntervalStart(hwnd, LOWORD(wParam), - m_editedLink.m_dstInterval); - break; - } - break; - - case IDC_SCREENS_DST_END: - switch (HIWORD(wParam)) { - case EN_KILLFOCUS: - changeIntervalEnd(hwnd, LOWORD(wParam), - m_editedLink.m_dstInterval); - break; - } - break; - } - - break; - - case WM_CTLCOLORSTATIC: - switch (GetDlgCtrlID((HWND)lParam)) { - case IDC_SCREENS_OVERLAP_ERROR: - SetBkColor((HDC)wParam, GetSysColor(COLOR_3DFACE)); - SetTextColor((HDC)wParam, RGB(255, 0, 0)); - return (BOOL)GetSysColorBrush(COLOR_3DFACE); - } - break; - - // error outlines - case WM_DRAWITEM: { - DRAWITEMSTRUCT* di = (DRAWITEMSTRUCT*)lParam; - if (di->CtlType == ODT_STATIC) { - HGDIOBJ oldPen = SelectObject(di->hDC, m_redPen); - HGDIOBJ oldBrush = SelectObject(di->hDC, - GetStockObject(NULL_BRUSH)); - Rectangle(di->hDC, di->rcItem.left, di->rcItem.top, - di->rcItem.right, di->rcItem.bottom); - SelectObject(di->hDC, oldPen); - SelectObject(di->hDC, oldBrush); - return TRUE; - } - break; - } - - default: - break; - } - - return FALSE; -} - -BOOL CALLBACK -CScreensLinks::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - return s_singleton->doDlgProc(hwnd, message, wParam, lParam); -} - -CString -CScreensLinks::getSelectedScreen(HWND hwnd) const -{ - HWND child = getItem(hwnd, IDC_SCREENS_SCREENS); - LRESULT index = SendMessage(child, LB_GETCURSEL, 0, 0); - if (index == LB_ERR) { - return CString(); - } - - LRESULT size = SendMessage(child, LB_GETTEXTLEN, index, 0); - char* buffer = new char[size + 1]; - SendMessage(child, LB_GETTEXT, index, (LPARAM)buffer); - buffer[size] = '\0'; - CString result(buffer); - delete[] buffer; - return result; -} - -void -CScreensLinks::addScreen(HWND hwnd) -{ - CAddScreen dialog(hwnd, m_config, ""); - if (dialog.doModal()) { - updateScreens(hwnd, dialog.getName()); - updateScreensControls(hwnd); - updateLinks(hwnd); - updateLinksControls(hwnd); - } -} - -void -CScreensLinks::editScreen(HWND hwnd) -{ - CString oldName = getSelectedScreen(hwnd); - CAddScreen dialog(hwnd, m_config, oldName); - if (dialog.doModal()) { - CString newName = dialog.getName(); - - // rename screens in the edge list - if (newName != oldName) { - for (size_t i = 0; i < m_edgeLinks.size(); ++i) { - m_edgeLinks[i].rename(oldName, newName); - } - m_editedLink.rename(oldName, newName); - } - - updateScreens(hwnd, newName); - updateScreensControls(hwnd); - updateLinks(hwnd); - updateLinksControls(hwnd); - } -} - -void -CScreensLinks::removeScreen(HWND hwnd) -{ - // remove screen from config (this also removes aliases) - m_config->removeScreen(getSelectedScreen(hwnd)); - - // update dialog - updateScreens(hwnd, ""); - updateScreensControls(hwnd); - updateLinks(hwnd); - updateLinksControls(hwnd); -} - -void -CScreensLinks::addLink(HWND hwnd) -{ - if (m_editedLink.connect(m_config)) { - m_editedLink = CEdgeLink(); - updateLinks(hwnd); - updateLinksControls(hwnd); - } -} - -void -CScreensLinks::editLink(HWND hwnd) -{ - // get selection - HWND child = getItem(hwnd, IDC_SCREENS_LINKS); - DWORD i = (DWORD)SendMessage(child, LB_GETCURSEL, 0, 0); - if (i != LB_ERR && i != (DWORD)m_edgeLinks.size()) { - // existing link - m_selectedLink = (SInt32)SendMessage(child, LB_GETITEMDATA, i, 0); - m_editedLink = m_edgeLinks[m_selectedLink]; - } - else { - // new link - m_selectedLink = -1; - m_editedLink = CEdgeLink(); - } - updateLinksControls(hwnd); -} - -void -CScreensLinks::removeLink(HWND hwnd) -{ - if (m_editedLink.disconnect(m_config)) { - updateLinks(hwnd); - updateLinksControls(hwnd); - } -} - -void -CScreensLinks::updateScreens(HWND hwnd, const CString& selectName) -{ - HWND child; - - // set screen list - child = getItem(hwnd, IDC_SCREENS_SCREENS); - SendMessage(child, LB_RESETCONTENT, 0, 0); - for (CConfig::const_iterator index = m_config->begin(); - index != m_config->end(); ) { - const CString& name = *index; - ++index; - if (index != m_config->end()) { - SendMessage(child, LB_INSERTSTRING, - (WPARAM)-1, (LPARAM)name.c_str()); - } - else { - SendMessage(child, LB_ADDSTRING, 0, (LPARAM)name.c_str()); - } - } - - // find the named screen - if (!selectName.empty()) { - DWORD i = (DWORD)SendMessage(child, LB_FINDSTRINGEXACT, - (UINT)-1, (LPARAM)selectName.c_str()); - if (i != LB_ERR) { - SendMessage(child, LB_SETSEL, TRUE, i); - } - } -} - -void -CScreensLinks::updateScreensControls(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_SCREENS_SCREENS); - bool screenSelected = (SendMessage(child, LB_GETCURSEL, 0, 0) != LB_ERR); - - enableItem(hwnd, IDC_SCREENS_ADD_SCREEN, TRUE); - enableItem(hwnd, IDC_SCREENS_EDIT_SCREEN, screenSelected); - enableItem(hwnd, IDC_SCREENS_REMOVE_SCREEN, screenSelected); -} - -void -CScreensLinks::updateLinks(HWND hwnd) -{ - HWND links = getItem(hwnd, IDC_SCREENS_LINKS); - HWND srcScreens = getItem(hwnd, IDC_SCREENS_SRC_SCREEN); - HWND dstScreens = getItem(hwnd, IDC_SCREENS_DST_SCREEN); - - // get old selection - CEdgeLink oldLink; - if (m_selectedLink != -1) { - oldLink = m_edgeLinks[m_selectedLink]; - } - - // clear links and screens - SendMessage(links, LB_RESETCONTENT, 0, 0); - SendMessage(srcScreens, CB_RESETCONTENT, 0, 0); - SendMessage(dstScreens, CB_RESETCONTENT, 0, 0); - m_edgeLinks.clear(); - - // add "no screen" items - SendMessage(srcScreens, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)TEXT("----")); - SendMessage(dstScreens, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)TEXT("----")); - - // add links and screens - for (CConfig::const_iterator i = m_config->begin(); - i != m_config->end(); ++i) { - const CString& name = *i; - - // add screen - SendMessage(srcScreens, CB_INSERTSTRING, (WPARAM)-1, - (LPARAM)name.c_str()); - SendMessage(dstScreens, CB_INSERTSTRING, (WPARAM)-1, - (LPARAM)name.c_str()); - - // add links for screen - for (CConfig::link_const_iterator j = m_config->beginNeighbor(name), - n = m_config->endNeighbor(name); - j != n; ++j) { - DWORD k = (DWORD)m_edgeLinks.size(); - m_edgeLinks.push_back(CEdgeLink(name, *j)); - SendMessage(links, LB_INSERTSTRING, (WPARAM)-1, - (LPARAM)formatLink(m_edgeLinks.back()).c_str()); - SendMessage(links, LB_SETITEMDATA, (WPARAM)k, (LPARAM)k); - } - } - - // add "new link" item to sort - SendMessage(links, LB_ADDSTRING, 0, (LPARAM)m_newLinkLabel.c_str()); - - // remove the "new link" item then insert it on the end - DWORD i = (DWORD)SendMessage(links, LB_FINDSTRINGEXACT, - (UINT)-1, (LPARAM)m_newLinkLabel.c_str()); - if (i != LB_ERR) { - SendMessage(links, LB_DELETESTRING, i, 0); - } - SendMessage(links, LB_INSERTSTRING, (WPARAM)-1, - (LPARAM)getString(IDS_NEW_LINK).c_str()); - SendMessage(links, LB_SETITEMDATA, (WPARAM)m_edgeLinks.size(), - (LPARAM)-1); - - // select the same link as before - SendMessage(links, LB_SETCURSEL, (WPARAM)m_edgeLinks.size(), 0); - if (m_selectedLink != -1) { - m_selectedLink = -1; - for (SInt32 j = 0; j < (SInt32)m_edgeLinks.size(); ++j) { - if (m_edgeLinks[j] == oldLink) { - // found matching link - m_selectedLink = j; - for (UInt32 k = 0; k < (UInt32)m_edgeLinks.size(); ++k) { - if (SendMessage(links, LB_GETITEMDATA, k, 0) == (int)j) { - SendMessage(links, LB_SETCURSEL, k, 0); - break; - } - } - break; - } - } - - // if we can't find the link anymore then reset edited link - if (m_selectedLink == -1) { - m_editedLink = CEdgeLink(); - } - } -} - -void -CScreensLinks::updateLinksControls(HWND hwnd) -{ - // get selection. select "new link" if nothing is selected. - HWND child = getItem(hwnd, IDC_SCREENS_LINKS); - if (m_selectedLink == -1) { - SendMessage(child, LB_SETCURSEL, m_edgeLinks.size(), 0); - } - - // enable/disable remove button - enableItem(hwnd, IDC_SCREENS_REMOVE_LINK, m_selectedLink != -1); - - // fill link entry controls from m_editedLink - updateLinkEditControls(hwnd, m_editedLink); - updateLinkValid(hwnd, m_editedLink); - updateLinkView(hwnd); -} - -void -CScreensLinks::changeSrcSide(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_SCREENS_SRC_SIDE); - m_editedLink.m_srcSide = (EDirection)SendMessage(child, CB_GETCURSEL, 0, 0); - updateLink(hwnd); -} - -void -CScreensLinks::changeSrcScreen(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_SCREENS_SRC_SCREEN); - m_editedLink.m_srcName = getWindowText(child); - updateLink(hwnd); -} - -void -CScreensLinks::changeDstScreen(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_SCREENS_DST_SCREEN); - m_editedLink.m_dstName = getWindowText(child); - updateLink(hwnd); -} - -void -CScreensLinks::changeIntervalStart(HWND hwnd, int id, CConfig::CInterval& i) -{ - int x = (int)GetDlgItemInt(hwnd, id, NULL, FALSE); - if (x < 0) { - x = 0; - } - else if (x > 99) { - x = 99; - } - - i.first = 0.01f * (float)x; - if (i.first >= i.second) { - i.second = 0.01f * (float)(x + 1); - } - - updateLinkIntervalControls(hwnd, m_editedLink); - updateLink(hwnd); -} - -void -CScreensLinks::changeIntervalEnd(HWND hwnd, int id, CConfig::CInterval& i) -{ - int x = (int)GetDlgItemInt(hwnd, id, NULL, FALSE); - if (x < 1) { - x = 1; - } - else if (x > 100) { - x = 100; - } - - i.second = 0.01f * (float)x; - if (i.first >= i.second) { - i.first = 0.01f * (float)(x - 1); - } - - updateLinkIntervalControls(hwnd, m_editedLink); - updateLink(hwnd); -} - -void -CScreensLinks::selectScreen(HWND hwnd, int id, const CString& name) -{ - HWND child = getItem(hwnd, id); - DWORD i = (DWORD)SendMessage(child, CB_FINDSTRINGEXACT, (WPARAM)-1, - (LPARAM)name.c_str()); - if (i == CB_ERR) { - // no match, select no screen - SendMessage(child, CB_SETCURSEL, 0, 0); - } - else { - SendMessage(child, CB_SETCURSEL, i, 0); - } -} - -void -CScreensLinks::updateLinkEditControls(HWND hwnd, const CEdgeLink& link) -{ - // fill link entry controls from link - HWND child = getItem(hwnd, IDC_SCREENS_SRC_SIDE); - SendMessage(child, CB_SETCURSEL, link.m_srcSide, 0); - selectScreen(hwnd, IDC_SCREENS_SRC_SCREEN, link.m_srcName); - selectScreen(hwnd, IDC_SCREENS_DST_SCREEN, link.m_dstName); - updateLinkIntervalControls(hwnd, link); -} - -void -CScreensLinks::updateLinkIntervalControls(HWND hwnd, const CEdgeLink& link) -{ - HWND child; - - // src interval - child = getItem(hwnd, IDC_SCREENS_SRC_START); - setWindowText(child, formatIntervalValue(link.m_srcInterval.first)); - child = getItem(hwnd, IDC_SCREENS_SRC_END); - setWindowText(child, formatIntervalValue(link.m_srcInterval.second)); - - // dst interval - child = getItem(hwnd, IDC_SCREENS_DST_START); - setWindowText(child, formatIntervalValue(link.m_dstInterval.first)); - child = getItem(hwnd, IDC_SCREENS_DST_END); - setWindowText(child, formatIntervalValue(link.m_dstInterval.second)); -} - -void -CScreensLinks::updateLink(HWND hwnd) -{ - updateLinkValid(hwnd, m_editedLink); - - // update link in config - if (m_selectedLink != -1 && m_editedLinkIsValid) { - // editing an existing link and entry is valid - if (m_edgeLinks[m_selectedLink].disconnect(m_config)) { - // successfully removed old link - if (!m_editedLink.connect(m_config)) { - // couldn't set new link so restore old link - m_edgeLinks[m_selectedLink].connect(m_config); - } - else { - m_edgeLinks[m_selectedLink] = m_editedLink; - updateLinks(hwnd); - updateLinkEditControls(hwnd, m_editedLink); - } - } - } - - updateLinkView(hwnd); -} - -void -CScreensLinks::updateLinkValid(HWND hwnd, const CEdgeLink& link) -{ - m_editedLinkIsValid = true; - - // check source side and screen - if (link.m_srcSide == kNoDirection) { - m_editedLinkIsValid = false; - ShowWindow(m_srcSideError, SW_SHOWNA); - } - else { - ShowWindow(m_srcSideError, SW_HIDE); - } - if (!m_config->isCanonicalName(link.m_srcName)) { - m_editedLinkIsValid = false; - ShowWindow(m_srcScreenError, SW_SHOWNA); - } - else { - ShowWindow(m_srcScreenError, SW_HIDE); - } - - // check for overlap. if editing a link we must remove it, then - // check for overlap and restore the old link. - bool overlap = false; - if (m_editedLinkIsValid) { - if (m_selectedLink == -1) { - if (link.overlaps(m_config)) { - m_editedLinkIsValid = false; - overlap = true; - } - } - else { - if (m_edgeLinks[m_selectedLink].disconnect(m_config)) { - overlap = link.overlaps(m_config); - m_edgeLinks[m_selectedLink].connect(m_config); - if (overlap) { - m_editedLinkIsValid = false; - } - } - } - } - ShowWindow(getItem(hwnd, IDC_SCREENS_OVERLAP_ERROR), - overlap ? SW_SHOWNA : SW_HIDE); - - // check dst screen - if (!m_config->isCanonicalName(link.m_dstName)) { - m_editedLinkIsValid = false; - ShowWindow(m_dstScreenError, SW_SHOWNA); - } - else { - ShowWindow(m_dstScreenError, SW_HIDE); - } - - // update add link button - enableItem(hwnd, IDC_SCREENS_ADD_LINK, - m_selectedLink == -1 && m_editedLinkIsValid); -} - -void -CScreensLinks::updateLinkView(HWND /*hwnd*/) -{ - // XXX -- draw visual of selected screen, highlighting selected link -} - -HWND -CScreensLinks::createErrorBox(HWND parent) -{ - return CreateWindow(TEXT("STATIC"), TEXT(""), - WS_CHILD | SS_OWNERDRAW, - 0, 0, 1, 1, - parent, (HMENU)-1, - s_instance, NULL); -} - -void -CScreensLinks::resizeErrorBoxes() -{ - HWND hwnd = GetParent(m_srcSideError); - resizeErrorBox(m_srcSideError, getItem(hwnd, IDC_SCREENS_SRC_SIDE)); - resizeErrorBox(m_srcScreenError, getItem(hwnd, IDC_SCREENS_SRC_SCREEN)); - resizeErrorBox(m_dstScreenError, getItem(hwnd, IDC_SCREENS_DST_SCREEN)); -} - -void -CScreensLinks::resizeErrorBox(HWND box, HWND assoc) -{ - RECT rect; - GetWindowRect(assoc, &rect); - MapWindowPoints(NULL, GetParent(box), (POINT*)&rect, 2); - SetWindowPos(box, HWND_TOP, rect.left - 1, rect.top - 1, - rect.right - rect.left + 2, - rect.bottom - rect.top + 2, SWP_NOACTIVATE); -} - -CString -CScreensLinks::formatIntervalValue(float x) const -{ - return CStringUtil::print("%d", (int)(x * 100.0f + 0.5f)); -} - -CString -CScreensLinks::formatInterval(const CConfig::CInterval& i) const -{ - if (i.first == 0.0f && i.second == 1.0f) { - return ""; - } - else { - CString start = formatIntervalValue(i.first); - CString end = formatIntervalValue(i.second); - return CStringUtil::format(m_intervalFormat.c_str(), - start.c_str(), end.c_str()); - } -} - -CString -CScreensLinks::formatLink(const CEdgeLink& link) const -{ - CString srcInterval = formatInterval(link.m_srcInterval); - CString dstInterval = formatInterval(link.m_dstInterval); - return CStringUtil::format(m_linkFormat.c_str(), - link.m_srcName.c_str(), srcInterval.c_str(), - m_sideLabel[link.m_srcSide - kFirstDirection].c_str(), - link.m_dstName.c_str(), dstInterval.c_str()); -} - -// -// CScreensLinks::CEdgeLink -// - -CScreensLinks::CEdgeLink::CEdgeLink() : - m_srcName(), - m_srcSide(kNoDirection), - m_srcInterval(0.0f, 1.0f), - m_dstName(), - m_dstInterval(0.0f, 1.0f) -{ - // do nothing -} - -CScreensLinks::CEdgeLink::CEdgeLink(const CString& name, - const CConfigLink& link) : - m_srcName(name), - m_srcSide(link.first.getSide()), - m_srcInterval(link.first.getInterval()), - m_dstName(link.second.getName()), - m_dstInterval(link.second.getInterval()) -{ - // do nothing -} - -bool -CScreensLinks::CEdgeLink::connect(CConfig* config) -{ - return config->connect(m_srcName, m_srcSide, - m_srcInterval.first, m_srcInterval.second, - m_dstName, - m_dstInterval.first, m_dstInterval.second); -} - -bool -CScreensLinks::CEdgeLink::disconnect(CConfig* config) -{ - return config->disconnect(m_srcName, m_srcSide, 0.5f * - (m_srcInterval.first + m_srcInterval.second)); -} - -void -CScreensLinks::CEdgeLink::rename(const CString& oldName, const CString& newName) -{ - if (m_srcName == oldName) { - m_srcName = newName; - } - if (m_dstName == oldName) { - m_dstName = newName; - } -} - -bool -CScreensLinks::CEdgeLink::overlaps(const CConfig* config) const -{ - return config->hasNeighbor(m_srcName, m_srcSide, - m_srcInterval.first, m_srcInterval.second); -} - -bool -CScreensLinks::CEdgeLink::operator==(const CEdgeLink& x) const -{ - return (m_srcName == x.m_srcName && - m_srcSide == x.m_srcSide && - m_srcInterval == x.m_srcInterval && - m_dstName == x.m_dstName && - m_dstInterval == x.m_dstInterval); -} diff --git a/cmd/launcher/CScreensLinks.h b/cmd/launcher/CScreensLinks.h deleted file mode 100644 index 75e0d0f1..00000000 --- a/cmd/launcher/CScreensLinks.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2003 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef CSCREENSLINKS_H -#define CSCREENSLINKS_H - -#include "CConfig.h" -#include "ProtocolTypes.h" -#include "CString.h" - -#define WINDOWS_LEAN_AND_MEAN -#include - -//! Screens and links dialog for Microsoft Windows launcher -class CScreensLinks { -public: - CScreensLinks(HWND parent, CConfig*); - ~CScreensLinks(); - - //! @name manipulators - //@{ - - //! Run dialog - /*! - Display and handle the dialog until closed by the user. - */ - void doModal(); - - //@} - //! @name accessors - //@{ - - - //@} - -private: - typedef std::pair CConfigLink; - struct CEdgeLink { - public: - CEdgeLink(); - CEdgeLink(const CString& name, const CConfigLink&); - - bool connect(CConfig*); - bool disconnect(CConfig*); - void rename(const CString& oldName, const CString& newName); - - bool overlaps(const CConfig* config) const; - bool operator==(const CEdgeLink&) const; - - public: - CString m_srcName; - EDirection m_srcSide; - CConfig::CInterval m_srcInterval; - CString m_dstName; - CConfig::CInterval m_dstInterval; - }; - typedef std::vector CEdgeLinkList; - - void init(HWND hwnd); - bool save(HWND hwnd); - - CString getSelectedScreen(HWND hwnd) const; - void addScreen(HWND hwnd); - void editScreen(HWND hwnd); - void removeScreen(HWND hwnd); - void addLink(HWND hwnd); - void editLink(HWND hwnd); - void removeLink(HWND hwnd); - - void updateScreens(HWND hwnd, const CString& name); - void updateScreensControls(HWND hwnd); - void updateLinks(HWND hwnd); - void updateLinksControls(HWND hwnd); - - void changeSrcSide(HWND hwnd); - void changeSrcScreen(HWND hwnd); - void changeDstScreen(HWND hwnd); - void changeIntervalStart(HWND hwnd, int id, - CConfig::CInterval&); - void changeIntervalEnd(HWND hwnd, int id, - CConfig::CInterval&); - - void selectScreen(HWND hwnd, int id, const CString& name); - void updateLinkEditControls(HWND hwnd, - const CEdgeLink& link); - void updateLinkIntervalControls(HWND hwnd, - const CEdgeLink& link); - void updateLink(HWND hwnd); - void updateLinkValid(HWND hwnd, const CEdgeLink& link); - - void updateLinkView(HWND hwnd); - - HWND createErrorBox(HWND parent); - void resizeErrorBoxes(); - void resizeErrorBox(HWND box, HWND assoc); - - CString formatIntervalValue(float) const; - CString formatInterval(const CConfig::CInterval&) const; - CString formatLink(const CEdgeLink&) const; - - // message handling - BOOL doDlgProc(HWND, UINT, WPARAM, LPARAM); - static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM); - -private: - static CScreensLinks* s_singleton; - - HWND m_parent; - CConfig* m_mainConfig; - CConfig m_scratchConfig; - CConfig* m_config; - - CString m_linkFormat; - CString m_intervalFormat; - CString m_newLinkLabel; - CString m_sideLabel[kNumDirections]; - CEdgeLinkList m_edgeLinks; - SInt32 m_selectedLink; - CEdgeLink m_editedLink; - bool m_editedLinkIsValid; - HPEN m_redPen; - HWND m_srcSideError; - HWND m_srcScreenError; - HWND m_dstScreenError; -}; - -#endif diff --git a/cmd/launcher/LaunchUtil.cpp b/cmd/launcher/LaunchUtil.cpp deleted file mode 100644 index ad3ebe45..00000000 --- a/cmd/launcher/LaunchUtil.cpp +++ /dev/null @@ -1,264 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2002 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "CConfig.h" -#include "LaunchUtil.h" -#include "CMSWindowsUtil.h" -#include "CArch.h" -#include "resource.h" -#include "stdfstream.h" - -size_t s_showingDialog = 0; - -CString -getString(DWORD id) -{ - return CMSWindowsUtil::getString(s_instance, id); -} - -CString -getErrorString(DWORD error) -{ - return CMSWindowsUtil::getErrorString(s_instance, error, IDS_ERROR); -} - -void -showError(HWND hwnd, const CString& msg) -{ - CString title = getString(IDS_ERROR); - ++s_showingDialog; - MessageBox(hwnd, msg.c_str(), title.c_str(), MB_OK | MB_APPLMODAL); - --s_showingDialog; -} - -void -askOkay(HWND hwnd, const CString& title, const CString& msg) -{ - ++s_showingDialog; - MessageBox(hwnd, msg.c_str(), title.c_str(), MB_OK | MB_APPLMODAL); - --s_showingDialog; -} - -bool -askVerify(HWND hwnd, const CString& msg) -{ - CString title = getString(IDS_VERIFY); - ++s_showingDialog; - int result = MessageBox(hwnd, msg.c_str(), - title.c_str(), MB_OKCANCEL | MB_APPLMODAL); - --s_showingDialog; - return (result == IDOK); -} - -bool -isShowingDialog() -{ - return (s_showingDialog != 0); -} - -void -setWindowText(HWND hwnd, const CString& msg) -{ - SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM)msg.c_str()); -} - -CString -getWindowText(HWND hwnd) -{ - LRESULT size = SendMessage(hwnd, WM_GETTEXTLENGTH, 0, 0); - char* buffer = new char[size + 1]; - SendMessage(hwnd, WM_GETTEXT, size + 1, (LPARAM)buffer); - buffer[size] = '\0'; - CString result(buffer); - delete[] buffer; - return result; -} - -HWND -getItem(HWND hwnd, int id) -{ - return GetDlgItem(hwnd, id); -} - -void -enableItem(HWND hwnd, int id, bool enabled) -{ - EnableWindow(GetDlgItem(hwnd, id), enabled); -} - -void -setItemChecked(HWND hwnd, bool checked) -{ - SendMessage(hwnd, BM_SETCHECK, checked ? BST_CHECKED : BST_UNCHECKED, 0); -} - -bool -isItemChecked(HWND hwnd) -{ - return (SendMessage(hwnd, BM_GETCHECK, 0, 0) == BST_CHECKED); -} - -CString -getAppPath(const CString& appName) -{ - // prepare path to app - char myPathname[MAX_PATH]; - GetModuleFileName(s_instance, myPathname, MAX_PATH); - const char* myBasename = ARCH->getBasename(myPathname); - CString appPath = CString(myPathname, myBasename - myPathname); - appPath += appName; - return appPath; -} - -static -void -getFileTime(const CString& path, time_t& t) -{ - struct _stat s; - if (_stat(path.c_str(), &s) != -1) { - t = s.st_mtime; - } -} - -bool -isConfigNewer(time_t& oldTime, bool userConfig) -{ - time_t newTime = oldTime; - if (userConfig) { - CString path = ARCH->getUserDirectory(); - if (!path.empty()) { - path = ARCH->concatPath(path, CONFIG_NAME); - getFileTime(path, newTime); - } - } - else { - CString path = ARCH->getSystemDirectory(); - if (!path.empty()) { - path = ARCH->concatPath(path, CONFIG_NAME); - getFileTime(path, newTime); - } - } - bool result = (newTime > oldTime); - oldTime = newTime; - return result; -} - -static -bool -loadConfig(const CString& pathname, CConfig& config) -{ - try { - std::ifstream stream(pathname.c_str()); - if (stream) { - stream >> config; - return true; - } - } - catch (...) { - // ignore - } - return false; -} - -bool -loadConfig(CConfig& config, time_t& t, bool& userConfig) -{ - // load configuration - bool configLoaded = false; - CString path = ARCH->getUserDirectory(); - if (!path.empty()) { - // try loading the user's configuration - path = ARCH->concatPath(path, CONFIG_NAME); - if (loadConfig(path, config)) { - configLoaded = true; - userConfig = true; - getFileTime(path, t); - } - else { - // try the system-wide config file - path = ARCH->getSystemDirectory(); - if (!path.empty()) { - path = ARCH->concatPath(path, CONFIG_NAME); - if (loadConfig(path, config)) { - configLoaded = true; - userConfig = false; - getFileTime(path, t); - } - } - } - } - return configLoaded; -} - -static -bool -saveConfig(const CString& pathname, const CConfig& config) -{ - try { - std::ofstream stream(pathname.c_str()); - if (stream) { - stream << config; - return !!stream; - } - } - catch (...) { - // ignore - } - return false; -} - -bool -saveConfig(const CConfig& config, bool sysOnly, time_t& t) -{ - // try saving the user's configuration - if (!sysOnly) { - CString path = ARCH->getUserDirectory(); - if (!path.empty()) { - path = ARCH->concatPath(path, CONFIG_NAME); - if (saveConfig(path, config)) { - getFileTime(path, t); - return true; - } - } - } - - // try the system-wide config file - else { - CString path = ARCH->getSystemDirectory(); - if (!path.empty()) { - path = ARCH->concatPath(path, CONFIG_NAME); - if (saveConfig(path, config)) { - getFileTime(path, t); - return true; - } - } - } - - return false; -} - -const TCHAR* const* -getSettingsPath() -{ - static const TCHAR* s_keyNames[] = { - TEXT("Software"), - TEXT("Synergy"), - TEXT("Synergy"), - NULL - }; - return s_keyNames; -} diff --git a/cmd/launcher/LaunchUtil.h b/cmd/launcher/LaunchUtil.h deleted file mode 100644 index eafbee2a..00000000 --- a/cmd/launcher/LaunchUtil.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2002 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef LAUNCHUTIL_H -#define LAUNCHUTIL_H - -#include "CString.h" - -#define WINDOWS_LEAN_AND_MEAN -#include -#include -#include - -#define CLIENT_APP "synergyc.exe" -#define SERVER_APP "synergys.exe" -#define CONFIG_NAME "synergy.sgc" - -class CConfig; - -// client must define this and set it before calling any function here -extern HINSTANCE s_instance; - -CString getString(DWORD id); -CString getErrorString(DWORD error); - -void showError(HWND hwnd, const CString& msg); -void askOkay(HWND hwnd, const CString& title, - const CString& msg); -bool askVerify(HWND hwnd, const CString& msg); -bool isShowingDialog(); - -void setWindowText(HWND hwnd, const CString& msg); -CString getWindowText(HWND hwnd); - -HWND getItem(HWND hwnd, int id); -void enableItem(HWND hwnd, int id, bool enabled); - -void setItemChecked(HWND, bool); -bool isItemChecked(HWND); - -CString getAppPath(const CString& appName); - -bool isConfigNewer(time_t&, bool userConfig); -bool loadConfig(CConfig& config, time_t&, bool& userConfig); -bool saveConfig(const CConfig& config, - bool sysOnly, time_t&); - -const TCHAR* const* getSettingsPath(); - -#endif diff --git a/cmd/launcher/launcher.cpp b/cmd/launcher/launcher.cpp deleted file mode 100644 index 007ecb48..00000000 --- a/cmd/launcher/launcher.cpp +++ /dev/null @@ -1,759 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2002 Chris Schoeneman, Nick Bolton, Sorin Sbarnea - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "CConfig.h" -#include "KeyTypes.h" -#include "OptionTypes.h" -#include "ProtocolTypes.h" -#include "CLog.h" -#include "CStringUtil.h" -#include "CArch.h" -#include "CArchMiscWindows.h" -#include "XArch.h" -#include "Version.h" -#include "stdvector.h" -#include "resource.h" - -// these must come after the above because it includes windows.h -#include "LaunchUtil.h" -#include "CAddScreen.h" -#include "CAdvancedOptions.h" -#include "CAutoStart.h" -#include "CGlobalOptions.h" -#include "CHotkeyOptions.h" -#include "CInfo.h" -#include "CScreensLinks.h" - -typedef std::vector CStringList; - -class CChildWaitInfo { -public: - HWND m_dialog; - HANDLE m_child; - DWORD m_childID; - HANDLE m_ready; - HANDLE m_stop; -}; - -static const char* s_debugName[][2] = { - { TEXT("Error"), "ERROR" }, - { TEXT("Warning"), "WARNING" }, - { TEXT("Note"), "NOTE" }, - { TEXT("Info"), "INFO" }, - { TEXT("Debug"), "DEBUG" }, - { TEXT("Debug1"), "DEBUG1" }, - { TEXT("Debug2"), "DEBUG2" } -}; -static const int s_defaultDebug = 1; // WARNING -static const int s_minTestDebug = 3; // INFO - -HINSTANCE s_instance = NULL; - -static CGlobalOptions* s_globalOptions = NULL; -static CAdvancedOptions* s_advancedOptions = NULL; -static CHotkeyOptions* s_hotkeyOptions = NULL; -static CScreensLinks* s_screensLinks = NULL; -static CInfo* s_info = NULL; - -static bool s_userConfig = true; -static time_t s_configTime = 0; -static CConfig s_lastConfig; - -static const TCHAR* s_mainClass = TEXT("GoSynergy"); -static const TCHAR* s_layoutClass = TEXT("SynergyLayout"); - -enum SaveMode { - SAVE_QUITING, - SAVE_NORMAL, - SAVE_QUIET -}; - -// -// program arguments -// - -#define ARG CArgs::s_instance - -class CArgs { -public: - CArgs() { s_instance = this; } - ~CArgs() { s_instance = NULL; } - -public: - static CArgs* s_instance; - CConfig m_config; - CStringList m_screens; -}; - -CArgs* CArgs::s_instance = NULL; - - -static -BOOL CALLBACK -addDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); - -static -bool -isClientChecked(HWND hwnd) -{ - HWND child = getItem(hwnd, IDC_MAIN_CLIENT_RADIO); - return isItemChecked(child); -} - -static -void -enableMainWindowControls(HWND hwnd) -{ - bool client = isClientChecked(hwnd); - enableItem(hwnd, IDC_MAIN_CLIENT_SERVER_NAME_LABEL, client); - enableItem(hwnd, IDC_MAIN_CLIENT_SERVER_NAME_EDIT, client); - enableItem(hwnd, IDC_MAIN_SERVER_SCREENS_LABEL, !client); - enableItem(hwnd, IDC_MAIN_SCREENS, !client); - enableItem(hwnd, IDC_MAIN_OPTIONS, !client); - enableItem(hwnd, IDC_MAIN_HOTKEYS, !client); -} - -static -bool -execApp(const char* app, const CString& cmdLine, PROCESS_INFORMATION* procInfo) -{ - // prepare startup info - STARTUPINFO startup; - startup.cb = sizeof(startup); - startup.lpReserved = NULL; - startup.lpDesktop = NULL; - startup.lpTitle = NULL; - startup.dwX = (DWORD)CW_USEDEFAULT; - startup.dwY = (DWORD)CW_USEDEFAULT; - startup.dwXSize = (DWORD)CW_USEDEFAULT; - startup.dwYSize = (DWORD)CW_USEDEFAULT; - startup.dwXCountChars = 0; - startup.dwYCountChars = 0; - startup.dwFillAttribute = 0; - startup.dwFlags = STARTF_FORCEONFEEDBACK; - startup.wShowWindow = SW_SHOWDEFAULT; - startup.cbReserved2 = 0; - startup.lpReserved2 = NULL; - startup.hStdInput = NULL; - startup.hStdOutput = NULL; - startup.hStdError = NULL; - - // prepare path to app - CString appPath = getAppPath(app); - - // put path to app in command line - CString commandLine = "\""; - commandLine += appPath; - commandLine += "\" "; - commandLine += cmdLine; - - // start child - if (CreateProcess(NULL, (char*)commandLine.c_str(), - NULL, - NULL, - FALSE, - CREATE_DEFAULT_ERROR_MODE | - CREATE_NEW_PROCESS_GROUP | - NORMAL_PRIORITY_CLASS, - NULL, - NULL, - &startup, - procInfo) == 0) { - return false; - } - else { - return true; - } -} - -static -CString -getCommandLine(HWND hwnd, bool testing, bool silent) -{ - CString cmdLine; - - // add constant testing args - if (testing) { - cmdLine += " -z --no-restart --no-daemon"; - } - - // can't start as service on NT - else if (!CArchMiscWindows::isWindows95Family()) { - cmdLine += " --no-daemon"; - } - - // get the server name - CString server; - bool isClient = isClientChecked(hwnd); - if (isClient) { - // check server name - HWND child = getItem(hwnd, IDC_MAIN_CLIENT_SERVER_NAME_EDIT); - server = getWindowText(child); - if (!ARG->m_config.isValidScreenName(server)) { - if (!silent) { - showError(hwnd, CStringUtil::format( - getString(IDS_INVALID_SERVER_NAME).c_str(), - server.c_str())); - } - SetFocus(child); - return CString(); - } - - // compare server name to local host. a common error - // is to provide the client's name for the server. we - // don't bother to check the addresses though that'd be - // more accurate. - if (CStringUtil::CaselessCmp::equal(ARCH->getHostName(), server)) { - if (!silent) { - showError(hwnd, CStringUtil::format( - getString(IDS_SERVER_IS_CLIENT).c_str(), - server.c_str())); - } - SetFocus(child); - return CString(); - } - } - - // debug level. always include this. - if (true) { - HWND child = getItem(hwnd, IDC_MAIN_DEBUG); - int debug = (int)SendMessage(child, CB_GETCURSEL, 0, 0); - - // if testing then we force the debug level to be no less than - // s_minTestDebug. what's the point of testing if you can't - // see the debugging info? - if (testing && debug < s_minTestDebug) { - debug = s_minTestDebug; - } - - cmdLine += " --debug "; - cmdLine += s_debugName[debug][1]; - } - - // add advanced options - cmdLine += s_advancedOptions->getCommandLine(isClient, server); - - return cmdLine; -} - -static -bool -launchApp(HWND hwnd, bool testing, HANDLE* thread, DWORD* threadID) -{ - if (thread != NULL) { - *thread = NULL; - } - if (threadID != NULL) { - *threadID = 0; - } - - // start daemon if it's installed and we're not testing - if (!testing && CAutoStart::startDaemon()) { - return true; - } - - // decide if client or server - const bool isClient = isClientChecked(hwnd); - const char* app = isClient ? CLIENT_APP : SERVER_APP; - - // prepare command line - CString cmdLine = getCommandLine(hwnd, testing, false); - if (cmdLine.empty()) { - return false; - } - - // start child - PROCESS_INFORMATION procInfo; - if (!execApp(app, cmdLine, &procInfo)) { - showError(hwnd, CStringUtil::format( - getString(IDS_STARTUP_FAILED).c_str(), - getErrorString(GetLastError()).c_str())); - return false; - } - - // don't need process handle - CloseHandle(procInfo.hProcess); - - // save thread handle and thread ID if desired - if (thread != NULL) { - *thread = procInfo.hThread; - } - if (threadID != NULL) { - *threadID = procInfo.dwThreadId; - } - - return true; -} - -static -BOOL CALLBACK -waitDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - // only one wait dialog at a time! - static CChildWaitInfo* info = NULL; - - switch (message) { - case WM_INITDIALOG: - // save info pointer - info = reinterpret_cast(lParam); - - // save hwnd - info->m_dialog = hwnd; - - // signal ready - SetEvent(info->m_ready); - - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDCANCEL: - case IDOK: - // signal stop - SetEvent(info->m_stop); - - // done - EndDialog(hwnd, 0); - return TRUE; - } - } - - return FALSE; -} - -static -DWORD WINAPI -waitForChildThread(LPVOID vinfo) -{ - CChildWaitInfo* info = reinterpret_cast(vinfo); - - // wait for ready - WaitForSingleObject(info->m_ready, INFINITE); - - // wait for thread to complete or stop event - HANDLE handles[2]; - handles[0] = info->m_child; - handles[1] = info->m_stop; - DWORD n = WaitForMultipleObjects(2, handles, FALSE, INFINITE); - - // if stop was raised then terminate child and wait for it - if (n == WAIT_OBJECT_0 + 1) { - PostThreadMessage(info->m_childID, WM_QUIT, 0, 0); - WaitForSingleObject(info->m_child, INFINITE); - } - - // otherwise post IDOK to dialog box - else { - PostMessage(info->m_dialog, WM_COMMAND, MAKEWPARAM(IDOK, 0), 0); - } - - return 0; -} - -static -void -waitForChild(HWND hwnd, HANDLE thread, DWORD threadID) -{ - // prepare info for child wait dialog and thread - CChildWaitInfo info; - info.m_dialog = NULL; - info.m_child = thread; - info.m_childID = threadID; - info.m_ready = CreateEvent(NULL, TRUE, FALSE, NULL); - info.m_stop = CreateEvent(NULL, TRUE, FALSE, NULL); - - // create a thread to wait on the child thread and event - DWORD id; - HANDLE waiter = CreateThread(NULL, 0, &waitForChildThread, &info,0, &id); - - // do dialog that let's the user terminate the test - DialogBoxParam(s_instance, MAKEINTRESOURCE(IDD_WAIT), hwnd, - (DLGPROC)waitDlgProc, (LPARAM)&info); - - // force the waiter thread to finish and wait for it - SetEvent(info.m_ready); - SetEvent(info.m_stop); - WaitForSingleObject(waiter, INFINITE); - - // clean up - CloseHandle(waiter); - CloseHandle(info.m_ready); - CloseHandle(info.m_stop); -} - -static -void -initMainWindow(HWND hwnd) -{ - // append version number to title - CString titleFormat = getString(IDS_TITLE); - setWindowText(hwnd, CStringUtil::format(titleFormat.c_str(), kApplication, kVersion)); - - // load configuration - bool configLoaded = - loadConfig(ARG->m_config, s_configTime, s_userConfig); - if (configLoaded) { - s_lastConfig = ARG->m_config; - } - - // get settings from registry - bool isServer = configLoaded; - int debugLevel = s_defaultDebug; - CString server; - HKEY key = CArchMiscWindows::openKey(HKEY_CURRENT_USER, getSettingsPath()); - if (key != NULL) { - if (isServer && CArchMiscWindows::hasValue(key, "isServer")) { - isServer = (CArchMiscWindows::readValueInt(key, "isServer") != 0); - } - if (CArchMiscWindows::hasValue(key, "debug")) { - debugLevel = static_cast( - CArchMiscWindows::readValueInt(key, "debug")); - if (debugLevel < 0) { - debugLevel = 0; - } - else if (debugLevel > CLog::kDEBUG2) { - debugLevel = CLog::kDEBUG2; - } - } - server = CArchMiscWindows::readValueString(key, "server"); - CArchMiscWindows::closeKey(key); - } - - // choose client/server radio buttons - HWND child; - child = getItem(hwnd, IDC_MAIN_CLIENT_RADIO); - setItemChecked(child, !isServer); - child = getItem(hwnd, IDC_MAIN_SERVER_RADIO); - setItemChecked(child, isServer); - - // set server name - child = getItem(hwnd, IDC_MAIN_CLIENT_SERVER_NAME_EDIT); - setWindowText(child, server); - - // debug level - child = getItem(hwnd, IDC_MAIN_DEBUG); - for (unsigned int i = 0; i < sizeof(s_debugName) / - sizeof(s_debugName[0]); ++i) { - SendMessage(child, CB_ADDSTRING, 0, (LPARAM)s_debugName[i][0]); - } - SendMessage(child, CB_SETCURSEL, debugLevel, 0); - - // update controls - enableMainWindowControls(hwnd); -} - -static -bool -saveMainWindow(HWND hwnd, SaveMode mode, CString* cmdLineOut = NULL) -{ - DWORD errorID = 0; - CString arg; - CString cmdLine; - - // save dialog state - bool isClient = isClientChecked(hwnd); - HKEY key = CArchMiscWindows::addKey(HKEY_CURRENT_USER, getSettingsPath()); - if (key != NULL) { - HWND child; - child = getItem(hwnd, IDC_MAIN_CLIENT_SERVER_NAME_EDIT); - CArchMiscWindows::setValue(key, "server", getWindowText(child)); - child = getItem(hwnd, IDC_MAIN_DEBUG); - CArchMiscWindows::setValue(key, "debug", - (DWORD)SendMessage(child, CB_GETCURSEL, 0, 0)); - CArchMiscWindows::setValue(key, "isServer", isClient ? 0 : 1); - CArchMiscWindows::closeKey(key); - } - - // save user's configuration - if (!s_userConfig || ARG->m_config != s_lastConfig) { - time_t t; - if (!saveConfig(ARG->m_config, false, t)) { - errorID = IDS_SAVE_FAILED; - arg = getErrorString(GetLastError()); - goto failed; - } - if (s_userConfig) { - s_configTime = t; - s_lastConfig = ARG->m_config; - } - } - - // save autostart configuration - if (CAutoStart::isDaemonInstalled()) { - if (s_userConfig || ARG->m_config != s_lastConfig) { - time_t t; - if (!saveConfig(ARG->m_config, true, t)) { - errorID = IDS_AUTOSTART_SAVE_FAILED; - arg = getErrorString(GetLastError()); - goto failed; - } - if (!s_userConfig) { - s_configTime = t; - s_lastConfig = ARG->m_config; - } - } - } - - // get autostart command - cmdLine = getCommandLine(hwnd, false, mode == SAVE_QUITING); - if (cmdLineOut != NULL) { - *cmdLineOut = cmdLine; - } - if (cmdLine.empty()) { - return (mode == SAVE_QUITING); - } - - // save autostart command - if (CAutoStart::isDaemonInstalled()) { - try { - CAutoStart::reinstallDaemon(isClient, cmdLine); - CAutoStart::uninstallDaemons(!isClient); - } - catch (XArchDaemon& e) { - errorID = IDS_INSTALL_GENERIC_ERROR; - arg = e.what(); - goto failed; - } - } - - return true; - -failed: - CString errorMessage = - CStringUtil::format(getString(errorID).c_str(), arg.c_str()); - if (mode == SAVE_QUITING) { - errorMessage += "\n"; - errorMessage += getString(IDS_UNSAVED_DATA_REALLY_QUIT); - if (askVerify(hwnd, errorMessage)) { - return true; - } - } - else if (mode == SAVE_NORMAL) { - showError(hwnd, errorMessage); - } - return false; -} - -static -LRESULT CALLBACK -mainWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) { - case WM_ACTIVATE: - if (LOWORD(wParam) != WA_INACTIVE) { - // activated - - // see if the configuration changed - if (isConfigNewer(s_configTime, s_userConfig)) { - CString message2 = getString(IDS_CONFIG_CHANGED); - if (askVerify(hwnd, message2)) { - time_t configTime; - bool userConfig; - CConfig newConfig; - if (loadConfig(newConfig, configTime, userConfig) && - userConfig == s_userConfig) { - ARG->m_config = newConfig; - s_lastConfig = ARG->m_config; - } - else { - message2 = getString(IDS_LOAD_FAILED); - showError(hwnd, message2); - s_lastConfig = CConfig(); - } - } - } - } - else { - // deactivated; write configuration - if (!isShowingDialog()) { - saveMainWindow(hwnd, SAVE_QUIET); - } - } - break; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDCANCEL: - // save data - if (saveMainWindow(hwnd, SAVE_QUITING)) { - // quit - PostQuitMessage(0); - } - return 0; - - case IDOK: - case IDC_MAIN_TEST: { - // note if testing - const bool testing = (LOWORD(wParam) == IDC_MAIN_TEST); - - // save data - if (saveMainWindow(hwnd, SAVE_NORMAL)) { - // launch child app - DWORD threadID; - HANDLE thread; - if (!launchApp(hwnd, testing, &thread, &threadID)) { - return 0; - } - - // handle child program - if (testing) { - // wait for process to stop, allowing the user to kill it - waitForChild(hwnd, thread, threadID); - - // clean up - CloseHandle(thread); - } - else { - // don't need thread handle - if (thread != NULL) { - CloseHandle(thread); - } - - // notify of success: now disabled - it's silly to notify a success - //askOkay(hwnd, getString(IDS_STARTED_TITLE), getString(IDS_STARTED)); - - // quit - PostQuitMessage(0); - } - } - return 0; - } - - case IDC_MAIN_AUTOSTART: { - CString cmdLine; - if (saveMainWindow(hwnd, SAVE_NORMAL, &cmdLine)) { - // run dialog - CAutoStart autoStart(hwnd, !isClientChecked(hwnd), cmdLine); - autoStart.doModal(); - } - return 0; - } - - case IDC_MAIN_CLIENT_RADIO: - case IDC_MAIN_SERVER_RADIO: - enableMainWindowControls(hwnd); - return 0; - - case IDC_MAIN_SCREENS: - s_screensLinks->doModal(); - break; - - case IDC_MAIN_OPTIONS: - s_globalOptions->doModal(); - break; - - case IDC_MAIN_ADVANCED: - s_advancedOptions->doModal(isClientChecked(hwnd)); - break; - - case IDC_MAIN_HOTKEYS: - s_hotkeyOptions->doModal(); - break; - - case IDC_MAIN_INFO: - s_info->doModal(); - break; - } - - default: - break; - } - return DefDlgProc(hwnd, message, wParam, lParam); -} - -int WINAPI -WinMain(HINSTANCE instance, HINSTANCE, LPSTR cmdLine, int nCmdShow) -{ - CArchMiscWindows::setInstanceWin32(instance); - - CArch arch; - CLOG; - CArgs args; - - s_instance = instance; - - // if "/uninstall" is on the command line then just stop and - // uninstall the service and quit. this is the only option - // but we ignore any others. - if (CString(cmdLine).find("/uninstall") != CString::npos) { - CAutoStart::uninstallDaemons(false); - CAutoStart::uninstallDaemons(true); - return 0; - } - - // register main window (dialog) class - WNDCLASSEX classInfo; - classInfo.cbSize = sizeof(classInfo); - classInfo.style = CS_HREDRAW | CS_VREDRAW; - classInfo.lpfnWndProc = &mainWndProc; - classInfo.cbClsExtra = 0; - classInfo.cbWndExtra = DLGWINDOWEXTRA; - classInfo.hInstance = instance; - classInfo.hIcon = (HICON)LoadImage(instance, - MAKEINTRESOURCE(IDI_SYNERGY), - IMAGE_ICON, - 32, 32, LR_SHARED); - classInfo.hCursor = LoadCursor(NULL, IDC_ARROW); - classInfo.hbrBackground = reinterpret_cast(COLOR_3DFACE + 1); - classInfo.lpszMenuName = NULL; - classInfo.lpszClassName = s_mainClass; - classInfo.hIconSm = (HICON)LoadImage(instance, - MAKEINTRESOURCE(IDI_SYNERGY), - IMAGE_ICON, - 16, 16, LR_SHARED); - RegisterClassEx(&classInfo); - - // create main window - HWND mainWindow = CreateDialog(s_instance, - MAKEINTRESOURCE(IDD_MAIN), 0, NULL); - - // prep windows - initMainWindow(mainWindow); - s_globalOptions = new CGlobalOptions(mainWindow, &ARG->m_config); - s_advancedOptions = new CAdvancedOptions(mainWindow, &ARG->m_config); - s_hotkeyOptions = new CHotkeyOptions(mainWindow, &ARG->m_config); - s_screensLinks = new CScreensLinks(mainWindow, &ARG->m_config); - s_info = new CInfo(mainWindow); - - // show window - ShowWindow(mainWindow, nCmdShow); - - // main loop - MSG msg; - bool done = false; - do { - switch (GetMessage(&msg, NULL, 0, 0)) { - case -1: - // error - break; - - case 0: - // quit - done = true; - break; - - default: - if (!IsDialogMessage(mainWindow, &msg)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - break; - } - } while (!done); - - return (int)msg.wParam; -} diff --git a/cmd/launcher/launcher.rc b/cmd/launcher/launcher.rc deleted file mode 100644 index aae2b3e3..00000000 --- a/cmd/launcher/launcher.rc +++ /dev/null @@ -1,626 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include -#if !defined(IDC_STATIC) -#define IDC_STATIC (-1) -#endif - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include \r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_MAIN DIALOG DISCARDABLE 32768, 0, 300, 199 -STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU -CAPTION "Synergy" -CLASS "GoSynergy" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Choose to share or use a shared keyboard and mouse, provide the requested information, then click Test to check your settings or Start to save your settings and start Synergy.", - IDC_STATIC,7,7,286,19 - GROUPBOX "",IDC_STATIC,7,29,286,36 - GROUPBOX "",IDC_STATIC,7,72,286,36 - GROUPBOX "Options",IDC_STATIC,7,115,286,56 - CONTROL "&Use another computer's shared keyboard and mouse (client)", - IDC_MAIN_CLIENT_RADIO,"Button",BS_AUTORADIOBUTTON | - WS_GROUP | WS_TABSTOP,11,29,205,10 - CONTROL "Share this computer's keyboard and mouse (server)", - IDC_MAIN_SERVER_RADIO,"Button",BS_AUTORADIOBUTTON,11,72, - 177,10 - LTEXT "Other Computer's &Host Name:", - IDC_MAIN_CLIENT_SERVER_NAME_LABEL,12,46,94,8 - EDITTEXT IDC_MAIN_CLIENT_SERVER_NAME_EDIT,111,44,106,12, - ES_AUTOHSCROLL - LTEXT "&Screens && Links:",IDC_MAIN_SERVER_SCREENS_LABEL,12,89, - 54,8 - PUSHBUTTON "Configure...",IDC_MAIN_SCREENS,71,86,50,14 - PUSHBUTTON "&Options...",IDC_MAIN_OPTIONS,12,129,50,14 - PUSHBUTTON "Hot &Keys...",IDC_MAIN_HOTKEYS,68,129,50,14 - PUSHBUTTON "Adva&nced...",IDC_MAIN_ADVANCED,124,129,50,14 - PUSHBUTTON "&AutoStart...",IDC_MAIN_AUTOSTART,180,129,50,14 - LTEXT "&Logging Level:",IDC_STATIC,12,154,48,8 - COMBOBOX IDC_MAIN_DEBUG,68,151,61,60,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Info",IDC_MAIN_INFO,7,178,50,14 - PUSHBUTTON "&Test",IDC_MAIN_TEST,131,179,50,14 - DEFPUSHBUTTON "Start",IDOK,187,179,50,14 - PUSHBUTTON "Quit",IDCANCEL,243,179,50,14 -END - -IDD_ADD DIALOG DISCARDABLE 0, 0, 192, 254 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Add Screen" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "&Screen Name:",IDC_STATIC,7,9,46,8 - EDITTEXT IDC_ADD_SCREEN_NAME_EDIT,79,7,106,12,ES_AUTOHSCROLL - LTEXT "&Aliases:",IDC_STATIC,7,25,25,8 - EDITTEXT IDC_ADD_ALIASES_EDIT,79,26,106,24,ES_MULTILINE | - ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN - GROUPBOX "Options",IDC_STATIC,7,55,178,54 - LTEXT "If your Caps, Num, or Scroll Lock keys behave strangely on this client screen then try turning the half-duplex options on and reconnect the client.", - IDC_STATIC,13,65,165,25 - CONTROL "&Caps Lock",IDC_ADD_HD_CAPS_CHECK,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,13,93,51,10 - CONTROL "&Num Lock",IDC_ADD_HD_NUM_CHECK,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,69,93,51,10 - CONTROL "Sc&roll Lock",IDC_ADD_HD_SCROLL_CHECK,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,125,93,51,10 - GROUPBOX "Modifiers",IDC_STATIC,7,113,178,65 - LTEXT "Shift",IDC_STATIC,13,129,15,8 - COMBOBOX IDC_ADD_MOD_SHIFT,37,126,48,60,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "Ctrl",IDC_STATIC,13,144,11,8 - COMBOBOX IDC_ADD_MOD_CTRL,37,142,48,60,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "Alt",IDC_STATIC,13,160,9,8 - COMBOBOX IDC_ADD_MOD_ALT,37,158,48,60,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "Meta",IDC_STATIC,101,128,17,8 - COMBOBOX IDC_ADD_MOD_META,125,126,48,60,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "Super",IDC_STATIC,101,144,20,8 - COMBOBOX IDC_ADD_MOD_SUPER,125,142,48,60,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - GROUPBOX "Dead Corners",IDC_STATIC,7,183,178,43 - LTEXT "Don't switch in these corners:",IDC_STATIC,14,198,52,18 - CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,68,193,47,28 - CONTROL "",IDC_ADD_DC_TOP_LEFT,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,76,197,16,8 - CONTROL "",IDC_ADD_DC_TOP_RIGHT,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,98,197,16,8 - CONTROL "",IDC_ADD_DC_BOTTOM_LEFT,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,76,210,16,8 - CONTROL "",IDC_ADD_DC_BOTTOM_RIGHT,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,98,210,16,8 - LTEXT "Size",IDC_STATIC,120,202,14,8 - EDITTEXT IDC_ADD_DC_SIZE,139,200,40,12,ES_AUTOHSCROLL | ES_NUMBER - DEFPUSHBUTTON "OK",IDOK,79,233,50,14 - PUSHBUTTON "Cancel",IDCANCEL,135,233,50,14 -END - -IDD_WAIT DIALOG DISCARDABLE 0, 0, 186, 54 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Running Test..." -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Stop",IDOK,129,33,50,14 - LTEXT "Running synergy. Press Stop to end the test.", - IDC_STATIC,7,7,172,15 -END - -IDD_AUTOSTART DIALOG DISCARDABLE 0, 0, 195, 189 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Auto Start" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "Close",IDCANCEL,138,168,50,14 - LTEXT "Synergy can be configured to start automatically when you log in. If you have sufficient access rights, you can instead configure synergy to start automatically when your computer starts.", - IDC_STATIC,7,7,181,33 - LTEXT "You have sufficient access rights to install and uninstall Auto Start for all users or for just yourself.", - IDC_AUTOSTART_PERMISSION_MSG,7,69,181,17 - LTEXT "Synergy is configured to start automatically when the system starts.", - IDC_AUTOSTART_INSTALLED_MSG,7,93,181,17 - GROUPBOX "When &You Log In",IDC_STATIC,7,119,84,40 - PUSHBUTTON "Install",IDC_AUTOSTART_INSTALL_USER,23,133,50,14 - GROUPBOX "When &Computer Starts",IDC_STATIC,104,119,84,40 - PUSHBUTTON "Install",IDC_AUTOSTART_INSTALL_SYSTEM,119,134,50,14 - LTEXT "Synergy can be configured to start automatically when the computer starts or when you log in but not both.", - IDC_STATIC,7,43,181,17 -END - -IDD_GLOBAL_OPTIONS DIALOG DISCARDABLE 0, 0, 207, 354 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Options" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "It's easy to unintentionally switch screens when the pointer is near a screen's edge. Synergy can prevent switching until certain conditions are met to reduce unintentional switching.", - IDC_STATIC,7,7,191,26 - LTEXT "Synergy can wait to switch until the cursor has been at a screen's edge for some amount of time.", - IDC_STATIC,7,37,193,16 - CONTROL "Switch after waiting",IDC_GLOBAL_DELAY_CHECK,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,59,77,10 - EDITTEXT IDC_GLOBAL_DELAY_TIME,112,58,45,12,ES_AUTOHSCROLL | - ES_NUMBER - LTEXT "ms",IDC_STATIC,159,60,10,8 - LTEXT "Synergy can switch only when the cursor hits a screen edge twice within some amount of time.", - IDC_STATIC,7,77,193,16 - CONTROL "Switch on double tap within",IDC_GLOBAL_TWO_TAP_CHECK, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,99,103,10 - EDITTEXT IDC_GLOBAL_TWO_TAP_TIME,112,98,45,12,ES_AUTOHSCROLL | - ES_NUMBER - LTEXT "ms",IDC_STATIC,159,100,10,8 - LTEXT "Synergy can be restricted to switch only if certain modifiers are pressed.", - IDC_STATIC,7,119,193,19 - CONTROL "Check clients every",IDC_GLOBAL_HEARTBEAT_CHECK,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,220,78,10 - EDITTEXT IDC_GLOBAL_HEARTBEAT_TIME,112,219,45,12,ES_AUTOHSCROLL | - ES_NUMBER - LTEXT "ms",IDC_STATIC,159,221,10,8 - LTEXT "Synergy can synchronize screen savers across all screens.", - IDC_STATIC,7,243,193,8 - CONTROL "Synchronize screen savers",IDC_GLOBAL_SCREENSAVER_SYNC, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,259,101,10 - LTEXT "Relative mouse moves on secondary screens.",IDC_STATIC, - 7,280,193,8 - CONTROL "Use relative mouse moves",IDC_GLOBAL_RELATIVE_MOVES, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,296,99,10 - CONTROL "Don't take foreground window on Windows servers", - IDC_GLOBAL_LEAVE_FOREGROUND,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,7,317,177,10 - DEFPUSHBUTTON "OK",IDOK,94,333,50,14 - PUSHBUTTON "Cancel",IDCANCEL,150,333,50,14 - LTEXT "Synergy can periodically check that clients are still alive and connected. Use this only if synergy doesn't detect when clients disconnect.", - IDC_STATIC,7,189,193,24 - CONTROL "Only switch when shift pressed.",IDC_GLOBAL_NEEDS_SHIFT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,143,115,10 - CONTROL "Only switch when control pressed.", - IDC_GLOBAL_NEEDS_CONTROL,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,7,155,123,10 - CONTROL "Only switch when alt pressed.",IDC_GLOBAL_NEEDS_ALT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,167,109,10 -END - -IDD_ADVANCED_OPTIONS DIALOG DISCARDABLE 0, 0, 230, 186 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Advanced Options" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Synergy normally uses this computer's name as its screen name. Enter another name here if you want to use a different screen name.", - IDC_STATIC,7,7,216,19 - LTEXT "Screen &Name:",IDC_STATIC,7,34,46,8 - EDITTEXT IDC_ADVANCED_NAME_EDIT,63,32,106,12,ES_AUTOHSCROLL - LTEXT "Synergy normally uses a particular network port number. Enter an alternative port here. (The server and all clients must use the same port number.)", - IDC_STATIC,7,56,216,26 - LTEXT "&Port:",IDC_STATIC,7,90,16,8 - EDITTEXT IDC_ADVANCED_PORT_EDIT,63,88,40,12,ES_AUTOHSCROLL | - ES_NUMBER - LTEXT "The server normally listens for client connections on all network interfaces. Enter the address of a particular interface to listen on just that interface.", - IDC_STATIC,7,110,216,26 - LTEXT "&Interface:",IDC_STATIC,7,144,31,8 - EDITTEXT IDC_ADVANCED_INTERFACE_EDIT,63,142,81,12,ES_AUTOHSCROLL - PUSHBUTTON "&Defaults",IDC_ADVANCED_DEFAULTS,7,165,50,14 - DEFPUSHBUTTON "OK",IDOK,118,165,50,14 - PUSHBUTTON "Cancel",IDCANCEL,173,165,50,14 -END - -IDD_SCREENS_LINKS DIALOG DISCARDABLE 0, 0, 354, 213 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Screens & Links" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "&Screens:",IDC_STATIC,7,7,29,8 - LISTBOX IDC_SCREENS_SCREENS,7,18,100,36,LBS_SORT | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "+",IDC_SCREENS_ADD_SCREEN,7,57,17,14 - PUSHBUTTON "-",IDC_SCREENS_REMOVE_SCREEN,28,57,17,14 - PUSHBUTTON "Edit",IDC_SCREENS_EDIT_SCREEN,49,57,24,14 - LTEXT "&Links:",IDC_STATIC,7,83,20,8 - LISTBOX IDC_SCREENS_LINKS,7,94,339,59,LBS_SORT | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_SCREENS_SRC_START,7,156,16,12,ES_AUTOHSCROLL | - ES_NUMBER - LTEXT "to",IDC_STATIC,25,158,8,8 - EDITTEXT IDC_SCREENS_SRC_END,33,156,16,12,ES_AUTOHSCROLL | - ES_NUMBER - LTEXT "% of the",IDC_STATIC,52,158,27,8 - COMBOBOX IDC_SCREENS_SRC_SIDE,80,156,48,69,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "of",IDC_STATIC,129,158,8,8 - COMBOBOX IDC_SCREENS_SRC_SCREEN,139,156,59,53,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "goes to",IDC_STATIC,200,158,24,8 - EDITTEXT IDC_SCREENS_DST_START,225,156,16,12,ES_AUTOHSCROLL | - ES_NUMBER - LTEXT "to",IDC_STATIC,243,158,8,8 - EDITTEXT IDC_SCREENS_DST_END,251,156,16,12,ES_AUTOHSCROLL | - ES_NUMBER - LTEXT "% of",IDC_STATIC,270,158,15,8 - COMBOBOX IDC_SCREENS_DST_SCREEN,287,156,59,53,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "+",IDC_SCREENS_ADD_LINK,7,172,17,14 - PUSHBUTTON "-",IDC_SCREENS_REMOVE_LINK,28,172,17,14 - DEFPUSHBUTTON "OK",IDOK,241,192,50,14 - PUSHBUTTON "Cancel",IDCANCEL,297,192,50,14 - LTEXT "Source edge overlaps an existing edge.", - IDC_SCREENS_OVERLAP_ERROR,72,175,126,8,NOT WS_VISIBLE | - NOT WS_GROUP -END - -IDD_INFO DIALOG DISCARDABLE 0, 0, 186, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Info" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Version:",IDC_STATIC,7,7,26,8 - EDITTEXT IDC_INFO_VERSION,52,7,127,12,ES_AUTOHSCROLL | - ES_READONLY | NOT WS_BORDER - LTEXT "Hostname:",IDC_STATIC,7,19,35,8 - EDITTEXT IDC_INFO_HOSTNAME,52,19,127,12,ES_AUTOHSCROLL | - ES_READONLY | NOT WS_BORDER - LTEXT "IP Address:",IDC_STATIC,7,31,37,8 - EDITTEXT IDC_INFO_IP_ADDRESS,52,31,127,12,ES_AUTOHSCROLL | - ES_READONLY | NOT WS_BORDER - LTEXT "User Config:",IDC_STATIC,7,43,40,8 - EDITTEXT IDC_INFO_USER_CONFIG,52,43,127,12,ES_AUTOHSCROLL | - ES_READONLY | NOT WS_BORDER - LTEXT "Sys Config:",IDC_STATIC,7,55,36,8 - EDITTEXT IDC_INFO_SYS_CONFIG,52,55,127,12,ES_AUTOHSCROLL | - ES_READONLY | NOT WS_BORDER - DEFPUSHBUTTON "OK",IDOK,129,74,50,14 -END - -IDD_HOTKEY_OPTIONS DIALOG DISCARDABLE 0, 0, 360, 151 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Hot Keys" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "&Hot Keys:",IDC_STATIC,7,7,32,8 - LISTBOX IDC_HOTKEY_HOTKEYS,7,18,169,88,LBS_SORT | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "+",IDC_HOTKEY_ADD_HOTKEY,7,109,17,14 - PUSHBUTTON "-",IDC_HOTKEY_REMOVE_HOTKEY,28,109,17,14 - PUSHBUTTON "Edit",IDC_HOTKEY_EDIT_HOTKEY,49,109,24,14 - LTEXT "&Actions:",IDC_STATIC,183,7,26,8 - LISTBOX IDC_HOTKEY_ACTIONS,183,18,169,88,LBS_SORT | - LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "+",IDC_HOTKEY_ADD_ACTION,183,109,17,14 - PUSHBUTTON "-",IDC_HOTKEY_REMOVE_ACTION,204,109,17,14 - PUSHBUTTON "Edit",IDC_HOTKEY_EDIT_ACTION,225,109,24,14 - DEFPUSHBUTTON "OK",IDOK,302,130,50,14 -END - -IDD_HOTKEY_CONDITION DIALOG DISCARDABLE 0, 0, 183, 58 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Hot Key" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Enter &new hot key or mouse button:",IDC_STATIC,7,7,113, - 8 - EDITTEXT IDC_HOTKEY_CONDITION_HOTKEY,7,17,169,12,ES_WANTRETURN - DEFPUSHBUTTON "OK",IDOK,70,37,50,14 - PUSHBUTTON "Cancel",IDCANCEL,126,37,50,14 -END - -IDD_HOTKEY_ACTION DIALOG DISCARDABLE 0, 0, 183, 218 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Action" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "&Action:",IDC_STATIC,7,7,23,8 - CONTROL "Press:",IDC_HOTKEY_ACTION_DOWN,"Button", - BS_AUTORADIOBUTTON | WS_TABSTOP,7,19,35,10 - CONTROL "Release:",IDC_HOTKEY_ACTION_UP,"Button", - BS_AUTORADIOBUTTON,7,31,44,10 - CONTROL "Press && Release:",IDC_HOTKEY_ACTION_DOWNUP,"Button", - BS_AUTORADIOBUTTON,7,43,69,10 - CONTROL "Switch To Screen:",IDC_HOTKEY_ACTION_SWITCH_TO,"Button", - BS_AUTORADIOBUTTON,7,85,75,10 - CONTROL "Switch In Direction:",IDC_HOTKEY_ACTION_SWITCH_IN, - "Button",BS_AUTORADIOBUTTON,7,101,77,10 - CONTROL "Lock Cursor to Screen:",IDC_HOTKEY_ACTION_LOCK,"Button", - BS_AUTORADIOBUTTON,7,117,89,10 - CONTROL "Keyboard broadcasting:", - IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST,"Button", - BS_AUTORADIOBUTTON,7,133,89,10 - LTEXT "&Hot key or mouse button:",IDC_STATIC,7,55,80,8 - EDITTEXT IDC_HOTKEY_ACTION_HOTKEY,7,67,152,12,ES_WANTRETURN - PUSHBUTTON "...",IDC_HOTKEY_ACTION_SCREENS,162,67,14,12 - COMBOBOX IDC_HOTKEY_ACTION_SWITCH_TO_LIST,87,83,89,62, - CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_HOTKEY_ACTION_SWITCH_IN_LIST,106,99,70,66, - CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_HOTKEY_ACTION_LOCK_LIST,106,115,70,58, - CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_LIST,106,131,53,58, - CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "...",IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_SCREENS, - 162,131,14,12 - LTEXT "Action takes place &when:",IDC_STATIC,7,153,81,8 - CONTROL "Hot key is pressed",IDC_HOTKEY_ACTION_ON_ACTIVATE, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,7,165,74,10 - CONTROL "Hot key is released",IDC_HOTKEY_ACTION_ON_DEACTIVATE, - "Button",BS_AUTORADIOBUTTON,7,177,76,10 - DEFPUSHBUTTON "OK",IDOK,70,197,50,14 - PUSHBUTTON "Cancel",IDCANCEL,126,197,50,14 -END - -IDD_HOTKEY_SCREENS DIALOG DISCARDABLE 0, 0, 237, 79 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Target Screens" -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "&Available screens:",IDC_STATIC,7,7,58,8 - LISTBOX IDC_HOTKEY_SCREENS_SRC,7,17,100,36,LBS_NOINTEGRALHEIGHT | - LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP - LISTBOX IDC_HOTKEY_SCREENS_DST,130,17,100,36, - LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | - WS_TABSTOP - PUSHBUTTON "-->",IDC_HOTKEY_SCREENS_ADD,109,21,17,14 - PUSHBUTTON "<--",IDC_HOTKEY_SCREENS_REMOVE,109,38,17,14 - DEFPUSHBUTTON "OK",IDOK,124,58,50,14 - PUSHBUTTON "Cancel",IDCANCEL,180,58,50,14 - LTEXT "&Send action to screens:",IDC_STATIC,130,7,76,8 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_MAIN, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 293 - TOPMARGIN, 7 - BOTTOMMARGIN, 192 - END - - IDD_ADD, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 185 - TOPMARGIN, 7 - BOTTOMMARGIN, 247 - END - - IDD_WAIT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 47 - END - - IDD_AUTOSTART, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 188 - TOPMARGIN, 7 - BOTTOMMARGIN, 182 - END - - IDD_GLOBAL_OPTIONS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 200 - TOPMARGIN, 7 - BOTTOMMARGIN, 347 - END - - IDD_ADVANCED_OPTIONS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 223 - TOPMARGIN, 7 - BOTTOMMARGIN, 179 - END - - IDD_SCREENS_LINKS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 347 - TOPMARGIN, 7 - BOTTOMMARGIN, 206 - END - - IDD_INFO, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 88 - END - - IDD_HOTKEY_OPTIONS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 353 - TOPMARGIN, 7 - BOTTOMMARGIN, 144 - END - - IDD_HOTKEY_CONDITION, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 176 - TOPMARGIN, 7 - BOTTOMMARGIN, 51 - END - - IDD_HOTKEY_ACTION, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 176 - TOPMARGIN, 7 - BOTTOMMARGIN, 195 - END - - IDD_HOTKEY_SCREENS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 230 - TOPMARGIN, 7 - BOTTOMMARGIN, 72 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_SYNERGY ICON DISCARDABLE "synergy.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE DISCARDABLE -BEGIN - IDS_ERROR "Error" - IDS_INVALID_SCREEN_NAME "Screen name `%{1}' is invalid." - IDS_DUPLICATE_SCREEN_NAME "The screen name `%{1}' is already being used." - IDS_SCREEN_NAME_IS_ALIAS "A name may not be an alias of itself." - IDS_VERIFY "Confirm" - IDS_UNSAVED_DATA_REALLY_QUIT "You have unsaved changes. Really quit?" - IDS_UNKNOWN_SCREEN_NAME "The screen name `%{1}' is not in the layout." - IDS_INVALID_PORT "The port `%{1}' is invalid. It must be between 1 and 65535 inclusive. %{2} is the standard port." - IDS_SAVE_FAILED "Failed to save configuration: %{1}" - IDS_STARTUP_FAILED "Failed to start synergy: %{1}" - IDS_STARTED_TITLE "Started" - IDS_STARTED "Synergy was successfully started. Use the task manager or tray icon to terminate it." - IDS_UNINSTALL_TITLE "Removed Auto-Start" -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_AUTOSTART_PERMISSION_SYSTEM - "You have sufficient access rights to install and uninstall Auto Start for all users." - IDS_AUTOSTART_PERMISSION_USER - "You have sufficient access rights to install and uninstall Auto Start for just yourself." - IDS_AUTOSTART_PERMISSION_NONE - "You do not have sufficient access rights to install or uninstall Auto Start." - IDS_AUTOSTART_INSTALLED_SYSTEM - "Synergy is configured to start automatically when the system starts." - IDS_AUTOSTART_INSTALLED_USER - "Synergy is configured to start automatically when you log in." - IDS_AUTOSTART_INSTALLED_NONE - "Synergy is not configured to start automatically." - IDS_INSTALL_LABEL "Install" - IDS_UNINSTALL_LABEL "Uninstall" - IDS_INSTALL_GENERIC_ERROR "Install failed: %{1}" - IDS_UNINSTALL_GENERIC_ERROR "Uninstall failed: %{1}" - IDS_INSTALL_TITLE "Installed Auto-Start" - IDS_INSTALLED_SYSTEM "Installed auto-start. Synergy will automatically start each time you start your computer." - IDS_INSTALLED_USER "Installed auto-start. Synergy will automatically start each time you log in." -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_UNINSTALLED_SYSTEM "Removed auto-start. Synergy will not automatically start each time you start or reboot your computer." - IDS_UNINSTALLED_USER "Removed auto-start. Synergy will not automatically start each time you log in." - IDS_INVALID_SERVER_NAME "Server name `%{1}' is invalid." - IDS_TITLE "%{1} Version %{2}" - IDS_SERVER_IS_CLIENT "Please enter the name of the computer sharing a\nkeyboard and mouse, not the name of this computer,\nin the Other Computer's Host Name field." - IDS_ADD_SCREEN "Add Screen" - IDS_EDIT_SCREEN "Edit Screen %{1}" - IDS_ERROR_CODE "Error code: %{1}" - IDS_AUTOSTART_PERMISSION_ALL - "You have sufficient access rights to install and uninstall Auto Start for all users or for just yourself." - IDS_INVALID_INTERFACE_NAME "The interface '%{1}' is invalid: %{2}" - IDS_INVALID_CORNER_SIZE "The dead corner size %{1} is invalid; it must be 0 or higher." - IDS_NEW_LINK "[New Link]" - IDS_SIDE_LEFT "left of" - IDS_SIDE_RIGHT "right of" - IDS_SIDE_TOP "above" - IDS_SIDE_BOTTOM "below" -END - -STRINGTABLE DISCARDABLE -BEGIN - IDS_LINK_FORMAT "%{4}%{5} is %{3} %{1}%{2}" - IDS_LINK_INTERVAL_FORMAT "(%{1},%{2})" - IDS_EDGE_LEFT "left" - IDS_EDGE_RIGHT "right" - IDS_EDGE_TOP "top" - IDS_EDGE_BOTTOM "bottom" - IDS_AUTOSTART_SAVE_FAILED "Failed to save autostart configuration: %{1}" - IDS_LOAD_FAILED "Failed to load configuration." - IDS_CONFIG_CHANGED "Configuration changed on disk. Reload?" - IDS_MODE_OFF "off" - IDS_MODE_ON "on" - IDS_MODE_TOGGLE "toggle" - IDS_ALL_SCREENS "All Screens" - IDS_ACTIVE_SCREEN "Active Screen" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/cmd/launcher/resource.h b/cmd/launcher/resource.h deleted file mode 100644 index 14f9885d..00000000 --- a/cmd/launcher/resource.h +++ /dev/null @@ -1,189 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by launcher.rc -// -#define IDS_ERROR 1 -#define IDS_INVALID_SCREEN_NAME 2 -#define IDS_DUPLICATE_SCREEN_NAME 3 -#define IDS_SCREEN_NAME_IS_ALIAS 4 -#define IDS_VERIFY 5 -#define IDS_UNSAVED_DATA_REALLY_QUIT 6 -#define IDS_UNKNOWN_SCREEN_NAME 7 -#define IDS_INVALID_PORT 8 -#define IDS_SAVE_FAILED 9 -#define IDS_STARTUP_FAILED 10 -#define IDS_STARTED_TITLE 11 -#define IDS_STARTED 12 -#define IDS_INSTALL_FAILED 13 -#define IDS_UNINSTALL_TITLE 14 -#define IDS_UNINSTALLED 15 -#define IDS_UNINSTALL_FAILED 16 -#define IDS_CLIENT 17 -#define IDS_SERVER 18 -#define IDS_AUTOSTART_PERMISSION_SYSTEM 19 -#define IDS_AUTOSTART_PERMISSION_USER 20 -#define IDS_AUTOSTART_PERMISSION_NONE 21 -#define IDS_AUTOSTART_INSTALLED_SYSTEM 22 -#define IDS_AUTOSTART_INSTALLED_USER 23 -#define IDS_AUTOSTART_INSTALLED_NONE 24 -#define IDS_INSTALL_LABEL 25 -#define IDS_UNINSTALL_LABEL 26 -#define IDS_INSTALL_GENERIC_ERROR 27 -#define IDS_UNINSTALL_GENERIC_ERROR 28 -#define IDS_INSTALL_TITLE 29 -#define IDS_INSTALLED_SYSTEM 30 -#define IDS_INSTALLED_USER 31 -#define IDS_UNINSTALLED_SYSTEM 32 -#define IDS_UNINSTALLED_USER 33 -#define IDS_INVALID_SERVER_NAME 34 -#define IDS_TITLE 35 -#define IDS_SERVER_IS_CLIENT 36 -#define IDS_ADD_SCREEN 37 -#define IDS_EDIT_SCREEN 38 -#define IDS_INVALID_TIME 39 -#define IDS_ERROR_CODE 39 -#define IDS_AUTOSTART_PERMISSION_ALL 40 -#define IDS_INVALID_INTERFACE_NAME 41 -#define IDS_INVALID_CORNER_SIZE 42 -#define IDS_NEW_LINK 43 -#define IDS_SIDE_LEFT 44 -#define IDS_SIDE_RIGHT 45 -#define IDS_SIDE_TOP 46 -#define IDS_SIDE_BOTTOM 47 -#define IDS_LINK_FORMAT 48 -#define IDS_LINK_INTERVAL_FORMAT 49 -#define IDS_EDGE_LEFT 50 -#define IDS_EDGE_RIGHT 51 -#define IDS_EDGE_TOP 52 -#define IDS_EDGE_BOTTOM 53 -#define IDS_AUTOSTART_SAVE_FAILED 54 -#define IDS_LOAD_FAILED 55 -#define IDS_CONFIG_CHANGED 56 -#define IDS_MODE_OFF 57 -#define IDS_MODE_ON 58 -#define IDS_MODE_TOGGLE 59 -#define IDS_ALL_SCREENS 60 -#define IDS_ACTIVE_SCREEN 61 -#define IDD_MAIN 101 -#define IDD_ADD 102 -#define IDD_WAIT 103 -#define IDI_SYNERGY 104 -#define IDD_AUTOSTART 105 -#define IDD_ADVANCED_OPTIONS 106 -#define IDD_GLOBAL_OPTIONS 107 -#define IDD_SCREENS_LINKS 110 -#define IDD_INFO 111 -#define IDD_HOTKEY_OPTIONS 112 -#define IDD_HOTKEY_CONDITION 113 -#define IDD_HOTKEY_ACTION 114 -#define IDD_HOTKEY_SCREENS 115 -#define IDC_MAIN_CLIENT_RADIO 1000 -#define IDC_MAIN_SERVER_RADIO 1001 -#define IDC_MAIN_CLIENT_SERVER_NAME_LABEL 1002 -#define IDC_MAIN_CLIENT_SERVER_NAME_EDIT 1003 -#define IDC_MAIN_SERVER_SCREENS_LABEL 1004 -#define IDC_MAIN_SCREENS 1005 -#define IDC_MAIN_OPTIONS 1006 -#define IDC_MAIN_ADVANCED 1007 -#define IDC_MAIN_AUTOSTART 1008 -#define IDC_MAIN_TEST 1009 -#define IDC_MAIN_SAVE 1010 -#define IDC_MAIN_HOTKEYS 1010 -#define IDC_MAIN_DEBUG 1011 -#define IDC_ADD_SCREEN_NAME_EDIT 1020 -#define IDC_ADD_ALIASES_EDIT 1021 -#define IDC_AUTOSTART_INSTALLED_MSG 1031 -#define IDC_AUTOSTART_PERMISSION_MSG 1032 -#define IDC_AUTOSTART_INSTALL_USER 1033 -#define IDC_AUTOSTART_INSTALL_SYSTEM 1034 -#define IDC_ADD_HD_CAPS_CHECK 1037 -#define IDC_ADD_HD_NUM_CHECK 1038 -#define IDC_ADVANCED_NAME_EDIT 1038 -#define IDC_ADVANCED_PORT_EDIT 1039 -#define IDC_ADD_HD_SCROLL_CHECK 1039 -#define IDC_ADVANCED_INTERFACE_EDIT 1040 -#define IDC_GLOBAL_DELAY_CHECK 1041 -#define IDC_GLOBAL_DELAY_TIME 1042 -#define IDC_GLOBAL_TWO_TAP_CHECK 1043 -#define IDC_ADD_MOD_SHIFT 1043 -#define IDC_GLOBAL_TWO_TAP_TIME 1044 -#define IDC_ADD_MOD_CTRL 1044 -#define IDC_ADD_MOD_ALT 1045 -#define IDC_GLOBAL_HEARTBEAT_CHECK 1045 -#define IDC_ADD_MOD_META 1046 -#define IDC_GLOBAL_HEARTBEAT_TIME 1046 -#define IDC_ADD_MOD_SUPER 1047 -#define IDC_GLOBAL_SCREENSAVER_SYNC 1047 -#define IDC_GLOBAL_RELATIVE_MOVES 1048 -#define IDC_ADVANCED_DEFAULTS 1049 -#define IDC_GLOBAL_LEAVE_FOREGROUND 1049 -#define IDC_GLOBAL_NEEDS_SHIFT 1050 -#define IDC_GLOBAL_NEEDS_CONTROL 1051 -#define IDC_ADD_DC_SIZE 1052 -#define IDC_GLOBAL_NEEDS_ALT 1052 -#define IDC_ADD_DC_TOP_LEFT 1053 -#define IDC_ADD_DC_TOP_RIGHT 1054 -#define IDC_ADD_DC_BOTTOM_LEFT 1055 -#define IDC_ADD_DC_BOTTOM_RIGHT 1056 -#define IDC_SCREENS_SRC_SIDE 1057 -#define IDC_SCREENS_SRC_START 1058 -#define IDC_SCREENS_SRC_END 1059 -#define IDC_SCREENS_SRC_SCREEN 1060 -#define IDC_SCREENS_SCREENS 1061 -#define IDC_SCREENS_ADD_SCREEN 1062 -#define IDC_SCREENS_LINKS 1063 -#define IDC_SCREENS_DST_START 1064 -#define IDC_SCREENS_DST_END 1065 -#define IDC_SCREENS_DST_SCREEN 1066 -#define IDC_SCREENS_REMOVE_SCREEN 1067 -#define IDC_SCREENS_EDIT_SCREEN 1068 -#define IDC_SCREENS_ADD_LINK 1069 -#define IDC_SCREENS_REMOVE_LINK 1070 -#define IDC_SCREENS_OVERLAP_ERROR 1071 -#define IDC_INFO_VERSION 1073 -#define IDC_MAIN_INFO 1074 -#define IDC_INFO_HOSTNAME 1076 -#define IDC_HOTKEY_HOTKEYS 1076 -#define IDC_INFO_IP_ADDRESS 1077 -#define IDC_HOTKEY_ADD_HOTKEY 1077 -#define IDC_INFO_USER_CONFIG 1078 -#define IDC_HOTKEY_REMOVE_HOTKEY 1078 -#define IDC_INFO_SYS_CONFIG 1079 -#define IDC_HOTKEY_EDIT_HOTKEY 1079 -#define IDC_HOTKEY_ACTIONS 1080 -#define IDC_HOTKEY_CONDITION_HOTKEY 1080 -#define IDC_HOTKEY_ACTION_DOWNUP 1081 -#define IDC_HOTKEY_ADD_ACTION 1082 -#define IDC_HOTKEY_ACTION_DOWN 1082 -#define IDC_HOTKEY_REMOVE_ACTION 1083 -#define IDC_HOTKEY_ACTION_UP 1083 -#define IDC_HOTKEY_EDIT_ACTION 1084 -#define IDC_HOTKEY_ACTION_HOTKEY 1085 -#define IDC_HOTKEY_ACTION_SWITCH_TO_LIST 1086 -#define IDC_HOTKEY_ACTION_SWITCH_TO 1087 -#define IDC_HOTKEY_ACTION_SWITCH_IN 1088 -#define IDC_HOTKEY_ACTION_LOCK 1089 -#define IDC_HOTKEY_ACTION_SWITCH_IN_LIST 1090 -#define IDC_HOTKEY_ACTION_LOCK_LIST 1091 -#define IDC_HOTKEY_ACTION_ON_ACTIVATE 1092 -#define IDC_HOTKEY_ACTION_ON_DEACTIVATE 1093 -#define IDC_HOTKEY_ACTION_SCREENS 1094 -#define IDC_HOTKEY_SCREENS_SRC 1095 -#define IDC_HOTKEY_SCREENS_DST 1096 -#define IDC_HOTKEY_SCREENS_ADD 1097 -#define IDC_HOTKEY_SCREENS_REMOVE 1098 -#define IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST 1099 -#define IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_LIST 1100 -#define IDC_HOTKEY_ACTION_KEYBOARD_BROADCAST_SCREENS 1101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 116 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1102 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/cmd/launcher/synergy.ico b/cmd/launcher/synergy.ico deleted file mode 100644 index fc2e41468ec60a88e0da4194f288a18572f3f36f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 287934 zcmeFa2XK^Uwk_)W>b!b&ea=1Ou`wA$HqJK20b`pS3?|u_Xbc8S2Ahl!2!SL}4k+iG zQ>(kxYDpcWR?a!+074=_| zJo5iOBL4l4M1=P`(bCjp-cVO(^@E_is!o!M>Uvbw zHln7k-dad~eZ5s=D2s53L5Nlrm*Xc&CFyx`#Egp(Jnu>)YDec2rhZyP5LxkfK&0Br*ano*p=V=^`wS9>ej2hj3uu zKJ4Cm*QPhouGb&fi?s*$V*6QheCBWw=l#9m5)lfI=m_{k-Ic(YC`6|wBSoV^qAD3t zaghj%4nk~PD57Hn5gG1-zyN2syIsKfbNqjf?!jjVckut(hP`_}reF97yXaT;AJ~Hv zCyz?;f}6WD0s?)JkQk55tPJ{sV${{wT8o%K_5-pXxREdS;I?VecsK*8RlnBW9MfFu>R0q%-y>kuQE4ZV0RX~v8U2jBF ze+^o$)}WU^d#$?&*IU!kUmuODb$;lsbwpR~C3H7jL~oNFuGG7szs?8OYeI3WJ_6Ue zqHv=x4uhRZ=xSSc) z8&O-!+@QC2(XZuN%72IKmwv7e+_`mgS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jnw!CN z4B+nZ8EMFC>`gw3o}{DbE{w8_iN#M(*((au(^*f}b`3c?Y*VSg-#Hl|5r~d>~B%L9XidU;`cFKPz8RaD1SBkCWlwYuM z_PCIE63S26a|3F^Z$#s=-}v~ivVFMzAF*cb3|xvi*yUcozOUi1gK{i3zO+T`KyL#l zRbz6{*$>JsNcSTmpJlh}=kbW|Qi`W?3WLeY)HHIg96Y>;a;eAg;rhoYkBdukuV14O zFPeHc3sAnAL{ zXt{TNa8R7>B<|ck-o45ix!+|c?Sb?9E};4}bPZ7$ERRD=X|AiF;Ho1zYa8hamLekd zY2xE&lXh$YKHl?7G`8h`;UpZ)Y@ry<&Hw2*8g>I?<8^GX-Z(p9&pZVOX`NAZ251c> z9Y6`XT77Um^?Bl+e}jvcmLn+m9ry;k>!@zY{F1GEDqbXQ#kbY(Vq;X&FF54`i>>W> z<+j#5m#wz~j$w*TiEkB*R-&2Cxm8!k;Kt2!NX`mq=;zii*Hb)dwyW;MgWp-dk=mGw zKgEn)Ht>pdv?biiYj3xX_l%8>HmYk{a)vpL*$Msprez`-kMb`z_TztN{qF7kZ+q`z zP7oKigyp}8^P0g3n1>k7R}V5AJjhhR_rAt{$Nq->Eqe`1K(Teu%)fJg**NSGvibi@ z;xP6cxRPQVokaS*y7tzs-t`p~ha1X8)tnef9p`FYQ&Y`nV?xD`RdiOB#r@syvyx&M zT0cp0{->AVqXVzR%SDFj$~tfT)l<% z=W&;n86^xstsEijmGV70ht!Z8l$v_{Su_-$YjVGSPkq|(96Aeet*7R&n$~22NW=(8 zJFHL&$tcDo?dniZ?Z!<1*HNCh|DJu2TX1!V8%}4o+pB%0q;+Mr;SzQqW!HB)N1A?=NV zv5UGsw2d?tSa@xso}N-=O;c7?b7#qRxlZr{vqMc|4dY*14ZW`Nz4aaY8w>rGy@s{_1kebYzW@LL diff --git a/cmake/Installer.nsi.in b/res/Installer.nsi.in similarity index 100% rename from cmake/Installer.nsi.in rename to res/Installer.nsi.in diff --git a/cmake/License.rtf b/res/License.rtf similarity index 100% rename from cmake/License.rtf rename to res/License.rtf diff --git a/cmake/License.tex b/res/License.tex similarity index 100% rename from cmake/License.tex rename to res/License.tex diff --git a/cmake/Readme.txt b/res/Readme.txt similarity index 100% rename from cmake/Readme.txt rename to res/Readme.txt diff --git a/cmake/config.h.in b/res/config.h.in similarity index 100% rename from cmake/config.h.in rename to res/config.h.in diff --git a/cmake/doxygen.cfg.in b/res/doxygen.cfg.in similarity index 100% rename from cmake/doxygen.cfg.in rename to res/doxygen.cfg.in diff --git a/cmake/synergy.desktop b/res/synergy.desktop similarity index 100% rename from cmake/synergy.desktop rename to res/synergy.desktop diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 00000000..bb395fc5 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,25 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2011 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +include_directories( + ../tools/gtest + ../tools/gtest/include) + +add_library(gtest STATIC ../tools/gtest/src/gtest-all.cc) + +add_subdirectory(lib) +add_subdirectory(cmd) +add_subdirectory(unittests) +add_subdirectory(integtests) diff --git a/cmake/CMakeLists_gtest.txt b/src/cmd/CMakeLists.txt similarity index 78% rename from cmake/CMakeLists_gtest.txt rename to src/cmd/CMakeLists.txt index c16327f7..822ce1f2 100644 --- a/cmake/CMakeLists_gtest.txt +++ b/src/cmd/CMakeLists.txt @@ -13,10 +13,5 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -set(inc_gtest_dirs - ${root_dir}/tools/gtest - ${root_dir}/tools/gtest/include -) - -include_directories(${inc_gtest_dirs}) -add_library(gtest STATIC ${root_dir}/tools/gtest/src/gtest-all.cc) +add_subdirectory(synergyc) +add_subdirectory(synergys) diff --git a/cmd/synergyc/.gitignore b/src/cmd/synergyc/.gitignore similarity index 100% rename from cmd/synergyc/.gitignore rename to src/cmd/synergyc/.gitignore diff --git a/cmd/synergyc/CMSWindowsClientTaskBarReceiver.cpp b/src/cmd/synergyc/CMSWindowsClientTaskBarReceiver.cpp similarity index 100% rename from cmd/synergyc/CMSWindowsClientTaskBarReceiver.cpp rename to src/cmd/synergyc/CMSWindowsClientTaskBarReceiver.cpp diff --git a/cmd/synergyc/CMSWindowsClientTaskBarReceiver.h b/src/cmd/synergyc/CMSWindowsClientTaskBarReceiver.h similarity index 100% rename from cmd/synergyc/CMSWindowsClientTaskBarReceiver.h rename to src/cmd/synergyc/CMSWindowsClientTaskBarReceiver.h diff --git a/src/cmd/synergyc/CMakeLists.txt b/src/cmd/synergyc/CMakeLists.txt new file mode 100644 index 00000000..7bd6c8dd --- /dev/null +++ b/src/cmd/synergyc/CMakeLists.txt @@ -0,0 +1,56 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(src + synergyc.cpp +) + +if (WIN32) + list(APPEND src + CMSWindowsClientTaskBarReceiver.cpp + CMSWindowsClientTaskBarReceiver.h + resource.h + synergyc.ico + synergyc.rc + tb_error.ico + tb_idle.ico + tb_run.ico + tb_wait.ico + ) +elseif (APPLE) + list(APPEND src COSXClientTaskBarReceiver.cpp) +elseif (UNIX) + list(APPEND src CXWindowsClientTaskBarReceiver.cpp) +endif() + +set(inc + ../.. + ../../lib + ../../lib/arch + ../../lib/base + ../../lib/client + ../../lib/common + ../../lib/io + ../../lib/mt + ../../lib/net + ../../lib/platform + ../../lib/synergy +) + +include_directories(${inc}) +add_executable(synergyc ${src}) +target_link_libraries(synergyc + libarch libbase libclient libcommon libio libmt libnet libplatform + libserver libsynergy ${libs}) diff --git a/cmd/synergyc/COSXClientTaskBarReceiver.cpp b/src/cmd/synergyc/COSXClientTaskBarReceiver.cpp similarity index 100% rename from cmd/synergyc/COSXClientTaskBarReceiver.cpp rename to src/cmd/synergyc/COSXClientTaskBarReceiver.cpp diff --git a/cmd/synergyc/COSXClientTaskBarReceiver.h b/src/cmd/synergyc/COSXClientTaskBarReceiver.h similarity index 100% rename from cmd/synergyc/COSXClientTaskBarReceiver.h rename to src/cmd/synergyc/COSXClientTaskBarReceiver.h diff --git a/cmd/synergyc/CXWindowsClientTaskBarReceiver.cpp b/src/cmd/synergyc/CXWindowsClientTaskBarReceiver.cpp similarity index 100% rename from cmd/synergyc/CXWindowsClientTaskBarReceiver.cpp rename to src/cmd/synergyc/CXWindowsClientTaskBarReceiver.cpp diff --git a/cmd/synergyc/CXWindowsClientTaskBarReceiver.h b/src/cmd/synergyc/CXWindowsClientTaskBarReceiver.h similarity index 100% rename from cmd/synergyc/CXWindowsClientTaskBarReceiver.h rename to src/cmd/synergyc/CXWindowsClientTaskBarReceiver.h diff --git a/cmd/synergyc/resource.h b/src/cmd/synergyc/resource.h similarity index 100% rename from cmd/synergyc/resource.h rename to src/cmd/synergyc/resource.h diff --git a/cmd/synergyc/synergyc.cpp b/src/cmd/synergyc/synergyc.cpp similarity index 100% rename from cmd/synergyc/synergyc.cpp rename to src/cmd/synergyc/synergyc.cpp diff --git a/cmd/synergyc/synergyc.ico b/src/cmd/synergyc/synergyc.ico similarity index 100% rename from cmd/synergyc/synergyc.ico rename to src/cmd/synergyc/synergyc.ico diff --git a/cmd/synergyc/synergyc.rc b/src/cmd/synergyc/synergyc.rc similarity index 100% rename from cmd/synergyc/synergyc.rc rename to src/cmd/synergyc/synergyc.rc diff --git a/cmd/synergyc/tb_error.ico b/src/cmd/synergyc/tb_error.ico similarity index 100% rename from cmd/synergyc/tb_error.ico rename to src/cmd/synergyc/tb_error.ico diff --git a/cmd/synergyc/tb_idle.ico b/src/cmd/synergyc/tb_idle.ico similarity index 100% rename from cmd/synergyc/tb_idle.ico rename to src/cmd/synergyc/tb_idle.ico diff --git a/cmd/synergyc/tb_run.ico b/src/cmd/synergyc/tb_run.ico similarity index 100% rename from cmd/synergyc/tb_run.ico rename to src/cmd/synergyc/tb_run.ico diff --git a/cmd/synergyc/tb_wait.ico b/src/cmd/synergyc/tb_wait.ico similarity index 100% rename from cmd/synergyc/tb_wait.ico rename to src/cmd/synergyc/tb_wait.ico diff --git a/cmd/synergys/.gitignore b/src/cmd/synergys/.gitignore similarity index 100% rename from cmd/synergys/.gitignore rename to src/cmd/synergys/.gitignore diff --git a/cmd/synergys/CMSWindowsServerTaskBarReceiver.cpp b/src/cmd/synergys/CMSWindowsServerTaskBarReceiver.cpp similarity index 100% rename from cmd/synergys/CMSWindowsServerTaskBarReceiver.cpp rename to src/cmd/synergys/CMSWindowsServerTaskBarReceiver.cpp diff --git a/cmd/synergys/CMSWindowsServerTaskBarReceiver.h b/src/cmd/synergys/CMSWindowsServerTaskBarReceiver.h similarity index 100% rename from cmd/synergys/CMSWindowsServerTaskBarReceiver.h rename to src/cmd/synergys/CMSWindowsServerTaskBarReceiver.h diff --git a/src/cmd/synergys/CMakeLists.txt b/src/cmd/synergys/CMakeLists.txt new file mode 100644 index 00000000..7098aa98 --- /dev/null +++ b/src/cmd/synergys/CMakeLists.txt @@ -0,0 +1,58 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(src + synergys.cpp +) + +if (WIN32) + list(APPEND src + CMSWindowsServerTaskBarReceiver.cpp + CMSWindowsServerTaskBarReceiver.h + resource.h + synergys.ico + synergys.rc + tb_error.ico + tb_idle.ico + tb_run.ico + tb_wait.ico + ) +elseif (APPLE) + list(APPEND src_cmd_synergys + COSXServerTaskBarReceiver.cpp) +elseif (UNIX) + list(APPEND src + CXWindowsServerTaskBarReceiver.cpp) +endif() + +set(inc + ../.. + ../../lib + ../../lib/arch + ../../lib/base + ../../lib/common + ../../lib/io + ../../lib/mt + ../../lib/net + ../../lib/platform + ../../lib/synergy + ../../lib/server +) + +include_directories(${inc}) +add_executable(synergys ${src}) +target_link_libraries(synergys + libarch libbase libclient libcommon libio libmt libnet libplatform + libserver libsynergy ${libs}) diff --git a/cmd/synergys/COSXServerTaskBarReceiver.cpp b/src/cmd/synergys/COSXServerTaskBarReceiver.cpp similarity index 100% rename from cmd/synergys/COSXServerTaskBarReceiver.cpp rename to src/cmd/synergys/COSXServerTaskBarReceiver.cpp diff --git a/cmd/synergys/COSXServerTaskBarReceiver.h b/src/cmd/synergys/COSXServerTaskBarReceiver.h similarity index 100% rename from cmd/synergys/COSXServerTaskBarReceiver.h rename to src/cmd/synergys/COSXServerTaskBarReceiver.h diff --git a/cmd/synergys/CXWindowsServerTaskBarReceiver.cpp b/src/cmd/synergys/CXWindowsServerTaskBarReceiver.cpp similarity index 100% rename from cmd/synergys/CXWindowsServerTaskBarReceiver.cpp rename to src/cmd/synergys/CXWindowsServerTaskBarReceiver.cpp diff --git a/cmd/synergys/CXWindowsServerTaskBarReceiver.h b/src/cmd/synergys/CXWindowsServerTaskBarReceiver.h similarity index 100% rename from cmd/synergys/CXWindowsServerTaskBarReceiver.h rename to src/cmd/synergys/CXWindowsServerTaskBarReceiver.h diff --git a/cmd/synergys/resource.h b/src/cmd/synergys/resource.h similarity index 100% rename from cmd/synergys/resource.h rename to src/cmd/synergys/resource.h diff --git a/cmd/synergys/synergys.cpp b/src/cmd/synergys/synergys.cpp similarity index 100% rename from cmd/synergys/synergys.cpp rename to src/cmd/synergys/synergys.cpp diff --git a/cmd/synergys/synergys.ico b/src/cmd/synergys/synergys.ico similarity index 100% rename from cmd/synergys/synergys.ico rename to src/cmd/synergys/synergys.ico diff --git a/cmd/synergys/synergys.rc b/src/cmd/synergys/synergys.rc similarity index 100% rename from cmd/synergys/synergys.rc rename to src/cmd/synergys/synergys.rc diff --git a/cmd/synergys/tb_error.ico b/src/cmd/synergys/tb_error.ico similarity index 100% rename from cmd/synergys/tb_error.ico rename to src/cmd/synergys/tb_error.ico diff --git a/cmd/synergys/tb_idle.ico b/src/cmd/synergys/tb_idle.ico similarity index 100% rename from cmd/synergys/tb_idle.ico rename to src/cmd/synergys/tb_idle.ico diff --git a/cmd/synergys/tb_run.ico b/src/cmd/synergys/tb_run.ico similarity index 100% rename from cmd/synergys/tb_run.ico rename to src/cmd/synergys/tb_run.ico diff --git a/cmd/synergys/tb_wait.ico b/src/cmd/synergys/tb_wait.ico similarity index 100% rename from cmd/synergys/tb_wait.ico rename to src/cmd/synergys/tb_wait.ico diff --git a/gui/COPYING b/src/gui/COPYING similarity index 100% rename from gui/COPYING rename to src/gui/COPYING diff --git a/gui/INSTALL b/src/gui/INSTALL similarity index 100% rename from gui/INSTALL rename to src/gui/INSTALL diff --git a/gui/README b/src/gui/README similarity index 100% rename from gui/README rename to src/gui/README diff --git a/gui/qsynergy.pro b/src/gui/qsynergy.pro similarity index 100% rename from gui/qsynergy.pro rename to src/gui/qsynergy.pro diff --git a/gui/res/AboutDialogBase.ui b/src/gui/res/AboutDialogBase.ui similarity index 100% rename from gui/res/AboutDialogBase.ui rename to src/gui/res/AboutDialogBase.ui diff --git a/gui/res/ActionDialogBase.ui b/src/gui/res/ActionDialogBase.ui similarity index 100% rename from gui/res/ActionDialogBase.ui rename to src/gui/res/ActionDialogBase.ui diff --git a/gui/res/HotkeyDialogBase.ui b/src/gui/res/HotkeyDialogBase.ui similarity index 100% rename from gui/res/HotkeyDialogBase.ui rename to src/gui/res/HotkeyDialogBase.ui diff --git a/gui/res/LogDialogBase.ui b/src/gui/res/LogDialogBase.ui similarity index 100% rename from gui/res/LogDialogBase.ui rename to src/gui/res/LogDialogBase.ui diff --git a/gui/res/MainWindowBase.ui b/src/gui/res/MainWindowBase.ui similarity index 100% rename from gui/res/MainWindowBase.ui rename to src/gui/res/MainWindowBase.ui diff --git a/gui/res/QSynergy.qrc b/src/gui/res/QSynergy.qrc similarity index 100% rename from gui/res/QSynergy.qrc rename to src/gui/res/QSynergy.qrc diff --git a/gui/res/ScreenSettingsDialogBase.ui b/src/gui/res/ScreenSettingsDialogBase.ui similarity index 100% rename from gui/res/ScreenSettingsDialogBase.ui rename to src/gui/res/ScreenSettingsDialogBase.ui diff --git a/gui/res/ServerConfigDialogBase.ui b/src/gui/res/ServerConfigDialogBase.ui similarity index 100% rename from gui/res/ServerConfigDialogBase.ui rename to src/gui/res/ServerConfigDialogBase.ui diff --git a/gui/res/SettingsDialogBase.ui b/src/gui/res/SettingsDialogBase.ui similarity index 100% rename from gui/res/SettingsDialogBase.ui rename to src/gui/res/SettingsDialogBase.ui diff --git a/gui/res/WindowsServicesBase.ui b/src/gui/res/WindowsServicesBase.ui similarity index 100% rename from gui/res/WindowsServicesBase.ui rename to src/gui/res/WindowsServicesBase.ui diff --git a/gui/res/icons/16x16/synergy-connected.png b/src/gui/res/icons/16x16/synergy-connected.png similarity index 100% rename from gui/res/icons/16x16/synergy-connected.png rename to src/gui/res/icons/16x16/synergy-connected.png diff --git a/gui/res/icons/16x16/synergy-disconnected.png b/src/gui/res/icons/16x16/synergy-disconnected.png similarity index 100% rename from gui/res/icons/16x16/synergy-disconnected.png rename to src/gui/res/icons/16x16/synergy-disconnected.png diff --git a/gui/res/icons/64x64/user-trash.png b/src/gui/res/icons/64x64/user-trash.png similarity index 100% rename from gui/res/icons/64x64/user-trash.png rename to src/gui/res/icons/64x64/user-trash.png diff --git a/gui/res/icons/64x64/video-display.png b/src/gui/res/icons/64x64/video-display.png similarity index 100% rename from gui/res/icons/64x64/video-display.png rename to src/gui/res/icons/64x64/video-display.png diff --git a/gui/res/mac/QSynergy.icns b/src/gui/res/mac/QSynergy.icns similarity index 100% rename from gui/res/mac/QSynergy.icns rename to src/gui/res/mac/QSynergy.icns diff --git a/gui/res/mac/QSynergy.plist b/src/gui/res/mac/QSynergy.plist similarity index 100% rename from gui/res/mac/QSynergy.plist rename to src/gui/res/mac/QSynergy.plist diff --git a/gui/res/win/QSynergy.ico b/src/gui/res/win/QSynergy.ico similarity index 100% rename from gui/res/win/QSynergy.ico rename to src/gui/res/win/QSynergy.ico diff --git a/gui/res/win/QSynergy.rc b/src/gui/res/win/QSynergy.rc similarity index 100% rename from gui/res/win/QSynergy.rc rename to src/gui/res/win/QSynergy.rc diff --git a/gui/src/AboutDialog.cpp b/src/gui/src/AboutDialog.cpp similarity index 100% rename from gui/src/AboutDialog.cpp rename to src/gui/src/AboutDialog.cpp diff --git a/gui/src/AboutDialog.h b/src/gui/src/AboutDialog.h similarity index 100% rename from gui/src/AboutDialog.h rename to src/gui/src/AboutDialog.h diff --git a/gui/src/Action.cpp b/src/gui/src/Action.cpp similarity index 100% rename from gui/src/Action.cpp rename to src/gui/src/Action.cpp diff --git a/gui/src/Action.h b/src/gui/src/Action.h similarity index 100% rename from gui/src/Action.h rename to src/gui/src/Action.h diff --git a/gui/src/ActionDialog.cpp b/src/gui/src/ActionDialog.cpp similarity index 100% rename from gui/src/ActionDialog.cpp rename to src/gui/src/ActionDialog.cpp diff --git a/gui/src/ActionDialog.h b/src/gui/src/ActionDialog.h similarity index 100% rename from gui/src/ActionDialog.h rename to src/gui/src/ActionDialog.h diff --git a/gui/src/AppConfig.cpp b/src/gui/src/AppConfig.cpp similarity index 100% rename from gui/src/AppConfig.cpp rename to src/gui/src/AppConfig.cpp diff --git a/gui/src/AppConfig.h b/src/gui/src/AppConfig.h similarity index 100% rename from gui/src/AppConfig.h rename to src/gui/src/AppConfig.h diff --git a/gui/src/BaseConfig.cpp b/src/gui/src/BaseConfig.cpp similarity index 100% rename from gui/src/BaseConfig.cpp rename to src/gui/src/BaseConfig.cpp diff --git a/gui/src/BaseConfig.h b/src/gui/src/BaseConfig.h similarity index 100% rename from gui/src/BaseConfig.h rename to src/gui/src/BaseConfig.h diff --git a/gui/src/Hotkey.cpp b/src/gui/src/Hotkey.cpp similarity index 100% rename from gui/src/Hotkey.cpp rename to src/gui/src/Hotkey.cpp diff --git a/gui/src/Hotkey.h b/src/gui/src/Hotkey.h similarity index 100% rename from gui/src/Hotkey.h rename to src/gui/src/Hotkey.h diff --git a/gui/src/HotkeyDialog.cpp b/src/gui/src/HotkeyDialog.cpp similarity index 100% rename from gui/src/HotkeyDialog.cpp rename to src/gui/src/HotkeyDialog.cpp diff --git a/gui/src/HotkeyDialog.h b/src/gui/src/HotkeyDialog.h similarity index 100% rename from gui/src/HotkeyDialog.h rename to src/gui/src/HotkeyDialog.h diff --git a/gui/src/KeySequence.cpp b/src/gui/src/KeySequence.cpp similarity index 100% rename from gui/src/KeySequence.cpp rename to src/gui/src/KeySequence.cpp diff --git a/gui/src/KeySequence.h b/src/gui/src/KeySequence.h similarity index 100% rename from gui/src/KeySequence.h rename to src/gui/src/KeySequence.h diff --git a/gui/src/KeySequenceWidget.cpp b/src/gui/src/KeySequenceWidget.cpp similarity index 100% rename from gui/src/KeySequenceWidget.cpp rename to src/gui/src/KeySequenceWidget.cpp diff --git a/gui/src/KeySequenceWidget.h b/src/gui/src/KeySequenceWidget.h similarity index 100% rename from gui/src/KeySequenceWidget.h rename to src/gui/src/KeySequenceWidget.h diff --git a/gui/src/LogDialog.cpp b/src/gui/src/LogDialog.cpp similarity index 100% rename from gui/src/LogDialog.cpp rename to src/gui/src/LogDialog.cpp diff --git a/gui/src/LogDialog.h b/src/gui/src/LogDialog.h similarity index 100% rename from gui/src/LogDialog.h rename to src/gui/src/LogDialog.h diff --git a/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp similarity index 100% rename from gui/src/MainWindow.cpp rename to src/gui/src/MainWindow.cpp diff --git a/gui/src/MainWindow.h b/src/gui/src/MainWindow.h similarity index 100% rename from gui/src/MainWindow.h rename to src/gui/src/MainWindow.h diff --git a/gui/src/NewScreenWidget.cpp b/src/gui/src/NewScreenWidget.cpp similarity index 100% rename from gui/src/NewScreenWidget.cpp rename to src/gui/src/NewScreenWidget.cpp diff --git a/gui/src/NewScreenWidget.h b/src/gui/src/NewScreenWidget.h similarity index 100% rename from gui/src/NewScreenWidget.h rename to src/gui/src/NewScreenWidget.h diff --git a/gui/src/QSynergyApplication.cpp b/src/gui/src/QSynergyApplication.cpp similarity index 100% rename from gui/src/QSynergyApplication.cpp rename to src/gui/src/QSynergyApplication.cpp diff --git a/gui/src/QSynergyApplication.h b/src/gui/src/QSynergyApplication.h similarity index 100% rename from gui/src/QSynergyApplication.h rename to src/gui/src/QSynergyApplication.h diff --git a/gui/src/Screen.cpp b/src/gui/src/Screen.cpp similarity index 100% rename from gui/src/Screen.cpp rename to src/gui/src/Screen.cpp diff --git a/gui/src/Screen.h b/src/gui/src/Screen.h similarity index 100% rename from gui/src/Screen.h rename to src/gui/src/Screen.h diff --git a/gui/src/ScreenSettingsDialog.cpp b/src/gui/src/ScreenSettingsDialog.cpp similarity index 100% rename from gui/src/ScreenSettingsDialog.cpp rename to src/gui/src/ScreenSettingsDialog.cpp diff --git a/gui/src/ScreenSettingsDialog.h b/src/gui/src/ScreenSettingsDialog.h similarity index 100% rename from gui/src/ScreenSettingsDialog.h rename to src/gui/src/ScreenSettingsDialog.h diff --git a/gui/src/ScreenSetupModel.cpp b/src/gui/src/ScreenSetupModel.cpp similarity index 100% rename from gui/src/ScreenSetupModel.cpp rename to src/gui/src/ScreenSetupModel.cpp diff --git a/gui/src/ScreenSetupModel.h b/src/gui/src/ScreenSetupModel.h similarity index 100% rename from gui/src/ScreenSetupModel.h rename to src/gui/src/ScreenSetupModel.h diff --git a/gui/src/ScreenSetupView.cpp b/src/gui/src/ScreenSetupView.cpp similarity index 100% rename from gui/src/ScreenSetupView.cpp rename to src/gui/src/ScreenSetupView.cpp diff --git a/gui/src/ScreenSetupView.h b/src/gui/src/ScreenSetupView.h similarity index 100% rename from gui/src/ScreenSetupView.h rename to src/gui/src/ScreenSetupView.h diff --git a/gui/src/ServerConfig.cpp b/src/gui/src/ServerConfig.cpp similarity index 100% rename from gui/src/ServerConfig.cpp rename to src/gui/src/ServerConfig.cpp diff --git a/gui/src/ServerConfig.h b/src/gui/src/ServerConfig.h similarity index 100% rename from gui/src/ServerConfig.h rename to src/gui/src/ServerConfig.h diff --git a/gui/src/ServerConfigDialog.cpp b/src/gui/src/ServerConfigDialog.cpp similarity index 100% rename from gui/src/ServerConfigDialog.cpp rename to src/gui/src/ServerConfigDialog.cpp diff --git a/gui/src/ServerConfigDialog.h b/src/gui/src/ServerConfigDialog.h similarity index 100% rename from gui/src/ServerConfigDialog.h rename to src/gui/src/ServerConfigDialog.h diff --git a/gui/src/SettingsDialog.cpp b/src/gui/src/SettingsDialog.cpp similarity index 100% rename from gui/src/SettingsDialog.cpp rename to src/gui/src/SettingsDialog.cpp diff --git a/gui/src/SettingsDialog.h b/src/gui/src/SettingsDialog.h similarity index 100% rename from gui/src/SettingsDialog.h rename to src/gui/src/SettingsDialog.h diff --git a/gui/src/TrashScreenWidget.cpp b/src/gui/src/TrashScreenWidget.cpp similarity index 100% rename from gui/src/TrashScreenWidget.cpp rename to src/gui/src/TrashScreenWidget.cpp diff --git a/gui/src/TrashScreenWidget.h b/src/gui/src/TrashScreenWidget.h similarity index 100% rename from gui/src/TrashScreenWidget.h rename to src/gui/src/TrashScreenWidget.h diff --git a/gui/src/WindowsServices.cpp b/src/gui/src/WindowsServices.cpp similarity index 100% rename from gui/src/WindowsServices.cpp rename to src/gui/src/WindowsServices.cpp diff --git a/gui/src/WindowsServices.h b/src/gui/src/WindowsServices.h similarity index 100% rename from gui/src/WindowsServices.h rename to src/gui/src/WindowsServices.h diff --git a/gui/src/main.cpp b/src/gui/src/main.cpp similarity index 100% rename from gui/src/main.cpp rename to src/gui/src/main.cpp diff --git a/cmake/CMakeLists_test.txt b/src/integtests/CMakeLists.txt similarity index 50% rename from cmake/CMakeLists_test.txt rename to src/integtests/CMakeLists.txt index 13ddb456..fc7ed603 100644 --- a/cmake/CMakeLists_test.txt +++ b/src/integtests/CMakeLists.txt @@ -13,36 +13,48 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Include all files that have unit tests -set(unittests - ${root_dir}/tools/gtest/src/gtest_main.cc - ${root_dir}/src/unittest/synergy/CClipboardTests.cpp -) - -set(integtests - ${root_dir}/src/integtest/Main.cpp +set(src + Main.cpp ) if (WIN32) - list(APPEND integtests - ${root_dir}/src/integtest/platform/CMSWindowsClipboardTests.cpp + + # windows + list(APPEND src + platform/CMSWindowsClipboardTests.cpp ) + +elseif (APPLE) + + # mac + list(APPEND src + platform/COSXClipboardTests.cpp + ) + +elseif (UNIX) + + # unix/linux + list(APPEND src + platform/CXWindowsClipboardTests.cpp + ) + endif() -if (UNIX) - if (APPLE) - list(APPEND integtests - ${root_dir}/src/integtest/platform/COSXClipboardTests.cpp - ) - else () - list(APPEND integtests - ${root_dir}/src/integtest/platform/CXWindowsClipboardTests.cpp - ) - endif() -endif() +set(inc + ../lib/arch + ../lib/base + ../lib/client + ../lib/common + ../lib/io + ../lib/mt + ../lib/net + ../lib/platform + ../lib/synergy + ../../tools/gtest/include +) -add_executable(unittests ${unittests}) -target_link_libraries(unittests synergy gtest ${libs}) - -add_executable(integtests ${integtests}) -target_link_libraries(integtests synergy gtest ${libs}) +include_directories(${inc}) +add_executable(integtests ${src}) +target_link_libraries(integtests + libarch libbase libclient libcommon libio libmt libnet libplatform + libserver libsynergy gtest ${libs}) diff --git a/src/integtest/Main.cpp b/src/integtests/Main.cpp similarity index 100% rename from src/integtest/Main.cpp rename to src/integtests/Main.cpp diff --git a/src/integtest/platform/CMSWindowsClipboardTests.cpp b/src/integtests/platform/CMSWindowsClipboardTests.cpp similarity index 100% rename from src/integtest/platform/CMSWindowsClipboardTests.cpp rename to src/integtests/platform/CMSWindowsClipboardTests.cpp diff --git a/src/integtest/platform/COSXClipboardTests.cpp b/src/integtests/platform/COSXClipboardTests.cpp similarity index 100% rename from src/integtest/platform/COSXClipboardTests.cpp rename to src/integtests/platform/COSXClipboardTests.cpp diff --git a/src/integtest/platform/CXWindowsClipboardTests.cpp b/src/integtests/platform/CXWindowsClipboardTests.cpp similarity index 100% rename from src/integtest/platform/CXWindowsClipboardTests.cpp rename to src/integtests/platform/CXWindowsClipboardTests.cpp diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt new file mode 100644 index 00000000..4cbb3c78 --- /dev/null +++ b/src/lib/CMakeLists.txt @@ -0,0 +1,25 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +add_subdirectory(arch) +add_subdirectory(base) +add_subdirectory(client) +add_subdirectory(common) +add_subdirectory(io) +add_subdirectory(mt) +add_subdirectory(net) +add_subdirectory(platform) +add_subdirectory(server) +add_subdirectory(synergy) diff --git a/lib/arch/CArch.cpp b/src/lib/arch/CArch.cpp similarity index 100% rename from lib/arch/CArch.cpp rename to src/lib/arch/CArch.cpp diff --git a/lib/arch/CArch.h b/src/lib/arch/CArch.h similarity index 100% rename from lib/arch/CArch.h rename to src/lib/arch/CArch.h diff --git a/lib/arch/CArchAppUtil.cpp b/src/lib/arch/CArchAppUtil.cpp similarity index 100% rename from lib/arch/CArchAppUtil.cpp rename to src/lib/arch/CArchAppUtil.cpp diff --git a/lib/arch/CArchAppUtil.h b/src/lib/arch/CArchAppUtil.h similarity index 100% rename from lib/arch/CArchAppUtil.h rename to src/lib/arch/CArchAppUtil.h diff --git a/lib/arch/CArchAppUtilUnix.cpp b/src/lib/arch/CArchAppUtilUnix.cpp similarity index 100% rename from lib/arch/CArchAppUtilUnix.cpp rename to src/lib/arch/CArchAppUtilUnix.cpp diff --git a/lib/arch/CArchAppUtilUnix.h b/src/lib/arch/CArchAppUtilUnix.h similarity index 100% rename from lib/arch/CArchAppUtilUnix.h rename to src/lib/arch/CArchAppUtilUnix.h diff --git a/lib/arch/CArchAppUtilWindows.cpp b/src/lib/arch/CArchAppUtilWindows.cpp similarity index 100% rename from lib/arch/CArchAppUtilWindows.cpp rename to src/lib/arch/CArchAppUtilWindows.cpp diff --git a/lib/arch/CArchAppUtilWindows.h b/src/lib/arch/CArchAppUtilWindows.h similarity index 100% rename from lib/arch/CArchAppUtilWindows.h rename to src/lib/arch/CArchAppUtilWindows.h diff --git a/lib/arch/CArchConsoleStd.cpp b/src/lib/arch/CArchConsoleStd.cpp similarity index 100% rename from lib/arch/CArchConsoleStd.cpp rename to src/lib/arch/CArchConsoleStd.cpp diff --git a/lib/arch/CArchConsoleStd.h b/src/lib/arch/CArchConsoleStd.h similarity index 100% rename from lib/arch/CArchConsoleStd.h rename to src/lib/arch/CArchConsoleStd.h diff --git a/lib/arch/CArchConsoleUnix.cpp b/src/lib/arch/CArchConsoleUnix.cpp similarity index 100% rename from lib/arch/CArchConsoleUnix.cpp rename to src/lib/arch/CArchConsoleUnix.cpp diff --git a/lib/arch/CArchConsoleUnix.h b/src/lib/arch/CArchConsoleUnix.h similarity index 100% rename from lib/arch/CArchConsoleUnix.h rename to src/lib/arch/CArchConsoleUnix.h diff --git a/lib/arch/CArchConsoleWindows.cpp b/src/lib/arch/CArchConsoleWindows.cpp similarity index 100% rename from lib/arch/CArchConsoleWindows.cpp rename to src/lib/arch/CArchConsoleWindows.cpp diff --git a/lib/arch/CArchConsoleWindows.h b/src/lib/arch/CArchConsoleWindows.h similarity index 100% rename from lib/arch/CArchConsoleWindows.h rename to src/lib/arch/CArchConsoleWindows.h diff --git a/lib/arch/CArchDaemonNone.cpp b/src/lib/arch/CArchDaemonNone.cpp similarity index 100% rename from lib/arch/CArchDaemonNone.cpp rename to src/lib/arch/CArchDaemonNone.cpp diff --git a/lib/arch/CArchDaemonNone.h b/src/lib/arch/CArchDaemonNone.h similarity index 100% rename from lib/arch/CArchDaemonNone.h rename to src/lib/arch/CArchDaemonNone.h diff --git a/lib/arch/CArchDaemonUnix.cpp b/src/lib/arch/CArchDaemonUnix.cpp similarity index 100% rename from lib/arch/CArchDaemonUnix.cpp rename to src/lib/arch/CArchDaemonUnix.cpp diff --git a/lib/arch/CArchDaemonUnix.h b/src/lib/arch/CArchDaemonUnix.h similarity index 100% rename from lib/arch/CArchDaemonUnix.h rename to src/lib/arch/CArchDaemonUnix.h diff --git a/lib/arch/CArchDaemonWindows.cpp b/src/lib/arch/CArchDaemonWindows.cpp similarity index 100% rename from lib/arch/CArchDaemonWindows.cpp rename to src/lib/arch/CArchDaemonWindows.cpp diff --git a/lib/arch/CArchDaemonWindows.h b/src/lib/arch/CArchDaemonWindows.h similarity index 100% rename from lib/arch/CArchDaemonWindows.h rename to src/lib/arch/CArchDaemonWindows.h diff --git a/lib/arch/CArchFileUnix.cpp b/src/lib/arch/CArchFileUnix.cpp similarity index 100% rename from lib/arch/CArchFileUnix.cpp rename to src/lib/arch/CArchFileUnix.cpp diff --git a/lib/arch/CArchFileUnix.h b/src/lib/arch/CArchFileUnix.h similarity index 100% rename from lib/arch/CArchFileUnix.h rename to src/lib/arch/CArchFileUnix.h diff --git a/lib/arch/CArchFileWindows.cpp b/src/lib/arch/CArchFileWindows.cpp similarity index 100% rename from lib/arch/CArchFileWindows.cpp rename to src/lib/arch/CArchFileWindows.cpp diff --git a/lib/arch/CArchFileWindows.h b/src/lib/arch/CArchFileWindows.h similarity index 100% rename from lib/arch/CArchFileWindows.h rename to src/lib/arch/CArchFileWindows.h diff --git a/lib/arch/CArchLogUnix.cpp b/src/lib/arch/CArchLogUnix.cpp similarity index 100% rename from lib/arch/CArchLogUnix.cpp rename to src/lib/arch/CArchLogUnix.cpp diff --git a/lib/arch/CArchLogUnix.h b/src/lib/arch/CArchLogUnix.h similarity index 100% rename from lib/arch/CArchLogUnix.h rename to src/lib/arch/CArchLogUnix.h diff --git a/lib/arch/CArchLogWindows.cpp b/src/lib/arch/CArchLogWindows.cpp similarity index 100% rename from lib/arch/CArchLogWindows.cpp rename to src/lib/arch/CArchLogWindows.cpp diff --git a/lib/arch/CArchLogWindows.h b/src/lib/arch/CArchLogWindows.h similarity index 100% rename from lib/arch/CArchLogWindows.h rename to src/lib/arch/CArchLogWindows.h diff --git a/lib/arch/CArchMiscWindows.cpp b/src/lib/arch/CArchMiscWindows.cpp similarity index 100% rename from lib/arch/CArchMiscWindows.cpp rename to src/lib/arch/CArchMiscWindows.cpp diff --git a/lib/arch/CArchMiscWindows.h b/src/lib/arch/CArchMiscWindows.h similarity index 100% rename from lib/arch/CArchMiscWindows.h rename to src/lib/arch/CArchMiscWindows.h diff --git a/lib/arch/CArchMultithreadPosix.cpp b/src/lib/arch/CArchMultithreadPosix.cpp similarity index 100% rename from lib/arch/CArchMultithreadPosix.cpp rename to src/lib/arch/CArchMultithreadPosix.cpp diff --git a/lib/arch/CArchMultithreadPosix.h b/src/lib/arch/CArchMultithreadPosix.h similarity index 100% rename from lib/arch/CArchMultithreadPosix.h rename to src/lib/arch/CArchMultithreadPosix.h diff --git a/lib/arch/CArchMultithreadWindows.cpp b/src/lib/arch/CArchMultithreadWindows.cpp similarity index 100% rename from lib/arch/CArchMultithreadWindows.cpp rename to src/lib/arch/CArchMultithreadWindows.cpp diff --git a/lib/arch/CArchMultithreadWindows.h b/src/lib/arch/CArchMultithreadWindows.h similarity index 100% rename from lib/arch/CArchMultithreadWindows.h rename to src/lib/arch/CArchMultithreadWindows.h diff --git a/lib/arch/CArchNetworkBSD.cpp b/src/lib/arch/CArchNetworkBSD.cpp similarity index 100% rename from lib/arch/CArchNetworkBSD.cpp rename to src/lib/arch/CArchNetworkBSD.cpp diff --git a/lib/arch/CArchNetworkBSD.h b/src/lib/arch/CArchNetworkBSD.h similarity index 100% rename from lib/arch/CArchNetworkBSD.h rename to src/lib/arch/CArchNetworkBSD.h diff --git a/lib/arch/CArchNetworkWinsock.cpp b/src/lib/arch/CArchNetworkWinsock.cpp similarity index 100% rename from lib/arch/CArchNetworkWinsock.cpp rename to src/lib/arch/CArchNetworkWinsock.cpp diff --git a/lib/arch/CArchNetworkWinsock.h b/src/lib/arch/CArchNetworkWinsock.h similarity index 100% rename from lib/arch/CArchNetworkWinsock.h rename to src/lib/arch/CArchNetworkWinsock.h diff --git a/lib/arch/CArchSleepUnix.cpp b/src/lib/arch/CArchSleepUnix.cpp similarity index 100% rename from lib/arch/CArchSleepUnix.cpp rename to src/lib/arch/CArchSleepUnix.cpp diff --git a/lib/arch/CArchSleepUnix.h b/src/lib/arch/CArchSleepUnix.h similarity index 100% rename from lib/arch/CArchSleepUnix.h rename to src/lib/arch/CArchSleepUnix.h diff --git a/lib/arch/CArchSleepWindows.cpp b/src/lib/arch/CArchSleepWindows.cpp similarity index 100% rename from lib/arch/CArchSleepWindows.cpp rename to src/lib/arch/CArchSleepWindows.cpp diff --git a/lib/arch/CArchSleepWindows.h b/src/lib/arch/CArchSleepWindows.h similarity index 100% rename from lib/arch/CArchSleepWindows.h rename to src/lib/arch/CArchSleepWindows.h diff --git a/lib/arch/CArchStringUnix.cpp b/src/lib/arch/CArchStringUnix.cpp similarity index 100% rename from lib/arch/CArchStringUnix.cpp rename to src/lib/arch/CArchStringUnix.cpp diff --git a/lib/arch/CArchStringUnix.h b/src/lib/arch/CArchStringUnix.h similarity index 100% rename from lib/arch/CArchStringUnix.h rename to src/lib/arch/CArchStringUnix.h diff --git a/lib/arch/CArchStringWindows.cpp b/src/lib/arch/CArchStringWindows.cpp similarity index 100% rename from lib/arch/CArchStringWindows.cpp rename to src/lib/arch/CArchStringWindows.cpp diff --git a/lib/arch/CArchStringWindows.h b/src/lib/arch/CArchStringWindows.h similarity index 100% rename from lib/arch/CArchStringWindows.h rename to src/lib/arch/CArchStringWindows.h diff --git a/lib/arch/CArchSystemUnix.cpp b/src/lib/arch/CArchSystemUnix.cpp similarity index 100% rename from lib/arch/CArchSystemUnix.cpp rename to src/lib/arch/CArchSystemUnix.cpp diff --git a/lib/arch/CArchSystemUnix.h b/src/lib/arch/CArchSystemUnix.h similarity index 100% rename from lib/arch/CArchSystemUnix.h rename to src/lib/arch/CArchSystemUnix.h diff --git a/lib/arch/CArchSystemWindows.cpp b/src/lib/arch/CArchSystemWindows.cpp similarity index 100% rename from lib/arch/CArchSystemWindows.cpp rename to src/lib/arch/CArchSystemWindows.cpp diff --git a/lib/arch/CArchSystemWindows.h b/src/lib/arch/CArchSystemWindows.h similarity index 100% rename from lib/arch/CArchSystemWindows.h rename to src/lib/arch/CArchSystemWindows.h diff --git a/lib/arch/CArchTaskBarWindows.cpp b/src/lib/arch/CArchTaskBarWindows.cpp similarity index 100% rename from lib/arch/CArchTaskBarWindows.cpp rename to src/lib/arch/CArchTaskBarWindows.cpp diff --git a/lib/arch/CArchTaskBarWindows.h b/src/lib/arch/CArchTaskBarWindows.h similarity index 100% rename from lib/arch/CArchTaskBarWindows.h rename to src/lib/arch/CArchTaskBarWindows.h diff --git a/lib/arch/CArchTaskBarXWindows.cpp b/src/lib/arch/CArchTaskBarXWindows.cpp similarity index 100% rename from lib/arch/CArchTaskBarXWindows.cpp rename to src/lib/arch/CArchTaskBarXWindows.cpp diff --git a/lib/arch/CArchTaskBarXWindows.h b/src/lib/arch/CArchTaskBarXWindows.h similarity index 100% rename from lib/arch/CArchTaskBarXWindows.h rename to src/lib/arch/CArchTaskBarXWindows.h diff --git a/lib/arch/CArchTimeUnix.cpp b/src/lib/arch/CArchTimeUnix.cpp similarity index 100% rename from lib/arch/CArchTimeUnix.cpp rename to src/lib/arch/CArchTimeUnix.cpp diff --git a/lib/arch/CArchTimeUnix.h b/src/lib/arch/CArchTimeUnix.h similarity index 100% rename from lib/arch/CArchTimeUnix.h rename to src/lib/arch/CArchTimeUnix.h diff --git a/lib/arch/CArchTimeWindows.cpp b/src/lib/arch/CArchTimeWindows.cpp similarity index 100% rename from lib/arch/CArchTimeWindows.cpp rename to src/lib/arch/CArchTimeWindows.cpp diff --git a/lib/arch/CArchTimeWindows.h b/src/lib/arch/CArchTimeWindows.h similarity index 100% rename from lib/arch/CArchTimeWindows.h rename to src/lib/arch/CArchTimeWindows.h diff --git a/src/lib/arch/CMakeLists.txt b/src/lib/arch/CMakeLists.txt new file mode 100644 index 00000000..3e6ae546 --- /dev/null +++ b/src/lib/arch/CMakeLists.txt @@ -0,0 +1,93 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(src + CArchAppUtil.cpp + CArch.cpp + CArchDaemonNone.cpp + XArch.cpp + CArchConsoleStd.cpp +) + +if (WIN32) + + set(inc + CArchAppUtil.h + CArchAppUtilWindows.h + CArchConsoleWindows.h + CArchDaemonWindows.h + CArchFileWindows.h + CArchLogWindows.h + CArchMiscWindows.h + CArchMultithreadWindows.h + CArchNetworkWinsock.h + CArchSleepWindows.h + CArchStringWindows.h + CArchSystemWindows.h + CArchTaskBarWindows.h + CArchTimeWindows.h + CArchConsoleStd.h + IArchAppUtil.h + XArchWindows.h + ) + + list(APPEND src + ${inc} + CArchAppUtilWindows.cpp + CArchConsoleWindows.cpp + CArchDaemonWindows.cpp + CArchFileWindows.cpp + CArchLogWindows.cpp + CArchMiscWindows.cpp + CArchMultithreadWindows.cpp + CArchNetworkWinsock.cpp + CArchSleepWindows.cpp + CArchStringWindows.cpp + CArchSystemWindows.cpp + CArchTaskBarWindows.cpp + CArchTimeWindows.cpp + XArchWindows.cpp + ) + +elseif (UNIX) + + list(APPEND src + CArchAppUtilUnix.cpp + CArchConsoleUnix.cpp + CArchDaemonUnix.cpp + CArchFileUnix.cpp + CArchLogUnix.cpp + CArchMultithreadPosix.cpp + CArchNetworkBSD.cpp + CArchSleepUnix.cpp + CArchStringUnix.cpp + CArchSystemUnix.cpp + CArchTaskBarXWindows.cpp + CArchTimeUnix.cpp + XArchUnix.cpp + ) + +endif() + +set(inc + ../base + ../common + ../mt + ../platform + ../synergy +) + +include_directories(${inc}) +add_library(libarch STATIC ${src}) diff --git a/lib/arch/CMultibyte.cpp b/src/lib/arch/CMultibyte.cpp similarity index 100% rename from lib/arch/CMultibyte.cpp rename to src/lib/arch/CMultibyte.cpp diff --git a/lib/arch/IArchAppUtil.h b/src/lib/arch/IArchAppUtil.h similarity index 100% rename from lib/arch/IArchAppUtil.h rename to src/lib/arch/IArchAppUtil.h diff --git a/lib/arch/IArchConsole.h b/src/lib/arch/IArchConsole.h similarity index 100% rename from lib/arch/IArchConsole.h rename to src/lib/arch/IArchConsole.h diff --git a/lib/arch/IArchDaemon.h b/src/lib/arch/IArchDaemon.h similarity index 100% rename from lib/arch/IArchDaemon.h rename to src/lib/arch/IArchDaemon.h diff --git a/lib/arch/IArchFile.h b/src/lib/arch/IArchFile.h similarity index 100% rename from lib/arch/IArchFile.h rename to src/lib/arch/IArchFile.h diff --git a/lib/arch/IArchLog.h b/src/lib/arch/IArchLog.h similarity index 100% rename from lib/arch/IArchLog.h rename to src/lib/arch/IArchLog.h diff --git a/lib/arch/IArchMultithread.h b/src/lib/arch/IArchMultithread.h similarity index 100% rename from lib/arch/IArchMultithread.h rename to src/lib/arch/IArchMultithread.h diff --git a/lib/arch/IArchNetwork.h b/src/lib/arch/IArchNetwork.h similarity index 100% rename from lib/arch/IArchNetwork.h rename to src/lib/arch/IArchNetwork.h diff --git a/lib/arch/IArchSleep.h b/src/lib/arch/IArchSleep.h similarity index 100% rename from lib/arch/IArchSleep.h rename to src/lib/arch/IArchSleep.h diff --git a/lib/arch/IArchString.h b/src/lib/arch/IArchString.h similarity index 100% rename from lib/arch/IArchString.h rename to src/lib/arch/IArchString.h diff --git a/lib/arch/IArchSystem.h b/src/lib/arch/IArchSystem.h similarity index 100% rename from lib/arch/IArchSystem.h rename to src/lib/arch/IArchSystem.h diff --git a/lib/arch/IArchTaskBar.h b/src/lib/arch/IArchTaskBar.h similarity index 100% rename from lib/arch/IArchTaskBar.h rename to src/lib/arch/IArchTaskBar.h diff --git a/lib/arch/IArchTaskBarReceiver.h b/src/lib/arch/IArchTaskBarReceiver.h similarity index 100% rename from lib/arch/IArchTaskBarReceiver.h rename to src/lib/arch/IArchTaskBarReceiver.h diff --git a/lib/arch/IArchTime.h b/src/lib/arch/IArchTime.h similarity index 100% rename from lib/arch/IArchTime.h rename to src/lib/arch/IArchTime.h diff --git a/lib/arch/XArch.cpp b/src/lib/arch/XArch.cpp similarity index 100% rename from lib/arch/XArch.cpp rename to src/lib/arch/XArch.cpp diff --git a/lib/arch/XArch.h b/src/lib/arch/XArch.h similarity index 100% rename from lib/arch/XArch.h rename to src/lib/arch/XArch.h diff --git a/lib/arch/XArchUnix.cpp b/src/lib/arch/XArchUnix.cpp similarity index 100% rename from lib/arch/XArchUnix.cpp rename to src/lib/arch/XArchUnix.cpp diff --git a/lib/arch/XArchUnix.h b/src/lib/arch/XArchUnix.h similarity index 100% rename from lib/arch/XArchUnix.h rename to src/lib/arch/XArchUnix.h diff --git a/lib/arch/XArchWindows.cpp b/src/lib/arch/XArchWindows.cpp similarity index 100% rename from lib/arch/XArchWindows.cpp rename to src/lib/arch/XArchWindows.cpp diff --git a/lib/arch/XArchWindows.h b/src/lib/arch/XArchWindows.h similarity index 100% rename from lib/arch/XArchWindows.h rename to src/lib/arch/XArchWindows.h diff --git a/lib/arch/vsnprintf.cpp b/src/lib/arch/vsnprintf.cpp similarity index 100% rename from lib/arch/vsnprintf.cpp rename to src/lib/arch/vsnprintf.cpp diff --git a/lib/base/CEvent.cpp b/src/lib/base/CEvent.cpp similarity index 100% rename from lib/base/CEvent.cpp rename to src/lib/base/CEvent.cpp diff --git a/lib/base/CEvent.h b/src/lib/base/CEvent.h similarity index 100% rename from lib/base/CEvent.h rename to src/lib/base/CEvent.h diff --git a/lib/base/CEventQueue.cpp b/src/lib/base/CEventQueue.cpp similarity index 100% rename from lib/base/CEventQueue.cpp rename to src/lib/base/CEventQueue.cpp diff --git a/lib/base/CEventQueue.h b/src/lib/base/CEventQueue.h similarity index 100% rename from lib/base/CEventQueue.h rename to src/lib/base/CEventQueue.h diff --git a/lib/base/CFunctionEventJob.cpp b/src/lib/base/CFunctionEventJob.cpp similarity index 100% rename from lib/base/CFunctionEventJob.cpp rename to src/lib/base/CFunctionEventJob.cpp diff --git a/lib/base/CFunctionEventJob.h b/src/lib/base/CFunctionEventJob.h similarity index 100% rename from lib/base/CFunctionEventJob.h rename to src/lib/base/CFunctionEventJob.h diff --git a/lib/base/CFunctionJob.cpp b/src/lib/base/CFunctionJob.cpp similarity index 100% rename from lib/base/CFunctionJob.cpp rename to src/lib/base/CFunctionJob.cpp diff --git a/lib/base/CFunctionJob.h b/src/lib/base/CFunctionJob.h similarity index 100% rename from lib/base/CFunctionJob.h rename to src/lib/base/CFunctionJob.h diff --git a/lib/base/CLog.cpp b/src/lib/base/CLog.cpp similarity index 100% rename from lib/base/CLog.cpp rename to src/lib/base/CLog.cpp diff --git a/lib/base/CLog.h b/src/lib/base/CLog.h similarity index 100% rename from lib/base/CLog.h rename to src/lib/base/CLog.h diff --git a/src/lib/base/CMakeLists.txt b/src/lib/base/CMakeLists.txt new file mode 100644 index 00000000..7a598593 --- /dev/null +++ b/src/lib/base/CMakeLists.txt @@ -0,0 +1,66 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(inc + CEvent.h + CEventQueue.h + CFunctionEventJob.h + CFunctionJob.h + CLog.h + CPriorityQueue.h + CSimpleEventQueueBuffer.h + CStopwatch.h + CString.h + CStringUtil.h + CUnicode.h + IEventJob.h + IEventQueue.h + IEventQueueBuffer.h + IJob.h + ILogOutputter.h + LogOutputters.h + TMethodEventJob.h + TMethodJob.h + XBase.h +) + +set(src + CEvent.cpp + CEventQueue.cpp + CFunctionEventJob.cpp + CFunctionJob.cpp + CLog.cpp + CSimpleEventQueueBuffer.cpp + CStopwatch.cpp + CStringUtil.cpp + CUnicode.cpp + IEventQueue.cpp + LogOutputters.cpp + XBase.cpp +) + +if (WIN32) + list(APPEND src ${inc}) +endif() + +set(inc + ../arch + ../common + ../mt + ../synergy +) + +include_directories(${inc}) +add_library(libbase STATIC ${src}) diff --git a/lib/base/CPriorityQueue.h b/src/lib/base/CPriorityQueue.h similarity index 100% rename from lib/base/CPriorityQueue.h rename to src/lib/base/CPriorityQueue.h diff --git a/lib/base/CSimpleEventQueueBuffer.cpp b/src/lib/base/CSimpleEventQueueBuffer.cpp similarity index 100% rename from lib/base/CSimpleEventQueueBuffer.cpp rename to src/lib/base/CSimpleEventQueueBuffer.cpp diff --git a/lib/base/CSimpleEventQueueBuffer.h b/src/lib/base/CSimpleEventQueueBuffer.h similarity index 100% rename from lib/base/CSimpleEventQueueBuffer.h rename to src/lib/base/CSimpleEventQueueBuffer.h diff --git a/lib/base/CStopwatch.cpp b/src/lib/base/CStopwatch.cpp similarity index 100% rename from lib/base/CStopwatch.cpp rename to src/lib/base/CStopwatch.cpp diff --git a/lib/base/CStopwatch.h b/src/lib/base/CStopwatch.h similarity index 100% rename from lib/base/CStopwatch.h rename to src/lib/base/CStopwatch.h diff --git a/lib/base/CString.h b/src/lib/base/CString.h similarity index 100% rename from lib/base/CString.h rename to src/lib/base/CString.h diff --git a/lib/base/CStringUtil.cpp b/src/lib/base/CStringUtil.cpp similarity index 100% rename from lib/base/CStringUtil.cpp rename to src/lib/base/CStringUtil.cpp diff --git a/lib/base/CStringUtil.h b/src/lib/base/CStringUtil.h similarity index 100% rename from lib/base/CStringUtil.h rename to src/lib/base/CStringUtil.h diff --git a/lib/base/CUnicode.cpp b/src/lib/base/CUnicode.cpp similarity index 100% rename from lib/base/CUnicode.cpp rename to src/lib/base/CUnicode.cpp diff --git a/lib/base/CUnicode.h b/src/lib/base/CUnicode.h similarity index 100% rename from lib/base/CUnicode.h rename to src/lib/base/CUnicode.h diff --git a/lib/base/IEventJob.h b/src/lib/base/IEventJob.h similarity index 100% rename from lib/base/IEventJob.h rename to src/lib/base/IEventJob.h diff --git a/lib/base/IEventQueue.cpp b/src/lib/base/IEventQueue.cpp similarity index 100% rename from lib/base/IEventQueue.cpp rename to src/lib/base/IEventQueue.cpp diff --git a/lib/base/IEventQueue.h b/src/lib/base/IEventQueue.h similarity index 100% rename from lib/base/IEventQueue.h rename to src/lib/base/IEventQueue.h diff --git a/lib/base/IEventQueueBuffer.h b/src/lib/base/IEventQueueBuffer.h similarity index 100% rename from lib/base/IEventQueueBuffer.h rename to src/lib/base/IEventQueueBuffer.h diff --git a/lib/base/IJob.h b/src/lib/base/IJob.h similarity index 100% rename from lib/base/IJob.h rename to src/lib/base/IJob.h diff --git a/lib/base/ILogOutputter.h b/src/lib/base/ILogOutputter.h similarity index 100% rename from lib/base/ILogOutputter.h rename to src/lib/base/ILogOutputter.h diff --git a/lib/base/LogOutputters.cpp b/src/lib/base/LogOutputters.cpp similarity index 100% rename from lib/base/LogOutputters.cpp rename to src/lib/base/LogOutputters.cpp diff --git a/lib/base/LogOutputters.h b/src/lib/base/LogOutputters.h similarity index 100% rename from lib/base/LogOutputters.h rename to src/lib/base/LogOutputters.h diff --git a/lib/base/TMethodEventJob.h b/src/lib/base/TMethodEventJob.h similarity index 100% rename from lib/base/TMethodEventJob.h rename to src/lib/base/TMethodEventJob.h diff --git a/lib/base/TMethodJob.h b/src/lib/base/TMethodJob.h similarity index 100% rename from lib/base/TMethodJob.h rename to src/lib/base/TMethodJob.h diff --git a/lib/base/XBase.cpp b/src/lib/base/XBase.cpp similarity index 100% rename from lib/base/XBase.cpp rename to src/lib/base/XBase.cpp diff --git a/lib/base/XBase.h b/src/lib/base/XBase.h similarity index 100% rename from lib/base/XBase.h rename to src/lib/base/XBase.h diff --git a/lib/client/CClient.cpp b/src/lib/client/CClient.cpp similarity index 100% rename from lib/client/CClient.cpp rename to src/lib/client/CClient.cpp diff --git a/lib/client/CClient.h b/src/lib/client/CClient.h similarity index 100% rename from lib/client/CClient.h rename to src/lib/client/CClient.h diff --git a/src/lib/client/CMakeLists.txt b/src/lib/client/CMakeLists.txt new file mode 100644 index 00000000..7edeccf7 --- /dev/null +++ b/src/lib/client/CMakeLists.txt @@ -0,0 +1,41 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(inc + CClient.h + CServerProxy.h +) + +set(src + CClient.cpp + CServerProxy.cpp +) + +if (WIN32) + list(APPEND src ${inc}) +endif() + +set(inc + ../arch + ../base + ../common + ../io + ../mt + ../net + ../synergy +) + +include_directories(${inc}) +add_library(libclient STATIC ${src}) diff --git a/lib/client/CServerProxy.cpp b/src/lib/client/CServerProxy.cpp similarity index 100% rename from lib/client/CServerProxy.cpp rename to src/lib/client/CServerProxy.cpp diff --git a/lib/client/CServerProxy.h b/src/lib/client/CServerProxy.h similarity index 100% rename from lib/client/CServerProxy.h rename to src/lib/client/CServerProxy.h diff --git a/lib/common/BasicTypes.h b/src/lib/common/BasicTypes.h similarity index 100% rename from lib/common/BasicTypes.h rename to src/lib/common/BasicTypes.h diff --git a/cmake/CMakeLists_doxygen.txt b/src/lib/common/CMakeLists.txt similarity index 80% rename from cmake/CMakeLists_doxygen.txt rename to src/lib/common/CMakeLists.txt index c60ad525..0a92103e 100644 --- a/cmake/CMakeLists_doxygen.txt +++ b/src/lib/common/CMakeLists.txt @@ -13,7 +13,16 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -set(VERSION, "${VERSION}") +set(inc + Version.h +) -# For doxygen.cfg, save the results based on a template (doxygen.cfg.in). -configure_file(${cmake_dir}/doxygen.cfg.in ${doc_dir}/doxygen.cfg) +set(src + Version.cpp +) + +if (WIN32) + list(APPEND src ${inc}) +endif() + +add_library(libcommon STATIC ${src}) diff --git a/lib/common/IInterface.h b/src/lib/common/IInterface.h similarity index 100% rename from lib/common/IInterface.h rename to src/lib/common/IInterface.h diff --git a/lib/common/MacOSXPrecomp.h b/src/lib/common/MacOSXPrecomp.h similarity index 100% rename from lib/common/MacOSXPrecomp.h rename to src/lib/common/MacOSXPrecomp.h diff --git a/lib/common/Version.cpp b/src/lib/common/Version.cpp similarity index 100% rename from lib/common/Version.cpp rename to src/lib/common/Version.cpp diff --git a/lib/common/Version.h b/src/lib/common/Version.h similarity index 100% rename from lib/common/Version.h rename to src/lib/common/Version.h diff --git a/lib/common/common.h b/src/lib/common/common.h similarity index 100% rename from lib/common/common.h rename to src/lib/common/common.h diff --git a/lib/common/stdbitset.h b/src/lib/common/stdbitset.h similarity index 100% rename from lib/common/stdbitset.h rename to src/lib/common/stdbitset.h diff --git a/lib/common/stddeque.h b/src/lib/common/stddeque.h similarity index 100% rename from lib/common/stddeque.h rename to src/lib/common/stddeque.h diff --git a/lib/common/stdfstream.h b/src/lib/common/stdfstream.h similarity index 100% rename from lib/common/stdfstream.h rename to src/lib/common/stdfstream.h diff --git a/lib/common/stdistream.h b/src/lib/common/stdistream.h similarity index 100% rename from lib/common/stdistream.h rename to src/lib/common/stdistream.h diff --git a/lib/common/stdlist.h b/src/lib/common/stdlist.h similarity index 100% rename from lib/common/stdlist.h rename to src/lib/common/stdlist.h diff --git a/lib/common/stdmap.h b/src/lib/common/stdmap.h similarity index 100% rename from lib/common/stdmap.h rename to src/lib/common/stdmap.h diff --git a/lib/common/stdostream.h b/src/lib/common/stdostream.h similarity index 100% rename from lib/common/stdostream.h rename to src/lib/common/stdostream.h diff --git a/lib/common/stdpost.h b/src/lib/common/stdpost.h similarity index 100% rename from lib/common/stdpost.h rename to src/lib/common/stdpost.h diff --git a/lib/common/stdpre.h b/src/lib/common/stdpre.h similarity index 100% rename from lib/common/stdpre.h rename to src/lib/common/stdpre.h diff --git a/lib/common/stdset.h b/src/lib/common/stdset.h similarity index 100% rename from lib/common/stdset.h rename to src/lib/common/stdset.h diff --git a/lib/common/stdsstream.h b/src/lib/common/stdsstream.h similarity index 100% rename from lib/common/stdsstream.h rename to src/lib/common/stdsstream.h diff --git a/lib/common/stdstring.h b/src/lib/common/stdstring.h similarity index 100% rename from lib/common/stdstring.h rename to src/lib/common/stdstring.h diff --git a/lib/common/stdvector.h b/src/lib/common/stdvector.h similarity index 100% rename from lib/common/stdvector.h rename to src/lib/common/stdvector.h diff --git a/src/lib/io/CMakeLists.txt b/src/lib/io/CMakeLists.txt new file mode 100644 index 00000000..95290b6a --- /dev/null +++ b/src/lib/io/CMakeLists.txt @@ -0,0 +1,41 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(inc + CStreamBuffer.h + CStreamFilter.h + IStream.h + IStreamFilterFactory.h + XIO.h +) + +set(src + CStreamBuffer.cpp + CStreamFilter.cpp + IStream.cpp + XIO.cpp +) + +if (WIN32) + list(APPEND src ${inc}) +endif() + +set(inc + ../base + ../common +) + +include_directories(${inc}) +add_library(libio STATIC ${src}) diff --git a/lib/io/CStreamBuffer.cpp b/src/lib/io/CStreamBuffer.cpp similarity index 100% rename from lib/io/CStreamBuffer.cpp rename to src/lib/io/CStreamBuffer.cpp diff --git a/lib/io/CStreamBuffer.h b/src/lib/io/CStreamBuffer.h similarity index 100% rename from lib/io/CStreamBuffer.h rename to src/lib/io/CStreamBuffer.h diff --git a/lib/io/CStreamFilter.cpp b/src/lib/io/CStreamFilter.cpp similarity index 100% rename from lib/io/CStreamFilter.cpp rename to src/lib/io/CStreamFilter.cpp diff --git a/lib/io/CStreamFilter.h b/src/lib/io/CStreamFilter.h similarity index 100% rename from lib/io/CStreamFilter.h rename to src/lib/io/CStreamFilter.h diff --git a/lib/io/IStream.cpp b/src/lib/io/IStream.cpp similarity index 100% rename from lib/io/IStream.cpp rename to src/lib/io/IStream.cpp diff --git a/lib/io/IStream.h b/src/lib/io/IStream.h similarity index 100% rename from lib/io/IStream.h rename to src/lib/io/IStream.h diff --git a/lib/io/IStreamFilterFactory.h b/src/lib/io/IStreamFilterFactory.h similarity index 100% rename from lib/io/IStreamFilterFactory.h rename to src/lib/io/IStreamFilterFactory.h diff --git a/lib/io/XIO.cpp b/src/lib/io/XIO.cpp similarity index 100% rename from lib/io/XIO.cpp rename to src/lib/io/XIO.cpp diff --git a/lib/io/XIO.h b/src/lib/io/XIO.h similarity index 100% rename from lib/io/XIO.h rename to src/lib/io/XIO.h diff --git a/lib/mt/CCondVar.cpp b/src/lib/mt/CCondVar.cpp similarity index 100% rename from lib/mt/CCondVar.cpp rename to src/lib/mt/CCondVar.cpp diff --git a/lib/mt/CCondVar.h b/src/lib/mt/CCondVar.h similarity index 100% rename from lib/mt/CCondVar.h rename to src/lib/mt/CCondVar.h diff --git a/lib/mt/CLock.cpp b/src/lib/mt/CLock.cpp similarity index 100% rename from lib/mt/CLock.cpp rename to src/lib/mt/CLock.cpp diff --git a/lib/mt/CLock.h b/src/lib/mt/CLock.h similarity index 100% rename from lib/mt/CLock.h rename to src/lib/mt/CLock.h diff --git a/src/lib/mt/CMakeLists.txt b/src/lib/mt/CMakeLists.txt new file mode 100644 index 00000000..0c35e62a --- /dev/null +++ b/src/lib/mt/CMakeLists.txt @@ -0,0 +1,45 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(inc + CCondVar.h + CLock.h + CMutex.h + CThread.h + XMT.h + XThread.h +) + +set(src + CCondVar.cpp + CLock.cpp + CMutex.cpp + CThread.cpp + XMT.cpp +) + +if (WIN32) + list(APPEND src ${inc}) +endif() + +set(inc + ../arch + ../base + ../common + ../synergy +) + +include_directories(${inc}) +add_library(libmt STATIC ${src}) diff --git a/lib/mt/CMutex.cpp b/src/lib/mt/CMutex.cpp similarity index 100% rename from lib/mt/CMutex.cpp rename to src/lib/mt/CMutex.cpp diff --git a/lib/mt/CMutex.h b/src/lib/mt/CMutex.h similarity index 100% rename from lib/mt/CMutex.h rename to src/lib/mt/CMutex.h diff --git a/lib/mt/CThread.cpp b/src/lib/mt/CThread.cpp similarity index 100% rename from lib/mt/CThread.cpp rename to src/lib/mt/CThread.cpp diff --git a/lib/mt/CThread.h b/src/lib/mt/CThread.h similarity index 100% rename from lib/mt/CThread.h rename to src/lib/mt/CThread.h diff --git a/lib/mt/XMT.cpp b/src/lib/mt/XMT.cpp similarity index 100% rename from lib/mt/XMT.cpp rename to src/lib/mt/XMT.cpp diff --git a/lib/mt/XMT.h b/src/lib/mt/XMT.h similarity index 100% rename from lib/mt/XMT.h rename to src/lib/mt/XMT.h diff --git a/lib/mt/XThread.h b/src/lib/mt/XThread.h similarity index 100% rename from lib/mt/XThread.h rename to src/lib/mt/XThread.h diff --git a/src/lib/net/CMakeLists.txt b/src/lib/net/CMakeLists.txt new file mode 100644 index 00000000..ecce8cd6 --- /dev/null +++ b/src/lib/net/CMakeLists.txt @@ -0,0 +1,57 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(inc + CNetworkAddress.h + CSocketMultiplexer.h + CTCPListenSocket.h + CTCPSocket.h + CTCPSocketFactory.h + IDataSocket.h + IListenSocket.h + ISocket.h + ISocketFactory.h + ISocketMultiplexerJob.h + TSocketMultiplexerMethodJob.h + XSocket.h +) + +set(src + CNetworkAddress.cpp + CSocketMultiplexer.cpp + CTCPListenSocket.cpp + CTCPSocket.cpp + CTCPSocketFactory.cpp + IDataSocket.cpp + IListenSocket.cpp + ISocket.cpp + XSocket.cpp +) + +if (WIN32) + list(APPEND src ${inc}) +endif() + +set(inc + ../arch + ../base + ../common + ../io + ../mt + ../synergy +) + +include_directories(${inc}) +add_library(libnet STATIC ${src}) diff --git a/lib/net/CNetworkAddress.cpp b/src/lib/net/CNetworkAddress.cpp similarity index 100% rename from lib/net/CNetworkAddress.cpp rename to src/lib/net/CNetworkAddress.cpp diff --git a/lib/net/CNetworkAddress.h b/src/lib/net/CNetworkAddress.h similarity index 100% rename from lib/net/CNetworkAddress.h rename to src/lib/net/CNetworkAddress.h diff --git a/lib/net/CSocketMultiplexer.cpp b/src/lib/net/CSocketMultiplexer.cpp similarity index 100% rename from lib/net/CSocketMultiplexer.cpp rename to src/lib/net/CSocketMultiplexer.cpp diff --git a/lib/net/CSocketMultiplexer.h b/src/lib/net/CSocketMultiplexer.h similarity index 100% rename from lib/net/CSocketMultiplexer.h rename to src/lib/net/CSocketMultiplexer.h diff --git a/lib/net/CTCPListenSocket.cpp b/src/lib/net/CTCPListenSocket.cpp similarity index 100% rename from lib/net/CTCPListenSocket.cpp rename to src/lib/net/CTCPListenSocket.cpp diff --git a/lib/net/CTCPListenSocket.h b/src/lib/net/CTCPListenSocket.h similarity index 100% rename from lib/net/CTCPListenSocket.h rename to src/lib/net/CTCPListenSocket.h diff --git a/lib/net/CTCPSocket.cpp b/src/lib/net/CTCPSocket.cpp similarity index 100% rename from lib/net/CTCPSocket.cpp rename to src/lib/net/CTCPSocket.cpp diff --git a/lib/net/CTCPSocket.h b/src/lib/net/CTCPSocket.h similarity index 100% rename from lib/net/CTCPSocket.h rename to src/lib/net/CTCPSocket.h diff --git a/lib/net/CTCPSocketFactory.cpp b/src/lib/net/CTCPSocketFactory.cpp similarity index 100% rename from lib/net/CTCPSocketFactory.cpp rename to src/lib/net/CTCPSocketFactory.cpp diff --git a/lib/net/CTCPSocketFactory.h b/src/lib/net/CTCPSocketFactory.h similarity index 100% rename from lib/net/CTCPSocketFactory.h rename to src/lib/net/CTCPSocketFactory.h diff --git a/lib/net/IDataSocket.cpp b/src/lib/net/IDataSocket.cpp similarity index 100% rename from lib/net/IDataSocket.cpp rename to src/lib/net/IDataSocket.cpp diff --git a/lib/net/IDataSocket.h b/src/lib/net/IDataSocket.h similarity index 100% rename from lib/net/IDataSocket.h rename to src/lib/net/IDataSocket.h diff --git a/lib/net/IListenSocket.cpp b/src/lib/net/IListenSocket.cpp similarity index 100% rename from lib/net/IListenSocket.cpp rename to src/lib/net/IListenSocket.cpp diff --git a/lib/net/IListenSocket.h b/src/lib/net/IListenSocket.h similarity index 100% rename from lib/net/IListenSocket.h rename to src/lib/net/IListenSocket.h diff --git a/lib/net/ISocket.cpp b/src/lib/net/ISocket.cpp similarity index 100% rename from lib/net/ISocket.cpp rename to src/lib/net/ISocket.cpp diff --git a/lib/net/ISocket.h b/src/lib/net/ISocket.h similarity index 100% rename from lib/net/ISocket.h rename to src/lib/net/ISocket.h diff --git a/lib/net/ISocketFactory.h b/src/lib/net/ISocketFactory.h similarity index 100% rename from lib/net/ISocketFactory.h rename to src/lib/net/ISocketFactory.h diff --git a/lib/net/ISocketMultiplexerJob.h b/src/lib/net/ISocketMultiplexerJob.h similarity index 100% rename from lib/net/ISocketMultiplexerJob.h rename to src/lib/net/ISocketMultiplexerJob.h diff --git a/lib/net/TSocketMultiplexerMethodJob.h b/src/lib/net/TSocketMultiplexerMethodJob.h similarity index 100% rename from lib/net/TSocketMultiplexerMethodJob.h rename to src/lib/net/TSocketMultiplexerMethodJob.h diff --git a/lib/net/XSocket.cpp b/src/lib/net/XSocket.cpp similarity index 100% rename from lib/net/XSocket.cpp rename to src/lib/net/XSocket.cpp diff --git a/lib/net/XSocket.h b/src/lib/net/XSocket.h similarity index 100% rename from lib/net/XSocket.h rename to src/lib/net/XSocket.h diff --git a/lib/platform/CMSWindowsClipboard.cpp b/src/lib/platform/CMSWindowsClipboard.cpp similarity index 100% rename from lib/platform/CMSWindowsClipboard.cpp rename to src/lib/platform/CMSWindowsClipboard.cpp diff --git a/lib/platform/CMSWindowsClipboard.h b/src/lib/platform/CMSWindowsClipboard.h similarity index 100% rename from lib/platform/CMSWindowsClipboard.h rename to src/lib/platform/CMSWindowsClipboard.h diff --git a/lib/platform/CMSWindowsClipboardAnyTextConverter.cpp b/src/lib/platform/CMSWindowsClipboardAnyTextConverter.cpp similarity index 100% rename from lib/platform/CMSWindowsClipboardAnyTextConverter.cpp rename to src/lib/platform/CMSWindowsClipboardAnyTextConverter.cpp diff --git a/lib/platform/CMSWindowsClipboardAnyTextConverter.h b/src/lib/platform/CMSWindowsClipboardAnyTextConverter.h similarity index 100% rename from lib/platform/CMSWindowsClipboardAnyTextConverter.h rename to src/lib/platform/CMSWindowsClipboardAnyTextConverter.h diff --git a/lib/platform/CMSWindowsClipboardBitmapConverter.cpp b/src/lib/platform/CMSWindowsClipboardBitmapConverter.cpp similarity index 100% rename from lib/platform/CMSWindowsClipboardBitmapConverter.cpp rename to src/lib/platform/CMSWindowsClipboardBitmapConverter.cpp diff --git a/lib/platform/CMSWindowsClipboardBitmapConverter.h b/src/lib/platform/CMSWindowsClipboardBitmapConverter.h similarity index 100% rename from lib/platform/CMSWindowsClipboardBitmapConverter.h rename to src/lib/platform/CMSWindowsClipboardBitmapConverter.h diff --git a/lib/platform/CMSWindowsClipboardHTMLConverter.cpp b/src/lib/platform/CMSWindowsClipboardHTMLConverter.cpp similarity index 100% rename from lib/platform/CMSWindowsClipboardHTMLConverter.cpp rename to src/lib/platform/CMSWindowsClipboardHTMLConverter.cpp diff --git a/lib/platform/CMSWindowsClipboardHTMLConverter.h b/src/lib/platform/CMSWindowsClipboardHTMLConverter.h similarity index 100% rename from lib/platform/CMSWindowsClipboardHTMLConverter.h rename to src/lib/platform/CMSWindowsClipboardHTMLConverter.h diff --git a/lib/platform/CMSWindowsClipboardTextConverter.cpp b/src/lib/platform/CMSWindowsClipboardTextConverter.cpp similarity index 100% rename from lib/platform/CMSWindowsClipboardTextConverter.cpp rename to src/lib/platform/CMSWindowsClipboardTextConverter.cpp diff --git a/lib/platform/CMSWindowsClipboardTextConverter.h b/src/lib/platform/CMSWindowsClipboardTextConverter.h similarity index 100% rename from lib/platform/CMSWindowsClipboardTextConverter.h rename to src/lib/platform/CMSWindowsClipboardTextConverter.h diff --git a/lib/platform/CMSWindowsClipboardUTF16Converter.cpp b/src/lib/platform/CMSWindowsClipboardUTF16Converter.cpp similarity index 100% rename from lib/platform/CMSWindowsClipboardUTF16Converter.cpp rename to src/lib/platform/CMSWindowsClipboardUTF16Converter.cpp diff --git a/lib/platform/CMSWindowsClipboardUTF16Converter.h b/src/lib/platform/CMSWindowsClipboardUTF16Converter.h similarity index 100% rename from lib/platform/CMSWindowsClipboardUTF16Converter.h rename to src/lib/platform/CMSWindowsClipboardUTF16Converter.h diff --git a/lib/platform/CMSWindowsDesks.cpp b/src/lib/platform/CMSWindowsDesks.cpp similarity index 100% rename from lib/platform/CMSWindowsDesks.cpp rename to src/lib/platform/CMSWindowsDesks.cpp diff --git a/lib/platform/CMSWindowsDesks.h b/src/lib/platform/CMSWindowsDesks.h similarity index 100% rename from lib/platform/CMSWindowsDesks.h rename to src/lib/platform/CMSWindowsDesks.h diff --git a/lib/platform/CMSWindowsEventQueueBuffer.cpp b/src/lib/platform/CMSWindowsEventQueueBuffer.cpp similarity index 100% rename from lib/platform/CMSWindowsEventQueueBuffer.cpp rename to src/lib/platform/CMSWindowsEventQueueBuffer.cpp diff --git a/lib/platform/CMSWindowsEventQueueBuffer.h b/src/lib/platform/CMSWindowsEventQueueBuffer.h similarity index 100% rename from lib/platform/CMSWindowsEventQueueBuffer.h rename to src/lib/platform/CMSWindowsEventQueueBuffer.h diff --git a/lib/platform/CMSWindowsKeyState.cpp b/src/lib/platform/CMSWindowsKeyState.cpp similarity index 100% rename from lib/platform/CMSWindowsKeyState.cpp rename to src/lib/platform/CMSWindowsKeyState.cpp diff --git a/lib/platform/CMSWindowsKeyState.h b/src/lib/platform/CMSWindowsKeyState.h similarity index 100% rename from lib/platform/CMSWindowsKeyState.h rename to src/lib/platform/CMSWindowsKeyState.h diff --git a/lib/platform/CMSWindowsRelauncher.cpp b/src/lib/platform/CMSWindowsRelauncher.cpp similarity index 100% rename from lib/platform/CMSWindowsRelauncher.cpp rename to src/lib/platform/CMSWindowsRelauncher.cpp diff --git a/lib/platform/CMSWindowsRelauncher.h b/src/lib/platform/CMSWindowsRelauncher.h similarity index 100% rename from lib/platform/CMSWindowsRelauncher.h rename to src/lib/platform/CMSWindowsRelauncher.h diff --git a/lib/platform/CMSWindowsScreen.cpp b/src/lib/platform/CMSWindowsScreen.cpp similarity index 100% rename from lib/platform/CMSWindowsScreen.cpp rename to src/lib/platform/CMSWindowsScreen.cpp diff --git a/lib/platform/CMSWindowsScreen.h b/src/lib/platform/CMSWindowsScreen.h similarity index 100% rename from lib/platform/CMSWindowsScreen.h rename to src/lib/platform/CMSWindowsScreen.h diff --git a/lib/platform/CMSWindowsScreenSaver.cpp b/src/lib/platform/CMSWindowsScreenSaver.cpp similarity index 100% rename from lib/platform/CMSWindowsScreenSaver.cpp rename to src/lib/platform/CMSWindowsScreenSaver.cpp diff --git a/lib/platform/CMSWindowsScreenSaver.h b/src/lib/platform/CMSWindowsScreenSaver.h similarity index 100% rename from lib/platform/CMSWindowsScreenSaver.h rename to src/lib/platform/CMSWindowsScreenSaver.h diff --git a/lib/platform/CMSWindowsUtil.cpp b/src/lib/platform/CMSWindowsUtil.cpp similarity index 100% rename from lib/platform/CMSWindowsUtil.cpp rename to src/lib/platform/CMSWindowsUtil.cpp diff --git a/lib/platform/CMSWindowsUtil.h b/src/lib/platform/CMSWindowsUtil.h similarity index 100% rename from lib/platform/CMSWindowsUtil.h rename to src/lib/platform/CMSWindowsUtil.h diff --git a/src/lib/platform/CMakeLists.txt b/src/lib/platform/CMakeLists.txt new file mode 100644 index 00000000..9d71a808 --- /dev/null +++ b/src/lib/platform/CMakeLists.txt @@ -0,0 +1,105 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +if (WIN32) + + set(inc + CMSWindowsClipboard.h + CMSWindowsClipboardAnyTextConverter.h + CMSWindowsClipboardBitmapConverter.h + CMSWindowsClipboardHTMLConverter.h + CMSWindowsClipboardTextConverter.h + CMSWindowsClipboardUTF16Converter.h + CMSWindowsDesks.h + CMSWindowsEventQueueBuffer.h + CMSWindowsKeyState.h + CMSWindowsScreen.h + CMSWindowsScreenSaver.h + CMSWindowsUtil.h + CMSWindowsRelauncher.h + ) + + set(src + ${inc} + CMSWindowsClipboard.cpp + CMSWindowsClipboardAnyTextConverter.cpp + CMSWindowsClipboardBitmapConverter.cpp + CMSWindowsClipboardHTMLConverter.cpp + CMSWindowsClipboardTextConverter.cpp + CMSWindowsClipboardUTF16Converter.cpp + CMSWindowsDesks.cpp + CMSWindowsEventQueueBuffer.cpp + CMSWindowsKeyState.cpp + CMSWindowsScreen.cpp + CMSWindowsScreenSaver.cpp + CMSWindowsUtil.cpp + CMSWindowsRelauncher.cpp + ) + + set(inc_hook + CSynergyHook.h + ) + + set(src_hook + CSynergyHook.cpp + ) + +elseif (APPLE) + + set(src + COSXClipboard.cpp + COSXClipboardAnyTextConverter.cpp + COSXClipboardTextConverter.cpp + COSXClipboardUTF16Converter.cpp + COSXEventQueueBuffer.cpp + COSXKeyState.cpp + COSXScreen.cpp + COSXScreenSaver.cpp + COSXScreenSaverUtil.m + ) + +elseif (UNIX) + + set(src + CXWindowsClipboard.cpp + CXWindowsClipboardAnyBitmapConverter.cpp + CXWindowsClipboardBMPConverter.cpp + CXWindowsClipboardHTMLConverter.cpp + CXWindowsClipboardTextConverter.cpp + CXWindowsClipboardUCS2Converter.cpp + CXWindowsClipboardUTF8Converter.cpp + CXWindowsEventQueueBuffer.cpp + CXWindowsKeyState.cpp + CXWindowsScreen.cpp + CXWindowsScreenSaver.cpp + CXWindowsUtil.cpp + ) + +endif() + +set(inc + ../arch + ../base + ../common + ../mt + ../synergy +) + +include_directories(${inc}) +add_library(libplatform STATIC ${src}) + +if (WIN32) + add_library(synrgyhk SHARED ${inc_hook} ${src_hook}) +endif() diff --git a/lib/platform/COSXClipboard.cpp b/src/lib/platform/COSXClipboard.cpp similarity index 100% rename from lib/platform/COSXClipboard.cpp rename to src/lib/platform/COSXClipboard.cpp diff --git a/lib/platform/COSXClipboard.h b/src/lib/platform/COSXClipboard.h similarity index 100% rename from lib/platform/COSXClipboard.h rename to src/lib/platform/COSXClipboard.h diff --git a/lib/platform/COSXClipboardAnyTextConverter.cpp b/src/lib/platform/COSXClipboardAnyTextConverter.cpp similarity index 100% rename from lib/platform/COSXClipboardAnyTextConverter.cpp rename to src/lib/platform/COSXClipboardAnyTextConverter.cpp diff --git a/lib/platform/COSXClipboardAnyTextConverter.h b/src/lib/platform/COSXClipboardAnyTextConverter.h similarity index 100% rename from lib/platform/COSXClipboardAnyTextConverter.h rename to src/lib/platform/COSXClipboardAnyTextConverter.h diff --git a/lib/platform/COSXClipboardTextConverter.cpp b/src/lib/platform/COSXClipboardTextConverter.cpp similarity index 100% rename from lib/platform/COSXClipboardTextConverter.cpp rename to src/lib/platform/COSXClipboardTextConverter.cpp diff --git a/lib/platform/COSXClipboardTextConverter.h b/src/lib/platform/COSXClipboardTextConverter.h similarity index 100% rename from lib/platform/COSXClipboardTextConverter.h rename to src/lib/platform/COSXClipboardTextConverter.h diff --git a/lib/platform/COSXClipboardUTF16Converter.cpp b/src/lib/platform/COSXClipboardUTF16Converter.cpp similarity index 100% rename from lib/platform/COSXClipboardUTF16Converter.cpp rename to src/lib/platform/COSXClipboardUTF16Converter.cpp diff --git a/lib/platform/COSXClipboardUTF16Converter.h b/src/lib/platform/COSXClipboardUTF16Converter.h similarity index 100% rename from lib/platform/COSXClipboardUTF16Converter.h rename to src/lib/platform/COSXClipboardUTF16Converter.h diff --git a/lib/platform/COSXEventQueueBuffer.cpp b/src/lib/platform/COSXEventQueueBuffer.cpp similarity index 100% rename from lib/platform/COSXEventQueueBuffer.cpp rename to src/lib/platform/COSXEventQueueBuffer.cpp diff --git a/lib/platform/COSXEventQueueBuffer.h b/src/lib/platform/COSXEventQueueBuffer.h similarity index 100% rename from lib/platform/COSXEventQueueBuffer.h rename to src/lib/platform/COSXEventQueueBuffer.h diff --git a/lib/platform/COSXKeyState.cpp b/src/lib/platform/COSXKeyState.cpp similarity index 100% rename from lib/platform/COSXKeyState.cpp rename to src/lib/platform/COSXKeyState.cpp diff --git a/lib/platform/COSXKeyState.h b/src/lib/platform/COSXKeyState.h similarity index 100% rename from lib/platform/COSXKeyState.h rename to src/lib/platform/COSXKeyState.h diff --git a/lib/platform/COSXScreen.cpp b/src/lib/platform/COSXScreen.cpp similarity index 100% rename from lib/platform/COSXScreen.cpp rename to src/lib/platform/COSXScreen.cpp diff --git a/lib/platform/COSXScreen.h b/src/lib/platform/COSXScreen.h similarity index 100% rename from lib/platform/COSXScreen.h rename to src/lib/platform/COSXScreen.h diff --git a/lib/platform/COSXScreenSaver.cpp b/src/lib/platform/COSXScreenSaver.cpp similarity index 100% rename from lib/platform/COSXScreenSaver.cpp rename to src/lib/platform/COSXScreenSaver.cpp diff --git a/lib/platform/COSXScreenSaver.h b/src/lib/platform/COSXScreenSaver.h similarity index 100% rename from lib/platform/COSXScreenSaver.h rename to src/lib/platform/COSXScreenSaver.h diff --git a/lib/platform/COSXScreenSaverUtil.h b/src/lib/platform/COSXScreenSaverUtil.h similarity index 100% rename from lib/platform/COSXScreenSaverUtil.h rename to src/lib/platform/COSXScreenSaverUtil.h diff --git a/lib/platform/COSXScreenSaverUtil.m b/src/lib/platform/COSXScreenSaverUtil.m similarity index 100% rename from lib/platform/COSXScreenSaverUtil.m rename to src/lib/platform/COSXScreenSaverUtil.m diff --git a/lib/platform/CSynergyHook.cpp b/src/lib/platform/CSynergyHook.cpp similarity index 100% rename from lib/platform/CSynergyHook.cpp rename to src/lib/platform/CSynergyHook.cpp diff --git a/lib/platform/CSynergyHook.h b/src/lib/platform/CSynergyHook.h similarity index 100% rename from lib/platform/CSynergyHook.h rename to src/lib/platform/CSynergyHook.h diff --git a/lib/platform/CXWindowsClipboard.cpp b/src/lib/platform/CXWindowsClipboard.cpp similarity index 100% rename from lib/platform/CXWindowsClipboard.cpp rename to src/lib/platform/CXWindowsClipboard.cpp diff --git a/lib/platform/CXWindowsClipboard.h b/src/lib/platform/CXWindowsClipboard.h similarity index 100% rename from lib/platform/CXWindowsClipboard.h rename to src/lib/platform/CXWindowsClipboard.h diff --git a/lib/platform/CXWindowsClipboardAnyBitmapConverter.cpp b/src/lib/platform/CXWindowsClipboardAnyBitmapConverter.cpp similarity index 100% rename from lib/platform/CXWindowsClipboardAnyBitmapConverter.cpp rename to src/lib/platform/CXWindowsClipboardAnyBitmapConverter.cpp diff --git a/lib/platform/CXWindowsClipboardAnyBitmapConverter.h b/src/lib/platform/CXWindowsClipboardAnyBitmapConverter.h similarity index 100% rename from lib/platform/CXWindowsClipboardAnyBitmapConverter.h rename to src/lib/platform/CXWindowsClipboardAnyBitmapConverter.h diff --git a/lib/platform/CXWindowsClipboardBMPConverter.cpp b/src/lib/platform/CXWindowsClipboardBMPConverter.cpp similarity index 100% rename from lib/platform/CXWindowsClipboardBMPConverter.cpp rename to src/lib/platform/CXWindowsClipboardBMPConverter.cpp diff --git a/lib/platform/CXWindowsClipboardBMPConverter.h b/src/lib/platform/CXWindowsClipboardBMPConverter.h similarity index 100% rename from lib/platform/CXWindowsClipboardBMPConverter.h rename to src/lib/platform/CXWindowsClipboardBMPConverter.h diff --git a/lib/platform/CXWindowsClipboardHTMLConverter.cpp b/src/lib/platform/CXWindowsClipboardHTMLConverter.cpp similarity index 100% rename from lib/platform/CXWindowsClipboardHTMLConverter.cpp rename to src/lib/platform/CXWindowsClipboardHTMLConverter.cpp diff --git a/lib/platform/CXWindowsClipboardHTMLConverter.h b/src/lib/platform/CXWindowsClipboardHTMLConverter.h similarity index 100% rename from lib/platform/CXWindowsClipboardHTMLConverter.h rename to src/lib/platform/CXWindowsClipboardHTMLConverter.h diff --git a/lib/platform/CXWindowsClipboardTextConverter.cpp b/src/lib/platform/CXWindowsClipboardTextConverter.cpp similarity index 100% rename from lib/platform/CXWindowsClipboardTextConverter.cpp rename to src/lib/platform/CXWindowsClipboardTextConverter.cpp diff --git a/lib/platform/CXWindowsClipboardTextConverter.h b/src/lib/platform/CXWindowsClipboardTextConverter.h similarity index 100% rename from lib/platform/CXWindowsClipboardTextConverter.h rename to src/lib/platform/CXWindowsClipboardTextConverter.h diff --git a/lib/platform/CXWindowsClipboardUCS2Converter.cpp b/src/lib/platform/CXWindowsClipboardUCS2Converter.cpp similarity index 100% rename from lib/platform/CXWindowsClipboardUCS2Converter.cpp rename to src/lib/platform/CXWindowsClipboardUCS2Converter.cpp diff --git a/lib/platform/CXWindowsClipboardUCS2Converter.h b/src/lib/platform/CXWindowsClipboardUCS2Converter.h similarity index 100% rename from lib/platform/CXWindowsClipboardUCS2Converter.h rename to src/lib/platform/CXWindowsClipboardUCS2Converter.h diff --git a/lib/platform/CXWindowsClipboardUTF8Converter.cpp b/src/lib/platform/CXWindowsClipboardUTF8Converter.cpp similarity index 100% rename from lib/platform/CXWindowsClipboardUTF8Converter.cpp rename to src/lib/platform/CXWindowsClipboardUTF8Converter.cpp diff --git a/lib/platform/CXWindowsClipboardUTF8Converter.h b/src/lib/platform/CXWindowsClipboardUTF8Converter.h similarity index 100% rename from lib/platform/CXWindowsClipboardUTF8Converter.h rename to src/lib/platform/CXWindowsClipboardUTF8Converter.h diff --git a/lib/platform/CXWindowsEventQueueBuffer.cpp b/src/lib/platform/CXWindowsEventQueueBuffer.cpp similarity index 100% rename from lib/platform/CXWindowsEventQueueBuffer.cpp rename to src/lib/platform/CXWindowsEventQueueBuffer.cpp diff --git a/lib/platform/CXWindowsEventQueueBuffer.h b/src/lib/platform/CXWindowsEventQueueBuffer.h similarity index 100% rename from lib/platform/CXWindowsEventQueueBuffer.h rename to src/lib/platform/CXWindowsEventQueueBuffer.h diff --git a/lib/platform/CXWindowsKeyState.cpp b/src/lib/platform/CXWindowsKeyState.cpp similarity index 100% rename from lib/platform/CXWindowsKeyState.cpp rename to src/lib/platform/CXWindowsKeyState.cpp diff --git a/lib/platform/CXWindowsKeyState.h b/src/lib/platform/CXWindowsKeyState.h similarity index 100% rename from lib/platform/CXWindowsKeyState.h rename to src/lib/platform/CXWindowsKeyState.h diff --git a/lib/platform/CXWindowsScreen.cpp b/src/lib/platform/CXWindowsScreen.cpp similarity index 100% rename from lib/platform/CXWindowsScreen.cpp rename to src/lib/platform/CXWindowsScreen.cpp diff --git a/lib/platform/CXWindowsScreen.h b/src/lib/platform/CXWindowsScreen.h similarity index 100% rename from lib/platform/CXWindowsScreen.h rename to src/lib/platform/CXWindowsScreen.h diff --git a/lib/platform/CXWindowsScreenSaver.cpp b/src/lib/platform/CXWindowsScreenSaver.cpp similarity index 100% rename from lib/platform/CXWindowsScreenSaver.cpp rename to src/lib/platform/CXWindowsScreenSaver.cpp diff --git a/lib/platform/CXWindowsScreenSaver.h b/src/lib/platform/CXWindowsScreenSaver.h similarity index 100% rename from lib/platform/CXWindowsScreenSaver.h rename to src/lib/platform/CXWindowsScreenSaver.h diff --git a/lib/platform/CXWindowsUtil.cpp b/src/lib/platform/CXWindowsUtil.cpp similarity index 100% rename from lib/platform/CXWindowsUtil.cpp rename to src/lib/platform/CXWindowsUtil.cpp diff --git a/lib/platform/CXWindowsUtil.h b/src/lib/platform/CXWindowsUtil.h similarity index 100% rename from lib/platform/CXWindowsUtil.h rename to src/lib/platform/CXWindowsUtil.h diff --git a/lib/platform/OSXScreenSaverControl.h b/src/lib/platform/OSXScreenSaverControl.h similarity index 100% rename from lib/platform/OSXScreenSaverControl.h rename to src/lib/platform/OSXScreenSaverControl.h diff --git a/lib/server/CBaseClientProxy.cpp b/src/lib/server/CBaseClientProxy.cpp similarity index 100% rename from lib/server/CBaseClientProxy.cpp rename to src/lib/server/CBaseClientProxy.cpp diff --git a/lib/server/CBaseClientProxy.h b/src/lib/server/CBaseClientProxy.h similarity index 100% rename from lib/server/CBaseClientProxy.h rename to src/lib/server/CBaseClientProxy.h diff --git a/lib/server/CClientListener.cpp b/src/lib/server/CClientListener.cpp similarity index 100% rename from lib/server/CClientListener.cpp rename to src/lib/server/CClientListener.cpp diff --git a/lib/server/CClientListener.h b/src/lib/server/CClientListener.h similarity index 100% rename from lib/server/CClientListener.h rename to src/lib/server/CClientListener.h diff --git a/lib/server/CClientProxy.cpp b/src/lib/server/CClientProxy.cpp similarity index 100% rename from lib/server/CClientProxy.cpp rename to src/lib/server/CClientProxy.cpp diff --git a/lib/server/CClientProxy.h b/src/lib/server/CClientProxy.h similarity index 100% rename from lib/server/CClientProxy.h rename to src/lib/server/CClientProxy.h diff --git a/lib/server/CClientProxy1_0.cpp b/src/lib/server/CClientProxy1_0.cpp similarity index 100% rename from lib/server/CClientProxy1_0.cpp rename to src/lib/server/CClientProxy1_0.cpp diff --git a/lib/server/CClientProxy1_0.h b/src/lib/server/CClientProxy1_0.h similarity index 100% rename from lib/server/CClientProxy1_0.h rename to src/lib/server/CClientProxy1_0.h diff --git a/lib/server/CClientProxy1_1.cpp b/src/lib/server/CClientProxy1_1.cpp similarity index 100% rename from lib/server/CClientProxy1_1.cpp rename to src/lib/server/CClientProxy1_1.cpp diff --git a/lib/server/CClientProxy1_1.h b/src/lib/server/CClientProxy1_1.h similarity index 100% rename from lib/server/CClientProxy1_1.h rename to src/lib/server/CClientProxy1_1.h diff --git a/lib/server/CClientProxy1_2.cpp b/src/lib/server/CClientProxy1_2.cpp similarity index 100% rename from lib/server/CClientProxy1_2.cpp rename to src/lib/server/CClientProxy1_2.cpp diff --git a/lib/server/CClientProxy1_2.h b/src/lib/server/CClientProxy1_2.h similarity index 100% rename from lib/server/CClientProxy1_2.h rename to src/lib/server/CClientProxy1_2.h diff --git a/lib/server/CClientProxy1_3.cpp b/src/lib/server/CClientProxy1_3.cpp similarity index 100% rename from lib/server/CClientProxy1_3.cpp rename to src/lib/server/CClientProxy1_3.cpp diff --git a/lib/server/CClientProxy1_3.h b/src/lib/server/CClientProxy1_3.h similarity index 100% rename from lib/server/CClientProxy1_3.h rename to src/lib/server/CClientProxy1_3.h diff --git a/lib/server/CClientProxyUnknown.cpp b/src/lib/server/CClientProxyUnknown.cpp similarity index 100% rename from lib/server/CClientProxyUnknown.cpp rename to src/lib/server/CClientProxyUnknown.cpp diff --git a/lib/server/CClientProxyUnknown.h b/src/lib/server/CClientProxyUnknown.h similarity index 100% rename from lib/server/CClientProxyUnknown.h rename to src/lib/server/CClientProxyUnknown.h diff --git a/lib/server/CConfig.cpp b/src/lib/server/CConfig.cpp similarity index 100% rename from lib/server/CConfig.cpp rename to src/lib/server/CConfig.cpp diff --git a/lib/server/CConfig.h b/src/lib/server/CConfig.h similarity index 100% rename from lib/server/CConfig.h rename to src/lib/server/CConfig.h diff --git a/lib/server/CInputFilter.cpp b/src/lib/server/CInputFilter.cpp similarity index 100% rename from lib/server/CInputFilter.cpp rename to src/lib/server/CInputFilter.cpp diff --git a/lib/server/CInputFilter.h b/src/lib/server/CInputFilter.h similarity index 100% rename from lib/server/CInputFilter.h rename to src/lib/server/CInputFilter.h diff --git a/src/lib/server/CMakeLists.txt b/src/lib/server/CMakeLists.txt new file mode 100644 index 00000000..25777b97 --- /dev/null +++ b/src/lib/server/CMakeLists.txt @@ -0,0 +1,61 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(inc + CBaseClientProxy.h + CClientListener.h + CClientProxy.h + CClientProxy1_0.h + CClientProxy1_1.h + CClientProxy1_2.h + CClientProxy1_3.h + CClientProxyUnknown.h + CConfig.h + CInputFilter.h + CPrimaryClient.h + CServer.h +) + +set(src + CBaseClientProxy.cpp + CClientListener.cpp + CClientProxy.cpp + CClientProxy1_0.cpp + CClientProxy1_1.cpp + CClientProxy1_2.cpp + CClientProxy1_3.cpp + CClientProxyUnknown.cpp + CConfig.cpp + CInputFilter.cpp + CPrimaryClient.cpp + CServer.cpp +) + +if (WIN32) + list(APPEND src ${inc}) +endif() + +set(inc + ../arch + ../base + ../common + ../io + ../mt + ../net + ../synergy +) + +include_directories(${inc}) +add_library(libserver STATIC ${src}) diff --git a/lib/server/CPrimaryClient.cpp b/src/lib/server/CPrimaryClient.cpp similarity index 100% rename from lib/server/CPrimaryClient.cpp rename to src/lib/server/CPrimaryClient.cpp diff --git a/lib/server/CPrimaryClient.h b/src/lib/server/CPrimaryClient.h similarity index 100% rename from lib/server/CPrimaryClient.h rename to src/lib/server/CPrimaryClient.h diff --git a/lib/server/CServer.cpp b/src/lib/server/CServer.cpp similarity index 100% rename from lib/server/CServer.cpp rename to src/lib/server/CServer.cpp diff --git a/lib/server/CServer.h b/src/lib/server/CServer.h similarity index 100% rename from lib/server/CServer.h rename to src/lib/server/CServer.h diff --git a/lib/synergy/CApp.cpp b/src/lib/synergy/CApp.cpp similarity index 100% rename from lib/synergy/CApp.cpp rename to src/lib/synergy/CApp.cpp diff --git a/lib/synergy/CApp.h b/src/lib/synergy/CApp.h similarity index 100% rename from lib/synergy/CApp.h rename to src/lib/synergy/CApp.h diff --git a/lib/synergy/CClientApp.cpp b/src/lib/synergy/CClientApp.cpp similarity index 100% rename from lib/synergy/CClientApp.cpp rename to src/lib/synergy/CClientApp.cpp diff --git a/lib/synergy/CClientApp.h b/src/lib/synergy/CClientApp.h similarity index 100% rename from lib/synergy/CClientApp.h rename to src/lib/synergy/CClientApp.h diff --git a/lib/synergy/CClientTaskBarReceiver.cpp b/src/lib/synergy/CClientTaskBarReceiver.cpp similarity index 100% rename from lib/synergy/CClientTaskBarReceiver.cpp rename to src/lib/synergy/CClientTaskBarReceiver.cpp diff --git a/lib/synergy/CClientTaskBarReceiver.h b/src/lib/synergy/CClientTaskBarReceiver.h similarity index 100% rename from lib/synergy/CClientTaskBarReceiver.h rename to src/lib/synergy/CClientTaskBarReceiver.h diff --git a/lib/synergy/CClipboard.cpp b/src/lib/synergy/CClipboard.cpp similarity index 100% rename from lib/synergy/CClipboard.cpp rename to src/lib/synergy/CClipboard.cpp diff --git a/lib/synergy/CClipboard.h b/src/lib/synergy/CClipboard.h similarity index 100% rename from lib/synergy/CClipboard.h rename to src/lib/synergy/CClipboard.h diff --git a/lib/synergy/CKeyMap.cpp b/src/lib/synergy/CKeyMap.cpp similarity index 100% rename from lib/synergy/CKeyMap.cpp rename to src/lib/synergy/CKeyMap.cpp diff --git a/lib/synergy/CKeyMap.h b/src/lib/synergy/CKeyMap.h similarity index 100% rename from lib/synergy/CKeyMap.h rename to src/lib/synergy/CKeyMap.h diff --git a/lib/synergy/CKeyState.cpp b/src/lib/synergy/CKeyState.cpp similarity index 100% rename from lib/synergy/CKeyState.cpp rename to src/lib/synergy/CKeyState.cpp diff --git a/lib/synergy/CKeyState.h b/src/lib/synergy/CKeyState.h similarity index 100% rename from lib/synergy/CKeyState.h rename to src/lib/synergy/CKeyState.h diff --git a/src/lib/synergy/CMakeLists.txt b/src/lib/synergy/CMakeLists.txt new file mode 100644 index 00000000..e960b672 --- /dev/null +++ b/src/lib/synergy/CMakeLists.txt @@ -0,0 +1,87 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(inc + CClientTaskBarReceiver.h + CServerTaskBarReceiver.h + CApp.h + CClientApp.h + CServerApp.h + CClipboard.h + CKeyMap.h + CKeyState.h + CPacketStreamFilter.h + CPlatformScreen.h + CProtocolUtil.h + CScreen.h + ClipboardTypes.h + IClient.h + IClipboard.h + IKeyState.h + IPlatformScreen.h + IPrimaryScreen.h + IScreen.h + IScreenSaver.h + ISecondaryScreen.h + KeyTypes.h + MouseTypes.h + OptionTypes.h + ProtocolTypes.h + XScreen.h + XSynergy.h +) + +set(src + CClientTaskBarReceiver.cpp + CServerTaskBarReceiver.cpp + CApp.cpp + CClientApp.cpp + CServerApp.cpp + CClipboard.cpp + CKeyMap.cpp + CKeyState.cpp + CPacketStreamFilter.cpp + CPlatformScreen.cpp + CProtocolUtil.cpp + CScreen.cpp + IClipboard.cpp + IKeyState.cpp + IPrimaryScreen.cpp + IScreen.cpp + KeyTypes.cpp + ProtocolTypes.cpp + XScreen.cpp + XSynergy.cpp +) + +if (WIN32) + list(APPEND src ${inc}) +endif() + +set(inc + ../arch + ../base + ../client + ../common + ../io + ../mt + ../net + ../platform + ../server + ../synergy +) + +include_directories(${inc}) +add_library(libsynergy STATIC ${src}) diff --git a/lib/synergy/CPacketStreamFilter.cpp b/src/lib/synergy/CPacketStreamFilter.cpp similarity index 100% rename from lib/synergy/CPacketStreamFilter.cpp rename to src/lib/synergy/CPacketStreamFilter.cpp diff --git a/lib/synergy/CPacketStreamFilter.h b/src/lib/synergy/CPacketStreamFilter.h similarity index 100% rename from lib/synergy/CPacketStreamFilter.h rename to src/lib/synergy/CPacketStreamFilter.h diff --git a/lib/synergy/CPlatformScreen.cpp b/src/lib/synergy/CPlatformScreen.cpp similarity index 100% rename from lib/synergy/CPlatformScreen.cpp rename to src/lib/synergy/CPlatformScreen.cpp diff --git a/lib/synergy/CPlatformScreen.h b/src/lib/synergy/CPlatformScreen.h similarity index 100% rename from lib/synergy/CPlatformScreen.h rename to src/lib/synergy/CPlatformScreen.h diff --git a/lib/synergy/CProtocolUtil.cpp b/src/lib/synergy/CProtocolUtil.cpp similarity index 100% rename from lib/synergy/CProtocolUtil.cpp rename to src/lib/synergy/CProtocolUtil.cpp diff --git a/lib/synergy/CProtocolUtil.h b/src/lib/synergy/CProtocolUtil.h similarity index 100% rename from lib/synergy/CProtocolUtil.h rename to src/lib/synergy/CProtocolUtil.h diff --git a/lib/synergy/CScreen.cpp b/src/lib/synergy/CScreen.cpp similarity index 100% rename from lib/synergy/CScreen.cpp rename to src/lib/synergy/CScreen.cpp diff --git a/lib/synergy/CScreen.h b/src/lib/synergy/CScreen.h similarity index 100% rename from lib/synergy/CScreen.h rename to src/lib/synergy/CScreen.h diff --git a/lib/synergy/CServerApp.cpp b/src/lib/synergy/CServerApp.cpp similarity index 100% rename from lib/synergy/CServerApp.cpp rename to src/lib/synergy/CServerApp.cpp diff --git a/lib/synergy/CServerApp.h b/src/lib/synergy/CServerApp.h similarity index 100% rename from lib/synergy/CServerApp.h rename to src/lib/synergy/CServerApp.h diff --git a/lib/synergy/CServerTaskBarReceiver.cpp b/src/lib/synergy/CServerTaskBarReceiver.cpp similarity index 100% rename from lib/synergy/CServerTaskBarReceiver.cpp rename to src/lib/synergy/CServerTaskBarReceiver.cpp diff --git a/lib/synergy/CServerTaskBarReceiver.h b/src/lib/synergy/CServerTaskBarReceiver.h similarity index 100% rename from lib/synergy/CServerTaskBarReceiver.h rename to src/lib/synergy/CServerTaskBarReceiver.h diff --git a/lib/synergy/ClipboardTypes.h b/src/lib/synergy/ClipboardTypes.h similarity index 100% rename from lib/synergy/ClipboardTypes.h rename to src/lib/synergy/ClipboardTypes.h diff --git a/lib/synergy/IClient.h b/src/lib/synergy/IClient.h similarity index 100% rename from lib/synergy/IClient.h rename to src/lib/synergy/IClient.h diff --git a/lib/synergy/IClipboard.cpp b/src/lib/synergy/IClipboard.cpp similarity index 100% rename from lib/synergy/IClipboard.cpp rename to src/lib/synergy/IClipboard.cpp diff --git a/lib/synergy/IClipboard.h b/src/lib/synergy/IClipboard.h similarity index 100% rename from lib/synergy/IClipboard.h rename to src/lib/synergy/IClipboard.h diff --git a/lib/synergy/IKeyState.cpp b/src/lib/synergy/IKeyState.cpp similarity index 100% rename from lib/synergy/IKeyState.cpp rename to src/lib/synergy/IKeyState.cpp diff --git a/lib/synergy/IKeyState.h b/src/lib/synergy/IKeyState.h similarity index 100% rename from lib/synergy/IKeyState.h rename to src/lib/synergy/IKeyState.h diff --git a/lib/synergy/INode.h b/src/lib/synergy/INode.h similarity index 100% rename from lib/synergy/INode.h rename to src/lib/synergy/INode.h diff --git a/lib/synergy/IPlatformScreen.h b/src/lib/synergy/IPlatformScreen.h similarity index 100% rename from lib/synergy/IPlatformScreen.h rename to src/lib/synergy/IPlatformScreen.h diff --git a/lib/synergy/IPrimaryScreen.cpp b/src/lib/synergy/IPrimaryScreen.cpp similarity index 100% rename from lib/synergy/IPrimaryScreen.cpp rename to src/lib/synergy/IPrimaryScreen.cpp diff --git a/lib/synergy/IPrimaryScreen.h b/src/lib/synergy/IPrimaryScreen.h similarity index 100% rename from lib/synergy/IPrimaryScreen.h rename to src/lib/synergy/IPrimaryScreen.h diff --git a/lib/synergy/IScreen.cpp b/src/lib/synergy/IScreen.cpp similarity index 100% rename from lib/synergy/IScreen.cpp rename to src/lib/synergy/IScreen.cpp diff --git a/lib/synergy/IScreen.h b/src/lib/synergy/IScreen.h similarity index 100% rename from lib/synergy/IScreen.h rename to src/lib/synergy/IScreen.h diff --git a/lib/synergy/IScreenSaver.h b/src/lib/synergy/IScreenSaver.h similarity index 100% rename from lib/synergy/IScreenSaver.h rename to src/lib/synergy/IScreenSaver.h diff --git a/lib/synergy/ISecondaryScreen.h b/src/lib/synergy/ISecondaryScreen.h similarity index 100% rename from lib/synergy/ISecondaryScreen.h rename to src/lib/synergy/ISecondaryScreen.h diff --git a/lib/synergy/KeyTypes.cpp b/src/lib/synergy/KeyTypes.cpp similarity index 100% rename from lib/synergy/KeyTypes.cpp rename to src/lib/synergy/KeyTypes.cpp diff --git a/lib/synergy/KeyTypes.h b/src/lib/synergy/KeyTypes.h similarity index 100% rename from lib/synergy/KeyTypes.h rename to src/lib/synergy/KeyTypes.h diff --git a/lib/synergy/MouseTypes.h b/src/lib/synergy/MouseTypes.h similarity index 100% rename from lib/synergy/MouseTypes.h rename to src/lib/synergy/MouseTypes.h diff --git a/lib/synergy/OptionTypes.h b/src/lib/synergy/OptionTypes.h similarity index 100% rename from lib/synergy/OptionTypes.h rename to src/lib/synergy/OptionTypes.h diff --git a/lib/synergy/ProtocolTypes.cpp b/src/lib/synergy/ProtocolTypes.cpp similarity index 100% rename from lib/synergy/ProtocolTypes.cpp rename to src/lib/synergy/ProtocolTypes.cpp diff --git a/lib/synergy/ProtocolTypes.h b/src/lib/synergy/ProtocolTypes.h similarity index 100% rename from lib/synergy/ProtocolTypes.h rename to src/lib/synergy/ProtocolTypes.h diff --git a/lib/synergy/XScreen.cpp b/src/lib/synergy/XScreen.cpp similarity index 100% rename from lib/synergy/XScreen.cpp rename to src/lib/synergy/XScreen.cpp diff --git a/lib/synergy/XScreen.h b/src/lib/synergy/XScreen.h similarity index 100% rename from lib/synergy/XScreen.h rename to src/lib/synergy/XScreen.h diff --git a/lib/synergy/XSynergy.cpp b/src/lib/synergy/XSynergy.cpp similarity index 100% rename from lib/synergy/XSynergy.cpp rename to src/lib/synergy/XSynergy.cpp diff --git a/lib/synergy/XSynergy.h b/src/lib/synergy/XSynergy.h similarity index 100% rename from lib/synergy/XSynergy.h rename to src/lib/synergy/XSynergy.h diff --git a/src/unittests/CMakeLists.txt b/src/unittests/CMakeLists.txt new file mode 100644 index 00000000..28bf4200 --- /dev/null +++ b/src/unittests/CMakeLists.txt @@ -0,0 +1,38 @@ +# synergy -- mouse and keyboard sharing utility +# Copyright (C) 2009 Chris Schoeneman, Nick Bolton, Sorin Sbarnea +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set(src + ../../tools/gtest/src/gtest_main.cc + synergy/CClipboardTests.cpp +) + +set(inc + ../lib/arch + ../lib/base + ../lib/client + ../lib/common + ../lib/io + ../lib/mt + ../lib/net + ../lib/platform + ../lib/synergy + ../../tools/gtest/include +) + +include_directories(${inc}) +add_executable(unittests ${src}) +target_link_libraries(unittests + libarch libbase libclient libcommon libio libmt libnet libplatform + libserver libsynergy gtest ${libs}) diff --git a/src/unittest/synergy/CClipboardTests.cpp b/src/unittests/synergy/CClipboardTests.cpp similarity index 100% rename from src/unittest/synergy/CClipboardTests.cpp rename to src/unittests/synergy/CClipboardTests.cpp