forked from AuroraMiddleware/gtk
gtk: Make functions static that don't need to be non-static
Also remove the starting underscore from function names where appropriate, as those functions are static now and not exported anymore. This is part of a bunch of fixes for gcc complaining about -Wmissing-declarations.
This commit is contained in:
parent
48c6b3b4f4
commit
12683da8f7
@ -641,9 +641,9 @@ _free_signal_info (SignalInfo *info,
|
||||
g_slice_free (SignalInfo, info);
|
||||
}
|
||||
|
||||
void
|
||||
_free_requires_info (RequiresInfo *info,
|
||||
gpointer user_data)
|
||||
static void
|
||||
free_requires_info (RequiresInfo *info,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_free (info->library);
|
||||
g_slice_free (RequiresInfo, info);
|
||||
@ -958,7 +958,7 @@ end_element (GMarkupParseContext *context,
|
||||
req_info->major, req_info->minor,
|
||||
GTK_MAJOR_VERSION, GTK_MINOR_VERSION);
|
||||
}
|
||||
_free_requires_info (req_info, NULL);
|
||||
free_requires_info (req_info, NULL);
|
||||
}
|
||||
else if (strcmp (element_name, "interface") == 0)
|
||||
{
|
||||
@ -1110,7 +1110,7 @@ free_info (CommonInfo *info)
|
||||
else if (strcmp (info->tag.name, "signal") == 0)
|
||||
_free_signal_info ((SignalInfo *)info, NULL);
|
||||
else if (strcmp (info->tag.name, "requires") == 0)
|
||||
_free_requires_info ((RequiresInfo *)info, NULL);
|
||||
free_requires_info ((RequiresInfo *)info, NULL);
|
||||
else if (strcmp (info->tag.name, "menu") == 0)
|
||||
free_menu_info ((MenuInfo *)info);
|
||||
else
|
||||
|
@ -69,7 +69,7 @@ gtk_css_image_real_compute (GtkCssImage *image,
|
||||
return g_object_ref (image);
|
||||
}
|
||||
|
||||
GtkCssImage *
|
||||
static GtkCssImage *
|
||||
gtk_css_image_real_transition (GtkCssImage *start,
|
||||
GtkCssImage *end,
|
||||
guint property_id,
|
||||
@ -375,7 +375,7 @@ _gtk_css_image_get_surface (GtkCssImage *image,
|
||||
return result;
|
||||
}
|
||||
|
||||
GType
|
||||
static GType
|
||||
gtk_css_image_get_parser_type (GtkCssParser *parser)
|
||||
{
|
||||
static const struct {
|
||||
|
@ -48,7 +48,7 @@ gtk_css_image_gradient_compute (GtkCssImage *image,
|
||||
return GTK_CSS_IMAGE (copy);
|
||||
}
|
||||
|
||||
cairo_pattern_t *
|
||||
static cairo_pattern_t *
|
||||
fade_pattern (cairo_pattern_t *pattern,
|
||||
double opacity)
|
||||
{
|
||||
@ -82,7 +82,7 @@ fade_pattern (cairo_pattern_t *pattern,
|
||||
return pattern;
|
||||
}
|
||||
|
||||
cairo_pattern_t *
|
||||
static cairo_pattern_t *
|
||||
transition_pattern (cairo_pattern_t *start,
|
||||
cairo_pattern_t *end,
|
||||
double progress)
|
||||
@ -141,7 +141,7 @@ transition_pattern (cairo_pattern_t *start,
|
||||
return result;
|
||||
}
|
||||
|
||||
GtkCssImage *
|
||||
static GtkCssImage *
|
||||
gtk_css_image_gradient_transition (GtkCssImage *start_image,
|
||||
GtkCssImage *end_image,
|
||||
guint property_id,
|
||||
|
@ -885,11 +885,11 @@ _gtk_css_parser_read_url (GtkCssParser *parser)
|
||||
return file;
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_css_parser_resync_internal (GtkCssParser *parser,
|
||||
gboolean sync_at_semicolon,
|
||||
gboolean read_sync_token,
|
||||
char terminator)
|
||||
static void
|
||||
gtk_css_parser_resync_internal (GtkCssParser *parser,
|
||||
gboolean sync_at_semicolon,
|
||||
gboolean read_sync_token,
|
||||
char terminator)
|
||||
{
|
||||
gsize len;
|
||||
|
||||
@ -984,7 +984,7 @@ _gtk_css_parser_read_value (GtkCssParser *parser)
|
||||
start = parser->data;
|
||||
|
||||
/* This needs to be done better */
|
||||
_gtk_css_parser_resync_internal (parser, TRUE, FALSE, '}');
|
||||
gtk_css_parser_resync_internal (parser, TRUE, FALSE, '}');
|
||||
|
||||
result = g_strndup (start, parser->data - start);
|
||||
if (result)
|
||||
@ -1010,5 +1010,5 @@ _gtk_css_parser_resync (GtkCssParser *parser,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_CSS_PARSER (parser));
|
||||
|
||||
_gtk_css_parser_resync_internal (parser, sync_at_semicolon, TRUE, terminator);
|
||||
gtk_css_parser_resync_internal (parser, sync_at_semicolon, TRUE, terminator);
|
||||
}
|
||||
|
@ -1584,8 +1584,8 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
|
||||
return above;
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_entry_completion_popup (GtkEntryCompletion *completion)
|
||||
static void
|
||||
gtk_entry_completion_popup (GtkEntryCompletion *completion)
|
||||
{
|
||||
GtkTreeViewColumn *column;
|
||||
GtkStyleContext *context;
|
||||
@ -2182,7 +2182,7 @@ gtk_entry_completion_timeout (gpointer data)
|
||||
if (gtk_widget_get_visible (completion->priv->popup_window))
|
||||
_gtk_entry_completion_resize_popup (completion);
|
||||
else
|
||||
_gtk_entry_completion_popup (completion);
|
||||
gtk_entry_completion_popup (completion);
|
||||
}
|
||||
else
|
||||
_gtk_entry_completion_popdown (completion);
|
||||
|
@ -441,16 +441,16 @@ _gtk_plug_add_to_socket (GtkPlug *plug,
|
||||
g_signal_emit_by_name (socket_, "plug-added");
|
||||
}
|
||||
|
||||
/**
|
||||
* _gtk_plug_send_delete_event:
|
||||
/*
|
||||
* gtk_plug_send_delete_event:
|
||||
* @widget: a #GtkWidget
|
||||
*
|
||||
* Send a GDK_DELETE event to the @widget and destroy it if
|
||||
* necessary. Internal GTK function, called from this file or the
|
||||
* backend-specific GtkPlug implementation.
|
||||
*/
|
||||
void
|
||||
_gtk_plug_send_delete_event (GtkWidget *widget)
|
||||
static void
|
||||
gtk_plug_send_delete_event (GtkWidget *widget)
|
||||
{
|
||||
GdkEvent *event = gdk_event_new (GDK_DELETE);
|
||||
|
||||
@ -530,7 +530,7 @@ _gtk_plug_remove_from_socket (GtkPlug *plug,
|
||||
gtk_widget_destroy (GTK_WIDGET (socket_));
|
||||
|
||||
if (window)
|
||||
_gtk_plug_send_delete_event (widget);
|
||||
gtk_plug_send_delete_event (widget);
|
||||
|
||||
g_object_unref (plug);
|
||||
|
||||
@ -895,7 +895,7 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent,
|
||||
if (xre->parent == GDK_WINDOW_XID (gdk_screen_get_root_window (screen)))
|
||||
{
|
||||
GTK_NOTE (PLUGSOCKET, g_message ("GtkPlug: calling gtk_plug_send_delete_event()"));
|
||||
_gtk_plug_send_delete_event (widget);
|
||||
gtk_plug_send_delete_event (widget);
|
||||
|
||||
g_object_notify (G_OBJECT (plug), "embedded");
|
||||
}
|
||||
|
@ -973,11 +973,11 @@ _gtk_rbtree_node_get_index (GtkRBTree *tree,
|
||||
return retval;
|
||||
}
|
||||
|
||||
gint
|
||||
_gtk_rbtree_real_find_offset (GtkRBTree *tree,
|
||||
gint height,
|
||||
GtkRBTree **new_tree,
|
||||
GtkRBNode **new_node)
|
||||
static gint
|
||||
gtk_rbtree_real_find_offset (GtkRBTree *tree,
|
||||
gint height,
|
||||
GtkRBTree **new_tree,
|
||||
GtkRBNode **new_node)
|
||||
{
|
||||
GtkRBNode *tmp_node;
|
||||
|
||||
@ -1021,14 +1021,14 @@ _gtk_rbtree_real_find_offset (GtkRBTree *tree,
|
||||
*new_node = tmp_node;
|
||||
return (height - tmp_node->left->offset);
|
||||
}
|
||||
return _gtk_rbtree_real_find_offset (tmp_node->children,
|
||||
height - tmp_node->left->offset -
|
||||
(tmp_node->offset -
|
||||
tmp_node->left->offset -
|
||||
tmp_node->right->offset -
|
||||
tmp_node->children->root->offset),
|
||||
new_tree,
|
||||
new_node);
|
||||
return gtk_rbtree_real_find_offset (tmp_node->children,
|
||||
height - tmp_node->left->offset -
|
||||
(tmp_node->offset -
|
||||
tmp_node->left->offset -
|
||||
tmp_node->right->offset -
|
||||
tmp_node->children->root->offset),
|
||||
new_tree,
|
||||
new_node);
|
||||
}
|
||||
*new_tree = tree;
|
||||
*new_node = tmp_node;
|
||||
@ -1037,9 +1037,9 @@ _gtk_rbtree_real_find_offset (GtkRBTree *tree,
|
||||
|
||||
gint
|
||||
_gtk_rbtree_find_offset (GtkRBTree *tree,
|
||||
gint height,
|
||||
GtkRBTree **new_tree,
|
||||
GtkRBNode **new_node)
|
||||
gint height,
|
||||
GtkRBTree **new_tree,
|
||||
GtkRBNode **new_node)
|
||||
{
|
||||
g_assert (tree);
|
||||
|
||||
@ -1051,7 +1051,7 @@ _gtk_rbtree_find_offset (GtkRBTree *tree,
|
||||
|
||||
return 0;
|
||||
}
|
||||
return _gtk_rbtree_real_find_offset (tree, height, new_tree, new_node);
|
||||
return gtk_rbtree_real_find_offset (tree, height, new_tree, new_node);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -279,7 +279,7 @@ gtk_style_properties_finalize (GObject *object)
|
||||
G_OBJECT_CLASS (gtk_style_properties_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
GtkStyleProperties *
|
||||
static GtkStyleProperties *
|
||||
gtk_style_properties_get_style (GtkStyleProvider *provider,
|
||||
GtkWidgetPath *path)
|
||||
{
|
||||
|
@ -1298,9 +1298,9 @@ gtk_tool_palette_get_style (GtkToolPalette *palette)
|
||||
return palette->priv->style;
|
||||
}
|
||||
|
||||
gint
|
||||
_gtk_tool_palette_compare_groups (gconstpointer a,
|
||||
gconstpointer b)
|
||||
static gint
|
||||
gtk_tool_palette_compare_groups (gconstpointer a,
|
||||
gconstpointer b)
|
||||
{
|
||||
const GtkToolItemGroupInfo *group_a = a;
|
||||
const GtkToolItemGroupInfo *group_b = b;
|
||||
@ -1351,7 +1351,7 @@ gtk_tool_palette_set_group_position (GtkToolPalette *palette,
|
||||
group_new->pos = position;
|
||||
group_old->pos = old_position;
|
||||
|
||||
g_ptr_array_sort (palette->priv->groups, _gtk_tool_palette_compare_groups);
|
||||
g_ptr_array_sort (palette->priv->groups, gtk_tool_palette_compare_groups);
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (palette));
|
||||
}
|
||||
|
@ -88,9 +88,9 @@ static int check_dir_mtime (const char *dir,
|
||||
return 0;
|
||||
}
|
||||
|
||||
gboolean
|
||||
is_cache_up_to_date (const gchar *path)
|
||||
{
|
||||
static gboolean
|
||||
is_cache_up_to_date (const gchar *path)
|
||||
{
|
||||
gchar *cache_path;
|
||||
gint retval;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user