[gtk+] a11y: Add GtkRendererCellAcessible::renderer
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] a11y: Add GtkRendererCellAcessible::renderer
- Date: Fri, 16 Dec 2011 03:58:53 +0000 (UTC)
commit c28f6419216ba4467056b3b4e9e193fad0ab0ee6
Author: Benjamin Otte <otte redhat com>
Date: Thu Dec 15 13:23:28 2011 +0100
a11y: Add GtkRendererCellAcessible::renderer
gtk/a11y/gtkrenderercellaccessible.c | 55 +++++++++++++++++++++++++++++++++-
1 files changed, 54 insertions(+), 1 deletions(-)
---
diff --git a/gtk/a11y/gtkrenderercellaccessible.c b/gtk/a11y/gtkrenderercellaccessible.c
index 1fa4ea0..f494949 100644
--- a/gtk/a11y/gtkrenderercellaccessible.c
+++ b/gtk/a11y/gtkrenderercellaccessible.c
@@ -21,11 +21,55 @@
#include <gtk/gtk.h>
#include "gtkrenderercellaccessible.h"
+#include "gtkintl.h"
+enum {
+ PROP_0,
+ PROP_RENDERER
+};
+
G_DEFINE_TYPE (GtkRendererCellAccessible, _gtk_renderer_cell_accessible, GTK_TYPE_CELL_ACCESSIBLE)
static void
+gtk_renderer_cell_accessible_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GtkRendererCellAccessible *accessible = GTK_RENDERER_CELL_ACCESSIBLE (object);
+
+ switch (prop_id)
+ {
+ case PROP_RENDERER:
+ accessible->renderer = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gtk_renderer_cell_accessible_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GtkRendererCellAccessible *accessible = GTK_RENDERER_CELL_ACCESSIBLE (object);
+
+ switch (prop_id)
+ {
+ case PROP_RENDERER:
+ g_value_set_object (value, accessible->renderer);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
gtk_renderer_cell_accessible_finalize (GObject *object)
{
GtkRendererCellAccessible *renderer_cell = GTK_RENDERER_CELL_ACCESSIBLE (object);
@@ -43,13 +87,22 @@ _gtk_renderer_cell_accessible_class_init (GtkRendererCellAccessibleClass *klass)
klass->property_list = NULL;
+ gobject_class->get_property = gtk_renderer_cell_accessible_get_property;
+ gobject_class->set_property = gtk_renderer_cell_accessible_set_property;
gobject_class->finalize = gtk_renderer_cell_accessible_finalize;
+
+ g_object_class_install_property (gobject_class,
+ PROP_RENDERER,
+ g_param_spec_object ("renderer",
+ P_("Cell renderer"),
+ P_("The cell renderer represented by this accessible"),
+ GTK_TYPE_CELL_RENDERER,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}
static void
_gtk_renderer_cell_accessible_init (GtkRendererCellAccessible *renderer_cell)
{
- renderer_cell->renderer = NULL;
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]