aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/demo/e-test-model.h
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-03-12 23:32:47 +0800
committerChris Lahey <clahey@src.gnome.org>2000-03-12 23:32:47 +0800
commit1a038d63a03504de4587bc001367e206fbe4df64 (patch)
tree9d88b9343a82b128929b183d9dc5dc149138cfa6 /addressbook/demo/e-test-model.h
parent5adb1dedf6e2fedd68edecc67f8badb28994dce7 (diff)
downloadgsoc2013-evolution-1a038d63a03504de4587bc001367e206fbe4df64.tar
gsoc2013-evolution-1a038d63a03504de4587bc001367e206fbe4df64.tar.gz
gsoc2013-evolution-1a038d63a03504de4587bc001367e206fbe4df64.tar.bz2
gsoc2013-evolution-1a038d63a03504de4587bc001367e206fbe4df64.tar.lz
gsoc2013-evolution-1a038d63a03504de4587bc001367e206fbe4df64.tar.xz
gsoc2013-evolution-1a038d63a03504de4587bc001367e206fbe4df64.tar.zst
gsoc2013-evolution-1a038d63a03504de4587bc001367e206fbe4df64.zip
Added e-text-test.
2000-03-12 Christopher James Lahey <clahey@helixcode.com> * widgets/e-text/.cvsignore: Added e-text-test. * addressbook/demo/e-test-model.c, addressbook/demo/e-test-model.h: A model storing data in an array of Address objects. * addressbook/demo/demo.c: Changed to use addressbook/demo/e-test-model.c and addressbook/demo/e-test-model.h. * addressbook/demo/Makefile.am: Added e-test-model.c and e-test-model.h. svn path=/trunk/; revision=2104
Diffstat (limited to 'addressbook/demo/e-test-model.h')
-rw-r--r--addressbook/demo/e-test-model.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/addressbook/demo/e-test-model.h b/addressbook/demo/e-test-model.h
new file mode 100644
index 0000000000..dd3f8e0fa9
--- /dev/null
+++ b/addressbook/demo/e-test-model.h
@@ -0,0 +1,64 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+#ifndef _E_TEST_MODEL_H_
+#define _E_TEST_MODEL_H_
+
+#include "e-table-model.h"
+
+#define E_TEST_MODEL_TYPE (e_test_model_get_type ())
+#define E_TEST_MODEL(o) (GTK_CHECK_CAST ((o), E_TEST_MODEL_TYPE, ETestModel))
+#define E_TEST_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_TEST_MODEL_TYPE, ETestModelClass))
+#define E_IS_TEST_MODEL(o) (GTK_CHECK_TYPE ((o), E_TEST_MODEL_TYPE))
+#define E_IS_TEST_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TEST_MODEL_TYPE))
+
+/* Virtual Column list:
+ 0 Email
+ 1 Full Name
+ 2 Street
+ 3 Phone
+*/
+typedef struct _Address Address;
+typedef enum _Rows Rows;
+
+
+struct _Address {
+ gchar *email;
+ gchar *full_name;
+ gchar *street;
+ gchar *phone;
+};
+
+enum _Rows {
+ EMAIL,
+ FULL_NAME,
+ STREET,
+ PHONE,
+ LAST_COL
+};
+
+
+
+typedef struct {
+ ETableModel parent;
+
+ Address **data;
+ int data_count;
+
+ char *filename;
+ int idle;
+} ETestModel;
+
+
+typedef struct {
+ ETableModelClass parent_class;
+} ETestModelClass;
+
+
+GtkType e_test_model_get_type (void);
+ETableModel *e_test_model_new (char *filename);
+
+void e_test_model_queue_save(ETestModel *model);
+void e_test_model_add_column (ETestModel *model, Address *newadd);
+
+
+#endif /* _E_TEST_MODEL_H_ */
+