Update Russian translation (#3918)
[geany-mirror.git] / scintilla / include / ScintillaTypes.h
blob4692e99166c82d75035d0d597755371871dde84d
1 // Scintilla source code edit control
2 /** @file ScintillaTypes.h
3 ** Types used to communicate with Scintilla.
4 **/
5 // Copyright 1998-2019 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 /* Most of this file is automatically generated from the Scintilla.iface interface definition
9 * file which contains any comments about the definitions. ScintillaAPIFacer.py does the generation. */
11 #ifndef SCINTILLATYPES_H
12 #define SCINTILLATYPES_H
14 namespace Scintilla {
16 // Enumerations
17 //++Autogenerated -- start of section automatically generated from Scintilla.iface
19 enum class WhiteSpace {
20 Invisible = 0,
21 VisibleAlways = 1,
22 VisibleAfterIndent = 2,
23 VisibleOnlyInIndent = 3,
26 enum class TabDrawMode {
27 LongArrow = 0,
28 StrikeOut = 1,
31 enum class EndOfLine {
32 CrLf = 0,
33 Cr = 1,
34 Lf = 2,
37 enum class IMEInteraction {
38 Windowed = 0,
39 Inline = 1,
42 enum class Alpha {
43 Transparent = 0,
44 Opaque = 255,
45 NoAlpha = 256,
48 enum class CursorShape {
49 Normal = -1,
50 Arrow = 2,
51 Wait = 4,
52 ReverseArrow = 7,
55 enum class MarkerSymbol {
56 Circle = 0,
57 RoundRect = 1,
58 Arrow = 2,
59 SmallRect = 3,
60 ShortArrow = 4,
61 Empty = 5,
62 ArrowDown = 6,
63 Minus = 7,
64 Plus = 8,
65 VLine = 9,
66 LCorner = 10,
67 TCorner = 11,
68 BoxPlus = 12,
69 BoxPlusConnected = 13,
70 BoxMinus = 14,
71 BoxMinusConnected = 15,
72 LCornerCurve = 16,
73 TCornerCurve = 17,
74 CirclePlus = 18,
75 CirclePlusConnected = 19,
76 CircleMinus = 20,
77 CircleMinusConnected = 21,
78 Background = 22,
79 DotDotDot = 23,
80 Arrows = 24,
81 Pixmap = 25,
82 FullRect = 26,
83 LeftRect = 27,
84 Available = 28,
85 Underline = 29,
86 RgbaImage = 30,
87 Bookmark = 31,
88 VerticalBookmark = 32,
89 Bar = 33,
90 Character = 10000,
93 enum class MarkerOutline {
94 HistoryRevertedToOrigin = 21,
95 HistorySaved = 22,
96 HistoryModified = 23,
97 HistoryRevertedToModified = 24,
98 FolderEnd = 25,
99 FolderOpenMid = 26,
100 FolderMidTail = 27,
101 FolderTail = 28,
102 FolderSub = 29,
103 Folder = 30,
104 FolderOpen = 31,
107 enum class MarginType {
108 Symbol = 0,
109 Number = 1,
110 Back = 2,
111 Fore = 3,
112 Text = 4,
113 RText = 5,
114 Colour = 6,
117 enum class StylesCommon {
118 Default = 32,
119 LineNumber = 33,
120 BraceLight = 34,
121 BraceBad = 35,
122 ControlChar = 36,
123 IndentGuide = 37,
124 CallTip = 38,
125 FoldDisplayText = 39,
126 LastPredefined = 39,
127 Max = 255,
130 enum class CharacterSet {
131 Ansi = 0,
132 Default = 1,
133 Baltic = 186,
134 ChineseBig5 = 136,
135 EastEurope = 238,
136 GB2312 = 134,
137 Greek = 161,
138 Hangul = 129,
139 Mac = 77,
140 Oem = 255,
141 Russian = 204,
142 Oem866 = 866,
143 Cyrillic = 1251,
144 ShiftJis = 128,
145 Symbol = 2,
146 Turkish = 162,
147 Johab = 130,
148 Hebrew = 177,
149 Arabic = 178,
150 Vietnamese = 163,
151 Thai = 222,
152 Iso8859_15 = 1000,
155 enum class CaseVisible {
156 Mixed = 0,
157 Upper = 1,
158 Lower = 2,
159 Camel = 3,
162 enum class FontWeight {
163 Normal = 400,
164 SemiBold = 600,
165 Bold = 700,
168 enum class Element {
169 List = 0,
170 ListBack = 1,
171 ListSelected = 2,
172 ListSelectedBack = 3,
173 SelectionText = 10,
174 SelectionBack = 11,
175 SelectionAdditionalText = 12,
176 SelectionAdditionalBack = 13,
177 SelectionSecondaryText = 14,
178 SelectionSecondaryBack = 15,
179 SelectionInactiveText = 16,
180 SelectionInactiveBack = 17,
181 Caret = 40,
182 CaretAdditional = 41,
183 CaretLineBack = 50,
184 WhiteSpace = 60,
185 WhiteSpaceBack = 61,
186 HotSpotActive = 70,
187 HotSpotActiveBack = 71,
188 FoldLine = 80,
189 HiddenLine = 81,
192 enum class Layer {
193 Base = 0,
194 UnderText = 1,
195 OverText = 2,
198 enum class IndicatorStyle {
199 Plain = 0,
200 Squiggle = 1,
201 TT = 2,
202 Diagonal = 3,
203 Strike = 4,
204 Hidden = 5,
205 Box = 6,
206 RoundBox = 7,
207 StraightBox = 8,
208 Dash = 9,
209 Dots = 10,
210 SquiggleLow = 11,
211 DotBox = 12,
212 SquigglePixmap = 13,
213 CompositionThick = 14,
214 CompositionThin = 15,
215 FullBox = 16,
216 TextFore = 17,
217 Point = 18,
218 PointCharacter = 19,
219 Gradient = 20,
220 GradientCentre = 21,
221 PointTop = 22,
224 enum class IndicatorNumbers {
225 Container = 8,
226 Ime = 32,
227 ImeMax = 35,
228 HistoryRevertedToOriginInsertion = 36,
229 HistoryRevertedToOriginDeletion = 37,
230 HistorySavedInsertion = 38,
231 HistorySavedDeletion = 39,
232 HistoryModifiedInsertion = 40,
233 HistoryModifiedDeletion = 41,
234 HistoryRevertedToModifiedInsertion = 42,
235 HistoryRevertedToModifiedDeletion = 43,
236 Max = 43,
239 enum class IndicValue {
240 Bit = 0x1000000,
241 Mask = 0xFFFFFF,
244 enum class IndicFlag {
245 None = 0,
246 ValueFore = 1,
249 enum class AutoCompleteOption {
250 Normal = 0,
251 FixedSize = 1,
254 enum class IndentView {
255 None = 0,
256 Real = 1,
257 LookForward = 2,
258 LookBoth = 3,
261 enum class PrintOption {
262 Normal = 0,
263 InvertLight = 1,
264 BlackOnWhite = 2,
265 ColourOnWhite = 3,
266 ColourOnWhiteDefaultBG = 4,
267 ScreenColours = 5,
270 enum class FindOption {
271 None = 0x0,
272 WholeWord = 0x2,
273 MatchCase = 0x4,
274 WordStart = 0x00100000,
275 RegExp = 0x00200000,
276 Posix = 0x00400000,
277 Cxx11RegEx = 0x00800000,
280 enum class ChangeHistoryOption {
281 Disabled = 0,
282 Enabled = 1,
283 Markers = 2,
284 Indicators = 4,
287 enum class FoldLevel {
288 None = 0x0,
289 Base = 0x400,
290 WhiteFlag = 0x1000,
291 HeaderFlag = 0x2000,
292 NumberMask = 0x0FFF,
295 enum class FoldDisplayTextStyle {
296 Hidden = 0,
297 Standard = 1,
298 Boxed = 2,
301 enum class FoldAction {
302 Contract = 0,
303 Expand = 1,
304 Toggle = 2,
305 ContractEveryLevel = 4,
308 enum class AutomaticFold {
309 None = 0x0000,
310 Show = 0x0001,
311 Click = 0x0002,
312 Change = 0x0004,
315 enum class FoldFlag {
316 None = 0x0000,
317 LineBeforeExpanded = 0x0002,
318 LineBeforeContracted = 0x0004,
319 LineAfterExpanded = 0x0008,
320 LineAfterContracted = 0x0010,
321 LevelNumbers = 0x0040,
322 LineState = 0x0080,
325 enum class IdleStyling {
326 None = 0,
327 ToVisible = 1,
328 AfterVisible = 2,
329 All = 3,
332 enum class Wrap {
333 None = 0,
334 Word = 1,
335 Char = 2,
336 WhiteSpace = 3,
339 enum class WrapVisualFlag {
340 None = 0x0000,
341 End = 0x0001,
342 Start = 0x0002,
343 Margin = 0x0004,
346 enum class WrapVisualLocation {
347 Default = 0x0000,
348 EndByText = 0x0001,
349 StartByText = 0x0002,
352 enum class WrapIndentMode {
353 Fixed = 0,
354 Same = 1,
355 Indent = 2,
356 DeepIndent = 3,
359 enum class LineCache {
360 None = 0,
361 Caret = 1,
362 Page = 2,
363 Document = 3,
366 enum class PhasesDraw {
367 One = 0,
368 Two = 1,
369 Multiple = 2,
372 enum class FontQuality {
373 QualityMask = 0xF,
374 QualityDefault = 0,
375 QualityNonAntialiased = 1,
376 QualityAntialiased = 2,
377 QualityLcdOptimized = 3,
380 enum class MultiPaste {
381 Once = 0,
382 Each = 1,
385 enum class Accessibility {
386 Disabled = 0,
387 Enabled = 1,
390 enum class EdgeVisualStyle {
391 None = 0,
392 Line = 1,
393 Background = 2,
394 MultiLine = 3,
397 enum class PopUp {
398 Never = 0,
399 All = 1,
400 Text = 2,
403 enum class DocumentOption {
404 Default = 0,
405 StylesNone = 0x1,
406 TextLarge = 0x100,
409 enum class Status {
410 Ok = 0,
411 Failure = 1,
412 BadAlloc = 2,
413 WarnStart = 1000,
414 RegEx = 1001,
417 enum class VisiblePolicy {
418 Slop = 0x01,
419 Strict = 0x04,
422 enum class CaretPolicy {
423 Slop = 0x01,
424 Strict = 0x04,
425 Jumps = 0x10,
426 Even = 0x08,
429 enum class SelectionMode {
430 Stream = 0,
431 Rectangle = 1,
432 Lines = 2,
433 Thin = 3,
436 enum class CaseInsensitiveBehaviour {
437 RespectCase = 0,
438 IgnoreCase = 1,
441 enum class MultiAutoComplete {
442 Once = 0,
443 Each = 1,
446 enum class Ordering {
447 PreSorted = 0,
448 PerformSort = 1,
449 Custom = 2,
452 enum class CaretSticky {
453 Off = 0,
454 On = 1,
455 WhiteSpace = 2,
458 enum class CaretStyle {
459 Invisible = 0,
460 Line = 1,
461 Block = 2,
462 OverstrikeBar = 0,
463 OverstrikeBlock = 0x10,
464 Curses = 0x20,
465 InsMask = 0xF,
466 BlockAfter = 0x100,
469 enum class MarginOption {
470 None = 0,
471 SubLineSelect = 1,
474 enum class AnnotationVisible {
475 Hidden = 0,
476 Standard = 1,
477 Boxed = 2,
478 Indented = 3,
481 enum class UndoFlags {
482 None = 0,
483 MayCoalesce = 1,
486 enum class VirtualSpace {
487 None = 0,
488 RectangularSelection = 1,
489 UserAccessible = 2,
490 NoWrapLineStart = 4,
493 enum class Technology {
494 Default = 0,
495 DirectWrite = 1,
496 DirectWriteRetain = 2,
497 DirectWriteDC = 3,
500 enum class LineEndType {
501 Default = 0,
502 Unicode = 1,
505 enum class RepresentationAppearance {
506 Plain = 0,
507 Blob = 1,
508 Colour = 0x10,
511 enum class EOLAnnotationVisible {
512 Hidden = 0x0,
513 Standard = 0x1,
514 Boxed = 0x2,
515 Stadium = 0x100,
516 FlatCircle = 0x101,
517 AngleCircle = 0x102,
518 CircleFlat = 0x110,
519 Flats = 0x111,
520 AngleFlat = 0x112,
521 CircleAngle = 0x120,
522 FlatAngle = 0x121,
523 Angles = 0x122,
526 enum class Supports {
527 LineDrawsFinal = 0,
528 PixelDivisions = 1,
529 FractionalStrokeWidth = 2,
530 TranslucentStroke = 3,
531 PixelModification = 4,
532 ThreadSafeMeasureWidths = 5,
535 enum class LineCharacterIndexType {
536 None = 0,
537 Utf32 = 1,
538 Utf16 = 2,
541 enum class TypeProperty {
542 Boolean = 0,
543 Integer = 1,
544 String = 2,
547 enum class ModificationFlags {
548 None = 0x0,
549 InsertText = 0x1,
550 DeleteText = 0x2,
551 ChangeStyle = 0x4,
552 ChangeFold = 0x8,
553 User = 0x10,
554 Undo = 0x20,
555 Redo = 0x40,
556 MultiStepUndoRedo = 0x80,
557 LastStepInUndoRedo = 0x100,
558 ChangeMarker = 0x200,
559 BeforeInsert = 0x400,
560 BeforeDelete = 0x800,
561 MultilineUndoRedo = 0x1000,
562 StartAction = 0x2000,
563 ChangeIndicator = 0x4000,
564 ChangeLineState = 0x8000,
565 ChangeMargin = 0x10000,
566 ChangeAnnotation = 0x20000,
567 Container = 0x40000,
568 LexerState = 0x80000,
569 InsertCheck = 0x100000,
570 ChangeTabStops = 0x200000,
571 ChangeEOLAnnotation = 0x400000,
572 EventMaskAll = 0x7FFFFF,
575 enum class Update {
576 None = 0x0,
577 Content = 0x1,
578 Selection = 0x2,
579 VScroll = 0x4,
580 HScroll = 0x8,
583 enum class FocusChange {
584 Change = 768,
585 Setfocus = 512,
586 Killfocus = 256,
589 enum class Keys {
590 Down = 300,
591 Up = 301,
592 Left = 302,
593 Right = 303,
594 Home = 304,
595 End = 305,
596 Prior = 306,
597 Next = 307,
598 Delete = 308,
599 Insert = 309,
600 Escape = 7,
601 Back = 8,
602 Tab = 9,
603 Return = 13,
604 Add = 310,
605 Subtract = 311,
606 Divide = 312,
607 Win = 313,
608 RWin = 314,
609 Menu = 315,
612 enum class KeyMod {
613 Norm = 0,
614 Shift = 1,
615 Ctrl = 2,
616 Alt = 4,
617 Super = 8,
618 Meta = 16,
621 enum class CompletionMethods {
622 FillUp = 1,
623 DoubleClick = 2,
624 Tab = 3,
625 Newline = 4,
626 Command = 5,
627 SingleChoice = 6,
630 enum class CharacterSource {
631 DirectInput = 0,
632 TentativeInput = 1,
633 ImeResult = 2,
636 enum class Bidirectional {
637 Disabled = 0,
638 L2R = 1,
639 R2L = 2,
642 enum class Notification {
643 StyleNeeded = 2000,
644 CharAdded = 2001,
645 SavePointReached = 2002,
646 SavePointLeft = 2003,
647 ModifyAttemptRO = 2004,
648 Key = 2005,
649 DoubleClick = 2006,
650 UpdateUI = 2007,
651 Modified = 2008,
652 MacroRecord = 2009,
653 MarginClick = 2010,
654 NeedShown = 2011,
655 Painted = 2013,
656 UserListSelection = 2014,
657 URIDropped = 2015,
658 DwellStart = 2016,
659 DwellEnd = 2017,
660 Zoom = 2018,
661 HotSpotClick = 2019,
662 HotSpotDoubleClick = 2020,
663 CallTipClick = 2021,
664 AutoCSelection = 2022,
665 IndicatorClick = 2023,
666 IndicatorRelease = 2024,
667 AutoCCancelled = 2025,
668 AutoCCharDeleted = 2026,
669 HotSpotReleaseClick = 2027,
670 FocusIn = 2028,
671 FocusOut = 2029,
672 AutoCCompleted = 2030,
673 MarginRightClick = 2031,
674 AutoCSelectionChange = 2032,
676 //--Autogenerated -- end of section automatically generated from Scintilla.iface
678 using Position = intptr_t;
679 using Line = intptr_t;
680 using Colour = int;
681 using ColourAlpha = int;
682 using uptr_t = uintptr_t;
683 using sptr_t = intptr_t;
685 //++Autogenerated -- start of section automatically generated from Scintilla.iface
686 //**1 \(\*\n\)
687 constexpr Position InvalidPosition = -1;
688 constexpr int CpUtf8 = 65001;
689 constexpr int MarkerMax = 31;
690 constexpr int MaskFolders = 0xFE000000;
691 constexpr int MaxMargin = 4;
692 constexpr int FontSizeMultiplier = 100;
693 constexpr int TimeForever = 10000000;
694 constexpr int KeywordsetMax = 8;
696 //--Autogenerated -- end of section automatically generated from Scintilla.iface
698 constexpr int IndicatorMax = static_cast<int>(IndicatorNumbers::Max);
700 // Functions to manipulate fields from a MarkerOutline
702 inline int operator<<(int i, MarkerOutline marker) noexcept {
703 return i << static_cast<int>(marker);
706 // Functions to manipulate fields from a FindOption
708 constexpr FindOption operator|(FindOption a, FindOption b) noexcept {
709 return static_cast<FindOption>(static_cast<int>(a) | static_cast<int>(b));
712 inline FindOption &operator|=(FindOption &self, FindOption a) noexcept {
713 self = self | a;
714 return self;
717 // Functions to retrieve and manipulate fields from a FoldLevel
719 constexpr FoldLevel operator&(FoldLevel lhs, FoldLevel rhs) noexcept {
720 return static_cast<FoldLevel>(static_cast<int>(lhs) & static_cast<int>(rhs));
723 constexpr FoldLevel LevelNumberPart(FoldLevel level) noexcept {
724 return level & FoldLevel::NumberMask;
727 constexpr int LevelNumber(FoldLevel level) noexcept {
728 return static_cast<int>(LevelNumberPart(level));
731 constexpr bool LevelIsHeader(FoldLevel level) noexcept {
732 return (level & FoldLevel::HeaderFlag) == FoldLevel::HeaderFlag;
735 constexpr bool LevelIsWhitespace(FoldLevel level) noexcept {
736 return (level & FoldLevel::WhiteFlag) == FoldLevel::WhiteFlag;
739 // Functions to manipulate fields from a FoldFlag
741 constexpr FoldFlag operator|(FoldFlag a, FoldFlag b) noexcept {
742 return static_cast<FoldFlag>(static_cast<int>(a) | static_cast<int>(b));
745 // Functions to manipulate fields from a FontQuality
747 constexpr FontQuality operator&(FontQuality a, FontQuality b) noexcept {
748 return static_cast<FontQuality>(static_cast<int>(a) & static_cast<int>(b));
751 // Functions to manipulate fields from a DocumentOption
753 constexpr DocumentOption operator|(DocumentOption a, DocumentOption b) noexcept {
754 return static_cast<DocumentOption>(static_cast<int>(a) | static_cast<int>(b));
757 // Functions to manipulate fields from a CaretPolicy
759 constexpr CaretPolicy operator|(CaretPolicy a, CaretPolicy b) noexcept {
760 return static_cast<CaretPolicy>(static_cast<int>(a) | static_cast<int>(b));
763 // Functions to manipulate fields from a CaretStyle
765 constexpr CaretStyle operator|(CaretStyle a, CaretStyle b) noexcept {
766 return static_cast<CaretStyle>(static_cast<int>(a) | static_cast<int>(b));
769 constexpr CaretStyle operator&(CaretStyle a, CaretStyle b) noexcept {
770 return static_cast<CaretStyle>(static_cast<int>(a) & static_cast<int>(b));
773 // Functions to manipulate fields from a LineEndType
775 constexpr LineEndType operator&(LineEndType a, LineEndType b) noexcept {
776 return static_cast<LineEndType>(static_cast<int>(a) & static_cast<int>(b));
779 // Functions to manipulate fields from a RepresentationAppearance
781 constexpr RepresentationAppearance operator|(RepresentationAppearance a, RepresentationAppearance b) noexcept {
782 return static_cast<RepresentationAppearance>(static_cast<int>(a) | static_cast<int>(b));
785 // Functions to manipulate fields from a LineCharacterIndexType
787 constexpr LineCharacterIndexType operator|(LineCharacterIndexType a, LineCharacterIndexType b) noexcept {
788 return static_cast<LineCharacterIndexType>(static_cast<int>(a) | static_cast<int>(b));
791 // Functions to manipulate fields from a ModificationFlags
793 constexpr ModificationFlags operator|(ModificationFlags a, ModificationFlags b) noexcept {
794 return static_cast<ModificationFlags>(static_cast<int>(a) | static_cast<int>(b));
797 constexpr ModificationFlags operator&(ModificationFlags a, ModificationFlags b) noexcept {
798 return static_cast<ModificationFlags>(static_cast<int>(a) & static_cast<int>(b));
801 inline ModificationFlags &operator|=(ModificationFlags &self, ModificationFlags a) noexcept {
802 self = self | a;
803 return self;
806 // Functions to manipulate fields from a Update
808 constexpr Update operator|(Update a, Update b) noexcept {
809 return static_cast<Update>(static_cast<int>(a) | static_cast<int>(b));
812 // Functions to manipulate fields from a KeyMod
814 constexpr KeyMod operator|(KeyMod a, KeyMod b) noexcept {
815 return static_cast<KeyMod>(static_cast<int>(a) | static_cast<int>(b));
818 constexpr KeyMod operator&(KeyMod a, KeyMod b) noexcept {
819 return static_cast<KeyMod>(static_cast<int>(a) & static_cast<int>(b));
822 constexpr KeyMod ModifierFlags(bool shift, bool ctrl, bool alt, bool meta=false, bool super=false) noexcept {
823 return
824 (shift ? KeyMod::Shift : KeyMod::Norm) |
825 (ctrl ? KeyMod::Ctrl : KeyMod::Norm) |
826 (alt ? KeyMod::Alt : KeyMod::Norm) |
827 (meta ? KeyMod::Meta : KeyMod::Norm) |
828 (super ? KeyMod::Super : KeyMod::Norm);
831 // Test if an enum class value has some bit flag(s) of test set.
832 template <typename T>
833 constexpr bool FlagSet(T value, T test) {
834 return (static_cast<int>(value) & static_cast<int>(test)) != 0;
839 #endif