forked from geany/geany
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scintilla_changes.patch
134 lines (124 loc) · 2.83 KB
/
scintilla_changes.patch
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
A patch to Scintilla 3.54 containing our changes to Scintilla
(removing unused lexers, exporting symbols).
diff --git scintilla/gtk/ScintillaGTK.cxx scintilla/gtk/ScintillaGTK.cxx
index 0871ca2..49dc278 100644
--- scintilla/gtk/ScintillaGTK.cxx
+++ scintilla/gtk/ScintillaGTK.cxx
@@ -3205,11 +3205,13 @@
}
/* legacy name for scintilla_object_send_message */
+GEANY_API_SYMBOL
sptr_t scintilla_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
ScintillaGTK *psci = static_cast<ScintillaGTK *>(sci->pscin);
return psci->WndProc(static_cast<Message>(iMessage), wParam, lParam);
}
+GEANY_API_SYMBOL
gintptr scintilla_object_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
return scintilla_send_message(sci, iMessage, wParam, lParam);
}
@@ -3218,6 +3220,7 @@
static void scintilla_init(ScintillaObject *sci);
/* legacy name for scintilla_object_get_type */
+GEANY_API_SYMBOL
GType scintilla_get_type() {
static GType scintilla_type = 0;
try {
@@ -3247,6 +3250,7 @@
return scintilla_type;
}
+GEANY_API_SYMBOL
GType scintilla_object_get_type() {
return scintilla_get_type();
}
@@ -3352,6 +3356,7 @@
}
/* legacy name for scintilla_object_new */
+GEANY_API_SYMBOL
GtkWidget *scintilla_new() {
GtkWidget *widget = GTK_WIDGET(g_object_new(scintilla_get_type(), nullptr));
gtk_widget_set_direction(widget, GTK_TEXT_DIR_LTR);
@@ -3359,6 +3364,7 @@
return widget;
}
+GEANY_API_SYMBOL
GtkWidget *scintilla_object_new() {
return scintilla_new();
}
@@ -3381,6 +3387,7 @@
static void *copy_(void *src) { return src; }
static void free_(void *) { }
+GEANY_API_SYMBOL
GType scnotification_get_type(void) {
static gsize type_id = 0;
if (g_once_init_enter(&type_id)) {
diff --git scintilla/lexilla/src/Lexilla.cxx scintilla/lexilla/src/Lexilla.cxx
index cd4b23617..af4a73db4 100644
--- scintilla/lexilla/src/Lexilla.cxx
+++ scintilla/lexilla/src/Lexilla.cxx
@@ -167,8 +167,68 @@
CatalogueModules catalogueLexilla;
+static void AddGeanyLexers()
+{
+ catalogueLexilla.AddLexerModules({
+ &lmAbaqus,
+ &lmAda,
+ &lmAsciidoc,
+ &lmAsm,
+ &lmAU3,
+ &lmBash,
+ &lmBatch,
+ &lmCaml,
+ &lmCmake,
+ &lmCOBOL,
+ &lmCoffeeScript,
+ &lmCPP,
+ &lmCss,
+ &lmD,
+ &lmDiff,
+ &lmErlang,
+ &lmF77,
+ &lmForth,
+ &lmFortran,
+ &lmFreeBasic,
+ &lmGDScript,
+ &lmHaskell,
+ &lmHTML,
+ &lmJulia,
+ &lmLatex,
+ &lmLISP,
+ &lmLua,
+ &lmMake,
+ &lmMarkdown,
+ &lmNsis,
+ &lmNull,
+ &lmOctave,
+ &lmPascal,
+ &lmPerl,
+ &lmPHPSCRIPT,
+ &lmPO,
+ &lmPowerShell,
+ &lmProps,
+ &lmPython,
+ &lmR,
+ &lmRaku,
+ &lmRuby,
+ &lmRust,
+ &lmSmalltalk,
+ &lmSQL,
+ &lmTCL,
+ &lmTxt2tags,
+ &lmVerilog,
+ &lmVHDL,
+ &lmXML,
+ &lmYAML,
+ });
+}
+
+
void AddEachLexer() {
+ AddGeanyLexers();
+ return;
+
if (catalogueLexilla.Count() > 0) {
return;
}