1 #ifndef __ICON_WINDOW_H
2 #define __ICON_WINDOW_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include "platform.h"
9 
10 extern int	icons_win;	/*!< the icon window id  */
11 
12 typedef enum { NEW_CHARACTER_ICONS=1, MAIN_WINDOW_ICONS=2 } icon_window_mode; /*!< possible icom window modes  */
13 
14 
15 /*!
16  * \ingroup windows
17  * \brief Reload the icon window from file.
18  *
19  * \param	all ignored
20  * \return	always 1
21  * \callgraph
22  */
23 int reload_icon_window(char *text, int len);
24 
25 
26 /*!
27  * \ingroup windows
28  * \brief Return the current width of the icon window.
29  *
30  * \callgraph
31  */
32 int get_icons_win_active_len(void);
33 
34 
35 /*!
36  * \ingroup windows
37  * \brief Return the current height of the icon window.
38  *
39  * \callgraph
40  */
41 int get_icons_win_active_height(void);
42 
43 
44 /*!
45  * \ingroup windows
46  * \brief Initialise the icon window to the specified mode.
47  *
48  * \param	icon_mode	The new icom mode.
49  *
50  * \callgraph
51  */
52 void init_icon_window(icon_window_mode icon_mode);
53 
54 
55 /*!
56  * \ingroup windows
57  * \brief Flash an icon.
58  *
59  *      Makes the specified icon flash between pressed/not press state.
60  *
61  * \param	title	the help text of the icon (to find it in the list).
62  * \param	seconds	The number of seconds to flash.
63  *
64  * \callgraph
65  */
66 void flash_icon(const char* name, Uint32 seconds);
67 
68 
69 /*!
70  * \ingroup windows
71  * \brief Set the icon size.
72  *
73  *      Set the icon size.  Can be called before creating the icon window.
74  * If called after creation, the hud and root windows will need resizing
75  * which must include recalling the init_icon_window() function. The
76  * global_scaling factor will be applied.
77  *
78  * \param	icon_size	the size in pixels of one icon, both height & width.
79  *
80  * \callgraph
81  */
82 void set_icon_size(int icon_size);
83 
84 
85 /*!
86  * \ingroup windows
87  * \brief Set the spacing between icons.
88  *
89  *      Set the spacing between icons. If other hud compoents use the
90  * latest window width using get_icons_win_active_len(), no further
91  * resizing should be necessary.  The global_scaling factor will be applied.
92  *
93  * \param	icon_spacing	The size in pixels of the space between icons.
94  *
95  * \callgraph
96  */
97 void set_icon_spacing(int icon_spacing);
98 
99 
100 /*!
101  * \ingroup windows
102  * \brief Destroy the icon window.
103  * \callgraph
104  */
105 void destroy_icon_window(void);
106 
107 
108 /*!
109  * \ingroup windows
110  * \brief Enable or disable an icon in the icon window.
111  *
112  * \param	help_name	the help name of the window.
113  * \param	enabled		true of we want to icon enabled.
114  * \callgraph
115  */
116 void set_icon_state(const char *help_name, int enabled);
117 
118 
119 #ifdef __cplusplus
120 } // extern "C"
121 #endif
122 
123 #endif
124