diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-12-27 19:30:23 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-06-11 00:08:27 +0200 |
commit | f72f638f976347e2f14fc6ae5e5293c02d5ccfc1 (patch) | |
tree | 260e270e1cdb9a60e63b52d170ce305e4150686a /runtime/doc/api.txt | |
parent | c69ea3b4b8aa8e6f3a756a49fc43a798b77f7eff (diff) | |
download | rneovim-f72f638f976347e2f14fc6ae5e5293c02d5ccfc1.tar.gz rneovim-f72f638f976347e2f14fc6ae5e5293c02d5ccfc1.tar.bz2 rneovim-f72f638f976347e2f14fc6ae5e5293c02d5ccfc1.zip |
doc: job/channel, misc #7783
doc: termios defaults. ref #6992
doc: :help shell-powershell
doc: provider: Python minimum version is 2.7, 3.4
doc: remove :!start special-case. #5844
doc: mention #7917 change which accepts empty Array for Dictionary parameter
doc: <Cmd> pseudokey
doc: lmap change #5658
doc: -s, -es
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r-- | runtime/doc/api.txt | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 6c730ae6cd..c5421ca86e 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -16,26 +16,23 @@ Applications can also embed libnvim to work with the C API directly. ============================================================================== API Types *api-types* -Nvim's C API uses custom types for all functions. Some are just typedefs -around C99 standard types, and some are Nvim-defined data structures. +The Nvim C API defines custom types for all function parameters. Some are just +typedefs around C99 standard types, others are Nvim-defined data structures. -Boolean -> bool -Integer (signed 64-bit integer) -> int64_t -Float (IEEE 754 double precision) -> double -String -> {char* data, size_t size} struct - -Additionally, the following data structures are defined: - -Array -Dictionary -Object + Boolean -> bool + Integer (signed 64-bit integer) -> int64_t + Float (IEEE 754 double precision) -> double + String -> {char* data, size_t size} struct + Array + Dictionary + Object The following handle types are defined as integer typedefs, but are discriminated as separate types in an Object: -Buffer -> enum value kObjectTypeBuffer -Window -> enum value kObjectTypeWindow -Tabpage -> enum value kObjectTypeTabpage + Buffer -> enum value kObjectTypeBuffer + Window -> enum value kObjectTypeWindow + Tabpage -> enum value kObjectTypeTabpage ============================================================================== API metadata *api-metadata* @@ -60,10 +57,14 @@ External programs ("clients") can use the metadata to discover the |rpc-api|. ============================================================================== API contract *api-contract* -The API is made of functions and events. Clients call functions like those -described at |api-global|, and may "attach" to receive rich |ui-events|. +The Nvim API is composed of functions and events. + +- Clients call functions like those described at |api-global|. +- Clients can subscribe to |ui-events|, |api-buffer-updates|, etc. +- API function names are prefixed with "nvim_". +- API event names are prefixed with "nvim_" and suffixed with "_event". -As Nvim develops, its API may change only according the following "contract": +As Nvim evolves the API may change in compliance with this CONTRACT: - New functions and events may be added. - Any such extensions are OPTIONAL: old clients may ignore them. |