notepad-plus-plus/scintilla/include/ScintillaStructures.h
Christian Grasser 5c1813185a Update to scintilla 5.5.6 & Lexilla 5.4.4
Release 5.5.6 (https://www.scintilla.org/scintilla556.zip)

    Released 2 April 2025.
*   Disallow changing case of protected text. Bug #2463.
*   Return enumeration type from MarkerSymbolDefined to match MarkerDefine. Bug #2469.
*   On Win32, use DirectWrite for autocompletion lists when DirectWrite chosen for document text.
*   On Win32, optimize case-insensitive DBCS search to be around 5 times faster by using 64K memory to cache folding data for each DBCS code page used.
*   On Win32, fix a crash with bidirectional text.
*   When using Visual C++ through nmake, fix building for ARM64. Feature #1546.
*   On Qt, draw clipped UTF-8 text correctly. Bug #2464.
*   On Qt, avoid a dwell start when the mouse is moved outside the Scintilla widget. Bug #2466.
*   On Qt, autoCompleteSelection converts from local encoding when not in Unicode mode. Bug #2465.

Release 5.4.4 (https://www.scintilla.org/lexilla544.zip)

    Released 2 April 2025.
*   Fix building for ARM64. Pull request #308.

Close #16373
2025-04-08 18:41:39 +02:00

134 lines
3.5 KiB
C++

// Scintilla source code edit control
/** @file ScintillaStructures.h
** Structures used to communicate with Scintilla.
** The same structures are defined for C in Scintilla.h.
** Uses definitions from ScintillaTypes.h.
**/
// Copyright 2021 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef SCINTILLASTRUCTURES_H
#define SCINTILLASTRUCTURES_H
namespace Scintilla {
using PositionCR = intptr_t;
struct CharacterRange {
PositionCR cpMin;
PositionCR cpMax;
};
struct CharacterRangeFull {
Position cpMin;
Position cpMax;
};
struct TextRange {
CharacterRange chrg;
char *lpstrText;
};
struct TextRangeFull {
CharacterRangeFull chrg;
char *lpstrText;
};
struct TextToFind {
CharacterRange chrg;
const char *lpstrText;
CharacterRange chrgText;
};
struct TextToFindFull {
CharacterRangeFull chrg;
const char *lpstrText;
CharacterRangeFull chrgText;
};
using SurfaceID = void *;
struct Rectangle {
int left;
int top;
int right;
int bottom;
};
/* This structure is used in printing. Not needed by most client code. */
struct RangeToFormat {
SurfaceID hdc;
SurfaceID hdcTarget;
Rectangle rc;
Rectangle rcPage;
CharacterRange chrg;
};
struct RangeToFormatFull {
SurfaceID hdc;
SurfaceID hdcTarget;
Rectangle rc;
Rectangle rcPage;
CharacterRangeFull chrg;
};
struct NotifyHeader {
/* Compatible with Windows NMHDR.
* hwndFrom is really an environment specific window handle or pointer
* but most clients of Scintilla.h do not have this type visible. */
void *hwndFrom;
uptr_t idFrom;
Notification code;
};
enum class Message; // Declare in case ScintillaMessages.h not included
struct NotificationData {
NotifyHeader nmhdr;
Position position;
/* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, */
/* SCN_MARGINRIGHTCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, */
/* SCN_CALLTIPCLICK, */
/* SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, */
/* SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */
/* SCN_USERLISTSELECTION, SCN_AUTOCCOMPLETED, SCN_AUTOCSELECTION, */
/* SCN_AUTOCSELECTIONCHANGE */
int ch;
/* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETED, SCN_AUTOCSELECTION, */
/* SCN_USERLISTSELECTION */
KeyMod modifiers;
/* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, */
/* SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */
/* SCN_MARGINCLICK, SCN_MARGINRIGHTCLICK */
ModificationFlags modificationType; /* SCN_MODIFIED */
const char *text;
/* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_URIDROPPED, */
/* SCN_AUTOCCOMPLETED, SCN_AUTOCSELECTION, SCN_AUTOCSELECTIONCHANGE */
Position length; /* SCN_MODIFIED */
Position linesAdded; /* SCN_MODIFIED */
Message message; /* SCN_MACRORECORD */
uptr_t wParam; /* SCN_MACRORECORD */
sptr_t lParam; /* SCN_MACRORECORD */
Position line; /* SCN_MODIFIED */
FoldLevel foldLevelNow; /* SCN_MODIFIED */
FoldLevel foldLevelPrev; /* SCN_MODIFIED */
int margin; /* SCN_MARGINCLICK, SCN_MARGINRIGHTCLICK */
int listType; /* SCN_USERLISTSELECTION, SCN_AUTOCSELECTIONCHANGE */
int x; /* SCN_DWELLSTART, SCN_DWELLEND */
int y; /* SCN_DWELLSTART, SCN_DWELLEND */
int token; /* SCN_MODIFIED with SC_MOD_CONTAINER */
Position annotationLinesAdded; /* SCN_MODIFIED with SC_MOD_CHANGEANNOTATION */
Update updated; /* SCN_UPDATEUI */
CompletionMethods listCompletionMethod;
/* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */
CharacterSource characterSource; /* SCN_CHARADDED */
};
}
#endif