@@ -36,8 +36,10 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\
3636 // Don't use L_JS, use L_JAVASCRIPT instead
3737 // The end of enumated language type, so it should be always at the end
3838 L_EXTERNAL };
39+ enum class ExternalLexerAutoIndentMode { Standard , C_Like , Custom };
40+ enum class MacroStatus { Idle , RecordInProgress , RecordingStopped , PlayingBack };
3941
40- 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 };
42+ 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 };
4143enum Platform { PF_UNKNOWN , PF_X86 , PF_X64 , PF_IA64 , PF_ARM64 };
4244
4345
@@ -454,6 +456,63 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
454456 HICON hToolbarIconDarkMode ;
455457 };
456458
459+ #define NPPM_GETEXTERNALLEXERAUTOINDENTMODE (NPPMSG + 103)
460+ // BOOL NPPM_GETEXTERNALLEXERAUTOINDENTMODE(const TCHAR *languageName, ExternalLexerAutoIndentMode &autoIndentMode)
461+ // Get ExternalLexerAutoIndentMode for an installed external programming language.
462+ // - Standard means Notepad++ will keep the same TAB indentation between lines;
463+ // - C_Like means Notepad++ will perform a C-Language style indentation for the selected external language;
464+ // - Custom means a Plugin will be controlling auto-indentation for the current language.
465+ // returned values: TRUE for successful searches, otherwise FALSE.
466+
467+ #define NPPM_SETEXTERNALLEXERAUTOINDENTMODE (NPPMSG + 104)
468+ // BOOL NPPM_SETEXTERNALLEXERAUTOINDENTMODE(const TCHAR *languageName, ExternalLexerAutoIndentMode autoIndentMode)
469+ // Set ExternalLexerAutoIndentMode for an installed external programming language.
470+ // - Standard means Notepad++ will keep the same TAB indentation between lines;
471+ // - C_Like means Notepad++ will perform a C-Language style indentation for the selected external language;
472+ // - Custom means a Plugin will be controlling auto-indentation for the current language.
473+ // returned value: TRUE if function call was successful, otherwise FALSE.
474+
475+ #define NPPM_ISAUTOINDENTON (NPPMSG + 105)
476+ // BOOL NPPM_ISAUTOINDENTON(0, 0)
477+ // Returns the current Use Auto-Indentation setting in Notepad++ Preferences.
478+
479+ #define NPPM_GETCURRENTMACROSTATUS (NPPMSG + 106)
480+ // MacroStatus NPPM_GETCURRENTMACROSTATUS(0, 0)
481+ // Gets current enum class MacroStatus { Idle - means macro is not in use and it's empty, RecordInProgress, RecordingStopped, PlayingBack }
482+
483+ #define NPPM_ISDARKMODEENABLED (NPPMSG + 107)
484+ // bool NPPM_ISDARKMODEENABLED(0, 0)
485+ // Returns true when Notepad++ Dark Mode is enable, false when it is not.
486+
487+ #define NPPM_GETDARKMODECOLORS (NPPMSG + 108)
488+ // bool NPPM_GETDARKMODECOLORS (size_t cbSize, NppDarkMode::Colors* returnColors)
489+ // - cbSize must be filled with sizeof(NppDarkMode::Colors).
490+ // - returnColors must be a pre-allocated NppDarkMode::Colors struct.
491+ // Returns true when successful, false otherwise.
492+ // You need to uncomment the following code to use NppDarkMode::Colors structure:
493+ //
494+ // namespace NppDarkMode
495+ // {
496+ // struct Colors
497+ // {
498+ // COLORREF background = 0;
499+ // COLORREF softerBackground = 0;
500+ // COLORREF hotBackground = 0;
501+ // COLORREF pureBackground = 0;
502+ // COLORREF errorBackground = 0;
503+ // COLORREF text = 0;
504+ // COLORREF darkerText = 0;
505+ // COLORREF disabledText = 0;
506+ // COLORREF linkText = 0;
507+ // COLORREF edge = 0;
508+ // COLORREF hotEdge = 0;
509+ // };
510+ // }
511+ //
512+ // Note: in the case of calling failure ("false" is returned), you may need to change NppDarkMode::Colors structure to:
513+ // https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/NppDarkMode.h#L32
514+
515+
457516#define VAR_NOT_RECOGNIZED 0
458517#define FULL_CURRENT_PATH 1
459518#define CURRENT_DIRECTORY 2
@@ -466,6 +525,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
466525#define CURRENT_COLUMN 9
467526#define NPP_FULL_FILE_PATH 10
468527#define GETFILENAMEATCURSOR 11
528+ #define CURRENT_LINESTR 12
469529
470530#define RUNCOMMAND_USER (WM_USER + 3000)
471531 #define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH)
@@ -476,6 +536,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
476536 #define NPPM_GETCURRENTWORD (RUNCOMMAND_USER + CURRENT_WORD)
477537 #define NPPM_GETNPPDIRECTORY (RUNCOMMAND_USER + NPP_DIRECTORY)
478538 #define NPPM_GETFILENAMEATCURSOR (RUNCOMMAND_USER + GETFILENAMEATCURSOR)
539+ #define NPPM_GETCURRENTLINESTR (RUNCOMMAND_USER + CURRENT_LINESTR)
479540 // BOOL NPPM_GETXXXXXXXXXXXXXXXX(size_t strLen, TCHAR *str)
480541 // where str is the allocated TCHAR array,
481542 // strLen is the allocated array size
@@ -636,3 +697,9 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
636697 //scnNotification->nmhdr.code = NPPN_FILEDELETED;
637698 //scnNotification->nmhdr.hwndFrom = hwndNpp;
638699 //scnNotification->nmhdr.idFrom = BufferID;
700+
701+ #define NPPN_DARKMODECHANGED (NPPN_FIRST + 27) // To notify plugins that Dark Mode was enabled/disabled
702+ //scnNotification->nmhdr.code = NPPN_DARKMODECHANGED;
703+ //scnNotification->nmhdr.hwndFrom = hwndNpp;
704+ //scnNotification->nmhdr.idFrom = 0;
705+
0 commit comments