From: Richard Russon Date: Fri, 27 Sep 2019 12:16:15 +0000 (+0100) Subject: refactor: move KeyEvent out of mutt_curses.h X-Git-Tag: 2019-10-25~30^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=240e53ed1d704432590b32219c1410b414dedb52;p=neomutt refactor: move KeyEvent out of mutt_curses.h KeyEvent doesn't belong in mutt_curses.h. --- diff --git a/curs_lib.h b/curs_lib.h index 70c8bc5ce..4bfaabd62 100644 --- a/curs_lib.h +++ b/curs_lib.h @@ -29,6 +29,7 @@ #include "config/lib.h" #include "mutt.h" #include "browser.h" +#include "keymap.h" #include "pager.h" struct Buffer; diff --git a/keymap.h b/keymap.h index 138f9216a..0ef9ed64d 100644 --- a/keymap.h +++ b/keymap.h @@ -54,6 +54,15 @@ struct Keymap keycode_t *keys; /**< key sequence */ }; +/** + * struct KeyEvent - An event such as a keypress + */ +struct KeyEvent +{ + int ch; ///< raw key pressed + int op; ///< function op +}; + /** * enum MenuType - Types of GUI selections */ diff --git a/mutt.h b/mutt.h index 84cb22a19..c876e0768 100644 --- a/mutt.h +++ b/mutt.h @@ -27,11 +27,9 @@ #include "config.h" #include #include -#include #include #include #include "config/lib.h" -#include "email/lib.h" #include "hook.h" #include "keymap.h" #include "mutt_commands.h" diff --git a/mutt_curses.h b/mutt_curses.h index b5e47d6a3..b6a893f41 100644 --- a/mutt_curses.h +++ b/mutt_curses.h @@ -101,15 +101,6 @@ void mutt_curs_set(int cursor); #define CI_is_return(ch) (((ch) == '\r') || ((ch) == '\n')) #endif -/** - * struct KeyEvent - An event such as a keypress - */ -struct KeyEvent -{ - int ch; /**< raw key pressed */ - int op; /**< function op */ -}; - void mutt_resize_screen(void); /* If the system has bkgdset() use it rather than attrset() so that the clr*() diff --git a/mutt_parse.h b/mutt_parse.h index f4a5ab476..6fff1f807 100644 --- a/mutt_parse.h +++ b/mutt_parse.h @@ -23,9 +23,10 @@ #ifndef MUTT_MUTT_PARSE_H #define MUTT_MUTT_PARSE_H -#include "mutt/queue.h" +#include +#include "mutt/mutt.h" +#include "email/lib.h" -struct Email; struct Mailbox; /**