public
Description: A Clutter-based Twitter client
Homepage: http://live.gnome.org/Tweet
Clone URL: git://github.com/ebassi/tweet.git
Search Repo:
ListView subclass for showing statuses

The final piece of the puzzle: a TidyListView subclass that shows
the contents of a TweetStatusModel using the status renderer object.
Emmanuele Bassi (author)
Thu Apr 17 21:42:53 -0700 2008
commit  0f5efb5395c294de8dd407e3cc926552d5bbdb51
tree    eb5fc9c7931bcd64526c0fb765142abf77addc38
parent  f90be91e9b0bd78909717de7185e297d5ea7a4a3
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
0
@@ -1 +1,79 @@
0
+#ifdef HAVE_CONFIG_H
0
+#include "config.h"
0
+#endif
0
+
0
+#include <stdlib.h>
0
+#include <string.h>
0
+
0
+#include <glib.h>
0
+
0
+#include <clutter/clutter.h>
0
+#include <clutter/cogl.h>
0
+
0
+#include <tidy/tidy-list-view.h>
0
+#include <tidy/tidy-list-column.h>
0
+#include <tidy/tidy-cell-renderer.h>
0
+#include <tidy/tidy-stylable.h>
0
+
0
+#include "tweet-status-column.h"
0
+#include "tweet-status-renderer.h"
0
+#include "tweet-status-view.h"
0
+
0
+#define TWEET_STATUS_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TWEET_TYPE_STATUS_VIEW, TweetStatusViewPrivate))
0
+
0
+struct _TweetStatusViewPrivate
0
+{
0
+ guint dummy : 1;
0
+};
0
+
0
+G_DEFINE_TYPE (TweetStatusView, tweet_status_view, TIDY_TYPE_LIST_VIEW);
0
+
0
+static void
0
+tweet_status_view_dispose (GObject *gobject)
0
+{
0
+ G_OBJECT_CLASS (tweet_status_view_parent_class)->dispose (gobject);
0
+}
0
+
0
+static TidyListColumn *
0
+tweet_status_view_create_column (TidyListView *list_view,
0
+ guint model_id)
0
+{
0
+ return tweet_status_column_new (list_view, model_id);
0
+}
0
+
0
+static void
0
+tweet_status_view_class_init (TweetStatusViewClass *klass)
0
+{
0
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
0
+ TidyListViewClass *list_view_class = TIDY_LIST_VIEW_CLASS (klass);
0
+
0
+ g_type_class_add_private (klass, sizeof (TweetStatusViewPrivate));
0
+
0
+ gobject_class->dispose = tweet_status_view_dispose;
0
+
0
+ list_view_class->create_column = tweet_status_view_create_column;
0
+}
0
+
0
+static void
0
+tweet_status_view_init (TweetStatusView *view)
0
+{
0
+ view->priv = TWEET_STATUS_VIEW_GET_PRIVATE (view);
0
+
0
+ tidy_list_view_set_rules_hint (TIDY_LIST_VIEW (view), FALSE);
0
+ tidy_list_view_set_show_headers (TIDY_LIST_VIEW (view), FALSE);
0
+
0
+ tidy_stylable_set (TIDY_STYLABLE (view),
0
+ "v-padding", 6,
0
+ NULL);
0
+}
0
+
0
+ClutterActor *
0
+tweet_status_view_new (TweetStatusModel *model)
0
+{
0
+ g_return_val_if_fail (TWEET_IS_STATUS_MODEL (model), NULL);
0
+
0
+ return g_object_new (TWEET_TYPE_STATUS_VIEW,
0
+ "model", CLUTTER_MODEL (model),
0
+ NULL);
0
+}
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
0
@@ -1 +1,38 @@
0
+#ifndef __TWEET_STATUS_VIEW_H__
0
+#define __TWEET_STATUS_VIEW_H__
0
+
0
+#include <tidy/tidy-list-view.h>
0
+#include "tweet-status-model.h"
0
+
0
+G_BEGIN_DECLS
0
+
0
+#define TWEET_TYPE_STATUS_VIEW (tweet_status_view_get_type ())
0
+#define TWEET_STATUS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TWEET_TYPE_STATUS_VIEW, TweetStatusView))
0
+#define TWEET_IS_STATUS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TWEET_TYPE_STATUS_VIEW))
0
+#define TWEET_STATUS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TWEET_TYPE_STATUS_VIEW, TweetStatusViewClass))
0
+#define TWEET_IS_STATUS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TWEET_TYPE_STATUS_VIEW))
0
+#define TWEET_STATUS_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TWEET_TYPE_STATUS_VIEW, TweetStatusViewClass))
0
+
0
+typedef struct _TweetStatusView TweetStatusView;
0
+typedef struct _TweetStatusViewPrivate TweetStatusViewPrivate;
0
+typedef struct _TweetStatusViewClass TweetStatusViewClass;
0
+
0
+struct _TweetStatusView
0
+{
0
+ TidyListView parent_instance;
0
+
0
+ TweetStatusViewPrivate *priv;
0
+};
0
+
0
+struct _TweetStatusViewClass
0
+{
0
+ TidyListViewClass parent_class;
0
+};
0
+
0
+GType tweet_status_view_get_type (void) G_GNUC_CONST;
0
+ClutterActor *tweet_status_view_new (TweetStatusModel *model);
0
+
0
+G_END_DECLS
0
+
0
+#endif /* __TWEET_STATUS_VIEW_H__ */

Comments

    No one has commented yet.