Commit 7371e3f7 authored by Matthias Clasen's avatar Matthias Clasen

Convert GailComboBox to GtkComboBoxAccessible

parent 2f744db9
......@@ -11,7 +11,7 @@ gail_c_sources = \
gailcellparent.c \
gailcheckmenuitem.c \
gailchecksubmenuitem.c \
gailcombobox.c \
gtkcomboboxaccessible.c \
gailcontainer.c \
gailcontainercell.c \
gtkentryaccessible.c \
......@@ -61,7 +61,7 @@ gail_private_h_sources = \
gailcellparent.h \
gailcheckmenuitem.h \
gailchecksubmenuitem.h \
gailcombobox.h \
gtkcomboboxaccessible.h \
gailcontainercell.h \
gailcontainer.h \
gtkentryaccessible.h \
......
......@@ -27,7 +27,6 @@
#include "gailbutton.h"
#include "gailcell.h"
#include "gailcheckmenuitem.h"
#include "gailcombobox.h"
#include "gailcontainer.h"
#include "gailcontainercell.h"
#include "gailexpander.h"
......@@ -96,7 +95,6 @@ GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_WIDGET, GailWidget, gail_widget, GTK_TYPE_WIDG
GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_CONTAINER, GailContainer, gail_container, GTK_TYPE_CONTAINER)
GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_BUTTON, GailButton, gail_button, GTK_TYPE_BUTTON)
GAIL_IMPLEMENT_FACTORY_WITH_FUNC (GAIL_TYPE_MENU_ITEM, GailMenuItem, gail_menu_item, gail_menu_item_new)
GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_COMBO_BOX, GailComboBox, gail_combo_box, GTK_TYPE_COMBO_BOX)
GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_MENU_SHELL, GailMenuShell, gail_menu_shell, GTK_TYPE_MENU_SHELL)
GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_MENU, GailMenu, gail_menu, GTK_TYPE_MENU)
GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_WINDOW, GailWindow, gail_window, GTK_TYPE_BIN)
......@@ -854,7 +852,6 @@ gail_accessibility_module_init (void)
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CONTAINER, gail_container);
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_BUTTON, gail_button);
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_MENU_ITEM, gail_menu_item);
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_COMBO_BOX, gail_combo_box);
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_MENU_BAR, gail_menu_shell);
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_MENU, gail_menu);
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_WINDOW, gail_window);
......
......@@ -17,41 +17,39 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GAIL_COMBO_BOX_H__
#define __GAIL_COMBO_BOX_H__
#ifndef __GTK_COMBO_BOX_ACCESSIBLE_H__
#define __GTK_COMBO_BOX_ACCESSIBLE_H__
#include "gailcontainer.h"
G_BEGIN_DECLS
#define GAIL_TYPE_COMBO_BOX (gail_combo_box_get_type ())
#define GAIL_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_COMBO_BOX, GailComboBox))
#define GAIL_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAIL_TYPE_COMBO_BOX, GailComboBoxClass))
#define GAIL_IS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_COMBO_BOX))
#define GAIL_IS_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_COMBO_BOX))
#define GAIL_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_COMBO_BOX, GailComboBoxClass))
#define GTK_TYPE_COMBO_BOX_ACCESSIBLE (gtk_combo_box_accessible_get_type ())
#define GTK_COMBO_BOX_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COMBO_BOX_ACCESSIBLE, GtkComboBoxAccessible))
#define GTK_COMBO_BOX_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_COMBO_BOX_ACCESSIBLE, GtkComboBoxAccessibleClass))
#define GTK_IS_COMBO_BOX_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_COMBO_BOX_ACCESSIBLE))
#define GTK_IS_COMBO_BOX_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COMBO_BOX_ACCESSIBLE))
#define GTK_COMBO_BOX_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_COMBO_BOX_ACCESSIBLE, GtkComboBoxAccessibleClass))
typedef struct _GailComboBox GailComboBox;
typedef struct _GailComboBoxClass GailComboBoxClass;
typedef struct _GtkComboBoxAccessible GtkComboBoxAccessible;
typedef struct _GtkComboBoxAccessibleClass GtkComboBoxAccessibleClass;
struct _GailComboBox
struct _GtkComboBoxAccessible
{
GailContainer parent;
gchar *press_keybinding;
GailContainer parent;
gchar *name;
gint old_selection;
gboolean popup_set;
gint old_selection;
gboolean popup_set;
};
GType gail_combo_box_get_type (void);
struct _GailComboBoxClass
struct _GtkComboBoxAccessibleClass
{
GailContainerClass parent_class;
};
GType gtk_combo_box_accessible_get_type (void);
G_END_DECLS
#endif /* __GAIL_COMBO_BOX_H__ */
#endif /* __GTK_COMBO_BOX_ACCESSIBLE_H__ */
......@@ -24,7 +24,7 @@
#include "gtkpango.h"
#include <gdk/gdkkeysyms.h>
#include "gtkentryaccessible.h"
#include "gailcombobox.h"
#include "gtkcomboboxaccessible.h"
/* Callbacks */
......@@ -199,7 +199,7 @@ gtk_entry_accessible_get_index_in_parent (AtkObject *accessible)
* otherwise do the normal thing.
*/
if (accessible->accessible_parent)
if (GAIL_IS_COMBO_BOX (accessible->accessible_parent))
if (GTK_IS_COMBO_BOX_ACCESSIBLE (accessible->accessible_parent))
return 1;
return ATK_OBJECT_CLASS (gtk_entry_accessible_parent_class)->get_index_in_parent (accessible);
......
......@@ -53,6 +53,7 @@
#include "gtkentryprivate.h"
#include "gtktreeprivate.h"
#include "a11y/gtkcomboboxaccessible.h"
/**
......@@ -1005,6 +1006,8 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
GTK_PARAM_READABLE));
g_type_class_add_private (object_class, sizeof (GtkComboBoxPrivate));
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_COMBO_BOX_ACCESSIBLE);
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment