aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/statusline_defs.h
blob: eac9dfd690a1fe6e37bc63a252b9f98e385bf805 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef NVIM_STATUSLINE_DEFS_H
#define NVIM_STATUSLINE_DEFS_H

#include <stddef.h>

#include "nvim/macros.h"

/// Status line click definition
typedef struct {
  enum {
    kStlClickDisabled = 0,  ///< Clicks to this area are ignored.
    kStlClickTabSwitch,     ///< Switch to the given tab.
    kStlClickTabClose,      ///< Close given tab.
    kStlClickFuncRun,       ///< Run user function.
  } type;      ///< Type of the click.
  int tabnr;   ///< Tab page number.
  char *func;  ///< Function to run.
} StlClickDefinition;

/// Used for tabline clicks
typedef struct {
  StlClickDefinition def;  ///< Click definition.
  const char *start;       ///< Location where region starts.
} StlClickRecord;

#endif  // NVIM_STATUSLINE_DEFS_H