2016-01-01 04:14:08 +00:00
|
|
|
/* color_utils.h
|
|
|
|
* Definitions for GTK+ color conversion routines.
|
1999-08-24 16:27:23 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
1999-08-24 16:27:23 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-08-24 16:27:23 +00:00
|
|
|
* 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.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-08-24 16:27:23 +00:00
|
|
|
* 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.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-08-24 16:27:23 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
1999-08-24 16:27:23 +00:00
|
|
|
*/
|
2010-06-15 21:18:31 +00:00
|
|
|
|
2016-01-01 04:14:08 +00:00
|
|
|
#ifndef __COLOR_UTILS_H__
|
|
|
|
#define __COLOR_UTILS_H__
|
1999-08-24 16:27:23 +00:00
|
|
|
|
2013-01-04 17:07:26 +00:00
|
|
|
#include "ui/gtk/gui_utils.h"
|
2017-06-10 01:43:00 +00:00
|
|
|
#include <wsutil/color.h>
|
2013-01-04 17:07:26 +00:00
|
|
|
|
2004-06-01 20:28:05 +00:00
|
|
|
/** @file
|
|
|
|
* Definitions for color structures and routines
|
|
|
|
*/
|
|
|
|
|
2004-07-24 00:35:13 +00:00
|
|
|
/** Convert color_t to GdkColor.
|
|
|
|
*
|
|
|
|
* @param target the GdkColor to be filled
|
|
|
|
* @param source the source color_t
|
|
|
|
*/
|
2009-09-22 04:10:50 +00:00
|
|
|
void color_t_to_gdkcolor(GdkColor *target, const color_t *source);
|
2016-01-01 04:14:08 +00:00
|
|
|
|
|
|
|
/** Convert color_t to GdkRGBA.
|
|
|
|
*
|
|
|
|
* @param target the GdkRGBA to be filled
|
|
|
|
* @param source the source color_t
|
|
|
|
*/
|
2011-08-17 13:49:47 +00:00
|
|
|
void color_t_to_gdkRGBAcolor(GdkRGBA *target, const color_t *source);
|
2016-01-01 04:14:08 +00:00
|
|
|
|
2004-07-24 00:35:13 +00:00
|
|
|
/** Convert GdkColor to color_t.
|
|
|
|
*
|
|
|
|
* @param target the source color_t
|
|
|
|
* @param source the GdkColor to be filled
|
|
|
|
*/
|
2009-09-22 04:10:50 +00:00
|
|
|
void gdkcolor_to_color_t(color_t *target, const GdkColor *source);
|
2016-01-01 04:14:08 +00:00
|
|
|
|
|
|
|
/** Convert GdkRGBA to color_t.
|
|
|
|
*
|
|
|
|
* @param target the source color_t
|
|
|
|
* @param source the GdkRGBA to be filled
|
|
|
|
*/
|
2011-08-17 13:49:47 +00:00
|
|
|
void gdkRGBAcolor_to_color_t(color_t *target, const GdkRGBA *source);
|
2013-01-04 17:07:26 +00:00
|
|
|
|
2016-01-01 04:14:08 +00:00
|
|
|
/** Convert GdkColor to GdkRGBA.
|
|
|
|
*
|
|
|
|
* @param target the source GdkColor
|
|
|
|
* @param source the GdkRGBA to be filled
|
|
|
|
*/
|
2013-01-04 17:07:26 +00:00
|
|
|
void GdkColor_to_GdkRGBA(GdkRGBA *target, const GdkColor *source);
|
2016-01-01 04:14:08 +00:00
|
|
|
|
|
|
|
/** Convert GdkRGBA to GdkColor.
|
|
|
|
*
|
|
|
|
* @param target the source GdkColor
|
|
|
|
* @param source the GdkRGBA to be filled
|
|
|
|
*/
|
2013-01-04 17:07:26 +00:00
|
|
|
void gdkRGBAcolor_to_GdkColor(GdkColor *target, const GdkRGBA *source);
|
2016-01-01 04:14:08 +00:00
|
|
|
#endif /* __COLOR_UTILS_H__ */
|