2002-09-02 17:30:04 +00:00
|
|
|
/*
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
|
|
|
* Copyright (C) 2002 Chris Schoeneman
|
|
|
|
*
|
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* found in the file COPYING that should have accompanied this file.
|
|
|
|
*
|
|
|
|
* This package is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LAUNCHUTIL_H
|
|
|
|
#define LAUNCHUTIL_H
|
|
|
|
|
|
|
|
#include "CString.h"
|
|
|
|
|
|
|
|
#define WINDOWS_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
2007-06-17 11:19:18 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
2002-09-02 17:30:04 +00:00
|
|
|
|
|
|
|
#define CLIENT_APP "synergyc.exe"
|
|
|
|
#define SERVER_APP "synergys.exe"
|
2007-06-17 11:19:18 +00:00
|
|
|
#define CONFIG_NAME "synergy.sgc"
|
2002-09-02 17:30:04 +00:00
|
|
|
|
|
|
|
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);
|
2007-06-17 11:19:18 +00:00
|
|
|
bool isShowingDialog();
|
2002-09-02 17:30:04 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2003-03-12 22:34:07 +00:00
|
|
|
void setItemChecked(HWND, bool);
|
|
|
|
bool isItemChecked(HWND);
|
|
|
|
|
2002-09-02 17:30:04 +00:00
|
|
|
CString getAppPath(const CString& appName);
|
|
|
|
|
2007-06-17 11:19:18 +00:00
|
|
|
bool isConfigNewer(time_t&, bool userConfig);
|
|
|
|
bool loadConfig(CConfig& config, time_t&, bool& userConfig);
|
|
|
|
bool saveConfig(const CConfig& config,
|
|
|
|
bool sysOnly, time_t&);
|
2002-09-02 17:30:04 +00:00
|
|
|
|
2003-03-17 22:32:10 +00:00
|
|
|
const TCHAR* const* getSettingsPath();
|
|
|
|
|
2002-09-02 17:30:04 +00:00
|
|
|
#endif
|