[gtk+/composite-templates] a11y: Fix for -Wmissing-declarations
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/composite-templates] a11y: Fix for -Wmissing-declarations
- Date: Sat, 6 Oct 2012 17:12:11 +0000 (UTC)
commit 136bced7e832bce6e61c673d65511bb14d606e3f
Author: Benjamin Otte <otte redhat com>
Date: Tue Oct 2 19:13:30 2012 +0200
a11y: Fix for -Wmissing-declarations
I'll add a bunch of fixes for gcc complaining about
-Wmissing-declarations after finding a bunch of cases today where I had
forgotten to make functions static in the CSS code.
A thorn in those patches is G_DEFINE_TYPE() which doesn't allow making
the get_type() function static, so I added definitions for that function
above the G_DEFINE_TYPE().
After those patches, GTK should compile without warnings when this flag
is enabled.
gtk/a11y/Makefile.am | 1 +
gtk/a11y/gail.c | 2 +
gtk/a11y/gail.h | 30 ++++++++++++++++++++
gtk/a11y/gtkiconviewaccessible.c | 2 +
gtk/a11y/gtklinkbuttonaccessible.c | 2 +
gtk/a11y/gtktreeviewaccessible.c | 52 ++++++++++++++++++------------------
gtk/gtkmain.c | 5 +---
7 files changed, 64 insertions(+), 30 deletions(-)
---
diff --git a/gtk/a11y/Makefile.am b/gtk/a11y/Makefile.am
index 303cad6..1bc1419 100644
--- a/gtk/a11y/Makefile.am
+++ b/gtk/a11y/Makefile.am
@@ -54,6 +54,7 @@ gail_c_sources = \
gailmisc.c
gail_private_h_sources = \
+ gail.h \
gtkarrowaccessible.h \
gtkbooleancellaccessible.h \
gtkboxaccessible.h \
diff --git a/gtk/a11y/gail.c b/gtk/a11y/gail.c
index 82c657e..8f50846 100644
--- a/gtk/a11y/gail.c
+++ b/gtk/a11y/gail.c
@@ -17,6 +17,8 @@
#include "config.h"
+#include "gail.h"
+
#include <stdio.h>
#include <stdlib.h>
diff --git a/gtk/a11y/gail.h b/gtk/a11y/gail.h
new file mode 100644
index 0000000..6280451
--- /dev/null
+++ b/gtk/a11y/gail.h
@@ -0,0 +1,30 @@
+/* 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 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/>.
+ */
+
+#ifndef __GTK_GAIL_H__
+#define __GTK_GAIL_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+void _gtk_accessibility_shutdown (void);
+void _gtk_accessibility_init (void);
+
+G_END_DECLS
+
+#endif /* __GTK_GAIL_H__ */
diff --git a/gtk/a11y/gtkiconviewaccessible.c b/gtk/a11y/gtkiconviewaccessible.c
index 40333b7..533df60 100644
--- a/gtk/a11y/gtkiconviewaccessible.c
+++ b/gtk/a11y/gtkiconviewaccessible.c
@@ -51,6 +51,8 @@ typedef struct
} GtkIconViewItemAccessibleClass;
+GType _gtk_icon_view_item_accessible_get_type (void);
+
static gboolean gtk_icon_view_item_accessible_is_showing (GtkIconViewItemAccessible *item);
static void atk_component_item_interface_init (AtkComponentIface *iface);
diff --git a/gtk/a11y/gtklinkbuttonaccessible.c b/gtk/a11y/gtklinkbuttonaccessible.c
index 37ea3a7..9e002f2 100644
--- a/gtk/a11y/gtklinkbuttonaccessible.c
+++ b/gtk/a11y/gtklinkbuttonaccessible.c
@@ -37,6 +37,8 @@ struct _GtkLinkButtonAccessibleLinkClass
static void atk_action_interface_init (AtkActionIface *iface);
+GType _gtk_link_button_accessible_link_get_type (void);
+
G_DEFINE_TYPE_WITH_CODE (GtkLinkButtonAccessibleLink, _gtk_link_button_accessible_link, ATK_TYPE_HYPERLINK,
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index 6e1d3c7..36fbf31 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -1669,11 +1669,11 @@ to_visible_column_id (GtkTreeView *treeview,
return id - invisible;
}
-void
-_gtk_tree_view_accessible_do_add_column (GtkTreeViewAccessible *accessible,
- GtkTreeView *treeview,
- GtkTreeViewColumn *column,
- guint id)
+static void
+gtk_tree_view_accessible_do_add_column (GtkTreeViewAccessible *accessible,
+ GtkTreeView *treeview,
+ GtkTreeViewColumn *column,
+ guint id)
{
guint row, n_rows, n_cols;
@@ -1706,17 +1706,17 @@ _gtk_tree_view_accessible_add_column (GtkTreeView *treeview,
if (obj == NULL)
return;
- _gtk_tree_view_accessible_do_add_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
- treeview,
- column,
- to_visible_column_id (treeview, id));
+ gtk_tree_view_accessible_do_add_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
+ treeview,
+ column,
+ to_visible_column_id (treeview, id));
}
-void
-_gtk_tree_view_accessible_do_remove_column (GtkTreeViewAccessible *accessible,
- GtkTreeView *treeview,
- GtkTreeViewColumn *column,
- guint id)
+static void
+gtk_tree_view_accessible_do_remove_column (GtkTreeViewAccessible *accessible,
+ GtkTreeView *treeview,
+ GtkTreeViewColumn *column,
+ guint id)
{
GtkTreeViewAccessibleCellInfo *cell_info;
GHashTableIter iter;
@@ -1761,10 +1761,10 @@ _gtk_tree_view_accessible_remove_column (GtkTreeView *treeview,
if (obj == NULL)
return;
- _gtk_tree_view_accessible_do_remove_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
- treeview,
- column,
- to_visible_column_id (treeview, id));
+ gtk_tree_view_accessible_do_remove_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
+ treeview,
+ column,
+ to_visible_column_id (treeview, id));
}
void
@@ -1795,10 +1795,10 @@ _gtk_tree_view_accessible_toggle_visibility (GtkTreeView *treeview,
{
id = get_column_number (treeview, column);
- _gtk_tree_view_accessible_do_add_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
- treeview,
- column,
- id);
+ gtk_tree_view_accessible_do_add_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
+ treeview,
+ column,
+ id);
}
else
{
@@ -1815,10 +1815,10 @@ _gtk_tree_view_accessible_toggle_visibility (GtkTreeView *treeview,
break;
}
- _gtk_tree_view_accessible_do_remove_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
- treeview,
- column,
- id);
+ gtk_tree_view_accessible_do_remove_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
+ treeview,
+ column,
+ id);
}
}
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 1fd7f19..80dd3e4 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -128,6 +128,7 @@
#include "gtkwidgetprivate.h"
#include "gtkwindowprivate.h"
+#include "a11y/gail.h"
#include "a11y/gailutil.h"
/* Private type definitions
@@ -669,10 +670,6 @@ gettext_initialization (void)
#endif
}
-/* XXX: Remove me after getting rid of gail */
-extern void _gtk_accessibility_init (void);
-extern void _gtk_accessibility_shutdown (void);
-
static void
do_post_parse_initialization (int *argc,
char ***argv)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]