1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* This file is part of the GtkHTML library. |
---|
3 | |
---|
4 | Copyright (C) 2000 Helix Code, Inc. |
---|
5 | |
---|
6 | This library is free software; you can redistribute it and/or |
---|
7 | modify it under the terms of the GNU Library General Public |
---|
8 | License as published by the Free Software Foundation; either |
---|
9 | version 2 of the License, or (at your option) any later version. |
---|
10 | |
---|
11 | This library is distributed in the hope that it will be useful, |
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
14 | Library General Public License for more details. |
---|
15 | |
---|
16 | You should have received a copy of the GNU Library General Public License |
---|
17 | along with this library; see the file COPYING.LIB. If not, write to |
---|
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
19 | Boston, MA 02111-1307, USA. |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef _HTMLCOLORSET_H_ |
---|
23 | #define _HTMLCOLORSET_H_ |
---|
24 | |
---|
25 | #include <gtk/gtkwidget.h> |
---|
26 | #include "htmltypes.h" |
---|
27 | #include "htmlenums.h" |
---|
28 | |
---|
29 | struct _HTMLColorSet |
---|
30 | { |
---|
31 | HTMLColor *color [HTMLColors]; |
---|
32 | gboolean changed [HTMLColors]; |
---|
33 | |
---|
34 | /* slave sets - they must be updated when setting this one |
---|
35 | engine has master set and painters have slave ones |
---|
36 | */ |
---|
37 | GSList *slaves; |
---|
38 | }; |
---|
39 | |
---|
40 | |
---|
41 | |
---|
42 | /* ctor + dtor */ |
---|
43 | HTMLColorSet *html_colorset_new (GtkWidget *w); |
---|
44 | void html_colorset_destroy (HTMLColorSet *set); |
---|
45 | |
---|
46 | /* slaves handling */ |
---|
47 | void html_colorset_add_slave (HTMLColorSet *set, |
---|
48 | HTMLColorSet *slave); |
---|
49 | /* colors set/get */ |
---|
50 | void html_colorset_set_color (HTMLColorSet *set, |
---|
51 | GdkColor *color, |
---|
52 | HTMLColorId idx); |
---|
53 | HTMLColor *html_colorset_get_color (HTMLColorSet *set, |
---|
54 | HTMLColorId idx); |
---|
55 | HTMLColor *html_colorset_get_color_allocated (HTMLColorSet *s, |
---|
56 | HTMLPainter *painter, |
---|
57 | HTMLColorId idx); |
---|
58 | |
---|
59 | /* copy colors from one se to another, used for resetting to default values */ |
---|
60 | void html_colorset_set_by (HTMLColorSet *s, HTMLColorSet *o); |
---|
61 | void html_colorset_set_unchanged (HTMLColorSet *s, HTMLColorSet *o); |
---|
62 | void html_colorset_set_style (HTMLColorSet *s, GtkWidget *w); |
---|
63 | |
---|
64 | #endif |
---|