~walkerlee/totem/pre-interview

« back to all changes in this revision

Viewing changes to src/totem-cell-renderer-video.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-02-20 15:10:35 UTC
  • mto: (1.1.4 upstream)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20090220151035-84jb7eshz90nv8zx
Tags: upstream-2.25.91
ImportĀ upstreamĀ versionĀ 2.25.91

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 *
27
27
 */
28
28
 
 
29
/**
 
30
 * SECTION:totem-cell-renderer-video
 
31
 * @short_description: a #GtkCellRenderer widget for listing videos
 
32
 * @stability: Unstable
 
33
 * @include: totem-cell-renderer-video.h
 
34
 * @see_also: #TotemVideoList
 
35
 *
 
36
 * #TotemCellRendererVideo is a #GtkCellRenderer for rendering video thumbnails, typically in a #TotemVideoList.
 
37
 * It supports drawing a video thumbnail, and the video's title underneath.
 
38
 **/
 
39
 
29
40
#include "config.h"
30
41
 
31
42
#include <glib.h>
65
76
 * totem_cell_renderer_video_new:
66
77
 * @use_placeholder: if %TRUE, use a placeholder thumbnail
67
78
 *
68
 
 * Creates a new #TotemCellRendererVideo with its :use-placeholder
 
79
 * Creates a new #TotemCellRendererVideo with its #TotemCellRendererVideo:use-placeholder
69
80
 * property set to @use_placeholder. If @use_placeholder is %TRUE,
70
81
 * the renderer will display a generic placeholder thumbnail if a
71
82
 * proper one is not available.
94
105
        renderer_class->get_size = totem_cell_renderer_video_get_size;
95
106
        renderer_class->render = totem_cell_renderer_video_render;
96
107
 
 
108
        /**
 
109
         * TotemCellRendererVideo:thumbnail:
 
110
         *
 
111
         * A #GdkPixbuf of a thumbnail of the video to display. When rendered, it will scale to the width of the parent #GtkTreeView,
 
112
         * so can be as large as reasonable.
 
113
         **/
97
114
        g_object_class_install_property (object_class, PROP_THUMBNAIL,
98
115
                                g_param_spec_object ("thumbnail", NULL, NULL,
99
116
                                        GDK_TYPE_PIXBUF, G_PARAM_READWRITE));
 
117
 
 
118
        /**
 
119
         * TotemCellRendererVideo:title:
 
120
         *
 
121
         * The title of the video, as it should be displayed.
 
122
         **/
100
123
        g_object_class_install_property (object_class, PROP_TITLE,
101
124
                                g_param_spec_string ("title", NULL, NULL,
102
125
                                        _("Unknown video"), G_PARAM_READWRITE));
 
126
 
 
127
        /**
 
128
         * TotemCellRendererVideo:alignment:
 
129
         *
 
130
         * A #PangoAlignment giving the text alignment for the video title.
 
131
         **/
103
132
        g_object_class_install_property (object_class, PROP_ALIGNMENT,
104
133
                                g_param_spec_enum ("alignment", NULL, NULL,
105
134
                                        PANGO_TYPE_ALIGNMENT,
106
135
                                        PANGO_ALIGN_CENTER,
107
136
                                        G_PARAM_READWRITE));
 
137
 
 
138
        /**
 
139
         * TotemCellRendererVideo:use-placeholder:
 
140
         *
 
141
         * If %TRUE, a placeholder image should be used for the video thumbnail if a #TotemCellRendererVideo:thumbnail isn't provided.
 
142
         **/
108
143
        g_object_class_install_property (object_class, PROP_USE_PLACEHOLDER,
109
144
                                g_param_spec_boolean ("use-placeholder", NULL, NULL,
110
145
                                        FALSE, G_PARAM_READWRITE));