mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-07 01:00:28 +00:00
GtkRadioButtonAccessible: add a private struct
Move instance fields to a private struct, in preparation for installing a11y headers.
This commit is contained in:
parent
0ea0293356
commit
8b6e962811
@ -20,6 +20,11 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtkradiobuttonaccessible.h"
|
||||
|
||||
struct _GtkRadioButtonAccessiblePrivate
|
||||
{
|
||||
GSList *old_group;
|
||||
};
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GtkRadioButtonAccessible, _gtk_radio_button_accessible, GTK_TYPE_TOGGLE_BUTTON_ACCESSIBLE)
|
||||
|
||||
@ -51,7 +56,7 @@ gtk_radio_button_accessible_ref_relation_set (AtkObject *obj)
|
||||
/* If the radio button'group has changed remove the relation */
|
||||
list = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
|
||||
|
||||
if (radio_button->old_group != list)
|
||||
if (radio_button->priv->old_group != list)
|
||||
{
|
||||
AtkRelation *relation;
|
||||
|
||||
@ -64,7 +69,7 @@ gtk_radio_button_accessible_ref_relation_set (AtkObject *obj)
|
||||
/*
|
||||
* Get the members of the button group
|
||||
*/
|
||||
radio_button->old_group = list;
|
||||
radio_button->priv->old_group = list;
|
||||
if (list)
|
||||
{
|
||||
AtkObject **accessible_array;
|
||||
@ -104,10 +109,14 @@ _gtk_radio_button_accessible_class_init (GtkRadioButtonAccessibleClass *klass)
|
||||
|
||||
class->initialize = gtk_radio_button_accessible_initialize;
|
||||
class->ref_relation_set = gtk_radio_button_accessible_ref_relation_set;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkRadioButtonAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
_gtk_radio_button_accessible_init (GtkRadioButtonAccessible *radio_button)
|
||||
{
|
||||
radio_button->old_group = NULL;
|
||||
radio_button->priv = G_TYPE_INSTANCE_GET_PRIVATE (radio_button,
|
||||
GTK_TYPE_RADIO_BUTTON_ACCESSIBLE,
|
||||
GtkRadioButtonAccessiblePrivate);
|
||||
}
|
||||
|
@ -29,14 +29,15 @@ G_BEGIN_DECLS
|
||||
#define GTK_IS_RADIO_BUTTON_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RADIO_BUTTON_ACCESSIBLE))
|
||||
#define GTK_RADIO_BUTTON_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_RADIO_BUTTON_ACCESSIBLE, GtkRadioButtonAccessibleClass))
|
||||
|
||||
typedef struct _GtkRadioButtonAccessible GtkRadioButtonAccessible;
|
||||
typedef struct _GtkRadioButtonAccessibleClass GtkRadioButtonAccessibleClass;
|
||||
typedef struct _GtkRadioButtonAccessible GtkRadioButtonAccessible;
|
||||
typedef struct _GtkRadioButtonAccessibleClass GtkRadioButtonAccessibleClass;
|
||||
typedef struct _GtkRadioButtonAccessiblePrivate GtkRadioButtonAccessiblePrivate;
|
||||
|
||||
struct _GtkRadioButtonAccessible
|
||||
{
|
||||
GtkToggleButtonAccessible parent;
|
||||
|
||||
GSList *old_group;
|
||||
GtkRadioButtonAccessiblePrivate *priv;
|
||||
};
|
||||
|
||||
struct _GtkRadioButtonAccessibleClass
|
||||
|
Loading…
Reference in New Issue
Block a user