diff options
author | Shaun McCance <shaunm@gnome.org> | 2009-09-28 21:48:02 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2009-09-28 21:48:02 -0500 |
commit | b46d3d6d479ae34b4f5fb688e10d51e57fa068f3 (patch) | |
tree | 62c2038dd2948f49e4f616de331adf459288ef03 /libyelp/yelp-settings.h | |
parent | 37b053e1430329e539b170ec13b342d794768abf (diff) | |
download | yelp-b46d3d6d479ae34b4f5fb688e10d51e57fa068f3.tar.gz |
[yelp-settings] Implementing YelpSettings API for libyelp
Diffstat (limited to 'libyelp/yelp-settings.h')
-rw-r--r-- | libyelp/yelp-settings.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/libyelp/yelp-settings.h b/libyelp/yelp-settings.h new file mode 100644 index 00000000..91a8e329 --- /dev/null +++ b/libyelp/yelp-settings.h @@ -0,0 +1,113 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * Copyright (C) 2004-2009 Shaun McCance <shaunm@gnome.org> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Author: Shaun McCance <shaunm@gnome.org> + */ + +#ifndef __YELP_SETTINGS_H__ +#define __YELP_SETTINGS_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define YELP_TYPE_SETTINGS (yelp_settings_get_type ()) +#define YELP_SETTINGS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), YELP_TYPE_SETTINGS, YelpSettings)) +#define YELP_SETTINGS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), YELP_TYPE_SETTINGS, YelpSettingsClass)) +#define YELP_IS_SETTINGS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), YELP_TYPE_SETTINGS)) +#define YELP_IS_SETTINGS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), YELP_TYPE_SETTINGS)) +#define YELP_SETTINGS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), YELP_TYPE_SETTINGS, YelpSettingsClass)) + +typedef struct _YelpSettings YelpSettings; +typedef struct _YelpSettingsClass YelpSettingsClass; +typedef struct _YelpSettingsPriv YelpSettingsPriv; + +struct _YelpSettings { + GObject parent; + YelpSettingsPriv *priv; +}; + +struct _YelpSettingsClass { + GObjectClass parent_class; +}; + +typedef enum { + YELP_SETTINGS_COLOR_BASE = 0, + YELP_SETTINGS_COLOR_TEXT, + YELP_SETTINGS_COLOR_TEXT_LIGHT, + YELP_SETTINGS_COLOR_LINK, + YELP_SETTINGS_COLOR_LINK_VISITED, + YELP_SETTINGS_COLOR_GRAY_BASE, + YELP_SETTINGS_COLOR_GRAY_BORDER, + YELP_SETTINGS_COLOR_BLUE_BASE, + YELP_SETTINGS_COLOR_BLUE_BORDER, + YELP_SETTINGS_COLOR_RED_BASE, + YELP_SETTINGS_COLOR_RED_BORDER, + YELP_SETTINGS_COLOR_YELLOW_BASE, + YELP_SETTINGS_COLOR_YELLOW_BORDER, + YELP_SETTINGS_NUM_COLORS +} YelpSettingsColor; + +typedef enum { + YELP_SETTINGS_FONT_VARIABLE = 0, + YELP_SETTINGS_FONT_FIXED, + YELP_SETTINGS_NUM_FONTS +} YelpSettingsFont; + +typedef enum { + YELP_SETTINGS_ICON_BUG = 0, + YELP_SETTINGS_ICON_CAUTION, + YELP_SETTINGS_ICON_IMPORTANT, + YELP_SETTINGS_ICON_NOTE, + YELP_SETTINGS_ICON_TIP, + YELP_SETTINGS_ICON_WARNING, + YELP_SETTINGS_NUM_ICONS +} YelpSettingsIcon; + +YelpSettings * yelp_settings_get_default (void); + +gchar * yelp_settings_get_color (YelpSettings *settings, + YelpSettingsColor color); +gchar ** yelp_settings_get_colors (YelpSettings *settings); +void yelp_settings_set_colors (YelpSettings *settings, + YelpSettingsColor first_color, + ...); + +gchar * yelp_settings_get_font (YelpSettings *settings, + YelpSettingsFont font); +gchar * yelp_settings_get_font_family (YelpSettings *settings, + YelpSettingsFont font); +gint yelp_settings_get_font_size (YelpSettings *settings, + YelpSettingsFont font); +void yelp_settings_set_fonts (YelpSettings *settings, + YelpSettingsFont first_font, + ...); + +gint yelp_settings_get_icon_size (YelpSettings *settings); +void yelp_settings_set_icon_size (YelpSettings *settings, + gint size); +gchar * yelp_settings_get_icon (YelpSettings *settings, + YelpSettingsIcon icon); +void yelp_settings_set_icons (YelpSettings *settings, + YelpSettingsIcon first_icon, + ...); + +G_END_DECLS + +#endif /* __YELP_SETTINGS_H__ */ |