Got Gtk-Doc working. Now all the fancy /** comments before the functions
[rodin/chimara.git] / src / window.h
1 #ifndef WINDOW_H
2 #define WINDOW_H
3
4 #include <gtk/gtk.h>
5 #include "glk.h"
6
7 #include "stream.h"
8 #include "error.h"
9 #include "callbacks.h"
10 #include "input.h"
11
12 enum InputRequestType
13 {
14         INPUT_REQUEST_NONE,
15         INPUT_REQUEST_CHARACTER,
16         INPUT_REQUEST_CHARACTER_UNICODE,
17         INPUT_REQUEST_LINE,
18         INPUT_REQUEST_LINE_UNICODE
19 };
20
21 /**
22  * glk_window_struct:
23  *
24  * This is an opaque structure (see <link linkend="chimara-Opaque-Structures">
25  * Opaque Structures</link> and should not be accessed directly.
26  */
27 struct glk_window_struct
28 {
29         /*< private >*/
30         glui32 rock;
31         /* Pointer to the node in the global tree that contains this window */
32         GNode *window_node;
33         /* Window parameters */
34         glui32 type;
35         /* "widget" is the actual widget with the window's functionality */
36         GtkWidget *widget;
37         /* "frame" is the widget that is the child of the ChimaraGlk container, such 
38         as a scroll window. It may be the same as "widget". */
39         GtkWidget *frame;
40         /* Width and height of the window's size units, in pixels */
41         int unit_width;
42         int unit_height;
43         /* Streams associated with the window */
44         strid_t window_stream;
45         strid_t echo_stream;
46         /* Width and height of the window, in characters (text grids only) */
47         glui32 width;
48         glui32 height;
49         /* Input request stuff */
50         enum InputRequestType input_request_type;
51         gchar *line_input_buffer;
52         glui32 *line_input_buffer_unicode;
53         glui32 line_input_buffer_max_len;
54         gboolean mouse_input_requested;
55         /* Line input field (text grids only) */
56         glui32 input_length;
57         GtkTextChildAnchor *input_anchor;
58         GtkWidget *input_entry;
59         /* Signal handlers */
60         gulong keypress_handler;
61         gulong insert_text_handler;
62 };
63
64 #endif