first.c compilet en draait!
[projects/chimara/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 struct glk_window_struct
22 {
23         glui32 rock;
24         /* Pointer to the node in the global tree that contains this window */
25         GNode *window_node;
26         /* Window parameters */
27         glui32 window_type;
28         GtkWidget *widget;
29         strid_t window_stream;
30         strid_t echo_stream;
31         /* Input request stuff */
32         enum InputRequestType input_request_type;
33         gchar *line_input_buffer;
34         glui32 *line_input_buffer_unicode;
35         glui32 line_input_buffer_max_len;
36         gboolean mouse_input_requested;
37         gulong keypress_handler;
38         gulong insert_text_handler;
39 };
40
41 #endif