forked from SublimeCodeIntel/SublimeCodeIntel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwin32_export.patch
More file actions
238 lines (221 loc) · 5.84 KB
/
win32_export.patch
File metadata and controls
238 lines (221 loc) · 5.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
Index: include/Platform.h
===================================================================
--- include/Platform.h (revision 518)
+++ include/Platform.h (working copy)
@@ -21,6 +21,9 @@
#define PLAT_WX 0
#define PLAT_FOX 0
+#define SCIAPI
+#define SCIEXTERN
+
#if defined(FOX)
#undef PLAT_FOX
#define PLAT_FOX 1
@@ -46,8 +49,19 @@
#undef PLAT_WIN
#define PLAT_WIN 1
+#undef SCIAPI
+#undef SCIEXTERN
+
+#ifdef SCIAPI_DLL
+#define SCIAPI __declspec(dllexport)
+#define SCIEXTERN
+#else
+#define SCIAPI __declspec(dllimport)
+#define SCIEXTERN extern
#endif
+#endif
+
#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif
Index: src/Partitioning.h
===================================================================
--- src/Partitioning.h (revision 518)
+++ src/Partitioning.h (working copy)
@@ -43,7 +43,7 @@
/// When needed, positions after the interval are considered part of the last partition
/// but the end of the last partition can be found with PositionFromPartition(last+1).
-class Partitioning {
+class SCIAPI Partitioning {
private:
// To avoid calculating all the partition positions whenever any text is inserted
// there may be a step somewhere in the list.
Index: src/RunStyles.h
===================================================================
--- src/RunStyles.h (revision 518)
+++ src/RunStyles.h (working copy)
@@ -11,7 +11,7 @@
namespace Scintilla {
#endif
-class RunStyles {
+class SCIAPI RunStyles {
private:
Partitioning *starts;
SplitVector<int> *styles;
Index: src/Decoration.h
===================================================================
--- src/Decoration.h (revision 518)
+++ src/Decoration.h (working copy)
@@ -11,7 +11,7 @@
namespace Scintilla {
#endif
-class Decoration {
+class SCIAPI Decoration {
public:
Decoration *next;
RunStyles rs;
@@ -23,7 +23,7 @@
bool Empty();
};
-class DecorationList {
+class SCIAPI DecorationList {
int currentIndicator;
int currentValue;
Decoration *current;
Index: src/PerLine.h
===================================================================
--- src/PerLine.h (revision 518)
+++ src/PerLine.h (working copy)
@@ -23,7 +23,7 @@
/**
* A marker handle set contains any number of MarkerHandleNumbers.
*/
-class MarkerHandleSet {
+class SCIAPI MarkerHandleSet {
MarkerHandleNumber *root;
public:
Index: src/CellBuffer.h
===================================================================
--- src/CellBuffer.h (revision 518)
+++ src/CellBuffer.h (working copy)
@@ -24,7 +24,12 @@
/**
* The line vector contains information about each of the lines in a cell buffer.
*/
-class LineVector {
+#ifdef SCIAPI_DLL
+#include "PerLine.h"
+SCIEXTERN template class SCIAPI SplitVector<MarkerHandleSet *>;
+#endif
+
+class SCIAPI LineVector {
Partitioning starts;
PerLine *perLine;
@@ -70,7 +75,7 @@
/**
* Actions are used to store all the information required to perform one undo/redo step.
*/
-class Action {
+class SCIAPI Action {
public:
actionType at;
int position;
@@ -88,7 +93,7 @@
/**
*
*/
-class UndoHistory {
+class SCIAPI UndoHistory {
Action *actions;
int lenActions;
int maxAction;
@@ -131,7 +136,7 @@
* Based on article "Data Structures in a Bit-Mapped Text Editor"
* by Wilfred J. Hansen, Byte January 1987, page 183.
*/
-class CellBuffer {
+class SCIAPI CellBuffer {
private:
SplitVector<char> substance;
SplitVector<char> style;
Index: src/CharClassify.h
===================================================================
--- src/CharClassify.h (revision 518)
+++ src/CharClassify.h (working copy)
@@ -8,8 +8,10 @@
#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif
-class CharClassify {
+#include "Platform.h"
+
+class SCIAPI CharClassify {
public:
CharClassify();
Index: src/Document.h
===================================================================
--- src/Document.h (revision 518)
+++ src/Document.h (working copy)
@@ -25,7 +25,7 @@
* as is the case for the selection where the end position is the position of the caret.
* If either position is invalidPosition then the range is invalid and most operations will fail.
*/
-class Range {
+class SCIAPI Range {
public:
Position start;
Position end;
@@ -78,11 +78,11 @@
/**
*/
-class Document : PerLine, public IDocument {
+class SCIAPI Document : PerLine, public IDocument {
public:
/** Used to pair watcher pointer with user data. */
- class WatcherWithUserData {
+ class SCIAPI WatcherWithUserData {
public:
DocWatcher *watcher;
void *userData;
@@ -261,7 +261,7 @@
* scope of the change.
* If the DocWatcher is a document view then this can be used to optimise screen updating.
*/
-class DocModification {
+class SCIAPI DocModification {
public:
int modificationType;
int position;
@@ -298,7 +298,7 @@
* A class that wants to receive notifications from a Document must be derived from DocWatcher
* and implement the notification methods. It can then be added to the watcher list with AddWatcher.
*/
-class DocWatcher {
+class SCIAPI DocWatcher {
public:
virtual ~DocWatcher() {}
Index: src/SplitVector.h
===================================================================
--- src/SplitVector.h (revision 518)
+++ src/SplitVector.h (working copy)
@@ -10,7 +10,7 @@
#define SPLITVECTOR_H
template <typename T>
-class SplitVector {
+class SCIAPI SplitVector {
protected:
T *body;
int size;
@@ -240,5 +240,10 @@
return body;
}
};
+#ifdef SCIAPI_DLL
+SCIEXTERN template class SCIAPI SplitVector<int>;
+SCIEXTERN template class SCIAPI SplitVector<char>;
#endif
+
+#endif
Index: win32/scintilla_vc6.mak
===================================================================
--- win32/scintilla_vc6.mak (revision 518)
+++ win32/scintilla_vc6.mak (working copy)
@@ -36,7 +36,7 @@
LD=link
#-Zc:forScope -Zc:wchar_t
-CXXFLAGS=-Zi -TP -W3 -EHsc
+CXXFLAGS=-Zi -TP -W3 -EHsc -DSCIAPI_DLL
# For something scary:-Wp64
CXXDEBUG=-Od -MTd -DDEBUG
CXXNDEBUG=-O1 -MT -DNDEBUG