This repository has been archived on 2020-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
gnoemoe/src/gm-color-table.h

80 lines
2.4 KiB
C
Raw Normal View History

2005-10-09 10:53:36 +02:00
#ifndef __GM_COLOR_TABLE_H__
#define __GM_COLOR_TABLE_H__
#include <gtk/gtk.h>
#include "gm-options.h"
G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
2005-11-06 17:00:32 +01:00
#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))
2005-10-09 10:53:36 +02:00
#define GM_COLOR_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GM_TYPE_COLOR_TABLE, GmColorTableClass))
2005-11-06 17:00:32 +01:00
#define GM_IS_COLOR_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GM_TYPE_COLOR_TABLE))
2005-10-09 10:53:36 +02:00
#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 */
2005-10-11 11:42:29 +02:00
void (* color_changed) (GmColorTable *table, const gchar *color);
2005-10-09 10:53:36 +02:00
void (* font_changed) (GmColorTable *table, const gchar *font_description);
};
2005-11-06 17:00:32 +01:00
typedef enum _GmColorTableScheme {
SCHEME_NONE = 0,
SCHEME_DEFAULT = 1,
SCHEME_WHITE_ON_BLACK = 2,
SCHEME_USER = 3
} GmColorTableScheme;
2005-10-09 10:53:36 +02:00
GType gm_color_table_get_type(void) G_GNUC_CONST;
2005-11-06 17:00:32 +01:00
2005-10-09 10:53:36 +02:00
GmColorTable *gm_color_table_new(void);
2005-11-06 17:00:32 +01:00
GmColorTable *gm_color_table_new_from_options(gchar *filename);
void gm_color_table_save(GmColorTable *table);
2005-10-09 10:53:36 +02:00
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);
2005-10-11 11:42:29 +02:00
const gchar *gm_color_table_get_hex(GmColorTable *table, const gchar *name);
2005-11-06 17:00:32 +01:00
2005-10-09 10:53:36 +02:00
void gm_color_table_set_font_description(GmColorTable *table,
const gchar *font_description);
const gchar *gm_color_table_font_description(GmColorTable *table);
2005-11-06 17:00:32 +01:00
void gm_color_table_load_scheme(GmColorTable *table,
GmColorTableScheme scheme);
void gm_color_table_set_from_scheme_name(GmColorTable *table,
const gchar *name);
2005-10-09 10:53:36 +02:00
void gm_color_table_set_from_options(GmColorTable *table, GmOptions *options);
G_END_DECLS
#endif /* __GM_COLOR_TABLE_H__ */