summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-07-09 02:29:16 +0200
committerBenjamin Otte <otte@redhat.com>2012-07-09 02:29:16 +0200
commitfb1b025cbf5a9b2901bbd9c33af21c083a779f45 (patch)
tree995a4f95f10887b8e653582de71a1ad984a4a1d0
parent0dbf5db0e1f45b85f7b4d8bc96804f30f9836f2e (diff)
downloadgtk+-fb1b025cbf5a9b2901bbd9c33af21c083a779f45.tar.gz
a11y: Add separate accessible for GtkLockButton
The accessible doesn't do anything yet, this is just infrastructure work.
-rw-r--r--gtk/a11y/Makefile.am2
-rw-r--r--gtk/a11y/gtklockbuttonaccessible.c34
-rw-r--r--gtk/a11y/gtklockbuttonaccessible.h49
-rw-r--r--gtk/gtklockbutton.c4
4 files changed, 89 insertions, 0 deletions
diff --git a/gtk/a11y/Makefile.am b/gtk/a11y/Makefile.am
index c3e92694f0..303cad6962 100644
--- a/gtk/a11y/Makefile.am
+++ b/gtk/a11y/Makefile.am
@@ -23,6 +23,7 @@ gail_c_sources = \
gtkimagecellaccessible.c \
gtklabelaccessible.c \
gtklinkbuttonaccessible.c \
+ gtklockbuttonaccessible.c \
gtkmenuaccessible.c \
gtkmenushellaccessible.c \
gtkmenuitemaccessible.c \
@@ -72,6 +73,7 @@ gail_private_h_sources = \
gtkimagecellaccessible.h \
gtklabelaccessible.h \
gtklinkbuttonaccessible.h \
+ gtklockbuttonaccessible.h \
gtkmenuaccessible.h \
gtkmenushellaccessible.h \
gtkmenuitemaccessible.h \
diff --git a/gtk/a11y/gtklockbuttonaccessible.c b/gtk/a11y/gtklockbuttonaccessible.c
new file mode 100644
index 0000000000..ee1cccd434
--- /dev/null
+++ b/gtk/a11y/gtklockbuttonaccessible.c
@@ -0,0 +1,34 @@
+/* GAIL - The GNOME Accessibility Implementation Library
+ * Copyright 2001, 2002, 2003 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <gtk/gtk.h>
+#include "gtklockbuttonaccessible.h"
+
+G_DEFINE_TYPE (GtkLockButtonAccessible, _gtk_lock_button_accessible, GTK_TYPE_BUTTON_ACCESSIBLE)
+
+static void
+_gtk_lock_button_accessible_class_init (GtkLockButtonAccessibleClass *klass)
+{
+}
+
+static void
+_gtk_lock_button_accessible_init (GtkLockButtonAccessible *lockbutton)
+{
+}
diff --git a/gtk/a11y/gtklockbuttonaccessible.h b/gtk/a11y/gtklockbuttonaccessible.h
new file mode 100644
index 0000000000..21bc93f343
--- /dev/null
+++ b/gtk/a11y/gtklockbuttonaccessible.h
@@ -0,0 +1,49 @@
+/* GAIL - The GNOME Accessibility Implementation Library
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GTK_LOCK_BUTTON_ACCESSIBLE_H__
+#define __GTK_LOCK_BUTTON_ACCESSIBLE_H__
+
+#include "gtkbuttonaccessible.h"
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_LOCK_BUTTON_ACCESSIBLE (_gtk_lock_button_accessible_get_type ())
+#define GTK_LOCK_BUTTON_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LOCK_BUTTON_ACCESSIBLE, GtkLockButtonAccessible))
+#define GTK_LOCK_BUTTON_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LOCK_BUTTON_ACCESSIBLE, GtkLockButtonAccessibleClass))
+#define GTK_IS_LOCK_BUTTON_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LOCK_BUTTON_ACCESSIBLE))
+#define GTK_IS_LOCK_BUTTON_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LOCK_BUTTON_ACCESSIBLE))
+#define GTK_LOCK_BUTTON_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LOCK_BUTTON_ACCESSIBLE, GtkLockButtonAccessibleClass))
+
+typedef struct _GtkLockButtonAccessible GtkLockButtonAccessible;
+typedef struct _GtkLockButtonAccessibleClass GtkLockButtonAccessibleClass;
+
+struct _GtkLockButtonAccessible
+{
+ GtkButtonAccessible parent;
+};
+
+struct _GtkLockButtonAccessibleClass
+{
+ GtkButtonAccessibleClass parent_class;
+};
+
+GType _gtk_lock_button_accessible_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GTK_LOCK_BUTTON_ACCESSIBLE_H__ */
diff --git a/gtk/gtklockbutton.c b/gtk/gtklockbutton.c
index e1bdc1c144..6fc45367b8 100644
--- a/gtk/gtklockbutton.c
+++ b/gtk/gtklockbutton.c
@@ -24,6 +24,7 @@
#include "gtklabel.h"
#include "gtksizegroup.h"
#include "gtkintl.h"
+#include "a11y/gtklockbuttonaccessible.h"
/**
* SECTION:gtklockbutton
@@ -261,6 +262,7 @@ static void
gtk_lock_button_class_init (GtkLockButtonClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkButtonClass *button_class = GTK_BUTTON_CLASS (klass);
gobject_class->finalize = gtk_lock_button_finalize;
@@ -323,6 +325,8 @@ gtk_lock_button_class_init (GtkLockButtonClass *klass)
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
+
+ gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_LOCK_BUTTON_ACCESSIBLE);
}
static void