| ... | ... |
@@ -26,7 +26,8 @@ typedef struct line_t {
|
| 26 | 26 |
} hline_t; |
| 27 | 27 |
|
| 28 | 28 |
typedef struct hcolor_t {
|
| 29 |
- char rgba[9]; |
|
| 29 |
+ char origrgba[5]; |
|
| 30 |
+ char rgba[5]; |
|
| 30 | 31 |
} hcolor_t; |
| 31 | 32 |
|
| 32 | 33 |
typedef struct highlighter_t {
|
| ... | ... |
@@ -55,4 +56,6 @@ int redata_highlighter_unregister(redata_t *redata, redata_plugin_t *slot,char * |
| 55 | 56 |
hcolor_t *redata_highlighter_getcolors(redata_t *redata, int *ncolors); |
| 56 | 57 |
linecolor_t *redata_highlighter_getline(redata_t *redata, int line, int *nlinecolors); |
| 57 | 58 |
int redata_highlighter_getcolorindex(redata_t *redata, int line, int nthbyte); |
| 59 |
+int redata_highlighter_settheme(redata_t *redata, int ntheme, int invert); |
|
| 60 |
+ |
|
| 58 | 61 |
|
| ... | ... |
@@ -54,4 +54,5 @@ int redata_highlighter_unregister(redata_t *redata, redata_plugin_t *slot,char * |
| 54 | 54 |
|
| 55 | 55 |
hcolor_t *redata_highlighter_getcolors(redata_t *redata, int *ncolors); |
| 56 | 56 |
linecolor_t *redata_highlighter_getline(redata_t *redata, int line, int *nlinecolors); |
| 57 |
+int redata_highlighter_getcolorindex(redata_t *redata, int line, int nthbyte); |
|
| 57 | 58 |
|
| ... | ... |
@@ -22,6 +22,7 @@ typedef struct line_t {
|
| 22 | 22 |
long pos; |
| 23 | 23 |
int off; /* offset int buf */ |
| 24 | 24 |
int len; /* size used in buf */ |
| 25 |
+ int endingmode; |
|
| 25 | 26 |
} hline_t; |
| 26 | 27 |
|
| 27 | 28 |
typedef struct hcolor_t {
|
| ... | ... |
@@ -38,6 +39,14 @@ typedef struct highlighter_t {
|
| 38 | 39 |
int sizecolors; |
| 39 | 40 |
hcolor_t *colors; |
| 40 | 41 |
int flag_doneall; |
| 42 |
+ int sizekeywordbuf; |
|
| 43 |
+ int usedkeywordbuf; |
|
| 44 |
+ char *keywordbuf; |
|
| 45 |
+ int keywordbufstart; |
|
| 46 |
+ int sizedirectivebuf; |
|
| 47 |
+ int useddirectivebuf; |
|
| 48 |
+ char *directivebuf; |
|
| 49 |
+ int directivebufstart; |
|
| 41 | 50 |
} highlighter_t; |
| 42 | 51 |
|
| 43 | 52 |
int redata_highlighter_register(redata_t *redata, redata_plugin_t *slot); |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,48 @@ |
| 1 |
+/* |
|
| 2 |
+ * re_plugin_highlighter.h |
|
| 3 |
+ * |
|
| 4 |
+ * A programmers editor |
|
| 5 |
+ * |
|
| 6 |
+ * re_data plugin to support the syntax highlighter. |
|
| 7 |
+ * |
|
| 8 |
+ * HEADER FILE |
|
| 9 |
+ * |
|
| 10 |
+ * Author: Dario Rodriguez dario@softhome.net |
|
| 11 |
+ * This program is licensed under the terms of GNU GPL v2.1+ |
|
| 12 |
+ */ |
|
| 13 |
+ |
|
| 14 |
+#include "re_data.h" |
|
| 15 |
+ |
|
| 16 |
+typedef struct linecolor_t {
|
|
| 17 |
+ int len; |
|
| 18 |
+ int color; |
|
| 19 |
+} linecolor_t; |
|
| 20 |
+ |
|
| 21 |
+typedef struct line_t {
|
|
| 22 |
+ long pos; |
|
| 23 |
+ int off; /* offset int buf */ |
|
| 24 |
+ int len; /* size used in buf */ |
|
| 25 |
+} hline_t; |
|
| 26 |
+ |
|
| 27 |
+typedef struct hcolor_t {
|
|
| 28 |
+ char rgba[9]; |
|
| 29 |
+} hcolor_t; |
|
| 30 |
+ |
|
| 31 |
+typedef struct highlighter_t {
|
|
| 32 |
+ int sizelines; |
|
| 33 |
+ int usedlines; |
|
| 34 |
+ hline_t *lines; |
|
| 35 |
+ long sizebuf; |
|
| 36 |
+ long usedbuf; |
|
| 37 |
+ char *buf; |
|
| 38 |
+ int sizecolors; |
|
| 39 |
+ hcolor_t *colors; |
|
| 40 |
+ int flag_doneall; |
|
| 41 |
+} highlighter_t; |
|
| 42 |
+ |
|
| 43 |
+int redata_highlighter_register(redata_t *redata, redata_plugin_t *slot); |
|
| 44 |
+int redata_highlighter_unregister(redata_t *redata, redata_plugin_t *slot,char *filename); |
|
| 45 |
+ |
|
| 46 |
+hcolor_t *redata_highlighter_getcolors(redata_t *redata, int *ncolors); |
|
| 47 |
+linecolor_t *redata_highlighter_getline(redata_t *redata, int line, int *nlinecolors); |
|
| 48 |
+ |