2018-01-20 20:18:12 +03:00
|
|
|
/**
|
|
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
|
|
* See LICENSE
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSUInteger, FontTrait) {
|
|
|
|
FontTraitNone = 0,
|
|
|
|
FontTraitItalic = (1 << 0),
|
|
|
|
FontTraitBold = (1 << 1),
|
|
|
|
FontTraitUnderline = (1 << 2),
|
|
|
|
FontTraitUndercurl = (1 << 3)
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
FontTrait fontTrait;
|
|
|
|
|
|
|
|
NSInteger foreground;
|
|
|
|
NSInteger background;
|
|
|
|
NSInteger special;
|
|
|
|
} CellAttributes;
|
|
|
|
|
|
|
|
// Keep in sync with ModeShape enum in cursor_shape.h.
|
|
|
|
typedef NS_ENUM(NSUInteger, CursorModeShape) {
|
|
|
|
CursorModeShapeNormal = 0,
|
|
|
|
CursorModeShapeVisual = 1,
|
|
|
|
CursorModeShapeInsert = 2,
|
|
|
|
CursorModeShapeReplace = 3,
|
|
|
|
CursorModeShapeCmdline = 4,
|
|
|
|
CursorModeShapeCmdlineInsert = 5,
|
|
|
|
CursorModeShapeCmdlineReplace = 6,
|
|
|
|
CursorModeShapeOperatorPending = 7,
|
|
|
|
CursorModeShapeVisualExclusive = 8,
|
|
|
|
CursorModeShapeOnCmdline = 9,
|
|
|
|
CursorModeShapeOnStatusLine = 10,
|
|
|
|
CursorModeShapeDraggingStatusLine = 11,
|
|
|
|
CursorModeShapeOnVerticalSepLine = 12,
|
|
|
|
CursorModeShapeDraggingVerticalSepLine = 13,
|
|
|
|
CursorModeShapeMore = 14,
|
|
|
|
CursorModeShapeMoreLastLine = 15,
|
|
|
|
CursorModeShapeShowingMatchingParen = 16,
|
|
|
|
CursorModeShapeTermFocus = 17,
|
|
|
|
CursorModeShapeCount = 18,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
NSInteger row;
|
|
|
|
NSInteger column;
|
|
|
|
} Position;
|
|
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, RenderDataType) {
|
|
|
|
RenderDataTypePut,
|
|
|
|
RenderDataTypePutMarked,
|
|
|
|
RenderDataTypeGoto,
|
|
|
|
RenderDataTypeHighlight
|
|
|
|
};
|
2018-01-21 16:16:07 +03:00
|
|
|
|
2018-01-23 22:40:20 +03:00
|
|
|
typedef NS_ENUM(NSInteger, NvimServerMsgId) {
|
|
|
|
NvimServerMsgIdServerReady = 0,
|
|
|
|
NvimServerMsgIdNvimReady,
|
|
|
|
NvimServerMsgIdResize,
|
|
|
|
NvimServerMsgIdClear,
|
|
|
|
NvimServerMsgIdEolClear,
|
|
|
|
NvimServerMsgIdSetMenu,
|
|
|
|
NvimServerMsgIdBusyStart,
|
|
|
|
NvimServerMsgIdBusyStop,
|
|
|
|
NvimServerMsgIdMouseOn,
|
|
|
|
NvimServerMsgIdMouseOff,
|
|
|
|
NvimServerMsgIdModeChange,
|
|
|
|
NvimServerMsgIdSetScrollRegion,
|
|
|
|
NvimServerMsgIdScroll,
|
|
|
|
NvimServerMsgIdUnmark,
|
|
|
|
NvimServerMsgIdBell,
|
|
|
|
NvimServerMsgIdVisualBell,
|
|
|
|
NvimServerMsgIdFlush,
|
|
|
|
NvimServerMsgIdSetForeground,
|
|
|
|
NvimServerMsgIdSetBackground,
|
|
|
|
NvimServerMsgIdSetSpecial,
|
|
|
|
NvimServerMsgIdSetTitle,
|
|
|
|
NvimServerMsgIdSetIcon,
|
|
|
|
NvimServerMsgIdStop,
|
2018-01-21 16:16:07 +03:00
|
|
|
|
2018-01-23 22:40:20 +03:00
|
|
|
NvimServerMsgIdDirtyStatusChanged,
|
|
|
|
NvimServerMsgIdCwdChanged,
|
|
|
|
NvimServerMsgIdColorSchemeChanged,
|
2018-02-11 17:33:55 +03:00
|
|
|
NvimServerMsgIdDefaultColorsChanged,
|
2018-01-23 22:40:20 +03:00
|
|
|
NvimServerMsgIdAutoCommandEvent,
|
2018-01-21 16:16:07 +03:00
|
|
|
|
2018-01-23 22:40:20 +03:00
|
|
|
NvimServerMsgIdDebug1,
|
2018-01-21 16:16:07 +03:00
|
|
|
};
|
|
|
|
|
2018-01-23 22:40:20 +03:00
|
|
|
typedef NS_ENUM(NSInteger, NvimBridgeMsgId) {
|
|
|
|
NvimBridgeMsgIdAgentReady = 0,
|
|
|
|
NvimBridgeMsgIdInput,
|
|
|
|
NvimBridgeMsgIdInputMarked,
|
|
|
|
NvimBridgeMsgIdDelete,
|
|
|
|
NvimBridgeMsgIdResize,
|
|
|
|
NvimBridgeMsgIdScroll,
|
2018-01-21 16:16:07 +03:00
|
|
|
|
2018-01-23 22:40:20 +03:00
|
|
|
NvimBridgeMsgIdFocusGained,
|
2018-01-21 16:16:07 +03:00
|
|
|
|
2018-01-23 22:40:20 +03:00
|
|
|
NvimBridgeMsgIdDebug1,
|
2018-01-21 16:16:07 +03:00
|
|
|
};
|