Blame gtk/gtkiconfactory.h

Packit 98cdb6
/* GTK - The GIMP Toolkit
Packit 98cdb6
 * Copyright (C) 2000 Red Hat, Inc.
Packit 98cdb6
 *
Packit 98cdb6
 * This library is free software; you can redistribute it and/or
Packit 98cdb6
 * modify it under the terms of the GNU Lesser General Public
Packit 98cdb6
 * License as published by the Free Software Foundation; either
Packit 98cdb6
 * version 2 of the License, or (at your option) any later version.
Packit 98cdb6
 *
Packit 98cdb6
 * This library is distributed in the hope that it will be useful,
Packit 98cdb6
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 98cdb6
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
Packit 98cdb6
 * Lesser General Public License for more details.
Packit 98cdb6
 *
Packit 98cdb6
 * You should have received a copy of the GNU Lesser General Public
Packit 98cdb6
 * License along with this library; if not, write to the
Packit 98cdb6
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit 98cdb6
 * Boston, MA 02111-1307, USA.
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
/*
Packit 98cdb6
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
Packit 98cdb6
 * file for a list of people on the GTK+ Team.  See the ChangeLog
Packit 98cdb6
 * files for a list of changes.  These files are distributed with
Packit 98cdb6
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
#ifndef __GTK_ICON_FACTORY_H__
Packit 98cdb6
#define __GTK_ICON_FACTORY_H__
Packit 98cdb6
Packit 98cdb6
#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
Packit 98cdb6
#error "Only <gtk/gtk.h> can be included directly."
Packit 98cdb6
#endif
Packit 98cdb6
Packit 98cdb6
#include <gdk/gdk.h>
Packit 98cdb6
#include <gtk/gtkrc.h>
Packit 98cdb6
Packit 98cdb6
G_BEGIN_DECLS
Packit 98cdb6
Packit 98cdb6
typedef struct _GtkIconFactoryClass GtkIconFactoryClass;
Packit 98cdb6
Packit 98cdb6
#define GTK_TYPE_ICON_FACTORY              (gtk_icon_factory_get_type ())
Packit 98cdb6
#define GTK_ICON_FACTORY(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ICON_FACTORY, GtkIconFactory))
Packit 98cdb6
#define GTK_ICON_FACTORY_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ICON_FACTORY, GtkIconFactoryClass))
Packit 98cdb6
#define GTK_IS_ICON_FACTORY(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_ICON_FACTORY))
Packit 98cdb6
#define GTK_IS_ICON_FACTORY_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ICON_FACTORY))
Packit 98cdb6
#define GTK_ICON_FACTORY_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ICON_FACTORY, GtkIconFactoryClass))
Packit 98cdb6
#define GTK_TYPE_ICON_SET                  (gtk_icon_set_get_type ())
Packit 98cdb6
#define GTK_TYPE_ICON_SOURCE               (gtk_icon_source_get_type ())
Packit 98cdb6
Packit 98cdb6
struct _GtkIconFactory
Packit 98cdb6
{
Packit 98cdb6
  GObject parent_instance;
Packit 98cdb6
Packit 98cdb6
  GHashTable *GSEAL (icons);
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
struct _GtkIconFactoryClass
Packit 98cdb6
{
Packit 98cdb6
  GObjectClass parent_class;
Packit 98cdb6
Packit 98cdb6
  /* Padding for future expansion */
Packit 98cdb6
  void (*_gtk_reserved1) (void);
Packit 98cdb6
  void (*_gtk_reserved2) (void);
Packit 98cdb6
  void (*_gtk_reserved3) (void);
Packit 98cdb6
  void (*_gtk_reserved4) (void);
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
#ifdef G_OS_WIN32
Packit 98cdb6
/* Reserve old names for DLL ABI backward compatibility */
Packit 98cdb6
#define gtk_icon_source_set_filename gtk_icon_source_set_filename_utf8
Packit 98cdb6
#define gtk_icon_source_get_filename gtk_icon_source_get_filename_utf8
Packit 98cdb6
#endif
Packit 98cdb6
Packit 98cdb6
GType           gtk_icon_factory_get_type (void) G_GNUC_CONST;
Packit 98cdb6
GtkIconFactory* gtk_icon_factory_new      (void);
Packit 98cdb6
void            gtk_icon_factory_add      (GtkIconFactory *factory,
Packit 98cdb6
                                           const gchar    *stock_id,
Packit 98cdb6
                                           GtkIconSet     *icon_set);
Packit 98cdb6
GtkIconSet*     gtk_icon_factory_lookup   (GtkIconFactory *factory,
Packit 98cdb6
                                           const gchar    *stock_id);
Packit 98cdb6
Packit 98cdb6
/* Manage the default icon factory stack */
Packit 98cdb6
Packit 98cdb6
void        gtk_icon_factory_add_default     (GtkIconFactory  *factory);
Packit 98cdb6
void        gtk_icon_factory_remove_default  (GtkIconFactory  *factory);
Packit 98cdb6
GtkIconSet* gtk_icon_factory_lookup_default  (const gchar     *stock_id);
Packit 98cdb6
Packit 98cdb6
/* Get preferred real size from registered semantic size.  Note that
Packit 98cdb6
 * themes SHOULD use this size, but they aren't required to; for size
Packit 98cdb6
 * requests and such, you should get the actual pixbuf from the icon
Packit 98cdb6
 * set and see what size was rendered.
Packit 98cdb6
 *
Packit 98cdb6
 * This function is intended for people who are scaling icons,
Packit 98cdb6
 * rather than for people who are displaying already-scaled icons.
Packit 98cdb6
 * That is, if you are displaying an icon, you should get the
Packit 98cdb6
 * size from the rendered pixbuf, not from here.
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
#ifndef GDK_MULTIHEAD_SAFE
Packit 98cdb6
gboolean gtk_icon_size_lookup              (GtkIconSize  size,
Packit 98cdb6
					    gint        *width,
Packit 98cdb6
					    gint        *height);
Packit 98cdb6
#endif /* GDK_MULTIHEAD_SAFE */
Packit 98cdb6
gboolean gtk_icon_size_lookup_for_settings (GtkSettings *settings,
Packit 98cdb6
					    GtkIconSize  size,
Packit 98cdb6
					    gint        *width,
Packit 98cdb6
					    gint        *height);
Packit 98cdb6
Packit 98cdb6
GtkIconSize           gtk_icon_size_register       (const gchar *name,
Packit 98cdb6
                                                    gint         width,
Packit 98cdb6
                                                    gint         height);
Packit 98cdb6
void                  gtk_icon_size_register_alias (const gchar *alias,
Packit 98cdb6
                                                    GtkIconSize  target);
Packit 98cdb6
GtkIconSize           gtk_icon_size_from_name      (const gchar *name);
Packit 98cdb6
const gchar *         gtk_icon_size_get_name       (GtkIconSize  size);
Packit 98cdb6
Packit 98cdb6
/* Icon sets */
Packit 98cdb6
Packit 98cdb6
GType       gtk_icon_set_get_type        (void) G_GNUC_CONST;
Packit 98cdb6
GtkIconSet* gtk_icon_set_new             (void);
Packit 98cdb6
GtkIconSet* gtk_icon_set_new_from_pixbuf (GdkPixbuf       *pixbuf);
Packit 98cdb6
Packit 98cdb6
GtkIconSet* gtk_icon_set_ref             (GtkIconSet      *icon_set);
Packit 98cdb6
void        gtk_icon_set_unref           (GtkIconSet      *icon_set);
Packit 98cdb6
GtkIconSet* gtk_icon_set_copy            (GtkIconSet      *icon_set);
Packit 98cdb6
Packit 98cdb6
/* Get one of the icon variants in the set, creating the variant if
Packit 98cdb6
 * necessary.
Packit 98cdb6
 */
Packit 98cdb6
GdkPixbuf*  gtk_icon_set_render_icon     (GtkIconSet      *icon_set,
Packit 98cdb6
                                          GtkStyle        *style,
Packit 98cdb6
                                          GtkTextDirection direction,
Packit 98cdb6
                                          GtkStateType     state,
Packit 98cdb6
                                          GtkIconSize      size,
Packit 98cdb6
                                          GtkWidget       *widget,
Packit 98cdb6
                                          const char      *detail);
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
void           gtk_icon_set_add_source   (GtkIconSet          *icon_set,
Packit 98cdb6
                                          const GtkIconSource *source);
Packit 98cdb6
Packit 98cdb6
void           gtk_icon_set_get_sizes    (GtkIconSet          *icon_set,
Packit 98cdb6
                                          GtkIconSize        **sizes,
Packit 98cdb6
                                          gint                *n_sizes);
Packit 98cdb6
Packit 98cdb6
GType          gtk_icon_source_get_type                 (void) G_GNUC_CONST;
Packit 98cdb6
GtkIconSource* gtk_icon_source_new                      (void);
Packit 98cdb6
GtkIconSource* gtk_icon_source_copy                     (const GtkIconSource *source);
Packit 98cdb6
void           gtk_icon_source_free                     (GtkIconSource       *source);
Packit 98cdb6
Packit 98cdb6
void           gtk_icon_source_set_filename             (GtkIconSource       *source,
Packit 98cdb6
                                                         const gchar         *filename);
Packit 98cdb6
void           gtk_icon_source_set_icon_name            (GtkIconSource       *source,
Packit 98cdb6
                                                         const gchar         *icon_name);
Packit 98cdb6
void           gtk_icon_source_set_pixbuf               (GtkIconSource       *source,
Packit 98cdb6
                                                         GdkPixbuf           *pixbuf);
Packit 98cdb6
Packit 98cdb6
const gchar* gtk_icon_source_get_filename  (const GtkIconSource *source);
Packit 98cdb6
const gchar* gtk_icon_source_get_icon_name (const GtkIconSource *source);
Packit 98cdb6
GdkPixbuf*            gtk_icon_source_get_pixbuf    (const GtkIconSource *source);
Packit 98cdb6
Packit 98cdb6
void             gtk_icon_source_set_direction_wildcarded (GtkIconSource       *source,
Packit 98cdb6
                                                           gboolean             setting);
Packit 98cdb6
void             gtk_icon_source_set_state_wildcarded     (GtkIconSource       *source,
Packit 98cdb6
                                                           gboolean             setting);
Packit 98cdb6
void             gtk_icon_source_set_size_wildcarded      (GtkIconSource       *source,
Packit 98cdb6
                                                           gboolean             setting);
Packit 98cdb6
gboolean         gtk_icon_source_get_size_wildcarded      (const GtkIconSource *source);
Packit 98cdb6
gboolean         gtk_icon_source_get_state_wildcarded     (const GtkIconSource *source);
Packit 98cdb6
gboolean         gtk_icon_source_get_direction_wildcarded (const GtkIconSource *source);
Packit 98cdb6
void             gtk_icon_source_set_direction            (GtkIconSource       *source,
Packit 98cdb6
                                                           GtkTextDirection     direction);
Packit 98cdb6
void             gtk_icon_source_set_state                (GtkIconSource       *source,
Packit 98cdb6
                                                           GtkStateType         state);
Packit 98cdb6
void             gtk_icon_source_set_size                 (GtkIconSource       *source,
Packit 98cdb6
                                                           GtkIconSize          size);
Packit 98cdb6
GtkTextDirection gtk_icon_source_get_direction            (const GtkIconSource *source);
Packit 98cdb6
GtkStateType     gtk_icon_source_get_state                (const GtkIconSource *source);
Packit 98cdb6
GtkIconSize      gtk_icon_source_get_size                 (const GtkIconSource *source);
Packit 98cdb6
Packit 98cdb6
Packit 98cdb6
/* ignore this */
Packit 98cdb6
void _gtk_icon_set_invalidate_caches (void);
Packit 98cdb6
GList* _gtk_icon_factory_list_ids (void);
Packit 98cdb6
void _gtk_icon_factory_ensure_default_icons (void);
Packit 98cdb6
Packit 98cdb6
G_END_DECLS
Packit 98cdb6
Packit 98cdb6
#endif /* __GTK_ICON_FACTORY_H__ */