diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-12-31 20:14:08 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-01-01 04:15:29 +0000 |
commit | ee9f102aa9ec36b28992512d840f971be4eba571 (patch) | |
tree | 8251e2c26ba9f6c3680633a03901dd386c3d349d /ui/gtk/color_utils.h | |
parent | 93f9416c3660b87896e8b59a4d952fb851002bb5 (diff) |
No need for toolkit-dependent color initialization.
We're not allocating colors ourselves in GTK+ (and haven't been doing so
since at least 1.12), and all color_t values are valid colors, so
we don't need any toolkit-specific processing to fill in a color_t.
While we're at it, catch read errors when reading color filter files.
Change-Id: Ieb520d141cf15e371a31a01459d466c95ba2209b
Reviewed-on: https://code.wireshark.org/review/12985
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/gtk/color_utils.h')
-rw-r--r-- | ui/gtk/color_utils.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/ui/gtk/color_utils.h b/ui/gtk/color_utils.h index 1f8fcf2ec9..15c4953b62 100644 --- a/ui/gtk/color_utils.h +++ b/ui/gtk/color_utils.h @@ -1,5 +1,5 @@ -/* colors.h - * Definitions for color structures and routines +/* color_utils.h + * Definitions for GTK+ color conversion routines. * * Wireshark - Network traffic analyzer * By Gerald Combs <gerald@wireshark.org> @@ -20,8 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __COLORS_H__ -#define __COLORS_H__ +#ifndef __COLOR_UTILS_H__ +#define __COLOR_UTILS_H__ #include "ui/gtk/gui_utils.h" #include <epan/color_filters.h> @@ -36,15 +36,39 @@ * @param source the source color_t */ void color_t_to_gdkcolor(GdkColor *target, const color_t *source); + +/** Convert color_t to GdkRGBA. + * + * @param target the GdkRGBA to be filled + * @param source the source color_t + */ void color_t_to_gdkRGBAcolor(GdkRGBA *target, const color_t *source); + /** Convert GdkColor to color_t. * * @param target the source color_t * @param source the GdkColor to be filled */ void gdkcolor_to_color_t(color_t *target, const GdkColor *source); + +/** Convert GdkRGBA to color_t. + * + * @param target the source color_t + * @param source the GdkRGBA to be filled + */ void gdkRGBAcolor_to_color_t(color_t *target, const GdkRGBA *source); +/** Convert GdkColor to GdkRGBA. + * + * @param target the source GdkColor + * @param source the GdkRGBA to be filled + */ void GdkColor_to_GdkRGBA(GdkRGBA *target, const GdkColor *source); + +/** Convert GdkRGBA to GdkColor. + * + * @param target the source GdkColor + * @param source the GdkRGBA to be filled + */ void gdkRGBAcolor_to_GdkColor(GdkColor *target, const GdkRGBA *source); -#endif /* __COLORS_H__ */ +#endif /* __COLOR_UTILS_H__ */ |