]> Pileus Git - ~andy/gtk/commitdiff
a11y: Add separate accessible for GtkLockButton
authorBenjamin Otte <otte@redhat.com>
Mon, 9 Jul 2012 00:29:16 +0000 (02:29 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 9 Jul 2012 00:29:16 +0000 (02:29 +0200)
The accessible doesn't do anything yet, this is just infrastructure
work.

gtk/a11y/Makefile.am
gtk/a11y/gtklockbuttonaccessible.c [new file with mode: 0644]
gtk/a11y/gtklockbuttonaccessible.h [new file with mode: 0644]
gtk/gtklockbutton.c

index c3e92694f04caa61506845a7865958ada334f27f..303cad6962b9ee013c98cb2789cc54c2406ee872 100644 (file)
@@ -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 (file)
index 0000000..ee1cccd
--- /dev/null
@@ -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 (file)
index 0000000..21bc93f
--- /dev/null
@@ -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__ */
index e1bdc1c1440017dc3524a85ea25bf87bc045ed7e..6fc45367b8127d4b20235c37142f56ae9a9d6e35 100644 (file)
@@ -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