77// version 2 of the License, or (at your option) any later version.
88//
99// Note that the GPL places important restrictions on "derived works", yet
10- // it does not provide a detailed definition of that term. To avoid
11- // misunderstandings, we consider an application to constitute a
10+ // it does not provide a detailed definition of that term. To avoid
11+ // misunderstandings, we consider an application to constitute a
1212// "derivative work" for the purpose of this license if it does any of the
13- // following:
13+ // following:
1414// 1. Integrates source code from Notepad++.
1515// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable
1616// installer, such as those produced by InstallShield.
2929#ifndef NOTEPAD_PLUS_MSGS_H
3030#define NOTEPAD_PLUS_MSGS_H
3131
32+ #include <windows.h>
33+ #include <tchar.h>
3234
3335enum LangType {L_TEXT , L_PHP , L_C , L_CPP , L_CS , L_OBJC , L_JAVA , L_RC ,\
3436 L_HTML , L_XML , L_MAKEFILE , L_PASCAL , L_BATCH , L_INI , L_ASCII , L_USER ,\
35- L_ASP , L_SQL , L_VB , L_JS , L_CSS , L_PERL , L_PYTHON , L_LUA ,\
37+ L_ASP , L_SQL , L_VB , L_JS , L_CSS , L_PERL , L_PYTHON , L_LUA , \
3638 L_TEX , L_FORTRAN , L_BASH , L_FLASH , L_NSIS , L_TCL , L_LISP , L_SCHEME ,\
3739 L_ASM , L_DIFF , L_PROPS , L_PS , L_RUBY , L_SMALLTALK , L_VHDL , L_KIX , L_AU3 ,\
3840 L_CAML , L_ADA , L_VERILOG , L_MATLAB , L_HASKELL , L_INNO , L_SEARCHRESULT ,\
3941 L_CMAKE , L_YAML , L_COBOL , L_GUI4CLI , L_D , L_POWERSHELL , L_R , L_JSP ,\
40- L_COFFEESCRIPT ,\
42+ L_COFFEESCRIPT , L_JSON , L_JAVASCRIPT , L_FORTRAN_77 ,\
43+ // Don't use L_JS, use L_JAVASCRIPT instead
4144 // The end of enumated language type, so it should be always at the end
4245 L_EXTERNAL };
43- enum winVer {WV_UNKNOWN , WV_WIN32S , WV_95 , WV_98 , WV_ME , WV_NT , WV_W2K , WV_XP , WV_S2003 , WV_XPX64 , WV_VISTA , WV_WIN7 , WV_WIN8 , WV_WIN81 };
4446
47+ enum winVer { WV_UNKNOWN , WV_WIN32S , WV_95 , WV_98 , WV_ME , WV_NT , WV_W2K , WV_XP , WV_S2003 , WV_XPX64 , WV_VISTA , WV_WIN7 , WV_WIN8 , WV_WIN81 , WV_WIN10 };
4548
4649
47- //Here you can find how to use these messages : http://notepad-plus.sourceforge.net/uk/plugins-HOWTO.php
50+
51+ //Here you can find how to use these messages : http://docs.notepad-plus-plus.org/index.php/Messages_And_Notifications
4852#define NPPMSG (WM_USER + 1000)
4953
5054 #define NPPM_GETCURRENTSCINTILLA (NPPMSG + 4)
@@ -76,7 +80,7 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
7680
7781 #define NPPM_GETOPENFILENAMESPRIMARY (NPPMSG + 17)
7882 #define NPPM_GETOPENFILENAMESSECOND (NPPMSG + 18)
79-
83+
8084 #define NPPM_CREATESCINTILLAHANDLE (NPPMSG + 20)
8185 #define NPPM_DESTROYSCINTILLAHANDLE (NPPMSG + 21)
8286 #define NPPM_GETNBUSERLANG (NPPMSG + 22)
@@ -103,7 +107,7 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
103107 //ascii file to unicode
104108 //int NPPM_ENCODESCI(MAIN_VIEW/SUB_VIEW, 0)
105109 //return new unicodeMode
106-
110+
107111 #define NPPM_DECODESCI (NPPMSG + 27)
108112 //unicode file to ascii
109113 //int NPPM_DECODESCI(MAIN_VIEW/SUB_VIEW, 0)
@@ -162,7 +166,7 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
162166 //HWND WM_DMM_GETPLUGINHWNDBYNAME(const TCHAR *windowName, const TCHAR *moduleName)
163167 // if moduleName is NULL, then return value is NULL
164168 // if windowName is NULL, then the first found window handle which matches with the moduleName will be returned
165-
169+
166170 #define NPPM_MAKECURRENTBUFFERDIRTY (NPPMSG + 44)
167171 //BOOL NPPM_MAKECURRENTBUFFERDIRTY(0, 0)
168172
@@ -187,13 +191,13 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
187191 // uncomment //#include "menuCmdID.h"
188192 // in the beginning of this file then use the command symbols defined in "menuCmdID.h" file
189193 // to access all the Notepad++ menu command items
190-
194+
191195 #define NPPM_TRIGGERTABBARCONTEXTMENU (NPPMSG + 49)
192196 //void NPPM_TRIGGERTABBARCONTEXTMENU(int view, int index2Activate)
193197
194198 #define NPPM_GETNPPVERSION (NPPMSG + 50)
195199 // int NPPM_GETNPPVERSION(0, 0)
196- // return version
200+ // return version
197201 // ex : v4.6
198202 // HIWORD(version) == 4
199203 // LOWORD(version) == 6
@@ -213,26 +217,26 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
213217 // Return VIEW|INDEX from a buffer ID. -1 if the bufferID non existing
214218 // if priorityView set to SUB_VIEW, then SUB_VIEW will be search firstly
215219 //
216- // VIEW takes 2 highest bits and INDEX (0 based) takes the rest (30 bits)
220+ // VIEW takes 2 highest bits and INDEX (0 based) takes the rest (30 bits)
217221 // Here's the values for the view :
218222 // MAIN_VIEW 0
219223 // SUB_VIEW 1
220224
221225 #define NPPM_GETFULLPATHFROMBUFFERID (NPPMSG + 58)
222226 // INT NPPM_GETFULLPATHFROMBUFFERID(INT bufferID, TCHAR *fullFilePath)
223- // Get full path file name from a bufferID.
227+ // Get full path file name from a bufferID.
224228 // Return -1 if the bufferID non existing, otherwise the number of TCHAR copied/to copy
225229 // User should call it with fullFilePath be NULL to get the number of TCHAR (not including the nul character),
226230 // allocate fullFilePath with the return values + 1, then call it again to get full path file name
227231
228232 #define NPPM_GETBUFFERIDFROMPOS (NPPMSG + 59)
229- // INT NPPM_GETBUFFERIDFROMPOS(INT index, INT iView)
233+ // LRESULT NPPM_GETBUFFERIDFROMPOS(INT index, INT iView)
230234 // wParam: Position of document
231235 // lParam: View to use, 0 = Main, 1 = Secondary
232236 // Returns 0 if invalid
233237
234238 #define NPPM_GETCURRENTBUFFERID (NPPMSG + 60)
235- // INT NPPM_GETCURRENTBUFFERID(0, 0)
239+ // LRESULT NPPM_GETCURRENTBUFFERID(0, 0)
236240 // Returns active Buffer
237241
238242 #define NPPM_RELOADBUFFERID (NPPMSG + 61)
@@ -363,15 +367,15 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
363367 // Get programing language name from the given language type (LangType)
364368 // Return value is the number of copied character / number of character to copy (\0 is not included)
365369 // You should call this function 2 times - the first time you pass langName as NULL to get the number of characters to copy.
366- // You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGENAME function the 2nd time
370+ // You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGENAME function the 2nd time
367371 // by passing allocated buffer as argument langName
368372
369373 #define NPPM_GETLANGUAGEDESC (NPPMSG + 84)
370374 // INT NPPM_GETLANGUAGEDESC(int langType, TCHAR *langDesc)
371375 // Get programing language short description from the given language type (LangType)
372376 // Return value is the number of copied character / number of character to copy (\0 is not included)
373377 // You should call this function 2 times - the first time you pass langDesc as NULL to get the number of characters to copy.
374- // You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGEDESC function the 2nd time
378+ // You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGEDESC function the 2nd time
375379 // by passing allocated buffer as argument langDesc
376380
377381 #define NPPM_SHOWDOCSWITCHER (NPPMSG + 85)
@@ -403,6 +407,17 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
403407 // INT NPPM_GETEDITORDEFAULTBACKGROUNDCOLOR(0, 0)
404408 // Return: current editor default background color. You should convert the returned value in COLORREF
405409
410+ #define NPPM_SETSMOOTHFONT (NPPMSG + 92)
411+ // VOID NPPM_SETSMOOTHFONT(0, BOOL setSmoothFontOrNot)
412+
413+ #define NPPM_SETEDITORBORDEREDGE (NPPMSG + 93)
414+ // VOID NPPM_SETEDITORBORDEREDGE(0, BOOL withEditorBorderEdgeOrNot)
415+
416+ #define NPPM_SAVEFILE (NPPMSG + 94)
417+ // VOID NPPM_SAVEFILE(0, const TCHAR *fileNameToSave)
418+
419+ #define NPPM_DISABLEAUTOUPDATE (NPPMSG + 95) // 2119 in decimal
420+ // VOID NPPM_DISABLEAUTOUPDATE(0, 0)
406421
407422#define RUNCOMMAND_USER (WM_USER + 3000)
408423 #define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH)
@@ -468,12 +483,12 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
468483 //scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN;
469484 //scnNotification->nmhdr.hwndFrom = hwndNpp;
470485 //scnNotification->nmhdr.idFrom = BufferID;
471-
486+
472487 #define NPPN_FILEBEFORESAVE (NPPN_FIRST + 7) // To notify plugins that the current file is about to be saved
473488 //scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN;
474489 //scnNotification->nmhdr.hwndFrom = hwndNpp;
475490 //scnNotification->nmhdr.idFrom = BufferID;
476-
491+
477492 #define NPPN_FILESAVED (NPPN_FIRST + 8) // To notify plugins that the current file is just saved
478493 //scnNotification->nmhdr.code = NPPN_FILESAVED;
479494 //scnNotification->nmhdr.hwndFrom = hwndNpp;
@@ -541,4 +556,44 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
541556 //scnNotification->nmhdr.hwndFrom = NULL;
542557 //scnNotification->nmhdr.idFrom = BufferID;
543558
559+ #define NPPN_BEFORESHUTDOWN (NPPN_FIRST + 19) // To notify plugins that Npp shutdown has been triggered, files have not been closed yet
560+ //scnNotification->nmhdr.code = NPPN_BEFORESHUTDOWN;
561+ //scnNotification->nmhdr.hwndFrom = hwndNpp;
562+ //scnNotification->nmhdr.idFrom = 0;
563+
564+ #define NPPN_CANCELSHUTDOWN (NPPN_FIRST + 20) // To notify plugins that Npp shutdown has been cancelled
565+ //scnNotification->nmhdr.code = NPPN_CANCELSHUTDOWN;
566+ //scnNotification->nmhdr.hwndFrom = hwndNpp;
567+ //scnNotification->nmhdr.idFrom = 0;
568+
569+ #define NPPN_FILEBEFORERENAME (NPPN_FIRST + 21) // To notify plugins that file is to be renamed
570+ //scnNotification->nmhdr.code = NPPN_FILEBEFORERENAME;
571+ //scnNotification->nmhdr.hwndFrom = hwndNpp;
572+ //scnNotification->nmhdr.idFrom = BufferID;
573+
574+ #define NPPN_FILERENAMECANCEL (NPPN_FIRST + 22) // To notify plugins that file rename has been cancelled
575+ //scnNotification->nmhdr.code = NPPN_FILERENAMECANCEL;
576+ //scnNotification->nmhdr.hwndFrom = hwndNpp;
577+ //scnNotification->nmhdr.idFrom = BufferID;
578+
579+ #define NPPN_FILERENAMED (NPPN_FIRST + 23) // To notify plugins that file has been renamed
580+ //scnNotification->nmhdr.code = NPPN_FILERENAMED;
581+ //scnNotification->nmhdr.hwndFrom = hwndNpp;
582+ //scnNotification->nmhdr.idFrom = BufferID;
583+
584+ #define NPPN_FILEBEFOREDELETE (NPPN_FIRST + 24) // To notify plugins that file is to be deleted
585+ //scnNotification->nmhdr.code = NPPN_FILEBEFOREDELETE;
586+ //scnNotification->nmhdr.hwndFrom = hwndNpp;
587+ //scnNotification->nmhdr.idFrom = BufferID;
588+
589+ #define NPPN_FILEDELETEFAILED (NPPN_FIRST + 25) // To notify plugins that file deletion has failed
590+ //scnNotification->nmhdr.code = NPPN_FILEDELETEFAILED;
591+ //scnNotification->nmhdr.hwndFrom = hwndNpp;
592+ //scnNotification->nmhdr.idFrom = BufferID;
593+
594+ #define NPPN_FILEDELETED (NPPN_FIRST + 26) // To notify plugins that file has been deleted
595+ //scnNotification->nmhdr.code = NPPN_FILEDELETED;
596+ //scnNotification->nmhdr.hwndFrom = hwndNpp;
597+ //scnNotification->nmhdr.idFrom = BufferID;
598+
544599#endif //NOTEPAD_PLUS_MSGS_H
0 commit comments