register GimpRGB as a boxed type.

2004-07-26  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimprgb.[ch]: register GimpRGB as a boxed type.

	* libgimpcolor/gimpadaptivesupersample.c
	* libgimpcolor/gimpcolorspace.c
	* libgimpcolor/gimprgb-parse.c
	* libgimp/gimp.h: include <glib-object.h> instead of <glib.h>.
This commit is contained in:
Sven Neumann 2004-07-26 18:14:48 +00:00 committed by Sven Neumann
parent 9774728dec
commit c03a5b837e
9 changed files with 57 additions and 5 deletions

View file

@ -1,3 +1,12 @@
2004-07-26 Sven Neumann <sven@gimp.org>
* libgimpcolor/gimprgb.[ch]: register GimpRGB as a boxed type.
* libgimpcolor/gimpadaptivesupersample.c
* libgimpcolor/gimpcolorspace.c
* libgimpcolor/gimprgb-parse.c
* libgimp/gimp.h: include <glib-object.h> instead of <glib.h>.
2004-07-26 Shlomi Fish <shlomif@iglu.org.il>
* plug-ins/gimpressionist/: placed all the orientation map-related

View file

@ -78,6 +78,10 @@ GIMP_RGB_INTENSITY
GIMP_RGB_INTENSITY_RED
GIMP_RGB_INTENSITY_GREEN
GIMP_RGB_INTENSITY_BLUE
GIMP_VALUE_HOLDS_RGB
<SUBSECTION Standard>
GIMP_TYPE_RGB
gimp_rgb_get_type
</SECTION>
<SECTION>

View file

@ -334,3 +334,11 @@ coefficients taken from the NTSC analog television standard.
<!-- ##### MACRO GIMP_VALUE_HOLDS_RGB ##### -->
<para>
</para>
@value:

View file

@ -22,7 +22,7 @@
#ifndef __GIMP_H__
#define __GIMP_H__
#include <glib.h>
#include <glib-object.h>
#include <libgimpcolor/gimpcolor.h>
#include <libgimpmath/gimpmath.h>

View file

@ -19,7 +19,7 @@
#include "config.h"
#include <glib.h>
#include <glib-object.h>
#include "libgimpmath/gimpmath.h"

View file

@ -19,7 +19,7 @@
#include "config.h"
#include <glib.h>
#include <glib-object.h>
#include "libgimpmath/gimpmath.h"

View file

@ -29,7 +29,7 @@
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include "gimpcolortypes.h"

View file

@ -19,7 +19,7 @@
#include "config.h"
#include <glib.h>
#include <glib-object.h>
#include "libgimpmath/gimpmath.h"
@ -28,6 +28,31 @@
#include "gimprgb.h"
/* RGB type */
static GimpRGB * rgb_copy (const GimpRGB *rgb);
GType
gimp_rgb_get_type (void)
{
static GType rgb_type = 0;
if (!rgb_type)
rgb_type = g_boxed_type_register_static ("GimpRGB",
(GBoxedCopyFunc) rgb_copy,
(GBoxedFreeFunc) g_free);
return rgb_type;
}
static GimpRGB *
rgb_copy (const GimpRGB *rgb)
{
return g_memdup (rgb, sizeof (GimpRGB));
}
/* RGB functions */
/**

View file

@ -25,6 +25,12 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
#define GIMP_TYPE_RGB (gimp_rgb_get_type ())
#define GIMP_VALUE_HOLDS_RGB(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_RGB))
GType gimp_rgb_get_type (void) G_GNUC_CONST;
/* RGB and RGBA color types and operations taken from LibGCK */
typedef enum