1 /* $Id: highlight.h,v 1.9 2002/11/08 20:22:45 edg Exp $ */
3 #ifndef NEDIT_HIGHLIGHT_H_INCLUDED
4 #define NEDIT_HIGHLIGHT_H_INCLUDED
8 #include <X11/Intrinsic.h>
10 /* Pattern flags for modifying pattern matching behavior */
11 #define PARSE_SUBPATS_FROM_START 1
12 #define DEFER_PARSING 2
15 /* Pattern specification structure */
26 /* Header for a set of patterns */
32 highlightPattern
*patterns
;
35 void SyntaxHighlightModifyCB(int pos
, int nInserted
, int nDeleted
,
36 int nRestyled
, char *deletedText
, void *cbArg
);
37 void StartHighlighting(WindowInfo
*window
, int warn
);
38 void StopHighlighting(WindowInfo
*window
);
39 void AttachHighlightToWidget(Widget widget
, WindowInfo
*window
);
40 void FreeHighlightingData(WindowInfo
*window
);
41 void RemoveWidgetHighlight(Widget widget
);
42 void UpdateHighlightStyles(WindowInfo
*window
);
43 int TestHighlightPatterns(patternSet
*patSet
);
44 Pixel
AllocColor(Widget w
, const char *colorName
, int *r
, int *g
, int *b
);
45 void* GetHighlightInfo(WindowInfo
*window
, int pos
);
46 highlightPattern
*FindPatternOfWindow(WindowInfo
*window
, char *name
);
47 int HighlightCodeOfPos(WindowInfo
*window
, int pos
);
48 int HighlightLengthOfCodeFromPos(WindowInfo
*window
, int pos
, int *checkCode
);
49 char *HighlightNameOfCode(WindowInfo
*window
, int hCode
);
50 char *HighlightStyleOfCode(WindowInfo
*window
, int hCode
);
51 char *HighlightColorOfCode(WindowInfo
*window
, int hCode
);
52 char *HighlightBackgroundColorOfCode(WindowInfo
*window
, int hCode
);
53 Pixel
HighlightColorValueOfCode(WindowInfo
*window
, int hCode
,
54 int *r
, int *g
, int *b
);
55 Pixel
GetHighlightBGColorOfCode(WindowInfo
*window
, int hCode
,
56 int *r
, int *g
, int *b
);
57 int HighlightCodeIsBold(WindowInfo
*window
, int hCode
);
58 int HighlightCodeIsItalic(WindowInfo
*window
, int hCode
);
60 #endif /* NEDIT_HIGHLIGHT_H_INCLUDED */