Remove leading underscore from private symbols

There's no need to do that any more, as only explicitly annotated
symbols are exported.
This commit is contained in:
Emmanuele Bassi 2018-02-01 16:05:58 +01:00
parent fe142b10bf
commit a379ddefc3
3 changed files with 55 additions and 53 deletions

View File

@ -57,14 +57,14 @@ struct _GtkIconCache {
};
GtkIconCache *
_gtk_icon_cache_ref (GtkIconCache *cache)
gtk_icon_cache_ref (GtkIconCache *cache)
{
cache->ref_count++;
return cache;
}
void
_gtk_icon_cache_unref (GtkIconCache *cache)
gtk_icon_cache_unref (GtkIconCache *cache)
{
cache->ref_count --;
@ -79,7 +79,7 @@ _gtk_icon_cache_unref (GtkIconCache *cache)
}
GtkIconCache *
_gtk_icon_cache_new_for_path (const gchar *path)
gtk_icon_cache_new_for_path (const gchar *path)
{
GtkIconCache *cache = NULL;
GMappedFile *map;
@ -139,7 +139,7 @@ _gtk_icon_cache_new_for_path (const gchar *path)
info.n_directories = 0;
info.flags = CHECK_OFFSETS|CHECK_STRINGS;
if (!_gtk_icon_cache_validate (&info))
if (!gtk_icon_cache_validate (&info))
{
g_mapped_file_unref (map);
g_warning ("Icon cache '%s' is invalid", cache_filename);
@ -165,7 +165,7 @@ _gtk_icon_cache_new_for_path (const gchar *path)
}
GtkIconCache *
_gtk_icon_cache_new (const gchar *data)
gtk_icon_cache_new (const gchar *data)
{
GtkIconCache *cache;
@ -201,7 +201,7 @@ get_directory_index (GtkIconCache *cache,
}
gint
_gtk_icon_cache_get_directory_index (GtkIconCache *cache,
gtk_icon_cache_get_directory_index (GtkIconCache *cache,
const gchar *directory)
{
return get_directory_index (cache, directory);
@ -283,7 +283,7 @@ find_dir:
}
gint
_gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
const gchar *icon_name,
gint directory_index)
{
@ -298,7 +298,7 @@ _gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
}
gboolean
_gtk_icon_cache_has_icons (GtkIconCache *cache,
gtk_icon_cache_has_icons (GtkIconCache *cache,
const gchar *directory)
{
int directory_index;
@ -338,7 +338,7 @@ _gtk_icon_cache_has_icons (GtkIconCache *cache,
}
void
_gtk_icon_cache_add_icons (GtkIconCache *cache,
gtk_icon_cache_add_icons (GtkIconCache *cache,
const gchar *directory,
GHashTable *hash_table)
{
@ -380,7 +380,7 @@ _gtk_icon_cache_add_icons (GtkIconCache *cache,
}
gboolean
_gtk_icon_cache_has_icon (GtkIconCache *cache,
gtk_icon_cache_has_icon (GtkIconCache *cache,
const gchar *icon_name)
{
guint32 hash_offset;
@ -409,7 +409,7 @@ _gtk_icon_cache_has_icon (GtkIconCache *cache,
}
gboolean
_gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache,
gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache,
const gchar *icon_name,
const gchar *directory)
{
@ -470,11 +470,11 @@ pixbuf_destroy_cb (guchar *pixels,
{
GtkIconCache *cache = data;
_gtk_icon_cache_unref (cache);
gtk_icon_cache_unref (cache);
}
GdkPixbuf *
_gtk_icon_cache_get_icon (GtkIconCache *cache,
gtk_icon_cache_get_icon (GtkIconCache *cache,
const gchar *icon_name,
gint directory_index)
{
@ -531,7 +531,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
return NULL;
}
_gtk_icon_cache_ref (cache);
gtk_icon_cache_ref (cache);
return pixbuf;
}

View File

@ -14,38 +14,40 @@
* 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_ICON_CACHE_H__
#define __GTK_ICON_CACHE_H__
#ifndef __GTK_ICON_CACHE_PRIVATE_H__
#define __GTK_ICON_CACHE_PRIVATE_H__
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
G_BEGIN_DECLS
typedef struct _GtkIconCache GtkIconCache;
GtkIconCache *_gtk_icon_cache_new (const gchar *data);
GtkIconCache *_gtk_icon_cache_new_for_path (const gchar *path);
gint _gtk_icon_cache_get_directory_index (GtkIconCache *cache,
const gchar *directory);
gboolean _gtk_icon_cache_has_icon (GtkIconCache *cache,
const gchar *icon_name);
gboolean _gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache,
const gchar *icon_name,
const gchar *directory);
gboolean _gtk_icon_cache_has_icons (GtkIconCache *cache,
const gchar *directory);
void _gtk_icon_cache_add_icons (GtkIconCache *cache,
const gchar *directory,
GHashTable *hash_table);
GtkIconCache *gtk_icon_cache_new (const gchar *data);
GtkIconCache *gtk_icon_cache_new_for_path (const gchar *path);
gint gtk_icon_cache_get_directory_index (GtkIconCache *cache,
const gchar *directory);
gboolean gtk_icon_cache_has_icon (GtkIconCache *cache,
const gchar *icon_name);
gboolean gtk_icon_cache_has_icon_in_directory (GtkIconCache *cache,
const gchar *icon_name,
const gchar *directory);
gboolean gtk_icon_cache_has_icons (GtkIconCache *cache,
const gchar *directory);
void gtk_icon_cache_add_icons (GtkIconCache *cache,
const gchar *directory,
GHashTable *hash_table);
gint _gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
const gchar *icon_name,
gint directory_index);
GdkPixbuf *_gtk_icon_cache_get_icon (GtkIconCache *cache,
const gchar *icon_name,
gint directory_index);
gint gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
const gchar *icon_name,
gint directory_index);
GdkPixbuf *gtk_icon_cache_get_icon (GtkIconCache *cache,
const gchar *icon_name,
gint directory_index);
GtkIconCache *_gtk_icon_cache_ref (GtkIconCache *cache);
void _gtk_icon_cache_unref (GtkIconCache *cache);
GtkIconCache *gtk_icon_cache_ref (GtkIconCache *cache);
void gtk_icon_cache_unref (GtkIconCache *cache);
G_END_DECLS
#endif /* __GTK_ICON_CACHE_H__ */
#endif /* __GTK_ICON_CACHE_PRIVATE_H__ */

View File

@ -702,7 +702,7 @@ static void
free_dir_mtime (IconThemeDirMtime *dir_mtime)
{
if (dir_mtime->cache)
_gtk_icon_cache_unref (dir_mtime->cache);
gtk_icon_cache_unref (dir_mtime->cache);
g_free (dir_mtime->dir);
g_slice_free (IconThemeDirMtime, dir_mtime);
@ -1347,7 +1347,7 @@ load_themes (GtkIconTheme *icon_theme)
dir_mtime->mtime = stat_buf.st_mtime;
dir_mtime->exists = TRUE;
dir_mtime->cache = _gtk_icon_cache_new_for_path (dir);
dir_mtime->cache = gtk_icon_cache_new_for_path (dir);
if (dir_mtime->cache != NULL)
continue;
@ -2393,7 +2393,7 @@ gtk_icon_theme_has_icon (GtkIconTheme *icon_theme,
IconThemeDirMtime *dir_mtime = l->data;
GtkIconCache *cache = dir_mtime->cache;
if (cache && _gtk_icon_cache_has_icon (cache, icon_name))
if (cache && gtk_icon_cache_has_icon (cache, icon_name))
return TRUE;
}
@ -2740,7 +2740,7 @@ static void
theme_dir_destroy (IconThemeDir *dir)
{
if (dir->cache)
_gtk_icon_cache_unref (dir->cache);
gtk_icon_cache_unref (dir->cache);
if (dir->icons)
g_hash_table_destroy (dir->icons);
@ -2854,7 +2854,7 @@ theme_dir_get_icon_suffix (IconThemeDir *dir,
if (dir->cache)
{
suffix = (IconSuffix)_gtk_icon_cache_get_icon_flags (dir->cache,
suffix = (IconSuffix)gtk_icon_cache_get_icon_flags (dir->cache,
icon_name,
dir->subdir_index);
@ -2862,7 +2862,7 @@ theme_dir_get_icon_suffix (IconThemeDir *dir,
{
/* Look for foo-symbolic.symbolic.png, as the cache only stores the ".png" suffix */
char *icon_name_with_prefix = g_strconcat (icon_name, ".symbolic", NULL);
symbolic_suffix = (IconSuffix)_gtk_icon_cache_get_icon_flags (dir->cache,
symbolic_suffix = (IconSuffix)gtk_icon_cache_get_icon_flags (dir->cache,
icon_name_with_prefix,
dir->subdir_index);
g_free (icon_name_with_prefix);
@ -3031,7 +3031,7 @@ theme_lookup_icon (IconTheme *theme,
if (min_dir->cache)
{
icon_info->cache_pixbuf = _gtk_icon_cache_get_icon (min_dir->cache, icon_name,
icon_info->cache_pixbuf = gtk_icon_cache_get_icon (min_dir->cache, icon_name,
min_dir->subdir_index);
}
@ -3057,7 +3057,7 @@ theme_list_icons (IconTheme *theme,
context == 0)
{
if (dir->cache)
_gtk_icon_cache_add_icons (dir->cache, dir->subdir, icons);
gtk_icon_cache_add_icons (dir->cache, dir->subdir, icons);
else
g_hash_table_foreach (dir->icons, add_key_to_hash, icons);
}
@ -3077,7 +3077,7 @@ theme_has_icon (IconTheme *theme,
if (dir->cache)
{
if (_gtk_icon_cache_has_icon (dir->cache, icon_name))
if (gtk_icon_cache_has_icon (dir->cache, icon_name))
return TRUE;
}
else
@ -3274,7 +3274,7 @@ theme_subdir_load (GtkIconTheme *icon_theme,
if (dir_mtime->cache == NULL)
{
/* This will return NULL if the cache doesn't exist or is outdated */
dir_mtime->cache = _gtk_icon_cache_new_for_path (dir_mtime->dir);
dir_mtime->cache = gtk_icon_cache_new_for_path (dir_mtime->dir);
}
dir = g_new0 (IconThemeDir, 1);
@ -3291,9 +3291,9 @@ theme_subdir_load (GtkIconTheme *icon_theme,
if (dir_mtime->cache != NULL)
{
dir->cache = _gtk_icon_cache_ref (dir_mtime->cache);
dir->subdir_index = _gtk_icon_cache_get_directory_index (dir->cache, dir->subdir);
has_icons = _gtk_icon_cache_has_icons (dir->cache, dir->subdir);
dir->cache = gtk_icon_cache_ref (dir_mtime->cache);
dir->subdir_index = gtk_icon_cache_get_directory_index (dir->cache, dir->subdir);
has_icons = gtk_icon_cache_has_icons (dir->cache, dir->subdir);
}
else
{