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  * Authors:           Radek Doulik (rodo@helixcode.com)
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHcANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public License
18  * along with this library; see the file COPYING.LIB.  If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef _HTML_COLOR_H_
24 #define _HTML_COLOR_H_
25 
26 #include <gtk/gtk.h>
27 #include "htmltypes.h"
28 
29 struct _HTMLColor {
30 	GdkColor color;
31 	gboolean allocated;
32 	guint refcount;
33 };
34 
35 HTMLColor * html_color_new                (void);
36 HTMLColor * html_color_new_from_gdk_color (const GdkColor *color);
37 HTMLColor * html_color_new_from_rgb       (gushort red, gushort green, gushort blue);
38 
39 void        html_color_ref                (HTMLColor *color);
40 void        html_color_unref              (HTMLColor *color);
41 
42 void        html_color_alloc              (HTMLColor *color, HTMLPainter *painter);
43 void        html_color_free               (HTMLColor *color, HTMLPainter *painter);
44 
45 gboolean    html_color_equal              (HTMLColor *color1, HTMLColor *color2);
46 
47 void        html_color_set                (HTMLColor *color, GdkColor *c);
48 
49 #endif
50