aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/Scintilla.h28
-rw-r--r--src/Editor.cxx10
-rw-r--r--src/Editor.h2
-rw-r--r--src/WindowAccessor.cxx2
-rw-r--r--win32/ScintillaWin.cxx4
5 files changed, 27 insertions, 19 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 2cbecfb67..312ec6204 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -805,38 +805,44 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
namespace Scintilla {
#endif
-struct CharacterRange {
+struct Sci_CharacterRange {
long cpMin;
long cpMax;
};
-struct TextRange {
- struct CharacterRange chrg;
+struct Sci_TextRange {
+ struct Sci_CharacterRange chrg;
char *lpstrText;
};
-struct TextToFind {
- struct CharacterRange chrg;
+struct Sci_TextToFind {
+ struct Sci_CharacterRange chrg;
char *lpstrText;
- struct CharacterRange chrgText;
+ struct Sci_CharacterRange chrgText;
};
+#define CharacterRange Sci_CharacterRange
+#define TextRange Sci_TextRange
+#define TextToFind Sci_TextToFind
+
#ifdef PLATFORM_H
/* This structure is used in printing and requires some of the graphics types
* from Platform.h. Not needed by most client code. */
-struct RangeToFormat {
+struct Sci_RangeToFormat {
SurfaceID hdc;
SurfaceID hdcTarget;
PRectangle rc;
PRectangle rcPage;
- CharacterRange chrg;
+ Sci_CharacterRange chrg;
};
+#define RangeToFormat Sci_RangeToFormat
+
#endif
-struct NotifyHeader {
+struct Sci_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. */
@@ -845,8 +851,10 @@ struct NotifyHeader {
unsigned int code;
};
+#define NotifyHeader Sci_NotifyHeader
+
struct SCNotification {
- struct NotifyHeader nmhdr;
+ struct Sci_NotifyHeader nmhdr;
int position; /* SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART, SCN_DWELLEND */
int ch; /* SCN_CHARADDED, SCN_KEY */
int modifiers; /* SCN_KEY */
diff --git a/src/Editor.cxx b/src/Editor.cxx
index f987b89f4..d54bbe36c 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3239,7 +3239,7 @@ ColourDesired InvertedLight(ColourDesired orig) {
// This is mostly copied from the Paint method but with some things omitted
// such as the margin markers, line numbers, selection and caret
// Should be merged back into a combined Draw method.
-long Editor::FormatRange(bool draw, RangeToFormat *pfr) {
+long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) {
if (!pfr)
return 0;
@@ -4932,7 +4932,7 @@ long Editor::FindText(
///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX.
sptr_t lParam) { ///< @c TextToFind structure: The text to search for in the given range.
- TextToFind *ft = reinterpret_cast<TextToFind *>(lParam);
+ Sci_TextToFind *ft = reinterpret_cast<Sci_TextToFind *>(lParam);
int lengthFound = istrlen(ft->lpstrText);
int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText,
(wParam & SCFIND_MATCHCASE) != 0,
@@ -6388,7 +6388,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_GETTEXTRANGE: {
if (lParam == 0)
return 0;
- TextRange *tr = reinterpret_cast<TextRange *>(lParam);
+ Sci_TextRange *tr = reinterpret_cast<Sci_TextRange *>(lParam);
int cpMax = tr->chrg.cpMax;
if (cpMax == -1)
cpMax = pdoc->Length();
@@ -6406,7 +6406,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
break;
case SCI_FORMATRANGE:
- return FormatRange(wParam != 0, reinterpret_cast<RangeToFormat *>(lParam));
+ return FormatRange(wParam != 0, reinterpret_cast<Sci_RangeToFormat *>(lParam));
case SCI_GETMARGINLEFT:
return vs.leftMarginWidth;
@@ -6587,7 +6587,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_GETSTYLEDTEXT: {
if (lParam == 0)
return 0;
- TextRange *tr = reinterpret_cast<TextRange *>(lParam);
+ Sci_TextRange *tr = reinterpret_cast<Sci_TextRange *>(lParam);
int iPlace = 0;
for (int iChar = tr->chrg.cpMin; iChar < tr->chrg.cpMax; iChar++) {
tr->lpstrText[iPlace++] = pdoc->CharAt(iChar);
diff --git a/src/Editor.h b/src/Editor.h
index 1c50e7390..b74466416 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -327,7 +327,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
void DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll, int subLine, int xStart, int offset, int posCaret, PRectangle rcCaret);
void RefreshPixMaps(Surface *surfaceWindow);
void Paint(Surface *surfaceWindow, PRectangle rcArea);
- long FormatRange(bool draw, RangeToFormat *pfr);
+ long FormatRange(bool draw, Sci_RangeToFormat *pfr);
int TextWidth(int style, const char *text);
virtual void SetVerticalScrollPos() = 0;
diff --git a/src/WindowAccessor.cxx b/src/WindowAccessor.cxx
index 8093300bc..9de106fb7 100644
--- a/src/WindowAccessor.cxx
+++ b/src/WindowAccessor.cxx
@@ -45,7 +45,7 @@ void WindowAccessor::Fill(int position) {
if (endPos > lenDoc)
endPos = lenDoc;
- TextRange tr = {{startPos, endPos}, buf};
+ Sci_TextRange tr = {{startPos, endPos}, buf};
Platform::SendScintillaPointer(id, SCI_GETTEXTRANGE, 0, &tr);
}
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 6ef6c0160..502dca7dd 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -967,7 +967,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
if (lParam == 0) {
return 0;
}
- CharacterRange *pCR = reinterpret_cast<CharacterRange *>(lParam);
+ Sci_CharacterRange *pCR = reinterpret_cast<Sci_CharacterRange *>(lParam);
pCR->cpMin = SelectionStart();
pCR->cpMax = SelectionEnd();
}
@@ -995,7 +995,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
if (lParam == 0) {
return 0;
}
- CharacterRange *pCR = reinterpret_cast<CharacterRange *>(lParam);
+ Sci_CharacterRange *pCR = reinterpret_cast<Sci_CharacterRange *>(lParam);
selType = selStream;
if (pCR->cpMin == 0 && pCR->cpMax == -1) {
SetSelection(pCR->cpMin, pdoc->Length());