| 1 | // Scintilla source code edit control |
| 2 | /** @file Position.h |
| 3 | ** Defines global type name Position in the Sci internal namespace. |
| 4 | **/ |
| 5 | // Copyright 2015 by Neil Hodgson <neilh@scintilla.org> |
| 6 | // The License.txt file describes the conditions under which this software may be distributed. |
| 7 | |
| 8 | #ifndef POSITION_H |
| 9 | #define POSITION_H |
| 10 | |
| 11 | #include<stddef.h> |
| 12 | |
| 13 | /** |
| 14 | * A Position is a position within a document between two characters or at the beginning or end. |
| 15 | * Sometimes used as a character index where it identifies the character after the position. |
| 16 | * A Line is a document or screen line. |
| 17 | */ |
| 18 | |
| 19 | namespace Sci { |
| 20 | |
| 21 | typedef ptrdiff_t Position; |
| 22 | typedef ptrdiff_t Line; |
| 23 | |
| 24 | inline constexpr Position invalidPosition = -1; |
| 25 | |
| 26 | } |
| 27 | |
| 28 | #endif |
| 29 | |