diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-03-02 17:26:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-02 17:26:50 +0100 |
commit | 7a6da502b9d8deecfc89d1497a8e8da15e65f31e (patch) | |
tree | e3811b52dd00e67175383f11f1b67b42acc88f4c /src/nvim/buffer_defs.h | |
parent | 0aba4d825a5b18c5fa937c0426788f61f756e086 (diff) | |
parent | 9a1675b065394734ddaef91a314896028e2b1d46 (diff) | |
download | rneovim-7a6da502b9d8deecfc89d1497a8e8da15e65f31e.tar.gz rneovim-7a6da502b9d8deecfc89d1497a8e8da15e65f31e.tar.bz2 rneovim-7a6da502b9d8deecfc89d1497a8e8da15e65f31e.zip |
Merge pull request #6619 from bfredl/floating
Floating windows in TUI and Remote UI
Diffstat (limited to 'src/nvim/buffer_defs.h')
-rw-r--r-- | src/nvim/buffer_defs.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index da1e3ce9c6..48cef9b1e7 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -958,6 +958,35 @@ struct matchitem { int conceal_char; ///< cchar for Conceal highlighting }; +typedef enum { + kFloatAnchorEast = 1, + kFloatAnchorSouth = 2, + + kFloatAnchorNW = 0, + kFloatAnchorNE = 1, + kFloatAnchorSW = 2, + kFloatAnchorSE = 3, +} FloatAnchor; + +typedef enum { + kFloatRelativeEditor = 0, + kFloatRelativeWindow = 1, + kFloatRelativeCursor = 2, +} FloatRelative; + +typedef struct { + Window window; + double row, col; + FloatAnchor anchor; + FloatRelative relative; + bool external; + bool focusable; +} FloatConfig; + +#define FLOAT_CONFIG_INIT ((FloatConfig){ .row = 0, .col = 0, .anchor = 0, \ + .relative = 0, .external = false, \ + .focusable = true }) + /* * Structure which contains all information that belongs to a window * @@ -1221,6 +1250,8 @@ struct window_S { ScreenGrid w_grid; // the grid specific to the window bool w_pos_changed; // true if window position changed + bool w_floating; ///< whether the window is floating + FloatConfig w_float_config; /* * w_fraction is the fractional row of the cursor within the window, from |