Got Gtk-Doc working. Now all the fancy /** comments before the functions
[projects/chimara/chimara.git] / src / stream.h
index fb7eb8f7bc53814a376d897318bfa044315924b1..25c052e072fc968dae7d2c5d39dc55259d5d6aa8 100644 (file)
@@ -9,27 +9,42 @@ enum StreamType
 {
        STREAM_TYPE_WINDOW,
        STREAM_TYPE_MEMORY,
-       STREAM_TYPE_FILE,
-       STREAM_TYPE_UNICODE_MEMORY,
-       STREAM_TYPE_UNICODE_FILE,
+       STREAM_TYPE_FILE
 };
 
+/**
+ * glk_stream_struct:
+ *
+ * This is an opaque structure (see <link linkend="chimara-Opaque-Structures">
+ * Opaque Structures</link> and should not be accessed directly.
+ */
 struct glk_stream_struct
 {
-       GList* stream_list;
-
+       /*< private >*/
        glui32 rock;
+       /* Pointer to the list node in the global stream list that contains this
+       stream */
+       GList* stream_list;
+       /* Stream parameters */
        glui32 file_mode;
        glui32 read_count;
        glui32 write_count;
-       enum StreamType stream_type;
+       enum StreamType type;
+       /* Specific to window stream: the window this stream is connected to */
        winid_t window;
-       gchar *memory_buffer;
-       glui32 *memory_buffer_unicode;
-       glui32 buffer_len;
+       /* For memory and file streams */
+       gboolean unicode;
+       /* Specific to memory streams */
+       gchar *buffer;
+       glui32 *ubuffer;
+       glui32 mark;
+       glui32 buflen;
+       /* Specific to file streams */
+       FILE *file_pointer;
+       gboolean binary;
+       gchar *filename; /* Displayable filename in UTF-8 for error handling */
 };
 
-
 strid_t window_stream_new(winid_t window);
-
+void stream_close_common(strid_t str, stream_result_t *result);
 #endif