Data Structures | Macros | Typedefs | Enumerations | Functions
defs.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "nvim/func_attr.h"
#include "nvim/types.h"

Go to the source code of this file.

Data Structures

struct  Error
 
struct  String
 
struct  Array
 
struct  Dictionary
 
struct  object
 
struct  key_value_pair
 

Macros

#define ARRAY_DICT_INIT   {.size = 0, .capacity = 0, .items = NULL}
 
#define STRING_INIT   {.data = NULL, .size = 0}
 
#define OBJECT_INIT   { .type = kObjectTypeNil }
 
#define ERROR_INIT   { .type = kErrorTypeNone, .msg = NULL }
 
#define REMOTE_TYPE(type)   typedef handle_T type
 
#define ERROR_SET(e)   ((e)->type != kErrorTypeNone)
 
#define INTERNAL_CALL_MASK   (((uint64_t)1) << (sizeof(uint64_t) * 8 - 1))
 Mask for all internal calls. More...
 
#define VIML_INTERNAL_CALL   INTERNAL_CALL_MASK
 Internal call from VimL code. More...
 
#define LUA_INTERNAL_CALL   (VIML_INTERNAL_CALL + 1)
 Internal call from lua code. More...
 
#define API_INTEGER_MAX   INT64_MAX
 Maximum value of an Integer. More...
 
#define API_INTEGER_MIN   INT64_MIN
 Minimum value of an Integer. More...
 

Typedefs

typedef bool Boolean
 
typedef int64_t Integer
 
typedef double Float
 
typedef struct object Object
 
typedef struct key_value_pair KeyValuePair
 

Enumerations

enum  ErrorType { kErrorTypeNone = -1, kErrorTypeException, kErrorTypeValidation }
 
enum  MessageType { kMessageTypeUnknown = -1, kMessageTypeRequest = 0, kMessageTypeResponse = 1, kMessageTypeNotification = 2 }
 
enum  ObjectType {
  kObjectTypeNil = 0, kObjectTypeBoolean, kObjectTypeInteger, kObjectTypeFloat,
  kObjectTypeString, kObjectTypeArray, kObjectTypeDictionary, kObjectTypeLuaRef,
  kObjectTypeBuffer, kObjectTypeWindow, kObjectTypeTabpage
}
 

Functions

 REMOTE_TYPE (Buffer)
 
 REMOTE_TYPE (Window)
 
 REMOTE_TYPE (Tabpage)
 

Macro Definition Documentation

#define API_INTEGER_MAX   INT64_MAX

Maximum value of an Integer.

#define API_INTEGER_MIN   INT64_MIN

Minimum value of an Integer.

#define ARRAY_DICT_INIT   {.size = 0, .capacity = 0, .items = NULL}
#define ERROR_INIT   { .type = kErrorTypeNone, .msg = NULL }
#define ERROR_SET (   e)    ((e)->type != kErrorTypeNone)
#define INTERNAL_CALL_MASK   (((uint64_t)1) << (sizeof(uint64_t) * 8 - 1))

Mask for all internal calls.

#define LUA_INTERNAL_CALL   (VIML_INTERNAL_CALL + 1)

Internal call from lua code.

#define OBJECT_INIT   { .type = kObjectTypeNil }
#define REMOTE_TYPE (   type)    typedef handle_T type
#define STRING_INIT   {.data = NULL, .size = 0}
#define VIML_INTERNAL_CALL   INTERNAL_CALL_MASK

Internal call from VimL code.

Typedef Documentation

typedef bool Boolean
typedef double Float
typedef int64_t Integer
typedef struct key_value_pair KeyValuePair
typedef struct object Object

Enumeration Type Documentation

enum ErrorType
Enumerator
kErrorTypeNone 
kErrorTypeException 
kErrorTypeValidation 
Enumerator
kMessageTypeUnknown 
kMessageTypeRequest 
kMessageTypeResponse 
kMessageTypeNotification 
enum ObjectType
Enumerator
kObjectTypeNil 
kObjectTypeBoolean 
kObjectTypeInteger 
kObjectTypeFloat 
kObjectTypeString 
kObjectTypeArray 
kObjectTypeDictionary 
kObjectTypeLuaRef 
kObjectTypeBuffer 
kObjectTypeWindow 
kObjectTypeTabpage 

Function Documentation

REMOTE_TYPE ( Buffer  )
REMOTE_TYPE ( Window  )
REMOTE_TYPE ( Tabpage  )