Don't crash if key settings are set in a configuration file that are out of range...
[chocolate-doom.git] / textscreen / txt_desktop.h
blob95343977c1d72a2bce0de28901d5b7b057cafc91
1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // Copyright(C) 2006 Simon Howard
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 // 02111-1307, USA.
22 #ifndef TXT_DESKTOP_H
23 #define TXT_DESKTOP_H
25 /**
26 * @file txt_desktop.h
28 * Textscreen desktop.
31 #include "txt_window.h"
33 void TXT_AddDesktopWindow(txt_window_t *win);
34 void TXT_RemoveDesktopWindow(txt_window_t *win);
35 void TXT_DrawDesktop(void);
36 void TXT_DispatchEvents(void);
37 void TXT_DrawWindow(txt_window_t *window, int selected);
38 void TXT_WindowKeyPress(txt_window_t *window, int c);
40 /**
41 * Set the title displayed at the top of the screen.
43 * @param title The title to display.
46 void TXT_SetDesktopTitle(char *title);
48 /**
49 * Exit the currently-running main loop and return from the
50 * @ref TXT_GUIMainLoop function.
53 void TXT_ExitMainLoop(void);
55 /**
56 * Start the main event loop. At least one window must have been
57 * opened prior to running this function. When no windows are left
58 * open, the event loop exits.
60 * It is possible to trigger an exit from this function using the
61 * @ref TXT_ExitMainLoop function.
64 void TXT_GUIMainLoop(void);
66 #endif /* #ifndef TXT_DESKTOP_H */