sign_defs.h
Go to the documentation of this file.
1 #ifndef NVIM_SIGN_DEFS_H
2 #define NVIM_SIGN_DEFS_H
3 
4 #include "nvim/pos.h"
5 #include "nvim/types.h"
6 
7 // signs: line annotations
8 
9 // Sign group
10 typedef struct signgroup_S
11 {
12  uint16_t refcount; // number of signs in this group
13  int next_sign_id; // next sign id for this group
14  char_u sg_name[1]; // sign group name
15 } signgroup_T;
16 
17 // Macros to get the sign group structure from the group name
18 #define SGN_KEY_OFF offsetof(signgroup_T, sg_name)
19 #define HI2SG(hi) ((signgroup_T *)((hi)->hi_key - SGN_KEY_OFF))
20 
21 typedef struct signlist signlist_T;
22 
23 struct signlist
24 {
25  int id; // unique identifier for each placed sign
26  linenr_T lnum; // line number which has this sign
27  int typenr; // typenr of sign
28  signgroup_T *group; // sign group
29  int priority; // priority for highlighting
30  signlist_T *next; // next signlist entry
31  signlist_T *prev; // previous entry -- for easy reordering
32 };
33 
34 // Default sign priority for highlighting
35 #define SIGN_DEF_PRIO 10
36 
37 // type argument for buf_getsigntype() and sign_get_attr()
38 typedef enum {
44 } SignType;
45 
46 
47 
48 #endif // NVIM_SIGN_DEFS_H
int typenr
Definition: sign_defs.h:27
int id
Definition: sign_defs.h:25
int priority
Definition: sign_defs.h:29
char_u sg_name[1]
Definition: sign_defs.h:14
Definition: sign_defs.h:42
Definition: sign_defs.h:39
signgroup_T * group
Definition: sign_defs.h:28
Definition: sign_defs.h:10
Definition: sign_defs.h:41
signlist_T * next
Definition: sign_defs.h:30
Definition: sign_defs.h:40
int next_sign_id
Definition: sign_defs.h:13
uint16_t refcount
Definition: sign_defs.h:12
struct signgroup_S signgroup_T
SignType
Definition: sign_defs.h:38
signlist_T * prev
Definition: sign_defs.h:31
long linenr_T
Definition: pos.h:4
linenr_T lnum
Definition: sign_defs.h:26
Definition: sign_defs.h:43
unsigned char char_u
Definition: types.h:11
Definition: sign_defs.h:23