icon theme: Make final

Nobody should subclass GtkIconTheme or GtkIconInfo.
This commit is contained in:
Matthias Clasen 2019-05-26 15:33:10 -04:00
parent c2fd6b9fa4
commit 96eefd49fa
2 changed files with 36 additions and 58 deletions

View File

@ -130,6 +130,29 @@ typedef enum
#define DEBUG_CACHE(args)
#endif
typedef struct _GtkIconInfoClass GtkIconInfoClass;
typedef struct _GtkIconThemeClass GtkIconThemeClass;
typedef struct _GtkIconThemePrivate GtkIconThemePrivate;
/**
* GtkIconTheme:
*
* Acts as a database of information about an icon theme.
* Normally, you retrieve the icon theme for a particular
* display using gtk_icon_theme_get_for_display() and it
* will contain information about current icon theme for
* that display, but you can also create a new #GtkIconTheme
* object and set the icon theme name explicitly using
* gtk_icon_theme_set_custom_theme().
*/
struct _GtkIconTheme
{
/*< private >*/
GObject parent_instance;
GtkIconThemePrivate *priv;
};
struct _GtkIconThemePrivate
{
GHashTable *info_cache;
@ -162,6 +185,13 @@ struct _GtkIconThemePrivate
gulong theme_changed_idle;
};
struct _GtkIconThemeClass
{
GObjectClass parent_class;
void (* changed) (GtkIconTheme *icon_theme);
};
typedef struct {
gchar **icon_names;
gint size;
@ -186,6 +216,12 @@ struct _GtkIconInfoClass
GObjectClass parent_class;
};
/**
* GtkIconInfo:
*
* Contains information found when looking up an icon in
* an icon theme.
*/
struct _GtkIconInfo
{
GObject parent_instance;

View File

@ -31,72 +31,14 @@ G_BEGIN_DECLS
#define GTK_TYPE_ICON_INFO (gtk_icon_info_get_type ())
#define GTK_ICON_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ICON_INFO, GtkIconInfo))
#define GTK_ICON_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ICON_INFO, GtkIconInfoClass))
#define GTK_IS_ICON_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ICON_INFO))
#define GTK_IS_ICON_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ICON_INFO))
#define GTK_ICON_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ICON_INFO, GtkIconInfoClass))
#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_ICON_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ICON_THEME, GtkIconThemeClass))
#define GTK_IS_ICON_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ICON_THEME))
#define GTK_IS_ICON_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ICON_THEME))
#define GTK_ICON_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ICON_THEME, GtkIconThemeClass))
/**
* GtkIconInfo:
*
* Contains information found when looking up an icon in
* an icon theme.
*/
typedef struct _GtkIconInfo GtkIconInfo;
typedef struct _GtkIconInfoClass GtkIconInfoClass;
typedef struct _GtkIconTheme GtkIconTheme;
typedef struct _GtkIconThemeClass GtkIconThemeClass;
typedef struct _GtkIconThemePrivate GtkIconThemePrivate;
/**
* GtkIconTheme:
*
* Acts as a database of information about an icon theme.
* Normally, you retrieve the icon theme for a particular
* display using gtk_icon_theme_get_for_display() and it
* will contain information about current icon theme for
* that display, but you can also create a new #GtkIconTheme
* object and set the icon theme name explicitly using
* gtk_icon_theme_set_custom_theme().
*/
struct _GtkIconTheme
{
/*< private >*/
GObject parent_instance;
GtkIconThemePrivate *priv;
};
/**
* GtkIconThemeClass:
* @parent_class: The parent class.
* @changed: Signal emitted when the current icon theme is switched or
* GTK+ detects that a change has occurred in the contents of the
* current icon theme.
*/
struct _GtkIconThemeClass
{
GObjectClass parent_class;
/*< public >*/
void (* changed) (GtkIconTheme *icon_theme);
/*< private >*/
/* Padding for future expansion */
void (*_gtk_reserved1) (void);
void (*_gtk_reserved2) (void);
void (*_gtk_reserved3) (void);
void (*_gtk_reserved4) (void);
};
/**
* GtkIconLookupFlags: