Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 1a067ae

Browse files
committed
ScNotificationHeader.idFrom -> ScNotificationHeader.IdFrom
1 parent 45225ca commit 1a067ae

File tree

6 files changed

+31
-23
lines changed

6 files changed

+31
-23
lines changed

Visual Studio Project Template C#/Main.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Main
2222

2323
public static void OnNotification(ScNotification notification)
2424
{
25+
// This method is invoked whenever something is happening in notepad++
2526
}
2627

2728
internal static void CommandMenuInit()

Visual Studio Project Template C#/PluginInfrastructure/IScintillaGateway.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2302,7 +2302,7 @@ public interface IScintillaGateway
23022302
/// <summary>Move the selected lines down one line, shifting the line below before the selection (Scintilla feature 2621)</summary>
23032303
void MoveSelectedLinesDown();
23042304

2305-
/// <summary>Set the identifier reported as idFrom in notification messages. (Scintilla feature 2622)</summary>
2305+
/// <summary>Set the identifier reported as IdFrom in notification messages. (Scintilla feature 2622)</summary>
23062306
void SetIdentifier(int identifier);
23072307

23082308
/// <summary>Get the identifier. (Scintilla feature 2623)</summary>

Visual Studio Project Template C#/PluginInfrastructure/Msgs_h.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -420,67 +420,67 @@ public enum NppMsg : uint
420420
NPPN_READY = (NPPN_FIRST + 1), // To notify plugins that all the procedures of launchment of notepad++ are done.
421421
//scnNotification->nmhdr.code = NPPN_READY;
422422
//scnNotification->nmhdr.hwndFrom = hwndNpp;
423-
//scnNotification->nmhdr.idFrom = 0;
423+
//scnNotification->nmhdr.IdFrom = 0;
424424

425425
NPPN_TBMODIFICATION = (NPPN_FIRST + 2), // To notify plugins that toolbar icons can be registered
426426
//scnNotification->nmhdr.code = NPPN_TB_MODIFICATION;
427427
//scnNotification->nmhdr.hwndFrom = hwndNpp;
428-
//scnNotification->nmhdr.idFrom = 0;
428+
//scnNotification->nmhdr.IdFrom = 0;
429429

430430
NPPN_FILEBEFORECLOSE = (NPPN_FIRST + 3), // To notify plugins that the current file is about to be closed
431431
//scnNotification->nmhdr.code = NPPN_FILEBEFORECLOSE;
432432
//scnNotification->nmhdr.hwndFrom = hwndNpp;
433-
//scnNotification->nmhdr.idFrom = BufferID;
433+
//scnNotification->nmhdr.IdFrom = BufferID;
434434

435435
NPPN_FILEOPENED = (NPPN_FIRST + 4), // To notify plugins that the current file is just opened
436436
//scnNotification->nmhdr.code = NPPN_FILEOPENED;
437437
//scnNotification->nmhdr.hwndFrom = hwndNpp;
438-
//scnNotification->nmhdr.idFrom = BufferID;
438+
//scnNotification->nmhdr.IdFrom = BufferID;
439439

440440
NPPN_FILECLOSED = (NPPN_FIRST + 5), // To notify plugins that the current file is just closed
441441
//scnNotification->nmhdr.code = NPPN_FILECLOSED;
442442
//scnNotification->nmhdr.hwndFrom = hwndNpp;
443-
//scnNotification->nmhdr.idFrom = BufferID;
443+
//scnNotification->nmhdr.IdFrom = BufferID;
444444

445445
NPPN_FILEBEFOREOPEN = (NPPN_FIRST + 6), // To notify plugins that the current file is about to be opened
446446
//scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN;
447447
//scnNotification->nmhdr.hwndFrom = hwndNpp;
448-
//scnNotification->nmhdr.idFrom = BufferID;
448+
//scnNotification->nmhdr.IdFrom = BufferID;
449449

450450
NPPN_FILEBEFORESAVE = (NPPN_FIRST + 7), // To notify plugins that the current file is about to be saved
451451
//scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN;
452452
//scnNotification->nmhdr.hwndFrom = hwndNpp;
453-
//scnNotification->nmhdr.idFrom = BufferID;
453+
//scnNotification->nmhdr.IdFrom = BufferID;
454454

455455
NPPN_FILESAVED = (NPPN_FIRST + 8), // To notify plugins that the current file is just saved
456456
//scnNotification->nmhdr.code = NPPN_FILESAVED;
457457
//scnNotification->nmhdr.hwndFrom = hwndNpp;
458-
//scnNotification->nmhdr.idFrom = BufferID;
458+
//scnNotification->nmhdr.IdFrom = BufferID;
459459

460460
NPPN_SHUTDOWN = (NPPN_FIRST + 9), // To notify plugins that Notepad++ is about to be shutdowned.
461461
//scnNotification->nmhdr.code = NPPN_SHUTDOWN;
462462
//scnNotification->nmhdr.hwndFrom = hwndNpp;
463-
//scnNotification->nmhdr.idFrom = 0;
463+
//scnNotification->nmhdr.IdFrom = 0;
464464

465465
NPPN_BUFFERACTIVATED = (NPPN_FIRST + 10), // To notify plugins that a buffer was activated (put to foreground).
466466
//scnNotification->nmhdr.code = NPPN_BUFFERACTIVATED;
467467
//scnNotification->nmhdr.hwndFrom = hwndNpp;
468-
//scnNotification->nmhdr.idFrom = activatedBufferID;
468+
//scnNotification->nmhdr.IdFrom = activatedBufferID;
469469

470470
NPPN_LANGCHANGED = (NPPN_FIRST + 11), // To notify plugins that the language in the current doc is just changed.
471471
//scnNotification->nmhdr.code = NPPN_LANGCHANGED;
472472
//scnNotification->nmhdr.hwndFrom = hwndNpp;
473-
//scnNotification->nmhdr.idFrom = currentBufferID;
473+
//scnNotification->nmhdr.IdFrom = currentBufferID;
474474

475475
NPPN_WORDSTYLESUPDATED = (NPPN_FIRST + 12), // To notify plugins that user initiated a WordStyleDlg change.
476476
//scnNotification->nmhdr.code = NPPN_WORDSTYLESUPDATED;
477477
//scnNotification->nmhdr.hwndFrom = hwndNpp;
478-
//scnNotification->nmhdr.idFrom = currentBufferID;
478+
//scnNotification->nmhdr.IdFrom = currentBufferID;
479479

480480
NPPN_SHORTCUTREMAPPED = (NPPN_FIRST + 13), // To notify plugins that plugin command shortcut is remapped.
481481
//scnNotification->nmhdr.code = NPPN_SHORTCUTSREMAPPED;
482482
//scnNotification->nmhdr.hwndFrom = ShortcutKeyStructurePointer;
483-
//scnNotification->nmhdr.idFrom = cmdID;
483+
//scnNotification->nmhdr.IdFrom = cmdID;
484484
//where ShortcutKeyStructurePointer is pointer of struct ShortcutKey:
485485
//struct ShortcutKey {
486486
// bool _isCtrl;
@@ -492,17 +492,17 @@ public enum NppMsg : uint
492492
NPPN_FILEBEFORELOAD = (NPPN_FIRST + 14), // To notify plugins that the current file is about to be loaded
493493
//scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN;
494494
//scnNotification->nmhdr.hwndFrom = hwndNpp;
495-
//scnNotification->nmhdr.idFrom = NULL;
495+
//scnNotification->nmhdr.IdFrom = NULL;
496496

497497
NPPN_FILELOADFAILED = (NPPN_FIRST + 15), // To notify plugins that file open operation failed
498498
//scnNotification->nmhdr.code = NPPN_FILEOPENFAILED;
499499
//scnNotification->nmhdr.hwndFrom = hwndNpp;
500-
//scnNotification->nmhdr.idFrom = BufferID;
500+
//scnNotification->nmhdr.IdFrom = BufferID;
501501

502502
NPPN_READONLYCHANGED = (NPPN_FIRST + 16), // To notify plugins that current document change the readonly status,
503503
//scnNotification->nmhdr.code = NPPN_READONLYCHANGED;
504504
//scnNotification->nmhdr.hwndFrom = bufferID;
505-
//scnNotification->nmhdr.idFrom = docStatus;
505+
//scnNotification->nmhdr.IdFrom = docStatus;
506506
// where bufferID is BufferID
507507
// docStatus can be combined by DOCSTAUS_READONLY and DOCSTAUS_BUFFERDIRTY
508508

Visual Studio Project Template C#/PluginInfrastructure/NppPluginNETHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ public enum DockMgrMsg : uint
173173
DMN_CLOSE = (DMN_FIRST + 1),
174174
//nmhdr.code = DWORD(DMN_CLOSE, 0));
175175
//nmhdr.hwndFrom = hwndNpp;
176-
//nmhdr.idFrom = ctrlIdNpp;
176+
//nmhdr.IdFrom = ctrlIdNpp;
177177

178178
DMN_DOCK = (DMN_FIRST + 2),
179179
DMN_FLOAT = (DMN_FIRST + 3)
180180
//nmhdr.code = DWORD(DMN_XXX, int newContainer);
181181
//nmhdr.hwndFrom = hwndNpp;
182-
//nmhdr.idFrom = ctrlIdNpp;
182+
//nmhdr.IdFrom = ctrlIdNpp;
183183
}
184184

185185
[StructLayout(LayoutKind.Sequential)]

Visual Studio Project Template C#/PluginInfrastructure/ScintillaGateway.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4598,7 +4598,7 @@ public void MoveSelectedLinesDown()
45984598
IntPtr res = Win32.SendMessage(scintilla, SciMsg.SCI_MOVESELECTEDLINESDOWN, Unused, Unused);
45994599
}
46004600

4601-
/// <summary>Set the identifier reported as idFrom in notification messages. (Scintilla feature 2622)</summary>
4601+
/// <summary>Set the identifier reported as IdFrom in notification messages. (Scintilla feature 2622)</summary>
46024602
public void SetIdentifier(int identifier)
46034603
{
46044604
IntPtr res = Win32.SendMessage(scintilla, SciMsg.SCI_SETIDENTIFIER, identifier, Unused);

Visual Studio Project Template C#/PluginInfrastructure/Scintilla_iface.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@ namespace Kbg.NppPluginNET.PluginInfrastructure
1818
[StructLayout(LayoutKind.Sequential)]
1919
public struct ScNotificationHeader
2020
{
21-
public IntPtr hwndFrom; //! environment specific window handle/pointer
22-
public uint idFrom; //! CtrlID of the window issuing the notification
2321
public uint code; //! The SCN_* notification code
22+
/// <summary>
23+
/// environment specific window handle/pointer
24+
/// </summary>
25+
public IntPtr hwndFrom;
26+
27+
/// <summary>
28+
/// CtrlID of the window issuing the notification
29+
/// </summary>
30+
public uint IdFrom;
2431
}
2532

2633
[StructLayout(LayoutKind.Sequential)]
@@ -2537,7 +2544,7 @@ public enum SciMsg : uint
25372544
/// Move the selected lines down one line, shifting the line below before the selection
25382545
SCI_MOVESELECTEDLINESDOWN = 2621,
25392546

2540-
/// Set the identifier reported as idFrom in notification messages.
2547+
/// Set the identifier reported as IdFrom in notification messages.
25412548
SCI_SETIDENTIFIER = 2622,
25422549

25432550
/// Get the identifier.

0 commit comments

Comments
 (0)