forked from AuroraMiddleware/gtk
a11y: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
This commit is contained in:
parent
9f2ca8d851
commit
365919d5f6
@ -28,6 +28,7 @@ struct _GtkArrowAccessiblePrivate
|
||||
static void atk_image_interface_init (AtkImageIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkArrowAccessible, gtk_arrow_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkArrowAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE, atk_image_interface_init))
|
||||
|
||||
static void
|
||||
@ -58,16 +59,12 @@ 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->priv = G_TYPE_INSTANCE_GET_PRIVATE (arrow,
|
||||
GTK_TYPE_ARROW_ACCESSIBLE,
|
||||
GtkArrowAccessiblePrivate);
|
||||
arrow->priv = gtk_arrow_accessible_get_instance_private (arrow);
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
|
@ -88,8 +88,9 @@ gtk_boolean_cell_accessible_action_interface_init (AtkActionIface *iface)
|
||||
}
|
||||
|
||||
|
||||
G_DEFINE_TYPE_EXTENDED (GtkBooleanCellAccessible, gtk_boolean_cell_accessible, GTK_TYPE_RENDERER_CELL_ACCESSIBLE, 0,
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, gtk_boolean_cell_accessible_action_interface_init))
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkBooleanCellAccessible, gtk_boolean_cell_accessible, GTK_TYPE_RENDERER_CELL_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkBooleanCellAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, gtk_boolean_cell_accessible_action_interface_init))
|
||||
|
||||
|
||||
static AtkStateSet *
|
||||
@ -150,15 +151,11 @@ gtk_boolean_cell_accessible_class_init (GtkBooleanCellAccessibleClass *klass)
|
||||
atkobject_class->ref_state_set = gtk_boolean_cell_accessible_ref_state_set;
|
||||
|
||||
cell_class->update_cache = gtk_boolean_cell_accessible_update_cache;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkBooleanCellAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_boolean_cell_accessible_init (GtkBooleanCellAccessible *cell)
|
||||
{
|
||||
cell->priv = G_TYPE_INSTANCE_GET_PRIVATE (cell,
|
||||
GTK_TYPE_BOOLEAN_CELL_ACCESSIBLE,
|
||||
GtkBooleanCellAccessiblePrivate);
|
||||
cell->priv = gtk_boolean_cell_accessible_get_instance_private (cell);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ struct _GtkComboBoxAccessiblePrivate
|
||||
static void atk_action_interface_init (AtkActionIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkComboBoxAccessible, gtk_combo_box_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkComboBoxAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
|
||||
|
||||
static void
|
||||
@ -199,16 +200,12 @@ gtk_combo_box_accessible_class_init (GtkComboBoxAccessibleClass *klass)
|
||||
class->get_n_children = gtk_combo_box_accessible_get_n_children;
|
||||
class->ref_child = gtk_combo_box_accessible_ref_child;
|
||||
class->initialize = gtk_combo_box_accessible_initialize;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkComboBoxAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_combo_box_accessible_init (GtkComboBoxAccessible *combo_box)
|
||||
{
|
||||
combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box,
|
||||
GTK_TYPE_COMBO_BOX_ACCESSIBLE,
|
||||
GtkComboBoxAccessiblePrivate);
|
||||
combo_box->priv = gtk_combo_box_accessible_get_instance_private (combo_box);
|
||||
combo_box->priv->old_selection = -1;
|
||||
combo_box->priv->name = NULL;
|
||||
combo_box->priv->popup_set = FALSE;
|
||||
|
@ -25,7 +25,7 @@ struct _GtkContainerAccessiblePrivate
|
||||
GList *children;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GtkContainerAccessible, gtk_container_accessible, GTK_TYPE_WIDGET_ACCESSIBLE)
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkContainerAccessible, gtk_container_accessible, GTK_TYPE_WIDGET_ACCESSIBLE)
|
||||
|
||||
static gint
|
||||
gtk_container_accessible_get_n_children (AtkObject* obj)
|
||||
@ -90,8 +90,8 @@ gtk_container_accessible_add_gtk (GtkContainer *container,
|
||||
|
||||
static gint
|
||||
gtk_container_accessible_remove_gtk (GtkContainer *container,
|
||||
GtkWidget *widget,
|
||||
gpointer data)
|
||||
GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
GtkContainerAccessible *accessible = GTK_CONTAINER_ACCESSIBLE (data);
|
||||
GtkContainerAccessibleClass *klass;
|
||||
@ -193,14 +193,10 @@ gtk_container_accessible_class_init (GtkContainerAccessibleClass *klass)
|
||||
|
||||
klass->add_gtk = gtk_container_accessible_real_add_gtk;
|
||||
klass->remove_gtk = gtk_container_accessible_real_remove_gtk;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkContainerAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_container_accessible_init (GtkContainerAccessible *container)
|
||||
{
|
||||
container->priv = G_TYPE_INSTANCE_GET_PRIVATE (container,
|
||||
GTK_TYPE_CONTAINER_ACCESSIBLE,
|
||||
GtkContainerAccessiblePrivate);
|
||||
container->priv = gtk_container_accessible_get_instance_private (container);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ struct _GtkContainerCellAccessiblePrivate
|
||||
gint n_children;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GtkContainerCellAccessible, gtk_container_cell_accessible, GTK_TYPE_CELL_ACCESSIBLE)
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkContainerCellAccessible, gtk_container_cell_accessible, GTK_TYPE_CELL_ACCESSIBLE)
|
||||
|
||||
|
||||
static void
|
||||
@ -114,16 +114,12 @@ gtk_container_cell_accessible_class_init (GtkContainerCellAccessibleClass *klass
|
||||
accessible_class->widget_unset = gtk_container_cell_widget_unset;
|
||||
|
||||
cell_class->update_cache = gtk_container_cell_accessible_update_cache;
|
||||
|
||||
g_type_class_add_private (g_object_class, sizeof (GtkContainerCellAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_container_cell_accessible_init (GtkContainerCellAccessible *cell)
|
||||
{
|
||||
cell->priv = G_TYPE_INSTANCE_GET_PRIVATE (cell,
|
||||
GTK_TYPE_CONTAINER_CELL_ACCESSIBLE,
|
||||
GtkContainerCellAccessiblePrivate);
|
||||
cell->priv = gtk_container_cell_accessible_get_instance_private (cell);
|
||||
}
|
||||
|
||||
GtkContainerCellAccessible *
|
||||
|
@ -383,6 +383,7 @@ static void atk_action_interface_init (AtkActionIface *iface);
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkEntryAccessible, gtk_entry_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkEntryAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_EDITABLE_TEXT, atk_editable_text_interface_init)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_TEXT, atk_text_interface_init)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
|
||||
@ -750,16 +751,12 @@ gtk_entry_accessible_class_init (GtkEntryAccessibleClass *klass)
|
||||
widget_class->notify_gtk = gtk_entry_accessible_notify_gtk;
|
||||
|
||||
gobject_class->finalize = gtk_entry_accessible_finalize;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkEntryAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_entry_accessible_init (GtkEntryAccessible *entry)
|
||||
{
|
||||
entry->priv = G_TYPE_INSTANCE_GET_PRIVATE (entry,
|
||||
GTK_TYPE_ENTRY_ACCESSIBLE,
|
||||
GtkEntryAccessiblePrivate);
|
||||
entry->priv = gtk_entry_accessible_get_instance_private (entry);
|
||||
entry->priv->cursor_position = 0;
|
||||
entry->priv->selection_bound = 0;
|
||||
}
|
||||
|
@ -850,6 +850,7 @@ static void atk_component_interface_init (AtkComponentIface *iface);
|
||||
static void atk_selection_interface_init (AtkSelectionIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkIconViewAccessible, gtk_icon_view_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkIconViewAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_SELECTION, atk_selection_interface_init))
|
||||
|
||||
@ -1336,16 +1337,12 @@ gtk_icon_view_accessible_class_init (GtkIconViewAccessibleClass *klass)
|
||||
atk_class->get_n_children = gtk_icon_view_accessible_get_n_children;
|
||||
atk_class->ref_child = gtk_icon_view_accessible_ref_child;
|
||||
atk_class->initialize = gtk_icon_view_accessible_initialize;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkIconViewAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_icon_view_accessible_init (GtkIconViewAccessible *accessible)
|
||||
{
|
||||
accessible->priv = G_TYPE_INSTANCE_GET_PRIVATE (accessible,
|
||||
GTK_TYPE_ICON_VIEW_ACCESSIBLE,
|
||||
GtkIconViewAccessiblePrivate);
|
||||
accessible->priv = gtk_icon_view_accessible_get_instance_private (accessible);
|
||||
}
|
||||
|
||||
static AtkObject*
|
||||
|
@ -30,6 +30,7 @@ struct _GtkImageAccessiblePrivate
|
||||
static void atk_image_interface_init (AtkImageIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkImageAccessible, gtk_image_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkImageAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE, atk_image_interface_init))
|
||||
|
||||
static void
|
||||
@ -103,16 +104,12 @@ gtk_image_accessible_class_init (GtkImageAccessibleClass *klass)
|
||||
gobject_class->finalize = gtk_image_accessible_finalize;
|
||||
class->initialize = gtk_image_accessible_initialize;
|
||||
class->get_name = gtk_image_accessible_get_name;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkImageAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_image_accessible_init (GtkImageAccessible *image)
|
||||
{
|
||||
image->priv = G_TYPE_INSTANCE_GET_PRIVATE (image,
|
||||
GTK_TYPE_IMAGE_ACCESSIBLE,
|
||||
GtkImageAccessiblePrivate);
|
||||
image->priv = gtk_image_accessible_get_instance_private (image);
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
|
@ -28,6 +28,7 @@ struct _GtkImageCellAccessiblePrivate
|
||||
static void atk_image_interface_init (AtkImageIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkImageCellAccessible, gtk_image_cell_accessible, GTK_TYPE_RENDERER_CELL_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkImageCellAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE, atk_image_interface_init))
|
||||
|
||||
static void
|
||||
@ -45,16 +46,12 @@ gtk_image_cell_accessible_class_init (GtkImageCellAccessibleClass *klass)
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
gobject_class->finalize = gtk_image_cell_accessible_finalize;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkImageCellAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_image_cell_accessible_init (GtkImageCellAccessible *image_cell)
|
||||
{
|
||||
image_cell->priv = G_TYPE_INSTANCE_GET_PRIVATE (image_cell,
|
||||
GTK_TYPE_IMAGE_CELL_ACCESSIBLE,
|
||||
GtkImageCellAccessiblePrivate);
|
||||
image_cell->priv = gtk_image_cell_accessible_get_instance_private (image_cell);
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
|
@ -31,14 +31,13 @@ struct _GtkLabelAccessiblePrivate
|
||||
static void atk_text_interface_init (AtkTextIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkLabelAccessible, gtk_label_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkLabelAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_TEXT, atk_text_interface_init))
|
||||
|
||||
static void
|
||||
gtk_label_accessible_init (GtkLabelAccessible *label)
|
||||
{
|
||||
label->priv = G_TYPE_INSTANCE_GET_PRIVATE (label,
|
||||
GTK_TYPE_LABEL_ACCESSIBLE,
|
||||
GtkLabelAccessiblePrivate);
|
||||
label->priv = gtk_label_accessible_get_instance_private (label);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -279,8 +278,6 @@ gtk_label_accessible_class_init (GtkLabelAccessibleClass *klass)
|
||||
class->ref_state_set = gtk_label_accessible_ref_state_set;
|
||||
class->ref_relation_set = gtk_label_accessible_ref_relation_set;
|
||||
class->initialize = gtk_label_accessible_initialize;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkLabelAccessiblePrivate));
|
||||
}
|
||||
|
||||
/* atktext.h */
|
||||
|
@ -198,14 +198,13 @@ gtk_link_button_accessible_get_hyperlink (AtkHyperlinkImpl *impl)
|
||||
static void atk_hypertext_impl_interface_init (AtkHyperlinkImplIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkLinkButtonAccessible, gtk_link_button_accessible, GTK_TYPE_BUTTON_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkLinkButtonAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_HYPERLINK_IMPL, atk_hypertext_impl_interface_init))
|
||||
|
||||
static void
|
||||
gtk_link_button_accessible_init (GtkLinkButtonAccessible *button)
|
||||
{
|
||||
button->priv = G_TYPE_INSTANCE_GET_PRIVATE (button,
|
||||
GTK_TYPE_LINK_BUTTON_ACCESSIBLE,
|
||||
GtkLinkButtonAccessiblePrivate);
|
||||
button->priv = gtk_link_button_accessible_get_instance_private (button);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -223,8 +222,6 @@ static void
|
||||
gtk_link_button_accessible_class_init (GtkLinkButtonAccessibleClass *klass)
|
||||
{
|
||||
G_OBJECT_CLASS (klass)->finalize = gtk_link_button_accessible_finalize;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkLinkButtonAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -47,6 +47,7 @@ static void atk_action_interface_init (AtkActionIface *iface);
|
||||
static void atk_selection_interface_init (AtkSelectionIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkMenuItemAccessible, gtk_menu_item_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkMenuItemAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init);
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_SELECTION, atk_selection_interface_init))
|
||||
|
||||
@ -258,16 +259,12 @@ gtk_menu_item_accessible_class_init (GtkMenuItemAccessibleClass *klass)
|
||||
class->initialize = gtk_menu_item_accessible_initialize;
|
||||
class->get_name = gtk_menu_item_accessible_get_name;
|
||||
class->get_role = gtk_menu_item_accessible_get_role;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkMenuItemAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_menu_item_accessible_init (GtkMenuItemAccessible *menu_item)
|
||||
{
|
||||
menu_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (menu_item,
|
||||
GTK_TYPE_MENU_ITEM_ACCESSIBLE,
|
||||
GtkMenuItemAccessiblePrivate);
|
||||
menu_item->priv = gtk_menu_item_accessible_get_instance_private (menu_item);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
|
@ -39,6 +39,7 @@ struct _GtkNotebookAccessiblePrivate
|
||||
static void atk_selection_interface_init (AtkSelectionIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkNotebookAccessible, gtk_notebook_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkNotebookAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_SELECTION, atk_selection_interface_init))
|
||||
|
||||
static gboolean
|
||||
@ -322,16 +323,12 @@ gtk_notebook_accessible_class_init (GtkNotebookAccessibleClass *klass)
|
||||
/* we listen to page-added/-removed, so we don't care about these */
|
||||
container_class->add_gtk = NULL;
|
||||
container_class->remove_gtk = NULL;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkNotebookAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_accessible_init (GtkNotebookAccessible *notebook)
|
||||
{
|
||||
notebook->priv = G_TYPE_INSTANCE_GET_PRIVATE (notebook,
|
||||
GTK_TYPE_NOTEBOOK_ACCESSIBLE,
|
||||
GtkNotebookAccessiblePrivate);
|
||||
notebook->priv = gtk_notebook_accessible_get_instance_private (notebook);
|
||||
notebook->priv->pages = g_hash_table_new_full (g_direct_hash,
|
||||
g_direct_equal,
|
||||
NULL,
|
||||
|
@ -31,6 +31,7 @@ struct _GtkNotebookPageAccessiblePrivate
|
||||
static void atk_component_interface_init (AtkComponentIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkNotebookPageAccessible, gtk_notebook_page_accessible, ATK_TYPE_OBJECT,
|
||||
G_ADD_PRIVATE (GtkNotebookPageAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init))
|
||||
|
||||
|
||||
@ -213,16 +214,12 @@ gtk_notebook_page_accessible_class_init (GtkNotebookPageAccessibleClass *klass)
|
||||
class->ref_child = gtk_notebook_page_accessible_ref_child;
|
||||
class->ref_state_set = gtk_notebook_page_accessible_ref_state_set;
|
||||
class->get_index_in_parent = gtk_notebook_page_accessible_get_index_in_parent;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkNotebookPageAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_page_accessible_init (GtkNotebookPageAccessible *page)
|
||||
{
|
||||
page->priv = G_TYPE_INSTANCE_GET_PRIVATE (page,
|
||||
GTK_TYPE_NOTEBOOK_PAGE_ACCESSIBLE,
|
||||
GtkNotebookPageAccessiblePrivate);
|
||||
page->priv = gtk_notebook_page_accessible_get_instance_private (page);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -26,7 +26,7 @@ struct _GtkRadioButtonAccessiblePrivate
|
||||
};
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GtkRadioButtonAccessible, gtk_radio_button_accessible, GTK_TYPE_TOGGLE_BUTTON_ACCESSIBLE)
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkRadioButtonAccessible, gtk_radio_button_accessible, GTK_TYPE_TOGGLE_BUTTON_ACCESSIBLE)
|
||||
|
||||
static void
|
||||
gtk_radio_button_accessible_initialize (AtkObject *accessible,
|
||||
@ -109,14 +109,10 @@ 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->priv = G_TYPE_INSTANCE_GET_PRIVATE (radio_button,
|
||||
GTK_TYPE_RADIO_BUTTON_ACCESSIBLE,
|
||||
GtkRadioButtonAccessiblePrivate);
|
||||
radio_button->priv = gtk_radio_button_accessible_get_instance_private (radio_button);
|
||||
}
|
||||
|
@ -25,7 +25,9 @@ struct _GtkRadioMenuItemAccessiblePrivate
|
||||
GSList *old_group;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GtkRadioMenuItemAccessible, gtk_radio_menu_item_accessible, GTK_TYPE_CHECK_MENU_ITEM_ACCESSIBLE)
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkRadioMenuItemAccessible,
|
||||
gtk_radio_menu_item_accessible,
|
||||
GTK_TYPE_CHECK_MENU_ITEM_ACCESSIBLE)
|
||||
|
||||
|
||||
static AtkRelationSet *
|
||||
@ -106,14 +108,10 @@ gtk_radio_menu_item_accessible_class_init (GtkRadioMenuItemAccessibleClass *klas
|
||||
|
||||
class->ref_relation_set = gtk_radio_menu_item_accessible_ref_relation_set;
|
||||
class->initialize = gtk_radio_menu_item_accessible_initialize;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkRadioMenuItemAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_radio_menu_item_accessible_init (GtkRadioMenuItemAccessible *radio_menu_item)
|
||||
{
|
||||
radio_menu_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (radio_menu_item,
|
||||
GTK_TYPE_RADIO_MENU_ITEM_ACCESSIBLE,
|
||||
GtkRadioMenuItemAccessiblePrivate);
|
||||
radio_menu_item->priv = gtk_radio_menu_item_accessible_get_instance_private (radio_menu_item);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ enum {
|
||||
PROP_RENDERER
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GtkRendererCellAccessible, gtk_renderer_cell_accessible, GTK_TYPE_CELL_ACCESSIBLE)
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkRendererCellAccessible, gtk_renderer_cell_accessible, GTK_TYPE_CELL_ACCESSIBLE)
|
||||
|
||||
static void
|
||||
gtk_renderer_cell_accessible_set_property (GObject *object,
|
||||
@ -98,16 +98,12 @@ gtk_renderer_cell_accessible_class_init (GtkRendererCellAccessibleClass *klass)
|
||||
P_("The cell renderer represented by this accessible"),
|
||||
GTK_TYPE_CELL_RENDERER,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkRendererCellAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_renderer_cell_accessible_init (GtkRendererCellAccessible *renderer_cell)
|
||||
{
|
||||
renderer_cell->priv = G_TYPE_INSTANCE_GET_PRIVATE (renderer_cell,
|
||||
GTK_TYPE_RENDERER_CELL_ACCESSIBLE,
|
||||
GtkRendererCellAccessiblePrivate);
|
||||
renderer_cell->priv = gtk_renderer_cell_accessible_get_instance_private (renderer_cell);
|
||||
}
|
||||
|
||||
AtkObject *
|
||||
|
@ -90,6 +90,7 @@ static void gtk_text_cell_accessible_update_cache (GtkCellAccessible *cell
|
||||
static void atk_text_interface_init (AtkTextIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkTextCellAccessible, gtk_text_cell_accessible, GTK_TYPE_RENDERER_CELL_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkTextCellAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_TEXT, atk_text_interface_init))
|
||||
|
||||
static AtkStateSet *
|
||||
@ -196,16 +197,12 @@ gtk_text_cell_accessible_class_init (GtkTextCellAccessibleClass *klass)
|
||||
atk_object_class->ref_state_set = gtk_text_cell_accessible_ref_state_set;
|
||||
|
||||
gobject_class->finalize = gtk_text_cell_accessible_finalize;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkTextCellAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_text_cell_accessible_init (GtkTextCellAccessible *text_cell)
|
||||
{
|
||||
text_cell->priv = G_TYPE_INSTANCE_GET_PRIVATE (text_cell,
|
||||
GTK_TYPE_TEXT_CELL_ACCESSIBLE,
|
||||
GtkTextCellAccessiblePrivate);
|
||||
text_cell->priv = gtk_text_cell_accessible_get_instance_private (text_cell);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
@ -57,6 +57,7 @@ static void atk_text_interface_init (AtkTextIface *if
|
||||
static void atk_streamable_content_interface_init (AtkStreamableContentIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkTextViewAccessible, gtk_text_view_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkTextViewAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_EDITABLE_TEXT, atk_editable_text_interface_init)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_TEXT, atk_text_interface_init)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_STREAMABLE_CONTENT, atk_streamable_content_interface_init))
|
||||
@ -167,16 +168,12 @@ gtk_text_view_accessible_class_init (GtkTextViewAccessibleClass *klass)
|
||||
class->initialize = gtk_text_view_accessible_initialize;
|
||||
|
||||
widget_class->notify_gtk = gtk_text_view_accessible_notify_gtk;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkTextViewAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_text_view_accessible_init (GtkTextViewAccessible *accessible)
|
||||
{
|
||||
accessible->priv = G_TYPE_INSTANCE_GET_PRIVATE (accessible,
|
||||
GTK_TYPE_TEXT_VIEW_ACCESSIBLE,
|
||||
GtkTextViewAccessiblePrivate);
|
||||
accessible->priv = gtk_text_view_accessible_get_instance_private (accessible);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
@ -35,7 +35,7 @@ struct _GtkToplevelAccessiblePrivate
|
||||
GList *window_list;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GtkToplevelAccessible, gtk_toplevel_accessible, ATK_TYPE_OBJECT)
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkToplevelAccessible, gtk_toplevel_accessible, ATK_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
gtk_toplevel_accessible_initialize (AtkObject *accessible,
|
||||
@ -151,8 +151,6 @@ gtk_toplevel_accessible_class_init (GtkToplevelAccessibleClass *klass)
|
||||
class->get_name = gtk_toplevel_accessible_get_name;
|
||||
|
||||
g_object_class->finalize = gtk_toplevel_accessible_object_finalize;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkToplevelAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -260,9 +258,7 @@ gtk_toplevel_accessible_init (GtkToplevelAccessible *toplevel)
|
||||
GList *l;
|
||||
guint signal_id;
|
||||
|
||||
toplevel->priv = G_TYPE_INSTANCE_GET_PRIVATE (toplevel,
|
||||
GTK_TYPE_TOPLEVEL_ACCESSIBLE,
|
||||
GtkToplevelAccessiblePrivate);
|
||||
toplevel->priv = gtk_toplevel_accessible_get_instance_private (toplevel);
|
||||
|
||||
l = toplevel->priv->window_list = gtk_window_list_toplevels ();
|
||||
|
||||
|
@ -82,6 +82,7 @@ static void atk_component_interface_init (AtkComponentIface
|
||||
static void gtk_cell_accessible_parent_interface_init (GtkCellAccessibleParentIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkTreeViewAccessible, gtk_tree_view_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkTreeViewAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_TABLE, atk_table_interface_init)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_SELECTION, atk_selection_interface_init)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init)
|
||||
@ -529,16 +530,12 @@ gtk_tree_view_accessible_class_init (GtkTreeViewAccessibleClass *klass)
|
||||
container_class->remove_gtk = NULL;
|
||||
|
||||
gobject_class->finalize = gtk_tree_view_accessible_finalize;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkTreeViewAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_tree_view_accessible_init (GtkTreeViewAccessible *view)
|
||||
{
|
||||
view->priv = G_TYPE_INSTANCE_GET_PRIVATE (view,
|
||||
GTK_TYPE_TREE_VIEW_ACCESSIBLE,
|
||||
GtkTreeViewAccessiblePrivate);
|
||||
view->priv = gtk_tree_view_accessible_get_instance_private (view);
|
||||
}
|
||||
|
||||
/* atkcomponent.h */
|
||||
|
@ -40,6 +40,7 @@ static gboolean gtk_widget_accessible_all_parents_visible (GtkWidget *widget);
|
||||
static void atk_component_interface_init (AtkComponentIface *iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkWidgetAccessible, gtk_widget_accessible, GTK_TYPE_ACCESSIBLE,
|
||||
G_ADD_PRIVATE (GtkWidgetAccessible)
|
||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init))
|
||||
|
||||
/* Translate GtkWidget::focus-in/out-event to AtkObject::focus-event */
|
||||
@ -541,16 +542,12 @@ gtk_widget_accessible_class_init (GtkWidgetAccessibleClass *klass)
|
||||
class->initialize = gtk_widget_accessible_initialize;
|
||||
class->get_attributes = gtk_widget_accessible_get_attributes;
|
||||
class->focus_event = gtk_widget_accessible_focus_event;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GtkWidgetAccessiblePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_widget_accessible_init (GtkWidgetAccessible *accessible)
|
||||
{
|
||||
accessible->priv = G_TYPE_INSTANCE_GET_PRIVATE (accessible,
|
||||
GTK_TYPE_WIDGET_ACCESSIBLE,
|
||||
GtkWidgetAccessiblePrivate);
|
||||
accessible->priv = gtk_widget_accessible_get_instance_private (accessible);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user