📄 jelauncher.h
字号:
/* * JELauncher.h - part of jEditLauncher package * Copyright (C) 2001, 2002 John Gellene * jgellene@nyc.rr.com * * Notwithstanding the terms of the General Public License, the author grants * permission to compile and link object code generated by the compilation of * this program with object code and libraries that are not subject to the * GNU General Public License, provided that the executable output of such * compilation shall be distributed with source code on substantially the * same basis as the jEditLauncher package of which this program is a part. * By way of example, a distribution would satisfy this condition if it * included a working makefile for any freely available make utility that * runs on the Windows family of operating systems. This condition does not * require a licensee of this software to distribute any proprietary software * (including header files and libraries) that is licensed under terms * prohibiting redistribution to third parties. * * This program 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id: JELauncher.h,v 1.8 2002/03/24 16:56:42 jgellene Exp $ */#ifndef __JEDITLAUNCHER_H_#define __JEDITLAUNCHER_H_#include "jeditlauncher.h"#include "ServConn.h"#include "ScriptServer.h"class FileListImpl;class RegistryParser;/////////////////////////////////////////////////////////////////////////////// CJEditLauncherclass ATL_NO_VTABLE CJEditLauncher : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CJEditLauncher, &CLSID_JEditLauncher40>, public ISupportErrorInfo, public IDispatchImpl<IJEditLauncher, &IID_IJEditLauncher, &LIBID_JEDITLAUNCHERLib, 4, 0>{public: DECLARE_CLASSFACTORY_SINGLETON(CJEditLauncher) CJEditLauncher(); ~CJEditLauncher();DECLARE_REGISTRY_RESOURCEID(IDR_JEDITLAUNCHER40)DECLARE_PROTECT_FINAL_CONSTRUCT()BEGIN_COM_MAP(CJEditLauncher) COM_INTERFACE_ENTRY(IJEditLauncher) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(ISupportErrorInfo)END_COM_MAP()// ISupportsErrorInfo STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);// IJEditLauncher interface// Methods for dispatch interfacepublic: virtual HRESULT STDMETHODCALLTYPE get_ServerKey(ULONG * pKey); virtual HRESULT STDMETHODCALLTYPE get_ServerPort(ULONG * pPort); virtual HRESULT STDMETHODCALLTYPE OpenFile(BSTR bstrFileName); virtual HRESULT STDMETHODCALLTYPE OpenFiles(VARIANTARG fileNames); virtual HRESULT STDMETHODCALLTYPE Launch(); virtual HRESULT STDMETHODCALLTYPE RunScript(BSTR bstrFileName); virtual HRESULT STDMETHODCALLTYPE EvalScript(BSTR bstrScript); virtual HRESULT STDMETHODCALLTYPE RunDiff(BSTR bstrFileBase, BSTR bstrFileRevised);// for in-process server, low level functions can be called,// but with change to out-of-prcess server, custom marshalling// is necessary for non-automation data typesprotected: virtual HRESULT STDMETHODCALLTYPE OpenFile_Char(char* szFileName); virtual HRESULT STDMETHODCALLTYPE OpenFile_WChar(wchar_t* wszFileName); virtual HRESULT STDMETHODCALLTYPE OpenFiles_Char(char** argv, int numArgs); virtual HRESULT STDMETHODCALLTYPE OpenFiles_WChar(wchar_t** argv, int numArgs); virtual HRESULT STDMETHODCALLTYPE RunScript_Char(char* pszFileName); virtual HRESULT STDMETHODCALLTYPE RunScript_WChar(wchar_t* pwszFileName); virtual HRESULT STDMETHODCALLTYPE EvalScript_Char(char* pszScript); virtual HRESULT STDMETHODCALLTYPE EvalScript_WChar(wchar_t* pwszScript); virtual HRESULT STDMETHODCALLTYPE RunDiff_Char(char* pszFileBase, char* pszFileChanged); virtual HRESULT STDMETHODCALLTYPE RunDiff_WChar(wchar_t* pwszFileBase, wchar_t* pwszFileChanged); virtual HRESULT STDMETHODCALLTYPE RunDiff_Var(VARIANTARG varFileNames); // public helper functionspublic: static void MakeErrorInfo(UINT nErrorStringID); static void MakeErrorInfo(CHAR* pszErrorMsg); void OnTimer(UINT nIDTimer); BOOL IsTimer() { if(m_nIDTimer == 0) return FALSE; ++m_nDelayedRelease; return TRUE; } // implementationprotected: HRESULT STDMETHODCALLTYPE RunTarget(BOOL bSendScript); HRESULT Launch_jEdit(char* szCmdLine);private: BOOL m_bRunDiff; FileListImpl *m_pFileList; CScriptServer *m_pScriptServer; RegistryParser *m_pRegParser; HANDLE m_hJEditProcess; BOOL m_bSendScriptOnLaunch; UINT m_nIDTimer; UINT m_nCounter; UINT m_nDelayedRelease;};void CALLBACK LaunchTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);#endif //__JEDITLAUNCHER_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -