#ifndef __GM_COLOR_TABLE_H__ #define __GM_COLOR_TABLE_H__ #include #include "gm-options.h" G_BEGIN_DECLS /* * Type checking and casting macros */ #define GM_TYPE_COLOR_TABLE (gm_color_table_get_type()) #define GM_COLOR_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GM_TYPE_COLOR_TABLE, GmColorTable)) #define GM_COLOR_TABLE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GM_TYPE_COLOR_TABLE, GmColorTable const)) #define GM_COLOR_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GM_TYPE_COLOR_TABLE, GmColorTableClass)) #define GM_IS_COLOR_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GM_TYPE_COLOR_TABLE)) #define GM_IS_COLOR_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GM_TYPE_COLOR_TABLE)) #define GM_COLOR_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GM_TYPE_COLOR_TABLE, GmColorTableClass)) /* Private structure type */ typedef struct _GmColorTablePrivate GmColorTablePrivate; /* * Main object structure */ typedef struct _GmColorTable GmColorTable; struct _GmColorTable { GObject object; /*< private > */ GmColorTablePrivate *priv; }; /* * Class definition */ typedef struct _GmColorTableClass GmColorTableClass; struct _GmColorTableClass { GObjectClass parent_class; /* Signals */ void (* color_changed) (GmColorTable *table, const gchar *url); void (* bold_toggled) (GmColorTable *table, gboolean bold); void (* font_changed) (GmColorTable *table, const gchar *font_description); }; GType gm_color_table_get_type(void) G_GNUC_CONST; GmColorTable *gm_color_table_new(void); GmColorTable *gm_color_table_new_from_options(GmOptions *options); void gm_color_table_restore_defaults(GmColorTable *table); void gm_color_table_set(GmColorTable *table, const gchar *name, const gchar *hex); gboolean gm_color_table_get(GmColorTable *table, const gchar *name, GdkColor *color); void gm_color_table_set_bold(GmColorTable *table, gboolean bold); gboolean gm_color_table_bold(GmColorTable *table); void gm_color_table_set_font_description(GmColorTable *table, const gchar *font_description); const gchar *gm_color_table_font_description(GmColorTable *table); void gm_color_table_set_from_options(GmColorTable *table, GmOptions *options); G_END_DECLS #endif /* __GM_COLOR_TABLE_H__ */