Commit c4c0e2cd authored by Manish Singh's avatar Manish Singh Committed by Manish Singh

libgimpcolor/gimpcmyk.[ch] libgimpcolor/gimphsl.[ch] create boxed types

2006-07-19  Manish Singh  <yosh@gimp.org>

        * libgimpcolor/gimpcmyk.[ch]
        * libgimpcolor/gimphsl.[ch]
        * libgimpcolor/gimphsv.[ch]: create boxed types for GimpCMYK,
        GimpHSL, and GimpHSV.

        * libgimpcolor/gimpcolor.h
        * libgimpcolor/Makefile.am: include new gimphsl.[ch] files.
parent a4bd2944
2006-07-19 Manish Singh <yosh@gimp.org>
* libgimpcolor/gimpcmyk.[ch]
* libgimpcolor/gimphsl.[ch]
* libgimpcolor/gimphsv.[ch]: create boxed types for GimpCMYK,
GimpHSL, and GimpHSV.
* libgimpcolor/gimpcolor.h
* libgimpcolor/Makefile.am: include new gimphsl.[ch] files.
2006-07-19 Sven Neumann <sven@gimp.org>
Make message dialogs transient for the progress window. Addresses
......
......@@ -72,6 +72,8 @@ libgimpcolor_2_0_la_SOURCES = \
gimpcmyk.h \
gimpcolorspace.c \
gimpcolorspace.h \
gimphsl.c \
gimphsl.h \
gimphsv.c \
gimphsv.h \
gimprgb.c \
......@@ -85,6 +87,7 @@ libgimpcolorinclude_HEADERS = \
gimpbilinear.h \
gimpcmyk.h \
gimpcolorspace.h \
gimphsl.h \
gimphsv.h \
gimprgb.h
......
......@@ -28,6 +28,33 @@
#include "gimpcmyk.h"
/*
* GIMP_TYPE_CMYK
*/
static GimpCMYK * gimp_cmyk_copy (const GimpCMYK *cmyk);
GType
gimp_cmyk_get_type (void)
{
static GType cmyk_type = 0;
if (!cmyk_type)
cmyk_type = g_boxed_type_register_static ("GimpCMYK",
(GBoxedCopyFunc) gimp_cmyk_copy,
(GBoxedFreeFunc) g_free);
return cmyk_type;
}
static GimpCMYK *
gimp_cmyk_copy (const GimpCMYK *cmyk)
{
return g_memdup (cmyk, sizeof (GimpCMYK));
}
/* CMYK functions */
/**
......
......@@ -26,40 +26,48 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
void gimp_cmyk_set (GimpCMYK *cmyk,
gdouble cyan,
gdouble magenta,
gdouble yellow,
gdouble black);
void gimp_cmyk_set_uchar (GimpCMYK *cmyk,
guchar cyan,
guchar magenta,
guchar yellow,
guchar black);
void gimp_cmyk_get_uchar (const GimpCMYK *cmyk,
guchar *cyan,
guchar *magenta,
guchar *yellow,
guchar *black);
/*
* GIMP_TYPE_CMYK
*/
#define GIMP_TYPE_CMYK (gimp_cmyk_get_type ())
GType gimp_cmyk_get_type (void) G_GNUC_CONST;
void gimp_cmyk_set (GimpCMYK *cmyk,
gdouble cyan,
gdouble magenta,
gdouble yellow,
gdouble black);
void gimp_cmyk_set_uchar (GimpCMYK *cmyk,
guchar cyan,
guchar magenta,
guchar yellow,
guchar black);
void gimp_cmyk_get_uchar (const GimpCMYK *cmyk,
guchar *cyan,
guchar *magenta,
guchar *yellow,
guchar *black);
void gimp_cmyka_set (GimpCMYK *cmyka,
gdouble cyan,
gdouble magenta,
gdouble yellow,
gdouble black,
gdouble alpha);
void gimp_cmyka_set_uchar (GimpCMYK *cmyka,
guchar cyan,
guchar magenta,
guchar yellow,
guchar black,
guchar alpha);
void gimp_cmyka_get_uchar (const GimpCMYK *cmyka,
guchar *cyan,
guchar *magenta,
guchar *yellow,
guchar *black,
guchar *alpha);
void gimp_cmyka_set (GimpCMYK *cmyka,
gdouble cyan,
gdouble magenta,
gdouble yellow,
gdouble black,
gdouble alpha);
void gimp_cmyka_set_uchar (GimpCMYK *cmyka,
guchar cyan,
guchar magenta,
guchar yellow,
guchar black,
guchar alpha);
void gimp_cmyka_get_uchar (const GimpCMYK *cmyka,
guchar *cyan,
guchar *magenta,
guchar *yellow,
guchar *black,
guchar *alpha);
G_END_DECLS
......
......@@ -27,6 +27,7 @@
#include <libgimpcolor/gimpbilinear.h>
#include <libgimpcolor/gimpcolorspace.h>
#include <libgimpcolor/gimpcmyk.h>
#include <libgimpcolor/gimphsl.h>
#include <libgimpcolor/gimphsv.h>
#include <libgimpcolor/gimprgb.h>
......
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib-object.h>
#include "gimpcolortypes.h"
#include "gimphsl.h"
/*
* GIMP_TYPE_HSL
*/
static GimpHSL * gimp_hsl_copy (const GimpHSL *hsl);
GType
gimp_hsl_get_type (void)
{
static GType hsl_type = 0;
if (!hsl_type)
hsl_type = g_boxed_type_register_static ("GimpHSL",
(GBoxedCopyFunc) gimp_hsl_copy,
(GBoxedFreeFunc) g_free);
return hsl_type;
}
static GimpHSL *
gimp_hsl_copy (const GimpHSL *hsl)
{
return g_memdup (hsl, sizeof (GimpHSL));
}
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_HSL_H__
#define __GIMP_HSL_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
/*
* GIMP_TYPE_HSL
*/
#define GIMP_TYPE_HSL (gimp_hsl_get_type ())
GType gimp_hsl_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GIMP_HSL_H__ */
......@@ -19,13 +19,40 @@
#include "config.h"
#include <glib.h>
#include <glib-object.h>
#include "gimpcolortypes.h"
#include "gimphsv.h"
/*
* GIMP_TYPE_HSV
*/
static GimpHSV * gimp_hsv_copy (const GimpHSV *hsv);
GType
gimp_hsv_get_type (void)
{
static GType hsv_type = 0;
if (!hsv_type)
hsv_type = g_boxed_type_register_static ("GimpHSV",
(GBoxedCopyFunc) gimp_hsv_copy,
(GBoxedFreeFunc) g_free);
return hsv_type;
}
static GimpHSV *
gimp_hsv_copy (const GimpHSV *hsv)
{
return g_memdup (hsv, sizeof (GimpHSV));
}
/* HSV functions */
void
......
......@@ -25,17 +25,25 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
void gimp_hsv_set (GimpHSV *hsv,
gdouble hue,
gdouble saturation,
gdouble value);
void gimp_hsv_clamp (GimpHSV *hsv);
void gimp_hsva_set (GimpHSV *hsva,
gdouble hue,
gdouble saturation,
gdouble value,
gdouble alpha);
/*
* GIMP_TYPE_HSV
*/
#define GIMP_TYPE_HSV (gimp_hsv_get_type ())
GType gimp_hsv_get_type (void) G_GNUC_CONST;
void gimp_hsv_set (GimpHSV *hsv,
gdouble hue,
gdouble saturation,
gdouble value);
void gimp_hsv_clamp (GimpHSV *hsv);
void gimp_hsva_set (GimpHSV *hsva,
gdouble hue,
gdouble saturation,
gdouble value,
gdouble alpha);
G_END_DECLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment