[vte] [stream] Start vte stream design
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vte] [stream] Start vte stream design
- Date: Wed, 16 Sep 2009 02:22:26 +0000 (UTC)
commit 9de9d2de44d4723935176c71f8f09a90f15e678a
Author: Behdad Esfahbod <behdad behdad org>
Date: Sat Sep 12 17:15:04 2009 -0400
[stream] Start vte stream design
New buffer coming!
src/Makefile.am | 2 ++
src/vtestream.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/vtestream.h | 32 ++++++++++++++++++++++++++++++++
3 files changed, 89 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 2dac6e4..97218f8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -75,6 +75,8 @@ libvte_la_SOURCES = \
vteseq-list.h \
vteskel.c \
vteskel.h \
+ vtestream.c \
+ vtestream.h \
vtetc.c \
vtetc.h \
vtetree.c \
diff --git a/src/vtestream.c b/src/vtestream.c
new file mode 100644
index 0000000..705384e
--- /dev/null
+++ b/src/vtestream.c
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#include <config.h>
+
+#include "debug.h"
+#include "vtestream.h"
+
+#include <glib-object.h>
+
+/*
+ * VteStream: Abstract base stream class
+ */
+
+typedef GObject VteStream;
+
+typedef struct _VteStreamClass {
+ void (*add) (const char *data, gsize len);
+ void (*read) (gsize offset, char *data, gsize len);
+ void (*trunc) (gsize len);
+ void (*newpage) (void);
+} VteStreamClass;
+
+static GType _vte_stream_get_type (void);
+#define VTE_TYPE_STREAM _vte_stream_get_type ()
+
+G_DEFINE_ABSTRACT_TYPE (VteStream, _vte_stream, G_TYPE_OBJECT)
+
+static void
+_vte_stream_class_init (VteStreamClass *klass)
+{
+}
+
+static void
+_vte_stream_init (VteStream *stream)
+{
+}
+
diff --git a/src/vtestream.h b/src/vtestream.h
new file mode 100644
index 0000000..65fa892
--- /dev/null
+++ b/src/vtestream.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef vtestream_h_included
+#define vtestream_h_included
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+
+G_END_DECLS
+
+#endif
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]