[gtk+] a11y: Add separate accessible for GtkLockButton
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] a11y: Add separate accessible for GtkLockButton
- Date: Mon, 9 Jul 2012 01:12:25 +0000 (UTC)
commit fb1b025cbf5a9b2901bbd9c33af21c083a779f45
Author: Benjamin Otte <otte redhat com>
Date: Mon Jul 9 02:29:16 2012 +0200
a11y: Add separate accessible for GtkLockButton
The accessible doesn't do anything yet, this is just infrastructure
work.
gtk/a11y/Makefile.am | 2 +
gtk/a11y/gtklockbuttonaccessible.c | 34 +++++++++++++++++++++++++
gtk/a11y/gtklockbuttonaccessible.h | 49 ++++++++++++++++++++++++++++++++++++
gtk/gtklockbutton.c | 4 +++
4 files changed, 89 insertions(+), 0 deletions(-)
---
diff --git a/gtk/a11y/Makefile.am b/gtk/a11y/Makefile.am
index c3e9269..303cad6 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 0000000..ee1cccd
--- /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 0000000..21bc93f
--- /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 e1bdc1c..6fc4536 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]