summaryrefslogtreecommitdiff
path: root/gtk/a11y
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-10-14 02:39:32 -0400
committerMatthias Clasen <mclasen@redhat.com>2012-10-14 02:39:32 -0400
commit7264a996fe6bb4a21f6c8453b1acd4dc1a2daf79 (patch)
tree684ce5bf08511cd952e79d7840984478faacc431 /gtk/a11y
parent1cb322e87059e321c479477c65bb207d536730c0 (diff)
downloadgtk+-7264a996fe6bb4a21f6c8453b1acd4dc1a2daf79.tar.gz
GtkArrowAccessible: add a private struct
Move instance fields to a private struct, in preparation for installing a11y headers.
Diffstat (limited to 'gtk/a11y')
-rw-r--r--gtk/a11y/gtkarrowaccessible.c18
-rw-r--r--gtk/a11y/gtkarrowaccessible.h6
2 files changed, 17 insertions, 7 deletions
diff --git a/gtk/a11y/gtkarrowaccessible.c b/gtk/a11y/gtkarrowaccessible.c
index 7368be78aa..9950158a6a 100644
--- a/gtk/a11y/gtkarrowaccessible.c
+++ b/gtk/a11y/gtkarrowaccessible.c
@@ -20,6 +20,10 @@
#include <gtk/gtk.h>
#include "gtkarrowaccessible.h"
+struct _GtkArrowAccessiblePrivate
+{
+ gchar *image_description;
+};
static void atk_image_interface_init (AtkImageIface *iface);
@@ -40,7 +44,7 @@ gtk_arrow_accessible_finalize (GObject *object)
{
GtkArrowAccessible *arrow = GTK_ARROW_ACCESSIBLE (object);
- g_free (arrow->image_description);
+ g_free (arrow->priv->image_description);
G_OBJECT_CLASS (_gtk_arrow_accessible_parent_class)->finalize (object);
}
@@ -54,12 +58,16 @@ _gtk_arrow_accessible_class_init (GtkArrowAccessibleClass *klass)
atk_object_class->initialize = gtk_arrow_accessible_initialize;
gobject_class->finalize = gtk_arrow_accessible_finalize;
+
+ g_type_class_add_private (klass, sizeof (GtkArrowAccessiblePrivate));
}
static void
_gtk_arrow_accessible_init (GtkArrowAccessible *arrow)
{
- arrow->image_description = NULL;
+ arrow->priv = G_TYPE_INSTANCE_GET_PRIVATE (arrow,
+ GTK_TYPE_ARROW_ACCESSIBLE,
+ GtkArrowAccessiblePrivate);
}
static const gchar *
@@ -67,7 +75,7 @@ gtk_arrow_accessible_get_image_description (AtkImage *obj)
{
GtkArrowAccessible *arrow = GTK_ARROW_ACCESSIBLE (obj);
- return arrow->image_description;
+ return arrow->priv->image_description;
}
static gboolean
@@ -76,8 +84,8 @@ gtk_arrow_accessible_set_image_description (AtkImage *obj,
{
GtkArrowAccessible *arrow = GTK_ARROW_ACCESSIBLE (obj);
- g_free (arrow->image_description);
- arrow->image_description = g_strdup (description);
+ g_free (arrow->priv->image_description);
+ arrow->priv->image_description = g_strdup (description);
return TRUE;
diff --git a/gtk/a11y/gtkarrowaccessible.h b/gtk/a11y/gtkarrowaccessible.h
index 84d7f10a88..492a473a8a 100644
--- a/gtk/a11y/gtkarrowaccessible.h
+++ b/gtk/a11y/gtkarrowaccessible.h
@@ -29,13 +29,15 @@ G_BEGIN_DECLS
#define GTK_IS_ARROW_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ARROW_ACCESSIBLE))
#define GTK_ARROW_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ARROW_ACCESSIBLE, GtkArrowAccessibleClass))
-typedef struct _GtkArrowAccessible GtkArrowAccessible;
-typedef struct _GtkArrowAccessibleClass GtkArrowAccessibleClass;
+typedef struct _GtkArrowAccessible GtkArrowAccessible;
+typedef struct _GtkArrowAccessibleClass GtkArrowAccessibleClass;
+typedef struct _GtkArrowAccessiblePrivate GtkArrowAccessiblePrivate;
struct _GtkArrowAccessible
{
GtkWidgetAccessible parent;
+ GtkArrowAccessiblePrivate *priv;
gchar *image_description;
};