| 1 | /*
|
|---|
| 2 | * synergy -- mouse and keyboard sharing utility
|
|---|
| 3 | * Copyright (C) 2002 Chris Schoeneman
|
|---|
| 4 | *
|
|---|
| 5 | * This package is free software; you can redistribute it and/or
|
|---|
| 6 | * modify it under the terms of the GNU General Public License
|
|---|
| 7 | * found in the file COPYING that should have accompanied this file.
|
|---|
| 8 | *
|
|---|
| 9 | * This package is distributed in the hope that it will be useful,
|
|---|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | * GNU General Public License for more details.
|
|---|
| 13 | */
|
|---|
| 14 |
|
|---|
| 15 | #ifndef LAUNCHUTIL_H
|
|---|
| 16 | #define LAUNCHUTIL_H
|
|---|
| 17 |
|
|---|
| 18 | #include "CString.h"
|
|---|
| 19 |
|
|---|
| 20 | #define WINDOWS_LEAN_AND_MEAN
|
|---|
| 21 | #include <windows.h>
|
|---|
| 22 | #include <sys/types.h>
|
|---|
| 23 | #include <sys/stat.h>
|
|---|
| 24 |
|
|---|
| 25 | #define CLIENT_APP "synergyc.exe"
|
|---|
| 26 | #define SERVER_APP "synergys.exe"
|
|---|
| 27 | #define CONFIG_NAME "synergy.sgc"
|
|---|
| 28 |
|
|---|
| 29 | class CConfig;
|
|---|
| 30 |
|
|---|
| 31 | // client must define this and set it before calling any function here
|
|---|
| 32 | extern HINSTANCE s_instance;
|
|---|
| 33 |
|
|---|
| 34 | CString getString(DWORD id);
|
|---|
| 35 | CString getErrorString(DWORD error);
|
|---|
| 36 |
|
|---|
| 37 | void showError(HWND hwnd, const CString& msg);
|
|---|
| 38 | void askOkay(HWND hwnd, const CString& title,
|
|---|
| 39 | const CString& msg);
|
|---|
| 40 | bool askVerify(HWND hwnd, const CString& msg);
|
|---|
| 41 | bool isShowingDialog();
|
|---|
| 42 |
|
|---|
| 43 | void setWindowText(HWND hwnd, const CString& msg);
|
|---|
| 44 | CString getWindowText(HWND hwnd);
|
|---|
| 45 |
|
|---|
| 46 | HWND getItem(HWND hwnd, int id);
|
|---|
| 47 | void enableItem(HWND hwnd, int id, bool enabled);
|
|---|
| 48 |
|
|---|
| 49 | void setItemChecked(HWND, bool);
|
|---|
| 50 | bool isItemChecked(HWND);
|
|---|
| 51 |
|
|---|
| 52 | CString getAppPath(const CString& appName);
|
|---|
| 53 |
|
|---|
| 54 | bool isConfigNewer(time_t&, bool userConfig);
|
|---|
| 55 | bool loadConfig(CConfig& config, time_t&, bool& userConfig);
|
|---|
| 56 | bool saveConfig(const CConfig& config,
|
|---|
| 57 | bool sysOnly, time_t&);
|
|---|
| 58 |
|
|---|
| 59 | const TCHAR* const* getSettingsPath();
|
|---|
| 60 |
|
|---|
| 61 | #endif
|
|---|