Merge pull request #4013 from techee/optlib
[geany-mirror.git] / scintilla / scintilla_changes.patch
blob62feb2d9a0da82801677b778d9cd9b31ae9f1e1e
1 A patch to Scintilla 3.54 containing our changes to Scintilla
2 (removing unused lexers, exporting symbols).
3 diff --git scintilla/gtk/ScintillaGTK.cxx scintilla/gtk/ScintillaGTK.cxx
4 index 0871ca2..49dc278 100644
5 --- scintilla/gtk/ScintillaGTK.cxx
6 +++ scintilla/gtk/ScintillaGTK.cxx
7 @@ -3205,11 +3205,13 @@
10 /* legacy name for scintilla_object_send_message */
11 +GEANY_API_SYMBOL
12 sptr_t scintilla_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
13 ScintillaGTK *psci = static_cast<ScintillaGTK *>(sci->pscin);
14 return psci->WndProc(static_cast<Message>(iMessage), wParam, lParam);
17 +GEANY_API_SYMBOL
18 gintptr scintilla_object_send_message(ScintillaObject *sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
19 return scintilla_send_message(sci, iMessage, wParam, lParam);
21 @@ -3218,6 +3220,7 @@
22 static void scintilla_init(ScintillaObject *sci);
24 /* legacy name for scintilla_object_get_type */
25 +GEANY_API_SYMBOL
26 GType scintilla_get_type() {
27 static GType scintilla_type = 0;
28 try {
29 @@ -3247,6 +3250,7 @@
30 return scintilla_type;
33 +GEANY_API_SYMBOL
34 GType scintilla_object_get_type() {
35 return scintilla_get_type();
37 @@ -3352,6 +3356,7 @@
40 /* legacy name for scintilla_object_new */
41 +GEANY_API_SYMBOL
42 GtkWidget *scintilla_new() {
43 GtkWidget *widget = GTK_WIDGET(g_object_new(scintilla_get_type(), nullptr));
44 gtk_widget_set_direction(widget, GTK_TEXT_DIR_LTR);
45 @@ -3359,6 +3364,7 @@
46 return widget;
49 +GEANY_API_SYMBOL
50 GtkWidget *scintilla_object_new() {
51 return scintilla_new();
53 @@ -3381,6 +3387,7 @@
54 static void *copy_(void *src) { return src; }
55 static void free_(void *) { }
57 +GEANY_API_SYMBOL
58 GType scnotification_get_type(void) {
59 static gsize type_id = 0;
60 if (g_once_init_enter(&type_id)) {
61 diff --git scintilla/lexilla/src/Lexilla.cxx scintilla/lexilla/src/Lexilla.cxx
62 index cd4b23617..af4a73db4 100644
63 --- scintilla/lexilla/src/Lexilla.cxx
64 +++ scintilla/lexilla/src/Lexilla.cxx
65 @@ -167,8 +167,72 @@
67 CatalogueModules catalogueLexilla;
69 +static void AddGeanyLexers()
71 + catalogueLexilla.AddLexerModules({
72 + &lmAbaqus,
73 + &lmAda,
74 + &lmAsciidoc,
75 + &lmAsm,
76 + &lmAU3,
77 + &lmBash,
78 + &lmBatch,
79 + &lmCaml,
80 + &lmCIL,
81 + &lmCmake,
82 + &lmCOBOL,
83 + &lmCoffeeScript,
84 + &lmCPP,
85 + &lmCss,
86 + &lmD,
87 + &lmDiff,
88 + &lmErlang,
89 + &lmF77,
90 + &lmForth,
91 + &lmFortran,
92 + &lmFreeBasic,
93 + &lmGDScript,
94 + &lmHaskell,
95 + &lmHTML,
96 + &lmJulia,
97 + &lmLatex,
98 + &lmLISP,
99 + &lmLua,
100 + &lmMake,
101 + &lmMarkdown,
102 + &lmNim,
103 + &lmNsis,
104 + &lmNull,
105 + &lmOctave,
106 + &lmPascal,
107 + &lmPerl,
108 + &lmPHPSCRIPT,
109 + &lmPO,
110 + &lmPowerShell,
111 + &lmProps,
112 + &lmPython,
113 + &lmR,
114 + &lmRaku,
115 + &lmRuby,
116 + &lmRust,
117 + &lmSmalltalk,
118 + &lmSQL,
119 + &lmTCL,
120 + &lmTxt2tags,
121 + &lmVerilog,
122 + &lmVHDL,
123 + &lmVisualProlog,
124 + &lmXML,
125 + &lmYAML,
126 + });
130 void AddEachLexer() {
132 + AddGeanyLexers();
133 + return;
135 if (catalogueLexilla.Count() > 0) {
136 return;