Data Structures | Macros | Typedefs | Enumerations | Functions
defs.h File Reference
#include <stdbool.h>
#include <stdint.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
 
struct  KeySetLink
 

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
 
typedef Object *(* field_hash) (void *retval, const char *str, size_t len)
 

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

◆ API_INTEGER_MAX

#define API_INTEGER_MAX   INT64_MAX

Maximum value of an Integer.

◆ API_INTEGER_MIN

#define API_INTEGER_MIN   INT64_MIN

Minimum value of an Integer.

◆ ARRAY_DICT_INIT

#define ARRAY_DICT_INIT   { .size = 0, .capacity = 0, .items = NULL }

◆ ERROR_INIT

#define ERROR_INIT   { .type = kErrorTypeNone, .msg = NULL }

◆ ERROR_SET

#define ERROR_SET (   e)    ((e)->type != kErrorTypeNone)

◆ INTERNAL_CALL_MASK

#define INTERNAL_CALL_MASK   (((uint64_t)1) << (sizeof(uint64_t) * 8 - 1))

Mask for all internal calls.

◆ LUA_INTERNAL_CALL

#define LUA_INTERNAL_CALL   (VIML_INTERNAL_CALL + 1)

Internal call from lua code.

◆ OBJECT_INIT

#define OBJECT_INIT   { .type = kObjectTypeNil }

◆ REMOTE_TYPE

#define REMOTE_TYPE (   type)    typedef handle_T type

◆ STRING_INIT

#define STRING_INIT   { .data = NULL, .size = 0 }

◆ VIML_INTERNAL_CALL

#define VIML_INTERNAL_CALL   INTERNAL_CALL_MASK

Internal call from VimL code.

Typedef Documentation

◆ Boolean

typedef bool Boolean

◆ field_hash

typedef Object*(* field_hash) (void *retval, const char *str, size_t len)

◆ Float

typedef double Float

◆ Integer

typedef int64_t Integer

◆ KeyValuePair

typedef struct key_value_pair KeyValuePair

◆ Object

typedef struct object Object

Enumeration Type Documentation

◆ ErrorType

enum ErrorType
Enumerator
kErrorTypeNone 
kErrorTypeException 
kErrorTypeValidation 

◆ MessageType

Enumerator
kMessageTypeUnknown 
kMessageTypeRequest 
kMessageTypeResponse 
kMessageTypeNotification 

◆ ObjectType

enum ObjectType
Enumerator
kObjectTypeNil 
kObjectTypeBoolean 
kObjectTypeInteger 
kObjectTypeFloat 
kObjectTypeString 
kObjectTypeArray 
kObjectTypeDictionary 
kObjectTypeLuaRef 
kObjectTypeBuffer 
kObjectTypeWindow 
kObjectTypeTabpage 

Function Documentation

◆ REMOTE_TYPE() [1/3]

REMOTE_TYPE ( Buffer  )

◆ REMOTE_TYPE() [2/3]

REMOTE_TYPE ( Tabpage  )

◆ REMOTE_TYPE() [3/3]

REMOTE_TYPE ( Window  )