st/icon-theme: Merge private header

GtkIconTheme's headers are split between a public and a private
one. We won't expose the icon theme API at all, nor do we need
to access anything beyond what the texture cache is currently
using, so merge the private header into the implementation.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2620>
This commit is contained in:
Florian Müllner 2023-02-01 13:21:08 +01:00 committed by Marge Bot
parent b9280b0f39
commit 6607bf0928
2 changed files with 17 additions and 55 deletions

View File

@ -1,41 +0,0 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2015 Benjamin Otte <otte@gnome.org>
*
* 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_ICON_THEME_PRIVATE_H__
#define __GTK_ICON_THEME_PRIVATE_H__
#include "st-icon-theme.h"
#include <gtk/gtkcssstyleprivate.h>
void gtk_icon_theme_lookup_symbolic_colors (GtkCssStyle *style,
GdkRGBA *color_out,
GdkRGBA *success_out,
GdkRGBA *warning_out,
GdkRGBA *error_out);
GtkIconInfo *gtk_icon_info_new_for_file (GFile *file,
gint size,
gint scale);
GdkPixbuf * gtk_icon_theme_color_symbolic_pixbuf (GdkPixbuf *symbolic,
const GdkRGBA *fg_color,
const GdkRGBA *success_color,
const GdkRGBA *warning_color,
const GdkRGBA *error_color);
#endif /* __GTK_ICON_THEME_PRIVATE_H__ */

View File

@ -38,7 +38,7 @@
#include "win32/gdkwin32.h"
#endif /* G_OS_WIN32 */
#include "st-icon-theme-private.h"
#include "st-icon-theme.h"
#include "gtkcsspalettevalueprivate.h"
#include "gtkcssrgbavalueprivate.h"
#include "gtkdebug.h"
@ -354,6 +354,9 @@ static IconSuffix theme_dir_get_icon_suffix (IconThemeDir *dir,
static GtkIconInfo *icon_info_new (IconThemeDirType type,
gint dir_size,
gint dir_scale);
static GtkIconInfo *gtk_icon_info_new_for_file (GFile *file,
gint size,
gint scale);
static GtkIconInfo *icon_info_new_builtin (BuiltinIcon *icon);
static IconSuffix suffix_from_name (const gchar *name);
static BuiltinIcon *find_builtin_icon (const gchar *icon_name,
@ -4467,8 +4470,8 @@ rgba_to_pixel(const GdkRGBA *rgba,
pixel[3] = 255;
}
GdkPixbuf *
gtk_icon_theme_color_symbolic_pixbuf (GdkPixbuf *symbolic,
static GdkPixbuf *
color_symbolic_pixbuf (GdkPixbuf *symbolic,
const GdkRGBA *fg_color,
const GdkRGBA *success_color,
const GdkRGBA *warning_color,
@ -4582,7 +4585,7 @@ gtk_icon_info_load_symbolic_png (GtkIconInfo *icon_info,
return NULL;
}
return gtk_icon_theme_color_symbolic_pixbuf (icon_info->pixbuf,
return color_symbolic_pixbuf (icon_info->pixbuf,
fg ? fg : &fg_default,
success_color ? success_color : &success_default,
warning_color ? warning_color : &warning_default,
@ -4862,7 +4865,7 @@ gtk_icon_info_load_symbolic (GtkIconInfo *icon_info,
error);
}
void
static void
gtk_icon_theme_lookup_symbolic_colors (GtkCssStyle *style,
GdkRGBA *color_out,
GdkRGBA *success_out,
@ -5754,7 +5757,7 @@ gtk_icon_info_new_for_pixbuf (GtkIconTheme *icon_theme,
return info;
}
GtkIconInfo *
static GtkIconInfo *
gtk_icon_info_new_for_file (GFile *file,
gint size,
gint scale)