Unit DLLExports
Description
Pascal wrappers around the core Notepad++ plugin APIs
- Note
- Since Notepad++ 8.4, plugins can provide external lexers by implementing the Lexilla protocol. At minimum, a lexer plugin must export a Pascal wrapper for each of the following:
ILexer5 *CreateLexer(const char *name)void GetLexerName(unsigned int index, char *name, int buflength)int GetLexerCount()
There is a working example here.
Overview
Functions and Procedures
function isUnicode: BOOL; cdecl; |
function getName: NppPChar; cdecl; |
function getFuncsArray(var nFuncs: integer): Pointer; cdecl; |
function messageProc(Msg: integer; _wParam: WPARAM; _lParam: LPARAM): LRESULT; cdecl; |
procedure setInfo(NppData: TNppData); cdecl; |
procedure beNotified(Msg: PSciNotification); cdecl; |
procedure DLLEntryPoint(dwReason: DWord); |
Description
Functions and Procedures
function isUnicode: BOOL; cdecl; |
|
Always returns |
function getName: NppPChar; cdecl; |
|
Returns this plugin's TNppPlugin.PluginName member as a pointer to a UTF-16 string |
function getFuncsArray(var nFuncs: integer): Pointer; cdecl; |
|
Sets |
function messageProc(Msg: integer; _wParam: WPARAM; _lParam: LPARAM): LRESULT; cdecl; |
|
Handles Win32 window messages, and some editor notifications as well |
procedure setInfo(NppData: TNppData); cdecl; |
|
Handles all setup logic that needs a valid handle to the Notepad++ application window |
procedure beNotified(Msg: PSciNotification); cdecl; |
|
Handles editor events and notifications from Notepad++ |
procedure DLLEntryPoint(dwReason: DWord); |
|
Initializes and (on shutdown) destroys the main instance of this plugin |
This documentation is in the public domain under the Creative Commons Zero v1.0 Universal public license.