6 * Copyright (C) 2018 Richard Russon <rich@flatcap.org>
9 * This program is free software: you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License as published by the Free Software
11 * Foundation, either version 2 of the License, or (at your option) any later
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19 * You should have received a copy of the GNU General Public License along with
20 * this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef MUTT_MUTT_WINDOW_H
24 #define MUTT_MUTT_WINDOW_H
29 * struct MuttWindow - A division of the screen
31 * Windows for different parts of the screen
41 extern struct MuttWindow *MuttHelpWindow;
42 extern struct MuttWindow *MuttIndexWindow;
43 extern struct MuttWindow *MuttMessageWindow;
45 extern struct MuttWindow *MuttSidebarWindow;
47 extern struct MuttWindow *MuttStatusWindow;
49 // Functions that deal with the Window
50 void mutt_window_copy_size (const struct MuttWindow *win_src, struct MuttWindow *win_dst);
51 void mutt_window_free (struct MuttWindow **ptr);
52 void mutt_window_free_all (void);
53 void mutt_window_get_coords (struct MuttWindow *win, int *col, int *row);
54 void mutt_window_init (void);
55 struct MuttWindow *mutt_window_new (void);
56 void mutt_window_reflow (void);
57 void mutt_window_reflow_message_rows(int mw_rows);
58 int mutt_window_wrap_cols (int width, short wrap);
60 // Functions for drawing on the Window
61 int mutt_window_addch (int ch);
62 int mutt_window_addnstr (const char *str, int num);
63 int mutt_window_addstr (const char *str);
64 void mutt_window_clear_screen(void);
65 void mutt_window_clearline(struct MuttWindow *win, int row);
66 void mutt_window_clrtobot (void);
67 void mutt_window_clrtoeol (struct MuttWindow *win);
68 int mutt_window_move (struct MuttWindow *win, int row, int col);
69 void mutt_window_move_abs (int row, int col);
70 int mutt_window_mvaddstr (struct MuttWindow *win, int row, int col, const char *str);
71 int mutt_window_mvprintw (struct MuttWindow *win, int row, int col, const char *fmt, ...);
72 int mutt_window_printf (const char *format, ...);
74 #endif /* MUTT_MUTT_WINDOW_H */