UniversalIndentGUI 1.2.0
|
00001 //this file is part of notepad++ 00002 //Copyright (C)2003 Don HO ( donho@altern.org ) 00003 // 00004 //This program is free software; you can redistribute it and/or 00005 //modify it under the terms of the GNU General Public License 00006 //as published by the Free Software Foundation; either 00007 //version 2 of the License, or (at your option) any later version. 00008 // 00009 //This program is distributed in the hope that it will be useful, 00010 //but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 //GNU General Public License for more details. 00013 // 00014 //You should have received a copy of the GNU General Public License 00015 //along with this program; if not, write to the Free Software 00016 //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 00018 #ifndef PLUGININTERFACE_H 00019 #define PLUGININTERFACE_H 00020 00021 #include <windows.h> 00022 #include "Scintilla.h" 00023 #include "Notepad_plus_msgs.h" 00024 00025 const int nbChar = 64; 00026 00027 typedef const TCHAR * (__cdecl * PFUNCGETNAME)(); 00028 00029 struct NppData { 00030 HWND _nppHandle; 00031 HWND _scintillaMainHandle; 00032 HWND _scintillaSecondHandle; 00033 }; 00034 00035 typedef void (__cdecl * PFUNCSETINFO)(NppData); 00036 typedef void (__cdecl * PFUNCPLUGINCMD)(); 00037 typedef void (__cdecl * PBENOTIFIED)(SCNotification *); 00038 typedef LRESULT (__cdecl * PMESSAGEPROC)(UINT Message, WPARAM wParam, LPARAM lParam); 00039 00040 00041 struct ShortcutKey { 00042 bool _isCtrl; 00043 bool _isAlt; 00044 bool _isShift; 00045 UCHAR _key; 00046 }; 00047 00048 struct FuncItem { 00049 TCHAR _itemName[nbChar]; 00050 PFUNCPLUGINCMD _pFunc; 00051 int _cmdID; 00052 bool _init2Check; 00053 ShortcutKey *_pShKey; 00054 }; 00055 00056 typedef FuncItem * (__cdecl * PFUNCGETFUNCSARRAY)(int *); 00057 00058 // You should implement (or define an empty function body) those functions which are called by Notepad++ plugin manager 00059 extern "C" __declspec(dllexport) void setInfo(NppData); 00060 extern "C" __declspec(dllexport) const TCHAR * getName(); 00061 extern "C" __declspec(dllexport) FuncItem * getFuncsArray(int *); 00062 extern "C" __declspec(dllexport) void beNotified(SCNotification *); 00063 extern "C" __declspec(dllexport) LRESULT messageProc(UINT Message, WPARAM wParam, LPARAM lParam); 00064 00065 #ifdef UNICODE 00066 extern "C" __declspec(dllexport) BOOL isUnicode(); 00067 #endif //UNICODE 00068 00069 #endif //PLUGININTERFACE_H