api/ui: externalize tabline

- Work with a bool[] array parallel to the UIWidget enum.
- Rename some functions.
- Documentation.
This commit is contained in:
Justin M. Keyes
2017-04-25 02:17:15 +02:00
parent 88023d5123
commit 00843902d3
12 changed files with 124 additions and 96 deletions

View File

@@ -8,12 +8,13 @@
#include "api/private/defs.h"
#include "nvim/buffer_defs.h"
// values for externalized widgets
typedef enum {
kUICmdline = 0,
kUIPopupmenu,
kUITabline,
kUICmdline,
kUIWildmenu
kUIWildmenu,
} UIWidget;
#define UI_WIDGETS (kUIWildmenu + 1)
typedef struct {
bool bold, underline, undercurl, italic, reverse;
@@ -23,7 +24,8 @@ typedef struct {
typedef struct ui_t UI;
struct ui_t {
bool rgb, pum_external, tabline_external;
bool rgb;
bool ui_ext[UI_WIDGETS]; ///< Externalized widgets
int width, height;
void *data;
void (*resize)(UI *ui, int rows, int columns);