[totem] backend: Add show-cursor property
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Add show-cursor property
- Date: Fri, 17 Jan 2014 14:11:00 +0000 (UTC)
commit 7740ae5bded93f3eee886dfc2f79e8c9d9dc7938
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jan 17 14:56:11 2014 +0100
backend: Add show-cursor property
src/backend/bacon-video-widget.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 01c20c2..ab37144 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -162,7 +162,8 @@ enum
PROP_SATURATION,
PROP_HUE,
PROP_AUDIO_OUTPUT_TYPE,
- PROP_AV_OFFSET
+ PROP_AV_OFFSET,
+ PROP_SHOW_CURSOR
};
static const gchar *video_props_str[4] = {
@@ -1079,6 +1080,17 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
0, G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ /**
+ * BaconVideoWidget:show-cursor:
+ *
+ * Whether the mouse cursor is shown.
+ **/
+ g_object_class_install_property (object_class, PROP_SHOW_CURSOR,
+ g_param_spec_boolean ("show-cursor", "Show cursor",
+ "Whether the mouse cursor is shown.", FALSE,
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
/* Signals */
/**
* BaconVideoWidget::error:
@@ -2800,6 +2812,9 @@ bacon_video_widget_set_property (GObject * object, guint property_id,
case PROP_AV_OFFSET:
g_object_set_property (G_OBJECT (bvw->priv->play), "av-offset", value);
break;
+ case PROP_SHOW_CURSOR:
+ bacon_video_widget_set_show_cursor (bvw, g_value_get_boolean (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -2866,6 +2881,9 @@ bacon_video_widget_get_property (GObject * object, guint property_id,
case PROP_AV_OFFSET:
g_object_get_property (G_OBJECT (bvw->priv->play), "av-offset", value);
break;
+ case PROP_SHOW_CURSOR:
+ g_value_set_boolean (value, bvw->priv->cursor_shown);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]