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:
@ -54,6 +54,7 @@ gail_c_sources = \
|
|||||||
gailmisc.c
|
gailmisc.c
|
||||||
|
|
||||||
gail_private_h_sources = \
|
gail_private_h_sources = \
|
||||||
|
gail.h \
|
||||||
gtkarrowaccessible.h \
|
gtkarrowaccessible.h \
|
||||||
gtkbooleancellaccessible.h \
|
gtkbooleancellaccessible.h \
|
||||||
gtkboxaccessible.h \
|
gtkboxaccessible.h \
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include "gail.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.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;
|
} GtkIconViewItemAccessibleClass;
|
||||||
|
|
||||||
|
GType _gtk_icon_view_item_accessible_get_type (void);
|
||||||
|
|
||||||
static gboolean gtk_icon_view_item_accessible_is_showing (GtkIconViewItemAccessible *item);
|
static gboolean gtk_icon_view_item_accessible_is_showing (GtkIconViewItemAccessible *item);
|
||||||
|
|
||||||
static void atk_component_item_interface_init (AtkComponentIface *iface);
|
static void atk_component_item_interface_init (AtkComponentIface *iface);
|
||||||
|
@ -37,6 +37,8 @@ struct _GtkLinkButtonAccessibleLinkClass
|
|||||||
|
|
||||||
static void atk_action_interface_init (AtkActionIface *iface);
|
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_DEFINE_TYPE_WITH_CODE (GtkLinkButtonAccessibleLink, _gtk_link_button_accessible_link, ATK_TYPE_HYPERLINK,
|
||||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
|
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
|
||||||
|
|
||||||
|
@ -1669,11 +1669,11 @@ to_visible_column_id (GtkTreeView *treeview,
|
|||||||
return id - invisible;
|
return id - invisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
_gtk_tree_view_accessible_do_add_column (GtkTreeViewAccessible *accessible,
|
gtk_tree_view_accessible_do_add_column (GtkTreeViewAccessible *accessible,
|
||||||
GtkTreeView *treeview,
|
GtkTreeView *treeview,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
guint id)
|
guint id)
|
||||||
{
|
{
|
||||||
guint row, n_rows, n_cols;
|
guint row, n_rows, n_cols;
|
||||||
|
|
||||||
@ -1706,17 +1706,17 @@ _gtk_tree_view_accessible_add_column (GtkTreeView *treeview,
|
|||||||
if (obj == NULL)
|
if (obj == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_gtk_tree_view_accessible_do_add_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
|
gtk_tree_view_accessible_do_add_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
|
||||||
treeview,
|
treeview,
|
||||||
column,
|
column,
|
||||||
to_visible_column_id (treeview, id));
|
to_visible_column_id (treeview, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
_gtk_tree_view_accessible_do_remove_column (GtkTreeViewAccessible *accessible,
|
gtk_tree_view_accessible_do_remove_column (GtkTreeViewAccessible *accessible,
|
||||||
GtkTreeView *treeview,
|
GtkTreeView *treeview,
|
||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
guint id)
|
guint id)
|
||||||
{
|
{
|
||||||
GtkTreeViewAccessibleCellInfo *cell_info;
|
GtkTreeViewAccessibleCellInfo *cell_info;
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
@ -1761,10 +1761,10 @@ _gtk_tree_view_accessible_remove_column (GtkTreeView *treeview,
|
|||||||
if (obj == NULL)
|
if (obj == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_gtk_tree_view_accessible_do_remove_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
|
gtk_tree_view_accessible_do_remove_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
|
||||||
treeview,
|
treeview,
|
||||||
column,
|
column,
|
||||||
to_visible_column_id (treeview, id));
|
to_visible_column_id (treeview, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1795,10 +1795,10 @@ _gtk_tree_view_accessible_toggle_visibility (GtkTreeView *treeview,
|
|||||||
{
|
{
|
||||||
id = get_column_number (treeview, column);
|
id = get_column_number (treeview, column);
|
||||||
|
|
||||||
_gtk_tree_view_accessible_do_add_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
|
gtk_tree_view_accessible_do_add_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
|
||||||
treeview,
|
treeview,
|
||||||
column,
|
column,
|
||||||
id);
|
id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1815,10 +1815,10 @@ _gtk_tree_view_accessible_toggle_visibility (GtkTreeView *treeview,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
_gtk_tree_view_accessible_do_remove_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
|
gtk_tree_view_accessible_do_remove_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
|
||||||
treeview,
|
treeview,
|
||||||
column,
|
column,
|
||||||
id);
|
id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@
|
|||||||
#include "gtkwidgetprivate.h"
|
#include "gtkwidgetprivate.h"
|
||||||
#include "gtkwindowprivate.h"
|
#include "gtkwindowprivate.h"
|
||||||
|
|
||||||
|
#include "a11y/gail.h"
|
||||||
#include "a11y/gailutil.h"
|
#include "a11y/gailutil.h"
|
||||||
|
|
||||||
/* Private type definitions
|
/* Private type definitions
|
||||||
@ -669,10 +670,6 @@ gettext_initialization (void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: Remove me after getting rid of gail */
|
|
||||||
extern void _gtk_accessibility_init (void);
|
|
||||||
extern void _gtk_accessibility_shutdown (void);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_post_parse_initialization (int *argc,
|
do_post_parse_initialization (int *argc,
|
||||||
char ***argv)
|
char ***argv)
|
||||||
|
Reference in New Issue
Block a user