Data Structures | Functions
ui.c File Reference
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "nvim/vim.h"
#include "nvim/ui.h"
#include "nvim/memory.h"
#include "nvim/map.h"
#include "nvim/msgpack_rpc/channel.h"
#include "nvim/api/ui.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/helpers.h"
#include "nvim/popupmnu.h"
#include "nvim/cursor_shape.h"
#include "nvim/highlight.h"
#include "nvim/screen.h"
#include "nvim/window.h"

Data Structures

struct  UIData
 

Functions

void remote_ui_disconnect (uint64_t channel_id) FUNC_API_NOEXPORT
 
void remote_ui_wait_for_attach (void)
 Wait until ui has connected on stdio channel. More...
 
void nvim_ui_attach (uint64_t channel_id, Integer width, Integer height, Dictionary options, Error *err) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY
 
void ui_attach (uint64_t channel_id, Integer width, Integer height, Boolean enable_rgb, Error *err)
 
void nvim_ui_detach (uint64_t channel_id, Error *err) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY
 
void nvim_ui_try_resize (uint64_t channel_id, Integer width, Integer height, Error *err) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY
 
void nvim_ui_set_option (uint64_t channel_id, String name, Object value, Error *error) FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY
 
void nvim_ui_try_resize_grid (uint64_t channel_id, Integer grid, Integer width, Integer height, Error *err) FUNC_API_SINCE(6) FUNC_API_REMOTE_ONLY
 

Function Documentation

void nvim_ui_attach ( uint64_t  channel_id,
Integer  width,
Integer  height,
Dictionary  options,
Error err 
)

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.
Parameters
channel_id
widthRequested screen columns
heightRequested screen rows
options|ui-option| map
[out]errError details, if any
void nvim_ui_detach ( uint64_t  channel_id,
Error err 
)

Deactivates UI events on the channel.

Removes the client from the list of UIs. |nvim_list_uis()|

Parameters
channel_id
[out]errError details, if any
void nvim_ui_set_option ( uint64_t  channel_id,
String  name,
Object  value,
Error error 
)
void nvim_ui_try_resize ( uint64_t  channel_id,
Integer  width,
Integer  height,
Error err 
)
void nvim_ui_try_resize_grid ( uint64_t  channel_id,
Integer  grid,
Integer  width,
Integer  height,
Error err 
)

Tell Nvim to resize a grid. Triggers a grid_resize event with the requested grid size or the maximum size if it exceeds size limits.

On invalid grid handle, fails with error.

Parameters
channel_id
gridThe handle of the grid to be changed.
widthThe new requested width.
heightThe new requested height.
[out]errError details, if any
void remote_ui_disconnect ( uint64_t  channel_id)
void remote_ui_wait_for_attach ( void  )

Wait until ui has connected on stdio channel.

void ui_attach ( uint64_t  channel_id,
Integer  width,
Integer  height,
Boolean  enable_rgb,
Error err 
)