mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
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.
This commit is contained in:
parent
eddac4911f
commit
9e486139ca
@ -54,6 +54,7 @@ gail_c_sources = \
|
||||
gailmisc.c
|
||||
|
||||
gail_private_h_sources = \
|
||||
gail.h \
|
||||
gtkarrowaccessible.h \
|
||||
gtkbooleancellaccessible.h \
|
||||
gtkboxaccessible.h \
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gail.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
30
gtk/a11y/gail.h
Normal file
30
gtk/a11y/gail.h
Normal file
@ -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__ */
|
@ -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);
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user