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
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.
29
40
#include "config.h"
65
76
* totem_cell_renderer_video_new:
66
77
* @use_placeholder: if %TRUE, use a placeholder thumbnail
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;
109
* TotemCellRendererVideo:thumbnail:
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.
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));
119
* TotemCellRendererVideo:title:
121
* The title of the video, as it should be displayed.
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));
128
* TotemCellRendererVideo:alignment:
130
* A #PangoAlignment giving the text alignment for the video title.
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));
139
* TotemCellRendererVideo:use-placeholder:
141
* If %TRUE, a placeholder image should be used for the video thumbnail if a #TotemCellRendererVideo:thumbnail isn't provided.
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));