2003-07-02 22:44:09 +00:00
|
|
|
/* GtkIconTheme - a loader for icon themes
|
|
|
|
* gtk-icon-loader.h Copyright (C) 2002, 2003 Red Hat, 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
|
2012-02-27 13:01:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2003-07-02 22:44:09 +00:00
|
|
|
*/
|
|
|
|
|
2012-12-28 14:57:34 +00:00
|
|
|
#ifndef __GTK_ICON_THEME_H__
|
|
|
|
#define __GTK_ICON_THEME_H__
|
|
|
|
|
2009-10-21 18:30:04 +00:00
|
|
|
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
2008-05-28 15:07:04 +00:00
|
|
|
#error "Only <gtk/gtk.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2008-04-18 14:56:23 +00:00
|
|
|
#include <gdk/gdk.h>
|
2020-02-02 00:13:27 +00:00
|
|
|
#include <gtk/gtkenums.h>
|
2003-07-02 22:44:09 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2020-02-04 16:19:22 +00:00
|
|
|
#define GTK_TYPE_ICON_PAINTABLE (gtk_icon_paintable_get_type ())
|
|
|
|
#define GTK_ICON_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ICON_PAINTABLE, GtkIconPaintable))
|
|
|
|
#define GTK_IS_ICON_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ICON_PAINTABLE))
|
2003-07-02 22:44:09 +00:00
|
|
|
|
2020-01-28 14:43:51 +00:00
|
|
|
#define GTK_TYPE_ICON_THEME (gtk_icon_theme_get_type ())
|
|
|
|
#define GTK_ICON_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ICON_THEME, GtkIconTheme))
|
|
|
|
#define GTK_IS_ICON_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ICON_THEME))
|
2003-07-02 22:44:09 +00:00
|
|
|
|
2020-02-04 16:19:22 +00:00
|
|
|
typedef struct _GtkIconPaintable GtkIconPaintable;
|
|
|
|
typedef struct _GtkIconTheme GtkIconTheme;
|
2003-07-02 22:44:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GtkIconLookupFlags:
|
2014-05-11 00:30:50 +00:00
|
|
|
* @GTK_ICON_LOOKUP_FORCE_REGULAR: Try to always load regular icons, even
|
2018-06-25 23:21:08 +00:00
|
|
|
* when symbolic icon names are given
|
2014-05-11 00:30:50 +00:00
|
|
|
* @GTK_ICON_LOOKUP_FORCE_SYMBOLIC: Try to always load symbolic icons, even
|
2018-06-25 23:21:08 +00:00
|
|
|
* when regular icon names are given
|
2020-02-11 12:46:12 +00:00
|
|
|
* @GTK_ICON_LOOKUP_PRELOAD: Starts loading the texture in the background
|
2020-02-07 16:25:18 +00:00
|
|
|
* so it is ready when later needed.
|
2019-08-29 15:07:45 +00:00
|
|
|
*
|
2003-07-02 22:44:09 +00:00
|
|
|
* Used to specify options for gtk_icon_theme_lookup_icon()
|
2014-01-21 03:57:10 +00:00
|
|
|
*/
|
2003-07-02 22:44:09 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2020-02-10 10:43:47 +00:00
|
|
|
GTK_ICON_LOOKUP_FORCE_REGULAR = 1 << 0,
|
|
|
|
GTK_ICON_LOOKUP_FORCE_SYMBOLIC = 1 << 1,
|
|
|
|
GTK_ICON_LOOKUP_PRELOAD = 1 << 2,
|
2003-07-02 22:44:09 +00:00
|
|
|
} GtkIconLookupFlags;
|
|
|
|
|
2011-04-14 21:07:29 +00:00
|
|
|
/**
|
|
|
|
* GTK_ICON_THEME_ERROR:
|
|
|
|
*
|
|
|
|
* The #GQuark used for #GtkIconThemeError errors.
|
|
|
|
*/
|
2003-07-02 22:44:09 +00:00
|
|
|
#define GTK_ICON_THEME_ERROR gtk_icon_theme_error_quark ()
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GtkIconThemeError:
|
|
|
|
* @GTK_ICON_THEME_NOT_FOUND: The icon specified does not exist in the theme
|
|
|
|
* @GTK_ICON_THEME_FAILED: An unspecified error occurred.
|
2019-08-29 15:07:45 +00:00
|
|
|
*
|
2003-07-02 22:44:09 +00:00
|
|
|
* Error codes for GtkIconTheme operations.
|
|
|
|
**/
|
|
|
|
typedef enum {
|
|
|
|
GTK_ICON_THEME_NOT_FOUND,
|
|
|
|
GTK_ICON_THEME_FAILED
|
|
|
|
} GtkIconThemeError;
|
|
|
|
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2004-11-23 20:02:15 +00:00
|
|
|
GQuark gtk_icon_theme_error_quark (void);
|
2003-07-02 22:44:09 +00:00
|
|
|
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-04 16:19:22 +00:00
|
|
|
GType gtk_icon_theme_get_type (void) G_GNUC_CONST;
|
2003-07-02 22:44:09 +00:00
|
|
|
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-04 16:19:22 +00:00
|
|
|
GtkIconTheme *gtk_icon_theme_new (void);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-04 16:19:22 +00:00
|
|
|
GtkIconTheme *gtk_icon_theme_get_for_display (GdkDisplay *display);
|
2003-07-02 22:44:09 +00:00
|
|
|
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-04 16:19:22 +00:00
|
|
|
void gtk_icon_theme_set_search_path (GtkIconTheme *self,
|
2020-02-18 05:56:37 +00:00
|
|
|
const char * const *path);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-18 05:56:37 +00:00
|
|
|
char ** gtk_icon_theme_get_search_path (GtkIconTheme *self);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-18 05:56:37 +00:00
|
|
|
void gtk_icon_theme_add_search_path (GtkIconTheme *self,
|
|
|
|
const char *path);
|
2003-07-02 22:44:09 +00:00
|
|
|
|
2020-02-18 05:56:37 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
|
|
void gtk_icon_theme_set_resource_path (GtkIconTheme *self,
|
|
|
|
const char * const *path);
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
|
|
char ** gtk_icon_theme_get_resource_path (GtkIconTheme *self);
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-04 16:19:22 +00:00
|
|
|
void gtk_icon_theme_add_resource_path (GtkIconTheme *self,
|
2020-02-18 05:56:37 +00:00
|
|
|
const char *path);
|
2014-06-20 04:46:09 +00:00
|
|
|
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-18 05:56:37 +00:00
|
|
|
void gtk_icon_theme_set_theme_name (GtkIconTheme *self,
|
|
|
|
const char *theme_name);
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
|
|
char * gtk_icon_theme_get_theme_name (GtkIconTheme *self);
|
2003-07-02 22:44:09 +00:00
|
|
|
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-04 16:19:22 +00:00
|
|
|
gboolean gtk_icon_theme_has_icon (GtkIconTheme *self,
|
2020-07-24 18:40:36 +00:00
|
|
|
const char *icon_name);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-07-24 13:54:49 +00:00
|
|
|
int *gtk_icon_theme_get_icon_sizes (GtkIconTheme *self,
|
2020-07-24 18:40:36 +00:00
|
|
|
const char *icon_name);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-04 16:19:22 +00:00
|
|
|
GtkIconPaintable *gtk_icon_theme_lookup_icon (GtkIconTheme *self,
|
|
|
|
const char *icon_name,
|
|
|
|
const char *fallbacks[],
|
2020-07-24 13:54:49 +00:00
|
|
|
int size,
|
|
|
|
int scale,
|
2020-02-04 16:19:22 +00:00
|
|
|
GtkTextDirection direction,
|
|
|
|
GtkIconLookupFlags flags);
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-04 16:19:22 +00:00
|
|
|
GtkIconPaintable *gtk_icon_theme_lookup_by_gicon (GtkIconTheme *self,
|
|
|
|
GIcon *icon,
|
2020-07-24 13:54:49 +00:00
|
|
|
int size,
|
|
|
|
int scale,
|
2020-02-04 16:19:22 +00:00
|
|
|
GtkTextDirection direction,
|
|
|
|
GtkIconLookupFlags flags);
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-10 11:57:27 +00:00
|
|
|
GtkIconPaintable *gtk_icon_paintable_new_for_file (GFile *file,
|
2020-07-24 13:54:49 +00:00
|
|
|
int size,
|
|
|
|
int scale);
|
2020-02-10 11:57:27 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-18 05:56:37 +00:00
|
|
|
char ** gtk_icon_theme_get_icon_names (GtkIconTheme *self);
|
2020-01-28 14:43:51 +00:00
|
|
|
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-04 16:19:22 +00:00
|
|
|
GType gtk_icon_paintable_get_type (void) G_GNUC_CONST;
|
2008-05-29 14:33:49 +00:00
|
|
|
|
2013-03-20 22:17:32 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-10 11:33:17 +00:00
|
|
|
GFile * gtk_icon_paintable_get_file (GtkIconPaintable *self);
|
2020-02-06 16:28:19 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-07-24 18:40:36 +00:00
|
|
|
const char * gtk_icon_paintable_get_icon_name (GtkIconPaintable *self);
|
2020-02-06 16:33:19 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
|
|
gboolean gtk_icon_paintable_is_symbolic (GtkIconPaintable *self);
|
2016-10-05 16:35:06 +00:00
|
|
|
|
2003-07-02 22:44:09 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GTK_ICON_THEME_H__ */
|