aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.h
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-29 22:39:54 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-29 22:39:54 +0000
commit21cb7d04c387e4198ca8098a884c78b56ffcf4c2 (patch)
tree84fe5690df1551f0bb2bdfe1a13aacd29ebc1de7 /src/nvim/window.h
parentd9c904f85a23a496df4eb6be42aa43f007b22d50 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-colorcolchar.tar.gz
rneovim-colorcolchar.tar.bz2
rneovim-colorcolchar.zip
Merge remote-tracking branch 'upstream/master' into colorcolcharcolorcolchar
Diffstat (limited to 'src/nvim/window.h')
-rw-r--r--src/nvim/window.h83
1 files changed, 44 insertions, 39 deletions
diff --git a/src/nvim/window.h b/src/nvim/window.h
index 4ab2bea60a..3650fef46e 100644
--- a/src/nvim/window.h
+++ b/src/nvim/window.h
@@ -1,44 +1,49 @@
-#ifndef NVIM_WINDOW_H
-#define NVIM_WINDOW_H
+#pragma once
#include <stdbool.h>
-#include <stddef.h>
-
-#include "nvim/buffer.h"
-#include "nvim/buffer_defs.h"
-#include "nvim/macros.h"
-#include "nvim/mark.h"
-#include "nvim/os/os.h"
-#include "nvim/os/os_defs.h"
-#include "nvim/vim.h"
-
-// Values for file_name_in_line()
-#define FNAME_MESS 1 // give error message
-#define FNAME_EXP 2 // expand to path
-#define FNAME_HYP 4 // check for hypertext link
-#define FNAME_INCL 8 // apply 'includeexpr'
-#define FNAME_REL 16 // ".." and "./" are relative to the (current)
- // file instead of the current directory
-#define FNAME_UNESC 32 // remove backslashes used for escaping
-
-// arguments for win_split()
-#define WSP_ROOM 0x01 // require enough room
-#define WSP_VERT 0x02 // split/equalize vertically
-#define WSP_HOR 0x04 // equalize horizontally
-#define WSP_TOP 0x08 // window at top-left of shell
-#define WSP_BOT 0x10 // window at bottom-right of shell
-#define WSP_HELP 0x20 // creating the help window
-#define WSP_BELOW 0x40 // put new window below/right
-#define WSP_ABOVE 0x80 // put new window above/left
-#define WSP_NEWLOC 0x100 // don't copy location list
-
-// Minimum screen size
-#define MIN_COLUMNS 12 // minimal columns for screen
-#define MIN_LINES 2 // minimal lines for screen
-
-// Set to true if 'cmdheight' was explicitly set to 0.
-EXTERN bool p_ch_was_zero INIT(= false);
+
+#include "nvim/buffer_defs.h" // IWYU pragma: keep
+#include "nvim/garray_defs.h" // IWYU pragma: keep
+#include "nvim/macros_defs.h"
+#include "nvim/option_defs.h" // IWYU pragma: keep
+#include "nvim/types_defs.h" // IWYU pragma: keep
+
+/// Values for file_name_in_line()
+enum {
+ FNAME_MESS = 1, ///< give error message
+ FNAME_EXP = 2, ///< expand to path
+ FNAME_HYP = 4, ///< check for hypertext link
+ FNAME_INCL = 8, ///< apply 'includeexpr'
+ FNAME_REL = 16, ///< ".." and "./" are relative to the (current)
+ ///< file instead of the current directory
+ FNAME_UNESC = 32, ///< remove backslashes used for escaping
+};
+
+/// arguments for win_split()
+enum {
+ WSP_ROOM = 0x01, ///< require enough room
+ WSP_VERT = 0x02, ///< split/equalize vertically
+ WSP_HOR = 0x04, ///< equalize horizontally
+ WSP_TOP = 0x08, ///< window at top-left of shell
+ WSP_BOT = 0x10, ///< window at bottom-right of shell
+ WSP_HELP = 0x20, ///< creating the help window
+ WSP_BELOW = 0x40, ///< put new window below/right
+ WSP_ABOVE = 0x80, ///< put new window above/left
+ WSP_NEWLOC = 0x100, ///< don't copy location list
+};
+
+enum {
+ MIN_COLUMNS = 12, ///< minimal columns for screen
+ MIN_LINES = 2, ///< minimal lines for screen
+ STATUS_HEIGHT = 1, ///< height of a status line under a window
+};
+
+/// Lowest number used for window ID. Cannot have this many windows per tab.
+enum { LOWEST_WIN_ID = 1000, };
+
+/// Set to true if 'cmdheight' was explicitly set to 0.
+EXTERN bool p_ch_was_zero INIT( = false);
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "window.h.generated.h"
#endif
-#endif // NVIM_WINDOW_H