@@ -39,12 +39,18 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\
39
39
L_ASM , L_DIFF , L_PROPS , L_PS , L_RUBY , L_SMALLTALK , L_VHDL , L_KIX , L_AU3 ,\
40
40
L_CAML , L_ADA , L_VERILOG , L_MATLAB , L_HASKELL , L_INNO , L_SEARCHRESULT ,\
41
41
L_CMAKE , L_YAML , L_COBOL , L_GUI4CLI , L_D , L_POWERSHELL , L_R , L_JSP ,\
42
- L_COFFEESCRIPT , L_JSON , L_JAVASCRIPT , L_FORTRAN_77 ,\
42
+ L_COFFEESCRIPT , L_JSON , L_JAVASCRIPT , L_FORTRAN_77 , L_BAANC , L_SREC ,\
43
+ L_IHEX , L_TEHEX , L_SWIFT ,\
44
+ L_ASN1 , L_AVS , L_BLITZBASIC , L_PUREBASIC , L_FREEBASIC , \
45
+ L_CSOUND , L_ERLANG , L_ESCRIPT , L_FORTH , L_LATEX , \
46
+ L_MMIXAL , L_NIMROD , L_NNCRONTAB , L_OSCRIPT , L_REBOL , \
47
+ L_REGISTRY , L_RUST , L_SPICE , L_TXT2TAGS , L_VISUALPROLOG ,\
43
48
// Don't use L_JS, use L_JAVASCRIPT instead
44
49
// The end of enumated language type, so it should be always at the end
45
50
L_EXTERNAL };
46
51
47
52
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 };
53
+ enum Platform { PF_UNKNOWN , PF_X86 , PF_X64 , PF_IA64 };
48
54
49
55
50
56
@@ -174,7 +180,11 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
174
180
//BOOL NPPM_GETENABLETHEMETEXTUREFUNC(0, 0)
175
181
176
182
#define NPPM_GETPLUGINSCONFIGDIR (NPPMSG + 46)
177
- //void NPPM_GETPLUGINSCONFIGDIR(int strLen, TCHAR *str)
183
+ //INT NPPM_GETPLUGINSCONFIGDIR(int strLen, TCHAR *str)
184
+ // Get user's plugin config directory path. It's useful if plugins want to save/load parameters for the current user
185
+ // Returns the number of TCHAR copied/to copy.
186
+ // Users should call it with "str" be NULL to get the required number of TCHAR (not including the terminating nul character),
187
+ // allocate "str" buffer with the return value + 1, then call it again to get the path.
178
188
179
189
#define NPPM_MSGTOPLUGIN (NPPMSG + 47)
180
190
//BOOL NPPM_MSGTOPLUGIN(TCHAR *destModuleName, CommunicationInfo *info)
@@ -213,7 +223,7 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
213
223
// returned value : TRUE if tab bar is hidden, otherwise FALSE
214
224
215
225
#define NPPM_GETPOSFROMBUFFERID (NPPMSG + 57)
216
- // INT NPPM_GETPOSFROMBUFFERID(INT bufferID, INT priorityView)
226
+ // INT NPPM_GETPOSFROMBUFFERID(UINT_PTR bufferID, INT priorityView)
217
227
// Return VIEW|INDEX from a buffer ID. -1 if the bufferID non existing
218
228
// if priorityView set to SUB_VIEW, then SUB_VIEW will be search firstly
219
229
//
@@ -223,11 +233,11 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
223
233
// SUB_VIEW 1
224
234
225
235
#define NPPM_GETFULLPATHFROMBUFFERID (NPPMSG + 58)
226
- // INT NPPM_GETFULLPATHFROMBUFFERID(INT bufferID, TCHAR *fullFilePath)
236
+ // INT NPPM_GETFULLPATHFROMBUFFERID(UINT_PTR bufferID, TCHAR *fullFilePath)
227
237
// Get full path file name from a bufferID.
228
238
// Return -1 if the bufferID non existing, otherwise the number of TCHAR copied/to copy
229
239
// User should call it with fullFilePath be NULL to get the number of TCHAR (not including the nul character),
230
- // allocate fullFilePath with the return values + 1, then call it again to get full path file name
240
+ // allocate fullFilePath with the return values + 1, then call it again to get full path file name
231
241
232
242
#define NPPM_GETBUFFERIDFROMPOS (NPPMSG + 59)
233
243
// LRESULT NPPM_GETBUFFERIDFROMPOS(INT index, INT iView)
@@ -240,64 +250,53 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
240
250
// Returns active Buffer
241
251
242
252
#define NPPM_RELOADBUFFERID (NPPMSG + 61)
243
- // VOID NPPM_RELOADBUFFERID(0, 0 )
253
+ // VOID NPPM_RELOADBUFFERID(UINT_PTR bufferID, BOOL alert )
244
254
// Reloads Buffer
245
255
// wParam: Buffer to reload
246
256
// lParam: 0 if no alert, else alert
247
257
248
258
249
259
#define NPPM_GETBUFFERLANGTYPE (NPPMSG + 64)
250
- // INT NPPM_GETBUFFERLANGTYPE(INT bufferID, 0)
260
+ // INT NPPM_GETBUFFERLANGTYPE(UINT_PTR bufferID, 0)
251
261
// wParam: BufferID to get LangType from
252
262
// lParam: 0
253
263
// Returns as int, see LangType. -1 on error
254
264
255
265
#define NPPM_SETBUFFERLANGTYPE (NPPMSG + 65)
256
- // BOOL NPPM_SETBUFFERLANGTYPE(INT bufferID, INT langType)
266
+ // BOOL NPPM_SETBUFFERLANGTYPE(UINT_PTR bufferID, INT langType)
257
267
// wParam: BufferID to set LangType of
258
268
// lParam: LangType
259
269
// Returns TRUE on success, FALSE otherwise
260
270
// use int, see LangType for possible values
261
271
// L_USER and L_EXTERNAL are not supported
262
272
263
273
#define NPPM_GETBUFFERENCODING (NPPMSG + 66)
264
- // INT NPPM_GETBUFFERENCODING(INT bufferID, 0)
274
+ // INT NPPM_GETBUFFERENCODING(UINT_PTR bufferID, 0)
265
275
// wParam: BufferID to get encoding from
266
276
// lParam: 0
267
277
// returns as int, see UniMode. -1 on error
268
278
269
279
#define NPPM_SETBUFFERENCODING (NPPMSG + 67)
270
- // BOOL NPPM_SETBUFFERENCODING(INT bufferID, INT encoding)
280
+ // BOOL NPPM_SETBUFFERENCODING(UINT_PTR bufferID, INT encoding)
271
281
// wParam: BufferID to set encoding of
272
282
// lParam: encoding
273
283
// Returns TRUE on success, FALSE otherwise
274
284
// use int, see UniMode
275
285
// Can only be done on new, unedited files
276
286
277
287
#define NPPM_GETBUFFERFORMAT (NPPMSG + 68)
278
- // INT NPPM_GETBUFFERFORMAT(INT bufferID, 0)
279
- // wParam: BufferID to get format from
288
+ // INT NPPM_GETBUFFERFORMAT(UINT_PTR bufferID, 0)
289
+ // wParam: BufferID to get EolType format from
280
290
// lParam: 0
281
- // returns as int, see formatType . -1 on error
291
+ // returns as int, see EolType format . -1 on error
282
292
283
293
#define NPPM_SETBUFFERFORMAT (NPPMSG + 69)
284
- // BOOL NPPM_SETBUFFERFORMAT(INT bufferID, INT format)
285
- // wParam: BufferID to set format of
294
+ // BOOL NPPM_SETBUFFERFORMAT(UINT_PTR bufferID, INT format)
295
+ // wParam: BufferID to set EolType format of
286
296
// lParam: format
287
297
// Returns TRUE on success, FALSE otherwise
288
- // use int, see formatType
289
-
290
- /*
291
- #define NPPM_ADDREBAR (NPPMSG + 57)
292
- // BOOL NPPM_ADDREBAR(0, REBARBANDINFO *)
293
- // Returns assigned ID in wID value of struct pointer
294
- #define NPPM_UPDATEREBAR (NPPMSG + 58)
295
- // BOOL NPPM_ADDREBAR(INT ID, REBARBANDINFO *)
296
- //Use ID assigned with NPPM_ADDREBAR
297
- #define NPPM_REMOVEREBAR (NPPMSG + 59)
298
- // BOOL NPPM_ADDREBAR(INT ID, 0)
299
- //Use ID assigned with NPPM_ADDREBAR
300
- */
298
+ // use int, see EolType format
299
+
301
300
302
301
#define NPPM_HIDETOOLBAR (NPPMSG + 70)
303
302
// BOOL NPPM_HIDETOOLBAR(0, BOOL hideOrNot)
@@ -333,7 +332,7 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
333
332
// BOOL NPPM_GETSHORTCUTBYCMDID(int cmdID, ShortcutKey *sk)
334
333
// get your plugin command current mapped shortcut into sk via cmdID
335
334
// You may need it after getting NPPN_READY notification
336
- // returned value : TRUE if this function call is successful and shorcut is enable, otherwise FALSE
335
+ // returned value : TRUE if this function call is successful and shortcut is enable, otherwise FALSE
337
336
338
337
#define NPPM_DOOPEN (NPPMSG + 77)
339
338
// BOOL NPPM_DOOPEN(0, const TCHAR *fullPathName2Open)
@@ -345,7 +344,7 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
345
344
346
345
#define NPPM_GETCURRENTNATIVELANGENCODING (NPPMSG + 79)
347
346
// INT NPPM_GETCURRENTNATIVELANGENCODING(0, 0)
348
- // returned value : the current native language enconding
347
+ // returned value : the current native language encoding
349
348
350
349
#define NPPM_ALLOCATESUPPORTED (NPPMSG + 80)
351
350
// returns TRUE if NPPM_ALLOCATECMDID is supported
@@ -364,15 +363,15 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
364
363
365
364
#define NPPM_GETLANGUAGENAME (NPPMSG + 83)
366
365
// INT NPPM_GETLANGUAGENAME(int langType, TCHAR *langName)
367
- // Get programing language name from the given language type (LangType)
366
+ // Get programming language name from the given language type (LangType)
368
367
// Return value is the number of copied character / number of character to copy (\0 is not included)
369
368
// You should call this function 2 times - the first time you pass langName as NULL to get the number of characters to copy.
370
369
// You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGENAME function the 2nd time
371
370
// by passing allocated buffer as argument langName
372
371
373
372
#define NPPM_GETLANGUAGEDESC (NPPMSG + 84)
374
373
// INT NPPM_GETLANGUAGEDESC(int langType, TCHAR *langDesc)
375
- // Get programing language short description from the given language type (LangType)
374
+ // Get programming language short description from the given language type (LangType)
376
375
// Return value is the number of copied character / number of character to copy (\0 is not included)
377
376
// You should call this function 2 times - the first time you pass langDesc as NULL to get the number of characters to copy.
378
377
// You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGEDESC function the 2nd time
@@ -389,7 +388,7 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
389
388
390
389
#define NPPM_GETAPPDATAPLUGINSALLOWED (NPPMSG + 87)
391
390
// BOOL NPPM_GETAPPDATAPLUGINSALLOWED(0, 0)
392
- // Check to see if loading plugins from "%APPDATA%\Notepad++\plugins" is allowed.
391
+ // Check to see if loading plugins from "%APPDATA%\..\Local\ Notepad++\plugins" is allowed.
393
392
394
393
#define NPPM_GETCURRENTVIEW (NPPMSG + 88)
395
394
// INT NPPM_GETCURRENTVIEW(0, 0)
@@ -419,6 +418,19 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
419
418
#define NPPM_DISABLEAUTOUPDATE (NPPMSG + 95) // 2119 in decimal
420
419
// VOID NPPM_DISABLEAUTOUPDATE(0, 0)
421
420
421
+ #define NPPM_REMOVESHORTCUTBYCMDID (NPPMSG + 96) // 2120 in decimal
422
+ // BOOL NPPM_REMOVESHORTCUTASSIGNMENT(int cmdID)
423
+ // removes the assigned shortcut mapped to cmdID
424
+ // returned value : TRUE if function call is successful, otherwise FALSE
425
+
426
+ #define NPPM_GETPLUGINHOMEPATH (NPPMSG + 97)
427
+ // INT NPPM_GETPLUGINHOMEPATH(size_t strLen, TCHAR *pluginRootPath)
428
+ // Get plugin home root path. It's useful if plugins want to get its own path
429
+ // by appending <pluginFolderName> which is the name of plugin without extension part.
430
+ // Returns the number of TCHAR copied/to copy.
431
+ // Users should call it with pluginRootPath be NULL to get the required number of TCHAR (not including the terminating nul character),
432
+ // allocate pluginRootPath buffer with the return value + 1, then call it again to get the path.
433
+
422
434
#define RUNCOMMAND_USER (WM_USER + 3000)
423
435
#define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH)
424
436
#define NPPM_GETCURRENTDIRECTORY (RUNCOMMAND_USER + CURRENT_DIRECTORY)
@@ -427,6 +439,7 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
427
439
#define NPPM_GETEXTPART (RUNCOMMAND_USER + EXT_PART)
428
440
#define NPPM_GETCURRENTWORD (RUNCOMMAND_USER + CURRENT_WORD)
429
441
#define NPPM_GETNPPDIRECTORY (RUNCOMMAND_USER + NPP_DIRECTORY)
442
+ #define NPPM_GETFILENAMEATCURSOR (RUNCOMMAND_USER + GETFILENAMEATCURSOR)
430
443
// BOOL NPPM_GETXXXXXXXXXXXXXXXX(size_t strLen, TCHAR *str)
431
444
// where str is the allocated TCHAR array,
432
445
// strLen is the allocated array size
@@ -440,6 +453,8 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
440
453
// INT NPPM_GETCURRENTCOLUMN(0, 0)
441
454
// return the caret current position column
442
455
456
+ #define NPPM_GETNPPFULLFILEPATH (RUNCOMMAND_USER + NPP_FULL_FILE_PATH)
457
+
443
458
#define VAR_NOT_RECOGNIZED 0
444
459
#define FULL_CURRENT_PATH 1
445
460
#define CURRENT_DIRECTORY 2
@@ -450,6 +465,8 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
450
465
#define NPP_DIRECTORY 7
451
466
#define CURRENT_LINE 8
452
467
#define CURRENT_COLUMN 9
468
+ #define NPP_FULL_FILE_PATH 10
469
+ #define GETFILENAMEATCURSOR 11
453
470
454
471
455
472
// Notification code
@@ -541,10 +558,10 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
541
558
//scnNotification->nmhdr.hwndFrom = bufferID;
542
559
//scnNotification->nmhdr.idFrom = docStatus;
543
560
// where bufferID is BufferID
544
- // docStatus can be combined by DOCSTAUS_READONLY and DOCSTAUS_BUFFERDIRTY
561
+ // docStatus can be combined by DOCSTATUS_READONLY and DOCSTATUS_BUFFERDIRTY
545
562
546
- #define DOCSTAUS_READONLY 1
547
- #define DOCSTAUS_BUFFERDIRTY 2
563
+ #define DOCSTATUS_READONLY 1
564
+ #define DOCSTATUS_BUFFERDIRTY 2
548
565
549
566
#define NPPN_DOCORDERCHANGED (NPPN_FIRST + 17) // To notify plugins that document order is changed
550
567
//scnNotification->nmhdr.code = NPPN_DOCORDERCHANGED;
0 commit comments