mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 03:16:31 +00:00
doc: UI
This commit is contained in:
@@ -97,7 +97,7 @@ String buffer_get_line(Buffer buffer, Integer index, Error *err)
|
||||
return rv;
|
||||
}
|
||||
|
||||
/// Activate updates from this buffer to the current channel.
|
||||
/// Activates buffer-update events on the channel.
|
||||
///
|
||||
/// @param channel_id
|
||||
/// @param buffer Buffer handle, or 0 for current buffer
|
||||
@@ -106,7 +106,7 @@ String buffer_get_line(Buffer buffer, Integer index, Error *err)
|
||||
/// `nvim_buf_lines_event`. Otherwise, the first notification will be
|
||||
/// a `nvim_buf_changedtick_event`
|
||||
/// @param opts Optional parameters. Reserved for future use.
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
/// @param[out] err Error details, if any
|
||||
/// @return False when updates couldn't be enabled because the buffer isn't
|
||||
/// loaded or `opts` contained an invalid key; otherwise True.
|
||||
Boolean nvim_buf_attach(uint64_t channel_id,
|
||||
@@ -129,12 +129,12 @@ Boolean nvim_buf_attach(uint64_t channel_id,
|
||||
|
||||
return buf_updates_register(buf, channel_id, send_buffer);
|
||||
}
|
||||
//
|
||||
/// Deactivate updates from this buffer to the current channel.
|
||||
|
||||
/// Deactivates buffer-update events on the channel.
|
||||
///
|
||||
/// @param channel_id
|
||||
/// @param buffer Buffer handle, or 0 for current buffer
|
||||
/// @param[out] err Details of an error that may have occurred
|
||||
/// @param[out] err Error details, if any
|
||||
/// @return False when updates couldn't be disabled because the buffer
|
||||
/// isn't loaded; otherwise True.
|
||||
Boolean nvim_buf_detach(uint64_t channel_id,
|
||||
|
@@ -76,6 +76,21 @@ void remote_ui_wait_for_attach(void)
|
||||
pmap_has(uint64_t)(connected_uis, CHAN_STDIO));
|
||||
}
|
||||
|
||||
/// Activates UI events on the channel.
|
||||
///
|
||||
/// Entry point of all UI clients. Allows |\-\-embed| to continue startup.
|
||||
/// Implies that the client is ready to show the UI. Adds the client to the
|
||||
/// list of UIs. |nvim_list_uis()|
|
||||
///
|
||||
/// @note If multiple UI clients are attached, the global screen dimensions
|
||||
/// degrade to the smallest client. E.g. if client A requests 80x40 but
|
||||
/// client B requests 200x100, the global screen has size 80x40.
|
||||
///
|
||||
/// @param channel_id
|
||||
/// @param width Requested screen columns
|
||||
/// @param height Requested screen rows
|
||||
/// @param options |ui-options| map
|
||||
/// @param[out] err Error details, if any
|
||||
void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height,
|
||||
Dictionary options, Error *err)
|
||||
FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY
|
||||
@@ -164,6 +179,12 @@ void ui_attach(uint64_t channel_id, Integer width, Integer height,
|
||||
api_free_dictionary(opts);
|
||||
}
|
||||
|
||||
/// Deactivates UI events on the channel.
|
||||
///
|
||||
/// Removes the client from the list of UIs. |nvim_list_uis()|
|
||||
///
|
||||
/// @param channel_id
|
||||
/// @param[out] err Error details, if any
|
||||
void nvim_ui_detach(uint64_t channel_id, Error *err)
|
||||
FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY
|
||||
{
|
||||
|
Reference in New Issue
Block a user